@sd-angular/core 19.0.0-beta.8 → 19.0.0-beta.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +686 -33
- package/assets/scss/ckeditor5.scss +61 -4
- package/assets/scss/core/bootstrap.scss +17 -0
- package/assets/scss/core/form.scss +32 -6
- package/assets/scss/core/grid.scss +40 -0
- package/assets/scss/sd-core.scss +5 -0
- package/assets/scss/themes/material-theme.scss +82 -40
- package/components/anchor-v2/src/components/anchor-item-v2/anchor-item-v2.component.d.ts +5 -5
- package/components/anchor-v2/src/components/anchor-v2/anchor-v2.component.d.ts +12 -18
- package/components/anchor-v2/src/components/anchor-vertical-v2/anchor-vertical-list-v2.component.d.ts +9 -10
- package/components/anchor-v2/src/models/sd-anchor-v2.model.d.ts +3 -3
- package/components/avatar/index.d.ts +1 -0
- package/components/avatar/src/avatar.component.d.ts +19 -0
- package/components/badge/src/badge.component.d.ts +77 -19
- package/components/button/src/button.component.d.ts +30 -28
- package/components/chart/index.d.ts +4 -0
- package/components/chart/src/bar-chart.component.d.ts +18 -0
- package/components/chart/src/doughnut-chart.component.d.ts +16 -0
- package/components/chart/src/line-chart.component.d.ts +18 -0
- package/components/chart/src/pie-chart.component.d.ts +16 -0
- package/components/code-editor/index.d.ts +1 -0
- package/components/code-editor/src/code-editor.component.d.ts +25 -0
- package/components/document-builder/index.d.ts +1 -0
- package/components/document-builder/src/document-builder.component.d.ts +13 -42
- package/components/document-builder/src/document-builder.model.d.ts +15 -12
- package/components/document-builder/src/plugins/block-space/block-space.plugin.d.ts +9 -0
- package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.d.ts +44 -0
- package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.model.d.ts +57 -0
- package/components/document-builder/src/plugins/heading/heading.plugin.d.ts +1 -0
- package/components/document-builder/src/plugins/highlight-range/highlight-range.plugin.d.ts +4 -0
- package/components/document-builder/src/plugins/image-custom/image-custom.plugin.d.ts +31 -0
- package/components/document-builder/src/plugins/index.d.ts +7 -2
- package/components/document-builder/src/plugins/page-orientation/page-orientation.plugin.d.ts +2 -2
- package/components/document-builder/src/plugins/paste-handler/filters/bookmark.d.ts +14 -0
- package/components/document-builder/src/plugins/paste-handler/filters/br.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/image.d.ts +25 -0
- package/components/document-builder/src/plugins/paste-handler/filters/list.d.ts +29 -0
- package/components/document-builder/src/plugins/paste-handler/filters/parse.d.ts +35 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removeboldwrapper.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removegooglesheetstag.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removeinvalidtablewidth.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removemsattributes.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removestyleblock.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removexmlns.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/replacemsfootnotes.d.ts +54 -0
- package/components/document-builder/src/plugins/paste-handler/filters/replacetabswithinprewithspaces.d.ts +24 -0
- package/components/document-builder/src/plugins/paste-handler/filters/space.d.ts +27 -0
- package/components/document-builder/src/plugins/paste-handler/filters/table.d.ts +16 -0
- package/components/document-builder/src/plugins/paste-handler/filters/utils.d.ts +25 -0
- package/components/document-builder/src/plugins/paste-handler/index.d.ts +35 -0
- package/components/document-builder/src/plugins/paste-handler/normalizers/googledocsnormalizer.d.ts +31 -0
- package/components/document-builder/src/plugins/paste-handler/normalizers/googlesheetsnormalizer.d.ts +31 -0
- package/components/document-builder/src/plugins/paste-handler/normalizers/mswordnormalizer.d.ts +29 -0
- package/components/document-builder/src/plugins/paste-handler/types.d.ts +30 -0
- package/components/document-builder/src/plugins/table-custom/index.d.ts +34 -0
- package/components/document-builder/src/plugins/variable/variable.plugin.d.ts +39 -0
- package/components/editor/index.d.ts +3 -0
- package/components/editor/src/configurations/editor.configuration.d.ts +12 -0
- package/components/editor/src/configurations/index.d.ts +1 -0
- package/components/editor/src/editor.component.d.ts +42 -0
- package/components/editor/src/models/editor.model.d.ts +8 -0
- package/components/editor/src/models/image-upload.plugin.model.d.ts +20 -0
- package/components/editor/src/models/index.d.ts +2 -0
- package/components/editor/src/plugins/image-upload/image-upload.plugin.d.ts +22 -0
- package/components/editor/src/plugins/image-upload/utils/batch.utils.d.ts +14 -0
- package/components/editor/src/plugins/image-upload/utils/index.d.ts +3 -0
- package/components/editor/src/plugins/image-upload/utils/style.utils.d.ts +2 -0
- package/components/editor/src/plugins/image-upload/utils/validate.utils.d.ts +3 -0
- package/components/index.d.ts +6 -0
- package/components/mini-editor/index.d.ts +2 -0
- package/components/mini-editor/src/mini-editor.component.d.ts +91 -0
- package/components/mini-editor/src/mini-editor.model.d.ts +44 -0
- package/components/modal/index.d.ts +1 -1
- package/components/modal/src/modal.component.d.ts +26 -0
- package/components/section/index.d.ts +1 -0
- package/components/section/src/section-item/section-item.component.d.ts +7 -0
- package/components/section/src/section.component.d.ts +11 -11
- package/components/side-drawer/src/side-drawer.component.d.ts +11 -24
- package/components/tab-router/src/components/tab-router-item/tab-router-item.component.d.ts +4 -1
- package/components/tab-router/src/components/tab-router-outlet/tab-router-outlet.component.d.ts +3 -15
- package/components/table/index.d.ts +2 -0
- package/components/table/src/components/column-filter/column-filter.component.d.ts +3 -3
- package/components/table/src/components/column-title/column-title.component.d.ts +10 -0
- package/components/table/src/components/desktop-cell/desktop-cell.component.d.ts +18 -11
- package/components/table/src/components/desktop-cell/view/view.component.d.ts +24 -0
- package/components/table/src/components/external-filter/external-filter.component.d.ts +1 -1
- package/components/table/src/components/index.d.ts +1 -0
- package/components/table/src/components/selector-action/action-filter.pipe.d.ts +11 -10
- package/components/table/src/components/selector-action/selector-action.component.d.ts +5 -3
- package/components/table/src/directives/index.d.ts +4 -0
- package/components/table/src/directives/sd-table-cell-def.directive.d.ts +2 -3
- package/components/table/src/directives/sd-table-column-filter-def.directive.d.ts +8 -0
- package/components/table/src/directives/sd-table-expand-def.directive.d.ts +0 -1
- package/components/table/src/directives/sd-table-filter-def.directive.d.ts +4 -6
- package/components/table/src/directives/sd-table-footer-def.directive.d.ts +2 -3
- package/components/table/src/directives/sd-table-title-def.directive.d.ts +8 -0
- package/components/table/src/directives/sticky-shadow.directive.d.ts +17 -0
- package/components/table/src/models/table-column.model.d.ts +49 -40
- package/components/table/src/models/table-command.model.d.ts +7 -3
- package/components/table/src/models/table-item.model.d.ts +5 -4
- package/components/table/src/models/table-option-config.model.d.ts +3 -0
- package/components/table/src/models/table-option-export.model.d.ts +3 -2
- package/components/table/src/models/table-option-selector.model.d.ts +17 -10
- package/components/table/src/models/table-option.model.d.ts +15 -8
- package/components/table/src/services/index.d.ts +3 -0
- package/components/table/src/services/table-export/table-export.service.d.ts +26 -0
- package/components/table/src/services/table-filter/table-filter.model.d.ts +6 -5
- package/components/table/src/services/table-format/table-format.service.d.ts +16 -0
- package/components/table/src/table.component.d.ts +46 -53
- package/components/upload-file/src/configurations/upload-file.configuration.d.ts +34 -1
- package/components/upload-file/src/services/upload-file.service.d.ts +0 -1
- package/components/upload-file/src/upload-file.component.d.ts +52 -54
- package/components/view/index.d.ts +1 -0
- package/components/view/src/view.component.d.ts +16 -0
- package/components/workflow/src/models/form-generic-component.model.d.ts +5 -4
- package/components/workflow/src/models/form-generic-expression.model.d.ts +1 -0
- package/components/workflow/src/models/index.d.ts +1 -0
- package/components/workflow/src/pipes/html.pipe.d.ts +4 -4
- package/directives/index.d.ts +2 -0
- package/directives/src/sd-href.directive.d.ts +9 -0
- package/directives/src/sd-tooltip.directive.d.ts +26 -0
- package/fesm2022/sd-angular-core-components-anchor-v2.mjs +79 -154
- package/fesm2022/sd-angular-core-components-anchor-v2.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-avatar.mjs +103 -0
- package/fesm2022/sd-angular-core-components-avatar.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-badge.mjs +101 -91
- package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-button.mjs +70 -96
- package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-chart.mjs +290 -0
- package/fesm2022/sd-angular-core-components-chart.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-code-editor.mjs +127 -0
- package/fesm2022/sd-angular-core-components-code-editor.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-document-builder.mjs +4005 -611
- package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-editor.mjs +933 -0
- package/fesm2022/sd-angular-core-components-editor.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-history.mjs +1 -1
- package/fesm2022/sd-angular-core-components-history.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-import-excel.mjs +1 -1
- package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-mini-editor.mjs +332 -0
- package/fesm2022/sd-angular-core-components-mini-editor.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-modal.mjs +63 -92
- package/fesm2022/sd-angular-core-components-modal.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-preview.mjs +1 -1
- package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-quick-action.mjs +2 -2
- package/fesm2022/sd-angular-core-components-quick-action.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-section.mjs +41 -43
- package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-side-drawer.mjs +78 -84
- package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab-router.mjs +151 -241
- package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs +1394 -1254
- package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-upload-file.mjs +390 -443
- package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-view.mjs +45 -0
- package/fesm2022/sd-angular-core-components-view.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-workflow.mjs +165 -168
- package/fesm2022/sd-angular-core-components-workflow.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components.mjs +6 -0
- package/fesm2022/sd-angular-core-components.mjs.map +1 -1
- package/fesm2022/sd-angular-core-directives.mjs +286 -27
- package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs +289 -363
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs +170 -189
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip.mjs +184 -194
- package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date-range.mjs +180 -242
- package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date.mjs +178 -270
- package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-datetime.mjs +177 -285
- package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-number.mjs +210 -337
- package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input.mjs +169 -286
- package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-radio.mjs +3 -2
- package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-select.mjs +390 -447
- package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-textarea.mjs +167 -226
- package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-authom.mjs +359 -0
- package/fesm2022/sd-angular-core-modules-authom.mjs.map +1 -0
- package/fesm2022/sd-angular-core-modules-keycloak.mjs +126 -0
- package/fesm2022/sd-angular-core-modules-keycloak.mjs.map +1 -0
- package/fesm2022/sd-angular-core-modules-layout.mjs +709 -456
- package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-permission.mjs +160 -74
- package/fesm2022/sd-angular-core-modules-permission.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules.mjs +2 -1
- package/fesm2022/sd-angular-core-modules.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-api.mjs +5 -10
- package/fesm2022/sd-angular-core-services-api.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-confirm.mjs +9 -7
- package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-docx.mjs +173 -0
- package/fesm2022/sd-angular-core-services-docx.mjs.map +1 -0
- package/fesm2022/sd-angular-core-services-notify.mjs +2 -2
- package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services.mjs +1 -0
- package/fesm2022/sd-angular-core-services.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-extensions.mjs +58 -80
- package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-models.mjs +15 -1
- package/fesm2022/sd-angular-core-utilities-models.mjs.map +1 -1
- package/fesm2022/sd-angular-core.mjs +0 -1
- package/fesm2022/sd-angular-core.mjs.map +1 -1
- package/forms/autocomplete/src/autocomplete.component.d.ts +55 -55
- package/forms/chip/src/chip.component.d.ts +37 -40
- package/forms/chip-calendar/src/chip-calendar.component.d.ts +37 -38
- package/forms/date/src/date.component.d.ts +48 -46
- package/forms/date-range/src/date-range.component.d.ts +35 -34
- package/forms/datetime/src/datetime.component.d.ts +48 -49
- package/forms/input/src/input.component.d.ts +54 -57
- package/forms/input-number/src/input-number.component.d.ts +53 -54
- package/forms/select/src/select.component.d.ts +67 -64
- package/forms/textarea/src/textarea.component.d.ts +40 -43
- package/modules/authom/authom.configuration.d.ts +17 -0
- package/modules/authom/authom.interceptor.d.ts +3 -0
- package/modules/authom/authom.module.d.ts +16 -0
- package/modules/authom/authom.service.d.ts +32 -0
- package/modules/authom/index.d.ts +35 -0
- package/modules/index.d.ts +2 -1
- package/modules/keycloak/index.d.ts +4 -0
- package/modules/keycloak/keycloak.configuration.d.ts +11 -0
- package/modules/keycloak/keycloak.interceptor.d.ts +2 -0
- package/modules/keycloak/keycloak.module.d.ts +18 -0
- package/modules/keycloak/keycloak.service.d.ts +14 -0
- package/modules/layout/components/index.d.ts +2 -0
- package/modules/layout/components/layout-main/layout-main.component.d.ts +8 -12
- package/modules/layout/components/page/page.component.d.ts +5 -7
- package/modules/layout/components/sidebar-mobile-v1/components/sidebar/sidebar.component.d.ts +35 -0
- package/modules/layout/components/sidebar-mobile-v1/components/user/user.component.d.ts +24 -0
- package/modules/layout/components/sidebar-mobile-v1/main.component.d.ts +21 -0
- package/modules/layout/components/sidebar-v1/components/sidebar/sidebar.component.d.ts +22 -29
- package/modules/layout/components/sidebar-v1/components/user/user.component.d.ts +11 -17
- package/modules/layout/components/sidebar-v1/main.component.d.ts +14 -14
- package/modules/layout/configurations/layout.configuration.d.ts +46 -3
- package/modules/layout/modules/forbidden/pages/root/root.component.d.ts +3 -8
- package/modules/layout/modules/home/components/home-page/home-page.component.d.ts +2 -5
- package/modules/layout/modules/not-found/pages/root/root.component.d.ts +3 -8
- package/modules/layout/pipes/high-light-search.pipe.d.ts +1 -1
- package/modules/layout/services/index.d.ts +1 -0
- package/modules/layout/services/layout.service.d.ts +10 -0
- package/modules/layout/services/menu/menu.model.d.ts +4 -1
- package/modules/layout/services/storage/storage.service.d.ts +0 -3
- package/modules/permission/src/configurations/permission.configuration.d.ts +56 -2
- package/modules/permission/src/directives/permission.directive.d.ts +5 -8
- package/modules/permission/src/guards/permission.guard.d.ts +2 -1
- package/modules/permission/src/services/permission.service.d.ts +6 -9
- package/package.json +107 -79
- package/public-api.d.ts +0 -1
- package/sd-angular-core-19.0.0-beta.81.tgz +0 -0
- package/services/api/src/api.model.d.ts +6 -1
- package/services/confirm/src/lib/confirm.service.d.ts +5 -0
- package/services/docx/index.d.ts +1 -0
- package/services/docx/src/lib/docx.model.d.ts +9 -0
- package/services/docx/src/lib/docx.service.d.ts +13 -0
- package/services/docx/src/public-api.d.ts +2 -0
- package/services/index.d.ts +1 -0
- package/services/notify/index.d.ts +1 -0
- package/services/notify/src/notify.model.d.ts +1 -1
- package/services/notify/src/notify.service.d.ts +5 -5
- package/utilities/extensions/src/string.extension.d.ts +3 -0
- package/utilities/extensions/src/utility.extension.d.ts +1 -0
- package/utilities/models/index.d.ts +3 -0
- package/utilities/models/src/filter.model.d.ts +17 -4
- package/utilities/models/src/icon.model.d.ts +2 -0
- package/utilities/models/src/nested-key-of.model.d.ts +5 -0
- package/utilities/models/src/order.model.d.ts +2 -1
- package/utilities/models/src/paging.model.d.ts +2 -1
- package/utilities/models/src/pattern.model.d.ts +1 -1
- package/utilities/models/src/unwrap-signal.model.d.ts +6 -0
- package/components/document-builder/src/plugins/comment/comment.plugin.d.ts +0 -4
- package/components/document-builder/src/plugins/table-fit/table-fit.plugin.d.ts +0 -4
- package/components/modal/src/modal/modal.component.d.ts +0 -31
- package/components/table/src/components/desktop-cell-view/desktop-cell-view.component.d.ts +0 -14
- package/fesm2022/sd-angular-core-guards-permission.mjs +0 -155
- package/fesm2022/sd-angular-core-guards-permission.mjs.map +0 -1
- package/fesm2022/sd-angular-core-guards.mjs +0 -6
- package/fesm2022/sd-angular-core-guards.mjs.map +0 -1
- package/fesm2022/sd-angular-core-modules-oidc.mjs +0 -127
- package/fesm2022/sd-angular-core-modules-oidc.mjs.map +0 -1
- package/guards/index.d.ts +0 -1
- package/guards/permission/index.d.ts +0 -4
- package/guards/permission/src/configurations/index.d.ts +0 -1
- package/guards/permission/src/configurations/permission.configuration.d.ts +0 -8
- package/guards/permission/src/directives/index.d.ts +0 -1
- package/guards/permission/src/directives/permission.directive.d.ts +0 -12
- package/guards/permission/src/guards/index.d.ts +0 -1
- package/guards/permission/src/guards/permission.guard.d.ts +0 -13
- package/guards/permission/src/services/index.d.ts +0 -1
- package/guards/permission/src/services/permission.service.d.ts +0 -15
- package/modules/oidc/dynamic-sts.loader.d.ts +0 -11
- package/modules/oidc/index.d.ts +0 -2
- package/modules/oidc/oidc.configuration.d.ts +0 -11
- package/modules/oidc/oidc.module.d.ts +0 -14
- package/sd-angular-core-19.0.0-beta.8.tgz +0 -0
|
@@ -1,17 +1,50 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* Contract cấu hình cho cơ chế upload file của sd-angular.
|
|
4
|
+
*
|
|
5
|
+
* Cách dùng phổ biến:
|
|
6
|
+
* - Portal có thể provide cấu hình mặc định ở tầng global.
|
|
7
|
+
* - Mỗi module có thể provide thêm cấu hình riêng (thường với `multi: true`).
|
|
8
|
+
* - Khi có nhiều cấu hình cùng lúc, dùng `key` để chọn đúng provider.
|
|
9
|
+
*
|
|
10
|
+
* Luồng xử lý:
|
|
11
|
+
* 1) `upload`: upload file mới, trả về danh sách id/key.
|
|
12
|
+
* 2) `details`: lấy metadata để render danh sách file từ id/key.
|
|
13
|
+
* 3) `download` (optional): tải file theo id/key.
|
|
14
|
+
*/
|
|
2
15
|
export interface ISdUploadFileConfiguration<TArgs = any> {
|
|
16
|
+
/**
|
|
17
|
+
* Định danh cấu hình upload.
|
|
18
|
+
* Bắt buộc khi app có nhiều provider upload để tránh mapping nhầm.
|
|
19
|
+
*/
|
|
20
|
+
key?: string;
|
|
21
|
+
/** Upload file và trả về danh sách id/key dùng cho lưu trữ. */
|
|
3
22
|
upload: SdUploadFileFuncUpload<TArgs>;
|
|
23
|
+
/** Nhận danh sách id/key và trả về dữ liệu hiển thị file trong UI. */
|
|
4
24
|
details: SdUploadFileFuncDetails<TArgs>;
|
|
25
|
+
/** Tùy chọn: tải file về theo id/key. */
|
|
5
26
|
download?: SdUploadFileFuncDownload<TArgs>;
|
|
6
27
|
}
|
|
7
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Token DI cho upload configuration.
|
|
30
|
+
* Khuyến nghị provide dạng `multi: true` để hỗ trợ nhiều nguồn upload trong cùng app/module.
|
|
31
|
+
*/
|
|
32
|
+
export declare const SD_UPLOAD_FILE_CONFIGURATION: InjectionToken<ISdUploadFileConfiguration<any>>;
|
|
33
|
+
/** Hàm upload file và trả về danh sách id/key tương ứng. */
|
|
8
34
|
export type SdUploadFileFuncUpload<TArgs> = (files: File[], args?: TArgs) => Promise<string[]>;
|
|
35
|
+
/** Hàm lấy thông tin file phục vụ hiển thị từ danh sách id/key. */
|
|
9
36
|
export type SdUploadFileFuncDetails<TArgs> = (idOrKey: (string | number)[], args?: TArgs) => Promise<SdUploadFileDetail[]>;
|
|
37
|
+
/** Hàm tải file theo id/key. */
|
|
10
38
|
export type SdUploadFileFuncDownload<TArgs> = (idOrKey: string | number, args?: TArgs) => Promise<void>;
|
|
11
39
|
export interface SdUploadFileDetail {
|
|
40
|
+
/** Định danh file được backend trả về sau upload. */
|
|
12
41
|
idOrKey: string;
|
|
42
|
+
/** URL truy cập file (CDN hoặc direct URL). */
|
|
13
43
|
cdn: string;
|
|
44
|
+
/** Tên hiển thị file. */
|
|
14
45
|
name?: string;
|
|
46
|
+
/** Đuôi file: png, jpg, pdf... */
|
|
15
47
|
extension?: string;
|
|
48
|
+
/** Dung lượng file tính theo MB (nếu backend có trả về). */
|
|
16
49
|
size?: number;
|
|
17
50
|
}
|
|
@@ -1,69 +1,67 @@
|
|
|
1
1
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
2
|
-
import {
|
|
3
|
-
import { FormGroup
|
|
2
|
+
import { ElementRef } from '@angular/core';
|
|
3
|
+
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { SdLabelDefDirective } from '@sd-angular/core/forms/directives';
|
|
5
5
|
import { SdFormControl } from '@sd-angular/core/forms/models';
|
|
6
|
-
import { SdConfirmService, SdNotifyService } from '@sd-angular/core/services';
|
|
7
6
|
import { PreviewComponent } from './components/preview/preview.component';
|
|
8
|
-
import {
|
|
9
|
-
import { PreviewFile
|
|
7
|
+
import { SdUploadFileFuncDownload, SdUploadFileFuncDetails, SdUploadFileFuncUpload } from './configurations';
|
|
8
|
+
import { PreviewFile } from './services';
|
|
10
9
|
import * as i0 from "@angular/core";
|
|
11
|
-
export declare class SdUploadFile<TArgs = any>
|
|
10
|
+
export declare class SdUploadFile<TArgs = any> {
|
|
12
11
|
#private;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
previewFiles: PreviewFile[];
|
|
50
|
-
set model(model: (string | number | undefined | null)[] | undefined | null);
|
|
51
|
-
loaded: EventEmitter<PreviewFile[]>;
|
|
52
|
-
modelChange: EventEmitter<(string | number)[]>;
|
|
53
|
-
filesChanged: EventEmitter<(string | File)[]>;
|
|
54
|
-
dropElements?: QueryList<ElementRef>;
|
|
55
|
-
canvas?: ElementRef;
|
|
56
|
-
sdLabelDef?: SdLabelDefDirective;
|
|
57
|
-
constructor(ref: ChangeDetectorRef, notifyService: SdNotifyService, confirmService: SdConfirmService, uploadFileConfig: ISdUploadFileConfiguration, uploadFileService: UploadFileService);
|
|
58
|
-
ngAfterViewInit(): void;
|
|
59
|
-
ngOnDestroy(): void;
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly formControl: SdFormControl;
|
|
14
|
+
readonly previewFiles: import("@angular/core").WritableSignal<PreviewFile[]>;
|
|
15
|
+
readonly selectedFile: import("@angular/core").WritableSignal<PreviewFile | null | undefined>;
|
|
16
|
+
readonly previewFileComponent: import("@angular/core").Signal<PreviewComponent | undefined>;
|
|
17
|
+
readonly dropElements: import("@angular/core").Signal<readonly ElementRef<any>[]>;
|
|
18
|
+
readonly sdLabelDef: import("@angular/core").Signal<SdLabelDefDirective | undefined>;
|
|
19
|
+
readonly args: import("@angular/core").InputSignal<TArgs | undefined>;
|
|
20
|
+
readonly label: import("@angular/core").InputSignal<string | undefined>;
|
|
21
|
+
readonly key: import("@angular/core").InputSignal<string | undefined>;
|
|
22
|
+
readonly description: import("@angular/core").InputSignal<string | undefined>;
|
|
23
|
+
readonly previewWidth: import("@angular/core").InputSignal<string>;
|
|
24
|
+
readonly previewHeight: import("@angular/core").InputSignal<string>;
|
|
25
|
+
readonly align: import("@angular/core").InputSignal<"left" | "center">;
|
|
26
|
+
readonly uploadInput: import("@angular/core").InputSignal<SdUploadFileFuncUpload<any> | undefined>;
|
|
27
|
+
readonly details: import("@angular/core").InputSignal<SdUploadFileFuncDetails<any> | undefined>;
|
|
28
|
+
readonly downloadInput: import("@angular/core").InputSignal<SdUploadFileFuncDownload<any> | undefined>;
|
|
29
|
+
readonly imageValidator: import("@angular/core").InputSignal<((image: HTMLImageElement) => string) | undefined>;
|
|
30
|
+
readonly maxSize: import("@angular/core").InputSignal<number | undefined>;
|
|
31
|
+
readonly maxWidth: import("@angular/core").InputSignal<number | undefined>;
|
|
32
|
+
readonly maxHeight: import("@angular/core").InputSignal<number | undefined>;
|
|
33
|
+
readonly scaleToPixel: import("@angular/core").InputSignal<number | undefined>;
|
|
34
|
+
form: import("@angular/core").InputSignalWithTransform<FormGroup<any> | undefined, any>;
|
|
35
|
+
readonly nameInput: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
|
|
36
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, boolean | "" | null | undefined>;
|
|
37
|
+
readonly type: import("@angular/core").InputSignalWithTransform<"image" | "document" | "file", "image" | "document" | "file" | null | undefined>;
|
|
38
|
+
readonly helperText: import("@angular/core").InputSignal<string | undefined>;
|
|
39
|
+
readonly max: import("@angular/core").InputSignalWithTransform<number, number | null | undefined>;
|
|
40
|
+
readonly maxOfImage: import("@angular/core").InputSignalWithTransform<number, number | null | undefined>;
|
|
41
|
+
readonly extensions: import("@angular/core").InputSignalWithTransform<string[], string[] | null | undefined>;
|
|
42
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, boolean | "" | null | undefined>;
|
|
43
|
+
readonly generatedDescription: import("@angular/core").Signal<string | undefined>;
|
|
44
|
+
readonly loaded: import("@angular/core").OutputEmitterRef<PreviewFile[]>;
|
|
45
|
+
readonly filesChanged: import("@angular/core").OutputEmitterRef<(string | File)[]>;
|
|
46
|
+
readonly model: import("@angular/core").ModelSignal<(string | number)[]>;
|
|
47
|
+
constructor();
|
|
60
48
|
onUpload: () => void;
|
|
61
49
|
onRemove: (file: PreviewFile) => void;
|
|
62
50
|
onDrop: (event: CdkDragDrop<string[]>) => void;
|
|
63
51
|
onImgError: (previewFile: PreviewFile) => void;
|
|
64
52
|
onSelect: (file: PreviewFile) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Lấy danh sách các File từ previewFiles (chưa upload).
|
|
55
|
+
*/
|
|
65
56
|
getFiles: () => Promise<File[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Thực hiện upload các file và gán giá trị, output trả ra mảng idOrKeys.
|
|
59
|
+
* HÀM NÀY BẮT BUỘC PHẢI GỌI TRƯỚC KHI GỌI VỀ SERVER.
|
|
60
|
+
*/
|
|
66
61
|
upload: () => Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Mở popup preview ảnh.
|
|
64
|
+
*/
|
|
67
65
|
preview: () => Promise<void>;
|
|
68
66
|
/**
|
|
69
67
|
* Tải xuống một tệp tin dựa trên đối tượng PreviewFile.
|
|
@@ -77,5 +75,5 @@ export declare class SdUploadFile<TArgs = any> implements AfterViewInit, OnDestr
|
|
|
77
75
|
onDownload: (previewFile: PreviewFile) => void;
|
|
78
76
|
isLastVisibleOverlay(fileIndex: number): boolean;
|
|
79
77
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdUploadFile<any>, never>;
|
|
80
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdUploadFile<any>, "sd-upload-file", never, { "
|
|
78
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdUploadFile<any>, "sd-upload-file", never, { "args": { "alias": "args"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "previewWidth": { "alias": "previewWidth"; "required": false; "isSignal": true; }; "previewHeight": { "alias": "previewHeight"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "uploadInput": { "alias": "upload"; "required": false; "isSignal": true; }; "details": { "alias": "details"; "required": false; "isSignal": true; }; "downloadInput": { "alias": "download"; "required": false; "isSignal": true; }; "imageValidator": { "alias": "imageValidator"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "scaleToPixel": { "alias": "scaleToPixel"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "nameInput": { "alias": "name"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "maxOfImage": { "alias": "maxOfImage"; "required": false; "isSignal": true; }; "extensions": { "alias": "extensions"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "loaded": "loaded"; "filesChanged": "filesChanged"; "model": "modelChange"; }, ["sdLabelDef"], never, true, never>;
|
|
81
79
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/view.component';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SdView {
|
|
4
|
+
label: import("@angular/core").InputSignal<string | null | undefined>;
|
|
5
|
+
value: import("@angular/core").InputSignal<any>;
|
|
6
|
+
display: import("@angular/core").InputSignal<string | null | undefined>;
|
|
7
|
+
hyperlink: import("@angular/core").InputSignal<string | null | undefined>;
|
|
8
|
+
labelTemplate: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
|
|
9
|
+
valueTemplate: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
|
|
10
|
+
contentLabelTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
11
|
+
contentValueTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
12
|
+
activeLabelTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
13
|
+
activeValueTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdView, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdView, "sd-view", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": true; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "labelTemplate": { "alias": "labelTemplate"; "required": false; "isSignal": true; }; "valueTemplate": { "alias": "valueTemplate"; "required": false; "isSignal": true; }; }, {}, ["contentLabelTemplate", "contentValueTemplate"], never, true, never>;
|
|
16
|
+
}
|
|
@@ -5,6 +5,7 @@ import { SdPatternType } from '@sd-angular/core/utilities/models';
|
|
|
5
5
|
import { SdFormGenericSelectionStaticItem } from './form-generic-definition-selection.model';
|
|
6
6
|
import { SdFormGenericExpression } from './form-generic-expression.model';
|
|
7
7
|
import { SdFormGeneric } from './form-generic.model';
|
|
8
|
+
import { SdUnwrapSignal } from '@sd-angular/core/utilities/models';
|
|
8
9
|
export interface SdFormRenderConfiguration {
|
|
9
10
|
onLoaded?: () => void;
|
|
10
11
|
components: SdFormGeneric['components'];
|
|
@@ -158,10 +159,10 @@ export interface SdFormGenericGroup {
|
|
|
158
159
|
export interface SdFormGenericUpload extends SdFormGenericComponentBase {
|
|
159
160
|
type: 'upload';
|
|
160
161
|
properties?: {
|
|
161
|
-
type?: SdUploadFile['type']
|
|
162
|
-
maxSize?: SdUploadFile['maxSize']
|
|
163
|
-
max?: SdUploadFile['max']
|
|
164
|
-
extensions?: SdUploadFile['extensions']
|
|
162
|
+
type?: SdUnwrapSignal<SdUploadFile['type']>;
|
|
163
|
+
maxSize?: SdUnwrapSignal<SdUploadFile['maxSize']>;
|
|
164
|
+
max?: SdUnwrapSignal<SdUploadFile['max']>;
|
|
165
|
+
extensions?: SdUnwrapSignal<SdUploadFile['extensions']>;
|
|
165
166
|
args?: Record<string, any>;
|
|
166
167
|
source?: 'ALL' | 'PHOTO_LIBRARY' | 'CAPTURE';
|
|
167
168
|
} & SdFormGenericComponentBase['properties'];
|
|
@@ -69,5 +69,6 @@ export declare const AttributeOperators: Record<Attribute['type'], {
|
|
|
69
69
|
}[]>;
|
|
70
70
|
export declare const GetAttributes: (components: (SdFormGenericComponent | SdFormGenericGroup)[]) => Attribute[];
|
|
71
71
|
export declare const TemplateToCondition: (template: string | undefined | null, entity: Record<string, any>) => string | undefined;
|
|
72
|
+
export declare const EvaluateExpression: (condition: SdFormGenericExpression | SdFormGenericExpressionCondition, entity: Record<string, any>) => boolean | undefined;
|
|
72
73
|
export declare const ExpressionToJavascriptExpression: (condition: SdFormGenericExpression | SdFormGenericExpressionCondition) => string | undefined;
|
|
73
74
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
3
|
import { SdFormGenericHtml } from '../models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class HtmlPipe implements PipeTransform {
|
|
6
|
-
private readonly
|
|
7
|
-
constructor(
|
|
8
|
-
transform: (hashed: string | undefined | null, content: string, component: SdFormGenericHtml) =>
|
|
6
|
+
private readonly sanitizer;
|
|
7
|
+
constructor(sanitizer: DomSanitizer);
|
|
8
|
+
transform: (hashed: string | undefined | null, content: string, component: SdFormGenericHtml) => string;
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<HtmlPipe, never>;
|
|
10
10
|
static ɵpipe: i0.ɵɵPipeDeclaration<HtmlPipe, "htmlPipe", true>;
|
|
11
11
|
}
|
package/directives/index.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ export * from './src/sd-scroll.directive';
|
|
|
2
2
|
export * from './src/sd-desktop.directive';
|
|
3
3
|
export * from './src/sd-mobile.directive';
|
|
4
4
|
export * from './src/sd-hover-copy.directive';
|
|
5
|
+
export * from './src/sd-href.directive';
|
|
6
|
+
export { SdTooltipDirective } from './src/sd-tooltip.directive';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class SdHrefDirective {
|
|
3
|
+
#private;
|
|
4
|
+
url: string;
|
|
5
|
+
get href(): string;
|
|
6
|
+
onClick(event: Event): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdHrefDirective, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdHrefDirective, "a[sdHref]", never, { "url": { "alias": "sdHref"; "required": false; }; }, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
export declare class SdTooltipDirective {
|
|
5
|
+
#private;
|
|
6
|
+
content: import("@angular/core").InputSignal<string | TemplateRef<any>>;
|
|
7
|
+
sdTooltipPosition: import("@angular/core").InputSignal<TooltipPosition>;
|
|
8
|
+
sdTooltipDelay: import("@angular/core").InputSignal<number>;
|
|
9
|
+
sdTooltipColor: import("@angular/core").InputSignal<string>;
|
|
10
|
+
private static activeTooltip;
|
|
11
|
+
private readonly elementRef;
|
|
12
|
+
private readonly overlay;
|
|
13
|
+
private readonly viewContainerRef;
|
|
14
|
+
private readonly destroyRef;
|
|
15
|
+
private overlayRef;
|
|
16
|
+
private tooltipComponentRef;
|
|
17
|
+
private tooltipInstance;
|
|
18
|
+
private showTimeout;
|
|
19
|
+
private hideTimeout;
|
|
20
|
+
constructor();
|
|
21
|
+
onMouseEnter(): void;
|
|
22
|
+
onMouseLeave(): void;
|
|
23
|
+
forceHide: () => void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdTooltipDirective, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdTooltipDirective, "[sdTooltip]", never, { "content": { "alias": "sdTooltip"; "required": true; "isSignal": true; }; "sdTooltipPosition": { "alias": "sdTooltipPosition"; "required": false; "isSignal": true; }; "sdTooltipDelay": { "alias": "sdTooltipDelay"; "required": false; "isSignal": true; }; "sdTooltipColor": { "alias": "sdTooltipColor"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
26
|
+
}
|