@taiga-ui/cdk 2.38.0 → 2.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/dialog.service.d.ts +3 -3
- package/abstract/multiple-control.d.ts +2 -2
- package/abstract/taiga-ui-cdk-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js +281 -0
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js +16 -0
- package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js.map +1 -0
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +6 -10
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js +2 -2
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components.umd.js +12 -4
- package/bundles/taiga-ui-cdk-components.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +1 -5
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js +8 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.min.js.map +1 -1
- package/components/alert-host/alert-host.component.d.ts +9 -0
- package/components/alert-host/alert-host.module.d.ts +2 -0
- package/components/alert-host/index.d.ts +2 -0
- package/components/alert-host/package.json +13 -0
- package/components/alert-host/taiga-ui-cdk-components-alert-host.d.ts +4 -0
- package/components/alert-host/taiga-ui-cdk-components-alert-host.metadata.json +1 -0
- package/components/dialog-host/taiga-ui-cdk-components-dialog-host.metadata.json +1 -1
- package/components/dropdown-host/taiga-ui-cdk-components-dropdown-host.metadata.json +1 -1
- package/components/index.d.ts +1 -0
- package/components/taiga-ui-cdk-components.metadata.json +1 -1
- package/constants/taiga-ui-cdk-constants.metadata.json +1 -1
- package/directives/resize/resize.directive.d.ts +2 -2
- package/directives/resize/taiga-ui-cdk-directives-resize.metadata.json +1 -1
- package/esm2015/abstract/dialog.service.js +1 -1
- package/esm2015/abstract/multiple-control.js +1 -1
- package/esm2015/components/alert-host/alert-host.component.js +38 -0
- package/esm2015/components/alert-host/alert-host.module.js +16 -0
- package/esm2015/components/alert-host/index.js +3 -0
- package/esm2015/components/alert-host/taiga-ui-cdk-components-alert-host.js +5 -0
- package/esm2015/components/dialog-host/dialog-host.component.js +5 -10
- package/esm2015/components/dropdown-host/dropdown-host.component.js +2 -2
- package/esm2015/components/index.js +2 -1
- package/esm2015/constants/parent-animation.js +2 -6
- package/esm2015/directives/active-zone/active-zone.directive.js +1 -1
- package/esm2015/directives/resize/resize.directive.js +1 -1
- package/esm2015/interfaces/aria-dialog-context.js +1 -1
- package/esm2015/observables/items-query-list-observable.js +1 -1
- package/esm2015/services/obscured.service.js +1 -1
- package/esm2015/services/parents-scroll.service.js +1 -1
- package/esm2015/tokens/alerts.js +5 -0
- package/esm2015/tokens/dialogs.js +4 -2
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/utils/dom/get-element-obscurers.js +1 -1
- package/esm2015/utils/focus/move-focus.js +1 -1
- package/esm2015/utils/miscellaneous/flat-length.js +1 -1
- package/esm2015/utils/miscellaneous/get-original-array-from-query-list.js +1 -1
- package/esm2015/utils/miscellaneous/uniq-by.js +1 -1
- package/esm5/abstract/dialog.service.js +1 -1
- package/esm5/abstract/multiple-control.js +1 -1
- package/esm5/components/alert-host/alert-host.component.js +42 -0
- package/esm5/components/alert-host/alert-host.module.js +19 -0
- package/esm5/components/alert-host/index.js +3 -0
- package/esm5/components/alert-host/taiga-ui-cdk-components-alert-host.js +5 -0
- package/esm5/components/dialog-host/dialog-host.component.js +5 -10
- package/esm5/components/dropdown-host/dropdown-host.component.js +2 -2
- package/esm5/components/index.js +2 -1
- package/esm5/constants/parent-animation.js +2 -6
- package/esm5/directives/active-zone/active-zone.directive.js +1 -1
- package/esm5/directives/resize/resize.directive.js +1 -1
- package/esm5/interfaces/aria-dialog-context.js +1 -1
- package/esm5/observables/items-query-list-observable.js +1 -1
- package/esm5/services/obscured.service.js +1 -1
- package/esm5/services/parents-scroll.service.js +1 -1
- package/esm5/tokens/alerts.js +5 -0
- package/esm5/tokens/dialogs.js +4 -2
- package/esm5/tokens/index.js +2 -1
- package/esm5/utils/dom/get-element-obscurers.js +1 -1
- package/esm5/utils/focus/move-focus.js +1 -1
- package/esm5/utils/miscellaneous/flat-length.js +1 -1
- package/esm5/utils/miscellaneous/get-original-array-from-query-list.js +1 -1
- package/esm5/utils/miscellaneous/uniq-by.js +1 -1
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-alert-host.js +56 -0
- package/fesm2015/taiga-ui-cdk-components-alert-host.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js +4 -9
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-dropdown-host.js +1 -1
- package/fesm2015/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components.js +1 -0
- package/fesm2015/taiga-ui-cdk-components.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +1 -5
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-active-zone.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-resize.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js +8 -2
- package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-alert-host.js +63 -0
- package/fesm5/taiga-ui-cdk-components-alert-host.js.map +1 -0
- package/fesm5/taiga-ui-cdk-components-dialog-host.js +4 -9
- package/fesm5/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-dropdown-host.js +1 -1
- package/fesm5/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components.js +1 -0
- package/fesm5/taiga-ui-cdk-components.js.map +1 -1
- package/fesm5/taiga-ui-cdk-constants.js +1 -5
- package/fesm5/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-active-zone.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-resize.js.map +1 -1
- package/fesm5/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm5/taiga-ui-cdk-services.js.map +1 -1
- package/fesm5/taiga-ui-cdk-tokens.js +8 -2
- package/fesm5/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/interfaces/aria-dialog-context.d.ts +2 -2
- package/observables/items-query-list-observable.d.ts +1 -1
- package/package.json +20 -1
- package/schematics/collection.json +16 -0
- package/schematics/migration.json +10 -0
- package/schematics/ng-add/constants/modules.d.ts +8 -0
- package/schematics/ng-add/constants/modules.js +34 -0
- package/schematics/ng-add/constants/packages.d.ts +1 -0
- package/schematics/ng-add/constants/packages.js +3 -0
- package/schematics/ng-add/constants/versions.d.ts +4 -0
- package/schematics/ng-add/constants/versions.js +7 -0
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +66 -0
- package/schematics/ng-add/schema.d.ts +7 -0
- package/schematics/ng-add/schema.js +2 -0
- package/schematics/ng-add/schema.json +86 -0
- package/schematics/ng-add/setup-project.d.ts +3 -0
- package/schematics/ng-add/setup-project.js +16 -0
- package/schematics/ng-add/steps/add-taiga-icons.d.ts +5 -0
- package/schematics/ng-add/steps/add-taiga-icons.js +40 -0
- package/schematics/ng-add/steps/add-taiga-modules.d.ts +3 -0
- package/schematics/ng-add/steps/add-taiga-modules.js +52 -0
- package/schematics/ng-add/steps/add-taiga-styles.d.ts +5 -0
- package/schematics/ng-add/steps/add-taiga-styles.js +38 -0
- package/schematics/ng-add/steps/wrap-with-tui-root.d.ts +3 -0
- package/schematics/ng-add/steps/wrap-with-tui-root.js +82 -0
- package/schematics/ng-update/constants/consts.d.ts +12 -0
- package/schematics/ng-update/constants/consts.js +45 -0
- package/schematics/ng-update/constants/enums.d.ts +7 -0
- package/schematics/ng-update/constants/enums.js +174 -0
- package/schematics/ng-update/constants/types.d.ts +7 -0
- package/schematics/ng-update/constants/types.js +14 -0
- package/schematics/ng-update/index.d.ts +3 -0
- package/schematics/ng-update/index.js +29 -0
- package/schematics/ng-update/steps/rename-types.d.ts +1 -0
- package/schematics/ng-update/steps/rename-types.js +27 -0
- package/schematics/ng-update/steps/replace-const.d.ts +3 -0
- package/schematics/ng-update/steps/replace-const.js +25 -0
- package/schematics/ng-update/steps/replace-deep-import.d.ts +1 -0
- package/schematics/ng-update/steps/replace-deep-import.js +12 -0
- package/schematics/ng-update/steps/replace-enums.d.ts +1 -0
- package/schematics/ng-update/steps/replace-enums.js +40 -0
- package/schematics/utils/add-unique-import.d.ts +1 -0
- package/schematics/utils/add-unique-import.js +29 -0
- package/schematics/utils/get-named-import-references.d.ts +2 -0
- package/schematics/utils/get-named-import-references.js +14 -0
- package/schematics/utils/get-project-target-options.d.ts +2 -0
- package/schematics/utils/get-project-target-options.js +12 -0
- package/schematics/utils/get-project.d.ts +3 -0
- package/schematics/utils/get-project.js +12 -0
- package/schematics/utils/remove-import.d.ts +2 -0
- package/schematics/utils/remove-import.js +11 -0
- package/services/obscured.service.d.ts +1 -1
- package/tokens/alerts.d.ts +4 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/taiga-ui-cdk-tokens.metadata.json +1 -1
- package/utils/dom/get-element-obscurers.d.ts +1 -1
- package/utils/focus/move-focus.d.ts +1 -1
- package/utils/miscellaneous/flat-length.d.ts +1 -1
- package/utils/miscellaneous/get-original-array-from-query-list.d.ts +1 -1
- package/utils/miscellaneous/uniq-by.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-utils-focus.umd.js","sources":["ng://@taiga-ui/cdk/utils/focus/get-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/set-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/blur-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-mouse-focusable.ts","ng://@taiga-ui/cdk/utils/focus/get-closest-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused-in.ts","ng://@taiga-ui/cdk/utils/focus/move-focus.ts","ng://@taiga-ui/cdk/utils/focus/set-native-mouse-focused.ts"],"sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function getNativeFocused(documentRef: Document): Element | null {\n if (!documentRef.activeElement || !documentRef.activeElement.shadowRoot) {\n return documentRef.activeElement;\n }\n\n let element = documentRef.activeElement.shadowRoot.activeElement;\n\n while (element && element.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","/**\n * Focuses or blurs and element\n *\n * @param element native element\n * @param focused boolean focused state\n * @param preventScroll optional flag to prevent native scroll to the element\n */\nexport function setNativeFocused(\n element: HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n) {\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","import {getNativeFocused} from './get-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function blurNativeFocused(documentRef: Document) {\n const activeElement = getNativeFocused(documentRef);\n\n // TODO: iframe warning\n if (activeElement instanceof HTMLElement) {\n setNativeFocused(activeElement, false);\n }\n}\n","/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function isNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute('disabled') || element.getAttribute('tabIndex') === '-1') {\n return false;\n }\n\n // TODO: iframe warning\n if (\n (element instanceof HTMLElement && element.isContentEditable) ||\n element.getAttribute('tabIndex') === '0'\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n case 'VIDEO':\n case 'AUDIO':\n return element.hasAttribute('controls');\n case 'INPUT':\n return element.getAttribute('type') !== 'hidden';\n case 'A':\n case 'LINK':\n return element.hasAttribute('href');\n default:\n return false;\n }\n}\n","import {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function isNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute('disabled') &&\n (element.getAttribute('tabIndex') === '-1' || isNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\n\nimport {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {isNativeMouseFocusable} from './is-native-mouse-focusable';\n\n/**\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n *\n * @param initial current HTML element\n * @param prev should it look backwards instead (find item that will be focused with Shift + Tab)\n * @param root top Node limiting the search area\n * @param keyboard determine if only keyboard focus is of interest\n *\n */\nexport function getClosestFocusable(\n initial: HTMLElement,\n prev: boolean = false,\n root: Node,\n keyboard: boolean = true,\n): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? isNativeKeyboardFocusable : isNativeMouseFocusable;\n\n // Deprecated but ony this overload works in IE\n // Filter must be a function in IE, other modern browsers are compliant to this format\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n false,\n );\n\n treeWalker.currentNode = initial;\n\n while (prev ? treeWalker.previousNode() : treeWalker.nextNode()) {\n // TODO: iframe warning\n if (treeWalker.currentNode instanceof HTMLElement) {\n initial = treeWalker.currentNode;\n }\n\n if (check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n\n/** @deprecated use getClosestFocusable */\nexport const getClosestKeyboardFocusable = getClosestFocusable;\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function isNativeFocused(node: Node | null): boolean {\n return (\n !!node && !!node.ownerDocument && getNativeFocused(node.ownerDocument) === node\n );\n}\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function isNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = getNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {isNativeFocused} from './is-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function moveFocus(\n currentIndex: number,\n elements: ReadonlyArray<HTMLElement>,\n step: number,\n) {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n setNativeFocused(elements[currentIndex]);\n\n if (isNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","import {setNativeFocused} from './set-native-focused';\n\n/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function setNativeMouseFocused(\n element: HTMLOrSVGElement & Element,\n focused: boolean = true,\n preventScroll: boolean = false,\n) {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === 'function') {\n element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent('Event');\n\n event.initEvent('mousedown', true, true);\n element.dispatchEvent(event);\n }\n\n setNativeFocused(element, focused, preventScroll);\n}\n"],"names":["svgNodeFilter"],"mappings":";;;;;;IAAA;;;;;aAKgB,gBAAgB,CAAC,WAAqB;QAClD,IAAI,CAAC,WAAW,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,EAAE;YACrE,OAAO,WAAW,CAAC,aAAa,CAAC;SACpC;QAED,IAAI,OAAO,GAAG,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC;QAEjE,OAAO,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE;YAClC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;SAC9C;QAED,OAAO,OAAO,CAAC;IACnB;;ICjBA;;;;;;;aAOgB,gBAAgB,CAC5B,OAAyB,EACzB,OAAuB,EACvB,aAA8B;QAD9B,wBAAA,EAAA,cAAuB;QACvB,8BAAA,EAAA,qBAA8B;QAE9B,IAAI,OAAO,EAAE;YACT,OAAO,CAAC,KAAK,CAAC,EAAC,aAAa,eAAA,EAAC,CAAC,CAAC;SAClC;aAAM;YACH,OAAO,CAAC,IAAI,EAAE,CAAC;SAClB;IACL;;ICdA;;;aAGgB,iBAAiB,CAAC,WAAqB;QACnD,IAAM,aAAa,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;;QAGpD,IAAI,aAAa,YAAY,WAAW,EAAE;YACtC,gBAAgB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;SAC1C;IACL;;ICbA;;;;;;aAMgB,yBAAyB,CAAC,OAAgB;QACtD,IAAI,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,IAAI,E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AAuB,EACvB,aAA8B;QAD9B,wBAAA,EAAA,cAAuB;QACvB,8BAAA,EAAA,qBAA8B;QAE9B,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YACxB,OAAO;SACV;QAED,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE;YAC7B,OAAO,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;SACpF;aAAM;YACH,IAAM,OAAK,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YAEzD,OAAK,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YACzC,OAAO,CAAC,aAAa,CAAC,OAAK,CAAC,CAAC;SAChC;QAED,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IACtD;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-utils-focus.umd.js","sources":["ng://@taiga-ui/cdk/utils/focus/get-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/set-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/blur-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-mouse-focusable.ts","ng://@taiga-ui/cdk/utils/focus/get-closest-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused-in.ts","ng://@taiga-ui/cdk/utils/focus/move-focus.ts","ng://@taiga-ui/cdk/utils/focus/set-native-mouse-focused.ts"],"sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function getNativeFocused(documentRef: Document): Element | null {\n if (!documentRef.activeElement || !documentRef.activeElement.shadowRoot) {\n return documentRef.activeElement;\n }\n\n let element = documentRef.activeElement.shadowRoot.activeElement;\n\n while (element && element.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","/**\n * Focuses or blurs and element\n *\n * @param element native element\n * @param focused boolean focused state\n * @param preventScroll optional flag to prevent native scroll to the element\n */\nexport function setNativeFocused(\n element: HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n) {\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","import {getNativeFocused} from './get-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function blurNativeFocused(documentRef: Document) {\n const activeElement = getNativeFocused(documentRef);\n\n // TODO: iframe warning\n if (activeElement instanceof HTMLElement) {\n setNativeFocused(activeElement, false);\n }\n}\n","/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function isNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute('disabled') || element.getAttribute('tabIndex') === '-1') {\n return false;\n }\n\n // TODO: iframe warning\n if (\n (element instanceof HTMLElement && element.isContentEditable) ||\n element.getAttribute('tabIndex') === '0'\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n case 'VIDEO':\n case 'AUDIO':\n return element.hasAttribute('controls');\n case 'INPUT':\n return element.getAttribute('type') !== 'hidden';\n case 'A':\n case 'LINK':\n return element.hasAttribute('href');\n default:\n return false;\n }\n}\n","import {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function isNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute('disabled') &&\n (element.getAttribute('tabIndex') === '-1' || isNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\n\nimport {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {isNativeMouseFocusable} from './is-native-mouse-focusable';\n\n/**\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n *\n * @param initial current HTML element\n * @param prev should it look backwards instead (find item that will be focused with Shift + Tab)\n * @param root top Node limiting the search area\n * @param keyboard determine if only keyboard focus is of interest\n *\n */\nexport function getClosestFocusable(\n initial: HTMLElement,\n prev: boolean = false,\n root: Node,\n keyboard: boolean = true,\n): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? isNativeKeyboardFocusable : isNativeMouseFocusable;\n\n // Deprecated but ony this overload works in IE\n // Filter must be a function in IE, other modern browsers are compliant to this format\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n false,\n );\n\n treeWalker.currentNode = initial;\n\n while (prev ? treeWalker.previousNode() : treeWalker.nextNode()) {\n // TODO: iframe warning\n if (treeWalker.currentNode instanceof HTMLElement) {\n initial = treeWalker.currentNode;\n }\n\n if (check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n\n/** @deprecated use getClosestFocusable */\nexport const getClosestKeyboardFocusable = getClosestFocusable;\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function isNativeFocused(node: Node | null): boolean {\n return (\n !!node && !!node.ownerDocument && getNativeFocused(node.ownerDocument) === node\n );\n}\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function isNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = getNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {isNativeFocused} from './is-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function moveFocus(\n currentIndex: number,\n elements: readonly HTMLElement[],\n step: number,\n) {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n setNativeFocused(elements[currentIndex]);\n\n if (isNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","import {setNativeFocused} from './set-native-focused';\n\n/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function setNativeMouseFocused(\n element: HTMLOrSVGElement & Element,\n focused: boolean = true,\n preventScroll: boolean = false,\n) {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === 'function') {\n element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent('Event');\n\n event.initEvent('mousedown', true, true);\n element.dispatchEvent(event);\n }\n\n setNativeFocused(element, focused, preventScroll);\n}\n"],"names":["svgNodeFilter"],"mappings":";;;;;;IAAA;;;;;aAKgB,gBAAgB,CAAC,WAAqB;QAClD,IAAI,CAAC,WAAW,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,EAAE;YACrE,OAAO,WAAW,CAAC,aAAa,CAAC;SACpC;QAED,IAAI,OAAO,GAAG,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC;QAEjE,OAAO,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE;YAClC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;SAC9C;QAED,OAAO,OAAO,CAAC;IACnB;;ICjBA;;;;;;;aAOgB,gBAAgB,CAC5B,OAAyB,EACzB,OAAuB,EACvB,aAA8B;QAD9B,wBAAA,EAAA,cAAuB;QACvB,8BAAA,EAAA,q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-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-mouse-focusable.ts","ng://@taiga-ui/cdk/utils/focus/get-closest-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/blur-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused-in.ts","ng://@taiga-ui/cdk/utils/focus/move-focus.ts","ng://@taiga-ui/cdk/utils/focus/set-native-mouse-focused.ts"],"names":["getNativeFocused","documentRef","activeElement","shadowRoot","element","setNativeFocused","focused","preventScroll","focus","blur","isNativeKeyboardFocusable","hasAttribute","getAttribute","HTMLElement","isContentEditable","tagName","isNativeMouseFocusable","getClosestFocusable","initial","prev","root","keyboard","ownerDocument","check","treeWalker","createTreeWalker","NodeFilter","SHOW_ELEMENT","svgNodeFilter","currentNode","previousNode","nextNode","getClosestKeyboardFocusable","isNativeFocused","node","contains","nativeFocused","currentIndex","elements","step","length","Event","dispatchEvent","bubbles","cancelable","event_1","createEvent","initEvent"],"mappings":"udAKgBA,EAAiBC,GAC7B,IAAKA,EAAYC,gBAAkBD,EAAYC,cAAcC,WACzD,OAAOF,EAAYC,cAKvB,IAFA,IAAIE,EAAUH,EAAYC,cAAcC,WAAWD,cAE5CE,GAAWA,EAAQD,YACtBC,EAAUA,EAAQD,WAAWD,cAGjC,OAAOE,WCTKC,EACZD,EACAE,EACAC,QADA,IAAAD,IAAAA,GAAA,QACA,IAAAC,IAAAA,GAAA,GAEID,EACAF,EAAQI,MAAM,CAACD,cAAaA,IAE5BH,EAAQK,gBCTAC,EAA0BN,GACtC,GAAIA,EAAQO,aAAa,aAAoD,OAArCP,EAAQQ,aAAa,YACzD,OAAO,EAIX,GACKR,aAAmBS,aAAeT,EAAQU,mBACN,MAArCV,EAAQQ,aAAa,YAErB,OAAO,EAGX,OAAQR,EAAQW,SACZ,IAAK,SACL,IAAK,SACL,IAAK,WACD,OAA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GAAqB,mBAAVmB,MACPrC,EAAQsC,cAAc,IAAID,MAAM,YAAa,CAACE,SAAS,EAAMC,YAAY,SACtE,CACH,IAAMC,EAAQzC,EAAQkB,cAAcwB,YAAY,SAEhDD,EAAME,UAAU,aAAa,GAAM,GACnC3C,EAAQsC,cAAcG,GAG1BxC,EAAiBD,EAASE,EAASC","sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function getNativeFocused(documentRef: Document): Element | null {\n if (!documentRef.activeElement || !documentRef.activeElement.shadowRoot) {\n return documentRef.activeElement;\n }\n\n let element = documentRef.activeElement.shadowRoot.activeElement;\n\n while (element && element.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","/**\n * Focuses or blurs and element\n *\n * @param element native element\n * @param focused boolean focused state\n * @param preventScroll optional flag to prevent native scroll to the element\n */\nexport function setNativeFocused(\n element: HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n) {\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function isNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute('disabled') || element.getAttribute('tabIndex') === '-1') {\n return false;\n }\n\n // TODO: iframe warning\n if (\n (element instanceof HTMLElement && element.isContentEditable) ||\n element.getAttribute('tabIndex') === '0'\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n case 'VIDEO':\n case 'AUDIO':\n return element.hasAttribute('controls');\n case 'INPUT':\n return element.getAttribute('type') !== 'hidden';\n case 'A':\n case 'LINK':\n return element.hasAttribute('href');\n default:\n return false;\n }\n}\n","import {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function isNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute('disabled') &&\n (element.getAttribute('tabIndex') === '-1' || isNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\n\nimport {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {isNativeMouseFocusable} from './is-native-mouse-focusable';\n\n/**\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n *\n * @param initial current HTML element\n * @param prev should it look backwards instead (find item that will be focused with Shift + Tab)\n * @param root top Node limiting the search area\n * @param keyboard determine if only keyboard focus is of interest\n *\n */\nexport function getClosestFocusable(\n initial: HTMLElement,\n prev: boolean = false,\n root: Node,\n keyboard: boolean = true,\n): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? isNativeKeyboardFocusable : isNativeMouseFocusable;\n\n // Deprecated but ony this overload works in IE\n // Filter must be a function in IE, other modern browsers are compliant to this format\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n false,\n );\n\n treeWalker.currentNode = initial;\n\n while (prev ? treeWalker.previousNode() : treeWalker.nextNode()) {\n // TODO: iframe warning\n if (treeWalker.currentNode instanceof HTMLElement) {\n initial = treeWalker.currentNode;\n }\n\n if (check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n\n/** @deprecated use getClosestFocusable */\nexport const getClosestKeyboardFocusable = getClosestFocusable;\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function isNativeFocused(node: Node | null): boolean {\n return (\n !!node && !!node.ownerDocument && getNativeFocused(node.ownerDocument) === node\n );\n}\n","import {getNativeFocused} from './get-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function blurNativeFocused(documentRef: Document) {\n const activeElement = getNativeFocused(documentRef);\n\n // TODO: iframe warning\n if (activeElement instanceof HTMLElement) {\n setNativeFocused(activeElement, false);\n }\n}\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function isNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = getNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {isNativeFocused} from './is-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function moveFocus(\n currentIndex: number,\n elements: ReadonlyArray<HTMLElement>,\n step: number,\n) {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n setNativeFocused(elements[currentIndex]);\n\n if (isNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","import {setNativeFocused} from './set-native-focused';\n\n/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function setNativeMouseFocused(\n element: HTMLOrSVGElement & Element,\n focused: boolean = true,\n preventScroll: boolean = false,\n) {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === 'function') {\n element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent('Event');\n\n event.initEvent('mousedown', true, true);\n element.dispatchEvent(event);\n }\n\n setNativeFocused(element, focused, preventScroll);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["ng://@taiga-ui/cdk/utils/focus/get-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/set-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-mouse-focusable.ts","ng://@taiga-ui/cdk/utils/focus/get-closest-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/blur-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused-in.ts","ng://@taiga-ui/cdk/utils/focus/move-focus.ts","ng://@taiga-ui/cdk/utils/focus/set-native-mouse-focused.ts"],"names":["getNativeFocused","documentRef","activeElement","shadowRoot","element","setNativeFocused","focused","preventScroll","focus","blur","isNativeKeyboardFocusable","hasAttribute","getAttribute","HTMLElement","isContentEditable","tagName","isNativeMouseFocusable","getClosestFocusable","initial","prev","root","keyboard","ownerDocument","check","treeWalker","createTreeWalker","NodeFilter","SHOW_ELEMENT","svgNodeFilter","currentNode","previousNode","nextNode","getClosestKeyboardFocusable","isNativeFocused","node","contains","nativeFocused","currentIndex","elements","step","length","Event","dispatchEvent","bubbles","cancelable","event_1","createEvent","initEvent"],"mappings":"udAKgBA,EAAiBC,GAC7B,IAAKA,EAAYC,gBAAkBD,EAAYC,cAAcC,WACzD,OAAOF,EAAYC,cAKvB,IAFA,IAAIE,EAAUH,EAAYC,cAAcC,WAAWD,cAE5CE,GAAWA,EAAQD,YACtBC,EAAUA,EAAQD,WAAWD,cAGjC,OAAOE,WCTKC,EACZD,EACAE,EACAC,QADA,IAAAD,IAAAA,GAAA,QACA,IAAAC,IAAAA,GAAA,GAEID,EACAF,EAAQI,MAAM,CAACD,cAAaA,IAE5BH,EAAQK,gBCTAC,EAA0BN,GACtC,GAAIA,EAAQO,aAAa,aAAoD,OAArCP,EAAQQ,aAAa,YACzD,OAAO,EAIX,GACKR,aAAmBS,aAAeT,EAAQU,mBACN,MAArCV,EAAQQ,aAAa,YAErB,OAAO,EAGX,OAAQR,EAAQW,SACZ,IAAK,SACL,IAAK,SACL,IAAK,WACD,OAAO,EACX,IAAK,QACL,IAAK,QACD,OAAOX,EAAQO,aAAa,YAChC,I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CAACE,SAAS,EAAMC,YAAY,SACtE,CACH,IAAMC,EAAQzC,EAAQkB,cAAcwB,YAAY,SAEhDD,EAAME,UAAU,aAAa,GAAM,GACnC3C,EAAQsC,cAAcG,GAG1BxC,EAAiBD,EAASE,EAASC","sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function getNativeFocused(documentRef: Document): Element | null {\n if (!documentRef.activeElement || !documentRef.activeElement.shadowRoot) {\n return documentRef.activeElement;\n }\n\n let element = documentRef.activeElement.shadowRoot.activeElement;\n\n while (element && element.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","/**\n * Focuses or blurs and element\n *\n * @param element native element\n * @param focused boolean focused state\n * @param preventScroll optional flag to prevent native scroll to the element\n */\nexport function setNativeFocused(\n element: HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n) {\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function isNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute('disabled') || element.getAttribute('tabIndex') === '-1') {\n return false;\n }\n\n // TODO: iframe warning\n if (\n (element instanceof HTMLElement && element.isContentEditable) ||\n element.getAttribute('tabIndex') === '0'\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n case 'VIDEO':\n case 'AUDIO':\n return element.hasAttribute('controls');\n case 'INPUT':\n return element.getAttribute('type') !== 'hidden';\n case 'A':\n case 'LINK':\n return element.hasAttribute('href');\n default:\n return false;\n }\n}\n","import {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function isNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute('disabled') &&\n (element.getAttribute('tabIndex') === '-1' || isNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\n\nimport {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {isNativeMouseFocusable} from './is-native-mouse-focusable';\n\n/**\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n *\n * @param initial current HTML element\n * @param prev should it look backwards instead (find item that will be focused with Shift + Tab)\n * @param root top Node limiting the search area\n * @param keyboard determine if only keyboard focus is of interest\n *\n */\nexport function getClosestFocusable(\n initial: HTMLElement,\n prev: boolean = false,\n root: Node,\n keyboard: boolean = true,\n): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? isNativeKeyboardFocusable : isNativeMouseFocusable;\n\n // Deprecated but ony this overload works in IE\n // Filter must be a function in IE, other modern browsers are compliant to this format\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n false,\n );\n\n treeWalker.currentNode = initial;\n\n while (prev ? treeWalker.previousNode() : treeWalker.nextNode()) {\n // TODO: iframe warning\n if (treeWalker.currentNode instanceof HTMLElement) {\n initial = treeWalker.currentNode;\n }\n\n if (check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n\n/** @deprecated use getClosestFocusable */\nexport const getClosestKeyboardFocusable = getClosestFocusable;\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function isNativeFocused(node: Node | null): boolean {\n return (\n !!node && !!node.ownerDocument && getNativeFocused(node.ownerDocument) === node\n );\n}\n","import {getNativeFocused} from './get-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function blurNativeFocused(documentRef: Document) {\n const activeElement = getNativeFocused(documentRef);\n\n // TODO: iframe warning\n if (activeElement instanceof HTMLElement) {\n setNativeFocused(activeElement, false);\n }\n}\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function isNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = getNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {isNativeFocused} from './is-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function moveFocus(\n currentIndex: number,\n elements: readonly HTMLElement[],\n step: number,\n) {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n setNativeFocused(elements[currentIndex]);\n\n if (isNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","import {setNativeFocused} from './set-native-focused';\n\n/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function setNativeMouseFocused(\n element: HTMLOrSVGElement & Element,\n focused: boolean = true,\n preventScroll: boolean = false,\n) {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === 'function') {\n element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent('Event');\n\n event.initEvent('mousedown', true, true);\n element.dispatchEvent(event);\n }\n\n setNativeFocused(element, focused, preventScroll);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-utils-miscellaneous.umd.js","sources":["ng://@taiga-ui/cdk/utils/miscellaneous/distance-between-touches.ts","ng://@taiga-ui/cdk/utils/miscellaneous/ease-in-out-quad.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-present.ts","ng://@taiga-ui/cdk/utils/miscellaneous/fallback-value.ts","ng://@taiga-ui/cdk/utils/miscellaneous/flat-length.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-original-array-from-query-list.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-swipe-direction.ts","ng://@taiga-ui/cdk/utils/miscellaneous/identity.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-element-editable.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-number.ts","ng://@taiga-ui/cdk/utils/miscellaneous/mark-control-as-touched-and-validate.ts","ng://@taiga-ui/cdk/utils/miscellaneous/nullable-same.ts","ng://@taiga-ui/cdk/utils/miscellaneous/uniq-by.ts"],"sourcesContent":["export function distanceBetweenTouches({touches}: TouchEvent): number {\n return Math.hypot(\n touches[0].clientX - touches[1].clientX,\n touches[0].clientY - touches[1].clientY,\n );\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\n\nexport function easeInOutQuad(t: number): number {\n tuiAssert.assert(\n 0 <= t && t <= 1,\n 'Input must be between 0 and 1 inclusive but received ',\n t,\n );\n\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n}\n","export function isPresent<T>(value?: T | null): value is T {\n return value !== null && value !== undefined;\n}\n","import {isPresent} from './is-present';\n\n/**\n * If the value is null or undefined, returns default value\n * @param value\n * @param fallback alternative fallback\n * @deprecated use nullish coalescing operator\n */\nexport function fallbackValue<T>(value: T | null | undefined, fallback: T): T {\n return isPresent(value) ? value : fallback;\n}\n","/**\n * Flattens two dimensional array and calculates resulting length\n *\n * @param array twi dimensional array\n */\nexport function flatLength(array: ReadonlyArray<
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-utils-miscellaneous.umd.js","sources":["ng://@taiga-ui/cdk/utils/miscellaneous/distance-between-touches.ts","ng://@taiga-ui/cdk/utils/miscellaneous/ease-in-out-quad.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-present.ts","ng://@taiga-ui/cdk/utils/miscellaneous/fallback-value.ts","ng://@taiga-ui/cdk/utils/miscellaneous/flat-length.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-original-array-from-query-list.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-swipe-direction.ts","ng://@taiga-ui/cdk/utils/miscellaneous/identity.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-element-editable.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-number.ts","ng://@taiga-ui/cdk/utils/miscellaneous/mark-control-as-touched-and-validate.ts","ng://@taiga-ui/cdk/utils/miscellaneous/nullable-same.ts","ng://@taiga-ui/cdk/utils/miscellaneous/uniq-by.ts"],"sourcesContent":["export function distanceBetweenTouches({touches}: TouchEvent): number {\n return Math.hypot(\n touches[0].clientX - touches[1].clientX,\n touches[0].clientY - touches[1].clientY,\n );\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\n\nexport function easeInOutQuad(t: number): number {\n tuiAssert.assert(\n 0 <= t && t <= 1,\n 'Input must be between 0 and 1 inclusive but received ',\n t,\n );\n\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n}\n","export function isPresent<T>(value?: T | null): value is T {\n return value !== null && value !== undefined;\n}\n","import {isPresent} from './is-present';\n\n/**\n * If the value is null or undefined, returns default value\n * @param value\n * @param fallback alternative fallback\n * @deprecated use nullish coalescing operator\n */\nexport function fallbackValue<T>(value: T | null | undefined, fallback: T): T {\n return isPresent(value) ? value : fallback;\n}\n","/**\n * Flattens two dimensional array and calculates resulting length\n *\n * @param array twi dimensional array\n */\nexport function flatLength(array: ReadonlyArray<readonly unknown[]>): number {\n return array.reduce((count, section) => count + section.length, 0);\n}\n","import {QueryList} from '@angular/core';\n\n/**\n * Extracts original array from {@link QueryList} rather than\n * creating a copy like {@link QueryList.toArray} does.\n * @param queryList\n * @returns original array from {@link QueryList}.\n */\nexport function getOriginalArrayFromQueryList<T>(queryList: QueryList<T>): readonly T[] {\n let array: readonly T[] = [];\n\n queryList.find((_item, _index, originalArray) => {\n array = originalArray;\n\n return true;\n });\n\n return array;\n}\n","import {TuiSwipeDirection} from '@taiga-ui/cdk/interfaces';\n\nexport function getSwipeDirection(deltaX: number, deltaY: number): TuiSwipeDirection {\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\n return deltaY > 0 ? 'top' : 'bottom';\n } else {\n return deltaX > 0 ? 'left' : 'right';\n }\n}\n","/**\n * @deprecated: use identity from rxjs\n */\nexport function identity<T>(item: T): T {\n return item;\n}\n","export function isElementEditable(element: HTMLElement): boolean {\n // TODO: iframe warning\n return (\n (element instanceof HTMLInputElement && !element.readOnly) ||\n (element instanceof HTMLTextAreaElement && !element.readOnly) ||\n element.isContentEditable\n );\n}\n","export function isNumber(value: unknown): value is number {\n return typeof value === 'number';\n}\n","import {AbstractControl, FormArray, FormGroup} from '@angular/forms';\n\nexport function markControlAsTouchedAndValidate(control: AbstractControl) {\n if (control instanceof FormArray) {\n control.controls.forEach(nestedControl => {\n markControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n if (control instanceof FormGroup) {\n Object.values(control.controls).forEach(nestedControl => {\n markControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n control.markAsTouched();\n control.updateValueAndValidity();\n}\n","import {TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\n/**\n * Checks identity for nullable elements.\n *\n * @param a element a\n * @param b element b\n * @param handler called if both elements are not null\n * @return true if either both are null or they pass identity handler\n */\nexport function nullableSame<T>(\n a: T | null,\n b: T | null,\n handler: TuiIdentityMatcher<T>,\n): boolean {\n if (a === null) {\n return b === null;\n }\n\n if (b === null) {\n return false;\n }\n\n return handler(a, b);\n}\n","export function uniqBy<T extends object>(\n array: readonly T[],\n key: keyof T,\n): readonly T[] {\n return Array.from(\n array\n .reduce(\n (map, item) => (map.has(item[key]) ? map : map.set(item[key], item)),\n new Map<T[keyof T], T>(),\n )\n .values(),\n );\n}\n"],"names":["tuiAssert","FormArray","FormGroup"],"mappings":";;;;;;aAAgB,sBAAsB,CAAC,EAAqB;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O,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzB;;aCxBgB,MAAM,CAClB,KAAmB,EACnB,GAAY;QAEZ,OAAO,KAAK,CAAC,IAAI,CACb,KAAK;aACA,MAAM,CACH,UAAC,GAAG,EAAE,IAAI,IAAK,QAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAC,EACpE,IAAI,GAAG,EAAiB,CAC3B;aACA,MAAM,EAAE,CAChB,CAAC;IACN;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ng://@taiga-ui/cdk/utils/miscellaneous/is-present.ts","ng://@taiga-ui/cdk/utils/miscellaneous/distance-between-touches.ts","ng://@taiga-ui/cdk/utils/miscellaneous/ease-in-out-quad.ts","ng://@taiga-ui/cdk/utils/miscellaneous/fallback-value.ts","ng://@taiga-ui/cdk/utils/miscellaneous/flat-length.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-original-array-from-query-list.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-swipe-direction.ts","ng://@taiga-ui/cdk/utils/miscellaneous/identity.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-element-editable.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-number.ts","ng://@taiga-ui/cdk/utils/miscellaneous/mark-control-as-touched-and-validate.ts","ng://@taiga-ui/cdk/utils/miscellaneous/nullable-same.ts","ng://@taiga-ui/cdk/utils/miscellaneous/uniq-by.ts"],"names":["isPresent","value","_a","touches","Math","hypot","clientX","clientY","t","tuiAssert","assert","fallback","array","reduce","count","section","length","queryList","find","_item","_index","originalArray","deltaX","deltaY","abs","item","element","HTMLInputElement","readOnly","HTMLTextAreaElement","isContentEditable","markControlAsTouchedAndValidate","control","FormArray","controls","forEach","nestedControl","FormGroup","Object","values","markAsTouched","updateValueAndValidity","a","b","handler","key","Array","from","map","has","set","Map"],"mappings":"yhBAAgBA,EAAaC,GACzB,OAAOA,MAAAA,oCCD4BC,OAACC,EAAAD,EAAAC,QACpC,OAAOC,KAAKC,MACRF,EAAQ,GAAGG,QAAUH,EAAQ,GAAGG,QAChCH,EAAQ,GAAGI,QAAUJ,EAAQ,GAAGI,mCCDVC,GAO1B,OANAC,EAAAA,UAAUC,OACN,GAAKF,GAAKA,GAAK,EACf,wDACAA,GAGGA,EAAI,GAAM,EAAIA,EAAIA,GAAU,EAAI,EAAIA,GAAKA,EAAlB,4BCDDP,EAA6BU,GAC1D,OAAOX,EAAUC,GAASA,EAAQU,yBCJXC,GACvB,OAAOA,EAAMC,QAAO,SAACC,EAAOC,GAAY,OAAAD,EAAQC,EAAQC,SAAQ,
|
|
1
|
+
{"version":3,"sources":["ng://@taiga-ui/cdk/utils/miscellaneous/is-present.ts","ng://@taiga-ui/cdk/utils/miscellaneous/distance-between-touches.ts","ng://@taiga-ui/cdk/utils/miscellaneous/ease-in-out-quad.ts","ng://@taiga-ui/cdk/utils/miscellaneous/fallback-value.ts","ng://@taiga-ui/cdk/utils/miscellaneous/flat-length.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-original-array-from-query-list.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-swipe-direction.ts","ng://@taiga-ui/cdk/utils/miscellaneous/identity.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-element-editable.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-number.ts","ng://@taiga-ui/cdk/utils/miscellaneous/mark-control-as-touched-and-validate.ts","ng://@taiga-ui/cdk/utils/miscellaneous/nullable-same.ts","ng://@taiga-ui/cdk/utils/miscellaneous/uniq-by.ts"],"names":["isPresent","value","_a","touches","Math","hypot","clientX","clientY","t","tuiAssert","assert","fallback","array","reduce","count","section","length","queryList","find","_item","_index","originalArray","deltaX","deltaY","abs","item","element","HTMLInputElement","readOnly","HTMLTextAreaElement","isContentEditable","markControlAsTouchedAndValidate","control","FormArray","controls","forEach","nestedControl","FormGroup","Object","values","markAsTouched","updateValueAndValidity","a","b","handler","key","Array","from","map","has","set","Map"],"mappings":"yhBAAgBA,EAAaC,GACzB,OAAOA,MAAAA,oCCD4BC,OAACC,EAAAD,EAAAC,QACpC,OAAOC,KAAKC,MACRF,EAAQ,GAAGG,QAAUH,EAAQ,GAAGG,QAChCH,EAAQ,GAAGI,QAAUJ,EAAQ,GAAGI,mCCDVC,GAO1B,OANAC,EAAAA,UAAUC,OACN,GAAKF,GAAKA,GAAK,EACf,wDACAA,GAGGA,EAAI,GAAM,EAAIA,EAAIA,GAAU,EAAI,EAAIA,GAAKA,EAAlB,4BCDDP,EAA6BU,GAC1D,OAAOX,EAAUC,GAASA,EAAQU,yBCJXC,GACvB,OAAOA,EAAMC,QAAO,SAACC,EAAOC,GAAY,OAAAD,EAAQC,EAAQC,SAAQ,6CCEnBC,GAC7C,IAAIL,EAAsB,GAQ1B,OANAK,EAAUC,MAAK,SAACC,EAAOC,EAAQC,GAG3B,OAFAT,EAAQS,GAED,KAGJT,gCCfuBU,EAAgBC,GAC9C,OAAInB,KAAKoB,IAAID,GAAUnB,KAAKoB,IAAIF,GACrBC,EAAS,EAAI,MAAQ,SAErBD,EAAS,EAAI,OAAS,6BCHTG,GACxB,OAAOA,gCCJuBC,GAE9B,OACKA,aAAmBC,mBAAqBD,EAAQE,UAChDF,aAAmBG,sBAAwBH,EAAQE,UACpDF,EAAQI,uCCLS7B,GACrB,MAAwB,iBAAVA,4DCCF8B,EAAgCC,GACxCA,aAAmBC,EAAAA,WACnBD,EAAQE,SAASC,SAAQ,SAAAC,GACrBL,EAAgCK,MAIpCJ,aAAmBK,EAAAA,WACnBC,OAAOC,OAAOP,EAAQE,UAAUC,SAAQ,SAAAC,GACpCL,EAAgCK,MAIxCJ,EAAQQ,gBACRR,EAAQS,kDCLRC,EACAC,EACAC,GAEA,OAAU,OAANF,EACa,OAANC,EAGD,OAANA,GAIGC,EAAQF,EAAGC,sBCtBlB/B,EACAiC,GAEA,OAAOC,MAAMC,KACTnC,EACKC,QACG,SAACmC,EAAKvB,GAAS,OAACuB,EAAIC,IAAIxB,EAAKoB,IAAQG,EAAMA,EAAIE,IAAIzB,EAAKoB,GAAMpB,KAC9D,IAAI0B,KAEPZ","sourcesContent":["export function isPresent<T>(value?: T | null): value is T {\n return value !== null && value !== undefined;\n}\n","export function distanceBetweenTouches({touches}: TouchEvent): number {\n return Math.hypot(\n touches[0].clientX - touches[1].clientX,\n touches[0].clientY - touches[1].clientY,\n );\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\n\nexport function easeInOutQuad(t: number): number {\n tuiAssert.assert(\n 0 <= t && t <= 1,\n 'Input must be between 0 and 1 inclusive but received ',\n t,\n );\n\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n}\n","import {isPresent} from './is-present';\n\n/**\n * If the value is null or undefined, returns default value\n * @param value\n * @param fallback alternative fallback\n * @deprecated use nullish coalescing operator\n */\nexport function fallbackValue<T>(value: T | null | undefined, fallback: T): T {\n return isPresent(value) ? value : fallback;\n}\n","/**\n * Flattens two dimensional array and calculates resulting length\n *\n * @param array twi dimensional array\n */\nexport function flatLength(array: ReadonlyArray<readonly unknown[]>): number {\n return array.reduce((count, section) => count + section.length, 0);\n}\n","import {QueryList} from '@angular/core';\n\n/**\n * Extracts original array from {@link QueryList} rather than\n * creating a copy like {@link QueryList.toArray} does.\n * @param queryList\n * @returns original array from {@link QueryList}.\n */\nexport function getOriginalArrayFromQueryList<T>(queryList: QueryList<T>): readonly T[] {\n let array: readonly T[] = [];\n\n queryList.find((_item, _index, originalArray) => {\n array = originalArray;\n\n return true;\n });\n\n return array;\n}\n","import {TuiSwipeDirection} from '@taiga-ui/cdk/interfaces';\n\nexport function getSwipeDirection(deltaX: number, deltaY: number): TuiSwipeDirection {\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\n return deltaY > 0 ? 'top' : 'bottom';\n } else {\n return deltaX > 0 ? 'left' : 'right';\n }\n}\n","/**\n * @deprecated: use identity from rxjs\n */\nexport function identity<T>(item: T): T {\n return item;\n}\n","export function isElementEditable(element: HTMLElement): boolean {\n // TODO: iframe warning\n return (\n (element instanceof HTMLInputElement && !element.readOnly) ||\n (element instanceof HTMLTextAreaElement && !element.readOnly) ||\n element.isContentEditable\n );\n}\n","export function isNumber(value: unknown): value is number {\n return typeof value === 'number';\n}\n","import {AbstractControl, FormArray, FormGroup} from '@angular/forms';\n\nexport function markControlAsTouchedAndValidate(control: AbstractControl) {\n if (control instanceof FormArray) {\n control.controls.forEach(nestedControl => {\n markControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n if (control instanceof FormGroup) {\n Object.values(control.controls).forEach(nestedControl => {\n markControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n control.markAsTouched();\n control.updateValueAndValidity();\n}\n","import {TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\n/**\n * Checks identity for nullable elements.\n *\n * @param a element a\n * @param b element b\n * @param handler called if both elements are not null\n * @return true if either both are null or they pass identity handler\n */\nexport function nullableSame<T>(\n a: T | null,\n b: T | null,\n handler: TuiIdentityMatcher<T>,\n): boolean {\n if (a === null) {\n return b === null;\n }\n\n if (b === null) {\n return false;\n }\n\n return handler(a, b);\n}\n","export function uniqBy<T extends object>(\n array: readonly T[],\n key: keyof T,\n): readonly T[] {\n return Array.from(\n array\n .reduce(\n (map, item) => (map.has(item[key]) ? map : map.set(item[key], item)),\n new Map<T[keyof T], T>(),\n )\n .values(),\n );\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { TuiDialog, TuiMapper } from '@taiga-ui/cdk/types';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export declare class TuiAlertHostComponent<T extends TuiDialog<unknown, unknown>> {
|
|
5
|
+
readonly alerts: Observable<readonly T[]>[];
|
|
6
|
+
private readonly injector;
|
|
7
|
+
constructor(alerts: Observable<readonly T[]>[], injector: Injector);
|
|
8
|
+
readonly mapper: TuiMapper<any, Injector>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"main": "../../bundles/taiga-ui-cdk-components-alert-host.umd.js",
|
|
3
|
+
"module": "../../fesm5/taiga-ui-cdk-components-alert-host.js",
|
|
4
|
+
"es2015": "../../fesm2015/taiga-ui-cdk-components-alert-host.js",
|
|
5
|
+
"esm5": "../../esm5/components/alert-host/taiga-ui-cdk-components-alert-host.js",
|
|
6
|
+
"esm2015": "../../esm2015/components/alert-host/taiga-ui-cdk-components-alert-host.js",
|
|
7
|
+
"fesm5": "../../fesm5/taiga-ui-cdk-components-alert-host.js",
|
|
8
|
+
"fesm2015": "../../fesm2015/taiga-ui-cdk-components-alert-host.js",
|
|
9
|
+
"typings": "taiga-ui-cdk-components-alert-host.d.ts",
|
|
10
|
+
"metadata": "taiga-ui-cdk-components-alert-host.metadata.json",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"name": "@taiga-ui/cdk/components/alert-host"
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"TuiAlertHostComponent":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":14,"character":1},"arguments":[{"selector":"tui-alert-host","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":18,"character":21},"member":"OnPush"},"animations":[{"__symbolic":"reference","module":"@taiga-ui/cdk/constants","name":"TUI_PARENT_ANIMATION","line":19,"character":17}],"encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":20,"character":19},"member":"None"},"template":"<div\n *ngFor=\"let alert$ of alerts\"\n class=\"t-notifications-wrapper\"\n @tuiParentAnimation\n>\n <ng-container\n *ngFor=\"let item of alert$ | async\"\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper : mapper\"\n ></ng-container>\n</div>\n","styles":["tui-alert-host>.t-notifications-wrapper{position:fixed;top:0;left:0;display:flex;width:100%;height:100%;flex-direction:column;pointer-events:none}tui-alert-host>.t-notifications-wrapper>*{pointer-events:auto}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":24,"character":9},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/cdk/tokens","name":"TUI_ALERTS","line":24,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":25,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"INJECTOR","line":25,"character":16}]}]],"parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":24,"character":56,"module":"./alert-host.component"}]}]},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":25,"character":53}]}]}},"TuiAlertHostModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":14},{"__symbolic":"reference","module":"@taiga-ui/cdk/pipes","name":"TuiMapperPipeModule","line":7,"character":28}],"declarations":[{"__symbolic":"reference","name":"TuiAlertHostComponent"}],"exports":[{"__symbolic":"reference","name":"TuiAlertHostComponent"}]}]}],"members":{}}},"origins":{"TuiAlertHostComponent":"./alert-host.component","TuiAlertHostModule":"./alert-host.module"},"importAs":"@taiga-ui/cdk/components/alert-host"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"TUI_DIALOG_CLOSES_ON_BACK":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"TUI_DIALOG_CLOSES_ON_BACK":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":9,"character":45},"arguments":["Is closing dialog on browser backward navigation enabled",{"__symbolic":"error","message":"Lambda not supported","line":12,"character":17,"module":"./dialog-host.component"}]},"FAKE_HISTORY_STATE":{"label":"ignoreMe"},"isFakeHistoryState":{"__symbolic":"error","message":"Lambda not supported","line":19,"character":34,"module":"./dialog-host.component"},"TuiDialogHostComponent":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":25,"character":1},"arguments":[{"selector":"tui-dialog-host","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":29,"character":21},"member":"OnPush"},"animations":[{"__symbolic":"reference","module":"@taiga-ui/cdk/constants","name":"TUI_PARENT_ANIMATION","line":30,"character":17}],"template":"<ng-container *ngIf=\"dialogs$ | async as dialogs\">\n <section\n *ngFor=\"let item of dialogs\"\n polymorpheus-outlet\n tuiFocusTrap\n tuiScrollRef\n tuiOverscroll=\"all\"\n role=\"dialog\"\n aria-modal=\"true\"\n class=\"dialog\"\n @tuiParentAnimation\n [attr.aria-labelledby]=\"item.id\"\n [content]=\"item.component\"\n [context]=\"item\"\n ></section>\n <div\n *tuiLet=\"isDialogClosesOnBack$ | async as isDialogClosesOnBack\"\n class=\"overlay\"\n [class.overlay_visible]=\"dialogs.length\"\n (window:popstate)=\"closeLast(dialogs, isDialogClosesOnBack)\"\n (transitionend)=\"onDialog($event, !!dialogs.length, isDialogClosesOnBack)\"\n ></div>\n</ng-container>\n","styles":[":host{position:fixed;left:0;bottom:0;width:100%;height:0}.dialog,.overlay{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:flex-start;outline:0;overflow:auto;overflow:overlay}.dialog{bottom:auto;height:100%}.overlay{height:100vh;pointer-events:none;touch-action:none;opacity:0;letter-spacing:normal;transition:opacity var(--tui-duration),letter-spacing 10ms;background:rgba(0,0,0,.75)}.overlay_visible{opacity:1;letter-spacing:1px}.dialog:last-of-type{z-index:1}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":42,"character":9},"arguments":[{"__symbolic":"reference","name":"TUI_DIALOG_CLOSES_ON_BACK"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":44,"character":9},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/cdk/tokens","name":"TUI_DIALOGS","line":44,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":45,"character":9},"arguments":[{"__symbolic":"reference","module":"@ng-web-apis/common","name":"HISTORY","line":45,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":46,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"Title","line":46,"character":16}]}]],"parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":44,"character":72,"module":"./dialog-host.component"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":44,"character":72,"module":"./dialog-host.component"}]}]},{"__symbolic":"error","message":"Could not resolve type","line":45,"character":54,"context":{"typeName":"History"},"module":"./dialog-host.component"},{"__symbolic":"reference","module":"@angular/platform-browser","name":"Title","line":46,"character":54}]}],"closeLast":[{"__symbolic":"method"}],"onDialog":[{"__symbolic":"method"}]}},"TuiDialogHostModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":9,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":11,"character":8},{"__symbolic":"reference","module":"@tinkoff/ng-polymorpheus","name":"PolymorpheusModule","line":12,"character":8},{"__symbolic":"reference","module":"@taiga-ui/cdk/directives/overscroll","name":"TuiOverscrollModule","line":13,"character":8},{"__symbolic":"reference","module":"@taiga-ui/cdk/directives/focus-trap","name":"TuiFocusTrapModule","line":14,"character":8},{"__symbolic":"reference","module":"@taiga-ui/cdk/directives","name":"TuiLetModule","line":15,"character":8}],"declarations":[{"__symbolic":"reference","name":"TuiDialogHostComponent"}],"exports":[{"__symbolic":"reference","name":"TuiDialogHostComponent"}]}]}],"members":{}}},"origins":{"TUI_DIALOG_CLOSES_ON_BACK":"./dialog-host.component","FAKE_HISTORY_STATE":"./dialog-host.component","isFakeHistoryState":"./dialog-host.component","TuiDialogHostComponent":"./dialog-host.component","TuiDialogHostModule":"./dialog-host.module"},"importAs":"@taiga-ui/cdk/components/dialog-host"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"TuiDropdownHostComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@taiga-ui/cdk/abstract","name":"AbstractTuiPortalHostComponent","line":26,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":19,"character":1},"arguments":[{"selector":"tui-dropdown-host","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":23,"character":21},"member":"OnPush"},"providers":[{"provide":{"__symbolic":"reference","module":"@taiga-ui/cdk/abstract","name":"AbstractTuiPortalService","line":24,"character":26},"useExisting":{"__symbolic":"reference","module":"@taiga-ui/cdk/components/portal-host","name":"TuiPortalService","line":24,"character":65}}],"template":"<div
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"TuiDropdownHostComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@taiga-ui/cdk/abstract","name":"AbstractTuiPortalHostComponent","line":26,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":19,"character":1},"arguments":[{"selector":"tui-dropdown-host","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":23,"character":21},"member":"OnPush"},"providers":[{"provide":{"__symbolic":"reference","module":"@taiga-ui/cdk/abstract","name":"AbstractTuiPortalService","line":24,"character":26},"useExisting":{"__symbolic":"reference","module":"@taiga-ui/cdk/components/portal-host","name":"TuiPortalService","line":24,"character":65}}],"template":"<div\n #positionFixedOffset\n class=\"position-fixed-offset\"\n></div>\n<ng-content></ng-content>\n<ng-container #viewContainer></ng-container>\n","styles":[":host{position:relative;z-index:0;display:block;height:100%}:host:before{content:'';display:block;overflow:hidden}.position-fixed-offset{position:fixed;left:0;top:0;pointer-events:none;visibility:hidden;width:100%;height:100%}"]}]}],"members":{"positionFixedOffsetRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":27,"character":5},"arguments":["positionFixedOffset"]}]}],"fixedPositionOffset":[{"__symbolic":"method"}]}},"TuiDropdownHostModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"TuiDropdownHostComponent"}],"exports":[{"__symbolic":"reference","name":"TuiDropdownHostComponent"}]}]}],"members":{}}},"origins":{"TuiDropdownHostComponent":"./dropdown-host.component","TuiDropdownHostModule":"./dropdown-host.module"},"importAs":"@taiga-ui/cdk/components/dropdown-host"}
|
package/components/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"exports":[{"from":"@taiga-ui/cdk/components/dialog-host"},{"from":"@taiga-ui/cdk/components/dropdown-host"},{"from":"@taiga-ui/cdk/components/portal-host"}],"metadata":{},"origins":{},"importAs":"@taiga-ui/cdk/components"}
|
|
1
|
+
{"__symbolic":"module","version":4,"exports":[{"from":"@taiga-ui/cdk/components/alert-host"},{"from":"@taiga-ui/cdk/components/dialog-host"},{"from":"@taiga-ui/cdk/components/dropdown-host"},{"from":"@taiga-ui/cdk/components/portal-host"}],"metadata":{},"origins":{},"importAs":"@taiga-ui/cdk/components"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"ALWAYS_FALSE_HANDLER":{"__symbolic":"error","message":"Lambda not supported","line":3,"character":36,"module":"./always-false-handler"},"ALWAYS_TRUE_HANDLER":{"__symbolic":"error","message":"Lambda not supported","line":3,"character":35,"module":"./always-true-handler"},"CHROMIUM_EDGE_START_VERSION":79,"EMPTY_QUERY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"QueryList","line":8,"character":31}},"EMPTY_ARRAY":[],"EMPTY_FUNCTION":{"__symbolic":"error","message":"Lambda not supported","line":10,"character":40,"module":"./empty"},"EMPTY_VALIDATOR":{"__symbolic":"error","message":"Lambda not supported","line":12,"character":44,"module":"./empty"},"TUI_DEFAULT_MATCHER":{"__symbolic":"error","message":"Lambda not supported","line":10,"character":35,"module":"./matcher"},"TUI_STRICT_MATCHER":{"__symbolic":"error","message":"Lambda not supported","line":22,"character":34,"module":"./matcher"},"TUI_DEFAULT_IDENTITY_MATCHER":{"__symbolic":"error","message":"Lambda not supported","line":35,"character":73,"module":"./matcher"},"TUI_PARENT_ANIMATION":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":2,"character":36},"arguments":["tuiParentAnimation",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":3,"character":4},"arguments":["
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"ALWAYS_FALSE_HANDLER":{"__symbolic":"error","message":"Lambda not supported","line":3,"character":36,"module":"./always-false-handler"},"ALWAYS_TRUE_HANDLER":{"__symbolic":"error","message":"Lambda not supported","line":3,"character":35,"module":"./always-true-handler"},"CHROMIUM_EDGE_START_VERSION":79,"EMPTY_QUERY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"QueryList","line":8,"character":31}},"EMPTY_ARRAY":[],"EMPTY_FUNCTION":{"__symbolic":"error","message":"Lambda not supported","line":10,"character":40,"module":"./empty"},"EMPTY_VALIDATOR":{"__symbolic":"error","message":"Lambda not supported","line":12,"character":44,"module":"./empty"},"TUI_DEFAULT_MATCHER":{"__symbolic":"error","message":"Lambda not supported","line":10,"character":35,"module":"./matcher"},"TUI_STRICT_MATCHER":{"__symbolic":"error","message":"Lambda not supported","line":22,"character":34,"module":"./matcher"},"TUI_DEFAULT_IDENTITY_MATCHER":{"__symbolic":"error","message":"Lambda not supported","line":35,"character":73,"module":"./matcher"},"TUI_PARENT_ANIMATION":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":2,"character":36},"arguments":["tuiParentAnimation",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":3,"character":4},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":4,"character":8},"arguments":[{"overflow":"hidden"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"query","line":5,"character":8},"arguments":["@*",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animateChild","line":5,"character":21}}],{"optional":true}]}]]}]]},"POLLING_TIME":66.66666666666667,"TUI_DEFAULT_STRINGIFY":{"__symbolic":"error","message":"Lambda not supported","line":5,"character":60,"module":"./stringify"},"svgNodeFilter":{"__symbolic":"error","message":"Lambda not supported","line":2,"character":42,"module":"./svg-node-filter"},"CHAR_NO_BREAK_SPACE":" ","CHAR_EN_DASH":"–","CHAR_BULLET":"•","CHAR_ELLIPSIS":"…","CHAR_CURRENCY_SIGN":"¤","CHAR_ZERO_WIDTH_SPACE":""},"origins":{"ALWAYS_FALSE_HANDLER":"./always-false-handler","ALWAYS_TRUE_HANDLER":"./always-true-handler","CHROMIUM_EDGE_START_VERSION":"./browser","EMPTY_QUERY":"./empty","EMPTY_ARRAY":"./empty","EMPTY_FUNCTION":"./empty","EMPTY_VALIDATOR":"./empty","TUI_DEFAULT_MATCHER":"./matcher","TUI_STRICT_MATCHER":"./matcher","TUI_DEFAULT_IDENTITY_MATCHER":"./matcher","TUI_PARENT_ANIMATION":"./parent-animation","POLLING_TIME":"./polling-time","TUI_DEFAULT_STRINGIFY":"./stringify","svgNodeFilter":"./svg-node-filter","CHAR_NO_BREAK_SPACE":"./unicode-chars","CHAR_EN_DASH":"./unicode-chars","CHAR_BULLET":"./unicode-chars","CHAR_ELLIPSIS":"./unicode-chars","CHAR_CURRENCY_SIGN":"./unicode-chars","CHAR_ZERO_WIDTH_SPACE":"./unicode-chars"},"importAs":"@taiga-ui/cdk/constants"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="resize-observer-browser" />
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
export declare class TuiResizeDirective {
|
|
4
|
-
readonly tuiResize: Observable<
|
|
5
|
-
constructor(tuiResize: Observable<
|
|
4
|
+
readonly tuiResize: Observable<readonly ResizeObserverEntry[]>;
|
|
5
|
+
constructor(tuiResize: Observable<readonly ResizeObserverEntry[]>);
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"TuiResizeDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[tuiResize]","outputs":["tuiResize"],"providers":[{"__symbolic":"reference","module":"@taiga-ui/cdk/services","name":"TuiDestroyService","line":8,"character":16},{"__symbolic":"reference","module":"@taiga-ui/cdk/services","name":"TuiResizeService","line":8,"character":35}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":12,"character":9},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/cdk/services","name":"TuiResizeService","line":12,"character":16}]}]],"parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"error","message":"
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"TuiResizeDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[tuiResize]","outputs":["tuiResize"],"providers":[{"__symbolic":"reference","module":"@taiga-ui/cdk/services","name":"TuiDestroyService","line":8,"character":16},{"__symbolic":"reference","module":"@taiga-ui/cdk/services","name":"TuiResizeService","line":8,"character":35}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":12,"character":9},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/cdk/services","name":"TuiResizeService","line":12,"character":16}]}]],"parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":13,"character":39,"module":"./resize.directive"}]}]}]}},"TuiResizeModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"TuiResizeDirective"}],"exports":[{"__symbolic":"reference","name":"TuiResizeDirective"}]}]}],"members":{}}},"origins":{"TuiResizeDirective":"./resize.directive","TuiResizeModule":"./resize.module"},"importAs":"@taiga-ui/cdk/directives/resize"}
|
|
@@ -31,4 +31,4 @@ AbstractTuiDialogService = __decorate([
|
|
|
31
31
|
__param(0, Inject(TuiIdService))
|
|
32
32
|
], AbstractTuiDialogService);
|
|
33
33
|
export { AbstractTuiDialogService };
|
|
34
|
-
//# sourceMappingURL=data:application/json;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6IFBvbHltb3JwaGV1c0NvbnRlbnQ8VHVpQmFzZURpYWxvZ0NvbnRleHQ8Rz4gJiBUPixcbiAgICAgICAgb3B0aW9uczogUGFydGlhbDxUPiA9IHt9LFxuICAgICk6IE9ic2VydmFibGU8Rz4ge1xuICAgICAgICByZXR1cm4gbmV3IE9ic2VydmFibGUob2JzZXJ2ZXIgPT4ge1xuICAgICAgICAgICAgY29uc3QgY29tcGxldGVXaXRoID0gKHJlc3VsdDogRykgPT4ge1xuICAgICAgICAgICAgICAgIG9ic2VydmVyLm5leHQocmVzdWx0KTtcbiAgICAgICAgICAgICAgICBvYnNlcnZlci5jb21wbGV0ZSgpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNvbnN0IGRpYWxvZyA9IHtcbiAgICAgICAgICAgICAgICAuLi50aGlzLmRlZmF1bHRPcHRpb25zLFxuICAgICAgICAgICAgICAgIC4uLm9wdGlvbnMsXG4gICAgICAgICAgICAgICAgY29udGVudCxcbiAgICAgICAgICAgICAgICBjb21wbGV0ZVdpdGgsXG4gICAgICAgICAgICAgICAgJGltcGxpY2l0OiBvYnNlcnZlcixcbiAgICAgICAgICAgICAgICBjb21wb25lbnQ6IHRoaXMuY29tcG9uZW50LFxuICAgICAgICAgICAgICAgIGNyZWF0ZWRBdDogRGF0ZS5ub3coKSxcbiAgICAgICAgICAgICAgICBpZDogdGhpcy5pZFNlcnZpY2UuZ2VuZXJhdGUoKSxcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMuZGlhbG9ncyQubmV4dChbLi4udGhpcy5kaWFsb2dzJC52YWx1ZSwgZGlhbG9nXSk7XG5cbiAgICAgICAgICAgIHJldHVybiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5kaWFsb2dzJC5uZXh0KHRoaXMuZGlhbG9ncyQudmFsdWUuZmlsdGVyKGl0ZW0gPT4gaXRlbSAhPT0gZGlhbG9nKSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9KTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -13,4 +13,4 @@ AbstractTuiMultipleControl = __decorate([
|
|
|
13
13
|
Directive()
|
|
14
14
|
], AbstractTuiMultipleControl);
|
|
15
15
|
export { AbstractTuiMultipleControl };
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGlwbGUtY29udHJvbC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B0YWlnYS11aS9jZGsvYWJzdHJhY3QvIiwic291cmNlcyI6WyJtdWx0aXBsZS1jb250cm9sLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRXhDLE9BQU8sRUFBQyxrQkFBa0IsRUFBQyxNQUFNLFdBQVcsQ0FBQztBQUc3QyxJQUFzQiwwQkFBMEIsR0FBaEQsTUFBc0IsMEJBQThCLFNBQVEsa0JBRTNEO0lBQ0csS0FBSztRQUNELElBQUksQ0FBQyxXQUFXLENBQUMsRUFBRSxDQUFDLENBQUM7SUFDekIsQ0FBQztJQUVTLGdCQUFnQjtRQUN0QixPQUFPLEVBQUUsQ0FBQztJQUNkLENBQUM7Q0FDSixDQUFBO0FBVnFCLDBCQUEwQjtJQUQvQyxTQUFTLEVBQUU7R0FDVSwwQkFBMEIsQ0FVL0M7U0FWcUIsMEJBQTBCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtEaXJlY3RpdmV9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5pbXBvcnQge0Fic3RyYWN0VHVpQ29udHJvbH0gZnJvbSAnLi9jb250cm9sJztcblxuQERpcmVjdGl2ZSgpXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgQWJzdHJhY3RUdWlNdWx0aXBsZUNvbnRyb2w8VD4gZXh0ZW5kcyBBYnN0cmFjdFR1aUNvbnRyb2w8XG4gICAgcmVhZG9ubHkgVFtdXG4+IHtcbiAgICBjbGVhcigpIHtcbiAgICAgICAgdGhpcy51cGRhdGVWYWx1ZShbXSk7XG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIGdldEZhbGxiYWNrVmFsdWUoKTogcmVhZG9ubHkgVFtdIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __decorate, __param } from "tslib";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Inject, INJECTOR, Injector, ViewEncapsulation, } from '@angular/core';
|
|
3
|
+
import { TUI_PARENT_ANIMATION } from '@taiga-ui/cdk/constants';
|
|
4
|
+
import { TUI_ALERTS } from '@taiga-ui/cdk/tokens';
|
|
5
|
+
import { POLYMORPHEUS_CONTEXT } from '@tinkoff/ng-polymorpheus';
|
|
6
|
+
let TuiAlertHostComponent = class TuiAlertHostComponent {
|
|
7
|
+
constructor(alerts, injector) {
|
|
8
|
+
this.alerts = alerts;
|
|
9
|
+
this.injector = injector;
|
|
10
|
+
this.mapper = useValue => Injector.create({
|
|
11
|
+
providers: [
|
|
12
|
+
{
|
|
13
|
+
provide: POLYMORPHEUS_CONTEXT,
|
|
14
|
+
useValue,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
parent: this.injector,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
TuiAlertHostComponent.ctorParameters = () => [
|
|
22
|
+
{ type: Array, decorators: [{ type: Inject, args: [TUI_ALERTS,] }] },
|
|
23
|
+
{ type: Injector, decorators: [{ type: Inject, args: [INJECTOR,] }] }
|
|
24
|
+
];
|
|
25
|
+
TuiAlertHostComponent = __decorate([
|
|
26
|
+
Component({
|
|
27
|
+
selector: 'tui-alert-host',
|
|
28
|
+
template: "<div\n *ngFor=\"let alert$ of alerts\"\n class=\"t-notifications-wrapper\"\n @tuiParentAnimation\n>\n <ng-container\n *ngFor=\"let item of alert$ | async\"\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper : mapper\"\n ></ng-container>\n</div>\n",
|
|
29
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
30
|
+
animations: [TUI_PARENT_ANIMATION],
|
|
31
|
+
encapsulation: ViewEncapsulation.None,
|
|
32
|
+
styles: ["tui-alert-host>.t-notifications-wrapper{position:fixed;top:0;left:0;display:flex;width:100%;height:100%;flex-direction:column;pointer-events:none}tui-alert-host>.t-notifications-wrapper>*{pointer-events:auto}"]
|
|
33
|
+
}),
|
|
34
|
+
__param(0, Inject(TUI_ALERTS)),
|
|
35
|
+
__param(1, Inject(INJECTOR))
|
|
36
|
+
], TuiAlertHostComponent);
|
|
37
|
+
export { TuiAlertHostComponent };
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtaG9zdC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY2RrL2NvbXBvbmVudHMvYWxlcnQtaG9zdC8iLCJzb3VyY2VzIjpbImFsZXJ0LWhvc3QuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQ0gsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxNQUFNLEVBQ04sUUFBUSxFQUNSLFFBQVEsRUFDUixpQkFBaUIsR0FDcEIsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFDLG9CQUFvQixFQUFDLE1BQU0seUJBQXlCLENBQUM7QUFDN0QsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBRWhELE9BQU8sRUFBQyxvQkFBb0IsRUFBQyxNQUFNLDBCQUEwQixDQUFDO0FBVzlELElBQWEscUJBQXFCLEdBQWxDLE1BQWEscUJBQXFC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cHBlcjxhbnksIEluamVjdG9yPiA9IHVzZVZhbHVlID0+XG4gICAgICAgIEluamVjdG9yLmNyZWF0ZSh7XG4gICAgICAgICAgICBwcm92aWRlcnM6IFtcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IFBPTFlNT1JQSEVVU19DT05URVhULFxuICAgICAgICAgICAgICAgICAgICB1c2VWYWx1ZSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIHBhcmVudDogdGhpcy5pbmplY3RvcixcbiAgICAgICAgfSk7XG59XG4iXX0=
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { NgModule } from '@angular/core';
|
|
4
|
+
import { TuiMapperPipeModule } from '@taiga-ui/cdk/pipes';
|
|
5
|
+
import { TuiAlertHostComponent } from './alert-host.component';
|
|
6
|
+
let TuiAlertHostModule = class TuiAlertHostModule {
|
|
7
|
+
};
|
|
8
|
+
TuiAlertHostModule = __decorate([
|
|
9
|
+
NgModule({
|
|
10
|
+
imports: [CommonModule, TuiMapperPipeModule],
|
|
11
|
+
declarations: [TuiAlertHostComponent],
|
|
12
|
+
exports: [TuiAlertHostComponent],
|
|
13
|
+
})
|
|
14
|
+
], TuiAlertHostModule);
|
|
15
|
+
export { TuiAlertHostModule };
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtaG9zdC5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY2RrL2NvbXBvbmVudHMvYWxlcnQtaG9zdC8iLCJzb3VyY2VzIjpbImFsZXJ0LWhvc3QubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0saUJBQWlC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1,3 @@
|
|
|
1
|
+
export * from './alert-host.component';
|
|
2
|
+
export * from './alert-host.module';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY2RrL2NvbXBvbmVudHMvYWxlcnQtaG9zdC8iLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyxxQkFBcUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vYWxlcnQtaG9zdC5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9hbGVydC1ob3N0Lm1vZHVsZSc7XG4iXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpZ2EtdWktY2RrLWNvbXBvbmVudHMtYWxlcnQtaG9zdC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B0YWlnYS11aS9jZGsvY29tcG9uZW50cy9hbGVydC1ob3N0LyIsInNvdXJjZXMiOlsidGFpZ2EtdWktY2RrLWNvbXBvbmVudHMtYWxlcnQtaG9zdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { __decorate, __param } from "tslib";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, Inject,
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Inject, InjectionToken } from '@angular/core';
|
|
3
3
|
import { Title } from '@angular/platform-browser';
|
|
4
|
-
import { HISTORY
|
|
4
|
+
import { HISTORY } from '@ng-web-apis/common';
|
|
5
5
|
import { TUI_PARENT_ANIMATION } from '@taiga-ui/cdk/constants';
|
|
6
6
|
import { TUI_DIALOGS } from '@taiga-ui/cdk/tokens';
|
|
7
|
-
import { isInsideIframe } from '@taiga-ui/cdk/utils';
|
|
8
7
|
import { combineLatest, Observable, of } from 'rxjs';
|
|
9
8
|
import { map } from 'rxjs/operators';
|
|
10
9
|
export const TUI_DIALOG_CLOSES_ON_BACK = new InjectionToken('Is closing dialog on browser backward navigation enabled', {
|
|
11
|
-
|
|
12
|
-
* TODO enable this feature for iframes too
|
|
13
|
-
* when the legacy frame manager (with an iframe inside) will be removed on all internal projects
|
|
14
|
-
*/
|
|
15
|
-
factory: () => of(!isInsideIframe(inject(WINDOW))),
|
|
10
|
+
factory: () => of(false),
|
|
16
11
|
});
|
|
17
12
|
// TODO: remove in ivy compilation
|
|
18
13
|
export const FAKE_HISTORY_STATE = { label: 'ignoreMe' };
|
|
@@ -63,7 +58,7 @@ TuiDialogHostComponent.ctorParameters = () => [
|
|
|
63
58
|
TuiDialogHostComponent = __decorate([
|
|
64
59
|
Component({
|
|
65
60
|
selector: 'tui-dialog-host',
|
|
66
|
-
template: "<ng-container *ngIf=\"dialogs$ | async as dialogs\">\n <section\n *ngFor=\"let item of dialogs\"\n polymorpheus-outlet\n tuiFocusTrap\n tuiScrollRef\n tuiOverscroll=\"all\"\n role=\"dialog\"\n aria-modal=\"true\"\n class=\"dialog\"\n
|
|
61
|
+
template: "<ng-container *ngIf=\"dialogs$ | async as dialogs\">\n <section\n *ngFor=\"let item of dialogs\"\n polymorpheus-outlet\n tuiFocusTrap\n tuiScrollRef\n tuiOverscroll=\"all\"\n role=\"dialog\"\n aria-modal=\"true\"\n class=\"dialog\"\n @tuiParentAnimation\n [attr.aria-labelledby]=\"item.id\"\n [content]=\"item.component\"\n [context]=\"item\"\n ></section>\n <div\n *tuiLet=\"isDialogClosesOnBack$ | async as isDialogClosesOnBack\"\n class=\"overlay\"\n [class.overlay_visible]=\"dialogs.length\"\n (window:popstate)=\"closeLast(dialogs, isDialogClosesOnBack)\"\n (transitionend)=\"onDialog($event, !!dialogs.length, isDialogClosesOnBack)\"\n ></div>\n</ng-container>\n",
|
|
67
62
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
68
63
|
animations: [TUI_PARENT_ANIMATION],
|
|
69
64
|
styles: [":host{position:fixed;left:0;bottom:0;width:100%;height:0}.dialog,.overlay{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:flex-start;outline:0;overflow:auto;overflow:overlay}.dialog{bottom:auto;height:100%}.overlay{height:100vh;pointer-events:none;touch-action:none;opacity:0;letter-spacing:normal;transition:opacity var(--tui-duration),letter-spacing 10ms;background:rgba(0,0,0,.75)}.overlay_visible{opacity:1;letter-spacing:1px}.dialog:last-of-type{z-index:1}"]
|
|
@@ -74,4 +69,4 @@ TuiDialogHostComponent = __decorate([
|
|
|
74
69
|
__param(3, Inject(Title))
|
|
75
70
|
], TuiDialogHostComponent);
|
|
76
71
|
export { TuiDialogHostComponent };
|
|
77
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
72
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLWhvc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHRhaWdhLXVpL2Nkay9jb21wb25lbnRzL2RpYWxvZy1ob3N0LyIsInNvdXJjZXMiOlsiZGlhbG9nLWhvc3QuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLE1BQ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