@sdcorejs/angular 19.0.0 → 20.0.0-rc.2
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/components/anchor/index.d.ts +43 -1
- package/components/autoid-inspector/index.d.ts +199 -8
- package/components/avatar/index.d.ts +22 -1
- package/components/badge/index.d.ts +102 -1
- package/components/base/index.d.ts +11 -1
- package/components/button/index.d.ts +46 -1
- package/components/chart/index.d.ts +65 -4
- package/components/ckeditor-styles/index.d.ts +28 -1
- package/components/code-editor/index.d.ts +24 -1
- package/components/document-builder/index.d.ts +252 -4
- package/components/editor/index.d.ts +128 -3
- package/components/form-generic/index.d.ts +895 -4
- package/components/history/index.d.ts +23 -1
- package/components/import-excel/index.d.ts +160 -2
- package/components/inform/index.d.ts +70 -2
- package/components/mini-editor/index.d.ts +138 -2
- package/components/modal/index.d.ts +33 -1
- package/components/operator/index.d.ts +36 -1
- package/components/preview/index.d.ts +414 -4
- package/components/query-bar/index.d.ts +375 -2
- package/components/query-builder/index.d.ts +30 -1
- package/components/quick-action/index.d.ts +12 -1
- package/components/section/index.d.ts +28 -2
- package/components/side-drawer/index.d.ts +33 -1
- package/components/splitter/index.d.ts +58 -3
- package/components/stepper/index.d.ts +53 -2
- package/components/tab/index.d.ts +53 -2
- package/components/tab-router/index.d.ts +104 -4
- package/components/table/index.d.ts +1161 -11
- package/components/upload-file/index.d.ts +169 -2
- package/components/view/index.d.ts +20 -1
- package/configurations/index.d.ts +14 -1
- package/directives/index.d.ts +80 -6
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +31 -31
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs +36 -36
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-avatar.mjs +10 -10
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +34 -34
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-base.mjs +3 -3
- package/fesm2022/sdcorejs-angular-components-button.mjs +30 -30
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-chart.mjs +32 -32
- package/fesm2022/sdcorejs-angular-components-chart.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +4 -4
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs +12 -12
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-document-builder.mjs +6 -6
- package/fesm2022/sdcorejs-angular-components-document-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor.mjs +49 -39
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +214 -214
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-history.mjs +7 -7
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +11 -11
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +40 -40
- package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +3 -3
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +21 -21
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-operator.mjs +12 -12
- package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-preview.mjs +121 -121
- package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +150 -149
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +3 -3
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs +5 -5
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +24 -22
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +16 -16
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-splitter.mjs +41 -41
- package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs +26 -26
- package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +25 -25
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +25 -25
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +247 -247
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +107 -87
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-view.mjs +15 -15
- package/fesm2022/sdcorejs-angular-components-view.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +32 -32
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +77 -64
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs +50 -39
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +84 -73
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +83 -72
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +62 -49
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +70 -57
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +93 -80
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-directives.mjs +12 -12
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs +20 -20
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +72 -59
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +74 -61
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-label.mjs +3 -3
- package/fesm2022/sdcorejs-angular-forms-label.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-models.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +71 -60
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +86 -73
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +50 -39
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +78 -65
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms.mjs +4 -4
- package/fesm2022/sdcorejs-angular-handlers.mjs +3 -3
- package/fesm2022/sdcorejs-angular-i18n.mjs +9 -9
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-interceptors.mjs +6 -6
- package/fesm2022/sdcorejs-angular-modules-auth.mjs +10 -10
- package/fesm2022/sdcorejs-angular-modules-auth.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-authom.mjs +10 -10
- package/fesm2022/sdcorejs-angular-modules-authom.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-keycloak.mjs +7 -7
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +139 -139
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-permission.mjs +12 -12
- package/fesm2022/sdcorejs-angular-modules-permission.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-pipes.mjs +14 -14
- package/fesm2022/sdcorejs-angular-services-api.mjs +10 -10
- package/fesm2022/sdcorejs-angular-services-cache.mjs +3 -3
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +6 -6
- package/fesm2022/sdcorejs-angular-services-docx.mjs +3 -3
- package/fesm2022/sdcorejs-angular-services-excel.mjs +3 -3
- package/fesm2022/sdcorejs-angular-services-license.mjs +3 -3
- package/fesm2022/sdcorejs-angular-services-loading.mjs +3 -3
- package/fesm2022/sdcorejs-angular-services-notify.mjs +12 -12
- package/fesm2022/sdcorejs-angular-services-notify.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-storage.mjs +3 -3
- package/forms/autocomplete/index.d.ts +95 -1
- package/forms/checkbox/index.d.ts +31 -1
- package/forms/chip/index.d.ts +80 -1
- package/forms/chip-calendar/index.d.ts +73 -1
- package/forms/date/index.d.ts +82 -1
- package/forms/date-range/index.d.ts +83 -1
- package/forms/datetime/index.d.ts +92 -1
- package/forms/directives/index.d.ts +41 -4
- package/forms/index.d.ts +17 -1
- package/forms/input/index.d.ts +87 -1
- package/forms/input-color/index.d.ts +35 -1
- package/forms/input-number/index.d.ts +97 -1
- package/forms/label/index.d.ts +16 -1
- package/forms/models/index.d.ts +85 -6
- package/forms/radio/index.d.ts +52 -1
- package/forms/select/index.d.ts +95 -1
- package/forms/switch/index.d.ts +35 -1
- package/forms/textarea/index.d.ts +68 -1
- package/handlers/index.d.ts +12 -1
- package/i18n/index.d.ts +508 -5
- package/index.d.ts +2 -5
- package/interceptors/index.d.ts +27 -2
- package/models/index.d.ts +2 -1
- package/modules/auth/index.d.ts +64 -3
- package/modules/authom/index.d.ts +70 -35
- package/modules/keycloak/index.d.ts +48 -4
- package/modules/layout/index.d.ts +223 -5
- package/modules/permission/index.d.ts +101 -4
- package/package.json +45 -45
- package/pipes/index.d.ts +43 -4
- package/services/api/index.d.ts +71 -4
- package/services/cache/index.d.ts +43 -2
- package/services/confirm/index.d.ts +103 -1
- package/services/docx/index.d.ts +28 -1
- package/services/excel/index.d.ts +54 -1
- package/services/license/index.d.ts +13 -1
- package/services/loading/index.d.ts +17 -1
- package/services/notify/index.d.ts +40 -2
- package/services/storage/index.d.ts +34 -2
- package/utilities/data-state/index.d.ts +13 -1
- package/utilities/extensions/index.d.ts +87 -6
- package/utilities/models/index.d.ts +87 -12
- package/components/anchor/src/components/anchor/anchor.component.d.ts +0 -22
- package/components/anchor/src/components/anchor-item/anchor-item.component.d.ts +0 -13
- package/components/anchor/src/components/anchor-nav/anchor-nav.component.d.ts +0 -21
- package/components/anchor/src/components/index.d.ts +0 -2
- package/components/anchor/src/index.d.ts +0 -2
- package/components/anchor/src/models/index.d.ts +0 -1
- package/components/anchor/src/models/sd-anchor.model.d.ts +0 -7
- package/components/autoid-inspector/src/autoid-inspector.component.d.ts +0 -55
- package/components/autoid-inspector/src/models/autoid-element.model.d.ts +0 -55
- package/components/autoid-inspector/src/models/autoid-export-format.model.d.ts +0 -6
- package/components/autoid-inspector/src/models/autoid-inspector-config.model.d.ts +0 -8
- package/components/autoid-inspector/src/services/autoid-audit.service.d.ts +0 -19
- package/components/autoid-inspector/src/services/autoid-export.service.d.ts +0 -21
- package/components/autoid-inspector/src/services/autoid-highlight.service.d.ts +0 -12
- package/components/autoid-inspector/src/services/autoid-scanner.service.d.ts +0 -23
- package/components/avatar/src/avatar.component.d.ts +0 -19
- package/components/badge/src/badge.component.d.ts +0 -98
- package/components/base/src/base-secure.component.d.ts +0 -8
- package/components/button/src/button.component.d.ts +0 -42
- package/components/chart/src/bar-chart.component.d.ts +0 -18
- package/components/chart/src/doughnut-chart.component.d.ts +0 -16
- package/components/chart/src/line-chart.component.d.ts +0 -18
- package/components/chart/src/pie-chart.component.d.ts +0 -16
- package/components/ckeditor-styles/src/ckeditor-styles.component.d.ts +0 -25
- package/components/code-editor/src/code-editor.component.d.ts +0 -25
- package/components/document-builder/src/components/header-footer-builder/header-footer-builder.component.d.ts +0 -16
- package/components/document-builder/src/components/header-footer-builder/plugins/page-number.plugin.d.ts +0 -4
- package/components/document-builder/src/components/index.d.ts +0 -1
- package/components/document-builder/src/document-builder.component.d.ts +0 -53
- package/components/document-builder/src/document-builder.config.d.ts +0 -21
- package/components/document-builder/src/document-builder.model.d.ts +0 -41
- package/components/document-builder/src/document-builder.utils.d.ts +0 -10
- package/components/document-builder/src/plugins/block-space/block-space.plugin.d.ts +0 -9
- package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.d.ts +0 -44
- package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.model.d.ts +0 -57
- package/components/document-builder/src/plugins/heading/heading.plugin.d.ts +0 -5
- package/components/document-builder/src/plugins/highlight-range/highlight-range.plugin.d.ts +0 -4
- package/components/document-builder/src/plugins/image-custom/image-custom.plugin.d.ts +0 -31
- package/components/document-builder/src/plugins/image-upload/image-upload.plugin.d.ts +0 -5
- package/components/document-builder/src/plugins/index.d.ts +0 -11
- package/components/document-builder/src/plugins/page-orientation/page-orientation.plugin.d.ts +0 -24
- package/components/document-builder/src/plugins/paste-handler/filters/bookmark.d.ts +0 -14
- package/components/document-builder/src/plugins/paste-handler/filters/br.d.ts +0 -15
- package/components/document-builder/src/plugins/paste-handler/filters/image.d.ts +0 -25
- package/components/document-builder/src/plugins/paste-handler/filters/list.d.ts +0 -29
- package/components/document-builder/src/plugins/paste-handler/filters/parse.d.ts +0 -35
- package/components/document-builder/src/plugins/paste-handler/filters/removeboldwrapper.d.ts +0 -15
- package/components/document-builder/src/plugins/paste-handler/filters/removegooglesheetstag.d.ts +0 -15
- package/components/document-builder/src/plugins/paste-handler/filters/removeinvalidtablewidth.d.ts +0 -15
- package/components/document-builder/src/plugins/paste-handler/filters/removemsattributes.d.ts +0 -15
- package/components/document-builder/src/plugins/paste-handler/filters/removestyleblock.d.ts +0 -15
- package/components/document-builder/src/plugins/paste-handler/filters/removexmlns.d.ts +0 -15
- package/components/document-builder/src/plugins/paste-handler/filters/replacemsfootnotes.d.ts +0 -54
- package/components/document-builder/src/plugins/paste-handler/filters/replacetabswithinprewithspaces.d.ts +0 -24
- package/components/document-builder/src/plugins/paste-handler/filters/space.d.ts +0 -27
- package/components/document-builder/src/plugins/paste-handler/filters/table.d.ts +0 -16
- package/components/document-builder/src/plugins/paste-handler/filters/utils.d.ts +0 -25
- package/components/document-builder/src/plugins/paste-handler/index.d.ts +0 -35
- package/components/document-builder/src/plugins/paste-handler/normalizers/googledocsnormalizer.d.ts +0 -31
- package/components/document-builder/src/plugins/paste-handler/normalizers/googlesheetsnormalizer.d.ts +0 -31
- package/components/document-builder/src/plugins/paste-handler/normalizers/mswordnormalizer.d.ts +0 -29
- package/components/document-builder/src/plugins/paste-handler/types.d.ts +0 -30
- package/components/document-builder/src/plugins/table-custom/index.d.ts +0 -34
- package/components/document-builder/src/plugins/variable/variable.plugin.d.ts +0 -51
- package/components/editor/src/configurations/editor.configuration.d.ts +0 -12
- package/components/editor/src/configurations/index.d.ts +0 -1
- package/components/editor/src/editor.component.d.ts +0 -52
- package/components/editor/src/models/editor.model.d.ts +0 -10
- package/components/editor/src/models/image-upload.plugin.model.d.ts +0 -51
- package/components/editor/src/models/index.d.ts +0 -2
- package/components/editor/src/plugins/image-upload/image-upload.plugin.d.ts +0 -22
- package/components/editor/src/plugins/image-upload/utils/batch.utils.d.ts +0 -14
- package/components/editor/src/plugins/image-upload/utils/index.d.ts +0 -3
- package/components/editor/src/plugins/image-upload/utils/style.utils.d.ts +0 -3
- package/components/editor/src/plugins/image-upload/utils/validate.utils.d.ts +0 -4
- package/components/form-generic/src/components/form-builder/components/attribute-expression/attribute-expression.component.d.ts +0 -23
- package/components/form-generic/src/components/form-builder/components/attribute-input/attribute-input.component.d.ts +0 -17
- package/components/form-generic/src/components/form-builder/components/attribute-input-number/attribute-input-number.component.d.ts +0 -14
- package/components/form-generic/src/components/form-builder/components/attribute-parameter/attribute-parameter.component.d.ts +0 -33
- package/components/form-generic/src/components/form-builder/components/attribute-select/attribute-select.component.d.ts +0 -26
- package/components/form-generic/src/components/form-builder/components/attribute-selection/attribute-selection.component.d.ts +0 -27
- package/components/form-generic/src/components/form-builder/components/attribute-selection/components/build-queries/build-queries.component.d.ts +0 -35
- package/components/form-generic/src/components/form-builder/components/attribute-selection/components/build-variables/build-variables.component.d.ts +0 -41
- package/components/form-generic/src/components/form-builder/components/attribute-switch/attribute-switch.component.d.ts +0 -14
- package/components/form-generic/src/components/form-builder/components/attribute-table/attribute-table.component.d.ts +0 -36
- package/components/form-generic/src/components/form-builder/components/attribute-template/attribute-template.component.d.ts +0 -15
- package/components/form-generic/src/components/form-builder/components/attribute-textarea/attribute-textarea.component.d.ts +0 -17
- package/components/form-generic/src/components/form-builder/components/checkbox/attribute/checkbox-attribute.component.d.ts +0 -21
- package/components/form-generic/src/components/form-builder/components/checkbox/control/checkbox-control.component.d.ts +0 -8
- package/components/form-generic/src/components/form-builder/components/checkbox/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/chip-calendar/attribute/chip-calendar-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/chip-calendar/control/chip-calendar-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/chip-calendar/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/chip-string/attribute/chip-string-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/chip-string/control/chip-string-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/chip-string/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/configure-validation/configure-validation.component.d.ts +0 -31
- package/components/form-generic/src/components/form-builder/components/datetime/attribute/datetime-attribute.component.d.ts +0 -21
- package/components/form-generic/src/components/form-builder/components/datetime/control/datetime-control.component.d.ts +0 -18
- package/components/form-generic/src/components/form-builder/components/datetime/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/expression-builder/expression-builder.component.d.ts +0 -47
- package/components/form-generic/src/components/form-builder/components/group/attribute/group-attribute.component.d.ts +0 -23
- package/components/form-generic/src/components/form-builder/components/group/index.d.ts +0 -1
- package/components/form-generic/src/components/form-builder/components/html/attribute/components/build-queries/build-queries.component.d.ts +0 -35
- package/components/form-generic/src/components/form-builder/components/html/attribute/html-attribute.component.d.ts +0 -30
- package/components/form-generic/src/components/form-builder/components/html/control/html-control.component.d.ts +0 -20
- package/components/form-generic/src/components/form-builder/components/html/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/index.d.ts +0 -13
- package/components/form-generic/src/components/form-builder/components/number/attribute/number-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/number/control/number-control.component.d.ts +0 -17
- package/components/form-generic/src/components/form-builder/components/number/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/radio/attribute/radio-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/radio/control/radio-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/radio/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/select/attribute/select-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/select/control/select-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/select/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/table/attribute/table-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/table/control/table-control.component.d.ts +0 -19
- package/components/form-generic/src/components/form-builder/components/table/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/textarea/attribute/textarea-attribute.component.d.ts +0 -21
- package/components/form-generic/src/components/form-builder/components/textarea/control/textarea-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/textarea/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/textfield/attribute/textfield-attribute.component.d.ts +0 -21
- package/components/form-generic/src/components/form-builder/components/textfield/control/textfield-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/textfield/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/upload/attribute/upload-attribute.component.d.ts +0 -27
- package/components/form-generic/src/components/form-builder/components/upload/control/upload-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/upload/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/form-builder.component.d.ts +0 -120
- package/components/form-generic/src/components/form-builder/services/builder.service.d.ts +0 -11
- package/components/form-generic/src/components/form-builder/services/index.d.ts +0 -1
- package/components/form-generic/src/components/form-render/components/index.d.ts +0 -2
- package/components/form-generic/src/components/form-render/components/item/components/chip-calendar/chip-calendar.component.d.ts +0 -30
- package/components/form-generic/src/components/form-render/components/item/components/chip-string/chip-string.component.d.ts +0 -30
- package/components/form-generic/src/components/form-render/components/item/components/datetime/datetime.component.d.ts +0 -34
- package/components/form-generic/src/components/form-render/components/item/components/html/html.component.d.ts +0 -32
- package/components/form-generic/src/components/form-render/components/item/components/index.d.ts +0 -11
- package/components/form-generic/src/components/form-render/components/item/components/number/number.component.d.ts +0 -30
- package/components/form-generic/src/components/form-render/components/item/components/radio/radio.component.d.ts +0 -38
- package/components/form-generic/src/components/form-render/components/item/components/select/select.component.d.ts +0 -43
- package/components/form-generic/src/components/form-render/components/item/components/table/table.component.d.ts +0 -51
- package/components/form-generic/src/components/form-render/components/item/components/textarea/textarea.component.d.ts +0 -30
- package/components/form-generic/src/components/form-render/components/item/components/textfield/textfield.component.d.ts +0 -33
- package/components/form-generic/src/components/form-render/components/item/components/upload/upload.component.d.ts +0 -36
- package/components/form-generic/src/components/form-render/components/item/item.component.d.ts +0 -32
- package/components/form-generic/src/components/form-render/components/variable/variable.component.d.ts +0 -22
- package/components/form-generic/src/components/form-render/form-render.component.d.ts +0 -39
- package/components/form-generic/src/components/index.d.ts +0 -3
- package/components/form-generic/src/components/sd-feel-expression/sd-feel-expression.component.d.ts +0 -43
- package/components/form-generic/src/configurations/form-generic.configuration.d.ts +0 -6
- package/components/form-generic/src/configurations/form.configuration.d.ts +0 -12
- package/components/form-generic/src/configurations/index.d.ts +0 -2
- package/components/form-generic/src/models/form-generic-component.model.d.ts +0 -318
- package/components/form-generic/src/models/form-generic-definition-html.model.d.ts +0 -28
- package/components/form-generic/src/models/form-generic-definition-selection.model.d.ts +0 -49
- package/components/form-generic/src/models/form-generic-definition-table.model.d.ts +0 -6
- package/components/form-generic/src/models/form-generic-expression.model.d.ts +0 -74
- package/components/form-generic/src/models/form-generic-template.model.d.ts +0 -6
- package/components/form-generic/src/models/form-generic-validation.model.d.ts +0 -30
- package/components/form-generic/src/models/form-generic.model.d.ts +0 -7
- package/components/form-generic/src/models/form-render/form-render-args.model.d.ts +0 -7
- package/components/form-generic/src/models/form-render/form-render-entity.model.d.ts +0 -3
- package/components/form-generic/src/models/form-render/index.d.ts +0 -2
- package/components/form-generic/src/models/index.d.ts +0 -8
- package/components/form-generic/src/pipes/component-viewed.pipe.d.ts +0 -14
- package/components/form-generic/src/pipes/expression-feel.pipe.d.ts +0 -10
- package/components/form-generic/src/pipes/expression-query.pipe.d.ts +0 -10
- package/components/form-generic/src/pipes/expression-view.pipe.d.ts +0 -8
- package/components/form-generic/src/pipes/html.pipe.d.ts +0 -11
- package/components/form-generic/src/pipes/hyperlink.pipe.d.ts +0 -8
- package/components/form-generic/src/pipes/index.d.ts +0 -7
- package/components/form-generic/src/pipes/when-expression.pipe.d.ts +0 -13
- package/components/form-generic/src/services/form-generic.service.d.ts +0 -26
- package/components/form-generic/src/services/form-render.service.d.ts +0 -10
- package/components/form-generic/src/services/index.d.ts +0 -2
- package/components/history/models/history.model.d.ts +0 -13
- package/components/history/pipes/view-date.pipe.d.ts +0 -8
- package/components/history/src/history.component.d.ts +0 -7
- package/components/import-excel/src/import-excel.component.d.ts +0 -47
- package/components/import-excel/src/import-excel.model.d.ts +0 -102
- package/components/import-excel/src/pipes/columm-hidden.pipe.d.ts +0 -10
- package/components/import-excel/src/pipes/column-transform.pipe.d.ts +0 -11
- package/components/inform/src/inform-action.directive.d.ts +0 -9
- package/components/inform/src/inform.component.d.ts +0 -59
- package/components/mini-editor/src/mini-editor.component.d.ts +0 -91
- package/components/mini-editor/src/mini-editor.model.d.ts +0 -44
- package/components/modal/src/modal.component.d.ts +0 -30
- package/components/operator/src/operator.component.d.ts +0 -34
- package/components/preview/src/preview-image/preview-image.component.d.ts +0 -88
- package/components/preview/src/preview-image/preview-image.types.d.ts +0 -53
- package/components/preview/src/preview-pdf/preview-pdf.component.d.ts +0 -186
- package/components/preview/src/preview-pdf/preview-pdf.types.d.ts +0 -84
- package/components/query-bar/src/components/actions-bar/actions-bar.component.d.ts +0 -28
- package/components/query-bar/src/components/build-chip/build-chip.component.d.ts +0 -67
- package/components/query-bar/src/components/chip-popover/chip-popover.component.d.ts +0 -73
- package/components/query-bar/src/components/field-picker/field-picker.component.d.ts +0 -37
- package/components/query-bar/src/components/inline-chip/inline-chip.component.d.ts +0 -87
- package/components/query-bar/src/components/inline-value-chip/inline-value-chip.component.d.ts +0 -71
- package/components/query-bar/src/components/popover-chip/popover-chip.component.d.ts +0 -35
- package/components/query-bar/src/components/saved-filters-menu/saved-filters-menu.component.d.ts +0 -39
- package/components/query-bar/src/query-bar.component.d.ts +0 -137
- package/components/query-bar/src/query-bar.model.d.ts +0 -136
- package/components/query-builder/src/query-builder.component.d.ts +0 -26
- package/components/quick-action/src/quick-action.component.d.ts +0 -9
- package/components/section/src/section-item/section-item.component.d.ts +0 -7
- package/components/section/src/section.component.d.ts +0 -18
- package/components/side-drawer/src/side-drawer.component.d.ts +0 -30
- package/components/splitter/src/splitter-handle/splitter-handle.component.d.ts +0 -24
- package/components/splitter/src/splitter-panel/splitter-panel.component.d.ts +0 -16
- package/components/splitter/src/splitter-state.service.d.ts +0 -26
- package/components/splitter/src/splitter.component.d.ts +0 -28
- package/components/splitter/src/splitter.models.d.ts +0 -23
- package/components/stepper/src/step.component.d.ts +0 -17
- package/components/stepper/src/stepper.component.d.ts +0 -33
- package/components/tab/src/tab-group.component.d.ts +0 -37
- package/components/tab/src/tab.component.d.ts +0 -13
- package/components/tab-router/src/actions/tab-router.action.d.ts +0 -5
- package/components/tab-router/src/components/tab-router-item/tab-router-item.component.d.ts +0 -22
- package/components/tab-router/src/components/tab-router-nav/tab-router-nav.component.d.ts +0 -16
- package/components/tab-router/src/components/tab-router-outlet/tab-router-outlet.component.d.ts +0 -15
- package/components/tab-router/src/decorators/tab.decorator.d.ts +0 -16
- package/components/tab-router/src/events/tab-router.event.d.ts +0 -11
- package/components/tab-router/src/models/index.d.ts +0 -1
- package/components/tab-router/src/models/tab-router.model.d.ts +0 -21
- package/components/tab-router/src/pipes/tab-info.pipe.d.ts +0 -11
- package/components/tab-router/src/services/tab-decorator.service.d.ts +0 -9
- package/components/tab-router/src/services/tab-router.service.d.ts +0 -27
- package/components/table/src/components/column-title/column-title.component.d.ts +0 -10
- package/components/table/src/components/command/desktop-command.component.d.ts +0 -14
- package/components/table/src/components/command/pipes/command.pipe.d.ts +0 -30
- package/components/table/src/components/command/pipes/filter.pipe.d.ts +0 -35
- package/components/table/src/components/config/config.component.d.ts +0 -25
- package/components/table/src/components/desktop-cell/desktop-cell.component.d.ts +0 -24
- package/components/table/src/components/desktop-cell/view/view.component.d.ts +0 -24
- package/components/table/src/components/filter/column-filter/column-filter.component.d.ts +0 -32
- package/components/table/src/components/filter/external-filter/external-filter.component.d.ts +0 -27
- package/components/table/src/components/filter/index.d.ts +0 -3
- package/components/table/src/components/filter/mobile-filter/mobile-filter.component.d.ts +0 -42
- package/components/table/src/components/index.d.ts +0 -3
- package/components/table/src/components/popup-export/popup-export.component.d.ts +0 -51
- package/components/table/src/components/selector-action/action-filter.pipe.d.ts +0 -34
- package/components/table/src/components/selector-action/selector-action.component.d.ts +0 -16
- package/components/table/src/configurations/index.d.ts +0 -1
- package/components/table/src/configurations/table.configuration.d.ts +0 -35
- package/components/table/src/directives/index.d.ts +0 -6
- package/components/table/src/directives/sd-column-resize.directive.d.ts +0 -13
- package/components/table/src/directives/sd-table-cell-def.directive.d.ts +0 -16
- package/components/table/src/directives/sd-table-column-filter-def.directive.d.ts +0 -16
- package/components/table/src/directives/sd-table-expand-def.directive.d.ts +0 -13
- package/components/table/src/directives/sd-table-filter-def.directive.d.ts +0 -14
- package/components/table/src/directives/sd-table-footer-def.directive.d.ts +0 -16
- package/components/table/src/directives/sd-table-group-def.directive.d.ts +0 -44
- package/components/table/src/directives/sd-table-title-def.directive.d.ts +0 -14
- package/components/table/src/directives/sticky-shadow.directive.d.ts +0 -17
- package/components/table/src/models/index.d.ts +0 -5
- package/components/table/src/models/table-column.model.d.ts +0 -119
- package/components/table/src/models/table-command.model.d.ts +0 -25
- package/components/table/src/models/table-item.model.d.ts +0 -65
- package/components/table/src/models/table-option-config.model.d.ts +0 -42
- package/components/table/src/models/table-option-expand.model.d.ts +0 -6
- package/components/table/src/models/table-option-export.model.d.ts +0 -42
- package/components/table/src/models/table-option-group.model.d.ts +0 -21
- package/components/table/src/models/table-option-paginate.model.d.ts +0 -7
- package/components/table/src/models/table-option-reload.model.d.ts +0 -7
- package/components/table/src/models/table-option-selector.model.d.ts +0 -105
- package/components/table/src/models/table-option-sort.model.d.ts +0 -3
- package/components/table/src/models/table-option-style.model.d.ts +0 -11
- package/components/table/src/models/table-option-tree.model.d.ts +0 -12
- package/components/table/src/models/table-option.model.d.ts +0 -181
- package/components/table/src/pipes/filter-values.pipe.d.ts +0 -8
- package/components/table/src/pipes/index.d.ts +0 -2
- package/components/table/src/pipes/sd-group.pipe.d.ts +0 -23
- package/components/table/src/pipes/sd-tree.pipe.d.ts +0 -9
- package/components/table/src/pipes/selection-disabled.pipe.d.ts +0 -9
- package/components/table/src/pipes/selection-visible-select-all.pipe.d.ts +0 -9
- package/components/table/src/pipes/selection-visible.pipe.d.ts +0 -9
- package/components/table/src/services/column-width.util.d.ts +0 -7
- package/components/table/src/services/config.service.d.ts +0 -21
- package/components/table/src/services/index.d.ts +0 -3
- package/components/table/src/services/table-export/table-export.service.d.ts +0 -26
- package/components/table/src/services/table-filter/table-filter.model.d.ts +0 -150
- package/components/table/src/services/table-filter/table-filter.service.d.ts +0 -20
- package/components/table/src/services/table-format/table-format.service.d.ts +0 -16
- package/components/table/src/services/tree/tree.util.d.ts +0 -14
- package/components/table/src/table.component.d.ts +0 -137
- package/components/upload-file/src/components/preview/preview.component.d.ts +0 -23
- package/components/upload-file/src/configurations/index.d.ts +0 -1
- package/components/upload-file/src/configurations/upload-file.configuration.d.ts +0 -50
- package/components/upload-file/src/pipes/document.pipe.d.ts +0 -8
- package/components/upload-file/src/pipes/image.pipe.d.ts +0 -8
- package/components/upload-file/src/pipes/index.d.ts +0 -2
- package/components/upload-file/src/services/index.d.ts +0 -2
- package/components/upload-file/src/services/upload-file.model.d.ts +0 -12
- package/components/upload-file/src/services/upload-file.service.d.ts +0 -10
- package/components/upload-file/src/upload-file.component.d.ts +0 -85
- package/components/view/src/view.component.d.ts +0 -17
- package/configurations/src/sd-core.configuration.d.ts +0 -10
- package/directives/src/sd-desktop.directive.d.ts +0 -7
- package/directives/src/sd-hover-copy.directive.d.ts +0 -16
- package/directives/src/sd-href.directive.d.ts +0 -9
- package/directives/src/sd-mobile.directive.d.ts +0 -7
- package/directives/src/sd-scroll.directive.d.ts +0 -14
- package/directives/src/sd-tooltip.directive.d.ts +0 -26
- package/forms/autocomplete/src/autocomplete.component.d.ts +0 -93
- package/forms/checkbox/src/checkbox.component.d.ts +0 -28
- package/forms/chip/src/chip.component.d.ts +0 -71
- package/forms/chip/src/index.d.ts +0 -2
- package/forms/chip/src/pipes/index.d.ts +0 -1
- package/forms/chip/src/pipes/removable-chip.pipe.d.ts +0 -8
- package/forms/chip-calendar/src/chip-calendar.component.d.ts +0 -71
- package/forms/chip-calendar/src/pipes/index.d.ts +0 -1
- package/forms/chip-calendar/src/pipes/removable-chip.pipe.d.ts +0 -8
- package/forms/date/src/date.component.d.ts +0 -79
- package/forms/date-range/src/date-range.component.d.ts +0 -81
- package/forms/datetime/src/datetime.component.d.ts +0 -89
- package/forms/datetime/src/popup/sd-datetime-picker.component.d.ts +0 -37
- package/forms/datetime/src/popup/sd-time-spinner.component.d.ts +0 -41
- package/forms/directives/src/item-def.directive.d.ts +0 -13
- package/forms/directives/src/label-def.directive.d.ts +0 -9
- package/forms/directives/src/suffix-def.directive.d.ts +0 -9
- package/forms/directives/src/view-def.directive.d.ts +0 -14
- package/forms/input/src/input.component.d.ts +0 -84
- package/forms/input-color/src/input-color.component.d.ts +0 -32
- package/forms/input-number/src/input-number.component.d.ts +0 -95
- package/forms/label/src/label.component.d.ts +0 -13
- package/forms/models/src/form-control-state.d.ts +0 -23
- package/forms/models/src/sd-custom-validator.model.d.ts +0 -15
- package/forms/models/src/sd-form-control.model.d.ts +0 -21
- package/forms/models/src/sd-form.configuration.d.ts +0 -6
- package/forms/models/src/sd-search.model.d.ts +0 -7
- package/forms/models/src/sd-selection-data.model.d.ts +0 -7
- package/forms/radio/src/radio.component.d.ts +0 -49
- package/forms/select/src/select.component.d.ts +0 -93
- package/forms/src/forms.module.d.ts +0 -14
- package/forms/switch/src/switch.component.d.ts +0 -32
- package/forms/textarea/src/textarea.component.d.ts +0 -65
- package/handlers/global-error.handler.d.ts +0 -9
- package/i18n/src/en.d.ts +0 -449
- package/i18n/src/i18n.messages.d.ts +0 -2
- package/i18n/src/i18n.pipe.d.ts +0 -9
- package/i18n/src/i18n.service.d.ts +0 -14
- package/i18n/src/i18n.token.d.ts +0 -1
- package/i18n/src/i18n.types.d.ts +0 -31
- package/i18n/src/ja.d.ts +0 -2
- package/i18n/src/ko.d.ts +0 -2
- package/i18n/src/vi.d.ts +0 -2
- package/i18n/src/zh.d.ts +0 -2
- package/interceptors/no-internet/no-internet.interceptor.d.ts +0 -14
- package/interceptors/unauthorized/unauthorized.interceptor.d.ts +0 -12
- package/models/src/language.model.d.ts +0 -2
- package/modules/auth/configurations/auth.configuration.d.ts +0 -19
- package/modules/auth/configurations/index.d.ts +0 -1
- package/modules/auth/guards/auth.guard.d.ts +0 -11
- package/modules/auth/guards/index.d.ts +0 -2
- package/modules/auth/guards/portal.guard.d.ts +0 -11
- package/modules/auth/services/auth.model.d.ts +0 -8
- package/modules/auth/services/auth.service.d.ts +0 -17
- package/modules/auth/services/index.d.ts +0 -2
- package/modules/authom/authom.configuration.d.ts +0 -17
- package/modules/authom/authom.interceptor.d.ts +0 -3
- package/modules/authom/authom.module.d.ts +0 -16
- package/modules/authom/authom.service.d.ts +0 -32
- package/modules/keycloak/keycloak.configuration.d.ts +0 -11
- package/modules/keycloak/keycloak.interceptor.d.ts +0 -2
- package/modules/keycloak/keycloak.module.d.ts +0 -18
- package/modules/keycloak/keycloak.service.d.ts +0 -14
- package/modules/layout/components/index.d.ts +0 -4
- package/modules/layout/components/layout-main/layout-main.component.d.ts +0 -12
- package/modules/layout/components/page/page.component.d.ts +0 -10
- package/modules/layout/components/sidebar-mobile-v1/components/sidebar/sidebar.component.d.ts +0 -35
- package/modules/layout/components/sidebar-mobile-v1/components/user/user.component.d.ts +0 -24
- package/modules/layout/components/sidebar-mobile-v1/main.component.d.ts +0 -21
- package/modules/layout/components/sidebar-v1/components/sidebar/sidebar.component.d.ts +0 -55
- package/modules/layout/components/sidebar-v1/components/user/user.component.d.ts +0 -22
- package/modules/layout/components/sidebar-v1/main.component.d.ts +0 -24
- package/modules/layout/configurations/index.d.ts +0 -1
- package/modules/layout/configurations/layout.configuration.d.ts +0 -67
- package/modules/layout/layout.module.d.ts +0 -7
- package/modules/layout/layout.routing.d.ts +0 -2
- package/modules/layout/modules/forbidden/forbidden.module.d.ts +0 -8
- package/modules/layout/modules/forbidden/forbidden.routing.d.ts +0 -2
- package/modules/layout/modules/forbidden/index.d.ts +0 -1
- package/modules/layout/modules/forbidden/pages/root/root.component.d.ts +0 -10
- package/modules/layout/modules/home/components/home-page/home-page.component.d.ts +0 -33
- package/modules/layout/modules/home/guards/home-redirect.guard.d.ts +0 -11
- package/modules/layout/modules/home/home.module.d.ts +0 -8
- package/modules/layout/modules/home/home.routing.d.ts +0 -7
- package/modules/layout/modules/home/index.d.ts +0 -1
- package/modules/layout/modules/index.d.ts +0 -3
- package/modules/layout/modules/not-found/index.d.ts +0 -1
- package/modules/layout/modules/not-found/not-found.module.d.ts +0 -8
- package/modules/layout/modules/not-found/not-found.routing.d.ts +0 -2
- package/modules/layout/modules/not-found/pages/root/root.component.d.ts +0 -10
- package/modules/layout/pipes/high-light-search.pipe.d.ts +0 -10
- package/modules/layout/pipes/index.d.ts +0 -3
- package/modules/layout/pipes/menu-focus.pipe.d.ts +0 -10
- package/modules/layout/pipes/menu.pipe.d.ts +0 -13
- package/modules/layout/services/index.d.ts +0 -3
- package/modules/layout/services/layout.service.d.ts +0 -10
- package/modules/layout/services/menu/menu.model.d.ts +0 -24
- package/modules/layout/services/storage/storage.service.d.ts +0 -13
- package/modules/permission/src/configurations/index.d.ts +0 -1
- package/modules/permission/src/configurations/permission.configuration.d.ts +0 -63
- package/modules/permission/src/directives/index.d.ts +0 -1
- package/modules/permission/src/directives/permission.directive.d.ts +0 -9
- package/modules/permission/src/guards/index.d.ts +0 -1
- package/modules/permission/src/guards/permission.guard.d.ts +0 -14
- package/modules/permission/src/services/index.d.ts +0 -1
- package/modules/permission/src/services/permission.service.d.ts +0 -12
- package/pipes/src/empty.pipe.d.ts +0 -7
- package/pipes/src/format-number.pipe.d.ts +0 -11
- package/pipes/src/safe-html.pipe.d.ts +0 -11
- package/pipes/src/time-different.pipe.d.ts +0 -13
- package/public-api.d.ts +0 -10
- package/services/api/src/api.model.d.ts +0 -36
- package/services/api/src/api.module.d.ts +0 -6
- package/services/api/src/api.service.d.ts +0 -19
- package/services/api/src/interceptors/api.interceptor.d.ts +0 -9
- package/services/cache/src/cache.model.d.ts +0 -30
- package/services/cache/src/cache.service.d.ts +0 -9
- package/services/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.d.ts +0 -46
- package/services/confirm/src/lib/confirm.service.d.ts +0 -55
- package/services/confirm/src/public-api.d.ts +0 -2
- package/services/docx/src/lib/docx.model.d.ts +0 -9
- package/services/docx/src/lib/docx.service.d.ts +0 -15
- package/services/docx/src/lib/pandoc-core.d.ts +0 -11
- package/services/docx/src/public-api.d.ts +0 -2
- package/services/excel/src/lib/excel.model.d.ts +0 -31
- package/services/excel/src/lib/excel.service.d.ts +0 -19
- package/services/excel/src/public-api.d.ts +0 -2
- package/services/license/src/license.service.d.ts +0 -10
- package/services/loading/src/loading.service.d.ts +0 -14
- package/services/notify/src/components/toast/toast.component.d.ts +0 -28
- package/services/notify/src/components/toast-container.component.d.ts +0 -8
- package/services/notify/src/notify.model.d.ts +0 -16
- package/services/notify/src/notify.service.d.ts +0 -20
- package/services/storage/src/storage.model.d.ts +0 -20
- package/services/storage/src/storage.service.d.ts +0 -10
- package/utilities/data-state/src/data-state.d.ts +0 -11
- package/utilities/extensions/src/array.extension.d.ts +0 -1
- package/utilities/extensions/src/color.extension.d.ts +0 -5
- package/utilities/extensions/src/date.extension.d.ts +0 -1
- package/utilities/extensions/src/number.extension.d.ts +0 -1
- package/utilities/extensions/src/string.extension.d.ts +0 -50
- package/utilities/extensions/src/utility.extension.d.ts +0 -31
- package/utilities/models/src/color.model.d.ts +0 -4
- package/utilities/models/src/empty.model.d.ts +0 -4
- package/utilities/models/src/filter.model.d.ts +0 -12
- package/utilities/models/src/icon.model.d.ts +0 -2
- package/utilities/models/src/maybe-async.model.d.ts +0 -10
- package/utilities/models/src/nested-key-of.model.d.ts +0 -4
- package/utilities/models/src/operator.model.d.ts +0 -13
- package/utilities/models/src/order.model.d.ts +0 -4
- package/utilities/models/src/paging.model.d.ts +0 -8
- package/utilities/models/src/pattern.model.d.ts +0 -21
- package/utilities/models/src/size.model.d.ts +0 -4
- package/utilities/models/src/unwrap-signal.model.d.ts +0 -6
|
@@ -38,16 +38,16 @@ import { SdButton } from '@sdcorejs/angular/components/button';
|
|
|
38
38
|
*/
|
|
39
39
|
class SdQuerySavedFiltersMenu {
|
|
40
40
|
/** Namespace key used to scope localStorage. `undefined` → menu disabled. */
|
|
41
|
-
key = input(undefined);
|
|
41
|
+
key = input(undefined, ...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
42
42
|
/** Current query the host wants to snapshot when the user clicks "Save current". */
|
|
43
|
-
query = input({ filters: [], logic: 'AND' });
|
|
43
|
+
query = input({ filters: [], logic: 'AND' }, ...(ngDevMode ? [{ debugName: "query" }] : []));
|
|
44
44
|
/** Fired when the user picks a saved filter from the list. */
|
|
45
45
|
apply = output();
|
|
46
|
-
savedFilters = signal([]);
|
|
46
|
+
savedFilters = signal([], ...(ngDevMode ? [{ debugName: "savedFilters" }] : []));
|
|
47
47
|
#storageKey = computed(() => {
|
|
48
48
|
const k = this.key();
|
|
49
49
|
return k ? `sd-query-bar:savedFilters:${k}` : undefined;
|
|
50
|
-
});
|
|
50
|
+
}, ...(ngDevMode ? [{ debugName: "#storageKey" }] : []));
|
|
51
51
|
// why: reload whenever the namespace key changes (e.g. host switches user/context).
|
|
52
52
|
#loadFilters = effect(() => {
|
|
53
53
|
const storage = this.#storageKey();
|
|
@@ -62,7 +62,7 @@ class SdQuerySavedFiltersMenu {
|
|
|
62
62
|
catch {
|
|
63
63
|
this.savedFilters.set([]);
|
|
64
64
|
}
|
|
65
|
-
});
|
|
65
|
+
}, ...(ngDevMode ? [{ debugName: "#loadFilters" }] : []));
|
|
66
66
|
#persist(filters) {
|
|
67
67
|
const storage = this.#storageKey();
|
|
68
68
|
if (!storage)
|
|
@@ -105,13 +105,13 @@ class SdQuerySavedFiltersMenu {
|
|
|
105
105
|
this.savedFilters.set(next);
|
|
106
106
|
this.#persist(next);
|
|
107
107
|
}
|
|
108
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
109
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
108
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQuerySavedFiltersMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: SdQuerySavedFiltersMenu, isStandalone: true, selector: "sd-query-saved-filters-menu", inputs: { key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { apply: "apply" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"c-saved-filters\"\n [disabled]=\"!key()\"\n [matMenuTriggerFor]=\"menu\"\n [matTooltip]=\"key() ? 'B\u1ED9 l\u1ECDc \u0111\u00E3 l\u01B0u' : 'C\u1EA7n [savedFiltersKey] \u0111\u1EC3 b\u1EADt'\">\n <mat-icon fontSet=\"material-icons-outlined\">bookmark_border</mat-icon>\n</button>\n\n<mat-menu #menu=\"matMenu\" class=\"c-saved-filters-menu\" xPosition=\"before\" yPosition=\"below\">\n @for (f of savedFilters(); track f.id) {\n <button type=\"button\" mat-menu-item class=\"c-sf-row\" (click)=\"pick(f)\">\n <mat-icon class=\"c-sf-lead\" fontSet=\"material-icons-outlined\">filter_alt</mat-icon>\n <span class=\"c-sf-name\">{{ f.name }}</span>\n <span\n role=\"button\"\n tabindex=\"0\"\n class=\"c-sf-del\"\n aria-label=\"Xo\u00E1 b\u1ED9 l\u1ECDc\"\n (click)=\"remove(f.id, $event)\"\n (keydown.enter)=\"remove(f.id, $event)\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </span>\n </button>\n } @empty {\n <div class=\"c-sf-empty\">Ch\u01B0a c\u00F3 b\u1ED9 l\u1ECDc n\u00E0o.</div>\n }\n <!-- why: footer save action s\u1ED1ng trong mat-menu \u0111\u1EC3 dropdown gom 1 v\u00F9ng (list +\n save) \u2014 user m\u1EDF dropdown th\u1EA5y ngay c\u1EA3 2 h\u00E0nh \u0111\u1ED9ng, kh\u00F4ng ph\u1EA3i t\u00ECm n\u00FAt l\u01B0u\n \u1EDF ch\u1ED7 kh\u00E1c tr\u00EAn toolbar. -->\n <hr class=\"c-sf-divider\" aria-hidden=\"true\" />\n <button type=\"button\" mat-menu-item class=\"c-sf-save\" [disabled]=\"!key()\" (click)=\"promptSave()\">\n <mat-icon fontSet=\"material-icons-outlined\">bookmark_add</mat-icon>\n <span>L\u01B0u b\u1ED9 l\u1ECDc hi\u1EC7n t\u1EA1i</span>\n </button>\n</mat-menu>\n", styles: [":host{display:inline-flex}.c-saved-filters{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d6d8db;border-radius:6px;background:#fff;color:#5f6368;cursor:pointer;padding:0}.c-saved-filters mat-icon{font-size:18px;width:18px;height:18px}.c-saved-filters:hover:not([disabled]){border-color:var(--sd-primary);color:var(--sd-primary)}.c-saved-filters[disabled]{opacity:.5;cursor:not-allowed}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu{min-width:220px;max-width:320px}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .mat-mdc-menu-item.c-sf-row{min-height:40px;padding-left:16px;padding-right:4px}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .mat-mdc-menu-item.c-sf-row .mat-mdc-menu-item-text{display:flex;align-items:center;gap:8px;min-width:0;line-height:1.4}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-lead{display:inline-flex;align-items:center;justify-content:center;font-size:18px!important;width:18px!important;height:18px!important;line-height:1}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-del{flex:0 0 auto;margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;color:#7a7a7a;cursor:pointer;padding:0}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-del mat-icon{margin:0!important;padding:0;font-size:16px!important;width:16px!important;height:16px!important;line-height:16px!important;text-align:center;overflow:hidden}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-del:hover{background:#0000000f;color:#d23535}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-empty{padding:12px 16px;font-size:13px;color:#7a7a7a}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-divider{border:0;border-top:1px solid #e2e4e7;margin:4px 0}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-save mat-icon{margin-right:8px}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
110
110
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQuerySavedFiltersMenu, decorators: [{
|
|
112
112
|
type: Component,
|
|
113
113
|
args: [{ selector: 'sd-query-saved-filters-menu', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatMenuModule, MatIconModule, MatTooltipModule], template: "<button\n type=\"button\"\n class=\"c-saved-filters\"\n [disabled]=\"!key()\"\n [matMenuTriggerFor]=\"menu\"\n [matTooltip]=\"key() ? 'B\u1ED9 l\u1ECDc \u0111\u00E3 l\u01B0u' : 'C\u1EA7n [savedFiltersKey] \u0111\u1EC3 b\u1EADt'\">\n <mat-icon fontSet=\"material-icons-outlined\">bookmark_border</mat-icon>\n</button>\n\n<mat-menu #menu=\"matMenu\" class=\"c-saved-filters-menu\" xPosition=\"before\" yPosition=\"below\">\n @for (f of savedFilters(); track f.id) {\n <button type=\"button\" mat-menu-item class=\"c-sf-row\" (click)=\"pick(f)\">\n <mat-icon class=\"c-sf-lead\" fontSet=\"material-icons-outlined\">filter_alt</mat-icon>\n <span class=\"c-sf-name\">{{ f.name }}</span>\n <span\n role=\"button\"\n tabindex=\"0\"\n class=\"c-sf-del\"\n aria-label=\"Xo\u00E1 b\u1ED9 l\u1ECDc\"\n (click)=\"remove(f.id, $event)\"\n (keydown.enter)=\"remove(f.id, $event)\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </span>\n </button>\n } @empty {\n <div class=\"c-sf-empty\">Ch\u01B0a c\u00F3 b\u1ED9 l\u1ECDc n\u00E0o.</div>\n }\n <!-- why: footer save action s\u1ED1ng trong mat-menu \u0111\u1EC3 dropdown gom 1 v\u00F9ng (list +\n save) \u2014 user m\u1EDF dropdown th\u1EA5y ngay c\u1EA3 2 h\u00E0nh \u0111\u1ED9ng, kh\u00F4ng ph\u1EA3i t\u00ECm n\u00FAt l\u01B0u\n \u1EDF ch\u1ED7 kh\u00E1c tr\u00EAn toolbar. -->\n <hr class=\"c-sf-divider\" aria-hidden=\"true\" />\n <button type=\"button\" mat-menu-item class=\"c-sf-save\" [disabled]=\"!key()\" (click)=\"promptSave()\">\n <mat-icon fontSet=\"material-icons-outlined\">bookmark_add</mat-icon>\n <span>L\u01B0u b\u1ED9 l\u1ECDc hi\u1EC7n t\u1EA1i</span>\n </button>\n</mat-menu>\n", styles: [":host{display:inline-flex}.c-saved-filters{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d6d8db;border-radius:6px;background:#fff;color:#5f6368;cursor:pointer;padding:0}.c-saved-filters mat-icon{font-size:18px;width:18px;height:18px}.c-saved-filters:hover:not([disabled]){border-color:var(--sd-primary);color:var(--sd-primary)}.c-saved-filters[disabled]{opacity:.5;cursor:not-allowed}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu{min-width:220px;max-width:320px}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .mat-mdc-menu-item.c-sf-row{min-height:40px;padding-left:16px;padding-right:4px}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .mat-mdc-menu-item.c-sf-row .mat-mdc-menu-item-text{display:flex;align-items:center;gap:8px;min-width:0;line-height:1.4}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-lead{display:inline-flex;align-items:center;justify-content:center;font-size:18px!important;width:18px!important;height:18px!important;line-height:1}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-del{flex:0 0 auto;margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;color:#7a7a7a;cursor:pointer;padding:0}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-del mat-icon{margin:0!important;padding:0;font-size:16px!important;width:16px!important;height:16px!important;line-height:16px!important;text-align:center;overflow:hidden}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-del:hover{background:#0000000f;color:#d23535}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-empty{padding:12px 16px;font-size:13px;color:#7a7a7a}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-divider{border:0;border-top:1px solid #e2e4e7;margin:4px 0}::ng-deep .mat-mdc-menu-panel.c-saved-filters-menu .c-sf-save mat-icon{margin-right:8px}\n"] }]
|
|
114
|
-
}] });
|
|
114
|
+
}], propDecorators: { key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }], apply: [{ type: i0.Output, args: ["apply"] }] } });
|
|
115
115
|
|
|
116
116
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
117
117
|
/**
|
|
@@ -126,32 +126,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
126
126
|
*/
|
|
127
127
|
class SdQueryActionsBar {
|
|
128
128
|
// AND/OR toggle —
|
|
129
|
-
showLogicToggle = input(false, { transform: booleanAttribute });
|
|
130
|
-
logic = model('AND');
|
|
131
|
-
filtersCount = input(0);
|
|
129
|
+
showLogicToggle = input(false, ...(ngDevMode ? [{ debugName: "showLogicToggle", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
130
|
+
logic = model('AND', ...(ngDevMode ? [{ debugName: "logic" }] : []));
|
|
131
|
+
filtersCount = input(0, ...(ngDevMode ? [{ debugName: "filtersCount" }] : []));
|
|
132
132
|
// Saved filters —
|
|
133
|
-
showSavedFilters = input(false, { transform: booleanAttribute });
|
|
134
|
-
savedFiltersKey = input(undefined);
|
|
135
|
-
query = input({ filters: [], logic: 'AND' });
|
|
133
|
+
showSavedFilters = input(false, ...(ngDevMode ? [{ debugName: "showSavedFilters", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
134
|
+
savedFiltersKey = input(undefined, ...(ngDevMode ? [{ debugName: "savedFiltersKey" }] : []));
|
|
135
|
+
query = input({ filters: [], logic: 'AND' }, ...(ngDevMode ? [{ debugName: "query" }] : []));
|
|
136
136
|
applyFilter = output();
|
|
137
137
|
// Clear-all —
|
|
138
|
-
showClearAll = input(true, { transform: booleanAttribute });
|
|
138
|
+
showClearAll = input(true, ...(ngDevMode ? [{ debugName: "showClearAll", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
139
139
|
clear = output();
|
|
140
140
|
// Search trigger —
|
|
141
|
-
canSearch = input(false);
|
|
141
|
+
canSearch = input(false, ...(ngDevMode ? [{ debugName: "canSearch" }] : []));
|
|
142
142
|
search = output();
|
|
143
143
|
setLogic(value) {
|
|
144
144
|
if (this.logic() === value)
|
|
145
145
|
return;
|
|
146
146
|
this.logic.set(value);
|
|
147
147
|
}
|
|
148
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
149
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
148
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryActionsBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
149
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: SdQueryActionsBar, isStandalone: true, selector: "sd-query-actions-bar", inputs: { showLogicToggle: { classPropertyName: "showLogicToggle", publicName: "showLogicToggle", isSignal: true, isRequired: false, transformFunction: null }, logic: { classPropertyName: "logic", publicName: "logic", isSignal: true, isRequired: false, transformFunction: null }, filtersCount: { classPropertyName: "filtersCount", publicName: "filtersCount", isSignal: true, isRequired: false, transformFunction: null }, showSavedFilters: { classPropertyName: "showSavedFilters", publicName: "showSavedFilters", isSignal: true, isRequired: false, transformFunction: null }, savedFiltersKey: { classPropertyName: "savedFiltersKey", publicName: "savedFiltersKey", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, showClearAll: { classPropertyName: "showClearAll", publicName: "showClearAll", isSignal: true, isRequired: false, transformFunction: null }, canSearch: { classPropertyName: "canSearch", publicName: "canSearch", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { logic: "logicChange", applyFilter: "applyFilter", clear: "clear", search: "search" }, ngImport: i0, template: "<!-- Vertical separator between the wrapping filter area (left) and the pinned toolbar. -->\n<span class=\"c-bar-divider\" aria-hidden=\"true\"></span>\n\n<div class=\"c-query-bar__actions\">\n <!-- AND / OR toggle -->\n @if (showLogicToggle() && filtersCount() >= 2) {\n <div class=\"c-logic-toggle\" role=\"group\" aria-label=\"Logic operator\">\n <button\n type=\"button\"\n class=\"c-logic-segment\"\n [class.c-logic-active]=\"logic() === 'AND'\"\n (click)=\"setLogic('AND')\">\n AND\n </button>\n <button\n type=\"button\"\n class=\"c-logic-segment\"\n [class.c-logic-active]=\"logic() === 'OR'\"\n (click)=\"setLogic('OR')\">\n OR\n </button>\n </div>\n }\n\n @if (showClearAll() && filtersCount() > 0) {\n <button\n type=\"button\"\n class=\"c-clear-all\"\n [matTooltip]=\"'X\u00F3a t\u1EA5t c\u1EA3 (' + filtersCount() + ')'\"\n (click)=\"clear.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">delete_sweep</mat-icon>\n </button>\n }\n\n <!-- why: saved-filters dropdown \u0111\u1EB7t s\u00E1t ngay tr\u01B0\u1EDBc Search \u2014 gom to\u00E0n b\u1ED9\n h\u00E0nh \u0111\u1ED9ng v\u1EC1 b\u1ED9 l\u1ECDc (apply view c\u0169 / l\u01B0u view hi\u1EC7n t\u1EA1i) c\u1EA1nh n\u00FAt submit,\n user th\u1EA5y 1 c\u1EE5m. Footer \"L\u01B0u b\u1ED9 l\u1ECDc hi\u1EC7n t\u1EA1i\" s\u1ED1ng trong mat-menu c\u1EE7a\n saved-filters-menu, kh\u00F4ng t\u00E1ch ra n\u00FAt ri\u00EAng n\u1EEFa. -->\n @if (showSavedFilters()) {\n <sd-query-saved-filters-menu\n [key]=\"savedFiltersKey()\"\n [query]=\"query()\"\n (apply)=\"applyFilter.emit($event)\" />\n }\n\n <!-- why: far-right \"submit at the end of the toolbar\" position; sole query trigger. -->\n <button\n type=\"button\"\n class=\"c-search-trigger\"\n [disabled]=\"!canSearch()\"\n matTooltip=\"T\u00ECm ki\u1EBFm\"\n (click)=\"search.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">search</mat-icon>\n </button>\n</div>\n", styles: [":host{display:contents}.c-bar-divider{flex:0 0 auto;align-self:stretch;width:1px;min-height:28px;background:#e2e4e7}.c-query-bar__actions{flex:0 0 auto;display:flex;align-items:center;gap:6px}.c-logic-toggle{display:inline-flex;align-items:center;padding:2px;background:#f5f6f7;border:1px solid #e2e4e7;border-radius:6px}:host-context(.c-density-compact) .c-logic-toggle{height:28px}:host-context(.c-density-comfortable) .c-logic-toggle{height:32px}.c-logic-toggle .c-logic-segment{height:100%;padding:0 10px;border:none;background:transparent;font-family:Roboto Mono,monospace;font-size:11px;font-weight:600;letter-spacing:.4px;color:#5f6368;cursor:pointer;border-radius:4px}.c-logic-toggle .c-logic-segment.c-logic-active{background:#fff;color:var(--sd-primary);box-shadow:0 1px 2px #00000014}.c-clear-all,.c-search-trigger{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d6d8db;border-radius:6px;background:#fff;color:#5f6368;cursor:pointer;padding:0}:host-context(.c-density-compact) .c-clear-all,:host-context(.c-density-compact) .c-search-trigger{width:28px;height:28px}:host-context(.c-density-comfortable) .c-clear-all,:host-context(.c-density-comfortable) .c-search-trigger{width:32px;height:32px}.c-clear-all mat-icon,.c-search-trigger mat-icon{font-size:18px;width:18px;height:18px}.c-clear-all:hover:not([disabled]),.c-search-trigger:hover:not([disabled]){border-color:var(--sd-primary);color:var(--sd-primary)}.c-clear-all[disabled],.c-search-trigger[disabled]{opacity:.5;cursor:not-allowed}.c-clear-all:hover{border-color:#dc2626;color:#dc2626}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdQuerySavedFiltersMenu, selector: "sd-query-saved-filters-menu", inputs: ["key", "query"], outputs: ["apply"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
150
150
|
}
|
|
151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryActionsBar, decorators: [{
|
|
152
152
|
type: Component,
|
|
153
153
|
args: [{ selector: 'sd-query-actions-bar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconModule, MatTooltipModule, SdQuerySavedFiltersMenu], template: "<!-- Vertical separator between the wrapping filter area (left) and the pinned toolbar. -->\n<span class=\"c-bar-divider\" aria-hidden=\"true\"></span>\n\n<div class=\"c-query-bar__actions\">\n <!-- AND / OR toggle -->\n @if (showLogicToggle() && filtersCount() >= 2) {\n <div class=\"c-logic-toggle\" role=\"group\" aria-label=\"Logic operator\">\n <button\n type=\"button\"\n class=\"c-logic-segment\"\n [class.c-logic-active]=\"logic() === 'AND'\"\n (click)=\"setLogic('AND')\">\n AND\n </button>\n <button\n type=\"button\"\n class=\"c-logic-segment\"\n [class.c-logic-active]=\"logic() === 'OR'\"\n (click)=\"setLogic('OR')\">\n OR\n </button>\n </div>\n }\n\n @if (showClearAll() && filtersCount() > 0) {\n <button\n type=\"button\"\n class=\"c-clear-all\"\n [matTooltip]=\"'X\u00F3a t\u1EA5t c\u1EA3 (' + filtersCount() + ')'\"\n (click)=\"clear.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">delete_sweep</mat-icon>\n </button>\n }\n\n <!-- why: saved-filters dropdown \u0111\u1EB7t s\u00E1t ngay tr\u01B0\u1EDBc Search \u2014 gom to\u00E0n b\u1ED9\n h\u00E0nh \u0111\u1ED9ng v\u1EC1 b\u1ED9 l\u1ECDc (apply view c\u0169 / l\u01B0u view hi\u1EC7n t\u1EA1i) c\u1EA1nh n\u00FAt submit,\n user th\u1EA5y 1 c\u1EE5m. Footer \"L\u01B0u b\u1ED9 l\u1ECDc hi\u1EC7n t\u1EA1i\" s\u1ED1ng trong mat-menu c\u1EE7a\n saved-filters-menu, kh\u00F4ng t\u00E1ch ra n\u00FAt ri\u00EAng n\u1EEFa. -->\n @if (showSavedFilters()) {\n <sd-query-saved-filters-menu\n [key]=\"savedFiltersKey()\"\n [query]=\"query()\"\n (apply)=\"applyFilter.emit($event)\" />\n }\n\n <!-- why: far-right \"submit at the end of the toolbar\" position; sole query trigger. -->\n <button\n type=\"button\"\n class=\"c-search-trigger\"\n [disabled]=\"!canSearch()\"\n matTooltip=\"T\u00ECm ki\u1EBFm\"\n (click)=\"search.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">search</mat-icon>\n </button>\n</div>\n", styles: [":host{display:contents}.c-bar-divider{flex:0 0 auto;align-self:stretch;width:1px;min-height:28px;background:#e2e4e7}.c-query-bar__actions{flex:0 0 auto;display:flex;align-items:center;gap:6px}.c-logic-toggle{display:inline-flex;align-items:center;padding:2px;background:#f5f6f7;border:1px solid #e2e4e7;border-radius:6px}:host-context(.c-density-compact) .c-logic-toggle{height:28px}:host-context(.c-density-comfortable) .c-logic-toggle{height:32px}.c-logic-toggle .c-logic-segment{height:100%;padding:0 10px;border:none;background:transparent;font-family:Roboto Mono,monospace;font-size:11px;font-weight:600;letter-spacing:.4px;color:#5f6368;cursor:pointer;border-radius:4px}.c-logic-toggle .c-logic-segment.c-logic-active{background:#fff;color:var(--sd-primary);box-shadow:0 1px 2px #00000014}.c-clear-all,.c-search-trigger{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d6d8db;border-radius:6px;background:#fff;color:#5f6368;cursor:pointer;padding:0}:host-context(.c-density-compact) .c-clear-all,:host-context(.c-density-compact) .c-search-trigger{width:28px;height:28px}:host-context(.c-density-comfortable) .c-clear-all,:host-context(.c-density-comfortable) .c-search-trigger{width:32px;height:32px}.c-clear-all mat-icon,.c-search-trigger mat-icon{font-size:18px;width:18px;height:18px}.c-clear-all:hover:not([disabled]),.c-search-trigger:hover:not([disabled]){border-color:var(--sd-primary);color:var(--sd-primary)}.c-clear-all[disabled],.c-search-trigger[disabled]{opacity:.5;cursor:not-allowed}.c-clear-all:hover{border-color:#dc2626;color:#dc2626}\n"] }]
|
|
154
|
-
}] });
|
|
154
|
+
}], propDecorators: { showLogicToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLogicToggle", required: false }] }], logic: [{ type: i0.Input, args: [{ isSignal: true, alias: "logic", required: false }] }, { type: i0.Output, args: ["logicChange"] }], filtersCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtersCount", required: false }] }], showSavedFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSavedFilters", required: false }] }], savedFiltersKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "savedFiltersKey", required: false }] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }], applyFilter: [{ type: i0.Output, args: ["applyFilter"] }], showClearAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearAll", required: false }] }], clear: [{ type: i0.Output, args: ["clear"] }], canSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "canSearch", required: false }] }], search: [{ type: i0.Output, args: ["search"] }] } });
|
|
155
155
|
|
|
156
156
|
// ---------------------------------------------------------------------------
|
|
157
157
|
// Constants
|
|
@@ -238,36 +238,36 @@ function sdQueryShowOperatorSelector(field) {
|
|
|
238
238
|
*/
|
|
239
239
|
class SdQueryInlineValueChip {
|
|
240
240
|
/** Field this chip filters by — must be kind `string` or `number`. */
|
|
241
|
-
field = input.required();
|
|
241
|
+
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
242
242
|
/** Active operator (drives BETWEEN dual-input + no-data hiding). */
|
|
243
|
-
operator = input('CONTAIN');
|
|
243
|
+
operator = input('CONTAIN', ...(ngDevMode ? [{ debugName: "operator" }] : []));
|
|
244
244
|
/** Current value: scalar for most operators, `{ from, to }` for BETWEEN. */
|
|
245
|
-
value = input(null);
|
|
246
|
-
density = input('compact');
|
|
245
|
+
value = input(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
246
|
+
density = input('compact', ...(ngDevMode ? [{ debugName: "density" }] : []));
|
|
247
247
|
/** Show the operator label as a small pill inside the label segment. */
|
|
248
|
-
showOperator = input(false);
|
|
248
|
+
showOperator = input(false, ...(ngDevMode ? [{ debugName: "showOperator" }] : []));
|
|
249
249
|
/** Prefix for the inner input's `data-autoid`. */
|
|
250
|
-
autoId = input(undefined);
|
|
250
|
+
autoId = input(undefined, ...(ngDevMode ? [{ debugName: "autoId" }] : []));
|
|
251
251
|
/** Focus the first input on creation — used for the in-progress build chip. */
|
|
252
|
-
autofocus = input(false);
|
|
252
|
+
autofocus = input(false, ...(ngDevMode ? [{ debugName: "autofocus" }] : []));
|
|
253
253
|
/** Emitted on commit (Enter / blur) with the parsed next value. */
|
|
254
254
|
valueChange = output();
|
|
255
255
|
/** Emitted when the user clicks the × segment. */
|
|
256
256
|
remove = output();
|
|
257
|
-
firstInput = viewChild('firstInput');
|
|
258
|
-
focused = signal(false);
|
|
259
|
-
hasError = signal(false);
|
|
257
|
+
firstInput = viewChild('firstInput', ...(ngDevMode ? [{ debugName: "firstInput" }] : []));
|
|
258
|
+
focused = signal(false, ...(ngDevMode ? [{ debugName: "focused" }] : []));
|
|
259
|
+
hasError = signal(false, ...(ngDevMode ? [{ debugName: "hasError" }] : []));
|
|
260
260
|
/** Editable drafts — single value, plus from/to for BETWEEN. Seeded from `value`. */
|
|
261
|
-
draft = signal('');
|
|
262
|
-
draftFrom = signal('');
|
|
263
|
-
draftTo = signal('');
|
|
264
|
-
isNumber = computed(() => this.field().type === 'number');
|
|
265
|
-
isBetween = computed(() => this.operator() === 'BETWEEN');
|
|
266
|
-
isNoData = computed(() => SD_QUERY_NO_DATA_OPERATORS.includes(this.operator()));
|
|
267
|
-
icon = computed(() => sdQueryFieldIcon(this.field()));
|
|
268
|
-
ph = computed(() => (this.isNumber() ? 'giá trị' : 'nhập…'));
|
|
269
|
-
phFrom = computed(() => (this.isNumber() ? 'Từ' : 'từ…'));
|
|
270
|
-
phTo = computed(() => (this.isNumber() ? 'Đến' : 'đến…'));
|
|
261
|
+
draft = signal('', ...(ngDevMode ? [{ debugName: "draft" }] : []));
|
|
262
|
+
draftFrom = signal('', ...(ngDevMode ? [{ debugName: "draftFrom" }] : []));
|
|
263
|
+
draftTo = signal('', ...(ngDevMode ? [{ debugName: "draftTo" }] : []));
|
|
264
|
+
isNumber = computed(() => this.field().type === 'number', ...(ngDevMode ? [{ debugName: "isNumber" }] : []));
|
|
265
|
+
isBetween = computed(() => this.operator() === 'BETWEEN', ...(ngDevMode ? [{ debugName: "isBetween" }] : []));
|
|
266
|
+
isNoData = computed(() => SD_QUERY_NO_DATA_OPERATORS.includes(this.operator()), ...(ngDevMode ? [{ debugName: "isNoData" }] : []));
|
|
267
|
+
icon = computed(() => sdQueryFieldIcon(this.field()), ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
268
|
+
ph = computed(() => (this.isNumber() ? 'giá trị' : 'nhập…'), ...(ngDevMode ? [{ debugName: "ph" }] : []));
|
|
269
|
+
phFrom = computed(() => (this.isNumber() ? 'Từ' : 'từ…'), ...(ngDevMode ? [{ debugName: "phFrom" }] : []));
|
|
270
|
+
phTo = computed(() => (this.isNumber() ? 'Đến' : 'đến…'), ...(ngDevMode ? [{ debugName: "phTo" }] : []));
|
|
271
271
|
hasValue = computed(() => {
|
|
272
272
|
if (this.isNoData())
|
|
273
273
|
return true;
|
|
@@ -277,14 +277,14 @@ class SdQueryInlineValueChip {
|
|
|
277
277
|
return (r.from != null && r.from !== '') || (r.to != null && r.to !== '');
|
|
278
278
|
}
|
|
279
279
|
return v != null && v !== '';
|
|
280
|
-
});
|
|
280
|
+
}, ...(ngDevMode ? [{ debugName: "hasValue" }] : []));
|
|
281
281
|
state = computed(() => {
|
|
282
282
|
if (this.hasError())
|
|
283
283
|
return 'error';
|
|
284
284
|
if (this.focused())
|
|
285
285
|
return 'focus';
|
|
286
286
|
return this.hasValue() ? 'active' : 'pending';
|
|
287
|
-
});
|
|
287
|
+
}, ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
288
288
|
constructor() {
|
|
289
289
|
// Reseed drafts whenever the bound value / operator / kind changes. While the user
|
|
290
290
|
// types, none of those change (commit is on blur), so this never clobbers an edit.
|
|
@@ -392,13 +392,13 @@ class SdQueryInlineValueChip {
|
|
|
392
392
|
}
|
|
393
393
|
return { ok: true, value: t };
|
|
394
394
|
}
|
|
395
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
396
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
395
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryInlineValueChip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
396
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: SdQueryInlineValueChip, isStandalone: true, selector: "sd-query-inline-value-chip", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, operator: { classPropertyName: "operator", publicName: "operator", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, showOperator: { classPropertyName: "showOperator", publicName: "showOperator", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", remove: "remove" }, viewQueries: [{ propertyName: "firstInput", first: true, predicate: ["firstInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n Seamless string/number chip \u2014 the pill IS the input. One border, three flush\n segments: label \u00B7 input(s) \u00B7 \u00D7. State styling driven by [data-state].\n-->\n<span\n class=\"c-seamless\"\n [attr.data-state]=\"state()\"\n [class.c-seamless--compact]=\"density() === 'compact'\"\n [class.c-seamless--comfortable]=\"density() === 'comfortable'\"\n (click)=\"focusFromShell($event)\">\n\n <!-- Label segment: icon + field name (+ optional operator pill) -->\n <span class=\"c-seamless__label\">\n <mat-icon class=\"c-seamless__icon\" fontSet=\"material-icons-outlined\">{{ icon() }}</mat-icon>\n <span class=\"c-seamless__field\">{{ field().label }}</span>\n @if (showOperator() && !isNoData()) {\n <sd-operator class=\"c-seamless__op\" [operators]=\"[operator()]\" [model]=\"operator()\" [disabled]=\"true\" />\n } @else if (!isNoData()) {\n <span class=\"c-seamless__sep\">:</span>\n }\n </span>\n\n <!-- Input segment \u2014 transparent, borderless; hidden for NULL / NOT_NULL -->\n @if (!isNoData()) {\n <span class=\"c-seamless__input\">\n @if (isBetween()) {\n <input\n #firstInput\n type=\"text\"\n class=\"c-seamless__field-input\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-from' : null\"\n [ngModel]=\"draftFrom()\"\n (ngModelChange)=\"draftFrom.set($event)\"\n [size]=\"sizeFor(draftFrom(), phFrom())\"\n [placeholder]=\"phFrom()\"\n (focus)=\"onFocus()\"\n (blur)=\"commitRange()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"revertAndBlur($any($event.target))\" />\n <span class=\"c-seamless__dash\" aria-hidden=\"true\">\u2014</span>\n <input\n type=\"text\"\n class=\"c-seamless__field-input\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-to' : null\"\n [ngModel]=\"draftTo()\"\n (ngModelChange)=\"draftTo.set($event)\"\n [size]=\"sizeFor(draftTo(), phTo())\"\n [placeholder]=\"phTo()\"\n (focus)=\"onFocus()\"\n (blur)=\"commitRange()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"revertAndBlur($any($event.target))\" />\n } @else {\n <input\n #firstInput\n type=\"text\"\n class=\"c-seamless__field-input\"\n [attr.data-autoid]=\"autoId() ?? null\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event)\"\n [size]=\"sizeFor(draft(), ph())\"\n [placeholder]=\"ph()\"\n (focus)=\"onFocus()\"\n (blur)=\"commitSingle()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"revertAndBlur($any($event.target))\" />\n }\n </span>\n }\n\n <!-- \u00D7 segment -->\n <button type=\"button\" class=\"c-seamless__x\" aria-label=\"Remove filter\" (click)=\"onRemove($event)\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </button>\n</span>\n", styles: [":host{display:inline-flex}.c-seamless{display:inline-flex;align-items:stretch;border-radius:999px;overflow:hidden;font-family:inherit;font-size:13px;line-height:1;cursor:text;border:1px solid #d6d8db;background:#fff;color:#5f6368;transition:border-color .12s ease,background-color .12s ease,box-shadow .12s ease,color .12s ease}.c-seamless--compact{height:28px}.c-seamless--comfortable{height:32px}.c-seamless:hover:not([data-state=focus]):not([data-state=error]){border-color:var(--sd-primary)}.c-seamless[data-state=pending]{border-style:dashed;border-color:#d6d8db;background:#fff;color:#5f6368}.c-seamless[data-state=pending] .c-seamless__field-input{color:#212121}.c-seamless[data-state=pending] .c-seamless__field-input::placeholder{color:#7a7a7a;font-style:italic}.c-seamless[data-state=active]{border-color:var(--sd-primary-light);background:var(--sd-primary-light)}.c-seamless[data-state=active] .c-seamless__field-input{color:var(--sd-primary)}.c-seamless[data-state=focus]{border-color:var(--sd-primary);background:#fff;box-shadow:0 0 0 3px var(--sd-primary-light)}.c-seamless[data-state=focus] .c-seamless__field-input{color:#212121}.c-seamless[data-state=error]{border-color:#d23535;background:#fff5f5;color:#d23535;box-shadow:0 0 0 3px #d235351f}.c-seamless[data-state=error] .c-seamless__field-input{color:#d23535}.c-seamless__label{display:inline-flex;align-items:center;gap:4px;font-weight:500;white-space:nowrap;cursor:text;color:inherit}.c-seamless--compact .c-seamless__label{padding:0 0 0 12px}.c-seamless--comfortable .c-seamless__label{padding:0 0 0 14px}.c-seamless__icon{font-size:14px;width:14px;height:14px;color:inherit}.c-seamless__field{color:inherit}.c-seamless__op{display:inline-flex;align-items:center;color:inherit}.c-seamless__sep{color:#7a7a7a}.c-seamless__input{display:inline-flex;align-items:center;gap:4px}.c-seamless--compact .c-seamless__input{padding:0 8px 0 4px}.c-seamless--comfortable .c-seamless__input{padding:0 10px 0 6px}.c-seamless__dash{color:#7a7a7a}.c-seamless__field-input{appearance:none;border:0;outline:0;background:transparent;font:inherit;font-weight:500;padding:0;min-width:24px;max-width:200px}.c-seamless__x{display:inline-flex;align-items:center;justify-content:center;border:0;border-left:1px solid rgba(0,0,0,.04);background:transparent;cursor:pointer;color:inherit}.c-seamless--compact .c-seamless__x{width:26px}.c-seamless--comfortable .c-seamless__x{width:28px}.c-seamless__x mat-icon{font-size:14px;width:14px;height:14px}.c-seamless__x:hover{background:#0000000d}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
397
397
|
}
|
|
398
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryInlineValueChip, decorators: [{
|
|
399
399
|
type: Component,
|
|
400
400
|
args: [{ selector: 'sd-query-inline-value-chip', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, MatIconModule, SdOperator], template: "<!--\n Seamless string/number chip \u2014 the pill IS the input. One border, three flush\n segments: label \u00B7 input(s) \u00B7 \u00D7. State styling driven by [data-state].\n-->\n<span\n class=\"c-seamless\"\n [attr.data-state]=\"state()\"\n [class.c-seamless--compact]=\"density() === 'compact'\"\n [class.c-seamless--comfortable]=\"density() === 'comfortable'\"\n (click)=\"focusFromShell($event)\">\n\n <!-- Label segment: icon + field name (+ optional operator pill) -->\n <span class=\"c-seamless__label\">\n <mat-icon class=\"c-seamless__icon\" fontSet=\"material-icons-outlined\">{{ icon() }}</mat-icon>\n <span class=\"c-seamless__field\">{{ field().label }}</span>\n @if (showOperator() && !isNoData()) {\n <sd-operator class=\"c-seamless__op\" [operators]=\"[operator()]\" [model]=\"operator()\" [disabled]=\"true\" />\n } @else if (!isNoData()) {\n <span class=\"c-seamless__sep\">:</span>\n }\n </span>\n\n <!-- Input segment \u2014 transparent, borderless; hidden for NULL / NOT_NULL -->\n @if (!isNoData()) {\n <span class=\"c-seamless__input\">\n @if (isBetween()) {\n <input\n #firstInput\n type=\"text\"\n class=\"c-seamless__field-input\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-from' : null\"\n [ngModel]=\"draftFrom()\"\n (ngModelChange)=\"draftFrom.set($event)\"\n [size]=\"sizeFor(draftFrom(), phFrom())\"\n [placeholder]=\"phFrom()\"\n (focus)=\"onFocus()\"\n (blur)=\"commitRange()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"revertAndBlur($any($event.target))\" />\n <span class=\"c-seamless__dash\" aria-hidden=\"true\">\u2014</span>\n <input\n type=\"text\"\n class=\"c-seamless__field-input\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-to' : null\"\n [ngModel]=\"draftTo()\"\n (ngModelChange)=\"draftTo.set($event)\"\n [size]=\"sizeFor(draftTo(), phTo())\"\n [placeholder]=\"phTo()\"\n (focus)=\"onFocus()\"\n (blur)=\"commitRange()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"revertAndBlur($any($event.target))\" />\n } @else {\n <input\n #firstInput\n type=\"text\"\n class=\"c-seamless__field-input\"\n [attr.data-autoid]=\"autoId() ?? null\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event)\"\n [size]=\"sizeFor(draft(), ph())\"\n [placeholder]=\"ph()\"\n (focus)=\"onFocus()\"\n (blur)=\"commitSingle()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"revertAndBlur($any($event.target))\" />\n }\n </span>\n }\n\n <!-- \u00D7 segment -->\n <button type=\"button\" class=\"c-seamless__x\" aria-label=\"Remove filter\" (click)=\"onRemove($event)\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </button>\n</span>\n", styles: [":host{display:inline-flex}.c-seamless{display:inline-flex;align-items:stretch;border-radius:999px;overflow:hidden;font-family:inherit;font-size:13px;line-height:1;cursor:text;border:1px solid #d6d8db;background:#fff;color:#5f6368;transition:border-color .12s ease,background-color .12s ease,box-shadow .12s ease,color .12s ease}.c-seamless--compact{height:28px}.c-seamless--comfortable{height:32px}.c-seamless:hover:not([data-state=focus]):not([data-state=error]){border-color:var(--sd-primary)}.c-seamless[data-state=pending]{border-style:dashed;border-color:#d6d8db;background:#fff;color:#5f6368}.c-seamless[data-state=pending] .c-seamless__field-input{color:#212121}.c-seamless[data-state=pending] .c-seamless__field-input::placeholder{color:#7a7a7a;font-style:italic}.c-seamless[data-state=active]{border-color:var(--sd-primary-light);background:var(--sd-primary-light)}.c-seamless[data-state=active] .c-seamless__field-input{color:var(--sd-primary)}.c-seamless[data-state=focus]{border-color:var(--sd-primary);background:#fff;box-shadow:0 0 0 3px var(--sd-primary-light)}.c-seamless[data-state=focus] .c-seamless__field-input{color:#212121}.c-seamless[data-state=error]{border-color:#d23535;background:#fff5f5;color:#d23535;box-shadow:0 0 0 3px #d235351f}.c-seamless[data-state=error] .c-seamless__field-input{color:#d23535}.c-seamless__label{display:inline-flex;align-items:center;gap:4px;font-weight:500;white-space:nowrap;cursor:text;color:inherit}.c-seamless--compact .c-seamless__label{padding:0 0 0 12px}.c-seamless--comfortable .c-seamless__label{padding:0 0 0 14px}.c-seamless__icon{font-size:14px;width:14px;height:14px;color:inherit}.c-seamless__field{color:inherit}.c-seamless__op{display:inline-flex;align-items:center;color:inherit}.c-seamless__sep{color:#7a7a7a}.c-seamless__input{display:inline-flex;align-items:center;gap:4px}.c-seamless--compact .c-seamless__input{padding:0 8px 0 4px}.c-seamless--comfortable .c-seamless__input{padding:0 10px 0 6px}.c-seamless__dash{color:#7a7a7a}.c-seamless__field-input{appearance:none;border:0;outline:0;background:transparent;font:inherit;font-weight:500;padding:0;min-width:24px;max-width:200px}.c-seamless__x{display:inline-flex;align-items:center;justify-content:center;border:0;border-left:1px solid rgba(0,0,0,.04);background:transparent;cursor:pointer;color:inherit}.c-seamless--compact .c-seamless__x{width:26px}.c-seamless--comfortable .c-seamless__x{width:28px}.c-seamless__x mat-icon{font-size:14px;width:14px;height:14px}.c-seamless__x:hover{background:#0000000d}\n"] }]
|
|
401
|
-
}], ctorParameters: () => [] });
|
|
401
|
+
}], ctorParameters: () => [], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], operator: [{ type: i0.Input, args: [{ isSignal: true, alias: "operator", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], showOperator: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOperator", required: false }] }], autoId: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], remove: [{ type: i0.Output, args: ["remove"] }], firstInput: [{ type: i0.ViewChild, args: ['firstInput', { isSignal: true }] }] } });
|
|
402
402
|
|
|
403
403
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
404
404
|
/**
|
|
@@ -417,21 +417,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
417
417
|
*/
|
|
418
418
|
class SdQueryBuildChip {
|
|
419
419
|
/** Current build state — drives every visual branch. */
|
|
420
|
-
building = input.required();
|
|
420
|
+
building = input.required(...(ngDevMode ? [{ debugName: "building" }] : []));
|
|
421
421
|
/** Density preset — forwarded to the seamless chip + sizes the .c-token row. */
|
|
422
|
-
density = input('compact');
|
|
422
|
+
density = input('compact', ...(ngDevMode ? [{ debugName: "density" }] : []));
|
|
423
423
|
/** Operator set offered in the operator-step menu (parent's `allowedOperatorsFor(field)`). */
|
|
424
|
-
allowedOperators = input([]);
|
|
424
|
+
allowedOperators = input([], ...(ngDevMode ? [{ debugName: "allowedOperators" }] : []));
|
|
425
425
|
/** Whether the active operator is a multi-select (`IN`/`NOT_IN`) — drives sd-select [multiple]. */
|
|
426
|
-
multiple = input(false);
|
|
426
|
+
multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
|
|
427
427
|
/** Show the operator label on the seamless chip's pill (forwarded to inline-value-chip). */
|
|
428
|
-
showOperator = input(false);
|
|
428
|
+
showOperator = input(false, ...(ngDevMode ? [{ debugName: "showOperator" }] : []));
|
|
429
429
|
/**
|
|
430
430
|
* Prefix for `data-autoid` on the inner picker / seamless input.
|
|
431
431
|
* why: parent originally hard-coded `'qb-build-value'` everywhere; default preserves that
|
|
432
432
|
* for backward compatibility with existing e2e selectors.
|
|
433
433
|
*/
|
|
434
|
-
autoId = input('qb-build-value');
|
|
434
|
+
autoId = input('qb-build-value', ...(ngDevMode ? [{ debugName: "autoId" }] : []));
|
|
435
435
|
// ---------------------------------------------------------------------------
|
|
436
436
|
// Outputs
|
|
437
437
|
// ---------------------------------------------------------------------------
|
|
@@ -457,9 +457,9 @@ class SdQueryBuildChip {
|
|
|
457
457
|
// Internal refs — used by parent via public open*() methods
|
|
458
458
|
// ---------------------------------------------------------------------------
|
|
459
459
|
/** Operator-step menu — auto-opened by parent right after `building` enters operator step. */
|
|
460
|
-
opMenu = viewChild('buildOperator');
|
|
460
|
+
opMenu = viewChild('buildOperator', ...(ngDevMode ? [{ debugName: "opMenu" }] : []));
|
|
461
461
|
/** Value-step picker (the active bare control) — auto-opened by parent at value step. */
|
|
462
|
-
picker = viewChild('bPicker');
|
|
462
|
+
picker = viewChild('bPicker', ...(ngDevMode ? [{ debugName: "picker" }] : []));
|
|
463
463
|
/** Open the operator menu — parent calls after rendering the operator step. */
|
|
464
464
|
openOperator() {
|
|
465
465
|
this.opMenu()?.open();
|
|
@@ -478,11 +478,11 @@ class SdQueryBuildChip {
|
|
|
478
478
|
return false;
|
|
479
479
|
const t = b.field.type;
|
|
480
480
|
return t === 'string' || t === 'number';
|
|
481
|
-
});
|
|
482
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
483
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdQueryBuildChip, isStandalone: true, selector: "sd-query-build-chip", inputs: { building: { classPropertyName: "building", publicName: "building", isSignal: true, isRequired: true, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, allowedOperators: { classPropertyName: "allowedOperators", publicName: "allowedOperators", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, showOperator: { classPropertyName: "showOperator", publicName: "showOperator", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pickOperator: "pickOperator", commitValue: "commitValue", cancel: "cancel", seamlessCommit: "seamlessCommit", draftChange: "draftChange", draftCommit: "draftCommit" }, viewQueries: [{ propertyName: "opMenu", first: true, predicate: ["buildOperator"], descendants: true, isSignal: true }, { propertyName: "picker", first: true, predicate: ["bPicker"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n In-progress chip (inline-mode token build flow).\n Seamless string/number branch keeps its own pill; everything else renders inside\n the dashed .c-token.c-token-building shell.\n-->\n@let _b = building();\n\n@if (isSeamless()) {\n <sd-query-inline-value-chip\n [field]=\"_b.field\"\n [operator]=\"$any(_b.operator)\"\n [value]=\"_b.value ?? null\"\n [density]=\"density()\"\n [showOperator]=\"showOperator()\"\n [autoId]=\"autoId()\"\n [autofocus]=\"true\"\n (valueChange)=\"seamlessCommit.emit($event)\"\n (remove)=\"cancel.emit()\" />\n} @else {\n <div class=\"c-token c-token-building\">\n <span class=\"c-token-field\">{{ _b.field.label }}</span>\n\n @if (_b.step === 'operator') {\n <sd-operator\n #buildOperator\n class=\"c-token-op\"\n [operators]=\"allowedOperators()\"\n [model]=\"_b.operator\"\n (modelChange)=\"pickOperator.emit($any($event))\" />\n } @else {\n <!-- why: badge readonly cho operator \u0111\u00E3 ch\u1ECDn \u2014 v\u1EABn render <sd-operator>\n \u0111\u1EC3 gi\u1EEF th\u1ECB gi\u00E1c gi\u1ED1ng chip ho\u00E0n th\u00E0nh (icon + tooltip). -->\n <sd-operator\n class=\"c-token-op\"\n [operators]=\"[$any(_b.operator)]\"\n [model]=\"$any(_b.operator)\"\n [disabled]=\"true\" />\n\n @if (_b.field.type === 'values' || _b.field.type === 'lazy-values') {\n @let _bopt = $any(_b.field).option;\n <span class=\"c-token-value c-token-value-edit\">\n <sd-select #bPicker bare size=\"sm\" minWidthPanel=\"300px\"\n [autoId]=\"autoId()\"\n [items]=\"_b.field.type === 'lazy-values' ? $any(_bopt).search : $any(_bopt.items)\"\n [valueField]=\"_bopt.valueField\"\n [displayField]=\"_bopt.displayField\"\n [multiple]=\"multiple()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\">\n <!-- why: build chip multi-select c\u0169ng c\u1EA7n \"head +N\" \u0111\u1EC3 g\u1ECDn (gi\u1ED1ng completed chip). -->\n <ng-template #sdValue let-selectedItems=\"selectedItems\">\n @if ((selectedItems?.length ?? 0) > 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_bopt.displayField] }}</span> +{{ selectedItems.length - 1 }}\n } @else if ((selectedItems?.length ?? 0) === 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_bopt.displayField] }}</span>\n }\n </ng-template>\n </sd-select>\n </span>\n } @else if (_b.field.type === 'date') {\n <span class=\"c-token-value c-token-value-edit\">\n @if (_b.operator === 'BETWEEN') {\n <!-- why: 1 sd-date-range thay 2 sd-date \u2014 g\u1ECDn h\u01A1n, h\u00E0nh vi th\u1ED1ng nh\u1EA5t v\u1EDBi completed chip. -->\n <sd-date-range #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-date-range>\n } @else {\n <sd-date #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-date>\n }\n </span>\n } @else if (_b.field.type === 'datetime') {\n <span class=\"c-token-value c-token-value-edit\">\n @if (_b.operator === 'BETWEEN') {\n <!-- why: datetime BETWEEN downgrade v\u1EC1 date-range (m\u1EA5t time precision; \u0111\u00E3 th\u1ED1ng nh\u1EA5t). -->\n <sd-date-range #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-date-range>\n } @else {\n <sd-datetime #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-datetime>\n }\n </span>\n } @else if (_b.field.type === 'boolean') {\n <!-- why: native button thay sd-button (tr\u00E1nh mat-button baseline 36px g\u00E2y tr\u00E0n).\n Pill nh\u1ECF v\u1EBD b\u1EB1ng CSS scoped trong chip \u2014 gi\u1EEF semantic colour qua class\n .c-bool-true / .c-bool-false. -->\n <span class=\"c-token-value c-token-value-edit c-bool-toggle\">\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-true\"\n [class.c-bool-active]=\"_b.value === true\"\n [attr.data-autoId]=\"autoId() + '-true'\"\n (click)=\"commitValue.emit(true)\">\n {{ $any(_b.field).trueLabel || 'C\u00F3' }}\n </button>\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-false\"\n [class.c-bool-active]=\"_b.value === false\"\n [attr.data-autoId]=\"autoId() + '-false'\"\n (click)=\"commitValue.emit(false)\">\n {{ $any(_b.field).falseLabel || 'Kh\u00F4ng' }}\n </button>\n </span>\n } @else {\n <!-- Fallback (e.g. unforeseen type) \u2014 generic sd-input wired via draft outputs. -->\n <span class=\"c-token-value c-token-value-edit\">\n <sd-input size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"draftChange.emit($event)\"\n (keyupEnter)=\"draftCommit.emit()\"></sd-input>\n </span>\n }\n }\n\n <button type=\"button\" class=\"c-token-remove\" aria-label=\"Cancel\" (click)=\"cancel.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </button>\n </div>\n}\n", styles: [":host{display:contents}.c-token{display:inline-flex;align-items:center;gap:4px;padding:0 0 0 12px;border:1px solid var(--sd-primary-light);border-radius:999px;background:var(--sd-primary-light);font-size:13px;color:#5f6368;white-space:nowrap;overflow:hidden}:host-context(.c-density-compact) .c-token{height:28px}:host-context(.c-density-comfortable) .c-token{height:32px}.c-token-field{font-weight:500;line-height:1}.c-token-op{display:inline-flex;align-items:center;color:inherit}.c-token-op ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-token-op ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}.c-token-value{border:none;background:transparent;padding:0;font:inherit;font-weight:500;color:var(--sd-primary)}.c-token-value-edit{display:inline-flex;align-items:center;gap:4px;max-width:240px}.c-token-value-edit sd-input,.c-token-value-edit sd-input-number{display:inline-flex;max-width:140px}.c-token-value-edit sd-date-range{display:inline-flex;max-width:220px;min-width:0;flex:0 1 auto}.c-token-value-edit sd-select,.c-token-value-edit sd-date,.c-token-value-edit sd-datetime{display:inline-flex;align-items:center;line-height:1}.c-token ::ng-deep .mat-mdc-form-field{line-height:1}.c-token ::ng-deep .mat-mdc-text-field-wrapper,.c-token ::ng-deep .mat-mdc-form-field-flex{padding:0;min-height:0;background:transparent}.c-token ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}.c-token ::ng-deep .mat-mdc-select-value,.c-token ::ng-deep .mat-mdc-input-element,.c-token ::ng-deep input{line-height:1;font-size:13px;padding:0;height:auto;color:inherit}.c-token ::ng-deep .mat-mdc-select-value{display:inline-flex;align-items:center;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;color:var(--sd-primary);font-weight:500}.c-token ::ng-deep .sd-suffix-icon{display:none}.c-token-multi-head{display:inline-block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.c-token-building{border-style:dashed}.c-bool-toggle{display:inline-flex;align-items:center;gap:4px}.c-bool-btn{display:inline-flex;align-items:center;justify-content:center;height:18px;min-width:0;padding:0 8px;border:1px solid currentColor;border-radius:999px;background:transparent;font:inherit;font-size:11px;font-weight:500;line-height:1;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}:host-context(.c-density-comfortable) .c-bool-btn{height:20px;padding:0 10px;font-size:12px}.c-bool-true{color:var(--sd-success)}.c-bool-false{color:var(--sd-warning)}.c-bool-active.c-bool-true{background:var(--sd-success);color:#fff;border-color:var(--sd-success)}.c-bool-active.c-bool-false{background:var(--sd-warning);color:#fff;border-color:var(--sd-warning)}.c-bool-btn:hover:not(.c-bool-active).c-bool-true{background:var(--sd-success-light)}.c-bool-btn:hover:not(.c-bool-active).c-bool-false{background:var(--sd-warning-light)}.c-token-remove{align-self:stretch;display:inline-flex;align-items:center;justify-content:center;border:none;border-left:1px solid rgba(0,0,0,.04);border-radius:0;background:transparent;cursor:pointer;color:inherit}:host-context(.c-density-compact) .c-token-remove{width:26px}:host-context(.c-density-comfortable) .c-token-remove{width:28px}.c-token-remove mat-icon{font-size:14px;width:14px;height:14px}.c-token-remove:hover{background:#0000000d}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "bare", "viewed", "appearance", "floatLabel", "min", "max", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "bare", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdQueryInlineValueChip, selector: "sd-query-inline-value-chip", inputs: ["field", "operator", "value", "density", "showOperator", "autoId", "autofocus"], outputs: ["valueChange", "remove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
481
|
+
}, ...(ngDevMode ? [{ debugName: "isSeamless" }] : []));
|
|
482
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryBuildChip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
483
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: SdQueryBuildChip, isStandalone: true, selector: "sd-query-build-chip", inputs: { building: { classPropertyName: "building", publicName: "building", isSignal: true, isRequired: true, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, allowedOperators: { classPropertyName: "allowedOperators", publicName: "allowedOperators", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, showOperator: { classPropertyName: "showOperator", publicName: "showOperator", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pickOperator: "pickOperator", commitValue: "commitValue", cancel: "cancel", seamlessCommit: "seamlessCommit", draftChange: "draftChange", draftCommit: "draftCommit" }, viewQueries: [{ propertyName: "opMenu", first: true, predicate: ["buildOperator"], descendants: true, isSignal: true }, { propertyName: "picker", first: true, predicate: ["bPicker"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n In-progress chip (inline-mode token build flow).\n Seamless string/number branch keeps its own pill; everything else renders inside\n the dashed .c-token.c-token-building shell.\n-->\n@let _b = building();\n\n@if (isSeamless()) {\n <sd-query-inline-value-chip\n [field]=\"_b.field\"\n [operator]=\"$any(_b.operator)\"\n [value]=\"_b.value ?? null\"\n [density]=\"density()\"\n [showOperator]=\"showOperator()\"\n [autoId]=\"autoId()\"\n [autofocus]=\"true\"\n (valueChange)=\"seamlessCommit.emit($event)\"\n (remove)=\"cancel.emit()\" />\n} @else {\n <div class=\"c-token c-token-building\">\n <span class=\"c-token-field\">{{ _b.field.label }}</span>\n\n @if (_b.step === 'operator') {\n <sd-operator\n #buildOperator\n class=\"c-token-op\"\n [operators]=\"allowedOperators()\"\n [model]=\"_b.operator\"\n (modelChange)=\"pickOperator.emit($any($event))\" />\n } @else {\n <!-- why: badge readonly cho operator \u0111\u00E3 ch\u1ECDn \u2014 v\u1EABn render <sd-operator>\n \u0111\u1EC3 gi\u1EEF th\u1ECB gi\u00E1c gi\u1ED1ng chip ho\u00E0n th\u00E0nh (icon + tooltip). -->\n <sd-operator\n class=\"c-token-op\"\n [operators]=\"[$any(_b.operator)]\"\n [model]=\"$any(_b.operator)\"\n [disabled]=\"true\" />\n\n @if (_b.field.type === 'values' || _b.field.type === 'lazy-values') {\n @let _bopt = $any(_b.field).option;\n <span class=\"c-token-value c-token-value-edit\">\n <sd-select #bPicker bare size=\"sm\" minWidthPanel=\"300px\"\n [autoId]=\"autoId()\"\n [items]=\"_b.field.type === 'lazy-values' ? $any(_bopt).search : $any(_bopt.items)\"\n [valueField]=\"_bopt.valueField\"\n [displayField]=\"_bopt.displayField\"\n [multiple]=\"multiple()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\">\n <!-- why: build chip multi-select c\u0169ng c\u1EA7n \"head +N\" \u0111\u1EC3 g\u1ECDn (gi\u1ED1ng completed chip). -->\n <ng-template #sdValue let-selectedItems=\"selectedItems\">\n @if ((selectedItems?.length ?? 0) > 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_bopt.displayField] }}</span> +{{ selectedItems.length - 1 }}\n } @else if ((selectedItems?.length ?? 0) === 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_bopt.displayField] }}</span>\n }\n </ng-template>\n </sd-select>\n </span>\n } @else if (_b.field.type === 'date') {\n <span class=\"c-token-value c-token-value-edit\">\n @if (_b.operator === 'BETWEEN') {\n <!-- why: 1 sd-date-range thay 2 sd-date \u2014 g\u1ECDn h\u01A1n, h\u00E0nh vi th\u1ED1ng nh\u1EA5t v\u1EDBi completed chip. -->\n <sd-date-range #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-date-range>\n } @else {\n <sd-date #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-date>\n }\n </span>\n } @else if (_b.field.type === 'datetime') {\n <span class=\"c-token-value c-token-value-edit\">\n @if (_b.operator === 'BETWEEN') {\n <!-- why: datetime BETWEEN downgrade v\u1EC1 date-range (m\u1EA5t time precision; \u0111\u00E3 th\u1ED1ng nh\u1EA5t). -->\n <sd-date-range #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-date-range>\n } @else {\n <sd-datetime #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-datetime>\n }\n </span>\n } @else if (_b.field.type === 'boolean') {\n <!-- why: native button thay sd-button (tr\u00E1nh mat-button baseline 36px g\u00E2y tr\u00E0n).\n Pill nh\u1ECF v\u1EBD b\u1EB1ng CSS scoped trong chip \u2014 gi\u1EEF semantic colour qua class\n .c-bool-true / .c-bool-false. -->\n <span class=\"c-token-value c-token-value-edit c-bool-toggle\">\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-true\"\n [class.c-bool-active]=\"_b.value === true\"\n [attr.data-autoId]=\"autoId() + '-true'\"\n (click)=\"commitValue.emit(true)\">\n {{ $any(_b.field).trueLabel || 'C\u00F3' }}\n </button>\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-false\"\n [class.c-bool-active]=\"_b.value === false\"\n [attr.data-autoId]=\"autoId() + '-false'\"\n (click)=\"commitValue.emit(false)\">\n {{ $any(_b.field).falseLabel || 'Kh\u00F4ng' }}\n </button>\n </span>\n } @else {\n <!-- Fallback (e.g. unforeseen type) \u2014 generic sd-input wired via draft outputs. -->\n <span class=\"c-token-value c-token-value-edit\">\n <sd-input size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"draftChange.emit($event)\"\n (keyupEnter)=\"draftCommit.emit()\"></sd-input>\n </span>\n }\n }\n\n <button type=\"button\" class=\"c-token-remove\" aria-label=\"Cancel\" (click)=\"cancel.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </button>\n </div>\n}\n", styles: [":host{display:contents}.c-token{display:inline-flex;align-items:center;gap:4px;padding:0 0 0 12px;border:1px solid var(--sd-primary-light);border-radius:999px;background:var(--sd-primary-light);font-size:13px;color:#5f6368;white-space:nowrap;overflow:hidden}:host-context(.c-density-compact) .c-token{height:28px}:host-context(.c-density-comfortable) .c-token{height:32px}.c-token-field{font-weight:500;line-height:1}.c-token-op{display:inline-flex;align-items:center;color:inherit}.c-token-op ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-token-op ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}.c-token-value{border:none;background:transparent;padding:0;font:inherit;font-weight:500;color:var(--sd-primary)}.c-token-value-edit{display:inline-flex;align-items:center;gap:4px;max-width:240px}.c-token-value-edit sd-input,.c-token-value-edit sd-input-number{display:inline-flex;max-width:140px}.c-token-value-edit sd-date-range{display:inline-flex;max-width:220px;min-width:0;flex:0 1 auto}.c-token-value-edit sd-select,.c-token-value-edit sd-date,.c-token-value-edit sd-datetime{display:inline-flex;align-items:center;line-height:1}.c-token ::ng-deep .mat-mdc-form-field{line-height:1}.c-token ::ng-deep .mat-mdc-text-field-wrapper,.c-token ::ng-deep .mat-mdc-form-field-flex{padding:0;min-height:0;background:transparent}.c-token ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}.c-token ::ng-deep .mat-mdc-select-value,.c-token ::ng-deep .mat-mdc-input-element,.c-token ::ng-deep input{line-height:1;font-size:13px;padding:0;height:auto;color:inherit}.c-token ::ng-deep .mat-mdc-select-value{display:inline-flex;align-items:center;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;color:var(--sd-primary);font-weight:500}.c-token ::ng-deep .sd-suffix-icon{display:none}.c-token-multi-head{display:inline-block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.c-token-building{border-style:dashed}.c-bool-toggle{display:inline-flex;align-items:center;gap:4px}.c-bool-btn{display:inline-flex;align-items:center;justify-content:center;height:18px;min-width:0;padding:0 8px;border:1px solid currentColor;border-radius:999px;background:transparent;font:inherit;font-size:11px;font-weight:500;line-height:1;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}:host-context(.c-density-comfortable) .c-bool-btn{height:20px;padding:0 10px;font-size:12px}.c-bool-true{color:var(--sd-success)}.c-bool-false{color:var(--sd-warning)}.c-bool-active.c-bool-true{background:var(--sd-success);color:#fff;border-color:var(--sd-success)}.c-bool-active.c-bool-false{background:var(--sd-warning);color:#fff;border-color:var(--sd-warning)}.c-bool-btn:hover:not(.c-bool-active).c-bool-true{background:var(--sd-success-light)}.c-bool-btn:hover:not(.c-bool-active).c-bool-false{background:var(--sd-warning-light)}.c-token-remove{align-self:stretch;display:inline-flex;align-items:center;justify-content:center;border:none;border-left:1px solid rgba(0,0,0,.04);border-radius:0;background:transparent;cursor:pointer;color:inherit}:host-context(.c-density-compact) .c-token-remove{width:26px}:host-context(.c-density-comfortable) .c-token-remove{width:28px}.c-token-remove mat-icon{font-size:14px;width:14px;height:14px}.c-token-remove:hover{background:#0000000d}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "bare", "viewed", "appearance", "floatLabel", "min", "max", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "bare", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdQueryInlineValueChip, selector: "sd-query-inline-value-chip", inputs: ["field", "operator", "value", "density", "showOperator", "autoId", "autofocus"], outputs: ["valueChange", "remove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
484
484
|
}
|
|
485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryBuildChip, decorators: [{
|
|
486
486
|
type: Component,
|
|
487
487
|
args: [{ selector: 'sd-query-build-chip', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
488
488
|
CommonModule,
|
|
@@ -496,7 +496,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
496
496
|
SdSelect,
|
|
497
497
|
SdQueryInlineValueChip,
|
|
498
498
|
], template: "<!--\n In-progress chip (inline-mode token build flow).\n Seamless string/number branch keeps its own pill; everything else renders inside\n the dashed .c-token.c-token-building shell.\n-->\n@let _b = building();\n\n@if (isSeamless()) {\n <sd-query-inline-value-chip\n [field]=\"_b.field\"\n [operator]=\"$any(_b.operator)\"\n [value]=\"_b.value ?? null\"\n [density]=\"density()\"\n [showOperator]=\"showOperator()\"\n [autoId]=\"autoId()\"\n [autofocus]=\"true\"\n (valueChange)=\"seamlessCommit.emit($event)\"\n (remove)=\"cancel.emit()\" />\n} @else {\n <div class=\"c-token c-token-building\">\n <span class=\"c-token-field\">{{ _b.field.label }}</span>\n\n @if (_b.step === 'operator') {\n <sd-operator\n #buildOperator\n class=\"c-token-op\"\n [operators]=\"allowedOperators()\"\n [model]=\"_b.operator\"\n (modelChange)=\"pickOperator.emit($any($event))\" />\n } @else {\n <!-- why: badge readonly cho operator \u0111\u00E3 ch\u1ECDn \u2014 v\u1EABn render <sd-operator>\n \u0111\u1EC3 gi\u1EEF th\u1ECB gi\u00E1c gi\u1ED1ng chip ho\u00E0n th\u00E0nh (icon + tooltip). -->\n <sd-operator\n class=\"c-token-op\"\n [operators]=\"[$any(_b.operator)]\"\n [model]=\"$any(_b.operator)\"\n [disabled]=\"true\" />\n\n @if (_b.field.type === 'values' || _b.field.type === 'lazy-values') {\n @let _bopt = $any(_b.field).option;\n <span class=\"c-token-value c-token-value-edit\">\n <sd-select #bPicker bare size=\"sm\" minWidthPanel=\"300px\"\n [autoId]=\"autoId()\"\n [items]=\"_b.field.type === 'lazy-values' ? $any(_bopt).search : $any(_bopt.items)\"\n [valueField]=\"_bopt.valueField\"\n [displayField]=\"_bopt.displayField\"\n [multiple]=\"multiple()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\">\n <!-- why: build chip multi-select c\u0169ng c\u1EA7n \"head +N\" \u0111\u1EC3 g\u1ECDn (gi\u1ED1ng completed chip). -->\n <ng-template #sdValue let-selectedItems=\"selectedItems\">\n @if ((selectedItems?.length ?? 0) > 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_bopt.displayField] }}</span> +{{ selectedItems.length - 1 }}\n } @else if ((selectedItems?.length ?? 0) === 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_bopt.displayField] }}</span>\n }\n </ng-template>\n </sd-select>\n </span>\n } @else if (_b.field.type === 'date') {\n <span class=\"c-token-value c-token-value-edit\">\n @if (_b.operator === 'BETWEEN') {\n <!-- why: 1 sd-date-range thay 2 sd-date \u2014 g\u1ECDn h\u01A1n, h\u00E0nh vi th\u1ED1ng nh\u1EA5t v\u1EDBi completed chip. -->\n <sd-date-range #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-date-range>\n } @else {\n <sd-date #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-date>\n }\n </span>\n } @else if (_b.field.type === 'datetime') {\n <span class=\"c-token-value c-token-value-edit\">\n @if (_b.operator === 'BETWEEN') {\n <!-- why: datetime BETWEEN downgrade v\u1EC1 date-range (m\u1EA5t time precision; \u0111\u00E3 th\u1ED1ng nh\u1EA5t). -->\n <sd-date-range #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-date-range>\n } @else {\n <sd-datetime #bPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"commitValue.emit($event)\"></sd-datetime>\n }\n </span>\n } @else if (_b.field.type === 'boolean') {\n <!-- why: native button thay sd-button (tr\u00E1nh mat-button baseline 36px g\u00E2y tr\u00E0n).\n Pill nh\u1ECF v\u1EBD b\u1EB1ng CSS scoped trong chip \u2014 gi\u1EEF semantic colour qua class\n .c-bool-true / .c-bool-false. -->\n <span class=\"c-token-value c-token-value-edit c-bool-toggle\">\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-true\"\n [class.c-bool-active]=\"_b.value === true\"\n [attr.data-autoId]=\"autoId() + '-true'\"\n (click)=\"commitValue.emit(true)\">\n {{ $any(_b.field).trueLabel || 'C\u00F3' }}\n </button>\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-false\"\n [class.c-bool-active]=\"_b.value === false\"\n [attr.data-autoId]=\"autoId() + '-false'\"\n (click)=\"commitValue.emit(false)\">\n {{ $any(_b.field).falseLabel || 'Kh\u00F4ng' }}\n </button>\n </span>\n } @else {\n <!-- Fallback (e.g. unforeseen type) \u2014 generic sd-input wired via draft outputs. -->\n <span class=\"c-token-value c-token-value-edit\">\n <sd-input size=\"sm\"\n [autoId]=\"autoId()\"\n [model]=\"$any(_b.value)\"\n (sdChange)=\"draftChange.emit($event)\"\n (keyupEnter)=\"draftCommit.emit()\"></sd-input>\n </span>\n }\n }\n\n <button type=\"button\" class=\"c-token-remove\" aria-label=\"Cancel\" (click)=\"cancel.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </button>\n </div>\n}\n", styles: [":host{display:contents}.c-token{display:inline-flex;align-items:center;gap:4px;padding:0 0 0 12px;border:1px solid var(--sd-primary-light);border-radius:999px;background:var(--sd-primary-light);font-size:13px;color:#5f6368;white-space:nowrap;overflow:hidden}:host-context(.c-density-compact) .c-token{height:28px}:host-context(.c-density-comfortable) .c-token{height:32px}.c-token-field{font-weight:500;line-height:1}.c-token-op{display:inline-flex;align-items:center;color:inherit}.c-token-op ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-token-op ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}.c-token-value{border:none;background:transparent;padding:0;font:inherit;font-weight:500;color:var(--sd-primary)}.c-token-value-edit{display:inline-flex;align-items:center;gap:4px;max-width:240px}.c-token-value-edit sd-input,.c-token-value-edit sd-input-number{display:inline-flex;max-width:140px}.c-token-value-edit sd-date-range{display:inline-flex;max-width:220px;min-width:0;flex:0 1 auto}.c-token-value-edit sd-select,.c-token-value-edit sd-date,.c-token-value-edit sd-datetime{display:inline-flex;align-items:center;line-height:1}.c-token ::ng-deep .mat-mdc-form-field{line-height:1}.c-token ::ng-deep .mat-mdc-text-field-wrapper,.c-token ::ng-deep .mat-mdc-form-field-flex{padding:0;min-height:0;background:transparent}.c-token ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}.c-token ::ng-deep .mat-mdc-select-value,.c-token ::ng-deep .mat-mdc-input-element,.c-token ::ng-deep input{line-height:1;font-size:13px;padding:0;height:auto;color:inherit}.c-token ::ng-deep .mat-mdc-select-value{display:inline-flex;align-items:center;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;color:var(--sd-primary);font-weight:500}.c-token ::ng-deep .sd-suffix-icon{display:none}.c-token-multi-head{display:inline-block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.c-token-building{border-style:dashed}.c-bool-toggle{display:inline-flex;align-items:center;gap:4px}.c-bool-btn{display:inline-flex;align-items:center;justify-content:center;height:18px;min-width:0;padding:0 8px;border:1px solid currentColor;border-radius:999px;background:transparent;font:inherit;font-size:11px;font-weight:500;line-height:1;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}:host-context(.c-density-comfortable) .c-bool-btn{height:20px;padding:0 10px;font-size:12px}.c-bool-true{color:var(--sd-success)}.c-bool-false{color:var(--sd-warning)}.c-bool-active.c-bool-true{background:var(--sd-success);color:#fff;border-color:var(--sd-success)}.c-bool-active.c-bool-false{background:var(--sd-warning);color:#fff;border-color:var(--sd-warning)}.c-bool-btn:hover:not(.c-bool-active).c-bool-true{background:var(--sd-success-light)}.c-bool-btn:hover:not(.c-bool-active).c-bool-false{background:var(--sd-warning-light)}.c-token-remove{align-self:stretch;display:inline-flex;align-items:center;justify-content:center;border:none;border-left:1px solid rgba(0,0,0,.04);border-radius:0;background:transparent;cursor:pointer;color:inherit}:host-context(.c-density-compact) .c-token-remove{width:26px}:host-context(.c-density-comfortable) .c-token-remove{width:28px}.c-token-remove mat-icon{font-size:14px;width:14px;height:14px}.c-token-remove:hover{background:#0000000d}\n"] }]
|
|
499
|
-
}] });
|
|
499
|
+
}], propDecorators: { building: [{ type: i0.Input, args: [{ isSignal: true, alias: "building", required: true }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], allowedOperators: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowedOperators", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], showOperator: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOperator", required: false }] }], autoId: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], pickOperator: [{ type: i0.Output, args: ["pickOperator"] }], commitValue: [{ type: i0.Output, args: ["commitValue"] }], cancel: [{ type: i0.Output, args: ["cancel"] }], seamlessCommit: [{ type: i0.Output, args: ["seamlessCommit"] }], draftChange: [{ type: i0.Output, args: ["draftChange"] }], draftCommit: [{ type: i0.Output, args: ["draftCommit"] }], opMenu: [{ type: i0.ViewChild, args: ['buildOperator', { isSignal: true }] }], picker: [{ type: i0.ViewChild, args: ['bPicker', { isSignal: true }] }] } });
|
|
500
500
|
|
|
501
501
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
502
502
|
/**
|
|
@@ -518,15 +518,15 @@ class SdQueryChipPopover {
|
|
|
518
518
|
// Inputs
|
|
519
519
|
// ---------------------------------------------------------------------------
|
|
520
520
|
/** Resolved field of the currently editing chip — parent passes from `fieldByKey()`. */
|
|
521
|
-
field = input(undefined);
|
|
521
|
+
field = input(undefined, ...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
522
522
|
/** The chip's current Filter — used by `seed()` for initial staging values. */
|
|
523
|
-
filter = input(undefined);
|
|
523
|
+
filter = input(undefined, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
524
524
|
/** Optional chip index — embedded in the composed autoIds. */
|
|
525
|
-
chipIndex = input(null);
|
|
525
|
+
chipIndex = input(null, ...(ngDevMode ? [{ debugName: "chipIndex" }] : []));
|
|
526
526
|
/** Prefix for `data-autoId` on inner controls. */
|
|
527
|
-
autoIdBase = input('qb');
|
|
527
|
+
autoIdBase = input('qb', ...(ngDevMode ? [{ debugName: "autoIdBase" }] : []));
|
|
528
528
|
/** MatMenu for the field switcher — parent passes its `<sd-query-field-picker>` menu. */
|
|
529
|
-
switchPickerMenu = input(undefined);
|
|
529
|
+
switchPickerMenu = input(undefined, ...(ngDevMode ? [{ debugName: "switchPickerMenu" }] : []));
|
|
530
530
|
// ---------------------------------------------------------------------------
|
|
531
531
|
// Outputs
|
|
532
532
|
// ---------------------------------------------------------------------------
|
|
@@ -538,24 +538,24 @@ class SdQueryChipPopover {
|
|
|
538
538
|
// Staging signals — uncommitted edits, committed on menu close.
|
|
539
539
|
// ---------------------------------------------------------------------------
|
|
540
540
|
/** Staged operator. */
|
|
541
|
-
editingOperator = signal('EQUAL');
|
|
541
|
+
editingOperator = signal('EQUAL', ...(ngDevMode ? [{ debugName: "editingOperator" }] : []));
|
|
542
542
|
/** Staged value (shape depends on field type + operator). */
|
|
543
|
-
editingValue = signal(null);
|
|
543
|
+
editingValue = signal(null, ...(ngDevMode ? [{ debugName: "editingValue" }] : []));
|
|
544
544
|
/** Resolved option list for values / lazy-values. */
|
|
545
|
-
editingOptions = signal([]);
|
|
545
|
+
editingOptions = signal([], ...(ngDevMode ? [{ debugName: "editingOptions" }] : []));
|
|
546
546
|
/** Loading flag for async option fetch. */
|
|
547
|
-
editingOptionsLoading = signal(false);
|
|
547
|
+
editingOptionsLoading = signal(false, ...(ngDevMode ? [{ debugName: "editingOptionsLoading" }] : []));
|
|
548
548
|
// ---------------------------------------------------------------------------
|
|
549
549
|
// Derived state
|
|
550
550
|
// ---------------------------------------------------------------------------
|
|
551
551
|
allowedOperators = computed(() => {
|
|
552
552
|
const f = this.field();
|
|
553
553
|
return f ? sdQueryAllowedOperators(f) : [];
|
|
554
|
-
});
|
|
554
|
+
}, ...(ngDevMode ? [{ debugName: "allowedOperators" }] : []));
|
|
555
555
|
showOperatorSelector = computed(() => {
|
|
556
556
|
const f = this.field();
|
|
557
557
|
return f ? sdQueryShowOperatorSelector(f) : false;
|
|
558
|
-
});
|
|
558
|
+
}, ...(ngDevMode ? [{ debugName: "showOperatorSelector" }] : []));
|
|
559
559
|
/** Whether the staged operator is multi-select (IN/NOT_IN). */
|
|
560
560
|
multiple(op) {
|
|
561
561
|
return SD_QUERY_MULTI_OPERATORS.includes(op ?? this.editingOperator());
|
|
@@ -574,7 +574,7 @@ class SdQueryChipPopover {
|
|
|
574
574
|
// ---------------------------------------------------------------------------
|
|
575
575
|
// mat-menu instance — parent reads via `cp.menu()`
|
|
576
576
|
// ---------------------------------------------------------------------------
|
|
577
|
-
menu = viewChild('menu');
|
|
577
|
+
menu = viewChild('menu', ...(ngDevMode ? [{ debugName: "menu" }] : []));
|
|
578
578
|
// ---------------------------------------------------------------------------
|
|
579
579
|
// Seed — parent calls before opening the popover so staging signals are
|
|
580
580
|
// primed from the current filter + the option list is loaded.
|
|
@@ -718,10 +718,10 @@ class SdQueryChipPopover {
|
|
|
718
718
|
.finally(() => this.editingOptionsLoading.set(false));
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
722
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdQueryChipPopover, isStandalone: true, selector: "sd-query-chip-popover", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, chipIndex: { classPropertyName: "chipIndex", publicName: "chipIndex", isSignal: true, isRequired: false, transformFunction: null }, autoIdBase: { classPropertyName: "autoIdBase", publicName: "autoIdBase", isSignal: true, isRequired: false, transformFunction: null }, switchPickerMenu: { classPropertyName: "switchPickerMenu", publicName: "switchPickerMenu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { commit: "commit", swapField: "swapField" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n Chip popover \u2014 operator + value editor for the popover-mode chip.\n Visual layout mirrors the previous inline `<mat-menu #chipPopover>` in query-bar.\n Body branches on operator + field.type \u2014 8 paths preserved exactly.\n-->\n<mat-menu #menu=\"matMenu\" class=\"c-chip-popover\" xPosition=\"after\" yPosition=\"below\" (closed)=\"onMenuClosed()\">\n <ng-template matMenuContent>\n @let _field = field();\n @let _op = editingOperator();\n @let _val = editingValue();\n @let _options = editingOptions();\n @let _loading = editingOptionsLoading();\n @let _switchMenu = switchPickerMenu();\n\n @if (_field) {\n <div class=\"c-pop-header\" (click)=\"$event.stopPropagation()\">\n <mat-icon fontSet=\"material-icons-outlined\">{{ iconFor(_field) }}</mat-icon>\n <!-- why: nested mat-menu trigger to swap the chip's field \u2014 parent provides\n the field-picker MatMenu via [switchPickerMenu]. -->\n @if (_switchMenu) {\n <button\n type=\"button\"\n class=\"c-pop-header-field\"\n [matMenuTriggerFor]=\"_switchMenu\"\n matTooltip=\"\u0110\u1ED5i field\">\n <span>{{ _field.label }}</span>\n <mat-icon fontSet=\"material-icons-outlined\">unfold_more</mat-icon>\n </button>\n } @else {\n <span class=\"c-pop-header-field\">{{ _field.label }}</span>\n }\n <!-- Operator selector (right-aligned). Disabled when field has \u22641 operator. -->\n <sd-operator\n class=\"c-pop-header-operator\"\n [autoId]=\"chipAutoId('operator')\"\n [operators]=\"allowedOperators()\"\n [model]=\"_op\"\n [disabled]=\"!showOperatorSelector()\"\n (modelChange)=\"onEditingOperatorChange($any($event))\" />\n </div>\n\n <div class=\"c-pop-body\" (click)=\"$event.stopPropagation()\">\n @if (!isNoDataOperator(_op)) {\n @if (_op === 'BETWEEN') {\n @if (_field.type === 'date') {\n <div class=\"c-pop-between\">\n <sd-date size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-from')\"\n placeholder=\"T\u1EEB\"\n [model]=\"$any(_val)?.from\"\n (sdChange)=\"onEditingRangeFrom($event)\">\n </sd-date>\n <sd-date size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-to')\"\n placeholder=\"\u0110\u1EBFn\"\n [model]=\"$any(_val)?.to\"\n (sdChange)=\"onEditingRangeTo($event)\">\n </sd-date>\n </div>\n } @else if (_field.type === 'datetime') {\n <div class=\"c-pop-between\">\n <sd-datetime size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-from')\"\n placeholder=\"T\u1EEB\"\n [model]=\"$any(_val)?.from\"\n (sdChange)=\"onEditingRangeFrom($event)\">\n </sd-datetime>\n <sd-datetime size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-to')\"\n placeholder=\"\u0110\u1EBFn\"\n [model]=\"$any(_val)?.to\"\n (sdChange)=\"onEditingRangeTo($event)\">\n </sd-datetime>\n </div>\n } @else {\n <div class=\"c-pop-between\">\n <sd-input-number size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-from')\"\n placeholder=\"T\u1EEB\"\n [model]=\"$any(_val)?.from\"\n (sdChange)=\"onEditingRangeFrom($event)\">\n </sd-input-number>\n <sd-input-number size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-to')\"\n placeholder=\"\u0110\u1EBFn\"\n [model]=\"$any(_val)?.to\"\n (sdChange)=\"onEditingRangeTo($event)\">\n </sd-input-number>\n </div>\n }\n } @else if (_field.type === 'boolean') {\n <div class=\"c-pop-boolean c-bool-toggle\">\n <sd-button\n [autoId]=\"chipAutoId('value-true')\"\n [type]=\"_val === true ? 'fill' : 'outline'\"\n color=\"success\"\n [title]=\"$any(_field).trueLabel || 'C\u00F3'\"\n (click)=\"onEditingValueInput(true)\">\n </sd-button>\n <sd-button\n [autoId]=\"chipAutoId('value-false')\"\n [type]=\"_val === false ? 'fill' : 'outline'\"\n color=\"warning\"\n [title]=\"$any(_field).falseLabel || 'Kh\u00F4ng'\"\n (click)=\"onEditingValueInput(false)\">\n </sd-button>\n </div>\n } @else if (_field.type === 'values' || _field.type === 'lazy-values') {\n @let _opt = $any(_field).option;\n <sd-select size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Ch\u1ECDn gi\u00E1 tr\u1ECB\"\n [items]=\"_options\"\n [valueField]=\"_opt.valueField\"\n [displayField]=\"_opt.displayField\"\n [multiple]=\"multiple()\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-select>\n @if (_loading) {\n <div class=\"c-pop-values-loading\">\u0110ang t\u1EA3i...</div>\n }\n } @else if (_field.type === 'date') {\n <sd-date size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Ch\u1ECDn gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-date>\n } @else if (_field.type === 'datetime') {\n <sd-datetime size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Ch\u1ECDn gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-datetime>\n } @else if (_field.type === 'number') {\n <sd-input-number size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Nh\u1EADp gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-input-number>\n } @else {\n <sd-input size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Nh\u1EADp gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-input>\n }\n }\n </div>\n }\n </ng-template>\n</mat-menu>\n", styles: [":host{display:contents}::ng-deep .mat-mdc-menu-panel.c-chip-popover{min-width:280px;max-width:320px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #e2e4e7;font-size:13px;font-weight:500;color:#212121}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header mat-icon{font-size:16px;width:16px;height:16px;color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header .c-pop-header-operator{margin-left:auto}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field{display:inline-flex;align-items:center;gap:4px;padding:2px 4px 2px 6px;margin-left:-4px;background:transparent;border:1px solid transparent;border-radius:4px;font:inherit;font-weight:500;color:#212121;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field mat-icon{font-size:14px!important;width:14px!important;height:14px!important;color:#7a7a7a!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field:hover{background:#f5f6f7;border-color:#e2e4e7}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-body{padding:10px 12px;display:flex;flex-direction:column;gap:12px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-between{display:grid;grid-template-columns:1fr 1fr;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean{display:flex;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean button{flex:1;height:32px;border:1px solid #d6d8db;border-radius:6px;background:#fff;font:inherit;font-size:13px;cursor:pointer}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values-loading{padding:10px 8px;font-size:12px;color:#7a7a7a}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle{display:inline-flex;align-items:center;gap:4px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle .mdc-button,::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle button[mat-button],::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle button[mat-stroked-button],::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle button[mat-flat-button]{border-radius:999px;min-width:0;padding:0 12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "bare", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
721
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryChipPopover, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
722
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: SdQueryChipPopover, isStandalone: true, selector: "sd-query-chip-popover", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, chipIndex: { classPropertyName: "chipIndex", publicName: "chipIndex", isSignal: true, isRequired: false, transformFunction: null }, autoIdBase: { classPropertyName: "autoIdBase", publicName: "autoIdBase", isSignal: true, isRequired: false, transformFunction: null }, switchPickerMenu: { classPropertyName: "switchPickerMenu", publicName: "switchPickerMenu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { commit: "commit", swapField: "swapField" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n Chip popover \u2014 operator + value editor for the popover-mode chip.\n Visual layout mirrors the previous inline `<mat-menu #chipPopover>` in query-bar.\n Body branches on operator + field.type \u2014 8 paths preserved exactly.\n-->\n<mat-menu #menu=\"matMenu\" class=\"c-chip-popover\" xPosition=\"after\" yPosition=\"below\" (closed)=\"onMenuClosed()\">\n <ng-template matMenuContent>\n @let _field = field();\n @let _op = editingOperator();\n @let _val = editingValue();\n @let _options = editingOptions();\n @let _loading = editingOptionsLoading();\n @let _switchMenu = switchPickerMenu();\n\n @if (_field) {\n <div class=\"c-pop-header\" (click)=\"$event.stopPropagation()\">\n <mat-icon fontSet=\"material-icons-outlined\">{{ iconFor(_field) }}</mat-icon>\n <!-- why: nested mat-menu trigger to swap the chip's field \u2014 parent provides\n the field-picker MatMenu via [switchPickerMenu]. -->\n @if (_switchMenu) {\n <button\n type=\"button\"\n class=\"c-pop-header-field\"\n [matMenuTriggerFor]=\"_switchMenu\"\n matTooltip=\"\u0110\u1ED5i field\">\n <span>{{ _field.label }}</span>\n <mat-icon fontSet=\"material-icons-outlined\">unfold_more</mat-icon>\n </button>\n } @else {\n <span class=\"c-pop-header-field\">{{ _field.label }}</span>\n }\n <!-- Operator selector (right-aligned). Disabled when field has \u22641 operator. -->\n <sd-operator\n class=\"c-pop-header-operator\"\n [autoId]=\"chipAutoId('operator')\"\n [operators]=\"allowedOperators()\"\n [model]=\"_op\"\n [disabled]=\"!showOperatorSelector()\"\n (modelChange)=\"onEditingOperatorChange($any($event))\" />\n </div>\n\n <div class=\"c-pop-body\" (click)=\"$event.stopPropagation()\">\n @if (!isNoDataOperator(_op)) {\n @if (_op === 'BETWEEN') {\n @if (_field.type === 'date') {\n <div class=\"c-pop-between\">\n <sd-date size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-from')\"\n placeholder=\"T\u1EEB\"\n [model]=\"$any(_val)?.from\"\n (sdChange)=\"onEditingRangeFrom($event)\">\n </sd-date>\n <sd-date size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-to')\"\n placeholder=\"\u0110\u1EBFn\"\n [model]=\"$any(_val)?.to\"\n (sdChange)=\"onEditingRangeTo($event)\">\n </sd-date>\n </div>\n } @else if (_field.type === 'datetime') {\n <div class=\"c-pop-between\">\n <sd-datetime size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-from')\"\n placeholder=\"T\u1EEB\"\n [model]=\"$any(_val)?.from\"\n (sdChange)=\"onEditingRangeFrom($event)\">\n </sd-datetime>\n <sd-datetime size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-to')\"\n placeholder=\"\u0110\u1EBFn\"\n [model]=\"$any(_val)?.to\"\n (sdChange)=\"onEditingRangeTo($event)\">\n </sd-datetime>\n </div>\n } @else {\n <div class=\"c-pop-between\">\n <sd-input-number size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-from')\"\n placeholder=\"T\u1EEB\"\n [model]=\"$any(_val)?.from\"\n (sdChange)=\"onEditingRangeFrom($event)\">\n </sd-input-number>\n <sd-input-number size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-to')\"\n placeholder=\"\u0110\u1EBFn\"\n [model]=\"$any(_val)?.to\"\n (sdChange)=\"onEditingRangeTo($event)\">\n </sd-input-number>\n </div>\n }\n } @else if (_field.type === 'boolean') {\n <div class=\"c-pop-boolean c-bool-toggle\">\n <sd-button\n [autoId]=\"chipAutoId('value-true')\"\n [type]=\"_val === true ? 'fill' : 'outline'\"\n color=\"success\"\n [title]=\"$any(_field).trueLabel || 'C\u00F3'\"\n (click)=\"onEditingValueInput(true)\">\n </sd-button>\n <sd-button\n [autoId]=\"chipAutoId('value-false')\"\n [type]=\"_val === false ? 'fill' : 'outline'\"\n color=\"warning\"\n [title]=\"$any(_field).falseLabel || 'Kh\u00F4ng'\"\n (click)=\"onEditingValueInput(false)\">\n </sd-button>\n </div>\n } @else if (_field.type === 'values' || _field.type === 'lazy-values') {\n @let _opt = $any(_field).option;\n <sd-select size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Ch\u1ECDn gi\u00E1 tr\u1ECB\"\n [items]=\"_options\"\n [valueField]=\"_opt.valueField\"\n [displayField]=\"_opt.displayField\"\n [multiple]=\"multiple()\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-select>\n @if (_loading) {\n <div class=\"c-pop-values-loading\">\u0110ang t\u1EA3i...</div>\n }\n } @else if (_field.type === 'date') {\n <sd-date size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Ch\u1ECDn gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-date>\n } @else if (_field.type === 'datetime') {\n <sd-datetime size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Ch\u1ECDn gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-datetime>\n } @else if (_field.type === 'number') {\n <sd-input-number size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Nh\u1EADp gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-input-number>\n } @else {\n <sd-input size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Nh\u1EADp gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-input>\n }\n }\n </div>\n }\n </ng-template>\n</mat-menu>\n", styles: [":host{display:contents}::ng-deep .mat-mdc-menu-panel.c-chip-popover{min-width:280px;max-width:320px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #e2e4e7;font-size:13px;font-weight:500;color:#212121}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header mat-icon{font-size:16px;width:16px;height:16px;color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header .c-pop-header-operator{margin-left:auto}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field{display:inline-flex;align-items:center;gap:4px;padding:2px 4px 2px 6px;margin-left:-4px;background:transparent;border:1px solid transparent;border-radius:4px;font:inherit;font-weight:500;color:#212121;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field mat-icon{font-size:14px!important;width:14px!important;height:14px!important;color:#7a7a7a!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field:hover{background:#f5f6f7;border-color:#e2e4e7}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-body{padding:10px 12px;display:flex;flex-direction:column;gap:12px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-between{display:grid;grid-template-columns:1fr 1fr;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean{display:flex;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean button{flex:1;height:32px;border:1px solid #d6d8db;border-radius:6px;background:#fff;font:inherit;font-size:13px;cursor:pointer}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values-loading{padding:10px 8px;font-size:12px;color:#7a7a7a}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle{display:inline-flex;align-items:center;gap:4px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle .mdc-button,::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle button[mat-button],::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle button[mat-stroked-button],::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle button[mat-flat-button]{border-radius:999px;min-width:0;padding:0 12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "bare", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
723
723
|
}
|
|
724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryChipPopover, decorators: [{
|
|
725
725
|
type: Component,
|
|
726
726
|
args: [{ selector: 'sd-query-chip-popover', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
727
727
|
CommonModule,
|
|
@@ -737,7 +737,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
737
737
|
SdDate,
|
|
738
738
|
SdDatetime,
|
|
739
739
|
], template: "<!--\n Chip popover \u2014 operator + value editor for the popover-mode chip.\n Visual layout mirrors the previous inline `<mat-menu #chipPopover>` in query-bar.\n Body branches on operator + field.type \u2014 8 paths preserved exactly.\n-->\n<mat-menu #menu=\"matMenu\" class=\"c-chip-popover\" xPosition=\"after\" yPosition=\"below\" (closed)=\"onMenuClosed()\">\n <ng-template matMenuContent>\n @let _field = field();\n @let _op = editingOperator();\n @let _val = editingValue();\n @let _options = editingOptions();\n @let _loading = editingOptionsLoading();\n @let _switchMenu = switchPickerMenu();\n\n @if (_field) {\n <div class=\"c-pop-header\" (click)=\"$event.stopPropagation()\">\n <mat-icon fontSet=\"material-icons-outlined\">{{ iconFor(_field) }}</mat-icon>\n <!-- why: nested mat-menu trigger to swap the chip's field \u2014 parent provides\n the field-picker MatMenu via [switchPickerMenu]. -->\n @if (_switchMenu) {\n <button\n type=\"button\"\n class=\"c-pop-header-field\"\n [matMenuTriggerFor]=\"_switchMenu\"\n matTooltip=\"\u0110\u1ED5i field\">\n <span>{{ _field.label }}</span>\n <mat-icon fontSet=\"material-icons-outlined\">unfold_more</mat-icon>\n </button>\n } @else {\n <span class=\"c-pop-header-field\">{{ _field.label }}</span>\n }\n <!-- Operator selector (right-aligned). Disabled when field has \u22641 operator. -->\n <sd-operator\n class=\"c-pop-header-operator\"\n [autoId]=\"chipAutoId('operator')\"\n [operators]=\"allowedOperators()\"\n [model]=\"_op\"\n [disabled]=\"!showOperatorSelector()\"\n (modelChange)=\"onEditingOperatorChange($any($event))\" />\n </div>\n\n <div class=\"c-pop-body\" (click)=\"$event.stopPropagation()\">\n @if (!isNoDataOperator(_op)) {\n @if (_op === 'BETWEEN') {\n @if (_field.type === 'date') {\n <div class=\"c-pop-between\">\n <sd-date size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-from')\"\n placeholder=\"T\u1EEB\"\n [model]=\"$any(_val)?.from\"\n (sdChange)=\"onEditingRangeFrom($event)\">\n </sd-date>\n <sd-date size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-to')\"\n placeholder=\"\u0110\u1EBFn\"\n [model]=\"$any(_val)?.to\"\n (sdChange)=\"onEditingRangeTo($event)\">\n </sd-date>\n </div>\n } @else if (_field.type === 'datetime') {\n <div class=\"c-pop-between\">\n <sd-datetime size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-from')\"\n placeholder=\"T\u1EEB\"\n [model]=\"$any(_val)?.from\"\n (sdChange)=\"onEditingRangeFrom($event)\">\n </sd-datetime>\n <sd-datetime size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-to')\"\n placeholder=\"\u0110\u1EBFn\"\n [model]=\"$any(_val)?.to\"\n (sdChange)=\"onEditingRangeTo($event)\">\n </sd-datetime>\n </div>\n } @else {\n <div class=\"c-pop-between\">\n <sd-input-number size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-from')\"\n placeholder=\"T\u1EEB\"\n [model]=\"$any(_val)?.from\"\n (sdChange)=\"onEditingRangeFrom($event)\">\n </sd-input-number>\n <sd-input-number size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value-to')\"\n placeholder=\"\u0110\u1EBFn\"\n [model]=\"$any(_val)?.to\"\n (sdChange)=\"onEditingRangeTo($event)\">\n </sd-input-number>\n </div>\n }\n } @else if (_field.type === 'boolean') {\n <div class=\"c-pop-boolean c-bool-toggle\">\n <sd-button\n [autoId]=\"chipAutoId('value-true')\"\n [type]=\"_val === true ? 'fill' : 'outline'\"\n color=\"success\"\n [title]=\"$any(_field).trueLabel || 'C\u00F3'\"\n (click)=\"onEditingValueInput(true)\">\n </sd-button>\n <sd-button\n [autoId]=\"chipAutoId('value-false')\"\n [type]=\"_val === false ? 'fill' : 'outline'\"\n color=\"warning\"\n [title]=\"$any(_field).falseLabel || 'Kh\u00F4ng'\"\n (click)=\"onEditingValueInput(false)\">\n </sd-button>\n </div>\n } @else if (_field.type === 'values' || _field.type === 'lazy-values') {\n @let _opt = $any(_field).option;\n <sd-select size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Ch\u1ECDn gi\u00E1 tr\u1ECB\"\n [items]=\"_options\"\n [valueField]=\"_opt.valueField\"\n [displayField]=\"_opt.displayField\"\n [multiple]=\"multiple()\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-select>\n @if (_loading) {\n <div class=\"c-pop-values-loading\">\u0110ang t\u1EA3i...</div>\n }\n } @else if (_field.type === 'date') {\n <sd-date size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Ch\u1ECDn gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-date>\n } @else if (_field.type === 'datetime') {\n <sd-datetime size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Ch\u1ECDn gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-datetime>\n } @else if (_field.type === 'number') {\n <sd-input-number size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Nh\u1EADp gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-input-number>\n } @else {\n <sd-input size=\"sm\" hideInlineError\n [autoId]=\"chipAutoId('value')\"\n placeholder=\"Nh\u1EADp gi\u00E1 tr\u1ECB\"\n [model]=\"$any(_val)\"\n (sdChange)=\"onEditingValueInput($event)\">\n </sd-input>\n }\n }\n </div>\n }\n </ng-template>\n</mat-menu>\n", styles: [":host{display:contents}::ng-deep .mat-mdc-menu-panel.c-chip-popover{min-width:280px;max-width:320px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #e2e4e7;font-size:13px;font-weight:500;color:#212121}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header mat-icon{font-size:16px;width:16px;height:16px;color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header .c-pop-header-operator{margin-left:auto}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field{display:inline-flex;align-items:center;gap:4px;padding:2px 4px 2px 6px;margin-left:-4px;background:transparent;border:1px solid transparent;border-radius:4px;font:inherit;font-weight:500;color:#212121;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field mat-icon{font-size:14px!important;width:14px!important;height:14px!important;color:#7a7a7a!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field:hover{background:#f5f6f7;border-color:#e2e4e7}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-body{padding:10px 12px;display:flex;flex-direction:column;gap:12px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-between{display:grid;grid-template-columns:1fr 1fr;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean{display:flex;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean button{flex:1;height:32px;border:1px solid #d6d8db;border-radius:6px;background:#fff;font:inherit;font-size:13px;cursor:pointer}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values-loading{padding:10px 8px;font-size:12px;color:#7a7a7a}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle{display:inline-flex;align-items:center;gap:4px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle .mdc-button,::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle button[mat-button],::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle button[mat-stroked-button],::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-bool-toggle button[mat-flat-button]{border-radius:999px;min-width:0;padding:0 12px}\n"] }]
|
|
740
|
-
}] });
|
|
740
|
+
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], chipIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "chipIndex", required: false }] }], autoIdBase: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoIdBase", required: false }] }], switchPickerMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "switchPickerMenu", required: false }] }], commit: [{ type: i0.Output, args: ["commit"] }], swapField: [{ type: i0.Output, args: ["swapField"] }], menu: [{ type: i0.ViewChild, args: ['menu', { isSignal: true }] }] } });
|
|
741
741
|
|
|
742
742
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
743
743
|
/**
|
|
@@ -754,11 +754,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
754
754
|
*/
|
|
755
755
|
class SdQueryFieldPicker {
|
|
756
756
|
/** Field list shown in the menu (caller-supplied; rendered in input order). */
|
|
757
|
-
fields = input([]);
|
|
757
|
+
fields = input([], ...(ngDevMode ? [{ debugName: "fields" }] : []));
|
|
758
758
|
/** Single key disabled with a trailing check — used in the chip-popover "Đổi field" flow. */
|
|
759
|
-
currentKey = input(undefined);
|
|
759
|
+
currentKey = input(undefined, ...(ngDevMode ? [{ debugName: "currentKey" }] : []));
|
|
760
760
|
/** Set of keys already in use — used in the "Add filter" flow to grey out duplicates. */
|
|
761
|
-
usedKeys = input(new Set());
|
|
761
|
+
usedKeys = input(new Set(), ...(ngDevMode ? [{ debugName: "usedKeys" }] : []));
|
|
762
762
|
/** Emits when the user picks an enabled field. */
|
|
763
763
|
pick = output();
|
|
764
764
|
/** MatMenu instance — parent binds `[matMenuTriggerFor]="picker.menu()"`. */
|
|
@@ -771,7 +771,7 @@ class SdQueryFieldPicker {
|
|
|
771
771
|
if (cur)
|
|
772
772
|
set.add(cur);
|
|
773
773
|
return set;
|
|
774
|
-
});
|
|
774
|
+
}, ...(ngDevMode ? [{ debugName: "disabledMap" }] : []));
|
|
775
775
|
isDisabled(field) {
|
|
776
776
|
return field.disabled === true || this.disabledMap().has(field.key);
|
|
777
777
|
}
|
|
@@ -783,13 +783,13 @@ class SdQueryFieldPicker {
|
|
|
783
783
|
isUsed(field) {
|
|
784
784
|
return this.usedKeys().has(field.key);
|
|
785
785
|
}
|
|
786
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
787
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
786
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryFieldPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
787
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: SdQueryFieldPicker, isStandalone: true, selector: "sd-query-field-picker", inputs: { fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, currentKey: { classPropertyName: "currentKey", publicName: "currentKey", isSignal: true, isRequired: false, transformFunction: null }, usedKeys: { classPropertyName: "usedKeys", publicName: "usedKeys", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pick: "pick" }, viewQueries: [{ propertyName: "menu", first: true, predicate: MatMenu, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-menu #m=\"matMenu\" xPosition=\"after\" yPosition=\"below\" class=\"c-field-picker-menu\">\n @for (field of fields(); track $index) {\n <button\n type=\"button\"\n mat-menu-item\n [disabled]=\"isDisabled(field)\"\n (click)=\"pick.emit(field)\">\n <mat-icon fontSet=\"material-icons-outlined\" class=\"c-field-item-icon\">\n {{ iconFor(field) }}\n </mat-icon>\n <span class=\"c-field-item-label\">{{ field.label }}</span>\n <span class=\"c-field-item-type\">{{ field.type }}</span>\n @if (isCurrent(field) || isUsed(field)) {\n <mat-icon class=\"c-field-item-check\" fontSet=\"material-icons-outlined\">check</mat-icon>\n }\n </button>\n } @empty {\n <div class=\"c-field-empty\">Ch\u01B0a c\u00F3 field n\u00E0o \u0111\u01B0\u1EE3c c\u1EA5u h\u00ECnh.</div>\n }\n</mat-menu>\n", styles: ["::ng-deep .mat-mdc-menu-panel.c-field-picker-menu{min-width:200px;max-width:260px}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-menu-item{min-height:36px}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-menu-item .mat-mdc-menu-item-text{display:flex;align-items:center;flex:1;min-width:0}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .c-field-item-icon{font-size:16px;width:16px;height:16px;margin-right:8px;color:#5f6368;flex-shrink:0}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .c-field-item-label{flex:1 1 auto;min-width:0;font-size:13px;color:#212121;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .c-field-item-type{flex-shrink:0;margin-left:auto;padding-left:12px;font-family:Roboto Mono,monospace;font-size:11px;color:#7a7a7a}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .c-field-item-check{flex-shrink:0;font-size:14px;width:14px;height:14px;margin-left:6px;color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .c-field-empty{padding:12px 16px;font-size:13px;color:#7a7a7a}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
788
788
|
}
|
|
789
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryFieldPicker, decorators: [{
|
|
790
790
|
type: Component,
|
|
791
791
|
args: [{ selector: 'sd-query-field-picker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatMenuModule, MatIconModule], template: "<mat-menu #m=\"matMenu\" xPosition=\"after\" yPosition=\"below\" class=\"c-field-picker-menu\">\n @for (field of fields(); track $index) {\n <button\n type=\"button\"\n mat-menu-item\n [disabled]=\"isDisabled(field)\"\n (click)=\"pick.emit(field)\">\n <mat-icon fontSet=\"material-icons-outlined\" class=\"c-field-item-icon\">\n {{ iconFor(field) }}\n </mat-icon>\n <span class=\"c-field-item-label\">{{ field.label }}</span>\n <span class=\"c-field-item-type\">{{ field.type }}</span>\n @if (isCurrent(field) || isUsed(field)) {\n <mat-icon class=\"c-field-item-check\" fontSet=\"material-icons-outlined\">check</mat-icon>\n }\n </button>\n } @empty {\n <div class=\"c-field-empty\">Ch\u01B0a c\u00F3 field n\u00E0o \u0111\u01B0\u1EE3c c\u1EA5u h\u00ECnh.</div>\n }\n</mat-menu>\n", styles: ["::ng-deep .mat-mdc-menu-panel.c-field-picker-menu{min-width:200px;max-width:260px}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-menu-item{min-height:36px}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-menu-item .mat-mdc-menu-item-text{display:flex;align-items:center;flex:1;min-width:0}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .c-field-item-icon{font-size:16px;width:16px;height:16px;margin-right:8px;color:#5f6368;flex-shrink:0}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .c-field-item-label{flex:1 1 auto;min-width:0;font-size:13px;color:#212121;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .c-field-item-type{flex-shrink:0;margin-left:auto;padding-left:12px;font-family:Roboto Mono,monospace;font-size:11px;color:#7a7a7a}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .c-field-item-check{flex-shrink:0;font-size:14px;width:14px;height:14px;margin-left:6px;color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .c-field-empty{padding:12px 16px;font-size:13px;color:#7a7a7a}\n"] }]
|
|
792
|
-
}] });
|
|
792
|
+
}], propDecorators: { fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: false }] }], currentKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentKey", required: false }] }], usedKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "usedKeys", required: false }] }], pick: [{ type: i0.Output, args: ["pick"] }], menu: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatMenu), { isSignal: true }] }] } });
|
|
793
793
|
|
|
794
794
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
795
795
|
/**
|
|
@@ -810,21 +810,21 @@ class SdQueryInlineChip {
|
|
|
810
810
|
// Inputs
|
|
811
811
|
// ---------------------------------------------------------------------------
|
|
812
812
|
/** Resolved field — parent passes it (no lookup needed inside). */
|
|
813
|
-
field = input.required();
|
|
813
|
+
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
814
814
|
/** The chip's Filter — used for `data` + `operator`. */
|
|
815
|
-
filter = input.required();
|
|
815
|
+
filter = input.required(...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
816
816
|
/** Density preset — sizes the `.c-token` row. */
|
|
817
|
-
density = input('compact');
|
|
817
|
+
density = input('compact', ...(ngDevMode ? [{ debugName: "density" }] : []));
|
|
818
818
|
/** Whether the active operator is a multi-select (IN/NOT_IN). */
|
|
819
|
-
multiple = input(false);
|
|
819
|
+
multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
|
|
820
820
|
/** Show `<sd-operator>` (disabled badge) on the chip; otherwise show `':'` separator. */
|
|
821
|
-
showOperator = input(false);
|
|
821
|
+
showOperator = input(false, ...(ngDevMode ? [{ debugName: "showOperator" }] : []));
|
|
822
822
|
/** autoId prefix for inner controls (parent passes `inlineAutoId(i, 'value')`). */
|
|
823
|
-
autoId = input('');
|
|
823
|
+
autoId = input('', ...(ngDevMode ? [{ debugName: "autoId" }] : []));
|
|
824
824
|
/** Pre-computed display text — parent owns `chipValueText(filter)` so we don't recompute. */
|
|
825
|
-
valueText = input('');
|
|
825
|
+
valueText = input('', ...(ngDevMode ? [{ debugName: "valueText" }] : []));
|
|
826
826
|
/** No-data operator (NULL/NOT_NULL) — hide entire value slot when true. */
|
|
827
|
-
isNoData = input(false);
|
|
827
|
+
isNoData = input(false, ...(ngDevMode ? [{ debugName: "isNoData" }] : []));
|
|
828
828
|
// ---------------------------------------------------------------------------
|
|
829
829
|
// Outputs
|
|
830
830
|
// ---------------------------------------------------------------------------
|
|
@@ -840,18 +840,18 @@ class SdQueryInlineChip {
|
|
|
840
840
|
// Internal state
|
|
841
841
|
// ---------------------------------------------------------------------------
|
|
842
842
|
/** Edit toggle — viewed (false) ↔ editable (true). */
|
|
843
|
-
#editing = signal(false);
|
|
843
|
+
#editing = signal(false, ...(ngDevMode ? [{ debugName: "#editing" }] : []));
|
|
844
844
|
editing = this.#editing.asReadonly();
|
|
845
845
|
/** Active picker reference — auto-opened right after entering edit. */
|
|
846
|
-
chipPicker = viewChild('chipPicker');
|
|
846
|
+
chipPicker = viewChild('chipPicker', ...(ngDevMode ? [{ debugName: "chipPicker" }] : []));
|
|
847
847
|
// ---------------------------------------------------------------------------
|
|
848
848
|
// Template helpers
|
|
849
849
|
// ---------------------------------------------------------------------------
|
|
850
|
-
iconName = computed(() => sdQueryFieldIcon(this.field()));
|
|
850
|
+
iconName = computed(() => sdQueryFieldIcon(this.field()), ...(ngDevMode ? [{ debugName: "iconName" }] : []));
|
|
851
851
|
/** Operator code — convenience accessor for template. */
|
|
852
|
-
operator = computed(() => this.filter().operator);
|
|
852
|
+
operator = computed(() => this.filter().operator, ...(ngDevMode ? [{ debugName: "operator" }] : []));
|
|
853
853
|
/** Data payload — convenience accessor for template. */
|
|
854
|
-
data = computed(() => this.filter().data);
|
|
854
|
+
data = computed(() => this.filter().data, ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
855
855
|
// ---------------------------------------------------------------------------
|
|
856
856
|
// Edit lifecycle
|
|
857
857
|
// ---------------------------------------------------------------------------
|
|
@@ -925,10 +925,10 @@ class SdQueryInlineChip {
|
|
|
925
925
|
this.commit.emit(v);
|
|
926
926
|
this.#editing.set(false);
|
|
927
927
|
}
|
|
928
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
929
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdQueryInlineChip, isStandalone: true, selector: "sd-query-inline-chip", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, showOperator: { classPropertyName: "showOperator", publicName: "showOperator", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, valueText: { classPropertyName: "valueText", publicName: "valueText", isSignal: true, isRequired: false, transformFunction: null }, isNoData: { classPropertyName: "isNoData", publicName: "isNoData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { commit: "commit", commitRange: "commitRange", liveChange: "liveChange", remove: "remove" }, viewQueries: [{ propertyName: "chipPicker", first: true, predicate: ["chipPicker"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n Completed inline chip \u2014 non-string/number/seamless branches.\n Edit lifecycle is self-managed: click enters edit + auto-opens picker,\n focusout outside the wrapper exits edit, picker emits commit single OR\n liveChange (multi) OR commitRange (BETWEEN).\n-->\n@let _f = field();\n@let _op = operator();\n@let _data = data();\n@let _multi = multiple();\n@let _editing = editing();\n@let _isNoData = isNoData();\n\n<div class=\"c-token\" [class.c-token-editing]=\"_editing\">\n <mat-icon class=\"c-token-icon\" fontSet=\"material-icons-outlined\">{{ iconName() }}</mat-icon>\n <span class=\"c-token-field\">{{ _f.label }}</span>\n\n @if (!_isNoData && showOperator()) {\n <sd-operator class=\"c-token-op\" [operators]=\"[_op]\" [model]=\"_op\" [disabled]=\"true\" />\n } @else if (!_isNoData) {\n <span class=\"c-token-sep\">:</span>\n }\n\n @if (!_isNoData) {\n @if (_f.type === 'boolean') {\n @if (_editing) {\n <!-- why: native button thay sd-button \u2014 mat-button MDC baseline 36px bu\u1ED9c\n ph\u1EA3i hack height/padding overrides; chip 28/32px nh\u1ECF h\u01A1n nhi\u1EC1u. T\u1EF1 v\u1EBD\n pill nh\u1ECF v\u1EDBi CSS scoped trong chip, kh\u00F4ng qua MDC, g\u1ECDn + chu\u1EA9n baseline. -->\n <span class=\"c-token-value c-token-value-edit c-bool-toggle\">\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-true\"\n [class.c-bool-active]=\"_data === true\"\n [attr.data-autoId]=\"autoId() + '-true'\"\n (click)=\"emitBoolean(true)\">\n {{ $any(_f).trueLabel || 'C\u00F3' }}\n </button>\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-false\"\n [class.c-bool-active]=\"_data === false\"\n [attr.data-autoId]=\"autoId() + '-false'\"\n (click)=\"emitBoolean(false)\">\n {{ $any(_f).falseLabel || 'Kh\u00F4ng' }}\n </button>\n </span>\n } @else {\n <button type=\"button\" class=\"c-token-value\" (click)=\"enterEdit()\">{{ valueText() }}</button>\n }\n } @else if ((_f.type === 'date' || _f.type === 'datetime') && _op === 'BETWEEN') {\n <!-- why: d\u00F9ng sd-date-range th\u1ED1ng nh\u1EA5t cho c\u1EA3 date + datetime BETWEEN (datetime downgrade v\u1EC1 date). -->\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-date-range #chipPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"emitRangeCommit($any($event))\"></sd-date-range>\n </span>\n } @else if (_f.type === 'values' || _f.type === 'lazy-values') {\n @let _opt = $any(_f).option;\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-select #chipPicker bare size=\"sm\" minWidthPanel=\"300px\"\n [autoId]=\"autoId()\"\n [items]=\"_f.type === 'lazy-values' ? $any(_opt).search : $any(_opt.items)\"\n [valueField]=\"_opt.valueField\"\n [displayField]=\"_opt.displayField\"\n [multiple]=\"_multi\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"_multi ? emitLive($event) : emitSingleCommit($event)\">\n <!-- why: viewed mode m\u1EB7c \u0111\u1ECBnh d\u00F9ng comma-joined cho multi \u2014 qu\u00E1 d\u00E0i cho chip.\n Override b\u1EB1ng template \"head +N\" gi\u1ED1ng popover chipValueText. -->\n <ng-template #sdValue let-selectedItems=\"selectedItems\">\n @if ((selectedItems?.length ?? 0) > 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_opt.displayField] }}</span> +{{ selectedItems.length - 1 }}\n } @else if ((selectedItems?.length ?? 0) === 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_opt.displayField] }}</span>\n }\n </ng-template>\n </sd-select>\n </span>\n } @else if (_f.type === 'date') {\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-date #chipPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"emitSingleCommit($any($event))\"></sd-date>\n </span>\n } @else if (_f.type === 'datetime') {\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-datetime #chipPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"emitSingleCommit($any($event))\"></sd-datetime>\n </span>\n } @else {\n <!-- Fallback (unforeseen type) \u2014 read-only display via valueText. -->\n <span class=\"c-token-value\">{{ valueText() }}</span>\n }\n }\n\n <button type=\"button\" class=\"c-token-remove\" aria-label=\"Remove filter\" (click)=\"remove.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </button>\n</div>\n", styles: [":host{display:contents}.c-token{display:inline-flex;align-items:center;gap:4px;padding:0 0 0 12px;border:1px solid var(--sd-primary-light);border-radius:999px;background:var(--sd-primary-light);font-size:13px;color:#5f6368;white-space:nowrap;overflow:hidden}:host-context(.c-density-compact) .c-token{height:28px}:host-context(.c-density-comfortable) .c-token{height:32px}.c-token-icon{font-size:14px;width:14px;height:14px;line-height:14px;color:inherit}.c-token-field{font-weight:500;line-height:1}.c-token-op{display:inline-flex;align-items:center;color:inherit}.c-token-op ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-token-op ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}.c-token-sep{color:#7a7a7a}.c-token-value{border:none;background:transparent;padding:0;font:inherit;font-weight:500;color:var(--sd-primary);cursor:pointer}.c-token-value:hover{text-decoration:underline}.c-token-value-edit{display:inline-flex;align-items:center;gap:4px;max-width:240px}.c-token-value-edit sd-date-range{display:inline-flex;max-width:220px;min-width:0;flex:0 1 auto}.c-token-value-edit sd-select,.c-token-value-edit sd-date,.c-token-value-edit sd-datetime{display:inline-flex;align-items:center;line-height:1}.c-token ::ng-deep .mat-mdc-form-field{line-height:1}.c-token ::ng-deep .mat-mdc-text-field-wrapper,.c-token ::ng-deep .mat-mdc-form-field-flex{padding:0;min-height:0;background:transparent}.c-token ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}.c-token ::ng-deep .mat-mdc-select-value,.c-token ::ng-deep .mat-mdc-input-element,.c-token ::ng-deep input{line-height:1;font-size:13px;padding:0;height:auto;color:inherit}.c-token ::ng-deep .mat-mdc-select-value{display:inline-flex;align-items:center;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;color:var(--sd-primary);font-weight:500}.c-token ::ng-deep .sd-suffix-icon{display:none}.c-token-multi-head{display:inline-block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.c-bool-toggle{display:inline-flex;align-items:center;gap:4px}.c-bool-btn{display:inline-flex;align-items:center;justify-content:center;height:18px;min-width:0;padding:0 8px;border:1px solid currentColor;border-radius:999px;background:transparent;font:inherit;font-size:11px;font-weight:500;line-height:1;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}:host-context(.c-density-comfortable) .c-bool-btn{height:20px;padding:0 10px;font-size:12px}.c-bool-true{color:var(--sd-success)}.c-bool-false{color:var(--sd-warning)}.c-bool-active.c-bool-true{background:var(--sd-success);color:#fff;border-color:var(--sd-success)}.c-bool-active.c-bool-false{background:var(--sd-warning);color:#fff;border-color:var(--sd-warning)}.c-bool-btn:hover:not(.c-bool-active).c-bool-true{background:var(--sd-success-light)}.c-bool-btn:hover:not(.c-bool-active).c-bool-false{background:var(--sd-warning-light)}.c-token-remove{align-self:stretch;display:inline-flex;align-items:center;justify-content:center;border:none;border-left:1px solid rgba(0,0,0,.04);border-radius:0;background:transparent;cursor:pointer;color:inherit}:host-context(.c-density-compact) .c-token-remove{width:26px}:host-context(.c-density-comfortable) .c-token-remove{width:28px}.c-token-remove mat-icon{font-size:14px;width:14px;height:14px}.c-token-remove:hover{background:#0000000d}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "bare", "viewed", "appearance", "floatLabel", "min", "max", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "bare", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
928
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryInlineChip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
929
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: SdQueryInlineChip, isStandalone: true, selector: "sd-query-inline-chip", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, showOperator: { classPropertyName: "showOperator", publicName: "showOperator", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, valueText: { classPropertyName: "valueText", publicName: "valueText", isSignal: true, isRequired: false, transformFunction: null }, isNoData: { classPropertyName: "isNoData", publicName: "isNoData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { commit: "commit", commitRange: "commitRange", liveChange: "liveChange", remove: "remove" }, viewQueries: [{ propertyName: "chipPicker", first: true, predicate: ["chipPicker"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n Completed inline chip \u2014 non-string/number/seamless branches.\n Edit lifecycle is self-managed: click enters edit + auto-opens picker,\n focusout outside the wrapper exits edit, picker emits commit single OR\n liveChange (multi) OR commitRange (BETWEEN).\n-->\n@let _f = field();\n@let _op = operator();\n@let _data = data();\n@let _multi = multiple();\n@let _editing = editing();\n@let _isNoData = isNoData();\n\n<div class=\"c-token\" [class.c-token-editing]=\"_editing\">\n <mat-icon class=\"c-token-icon\" fontSet=\"material-icons-outlined\">{{ iconName() }}</mat-icon>\n <span class=\"c-token-field\">{{ _f.label }}</span>\n\n @if (!_isNoData && showOperator()) {\n <sd-operator class=\"c-token-op\" [operators]=\"[_op]\" [model]=\"_op\" [disabled]=\"true\" />\n } @else if (!_isNoData) {\n <span class=\"c-token-sep\">:</span>\n }\n\n @if (!_isNoData) {\n @if (_f.type === 'boolean') {\n @if (_editing) {\n <!-- why: native button thay sd-button \u2014 mat-button MDC baseline 36px bu\u1ED9c\n ph\u1EA3i hack height/padding overrides; chip 28/32px nh\u1ECF h\u01A1n nhi\u1EC1u. T\u1EF1 v\u1EBD\n pill nh\u1ECF v\u1EDBi CSS scoped trong chip, kh\u00F4ng qua MDC, g\u1ECDn + chu\u1EA9n baseline. -->\n <span class=\"c-token-value c-token-value-edit c-bool-toggle\">\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-true\"\n [class.c-bool-active]=\"_data === true\"\n [attr.data-autoId]=\"autoId() + '-true'\"\n (click)=\"emitBoolean(true)\">\n {{ $any(_f).trueLabel || 'C\u00F3' }}\n </button>\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-false\"\n [class.c-bool-active]=\"_data === false\"\n [attr.data-autoId]=\"autoId() + '-false'\"\n (click)=\"emitBoolean(false)\">\n {{ $any(_f).falseLabel || 'Kh\u00F4ng' }}\n </button>\n </span>\n } @else {\n <button type=\"button\" class=\"c-token-value\" (click)=\"enterEdit()\">{{ valueText() }}</button>\n }\n } @else if ((_f.type === 'date' || _f.type === 'datetime') && _op === 'BETWEEN') {\n <!-- why: d\u00F9ng sd-date-range th\u1ED1ng nh\u1EA5t cho c\u1EA3 date + datetime BETWEEN (datetime downgrade v\u1EC1 date). -->\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-date-range #chipPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"emitRangeCommit($any($event))\"></sd-date-range>\n </span>\n } @else if (_f.type === 'values' || _f.type === 'lazy-values') {\n @let _opt = $any(_f).option;\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-select #chipPicker bare size=\"sm\" minWidthPanel=\"300px\"\n [autoId]=\"autoId()\"\n [items]=\"_f.type === 'lazy-values' ? $any(_opt).search : $any(_opt.items)\"\n [valueField]=\"_opt.valueField\"\n [displayField]=\"_opt.displayField\"\n [multiple]=\"_multi\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"_multi ? emitLive($event) : emitSingleCommit($event)\">\n <!-- why: viewed mode m\u1EB7c \u0111\u1ECBnh d\u00F9ng comma-joined cho multi \u2014 qu\u00E1 d\u00E0i cho chip.\n Override b\u1EB1ng template \"head +N\" gi\u1ED1ng popover chipValueText. -->\n <ng-template #sdValue let-selectedItems=\"selectedItems\">\n @if ((selectedItems?.length ?? 0) > 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_opt.displayField] }}</span> +{{ selectedItems.length - 1 }}\n } @else if ((selectedItems?.length ?? 0) === 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_opt.displayField] }}</span>\n }\n </ng-template>\n </sd-select>\n </span>\n } @else if (_f.type === 'date') {\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-date #chipPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"emitSingleCommit($any($event))\"></sd-date>\n </span>\n } @else if (_f.type === 'datetime') {\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-datetime #chipPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"emitSingleCommit($any($event))\"></sd-datetime>\n </span>\n } @else {\n <!-- Fallback (unforeseen type) \u2014 read-only display via valueText. -->\n <span class=\"c-token-value\">{{ valueText() }}</span>\n }\n }\n\n <button type=\"button\" class=\"c-token-remove\" aria-label=\"Remove filter\" (click)=\"remove.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </button>\n</div>\n", styles: [":host{display:contents}.c-token{display:inline-flex;align-items:center;gap:4px;padding:0 0 0 12px;border:1px solid var(--sd-primary-light);border-radius:999px;background:var(--sd-primary-light);font-size:13px;color:#5f6368;white-space:nowrap;overflow:hidden}:host-context(.c-density-compact) .c-token{height:28px}:host-context(.c-density-comfortable) .c-token{height:32px}.c-token-icon{font-size:14px;width:14px;height:14px;line-height:14px;color:inherit}.c-token-field{font-weight:500;line-height:1}.c-token-op{display:inline-flex;align-items:center;color:inherit}.c-token-op ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-token-op ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}.c-token-sep{color:#7a7a7a}.c-token-value{border:none;background:transparent;padding:0;font:inherit;font-weight:500;color:var(--sd-primary);cursor:pointer}.c-token-value:hover{text-decoration:underline}.c-token-value-edit{display:inline-flex;align-items:center;gap:4px;max-width:240px}.c-token-value-edit sd-date-range{display:inline-flex;max-width:220px;min-width:0;flex:0 1 auto}.c-token-value-edit sd-select,.c-token-value-edit sd-date,.c-token-value-edit sd-datetime{display:inline-flex;align-items:center;line-height:1}.c-token ::ng-deep .mat-mdc-form-field{line-height:1}.c-token ::ng-deep .mat-mdc-text-field-wrapper,.c-token ::ng-deep .mat-mdc-form-field-flex{padding:0;min-height:0;background:transparent}.c-token ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}.c-token ::ng-deep .mat-mdc-select-value,.c-token ::ng-deep .mat-mdc-input-element,.c-token ::ng-deep input{line-height:1;font-size:13px;padding:0;height:auto;color:inherit}.c-token ::ng-deep .mat-mdc-select-value{display:inline-flex;align-items:center;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;color:var(--sd-primary);font-weight:500}.c-token ::ng-deep .sd-suffix-icon{display:none}.c-token-multi-head{display:inline-block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.c-bool-toggle{display:inline-flex;align-items:center;gap:4px}.c-bool-btn{display:inline-flex;align-items:center;justify-content:center;height:18px;min-width:0;padding:0 8px;border:1px solid currentColor;border-radius:999px;background:transparent;font:inherit;font-size:11px;font-weight:500;line-height:1;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}:host-context(.c-density-comfortable) .c-bool-btn{height:20px;padding:0 10px;font-size:12px}.c-bool-true{color:var(--sd-success)}.c-bool-false{color:var(--sd-warning)}.c-bool-active.c-bool-true{background:var(--sd-success);color:#fff;border-color:var(--sd-success)}.c-bool-active.c-bool-false{background:var(--sd-warning);color:#fff;border-color:var(--sd-warning)}.c-bool-btn:hover:not(.c-bool-active).c-bool-true{background:var(--sd-success-light)}.c-bool-btn:hover:not(.c-bool-active).c-bool-false{background:var(--sd-warning-light)}.c-token-remove{align-self:stretch;display:inline-flex;align-items:center;justify-content:center;border:none;border-left:1px solid rgba(0,0,0,.04);border-radius:0;background:transparent;cursor:pointer;color:inherit}:host-context(.c-density-compact) .c-token-remove{width:26px}:host-context(.c-density-comfortable) .c-token-remove{width:28px}.c-token-remove mat-icon{font-size:14px;width:14px;height:14px}.c-token-remove:hover{background:#0000000d}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "bare", "viewed", "appearance", "floatLabel", "min", "max", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "bare", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "bare", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
930
930
|
}
|
|
931
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryInlineChip, decorators: [{
|
|
932
932
|
type: Component,
|
|
933
933
|
args: [{ selector: 'sd-query-inline-chip', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
934
934
|
CommonModule,
|
|
@@ -939,7 +939,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
939
939
|
SdDatetime,
|
|
940
940
|
SdSelect,
|
|
941
941
|
], template: "<!--\n Completed inline chip \u2014 non-string/number/seamless branches.\n Edit lifecycle is self-managed: click enters edit + auto-opens picker,\n focusout outside the wrapper exits edit, picker emits commit single OR\n liveChange (multi) OR commitRange (BETWEEN).\n-->\n@let _f = field();\n@let _op = operator();\n@let _data = data();\n@let _multi = multiple();\n@let _editing = editing();\n@let _isNoData = isNoData();\n\n<div class=\"c-token\" [class.c-token-editing]=\"_editing\">\n <mat-icon class=\"c-token-icon\" fontSet=\"material-icons-outlined\">{{ iconName() }}</mat-icon>\n <span class=\"c-token-field\">{{ _f.label }}</span>\n\n @if (!_isNoData && showOperator()) {\n <sd-operator class=\"c-token-op\" [operators]=\"[_op]\" [model]=\"_op\" [disabled]=\"true\" />\n } @else if (!_isNoData) {\n <span class=\"c-token-sep\">:</span>\n }\n\n @if (!_isNoData) {\n @if (_f.type === 'boolean') {\n @if (_editing) {\n <!-- why: native button thay sd-button \u2014 mat-button MDC baseline 36px bu\u1ED9c\n ph\u1EA3i hack height/padding overrides; chip 28/32px nh\u1ECF h\u01A1n nhi\u1EC1u. T\u1EF1 v\u1EBD\n pill nh\u1ECF v\u1EDBi CSS scoped trong chip, kh\u00F4ng qua MDC, g\u1ECDn + chu\u1EA9n baseline. -->\n <span class=\"c-token-value c-token-value-edit c-bool-toggle\">\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-true\"\n [class.c-bool-active]=\"_data === true\"\n [attr.data-autoId]=\"autoId() + '-true'\"\n (click)=\"emitBoolean(true)\">\n {{ $any(_f).trueLabel || 'C\u00F3' }}\n </button>\n <button\n type=\"button\"\n class=\"c-bool-btn c-bool-false\"\n [class.c-bool-active]=\"_data === false\"\n [attr.data-autoId]=\"autoId() + '-false'\"\n (click)=\"emitBoolean(false)\">\n {{ $any(_f).falseLabel || 'Kh\u00F4ng' }}\n </button>\n </span>\n } @else {\n <button type=\"button\" class=\"c-token-value\" (click)=\"enterEdit()\">{{ valueText() }}</button>\n }\n } @else if ((_f.type === 'date' || _f.type === 'datetime') && _op === 'BETWEEN') {\n <!-- why: d\u00F9ng sd-date-range th\u1ED1ng nh\u1EA5t cho c\u1EA3 date + datetime BETWEEN (datetime downgrade v\u1EC1 date). -->\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-date-range #chipPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"emitRangeCommit($any($event))\"></sd-date-range>\n </span>\n } @else if (_f.type === 'values' || _f.type === 'lazy-values') {\n @let _opt = $any(_f).option;\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-select #chipPicker bare size=\"sm\" minWidthPanel=\"300px\"\n [autoId]=\"autoId()\"\n [items]=\"_f.type === 'lazy-values' ? $any(_opt).search : $any(_opt.items)\"\n [valueField]=\"_opt.valueField\"\n [displayField]=\"_opt.displayField\"\n [multiple]=\"_multi\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"_multi ? emitLive($event) : emitSingleCommit($event)\">\n <!-- why: viewed mode m\u1EB7c \u0111\u1ECBnh d\u00F9ng comma-joined cho multi \u2014 qu\u00E1 d\u00E0i cho chip.\n Override b\u1EB1ng template \"head +N\" gi\u1ED1ng popover chipValueText. -->\n <ng-template #sdValue let-selectedItems=\"selectedItems\">\n @if ((selectedItems?.length ?? 0) > 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_opt.displayField] }}</span> +{{ selectedItems.length - 1 }}\n } @else if ((selectedItems?.length ?? 0) === 1) {\n <span class=\"c-token-multi-head\">{{ $any(selectedItems)[0][_opt.displayField] }}</span>\n }\n </ng-template>\n </sd-select>\n </span>\n } @else if (_f.type === 'date') {\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-date #chipPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"emitSingleCommit($any($event))\"></sd-date>\n </span>\n } @else if (_f.type === 'datetime') {\n <span\n class=\"c-token-value c-token-value-edit\"\n (click)=\"enterEdit()\"\n (focusout)=\"onFocusOut($event)\">\n <sd-datetime #chipPicker bare size=\"sm\"\n [autoId]=\"autoId()\"\n [viewed]=\"!_editing\"\n [model]=\"$any(_data)\"\n (sdChange)=\"emitSingleCommit($any($event))\"></sd-datetime>\n </span>\n } @else {\n <!-- Fallback (unforeseen type) \u2014 read-only display via valueText. -->\n <span class=\"c-token-value\">{{ valueText() }}</span>\n }\n }\n\n <button type=\"button\" class=\"c-token-remove\" aria-label=\"Remove filter\" (click)=\"remove.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </button>\n</div>\n", styles: [":host{display:contents}.c-token{display:inline-flex;align-items:center;gap:4px;padding:0 0 0 12px;border:1px solid var(--sd-primary-light);border-radius:999px;background:var(--sd-primary-light);font-size:13px;color:#5f6368;white-space:nowrap;overflow:hidden}:host-context(.c-density-compact) .c-token{height:28px}:host-context(.c-density-comfortable) .c-token{height:32px}.c-token-icon{font-size:14px;width:14px;height:14px;line-height:14px;color:inherit}.c-token-field{font-weight:500;line-height:1}.c-token-op{display:inline-flex;align-items:center;color:inherit}.c-token-op ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-token-op ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}.c-token-sep{color:#7a7a7a}.c-token-value{border:none;background:transparent;padding:0;font:inherit;font-weight:500;color:var(--sd-primary);cursor:pointer}.c-token-value:hover{text-decoration:underline}.c-token-value-edit{display:inline-flex;align-items:center;gap:4px;max-width:240px}.c-token-value-edit sd-date-range{display:inline-flex;max-width:220px;min-width:0;flex:0 1 auto}.c-token-value-edit sd-select,.c-token-value-edit sd-date,.c-token-value-edit sd-datetime{display:inline-flex;align-items:center;line-height:1}.c-token ::ng-deep .mat-mdc-form-field{line-height:1}.c-token ::ng-deep .mat-mdc-text-field-wrapper,.c-token ::ng-deep .mat-mdc-form-field-flex{padding:0;min-height:0;background:transparent}.c-token ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}.c-token ::ng-deep .mat-mdc-select-value,.c-token ::ng-deep .mat-mdc-input-element,.c-token ::ng-deep input{line-height:1;font-size:13px;padding:0;height:auto;color:inherit}.c-token ::ng-deep .mat-mdc-select-value{display:inline-flex;align-items:center;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;color:var(--sd-primary);font-weight:500}.c-token ::ng-deep .sd-suffix-icon{display:none}.c-token-multi-head{display:inline-block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.c-bool-toggle{display:inline-flex;align-items:center;gap:4px}.c-bool-btn{display:inline-flex;align-items:center;justify-content:center;height:18px;min-width:0;padding:0 8px;border:1px solid currentColor;border-radius:999px;background:transparent;font:inherit;font-size:11px;font-weight:500;line-height:1;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}:host-context(.c-density-comfortable) .c-bool-btn{height:20px;padding:0 10px;font-size:12px}.c-bool-true{color:var(--sd-success)}.c-bool-false{color:var(--sd-warning)}.c-bool-active.c-bool-true{background:var(--sd-success);color:#fff;border-color:var(--sd-success)}.c-bool-active.c-bool-false{background:var(--sd-warning);color:#fff;border-color:var(--sd-warning)}.c-bool-btn:hover:not(.c-bool-active).c-bool-true{background:var(--sd-success-light)}.c-bool-btn:hover:not(.c-bool-active).c-bool-false{background:var(--sd-warning-light)}.c-token-remove{align-self:stretch;display:inline-flex;align-items:center;justify-content:center;border:none;border-left:1px solid rgba(0,0,0,.04);border-radius:0;background:transparent;cursor:pointer;color:inherit}:host-context(.c-density-compact) .c-token-remove{width:26px}:host-context(.c-density-comfortable) .c-token-remove{width:28px}.c-token-remove mat-icon{font-size:14px;width:14px;height:14px}.c-token-remove:hover{background:#0000000d}\n"] }]
|
|
942
|
-
}] });
|
|
942
|
+
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], showOperator: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOperator", required: false }] }], autoId: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], valueText: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueText", required: false }] }], isNoData: [{ type: i0.Input, args: [{ isSignal: true, alias: "isNoData", required: false }] }], commit: [{ type: i0.Output, args: ["commit"] }], commitRange: [{ type: i0.Output, args: ["commitRange"] }], liveChange: [{ type: i0.Output, args: ["liveChange"] }], remove: [{ type: i0.Output, args: ["remove"] }], chipPicker: [{ type: i0.ViewChild, args: ['chipPicker', { isSignal: true }] }] } });
|
|
943
943
|
|
|
944
944
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
945
945
|
/**
|
|
@@ -949,17 +949,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
949
949
|
*/
|
|
950
950
|
class SdQueryPopoverChip {
|
|
951
951
|
/** Resolved field (from the bar's `fieldByKey()` map). `undefined` → render raw key. */
|
|
952
|
-
field = input(undefined);
|
|
952
|
+
field = input(undefined, ...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
953
953
|
/** The chip's filter — used to read `field` / `operator` / `data` for display text. */
|
|
954
|
-
filter = input.required();
|
|
954
|
+
filter = input.required(...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
955
955
|
/** "Active" = chip has a real value or is no-data op. Drives layout + colour. */
|
|
956
|
-
active = input.required();
|
|
956
|
+
active = input.required(...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
957
957
|
/** Operator visible on the chip face (else hidden, ":" separator). */
|
|
958
|
-
showOperator = input(false);
|
|
958
|
+
showOperator = input(false, ...(ngDevMode ? [{ debugName: "showOperator" }] : []));
|
|
959
959
|
/** Rendered value text for the value slot. */
|
|
960
|
-
valueText = input('');
|
|
960
|
+
valueText = input('', ...(ngDevMode ? [{ debugName: "valueText" }] : []));
|
|
961
961
|
/** Chip popover mat-menu instance supplied by the parent. */
|
|
962
|
-
menu = input.required();
|
|
962
|
+
menu = input.required(...(ngDevMode ? [{ debugName: "menu" }] : []));
|
|
963
963
|
/** Fired when the chip popover opens (parent seeds its editing state). */
|
|
964
964
|
open = output();
|
|
965
965
|
/** Fired when the user clicks the × removal icon. */
|
|
@@ -970,16 +970,16 @@ class SdQueryPopoverChip {
|
|
|
970
970
|
// why: parent's add/swap flow auto-opens the chip popover after render, and removeFilter
|
|
971
971
|
// closes the open one — expose open/close so the parent doesn't need a ViewChild on the
|
|
972
972
|
// internal MatMenuTrigger directive.
|
|
973
|
-
trigger = viewChild('chipTrigger', { read: MatMenuTrigger });
|
|
973
|
+
trigger = viewChild('chipTrigger', ...(ngDevMode ? [{ debugName: "trigger", read: MatMenuTrigger }] : [{ read: MatMenuTrigger }]));
|
|
974
974
|
openMenu() { this.trigger()?.openMenu(); }
|
|
975
975
|
closeMenu() { this.trigger()?.closeMenu(); }
|
|
976
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
977
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
976
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryPopoverChip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
977
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: SdQueryPopoverChip, isStandalone: true, selector: "sd-query-popover-chip", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, showOperator: { classPropertyName: "showOperator", publicName: "showOperator", isSignal: true, isRequired: false, transformFunction: null }, valueText: { classPropertyName: "valueText", publicName: "valueText", isSignal: true, isRequired: false, transformFunction: null }, menu: { classPropertyName: "menu", publicName: "menu", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { open: "open", remove: "remove" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["chipTrigger"], descendants: true, read: MatMenuTrigger, isSignal: true }], ngImport: i0, template: "<!-- why: div[role=button] (not <button>) so the nested <sd-operator> isn't button-in-button (invalid HTML). -->\n<div\n #chipTrigger=\"matMenuTrigger\"\n role=\"button\"\n tabindex=\"0\"\n class=\"c-chip\"\n [class.c-chip-active]=\"active()\"\n [class.c-chip-inactive]=\"!active()\"\n [attr.data-field]=\"filterField()\"\n [matTooltip]=\"field()?.label || filterField()\"\n [matMenuTriggerFor]=\"menu()\"\n (menuOpened)=\"open.emit()\"\n (keydown.enter)=\"chipTrigger.openMenu()\"\n (keydown.space)=\"$event.preventDefault(); chipTrigger.openMenu()\">\n <mat-icon class=\"c-chip-icon\" fontSet=\"material-icons-outlined\">\n {{ field() ? iconFor(field()!) : 'tune' }}\n </mat-icon>\n <span class=\"c-chip-label\">{{ field()?.label || filterField() }}</span>\n\n @if (showOperator() && active()) {\n <sd-operator class=\"c-chip-operator\" [operators]=\"[filterOperator()]\" [model]=\"filterOperator()\" [disabled]=\"true\" />\n } @else if (active()) {\n <span class=\"c-chip-sep\">:</span>\n }\n\n @if (active()) {\n <span class=\"c-chip-value\">{{ valueText() }}</span>\n }\n\n <mat-icon class=\"c-chip-chevron\" fontSet=\"material-icons-outlined\">arrow_drop_down</mat-icon>\n\n @if (active()) {\n <span\n role=\"button\"\n tabindex=\"0\"\n class=\"c-chip-remove\"\n aria-label=\"Remove filter\"\n (click)=\"$event.stopPropagation(); remove.emit()\"\n (keydown.enter)=\"$event.stopPropagation(); remove.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </span>\n }\n</div>\n", styles: [":host{display:contents}.c-chip{display:inline-flex;align-items:center;gap:4px;padding:0 4px 0 10px;border-radius:999px;border:1px solid #d6d8db;background:#fff;cursor:pointer;font-family:inherit;font-size:13px;font-weight:500;color:#5f6368;transition:background-color .12s ease,border-color .12s ease,color .12s ease}:host-context(.c-density-compact) .c-chip{height:28px}:host-context(.c-density-comfortable) .c-chip{height:32px}.c-chip:hover{border-color:var(--sd-primary)}.c-chip.c-chip-active{border-color:var(--sd-primary-light);background:var(--sd-primary-light)}.c-chip.c-chip-active .c-chip-value{color:var(--sd-primary)}.c-chip.c-chip-inactive{padding-right:10px}.c-chip .c-chip-icon{font-size:16px;width:16px;height:16px}.c-chip .c-chip-label{font-weight:500;white-space:nowrap}.c-chip .c-chip-operator{display:inline-flex;align-items:center;color:inherit}.c-chip .c-chip-sep{color:#7a7a7a}.c-chip .c-chip-value{font-weight:500;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-chip .c-chip-chevron{font-size:18px;width:18px;height:18px;color:currentColor}.c-chip .c-chip-remove{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;cursor:pointer;color:#7a7a7a}.c-chip .c-chip-remove mat-icon{font-size:14px;width:14px;height:14px}.c-chip .c-chip-remove:hover{background:#0000000f}.c-chip-operator ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-chip-operator ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "directive", type: i1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
978
978
|
}
|
|
979
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
979
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryPopoverChip, decorators: [{
|
|
980
980
|
type: Component,
|
|
981
981
|
args: [{ selector: 'sd-query-popover-chip', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatMenuModule, MatIconModule, MatTooltipModule, SdOperator], template: "<!-- why: div[role=button] (not <button>) so the nested <sd-operator> isn't button-in-button (invalid HTML). -->\n<div\n #chipTrigger=\"matMenuTrigger\"\n role=\"button\"\n tabindex=\"0\"\n class=\"c-chip\"\n [class.c-chip-active]=\"active()\"\n [class.c-chip-inactive]=\"!active()\"\n [attr.data-field]=\"filterField()\"\n [matTooltip]=\"field()?.label || filterField()\"\n [matMenuTriggerFor]=\"menu()\"\n (menuOpened)=\"open.emit()\"\n (keydown.enter)=\"chipTrigger.openMenu()\"\n (keydown.space)=\"$event.preventDefault(); chipTrigger.openMenu()\">\n <mat-icon class=\"c-chip-icon\" fontSet=\"material-icons-outlined\">\n {{ field() ? iconFor(field()!) : 'tune' }}\n </mat-icon>\n <span class=\"c-chip-label\">{{ field()?.label || filterField() }}</span>\n\n @if (showOperator() && active()) {\n <sd-operator class=\"c-chip-operator\" [operators]=\"[filterOperator()]\" [model]=\"filterOperator()\" [disabled]=\"true\" />\n } @else if (active()) {\n <span class=\"c-chip-sep\">:</span>\n }\n\n @if (active()) {\n <span class=\"c-chip-value\">{{ valueText() }}</span>\n }\n\n <mat-icon class=\"c-chip-chevron\" fontSet=\"material-icons-outlined\">arrow_drop_down</mat-icon>\n\n @if (active()) {\n <span\n role=\"button\"\n tabindex=\"0\"\n class=\"c-chip-remove\"\n aria-label=\"Remove filter\"\n (click)=\"$event.stopPropagation(); remove.emit()\"\n (keydown.enter)=\"$event.stopPropagation(); remove.emit()\">\n <mat-icon fontSet=\"material-icons-outlined\">close</mat-icon>\n </span>\n }\n</div>\n", styles: [":host{display:contents}.c-chip{display:inline-flex;align-items:center;gap:4px;padding:0 4px 0 10px;border-radius:999px;border:1px solid #d6d8db;background:#fff;cursor:pointer;font-family:inherit;font-size:13px;font-weight:500;color:#5f6368;transition:background-color .12s ease,border-color .12s ease,color .12s ease}:host-context(.c-density-compact) .c-chip{height:28px}:host-context(.c-density-comfortable) .c-chip{height:32px}.c-chip:hover{border-color:var(--sd-primary)}.c-chip.c-chip-active{border-color:var(--sd-primary-light);background:var(--sd-primary-light)}.c-chip.c-chip-active .c-chip-value{color:var(--sd-primary)}.c-chip.c-chip-inactive{padding-right:10px}.c-chip .c-chip-icon{font-size:16px;width:16px;height:16px}.c-chip .c-chip-label{font-weight:500;white-space:nowrap}.c-chip .c-chip-operator{display:inline-flex;align-items:center;color:inherit}.c-chip .c-chip-sep{color:#7a7a7a}.c-chip .c-chip-value{font-weight:500;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-chip .c-chip-chevron{font-size:18px;width:18px;height:18px;color:currentColor}.c-chip .c-chip-remove{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;cursor:pointer;color:#7a7a7a}.c-chip .c-chip-remove mat-icon{font-size:14px;width:14px;height:14px}.c-chip .c-chip-remove:hover{background:#0000000f}.c-chip-operator ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-chip-operator ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}\n"] }]
|
|
982
|
-
}] });
|
|
982
|
+
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: true }] }], showOperator: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOperator", required: false }] }], valueText: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueText", required: false }] }], menu: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu", required: true }] }], open: [{ type: i0.Output, args: ["open"] }], remove: [{ type: i0.Output, args: ["remove"] }], trigger: [{ type: i0.ViewChild, args: ['chipTrigger', { ...{ read: MatMenuTrigger }, isSignal: true }] }] } });
|
|
983
983
|
|
|
984
984
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
985
985
|
/** Shared empty array — stable reference so template bindings don't churn change detection. */
|
|
@@ -988,11 +988,11 @@ class SdQueryBar {
|
|
|
988
988
|
#i18n = inject(I18nService);
|
|
989
989
|
#injector = inject(Injector);
|
|
990
990
|
/** All popover-mode chips in order — used to auto-open after addFilter / close before removeFilter. */
|
|
991
|
-
popoverChips = viewChildren(SdQueryPopoverChip);
|
|
991
|
+
popoverChips = viewChildren(SdQueryPopoverChip, ...(ngDevMode ? [{ debugName: "popoverChips" }] : []));
|
|
992
992
|
/** The extracted in-progress chip — owns operator menu + value picker view refs. */
|
|
993
|
-
buildChip = viewChild(SdQueryBuildChip);
|
|
993
|
+
buildChip = viewChild(SdQueryBuildChip, ...(ngDevMode ? [{ debugName: "buildChip" }] : []));
|
|
994
994
|
/** The extracted chip popover — owns operator+value staging + commit-on-close. */
|
|
995
|
-
chipPopover = viewChild(SdQueryChipPopover);
|
|
995
|
+
chipPopover = viewChild(SdQueryChipPopover, ...(ngDevMode ? [{ debugName: "chipPopover" }] : []));
|
|
996
996
|
/**
|
|
997
997
|
* Land the user in the value editor after the build chip reaches the value step:
|
|
998
998
|
* popover-kind controls auto-open their native picker via the child; string/number
|
|
@@ -1010,26 +1010,27 @@ class SdQueryBar {
|
|
|
1010
1010
|
// Inputs — all accept null|undefined at boundary, transform to canonical shape
|
|
1011
1011
|
// ---------------------------------------------------------------------------
|
|
1012
1012
|
/** Prefix for auto-generated `data-autoid` on inner controls (chips, operator/value editors, buttons). */
|
|
1013
|
-
autoIdInput = input(undefined, {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1013
|
+
autoIdInput = input(undefined, ...(ngDevMode ? [{ debugName: "autoIdInput", alias: 'autoId',
|
|
1014
|
+
transform: (v) => v ?? undefined }] : [{
|
|
1015
|
+
alias: 'autoId',
|
|
1016
|
+
transform: (v) => v ?? undefined,
|
|
1017
|
+
}]));
|
|
1017
1018
|
/** Available fields the user can filter by. Required for the field picker. */
|
|
1018
|
-
fields = input([], {
|
|
1019
|
-
|
|
1020
|
-
|
|
1019
|
+
fields = input([], ...(ngDevMode ? [{ debugName: "fields", transform: (v) => (Array.isArray(v) ? v : []) }] : [{
|
|
1020
|
+
transform: (v) => (Array.isArray(v) ? v : []),
|
|
1021
|
+
}]));
|
|
1021
1022
|
/**
|
|
1022
1023
|
* Active filter chips. Two-way bindable via `[(filters)]`.
|
|
1023
1024
|
* Use this when you only need a flat `Filter[]` (no global logic / search box).
|
|
1024
1025
|
*/
|
|
1025
|
-
filters = model([]);
|
|
1026
|
+
filters = model([], ...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
1026
1027
|
/**
|
|
1027
1028
|
* Global connector between filters. Two-way bindable via `[(logic)]`.
|
|
1028
1029
|
* Only meaningful when `showLogicToggle=true` and there are ≥2 filters.
|
|
1029
1030
|
*/
|
|
1030
|
-
logic = model('AND');
|
|
1031
|
+
logic = model('AND', ...(ngDevMode ? [{ debugName: "logic" }] : []));
|
|
1031
1032
|
/** Free-text search string. Two-way bindable via `[(search)]`. Only shown when `showSearch=true`. */
|
|
1032
|
-
search = model('');
|
|
1033
|
+
search = model('', ...(ngDevMode ? [{ debugName: "search" }] : []));
|
|
1033
1034
|
/**
|
|
1034
1035
|
* Editing mode:
|
|
1035
1036
|
* - `'popover'` (default) → compact chips; click a chip to edit operator + value in a
|
|
@@ -1038,27 +1039,27 @@ class SdQueryBar {
|
|
|
1038
1039
|
* on the bar (no popup, no per-filter apply). Edits update `filters` live; the user
|
|
1039
1040
|
* presses the search button (or Enter) once to fire `(apply)`.
|
|
1040
1041
|
*/
|
|
1041
|
-
mode = input('popover', {
|
|
1042
|
-
|
|
1043
|
-
|
|
1042
|
+
mode = input('popover', ...(ngDevMode ? [{ debugName: "mode", transform: (v) => v || 'popover' }] : [{
|
|
1043
|
+
transform: (v) => v || 'popover',
|
|
1044
|
+
}]));
|
|
1044
1045
|
/** Density preset — chip / control height. */
|
|
1045
|
-
density = input('compact', {
|
|
1046
|
-
|
|
1047
|
-
|
|
1046
|
+
density = input('compact', ...(ngDevMode ? [{ debugName: "density", transform: (v) => v || 'compact' }] : [{
|
|
1047
|
+
transform: (v) => v || 'compact',
|
|
1048
|
+
}]));
|
|
1048
1049
|
/** Show free-text search input on the left. */
|
|
1049
|
-
showSearch = input(false, { transform: booleanAttribute });
|
|
1050
|
+
showSearch = input(false, ...(ngDevMode ? [{ debugName: "showSearch", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
1050
1051
|
/** Show saved-filters dropdown on the right. Requires `[savedFiltersKey]` to actually persist. */
|
|
1051
|
-
showSavedFilters = input(false, { transform: booleanAttribute });
|
|
1052
|
+
showSavedFilters = input(false, ...(ngDevMode ? [{ debugName: "showSavedFilters", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
1052
1053
|
/**
|
|
1053
1054
|
* Namespace key for persisting saved filters to `localStorage`. When set, the saved-filters
|
|
1054
1055
|
* dropdown loads/saves under `sd-query-bar:savedFilters:<key>`. Leave undefined to disable.
|
|
1055
1056
|
*/
|
|
1056
|
-
savedFiltersKey = input(undefined);
|
|
1057
|
+
savedFiltersKey = input(undefined, ...(ngDevMode ? [{ debugName: "savedFiltersKey" }] : []));
|
|
1057
1058
|
/**
|
|
1058
1059
|
* Snapshot of the current query — fed into `<sd-query-saved-filters-menu [query]>` so
|
|
1059
1060
|
* saving a filter captures live filters/logic/search.
|
|
1060
1061
|
*/
|
|
1061
|
-
currentQuery = computed(() => this.#buildQuery());
|
|
1062
|
+
currentQuery = computed(() => this.#buildQuery(), ...(ngDevMode ? [{ debugName: "currentQuery" }] : []));
|
|
1062
1063
|
/** Receive an applied filter from the saved-filters menu — re-install bar state + trigger apply. */
|
|
1063
1064
|
onApplyFilter(saved) {
|
|
1064
1065
|
this.filters.set(saved.query.filters ?? []);
|
|
@@ -1068,11 +1069,11 @@ class SdQueryBar {
|
|
|
1068
1069
|
this.triggerApply();
|
|
1069
1070
|
}
|
|
1070
1071
|
/** Show AND/OR segmented toggle (renders only when there are ≥2 filters). */
|
|
1071
|
-
showLogicToggle = input(false, { transform: booleanAttribute });
|
|
1072
|
+
showLogicToggle = input(false, ...(ngDevMode ? [{ debugName: "showLogicToggle", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
1072
1073
|
/** Show "Clear all" button when at least one filter is active. */
|
|
1073
|
-
showClearAll = input(true, { transform: booleanAttribute });
|
|
1074
|
+
showClearAll = input(true, ...(ngDevMode ? [{ debugName: "showClearAll", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
1074
1075
|
/** Render the operator label on the chip face (default: hidden — operator only visible in popover). */
|
|
1075
|
-
showOperatorOnChip = input(false, { transform: booleanAttribute });
|
|
1076
|
+
showOperatorOnChip = input(false, ...(ngDevMode ? [{ debugName: "showOperatorOnChip", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
1076
1077
|
// ---------------------------------------------------------------------------
|
|
1077
1078
|
// Outputs
|
|
1078
1079
|
// ---------------------------------------------------------------------------
|
|
@@ -1089,7 +1090,7 @@ class SdQueryBar {
|
|
|
1089
1090
|
for (const f of this.fields())
|
|
1090
1091
|
map[f.key] = f;
|
|
1091
1092
|
return map;
|
|
1092
|
-
});
|
|
1093
|
+
}, ...(ngDevMode ? [{ debugName: "fieldByKey" }] : []));
|
|
1093
1094
|
/** Field keys already chained on a chip — the picker greys these out. */
|
|
1094
1095
|
usedFieldKeys = computed(() => {
|
|
1095
1096
|
const set = new Set();
|
|
@@ -1098,17 +1099,17 @@ class SdQueryBar {
|
|
|
1098
1099
|
set.add(f.field);
|
|
1099
1100
|
}
|
|
1100
1101
|
return set;
|
|
1101
|
-
});
|
|
1102
|
+
}, ...(ngDevMode ? [{ debugName: "usedFieldKeys" }] : []));
|
|
1102
1103
|
/** Render the global AND/OR connector text between chips when `logic === 'OR'`. */
|
|
1103
|
-
showOrConnector = computed(() => this.showLogicToggle() && this.logic() === 'OR' && this.filters().length >= 2);
|
|
1104
|
+
showOrConnector = computed(() => this.showLogicToggle() && this.logic() === 'OR' && this.filters().length >= 2, ...(ngDevMode ? [{ debugName: "showOrConnector" }] : []));
|
|
1104
1105
|
/** Search button is actionable only when there is something to apply. */
|
|
1105
|
-
canSearch = computed(() => this.filters().length > 0 || this.search().trim().length > 0);
|
|
1106
|
+
canSearch = computed(() => this.filters().length > 0 || this.search().trim().length > 0, ...(ngDevMode ? [{ debugName: "canSearch" }] : []));
|
|
1106
1107
|
// ---------------------------------------------------------------------------
|
|
1107
1108
|
// Chip popover state — only `editingIndex` lives on the parent; the
|
|
1108
1109
|
// `<sd-query-chip-popover>` child owns ALL staging (operator + value + options).
|
|
1109
1110
|
// ---------------------------------------------------------------------------
|
|
1110
1111
|
/** Index of the chip whose popover is open. Reset to null after commit / close. */
|
|
1111
|
-
editingIndex = signal(null);
|
|
1112
|
+
editingIndex = signal(null, ...(ngDevMode ? [{ debugName: "editingIndex" }] : []));
|
|
1112
1113
|
/** Resolved field of the chip whose popover is currently open (or null). */
|
|
1113
1114
|
editingField = computed(() => {
|
|
1114
1115
|
const idx = this.editingIndex();
|
|
@@ -1118,7 +1119,7 @@ class SdQueryBar {
|
|
|
1118
1119
|
if (!f || !('field' in f))
|
|
1119
1120
|
return null;
|
|
1120
1121
|
return this.fieldByKey()[f.field] ?? null;
|
|
1121
|
-
});
|
|
1122
|
+
}, ...(ngDevMode ? [{ debugName: "editingField" }] : []));
|
|
1122
1123
|
/**
|
|
1123
1124
|
* Multi-select is derived from the operator (IN / NOT_IN) — not a field flag.
|
|
1124
1125
|
* Only called by inline-mode + build-mode templates with a known operator;
|
|
@@ -1167,7 +1168,7 @@ class SdQueryBar {
|
|
|
1167
1168
|
// Inline mode — per-field helpers + live mutators (no popover / no Apply gate)
|
|
1168
1169
|
// ---------------------------------------------------------------------------
|
|
1169
1170
|
/** The single in-progress inline chip (not yet in `filters`). */
|
|
1170
|
-
#building = signal(null);
|
|
1171
|
+
#building = signal(null, ...(ngDevMode ? [{ debugName: "#building" }] : []));
|
|
1171
1172
|
building = this.#building.asReadonly();
|
|
1172
1173
|
allowedOperatorsFor(field) {
|
|
1173
1174
|
return sdQueryAllowedOperators(field);
|
|
@@ -1401,10 +1402,10 @@ class SdQueryBar {
|
|
|
1401
1402
|
return items();
|
|
1402
1403
|
return null;
|
|
1403
1404
|
}
|
|
1404
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1405
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdQueryBar, isStandalone: true, selector: "sd-query-bar", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, logic: { classPropertyName: "logic", publicName: "logic", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, showSavedFilters: { classPropertyName: "showSavedFilters", publicName: "showSavedFilters", isSignal: true, isRequired: false, transformFunction: null }, savedFiltersKey: { classPropertyName: "savedFiltersKey", publicName: "savedFiltersKey", isSignal: true, isRequired: false, transformFunction: null }, showLogicToggle: { classPropertyName: "showLogicToggle", publicName: "showLogicToggle", isSignal: true, isRequired: false, transformFunction: null }, showClearAll: { classPropertyName: "showClearAll", publicName: "showClearAll", isSignal: true, isRequired: false, transformFunction: null }, showOperatorOnChip: { classPropertyName: "showOperatorOnChip", publicName: "showOperatorOnChip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filters: "filtersChange", logic: "logicChange", search: "searchChange", queryChange: "queryChange", apply: "apply" }, viewQueries: [{ propertyName: "popoverChips", predicate: SdQueryPopoverChip, descendants: true, isSignal: true }, { propertyName: "buildChip", first: true, predicate: SdQueryBuildChip, descendants: true, isSignal: true }, { propertyName: "chipPopover", first: true, predicate: SdQueryChipPopover, descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n sd-query-bar \u2014 unified filter chip row (Jira/Linear/Notion style).\n Visual spec: refs/design_handoff_sd_query_bar/README.md\n TODO(next-iter): replace inline placeholders for field-picker + chip-popover\n with extracted sub-components driven by CDK overlay.\n-->\n@let _filters = filters();\n@let _fields = fields();\n@let _density = density();\n@let _showOr = showOrConnector();\n@let _used = usedFieldKeys();\n\n<div\n class=\"c-query-bar\"\n [class.c-density-compact]=\"_density === 'compact'\"\n [class.c-density-comfortable]=\"_density === 'comfortable'\">\n\n <!-- Main region \u2014 search + filters + add-filter. Wraps internally; the right\n action toolbar stays anchored and does NOT flow with this. -->\n <div class=\"c-query-bar__main\">\n\n <!-- Free-text search (left, optional) -->\n @if (showSearch()) {\n <div class=\"c-search\">\n <mat-icon class=\"c-search-icon\" fontSet=\"material-icons-outlined\">search</mat-icon>\n <input\n class=\"c-search-input\"\n type=\"text\"\n [ngModel]=\"search()\"\n (ngModelChange)=\"setSearch($event)\"\n (keydown.enter)=\"triggerApply()\"\n placeholder=\"T\u00ECm ki\u1EBFm...\" />\n </div>\n <span class=\"c-divider\" aria-hidden=\"true\"></span>\n }\n\n <!-- Field switcher (used by chipPopover header) \u2014 declared first so chipPopover's\n nested ng-template can resolve the template ref. -->\n <!-- Field switcher used by chipPopover header \u2014 current field key comes from editingIndex. -->\n <sd-query-field-picker\n #switchPicker\n [fields]=\"_fields\"\n [currentKey]=\"editingIndex() !== null ? $any(filters()[editingIndex()!])?.field : undefined\"\n (pick)=\"editingIndex() !== null && changeFilterField(editingIndex()!, $event)\" />\n\n <!-- Chip popover \u2014 extracted into <sd-query-chip-popover>. Declared BEFORE chips\n so the popover-mode @for chips can bind their [menu] to `chipPopover.menu()`. -->\n <sd-query-chip-popover\n #chipPopover\n [field]=\"editingField() ?? undefined\"\n [filter]=\"editingIndex() !== null ? $any(filters()[editingIndex()!]) : undefined\"\n [chipIndex]=\"editingIndex()\"\n [autoIdBase]=\"autoIdInput() ?? 'qb'\"\n [switchPickerMenu]=\"switchPicker.menu()!\"\n (commit)=\"onChipPopoverCommit($event)\"\n (swapField)=\"editingIndex() !== null && changeFilterField(editingIndex()!, $event)\" />\n\n @if (mode() === 'inline') {\n <!-- ===== INLINE MODE (GitLab-style token builder) ===== -->\n\n <!-- Completed chips -->\n @for (filter of _filters; track $index; let i = $index) {\n @if (_showOr && i > 0) {\n <span class=\"c-or-connector\" aria-hidden=\"true\">OR</span>\n }\n @let _field = fieldByKey()[$any(filter).field];\n @if (_field) {\n @let _op = $any(filter.operator);\n @let _data = $any(filter).data;\n @if (_field.type === 'string' || _field.type === 'number') {\n <!-- Seamless chip \u2014 the pill is the input (string / number). -->\n <sd-query-inline-value-chip\n [field]=\"_field\"\n [operator]=\"_op\"\n [value]=\"_data\"\n [density]=\"_density\"\n [showOperator]=\"showOperatorOnChip()\"\n [autoId]=\"inlineAutoId(i, 'value')\"\n (valueChange)=\"updateFilter(i, { data: $event })\"\n (remove)=\"removeFilter(i)\" />\n } @else {\n <sd-query-inline-chip\n [field]=\"_field\"\n [filter]=\"filter\"\n [density]=\"_density\"\n [multiple]=\"multiple(_op)\"\n [showOperator]=\"showOperatorOnChip()\"\n [autoId]=\"inlineAutoId(i, 'value')\"\n [valueText]=\"chipValueText(filter)\"\n [isNoData]=\"isNoDataOperator(_op)\"\n (commit)=\"updateFilter(i, { data: $event })\"\n (commitRange)=\"setFilterRange(i, $event)\"\n (liveChange)=\"updateFilter(i, { data: $event })\"\n (remove)=\"removeFilter(i)\" />\n }\n }\n }\n\n <!-- Building chip (in-progress) \u2014 extracted into <sd-query-build-chip>. -->\n @if (building(); as _b) {\n <sd-query-build-chip\n [building]=\"_b\"\n [density]=\"_density\"\n [allowedOperators]=\"allowedOperatorsFor(_b.field)\"\n [multiple]=\"multiple($any(_b.operator))\"\n [showOperator]=\"showOperatorOnChip()\"\n (pickOperator)=\"pickBuildOperator($any($event))\"\n (commitValue)=\"commitBuildValue($event)\"\n (cancel)=\"cancelBuild()\"\n (seamlessCommit)=\"onBuildSeamlessCommit($event)\" />\n }\n\n <!-- Add filter -->\n <button\n type=\"button\"\n class=\"c-add-filter\"\n [matMenuTriggerFor]=\"addPicker.menu()\"\n [disabled]=\"_fields.length === 0 || _used.size >= _fields.length\"\n [matTooltip]=\"_fields.length === 0 ? 'Ch\u01B0a c\u1EA5u h\u00ECnh fields' : 'Th\u00EAm filter'\">\n <mat-icon fontSet=\"material-icons-outlined\">add</mat-icon>\n </button>\n } @else {\n <!-- ===== POPOVER MODE (default) \u2014 compact chips edited via mat-menu ===== -->\n @for (filter of _filters; track $index; let i = $index) {\n @if (_showOr && i > 0) {\n <span class=\"c-or-connector\" aria-hidden=\"true\">OR</span>\n }\n @let _field = fieldByKey()[$any(filter).field];\n @let _active = isFilterActive(filter);\n <!-- why: menu close commit is handled by chipPopover's (commit) \u2192\n onChipPopoverCommit; popover-chip only signals open + remove here. -->\n <sd-query-popover-chip\n [field]=\"_field\"\n [filter]=\"filter\"\n [active]=\"_active\"\n [showOperator]=\"showOperatorOnChip()\"\n [valueText]=\"chipValueText(filter)\"\n [menu]=\"chipPopover.menu()!\"\n (open)=\"openChipPopover(i)\"\n (remove)=\"removeFilter(i)\" />\n }\n\n <!-- Add filter trigger -->\n <button\n type=\"button\"\n class=\"c-add-filter\"\n [matMenuTriggerFor]=\"addPicker.menu()\"\n [disabled]=\"_fields.length === 0 || _used.size >= _fields.length\"\n [matTooltip]=\"_fields.length === 0 ? 'Ch\u01B0a c\u1EA5u h\u00ECnh fields' : 'Th\u00EAm filter'\">\n <mat-icon fontSet=\"material-icons-outlined\">add</mat-icon>\n </button>\n }\n\n </div><!-- /.c-query-bar__main -->\n\n <!-- Field picker \u2014 list available fields, fade ones already in use. -->\n <sd-query-field-picker\n #addPicker\n [fields]=\"_fields\"\n [usedKeys]=\"_used\"\n (pick)=\"mode() === 'inline' ? beginBuild($event) : addFilter($event)\" />\n\n <sd-query-actions-bar\n [showLogicToggle]=\"showLogicToggle()\"\n [(logic)]=\"logic\"\n [filtersCount]=\"_filters.length\"\n [showSavedFilters]=\"showSavedFilters()\"\n [savedFiltersKey]=\"savedFiltersKey()\"\n [query]=\"currentQuery()\"\n (applyFilter)=\"onApplyFilter($event)\"\n [showClearAll]=\"showClearAll()\"\n [canSearch]=\"canSearch()\"\n (clear)=\"clearAll()\"\n (search)=\"triggerApply()\" />\n</div>\n", styles: [":host{display:block;font-family:Roboto,system-ui,sans-serif}.c-query-bar{display:flex;align-items:flex-start;flex-wrap:nowrap;gap:8px;background:#fff;border:1px solid #e2e4e7;border-radius:8px;box-shadow:0 1px 2px #0f172a0a}.c-query-bar.c-density-compact{padding:8px}.c-query-bar.c-density-comfortable{padding:10px}.c-query-bar__main{flex:1 1 auto;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px}.c-search{display:flex;align-items:center;gap:6px;min-width:220px;padding:0 10px;border:1px solid #d6d8db;border-radius:6px;background:#fff}.c-density-compact .c-search{height:28px}.c-density-comfortable .c-search{height:32px}.c-search .c-search-icon{font-size:16px;width:16px;height:16px;color:#7a7a7a}.c-search .c-search-input{flex:1;border:none;outline:none;background:transparent;font-size:13px;color:#212121}.c-search .c-search-input::placeholder{color:#7a7a7a}.c-search .c-search-kbd{font-family:Roboto Mono,monospace;font-size:10px;padding:1px 4px;border:1px solid #e2e4e7;border-radius:3px;color:#7a7a7a}.c-divider{width:1px;height:16px;background:#e2e4e7;margin:0 2px}.c-token{display:inline-flex;align-items:center;gap:4px;padding:0 0 0 12px;border:1px solid var(--sd-primary-light);border-radius:999px;background:var(--sd-primary-light);font-size:13px;color:#5f6368;white-space:nowrap;overflow:hidden}.c-density-compact .c-token{height:28px}.c-density-comfortable .c-token{height:32px}.c-token-icon{font-size:14px;width:14px;height:14px;line-height:14px;color:inherit}.c-token-field{font-weight:500;line-height:1}.c-token-op{display:inline-flex;align-items:center;color:inherit}.c-token-op ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-token-op ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}.c-token-value-edit sd-select,.c-token-value-edit sd-date,.c-token-value-edit sd-datetime{display:inline-flex;align-items:center;line-height:1}.c-token ::ng-deep .mat-mdc-form-field{line-height:1}.c-token ::ng-deep .mat-mdc-text-field-wrapper,.c-token ::ng-deep .mat-mdc-form-field-flex{padding:0;min-height:0;background:transparent}.c-token ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}.c-token ::ng-deep .mat-mdc-select-value,.c-token ::ng-deep .mat-mdc-input-element,.c-token ::ng-deep input{line-height:1;font-size:13px;padding:0;height:auto;color:inherit}.c-token ::ng-deep .mat-mdc-select-value{display:inline-flex;align-items:center;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;color:var(--sd-primary);font-weight:500}.c-token ::ng-deep .sd-suffix-icon{display:none}.c-token-sep{color:#7a7a7a}.c-token-dash{color:#7a7a7a;padding:0 4px;line-height:1}.c-token-value{border:none;background:transparent;padding:0;font:inherit;font-weight:500;color:var(--sd-primary);cursor:pointer}.c-token-value:hover{text-decoration:underline}.c-token-value-edit{display:inline-flex;align-items:center;gap:4px;max-width:240px}.c-token-value-edit sd-input,.c-token-value-edit sd-input-number{display:inline-flex;max-width:140px}.c-token-value-edit sd-date-range{display:inline-flex;max-width:220px;min-width:0;flex:0 1 auto}.c-token-multi-head{display:inline-block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.c-token-remove{align-self:stretch;display:inline-flex;align-items:center;justify-content:center;border:none;border-left:1px solid rgba(0,0,0,.04);border-radius:0;background:transparent;cursor:pointer;color:inherit}.c-density-compact .c-token-remove{width:26px}.c-density-comfortable .c-token-remove{width:28px}.c-token-remove mat-icon{font-size:14px;width:14px;height:14px}.c-token-remove:hover{background:#0000000d}.c-add-filter{display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:999px;border:1px dashed #d6d8db;background:transparent;cursor:pointer;color:#5f6368;transition:border-color .12s ease,color .12s ease,background-color .12s ease}.c-density-compact .c-add-filter{width:28px;height:28px}.c-density-comfortable .c-add-filter{width:32px;height:32px}.c-add-filter mat-icon{font-size:18px;width:18px;height:18px}.c-add-filter:hover:not([disabled]){border-color:var(--sd-primary);color:var(--sd-primary)}.c-add-filter[disabled]{opacity:.5;cursor:not-allowed}.c-or-connector{font-family:Roboto Mono,monospace;font-size:10px;font-weight:700;letter-spacing:.6px;color:#7a7a7a;padding:0 2px}::ng-deep .mat-mdc-menu-panel.c-chip-popover{min-width:280px;max-width:320px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #e2e4e7;font-size:13px;font-weight:500;color:#212121}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header mat-icon{font-size:16px;width:16px;height:16px;color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header .c-pop-header-operator{margin-left:auto}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field{display:inline-flex;align-items:center;gap:4px;padding:2px 4px 2px 6px;margin-left:-4px;background:transparent;border:1px solid transparent;border-radius:4px;font:inherit;font-weight:500;color:#212121;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field mat-icon{font-size:14px!important;width:14px!important;height:14px!important;color:#7a7a7a!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field:hover{background:#f5f6f7;border-color:#e2e4e7}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-body{padding:10px 12px;display:flex;flex-direction:column;gap:12px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-input{width:100%;height:32px;padding:0 10px;border:1px solid #d6d8db;border-radius:6px;background:#fff;font-family:inherit;font-size:13px;color:#212121;outline:none}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-input:focus{border-color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-between{display:grid;grid-template-columns:1fr 1fr;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean{display:flex;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean button{flex:1;height:32px;border:1px solid #d6d8db;border-radius:6px;background:#fff;font:inherit;font-size:13px;cursor:pointer}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean button.c-pop-boolean-active{background:var(--sd-primary-light);border-color:var(--sd-primary);color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values{max-height:220px;overflow-y:auto;margin:0;padding:0;list-style:none}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:4px;font-size:13px;cursor:pointer;-webkit-user-select:none;user-select:none}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li:hover{background:#f5f6f7}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li.c-pop-value-selected{background:var(--sd-primary-light);color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li input[type=checkbox],::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li input[type=radio]{accent-color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values-loading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values-empty{padding:10px 8px;font-size:12px;color:#7a7a7a}.c-bool-toggle{display:inline-flex;align-items:center;gap:4px}.c-bool-toggle ::ng-deep .mdc-button,.c-bool-toggle ::ng-deep button[mat-button],.c-bool-toggle ::ng-deep button[mat-stroked-button],.c-bool-toggle ::ng-deep button[mat-flat-button]{border-radius:999px;min-width:0;padding:0 12px}\n", ".c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__leading,.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__notch,.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__trailing{border-color:#d6d8db!important;transition:border-color .12s ease}.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__leading{border-radius:6px 0 0 6px!important}.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__trailing{border-radius:0 6px 6px 0!important}.c-query-bar ::ng-deep .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__leading,.c-query-bar ::ng-deep .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__notch,.c-query-bar ::ng-deep .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__trailing{border-color:#b9bdc3!important}.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mdc-notched-outline__leading,.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mdc-notched-outline__notch,.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mdc-notched-outline__trailing{border-color:var(--sd-primary)!important;border-width:1px!important}.c-query-bar ::ng-deep .mat-mdc-form-field .mat-mdc-select-arrow,.c-query-bar ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-icon-suffix .mat-icon{color:#5f6368}.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__trailing{border-color:#d6d8db!important;transition:border-color .12s ease}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__leading{border-radius:6px 0 0 6px!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__trailing{border-radius:0 6px 6px 0!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__trailing{border-color:#b9bdc3!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mdc-notched-outline__trailing{border-color:var(--sd-primary)!important;border-width:1px!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mat-mdc-select-arrow,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mat-mdc-form-field-icon-suffix .mat-icon,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mat-mdc-select-arrow,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mat-mdc-form-field-icon-suffix .mat-icon{color:#5f6368}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mat-mdc-select-arrow,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--sd-primary)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "directive", type: i1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdQueryActionsBar, selector: "sd-query-actions-bar", inputs: ["showLogicToggle", "logic", "filtersCount", "showSavedFilters", "savedFiltersKey", "query", "showClearAll", "canSearch"], outputs: ["logicChange", "applyFilter", "clear", "search"] }, { kind: "component", type: SdQueryBuildChip, selector: "sd-query-build-chip", inputs: ["building", "density", "allowedOperators", "multiple", "showOperator", "autoId"], outputs: ["pickOperator", "commitValue", "cancel", "seamlessCommit", "draftChange", "draftCommit"] }, { kind: "component", type: SdQueryChipPopover, selector: "sd-query-chip-popover", inputs: ["field", "filter", "chipIndex", "autoIdBase", "switchPickerMenu"], outputs: ["commit", "swapField"] }, { kind: "component", type: SdQueryFieldPicker, selector: "sd-query-field-picker", inputs: ["fields", "currentKey", "usedKeys"], outputs: ["pick"] }, { kind: "component", type: SdQueryInlineChip, selector: "sd-query-inline-chip", inputs: ["field", "filter", "density", "multiple", "showOperator", "autoId", "valueText", "isNoData"], outputs: ["commit", "commitRange", "liveChange", "remove"] }, { kind: "component", type: SdQueryInlineValueChip, selector: "sd-query-inline-value-chip", inputs: ["field", "operator", "value", "density", "showOperator", "autoId", "autofocus"], outputs: ["valueChange", "remove"] }, { kind: "component", type: SdQueryPopoverChip, selector: "sd-query-popover-chip", inputs: ["field", "filter", "active", "showOperator", "valueText", "menu"], outputs: ["open", "remove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1405
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1406
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: SdQueryBar, isStandalone: true, selector: "sd-query-bar", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, logic: { classPropertyName: "logic", publicName: "logic", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, showSavedFilters: { classPropertyName: "showSavedFilters", publicName: "showSavedFilters", isSignal: true, isRequired: false, transformFunction: null }, savedFiltersKey: { classPropertyName: "savedFiltersKey", publicName: "savedFiltersKey", isSignal: true, isRequired: false, transformFunction: null }, showLogicToggle: { classPropertyName: "showLogicToggle", publicName: "showLogicToggle", isSignal: true, isRequired: false, transformFunction: null }, showClearAll: { classPropertyName: "showClearAll", publicName: "showClearAll", isSignal: true, isRequired: false, transformFunction: null }, showOperatorOnChip: { classPropertyName: "showOperatorOnChip", publicName: "showOperatorOnChip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filters: "filtersChange", logic: "logicChange", search: "searchChange", queryChange: "queryChange", apply: "apply" }, viewQueries: [{ propertyName: "popoverChips", predicate: SdQueryPopoverChip, descendants: true, isSignal: true }, { propertyName: "buildChip", first: true, predicate: SdQueryBuildChip, descendants: true, isSignal: true }, { propertyName: "chipPopover", first: true, predicate: SdQueryChipPopover, descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n sd-query-bar \u2014 unified filter chip row (Jira/Linear/Notion style).\n Visual spec: refs/design_handoff_sd_query_bar/README.md\n TODO(next-iter): replace inline placeholders for field-picker + chip-popover\n with extracted sub-components driven by CDK overlay.\n-->\n@let _filters = filters();\n@let _fields = fields();\n@let _density = density();\n@let _showOr = showOrConnector();\n@let _used = usedFieldKeys();\n\n<div\n class=\"c-query-bar\"\n [class.c-density-compact]=\"_density === 'compact'\"\n [class.c-density-comfortable]=\"_density === 'comfortable'\">\n\n <!-- Main region \u2014 search + filters + add-filter. Wraps internally; the right\n action toolbar stays anchored and does NOT flow with this. -->\n <div class=\"c-query-bar__main\">\n\n <!-- Free-text search (left, optional) -->\n @if (showSearch()) {\n <div class=\"c-search\">\n <mat-icon class=\"c-search-icon\" fontSet=\"material-icons-outlined\">search</mat-icon>\n <input\n class=\"c-search-input\"\n type=\"text\"\n [ngModel]=\"search()\"\n (ngModelChange)=\"setSearch($event)\"\n (keydown.enter)=\"triggerApply()\"\n placeholder=\"T\u00ECm ki\u1EBFm...\" />\n </div>\n <span class=\"c-divider\" aria-hidden=\"true\"></span>\n }\n\n <!-- Field switcher (used by chipPopover header) \u2014 declared first so chipPopover's\n nested ng-template can resolve the template ref. -->\n <!-- Field switcher used by chipPopover header \u2014 current field key comes from editingIndex. -->\n <sd-query-field-picker\n #switchPicker\n [fields]=\"_fields\"\n [currentKey]=\"editingIndex() !== null ? $any(filters()[editingIndex()!])?.field : undefined\"\n (pick)=\"editingIndex() !== null && changeFilterField(editingIndex()!, $event)\" />\n\n <!-- Chip popover \u2014 extracted into <sd-query-chip-popover>. Declared BEFORE chips\n so the popover-mode @for chips can bind their [menu] to `chipPopover.menu()`. -->\n <sd-query-chip-popover\n #chipPopover\n [field]=\"editingField() ?? undefined\"\n [filter]=\"editingIndex() !== null ? $any(filters()[editingIndex()!]) : undefined\"\n [chipIndex]=\"editingIndex()\"\n [autoIdBase]=\"autoIdInput() ?? 'qb'\"\n [switchPickerMenu]=\"switchPicker.menu()!\"\n (commit)=\"onChipPopoverCommit($event)\"\n (swapField)=\"editingIndex() !== null && changeFilterField(editingIndex()!, $event)\" />\n\n @if (mode() === 'inline') {\n <!-- ===== INLINE MODE (GitLab-style token builder) ===== -->\n\n <!-- Completed chips -->\n @for (filter of _filters; track $index; let i = $index) {\n @if (_showOr && i > 0) {\n <span class=\"c-or-connector\" aria-hidden=\"true\">OR</span>\n }\n @let _field = fieldByKey()[$any(filter).field];\n @if (_field) {\n @let _op = $any(filter.operator);\n @let _data = $any(filter).data;\n @if (_field.type === 'string' || _field.type === 'number') {\n <!-- Seamless chip \u2014 the pill is the input (string / number). -->\n <sd-query-inline-value-chip\n [field]=\"_field\"\n [operator]=\"_op\"\n [value]=\"_data\"\n [density]=\"_density\"\n [showOperator]=\"showOperatorOnChip()\"\n [autoId]=\"inlineAutoId(i, 'value')\"\n (valueChange)=\"updateFilter(i, { data: $event })\"\n (remove)=\"removeFilter(i)\" />\n } @else {\n <sd-query-inline-chip\n [field]=\"_field\"\n [filter]=\"filter\"\n [density]=\"_density\"\n [multiple]=\"multiple(_op)\"\n [showOperator]=\"showOperatorOnChip()\"\n [autoId]=\"inlineAutoId(i, 'value')\"\n [valueText]=\"chipValueText(filter)\"\n [isNoData]=\"isNoDataOperator(_op)\"\n (commit)=\"updateFilter(i, { data: $event })\"\n (commitRange)=\"setFilterRange(i, $event)\"\n (liveChange)=\"updateFilter(i, { data: $event })\"\n (remove)=\"removeFilter(i)\" />\n }\n }\n }\n\n <!-- Building chip (in-progress) \u2014 extracted into <sd-query-build-chip>. -->\n @if (building(); as _b) {\n <sd-query-build-chip\n [building]=\"_b\"\n [density]=\"_density\"\n [allowedOperators]=\"allowedOperatorsFor(_b.field)\"\n [multiple]=\"multiple($any(_b.operator))\"\n [showOperator]=\"showOperatorOnChip()\"\n (pickOperator)=\"pickBuildOperator($any($event))\"\n (commitValue)=\"commitBuildValue($event)\"\n (cancel)=\"cancelBuild()\"\n (seamlessCommit)=\"onBuildSeamlessCommit($event)\" />\n }\n\n <!-- Add filter -->\n <button\n type=\"button\"\n class=\"c-add-filter\"\n [matMenuTriggerFor]=\"addPicker.menu()\"\n [disabled]=\"_fields.length === 0 || _used.size >= _fields.length\"\n [matTooltip]=\"_fields.length === 0 ? 'Ch\u01B0a c\u1EA5u h\u00ECnh fields' : 'Th\u00EAm filter'\">\n <mat-icon fontSet=\"material-icons-outlined\">add</mat-icon>\n </button>\n } @else {\n <!-- ===== POPOVER MODE (default) \u2014 compact chips edited via mat-menu ===== -->\n @for (filter of _filters; track $index; let i = $index) {\n @if (_showOr && i > 0) {\n <span class=\"c-or-connector\" aria-hidden=\"true\">OR</span>\n }\n @let _field = fieldByKey()[$any(filter).field];\n @let _active = isFilterActive(filter);\n <!-- why: menu close commit is handled by chipPopover's (commit) \u2192\n onChipPopoverCommit; popover-chip only signals open + remove here. -->\n <sd-query-popover-chip\n [field]=\"_field\"\n [filter]=\"filter\"\n [active]=\"_active\"\n [showOperator]=\"showOperatorOnChip()\"\n [valueText]=\"chipValueText(filter)\"\n [menu]=\"chipPopover.menu()!\"\n (open)=\"openChipPopover(i)\"\n (remove)=\"removeFilter(i)\" />\n }\n\n <!-- Add filter trigger -->\n <button\n type=\"button\"\n class=\"c-add-filter\"\n [matMenuTriggerFor]=\"addPicker.menu()\"\n [disabled]=\"_fields.length === 0 || _used.size >= _fields.length\"\n [matTooltip]=\"_fields.length === 0 ? 'Ch\u01B0a c\u1EA5u h\u00ECnh fields' : 'Th\u00EAm filter'\">\n <mat-icon fontSet=\"material-icons-outlined\">add</mat-icon>\n </button>\n }\n\n </div><!-- /.c-query-bar__main -->\n\n <!-- Field picker \u2014 list available fields, fade ones already in use. -->\n <sd-query-field-picker\n #addPicker\n [fields]=\"_fields\"\n [usedKeys]=\"_used\"\n (pick)=\"mode() === 'inline' ? beginBuild($event) : addFilter($event)\" />\n\n <sd-query-actions-bar\n [showLogicToggle]=\"showLogicToggle()\"\n [(logic)]=\"logic\"\n [filtersCount]=\"_filters.length\"\n [showSavedFilters]=\"showSavedFilters()\"\n [savedFiltersKey]=\"savedFiltersKey()\"\n [query]=\"currentQuery()\"\n (applyFilter)=\"onApplyFilter($event)\"\n [showClearAll]=\"showClearAll()\"\n [canSearch]=\"canSearch()\"\n (clear)=\"clearAll()\"\n (search)=\"triggerApply()\" />\n</div>\n", styles: [":host{display:block;font-family:Roboto,system-ui,sans-serif}.c-query-bar{display:flex;align-items:flex-start;flex-wrap:nowrap;gap:8px;background:#fff;border:1px solid #e2e4e7;border-radius:8px;box-shadow:0 1px 2px #0f172a0a}.c-query-bar.c-density-compact{padding:8px}.c-query-bar.c-density-comfortable{padding:10px}.c-query-bar__main{flex:1 1 auto;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px}.c-search{display:flex;align-items:center;gap:6px;min-width:220px;padding:0 10px;border:1px solid #d6d8db;border-radius:6px;background:#fff}.c-density-compact .c-search{height:28px}.c-density-comfortable .c-search{height:32px}.c-search .c-search-icon{font-size:16px;width:16px;height:16px;color:#7a7a7a}.c-search .c-search-input{flex:1;border:none;outline:none;background:transparent;font-size:13px;color:#212121}.c-search .c-search-input::placeholder{color:#7a7a7a}.c-search .c-search-kbd{font-family:Roboto Mono,monospace;font-size:10px;padding:1px 4px;border:1px solid #e2e4e7;border-radius:3px;color:#7a7a7a}.c-divider{width:1px;height:16px;background:#e2e4e7;margin:0 2px}.c-token{display:inline-flex;align-items:center;gap:4px;padding:0 0 0 12px;border:1px solid var(--sd-primary-light);border-radius:999px;background:var(--sd-primary-light);font-size:13px;color:#5f6368;white-space:nowrap;overflow:hidden}.c-density-compact .c-token{height:28px}.c-density-comfortable .c-token{height:32px}.c-token-icon{font-size:14px;width:14px;height:14px;line-height:14px;color:inherit}.c-token-field{font-weight:500;line-height:1}.c-token-op{display:inline-flex;align-items:center;color:inherit}.c-token-op ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-token-op ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}.c-token-value-edit sd-select,.c-token-value-edit sd-date,.c-token-value-edit sd-datetime{display:inline-flex;align-items:center;line-height:1}.c-token ::ng-deep .mat-mdc-form-field{line-height:1}.c-token ::ng-deep .mat-mdc-text-field-wrapper,.c-token ::ng-deep .mat-mdc-form-field-flex{padding:0;min-height:0;background:transparent}.c-token ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}.c-token ::ng-deep .mat-mdc-select-value,.c-token ::ng-deep .mat-mdc-input-element,.c-token ::ng-deep input{line-height:1;font-size:13px;padding:0;height:auto;color:inherit}.c-token ::ng-deep .mat-mdc-select-value{display:inline-flex;align-items:center;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;color:var(--sd-primary);font-weight:500}.c-token ::ng-deep .sd-suffix-icon{display:none}.c-token-sep{color:#7a7a7a}.c-token-dash{color:#7a7a7a;padding:0 4px;line-height:1}.c-token-value{border:none;background:transparent;padding:0;font:inherit;font-weight:500;color:var(--sd-primary);cursor:pointer}.c-token-value:hover{text-decoration:underline}.c-token-value-edit{display:inline-flex;align-items:center;gap:4px;max-width:240px}.c-token-value-edit sd-input,.c-token-value-edit sd-input-number{display:inline-flex;max-width:140px}.c-token-value-edit sd-date-range{display:inline-flex;max-width:220px;min-width:0;flex:0 1 auto}.c-token-multi-head{display:inline-block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.c-token-remove{align-self:stretch;display:inline-flex;align-items:center;justify-content:center;border:none;border-left:1px solid rgba(0,0,0,.04);border-radius:0;background:transparent;cursor:pointer;color:inherit}.c-density-compact .c-token-remove{width:26px}.c-density-comfortable .c-token-remove{width:28px}.c-token-remove mat-icon{font-size:14px;width:14px;height:14px}.c-token-remove:hover{background:#0000000d}.c-add-filter{display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:999px;border:1px dashed #d6d8db;background:transparent;cursor:pointer;color:#5f6368;transition:border-color .12s ease,color .12s ease,background-color .12s ease}.c-density-compact .c-add-filter{width:28px;height:28px}.c-density-comfortable .c-add-filter{width:32px;height:32px}.c-add-filter mat-icon{font-size:18px;width:18px;height:18px}.c-add-filter:hover:not([disabled]){border-color:var(--sd-primary);color:var(--sd-primary)}.c-add-filter[disabled]{opacity:.5;cursor:not-allowed}.c-or-connector{font-family:Roboto Mono,monospace;font-size:10px;font-weight:700;letter-spacing:.6px;color:#7a7a7a;padding:0 2px}::ng-deep .mat-mdc-menu-panel.c-chip-popover{min-width:280px;max-width:320px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #e2e4e7;font-size:13px;font-weight:500;color:#212121}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header mat-icon{font-size:16px;width:16px;height:16px;color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header .c-pop-header-operator{margin-left:auto}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field{display:inline-flex;align-items:center;gap:4px;padding:2px 4px 2px 6px;margin-left:-4px;background:transparent;border:1px solid transparent;border-radius:4px;font:inherit;font-weight:500;color:#212121;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field mat-icon{font-size:14px!important;width:14px!important;height:14px!important;color:#7a7a7a!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field:hover{background:#f5f6f7;border-color:#e2e4e7}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-body{padding:10px 12px;display:flex;flex-direction:column;gap:12px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-input{width:100%;height:32px;padding:0 10px;border:1px solid #d6d8db;border-radius:6px;background:#fff;font-family:inherit;font-size:13px;color:#212121;outline:none}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-input:focus{border-color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-between{display:grid;grid-template-columns:1fr 1fr;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean{display:flex;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean button{flex:1;height:32px;border:1px solid #d6d8db;border-radius:6px;background:#fff;font:inherit;font-size:13px;cursor:pointer}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean button.c-pop-boolean-active{background:var(--sd-primary-light);border-color:var(--sd-primary);color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values{max-height:220px;overflow-y:auto;margin:0;padding:0;list-style:none}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:4px;font-size:13px;cursor:pointer;-webkit-user-select:none;user-select:none}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li:hover{background:#f5f6f7}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li.c-pop-value-selected{background:var(--sd-primary-light);color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li input[type=checkbox],::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li input[type=radio]{accent-color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values-loading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values-empty{padding:10px 8px;font-size:12px;color:#7a7a7a}.c-bool-toggle{display:inline-flex;align-items:center;gap:4px}.c-bool-toggle ::ng-deep .mdc-button,.c-bool-toggle ::ng-deep button[mat-button],.c-bool-toggle ::ng-deep button[mat-stroked-button],.c-bool-toggle ::ng-deep button[mat-flat-button]{border-radius:999px;min-width:0;padding:0 12px}\n", ".c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__leading,.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__notch,.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__trailing{border-color:#d6d8db!important;transition:border-color .12s ease}.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__leading{border-radius:6px 0 0 6px!important}.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__trailing{border-radius:0 6px 6px 0!important}.c-query-bar ::ng-deep .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__leading,.c-query-bar ::ng-deep .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__notch,.c-query-bar ::ng-deep .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__trailing{border-color:#b9bdc3!important}.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mdc-notched-outline__leading,.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mdc-notched-outline__notch,.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mdc-notched-outline__trailing{border-color:var(--sd-primary)!important;border-width:1px!important}.c-query-bar ::ng-deep .mat-mdc-form-field .mat-mdc-select-arrow,.c-query-bar ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-icon-suffix .mat-icon{color:#5f6368}.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__trailing{border-color:#d6d8db!important;transition:border-color .12s ease}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__leading{border-radius:6px 0 0 6px!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__trailing{border-radius:0 6px 6px 0!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__trailing{border-color:#b9bdc3!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mdc-notched-outline__trailing{border-color:var(--sd-primary)!important;border-width:1px!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mat-mdc-select-arrow,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mat-mdc-form-field-icon-suffix .mat-icon,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mat-mdc-select-arrow,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mat-mdc-form-field-icon-suffix .mat-icon{color:#5f6368}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mat-mdc-select-arrow,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--sd-primary)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "directive", type: i1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdQueryActionsBar, selector: "sd-query-actions-bar", inputs: ["showLogicToggle", "logic", "filtersCount", "showSavedFilters", "savedFiltersKey", "query", "showClearAll", "canSearch"], outputs: ["logicChange", "applyFilter", "clear", "search"] }, { kind: "component", type: SdQueryBuildChip, selector: "sd-query-build-chip", inputs: ["building", "density", "allowedOperators", "multiple", "showOperator", "autoId"], outputs: ["pickOperator", "commitValue", "cancel", "seamlessCommit", "draftChange", "draftCommit"] }, { kind: "component", type: SdQueryChipPopover, selector: "sd-query-chip-popover", inputs: ["field", "filter", "chipIndex", "autoIdBase", "switchPickerMenu"], outputs: ["commit", "swapField"] }, { kind: "component", type: SdQueryFieldPicker, selector: "sd-query-field-picker", inputs: ["fields", "currentKey", "usedKeys"], outputs: ["pick"] }, { kind: "component", type: SdQueryInlineChip, selector: "sd-query-inline-chip", inputs: ["field", "filter", "density", "multiple", "showOperator", "autoId", "valueText", "isNoData"], outputs: ["commit", "commitRange", "liveChange", "remove"] }, { kind: "component", type: SdQueryInlineValueChip, selector: "sd-query-inline-value-chip", inputs: ["field", "operator", "value", "density", "showOperator", "autoId", "autofocus"], outputs: ["valueChange", "remove"] }, { kind: "component", type: SdQueryPopoverChip, selector: "sd-query-popover-chip", inputs: ["field", "filter", "active", "showOperator", "valueText", "menu"], outputs: ["open", "remove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1406
1407
|
}
|
|
1407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: SdQueryBar, decorators: [{
|
|
1408
1409
|
type: Component,
|
|
1409
1410
|
args: [{ selector: 'sd-query-bar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1410
1411
|
CommonModule,
|
|
@@ -1420,7 +1421,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
1420
1421
|
SdQueryInlineValueChip,
|
|
1421
1422
|
SdQueryPopoverChip,
|
|
1422
1423
|
], template: "<!--\n sd-query-bar \u2014 unified filter chip row (Jira/Linear/Notion style).\n Visual spec: refs/design_handoff_sd_query_bar/README.md\n TODO(next-iter): replace inline placeholders for field-picker + chip-popover\n with extracted sub-components driven by CDK overlay.\n-->\n@let _filters = filters();\n@let _fields = fields();\n@let _density = density();\n@let _showOr = showOrConnector();\n@let _used = usedFieldKeys();\n\n<div\n class=\"c-query-bar\"\n [class.c-density-compact]=\"_density === 'compact'\"\n [class.c-density-comfortable]=\"_density === 'comfortable'\">\n\n <!-- Main region \u2014 search + filters + add-filter. Wraps internally; the right\n action toolbar stays anchored and does NOT flow with this. -->\n <div class=\"c-query-bar__main\">\n\n <!-- Free-text search (left, optional) -->\n @if (showSearch()) {\n <div class=\"c-search\">\n <mat-icon class=\"c-search-icon\" fontSet=\"material-icons-outlined\">search</mat-icon>\n <input\n class=\"c-search-input\"\n type=\"text\"\n [ngModel]=\"search()\"\n (ngModelChange)=\"setSearch($event)\"\n (keydown.enter)=\"triggerApply()\"\n placeholder=\"T\u00ECm ki\u1EBFm...\" />\n </div>\n <span class=\"c-divider\" aria-hidden=\"true\"></span>\n }\n\n <!-- Field switcher (used by chipPopover header) \u2014 declared first so chipPopover's\n nested ng-template can resolve the template ref. -->\n <!-- Field switcher used by chipPopover header \u2014 current field key comes from editingIndex. -->\n <sd-query-field-picker\n #switchPicker\n [fields]=\"_fields\"\n [currentKey]=\"editingIndex() !== null ? $any(filters()[editingIndex()!])?.field : undefined\"\n (pick)=\"editingIndex() !== null && changeFilterField(editingIndex()!, $event)\" />\n\n <!-- Chip popover \u2014 extracted into <sd-query-chip-popover>. Declared BEFORE chips\n so the popover-mode @for chips can bind their [menu] to `chipPopover.menu()`. -->\n <sd-query-chip-popover\n #chipPopover\n [field]=\"editingField() ?? undefined\"\n [filter]=\"editingIndex() !== null ? $any(filters()[editingIndex()!]) : undefined\"\n [chipIndex]=\"editingIndex()\"\n [autoIdBase]=\"autoIdInput() ?? 'qb'\"\n [switchPickerMenu]=\"switchPicker.menu()!\"\n (commit)=\"onChipPopoverCommit($event)\"\n (swapField)=\"editingIndex() !== null && changeFilterField(editingIndex()!, $event)\" />\n\n @if (mode() === 'inline') {\n <!-- ===== INLINE MODE (GitLab-style token builder) ===== -->\n\n <!-- Completed chips -->\n @for (filter of _filters; track $index; let i = $index) {\n @if (_showOr && i > 0) {\n <span class=\"c-or-connector\" aria-hidden=\"true\">OR</span>\n }\n @let _field = fieldByKey()[$any(filter).field];\n @if (_field) {\n @let _op = $any(filter.operator);\n @let _data = $any(filter).data;\n @if (_field.type === 'string' || _field.type === 'number') {\n <!-- Seamless chip \u2014 the pill is the input (string / number). -->\n <sd-query-inline-value-chip\n [field]=\"_field\"\n [operator]=\"_op\"\n [value]=\"_data\"\n [density]=\"_density\"\n [showOperator]=\"showOperatorOnChip()\"\n [autoId]=\"inlineAutoId(i, 'value')\"\n (valueChange)=\"updateFilter(i, { data: $event })\"\n (remove)=\"removeFilter(i)\" />\n } @else {\n <sd-query-inline-chip\n [field]=\"_field\"\n [filter]=\"filter\"\n [density]=\"_density\"\n [multiple]=\"multiple(_op)\"\n [showOperator]=\"showOperatorOnChip()\"\n [autoId]=\"inlineAutoId(i, 'value')\"\n [valueText]=\"chipValueText(filter)\"\n [isNoData]=\"isNoDataOperator(_op)\"\n (commit)=\"updateFilter(i, { data: $event })\"\n (commitRange)=\"setFilterRange(i, $event)\"\n (liveChange)=\"updateFilter(i, { data: $event })\"\n (remove)=\"removeFilter(i)\" />\n }\n }\n }\n\n <!-- Building chip (in-progress) \u2014 extracted into <sd-query-build-chip>. -->\n @if (building(); as _b) {\n <sd-query-build-chip\n [building]=\"_b\"\n [density]=\"_density\"\n [allowedOperators]=\"allowedOperatorsFor(_b.field)\"\n [multiple]=\"multiple($any(_b.operator))\"\n [showOperator]=\"showOperatorOnChip()\"\n (pickOperator)=\"pickBuildOperator($any($event))\"\n (commitValue)=\"commitBuildValue($event)\"\n (cancel)=\"cancelBuild()\"\n (seamlessCommit)=\"onBuildSeamlessCommit($event)\" />\n }\n\n <!-- Add filter -->\n <button\n type=\"button\"\n class=\"c-add-filter\"\n [matMenuTriggerFor]=\"addPicker.menu()\"\n [disabled]=\"_fields.length === 0 || _used.size >= _fields.length\"\n [matTooltip]=\"_fields.length === 0 ? 'Ch\u01B0a c\u1EA5u h\u00ECnh fields' : 'Th\u00EAm filter'\">\n <mat-icon fontSet=\"material-icons-outlined\">add</mat-icon>\n </button>\n } @else {\n <!-- ===== POPOVER MODE (default) \u2014 compact chips edited via mat-menu ===== -->\n @for (filter of _filters; track $index; let i = $index) {\n @if (_showOr && i > 0) {\n <span class=\"c-or-connector\" aria-hidden=\"true\">OR</span>\n }\n @let _field = fieldByKey()[$any(filter).field];\n @let _active = isFilterActive(filter);\n <!-- why: menu close commit is handled by chipPopover's (commit) \u2192\n onChipPopoverCommit; popover-chip only signals open + remove here. -->\n <sd-query-popover-chip\n [field]=\"_field\"\n [filter]=\"filter\"\n [active]=\"_active\"\n [showOperator]=\"showOperatorOnChip()\"\n [valueText]=\"chipValueText(filter)\"\n [menu]=\"chipPopover.menu()!\"\n (open)=\"openChipPopover(i)\"\n (remove)=\"removeFilter(i)\" />\n }\n\n <!-- Add filter trigger -->\n <button\n type=\"button\"\n class=\"c-add-filter\"\n [matMenuTriggerFor]=\"addPicker.menu()\"\n [disabled]=\"_fields.length === 0 || _used.size >= _fields.length\"\n [matTooltip]=\"_fields.length === 0 ? 'Ch\u01B0a c\u1EA5u h\u00ECnh fields' : 'Th\u00EAm filter'\">\n <mat-icon fontSet=\"material-icons-outlined\">add</mat-icon>\n </button>\n }\n\n </div><!-- /.c-query-bar__main -->\n\n <!-- Field picker \u2014 list available fields, fade ones already in use. -->\n <sd-query-field-picker\n #addPicker\n [fields]=\"_fields\"\n [usedKeys]=\"_used\"\n (pick)=\"mode() === 'inline' ? beginBuild($event) : addFilter($event)\" />\n\n <sd-query-actions-bar\n [showLogicToggle]=\"showLogicToggle()\"\n [(logic)]=\"logic\"\n [filtersCount]=\"_filters.length\"\n [showSavedFilters]=\"showSavedFilters()\"\n [savedFiltersKey]=\"savedFiltersKey()\"\n [query]=\"currentQuery()\"\n (applyFilter)=\"onApplyFilter($event)\"\n [showClearAll]=\"showClearAll()\"\n [canSearch]=\"canSearch()\"\n (clear)=\"clearAll()\"\n (search)=\"triggerApply()\" />\n</div>\n", styles: [":host{display:block;font-family:Roboto,system-ui,sans-serif}.c-query-bar{display:flex;align-items:flex-start;flex-wrap:nowrap;gap:8px;background:#fff;border:1px solid #e2e4e7;border-radius:8px;box-shadow:0 1px 2px #0f172a0a}.c-query-bar.c-density-compact{padding:8px}.c-query-bar.c-density-comfortable{padding:10px}.c-query-bar__main{flex:1 1 auto;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px}.c-search{display:flex;align-items:center;gap:6px;min-width:220px;padding:0 10px;border:1px solid #d6d8db;border-radius:6px;background:#fff}.c-density-compact .c-search{height:28px}.c-density-comfortable .c-search{height:32px}.c-search .c-search-icon{font-size:16px;width:16px;height:16px;color:#7a7a7a}.c-search .c-search-input{flex:1;border:none;outline:none;background:transparent;font-size:13px;color:#212121}.c-search .c-search-input::placeholder{color:#7a7a7a}.c-search .c-search-kbd{font-family:Roboto Mono,monospace;font-size:10px;padding:1px 4px;border:1px solid #e2e4e7;border-radius:3px;color:#7a7a7a}.c-divider{width:1px;height:16px;background:#e2e4e7;margin:0 2px}.c-token{display:inline-flex;align-items:center;gap:4px;padding:0 0 0 12px;border:1px solid var(--sd-primary-light);border-radius:999px;background:var(--sd-primary-light);font-size:13px;color:#5f6368;white-space:nowrap;overflow:hidden}.c-density-compact .c-token{height:28px}.c-density-comfortable .c-token{height:32px}.c-token-icon{font-size:14px;width:14px;height:14px;line-height:14px;color:inherit}.c-token-field{font-weight:500;line-height:1}.c-token-op{display:inline-flex;align-items:center;color:inherit}.c-token-op ::ng-deep .c-op-trigger{padding:0;color:inherit}.c-token-op ::ng-deep .c-op-icon svg{width:14px;height:14px;display:block}.c-token-value-edit sd-select,.c-token-value-edit sd-date,.c-token-value-edit sd-datetime{display:inline-flex;align-items:center;line-height:1}.c-token ::ng-deep .mat-mdc-form-field{line-height:1}.c-token ::ng-deep .mat-mdc-text-field-wrapper,.c-token ::ng-deep .mat-mdc-form-field-flex{padding:0;min-height:0;background:transparent}.c-token ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}.c-token ::ng-deep .mat-mdc-select-value,.c-token ::ng-deep .mat-mdc-input-element,.c-token ::ng-deep input{line-height:1;font-size:13px;padding:0;height:auto;color:inherit}.c-token ::ng-deep .mat-mdc-select-value{display:inline-flex;align-items:center;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;color:var(--sd-primary);font-weight:500}.c-token ::ng-deep .sd-suffix-icon{display:none}.c-token-sep{color:#7a7a7a}.c-token-dash{color:#7a7a7a;padding:0 4px;line-height:1}.c-token-value{border:none;background:transparent;padding:0;font:inherit;font-weight:500;color:var(--sd-primary);cursor:pointer}.c-token-value:hover{text-decoration:underline}.c-token-value-edit{display:inline-flex;align-items:center;gap:4px;max-width:240px}.c-token-value-edit sd-input,.c-token-value-edit sd-input-number{display:inline-flex;max-width:140px}.c-token-value-edit sd-date-range{display:inline-flex;max-width:220px;min-width:0;flex:0 1 auto}.c-token-multi-head{display:inline-block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.c-token-remove{align-self:stretch;display:inline-flex;align-items:center;justify-content:center;border:none;border-left:1px solid rgba(0,0,0,.04);border-radius:0;background:transparent;cursor:pointer;color:inherit}.c-density-compact .c-token-remove{width:26px}.c-density-comfortable .c-token-remove{width:28px}.c-token-remove mat-icon{font-size:14px;width:14px;height:14px}.c-token-remove:hover{background:#0000000d}.c-add-filter{display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:999px;border:1px dashed #d6d8db;background:transparent;cursor:pointer;color:#5f6368;transition:border-color .12s ease,color .12s ease,background-color .12s ease}.c-density-compact .c-add-filter{width:28px;height:28px}.c-density-comfortable .c-add-filter{width:32px;height:32px}.c-add-filter mat-icon{font-size:18px;width:18px;height:18px}.c-add-filter:hover:not([disabled]){border-color:var(--sd-primary);color:var(--sd-primary)}.c-add-filter[disabled]{opacity:.5;cursor:not-allowed}.c-or-connector{font-family:Roboto Mono,monospace;font-size:10px;font-weight:700;letter-spacing:.6px;color:#7a7a7a;padding:0 2px}::ng-deep .mat-mdc-menu-panel.c-chip-popover{min-width:280px;max-width:320px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #e2e4e7;font-size:13px;font-weight:500;color:#212121}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header mat-icon{font-size:16px;width:16px;height:16px;color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header .c-pop-header-operator{margin-left:auto}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field{display:inline-flex;align-items:center;gap:4px;padding:2px 4px 2px 6px;margin-left:-4px;background:transparent;border:1px solid transparent;border-radius:4px;font:inherit;font-weight:500;color:#212121;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field mat-icon{font-size:14px!important;width:14px!important;height:14px!important;color:#7a7a7a!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-header-field:hover{background:#f5f6f7;border-color:#e2e4e7}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-body{padding:10px 12px;display:flex;flex-direction:column;gap:12px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-input{width:100%;height:32px;padding:0 10px;border:1px solid #d6d8db;border-radius:6px;background:#fff;font-family:inherit;font-size:13px;color:#212121;outline:none}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-input:focus{border-color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-between{display:grid;grid-template-columns:1fr 1fr;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean{display:flex;gap:8px}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean button{flex:1;height:32px;border:1px solid #d6d8db;border-radius:6px;background:#fff;font:inherit;font-size:13px;cursor:pointer}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-boolean button.c-pop-boolean-active{background:var(--sd-primary-light);border-color:var(--sd-primary);color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values{max-height:220px;overflow-y:auto;margin:0;padding:0;list-style:none}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:4px;font-size:13px;cursor:pointer;-webkit-user-select:none;user-select:none}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li:hover{background:#f5f6f7}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li.c-pop-value-selected{background:var(--sd-primary-light);color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li input[type=checkbox],::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values li input[type=radio]{accent-color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values-loading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .c-pop-values-empty{padding:10px 8px;font-size:12px;color:#7a7a7a}.c-bool-toggle{display:inline-flex;align-items:center;gap:4px}.c-bool-toggle ::ng-deep .mdc-button,.c-bool-toggle ::ng-deep button[mat-button],.c-bool-toggle ::ng-deep button[mat-stroked-button],.c-bool-toggle ::ng-deep button[mat-flat-button]{border-radius:999px;min-width:0;padding:0 12px}\n", ".c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__leading,.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__notch,.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__trailing{border-color:#d6d8db!important;transition:border-color .12s ease}.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__leading{border-radius:6px 0 0 6px!important}.c-query-bar ::ng-deep .mat-mdc-form-field .mdc-notched-outline__trailing{border-radius:0 6px 6px 0!important}.c-query-bar ::ng-deep .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__leading,.c-query-bar ::ng-deep .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__notch,.c-query-bar ::ng-deep .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__trailing{border-color:#b9bdc3!important}.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mdc-notched-outline__leading,.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mdc-notched-outline__notch,.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mdc-notched-outline__trailing{border-color:var(--sd-primary)!important;border-width:1px!important}.c-query-bar ::ng-deep .mat-mdc-form-field .mat-mdc-select-arrow,.c-query-bar ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-icon-suffix .mat-icon{color:#5f6368}.c-query-bar ::ng-deep .mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--sd-primary)}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__trailing{border-color:#d6d8db!important;transition:border-color .12s ease}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__leading{border-radius:6px 0 0 6px!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mdc-notched-outline__trailing{border-radius:0 6px 6px 0!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field:hover:not(.mat-focused):not(.mat-form-field-disabled) .mdc-notched-outline__trailing{border-color:#b9bdc3!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mdc-notched-outline__trailing,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mdc-notched-outline__leading,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mdc-notched-outline__notch,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mdc-notched-outline__trailing{border-color:var(--sd-primary)!important;border-width:1px!important}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mat-mdc-select-arrow,::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field .mat-mdc-form-field-icon-suffix .mat-icon,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mat-mdc-select-arrow,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field .mat-mdc-form-field-icon-suffix .mat-icon{color:#5f6368}::ng-deep .mat-mdc-menu-panel.c-chip-popover .mat-mdc-form-field.mat-focused .mat-mdc-select-arrow,::ng-deep .mat-mdc-menu-panel.c-field-picker-menu .mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--sd-primary)}\n"] }]
|
|
1423
|
-
}] });
|
|
1424
|
+
}], propDecorators: { popoverChips: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => SdQueryPopoverChip), { isSignal: true }] }], buildChip: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdQueryBuildChip), { isSignal: true }] }], chipPopover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdQueryChipPopover), { isSignal: true }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: false }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }, { type: i0.Output, args: ["filtersChange"] }], logic: [{ type: i0.Input, args: [{ isSignal: true, alias: "logic", required: false }] }, { type: i0.Output, args: ["logicChange"] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], showSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSearch", required: false }] }], showSavedFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSavedFilters", required: false }] }], savedFiltersKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "savedFiltersKey", required: false }] }], showLogicToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLogicToggle", required: false }] }], showClearAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearAll", required: false }] }], showOperatorOnChip: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOperatorOnChip", required: false }] }], queryChange: [{ type: i0.Output, args: ["queryChange"] }], apply: [{ type: i0.Output, args: ["apply"] }] } });
|
|
1424
1425
|
|
|
1425
1426
|
/**
|
|
1426
1427
|
* Generated bundle index. Do not edit.
|