UNPKG

igniteui-webcomponents

Version:

Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.

1,898 lines 2.12 MB
{ "schemaVersion": "1.0.0", "readme": "", "modules": [ { "kind": "javascript-module", "path": "src/theming/types.ts", "declarations": [], "exports": [] }, { "kind": "javascript-module", "path": "src/theming/theming-event.ts", "declarations": [ { "kind": "variable", "name": "CHANGE_THEME_EVENT", "type": { "text": "string" }, "default": "'igc-change-theme'" }, { "kind": "variable", "name": "CHANGED_THEME_EVENT", "type": { "text": "string" }, "default": "'igc-changed-theme'" }, { "kind": "variable", "name": "_themeChangedEmitter", "default": "new ThemeChangedEmitter()" } ], "exports": [ { "kind": "js", "name": "CHANGE_THEME_EVENT", "declaration": { "name": "CHANGE_THEME_EVENT", "module": "src/theming/theming-event.ts" } }, { "kind": "js", "name": "CHANGED_THEME_EVENT", "declaration": { "name": "CHANGED_THEME_EVENT", "module": "src/theming/theming-event.ts" } }, { "kind": "js", "name": "_themeChangedEmitter", "declaration": { "name": "_themeChangedEmitter", "module": "src/theming/theming-event.ts" } } ] }, { "kind": "javascript-module", "path": "src/theming/utils.ts", "declarations": [ { "kind": "function", "name": "getAllCssVariables", "return": { "type": { "text": "Record<string, string>" } } } ], "exports": [ { "kind": "js", "name": "getAllCssVariables", "declaration": { "name": "getAllCssVariables", "module": "src/theming/utils.ts" } } ] }, { "kind": "javascript-module", "path": "src/theming/config.ts", "declarations": [ { "kind": "function", "name": "getTheme" }, { "kind": "function", "name": "setTheme", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "value", "type": { "text": "Theme" } }, { "name": "variant", "type": { "text": "ThemeVariant" } } ] }, { "kind": "function", "name": "configureTheme", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "t", "type": { "text": "Theme" } }, { "name": "v", "default": "'light'", "type": { "text": "ThemeVariant" } } ], "description": "Allows the global configuration of the active theme.\n\nUsage:\n ```ts\n import { configureTheme } from 'igniteui-webcomponents';\n\n configureTheme('material', 'light');\n ```" } ], "exports": [ { "kind": "js", "name": "getTheme", "declaration": { "name": "getTheme", "module": "src/theming/config.ts" } }, { "kind": "js", "name": "setTheme", "declaration": { "name": "setTheme", "module": "src/theming/config.ts" } }, { "kind": "js", "name": "configureTheme", "declaration": { "name": "configureTheme", "module": "src/theming/config.ts" } } ] }, { "kind": "javascript-module", "path": "src/theming/theming-controller.ts", "declarations": [ { "kind": "class", "description": "", "name": "ThemingController", "members": [ { "kind": "field", "name": "_host", "type": { "text": "ReactiveControllerHost & ReactiveElement" }, "privacy": "private", "readonly": true, "default": "host" }, { "kind": "field", "name": "_themes", "type": { "text": "Themes" }, "privacy": "private", "readonly": true, "default": "themes" }, { "kind": "field", "name": "_options", "type": { "text": "ThemingControllerConfig | undefined" }, "privacy": "private", "readonly": true, "default": "config" }, { "kind": "field", "name": "_theme", "type": { "text": "Theme" }, "privacy": "private", "default": "'bootstrap'", "expandedType": { "text": "'material' | 'bootstrap' | 'indigo' | 'fluent'" } }, { "kind": "field", "name": "_variant", "type": { "text": "ThemeVariant" }, "privacy": "private", "default": "'light'", "expandedType": { "text": "'light' | 'dark'" } }, { "kind": "field", "name": "theme", "type": { "text": "Theme" }, "privacy": "public", "readonly": true, "expandedType": { "text": "'material' | 'bootstrap' | 'indigo' | 'fluent'" } }, { "kind": "method", "name": "_getStyles", "privacy": "private" }, { "kind": "method", "name": "_adoptStyles", "privacy": "protected", "return": { "type": { "text": "void" } } }, { "kind": "method", "name": "_handleThemeChanged", "privacy": "private", "return": { "type": { "text": "void" } } } ] }, { "kind": "function", "name": "addThemingController", "return": { "type": { "text": "ThemingController" } }, "parameters": [ { "name": "host", "type": { "text": "ReactiveControllerHost & ReactiveElement" } }, { "name": "themes", "type": { "text": "Themes" } }, { "name": "config", "optional": true, "type": { "text": "ThemingControllerConfig" } } ] } ], "exports": [ { "kind": "js", "name": "addThemingController", "declaration": { "name": "addThemingController", "module": "src/theming/theming-controller.ts" } }, { "kind": "js", "name": "ThemingController", "declaration": { "name": "ThemingController", "module": "src/theming/theming-controller.ts" } } ] }, { "kind": "javascript-module", "path": "src/components/calendar/model.ts", "declarations": [ { "kind": "variable", "name": "daysInWeek", "type": { "text": "number" }, "default": "7" }, { "kind": "function", "name": "toCalendarDay", "parameters": [ { "name": "date", "type": { "text": "DayParameter" } } ] }, { "kind": "class", "description": "", "name": "CalendarDay", "members": [ { "kind": "field", "name": "_date", "type": { "text": "Date" }, "privacy": "private", "readonly": true, "default": "new Date(args.year, args.month, args.date ?? 1)" }, { "kind": "field", "name": "today", "privacy": "public", "static": true, "description": "Constructs and returns the current day.", "readonly": true }, { "kind": "method", "name": "from", "privacy": "public", "static": true, "parameters": [ { "name": "date", "type": { "text": "Date" } } ], "description": "Constructs a new CalendarDay instance from a Date object." }, { "kind": "method", "name": "compare", "privacy": "public", "static": true, "parameters": [ { "name": "first", "type": { "text": "DayParameter" } }, { "name": "second", "type": { "text": "DayParameter" } } ], "description": "Compares the date portion of two date objects.", "return": { "type": { "text": "" } } }, { "kind": "method", "name": "clone", "privacy": "public", "description": "Returns a copy of this instance." }, { "kind": "method", "name": "set", "privacy": "public", "parameters": [ { "name": "args", "type": { "text": "Partial<CalendarDayParams>" } } ], "description": "Returns a new instance with values replaced." }, { "kind": "method", "name": "add", "privacy": "public", "parameters": [ { "name": "unit", "type": { "text": "DayInterval" } }, { "name": "value", "type": { "text": "number" } } ] }, { "kind": "field", "name": "day", "privacy": "public", "description": "Returns the day of the week (Sunday = 0).", "readonly": true }, { "kind": "field", "name": "year", "privacy": "public", "description": "Returns the full year.", "readonly": true }, { "kind": "field", "name": "month", "privacy": "public", "description": "Returns the month.", "readonly": true }, { "kind": "field", "name": "date", "privacy": "public", "description": "Returns the date", "readonly": true }, { "kind": "field", "name": "timestamp", "privacy": "public", "description": "Returns the timestamp since epoch in milliseconds.", "readonly": true }, { "kind": "field", "name": "week", "privacy": "public", "description": "Returns the current week number.", "readonly": true }, { "kind": "field", "name": "native", "privacy": "public", "description": "Returns the underlying native date instance.", "readonly": true }, { "kind": "field", "name": "weekend", "privacy": "public", "description": "Whether the current date is a weekend day.", "readonly": true }, { "kind": "method", "name": "equalTo", "privacy": "public", "parameters": [ { "name": "value", "type": { "text": "DayParameter" } } ] }, { "kind": "method", "name": "greaterThan", "privacy": "public", "parameters": [ { "name": "value", "type": { "text": "DayParameter" } } ] }, { "kind": "method", "name": "greaterThanOrEqual", "privacy": "public", "parameters": [ { "name": "value", "type": { "text": "DayParameter" } } ] }, { "kind": "method", "name": "lessThan", "privacy": "public", "parameters": [ { "name": "value", "type": { "text": "DayParameter" } } ] }, { "kind": "method", "name": "lessThanOrEqual", "privacy": "public", "parameters": [ { "name": "value", "type": { "text": "DayParameter" } } ] }, { "kind": "method", "name": "toString", "privacy": "public" } ] } ], "exports": [ { "kind": "js", "name": "daysInWeek", "declaration": { "name": "daysInWeek", "module": "src/components/calendar/model.ts" } }, { "kind": "js", "name": "toCalendarDay", "declaration": { "name": "toCalendarDay", "module": "src/components/calendar/model.ts" } }, { "kind": "js", "name": "CalendarDay", "declaration": { "name": "CalendarDay", "module": "src/components/calendar/model.ts" } } ] }, { "kind": "javascript-module", "path": "src/components/common/localization/validation-en.ts", "declarations": [], "exports": [ { "kind": "js", "name": "default", "declaration": { "module": "src/components/common/localization/validation-en.ts" } } ] }, { "kind": "javascript-module", "path": "src/components/common/util.ts", "declarations": [ { "kind": "function", "name": "asPercent", "parameters": [ { "name": "part", "type": { "text": "number" } }, { "name": "whole", "type": { "text": "number" } } ] }, { "kind": "function", "name": "clamp", "parameters": [ { "name": "number", "type": { "text": "number" } }, { "name": "min", "type": { "text": "number" } }, { "name": "max", "type": { "text": "number" } } ] }, { "kind": "function", "name": "numberOfDecimals", "return": { "type": { "text": "number" } }, "parameters": [ { "name": "number", "type": { "text": "number" } } ] }, { "kind": "function", "name": "roundPrecise", "return": { "type": { "text": "number" } }, "parameters": [ { "name": "number", "type": { "text": "number" } }, { "name": "magnitude", "default": "1" } ] }, { "kind": "function", "name": "numberInRangeInclusive", "parameters": [ { "name": "value", "type": { "text": "number" } }, { "name": "min", "type": { "text": "number" } }, { "name": "max", "type": { "text": "number" } } ] }, { "kind": "function", "name": "createCounter" }, { "kind": "function", "name": "isLTR", "parameters": [ { "name": "element", "type": { "text": "HTMLElement" } } ], "description": "Returns whether an element has a Left-to-Right directionality." }, { "kind": "function", "name": "formatString", "return": { "type": { "text": "string" } }, "parameters": [ { "name": "template", "type": { "text": "string" } }, { "name": "params", "type": { "text": "unknown[]" } } ], "description": "Builds a string from format specifiers and replacement parameters.\nWill coerce non-string parameters to their string representations." }, { "kind": "function", "name": "asNumber", "parameters": [ { "name": "value", "type": { "text": "unknown" } }, { "name": "fallback", "default": "0" } ], "description": "Parse the passed `value` as a number or return the `fallback` if it can't be done." }, { "kind": "function", "name": "wrap", "parameters": [ { "name": "min", "type": { "text": "number" } }, { "name": "max", "type": { "text": "number" } }, { "name": "value", "type": { "text": "number" } } ], "description": "Returns the value wrapped between the min and max bounds.\n\nIf the value is greater than max, returns the min and vice-versa.\nIf the value is between the bounds, it is returned unchanged." }, { "kind": "function", "name": "isDefined", "parameters": [ { "name": "value", "type": { "text": "T" } } ] }, { "kind": "function", "name": "iterNodes", "return": { "type": { "text": "Generator<T>" } }, "parameters": [ { "name": "root", "type": { "text": "Node" } }, { "name": "options", "optional": true, "type": { "text": "IterNodesOptions<T>" } } ] }, { "kind": "function", "name": "getRoot", "return": { "type": { "text": "Document | ShadowRoot" } }, "parameters": [ { "name": "element", "type": { "text": "Element" } }, { "name": "options", "optional": true, "type": { "text": "GetRootNodeOptions" } } ] }, { "kind": "function", "name": "getElementByIdFromRoot", "parameters": [ { "name": "root", "type": { "text": "HTMLElement" } }, { "name": "id", "type": { "text": "string" } } ] }, { "kind": "function", "name": "isElement", "return": { "type": { "text": "node is Element" } }, "parameters": [ { "name": "node", "type": { "text": "unknown" } } ] }, { "kind": "function", "name": "getElementsFromEventPath", "parameters": [ { "name": "event", "type": { "text": "Event" } } ] }, { "kind": "function", "name": "findElementFromEventPath", "parameters": [ { "name": "predicate", "type": { "text": "string | ((element: Element) => boolean)" } }, { "name": "event", "type": { "text": "Event" } } ] }, { "kind": "function", "name": "groupBy", "parameters": [ { "name": "array", "type": { "text": "T[]" } }, { "name": "key", "type": { "text": "keyof T | ((item: T) => any)" } } ] }, { "kind": "function", "name": "first", "parameters": [ { "name": "arr", "type": { "text": "T[]" } } ] }, { "kind": "function", "name": "last", "parameters": [ { "name": "arr", "type": { "text": "T[]" } } ] }, { "kind": "function", "name": "modulo", "parameters": [ { "name": "n", "type": { "text": "number" } }, { "name": "d", "type": { "text": "number" } } ] }, { "kind": "function", "name": "take", "parameters": [ { "name": "iterable", "type": { "text": "IterableIterator<T>" } }, { "name": "n", "type": { "text": "number" } } ], "description": "Creates an array of `n` elements from a given iterator." }, { "kind": "function", "name": "chunk", "parameters": [ { "name": "arr", "type": { "text": "T[]" } }, { "name": "size", "type": { "text": "number" } } ], "description": "Splits an array into chunks of length `size` and returns a generator\nyielding each chunk.\nThe last chunk may contain less than `size` elements." }, { "kind": "function", "name": "splitToWords", "parameters": [ { "name": "text", "type": { "text": "string" } } ] }, { "kind": "function", "name": "toKebabCase", "return": { "type": { "text": "string" } }, "parameters": [ { "name": "text", "type": { "text": "string" } } ] }, { "kind": "function", "name": "isFunction", "return": { "type": { "text": "value is CallableFunction" } }, "parameters": [ { "name": "value", "type": { "text": "unknown" } } ] }, { "kind": "function", "name": "isString", "return": { "type": { "text": "value is string" } }, "parameters": [ { "name": "value", "type": { "text": "unknown" } } ] }, { "kind": "function", "name": "isObject", "return": { "type": { "text": "value is object" } }, "parameters": [ { "name": "value", "type": { "text": "unknown" } } ] }, { "kind": "function", "name": "isEventListenerObject", "return": { "type": { "text": "x is EventListenerObject" } }, "parameters": [ { "name": "x", "type": { "text": "unknown" } } ] }, { "kind": "function", "name": "addWeakEventListener", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "element", "type": { "text": "Element" } }, { "name": "event", "type": { "text": "string" } }, { "name": "listener", "type": { "text": "EventListenerOrEventListenerObject" } }, { "name": "options", "optional": true, "type": { "text": "AddEventListenerOptions | boolean" } } ] }, { "kind": "function", "name": "addSafeEventListener", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "target", "type": { "text": "HTMLElement" } }, { "name": "eventName", "type": { "text": "E" } }, { "name": "handler", "type": { "text": "(event: EventTypeOf<E>) => unknown" } }, { "name": "options", "optional": true, "type": { "text": "boolean | AddEventListenerOptions" } } ], "description": "Safely adds an event listener to an HTMLElement, automatically handling\nserver-side rendering environments by doing nothing if `isServer` is true.\nThis function also correctly binds the `handler`'s `this` context to the `target` element\nand ensures proper event type inference." }, { "kind": "function", "name": "isEmpty", "return": { "type": { "text": "boolean" } }, "parameters": [ { "name": "x", "type": { "text": "ArrayLike<T> | Set<T> | Map<U, T>" } } ], "description": "Returns whether a given collection is empty." }, { "kind": "function", "name": "asArray", "return": { "type": { "text": "T[]" } }, "parameters": [ { "name": "value", "optional": true, "type": { "text": "T | T[]" } } ] }, { "kind": "function", "name": "partition", "return": { "type": { "text": "[truthy: T[], falsy: T[]]" } }, "parameters": [ { "name": "array", "type": { "text": "T[]" } }, { "name": "isTruthy", "type": { "text": "(value: T) => boolean" } } ] }, { "kind": "function", "name": "getCenterPoint", "parameters": [ { "name": "element", "type": { "text": "Element" } } ], "description": "Returns the center x/y coordinate of a given element." }, { "kind": "function", "name": "roundByDPR", "return": { "type": { "text": "number" } }, "parameters": [ { "name": "value", "type": { "text": "number" } } ] }, { "kind": "function", "name": "scrollIntoView", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "element", "optional": true, "type": { "text": "HTMLElement" } }, { "name": "config", "optional": true, "type": { "text": "ScrollIntoViewOptions" } } ] }, { "kind": "function", "name": "isRegExp", "return": { "type": { "text": "value is RegExp" } }, "parameters": [ { "name": "value", "type": { "text": "unknown" } } ] }, { "kind": "function", "name": "equal", "return": { "type": { "text": "boolean" } }, "parameters": [ { "name": "a", "type": { "text": "unknown" } }, { "name": "b", "type": { "text": "T" } }, { "name": "visited", "default": "new WeakSet()" } ] }, { "kind": "function", "name": "setStyles", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "element", "type": { "text": "HTMLElement" } }, { "name": "styles", "type": { "text": "Partial<CSSStyleDeclaration>" } } ] } ], "exports": [ { "kind": "js", "name": "asPercent", "declaration": { "name": "asPercent", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "clamp", "declaration": { "name": "clamp", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "numberOfDecimals", "declaration": { "name": "numberOfDecimals", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "roundPrecise", "declaration": { "name": "roundPrecise", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "numberInRangeInclusive", "declaration": { "name": "numberInRangeInclusive", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "createCounter", "declaration": { "name": "createCounter", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "isLTR", "declaration": { "name": "isLTR", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "formatString", "declaration": { "name": "formatString", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "asNumber", "declaration": { "name": "asNumber", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "wrap", "declaration": { "name": "wrap", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "isDefined", "declaration": { "name": "isDefined", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "iterNodes", "declaration": { "name": "iterNodes", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "getRoot", "declaration": { "name": "getRoot", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "getElementByIdFromRoot", "declaration": { "name": "getElementByIdFromRoot", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "isElement", "declaration": { "name": "isElement", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "getElementsFromEventPath", "declaration": { "name": "getElementsFromEventPath", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "findElementFromEventPath", "declaration": { "name": "findElementFromEventPath", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "groupBy", "declaration": { "name": "groupBy", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "first", "declaration": { "name": "first", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "last", "declaration": { "name": "last", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "modulo", "declaration": { "name": "modulo", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "take", "declaration": { "name": "take", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "chunk", "declaration": { "name": "chunk", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "splitToWords", "declaration": { "name": "splitToWords", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "toKebabCase", "declaration": { "name": "toKebabCase", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "isFunction", "declaration": { "name": "isFunction", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "isString", "declaration": { "name": "isString", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "isObject", "declaration": { "name": "isObject", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "isEventListenerObject", "declaration": { "name": "isEventListenerObject", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "addWeakEventListener", "declaration": { "name": "addWeakEventListener", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "addSafeEventListener", "declaration": { "name": "addSafeEventListener", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "isEmpty", "declaration": { "name": "isEmpty", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "asArray", "declaration": { "name": "asArray", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "partition", "declaration": { "name": "partition", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "getCenterPoint", "declaration": { "name": "getCenterPoint", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "roundByDPR", "declaration": { "name": "roundByDPR", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "scrollIntoView", "declaration": { "name": "scrollIntoView", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "isRegExp", "declaration": { "name": "isRegExp", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "equal", "declaration": { "name": "equal", "module": "src/components/common/util.ts" } }, { "kind": "js", "name": "setStyles", "declaration": { "name": "setStyles", "module": "src/components/common/util.ts" } } ] }, { "kind": "javascript-module", "path": "src/components/common/validators.ts", "declarations": [ { "kind": "variable", "name": "requiredValidator", "type": { "text": "Validator<{\n required: boolean;\n value?: unknown;\n}>" }, "default": "{ key: 'valueMissing', message: validatorMessages.required, isValid: ({ required, value }) => (required ? !!value : true), }" }, { "kind": "variable", "name": "requiredBooleanValidator", "type": { "text": "Validator<{\n required: boolean;\n checked: boolean;\n}>" }, "default": "{ key: 'valueMissing', message: validatorMessages.required, isValid: ({ required, checked }) => (required ? checked : true), }" }, { "kind": "variable", "name": "minLengthValidator", "type": { "text": "Validator<{\n minLength?: number;\n value: string;\n}>" }, "default": "{ key: 'tooShort', message: ({ minLength }) => formatString(validatorMessages.minLength, minLength), isValid: ({ minLength, value }) => minLength && value ? value.length >= asNumber(minLength) : true, }" }, { "kind": "variable", "name": "maxLengthValidator", "type": { "text": "Validator<{\n maxLength?: number;\n value: string;\n}>" }, "default": "{ key: 'tooLong', message: ({ maxLength }) => formatString(validatorMessages.maxLength, maxLength), isValid: ({ maxLength, value }) => maxLength && value ? value.length <= asNumber(maxLength) : true, }" }, { "kind": "variable", "name": "patternValidator", "type": { "text": "Validator<{ pattern?: string; value: string }>" }, "default": "{ key: 'patternMismatch', message: validatorMessages.pattern, isValid: ({ pattern, value }) => pattern && value ? new RegExp(pattern, 'u').test(value) : true, }" }, { "kind": "variable", "name": "minValidator", "type": { "text": "Validator<{\n min?: number;\n value: number | string;\n}>" }, "default": "{ key: 'rangeUnderflow', message: ({ min }) => formatString(validatorMessages.min, min), isValid: ({ min, value }) => isDefined(value) && value !== '' && isDefined(min) ? asNumber(value) >= asNumber(min) : true, }" }, { "kind": "variable", "name": "maxValidator", "type": { "text": "Validator<{\n max?: number;\n value: number | string;\n}>" }, "default": "{ key: 'rangeOverflow', message: ({ max }) => formatString(validatorMessages.max, max), isValid: ({ max, value }) => isDefined(value) && value !== '' && isDefined(max) ? asNumber(value) <= asNumber(max) : true, }" }, { "kind": "variable", "name": "stepValidator", "type": { "text": "Validator<{\n min?: number;\n step?: number;\n value: number | string;\n}>" }, "default": "{ key: 'stepMismatch', message: 'Value does not conform to step constraint', isValid: ({ min, step, value }) => { if (isDefined(value) && value !== '' && isDefined(step)) { const _value = asNumber(value) - asNumber(min); const _step = asNumber(step); const magnitude = numberOfDecimals(_step) + 1; const rem = roundPrecise( Math.abs(_value - _step * Math.round(_value / _step)), magnitude ); return !rem; } return true; }, }" }, { "kind": "variable", "name": "emailValidator", "type": { "text": "Validator<{ value: string }>" }, "default": "{ key: 'typeMismatch', message: validatorMessages.email, isValid: ({ value }) => (value ? emailRegex.test(value) : true), }" }, { "kind": "variable", "name": "urlValidator", "type": { "text": "Validator<{ value: string }>" }, "default": "{ key: 'typeMismatch', message: validatorMessages.url, isValid: ({ value }) => (value ? URL.canParse(value) : true), }" }, { "kind": "variable", "name": "minDateValidator", "type": { "text": "Validator<{\n value?: Date | null;\n min?: Date | null;\n}>" }, "default": "{ key: 'rangeUnderflow', message: ({ min }) => formatString(validatorMessages.min, min), isValid: ({ value, min }) => value && min ? CalendarDay.compare(value, min) >= 0 : true, }" }, { "kind": "variable", "name": "maxDateValidator", "type": { "text": "Validator<{\n value?: Date | null;\n max?: Date | null;\n}>" }, "default": "{ key: 'rangeOverflow', message: ({ max }) => formatString(validatorMessages.max, max), isValid: ({ value, max }) => value && max ? CalendarDay.compare(value, max) <= 0 : true, }" } ], "exports": [ { "kind": "js", "name": "requiredValidator", "declaration": { "name": "requiredValidator", "module": "src/components/common/validators.ts" } }, { "kind": "js", "name": "requiredBooleanValidator", "declaration": { "name": "requiredBooleanValidator", "module": "src/components/common/validators.ts" } }, { "kind": "js", "name": "minLengthValidator", "declaration": { "name": "minLengthValidator", "module": "src/components/common/validators.ts" } }, { "kind": "js", "name": "maxLengthValidator", "declaration": { "name": "maxLengthValidator", "module": "src/components/common/validators.ts" } }, { "kind": "js", "name": "patternValidator", "declaration": { "name": "patternValidator", "module": "src/components/common/validators.ts" } }, { "kind": "js", "name": "minValidator", "declaration": { "name": "minValidator", "module": "src/components/common/validators.ts" } }, { "kind": "js", "name": "maxValidator", "declaration": { "name": "maxValidator", "module": "src/components/common/validators.ts" } }, { "kind": "js", "name": "stepValidator", "declaration": { "name": "stepValidator", "module": "src/components/common/validators.ts" } }, { "kind": "js", "name": "emailValidator", "declaration": { "name": "emailValidator", "module": "src/components/common/validators.ts" } }, { "kind": "js", "name": "urlValidator", "declaration": { "name": "urlValidator", "module": "src/components/common/validators.ts" } }, { "kind": "js", "name": "minDateValidator", "declaration": { "name": "minDateValidator", "module": "src/components/com