@siemens/element-ng 49.16.0 → 51.0.0-rc.10
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/README.md +1 -1
- package/fesm2022/siemens-element-ng-about.mjs +41 -25
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +59 -41
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +83 -53
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +143 -148
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +180 -188
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +34 -28
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +27 -22
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +34 -24
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-badge.mjs +9 -8
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +17 -14
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +21 -17
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +72 -47
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-carousel.mjs +58 -34
- package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +323 -215
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +39 -25
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +44 -34
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +58 -37
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +22 -22
- package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-connection-strength.mjs +14 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +37 -28
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +19 -14
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +337 -223
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +12 -15
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +126 -76
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +393 -251
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +22 -17
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +15 -12
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +105 -91
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +33 -25
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +274 -165
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-footer.mjs +12 -10
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +361 -116
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly-legacy.mjs +99 -0
- package/fesm2022/siemens-element-ng-formly-legacy.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-formly.mjs +224 -318
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +40 -30
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-help-button.mjs +6 -6
- package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +56 -57
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +17 -11
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +19 -14
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +19 -15
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +121 -75
- package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +16 -12
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-link.mjs +31 -21
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +132 -66
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +51 -64
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-localization.mjs +14 -12
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +116 -51
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-maplibre.mjs +401 -0
- package/fesm2022/siemens-element-ng-maplibre.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-directives-tabs.mjs +70 -0
- package/fesm2022/siemens-element-ng-markdown-directives-tabs.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-citations.mjs +215 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-citations.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-katex.mjs +76 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-katex.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-mermaid.mjs +86 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-mermaid.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-hightlighter-highlightjs.mjs +130 -0
- package/fesm2022/siemens-element-ng-markdown-hightlighter-highlightjs.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown.mjs +800 -0
- package/fesm2022/siemens-element-ng-markdown.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-menu.mjs +71 -57
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +14 -11
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +251 -206
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +123 -86
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +72 -45
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +19 -11
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +41 -29
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +31 -20
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-strength.mjs +33 -24
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +19 -14
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +144 -139
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +85 -52
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +56 -41
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover-legacy.mjs +43 -28
- package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +35 -27
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-progressbar.mjs +23 -16
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +32 -43
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-result-details-list.mjs +12 -10
- package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +38 -37
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +265 -170
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs +4 -4
- package/fesm2022/siemens-element-ng-shadow-root.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-side-panel.mjs +181 -104
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +21 -24
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +45 -30
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-source-chip.mjs +79 -0
- package/fesm2022/siemens-element-ng-source-chip.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-split.mjs +290 -306
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +66 -52
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-counter.mjs +15 -11
- package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +26 -16
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +25 -16
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +27 -17
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-system-banner.mjs +13 -10
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +20 -17
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +156 -131
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +29 -6
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +62 -42
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +59 -40
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +108 -82
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +36 -19
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs +0 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +113 -84
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +69 -49
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +95 -54
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/formly-legacy/package.json +4 -0
- package/maplibre/package.json +4 -0
- package/maplibre/styles/_index.scss +1 -0
- package/maplibre/styles/maplibre-gl.scss +724 -0
- package/markdown/directives/tabs/package.json +4 -0
- package/markdown/extensions/citations/package.json +4 -0
- package/markdown/extensions/katex/package.json +4 -0
- package/markdown/extensions/mermaid/package.json +4 -0
- package/markdown/hightlighter/highlightjs/package.json +4 -0
- package/markdown/package.json +4 -0
- package/package.json +96 -25
- package/schematics/collection.json +5 -0
- package/schematics/{migrations/icon-path-migration → migrate-tabs-legacy}/index.js +1 -1
- package/schematics/migrate-tabs-legacy/migrate-tabs-legacy-rule.js +675 -0
- package/schematics/migrate-tabs-legacy/schema.json +14 -0
- package/schematics/migration.json +4 -4
- package/schematics/migrations/data/class-member-replacement.js +1 -19
- package/schematics/migrations/data/component-property-names.js +1 -25
- package/schematics/migrations/data/component-property-to-child.js +11 -0
- package/schematics/migrations/data/css-custom-properties.js +224 -0
- package/schematics/migrations/data/element-class-changes.js +116 -18
- package/schematics/migrations/data/element-migration-data.js +6 -0
- package/schematics/migrations/data/element-selectors.js +1 -9
- package/schematics/migrations/data/index.js +0 -4
- package/schematics/migrations/data/migration-test-data.js +49 -6
- package/schematics/migrations/data/provider-function-removals.js +7 -0
- package/schematics/migrations/data/symbol-removals.js +17 -7
- package/schematics/migrations/data/symbol-renaming.js +3 -44
- package/schematics/migrations/element-migration/element-migration.js +6 -6
- package/schematics/migrations/utilities/component-property-to-child.migration.js +73 -0
- package/schematics/migrations/utilities/css-custom-property.migration.js +51 -0
- package/schematics/migrations/utilities/element-class-change.migration.js +10 -5
- package/schematics/migrations/utilities/import-removal.js +39 -0
- package/schematics/migrations/utilities/index.js +4 -0
- package/schematics/migrations/utilities/provider-function-removal.migration.js +116 -0
- package/schematics/ng-update/index.js +1 -1
- package/schematics/ng-update/migrate-content-formatter.js +288 -0
- package/schematics/ng-update/migrate-list-details-units.js +86 -0
- package/schematics/ng-update/migrate-main-detail-units.js +89 -0
- package/schematics/ng-update/migrate-markdown-renderer.js +106 -0
- package/schematics/ng-update/migrate-spacers.js +32 -0
- package/schematics/ng-update/migrate-split-collapse.js +276 -0
- package/schematics/ng-update/migrate-split-scale.js +524 -0
- package/schematics/ng-update/migrate-split-sizes.js +107 -0
- package/schematics/ng-update/migrate-to-v51.js +35 -0
- package/schematics/utils/index.js +1 -0
- package/schematics/utils/template-edit-utils.js +35 -0
- package/schematics/utils/template-utils.js +31 -45
- package/source-chip/package.json +4 -0
- package/template-i18n.json +78 -47
- package/types/siemens-element-ng-application-header.d.ts +7 -33
- package/types/siemens-element-ng-avatar.d.ts +1 -1
- package/types/siemens-element-ng-breadcrumb.d.ts +1 -1
- package/types/siemens-element-ng-chat-messages.d.ts +118 -70
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-content-action-bar.d.ts +1 -1
- package/types/siemens-element-ng-dashboard.d.ts +2 -2
- package/types/siemens-element-ng-datatable.d.ts +5 -56
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +8 -15
- package/types/siemens-element-ng-electron-titlebar.d.ts +1 -1
- package/types/siemens-element-ng-file-uploader.d.ts +13 -31
- package/types/siemens-element-ng-filter-bar.d.ts +1 -1
- package/types/siemens-element-ng-filtered-search.d.ts +4 -4
- package/types/siemens-element-ng-form.d.ts +183 -44
- package/types/siemens-element-ng-formly-legacy.d.ts +40 -0
- package/types/siemens-element-ng-formly.d.ts +34 -167
- package/types/siemens-element-ng-icon.d.ts +2 -19
- package/types/siemens-element-ng-landing-page.d.ts +2 -2
- package/types/siemens-element-ng-list-details.d.ts +25 -3
- package/types/siemens-element-ng-loading-spinner.d.ts +11 -17
- package/types/siemens-element-ng-main-detail-container.d.ts +23 -3
- package/types/siemens-element-ng-maplibre.d.ts +190 -0
- package/types/siemens-element-ng-markdown-directives-tabs.d.ts +10 -0
- package/types/siemens-element-ng-markdown-extensions-citations.d.ts +11 -0
- package/types/siemens-element-ng-markdown-extensions-katex.d.ts +19 -0
- package/types/siemens-element-ng-markdown-extensions-mermaid.d.ts +11 -0
- package/types/siemens-element-ng-markdown-hightlighter-highlightjs.d.ts +48 -0
- package/types/siemens-element-ng-markdown.d.ts +367 -0
- package/types/siemens-element-ng-menu.d.ts +2 -0
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +87 -39
- package/types/siemens-element-ng-navbar-vertical.d.ts +1 -1
- package/types/siemens-element-ng-navbar.d.ts +3 -3
- package/types/siemens-element-ng-notification-item.d.ts +12 -0
- package/types/siemens-element-ng-phone-number.d.ts +28 -10
- package/types/siemens-element-ng-photo-upload.d.ts +4 -4
- package/types/siemens-element-ng-resize-observer.d.ts +0 -17
- package/types/siemens-element-ng-search-bar.d.ts +2 -9
- package/types/siemens-element-ng-select.d.ts +32 -5
- package/types/siemens-element-ng-side-panel.d.ts +25 -11
- package/types/siemens-element-ng-source-chip.d.ts +53 -0
- package/types/siemens-element-ng-split.d.ts +101 -78
- package/types/siemens-element-ng-status-bar.d.ts +5 -13
- package/types/siemens-element-ng-status-counter.d.ts +1 -1
- package/types/siemens-element-ng-system-banner.d.ts +2 -2
- package/types/siemens-element-ng-tabs.d.ts +1 -2
- package/types/siemens-element-ng-theme.d.ts +12 -2
- package/types/siemens-element-ng-threshold.d.ts +1 -1
- package/types/siemens-element-ng-toast-notification.d.ts +0 -1
- package/types/siemens-element-ng-tooltip.d.ts +7 -7
- package/types/siemens-element-ng-translate.d.ts +35 -5
- package/types/siemens-element-ng-tree-view.d.ts +3 -0
- package/types/siemens-element-ng-wizard.d.ts +18 -3
- package/fesm2022/siemens-element-ng-icon-status.mjs +0 -46
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +0 -263
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-sort-bar.mjs +0 -99
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +0 -1
- package/icon-status/package.json +0 -4
- package/markdown-renderer/package.json +0 -4
- package/schematics/migrations/icon-path-migration/icon-path-migration.js +0 -95
- package/schematics/ng-update/migrate-to-v49.js +0 -21
- package/schematics/vitest-setup.js +0 -5
- package/sort-bar/package.json +0 -4
- package/types/siemens-element-ng-icon-status.d.ts +0 -25
- package/types/siemens-element-ng-markdown-renderer.d.ts +0 -36
- package/types/siemens-element-ng-sort-bar.d.ts +0 -59
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, model, output, viewChild, computed,
|
|
2
|
+
import { input, model, output, viewChild, computed, Component, signal, Directive, inject, LOCALE_ID, DestroyRef, untracked, Injector, afterNextRender, booleanAttribute, ElementRef, viewChildren, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { elementCancel, elementSearch } from '@siemens/element-icons';
|
|
5
5
|
import { defaultConnectedOverlayScrollStrategyFactory, isRTL } from '@siemens/element-ng/common';
|
|
@@ -56,33 +56,47 @@ const getISODateString = (date, format, locale) => {
|
|
|
56
56
|
class SiFilteredSearchInputComponent {
|
|
57
57
|
static criterionRegex = /(.+?):(.*)$/;
|
|
58
58
|
/** Supplies the criterion definitions shown in the typeahead. */
|
|
59
|
-
dataSource = input.required(
|
|
59
|
+
dataSource = input.required(/* @ts-ignore */
|
|
60
|
+
...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
60
61
|
/** Limits the number of criterion options displayed in the typeahead. */
|
|
61
|
-
typeaheadOptionsLimit = input.required(
|
|
62
|
+
typeaheadOptionsLimit = input.required(/* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [{ debugName: "typeaheadOptionsLimit" }] : /* istanbul ignore next */ []));
|
|
62
64
|
/** Sets the number of options visible before the typeahead scrolls. */
|
|
63
|
-
optionsInScrollableView = input.required(
|
|
65
|
+
optionsInScrollableView = input.required(/* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "optionsInScrollableView" }] : /* istanbul ignore next */ []));
|
|
64
67
|
/** Whether the search input is disabled. */
|
|
65
|
-
disabled = input.required(
|
|
68
|
+
disabled = input.required(/* @ts-ignore */
|
|
69
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
66
70
|
/** Placeholder text shown when the search input is empty. */
|
|
67
|
-
placeholder = input.required(
|
|
71
|
+
placeholder = input.required(/* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
68
73
|
/** Accessible label for the search input. */
|
|
69
|
-
searchLabel = input.required(
|
|
74
|
+
searchLabel = input.required(/* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "searchLabel" }] : /* istanbul ignore next */ []));
|
|
70
76
|
/** Factory for the CDK scroll strategy used by the criterion typeahead overlay. */
|
|
71
|
-
scrollStrategyFactory = input.required(
|
|
77
|
+
scrollStrategyFactory = input.required(/* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "scrollStrategyFactory" }] : /* istanbul ignore next */ []));
|
|
72
79
|
/** Current search text. Supports two-way binding through `searchValueChange`. */
|
|
73
|
-
searchValue = model.required(
|
|
80
|
+
searchValue = model.required(/* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "searchValue" }] : /* istanbul ignore next */ []));
|
|
74
82
|
/** Whether the current criterion accepts free-text values. */
|
|
75
|
-
freeTextCriterion = input.required(
|
|
83
|
+
freeTextCriterion = input.required(/* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "freeTextCriterion" }] : /* istanbul ignore next */ []));
|
|
76
85
|
/** Whether the configured maximum number of criteria has been reached. */
|
|
77
|
-
maxCriteriaReached = input.required(
|
|
86
|
+
maxCriteriaReached = input.required(/* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [{ debugName: "maxCriteriaReached" }] : /* istanbul ignore next */ []));
|
|
78
88
|
/** Whether users can create a free-text criterion. */
|
|
79
|
-
allowFreeText = input.required(
|
|
89
|
+
allowFreeText = input.required(/* @ts-ignore */
|
|
90
|
+
...(ngDevMode ? [{ debugName: "allowFreeText" }] : /* istanbul ignore next */ []));
|
|
80
91
|
/** Label for the typeahead option that creates a free-text criterion. */
|
|
81
|
-
searchForFreeTextLabel = input.required(
|
|
92
|
+
searchForFreeTextLabel = input.required(/* @ts-ignore */
|
|
93
|
+
...(ngDevMode ? [{ debugName: "searchForFreeTextLabel" }] : /* istanbul ignore next */ []));
|
|
82
94
|
/** Whether typing a colon or semicolon must not select a criterion. */
|
|
83
|
-
disableSelectionByColonAndSemicolon = input.required(
|
|
95
|
+
disableSelectionByColonAndSemicolon = input.required(/* @ts-ignore */
|
|
96
|
+
...(ngDevMode ? [{ debugName: "disableSelectionByColonAndSemicolon" }] : /* istanbul ignore next */ []));
|
|
84
97
|
/** Whether the input only permits selecting values from the typeahead. */
|
|
85
|
-
onlySelectValue = input.required(
|
|
98
|
+
onlySelectValue = input.required(/* @ts-ignore */
|
|
99
|
+
...(ngDevMode ? [{ debugName: "onlySelectValue" }] : /* istanbul ignore next */ []));
|
|
86
100
|
/** Emits the selected criterion and an optional value typed with it. */
|
|
87
101
|
createCriterion = output();
|
|
88
102
|
/** Emits a criterion name and optional value parsed from the input text. */
|
|
@@ -95,15 +109,18 @@ class SiFilteredSearchInputComponent {
|
|
|
95
109
|
inputFocus = output();
|
|
96
110
|
/** Emits when Enter is pressed in the search input. */
|
|
97
111
|
enterSubmit = output();
|
|
98
|
-
inputElement = viewChild.required('freeTextInputElement'
|
|
112
|
+
inputElement = viewChild.required('freeTextInputElement', /* @ts-ignore */
|
|
113
|
+
...(ngDevMode ? [{ debugName: "inputElement" }] : /* istanbul ignore next */ []));
|
|
99
114
|
/** Public method to focus the input element */
|
|
100
115
|
focus() {
|
|
101
116
|
this.inputElement().nativeElement.focus();
|
|
102
117
|
}
|
|
103
118
|
typeaheadCreateOption = computed(() => this.freeTextCriterion() && !this.maxCriteriaReached() && this.allowFreeText()
|
|
104
119
|
? this.searchForFreeTextLabel()
|
|
105
|
-
: undefined,
|
|
106
|
-
|
|
120
|
+
: undefined, /* @ts-ignore */
|
|
121
|
+
...(ngDevMode ? [{ debugName: "typeaheadCreateOption" }] : /* istanbul ignore next */ []));
|
|
122
|
+
typeaheadScrollStrategy = computed(() => this.scrollStrategyFactory()(), /* @ts-ignore */
|
|
123
|
+
...(ngDevMode ? [{ debugName: "typeaheadScrollStrategy" }] : /* istanbul ignore next */ []));
|
|
107
124
|
freeTextBackspaceHandler(event) {
|
|
108
125
|
if (!event.target.value) {
|
|
109
126
|
this.backspaceOverflow.emit();
|
|
@@ -140,12 +157,12 @@ class SiFilteredSearchInputComponent {
|
|
|
140
157
|
this.createFreeTextPill.emit(query);
|
|
141
158
|
this.searchValue.set('');
|
|
142
159
|
}
|
|
143
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
144
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
161
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiFilteredSearchInputComponent, isStandalone: true, selector: "si-filtered-search-input", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, typeaheadOptionsLimit: { classPropertyName: "typeaheadOptionsLimit", publicName: "typeaheadOptionsLimit", isSignal: true, isRequired: true, transformFunction: null }, optionsInScrollableView: { classPropertyName: "optionsInScrollableView", publicName: "optionsInScrollableView", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: true, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: true, transformFunction: null }, scrollStrategyFactory: { classPropertyName: "scrollStrategyFactory", publicName: "scrollStrategyFactory", isSignal: true, isRequired: true, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: true, transformFunction: null }, freeTextCriterion: { classPropertyName: "freeTextCriterion", publicName: "freeTextCriterion", isSignal: true, isRequired: true, transformFunction: null }, maxCriteriaReached: { classPropertyName: "maxCriteriaReached", publicName: "maxCriteriaReached", isSignal: true, isRequired: true, transformFunction: null }, allowFreeText: { classPropertyName: "allowFreeText", publicName: "allowFreeText", isSignal: true, isRequired: true, transformFunction: null }, searchForFreeTextLabel: { classPropertyName: "searchForFreeTextLabel", publicName: "searchForFreeTextLabel", isSignal: true, isRequired: true, transformFunction: null }, disableSelectionByColonAndSemicolon: { classPropertyName: "disableSelectionByColonAndSemicolon", publicName: "disableSelectionByColonAndSemicolon", isSignal: true, isRequired: true, transformFunction: null }, onlySelectValue: { classPropertyName: "onlySelectValue", publicName: "onlySelectValue", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { searchValue: "searchValueChange", createCriterion: "createCriterion", createCriterionByName: "createCriterionByName", backspaceOverflow: "backspaceOverflow", createFreeTextPill: "createFreeTextPill", inputFocus: "inputFocus", enterSubmit: "enterSubmit" }, host: { classAttribute: "w-100" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["freeTextInputElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<input\n #freeTextInputElement\n type=\"text\"\n class=\"value-input ps-2 me-2 w-100\"\n typeaheadOptionField=\"translatedLabel\"\n typeaheadClearValueOnSelect\n [siTypeahead]=\"dataSource()\"\n [typeaheadScrollStrategy]=\"typeaheadScrollStrategy()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"typeaheadOptionsLimit()\"\n [typeaheadScrollable]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [typeaheadAutoSelectIndex]=\"searchValue() ? 0 : -1\"\n [typeaheadCreateOption]=\"typeaheadCreateOption()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [value]=\"searchValue()\"\n (focus)=\"inputFocus.emit()\"\n (input)=\"freeTextInputHandler($event)\"\n (blur)=\"freeTextBlurHandler()\"\n (keydown.backspace)=\"freeTextBackspaceHandler($event)\"\n (keydown.enter)=\"enterSubmit.emit()\"\n (typeaheadOnSelect)=\"typeaheadOnSelectCriterionHandler($event.option)\"\n (typeaheadOnCreateOption)=\"createFreeTextPillHandler($event)\"\n/>\n", styles: ["input{background:transparent;border:0;padding-block:0}input:focus{min-inline-size:20ch}input:hover::placeholder{opacity:1}:host-context(si-filtered-search-value + :host) input::placeholder{color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: SiTypeaheadDirective, selector: "[siTypeahead]", inputs: ["siTypeahead", "typeaheadProcess", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadOptionsLimit", "typeaheadScrollableAdditionalHeight", "typeaheadAutoSelectIndex", "typeaheadCloseOnEsc", "typeaheadClearValueOnSelect", "typeaheadWaitMs", "typeaheadMinLength", "typeaheadOptionField", "typeaheadMultiSelect", "typeaheadTokenize", "typeaheadMatchAllTokens", "typeaheadItemTemplate", "typeaheadSkipSortingMatches", "typeaheadAutocompleteListLabel", "typeaheadFullWidth", "typeaheadScrollStrategy", "typeaheadCreateOption"], outputs: ["typeaheadOnInput", "typeaheadOnSelect", "typeaheadOnFullMatch", "typeaheadOpenChange", "typeaheadOnCreateOption"], exportAs: ["si-typeahead"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
145
162
|
}
|
|
146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchInputComponent, decorators: [{
|
|
147
164
|
type: Component,
|
|
148
|
-
args: [{ selector: 'si-filtered-search-input', imports: [FormsModule, SiTypeaheadDirective, SiTranslatePipe],
|
|
165
|
+
args: [{ selector: 'si-filtered-search-input', imports: [FormsModule, SiTypeaheadDirective, SiTranslatePipe], host: {
|
|
149
166
|
class: 'w-100'
|
|
150
167
|
}, template: "<input\n #freeTextInputElement\n type=\"text\"\n class=\"value-input ps-2 me-2 w-100\"\n typeaheadOptionField=\"translatedLabel\"\n typeaheadClearValueOnSelect\n [siTypeahead]=\"dataSource()\"\n [typeaheadScrollStrategy]=\"typeaheadScrollStrategy()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"typeaheadOptionsLimit()\"\n [typeaheadScrollable]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [typeaheadAutoSelectIndex]=\"searchValue() ? 0 : -1\"\n [typeaheadCreateOption]=\"typeaheadCreateOption()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [value]=\"searchValue()\"\n (focus)=\"inputFocus.emit()\"\n (input)=\"freeTextInputHandler($event)\"\n (blur)=\"freeTextBlurHandler()\"\n (keydown.backspace)=\"freeTextBackspaceHandler($event)\"\n (keydown.enter)=\"enterSubmit.emit()\"\n (typeaheadOnSelect)=\"typeaheadOnSelectCriterionHandler($event.option)\"\n (typeaheadOnCreateOption)=\"createFreeTextPillHandler($event)\"\n/>\n", styles: ["input{background:transparent;border:0;padding-block:0}input:focus{min-inline-size:20ch}input:hover::placeholder{opacity:1}:host-context(si-filtered-search-value + :host) input::placeholder{color:transparent}\n"] }]
|
|
151
168
|
}], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], typeaheadOptionsLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeaheadOptionsLimit", required: true }] }], optionsInScrollableView: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsInScrollableView", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: true }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: true }] }], scrollStrategyFactory: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategyFactory", required: true }] }], searchValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchValue", required: true }] }, { type: i0.Output, args: ["searchValueChange"] }], freeTextCriterion: [{ type: i0.Input, args: [{ isSignal: true, alias: "freeTextCriterion", required: true }] }], maxCriteriaReached: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCriteriaReached", required: true }] }], allowFreeText: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowFreeText", required: true }] }], searchForFreeTextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchForFreeTextLabel", required: true }] }], disableSelectionByColonAndSemicolon: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSelectionByColonAndSemicolon", required: true }] }], onlySelectValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlySelectValue", required: true }] }], createCriterion: [{ type: i0.Output, args: ["createCriterion"] }], createCriterionByName: [{ type: i0.Output, args: ["createCriterionByName"] }], backspaceOverflow: [{ type: i0.Output, args: ["backspaceOverflow"] }], createFreeTextPill: [{ type: i0.Output, args: ["createFreeTextPill"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], enterSubmit: [{ type: i0.Output, args: ["enterSubmit"] }], inputElement: [{ type: i0.ViewChild, args: ['freeTextInputElement', { isSignal: true }] }] } });
|
|
@@ -156,15 +173,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
156
173
|
*/
|
|
157
174
|
class SiFilteredSearchValueBase {
|
|
158
175
|
/** Whether the value editor is active. Supports two-way binding through `activeChange`. */
|
|
159
|
-
active = model.required(
|
|
176
|
+
active = model.required(/* @ts-ignore */
|
|
177
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
160
178
|
/** Current criterion value. Supports two-way binding through `criterionValueChange`. */
|
|
161
|
-
criterionValue = model.required(
|
|
179
|
+
criterionValue = model.required(/* @ts-ignore */
|
|
180
|
+
...(ngDevMode ? [{ debugName: "criterionValue" }] : /* istanbul ignore next */ []));
|
|
162
181
|
/** Definition that configures the criterion value editor. */
|
|
163
|
-
definition = input.required(
|
|
182
|
+
definition = input.required(/* @ts-ignore */
|
|
183
|
+
...(ngDevMode ? [{ debugName: "definition" }] : /* istanbul ignore next */ []));
|
|
164
184
|
/** Whether the value editor is disabled. */
|
|
165
|
-
disabled = input.required(
|
|
185
|
+
disabled = input.required(/* @ts-ignore */
|
|
186
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
166
187
|
/** Accessible label for the value input. */
|
|
167
|
-
searchLabel = input.required(
|
|
188
|
+
searchLabel = input.required(/* @ts-ignore */
|
|
189
|
+
...(ngDevMode ? [{ debugName: "searchLabel" }] : /* istanbul ignore next */ []));
|
|
168
190
|
/** Emits when a valid value is submitted, optionally with free-text content. */
|
|
169
191
|
submitValue = output();
|
|
170
192
|
/** Emits when the inactive value display is activated for editing. */
|
|
@@ -187,10 +209,10 @@ class SiFilteredSearchValueBase {
|
|
|
187
209
|
this.backspaceOverflow.emit();
|
|
188
210
|
}
|
|
189
211
|
}
|
|
190
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
191
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
212
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchValueBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
213
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: SiFilteredSearchValueBase, isStandalone: true, inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, criterionValue: { classPropertyName: "criterionValue", publicName: "criterionValue", isSignal: true, isRequired: true, transformFunction: null }, definition: { classPropertyName: "definition", publicName: "definition", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { active: "activeChange", criterionValue: "criterionValueChange", submitValue: "submitValue", editValue: "editValue", backspaceOverflow: "backspaceOverflow" }, host: { properties: { "class.invalid-criterion": "!validValue()" }, classAttribute: "pill pill-interactive px-0 criterion-value-section" }, ngImport: i0 });
|
|
192
214
|
}
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchValueBase, decorators: [{
|
|
194
216
|
type: Directive,
|
|
195
217
|
args: [{
|
|
196
218
|
host: {
|
|
@@ -202,22 +224,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
202
224
|
|
|
203
225
|
class SiFilteredSearchDateValueComponent extends SiFilteredSearchValueBase {
|
|
204
226
|
/** CDK scroll strategy used for the datepicker overlay. */
|
|
205
|
-
scrollStrategy = input.required(
|
|
227
|
+
scrollStrategy = input.required(/* @ts-ignore */
|
|
228
|
+
...(ngDevMode ? [{ debugName: "scrollStrategy" }] : /* istanbul ignore next */ []));
|
|
206
229
|
locale = inject(LOCALE_ID).toString();
|
|
207
|
-
valueInput = viewChild('valueInput',
|
|
208
|
-
|
|
209
|
-
|
|
230
|
+
valueInput = viewChild('valueInput', /* @ts-ignore */
|
|
231
|
+
...(ngDevMode ? [{ debugName: "valueInput" }] : /* istanbul ignore next */ []));
|
|
232
|
+
datepickerOverlay = viewChild(SiDatepickerOverlayDirective, /* @ts-ignore */
|
|
233
|
+
...(ngDevMode ? [{ debugName: "datepickerOverlay" }] : /* istanbul ignore next */ []));
|
|
234
|
+
disableTime = signal(false, /* @ts-ignore */
|
|
235
|
+
...(ngDevMode ? [{ debugName: "disableTime" }] : /* istanbul ignore next */ []));
|
|
210
236
|
shortDateFormat;
|
|
211
|
-
focusInOverlay = computed(() => !!this.datepickerOverlay()?.isShown(),
|
|
212
|
-
|
|
237
|
+
focusInOverlay = computed(() => !!this.datepickerOverlay()?.isShown(), /* @ts-ignore */
|
|
238
|
+
...(ngDevMode ? [{ debugName: "focusInOverlay" }] : /* istanbul ignore next */ []));
|
|
239
|
+
validFormat = computed(() => isValid(this.criterionValue().dateValue), /* @ts-ignore */
|
|
240
|
+
...(ngDevMode ? [{ debugName: "validFormat" }] : /* istanbul ignore next */ []));
|
|
213
241
|
// The information if the time is currently disabled is only present in the
|
|
214
242
|
// current search criterion instance and not in the generic configuration.
|
|
215
243
|
// So we need to merge the initial config with the current instance config.
|
|
216
244
|
dateConfig = computed(() => ({
|
|
217
245
|
...this.definition().datepickerConfig,
|
|
218
246
|
disabledTime: this.disableTime()
|
|
219
|
-
}),
|
|
220
|
-
|
|
247
|
+
}), /* @ts-ignore */
|
|
248
|
+
...(ngDevMode ? [{ debugName: "dateConfig" }] : /* istanbul ignore next */ []));
|
|
249
|
+
dateFormat = computed(() => getDatepickerFormat(this.locale, this.dateConfig()), /* @ts-ignore */
|
|
250
|
+
...(ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []));
|
|
221
251
|
validValue = computed(() => {
|
|
222
252
|
const dateConfig = this.dateConfig();
|
|
223
253
|
const minDate = dateConfig?.minDate ?? false;
|
|
@@ -225,7 +255,8 @@ class SiFilteredSearchDateValueComponent extends SiFilteredSearchValueBase {
|
|
|
225
255
|
const dateValue = this.criterionValue().dateValue ?? false;
|
|
226
256
|
return ((!minDate || (minDate && dateValue && dateValue >= minDate)) &&
|
|
227
257
|
(!maxDate || (maxDate && dateValue && dateValue <= maxDate)));
|
|
228
|
-
},
|
|
258
|
+
}, /* @ts-ignore */
|
|
259
|
+
...(ngDevMode ? [{ debugName: "validValue" }] : /* istanbul ignore next */ []));
|
|
229
260
|
constructor() {
|
|
230
261
|
super();
|
|
231
262
|
this.shortDateFormat = getNamedFormat(this.locale, 'shortDate');
|
|
@@ -254,16 +285,16 @@ class SiFilteredSearchDateValueComponent extends SiFilteredSearchValueBase {
|
|
|
254
285
|
}
|
|
255
286
|
this.criterionValue.update(v => ({ ...v, value, dateValue: date }));
|
|
256
287
|
}
|
|
257
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
258
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
288
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchDateValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
289
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiFilteredSearchDateValueComponent, isStandalone: true, selector: "si-filtered-search-date-value", inputs: { scrollStrategy: { classPropertyName: "scrollStrategy", publicName: "scrollStrategy", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
259
290
|
{ provide: SiFilteredSearchValueBase, useExisting: SiFilteredSearchDateValueComponent }
|
|
260
|
-
], viewQueries: [{ propertyName: "valueInput", first: true, predicate: ["valueInput"], descendants: true, isSignal: true }, { propertyName: "datepickerOverlay", first: true, predicate: SiDatepickerOverlayDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@let dateValue = criterionValue().dateValue;\n@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n @if (!validFormat()) {\n <!-- DatePipe throws an error if the date is invalid, so we have to do it on our own. -->\n <!-- We may should have a better solution here. Ideally we would keep the broken string so that a user can fix it later. -->\n\n {{ dateValue?.toString() }}\n } @else if (!disableTime() || definition().validationType === 'date-time') {\n {{ dateValue | date: dateFormat() }}\n } @else {\n {{ dateValue | date: shortDateFormat }}\n }\n </div>\n} @else {\n <input\n #valueInput\n type=\"text\"\n siDatepicker\n class=\"px-4 py-0 border-0 focus-inside\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [siDatepickerConfig]=\"dateConfig()\"\n [siDatepickerScrollStrategy]=\"scrollStrategy()\"\n [ngModel]=\"dateValue\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (siDatepickerDisabledTime)=\"disableTime.set($event)\"\n (ngModelChange)=\"valueDateSelect($event)\"\n />\n}\n", styles: ["input{background:transparent}.criterion-value-text{block-size:100%;display:flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: SiDatepickerDirective, selector: "[siDatepicker]", inputs: ["autoClose"], exportAs: ["siDatepicker"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }]
|
|
291
|
+
], viewQueries: [{ propertyName: "valueInput", first: true, predicate: ["valueInput"], descendants: true, isSignal: true }, { propertyName: "datepickerOverlay", first: true, predicate: SiDatepickerOverlayDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@let dateValue = criterionValue().dateValue;\n@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n @if (!validFormat()) {\n <!-- DatePipe throws an error if the date is invalid, so we have to do it on our own. -->\n <!-- We may should have a better solution here. Ideally we would keep the broken string so that a user can fix it later. -->\n\n {{ dateValue?.toString() }}\n } @else if (!disableTime() || definition().validationType === 'date-time') {\n {{ dateValue | date: dateFormat() }}\n } @else {\n {{ dateValue | date: shortDateFormat }}\n }\n </div>\n} @else {\n <input\n #valueInput\n type=\"text\"\n siDatepicker\n class=\"px-4 py-0 border-0 focus-inside\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [siDatepickerConfig]=\"dateConfig()\"\n [siDatepickerScrollStrategy]=\"scrollStrategy()\"\n [ngModel]=\"dateValue\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (siDatepickerDisabledTime)=\"disableTime.set($event)\"\n (ngModelChange)=\"valueDateSelect($event)\"\n />\n}\n", styles: ["input{background:transparent}.criterion-value-text{block-size:100%;display:flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: SiDatepickerDirective, selector: "[siDatepicker]", inputs: ["autoClose"], exportAs: ["siDatepicker"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
261
292
|
}
|
|
262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchDateValueComponent, decorators: [{
|
|
263
294
|
type: Component,
|
|
264
295
|
args: [{ selector: 'si-filtered-search-date-value', imports: [DatePipe, FormsModule, SiDatepickerDirective, SiTranslatePipe], providers: [
|
|
265
296
|
{ provide: SiFilteredSearchValueBase, useExisting: SiFilteredSearchDateValueComponent }
|
|
266
|
-
],
|
|
297
|
+
], template: "@let dateValue = criterionValue().dateValue;\n@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n @if (!validFormat()) {\n <!-- DatePipe throws an error if the date is invalid, so we have to do it on our own. -->\n <!-- We may should have a better solution here. Ideally we would keep the broken string so that a user can fix it later. -->\n\n {{ dateValue?.toString() }}\n } @else if (!disableTime() || definition().validationType === 'date-time') {\n {{ dateValue | date: dateFormat() }}\n } @else {\n {{ dateValue | date: shortDateFormat }}\n }\n </div>\n} @else {\n <input\n #valueInput\n type=\"text\"\n siDatepicker\n class=\"px-4 py-0 border-0 focus-inside\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [siDatepickerConfig]=\"dateConfig()\"\n [siDatepickerScrollStrategy]=\"scrollStrategy()\"\n [ngModel]=\"dateValue\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (siDatepickerDisabledTime)=\"disableTime.set($event)\"\n (ngModelChange)=\"valueDateSelect($event)\"\n />\n}\n", styles: ["input{background:transparent}.criterion-value-text{block-size:100%;display:flex;align-items:center}\n"] }]
|
|
267
298
|
}], ctorParameters: () => [], propDecorators: { scrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategy", required: true }] }], valueInput: [{ type: i0.ViewChild, args: ['valueInput', { isSignal: true }] }], datepickerOverlay: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiDatepickerOverlayDirective), { isSignal: true }] }] } });
|
|
268
299
|
|
|
269
300
|
/**
|
|
@@ -271,8 +302,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
271
302
|
* SPDX-License-Identifier: MIT
|
|
272
303
|
*/
|
|
273
304
|
class SiFilteredSearchFreeTextComponent extends SiFilteredSearchValueBase {
|
|
274
|
-
valueInput = viewChild('freeTextInput',
|
|
275
|
-
|
|
305
|
+
valueInput = viewChild('freeTextInput', /* @ts-ignore */
|
|
306
|
+
...(ngDevMode ? [{ debugName: "valueInput" }] : /* istanbul ignore next */ []));
|
|
307
|
+
validValue = computed(() => true, /* @ts-ignore */
|
|
308
|
+
...(ngDevMode ? [{ debugName: "validValue" }] : /* istanbul ignore next */ []));
|
|
276
309
|
freeTextValueChange(event) {
|
|
277
310
|
const inputElement = event.target;
|
|
278
311
|
this.criterionValue.update(v => ({ ...v, value: inputElement.value }));
|
|
@@ -281,16 +314,16 @@ class SiFilteredSearchFreeTextComponent extends SiFilteredSearchValueBase {
|
|
|
281
314
|
this.active.set(false);
|
|
282
315
|
this.submitValue.emit();
|
|
283
316
|
}
|
|
284
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
285
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
317
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchFreeTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
318
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiFilteredSearchFreeTextComponent, isStandalone: true, selector: "si-filtered-search-free-text", providers: [
|
|
286
319
|
{ provide: SiFilteredSearchValueBase, useExisting: SiFilteredSearchFreeTextComponent }
|
|
287
|
-
], viewQueries: [{ propertyName: "valueInput", first: true, predicate: ["freeTextInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n {{ criterionValue().value }}\n </div>\n} @else {\n <input\n #freeTextInput\n type=\"text\"\n class=\"px-4 py-0 border-0 focus-inside\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [disabled]=\"disabled()\"\n [value]=\"criterionValue().value\"\n (input)=\"freeTextValueChange($event)\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (blur)=\"active.set(false)\"\n />\n}\n", styles: ["input{background:transparent}\n"], dependencies: [{ kind: "pipe", type: SiTranslatePipe, name: "translate" }]
|
|
320
|
+
], viewQueries: [{ propertyName: "valueInput", first: true, predicate: ["freeTextInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n {{ criterionValue().value }}\n </div>\n} @else {\n <input\n #freeTextInput\n type=\"text\"\n class=\"px-4 py-0 border-0 focus-inside\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [disabled]=\"disabled()\"\n [value]=\"criterionValue().value\"\n (input)=\"freeTextValueChange($event)\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (blur)=\"active.set(false)\"\n />\n}\n", styles: ["input{background:transparent}\n"], dependencies: [{ kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
288
321
|
}
|
|
289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchFreeTextComponent, decorators: [{
|
|
290
323
|
type: Component,
|
|
291
324
|
args: [{ selector: 'si-filtered-search-free-text', imports: [SiTranslatePipe], providers: [
|
|
292
325
|
{ provide: SiFilteredSearchValueBase, useExisting: SiFilteredSearchFreeTextComponent }
|
|
293
|
-
],
|
|
326
|
+
], template: "@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n {{ criterionValue().value }}\n </div>\n} @else {\n <input\n #freeTextInput\n type=\"text\"\n class=\"px-4 py-0 border-0 focus-inside\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [disabled]=\"disabled()\"\n [value]=\"criterionValue().value\"\n (input)=\"freeTextValueChange($event)\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (blur)=\"active.set(false)\"\n />\n}\n", styles: ["input{background:transparent}\n"] }]
|
|
294
327
|
}], propDecorators: { valueInput: [{ type: i0.ViewChild, args: ['freeTextInput', { isSignal: true }] }] } });
|
|
295
328
|
|
|
296
329
|
/**
|
|
@@ -299,27 +332,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
299
332
|
*/
|
|
300
333
|
class SiFilteredSearchOptionValueBase extends SiFilteredSearchValueBase {
|
|
301
334
|
/** Loads value options for the current criterion on demand. */
|
|
302
|
-
lazyValueProvider = input(
|
|
335
|
+
lazyValueProvider = input(/* @ts-ignore */
|
|
336
|
+
...(ngDevMode ? [undefined, { debugName: "lazyValueProvider" }] : /* istanbul ignore next */ []));
|
|
303
337
|
/** Delay in milliseconds before requesting lazy value options. */
|
|
304
|
-
searchDebounceTime = input.required(
|
|
338
|
+
searchDebounceTime = input.required(/* @ts-ignore */
|
|
339
|
+
...(ngDevMode ? [{ debugName: "searchDebounceTime" }] : /* istanbul ignore next */ []));
|
|
305
340
|
/** Whether the editor only permits selecting configured options. */
|
|
306
|
-
onlySelectValue = input.required(
|
|
341
|
+
onlySelectValue = input.required(/* @ts-ignore */
|
|
342
|
+
...(ngDevMode ? [{ debugName: "onlySelectValue" }] : /* istanbul ignore next */ []));
|
|
307
343
|
/** Maximum number of options displayed by the typeahead. */
|
|
308
|
-
maxCriteriaOptions = input.required(
|
|
344
|
+
maxCriteriaOptions = input.required(/* @ts-ignore */
|
|
345
|
+
...(ngDevMode ? [{ debugName: "maxCriteriaOptions" }] : /* istanbul ignore next */ []));
|
|
309
346
|
/** Number of options visible before the typeahead scrolls. */
|
|
310
|
-
optionsInScrollableView = input.required(
|
|
347
|
+
optionsInScrollableView = input.required(/* @ts-ignore */
|
|
348
|
+
...(ngDevMode ? [{ debugName: "optionsInScrollableView" }] : /* istanbul ignore next */ []));
|
|
311
349
|
/** Whether typing a colon or semicolon must not select an option. */
|
|
312
|
-
disableSelectionByColonAndSemicolon = input.required(
|
|
350
|
+
disableSelectionByColonAndSemicolon = input.required(/* @ts-ignore */
|
|
351
|
+
...(ngDevMode ? [{ debugName: "disableSelectionByColonAndSemicolon" }] : /* istanbul ignore next */ []));
|
|
313
352
|
/** Whether strict or selection-only value validation is active. */
|
|
314
|
-
isStrictOrOnlySelectValue = input.required(
|
|
353
|
+
isStrictOrOnlySelectValue = input.required(/* @ts-ignore */
|
|
354
|
+
...(ngDevMode ? [{ debugName: "isStrictOrOnlySelectValue" }] : /* istanbul ignore next */ []));
|
|
315
355
|
inputChange = new BehaviorSubject('');
|
|
316
356
|
destroyRef = inject(DestroyRef);
|
|
317
357
|
translateService = injectSiTranslateService();
|
|
318
358
|
inputType = computed(() => this.definition().validationType === 'integer' || this.definition().validationType === 'float'
|
|
319
359
|
? 'number'
|
|
320
|
-
: 'text',
|
|
321
|
-
|
|
322
|
-
|
|
360
|
+
: 'text', /* @ts-ignore */
|
|
361
|
+
...(ngDevMode ? [{ debugName: "inputType" }] : /* istanbul ignore next */ []));
|
|
362
|
+
step = computed(() => (this.definition().validationType === 'integer' ? '1' : 'any'), /* @ts-ignore */
|
|
363
|
+
...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
364
|
+
options = computed(() => this.buildOptions(), /* @ts-ignore */
|
|
365
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
323
366
|
validValue = computed(() => {
|
|
324
367
|
const config = this.definition();
|
|
325
368
|
if (!this.isStrictOrOnlySelectValue() && !config.strictValue && !config.onlySelectValue) {
|
|
@@ -329,7 +372,8 @@ class SiFilteredSearchOptionValueBase extends SiFilteredSearchValueBase {
|
|
|
329
372
|
// TODO: checking if options are empty is also questionable. Should be changed v47.
|
|
330
373
|
return ((config.options?.length && this.hasOptionValue()) ||
|
|
331
374
|
(!config.options?.length && !!this.criterionValue().value));
|
|
332
|
-
},
|
|
375
|
+
}, /* @ts-ignore */
|
|
376
|
+
...(ngDevMode ? [{ debugName: "validValue" }] : /* istanbul ignore next */ []));
|
|
333
377
|
buildOptions() {
|
|
334
378
|
let optionsStream;
|
|
335
379
|
if (this.lazyValueProvider()) {
|
|
@@ -358,22 +402,27 @@ class SiFilteredSearchOptionValueBase extends SiFilteredSearchValueBase {
|
|
|
358
402
|
.subscribe(options => this.processTypeaheadOptions(options));
|
|
359
403
|
}
|
|
360
404
|
}
|
|
361
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
362
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
405
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchOptionValueBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
406
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: SiFilteredSearchOptionValueBase, isStandalone: true, inputs: { lazyValueProvider: { classPropertyName: "lazyValueProvider", publicName: "lazyValueProvider", isSignal: true, isRequired: false, transformFunction: null }, searchDebounceTime: { classPropertyName: "searchDebounceTime", publicName: "searchDebounceTime", isSignal: true, isRequired: true, transformFunction: null }, onlySelectValue: { classPropertyName: "onlySelectValue", publicName: "onlySelectValue", isSignal: true, isRequired: true, transformFunction: null }, maxCriteriaOptions: { classPropertyName: "maxCriteriaOptions", publicName: "maxCriteriaOptions", isSignal: true, isRequired: true, transformFunction: null }, optionsInScrollableView: { classPropertyName: "optionsInScrollableView", publicName: "optionsInScrollableView", isSignal: true, isRequired: true, transformFunction: null }, disableSelectionByColonAndSemicolon: { classPropertyName: "disableSelectionByColonAndSemicolon", publicName: "disableSelectionByColonAndSemicolon", isSignal: true, isRequired: true, transformFunction: null }, isStrictOrOnlySelectValue: { classPropertyName: "isStrictOrOnlySelectValue", publicName: "isStrictOrOnlySelectValue", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
363
407
|
}
|
|
364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchOptionValueBase, decorators: [{
|
|
365
409
|
type: Directive
|
|
366
410
|
}], propDecorators: { lazyValueProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyValueProvider", required: false }] }], searchDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchDebounceTime", required: true }] }], onlySelectValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlySelectValue", required: true }] }], maxCriteriaOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCriteriaOptions", required: true }] }], optionsInScrollableView: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsInScrollableView", required: true }] }], disableSelectionByColonAndSemicolon: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSelectionByColonAndSemicolon", required: true }] }], isStrictOrOnlySelectValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "isStrictOrOnlySelectValue", required: true }] }] } });
|
|
367
411
|
|
|
368
412
|
class SiFilteredSearchMultiSelectComponent extends SiFilteredSearchOptionValueBase {
|
|
369
413
|
/** Text used to summarize multiple selected values. */
|
|
370
|
-
itemCountText = input.required(
|
|
414
|
+
itemCountText = input.required(/* @ts-ignore */
|
|
415
|
+
...(ngDevMode ? [{ debugName: "itemCountText" }] : /* istanbul ignore next */ []));
|
|
371
416
|
/** CDK scroll strategy used for the value typeahead overlay. */
|
|
372
|
-
scrollStrategy = input.required(
|
|
373
|
-
|
|
374
|
-
|
|
417
|
+
scrollStrategy = input.required(/* @ts-ignore */
|
|
418
|
+
...(ngDevMode ? [{ debugName: "scrollStrategy" }] : /* istanbul ignore next */ []));
|
|
419
|
+
valueInput = viewChild('valueInput', /* @ts-ignore */
|
|
420
|
+
...(ngDevMode ? [{ debugName: "valueInput" }] : /* istanbul ignore next */ []));
|
|
421
|
+
optionValue = signal([], /* @ts-ignore */
|
|
422
|
+
...(ngDevMode ? [{ debugName: "optionValue" }] : /* istanbul ignore next */ []));
|
|
375
423
|
selectionChange = new BehaviorSubject([]);
|
|
376
|
-
hasMultiSelections = computed(() => Array.isArray(this.criterionValue().value) && this.criterionValue().value.length > 1,
|
|
424
|
+
hasMultiSelections = computed(() => Array.isArray(this.criterionValue().value) && this.criterionValue().value.length > 1, /* @ts-ignore */
|
|
425
|
+
...(ngDevMode ? [{ debugName: "hasMultiSelections" }] : /* istanbul ignore next */ []));
|
|
377
426
|
ngOnChanges(changes) {
|
|
378
427
|
if (changes.criterionValue &&
|
|
379
428
|
this.criterionValue().value?.length !== this.optionValue().length) {
|
|
@@ -423,25 +472,29 @@ class SiFilteredSearchMultiSelectComponent extends SiFilteredSearchOptionValueBa
|
|
|
423
472
|
hasOptionValue() {
|
|
424
473
|
return !!this.optionValue().length;
|
|
425
474
|
}
|
|
426
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
427
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
475
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchMultiSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
476
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiFilteredSearchMultiSelectComponent, isStandalone: true, selector: "si-filtered-search-multi-select", inputs: { itemCountText: { classPropertyName: "itemCountText", publicName: "itemCountText", isSignal: true, isRequired: true, transformFunction: null }, scrollStrategy: { classPropertyName: "scrollStrategy", publicName: "scrollStrategy", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
428
477
|
{ provide: SiFilteredSearchValueBase, useExisting: SiFilteredSearchMultiSelectComponent }
|
|
429
|
-
], viewQueries: [{ propertyName: "valueInput", first: true, predicate: ["valueInput"], descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let value = criterionValue().value;\n@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n @if (!!value && hasMultiSelections()) {\n {{ itemCountText() | translate: { itemCount: value.length } }}\n } @else if (optionValue()[0]) {\n {{ optionValue()[0].label ?? optionValue()[0].value | translate }}\n } @else {\n {{ value }}\n }\n </div>\n} @else {\n <input\n #valueInput\n typeaheadOptionField=\"translatedLabel\"\n class=\"px-4 py-0 border-0 focus-inside\"\n typeaheadScrollable\n typeaheadMultiSelect\n [type]=\"inputType()\"\n [step]=\"step()\"\n [siTypeahead]=\"options() ?? []\"\n [typeaheadScrollStrategy]=\"scrollStrategy()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"maxCriteriaOptions()\"\n [readOnly]=\"onlySelectValue()\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (typeaheadOnSelect)=\"valueTypeaheadSelect($event)\"\n (typeaheadOnInput)=\"inputChange.next($event)\"\n />\n}\n", styles: ["input{background:transparent}.criterion-value-text{block-size:100%;display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: SiTypeaheadDirective, selector: "[siTypeahead]", inputs: ["siTypeahead", "typeaheadProcess", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadOptionsLimit", "typeaheadScrollableAdditionalHeight", "typeaheadAutoSelectIndex", "typeaheadCloseOnEsc", "typeaheadClearValueOnSelect", "typeaheadWaitMs", "typeaheadMinLength", "typeaheadOptionField", "typeaheadMultiSelect", "typeaheadTokenize", "typeaheadMatchAllTokens", "typeaheadItemTemplate", "typeaheadSkipSortingMatches", "typeaheadAutocompleteListLabel", "typeaheadFullWidth", "typeaheadScrollStrategy", "typeaheadCreateOption"], outputs: ["typeaheadOnInput", "typeaheadOnSelect", "typeaheadOnFullMatch", "typeaheadOpenChange", "typeaheadOnCreateOption"], exportAs: ["si-typeahead"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }]
|
|
478
|
+
], viewQueries: [{ propertyName: "valueInput", first: true, predicate: ["valueInput"], descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let value = criterionValue().value;\n@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n @if (!!value && hasMultiSelections()) {\n {{ itemCountText() | translate: { itemCount: value.length } }}\n } @else if (optionValue()[0]) {\n {{ optionValue()[0].label ?? optionValue()[0].value | translate }}\n } @else {\n {{ value }}\n }\n </div>\n} @else {\n <input\n #valueInput\n typeaheadOptionField=\"translatedLabel\"\n class=\"px-4 py-0 border-0 focus-inside\"\n typeaheadScrollable\n typeaheadMultiSelect\n [type]=\"inputType()\"\n [step]=\"step()\"\n [siTypeahead]=\"options() ?? []\"\n [typeaheadScrollStrategy]=\"scrollStrategy()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"maxCriteriaOptions()\"\n [readOnly]=\"onlySelectValue()\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (typeaheadOnSelect)=\"valueTypeaheadSelect($event)\"\n (typeaheadOnInput)=\"inputChange.next($event)\"\n />\n}\n", styles: ["input{background:transparent}.criterion-value-text{block-size:100%;display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: SiTypeaheadDirective, selector: "[siTypeahead]", inputs: ["siTypeahead", "typeaheadProcess", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadOptionsLimit", "typeaheadScrollableAdditionalHeight", "typeaheadAutoSelectIndex", "typeaheadCloseOnEsc", "typeaheadClearValueOnSelect", "typeaheadWaitMs", "typeaheadMinLength", "typeaheadOptionField", "typeaheadMultiSelect", "typeaheadTokenize", "typeaheadMatchAllTokens", "typeaheadItemTemplate", "typeaheadSkipSortingMatches", "typeaheadAutocompleteListLabel", "typeaheadFullWidth", "typeaheadScrollStrategy", "typeaheadCreateOption"], outputs: ["typeaheadOnInput", "typeaheadOnSelect", "typeaheadOnFullMatch", "typeaheadOpenChange", "typeaheadOnCreateOption"], exportAs: ["si-typeahead"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
430
479
|
}
|
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchMultiSelectComponent, decorators: [{
|
|
432
481
|
type: Component,
|
|
433
482
|
args: [{ selector: 'si-filtered-search-multi-select', imports: [SiTranslatePipe, SiTypeaheadDirective], providers: [
|
|
434
483
|
{ provide: SiFilteredSearchValueBase, useExisting: SiFilteredSearchMultiSelectComponent }
|
|
435
|
-
],
|
|
484
|
+
], template: "@let value = criterionValue().value;\n@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n @if (!!value && hasMultiSelections()) {\n {{ itemCountText() | translate: { itemCount: value.length } }}\n } @else if (optionValue()[0]) {\n {{ optionValue()[0].label ?? optionValue()[0].value | translate }}\n } @else {\n {{ value }}\n }\n </div>\n} @else {\n <input\n #valueInput\n typeaheadOptionField=\"translatedLabel\"\n class=\"px-4 py-0 border-0 focus-inside\"\n typeaheadScrollable\n typeaheadMultiSelect\n [type]=\"inputType()\"\n [step]=\"step()\"\n [siTypeahead]=\"options() ?? []\"\n [typeaheadScrollStrategy]=\"scrollStrategy()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"maxCriteriaOptions()\"\n [readOnly]=\"onlySelectValue()\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (typeaheadOnSelect)=\"valueTypeaheadSelect($event)\"\n (typeaheadOnInput)=\"inputChange.next($event)\"\n />\n}\n", styles: ["input{background:transparent}.criterion-value-text{block-size:100%;display:flex;align-items:center}\n"] }]
|
|
436
485
|
}], propDecorators: { itemCountText: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemCountText", required: true }] }], scrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategy", required: true }] }], valueInput: [{ type: i0.ViewChild, args: ['valueInput', { isSignal: true }] }] } });
|
|
437
486
|
|
|
438
487
|
class SiFilteredSearchTypeaheadComponent extends SiFilteredSearchOptionValueBase {
|
|
439
488
|
/** CDK scroll strategy used for the value typeahead overlay. */
|
|
440
|
-
scrollStrategy = input.required(
|
|
441
|
-
|
|
442
|
-
|
|
489
|
+
scrollStrategy = input.required(/* @ts-ignore */
|
|
490
|
+
...(ngDevMode ? [{ debugName: "scrollStrategy" }] : /* istanbul ignore next */ []));
|
|
491
|
+
valueInput = viewChild('valueInput', /* @ts-ignore */
|
|
492
|
+
...(ngDevMode ? [{ debugName: "valueInput" }] : /* istanbul ignore next */ []));
|
|
493
|
+
optionValue = signal(undefined, /* @ts-ignore */
|
|
494
|
+
...(ngDevMode ? [{ debugName: "optionValue" }] : /* istanbul ignore next */ []));
|
|
443
495
|
// This must be a separate signal as it should only emit when the actual empty state changes.
|
|
444
|
-
inputEmpty = computed(() => !this.criterionValue().value,
|
|
496
|
+
inputEmpty = computed(() => !this.criterionValue().value, /* @ts-ignore */
|
|
497
|
+
...(ngDevMode ? [{ debugName: "inputEmpty" }] : /* istanbul ignore next */ []));
|
|
445
498
|
// This MUST only be updated if the active state changes.
|
|
446
499
|
// Otherwise, user values might be overridden.
|
|
447
500
|
// It is only used to pass the initial input value if the user starts editing the input.
|
|
@@ -461,7 +514,8 @@ class SiFilteredSearchTypeaheadComponent extends SiFilteredSearchOptionValueBase
|
|
|
461
514
|
}
|
|
462
515
|
}
|
|
463
516
|
return '';
|
|
464
|
-
},
|
|
517
|
+
}, /* @ts-ignore */
|
|
518
|
+
...(ngDevMode ? [{ debugName: "valueLabel" }] : /* istanbul ignore next */ []));
|
|
465
519
|
ngOnChanges(changes) {
|
|
466
520
|
if (changes.criterionValue && this.criterionValue().value !== this.optionValue()?.value) {
|
|
467
521
|
this.optionValue.set(undefined);
|
|
@@ -519,16 +573,16 @@ class SiFilteredSearchTypeaheadComponent extends SiFilteredSearchOptionValueBase
|
|
|
519
573
|
hasOptionValue() {
|
|
520
574
|
return !!this.optionValue();
|
|
521
575
|
}
|
|
522
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
523
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
576
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchTypeaheadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
577
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiFilteredSearchTypeaheadComponent, isStandalone: true, selector: "si-filtered-search-typeahead", inputs: { scrollStrategy: { classPropertyName: "scrollStrategy", publicName: "scrollStrategy", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
524
578
|
{ provide: SiFilteredSearchValueBase, useExisting: SiFilteredSearchTypeaheadComponent }
|
|
525
|
-
], viewQueries: [{ propertyName: "valueInput", first: true, predicate: ["valueInput"], descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let value = criterionValue().value;\n@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n @let optionValue = this.optionValue();\n @if (optionValue) {\n {{ optionValue.label ?? optionValue.value | translate }}\n } @else {\n {{ value }}\n }\n </div>\n} @else {\n <input\n #valueInput\n typeaheadOptionField=\"translatedLabel\"\n class=\"px-4 py-0 border-0 focus-inside\"\n typeaheadScrollable\n [type]=\"inputType()\"\n [step]=\"step()\"\n [value]=\"valueLabel()\"\n [siTypeahead]=\"options() ?? []\"\n [typeaheadScrollStrategy]=\"scrollStrategy()\"\n [typeaheadProcess]=\"!onlySelectValue()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"maxCriteriaOptions()\"\n [typeaheadAutoSelectIndex]=\"value?.length ? 0 : -1\"\n [readOnly]=\"onlySelectValue() || definition().onlySelectValue\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n (keydown)=\"valueFilterKeys($event)\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (typeaheadOnInput)=\"valueChange($event)\"\n (typeaheadOnFullMatch)=\"valueTypeaheadFullMatch($event)\"\n (typeaheadOnSelect)=\"valueTypeaheadSelect($event)\"\n />\n}\n", styles: ["input{background:transparent;-moz-appearance:textfield}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.criterion-value-text{block-size:100%;display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: SiTypeaheadDirective, selector: "[siTypeahead]", inputs: ["siTypeahead", "typeaheadProcess", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadOptionsLimit", "typeaheadScrollableAdditionalHeight", "typeaheadAutoSelectIndex", "typeaheadCloseOnEsc", "typeaheadClearValueOnSelect", "typeaheadWaitMs", "typeaheadMinLength", "typeaheadOptionField", "typeaheadMultiSelect", "typeaheadTokenize", "typeaheadMatchAllTokens", "typeaheadItemTemplate", "typeaheadSkipSortingMatches", "typeaheadAutocompleteListLabel", "typeaheadFullWidth", "typeaheadScrollStrategy", "typeaheadCreateOption"], outputs: ["typeaheadOnInput", "typeaheadOnSelect", "typeaheadOnFullMatch", "typeaheadOpenChange", "typeaheadOnCreateOption"], exportAs: ["si-typeahead"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }]
|
|
579
|
+
], viewQueries: [{ propertyName: "valueInput", first: true, predicate: ["valueInput"], descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let value = criterionValue().value;\n@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n @let optionValue = this.optionValue();\n @if (optionValue) {\n {{ optionValue.label ?? optionValue.value | translate }}\n } @else {\n {{ value }}\n }\n </div>\n} @else {\n <input\n #valueInput\n typeaheadOptionField=\"translatedLabel\"\n class=\"px-4 py-0 border-0 focus-inside\"\n typeaheadScrollable\n [type]=\"inputType()\"\n [step]=\"step()\"\n [value]=\"valueLabel()\"\n [siTypeahead]=\"options() ?? []\"\n [typeaheadScrollStrategy]=\"scrollStrategy()\"\n [typeaheadProcess]=\"!onlySelectValue()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"maxCriteriaOptions()\"\n [typeaheadAutoSelectIndex]=\"value?.length ? 0 : -1\"\n [readOnly]=\"onlySelectValue() || definition().onlySelectValue\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n (keydown)=\"valueFilterKeys($event)\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (typeaheadOnInput)=\"valueChange($event)\"\n (typeaheadOnFullMatch)=\"valueTypeaheadFullMatch($event)\"\n (typeaheadOnSelect)=\"valueTypeaheadSelect($event)\"\n />\n}\n", styles: ["input{background:transparent;-moz-appearance:textfield}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.criterion-value-text{block-size:100%;display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: SiTypeaheadDirective, selector: "[siTypeahead]", inputs: ["siTypeahead", "typeaheadProcess", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadOptionsLimit", "typeaheadScrollableAdditionalHeight", "typeaheadAutoSelectIndex", "typeaheadCloseOnEsc", "typeaheadClearValueOnSelect", "typeaheadWaitMs", "typeaheadMinLength", "typeaheadOptionField", "typeaheadMultiSelect", "typeaheadTokenize", "typeaheadMatchAllTokens", "typeaheadItemTemplate", "typeaheadSkipSortingMatches", "typeaheadAutocompleteListLabel", "typeaheadFullWidth", "typeaheadScrollStrategy", "typeaheadCreateOption"], outputs: ["typeaheadOnInput", "typeaheadOnSelect", "typeaheadOnFullMatch", "typeaheadOpenChange", "typeaheadOnCreateOption"], exportAs: ["si-typeahead"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
526
580
|
}
|
|
527
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchTypeaheadComponent, decorators: [{
|
|
528
582
|
type: Component,
|
|
529
583
|
args: [{ selector: 'si-filtered-search-typeahead', imports: [SiTypeaheadDirective, SiTranslatePipe], providers: [
|
|
530
584
|
{ provide: SiFilteredSearchValueBase, useExisting: SiFilteredSearchTypeaheadComponent }
|
|
531
|
-
],
|
|
585
|
+
], template: "@let value = criterionValue().value;\n@if (!active()) {\n <div\n class=\"criterion-value-text focus-inside px-4\"\n [tabindex]=\"disabled() ? -1 : 0\"\n (keydown.enter)=\"editValue.emit()\"\n (click)=\"editValue.emit()\"\n >\n @let optionValue = this.optionValue();\n @if (optionValue) {\n {{ optionValue.label ?? optionValue.value | translate }}\n } @else {\n {{ value }}\n }\n </div>\n} @else {\n <input\n #valueInput\n typeaheadOptionField=\"translatedLabel\"\n class=\"px-4 py-0 border-0 focus-inside\"\n typeaheadScrollable\n [type]=\"inputType()\"\n [step]=\"step()\"\n [value]=\"valueLabel()\"\n [siTypeahead]=\"options() ?? []\"\n [typeaheadScrollStrategy]=\"scrollStrategy()\"\n [typeaheadProcess]=\"!onlySelectValue()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"maxCriteriaOptions()\"\n [typeaheadAutoSelectIndex]=\"value?.length ? 0 : -1\"\n [readOnly]=\"onlySelectValue() || definition().onlySelectValue\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n (keydown)=\"valueFilterKeys($event)\"\n (keydown.backspace)=\"valueBackspace()\"\n (keydown.enter)=\"valueEnter()\"\n (typeaheadOnInput)=\"valueChange($event)\"\n (typeaheadOnFullMatch)=\"valueTypeaheadFullMatch($event)\"\n (typeaheadOnSelect)=\"valueTypeaheadSelect($event)\"\n />\n}\n", styles: ["input{background:transparent;-moz-appearance:textfield}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.criterion-value-text{block-size:100%;display:flex;align-items:center}\n"] }]
|
|
532
586
|
}], propDecorators: { scrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategy", required: true }] }], valueInput: [{ type: i0.ViewChild, args: ['valueInput', { isSignal: true }] }] } });
|
|
533
587
|
|
|
534
588
|
/**
|
|
@@ -538,50 +592,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
538
592
|
class SiFilteredSearchValueComponent {
|
|
539
593
|
injector = inject(Injector);
|
|
540
594
|
/** Current criterion value. Supports two-way binding through `valueChange`. */
|
|
541
|
-
value = model.required(
|
|
595
|
+
value = model.required(/* @ts-ignore */
|
|
596
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
542
597
|
/** Definition that configures the criterion label, operators, and value type. */
|
|
543
|
-
definition = input.required(
|
|
598
|
+
definition = input.required(/* @ts-ignore */
|
|
599
|
+
...(ngDevMode ? [{ debugName: "definition" }] : /* istanbul ignore next */ []));
|
|
544
600
|
/** Whether the criterion value cannot be edited or cleared. */
|
|
545
|
-
disabled = input.required(
|
|
601
|
+
disabled = input.required(/* @ts-ignore */
|
|
602
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
546
603
|
/** Whether the value editor only permits selecting configured options. */
|
|
547
|
-
onlySelectValue = input.required(
|
|
604
|
+
onlySelectValue = input.required(/* @ts-ignore */
|
|
605
|
+
...(ngDevMode ? [{ debugName: "onlySelectValue" }] : /* istanbul ignore next */ []));
|
|
548
606
|
/** Maximum number of options displayed by a value typeahead. */
|
|
549
|
-
maxCriteriaOptions = input.required(
|
|
607
|
+
maxCriteriaOptions = input.required(/* @ts-ignore */
|
|
608
|
+
...(ngDevMode ? [{ debugName: "maxCriteriaOptions" }] : /* istanbul ignore next */ []));
|
|
550
609
|
/** Number of options visible before a value typeahead scrolls. */
|
|
551
|
-
optionsInScrollableView = input.required(
|
|
610
|
+
optionsInScrollableView = input.required(/* @ts-ignore */
|
|
611
|
+
...(ngDevMode ? [{ debugName: "optionsInScrollableView" }] : /* istanbul ignore next */ []));
|
|
552
612
|
/** Accessible label for the button that clears the criterion. */
|
|
553
|
-
clearButtonLabel = input.required(
|
|
613
|
+
clearButtonLabel = input.required(/* @ts-ignore */
|
|
614
|
+
...(ngDevMode ? [{ debugName: "clearButtonLabel" }] : /* istanbul ignore next */ []));
|
|
554
615
|
/** Loads value options for the criterion on demand. */
|
|
555
|
-
lazyValueProvider = input(
|
|
616
|
+
lazyValueProvider = input(/* @ts-ignore */
|
|
617
|
+
...(ngDevMode ? [undefined, { debugName: "lazyValueProvider" }] : /* istanbul ignore next */ []));
|
|
556
618
|
/** Delay in milliseconds before requesting lazy value options. */
|
|
557
|
-
searchDebounceTime = input.required(
|
|
619
|
+
searchDebounceTime = input.required(/* @ts-ignore */
|
|
620
|
+
...(ngDevMode ? [{ debugName: "searchDebounceTime" }] : /* istanbul ignore next */ []));
|
|
558
621
|
/** Text used to summarize multiple selected values. */
|
|
559
|
-
itemCountText = input.required(
|
|
622
|
+
itemCountText = input.required(/* @ts-ignore */
|
|
623
|
+
...(ngDevMode ? [{ debugName: "itemCountText" }] : /* istanbul ignore next */ []));
|
|
560
624
|
/** Whether typing a colon or semicolon must not select a value. */
|
|
561
|
-
disableSelectionByColonAndSemicolon = input.required(
|
|
625
|
+
disableSelectionByColonAndSemicolon = input.required(/* @ts-ignore */
|
|
626
|
+
...(ngDevMode ? [{ debugName: "disableSelectionByColonAndSemicolon" }] : /* istanbul ignore next */ []));
|
|
562
627
|
/** Accessible label for the operator and value inputs. */
|
|
563
|
-
searchLabel = input.required(
|
|
628
|
+
searchLabel = input.required(/* @ts-ignore */
|
|
629
|
+
...(ngDevMode ? [{ debugName: "searchLabel" }] : /* istanbul ignore next */ []));
|
|
564
630
|
/** Whether the current criterion value is invalid. */
|
|
565
|
-
invalidCriterion = input.required(
|
|
631
|
+
invalidCriterion = input.required(/* @ts-ignore */
|
|
632
|
+
...(ngDevMode ? [{ debugName: "invalidCriterion" }] : /* istanbul ignore next */ []));
|
|
566
633
|
/** Whether strict or selection-only value validation is active. */
|
|
567
|
-
isStrictOrOnlySelectValue = input.required(
|
|
634
|
+
isStrictOrOnlySelectValue = input.required(/* @ts-ignore */
|
|
635
|
+
...(ngDevMode ? [{ debugName: "isStrictOrOnlySelectValue" }] : /* istanbul ignore next */ []));
|
|
568
636
|
/** Whether the value editor opens automatically after the criterion is created. */
|
|
569
|
-
editOnCreation = input.required(
|
|
637
|
+
editOnCreation = input.required(/* @ts-ignore */
|
|
638
|
+
...(ngDevMode ? [{ debugName: "editOnCreation" }] : /* istanbul ignore next */ []));
|
|
570
639
|
/** Factory for CDK scroll strategies used by filtered-search value editor overlays. */
|
|
571
|
-
scrollStrategyFactory = input.required(
|
|
640
|
+
scrollStrategyFactory = input.required(/* @ts-ignore */
|
|
641
|
+
...(ngDevMode ? [{ debugName: "scrollStrategyFactory" }] : /* istanbul ignore next */ []));
|
|
572
642
|
/** Emits when the criterion is deleted, optionally requesting a search update. */
|
|
573
643
|
deleteCriterion = output();
|
|
574
644
|
/** Emits when the criterion value is submitted, optionally with free-text content. */
|
|
575
645
|
submitCriterion = output();
|
|
576
|
-
active = signal(false,
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
646
|
+
active = signal(false, /* @ts-ignore */
|
|
647
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
648
|
+
operatorScrollStrategy = computed(() => this.scrollStrategyFactory()(), /* @ts-ignore */
|
|
649
|
+
...(ngDevMode ? [{ debugName: "operatorScrollStrategy" }] : /* istanbul ignore next */ []));
|
|
650
|
+
datepickerScrollStrategy = computed(() => this.scrollStrategyFactory()(), /* @ts-ignore */
|
|
651
|
+
...(ngDevMode ? [{ debugName: "datepickerScrollStrategy" }] : /* istanbul ignore next */ []));
|
|
652
|
+
multiSelectScrollStrategy = computed(() => this.scrollStrategyFactory()(), /* @ts-ignore */
|
|
653
|
+
...(ngDevMode ? [{ debugName: "multiSelectScrollStrategy" }] : /* istanbul ignore next */ []));
|
|
654
|
+
typeaheadScrollStrategy = computed(() => this.scrollStrategyFactory()(), /* @ts-ignore */
|
|
655
|
+
...(ngDevMode ? [{ debugName: "typeaheadScrollStrategy" }] : /* istanbul ignore next */ []));
|
|
581
656
|
icons = addIcons({ elementCancel });
|
|
582
657
|
hasPendingFocus = false;
|
|
583
|
-
operatorInput = viewChild('operatorInput',
|
|
584
|
-
|
|
658
|
+
operatorInput = viewChild('operatorInput', /* @ts-ignore */
|
|
659
|
+
...(ngDevMode ? [{ debugName: "operatorInput" }] : /* istanbul ignore next */ []));
|
|
660
|
+
valueInput = viewChild(SiFilteredSearchValueBase, /* @ts-ignore */
|
|
661
|
+
...(ngDevMode ? [{ debugName: "valueInput" }] : /* istanbul ignore next */ []));
|
|
585
662
|
type = computed(() => {
|
|
586
663
|
// Check if this is a free text criterion first
|
|
587
664
|
const definition = this.definition();
|
|
@@ -594,7 +671,8 @@ class SiFilteredSearchValueComponent {
|
|
|
594
671
|
}
|
|
595
672
|
// Handle multi-select vs single-select for other validation types.
|
|
596
673
|
return definition.multiSelect ? 'multi-select' : 'typeahead';
|
|
597
|
-
},
|
|
674
|
+
}, /* @ts-ignore */
|
|
675
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
598
676
|
selectedOperatorIndex = computed(() => {
|
|
599
677
|
const operator = this.value().operator;
|
|
600
678
|
const operators = this.definition().operators;
|
|
@@ -602,14 +680,16 @@ class SiFilteredSearchValueComponent {
|
|
|
602
680
|
return -1;
|
|
603
681
|
}
|
|
604
682
|
return operators.findIndex(op => op.includes(operator));
|
|
605
|
-
},
|
|
683
|
+
}, /* @ts-ignore */
|
|
684
|
+
...(ngDevMode ? [{ debugName: "selectedOperatorIndex" }] : /* istanbul ignore next */ []));
|
|
606
685
|
longestOperatorLength = computed(() => {
|
|
607
686
|
const operators = this.definition().operators;
|
|
608
687
|
if (!operators) {
|
|
609
688
|
return 0;
|
|
610
689
|
}
|
|
611
690
|
return Math.max(...operators.map(a => a.length));
|
|
612
|
-
},
|
|
691
|
+
}, /* @ts-ignore */
|
|
692
|
+
...(ngDevMode ? [{ debugName: "longestOperatorLength" }] : /* istanbul ignore next */ []));
|
|
613
693
|
ngOnInit() {
|
|
614
694
|
if (this.editOnCreation() && this.type() !== 'free-text') {
|
|
615
695
|
this.edit();
|
|
@@ -689,10 +769,10 @@ class SiFilteredSearchValueComponent {
|
|
|
689
769
|
this.deleteCriterion.emit({ triggerSearch: true });
|
|
690
770
|
}
|
|
691
771
|
}
|
|
692
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
693
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiFilteredSearchValueComponent, isStandalone: true, selector: "si-filtered-search-value", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, definition: { classPropertyName: "definition", publicName: "definition", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, onlySelectValue: { classPropertyName: "onlySelectValue", publicName: "onlySelectValue", isSignal: true, isRequired: true, transformFunction: null }, maxCriteriaOptions: { classPropertyName: "maxCriteriaOptions", publicName: "maxCriteriaOptions", isSignal: true, isRequired: true, transformFunction: null }, optionsInScrollableView: { classPropertyName: "optionsInScrollableView", publicName: "optionsInScrollableView", isSignal: true, isRequired: true, transformFunction: null }, clearButtonLabel: { classPropertyName: "clearButtonLabel", publicName: "clearButtonLabel", isSignal: true, isRequired: true, transformFunction: null }, lazyValueProvider: { classPropertyName: "lazyValueProvider", publicName: "lazyValueProvider", isSignal: true, isRequired: false, transformFunction: null }, searchDebounceTime: { classPropertyName: "searchDebounceTime", publicName: "searchDebounceTime", isSignal: true, isRequired: true, transformFunction: null }, itemCountText: { classPropertyName: "itemCountText", publicName: "itemCountText", isSignal: true, isRequired: true, transformFunction: null }, disableSelectionByColonAndSemicolon: { classPropertyName: "disableSelectionByColonAndSemicolon", publicName: "disableSelectionByColonAndSemicolon", isSignal: true, isRequired: true, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: true, transformFunction: null }, invalidCriterion: { classPropertyName: "invalidCriterion", publicName: "invalidCriterion", isSignal: true, isRequired: true, transformFunction: null }, isStrictOrOnlySelectValue: { classPropertyName: "isStrictOrOnlySelectValue", publicName: "isStrictOrOnlySelectValue", isSignal: true, isRequired: true, transformFunction: null }, editOnCreation: { classPropertyName: "editOnCreation", publicName: "editOnCreation", isSignal: true, isRequired: true, transformFunction: null }, scrollStrategyFactory: { classPropertyName: "scrollStrategyFactory", publicName: "scrollStrategyFactory", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { value: "valueChange", deleteCriterion: "deleteCriterion", submitCriterion: "submitCriterion" }, viewQueries: [{ propertyName: "operatorInput", first: true, predicate: ["operatorInput"], descendants: true, isSignal: true }, { propertyName: "valueInput", first: true, predicate: SiFilteredSearchValueBase, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n cdkMonitorSubtreeFocus\n class=\"criteria pill-group\"\n [class.disabled]=\"disabled()\"\n [attr.aria-disabled]=\"disabled()\"\n [class.invalid-criterion]=\"invalidCriterion()\"\n (cdkFocusChange)=\"focusChange($event)\"\n>\n @if (type() !== 'free-text') {\n <div class=\"pill pill-interactive criterion-label si-h5\" (click)=\"edit()\">\n {{ definition().label | translate }}\n </div>\n }\n @if (definition().operators?.length) {\n <div class=\"pill pill-interactive px-0 criterion-operator-section\">\n <!-- criterion operator input -->\n @if (active()) {\n <input\n #operatorInput\n type=\"text\"\n class=\"focus-inside operator-input py-0 border-0\"\n [siTypeahead]=\"definition().operators!\"\n [typeaheadScrollStrategy]=\"operatorScrollStrategy()\"\n [typeaheadProcess]=\"false\"\n [typeaheadAutoSelectIndex]=\"selectedOperatorIndex()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"0\"\n [readOnly]=\"false\"\n [typeaheadScrollable]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [attr.size]=\"longestOperatorLength()\"\n [ngModel]=\"value().operator\"\n (ngModelChange)=\"operatorUpdate($event)\"\n (keydown.backspace)=\"operatorBackspace()\"\n (keydown.enter)=\"operatorEnter()\"\n (typeaheadOnSelect)=\"operatorEnter()\"\n (blur)=\"operatorBlur()\"\n />\n } @else {\n <!-- criterion operator field -->\n <div\n class=\"criterion-operator-text px-2 focus-inside\"\n [tabindex]=\"!disabled() ? 0 : -1\"\n (keydown.enter)=\"edit('operator')\"\n (click)=\"edit('operator')\"\n >\n {{ value().operator }}\n </div>\n }\n </div>\n }\n @switch (type()) {\n @case ('free-text') {\n <si-filtered-search-free-text\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n (activeChange)=\"freeTextActiveChange($event)\"\n />\n }\n @case ('date') {\n <si-filtered-search-date-value\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [scrollStrategy]=\"datepickerScrollStrategy()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n />\n }\n @case ('multi-select') {\n <si-filtered-search-multi-select\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [scrollStrategy]=\"multiSelectScrollStrategy()\"\n [searchDebounceTime]=\"searchDebounceTime()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [maxCriteriaOptions]=\"maxCriteriaOptions()\"\n [lazyValueProvider]=\"lazyValueProvider()\"\n [itemCountText]=\"itemCountText()\"\n [isStrictOrOnlySelectValue]=\"isStrictOrOnlySelectValue()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n />\n }\n @case ('typeahead') {\n <si-filtered-search-typeahead\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [scrollStrategy]=\"typeaheadScrollStrategy()\"\n [searchDebounceTime]=\"searchDebounceTime()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [maxCriteriaOptions]=\"maxCriteriaOptions()\"\n [lazyValueProvider]=\"lazyValueProvider()\"\n [isStrictOrOnlySelectValue]=\"isStrictOrOnlySelectValue()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n />\n }\n }\n <div class=\"pill px-0 ms-n1\">\n <button\n type=\"button\"\n class=\"btn btn-circle btn-sm btn-tertiary-ghost focus-inside\"\n [attr.aria-label]=\"clearButtonLabel() | translate\"\n [disabled]=\"disabled()\"\n (click)=\"clear()\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n</div>\n", styles: [".criteria{cursor:pointer;white-space:nowrap}.criteria.invalid-criterion{border-radius:.75rem;box-shadow:0 0 0 1px var(--element-status-danger)}.criteria:not(.invalid-criterion) .invalid-criterion{box-shadow:inset 0 0 0 1px var(--element-status-danger)}.criteria.disabled{cursor:inherit;pointer-events:none}.operator-input{padding-inline:4px;inline-size:calc(1ch + 8px)}input{background:transparent}\n"], dependencies: [{ kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: SiTypeaheadDirective, selector: "[siTypeahead]", inputs: ["siTypeahead", "typeaheadProcess", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadOptionsLimit", "typeaheadScrollableAdditionalHeight", "typeaheadAutoSelectIndex", "typeaheadCloseOnEsc", "typeaheadClearValueOnSelect", "typeaheadWaitMs", "typeaheadMinLength", "typeaheadOptionField", "typeaheadMultiSelect", "typeaheadTokenize", "typeaheadMatchAllTokens", "typeaheadItemTemplate", "typeaheadSkipSortingMatches", "typeaheadAutocompleteListLabel", "typeaheadFullWidth", "typeaheadScrollStrategy", "typeaheadCreateOption"], outputs: ["typeaheadOnInput", "typeaheadOnSelect", "typeaheadOnFullMatch", "typeaheadOpenChange", "typeaheadOnCreateOption"], exportAs: ["si-typeahead"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiFilteredSearchDateValueComponent, selector: "si-filtered-search-date-value", inputs: ["scrollStrategy"] }, { kind: "component", type: SiFilteredSearchFreeTextComponent, selector: "si-filtered-search-free-text" }, { kind: "component", type: SiFilteredSearchTypeaheadComponent, selector: "si-filtered-search-typeahead", inputs: ["scrollStrategy"] }, { kind: "component", type: SiFilteredSearchMultiSelectComponent, selector: "si-filtered-search-multi-select", inputs: ["itemCountText", "scrollStrategy"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
772
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
773
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiFilteredSearchValueComponent, isStandalone: true, selector: "si-filtered-search-value", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, definition: { classPropertyName: "definition", publicName: "definition", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, onlySelectValue: { classPropertyName: "onlySelectValue", publicName: "onlySelectValue", isSignal: true, isRequired: true, transformFunction: null }, maxCriteriaOptions: { classPropertyName: "maxCriteriaOptions", publicName: "maxCriteriaOptions", isSignal: true, isRequired: true, transformFunction: null }, optionsInScrollableView: { classPropertyName: "optionsInScrollableView", publicName: "optionsInScrollableView", isSignal: true, isRequired: true, transformFunction: null }, clearButtonLabel: { classPropertyName: "clearButtonLabel", publicName: "clearButtonLabel", isSignal: true, isRequired: true, transformFunction: null }, lazyValueProvider: { classPropertyName: "lazyValueProvider", publicName: "lazyValueProvider", isSignal: true, isRequired: false, transformFunction: null }, searchDebounceTime: { classPropertyName: "searchDebounceTime", publicName: "searchDebounceTime", isSignal: true, isRequired: true, transformFunction: null }, itemCountText: { classPropertyName: "itemCountText", publicName: "itemCountText", isSignal: true, isRequired: true, transformFunction: null }, disableSelectionByColonAndSemicolon: { classPropertyName: "disableSelectionByColonAndSemicolon", publicName: "disableSelectionByColonAndSemicolon", isSignal: true, isRequired: true, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: true, transformFunction: null }, invalidCriterion: { classPropertyName: "invalidCriterion", publicName: "invalidCriterion", isSignal: true, isRequired: true, transformFunction: null }, isStrictOrOnlySelectValue: { classPropertyName: "isStrictOrOnlySelectValue", publicName: "isStrictOrOnlySelectValue", isSignal: true, isRequired: true, transformFunction: null }, editOnCreation: { classPropertyName: "editOnCreation", publicName: "editOnCreation", isSignal: true, isRequired: true, transformFunction: null }, scrollStrategyFactory: { classPropertyName: "scrollStrategyFactory", publicName: "scrollStrategyFactory", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { value: "valueChange", deleteCriterion: "deleteCriterion", submitCriterion: "submitCriterion" }, viewQueries: [{ propertyName: "operatorInput", first: true, predicate: ["operatorInput"], descendants: true, isSignal: true }, { propertyName: "valueInput", first: true, predicate: SiFilteredSearchValueBase, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n cdkMonitorSubtreeFocus\n class=\"criteria pill-group\"\n [class.disabled]=\"disabled()\"\n [attr.aria-disabled]=\"disabled()\"\n [class.invalid-criterion]=\"invalidCriterion()\"\n (cdkFocusChange)=\"focusChange($event)\"\n>\n @if (type() !== 'free-text') {\n <div class=\"pill pill-interactive criterion-label si-h5\" (click)=\"edit()\">\n {{ definition().label | translate }}\n </div>\n }\n @if (definition().operators?.length) {\n <div class=\"pill pill-interactive px-0 criterion-operator-section\">\n <!-- criterion operator input -->\n @if (active()) {\n <input\n #operatorInput\n type=\"text\"\n class=\"focus-inside operator-input py-0 border-0\"\n [siTypeahead]=\"definition().operators!\"\n [typeaheadScrollStrategy]=\"operatorScrollStrategy()\"\n [typeaheadProcess]=\"false\"\n [typeaheadAutoSelectIndex]=\"selectedOperatorIndex()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"0\"\n [readOnly]=\"false\"\n [typeaheadScrollable]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [attr.size]=\"longestOperatorLength()\"\n [ngModel]=\"value().operator\"\n (ngModelChange)=\"operatorUpdate($event)\"\n (keydown.backspace)=\"operatorBackspace()\"\n (keydown.enter)=\"operatorEnter()\"\n (typeaheadOnSelect)=\"operatorEnter()\"\n (blur)=\"operatorBlur()\"\n />\n } @else {\n <!-- criterion operator field -->\n <div\n class=\"criterion-operator-text px-2 focus-inside\"\n [tabindex]=\"!disabled() ? 0 : -1\"\n (keydown.enter)=\"edit('operator')\"\n (click)=\"edit('operator')\"\n >\n {{ value().operator }}\n </div>\n }\n </div>\n }\n @switch (type()) {\n @case ('free-text') {\n <si-filtered-search-free-text\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n (activeChange)=\"freeTextActiveChange($event)\"\n />\n }\n @case ('date') {\n <si-filtered-search-date-value\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [scrollStrategy]=\"datepickerScrollStrategy()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n />\n }\n @case ('multi-select') {\n <si-filtered-search-multi-select\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [scrollStrategy]=\"multiSelectScrollStrategy()\"\n [searchDebounceTime]=\"searchDebounceTime()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [maxCriteriaOptions]=\"maxCriteriaOptions()\"\n [lazyValueProvider]=\"lazyValueProvider()\"\n [itemCountText]=\"itemCountText()\"\n [isStrictOrOnlySelectValue]=\"isStrictOrOnlySelectValue()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n />\n }\n @case ('typeahead') {\n <si-filtered-search-typeahead\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [scrollStrategy]=\"typeaheadScrollStrategy()\"\n [searchDebounceTime]=\"searchDebounceTime()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [maxCriteriaOptions]=\"maxCriteriaOptions()\"\n [lazyValueProvider]=\"lazyValueProvider()\"\n [isStrictOrOnlySelectValue]=\"isStrictOrOnlySelectValue()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n />\n }\n }\n <div class=\"pill px-0 ms-n1\">\n <button\n type=\"button\"\n class=\"btn btn-circle btn-sm btn-tertiary-ghost focus-inside\"\n [attr.aria-label]=\"clearButtonLabel() | translate\"\n [disabled]=\"disabled()\"\n (click)=\"clear()\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n</div>\n", styles: [".criteria{cursor:pointer;white-space:nowrap}.criteria.invalid-criterion{border-radius:.75rem;box-shadow:0 0 0 1px var(--si-sys-border-danger)}.criteria:not(.invalid-criterion) .invalid-criterion{box-shadow:inset 0 0 0 1px var(--si-sys-border-danger)}.criteria.disabled{cursor:inherit;pointer-events:none}.operator-input{padding-inline:var(--si-sys-sizing-spacing-x-20);inline-size:calc(1ch + 2 * var(--si-sys-sizing-spacing-x-20))}input{background:transparent}\n"], dependencies: [{ kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: SiTypeaheadDirective, selector: "[siTypeahead]", inputs: ["siTypeahead", "typeaheadProcess", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadOptionsLimit", "typeaheadScrollableAdditionalHeight", "typeaheadAutoSelectIndex", "typeaheadCloseOnEsc", "typeaheadClearValueOnSelect", "typeaheadWaitMs", "typeaheadMinLength", "typeaheadOptionField", "typeaheadMultiSelect", "typeaheadTokenize", "typeaheadMatchAllTokens", "typeaheadItemTemplate", "typeaheadSkipSortingMatches", "typeaheadAutocompleteListLabel", "typeaheadFullWidth", "typeaheadScrollStrategy", "typeaheadCreateOption"], outputs: ["typeaheadOnInput", "typeaheadOnSelect", "typeaheadOnFullMatch", "typeaheadOpenChange", "typeaheadOnCreateOption"], exportAs: ["si-typeahead"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiFilteredSearchDateValueComponent, selector: "si-filtered-search-date-value", inputs: ["scrollStrategy"] }, { kind: "component", type: SiFilteredSearchFreeTextComponent, selector: "si-filtered-search-free-text" }, { kind: "component", type: SiFilteredSearchTypeaheadComponent, selector: "si-filtered-search-typeahead", inputs: ["scrollStrategy"] }, { kind: "component", type: SiFilteredSearchMultiSelectComponent, selector: "si-filtered-search-multi-select", inputs: ["itemCountText", "scrollStrategy"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
694
774
|
}
|
|
695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchValueComponent, decorators: [{
|
|
696
776
|
type: Component,
|
|
697
777
|
args: [{ selector: 'si-filtered-search-value', imports: [
|
|
698
778
|
CdkMonitorFocus,
|
|
@@ -704,7 +784,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
704
784
|
SiFilteredSearchTypeaheadComponent,
|
|
705
785
|
SiFilteredSearchMultiSelectComponent,
|
|
706
786
|
SiIconComponent
|
|
707
|
-
],
|
|
787
|
+
], template: "<div\n cdkMonitorSubtreeFocus\n class=\"criteria pill-group\"\n [class.disabled]=\"disabled()\"\n [attr.aria-disabled]=\"disabled()\"\n [class.invalid-criterion]=\"invalidCriterion()\"\n (cdkFocusChange)=\"focusChange($event)\"\n>\n @if (type() !== 'free-text') {\n <div class=\"pill pill-interactive criterion-label si-h5\" (click)=\"edit()\">\n {{ definition().label | translate }}\n </div>\n }\n @if (definition().operators?.length) {\n <div class=\"pill pill-interactive px-0 criterion-operator-section\">\n <!-- criterion operator input -->\n @if (active()) {\n <input\n #operatorInput\n type=\"text\"\n class=\"focus-inside operator-input py-0 border-0\"\n [siTypeahead]=\"definition().operators!\"\n [typeaheadScrollStrategy]=\"operatorScrollStrategy()\"\n [typeaheadProcess]=\"false\"\n [typeaheadAutoSelectIndex]=\"selectedOperatorIndex()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"0\"\n [readOnly]=\"false\"\n [typeaheadScrollable]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [attr.size]=\"longestOperatorLength()\"\n [ngModel]=\"value().operator\"\n (ngModelChange)=\"operatorUpdate($event)\"\n (keydown.backspace)=\"operatorBackspace()\"\n (keydown.enter)=\"operatorEnter()\"\n (typeaheadOnSelect)=\"operatorEnter()\"\n (blur)=\"operatorBlur()\"\n />\n } @else {\n <!-- criterion operator field -->\n <div\n class=\"criterion-operator-text px-2 focus-inside\"\n [tabindex]=\"!disabled() ? 0 : -1\"\n (keydown.enter)=\"edit('operator')\"\n (click)=\"edit('operator')\"\n >\n {{ value().operator }}\n </div>\n }\n </div>\n }\n @switch (type()) {\n @case ('free-text') {\n <si-filtered-search-free-text\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n (activeChange)=\"freeTextActiveChange($event)\"\n />\n }\n @case ('date') {\n <si-filtered-search-date-value\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [scrollStrategy]=\"datepickerScrollStrategy()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n />\n }\n @case ('multi-select') {\n <si-filtered-search-multi-select\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [scrollStrategy]=\"multiSelectScrollStrategy()\"\n [searchDebounceTime]=\"searchDebounceTime()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [maxCriteriaOptions]=\"maxCriteriaOptions()\"\n [lazyValueProvider]=\"lazyValueProvider()\"\n [itemCountText]=\"itemCountText()\"\n [isStrictOrOnlySelectValue]=\"isStrictOrOnlySelectValue()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n />\n }\n @case ('typeahead') {\n <si-filtered-search-typeahead\n [definition]=\"definition()\"\n [disabled]=\"disabled()\"\n [searchLabel]=\"searchLabel()\"\n [scrollStrategy]=\"typeaheadScrollStrategy()\"\n [searchDebounceTime]=\"searchDebounceTime()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [maxCriteriaOptions]=\"maxCriteriaOptions()\"\n [lazyValueProvider]=\"lazyValueProvider()\"\n [isStrictOrOnlySelectValue]=\"isStrictOrOnlySelectValue()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [(active)]=\"active\"\n [(criterionValue)]=\"value\"\n (backspaceOverflow)=\"backspaceOverflow()\"\n (editValue)=\"edit('value')\"\n (submitValue)=\"submitCriterion.emit($event)\"\n />\n }\n }\n <div class=\"pill px-0 ms-n1\">\n <button\n type=\"button\"\n class=\"btn btn-circle btn-sm btn-tertiary-ghost focus-inside\"\n [attr.aria-label]=\"clearButtonLabel() | translate\"\n [disabled]=\"disabled()\"\n (click)=\"clear()\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n</div>\n", styles: [".criteria{cursor:pointer;white-space:nowrap}.criteria.invalid-criterion{border-radius:.75rem;box-shadow:0 0 0 1px var(--si-sys-border-danger)}.criteria:not(.invalid-criterion) .invalid-criterion{box-shadow:inset 0 0 0 1px var(--si-sys-border-danger)}.criteria.disabled{cursor:inherit;pointer-events:none}.operator-input{padding-inline:var(--si-sys-sizing-spacing-x-20);inline-size:calc(1ch + 2 * var(--si-sys-sizing-spacing-x-20))}input{background:transparent}\n"] }]
|
|
708
788
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }, { type: i0.Output, args: ["valueChange"] }], definition: [{ type: i0.Input, args: [{ isSignal: true, alias: "definition", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: true }] }], onlySelectValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlySelectValue", required: true }] }], maxCriteriaOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCriteriaOptions", required: true }] }], optionsInScrollableView: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsInScrollableView", required: true }] }], clearButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearButtonLabel", required: true }] }], lazyValueProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyValueProvider", required: false }] }], searchDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchDebounceTime", required: true }] }], itemCountText: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemCountText", required: true }] }], disableSelectionByColonAndSemicolon: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSelectionByColonAndSemicolon", required: true }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: true }] }], invalidCriterion: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidCriterion", required: true }] }], isStrictOrOnlySelectValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "isStrictOrOnlySelectValue", required: true }] }], editOnCreation: [{ type: i0.Input, args: [{ isSignal: true, alias: "editOnCreation", required: true }] }], scrollStrategyFactory: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategyFactory", required: true }] }], deleteCriterion: [{ type: i0.Output, args: ["deleteCriterion"] }], submitCriterion: [{ type: i0.Output, args: ["submitCriterion"] }], operatorInput: [{ type: i0.ViewChild, args: ['operatorInput', { isSignal: true }] }], valueInput: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiFilteredSearchValueBase), { isSignal: true }] }] } });
|
|
709
789
|
|
|
710
790
|
/**
|
|
@@ -717,7 +797,8 @@ class SiFilteredSearchComponent {
|
|
|
717
797
|
*
|
|
718
798
|
* @defaultValue defaultConnectedOverlayScrollStrategyFactory()
|
|
719
799
|
*/
|
|
720
|
-
scrollStrategy = input(defaultConnectedOverlayScrollStrategyFactory(),
|
|
800
|
+
scrollStrategy = input(defaultConnectedOverlayScrollStrategyFactory(), /* @ts-ignore */
|
|
801
|
+
...(ngDevMode ? [{ debugName: "scrollStrategy" }] : /* istanbul ignore next */ []));
|
|
721
802
|
/**
|
|
722
803
|
* Output callback event that provides an object describing the
|
|
723
804
|
* selected criteria and additional filter text.
|
|
@@ -730,49 +811,52 @@ class SiFilteredSearchComponent {
|
|
|
730
811
|
*
|
|
731
812
|
* @defaultValue false
|
|
732
813
|
*/
|
|
733
|
-
doSearchOnInputChange = input(false, { ...(ngDevMode ? { debugName: "doSearchOnInputChange" } : {}), transform: booleanAttribute });
|
|
814
|
+
doSearchOnInputChange = input(false, { ...(ngDevMode ? { debugName: "doSearchOnInputChange" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
734
815
|
/**
|
|
735
816
|
* In addition to lazy loaded value, you can also lazy load the criteria itself
|
|
736
817
|
*/
|
|
737
|
-
lazyCriterionProvider = input(
|
|
818
|
+
lazyCriterionProvider = input(/* @ts-ignore */
|
|
819
|
+
...(ngDevMode ? [undefined, { debugName: "lazyCriterionProvider" }] : /* istanbul ignore next */ []));
|
|
738
820
|
/**
|
|
739
821
|
* In many cases, your application defines the criteria, but the values need
|
|
740
822
|
* to be loaded from a server. In this case you can provide a function that
|
|
741
823
|
* returns the possible criterion options as an Observable.
|
|
742
824
|
*/
|
|
743
|
-
lazyValueProvider = input(
|
|
825
|
+
lazyValueProvider = input(/* @ts-ignore */
|
|
826
|
+
...(ngDevMode ? [undefined, { debugName: "lazyValueProvider" }] : /* istanbul ignore next */ []));
|
|
744
827
|
/**
|
|
745
828
|
* Disable any interactivity.
|
|
746
829
|
*
|
|
747
830
|
* @defaultValue false
|
|
748
831
|
*/
|
|
749
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
832
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
750
833
|
/**
|
|
751
834
|
* Limit criteria to the predefined ones.
|
|
752
835
|
*
|
|
753
836
|
* @defaultValue false
|
|
754
837
|
*/
|
|
755
|
-
strictCriterion = input(false, { ...(ngDevMode ? { debugName: "strictCriterion" } : {}), transform: booleanAttribute });
|
|
838
|
+
strictCriterion = input(false, { ...(ngDevMode ? { debugName: "strictCriterion" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
756
839
|
/**
|
|
757
840
|
* Limit criterion options to the predefined ones. `[strictValue]`
|
|
758
841
|
* enforces `[strictCriterion]` to true automatically.
|
|
759
842
|
*
|
|
760
843
|
* @defaultValue false
|
|
761
844
|
*/
|
|
762
|
-
strictValue = input(false, { ...(ngDevMode ? { debugName: "strictValue" } : {}), transform: booleanAttribute });
|
|
845
|
+
strictValue = input(false, { ...(ngDevMode ? { debugName: "strictValue" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
763
846
|
/**
|
|
764
847
|
* Limit criterion options to the predefined ones and prevent typing. `[onlySelectValue]`
|
|
765
848
|
* enforces `[strictValue]` and `[strictCriterion]` to true automatically.
|
|
766
849
|
*
|
|
767
850
|
* @defaultValue false
|
|
768
851
|
*/
|
|
769
|
-
onlySelectValue = input(false, { ...(ngDevMode ? { debugName: "onlySelectValue" } : {}), transform: booleanAttribute });
|
|
852
|
+
onlySelectValue = input(false, { ...(ngDevMode ? { debugName: "onlySelectValue" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
770
853
|
/**
|
|
771
854
|
* Custom debounce time for lazy loading of criteria data.
|
|
772
855
|
*
|
|
773
856
|
* @defaultValue 500
|
|
774
857
|
*/
|
|
775
|
-
lazyLoadingDebounceTime = input(500,
|
|
858
|
+
lazyLoadingDebounceTime = input(500, /* @ts-ignore */
|
|
859
|
+
...(ngDevMode ? [{ debugName: "lazyLoadingDebounceTime" }] : /* istanbul ignore next */ []));
|
|
776
860
|
/**
|
|
777
861
|
* Custom debounce time (in mills) to delay the search emission.
|
|
778
862
|
* (Default is 0 as in most cases a users manually triggers a search.
|
|
@@ -780,19 +864,22 @@ class SiFilteredSearchComponent {
|
|
|
780
864
|
*
|
|
781
865
|
* @defaultValue 0
|
|
782
866
|
*/
|
|
783
|
-
searchDebounceTime = input(0,
|
|
867
|
+
searchDebounceTime = input(0, /* @ts-ignore */
|
|
868
|
+
...(ngDevMode ? [{ debugName: "searchDebounceTime" }] : /* istanbul ignore next */ []));
|
|
784
869
|
/**
|
|
785
870
|
* The placeholder for input field.
|
|
786
871
|
*
|
|
787
872
|
* @defaultValue ''
|
|
788
873
|
*/
|
|
789
|
-
placeholder = input('',
|
|
874
|
+
placeholder = input('', /* @ts-ignore */
|
|
875
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
790
876
|
/**
|
|
791
877
|
* Defines the number of criteria, criteria values and operators visible at once.
|
|
792
878
|
*
|
|
793
879
|
* @defaultValue 10
|
|
794
880
|
*/
|
|
795
|
-
optionsInScrollableView = input(10,
|
|
881
|
+
optionsInScrollableView = input(10, /* @ts-ignore */
|
|
882
|
+
...(ngDevMode ? [{ debugName: "optionsInScrollableView" }] : /* istanbul ignore next */ []));
|
|
796
883
|
/**
|
|
797
884
|
* The current selected search criteria and entered search text.
|
|
798
885
|
*
|
|
@@ -801,19 +888,21 @@ class SiFilteredSearchComponent {
|
|
|
801
888
|
* { criteria: [], value: '' }
|
|
802
889
|
* ```
|
|
803
890
|
*/
|
|
804
|
-
searchCriteria = model({ criteria: [], value: '' },
|
|
891
|
+
searchCriteria = model({ criteria: [], value: '' }, /* @ts-ignore */
|
|
892
|
+
...(ngDevMode ? [{ debugName: "searchCriteria" }] : /* istanbul ignore next */ []));
|
|
805
893
|
/**
|
|
806
894
|
* Predefine criteria options.
|
|
807
895
|
*
|
|
808
896
|
* @defaultValue []
|
|
809
897
|
*/
|
|
810
|
-
criteria = input([],
|
|
898
|
+
criteria = input([], /* @ts-ignore */
|
|
899
|
+
...(ngDevMode ? [{ debugName: "criteria" }] : /* istanbul ignore next */ []));
|
|
811
900
|
/**
|
|
812
901
|
* Opt-in to search for each criterion only once.
|
|
813
902
|
*
|
|
814
903
|
* @defaultValue false
|
|
815
904
|
*/
|
|
816
|
-
exclusiveCriteria = input(false, { ...(ngDevMode ? { debugName: "exclusiveCriteria" } : {}), transform: booleanAttribute });
|
|
905
|
+
exclusiveCriteria = input(false, { ...(ngDevMode ? { debugName: "exclusiveCriteria" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
817
906
|
/**
|
|
818
907
|
* Limit the number of possible criteria. The default is undefined so that any number of criteria can be used.
|
|
819
908
|
* For example, setting the value to 1 let you only select one criterion that you need to remove before being
|
|
@@ -821,22 +910,25 @@ class SiFilteredSearchComponent {
|
|
|
821
910
|
*
|
|
822
911
|
* @defaultValue undefined
|
|
823
912
|
*/
|
|
824
|
-
maxCriteria = input(undefined,
|
|
913
|
+
maxCriteria = input(undefined, /* @ts-ignore */
|
|
914
|
+
...(ngDevMode ? [{ debugName: "maxCriteria" }] : /* istanbul ignore next */ []));
|
|
825
915
|
/**
|
|
826
916
|
* Defines the maximum options within one criterion. The default is 20 and 0 means unlimited.
|
|
827
917
|
*
|
|
828
918
|
* @defaultValue 20
|
|
829
919
|
*/
|
|
830
|
-
maxCriteriaOptions = input(20,
|
|
920
|
+
maxCriteriaOptions = input(20, /* @ts-ignore */
|
|
921
|
+
...(ngDevMode ? [{ debugName: "maxCriteriaOptions" }] : /* istanbul ignore next */ []));
|
|
831
922
|
/**
|
|
832
923
|
* Search input aria label, Needed by a11y
|
|
833
924
|
*
|
|
834
925
|
* @defaultValue
|
|
835
926
|
* ```
|
|
836
|
-
* t(() => $localize`:@@SI_FILTERED_SEARCH.SEARCH:Search
|
|
927
|
+
* t(() => $localize`:@@SI_FILTERED_SEARCH.SEARCH:Search…`)
|
|
837
928
|
* ```
|
|
838
929
|
*/
|
|
839
|
-
searchLabel = input(t(() => $localize `:@@SI_FILTERED_SEARCH.SEARCH:Search
|
|
930
|
+
searchLabel = input(t(() => $localize `:@@SI_FILTERED_SEARCH.SEARCH:Search…`), /* @ts-ignore */
|
|
931
|
+
...(ngDevMode ? [{ debugName: "searchLabel" }] : /* istanbul ignore next */ []));
|
|
840
932
|
/**
|
|
841
933
|
* Clear button aria label. Needed for a11y
|
|
842
934
|
*
|
|
@@ -845,44 +937,49 @@ class SiFilteredSearchComponent {
|
|
|
845
937
|
* t(() => $localize`:@@SI_FILTERED_SEARCH.CLEAR:Clear`)
|
|
846
938
|
* ```
|
|
847
939
|
*/
|
|
848
|
-
clearButtonLabel = input(t(() => $localize `:@@SI_FILTERED_SEARCH.CLEAR:Clear`),
|
|
940
|
+
clearButtonLabel = input(t(() => $localize `:@@SI_FILTERED_SEARCH.CLEAR:Clear`), /* @ts-ignore */
|
|
941
|
+
...(ngDevMode ? [{ debugName: "clearButtonLabel" }] : /* istanbul ignore next */ []));
|
|
849
942
|
/**
|
|
850
943
|
* The accessible label of the search button.
|
|
851
944
|
*
|
|
852
945
|
* @defaultValue
|
|
853
946
|
* ```
|
|
854
|
-
* t(() => $localize`:@@SI_FILTERED_SEARCH.SUBMIT_BUTTON:
|
|
947
|
+
* t(() => $localize`:@@SI_FILTERED_SEARCH.SUBMIT_BUTTON:Apply search criteria`)
|
|
855
948
|
* ```
|
|
856
949
|
*/
|
|
857
|
-
submitButtonLabel = input(t(() => $localize `:@@SI_FILTERED_SEARCH.SUBMIT_BUTTON:
|
|
950
|
+
submitButtonLabel = input(t(() => $localize `:@@SI_FILTERED_SEARCH.SUBMIT_BUTTON:Apply search criteria`), /* @ts-ignore */
|
|
951
|
+
...(ngDevMode ? [{ debugName: "submitButtonLabel" }] : /* istanbul ignore next */ []));
|
|
858
952
|
/**
|
|
859
953
|
* Items count text appended to the count in case of multi-selection of values.
|
|
860
954
|
* Translation key, `{{itemCount}}` in the translation will be replaced with the actual value.
|
|
861
955
|
*
|
|
862
956
|
* @defaultValue
|
|
863
957
|
* ```
|
|
864
|
-
* t(() => $localize`:@@SI_FILTERED_SEARCH.ITEM_COUNT:{{itemCount}}
|
|
958
|
+
* t(() => $localize`:@@SI_FILTERED_SEARCH.ITEM_COUNT:{{itemCount}} selected`)
|
|
865
959
|
* ```
|
|
866
960
|
*/
|
|
867
|
-
itemCountText = input(t(() => $localize `:@@SI_FILTERED_SEARCH.ITEM_COUNT:{{itemCount}}
|
|
961
|
+
itemCountText = input(t(() => $localize `:@@SI_FILTERED_SEARCH.ITEM_COUNT:{{itemCount}} selected`), /* @ts-ignore */
|
|
962
|
+
...(ngDevMode ? [{ debugName: "itemCountText" }] : /* istanbul ignore next */ []));
|
|
868
963
|
/**
|
|
869
964
|
* Color variant to determine component background
|
|
870
965
|
*
|
|
871
966
|
* @defaultValue 'base-1'
|
|
872
967
|
*/
|
|
873
|
-
colorVariant = input('base-1',
|
|
968
|
+
colorVariant = input('base-1', /* @ts-ignore */
|
|
969
|
+
...(ngDevMode ? [{ debugName: "colorVariant" }] : /* istanbul ignore next */ []));
|
|
874
970
|
/**
|
|
875
971
|
* Disables the free text search to only use the criterion for filtering.
|
|
876
972
|
*
|
|
877
973
|
* @defaultValue false
|
|
878
974
|
*/
|
|
879
|
-
disableFreeTextSearch = input(false, { ...(ngDevMode ? { debugName: "disableFreeTextSearch" } : {}), transform: booleanAttribute });
|
|
975
|
+
disableFreeTextSearch = input(false, { ...(ngDevMode ? { debugName: "disableFreeTextSearch" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
880
976
|
/**
|
|
881
977
|
* Limit on the number of criteria/criteria value to be displayed by the typeahead
|
|
882
978
|
*
|
|
883
979
|
* @defaultValue 20
|
|
884
980
|
*/
|
|
885
|
-
typeaheadOptionsLimit = input(20,
|
|
981
|
+
typeaheadOptionsLimit = input(20, /* @ts-ignore */
|
|
982
|
+
...(ngDevMode ? [{ debugName: "typeaheadOptionsLimit" }] : /* istanbul ignore next */ []));
|
|
886
983
|
/**
|
|
887
984
|
* By default, the Filtered Search will treat `:` as a special character
|
|
888
985
|
* to submit the current input in the freetext and immediately create a criterion.
|
|
@@ -890,7 +987,7 @@ class SiFilteredSearchComponent {
|
|
|
890
987
|
*
|
|
891
988
|
* @defaultValue false
|
|
892
989
|
*/
|
|
893
|
-
disableSelectionByColonAndSemicolon = input(false, { ...(ngDevMode ? { debugName: "disableSelectionByColonAndSemicolon" } : {}), transform: booleanAttribute });
|
|
990
|
+
disableSelectionByColonAndSemicolon = input(false, { ...(ngDevMode ? { debugName: "disableSelectionByColonAndSemicolon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
894
991
|
/**
|
|
895
992
|
* Criterion definition for free-text pills.
|
|
896
993
|
* When set, free-text values will be added as a pill with this criterion.
|
|
@@ -902,7 +999,8 @@ class SiFilteredSearchComponent {
|
|
|
902
999
|
*
|
|
903
1000
|
* @experimental
|
|
904
1001
|
*/
|
|
905
|
-
freeTextCriterion = input(
|
|
1002
|
+
freeTextCriterion = input(/* @ts-ignore */
|
|
1003
|
+
...(ngDevMode ? [undefined, { debugName: "freeTextCriterion" }] : /* istanbul ignore next */ []));
|
|
906
1004
|
/**
|
|
907
1005
|
* The value to be shown for creating free-text pills.
|
|
908
1006
|
* Use the `{{query}}` placeholder to show the user input in the label.
|
|
@@ -915,7 +1013,8 @@ class SiFilteredSearchComponent {
|
|
|
915
1013
|
*
|
|
916
1014
|
* @experimental
|
|
917
1015
|
*/
|
|
918
|
-
searchForFreeTextLabel = input(t(() => $localize `:@@SI_FILTERED_SEARCH.SEARCH_FOR_FREE_TEXT:Search for "{{query}}"`),
|
|
1016
|
+
searchForFreeTextLabel = input(t(() => $localize `:@@SI_FILTERED_SEARCH.SEARCH_FOR_FREE_TEXT:Search for "{{query}}"`), /* @ts-ignore */
|
|
1017
|
+
...(ngDevMode ? [{ debugName: "searchForFreeTextLabel" }] : /* istanbul ignore next */ []));
|
|
919
1018
|
/**
|
|
920
1019
|
* The interceptor is called when the list of criteria is shown as soon as the user starts typing in the input field.
|
|
921
1020
|
* The interceptor's {@link DisplayedCriteriaEventArgs.allow} method can be used to filter the list of displayed criteria.
|
|
@@ -936,13 +1035,17 @@ class SiFilteredSearchComponent {
|
|
|
936
1035
|
* ```
|
|
937
1036
|
*/
|
|
938
1037
|
interceptDisplayedCriteria = output();
|
|
939
|
-
freeTextInput = viewChild.required(SiFilteredSearchInputComponent
|
|
940
|
-
|
|
941
|
-
|
|
1038
|
+
freeTextInput = viewChild.required(SiFilteredSearchInputComponent, /* @ts-ignore */
|
|
1039
|
+
...(ngDevMode ? [{ debugName: "freeTextInput" }] : /* istanbul ignore next */ []));
|
|
1040
|
+
scrollContainer = viewChild.required('scrollContainer', { ...(ngDevMode ? { debugName: "scrollContainer" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
1041
|
+
valueComponents = viewChildren(SiFilteredSearchValueComponent, /* @ts-ignore */
|
|
1042
|
+
...(ngDevMode ? [{ debugName: "valueComponents" }] : /* istanbul ignore next */ []));
|
|
942
1043
|
dataSource;
|
|
943
1044
|
autoEditCriteria = false;
|
|
944
|
-
values = signal([],
|
|
945
|
-
|
|
1045
|
+
values = signal([], /* @ts-ignore */
|
|
1046
|
+
...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
|
|
1047
|
+
searchValue = signal('', /* @ts-ignore */
|
|
1048
|
+
...(ngDevMode ? [{ debugName: "searchValue" }] : /* istanbul ignore next */ []));
|
|
946
1049
|
/** Internal criteria model */
|
|
947
1050
|
internalCriterionDefinitions = [];
|
|
948
1051
|
icons = addIcons({ elementCancel, elementSearch });
|
|
@@ -952,17 +1055,21 @@ class SiFilteredSearchComponent {
|
|
|
952
1055
|
translateService = injectSiTranslateService();
|
|
953
1056
|
locale = inject(LOCALE_ID).toString();
|
|
954
1057
|
freeTextFocused = new Subject();
|
|
955
|
-
allowFreeTextCache = signal(true,
|
|
1058
|
+
allowFreeTextCache = signal(true, /* @ts-ignore */
|
|
1059
|
+
...(ngDevMode ? [{ debugName: "allowFreeTextCache" }] : /* istanbul ignore next */ []));
|
|
956
1060
|
// Angular also calls ngOnChanges if we emitted a change and then two-way-databinding writes back our own change.
|
|
957
1061
|
// We use this to ensure that we do not write our own change back to the input.
|
|
958
1062
|
lastEmittedSearchCriteria;
|
|
959
1063
|
isStrictOrOnlySelectValue = computed(() => {
|
|
960
1064
|
return this.strictValue() || this.onlySelectValue();
|
|
961
|
-
},
|
|
1065
|
+
}, /* @ts-ignore */
|
|
1066
|
+
...(ngDevMode ? [{ debugName: "isStrictOrOnlySelectValue" }] : /* istanbul ignore next */ []));
|
|
962
1067
|
strictCriterionOrValue = computed(() => {
|
|
963
1068
|
return this.strictCriterion() || this.isStrictOrOnlySelectValue();
|
|
964
|
-
},
|
|
965
|
-
|
|
1069
|
+
}, /* @ts-ignore */
|
|
1070
|
+
...(ngDevMode ? [{ debugName: "strictCriterionOrValue" }] : /* istanbul ignore next */ []));
|
|
1071
|
+
lazyLoadedCriteria = signal(undefined, /* @ts-ignore */
|
|
1072
|
+
...(ngDevMode ? [{ debugName: "lazyLoadedCriteria" }] : /* istanbul ignore next */ []));
|
|
966
1073
|
loadedCriteria = computed(() => {
|
|
967
1074
|
const lazyLoadedCriteria = this.lazyLoadedCriteria();
|
|
968
1075
|
if (lazyLoadedCriteria) {
|
|
@@ -971,7 +1078,8 @@ class SiFilteredSearchComponent {
|
|
|
971
1078
|
else {
|
|
972
1079
|
return this.criteria() ?? [];
|
|
973
1080
|
}
|
|
974
|
-
},
|
|
1081
|
+
}, /* @ts-ignore */
|
|
1082
|
+
...(ngDevMode ? [{ debugName: "loadedCriteria" }] : /* istanbul ignore next */ []));
|
|
975
1083
|
internalFreeTextCriterion = computed(() => {
|
|
976
1084
|
const freeTextDef = this.freeTextCriterion();
|
|
977
1085
|
if (!freeTextDef) {
|
|
@@ -983,7 +1091,8 @@ class SiFilteredSearchComponent {
|
|
|
983
1091
|
translatedLabel: freeTextDef.label ?? freeTextDef.name,
|
|
984
1092
|
type: 'free-text'
|
|
985
1093
|
};
|
|
986
|
-
},
|
|
1094
|
+
}, /* @ts-ignore */
|
|
1095
|
+
...(ngDevMode ? [{ debugName: "internalFreeTextCriterion" }] : /* istanbul ignore next */ []));
|
|
987
1096
|
constructor() {
|
|
988
1097
|
const typeaheadInputChange = merge(toObservable(this.searchValue), this.freeTextFocused.pipe(map(() => this.searchValue())));
|
|
989
1098
|
const criteriaRestrictions = toObservable(computed(() => ({
|
|
@@ -1289,20 +1398,20 @@ class SiFilteredSearchComponent {
|
|
|
1289
1398
|
]);
|
|
1290
1399
|
this.emitChangeEvent();
|
|
1291
1400
|
}
|
|
1292
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1293
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiFilteredSearchComponent, isStandalone: true, selector: "si-filtered-search", inputs: { scrollStrategy: { classPropertyName: "scrollStrategy", publicName: "scrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, doSearchOnInputChange: { classPropertyName: "doSearchOnInputChange", publicName: "doSearchOnInputChange", isSignal: true, isRequired: false, transformFunction: null }, lazyCriterionProvider: { classPropertyName: "lazyCriterionProvider", publicName: "lazyCriterionProvider", isSignal: true, isRequired: false, transformFunction: null }, lazyValueProvider: { classPropertyName: "lazyValueProvider", publicName: "lazyValueProvider", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, strictCriterion: { classPropertyName: "strictCriterion", publicName: "strictCriterion", isSignal: true, isRequired: false, transformFunction: null }, strictValue: { classPropertyName: "strictValue", publicName: "strictValue", isSignal: true, isRequired: false, transformFunction: null }, onlySelectValue: { classPropertyName: "onlySelectValue", publicName: "onlySelectValue", isSignal: true, isRequired: false, transformFunction: null }, lazyLoadingDebounceTime: { classPropertyName: "lazyLoadingDebounceTime", publicName: "lazyLoadingDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, searchDebounceTime: { classPropertyName: "searchDebounceTime", publicName: "searchDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, optionsInScrollableView: { classPropertyName: "optionsInScrollableView", publicName: "optionsInScrollableView", isSignal: true, isRequired: false, transformFunction: null }, searchCriteria: { classPropertyName: "searchCriteria", publicName: "searchCriteria", isSignal: true, isRequired: false, transformFunction: null }, criteria: { classPropertyName: "criteria", publicName: "criteria", isSignal: true, isRequired: false, transformFunction: null }, exclusiveCriteria: { classPropertyName: "exclusiveCriteria", publicName: "exclusiveCriteria", isSignal: true, isRequired: false, transformFunction: null }, maxCriteria: { classPropertyName: "maxCriteria", publicName: "maxCriteria", isSignal: true, isRequired: false, transformFunction: null }, maxCriteriaOptions: { classPropertyName: "maxCriteriaOptions", publicName: "maxCriteriaOptions", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, clearButtonLabel: { classPropertyName: "clearButtonLabel", publicName: "clearButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, submitButtonLabel: { classPropertyName: "submitButtonLabel", publicName: "submitButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, itemCountText: { classPropertyName: "itemCountText", publicName: "itemCountText", isSignal: true, isRequired: false, transformFunction: null }, colorVariant: { classPropertyName: "colorVariant", publicName: "colorVariant", isSignal: true, isRequired: false, transformFunction: null }, disableFreeTextSearch: { classPropertyName: "disableFreeTextSearch", publicName: "disableFreeTextSearch", isSignal: true, isRequired: false, transformFunction: null }, typeaheadOptionsLimit: { classPropertyName: "typeaheadOptionsLimit", publicName: "typeaheadOptionsLimit", isSignal: true, isRequired: false, transformFunction: null }, disableSelectionByColonAndSemicolon: { classPropertyName: "disableSelectionByColonAndSemicolon", publicName: "disableSelectionByColonAndSemicolon", isSignal: true, isRequired: false, transformFunction: null }, freeTextCriterion: { classPropertyName: "freeTextCriterion", publicName: "freeTextCriterion", isSignal: true, isRequired: false, transformFunction: null }, searchForFreeTextLabel: { classPropertyName: "searchForFreeTextLabel", publicName: "searchForFreeTextLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { doSearch: "doSearch", searchCriteria: "searchCriteriaChange", interceptDisplayedCriteria: "interceptDisplayedCriteria" }, host: { properties: { "class.disabled": "disabled()", "class.dark-background": "colorVariant() === 'base-0'" } }, viewQueries: [{ propertyName: "freeTextInput", first: true, predicate: SiFilteredSearchInputComponent, descendants: true, isSignal: true }, { propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "valueComponents", predicate: SiFilteredSearchValueComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #scrollContainer\n class=\"search-container d-flex align-items-center overflow-auto py-2 w-100 ps-2 pe-2\"\n>\n @for (criterion of values(); track criterion) {\n <si-filtered-search-value\n [editOnCreation]=\"autoEditCriteria\"\n [definition]=\"criterion.config\"\n [value]=\"criterion.value\"\n [invalidCriterion]=\"!validateCriterionLabel(criterion.config)\"\n [disabled]=\"disabled()\"\n [clearButtonLabel]=\"clearButtonLabel()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [isStrictOrOnlySelectValue]=\"isStrictOrOnlySelectValue()\"\n [itemCountText]=\"itemCountText()\"\n [lazyValueProvider]=\"lazyValueProvider()\"\n [maxCriteriaOptions]=\"maxCriteriaOptions()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [searchLabel]=\"searchLabel()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [searchDebounceTime]=\"searchDebounceTime()\"\n [scrollStrategyFactory]=\"scrollStrategy()\"\n (submitCriterion)=\"focusNext($index, $event)\"\n (deleteCriterion)=\"deleteCriterion($index, $event)\"\n (valueChange)=\"valueChange($event, criterion)\"\n />\n }\n <!-- criterion input -->\n <si-filtered-search-input\n [dataSource]=\"dataSource\"\n [typeaheadOptionsLimit]=\"typeaheadOptionsLimit()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [searchLabel]=\"searchLabel()\"\n [freeTextCriterion]=\"!!freeTextCriterion()\"\n [maxCriteriaReached]=\"!!maxCriteria() && values().length >= maxCriteria()!\"\n [allowFreeText]=\"allowFreeTextCache()\"\n [searchForFreeTextLabel]=\"searchForFreeTextLabel()\"\n [scrollStrategyFactory]=\"scrollStrategy()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [(searchValue)]=\"searchValue\"\n (createCriterion)=\"onCreateCriterion($event)\"\n (createCriterionByName)=\"onCreateCriterionByName($event)\"\n (backspaceOverflow)=\"freeTextBackspace()\"\n (createFreeTextPill)=\"createFreeTextPill($event)\"\n (searchValueChange)=\"onSearchValueChange()\"\n (inputFocus)=\"freeTextFocus()\"\n (enterSubmit)=\"submit()\"\n />\n</div>\n<!-- clear all searchCriteria -->\n@if (values().length || searchValue().length) {\n <div class=\"clear-button-container\">\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary-ghost mx-2\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"clearButtonLabel() | translate\"\n (click)=\"deleteAllCriteria($event)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n}\n\n@if (!disabled()) {\n <button\n type=\"button\"\n class=\"search-button btn btn-icon btn-sm btn-secondary focus-inside\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"submitButtonLabel() | translate\"\n (click)=\"submit()\"\n >\n <si-icon [icon]=\"icons.elementSearch\" />\n </button>\n}\n", styles: [":host{--search-bar-icon-color: var(--element-text-primary);--input-background-color: var(--element-base-1);--input-background-hover-color: var(--element-base-1);--filter-search-background-color: var(--element-base-1);--filter-pill-background-color: var(--element-base-4)}:host.dark-background{--input-background-color: var(--element-base-4);--input-background-hover-color: var(--element-ui-4);--filter-search-background-color: var(--element-base-4);--filter-pill-background-color: var(--element-base-1)}:host{display:flex;align-items:center;line-height:24px;min-inline-size:0}:host.disabled{color:var(--element-text-disabled)}.search-container{border-start-start-radius:4px;border-end-start-radius:4px;background-color:var(--filter-search-background-color);gap:4px}.clear-button-container{display:flex;align-items:flex-start;align-self:stretch;padding-block:4px;background-color:var(--filter-search-background-color)}.search-button{align-self:stretch;background-color:var(--filter-search-background-color);border:0;border-radius:0;border-end-end-radius:4px;border-start-end-radius:4px;margin-block:0;margin-inline:1px 0;aspect-ratio:auto;block-size:auto;inline-size:auto;padding-inline:4px!important}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiFilteredSearchInputComponent, selector: "si-filtered-search-input", inputs: ["dataSource", "typeaheadOptionsLimit", "optionsInScrollableView", "disabled", "placeholder", "searchLabel", "scrollStrategyFactory", "searchValue", "freeTextCriterion", "maxCriteriaReached", "allowFreeText", "searchForFreeTextLabel", "disableSelectionByColonAndSemicolon", "onlySelectValue"], outputs: ["searchValueChange", "createCriterion", "createCriterionByName", "backspaceOverflow", "createFreeTextPill", "inputFocus", "enterSubmit"] }, { kind: "component", type: SiFilteredSearchValueComponent, selector: "si-filtered-search-value", inputs: ["value", "definition", "disabled", "onlySelectValue", "maxCriteriaOptions", "optionsInScrollableView", "clearButtonLabel", "lazyValueProvider", "searchDebounceTime", "itemCountText", "disableSelectionByColonAndSemicolon", "searchLabel", "invalidCriterion", "isStrictOrOnlySelectValue", "editOnCreation", "scrollStrategyFactory"], outputs: ["valueChange", "deleteCriterion", "submitCriterion"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
1401
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1402
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiFilteredSearchComponent, isStandalone: true, selector: "si-filtered-search", inputs: { scrollStrategy: { classPropertyName: "scrollStrategy", publicName: "scrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, doSearchOnInputChange: { classPropertyName: "doSearchOnInputChange", publicName: "doSearchOnInputChange", isSignal: true, isRequired: false, transformFunction: null }, lazyCriterionProvider: { classPropertyName: "lazyCriterionProvider", publicName: "lazyCriterionProvider", isSignal: true, isRequired: false, transformFunction: null }, lazyValueProvider: { classPropertyName: "lazyValueProvider", publicName: "lazyValueProvider", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, strictCriterion: { classPropertyName: "strictCriterion", publicName: "strictCriterion", isSignal: true, isRequired: false, transformFunction: null }, strictValue: { classPropertyName: "strictValue", publicName: "strictValue", isSignal: true, isRequired: false, transformFunction: null }, onlySelectValue: { classPropertyName: "onlySelectValue", publicName: "onlySelectValue", isSignal: true, isRequired: false, transformFunction: null }, lazyLoadingDebounceTime: { classPropertyName: "lazyLoadingDebounceTime", publicName: "lazyLoadingDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, searchDebounceTime: { classPropertyName: "searchDebounceTime", publicName: "searchDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, optionsInScrollableView: { classPropertyName: "optionsInScrollableView", publicName: "optionsInScrollableView", isSignal: true, isRequired: false, transformFunction: null }, searchCriteria: { classPropertyName: "searchCriteria", publicName: "searchCriteria", isSignal: true, isRequired: false, transformFunction: null }, criteria: { classPropertyName: "criteria", publicName: "criteria", isSignal: true, isRequired: false, transformFunction: null }, exclusiveCriteria: { classPropertyName: "exclusiveCriteria", publicName: "exclusiveCriteria", isSignal: true, isRequired: false, transformFunction: null }, maxCriteria: { classPropertyName: "maxCriteria", publicName: "maxCriteria", isSignal: true, isRequired: false, transformFunction: null }, maxCriteriaOptions: { classPropertyName: "maxCriteriaOptions", publicName: "maxCriteriaOptions", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, clearButtonLabel: { classPropertyName: "clearButtonLabel", publicName: "clearButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, submitButtonLabel: { classPropertyName: "submitButtonLabel", publicName: "submitButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, itemCountText: { classPropertyName: "itemCountText", publicName: "itemCountText", isSignal: true, isRequired: false, transformFunction: null }, colorVariant: { classPropertyName: "colorVariant", publicName: "colorVariant", isSignal: true, isRequired: false, transformFunction: null }, disableFreeTextSearch: { classPropertyName: "disableFreeTextSearch", publicName: "disableFreeTextSearch", isSignal: true, isRequired: false, transformFunction: null }, typeaheadOptionsLimit: { classPropertyName: "typeaheadOptionsLimit", publicName: "typeaheadOptionsLimit", isSignal: true, isRequired: false, transformFunction: null }, disableSelectionByColonAndSemicolon: { classPropertyName: "disableSelectionByColonAndSemicolon", publicName: "disableSelectionByColonAndSemicolon", isSignal: true, isRequired: false, transformFunction: null }, freeTextCriterion: { classPropertyName: "freeTextCriterion", publicName: "freeTextCriterion", isSignal: true, isRequired: false, transformFunction: null }, searchForFreeTextLabel: { classPropertyName: "searchForFreeTextLabel", publicName: "searchForFreeTextLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { doSearch: "doSearch", searchCriteria: "searchCriteriaChange", interceptDisplayedCriteria: "interceptDisplayedCriteria" }, host: { properties: { "class.disabled": "disabled()", "class.dark-background": "colorVariant() === 'base-0'" } }, viewQueries: [{ propertyName: "freeTextInput", first: true, predicate: SiFilteredSearchInputComponent, descendants: true, isSignal: true }, { propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "valueComponents", predicate: SiFilteredSearchValueComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #scrollContainer\n class=\"search-container d-flex align-items-center overflow-auto py-2 w-100 ps-2 pe-2\"\n>\n @for (criterion of values(); track criterion) {\n <si-filtered-search-value\n [editOnCreation]=\"autoEditCriteria\"\n [definition]=\"criterion.config\"\n [value]=\"criterion.value\"\n [invalidCriterion]=\"!validateCriterionLabel(criterion.config)\"\n [disabled]=\"disabled()\"\n [clearButtonLabel]=\"clearButtonLabel()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [isStrictOrOnlySelectValue]=\"isStrictOrOnlySelectValue()\"\n [itemCountText]=\"itemCountText()\"\n [lazyValueProvider]=\"lazyValueProvider()\"\n [maxCriteriaOptions]=\"maxCriteriaOptions()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [searchLabel]=\"searchLabel()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [searchDebounceTime]=\"searchDebounceTime()\"\n [scrollStrategyFactory]=\"scrollStrategy()\"\n (submitCriterion)=\"focusNext($index, $event)\"\n (deleteCriterion)=\"deleteCriterion($index, $event)\"\n (valueChange)=\"valueChange($event, criterion)\"\n />\n }\n <!-- criterion input -->\n <si-filtered-search-input\n [dataSource]=\"dataSource\"\n [typeaheadOptionsLimit]=\"typeaheadOptionsLimit()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [searchLabel]=\"searchLabel()\"\n [freeTextCriterion]=\"!!freeTextCriterion()\"\n [maxCriteriaReached]=\"!!maxCriteria() && values().length >= maxCriteria()!\"\n [allowFreeText]=\"allowFreeTextCache()\"\n [searchForFreeTextLabel]=\"searchForFreeTextLabel()\"\n [scrollStrategyFactory]=\"scrollStrategy()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [(searchValue)]=\"searchValue\"\n (createCriterion)=\"onCreateCriterion($event)\"\n (createCriterionByName)=\"onCreateCriterionByName($event)\"\n (backspaceOverflow)=\"freeTextBackspace()\"\n (createFreeTextPill)=\"createFreeTextPill($event)\"\n (searchValueChange)=\"onSearchValueChange()\"\n (inputFocus)=\"freeTextFocus()\"\n (enterSubmit)=\"submit()\"\n />\n</div>\n<!-- clear all searchCriteria -->\n@if (values().length || searchValue().length) {\n <div class=\"clear-button-container\">\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary-ghost mx-2\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"clearButtonLabel() | translate\"\n (click)=\"deleteAllCriteria($event)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n}\n\n@if (!disabled()) {\n <button\n type=\"button\"\n class=\"search-button btn btn-icon btn-sm btn-secondary focus-inside\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"submitButtonLabel() | translate\"\n (click)=\"submit()\"\n >\n <si-icon [icon]=\"icons.elementSearch\" />\n </button>\n}\n", styles: [":host{--search-bar-icon-color: var(--si-sys-text-primary);--input-background-color: var(--si-sys-background-1);--input-background-hover-color: var(--si-sys-background-1);--filter-search-background-color: var(--si-sys-background-1);--filter-pill-background-color: var(--si-sys-background-2)}:host.dark-background{--input-background-color: var(--si-sys-background-2);--input-background-hover-color: var(--si-sys-background-hover);--filter-search-background-color: var(--si-sys-background-2);--filter-pill-background-color: var(--si-sys-background-1)}:host{display:flex;align-items:center;block-size:fit-content;line-height:var(--si-sys-sizing-spacing-y-80);min-inline-size:0}:host.disabled{color:var(--si-sys-text-disabled)}.search-container{border-start-start-radius:4px;border-end-start-radius:4px;background-color:var(--filter-search-background-color);gap:var(--si-sys-sizing-spacing-y-20) var(--si-sys-sizing-spacing-x-20)}.clear-button-container{display:flex;align-items:flex-start;align-self:stretch;padding-block:var(--si-sys-sizing-spacing-y-20);background-color:var(--filter-search-background-color)}.search-button{align-self:stretch;background-color:var(--filter-search-background-color);border:0;border-radius:0;border-end-end-radius:4px;border-start-end-radius:4px;margin-block:0;margin-inline:1px 0;aspect-ratio:auto;block-size:auto;inline-size:auto;padding-inline:var(--si-sys-sizing-spacing-y-20)!important}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiFilteredSearchInputComponent, selector: "si-filtered-search-input", inputs: ["dataSource", "typeaheadOptionsLimit", "optionsInScrollableView", "disabled", "placeholder", "searchLabel", "scrollStrategyFactory", "searchValue", "freeTextCriterion", "maxCriteriaReached", "allowFreeText", "searchForFreeTextLabel", "disableSelectionByColonAndSemicolon", "onlySelectValue"], outputs: ["searchValueChange", "createCriterion", "createCriterionByName", "backspaceOverflow", "createFreeTextPill", "inputFocus", "enterSubmit"] }, { kind: "component", type: SiFilteredSearchValueComponent, selector: "si-filtered-search-value", inputs: ["value", "definition", "disabled", "onlySelectValue", "maxCriteriaOptions", "optionsInScrollableView", "clearButtonLabel", "lazyValueProvider", "searchDebounceTime", "itemCountText", "disableSelectionByColonAndSemicolon", "searchLabel", "invalidCriterion", "isStrictOrOnlySelectValue", "editOnCreation", "scrollStrategyFactory"], outputs: ["valueChange", "deleteCriterion", "submitCriterion"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
1294
1403
|
}
|
|
1295
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchComponent, decorators: [{
|
|
1296
1405
|
type: Component,
|
|
1297
1406
|
args: [{ selector: 'si-filtered-search', imports: [
|
|
1298
1407
|
SiIconComponent,
|
|
1299
1408
|
SiTranslatePipe,
|
|
1300
1409
|
SiFilteredSearchInputComponent,
|
|
1301
1410
|
SiFilteredSearchValueComponent
|
|
1302
|
-
], changeDetection: ChangeDetectionStrategy.
|
|
1411
|
+
], changeDetection: ChangeDetectionStrategy.Eager, host: {
|
|
1303
1412
|
'[class.disabled]': 'disabled()',
|
|
1304
1413
|
'[class.dark-background]': "colorVariant() === 'base-0'"
|
|
1305
|
-
}, template: "<div\n #scrollContainer\n class=\"search-container d-flex align-items-center overflow-auto py-2 w-100 ps-2 pe-2\"\n>\n @for (criterion of values(); track criterion) {\n <si-filtered-search-value\n [editOnCreation]=\"autoEditCriteria\"\n [definition]=\"criterion.config\"\n [value]=\"criterion.value\"\n [invalidCriterion]=\"!validateCriterionLabel(criterion.config)\"\n [disabled]=\"disabled()\"\n [clearButtonLabel]=\"clearButtonLabel()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [isStrictOrOnlySelectValue]=\"isStrictOrOnlySelectValue()\"\n [itemCountText]=\"itemCountText()\"\n [lazyValueProvider]=\"lazyValueProvider()\"\n [maxCriteriaOptions]=\"maxCriteriaOptions()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [searchLabel]=\"searchLabel()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [searchDebounceTime]=\"searchDebounceTime()\"\n [scrollStrategyFactory]=\"scrollStrategy()\"\n (submitCriterion)=\"focusNext($index, $event)\"\n (deleteCriterion)=\"deleteCriterion($index, $event)\"\n (valueChange)=\"valueChange($event, criterion)\"\n />\n }\n <!-- criterion input -->\n <si-filtered-search-input\n [dataSource]=\"dataSource\"\n [typeaheadOptionsLimit]=\"typeaheadOptionsLimit()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [searchLabel]=\"searchLabel()\"\n [freeTextCriterion]=\"!!freeTextCriterion()\"\n [maxCriteriaReached]=\"!!maxCriteria() && values().length >= maxCriteria()!\"\n [allowFreeText]=\"allowFreeTextCache()\"\n [searchForFreeTextLabel]=\"searchForFreeTextLabel()\"\n [scrollStrategyFactory]=\"scrollStrategy()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [(searchValue)]=\"searchValue\"\n (createCriterion)=\"onCreateCriterion($event)\"\n (createCriterionByName)=\"onCreateCriterionByName($event)\"\n (backspaceOverflow)=\"freeTextBackspace()\"\n (createFreeTextPill)=\"createFreeTextPill($event)\"\n (searchValueChange)=\"onSearchValueChange()\"\n (inputFocus)=\"freeTextFocus()\"\n (enterSubmit)=\"submit()\"\n />\n</div>\n<!-- clear all searchCriteria -->\n@if (values().length || searchValue().length) {\n <div class=\"clear-button-container\">\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary-ghost mx-2\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"clearButtonLabel() | translate\"\n (click)=\"deleteAllCriteria($event)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n}\n\n@if (!disabled()) {\n <button\n type=\"button\"\n class=\"search-button btn btn-icon btn-sm btn-secondary focus-inside\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"submitButtonLabel() | translate\"\n (click)=\"submit()\"\n >\n <si-icon [icon]=\"icons.elementSearch\" />\n </button>\n}\n", styles: [":host{--search-bar-icon-color: var(--
|
|
1414
|
+
}, template: "<div\n #scrollContainer\n class=\"search-container d-flex align-items-center overflow-auto py-2 w-100 ps-2 pe-2\"\n>\n @for (criterion of values(); track criterion) {\n <si-filtered-search-value\n [editOnCreation]=\"autoEditCriteria\"\n [definition]=\"criterion.config\"\n [value]=\"criterion.value\"\n [invalidCriterion]=\"!validateCriterionLabel(criterion.config)\"\n [disabled]=\"disabled()\"\n [clearButtonLabel]=\"clearButtonLabel()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [isStrictOrOnlySelectValue]=\"isStrictOrOnlySelectValue()\"\n [itemCountText]=\"itemCountText()\"\n [lazyValueProvider]=\"lazyValueProvider()\"\n [maxCriteriaOptions]=\"maxCriteriaOptions()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [searchLabel]=\"searchLabel()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [searchDebounceTime]=\"searchDebounceTime()\"\n [scrollStrategyFactory]=\"scrollStrategy()\"\n (submitCriterion)=\"focusNext($index, $event)\"\n (deleteCriterion)=\"deleteCriterion($index, $event)\"\n (valueChange)=\"valueChange($event, criterion)\"\n />\n }\n <!-- criterion input -->\n <si-filtered-search-input\n [dataSource]=\"dataSource\"\n [typeaheadOptionsLimit]=\"typeaheadOptionsLimit()\"\n [optionsInScrollableView]=\"optionsInScrollableView()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [searchLabel]=\"searchLabel()\"\n [freeTextCriterion]=\"!!freeTextCriterion()\"\n [maxCriteriaReached]=\"!!maxCriteria() && values().length >= maxCriteria()!\"\n [allowFreeText]=\"allowFreeTextCache()\"\n [searchForFreeTextLabel]=\"searchForFreeTextLabel()\"\n [scrollStrategyFactory]=\"scrollStrategy()\"\n [disableSelectionByColonAndSemicolon]=\"disableSelectionByColonAndSemicolon()\"\n [onlySelectValue]=\"onlySelectValue()\"\n [(searchValue)]=\"searchValue\"\n (createCriterion)=\"onCreateCriterion($event)\"\n (createCriterionByName)=\"onCreateCriterionByName($event)\"\n (backspaceOverflow)=\"freeTextBackspace()\"\n (createFreeTextPill)=\"createFreeTextPill($event)\"\n (searchValueChange)=\"onSearchValueChange()\"\n (inputFocus)=\"freeTextFocus()\"\n (enterSubmit)=\"submit()\"\n />\n</div>\n<!-- clear all searchCriteria -->\n@if (values().length || searchValue().length) {\n <div class=\"clear-button-container\">\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary-ghost mx-2\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"clearButtonLabel() | translate\"\n (click)=\"deleteAllCriteria($event)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n}\n\n@if (!disabled()) {\n <button\n type=\"button\"\n class=\"search-button btn btn-icon btn-sm btn-secondary focus-inside\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"submitButtonLabel() | translate\"\n (click)=\"submit()\"\n >\n <si-icon [icon]=\"icons.elementSearch\" />\n </button>\n}\n", styles: [":host{--search-bar-icon-color: var(--si-sys-text-primary);--input-background-color: var(--si-sys-background-1);--input-background-hover-color: var(--si-sys-background-1);--filter-search-background-color: var(--si-sys-background-1);--filter-pill-background-color: var(--si-sys-background-2)}:host.dark-background{--input-background-color: var(--si-sys-background-2);--input-background-hover-color: var(--si-sys-background-hover);--filter-search-background-color: var(--si-sys-background-2);--filter-pill-background-color: var(--si-sys-background-1)}:host{display:flex;align-items:center;block-size:fit-content;line-height:var(--si-sys-sizing-spacing-y-80);min-inline-size:0}:host.disabled{color:var(--si-sys-text-disabled)}.search-container{border-start-start-radius:4px;border-end-start-radius:4px;background-color:var(--filter-search-background-color);gap:var(--si-sys-sizing-spacing-y-20) var(--si-sys-sizing-spacing-x-20)}.clear-button-container{display:flex;align-items:flex-start;align-self:stretch;padding-block:var(--si-sys-sizing-spacing-y-20);background-color:var(--filter-search-background-color)}.search-button{align-self:stretch;background-color:var(--filter-search-background-color);border:0;border-radius:0;border-end-end-radius:4px;border-start-end-radius:4px;margin-block:0;margin-inline:1px 0;aspect-ratio:auto;block-size:auto;inline-size:auto;padding-inline:var(--si-sys-sizing-spacing-y-20)!important}\n"] }]
|
|
1306
1415
|
}], ctorParameters: () => [], propDecorators: { scrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategy", required: false }] }], doSearch: [{ type: i0.Output, args: ["doSearch"] }], doSearchOnInputChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "doSearchOnInputChange", required: false }] }], lazyCriterionProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyCriterionProvider", required: false }] }], lazyValueProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyValueProvider", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], strictCriterion: [{ type: i0.Input, args: [{ isSignal: true, alias: "strictCriterion", required: false }] }], strictValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "strictValue", required: false }] }], onlySelectValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlySelectValue", required: false }] }], lazyLoadingDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyLoadingDebounceTime", required: false }] }], searchDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchDebounceTime", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], optionsInScrollableView: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsInScrollableView", required: false }] }], searchCriteria: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchCriteria", required: false }] }, { type: i0.Output, args: ["searchCriteriaChange"] }], criteria: [{ type: i0.Input, args: [{ isSignal: true, alias: "criteria", required: false }] }], exclusiveCriteria: [{ type: i0.Input, args: [{ isSignal: true, alias: "exclusiveCriteria", required: false }] }], maxCriteria: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCriteria", required: false }] }], maxCriteriaOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCriteriaOptions", required: false }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: false }] }], clearButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearButtonLabel", required: false }] }], submitButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitButtonLabel", required: false }] }], itemCountText: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemCountText", required: false }] }], colorVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorVariant", required: false }] }], disableFreeTextSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableFreeTextSearch", required: false }] }], typeaheadOptionsLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeaheadOptionsLimit", required: false }] }], disableSelectionByColonAndSemicolon: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSelectionByColonAndSemicolon", required: false }] }], freeTextCriterion: [{ type: i0.Input, args: [{ isSignal: true, alias: "freeTextCriterion", required: false }] }], searchForFreeTextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchForFreeTextLabel", required: false }] }], interceptDisplayedCriteria: [{ type: i0.Output, args: ["interceptDisplayedCriteria"] }], freeTextInput: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiFilteredSearchInputComponent), { isSignal: true }] }], scrollContainer: [{ type: i0.ViewChild, args: ['scrollContainer', { ...{ read: ElementRef }, isSignal: true }] }], valueComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => SiFilteredSearchValueComponent), { isSignal: true }] }] } });
|
|
1307
1416
|
|
|
1308
1417
|
/**
|
|
@@ -1310,11 +1419,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1310
1419
|
* SPDX-License-Identifier: MIT
|
|
1311
1420
|
*/
|
|
1312
1421
|
class SiFilteredSearchModule {
|
|
1313
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1314
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1315
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1422
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1423
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchModule, imports: [SiFilteredSearchComponent], exports: [SiFilteredSearchComponent] });
|
|
1424
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchModule, imports: [SiFilteredSearchComponent] });
|
|
1316
1425
|
}
|
|
1317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchModule, decorators: [{
|
|
1318
1427
|
type: NgModule,
|
|
1319
1428
|
args: [{
|
|
1320
1429
|
imports: [SiFilteredSearchComponent],
|