@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,31 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
-
import { MatBottomSheet } from '@angular/material/bottom-sheet';
|
|
3
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
4
|
-
import { SdColor, SdSize } from '@sd-angular/core/utilities/models';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class SdModal implements OnInit, OnDestroy {
|
|
7
|
-
#private;
|
|
8
|
-
private ref;
|
|
9
|
-
private dialog;
|
|
10
|
-
private bottomSheet;
|
|
11
|
-
static index: number;
|
|
12
|
-
templateRef: TemplateRef<any>;
|
|
13
|
-
title?: string;
|
|
14
|
-
color: SdColor;
|
|
15
|
-
width: SdSize | string;
|
|
16
|
-
height: string;
|
|
17
|
-
view?: 'dialog' | 'bottom-sheet';
|
|
18
|
-
lazyLoadContent: boolean;
|
|
19
|
-
sdClosed: EventEmitter<any>;
|
|
20
|
-
modal: ElementRef;
|
|
21
|
-
isOpened: boolean;
|
|
22
|
-
alreadyOpened: boolean;
|
|
23
|
-
private subcription;
|
|
24
|
-
constructor(ref: ChangeDetectorRef, dialog: MatDialog, bottomSheet: MatBottomSheet);
|
|
25
|
-
ngOnInit(): void;
|
|
26
|
-
ngOnDestroy(): void;
|
|
27
|
-
open: () => void;
|
|
28
|
-
close: () => void;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SdModal, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdModal, "sd-modal", never, { "title": { "alias": "title"; "required": false; }; "color": { "alias": "color"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "view": { "alias": "view"; "required": false; }; "lazyLoadContent": { "alias": "lazyLoadContent"; "required": false; }; }, { "sdClosed": "sdClosed"; }, never, ["[sdHeader]", "*", "[sdFooterLeft]", "[sdFooter]"], true, never>;
|
|
31
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SdTableColumn } from '../../models/table-column.model';
|
|
2
|
-
import { SdTableItem } from '../../models/table-item.model';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SdDesktopCellView {
|
|
5
|
-
autoId?: string;
|
|
6
|
-
set _autoId(val: string | undefined | null);
|
|
7
|
-
column: SdTableColumn;
|
|
8
|
-
item: SdTableItem;
|
|
9
|
-
itemKey: string;
|
|
10
|
-
set _item(item: SdTableItem);
|
|
11
|
-
constructor();
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SdDesktopCellView, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdDesktopCellView, "sd-desktop-cell-view", never, { "_autoId": { "alias": "autoId"; "required": false; }; "column": { "alias": "column"; "required": true; }; "_item": { "alias": "item"; "required": true; }; }, {}, never, never, true, never>;
|
|
14
|
-
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Inject, Injectable, Input, Directive } from '@angular/core';
|
|
3
|
-
import { ArrayUtilities } from '@sd-angular/core/utilities/extensions';
|
|
4
|
-
import * as i1 from '@sd-angular/core/services/cache';
|
|
5
|
-
|
|
6
|
-
const SD_PERMISSION_CONFIGURATION = new InjectionToken('sd-permission.configuration');
|
|
7
|
-
|
|
8
|
-
class SdPermissionService {
|
|
9
|
-
configuration;
|
|
10
|
-
cacheService;
|
|
11
|
-
#permission = {};
|
|
12
|
-
#permissions;
|
|
13
|
-
#loaded = false;
|
|
14
|
-
constructor(configuration, cacheService) {
|
|
15
|
-
this.configuration = configuration;
|
|
16
|
-
this.cacheService = cacheService;
|
|
17
|
-
this.#permissions = this.cacheService.create('212a51fa-38d5-43b2-bd46-922d85950ba3', {
|
|
18
|
-
type: 'session',
|
|
19
|
-
default: [],
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
loadPermissions = async () => {
|
|
23
|
-
if (!this.#loaded) {
|
|
24
|
-
const permissions = await this.configuration.loadPermissions().catch(err => {
|
|
25
|
-
console.error(err);
|
|
26
|
-
return [];
|
|
27
|
-
});
|
|
28
|
-
this.#permissions.set(ArrayUtilities.distinct(permissions));
|
|
29
|
-
// Chuyển thành Object để đảm bảo kiểm tra permisison không cần phải loop array
|
|
30
|
-
this.#permission = {};
|
|
31
|
-
permissions.forEach(permission => (this.#permission[permission] = true));
|
|
32
|
-
this.#loaded = true;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
hasPermission = (permission) => {
|
|
36
|
-
if (!permission?.toString()) {
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
if (this.configuration.disabled) {
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
const permissions = Array.isArray(permission) ? permission : [permission];
|
|
43
|
-
return permissions.some(permission => this.#permission[permission]);
|
|
44
|
-
};
|
|
45
|
-
getToken = async () => {
|
|
46
|
-
if (!this.configuration.getToken) {
|
|
47
|
-
throw new Error('[Permission] Method getToken');
|
|
48
|
-
}
|
|
49
|
-
const token = this.configuration.getToken();
|
|
50
|
-
if (token instanceof Promise) {
|
|
51
|
-
return await token;
|
|
52
|
-
}
|
|
53
|
-
return token;
|
|
54
|
-
};
|
|
55
|
-
decodeToken = async () => {
|
|
56
|
-
const token = await this.getToken();
|
|
57
|
-
if (!token) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
try {
|
|
61
|
-
const payload = token.split('.')[1];
|
|
62
|
-
const base64 = payload.replace(/-/g, '+').replace(/_/g, '/');
|
|
63
|
-
const jsonPayload = decodeURIComponent(atob(base64)
|
|
64
|
-
.split('')
|
|
65
|
-
.map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))
|
|
66
|
-
.join(''));
|
|
67
|
-
return JSON.parse(jsonPayload);
|
|
68
|
-
}
|
|
69
|
-
catch (error) {
|
|
70
|
-
console.error('Invalid token', error);
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdPermissionService, deps: [{ token: SD_PERMISSION_CONFIGURATION }, { token: i1.SdCacheService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
75
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdPermissionService, providedIn: 'root' });
|
|
76
|
-
}
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdPermissionService, decorators: [{
|
|
78
|
-
type: Injectable,
|
|
79
|
-
args: [{ providedIn: 'root' }]
|
|
80
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
81
|
-
type: Inject,
|
|
82
|
-
args: [SD_PERMISSION_CONFIGURATION]
|
|
83
|
-
}] }, { type: i1.SdCacheService }] });
|
|
84
|
-
|
|
85
|
-
class SdPermissionDirective {
|
|
86
|
-
templateRef;
|
|
87
|
-
viewContainerRef;
|
|
88
|
-
permissionService;
|
|
89
|
-
// Nếu là mảng thì chỉ cần có 1 permission trong mảng đó xem như có quyền
|
|
90
|
-
set sdPermission(permission) {
|
|
91
|
-
// Nếu không gắn permisison thì render
|
|
92
|
-
if (!permission?.toString()) {
|
|
93
|
-
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
// Kiểm tra permisison
|
|
97
|
-
if (this.permissionService.hasPermission(permission)) {
|
|
98
|
-
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
constructor(templateRef, viewContainerRef, permissionService) {
|
|
102
|
-
this.templateRef = templateRef;
|
|
103
|
-
this.viewContainerRef = viewContainerRef;
|
|
104
|
-
this.permissionService = permissionService;
|
|
105
|
-
}
|
|
106
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdPermissionDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: SdPermissionService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
107
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: SdPermissionDirective, isStandalone: true, selector: "[sdPermission]", inputs: { sdPermission: "sdPermission" }, ngImport: i0 });
|
|
108
|
-
}
|
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdPermissionDirective, decorators: [{
|
|
110
|
-
type: Directive,
|
|
111
|
-
args: [{
|
|
112
|
-
selector: '[sdPermission]',
|
|
113
|
-
}]
|
|
114
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: SdPermissionService }], propDecorators: { sdPermission: [{
|
|
115
|
-
type: Input
|
|
116
|
-
}] } });
|
|
117
|
-
|
|
118
|
-
class SdPermissionGuard {
|
|
119
|
-
configuration;
|
|
120
|
-
permissionService;
|
|
121
|
-
constructor(configuration, permissionService) {
|
|
122
|
-
this.configuration = configuration;
|
|
123
|
-
this.permissionService = permissionService;
|
|
124
|
-
}
|
|
125
|
-
canActivate = async (next, state) => {
|
|
126
|
-
// Đảm bảo permission đã được loaded
|
|
127
|
-
await this.permissionService.loadPermissions().catch(console.error);
|
|
128
|
-
return true;
|
|
129
|
-
};
|
|
130
|
-
canActivateChild = async (activatedRoute, state) => {
|
|
131
|
-
const permission = activatedRoute.data['permission'];
|
|
132
|
-
if (this.permissionService.hasPermission(permission)) {
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
//
|
|
136
|
-
this.configuration?.onForbiden?.();
|
|
137
|
-
return false;
|
|
138
|
-
};
|
|
139
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdPermissionGuard, deps: [{ token: SD_PERMISSION_CONFIGURATION }, { token: SdPermissionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
140
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdPermissionGuard, providedIn: 'root' });
|
|
141
|
-
}
|
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdPermissionGuard, decorators: [{
|
|
143
|
-
type: Injectable,
|
|
144
|
-
args: [{ providedIn: 'root' }]
|
|
145
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
146
|
-
type: Inject,
|
|
147
|
-
args: [SD_PERMISSION_CONFIGURATION]
|
|
148
|
-
}] }, { type: SdPermissionService }] });
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Generated bundle index. Do not edit.
|
|
152
|
-
*/
|
|
153
|
-
|
|
154
|
-
export { SD_PERMISSION_CONFIGURATION, SdPermissionDirective, SdPermissionGuard, SdPermissionService };
|
|
155
|
-
//# sourceMappingURL=sd-angular-core-guards-permission.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core-guards-permission.mjs","sources":["../../../projects/sd-angular/guards/permission/src/configurations/permission.configuration.ts","../../../projects/sd-angular/guards/permission/src/services/permission.service.ts","../../../projects/sd-angular/guards/permission/src/directives/permission.directive.ts","../../../projects/sd-angular/guards/permission/src/guards/permission.guard.ts","../../../projects/sd-angular/guards/permission/sd-angular-core-guards-permission.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport interface ISdPermissionConfiguration {\r\n disabled?: boolean; // Vô hiệu việc kiểm tra permission, mục đích để test chức năng khi chưa có permisison\r\n loadPermissions: () => Promise<string[]>;\r\n onForbiden?: () => void; // Xử lý khi không có quyền truy cập vào URL\r\n getToken?: () => Promise<string | undefined | null> | string | undefined | null; // Lấy thông tin token\r\n}\r\n\r\nexport const SD_PERMISSION_CONFIGURATION = new InjectionToken<ISdPermissionConfiguration>('sd-permission.configuration');\r\n","import { Inject, Injectable } from '@angular/core';\r\nimport { SdCache, SdCacheService } from '@sd-angular/core/services/cache';\r\nimport { ArrayUtilities } from '@sd-angular/core/utilities/extensions';\r\nimport { ISdPermissionConfiguration, SD_PERMISSION_CONFIGURATION } from '../configurations';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SdPermissionService {\r\n #permission: Record<string, boolean> = {};\r\n #permissions: SdCache<string[]>;\r\n #loaded = false;\r\n constructor(\r\n @Inject(SD_PERMISSION_CONFIGURATION) private configuration: ISdPermissionConfiguration,\r\n private cacheService: SdCacheService\r\n ) {\r\n this.#permissions = this.cacheService.create<string[]>('212a51fa-38d5-43b2-bd46-922d85950ba3', {\r\n type: 'session',\r\n default: [],\r\n });\r\n }\r\n\r\n loadPermissions = async () => {\r\n if (!this.#loaded) {\r\n const permissions: string[] = await this.configuration.loadPermissions().catch(err => {\r\n console.error(err);\r\n return [];\r\n });\r\n this.#permissions.set(ArrayUtilities.distinct(permissions));\r\n // Chuyển thành Object để đảm bảo kiểm tra permisison không cần phải loop array\r\n this.#permission = {};\r\n permissions.forEach(permission => (this.#permission[permission] = true));\r\n this.#loaded = true;\r\n }\r\n };\r\n\r\n hasPermission = (permission: string | string[]) => {\r\n if (!permission?.toString()) {\r\n return true;\r\n }\r\n if (this.configuration.disabled) {\r\n return true;\r\n }\r\n const permissions = Array.isArray(permission) ? permission : [permission];\r\n return permissions.some(permission => this.#permission[permission]);\r\n };\r\n\r\n getToken = async () => {\r\n if (!this.configuration.getToken) {\r\n throw new Error('[Permission] Method getToken');\r\n }\r\n const token = this.configuration.getToken();\r\n if (token instanceof Promise) {\r\n return await token;\r\n }\r\n return token;\r\n };\r\n\r\n decodeToken = async <T>(): Promise<T | null> => {\r\n const token = await this.getToken();\r\n if (!token) {\r\n return null;\r\n }\r\n try {\r\n const payload = token.split('.')[1];\r\n const base64 = payload.replace(/-/g, '+').replace(/_/g, '/');\r\n const jsonPayload = decodeURIComponent(\r\n atob(base64)\r\n .split('')\r\n .map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))\r\n .join('')\r\n );\r\n return JSON.parse(jsonPayload);\r\n } catch (error) {\r\n console.error('Invalid token', error);\r\n return null;\r\n }\r\n };\r\n}\r\n","import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';\r\nimport { SdPermissionService } from '../services';\r\n\r\n@Directive({\r\n selector: '[sdPermission]',\r\n})\r\nexport class SdPermissionDirective {\r\n // Nếu là mảng thì chỉ cần có 1 permission trong mảng đó xem như có quyền\r\n @Input() set sdPermission(permission: string | string[] | undefined | null) {\r\n // Nếu không gắn permisison thì render\r\n if (!permission?.toString()) {\r\n this.viewContainerRef.createEmbeddedView(this.templateRef);\r\n return;\r\n }\r\n // Kiểm tra permisison\r\n if (this.permissionService.hasPermission(permission)) {\r\n this.viewContainerRef.createEmbeddedView(this.templateRef);\r\n }\r\n }\r\n\r\n constructor(\r\n private templateRef: TemplateRef<any>,\r\n private viewContainerRef: ViewContainerRef,\r\n private permissionService: SdPermissionService\r\n ) {}\r\n}\r\n","import { Inject, Injectable } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router';\r\nimport { ISdPermissionConfiguration, SD_PERMISSION_CONFIGURATION } from '../configurations';\r\nimport { SdPermissionService } from '../services';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SdPermissionGuard implements CanActivate, CanActivateChild {\r\n constructor(\r\n @Inject(SD_PERMISSION_CONFIGURATION)\r\n private configuration: ISdPermissionConfiguration,\r\n private permissionService: SdPermissionService\r\n ) {}\r\n\r\n canActivate = async (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\r\n // Đảm bảo permission đã được loaded\r\n await this.permissionService.loadPermissions().catch(console.error);\r\n return true;\r\n };\r\n\r\n canActivateChild = async (activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\r\n const permission = activatedRoute.data['permission'];\r\n if (this.permissionService.hasPermission(permission)) {\r\n return true;\r\n }\r\n //\r\n this.configuration?.onForbiden?.();\r\n return false;\r\n };\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.SdPermissionService"],"mappings":";;;;;MASa,2BAA2B,GAAG,IAAI,cAAc,CAA6B,6BAA6B;;MCH1G,mBAAmB,CAAA;AAKiB,IAAA,aAAA;AACrC,IAAA,YAAA;IALV,WAAW,GAA4B,EAAE;AACzC,IAAA,YAAY;IACZ,OAAO,GAAG,KAAK;IACf,WAAA,CAC+C,aAAyC,EAC9E,YAA4B,EAAA;QADS,IAAA,CAAA,aAAa,GAAb,aAAa;QAClD,IAAA,CAAA,YAAY,GAAZ,YAAY;QAEpB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAW,sCAAsC,EAAE;AAC7F,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,OAAO,EAAE,EAAE;AACZ,SAAA,CAAC;IACJ;IAEA,eAAe,GAAG,YAAW;AAC3B,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;AACjB,YAAA,MAAM,WA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AAA,EAAA,IAAA,EAAA,iBAAiB,cADJ,MAAM,EAAA,CAAA;;4FACnB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;0BAG7B,MAAM;2BAAC,2BAA2B;;;ACRvC;;AAEG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core-guards.mjs","sources":["../../../projects/sd-angular/guards/sd-angular-core-guards.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;AAEG"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Inject, Injectable, NgModule } from '@angular/core';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { StsConfigLoader, LogLevel, provideAuth, authInterceptor } from 'angular-auth-oidc-client';
|
|
5
|
-
import { from, map } from 'rxjs';
|
|
6
|
-
import { provideHttpClient, withInterceptors } from '@angular/common/http';
|
|
7
|
-
|
|
8
|
-
const SD_OIDC_CONFIGURATION = new InjectionToken('sd-oidc.configuration');
|
|
9
|
-
|
|
10
|
-
class DynamicStsLoader extends StsConfigLoader {
|
|
11
|
-
oidcConfiguration;
|
|
12
|
-
constructor(oidcConfiguration) {
|
|
13
|
-
super();
|
|
14
|
-
this.oidcConfiguration = oidcConfiguration;
|
|
15
|
-
}
|
|
16
|
-
// SỬA LỖI TYPE: Trả về Observable<OpenIdConfiguration[]>
|
|
17
|
-
loadConfigs() {
|
|
18
|
-
const loaderPromise = this.oidcConfiguration.loadTenantConfig();
|
|
19
|
-
// Dùng 'from' chuyển Promise -> Observable
|
|
20
|
-
return from(loaderPromise).pipe(map(tenantConfig => {
|
|
21
|
-
const authority = `${tenantConfig.url}/realms/${tenantConfig.realm}`;
|
|
22
|
-
console.log('Authority:', authority);
|
|
23
|
-
console.log('SecureRoutes:', tenantConfig.secureRoutes);
|
|
24
|
-
const config = {
|
|
25
|
-
authority,
|
|
26
|
-
redirectUrl: window.location.origin,
|
|
27
|
-
postLogoutRedirectUri: window.location.origin,
|
|
28
|
-
clientId: tenantConfig.clientId,
|
|
29
|
-
scope: 'openid profile email offline_access',
|
|
30
|
-
responseType: 'code',
|
|
31
|
-
silentRenew: true, // Tự động Refresh Token
|
|
32
|
-
useRefreshToken: true,
|
|
33
|
-
ignoreNonceAfterRefresh: true,
|
|
34
|
-
renewTimeBeforeTokenExpiresInSeconds: 10,
|
|
35
|
-
logLevel: LogLevel.Warn,
|
|
36
|
-
// Cập nhật domain API của bạn vào đây để Interceptor tự đính Token
|
|
37
|
-
secureRoutes: tenantConfig.secureRoutes?.filter(route => !!route)?.map(route => route.trim()),
|
|
38
|
-
};
|
|
39
|
-
// Trả về mảng (bắt buộc với bản mới)
|
|
40
|
-
return [config];
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DynamicStsLoader, deps: [{ token: SD_OIDC_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
44
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DynamicStsLoader });
|
|
45
|
-
}
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DynamicStsLoader, decorators: [{
|
|
47
|
-
type: Injectable
|
|
48
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
49
|
-
type: Inject,
|
|
50
|
-
args: [SD_OIDC_CONFIGURATION]
|
|
51
|
-
}] }] });
|
|
52
|
-
|
|
53
|
-
// 5. Module Wrapper
|
|
54
|
-
class SdOidcModule {
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
|
-
static forRoot(options) {
|
|
57
|
-
if (options.useFactory) {
|
|
58
|
-
return {
|
|
59
|
-
ngModule: SdOidcModule,
|
|
60
|
-
providers: [
|
|
61
|
-
{
|
|
62
|
-
provide: SD_OIDC_CONFIGURATION,
|
|
63
|
-
useFactory: options.useFactory,
|
|
64
|
-
deps: options.deps,
|
|
65
|
-
},
|
|
66
|
-
// B. Provide Auth Logic (Dùng cú pháp provideAuth mới ngay trong NgModule)
|
|
67
|
-
provideAuth({
|
|
68
|
-
loader: {
|
|
69
|
-
provide: StsConfigLoader,
|
|
70
|
-
useClass: DynamicStsLoader,
|
|
71
|
-
},
|
|
72
|
-
}),
|
|
73
|
-
provideHttpClient(withInterceptors([authInterceptor()])),
|
|
74
|
-
],
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
if (options.useClass) {
|
|
78
|
-
return {
|
|
79
|
-
ngModule: SdOidcModule,
|
|
80
|
-
providers: [
|
|
81
|
-
{
|
|
82
|
-
provide: SD_OIDC_CONFIGURATION,
|
|
83
|
-
useClass: options.useClass,
|
|
84
|
-
},
|
|
85
|
-
// B. Provide Auth Logic (Dùng cú pháp provideAuth mới ngay trong NgModule)
|
|
86
|
-
provideAuth({
|
|
87
|
-
loader: {
|
|
88
|
-
provide: StsConfigLoader,
|
|
89
|
-
useClass: DynamicStsLoader,
|
|
90
|
-
},
|
|
91
|
-
}),
|
|
92
|
-
provideHttpClient(withInterceptors([authInterceptor()])),
|
|
93
|
-
],
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
ngModule: SdOidcModule,
|
|
98
|
-
providers: [
|
|
99
|
-
// B. Provide Auth Logic (Dùng cú pháp provideAuth mới ngay trong NgModule)
|
|
100
|
-
provideAuth({
|
|
101
|
-
loader: {
|
|
102
|
-
provide: StsConfigLoader,
|
|
103
|
-
useClass: DynamicStsLoader,
|
|
104
|
-
},
|
|
105
|
-
}),
|
|
106
|
-
provideHttpClient(withInterceptors([authInterceptor()])),
|
|
107
|
-
],
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdOidcModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
111
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: SdOidcModule, imports: [CommonModule] });
|
|
112
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdOidcModule, imports: [CommonModule] });
|
|
113
|
-
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdOidcModule, decorators: [{
|
|
115
|
-
type: NgModule,
|
|
116
|
-
args: [{
|
|
117
|
-
imports: [CommonModule],
|
|
118
|
-
exports: [],
|
|
119
|
-
}]
|
|
120
|
-
}] });
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Generated bundle index. Do not edit.
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
export { SD_OIDC_CONFIGURATION, SdOidcModule };
|
|
127
|
-
//# sourceMappingURL=sd-angular-core-modules-oidc.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core-modules-oidc.mjs","sources":["../../../projects/sd-angular/modules/oidc/oidc.configuration.ts","../../../projects/sd-angular/modules/oidc/dynamic-sts.loader.ts","../../../projects/sd-angular/modules/oidc/oidc.module.ts","../../../projects/sd-angular/modules/oidc/sd-angular-core-modules-oidc.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\r\n\r\nexport interface SdOidcTenantConfig {\r\n url: string;\r\n realm: string;\r\n clientId: string;\r\n // Cập nhật domain API của bạn vào đây để Interceptor tự đính Token, ví dụ: ['https://dev.api.com']\r\n secureRoutes: string[];\r\n}\r\n\r\nexport interface ISdOidcConfiguration {\r\n loadTenantConfig: () => Promise<SdOidcTenantConfig>;\r\n}\r\n\r\nexport const SD_OIDC_CONFIGURATION = new InjectionToken<ISdOidcConfiguration>('sd-oidc.configuration');","import { Inject, Injectable } from '@angular/core';\r\nimport { LogLevel, OpenIdConfiguration, StsConfigLoader } from 'angular-auth-oidc-client';\r\nimport { from, map, Observable } from 'rxjs';\r\nimport { ISdOidcConfiguration, SD_OIDC_CONFIGURATION } from './oidc.configuration';\r\n\r\n@Injectable()\r\nexport class DynamicStsLoader extends StsConfigLoader {\r\n constructor(@Inject(SD_OIDC_CONFIGURATION) private oidcConfiguration: ISdOidcConfiguration) {\r\n super();\r\n }\r\n\r\n // SỬA LỖI TYPE: Trả về Observable<OpenIdConfiguration[]>\r\n override loadConfigs(): Observable<OpenIdConfiguration[]> {\r\n const loaderPromise = this.oidcConfiguration.loadTenantConfig();\r\n\r\n // Dùng 'from' chuyển Promise -> Observable\r\n return from(loaderPromise).pipe(\r\n map(tenantConfig => {\r\n const authority = `${tenantConfig.url}/realms/${tenantConfig.realm}`;\r\n console.log('Authority:', authority);\r\n console.log('SecureRoutes:', tenantConfig.secureRoutes);\r\n const config: OpenIdConfiguration = {\r\n authority,\r\n redirectUrl: window.location.origin,\r\n postLogoutRedirectUri: window.location.origin,\r\n clientId: tenantConfig.clientId,\r\n scope: 'openid profile email offline_access',\r\n responseType: 'code',\r\n silentRenew: true, // Tự động Refresh Token\r\n useRefreshToken: true,\r\n ignoreNonceAfterRefresh: true,\r\n renewTimeBeforeTokenExpiresInSeconds: 10,\r\n logLevel: LogLevel.Warn,\r\n // Cập nhật domain API của bạn vào đây để Interceptor tự đính Token\r\n secureRoutes: tenantConfig.secureRoutes?.filter(route => !!route)?.map(route => route.trim()),\r\n };\r\n // Trả về mảng (bắt buộc với bản mới)\r\n return [config];\r\n })\r\n );\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule, Type } from '@angular/core';\r\nimport { authInterceptor, provideAuth, StsConfigLoader } from 'angular-auth-oidc-client';\r\nimport { DynamicStsLoader } from './dynamic-sts.loader';\r\nimport { provideHttpClient, withInterceptors } from '@angular/common/http';\r\nimport { ISdOidcConfiguration, SD_OIDC_CONFIGURATION } from './oidc.configuration';\r\n\r\n// 5. Module Wrapper\r\n@NgModule({\r\n imports: [CommonModule],\r\n exports: [],\r\n})\r\nexport class SdOidcModule {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n static forRoot(options: {\r\n useClass?: Type<ISdOidcConfiguration>;\r\n useFactory?: (...args: any[]) => ISdOidcConfiguration;\r\n deps?: any[];\r\n }): ModuleWithProviders<SdOidcModule> {\r\n if (options.useFactory) {\r\n return {\r\n ngModule: SdOidcModule,\r\n providers: [\r\n {\r\n provide: SD_OIDC_CONFIGURATION,\r\n useFactory: options.useFactory,\r\n deps: options.deps,\r\n },\r\n // B. Provide Auth Logic (Dùng cú pháp provideAuth mới ngay trong NgModule)\r\n provideAuth({\r\n loader: {\r\n provide: StsConfigLoader,\r\n useClass: DynamicStsLoader,\r\n },\r\n }),\r\n provideHttpClient(withInterceptors([authInterceptor()])),\r\n ],\r\n };\r\n }\r\n if (options.useClass) {\r\n return {\r\n ngModule: SdOidcModule,\r\n providers: [\r\n {\r\n provide: SD_OIDC_CONFIGURATION,\r\n useClass: options.useClass,\r\n },\r\n // B. Provide Auth Logic (Dùng cú pháp provideAuth mới ngay trong NgModule)\r\n provideAuth({\r\n loader: {\r\n provide: StsConfigLoader,\r\n useClass: DynamicStsLoader,\r\n },\r\n }),\r\n provideHttpClient(withInterceptors([authInterceptor()])),\r\n ],\r\n };\r\n }\r\n return {\r\n ngModule: SdOidcModule,\r\n providers: [\r\n // B. Provide Auth Logic (Dùng cú pháp provideAuth mới ngay trong NgModule)\r\n provideAuth({\r\n loader: {\r\n provide: StsConfigLoader,\r\n useClass: DynamicStsLoader,\r\n },\r\n }),\r\n provideHttpClient(withInterceptors([authInterceptor()])),\r\n ],\r\n };\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\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
|
|
|
1
|
-
export * from './permission.configuration';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export interface ISdPermissionConfiguration {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
loadPermissions: () => Promise<string[]>;
|
|
5
|
-
onForbiden?: () => void;
|
|
6
|
-
getToken?: () => Promise<string | undefined | null> | string | undefined | null;
|
|
7
|
-
}
|
|
8
|
-
export declare const SD_PERMISSION_CONFIGURATION: InjectionToken<ISdPermissionConfiguration>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './permission.directive';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { SdPermissionService } from '../services';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SdPermissionDirective {
|
|
5
|
-
private templateRef;
|
|
6
|
-
private viewContainerRef;
|
|
7
|
-
private permissionService;
|
|
8
|
-
set sdPermission(permission: string | string[] | undefined | null);
|
|
9
|
-
constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef, permissionService: SdPermissionService);
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SdPermissionDirective, never>;
|
|
11
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SdPermissionDirective, "[sdPermission]", never, { "sdPermission": { "alias": "sdPermission"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './permission.guard';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router';
|
|
2
|
-
import { ISdPermissionConfiguration } from '../configurations';
|
|
3
|
-
import { SdPermissionService } from '../services';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SdPermissionGuard implements CanActivate, CanActivateChild {
|
|
6
|
-
private configuration;
|
|
7
|
-
private permissionService;
|
|
8
|
-
constructor(configuration: ISdPermissionConfiguration, permissionService: SdPermissionService);
|
|
9
|
-
canActivate: (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => Promise<boolean>;
|
|
10
|
-
canActivateChild: (activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot) => Promise<boolean>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SdPermissionGuard, never>;
|
|
12
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SdPermissionGuard>;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './permission.service';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SdCacheService } from '@sd-angular/core/services/cache';
|
|
2
|
-
import { ISdPermissionConfiguration } from '../configurations';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SdPermissionService {
|
|
5
|
-
#private;
|
|
6
|
-
private configuration;
|
|
7
|
-
private cacheService;
|
|
8
|
-
constructor(configuration: ISdPermissionConfiguration, cacheService: SdCacheService);
|
|
9
|
-
loadPermissions: () => Promise<void>;
|
|
10
|
-
hasPermission: (permission: string | string[]) => boolean;
|
|
11
|
-
getToken: () => Promise<string | null | undefined>;
|
|
12
|
-
decodeToken: <T>() => Promise<T | null>;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SdPermissionService, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SdPermissionService>;
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { OpenIdConfiguration, StsConfigLoader } from 'angular-auth-oidc-client';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ISdOidcConfiguration } from './oidc.configuration';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DynamicStsLoader extends StsConfigLoader {
|
|
6
|
-
private oidcConfiguration;
|
|
7
|
-
constructor(oidcConfiguration: ISdOidcConfiguration);
|
|
8
|
-
loadConfigs(): Observable<OpenIdConfiguration[]>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicStsLoader, never>;
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DynamicStsLoader>;
|
|
11
|
-
}
|
package/modules/oidc/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from "@angular/core";
|
|
2
|
-
export interface SdOidcTenantConfig {
|
|
3
|
-
url: string;
|
|
4
|
-
realm: string;
|
|
5
|
-
clientId: string;
|
|
6
|
-
secureRoutes: string[];
|
|
7
|
-
}
|
|
8
|
-
export interface ISdOidcConfiguration {
|
|
9
|
-
loadTenantConfig: () => Promise<SdOidcTenantConfig>;
|
|
10
|
-
}
|
|
11
|
-
export declare const SD_OIDC_CONFIGURATION: InjectionToken<ISdOidcConfiguration>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders, Type } from '@angular/core';
|
|
2
|
-
import { ISdOidcConfiguration } from './oidc.configuration';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
export declare class SdOidcModule {
|
|
6
|
-
static forRoot(options: {
|
|
7
|
-
useClass?: Type<ISdOidcConfiguration>;
|
|
8
|
-
useFactory?: (...args: any[]) => ISdOidcConfiguration;
|
|
9
|
-
deps?: any[];
|
|
10
|
-
}): ModuleWithProviders<SdOidcModule>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SdOidcModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SdOidcModule, never, [typeof i1.CommonModule], never>;
|
|
13
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<SdOidcModule>;
|
|
14
|
-
}
|
|
Binary file
|