@lucca-front/ng 22.0.0-rc.2 → 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 +116 -78
- 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 +17 -8
- 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 +70 -24
- 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 +65 -41
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +355 -236
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core.mjs +86 -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 +91 -62
- package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +375 -161
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-department.mjs +31 -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 +16 -8
- package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dropdown.mjs +42 -41
- 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 +57 -45
- 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 +83 -52
- 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 +124 -71
- 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 +58 -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 +370 -154
- 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 +27 -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 +32 -26
- package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +247 -123
- 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 +14 -10
- 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 +160 -140
- 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 +23 -20
- package/fesm2022/lucca-front-ng-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +107 -35
- 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 +30 -23
- 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 +66 -50
- 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 +416 -80
- 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 +28 -23
- package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user.mjs +172 -113
- 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 +14 -8
- 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 +9 -3
- 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 +13 -1
- 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 +34 -15
- package/types/lucca-front-ng-core.d.ts +31 -8
- package/types/lucca-front-ng-data-table.d.ts +18 -3
- 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 +8 -1
- 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-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 +34 -17
- 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 +90 -22
- 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 +3 -0
- package/types/lucca-front-ng-numeric-badge.d.ts +9 -2
- package/types/lucca-front-ng-pagination.d.ts +8 -1
- package/types/lucca-front-ng-popover2.d.ts +23 -2
- 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-segmented-control.d.ts +4 -2
- package/types/lucca-front-ng-simple-select.d.ts +16 -17
- 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 +89 -8
- 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.d.ts +19 -5
- package/types/lucca-front-ng-vertical-navigation.d.ts +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Directive, InjectionToken, inject, ChangeDetectionStrategy, Component, TemplateRef, Pipe, ViewContainerRef, Injector, ElementRef, signal,
|
|
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
3
|
import { syncInputSignal, ɵeffectWithDeps as _effectWithDeps, isNotNil, intlInputOptions, isNil, PortalDirective } from '@lucca-front/ng/core';
|
|
4
4
|
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
5
|
-
import {
|
|
5
|
+
import { toObservable, takeUntilDestroyed, toSignal, outputFromObservable } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { FILTER_PILL_INPUT_COMPONENT, FILTER_PILL_HOST_COMPONENT } from '@lucca-front/ng/filter-pills';
|
|
7
|
-
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';
|
|
8
8
|
import { AsyncPipe } from '@angular/common';
|
|
9
9
|
import { LuTooltipTriggerDirective } from '@lucca-front/ng/tooltip';
|
|
10
10
|
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
@@ -18,10 +18,10 @@ class LuDisplayerDirective {
|
|
|
18
18
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
19
19
|
return true;
|
|
20
20
|
}
|
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
22
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
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 }); }
|
|
23
23
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuDisplayerDirective, decorators: [{
|
|
25
25
|
type: Directive,
|
|
26
26
|
args: [{
|
|
27
27
|
selector: '[luDisplayer]',
|
|
@@ -52,10 +52,10 @@ class LuSimpleSelectDefaultOptionComponent {
|
|
|
52
52
|
constructor() {
|
|
53
53
|
this.context = inject(LU_OPTION_CONTEXT);
|
|
54
54
|
}
|
|
55
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
56
|
-
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 }); }
|
|
57
57
|
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuSimpleSelectDefaultOptionComponent, decorators: [{
|
|
59
59
|
type: Component,
|
|
60
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" }]
|
|
61
61
|
}] });
|
|
@@ -66,10 +66,10 @@ class LuDisabledOptionDirective {
|
|
|
66
66
|
this.context = inject(LU_OPTION_CONTEXT);
|
|
67
67
|
syncInputSignal(this.isDisabled, (disabled) => this.context.isDisabled$.next(disabled));
|
|
68
68
|
}
|
|
69
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
70
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
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 }); }
|
|
71
71
|
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuDisabledOptionDirective, decorators: [{
|
|
73
73
|
type: Directive,
|
|
74
74
|
args: [{
|
|
75
75
|
selector: '[luDisabledOption]',
|
|
@@ -88,10 +88,10 @@ class LuOptionGroupDirective {
|
|
|
88
88
|
select.groupingSignal.set({ selector, content: this.content });
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
92
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
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 }); }
|
|
93
93
|
}
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionGroupDirective, decorators: [{
|
|
95
95
|
type: Directive,
|
|
96
96
|
args: [{
|
|
97
97
|
selector: '[luOptionGroup]',
|
|
@@ -128,10 +128,10 @@ class LuOptionGroupPipe {
|
|
|
128
128
|
transform(options, selector) {
|
|
129
129
|
return Array.isArray(options) ? generateGroups(options, selector) : generateGroups([options], selector)[0];
|
|
130
130
|
}
|
|
131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
132
|
-
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" }); }
|
|
133
133
|
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionGroupPipe, decorators: [{
|
|
135
135
|
type: Pipe,
|
|
136
136
|
args: [{
|
|
137
137
|
name: 'luOptionGroup',
|
|
@@ -143,9 +143,12 @@ function hasRenderableValue(value, showNull) {
|
|
|
143
143
|
}
|
|
144
144
|
class LuOptionOutletDirective {
|
|
145
145
|
constructor() {
|
|
146
|
-
this.luOptionOutlet = input(
|
|
147
|
-
|
|
148
|
-
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 */ []));
|
|
149
152
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
150
153
|
this.injector = inject(Injector);
|
|
151
154
|
this.optionContext = inject(LU_OPTION_CONTEXT);
|
|
@@ -190,10 +193,10 @@ class LuOptionOutletDirective {
|
|
|
190
193
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
191
194
|
return true;
|
|
192
195
|
}
|
|
193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
194
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
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 }); }
|
|
195
198
|
}
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionOutletDirective, decorators: [{
|
|
197
200
|
type: Directive,
|
|
198
201
|
args: [{
|
|
199
202
|
selector: '[luOptionOutlet]',
|
|
@@ -203,8 +206,118 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
203
206
|
|
|
204
207
|
const SELECT_PANEL_INSTANCE = new InjectionToken('CoreSelect:PanelInstance');
|
|
205
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
|
+
|
|
206
318
|
class CoreSelectPanelElement {
|
|
207
319
|
#panelRef;
|
|
320
|
+
#keyManager;
|
|
208
321
|
#selectRef;
|
|
209
322
|
get disabled() {
|
|
210
323
|
return this.disabledRef();
|
|
@@ -215,15 +328,23 @@ class CoreSelectPanelElement {
|
|
|
215
328
|
constructor() {
|
|
216
329
|
this.elementRef = inject(ElementRef);
|
|
217
330
|
this.#panelRef = inject(SELECT_PANEL_INSTANCE);
|
|
331
|
+
this.#keyManager = inject(CoreSelectKeyManager, { optional: true });
|
|
218
332
|
this.#selectRef = inject(ALuSelectInputComponent);
|
|
219
|
-
this.id = signal('',
|
|
220
|
-
|
|
221
|
-
this.
|
|
222
|
-
|
|
223
|
-
this.
|
|
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 */ []));
|
|
224
343
|
this.disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled' });
|
|
225
|
-
this.disabledRef = linkedSignal(() => this.disabledInput(),
|
|
226
|
-
|
|
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 */ []));
|
|
227
348
|
this.selected = output();
|
|
228
349
|
this.#panelRef.options.set([...this.#panelRef.options(), this]);
|
|
229
350
|
}
|
|
@@ -240,10 +361,16 @@ class CoreSelectPanelElement {
|
|
|
240
361
|
setInactiveStyles() {
|
|
241
362
|
this.isHighlighted.set(false);
|
|
242
363
|
}
|
|
243
|
-
|
|
244
|
-
|
|
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 }); }
|
|
245
372
|
}
|
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: CoreSelectPanelElement, decorators: [{
|
|
247
374
|
type: Directive,
|
|
248
375
|
args: [{
|
|
249
376
|
selector: '[luCoreSelectPanelElement]',
|
|
@@ -252,6 +379,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
252
379
|
'[attr.id]': 'idAttribute()',
|
|
253
380
|
'[attr.aria-selected]': 'isSelected()',
|
|
254
381
|
'[class.is-highlighted]': 'isHighlighted()',
|
|
382
|
+
'(mouseenter)': 'onMouseEnter()',
|
|
255
383
|
role: 'option',
|
|
256
384
|
},
|
|
257
385
|
}]
|
|
@@ -262,10 +390,10 @@ const SELECT_LABEL = new InjectionToken('LuSelectLabel');
|
|
|
262
390
|
const SELECT_LABEL_ID = new InjectionToken('LuSelectLabelId');
|
|
263
391
|
const CORE_SELECT_API_TOTAL_COUNT_PROVIDER = new InjectionToken('CoreSelectApiTotalCountProvider');
|
|
264
392
|
class ɵIsSelectedStrategy {
|
|
265
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
266
|
-
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() }); }
|
|
267
395
|
}
|
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ɵIsSelectedStrategy, decorators: [{
|
|
269
397
|
type: Injectable,
|
|
270
398
|
args: [{
|
|
271
399
|
providedIn: 'root',
|
|
@@ -299,32 +427,43 @@ const luOptionTranslations = Translations$1;
|
|
|
299
427
|
|
|
300
428
|
const MAGIC_OPTION_SCROLL_DELAY = 15;
|
|
301
429
|
class LuOptionComponent {
|
|
430
|
+
#panelRef;
|
|
302
431
|
get id() {
|
|
303
432
|
const groupPart = this.groupIndex() === undefined ? `` : `-group-${this.groupIndex()}`;
|
|
304
433
|
return `lu-select-${this.selectId}${groupPart}-option-${this.optionIndex()}`;
|
|
305
434
|
}
|
|
306
435
|
constructor() {
|
|
436
|
+
this.#panelRef = inject(SELECT_PANEL_INSTANCE);
|
|
307
437
|
this.selectableItem = inject(CoreSelectPanelElement);
|
|
308
|
-
this.intl = input(...intlInputOptions(LU_OPTION_TRANSLATIONS),
|
|
309
|
-
|
|
310
|
-
this.
|
|
311
|
-
|
|
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 */ []));
|
|
312
446
|
this.hasChildren = input(false, { ...(ngDevMode ? { debugName: "hasChildren" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
313
447
|
this.onlyParent = output();
|
|
314
448
|
this.onlyChildren = output();
|
|
315
|
-
this.groupIndex = input(
|
|
449
|
+
this.groupIndex = input(/* @ts-ignore */
|
|
450
|
+
...(ngDevMode ? [undefined, { debugName: "groupIndex" }] : /* istanbul ignore next */ []));
|
|
316
451
|
this.optionIndex = input.required({ ...(ngDevMode ? { debugName: "optionIndex" } : /* istanbul ignore next */ {}), transform: (value) => `${value}` });
|
|
317
|
-
this.scrollIntoViewOptions = input({},
|
|
318
|
-
|
|
319
|
-
this.
|
|
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 */ []));
|
|
320
458
|
this.cdr = inject(ChangeDetectorRef);
|
|
321
459
|
this.elementRef = inject(ElementRef);
|
|
322
460
|
this.selectId = inject(SELECT_ID);
|
|
323
|
-
_effectWithDeps([this.selectableItem.isHighlighted], (isHighlighted) => {
|
|
324
|
-
if (isHighlighted) {
|
|
325
|
-
setTimeout(() => {
|
|
461
|
+
_effectWithDeps([this.selectableItem.isHighlighted], (isHighlighted, onCleanup) => {
|
|
462
|
+
if (isHighlighted && !untracked(this.#panelRef.pointerNavigation)) {
|
|
463
|
+
const timeoutId = setTimeout(() => {
|
|
326
464
|
this.elementRef.nativeElement.scrollIntoView(this.scrollIntoViewOptions());
|
|
327
465
|
}, MAGIC_OPTION_SCROLL_DELAY);
|
|
466
|
+
onCleanup(() => clearTimeout(timeoutId));
|
|
328
467
|
}
|
|
329
468
|
});
|
|
330
469
|
_effectWithDeps([this.optionContext], (optionContext, onCleanup) => {
|
|
@@ -346,14 +485,14 @@ class LuOptionComponent {
|
|
|
346
485
|
$event.stopPropagation();
|
|
347
486
|
}
|
|
348
487
|
}
|
|
349
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
350
|
-
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: 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)}.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 }); }
|
|
351
490
|
}
|
|
352
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionComponent, decorators: [{
|
|
353
492
|
type: Component,
|
|
354
493
|
args: [{ selector: 'lu-select-option', host: {
|
|
355
494
|
class: 'optionItem',
|
|
356
|
-
}, 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)}.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"] }]
|
|
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"] }]
|
|
357
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 }] }] } });
|
|
358
497
|
|
|
359
498
|
class LuOptionDirective {
|
|
@@ -365,16 +504,49 @@ class LuOptionDirective {
|
|
|
365
504
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
366
505
|
return true;
|
|
367
506
|
}
|
|
368
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
369
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
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 }); }
|
|
370
509
|
}
|
|
371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuOptionDirective, decorators: [{
|
|
372
511
|
type: Directive,
|
|
373
512
|
args: [{
|
|
374
513
|
selector: '[luOption]',
|
|
375
514
|
}]
|
|
376
515
|
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { select: [{ type: i0.Input, args: [{ isSignal: true, alias: "luOptionSelect", required: false }] }] } });
|
|
377
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
|
+
}
|
|
549
|
+
|
|
378
550
|
const coreSelectDefaultOptionComparer = (option1, option2) => JSON.stringify(option1) === JSON.stringify(option2);
|
|
379
551
|
const coreSelectDefaultOptionKey = (option) => option;
|
|
380
552
|
class ALuSelectInputComponent {
|
|
@@ -435,6 +607,18 @@ class ALuSelectInputComponent {
|
|
|
435
607
|
this.lastEmittedClue = clue;
|
|
436
608
|
}
|
|
437
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
|
+
}
|
|
438
622
|
get panelRef() {
|
|
439
623
|
return this._panelRef;
|
|
440
624
|
}
|
|
@@ -450,57 +634,88 @@ class ALuSelectInputComponent {
|
|
|
450
634
|
this.panelClosed = output();
|
|
451
635
|
this.panelOpened = output();
|
|
452
636
|
this.highlightedOption = output();
|
|
453
|
-
this.inputElementRef = viewChild('inputElement',
|
|
637
|
+
this.inputElementRef = viewChild('inputElement', /* @ts-ignore */
|
|
638
|
+
...(ngDevMode ? [{ debugName: "inputElementRef" }] : /* istanbul ignore next */ []));
|
|
454
639
|
this.disabled$ = new BehaviorSubject(false);
|
|
455
640
|
this.filterPillDisabled = toSignal(this.disabled$, { initialValue: false });
|
|
456
|
-
this.prefix = input(null,
|
|
457
|
-
|
|
458
|
-
this.
|
|
459
|
-
|
|
460
|
-
this
|
|
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 */ []));
|
|
461
650
|
this.#defaultClearable = false;
|
|
462
|
-
this.computedAddOptionLabel = computed(() => this.addOptionLabelInput() ?? this.intl().addOption,
|
|
651
|
+
this.computedAddOptionLabel = computed(() => this.addOptionLabelInput() ?? this.intl().addOption, /* @ts-ignore */
|
|
652
|
+
...(ngDevMode ? [{ debugName: "computedAddOptionLabel" }] : /* istanbul ignore next */ []));
|
|
463
653
|
this.addOptionLabelInput = input(null, { ...(ngDevMode ? { debugName: "addOptionLabelInput" } : /* istanbul ignore next */ {}), alias: 'addOptionLabel' });
|
|
464
|
-
this.addOptionStrategy = input('never',
|
|
654
|
+
this.addOptionStrategy = input('never', /* @ts-ignore */
|
|
655
|
+
...(ngDevMode ? [{ debugName: "addOptionStrategy" }] : /* istanbul ignore next */ []));
|
|
465
656
|
this.isPanelOpen$ = new BehaviorSubject(false);
|
|
657
|
+
// TODO Might be temporary, check after merging signalize PR
|
|
658
|
+
this.panelOpenSignal = toSignal(this.isPanelOpen$);
|
|
466
659
|
this.activeDescendant$ = new BehaviorSubject('');
|
|
467
|
-
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 */ []));
|
|
468
663
|
this.loadingInput = input(false, { ...(ngDevMode ? { debugName: "loadingInput" } : /* istanbul ignore next */ {}), alias: 'loading' });
|
|
469
664
|
this.optionsInput = input(null, { ...(ngDevMode ? { debugName: "optionsInput" } : /* istanbul ignore next */ {}), alias: 'options' });
|
|
470
665
|
this.optionComparerInput = input(coreSelectDefaultOptionComparer, { ...(ngDevMode ? { debugName: "optionComparerInput" } : /* istanbul ignore next */ {}), alias: 'optionComparer' });
|
|
471
666
|
this.optionKeyInput = input(coreSelectDefaultOptionKey, { ...(ngDevMode ? { debugName: "optionKeyInput" } : /* istanbul ignore next */ {}), alias: 'optionKey' });
|
|
472
667
|
this.noClueIcon = input(false, { ...(ngDevMode ? { debugName: "noClueIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
473
|
-
this.inputTabindex = input(0,
|
|
668
|
+
this.inputTabindex = input(0, /* @ts-ignore */
|
|
669
|
+
...(ngDevMode ? [{ debugName: "inputTabindex" }] : /* istanbul ignore next */ []));
|
|
474
670
|
this.compact = input(false, { ...(ngDevMode ? { debugName: "compact" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
475
671
|
this.colorPicker = input(false, { ...(ngDevMode ? { debugName: "colorPicker" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
476
|
-
this.options = linkedSignal(() => this.optionsInput(),
|
|
477
|
-
|
|
478
|
-
this.
|
|
479
|
-
|
|
480
|
-
this.
|
|
481
|
-
|
|
482
|
-
this.
|
|
483
|
-
|
|
484
|
-
this.
|
|
485
|
-
|
|
486
|
-
this.
|
|
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 */ []));
|
|
487
694
|
this.clueChange$ = new Subject();
|
|
488
695
|
this.clueChange = outputFromObservable(this.clueChange$);
|
|
489
696
|
this.nextPage$ = new Subject();
|
|
490
697
|
this.nextPage = outputFromObservable(this.nextPage$);
|
|
491
|
-
this.previousPage = output();
|
|
492
698
|
this.addOption = output();
|
|
493
|
-
this.valueSignal = signal(null,
|
|
494
|
-
|
|
495
|
-
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 */ []));
|
|
496
705
|
this._value = null;
|
|
497
|
-
this.
|
|
498
|
-
|
|
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: [] });
|
|
499
714
|
this.clue = null;
|
|
500
715
|
// This is the clue stored after we selected an option to know if we should emit an empty clue on open or not
|
|
501
716
|
this.lastEmittedClue = '';
|
|
502
717
|
this.clue$ = defer(() => this.clueChange$.pipe(startWith(this.clue)));
|
|
503
|
-
this.shouldDisplayAddOption
|
|
718
|
+
this.shouldDisplayAddOption = toSignal(toObservable(this.addOptionStrategy).pipe(switchMap((strategy) => {
|
|
504
719
|
switch (strategy) {
|
|
505
720
|
case 'always':
|
|
506
721
|
return of(true);
|
|
@@ -511,24 +726,26 @@ class ALuSelectInputComponent {
|
|
|
511
726
|
case 'if-not-empty-clue':
|
|
512
727
|
return this.clue$.pipe(map((clue) => !!clue));
|
|
513
728
|
}
|
|
514
|
-
}));
|
|
729
|
+
})));
|
|
515
730
|
this.destroyed$ = new Subject();
|
|
731
|
+
this.injector = inject(Injector);
|
|
516
732
|
if (this.filterPillHost) {
|
|
517
733
|
this.filterPillHost.registerInput(this);
|
|
518
734
|
}
|
|
519
735
|
_effectWithDeps([this.options], (options) => {
|
|
520
736
|
if (isNotNil(options)) {
|
|
521
|
-
this.
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
}
|
|
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());
|
|
532
749
|
}
|
|
533
750
|
});
|
|
534
751
|
}
|
|
@@ -581,6 +798,12 @@ class ALuSelectInputComponent {
|
|
|
581
798
|
}
|
|
582
799
|
break;
|
|
583
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
|
+
}
|
|
584
807
|
// For any other key, forward it to the panel if it's open
|
|
585
808
|
if (this.isPanelOpen) {
|
|
586
809
|
this.panelRef?.handleKeyManagerEvent($event);
|
|
@@ -603,8 +826,6 @@ class ALuSelectInputComponent {
|
|
|
603
826
|
}
|
|
604
827
|
ngOnDestroy() {
|
|
605
828
|
this.closePanel();
|
|
606
|
-
this.destroyed$.next();
|
|
607
|
-
this.destroyed$.complete();
|
|
608
829
|
}
|
|
609
830
|
ngOnInit() {
|
|
610
831
|
if (this.labelElement) {
|
|
@@ -636,9 +857,10 @@ class ALuSelectInputComponent {
|
|
|
636
857
|
if (this.isPanelOpen) {
|
|
637
858
|
return;
|
|
638
859
|
}
|
|
860
|
+
const isSearchable = this.searchable;
|
|
639
861
|
this.isPanelOpen$.next(true);
|
|
640
862
|
this.panelOpened.emit();
|
|
641
|
-
if (
|
|
863
|
+
if (isSearchable) {
|
|
642
864
|
this.clueChanged(clue);
|
|
643
865
|
}
|
|
644
866
|
this._panelRef = this.buildPanelRef();
|
|
@@ -654,8 +876,7 @@ class ALuSelectInputComponent {
|
|
|
654
876
|
return;
|
|
655
877
|
}
|
|
656
878
|
this.panelRef.valueChanged.subscribe((value) => this.updateValue(value));
|
|
657
|
-
this
|
|
658
|
-
this.#pageChanged(this.panelRef.previousPage).subscribe(() => this.previousPage.emit());
|
|
879
|
+
this.panelRef.nextPage.subscribe(() => this.nextPage$.next());
|
|
659
880
|
this.panelRef.activeOptionIdChanged.subscribe((optionId) => {
|
|
660
881
|
this.activeDescendant$.next(optionId);
|
|
661
882
|
this.changeDetectorRef.markForCheck();
|
|
@@ -674,6 +895,7 @@ class ALuSelectInputComponent {
|
|
|
674
895
|
}
|
|
675
896
|
}
|
|
676
897
|
closePanel() {
|
|
898
|
+
this.dataSource().reset?.();
|
|
677
899
|
if (!this.isPanelOpen) {
|
|
678
900
|
return;
|
|
679
901
|
}
|
|
@@ -702,10 +924,6 @@ class ALuSelectInputComponent {
|
|
|
702
924
|
this.onChange?.(value);
|
|
703
925
|
this.onTouched?.();
|
|
704
926
|
}
|
|
705
|
-
// Ensure nextPage/previousPage does not emit too often
|
|
706
|
-
#pageChanged(pageEmitter) {
|
|
707
|
-
return this.options$.pipe(switchMap(() => pageEmitter.pipe(take(1))));
|
|
708
|
-
}
|
|
709
927
|
// Filter pill interface
|
|
710
928
|
clearFilterPillValue() {
|
|
711
929
|
this.clearValue();
|
|
@@ -728,10 +946,10 @@ class ALuSelectInputComponent {
|
|
|
728
946
|
onFilterPillClosed() {
|
|
729
947
|
this.isPanelOpen$.next(false);
|
|
730
948
|
}
|
|
731
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
732
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
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 }); }
|
|
733
951
|
}
|
|
734
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ALuSelectInputComponent, decorators: [{
|
|
735
953
|
type: Directive,
|
|
736
954
|
args: [{
|
|
737
955
|
host: {
|
|
@@ -745,7 +963,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
745
963
|
'(keydown)': 'onKeyDownNavigation($event)',
|
|
746
964
|
},
|
|
747
965
|
}]
|
|
748
|
-
}], 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"] }],
|
|
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"] }] } });
|
|
749
967
|
|
|
750
968
|
let selectId = 0;
|
|
751
969
|
function selectIdFactory() {
|
|
@@ -787,15 +1005,15 @@ class LuCoreSelectTotalCountDirective {
|
|
|
787
1005
|
this.totalCount = input.required({ ...(ngDevMode ? { debugName: "totalCount" } : /* istanbul ignore next */ {}), alias: 'totalCount' });
|
|
788
1006
|
this.totalCount$ = toObservable(this.totalCount);
|
|
789
1007
|
}
|
|
790
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
791
|
-
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: [
|
|
792
1010
|
{
|
|
793
1011
|
provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
|
|
794
1012
|
useExisting: forwardRef(() => LuCoreSelectTotalCountDirective),
|
|
795
1013
|
},
|
|
796
1014
|
], ngImport: i0 }); }
|
|
797
1015
|
}
|
|
798
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1016
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectTotalCountDirective, decorators: [{
|
|
799
1017
|
type: Directive,
|
|
800
1018
|
args: [{
|
|
801
1019
|
// The attribute is already prefixed with "lu-simple-select"
|
|
@@ -814,10 +1032,10 @@ class TreeDisplayPipe {
|
|
|
814
1032
|
transform(items, treeGenerator) {
|
|
815
1033
|
return treeGenerator.generateTrees(items);
|
|
816
1034
|
}
|
|
817
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
818
|
-
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" }); }
|
|
819
1037
|
}
|
|
820
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TreeDisplayPipe, decorators: [{
|
|
821
1039
|
type: Pipe,
|
|
822
1040
|
args: [{
|
|
823
1041
|
name: 'luTreeDisplay',
|
|
@@ -829,10 +1047,10 @@ class LuCoreSelectNoClueDirective {
|
|
|
829
1047
|
constructor() {
|
|
830
1048
|
inject(ALuSelectInputComponent).clueChange$.complete();
|
|
831
1049
|
}
|
|
832
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
833
|
-
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 }); }
|
|
834
1052
|
}
|
|
835
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1053
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectNoClueDirective, decorators: [{
|
|
836
1054
|
type: Directive,
|
|
837
1055
|
args: [{
|
|
838
1056
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -840,108 +1058,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
840
1058
|
}]
|
|
841
1059
|
}], ctorParameters: () => [] });
|
|
842
1060
|
|
|
843
|
-
class CoreSelectKeyManager {
|
|
844
|
-
#destroyRef = inject(DestroyRef);
|
|
845
|
-
#cdkKeyManager;
|
|
846
|
-
#hasSearchChanged = false;
|
|
847
|
-
#options;
|
|
848
|
-
#injector = inject(Injector);
|
|
849
|
-
// eslint-disable-next-line @angular-eslint/prefer-signals
|
|
850
|
-
#queryList;
|
|
851
|
-
#queryList$;
|
|
852
|
-
init(options) {
|
|
853
|
-
this.#options = options;
|
|
854
|
-
this.#queryList = computed(() => {
|
|
855
|
-
return [...options.queryList()].sort((a, b) => {
|
|
856
|
-
const comparison = a.elementRef.nativeElement.compareDocumentPosition(b.elementRef.nativeElement);
|
|
857
|
-
if (comparison & Node.DOCUMENT_POSITION_FOLLOWING) {
|
|
858
|
-
return -1;
|
|
859
|
-
}
|
|
860
|
-
if (comparison & Node.DOCUMENT_POSITION_PRECEDING) {
|
|
861
|
-
return 1;
|
|
862
|
-
}
|
|
863
|
-
return 0;
|
|
864
|
-
});
|
|
865
|
-
}, ...(ngDevMode ? [{ debugName: "#queryList" }] : /* istanbul ignore next */ []));
|
|
866
|
-
this.#queryList$ = toObservable(this.#queryList, { injector: this.#injector });
|
|
867
|
-
this.#cdkKeyManager = new ActiveDescendantKeyManager(this.#queryList, this.#injector).withHomeAndEnd();
|
|
868
|
-
this.#bindClueChange(options.clueChange$);
|
|
869
|
-
this.#bindOptionsChange(options);
|
|
870
|
-
this.#bindActiveOptionIdChanged(options.activeOptionIdChanged$);
|
|
871
|
-
this.#cdkKeyManager.setFirstItemActive();
|
|
872
|
-
}
|
|
873
|
-
onKeydown(event) {
|
|
874
|
-
this.#cdkKeyManager?.onKeydown(event);
|
|
875
|
-
}
|
|
876
|
-
get activeItem() {
|
|
877
|
-
return this.#cdkKeyManager?.activeItem ?? undefined;
|
|
878
|
-
}
|
|
879
|
-
get activeItemIndex() {
|
|
880
|
-
return this.#cdkKeyManager?.activeItemIndex ?? -1;
|
|
881
|
-
}
|
|
882
|
-
setActiveItem(index) {
|
|
883
|
-
this.#cdkKeyManager?.setActiveItem(index);
|
|
884
|
-
}
|
|
885
|
-
highlightOption(option) {
|
|
886
|
-
if (!this.#options) {
|
|
887
|
-
return;
|
|
888
|
-
}
|
|
889
|
-
const { optionComparer } = this.#options;
|
|
890
|
-
this.#queryList$
|
|
891
|
-
.pipe(observeOn(asyncScheduler), map((options) => options.findIndex((el) => {
|
|
892
|
-
const elOption = el.option();
|
|
893
|
-
return isNotNil(elOption) && optionComparer(elOption, option);
|
|
894
|
-
})), filter((index) => index !== -1), take(1), takeUntilDestroyed(this.#destroyRef))
|
|
895
|
-
.subscribe((selectedIndex) => this.setActiveItem(selectedIndex));
|
|
896
|
-
}
|
|
897
|
-
#bindClueChange(clueChange$) {
|
|
898
|
-
clueChange$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
899
|
-
this.#hasSearchChanged = true;
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
#bindActiveOptionIdChanged(activeOptionIdChanged$) {
|
|
903
|
-
const keyManager = this.#cdkKeyManager;
|
|
904
|
-
if (!keyManager) {
|
|
905
|
-
return;
|
|
906
|
-
}
|
|
907
|
-
keyManager.change
|
|
908
|
-
.pipe(map(() => keyManager.activeItem?.idAttribute() ?? ''), takeUntilDestroyed(this.#destroyRef))
|
|
909
|
-
.subscribe((activeDescendant) => activeOptionIdChanged$.emit(activeDescendant));
|
|
910
|
-
}
|
|
911
|
-
/**
|
|
912
|
-
* Ensure always have the correct highlighted item:
|
|
913
|
-
* - reset to null if no options
|
|
914
|
-
* - set to first item if search has changed
|
|
915
|
-
* - set to first item if no active item
|
|
916
|
-
*/
|
|
917
|
-
#bindOptionsChange({ options$ }) {
|
|
918
|
-
const keyManager = this.#cdkKeyManager;
|
|
919
|
-
if (!keyManager) {
|
|
920
|
-
return;
|
|
921
|
-
}
|
|
922
|
-
options$
|
|
923
|
-
.pipe(debounceTime(0), // Wait until QueryList is updated
|
|
924
|
-
takeUntilDestroyed(this.#destroyRef))
|
|
925
|
-
.subscribe(() => {
|
|
926
|
-
if (this.#queryList().length === 0) {
|
|
927
|
-
keyManager.setActiveItem(-1);
|
|
928
|
-
}
|
|
929
|
-
else if (this.#hasSearchChanged) {
|
|
930
|
-
this.#hasSearchChanged = false;
|
|
931
|
-
keyManager.setFirstItemActive();
|
|
932
|
-
}
|
|
933
|
-
else if (!keyManager.activeItem) {
|
|
934
|
-
keyManager.setFirstItemActive();
|
|
935
|
-
}
|
|
936
|
-
});
|
|
937
|
-
}
|
|
938
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CoreSelectKeyManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
939
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CoreSelectKeyManager }); }
|
|
940
|
-
}
|
|
941
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CoreSelectKeyManager, decorators: [{
|
|
942
|
-
type: Injectable
|
|
943
|
-
}] });
|
|
944
|
-
|
|
945
1061
|
class LuCoreSelectPanelHeaderDirective {
|
|
946
1062
|
constructor() {
|
|
947
1063
|
this.templateRef = inject(TemplateRef);
|
|
@@ -954,10 +1070,10 @@ class LuCoreSelectPanelHeaderDirective {
|
|
|
954
1070
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
955
1071
|
return true;
|
|
956
1072
|
}
|
|
957
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
958
|
-
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 }); }
|
|
959
1075
|
}
|
|
960
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectPanelHeaderDirective, decorators: [{
|
|
961
1077
|
type: Directive,
|
|
962
1078
|
args: [{
|
|
963
1079
|
selector: '[luSelectPanelHeader]',
|
|
@@ -967,7 +1083,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
967
1083
|
class LuSelectPanelRef {
|
|
968
1084
|
constructor() {
|
|
969
1085
|
this.closed = new EventEmitter();
|
|
970
|
-
this.previousPage = new EventEmitter();
|
|
971
1086
|
this.nextPage = new EventEmitter();
|
|
972
1087
|
this.valueChanged = new EventEmitter();
|
|
973
1088
|
this.clueChanged = new EventEmitter();
|
|
@@ -977,7 +1092,6 @@ class LuSelectPanelRef {
|
|
|
977
1092
|
this.closed.next();
|
|
978
1093
|
this.closed.complete();
|
|
979
1094
|
this.nextPage.complete();
|
|
980
|
-
this.previousPage.complete();
|
|
981
1095
|
this.valueChanged.complete();
|
|
982
1096
|
this.clueChanged.emit('');
|
|
983
1097
|
this.clueChanged.complete();
|
|
@@ -989,16 +1103,18 @@ class LuSelectPanelRef {
|
|
|
989
1103
|
* In order to avoid a blinking when we go from empty clue to a clue
|
|
990
1104
|
* We need to delay the change of group displayer location by waiting for the options to be updated.
|
|
991
1105
|
*/
|
|
992
|
-
function getGroupTemplateLocation(hasGrouping
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
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';
|
|
996
1112
|
}
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
})
|
|
1113
|
+
if (!searchable) {
|
|
1114
|
+
return 'group-header';
|
|
1115
|
+
}
|
|
1116
|
+
return hasClue() ? 'option' : 'group-header';
|
|
1117
|
+
});
|
|
1002
1118
|
}
|
|
1003
1119
|
|
|
1004
1120
|
const Translations = {
|
|
@@ -1026,6 +1142,9 @@ const Translations = {
|
|
|
1026
1142
|
en: {
|
|
1027
1143
|
addOption: 'Add option',
|
|
1028
1144
|
},
|
|
1145
|
+
pl: {
|
|
1146
|
+
addOption: 'Dodaj opcję',
|
|
1147
|
+
},
|
|
1029
1148
|
};
|
|
1030
1149
|
|
|
1031
1150
|
const LU_CORE_SELECT_TRANSLATIONS = new InjectionToken('LuCoreSelectTranslations', {
|
|
@@ -1040,10 +1159,10 @@ class LuIsOptionSelectedPipe {
|
|
|
1040
1159
|
transform(option, comparer, selectedOptions) {
|
|
1041
1160
|
return this.#selectionStrategy.isSelected(option, selectedOptions, comparer);
|
|
1042
1161
|
}
|
|
1043
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1044
|
-
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" }); }
|
|
1045
1164
|
}
|
|
1046
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuIsOptionSelectedPipe, decorators: [{
|
|
1047
1166
|
type: Pipe,
|
|
1048
1167
|
args: [{
|
|
1049
1168
|
name: 'luIsOptionSelected',
|