@sd-angular/core 0.0.1005 → 0.0.1009
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/token.service.d.ts +1 -2
- package/autocomplete/sd-angular-core-autocomplete.metadata.json +1 -1
- package/autocomplete/src/lib/autocomplete.component.d.ts +14 -9
- package/autocomplete/src/lib/autocomplete.module.d.ts +0 -1
- package/bundles/sd-angular-core-api.umd.js +29 -12
- 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-autocomplete.umd.js +150 -129
- package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.min.js +2 -2
- package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-button.umd.js +29 -12
- package/bundles/sd-angular-core-button.umd.js.map +1 -1
- package/bundles/sd-angular-core-button.umd.min.js +1 -1
- package/bundles/sd-angular-core-button.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-cache.umd.js +33 -16
- package/bundles/sd-angular-core-cache.umd.js.map +1 -1
- package/bundles/sd-angular-core-cache.umd.min.js +2 -2
- package/bundles/sd-angular-core-cache.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-chart.umd.js +33 -20
- package/bundles/sd-angular-core-chart.umd.js.map +1 -1
- package/bundles/sd-angular-core-chart.umd.min.js +1 -1
- package/bundles/sd-angular-core-chart.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-checkbox.umd.js +29 -12
- package/bundles/sd-angular-core-checkbox.umd.js.map +1 -1
- package/bundles/sd-angular-core-checkbox.umd.min.js +1 -1
- package/bundles/sd-angular-core-checkbox.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-chip.umd.js +29 -12
- package/bundles/sd-angular-core-chip.umd.js.map +1 -1
- package/bundles/sd-angular-core-chip.umd.min.js +1 -1
- package/bundles/sd-angular-core-chip.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-comment.umd.js +446 -0
- package/bundles/sd-angular-core-comment.umd.js.map +1 -0
- package/bundles/sd-angular-core-comment.umd.min.js +16 -0
- package/bundles/sd-angular-core-comment.umd.min.js.map +1 -0
- package/bundles/sd-angular-core-common.umd.js +407 -16
- package/bundles/sd-angular-core-common.umd.js.map +1 -1
- package/bundles/sd-angular-core-common.umd.min.js +2 -2
- package/bundles/sd-angular-core-common.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-date-range.umd.js +33 -16
- package/bundles/sd-angular-core-date-range.umd.js.map +1 -1
- package/bundles/sd-angular-core-date-range.umd.min.js +2 -2
- package/bundles/sd-angular-core-date-range.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-date-time.umd.js +86 -47
- package/bundles/sd-angular-core-date-time.umd.js.map +1 -1
- package/bundles/sd-angular-core-date-time.umd.min.js +2 -2
- package/bundles/sd-angular-core-date-time.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-editor.umd.js +29 -12
- package/bundles/sd-angular-core-editor.umd.js.map +1 -1
- package/bundles/sd-angular-core-editor.umd.min.js +1 -1
- package/bundles/sd-angular-core-editor.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-excel.umd.js +29 -12
- package/bundles/sd-angular-core-excel.umd.js.map +1 -1
- package/bundles/sd-angular-core-excel.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-export.umd.js +33 -16
- package/bundles/sd-angular-core-export.umd.js.map +1 -1
- package/bundles/sd-angular-core-export.umd.min.js +1 -1
- package/bundles/sd-angular-core-export.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-form.umd.js +4 -4
- package/bundles/sd-angular-core-form.umd.min.js +1 -1
- package/bundles/sd-angular-core-form.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.js +61 -82
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +2 -2
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-grid.umd.js +34 -16
- package/bundles/sd-angular-core-grid.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid.umd.min.js +1 -1
- package/bundles/sd-angular-core-grid.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-currency.umd.js +29 -12
- package/bundles/sd-angular-core-input-currency.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-currency.umd.min.js +2 -2
- package/bundles/sd-angular-core-input-currency.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.js +29 -12
- package/bundles/sd-angular-core-input-dropdown.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.min.js +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-upload-file.umd.js +33 -16
- package/bundles/sd-angular-core-input-upload-file.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-upload-file.umd.min.js +2 -2
- package/bundles/sd-angular-core-input-upload-file.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input.umd.js +64 -29
- package/bundles/sd-angular-core-input.umd.js.map +1 -1
- package/bundles/sd-angular-core-input.umd.min.js +2 -2
- package/bundles/sd-angular-core-input.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-konva.umd.js +29 -12
- package/bundles/sd-angular-core-konva.umd.js.map +1 -1
- package/bundles/sd-angular-core-konva.umd.min.js +1 -1
- package/bundles/sd-angular-core-konva.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-modal.umd.js +4 -4
- package/bundles/sd-angular-core-modal.umd.js.map +1 -1
- package/bundles/sd-angular-core-modal.umd.min.js +1 -1
- package/bundles/sd-angular-core-modal.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-radio.umd.js +33 -20
- package/bundles/sd-angular-core-radio.umd.js.map +1 -1
- package/bundles/sd-angular-core-radio.umd.min.js +2 -2
- package/bundles/sd-angular-core-radio.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-select-editor.umd.js +33 -16
- package/bundles/sd-angular-core-select-editor.umd.js.map +1 -1
- package/bundles/sd-angular-core-select-editor.umd.min.js +2 -2
- package/bundles/sd-angular-core-select-editor.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-select.umd.js +165 -140
- package/bundles/sd-angular-core-select.umd.js.map +1 -1
- package/bundles/sd-angular-core-select.umd.min.js +2 -2
- package/bundles/sd-angular-core-select.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-service.umd.js +8 -202
- package/bundles/sd-angular-core-service.umd.js.map +1 -1
- package/bundles/sd-angular-core-service.umd.min.js +1 -1
- package/bundles/sd-angular-core-service.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-setting.umd.js +29 -12
- package/bundles/sd-angular-core-setting.umd.js.map +1 -1
- package/bundles/sd-angular-core-setting.umd.min.js +1 -1
- package/bundles/sd-angular-core-setting.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-side-drawer.umd.js +33 -16
- package/bundles/sd-angular-core-side-drawer.umd.js.map +1 -1
- package/bundles/sd-angular-core-side-drawer.umd.min.js +2 -2
- package/bundles/sd-angular-core-side-drawer.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-switch.umd.js +29 -12
- package/bundles/sd-angular-core-switch.umd.js.map +1 -1
- package/bundles/sd-angular-core-switch.umd.min.js +2 -2
- package/bundles/sd-angular-core-switch.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-tab-router.umd.js +29 -12
- package/bundles/sd-angular-core-tab-router.umd.js.map +1 -1
- package/bundles/sd-angular-core-tab-router.umd.min.js +2 -2
- package/bundles/sd-angular-core-tab-router.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-textarea.umd.js +29 -12
- package/bundles/sd-angular-core-textarea.umd.js.map +1 -1
- package/bundles/sd-angular-core-textarea.umd.min.js +2 -2
- package/bundles/sd-angular-core-textarea.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-time.umd.js +33 -16
- package/bundles/sd-angular-core-time.umd.js.map +1 -1
- package/bundles/sd-angular-core-time.umd.min.js +2 -2
- package/bundles/sd-angular-core-time.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-upload-excel.umd.js +33 -16
- package/bundles/sd-angular-core-upload-excel.umd.js.map +1 -1
- package/bundles/sd-angular-core-upload-excel.umd.min.js +1 -1
- package/bundles/sd-angular-core-upload-excel.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-upload-file.umd.js +33 -16
- package/bundles/sd-angular-core-upload-file.umd.js.map +1 -1
- package/bundles/sd-angular-core-upload-file.umd.min.js +2 -2
- package/bundles/sd-angular-core-upload-file.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-utility.umd.js +33 -16
- 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/bundles/sd-angular-core.umd.js +33 -20
- package/bundles/sd-angular-core.umd.js.map +1 -1
- package/bundles/sd-angular-core.umd.min.js +1 -1
- package/bundles/sd-angular-core.umd.min.js.map +1 -1
- package/cache/sd-angular-core-cache.metadata.json +1 -1
- package/cache/src/lib/cache.service.d.ts +0 -1
- package/cache/src/public-api.d.ts +1 -0
- package/chart/sd-angular-core-chart.metadata.json +1 -1
- package/chart/src/lib/chart.component.d.ts +0 -1
- package/chart/src/public-api.d.ts +1 -0
- package/{typing → comment}/index.d.ts +0 -0
- package/comment/package.json +12 -0
- package/{typing/sd-angular-core-typing.d.ts → comment/sd-angular-core-comment.d.ts} +0 -0
- package/comment/sd-angular-core-comment.metadata.json +1 -0
- package/comment/src/lib/comment.component.d.ts +17 -0
- package/comment/src/lib/comment.model.d.ts +21 -0
- package/comment/src/lib/comment.module.d.ts +2 -0
- package/comment/src/public-api.d.ts +3 -0
- package/common/sd-angular-core-common.metadata.json +1 -1
- package/common/src/lib/common.module.d.ts +2 -0
- package/{grid-material → common}/src/lib/directives/sd-let.directive.d.ts +0 -0
- package/common/src/lib/directives/view-def.directive.d.ts +5 -0
- package/common/src/lib/typings/array.extension.d.ts +20 -0
- package/{service → common}/src/lib/typings/date.extension.d.ts +0 -0
- package/{service → common}/src/lib/typings/number.extension.d.ts +0 -0
- package/{typing/src/lib/typing → common/src/lib/typings}/string.extension.d.ts +2 -0
- package/common/src/public-api.d.ts +7 -0
- package/date-range/index.d.ts +0 -1
- package/date-range/sd-angular-core-date-range.metadata.json +1 -1
- package/date-range/src/lib/date-range.component.d.ts +0 -1
- package/date-range/src/lib/date-range.module.d.ts +0 -1
- package/date-range/src/public-api.d.ts +1 -1
- package/date-time/sd-angular-core-date-time.metadata.json +1 -1
- package/date-time/src/lib/date-time.component.d.ts +14 -7
- package/date-time/src/lib/date-time.module.d.ts +0 -1
- package/date-time/src/public-api.d.ts +0 -1
- package/esm2015/api/src/lib/token.service.js +1 -1
- package/esm2015/autocomplete/src/lib/autocomplete.component.js +111 -89
- package/esm2015/autocomplete/src/lib/autocomplete.module.js +6 -4
- package/esm2015/cache/src/lib/cache.service.js +1 -2
- package/esm2015/cache/src/public-api.js +2 -1
- package/esm2015/chart/src/lib/chart.component.js +1 -2
- package/esm2015/chart/src/public-api.js +2 -4
- package/esm2015/{typing → comment}/index.js +1 -1
- package/esm2015/comment/sd-angular-core-comment.js +5 -0
- package/esm2015/comment/src/lib/comment.component.js +60 -0
- package/esm2015/comment/src/lib/comment.model.js +2 -0
- package/esm2015/comment/src/lib/comment.module.js +37 -0
- package/esm2015/comment/src/public-api.js +7 -0
- package/esm2015/common/src/lib/common.module.js +24 -0
- package/esm2015/common/src/lib/directives/sd-let.directive.js +29 -0
- package/esm2015/common/src/lib/directives/view-def.directive.js +16 -0
- package/esm2015/common/src/lib/typings/array.extension.js +65 -0
- package/esm2015/common/src/lib/typings/date.extension.js +143 -0
- package/esm2015/common/src/lib/typings/number.extension.js +33 -0
- package/esm2015/common/src/lib/typings/string.extension.js +42 -0
- package/esm2015/common/src/public-api.js +8 -1
- package/esm2015/date-range/index.js +1 -2
- package/esm2015/date-range/src/lib/date-range.component.js +1 -2
- package/esm2015/date-range/src/lib/date-range.module.js +1 -2
- package/esm2015/date-range/src/public-api.js +2 -2
- package/esm2015/date-time/src/lib/date-time.component.js +55 -35
- package/esm2015/date-time/src/lib/date-time.module.js +5 -3
- package/esm2015/date-time/src/public-api.js +1 -2
- package/esm2015/export/src/lib/export.service.js +1 -2
- package/esm2015/form/src/public-api.js +2 -1
- package/esm2015/grid/src/lib/components/grid-date-picker-control/grid-date-picker-control.component.js +1 -2
- package/esm2015/grid/src/lib/grid.module.js +1 -2
- package/esm2015/grid/src/lib/models/handler-dotnet.js +1 -2
- package/esm2015/grid-material/sd-angular-core-grid-material.js +27 -28
- package/esm2015/grid-material/src/lib/grid-material.module.js +4 -5
- package/esm2015/grid-material/src/public-api.js +2 -4
- package/esm2015/input/src/lib/input.component.js +26 -6
- package/esm2015/input/src/lib/input.module.js +6 -3
- package/esm2015/input-upload-file/src/lib/input-upload-file.component.js +2 -2
- package/esm2015/input-upload-file/src/lib/input-upload-file.module.js +1 -2
- package/esm2015/lib/controls/date-picker-control/date-picker-control.component.js +1 -2
- package/esm2015/lib/pipes/sd-date.pipe.js +1 -2
- package/esm2015/modal/src/lib/modal.module.js +1 -2
- package/esm2015/public-api.js +12 -14
- package/esm2015/radio/src/lib/radio.module.js +1 -2
- package/esm2015/radio/src/public-api.js +2 -4
- package/esm2015/select/src/lib/select.component.js +74 -76
- package/esm2015/select/src/lib/select.module.js +6 -4
- package/esm2015/select-editor/src/lib/select-editor.module.js +1 -2
- package/esm2015/service/src/lib/service.module.js +6 -4
- package/esm2015/service/src/public-api.js +2 -2
- package/esm2015/side-drawer/src/lib/side-drawer.module.js +1 -2
- package/esm2015/time/src/lib/time.component.js +1 -2
- package/esm2015/time/src/public-api.js +2 -1
- package/esm2015/upload-excel/src/lib/upload-excel.component.js +1 -2
- package/esm2015/upload-excel/src/lib/upload-excel.module.js +1 -2
- package/esm2015/upload-file/src/lib/upload-file.module.js +1 -2
- package/esm2015/utility/src/lib/pipes/currency.pipe.js +1 -2
- package/esm2015/utility/src/lib/pipes/time-different.pipe.js +1 -2
- package/esm2015/utility/src/lib/utility.service.js +1 -2
- package/esm2015/utility/src/public-api.js +2 -1
- package/export/sd-angular-core-export.metadata.json +1 -1
- package/export/src/lib/export.service.d.ts +0 -1
- package/fesm2015/sd-angular-core-api.js.map +1 -1
- package/fesm2015/sd-angular-core-autocomplete.js +114 -91
- package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
- package/fesm2015/sd-angular-core-cache.js +1 -1
- package/fesm2015/sd-angular-core-cache.js.map +1 -1
- package/fesm2015/sd-angular-core-chart.js +1 -5
- package/fesm2015/sd-angular-core-chart.js.map +1 -1
- package/fesm2015/sd-angular-core-comment.js +106 -0
- package/fesm2015/sd-angular-core-comment.js.map +1 -0
- package/fesm2015/sd-angular-core-common.js +346 -2
- package/fesm2015/sd-angular-core-common.js.map +1 -1
- package/fesm2015/sd-angular-core-date-range.js +1 -1
- package/fesm2015/sd-angular-core-date-range.js.map +1 -1
- package/fesm2015/sd-angular-core-date-time.js +57 -36
- package/fesm2015/sd-angular-core-date-time.js.map +1 -1
- package/fesm2015/sd-angular-core-export.js +0 -1
- package/fesm2015/sd-angular-core-export.js.map +1 -1
- package/fesm2015/sd-angular-core-form.js +1 -0
- package/fesm2015/sd-angular-core-form.js.map +1 -1
- package/fesm2015/sd-angular-core-grid-material.js +5 -37
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/fesm2015/sd-angular-core-grid.js +1 -1
- package/fesm2015/sd-angular-core-grid.js.map +1 -1
- package/fesm2015/sd-angular-core-input-upload-file.js +0 -1
- package/fesm2015/sd-angular-core-input-upload-file.js.map +1 -1
- package/fesm2015/sd-angular-core-input.js +29 -8
- package/fesm2015/sd-angular-core-input.js.map +1 -1
- package/fesm2015/sd-angular-core-modal.js +0 -1
- package/fesm2015/sd-angular-core-modal.js.map +1 -1
- package/fesm2015/sd-angular-core-radio.js +1 -5
- package/fesm2015/sd-angular-core-radio.js.map +1 -1
- package/fesm2015/sd-angular-core-select-editor.js +0 -1
- package/fesm2015/sd-angular-core-select-editor.js.map +1 -1
- package/fesm2015/sd-angular-core-select.js +77 -78
- package/fesm2015/sd-angular-core-select.js.map +1 -1
- package/fesm2015/sd-angular-core-service.js +5 -198
- package/fesm2015/sd-angular-core-service.js.map +1 -1
- package/fesm2015/sd-angular-core-side-drawer.js +0 -1
- package/fesm2015/sd-angular-core-side-drawer.js.map +1 -1
- package/fesm2015/sd-angular-core-time.js +1 -1
- package/fesm2015/sd-angular-core-time.js.map +1 -1
- package/fesm2015/sd-angular-core-upload-excel.js +0 -1
- package/fesm2015/sd-angular-core-upload-excel.js.map +1 -1
- package/fesm2015/sd-angular-core-upload-file.js +0 -1
- package/fesm2015/sd-angular-core-upload-file.js.map +1 -1
- package/fesm2015/sd-angular-core-utility.js +1 -1
- package/fesm2015/sd-angular-core-utility.js.map +1 -1
- package/fesm2015/sd-angular-core.js +15 -19
- package/fesm2015/sd-angular-core.js.map +1 -1
- package/form/src/public-api.d.ts +1 -0
- package/grid/sd-angular-core-grid.metadata.json +1 -1
- package/grid/src/lib/components/grid-date-picker-control/grid-date-picker-control.component.d.ts +0 -1
- package/grid/src/lib/grid.module.d.ts +0 -1
- package/grid/src/lib/models/handler-dotnet.d.ts +0 -1
- package/grid-material/sd-angular-core-grid-material.d.ts +26 -27
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/grid-material/src/lib/grid-material.module.d.ts +0 -1
- package/grid-material/src/public-api.d.ts +1 -0
- package/input/sd-angular-core-input.metadata.json +1 -1
- package/input/src/lib/input.component.d.ts +5 -0
- package/input-upload-file/sd-angular-core-input-upload-file.metadata.json +1 -1
- package/input-upload-file/src/lib/input-upload-file.module.d.ts +0 -1
- package/lib/controls/date-picker-control/date-picker-control.component.d.ts +0 -1
- package/lib/pipes/sd-date.pipe.d.ts +0 -1
- package/modal/sd-angular-core-modal.metadata.json +1 -1
- package/modal/src/lib/modal.module.d.ts +0 -1
- package/package.json +1 -1
- package/public-api.d.ts +11 -10
- package/radio/sd-angular-core-radio.metadata.json +1 -1
- package/radio/src/lib/radio.module.d.ts +0 -1
- package/radio/src/public-api.d.ts +1 -0
- package/{sd-angular-core-0.0.1005.tgz → sd-angular-core-0.0.1009.tgz} +0 -0
- package/sd-angular-core.metadata.json +1 -1
- package/select/sd-angular-core-select.metadata.json +1 -1
- package/select/src/lib/select.component.d.ts +12 -5
- package/select/src/lib/select.module.d.ts +0 -1
- package/select-editor/sd-angular-core-select-editor.metadata.json +1 -1
- package/select-editor/src/lib/select-editor.module.d.ts +0 -1
- package/service/sd-angular-core-service.metadata.json +1 -1
- package/service/src/lib/service.module.d.ts +0 -1
- package/service/src/public-api.d.ts +1 -1
- package/side-drawer/sd-angular-core-side-drawer.metadata.json +1 -1
- package/side-drawer/src/lib/side-drawer.module.d.ts +0 -1
- package/time/sd-angular-core-time.metadata.json +1 -1
- package/time/src/lib/time.component.d.ts +0 -1
- package/time/src/public-api.d.ts +1 -0
- package/upload-excel/sd-angular-core-upload-excel.metadata.json +1 -1
- package/upload-excel/src/lib/upload-excel.component.d.ts +0 -1
- package/upload-excel/src/lib/upload-excel.module.d.ts +0 -1
- package/upload-file/sd-angular-core-upload-file.metadata.json +1 -1
- package/upload-file/src/lib/upload-file.module.d.ts +0 -1
- package/utility/sd-angular-core-utility.metadata.json +1 -1
- package/utility/src/lib/pipes/currency.pipe.d.ts +0 -1
- package/utility/src/lib/pipes/time-different.pipe.d.ts +0 -1
- package/utility/src/lib/utility.service.d.ts +0 -1
- package/utility/src/public-api.d.ts +1 -0
- package/bundles/sd-angular-core-typing.umd.js +0 -226
- package/bundles/sd-angular-core-typing.umd.js.map +0 -1
- package/bundles/sd-angular-core-typing.umd.min.js +0 -2
- package/bundles/sd-angular-core-typing.umd.min.js.map +0 -1
- package/esm2015/grid-material/src/lib/directives/sd-let.directive.js +0 -29
- package/esm2015/service/src/lib/typings/date.extension.js +0 -143
- package/esm2015/service/src/lib/typings/index.js +0 -4
- package/esm2015/service/src/lib/typings/number.extension.js +0 -33
- package/esm2015/service/src/lib/typings/string.extension.js +0 -23
- package/esm2015/typing/sd-angular-core-typing.js +0 -5
- package/esm2015/typing/src/lib/typing/date.extension.js +0 -143
- package/esm2015/typing/src/lib/typing/index.js +0 -4
- package/esm2015/typing/src/lib/typing/number.extension.js +0 -33
- package/esm2015/typing/src/lib/typing/string.extension.js +0 -23
- package/esm2015/typing/src/lib/typing.service.js +0 -13
- package/esm2015/typing/src/public-api.js +0 -3
- package/fesm2015/sd-angular-core-typing.js +0 -215
- package/fesm2015/sd-angular-core-typing.js.map +0 -1
- package/service/src/lib/typings/index.d.ts +0 -3
- package/service/src/lib/typings/string.extension.d.ts +0 -8
- package/typing/package.json +0 -12
- package/typing/sd-angular-core-typing.metadata.json +0 -1
- package/typing/src/lib/typing/date.extension.d.ts +0 -24
- package/typing/src/lib/typing/index.d.ts +0 -3
- package/typing/src/lib/typing/number.extension.d.ts +0 -9
- package/typing/src/lib/typing.service.d.ts +0 -3
- package/typing/src/public-api.d.ts +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('rxjs/operators'), require('uuid'), require('rxjs'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@sd-angular/core/autocomplete', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/form-field', '@angular/material/input', 'rxjs/operators', 'uuid', 'rxjs', '@
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sd-angular'] = global['sd-angular'] || {}, global['sd-angular'].core = global['sd-angular'].core || {}, global['sd-angular'].core.autocomplete = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.rxjs.operators, global.uuid, global.rxjs, global
|
|
5
|
-
}(this, (function (exports, core, common$1, forms, formField, input, operators, uuid, rxjs,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('rxjs/operators'), require('uuid'), require('rxjs'), require('@angular/material/autocomplete'), require('@sd-angular/core/common'), require('@angular/material/icon'), require('@sd-angular/core/translate'), require('@angular/material/tooltip'), require('@angular/material/progress-spinner')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@sd-angular/core/autocomplete', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/form-field', '@angular/material/input', 'rxjs/operators', 'uuid', 'rxjs', '@angular/material/autocomplete', '@sd-angular/core/common', '@angular/material/icon', '@sd-angular/core/translate', '@angular/material/tooltip', '@angular/material/progress-spinner'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sd-angular'] = global['sd-angular'] || {}, global['sd-angular'].core = global['sd-angular'].core || {}, global['sd-angular'].core.autocomplete = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.rxjs.operators, global.uuid, global.rxjs, global.ng.material.autocomplete, global['sd-angular'].core.common, global.ng.material.icon, global['sd-angular'].core.translate, global.ng.material.tooltip, global.ng.material.progressSpinner));
|
|
5
|
+
}(this, (function (exports, core, common$1, forms, formField, input, operators, uuid, rxjs, autocomplete, common, icon, translate, tooltip, progressSpinner) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
return extendStatics(d, b);
|
|
29
29
|
};
|
|
30
30
|
function __extends(d, b) {
|
|
31
|
+
if (typeof b !== "function" && b !== null)
|
|
32
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
31
33
|
extendStatics(d, b);
|
|
32
34
|
function __() { this.constructor = d; }
|
|
33
35
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -213,11 +215,13 @@
|
|
|
213
215
|
}
|
|
214
216
|
return ar;
|
|
215
217
|
}
|
|
218
|
+
/** @deprecated */
|
|
216
219
|
function __spread() {
|
|
217
220
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
218
221
|
ar = ar.concat(__read(arguments[i]));
|
|
219
222
|
return ar;
|
|
220
223
|
}
|
|
224
|
+
/** @deprecated */
|
|
221
225
|
function __spreadArrays() {
|
|
222
226
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
223
227
|
s += arguments[i].length;
|
|
@@ -226,7 +230,17 @@
|
|
|
226
230
|
r[k] = a[j];
|
|
227
231
|
return r;
|
|
228
232
|
}
|
|
229
|
-
|
|
233
|
+
function __spreadArray(to, from, pack) {
|
|
234
|
+
if (pack || arguments.length === 2)
|
|
235
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
236
|
+
if (ar || !(i in from)) {
|
|
237
|
+
if (!ar)
|
|
238
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
239
|
+
ar[i] = from[i];
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
243
|
+
}
|
|
230
244
|
function __await(v) {
|
|
231
245
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
232
246
|
}
|
|
@@ -291,18 +305,21 @@
|
|
|
291
305
|
function __importDefault(mod) {
|
|
292
306
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
293
307
|
}
|
|
294
|
-
function __classPrivateFieldGet(receiver,
|
|
295
|
-
if (!
|
|
296
|
-
throw new TypeError("
|
|
297
|
-
|
|
298
|
-
|
|
308
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
309
|
+
if (kind === "a" && !f)
|
|
310
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
311
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
312
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
313
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
299
314
|
}
|
|
300
|
-
function __classPrivateFieldSet(receiver,
|
|
301
|
-
if (
|
|
302
|
-
throw new TypeError("
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
315
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
316
|
+
if (kind === "m")
|
|
317
|
+
throw new TypeError("Private method is not writable");
|
|
318
|
+
if (kind === "a" && !f)
|
|
319
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
320
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
321
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
322
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
306
323
|
}
|
|
307
324
|
|
|
308
325
|
var SdAutocompleteDisplayDefDirective = /** @class */ (function () {
|
|
@@ -320,7 +337,7 @@
|
|
|
320
337
|
{ type: core.TemplateRef }
|
|
321
338
|
]; };
|
|
322
339
|
|
|
323
|
-
var _model,
|
|
340
|
+
var _model, _delay, _name, _form, _itemsChanges, _subscription, _cache, _item;
|
|
324
341
|
var SdAutocompleteErrotStateMatcher = /** @class */ (function () {
|
|
325
342
|
function SdAutocompleteErrotStateMatcher(formControl) {
|
|
326
343
|
this.formControl = formControl;
|
|
@@ -333,21 +350,19 @@
|
|
|
333
350
|
return SdAutocompleteErrotStateMatcher;
|
|
334
351
|
}());
|
|
335
352
|
var SdAutocomplete = /** @class */ (function () {
|
|
336
|
-
function SdAutocomplete(ref
|
|
353
|
+
function SdAutocomplete(ref) {
|
|
337
354
|
var _this = this;
|
|
338
355
|
this.ref = ref;
|
|
339
|
-
this.utilityService = utilityService;
|
|
340
356
|
this.id = "I" + uuid.v4();
|
|
341
357
|
_model.set(this, void 0);
|
|
342
|
-
|
|
343
|
-
_currentItems.set(this, []);
|
|
344
|
-
_delay.set(this, 500); // Sau khoảng thời gian delay nếu không có thay đổi thì thì mới bắt đầu thực hiện gọi hàm
|
|
358
|
+
_delay.set(this, 0); // Sau khoảng thời gian delay nếu không có thay đổi thì thì mới bắt đầu thực hiện gọi hàm
|
|
345
359
|
_name.set(this, uuid.v4());
|
|
346
360
|
this.loading = false;
|
|
347
361
|
this.inputControl = new forms.FormControl();
|
|
348
362
|
this.formControl = new common.SdFormControl();
|
|
349
363
|
this.matcher = new SdAutocompleteErrotStateMatcher(this.formControl);
|
|
350
364
|
_form.set(this, void 0);
|
|
365
|
+
_itemsChanges.set(this, new rxjs.BehaviorSubject([]));
|
|
351
366
|
this.limit = 100;
|
|
352
367
|
this.action = new core.EventEmitter();
|
|
353
368
|
this.modelChange = new core.EventEmitter();
|
|
@@ -355,17 +370,9 @@
|
|
|
355
370
|
this.isRequired = false;
|
|
356
371
|
this.disableErrorMessage = false;
|
|
357
372
|
_subscription.set(this, new rxjs.Subscription());
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
switch (_d.label) {
|
|
362
|
-
case 0:
|
|
363
|
-
this.loading = true;
|
|
364
|
-
return [4 /*yield*/, items(searchText).finally(function () { return _this.loading = false; })];
|
|
365
|
-
case 1: return [2 /*return*/, _d.sent()];
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
}); });
|
|
373
|
+
this.isFocused = false;
|
|
374
|
+
_cache.set(this, {});
|
|
375
|
+
_item.set(this, {});
|
|
369
376
|
this.onSelect = function (item) {
|
|
370
377
|
if (item) {
|
|
371
378
|
if (typeof (item) === 'string' || typeof (item) === 'number') {
|
|
@@ -386,21 +393,39 @@
|
|
|
386
393
|
_this.inputControl.setValue('', {
|
|
387
394
|
emitEvent: false
|
|
388
395
|
});
|
|
389
|
-
// this.ref.markForCheck();
|
|
390
|
-
// this.inputControl.setValue('', {
|
|
391
|
-
// emitEvent: false
|
|
392
|
-
// });
|
|
393
396
|
}
|
|
394
397
|
};
|
|
395
398
|
this.onFocus = function () {
|
|
399
|
+
_this.isFocused = true;
|
|
396
400
|
_this.inputControl.setValue('');
|
|
397
401
|
// this.inputControl.updateValueAndValidity();
|
|
398
402
|
};
|
|
399
403
|
this.onBlur = function () {
|
|
404
|
+
_this.isFocused = false;
|
|
400
405
|
_this.inputControl.setValue('', {
|
|
401
406
|
emitEvent: false
|
|
402
407
|
});
|
|
403
408
|
};
|
|
409
|
+
this.onClick = function () {
|
|
410
|
+
var _a;
|
|
411
|
+
if ((_a = _this.sdView) === null || _a === void 0 ? void 0 : _a.templateRef) {
|
|
412
|
+
if (!_this.formControl.disabled && !_this.isFocused) {
|
|
413
|
+
_this.focus();
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
this.blur = function () {
|
|
418
|
+
var _a, _b;
|
|
419
|
+
(_b = (_a = _this.input) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.blur();
|
|
420
|
+
};
|
|
421
|
+
this.focus = function () {
|
|
422
|
+
_this.isFocused = true;
|
|
423
|
+
setTimeout(function () {
|
|
424
|
+
var _a, _b, _c;
|
|
425
|
+
(_a = _this.autocompleteTrigger) === null || _a === void 0 ? void 0 : _a.openPanel();
|
|
426
|
+
(_c = (_b = _this.input) === null || _b === void 0 ? void 0 : _b.nativeElement) === null || _c === void 0 ? void 0 : _c.focus();
|
|
427
|
+
}, 100);
|
|
428
|
+
};
|
|
404
429
|
this.clear = function ($event) {
|
|
405
430
|
var _a;
|
|
406
431
|
$event === null || $event === void 0 ? void 0 : $event.stopPropagation();
|
|
@@ -421,21 +446,11 @@
|
|
|
421
446
|
_this.inputControl.updateValueAndValidity({ emitEvent: true });
|
|
422
447
|
};
|
|
423
448
|
}
|
|
424
|
-
Object.defineProperty(SdAutocomplete.prototype, "
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
return typeof (__classPrivateFieldGet(this, _model)) === 'number';
|
|
429
|
-
}
|
|
430
|
-
if ((_a = __classPrivateFieldGet(this, _currentItems)) === null || _a === void 0 ? void 0 : _a.length) {
|
|
431
|
-
if (this.valueField) {
|
|
432
|
-
return typeof (__classPrivateFieldGet(this, _currentItems)[0][this.valueField]) === 'number';
|
|
433
|
-
}
|
|
434
|
-
else {
|
|
435
|
-
return typeof (__classPrivateFieldGet(this, _currentItems)[0]) === 'number';
|
|
436
|
-
}
|
|
449
|
+
Object.defineProperty(SdAutocomplete.prototype, "name", {
|
|
450
|
+
set: function (val) {
|
|
451
|
+
if (val) {
|
|
452
|
+
__classPrivateFieldSet(this, _name, val);
|
|
437
453
|
}
|
|
438
|
-
return false;
|
|
439
454
|
},
|
|
440
455
|
enumerable: false,
|
|
441
456
|
configurable: true
|
|
@@ -457,16 +472,16 @@
|
|
|
457
472
|
Object.defineProperty(SdAutocomplete.prototype, "items", {
|
|
458
473
|
set: function (items) {
|
|
459
474
|
if (!items) {
|
|
460
|
-
|
|
475
|
+
__classPrivateFieldGet(this, _itemsChanges).next([]);
|
|
461
476
|
}
|
|
462
477
|
else if (Array.isArray(items)) {
|
|
463
|
-
|
|
478
|
+
__classPrivateFieldGet(this, _itemsChanges).next(items.filter(function (e) { return e !== null && e !== undefined; }));
|
|
464
479
|
}
|
|
465
480
|
else {
|
|
466
|
-
|
|
481
|
+
__classPrivateFieldGet(this, _itemsChanges).next(items);
|
|
482
|
+
__classPrivateFieldSet(this, _delay, 500);
|
|
467
483
|
}
|
|
468
484
|
this.formControl.updateValueAndValidity();
|
|
469
|
-
this.inputControl.updateValueAndValidity();
|
|
470
485
|
},
|
|
471
486
|
enumerable: false,
|
|
472
487
|
configurable: true
|
|
@@ -485,9 +500,11 @@
|
|
|
485
500
|
val = (val === '') || val;
|
|
486
501
|
if (val) {
|
|
487
502
|
this.inputControl.disable();
|
|
503
|
+
this.formControl.disable();
|
|
488
504
|
}
|
|
489
505
|
else {
|
|
490
506
|
this.inputControl.enable();
|
|
507
|
+
this.formControl.disable();
|
|
491
508
|
}
|
|
492
509
|
},
|
|
493
510
|
enumerable: false,
|
|
@@ -519,74 +536,76 @@
|
|
|
519
536
|
__classPrivateFieldGet(this, _subscription).add(this.formControl.touchedChanges.subscribe(function () {
|
|
520
537
|
_this.ref.markForCheck();
|
|
521
538
|
}));
|
|
539
|
+
this.filteredItems = rxjs.combineLatest([
|
|
540
|
+
__classPrivateFieldGet(this, _itemsChanges).asObservable(),
|
|
541
|
+
this.inputControl.valueChanges.pipe(operators.debounceTime(__classPrivateFieldGet(this, _delay)))
|
|
542
|
+
]).pipe(operators.switchMap(function (_e) {
|
|
543
|
+
var _f = __read(_e, 2), items = _f[0], searchText = _f[1];
|
|
544
|
+
searchText = searchText || '';
|
|
545
|
+
if (typeof (items) === 'function') {
|
|
546
|
+
if (__classPrivateFieldGet(_this, _cache)[searchText] !== undefined) {
|
|
547
|
+
return __classPrivateFieldGet(_this, _cache)[searchText].asObservable();
|
|
548
|
+
}
|
|
549
|
+
var obs = void 0;
|
|
550
|
+
var func_1 = items(searchText, true);
|
|
551
|
+
if (func_1 instanceof Promise) {
|
|
552
|
+
obs = rxjs.defer(function () { return rxjs.from(func_1); });
|
|
553
|
+
}
|
|
554
|
+
else {
|
|
555
|
+
obs = func_1;
|
|
556
|
+
}
|
|
557
|
+
_this.loading = true;
|
|
558
|
+
return obs.pipe(operators.map(function (data) {
|
|
559
|
+
__classPrivateFieldGet(_this, _cache)[searchText] = data || [];
|
|
560
|
+
Object.assign(__classPrivateFieldGet(_this, _item), Array.toObject(__classPrivateFieldGet(_this, _cache)[searchText], _this.valueField));
|
|
561
|
+
return __classPrivateFieldGet(_this, _cache)[searchText];
|
|
562
|
+
}), operators.finalize(function () { return _this.loading = false; }));
|
|
563
|
+
}
|
|
564
|
+
return items
|
|
565
|
+
.search(searchText, [_this.valueField, _this.displayField])
|
|
566
|
+
.paging(_this.limit)
|
|
567
|
+
.asObservable();
|
|
568
|
+
}));
|
|
569
|
+
this.selected = rxjs.combineLatest([
|
|
570
|
+
__classPrivateFieldGet(this, _itemsChanges).asObservable(),
|
|
571
|
+
this.formControl.valueChanges.pipe(operators.startWith(this.formControl.value))
|
|
572
|
+
])
|
|
573
|
+
.pipe(operators.switchMap(function (_e) {
|
|
574
|
+
var _f = __read(_e, 2), items = _f[0], val = _f[1];
|
|
575
|
+
if (!_this.valueField) {
|
|
576
|
+
return rxjs.of(val);
|
|
577
|
+
}
|
|
578
|
+
if (val || val === 0) {
|
|
579
|
+
if (typeof (items) === 'function') {
|
|
580
|
+
if (__classPrivateFieldGet(_this, _item)[val]) {
|
|
581
|
+
return rxjs.of(__classPrivateFieldGet(_this, _item)[val]);
|
|
582
|
+
}
|
|
583
|
+
var obs = void 0;
|
|
584
|
+
var func_2 = items(val, true);
|
|
585
|
+
if (func_2 instanceof Promise) {
|
|
586
|
+
obs = rxjs.defer(function () { return rxjs.from(func_2); });
|
|
587
|
+
}
|
|
588
|
+
else {
|
|
589
|
+
obs = func_2;
|
|
590
|
+
}
|
|
591
|
+
return obs.pipe(operators.map(function (data) {
|
|
592
|
+
var _e;
|
|
593
|
+
Object.assign(__classPrivateFieldGet(_this, _item), Array.toObject(data, _this.valueField));
|
|
594
|
+
return __classPrivateFieldGet(_this, _item)[val] || (_e = {},
|
|
595
|
+
_e[_this.valueField] = val,
|
|
596
|
+
_e[_this.displayField] = val,
|
|
597
|
+
_e);
|
|
598
|
+
}));
|
|
599
|
+
}
|
|
600
|
+
return rxjs.of(items.find(function (e) { return e[_this.valueField] === val; }));
|
|
601
|
+
}
|
|
602
|
+
return rxjs.of('');
|
|
603
|
+
}));
|
|
604
|
+
this.controlPlaceHolder = this.selected.pipe(operators.map(function (item) { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item[_this.displayField]) !== null && _a !== void 0 ? _a : item) !== null && _b !== void 0 ? _b : _this.placeholder) !== null && _c !== void 0 ? _c : _this.label) !== null && _d !== void 0 ? _d : ''; }));
|
|
522
605
|
};
|
|
523
606
|
SdAutocomplete.prototype.ngAfterViewInit = function () {
|
|
524
|
-
var _this = this;
|
|
525
607
|
var _a;
|
|
526
|
-
__classPrivateFieldGet(this, _subscription).add(this.formControl.statusChanges.subscribe(function () { return _this.ref.markForCheck(); }));
|
|
527
|
-
this.filteredItems = this.inputControl.valueChanges.pipe(operators.debounceTime(typeof (__classPrivateFieldGet(this, _items)) === 'function' ? __classPrivateFieldGet(this, _delay) : 0),
|
|
528
|
-
// distinctUntilChanged(), Dùng sẽ gây ra bug khi items changes
|
|
529
|
-
operators.switchMap(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
530
|
-
var val, items, changeAliasLowerCase;
|
|
531
|
-
var _this = this;
|
|
532
|
-
return __generator(this, function (_d) {
|
|
533
|
-
switch (_d.label) {
|
|
534
|
-
case 0:
|
|
535
|
-
val = this.inputControl.value || '';
|
|
536
|
-
if (!(typeof (__classPrivateFieldGet(this, _items)) === 'function')) return [3 /*break*/, 2];
|
|
537
|
-
return [4 /*yield*/, __classPrivateFieldGet(this, _loadItems).call(this, val, __classPrivateFieldGet(this, _items))];
|
|
538
|
-
case 1:
|
|
539
|
-
items = _d.sent();
|
|
540
|
-
__classPrivateFieldSet(this, _currentItems, items.filter(function (item, index) { return index < _this.limit; }));
|
|
541
|
-
return [2 /*return*/, __classPrivateFieldGet(this, _currentItems)];
|
|
542
|
-
case 2:
|
|
543
|
-
changeAliasLowerCase = this.utilityService.changeAliasLowerCase;
|
|
544
|
-
__classPrivateFieldSet(this, _currentItems, __classPrivateFieldGet(this, _items).filter(function (item) {
|
|
545
|
-
var value = item[_this.valueField];
|
|
546
|
-
var display = item[_this.displayField];
|
|
547
|
-
var searchText = changeAliasLowerCase(val);
|
|
548
|
-
return changeAliasLowerCase(value).indexOf(searchText) !== -1 || changeAliasLowerCase(display).indexOf(searchText) !== -1;
|
|
549
|
-
}).filter(function (item, index) { return index < _this.limit; }));
|
|
550
|
-
return [2 /*return*/, __classPrivateFieldGet(this, _currentItems)];
|
|
551
|
-
}
|
|
552
|
-
});
|
|
553
|
-
}); }));
|
|
554
|
-
this.controlPlaceHolder = this.formControl.valueChanges.pipe(operators.startWith(''),
|
|
555
|
-
// distinctUntilChanged(), Dùng sẽ gây ra bug khi items changes
|
|
556
|
-
operators.switchMap(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
557
|
-
var val, currentItems, items, item;
|
|
558
|
-
var _this = this;
|
|
559
|
-
return __generator(this, function (_d) {
|
|
560
|
-
switch (_d.label) {
|
|
561
|
-
case 0:
|
|
562
|
-
val = this.formControl.value;
|
|
563
|
-
if (!(val || val === 0)) return [3 /*break*/, 4];
|
|
564
|
-
currentItems = [];
|
|
565
|
-
items = __classPrivateFieldGet(this, _items);
|
|
566
|
-
if (!(typeof (items) === 'function')) return [3 /*break*/, 2];
|
|
567
|
-
return [4 /*yield*/, __classPrivateFieldGet(this, _loadItems).call(this, val, items)];
|
|
568
|
-
case 1:
|
|
569
|
-
currentItems = _d.sent();
|
|
570
|
-
return [3 /*break*/, 3];
|
|
571
|
-
case 2:
|
|
572
|
-
currentItems = items || [];
|
|
573
|
-
_d.label = 3;
|
|
574
|
-
case 3:
|
|
575
|
-
if (this.valueField && this.displayField) {
|
|
576
|
-
item = currentItems.find(function (e) { return e[_this.valueField] === val; });
|
|
577
|
-
return [2 /*return*/, (item === null || item === void 0 ? void 0 : item[this.displayField]) || val];
|
|
578
|
-
}
|
|
579
|
-
else {
|
|
580
|
-
return [2 /*return*/, currentItems.find(function (e) { return e === val; }) || val];
|
|
581
|
-
}
|
|
582
|
-
return [3 /*break*/, 5];
|
|
583
|
-
case 4: return [2 /*return*/, this.placeholder || this.label || ''];
|
|
584
|
-
case 5: return [2 /*return*/];
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
}); }));
|
|
588
608
|
(_a = __classPrivateFieldGet(this, _form)) === null || _a === void 0 ? void 0 : _a.addControl(__classPrivateFieldGet(this, _name), this.formControl);
|
|
589
|
-
this.ref.detectChanges();
|
|
590
609
|
};
|
|
591
610
|
SdAutocomplete.prototype.ngOnDestroy = function () {
|
|
592
611
|
var _a;
|
|
@@ -595,29 +614,27 @@
|
|
|
595
614
|
};
|
|
596
615
|
return SdAutocomplete;
|
|
597
616
|
}());
|
|
598
|
-
_model = new WeakMap(),
|
|
617
|
+
_model = new WeakMap(), _delay = new WeakMap(), _name = new WeakMap(), _form = new WeakMap(), _itemsChanges = new WeakMap(), _subscription = new WeakMap(), _cache = new WeakMap(), _item = new WeakMap();
|
|
599
618
|
SdAutocomplete.decorators = [
|
|
600
619
|
{ type: core.Component, args: [{
|
|
601
620
|
selector: 'sd-autocomplete',
|
|
602
|
-
template: "<div class=\"d-flex align-items-center\"
|
|
621
|
+
template: "<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n[class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !autocompleteTrigger?.panelOpen && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value, selectedItem: selected | async }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [floatLabel]=\"size === 'sm' || formControl.value ? 'always':'auto'\" appearance=\"outline\">\r\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\r\n <input [id]=\"id\" #autocompleteTrigger [formControl]=\"inputControl\" [placeholder]=\"controlPlaceHolder | async\"\r\n [ngClass]=\"{'c-selected': formControl?.value}\" [matAutocomplete]=\"auto\" (focus)=\"onFocus()\" (blur)=\"onBlur()\"\r\n matInput [autocomplete]=\"id\" autocorrect=\"off\" [errorStateMatcher]=\"matcher\" [required]=\"isRequired\" #input />\r\n <mat-icon *ngIf=\"!loading && formControl?.value && !inputControl.disabled\" class=\"pointer sd-suffix-icon\"\r\n (click)=\"clear($event)\" matSuffix>cancel\r\n </mat-icon>\r\n <mat-icon *ngIf=\"actionIcon && !loading && !formControl?.value && !inputControl.disabled\"\r\n class=\"pointer sd-suffix-icon\" (click)=\"onAction($event)\" matSuffix>{{actionIcon}}\r\n </mat-icon>\r\n <mat-spinner *ngIf=\"loading\" strokeWidth=\"2\" mode=\"indeterminate\" diameter=\"18\" value=\"100\" matSuffix>\r\n </mat-spinner>\r\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onSelect($event.option.value)\">\r\n <mat-option *ngFor=\"let item of filteredItems | async\" [value]=\"item\" matTooltipPosition=\"above\"\r\n [matTooltip]=\"displayField ? item[displayField] : item\">\r\n <ng-container *ngIf=\"autocompleteDisplayDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"autocompleteDisplayDef.templateRef;context:{item: item}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!autocompleteDisplayDef?.templateRef\">\r\n {{ displayField ? item[displayField] : item }}\r\n </ng-container>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"formControl?.errors?.required && !disableErrorMessage\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>",
|
|
603
622
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
604
|
-
styles: [":host{display:block;padding-top:5px}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.c-selected::-moz-placeholder{color:#000;opacity:1}:host ::ng-deep .mat-form-field input.c-selected::placeholder{color:#000;opacity:1}:host ::ng-deep .mat-form-field input.c-selected:-ms-input-placeholder{color:#000}:host ::ng-deep .mat-form-field input.c-selected::-ms-input-placeholder{color:#000}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d}:host ::ng-deep .mat-form-field input.mat-input-element:disabled.c-selected::-moz-placeholder{color:#4d4d4d}:host ::ng-deep .mat-form-field input.mat-input-element:disabled.c-selected::placeholder{color:#4d4d4d}:host ::ng-deep .mat-form-field input.mat-input-element:disabled.c-selected:-ms-input-placeholder{color:#4d4d4d}:host ::ng-deep .mat-form-field input.mat-input-element:disabled.c-selected::-ms-input-placeholder{color:#4d4d4d}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}"]
|
|
623
|
+
styles: [":host{display:block;padding-top:5px}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.c-selected::-moz-placeholder{color:#000;opacity:1}:host ::ng-deep .mat-form-field input.c-selected::placeholder{color:#000;opacity:1}:host ::ng-deep .mat-form-field input.c-selected:-ms-input-placeholder{color:#000}:host ::ng-deep .mat-form-field input.c-selected::-ms-input-placeholder{color:#000}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d}:host ::ng-deep .mat-form-field input.mat-input-element:disabled.c-selected::-moz-placeholder{color:#4d4d4d}:host ::ng-deep .mat-form-field input.mat-input-element:disabled.c-selected::placeholder{color:#4d4d4d}:host ::ng-deep .mat-form-field input.mat-input-element:disabled.c-selected:-ms-input-placeholder{color:#4d4d4d}:host ::ng-deep .mat-form-field input.mat-input-element:disabled.c-selected::-ms-input-placeholder{color:#4d4d4d}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}"]
|
|
605
624
|
},] }
|
|
606
625
|
];
|
|
607
626
|
SdAutocomplete.ctorParameters = function () { return [
|
|
608
|
-
{ type: core.ChangeDetectorRef }
|
|
609
|
-
{ type: utility.SdUtilityService }
|
|
627
|
+
{ type: core.ChangeDetectorRef }
|
|
610
628
|
]; };
|
|
611
629
|
SdAutocomplete.propDecorators = {
|
|
612
630
|
autocompleteTrigger: [{ type: core.ViewChild, args: [autocomplete.MatAutocompleteTrigger, { read: autocomplete.MatAutocompleteTrigger },] }],
|
|
631
|
+
name: [{ type: core.Input }],
|
|
613
632
|
size: [{ type: core.Input }],
|
|
614
633
|
form: [{ type: core.Input }],
|
|
615
634
|
label: [{ type: core.Input }],
|
|
616
635
|
valueField: [{ type: core.Input }],
|
|
617
636
|
displayField: [{ type: core.Input }],
|
|
618
637
|
placeholder: [{ type: core.Input }],
|
|
619
|
-
leftLabel: [{ type: core.Input }],
|
|
620
|
-
labelMinWidth: [{ type: core.Input }],
|
|
621
638
|
items: [{ type: core.Input }],
|
|
622
639
|
limit: [{ type: core.Input }],
|
|
623
640
|
model: [{ type: core.Input }],
|
|
@@ -628,7 +645,9 @@
|
|
|
628
645
|
sdChange: [{ type: core.Output }],
|
|
629
646
|
disabled: [{ type: core.Input }],
|
|
630
647
|
required: [{ type: core.Input }],
|
|
631
|
-
_disableErrorMessage: [{ type: core.Input, args: ['disableErrorMessage',] }]
|
|
648
|
+
_disableErrorMessage: [{ type: core.Input, args: ['disableErrorMessage',] }],
|
|
649
|
+
input: [{ type: core.ViewChild, args: ['input',] }],
|
|
650
|
+
sdView: [{ type: core.ContentChild, args: [common.SdViewDefDirective,] }]
|
|
632
651
|
};
|
|
633
652
|
|
|
634
653
|
var SdAutocompleteModule = /** @class */ (function () {
|
|
@@ -648,7 +667,8 @@
|
|
|
648
667
|
autocomplete.MatAutocompleteModule,
|
|
649
668
|
icon.MatIconModule,
|
|
650
669
|
progressSpinner.MatProgressSpinnerModule,
|
|
651
|
-
translate.SdTranslateModule
|
|
670
|
+
translate.SdTranslateModule,
|
|
671
|
+
common.SdCommonModule
|
|
652
672
|
],
|
|
653
673
|
declarations: [
|
|
654
674
|
SdAutocomplete,
|
|
@@ -656,7 +676,8 @@
|
|
|
656
676
|
],
|
|
657
677
|
exports: [
|
|
658
678
|
SdAutocomplete,
|
|
659
|
-
SdAutocompleteDisplayDefDirective
|
|
679
|
+
SdAutocompleteDisplayDefDirective,
|
|
680
|
+
common.SdCommonModule
|
|
660
681
|
],
|
|
661
682
|
providers: []
|
|
662
683
|
},] }
|