@sd-angular/core 1.3.150 → 1.3.151
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/api/sd-angular-core-api.metadata.json +1 -1
- package/api/src/lib/api.service.d.ts +1 -5
- package/assets/img/file-types/eps/001-file.eps +143 -143
- package/assets/img/file-types/eps/002-file-1.eps +136 -136
- package/assets/img/file-types/eps/003-file-2.eps +130 -130
- package/assets/img/file-types/eps/004-file-3.eps +127 -127
- package/assets/img/file-types/eps/005-file-4.eps +120 -120
- package/assets/img/file-types/eps/006-file-5.eps +133 -133
- package/assets/img/file-types/eps/007-file-6.eps +133 -133
- package/assets/img/file-types/eps/008-file-7.eps +144 -144
- package/assets/img/file-types/eps/009-file-8.eps +150 -150
- package/assets/img/file-types/eps/010-file-9.eps +155 -155
- package/assets/img/file-types/eps/011-file-10.eps +124 -124
- package/assets/img/file-types/eps/012-file-11.eps +147 -147
- package/assets/img/file-types/eps/013-file-12.eps +125 -125
- package/assets/img/file-types/eps/014-file-13.eps +129 -129
- package/assets/img/file-types/eps/015-file-14.eps +143 -143
- package/assets/img/file-types/eps/016-file-15.eps +130 -130
- package/assets/img/file-types/eps/017-file-16.eps +197 -197
- package/assets/img/file-types/eps/018-file-17.eps +146 -146
- package/assets/img/file-types/eps/019-file-18.eps +131 -131
- package/assets/img/file-types/eps/020-file-19.eps +137 -137
- package/assets/img/file-types/eps/021-file-20.eps +134 -134
- package/assets/img/file-types/eps/022-file-21.eps +130 -130
- package/assets/img/file-types/eps/023-file-22.eps +161 -161
- package/assets/img/file-types/eps/024-file-23.eps +144 -144
- package/assets/img/file-types/eps/025-file-24.eps +164 -164
- package/assets/img/file-types/eps/026-file-25.eps +135 -135
- package/assets/img/file-types/eps/027-file-26.eps +124 -124
- package/assets/img/file-types/eps/028-file-27.eps +120 -120
- package/assets/img/file-types/eps/029-file-28.eps +141 -141
- package/assets/img/file-types/eps/030-file-29.eps +130 -130
- package/assets/img/file-types/eps/031-file-30.eps +157 -157
- package/assets/img/file-types/eps/032-file-31.eps +139 -139
- package/assets/img/file-types/eps/033-file-32.eps +139 -139
- package/assets/img/file-types/eps/034-file-33.eps +189 -189
- package/assets/img/file-types/eps/035-file-34.eps +162 -162
- package/assets/img/file-types/eps/036-file-35.eps +142 -142
- package/assets/img/file-types/eps/037-file-36.eps +123 -123
- package/assets/img/file-types/eps/038-file-37.eps +127 -127
- package/assets/img/file-types/eps/039-file-38.eps +146 -146
- package/assets/img/file-types/eps/040-file-39.eps +126 -126
- package/assets/img/file-types/eps/041-file-40.eps +117 -117
- package/assets/img/file-types/eps/042-file-41.eps +156 -156
- package/assets/img/file-types/eps/043-file-42.eps +118 -118
- package/assets/img/file-types/eps/044-file-43.eps +172 -172
- package/assets/img/file-types/eps/045-file-44.eps +201 -201
- package/assets/img/file-types/eps/046-file-45.eps +94 -94
- package/assets/img/file-types/eps/047-file-46.eps +176 -176
- package/assets/img/file-types/eps/048-file-47.eps +238 -238
- package/assets/img/file-types/eps/049-file-48.eps +187 -187
- package/assets/img/file-types/eps/050-file-49.eps +137 -137
- package/bundles/sd-angular-core-api.umd.js +27 -59
- package/bundles/sd-angular-core-api.umd.js.map +1 -1
- package/bundles/sd-angular-core-api.umd.min.js +1 -1
- package/bundles/sd-angular-core-api.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-common.umd.js +92 -0
- package/bundles/sd-angular-core-common.umd.js.map +1 -1
- package/bundles/sd-angular-core-common.umd.min.js +1 -1
- package/bundles/sd-angular-core-common.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.js +9 -12
- package/bundles/sd-angular-core-input-dropdown.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.min.js +2 -2
- package/bundles/sd-angular-core-input-dropdown.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-table.umd.js +584 -990
- package/bundles/sd-angular-core-table.umd.js.map +1 -1
- package/bundles/sd-angular-core-table.umd.min.js +1 -1
- package/bundles/sd-angular-core-table.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-utility.umd.js +10 -56
- package/bundles/sd-angular-core-utility.umd.js.map +1 -1
- package/bundles/sd-angular-core-utility.umd.min.js +1 -1
- package/bundles/sd-angular-core-utility.umd.min.js.map +1 -1
- package/common/sd-angular-core-common.d.ts +1 -0
- package/common/sd-angular-core-common.metadata.json +1 -1
- package/common/src/lib/directives/sd-for.directive.d.ts +16 -0
- package/esm2015/api/index.js +1 -1
- package/esm2015/api/sd-angular-core-api.js +1 -1
- package/esm2015/api/src/lib/api.model.js +1 -1
- package/esm2015/api/src/lib/api.module.js +1 -1
- package/esm2015/api/src/lib/api.service.js +3 -36
- package/esm2015/api/src/lib/http.interceptor.js +1 -1
- package/esm2015/api/src/lib/http.service.js +1 -1
- package/esm2015/api/src/lib/token.service.js +1 -1
- package/esm2015/api/src/public-api.js +1 -1
- package/esm2015/autocomplete/index.js +1 -1
- package/esm2015/autocomplete/sd-angular-core-autocomplete.js +1 -1
- package/esm2015/autocomplete/src/lib/autocomplete-display-def.directive.js +1 -1
- package/esm2015/autocomplete/src/lib/autocomplete.component.js +1 -1
- package/esm2015/autocomplete/src/lib/autocomplete.module.js +1 -1
- package/esm2015/autocomplete/src/public-api.js +1 -1
- package/esm2015/badge/index.js +1 -1
- package/esm2015/badge/sd-angular-core-badge.js +1 -1
- package/esm2015/badge/src/lib/badge.component.js +1 -1
- package/esm2015/badge/src/lib/badge.module.js +1 -1
- package/esm2015/badge/src/public-api.js +1 -1
- package/esm2015/button/index.js +1 -1
- package/esm2015/button/sd-angular-core-button.js +1 -1
- package/esm2015/button/src/lib/button.component.js +1 -1
- package/esm2015/button/src/lib/button.module.js +1 -1
- package/esm2015/button/src/public-api.js +1 -1
- package/esm2015/cache/index.js +1 -1
- package/esm2015/cache/sd-angular-core-cache.js +1 -1
- package/esm2015/cache/src/lib/cache.model.js +1 -1
- package/esm2015/cache/src/lib/cache.service.js +1 -1
- package/esm2015/cache/src/public-api.js +1 -1
- package/esm2015/chart/index.js +1 -1
- package/esm2015/chart/sd-angular-core-chart.js +1 -1
- package/esm2015/chart/src/lib/chart.component.js +1 -1
- package/esm2015/chart/src/lib/chart.model.js +1 -1
- package/esm2015/chart/src/lib/chart.module.js +1 -1
- package/esm2015/chart/src/public-api.js +1 -1
- package/esm2015/checkbox/index.js +1 -1
- package/esm2015/checkbox/sd-angular-core-checkbox.js +1 -1
- package/esm2015/checkbox/src/lib/checkbox.component.js +1 -1
- package/esm2015/checkbox/src/lib/checkbox.module.js +1 -1
- package/esm2015/checkbox/src/public-api.js +1 -1
- package/esm2015/chip/index.js +1 -1
- package/esm2015/chip/sd-angular-core-chip.js +1 -1
- package/esm2015/chip/src/lib/chip.component.js +1 -1
- package/esm2015/chip/src/lib/chip.model.js +1 -1
- package/esm2015/chip/src/lib/chip.module.js +1 -1
- package/esm2015/chip/src/lib/directives/sd-chip-display-def.directive.js +1 -1
- package/esm2015/chip/src/lib/pipes/removable-chip.pipe.js +1 -1
- package/esm2015/chip/src/public-api.js +1 -1
- package/esm2015/comment/index.js +1 -1
- package/esm2015/comment/sd-angular-core-comment.js +1 -1
- package/esm2015/comment/src/lib/comment.component.js +1 -1
- package/esm2015/comment/src/lib/comment.model.js +1 -1
- package/esm2015/comment/src/lib/comment.module.js +1 -1
- package/esm2015/comment/src/public-api.js +1 -1
- package/esm2015/common/index.js +1 -1
- package/esm2015/common/sd-angular-core-common.js +2 -1
- package/esm2015/common/src/lib/common.module.js +4 -1
- package/esm2015/common/src/lib/configurations/firebase.configuration.js +1 -1
- package/esm2015/common/src/lib/configurations/form.configuration.js +1 -1
- package/esm2015/common/src/lib/directives/sd-for.directive.js +82 -0
- package/esm2015/common/src/lib/directives/sd-lable.directive.js +1 -1
- package/esm2015/common/src/lib/directives/sd-let.directive.js +1 -1
- package/esm2015/common/src/lib/directives/sd-scroll.directive.js +1 -1
- package/esm2015/common/src/lib/directives/sd-suffix.directive.js +1 -1
- package/esm2015/common/src/lib/directives/view-def.directive.js +1 -1
- package/esm2015/common/src/lib/models/sd-form-control.js +1 -1
- package/esm2015/common/src/lib/others/detectIncognito.js +1 -1
- package/esm2015/common/src/lib/services/browser.service.js +1 -1
- package/esm2015/common/src/lib/typings/array.extension.js +1 -1
- package/esm2015/common/src/lib/typings/date.extension.js +1 -1
- package/esm2015/common/src/lib/typings/index.js +1 -1
- package/esm2015/common/src/lib/typings/number.extension.js +1 -1
- package/esm2015/common/src/lib/typings/string.extension.js +1 -1
- package/esm2015/common/src/lib/typings/utility.extension.js +1 -1
- package/esm2015/common/src/public-api.js +1 -1
- package/esm2015/confirm/index.js +1 -1
- package/esm2015/confirm/sd-angular-core-confirm.js +1 -1
- package/esm2015/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.js +1 -1
- package/esm2015/confirm/src/lib/confirm.module.js +1 -1
- package/esm2015/confirm/src/lib/confirm.service.js +1 -1
- package/esm2015/confirm/src/public-api.js +1 -1
- package/esm2015/date-month/index.js +1 -1
- package/esm2015/date-month/sd-angular-core-date-month.js +1 -1
- package/esm2015/date-month/src/lib/date-month.component.js +1 -1
- package/esm2015/date-month/src/lib/date-month.module.js +1 -1
- package/esm2015/date-month/src/public-api.js +1 -1
- package/esm2015/date-range/index.js +1 -1
- package/esm2015/date-range/sd-angular-core-date-range.js +1 -1
- package/esm2015/date-range/src/lib/date-range.component.js +1 -1
- package/esm2015/date-range/src/lib/date-range.module.js +1 -1
- package/esm2015/date-range/src/public-api.js +1 -1
- package/esm2015/date-time/index.js +1 -1
- package/esm2015/date-time/sd-angular-core-date-time.js +1 -1
- package/esm2015/date-time/src/lib/date-time.component.js +1 -1
- package/esm2015/date-time/src/lib/date-time.module.js +1 -1
- package/esm2015/date-time/src/public-api.js +1 -1
- package/esm2015/db/index.js +1 -1
- package/esm2015/db/sd-angular-core-db.js +1 -1
- package/esm2015/db/src/lib/db.model.js +1 -1
- package/esm2015/db/src/lib/db.service.js +1 -1
- package/esm2015/db/src/public-api.js +1 -1
- package/esm2015/dynamic-report/index.js +1 -1
- package/esm2015/dynamic-report/sd-angular-core-dynamic-report.js +1 -1
- package/esm2015/dynamic-report/src/lib/dynamic-report.component.js +1 -1
- package/esm2015/dynamic-report/src/lib/dynamic-report.module.js +1 -1
- package/esm2015/dynamic-report/src/public-api.js +1 -1
- package/esm2015/editor/index.js +1 -1
- package/esm2015/editor/sd-angular-core-editor.js +1 -1
- package/esm2015/editor/src/lib/constant.js +1 -1
- package/esm2015/editor/src/lib/editor.component.js +1 -1
- package/esm2015/editor/src/lib/editor.model.js +1 -1
- package/esm2015/editor/src/lib/editor.module.js +1 -1
- package/esm2015/editor/src/public-api.js +1 -1
- package/esm2015/export/index.js +1 -1
- package/esm2015/export/sd-angular-core-export.js +1 -1
- package/esm2015/export/src/lib/excel.model.js +1 -1
- package/esm2015/export/src/lib/export.model.js +1 -1
- package/esm2015/export/src/lib/export.service.js +1 -1
- package/esm2015/export/src/public-api.js +1 -1
- package/esm2015/filter/index.js +1 -1
- package/esm2015/filter/sd-angular-core-filter.js +1 -1
- package/esm2015/filter/src/lib/directives/sd-filter-def.directive.js +1 -1
- package/esm2015/filter/src/lib/filter.component.js +1 -1
- package/esm2015/filter/src/lib/filter.model.js +1 -1
- package/esm2015/filter/src/lib/filter.module.js +1 -1
- package/esm2015/filter/src/lib/filter.service.js +1 -1
- package/esm2015/filter/src/lib/pipes/values-local.pipe.js +1 -1
- package/esm2015/filter/src/lib/pipes/values-server.pipe.js +1 -1
- package/esm2015/filter/src/public-api.js +1 -1
- package/esm2015/form/index.js +1 -1
- package/esm2015/form/sd-angular-core-form.js +1 -1
- package/esm2015/form/src/lib/form.module.js +1 -1
- package/esm2015/form/src/public-api.js +1 -1
- package/esm2015/grid/index.js +1 -1
- package/esm2015/grid/sd-angular-core-grid.js +1 -1
- package/esm2015/grid/src/lib/components/grid-config/grid-config.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-config/grid-config.model.js +1 -1
- package/esm2015/grid/src/lib/components/grid-desktop-column-children-view/grid-desktop-column-children-view.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-desktop-column-edit/grid-desktop-column-edit.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-desktop-column-view/grid-desktop-column-view.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-desktop-inline-filter/grid-desktop-inline-filter.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-import-excel/grid-import-excel.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-mobile-item-view/grid-mobile-item-view.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-popup-editor/grid-popup-editor.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-popup-export-excel/grid-popup-export-excel.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-popup-export-excel/grid-popup-export-excel.model.js +1 -1
- package/esm2015/grid/src/lib/components/grid-popup-filter/grid-popup-filter.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-popup-filter/grid-popup-filter.model.js +1 -1
- package/esm2015/grid/src/lib/components/grid-popup-quick-filter-detail/grid-popup-quick-filter-detail.component.js +1 -1
- package/esm2015/grid/src/lib/components/grid-sub-information/grid-sub-information.component.js +1 -1
- package/esm2015/grid/src/lib/directives/cell-def.directive.js +1 -1
- package/esm2015/grid/src/lib/directives/cell-editor-def.directive.js +1 -1
- package/esm2015/grid/src/lib/directives/cell-footer-def.directive.js +1 -1
- package/esm2015/grid/src/lib/directives/sub-information-header-def.directive.js +1 -1
- package/esm2015/grid/src/lib/grid.component.js +1 -1
- package/esm2015/grid/src/lib/grid.model.js +1 -1
- package/esm2015/grid/src/lib/grid.module.js +1 -1
- package/esm2015/grid/src/lib/models/filter-info.model.js +1 -1
- package/esm2015/grid/src/lib/models/grid-configuration.model.js +1 -1
- package/esm2015/grid/src/lib/models/handler-dotnet.js +1 -1
- package/esm2015/grid/src/lib/models/handler-local.js +1 -1
- package/esm2015/grid/src/lib/models/handler.js +1 -1
- package/esm2015/grid/src/lib/pipes/cell-desktop-class-name.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/cell-mobile-class-name.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/column-command-filter.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/column-html-template.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/column-title.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/column-values.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/command-disabled.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/command-filter.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/command-hidden.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/command-icon.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/command-title.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/dynamic-items.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/editor-dynamic-item.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/editor-handler.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/editor-popup-visible.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/editor-sub-information-handler.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/editor-validate.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/filter-mobile.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/mobile-command-filter.js +1 -1
- package/esm2015/grid/src/lib/pipes/mobile-view-html-template.pipe.js +1 -1
- package/esm2015/grid/src/lib/pipes/value-transform.pipe.js +1 -1
- package/esm2015/grid/src/public-api.js +1 -1
- package/esm2015/grid-material/index.js +1 -1
- package/esm2015/grid-material/sd-angular-core-grid-material.js +1 -1
- package/esm2015/grid-material/src/lib/components/column-inline-filter/column-inline-filter.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/desktop-cell/desktop-cell.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/desktop-cell-children-view/desktop-cell-children-view.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/desktop-cell-editor/desktop-cell-editor.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/desktop-cell-view/desktop-cell-view.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/desktop-command/desktop-command.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/desktop-editor-validation/desktop-editor-validation.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/dynamic-column/dynamic-column.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/grid-filter/grid-filter.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/popup-export/popup-export.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/popup-filter/popup-filter.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/popup-grid-configuration/popup-grid-configuration.component.js +1 -1
- package/esm2015/grid-material/src/lib/components/quick-action/quick-action.component.js +1 -1
- package/esm2015/grid-material/src/lib/directives/sd-material-cell-def.directive.js +1 -1
- package/esm2015/grid-material/src/lib/directives/sd-material-empty-data-def.directive.js +1 -1
- package/esm2015/grid-material/src/lib/directives/sd-material-filter-def.directive.js +1 -1
- package/esm2015/grid-material/src/lib/directives/sd-material-footer-def.directive.js +1 -1
- package/esm2015/grid-material/src/lib/directives/sd-material-sub-information-def.directive.js +1 -1
- package/esm2015/grid-material/src/lib/functions/calculate-sd-id.js +1 -1
- package/esm2015/grid-material/src/lib/grid-material.component.js +1 -1
- package/esm2015/grid-material/src/lib/grid-material.module.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-action.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-cell.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-column.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-command.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-config.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-configuration.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-editor.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-export.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-group.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-option.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-reload.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-selection.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-style.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-sub-information.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid.model.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/cell-view.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/column-badge.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/column-children-filter.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/column-html-template.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/column-title.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/column-tooltip.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/column-transform.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/column-values.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/command-disable.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/command-filter.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/command-icon.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/command-title.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/editor-handler-column.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/editor-handler-row.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/editor-validate.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/filter-column.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/filter-external.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/grid-configuration-result.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/sd-group.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/selection-action-filter.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/selection-disable.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/selection-visible-select-all.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/selection-visible.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/style-row-css.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/services/generated-column/generated-column.model.js +1 -1
- package/esm2015/grid-material/src/lib/services/generated-column/generated-column.service.js +1 -1
- package/esm2015/grid-material/src/lib/services/grid-configuration.service.js +1 -1
- package/esm2015/grid-material/src/lib/services/grid-filter/grid-filter.model.js +1 -1
- package/esm2015/grid-material/src/lib/services/grid-filter/grid-filter.service.js +1 -1
- package/esm2015/grid-material/src/public-api.js +1 -1
- package/esm2015/group/index.js +1 -1
- package/esm2015/group/sd-angular-core-group.js +1 -1
- package/esm2015/group/src/lib/group.component.js +1 -1
- package/esm2015/group/src/lib/group.module.js +1 -1
- package/esm2015/group/src/public-api.js +1 -1
- package/esm2015/header-title/index.js +1 -1
- package/esm2015/header-title/sd-angular-core-header-title.js +1 -1
- package/esm2015/header-title/src/lib/header-title.component.js +1 -1
- package/esm2015/header-title/src/lib/header-title.module.js +1 -1
- package/esm2015/header-title/src/public-api.js +1 -1
- package/esm2015/image-preview/index.js +1 -1
- package/esm2015/image-preview/sd-angular-core-image-preview.js +1 -1
- package/esm2015/image-preview/src/lib/directives/image-preview.directive.js +1 -1
- package/esm2015/image-preview/src/lib/image-preview/image-preview-sdmodal.component.js +1 -1
- package/esm2015/image-preview/src/lib/image-preview/image-preview.component.js +1 -1
- package/esm2015/image-preview/src/lib/image-preview/image-preview.module.js +1 -1
- package/esm2015/image-preview/src/lib/models/image-preview.model.js +1 -1
- package/esm2015/image-preview/src/public-api.js +1 -1
- package/esm2015/input/index.js +1 -1
- package/esm2015/input/sd-angular-core-input.js +1 -1
- package/esm2015/input/src/lib/directives/input-suffix.directive.js +1 -1
- package/esm2015/input/src/lib/directives/touch.directive.js +1 -1
- package/esm2015/input/src/lib/input-tooltip.pipe.js +1 -1
- package/esm2015/input/src/lib/input.component.js +1 -1
- package/esm2015/input/src/lib/input.module.js +1 -1
- package/esm2015/input/src/public-api.js +1 -1
- package/esm2015/input-currency/index.js +1 -1
- package/esm2015/input-currency/sd-angular-core-input-currency.js +1 -1
- package/esm2015/input-currency/src/lib/input-currency-tooltip.pipe.js +1 -1
- package/esm2015/input-currency/src/lib/input-currency.component.js +1 -1
- package/esm2015/input-currency/src/lib/input-currency.module.js +1 -1
- package/esm2015/input-currency/src/public-api.js +1 -1
- package/esm2015/input-dropdown/index.js +1 -1
- package/esm2015/input-dropdown/sd-angular-core-input-dropdown.js +1 -1
- package/esm2015/input-dropdown/src/lib/input-tooltip.pipe.js +1 -1
- package/esm2015/input-dropdown/src/lib/input.component.js +3 -3
- package/esm2015/input-dropdown/src/lib/input.module.js +1 -1
- package/esm2015/input-dropdown/src/public-api.js +1 -1
- package/esm2015/input-number/index.js +1 -1
- package/esm2015/input-number/sd-angular-core-input-number.js +1 -1
- package/esm2015/input-number/src/lib/input-number.component.js +1 -1
- package/esm2015/input-number/src/lib/input-number.module.js +1 -1
- package/esm2015/input-number/src/public-api.js +1 -1
- package/esm2015/input-upload-file/index.js +1 -1
- package/esm2015/input-upload-file/sd-angular-core-input-upload-file.js +1 -1
- package/esm2015/input-upload-file/src/lib/input-upload-file.component.js +1 -1
- package/esm2015/input-upload-file/src/lib/input-upload-file.module.js +1 -1
- package/esm2015/input-upload-file/src/public-api.js +1 -1
- package/esm2015/json-editor/index.js +1 -1
- package/esm2015/json-editor/sd-angular-core-json-editor.js +1 -1
- package/esm2015/json-editor/src/lib/json-editor.component.js +1 -1
- package/esm2015/json-editor/src/lib/json-editor.module.js +1 -1
- package/esm2015/json-editor/src/public-api.js +1 -1
- package/esm2015/konva/index.js +1 -1
- package/esm2015/konva/sd-angular-core-konva.js +1 -1
- package/esm2015/konva/src/lib/konva.module.js +1 -1
- package/esm2015/konva/src/lib/merge-images/merge-images.component.js +1 -1
- package/esm2015/konva/src/public-api.js +1 -1
- package/esm2015/label/index.js +1 -1
- package/esm2015/label/sd-angular-core-label.js +1 -1
- package/esm2015/label/src/lib/label.component.js +1 -1
- package/esm2015/label/src/lib/label.module.js +1 -1
- package/esm2015/label/src/public-api.js +1 -1
- package/esm2015/lib/core.module.js +1 -1
- package/esm2015/lib/material.module.js +1 -1
- package/esm2015/loading/index.js +1 -1
- package/esm2015/loading/sd-angular-core-loading.js +1 -1
- package/esm2015/loading/src/lib/loading.service.js +1 -1
- package/esm2015/loading/src/public-api.js +1 -1
- package/esm2015/modal/index.js +1 -1
- package/esm2015/modal/sd-angular-core-modal.js +1 -1
- package/esm2015/modal/src/lib/bottom-sheet/bottom-sheet-body/bottom-sheet-body.component.js +1 -1
- package/esm2015/modal/src/lib/bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component.js +1 -1
- package/esm2015/modal/src/lib/bottom-sheet/bottom-sheet-header/bottom-sheet-header.component.js +1 -1
- package/esm2015/modal/src/lib/bottom-sheet/bottom-sheet.component.js +1 -1
- package/esm2015/modal/src/lib/modal/modal-body/modal-body.component.js +1 -1
- package/esm2015/modal/src/lib/modal/modal-footer/modal-footer.component.js +1 -1
- package/esm2015/modal/src/lib/modal/modal-header/modal-header.component.js +1 -1
- package/esm2015/modal/src/lib/modal/modal.component.js +1 -1
- package/esm2015/modal/src/lib/modal.module.js +1 -1
- package/esm2015/modal/src/public-api.js +1 -1
- package/esm2015/modal-resizable/index.js +1 -1
- package/esm2015/modal-resizable/sd-angular-core-modal-resizable.js +1 -1
- package/esm2015/modal-resizable/src/lib/modal-resizable/modal-resizable.component.js +1 -1
- package/esm2015/modal-resizable/src/lib/modal-resizable.module.js +1 -1
- package/esm2015/modal-resizable/src/public-api.js +1 -1
- package/esm2015/notify/index.js +1 -1
- package/esm2015/notify/sd-angular-core-notify.js +1 -1
- package/esm2015/notify/src/lib/components/dialog-confirm/dialog-confirm.component.js +1 -1
- package/esm2015/notify/src/lib/configurations/notify.configuration.js +1 -1
- package/esm2015/notify/src/lib/notify.module.js +1 -1
- package/esm2015/notify/src/lib/notify.service.js +1 -1
- package/esm2015/notify/src/public-api.js +1 -1
- package/esm2015/pdf/index.js +1 -1
- package/esm2015/pdf/sd-angular-core-pdf.js +1 -1
- package/esm2015/pdf/src/lib/pdf.module.js +1 -1
- package/esm2015/pdf/src/lib/pdf.service.js +1 -1
- package/esm2015/pdf/src/public-api.js +1 -1
- package/esm2015/popover/index.js +1 -1
- package/esm2015/popover/sd-angular-core-popover.js +1 -1
- package/esm2015/popover/src/lib/directives/popover-content.directive.js +1 -1
- package/esm2015/popover/src/lib/directives/popover-trigger.directive.js +1 -1
- package/esm2015/popover/src/lib/popover/popover.component.js +1 -1
- package/esm2015/popover/src/lib/popover.model.js +1 -1
- package/esm2015/popover/src/lib/popover.module.js +1 -1
- package/esm2015/popover/src/public-api.js +1 -1
- package/esm2015/print/index.js +1 -1
- package/esm2015/print/sd-angular-core-print.js +1 -1
- package/esm2015/print/src/lib/fonts/times/bold-italic.js +1 -1
- package/esm2015/print/src/lib/fonts/times/bold.js +1 -1
- package/esm2015/print/src/lib/fonts/times/italic.js +1 -1
- package/esm2015/print/src/lib/fonts/times/normal.js +1 -1
- package/esm2015/print/src/lib/print.component.js +1 -1
- package/esm2015/print/src/lib/print.module.js +1 -1
- package/esm2015/print/src/public-api.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/esm2015/quick-action/index.js +1 -1
- package/esm2015/quick-action/sd-angular-core-quick-action.js +1 -1
- package/esm2015/quick-action/src/lib/quick-action.component.js +1 -1
- package/esm2015/quick-action/src/lib/quick-action.module.js +1 -1
- package/esm2015/quick-action/src/public-api.js +1 -1
- package/esm2015/radio/index.js +1 -1
- package/esm2015/radio/sd-angular-core-radio.js +1 -1
- package/esm2015/radio/src/lib/radio.component.js +1 -1
- package/esm2015/radio/src/lib/radio.module.js +1 -1
- package/esm2015/radio/src/public-api.js +1 -1
- package/esm2015/sd-angular-core.js +1 -1
- package/esm2015/select/index.js +1 -1
- package/esm2015/select/sd-angular-core-select.js +1 -1
- package/esm2015/select/src/lib/select-display-def.directive.js +1 -1
- package/esm2015/select/src/lib/select.component.js +1 -1
- package/esm2015/select/src/lib/select.module.js +1 -1
- package/esm2015/select/src/public-api.js +1 -1
- package/esm2015/select-badge/index.js +1 -1
- package/esm2015/select-badge/sd-angular-core-select-badge.js +1 -1
- package/esm2015/select-badge/src/lib/select-badge-display-def.directive.js +1 -1
- package/esm2015/select-badge/src/lib/select-badge.component.js +1 -1
- package/esm2015/select-badge/src/lib/select-badge.module.js +1 -1
- package/esm2015/select-badge/src/public-api.js +1 -1
- package/esm2015/select-editor/index.js +1 -1
- package/esm2015/select-editor/sd-angular-core-select-editor.js +1 -1
- package/esm2015/select-editor/src/lib/select-editor.component.js +1 -1
- package/esm2015/select-editor/src/lib/select-editor.module.js +1 -1
- package/esm2015/select-editor/src/public-api.js +1 -1
- package/esm2015/service/index.js +1 -1
- package/esm2015/service/sd-angular-core-service.js +1 -1
- package/esm2015/service/src/lib/service.module.js +1 -1
- package/esm2015/service/src/public-api.js +1 -1
- package/esm2015/setting/index.js +1 -1
- package/esm2015/setting/sd-angular-core-setting.js +1 -1
- package/esm2015/setting/src/lib/setting.model.js +1 -1
- package/esm2015/setting/src/lib/setting.service.js +1 -1
- package/esm2015/setting/src/public-api.js +1 -1
- package/esm2015/side-drawer/index.js +1 -1
- package/esm2015/side-drawer/sd-angular-core-side-drawer.js +1 -1
- package/esm2015/side-drawer/src/lib/side-drawer/side-drawer.component.js +1 -1
- package/esm2015/side-drawer/src/lib/side-drawer.module.js +1 -1
- package/esm2015/side-drawer/src/public-api.js +1 -1
- package/esm2015/switch/index.js +1 -1
- package/esm2015/switch/sd-angular-core-switch.js +1 -1
- package/esm2015/switch/src/lib/switch.component.js +1 -1
- package/esm2015/switch/src/lib/switch.module.js +1 -1
- package/esm2015/switch/src/public-api.js +1 -1
- package/esm2015/tab-router/index.js +1 -1
- package/esm2015/tab-router/sd-angular-core-tab-router.js +1 -1
- package/esm2015/tab-router/src/lib/actions/tab-router.action.js +1 -1
- package/esm2015/tab-router/src/lib/components/tab-router-item/tab-router-item.component.js +1 -1
- package/esm2015/tab-router/src/lib/components/tab-router-nav/tab-router-nav.component.js +1 -1
- package/esm2015/tab-router/src/lib/components/tab-router-outlet/tab-router-outlet.component.js +1 -1
- package/esm2015/tab-router/src/lib/decorators/tab.decorator.js +1 -1
- package/esm2015/tab-router/src/lib/directives/router-link-mouse-down.directive.js +1 -1
- package/esm2015/tab-router/src/lib/events/tab-router.event.js +1 -1
- package/esm2015/tab-router/src/lib/models/tab-router.model.js +1 -1
- package/esm2015/tab-router/src/lib/pipes/tab-info.pipe.js +1 -1
- package/esm2015/tab-router/src/lib/services/tab-decorator.service.js +1 -1
- package/esm2015/tab-router/src/lib/services/tab-router.service.js +1 -1
- package/esm2015/tab-router/src/lib/tab-router.module.js +1 -1
- package/esm2015/tab-router/src/public-api.js +1 -1
- package/esm2015/table/index.js +1 -1
- package/esm2015/table/sd-angular-core-table.js +24 -31
- package/esm2015/table/src/lib/components/column-inline-filter/column-inline-filter.component.js +17 -4
- package/esm2015/table/src/lib/components/desktop-cell/desktop-cell.component.js +1 -1
- package/esm2015/table/src/lib/components/desktop-cell-view/desktop-cell-view.component.js +2 -2
- package/esm2015/table/src/lib/components/desktop-command/desktop-command.component.js +1 -1
- package/esm2015/table/src/lib/components/popup-configuration/popup-configuration.component.js +69 -0
- package/esm2015/table/src/lib/components/popup-filter/popup-filter.component.js +2 -2
- package/esm2015/table/src/lib/components/quick-action/quick-action.component.js +6 -6
- package/esm2015/table/src/lib/components/table-filter/table-filter.component.js +99 -0
- package/esm2015/table/src/lib/directives/sd-material-cell-def.directive.js +1 -1
- package/esm2015/table/src/lib/directives/sd-material-empty-data-def.directive.js +1 -1
- package/esm2015/table/src/lib/directives/sd-material-filter-def.directive.js +1 -1
- package/esm2015/table/src/lib/directives/sd-material-footer-def.directive.js +1 -1
- package/esm2015/table/src/lib/directives/sd-material-sub-information-def.directive.js +1 -1
- package/esm2015/table/src/lib/models/index.js +1 -1
- package/esm2015/table/src/lib/models/table-column.model.js +7 -7
- package/esm2015/table/src/lib/models/table-command.model.js +1 -1
- package/esm2015/table/src/lib/models/table-configuration.model.js +1 -1
- package/esm2015/table/src/lib/models/table-item.model.js +3 -3
- package/esm2015/table/src/lib/models/table-option-config.model.js +1 -1
- package/esm2015/table/src/lib/models/table-option-expand.model.js +1 -1
- package/esm2015/table/src/lib/models/table-option-export.model.js +1 -1
- package/esm2015/table/src/lib/models/table-option-group.model.js +1 -1
- package/esm2015/table/src/lib/models/table-option-paginate.model.js +1 -1
- package/esm2015/table/src/lib/models/table-option-reload.model.js +1 -1
- package/esm2015/table/src/lib/models/table-option-selector.model.js +1 -1
- package/esm2015/table/src/lib/models/table-option-sort.model.js +1 -1
- package/esm2015/table/src/lib/models/table-option-style.model.js +1 -1
- package/esm2015/table/src/lib/models/table-option.model.js +1 -1
- package/esm2015/table/src/lib/pipes/column-tooltip.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/command-disable.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/command-filter.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/command-icon.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/command-title.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/filter-column.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/filter-external.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/sd-group.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/selection-action-filter.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/selection-disable.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/selection-visible-select-all.pipe.js +1 -1
- package/esm2015/table/src/lib/pipes/selection-visible.pipe.js +1 -1
- package/esm2015/table/src/lib/services/table-configuration.service.js +37 -207
- package/esm2015/table/src/lib/services/table-filter/table-filter.model.js +1 -1
- package/esm2015/table/src/lib/services/table-filter/table-filter.service.js +1 -1
- package/esm2015/table/src/lib/table.component.js +196 -86
- package/esm2015/table/src/lib/table.module.js +7 -22
- package/esm2015/table/src/public-api.js +1 -1
- package/esm2015/textarea/index.js +1 -1
- package/esm2015/textarea/sd-angular-core-textarea.js +1 -1
- package/esm2015/textarea/src/lib/textarea.component.js +1 -1
- package/esm2015/textarea/src/lib/textarea.module.js +1 -1
- package/esm2015/textarea/src/public-api.js +1 -1
- package/esm2015/time/index.js +1 -1
- package/esm2015/time/sd-angular-core-time.js +1 -1
- package/esm2015/time/src/lib/time.component.js +1 -1
- package/esm2015/time/src/lib/time.module.js +1 -1
- package/esm2015/time/src/public-api.js +1 -1
- package/esm2015/timeline/index.js +1 -1
- package/esm2015/timeline/sd-angular-core-timeline.js +1 -1
- package/esm2015/timeline/src/lib/components/timeline.component.js +1 -1
- package/esm2015/timeline/src/lib/directives/timeline-def.directive.js +1 -1
- package/esm2015/timeline/src/lib/timeline.module.js +1 -1
- package/esm2015/timeline/src/public-api.js +1 -1
- package/esm2015/translate/index.js +1 -1
- package/esm2015/translate/sd-angular-core-translate.js +1 -1
- package/esm2015/translate/src/lib/translate.model.js +1 -1
- package/esm2015/translate/src/lib/translate.module.js +1 -1
- package/esm2015/translate/src/lib/translate.pipe.js +1 -1
- package/esm2015/translate/src/lib/translate.service.js +1 -1
- package/esm2015/upload-excel/index.js +1 -1
- package/esm2015/upload-excel/sd-angular-core-upload-excel.js +1 -1
- package/esm2015/upload-excel/src/lib/pipes/columm-hidden.pipe.js +1 -1
- package/esm2015/upload-excel/src/lib/pipes/column-transform.pipe.js +1 -1
- package/esm2015/upload-excel/src/lib/upload-excel.component.js +1 -1
- package/esm2015/upload-excel/src/lib/upload-excel.model.js +1 -1
- package/esm2015/upload-excel/src/lib/upload-excel.module.js +1 -1
- package/esm2015/upload-excel/src/public-api.js +1 -1
- package/esm2015/upload-file/index.js +1 -1
- package/esm2015/upload-file/sd-angular-core-upload-file.js +1 -1
- package/esm2015/upload-file/src/lib/upload-file.component.js +1 -1
- package/esm2015/upload-file/src/lib/upload-file.module.js +1 -1
- package/esm2015/upload-file/src/public-api.js +1 -1
- package/esm2015/utility/index.js +1 -1
- package/esm2015/utility/sd-angular-core-utility.js +1 -1
- package/esm2015/utility/src/lib/directives/desktop.directive.js +1 -1
- package/esm2015/utility/src/lib/directives/mobile-tablet.directive.js +1 -1
- package/esm2015/utility/src/lib/directives/mobile.directive.js +1 -1
- package/esm2015/utility/src/lib/directives/tablet.directive.js +1 -1
- package/esm2015/utility/src/lib/pipes/currency.pipe.js +1 -1
- package/esm2015/utility/src/lib/pipes/safe-html.pipe.js +1 -1
- package/esm2015/utility/src/lib/pipes/time-different.pipe.js +1 -1
- package/esm2015/utility/src/lib/utility.module.js +1 -3
- package/esm2015/utility/src/lib/utility.service.js +7 -54
- package/esm2015/utility/src/public-api.js +1 -1
- package/esm2015/view/index.js +1 -1
- package/esm2015/view/sd-angular-core-view.js +1 -1
- package/esm2015/view/src/lib/view.module.js +1 -1
- package/esm2015/view/src/public-api.js +1 -1
- package/esm2015/zip/index.js +1 -1
- package/esm2015/zip/sd-angular-core-zip.js +1 -1
- package/esm2015/zip/src/lib/zip.module.js +1 -1
- package/esm2015/zip/src/lib/zip.service.js +1 -1
- package/esm2015/zip/src/public-api.js +1 -1
- package/fesm2015/sd-angular-core-api.js +2 -35
- package/fesm2015/sd-angular-core-api.js.map +1 -1
- package/fesm2015/sd-angular-core-common.js +85 -2
- package/fesm2015/sd-angular-core-common.js.map +1 -1
- package/fesm2015/sd-angular-core-input-dropdown.js +2 -2
- package/fesm2015/sd-angular-core-input-dropdown.js.map +1 -1
- package/fesm2015/sd-angular-core-table.js +347 -803
- package/fesm2015/sd-angular-core-table.js.map +1 -1
- package/fesm2015/sd-angular-core-utility.js +7 -54
- package/fesm2015/sd-angular-core-utility.js.map +1 -1
- package/input-dropdown/sd-angular-core-input-dropdown.metadata.json +1 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.3.150.tgz → sd-angular-core-1.3.151.tgz} +0 -0
- package/table/sd-angular-core-table.d.ts +23 -30
- package/table/sd-angular-core-table.metadata.json +1 -1
- package/table/src/lib/components/column-inline-filter/column-inline-filter.component.d.ts +2 -0
- package/table/src/lib/components/{popup-grid-configuration/popup-grid-configuration.component.d.ts → popup-configuration/popup-configuration.component.d.ts} +5 -10
- package/table/src/lib/components/popup-filter/popup-filter.component.d.ts +2 -2
- package/table/src/lib/components/quick-action/quick-action.component.d.ts +1 -1
- package/table/src/lib/components/{grid-filter/grid-filter.component.d.ts → table-filter/table-filter.component.d.ts} +5 -5
- package/table/src/lib/models/table-column.model.d.ts +15 -48
- package/table/src/lib/models/table-item.model.d.ts +15 -2
- package/table/src/lib/models/table-option-config.model.d.ts +2 -11
- package/table/src/lib/models/table-option.model.d.ts +0 -4
- package/table/src/lib/services/table-configuration.service.d.ts +5 -5
- package/table/src/lib/services/table-filter/table-filter.model.d.ts +1 -2
- package/table/src/lib/services/table-filter/table-filter.service.d.ts +2 -2
- package/table/src/lib/table.component.d.ts +12 -13
- package/utility/sd-angular-core-utility.metadata.json +1 -1
- package/utility/src/lib/utility.service.d.ts +2 -4
- package/esm2015/table/src/lib/components/grid-filter/grid-filter.component.js +0 -99
- package/esm2015/table/src/lib/components/popup-grid-configuration/popup-grid-configuration.component.js +0 -96
- package/esm2015/table/src/lib/models/grid-cell.model.js +0 -2
- package/esm2015/table/src/lib/pipes/cell-view.pipe.js +0 -180
- package/esm2015/table/src/lib/pipes/column-badge.pipe.js +0 -43
- package/esm2015/table/src/lib/pipes/column-children-filter.pipe.js +0 -31
- package/esm2015/table/src/lib/pipes/column-html-template.pipe.js +0 -23
- package/esm2015/table/src/lib/pipes/column-transform.pipe.js +0 -35
- package/esm2015/table/src/lib/pipes/column-values.pipe.js +0 -63
- package/esm2015/table/src/lib/pipes/grid-configuration-result.pipe.js +0 -21
- package/table/src/lib/models/grid-cell.model.d.ts +0 -16
- package/table/src/lib/pipes/cell-view.pipe.d.ts +0 -15
- package/table/src/lib/pipes/column-badge.pipe.d.ts +0 -11
- package/table/src/lib/pipes/column-children-filter.pipe.d.ts +0 -8
- package/table/src/lib/pipes/column-html-template.pipe.d.ts +0 -8
- package/table/src/lib/pipes/column-transform.pipe.d.ts +0 -8
- package/table/src/lib/pipes/column-values.pipe.d.ts +0 -6
- package/table/src/lib/pipes/grid-configuration-result.pipe.d.ts +0 -10
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SdScrollDirective, SdCommonModule } from '@sd-angular/core/common';
|
|
2
|
-
import { InjectionToken, Directive, TemplateRef, Input, Component, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, Injectable, Inject, Optional,
|
|
2
|
+
import { InjectionToken, Directive, TemplateRef, Input, Component, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, Injectable, Inject, Optional, EventEmitter, HostListener, QueryList, ContentChild, ContentChildren, Pipe, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule, DatePipe, DecimalPipe } from '@angular/common';
|
|
4
4
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
6
|
import { MatIconModule } from '@angular/material/icon';
|
|
7
7
|
import { MatInputModule } from '@angular/material/input';
|
|
8
|
-
import { __classPrivateFieldGet, __classPrivateFieldSet, __awaiter
|
|
8
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet, __awaiter } from 'tslib';
|
|
9
9
|
import { MatPaginator, MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
|
|
10
10
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
11
11
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
@@ -16,15 +16,15 @@ import { startWith, map, debounceTime, switchMap } from 'rxjs/operators';
|
|
|
16
16
|
import { SdModal } from '@sd-angular/core/modal';
|
|
17
17
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
18
18
|
import { SdExportService } from '@sd-angular/core/export';
|
|
19
|
-
import * as hash from 'object-hash';
|
|
20
|
-
import hash__default from 'object-hash';
|
|
21
19
|
import { SdSettingService } from '@sd-angular/core/setting';
|
|
22
20
|
import { SdQuickAction } from '@sd-angular/core/quick-action';
|
|
21
|
+
import * as hash from 'object-hash';
|
|
22
|
+
import hash__default from 'object-hash';
|
|
23
|
+
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
23
24
|
import { MatTableModule } from '@angular/material/table';
|
|
24
25
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
25
26
|
import { CdkTableModule, CdkColumnDef } from '@angular/cdk/table';
|
|
26
27
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
27
|
-
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
28
28
|
import { MatMenuModule } from '@angular/material/menu';
|
|
29
29
|
import { MatSliderModule } from '@angular/material/slider';
|
|
30
30
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -35,10 +35,8 @@ import { MatRadioModule } from '@angular/material/radio';
|
|
|
35
35
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
36
36
|
import { SdFormModule } from '@sd-angular/core/form';
|
|
37
37
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
38
|
-
import { SdTranslateService } from '@sd-angular/core/translate';
|
|
39
38
|
import { MatListModule } from '@angular/material/list';
|
|
40
39
|
import { MatDividerModule } from '@angular/material/divider';
|
|
41
|
-
import { SdUtilityService } from '@sd-angular/core/utility';
|
|
42
40
|
import { SdGroupModule } from '@sd-angular/core/group';
|
|
43
41
|
|
|
44
42
|
const DEFAULT_TABLE_CONFIG = {
|
|
@@ -126,7 +124,7 @@ _filterRegister = new WeakMap();
|
|
|
126
124
|
SdPopupFilter.decorators = [
|
|
127
125
|
{ type: Component, args: [{
|
|
128
126
|
selector: 'sd-popup-filter',
|
|
129
|
-
template: "<sd-modal width=\"500px\" [title]=\"'Filter' | sdTranslate\">\r\n <sd-modal-body class=\"c-popup-filter\">\r\n <ng-container *ngFor=\"let column of columns | sdFilterColumn\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <ng-container>\r\n <div *sdDesktop class=\"c-checkable\">\r\n <mat-slide-toggle [(ngModel)]=\"inlineColumn[column.field]\" color=\"primary\"></mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input\r\n *ngIf=\"column.type === 'string'\"\r\n [label]=\"column.title\"\r\n type=\"text\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-input\r\n *ngIf=\"column.type === 'number'\"\r\n [label]=\"column.title\"\r\n type=\" number\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-select\r\n *ngIf=\"column.type === 'bool'\"\r\n [label]=\"column.title\"\r\n [items]=\"[\r\n { value: '1', display: column.trueValue || 'True' },\r\n { value: '0', display: column.falseValue || 'False' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-select>\r\n <sd-
|
|
127
|
+
template: "<sd-modal width=\"500px\" [title]=\"'Filter' | sdTranslate\">\r\n <sd-modal-body class=\"c-popup-filter\">\r\n <ng-container *ngFor=\"let column of columns | sdFilterColumn\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <ng-container>\r\n <div *sdDesktop class=\"c-checkable\">\r\n <mat-slide-toggle [(ngModel)]=\"inlineColumn[column.field]\" color=\"primary\"></mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input\r\n *ngIf=\"column.type === 'string'\"\r\n [label]=\"column.title\"\r\n type=\"text\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-input\r\n *ngIf=\"column.type === 'number'\"\r\n [label]=\"column.title\"\r\n type=\" number\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-select\r\n *ngIf=\"column.type === 'bool'\"\r\n [label]=\"column.title\"\r\n [items]=\"[\r\n { value: '1', display: column.trueValue || 'True' },\r\n { value: '0', display: column.falseValue || 'False' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-select>\r\n <sd-autocomplete\r\n *ngIf=\"column.type === 'values' || column.type === 'lazy-values'\"\r\n [label]=\"column.title\"\r\n [items]=\"column.option.items\"\r\n [valueField]=\"column.option.valueField\"\r\n [displayField]=\"column.option.displayField\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-autocomplete>\r\n <sd-date-time\r\n *ngIf=\"column.type === 'date' || column.type === 'datetime' || column.type === 'time'\"\r\n [label]=\"column.title\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n type=\"date\"\r\n appearance=\"outline\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <ng-container>\r\n <div *sdDesktop class=\"c-checkable\">\r\n <mat-slide-toggle [(ngModel)]=\"inlineExternal[item.field]\" color=\"primary\"></mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'string'\"\r\n type=\"text\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\" appearance=\"outline\">\r\n </sd-input-number>\r\n <sd-select\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'bool'\"\r\n [items]=\"[\r\n { value: '1', display: item.option?.displayOnTrue || 'True' },\r\n { value: '0', display: item.option?.displayOnFalse || 'False' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n appearance=\"outline\">\r\n </sd-select>\r\n <ng-container *ngIf=\"item.type === 'values'\">\r\n <sd-select\r\n *ngIf=\"item.option?.selection === 'MULTIPLE'\"\r\n [label]=\"item.title\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n appearance=\"outline\"\r\n multiple>\r\n </sd-select>\r\n <sd-autocomplete\r\n *ngIf=\"item.option?.selection === 'AUTOCOMPLETE'\"\r\n [label]=\"item.title\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n appearance=\"outline\"\r\n [(model)]=\"externalFilter[item.field]\">\r\n </sd-autocomplete>\r\n <sd-select\r\n *ngIf=\"item.option?.selection === 'MULTIPLEAUTOCOMPLETE'\"\r\n [label]=\"item.title\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n appearance=\"outline\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n filtered=\"true\"\r\n multiple>\r\n </sd-select>\r\n <sd-select\r\n *ngIf=\"!item.option?.selection\"\r\n [label]=\"item.title\"\r\n [items]=\"item.values\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n appearance=\"outline\"\r\n [(model)]=\"externalFilter[item.field]\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-date-time\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'date' || item.type === 'datetime'\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n [type]=\"item.type\"\r\n appearance=\"outline\">\r\n </sd-date-time>\r\n <sd-date-range\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'daterange' && externalFilter[item.field]\"\r\n [(from)]=\"externalFilter[item.field].from\"\r\n [(to)]=\"externalFilter[item.field].to\"\r\n [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\"\r\n appearance=\"outline\">\r\n </sd-date-range>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngFor=\"let filter of filterDefs\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <ng-container>\r\n <div *sdDesktop class=\"c-checkable\">\r\n <mat-slide-toggle [(ngModel)]=\"inlineFilterDef[filter.sdMaterialFilterDef]\" color=\"primary\"> </mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <ng-container *ngTemplateOutlet=\"filter.templateRef; context: { filterDef: filterDef }\"> </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </sd-modal-body>\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"onClear()\" title=\"M\u1EB7c \u0111\u1ECBnh\" size=\"sm\" type=\"link\"> </sd-button>\r\n <sd-button (action)=\"onApply()\" title=\"\u0110\u1ED3ng \u00FD\" color=\"primary\" size=\"sm\" type=\"fill\"></sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px\" (action)=\"onClear()\" title=\"M\u1EB7c \u0111\u1ECBnh\" width=\"100%\" size=\"sm\" type=\"link\"></sd-button>\r\n <sd-button\r\n style=\"flex: 1; padding-left: 5px\"\r\n (action)=\"onApply()\"\r\n title=\"\u0110\u1ED3ng \u00FD\"\r\n color=\"primary\"\r\n width=\"100%\"\r\n size=\"sm\"\r\n type=\"fill\"></sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>\r\n",
|
|
130
128
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
131
129
|
styles: [".c-checkable{width:50px}.c-filterable{flex:1}::ng-deep sd-modal-body.c-popup-filter .mat-form-field-wrapper{padding-bottom:0}"]
|
|
132
130
|
},] }
|
|
@@ -143,7 +141,7 @@ SdPopupFilter.propDecorators = {
|
|
|
143
141
|
};
|
|
144
142
|
|
|
145
143
|
var _subscription;
|
|
146
|
-
class
|
|
144
|
+
class SdTableFilter {
|
|
147
145
|
constructor(ref, deviceService) {
|
|
148
146
|
this.ref = ref;
|
|
149
147
|
this.deviceService = deviceService;
|
|
@@ -214,19 +212,19 @@ class SdGridFilter {
|
|
|
214
212
|
}
|
|
215
213
|
}
|
|
216
214
|
_subscription = new WeakMap();
|
|
217
|
-
|
|
215
|
+
SdTableFilter.decorators = [
|
|
218
216
|
{ type: Component, args: [{
|
|
219
|
-
selector: 'sd-
|
|
220
|
-
template: "<ng-container *ngIf=\"!filter?.disabled\">\r\n <ng-container *ngIf=\"filter?.enableCollapse;else noCollapse\">\r\n <sd-group class=\"p-12\" [isExpanded]=\"false\" title=\"T\u00ECm ki\u1EBFm\" expandable>\r\n <div sdGroupBody>\r\n <ng-container *ngTemplateOutlet=\"noCollapse\"></ng-container>\r\n </div>\r\n </sd-group>\r\n </ng-container>\r\n <ng-template #noCollapse>\r\n <div\r\n *ngIf=\"!isMobileOrTablet && (
|
|
217
|
+
selector: 'sd-table-filter',
|
|
218
|
+
template: "<ng-container *ngIf=\"!filter?.disabled\">\r\n <ng-container *ngIf=\"filter?.enableCollapse;else noCollapse\">\r\n <sd-group class=\"p-12\" [isExpanded]=\"false\" title=\"T\u00ECm ki\u1EBFm\" expandable>\r\n <div sdGroupBody>\r\n <ng-container *ngTemplateOutlet=\"noCollapse\"></ng-container>\r\n </div>\r\n </sd-group>\r\n </ng-container>\r\n <ng-template #noCollapse>\r\n <div\r\n *ngIf=\"!isMobileOrTablet && (externalFilters?.length || filterDefs?.length)\"\r\n class=\"row mx-0\">\r\n <ng-container *ngIf=\"filter?.sorts?.length\">\r\n <ng-container *ngFor=\"let field of filter?.sorts\">\r\n <ng-container *ngIf=\"externalFilters?.length\">\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal:field\">\r\n <ng-container *ngTemplateOutlet=\"filterExternal; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of filterDefs\">\r\n <div *ngIf=\"inlineFilterDef[item.sdMaterialFilterDef] && item.sdMaterialFilterDef === field\"\r\n class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef;context:{filterDef:filterDef, isInline: true}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!filter?.sorts?.length\">\r\n <ng-container *ngIf=\"externalFilters?.length\">\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal\">\r\n <ng-container *ngTemplateOutlet=\"filterExternal; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of filterDefs\">\r\n <div *ngIf=\"inlineFilterDef[item.sdMaterialFilterDef]\" class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef;context:{filterDef:filterDef, isInline: true}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-template #filterExternal let-item=\"item\">\r\n <div *ngIf=\"inlineExternal[item.field]\" class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\" [(model)]=\"externalFilter[item.field]\"\r\n (keyupEnter)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\"\r\n (keyupEnter)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-input-number>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.option?.displayOnTrue || 'True' },\r\n {value:'0',display:item.option?.displayOnFalse || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-select>\r\n <ng-container *ngIf=\"(item.type === 'values' || item.type === 'lazy-values') && item.option\">\r\n <sd-select *ngIf=\"item.option?.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" [selectAll]=\"item.option.selectAll\"\r\n appearance=\"outline\" multiple>\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.option?.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\"\r\n [items]=\"item.option.items\" [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.option?.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\"\r\n [items]=\"item.option.items\" [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" filtered=\"true\" appearance=\"outline\"\r\n multiple>\r\n </sd-select>\r\n <sd-select *ngIf=\"!item.option?.selection\" [label]=\"item.title\" [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date' || item.type ==='datetime'\"\r\n [(model)]=\"externalFilter[item.field]\" [type]=\"item.type\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-date-time>\r\n <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterange' && externalFilter[item.field]\"\r\n [(from)]=\"externalFilter[item.field].from\" [(to)]=\"externalFilter[item.field].to\" [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-date-range>\r\n </div>\r\n </ng-template>\r\n <sd-popup-filter [filterRegister]=\"filterRegister\" [columns]=\"columns\"\r\n [externalFilters]=\"externalFilters\" [filterDefs]=\"filterDefs\">\r\n </sd-popup-filter>\r\n </ng-template>\r\n</ng-container>",
|
|
221
219
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
222
220
|
styles: [":host{display:block;padding-bottom:10px;padding-left:0;padding-right:0}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:0}"]
|
|
223
221
|
},] }
|
|
224
222
|
];
|
|
225
|
-
|
|
223
|
+
SdTableFilter.ctorParameters = () => [
|
|
226
224
|
{ type: ChangeDetectorRef },
|
|
227
225
|
{ type: DeviceDetectorService }
|
|
228
226
|
];
|
|
229
|
-
|
|
227
|
+
SdTableFilter.propDecorators = {
|
|
230
228
|
popupFilter: [{ type: ViewChild, args: [SdPopupFilter,] }],
|
|
231
229
|
_filter: [{ type: Input, args: ['filter',] }],
|
|
232
230
|
columns: [{ type: Input }],
|
|
@@ -301,221 +299,34 @@ SdMaterialEmptyDataDefDirective.ctorParameters = () => [
|
|
|
301
299
|
{ type: TemplateRef }
|
|
302
300
|
];
|
|
303
301
|
|
|
304
|
-
var _COLUMNS,
|
|
302
|
+
var _COLUMNS, _prefix, _getSetting, _default;
|
|
305
303
|
class SdTableConfigurationService {
|
|
306
304
|
constructor(settingService, gridMaterialConfiguration) {
|
|
307
305
|
this.settingService = settingService;
|
|
308
306
|
this.gridMaterialConfiguration = gridMaterialConfiguration;
|
|
309
307
|
_COLUMNS.set(this, {
|
|
310
|
-
EDITORVALIDATION: 'sdEditorValidation',
|
|
311
|
-
EDITOR: 'sdEditor',
|
|
312
308
|
SUBINFORMATION: 'sdSubInformationAction',
|
|
313
309
|
COMMAND: 'sdCommand',
|
|
314
310
|
SELECTION: 'sdSelection',
|
|
315
311
|
GROUP: 'sdGroup',
|
|
316
312
|
});
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
if (
|
|
320
|
-
|
|
321
|
-
__classPrivateFieldGet(this, _cache)[key] = {
|
|
322
|
-
load: __classPrivateFieldGet(this, _load).call(this, gridOption, subject),
|
|
323
|
-
get: __classPrivateFieldGet(this, _get).call(this, gridOption),
|
|
324
|
-
set: (configuration) => {
|
|
325
|
-
configuration = __classPrivateFieldGet(this, _set).call(this, gridOption, configuration);
|
|
326
|
-
subject.next(Object.assign({}, configuration));
|
|
327
|
-
return configuration;
|
|
328
|
-
},
|
|
329
|
-
remove: () => {
|
|
330
|
-
__classPrivateFieldGet(this, _remove).call(this, gridOption)();
|
|
331
|
-
subject.next(__classPrivateFieldGet(this, _default).call(this, gridOption));
|
|
332
|
-
},
|
|
333
|
-
observer: subject,
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
return __classPrivateFieldGet(this, _cache)[key];
|
|
337
|
-
};
|
|
338
|
-
_getKey.set(this, (gridOption) => {
|
|
339
|
-
var _a, _b;
|
|
340
|
-
const prefix = 'c9e94836-6ace-4aeb-b148-4f0be63589ee';
|
|
341
|
-
if (!((_a = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _a === void 0 ? void 0 : _a.key) && !(gridOption === null || gridOption === void 0 ? void 0 : gridOption.key)) {
|
|
342
|
-
return null;
|
|
313
|
+
_prefix.set(this, 'bd364e28-fe67-48b9-a537-1a306f7d195c');
|
|
314
|
+
_getSetting.set(this, (gridOption) => {
|
|
315
|
+
if (gridOption === null || gridOption === void 0 ? void 0 : gridOption.key) {
|
|
316
|
+
throw new Error('Invalid key');
|
|
343
317
|
}
|
|
344
|
-
return
|
|
345
|
-
|
|
346
|
-
key: ((_b = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _b === void 0 ? void 0 : _b.key) || !(gridOption === null || gridOption === void 0 ? void 0 : gridOption.key),
|
|
347
|
-
});
|
|
348
|
-
});
|
|
349
|
-
_default.set(this, (gridOption) => {
|
|
350
|
-
var _a;
|
|
351
|
-
const columns = ((_a = gridOption === null || gridOption === void 0 ? void 0 : gridOption.columns) === null || _a === void 0 ? void 0 : _a.filter(e => !e.hidden).map(e => ({
|
|
352
|
-
origin: {
|
|
353
|
-
field: e.field,
|
|
354
|
-
title: e.title,
|
|
355
|
-
width: e.width,
|
|
356
|
-
invisible: e.invisible,
|
|
357
|
-
},
|
|
358
|
-
invisible: e.invisible,
|
|
359
|
-
fixed: false,
|
|
360
|
-
}))) || [];
|
|
361
|
-
return {
|
|
362
|
-
columns,
|
|
363
|
-
};
|
|
364
|
-
});
|
|
365
|
-
_load.set(this, (gridOption, subject) => {
|
|
366
|
-
return () => __awaiter(this, void 0, void 0, function* () {
|
|
367
|
-
const get = __classPrivateFieldGet(this, _get).call(this, gridOption);
|
|
368
|
-
const configuration = yield get();
|
|
369
|
-
subject.next(Object.assign({}, configuration));
|
|
370
|
-
});
|
|
371
|
-
});
|
|
372
|
-
_get.set(this, (gridOption) => {
|
|
373
|
-
return () => __awaiter(this, void 0, void 0, function* () {
|
|
374
|
-
const key = __classPrivateFieldGet(this, _getKey).call(this, gridOption);
|
|
375
|
-
if (!key) {
|
|
376
|
-
return __classPrivateFieldGet(this, _default).call(this, gridOption);
|
|
377
|
-
}
|
|
378
|
-
const { columns, config } = gridOption;
|
|
379
|
-
let configuration;
|
|
380
|
-
if ((config === null || config === void 0 ? void 0 : config.storage) === 'server') {
|
|
381
|
-
const { get, remove } = this.settingService.createServer(key, {
|
|
382
|
-
args: config === null || config === void 0 ? void 0 : config.args,
|
|
383
|
-
});
|
|
384
|
-
configuration = yield get().catch(() => undefined);
|
|
385
|
-
if (!(configuration === null || configuration === void 0 ? void 0 : configuration.columns)) {
|
|
386
|
-
remove().catch(console.error);
|
|
387
|
-
return __classPrivateFieldGet(this, _default).call(this, gridOption);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
else {
|
|
391
|
-
const { get, remove } = this.settingService.create(key, {
|
|
392
|
-
type: config === null || config === void 0 ? void 0 : config.storage,
|
|
393
|
-
args: config === null || config === void 0 ? void 0 : config.args,
|
|
394
|
-
});
|
|
395
|
-
configuration = get();
|
|
396
|
-
if (!(configuration === null || configuration === void 0 ? void 0 : configuration.columns)) {
|
|
397
|
-
remove();
|
|
398
|
-
return __classPrivateFieldGet(this, _default).call(this, gridOption);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
configuration.columns = configuration.columns.filter(column => columns.some(e => !e.hidden && e.field === column.origin.field));
|
|
402
|
-
// Thêm những column mới vào storage nếu có
|
|
403
|
-
columns.forEach(column => {
|
|
404
|
-
const col = configuration.columns.find(e => { var _a; return ((_a = e.origin) === null || _a === void 0 ? void 0 : _a.field) === column.field; });
|
|
405
|
-
if (!col) {
|
|
406
|
-
configuration.columns.push({
|
|
407
|
-
origin: {
|
|
408
|
-
field: column.field,
|
|
409
|
-
title: column.title,
|
|
410
|
-
width: column.width,
|
|
411
|
-
invisible: column.invisible,
|
|
412
|
-
},
|
|
413
|
-
invisible: column.invisible,
|
|
414
|
-
fixed: false,
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
else {
|
|
418
|
-
col.origin = {
|
|
419
|
-
field: column.field,
|
|
420
|
-
title: column.title,
|
|
421
|
-
width: column.width,
|
|
422
|
-
invisible: column.invisible,
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
return configuration;
|
|
318
|
+
return this.settingService.create({ prefix: __classPrivateFieldGet(this, _prefix), key: gridOption.key }, {
|
|
319
|
+
default: __classPrivateFieldGet(this, _default).call(this, gridOption),
|
|
427
320
|
});
|
|
428
321
|
});
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
if (key) {
|
|
433
|
-
if (((_a = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _a === void 0 ? void 0 : _a.storage) === 'server') {
|
|
434
|
-
const { set } = this.settingService.createServer(key, {
|
|
435
|
-
args: (_b = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _b === void 0 ? void 0 : _b.args,
|
|
436
|
-
});
|
|
437
|
-
set(configuration);
|
|
438
|
-
}
|
|
439
|
-
else {
|
|
440
|
-
const { set } = this.settingService.create(key, {
|
|
441
|
-
type: (_c = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _c === void 0 ? void 0 : _c.storage,
|
|
442
|
-
args: (_d = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _d === void 0 ? void 0 : _d.args,
|
|
443
|
-
});
|
|
444
|
-
set(configuration);
|
|
445
|
-
}
|
|
322
|
+
this.loadConfiguration = (gridOption) => {
|
|
323
|
+
if (!(gridOption === null || gridOption === void 0 ? void 0 : gridOption.key)) {
|
|
324
|
+
return __classPrivateFieldGet(this, _default).call(this, gridOption);
|
|
446
325
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
var _a, _b, _c, _d;
|
|
452
|
-
const key = __classPrivateFieldGet(this, _getKey).call(this, gridOption);
|
|
453
|
-
if (key) {
|
|
454
|
-
if (((_a = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _a === void 0 ? void 0 : _a.storage) === 'server') {
|
|
455
|
-
const { remove } = this.settingService.createServer(key, {
|
|
456
|
-
args: (_b = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _b === void 0 ? void 0 : _b.args,
|
|
457
|
-
});
|
|
458
|
-
remove();
|
|
459
|
-
}
|
|
460
|
-
else {
|
|
461
|
-
const { remove } = this.settingService.create(key, {
|
|
462
|
-
type: (_c = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _c === void 0 ? void 0 : _c.storage,
|
|
463
|
-
args: (_d = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _d === void 0 ? void 0 : _d.args,
|
|
464
|
-
});
|
|
465
|
-
remove();
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
});
|
|
470
|
-
// get = async (gridOption: SdGridMaterialOption): Promise<SdGridConfiguration> => {
|
|
471
|
-
// if (!gridOption?.key) {
|
|
472
|
-
// return this.#getDefaultConfiguration(gridOption);
|
|
473
|
-
// }
|
|
474
|
-
// const { key, columns } = gridOption;
|
|
475
|
-
// const configuration: SdGridConfiguration = await this.settingService.get(this.#getKey(key)).catch(() => undefined);
|
|
476
|
-
// if (!configuration?.columns) {
|
|
477
|
-
// this.settingService.remove(this.#getKey(key)).catch(console.error);
|
|
478
|
-
// return this.#getDefaultConfiguration(gridOption);
|
|
479
|
-
// }
|
|
480
|
-
// configuration.columns = configuration.columns
|
|
481
|
-
// .filter(column => columns.some(e => !e.hidden && e.field === column.origin.field));
|
|
482
|
-
// // Thêm những column mới vào storage nếu có
|
|
483
|
-
// columns.forEach(column => {
|
|
484
|
-
// const col = configuration.columns.find(e => e.origin?.field === column.field);
|
|
485
|
-
// if (!col) {
|
|
486
|
-
// configuration.columns.push({
|
|
487
|
-
// origin: {
|
|
488
|
-
// field: column.field,
|
|
489
|
-
// title: column.title,
|
|
490
|
-
// width: column.width,
|
|
491
|
-
// invisible: column.invisible,
|
|
492
|
-
// },
|
|
493
|
-
// invisible: column.invisible,
|
|
494
|
-
// fixed: false
|
|
495
|
-
// });
|
|
496
|
-
// } else {
|
|
497
|
-
// col.origin = {
|
|
498
|
-
// field: column.field,
|
|
499
|
-
// title: column.title,
|
|
500
|
-
// width: column.width,
|
|
501
|
-
// invisible: column.invisible
|
|
502
|
-
// };
|
|
503
|
-
// }
|
|
504
|
-
// });
|
|
505
|
-
// return configuration;
|
|
506
|
-
// }
|
|
507
|
-
// set = async (key: string, configuration: SdGridConfiguration): Promise<SdGridConfiguration> => {
|
|
508
|
-
// if (key) {
|
|
509
|
-
// this.settingService.set(this.#getKey(key), configuration);
|
|
510
|
-
// }
|
|
511
|
-
// return configuration;
|
|
512
|
-
// }
|
|
513
|
-
// remove = (key: string) => {
|
|
514
|
-
// if (key) {
|
|
515
|
-
// this.settingService.remove(this.#getKey(key));
|
|
516
|
-
// }
|
|
517
|
-
// }
|
|
518
|
-
this.generateConfigurationResult = (configuration, gridOption, sdSubInformation) => {
|
|
326
|
+
const setting = __classPrivateFieldGet(this, _getSetting).call(this, gridOption);
|
|
327
|
+
return setting.get();
|
|
328
|
+
};
|
|
329
|
+
this.loadConfigurationResult = (gridOption, configuration) => {
|
|
519
330
|
var _a, _b;
|
|
520
331
|
const result = {
|
|
521
332
|
column: {},
|
|
@@ -567,7 +378,7 @@ class SdTableConfigurationService {
|
|
|
567
378
|
}
|
|
568
379
|
}
|
|
569
380
|
});
|
|
570
|
-
if (
|
|
381
|
+
if (gridOption.expand) {
|
|
571
382
|
result.firstHeaders.push(__classPrivateFieldGet(this, _COLUMNS).SUBINFORMATION);
|
|
572
383
|
result.displayedColumns.push(__classPrivateFieldGet(this, _COLUMNS).SUBINFORMATION);
|
|
573
384
|
}
|
|
@@ -576,9 +387,28 @@ class SdTableConfigurationService {
|
|
|
576
387
|
result.displayedFooters = result.displayedColumns.filter(val => val !== __classPrivateFieldGet(this, _COLUMNS).SUBINFORMATION);
|
|
577
388
|
return result;
|
|
578
389
|
};
|
|
390
|
+
this.init = (gridOption) => {
|
|
391
|
+
return __classPrivateFieldGet(this, _getSetting).call(this, gridOption);
|
|
392
|
+
};
|
|
393
|
+
_default.set(this, (gridOption) => {
|
|
394
|
+
var _a;
|
|
395
|
+
const columns = ((_a = gridOption === null || gridOption === void 0 ? void 0 : gridOption.columns) === null || _a === void 0 ? void 0 : _a.filter(e => !e.hidden).map(e => ({
|
|
396
|
+
origin: {
|
|
397
|
+
field: e.field,
|
|
398
|
+
title: e.title,
|
|
399
|
+
width: e.width,
|
|
400
|
+
invisible: e.invisible,
|
|
401
|
+
},
|
|
402
|
+
invisible: e.invisible,
|
|
403
|
+
fixed: false,
|
|
404
|
+
}))) || [];
|
|
405
|
+
return {
|
|
406
|
+
columns,
|
|
407
|
+
};
|
|
408
|
+
});
|
|
579
409
|
}
|
|
580
410
|
}
|
|
581
|
-
_COLUMNS = new WeakMap(),
|
|
411
|
+
_COLUMNS = new WeakMap(), _prefix = new WeakMap(), _getSetting = new WeakMap(), _default = new WeakMap();
|
|
582
412
|
SdTableConfigurationService.decorators = [
|
|
583
413
|
{ type: Injectable }
|
|
584
414
|
];
|
|
@@ -588,10 +418,10 @@ SdTableConfigurationService.ctorParameters = () => [
|
|
|
588
418
|
];
|
|
589
419
|
|
|
590
420
|
const MapToSdTableItem = (item) => ({
|
|
591
|
-
|
|
592
|
-
origin: item,
|
|
421
|
+
data: item,
|
|
593
422
|
meta: {
|
|
594
423
|
id: hash(item),
|
|
424
|
+
display: {},
|
|
595
425
|
expand: {
|
|
596
426
|
isExpanding: false,
|
|
597
427
|
isExpanded: false,
|
|
@@ -601,73 +431,13 @@ const MapToSdTableItem = (item) => ({
|
|
|
601
431
|
},
|
|
602
432
|
});
|
|
603
433
|
|
|
604
|
-
var
|
|
605
|
-
class SdColumnValuesPipe {
|
|
606
|
-
constructor() {
|
|
607
|
-
_prefix.set(this, 'a1e67660-8aa2-4c11-b02d-71a32188719f');
|
|
608
|
-
_cache$1.set(this, {});
|
|
609
|
-
this.transform = (value, column) => __awaiter(this, void 0, void 0, function* () {
|
|
610
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
611
|
-
if (column.type !== 'values' || !((_a = column.option) === null || _a === void 0 ? void 0 : _a.items) || !((_b = column.option) === null || _b === void 0 ? void 0 : _b.valueField) || !((_c = column.option) === null || _c === void 0 ? void 0 : _c.displayField)) {
|
|
612
|
-
return value;
|
|
613
|
-
}
|
|
614
|
-
const _l = column.option, { items, valueField, displayField, selection } = _l, remain = __rest(_l, ["items", "valueField", "displayField", "selection"]);
|
|
615
|
-
const key = hash__default({
|
|
616
|
-
prefix: __classPrivateFieldGet(this, _prefix),
|
|
617
|
-
valueField,
|
|
618
|
-
displayField,
|
|
619
|
-
selection,
|
|
620
|
-
remain,
|
|
621
|
-
value
|
|
622
|
-
});
|
|
623
|
-
const isMultible = ['MULTIPLE', 'MULTIPLEAUTOCOMPLETE', 'MULTIPLE_EDITOR', 'MULTIPLEAUTOCOMPLETE_EDITOR'].includes(selection);
|
|
624
|
-
if (typeof (items) === 'function') {
|
|
625
|
-
if (!__classPrivateFieldGet(this, _cache$1)[key]) {
|
|
626
|
-
const values = yield items(value, true);
|
|
627
|
-
let result = '';
|
|
628
|
-
if (isMultible && Array.isArray(value)) {
|
|
629
|
-
result = ((_e = (_d = values === null || values === void 0 ? void 0 : values.filter(e => value === null || value === void 0 ? void 0 : value.includes(e === null || e === void 0 ? void 0 : e[valueField]))) === null || _d === void 0 ? void 0 : _d.map(e => e === null || e === void 0 ? void 0 : e[displayField])) === null || _e === void 0 ? void 0 : _e.join(', ')) || (value === null || value === void 0 ? void 0 : value.join(', '));
|
|
630
|
-
}
|
|
631
|
-
else {
|
|
632
|
-
result = ((_f = values === null || values === void 0 ? void 0 : values.find(e => (e === null || e === void 0 ? void 0 : e[valueField]) === value)) === null || _f === void 0 ? void 0 : _f[displayField]) || value;
|
|
633
|
-
}
|
|
634
|
-
__classPrivateFieldGet(this, _cache$1)[key] = {
|
|
635
|
-
result
|
|
636
|
-
};
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
else {
|
|
640
|
-
if (!__classPrivateFieldGet(this, _cache$1)[key]) {
|
|
641
|
-
let result = '';
|
|
642
|
-
if (isMultible && Array.isArray(value)) {
|
|
643
|
-
result = (_j = (_h = (_g = items === null || items === void 0 ? void 0 : items.filter(e => value === null || value === void 0 ? void 0 : value.includes(e === null || e === void 0 ? void 0 : e[valueField]))) === null || _g === void 0 ? void 0 : _g.map(e => e === null || e === void 0 ? void 0 : e[displayField])) === null || _h === void 0 ? void 0 : _h.join(', ')) !== null && _j !== void 0 ? _j : value === null || value === void 0 ? void 0 : value.join(', ');
|
|
644
|
-
}
|
|
645
|
-
else {
|
|
646
|
-
result = ((_k = items === null || items === void 0 ? void 0 : items.find(e => (e === null || e === void 0 ? void 0 : e[valueField]) === value)) === null || _k === void 0 ? void 0 : _k[displayField]) || value;
|
|
647
|
-
}
|
|
648
|
-
__classPrivateFieldGet(this, _cache$1)[key] = {
|
|
649
|
-
result
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
return __classPrivateFieldGet(this, _cache$1)[key].result;
|
|
654
|
-
});
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
_prefix = new WeakMap(), _cache$1 = new WeakMap();
|
|
658
|
-
SdColumnValuesPipe.decorators = [
|
|
659
|
-
{ type: Pipe, args: [{
|
|
660
|
-
name: 'columnValues'
|
|
661
|
-
},] }
|
|
662
|
-
];
|
|
663
|
-
|
|
664
|
-
var _filterConfiguration, _filterValue, _cache$2, _defaultConfiguration, _defaultValue, _initConfiguration, _initValue;
|
|
434
|
+
var _filterConfiguration, _filterValue, _cache, _defaultConfiguration, _defaultValue, _initConfiguration, _initValue;
|
|
665
435
|
class SdTableFilterService {
|
|
666
436
|
constructor(settingService) {
|
|
667
437
|
this.settingService = settingService;
|
|
668
438
|
_filterConfiguration.set(this, 'GRID-FILTER-CONFIGURATION');
|
|
669
439
|
_filterValue.set(this, 'GRID-FILTER-VALUE');
|
|
670
|
-
_cache
|
|
440
|
+
_cache.set(this, {});
|
|
671
441
|
this.register = (filter, args) => {
|
|
672
442
|
let cacheSession = false;
|
|
673
443
|
const { id, columns, externalFilters } = args;
|
|
@@ -680,7 +450,7 @@ class SdTableFilterService {
|
|
|
680
450
|
if (!(filter === null || filter === void 0 ? void 0 : filter.key)) {
|
|
681
451
|
cacheSession = true; // Nếu không có key thì chỉ lưu theo session
|
|
682
452
|
}
|
|
683
|
-
if (!__classPrivateFieldGet(this, _cache
|
|
453
|
+
if (!__classPrivateFieldGet(this, _cache)[key]) {
|
|
684
454
|
// Setting của filter configuration
|
|
685
455
|
const filterConfiguration = this.settingService.create({
|
|
686
456
|
prefix: __classPrivateFieldGet(this, _filterConfiguration),
|
|
@@ -701,7 +471,7 @@ class SdTableFilterService {
|
|
|
701
471
|
});
|
|
702
472
|
// Lấy giá trị value merge với giá trị default của args nếu như args có thay đổi
|
|
703
473
|
filterValue.set(__classPrivateFieldGet(this, _initValue).call(this, args, filterValue.get()));
|
|
704
|
-
__classPrivateFieldGet(this, _cache
|
|
474
|
+
__classPrivateFieldGet(this, _cache)[key] = {
|
|
705
475
|
configuration: {
|
|
706
476
|
get: () => {
|
|
707
477
|
return filterConfiguration.get();
|
|
@@ -757,7 +527,7 @@ class SdTableFilterService {
|
|
|
757
527
|
},
|
|
758
528
|
};
|
|
759
529
|
}
|
|
760
|
-
return __classPrivateFieldGet(this, _cache
|
|
530
|
+
return __classPrivateFieldGet(this, _cache)[key];
|
|
761
531
|
};
|
|
762
532
|
_defaultConfiguration.set(this, (args) => {
|
|
763
533
|
var _a;
|
|
@@ -877,7 +647,7 @@ class SdTableFilterService {
|
|
|
877
647
|
});
|
|
878
648
|
}
|
|
879
649
|
}
|
|
880
|
-
_filterConfiguration = new WeakMap(), _filterValue = new WeakMap(), _cache
|
|
650
|
+
_filterConfiguration = new WeakMap(), _filterValue = new WeakMap(), _cache = new WeakMap(), _defaultConfiguration = new WeakMap(), _defaultValue = new WeakMap(), _initConfiguration = new WeakMap(), _initValue = new WeakMap();
|
|
881
651
|
SdTableFilterService.decorators = [
|
|
882
652
|
{ type: Injectable }
|
|
883
653
|
];
|
|
@@ -885,15 +655,78 @@ SdTableFilterService.ctorParameters = () => [
|
|
|
885
655
|
{ type: SdSettingService }
|
|
886
656
|
];
|
|
887
657
|
|
|
888
|
-
var
|
|
658
|
+
var _setting;
|
|
659
|
+
class SdPopupConfiguration {
|
|
660
|
+
constructor(ref, notifyService, gridConfigurationService) {
|
|
661
|
+
this.ref = ref;
|
|
662
|
+
this.notifyService = notifyService;
|
|
663
|
+
this.gridConfigurationService = gridConfigurationService;
|
|
664
|
+
this.changes = new EventEmitter();
|
|
665
|
+
_setting.set(this, void 0);
|
|
666
|
+
this.isCreatingColumn = false;
|
|
667
|
+
this.selected = {};
|
|
668
|
+
this.disabledDrag = true;
|
|
669
|
+
this.open = () => __awaiter(this, void 0, void 0, function* () {
|
|
670
|
+
__classPrivateFieldSet(this, _setting, this.gridConfigurationService.init(this.gridOption));
|
|
671
|
+
this.configuration = __classPrivateFieldGet(this, _setting).get();
|
|
672
|
+
this.modal.open();
|
|
673
|
+
});
|
|
674
|
+
this.onSave = () => {
|
|
675
|
+
__classPrivateFieldGet(this, _setting).set(this.configuration);
|
|
676
|
+
this.modal.close();
|
|
677
|
+
this.ref.detectChanges();
|
|
678
|
+
};
|
|
679
|
+
this.onReset = () => __awaiter(this, void 0, void 0, function* () {
|
|
680
|
+
this.notifyService.confirm('Xác nhận đưa tất cả thiết lập về mặc định').then(() => {
|
|
681
|
+
__classPrivateFieldGet(this, _setting).remove();
|
|
682
|
+
this.modal.close();
|
|
683
|
+
this.ref.detectChanges();
|
|
684
|
+
});
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
ngOnInit() { }
|
|
688
|
+
mouseUp(event) {
|
|
689
|
+
this.disabledDrag = true;
|
|
690
|
+
}
|
|
691
|
+
dropTable(event) {
|
|
692
|
+
moveItemInArray(this.configuration.columns, event.previousIndex, event.currentIndex);
|
|
693
|
+
this.table.renderRows();
|
|
694
|
+
}
|
|
695
|
+
handleMouseDown() {
|
|
696
|
+
this.disabledDrag = false;
|
|
697
|
+
}
|
|
698
|
+
handleMouseUp() {
|
|
699
|
+
this.disabledDrag = true;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
_setting = new WeakMap();
|
|
703
|
+
SdPopupConfiguration.decorators = [
|
|
704
|
+
{ type: Component, args: [{
|
|
705
|
+
selector: 'sd-popup-configuration',
|
|
706
|
+
template: "<sd-modal width=\"sm\" [title]=\"'Configuration' | sdTranslate\" #modal>\r\n <sd-modal-body *ngIf=\"configuration\">\r\n <div class=\"c-container\">\r\n <div class=\"c-table\" style=\"max-height: 70vh\">\r\n <table\r\n #table\r\n mat-table\r\n [dataSource]=\"configuration.columns\"\r\n cdkDropList\r\n [cdkDropListData]=\"configuration.columns\"\r\n (cdkDropListDropped)=\"dropTable($event)\">\r\n >\r\n <ng-container matColumnDef=\"stt\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\r\n <div class=\"c-handle\" (mousedown)=\"handleMouseDown()\" (mouseup)=\"handleMouseUp()\">\r\n <svg width=\"24px\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"></path>\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\r\n </svg>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"title\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>{{ 'Title' | sdTranslate }}</th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\r\n <sd-input [placeholder]=\"item?.origin?.title\" [(model)]=\"item.title\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"width\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Width' | sdTranslate }}</th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\r\n <!-- <span>{{item.width}}</span>\r\n <mat-slider\r\n step=\"1\"\r\n min=\"0\"\r\n [max]=\"+item?.origin?.width*3\"\r\n [(ngModel)]=\"+item.width\"\r\n aria-label=\"units\">\r\n </mat-slider> -->\r\n <sd-input [placeholder]=\"item?.origin?.width\" [(model)]=\"item.width\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"invisible\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Hidden' | sdTranslate }}</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item\">\r\n <mat-slide-toggle [(ngModel)]=\"item.invisible\" color=\"primary\"> </mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"fixed\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Freeze' | sdTranslate }}</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item\">\r\n <mat-slide-toggle [(ngModel)]=\"item.fixed\" color=\"primary\"></mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'title', 'width', 'invisible', 'fixed']; sticky: true\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: ['stt', 'title', 'width', 'invisible', 'fixed']\"\r\n cdkDrag\r\n [cdkDragData]=\"row\"\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragDisabled]=\"disabledDrag\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n </sd-modal-body>\r\n <sd-modal-footer>\r\n <sd-button class=\"mr-8s\" (action)=\"onReset()\" title=\"M\u1EB7c \u0111\u1ECBnh\" color=\"info\" size=\"sm\"> </sd-button>\r\n <sd-button (action)=\"onSave()\" title=\"L\u01B0u\" type=\"fill\" color=\"info\" size=\"sm\"> </sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>\r\n",
|
|
707
|
+
styles: [".c-table{overflow:auto;position:relative}.c-table table{width:100%}.c-table .c-th{color:#000;font-size:14px;font-weight:500;line-height:20px}.c-container{min-height:200px;position:relative}.c-handle{color:#ccc;cursor:move}"]
|
|
708
|
+
},] }
|
|
709
|
+
];
|
|
710
|
+
SdPopupConfiguration.ctorParameters = () => [
|
|
711
|
+
{ type: ChangeDetectorRef },
|
|
712
|
+
{ type: SdNotifyService },
|
|
713
|
+
{ type: SdTableConfigurationService }
|
|
714
|
+
];
|
|
715
|
+
SdPopupConfiguration.propDecorators = {
|
|
716
|
+
gridOption: [{ type: Input }],
|
|
717
|
+
modal: [{ type: ViewChild, args: ['modal',] }],
|
|
718
|
+
table: [{ type: ViewChild, args: ['table',] }],
|
|
719
|
+
mouseUp: [{ type: HostListener, args: ['window:mouseup', ['$event'],] }]
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
var _gridId, _optionChanges, _localItems, _paginator, _sort, _subscription$1, _reload, _loadCompleted, _cacheObjValues, _initCellDef, _initFilterDef, _initFooterDef, _filterExportInfo, _initConfiguration$1, _loadFilterRegister, _filterLocal, _getFilter, _load, _render, _exportedItems, _allColumns, _allExportedColumns, _onExport, _getExportColumns, _updateSelectedItems, _loadValues, _format;
|
|
889
723
|
class SdTable {
|
|
890
|
-
constructor(ref,
|
|
724
|
+
constructor(ref, tableConfiguration, gridConfigurationService, exportService, notifyService, gridFilterService) {
|
|
891
725
|
this.ref = ref;
|
|
892
|
-
this.
|
|
726
|
+
this.tableConfiguration = tableConfiguration;
|
|
893
727
|
this.gridConfigurationService = gridConfigurationService;
|
|
894
728
|
this.exportService = exportService;
|
|
895
729
|
this.notifyService = notifyService;
|
|
896
|
-
this.columnValuesPipe = columnValuesPipe;
|
|
897
730
|
this.gridFilterService = gridFilterService;
|
|
898
731
|
_gridId.set(this, v4());
|
|
899
732
|
this.key = v4();
|
|
@@ -928,6 +761,8 @@ class SdTable {
|
|
|
928
761
|
this.isSelectAll = false;
|
|
929
762
|
this.exportTitle = 'Export';
|
|
930
763
|
_loadCompleted.set(this, false);
|
|
764
|
+
this.cacheValues = {};
|
|
765
|
+
_cacheObjValues.set(this, {});
|
|
931
766
|
_initCellDef.set(this, () => {
|
|
932
767
|
this.cellDef = {};
|
|
933
768
|
for (const cellDef of this.sdCellDefs) {
|
|
@@ -972,23 +807,23 @@ class SdTable {
|
|
|
972
807
|
// Init pagination
|
|
973
808
|
option.paginate = {
|
|
974
809
|
hidden: (_a = option === null || option === void 0 ? void 0 : option.paginate) === null || _a === void 0 ? void 0 : _a.hidden,
|
|
975
|
-
pageSize: (_f = (_c = (_b = option === null || option === void 0 ? void 0 : option.paginate) === null || _b === void 0 ? void 0 : _b.pageSize) !== null && _c !== void 0 ? _c : (_e = (_d = this.
|
|
976
|
-
pages: (_m = (_j = (_h = option === null || option === void 0 ? void 0 : option.paginate) === null || _h === void 0 ? void 0 : _h.pages) !== null && _j !== void 0 ? _j : (_l = (_k = this.
|
|
810
|
+
pageSize: (_f = (_c = (_b = option === null || option === void 0 ? void 0 : option.paginate) === null || _b === void 0 ? void 0 : _b.pageSize) !== null && _c !== void 0 ? _c : (_e = (_d = this.tableConfiguration) === null || _d === void 0 ? void 0 : _d.paginate) === null || _e === void 0 ? void 0 : _e.pageSize) !== null && _f !== void 0 ? _f : (_g = DEFAULT_TABLE_CONFIG.paginate) === null || _g === void 0 ? void 0 : _g.pageSize,
|
|
811
|
+
pages: (_m = (_j = (_h = option === null || option === void 0 ? void 0 : option.paginate) === null || _h === void 0 ? void 0 : _h.pages) !== null && _j !== void 0 ? _j : (_l = (_k = this.tableConfiguration) === null || _k === void 0 ? void 0 : _k.paginate) === null || _l === void 0 ? void 0 : _l.pages) !== null && _m !== void 0 ? _m : (_o = DEFAULT_TABLE_CONFIG.paginate) === null || _o === void 0 ? void 0 : _o.pages,
|
|
977
812
|
showFirstLastButtons: (_q = (_p = option === null || option === void 0 ? void 0 : option.paginate) === null || _p === void 0 ? void 0 : _p.showFirstLastButtons) !== null && _q !== void 0 ? _q : false,
|
|
978
813
|
};
|
|
979
814
|
for (const column of option.columns || []) {
|
|
980
815
|
if (((_s = (_r = column.filter) === null || _r === void 0 ? void 0 : _r.operator) === null || _s === void 0 ? void 0 : _s.enable) && !((_v = (_u = (_t = column.filter) === null || _t === void 0 ? void 0 : _t.operator) === null || _u === void 0 ? void 0 : _u.list) === null || _v === void 0 ? void 0 : _v.length)) {
|
|
981
816
|
if (column.type === 'string') {
|
|
982
|
-
column.filter.operator.list = ((_y = (_x = (_w = this.
|
|
817
|
+
column.filter.operator.list = ((_y = (_x = (_w = this.tableConfiguration) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.operator) === null || _y === void 0 ? void 0 : _y.defaultListString) || [];
|
|
983
818
|
}
|
|
984
819
|
if (column.type === 'number') {
|
|
985
|
-
column.filter.operator.list = ((_1 = (_0 = (_z = this.
|
|
820
|
+
column.filter.operator.list = ((_1 = (_0 = (_z = this.tableConfiguration) === null || _z === void 0 ? void 0 : _z.filter) === null || _0 === void 0 ? void 0 : _0.operator) === null || _1 === void 0 ? void 0 : _1.defaultListNumber) || [];
|
|
986
821
|
}
|
|
987
|
-
if (column.type === 'values') {
|
|
988
|
-
column.filter.operator.list = ((_4 = (_3 = (_2 = this.
|
|
822
|
+
if (column.type === 'values' || column.type === 'lazy-values') {
|
|
823
|
+
column.filter.operator.list = ((_4 = (_3 = (_2 = this.tableConfiguration) === null || _2 === void 0 ? void 0 : _2.filter) === null || _3 === void 0 ? void 0 : _3.operator) === null || _4 === void 0 ? void 0 : _4.defaultListValues) || [];
|
|
989
824
|
}
|
|
990
825
|
if (column.type === 'date' || column.type === 'datetime') {
|
|
991
|
-
column.filter.operator.list = ((_7 = (_6 = (_5 = this.
|
|
826
|
+
column.filter.operator.list = ((_7 = (_6 = (_5 = this.tableConfiguration) === null || _5 === void 0 ? void 0 : _5.filter) === null || _6 === void 0 ? void 0 : _6.operator) === null || _7 === void 0 ? void 0 : _7.defaultListDate) || [];
|
|
992
827
|
}
|
|
993
828
|
}
|
|
994
829
|
}
|
|
@@ -1026,7 +861,7 @@ class SdTable {
|
|
|
1026
861
|
const { rawColumnFilter, orderBy, orderDirection, pageSize, pageNumber } = filterInfo;
|
|
1027
862
|
const items = localItems.filter(tableItem => {
|
|
1028
863
|
var _a, _b, _c, _d;
|
|
1029
|
-
const item = tableItem.
|
|
864
|
+
const item = tableItem.data;
|
|
1030
865
|
for (const column of columns) {
|
|
1031
866
|
const { field, type } = column;
|
|
1032
867
|
const filterValue = (rawColumnFilter[field] || '').toString().trim().toLowerCase();
|
|
@@ -1040,7 +875,7 @@ class SdTable {
|
|
|
1040
875
|
return false;
|
|
1041
876
|
}
|
|
1042
877
|
}
|
|
1043
|
-
else if (type === 'values') {
|
|
878
|
+
else if (type === 'values' || type === 'lazy-values') {
|
|
1044
879
|
if (columnValue !== filterValue) {
|
|
1045
880
|
return false;
|
|
1046
881
|
}
|
|
@@ -1107,17 +942,17 @@ class SdTable {
|
|
|
1107
942
|
if (column) {
|
|
1108
943
|
const { type, field } = column;
|
|
1109
944
|
items.sort((tableItemCurrent, tableItemNext) => {
|
|
1110
|
-
const
|
|
1111
|
-
const next = tableItemNext.
|
|
945
|
+
const data = tableItemCurrent.data;
|
|
946
|
+
const next = tableItemNext.data;
|
|
1112
947
|
if (type === 'number') {
|
|
1113
|
-
return (
|
|
948
|
+
return (data[field] || 0) - (next[field] || 0);
|
|
1114
949
|
}
|
|
1115
950
|
if (type === 'date' || type === 'datetime' || type === 'time') {
|
|
1116
|
-
const d1 = new Date(
|
|
1117
|
-
const d2 = new Date(
|
|
951
|
+
const d1 = new Date(data[field] || '').getTime();
|
|
952
|
+
const d2 = new Date(data[field] || '').getTime();
|
|
1118
953
|
return d1 - d2;
|
|
1119
954
|
}
|
|
1120
|
-
const s1 = (
|
|
955
|
+
const s1 = (data[field] || '').toString();
|
|
1121
956
|
const s2 = (next[field] || '').toString();
|
|
1122
957
|
if (s1 > s2) {
|
|
1123
958
|
return 1;
|
|
@@ -1153,7 +988,7 @@ class SdTable {
|
|
|
1153
988
|
pageSize: ((_d = __classPrivateFieldGet(this, _paginator)) === null || _d === void 0 ? void 0 : _d.pageSize) || ((_f = (_e = this.gridOption) === null || _e === void 0 ? void 0 : _e.paginate) === null || _f === void 0 ? void 0 : _f.pageSize) || 50,
|
|
1154
989
|
};
|
|
1155
990
|
});
|
|
1156
|
-
_load
|
|
991
|
+
_load.set(this, (filterReq, force = true) => __awaiter(this, void 0, void 0, function* () {
|
|
1157
992
|
this.isLoading = true;
|
|
1158
993
|
if (this.gridOption.type === 'server') {
|
|
1159
994
|
const { items } = this.gridOption;
|
|
@@ -1167,7 +1002,7 @@ class SdTable {
|
|
|
1167
1002
|
});
|
|
1168
1003
|
this.isLoading = false;
|
|
1169
1004
|
return {
|
|
1170
|
-
items: (data === null || data === void 0 ? void 0 : data.items.
|
|
1005
|
+
items: yield __classPrivateFieldGet(this, _format).call(this, data === null || data === void 0 ? void 0 : data.items, this.gridOption.columns),
|
|
1171
1006
|
total: (data === null || data === void 0 ? void 0 : data.total) || 0,
|
|
1172
1007
|
};
|
|
1173
1008
|
}
|
|
@@ -1189,9 +1024,9 @@ class SdTable {
|
|
|
1189
1024
|
this.notifyService.notify.warning('Dữ liệu không phải là một mảng');
|
|
1190
1025
|
data = [];
|
|
1191
1026
|
}
|
|
1192
|
-
__classPrivateFieldSet(this, _localItems, data.
|
|
1193
|
-
this.isLoading = false;
|
|
1027
|
+
__classPrivateFieldSet(this, _localItems, yield __classPrivateFieldGet(this, _format).call(this, data, this.gridOption.columns));
|
|
1194
1028
|
}
|
|
1029
|
+
this.isLoading = false;
|
|
1195
1030
|
return __classPrivateFieldGet(this, _filterLocal).call(this, __classPrivateFieldGet(this, _localItems), filterReq);
|
|
1196
1031
|
}));
|
|
1197
1032
|
_render.set(this, (args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1205,8 +1040,8 @@ class SdTable {
|
|
|
1205
1040
|
}));
|
|
1206
1041
|
this.reload = (force = true) => __awaiter(this, void 0, void 0, function* () {
|
|
1207
1042
|
var _e, _f;
|
|
1208
|
-
(_f = (_e = this.
|
|
1209
|
-
const data = yield __classPrivateFieldGet(this, _load
|
|
1043
|
+
(_f = (_e = this.tableFilter) === null || _e === void 0 ? void 0 : _e.updateFilter) === null || _f === void 0 ? void 0 : _f.call(_e);
|
|
1044
|
+
const data = yield __classPrivateFieldGet(this, _load).call(this, __classPrivateFieldGet(this, _getFilter).call(this), force);
|
|
1210
1045
|
__classPrivateFieldGet(this, _render).call(this, data);
|
|
1211
1046
|
});
|
|
1212
1047
|
_exportedItems.set(this, (pageNumber = 0, pageSize = 10000) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1312,7 +1147,7 @@ class SdTable {
|
|
|
1312
1147
|
for (const item of exportItems) {
|
|
1313
1148
|
const obj = {};
|
|
1314
1149
|
const handle = (exportColumn) => __awaiter(this, void 0, void 0, function* () {
|
|
1315
|
-
var _v, _w, _x;
|
|
1150
|
+
var _v, _w, _x, _y;
|
|
1316
1151
|
obj[exportColumn.field] = item[exportColumn.field];
|
|
1317
1152
|
const column = allColumns.find(e => e.field === exportColumn.field);
|
|
1318
1153
|
const exportedColumn = allExportedColumns.find(e => e.field === exportColumn.field);
|
|
@@ -1360,34 +1195,22 @@ class SdTable {
|
|
|
1360
1195
|
}
|
|
1361
1196
|
else if (column.type === 'date') {
|
|
1362
1197
|
let date = item[column.field];
|
|
1363
|
-
const { transformDate } = column;
|
|
1364
|
-
if (transformDate) {
|
|
1365
|
-
date = transformDate(date, item);
|
|
1366
|
-
}
|
|
1367
1198
|
// Nếu là date thì convert theo đúng format
|
|
1368
1199
|
obj[column.field] = Date.toFormat(date, 'dd/MM/yyyy');
|
|
1369
1200
|
}
|
|
1370
1201
|
else if (column.type === 'datetime') {
|
|
1371
1202
|
let date = item[column.field];
|
|
1372
|
-
const { transformDate } = column;
|
|
1373
|
-
if (transformDate) {
|
|
1374
|
-
date = transformDate(date, item);
|
|
1375
|
-
}
|
|
1376
1203
|
// Nếu là datetime thì convert theo đúng format
|
|
1377
1204
|
obj[column.field] = Date.toFormat(date, 'dd/MM/yyyy HH:mm');
|
|
1378
1205
|
}
|
|
1379
1206
|
else if (column.type === 'time') {
|
|
1380
1207
|
let date = item[column.field];
|
|
1381
|
-
const { transformDate } = column;
|
|
1382
|
-
if (transformDate) {
|
|
1383
|
-
date = transformDate(date, item);
|
|
1384
|
-
}
|
|
1385
1208
|
// Nếu là time thì convert theo đúng format
|
|
1386
1209
|
obj[column.field] = Date.toFormat(date, 'HH:mm');
|
|
1387
1210
|
}
|
|
1388
1211
|
else if (column.type === 'values') {
|
|
1389
1212
|
// Nếu là values thì lấy giá trị của value được chọn
|
|
1390
|
-
obj[column.field] =
|
|
1213
|
+
obj[column.field] = ((_y = __classPrivateFieldGet(this, _cacheObjValues)[column.field]) === null || _y === void 0 ? void 0 : _y[item[column.field]]) || item[column.field];
|
|
1391
1214
|
}
|
|
1392
1215
|
else {
|
|
1393
1216
|
obj[column.field] = item[column.field];
|
|
@@ -1469,21 +1292,16 @@ class SdTable {
|
|
|
1469
1292
|
__classPrivateFieldGet(this, _onExport).call(this, true);
|
|
1470
1293
|
};
|
|
1471
1294
|
this.onFilterChange = () => {
|
|
1472
|
-
var _a, _b
|
|
1473
|
-
(_b = (_a = this.
|
|
1474
|
-
|
|
1475
|
-
this.
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
});
|
|
1479
|
-
}
|
|
1480
|
-
else {
|
|
1481
|
-
this.filterRegister.value.set({});
|
|
1482
|
-
}
|
|
1295
|
+
var _a, _b;
|
|
1296
|
+
(_b = (_a = this.tableFilter) === null || _a === void 0 ? void 0 : _a.updateFilter) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
1297
|
+
this.filterRegister.value.set({
|
|
1298
|
+
columnOperator: this.columnOperator || {},
|
|
1299
|
+
columnFilter: this.columnFilter,
|
|
1300
|
+
});
|
|
1483
1301
|
};
|
|
1484
1302
|
this.onExpand = (rowData) => __awaiter(this, void 0, void 0, function* () {
|
|
1485
|
-
var
|
|
1486
|
-
if ((
|
|
1303
|
+
var _z, _0, _1, _2, _3;
|
|
1304
|
+
if ((_z = this.gridOption.expand) === null || _z === void 0 ? void 0 : _z.always) {
|
|
1487
1305
|
return;
|
|
1488
1306
|
}
|
|
1489
1307
|
if (rowData.meta.expand.isExpanding) {
|
|
@@ -1493,8 +1311,8 @@ class SdTable {
|
|
|
1493
1311
|
rowData.meta.expand.isExpanded = false;
|
|
1494
1312
|
return;
|
|
1495
1313
|
}
|
|
1496
|
-
const data = (
|
|
1497
|
-
if (!((
|
|
1314
|
+
const data = (_2 = (_1 = (_0 = this.gridOption) === null || _0 === void 0 ? void 0 : _0.expand) === null || _1 === void 0 ? void 0 : _1.onExpand) === null || _2 === void 0 ? void 0 : _2.call(_1, rowData.data);
|
|
1315
|
+
if (!((_3 = this.gridOption.expand) === null || _3 === void 0 ? void 0 : _3.multiple)) {
|
|
1498
1316
|
this.items.forEach(item => (item.meta.expand.isExpanding = item.meta.expand.isExpanded = false));
|
|
1499
1317
|
}
|
|
1500
1318
|
if (data instanceof Promise) {
|
|
@@ -1515,7 +1333,7 @@ class SdTable {
|
|
|
1515
1333
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
1516
1334
|
if ((_b = (_a = rowData.meta.group) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.length) {
|
|
1517
1335
|
rowData.meta.group.items.forEach(e => (e.meta.selector.isSelected = rowData.meta.selector.isSelected));
|
|
1518
|
-
(_d = (_c = this.gridOption.selector) === null || _c === void 0 ? void 0 : _c.onSelect) === null || _d === void 0 ? void 0 : _d.call(_c, rowData.
|
|
1336
|
+
(_d = (_c = this.gridOption.selector) === null || _c === void 0 ? void 0 : _c.onSelect) === null || _d === void 0 ? void 0 : _d.call(_c, rowData.data, this.items.filter(e => e.meta.selector.isSelected).map(e => e.data));
|
|
1519
1337
|
this.isSelectAll = this.items.every(e => e.meta.selector.isSelected);
|
|
1520
1338
|
__classPrivateFieldGet(this, _updateSelectedItems).call(this);
|
|
1521
1339
|
}
|
|
@@ -1525,7 +1343,7 @@ class SdTable {
|
|
|
1525
1343
|
__classPrivateFieldGet(this, _updateSelectedItems).call(this);
|
|
1526
1344
|
return;
|
|
1527
1345
|
}
|
|
1528
|
-
(_g = (_f = this.gridOption.selector) === null || _f === void 0 ? void 0 : _f.onSelect) === null || _g === void 0 ? void 0 : _g.call(_f, rowData.
|
|
1346
|
+
(_g = (_f = this.gridOption.selector) === null || _f === void 0 ? void 0 : _f.onSelect) === null || _g === void 0 ? void 0 : _g.call(_f, rowData.data, this.items.filter(e => e.meta.selector.isSelected).map(e => e.data));
|
|
1529
1347
|
this.isSelectAll = this.items.every(e => e.meta.selector.isSelected);
|
|
1530
1348
|
__classPrivateFieldGet(this, _updateSelectedItems).call(this);
|
|
1531
1349
|
}
|
|
@@ -1538,7 +1356,7 @@ class SdTable {
|
|
|
1538
1356
|
e.meta.selector.isSelected = this.isSelectAll;
|
|
1539
1357
|
}
|
|
1540
1358
|
});
|
|
1541
|
-
(_c = (_b = this.gridOption.selector) === null || _b === void 0 ? void 0 : _b.onSelectAll) === null || _c === void 0 ? void 0 : _c.call(_b, this.items.filter(e => e.meta.selector.isSelected).map(e => e.
|
|
1359
|
+
(_c = (_b = this.gridOption.selector) === null || _b === void 0 ? void 0 : _b.onSelectAll) === null || _c === void 0 ? void 0 : _c.call(_b, this.items.filter(e => e.meta.selector.isSelected).map(e => e.data));
|
|
1542
1360
|
__classPrivateFieldGet(this, _updateSelectedItems).call(this);
|
|
1543
1361
|
};
|
|
1544
1362
|
this.onClearSelection = (items) => {
|
|
@@ -1548,16 +1366,15 @@ class SdTable {
|
|
|
1548
1366
|
__classPrivateFieldGet(this, _updateSelectedItems).call(this);
|
|
1549
1367
|
};
|
|
1550
1368
|
_updateSelectedItems.set(this, () => {
|
|
1551
|
-
this.selectedItems = this.items.filter(item => item.meta.selector.isSelected).map(item => item.
|
|
1369
|
+
this.selectedItems = this.items.filter(item => item.meta.selector.isSelected).map(item => item.data);
|
|
1552
1370
|
this.ref.detectChanges();
|
|
1553
1371
|
});
|
|
1554
1372
|
this.clearFilter = () => {
|
|
1555
1373
|
this.filterRegister.value.remove();
|
|
1556
1374
|
};
|
|
1557
1375
|
this.setFilter = (args) => {
|
|
1558
|
-
var _a, _b;
|
|
1559
1376
|
const { columnFilter, externalFilter, filterDef } = args || {};
|
|
1560
|
-
if (
|
|
1377
|
+
if (columnFilter) {
|
|
1561
1378
|
this.columnFilter = columnFilter;
|
|
1562
1379
|
}
|
|
1563
1380
|
this.filterRegister.value.set({
|
|
@@ -1567,32 +1384,159 @@ class SdTable {
|
|
|
1567
1384
|
});
|
|
1568
1385
|
};
|
|
1569
1386
|
this.detectChanges = () => this.ref.detectChanges();
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1387
|
+
_loadValues.set(this, (columns) => __awaiter(this, void 0, void 0, function* () {
|
|
1388
|
+
const promises = [];
|
|
1389
|
+
for (const column of columns) {
|
|
1390
|
+
if (column.type === 'values' && !this.cacheValues[column.field]) {
|
|
1391
|
+
if (typeof column.option.items === 'function') {
|
|
1392
|
+
promises.push(column.option
|
|
1393
|
+
.items()
|
|
1394
|
+
.then(data => ({
|
|
1395
|
+
key: column.field,
|
|
1396
|
+
valueField: column.option.valueField,
|
|
1397
|
+
displayField: column.option.displayField,
|
|
1398
|
+
data: Array.isArray(data) ? data : [],
|
|
1399
|
+
}))
|
|
1400
|
+
.catch(err => {
|
|
1401
|
+
console.error(err);
|
|
1402
|
+
return {
|
|
1403
|
+
key: column.field,
|
|
1404
|
+
valueField: column.option.valueField,
|
|
1405
|
+
displayField: column.option.displayField,
|
|
1406
|
+
data: [],
|
|
1407
|
+
};
|
|
1408
|
+
}));
|
|
1409
|
+
}
|
|
1410
|
+
else {
|
|
1411
|
+
this.cacheValues[column.field] = column.option.items.map(e => ({
|
|
1412
|
+
[column.option.valueField]: e === null || e === void 0 ? void 0 : e[column.option.valueField],
|
|
1413
|
+
[column.option.displayField]: e === null || e === void 0 ? void 0 : e[column.option.displayField],
|
|
1414
|
+
}));
|
|
1415
|
+
__classPrivateFieldGet(this, _cacheObjValues)[column.field] = Array.toObject(this.cacheValues[column.field], column.option.valueField);
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
if (promises.length) {
|
|
1420
|
+
const results = yield Promise.all(promises);
|
|
1421
|
+
for (const result of results) {
|
|
1422
|
+
this.cacheValues[result.key] = result.data.map(e => ({
|
|
1423
|
+
[result.valueField]: e === null || e === void 0 ? void 0 : e[result.valueField],
|
|
1424
|
+
[result.displayField]: e === null || e === void 0 ? void 0 : e[result.displayField],
|
|
1425
|
+
}));
|
|
1426
|
+
__classPrivateFieldGet(this, _cacheObjValues)[result.key] = Array.toObject(this.cacheValues[result.key], result.valueField);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
}));
|
|
1430
|
+
_format.set(this, (rawItems, columns) => __awaiter(this, void 0, void 0, function* () {
|
|
1431
|
+
var _4, _5;
|
|
1432
|
+
const items = rawItems.map(MapToSdTableItem);
|
|
1433
|
+
for (const column of columns) {
|
|
1434
|
+
// Clickable
|
|
1435
|
+
const { field, cellStyle, click, tooltip, htmlTemplate, transform } = column;
|
|
1436
|
+
let objValues = {};
|
|
1437
|
+
if (column.type === 'values') {
|
|
1438
|
+
objValues = __classPrivateFieldGet(this, _cacheObjValues)[field] || {};
|
|
1439
|
+
}
|
|
1440
|
+
if (column.type === 'lazy-values') {
|
|
1441
|
+
const values = items.map(e => { var _a; return (_a = e.data) === null || _a === void 0 ? void 0 : _a[field]; }).filter(val => !!val || val === 0);
|
|
1442
|
+
const { option: { views }, } = column;
|
|
1443
|
+
objValues = Array.toObject(yield views(values), column.option.valueField) || {};
|
|
1444
|
+
}
|
|
1445
|
+
for (const item of items) {
|
|
1446
|
+
const rowData = item.data;
|
|
1447
|
+
const value = rowData === null || rowData === void 0 ? void 0 : rowData[field];
|
|
1448
|
+
item.meta.display[field] = {
|
|
1449
|
+
badge: undefined,
|
|
1450
|
+
cellStyle: column.type === 'number' && { 'text-align': 'right!important' },
|
|
1451
|
+
data: value,
|
|
1452
|
+
isHtml: false,
|
|
1453
|
+
tooltip: typeof tooltip === 'function' ? tooltip(value, rowData) : undefined,
|
|
1454
|
+
click: typeof click === 'function' ? () => click(value, rowData) : undefined,
|
|
1455
|
+
};
|
|
1456
|
+
const display = item.meta.display[field];
|
|
1457
|
+
// Display
|
|
1458
|
+
if (typeof htmlTemplate === 'function') {
|
|
1459
|
+
display.isHtml = true;
|
|
1460
|
+
display.data = htmlTemplate(value, rowData);
|
|
1461
|
+
}
|
|
1462
|
+
else if (typeof transform === 'function') {
|
|
1463
|
+
const newValue = transform(value, rowData);
|
|
1464
|
+
if (newValue instanceof Promise) {
|
|
1465
|
+
display.data = yield newValue;
|
|
1466
|
+
}
|
|
1467
|
+
else {
|
|
1468
|
+
display.data = newValue;
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
else {
|
|
1472
|
+
if (column.type === 'date' || column.type === 'datetime' || column.type === 'time') {
|
|
1473
|
+
const date = Date.toFormat(value, 'dd/MM/yyyy');
|
|
1474
|
+
let time = Date.toFormat(value, 'HH:mm:ss');
|
|
1475
|
+
if (time === null || time === void 0 ? void 0 : time.endsWith('00')) {
|
|
1476
|
+
time = Date.toFormat(value, 'HH:mm');
|
|
1477
|
+
}
|
|
1478
|
+
if (column.type === 'date' || column.type === 'datetime') {
|
|
1479
|
+
if (column.type === 'datetime') {
|
|
1480
|
+
display.isHtml = true;
|
|
1481
|
+
display.data = `<span class="d-block T14R text-black400">${time}</span><span class="d-block T14R">${date}</span>`;
|
|
1482
|
+
}
|
|
1483
|
+
else {
|
|
1484
|
+
display.data = date;
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
if (column.type === 'time') {
|
|
1488
|
+
display.data = time;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
if (column.type === 'values' || column.type === 'lazy-values') {
|
|
1492
|
+
display.data = ((_4 = objValues[value]) === null || _4 === void 0 ? void 0 : _4[column.option.displayField]) || value;
|
|
1493
|
+
}
|
|
1494
|
+
if (column.type === 'number' && Number.isNumber(value)) {
|
|
1495
|
+
display.data = Number.toVNCurrency(value);
|
|
1496
|
+
}
|
|
1497
|
+
if (column.type === 'bool') {
|
|
1498
|
+
const { option } = column;
|
|
1499
|
+
if (value !== undefined && value !== null && value !== '') {
|
|
1500
|
+
display.data = value === true ? (option === null || option === void 0 ? void 0 : option.displayOnTrue) || 'True' : (option === null || option === void 0 ? void 0 : option.displayOnFalse) || 'False';
|
|
1501
|
+
}
|
|
1502
|
+
else {
|
|
1503
|
+
display.data = null;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
// Badge
|
|
1507
|
+
if ((column.type === 'string' || column.type === 'number' || column.type === 'values') && column.badge) {
|
|
1508
|
+
display.badge = {
|
|
1509
|
+
type: !(column === null || column === void 0 ? void 0 : column.badgeType) ? 'round' : column.badgeType,
|
|
1510
|
+
color: column.badge(value, rowData),
|
|
1511
|
+
icon: (_5 = column.badgeIcon) === null || _5 === void 0 ? void 0 : _5.call(column, value, rowData),
|
|
1512
|
+
};
|
|
1513
|
+
}
|
|
1514
|
+
else if (column.type === 'bool') {
|
|
1515
|
+
display.badge = {
|
|
1516
|
+
type: 'circle',
|
|
1517
|
+
color: !!value ? 'success' : 'danger',
|
|
1518
|
+
icon: null,
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
return items;
|
|
1525
|
+
}));
|
|
1586
1526
|
}
|
|
1587
1527
|
set option(option) {
|
|
1588
1528
|
if (option) {
|
|
1589
1529
|
option = __classPrivateFieldGet(this, _initConfiguration$1).call(this, option);
|
|
1590
1530
|
this.gridOption = option;
|
|
1591
1531
|
__classPrivateFieldSet(this, _loadCompleted, false);
|
|
1592
|
-
const
|
|
1593
|
-
this.
|
|
1594
|
-
|
|
1595
|
-
|
|
1532
|
+
const setting = this.gridConfigurationService.init(this.gridOption);
|
|
1533
|
+
__classPrivateFieldGet(this, _subscription$1).add(setting.observer.pipe(startWith(setting.subject.getValue())).subscribe((configuration) => __awaiter(this, void 0, void 0, function* () {
|
|
1534
|
+
const configurationResult = this.gridConfigurationService.loadConfigurationResult(this.gridOption, configuration);
|
|
1535
|
+
const displayColumns = configurationResult.displayedColumns || [];
|
|
1536
|
+
yield __classPrivateFieldGet(this, _loadValues).call(this, this.gridOption.columns.filter(column => displayColumns.includes(column.field)));
|
|
1537
|
+
this.configuration = configurationResult;
|
|
1538
|
+
__classPrivateFieldGet(this, _optionChanges).next(this.gridOption);
|
|
1539
|
+
})));
|
|
1596
1540
|
}
|
|
1597
1541
|
}
|
|
1598
1542
|
set paginator(paginator) {
|
|
@@ -1625,7 +1569,7 @@ class SdTable {
|
|
|
1625
1569
|
ngAfterViewInit() {
|
|
1626
1570
|
__classPrivateFieldGet(this, _subscription$1).add(__classPrivateFieldGet(this, _reload).pipe(debounceTime(200), switchMap((data) => __awaiter(this, void 0, void 0, function* () {
|
|
1627
1571
|
const filterInfo = __classPrivateFieldGet(this, _getFilter).call(this);
|
|
1628
|
-
const result = yield __classPrivateFieldGet(this, _load
|
|
1572
|
+
const result = yield __classPrivateFieldGet(this, _load).call(this, filterInfo, !__classPrivateFieldGet(this, _loadCompleted) || data.force);
|
|
1629
1573
|
__classPrivateFieldSet(this, _loadCompleted, true);
|
|
1630
1574
|
return result;
|
|
1631
1575
|
})))
|
|
@@ -1652,14 +1596,14 @@ class SdTable {
|
|
|
1652
1596
|
__classPrivateFieldGet(this, _subscription$1).unsubscribe();
|
|
1653
1597
|
}
|
|
1654
1598
|
get gridItems() {
|
|
1655
|
-
return this.items.map(item => item.
|
|
1599
|
+
return this.items.map(item => item.data);
|
|
1656
1600
|
}
|
|
1657
1601
|
}
|
|
1658
|
-
_gridId = new WeakMap(), _optionChanges = new WeakMap(), _localItems = new WeakMap(), _paginator = new WeakMap(), _sort = new WeakMap(), _subscription$1 = new WeakMap(), _reload = new WeakMap(), _loadCompleted = new WeakMap(), _initCellDef = new WeakMap(), _initFilterDef = new WeakMap(), _initFooterDef = new WeakMap(), _filterExportInfo = new WeakMap(), _initConfiguration$1 = new WeakMap(), _loadFilterRegister = new WeakMap(), _filterLocal = new WeakMap(), _getFilter = new WeakMap(), _load
|
|
1602
|
+
_gridId = new WeakMap(), _optionChanges = new WeakMap(), _localItems = new WeakMap(), _paginator = new WeakMap(), _sort = new WeakMap(), _subscription$1 = new WeakMap(), _reload = new WeakMap(), _loadCompleted = new WeakMap(), _cacheObjValues = new WeakMap(), _initCellDef = new WeakMap(), _initFilterDef = new WeakMap(), _initFooterDef = new WeakMap(), _filterExportInfo = new WeakMap(), _initConfiguration$1 = new WeakMap(), _loadFilterRegister = new WeakMap(), _filterLocal = new WeakMap(), _getFilter = new WeakMap(), _load = new WeakMap(), _render = new WeakMap(), _exportedItems = new WeakMap(), _allColumns = new WeakMap(), _allExportedColumns = new WeakMap(), _onExport = new WeakMap(), _getExportColumns = new WeakMap(), _updateSelectedItems = new WeakMap(), _loadValues = new WeakMap(), _format = new WeakMap();
|
|
1659
1603
|
SdTable.decorators = [
|
|
1660
1604
|
{ type: Component, args: [{
|
|
1661
1605
|
selector: 'sd-table',
|
|
1662
|
-
template: "<ng-container *ngIf=\"gridConfigurationObserver | async as gridConfiguration\">\r\n <ng-container *ngIf=\"gridConfiguration | sdGridConfigurationResult : gridOption : sdSubInformation as configuration\">\r\n <sd-grid-filter\r\n *ngIf=\"!gridOption.filter?.disabled && filterRegister\"\r\n [filterRegister]=\"filterRegister\"\r\n [filter]=\"gridOption?.filter\"\r\n [columns]=\"configuration.firstColumns\"\r\n [externalFilters]=\"gridOption?.filter?.externalFilters\"\r\n [filterDefs]=\"filterDefs\"\r\n #gridFilter>\r\n </sd-grid-filter>\r\n <ng-container *ngIf=\"items | sdGroup : gridOption; $implicit as groupedItems\">\r\n <div class=\"c-container\">\r\n <div class=\"c-loading\" *ngIf=\"isLoading\">\r\n <mat-spinner *ngIf=\"isLoading\"></mat-spinner>\r\n </div>\r\n <ng-container>\r\n <div\r\n class=\"c-table\"\r\n sdScroll\r\n [ngStyle]=\"{\r\n 'max-height': gridOption?.style?.maxHeight,\r\n 'min-height': gridOption?.style?.minHeight\r\n }\">\r\n <table\r\n *ngIf=\"items?.length; else elseEmpty\"\r\n mat-table\r\n [dataSource]=\"groupedItems\"\r\n matSort\r\n [matSortDisabled]=\"!gridOption.sort?.enable\"\r\n multiTemplateDataRows>\r\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"configuration.displayedColumns.length\">\r\n <ng-container *ngIf=\"sdSubInformation?.templateRef\">\r\n <ng-container *ngIf=\"gridOption?.expand?.always; else useExpandCollapse\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n <ng-template #useExpandCollapse>\r\n <div [@detailExpand]=\"item.isExpanded ? 'expanded' : 'collapsed'\">\r\n <ng-container *ngIf=\"item.isExpanded\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\r\n <th\r\n class=\"p-0\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button\r\n *ngIf=\"!element.isExpanding && !gridOption?.expand?.always\"\r\n mat-icon-button\r\n aria-label=\"Expand & Collapse\"\r\n (click)=\"onExpand(element)\">\r\n <mat-icon *ngIf=\"!element.isExpanded\">expand_more</mat-icon>\r\n <mat-icon *ngIf=\"element.isExpanded\">expand_less</mat-icon>\r\n </button>\r\n <div *ngIf=\"element.isExpanding\" class=\"lds-ring\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSelection\" sticky>\r\n <th\r\n class=\"text-center px-15\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <ng-container *ngIf=\"items | selectionVisibleSelectAll : gridOption?.selector | async\">\r\n <mat-checkbox\r\n *ngIf=\"!gridOption.selector?.single\"\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"isSelectAll\"\r\n (change)=\"onSelectAll()\">\r\n </mat-checkbox>\r\n </ng-container>\r\n </th>\r\n <td class=\"text-center px-15\" mat-cell *matCellDef=\"let item\" style=\"min-width: 50px; max-width: 50px\">\r\n <ng-container *ngIf=\"item | selectionVisible : gridOption?.selector\">\r\n <mat-checkbox\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"item.isSelected\"\r\n (change)=\"onSelect(item)\"\r\n [disabled]=\"selectedItems | selectionDisable : item : gridOption?.selector\">\r\n </mat-checkbox>\r\n </ng-container>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdCommand\">\r\n <th\r\n class=\"px-8 py-8\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"px-8\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-command [commands]=\"gridOption.commands\" [item]=\"item\"></sd-desktop-command>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdGroup\">\r\n <th mat-header-cell *matHeaderCellDef class=\"px-8 py-8\" [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"!item?.sdGroup ? 1 : configuration.displayedColumns.length\">\r\n <div [innerHtml]=\"item?.sdGroup?.htmlTemplate | safeHtml\"></div>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container\r\n *ngFor=\"let column of configuration.firstColumns; let i = index\"\r\n [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n cdkDrag\r\n class=\"px-8 py-8 c-th\"\r\n [ngStyle]=\"{ 'min-width': configuration.firstColumns[i].width }\"\r\n [attr.rowspan]=\"configuration.multipleHeader && column.type !== 'children-col' ? 2 : 1\"\r\n [attr.colspan]=\"column.type === 'children-col' ? column.children?.length : 1\">\r\n <div>\r\n <div\r\n aria-hidden=\"false\"\r\n role=\"presentation\"\r\n mat-sort-header\r\n [disabled]=\"!column.sortable || column.type === 'children-col'\"\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"configuration.firstColumns[i].titleHtml || configuration.firstColumns[i].title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"gridOption.filter?.inlineColumn && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n [columnFilter]=\"columnFilter\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n *ngIf=\"!item?.sdGroup\"\r\n [sdId]=\"item.meta.id\"\r\n [key]=\"key\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [idx]=\"i\"\r\n [cellDef]=\"cellDef\"\r\n [gridOption]=\"gridOption\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.secondColumns; let i = index\" [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"c-th px-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"gridOption.filter?.inlineColumn && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n [columnFilter]=\"columnFilter\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n [sdId]=\"item.meta.id\"\r\n [key]=\"key\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [idx]=\"i\"\r\n [cellDef]=\"cellDef\"\r\n [gridOption]=\"gridOption\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"configuration.firstHeaders; sticky: true\"></tr>\r\n <ng-container *ngIf=\"configuration.secondHeaders?.length\">\r\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"configuration.secondHeaders; sticky: true\"></tr>\r\n </ng-container>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: configuration.displayedColumns\"\r\n matRipple\r\n class=\"c-row\"\r\n [class.selected]=\"row.isSelected\"></tr>\r\n\r\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']\" class=\"c-detail-row\"></tr>\r\n <ng-container *ngIf=\"hasFooter && configuration.displayedFooters?.length\">\r\n <tr mat-footer-row *matFooterRowDef=\"configuration.displayedFooters; sticky: true\"></tr>\r\n </ng-container>\r\n </table>\r\n <ng-template #elseEmpty>\r\n <table mat-table [dataSource]=\"[{}]\">\r\n <ng-container matColumnDef=\"sdSelection\" sticky>\r\n <th\r\n class=\"px-15\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdCommand\">\r\n <th\r\n class=\"px-8\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSubInformationAction\">\r\n <th\r\n class=\"p-0\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEmpty\">\r\n <td class=\"c-empty\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"configuration.displayedColumns.length\">\r\n <ng-container *ngIf=\"sdEmptyData?.templateRef; else sdEmptyDataNoRef\">\r\n <ng-container *ngTemplateOutlet=\"sdEmptyData.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n <ng-template #sdEmptyDataNoRef>\r\n <mat-icon fontSet=\"material-icons-outlined\">leaderboard</mat-icon>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdGroup\">\r\n <th mat-header-cell *matHeaderCellDef class=\"px-8 py-8\" [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\"></td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container\r\n *ngFor=\"let column of configuration.columns\"\r\n [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th mat-header-cell *matHeaderCellDef class=\"c-th px-8 py-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n </th>\r\n </ng-container>\r\n <ng-container\r\n *ngFor=\"let column of configuration.firstColumns; let i = index\"\r\n [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n class=\"c-th px-8 py-8\"\r\n [ngStyle]=\"{ 'min-width': configuration.firstColumns[i].width }\"\r\n [attr.rowspan]=\"configuration.multipleHeader && column.type !== 'children-col' ? 2 : 1\"\r\n [attr.colspan]=\"column.type === 'children-col' ? column.children?.length : 1\">\r\n <div>\r\n <div\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"configuration.firstColumns[i].titleHtml || configuration.firstColumns[i].title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"gridOption.filter?.inlineColumn && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n [columnFilter]=\"columnFilter\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.secondColumns\" [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef class=\"c-th px-8 py-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"gridOption.filter?.inlineColumn\"\r\n [value]=\"columnFilter[column.field]\"\r\n [columnFilter]=\"columnFilter\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\"></sd-column-inline-filter>\r\n </div>\r\n </th>\r\n </ng-container>\r\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"configuration.firstHeaders; sticky: true\"></tr>\r\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"configuration.secondHeaders; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: ['sdEmpty']\"></tr>\r\n </table>\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-paginator\">\r\n <div class=\"c-action\">\r\n <sd-button\r\n *ngIf=\"gridFilter && !gridOption.filter?.inlineColumn\"\r\n class=\"mr-10\"\r\n [title]=\"'Filter' | sdTranslate\"\r\n icon=\"filter_alt\"\r\n size=\"sm\"\r\n (action)=\"gridFilter.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n <sd-button\r\n *ngIf=\"gridOption.reload?.visible\"\r\n class=\"mr-10\"\r\n [title]=\"'Reload' | sdTranslate\"\r\n icon=\"refresh\"\r\n size=\"sm\"\r\n (action)=\"reload()\"\r\n [disabled]=\"!items?.length\"\r\n type=\"link\">\r\n </sd-button>\r\n <ng-container *ngIf=\"gridOption.export?.visible && items?.length\">\r\n <ng-container *ngIf=\"isExporting; else unExporting\">\r\n <sd-button class=\"mr-10\" [loading]=\"isExporting\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\" size=\"sm\" type=\"link\">\r\n </sd-button>\r\n </ng-container>\r\n <ng-template #unExporting>\r\n <sd-button\r\n class=\"mr-10\"\r\n [title]=\"exportTitle | sdTranslate\"\r\n icon=\"get_app\"\r\n size=\"sm\"\r\n [matMenuTriggerFor]=\"menu\"\r\n type=\"link\">\r\n </sd-button>\r\n </ng-template>\r\n\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item (click)=\"exportExcel()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t excel</span>\r\n </button>\r\n <button mat-menu-item (click)=\"exportCSV()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t CSV</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <sd-button\r\n *ngIf=\"gridOption.config?.visible\"\r\n class=\"mr-10\"\r\n [title]=\"'Configure' | sdTranslate\"\r\n icon=\"settings\"\r\n size=\"sm\"\r\n (action)=\"popupGridConfiguration.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n </div>\r\n <mat-paginator\r\n [class.d-none]=\"gridOption.paginate?.hidden\"\r\n [length]=\"total\"\r\n [pageSize]=\"gridOption.paginate?.pageSize\"\r\n [pageSizeOptions]=\"gridOption.paginate?.pages\"\r\n [showFirstLastButtons]=\"gridOption.paginate?.showFirstLastButtons\"></mat-paginator>\r\n </div>\r\n </div>\r\n <sd-grid-quick-action [gridOption]=\"gridOption\" [selectedItems]=\"selectedItems\" (clear)=\"onClearSelection(groupedItems)\">\r\n </sd-grid-quick-action>\r\n <sd-popup-grid-configuration [gridOption]=\"gridOption\" [key]=\"key\" #popupGridConfiguration> </sd-popup-grid-configuration>\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>\r\n",
|
|
1606
|
+
template: "<ng-container *ngIf=\"configuration\">\r\n <sd-table-filter\r\n *ngIf=\"!gridOption.filter?.disabled && filterRegister\"\r\n [filterRegister]=\"filterRegister\"\r\n [filter]=\"gridOption?.filter\"\r\n [columns]=\"configuration.firstColumns\"\r\n [externalFilters]=\"gridOption?.filter?.externalFilters\"\r\n [filterDefs]=\"filterDefs\">\r\n </sd-table-filter>\r\n <ng-container *ngIf=\"items | sdGroup : gridOption; $implicit as groupedItems\">\r\n <div class=\"c-container\">\r\n <div class=\"c-loading\" *ngIf=\"isLoading\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n <ng-container>\r\n <div\r\n class=\"c-table\"\r\n sdScroll\r\n [ngStyle]=\"{\r\n 'max-height': gridOption?.style?.maxHeight,\r\n 'min-height': gridOption?.style?.minHeight\r\n }\">\r\n <table\r\n mat-table\r\n [dataSource]=\"groupedItems\"\r\n matSort\r\n [matSortDisabled]=\"!gridOption.sort?.enable\"\r\n multiTemplateDataRows>\r\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"configuration.displayedColumns.length\">\r\n <ng-container *ngIf=\"sdSubInformation?.templateRef\">\r\n <ng-container *ngIf=\"gridOption?.expand?.always; else useExpandCollapse\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n <ng-template #useExpandCollapse>\r\n <div [@detailExpand]=\"item.isExpanded ? 'expanded' : 'collapsed'\">\r\n <ng-container *ngIf=\"item.isExpanded\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\r\n <th\r\n class=\"p-0\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button\r\n *ngIf=\"!element.isExpanding && !gridOption?.expand?.always\"\r\n mat-icon-button\r\n aria-label=\"Expand & Collapse\"\r\n (click)=\"onExpand(element)\">\r\n <mat-icon *ngIf=\"!element.isExpanded\">expand_more</mat-icon>\r\n <mat-icon *ngIf=\"element.isExpanded\">expand_less</mat-icon>\r\n </button>\r\n <div *ngIf=\"element.isExpanding\" class=\"lds-ring\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSelection\" sticky>\r\n <th\r\n class=\"text-center px-15\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <ng-container *ngIf=\"items | selectionVisibleSelectAll : gridOption?.selector | async\">\r\n <mat-checkbox\r\n *ngIf=\"!gridOption.selector?.single\"\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"isSelectAll\"\r\n (change)=\"onSelectAll()\">\r\n </mat-checkbox>\r\n </ng-container>\r\n </th>\r\n <td class=\"text-center px-15\" mat-cell *matCellDef=\"let item\" style=\"min-width: 50px; max-width: 50px\">\r\n <ng-container *ngIf=\"item | selectionVisible : gridOption?.selector\">\r\n <mat-checkbox\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"item.isSelected\"\r\n (change)=\"onSelect(item)\"\r\n [disabled]=\"selectedItems | selectionDisable : item : gridOption?.selector\">\r\n </mat-checkbox>\r\n </ng-container>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdCommand\">\r\n <th\r\n class=\"px-8 py-8\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"px-8\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-command [commands]=\"gridOption.commands\" [item]=\"item\"></sd-desktop-command>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdGroup\">\r\n <th mat-header-cell *matHeaderCellDef class=\"px-8 py-8\" [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"!item?.sdGroup ? 1 : configuration.displayedColumns.length\">\r\n <div [innerHtml]=\"item?.sdGroup?.htmlTemplate | safeHtml\"></div>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container\r\n *ngFor=\"let column of configuration.firstColumns; let i = index\"\r\n [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n class=\"px-8 py-8 c-th\"\r\n [ngStyle]=\"{ 'min-width': configuration.firstColumns[i].width }\"\r\n [attr.rowspan]=\"configuration.multipleHeader && column.type !== 'children-col' ? 2 : 1\"\r\n [attr.colspan]=\"column.type === 'children-col' ? column.children?.length : 1\">\r\n <div>\r\n <div\r\n aria-hidden=\"false\"\r\n role=\"presentation\"\r\n mat-sort-header\r\n [disabled]=\"!column.sortable || column.type === 'children-col'\"\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"configuration.firstColumns[i].titleHtml || configuration.firstColumns[i].title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n [columnFilter]=\"columnFilter\"\r\n [cacheValues]=\"cacheValues\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n *ngIf=\"!item?.sdGroup\"\r\n [sdId]=\"item.meta.id\"\r\n [key]=\"key\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [idx]=\"i\"\r\n [cellDef]=\"cellDef\"\r\n [gridOption]=\"gridOption\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.secondColumns; let i = index\" [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"c-th px-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n [columnFilter]=\"columnFilter\"\r\n [cacheValues]=\"cacheValues\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n [sdId]=\"item.meta.id\"\r\n [key]=\"key\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [idx]=\"i\"\r\n [cellDef]=\"cellDef\"\r\n [gridOption]=\"gridOption\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"configuration.firstHeaders; sticky: true\"></tr>\r\n <ng-container *ngIf=\"configuration.secondHeaders?.length\">\r\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"configuration.secondHeaders; sticky: true\"></tr>\r\n </ng-container>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: configuration.displayedColumns\"\r\n matRipple\r\n class=\"c-row\"\r\n [class.selected]=\"row.isSelected\"></tr>\r\n\r\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']\" class=\"c-detail-row\"></tr>\r\n <ng-container *ngIf=\"hasFooter && configuration.displayedFooters?.length\">\r\n <tr mat-footer-row *matFooterRowDef=\"configuration.displayedFooters; sticky: true\"></tr>\r\n </ng-container>\r\n </table>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-paginator\">\r\n <div class=\"c-action\">\r\n <sd-button\r\n *ngIf=\"tableFilter\"\r\n class=\"mr-8\"\r\n [title]=\"'Filter' | sdTranslate\"\r\n icon=\"filter_alt\"\r\n size=\"sm\"\r\n (action)=\"tableFilter.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n <sd-button\r\n *ngIf=\"gridOption.reload?.visible\"\r\n class=\"mr-8\"\r\n [title]=\"'Reload' | sdTranslate\"\r\n icon=\"refresh\"\r\n size=\"sm\"\r\n (action)=\"reload()\"\r\n [disabled]=\"!items?.length\"\r\n type=\"link\">\r\n </sd-button>\r\n <ng-container *ngIf=\"gridOption.export?.visible && items?.length\">\r\n <ng-container *ngIf=\"isExporting; else unExporting\">\r\n <sd-button class=\"mr-10\" [loading]=\"isExporting\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\" size=\"sm\" type=\"link\">\r\n </sd-button>\r\n </ng-container>\r\n <ng-template #unExporting>\r\n <sd-button class=\"mr-10\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\" size=\"sm\" [matMenuTriggerFor]=\"menu\" type=\"link\">\r\n </sd-button>\r\n </ng-template>\r\n\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item (click)=\"exportExcel()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t excel</span>\r\n </button>\r\n <button mat-menu-item (click)=\"exportCSV()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t CSV</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <sd-button\r\n *ngIf=\"popupConfiguration\"\r\n class=\"mr-8\"\r\n [title]=\"'Configure' | sdTranslate\"\r\n icon=\"settings\"\r\n size=\"sm\"\r\n (action)=\"popupConfiguration.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n </div>\r\n <mat-paginator\r\n [class.d-none]=\"gridOption.paginate?.hidden\"\r\n [length]=\"total\"\r\n [pageSize]=\"gridOption.paginate?.pageSize\"\r\n [pageSizeOptions]=\"gridOption.paginate?.pages\"\r\n [showFirstLastButtons]=\"gridOption.paginate?.showFirstLastButtons\"></mat-paginator>\r\n </div>\r\n </div>\r\n <sd-table-quick-action [gridOption]=\"gridOption\" [selectedItems]=\"selectedItems\" (clear)=\"onClearSelection(groupedItems)\">\r\n </sd-table-quick-action>\r\n <sd-popup-configuration *ngIf=\"gridOption?.key && gridOption.config?.visible\" [gridOption]=\"gridOption\">\r\n </sd-popup-configuration>\r\n </ng-container>\r\n</ng-container>\r\n",
|
|
1663
1607
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1664
1608
|
animations: [
|
|
1665
1609
|
trigger('detailExpand', [
|
|
@@ -1677,13 +1621,13 @@ SdTable.ctorParameters = () => [
|
|
|
1677
1621
|
{ type: SdTableConfigurationService },
|
|
1678
1622
|
{ type: SdExportService },
|
|
1679
1623
|
{ type: SdNotifyService },
|
|
1680
|
-
{ type: SdColumnValuesPipe },
|
|
1681
1624
|
{ type: SdTableFilterService }
|
|
1682
1625
|
];
|
|
1683
1626
|
SdTable.propDecorators = {
|
|
1627
|
+
popupConfiguration: [{ type: ViewChild, args: [SdPopupConfiguration,] }],
|
|
1684
1628
|
sdScroll: [{ type: ViewChild, args: [SdScrollDirective,] }],
|
|
1685
1629
|
quickAction: [{ type: ViewChild, args: [SdQuickAction,] }],
|
|
1686
|
-
|
|
1630
|
+
tableFilter: [{ type: ViewChild, args: [SdTableFilter,] }],
|
|
1687
1631
|
option: [{ type: Input }],
|
|
1688
1632
|
paginator: [{ type: ViewChild, args: [MatPaginator,] }],
|
|
1689
1633
|
sort: [{ type: ViewChild, args: [MatSort,] }],
|
|
@@ -1822,34 +1766,13 @@ SdCommandTitlePipe.decorators = [
|
|
|
1822
1766
|
},] }
|
|
1823
1767
|
];
|
|
1824
1768
|
|
|
1825
|
-
class SdColumnHtmlTemplatePipe {
|
|
1826
|
-
constructor(deviceService) {
|
|
1827
|
-
this.isMobileOrTablet = false;
|
|
1828
|
-
this.isMobileOrTablet = !deviceService.isDesktop();
|
|
1829
|
-
}
|
|
1830
|
-
transform(value, rowData, column) {
|
|
1831
|
-
if (typeof (column === null || column === void 0 ? void 0 : column.htmlTemplate) !== 'function') {
|
|
1832
|
-
return value;
|
|
1833
|
-
}
|
|
1834
|
-
return column === null || column === void 0 ? void 0 : column.htmlTemplate(value, rowData, this.isMobileOrTablet);
|
|
1835
|
-
}
|
|
1836
|
-
}
|
|
1837
|
-
SdColumnHtmlTemplatePipe.decorators = [
|
|
1838
|
-
{ type: Pipe, args: [{
|
|
1839
|
-
name: 'columnHtmlTemplate'
|
|
1840
|
-
},] }
|
|
1841
|
-
];
|
|
1842
|
-
SdColumnHtmlTemplatePipe.ctorParameters = () => [
|
|
1843
|
-
{ type: DeviceDetectorService }
|
|
1844
|
-
];
|
|
1845
|
-
|
|
1846
1769
|
class SdDesktopCellView {
|
|
1847
1770
|
constructor() { }
|
|
1848
1771
|
}
|
|
1849
1772
|
SdDesktopCellView.decorators = [
|
|
1850
1773
|
{ type: Component, args: [{
|
|
1851
1774
|
selector: 'sd-desktop-cell-view',
|
|
1852
|
-
template: "<ng-container *
|
|
1775
|
+
template: "<ng-container *sdLet=\"item.meta.display[column.field] as view\">\r\n <ng-container *ngIf=\"view.isHtml; else useValue\">\r\n <div\r\n *ngIf=\"view.click\"\r\n (click)=\"view.click()\"\r\n class=\"text-break cursor-pointer\"\r\n [matTooltip]=\"view.tooltip\"\r\n [style]=\"view.cellStyle\"\r\n [innerHTML]=\"view.data | safeHtml\"></div>\r\n <div\r\n *ngIf=\"!view.click\"\r\n class=\"text-break\"\r\n [matTooltip]=\"view.tooltip\"\r\n [style]=\"view.cellStyle\"\r\n [innerHTML]=\"view.data | safeHtml\"></div>\r\n </ng-container>\r\n <ng-template #useValue>\r\n <ng-container *ngIf=\"!!view.badge; else noBadge\">\r\n <sd-badge\r\n *ngIf=\"view.data\"\r\n [type]=\"view.badge.type\"\r\n [title]=\"view.data\"\r\n [color]=\"view.badge.color\"\r\n [icon]=\"view.badge.icon\"\r\n [tooltip]=\"view.tooltip\"\r\n (sdClick)=\"!!view.click && view.click()\"></sd-badge>\r\n </ng-container>\r\n <ng-template #noBadge>\r\n <div\r\n class=\"text-break\"\r\n [style]=\"view.cellStyle\"\r\n [matTooltip]=\"view.tooltip\">\r\n <a *ngIf=\"!!view.click\" href=\"javascript:;\" (click)=\"view.click()\">{{ view.data }}</a>\r\n <ng-container *ngIf=\"!view.click\">{{ view.data }} </ng-container>\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n</ng-container>\r\n",
|
|
1853
1776
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1854
1777
|
styles: [".text-black400{color:#757575}.c-color-success{color:#4caf50}.c-color-danger{color:#f82c13}.c-image{-o-object-fit:contain;margin:5px 0;object-fit:contain}.c-img{font-size:30px;opacity:.5}.c-img.pointer:hover{opacity:.9}"]
|
|
1855
1778
|
},] }
|
|
@@ -1863,38 +1786,6 @@ SdDesktopCellView.propDecorators = {
|
|
|
1863
1786
|
gridOption: [{ type: Input }]
|
|
1864
1787
|
};
|
|
1865
1788
|
|
|
1866
|
-
class SdColumnTransformPipe {
|
|
1867
|
-
constructor(columnValuesPipe) {
|
|
1868
|
-
this.columnValuesPipe = columnValuesPipe;
|
|
1869
|
-
}
|
|
1870
|
-
transform(value, rowData, column, key) {
|
|
1871
|
-
var _a, _b;
|
|
1872
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1873
|
-
if (column === null || column === void 0 ? void 0 : column.transform) {
|
|
1874
|
-
return column.transform(value, rowData);
|
|
1875
|
-
}
|
|
1876
|
-
if (column.type === 'values') {
|
|
1877
|
-
return yield this.columnValuesPipe.transform(value, column);
|
|
1878
|
-
}
|
|
1879
|
-
if (column.type === 'number' && Number.isNumber(value)) {
|
|
1880
|
-
return Number.toVNCurrency(value); // this.decimalPipe.transform(value, '1.0-2');
|
|
1881
|
-
}
|
|
1882
|
-
if (column.type === 'bool') {
|
|
1883
|
-
return value === true ? (((_a = column.option) === null || _a === void 0 ? void 0 : _a.displayOnTrue) || 'True') : (((_b = column.option) === null || _b === void 0 ? void 0 : _b.displayOnFalse) || 'False');
|
|
1884
|
-
}
|
|
1885
|
-
return value;
|
|
1886
|
-
});
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
SdColumnTransformPipe.decorators = [
|
|
1890
|
-
{ type: Pipe, args: [{
|
|
1891
|
-
name: 'columnTransform'
|
|
1892
|
-
},] }
|
|
1893
|
-
];
|
|
1894
|
-
SdColumnTransformPipe.ctorParameters = () => [
|
|
1895
|
-
{ type: SdColumnValuesPipe }
|
|
1896
|
-
];
|
|
1897
|
-
|
|
1898
1789
|
class SdFilterExternalPipe {
|
|
1899
1790
|
transform(externalFilters, field) {
|
|
1900
1791
|
const results = [];
|
|
@@ -1942,34 +1833,6 @@ SdFilterColumnPipe.decorators = [
|
|
|
1942
1833
|
},] }
|
|
1943
1834
|
];
|
|
1944
1835
|
|
|
1945
|
-
var _isMobileOrTablet;
|
|
1946
|
-
class SdColumnChildrenFilterPipe {
|
|
1947
|
-
constructor(deviceService) {
|
|
1948
|
-
_isMobileOrTablet.set(this, false);
|
|
1949
|
-
__classPrivateFieldSet(this, _isMobileOrTablet, !deviceService.isDesktop());
|
|
1950
|
-
}
|
|
1951
|
-
transform(columns, item) {
|
|
1952
|
-
return columns.filter(column => {
|
|
1953
|
-
var _a, _b;
|
|
1954
|
-
const value = item === null || item === void 0 ? void 0 : item[column.field];
|
|
1955
|
-
const transformValue = (_a = column.transform) === null || _a === void 0 ? void 0 : _a.call(column, item[column.field], item);
|
|
1956
|
-
const templateValue = (_b = column.htmlTemplate) === null || _b === void 0 ? void 0 : _b.call(column, item[column.field], item, __classPrivateFieldGet(this, _isMobileOrTablet));
|
|
1957
|
-
return (value !== undefined && value !== null && value !== '')
|
|
1958
|
-
|| (transformValue !== undefined && transformValue !== null && transformValue !== '')
|
|
1959
|
-
|| (templateValue !== undefined && templateValue !== null && templateValue !== '');
|
|
1960
|
-
});
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
_isMobileOrTablet = new WeakMap();
|
|
1964
|
-
SdColumnChildrenFilterPipe.decorators = [
|
|
1965
|
-
{ type: Pipe, args: [{
|
|
1966
|
-
name: 'columnChildrenFilter'
|
|
1967
|
-
},] }
|
|
1968
|
-
];
|
|
1969
|
-
SdColumnChildrenFilterPipe.ctorParameters = () => [
|
|
1970
|
-
{ type: DeviceDetectorService }
|
|
1971
|
-
];
|
|
1972
|
-
|
|
1973
1836
|
class SdDesktopCommand {
|
|
1974
1837
|
constructor() {
|
|
1975
1838
|
this.commands = [];
|
|
@@ -1989,155 +1852,6 @@ SdDesktopCommand.propDecorators = {
|
|
|
1989
1852
|
commands: [{ type: Input }]
|
|
1990
1853
|
};
|
|
1991
1854
|
|
|
1992
|
-
class SdColumnBadgePipe {
|
|
1993
|
-
constructor() { }
|
|
1994
|
-
transform(value, rowData, column) {
|
|
1995
|
-
var _a, _b, _c;
|
|
1996
|
-
if (column.type === 'string' && (column === null || column === void 0 ? void 0 : column.badge)) {
|
|
1997
|
-
return {
|
|
1998
|
-
type: !(column === null || column === void 0 ? void 0 : column.badgeType) ? 'round' : column.badgeType,
|
|
1999
|
-
color: column.badge(value, rowData),
|
|
2000
|
-
icon: (_a = column === null || column === void 0 ? void 0 : column.badgeIcon) === null || _a === void 0 ? void 0 : _a.call(column, value, rowData)
|
|
2001
|
-
};
|
|
2002
|
-
}
|
|
2003
|
-
if (column.type === 'number' && (column === null || column === void 0 ? void 0 : column.badge)) {
|
|
2004
|
-
return {
|
|
2005
|
-
type: !(column === null || column === void 0 ? void 0 : column.badgeType) ? 'round' : column.badgeType,
|
|
2006
|
-
color: column.badge(value, rowData),
|
|
2007
|
-
icon: (_b = column === null || column === void 0 ? void 0 : column.badgeIcon) === null || _b === void 0 ? void 0 : _b.call(column, value, rowData)
|
|
2008
|
-
};
|
|
2009
|
-
}
|
|
2010
|
-
if (column.type === 'bool') {
|
|
2011
|
-
return {
|
|
2012
|
-
type: !(column === null || column === void 0 ? void 0 : column.badgeType) ? 'round' : column.badgeType,
|
|
2013
|
-
color: !!value ? 'success' : 'danger',
|
|
2014
|
-
icon: null
|
|
2015
|
-
};
|
|
2016
|
-
}
|
|
2017
|
-
if (column.type === 'values' && (column === null || column === void 0 ? void 0 : column.badge)) {
|
|
2018
|
-
return {
|
|
2019
|
-
type: !(column === null || column === void 0 ? void 0 : column.badgeType) ? 'round' : column.badgeType,
|
|
2020
|
-
color: column.badge(value, rowData),
|
|
2021
|
-
icon: (_c = column === null || column === void 0 ? void 0 : column.badgeIcon) === null || _c === void 0 ? void 0 : _c.call(column, value, rowData)
|
|
2022
|
-
};
|
|
2023
|
-
}
|
|
2024
|
-
return null;
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
SdColumnBadgePipe.decorators = [
|
|
2028
|
-
{ type: Pipe, args: [{
|
|
2029
|
-
name: 'columnBadge'
|
|
2030
|
-
},] }
|
|
2031
|
-
];
|
|
2032
|
-
SdColumnBadgePipe.ctorParameters = () => [];
|
|
2033
|
-
|
|
2034
|
-
class SdGridConfigurationResultPipe {
|
|
2035
|
-
constructor(gridConfigurationService) {
|
|
2036
|
-
this.gridConfigurationService = gridConfigurationService;
|
|
2037
|
-
}
|
|
2038
|
-
transform(configuration, gridOption, sdSubInformation) {
|
|
2039
|
-
const a = this.gridConfigurationService.generateConfigurationResult(configuration, gridOption, sdSubInformation);
|
|
2040
|
-
console.log(a);
|
|
2041
|
-
return a;
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
SdGridConfigurationResultPipe.decorators = [
|
|
2045
|
-
{ type: Pipe, args: [{
|
|
2046
|
-
name: 'sdGridConfigurationResult'
|
|
2047
|
-
},] }
|
|
2048
|
-
];
|
|
2049
|
-
SdGridConfigurationResultPipe.ctorParameters = () => [
|
|
2050
|
-
{ type: SdTableConfigurationService }
|
|
2051
|
-
];
|
|
2052
|
-
|
|
2053
|
-
var _cache$3;
|
|
2054
|
-
class SdPopupGridConfiguration {
|
|
2055
|
-
constructor(ref, notifyService, translateService, gridConfigurationService) {
|
|
2056
|
-
this.ref = ref;
|
|
2057
|
-
this.notifyService = notifyService;
|
|
2058
|
-
this.translateService = translateService;
|
|
2059
|
-
this.gridConfigurationService = gridConfigurationService;
|
|
2060
|
-
this.changes = new EventEmitter();
|
|
2061
|
-
_cache$3.set(this, void 0);
|
|
2062
|
-
this.isCreatingColumn = false;
|
|
2063
|
-
this.selected = {};
|
|
2064
|
-
this.disabledDrag = true;
|
|
2065
|
-
this.open = () => __awaiter(this, void 0, void 0, function* () {
|
|
2066
|
-
__classPrivateFieldSet(this, _cache$3, this.gridConfigurationService.init(this.key, this.gridOption));
|
|
2067
|
-
this.configuration = yield __classPrivateFieldGet(this, _cache$3).get();
|
|
2068
|
-
this.modal.open();
|
|
2069
|
-
});
|
|
2070
|
-
this.onSave = () => {
|
|
2071
|
-
__classPrivateFieldGet(this, _cache$3).set(this.configuration);
|
|
2072
|
-
this.modal.close();
|
|
2073
|
-
this.ref.detectChanges();
|
|
2074
|
-
};
|
|
2075
|
-
this.onReset = () => __awaiter(this, void 0, void 0, function* () {
|
|
2076
|
-
const { translate } = this.translateService;
|
|
2077
|
-
this.notifyService.confirm(translate('Reset grid configuration to default')).then(() => {
|
|
2078
|
-
__classPrivateFieldGet(this, _cache$3).remove();
|
|
2079
|
-
this.modal.close();
|
|
2080
|
-
this.ref.detectChanges();
|
|
2081
|
-
});
|
|
2082
|
-
});
|
|
2083
|
-
this.createColumn = () => __awaiter(this, void 0, void 0, function* () {
|
|
2084
|
-
this.selected = {};
|
|
2085
|
-
this.isCreatingColumn = true;
|
|
2086
|
-
});
|
|
2087
|
-
this.confirm = () => __awaiter(this, void 0, void 0, function* () {
|
|
2088
|
-
const generatedColumn = {
|
|
2089
|
-
origin: {
|
|
2090
|
-
field: v4(),
|
|
2091
|
-
title: 'Generated',
|
|
2092
|
-
width: '300px',
|
|
2093
|
-
},
|
|
2094
|
-
fixed: false,
|
|
2095
|
-
invisible: false,
|
|
2096
|
-
title: 'Generated',
|
|
2097
|
-
width: '300px',
|
|
2098
|
-
};
|
|
2099
|
-
this.configuration.columns.push(generatedColumn);
|
|
2100
|
-
this.configuration = __classPrivateFieldGet(this, _cache$3).set(this.configuration);
|
|
2101
|
-
this.isCreatingColumn = false;
|
|
2102
|
-
});
|
|
2103
|
-
}
|
|
2104
|
-
ngOnInit() { }
|
|
2105
|
-
mouseUp(event) {
|
|
2106
|
-
this.disabledDrag = true;
|
|
2107
|
-
}
|
|
2108
|
-
dropTable(event) {
|
|
2109
|
-
moveItemInArray(this.configuration.columns, event.previousIndex, event.currentIndex);
|
|
2110
|
-
this.table.renderRows();
|
|
2111
|
-
}
|
|
2112
|
-
handleMouseDown() {
|
|
2113
|
-
this.disabledDrag = false;
|
|
2114
|
-
}
|
|
2115
|
-
handleMouseUp() {
|
|
2116
|
-
this.disabledDrag = true;
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
_cache$3 = new WeakMap();
|
|
2120
|
-
SdPopupGridConfiguration.decorators = [
|
|
2121
|
-
{ type: Component, args: [{
|
|
2122
|
-
selector: 'sd-popup-grid-configuration',
|
|
2123
|
-
template: "<sd-modal width=\"sm\" [title]=\"'Configuration' | sdTranslate\" #modal>\r\n <sd-modal-body *ngIf=\"configuration\">\r\n <div *ngIf=\"!isCreatingColumn\" class=\"c-container\">\r\n <div class=\"c-table\" style=\"max-height:70vh\">\r\n <table #table mat-table [dataSource]=\"configuration.columns\"\r\n cdkDropList\r\n [cdkDropListData]=\"configuration.columns\"\r\n (cdkDropListDropped)=\"dropTable($event)\">\r\n >\r\n <ng-container matColumnDef=\"stt\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width:50px\">#\r\n </th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\r\n <div class=\"c-handle\" (mousedown) = \"handleMouseDown()\" (mouseup)=\"handleMouseUp()\">\r\n <svg width=\"24px\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"></path>\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\r\n </svg>\r\n </div>\r\n\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"title\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>{{'Title' | sdTranslate}}\r\n </th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item;\">\r\n <sd-input [placeholder]=\"item?.origin?.title\" [(model)]=\"item.title\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"width\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width:80px\">{{'Width' | sdTranslate}}\r\n </th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item;\">\r\n <!-- <span>{{item.width}}</span>\r\n <mat-slider\r\n step=\"1\"\r\n min=\"0\"\r\n [max]=\"+item?.origin?.width*3\"\r\n [(ngModel)]=\"+item.width\"\r\n aria-label=\"units\">\r\n </mat-slider> -->\r\n <sd-input [placeholder]=\"item?.origin?.width\" [(model)]=\"item.width\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"invisible\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width:80px\">{{'Hidden' |\r\n sdTranslate}}\r\n </th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item;\">\r\n <mat-slide-toggle [(ngModel)]=\"item.invisible\" color=\"primary\">\r\n </mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"fixed\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width:80px\">{{'Freeze' |\r\n sdTranslate}}\r\n </th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item;\">\r\n <mat-slide-toggle [(ngModel)]=\"item.fixed\" color=\"primary\"></mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'title', 'width', 'invisible', 'fixed']; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: ['stt', 'title', 'width', 'invisible', 'fixed'];\" cdkDrag [cdkDragData]=\"row\" cdkDragLockAxis=\"y\" [cdkDragDisabled] = \"disabledDrag\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isCreatingColumn\">\r\n <div class=\"c-table\" style=\"max-height:50vh\">\r\n <table mat-table [dataSource]=\"configuration.columns\">\r\n <ng-container matColumnDef=\"stt\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width:50px\">#\r\n </th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\r\n <sd-checkbox *ngIf=\"isCreatingColumn\" [(model)]=\"selected[item.origin?.field]\"></sd-checkbox>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"title\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>{{'Title' | sdTranslate}}\r\n </th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item;\">\r\n <span *ngIf=\"isCreatingColumn\">{{item.title || item?.origin?.title}}</span>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'title']; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: ['stt', 'title'];\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n </sd-modal-body>\r\n <sd-modal-footer>\r\n <ng-container *ngIf=\"!isCreatingColumn\">\r\n <!-- <sd-button class=\"mr-auto\" (action)=\"createColumn()\" [title]=\"'Create column' | sdTranslate\" color=\"info\"\r\n size=\"sm\">\r\n </sd-button> -->\r\n <sd-button class=\"mr-5\" (action)=\"onReset()\" [title]=\"'Default' | sdTranslate\" color=\"info\" size=\"sm\">\r\n </sd-button>\r\n <sd-button (action)=\"onSave()\" [title]=\"'Save' | sdTranslate\" type=\"fill\" color=\"info\" size=\"sm\">\r\n </sd-button>\r\n </ng-container>\r\n <ng-container *ngIf=\"isCreatingColumn\">\r\n <sd-button class=\"mr-auto\" (action)=\"isCreatingColumn = false\" [title]=\"'Cancel' | sdTranslate\" color=\"info\"\r\n size=\"sm\">\r\n </sd-button>\r\n <sd-button (action)=\"confirm()\" [title]=\"'Confirm' | sdTranslate\" type=\"fill\" color=\"info\" size=\"sm\">\r\n </sd-button>\r\n </ng-container>\r\n </sd-modal-footer>\r\n</sd-modal>",
|
|
2124
|
-
styles: [".c-table{overflow:auto;position:relative}.c-table table{width:100%}.c-table .c-th{color:#000;font-size:14px;font-weight:500;line-height:20px}.c-container{min-height:200px;position:relative}.c-handle{color:#ccc;cursor:move}"]
|
|
2125
|
-
},] }
|
|
2126
|
-
];
|
|
2127
|
-
SdPopupGridConfiguration.ctorParameters = () => [
|
|
2128
|
-
{ type: ChangeDetectorRef },
|
|
2129
|
-
{ type: SdNotifyService },
|
|
2130
|
-
{ type: SdTranslateService },
|
|
2131
|
-
{ type: SdTableConfigurationService }
|
|
2132
|
-
];
|
|
2133
|
-
SdPopupGridConfiguration.propDecorators = {
|
|
2134
|
-
gridOption: [{ type: Input }],
|
|
2135
|
-
key: [{ type: Input }],
|
|
2136
|
-
modal: [{ type: ViewChild, args: ['modal',] }],
|
|
2137
|
-
table: [{ type: ViewChild, args: ['table',] }],
|
|
2138
|
-
mouseUp: [{ type: HostListener, args: ['window:mouseup', ['$event'],] }]
|
|
2139
|
-
};
|
|
2140
|
-
|
|
2141
1855
|
class SdColumnTooltipPipe {
|
|
2142
1856
|
constructor() { }
|
|
2143
1857
|
transform(value, rowData, column) {
|
|
@@ -2356,12 +2070,12 @@ const SdFilterOperators = [
|
|
|
2356
2070
|
{
|
|
2357
2071
|
value: 'GREATER_OR_EQUAL',
|
|
2358
2072
|
symbol: '≥',
|
|
2359
|
-
display: 'Lớn hơn, hoặc bằng'
|
|
2073
|
+
display: 'Lớn hơn, hoặc bằng',
|
|
2360
2074
|
},
|
|
2361
2075
|
{
|
|
2362
2076
|
value: 'LESS_OR_EQUAL',
|
|
2363
2077
|
symbol: '≤',
|
|
2364
|
-
display: 'Nhỏ hơn, hoặc bằng'
|
|
2078
|
+
display: 'Nhỏ hơn, hoặc bằng',
|
|
2365
2079
|
},
|
|
2366
2080
|
{
|
|
2367
2081
|
value: 'CONTAIN',
|
|
@@ -2376,22 +2090,22 @@ const SdFilterOperators = [
|
|
|
2376
2090
|
{
|
|
2377
2091
|
value: 'START_WITH',
|
|
2378
2092
|
symbol: 'line_start_circle',
|
|
2379
|
-
display: 'Bắt đầu bởi'
|
|
2093
|
+
display: 'Bắt đầu bởi',
|
|
2380
2094
|
},
|
|
2381
2095
|
{
|
|
2382
2096
|
value: 'END_WITH',
|
|
2383
2097
|
symbol: 'line_end_circle',
|
|
2384
|
-
display: 'Kết thúc bởi'
|
|
2098
|
+
display: 'Kết thúc bởi',
|
|
2385
2099
|
},
|
|
2386
2100
|
{
|
|
2387
2101
|
value: 'IN',
|
|
2388
2102
|
symbol: 'checklist_rtl',
|
|
2389
|
-
display: 'Nằm trong'
|
|
2103
|
+
display: 'Nằm trong',
|
|
2390
2104
|
},
|
|
2391
2105
|
{
|
|
2392
2106
|
value: 'NOT_IN',
|
|
2393
2107
|
symbol: 'event_list',
|
|
2394
|
-
display: 'Không nằm trong'
|
|
2108
|
+
display: 'Không nằm trong',
|
|
2395
2109
|
},
|
|
2396
2110
|
];
|
|
2397
2111
|
|
|
@@ -2404,6 +2118,7 @@ class SdColumnInlineFilter {
|
|
|
2404
2118
|
this.inlineOperatorChange = new EventEmitter();
|
|
2405
2119
|
this.columnFilter = {};
|
|
2406
2120
|
this.operators = [];
|
|
2121
|
+
this.items = [];
|
|
2407
2122
|
this.filterChange = new EventEmitter();
|
|
2408
2123
|
_valueChanges.set(this, new Subject());
|
|
2409
2124
|
_subcription.set(this, new Subscription());
|
|
@@ -2439,7 +2154,7 @@ class SdColumnInlineFilter {
|
|
|
2439
2154
|
__classPrivateFieldGet(this, _valueChanges).next();
|
|
2440
2155
|
}
|
|
2441
2156
|
set _column(column) {
|
|
2442
|
-
var _a, _b, _c;
|
|
2157
|
+
var _a, _b, _c, _d;
|
|
2443
2158
|
this.column = column;
|
|
2444
2159
|
if (!((_a = column === null || column === void 0 ? void 0 : column.filter) === null || _a === void 0 ? void 0 : _a.disabled) && ((_c = (_b = column === null || column === void 0 ? void 0 : column.filter) === null || _b === void 0 ? void 0 : _b.operator) === null || _c === void 0 ? void 0 : _c.enable)) {
|
|
2445
2160
|
this.operators = SdFilterOperators.filter(e => { var _a, _b; return (_b = (_a = column.filter.operator.list) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, e.value); });
|
|
@@ -2447,12 +2162,23 @@ class SdColumnInlineFilter {
|
|
|
2447
2162
|
else {
|
|
2448
2163
|
this.operators = [];
|
|
2449
2164
|
}
|
|
2165
|
+
if (this.column.type === 'values') {
|
|
2166
|
+
if (Array.isArray(this.column.option.items)) {
|
|
2167
|
+
this.items = this.column.option.items;
|
|
2168
|
+
}
|
|
2169
|
+
else {
|
|
2170
|
+
this.items = ((_d = this.cacheValues) === null || _d === void 0 ? void 0 : _d[column.field]) || [];
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
else if (this.column.type === 'lazy-values') {
|
|
2174
|
+
this.items = this.column.option.items;
|
|
2175
|
+
}
|
|
2450
2176
|
}
|
|
2451
2177
|
ngOnInit() {
|
|
2452
2178
|
__classPrivateFieldGet(this, _subcription).add(__classPrivateFieldGet(this, _valueChanges).pipe(startWith(this.columnFilter)).subscribe(() => {
|
|
2453
2179
|
var _a, _b;
|
|
2454
2180
|
if (this.column.type === 'date' || this.column.type === 'time' || this.column.type === 'datetime') {
|
|
2455
|
-
if (!((_b = (_a = this.column) === null || _a === void 0 ? void 0 : _a.
|
|
2181
|
+
if (!((_b = (_a = this.column) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.useFilterDate)) {
|
|
2456
2182
|
this.columnFilter[this.column.field] = this.columnFilter[this.column.field] || {
|
|
2457
2183
|
from: null,
|
|
2458
2184
|
to: null,
|
|
@@ -2469,7 +2195,7 @@ _inlineOperator_1 = new WeakMap(), _valueChanges = new WeakMap(), _subcription =
|
|
|
2469
2195
|
SdColumnInlineFilter.decorators = [
|
|
2470
2196
|
{ type: Component, args: [{
|
|
2471
2197
|
selector: 'sd-column-inline-filter',
|
|
2472
|
-
template: "<div class=\"d-flex c-inline-column\">\r\n <ng-container\r\n *ngIf=\"\r\n column.type === 'string' ||\r\n column.type === 'number' ||\r\n column.type === 'bool' ||\r\n column.type === 'values' ||\r\n column.type === 'date' ||\r\n column.type === 'datetime' ||\r\n column.type === 'time';\r\n else noFilter\r\n \">\r\n <div class=\"d-flex align-items-center\" *ngIf=\"operators.length\">\r\n <!-- Only number column icon broken. add mb when not default symbol -->\r\n <sd-button class=\"{{ (column.type === 'number' && inlineSymbol !== 'filter_alt') ? 'mb-4 mr-2 ' :'mr-2 '}}\" fontSet=\"material-symbols-outlined\" [icon]=\"inlineSymbol\" size=\"sm\"\r\n [matMenuTriggerFor]=\"menu\" type=\"link\"> </sd-button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngFor=\"let operator of operators\" (click)=\"onChangeOperator(operator)\" mat-menu-item type=\"button\">\r\n <mat-icon fontSet=\"material-symbols-outlined\" class=\"{{column.type === 'number' ? 'mb-8 ':''}}\">{{ operator.symbol }}</mat-icon>\r\n <span> {{ operator.display }}</span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <sd-input\r\n *ngIf=\"column.type === 'string'\"\r\n style=\"flex: 1\"\r\n size=\"sm\"\r\n type=\"text\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n (keyupEnter)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n </sd-input>\r\n <sd-input-number\r\n *ngIf=\"column.type === 'number'\"\r\n style=\"flex: 1\"\r\n size=\"sm\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n (keyupEnter)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n </sd-input-number>\r\n <sd-select\r\n *ngIf=\"column.type === 'bool'\"\r\n style=\"flex: 1\"\r\n size=\"sm\"\r\n [items]=\"[\r\n { value: '1', display: column.option?.displayOnTrue || 'True' },\r\n { value: '0', display: column.option?.displayOnFalse || 'False' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n (sdChange)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n <ng-template sdSelectDisplayDef let-item=\"item\">\r\n <sd-badge *ngIf=\"item.value === '1'\" color=\"success\" [title]=\"column.option?.displayOnTrue || 'True'\"> </sd-badge>\r\n <sd-badge *ngIf=\"item.value === '0'\" color=\"danger\" [title]=\"column.option?.displayOnFalse || 'False'\"> </sd-badge>\r\n </ng-template>\r\n </sd-select>\r\n <sd-select\r\n *ngIf=\"column.type === 'values' && column?.option?.selection !== 'AUTOCOMPLETE'\"\r\n style=\"flex: 1\"\r\n size=\"sm\"\r\n [items]=\"
|
|
2198
|
+
template: "<div class=\"d-flex c-inline-column align-items-end\">\r\n <ng-container\r\n *ngIf=\"\r\n column.type === 'string' ||\r\n column.type === 'number' ||\r\n column.type === 'bool' ||\r\n column.type === 'values' ||\r\n column.type === 'lazy-values' ||\r\n column.type === 'date' ||\r\n column.type === 'datetime' ||\r\n column.type === 'time';\r\n else noFilter\r\n \">\r\n <div class=\"d-flex align-items-center\" *ngIf=\"operators.length\">\r\n <!-- Only number column icon broken. add mb when not default symbol -->\r\n <sd-button class=\"{{ (column.type === 'number' && inlineSymbol !== 'filter_alt') ? 'mb-4 mr-2 ' :'mr-2 '}}\" fontSet=\"material-symbols-outlined\" [icon]=\"inlineSymbol\" size=\"sm\"\r\n [matMenuTriggerFor]=\"menu\" type=\"link\"> </sd-button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngFor=\"let operator of operators\" (click)=\"onChangeOperator(operator)\" mat-menu-item type=\"button\">\r\n <mat-icon fontSet=\"material-symbols-outlined\" class=\"{{column.type === 'number' ? 'mb-8 ':''}}\">{{ operator.symbol }}</mat-icon>\r\n <span> {{ operator.display }}</span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <sd-input\r\n *ngIf=\"column.type === 'string'\"\r\n style=\"flex: 1\"\r\n size=\"sm\"\r\n type=\"text\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n (keyupEnter)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n </sd-input>\r\n <sd-input-number\r\n *ngIf=\"column.type === 'number'\"\r\n style=\"flex: 1\"\r\n size=\"sm\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n (keyupEnter)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n </sd-input-number>\r\n <sd-select\r\n *ngIf=\"column.type === 'bool'\"\r\n style=\"flex: 1\"\r\n size=\"sm\"\r\n [items]=\"[\r\n { value: '1', display: column.option?.displayOnTrue || 'True' },\r\n { value: '0', display: column.option?.displayOnFalse || 'False' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n (sdChange)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n <ng-template sdSelectDisplayDef let-item=\"item\">\r\n <sd-badge *ngIf=\"item.value === '1'\" color=\"success\" [title]=\"column.option?.displayOnTrue || 'True'\"> </sd-badge>\r\n <sd-badge *ngIf=\"item.value === '0'\" color=\"danger\" [title]=\"column.option?.displayOnFalse || 'False'\"> </sd-badge>\r\n </ng-template>\r\n </sd-select>\r\n <sd-select\r\n *ngIf=\"(column.type === 'values' || column.type === 'lazy-values') && column?.option?.selection !== 'AUTOCOMPLETE'\"\r\n style=\"flex: 1\"\r\n size=\"sm\"\r\n [items]=\"items\"\r\n [valueField]=\"column.option.valueField\"\r\n [displayField]=\"column.option.displayField\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n (sdChange)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\"\r\n [multiple]=\"column?.option?.selection === 'MULTIPLE' || column?.option?.selection === 'MULTIPLEAUTOCOMPLETE'\"\r\n [filtered]=\"column?.option?.selection === 'MULTIPLEAUTOCOMPLETE'\">\r\n </sd-select>\r\n <sd-autocomplete\r\n *ngIf=\"(column.type === 'values' || column.type === 'lazy-values') && column?.option?.selection === 'AUTOCOMPLETE'\"\r\n style=\"flex: 1\"\r\n size=\"sm\"\r\n [items]=\"items\"\r\n [valueField]=\"column.option.valueField\"\r\n [displayField]=\"column.option.displayField\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n (sdChange)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n </sd-autocomplete>\r\n <ng-container *ngIf=\"column.type === 'date' || column.type === 'datetime' || column.type === 'time'\">\r\n <sd-date-range\r\n *ngIf=\"!column.filter?.useFilterDate\"\r\n style=\"flex: 1\"\r\n size=\"sm\"\r\n [(from)]=\"columnFilter[column.field].from\"\r\n [(to)]=\"columnFilter[column.field].to\"\r\n (sdChange)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n </sd-date-range>\r\n <sd-date-time\r\n *ngIf=\"column.filter?.useFilterDate\"\r\n style=\"flex: 1\"\r\n type=\"date\"\r\n size=\"sm\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n (sdChange)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n </sd-date-time>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #noFilter>\r\n <sd-input type=\"text\" size=\"sm\" disabled> </sd-input>\r\n </ng-template>\r\n</div>\r\n",
|
|
2473
2199
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2474
2200
|
styles: [":host ::ng-deep .c-inline-column .mat-form-field-wrapper{background-color:#fff;border-radius:8px;margin:8px 0 0!important;padding:0!important}"]
|
|
2475
2201
|
},] }
|
|
@@ -2482,6 +2208,7 @@ SdColumnInlineFilter.propDecorators = {
|
|
|
2482
2208
|
_inlineOperator: [{ type: Input, args: ['inlineOperator',] }],
|
|
2483
2209
|
inlineOperatorChange: [{ type: Output }],
|
|
2484
2210
|
_columnFilter: [{ type: Input, args: ['columnFilter',] }],
|
|
2211
|
+
cacheValues: [{ type: Input }],
|
|
2485
2212
|
_column: [{ type: Input, args: ['column',] }],
|
|
2486
2213
|
filterChange: [{ type: Output }]
|
|
2487
2214
|
};
|
|
@@ -2566,7 +2293,7 @@ SdSelectionVisiblePipe.decorators = [
|
|
|
2566
2293
|
},] }
|
|
2567
2294
|
];
|
|
2568
2295
|
|
|
2569
|
-
class
|
|
2296
|
+
class SdTableQuickAction {
|
|
2570
2297
|
constructor() {
|
|
2571
2298
|
this.clear = new EventEmitter();
|
|
2572
2299
|
this.onClear = () => {
|
|
@@ -2574,196 +2301,21 @@ class SdGridQuickAction {
|
|
|
2574
2301
|
};
|
|
2575
2302
|
}
|
|
2576
2303
|
}
|
|
2577
|
-
|
|
2304
|
+
SdTableQuickAction.decorators = [
|
|
2578
2305
|
{ type: Component, args: [{
|
|
2579
|
-
selector: 'sd-
|
|
2306
|
+
selector: 'sd-table-quick-action',
|
|
2580
2307
|
template: "<sd-quick-action *ngIf=\"selectedItems | selectionActionFilter: gridOption?.selector?.actions as actions\"\r\n [isOpened]=\"actions?.length\">\r\n <div class=\"d-flex align-items-center\" sdMessage>\r\n <div class=\"c-bg-length\">\r\n <span class=\"c-length\">{{ selectedItems.length }}</span>\r\n </div>\r\n <div class=\"c-message\">{{ gridOption?.selector?.message || 'd\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c ch\u1ECDn' }}</div>\r\n </div>\r\n <div class=\"d-flex align-items-center mr-8\" sdAction>\r\n <ng-container *ngFor=\"let action of actions\">\r\n <sd-button *ngIf=\"action.click\" class=\"ml-5\" [tooltip]=\"action.tooltip\" [icon]=\"action.icon\"\r\n [color]=\"action.color || 'secondary'\" [type]=\"action.type || 'light'\" [fontSet]=\"action.fontSet\"\r\n [title]=\"action.title\" size=\"sm\" (action)=\"action.click(selectedItems)\"></sd-button>\r\n <ng-container *ngIf=\"action.children?.length\">\r\n <sd-button class=\"ml-5\" [tooltip]=\"action.tooltip\" [icon]=\"action.icon || 'more_vert'\"\r\n [color]=\"action.color || 'secondary'\" [type]=\"action.type || 'light'\" [fontSet]=\"action.fontSet\"\r\n [title]=\"action.title\" size=\"sm\" [matMenuTriggerFor]=\"menu\">\r\n </sd-button>\r\n <mat-menu #menu=\"matMenu\">\r\n <span>\r\n <button *ngFor=\"let childAction of action.children\" mat-menu-item (click)=\"childAction.click(selectedItems)\"\r\n [disabled]=\"childAction.disabled\">\r\n <mat-icon [fontSet]=\"childAction.fontSet\" class=\"c-icon\">{{ childAction.icon }}\r\n </mat-icon>\r\n <span> {{ childAction.title }}</span>\r\n </button>\r\n </span>\r\n </mat-menu>\r\n </ng-container>\r\n </ng-container>\r\n <sd-button class=\"ml-5\" icon=\"close\" color=\"secondary\" type=\"outline\" size=\"sm\"\r\n (action)=\"onClear()\" width=\"35px\"></sd-button>\r\n </div>\r\n</sd-quick-action>",
|
|
2581
2308
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2582
2309
|
styles: [".c-bg-length{align-items:flex-start;background:#2962ff;border-radius:4px 0 0 4px;display:flex;flex-direction:column;height:48px;left:0;min-width:48px;padding:12px 8px;position:static;top:0;width:auto}.c-bg-length .c-length{color:#fff;font-size:16px;font-weight:500;height:24px;left:8px;line-height:24px;min-width:32px;text-align:center;top:12px;width:auto}.c-bg-length .c-length,.c-message{font-family:Roboto;font-style:normal;position:static}.c-message{color:#000;font-size:14px;font-weight:400;height:20px;left:0;line-height:20px;margin:0 0 0 16px;min-width:200px;top:6px}"]
|
|
2583
2310
|
},] }
|
|
2584
2311
|
];
|
|
2585
|
-
|
|
2586
|
-
|
|
2312
|
+
SdTableQuickAction.ctorParameters = () => [];
|
|
2313
|
+
SdTableQuickAction.propDecorators = {
|
|
2587
2314
|
gridOption: [{ type: Input }],
|
|
2588
2315
|
selectedItems: [{ type: Input }],
|
|
2589
2316
|
clear: [{ type: Output }]
|
|
2590
2317
|
};
|
|
2591
2318
|
|
|
2592
|
-
var _maxSecond, _maxMinute, _maxHour, _maxDay, _maxMonth, _isMobileOrTablet$1;
|
|
2593
|
-
class SdCellViewPipe {
|
|
2594
|
-
constructor(deviceService, utilityService, columnValuesPipe) {
|
|
2595
|
-
this.utilityService = utilityService;
|
|
2596
|
-
this.columnValuesPipe = columnValuesPipe;
|
|
2597
|
-
_maxSecond.set(this, 60);
|
|
2598
|
-
_maxMinute.set(this, __classPrivateFieldGet(this, _maxSecond) * 60);
|
|
2599
|
-
_maxHour.set(this, __classPrivateFieldGet(this, _maxMinute) * 24);
|
|
2600
|
-
_maxDay.set(this, __classPrivateFieldGet(this, _maxHour) * 30);
|
|
2601
|
-
_maxMonth.set(this, __classPrivateFieldGet(this, _maxHour) * 365);
|
|
2602
|
-
_isMobileOrTablet$1.set(this, false);
|
|
2603
|
-
__classPrivateFieldSet(this, _isMobileOrTablet$1, !deviceService.isDesktop());
|
|
2604
|
-
}
|
|
2605
|
-
transform(value, tableItem, column, gridOption) {
|
|
2606
|
-
var _a;
|
|
2607
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
2608
|
-
const { displayOnEmpty } = gridOption;
|
|
2609
|
-
const rowData = tableItem.current;
|
|
2610
|
-
const { align, click, tooltip, htmlTemplate, transform } = column;
|
|
2611
|
-
const result = {
|
|
2612
|
-
badge: null,
|
|
2613
|
-
tooltip: null,
|
|
2614
|
-
display: {
|
|
2615
|
-
align: align || (column.type === 'number' ? 'right' : 'left'),
|
|
2616
|
-
value
|
|
2617
|
-
},
|
|
2618
|
-
click: null
|
|
2619
|
-
};
|
|
2620
|
-
// Display
|
|
2621
|
-
if (typeof (htmlTemplate) === 'function') {
|
|
2622
|
-
result.display.hasHtml = true;
|
|
2623
|
-
result.display.html = htmlTemplate(value, rowData, __classPrivateFieldGet(this, _isMobileOrTablet$1));
|
|
2624
|
-
}
|
|
2625
|
-
else {
|
|
2626
|
-
if (column.type === 'datetime' || column.type === 'date' || column.type === 'time') {
|
|
2627
|
-
const { transformDate } = column;
|
|
2628
|
-
if (transformDate) {
|
|
2629
|
-
value = transformDate(value, rowData);
|
|
2630
|
-
}
|
|
2631
|
-
}
|
|
2632
|
-
if (typeof (transform) === 'function') {
|
|
2633
|
-
const val = transform(value, rowData);
|
|
2634
|
-
if (val instanceof Promise) {
|
|
2635
|
-
result.display.value = yield val;
|
|
2636
|
-
}
|
|
2637
|
-
else {
|
|
2638
|
-
result.display.value = val;
|
|
2639
|
-
}
|
|
2640
|
-
}
|
|
2641
|
-
else {
|
|
2642
|
-
if (column.type === 'date' || column.type === 'datetime') {
|
|
2643
|
-
const { option } = column;
|
|
2644
|
-
const seconds = Math.round((new Date().getTime() - new Date(value).getTime()) / 1000);
|
|
2645
|
-
if ((option === null || option === void 0 ? void 0 : option.timeDifferent) === 'month' && seconds < __classPrivateFieldGet(this, _maxMonth)) {
|
|
2646
|
-
result.display.value = this.utilityService.timeDifference(value);
|
|
2647
|
-
result.tooltip = Date.toFormat(value, column.type === 'date' ? 'dd/MM/yyyy' : 'dd/MM/yyyy HH:mm');
|
|
2648
|
-
}
|
|
2649
|
-
else if ((option === null || option === void 0 ? void 0 : option.timeDifferent) === 'day' && seconds < __classPrivateFieldGet(this, _maxDay)) {
|
|
2650
|
-
result.display.value = this.utilityService.timeDifference(value);
|
|
2651
|
-
result.tooltip = Date.toFormat(value, column.type === 'date' ? 'dd/MM/yyyy' : 'dd/MM/yyyy HH:mm');
|
|
2652
|
-
}
|
|
2653
|
-
else if ((option === null || option === void 0 ? void 0 : option.timeDifferent) === 'hour' && seconds < __classPrivateFieldGet(this, _maxHour)) {
|
|
2654
|
-
result.display.value = this.utilityService.timeDifference(value);
|
|
2655
|
-
result.tooltip = Date.toFormat(value, column.type === 'date' ? 'dd/MM/yyyy' : 'dd/MM/yyyy HH:mm');
|
|
2656
|
-
}
|
|
2657
|
-
else if ((option === null || option === void 0 ? void 0 : option.timeDifferent) === 'minute' && seconds < __classPrivateFieldGet(this, _maxMinute)) {
|
|
2658
|
-
result.display.value = this.utilityService.timeDifference(value);
|
|
2659
|
-
result.tooltip = Date.toFormat(value, column.type === 'date' ? 'dd/MM/yyyy' : 'dd/MM/yyyy HH:mm');
|
|
2660
|
-
}
|
|
2661
|
-
else if ((option === null || option === void 0 ? void 0 : option.timeDifferent) === 'second' && seconds < __classPrivateFieldGet(this, _maxSecond)) {
|
|
2662
|
-
result.display.value = this.utilityService.timeDifference(value);
|
|
2663
|
-
result.tooltip = Date.toFormat(value, column.type === 'date' ? 'dd/MM/yyyy' : 'dd/MM/yyyy HH:mm');
|
|
2664
|
-
}
|
|
2665
|
-
else {
|
|
2666
|
-
const date = Date.toFormat(value, 'dd/MM/yyyy');
|
|
2667
|
-
const time = Date.toFormat(value, 'HH:mm');
|
|
2668
|
-
const dateTime = Date.toFormat(value, 'HH:mm');
|
|
2669
|
-
if (column.type === 'datetime' && time && time !== '00:00') {
|
|
2670
|
-
result.display.value = dateTime;
|
|
2671
|
-
result.display.hasHtml = true;
|
|
2672
|
-
result.display.html = `<span class="d-block T14R text-black400">${Date.toFormat(value, 'HH:mm')}</span><span class="d-block T14R">${Date.toFormat(value, 'dd/MM/yyyy')}</span>`;
|
|
2673
|
-
}
|
|
2674
|
-
else {
|
|
2675
|
-
result.display.value = date;
|
|
2676
|
-
}
|
|
2677
|
-
}
|
|
2678
|
-
}
|
|
2679
|
-
if (column.type === 'time') {
|
|
2680
|
-
result.display.value = Date.toFormat(value, 'HH:mm');
|
|
2681
|
-
}
|
|
2682
|
-
if (column.type === 'values') {
|
|
2683
|
-
result.display.value = yield this.columnValuesPipe.transform(value, column);
|
|
2684
|
-
}
|
|
2685
|
-
else if (column.type === 'number' && Number.isNumber(value)) {
|
|
2686
|
-
result.display.value = Number.toVNCurrency(value);
|
|
2687
|
-
}
|
|
2688
|
-
if (column.type === 'bool') {
|
|
2689
|
-
const { option } = column;
|
|
2690
|
-
if (value !== undefined && value !== null && value !== '') {
|
|
2691
|
-
result.display.value = value === true ? ((option === null || option === void 0 ? void 0 : option.displayOnTrue) || 'True') : ((option === null || option === void 0 ? void 0 : option.displayOnFalse) || 'False');
|
|
2692
|
-
}
|
|
2693
|
-
else {
|
|
2694
|
-
result.display.value = null;
|
|
2695
|
-
}
|
|
2696
|
-
}
|
|
2697
|
-
}
|
|
2698
|
-
if (displayOnEmpty) {
|
|
2699
|
-
let values = [null, undefined, ''];
|
|
2700
|
-
if (typeof (displayOnEmpty) === 'object') {
|
|
2701
|
-
const { display, emptyValues } = displayOnEmpty;
|
|
2702
|
-
values = [null, undefined, '', ...emptyValues];
|
|
2703
|
-
if (values.includes(result.display.value)) {
|
|
2704
|
-
if (typeof (display) === 'function') {
|
|
2705
|
-
result.display.hasHtml = true;
|
|
2706
|
-
result.display.html = display(rowData, column);
|
|
2707
|
-
}
|
|
2708
|
-
else {
|
|
2709
|
-
result.display.hasHtml = true;
|
|
2710
|
-
result.display.html = `<div class="T16R text-black400">--</div>`;
|
|
2711
|
-
}
|
|
2712
|
-
}
|
|
2713
|
-
}
|
|
2714
|
-
else {
|
|
2715
|
-
if (values.includes(result.display.value)) {
|
|
2716
|
-
if (typeof (displayOnEmpty) === 'function') {
|
|
2717
|
-
result.display.hasHtml = true;
|
|
2718
|
-
result.display.html = displayOnEmpty(rowData, column);
|
|
2719
|
-
}
|
|
2720
|
-
else {
|
|
2721
|
-
result.display.hasHtml = true;
|
|
2722
|
-
result.display.html = `<div class="T16R text-black400">--</div>`;
|
|
2723
|
-
}
|
|
2724
|
-
}
|
|
2725
|
-
}
|
|
2726
|
-
}
|
|
2727
|
-
}
|
|
2728
|
-
// Badge
|
|
2729
|
-
if ((column.type === 'string' || column.type === 'number' || column.type === 'values') && column.badge) {
|
|
2730
|
-
result.badge = {
|
|
2731
|
-
type: !(column === null || column === void 0 ? void 0 : column.badgeType) ? 'round' : column.badgeType,
|
|
2732
|
-
color: column.badge(value, rowData),
|
|
2733
|
-
icon: (_a = column === null || column === void 0 ? void 0 : column.badgeIcon) === null || _a === void 0 ? void 0 : _a.call(column, value, rowData)
|
|
2734
|
-
};
|
|
2735
|
-
}
|
|
2736
|
-
else if (column.type === 'bool') {
|
|
2737
|
-
result.badge = {
|
|
2738
|
-
type: !(column === null || column === void 0 ? void 0 : column.badgeType) ? 'round' : column.badgeType,
|
|
2739
|
-
color: !!value ? 'success' : 'danger',
|
|
2740
|
-
icon: null
|
|
2741
|
-
};
|
|
2742
|
-
}
|
|
2743
|
-
// Tooltip
|
|
2744
|
-
if (typeof (tooltip) === 'function') {
|
|
2745
|
-
result.tooltip = tooltip(value, rowData);
|
|
2746
|
-
}
|
|
2747
|
-
// Clickable
|
|
2748
|
-
if (typeof (click) === 'function') {
|
|
2749
|
-
result.click = () => click(value, rowData);
|
|
2750
|
-
}
|
|
2751
|
-
return result;
|
|
2752
|
-
});
|
|
2753
|
-
}
|
|
2754
|
-
}
|
|
2755
|
-
_maxSecond = new WeakMap(), _maxMinute = new WeakMap(), _maxHour = new WeakMap(), _maxDay = new WeakMap(), _maxMonth = new WeakMap(), _isMobileOrTablet$1 = new WeakMap();
|
|
2756
|
-
SdCellViewPipe.decorators = [
|
|
2757
|
-
{ type: Pipe, args: [{
|
|
2758
|
-
name: 'cellView'
|
|
2759
|
-
},] }
|
|
2760
|
-
];
|
|
2761
|
-
SdCellViewPipe.ctorParameters = () => [
|
|
2762
|
-
{ type: DeviceDetectorService },
|
|
2763
|
-
{ type: SdUtilityService },
|
|
2764
|
-
{ type: SdColumnValuesPipe }
|
|
2765
|
-
];
|
|
2766
|
-
|
|
2767
2319
|
class SdGroupPipe {
|
|
2768
2320
|
transform(items, gridOption) {
|
|
2769
2321
|
var _a;
|
|
@@ -2861,7 +2413,7 @@ SdTableModule.decorators = [
|
|
|
2861
2413
|
SdGroupModule,
|
|
2862
2414
|
],
|
|
2863
2415
|
declarations: [
|
|
2864
|
-
|
|
2416
|
+
SdTableQuickAction,
|
|
2865
2417
|
SdDesktopCell,
|
|
2866
2418
|
SdDesktopCellView,
|
|
2867
2419
|
SdDesktopCommand,
|
|
@@ -2872,28 +2424,21 @@ SdTableModule.decorators = [
|
|
|
2872
2424
|
SdMaterialFilterDefDirective,
|
|
2873
2425
|
SdMaterialSubInformationDefDirective,
|
|
2874
2426
|
SdMaterialEmptyDataDefDirective,
|
|
2875
|
-
|
|
2876
|
-
|
|
2427
|
+
SdPopupConfiguration,
|
|
2428
|
+
SdTableFilter,
|
|
2877
2429
|
SdPopupFilter,
|
|
2878
2430
|
// Pipes
|
|
2879
|
-
SdGridConfigurationResultPipe,
|
|
2880
|
-
SdColumnChildrenFilterPipe,
|
|
2881
2431
|
SdCommandFilterPipe,
|
|
2882
2432
|
SdCommandDisablePipe,
|
|
2883
2433
|
SdCommandIconPipe,
|
|
2884
2434
|
SdCommandTitlePipe,
|
|
2885
|
-
SdColumnValuesPipe,
|
|
2886
|
-
SdColumnHtmlTemplatePipe,
|
|
2887
|
-
SdColumnTransformPipe,
|
|
2888
2435
|
SdColumnTooltipPipe,
|
|
2889
|
-
SdColumnBadgePipe,
|
|
2890
2436
|
SdFilterColumnPipe,
|
|
2891
2437
|
SdFilterExternalPipe,
|
|
2892
2438
|
SdSelectionActionFilterPipe,
|
|
2893
2439
|
SdSelectionVisiblePipe,
|
|
2894
2440
|
SdSelectionDisablePipe,
|
|
2895
2441
|
SdSelectionVisibleSelectAllPipe,
|
|
2896
|
-
SdCellViewPipe,
|
|
2897
2442
|
SdGroupPipe,
|
|
2898
2443
|
],
|
|
2899
2444
|
exports: [
|
|
@@ -2910,7 +2455,6 @@ SdTableModule.decorators = [
|
|
|
2910
2455
|
CdkColumnDef,
|
|
2911
2456
|
SdTableFilterService,
|
|
2912
2457
|
SdTableConfigurationService,
|
|
2913
|
-
SdColumnValuesPipe,
|
|
2914
2458
|
{
|
|
2915
2459
|
provide: MatPaginatorIntl,
|
|
2916
2460
|
useClass: MatPaginatorIntlCro,
|
|
@@ -2923,5 +2467,5 @@ SdTableModule.decorators = [
|
|
|
2923
2467
|
* Generated bundle index. Do not edit.
|
|
2924
2468
|
*/
|
|
2925
2469
|
|
|
2926
|
-
export { DEFAULT_TABLE_CONFIG, MatPaginatorIntlCro, SdFilterOperators, SdTable, SdTableModule, TABLE_CONFIG,
|
|
2470
|
+
export { DEFAULT_TABLE_CONFIG, MatPaginatorIntlCro, SdFilterOperators, SdTable, SdTableModule, TABLE_CONFIG, SdTableQuickAction as ɵa, SdDesktopCell as ɵb, SdSelectionDisablePipe as ɵba, SdSelectionVisibleSelectAllPipe as ɵbb, SdGroupPipe as ɵbc, SdDesktopCellView as ɵc, SdDesktopCommand as ɵd, SdColumnInlineFilter as ɵe, SdPopupConfiguration as ɵf, SdTableConfigurationService as ɵg, TABLE_CONFIG as ɵi, SdTableFilter as ɵj, SdPopupFilter as ɵk, SdMaterialSubInformationDefDirective as ɵl, SdMaterialEmptyDataDefDirective as ɵm, SdMaterialCellDefDirective as ɵn, SdMaterialFooterDefDirective as ɵo, SdMaterialFilterDefDirective as ɵp, SdTableFilterService as ɵq, SdCommandFilterPipe as ɵr, SdCommandDisablePipe as ɵs, SdCommandIconPipe as ɵt, SdCommandTitlePipe as ɵu, SdColumnTooltipPipe as ɵv, SdFilterColumnPipe as ɵw, SdFilterExternalPipe as ɵx, SdSelectionActionFilterPipe as ɵy, SdSelectionVisiblePipe as ɵz };
|
|
2927
2471
|
//# sourceMappingURL=sd-angular-core-table.js.map
|