@koobiq/components 20.4.2 → 21.0.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/accordion/accordion-trigger.scss +3 -10
- package/accordion/accordion.scss +4 -6
- package/actions-panel/actions-panel-container.scss +45 -1
- package/alert/alert.component.scss +3 -2
- package/app-switcher/_app-switcher-theme.scss +0 -4
- package/app-switcher/app-switcher-dropdown-app.scss +3 -2
- package/app-switcher/app-switcher-dropdown-site.scss +2 -1
- package/app-switcher/{kbq-app-switcher-list-item.scss → app-switcher-list-item.scss} +18 -4
- package/app-switcher/app-switcher-tokens.scss +15 -0
- package/app-switcher/app-switcher.scss +14 -4
- package/autocomplete/autocomplete.scss +7 -6
- package/badge/badge.component.scss +5 -8
- package/breadcrumbs/breadcrumbs.scss +25 -10
- package/button/_button-base.scss +30 -7
- package/button/_button-theme.scss +16 -0
- package/button/button-group.scss +7 -0
- package/button/button-tokens.scss +0 -2
- package/button/button.scss +34 -2
- package/button-toggle/_button-toggle-theme.scss +7 -2
- package/button-toggle/button-toggle.scss +65 -15
- package/checkbox/_checkbox-theme.scss +4 -3
- package/checkbox/checkbox.scss +3 -6
- package/clamped-text/clamped-text.scss +6 -2
- package/code-block/code-block-tokens.scss +0 -224
- package/code-block/code-block.scss +20 -9
- package/content-panel/content-panel-aside.scss +3 -2
- package/content-panel/content-panel-container.scss +37 -0
- package/content-panel/content-panel.scss +4 -3
- package/core/highlight/_highlight-theme.scss +3 -1
- package/core/option/action-container.scss +2 -2
- package/core/option/action.scss +2 -1
- package/core/option/option.scss +2 -1
- package/core/pop-up/_pop-up.scss +0 -37
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +5 -10
- package/core/styles/_core.scss +3 -0
- package/core/styles/_koobiq-theme.scss +5 -6
- package/core/styles/common/_animation.scss +44 -16
- package/core/styles/common/_groups-mixins.scss +21 -19
- package/core/styles/common/_groups.scss +4 -32
- package/core/styles/common/_index.scss +0 -2
- package/core/styles/common/_link.scss +117 -0
- package/core/styles/common/_list.scss +0 -26
- package/core/styles/common/_overlay.scss +8 -10
- package/core/styles/common/_rtl.scss +0 -14
- package/core/styles/common/_select.scss +33 -15
- package/core/styles/common/_squircle.scss +63 -0
- package/core/styles/common/_tokens.scss +0 -11
- package/core/styles/common/_vendor-prefixes.scss +0 -20
- package/core/styles/functions/_timing.scss +0 -22
- package/core/styles/theming/_scrollbar-theme.scss +6 -1
- package/core/styles/theming/_theming.scss +13 -65
- package/core/styles/typography/_index.scss +0 -1
- package/core/styles/typography/_typography.scss +0 -143
- package/core/styles/visual/_body.scss +1 -6
- package/core/styles/visual/_layout.scss +0 -12
- package/datepicker/calendar-body.scss +3 -1
- package/datepicker/calendar-header.scss +0 -1
- package/datepicker/datepicker-content.scss +33 -1
- package/datepicker/datepicker-toggle.scss +0 -38
- package/dl/dl-tokens.scss +10 -0
- package/dl/dl.scss +113 -13
- package/dropdown/_dropdown-theme.scss +4 -16
- package/dropdown/dropdown-item.scss +4 -10
- package/dropdown/dropdown.scss +2 -1
- package/empty-state/_empty-state-theme.scss +10 -4
- package/empty-state/empty-state-tokens.scss +4 -4
- package/empty-state/empty-state.scss +4 -0
- package/fesm2022/koobiq-components-accordion.mjs +347 -229
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +302 -187
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +39 -39
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +677 -367
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +620 -253
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +46 -48
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +221 -169
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +565 -196
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +332 -116
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +172 -132
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +165 -158
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +755 -601
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +260 -143
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +4342 -1595
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +1713 -1606
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +73 -36
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +447 -89
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +703 -599
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +20 -20
- package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +46 -31
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +116 -60
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +550 -290
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +2810 -2538
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +79 -24
- package/fesm2022/koobiq-components-flag.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +389 -525
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +366 -136
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +429 -212
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +601 -459
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link-deprecated.mjs +196 -0
- package/fesm2022/koobiq-components-link-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-link.mjs +328 -125
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +583 -433
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +167 -68
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +55 -78
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +853 -475
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +895 -556
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +680 -310
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +46 -64
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +684 -285
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +87 -33
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +52 -43
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +450 -231
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-resizer.mjs +127 -21
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar-deprecated.mjs +299 -0
- package/fesm2022/koobiq-components-scrollbar-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-scrollbar.mjs +745 -222
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +288 -126
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +883 -693
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +207 -88
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +689 -296
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +815 -41
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +109 -88
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter-deprecated.mjs +591 -0
- package/fesm2022/koobiq-components-splitter-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-splitter.mjs +890 -501
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +63 -49
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +1062 -603
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +886 -733
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +213 -185
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +299 -147
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +233 -245
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +344 -142
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +229 -145
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +463 -143
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +177 -130
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +657 -214
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +61 -32
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +719 -488
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +1506 -558
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +290 -135
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/dropzone.scss +31 -3
- package/file-upload/file-upload-tokens.scss +2 -22
- package/file-upload/file-upload.scss +6 -0
- package/file-upload/multiple-file-upload.component.scss +14 -12
- package/file-upload/single-file-upload.component.scss +3 -2
- package/filter-bar/filters.scss +7 -0
- package/filter-bar/pipes/base-pipe.scss +3 -3
- package/filter-bar/pipes/pipe-date.scss +8 -1
- package/flag/flag-tokens.scss +22 -0
- package/flag/flag.scss +34 -21
- package/form-field/{_fiedset-theme.scss → _fieldset-theme.scss} +1 -5
- package/form-field/_form-field-theme.scss +4 -9
- package/form-field/cleaner.scss +3 -1
- package/form-field/fieldset.scss +3 -4
- package/form-field/form-field.scss +26 -21
- package/form-field/password-toggle.scss +3 -1
- package/icon/_icon-button-theme.scss +7 -0
- package/icon/_icon-theme.scss +10 -7
- package/icon/icon-button.scss +0 -2
- package/icon/icon-tokens.scss +12 -9
- package/inline-edit/inline-edit.scss +40 -54
- package/input/input.scss +4 -0
- package/link/{_link-theme.scss → deprecated/_link-theme.scss} +11 -6
- package/link/deprecated/link-tokens.scss +27 -0
- package/link/link-tokens.scss +6 -25
- package/link/link.scss +137 -0
- package/list/list.scss +3 -2
- package/loader-overlay/_loader-overlay-theme.scss +19 -10
- package/loader-overlay/loader-overlay-tokens.scss +0 -2
- package/loader-overlay/loader-overlay.scss +7 -1
- package/markdown/_markdown-theme.scss +16 -0
- package/markdown/markdown-tokens.scss +5 -0
- package/markdown/markdown.scss +2 -1
- package/modal/_modal-animation.scss +23 -14
- package/modal/modal-tokens.scss +2 -1
- package/modal/modal.scss +35 -31
- package/navbar/_navbar-item_horizontal.scss +8 -6
- package/navbar/_navbar-item_vertical.scss +18 -6
- package/navbar/_navbar-theme.scss +9 -1
- package/navbar/navbar-brand.scss +8 -6
- package/navbar/navbar-divider.scss +1 -1
- package/navbar/navbar-item.scss +8 -9
- package/navbar/navbar-toggle.scss +3 -3
- package/navbar/navbar-tokens.scss +14 -0
- package/navbar/navbar.scss +1 -2
- package/navbar/vertical-navbar.scss +2 -2
- package/notification-center/_notification-center-theme.scss +11 -6
- package/notification-center/notification-center-tokens.scss +33 -0
- package/notification-center/notification-center.scss +58 -20
- package/notification-center/notification-item.scss +15 -6
- package/package.json +112 -81
- package/popover/popover-tokens.scss +0 -2
- package/popover/popover.scss +41 -19
- package/prebuilt-themes/theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +20 -3
- package/progress-bar/progress-bar-tokens.scss +3 -0
- package/progress-bar/progress-bar.scss +36 -8
- package/progress-spinner/progress-spinner.scss +4 -3
- package/radio/_radio-theme.scss +21 -4
- package/radio/radio-tokens.scss +7 -3
- package/radio/radio.scss +55 -8
- package/schematics/collection.json +399 -7
- package/schematics/migrations/accordion-state-saving-default/README.md +60 -0
- package/schematics/migrations/accordion-state-saving-default/data.js +75 -0
- package/schematics/migrations/accordion-state-saving-default/index.js +60 -0
- package/schematics/migrations/accordion-state-saving-default/schema.json +15 -0
- package/schematics/migrations/actions-panel-overlay-container/README.md +35 -0
- package/schematics/migrations/actions-panel-overlay-container/data.js +47 -0
- package/schematics/migrations/actions-panel-overlay-container/index.js +54 -0
- package/schematics/migrations/actions-panel-overlay-container/schema.json +15 -0
- package/schematics/migrations/alert-signals/README.md +13 -7
- package/schematics/migrations/alert-signals/data.js +3 -0
- package/schematics/migrations/alert-signals/index.js +70 -203
- package/schematics/migrations/angular-animations-removal/README.md +46 -0
- package/schematics/migrations/angular-animations-removal/data.js +150 -0
- package/schematics/migrations/angular-animations-removal/index.js +20 -0
- package/schematics/migrations/angular-animations-removal/schema.json +15 -0
- package/schematics/migrations/app-switcher-signals/README.md +88 -0
- package/schematics/migrations/app-switcher-signals/data.js +136 -0
- package/schematics/migrations/app-switcher-signals/index.js +365 -0
- package/schematics/migrations/app-switcher-signals/schema.json +20 -0
- package/schematics/migrations/autocomplete-panel-width-auto/README.md +2 -2
- package/schematics/migrations/autocomplete-panel-width-auto/index.js +1 -1
- package/schematics/migrations/autocomplete-signals/README.md +92 -0
- package/schematics/migrations/autocomplete-signals/data.js +149 -0
- package/schematics/migrations/autocomplete-signals/index.js +706 -0
- package/schematics/migrations/autocomplete-signals/schema.json +20 -0
- package/schematics/migrations/badge-signals/README.md +77 -0
- package/schematics/migrations/badge-signals/data.js +109 -0
- package/schematics/migrations/badge-signals/index.js +693 -0
- package/schematics/migrations/badge-signals/schema.json +20 -0
- package/schematics/migrations/button-state-and-styles/README.md +129 -0
- package/schematics/migrations/button-state-and-styles/data.js +136 -0
- package/schematics/migrations/button-state-and-styles/index.js +220 -0
- package/schematics/migrations/button-state-and-styles/schema.json +20 -0
- package/schematics/migrations/button-supported-colors/README.md +73 -0
- package/schematics/migrations/button-supported-colors/data.js +106 -0
- package/schematics/migrations/button-supported-colors/index.js +260 -0
- package/schematics/migrations/button-supported-colors/schema.json +20 -0
- package/schematics/migrations/button-toggle-signals-and-aria/README.md +137 -0
- package/schematics/migrations/button-toggle-signals-and-aria/data.js +200 -0
- package/schematics/migrations/button-toggle-signals-and-aria/index.js +496 -0
- package/schematics/migrations/button-toggle-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/button-truncation/README.md +110 -0
- package/schematics/migrations/button-truncation/data.js +88 -0
- package/schematics/migrations/button-truncation/index.js +269 -0
- package/schematics/migrations/button-truncation/schema.json +20 -0
- package/schematics/migrations/checkbox-signals/README.md +76 -0
- package/schematics/migrations/checkbox-signals/data.js +114 -0
- package/schematics/migrations/checkbox-signals/index.js +634 -0
- package/schematics/migrations/checkbox-signals/schema.json +20 -0
- package/schematics/migrations/clamped-text-disclosure/README.md +62 -0
- package/schematics/migrations/clamped-text-disclosure/data.js +101 -0
- package/schematics/migrations/clamped-text-disclosure/index.js +59 -0
- package/schematics/migrations/clamped-text-disclosure/schema.json +15 -0
- package/schematics/migrations/code-block-signals/README.md +84 -0
- package/schematics/migrations/code-block-signals/data.js +121 -0
- package/schematics/migrations/code-block-signals/index.js +700 -0
- package/schematics/migrations/code-block-signals/schema.json +20 -0
- package/schematics/migrations/color-signals/README.md +46 -0
- package/schematics/migrations/color-signals/data.js +131 -0
- package/schematics/migrations/color-signals/index.js +19 -0
- package/schematics/migrations/color-signals/schema.json +20 -0
- package/schematics/migrations/core-mixins-removal/README.md +20 -0
- package/schematics/migrations/core-mixins-removal/data.js +27 -0
- package/schematics/migrations/core-mixins-removal/index.js +17 -0
- package/schematics/migrations/core-mixins-removal/schema.json +15 -0
- package/schematics/migrations/css-selectors/README.md +2 -2
- package/schematics/migrations/css-selectors/index.js +1 -1
- package/schematics/migrations/datepicker-signals/README.md +24 -0
- package/schematics/migrations/datepicker-signals/data.js +49 -0
- package/schematics/migrations/datepicker-signals/index.js +17 -0
- package/schematics/migrations/datepicker-signals/schema.json +15 -0
- package/schematics/migrations/deprecated-icons/README.md +2 -2
- package/schematics/migrations/deprecated-icons/index.js +1 -1
- package/schematics/migrations/design-tokens-v4/README.md +75 -0
- package/schematics/migrations/design-tokens-v4/index.js +59 -0
- package/schematics/migrations/design-tokens-v4/schema.json +15 -0
- package/schematics/migrations/divider-signals-and-aria/README.md +47 -0
- package/schematics/migrations/divider-signals-and-aria/data.js +62 -0
- package/schematics/migrations/divider-signals-and-aria/index.js +211 -0
- package/schematics/migrations/divider-signals-and-aria/schema.json +15 -0
- package/schematics/migrations/dl-attribute-coercion/README.md +59 -0
- package/schematics/migrations/dl-attribute-coercion/data.js +85 -0
- package/schematics/migrations/dl-attribute-coercion/index.js +161 -0
- package/schematics/migrations/dl-attribute-coercion/schema.json +15 -0
- package/schematics/migrations/dl-standalone-names/README.md +49 -0
- package/schematics/migrations/dl-standalone-names/data.js +44 -0
- package/schematics/migrations/dl-standalone-names/index.js +321 -0
- package/schematics/migrations/dl-standalone-names/schema.json +20 -0
- package/schematics/migrations/dropdown-demote-overlay/README.md +137 -0
- package/schematics/migrations/dropdown-demote-overlay/data.js +84 -0
- package/schematics/migrations/dropdown-demote-overlay/index.js +288 -0
- package/schematics/migrations/dropdown-demote-overlay/schema.json +20 -0
- package/schematics/migrations/dropdown-signals/README.md +83 -0
- package/schematics/migrations/dropdown-signals/data.js +152 -0
- package/schematics/migrations/dropdown-signals/index.js +19 -0
- package/schematics/migrations/dropdown-signals/schema.json +20 -0
- package/schematics/migrations/empty-state-error-color/README.md +84 -0
- package/schematics/migrations/empty-state-error-color/data.js +85 -0
- package/schematics/migrations/empty-state-error-color/index.js +71 -0
- package/schematics/migrations/empty-state-error-color/schema.json +15 -0
- package/schematics/migrations/empty-state-size-attr/README.md +2 -2
- package/schematics/migrations/empty-state-size-attr/index.js +1 -1
- package/schematics/migrations/file-upload-cva-and-primitives/README.md +70 -0
- package/schematics/migrations/file-upload-cva-and-primitives/data.js +97 -0
- package/schematics/migrations/file-upload-cva-and-primitives/index.js +60 -0
- package/schematics/migrations/file-upload-cva-and-primitives/schema.json +15 -0
- package/schematics/migrations/file-upload-deprecated-outputs/README.md +90 -0
- package/schematics/migrations/file-upload-deprecated-outputs/data.js +20 -0
- package/schematics/migrations/file-upload-deprecated-outputs/index.js +70 -0
- package/schematics/migrations/file-upload-deprecated-outputs/schema.json +20 -0
- package/schematics/migrations/filter-bar-rename-action/README.md +183 -0
- package/schematics/migrations/filter-bar-rename-action/data.js +151 -0
- package/schematics/migrations/filter-bar-rename-action/index.js +177 -0
- package/schematics/migrations/filter-bar-rename-action/schema.json +20 -0
- package/schematics/migrations/filter-bar-signals/README.md +27 -16
- package/schematics/migrations/filter-bar-signals/data.js +1 -2
- package/schematics/migrations/filter-bar-signals/index.js +100 -195
- package/schematics/migrations/filter-bar-state-saving-default/README.md +53 -0
- package/schematics/migrations/filter-bar-state-saving-default/data.js +87 -0
- package/schematics/migrations/filter-bar-state-saving-default/index.js +61 -0
- package/schematics/migrations/filter-bar-state-saving-default/schema.json +15 -0
- package/schematics/migrations/flag-inner-html/README.md +67 -0
- package/schematics/migrations/flag-inner-html/data.js +58 -0
- package/schematics/migrations/flag-inner-html/index.js +61 -0
- package/schematics/migrations/flag-inner-html/schema.json +15 -0
- package/schematics/migrations/form-field-signals/README.md +125 -0
- package/schematics/migrations/form-field-signals/data.js +288 -0
- package/schematics/migrations/form-field-signals/index.js +382 -0
- package/schematics/migrations/form-field-signals/schema.json +20 -0
- package/schematics/migrations/icon-semantics-and-api/README.md +65 -0
- package/schematics/migrations/icon-semantics-and-api/data.js +97 -0
- package/schematics/migrations/icon-semantics-and-api/index.js +64 -0
- package/schematics/migrations/icon-semantics-and-api/schema.json +15 -0
- package/schematics/migrations/icons-replacement/README.md +5 -5
- package/schematics/migrations/icons-replacement/index.js +1 -1
- package/schematics/migrations/inline-edit-a11y-and-types/README.md +82 -0
- package/schematics/migrations/inline-edit-a11y-and-types/data.js +117 -0
- package/schematics/migrations/inline-edit-a11y-and-types/index.js +97 -0
- package/schematics/migrations/inline-edit-a11y-and-types/schema.json +20 -0
- package/schematics/migrations/input-number-surface/README.md +140 -0
- package/schematics/migrations/input-number-surface/data.js +135 -0
- package/schematics/migrations/input-number-surface/index.js +292 -0
- package/schematics/migrations/input-number-surface/schema.json +20 -0
- package/schematics/migrations/input-signals/README.md +20 -0
- package/schematics/migrations/input-signals/data.js +30 -0
- package/schematics/migrations/input-signals/index.js +17 -0
- package/schematics/migrations/input-signals/schema.json +15 -0
- package/schematics/migrations/link-deprecated-path/README.md +144 -0
- package/schematics/migrations/link-deprecated-path/index.js +19 -0
- package/schematics/migrations/link-deprecated-path/schema.json +20 -0
- package/schematics/migrations/link-signals/README.md +71 -0
- package/schematics/migrations/link-signals/data.js +116 -0
- package/schematics/migrations/link-signals/index.js +415 -0
- package/schematics/migrations/link-signals/schema.json +20 -0
- package/schematics/migrations/list-signals/README.md +22 -0
- package/schematics/migrations/list-signals/data.js +35 -0
- package/schematics/migrations/list-signals/index.js +17 -0
- package/schematics/migrations/list-signals/schema.json +15 -0
- package/schematics/migrations/list-tree-multiple-input/README.md +105 -0
- package/schematics/migrations/list-tree-multiple-input/data.js +74 -0
- package/schematics/migrations/list-tree-multiple-input/index.js +221 -0
- package/schematics/migrations/list-tree-multiple-input/schema.json +20 -0
- package/schematics/migrations/loader-overlay-signals/README.md +62 -0
- package/schematics/migrations/loader-overlay-signals/data.js +101 -0
- package/schematics/migrations/loader-overlay-signals/index.js +697 -0
- package/schematics/migrations/loader-overlay-signals/schema.json +20 -0
- package/schematics/migrations/loader-overlay-size-attr/README.md +2 -2
- package/schematics/migrations/loader-overlay-size-attr/index.js +1 -1
- package/schematics/migrations/locale-configuration-providers/README.md +163 -0
- package/schematics/migrations/locale-configuration-providers/data.js +257 -0
- package/schematics/migrations/locale-configuration-providers/index.js +294 -0
- package/schematics/migrations/locale-configuration-providers/schema.json +20 -0
- package/schematics/migrations/mandatory-peer-dependencies/README.md +70 -0
- package/schematics/migrations/mandatory-peer-dependencies/index.js +42 -0
- package/schematics/migrations/mandatory-peer-dependencies/schema.json +15 -0
- package/schematics/migrations/markdown-signals/README.md +58 -0
- package/schematics/migrations/markdown-signals/data.js +79 -0
- package/schematics/migrations/markdown-signals/index.js +639 -0
- package/schematics/migrations/markdown-signals/schema.json +20 -0
- package/schematics/migrations/modal-dialog-semantics/README.md +106 -0
- package/schematics/migrations/modal-dialog-semantics/data.js +110 -0
- package/schematics/migrations/modal-dialog-semantics/index.js +58 -0
- package/schematics/migrations/modal-dialog-semantics/schema.json +15 -0
- package/schematics/migrations/modal-signals/README.md +88 -0
- package/schematics/migrations/modal-signals/data.js +132 -0
- package/schematics/migrations/modal-signals/index.js +19 -0
- package/schematics/migrations/modal-signals/schema.json +20 -0
- package/schematics/migrations/navbar-signals-and-aria/README.md +111 -0
- package/schematics/migrations/navbar-signals-and-aria/data.js +198 -0
- package/schematics/migrations/navbar-signals-and-aria/index.js +568 -0
- package/schematics/migrations/navbar-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/new-icons-pack/README.md +10 -10
- package/schematics/migrations/new-icons-pack/index.js +1 -1
- package/schematics/migrations/notification-center-signals/README.md +67 -0
- package/schematics/migrations/notification-center-signals/data.js +66 -0
- package/schematics/migrations/notification-center-signals/index.js +61 -0
- package/schematics/migrations/notification-center-signals/schema.json +15 -0
- package/schematics/migrations/option-signals/README.md +37 -0
- package/schematics/migrations/option-signals/data.js +86 -0
- package/schematics/migrations/option-signals/index.js +19 -0
- package/schematics/migrations/option-signals/schema.json +20 -0
- package/schematics/migrations/popover-leave-delay/README.md +51 -0
- package/schematics/migrations/popover-leave-delay/data.js +61 -0
- package/schematics/migrations/popover-leave-delay/index.js +54 -0
- package/schematics/migrations/popover-leave-delay/schema.json +15 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/README.md +54 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/data.js +76 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/index.js +58 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/schema.json +15 -0
- package/schematics/migrations/progress-spinner-signals/README.md +72 -0
- package/schematics/migrations/progress-spinner-signals/data.js +83 -0
- package/schematics/migrations/progress-spinner-signals/index.js +694 -0
- package/schematics/migrations/progress-spinner-signals/schema.json +20 -0
- package/schematics/migrations/query-list-signals/README.md +32 -0
- package/schematics/migrations/query-list-signals/data.js +70 -0
- package/schematics/migrations/query-list-signals/index.js +17 -0
- package/schematics/migrations/query-list-signals/schema.json +15 -0
- package/schematics/migrations/radio-signals-and-aria/README.md +82 -0
- package/schematics/migrations/radio-signals-and-aria/data.js +163 -0
- package/schematics/migrations/radio-signals-and-aria/index.js +39 -0
- package/schematics/migrations/radio-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/read-state-dwell-handlers/README.md +125 -0
- package/schematics/migrations/read-state-dwell-handlers/data.js +45 -0
- package/schematics/migrations/read-state-dwell-handlers/index.js +215 -0
- package/schematics/migrations/read-state-dwell-handlers/schema.json +20 -0
- package/schematics/migrations/scrollbar-deprecated-path/README.md +128 -0
- package/schematics/migrations/scrollbar-deprecated-path/index.js +20 -0
- package/schematics/migrations/scrollbar-deprecated-path/schema.json +20 -0
- package/schematics/migrations/select-signal-inputs/README.md +61 -0
- package/schematics/migrations/select-signal-inputs/data.js +99 -0
- package/schematics/migrations/select-signal-inputs/index.js +57 -0
- package/schematics/migrations/select-signal-inputs/schema.json +15 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/README.md +57 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/data.js +111 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/index.js +57 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/schema.json +15 -0
- package/schematics/migrations/signal-inputs-subclasses/README.md +28 -0
- package/schematics/migrations/signal-inputs-subclasses/data.js +69 -0
- package/schematics/migrations/signal-inputs-subclasses/index.js +17 -0
- package/schematics/migrations/signal-inputs-subclasses/schema.json +15 -0
- package/schematics/migrations/split-button-optional-disabled/README.md +47 -0
- package/schematics/migrations/split-button-optional-disabled/data.js +53 -0
- package/schematics/migrations/split-button-optional-disabled/index.js +57 -0
- package/schematics/migrations/split-button-optional-disabled/schema.json +15 -0
- package/schematics/migrations/splitter-deprecated-path/README.md +136 -0
- package/schematics/migrations/splitter-deprecated-path/index.js +20 -0
- package/schematics/migrations/splitter-deprecated-path/schema.json +20 -0
- package/schematics/migrations/state-saving-default/README.md +67 -0
- package/schematics/migrations/state-saving-default/data.js +88 -0
- package/schematics/migrations/state-saving-default/index.js +62 -0
- package/schematics/migrations/state-saving-default/schema.json +15 -0
- package/schematics/migrations/table-cell-content/README.md +55 -0
- package/schematics/migrations/table-cell-content/data.js +66 -0
- package/schematics/migrations/table-cell-content/index.js +66 -0
- package/schematics/migrations/table-cell-content/schema.json +15 -0
- package/schematics/migrations/tabs-signals-and-aria/README.md +93 -0
- package/schematics/migrations/tabs-signals-and-aria/data.js +139 -0
- package/schematics/migrations/tabs-signals-and-aria/index.js +65 -0
- package/schematics/migrations/tabs-signals-and-aria/schema.json +15 -0
- package/schematics/migrations/tag-list-cleaner/README.md +58 -0
- package/schematics/migrations/tag-list-cleaner/data.js +42 -0
- package/schematics/migrations/tag-list-cleaner/index.js +196 -0
- package/schematics/migrations/tag-list-cleaner/schema.json +20 -0
- package/schematics/migrations/tag-slots/README.md +41 -0
- package/schematics/migrations/tag-slots/index.js +190 -0
- package/schematics/migrations/tag-slots/schema.json +20 -0
- package/schematics/migrations/tags-signals/README.md +85 -0
- package/schematics/migrations/tags-signals/data.js +103 -0
- package/schematics/migrations/tags-signals/index.js +673 -0
- package/schematics/migrations/tags-signals/schema.json +20 -0
- package/schematics/migrations/textarea-signals/README.md +72 -0
- package/schematics/migrations/textarea-signals/data.js +121 -0
- package/schematics/migrations/textarea-signals/index.js +379 -0
- package/schematics/migrations/textarea-signals/schema.json +20 -0
- package/schematics/migrations/time-range-title-for/README.md +164 -0
- package/schematics/migrations/time-range-title-for/data.js +139 -0
- package/schematics/migrations/time-range-title-for/index.js +163 -0
- package/schematics/migrations/time-range-title-for/schema.json +20 -0
- package/schematics/migrations/timepicker-signals/README.md +78 -0
- package/schematics/migrations/timepicker-signals/data.js +82 -0
- package/schematics/migrations/timepicker-signals/index.js +709 -0
- package/schematics/migrations/timepicker-signals/schema.json +20 -0
- package/schematics/migrations/timezone-grouping-utils/README.md +73 -0
- package/schematics/migrations/timezone-grouping-utils/data.js +101 -0
- package/schematics/migrations/timezone-grouping-utils/index.js +64 -0
- package/schematics/migrations/timezone-grouping-utils/schema.json +15 -0
- package/schematics/migrations/title-encapsulation/README.md +49 -0
- package/schematics/migrations/title-encapsulation/data.js +69 -0
- package/schematics/migrations/title-encapsulation/index.js +57 -0
- package/schematics/migrations/title-encapsulation/schema.json +15 -0
- package/schematics/migrations/toast-stack-and-defaults/README.md +102 -0
- package/schematics/migrations/toast-stack-and-defaults/data.js +79 -0
- package/schematics/migrations/toast-stack-and-defaults/index.js +53 -0
- package/schematics/migrations/toast-stack-and-defaults/schema.json +15 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/README.md +53 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/data.js +89 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/index.js +60 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/schema.json +15 -0
- package/schematics/migrations/top-bar-container-selectors/README.md +111 -0
- package/schematics/migrations/top-bar-container-selectors/data.js +56 -0
- package/schematics/migrations/top-bar-container-selectors/index.js +84 -0
- package/schematics/migrations/top-bar-container-selectors/schema.json +20 -0
- package/schematics/migrations/tree-select-signals/README.md +61 -0
- package/schematics/migrations/tree-select-signals/data.js +106 -0
- package/schematics/migrations/tree-select-signals/index.js +58 -0
- package/schematics/migrations/tree-select-signals/schema.json +15 -0
- package/schematics/migrations/tree-signals/README.md +82 -0
- package/schematics/migrations/tree-signals/data.js +123 -0
- package/schematics/migrations/tree-signals/index.js +54 -0
- package/schematics/migrations/tree-signals/schema.json +15 -0
- package/schematics/migrations/tree-state-saving-default/README.md +66 -0
- package/schematics/migrations/tree-state-saving-default/data.js +78 -0
- package/schematics/migrations/tree-state-saving-default/index.js +60 -0
- package/schematics/migrations/tree-state-saving-default/schema.json +15 -0
- package/schematics/migrations/username-pipe-injection/README.md +59 -0
- package/schematics/migrations/username-pipe-injection/data.js +78 -0
- package/schematics/migrations/username-pipe-injection/index.js +58 -0
- package/schematics/migrations/username-pipe-injection/schema.json +15 -0
- package/schematics/migrations/v20-upgrade/README.md +36 -16
- package/schematics/migrations/v20-upgrade/data.js +124 -77
- package/schematics/migrations/v20-upgrade/index.js +6 -213
- package/schematics/migrations/v21-upgrade/README.md +271 -0
- package/schematics/migrations/v21-upgrade/data.js +1371 -0
- package/schematics/migrations/v21-upgrade/index.js +94 -0
- package/schematics/migrations/v21-upgrade/schema.json +20 -0
- package/schematics/migrations/zoneless-change-detection/README.md +30 -0
- package/schematics/migrations/zoneless-change-detection/data.js +29 -0
- package/schematics/migrations/zoneless-change-detection/index.js +20 -0
- package/schematics/migrations/zoneless-change-detection/schema.json +15 -0
- package/schematics/migrations.json +392 -2
- package/schematics/ng-add/index.js +515 -14
- package/schematics/ng-add/schema.json +15 -0
- package/schematics/utils/deprecated-path-migration.js +61 -0
- package/schematics/utils/package-config.js +9 -105
- package/scrollbar/{_scrollbar-component-theme.scss → deprecated/_scrollbar-component-theme.scss} +1 -1
- package/scrollbar/{scrollbar.component.scss → deprecated/scrollbar.component.scss} +1 -1
- package/scrollbar/native-scrollbar.scss +68 -0
- package/scrollbar/scrollbar-tokens.scss +13 -22
- package/scrollbar/scrollbar-track.scss +94 -0
- package/scrollbar/scrollbar-viewport.scss +33 -0
- package/scrollbar/scrollbar.scss +24 -0
- package/search-expandable/search-expandable-tokens.scss +4 -0
- package/search-expandable/search-expandable.scss +4 -2
- package/select/_select-theme.scss +3 -16
- package/select/select.scss +0 -6
- package/sidebar/sidebar.scss +20 -0
- package/sidepanel/_sidepanel-theme.scss +1 -1
- package/sidepanel/sidepanel-tokens.scss +7 -1
- package/sidepanel/sidepanel.scss +41 -5
- package/skeleton/skeleton-presets.scss +350 -0
- package/skeleton/skeleton-tokens.scss +127 -0
- package/skeleton/skeleton.scss +53 -45
- package/split-button/_split-button-theme.scss +4 -4
- package/split-button/split-button.scss +2 -6
- package/splitter/{_splitter-theme.scss → deprecated/_splitter-theme.scss} +1 -1
- package/splitter/deprecated/splitter.scss +51 -0
- package/splitter/splitter-tokens.scss +19 -0
- package/splitter/splitter.scss +148 -28
- package/table/_table-theme.scss +13 -12
- package/table/table-tokens.scss +8 -0
- package/table/table.scss +47 -22
- package/tabs/_tabs-common.scss +14 -14
- package/tabs/_tabs-theme.scss +4 -5
- package/tabs/tab-body.scss +49 -1
- package/tabs/tab-header.scss +2 -1
- package/tags/tag-list.scss +4 -0
- package/tags/tag.scss +19 -1
- package/time-range/time-range.scss +9 -0
- package/timezone/timezone-option.component.scss +4 -7
- package/timezone/timezone-select.component.scss +3 -0
- package/toast/_toast-theme.scss +1 -4
- package/toast/toast-container.component.scss +19 -13
- package/toast/toast-tokens.scss +12 -6
- package/toast/toast.component.scss +42 -19
- package/toggle/_toggle-theme.scss +4 -10
- package/toggle/toggle.scss +67 -26
- package/tooltip/_tooltip-theme.scss +7 -1
- package/tooltip/tooltip-tokens.scss +1 -2
- package/tooltip/tooltip.scss +55 -9
- package/top-bar/top-bar-tokens.scss +13 -2
- package/top-bar/top-bar.scss +24 -19
- package/tree/_tree-theme.scss +0 -1
- package/tree/toggle.scss +5 -9
- package/tree/tree-option.scss +2 -4
- package/tree/tree-tokens.scss +2 -1
- package/tree/tree.scss +3 -5
- package/tree-select/_tree-select-theme.scss +4 -15
- package/tree-select/tree-select-tokens.scss +16 -0
- package/tree-select/tree-select.scss +0 -6
- package/{accordion/index.d.ts → types/koobiq-components-accordion.d.ts} +102 -84
- package/{actions-panel/index.d.ts → types/koobiq-components-actions-panel.d.ts} +44 -59
- package/{alert/index.d.ts → types/koobiq-components-alert.d.ts} +8 -3
- package/types/koobiq-components-app-switcher.d.ts +406 -0
- package/types/koobiq-components-autocomplete.d.ts +443 -0
- package/{badge/index.d.ts → types/koobiq-components-badge.d.ts} +25 -20
- package/{breadcrumbs/index.d.ts → types/koobiq-components-breadcrumbs.d.ts} +97 -46
- package/types/koobiq-components-button-toggle.d.ts +340 -0
- package/types/koobiq-components-button.d.ts +296 -0
- package/types/koobiq-components-checkbox.d.ts +172 -0
- package/types/koobiq-components-clamped-text.d.ts +184 -0
- package/{code-block/index.d.ts → types/koobiq-components-code-block.d.ts} +114 -79
- package/{content-panel/index.d.ts → types/koobiq-components-content-panel.d.ts} +81 -25
- package/{core/index.d.ts → types/koobiq-components-core.d.ts} +2827 -865
- package/{datepicker/index.d.ts → types/koobiq-components-datepicker.d.ts} +161 -116
- package/types/koobiq-components-divider.d.ts +43 -0
- package/types/koobiq-components-dl.d.ts +235 -0
- package/{dropdown/index.d.ts → types/koobiq-components-dropdown.d.ts} +245 -239
- package/types/koobiq-components-ellipsis-center.d.ts +85 -0
- package/types/koobiq-components-empty-state.d.ts +106 -0
- package/{file-upload/index.d.ts → types/koobiq-components-file-upload.d.ts} +214 -107
- package/{filter-bar/index.d.ts → types/koobiq-components-filter-bar.d.ts} +410 -495
- package/types/koobiq-components-flag.d.ts +68 -0
- package/{form-field/index.d.ts → types/koobiq-components-form-field.d.ts} +167 -191
- package/types/koobiq-components-icon.d.ts +333 -0
- package/{inline-edit/index.d.ts → types/koobiq-components-inline-edit.d.ts} +109 -46
- package/types/koobiq-components-input.d.ts +477 -0
- package/types/koobiq-components-link-deprecated.d.ts +101 -0
- package/types/koobiq-components-link.d.ts +176 -0
- package/{list/index.d.ts → types/koobiq-components-list.d.ts} +162 -99
- package/types/koobiq-components-loader-overlay.d.ts +101 -0
- package/{markdown/index.d.ts → types/koobiq-components-markdown.d.ts} +16 -24
- package/types/koobiq-components-modal.d.ts +666 -0
- package/types/koobiq-components-navbar.d.ts +569 -0
- package/types/koobiq-components-notification-center.d.ts +500 -0
- package/{overflow-items/index.d.ts → types/koobiq-components-overflow-items.d.ts} +8 -22
- package/types/koobiq-components-popover.d.ts +468 -0
- package/types/koobiq-components-progress-bar.d.ts +67 -0
- package/{progress-spinner/index.d.ts → types/koobiq-components-progress-spinner.d.ts} +33 -10
- package/types/koobiq-components-radio.d.ts +294 -0
- package/{resizer/index.d.ts → types/koobiq-components-resizer.d.ts} +37 -2
- package/{scrollbar/index.d.ts → types/koobiq-components-scrollbar-deprecated.d.ts} +18 -1
- package/types/koobiq-components-scrollbar.d.ts +154 -0
- package/types/koobiq-components-search-expandable.d.ts +164 -0
- package/{select/index.d.ts → types/koobiq-components-select.d.ts} +360 -167
- package/types/koobiq-components-sidebar.d.ts +152 -0
- package/types/koobiq-components-sidepanel.d.ts +436 -0
- package/types/koobiq-components-skeleton.d.ts +234 -0
- package/types/koobiq-components-split-button.d.ts +65 -0
- package/{splitter/index.d.ts → types/koobiq-components-splitter-deprecated.d.ts} +44 -1
- package/types/koobiq-components-splitter.d.ts +406 -0
- package/types/koobiq-components-table.d.ts +44 -0
- package/types/koobiq-components-tabs.d.ts +888 -0
- package/{tags/index.d.ts → types/koobiq-components-tags.d.ts} +249 -133
- package/types/koobiq-components-textarea.d.ts +178 -0
- package/{time-range/index.d.ts → types/koobiq-components-time-range.d.ts} +135 -62
- package/types/koobiq-components-timepicker.d.ts +223 -0
- package/types/koobiq-components-timezone.d.ts +266 -0
- package/types/koobiq-components-title.d.ts +184 -0
- package/types/koobiq-components-toast.d.ts +289 -0
- package/types/koobiq-components-toggle.d.ts +121 -0
- package/types/koobiq-components-tooltip.d.ts +610 -0
- package/types/koobiq-components-top-bar.d.ts +61 -0
- package/types/koobiq-components-tree-select.d.ts +667 -0
- package/types/koobiq-components-tree.d.ts +1290 -0
- package/types/koobiq-components-username.d.ts +340 -0
- package/username/_username-theme.scss +35 -0
- package/username/username.scss +10 -34
- package/app-switcher/index.d.ts +0 -276
- package/autocomplete/index.d.ts +0 -286
- package/button/index.d.ts +0 -153
- package/button-toggle/index.d.ts +0 -162
- package/checkbox/index.d.ts +0 -163
- package/clamped-text/index.d.ts +0 -146
- package/core/styles/_tokens.scss +0 -7
- package/core/styles/common/_clearfix.scss +0 -13
- package/core/styles/common/_popup.scss +0 -6
- package/core/styles/functions/_index.scss +0 -3
- package/core/styles/functions/_number.scss +0 -60
- package/core/styles/functions/_string.scss +0 -18
- package/core/styles/theming/scrollbar-tokens.scss +0 -25
- package/core/styles/typography/_typography-utils.scss +0 -84
- package/divider/index.d.ts +0 -20
- package/dl/index.d.ts +0 -45
- package/ellipsis-center/index.d.ts +0 -71
- package/empty-state/index.d.ts +0 -45
- package/flag/index.d.ts +0 -44
- package/icon/index.d.ts +0 -200
- package/input/index.d.ts +0 -354
- package/link/index.d.ts +0 -56
- package/loader-overlay/index.d.ts +0 -57
- package/modal/index.d.ts +0 -339
- package/navbar/index.d.ts +0 -372
- package/notification-center/index.d.ts +0 -323
- package/popover/index.d.ts +0 -182
- package/prebuilt-themes/dark-theme.css +0 -1
- package/prebuilt-themes/light-theme.css +0 -1
- package/progress-bar/index.d.ts +0 -31
- package/radio/index.d.ts +0 -203
- package/search-expandable/index.d.ts +0 -101
- package/sidebar/index.d.ts +0 -94
- package/sidepanel/index.d.ts +0 -272
- package/skeleton/index.d.ts +0 -26
- package/split-button/index.d.ts +0 -46
- package/table/index.d.ts +0 -25
- package/tabs/index.d.ts +0 -677
- package/textarea/index.d.ts +0 -138
- package/timepicker/index.d.ts +0 -197
- package/timezone/index.d.ts +0 -125
- package/title/index.d.ts +0 -139
- package/toast/index.d.ts +0 -178
- package/toggle/index.d.ts +0 -104
- package/tooltip/index.d.ts +0 -335
- package/top-bar/index.d.ts +0 -33
- package/tree/index.d.ts +0 -802
- package/tree-select/index.d.ts +0 -475
- package/username/index.d.ts +0 -194
- /package/{dynamic-translation/index.d.ts → types/koobiq-components-dynamic-translation.d.ts} +0 -0
- /package/{index.d.ts → types/koobiq-components.d.ts} +0 -0
|
@@ -1,117 +1,325 @@
|
|
|
1
1
|
import { Directionality } from '@angular/cdk/bidi';
|
|
2
2
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
3
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
3
|
+
import { Overlay, CdkScrollable } from '@angular/cdk/overlay';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { inject,
|
|
6
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
-
import * as
|
|
5
|
+
import { inject, Injectable, input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, booleanAttribute, model, InjectionToken, viewChild, viewChildren, QueryList, EventEmitter, signal, Directive, NgModule } from '@angular/core';
|
|
6
|
+
import { takeUntilDestroyed, outputFromObservable } from '@angular/core/rxjs-interop';
|
|
7
|
+
import * as i2 from '@angular/forms';
|
|
8
8
|
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import * as i1 from '@koobiq/components/badge';
|
|
10
10
|
import { KbqBadgeModule } from '@koobiq/components/badge';
|
|
11
|
-
import * as
|
|
12
|
-
import {
|
|
13
|
-
import * as
|
|
11
|
+
import * as i1$2 from '@koobiq/components/core';
|
|
12
|
+
import { KBQ_TITLE_TEXT_REF, KbqHighlightBackgroundPipe, PopUpPlacements, ruRULocaleData, kbqLocaleConfigurationOverrideProvider, KbqPopUp, KbqLocaleOverridesDirective, kbqQueryListFrom, FocusKeyManager, applyPopupMargins, ESCAPE, DOWN_ARROW, TAB, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, UP_ARROW, KbqOptionModule, KbqPopUpTrigger, PopUpSizes, PopUpTriggers, kbqOptionalNumberAttribute, POSITION_TO_CSS_MAP, kbqSiblingPopupProvider } from '@koobiq/components/core';
|
|
13
|
+
import * as i6 from '@koobiq/components/divider';
|
|
14
14
|
import { KbqDividerModule } from '@koobiq/components/divider';
|
|
15
|
-
import * as
|
|
15
|
+
import * as i8 from '@koobiq/components/dropdown';
|
|
16
16
|
import { KbqDropdownItem, KbqDropdownModule } from '@koobiq/components/dropdown';
|
|
17
17
|
import * as i1$1 from '@koobiq/components/icon';
|
|
18
18
|
import { KbqIcon, KbqIconModule } from '@koobiq/components/icon';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i3 from '@koobiq/components/input';
|
|
20
20
|
import { KbqInput, KbqInputModule } from '@koobiq/components/input';
|
|
21
21
|
import { defaultOffsetYWithArrow } from '@koobiq/components/popover';
|
|
22
|
-
import
|
|
23
|
-
import { KbqScrollbarModule } from '@koobiq/components/scrollbar';
|
|
22
|
+
import { KbqScrollbar } from '@koobiq/components/scrollbar';
|
|
24
23
|
import { merge } from 'rxjs';
|
|
25
|
-
import { startWith } from 'rxjs/operators';
|
|
26
|
-
import {
|
|
27
|
-
import { NgOptimizedImage } from '@angular/common';
|
|
24
|
+
import { startWith, distinctUntilChanged, auditTime, filter } from 'rxjs/operators';
|
|
25
|
+
import { DOCUMENT, NgOptimizedImage } from '@angular/common';
|
|
28
26
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
29
|
-
import * as
|
|
30
|
-
import { ConfigurableFocusTrapFactory, FocusTrapFactory, FOCUS_TRAP_INERT_STRATEGY } from '@angular/cdk/a11y';
|
|
27
|
+
import * as i4 from '@koobiq/components/form-field';
|
|
31
28
|
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
/**
|
|
30
|
+
* SVG elements allowed inside `KbqAppSwitcherApp.icon`/`KbqAppSwitcherSite.icon`.
|
|
31
|
+
*
|
|
32
|
+
* Everything else is dropped, which is what neutralises the dangerous markup: `script` (inline JS),
|
|
33
|
+
* `foreignObject` (re-opens an HTML parsing context inside the SVG), `style` (CSS-based exfiltration and
|
|
34
|
+
* the classic mXSS vector), `a` (navigation) and every HTML element such as `img` or `iframe`.
|
|
35
|
+
* Keys are lower-cased because SVG tag names are case-sensitive (`clipPath`, `linearGradient`, …).
|
|
36
|
+
*/
|
|
37
|
+
const ALLOWED_ELEMENTS = new Set([
|
|
38
|
+
'circle',
|
|
39
|
+
'clippath',
|
|
40
|
+
'defs',
|
|
41
|
+
'desc',
|
|
42
|
+
'ellipse',
|
|
43
|
+
'feblend',
|
|
44
|
+
'fecolormatrix',
|
|
45
|
+
'fecomposite',
|
|
46
|
+
'fedropshadow',
|
|
47
|
+
'feflood',
|
|
48
|
+
'fegaussianblur',
|
|
49
|
+
'femerge',
|
|
50
|
+
'femergenode',
|
|
51
|
+
'feoffset',
|
|
52
|
+
'filter',
|
|
53
|
+
'g',
|
|
54
|
+
'lineargradient',
|
|
55
|
+
'line',
|
|
56
|
+
'marker',
|
|
57
|
+
'mask',
|
|
58
|
+
'path',
|
|
59
|
+
'pattern',
|
|
60
|
+
'polygon',
|
|
61
|
+
'polyline',
|
|
62
|
+
'radialgradient',
|
|
63
|
+
'rect',
|
|
64
|
+
'stop',
|
|
65
|
+
'svg',
|
|
66
|
+
'symbol',
|
|
67
|
+
'text',
|
|
68
|
+
'textpath',
|
|
69
|
+
'title',
|
|
70
|
+
'tspan',
|
|
71
|
+
'use'
|
|
72
|
+
]);
|
|
73
|
+
/**
|
|
74
|
+
* Attributes allowed on the elements above — geometry, presentation and a few a11y hooks.
|
|
75
|
+
* Anything absent from this list is removed, which covers every `on*` event handler.
|
|
76
|
+
*
|
|
77
|
+
* Note the asymmetry with `UNSAFE_STYLE_VALUE` below: `url(...)` is rejected inside `style`, but the paint
|
|
78
|
+
* attributes that legitimately take it (`fill`, `stroke`, `filter`, `mask`, `clip-path`) are kept as-is,
|
|
79
|
+
* because `fill="url(#gradient)"` is how an inline icon references its own gradient. That is safe in practice
|
|
80
|
+
* — browsers resolve those references only within the same document, so an external URL there neither loads
|
|
81
|
+
* nor renders anything.
|
|
82
|
+
*/
|
|
83
|
+
const ALLOWED_ATTRIBUTES = new Set([
|
|
84
|
+
'aria-hidden',
|
|
85
|
+
'aria-label',
|
|
86
|
+
'baseline-shift',
|
|
87
|
+
'class',
|
|
88
|
+
'clip-path',
|
|
89
|
+
'clip-rule',
|
|
90
|
+
'color',
|
|
91
|
+
'cx',
|
|
92
|
+
'cy',
|
|
93
|
+
'd',
|
|
94
|
+
'display',
|
|
95
|
+
'dominant-baseline',
|
|
96
|
+
'dx',
|
|
97
|
+
'dy',
|
|
98
|
+
'fill',
|
|
99
|
+
'fill-opacity',
|
|
100
|
+
'fill-rule',
|
|
101
|
+
'filter',
|
|
102
|
+
'filterunits',
|
|
103
|
+
'flood-color',
|
|
104
|
+
'flood-opacity',
|
|
105
|
+
'focusable',
|
|
106
|
+
'font-family',
|
|
107
|
+
'font-size',
|
|
108
|
+
'font-style',
|
|
109
|
+
'font-weight',
|
|
110
|
+
'fx',
|
|
111
|
+
'fy',
|
|
112
|
+
'gradienttransform',
|
|
113
|
+
'gradientunits',
|
|
114
|
+
'height',
|
|
115
|
+
'href',
|
|
116
|
+
'id',
|
|
117
|
+
'in',
|
|
118
|
+
'in2',
|
|
119
|
+
'letter-spacing',
|
|
120
|
+
'marker-end',
|
|
121
|
+
'marker-mid',
|
|
122
|
+
'marker-start',
|
|
123
|
+
'markerheight',
|
|
124
|
+
'markerwidth',
|
|
125
|
+
'mask',
|
|
126
|
+
'maskunits',
|
|
127
|
+
'mode',
|
|
128
|
+
'offset',
|
|
129
|
+
'opacity',
|
|
130
|
+
'orient',
|
|
131
|
+
'overflow',
|
|
132
|
+
'pathlength',
|
|
133
|
+
'patterncontentunits',
|
|
134
|
+
'patternunits',
|
|
135
|
+
'points',
|
|
136
|
+
'preserveaspectratio',
|
|
137
|
+
'primitiveunits',
|
|
138
|
+
'r',
|
|
139
|
+
'refx',
|
|
140
|
+
'refy',
|
|
141
|
+
'result',
|
|
142
|
+
'role',
|
|
143
|
+
'rx',
|
|
144
|
+
'ry',
|
|
145
|
+
'shape-rendering',
|
|
146
|
+
'spreadmethod',
|
|
147
|
+
'stddeviation',
|
|
148
|
+
'stop-color',
|
|
149
|
+
'stop-opacity',
|
|
150
|
+
'stroke',
|
|
151
|
+
'stroke-dasharray',
|
|
152
|
+
'stroke-dashoffset',
|
|
153
|
+
'stroke-linecap',
|
|
154
|
+
'stroke-linejoin',
|
|
155
|
+
'stroke-miterlimit',
|
|
156
|
+
'stroke-opacity',
|
|
157
|
+
'stroke-width',
|
|
158
|
+
'style',
|
|
159
|
+
'text-anchor',
|
|
160
|
+
'transform',
|
|
161
|
+
'type',
|
|
162
|
+
'values',
|
|
163
|
+
'vector-effect',
|
|
164
|
+
'viewbox',
|
|
165
|
+
'visibility',
|
|
166
|
+
'width',
|
|
167
|
+
'x',
|
|
168
|
+
'x1',
|
|
169
|
+
'x2',
|
|
170
|
+
'xlink:href',
|
|
171
|
+
'xmlns',
|
|
172
|
+
'xmlns:xlink',
|
|
173
|
+
'y',
|
|
174
|
+
'y1',
|
|
175
|
+
'y2'
|
|
176
|
+
]);
|
|
177
|
+
/** Attributes carrying a URL: only same-document fragment references (`#gradient-1`) survive. */
|
|
178
|
+
const URL_ATTRIBUTES = new Set(['href', 'xlink:href']);
|
|
179
|
+
/** Inline styles that can load or execute something are dropped rather than parsed. */
|
|
180
|
+
const UNSAFE_STYLE_VALUE = /url\s*\(|expression\s*\(|javascript\s*:/i;
|
|
181
|
+
/**
|
|
182
|
+
* Turns the caller-supplied inline SVG of an app-switcher icon into markup that is safe to hand to
|
|
183
|
+
* `[innerHtml]`.
|
|
184
|
+
*
|
|
185
|
+
* Angular's own HTML sanitizer cannot be used here: its allow-list contains no SVG elements at all, so it
|
|
186
|
+
* would strip every icon. Instead the markup is parsed inert (inside a `<template>`, where no request is
|
|
187
|
+
* issued and no script runs), filtered against a strict SVG allow-list, and only then marked as trusted.
|
|
188
|
+
*/
|
|
189
|
+
class KbqAppSwitcherIconSanitizer {
|
|
190
|
+
constructor() {
|
|
191
|
+
this.document = inject(DOCUMENT);
|
|
192
|
+
this.domSanitizer = inject(DomSanitizer);
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Sanitizes inline SVG markup and wraps it as `SafeHtml`. Returns `null` for empty input, so callers can
|
|
196
|
+
* use the result directly as the `@if` condition of the icon element.
|
|
197
|
+
*/
|
|
198
|
+
sanitize(icon) {
|
|
199
|
+
if (!icon)
|
|
200
|
+
return null;
|
|
201
|
+
const sanitized = this.filter(icon);
|
|
202
|
+
if (!sanitized)
|
|
203
|
+
return null;
|
|
204
|
+
// Second pass: `[innerHtml]` re-parses our serialized output, and mutation-XSS works by making that
|
|
205
|
+
// second parse differ from the first. Benign markup is already normalised by pass one, so a
|
|
206
|
+
// difference here means the input was crafted to change shape on re-parse - drop it entirely.
|
|
207
|
+
if (this.filter(sanitized) !== sanitized)
|
|
208
|
+
return null;
|
|
209
|
+
return this.domSanitizer.bypassSecurityTrustHtml(sanitized);
|
|
210
|
+
}
|
|
211
|
+
/** Parses the markup inertly, strips everything outside the allow-lists and serializes it back. */
|
|
212
|
+
filter(markup) {
|
|
213
|
+
const template = this.document.createElement('template');
|
|
214
|
+
template.innerHTML = markup;
|
|
215
|
+
this.sanitizeChildren(template.content);
|
|
216
|
+
return template.innerHTML;
|
|
217
|
+
}
|
|
218
|
+
sanitizeChildren(node) {
|
|
219
|
+
// Snapshot the list: removing a node while iterating a live NodeList skips its sibling.
|
|
220
|
+
for (const child of Array.from(node.childNodes)) {
|
|
221
|
+
if (child.nodeType === Node.ELEMENT_NODE) {
|
|
222
|
+
const element = child;
|
|
223
|
+
if (ALLOWED_ELEMENTS.has(element.localName.toLowerCase())) {
|
|
224
|
+
this.sanitizeAttributes(element);
|
|
225
|
+
this.sanitizeChildren(element);
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
else if (child.nodeType === Node.TEXT_NODE) {
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
// Disallowed elements, comments and CDATA sections (a known mXSS carrier) all go.
|
|
233
|
+
child.parentNode?.removeChild(child);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
sanitizeAttributes(element) {
|
|
237
|
+
for (const { name, value } of Array.from(element.attributes)) {
|
|
238
|
+
const attribute = name.toLowerCase();
|
|
239
|
+
const allowed = ALLOWED_ATTRIBUTES.has(attribute) &&
|
|
240
|
+
(!URL_ATTRIBUTES.has(attribute) || value.trim().startsWith('#')) &&
|
|
241
|
+
(attribute !== 'style' || !UNSAFE_STYLE_VALUE.test(value));
|
|
242
|
+
if (!allowed) {
|
|
243
|
+
element.removeAttribute(name);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherIconSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
248
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherIconSanitizer, providedIn: 'root' }); }
|
|
249
|
+
}
|
|
250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherIconSanitizer, decorators: [{
|
|
251
|
+
type: Injectable,
|
|
252
|
+
args: [{ providedIn: 'root' }]
|
|
253
|
+
}] });
|
|
47
254
|
|
|
48
255
|
/** @docs-private */
|
|
49
256
|
class KbqAppSwitcherDropdownApp extends KbqDropdownItem {
|
|
50
257
|
constructor() {
|
|
51
258
|
super(...arguments);
|
|
52
|
-
this.
|
|
259
|
+
this.iconSanitizer = inject(KbqAppSwitcherIconSanitizer);
|
|
260
|
+
/** Application (or synthetic app group) rendered by this flyout row. */
|
|
261
|
+
this.app = input.required({ ...(ngDevMode ? { debugName: "app" } : /* istanbul ignore next */ {}), alias: 'kbq-app-switcher-dropdown-app' });
|
|
262
|
+
/** Inline SVG of the app icon, sanitized against an SVG allow-list. See `KbqAppSwitcherListItem.safeIcon`. */
|
|
263
|
+
this.safeIcon = computed(() => this.iconSanitizer.sanitize(this.app().icon), ...(ngDevMode ? [{ debugName: "safeIcon" }] : /* istanbul ignore next */ []));
|
|
53
264
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAppSwitcherDropdownApp, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
58
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqAppSwitcherDropdownApp, isStandalone: true, selector: "[kbq-app-switcher-dropdown-app]", inputs: { app: ["kbq-app-switcher-dropdown-app", "app"] }, host: { attributes: { "role": "menuitem" }, properties: { "class.kbq-dropdown-item": "false", "attr.tabindex": "getTabIndex()", "attr.aria-haspopup": "isNested ? 'menu' : null" }, classAttribute: "kbq-app-switcher-dropdown-app" }, providers: [
|
|
265
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherDropdownApp, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
266
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqAppSwitcherDropdownApp, isStandalone: true, selector: "[kbq-app-switcher-dropdown-app]", inputs: { app: { classPropertyName: "app", publicName: "kbq-app-switcher-dropdown-app", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "menuitem" }, properties: { "class.kbq-dropdown-item": "false", "attr.aria-haspopup": "isNested ? 'menu' : null" }, classAttribute: "kbq-app-switcher-dropdown-app" }, providers: [
|
|
59
267
|
{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqAppSwitcherDropdownApp },
|
|
60
268
|
{ provide: KbqDropdownItem, useExisting: KbqAppSwitcherDropdownApp }
|
|
61
269
|
], exportAs: ["kbqAppSwitcherDropdownApp"], usesInheritance: true, ngImport: i0, template: `
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<img alt="{{ app.type }}" width="24" height="24" [ngSrc]="app.iconSrc" />
|
|
270
|
+
@if (safeIcon(); as icon) {
|
|
271
|
+
<span class="kbq-app-switcher-dropdown-app__icon" aria-hidden="true" [innerHtml]="icon"></span>
|
|
272
|
+
} @else if (app().iconSrc; as iconSrc) {
|
|
273
|
+
<span class="kbq-app-switcher-dropdown-app__icon" aria-hidden="true">
|
|
274
|
+
<img alt="" width="24" height="24" [ngSrc]="iconSrc" />
|
|
68
275
|
</span>
|
|
69
276
|
}
|
|
70
277
|
|
|
71
278
|
<div class="kbq-app-switcher-dropdown-app__container">
|
|
72
279
|
<div class="kbq-app-switcher-dropdown-app__name">
|
|
73
|
-
<span>{{ app.name }}</span>
|
|
280
|
+
<span>{{ app().name }}</span>
|
|
74
281
|
|
|
75
282
|
@if (isNested) {
|
|
76
283
|
<i
|
|
77
284
|
kbq-icon="kbq-chevron-right-s_16"
|
|
285
|
+
aria-hidden="true"
|
|
78
286
|
class="kbq-app-switcher-dropdown-item-trigger__icon"
|
|
79
287
|
[color]="componentColors.ContrastFade"
|
|
80
288
|
></i>
|
|
81
289
|
}
|
|
82
290
|
</div>
|
|
83
|
-
@if (app.caption) {
|
|
84
|
-
<div class="kbq-app-switcher-dropdown-app__caption">{{
|
|
291
|
+
@if (app().caption; as caption) {
|
|
292
|
+
<div class="kbq-app-switcher-dropdown-app__caption">{{ caption }}</div>
|
|
85
293
|
}
|
|
86
294
|
</div>
|
|
87
|
-
`, isInline: true, styles: ["@
|
|
295
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-inline-start:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-end-start-radius:0;border-end-end-radius:0;border-start-end-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){corner-shape:squircle;border-start-end-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){corner-shape:squircle;border-end-start-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-end-start-radius:0;border-end-end-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-start-end-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-app-switcher-dropdown-app{display:flex;flex-direction:row;width:100%;min-height:var(--kbq-app-switcher-size-dropdown-app-height-min, 50px);border-radius:var(--kbq-size-xs)}@supports (corner-shape: squircle){.kbq-app-switcher-dropdown-app{corner-shape:squircle;border-radius:clamp(var(--kbq-size-xs) * 1.85,var(--kbq-size-xs) * 2.3 - 3.6px,var(--kbq-size-xs) * 2)}}.kbq-app-switcher-dropdown-app{border:var(--kbq-size-3xs) solid transparent;-webkit-user-select:none;user-select:none;text-decoration:none;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;cursor:pointer;padding:var(--kbq-size-xxs) var(--kbq-size-m)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__icon{padding-top:var(--kbq-size-s);padding-right:var(--kbq-size-m)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container{width:100%;align-self:center}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container .kbq-app-switcher-dropdown-app__name{display:flex;flex-direction:row;justify-content:space-between}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container .kbq-app-switcher-dropdown-app__caption{margin-left:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app .kbq-dropdown-item__caption{padding-top:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-item-trigger__icon{margin-top:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-app-switcher-dropdown-app.kbq-dropdown-item_highlighted,.kbq-app-switcher-dropdown-app:hover,.kbq-app-switcher-dropdown-app.cdk-keyboard-focused{background:var(--kbq-states-background-transparent-hover)}.kbq-app-switcher-dropdown-app:active,.kbq-app-switcher-dropdown-app.kbq-active{background:var(--kbq-states-background-transparent-active)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__caption{color:var(--kbq-dropdown-item-caption-color)}.kbq-app-switcher-dropdown-app{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"], dependencies: [{ kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["aria-hidden", "iconSize", "autoColor", "kbq-icon"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
88
296
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherDropdownApp, decorators: [{
|
|
90
298
|
type: Component,
|
|
91
299
|
args: [{ selector: '[kbq-app-switcher-dropdown-app]', imports: [KbqIcon, NgOptimizedImage], template: `
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<img alt="{{ app.type }}" width="24" height="24" [ngSrc]="app.iconSrc" />
|
|
300
|
+
@if (safeIcon(); as icon) {
|
|
301
|
+
<span class="kbq-app-switcher-dropdown-app__icon" aria-hidden="true" [innerHtml]="icon"></span>
|
|
302
|
+
} @else if (app().iconSrc; as iconSrc) {
|
|
303
|
+
<span class="kbq-app-switcher-dropdown-app__icon" aria-hidden="true">
|
|
304
|
+
<img alt="" width="24" height="24" [ngSrc]="iconSrc" />
|
|
98
305
|
</span>
|
|
99
306
|
}
|
|
100
307
|
|
|
101
308
|
<div class="kbq-app-switcher-dropdown-app__container">
|
|
102
309
|
<div class="kbq-app-switcher-dropdown-app__name">
|
|
103
|
-
<span>{{ app.name }}</span>
|
|
310
|
+
<span>{{ app().name }}</span>
|
|
104
311
|
|
|
105
312
|
@if (isNested) {
|
|
106
313
|
<i
|
|
107
314
|
kbq-icon="kbq-chevron-right-s_16"
|
|
315
|
+
aria-hidden="true"
|
|
108
316
|
class="kbq-app-switcher-dropdown-item-trigger__icon"
|
|
109
317
|
[color]="componentColors.ContrastFade"
|
|
110
318
|
></i>
|
|
111
319
|
}
|
|
112
320
|
</div>
|
|
113
|
-
@if (app.caption) {
|
|
114
|
-
<div class="kbq-app-switcher-dropdown-app__caption">{{
|
|
321
|
+
@if (app().caption; as caption) {
|
|
322
|
+
<div class="kbq-app-switcher-dropdown-app__caption">{{ caption }}</div>
|
|
115
323
|
}
|
|
116
324
|
</div>
|
|
117
325
|
`, providers: [
|
|
@@ -121,51 +329,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
121
329
|
class: 'kbq-app-switcher-dropdown-app',
|
|
122
330
|
role: 'menuitem',
|
|
123
331
|
'[class.kbq-dropdown-item]': 'false',
|
|
124
|
-
|
|
332
|
+
// `tabindex` comes from `KbqDropdownItem`: a second binding here would read its signal again after the others.
|
|
125
333
|
'[attr.aria-haspopup]': "isNested ? 'menu' : null"
|
|
126
|
-
}, exportAs: 'kbqAppSwitcherDropdownApp', styles: ["@
|
|
127
|
-
}], propDecorators: { app: [{
|
|
128
|
-
type: Input,
|
|
129
|
-
args: ['kbq-app-switcher-dropdown-app']
|
|
130
|
-
}] } });
|
|
334
|
+
}, exportAs: 'kbqAppSwitcherDropdownApp', styles: ["@charset \"UTF-8\";.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-inline-start:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-end-start-radius:0;border-end-end-radius:0;border-start-end-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){corner-shape:squircle;border-start-end-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){corner-shape:squircle;border-end-start-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-end-start-radius:0;border-end-end-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-start-end-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-app-switcher-dropdown-app{display:flex;flex-direction:row;width:100%;min-height:var(--kbq-app-switcher-size-dropdown-app-height-min, 50px);border-radius:var(--kbq-size-xs)}@supports (corner-shape: squircle){.kbq-app-switcher-dropdown-app{corner-shape:squircle;border-radius:clamp(var(--kbq-size-xs) * 1.85,var(--kbq-size-xs) * 2.3 - 3.6px,var(--kbq-size-xs) * 2)}}.kbq-app-switcher-dropdown-app{border:var(--kbq-size-3xs) solid transparent;-webkit-user-select:none;user-select:none;text-decoration:none;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;cursor:pointer;padding:var(--kbq-size-xxs) var(--kbq-size-m)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__icon{padding-top:var(--kbq-size-s);padding-right:var(--kbq-size-m)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container{width:100%;align-self:center}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container .kbq-app-switcher-dropdown-app__name{display:flex;flex-direction:row;justify-content:space-between}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container .kbq-app-switcher-dropdown-app__caption{margin-left:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app .kbq-dropdown-item__caption{padding-top:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-item-trigger__icon{margin-top:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-app-switcher-dropdown-app.kbq-dropdown-item_highlighted,.kbq-app-switcher-dropdown-app:hover,.kbq-app-switcher-dropdown-app.cdk-keyboard-focused{background:var(--kbq-states-background-transparent-hover)}.kbq-app-switcher-dropdown-app:active,.kbq-app-switcher-dropdown-app.kbq-active{background:var(--kbq-states-background-transparent-active)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__caption{color:var(--kbq-dropdown-item-caption-color)}.kbq-app-switcher-dropdown-app{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"] }]
|
|
335
|
+
}], propDecorators: { app: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbq-app-switcher-dropdown-app", required: true }] }] } });
|
|
131
336
|
|
|
132
337
|
/** @docs-private */
|
|
133
338
|
class KbqAppSwitcherDropdownSite extends KbqDropdownItem {
|
|
134
|
-
|
|
135
|
-
|
|
339
|
+
constructor() {
|
|
340
|
+
super(...arguments);
|
|
341
|
+
/** Site rendered by this row. */
|
|
342
|
+
this.site = input.required({ ...(ngDevMode ? { debugName: "site" } : /* istanbul ignore next */ {}), alias: 'kbq-app-switcher-dropdown-site' });
|
|
343
|
+
}
|
|
344
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherDropdownSite, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
345
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqAppSwitcherDropdownSite, isStandalone: true, selector: "[kbq-app-switcher-dropdown-site]", inputs: { site: { classPropertyName: "site", publicName: "kbq-app-switcher-dropdown-site", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "menuitem" }, properties: { "class.kbq-dropdown-item": "false", "attr.aria-haspopup": "isNested ? 'menu' : null" }, classAttribute: "kbq-app-switcher-dropdown-site" }, providers: [
|
|
136
346
|
{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqAppSwitcherDropdownSite },
|
|
137
347
|
{ provide: KbqDropdownItem, useExisting: KbqAppSwitcherDropdownSite }
|
|
138
348
|
], exportAs: ["kbqAppSwitcherDropdownSite"], usesInheritance: true, ngImport: i0, template: `
|
|
139
|
-
<span class="kbq-app-switcher-dropdown-site__name">{{ site.name }}</span>
|
|
349
|
+
<span class="kbq-app-switcher-dropdown-site__name">{{ site().name }}</span>
|
|
140
350
|
|
|
141
|
-
@if (site.status) {
|
|
142
|
-
<kbq-badge class="kbq-app-switcher-dropdown-site__badge" [compact]="true">{{
|
|
351
|
+
@if (site().status; as status) {
|
|
352
|
+
<kbq-badge class="kbq-app-switcher-dropdown-site__badge" [compact]="true">{{ status }}</kbq-badge>
|
|
143
353
|
}
|
|
144
354
|
|
|
145
355
|
@if (isNested) {
|
|
146
356
|
<i
|
|
147
357
|
kbq-icon="kbq-chevron-right-s_16"
|
|
358
|
+
aria-hidden="true"
|
|
148
359
|
class="kbq-app-switcher-dropdown-item-trigger__icon"
|
|
149
360
|
[color]="componentColors.ContrastFade"
|
|
150
361
|
></i>
|
|
151
362
|
}
|
|
152
|
-
`, isInline: true, styles: ["@
|
|
363
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-inline-start:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-end-start-radius:0;border-end-end-radius:0;border-start-end-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){corner-shape:squircle;border-start-end-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){corner-shape:squircle;border-end-start-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-end-start-radius:0;border-end-end-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-start-end-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-app-switcher-dropdown-site{display:flex;flex-direction:row;justify-content:space-between;width:100%;min-height:var(--kbq-size-3xl);text-decoration:none;border-radius:var(--kbq-size-xs)}@supports (corner-shape: squircle){.kbq-app-switcher-dropdown-site{corner-shape:squircle;border-radius:clamp(var(--kbq-size-xs) * 1.85,var(--kbq-size-xs) * 2.3 - 3.6px,var(--kbq-size-xs) * 2)}}.kbq-app-switcher-dropdown-site{-webkit-user-select:none;user-select:none;position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-size-s);border:var(--kbq-size-3xs) solid transparent;padding:var(--kbq-size-xxs) calc(var(--kbq-size-m) - var(--kbq-size-3xs))}.kbq-app-switcher-dropdown-site .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-app-switcher-dropdown-site .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-app-switcher-dropdown-site .kbq-list-text:empty{display:none}.kbq-app-switcher-dropdown-site .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-app-switcher-dropdown-site .kbq-list-option-caption{padding-top:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-site{padding:var(--kbq-size-xxs) var(--kbq-size-m)}.kbq-app-switcher-dropdown-site .kbq-app-switcher-dropdown-item-trigger__icon,.kbq-app-switcher-dropdown-site .kbq-badge{margin-top:var(--kbq-size-3xs);align-self:flex-start}.kbq-app-switcher-dropdown-site{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-app-switcher-dropdown-site.kbq-dropdown-item_highlighted,.kbq-app-switcher-dropdown-site:hover,.kbq-app-switcher-dropdown-site.cdk-keyboard-focused{background:var(--kbq-states-background-transparent-hover)}.kbq-app-switcher-dropdown-site:active,.kbq-app-switcher-dropdown-site.kbq-active{background:var(--kbq-states-background-transparent-active)}.kbq-app-switcher-dropdown-site{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n"], dependencies: [{ kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["aria-hidden", "iconSize", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqBadgeModule }, { kind: "component", type: i1.KbqBadge, selector: "kbq-badge", inputs: ["compact", "outline", "badgeColor"] }, { kind: "directive", type: i1.KbqBadgeCssStyler, selector: "kbq-badge" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
153
364
|
}
|
|
154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
365
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherDropdownSite, decorators: [{
|
|
155
366
|
type: Component,
|
|
156
367
|
args: [{ selector: '[kbq-app-switcher-dropdown-site]', imports: [
|
|
157
368
|
KbqIcon,
|
|
158
369
|
KbqBadgeModule
|
|
159
370
|
], template: `
|
|
160
|
-
<span class="kbq-app-switcher-dropdown-site__name">{{ site.name }}</span>
|
|
371
|
+
<span class="kbq-app-switcher-dropdown-site__name">{{ site().name }}</span>
|
|
161
372
|
|
|
162
|
-
@if (site.status) {
|
|
163
|
-
<kbq-badge class="kbq-app-switcher-dropdown-site__badge" [compact]="true">{{
|
|
373
|
+
@if (site().status; as status) {
|
|
374
|
+
<kbq-badge class="kbq-app-switcher-dropdown-site__badge" [compact]="true">{{ status }}</kbq-badge>
|
|
164
375
|
}
|
|
165
376
|
|
|
166
377
|
@if (isNested) {
|
|
167
378
|
<i
|
|
168
379
|
kbq-icon="kbq-chevron-right-s_16"
|
|
380
|
+
aria-hidden="true"
|
|
169
381
|
class="kbq-app-switcher-dropdown-item-trigger__icon"
|
|
170
382
|
[color]="componentColors.ContrastFade"
|
|
171
383
|
></i>
|
|
@@ -177,94 +389,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
177
389
|
class: 'kbq-app-switcher-dropdown-site',
|
|
178
390
|
role: 'menuitem',
|
|
179
391
|
'[class.kbq-dropdown-item]': 'false',
|
|
180
|
-
|
|
392
|
+
// `tabindex` comes from `KbqDropdownItem`: a second binding here would read its signal again after the others.
|
|
181
393
|
'[attr.aria-haspopup]': "isNested ? 'menu' : null"
|
|
182
|
-
}, exportAs: 'kbqAppSwitcherDropdownSite', styles: ["@
|
|
183
|
-
}], propDecorators: { site: [{
|
|
184
|
-
type: Input,
|
|
185
|
-
args: ['kbq-app-switcher-dropdown-site']
|
|
186
|
-
}] } });
|
|
394
|
+
}, exportAs: 'kbqAppSwitcherDropdownSite', styles: ["@charset \"UTF-8\";.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-inline-start:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-end-start-radius:0;border-end-end-radius:0;border-start-end-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){corner-shape:squircle;border-start-end-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){corner-shape:squircle;border-end-start-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-end-start-radius:0;border-end-end-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-start-end-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-app-switcher-dropdown-site{display:flex;flex-direction:row;justify-content:space-between;width:100%;min-height:var(--kbq-size-3xl);text-decoration:none;border-radius:var(--kbq-size-xs)}@supports (corner-shape: squircle){.kbq-app-switcher-dropdown-site{corner-shape:squircle;border-radius:clamp(var(--kbq-size-xs) * 1.85,var(--kbq-size-xs) * 2.3 - 3.6px,var(--kbq-size-xs) * 2)}}.kbq-app-switcher-dropdown-site{-webkit-user-select:none;user-select:none;position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-size-s);border:var(--kbq-size-3xs) solid transparent;padding:var(--kbq-size-xxs) calc(var(--kbq-size-m) - var(--kbq-size-3xs))}.kbq-app-switcher-dropdown-site .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-app-switcher-dropdown-site .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-app-switcher-dropdown-site .kbq-list-text:empty{display:none}.kbq-app-switcher-dropdown-site .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-app-switcher-dropdown-site .kbq-list-option-caption{padding-top:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-site{padding:var(--kbq-size-xxs) var(--kbq-size-m)}.kbq-app-switcher-dropdown-site .kbq-app-switcher-dropdown-item-trigger__icon,.kbq-app-switcher-dropdown-site .kbq-badge{margin-top:var(--kbq-size-3xs);align-self:flex-start}.kbq-app-switcher-dropdown-site{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-app-switcher-dropdown-site.kbq-dropdown-item_highlighted,.kbq-app-switcher-dropdown-site:hover,.kbq-app-switcher-dropdown-site.cdk-keyboard-focused{background:var(--kbq-states-background-transparent-hover)}.kbq-app-switcher-dropdown-site:active,.kbq-app-switcher-dropdown-site.kbq-active{background:var(--kbq-states-background-transparent-active)}.kbq-app-switcher-dropdown-site{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n"] }]
|
|
395
|
+
}], propDecorators: { site: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbq-app-switcher-dropdown-site", required: true }] }] } });
|
|
187
396
|
|
|
188
397
|
/** @docs-private */
|
|
189
398
|
class KbqAppSwitcherListItem extends KbqDropdownItem {
|
|
190
399
|
constructor() {
|
|
191
400
|
super(...arguments);
|
|
192
|
-
this.
|
|
193
|
-
|
|
401
|
+
this.iconSanitizer = inject(KbqAppSwitcherIconSanitizer);
|
|
402
|
+
/** Application (or synthetic app group) rendered by this row. */
|
|
403
|
+
this.app = input.required(...(ngDevMode ? [{ debugName: "app" }] : /* istanbul ignore next */ []));
|
|
404
|
+
/** Whether the row is a group header carrying the expand/collapse toggle. */
|
|
405
|
+
this.toggle = input(false, { ...(ngDevMode ? { debugName: "toggle" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
194
406
|
/** Search query to highlight within the app name. */
|
|
195
|
-
this.highlightText = input('', ...(ngDevMode ? [{ debugName: "highlightText" }] : []));
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
407
|
+
this.highlightText = input('', ...(ngDevMode ? [{ debugName: "highlightText" }] : /* istanbul ignore next */ []));
|
|
408
|
+
/** Whether the group's aliases are hidden. */
|
|
409
|
+
this.collapsed = model(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
410
|
+
/**
|
|
411
|
+
* Inline SVG of the app icon, sanitized against an SVG allow-list.
|
|
412
|
+
*
|
|
413
|
+
* Computed from the `app` input instead of being called from the template, so the `SafeHtml` is produced
|
|
414
|
+
* once per app rather than on every change-detection pass — a fresh object would make `[innerHtml]`
|
|
415
|
+
* re-parse the SVG each time.
|
|
416
|
+
*/
|
|
417
|
+
this.safeIcon = computed(() => this.iconSanitizer.sanitize(this.app().icon), ...(ngDevMode ? [{ debugName: "safeIcon" }] : /* istanbul ignore next */ []));
|
|
199
418
|
}
|
|
419
|
+
/** Toggles the group when this row is a group header; plain rows keep their link behaviour. */
|
|
200
420
|
clickHandler(event) {
|
|
201
421
|
if (this.toggle()) {
|
|
202
422
|
event.stopPropagation();
|
|
203
423
|
event.preventDefault();
|
|
204
|
-
this.collapsed
|
|
424
|
+
this.collapsed.set(!this.collapsed());
|
|
205
425
|
}
|
|
206
426
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAppSwitcherListItem, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
211
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqAppSwitcherListItem, isStandalone: true, selector: "[kbq-app-switcher-list-item]", inputs: { app: { classPropertyName: "app", publicName: "app", isSignal: false, isRequired: false, transformFunction: null }, toggle: { classPropertyName: "toggle", publicName: "toggle", isSignal: true, isRequired: false, transformFunction: null }, highlightText: { classPropertyName: "highlightText", publicName: "highlightText", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, host: { attributes: { "role": "menuitem" }, listeners: { "click": "clickHandler($event)" }, properties: { "class.kbq-dropdown-item": "false", "attr.tabindex": "getTabIndex()", "attr.aria-expanded": "toggle() ? !collapsed : null" }, classAttribute: "kbq-app-switcher-list-item" }, providers: [
|
|
427
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherListItem, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
428
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqAppSwitcherListItem, isStandalone: true, selector: "[kbq-app-switcher-list-item]", inputs: { app: { classPropertyName: "app", publicName: "app", isSignal: true, isRequired: true, transformFunction: null }, toggle: { classPropertyName: "toggle", publicName: "toggle", isSignal: true, isRequired: false, transformFunction: null }, highlightText: { classPropertyName: "highlightText", publicName: "highlightText", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, host: { attributes: { "role": "menuitem" }, listeners: { "click": "clickHandler($event)" }, properties: { "class.kbq-dropdown-item": "false", "attr.aria-expanded": "toggle() ? !collapsed() : null" }, classAttribute: "kbq-app-switcher-list-item" }, providers: [
|
|
212
429
|
{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqAppSwitcherListItem },
|
|
213
430
|
{ provide: KbqDropdownItem, useExisting: KbqAppSwitcherListItem }
|
|
214
431
|
], exportAs: ["kbqAppSwitcherApp"], usesInheritance: true, ngImport: i0, template: `
|
|
215
|
-
@if (
|
|
216
|
-
<span class="kbq-app-switcher-list-item__icon" [innerHtml]="
|
|
217
|
-
} @else if (app.iconSrc) {
|
|
218
|
-
<span class="kbq-app-switcher-list-item__icon">
|
|
219
|
-
<img alt="
|
|
432
|
+
@if (safeIcon(); as icon) {
|
|
433
|
+
<span class="kbq-app-switcher-list-item__icon" aria-hidden="true" [innerHtml]="icon"></span>
|
|
434
|
+
} @else if (app().iconSrc; as iconSrc) {
|
|
435
|
+
<span class="kbq-app-switcher-list-item__icon" aria-hidden="true">
|
|
436
|
+
<img alt="" width="24" height="24" [ngSrc]="iconSrc" />
|
|
220
437
|
</span>
|
|
221
438
|
}
|
|
222
439
|
|
|
223
440
|
<div class="kbq-app-switcher-list-item__container">
|
|
224
441
|
<div
|
|
225
442
|
class="kbq-app-switcher-list-item__name"
|
|
226
|
-
[innerHTML]="app.name | kbqHighlightBackground: highlightText()"
|
|
443
|
+
[innerHTML]="app().name | kbqHighlightBackground: highlightText()"
|
|
227
444
|
></div>
|
|
228
|
-
@if (app.caption) {
|
|
229
|
-
<div class="kbq-app-switcher-list-item__caption">{{
|
|
445
|
+
@if (app().caption; as caption) {
|
|
446
|
+
<div class="kbq-app-switcher-list-item__caption">{{ caption }}</div>
|
|
230
447
|
}
|
|
231
448
|
</div>
|
|
232
449
|
|
|
233
450
|
@if (toggle()) {
|
|
234
|
-
<div class="kbq-app-switcher-list-item__toggle" [class.kbq-expanded]="!collapsed">
|
|
235
|
-
<i kbq-icon="kbq-chevron-down-s_16" [color]="'contrast-fade'"></i>
|
|
451
|
+
<div class="kbq-app-switcher-list-item__toggle" [class.kbq-expanded]="!collapsed()">
|
|
452
|
+
<i kbq-icon="kbq-chevron-down-s_16" aria-hidden="true" [color]="'contrast-fade'"></i>
|
|
236
453
|
</div>
|
|
237
454
|
}
|
|
238
|
-
`, isInline: true, styles: ["@
|
|
455
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-inline-start:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-end-start-radius:0;border-end-end-radius:0;border-start-end-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){corner-shape:squircle;border-start-end-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){corner-shape:squircle;border-end-start-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-end-start-radius:0;border-end-end-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-start-end-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-app-switcher-list-item{position:relative;display:flex;flex-direction:row;max-width:100%;min-height:var(--kbq-app-switcher-size-list-item-height-min, 38px);border-radius:var(--kbq-size-s)}@supports (corner-shape: squircle){.kbq-app-switcher-list-item{corner-shape:squircle;border-radius:clamp(var(--kbq-size-s) * 1.85,var(--kbq-size-s) * 2.3 - 3.6px,var(--kbq-size-s) * 2)}}.kbq-app-switcher-list-item{padding:var(--kbq-size-xxs) var(--kbq-size-m) var(--kbq-size-xs) var(--kbq-size-m);-webkit-user-select:none;user-select:none;text-decoration:none;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;cursor:pointer}.kbq-app-switcher-list-item.kbq-app-switcher-site_nested{margin-left:var(--kbq-size-xxl);border-top-left-radius:unset;border-bottom-left-radius:unset}.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:after{content:\"\";position:absolute;left:-1px;top:0;height:100%;border-left-width:1px;border-left-style:solid}.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:has(+:not(.kbq-app-switcher-site_nested)),.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:last-child{border-bottom-left-radius:var(--kbq-size-s)}@supports (corner-shape: squircle){.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:has(+:not(.kbq-app-switcher-site_nested)),.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:last-child{corner-shape:squircle;border-bottom-left-radius:clamp(var(--kbq-size-s) * 1.85,var(--kbq-size-s) * 2.3 - 3.6px,var(--kbq-size-s) * 2)}}.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:has(+:not(.kbq-app-switcher-site_nested)):after,.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:last-child:after{top:0;width:var(--kbq-size-m);height:var(--kbq-size-xxl);border-bottom-left-radius:var(--kbq-size-s);border-bottom-width:1px;border-bottom-style:solid}.kbq-app-switcher-list-item__toggle{position:absolute;display:none;align-items:center;justify-content:center;top:var(--kbq-size-m);left:var(--kbq-size-m);width:var(--kbq-size-xxl);height:var(--kbq-size-xxl);border-radius:var(--kbq-size-xxs)}@supports (corner-shape: squircle){.kbq-app-switcher-list-item__toggle{corner-shape:squircle;border-radius:clamp(var(--kbq-size-xxs) * 1.85,var(--kbq-size-xxs) * 2.3 - 3.6px,var(--kbq-size-xxs) * 2)}}.kbq-app-switcher-list-item__toggle .kbq-icon{transform:rotate(0)}.kbq-app-switcher-list-item__toggle.kbq-expanded .kbq-icon{transform:rotate(180deg)}@media(hover:none){.kbq-app-switcher-list-item__toggle{display:flex}.kbq-app-switcher-list-item:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon{visibility:hidden}}.kbq-app-switcher-list-item__icon{padding-top:var(--kbq-size-s);padding-right:var(--kbq-size-m)}.kbq-app-switcher-list-item__container{max-width:100%;min-width:0;align-self:center}.kbq-app-switcher-list-item__container .kbq-app-switcher-list-item__name,.kbq-app-switcher-list-item__container .kbq-app-switcher-list-item__caption{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-app-switcher-site_nested:after{border-left-color:var(--kbq-line-contrast-less);border-bottom-color:var(--kbq-line-contrast-less)}.kbq-app-switcher-list-item__caption{color:var(--kbq-foreground-contrast-secondary)}.kbq-app-switcher-list-item:hover:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon,.kbq-app-switcher-list-item.kbq-hover:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon,.kbq-app-switcher-list-item.kbq-focused:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon,.kbq-app-switcher-list-item.cdk-keyboard-focused:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon{visibility:hidden}.kbq-app-switcher-list-item:hover .kbq-app-switcher-list-item__toggle,.kbq-app-switcher-list-item.kbq-hover .kbq-app-switcher-list-item__toggle,.kbq-app-switcher-list-item.kbq-focused .kbq-app-switcher-list-item__toggle,.kbq-app-switcher-list-item.cdk-keyboard-focused .kbq-app-switcher-list-item__toggle{display:flex}.kbq-app-switcher-list-item:hover,.kbq-app-switcher-list-item.kbq-hover,.kbq-app-switcher-list-item.cdk-keyboard-focused,.kbq-app-switcher-list-item:hover .kbq-app-switcher-list-item__toggle,.kbq-app-switcher-list-item.kbq-hover .kbq-app-switcher-list-item__toggle,.kbq-app-switcher-list-item.cdk-keyboard-focused .kbq-app-switcher-list-item__toggle{background:var(--kbq-states-background-transparent-hover)}.kbq-app-switcher-list-item:active,.kbq-app-switcher-list-item.kbq-active{background:var(--kbq-states-background-transparent-active)}.kbq-app-switcher-list-item.kbq-selected{background:var(--kbq-background-theme-less)}.kbq-app-switcher-list-item.kbq-selected:hover,.kbq-app-switcher-list-item.kbq-selected.kbq-hover,.kbq-app-switcher-list-item.kbq-selected.cdk-keyboard-focused{background:var(--kbq-states-background-theme-less-hover)}.kbq-app-switcher-list-item.kbq-selected:active,.kbq-app-switcher-list-item.kbq-selected.kbq-active{background:var(--kbq-states-background-theme-less-active)}.kbq-app-switcher-list-item{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-app-switcher-list-item__name{font-size:var(--kbq-typography-text-normal-medium-font-size);font-style:var(--kbq-typography-text-normal-medium-font-style);font-weight:var(--kbq-typography-text-normal-medium-font-weight);line-height:var(--kbq-typography-text-normal-medium-line-height);font-family:var(--kbq-typography-text-normal-medium-font-family);text-transform:var(--kbq-typography-text-normal-medium-text-transform);font-feature-settings:var(--kbq-typography-text-normal-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-medium-letter-spacing)}.kbq-app-switcher-list-item__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1$1.KbqIcon, selector: "[kbq-icon]", inputs: ["aria-hidden", "iconSize", "autoColor", "kbq-icon"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "pipe", type: KbqHighlightBackgroundPipe, name: "kbqHighlightBackground" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
239
456
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherListItem, decorators: [{
|
|
241
458
|
type: Component,
|
|
242
459
|
args: [{ selector: '[kbq-app-switcher-list-item]', imports: [
|
|
243
460
|
KbqIconModule,
|
|
244
461
|
NgOptimizedImage,
|
|
245
462
|
KbqHighlightBackgroundPipe
|
|
246
463
|
], template: `
|
|
247
|
-
@if (
|
|
248
|
-
<span class="kbq-app-switcher-list-item__icon" [innerHtml]="
|
|
249
|
-
} @else if (app.iconSrc) {
|
|
250
|
-
<span class="kbq-app-switcher-list-item__icon">
|
|
251
|
-
<img alt="
|
|
464
|
+
@if (safeIcon(); as icon) {
|
|
465
|
+
<span class="kbq-app-switcher-list-item__icon" aria-hidden="true" [innerHtml]="icon"></span>
|
|
466
|
+
} @else if (app().iconSrc; as iconSrc) {
|
|
467
|
+
<span class="kbq-app-switcher-list-item__icon" aria-hidden="true">
|
|
468
|
+
<img alt="" width="24" height="24" [ngSrc]="iconSrc" />
|
|
252
469
|
</span>
|
|
253
470
|
}
|
|
254
471
|
|
|
255
472
|
<div class="kbq-app-switcher-list-item__container">
|
|
256
473
|
<div
|
|
257
474
|
class="kbq-app-switcher-list-item__name"
|
|
258
|
-
[innerHTML]="app.name | kbqHighlightBackground: highlightText()"
|
|
475
|
+
[innerHTML]="app().name | kbqHighlightBackground: highlightText()"
|
|
259
476
|
></div>
|
|
260
|
-
@if (app.caption) {
|
|
261
|
-
<div class="kbq-app-switcher-list-item__caption">{{
|
|
477
|
+
@if (app().caption; as caption) {
|
|
478
|
+
<div class="kbq-app-switcher-list-item__caption">{{ caption }}</div>
|
|
262
479
|
}
|
|
263
480
|
</div>
|
|
264
481
|
|
|
265
482
|
@if (toggle()) {
|
|
266
|
-
<div class="kbq-app-switcher-list-item__toggle" [class.kbq-expanded]="!collapsed">
|
|
267
|
-
<i kbq-icon="kbq-chevron-down-s_16" [color]="'contrast-fade'"></i>
|
|
483
|
+
<div class="kbq-app-switcher-list-item__toggle" [class.kbq-expanded]="!collapsed()">
|
|
484
|
+
<i kbq-icon="kbq-chevron-down-s_16" aria-hidden="true" [color]="'contrast-fade'"></i>
|
|
268
485
|
</div>
|
|
269
486
|
}
|
|
270
487
|
`, providers: [
|
|
@@ -274,16 +491,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
274
491
|
class: 'kbq-app-switcher-list-item',
|
|
275
492
|
role: 'menuitem',
|
|
276
493
|
'[class.kbq-dropdown-item]': 'false',
|
|
277
|
-
|
|
278
|
-
'[attr.aria-expanded]': 'toggle() ? !collapsed : null',
|
|
494
|
+
// `tabindex` comes from `KbqDropdownItem`: a second binding here would read its signal again after the others.
|
|
495
|
+
'[attr.aria-expanded]': 'toggle() ? !collapsed() : null',
|
|
279
496
|
'(click)': 'clickHandler($event)'
|
|
280
|
-
}, exportAs: 'kbqAppSwitcherApp', styles: ["@
|
|
281
|
-
}], propDecorators: { app: [{
|
|
282
|
-
type: Input
|
|
283
|
-
}], toggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggle", required: false }] }], highlightText: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightText", required: false }] }], collapsed: [{
|
|
284
|
-
type: Input,
|
|
285
|
-
args: [{ transform: booleanAttribute }]
|
|
286
|
-
}] } });
|
|
497
|
+
}, exportAs: 'kbqAppSwitcherApp', styles: ["@charset \"UTF-8\";.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-inline-start:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-end-start-radius:0;border-end-end-radius:0;border-start-end-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){corner-shape:squircle;border-start-end-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){corner-shape:squircle;border-end-start-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-end-start-radius:0;border-end-end-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-start-end-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-app-switcher-list-item{position:relative;display:flex;flex-direction:row;max-width:100%;min-height:var(--kbq-app-switcher-size-list-item-height-min, 38px);border-radius:var(--kbq-size-s)}@supports (corner-shape: squircle){.kbq-app-switcher-list-item{corner-shape:squircle;border-radius:clamp(var(--kbq-size-s) * 1.85,var(--kbq-size-s) * 2.3 - 3.6px,var(--kbq-size-s) * 2)}}.kbq-app-switcher-list-item{padding:var(--kbq-size-xxs) var(--kbq-size-m) var(--kbq-size-xs) var(--kbq-size-m);-webkit-user-select:none;user-select:none;text-decoration:none;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;cursor:pointer}.kbq-app-switcher-list-item.kbq-app-switcher-site_nested{margin-left:var(--kbq-size-xxl);border-top-left-radius:unset;border-bottom-left-radius:unset}.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:after{content:\"\";position:absolute;left:-1px;top:0;height:100%;border-left-width:1px;border-left-style:solid}.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:has(+:not(.kbq-app-switcher-site_nested)),.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:last-child{border-bottom-left-radius:var(--kbq-size-s)}@supports (corner-shape: squircle){.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:has(+:not(.kbq-app-switcher-site_nested)),.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:last-child{corner-shape:squircle;border-bottom-left-radius:clamp(var(--kbq-size-s) * 1.85,var(--kbq-size-s) * 2.3 - 3.6px,var(--kbq-size-s) * 2)}}.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:has(+:not(.kbq-app-switcher-site_nested)):after,.kbq-app-switcher-list-item.kbq-app-switcher-site_nested:last-child:after{top:0;width:var(--kbq-size-m);height:var(--kbq-size-xxl);border-bottom-left-radius:var(--kbq-size-s);border-bottom-width:1px;border-bottom-style:solid}.kbq-app-switcher-list-item__toggle{position:absolute;display:none;align-items:center;justify-content:center;top:var(--kbq-size-m);left:var(--kbq-size-m);width:var(--kbq-size-xxl);height:var(--kbq-size-xxl);border-radius:var(--kbq-size-xxs)}@supports (corner-shape: squircle){.kbq-app-switcher-list-item__toggle{corner-shape:squircle;border-radius:clamp(var(--kbq-size-xxs) * 1.85,var(--kbq-size-xxs) * 2.3 - 3.6px,var(--kbq-size-xxs) * 2)}}.kbq-app-switcher-list-item__toggle .kbq-icon{transform:rotate(0)}.kbq-app-switcher-list-item__toggle.kbq-expanded .kbq-icon{transform:rotate(180deg)}@media(hover:none){.kbq-app-switcher-list-item__toggle{display:flex}.kbq-app-switcher-list-item:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon{visibility:hidden}}.kbq-app-switcher-list-item__icon{padding-top:var(--kbq-size-s);padding-right:var(--kbq-size-m)}.kbq-app-switcher-list-item__container{max-width:100%;min-width:0;align-self:center}.kbq-app-switcher-list-item__container .kbq-app-switcher-list-item__name,.kbq-app-switcher-list-item__container .kbq-app-switcher-list-item__caption{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-app-switcher-site_nested:after{border-left-color:var(--kbq-line-contrast-less);border-bottom-color:var(--kbq-line-contrast-less)}.kbq-app-switcher-list-item__caption{color:var(--kbq-foreground-contrast-secondary)}.kbq-app-switcher-list-item:hover:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon,.kbq-app-switcher-list-item.kbq-hover:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon,.kbq-app-switcher-list-item.kbq-focused:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon,.kbq-app-switcher-list-item.cdk-keyboard-focused:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon{visibility:hidden}.kbq-app-switcher-list-item:hover .kbq-app-switcher-list-item__toggle,.kbq-app-switcher-list-item.kbq-hover .kbq-app-switcher-list-item__toggle,.kbq-app-switcher-list-item.kbq-focused .kbq-app-switcher-list-item__toggle,.kbq-app-switcher-list-item.cdk-keyboard-focused .kbq-app-switcher-list-item__toggle{display:flex}.kbq-app-switcher-list-item:hover,.kbq-app-switcher-list-item.kbq-hover,.kbq-app-switcher-list-item.cdk-keyboard-focused,.kbq-app-switcher-list-item:hover .kbq-app-switcher-list-item__toggle,.kbq-app-switcher-list-item.kbq-hover .kbq-app-switcher-list-item__toggle,.kbq-app-switcher-list-item.cdk-keyboard-focused .kbq-app-switcher-list-item__toggle{background:var(--kbq-states-background-transparent-hover)}.kbq-app-switcher-list-item:active,.kbq-app-switcher-list-item.kbq-active{background:var(--kbq-states-background-transparent-active)}.kbq-app-switcher-list-item.kbq-selected{background:var(--kbq-background-theme-less)}.kbq-app-switcher-list-item.kbq-selected:hover,.kbq-app-switcher-list-item.kbq-selected.kbq-hover,.kbq-app-switcher-list-item.kbq-selected.cdk-keyboard-focused{background:var(--kbq-states-background-theme-less-hover)}.kbq-app-switcher-list-item.kbq-selected:active,.kbq-app-switcher-list-item.kbq-selected.kbq-active{background:var(--kbq-states-background-theme-less-active)}.kbq-app-switcher-list-item{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-app-switcher-list-item__name{font-size:var(--kbq-typography-text-normal-medium-font-size);font-style:var(--kbq-typography-text-normal-medium-font-style);font-weight:var(--kbq-typography-text-normal-medium-font-weight);line-height:var(--kbq-typography-text-normal-medium-line-height);font-family:var(--kbq-typography-text-normal-medium-font-family);text-transform:var(--kbq-typography-text-normal-medium-text-transform);font-feature-settings:var(--kbq-typography-text-normal-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-medium-letter-spacing)}.kbq-app-switcher-list-item__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"] }]
|
|
498
|
+
}], propDecorators: { app: [{ type: i0.Input, args: [{ isSignal: true, alias: "app", required: true }] }], toggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggle", required: false }] }], highlightText: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightText", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }] } });
|
|
287
499
|
|
|
288
500
|
/** @docs-private */
|
|
289
501
|
function defaultGroupBy(app, groups, untyped) {
|
|
@@ -301,13 +513,52 @@ function defaultGroupBy(app, groups, untyped) {
|
|
|
301
513
|
aliases: [app],
|
|
302
514
|
icon: app.icon,
|
|
303
515
|
iconSrc: app.iconSrc,
|
|
304
|
-
|
|
516
|
+
// The type name, not an empty string: the rendered rows are tracked by `id`, and a falsy one
|
|
517
|
+
// would make every group fall back to the name-based key.
|
|
518
|
+
id: appType
|
|
305
519
|
};
|
|
306
520
|
}
|
|
307
521
|
}
|
|
308
522
|
}
|
|
523
|
+
/**
|
|
524
|
+
* Runs `groupBy` over `apps` and returns the rendered order: synthetic groups big enough to be collapsible
|
|
525
|
+
* first, then every remaining application as a plain row.
|
|
526
|
+
*
|
|
527
|
+
* A group is kept only when it holds strictly more than `minAppsForGrouping` applications; smaller groups are
|
|
528
|
+
* flattened back into plain rows.
|
|
529
|
+
*/
|
|
530
|
+
function makeGroupsForApps(apps, minAppsForGrouping, groupBy = defaultGroupBy) {
|
|
531
|
+
const groups = {};
|
|
532
|
+
const untyped = [];
|
|
533
|
+
const groupedApps = [];
|
|
534
|
+
apps.forEach((app) => groupBy(app, groups, untyped));
|
|
535
|
+
Object.values(groups).forEach((group) => {
|
|
536
|
+
const { aliases } = group;
|
|
537
|
+
if (!aliases?.length) {
|
|
538
|
+
// A custom `groupBy` is free to emit a group without aliases - render it as a plain row. An empty
|
|
539
|
+
// array has to be dropped too: the template gates the group header on the presence of `aliases`,
|
|
540
|
+
// and `[]` is truthy, so it would render a toggle that expands to nothing.
|
|
541
|
+
untyped.push(aliases ? { ...group, aliases: undefined } : group);
|
|
542
|
+
}
|
|
543
|
+
else if (aliases.length > minAppsForGrouping) {
|
|
544
|
+
groupedApps.push(group);
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
untyped.push(...aliases);
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
groupedApps.push(...untyped);
|
|
551
|
+
return groupedApps;
|
|
552
|
+
}
|
|
309
553
|
const KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_SEARCH = 7;
|
|
310
554
|
const KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_GROUPING = 3;
|
|
555
|
+
/**
|
|
556
|
+
* `hideIfNotInViewPort` reads layout (`getBoundingClientRect`) and hangs off `CdkScrollable.elementScrolled()`,
|
|
557
|
+
* which - unlike `ScrollDispatcher.scrolled()` - is not audited by the CDK; coalesce it to roughly one frame.
|
|
558
|
+
*/
|
|
559
|
+
const SCROLL_GEOMETRY_THROTTLE = 16;
|
|
560
|
+
const defaultPlacement = PopUpPlacements.BottomLeft;
|
|
561
|
+
const defaultBackdropClass = 'cdk-overlay-transparent-backdrop';
|
|
311
562
|
/** @docs-private */
|
|
312
563
|
const KBQ_APP_SWITCHER_SCROLL_STRATEGY = new InjectionToken('kbq-app-switcher-scroll-strategy');
|
|
313
564
|
/** @docs-private */
|
|
@@ -322,35 +573,75 @@ const KBQ_APP_SWITCHER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
|
|
|
322
573
|
};
|
|
323
574
|
/** default configuration of app-switcher */
|
|
324
575
|
/** @docs-private */
|
|
325
|
-
const
|
|
326
|
-
/** Injection Token for providing configuration of app-switcher */
|
|
327
|
-
/** @docs-private */
|
|
328
|
-
const KBQ_APP_SWITCHER_CONFIGURATION = new InjectionToken('KbqAppSwitcherConfiguration');
|
|
576
|
+
const KBQ_APP_SWITCHER_DEFAULT_LOCALE_CONFIGURATION = ruRULocaleData.appSwitcher;
|
|
577
|
+
/** Injection Token for providing the default configuration of app-switcher */
|
|
329
578
|
/** @docs-private */
|
|
579
|
+
const KBQ_APP_SWITCHER_LOCALE_CONFIGURATION = new InjectionToken('KbqAppSwitcherLocaleConfiguration', { factory: () => KBQ_APP_SWITCHER_DEFAULT_LOCALE_CONFIGURATION });
|
|
580
|
+
/**
|
|
581
|
+
* Utility provider for `KBQ_APP_SWITCHER_LOCALE_CONFIGURATION`. Only the strings you pass are overridden; the rest
|
|
582
|
+
* keep following the active locale.
|
|
583
|
+
*/
|
|
584
|
+
const kbqAppSwitcherLocaleConfigurationProvider = (configuration) => kbqLocaleConfigurationOverrideProvider('appSwitcher', configuration);
|
|
585
|
+
/** @deprecated Use {@link KBQ_APP_SWITCHER_DEFAULT_LOCALE_CONFIGURATION}. Will be removed in 22.0.0. */
|
|
586
|
+
const KBQ_APP_SWITCHER_DEFAULT_CONFIGURATION = KBQ_APP_SWITCHER_DEFAULT_LOCALE_CONFIGURATION;
|
|
587
|
+
/** @deprecated Use {@link KBQ_APP_SWITCHER_LOCALE_CONFIGURATION}. Will be removed in 22.0.0. */
|
|
588
|
+
const KBQ_APP_SWITCHER_CONFIGURATION = KBQ_APP_SWITCHER_LOCALE_CONFIGURATION;
|
|
589
|
+
/**
|
|
590
|
+
* Providers used by the app-switcher. `KbqAppSwitcherModule` applies them for `NgModule` consumers;
|
|
591
|
+
* standalone consumers that import `KbqAppSwitcherTrigger` directly may add them to their application (or
|
|
592
|
+
* route) providers.
|
|
593
|
+
*
|
|
594
|
+
* Providing them is optional: the only entry is the scroll strategy, and the directive falls back to the
|
|
595
|
+
* default repositioning strategy when the token is absent. The app-switcher renders no focus trap, so - unlike
|
|
596
|
+
* `KbqPopoverModule` and `KbqNotificationCenterModule`, whose templates bind `[cdkTrapFocus]` - it must not
|
|
597
|
+
* swap `FOCUS_TRAP_INERT_STRATEGY`/`FocusTrapFactory`: those are injector-wide and would disable the CDK
|
|
598
|
+
* inert strategy for every other focus trap in the same scope.
|
|
599
|
+
*/
|
|
600
|
+
function kbqAppSwitcherProvider() {
|
|
601
|
+
return [KBQ_APP_SWITCHER_SCROLL_STRATEGY_FACTORY_PROVIDER];
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Popup rendered by `KbqAppSwitcherTrigger`. The trigger attaches it to a CDK overlay itself (see
|
|
605
|
+
* `getOverlayHandleComponentType`) and assigns `trigger` on the created instance, so consumers never place
|
|
606
|
+
* `<kbq-app-switcher>` in a template - `[kbqAppSwitcher]` on the trigger element is the whole public surface.
|
|
607
|
+
*/
|
|
330
608
|
class KbqAppSwitcherComponent extends KbqPopUp {
|
|
331
|
-
/**
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
609
|
+
/** @docs-private */
|
|
610
|
+
get allItems() {
|
|
611
|
+
return this.allItemsList();
|
|
612
|
+
}
|
|
613
|
+
ngOnChanges(changes) {
|
|
614
|
+
// A bound input is handed to its member; unbound, it leaves what code wrote.
|
|
615
|
+
if (changes['triggerInput']) {
|
|
616
|
+
const trigger = this.triggerInput();
|
|
617
|
+
if (trigger !== undefined)
|
|
618
|
+
this.trigger = trigger;
|
|
619
|
+
}
|
|
335
620
|
}
|
|
336
621
|
constructor() {
|
|
337
622
|
super();
|
|
338
|
-
/**
|
|
339
|
-
this.
|
|
340
|
-
this.externalConfiguration = inject(KBQ_APP_SWITCHER_CONFIGURATION, { optional: true });
|
|
623
|
+
/** Strings currently rendered by the popup. */
|
|
624
|
+
this.localeConfiguration = inject(KbqLocaleOverridesDirective, { self: true }).read('appSwitcher', KBQ_APP_SWITCHER_LOCALE_CONFIGURATION);
|
|
341
625
|
/** @docs-private */
|
|
342
626
|
this.searchControl = new FormControl('');
|
|
343
627
|
/** @docs-private */
|
|
344
|
-
this.
|
|
345
|
-
/** @docs-private */
|
|
346
|
-
this.isTrapFocus = false;
|
|
347
|
-
/** @docs-private */
|
|
348
|
-
this.input = viewChild(KbqInput, ...(ngDevMode ? [{ debugName: "input" }] : []));
|
|
628
|
+
this.filteredSites = [];
|
|
349
629
|
/** @docs-private */
|
|
350
|
-
this.
|
|
630
|
+
this.prefix = 'kbq-app-switcher';
|
|
351
631
|
/** @docs-private */
|
|
632
|
+
this.input = viewChild(KbqInput, ...(ngDevMode ? [{ debugName: "input" }] : /* istanbul ignore next */ []));
|
|
633
|
+
/**
|
|
634
|
+
* The other-sites flyout, closed whenever the pointer moves back over the main list.
|
|
635
|
+
*
|
|
636
|
+
* Not `required`: it only exists in multi-site mode, and reading a required query with no match throws -
|
|
637
|
+
* which a single-site switcher with a search field would do on the first `mouseenter`.
|
|
638
|
+
*
|
|
639
|
+
* @docs-private
|
|
640
|
+
*/
|
|
641
|
+
this.otherSites = viewChild('otherSites', ...(ngDevMode ? [{ debugName: "otherSites" }] : /* istanbul ignore next */ []));
|
|
642
|
+
this.allItemsQuery = viewChildren(KbqDropdownItem, ...(ngDevMode ? [{ debugName: "allItemsQuery" }] : /* istanbul ignore next */ []));
|
|
643
|
+
this.allItemsList = kbqQueryListFrom(this.allItemsQuery);
|
|
352
644
|
this.menuItems = new QueryList();
|
|
353
|
-
/** @docs-private */
|
|
354
645
|
this.dir = inject(Directionality, { optional: true });
|
|
355
646
|
/**
|
|
356
647
|
* CSS class marking a nested alias row, bound in the template (see app-switcher.html). Kept as a
|
|
@@ -358,14 +649,8 @@ class KbqAppSwitcherComponent extends KbqPopUp {
|
|
|
358
649
|
* classList check can't silently drift from the template's class binding if the class is renamed.
|
|
359
650
|
*/
|
|
360
651
|
this.nestedAliasClass = 'kbq-app-switcher-site_nested';
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
this.changeDetectorRef.markForCheck();
|
|
364
|
-
};
|
|
365
|
-
this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(this.updateLocaleParams);
|
|
366
|
-
if (!this.localeService) {
|
|
367
|
-
this.initDefaultParams();
|
|
368
|
-
}
|
|
652
|
+
/** @docs-private */
|
|
653
|
+
this.triggerInput = input(undefined, { ...(ngDevMode ? { debugName: "triggerInput" } : /* istanbul ignore next */ {}), alias: 'trigger' });
|
|
369
654
|
}
|
|
370
655
|
ngAfterViewInit() {
|
|
371
656
|
const input = this.input();
|
|
@@ -394,18 +679,26 @@ class KbqAppSwitcherComponent extends KbqPopUp {
|
|
|
394
679
|
if (input) {
|
|
395
680
|
input.focus();
|
|
396
681
|
}
|
|
397
|
-
this.visibleChange.subscribe((state) => {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
682
|
+
this.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((state) => {
|
|
683
|
+
// Not memoized on `offset`: `applyPopupMargins` picks the margin side from the current
|
|
684
|
+
// `kbq-app-switcher_placement-*` classes, so the write depends on the placement too.
|
|
685
|
+
if (!state || this.offset === null)
|
|
686
|
+
return;
|
|
687
|
+
applyPopupMargins(this.renderer, this.elementRef.nativeElement, this.prefix, `${this.offset}px`);
|
|
401
688
|
});
|
|
402
|
-
this.searchControl.valueChanges
|
|
689
|
+
this.searchControl.valueChanges
|
|
690
|
+
.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
|
|
691
|
+
.subscribe((value) => {
|
|
403
692
|
this.filteredSites = this.filterSites(value);
|
|
404
693
|
// Switching between the flat list and the search results swaps the rendered items;
|
|
405
694
|
// drop any stale active item so navigation restarts from the top.
|
|
406
695
|
this.keyManager?.setActiveItem(-1);
|
|
407
696
|
});
|
|
408
697
|
}
|
|
698
|
+
ngAfterViewChecked() {
|
|
699
|
+
// Syncs the list here so `changes` emits once this view is checked.
|
|
700
|
+
this.allItemsList();
|
|
701
|
+
}
|
|
409
702
|
/** Releases the internal roving-focus menu QueryList. */
|
|
410
703
|
ngOnDestroy() {
|
|
411
704
|
this.menuItems.destroy();
|
|
@@ -416,18 +709,20 @@ class KbqAppSwitcherComponent extends KbqPopUp {
|
|
|
416
709
|
super.updateClassMap(placement, customClass, { [`${this.prefix}_${size}`]: !!size });
|
|
417
710
|
}
|
|
418
711
|
/** @docs-private */
|
|
419
|
-
updateTrapFocus(isTrapFocus) {
|
|
420
|
-
this.isTrapFocus = isTrapFocus;
|
|
421
|
-
}
|
|
422
|
-
/** @docs-private */
|
|
423
712
|
escapeHandler() {
|
|
424
713
|
this.hide(0);
|
|
425
714
|
}
|
|
426
|
-
/**
|
|
427
|
-
*
|
|
715
|
+
/**
|
|
716
|
+
* Handles keyboard navigation across the app-switcher menu items.
|
|
717
|
+
*
|
|
718
|
+
* @docs-private
|
|
719
|
+
*/
|
|
428
720
|
keydownHandler(event) {
|
|
429
721
|
const keyCode = event.keyCode;
|
|
430
722
|
if (keyCode === ESCAPE) {
|
|
723
|
+
// Spent by a control inside, such as a tooltip closing on it: one key closes one layer.
|
|
724
|
+
if (event.defaultPrevented)
|
|
725
|
+
return;
|
|
431
726
|
// Stop here so Escape closes only this popup instead of bubbling into overlays opened
|
|
432
727
|
// earlier (mirrors KbqDropdown.handleKeydown).
|
|
433
728
|
event.preventDefault();
|
|
@@ -468,8 +763,7 @@ class KbqAppSwitcherComponent extends KbqPopUp {
|
|
|
468
763
|
event.preventDefault();
|
|
469
764
|
// A group header toggles its aliases; any other item activates its underlying link.
|
|
470
765
|
if (activeItem instanceof KbqAppSwitcherListItem && activeItem.toggle()) {
|
|
471
|
-
activeItem.collapsed
|
|
472
|
-
this.markForCheck();
|
|
766
|
+
activeItem.collapsed.set(!activeItem.collapsed());
|
|
473
767
|
}
|
|
474
768
|
else {
|
|
475
769
|
activeItem.getHostElement().click();
|
|
@@ -497,14 +791,12 @@ class KbqAppSwitcherComponent extends KbqPopUp {
|
|
|
497
791
|
const expandKey = rtl ? LEFT_ARROW : RIGHT_ARROW;
|
|
498
792
|
const collapseKey = rtl ? RIGHT_ARROW : LEFT_ARROW;
|
|
499
793
|
if (activeItem.toggle()) {
|
|
500
|
-
if (keyCode === expandKey && activeItem.collapsed) {
|
|
501
|
-
activeItem.collapsed
|
|
502
|
-
this.markForCheck();
|
|
794
|
+
if (keyCode === expandKey && activeItem.collapsed()) {
|
|
795
|
+
activeItem.collapsed.set(false);
|
|
503
796
|
return true;
|
|
504
797
|
}
|
|
505
|
-
if (keyCode === collapseKey && !activeItem.collapsed) {
|
|
506
|
-
activeItem.collapsed
|
|
507
|
-
this.markForCheck();
|
|
798
|
+
if (keyCode === collapseKey && !activeItem.collapsed()) {
|
|
799
|
+
activeItem.collapsed.set(true);
|
|
508
800
|
return true;
|
|
509
801
|
}
|
|
510
802
|
return false;
|
|
@@ -526,19 +818,25 @@ class KbqAppSwitcherComponent extends KbqPopUp {
|
|
|
526
818
|
eventFromInput(event) {
|
|
527
819
|
return !!event.target?.attributes.getNamedItem('kbqinput');
|
|
528
820
|
}
|
|
529
|
-
/**
|
|
821
|
+
/**
|
|
822
|
+
* Syncs the key manager's active item with focus that arrives via Tab, click or a closing flyout.
|
|
530
823
|
* Clears the active item (index -1) when focus lands on a focusable element that isn't one of
|
|
531
824
|
* `menuItems` (e.g. the search field's clear button) - otherwise a stale `activeItem` from before
|
|
532
825
|
* the focus move would keep receiving Enter/Space/arrow-key actions meant for the new target.
|
|
533
|
-
*
|
|
826
|
+
*
|
|
827
|
+
* @docs-private
|
|
828
|
+
*/
|
|
534
829
|
focusinHandler(event) {
|
|
535
830
|
if (!this.keyManager)
|
|
536
831
|
return;
|
|
537
832
|
const index = this.menuItems.toArray().findIndex((item) => item.getHostElement() === event.target);
|
|
538
833
|
this.keyManager.updateActiveItem(index);
|
|
539
834
|
}
|
|
540
|
-
/**
|
|
541
|
-
*
|
|
835
|
+
/**
|
|
836
|
+
* Closes the popup once focus leaves the menu and its site flyouts, mirroring the dropdown.
|
|
837
|
+
*
|
|
838
|
+
* @docs-private
|
|
839
|
+
*/
|
|
542
840
|
focusoutHandler(event) {
|
|
543
841
|
const next = event.relatedTarget;
|
|
544
842
|
// Keep open while focus stays inside the popup or moves into a site flyout overlay
|
|
@@ -550,33 +848,33 @@ class KbqAppSwitcherComponent extends KbqPopUp {
|
|
|
550
848
|
this.trigger.focus();
|
|
551
849
|
}
|
|
552
850
|
}
|
|
553
|
-
/**
|
|
851
|
+
/**
|
|
852
|
+
* Selects an application belonging to one of the other sites.
|
|
853
|
+
*
|
|
854
|
+
* @docs-private
|
|
855
|
+
*/
|
|
554
856
|
selectAppInSite(site, app) {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
this.trigger.
|
|
558
|
-
this.trigger.
|
|
857
|
+
if (!site)
|
|
858
|
+
return;
|
|
859
|
+
this.trigger.selectedSite.set(site);
|
|
860
|
+
this.trigger.selectedApp.set(app);
|
|
559
861
|
}
|
|
560
862
|
filterSites(query) {
|
|
561
|
-
const
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
: filteredSites;
|
|
572
|
-
}
|
|
573
|
-
initDefaultParams() {
|
|
574
|
-
this.configuration = KBQ_APP_SWITCHER_DEFAULT_CONFIGURATION;
|
|
863
|
+
const sites = this.trigger.originalSites;
|
|
864
|
+
if (!query)
|
|
865
|
+
return sites;
|
|
866
|
+
const search = query.toLowerCase();
|
|
867
|
+
const matches = (app) => app.name.toLowerCase().includes(search) || !!app.caption?.toLowerCase().includes(search);
|
|
868
|
+
// Shallow copies only: a `structuredClone` of every site would be an O(all apps) deep copy per
|
|
869
|
+
// keystroke, and would also hand `@for` brand-new app objects to re-render on every character.
|
|
870
|
+
return sites
|
|
871
|
+
.map((site) => ({ ...site, apps: site.apps.filter(matches) }))
|
|
872
|
+
.filter((site) => site.apps.length > 0);
|
|
575
873
|
}
|
|
576
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
577
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqAppSwitcherComponent, isStandalone: true, selector: "kbq-app-switcher", inputs: { trigger: "trigger" }, host: { listeners: { "keydown": "keydownHandler($event)", "focusin": "focusinHandler($event)", "focusout": "focusoutHandler($event)" }, classAttribute: "kbq-app-switcher" }, viewQueries: [{ propertyName: "input", first: true, predicate: KbqInput, descendants: true, isSignal: true }, { propertyName: "otherSites", first: true, predicate: ["otherSites"], descendants: true, isSignal: true }, { propertyName: "allItems", predicate: KbqDropdownItem, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (trigger.withSearch) {\n <div class=\"kbq-app-switcher__search-container\" (mouseenter)=\"otherSites()?.close()\">\n <kbq-form-field noBorders>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.searchPlaceholder }}\"\n autocomplete=\"off\"\n kbqInput\n [formControl]=\"searchControl\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n </div>\n\n <kbq-divider />\n}\n\n<div kbq-scrollbar role=\"menu\" aria-orientation=\"vertical\">\n @if (!searchControl.getRawValue()) {\n <div class=\"kbq-app-switcher__app-container\" (mouseenter)=\"otherSites()?.close()\">\n @if (trigger.sitesMode) {\n <div class=\"kbq-app-switcher-group-header\">\n <div class=\"kbq-app-switcher-group-header__text\">{{ trigger.selectedSite?.name }}</div>\n @if (trigger.selectedSite?.status) {\n <kbq-badge class=\"kbq-app-switcher-group-header__badge\" [compact]=\"true\">\n {{ trigger.selectedSite.status }}\n </kbq-badge>\n }\n </div>\n }\n\n <kbq-dropdown [class]=\"'kbq-app-switcher-sites'\">\n <div kbqDropdownStaticContent class=\"kbq-app-switcher-site\">\n @for (app of trigger.currentApps; track app) {\n @if (!app.aliases) {\n <a\n href=\"{{ app.link }}\"\n kbq-app-switcher-list-item\n [class.kbq-selected]=\"app.id === trigger.selectedApp?.id\"\n [app]=\"app\"\n [toggle]=\"!!app.aliases\"\n ></a>\n } @else {\n <div\n #appSwitcherApp=\"kbqAppSwitcherApp\"\n kbq-app-switcher-list-item\n [app]=\"app\"\n [toggle]=\"!!app.aliases\"\n ></div>\n\n @if (!appSwitcherApp.collapsed) {\n @for (alias of app.aliases; track alias) {\n <a\n href=\"{{ alias.link }}\"\n kbq-app-switcher-list-item\n [class]=\"nestedAliasClass\"\n [class.kbq-selected]=\"alias.id === trigger.selectedApp?.id\"\n [app]=\"alias\"\n ></a>\n }\n }\n }\n }\n </div>\n </kbq-dropdown>\n </div>\n\n @if (trigger.sitesMode) {\n <kbq-divider />\n\n <div class=\"kbq-app-switcher__sites-container\">\n <div class=\"kbq-app-switcher-group-header\">\n <div class=\"kbq-app-switcher-group-header__text\">{{ localeData.sitesHeader }}</div>\n </div>\n\n <kbq-dropdown #otherSites=\"kbqDropdown\">\n <div kbqDropdownStaticContent class=\"kbq-app-switcher-sites\">\n @for (site of trigger.sites; track site) {\n @if (site.id !== trigger.selectedSite?.id) {\n <div\n #siteFlyoutTrigger=\"kbqDropdownTrigger\"\n [kbq-app-switcher-dropdown-site]=\"site\"\n [kbqDropdownTriggerFor]=\"dropdownWithSelectedSite\"\n [offsetX]=\"0\"\n [attr.aria-expanded]=\"siteFlyoutTrigger.opened\"\n (mouseenter)=\"activeSite = site\"\n (focus)=\"activeSite = site\"\n ></div>\n }\n }\n </div>\n </kbq-dropdown>\n </div>\n\n <kbq-dropdown #dropdownWithSelectedSite=\"kbqDropdown\" [class]=\"'kbq-app-switcher-sites'\">\n @for (app of activeSite?.apps; track app) {\n @if (app.aliases) {\n <div\n #dropdownWithGroupedAppsTrigger=\"kbqDropdownTrigger\"\n [kbq-app-switcher-dropdown-app]=\"app\"\n [kbqDropdownTriggerFor]=\"dropdownWithGroupedApps\"\n [offsetX]=\"0\"\n [class.kbq-pressed]=\"dropdownWithGroupedAppsTrigger.opened\"\n [attr.aria-expanded]=\"dropdownWithGroupedAppsTrigger.opened\"\n (mouseenter)=\"activeApp = app\"\n (focus)=\"activeApp = app\"\n ></div>\n } @else {\n <a\n href=\"{{ app.link }}\"\n [kbq-app-switcher-dropdown-app]=\"app\"\n (click)=\"selectAppInSite(activeSite, app)\"\n ></a>\n }\n }\n </kbq-dropdown>\n\n <kbq-dropdown #dropdownWithGroupedApps=\"kbqDropdown\" [class]=\"'kbq-app-switcher-sites'\">\n @for (alias of activeApp?.aliases; track alias) {\n <a\n href=\"{{ alias.link }}\"\n [kbq-app-switcher-dropdown-app]=\"alias\"\n (click)=\"selectAppInSite(activeSite, alias)\"\n ></a>\n }\n </kbq-dropdown>\n }\n } @else {\n <div class=\"kbq-app-switcher__search-result\">\n <kbq-dropdown [class]=\"'kbq-app-switcher-sites'\">\n <div kbqDropdownStaticContent class=\"kbq-app-switcher-site\">\n @for (site of filteredSites; track site) {\n @if (trigger.sitesMode && site.apps) {\n <kbq-optgroup label=\"{{ site.name }}\" />\n }\n\n @for (app of site.apps; track app) {\n <a\n href=\"{{ app.link }}\"\n kbq-app-switcher-list-item\n [app]=\"app\"\n [highlightText]=\"searchControl.getRawValue() ?? ''\"\n ></a>\n }\n } @empty {\n <div class=\"kbq-app-switcher__empty-search-result\">{{ localeData.searchEmptyResult }}</div>\n }\n </div>\n </kbq-dropdown>\n </div>\n }\n</div>\n", styles: [".kbq-app-switcher{position:relative;display:flex;flex-direction:column;margin-top:var(--kbq-size-xxs);margin-bottom:var(--kbq-size-xxs);width:320px;border-radius:var(--kbq-size-xs);box-shadow:var(--kbq-shadow-popup);box-sizing:border-box;z-index:1}.kbq-app-switcher__search-container{padding-top:var(--kbq-size-xxs)}.kbq-app-switcher__search-result{max-width:320px;min-height:0;padding:var(--kbq-size-s) var(--kbq-size-xxs)}.kbq-app-switcher__empty-search-result{display:flex;justify-content:center;align-items:center;height:96px}.kbq-app-switcher__app-container{display:flex;flex-direction:column;min-height:0;padding:var(--kbq-size-s) var(--kbq-size-xxs)}.kbq-app-switcher-group-header{padding:var(--kbq-size-s) var(--kbq-size-m);display:flex;flex-direction:row;justify-content:space-between}.kbq-app-switcher__sites-container{padding:var(--kbq-size-xxs)}.kbq-app-switcher{background:var(--kbq-background-card)}.kbq-app-switcher .kbq-app-switcher-group-header,.kbq-app-switcher__empty-search-result{color:var(--kbq-foreground-contrast-secondary)}.kbq-app-switcher,.kbq-app-switcher__empty-search-result{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-app-switcher-group-header__text{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}.kbq-app-switcher-group-header__badge{font-size:var(--kbq-typography-text-compact-medium-font-size);font-style:var(--kbq-typography-text-compact-medium-font-style);font-weight:var(--kbq-typography-text-compact-medium-font-weight);line-height:var(--kbq-typography-text-compact-medium-line-height);font-family:var(--kbq-typography-text-compact-medium-font-family);text-transform:var(--kbq-typography-text-compact-medium-text-transform);font-feature-settings:var(--kbq-typography-text-compact-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-medium-letter-spacing)}.kbq-app-switch-tree-option__text{font-size:var(--kbq-typography-text-normal-medium-font-size);font-style:var(--kbq-typography-text-normal-medium-font-style);font-weight:var(--kbq-typography-text-normal-medium-font-weight);line-height:var(--kbq-typography-text-normal-medium-line-height);font-family:var(--kbq-typography-text-normal-medium-font-family);text-transform:var(--kbq-typography-text-normal-medium-text-transform);font-feature-settings:var(--kbq-typography-text-normal-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-medium-letter-spacing)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i2.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "component", type: i3.KbqCleaner, selector: "kbq-cleaner", inputs: ["aria-label"], exportAs: ["kbqCleaner"] }, { kind: "component", type: i3.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i3.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i3.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1$1.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "component", type: i5.KbqDivider, selector: "kbq-divider", inputs: ["vertical", "paddings"] }, { kind: "ngmodule", type: KbqBadgeModule }, { kind: "component", type: i1.KbqBadge, selector: "kbq-badge", inputs: ["compact", "outline", "badgeColor"] }, { kind: "directive", type: i1.KbqBadgeCssStyler, selector: "kbq-badge" }, { kind: "ngmodule", type: KbqDropdownModule }, { kind: "component", type: i7.KbqDropdown, selector: "kbq-dropdown", inputs: ["navigationWithWrap", "xPosition", "yPosition", "overlapTriggerY", "overlapTriggerX", "hasBackdrop", "class", "backdropClass", "panelWidth", "panelMinWidth", "panelMaxWidth", "safeArea"], outputs: ["closed"], exportAs: ["kbqDropdown"] }, { kind: "directive", type: i7.KbqDropdownTrigger, selector: "[kbqDropdownTriggerFor]", inputs: ["offsetX", "offsetY", "kbqDropdownTriggerData", "openByArrowDown", "demoteOverlay", "kbqDropdownTriggerRestoreFocus", "kbqDropdownTriggerFor"], outputs: ["dropdownOpened", "dropdownClosed"], exportAs: ["kbqDropdownTrigger"] }, { kind: "directive", type: i7.KbqDropdownStaticContent, selector: "[kbqDropdownStaticContent]" }, { kind: "ngmodule", type: KbqScrollbarModule }, { kind: "component", type: i8.KbqScrollbar, selector: "kbq-scrollbar, [kbq-scrollbar]", inputs: ["initializationTarget", "options", "events", "defer"], outputs: ["onInitialize", "onUpdate", "onDestroy", "onScroll"], exportAs: ["kbqScrollbar"] }, { kind: "ngmodule", type: KbqOptionModule }, { kind: "component", type: i9.KbqOptgroup, selector: "kbq-optgroup", inputs: ["label", "disabled"], exportAs: ["kbqOptgroup"] }, { kind: "component", type: KbqAppSwitcherDropdownApp, selector: "[kbq-app-switcher-dropdown-app]", inputs: ["kbq-app-switcher-dropdown-app"], exportAs: ["kbqAppSwitcherDropdownApp"] }, { kind: "component", type: KbqAppSwitcherDropdownSite, selector: "[kbq-app-switcher-dropdown-site]", inputs: ["kbq-app-switcher-dropdown-site"], exportAs: ["kbqAppSwitcherDropdownSite"] }, { kind: "component", type: KbqAppSwitcherListItem, selector: "[kbq-app-switcher-list-item]", inputs: ["app", "toggle", "highlightText", "collapsed"], exportAs: ["kbqAppSwitcherApp"] }], animations: [kbqAppSwitcherAnimations.state], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
874
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
875
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqAppSwitcherComponent, isStandalone: true, selector: "kbq-app-switcher", inputs: { triggerInput: { classPropertyName: "triggerInput", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "keydownHandler($event)", "focusin": "focusinHandler($event)", "focusout": "focusoutHandler($event)" }, classAttribute: "kbq-app-switcher" }, viewQueries: [{ propertyName: "input", first: true, predicate: KbqInput, descendants: true, isSignal: true }, { propertyName: "otherSites", first: true, predicate: ["otherSites"], descendants: true, isSignal: true }, { propertyName: "allItemsQuery", predicate: KbqDropdownItem, descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, hostDirectives: [{ directive: i1$2.KbqLocaleOverridesDirective }], ngImport: i0, template: "@if (trigger.withSearch) {\n <div class=\"kbq-app-switcher__search-container\" (mouseenter)=\"otherSites()?.close()\">\n <kbq-form-field noBorders>\n <i kbq-icon=\"kbq-magnifying-glass_16\" aria-hidden=\"true\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeConfiguration().searchPlaceholder }}\"\n autocomplete=\"off\"\n kbqInput\n [attr.aria-label]=\"localeConfiguration().searchPlaceholder\"\n [formControl]=\"searchControl\"\n />\n <!-- `kbq-cleaner` is a button with a localized default name; here it clears the search specifically. -->\n <kbq-cleaner [aria-label]=\"localeConfiguration().clearSearch\" />\n </kbq-form-field>\n </div>\n\n <kbq-divider />\n}\n\n<!--\n Everything between `role=\"menu\"` and the `role=\"menuitem\"` rows is marked `role=\"none\"`: the menu role\n requires its owned elements to be menu items, and the layout wrappers (and the dropdown host that provides\n the panel styling) would otherwise break that ownership chain. The scrollbar host cannot carry the menu\n role for the same reason - it injects its own focusable viewport element in between.\n-->\n<kbq-scrollbar>\n @if (!searchControl.getRawValue()) {\n <div role=\"menu\" aria-orientation=\"vertical\">\n <div class=\"kbq-app-switcher__app-container\" role=\"none\" (mouseenter)=\"otherSites()?.close()\">\n @if (trigger.sitesMode) {\n <div class=\"kbq-app-switcher-group-header\" role=\"none\">\n <div class=\"kbq-app-switcher-group-header__text\">{{ trigger.selectedSite()?.name }}</div>\n @if (trigger.selectedSite()?.status; as status) {\n <kbq-badge class=\"kbq-app-switcher-group-header__badge\" [compact]=\"true\">\n {{ status }}\n </kbq-badge>\n }\n </div>\n }\n\n <kbq-dropdown role=\"none\" [class]=\"'kbq-app-switcher-sites'\">\n <div kbqDropdownStaticContent role=\"none\" class=\"kbq-app-switcher-site\">\n @for (app of trigger.currentApps; track app.id || app.name) {\n @if (!app.aliases) {\n <a\n rel=\"noopener noreferrer\"\n kbq-app-switcher-list-item\n [attr.href]=\"app.link ?? null\"\n [attr.aria-current]=\"app.id === trigger.selectedApp()?.id ? 'true' : null\"\n [class.kbq-selected]=\"app.id === trigger.selectedApp()?.id\"\n [app]=\"app\"\n [toggle]=\"!!app.aliases\"\n ></a>\n } @else {\n <div\n #appSwitcherApp=\"kbqAppSwitcherApp\"\n kbq-app-switcher-list-item\n [app]=\"app\"\n [toggle]=\"!!app.aliases\"\n ></div>\n\n @if (!appSwitcherApp.collapsed()) {\n @for (alias of app.aliases; track alias.id) {\n <a\n rel=\"noopener noreferrer\"\n kbq-app-switcher-list-item\n [attr.href]=\"alias.link ?? null\"\n [attr.aria-current]=\"alias.id === trigger.selectedApp()?.id ? 'true' : null\"\n [class]=\"nestedAliasClass\"\n [class.kbq-selected]=\"alias.id === trigger.selectedApp()?.id\"\n [app]=\"alias\"\n ></a>\n }\n }\n }\n }\n </div>\n </kbq-dropdown>\n </div>\n\n @if (trigger.sitesMode) {\n <kbq-divider />\n\n <div class=\"kbq-app-switcher__sites-container\" role=\"none\">\n <div class=\"kbq-app-switcher-group-header\" role=\"none\">\n <div class=\"kbq-app-switcher-group-header__text\">{{ localeConfiguration().sitesHeader }}</div>\n </div>\n\n <kbq-dropdown #otherSites=\"kbqDropdown\" role=\"none\">\n <div kbqDropdownStaticContent role=\"none\" class=\"kbq-app-switcher-sites\">\n @for (site of trigger.sites; track site.id) {\n @if (site.id !== trigger.selectedSite()?.id) {\n <div\n [kbq-app-switcher-dropdown-site]=\"site\"\n [kbqDropdownTriggerFor]=\"dropdownWithSelectedSite\"\n [kbqDropdownTriggerData]=\"{ site }\"\n [offsetX]=\"0\"\n ></div>\n }\n }\n </div>\n </kbq-dropdown>\n </div>\n\n <!--\n The flyout panels must stay in the same view as the triggers above: a template reference\n variable is only visible inside the view that declares it. Their hosts render empty (the\n content moves into an overlay when opened), so `role=\"none\"` keeps the menu ownership\n chain intact.\n\n Each panel is shared by its triggers, so it renders the data of the trigger that opened it\n (`kbqDropdownTriggerData`), not of the last hovered row: the safe area keeps a panel open\n while the pointer crosses other triggers.\n -->\n <kbq-dropdown #dropdownWithSelectedSite=\"kbqDropdown\" role=\"none\" [class]=\"'kbq-app-switcher-sites'\">\n <ng-template let-site=\"site\" kbqDropdownContent>\n @for (app of site.apps; track app.id || app.name) {\n @if (app.aliases) {\n <div\n #dropdownWithGroupedAppsTrigger=\"kbqDropdownTrigger\"\n [kbq-app-switcher-dropdown-app]=\"app\"\n [kbqDropdownTriggerFor]=\"dropdownWithGroupedApps\"\n [kbqDropdownTriggerData]=\"{ site, app }\"\n [offsetX]=\"0\"\n [class.kbq-pressed]=\"dropdownWithGroupedAppsTrigger.opened\"\n ></div>\n } @else {\n <a\n rel=\"noopener noreferrer\"\n [attr.href]=\"app.link ?? null\"\n [kbq-app-switcher-dropdown-app]=\"app\"\n (click)=\"selectAppInSite(site, app)\"\n ></a>\n }\n }\n </ng-template>\n </kbq-dropdown>\n\n <kbq-dropdown #dropdownWithGroupedApps=\"kbqDropdown\" role=\"none\" [class]=\"'kbq-app-switcher-sites'\">\n <ng-template let-site=\"site\" let-app=\"app\" kbqDropdownContent>\n @for (alias of app.aliases; track alias.id) {\n <a\n rel=\"noopener noreferrer\"\n [attr.href]=\"alias.link ?? null\"\n [kbq-app-switcher-dropdown-app]=\"alias\"\n (click)=\"selectAppInSite(site, alias)\"\n ></a>\n }\n </ng-template>\n </kbq-dropdown>\n }\n </div>\n } @else {\n <div class=\"kbq-app-switcher__search-result\">\n @if (filteredSites.length) {\n <div role=\"menu\" aria-orientation=\"vertical\">\n <kbq-dropdown role=\"none\" [class]=\"'kbq-app-switcher-sites'\">\n <div kbqDropdownStaticContent role=\"none\" class=\"kbq-app-switcher-site\">\n @for (site of filteredSites; track site.id) {\n @if (trigger.sitesMode && site.apps) {\n <kbq-optgroup label=\"{{ site.name }}\" role=\"none\" />\n }\n\n @for (app of site.apps; track app.id || app.name) {\n <a\n rel=\"noopener noreferrer\"\n kbq-app-switcher-list-item\n [attr.href]=\"app.link ?? null\"\n [app]=\"app\"\n [highlightText]=\"searchControl.getRawValue() ?? ''\"\n ></a>\n }\n }\n </div>\n </kbq-dropdown>\n </div>\n }\n\n <!--\n Outside the menu: a status message is not a menu item. The live region itself stays mounted\n while the query changes, so the message is announced once it appears - a region inserted into\n the DOM together with its text is announced unreliably. It collapses while there are results\n (`:empty`, see app-switcher.scss).\n -->\n <div class=\"kbq-app-switcher__empty-search-result\" role=\"status\">\n @if (!filteredSites.length) {\n {{ localeConfiguration().searchEmptyResult }}\n }\n </div>\n </div>\n }\n</kbq-scrollbar>\n", styles: [".kbq-app-switcher{position:relative;display:flex;flex-direction:column;margin-top:var(--kbq-size-xxs);margin-bottom:var(--kbq-size-xxs);width:var(--kbq-app-switcher-size-container-width, 320px);border-radius:var(--kbq-size-xs)}@supports (corner-shape: squircle){.kbq-app-switcher{corner-shape:squircle;border-radius:clamp(var(--kbq-size-xs) * 1.85,var(--kbq-size-xs) * 2.3 - 3.6px,var(--kbq-size-xs) * 2)}}.kbq-app-switcher{box-shadow:var(--kbq-shadow-popup);box-sizing:border-box;z-index:1}.kbq-app-switcher__search-container{padding-top:var(--kbq-size-xxs)}.kbq-app-switcher__search-result{max-width:var(--kbq-app-switcher-size-container-width, 320px);min-height:0;padding:var(--kbq-size-s) var(--kbq-size-xxs)}.kbq-app-switcher__empty-search-result{display:flex;justify-content:center;align-items:center;height:var(--kbq-app-switcher-size-empty-search-result-height, 96px)}.kbq-app-switcher__empty-search-result:empty{display:none}.kbq-app-switcher__app-container{display:flex;flex-direction:column;min-height:0;padding:var(--kbq-size-s) var(--kbq-size-xxs)}.kbq-app-switcher-group-header{padding:var(--kbq-size-s) var(--kbq-size-m);display:flex;flex-direction:row;justify-content:space-between}.kbq-app-switcher__sites-container{padding:var(--kbq-size-xxs)}.kbq-app-switcher{background:var(--kbq-background-card)}.kbq-app-switcher .kbq-app-switcher-group-header,.kbq-app-switcher__empty-search-result{color:var(--kbq-foreground-contrast-secondary)}.kbq-app-switcher,.kbq-app-switcher__empty-search-result{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-app-switcher-group-header__text{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}.kbq-app-switcher-group-header__badge{font-size:var(--kbq-typography-text-compact-medium-font-size);font-style:var(--kbq-typography-text-compact-medium-font-style);font-weight:var(--kbq-typography-text-compact-medium-font-weight);line-height:var(--kbq-typography-text-compact-medium-line-height);font-family:var(--kbq-typography-text-compact-medium-font-family);text-transform:var(--kbq-typography-text-compact-medium-text-transform);font-feature-settings:var(--kbq-typography-text-compact-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-medium-letter-spacing)}\n", ".kbq-app-switcher,.kbq-app-switcher-sites{--kbq-app-switcher-size-container-width: 320px;--kbq-app-switcher-size-empty-search-result-height: 96px;--kbq-app-switcher-size-list-item-height-min: 38px;--kbq-app-switcher-size-dropdown-app-height-min: 50px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i3.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "component", type: i4.KbqCleaner, selector: "kbq-cleaner", inputs: ["aria-label"], exportAs: ["kbqCleaner"] }, { kind: "component", type: i4.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i4.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i4.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1$1.KbqIcon, selector: "[kbq-icon]", inputs: ["aria-hidden", "iconSize", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "component", type: i6.KbqDivider, selector: "kbq-divider", inputs: ["vertical", "paddings", "decorative", "length"] }, { kind: "ngmodule", type: KbqBadgeModule }, { kind: "component", type: i1.KbqBadge, selector: "kbq-badge", inputs: ["compact", "outline", "badgeColor"] }, { kind: "directive", type: i1.KbqBadgeCssStyler, selector: "kbq-badge" }, { kind: "ngmodule", type: KbqDropdownModule }, { kind: "component", type: i8.KbqDropdown, selector: "kbq-dropdown", inputs: ["activeDescendantNavigation", "navigationWithWrap", "xPosition", "yPosition", "overlapTriggerY", "overlapTriggerX", "hasBackdrop", "class", "backdropClass", "panelWidth", "panelMinWidth", "panelMaxWidth", "safeArea"], outputs: ["xPositionChange", "yPositionChange", "overlapTriggerYChange", "overlapTriggerXChange", "closed"], exportAs: ["kbqDropdown"] }, { kind: "directive", type: i8.KbqDropdownTrigger, selector: "[kbqDropdownTriggerFor]", inputs: ["offsetX", "offsetY", "kbqDropdownTriggerData", "openByArrowDown", "kbqDropdownTriggerOrigin", "kbqDropdownTriggerAutoFocus", "kbqDropdownTriggerRestoreFocus", "kbqDropdownTriggerFor"], outputs: ["offsetXChange", "openByArrowDownChange", "kbqDropdownTriggerRestoreFocusChange", "dropdownOpened", "dropdownClosed"], exportAs: ["kbqDropdownTrigger"] }, { kind: "directive", type: i8.KbqDropdownContent, selector: "ng-template[kbqDropdownContent]" }, { kind: "directive", type: i8.KbqDropdownStaticContent, selector: "[kbqDropdownStaticContent]" }, { kind: "component", type: KbqScrollbar, selector: "kbq-scrollbar", inputs: ["kbqScrollbarMode", "kbqScrollbarHideDelay"], exportAs: ["kbqScrollbar"] }, { kind: "ngmodule", type: KbqOptionModule }, { kind: "component", type: i1$2.KbqOptgroup, selector: "kbq-optgroup", inputs: ["label", "disabled"], exportAs: ["kbqOptgroup"] }, { kind: "component", type: KbqAppSwitcherDropdownApp, selector: "[kbq-app-switcher-dropdown-app]", inputs: ["kbq-app-switcher-dropdown-app"], exportAs: ["kbqAppSwitcherDropdownApp"] }, { kind: "component", type: KbqAppSwitcherDropdownSite, selector: "[kbq-app-switcher-dropdown-site]", inputs: ["kbq-app-switcher-dropdown-site"], exportAs: ["kbqAppSwitcherDropdownSite"] }, { kind: "component", type: KbqAppSwitcherListItem, selector: "[kbq-app-switcher-list-item]", inputs: ["app", "toggle", "highlightText", "collapsed"], outputs: ["collapsedChange"], exportAs: ["kbqAppSwitcherApp"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
578
876
|
}
|
|
579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherComponent, decorators: [{
|
|
580
878
|
type: Component,
|
|
581
879
|
args: [{ selector: 'kbq-app-switcher', imports: [
|
|
582
880
|
FormsModule,
|
|
@@ -586,7 +884,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
586
884
|
KbqDividerModule,
|
|
587
885
|
KbqBadgeModule,
|
|
588
886
|
KbqDropdownModule,
|
|
589
|
-
|
|
887
|
+
KbqScrollbar,
|
|
590
888
|
KbqOptionModule,
|
|
591
889
|
KbqAppSwitcherDropdownApp,
|
|
592
890
|
KbqAppSwitcherDropdownSite,
|
|
@@ -596,51 +894,106 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
596
894
|
'(keydown)': 'keydownHandler($event)',
|
|
597
895
|
'(focusin)': 'focusinHandler($event)',
|
|
598
896
|
'(focusout)': 'focusoutHandler($event)'
|
|
599
|
-
}, animations: [kbqAppSwitcherAnimations.state], preserveWhitespaces: false, template: "@if (trigger.withSearch) {\n <div class=\"kbq-app-switcher__search-container\" (mouseenter)=\"otherSites()?.close()\">\n <kbq-form-field noBorders>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.searchPlaceholder }}\"\n autocomplete=\"off\"\n kbqInput\n [formControl]=\"searchControl\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n </div>\n\n <kbq-divider />\n}\n\n<div kbq-scrollbar role=\"menu\" aria-orientation=\"vertical\">\n @if (!searchControl.getRawValue()) {\n <div class=\"kbq-app-switcher__app-container\" (mouseenter)=\"otherSites()?.close()\">\n @if (trigger.sitesMode) {\n <div class=\"kbq-app-switcher-group-header\">\n <div class=\"kbq-app-switcher-group-header__text\">{{ trigger.selectedSite?.name }}</div>\n @if (trigger.selectedSite?.status) {\n <kbq-badge class=\"kbq-app-switcher-group-header__badge\" [compact]=\"true\">\n {{ trigger.selectedSite.status }}\n </kbq-badge>\n }\n </div>\n }\n\n <kbq-dropdown [class]=\"'kbq-app-switcher-sites'\">\n <div kbqDropdownStaticContent class=\"kbq-app-switcher-site\">\n @for (app of trigger.currentApps; track app) {\n @if (!app.aliases) {\n <a\n href=\"{{ app.link }}\"\n kbq-app-switcher-list-item\n [class.kbq-selected]=\"app.id === trigger.selectedApp?.id\"\n [app]=\"app\"\n [toggle]=\"!!app.aliases\"\n ></a>\n } @else {\n <div\n #appSwitcherApp=\"kbqAppSwitcherApp\"\n kbq-app-switcher-list-item\n [app]=\"app\"\n [toggle]=\"!!app.aliases\"\n ></div>\n\n @if (!appSwitcherApp.collapsed) {\n @for (alias of app.aliases; track alias) {\n <a\n href=\"{{ alias.link }}\"\n kbq-app-switcher-list-item\n [class]=\"nestedAliasClass\"\n [class.kbq-selected]=\"alias.id === trigger.selectedApp?.id\"\n [app]=\"alias\"\n ></a>\n }\n }\n }\n }\n </div>\n </kbq-dropdown>\n </div>\n\n @if (trigger.sitesMode) {\n <kbq-divider />\n\n <div class=\"kbq-app-switcher__sites-container\">\n <div class=\"kbq-app-switcher-group-header\">\n <div class=\"kbq-app-switcher-group-header__text\">{{ localeData.sitesHeader }}</div>\n </div>\n\n <kbq-dropdown #otherSites=\"kbqDropdown\">\n <div kbqDropdownStaticContent class=\"kbq-app-switcher-sites\">\n @for (site of trigger.sites; track site) {\n @if (site.id !== trigger.selectedSite?.id) {\n <div\n #siteFlyoutTrigger=\"kbqDropdownTrigger\"\n [kbq-app-switcher-dropdown-site]=\"site\"\n [kbqDropdownTriggerFor]=\"dropdownWithSelectedSite\"\n [offsetX]=\"0\"\n [attr.aria-expanded]=\"siteFlyoutTrigger.opened\"\n (mouseenter)=\"activeSite = site\"\n (focus)=\"activeSite = site\"\n ></div>\n }\n }\n </div>\n </kbq-dropdown>\n </div>\n\n <kbq-dropdown #dropdownWithSelectedSite=\"kbqDropdown\" [class]=\"'kbq-app-switcher-sites'\">\n @for (app of activeSite?.apps; track app) {\n @if (app.aliases) {\n <div\n #dropdownWithGroupedAppsTrigger=\"kbqDropdownTrigger\"\n [kbq-app-switcher-dropdown-app]=\"app\"\n [kbqDropdownTriggerFor]=\"dropdownWithGroupedApps\"\n [offsetX]=\"0\"\n [class.kbq-pressed]=\"dropdownWithGroupedAppsTrigger.opened\"\n [attr.aria-expanded]=\"dropdownWithGroupedAppsTrigger.opened\"\n (mouseenter)=\"activeApp = app\"\n (focus)=\"activeApp = app\"\n ></div>\n } @else {\n <a\n href=\"{{ app.link }}\"\n [kbq-app-switcher-dropdown-app]=\"app\"\n (click)=\"selectAppInSite(activeSite, app)\"\n ></a>\n }\n }\n </kbq-dropdown>\n\n <kbq-dropdown #dropdownWithGroupedApps=\"kbqDropdown\" [class]=\"'kbq-app-switcher-sites'\">\n @for (alias of activeApp?.aliases; track alias) {\n <a\n href=\"{{ alias.link }}\"\n [kbq-app-switcher-dropdown-app]=\"alias\"\n (click)=\"selectAppInSite(activeSite, alias)\"\n ></a>\n }\n </kbq-dropdown>\n }\n } @else {\n <div class=\"kbq-app-switcher__search-result\">\n <kbq-dropdown [class]=\"'kbq-app-switcher-sites'\">\n <div kbqDropdownStaticContent class=\"kbq-app-switcher-site\">\n @for (site of filteredSites; track site) {\n @if (trigger.sitesMode && site.apps) {\n <kbq-optgroup label=\"{{ site.name }}\" />\n }\n\n @for (app of site.apps; track app) {\n <a\n href=\"{{ app.link }}\"\n kbq-app-switcher-list-item\n [app]=\"app\"\n [highlightText]=\"searchControl.getRawValue() ?? ''\"\n ></a>\n }\n } @empty {\n <div class=\"kbq-app-switcher__empty-search-result\">{{ localeData.searchEmptyResult }}</div>\n }\n </div>\n </kbq-dropdown>\n </div>\n }\n</div>\n", styles: [".kbq-app-switcher{position:relative;display:flex;flex-direction:column;margin-top:var(--kbq-size-xxs);margin-bottom:var(--kbq-size-xxs);width:320px;border-radius:var(--kbq-size-xs);box-shadow:var(--kbq-shadow-popup);box-sizing:border-box;z-index:1}.kbq-app-switcher__search-container{padding-top:var(--kbq-size-xxs)}.kbq-app-switcher__search-result{max-width:320px;min-height:0;padding:var(--kbq-size-s) var(--kbq-size-xxs)}.kbq-app-switcher__empty-search-result{display:flex;justify-content:center;align-items:center;height:96px}.kbq-app-switcher__app-container{display:flex;flex-direction:column;min-height:0;padding:var(--kbq-size-s) var(--kbq-size-xxs)}.kbq-app-switcher-group-header{padding:var(--kbq-size-s) var(--kbq-size-m);display:flex;flex-direction:row;justify-content:space-between}.kbq-app-switcher__sites-container{padding:var(--kbq-size-xxs)}.kbq-app-switcher{background:var(--kbq-background-card)}.kbq-app-switcher .kbq-app-switcher-group-header,.kbq-app-switcher__empty-search-result{color:var(--kbq-foreground-contrast-secondary)}.kbq-app-switcher,.kbq-app-switcher__empty-search-result{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-app-switcher-group-header__text{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}.kbq-app-switcher-group-header__badge{font-size:var(--kbq-typography-text-compact-medium-font-size);font-style:var(--kbq-typography-text-compact-medium-font-style);font-weight:var(--kbq-typography-text-compact-medium-font-weight);line-height:var(--kbq-typography-text-compact-medium-line-height);font-family:var(--kbq-typography-text-compact-medium-font-family);text-transform:var(--kbq-typography-text-compact-medium-text-transform);font-feature-settings:var(--kbq-typography-text-compact-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-medium-letter-spacing)}.kbq-app-switch-tree-option__text{font-size:var(--kbq-typography-text-normal-medium-font-size);font-style:var(--kbq-typography-text-normal-medium-font-style);font-weight:var(--kbq-typography-text-normal-medium-font-weight);line-height:var(--kbq-typography-text-normal-medium-line-height);font-family:var(--kbq-typography-text-normal-medium-font-family);text-transform:var(--kbq-typography-text-normal-medium-text-transform);font-feature-settings:var(--kbq-typography-text-normal-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-medium-letter-spacing)}\n"] }]
|
|
600
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
601
|
-
type: Input
|
|
602
|
-
}], input: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqInput), { isSignal: true }] }], otherSites: [{ type: i0.ViewChild, args: ['otherSites', { isSignal: true }] }], allItems: [{
|
|
603
|
-
type: ViewChildren,
|
|
604
|
-
args: [KbqDropdownItem]
|
|
605
|
-
}] } });
|
|
897
|
+
}, hostDirectives: [KbqLocaleOverridesDirective], preserveWhitespaces: false, template: "@if (trigger.withSearch) {\n <div class=\"kbq-app-switcher__search-container\" (mouseenter)=\"otherSites()?.close()\">\n <kbq-form-field noBorders>\n <i kbq-icon=\"kbq-magnifying-glass_16\" aria-hidden=\"true\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeConfiguration().searchPlaceholder }}\"\n autocomplete=\"off\"\n kbqInput\n [attr.aria-label]=\"localeConfiguration().searchPlaceholder\"\n [formControl]=\"searchControl\"\n />\n <!-- `kbq-cleaner` is a button with a localized default name; here it clears the search specifically. -->\n <kbq-cleaner [aria-label]=\"localeConfiguration().clearSearch\" />\n </kbq-form-field>\n </div>\n\n <kbq-divider />\n}\n\n<!--\n Everything between `role=\"menu\"` and the `role=\"menuitem\"` rows is marked `role=\"none\"`: the menu role\n requires its owned elements to be menu items, and the layout wrappers (and the dropdown host that provides\n the panel styling) would otherwise break that ownership chain. The scrollbar host cannot carry the menu\n role for the same reason - it injects its own focusable viewport element in between.\n-->\n<kbq-scrollbar>\n @if (!searchControl.getRawValue()) {\n <div role=\"menu\" aria-orientation=\"vertical\">\n <div class=\"kbq-app-switcher__app-container\" role=\"none\" (mouseenter)=\"otherSites()?.close()\">\n @if (trigger.sitesMode) {\n <div class=\"kbq-app-switcher-group-header\" role=\"none\">\n <div class=\"kbq-app-switcher-group-header__text\">{{ trigger.selectedSite()?.name }}</div>\n @if (trigger.selectedSite()?.status; as status) {\n <kbq-badge class=\"kbq-app-switcher-group-header__badge\" [compact]=\"true\">\n {{ status }}\n </kbq-badge>\n }\n </div>\n }\n\n <kbq-dropdown role=\"none\" [class]=\"'kbq-app-switcher-sites'\">\n <div kbqDropdownStaticContent role=\"none\" class=\"kbq-app-switcher-site\">\n @for (app of trigger.currentApps; track app.id || app.name) {\n @if (!app.aliases) {\n <a\n rel=\"noopener noreferrer\"\n kbq-app-switcher-list-item\n [attr.href]=\"app.link ?? null\"\n [attr.aria-current]=\"app.id === trigger.selectedApp()?.id ? 'true' : null\"\n [class.kbq-selected]=\"app.id === trigger.selectedApp()?.id\"\n [app]=\"app\"\n [toggle]=\"!!app.aliases\"\n ></a>\n } @else {\n <div\n #appSwitcherApp=\"kbqAppSwitcherApp\"\n kbq-app-switcher-list-item\n [app]=\"app\"\n [toggle]=\"!!app.aliases\"\n ></div>\n\n @if (!appSwitcherApp.collapsed()) {\n @for (alias of app.aliases; track alias.id) {\n <a\n rel=\"noopener noreferrer\"\n kbq-app-switcher-list-item\n [attr.href]=\"alias.link ?? null\"\n [attr.aria-current]=\"alias.id === trigger.selectedApp()?.id ? 'true' : null\"\n [class]=\"nestedAliasClass\"\n [class.kbq-selected]=\"alias.id === trigger.selectedApp()?.id\"\n [app]=\"alias\"\n ></a>\n }\n }\n }\n }\n </div>\n </kbq-dropdown>\n </div>\n\n @if (trigger.sitesMode) {\n <kbq-divider />\n\n <div class=\"kbq-app-switcher__sites-container\" role=\"none\">\n <div class=\"kbq-app-switcher-group-header\" role=\"none\">\n <div class=\"kbq-app-switcher-group-header__text\">{{ localeConfiguration().sitesHeader }}</div>\n </div>\n\n <kbq-dropdown #otherSites=\"kbqDropdown\" role=\"none\">\n <div kbqDropdownStaticContent role=\"none\" class=\"kbq-app-switcher-sites\">\n @for (site of trigger.sites; track site.id) {\n @if (site.id !== trigger.selectedSite()?.id) {\n <div\n [kbq-app-switcher-dropdown-site]=\"site\"\n [kbqDropdownTriggerFor]=\"dropdownWithSelectedSite\"\n [kbqDropdownTriggerData]=\"{ site }\"\n [offsetX]=\"0\"\n ></div>\n }\n }\n </div>\n </kbq-dropdown>\n </div>\n\n <!--\n The flyout panels must stay in the same view as the triggers above: a template reference\n variable is only visible inside the view that declares it. Their hosts render empty (the\n content moves into an overlay when opened), so `role=\"none\"` keeps the menu ownership\n chain intact.\n\n Each panel is shared by its triggers, so it renders the data of the trigger that opened it\n (`kbqDropdownTriggerData`), not of the last hovered row: the safe area keeps a panel open\n while the pointer crosses other triggers.\n -->\n <kbq-dropdown #dropdownWithSelectedSite=\"kbqDropdown\" role=\"none\" [class]=\"'kbq-app-switcher-sites'\">\n <ng-template let-site=\"site\" kbqDropdownContent>\n @for (app of site.apps; track app.id || app.name) {\n @if (app.aliases) {\n <div\n #dropdownWithGroupedAppsTrigger=\"kbqDropdownTrigger\"\n [kbq-app-switcher-dropdown-app]=\"app\"\n [kbqDropdownTriggerFor]=\"dropdownWithGroupedApps\"\n [kbqDropdownTriggerData]=\"{ site, app }\"\n [offsetX]=\"0\"\n [class.kbq-pressed]=\"dropdownWithGroupedAppsTrigger.opened\"\n ></div>\n } @else {\n <a\n rel=\"noopener noreferrer\"\n [attr.href]=\"app.link ?? null\"\n [kbq-app-switcher-dropdown-app]=\"app\"\n (click)=\"selectAppInSite(site, app)\"\n ></a>\n }\n }\n </ng-template>\n </kbq-dropdown>\n\n <kbq-dropdown #dropdownWithGroupedApps=\"kbqDropdown\" role=\"none\" [class]=\"'kbq-app-switcher-sites'\">\n <ng-template let-site=\"site\" let-app=\"app\" kbqDropdownContent>\n @for (alias of app.aliases; track alias.id) {\n <a\n rel=\"noopener noreferrer\"\n [attr.href]=\"alias.link ?? null\"\n [kbq-app-switcher-dropdown-app]=\"alias\"\n (click)=\"selectAppInSite(site, alias)\"\n ></a>\n }\n </ng-template>\n </kbq-dropdown>\n }\n </div>\n } @else {\n <div class=\"kbq-app-switcher__search-result\">\n @if (filteredSites.length) {\n <div role=\"menu\" aria-orientation=\"vertical\">\n <kbq-dropdown role=\"none\" [class]=\"'kbq-app-switcher-sites'\">\n <div kbqDropdownStaticContent role=\"none\" class=\"kbq-app-switcher-site\">\n @for (site of filteredSites; track site.id) {\n @if (trigger.sitesMode && site.apps) {\n <kbq-optgroup label=\"{{ site.name }}\" role=\"none\" />\n }\n\n @for (app of site.apps; track app.id || app.name) {\n <a\n rel=\"noopener noreferrer\"\n kbq-app-switcher-list-item\n [attr.href]=\"app.link ?? null\"\n [app]=\"app\"\n [highlightText]=\"searchControl.getRawValue() ?? ''\"\n ></a>\n }\n }\n </div>\n </kbq-dropdown>\n </div>\n }\n\n <!--\n Outside the menu: a status message is not a menu item. The live region itself stays mounted\n while the query changes, so the message is announced once it appears - a region inserted into\n the DOM together with its text is announced unreliably. It collapses while there are results\n (`:empty`, see app-switcher.scss).\n -->\n <div class=\"kbq-app-switcher__empty-search-result\" role=\"status\">\n @if (!filteredSites.length) {\n {{ localeConfiguration().searchEmptyResult }}\n }\n </div>\n </div>\n }\n</kbq-scrollbar>\n", styles: [".kbq-app-switcher{position:relative;display:flex;flex-direction:column;margin-top:var(--kbq-size-xxs);margin-bottom:var(--kbq-size-xxs);width:var(--kbq-app-switcher-size-container-width, 320px);border-radius:var(--kbq-size-xs)}@supports (corner-shape: squircle){.kbq-app-switcher{corner-shape:squircle;border-radius:clamp(var(--kbq-size-xs) * 1.85,var(--kbq-size-xs) * 2.3 - 3.6px,var(--kbq-size-xs) * 2)}}.kbq-app-switcher{box-shadow:var(--kbq-shadow-popup);box-sizing:border-box;z-index:1}.kbq-app-switcher__search-container{padding-top:var(--kbq-size-xxs)}.kbq-app-switcher__search-result{max-width:var(--kbq-app-switcher-size-container-width, 320px);min-height:0;padding:var(--kbq-size-s) var(--kbq-size-xxs)}.kbq-app-switcher__empty-search-result{display:flex;justify-content:center;align-items:center;height:var(--kbq-app-switcher-size-empty-search-result-height, 96px)}.kbq-app-switcher__empty-search-result:empty{display:none}.kbq-app-switcher__app-container{display:flex;flex-direction:column;min-height:0;padding:var(--kbq-size-s) var(--kbq-size-xxs)}.kbq-app-switcher-group-header{padding:var(--kbq-size-s) var(--kbq-size-m);display:flex;flex-direction:row;justify-content:space-between}.kbq-app-switcher__sites-container{padding:var(--kbq-size-xxs)}.kbq-app-switcher{background:var(--kbq-background-card)}.kbq-app-switcher .kbq-app-switcher-group-header,.kbq-app-switcher__empty-search-result{color:var(--kbq-foreground-contrast-secondary)}.kbq-app-switcher,.kbq-app-switcher__empty-search-result{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-app-switcher-group-header__text{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}.kbq-app-switcher-group-header__badge{font-size:var(--kbq-typography-text-compact-medium-font-size);font-style:var(--kbq-typography-text-compact-medium-font-style);font-weight:var(--kbq-typography-text-compact-medium-font-weight);line-height:var(--kbq-typography-text-compact-medium-line-height);font-family:var(--kbq-typography-text-compact-medium-font-family);text-transform:var(--kbq-typography-text-compact-medium-text-transform);font-feature-settings:var(--kbq-typography-text-compact-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-medium-letter-spacing)}\n", ".kbq-app-switcher,.kbq-app-switcher-sites{--kbq-app-switcher-size-container-width: 320px;--kbq-app-switcher-size-empty-search-result-height: 96px;--kbq-app-switcher-size-list-item-height-min: 38px;--kbq-app-switcher-size-dropdown-app-height-min: 50px}\n"] }]
|
|
898
|
+
}], ctorParameters: () => [], propDecorators: { input: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqInput), { isSignal: true }] }], otherSites: [{ type: i0.ViewChild, args: ['otherSites', { isSignal: true }] }], allItemsQuery: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => KbqDropdownItem), { isSignal: true }] }], triggerInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }] } });
|
|
606
899
|
class KbqAppSwitcherTrigger extends KbqPopUpTrigger {
|
|
607
900
|
constructor() {
|
|
608
901
|
super(...arguments);
|
|
609
|
-
/**
|
|
610
|
-
|
|
611
|
-
|
|
902
|
+
/**
|
|
903
|
+
* Optional so a standalone consumer works without `kbqAppSwitcherProvider()`; an application-level
|
|
904
|
+
* provider for `KBQ_APP_SWITCHER_SCROLL_STRATEGY` still wins over this fallback.
|
|
905
|
+
*
|
|
906
|
+
* @docs-private
|
|
907
|
+
*/
|
|
908
|
+
this.scrollStrategy = inject(KBQ_APP_SWITCHER_SCROLL_STRATEGY, { optional: true }) ??
|
|
909
|
+
kbqAppSwitcherScrollStrategyFactory(this.overlay);
|
|
910
|
+
// Abstract members of `KbqPopUp`/`KbqPopUpTrigger` that the app-switcher has no use for: its content is
|
|
911
|
+
// fixed (the app list), it never draws an arrow and it never renders a backdrop.
|
|
612
912
|
/** @docs-private */
|
|
613
913
|
this.arrow = false;
|
|
614
|
-
/** @docs-private */
|
|
615
914
|
this.hasBackdrop = false;
|
|
616
|
-
/** @docs-private */
|
|
617
915
|
this.size = PopUpSizes.Medium;
|
|
916
|
+
/** Selected application */
|
|
917
|
+
this.selectedApp = model(undefined, ...(ngDevMode ? [{ debugName: "selectedApp" }] : /* istanbul ignore next */ []));
|
|
618
918
|
/** Placement of popUp */
|
|
619
|
-
|
|
620
|
-
// This input overrides a field from a superclass, while the superclass field
|
|
621
|
-
// is not migrated.
|
|
622
|
-
this.placement = PopUpPlacements.BottomLeft;
|
|
919
|
+
this.placement = defaultPlacement;
|
|
623
920
|
/** Class that will be used in the background */
|
|
624
|
-
|
|
625
|
-
// Class of this input is referenced in the signature of another class.
|
|
626
|
-
this.backdropClass = 'cdk-overlay-transparent-backdrop';
|
|
921
|
+
this.backdropClass = defaultBackdropClass;
|
|
627
922
|
/** Offset of popUp */
|
|
628
|
-
// TODO: Skipped for migration because:
|
|
629
|
-
// Class of this input is referenced in the signature of another class.
|
|
630
923
|
this.offset = defaultOffsetYWithArrow;
|
|
631
|
-
|
|
924
|
+
/** Selected site */
|
|
925
|
+
this.selectedSite = model(undefined, ...(ngDevMode ? [{ debugName: "selectedSite" }] : /* istanbul ignore next */ []));
|
|
926
|
+
/**
|
|
927
|
+
* `selectedSite` with its applications grouped for rendering.
|
|
928
|
+
*
|
|
929
|
+
* Looked up by id among the parsed sites, so re-selecting a site never regroups it again. Falls back to
|
|
930
|
+
* the raw value when the id is unknown (a stale id, or `selectedSite` set before `sites`) instead of
|
|
931
|
+
* throwing.
|
|
932
|
+
*
|
|
933
|
+
* @docs-private
|
|
934
|
+
*/
|
|
935
|
+
this.parsedSelectedSite = computed(() => {
|
|
936
|
+
const value = this.selectedSite();
|
|
937
|
+
return value && (this.parsedSitesById().get(value.id) ?? value);
|
|
938
|
+
}, ...(ngDevMode ? [{ debugName: "parsedSelectedSite" }] : /* istanbul ignore next */ []));
|
|
632
939
|
/** Emits a change event whenever the placement state changes. */
|
|
633
940
|
this.placementChange = new EventEmitter();
|
|
941
|
+
/** @docs-private */
|
|
942
|
+
this.placementChangeOutput = outputFromObservable(this.placementChange, { alias: 'kbqPlacementChange' });
|
|
634
943
|
/** Emits a change event whenever the visible state changes. */
|
|
635
944
|
this.visibleChange = new EventEmitter();
|
|
636
945
|
/** @docs-private */
|
|
637
|
-
this.
|
|
638
|
-
/**
|
|
639
|
-
|
|
640
|
-
|
|
946
|
+
this.visibleChangeOutput = outputFromObservable(this.visibleChange, { alias: 'kbqVisibleChange' });
|
|
947
|
+
/**
|
|
948
|
+
* Space-separated list of DOM events that open the popup (`KbqPopUpTrigger.trigger`).
|
|
949
|
+
*
|
|
950
|
+
* Not to be confused with `KbqAppSwitcherComponent.trigger`, which is the back-reference from the popup to
|
|
951
|
+
* this directive.
|
|
952
|
+
*
|
|
953
|
+
* @docs-private
|
|
954
|
+
*/
|
|
641
955
|
this.trigger = `${PopUpTriggers.Click}, ${PopUpTriggers.Keydown}`;
|
|
642
956
|
/** @docs-private */
|
|
643
957
|
this.originSelector = '.kbq-app-switcher';
|
|
958
|
+
this.originalSitesSignal = signal([], ...(ngDevMode ? [{ debugName: "originalSitesSignal" }] : /* istanbul ignore next */ []));
|
|
959
|
+
this.groupBySignal = signal(defaultGroupBy, ...(ngDevMode ? [{ debugName: "groupBySignal" }] : /* istanbul ignore next */ []));
|
|
960
|
+
/**
|
|
961
|
+
* Sites with their applications grouped, keyed by site id.
|
|
962
|
+
*
|
|
963
|
+
* Grouping runs once per `sites`/`groupBy` change instead of once per `selectedSite` assignment, and the
|
|
964
|
+
* parsed objects keep their identity so `@for` can reuse the rendered rows.
|
|
965
|
+
*/
|
|
966
|
+
this.parsedSitesById = computed(() => {
|
|
967
|
+
const groupBy = this.groupBySignal();
|
|
968
|
+
return new Map(this.originalSitesSignal().map((site) => [
|
|
969
|
+
site.id,
|
|
970
|
+
{
|
|
971
|
+
...site,
|
|
972
|
+
apps: makeGroupsForApps(site.apps, KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_GROUPING, groupBy)
|
|
973
|
+
}
|
|
974
|
+
]));
|
|
975
|
+
}, ...(ngDevMode ? [{ debugName: "parsedSitesById" }] : /* istanbul ignore next */ []));
|
|
976
|
+
this.parsedSites = computed(() => [...this.parsedSitesById().values()], ...(ngDevMode ? [{ debugName: "parsedSites" }] : /* istanbul ignore next */ []));
|
|
977
|
+
this.appsCountComputed = computed(() => this.originalSitesSignal().reduce((acc, site) => acc + site.apps.length, 0), ...(ngDevMode ? [{ debugName: "appsCountComputed" }] : /* istanbul ignore next */ []));
|
|
978
|
+
this.sitesModeComputed = computed(() => this.originalSitesSignal().length > 1, ...(ngDevMode ? [{ debugName: "sitesModeComputed" }] : /* istanbul ignore next */ []));
|
|
979
|
+
this.currentAppsComputed = computed(() => this.sitesModeComputed()
|
|
980
|
+
? // A multi-site switcher can be opened before a site is selected; render nothing rather than crash.
|
|
981
|
+
(this.parsedSelectedSite()?.apps ?? [])
|
|
982
|
+
: (this.parsedSites()[0]?.apps ?? []), ...(ngDevMode ? [{ debugName: "currentAppsComputed" }] : /* istanbul ignore next */ []));
|
|
983
|
+
/** @docs-private */
|
|
984
|
+
this.placementInput = input(undefined, { ...(ngDevMode ? { debugName: "placementInput" } : /* istanbul ignore next */ {}), alias: 'kbqAppSwitcherPlacement' });
|
|
985
|
+
/** @docs-private */
|
|
986
|
+
this.backdropClassInput = input(undefined, { ...(ngDevMode ? { debugName: "backdropClassInput" } : /* istanbul ignore next */ {}), alias: 'backdropClass' });
|
|
987
|
+
/** @docs-private */
|
|
988
|
+
this.offsetInput = input(undefined, { ...(ngDevMode ? { debugName: "offsetInput" } : /* istanbul ignore next */ {}), alias: 'offset',
|
|
989
|
+
transform: kbqOptionalNumberAttribute });
|
|
990
|
+
/** @docs-private */
|
|
991
|
+
this.sitesInput = input(undefined, { ...(ngDevMode ? { debugName: "sitesInput" } : /* istanbul ignore next */ {}), alias: 'sites' });
|
|
992
|
+
/** @docs-private */
|
|
993
|
+
this.groupByInput = input(undefined, { ...(ngDevMode ? { debugName: "groupByInput" } : /* istanbul ignore next */ {}), alias: 'groupBy' });
|
|
994
|
+
/** @docs-private */
|
|
995
|
+
this.disabledInput = input(undefined, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
996
|
+
transform: booleanAttribute });
|
|
644
997
|
this.hideIfNotInViewPort = () => {
|
|
645
998
|
if (!this.scrollable)
|
|
646
999
|
return;
|
|
@@ -658,86 +1011,48 @@ class KbqAppSwitcherTrigger extends KbqPopUpTrigger {
|
|
|
658
1011
|
get withSearch() {
|
|
659
1012
|
return this.appsCount > KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_SEARCH;
|
|
660
1013
|
}
|
|
661
|
-
/**
|
|
662
|
-
*
|
|
1014
|
+
/**
|
|
1015
|
+
* Number of applications to choose from
|
|
1016
|
+
*
|
|
1017
|
+
* @docs-private
|
|
1018
|
+
*/
|
|
663
1019
|
get appsCount() {
|
|
664
|
-
return this.
|
|
1020
|
+
return this.appsCountComputed();
|
|
665
1021
|
}
|
|
666
|
-
/**
|
|
667
|
-
*
|
|
1022
|
+
/**
|
|
1023
|
+
* Whether the sites are used or not
|
|
1024
|
+
*
|
|
1025
|
+
* @docs-private
|
|
1026
|
+
*/
|
|
668
1027
|
get sitesMode() {
|
|
669
|
-
return this.
|
|
1028
|
+
return this.sitesModeComputed();
|
|
670
1029
|
}
|
|
671
|
-
/**
|
|
1030
|
+
/**
|
|
1031
|
+
* Applications of the currently selected site, grouped for rendering.
|
|
1032
|
+
*
|
|
1033
|
+
* @docs-private
|
|
1034
|
+
*/
|
|
672
1035
|
get currentApps() {
|
|
673
|
-
return this.
|
|
1036
|
+
return this.currentAppsComputed();
|
|
674
1037
|
}
|
|
675
|
-
/** Array of sites */
|
|
676
|
-
// TODO: Skipped for migration because:
|
|
677
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1038
|
+
/** Array of sites, with the applications of each site grouped for rendering. */
|
|
678
1039
|
get sites() {
|
|
679
|
-
return this.
|
|
1040
|
+
return this.parsedSites();
|
|
680
1041
|
}
|
|
681
1042
|
set sites(value) {
|
|
682
1043
|
this.originalSites = value;
|
|
683
|
-
if (this.originalSites.length === 1) {
|
|
684
|
-
this._parsedApps = this.makeGroupsForApps(this.originalSites[0].apps, KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_GROUPING);
|
|
685
|
-
}
|
|
686
|
-
else {
|
|
687
|
-
this._parsedSites = [];
|
|
688
|
-
value.forEach((site) => {
|
|
689
|
-
const newSite = { ...site, apps: [] };
|
|
690
|
-
newSite.apps = this.makeGroupsForApps(site.apps, KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_GROUPING);
|
|
691
|
-
this._parsedSites.push(newSite);
|
|
692
|
-
});
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
makeGroupsForApps(apps, minAppsForGrouping) {
|
|
696
|
-
const groups = {};
|
|
697
|
-
const untyped = [];
|
|
698
|
-
const groupedApps = [];
|
|
699
|
-
apps.forEach((app) => {
|
|
700
|
-
this.groupBy(app, groups, untyped);
|
|
701
|
-
});
|
|
702
|
-
Object.values(groups).forEach((group) => {
|
|
703
|
-
if (group.aliases && group.aliases.length > minAppsForGrouping) {
|
|
704
|
-
groupedApps.push(group);
|
|
705
|
-
}
|
|
706
|
-
else {
|
|
707
|
-
untyped.push(...group.aliases);
|
|
708
|
-
}
|
|
709
|
-
});
|
|
710
|
-
groupedApps.push(...untyped);
|
|
711
|
-
return groupedApps;
|
|
712
1044
|
}
|
|
713
|
-
/**
|
|
714
|
-
*
|
|
715
|
-
|
|
716
|
-
|
|
1045
|
+
/**
|
|
1046
|
+
* Function to group the apps by type. The first argument is an app object with type.
|
|
1047
|
+
* The second is a groups object and third is an array for untyped apps
|
|
1048
|
+
*/
|
|
717
1049
|
get groupBy() {
|
|
718
|
-
return this.
|
|
1050
|
+
return this.groupBySignal();
|
|
719
1051
|
}
|
|
720
1052
|
set groupBy(fn) {
|
|
721
|
-
|
|
722
|
-
throw new Error('The argument must be a function');
|
|
723
|
-
}
|
|
724
|
-
this._groupBy = fn;
|
|
725
|
-
}
|
|
726
|
-
/** Selected site */
|
|
727
|
-
// TODO: Skipped for migration because:
|
|
728
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
729
|
-
get selectedSite() {
|
|
730
|
-
return this._parsedSelectedSite;
|
|
731
|
-
}
|
|
732
|
-
set selectedSite(value) {
|
|
733
|
-
const originValue = this.originalSites.find((site) => value.id === site.id);
|
|
734
|
-
const newSite = { ...originValue, apps: [] };
|
|
735
|
-
newSite.apps = this.makeGroupsForApps(originValue.apps, KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_GROUPING);
|
|
736
|
-
this._parsedSelectedSite = newSite;
|
|
1053
|
+
this.groupBySignal.set(fn);
|
|
737
1054
|
}
|
|
738
1055
|
/** Whether the trigger is disabled. */
|
|
739
|
-
// TODO: Skipped for migration because:
|
|
740
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
741
1056
|
get disabled() {
|
|
742
1057
|
return this._disabled;
|
|
743
1058
|
}
|
|
@@ -751,6 +1066,17 @@ class KbqAppSwitcherTrigger extends KbqPopUpTrigger {
|
|
|
751
1066
|
get hasClickTrigger() {
|
|
752
1067
|
return this.trigger.includes(PopUpTriggers.Click);
|
|
753
1068
|
}
|
|
1069
|
+
/**
|
|
1070
|
+
* Sites exactly as supplied through `sites`, without grouping.
|
|
1071
|
+
*
|
|
1072
|
+
* @docs-private
|
|
1073
|
+
*/
|
|
1074
|
+
get originalSites() {
|
|
1075
|
+
return this.originalSitesSignal();
|
|
1076
|
+
}
|
|
1077
|
+
set originalSites(value) {
|
|
1078
|
+
this.originalSitesSignal.set(value ?? []);
|
|
1079
|
+
}
|
|
754
1080
|
/** @docs-private */
|
|
755
1081
|
get overlayConfig() {
|
|
756
1082
|
return {
|
|
@@ -759,37 +1085,58 @@ class KbqAppSwitcherTrigger extends KbqPopUpTrigger {
|
|
|
759
1085
|
backdropClass: this.backdropClass
|
|
760
1086
|
};
|
|
761
1087
|
}
|
|
1088
|
+
ngOnChanges(changes) {
|
|
1089
|
+
// A bound input is handed to its member, a bound `undefined` as the member's default; unbound, it leaves
|
|
1090
|
+
// what code wrote.
|
|
1091
|
+
if (changes['placementInput']) {
|
|
1092
|
+
this.placement = this.placementInput() ?? defaultPlacement;
|
|
1093
|
+
}
|
|
1094
|
+
if (changes['backdropClassInput']) {
|
|
1095
|
+
this.backdropClass = this.backdropClassInput() ?? defaultBackdropClass;
|
|
1096
|
+
}
|
|
1097
|
+
if (changes['offsetInput']) {
|
|
1098
|
+
this.offset = this.offsetInput() ?? defaultOffsetYWithArrow;
|
|
1099
|
+
}
|
|
1100
|
+
if (changes['sitesInput']) {
|
|
1101
|
+
this.sites = this.sitesInput() ?? [];
|
|
1102
|
+
}
|
|
1103
|
+
if (changes['groupByInput']) {
|
|
1104
|
+
this.groupBy = this.groupByInput() ?? defaultGroupBy;
|
|
1105
|
+
}
|
|
1106
|
+
if (changes['disabledInput']) {
|
|
1107
|
+
const disabled = this.disabledInput();
|
|
1108
|
+
if (disabled !== undefined)
|
|
1109
|
+
this.disabled = disabled;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
762
1112
|
ngOnInit() {
|
|
763
1113
|
super.ngOnInit();
|
|
764
1114
|
this.scrollable
|
|
765
1115
|
?.elementScrolled()
|
|
766
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1116
|
+
.pipe(auditTime(SCROLL_GEOMETRY_THROTTLE), takeUntilDestroyed(this.destroyRef))
|
|
767
1117
|
.subscribe(this.hideIfNotInViewPort);
|
|
768
1118
|
}
|
|
769
1119
|
ngAfterContentInit() {
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
// eslint-disable-next-line rxjs-x/no-nested-subscribe
|
|
784
|
-
this.preventClosingByInnerScrollSubscription = this.closingActions().subscribe((event) => {
|
|
785
|
-
if (event['scrollDispatcher']) {
|
|
786
|
-
event['kbqPopoverPreventHide'] = true;
|
|
787
|
-
event['type'] = 'click';
|
|
788
|
-
}
|
|
789
|
-
});
|
|
1120
|
+
// Hide the popup once it scrolls out of an ancestor that opted in with `kbq-hide-nested-popup`
|
|
1121
|
+
// (e.g. a tab body), mirroring `KbqPopover`. No extra throttle: `ScrollDispatcher.scrolled()`
|
|
1122
|
+
// already audits its output (20ms by default).
|
|
1123
|
+
this.scrollDispatcher
|
|
1124
|
+
.scrolled()
|
|
1125
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1126
|
+
.subscribe((scrollable) => {
|
|
1127
|
+
if (!scrollable?.getElementRef().nativeElement.classList.contains('kbq-hide-nested-popup'))
|
|
1128
|
+
return;
|
|
1129
|
+
const parentRects = scrollable.getElementRef().nativeElement.getBoundingClientRect();
|
|
1130
|
+
const childRects = this.elementRef.nativeElement.getBoundingClientRect();
|
|
1131
|
+
if (childRects.bottom < parentRects.top || childRects.top > parentRects.bottom) {
|
|
1132
|
+
this.hide();
|
|
790
1133
|
}
|
|
791
|
-
|
|
792
|
-
|
|
1134
|
+
});
|
|
1135
|
+
// On close, return focus to the trigger. Inner-scroll close suppression lives in
|
|
1136
|
+
// `closingActions()` (it filters scrolls originating inside the popup), so no per-visibility
|
|
1137
|
+
// subscription is needed here.
|
|
1138
|
+
this.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((visible) => {
|
|
1139
|
+
if (!visible) {
|
|
793
1140
|
this.focus();
|
|
794
1141
|
}
|
|
795
1142
|
});
|
|
@@ -798,27 +1145,14 @@ class KbqAppSwitcherTrigger extends KbqPopUpTrigger {
|
|
|
798
1145
|
updateData() {
|
|
799
1146
|
if (!this.instance)
|
|
800
1147
|
return;
|
|
801
|
-
this.instance.header = this.header;
|
|
802
1148
|
this.instance.content = this.content;
|
|
803
1149
|
this.instance.arrow = this.arrow;
|
|
804
1150
|
this.instance.offset = this.offset;
|
|
805
|
-
this.instance.
|
|
806
|
-
this.instance.updateTrapFocus(this.trigger !== PopUpTriggers.Focus);
|
|
1151
|
+
this.instance.detectChanges();
|
|
807
1152
|
if (this.isOpen) {
|
|
808
1153
|
this.updatePosition(true);
|
|
809
1154
|
}
|
|
810
1155
|
}
|
|
811
|
-
/** Updates the current position.
|
|
812
|
-
* @docs-private */
|
|
813
|
-
updatePosition(reapplyPosition = false) {
|
|
814
|
-
this.overlayRef = this.createOverlay();
|
|
815
|
-
const position = this.overlayRef.getConfig().positionStrategy
|
|
816
|
-
.withPositions(this.getAdjustedPositions())
|
|
817
|
-
.withPush(true);
|
|
818
|
-
if (reapplyPosition) {
|
|
819
|
-
setTimeout(() => position.reapplyLastPosition());
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
1156
|
/** @docs-private */
|
|
823
1157
|
getOverlayHandleComponentType() {
|
|
824
1158
|
return KbqAppSwitcherComponent;
|
|
@@ -828,16 +1162,25 @@ class KbqAppSwitcherTrigger extends KbqPopUpTrigger {
|
|
|
828
1162
|
if (!this.instance)
|
|
829
1163
|
return;
|
|
830
1164
|
this.instance.updateClassMap(POSITION_TO_CSS_MAP[newPlacement], this.customClass, this.size);
|
|
831
|
-
this.instance.markForCheck();
|
|
832
1165
|
}
|
|
833
1166
|
/** @docs-private */
|
|
834
1167
|
closingActions() {
|
|
835
|
-
return merge(this.overlayRef.outsidePointerEvents(), this.overlayRef.backdropClick(),
|
|
1168
|
+
return merge(this.overlayRef.outsidePointerEvents(), this.overlayRef.backdropClick(),
|
|
1169
|
+
// Only an outer/ancestor scroll that moves the popup out of view should close it. Scrolling
|
|
1170
|
+
// the popup's own content must not: its `KbqScrollbar` viewport is a `CdkScrollable`, so it
|
|
1171
|
+
// reaches the root `ScrollDispatcher`, and keyboard navigation scrolls the focused item into
|
|
1172
|
+
// view through that viewport - without this filter every arrow key would close the panel.
|
|
1173
|
+
this.scrollDispatcher.scrolled().pipe(filter((scrollable) => !this.isInnerScroll(scrollable))));
|
|
836
1174
|
}
|
|
837
|
-
/**
|
|
838
|
-
|
|
1175
|
+
/** Whether a `ScrollDispatcher` emission originates from inside this popup's own scrollable content. */
|
|
1176
|
+
isInnerScroll(scrollable) {
|
|
1177
|
+
return (scrollable instanceof CdkScrollable &&
|
|
1178
|
+
!!scrollable.getElementRef().nativeElement.closest('.kbq-app-switcher, .kbq-app-switcher-sites'));
|
|
1179
|
+
}
|
|
1180
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1181
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqAppSwitcherTrigger, isStandalone: true, selector: "[kbqAppSwitcher]", inputs: { selectedApp: { classPropertyName: "selectedApp", publicName: "selectedApp", isSignal: true, isRequired: false, transformFunction: null }, selectedSite: { classPropertyName: "selectedSite", publicName: "selectedSite", isSignal: true, isRequired: false, transformFunction: null }, placementInput: { classPropertyName: "placementInput", publicName: "kbqAppSwitcherPlacement", isSignal: true, isRequired: false, transformFunction: null }, backdropClassInput: { classPropertyName: "backdropClassInput", publicName: "backdropClass", isSignal: true, isRequired: false, transformFunction: null }, offsetInput: { classPropertyName: "offsetInput", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, sitesInput: { classPropertyName: "sitesInput", publicName: "sites", isSignal: true, isRequired: false, transformFunction: null }, groupByInput: { classPropertyName: "groupByInput", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedApp: "selectedAppChange", selectedSite: "selectedSiteChange", placementChangeOutput: "kbqPlacementChange", visibleChangeOutput: "kbqVisibleChange" }, host: { listeners: { "keydown": "keydownHandler($event)", "touchend": "touchendHandler()" }, properties: { "class.kbq-app-switcher_open": "isOpen", "class.kbq-active": "hasClickTrigger && isOpen" } }, providers: [kbqSiblingPopupProvider(KbqAppSwitcherTrigger)], exportAs: ["kbqAppSwitcher"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
839
1182
|
}
|
|
840
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherTrigger, decorators: [{
|
|
841
1184
|
type: Directive,
|
|
842
1185
|
args: [{
|
|
843
1186
|
selector: '[kbqAppSwitcher]',
|
|
@@ -850,50 +1193,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
850
1193
|
},
|
|
851
1194
|
exportAs: 'kbqAppSwitcher'
|
|
852
1195
|
}]
|
|
853
|
-
}], propDecorators: { selectedApp: [{
|
|
854
|
-
type: Input
|
|
855
|
-
}], placement: [{
|
|
856
|
-
type: Input,
|
|
857
|
-
args: ['kbqAppSwitcherPlacement']
|
|
858
|
-
}], backdropClass: [{
|
|
859
|
-
type: Input
|
|
860
|
-
}], offset: [{
|
|
861
|
-
type: Input,
|
|
862
|
-
args: [{ transform: numberAttribute }]
|
|
863
|
-
}], sites: [{
|
|
864
|
-
type: Input
|
|
865
|
-
}], groupBy: [{
|
|
866
|
-
type: Input
|
|
867
|
-
}], selectedSite: [{
|
|
868
|
-
type: Input
|
|
869
|
-
}], disabled: [{
|
|
870
|
-
type: Input,
|
|
871
|
-
args: [{ transform: booleanAttribute }]
|
|
872
|
-
}], placementChange: [{
|
|
873
|
-
type: Output,
|
|
874
|
-
args: ['kbqPlacementChange']
|
|
875
|
-
}], visibleChange: [{
|
|
876
|
-
type: Output,
|
|
877
|
-
args: ['kbqVisibleChange']
|
|
878
|
-
}], selectedSiteChange: [{ type: i0.Output, args: ["selectedSiteChange"] }], selectedAppChange: [{ type: i0.Output, args: ["selectedAppChange"] }] } });
|
|
1196
|
+
}], propDecorators: { selectedApp: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedApp", required: false }] }, { type: i0.Output, args: ["selectedAppChange"] }], selectedSite: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedSite", required: false }] }, { type: i0.Output, args: ["selectedSiteChange"] }], placementChangeOutput: [{ type: i0.Output, args: ["kbqPlacementChange"] }], visibleChangeOutput: [{ type: i0.Output, args: ["kbqVisibleChange"] }], placementInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqAppSwitcherPlacement", required: false }] }], backdropClassInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdropClass", required: false }] }], offsetInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], sitesInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "sites", required: false }] }], groupByInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupBy", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
879
1197
|
|
|
880
1198
|
class KbqAppSwitcherModule {
|
|
881
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
882
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1199
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1200
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherModule, imports: [KbqAppSwitcherComponent,
|
|
883
1201
|
KbqAppSwitcherTrigger,
|
|
884
1202
|
KbqAppSwitcherListItem,
|
|
885
1203
|
KbqAppSwitcherDropdownApp,
|
|
886
1204
|
KbqAppSwitcherDropdownSite], exports: [KbqAppSwitcherTrigger] }); }
|
|
887
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
888
|
-
KBQ_APP_SWITCHER_SCROLL_STRATEGY_FACTORY_PROVIDER,
|
|
889
|
-
{ provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory },
|
|
890
|
-
{ provide: FOCUS_TRAP_INERT_STRATEGY, useClass: EmptyFocusTrapStrategy }
|
|
891
|
-
], imports: [KbqAppSwitcherComponent,
|
|
1205
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherModule, providers: kbqAppSwitcherProvider(), imports: [KbqAppSwitcherComponent,
|
|
892
1206
|
KbqAppSwitcherListItem,
|
|
893
1207
|
KbqAppSwitcherDropdownApp,
|
|
894
1208
|
KbqAppSwitcherDropdownSite] }); }
|
|
895
1209
|
}
|
|
896
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAppSwitcherModule, decorators: [{
|
|
897
1211
|
type: NgModule,
|
|
898
1212
|
args: [{
|
|
899
1213
|
imports: [
|
|
@@ -903,11 +1217,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
903
1217
|
KbqAppSwitcherDropdownApp,
|
|
904
1218
|
KbqAppSwitcherDropdownSite
|
|
905
1219
|
],
|
|
906
|
-
providers:
|
|
907
|
-
KBQ_APP_SWITCHER_SCROLL_STRATEGY_FACTORY_PROVIDER,
|
|
908
|
-
{ provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory },
|
|
909
|
-
{ provide: FOCUS_TRAP_INERT_STRATEGY, useClass: EmptyFocusTrapStrategy }
|
|
910
|
-
],
|
|
1220
|
+
providers: kbqAppSwitcherProvider(),
|
|
911
1221
|
exports: [
|
|
912
1222
|
KbqAppSwitcherTrigger
|
|
913
1223
|
]
|
|
@@ -918,5 +1228,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
918
1228
|
* Generated bundle index. Do not edit.
|
|
919
1229
|
*/
|
|
920
1230
|
|
|
921
|
-
export { KBQ_APP_SWITCHER_CONFIGURATION, KBQ_APP_SWITCHER_DEFAULT_CONFIGURATION, KBQ_APP_SWITCHER_SCROLL_STRATEGY, KBQ_APP_SWITCHER_SCROLL_STRATEGY_FACTORY_PROVIDER, KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_GROUPING, KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_SEARCH, KbqAppSwitcherComponent, KbqAppSwitcherDropdownApp, KbqAppSwitcherDropdownSite, KbqAppSwitcherListItem, KbqAppSwitcherModule, KbqAppSwitcherTrigger, defaultGroupBy,
|
|
1231
|
+
export { KBQ_APP_SWITCHER_CONFIGURATION, KBQ_APP_SWITCHER_DEFAULT_CONFIGURATION, KBQ_APP_SWITCHER_DEFAULT_LOCALE_CONFIGURATION, KBQ_APP_SWITCHER_LOCALE_CONFIGURATION, KBQ_APP_SWITCHER_SCROLL_STRATEGY, KBQ_APP_SWITCHER_SCROLL_STRATEGY_FACTORY_PROVIDER, KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_GROUPING, KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_SEARCH, KbqAppSwitcherComponent, KbqAppSwitcherDropdownApp, KbqAppSwitcherDropdownSite, KbqAppSwitcherIconSanitizer, KbqAppSwitcherListItem, KbqAppSwitcherModule, KbqAppSwitcherTrigger, defaultGroupBy, kbqAppSwitcherLocaleConfigurationProvider, kbqAppSwitcherProvider, kbqAppSwitcherScrollStrategyFactory, makeGroupsForApps };
|
|
922
1232
|
//# sourceMappingURL=koobiq-components-app-switcher.mjs.map
|