@kato-lee/cdk 14.2.7
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/LICENSE +21 -0
- package/README.md +8 -0
- package/_index.scss +8 -0
- package/a11y/_index.import.scss +2 -0
- package/a11y/_index.scss +102 -0
- package/a11y/index.d.ts +1212 -0
- package/a11y-prebuilt.css +1 -0
- package/accordion/index.d.ts +140 -0
- package/bidi/index.d.ts +80 -0
- package/clipboard/index.d.ts +115 -0
- package/coercion/index.d.ts +67 -0
- package/collections/index.d.ts +374 -0
- package/dialog/index.d.ts +469 -0
- package/drag-drop/index.d.ts +1614 -0
- package/esm2020/a11y/a11y-module.mjs +32 -0
- package/esm2020/a11y/a11y_public_index.mjs +5 -0
- package/esm2020/a11y/aria-describer/aria-describer.mjs +232 -0
- package/esm2020/a11y/aria-describer/aria-reference.mjs +44 -0
- package/esm2020/a11y/fake-event-detection.mjs +31 -0
- package/esm2020/a11y/focus-monitor/focus-monitor.mjs +451 -0
- package/esm2020/a11y/focus-trap/configurable-focus-trap-config.mjs +9 -0
- package/esm2020/a11y/focus-trap/configurable-focus-trap-factory.mjs +53 -0
- package/esm2020/a11y/focus-trap/configurable-focus-trap.mjs +51 -0
- package/esm2020/a11y/focus-trap/event-listener-inert-strategy.mjs +61 -0
- package/esm2020/a11y/focus-trap/focus-trap-inert-strategy.mjs +11 -0
- package/esm2020/a11y/focus-trap/focus-trap-manager.mjs +53 -0
- package/esm2020/a11y/focus-trap/focus-trap.mjs +402 -0
- package/esm2020/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +109 -0
- package/esm2020/a11y/index.mjs +9 -0
- package/esm2020/a11y/input-modality/input-modality-detector.mjs +176 -0
- package/esm2020/a11y/interactivity-checker/interactivity-checker.mjs +238 -0
- package/esm2020/a11y/key-manager/activedescendant-key-manager.mjs +20 -0
- package/esm2020/a11y/key-manager/focus-key-manager.mjs +29 -0
- package/esm2020/a11y/key-manager/list-key-manager.mjs +321 -0
- package/esm2020/a11y/live-announcer/live-announcer-tokens.mjs +19 -0
- package/esm2020/a11y/live-announcer/live-announcer.mjs +178 -0
- package/esm2020/a11y/public-api.mjs +26 -0
- package/esm2020/accordion/accordion-item.mjs +167 -0
- package/esm2020/accordion/accordion-module.mjs +24 -0
- package/esm2020/accordion/accordion.mjs +70 -0
- package/esm2020/accordion/accordion_public_index.mjs +5 -0
- package/esm2020/accordion/index.mjs +9 -0
- package/esm2020/accordion/public-api.mjs +11 -0
- package/esm2020/bidi/bidi-module.mjs +23 -0
- package/esm2020/bidi/bidi_public_index.mjs +5 -0
- package/esm2020/bidi/dir-document-token.mjs +33 -0
- package/esm2020/bidi/dir.mjs +69 -0
- package/esm2020/bidi/directionality.mjs +52 -0
- package/esm2020/bidi/index.mjs +9 -0
- package/esm2020/bidi/public-api.mjs +12 -0
- package/esm2020/clipboard/clipboard-module.mjs +23 -0
- package/esm2020/clipboard/clipboard.mjs +53 -0
- package/esm2020/clipboard/clipboard_public_index.mjs +5 -0
- package/esm2020/clipboard/copy-to-clipboard.mjs +99 -0
- package/esm2020/clipboard/index.mjs +9 -0
- package/esm2020/clipboard/pending-copy.mjs +69 -0
- package/esm2020/clipboard/public-api.mjs +12 -0
- package/esm2020/coercion/array.mjs +11 -0
- package/esm2020/coercion/boolean-property.mjs +12 -0
- package/esm2020/coercion/css-pixel-value.mjs +15 -0
- package/esm2020/coercion/element.mjs +16 -0
- package/esm2020/coercion/index.mjs +9 -0
- package/esm2020/coercion/number-property.mjs +21 -0
- package/esm2020/coercion/public-api.mjs +14 -0
- package/esm2020/coercion/string-array.mjs +38 -0
- package/esm2020/collections/array-data-source.mjs +21 -0
- package/esm2020/collections/collection-viewer.mjs +9 -0
- package/esm2020/collections/collections_public_index.mjs +5 -0
- package/esm2020/collections/data-source.mjs +19 -0
- package/esm2020/collections/dispose-view-repeater-strategy.mjs +47 -0
- package/esm2020/collections/index.mjs +9 -0
- package/esm2020/collections/public-api.mjs +17 -0
- package/esm2020/collections/recycle-view-repeater-strategy.mjs +128 -0
- package/esm2020/collections/selection-model.mjs +216 -0
- package/esm2020/collections/tree-adapter.mjs +9 -0
- package/esm2020/collections/unique-selection-dispatcher.mjs +55 -0
- package/esm2020/collections/view-repeater.mjs +14 -0
- package/esm2020/dialog/dialog-config.mjs +63 -0
- package/esm2020/dialog/dialog-container.mjs +278 -0
- package/esm2020/dialog/dialog-injectors.mjs +26 -0
- package/esm2020/dialog/dialog-module.mjs +42 -0
- package/esm2020/dialog/dialog-ref.mjs +76 -0
- package/esm2020/dialog/dialog.mjs +301 -0
- package/esm2020/dialog/dialog_public_index.mjs +5 -0
- package/esm2020/dialog/index.mjs +9 -0
- package/esm2020/dialog/public-api.mjs +14 -0
- package/esm2020/drag-drop/directives/assertions.mjs +18 -0
- package/esm2020/drag-drop/directives/config.mjs +14 -0
- package/esm2020/drag-drop/directives/drag-handle.mjs +66 -0
- package/esm2020/drag-drop/directives/drag-placeholder.mjs +36 -0
- package/esm2020/drag-drop/directives/drag-preview.mjs +47 -0
- package/esm2020/drag-drop/directives/drag.mjs +487 -0
- package/esm2020/drag-drop/directives/drop-list-group.mjs +53 -0
- package/esm2020/drag-drop/directives/drop-list.mjs +345 -0
- package/esm2020/drag-drop/dom/client-rect.mjs +64 -0
- package/esm2020/drag-drop/dom/clone-node.mjs +65 -0
- package/esm2020/drag-drop/dom/parent-position-tracker.mjs +76 -0
- package/esm2020/drag-drop/dom/styling.mjs +69 -0
- package/esm2020/drag-drop/dom/transition-duration.mjs +36 -0
- package/esm2020/drag-drop/drag-drop-module.mjs +57 -0
- package/esm2020/drag-drop/drag-drop-registry.mjs +231 -0
- package/esm2020/drag-drop/drag-drop.mjs +57 -0
- package/esm2020/drag-drop/drag-drop_public_index.mjs +5 -0
- package/esm2020/drag-drop/drag-events.mjs +9 -0
- package/esm2020/drag-drop/drag-parent.mjs +16 -0
- package/esm2020/drag-drop/drag-ref.mjs +1146 -0
- package/esm2020/drag-drop/drag-utils.mjs +60 -0
- package/esm2020/drag-drop/drop-list-ref.mjs +577 -0
- package/esm2020/drag-drop/index.mjs +9 -0
- package/esm2020/drag-drop/public-api.mjs +23 -0
- package/esm2020/drag-drop/sorting/drop-list-sort-strategy.mjs +9 -0
- package/esm2020/drag-drop/sorting/single-axis-sort-strategy.mjs +341 -0
- package/esm2020/index.mjs +9 -0
- package/esm2020/keycodes/index.mjs +9 -0
- package/esm2020/keycodes/keycodes.mjs +127 -0
- package/esm2020/keycodes/keycodes_public_index.mjs +5 -0
- package/esm2020/keycodes/modifiers.mjs +18 -0
- package/esm2020/keycodes/public-api.mjs +10 -0
- package/esm2020/layout/breakpoints-observer.mjs +105 -0
- package/esm2020/layout/breakpoints.mjs +29 -0
- package/esm2020/layout/index.mjs +9 -0
- package/esm2020/layout/layout-module.mjs +19 -0
- package/esm2020/layout/layout_public_index.mjs +5 -0
- package/esm2020/layout/media-matcher.mjs +85 -0
- package/esm2020/layout/public-api.mjs +12 -0
- package/esm2020/listbox/index.mjs +9 -0
- package/esm2020/listbox/listbox-module.mjs +24 -0
- package/esm2020/listbox/listbox.mjs +872 -0
- package/esm2020/listbox/listbox_public_index.mjs +5 -0
- package/esm2020/listbox/public-api.mjs +10 -0
- package/esm2020/menu/context-menu-trigger.mjs +212 -0
- package/esm2020/menu/index.mjs +9 -0
- package/esm2020/menu/menu-aim.mjs +203 -0
- package/esm2020/menu/menu-bar.mjs +133 -0
- package/esm2020/menu/menu-base.mjs +187 -0
- package/esm2020/menu/menu-errors.mjs +22 -0
- package/esm2020/menu/menu-group.mjs +30 -0
- package/esm2020/menu/menu-interface.mjs +11 -0
- package/esm2020/menu/menu-item-checkbox.mjs +49 -0
- package/esm2020/menu/menu-item-radio.mjs +71 -0
- package/esm2020/menu/menu-item-selectable.mjs +42 -0
- package/esm2020/menu/menu-item.mjs +267 -0
- package/esm2020/menu/menu-module.mjs +62 -0
- package/esm2020/menu/menu-stack.mjs +156 -0
- package/esm2020/menu/menu-trigger-base.mjs +107 -0
- package/esm2020/menu/menu-trigger.mjs +291 -0
- package/esm2020/menu/menu.mjs +134 -0
- package/esm2020/menu/menu_public_index.mjs +5 -0
- package/esm2020/menu/pointer-focus-tracker.mjs +51 -0
- package/esm2020/menu/public-api.mjs +24 -0
- package/esm2020/observers/index.mjs +9 -0
- package/esm2020/observers/observe-content.mjs +187 -0
- package/esm2020/observers/observers_public_index.mjs +5 -0
- package/esm2020/observers/public-api.mjs +9 -0
- package/esm2020/overlay/dispatchers/base-overlay-dispatcher.mjs +52 -0
- package/esm2020/overlay/dispatchers/index.mjs +10 -0
- package/esm2020/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +81 -0
- package/esm2020/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +138 -0
- package/esm2020/overlay/fullscreen-overlay-container.mjs +94 -0
- package/esm2020/overlay/index.mjs +9 -0
- package/esm2020/overlay/overlay-config.mjs +45 -0
- package/esm2020/overlay/overlay-container.mjs +81 -0
- package/esm2020/overlay/overlay-directives.mjs +427 -0
- package/esm2020/overlay/overlay-module.mjs +29 -0
- package/esm2020/overlay/overlay-ref.mjs +427 -0
- package/esm2020/overlay/overlay-reference.mjs +9 -0
- package/esm2020/overlay/overlay.mjs +125 -0
- package/esm2020/overlay/overlay_public_index.mjs +5 -0
- package/esm2020/overlay/position/connected-position.mjs +88 -0
- package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +985 -0
- package/esm2020/overlay/position/global-position-strategy.mjs +237 -0
- package/esm2020/overlay/position/overlay-position-builder.mjs +50 -0
- package/esm2020/overlay/position/position-strategy.mjs +9 -0
- package/esm2020/overlay/position/scroll-clip.mjs +40 -0
- package/esm2020/overlay/public-api.mjs +22 -0
- package/esm2020/overlay/scroll/block-scroll-strategy.mjs +80 -0
- package/esm2020/overlay/scroll/close-scroll-strategy.mjs +61 -0
- package/esm2020/overlay/scroll/index.mjs +14 -0
- package/esm2020/overlay/scroll/noop-scroll-strategy.mjs +17 -0
- package/esm2020/overlay/scroll/reposition-scroll-strategy.mjs +61 -0
- package/esm2020/overlay/scroll/scroll-strategy-options.mjs +55 -0
- package/esm2020/overlay/scroll/scroll-strategy.mjs +14 -0
- package/esm2020/platform/features/input-types.mjs +59 -0
- package/esm2020/platform/features/passive-listeners.mjs +36 -0
- package/esm2020/platform/features/scrolling.mjs +85 -0
- package/esm2020/platform/features/shadow-dom.mjs +54 -0
- package/esm2020/platform/features/test-environment.mjs +24 -0
- package/esm2020/platform/index.mjs +9 -0
- package/esm2020/platform/platform-module.mjs +19 -0
- package/esm2020/platform/platform.mjs +85 -0
- package/esm2020/platform/platform_public_index.mjs +5 -0
- package/esm2020/platform/public-api.mjs +15 -0
- package/esm2020/portal/dom-portal-outlet.mjs +158 -0
- package/esm2020/portal/index.mjs +9 -0
- package/esm2020/portal/portal-directives.mjs +246 -0
- package/esm2020/portal/portal-errors.mjs +51 -0
- package/esm2020/portal/portal-injector.mjs +28 -0
- package/esm2020/portal/portal.mjs +188 -0
- package/esm2020/portal/portal_public_index.mjs +5 -0
- package/esm2020/portal/public-api.mjs +12 -0
- package/esm2020/public-api.mjs +9 -0
- package/esm2020/scrolling/fixed-size-virtual-scroll.mjs +217 -0
- package/esm2020/scrolling/index.mjs +9 -0
- package/esm2020/scrolling/public-api.mjs +20 -0
- package/esm2020/scrolling/scroll-dispatcher.mjs +163 -0
- package/esm2020/scrolling/scrollable.mjs +176 -0
- package/esm2020/scrolling/scrolling-module.mjs +67 -0
- package/esm2020/scrolling/scrolling_public_index.mjs +5 -0
- package/esm2020/scrolling/viewport-ruler.mjs +146 -0
- package/esm2020/scrolling/virtual-for-of.mjs +298 -0
- package/esm2020/scrolling/virtual-scroll-repeater.mjs +9 -0
- package/esm2020/scrolling/virtual-scroll-strategy.mjs +11 -0
- package/esm2020/scrolling/virtual-scroll-viewport.mjs +437 -0
- package/esm2020/scrolling/virtual-scrollable-element.mjs +41 -0
- package/esm2020/scrolling/virtual-scrollable-window.mjs +40 -0
- package/esm2020/scrolling/virtual-scrollable.mjs +40 -0
- package/esm2020/stepper/index.mjs +9 -0
- package/esm2020/stepper/public-api.mjs +13 -0
- package/esm2020/stepper/step-header.mjs +30 -0
- package/esm2020/stepper/step-label.mjs +23 -0
- package/esm2020/stepper/stepper-button.mjs +56 -0
- package/esm2020/stepper/stepper-module.mjs +40 -0
- package/esm2020/stepper/stepper.mjs +458 -0
- package/esm2020/stepper/stepper_public_index.mjs +5 -0
- package/esm2020/table/can-stick.mjs +44 -0
- package/esm2020/table/cell.mjs +217 -0
- package/esm2020/table/coalesced-style-scheduler.mjs +91 -0
- package/esm2020/table/index.mjs +9 -0
- package/esm2020/table/public-api.mjs +20 -0
- package/esm2020/table/row.mjs +262 -0
- package/esm2020/table/sticky-position-listener.mjs +11 -0
- package/esm2020/table/sticky-styler.mjs +345 -0
- package/esm2020/table/table-errors.mjs +67 -0
- package/esm2020/table/table-module.mjs +94 -0
- package/esm2020/table/table.mjs +1065 -0
- package/esm2020/table/table_public_index.mjs +5 -0
- package/esm2020/table/text-column.mjs +153 -0
- package/esm2020/table/tokens.mjs +16 -0
- package/esm2020/text-field/autofill.mjs +113 -0
- package/esm2020/text-field/autosize.mjs +309 -0
- package/esm2020/text-field/index.mjs +9 -0
- package/esm2020/text-field/public-api.mjs +11 -0
- package/esm2020/text-field/text-field-module.mjs +24 -0
- package/esm2020/text-field/text-field_public_index.mjs +5 -0
- package/esm2020/tree/control/base-tree-control.mjs +57 -0
- package/esm2020/tree/control/flat-tree-control.mjs +51 -0
- package/esm2020/tree/control/nested-tree-control.mjs +58 -0
- package/esm2020/tree/control/tree-control.mjs +2 -0
- package/esm2020/tree/index.mjs +9 -0
- package/esm2020/tree/nested-node.mjs +112 -0
- package/esm2020/tree/node.mjs +35 -0
- package/esm2020/tree/outlet.mjs +39 -0
- package/esm2020/tree/padding.mjs +131 -0
- package/esm2020/tree/public-api.mjs +20 -0
- package/esm2020/tree/toggle.mjs +50 -0
- package/esm2020/tree/tree-errors.mjs +43 -0
- package/esm2020/tree/tree-module.mjs +49 -0
- package/esm2020/tree/tree.mjs +347 -0
- package/esm2020/tree/tree_public_index.mjs +5 -0
- package/esm2020/version.mjs +11 -0
- package/fesm2015/a11y.mjs +2473 -0
- package/fesm2015/a11y.mjs.map +1 -0
- package/fesm2015/accordion.mjs +414 -0
- package/fesm2015/accordion.mjs.map +1 -0
- package/fesm2015/bidi.mjs +194 -0
- package/fesm2015/bidi.mjs.map +1 -0
- package/fesm2015/cdk.mjs +30 -0
- package/fesm2015/cdk.mjs.map +1 -0
- package/fesm2015/clipboard.mjs +263 -0
- package/fesm2015/clipboard.mjs.map +1 -0
- package/fesm2015/coercion.mjs +132 -0
- package/fesm2015/coercion.mjs.map +1 -0
- package/fesm2015/collections.mjs +519 -0
- package/fesm2015/collections.mjs.map +1 -0
- package/fesm2015/dialog.mjs +1050 -0
- package/fesm2015/dialog.mjs.map +1 -0
- package/fesm2015/drag-drop.mjs +3812 -0
- package/fesm2015/drag-drop.mjs.map +1 -0
- package/fesm2015/keycodes.mjs +167 -0
- package/fesm2015/keycodes.mjs.map +1 -0
- package/fesm2015/layout.mjs +337 -0
- package/fesm2015/layout.mjs.map +1 -0
- package/fesm2015/listbox.mjs +1200 -0
- package/fesm2015/listbox.mjs.map +1 -0
- package/fesm2015/menu.mjs +2719 -0
- package/fesm2015/menu.mjs.map +1 -0
- package/fesm2015/observers.mjs +326 -0
- package/fesm2015/observers.mjs.map +1 -0
- package/fesm2015/overlay.mjs +3137 -0
- package/fesm2015/overlay.mjs.map +1 -0
- package/fesm2015/platform.mjs +385 -0
- package/fesm2015/platform.mjs.map +1 -0
- package/fesm2015/portal.mjs +691 -0
- package/fesm2015/portal.mjs.map +1 -0
- package/fesm2015/scrolling.mjs +1558 -0
- package/fesm2015/scrolling.mjs.map +1 -0
- package/fesm2015/stepper.mjs +989 -0
- package/fesm2015/stepper.mjs.map +1 -0
- package/fesm2015/table.mjs +2356 -0
- package/fesm2015/table.mjs.map +1 -0
- package/fesm2015/testing.mjs +833 -0
- package/fesm2015/testing.mjs.map +1 -0
- package/fesm2015/text-field.mjs +461 -0
- package/fesm2015/text-field.mjs.map +1 -0
- package/fesm2015/tree.mjs +1303 -0
- package/fesm2015/tree.mjs.map +1 -0
- package/fesm2020/a11y.mjs +2476 -0
- package/fesm2020/a11y.mjs.map +1 -0
- package/fesm2020/accordion.mjs +414 -0
- package/fesm2020/accordion.mjs.map +1 -0
- package/fesm2020/bidi.mjs +192 -0
- package/fesm2020/bidi.mjs.map +1 -0
- package/fesm2020/cdk.mjs +30 -0
- package/fesm2020/cdk.mjs.map +1 -0
- package/fesm2020/clipboard.mjs +259 -0
- package/fesm2020/clipboard.mjs.map +1 -0
- package/fesm2020/coercion.mjs +132 -0
- package/fesm2020/coercion.mjs.map +1 -0
- package/fesm2020/collections.mjs +535 -0
- package/fesm2020/collections.mjs.map +1 -0
- package/fesm2020/dialog.mjs +787 -0
- package/fesm2020/dialog.mjs.map +1 -0
- package/fesm2020/drag-drop.mjs +3808 -0
- package/fesm2020/drag-drop.mjs.map +1 -0
- package/fesm2020/keycodes.mjs +167 -0
- package/fesm2020/keycodes.mjs.map +1 -0
- package/fesm2020/layout.mjs +337 -0
- package/fesm2020/layout.mjs.map +1 -0
- package/fesm2020/listbox.mjs +1164 -0
- package/fesm2020/listbox.mjs.map +1 -0
- package/fesm2020/menu.mjs +2615 -0
- package/fesm2020/menu.mjs.map +1 -0
- package/fesm2020/observers.mjs +325 -0
- package/fesm2020/observers.mjs.map +1 -0
- package/fesm2020/overlay.mjs +3145 -0
- package/fesm2020/overlay.mjs.map +1 -0
- package/fesm2020/platform.mjs +383 -0
- package/fesm2020/platform.mjs.map +1 -0
- package/fesm2020/portal.mjs +689 -0
- package/fesm2020/portal.mjs.map +1 -0
- package/fesm2020/scrolling.mjs +1591 -0
- package/fesm2020/scrolling.mjs.map +1 -0
- package/fesm2020/stepper.mjs +985 -0
- package/fesm2020/stepper.mjs.map +1 -0
- package/fesm2020/table.mjs +2348 -0
- package/fesm2020/table.mjs.map +1 -0
- package/fesm2020/testing.mjs +797 -0
- package/fesm2020/testing.mjs.map +1 -0
- package/fesm2020/text-field.mjs +459 -0
- package/fesm2020/text-field.mjs.map +1 -0
- package/fesm2020/tree.mjs +1305 -0
- package/fesm2020/tree.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/keycodes/index.d.ts +249 -0
- package/layout/index.d.ts +90 -0
- package/listbox/index.d.ts +419 -0
- package/menu/index.d.ts +1013 -0
- package/observers/index.d.ts +109 -0
- package/overlay/_index-deprecated.scss +13 -0
- package/overlay/_index.import.scss +13 -0
- package/overlay/_index.scss +152 -0
- package/overlay/index.d.ts +1343 -0
- package/overlay-prebuilt.css +1 -0
- package/package.json +232 -0
- package/platform/index.d.ts +106 -0
- package/portal/index.d.ts +328 -0
- package/scrolling/index.d.ts +849 -0
- package/stepper/index.d.ts +419 -0
- package/table/index.d.ts +1483 -0
- package/text-field/_index.import.scss +2 -0
- package/text-field/_index.scss +89 -0
- package/text-field/index.d.ts +203 -0
- package/text-field-prebuilt.css +1 -0
- package/tree/index.d.ts +593 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
const MAC_ENTER = 3;
|
|
9
|
+
const BACKSPACE = 8;
|
|
10
|
+
const TAB = 9;
|
|
11
|
+
const NUM_CENTER = 12;
|
|
12
|
+
const ENTER = 13;
|
|
13
|
+
const SHIFT = 16;
|
|
14
|
+
const CONTROL = 17;
|
|
15
|
+
const ALT = 18;
|
|
16
|
+
const PAUSE = 19;
|
|
17
|
+
const CAPS_LOCK = 20;
|
|
18
|
+
const ESCAPE = 27;
|
|
19
|
+
const SPACE = 32;
|
|
20
|
+
const PAGE_UP = 33;
|
|
21
|
+
const PAGE_DOWN = 34;
|
|
22
|
+
const END = 35;
|
|
23
|
+
const HOME = 36;
|
|
24
|
+
const LEFT_ARROW = 37;
|
|
25
|
+
const UP_ARROW = 38;
|
|
26
|
+
const RIGHT_ARROW = 39;
|
|
27
|
+
const DOWN_ARROW = 40;
|
|
28
|
+
const PLUS_SIGN = 43;
|
|
29
|
+
const PRINT_SCREEN = 44;
|
|
30
|
+
const INSERT = 45;
|
|
31
|
+
const DELETE = 46;
|
|
32
|
+
const ZERO = 48;
|
|
33
|
+
const ONE = 49;
|
|
34
|
+
const TWO = 50;
|
|
35
|
+
const THREE = 51;
|
|
36
|
+
const FOUR = 52;
|
|
37
|
+
const FIVE = 53;
|
|
38
|
+
const SIX = 54;
|
|
39
|
+
const SEVEN = 55;
|
|
40
|
+
const EIGHT = 56;
|
|
41
|
+
const NINE = 57;
|
|
42
|
+
const FF_SEMICOLON = 59; // Firefox (Gecko) fires this for semicolon instead of 186
|
|
43
|
+
const FF_EQUALS = 61; // Firefox (Gecko) fires this for equals instead of 187
|
|
44
|
+
const QUESTION_MARK = 63;
|
|
45
|
+
const AT_SIGN = 64;
|
|
46
|
+
const A = 65;
|
|
47
|
+
const B = 66;
|
|
48
|
+
const C = 67;
|
|
49
|
+
const D = 68;
|
|
50
|
+
const E = 69;
|
|
51
|
+
const F = 70;
|
|
52
|
+
const G = 71;
|
|
53
|
+
const H = 72;
|
|
54
|
+
const I = 73;
|
|
55
|
+
const J = 74;
|
|
56
|
+
const K = 75;
|
|
57
|
+
const L = 76;
|
|
58
|
+
const M = 77;
|
|
59
|
+
const N = 78;
|
|
60
|
+
const O = 79;
|
|
61
|
+
const P = 80;
|
|
62
|
+
const Q = 81;
|
|
63
|
+
const R = 82;
|
|
64
|
+
const S = 83;
|
|
65
|
+
const T = 84;
|
|
66
|
+
const U = 85;
|
|
67
|
+
const V = 86;
|
|
68
|
+
const W = 87;
|
|
69
|
+
const X = 88;
|
|
70
|
+
const Y = 89;
|
|
71
|
+
const Z = 90;
|
|
72
|
+
const META = 91; // WIN_KEY_LEFT
|
|
73
|
+
const MAC_WK_CMD_LEFT = 91;
|
|
74
|
+
const MAC_WK_CMD_RIGHT = 93;
|
|
75
|
+
const CONTEXT_MENU = 93;
|
|
76
|
+
const NUMPAD_ZERO = 96;
|
|
77
|
+
const NUMPAD_ONE = 97;
|
|
78
|
+
const NUMPAD_TWO = 98;
|
|
79
|
+
const NUMPAD_THREE = 99;
|
|
80
|
+
const NUMPAD_FOUR = 100;
|
|
81
|
+
const NUMPAD_FIVE = 101;
|
|
82
|
+
const NUMPAD_SIX = 102;
|
|
83
|
+
const NUMPAD_SEVEN = 103;
|
|
84
|
+
const NUMPAD_EIGHT = 104;
|
|
85
|
+
const NUMPAD_NINE = 105;
|
|
86
|
+
const NUMPAD_MULTIPLY = 106;
|
|
87
|
+
const NUMPAD_PLUS = 107;
|
|
88
|
+
const NUMPAD_MINUS = 109;
|
|
89
|
+
const NUMPAD_PERIOD = 110;
|
|
90
|
+
const NUMPAD_DIVIDE = 111;
|
|
91
|
+
const F1 = 112;
|
|
92
|
+
const F2 = 113;
|
|
93
|
+
const F3 = 114;
|
|
94
|
+
const F4 = 115;
|
|
95
|
+
const F5 = 116;
|
|
96
|
+
const F6 = 117;
|
|
97
|
+
const F7 = 118;
|
|
98
|
+
const F8 = 119;
|
|
99
|
+
const F9 = 120;
|
|
100
|
+
const F10 = 121;
|
|
101
|
+
const F11 = 122;
|
|
102
|
+
const F12 = 123;
|
|
103
|
+
const NUM_LOCK = 144;
|
|
104
|
+
const SCROLL_LOCK = 145;
|
|
105
|
+
const FIRST_MEDIA = 166;
|
|
106
|
+
const FF_MINUS = 173;
|
|
107
|
+
const MUTE = 173; // Firefox (Gecko) fires 181 for MUTE
|
|
108
|
+
const VOLUME_DOWN = 174; // Firefox (Gecko) fires 182 for VOLUME_DOWN
|
|
109
|
+
const VOLUME_UP = 175; // Firefox (Gecko) fires 183 for VOLUME_UP
|
|
110
|
+
const FF_MUTE = 181;
|
|
111
|
+
const FF_VOLUME_DOWN = 182;
|
|
112
|
+
const LAST_MEDIA = 183;
|
|
113
|
+
const FF_VOLUME_UP = 183;
|
|
114
|
+
const SEMICOLON = 186; // Firefox (Gecko) fires 59 for SEMICOLON
|
|
115
|
+
const EQUALS = 187; // Firefox (Gecko) fires 61 for EQUALS
|
|
116
|
+
const COMMA = 188;
|
|
117
|
+
const DASH = 189; // Firefox (Gecko) fires 173 for DASH/MINUS
|
|
118
|
+
const PERIOD = 190;
|
|
119
|
+
const SLASH = 191;
|
|
120
|
+
const APOSTROPHE = 192;
|
|
121
|
+
const TILDE = 192;
|
|
122
|
+
const OPEN_SQUARE_BRACKET = 219;
|
|
123
|
+
const BACKSLASH = 220;
|
|
124
|
+
const CLOSE_SQUARE_BRACKET = 221;
|
|
125
|
+
const SINGLE_QUOTE = 222;
|
|
126
|
+
const MAC_META = 224;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @license
|
|
130
|
+
* Copyright Google LLC All Rights Reserved.
|
|
131
|
+
*
|
|
132
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
133
|
+
* found in the LICENSE file at https://angular.io/license
|
|
134
|
+
*/
|
|
135
|
+
/**
|
|
136
|
+
* Checks whether a modifier key is pressed.
|
|
137
|
+
* @param event Event to be checked.
|
|
138
|
+
*/
|
|
139
|
+
function hasModifierKey(event, ...modifiers) {
|
|
140
|
+
if (modifiers.length) {
|
|
141
|
+
return modifiers.some(modifier => event[modifier]);
|
|
142
|
+
}
|
|
143
|
+
return event.altKey || event.shiftKey || event.ctrlKey || event.metaKey;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @license
|
|
148
|
+
* Copyright Google LLC All Rights Reserved.
|
|
149
|
+
*
|
|
150
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
151
|
+
* found in the LICENSE file at https://angular.io/license
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @license
|
|
156
|
+
* Copyright Google LLC All Rights Reserved.
|
|
157
|
+
*
|
|
158
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
159
|
+
* found in the LICENSE file at https://angular.io/license
|
|
160
|
+
*/
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Generated bundle index. Do not edit.
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
export { A, ALT, APOSTROPHE, AT_SIGN, B, BACKSLASH, BACKSPACE, C, CAPS_LOCK, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, D, DASH, DELETE, DOWN_ARROW, E, EIGHT, END, ENTER, EQUALS, ESCAPE, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FOUR, G, H, HOME, I, INSERT, J, K, L, LAST_MEDIA, LEFT_ARROW, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, META, MUTE, N, NINE, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PAUSE, PERIOD, PLUS_SIGN, PRINT_SCREEN, Q, QUESTION_MARK, R, RIGHT_ARROW, S, SCROLL_LOCK, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, T, TAB, THREE, TILDE, TWO, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, W, X, Y, Z, ZERO, hasModifierKey };
|
|
167
|
+
//# sourceMappingURL=keycodes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keycodes.mjs","sources":["../../../../../../src/cdk/keycodes/keycodes.ts","../../../../../../src/cdk/keycodes/modifiers.ts","../../../../../../src/cdk/keycodes/public-api.ts","../../../../../../src/cdk/keycodes/index.ts","../../../../../../src/cdk/keycodes/keycodes_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const MAC_ENTER = 3;\nexport const BACKSPACE = 8;\nexport const TAB = 9;\nexport const NUM_CENTER = 12;\nexport const ENTER = 13;\nexport const SHIFT = 16;\nexport const CONTROL = 17;\nexport const ALT = 18;\nexport const PAUSE = 19;\nexport const CAPS_LOCK = 20;\nexport const ESCAPE = 27;\nexport const SPACE = 32;\nexport const PAGE_UP = 33;\nexport const PAGE_DOWN = 34;\nexport const END = 35;\nexport const HOME = 36;\nexport const LEFT_ARROW = 37;\nexport const UP_ARROW = 38;\nexport const RIGHT_ARROW = 39;\nexport const DOWN_ARROW = 40;\nexport const PLUS_SIGN = 43;\nexport const PRINT_SCREEN = 44;\nexport const INSERT = 45;\nexport const DELETE = 46;\nexport const ZERO = 48;\nexport const ONE = 49;\nexport const TWO = 50;\nexport const THREE = 51;\nexport const FOUR = 52;\nexport const FIVE = 53;\nexport const SIX = 54;\nexport const SEVEN = 55;\nexport const EIGHT = 56;\nexport const NINE = 57;\nexport const FF_SEMICOLON = 59; // Firefox (Gecko) fires this for semicolon instead of 186\nexport const FF_EQUALS = 61; // Firefox (Gecko) fires this for equals instead of 187\nexport const QUESTION_MARK = 63;\nexport const AT_SIGN = 64;\nexport const A = 65;\nexport const B = 66;\nexport const C = 67;\nexport const D = 68;\nexport const E = 69;\nexport const F = 70;\nexport const G = 71;\nexport const H = 72;\nexport const I = 73;\nexport const J = 74;\nexport const K = 75;\nexport const L = 76;\nexport const M = 77;\nexport const N = 78;\nexport const O = 79;\nexport const P = 80;\nexport const Q = 81;\nexport const R = 82;\nexport const S = 83;\nexport const T = 84;\nexport const U = 85;\nexport const V = 86;\nexport const W = 87;\nexport const X = 88;\nexport const Y = 89;\nexport const Z = 90;\nexport const META = 91; // WIN_KEY_LEFT\nexport const MAC_WK_CMD_LEFT = 91;\nexport const MAC_WK_CMD_RIGHT = 93;\nexport const CONTEXT_MENU = 93;\nexport const NUMPAD_ZERO = 96;\nexport const NUMPAD_ONE = 97;\nexport const NUMPAD_TWO = 98;\nexport const NUMPAD_THREE = 99;\nexport const NUMPAD_FOUR = 100;\nexport const NUMPAD_FIVE = 101;\nexport const NUMPAD_SIX = 102;\nexport const NUMPAD_SEVEN = 103;\nexport const NUMPAD_EIGHT = 104;\nexport const NUMPAD_NINE = 105;\nexport const NUMPAD_MULTIPLY = 106;\nexport const NUMPAD_PLUS = 107;\nexport const NUMPAD_MINUS = 109;\nexport const NUMPAD_PERIOD = 110;\nexport const NUMPAD_DIVIDE = 111;\nexport const F1 = 112;\nexport const F2 = 113;\nexport const F3 = 114;\nexport const F4 = 115;\nexport const F5 = 116;\nexport const F6 = 117;\nexport const F7 = 118;\nexport const F8 = 119;\nexport const F9 = 120;\nexport const F10 = 121;\nexport const F11 = 122;\nexport const F12 = 123;\nexport const NUM_LOCK = 144;\nexport const SCROLL_LOCK = 145;\nexport const FIRST_MEDIA = 166;\nexport const FF_MINUS = 173;\nexport const MUTE = 173; // Firefox (Gecko) fires 181 for MUTE\nexport const VOLUME_DOWN = 174; // Firefox (Gecko) fires 182 for VOLUME_DOWN\nexport const VOLUME_UP = 175; // Firefox (Gecko) fires 183 for VOLUME_UP\nexport const FF_MUTE = 181;\nexport const FF_VOLUME_DOWN = 182;\nexport const LAST_MEDIA = 183;\nexport const FF_VOLUME_UP = 183;\nexport const SEMICOLON = 186; // Firefox (Gecko) fires 59 for SEMICOLON\nexport const EQUALS = 187; // Firefox (Gecko) fires 61 for EQUALS\nexport const COMMA = 188;\nexport const DASH = 189; // Firefox (Gecko) fires 173 for DASH/MINUS\nexport const PERIOD = 190;\nexport const SLASH = 191;\nexport const APOSTROPHE = 192;\nexport const TILDE = 192;\nexport const OPEN_SQUARE_BRACKET = 219;\nexport const BACKSLASH = 220;\nexport const CLOSE_SQUARE_BRACKET = 221;\nexport const SINGLE_QUOTE = 222;\nexport const MAC_META = 224;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\ntype ModifierKey = 'altKey' | 'shiftKey' | 'ctrlKey' | 'metaKey';\n\n/**\n * Checks whether a modifier key is pressed.\n * @param event Event to be checked.\n */\nexport function hasModifierKey(event: KeyboardEvent, ...modifiers: ModifierKey[]): boolean {\n if (modifiers.length) {\n return modifiers.some(modifier => event[modifier]);\n }\n\n return event.altKey || event.shiftKey || event.ctrlKey || event.metaKey;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './keycodes';\nexport * from './modifiers';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;AAEI,MAAM,SAAS,GAAG,EAAE;AACpB,MAAM,SAAS,GAAG,EAAE;AACpB,MAAM,GAAG,GAAG,EAAE;AACd,MAAM,UAAU,GAAG,GAAG;AACtB,MAAM,KAAK,GAAG,GAAG;AACjB,MAAM,KAAK,GAAG,GAAG;AACjB,MAAM,OAAO,GAAG,GAAG;AACnB,MAAM,GAAG,GAAG,GAAG;AACf,MAAM,KAAK,GAAG,GAAG;AACjB,MAAM,SAAS,GAAG,GAAG;AACrB,MAAM,MAAM,GAAG,GAAG;AAClB,MAAM,KAAK,GAAG,GA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|
+
import { coerceArray } from '@kato-lee/cdk/coercion';
|
|
4
|
+
import { Subject, combineLatest, concat, Observable } from 'rxjs';
|
|
5
|
+
import { take, skip, debounceTime, map, startWith, takeUntil } from 'rxjs/operators';
|
|
6
|
+
import * as i1 from '@kato-lee/cdk/platform';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11
|
+
*
|
|
12
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
13
|
+
* found in the LICENSE file at https://angular.io/license
|
|
14
|
+
*/
|
|
15
|
+
class LayoutModule {}
|
|
16
|
+
LayoutModule.ɵfac = i0.ɵɵngDeclareFactory({
|
|
17
|
+
minVersion: '12.0.0',
|
|
18
|
+
version: '14.2.0',
|
|
19
|
+
ngImport: i0,
|
|
20
|
+
type: LayoutModule,
|
|
21
|
+
deps: [],
|
|
22
|
+
target: i0.ɵɵFactoryTarget.NgModule,
|
|
23
|
+
});
|
|
24
|
+
LayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
25
|
+
minVersion: '14.0.0',
|
|
26
|
+
version: '14.2.0',
|
|
27
|
+
ngImport: i0,
|
|
28
|
+
type: LayoutModule,
|
|
29
|
+
});
|
|
30
|
+
LayoutModule.ɵinj = i0.ɵɵngDeclareInjector({
|
|
31
|
+
minVersion: '12.0.0',
|
|
32
|
+
version: '14.2.0',
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
type: LayoutModule,
|
|
35
|
+
});
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
37
|
+
minVersion: '12.0.0',
|
|
38
|
+
version: '14.2.0',
|
|
39
|
+
ngImport: i0,
|
|
40
|
+
type: LayoutModule,
|
|
41
|
+
decorators: [
|
|
42
|
+
{
|
|
43
|
+
type: NgModule,
|
|
44
|
+
args: [{}],
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @license
|
|
51
|
+
* Copyright Google LLC All Rights Reserved.
|
|
52
|
+
*
|
|
53
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
54
|
+
* found in the LICENSE file at https://angular.io/license
|
|
55
|
+
*/
|
|
56
|
+
/** Global registry for all dynamically-created, injected media queries. */
|
|
57
|
+
const mediaQueriesForWebkitCompatibility = new Set();
|
|
58
|
+
/** Style tag that holds all of the dynamically-created media queries. */
|
|
59
|
+
let mediaQueryStyleNode;
|
|
60
|
+
/** A utility for calling matchMedia queries. */
|
|
61
|
+
class MediaMatcher {
|
|
62
|
+
constructor(_platform) {
|
|
63
|
+
this._platform = _platform;
|
|
64
|
+
this._matchMedia =
|
|
65
|
+
this._platform.isBrowser && window.matchMedia
|
|
66
|
+
? // matchMedia is bound to the window scope intentionally as it is an illegal invocation to
|
|
67
|
+
// call it from a different scope.
|
|
68
|
+
window.matchMedia.bind(window)
|
|
69
|
+
: noopMatchMedia;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Evaluates the given media query and returns the native MediaQueryList from which results
|
|
73
|
+
* can be retrieved.
|
|
74
|
+
* Confirms the layout engine will trigger for the selector query provided and returns the
|
|
75
|
+
* MediaQueryList for the query provided.
|
|
76
|
+
*/
|
|
77
|
+
matchMedia(query) {
|
|
78
|
+
if (this._platform.WEBKIT || this._platform.BLINK) {
|
|
79
|
+
createEmptyStyleRule(query);
|
|
80
|
+
}
|
|
81
|
+
return this._matchMedia(query);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
MediaMatcher.ɵfac = i0.ɵɵngDeclareFactory({
|
|
85
|
+
minVersion: '12.0.0',
|
|
86
|
+
version: '14.2.0',
|
|
87
|
+
ngImport: i0,
|
|
88
|
+
type: MediaMatcher,
|
|
89
|
+
deps: [{ token: i1.Platform }],
|
|
90
|
+
target: i0.ɵɵFactoryTarget.Injectable,
|
|
91
|
+
});
|
|
92
|
+
MediaMatcher.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
93
|
+
minVersion: '12.0.0',
|
|
94
|
+
version: '14.2.0',
|
|
95
|
+
ngImport: i0,
|
|
96
|
+
type: MediaMatcher,
|
|
97
|
+
providedIn: 'root',
|
|
98
|
+
});
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
100
|
+
minVersion: '12.0.0',
|
|
101
|
+
version: '14.2.0',
|
|
102
|
+
ngImport: i0,
|
|
103
|
+
type: MediaMatcher,
|
|
104
|
+
decorators: [
|
|
105
|
+
{
|
|
106
|
+
type: Injectable,
|
|
107
|
+
args: [{ providedIn: 'root' }],
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
ctorParameters: function () {
|
|
111
|
+
return [{ type: i1.Platform }];
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
/**
|
|
115
|
+
* Creates an empty stylesheet that is used to work around browser inconsistencies related to
|
|
116
|
+
* `matchMedia`. At the time of writing, it handles the following cases:
|
|
117
|
+
* 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`
|
|
118
|
+
* to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.
|
|
119
|
+
* 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules
|
|
120
|
+
* inside the `@media` match existing elements on the page. We work around it by having one rule
|
|
121
|
+
* targeting the `body`. See https://github.com/angular/components/issues/23546.
|
|
122
|
+
*/
|
|
123
|
+
function createEmptyStyleRule(query) {
|
|
124
|
+
if (mediaQueriesForWebkitCompatibility.has(query)) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
try {
|
|
128
|
+
if (!mediaQueryStyleNode) {
|
|
129
|
+
mediaQueryStyleNode = document.createElement('style');
|
|
130
|
+
mediaQueryStyleNode.setAttribute('type', 'text/css');
|
|
131
|
+
document.head.appendChild(mediaQueryStyleNode);
|
|
132
|
+
}
|
|
133
|
+
if (mediaQueryStyleNode.sheet) {
|
|
134
|
+
mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);
|
|
135
|
+
mediaQueriesForWebkitCompatibility.add(query);
|
|
136
|
+
}
|
|
137
|
+
} catch (e) {
|
|
138
|
+
console.error(e);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/** No-op matchMedia replacement for non-browser platforms. */
|
|
142
|
+
function noopMatchMedia(query) {
|
|
143
|
+
// Use `as any` here to avoid adding additional necessary properties for
|
|
144
|
+
// the noop matcher.
|
|
145
|
+
return {
|
|
146
|
+
matches: query === 'all' || query === '',
|
|
147
|
+
media: query,
|
|
148
|
+
addListener: () => {},
|
|
149
|
+
removeListener: () => {},
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @license
|
|
155
|
+
* Copyright Google LLC All Rights Reserved.
|
|
156
|
+
*
|
|
157
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
158
|
+
* found in the LICENSE file at https://angular.io/license
|
|
159
|
+
*/
|
|
160
|
+
/** Utility for checking the matching state of @media queries. */
|
|
161
|
+
class BreakpointObserver {
|
|
162
|
+
constructor(_mediaMatcher, _zone) {
|
|
163
|
+
this._mediaMatcher = _mediaMatcher;
|
|
164
|
+
this._zone = _zone;
|
|
165
|
+
/** A map of all media queries currently being listened for. */
|
|
166
|
+
this._queries = new Map();
|
|
167
|
+
/** A subject for all other observables to takeUntil based on. */
|
|
168
|
+
this._destroySubject = new Subject();
|
|
169
|
+
}
|
|
170
|
+
/** Completes the active subject, signalling to all other observables to complete. */
|
|
171
|
+
ngOnDestroy() {
|
|
172
|
+
this._destroySubject.next();
|
|
173
|
+
this._destroySubject.complete();
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Whether one or more media queries match the current viewport size.
|
|
177
|
+
* @param value One or more media queries to check.
|
|
178
|
+
* @returns Whether any of the media queries match.
|
|
179
|
+
*/
|
|
180
|
+
isMatched(value) {
|
|
181
|
+
const queries = splitQueries(coerceArray(value));
|
|
182
|
+
return queries.some(mediaQuery => this._registerQuery(mediaQuery).mql.matches);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Gets an observable of results for the given queries that will emit new results for any changes
|
|
186
|
+
* in matching of the given queries.
|
|
187
|
+
* @param value One or more media queries to check.
|
|
188
|
+
* @returns A stream of matches for the given queries.
|
|
189
|
+
*/
|
|
190
|
+
observe(value) {
|
|
191
|
+
const queries = splitQueries(coerceArray(value));
|
|
192
|
+
const observables = queries.map(query => this._registerQuery(query).observable);
|
|
193
|
+
let stateObservable = combineLatest(observables);
|
|
194
|
+
// Emit the first state immediately, and then debounce the subsequent emissions.
|
|
195
|
+
stateObservable = concat(
|
|
196
|
+
stateObservable.pipe(take(1)),
|
|
197
|
+
stateObservable.pipe(skip(1), debounceTime(0))
|
|
198
|
+
);
|
|
199
|
+
return stateObservable.pipe(
|
|
200
|
+
map(breakpointStates => {
|
|
201
|
+
const response = {
|
|
202
|
+
matches: false,
|
|
203
|
+
breakpoints: {},
|
|
204
|
+
};
|
|
205
|
+
breakpointStates.forEach(({ matches, query }) => {
|
|
206
|
+
response.matches = response.matches || matches;
|
|
207
|
+
response.breakpoints[query] = matches;
|
|
208
|
+
});
|
|
209
|
+
return response;
|
|
210
|
+
})
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
/** Registers a specific query to be listened for. */
|
|
214
|
+
_registerQuery(query) {
|
|
215
|
+
// Only set up a new MediaQueryList if it is not already being listened for.
|
|
216
|
+
if (this._queries.has(query)) {
|
|
217
|
+
return this._queries.get(query);
|
|
218
|
+
}
|
|
219
|
+
const mql = this._mediaMatcher.matchMedia(query);
|
|
220
|
+
// Create callback for match changes and add it is as a listener.
|
|
221
|
+
const queryObservable = new Observable(observer => {
|
|
222
|
+
// Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed
|
|
223
|
+
// back into the zone because matchMedia is only included in Zone.js by loading the
|
|
224
|
+
// webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not
|
|
225
|
+
// have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js
|
|
226
|
+
// patches it.
|
|
227
|
+
const handler = e => this._zone.run(() => observer.next(e));
|
|
228
|
+
mql.addListener(handler);
|
|
229
|
+
return () => {
|
|
230
|
+
mql.removeListener(handler);
|
|
231
|
+
};
|
|
232
|
+
}).pipe(
|
|
233
|
+
startWith(mql),
|
|
234
|
+
map(({ matches }) => ({ query, matches })),
|
|
235
|
+
takeUntil(this._destroySubject)
|
|
236
|
+
);
|
|
237
|
+
// Add the MediaQueryList to the set of queries.
|
|
238
|
+
const output = { observable: queryObservable, mql };
|
|
239
|
+
this._queries.set(query, output);
|
|
240
|
+
return output;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
BreakpointObserver.ɵfac = i0.ɵɵngDeclareFactory({
|
|
244
|
+
minVersion: '12.0.0',
|
|
245
|
+
version: '14.2.0',
|
|
246
|
+
ngImport: i0,
|
|
247
|
+
type: BreakpointObserver,
|
|
248
|
+
deps: [{ token: MediaMatcher }, { token: i0.NgZone }],
|
|
249
|
+
target: i0.ɵɵFactoryTarget.Injectable,
|
|
250
|
+
});
|
|
251
|
+
BreakpointObserver.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
252
|
+
minVersion: '12.0.0',
|
|
253
|
+
version: '14.2.0',
|
|
254
|
+
ngImport: i0,
|
|
255
|
+
type: BreakpointObserver,
|
|
256
|
+
providedIn: 'root',
|
|
257
|
+
});
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
259
|
+
minVersion: '12.0.0',
|
|
260
|
+
version: '14.2.0',
|
|
261
|
+
ngImport: i0,
|
|
262
|
+
type: BreakpointObserver,
|
|
263
|
+
decorators: [
|
|
264
|
+
{
|
|
265
|
+
type: Injectable,
|
|
266
|
+
args: [{ providedIn: 'root' }],
|
|
267
|
+
},
|
|
268
|
+
],
|
|
269
|
+
ctorParameters: function () {
|
|
270
|
+
return [{ type: MediaMatcher }, { type: i0.NgZone }];
|
|
271
|
+
},
|
|
272
|
+
});
|
|
273
|
+
/**
|
|
274
|
+
* Split each query string into separate query strings if two queries are provided as comma
|
|
275
|
+
* separated.
|
|
276
|
+
*/
|
|
277
|
+
function splitQueries(queries) {
|
|
278
|
+
return queries
|
|
279
|
+
.map(query => query.split(','))
|
|
280
|
+
.reduce((a1, a2) => a1.concat(a2))
|
|
281
|
+
.map(query => query.trim());
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* @license
|
|
286
|
+
* Copyright Google LLC All Rights Reserved.
|
|
287
|
+
*
|
|
288
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
289
|
+
* found in the LICENSE file at https://angular.io/license
|
|
290
|
+
*/
|
|
291
|
+
// PascalCase is being used as Breakpoints is used like an enum.
|
|
292
|
+
// tslint:disable-next-line:variable-name
|
|
293
|
+
const Breakpoints = {
|
|
294
|
+
XSmall: '(max-width: 599.98px)',
|
|
295
|
+
Small: '(min-width: 600px) and (max-width: 959.98px)',
|
|
296
|
+
Medium: '(min-width: 960px) and (max-width: 1279.98px)',
|
|
297
|
+
Large: '(min-width: 1280px) and (max-width: 1919.98px)',
|
|
298
|
+
XLarge: '(min-width: 1920px)',
|
|
299
|
+
Handset:
|
|
300
|
+
'(max-width: 599.98px) and (orientation: portrait), ' +
|
|
301
|
+
'(max-width: 959.98px) and (orientation: landscape)',
|
|
302
|
+
Tablet:
|
|
303
|
+
'(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), ' +
|
|
304
|
+
'(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',
|
|
305
|
+
Web:
|
|
306
|
+
'(min-width: 840px) and (orientation: portrait), ' +
|
|
307
|
+
'(min-width: 1280px) and (orientation: landscape)',
|
|
308
|
+
HandsetPortrait: '(max-width: 599.98px) and (orientation: portrait)',
|
|
309
|
+
TabletPortrait: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)',
|
|
310
|
+
WebPortrait: '(min-width: 840px) and (orientation: portrait)',
|
|
311
|
+
HandsetLandscape: '(max-width: 959.98px) and (orientation: landscape)',
|
|
312
|
+
TabletLandscape: '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',
|
|
313
|
+
WebLandscape: '(min-width: 1280px) and (orientation: landscape)',
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @license
|
|
318
|
+
* Copyright Google LLC All Rights Reserved.
|
|
319
|
+
*
|
|
320
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
321
|
+
* found in the LICENSE file at https://angular.io/license
|
|
322
|
+
*/
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* @license
|
|
326
|
+
* Copyright Google LLC All Rights Reserved.
|
|
327
|
+
*
|
|
328
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
329
|
+
* found in the LICENSE file at https://angular.io/license
|
|
330
|
+
*/
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Generated bundle index. Do not edit.
|
|
334
|
+
*/
|
|
335
|
+
|
|
336
|
+
export { BreakpointObserver, Breakpoints, LayoutModule, MediaMatcher };
|
|
337
|
+
//# sourceMappingURL=layout.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.mjs","sources":["../../../../../../src/cdk/layout/layout-module.ts","../../../../../../src/cdk/layout/media-matcher.ts","../../../../../../src/cdk/layout/breakpoints-observer.ts","../../../../../../src/cdk/layout/breakpoints.ts","../../../../../../src/cdk/layout/public-api.ts","../../../../../../src/cdk/layout/index.ts","../../../../../../src/cdk/layout/layout_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\n\n@NgModule({})\nexport class LayoutModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Injectable} from '@angular/core';\nimport {Platform} from '@kato-lee/cdk/platform';\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set<string> = new Set<string>();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\n@Injectable({providedIn: 'root'})\nexport class MediaMatcher {\n /** The internal matchMedia method to return back a MediaQueryList like object. */\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor(private _platform: Platform) {\n this._matchMedia =\n this._platform.isBrowser && window.matchMedia\n ? // matchMedia is bound to the window scope intentionally as it is an illegal invocation to\n // call it from a different scope.\n window.matchMedia.bind(window)\n : noopMatchMedia;\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head!.appendChild(mediaQueryStyleNode);\n }\n\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n console.error(e);\n }\n}\n\n/** No-op matchMedia replacement for non-browser platforms. */\nfunction noopMatchMedia(query: string): MediaQueryList {\n // Use `as any` here to avoid adding additional necessary properties for\n // the noop matcher.\n return {\n matches: query === 'all' || query === '',\n media: query,\n addListener: () => {},\n removeListener: () => {},\n } as any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceArray} from '@kato-lee/cdk/coercion';\nimport {Injectable, NgZone, OnDestroy} from '@angular/core';\nimport {combineLatest, concat, Observable, Observer, Subject} from 'rxjs';\nimport {debounceTime, map, skip, startWith, take, takeUntil} from 'rxjs/operators';\nimport {MediaMatcher} from './media-matcher';\n\n/** The current state of a layout breakpoint. */\nexport interface BreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /**\n * A key boolean pair for each query provided to the observe method,\n * with its current matched state.\n */\n breakpoints: {\n [key: string]: boolean;\n };\n}\n\n/** The current state of a layout breakpoint. */\ninterface InternalBreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /** The media query being to be matched */\n query: string;\n}\n\ninterface Query {\n observable: Observable<InternalBreakpointState>;\n mql: MediaQueryList;\n}\n\n/** Utility for checking the matching state of @media queries. */\n@Injectable({providedIn: 'root'})\nexport class BreakpointObserver implements OnDestroy {\n /** A map of all media queries currently being listened for. */\n private _queries = new Map<string, Query>();\n /** A subject for all other observables to takeUntil based on. */\n private readonly _destroySubject = new Subject<void>();\n\n constructor(private _mediaMatcher: MediaMatcher, private _zone: NgZone) {}\n\n /** Completes the active subject, signalling to all other observables to complete. */\n ngOnDestroy() {\n this._destroySubject.next();\n this._destroySubject.complete();\n }\n\n /**\n * Whether one or more media queries match the current viewport size.\n * @param value One or more media queries to check.\n * @returns Whether any of the media queries match.\n */\n isMatched(value: string | readonly string[]): boolean {\n const queries = splitQueries(coerceArray(value));\n return queries.some(mediaQuery => this._registerQuery(mediaQuery).mql.matches);\n }\n\n /**\n * Gets an observable of results for the given queries that will emit new results for any changes\n * in matching of the given queries.\n * @param value One or more media queries to check.\n * @returns A stream of matches for the given queries.\n */\n observe(value: string | readonly string[]): Observable<BreakpointState> {\n const queries = splitQueries(coerceArray(value));\n const observables = queries.map(query => this._registerQuery(query).observable);\n\n let stateObservable = combineLatest(observables);\n // Emit the first state immediately, and then debounce the subsequent emissions.\n stateObservable = concat(\n stateObservable.pipe(take(1)),\n stateObservable.pipe(skip(1), debounceTime(0)),\n );\n return stateObservable.pipe(\n map(breakpointStates => {\n const response: BreakpointState = {\n matches: false,\n breakpoints: {},\n };\n breakpointStates.forEach(({matches, query}) => {\n response.matches = response.matches || matches;\n response.breakpoints[query] = matches;\n });\n return response;\n }),\n );\n }\n\n /** Registers a specific query to be listened for. */\n private _registerQuery(query: string): Query {\n // Only set up a new MediaQueryList if it is not already being listened for.\n if (this._queries.has(query)) {\n return this._queries.get(query)!;\n }\n\n const mql = this._mediaMatcher.matchMedia(query);\n\n // Create callback for match changes and add it is as a listener.\n const queryObservable = new Observable((observer: Observer<MediaQueryListEvent>) => {\n // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed\n // back into the zone because matchMedia is only included in Zone.js by loading the\n // webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not\n // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js\n // patches it.\n const handler = (e: MediaQueryListEvent): void => this._zone.run(() => observer.next(e));\n mql.addListener(handler);\n\n return () => {\n mql.removeListener(handler);\n };\n }).pipe(\n startWith(mql),\n map(({matches}) => ({query, matches})),\n takeUntil(this._destroySubject),\n );\n\n // Add the MediaQueryList to the set of queries.\n const output = {observable: queryObservable, mql};\n this._queries.set(query, output);\n return output;\n }\n}\n\n/**\n * Split each query string into separate query strings if two queries are provided as comma\n * separated.\n */\nfunction splitQueries(queries: readonly string[]): readonly string[] {\n return queries\n .map(query => query.split(','))\n .reduce((a1, a2) => a1.concat(a2))\n .map(query => query.trim());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// PascalCase is being used as Breakpoints is used like an enum.\n// tslint:disable-next-line:variable-name\nexport const Breakpoints = {\n XSmall: '(max-width: 599.98px)',\n Small: '(min-width: 600px) and (max-width: 959.98px)',\n Medium: '(min-width: 960px) and (max-width: 1279.98px)',\n Large: '(min-width: 1280px) and (max-width: 1919.98px)',\n XLarge: '(min-width: 1920px)',\n\n Handset:\n '(max-width: 599.98px) and (orientation: portrait), ' +\n '(max-width: 959.98px) and (orientation: landscape)',\n Tablet:\n '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), ' +\n '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n Web:\n '(min-width: 840px) and (orientation: portrait), ' +\n '(min-width: 1280px) and (orientation: landscape)',\n\n HandsetPortrait: '(max-width: 599.98px) and (orientation: portrait)',\n TabletPortrait: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)',\n WebPortrait: '(min-width: 840px) and (orientation: portrait)',\n\n HandsetLandscape: '(max-width: 959.98px) and (orientation: landscape)',\n TabletLandscape: '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n WebLandscape: '(min-width: 1280px) and (orientation: landscape)',\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {LayoutModule} from './layout-module';\nexport {BreakpointObserver, BreakpointState} from './breakpoints-observer';\nexport {Breakpoints} from './breakpoints';\nexport {MediaMatcher} from './media-matcher';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.MediaMatcher"],"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