@serenity-is/corelib
@serenity-is/corelib
Serenity Core Library
This is the package containing core TypeScript classes and functions used in Serenity applications.
It should be installed by default in your projects created from Serene or StartSharp template:
{
"dependencies": {
// ...
"@serenity-is/corelib": "latest"
}
}
The version number for this package should be equal or as close as possible to Serenity NuGet package versions in your project file.
When using classic namespaces instead of the ESM modules, the types and functions in this module are directly available from the global
SerenityandQnamespaces. e.g.Serenity.EntityGrid
Table of contents
Namespaces
- AggregateFormatting
- Aggregators
- Authorization
- Decorators
- DialogExtensions
- DialogTexts
- DialogTypeRegistry
- EditorTypeRegistry
- EditorUtils
- Enum
- EnumTypeRegistry
- ErrorHandling
- FilterOperators
- FilteringTypeRegistry
- FormatterTypeRegistry
- GridSelectAllButtonHelper
- GridUtils
- LT
- LayoutTimer
- LazyLoadHelper
- PropertyItemSlickConverter
- ReflectionOptionsSetter
- ReflectionUtils
- Router
- ScriptData
- SlickFormatting
- SlickHelper
- SlickTreeHelper
- SubDialogHelper
- TabsExtensions
- UploadHelper
- ValidationHelper
Enumerations
- CaptureOperationType
- ColumnSelection
- CriteriaOperator
- MemberType
- PropertyGridMode
- RetrieveColumnSelection
- SummaryType
Classes
- ArgumentNullException
- AutoNumeric
- BaseEditorFiltering
- BaseFiltering
- BooleanEditor
- BooleanFiltering
- BooleanFormatter
- CascadedWidgetLink
- CategoryAttribute
- CheckLookupEditor
- CheckTreeEditor
- CheckboxFormatter
- CloseButtonAttribute
- ColumnPickerDialog
- ColumnsBase
- ColumnsKeyAttribute
- Combobox
- ComboboxEditor
- CriteriaBuilder
- CssClassAttribute
- DataGrid
- DateEditor
- DateFiltering
- DateFormatter
- DateTimeEditor
- DateTimeFiltering
- DateTimeFormatter
- DateYearEditor
- DecimalEditor
- DecimalFiltering
- DefaultValueAttribute
- Dialog
- DialogTypeAttribute
- DisplayNameAttribute
- EditorAttribute
- EditorFiltering
- EditorOptionAttribute
- EditorTypeAttribute
- EditorTypeAttributeBase
- EditorWidget
- ElementAttribute
- EmailAddressEditor
- EmailEditor
- EntityDialog
- EntityGrid
- EntityTypeAttribute
- EnumEditor
- EnumFiltering
- EnumFormatter
- EnumKeyAttribute
- Exception
- FileDownloadFormatter
- FileUploadEditor
- FilterDialog
- FilterDisplayBar
- FilterPanel
- FilterStore
- FilterWidgetBase
- FilterableAttribute
- FlexifyAttribute
- FormKeyAttribute
- GeneratedCodeAttribute
- GridRadioSelectionMixin
- GridRowSelectionMixin
- HiddenAttribute
- HintAttribute
- HtmlContentEditor
- HtmlNoteContentEditor
- HtmlReportContentEditor
- IBooleanValue
- IDialog
- IDoubleValue
- IEditDialog
- IFiltering
- IGetEditValue
- IInitializeColumn
- IQuickFiltering
- IReadOnly
- ISetEditValue
- ISlickFormatter
- IStringValue
- IValidateRequired
- IdPropertyAttribute
- ImageUploadEditor
- InsertableAttribute
- IntegerEditor
- IntegerFiltering
- InvalidCastException
- IsActivePropertyAttribute
- ItemNameAttribute
- LocalTextPrefixAttribute
- Lookup
- LookupEditor
- LookupEditorBase
- LookupFiltering
- MaskedEditor
- MaxLengthAttribute
- MaximizableAttribute
- MinuteFormatter
- MultipleFileUploadEditor
- MultipleImageUploadEditor
- NamePropertyAttribute
- NumberFormatter
- OneWayAttribute
- OptionAttribute
- OptionsTypeAttribute
- PanelAttribute
- PasswordEditor
- PlaceholderAttribute
- PrefixedContext
- PropertyDialog
- PropertyGrid
- PropertyPanel
- QuickFilterBar
- QuickSearchInput
- RadioButtonEditor
- ReadOnlyAttribute
- Recaptcha
- RemoteView
- RequiredAttribute
- ResizableAttribute
- ResponsiveAttribute
- Select2
- SelectEditor
- ServiceAttribute
- ServiceLookupEditor
- ServiceLookupEditorBase
- ServiceLookupFiltering
- SlickPager
- StaticPanelAttribute
- StringEditor
- StringFiltering
- TemplatedDialog
- TemplatedPanel
- TemplatedWidget
- TextAreaEditor
- TimeEditor
- Toastr
- Toolbar
- Tooltip
- TreeGridMixin
- URLEditor
- UpdatableAttribute
- Uploader
- UrlFormatter
- Validator
- Widget
Interfaces
- AutoNumericOptions
- CKEditorConfig
- CheckLookupEditorOptions
- CheckTreeItem
- ComboboxCommonOptions
- ComboboxEditorOptions
- ComboboxFilterOptions
- ComboboxInplaceAddOptions
- ComboboxItem
- ComboboxOptions
- ComboboxSearchQuery
- ComboboxSearchResult
- ConfirmDialogOptions
- CreateWidgetParams
- CriteriaWithText
- DataChangeInfo
- DateEditorOptions
- DateFormat
- DateTimeEditorOptions
- DateYearEditorOptions
- DebouncedFunction
- DecimalEditorOptions
- DeleteRequest
- DeleteResponse
- DialogButton
- DialogOptions
- EmailEditorOptions
- EnumEditorOptions
- FileUploadConstraints
- FileUploadEditorOptions
- FilterFieldSelectOptions
- FilterLine
- FilterOperator
- Fluent
- Formatter
- GridPersistanceFlags
- GridRadioSelectionMixinOptions
- GridRowSelectionMixinOptions
- GroupInfo
- HandleRouteEvent
- HtmlContentEditorOptions
- IDataGrid
- IFrameDialogOptions
- IRowDefinition
- ImageUploadEditorOptions
- IntegerEditorOptions
- ListRequest
- ListResponse
- Locale
- LookupEditorOptions
- LookupOptions
- MaskedEditorOptions
- MessageDialogOptions
- MultipleFileUploadEditorOptions
- NumberFormat
- PagerOptions
- PagingInfo
- PagingOptions
- PersistedGridColumn
- PersistedGridSettings
- PostToServiceOptions
- PostToUrlOptions
- PropertyGridOptions
- PropertyItem
- PropertyItemsData
- QuickFilter
- QuickFilterArgs
- QuickFilterBarOptions
- QuickSearchField
- QuickSearchInputOptions
- RadioButtonEditorOptions
- RecaptchaOptions
- RemoteViewOptions
- RequestErrorInfo
- RetrieveLocalizationRequest
- RetrieveLocalizationResponse
- RetrieveRequest
- RetrieveResponse
- SaveRequest
- SaveRequestWithAttachment
- SaveResponse
- SaveWithLocalizationRequest
- Select2AjaxOptions
- Select2Item
- Select2Options
- Select2QueryOptions
- Select2Result
- SelectEditorOptions
- ServiceError
- ServiceLookupEditorOptions
- ServiceOptions
- ServiceRequest
- ServiceResponse
- SettingStorage
- SummaryOptions
- TextAreaEditorOptions
- TimeEditorOptions
- ToolButton
- ToolButtonProps
- ToolbarOptions
- TooltipOptions
- TreeGridMixinOptions
- TypeMember
- UndeleteRequest
- UndeleteResponse
- UploadInputOptions
- UploadResponse
- UploadedFile
- UploaderBatch
- UploaderErrorData
- UploaderOptions
- UploaderRequest
- UploaderSuccessData
- UserDefinition
- ValidatableElement
- ValidationErrorItem
- ValidationErrorMap
- ValidationRulesMap
- ValidatorOptions
Type Aliases
- AnyIconClass
- CancellableViewCallback
- ClassTypeInfo
- ComboboxFormatResult
- ComboboxType
- Constructor
- DialogType
- Dictionary
- EditorProps
- EditorTypeInfo
- Format
- FormatterTypeInfo
- GroupByElement
- GroupByResult
- Grouping
- IconClassName
- IdPrefixType
- InterfaceTypeInfo
- KnownIconClass
- NoInfer
- NotifyMap
- RemoteViewAjaxCallback
- RemoteViewFilter
- RemoteViewProcessCallback
- Select2Element
- Select2FormatResult
- StringLiteral
- TextColor
- ToastContainerOptions
- ToastrOptions
- Type
- TypeInfo
- UtilityColor
- ValidateEventDelegate
- ValidationErrorList
- ValidationProvider
- ValidationRules
- ValidationValue
- WidgetProps
- faIconKey
- fabIconKey
Variables
Functions
- Criteria
- Fluent
- GridPageInit
- PanelPageInit
- ToolbarButton
- addClass
- addCustomAttribute
- addEmptyOption
- addLocalText
- addOption
- addTypeMember
- addValidationRule
- alert
- alertDialog
- any
- appendChild
- associateWidget
- attrEncode
- bgColor
- blockUI
- blockUndo
- canLoadScriptData
- cancelDialogButton
- cast
- centerDialog
- classTypeInfo
- clearKeys
- clearOptions
- coalesce
- compareStringFactory
- confirm
- confirmDialog
- count
- dbText
- dbTryText
- deassociateWidget
- debounce
- deepClone
- delegateCombine
- delegateContains
- delegateRemove
- editorTypeInfo
- endsWith
- executeEverytimeWhenVisible
- executeOnceWhenVisible
- extend
- faIcon
- fabIcon
- fetchScriptData
- fieldsProxy
- findElementWithRelativeId
- first
- format
- formatDate
- formatDayHourAndMin
- formatISODateTimeUTC
- formatNumber
- formatterTypeInfo
- getActiveRequests
- getBaseType
- getColumns
- getColumnsAsync
- getColumnsData
- getColumnsDataAsync
- getColumnsScript
- getCookie
- getCustomAttribute
- getCustomAttributes
- getForm
- getFormAsync
- getFormData
- getFormDataAsync
- getFormScript
- getGlobalObject
- getInstanceType
- getLookup
- getLookupAsync
- getMembers
- getNested
- getRemoteData
- getRemoteDataAsync
- getScriptData
- getScriptDataHash
- getTemplate
- getType
- getTypeFullName
- getTypeNameProp
- getTypeRegistry
- getTypeShortName
- getTypes
- getWidgetFrom
- getWidgetName
- getjQuery
- gridPageInit
- groupBy
- handleScriptDataError
- hasBSModal
- hasCustomAttribute
- hasUIDialog
- htmlEncode
- iconClassName
- iframeDialog
- indexOf
- information
- informationDialog
- initFormType
- initFullHeightGridPage
- initializeTypes
- insert
- interfaceTypeInfo
- isArray
- isArrayLike
- isAssignableFrom
- isBS3
- isBS5Plus
- isEmptyOrNull
- isEnum
- isInstanceOfType
- isMobileView
- isPromiseLike
- isSameOrigin
- isTrimmedEmpty
- isValue
- keyOf
- layoutFillHeight
- layoutFillHeightValue
- localText
- localeFormat
- newBodyDiv
- noDialogButton
- notifyError
- notifyInfo
- notifySuccess
- notifyWarning
- okDialogButton
- omitUndefined
- outerHtml
- padLeft
- panelPageInit
- parseCriteria
- parseDate
- parseDayHourAndMin
- parseDecimal
- parseHourAndMin
- parseISODateTime
- parseInteger
- parseQueryString
- peekScriptData
- positionToastContainer
- postToService
- postToUrl
- prefixedText
- proxyTexts
- registerClass
- registerEditor
- registerEnum
- registerFormatter
- registerInterface
- registerType
- reloadLookup
- reloadLookupAsync
- removeClass
- removeValidationRule
- replaceAll
- requestFinished
- requestStarting
- resolveServiceUrl
- resolveUrl
- round
- safeCast
- serviceCall
- serviceRequest
- setEquality
- setRegisteredScripts
- setScriptData
- setTypeNameProp
- single
- splitDateString
- startsWith
- stringFormat
- stringFormatLocale
- stripDiacritics
- success
- successDialog
- text
- textColor
- toGrouping
- toId
- toSingleLine
- today
- toggleClass
- triggerLayoutOnShow
- trim
- trimEnd
- trimStart
- trimToEmpty
- trimToNull
- trunc
- tryFirst
- tryGetText
- tryGetWidget
- turkishLocaleCompare
- turkishLocaleToLower
- turkishLocaleToUpper
- uiAndBSButtonNoConflict
- useIdPrefix
- validateOptions
- validatorAbortHandler
- warning
- warningDialog
- yesDialogButton
- zeroPad
Type Aliases
AnyIconClass
Ƭ AnyIconClass: KnownIconClass | string &
Defined in
CancellableViewCallback
Ƭ CancellableViewCallback<TEntity>: (view: RemoteView<TEntity>) => boolean | void
Type parameters
| Name |
|---|
TEntity |
Type declaration
▸ (view): boolean | void
Parameters
| Name | Type |
|---|---|
view |
RemoteView<TEntity> |
Returns
boolean | void
Defined in
ClassTypeInfo
Ƭ ClassTypeInfo<T>: TypeInfo<T>
Type parameters
| Name |
|---|
T |
Defined in
ComboboxFormatResult
Ƭ ComboboxFormatResult: string | Element | DocumentFragment
Defined in
ComboboxType
Ƭ ComboboxType: "select2"
Defined in
Constructor
Ƭ Constructor<T>: (...args: any[]) => T
Type parameters
| Name |
|---|
T |
Type declaration
• (...args): T
Parameters
| Name | Type |
|---|---|
...args |
any[] |
Returns
T
Defined in
DialogType
Ƭ DialogType: "bsmodal" | "uidialog" | "panel"
Defined in
Dictionary
Ƭ Dictionary<TItem>: Object
Type parameters
| Name |
|---|
TItem |
Index signature
▪ [key: string]: TItem
Defined in
EditorProps
Ƭ EditorProps<T>: WidgetProps<T> & { initialValue?: any ; maxLength?: number ; name?: string ; placeholder?: string ; readOnly?: boolean ; required?: boolean }
Type parameters
| Name |
|---|
T |
Defined in
src/ui/widgets/widgetutils.ts:129
EditorTypeInfo
Ƭ EditorTypeInfo<T>: TypeInfo<T>
Type parameters
| Name |
|---|
T |
Defined in
Format
Ƭ Format<TItem>: (ctx: FormatterContext<TItem>) => FormatterResult
Type parameters
| Name | Type |
|---|---|
TItem |
any |
Type declaration
▸ (ctx): FormatterResult
Parameters
| Name | Type |
|---|---|
ctx |
FormatterContext<TItem> |
Returns
FormatterResult
Defined in
FormatterTypeInfo
Ƭ FormatterTypeInfo<T>: TypeInfo<T>
Type parameters
| Name |
|---|
T |
Defined in
GroupByElement
Ƭ GroupByElement<TItem>: Object
A group item returned by groupBy().
Type parameters
| Name |
|---|
TItem |
Type declaration
| Name | Type | Description |
|---|---|---|
items |
TItem[] |
the items in the group |
key |
string |
key of the group |
order |
number |
index of the item in inOrder array |
start |
number |
index of the first item of this group in the original array |
Defined in
GroupByResult
Ƭ GroupByResult<TItem>: Object
Return type of the groupBy function.
Type parameters
| Name |
|---|
TItem |
Type declaration
| Name | Type |
|---|---|
byKey |
{ [key: string]: GroupByElement<TItem>; } |
inOrder |
GroupByElement<TItem>[] |
Defined in
Grouping
Ƭ Grouping<TItem>: Object
Type parameters
| Name |
|---|
TItem |
Index signature
▪ [key: string]: TItem[]
Defined in
IconClassName
Ƭ IconClassName: AnyIconClass | AnyIconClass[]
Defined in
IdPrefixType
Ƭ IdPrefixType: Object
Index signature
▪ [key: string]: string
Type declaration
| Name | Type |
|---|---|
Form |
string |
PropertyGrid |
string |
Tabs |
string |
Toolbar |
string |
Defined in
src/ui/widgets/widgetutils.ts:108
InterfaceTypeInfo
Ƭ InterfaceTypeInfo<T>: TypeInfo<T>
Type parameters
| Name |
|---|
T |
Defined in
KnownIconClass
Ƭ KnownIconClass: `fa fa-\(\{faIconKey}\` \| \`fab fa-\){fabIconKey}`
Defined in
NoInfer
Ƭ NoInfer<T>: [T][T extends any ? 0 : never]
Type parameters
| Name |
|---|
T |
Defined in
NotifyMap
Ƭ NotifyMap: Object
Type declaration
| Name | Type |
|---|---|
iconClass |
string |
message? |
string |
title? |
string |
type |
string |
Defined in
RemoteViewAjaxCallback
Ƭ RemoteViewAjaxCallback<TEntity>: (view: RemoteView<TEntity>, options: ServiceOptions<ListResponse<TEntity>>) => boolean | void
Type parameters
| Name |
|---|
TEntity |
Type declaration
▸ (view, options): boolean | void
Parameters
| Name | Type |
|---|---|
view |
RemoteView<TEntity> |
options |
ServiceOptions<ListResponse<TEntity>> |
Returns
boolean | void
Defined in
RemoteViewFilter
Ƭ RemoteViewFilter<TEntity>: (item: TEntity, view: RemoteView<TEntity>) => boolean
Type parameters
| Name |
|---|
TEntity |
Type declaration
▸ (item, view): boolean
Parameters
| Name | Type |
|---|---|
item |
TEntity |
view |
RemoteView<TEntity> |
Returns
boolean
Defined in
RemoteViewProcessCallback
Ƭ RemoteViewProcessCallback<TEntity>: (data: ListResponse<TEntity>, view: RemoteView<TEntity>) => ListResponse<TEntity>
Type parameters
| Name |
|---|
TEntity |
Type declaration
▸ (data, view): ListResponse<TEntity>
Parameters
| Name | Type |
|---|---|
data |
ListResponse<TEntity> |
view |
RemoteView<TEntity> |
Returns
ListResponse<TEntity>
Defined in
Select2Element
Ƭ Select2Element: HTMLInputElement | HTMLSelectElement
Defined in
Select2FormatResult
Ƭ Select2FormatResult: string | Element | DocumentFragment
Defined in
StringLiteral
Ƭ StringLiteral<T>: T extends string ? string extends T ? never : T : never
Type parameters
| Name |
|---|
T |
Defined in
src/base/system-internal.ts:23
TextColor
Ƭ TextColor: UtilityColor | "aqua" | "blue" | "fuschia" | "gray" | "green" | "light-blue" | "lime" | "maroon" | "navy" | "olive" | "orange" | "purple" | "red" | "teal" | "yellow"
Defined in
ToastContainerOptions
Ƭ ToastContainerOptions: Object
Type declaration
| Name | Type |
|---|---|
containerId? |
string |
positionClass? |
string |
target? |
string |
Defined in
ToastrOptions
Ƭ ToastrOptions: ToastContainerOptions & { closeButton?: boolean ; closeClass?: string ; closeDuration?: number | false ; closeEasing?: boolean ; closeHtml?: string ; closeMethod?: boolean ; closeOnHover?: boolean ; escapeHtml?: boolean ; extendedTimeOut?: number ; hideDuration?: number ; iconClass?: string ; messageClass?: string ; newestOnTop?: boolean ; onCloseClick?: (event: Event) => void ; onHidden?: () => void ; onShown?: () => void ; onclick?: (event: MouseEvent) => void ; positionClass?: string ; preventDuplicates?: boolean ; rtl?: boolean ; showDuration?: number ; tapToDismiss?: boolean ; target?: string ; timeOut?: number ; titleClass?: string ; toastClass?: string }
Defined in
Type
Ƭ Type: Function | Object
Defined in
TypeInfo
Ƭ TypeInfo<T>: Object
Type parameters
| Name |
|---|
T |
Type declaration
| Name | Type |
|---|---|
customAttributes? |
any[] |
enumFlags? |
boolean |
interfaces? |
any[] |
registered? |
boolean |
typeKind |
"class" | "enum" | "interface" | "editor" | "formatter" |
typeName |
StringLiteral<T> | string & |
Defined in
src/base/system-internal.ts:25
UtilityColor
Ƭ UtilityColor: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark" | "muted" | "white"
Defined in
ValidateEventDelegate
Ƭ ValidateEventDelegate: (element: ValidatableElement, event: Event, validator: Validator) => void
Type declaration
▸ (element, event, validator): void
Parameters
| Name | Type |
|---|---|
element |
ValidatableElement |
event |
Event |
validator |
Validator |
Returns
void
Defined in
ValidationErrorList
Ƭ ValidationErrorList: ValidationErrorItem[]
Defined in
ValidationProvider
Ƭ ValidationProvider: (value: ValidationValue, element: ValidatableElement, params?: any) => boolean | string | Promise<boolean | string>
Validation plugin signature with multitype return. Boolean return signifies the validation result, which uses the default validation error message read from the element attribute. String return signifies failed validation, which then will be used as the validation error message. Promise return signifies asynchronous plugin behavior, with same behavior as Boolean or String.
Type declaration
▸ (value, element, params?): boolean | string | Promise<boolean | string>
Parameters
| Name | Type |
|---|---|
value |
ValidationValue |
element |
ValidatableElement |
params? |
any |
Returns
boolean | string | Promise<boolean | string>
Defined in
ValidationRules
Ƭ ValidationRules: Record<string, any>
Defined in
ValidationValue
Ƭ ValidationValue: string | string[] | number | boolean
Defined in
WidgetProps
Ƭ WidgetProps<P>: { class?: string ; element?: (el: HTMLElement) => void | HTMLElement | ArrayLike<HTMLElement> | string ; id?: string } & NoInfer<P>
Type parameters
| Name |
|---|
P |
Defined in
src/ui/widgets/widgetutils.ts:123
faIconKey
Ƭ faIconKey: "ad" | "address-book" | "address-card" | "adjust" | "air-freshener" | "align-center" | "align-justify" | "align-left" | "align-right" | "allergies" | "ambulance" | "american-sign-language-interpreting" | "anchor" | "angle-double-down" | "angle-double-left" | "angle-double-right" | "angle-double-up" | "angle-down" | "angle-left" | "angle-right" | "angle-up" | "angry" | "ankh" | "apple-alt" | "archive" | "archway" | "arrow-alt-circle-down" | "arrow-alt-circle-left" | "arrow-alt-circle-right" | "arrow-alt-circle-up" | "arrow-circle-down" | "arrow-circle-left" | "arrow-circle-right" | "arrow-circle-up" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "arrows-alt" | "arrows-alt-h" | "arrows-alt-v" | "assistive-listening-systems" | "asterisk" | "at" | "atlas" | "atom" | "audio-description" | "award" | "baby" | "baby-carriage" | "backspace" | "backward" | "bacon" | "balance-scale" | "balance-scale-left" | "balance-scale-right" | "ban" | "band-aid" | "barcode" | "bars" | "baseball-ball" | "basketball-ball" | "bath" | "battery-empty" | "battery-full" | "battery-half" | "battery-quarter" | "battery-three-quarters" | "bed" | "beer" | "bell" | "bell-o" | "bell-slash" | "bezier-curve" | "bible" | "bicycle" | "biking" | "binoculars" | "biohazard" | "birthday-cake" | "blender" | "blender-phone" | "blind" | "blog" | "bold" | "bolt" | "bomb" | "bone" | "bong" | "book" | "book-dead" | "book-medical" | "book-open" | "book-reader" | "bookmark" | "border-all" | "border-none" | "border-style" | "bowling-ball" | "box" | "box-open" | "boxes" | "braille" | "brain" | "bread-slice" | "briefcase" | "briefcase-medical" | "broadcast-tower" | "broom" | "brush" | "bug" | "building" | "bullhorn" | "bullseye" | "burn" | "bus" | "bus-alt" | "business-time" | "calculator" | "calendar" | "calendar-alt" | "calendar-check" | "calendar-day" | "calendar-minus" | "calendar-plus" | "calendar-times" | "calendar-week" | "camera" | "camera-retro" | "campground" | "candy-cane" | "cannabis" | "capsules" | "car" | "car-alt" | "car-battery" | "car-crash" | "car-side" | "caret-down" | "caret-left" | "caret-right" | "caret-square-down" | "caret-square-left" | "caret-square-right" | "caret-square-up" | "caret-up" | "carrot" | "cart-arrow-down" | "cart-plus" | "cash-register" | "cat" | "certificate" | "chair" | "chalkboard" | "chalkboard-teacher" | "charging-station" | "chart-area" | "chart-bar" | "chart-line" | "chart-pie" | "check" | "check-circle" | "check-double" | "check-square" | "cheese" | "chess" | "chess-bishop" | "chess-board" | "chess-king" | "chess-knight" | "chess-pawn" | "chess-queen" | "chess-rook" | "chevron-circle-down" | "chevron-circle-left" | "chevron-circle-right" | "chevron-circle-up" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "child" | "church" | "circle" | "circle-notch" | "city" | "clinic-medical" | "clipboard" | "clipboard-check" | "clipboard-list" | "clock" | "clock-o" | "clone" | "closed-captioning" | "cloud" | "cloud-download-alt" | "cloud-meatball" | "cloud-moon" | "cloud-moon-rain" | "cloud-rain" | "cloud-showers-heavy" | "cloud-sun" | "cloud-sun-rain" | "cloud-upload-alt" | "cocktail" | "code" | "code-branch" | "coffee" | "cog" | "cogs" | "coins" | "columns" | "comment" | "comment-alt" | "comment-dollar" | "comment-dots" | "comment-medical" | "comment-slash" | "comments" | "comments-dollar" | "compact-disc" | "compass" | "compress" | "compress-arrows-alt" | "concierge-bell" | "cookie" | "cookie-bite" | "copy" | "copyright" | "couch" | "credit-card" | "crop" | "crop-alt" | "cross" | "crosshairs" | "crow" | "crown" | "crutch" | "cube" | "cubes" | "cut" | "database" | "deaf" | "democrat" | "desktop" | "dharmachakra" | "diagnoses" | "dice" | "dice-d20" | "dice-d6" | "dice-five" | "dice-four" | "dice-one" | "dice-six" | "dice-three" | "dice-two" | "digital-tachograph" | "directions" | "divide" | "dizzy" | "dna" | "dog" | "dollar-sign" | "dolly" | "dolly-flatbed" | "donate" | "door-closed" | "door-open" | "dot-circle" | "dove" | "download" | "drafting-compass" | "dragon" | "draw-polygon" | "drum" | "drum-steelpan" | "drumstick-bite" | "dumbbell" | "dumpster" | "dumpster-fire" | "dungeon" | "edit" | "egg" | "eject" | "ellipsis-h" | "ellipsis-v" | "envelope" | "envelope-o" | "envelope-open" | "envelope-open-text" | "envelope-square" | "equals" | "eraser" | "ethernet" | "euro-sign" | "exchange-alt" | "exclamation" | "exclamation-circle" | "exclamation-triangle" | "expand" | "expand-arrows-alt" | "external-link-alt" | "external-link-square-alt" | "eye" | "eye-dropper" | "eye-slash" | "fan" | "fast-backward" | "fast-forward" | "fax" | "feather" | "feather-alt" | "female" | "fighter-jet" | "file" | "file-alt" | "file-archive" | "file-audio" | "file-code" | "file-contract" | "file-csv" | "file-download" | "file-excel" | "file-excel-o" | "file-export" | "file-image" | "file-import" | "file-invoice" | "file-invoice-dollar" | "file-medical" | "file-medical-alt" | "file-pdf" | "file-pdf-o" | "file-powerpoint" | "file-prescription" | "file-signature" | "file-upload" | "file-text" | "file-text-o" | "file-video" | "file-word" | "fill" | "fill-drip" | "film" | "filter" | "fingerprint" | "fire" | "floppy-o" | "fire-alt" | "fire-extinguisher" | "first-aid" | "fish" | "fist-raised" | "flag" | "flag-checkered" | "flag-usa" | "flask" | "flushed" | "folder" | "folder-minus" | "folder-open" | "folder-open-o" | "folder-plus" | "font" | "football-ball" | "forward" | "frog" | "frown" | "frown-open" | "funnel-dollar" | "futbol" | "gamepad" | "gas-pump" | "gavel" | "gem" | "genderless" | "ghost" | "gift" | "gifts" | "glass-cheers" | "glass-martini" | "glass-martini-alt" | "glass-whiskey" | "glasses" | "globe" | "globe-africa" | "globe-americas" | "globe-asia" | "globe-europe" | "golf-ball" | "gopuram" | "graduation-cap" | "greater-than" | "greater-than-equal" | "grimace" | "grin" | "grin-alt" | "grin-beam" | "grin-beam-sweat" | "grin-hearts" | "grin-squint" | "grin-squint-tears" | "grin-stars" | "grin-tears" | "grin-tongue" | "grin-tongue-squint" | "grin-tongue-wink" | "grin-wink" | "grip-horizontal" | "grip-lines" | "grip-lines-vertical" | "grip-vertical" | "guitar" | "h-square" | "hamburger" | "hammer" | "hamsa" | "hand-holding" | "hand-holding-heart" | "hand-holding-usd" | "hand-lizard" | "hand-middle-finger" | "hand-paper" | "hand-peace" | "hand-point-down" | "hand-point-left" | "hand-point-right" | "hand-point-up" | "hand-pointer" | "hand-rock" | "hand-scissors" | "hand-spock" | "hands" | "hands-helping" | "handshake" | "hanukiah" | "hard-hat" | "hashtag" | "hat-cowboy" | "hat-cowboy-side" | "hat-wizard" | "haykal" | "hdd" | "heading" | "headphones" | "headphones-alt" | "headset" | "heart" | "heart-broken" | "heartbeat" | "helicopter" | "highlighter" | "hiking" | "hippo" | "history" | "hockey-puck" | "holly-berry" | "home" | "horse" | "horse-head" | "hospital" | "hospital-alt" | "hospital-symbol" | "hot-tub" | "hotdog" | "hotel" | "hourglass" | "hourglass-end" | "hourglass-half" | "hourglass-start" | "house-damage" | "hryvnia" | "i-cursor" | "ice-cream" | "icicles" | "icons" | "id-badge" | "id-card" | "id-card-alt" | "igloo" | "image" | "images" | "inbox" | "indent" | "industry" | "infinity" | "info" | "info-circle" | "italic" | "jedi" | "joint" | "journal-whills" | "kaaba" | "key" | "keyboard" | "khanda" | "kiss" | "kiss-beam" | "kiss-wink-heart" | "kiwi-bird" | "landmark" | "language" | "laptop" | "laptop-code" | "laptop-medical" | "laugh" | "laugh-beam" | "laugh-squint" | "laugh-wink" | "layer-group" | "leaf" | "lemon" | "less-than" | "less-than-equal" | "level-down-alt" | "level-up-alt" | "life-ring" | "lightbulb" | "link" | "lira-sign" | "list" | "list-alt" | "list-ol" | "list-ul" | "location-arrow" | "lock" | "lock-open" | "long-arrow-alt-down" | "long-arrow-alt-left" | "long-arrow-alt-right" | "long-arrow-alt-up" | "low-vision" | "luggage-cart" | "magic" | "magnet" | "mail-bulk" | "mail-forward" | "mail-reply" | "male" | "map" | "map-marked" | "map-marked-alt" | "map-marker" | "map-marker-alt" | "map-pin" | "map-signs" | "marker" | "mars" | "mars-double" | "mars-stroke" | "mars-stroke-h" | "mars-stroke-v" | "mask" | "medal" | "medkit" | "meh" | "meh-blank" | "meh-rolling-eyes" | "memory" | "menorah" | "mercury" | "meteor" | "microchip" | "microphone" | "microphone-alt" | "microphone-alt-slash" | "microphone-slash" | "microscope" | "minus" | "minus-circle" | "minus-square" | "mitten" | "mobile" | "mobile-alt" | "money-bill" | "money-bill-alt" | "money-bill-wave" | "money-bill-wave-alt" | "money-check" | "money-check-alt" | "monument" | "moon" | "mortar-pestle" | "mosque" | "motorcycle" | "mountain" | "mouse" | "mouse-pointer" | "mug-hot" | "music" | "network-wired" | "neuter" | "newspaper" | "not-equal" | "notes-medical" | "object-group" | "object-ungroup" | "oil-can" | "om" | "otter" | "outdent" | "pager" | "paint-brush" | "paint-roller" | "palette" | "pallet" | "paper-plane" | "paperclip" | "parachute-box" | "paragraph" | "parking" | "passport" | "pastafarianism" | "paste" | "pause" | "pause-circle" | "paw" | "peace" | "pen" | "pen-alt" | "pen-fancy" | "pen-nib" | "pen-square" | "pencil-alt" | "pencil-ruler" | "pencil-square-o" | "people-carry" | "pepper-hot" | "percent" | "percentage" | "person-booth" | "phone" | "phone-alt" | "phone-slash" | "phone-square" | "phone-square-alt" | "phone-volume" | "photo-video" | "piggy-bank" | "pills" | "pizza-slice" | "place-of-worship" | "plane" | "plane-arrival" | "plane-departure" | "play" | "play-circle" | "plug" | "plus" | "plus-circle" | "plus-square" | "podcast" | "poll" | "poll-h" | "poo" | "poo-storm" | "poop" | "portrait" | "pound-sign" | "power-off" | "pray" | "praying-hands" | "prescription" | "prescription-bottle" | "prescription-bottle-alt" | "print" | "procedures" | "project-diagram" | "puzzle-piece" | "qrcode" | "question" | "question-circle" | "quidditch" | "quote-left" | "quote-right" | "quran" | "radiation" | "radiation-alt" | "rainbow" | "random" | "receipt" | "record-vinyl" | "recycle" | "redo" | "refresh" | "redo-alt" | "registered" | "remove-format" | "reply" | "reply-all" | "republican" | "restroom" | "retweet" | "ribbon" | "ring" | "road" | "robot" | "rocket" | "route" | "rss" | "rss-square" | "ruble-sign" | "ruler" | "ruler-combined" | "ruler-horizontal" | "ruler-vertical" | "running" | "rupee-sign" | "sad-cry" | "sad-tear" | "satellite" | "satellite-dish" | "save" | "school" | "screwdriver" | "scroll" | "sd-card" | "search" | "search-dollar" | "search-location" | "search-minus" | "search-plus" | "seedling" | "server" | "shapes" | "share" | "share-alt" | "share-alt-square" | "share-square" | "shekel-sign" | "shield-alt" | "ship" | "shipping-fast" | "shoe-prints" | "shopping-bag" | "shopping-basket" | "shopping-cart" | "shower" | "shuttle-van" | "sign" | "sign-in-alt" | "sign-language" | "sign-out" | "sign-out-alt" | "signal" | "signature" | "sim-card" | "sitemap" | "skating" | "skiing" | "skiing-nordic" | "skull" | "skull-crossbones" | "slash" | "sleigh" | "sliders-h" | "smile" | "smile-beam" | "smile-wink" | "smog" | "smoking" | "smoking-ban" | "sms" | "snowboarding" | "snowflake" | "snowman" | "snowplow" | "socks" | "solar-panel" | "sort" | "sort-alpha-down" | "sort-alpha-down-alt" | "sort-alpha-up" | "sort-alpha-up-alt" | "sort-amount-down" | "sort-amount-down-alt" | "sort-amount-up" | "sort-amount-up-alt" | "sort-down" | "sort-numeric-down" | "sort-numeric-down-alt" | "sort-numeric-up" | "sort-numeric-up-alt" | "sort-up" | "spa" | "space-shuttle" | "spell-check" | "spider" | "spinner" | "splotch" | "spray-can" | "square" | "square-full" | "square-root-alt" | "stamp" | "star" | "star-and-crescent" | "star-half" | "star-half-alt" | "star-o" | "star-of-david" | "star-of-life" | "step-backward" | "step-forward" | "stethoscope" | "sticky-note" | "stop" | "stop-circle" | "stopwatch" | "store" | "store-alt" | "stream" | "street-view" | "strikethrough" | "stroopwafel" | "subscript" | "subway" | "suitcase" | "suitcase-rolling" | "sun" | "superscript" | "surprise" | "swatchbook" | "swimmer" | "swimming-pool" | "synagogue" | "sync" | "sync-alt" | "syringe" | "table" | "table-tennis" | "tablet" | "tablet-alt" | "tablets" | "tachometer-alt" | "tag" | "tags" | "tape" | "tasks" | "taxi" | "teeth" | "teeth-open" | "temperature-high" | "temperature-low" | "tenge" | "terminal" | "text-height" | "text-width" | "th" | "th-large" | "th-list" | "theater-masks" | "thermometer" | "thermometer-empty" | "thermometer-full" | "thermometer-half" | "thermometer-quarter" | "thermometer-three-quarters" | "thumbs-down" | "thumbs-up" | "thumbtack" | "ticket-alt" | "times" | "times-circle" | "tint" | "tint-slash" | "tired" | "toggle-off" | "toggle-on" | "toilet" | "toilet-paper" | "toolbox" | "tools" | "tooth" | "torah" | "torii-gate" | "tractor" | "trademark" | "traffic-light" | "train" | "tram" | "transgender" | "transgender-alt" | "trash" | "trash-alt" | "trash-o" | "trash-restore" | "trash-restore-alt" | "tree" | "trophy" | "truck" | "truck-loading" | "truck-monster" | "truck-moving" | "truck-pickup" | "tshirt" | "tty" | "tv" | "umbrella" | "umbrella-beach" | "underline" | "undo" | "undo-alt" | "universal-access" | "university" | "unlink" | "unlock" | "unlock-alt" | "upload" | "user" | "user-alt" | "user-alt-slash" | "user-astronaut" | "user-check" | "user-circle" | "user-clock" | "user-cog" | "user-edit" | "user-friends" | "user-graduate" | "user-injured" | "user-lock" | "user-md" | "user-minus" | "user-ninja" | "user-nurse" | "user-plus" | "user-secret" | "user-shield" | "user-slash" | "user-tag" | "user-tie" | "user-times" | "users" | "users-cog" | "utensil-spoon" | "utensils" | "vector-square" | "venus" | "venus-double" | "venus-mars" | "vial" | "vials" | "video" | "video-slash" | "vihara" | "voicemail" | "volleyball-ball" | "volume-down" | "volume-mute" | "volume-off" | "volume-up" | "vote-yea" | "vr-cardboard" | "walking" | "wallet" | "warehouse" | "water" | "wave-square" | "weight" | "weight-hanging" | "wheelchair" | "wifi" | "wind" | "window-close" | "window-maximize" | "window-minimize" | "window-restore" | "wine-bottle" | "wine-glass" | "wine-glass-alt" | "won-sign" | "wrench" | "x-ray" | "yen-sign" | "yin-yang"
Defined in
fabIconKey
Ƭ fabIconKey: "500px" | "accessible-icon" | "accusoft" | "acquisitions-incorporated" | "adn" | "adobe" | "adversal" | "affiliatetheme" | "airbnb" | "algolia" | "alipay" | "amazon" | "amazon-pay" | "amilia" | "android" | "angellist" | "angrycreative" | "angular" | "app-store" | "app-store-ios" | "apper" | "apple" | "apple-pay" | "artstation" | "asymmetrik" | "atlassian" | "audible" | "autoprefixer" | "avianex" | "aviato" | "aws" | "bandcamp" | "battle-net" | "behance" | "behance-square" | "bimobject" | "bitbucket" | "bitcoin" | "bity" | "black-tie" | "blackberry" | "blogger" | "blogger-b" | "bluetooth" | "bluetooth-b" | "bootstrap" | "btc" | "buffer" | "buromobelexperte" | "buy-n-large" | "buysellads" | "canadian-maple-leaf" | "cc-amazon-pay" | "cc-amex" | "cc-apple-pay" | "cc-diners-club" | "cc-discover" | "cc-jcb" | "cc-mastercard" | "cc-paypal" | "cc-stripe" | "cc-visa" | "centercode" | "centos" | "chrome" | "chromecast" | "cloudscale" | "cloudsmith" | "cloudversify" | "codepen" | "codiepie" | "confluence" | "connectdevelop" | "contao" | "cotton-bureau" | "cpanel" | "creative-commons" | "creative-commons-by" | "creative-commons-nc" | "creative-commons-nc-eu" | "creative-commons-nc-jp" | "creative-commons-nd" | "creative-commons-pd" | "creative-commons-pd-alt" | "creative-commons-remix" | "creative-commons-sa" | "creative-commons-sampling" | "creative-commons-sampling-plus" | "creative-commons-share" | "creative-commons-zero" | "critical-role" | "css3" | "css3-alt" | "cuttlefish" | "d-and-d" | "d-and-d-beyond" | "dashcube" | "delicious" | "deploydog" | "deskpro" | "dev" | "deviantart" | "dhl" | "diaspora" | "digg" | "digital-ocean" | "discord" | "discourse" | "dochub" | "docker" | "draft2digital" | "dribbble" | "dribbble-square" | "dropbox" | "drupal" | "dyalog" | "earlybirds" | "ebay" | "edge" | "elementor" | "ello" | "ember" | "empire" | "envira" | "erlang" | "ethereum" | "etsy" | "evernote" | "expeditedssl" | "facebook" | "facebook-f" | "facebook-messenger" | "facebook-square" | "fantasy-flight-games" | "fedex" | "fedora" | "figma" | "firefox" | "first-order" | "first-order-alt" | "firstdraft" | "flickr" | "flipboard" | "fly" | "font-awesome" | "font-awesome-alt" | "font-awesome-flag" | "fonticons" | "fonticons-fi" | "fort-awesome" | "fort-awesome-alt" | "forumbee" | "foursquare" | "free-code-camp" | "freebsd" | "fulcrum" | "galactic-republic" | "galactic-senate" | "get-pocket" | "gg" | "gg-circle" | "git" | "git-alt" | "git-square" | "github" | "github-alt" | "github-square" | "gitkraken" | "gitlab" | "gitter" | "glide" | "glide-g" | "gofore" | "goodreads" | "goodreads-g" | "google" | "google-drive" | "google-play" | "google-plus" | "google-plus-g" | "google-plus-square" | "google-wallet" | "gratipay" | "grav" | "gripfire" | "grunt" | "gulp" | "hacker-news" | "hacker-news-square" | "hackerrank" | "hips" | "hire-a-helper" | "hooli" | "hornbill" | "hotjar" | "houzz" | "html5" | "hubspot" | "imdb" | "instagram" | "intercom" | "internet-explorer" | "invision" | "ioxhost" | "itch-io" | "itunes" | "itunes-note" | "java" | "jedi-order" | "jenkins" | "jira" | "joget" | "joomla" | "js" | "js-square" | "jsfiddle" | "kaggle" | "keybase" | "keycdn" | "kickstarter" | "kickstarter-k" | "korvue" | "laravel" | "lastfm" | "lastfm-square" | "leanpub" | "less" | "line" | "linkedin" | "linkedin-in" | "linode" | "linux" | "lyft" | "magento" | "mailchimp" | "mandalorian" | "markdown" | "mastodon" | "maxcdn" | "mdb" | "medapps" | "medium" | "medium-m" | "medrt" | "meetup" | "megaport" | "mendeley" | "microsoft" | "mix" | "mixcloud" | "mizuni" | "modx" | "monero" | "napster" | "neos" | "nimblr" | "node" | "node-js" | "npm" | "ns8" | "nutritionix" | "odnoklassniki" | "odnoklassniki-square" | "old-republic" | "opencart" | "openid" | "opera" | "optin-monster" | "orcid" | "osi" | "page4" | "pagelines" | "palfed" | "patreon" | "paypal" | "penny-arcade" | "periscope" | "phabricator" | "phoenix-framework" | "phoenix-squadron" | "php" | "pied-piper" | "pied-piper-alt" | "pied-piper-hat" | "pied-piper-pp" | "pinterest" | "pinterest-p" | "pinterest-square" | "playstation" | "product-hunt" | "pushed" | "python" | "qq" | "quinscape" | "quora" | "r-project" | "raspberry-pi" | "ravelry" | "react" | "reacteurope" | "readme" | "rebel" | "red-river" | "reddit" | "reddit-alien" | "reddit-square" | "redhat" | "renren" | "replyd" | "researchgate" | "resolving" | "rev" | "rocketchat" | "rockrms" | "safari" | "salesforce" | "sass" | "schlix" | "scribd" | "searchengin" | "sellcast" | "sellsy" | "servicestack" | "shirtsinbulk" | "shopware" | "simplybuilt" | "sistrix" | "sith" | "sketch" | "skyatlas" | "skype" | "slack" | "slack-hash" | "slideshare" | "snapchat" | "snapchat-ghost" | "snapchat-square" | "soundcloud" | "sourcetree" | "speakap" | "speaker-deck" | "spotify" | "squarespace" | "stack-exchange" | "stack-overflow" | "stackpath" | "staylinked" | "steam" | "steam-square" | "steam-symbol" | "sticker-mule" | "strava" | "stripe" | "stripe-s" | "studiovinari" | "stumbleupon" | "stumbleupon-circle" | "superpowers" | "supple" | "suse" | "swift" | "symfony" | "teamspeak" | "telegram" | "telegram-plane" | "tencent-weibo" | "the-red-yeti" | "themeco" | "themeisle" | "think-peaks" | "trade-federation" | "trello" | "tripadvisor" | "tumblr" | "tumblr-square" | "twitch" | "twitter" | "twitter-square" | "typo3" | "uber" | "ubuntu" | "uikit" | "umbraco" | "uniregistry" | "untappd" | "ups" | "usb" | "usps" | "ussunnah" | "vaadin" | "viacoin" | "viadeo" | "viadeo-square" | "viber" | "vimeo" | "vimeo-square" | "vimeo-v" | "vine" | "vk" | "vnv" | "vuejs" | "waze" | "weebly" | "weibo" | "weixin" | "whatsapp" | "whatsapp-square" | "whmcs" | "wikipedia-w" | "windows" | "wix" | "wizards-of-the-coast" | "wolf-pack-battalion" | "wordpress" | "wordpress-simple" | "wpbeginner" | "wpexplorer" | "wpforms" | "wpressr" | "xbox" | "xing" | "xing-square" | "y-combinator" | "yahoo" | "yammer" | "yandex" | "yandex-international" | "yarn" | "yelp" | "yoast" | "youtube" | "youtube-square" | "zhihu"
Defined in
Variables
Config
• Config: Object
Type declaration
| Name | Type | Description |
|---|---|---|
applicationPath |
string |
This is the root path of your application. If your application resides under http://localhost/mysite/, your root path is "/mysite/". This variable is automatically initialized by reading from a element with ID "ApplicationPath" from current page, which is usually located in your _LayoutHead.cshtml file |
emailAllowOnlyAscii |
boolean |
Email validation by default only allows ASCII characters. Set this to true if you want to allow unicode. |
notLoggedInHandler |
Function |
This is an optional method for handling when user is not logged in. If a users session is expired and when a NotAuthorized response is received from a service call, Serenity will call this handler, so you may intercept it and notify user about this situation and ask if she wants to login again... |
rootNamespaces |
string[] |
This is the list of root namespaces that may be searched for types. For example, if you specify an editor type of "MyEditor", first a class with name "MyEditor" will be searched, if not found, search will be followed by "Serenity.MyEditor" and "MyApp.MyEditor" if you added "MyApp" to the list of root namespaces. You should usually add your application root namespace to this list in ScriptInit(ialization).ts file. |
Defined in
Culture
• Culture: Locale
Current culture, e.g. CultureInfo.CurrentCulture. This is overridden by
settings passed from a <script> element in the page with id ScriptCulture
containing a JSON object if available. This element is generally created in
the _LayoutHead.cshtml file for Serenity applications, so that the culture
settings determined server, can be passed to the client.
Defined in
Invariant
• Invariant: Locale
Invariant locale (e.g. CultureInfo.InvariantCulture)
Defined in
defaultNotifyOptions
• defaultNotifyOptions: ToastrOptions
Defined in
typeInfoProperty
• Const typeInfoProperty: "typeInfo"
Defined in
Functions
Criteria
▸ Criteria(field): CriteriaBuilder
Creates a new criteria builder containg the passed field name.
Parameters
| Name | Type | Description |
|---|---|---|
field |
string |
The field name. |
Returns
Defined in
Fluent
▸ Fluent<K>(tag): Fluent<HTMLElementTagNameMap[K]>
Type parameters
| Name | Type |
|---|---|
K |
extends keyof HTMLElementTagNameMap |
Parameters
| Name | Type |
|---|---|
tag |
K |
Returns
Fluent<HTMLElementTagNameMap[K]>
Defined in
▸ Fluent<TElement>(element): Fluent<TElement>
Type parameters
| Name | Type |
|---|---|
TElement |
extends HTMLElement |
Parameters
| Name | Type |
|---|---|
element |
TElement |
Returns
Fluent<TElement>
Defined in
▸ Fluent(element): Fluent<HTMLElement>
Parameters
| Name | Type |
|---|---|
element |
EventTarget |
Returns
Fluent<HTMLElement>
Defined in
GridPageInit
▸ GridPageInit<TGrid, P>(«destructured»): HTMLElement
Type parameters
| Name | Type |
|---|---|
TGrid |
extends Widget<P> |
P |
P |
Parameters
| Name | Type |
|---|---|
«destructured» |
Object |
› props? |
WidgetProps<P> |
› type |
(options?: P) => TGrid |
› type.prototype |
TGrid |
Returns
HTMLElement
Defined in
PanelPageInit
▸ PanelPageInit<TPanel, P>(«destructured»): HTMLElement
Type parameters
| Name | Type |
|---|---|
TPanel |
extends Widget<P> |
P |
P |
Parameters
| Name | Type |
|---|---|
«destructured» |
Object |
› props? |
WidgetProps<P> |
› type |
(options?: P) => TPanel |
› type.prototype |
TPanel |
Returns
HTMLElement
Defined in
ToolbarButton
▸ ToolbarButton(tb): HTMLElement
Parameters
| Name | Type |
|---|---|
tb |
ToolButtonProps |
Returns
HTMLElement
Defined in
addClass
▸ addClass(el, cls): void
Parameters
| Name | Type |
|---|---|
el |
Element |
cls |
string |
Returns
void
Defined in
addCustomAttribute
▸ addCustomAttribute(type, attr): void
Parameters
| Name | Type |
|---|---|
type |
any |
attr |
any |
Returns
void
Defined in
addEmptyOption
▸ addEmptyOption(select): void
Adds an empty option to the select.
Parameters
| Name | Type | Description |
|---|---|---|
select |
HTMLSelectElement | ArrayLike<HTMLElement> |
the select element |
Returns
void
Defined in
addLocalText
▸ addLocalText(obj, pre?): void
Parameters
| Name | Type |
|---|---|
obj |
string | Record<string, string | Record<string, any>> |
pre? |
string |
Returns
void
Defined in
addOption
▸ addOption(select, key, text): void
Adds an option to the select.
Parameters
| Name | Type |
|---|---|
select |
HTMLSelectElement | ArrayLike<HTMLElement> |
key |
string |
text |
string |
Returns
void
Defined in
addTypeMember
▸ addTypeMember(type, member): TypeMember
Parameters
| Name | Type |
|---|---|
type |
any |
member |
TypeMember |
Returns
Defined in
addValidationRule
▸ addValidationRule(element, rule, uniqueName?): void
Parameters
| Name | Type |
|---|---|
element |
HTMLElement | ArrayLike<HTMLElement> |
rule |
(input: ValidatableElement) => string |
uniqueName? |
string |
Returns
void
Defined in
alert
▸ alert(message, options?): Partial<Dialog>
Parameters
| Name | Type |
|---|---|
message |
string |
options? |
MessageDialogOptions |
Returns
Partial<Dialog>
Deprecated
use alertDialog
Defined in
alertDialog
▸ alertDialog(message, options?): Partial<Dialog>
Displays an alert dialog
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
The message to display |
options? |
MessageDialogOptions |
Additional options. |
Returns
Partial<Dialog>
See
AlertOptions
Example
alertDialog("An error occured!"); }
Defined in
any
▸ any<TItem>(array, predicate): boolean
Tests if any of array elements matches given predicate. Prefer Array.some() over this function (e.g. [1, 2, 3].some(predicate)).
Type parameters
| Name |
|---|
TItem |
Parameters
| Name | Type | Description |
|---|---|---|
array |
TItem[] |
Array to test. |
predicate |
(x: TItem) => boolean |
Predicate to test elements. |
Returns
boolean
True if any element matches.
Defined in
appendChild
▸ appendChild(child, node): void
Appends child at first argument to given node at second argument. From https://github.com/alex-kinokon/jsx-dom.
Parameters
| Name | Type | Description |
|---|---|---|
child |
any |
Child element or elements |
node |
HTMLElement |
Target parent element |
Returns
void
Defined in
associateWidget
▸ associateWidget(widget): void
Parameters
| Name | Type |
|---|---|
widget |
Object |
widget.domNode |
HTMLElement |
Returns
void
Defined in
src/ui/widgets/widgetutils.ts:9
attrEncode
▸ attrEncode(s): string
Parameters
| Name | Type |
|---|---|
s |
any |
Returns
string
Deprecated
use htmlEncode as it also encodes quotes
Defined in
bgColor
▸ bgColor(color): string
Parameters
| Name | Type |
|---|---|
color |
UtilityColor |
Returns
string
Defined in
blockUI
▸ blockUI(options?): void
Tries to block the page
Parameters
| Name | Type |
|---|---|
options? |
Object |
options.useTimeout? |
boolean |
options.zIndex? |
number |
Returns
void
Defined in
blockUndo
▸ blockUndo(): void
Unblocks the page.
Returns
void
Defined in
canLoadScriptData
▸ canLoadScriptData(name): boolean
Check if a dynamic script with provided name is available in the cache or it is a registered script name
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
Dynamic script name |
Returns
boolean
True if already available or registered
Defined in
cancelDialogButton
▸ cancelDialogButton(opt?): DialogButton
Parameters
| Name | Type |
|---|---|
opt? |
DialogButton |
Returns
Defined in
cast
▸ cast(instance, type): any
Parameters
| Name | Type |
|---|---|
instance |
any |
type |
Type |
Returns
any
Defined in
centerDialog
▸ centerDialog(el): void
Parameters
| Name | Type |
|---|---|
el |
HTMLElement | ArrayLike<HTMLElement> |
Returns
void
Defined in
classTypeInfo
▸ classTypeInfo<T>(typeName, interfaces?): ClassTypeInfo<T>
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
typeName |
StringLiteral<T> |
interfaces? |
any[] |
Returns
Defined in
clearKeys
▸ clearKeys(d): void
Parameters
| Name | Type |
|---|---|
d |
any |
Returns
void
Defined in
clearOptions
▸ clearOptions(select): void
Clears the options in the select element
Parameters
| Name | Type |
|---|---|
select |
HTMLElement | ArrayLike<HTMLElement> |
Returns
void
Defined in
coalesce
▸ coalesce(a, b): any
Parameters
| Name | Type |
|---|---|
a |
any |
b |
any |
Returns
any
Deprecated
Use ?? operator
Defined in
compareStringFactory
▸ compareStringFactory(order): (a: string, b: string) => number
Factory for a function that compares two strings, based on a character order
passed in the order argument.
Parameters
| Name | Type |
|---|---|
order |
string |
Returns
fn
▸ (a, b): number
Parameters
| Name | Type |
|---|---|
a |
string |
b |
string |
Returns
number
Defined in
confirm
▸ confirm(message, onYes, options?): Partial<Dialog>
Parameters
| Name | Type |
|---|---|
message |
string |
onYes |
() => void |
options? |
ConfirmDialogOptions |
Returns
Partial<Dialog>
Deprecated
use confirmDialog
Defined in
confirmDialog
▸ confirmDialog(message, onYes, options?): Partial<Dialog>
Display a confirmation dialog
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
The message to display |
onYes |
() => void |
Callback for Yes button click |
options? |
ConfirmDialogOptions |
Additional options. |
Returns
Partial<Dialog>
See
ConfirmOptions
Example
confirmDialog("Are you sure you want to delete?", () => {
// do something when yes is clicked
}
Defined in
count
▸ count<TItem>(array, predicate): number
Counts number of array elements that matches a given predicate.
Type parameters
| Name |
|---|
TItem |
Parameters
| Name | Type | Description |
|---|---|---|
array |
TItem[] |
Array to test. |
predicate |
(x: TItem) => boolean |
Predicate to test elements. |
Returns
number
Defined in
dbText
▸ dbText(prefix): (key: string) => string
Parameters
| Name | Type |
|---|---|
prefix |
string |
Returns
fn
▸ (key): string
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
string
Defined in
dbTryText
▸ dbTryText(prefix): (key: string) => string
Parameters
| Name | Type |
|---|---|
prefix |
string |
Returns
fn
▸ (key): string
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
string
Defined in
deassociateWidget
▸ deassociateWidget(widget): void
Parameters
| Name | Type |
|---|---|
widget |
Object |
widget.domNode |
HTMLElement |
Returns
void
Defined in
src/ui/widgets/widgetutils.ts:28
debounce
▸ debounce<T>(func, wait?, immediate?): DebouncedFunction<T>
Returns a function, that, as long as it continues to be invoked, will not be triggered. The function also has a property 'clear' that can be used to clear the timer to prevent previously scheduled executions, and flush method to invoke scheduled executions now if any.
Type parameters
| Name | Type |
|---|---|
T |
extends (...args: any) => any |
Parameters
| Name | Type | Description |
|---|---|---|
func |
T |
- |
wait? |
number |
The function will be called after it stops being called for N milliseconds. |
immediate? |
boolean |
If passed, trigger the function on the leading edge, instead of the trailing. |
Returns
Source
underscore.js
Defined in
deepClone
▸ deepClone<T>(a, a2?, a3?): T
Type parameters
| Name | Type |
|---|---|
T |
any |
Parameters
| Name | Type |
|---|---|
a |
T |
a2? |
any |
a3? |
any |
Returns
T
Defined in
delegateCombine
▸ delegateCombine(delegate1, delegate2): any
Parameters
| Name | Type |
|---|---|
delegate1 |
any |
delegate2 |
any |
Returns
any
Defined in
src/ui/filtering/filterstore.ts:195
delegateContains
▸ delegateContains(targets, object, method): boolean
Parameters
| Name | Type |
|---|---|
targets |
any[] |
object |
any |
method |
any |
Returns
boolean
Defined in
src/ui/filtering/filterstore.ts:248
delegateRemove
▸ delegateRemove(delegate1, delegate2): any
Parameters
| Name | Type |
|---|---|
delegate1 |
any |
delegate2 |
any |
Returns
any
Defined in
src/ui/filtering/filterstore.ts:215
editorTypeInfo
▸ editorTypeInfo<T>(typeName, interfaces?): EditorTypeInfo<T>
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
typeName |
StringLiteral<T> |
interfaces? |
any[] |
Returns
Defined in
endsWith
▸ endsWith(s, suffix): boolean
Checks if the string ends with the specified substring.
Parameters
| Name | Type | Description |
|---|---|---|
s |
string |
String to check. |
suffix |
string |
Suffix to check. |
Returns
boolean
True if the string ends with the specified substring.
Deprecated
Use .endsWith method of String directly
Defined in
executeEverytimeWhenVisible
▸ executeEverytimeWhenVisible(el, callback, callNowIfVisible): void
Parameters
| Name | Type |
|---|---|
el |
HTMLElement | ArrayLike<HTMLElement> |
callback |
Function |
callNowIfVisible |
boolean |
Returns
void
Defined in
executeOnceWhenVisible
▸ executeOnceWhenVisible(el, callback): void
Parameters
| Name | Type |
|---|---|
el |
HTMLElement | ArrayLike<HTMLElement> |
callback |
Function |
Returns
void
Defined in
extend
▸ extend<T>(a, b): T
Type parameters
| Name | Type |
|---|---|
T |
any |
Parameters
| Name | Type |
|---|---|
a |
T |
b |
T |
Returns
T
Defined in
faIcon
▸ faIcon(key, color?): string
Parameters
| Name | Type |
|---|---|
key |
faIconKey |
color? |
TextColor |
Returns
string
Defined in
fabIcon
▸ fabIcon(key, color?): string
Parameters
| Name | Type |
|---|---|
key |
fabIconKey |
color? |
TextColor |
Returns
string
Defined in
fetchScriptData
▸ fetchScriptData<TData>(name): Promise<TData>
Fetches a script data with given name via ~/DynamicData endpoint
Type parameters
| Name |
|---|
TData |
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
Dynamic script name |
Returns
Promise<TData>
A promise that will return data if successfull
Defined in
fieldsProxy
▸ fieldsProxy<TRow>(): Readonly<Record<keyof TRow, string>>
Type parameters
| Name |
|---|
TRow |
Returns
Readonly<Record<keyof TRow, string>>
Defined in
findElementWithRelativeId
▸ findElementWithRelativeId(element, relativeId, context?): HTMLElement
Finds the first element with the given relative id to the source element. It can handle underscores in the source element id.
Parameters
| Name | Type | Description |
|---|---|---|
element |
HTMLElement | ArrayLike<HTMLElement> |
the source element |
relativeId |
string |
the relative id to the source element |
context? |
HTMLElement |
the context element (optional) |
Returns
HTMLElement
the element with the given relative id to the source element.
Defined in
first
▸ first<TItem>(array, predicate): TItem
Gets first element in an array that matches given predicate similar to LINQ's First. Throws an error if no match is found.
Type parameters
| Name |
|---|
TItem |
Parameters
| Name | Type | Description |
|---|---|---|
array |
TItem[] |
Array to test. |
predicate |
(x: TItem) => boolean |
Predicate to test elements. |
Returns
TItem
First element that matches.
Defined in
format
▸ format(format, ...prm): string
Parameters
| Name | Type |
|---|---|
format |
string |
...prm |
any[] |
Returns
string
Deprecated
Use stringFormat
Defined in
formatDate
▸ formatDate(d, format?, locale?): string
Formats a date using the specified format string and optional culture. Supports .NET style format strings including custom formats. See .NET documentation for supported formats.
Parameters
| Name | Type | Description |
|---|---|---|
d |
string | Date |
the date to format. If null, it returns empty string. |
format? |
string |
the format string to use. If null, it uses the current culture's default format. 'G' uses the culture's datetime format. 'g' uses the culture's datetime format with secs removed. 'd' uses the culture's date format. 't' uses the culture's time format. 'u' uses the sortable ISO format with UTC time. 'U' uses the culture's date format with UTC time. |
locale? |
Locale |
the locale to use |
Returns
string
the formatted date
Example
// returns "2019-01-01"
formatDate(new Date(2019, 0, 1), "yyyy-MM-dd");
Example
// returns "2019-01-01 12:00:00"
formatDate(new Date(2019, 0, 1, 12), "yyyy-MM-dd HH:mm:ss");
Example
// returns "2019-01-01 12:00:00.000"
formatDate(new Date(2019, 0, 1, 12), "yyyy-MM-dd HH:mm:ss.fff");
Example
// returns "2019-01-01 12:00:00.000 AM"
formatDate(new Date(2019, 0, 1, 12), "yyyy-MM-dd HH:mm:ss.fff tt");
Defined in
formatDayHourAndMin
▸ formatDayHourAndMin(n): string
Formats a number containing number of minutes into a string in the format "d.hh:mm".
Parameters
| Name | Type | Description |
|---|---|---|
n |
number |
The number of minutes. |
Returns
string
Defined in
formatISODateTimeUTC
▸ formatISODateTimeUTC(d): string
Formats a date as the ISO 8601 UTC date/time format.
Parameters
| Name | Type | Description |
|---|---|---|
d |
Date |
The date. |
Returns
string
Defined in
formatNumber
▸ formatNumber(num, format?, decOrLoc?, grp?): string
Formats a number using the current Culture locale (or the passed locale) settings.
It supports format specifiers similar to .NET numeric formatting strings.
Parameters
| Name | Type | Description |
|---|---|---|
num |
number |
the number to format |
format? |
string |
the format specifier. default is 'g'. See .NET numeric formatting strings documentation for more information. |
decOrLoc? |
string | NumberFormat |
- |
grp? |
string |
- |
Returns
string
Defined in
formatterTypeInfo
▸ formatterTypeInfo<T>(typeName, interfaces?): FormatterTypeInfo<T>
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
typeName |
StringLiteral<T> |
interfaces? |
any[] |
Returns
Defined in
getActiveRequests
▸ getActiveRequests(): number
Returns
number
Defined in
getBaseType
▸ getBaseType(type): any
Parameters
| Name | Type |
|---|---|
type |
any |
Returns
any
Defined in
getColumns
▸ getColumns(key): PropertyItem[]
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
Defined in
getColumnsAsync
▸ getColumnsAsync(key): Promise<PropertyItem[]>
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
Promise<PropertyItem[]>
Defined in
getColumnsData
▸ getColumnsData(key): PropertyItemsData
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
Defined in
src/q/scriptdata-compat.ts:102
getColumnsDataAsync
▸ getColumnsDataAsync(key): Promise<PropertyItemsData>
Gets or loads a [ColumnsScript] data
Parameters
| Name | Type | Description |
|---|---|---|
key |
string |
Form key |
Returns
Promise<PropertyItemsData>
A property items data object containing items and additionalItems properties
Defined in
src/q/scriptdata-compat.ts:106
getColumnsScript
▸ getColumnsScript(key): Promise<PropertyItemsData>
Gets or loads a [ColumnsScript] data
Parameters
| Name | Type | Description |
|---|---|---|
key |
string |
Form key |
Returns
Promise<PropertyItemsData>
A property items data object containing items and additionalItems properties
Defined in
getCookie
▸ getCookie(name): any
Parameters
| Name | Type |
|---|---|
name |
string |
Returns
any
Defined in
getCustomAttribute
▸ getCustomAttribute<TAttr>(type, attrType, inherit?): TAttr
Type parameters
| Name |
|---|
TAttr |
Parameters
| Name | Type | Default value |
|---|---|---|
type |
any |
undefined |
attrType |
(...args: any[]) => TAttr |
undefined |
inherit |
boolean |
true |
Returns
TAttr
Defined in
getCustomAttributes
▸ getCustomAttributes<TAttr>(type, attrType, inherit?): TAttr[]
Type parameters
| Name |
|---|
TAttr |
Parameters
| Name | Type | Default value |
|---|---|---|
type |
any |
undefined |
attrType |
(...args: any[]) => TAttr |
undefined |
inherit |
boolean |
true |
Returns
TAttr[]
Defined in
getForm
▸ getForm(key): PropertyItem[]
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
Defined in
src/q/scriptdata-compat.ts:108
getFormAsync
▸ getFormAsync(key): Promise<PropertyItem[]>
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
Promise<PropertyItem[]>
Defined in
src/q/scriptdata-compat.ts:112
getFormData
▸ getFormData(key): PropertyItemsData
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
Defined in
src/q/scriptdata-compat.ts:116
getFormDataAsync
▸ getFormDataAsync(key): Promise<PropertyItemsData>
Gets or loads a [FormScript] data
Parameters
| Name | Type | Description |
|---|---|---|
key |
string |
Form key |
Returns
Promise<PropertyItemsData>
A property items data object containing items and additionalItems properties
Defined in
src/q/scriptdata-compat.ts:120
getFormScript
▸ getFormScript(key): Promise<PropertyItemsData>
Gets or loads a [FormScript] data
Parameters
| Name | Type | Description |
|---|---|---|
key |
string |
Form key |
Returns
Promise<PropertyItemsData>
A property items data object containing items and additionalItems properties
Defined in
getGlobalObject
▸ getGlobalObject(): any
Returns
any
Defined in
getInstanceType
▸ getInstanceType(instance): any
Parameters
| Name | Type |
|---|---|
instance |
any |
Returns
any
Defined in
getLookup
▸ getLookup<TItem>(key): Lookup<TItem>
Type parameters
| Name |
|---|
TItem |
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
Lookup<TItem>
Defined in
getLookupAsync
▸ getLookupAsync<TItem>(key): Promise<Lookup<TItem>>
Gets or loads a Lookup
Type parameters
| Name |
|---|
TItem |
Parameters
| Name | Type | Description |
|---|---|---|
key |
string |
Lookup key |
Returns
Promise<Lookup<TItem>>
Defined in
getMembers
▸ getMembers(type, memberTypes): TypeMember[]
Parameters
| Name | Type |
|---|---|
type |
any |
memberTypes |
MemberType |
Returns
Defined in
getNested
▸ getNested(from, name): any
Parameters
| Name | Type |
|---|---|
from |
any |
name |
string |
Returns
any
Defined in
getRemoteData
▸ getRemoteData<TData>(key): TData
Type parameters
| Name | Type |
|---|---|
TData |
any |
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
TData
Defined in
getRemoteDataAsync
▸ getRemoteDataAsync<TData>(key): Promise<TData>
Gets or loads a [RemoteData]
Type parameters
| Name | Type |
|---|---|
TData |
any |
Parameters
| Name | Type | Description |
|---|---|---|
key |
string |
Remote data key |
Returns
Promise<TData>
Defined in
getScriptData
▸ getScriptData<TData>(name, reload?): Promise<TData>
Returns the script data from cache if available, or via a fetch request to ~/DynamicData endpoint
Type parameters
| Name | Type |
|---|---|
TData |
any |
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
|
reload? |
boolean |
Clear cache and force reload |
Returns
Promise<TData>
Defined in
getScriptDataHash
▸ getScriptDataHash(name, reload?): string
Gets the known hash value for a given dynamic script name. They are usually registered server-side via dynamic script manager and their latest known hashes are passed to the client-side via a script element named RegisteredScripts.
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
The dynamic script name |
reload? |
boolean |
True to force resetting the script hash client side, e.g. for loading lookups etc. |
Returns
string
The hash or null if no such known registration
Defined in
getTemplate
▸ getTemplate(key): string
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
string
Defined in
src/q/scriptdata-compat.ts:122
getType
▸ getType(name, target?): Type
Parameters
| Name | Type |
|---|---|
name |
string |
target? |
any |
Returns
Defined in
getTypeFullName
▸ getTypeFullName(type): string
Parameters
| Name | Type |
|---|---|
type |
Type |
Returns
string
Defined in
getTypeNameProp
▸ getTypeNameProp(type): string
Parameters
| Name | Type |
|---|---|
type |
any |
Returns
string
Defined in
src/base/system-internal.ts:122
getTypeRegistry
▸ getTypeRegistry(): any
Returns
any
Defined in
src/base/system-internal.ts:34
getTypeShortName
▸ getTypeShortName(type): string
Parameters
| Name | Type |
|---|---|
type |
Type |
Returns
string
Defined in
getTypes
▸ getTypes(from?): any[]
Parameters
| Name | Type |
|---|---|
from? |
any |
Returns
any[]
Defined in
getWidgetFrom
▸ getWidgetFrom<TWidget>(element, type?): TWidget
Type parameters
| Name |
|---|
TWidget |
Parameters
| Name | Type |
|---|---|
element |
string | Element | ArrayLike<HTMLElement> |
type? |
(...args: any[]) => TWidget |
Returns
TWidget
Defined in
src/ui/widgets/widgetutils.ts:77
getWidgetName
▸ getWidgetName(type): string
Parameters
| Name | Type |
|---|---|
type |
Function |
Returns
string
Defined in
src/ui/widgets/widgetutils.ts:5
getjQuery
▸ getjQuery(): any
Returns
any
Defined in
gridPageInit
▸ gridPageInit<TGrid, P>(grid): TGrid
Type parameters
| Name | Type |
|---|---|
TGrid |
extends Widget<P> |
P |
P |
Parameters
| Name | Type |
|---|---|
grid |
TGrid & { domNode: HTMLElement } |
Returns
TGrid
Defined in
▸ gridPageInit<TGrid, P>(type, props?): TGrid
Type parameters
| Name | Type |
|---|---|
TGrid |
extends Widget<P> |
P |
P |
Parameters
| Name | Type |
|---|---|
type |
(options?: P) => TGrid |
type.prototype |
TGrid |
props? |
WidgetProps<P> |
Returns
TGrid
Defined in
groupBy
▸ groupBy<TItem>(items, getKey): GroupByResult<TItem>
Groups an array with keys determined by specified getKey() callback. Resulting object contains group objects in order and a dictionary to access by key. This is similar to LINQ's ToLookup function with some additional details like start index.
Type parameters
| Name |
|---|
TItem |
Parameters
| Name | Type | Description |
|---|---|---|
items |
TItem[] |
Array to group. |
getKey |
(x: TItem) => any |
Function that returns key for each item. |
Returns
GroupByResult<TItem>
GroupByResult object.
Defined in
handleScriptDataError
▸ handleScriptDataError(name, status?, statusText?, shouldThrow?): string
Shows a suitable error message for errors occured during loading of a dynamic script data.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
name |
string |
undefined |
Name of the dynamic script |
status? |
number |
undefined |
HTTP status returned if available |
statusText? |
string |
undefined |
HTTP status text returned if available |
shouldThrow |
boolean |
true |
- |
Returns
string
Defined in
hasBSModal
▸ hasBSModal(): boolean
Returns
boolean
Defined in
hasCustomAttribute
▸ hasCustomAttribute<TAttr>(type, attrType, inherit?): boolean
Type parameters
| Name |
|---|
TAttr |
Parameters
| Name | Type | Default value |
|---|---|---|
type |
any |
undefined |
attrType |
(...args: any[]) => TAttr |
undefined |
inherit |
boolean |
true |
Returns
boolean
Defined in
hasUIDialog
▸ hasUIDialog(): boolean
Returns
boolean
Defined in
htmlEncode
▸ htmlEncode(s): string
Html encodes a string (encodes single and double quotes, & (ampersand), > and < characters)
Parameters
| Name | Type | Description |
|---|---|---|
s |
any |
String (or number etc.) to be HTML encoded |
Returns
string
Defined in
iconClassName
▸ iconClassName(icon): string
Parameters
| Name | Type |
|---|---|
icon |
IconClassName |
Returns
string
Defined in
iframeDialog
▸ iframeDialog(options): Partial<Dialog>
Display a dialog that shows an HTML block in an IFRAME, which is usually returned from server callbacks
Parameters
| Name | Type | Description |
|---|---|---|
options |
IFrameDialogOptions |
The options |
Returns
Partial<Dialog>
Defined in
indexOf
▸ indexOf<TItem>(array, predicate): number
Gets index of first element in an array that matches given predicate.
Type parameters
| Name |
|---|
TItem |
Parameters
| Name | Type | Description |
|---|---|---|
array |
TItem[] |
Array to test. |
predicate |
(x: TItem) => boolean |
Predicate to test elements. |
Returns
number
Defined in
information
▸ information(message, onOk?, options?): Partial<Dialog>
Parameters
| Name | Type |
|---|---|
message |
string |
onOk? |
() => void |
options? |
MessageDialogOptions |
Returns
Partial<Dialog>
Deprecated
use informationDialog
Defined in
informationDialog
▸ informationDialog(message, onOk?, options?): Partial<Dialog>
Display an information dialog
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
The message to display |
onOk? |
() => void |
Callback for OK button click |
options? |
MessageDialogOptions |
Additional options. |
Returns
Partial<Dialog>
See
ConfirmOptions
Example
informationDialog("Operation complete", () => {
// do something when OK is clicked
}
Defined in
initFormType
▸ initFormType(typ, nameWidgetPairs): void
Parameters
| Name | Type |
|---|---|
typ |
Function |
nameWidgetPairs |
any[] |
Returns
void
Defined in
initFullHeightGridPage
▸ initFullHeightGridPage(gridDiv, opt?): void
Parameters
| Name | Type |
|---|---|
gridDiv |
HTMLElement | ArrayLike<HTMLElement> | { domNode: HTMLElement } |
opt? |
Object |
opt.noRoute? |
boolean |
opt.setHeight? |
boolean |
Returns
void
Defined in
initializeTypes
▸ initializeTypes(root, pre, limit): void
Parameters
| Name | Type |
|---|---|
root |
any |
pre |
string |
limit |
number |
Returns
void
Defined in
insert
▸ insert(obj, index, item): void
Inserts an item to the array at specified index. Prefer Array.splice unless you need to support IE.
Parameters
| Name | Type | Description |
|---|---|---|
obj |
any |
Array or array like object to insert to. |
index |
number |
Index to insert at. |
item |
any |
Item to insert. |
Returns
void
Throws
Error if object does not support insert.
Example
insert([1, 2, 3], 1, 4); // [1, 4, 2, 3]
insert({ insert: (index, item) => { this.splice(index, 0, item); } }
Defined in
interfaceTypeInfo
▸ interfaceTypeInfo<T>(typeName, interfaces?): InterfaceTypeInfo<T>
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
typeName |
StringLiteral<T> |
interfaces? |
any[] |
Returns
Defined in
isArray
▸ isArray(arg): arg is any[]
Determines if the object is an array. Prefer Array.isArray over this function (e.g. Array.isArray(obj)).
Parameters
| Name | Type |
|---|---|
arg |
any |
Returns
arg is any[]
True if the object is an array.
Example
isArray([1, 2, 3]); // true
isArray({}); // false
Defined in
isArrayLike
▸ isArrayLike(obj): obj is ArrayLike<any>
Parameters
| Name | Type |
|---|---|
obj |
any |
Returns
obj is ArrayLike<any>
Defined in
isAssignableFrom
▸ isAssignableFrom(target, type): any
Parameters
| Name | Type |
|---|---|
target |
any |
type |
Type |
Returns
any
Defined in
isBS3
▸ isBS3(): boolean
Returns true if Bootstrap 3 is loaded
Returns
boolean
Defined in
isBS5Plus
▸ isBS5Plus(): boolean
Returns true if Bootstrap 5+ is loaded
Returns
boolean
Defined in
isEmptyOrNull
▸ isEmptyOrNull(s): boolean
Checks if the string is empty or null. Prefer (!s) instead.
Parameters
| Name | Type | Description |
|---|---|---|
s |
string |
String to check. |
Returns
boolean
True if the string is empty or null.
Defined in
isEnum
▸ isEnum(type): boolean
Parameters
| Name | Type |
|---|---|
type |
any |
Returns
boolean
Defined in
isInstanceOfType
▸ isInstanceOfType(instance, type): any
Parameters
| Name | Type |
|---|---|
instance |
any |
type |
Type |
Returns
any
Defined in
isMobileView
▸ isMobileView(): boolean
Returns
boolean
Defined in
isPromiseLike
▸ isPromiseLike(obj): obj is PromiseLike<any>
Parameters
| Name | Type |
|---|---|
obj |
any |
Returns
obj is PromiseLike<any>
Defined in
isSameOrigin
▸ isSameOrigin(url): boolean
Parameters
| Name | Type |
|---|---|
url |
string |
Returns
boolean
Defined in
isTrimmedEmpty
▸ isTrimmedEmpty(s): boolean
Checks if the string is empty or null or whitespace. Prefer !s?.Trim() instead.
Parameters
| Name | Type | Description |
|---|---|---|
s |
string |
String to check. |
Returns
boolean
True if the string is empty or null or whitespace.
Defined in
isValue
▸ isValue(a): boolean
Parameters
| Name | Type |
|---|---|
a |
any |
Returns
boolean
Deprecated
Use a != null
Defined in
keyOf
▸ keyOf<T>(prop): keyof T
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
prop |
keyof T |
Returns
keyof T
Defined in
layoutFillHeight
▸ layoutFillHeight(element): void
Parameters
| Name | Type |
|---|---|
element |
HTMLElement | ArrayLike<HTMLElement> |
Returns
void
Defined in
layoutFillHeightValue
▸ layoutFillHeightValue(element): number
Parameters
| Name | Type |
|---|---|
element |
HTMLElement | ArrayLike<HTMLElement> |
Returns
number
Defined in
localText
▸ localText(key, defaultText?): string
Parameters
| Name | Type |
|---|---|
key |
string |
defaultText? |
string |
Returns
string
Defined in
localeFormat
▸ localeFormat(l, format, ...prm): string
Parameters
| Name | Type |
|---|---|
l |
Locale |
format |
string |
...prm |
any[] |
Returns
string
Deprecated
Use stringFormatLocale
Defined in
newBodyDiv
▸ newBodyDiv(): HTMLDivElement
Creates a new DIV and appends it to the body.
Returns
HTMLDivElement
the new DIV element.
Defined in
noDialogButton
▸ noDialogButton(opt?): DialogButton
Parameters
| Name | Type |
|---|---|
opt? |
DialogButton |
Returns
Defined in
notifyError
▸ notifyError(message, title?, options?): void
Parameters
| Name | Type |
|---|---|
message |
string |
title? |
string |
options? |
ToastrOptions |
Returns
void
Defined in
notifyInfo
▸ notifyInfo(message, title?, options?): void
Parameters
| Name | Type |
|---|---|
message |
string |
title? |
string |
options? |
ToastrOptions |
Returns
void
Defined in
notifySuccess
▸ notifySuccess(message, title?, options?): void
Parameters
| Name | Type |
|---|---|
message |
string |
title? |
string |
options? |
ToastrOptions |
Returns
void
Defined in
notifyWarning
▸ notifyWarning(message, title?, options?): void
Parameters
| Name | Type |
|---|---|
message |
string |
title? |
string |
options? |
ToastrOptions |
Returns
void
Defined in
okDialogButton
▸ okDialogButton(opt?): DialogButton
Parameters
| Name | Type |
|---|---|
opt? |
DialogButton |
Returns
Defined in
omitUndefined
▸ omitUndefined(x): any
Parameters
| Name | Type |
|---|---|
x |
Object |
Returns
any
Defined in
outerHtml
▸ outerHtml(element): string
Returns the outer HTML of the element.
Parameters
| Name | Type |
|---|---|
element |
Element | ArrayLike<HTMLElement> |
Returns
string
Defined in
padLeft
▸ padLeft(s, len, ch?): any
Pads the string to the left with the specified character.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
s |
string | number |
undefined |
String to pad. |
len |
number |
undefined |
Target length of the string. |
ch |
string |
' ' |
Character to pad with. |
Returns
any
Padded string.
Defined in
panelPageInit
▸ panelPageInit<TGrid, P>(panel): TGrid
Type parameters
| Name | Type |
|---|---|
TGrid |
extends Widget<P> |
P |
P |
Parameters
| Name | Type |
|---|---|
panel |
TGrid & { domNode: HTMLElement } |
Returns
TGrid
Defined in
▸ panelPageInit<TGrid, P>(type, props?): TGrid
Type parameters
| Name | Type |
|---|---|
TGrid |
extends Widget<P> |
P |
P |
Parameters
| Name | Type |
|---|---|
type |
(options?: P) => TGrid |
type.prototype |
TGrid |
props? |
WidgetProps<P> |
Returns
TGrid
Defined in
parseCriteria
▸ parseCriteria(expression, params?): any[]
Parses a criteria expression to Serenity Criteria array format.
The string may optionally contain parameters like A >= @p1 and B < @p2.
Parameters
| Name | Type | Description |
|---|---|---|
expression |
string |
The criteria expression. |
params? |
any |
The dictionary containing parameter values like { p1: 10, p2: 20 }. |
Returns
any[]
Example
parseCriteria('A >=
P1
and B < @p2', { p1: 5, p2: 4 }) // [[[a], '>=' 5], 'and', [[b], '<', 4]]
Defined in
▸ parseCriteria(strings, ...values): any[]
Parses a criteria expression to Serenity Criteria array format.
The expression may contain parameter placeholders like A >= ${p1}
where p1 is a variable in the scope.
Parameters
| Name | Type | Description |
|---|---|---|
strings |
TemplateStringsArray |
The string fragments. |
...values |
any[] |
The tagged template arguments. |
Returns
any[]
Example
var a = 5, b = 4;
parseCriteria`A >= ${a} and B < ${b}` // [[[a], '>=' 5], 'and', [[b], '<', 4]]
Defined in
parseDate
▸ parseDate(s, dateOrder?): Date
Parses a string to a date. If the string is empty or whitespace, returns null. Returns a NaN Date if the string is not a valid date.
Parameters
| Name | Type | Description |
|---|---|---|
s |
string |
The string to parse. |
dateOrder? |
string |
The order of the date parts in the string. Defaults to culture's default date order. |
Returns
Date
Defined in
parseDayHourAndMin
▸ parseDayHourAndMin(s): number
Parses a string in the format "d.hh:mm" into a number containing number of minutes. Returns NaN if the hours not in range 0-23 or minutes not in range 0-59. Returns NULL if the string is empty or whitespace.
Parameters
| Name | Type |
|---|---|
s |
string |
Returns
number
Defined in
parseDecimal
▸ parseDecimal(s): number
Converts a string to a decimal. The difference between parseFloat and parseDecimal is that parseDecimal will return null if the string is empty or null, whereas parseFloat will return NaN and parseDecimal will use the current culture's group and decimal separators.
Parameters
| Name | Type | Description |
|---|---|---|
s |
string |
the string to parse |
Returns
number
Defined in
parseHourAndMin
▸ parseHourAndMin(value): number
Parses a time string in the format "hh:mm" into a number containing number of minutes. Returns NaN if the hours not in range 0-23 or minutes not in range 0-59.
Parameters
| Name | Type | Description |
|---|---|---|
value |
string |
The string to parse. |
Returns
number
Defined in
parseISODateTime
▸ parseISODateTime(s): Date
Parses a string in the ISO 8601 UTC date/time format.
Parameters
| Name | Type | Description |
|---|---|---|
s |
string |
The string to parse. |
Returns
Date
Defined in
parseInteger
▸ parseInteger(s): number
Converts a string to an integer. The difference between parseInt and parseInteger is that parseInteger will return null if the string is empty or null, whereas parseInt will return NaN and parseInteger will use the current culture's group and decimal separators.
Parameters
| Name | Type | Description |
|---|---|---|
s |
string |
the string to parse |
Returns
number
Defined in
parseQueryString
▸ parseQueryString(s?): Object
Parameters
| Name | Type |
|---|---|
s? |
string |
Returns
Object
Defined in
peekScriptData
▸ peekScriptData(name): any
Parameters
| Name | Type |
|---|---|
name |
string |
Returns
any
Defined in
positionToastContainer
▸ positionToastContainer(options?, create?): void
Parameters
| Name | Type | Default value |
|---|---|---|
options? |
ToastrOptions |
undefined |
create |
boolean |
true |
Returns
void
Defined in
postToService
▸ postToService(options): void
Parameters
| Name | Type |
|---|---|
options |
PostToServiceOptions |
Returns
void
Defined in
postToUrl
▸ postToUrl(options): void
Parameters
| Name | Type |
|---|---|
options |
PostToUrlOptions |
Returns
void
Defined in
prefixedText
▸ prefixedText(prefix): (text: string, key: string | (p?: string) => string) => string
Parameters
| Name | Type |
|---|---|
prefix |
string |
Returns
fn
▸ (text, key): string
Parameters
| Name | Type |
|---|---|
text |
string |
key |
string | (p?: string) => string |
Returns
string
Defined in
proxyTexts
▸ proxyTexts(o, p, t): Object
Parameters
| Name | Type |
|---|---|
o |
Record<string, any> |
p |
string |
t |
Record<string, any> |
Returns
Object
Defined in
registerClass
▸ registerClass(type, name, intf?): void
Parameters
| Name | Type |
|---|---|
type |
any |
name |
string |
intf? |
any[] |
Returns
void
Defined in
registerEditor
▸ registerEditor(type, name, intf?): void
Parameters
| Name | Type |
|---|---|
type |
any |
name |
string |
intf? |
any[] |
Returns
void
Defined in
registerEnum
▸ registerEnum(type, name, enumKey?): void
Parameters
| Name | Type |
|---|---|
type |
any |
name |
string |
enumKey? |
string |
Returns
void
Defined in
registerFormatter
▸ registerFormatter(type, name, intf?): void
Parameters
| Name | Type |
|---|---|
type |
any |
name |
string |
intf? |
any[] |
Returns
void
Defined in
registerInterface
▸ registerInterface(type, name, intf?): void
Parameters
| Name | Type |
|---|---|
type |
any |
name |
string |
intf? |
any[] |
Returns
void
Defined in
registerType
▸ registerType(type): void
Parameters
| Name | Type |
|---|---|
type |
Object |
type.name |
string |
type.typeInfo |
TypeInfo<any> |
Returns
void
Defined in
reloadLookup
▸ reloadLookup<TItem>(key): Lookup<TItem>
Type parameters
| Name | Type |
|---|---|
TItem |
any |
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
Lookup<TItem>
Defined in
reloadLookupAsync
▸ reloadLookupAsync<TItem>(key): Promise<Lookup<TItem>>
Forces reload of a lookup from the server. Note that only the client side cache is cleared. This does not force reloading in the server-side.
Type parameters
| Name | Type |
|---|---|
TItem |
any |
Parameters
| Name | Type | Description |
|---|---|---|
key |
string |
Lookup key |
Returns
Promise<Lookup<TItem>>
Lookup
Defined in
removeClass
▸ removeClass(el, cls): void
Parameters
| Name | Type |
|---|---|
el |
Element |
cls |
string |
Returns
void
Defined in
removeValidationRule
▸ removeValidationRule(element, uniqueName): void
Parameters
| Name | Type |
|---|---|
element |
HTMLElement | ArrayLike<HTMLElement> |
uniqueName |
string |
Returns
void
Defined in
replaceAll
▸ replaceAll(str, find, replace): string
Replaces all occurrences of the search string with the replacement string.
Parameters
| Name | Type | Description |
|---|---|---|
str |
string |
String to replace. |
find |
string |
String to find. |
replace |
string |
String to replace with. |
Returns
string
Replaced string.
Defined in
requestFinished
▸ requestFinished(): void
Returns
void
Defined in
requestStarting
▸ requestStarting(): void
Returns
void
Defined in
resolveServiceUrl
▸ resolveServiceUrl(url): string
Parameters
| Name | Type |
|---|---|
url |
string |
Returns
string
Defined in
resolveUrl
▸ resolveUrl(url): string
Parameters
| Name | Type |
|---|---|
url |
string |
Returns
string
Defined in
round
▸ round(n, d?, rounding?): number
Rounds a number to specified digits or an integer number if digits are not specified.
Parameters
| Name | Type | Description |
|---|---|---|
n |
number |
the number to round |
d? |
number |
the number of digits to round to. default is zero. |
rounding? |
boolean |
whether to use banker's rounding |
Returns
number
the rounded number
Defined in
safeCast
▸ safeCast(instance, type): any
Parameters
| Name | Type |
|---|---|
instance |
any |
type |
Type |
Returns
any
Defined in
serviceCall
▸ serviceCall<TResponse>(options): PromiseLike<TResponse>
Type parameters
| Name | Type |
|---|---|
TResponse |
extends ServiceResponse |
Parameters
| Name | Type |
|---|---|
options |
ServiceOptions<TResponse> |
Returns
PromiseLike<TResponse>
Defined in
serviceRequest
▸ serviceRequest<TResponse>(service, request?, onSuccess?, options?): PromiseLike<TResponse>
Type parameters
| Name | Type |
|---|---|
TResponse |
extends ServiceResponse |
Parameters
| Name | Type |
|---|---|
service |
string |
request? |
any |
onSuccess? |
(response: TResponse) => void |
options? |
ServiceOptions<TResponse> |
Returns
PromiseLike<TResponse>
Defined in
setEquality
▸ setEquality(request, field, value): void
Parameters
| Name | Type |
|---|---|
request |
ListRequest |
field |
string |
value |
any |
Returns
void
Defined in
setRegisteredScripts
▸ setRegisteredScripts(scripts): void
Parameters
| Name | Type |
|---|---|
scripts |
any[] |
Returns
void
Defined in
setScriptData
▸ setScriptData(name, value): void
Parameters
| Name | Type |
|---|---|
name |
string |
value |
any |
Returns
void
Defined in
setTypeNameProp
▸ setTypeNameProp(type, value): void
Parameters
| Name | Type |
|---|---|
type |
any |
value |
string |
Returns
void
Defined in
src/base/system-internal.ts:126
single
▸ single<TItem>(array, predicate): TItem
Gets first element in an array that matches given predicate. Throws an error if no matches is found, or there are multiple matches.
Type parameters
| Name |
|---|
TItem |
Parameters
| Name | Type | Description |
|---|---|---|
array |
TItem[] |
Array to test. |
predicate |
(x: TItem) => boolean |
Predicate to test elements. |
Returns
TItem
First element that matches.
Example
first([1, 2, 3], x => x == 2); // 2
first([1, 2, 3], x => x == 4); // throws error.
Defined in
splitDateString
▸ splitDateString(s): string[]
Splits a date string into an array of strings, each containing a single date part. It can handle separators "/", ".", "-" and "".
Parameters
| Name | Type | Description |
|---|---|---|
s |
string |
The string to split. |
Returns
string[]
Defined in
startsWith
▸ startsWith(s, prefix): boolean
Checks if the string starts with the prefix
Parameters
| Name | Type | Description |
|---|---|---|
s |
string |
String to check. |
prefix |
string |
Prefix to check. |
Returns
boolean
True if the string starts with the prefix.
Deprecated
Use .startsWith method of String directly
Defined in
stringFormat
▸ stringFormat(format, ...prm): string
Formats a string with parameters similar to .NET's String.Format function
using current Culture locale settings.
Parameters
| Name | Type |
|---|---|
format |
string |
...prm |
any[] |
Returns
string
Defined in
stringFormatLocale
▸ stringFormatLocale(l, format, ...prm): string
Formats a string with parameters similar to .NET's String.Format function using the locale passed as the first argument.
Parameters
| Name | Type |
|---|---|
l |
Locale |
format |
string |
...prm |
any[] |
Returns
string
Defined in
stripDiacritics
▸ stripDiacritics(str): string
Parameters
| Name | Type |
|---|---|
str |
string |
Returns
string
Defined in
src/ui/editors/combobox.ts:393
success
▸ success(message, onOk?, options?): Partial<Dialog>
Parameters
| Name | Type |
|---|---|
message |
string |
onOk? |
() => void |
options? |
MessageDialogOptions |
Returns
Partial<Dialog>
Deprecated
use successDialog
Defined in
successDialog
▸ successDialog(message, onOk?, options?): Partial<Dialog>
Display a success dialog
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
The message to display |
onOk? |
() => void |
Callback for OK button click |
options? |
MessageDialogOptions |
Additional options. |
Returns
Partial<Dialog>
See
MessageDialogOptions
Example
successDialog("Operation complete", () => {
// do something when OK is clicked
}
Defined in
text
▸ text(key, defaultText?): string
Parameters
| Name | Type |
|---|---|
key |
string |
defaultText? |
string |
Returns
string
Deprecated
prefer localText for better discoverability
Defined in
textColor
▸ textColor(color): string
Parameters
| Name | Type |
|---|---|
color |
TextColor |
Returns
string
Defined in
toGrouping
▸ toGrouping<TItem>(items, getKey): Grouping<TItem>
Maps an array into a dictionary with keys determined by specified getKey() callback, and values that are arrays containing elements for a particular key.
Type parameters
| Name |
|---|
TItem |
Parameters
| Name | Type | Description |
|---|---|---|
items |
TItem[] |
Array to map. |
getKey |
(x: TItem) => any |
Function that returns key for each item. |
Returns
Grouping<TItem>
Grouping object.
Example
toGrouping([1, 2, 3], x => x % 2 == 0 ? "even" : "odd"); // { odd: [1, 3], even: [2] }
Defined in
toId
▸ toId(id): any
Converts a string to an ID. If the string is a number, it is returned as-is. If the string is empty, null or whitespace, null is returned. Otherwise, it is converted to a number if possible. If the string is not a valid number or longer than 14 digits, the trimmed string is returned as-is.
Parameters
| Name | Type | Description |
|---|---|---|
id |
any |
the string to convert to an ID |
Returns
any
Defined in
toSingleLine
▸ toSingleLine(str): string
Converts the string to single line by removing line end characters
Parameters
| Name | Type | Description |
|---|---|---|
str |
string |
String to convert. |
Returns
string
Defined in
today
▸ today(): Date
Returns
Date
Defined in
toggleClass
▸ toggleClass(el, cls, add?): void
Toggles the class on the element handling spaces like addClass does.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Element |
the element |
cls |
string |
the class to toggle |
add? |
boolean |
if true, the class will be added, if false the class will be removed, otherwise it will be toggled. |
Returns
void
Defined in
triggerLayoutOnShow
▸ triggerLayoutOnShow(element): void
Parameters
| Name | Type |
|---|---|
element |
HTMLElement | ArrayLike<HTMLElement> |
Returns
void
Defined in
trim
▸ trim(s): string
Trims the whitespace characters from the start and end of the string This returns empty string even when the string is null or undefined.
Parameters
| Name | Type |
|---|---|
s |
string |
Returns
string
Defined in
trimEnd
▸ trimEnd(s): any
Trims the whitespace characters from the end of the string
Parameters
| Name | Type |
|---|---|
s |
string |
Returns
any
Defined in
trimStart
▸ trimStart(s): any
Trims the whitespace characters from the start of the string
Parameters
| Name | Type |
|---|---|
s |
string |
Returns
any
Defined in
trimToEmpty
▸ trimToEmpty(s): string
Trims the whitespace characters from the start and end of the string Returns empty string if the string is null or undefined.
Parameters
| Name | Type |
|---|---|
s |
string |
Returns
string
Defined in
trimToNull
▸ trimToNull(s): string
Trims the whitespace characters from the start and end of the string Returns null if the string is null, undefined or whitespace.
Parameters
| Name | Type |
|---|---|
s |
string |
Returns
string
Defined in
trunc
▸ trunc(n): number
Truncates a number to an integer number.
Parameters
| Name | Type |
|---|---|
n |
number |
Returns
number
Defined in
tryFirst
▸ tryFirst<TItem>(array, predicate): TItem
Gets first element in an array that matches given predicate (similar to LINQ's FirstOrDefault). Returns null if no match is found.
Type parameters
| Name |
|---|
TItem |
Parameters
| Name | Type | Description |
|---|---|---|
array |
TItem[] |
Array to test. |
predicate |
(x: TItem) => boolean |
Predicate to test elements. |
Returns
TItem
First element that matches.
Example
tryFirst([1, 2, 3], x => x == 2); // 2
tryFirst([1, 2, 3], x => x == 4); // null
Defined in
tryGetText
▸ tryGetText(key): string
Parameters
| Name | Type |
|---|---|
key |
string |
Returns
string
Defined in
tryGetWidget
▸ tryGetWidget<TWidget>(element, type?): TWidget
Type parameters
| Name |
|---|
TWidget |
Parameters
| Name | Type |
|---|---|
element |
string | Element | ArrayLike<HTMLElement> |
type? |
(...args: any[]) => TWidget |
Returns
TWidget
Defined in
src/ui/widgets/widgetutils.ts:41
turkishLocaleCompare
▸ turkishLocaleCompare(a, b): number
This is an alias for Culture.stringCompare, left in for compatibility reasons.
Parameters
| Name | Type |
|---|---|
a |
string |
b |
string |
Returns
number
Defined in
turkishLocaleToLower
▸ turkishLocaleToLower(a): string
A string to lowercase function that handles special Turkish characters like 'ı'. Left in for compatibility reasons.
Parameters
| Name | Type |
|---|---|
a |
string |
Returns
string
Defined in
turkishLocaleToUpper
▸ turkishLocaleToUpper(a): string
A string to uppercase function that handles special Turkish characters like 'ı'. Left in for compatibility reasons.
Parameters
| Name | Type |
|---|---|
a |
string |
Returns
string
Defined in
uiAndBSButtonNoConflict
▸ uiAndBSButtonNoConflict(): void
Returns
void
Defined in
useIdPrefix
▸ useIdPrefix(prefix): IdPrefixType
Parameters
| Name | Type |
|---|---|
prefix |
string |
Returns
Defined in
src/ui/widgets/widgetutils.ts:110
validateOptions
▸ validateOptions(options?): ValidatorOptions
Parameters
| Name | Type |
|---|---|
options? |
ValidatorOptions |
Returns
Defined in
validatorAbortHandler
▸ validatorAbortHandler(validator): void
Parameters
| Name | Type |
|---|---|
validator |
Validator |
Returns
void
Defined in
warning
▸ warning(message, options?): Partial<Dialog>
Parameters
| Name | Type |
|---|---|
message |
string |
options? |
MessageDialogOptions |
Returns
Partial<Dialog>
Deprecated
use warningDialog
Defined in
warningDialog
▸ warningDialog(message, options?): Partial<Dialog>
Display a warning dialog
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
The message to display |
options? |
MessageDialogOptions |
Additional options. |
Returns
Partial<Dialog>
See
MessageDialogOptions
Example
warningDialog("Something is odd!");
Defined in
yesDialogButton
▸ yesDialogButton(opt?): DialogButton
Parameters
| Name | Type |
|---|---|
opt? |
DialogButton |
Returns
Defined in
zeroPad
▸ zeroPad(n, len): string
Pads the start of string to make it the specified length.
Parameters
| Name | Type | Description |
|---|---|---|
n |
number |
The number to pad. |
len |
number |
Target length of the string. |
Returns
string