@lucca-front/ng 22.0.0-rc.3 → 22.0.0-rc.4
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/fesm2022/lucca-front-ng-a11y.mjs +125 -8
- package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-activity-feed.mjs +74 -27
- package/fesm2022/lucca-front-ng-activity-feed.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-api.mjs +160 -197
- package/fesm2022/lucca-front-ng-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-app-layout.mjs +4 -4
- package/fesm2022/lucca-front-ng-app-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-box.mjs +44 -6
- package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs +15 -9
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-bubble-icon.mjs +28 -13
- package/fesm2022/lucca-front-ng-bubble-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-bubble-illustration.mjs +20 -10
- package/fesm2022/lucca-front-ng-bubble-illustration.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +105 -63
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-chip.mjs +33 -13
- package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-clear.mjs +22 -14
- package/fesm2022/lucca-front-ng-clear.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-code.mjs +4 -4
- package/fesm2022/lucca-front-ng-code.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-color.mjs +16 -8
- package/fesm2022/lucca-front-ng-color.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-comment.mjs +48 -27
- package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-container.mjs +13 -6
- package/fesm2022/lucca-front-ng-container.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-api.mjs +82 -52
- package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-department.mjs +31 -18
- package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs +21 -15
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +12 -9
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-legal-units.mjs +168 -0
- package/fesm2022/lucca-front-ng-core-select-legal-units.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs +9 -6
- package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-user.mjs +67 -43
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +442 -417
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core.mjs +97 -29
- package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-data-table.mjs +143 -81
- package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date.mjs +167 -162
- package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +395 -193
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-department.mjs +33 -27
- package/fesm2022/lucca-front-ng-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +71 -51
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-divider.mjs +18 -12
- package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dropdown.mjs +71 -73
- package/fesm2022/lucca-front-ng-dropdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-empty-state.mjs +56 -30
- package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-error-page.mjs +15 -7
- package/fesm2022/lucca-front-ng-error-page.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-establishment.mjs +94 -116
- package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-fancy-box.mjs +23 -11
- package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-file-upload.mjs +135 -69
- package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills.mjs +90 -69
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-footer.mjs +17 -8
- package/fesm2022/lucca-front-ng-footer.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +129 -79
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-header.mjs +12 -6
- package/fesm2022/lucca-front-ng-form-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-label.mjs +65 -42
- package/fesm2022/lucca-front-ng-form-label.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form.mjs +9 -6
- package/fesm2022/lucca-front-ng-form.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-formly.mjs +59 -58
- package/fesm2022/lucca-front-ng-formly.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +58 -40
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs +3 -3
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs +8 -9
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs +3 -3
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +263 -105
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +326 -151
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-gauge.mjs +23 -13
- package/fesm2022/lucca-front-ng-gauge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-grid.mjs +39 -18
- package/fesm2022/lucca-front-ng-grid.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-data.mjs +50 -15
- package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-text.mjs +28 -0
- package/fesm2022/lucca-front-ng-highlight-text.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs +174 -17
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-impersonation.mjs +124 -0
- package/fesm2022/lucca-front-ng-impersonation.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-index-table.mjs +82 -54
- package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs +17 -7
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-input.mjs +28 -24
- package/fesm2022/lucca-front-ng-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +54 -23
- package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listbox.mjs +31 -18
- package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listing.mjs +16 -12
- package/fesm2022/lucca-front-ng-listing.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-loading.mjs +13 -6
- package/fesm2022/lucca-front-ng-loading.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-main-layout.mjs +6 -6
- package/fesm2022/lucca-front-ng-main-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-mobile-push.mjs +15 -5
- package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs +37 -35
- package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +317 -217
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-new-badge.mjs +5 -4
- package/fesm2022/lucca-front-ng-new-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-number-format.mjs +21 -21
- package/fesm2022/lucca-front-ng-number-format.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-number.mjs +7 -7
- package/fesm2022/lucca-front-ng-number.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs +24 -12
- package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +181 -168
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-page-header.mjs +12 -8
- package/fesm2022/lucca-front-ng-page-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs +26 -10
- package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs +14 -8
- package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover.mjs +141 -253
- package/fesm2022/lucca-front-ng-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +133 -89
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popup.mjs +10 -10
- package/fesm2022/lucca-front-ng-popup.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-progress-bar.mjs +13 -6
- package/fesm2022/lucca-front-ng-progress-bar.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-progress-stepper.mjs +22 -12
- package/fesm2022/lucca-front-ng-progress-stepper.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-read-more.mjs +38 -17
- package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-resource-card.mjs +26 -17
- package/fesm2022/lucca-front-ng-resource-card.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-safe-content.mjs +10 -10
- package/fesm2022/lucca-front-ng-safe-content.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll-box.mjs +8 -6
- package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll.mjs +14 -10
- package/fesm2022/lucca-front-ng-scroll.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +26 -14
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control.mjs +12 -10
- package/fesm2022/lucca-front-ng-segmented-control.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-select.mjs +96 -136
- package/fesm2022/lucca-front-ng-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-sidepanel.mjs +7 -7
- package/fesm2022/lucca-front-ng-sidepanel.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +71 -55
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-skeleton.mjs +131 -62
- package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs +16 -11
- package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-software-icon.mjs +34 -25
- package/fesm2022/lucca-front-ng-software-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-sortable-list.mjs +14 -11
- package/fesm2022/lucca-front-ng-sortable-list.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-status-badge.mjs +15 -7
- package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-table-of-content.mjs +8 -7
- package/fesm2022/lucca-front-ng-table-of-content.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tag.mjs +22 -11
- package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-text-flow.mjs +4 -4
- package/fesm2022/lucca-front-ng-text-flow.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-time.mjs +418 -84
- package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-title.mjs +34 -15
- package/fesm2022/lucca-front-ng-title.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-toast.mjs +20 -14
- package/fesm2022/lucca-front-ng-toast.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tooltip.mjs +60 -30
- package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs +20 -13
- package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user-popover.mjs +34 -33
- package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user.mjs +211 -186
- package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs +34 -24
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs.map +1 -1
- package/package.json +20 -8
- package/schematics/action-icon/index.js +34 -1
- package/schematics/action-icon/migration.spec.js +36 -3
- package/schematics/alignment-utilities/migration.spec.js +36 -3
- package/schematics/cdn-urls/migration.spec.js +36 -3
- package/schematics/class-prefix/migration.spec.js +36 -3
- package/schematics/collection.json +10 -0
- package/schematics/color-text/migration.spec.js +36 -3
- package/schematics/component-path/migration.spec.js +36 -3
- package/schematics/deprecated-resolver/index.js +73 -0
- package/schematics/deprecated-resolver/migration.spec.js +58 -0
- package/schematics/deprecated-resolver/schema.json +23 -0
- package/schematics/empty-state-title/migration.spec.js +35 -2
- package/schematics/lib/css-mapper.js +44 -6
- package/schematics/lib/deprecated-mapper.js +109 -0
- package/schematics/lib/index.js +1 -0
- package/schematics/lib/lf-schematic-context.js +34 -1
- package/schematics/lib/local-deps/package-lock.json +17 -79
- package/schematics/lib/local-deps/package.json +1 -1
- package/schematics/lib/local-deps/postcss.js +34 -1
- package/schematics/lib/migration-test.js +5 -2
- package/schematics/lib/scss-ast.js +53 -0
- package/schematics/lu-button/migration.spec.js +34 -1
- package/schematics/lu-container/migration.spec.js +34 -1
- package/schematics/lu-grid/index.js +23 -0
- package/schematics/lu-grid/migration.js +237 -0
- package/schematics/lu-grid/migration.spec.js +56 -0
- package/schematics/lu-grid/migration.utils.js +60 -0
- package/schematics/lu-grid/schema.json +23 -0
- package/schematics/lu-icon/migration.spec.js +34 -1
- package/schematics/lu-loading/migration.spec.js +34 -1
- package/schematics/lu-select/migration.spec.js +34 -1
- package/schematics/lu-text-input/migration.spec.js +34 -1
- package/schematics/new-icons/index.js +35 -2
- package/schematics/new-icons/migration.spec.js +36 -3
- package/schematics/package.json +3 -0
- package/schematics/palettes/index.js +17 -2
- package/schematics/palettes/migration.spec.js +36 -3
- package/schematics/tokens-radius/migration.spec.js +36 -3
- package/schematics/tokens-spacing/migration.spec.js +36 -3
- package/schematics/tokens-typo/migration.spec.js +36 -3
- package/src/components/_picker.scss +6 -1
- package/src/components/_popover.scss +1 -2
- package/src/definitions/option/_option-item.scss +6 -25
- package/types/lucca-front-ng-a11y.d.ts +30 -2
- package/types/lucca-front-ng-activity-feed.d.ts +18 -3
- package/types/lucca-front-ng-api.d.ts +73 -67
- package/types/lucca-front-ng-box.d.ts +6 -1
- package/types/lucca-front-ng-bubble-icon.d.ts +12 -3
- package/types/lucca-front-ng-bubble-illustration.d.ts +11 -5
- package/types/lucca-front-ng-callout.d.ts +24 -16
- package/types/lucca-front-ng-chip.d.ts +10 -1
- package/types/lucca-front-ng-clear.d.ts +12 -5
- package/types/lucca-front-ng-color.d.ts +8 -1
- package/types/lucca-front-ng-comment.d.ts +8 -1
- package/types/lucca-front-ng-container.d.ts +8 -1
- package/types/lucca-front-ng-core-select-api.d.ts +34 -22
- package/types/lucca-front-ng-core-select-department.d.ts +3 -2
- package/types/lucca-front-ng-core-select-legal-units.d.ts +56 -0
- package/types/lucca-front-ng-core-select-user.d.ts +2 -1
- package/types/lucca-front-ng-core-select.d.ts +166 -146
- package/types/lucca-front-ng-core.d.ts +37 -9
- package/types/lucca-front-ng-data-table.d.ts +18 -3
- package/types/lucca-front-ng-date.d.ts +28 -26
- package/types/lucca-front-ng-date2.d.ts +28 -9
- package/types/lucca-front-ng-dialog.d.ts +13 -2
- package/types/lucca-front-ng-divider.d.ts +9 -2
- package/types/lucca-front-ng-dropdown.d.ts +5 -4
- package/types/lucca-front-ng-empty-state.d.ts +16 -8
- package/types/lucca-front-ng-error-page.d.ts +9 -4
- package/types/lucca-front-ng-establishment.d.ts +18 -19
- package/types/lucca-front-ng-fancy-box.d.ts +8 -1
- package/types/lucca-front-ng-file-upload.d.ts +23 -11
- package/types/lucca-front-ng-filter-pills.d.ts +0 -1
- package/types/lucca-front-ng-footer.d.ts +11 -2
- package/types/lucca-front-ng-form-field.d.ts +36 -20
- package/types/lucca-front-ng-form-header.d.ts +9 -2
- package/types/lucca-front-ng-form-label.d.ts +13 -5
- package/types/lucca-front-ng-form.d.ts +2 -0
- package/types/lucca-front-ng-forms-phone-number-input.d.ts +19 -12
- package/types/lucca-front-ng-forms-rich-text-input.d.ts +17 -2
- package/types/lucca-front-ng-forms.d.ts +58 -10
- package/types/lucca-front-ng-gauge.d.ts +1 -1
- package/types/lucca-front-ng-grid.d.ts +23 -8
- package/types/lucca-front-ng-highlight-data.d.ts +16 -1
- package/types/lucca-front-ng-highlight-text.d.ts +12 -0
- package/types/lucca-front-ng-horizontal-navigation.d.ts +40 -3
- package/types/lucca-front-ng-impersonation.d.ts +33 -0
- package/types/lucca-front-ng-index-table.d.ts +19 -4
- package/types/lucca-front-ng-inline-message.d.ts +11 -4
- package/types/lucca-front-ng-input.d.ts +2 -1
- package/types/lucca-front-ng-link.d.ts +13 -3
- package/types/lucca-front-ng-listbox.d.ts +8 -1
- package/types/lucca-front-ng-listing.d.ts +1 -1
- package/types/lucca-front-ng-loading.d.ts +8 -1
- package/types/lucca-front-ng-modal.d.ts +1 -1
- package/types/lucca-front-ng-multi-select.d.ts +39 -37
- package/types/lucca-front-ng-numeric-badge.d.ts +9 -2
- package/types/lucca-front-ng-option.d.ts +10 -10
- package/types/lucca-front-ng-pagination.d.ts +8 -1
- package/types/lucca-front-ng-popover.d.ts +52 -46
- package/types/lucca-front-ng-popover2.d.ts +35 -12
- package/types/lucca-front-ng-progress-bar.d.ts +8 -1
- package/types/lucca-front-ng-progress-stepper.d.ts +8 -1
- package/types/lucca-front-ng-read-more.d.ts +8 -1
- package/types/lucca-front-ng-resource-card.d.ts +10 -1
- package/types/lucca-front-ng-segmented-control-tabs.d.ts +2 -0
- package/types/lucca-front-ng-select.d.ts +30 -28
- package/types/lucca-front-ng-simple-select.d.ts +18 -19
- package/types/lucca-front-ng-skeleton.d.ts +51 -19
- package/types/lucca-front-ng-software-icon.d.ts +11 -6
- package/types/lucca-front-ng-sortable-list.d.ts +2 -1
- package/types/lucca-front-ng-status-badge.d.ts +9 -2
- package/types/lucca-front-ng-tag.d.ts +9 -2
- package/types/lucca-front-ng-time.d.ts +90 -9
- package/types/lucca-front-ng-title.d.ts +6 -1
- package/types/lucca-front-ng-tooltip.d.ts +7 -2
- package/types/lucca-front-ng-user-popover.d.ts +4 -3
- package/types/lucca-front-ng-user.d.ts +39 -25
- package/types/lucca-front-ng-vertical-navigation.d.ts +1 -1
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, Directive, InjectionToken, inject, ChangeDetectionStrategy, Component, TemplateRef, Pipe, ViewContainerRef, Injector, DestroyRef, computed, afterRenderEffect, untracked, Injectable, ElementRef, signal, model, linkedSignal, output, booleanAttribute, viewChild, ChangeDetectorRef, afterNextRender, forwardRef, effect, EventEmitter } from '@angular/core';
|
|
3
|
+
import { syncInputSignal, ɵeffectWithDeps as _effectWithDeps, isNotNil, intlInputOptions, isNil, PortalDirective } from '@lucca-front/ng/core';
|
|
3
4
|
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
4
|
-
import {
|
|
5
|
+
import { toObservable, takeUntilDestroyed, toSignal, outputFromObservable } from '@angular/core/rxjs-interop';
|
|
5
6
|
import { FILTER_PILL_INPUT_COMPONENT, FILTER_PILL_HOST_COMPONENT } from '@lucca-front/ng/filter-pills';
|
|
6
|
-
import { BehaviorSubject, observeOn, asyncScheduler,
|
|
7
|
+
import { BehaviorSubject, observeOn, asyncScheduler, map, filter, take, scan, startWith, distinctUntilChanged, switchMap, timer, of, concatMap, catchError, tap, takeWhile, finalize, takeUntil, ReplaySubject, Subject, defer } from 'rxjs';
|
|
7
8
|
import { AsyncPipe } from '@angular/common';
|
|
8
|
-
import { isNotNil, intlInputOptions, PortalDirective } from '@lucca-front/ng/core';
|
|
9
9
|
import { LuTooltipTriggerDirective } from '@lucca-front/ng/tooltip';
|
|
10
10
|
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
11
11
|
|
|
12
12
|
class LuDisplayerDirective {
|
|
13
|
-
set select(select) {
|
|
14
|
-
select.valueTpl.set(this.templateRef);
|
|
15
|
-
}
|
|
16
13
|
constructor(templateRef) {
|
|
17
14
|
this.templateRef = templateRef;
|
|
15
|
+
this.select = input(undefined, { ...(ngDevMode ? { debugName: "select" } : /* istanbul ignore next */ {}), alias: 'luDisplayerSelect' });
|
|
16
|
+
syncInputSignal(this.select, (select) => select.valueTpl.set(this.templateRef));
|
|
18
17
|
}
|
|
19
18
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
20
19
|
return true;
|
|
21
20
|
}
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
23
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuDisplayerDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
22
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuDisplayerDirective, isStandalone: true, selector: "[luDisplayer]", inputs: { select: { classPropertyName: "select", publicName: "luDisplayerSelect", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
24
23
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuDisplayerDirective, decorators: [{
|
|
26
25
|
type: Directive,
|
|
27
26
|
args: [{
|
|
28
27
|
selector: '[luDisplayer]',
|
|
29
28
|
}]
|
|
30
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { select: [{
|
|
31
|
-
type: Input,
|
|
32
|
-
args: ['luDisplayerSelect']
|
|
33
|
-
}] } });
|
|
29
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { select: [{ type: i0.Input, args: [{ isSignal: true, alias: "luDisplayerSelect", required: false }] }] } });
|
|
34
30
|
|
|
35
31
|
const LU_OPTION_CONTEXT = new InjectionToken('LuOptionContext');
|
|
36
32
|
function optionContextFactory() {
|
|
@@ -56,61 +52,51 @@ class LuSimpleSelectDefaultOptionComponent {
|
|
|
56
52
|
constructor() {
|
|
57
53
|
this.context = inject(LU_OPTION_CONTEXT);
|
|
58
54
|
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
60
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
55
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuSimpleSelectDefaultOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
56
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: LuSimpleSelectDefaultOptionComponent, isStandalone: true, selector: "lu-simple-select-default-option", ngImport: i0, template: "<!-- we don\u2019t want space before comma in presentation display -->\n<!-- prettier-ignore -->\n@if (context.option$ | async; as option) {{{ option?.name ?? option }}}\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
61
57
|
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuSimpleSelectDefaultOptionComponent, decorators: [{
|
|
63
59
|
type: Component,
|
|
64
60
|
args: [{ selector: 'lu-simple-select-default-option', imports: [AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- we don\u2019t want space before comma in presentation display -->\n<!-- prettier-ignore -->\n@if (context.option$ | async; as option) {{{ option?.name ?? option }}}\n" }]
|
|
65
61
|
}] });
|
|
66
62
|
|
|
67
63
|
class LuDisabledOptionDirective {
|
|
68
64
|
constructor() {
|
|
65
|
+
this.isDisabled = input(undefined, { ...(ngDevMode ? { debugName: "isDisabled" } : /* istanbul ignore next */ {}), alias: 'luDisabledOption' });
|
|
69
66
|
this.context = inject(LU_OPTION_CONTEXT);
|
|
67
|
+
syncInputSignal(this.isDisabled, (disabled) => this.context.isDisabled$.next(disabled));
|
|
70
68
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
this.context.isDisabled$.next(disabled);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuDisabledOptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
77
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: LuDisabledOptionDirective, isStandalone: true, selector: "[luDisabledOption]", inputs: { isDisabled: ["luDisabledOption", "isDisabled"] }, ngImport: i0 }); }
|
|
69
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuDisabledOptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
70
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuDisabledOptionDirective, isStandalone: true, selector: "[luDisabledOption]", inputs: { isDisabled: { classPropertyName: "isDisabled", publicName: "luDisabledOption", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
78
71
|
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuDisabledOptionDirective, decorators: [{
|
|
80
73
|
type: Directive,
|
|
81
74
|
args: [{
|
|
82
75
|
selector: '[luDisabledOption]',
|
|
83
76
|
}]
|
|
84
|
-
}], propDecorators: { isDisabled: [{
|
|
85
|
-
type: Input,
|
|
86
|
-
args: ['luDisabledOption']
|
|
87
|
-
}] } });
|
|
77
|
+
}], ctorParameters: () => [], propDecorators: { isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "luDisabledOption", required: false }] }] } });
|
|
88
78
|
|
|
89
79
|
class LuOptionGroupDirective {
|
|
90
|
-
constructor() {
|
|
91
|
-
this.content = inject(TemplateRef);
|
|
92
|
-
}
|
|
93
80
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
94
81
|
return true;
|
|
95
82
|
}
|
|
96
|
-
|
|
97
|
-
this.select.
|
|
83
|
+
constructor() {
|
|
84
|
+
this.select = input.required({ ...(ngDevMode ? { debugName: "select" } : /* istanbul ignore next */ {}), alias: 'luOptionGroupSelect' });
|
|
85
|
+
this.selector = input.required({ ...(ngDevMode ? { debugName: "selector" } : /* istanbul ignore next */ {}), alias: 'luOptionGroupBy' });
|
|
86
|
+
this.content = inject(TemplateRef);
|
|
87
|
+
_effectWithDeps([this.select, this.selector], (select, selector) => {
|
|
88
|
+
select.groupingSignal.set({ selector, content: this.content });
|
|
89
|
+
});
|
|
98
90
|
}
|
|
99
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
100
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
91
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
92
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuOptionGroupDirective, isStandalone: true, selector: "[luOptionGroup]", inputs: { select: { classPropertyName: "select", publicName: "luOptionGroupSelect", isSignal: true, isRequired: true, transformFunction: null }, selector: { classPropertyName: "selector", publicName: "luOptionGroupBy", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
101
93
|
}
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionGroupDirective, decorators: [{
|
|
103
95
|
type: Directive,
|
|
104
96
|
args: [{
|
|
105
97
|
selector: '[luOptionGroup]',
|
|
106
98
|
}]
|
|
107
|
-
}], propDecorators: { select: [{
|
|
108
|
-
type: Input,
|
|
109
|
-
args: ['luOptionGroupSelect']
|
|
110
|
-
}], selector: [{
|
|
111
|
-
type: Input,
|
|
112
|
-
args: ['luOptionGroupBy']
|
|
113
|
-
}] } });
|
|
99
|
+
}], ctorParameters: () => [], propDecorators: { select: [{ type: i0.Input, args: [{ isSignal: true, alias: "luOptionGroupSelect", required: true }] }], selector: [{ type: i0.Input, args: [{ isSignal: true, alias: "luOptionGroupBy", required: true }] }] } });
|
|
114
100
|
|
|
115
101
|
/**
|
|
116
102
|
* Generate groups with a O(n) complexity. Note that the options must be sorted by group.
|
|
@@ -142,45 +128,57 @@ class LuOptionGroupPipe {
|
|
|
142
128
|
transform(options, selector) {
|
|
143
129
|
return Array.isArray(options) ? generateGroups(options, selector) : generateGroups([options], selector)[0];
|
|
144
130
|
}
|
|
145
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
146
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionGroupPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
132
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: LuOptionGroupPipe, isStandalone: true, name: "luOptionGroup" }); }
|
|
147
133
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionGroupPipe, decorators: [{
|
|
149
135
|
type: Pipe,
|
|
150
136
|
args: [{
|
|
151
137
|
name: 'luOptionGroup',
|
|
152
138
|
}]
|
|
153
139
|
}] });
|
|
154
140
|
|
|
155
|
-
function hasRenderableValue(value) {
|
|
156
|
-
return isNotNil(value);
|
|
141
|
+
function hasRenderableValue(value, showNull) {
|
|
142
|
+
return showNull ? value !== undefined : isNotNil(value);
|
|
157
143
|
}
|
|
158
144
|
class LuOptionOutletDirective {
|
|
159
145
|
constructor() {
|
|
160
|
-
this.
|
|
146
|
+
this.luOptionOutlet = input(/* @ts-ignore */
|
|
147
|
+
...(ngDevMode ? [undefined, { debugName: "luOptionOutlet" }] : /* istanbul ignore next */ []));
|
|
148
|
+
this.luOptionOutletValue = input(/* @ts-ignore */
|
|
149
|
+
...(ngDevMode ? [undefined, { debugName: "luOptionOutletValue" }] : /* istanbul ignore next */ []));
|
|
150
|
+
this.luOptionShowNull = input(false, /* @ts-ignore */
|
|
151
|
+
...(ngDevMode ? [{ debugName: "luOptionShowNull" }] : /* istanbul ignore next */ []));
|
|
161
152
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
162
153
|
this.injector = inject(Injector);
|
|
163
154
|
this.optionContext = inject(LU_OPTION_CONTEXT);
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
if (changes['luOptionOutlet']) {
|
|
171
|
-
// Outlet template changed: recreate if current value is renderable
|
|
172
|
-
if (hasRenderableValue(this.luOptionOutletValue)) {
|
|
173
|
-
this.createComponent();
|
|
155
|
+
let previousOutlet;
|
|
156
|
+
_effectWithDeps([this.luOptionOutlet, this.luOptionOutletValue, this.luOptionShowNull], (outlet, value, showNull) => {
|
|
157
|
+
const outletChanged = outlet !== previousOutlet;
|
|
158
|
+
previousOutlet = outlet;
|
|
159
|
+
if (outletChanged || !hasRenderableValue(value, showNull)) {
|
|
160
|
+
this.clearContainer();
|
|
174
161
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
162
|
+
if (outlet && hasRenderableValue(value, showNull)) {
|
|
163
|
+
if (!(this.embeddedViewRef || this.componentRef)) {
|
|
164
|
+
if (outlet instanceof TemplateRef) {
|
|
165
|
+
this.embeddedViewRef = this.viewContainerRef.createEmbeddedView(outlet, { $implicit: value }, { injector: this.injector });
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
this.optionContext.option$.next(value);
|
|
169
|
+
this.componentRef = this.viewContainerRef.createComponent(outlet, { injector: this.injector });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
if (this.embeddedViewRef) {
|
|
174
|
+
this.embeddedViewRef.context.$implicit = value;
|
|
175
|
+
}
|
|
176
|
+
else if (this.componentRef) {
|
|
177
|
+
this.optionContext.option$.next(value);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
182
180
|
}
|
|
183
|
-
}
|
|
181
|
+
});
|
|
184
182
|
}
|
|
185
183
|
ngOnDestroy() {
|
|
186
184
|
this.optionContext.destroy();
|
|
@@ -192,65 +190,161 @@ class LuOptionOutletDirective {
|
|
|
192
190
|
this.embeddedViewRef = undefined;
|
|
193
191
|
this.componentRef = undefined;
|
|
194
192
|
}
|
|
195
|
-
createComponent() {
|
|
196
|
-
if (!this.luOptionOutlet || !hasRenderableValue(this.luOptionOutletValue)) {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
if (this.luOptionOutlet instanceof TemplateRef) {
|
|
200
|
-
this.embeddedViewRef = this.viewContainerRef.createEmbeddedView(this.luOptionOutlet, { $implicit: this.luOptionOutletValue }, { injector: this.injector });
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
this.optionContext.option$.next(this.luOptionOutletValue);
|
|
204
|
-
this.componentRef = this.viewContainerRef.createComponent(this.luOptionOutlet, { injector: this.injector });
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
updateRefValue() {
|
|
208
|
-
if (!hasRenderableValue(this.luOptionOutletValue)) {
|
|
209
|
-
this.clearContainer();
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
if (this.embeddedViewRef) {
|
|
213
|
-
this.embeddedViewRef.context.$implicit = this.luOptionOutletValue;
|
|
214
|
-
}
|
|
215
|
-
else if (this.componentRef) {
|
|
216
|
-
this.optionContext.option$.next(this.luOptionOutletValue);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
193
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
220
194
|
return true;
|
|
221
195
|
}
|
|
222
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
223
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
196
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionOutletDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
197
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuOptionOutletDirective, isStandalone: true, selector: "[luOptionOutlet]", inputs: { luOptionOutlet: { classPropertyName: "luOptionOutlet", publicName: "luOptionOutlet", isSignal: true, isRequired: false, transformFunction: null }, luOptionOutletValue: { classPropertyName: "luOptionOutletValue", publicName: "luOptionOutletValue", isSignal: true, isRequired: false, transformFunction: null }, luOptionShowNull: { classPropertyName: "luOptionShowNull", publicName: "luOptionShowNull", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideOptionContext()], ngImport: i0 }); }
|
|
224
198
|
}
|
|
225
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionOutletDirective, decorators: [{
|
|
226
200
|
type: Directive,
|
|
227
201
|
args: [{
|
|
228
202
|
selector: '[luOptionOutlet]',
|
|
229
203
|
providers: [provideOptionContext()],
|
|
230
204
|
}]
|
|
231
|
-
}], propDecorators: { luOptionOutlet: [{
|
|
232
|
-
type: Input
|
|
233
|
-
}], luOptionOutletValue: [{
|
|
234
|
-
type: Input
|
|
235
|
-
}], luOptionShowNull: [{
|
|
236
|
-
type: Input
|
|
237
|
-
}] } });
|
|
205
|
+
}], ctorParameters: () => [], propDecorators: { luOptionOutlet: [{ type: i0.Input, args: [{ isSignal: true, alias: "luOptionOutlet", required: false }] }], luOptionOutletValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "luOptionOutletValue", required: false }] }], luOptionShowNull: [{ type: i0.Input, args: [{ isSignal: true, alias: "luOptionShowNull", required: false }] }] } });
|
|
238
206
|
|
|
239
207
|
const SELECT_PANEL_INSTANCE = new InjectionToken('CoreSelect:PanelInstance');
|
|
240
208
|
|
|
209
|
+
class CoreSelectKeyManager {
|
|
210
|
+
#destroyRef = inject(DestroyRef);
|
|
211
|
+
#cdkKeyManager;
|
|
212
|
+
#hasSearchChanged = false;
|
|
213
|
+
#options;
|
|
214
|
+
#injector = inject(Injector);
|
|
215
|
+
// eslint-disable-next-line @angular-eslint/prefer-signals
|
|
216
|
+
#queryList;
|
|
217
|
+
#queryList$;
|
|
218
|
+
init(options) {
|
|
219
|
+
this.#options = options;
|
|
220
|
+
this.#queryList = computed(() => {
|
|
221
|
+
return [...options.queryList()].sort((a, b) => {
|
|
222
|
+
const comparison = a.elementRef.nativeElement.compareDocumentPosition(b.elementRef.nativeElement);
|
|
223
|
+
if (comparison & Node.DOCUMENT_POSITION_FOLLOWING) {
|
|
224
|
+
return -1;
|
|
225
|
+
}
|
|
226
|
+
if (comparison & Node.DOCUMENT_POSITION_PRECEDING) {
|
|
227
|
+
return 1;
|
|
228
|
+
}
|
|
229
|
+
return 0;
|
|
230
|
+
});
|
|
231
|
+
}, /* @ts-ignore */
|
|
232
|
+
...(ngDevMode ? [{ debugName: "#queryList" }] : /* istanbul ignore next */ []));
|
|
233
|
+
this.#queryList$ = toObservable(this.#queryList, { injector: this.#injector });
|
|
234
|
+
this.#cdkKeyManager = new ActiveDescendantKeyManager(this.#queryList, this.#injector).withHomeAndEnd();
|
|
235
|
+
this.#bindClueChange(options.clueChange$);
|
|
236
|
+
this.#bindOptionsChange(options);
|
|
237
|
+
this.#bindActiveOptionIdChanged(options.activeOptionIdChanged$);
|
|
238
|
+
this.#cdkKeyManager.setFirstItemActive();
|
|
239
|
+
}
|
|
240
|
+
onKeydown(event) {
|
|
241
|
+
this.#cdkKeyManager?.onKeydown(event);
|
|
242
|
+
}
|
|
243
|
+
get activeItem() {
|
|
244
|
+
return this.#cdkKeyManager?.activeItem ?? undefined;
|
|
245
|
+
}
|
|
246
|
+
get activeItemIndex() {
|
|
247
|
+
return this.#cdkKeyManager?.activeItemIndex ?? -1;
|
|
248
|
+
}
|
|
249
|
+
setActiveItem(index) {
|
|
250
|
+
this.#cdkKeyManager?.setActiveItem(index);
|
|
251
|
+
}
|
|
252
|
+
setActiveItemByElement(item) {
|
|
253
|
+
const index = this.#queryList().indexOf(item);
|
|
254
|
+
if (index !== -1) {
|
|
255
|
+
this.#cdkKeyManager?.setActiveItem(index);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
highlightOption(option) {
|
|
259
|
+
if (!this.#options) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const { optionComparer } = this.#options;
|
|
263
|
+
this.#queryList$
|
|
264
|
+
.pipe(observeOn(asyncScheduler), map((options) => options.findIndex((el) => {
|
|
265
|
+
const elOption = el.option();
|
|
266
|
+
return isNotNil(elOption) && optionComparer(elOption, option);
|
|
267
|
+
})), filter((index) => index !== -1), take(1), takeUntilDestroyed(this.#destroyRef))
|
|
268
|
+
.subscribe((selectedIndex) => this.setActiveItem(selectedIndex));
|
|
269
|
+
}
|
|
270
|
+
#bindClueChange(clueChange$) {
|
|
271
|
+
clueChange$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
272
|
+
this.#hasSearchChanged = true;
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
#bindActiveOptionIdChanged(activeOptionIdChanged$) {
|
|
276
|
+
const keyManager = this.#cdkKeyManager;
|
|
277
|
+
if (!keyManager) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
keyManager.change
|
|
281
|
+
.pipe(map(() => keyManager.activeItem?.idAttribute() ?? ''), takeUntilDestroyed(this.#destroyRef))
|
|
282
|
+
.subscribe((activeDescendant) => activeOptionIdChanged$.emit(activeDescendant));
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Ensure always have the correct highlighted item:
|
|
286
|
+
* - reset to null if no options
|
|
287
|
+
* - set to first item if search has changed
|
|
288
|
+
* - set to first item if no active item
|
|
289
|
+
*/
|
|
290
|
+
#bindOptionsChange({ options }) {
|
|
291
|
+
const keyManager = this.#cdkKeyManager;
|
|
292
|
+
if (!keyManager) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
afterRenderEffect(() => {
|
|
296
|
+
options(); // Track option change
|
|
297
|
+
untracked(() => {
|
|
298
|
+
if (this.#queryList().length === 0) {
|
|
299
|
+
keyManager.setActiveItem(-1);
|
|
300
|
+
}
|
|
301
|
+
else if (this.#hasSearchChanged) {
|
|
302
|
+
this.#hasSearchChanged = false;
|
|
303
|
+
keyManager.setFirstItemActive();
|
|
304
|
+
}
|
|
305
|
+
else if (!keyManager.activeItem) {
|
|
306
|
+
keyManager.setFirstItemActive();
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
}, { injector: this.#injector });
|
|
310
|
+
}
|
|
311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: CoreSelectKeyManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
312
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: CoreSelectKeyManager }); }
|
|
313
|
+
}
|
|
314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: CoreSelectKeyManager, decorators: [{
|
|
315
|
+
type: Injectable
|
|
316
|
+
}] });
|
|
317
|
+
|
|
241
318
|
class CoreSelectPanelElement {
|
|
242
319
|
#panelRef;
|
|
320
|
+
#keyManager;
|
|
243
321
|
#selectRef;
|
|
322
|
+
get disabled() {
|
|
323
|
+
return this.disabledRef();
|
|
324
|
+
}
|
|
325
|
+
set disabled(disabled) {
|
|
326
|
+
this.disabledRef.set(disabled);
|
|
327
|
+
}
|
|
244
328
|
constructor() {
|
|
245
329
|
this.elementRef = inject(ElementRef);
|
|
246
330
|
this.#panelRef = inject(SELECT_PANEL_INSTANCE);
|
|
331
|
+
this.#keyManager = inject(CoreSelectKeyManager, { optional: true });
|
|
247
332
|
this.#selectRef = inject(ALuSelectInputComponent);
|
|
248
|
-
this.id = signal('',
|
|
249
|
-
|
|
250
|
-
this.
|
|
251
|
-
|
|
252
|
-
this.
|
|
253
|
-
|
|
333
|
+
this.id = signal('', /* @ts-ignore */
|
|
334
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
335
|
+
this.elementId = input('', /* @ts-ignore */
|
|
336
|
+
...(ngDevMode ? [{ debugName: "elementId" }] : /* istanbul ignore next */ []));
|
|
337
|
+
this.idAttribute = computed(() => this.id() || this.elementId(), /* @ts-ignore */
|
|
338
|
+
...(ngDevMode ? [{ debugName: "idAttribute" }] : /* istanbul ignore next */ []));
|
|
339
|
+
this.isSelected = model(false, /* @ts-ignore */
|
|
340
|
+
...(ngDevMode ? [{ debugName: "isSelected" }] : /* istanbul ignore next */ []));
|
|
341
|
+
this.option = input(/* @ts-ignore */
|
|
342
|
+
...(ngDevMode ? [undefined, { debugName: "option" }] : /* istanbul ignore next */ []));
|
|
343
|
+
this.disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled' });
|
|
344
|
+
this.disabledRef = linkedSignal(() => this.disabledInput(), /* @ts-ignore */
|
|
345
|
+
...(ngDevMode ? [{ debugName: "disabledRef" }] : /* istanbul ignore next */ []));
|
|
346
|
+
this.isHighlighted = signal(false, /* @ts-ignore */
|
|
347
|
+
...(ngDevMode ? [{ debugName: "isHighlighted" }] : /* istanbul ignore next */ []));
|
|
254
348
|
this.selected = output();
|
|
255
349
|
this.#panelRef.options.set([...this.#panelRef.options(), this]);
|
|
256
350
|
}
|
|
@@ -267,10 +361,16 @@ class CoreSelectPanelElement {
|
|
|
267
361
|
setInactiveStyles() {
|
|
268
362
|
this.isHighlighted.set(false);
|
|
269
363
|
}
|
|
270
|
-
|
|
271
|
-
|
|
364
|
+
onMouseEnter() {
|
|
365
|
+
if (!this.#keyManager || this.disabled || !untracked(this.#panelRef.pointerNavigation)) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
this.#keyManager.setActiveItemByElement(this);
|
|
369
|
+
}
|
|
370
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: CoreSelectPanelElement, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
371
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: CoreSelectPanelElement, isStandalone: true, selector: "[luCoreSelectPanelElement]", inputs: { elementId: { classPropertyName: "elementId", publicName: "elementId", isSignal: true, isRequired: false, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isSelected: "isSelectedChange", selected: "selected" }, host: { attributes: { "role": "option" }, listeners: { "mouseenter": "onMouseEnter()" }, properties: { "attr.id": "idAttribute()", "attr.aria-selected": "isSelected()", "class.is-highlighted": "isHighlighted()" } }, exportAs: ["luCoreSelectPanelElement"], ngImport: i0 }); }
|
|
272
372
|
}
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: CoreSelectPanelElement, decorators: [{
|
|
274
374
|
type: Directive,
|
|
275
375
|
args: [{
|
|
276
376
|
selector: '[luCoreSelectPanelElement]',
|
|
@@ -279,22 +379,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
279
379
|
'[attr.id]': 'idAttribute()',
|
|
280
380
|
'[attr.aria-selected]': 'isSelected()',
|
|
281
381
|
'[class.is-highlighted]': 'isHighlighted()',
|
|
382
|
+
'(mouseenter)': 'onMouseEnter()',
|
|
282
383
|
role: 'option',
|
|
283
384
|
},
|
|
284
385
|
}]
|
|
285
|
-
}], ctorParameters: () => [], propDecorators: { elementId: [{ type: i0.Input, args: [{ isSignal: true, alias: "elementId", required: false }] }], isSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "isSelected", required: false }] }, { type: i0.Output, args: ["isSelectedChange"] }], option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: false }] }],
|
|
286
|
-
type: Input
|
|
287
|
-
}] } });
|
|
386
|
+
}], ctorParameters: () => [], propDecorators: { elementId: [{ type: i0.Input, args: [{ isSignal: true, alias: "elementId", required: false }] }], isSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "isSelected", required: false }] }, { type: i0.Output, args: ["isSelectedChange"] }], option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
288
387
|
|
|
289
388
|
const SELECT_ID = new InjectionToken('LuSelectPanelData');
|
|
290
389
|
const SELECT_LABEL = new InjectionToken('LuSelectLabel');
|
|
291
390
|
const SELECT_LABEL_ID = new InjectionToken('LuSelectLabelId');
|
|
292
391
|
const CORE_SELECT_API_TOTAL_COUNT_PROVIDER = new InjectionToken('CoreSelectApiTotalCountProvider');
|
|
293
392
|
class ɵIsSelectedStrategy {
|
|
294
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
295
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
393
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ɵIsSelectedStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
394
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ɵIsSelectedStrategy, providedIn: 'root', useFactory: () => new DefaultIsSelectedStrategy() }); }
|
|
296
395
|
}
|
|
297
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ɵIsSelectedStrategy, decorators: [{
|
|
298
397
|
type: Injectable,
|
|
299
398
|
args: [{
|
|
300
399
|
providedIn: 'root',
|
|
@@ -328,126 +427,137 @@ const luOptionTranslations = Translations$1;
|
|
|
328
427
|
|
|
329
428
|
const MAGIC_OPTION_SCROLL_DELAY = 15;
|
|
330
429
|
class LuOptionComponent {
|
|
430
|
+
#panelRef;
|
|
331
431
|
get id() {
|
|
332
432
|
const groupPart = this.groupIndex() === undefined ? `` : `-group-${this.groupIndex()}`;
|
|
333
433
|
return `lu-select-${this.selectId}${groupPart}-option-${this.optionIndex()}`;
|
|
334
434
|
}
|
|
335
435
|
constructor() {
|
|
436
|
+
this.#panelRef = inject(SELECT_PANEL_INSTANCE);
|
|
336
437
|
this.selectableItem = inject(CoreSelectPanelElement);
|
|
337
|
-
this.intl = input(...intlInputOptions(LU_OPTION_TRANSLATIONS),
|
|
338
|
-
|
|
438
|
+
this.intl = input(...intlInputOptions(LU_OPTION_TRANSLATIONS), /* @ts-ignore */
|
|
439
|
+
...(ngDevMode ? [{ debugName: "intl" }] : /* istanbul ignore next */ []));
|
|
440
|
+
this.optionTpl = input(/* @ts-ignore */
|
|
441
|
+
...(ngDevMode ? [undefined, { debugName: "optionTpl" }] : /* istanbul ignore next */ []));
|
|
442
|
+
this.option = input(/* @ts-ignore */
|
|
443
|
+
...(ngDevMode ? [undefined, { debugName: "option" }] : /* istanbul ignore next */ []));
|
|
444
|
+
this.grouping = input(/* @ts-ignore */
|
|
445
|
+
...(ngDevMode ? [undefined, { debugName: "grouping" }] : /* istanbul ignore next */ []));
|
|
339
446
|
this.hasChildren = input(false, { ...(ngDevMode ? { debugName: "hasChildren" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
340
447
|
this.onlyParent = output();
|
|
341
448
|
this.onlyChildren = output();
|
|
342
|
-
this.groupIndex = input(
|
|
449
|
+
this.groupIndex = input(/* @ts-ignore */
|
|
450
|
+
...(ngDevMode ? [undefined, { debugName: "groupIndex" }] : /* istanbul ignore next */ []));
|
|
343
451
|
this.optionIndex = input.required({ ...(ngDevMode ? { debugName: "optionIndex" } : /* istanbul ignore next */ {}), transform: (value) => `${value}` });
|
|
344
|
-
this.scrollIntoViewOptions = {}
|
|
345
|
-
|
|
452
|
+
this.scrollIntoViewOptions = input({}, /* @ts-ignore */
|
|
453
|
+
...(ngDevMode ? [{ debugName: "scrollIntoViewOptions" }] : /* istanbul ignore next */ []));
|
|
454
|
+
this.groupTemplateLocation = input(/* @ts-ignore */
|
|
455
|
+
...(ngDevMode ? [undefined, { debugName: "groupTemplateLocation" }] : /* istanbul ignore next */ []));
|
|
456
|
+
this.optionContext = viewChild(LU_OPTION_CONTEXT, /* @ts-ignore */
|
|
457
|
+
...(ngDevMode ? [{ debugName: "optionContext" }] : /* istanbul ignore next */ []));
|
|
346
458
|
this.cdr = inject(ChangeDetectorRef);
|
|
347
459
|
this.elementRef = inject(ElementRef);
|
|
348
460
|
this.selectId = inject(SELECT_ID);
|
|
349
|
-
|
|
350
|
-
if (this.
|
|
351
|
-
setTimeout(() => {
|
|
352
|
-
this.elementRef.nativeElement.scrollIntoView(this.scrollIntoViewOptions);
|
|
461
|
+
_effectWithDeps([this.selectableItem.isHighlighted], (isHighlighted, onCleanup) => {
|
|
462
|
+
if (isHighlighted && !untracked(this.#panelRef.pointerNavigation)) {
|
|
463
|
+
const timeoutId = setTimeout(() => {
|
|
464
|
+
this.elementRef.nativeElement.scrollIntoView(this.scrollIntoViewOptions());
|
|
353
465
|
}, MAGIC_OPTION_SCROLL_DELAY);
|
|
466
|
+
onCleanup(() => clearTimeout(timeoutId));
|
|
354
467
|
}
|
|
355
468
|
});
|
|
469
|
+
_effectWithDeps([this.optionContext], (optionContext, onCleanup) => {
|
|
470
|
+
if (isNil(optionContext)) {
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
const subscription = optionContext.isDisabled$.pipe(observeOn(asyncScheduler)).subscribe((isDisabled) => {
|
|
474
|
+
this.selectableItem.disabled = isDisabled;
|
|
475
|
+
this.cdr.markForCheck();
|
|
476
|
+
});
|
|
477
|
+
onCleanup(() => subscription.unsubscribe());
|
|
478
|
+
});
|
|
356
479
|
}
|
|
357
480
|
ngOnInit() {
|
|
358
481
|
this.selectableItem.id.set(this.id);
|
|
359
482
|
}
|
|
360
|
-
ngOnDestroy() {
|
|
361
|
-
this.subscription?.unsubscribe();
|
|
362
|
-
}
|
|
363
|
-
ngAfterViewInit() {
|
|
364
|
-
if (!this.optionContext) {
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
this.subscription = this.optionContext.isDisabled$.pipe(observeOn(asyncScheduler)).subscribe((isDisabled) => {
|
|
368
|
-
this.selectableItem.disabled = isDisabled;
|
|
369
|
-
this.cdr.markForCheck();
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
483
|
selectOption($event) {
|
|
373
484
|
if (this.selectableItem.disabled) {
|
|
374
485
|
$event.stopPropagation();
|
|
375
486
|
}
|
|
376
487
|
}
|
|
377
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
378
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: LuOptionComponent, isStandalone: true, selector: "lu-select-option", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, optionTpl: { classPropertyName: "optionTpl", publicName: "optionTpl", isSignal: false, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: false, isRequired: false, transformFunction: null }, grouping: { classPropertyName: "grouping", publicName: "grouping", isSignal: false, isRequired: false, transformFunction: null }, hasChildren: { classPropertyName: "hasChildren", publicName: "hasChildren", isSignal: true, isRequired: false, transformFunction: null }, groupIndex: { classPropertyName: "groupIndex", publicName: "groupIndex", isSignal: true, isRequired: false, transformFunction: null }, optionIndex: { classPropertyName: "optionIndex", publicName: "optionIndex", isSignal: true, isRequired: true, transformFunction: null }, scrollIntoViewOptions: { classPropertyName: "scrollIntoViewOptions", publicName: "scrollIntoViewOptions", isSignal: false, isRequired: false, transformFunction: null }, groupTemplateLocation: { classPropertyName: "groupTemplateLocation", publicName: "groupTemplateLocation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onlyParent: "onlyParent", onlyChildren: "onlyChildren" }, host: { properties: { "class.optionItem": "this.hasOptionItemClass" } }, viewQueries: [{ propertyName: "optionContext", first: true, predicate: LuOptionOutletDirective, descendants: true, read: LU_OPTION_CONTEXT, static: true }], ngImport: i0, template: "<div class=\"optionItem-value\" [class.is-disabled]=\"selectableItem.disabled\" (click)=\"selectOption($event)\">\n\t<ng-container *luOptionOutlet=\"optionTpl; value: selectableItem.option()\" />\n\n\t@if (groupTemplateLocation() === \"option\" && grouping) {\n\t\t<div class=\"optionItem-value-group\">\n\t\t\t<ng-container *luPortal=\"grouping.content; context: { $implicit: selectableItem.option() | luOptionGroup: grouping.selector }\" />\n\t\t</div>\n\t}\n\n\t@if (hasChildren() && !selectableItem.disabled) {\n\t\t<div class=\"optionItem-icons\">\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon parentOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyParent.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyParent\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyParent }}</span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon childrenOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyChildren.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyChildren\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyChildren }}</span>\n\t\t\t</span>\n\t\t</div>\n\t}\n</div>\n", styles: ["@charset \"UTF-8\";@layer base{:root{--components-options-item-padding-vertical: var(--pr-t-spacings-50);--components-options-item-padding-horizontal: var(--pr-t-spacings-100);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-neutral-800);--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));--components-options-checkbox-border-radius: var(--pr-t-border-radius-small);--components-options-checkbox-border-color: var(--palettes-neutral-700);--components-options-establishment-multiple-padding: 2rem}}@layer reset,base,components,mods,product,utils;@layer components{:host{--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));display:block;scroll-margin:var(--pr-t-spacings-50)}.lu-picker-content-group :host{scroll-margin-block-start:var(--pr-t-spacings-400)}}@layer mods{:host.withAddOption{scroll-margin-block-end:var(--pr-t-spacings-600)}}@layer components{.optionItem{position:relative}}@layer components{.optionItem-value{position:relative;border-radius:var(--pr-t-border-radius-default);display:block;padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer;overflow-wrap:anywhere}.optionItem-value ::ng-deep .avatar{margin-inline-end:var(--pr-t-spacings-75)}}@layer mods{.optionItem-value.is-selected,:host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-50, var(--palettes-product-50))}.optionItem-value.is-selected:before,:host-context([aria-selected=true]) .optionItem-value:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:calc(var(--pr-t-spacings-50) * -1);inline-size:2px;background-color:var(--palettes-700, var(--palettes-product-700));border-start-end-radius:var(--pr-t-border-radius-default);border-end-end-radius:var(--pr-t-border-radius-default)}.optionItem-value.is-selected:hover,:host-context([aria-selected=true]) .optionItem-value:hover{background-color:var(--palettes-100, var(--palettes-product-100))}.optionItem-value.is-selected:active,:host-context([aria-selected=true]) .optionItem-value:active{background-color:var(--palettes-200, var(--palettes-product-200))}:host-context(.is-highlighted) .optionItem-value.is-selected,:host-context(.is-highlighted) :host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-100, var(--palettes-product-100))}:host-context(.is-highlighted) .optionItem-value.is-selected:hover,:host-context(.is-highlighted) :host-context([aria-selected=true]) .optionItem-value:hover{background-color:var(--palettes-200, var(--palettes-product-200))}.optionItem-value:hover{background-color:var(--palettes-neutral-50)}:host-context(.is-highlighted) .optionItem-value{background-color:var(--palettes-neutral-50)}:host-context(.is-highlighted) .optionItem-value:hover{background-color:var(--palettes-neutral-50)}:host-context(.is-highlighted) .optionItem-value:active{background-color:var(--palettes-neutral-100)}.optionItem-value:active{background-color:var(--palettes-neutral-100)}}@layer components{.optionItem-value-group{color:var(--palettes-neutral-600);font:var(--pr-t-font-body-S)}}@layer components{:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}}@layer mods{:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.is-highlighted) :host-context(.lu-select-value) .optionItem-value{background-color:inherit}}@layer mods{:host-context(.mod-multiple) .optionItem-value,.formerEmployeeDisplayer .optionItem-value{position:relative;padding-inline-start:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:before{display:block;position:absolute;inset-inline-start:var(--pr-t-spacings-100);inset-block-start:var(--pr-t-spacings-75)}:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:before{content:\"\";background-color:var(--palettes-neutral-0);border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;block-size:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:after{--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;color:transparent;font-size:var(--pr-t-font-body-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:scale(0);transition:all .1s;inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value.is-selected:before,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:before{background-color:var(--components-options-checkbox-color);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple) .optionItem-value.is-selected:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:after{color:var(--palettes-neutral-0);transform:scale(1)}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled{--components-options-checkbox-color: var(--commons-disabled-background);background-color:transparent}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled:after,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled:after{color:var(--palettes-neutral-500)}:host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-neutral-500)}:host-context(.mod-multiple) .optionItem-value:not(.is-disabled):hover:before,.formerEmployeeDisplayer .optionItem-value:not(.is-disabled):hover:before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}}@layer components{:host-context(.mod-multiple).establishmentOption .optionItem-value,.formerEmployeeDisplayer.establishmentOption .optionItem-value{position:relative;padding-inline-start:calc(var(--components-options-checkbox-size) + var(--pr-t-spacings-100) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after,.formerEmployeeDisplayer.establishmentOption .optionItem-value:before,.formerEmployeeDisplayer.establishmentOption .optionItem-value:after{inset-inline-start:var(--pr-t-spacings-100)}}@layer mods{.is-disabled{color:var(--palettes-neutral-500);-webkit-user-select:none;user-select:none;cursor:default}.is-disabled.is-selected{background-color:var(--commons-disabled-background)}.is-disabled:hover{background-color:inherit}.optionItem-value:has(.optionItem-icon){display:flex;justify-content:space-between}}@layer components{.optionItem-icons{display:flex;gap:var(--pr-t-spacings-50)}.optionItem-icon-shape{display:block;fill:var(--palettes-neutral-500)}.optionItem-icon-shape:hover{fill:var(--palettes-neutral-800)}}\n"], dependencies: [{ kind: "directive", type: LuOptionOutletDirective, selector: "[luOptionOutlet]", inputs: ["luOptionOutlet", "luOptionOutletValue", "luOptionShowNull"] }, { kind: "directive", type: PortalDirective, selector: "[luPortal]", inputs: ["luPortal", "luPortalContext"] }, { kind: "directive", type: LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis", "luTooltipAnchor", "id"], exportAs: ["luTooltip"] }, { kind: "pipe", type: LuOptionGroupPipe, name: "luOptionGroup" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
488
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
489
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: LuOptionComponent, isStandalone: true, selector: "lu-select-option", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, optionTpl: { classPropertyName: "optionTpl", publicName: "optionTpl", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, grouping: { classPropertyName: "grouping", publicName: "grouping", isSignal: true, isRequired: false, transformFunction: null }, hasChildren: { classPropertyName: "hasChildren", publicName: "hasChildren", isSignal: true, isRequired: false, transformFunction: null }, groupIndex: { classPropertyName: "groupIndex", publicName: "groupIndex", isSignal: true, isRequired: false, transformFunction: null }, optionIndex: { classPropertyName: "optionIndex", publicName: "optionIndex", isSignal: true, isRequired: true, transformFunction: null }, scrollIntoViewOptions: { classPropertyName: "scrollIntoViewOptions", publicName: "scrollIntoViewOptions", isSignal: true, isRequired: false, transformFunction: null }, groupTemplateLocation: { classPropertyName: "groupTemplateLocation", publicName: "groupTemplateLocation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onlyParent: "onlyParent", onlyChildren: "onlyChildren" }, host: { classAttribute: "optionItem" }, viewQueries: [{ propertyName: "optionContext", first: true, predicate: LU_OPTION_CONTEXT, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"optionItem-value\" [class.is-disabled]=\"selectableItem.disabled\" (click)=\"selectOption($event)\">\n\t<ng-container *luOptionOutlet=\"optionTpl(); value: selectableItem.option()\" />\n\n\t@if (groupTemplateLocation() === \"option\") {\n\t\t@if (grouping(); as grouping) {\n\t\t\t<div class=\"optionItem-value-group\">\n\t\t\t\t<ng-container *luPortal=\"grouping.content; context: { $implicit: selectableItem.option() | luOptionGroup: grouping.selector }\" />\n\t\t\t</div>\n\t\t}\n\t}\n\n\t@if (hasChildren() && !selectableItem.disabled) {\n\t\t<div class=\"optionItem-icons\">\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon parentOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyParent.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyParent\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyParent }}</span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon childrenOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyChildren.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyChildren\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyChildren }}</span>\n\t\t\t</span>\n\t\t</div>\n\t}\n</div>\n", styles: ["@charset \"UTF-8\";@layer base{:root{--components-options-item-padding-vertical: var(--pr-t-spacings-50);--components-options-item-padding-horizontal: var(--pr-t-spacings-100);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-neutral-800);--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));--components-options-checkbox-border-radius: var(--pr-t-border-radius-small);--components-options-checkbox-border-color: var(--palettes-neutral-700);--components-options-establishment-multiple-padding: 2rem}}@layer reset,base,components,mods,product,utils;@layer components{:host{--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));display:block;scroll-margin:var(--pr-t-spacings-50)}.lu-picker-content-group :host{scroll-margin-block-start:var(--pr-t-spacings-400)}}@layer mods{:host.withAddOption{scroll-margin-block-end:var(--pr-t-spacings-600)}}@layer components{.optionItem{position:relative}}@layer components{.optionItem-value{position:relative;border-radius:var(--pr-t-border-radius-default);display:block;padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer;overflow-wrap:anywhere}.optionItem-value ::ng-deep .avatar{margin-inline-end:var(--pr-t-spacings-75)}}@layer mods{.optionItem-value.is-selected,:host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-50, var(--palettes-product-50))}.optionItem-value.is-selected:before,:host-context([aria-selected=true]) .optionItem-value:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:calc(var(--pr-t-spacings-50) * -1);inline-size:2px;background-color:var(--palettes-700, var(--palettes-product-700));border-start-end-radius:var(--pr-t-border-radius-default);border-end-end-radius:var(--pr-t-border-radius-default)}:host-context(.optionItem.is-highlighted) .optionItem-value.is-selected,:host-context(.optionItem.is-highlighted) :host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-100, var(--palettes-product-100))}.optionItem-value.is-selected:active,:host-context([aria-selected=true]) .optionItem-value:active{background-color:var(--palettes-200, var(--palettes-product-200))}:host-context(.optionItem.is-highlighted) .optionItem-value{background-color:var(--palettes-neutral-50)}.optionItem-value:active{background-color:var(--palettes-neutral-100)}}@layer components{.optionItem-value-group{color:var(--palettes-neutral-600);font:var(--pr-t-font-body-S)}}@layer components{:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}}@layer mods{:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.optionItem.is-highlighted) :host-context(.lu-select-value) .optionItem-value{background-color:inherit}}@layer mods{:host-context(.mod-multiple) .optionItem-value,.formerEmployeeDisplayer .optionItem-value,.archivedLegalUnitsDisplayer .optionItem-value{position:relative;padding-inline-start:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:before{display:block;position:absolute;inset-inline-start:var(--pr-t-spacings-100);inset-block-start:var(--pr-t-spacings-75)}:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:before{content:\"\";background-color:var(--palettes-neutral-0);border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;block-size:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:after{--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;color:transparent;font-size:var(--pr-t-font-body-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:scale(0);transition:all .1s;inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value.is-selected:before,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value:before{background-color:var(--components-options-checkbox-color);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple) .optionItem-value.is-selected:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value:after{color:var(--palettes-neutral-0);transform:scale(1)}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-color: var(--commons-disabled-background);background-color:transparent}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled:after,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled:after{color:var(--palettes-neutral-500)}:host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-neutral-500)}:host-context(.optionItem.is-highlighted) :host-context(.mod-multiple) .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .formerEmployeeDisplayer .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .archivedLegalUnitsDisplayer .optionItem-value:not(.is-disabled):before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}}@layer components{:host-context(.mod-multiple).establishmentOption .optionItem-value,.formerEmployeeDisplayer.establishmentOption .optionItem-value,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value{position:relative;padding-inline-start:calc(var(--components-options-checkbox-size) + var(--pr-t-spacings-100) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after,.formerEmployeeDisplayer.establishmentOption .optionItem-value:before,.formerEmployeeDisplayer.establishmentOption .optionItem-value:after,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:before,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:after{inset-inline-start:var(--pr-t-spacings-100)}}@layer mods{.is-disabled{color:var(--palettes-neutral-500);-webkit-user-select:none;user-select:none;cursor:default}.is-disabled.is-selected{background-color:var(--commons-disabled-background)}.is-disabled:hover{background-color:inherit}.optionItem-value:has(.optionItem-icon){display:flex;justify-content:space-between}}@layer components{.optionItem-icons{display:flex;gap:var(--pr-t-spacings-50)}.optionItem-icon-shape{display:block;fill:var(--palettes-neutral-500)}.optionItem-icon-shape:hover{fill:var(--palettes-neutral-800)}}\n"], dependencies: [{ kind: "directive", type: LuOptionOutletDirective, selector: "[luOptionOutlet]", inputs: ["luOptionOutlet", "luOptionOutletValue", "luOptionShowNull"] }, { kind: "directive", type: PortalDirective, selector: "[luPortal]", inputs: ["luPortal", "luPortalContext"] }, { kind: "directive", type: LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis", "luTooltipAnchor", "id"], exportAs: ["luTooltip"] }, { kind: "pipe", type: LuOptionGroupPipe, name: "luOptionGroup" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
379
490
|
}
|
|
380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionComponent, decorators: [{
|
|
381
492
|
type: Component,
|
|
382
|
-
args: [{ selector: 'lu-select-option', changeDetection: ChangeDetectionStrategy.OnPush, imports: [LuOptionOutletDirective, PortalDirective, LuOptionGroupPipe, LuTooltipTriggerDirective], template: "<div class=\"optionItem-value\" [class.is-disabled]=\"selectableItem.disabled\" (click)=\"selectOption($event)\">\n\t<ng-container *luOptionOutlet=\"optionTpl; value: selectableItem.option()\" />\n\n\t@if (groupTemplateLocation() === \"option\" && grouping) {\n\t\t<div class=\"optionItem-value-group\">\n\t\t\t<ng-container *luPortal=\"grouping.content; context: { $implicit: selectableItem.option() | luOptionGroup: grouping.selector }\" />\n\t\t</div>\n\t}\n\n\t@if (hasChildren() && !selectableItem.disabled) {\n\t\t<div class=\"optionItem-icons\">\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon parentOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyParent.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyParent\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyParent }}</span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon childrenOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyChildren.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyChildren\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyChildren }}</span>\n\t\t\t</span>\n\t\t</div>\n\t}\n</div>\n", styles: ["@charset \"UTF-8\";@layer base{:root{--components-options-item-padding-vertical: var(--pr-t-spacings-50);--components-options-item-padding-horizontal: var(--pr-t-spacings-100);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-neutral-800);--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));--components-options-checkbox-border-radius: var(--pr-t-border-radius-small);--components-options-checkbox-border-color: var(--palettes-neutral-700);--components-options-establishment-multiple-padding: 2rem}}@layer reset,base,components,mods,product,utils;@layer components{:host{--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));display:block;scroll-margin:var(--pr-t-spacings-50)}.lu-picker-content-group :host{scroll-margin-block-start:var(--pr-t-spacings-400)}}@layer mods{:host.withAddOption{scroll-margin-block-end:var(--pr-t-spacings-600)}}@layer components{.optionItem{position:relative}}@layer components{.optionItem-value{position:relative;border-radius:var(--pr-t-border-radius-default);display:block;padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer;overflow-wrap:anywhere}.optionItem-value ::ng-deep .avatar{margin-inline-end:var(--pr-t-spacings-75)}}@layer mods{.optionItem-value.is-selected,:host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-50, var(--palettes-product-50))}.optionItem-value.is-selected:before,:host-context([aria-selected=true]) .optionItem-value:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:calc(var(--pr-t-spacings-50) * -1);inline-size:2px;background-color:var(--palettes-700, var(--palettes-product-700));border-start-end-radius:var(--pr-t-border-radius-default);border-end-end-radius:var(--pr-t-border-radius-default)}.optionItem-value.is-selected:hover,:host-context([aria-selected=true]) .optionItem-value:hover{background-color:var(--palettes-100, var(--palettes-product-100))}.optionItem-value.is-selected:active,:host-context([aria-selected=true]) .optionItem-value:active{background-color:var(--palettes-200, var(--palettes-product-200))}:host-context(.is-highlighted) .optionItem-value.is-selected,:host-context(.is-highlighted) :host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-100, var(--palettes-product-100))}:host-context(.is-highlighted) .optionItem-value.is-selected:hover,:host-context(.is-highlighted) :host-context([aria-selected=true]) .optionItem-value:hover{background-color:var(--palettes-200, var(--palettes-product-200))}.optionItem-value:hover{background-color:var(--palettes-neutral-50)}:host-context(.is-highlighted) .optionItem-value{background-color:var(--palettes-neutral-50)}:host-context(.is-highlighted) .optionItem-value:hover{background-color:var(--palettes-neutral-50)}:host-context(.is-highlighted) .optionItem-value:active{background-color:var(--palettes-neutral-100)}.optionItem-value:active{background-color:var(--palettes-neutral-100)}}@layer components{.optionItem-value-group{color:var(--palettes-neutral-600);font:var(--pr-t-font-body-S)}}@layer components{:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}}@layer mods{:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.is-highlighted) :host-context(.lu-select-value) .optionItem-value{background-color:inherit}}@layer mods{:host-context(.mod-multiple) .optionItem-value,.formerEmployeeDisplayer .optionItem-value{position:relative;padding-inline-start:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:before{display:block;position:absolute;inset-inline-start:var(--pr-t-spacings-100);inset-block-start:var(--pr-t-spacings-75)}:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:before{content:\"\";background-color:var(--palettes-neutral-0);border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;block-size:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:after{--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;color:transparent;font-size:var(--pr-t-font-body-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:scale(0);transition:all .1s;inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value.is-selected:before,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:before{background-color:var(--components-options-checkbox-color);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple) .optionItem-value.is-selected:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:after{color:var(--palettes-neutral-0);transform:scale(1)}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled{--components-options-checkbox-color: var(--commons-disabled-background);background-color:transparent}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled:after,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled:after{color:var(--palettes-neutral-500)}:host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-neutral-500)}:host-context(.mod-multiple) .optionItem-value:not(.is-disabled):hover:before,.formerEmployeeDisplayer .optionItem-value:not(.is-disabled):hover:before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}}@layer components{:host-context(.mod-multiple).establishmentOption .optionItem-value,.formerEmployeeDisplayer.establishmentOption .optionItem-value{position:relative;padding-inline-start:calc(var(--components-options-checkbox-size) + var(--pr-t-spacings-100) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after,.formerEmployeeDisplayer.establishmentOption .optionItem-value:before,.formerEmployeeDisplayer.establishmentOption .optionItem-value:after{inset-inline-start:var(--pr-t-spacings-100)}}@layer mods{.is-disabled{color:var(--palettes-neutral-500);-webkit-user-select:none;user-select:none;cursor:default}.is-disabled.is-selected{background-color:var(--commons-disabled-background)}.is-disabled:hover{background-color:inherit}.optionItem-value:has(.optionItem-icon){display:flex;justify-content:space-between}}@layer components{.optionItem-icons{display:flex;gap:var(--pr-t-spacings-50)}.optionItem-icon-shape{display:block;fill:var(--palettes-neutral-500)}.optionItem-icon-shape:hover{fill:var(--palettes-neutral-800)}}\n"] }]
|
|
383
|
-
|
|
384
|
-
type: HostBinding,
|
|
385
|
-
|
|
386
|
-
}], optionTpl: [{
|
|
387
|
-
type: Input
|
|
388
|
-
}], option: [{
|
|
389
|
-
type: Input
|
|
390
|
-
}], grouping: [{
|
|
391
|
-
type: Input
|
|
392
|
-
}], hasChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasChildren", required: false }] }], onlyParent: [{ type: i0.Output, args: ["onlyParent"] }], onlyChildren: [{ type: i0.Output, args: ["onlyChildren"] }], groupIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupIndex", required: false }] }], optionIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionIndex", required: true }] }], scrollIntoViewOptions: [{
|
|
393
|
-
type: Input
|
|
394
|
-
}], groupTemplateLocation: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupTemplateLocation", required: false }] }], optionContext: [{
|
|
395
|
-
type: ViewChild,
|
|
396
|
-
args: [LuOptionOutletDirective, { read: LU_OPTION_CONTEXT, static: true }]
|
|
397
|
-
}] } });
|
|
493
|
+
args: [{ selector: 'lu-select-option', host: {
|
|
494
|
+
class: 'optionItem',
|
|
495
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, imports: [LuOptionOutletDirective, PortalDirective, LuOptionGroupPipe, LuTooltipTriggerDirective], template: "<div class=\"optionItem-value\" [class.is-disabled]=\"selectableItem.disabled\" (click)=\"selectOption($event)\">\n\t<ng-container *luOptionOutlet=\"optionTpl(); value: selectableItem.option()\" />\n\n\t@if (groupTemplateLocation() === \"option\") {\n\t\t@if (grouping(); as grouping) {\n\t\t\t<div class=\"optionItem-value-group\">\n\t\t\t\t<ng-container *luPortal=\"grouping.content; context: { $implicit: selectableItem.option() | luOptionGroup: grouping.selector }\" />\n\t\t\t</div>\n\t\t}\n\t}\n\n\t@if (hasChildren() && !selectableItem.disabled) {\n\t\t<div class=\"optionItem-icons\">\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon parentOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyParent.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyParent\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyParent }}</span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon childrenOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyChildren.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyChildren\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyChildren }}</span>\n\t\t\t</span>\n\t\t</div>\n\t}\n</div>\n", styles: ["@charset \"UTF-8\";@layer base{:root{--components-options-item-padding-vertical: var(--pr-t-spacings-50);--components-options-item-padding-horizontal: var(--pr-t-spacings-100);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-neutral-800);--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));--components-options-checkbox-border-radius: var(--pr-t-border-radius-small);--components-options-checkbox-border-color: var(--palettes-neutral-700);--components-options-establishment-multiple-padding: 2rem}}@layer reset,base,components,mods,product,utils;@layer components{:host{--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));display:block;scroll-margin:var(--pr-t-spacings-50)}.lu-picker-content-group :host{scroll-margin-block-start:var(--pr-t-spacings-400)}}@layer mods{:host.withAddOption{scroll-margin-block-end:var(--pr-t-spacings-600)}}@layer components{.optionItem{position:relative}}@layer components{.optionItem-value{position:relative;border-radius:var(--pr-t-border-radius-default);display:block;padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer;overflow-wrap:anywhere}.optionItem-value ::ng-deep .avatar{margin-inline-end:var(--pr-t-spacings-75)}}@layer mods{.optionItem-value.is-selected,:host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-50, var(--palettes-product-50))}.optionItem-value.is-selected:before,:host-context([aria-selected=true]) .optionItem-value:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:calc(var(--pr-t-spacings-50) * -1);inline-size:2px;background-color:var(--palettes-700, var(--palettes-product-700));border-start-end-radius:var(--pr-t-border-radius-default);border-end-end-radius:var(--pr-t-border-radius-default)}:host-context(.optionItem.is-highlighted) .optionItem-value.is-selected,:host-context(.optionItem.is-highlighted) :host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-100, var(--palettes-product-100))}.optionItem-value.is-selected:active,:host-context([aria-selected=true]) .optionItem-value:active{background-color:var(--palettes-200, var(--palettes-product-200))}:host-context(.optionItem.is-highlighted) .optionItem-value{background-color:var(--palettes-neutral-50)}.optionItem-value:active{background-color:var(--palettes-neutral-100)}}@layer components{.optionItem-value-group{color:var(--palettes-neutral-600);font:var(--pr-t-font-body-S)}}@layer components{:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}}@layer mods{:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.optionItem.is-highlighted) :host-context(.lu-select-value) .optionItem-value{background-color:inherit}}@layer mods{:host-context(.mod-multiple) .optionItem-value,.formerEmployeeDisplayer .optionItem-value,.archivedLegalUnitsDisplayer .optionItem-value{position:relative;padding-inline-start:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:before{display:block;position:absolute;inset-inline-start:var(--pr-t-spacings-100);inset-block-start:var(--pr-t-spacings-75)}:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:before{content:\"\";background-color:var(--palettes-neutral-0);border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;block-size:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:after{--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;color:transparent;font-size:var(--pr-t-font-body-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:scale(0);transition:all .1s;inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value.is-selected:before,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value:before{background-color:var(--components-options-checkbox-color);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple) .optionItem-value.is-selected:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value:after{color:var(--palettes-neutral-0);transform:scale(1)}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-color: var(--commons-disabled-background);background-color:transparent}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled:after,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled:after{color:var(--palettes-neutral-500)}:host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-neutral-500)}:host-context(.optionItem.is-highlighted) :host-context(.mod-multiple) .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .formerEmployeeDisplayer .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .archivedLegalUnitsDisplayer .optionItem-value:not(.is-disabled):before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}}@layer components{:host-context(.mod-multiple).establishmentOption .optionItem-value,.formerEmployeeDisplayer.establishmentOption .optionItem-value,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value{position:relative;padding-inline-start:calc(var(--components-options-checkbox-size) + var(--pr-t-spacings-100) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after,.formerEmployeeDisplayer.establishmentOption .optionItem-value:before,.formerEmployeeDisplayer.establishmentOption .optionItem-value:after,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:before,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:after{inset-inline-start:var(--pr-t-spacings-100)}}@layer mods{.is-disabled{color:var(--palettes-neutral-500);-webkit-user-select:none;user-select:none;cursor:default}.is-disabled.is-selected{background-color:var(--commons-disabled-background)}.is-disabled:hover{background-color:inherit}.optionItem-value:has(.optionItem-icon){display:flex;justify-content:space-between}}@layer components{.optionItem-icons{display:flex;gap:var(--pr-t-spacings-50)}.optionItem-icon-shape{display:block;fill:var(--palettes-neutral-500)}.optionItem-icon-shape:hover{fill:var(--palettes-neutral-800)}}\n"] }]
|
|
496
|
+
}], ctorParameters: () => [], propDecorators: { intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }], optionTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTpl", required: false }] }], option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: false }] }], grouping: [{ type: i0.Input, args: [{ isSignal: true, alias: "grouping", required: false }] }], hasChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasChildren", required: false }] }], onlyParent: [{ type: i0.Output, args: ["onlyParent"] }], onlyChildren: [{ type: i0.Output, args: ["onlyChildren"] }], groupIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupIndex", required: false }] }], optionIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionIndex", required: true }] }], scrollIntoViewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollIntoViewOptions", required: false }] }], groupTemplateLocation: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupTemplateLocation", required: false }] }], optionContext: [{ type: i0.ViewChild, args: [i0.forwardRef(() => LU_OPTION_CONTEXT), { isSignal: true }] }] } });
|
|
398
497
|
|
|
399
498
|
class LuOptionDirective {
|
|
400
|
-
set select(select) {
|
|
401
|
-
select.optionTpl.set(this.templateRef);
|
|
402
|
-
}
|
|
403
499
|
constructor(templateRef) {
|
|
404
500
|
this.templateRef = templateRef;
|
|
501
|
+
this.select = input(undefined, { ...(ngDevMode ? { debugName: "select" } : /* istanbul ignore next */ {}), alias: 'luOptionSelect' });
|
|
502
|
+
_effectWithDeps([this.select], (select) => select?.optionTpl.set(this.templateRef));
|
|
405
503
|
}
|
|
406
504
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
407
505
|
return true;
|
|
408
506
|
}
|
|
409
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
410
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
507
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
508
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuOptionDirective, isStandalone: true, selector: "[luOption]", inputs: { select: { classPropertyName: "select", publicName: "luOptionSelect", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
411
509
|
}
|
|
412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionDirective, decorators: [{
|
|
413
511
|
type: Directive,
|
|
414
512
|
args: [{
|
|
415
513
|
selector: '[luOption]',
|
|
416
514
|
}]
|
|
417
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { select: [{
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
515
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { select: [{ type: i0.Input, args: [{ isSignal: true, alias: "luOptionSelect", required: false }] }] } });
|
|
516
|
+
|
|
517
|
+
function buildOptionsFromDataSource(ds, deps) {
|
|
518
|
+
const { nextPage$, clue$, isPanelOpen$, setLoading } = deps;
|
|
519
|
+
const page$ = nextPage$.pipe(scan((page) => page + 1, 0), startWith(0));
|
|
520
|
+
const normalizedClue$ = clue$.pipe(map((clue) => clue ?? ''), distinctUntilChanged());
|
|
521
|
+
// If a debounce is specified:
|
|
522
|
+
// - empty clue ('') passes through immediately (initial state / clear)
|
|
523
|
+
// - non-empty clue is debounced (user is typing)
|
|
524
|
+
const debouncedClue$ = ds.clueDebounceMs ? normalizedClue$.pipe(switchMap((clue) => (clue ? timer(ds.clueDebounceMs).pipe(map(() => clue)) : of(clue)))) : normalizedClue$;
|
|
525
|
+
return isPanelOpen$.pipe(distinctUntilChanged(), switchMap((isOpen) => {
|
|
526
|
+
if (!isOpen) {
|
|
527
|
+
return of([]);
|
|
528
|
+
}
|
|
529
|
+
return debouncedClue$.pipe(switchMap((clue) => {
|
|
530
|
+
ds.reset?.();
|
|
531
|
+
return page$.pipe(concatMap((page) => {
|
|
532
|
+
setLoading(true);
|
|
533
|
+
return ds.getOptions({ clue, page }).pipe(catchError(() => of([])), tap(() => setLoading(false)), startWith([]), map((items) => ({ items, page })));
|
|
534
|
+
}), scan((acc, { items, page }) => {
|
|
535
|
+
acc[page] = items;
|
|
536
|
+
return acc;
|
|
537
|
+
}, {}),
|
|
538
|
+
// Stop calling pages when last two pages are empty
|
|
539
|
+
takeWhile((pages) => {
|
|
540
|
+
const indexes = Object.keys(pages)
|
|
541
|
+
.map((p) => parseInt(p))
|
|
542
|
+
.sort((a, b) => a - b);
|
|
543
|
+
const lastIndexes = indexes.slice(-2);
|
|
544
|
+
return lastIndexes.length < 2 || !lastIndexes.every((i) => pages[i]?.length === 0);
|
|
545
|
+
}), map((pages) => Object.values(pages).flat()), finalize(() => setLoading(false)));
|
|
546
|
+
}));
|
|
547
|
+
}));
|
|
548
|
+
}
|
|
421
549
|
|
|
422
550
|
const coreSelectDefaultOptionComparer = (option1, option2) => JSON.stringify(option1) === JSON.stringify(option2);
|
|
423
551
|
const coreSelectDefaultOptionKey = (option) => option;
|
|
424
552
|
class ALuSelectInputComponent {
|
|
425
|
-
set placeholder(value) {
|
|
426
|
-
this.placeholder$.next(value);
|
|
427
|
-
}
|
|
428
|
-
set clearable(value) {
|
|
429
|
-
this.#inputClearable.set(value);
|
|
430
|
-
}
|
|
431
|
-
get clearable() {
|
|
432
|
-
return this.#clearable();
|
|
433
|
-
}
|
|
434
|
-
#clearable;
|
|
435
553
|
#defaultFilterPillClearable;
|
|
436
|
-
#inputClearable;
|
|
437
554
|
#defaultClearable;
|
|
438
555
|
get searchable() {
|
|
439
556
|
return this.clueChange$.observed;
|
|
440
557
|
}
|
|
441
|
-
#addOptionLabelInput;
|
|
442
|
-
set addOptionLabel(label) {
|
|
443
|
-
this.#addOptionLabelInput.set(label);
|
|
444
|
-
}
|
|
445
558
|
get addOptionLabel() {
|
|
446
559
|
return this.computedAddOptionLabel();
|
|
447
560
|
}
|
|
448
|
-
set addOptionStrategy(strategy) {
|
|
449
|
-
this.addOptionStrategy$.next(strategy);
|
|
450
|
-
}
|
|
451
561
|
get isSelectedClass() {
|
|
452
562
|
return this.hasValue();
|
|
453
563
|
}
|
|
@@ -460,24 +570,6 @@ class ALuSelectInputComponent {
|
|
|
460
570
|
get ariaControls() {
|
|
461
571
|
return this.overlayContainerRef.id;
|
|
462
572
|
}
|
|
463
|
-
set loading(value) {
|
|
464
|
-
if (value !== this.loading) {
|
|
465
|
-
this.loading$.next(value);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
set options(options) {
|
|
469
|
-
this.options$.next(options);
|
|
470
|
-
if (this.panelRef) {
|
|
471
|
-
// We have to put it in a setTimeout so it'll be triggered AFTER the DOM is updated and not right now,
|
|
472
|
-
// which is before the panel size has been modified by the arrival of the new options
|
|
473
|
-
setTimeout(() => {
|
|
474
|
-
this.panelRef?.updatePosition();
|
|
475
|
-
this.updatePositionFn?.();
|
|
476
|
-
// If no fixes are found, last resort fix is here
|
|
477
|
-
// window.dispatchEvent(new Event('resize'));
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
573
|
get isNoClueIconClass() {
|
|
482
574
|
return this.noClueIcon();
|
|
483
575
|
}
|
|
@@ -503,7 +595,7 @@ class ALuSelectInputComponent {
|
|
|
503
595
|
this.changeDetectorRef.markForCheck();
|
|
504
596
|
}
|
|
505
597
|
get inputPlaceholder() {
|
|
506
|
-
return this.value ? null : this.placeholder
|
|
598
|
+
return this.value ? null : this.placeholder();
|
|
507
599
|
}
|
|
508
600
|
clueChanged(clue, skipPanelOpen = false) {
|
|
509
601
|
this.clue = clue;
|
|
@@ -515,6 +607,18 @@ class ALuSelectInputComponent {
|
|
|
515
607
|
this.lastEmittedClue = clue;
|
|
516
608
|
}
|
|
517
609
|
}
|
|
610
|
+
getDefaultDataSource() {
|
|
611
|
+
let emittedKeys = new Set();
|
|
612
|
+
return {
|
|
613
|
+
getOptions: (_params) => {
|
|
614
|
+
let lastEmittedThisPage = [];
|
|
615
|
+
return this.manualOptions$.pipe(tap((options) => (lastEmittedThisPage = options)), takeUntil(this.nextPage$), finalize(() => (emittedKeys = new Set(lastEmittedThisPage.map((p) => this.optionKey()(p))))), map((options) => options.filter((c) => !emittedKeys.has(this.optionKey()(c)))));
|
|
616
|
+
},
|
|
617
|
+
reset() {
|
|
618
|
+
emittedKeys.clear();
|
|
619
|
+
},
|
|
620
|
+
};
|
|
621
|
+
}
|
|
518
622
|
get panelRef() {
|
|
519
623
|
return this._panelRef;
|
|
520
624
|
}
|
|
@@ -530,52 +634,88 @@ class ALuSelectInputComponent {
|
|
|
530
634
|
this.panelClosed = output();
|
|
531
635
|
this.panelOpened = output();
|
|
532
636
|
this.highlightedOption = output();
|
|
533
|
-
this.
|
|
637
|
+
this.inputElementRef = viewChild('inputElement', /* @ts-ignore */
|
|
638
|
+
...(ngDevMode ? [{ debugName: "inputElementRef" }] : /* istanbul ignore next */ []));
|
|
534
639
|
this.disabled$ = new BehaviorSubject(false);
|
|
535
640
|
this.filterPillDisabled = toSignal(this.disabled$, { initialValue: false });
|
|
536
|
-
this.prefix = input(null,
|
|
537
|
-
|
|
538
|
-
this
|
|
539
|
-
|
|
641
|
+
this.prefix = input(null, /* @ts-ignore */
|
|
642
|
+
...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
|
|
643
|
+
this.placeholder = input(/* @ts-ignore */
|
|
644
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
645
|
+
this.clearableInput = input(null, { ...(ngDevMode ? { debugName: "clearableInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'clearable' });
|
|
646
|
+
this.isClearable = computed(() => this.clearableInput() ?? this.#defaultFilterPillClearable() ?? this.#defaultClearable, /* @ts-ignore */
|
|
647
|
+
...(ngDevMode ? [{ debugName: "isClearable" }] : /* istanbul ignore next */ []));
|
|
648
|
+
this.#defaultFilterPillClearable = signal(null, /* @ts-ignore */
|
|
649
|
+
...(ngDevMode ? [{ debugName: "#defaultFilterPillClearable" }] : /* istanbul ignore next */ []));
|
|
540
650
|
this.#defaultClearable = false;
|
|
541
|
-
this
|
|
542
|
-
|
|
651
|
+
this.computedAddOptionLabel = computed(() => this.addOptionLabelInput() ?? this.intl().addOption, /* @ts-ignore */
|
|
652
|
+
...(ngDevMode ? [{ debugName: "computedAddOptionLabel" }] : /* istanbul ignore next */ []));
|
|
653
|
+
this.addOptionLabelInput = input(null, { ...(ngDevMode ? { debugName: "addOptionLabelInput" } : /* istanbul ignore next */ {}), alias: 'addOptionLabel' });
|
|
654
|
+
this.addOptionStrategy = input('never', /* @ts-ignore */
|
|
655
|
+
...(ngDevMode ? [{ debugName: "addOptionStrategy" }] : /* istanbul ignore next */ []));
|
|
543
656
|
this.isPanelOpen$ = new BehaviorSubject(false);
|
|
657
|
+
// TODO Might be temporary, check after merging signalize PR
|
|
658
|
+
this.panelOpenSignal = toSignal(this.isPanelOpen$);
|
|
544
659
|
this.activeDescendant$ = new BehaviorSubject('');
|
|
545
|
-
this.
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
};
|
|
549
|
-
this.
|
|
550
|
-
this.
|
|
660
|
+
this.manualOptions$ = new ReplaySubject(1);
|
|
661
|
+
this.overlayConfig = input({ hasBackdrop: true, backdropClass: 'cdk-overlay-transparent-backdrop' }, /* @ts-ignore */
|
|
662
|
+
...(ngDevMode ? [{ debugName: "overlayConfig" }] : /* istanbul ignore next */ []));
|
|
663
|
+
this.loadingInput = input(false, { ...(ngDevMode ? { debugName: "loadingInput" } : /* istanbul ignore next */ {}), alias: 'loading' });
|
|
664
|
+
this.optionsInput = input(null, { ...(ngDevMode ? { debugName: "optionsInput" } : /* istanbul ignore next */ {}), alias: 'options' });
|
|
665
|
+
this.optionComparerInput = input(coreSelectDefaultOptionComparer, { ...(ngDevMode ? { debugName: "optionComparerInput" } : /* istanbul ignore next */ {}), alias: 'optionComparer' });
|
|
666
|
+
this.optionKeyInput = input(coreSelectDefaultOptionKey, { ...(ngDevMode ? { debugName: "optionKeyInput" } : /* istanbul ignore next */ {}), alias: 'optionKey' });
|
|
551
667
|
this.noClueIcon = input(false, { ...(ngDevMode ? { debugName: "noClueIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
552
|
-
this.inputTabindex = input(0,
|
|
668
|
+
this.inputTabindex = input(0, /* @ts-ignore */
|
|
669
|
+
...(ngDevMode ? [{ debugName: "inputTabindex" }] : /* istanbul ignore next */ []));
|
|
553
670
|
this.compact = input(false, { ...(ngDevMode ? { debugName: "compact" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
554
671
|
this.colorPicker = input(false, { ...(ngDevMode ? { debugName: "colorPicker" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
555
|
-
this.
|
|
556
|
-
|
|
557
|
-
this.
|
|
558
|
-
|
|
559
|
-
this.
|
|
560
|
-
|
|
672
|
+
this.options = linkedSignal(() => this.optionsInput(), /* @ts-ignore */
|
|
673
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
674
|
+
this.loading = linkedSignal(() => this.loadingInput(), /* @ts-ignore */
|
|
675
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
676
|
+
this.clearable = linkedSignal(() => this.clearableInput(), /* @ts-ignore */
|
|
677
|
+
...(ngDevMode ? [{ debugName: "clearable" }] : /* istanbul ignore next */ []));
|
|
678
|
+
this.optionComparer = linkedSignal(() => this.optionComparerInput(), /* @ts-ignore */
|
|
679
|
+
...(ngDevMode ? [{ debugName: "optionComparer" }] : /* istanbul ignore next */ []));
|
|
680
|
+
this.optionKey = linkedSignal(() => this.optionKeyInput(), /* @ts-ignore */
|
|
681
|
+
...(ngDevMode ? [{ debugName: "optionKey" }] : /* istanbul ignore next */ []));
|
|
682
|
+
this.optionTpl = model(LuSimpleSelectDefaultOptionComponent, /* @ts-ignore */
|
|
683
|
+
...(ngDevMode ? [{ debugName: "optionTpl" }] : /* istanbul ignore next */ []));
|
|
684
|
+
this.valueTpl = model(/* @ts-ignore */
|
|
685
|
+
...(ngDevMode ? [undefined, { debugName: "valueTpl" }] : /* istanbul ignore next */ []));
|
|
686
|
+
this.panelHeaderTpl = model(/* @ts-ignore */
|
|
687
|
+
...(ngDevMode ? [undefined, { debugName: "panelHeaderTpl" }] : /* istanbul ignore next */ []));
|
|
688
|
+
this.panelFooterTpl = model(/* @ts-ignore */
|
|
689
|
+
...(ngDevMode ? [undefined, { debugName: "panelFooterTpl" }] : /* istanbul ignore next */ []));
|
|
690
|
+
this.displayerTpl = computed(() => this.valueTpl() || this.optionTpl(), /* @ts-ignore */
|
|
691
|
+
...(ngDevMode ? [{ debugName: "displayerTpl" }] : /* istanbul ignore next */ []));
|
|
692
|
+
this.groupingSignal = signal(undefined, /* @ts-ignore */
|
|
693
|
+
...(ngDevMode ? [{ debugName: "groupingSignal" }] : /* istanbul ignore next */ []));
|
|
561
694
|
this.clueChange$ = new Subject();
|
|
562
695
|
this.clueChange = outputFromObservable(this.clueChange$);
|
|
563
696
|
this.nextPage$ = new Subject();
|
|
564
697
|
this.nextPage = outputFromObservable(this.nextPage$);
|
|
565
|
-
this.previousPage = output();
|
|
566
698
|
this.addOption = output();
|
|
567
|
-
this.valueSignal = signal(null,
|
|
568
|
-
|
|
569
|
-
this.
|
|
699
|
+
this.valueSignal = signal(null, /* @ts-ignore */
|
|
700
|
+
...(ngDevMode ? [{ debugName: "valueSignal" }] : /* istanbul ignore next */ []));
|
|
701
|
+
this.isFilterPillEmpty = computed(() => this.valueSignal() === null, /* @ts-ignore */
|
|
702
|
+
...(ngDevMode ? [{ debugName: "isFilterPillEmpty" }] : /* istanbul ignore next */ []));
|
|
703
|
+
this.isFilterPillClearable = computed(() => this.isClearable(), /* @ts-ignore */
|
|
704
|
+
...(ngDevMode ? [{ debugName: "isFilterPillClearable" }] : /* istanbul ignore next */ []));
|
|
570
705
|
this._value = null;
|
|
571
|
-
this.
|
|
572
|
-
|
|
706
|
+
this.dataSource = model(this.getDefaultDataSource(), /* @ts-ignore */
|
|
707
|
+
...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
708
|
+
this.dataSourceOptions = toSignal(toObservable(this.dataSource).pipe(switchMap((ds) => buildOptionsFromDataSource(ds, {
|
|
709
|
+
nextPage$: this.nextPage$,
|
|
710
|
+
clue$: this.clue$,
|
|
711
|
+
isPanelOpen$: this.isPanelOpen$,
|
|
712
|
+
setLoading: (v) => this.loading.set(v),
|
|
713
|
+
}))), { initialValue: [] });
|
|
573
714
|
this.clue = null;
|
|
574
715
|
// This is the clue stored after we selected an option to know if we should emit an empty clue on open or not
|
|
575
716
|
this.lastEmittedClue = '';
|
|
576
717
|
this.clue$ = defer(() => this.clueChange$.pipe(startWith(this.clue)));
|
|
577
|
-
this.
|
|
578
|
-
this.shouldDisplayAddOption$ = this.addOptionStrategy$.pipe(switchMap((strategy) => {
|
|
718
|
+
this.shouldDisplayAddOption = toSignal(toObservable(this.addOptionStrategy).pipe(switchMap((strategy) => {
|
|
579
719
|
switch (strategy) {
|
|
580
720
|
case 'always':
|
|
581
721
|
return of(true);
|
|
@@ -586,11 +726,28 @@ class ALuSelectInputComponent {
|
|
|
586
726
|
case 'if-not-empty-clue':
|
|
587
727
|
return this.clue$.pipe(map((clue) => !!clue));
|
|
588
728
|
}
|
|
589
|
-
}));
|
|
729
|
+
})));
|
|
590
730
|
this.destroyed$ = new Subject();
|
|
731
|
+
this.injector = inject(Injector);
|
|
591
732
|
if (this.filterPillHost) {
|
|
592
733
|
this.filterPillHost.registerInput(this);
|
|
593
734
|
}
|
|
735
|
+
_effectWithDeps([this.options], (options) => {
|
|
736
|
+
if (isNotNil(options)) {
|
|
737
|
+
this.manualOptions$.next(options);
|
|
738
|
+
}
|
|
739
|
+
});
|
|
740
|
+
// When options arrive asynchronously via a dataSource, dataSourceOptions changes but options doesn't.
|
|
741
|
+
// We need to reposition the panel after the DOM updates in both cases.
|
|
742
|
+
_effectWithDeps([this.dataSourceOptions], (_options, onCleanup) => {
|
|
743
|
+
if (isNotNil(this.panelRef)) {
|
|
744
|
+
const ref = afterNextRender(() => {
|
|
745
|
+
this.panelRef?.updatePosition();
|
|
746
|
+
this.updatePositionFn?.();
|
|
747
|
+
}, { injector: this.injector });
|
|
748
|
+
onCleanup(() => ref.destroy());
|
|
749
|
+
}
|
|
750
|
+
});
|
|
594
751
|
}
|
|
595
752
|
onClickOpenPanel($event) {
|
|
596
753
|
if (!this.isPanelOpen) {
|
|
@@ -641,6 +798,12 @@ class ALuSelectInputComponent {
|
|
|
641
798
|
}
|
|
642
799
|
break;
|
|
643
800
|
default:
|
|
801
|
+
// Let the browser handle modifier chords like Ctrl/Cmd+V (paste) or Ctrl/Cmd+C (copy)
|
|
802
|
+
// instead of treating the chord's letter (e.g. the "v" of Ctrl+V) as typeahead input.
|
|
803
|
+
// AltGr (Ctrl+Alt on Windows) is excluded so accented/special characters still work.
|
|
804
|
+
if (($event.ctrlKey || $event.metaKey) && !$event.altKey) {
|
|
805
|
+
return;
|
|
806
|
+
}
|
|
644
807
|
// For any other key, forward it to the panel if it's open
|
|
645
808
|
if (this.isPanelOpen) {
|
|
646
809
|
this.panelRef?.handleKeyManagerEvent($event);
|
|
@@ -663,8 +826,6 @@ class ALuSelectInputComponent {
|
|
|
663
826
|
}
|
|
664
827
|
ngOnDestroy() {
|
|
665
828
|
this.closePanel();
|
|
666
|
-
this.destroyed$.next();
|
|
667
|
-
this.destroyed$.complete();
|
|
668
829
|
}
|
|
669
830
|
ngOnInit() {
|
|
670
831
|
if (this.labelElement) {
|
|
@@ -676,7 +837,7 @@ class ALuSelectInputComponent {
|
|
|
676
837
|
event.stopPropagation();
|
|
677
838
|
}
|
|
678
839
|
this.updateValue(null, true);
|
|
679
|
-
this.inputElementRef
|
|
840
|
+
this.inputElementRef()?.nativeElement.focus();
|
|
680
841
|
}
|
|
681
842
|
openPanel(clue = '') {
|
|
682
843
|
if (this.filterPillMode || this.isPanelOpen || this.disabled$.value) {
|
|
@@ -696,9 +857,10 @@ class ALuSelectInputComponent {
|
|
|
696
857
|
if (this.isPanelOpen) {
|
|
697
858
|
return;
|
|
698
859
|
}
|
|
860
|
+
const isSearchable = this.searchable;
|
|
699
861
|
this.isPanelOpen$.next(true);
|
|
700
862
|
this.panelOpened.emit();
|
|
701
|
-
if (
|
|
863
|
+
if (isSearchable) {
|
|
702
864
|
this.clueChanged(clue);
|
|
703
865
|
}
|
|
704
866
|
this._panelRef = this.buildPanelRef();
|
|
@@ -714,8 +876,7 @@ class ALuSelectInputComponent {
|
|
|
714
876
|
return;
|
|
715
877
|
}
|
|
716
878
|
this.panelRef.valueChanged.subscribe((value) => this.updateValue(value));
|
|
717
|
-
this
|
|
718
|
-
this.#pageChanged(this.panelRef.previousPage).subscribe(() => this.previousPage.emit());
|
|
879
|
+
this.panelRef.nextPage.subscribe(() => this.nextPage$.next());
|
|
719
880
|
this.panelRef.activeOptionIdChanged.subscribe((optionId) => {
|
|
720
881
|
this.activeDescendant$.next(optionId);
|
|
721
882
|
this.changeDetectorRef.markForCheck();
|
|
@@ -723,8 +884,8 @@ class ALuSelectInputComponent {
|
|
|
723
884
|
this.panelRef.closed.subscribe(() => this.closePanel());
|
|
724
885
|
}
|
|
725
886
|
focusInput() {
|
|
726
|
-
if (this.inputElementRef) {
|
|
727
|
-
this.inputElementRef
|
|
887
|
+
if (this.inputElementRef()) {
|
|
888
|
+
this.inputElementRef()?.nativeElement.focus();
|
|
728
889
|
}
|
|
729
890
|
}
|
|
730
891
|
emptyClue() {
|
|
@@ -734,6 +895,7 @@ class ALuSelectInputComponent {
|
|
|
734
895
|
}
|
|
735
896
|
}
|
|
736
897
|
closePanel() {
|
|
898
|
+
this.dataSource().reset?.();
|
|
737
899
|
if (!this.isPanelOpen) {
|
|
738
900
|
return;
|
|
739
901
|
}
|
|
@@ -762,10 +924,6 @@ class ALuSelectInputComponent {
|
|
|
762
924
|
this.onChange?.(value);
|
|
763
925
|
this.onTouched?.();
|
|
764
926
|
}
|
|
765
|
-
// Ensure nextPage/previousPage does not emit too often
|
|
766
|
-
#pageChanged(pageEmitter) {
|
|
767
|
-
return this.options$.pipe(switchMap(() => pageEmitter.pipe(take(1))));
|
|
768
|
-
}
|
|
769
927
|
// Filter pill interface
|
|
770
928
|
clearFilterPillValue() {
|
|
771
929
|
this.clearValue();
|
|
@@ -788,58 +946,24 @@ class ALuSelectInputComponent {
|
|
|
788
946
|
onFilterPillClosed() {
|
|
789
947
|
this.isPanelOpen$.next(false);
|
|
790
948
|
}
|
|
791
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
792
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.
|
|
949
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ALuSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
950
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.7", type: ALuSelectInputComponent, isStandalone: true, inputs: { ignorePresentation: { classPropertyName: "ignorePresentation", publicName: "ignorePresentation", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, clearableInput: { classPropertyName: "clearableInput", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, addOptionLabelInput: { classPropertyName: "addOptionLabelInput", publicName: "addOptionLabel", isSignal: true, isRequired: false, transformFunction: null }, addOptionStrategy: { classPropertyName: "addOptionStrategy", publicName: "addOptionStrategy", isSignal: true, isRequired: false, transformFunction: null }, overlayConfig: { classPropertyName: "overlayConfig", publicName: "overlayConfig", isSignal: true, isRequired: false, transformFunction: null }, loadingInput: { classPropertyName: "loadingInput", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, optionsInput: { classPropertyName: "optionsInput", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionComparerInput: { classPropertyName: "optionComparerInput", publicName: "optionComparer", isSignal: true, isRequired: false, transformFunction: null }, optionKeyInput: { classPropertyName: "optionKeyInput", publicName: "optionKey", isSignal: true, isRequired: false, transformFunction: null }, noClueIcon: { classPropertyName: "noClueIcon", publicName: "noClueIcon", isSignal: true, isRequired: false, transformFunction: null }, inputTabindex: { classPropertyName: "inputTabindex", publicName: "inputTabindex", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, colorPicker: { classPropertyName: "colorPicker", publicName: "colorPicker", isSignal: true, isRequired: false, transformFunction: null }, optionTpl: { classPropertyName: "optionTpl", publicName: "optionTpl", isSignal: true, isRequired: false, transformFunction: null }, valueTpl: { classPropertyName: "valueTpl", publicName: "valueTpl", isSignal: true, isRequired: false, transformFunction: null }, panelHeaderTpl: { classPropertyName: "panelHeaderTpl", publicName: "panelHeaderTpl", isSignal: true, isRequired: false, transformFunction: null }, panelFooterTpl: { classPropertyName: "panelFooterTpl", publicName: "panelFooterTpl", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { panelClosed: "panelClosed", panelOpened: "panelOpened", highlightedOption: "highlightedOption", optionTpl: "optionTplChange", valueTpl: "valueTplChange", panelHeaderTpl: "panelHeaderTplChange", panelFooterTpl: "panelFooterTplChange", clueChange: "clueChange", nextPage: "nextPage", addOption: "addOption", dataSource: "dataSourceChange" }, host: { listeners: { "click": "onClickOpenPanel($event)", "keydown": "onKeyDownNavigation($event)" }, properties: { "class.colorPicker": "colorPicker()", "class.mod-compact": "compact()", "class.is-clearable": "isClearable()", "class.is-selected": "isSelectedClass", "class.is-searchFilled": "isSearchFilledClass", "class.mod-noClueIcon": "isNoClueIconClass" } }, viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
793
951
|
}
|
|
794
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ALuSelectInputComponent, decorators: [{
|
|
795
953
|
type: Directive,
|
|
796
954
|
args: [{
|
|
797
955
|
host: {
|
|
798
956
|
'[class.colorPicker]': 'colorPicker()',
|
|
799
957
|
'[class.mod-compact]': 'compact()',
|
|
958
|
+
'[class.is-clearable]': 'isClearable()',
|
|
959
|
+
'[class.is-selected]': 'isSelectedClass',
|
|
960
|
+
'[class.is-searchFilled]': 'isSearchFilledClass',
|
|
961
|
+
'[class.mod-noClueIcon]': 'isNoClueIconClass',
|
|
962
|
+
'(click)': 'onClickOpenPanel($event)',
|
|
963
|
+
'(keydown)': 'onKeyDownNavigation($event)',
|
|
800
964
|
},
|
|
801
965
|
}]
|
|
802
|
-
}], ctorParameters: () => [], propDecorators: { ignorePresentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignorePresentation", required: false }] }], panelClosed: [{ type: i0.Output, args: ["panelClosed"] }], panelOpened: [{ type: i0.Output, args: ["panelOpened"] }], highlightedOption: [{ type: i0.Output, args: ["highlightedOption"] }], inputElementRef: [{
|
|
803
|
-
type: ViewChild,
|
|
804
|
-
args: ['inputElement']
|
|
805
|
-
}], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], placeholder: [{
|
|
806
|
-
type: Input
|
|
807
|
-
}], clearable: [{
|
|
808
|
-
type: Input,
|
|
809
|
-
args: [{ transform: booleanAttribute }]
|
|
810
|
-
}, {
|
|
811
|
-
type: HostBinding,
|
|
812
|
-
args: ['class.is-clearable']
|
|
813
|
-
}], addOptionLabel: [{
|
|
814
|
-
type: Input
|
|
815
|
-
}], addOptionStrategy: [{
|
|
816
|
-
type: Input
|
|
817
|
-
}], isSelectedClass: [{
|
|
818
|
-
type: HostBinding,
|
|
819
|
-
args: ['class.is-selected']
|
|
820
|
-
}], isSearchFilledClass: [{
|
|
821
|
-
type: HostBinding,
|
|
822
|
-
args: ['class.is-searchFilled']
|
|
823
|
-
}], overlayConfig: [{
|
|
824
|
-
type: Input
|
|
825
|
-
}], loading: [{
|
|
826
|
-
type: Input
|
|
827
|
-
}], options: [{
|
|
828
|
-
type: Input
|
|
829
|
-
}], optionComparer: [{
|
|
830
|
-
type: Input
|
|
831
|
-
}], optionKey: [{
|
|
832
|
-
type: Input
|
|
833
|
-
}], noClueIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "noClueIcon", required: false }] }], inputTabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputTabindex", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], colorPicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorPicker", required: false }] }], isNoClueIconClass: [{
|
|
834
|
-
type: HostBinding,
|
|
835
|
-
args: ['class.mod-noClueIcon']
|
|
836
|
-
}], optionTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTpl", required: false }] }, { type: i0.Output, args: ["optionTplChange"] }], valueTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTpl", required: false }] }, { type: i0.Output, args: ["valueTplChange"] }], panelHeaderTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelHeaderTpl", required: false }] }, { type: i0.Output, args: ["panelHeaderTplChange"] }], panelFooterTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelFooterTpl", required: false }] }, { type: i0.Output, args: ["panelFooterTplChange"] }], clueChange: [{ type: i0.Output, args: ["clueChange"] }], nextPage: [{ type: i0.Output, args: ["nextPage"] }], previousPage: [{ type: i0.Output, args: ["previousPage"] }], addOption: [{ type: i0.Output, args: ["addOption"] }], onClickOpenPanel: [{
|
|
837
|
-
type: HostListener,
|
|
838
|
-
args: ['click', ['$event']]
|
|
839
|
-
}], onKeyDownNavigation: [{
|
|
840
|
-
type: HostListener,
|
|
841
|
-
args: ['keydown', ['$event']]
|
|
842
|
-
}] } });
|
|
966
|
+
}], ctorParameters: () => [], propDecorators: { ignorePresentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignorePresentation", required: false }] }], panelClosed: [{ type: i0.Output, args: ["panelClosed"] }], panelOpened: [{ type: i0.Output, args: ["panelOpened"] }], highlightedOption: [{ type: i0.Output, args: ["highlightedOption"] }], inputElementRef: [{ type: i0.ViewChild, args: ['inputElement', { isSignal: true }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], clearableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], addOptionLabelInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOptionLabel", required: false }] }], addOptionStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOptionStrategy", required: false }] }], overlayConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayConfig", required: false }] }], loadingInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], optionsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionComparerInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionComparer", required: false }] }], optionKeyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionKey", required: false }] }], noClueIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "noClueIcon", required: false }] }], inputTabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputTabindex", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], colorPicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorPicker", required: false }] }], optionTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTpl", required: false }] }, { type: i0.Output, args: ["optionTplChange"] }], valueTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTpl", required: false }] }, { type: i0.Output, args: ["valueTplChange"] }], panelHeaderTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelHeaderTpl", required: false }] }, { type: i0.Output, args: ["panelHeaderTplChange"] }], panelFooterTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelFooterTpl", required: false }] }, { type: i0.Output, args: ["panelFooterTplChange"] }], clueChange: [{ type: i0.Output, args: ["clueChange"] }], nextPage: [{ type: i0.Output, args: ["nextPage"] }], addOption: [{ type: i0.Output, args: ["addOption"] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }, { type: i0.Output, args: ["dataSourceChange"] }] } });
|
|
843
967
|
|
|
844
968
|
let selectId = 0;
|
|
845
969
|
function selectIdFactory() {
|
|
@@ -881,15 +1005,15 @@ class LuCoreSelectTotalCountDirective {
|
|
|
881
1005
|
this.totalCount = input.required({ ...(ngDevMode ? { debugName: "totalCount" } : /* istanbul ignore next */ {}), alias: 'totalCount' });
|
|
882
1006
|
this.totalCount$ = toObservable(this.totalCount);
|
|
883
1007
|
}
|
|
884
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
885
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1008
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectTotalCountDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1009
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuCoreSelectTotalCountDirective, isStandalone: true, selector: "lu-simple-select[totalCount],lu-multi-select[totalCount]", inputs: { totalCount: { classPropertyName: "totalCount", publicName: "totalCount", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
886
1010
|
{
|
|
887
1011
|
provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
|
|
888
1012
|
useExisting: forwardRef(() => LuCoreSelectTotalCountDirective),
|
|
889
1013
|
},
|
|
890
1014
|
], ngImport: i0 }); }
|
|
891
1015
|
}
|
|
892
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1016
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectTotalCountDirective, decorators: [{
|
|
893
1017
|
type: Directive,
|
|
894
1018
|
args: [{
|
|
895
1019
|
// The attribute is already prefixed with "lu-simple-select"
|
|
@@ -908,10 +1032,10 @@ class TreeDisplayPipe {
|
|
|
908
1032
|
transform(items, treeGenerator) {
|
|
909
1033
|
return treeGenerator.generateTrees(items);
|
|
910
1034
|
}
|
|
911
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
912
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
1035
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TreeDisplayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1036
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: TreeDisplayPipe, isStandalone: true, name: "luTreeDisplay" }); }
|
|
913
1037
|
}
|
|
914
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TreeDisplayPipe, decorators: [{
|
|
915
1039
|
type: Pipe,
|
|
916
1040
|
args: [{
|
|
917
1041
|
name: 'luTreeDisplay',
|
|
@@ -923,10 +1047,10 @@ class LuCoreSelectNoClueDirective {
|
|
|
923
1047
|
constructor() {
|
|
924
1048
|
inject(ALuSelectInputComponent).clueChange$.complete();
|
|
925
1049
|
}
|
|
926
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
927
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1050
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectNoClueDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1051
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: LuCoreSelectNoClueDirective, isStandalone: true, selector: "lu-simple-select[noClue],lu-multi-select[noClue]", ngImport: i0 }); }
|
|
928
1052
|
}
|
|
929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1053
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectNoClueDirective, decorators: [{
|
|
930
1054
|
type: Directive,
|
|
931
1055
|
args: [{
|
|
932
1056
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -934,108 +1058,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
934
1058
|
}]
|
|
935
1059
|
}], ctorParameters: () => [] });
|
|
936
1060
|
|
|
937
|
-
class CoreSelectKeyManager {
|
|
938
|
-
#destroyRef = inject(DestroyRef);
|
|
939
|
-
#cdkKeyManager;
|
|
940
|
-
#hasSearchChanged = false;
|
|
941
|
-
#options;
|
|
942
|
-
#injector = inject(Injector);
|
|
943
|
-
// eslint-disable-next-line @angular-eslint/prefer-signals
|
|
944
|
-
#queryList;
|
|
945
|
-
#queryList$;
|
|
946
|
-
init(options) {
|
|
947
|
-
this.#options = options;
|
|
948
|
-
this.#queryList = computed(() => {
|
|
949
|
-
return [...options.queryList()].sort((a, b) => {
|
|
950
|
-
const comparison = a.elementRef.nativeElement.compareDocumentPosition(b.elementRef.nativeElement);
|
|
951
|
-
if (comparison & Node.DOCUMENT_POSITION_FOLLOWING) {
|
|
952
|
-
return -1;
|
|
953
|
-
}
|
|
954
|
-
if (comparison & Node.DOCUMENT_POSITION_PRECEDING) {
|
|
955
|
-
return 1;
|
|
956
|
-
}
|
|
957
|
-
return 0;
|
|
958
|
-
});
|
|
959
|
-
}, ...(ngDevMode ? [{ debugName: "#queryList" }] : /* istanbul ignore next */ []));
|
|
960
|
-
this.#queryList$ = toObservable(this.#queryList, { injector: this.#injector });
|
|
961
|
-
this.#cdkKeyManager = new ActiveDescendantKeyManager(this.#queryList, this.#injector).withHomeAndEnd();
|
|
962
|
-
this.#bindClueChange(options.clueChange$);
|
|
963
|
-
this.#bindOptionsChange(options);
|
|
964
|
-
this.#bindActiveOptionIdChanged(options.activeOptionIdChanged$);
|
|
965
|
-
this.#cdkKeyManager.setFirstItemActive();
|
|
966
|
-
}
|
|
967
|
-
onKeydown(event) {
|
|
968
|
-
this.#cdkKeyManager?.onKeydown(event);
|
|
969
|
-
}
|
|
970
|
-
get activeItem() {
|
|
971
|
-
return this.#cdkKeyManager?.activeItem ?? undefined;
|
|
972
|
-
}
|
|
973
|
-
get activeItemIndex() {
|
|
974
|
-
return this.#cdkKeyManager?.activeItemIndex ?? -1;
|
|
975
|
-
}
|
|
976
|
-
setActiveItem(index) {
|
|
977
|
-
this.#cdkKeyManager?.setActiveItem(index);
|
|
978
|
-
}
|
|
979
|
-
highlightOption(option) {
|
|
980
|
-
if (!this.#options) {
|
|
981
|
-
return;
|
|
982
|
-
}
|
|
983
|
-
const { optionComparer } = this.#options;
|
|
984
|
-
this.#queryList$
|
|
985
|
-
.pipe(observeOn(asyncScheduler), map((options) => options.findIndex((el) => {
|
|
986
|
-
const elOption = el.option();
|
|
987
|
-
return isNotNil(elOption) && optionComparer(elOption, option);
|
|
988
|
-
})), filter((index) => index !== -1), take(1), takeUntilDestroyed(this.#destroyRef))
|
|
989
|
-
.subscribe((selectedIndex) => this.setActiveItem(selectedIndex));
|
|
990
|
-
}
|
|
991
|
-
#bindClueChange(clueChange$) {
|
|
992
|
-
clueChange$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
993
|
-
this.#hasSearchChanged = true;
|
|
994
|
-
});
|
|
995
|
-
}
|
|
996
|
-
#bindActiveOptionIdChanged(activeOptionIdChanged$) {
|
|
997
|
-
const keyManager = this.#cdkKeyManager;
|
|
998
|
-
if (!keyManager) {
|
|
999
|
-
return;
|
|
1000
|
-
}
|
|
1001
|
-
keyManager.change
|
|
1002
|
-
.pipe(map(() => keyManager.activeItem?.idAttribute() ?? ''), takeUntilDestroyed(this.#destroyRef))
|
|
1003
|
-
.subscribe((activeDescendant) => activeOptionIdChanged$.emit(activeDescendant));
|
|
1004
|
-
}
|
|
1005
|
-
/**
|
|
1006
|
-
* Ensure always have the correct highlighted item:
|
|
1007
|
-
* - reset to null if no options
|
|
1008
|
-
* - set to first item if search has changed
|
|
1009
|
-
* - set to first item if no active item
|
|
1010
|
-
*/
|
|
1011
|
-
#bindOptionsChange({ options$ }) {
|
|
1012
|
-
const keyManager = this.#cdkKeyManager;
|
|
1013
|
-
if (!keyManager) {
|
|
1014
|
-
return;
|
|
1015
|
-
}
|
|
1016
|
-
options$
|
|
1017
|
-
.pipe(debounceTime(0), // Wait until QueryList is updated
|
|
1018
|
-
takeUntilDestroyed(this.#destroyRef))
|
|
1019
|
-
.subscribe(() => {
|
|
1020
|
-
if (this.#queryList().length === 0) {
|
|
1021
|
-
keyManager.setActiveItem(-1);
|
|
1022
|
-
}
|
|
1023
|
-
else if (this.#hasSearchChanged) {
|
|
1024
|
-
this.#hasSearchChanged = false;
|
|
1025
|
-
keyManager.setFirstItemActive();
|
|
1026
|
-
}
|
|
1027
|
-
else if (!keyManager.activeItem) {
|
|
1028
|
-
keyManager.setFirstItemActive();
|
|
1029
|
-
}
|
|
1030
|
-
});
|
|
1031
|
-
}
|
|
1032
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CoreSelectKeyManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1033
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CoreSelectKeyManager }); }
|
|
1034
|
-
}
|
|
1035
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CoreSelectKeyManager, decorators: [{
|
|
1036
|
-
type: Injectable
|
|
1037
|
-
}] });
|
|
1038
|
-
|
|
1039
1061
|
class LuCoreSelectPanelHeaderDirective {
|
|
1040
1062
|
constructor() {
|
|
1041
1063
|
this.templateRef = inject(TemplateRef);
|
|
@@ -1048,10 +1070,10 @@ class LuCoreSelectPanelHeaderDirective {
|
|
|
1048
1070
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
1049
1071
|
return true;
|
|
1050
1072
|
}
|
|
1051
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1052
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1073
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectPanelHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1074
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuCoreSelectPanelHeaderDirective, isStandalone: true, selector: "[luSelectPanelHeader]", inputs: { select: { classPropertyName: "select", publicName: "luSelectPanelHeader", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
1053
1075
|
}
|
|
1054
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectPanelHeaderDirective, decorators: [{
|
|
1055
1077
|
type: Directive,
|
|
1056
1078
|
args: [{
|
|
1057
1079
|
selector: '[luSelectPanelHeader]',
|
|
@@ -1061,7 +1083,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1061
1083
|
class LuSelectPanelRef {
|
|
1062
1084
|
constructor() {
|
|
1063
1085
|
this.closed = new EventEmitter();
|
|
1064
|
-
this.previousPage = new EventEmitter();
|
|
1065
1086
|
this.nextPage = new EventEmitter();
|
|
1066
1087
|
this.valueChanged = new EventEmitter();
|
|
1067
1088
|
this.clueChanged = new EventEmitter();
|
|
@@ -1071,7 +1092,6 @@ class LuSelectPanelRef {
|
|
|
1071
1092
|
this.closed.next();
|
|
1072
1093
|
this.closed.complete();
|
|
1073
1094
|
this.nextPage.complete();
|
|
1074
|
-
this.previousPage.complete();
|
|
1075
1095
|
this.valueChanged.complete();
|
|
1076
1096
|
this.clueChanged.emit('');
|
|
1077
1097
|
this.clueChanged.complete();
|
|
@@ -1083,16 +1103,18 @@ class LuSelectPanelRef {
|
|
|
1083
1103
|
* In order to avoid a blinking when we go from empty clue to a clue
|
|
1084
1104
|
* We need to delay the change of group displayer location by waiting for the options to be updated.
|
|
1085
1105
|
*/
|
|
1086
|
-
function getGroupTemplateLocation(hasGrouping
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1106
|
+
function getGroupTemplateLocation(hasGrouping, clue, searchable = true) {
|
|
1107
|
+
const hasClue = computed(() => !!clue(), /* @ts-ignore */
|
|
1108
|
+
...(ngDevMode ? [{ debugName: "hasClue" }] : /* istanbul ignore next */ []));
|
|
1109
|
+
return computed(() => {
|
|
1110
|
+
if (!hasGrouping()) {
|
|
1111
|
+
return 'none';
|
|
1090
1112
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
})
|
|
1113
|
+
if (!searchable) {
|
|
1114
|
+
return 'group-header';
|
|
1115
|
+
}
|
|
1116
|
+
return hasClue() ? 'option' : 'group-header';
|
|
1117
|
+
});
|
|
1096
1118
|
}
|
|
1097
1119
|
|
|
1098
1120
|
const Translations = {
|
|
@@ -1120,6 +1142,9 @@ const Translations = {
|
|
|
1120
1142
|
en: {
|
|
1121
1143
|
addOption: 'Add option',
|
|
1122
1144
|
},
|
|
1145
|
+
pl: {
|
|
1146
|
+
addOption: 'Dodaj opcję',
|
|
1147
|
+
},
|
|
1123
1148
|
};
|
|
1124
1149
|
|
|
1125
1150
|
const LU_CORE_SELECT_TRANSLATIONS = new InjectionToken('LuCoreSelectTranslations', {
|
|
@@ -1134,10 +1159,10 @@ class LuIsOptionSelectedPipe {
|
|
|
1134
1159
|
transform(option, comparer, selectedOptions) {
|
|
1135
1160
|
return this.#selectionStrategy.isSelected(option, selectedOptions, comparer);
|
|
1136
1161
|
}
|
|
1137
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1138
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
1162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuIsOptionSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1163
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: LuIsOptionSelectedPipe, isStandalone: true, name: "luIsOptionSelected" }); }
|
|
1139
1164
|
}
|
|
1140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuIsOptionSelectedPipe, decorators: [{
|
|
1141
1166
|
type: Pipe,
|
|
1142
1167
|
args: [{
|
|
1143
1168
|
name: 'luIsOptionSelected',
|