@sd-angular/core 19.0.0-beta.8 → 19.0.0-beta.80
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 +12 -41
- package/components/document-builder/src/document-builder.model.d.ts +14 -11
- 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/index.d.ts +5 -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 +4006 -611
- package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
- 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 +5 -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 +93 -69
- package/public-api.d.ts +0 -1
- package/sd-angular-core-19.0.0-beta.80.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,38 +1,31 @@
|
|
|
1
1
|
import { NestedTreeControl } from '@angular/cdk/tree';
|
|
2
|
-
import { Params, Router } from '@angular/router';
|
|
3
2
|
import { MatTreeNestedDataSource } from '@angular/material/tree';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { ISdLayoutConfiguration, ISidebarConfigurationV1 } from '../../../../configurations';
|
|
3
|
+
import { Params } from '@angular/router';
|
|
4
|
+
import { SdLayoutUserInfo, SidebarConfigurationV1 } from '../../../../configurations';
|
|
5
|
+
import { SdLayoutMenu } from '../../../../services';
|
|
8
6
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class
|
|
7
|
+
export declare class SidebarComponent {
|
|
10
8
|
#private;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
popupUserMenuOpened: EventEmitter<void>;
|
|
20
|
-
showSideBar: EventEmitter<boolean | null>;
|
|
21
|
-
menusOrigin: SdLayoutMenu[];
|
|
9
|
+
isShowSidebar: import("@angular/core").InputSignal<boolean>;
|
|
10
|
+
menus: import("@angular/core").InputSignal<SdLayoutMenu[]>;
|
|
11
|
+
userInfo: import("@angular/core").InputSignal<SdLayoutUserInfo>;
|
|
12
|
+
sidebar: import("@angular/core").InputSignal<SidebarConfigurationV1>;
|
|
13
|
+
expandSideBar: import("@angular/core").OutputEmitterRef<void>;
|
|
14
|
+
popupUserMenuClosed: import("@angular/core").OutputEmitterRef<void>;
|
|
15
|
+
popupUserMenuOpened: import("@angular/core").OutputEmitterRef<void>;
|
|
16
|
+
showSideBar: import("@angular/core").OutputEmitterRef<boolean | null>;
|
|
22
17
|
screenHeight: number;
|
|
23
|
-
searchText: string;
|
|
24
|
-
isMenuLock: boolean;
|
|
25
|
-
currentPath: string;
|
|
26
|
-
titleMenuGroup: string | undefined;
|
|
27
18
|
isMobileOrTablet: boolean;
|
|
28
|
-
|
|
19
|
+
isMenuLock: import("@angular/core").WritableSignal<boolean>;
|
|
20
|
+
currentPath: import("@angular/core").WritableSignal<string>;
|
|
21
|
+
searchText: import("@angular/core").WritableSignal<string>;
|
|
22
|
+
titleMenuGroup: import("@angular/core").WritableSignal<string | undefined>;
|
|
23
|
+
idMenuGroupActive: import("@angular/core").WritableSignal<string | undefined>;
|
|
24
|
+
menusByGroup: import("@angular/core").WritableSignal<SdLayoutMenu[]>;
|
|
25
|
+
totalMenuInMenusByGroup: import("@angular/core").Signal<number>;
|
|
29
26
|
dataSource: MatTreeNestedDataSource<SdLayoutMenu>;
|
|
30
|
-
idMenuGroupActive: string | undefined;
|
|
31
|
-
menusByGroup: SdLayoutMenu[];
|
|
32
27
|
treeControl: NestedTreeControl<SdLayoutMenu, SdLayoutMenu>;
|
|
33
|
-
constructor(
|
|
34
|
-
ngOnInit(): Promise<void>;
|
|
35
|
-
ngOnDestroy(): void;
|
|
28
|
+
constructor();
|
|
36
29
|
hasChild: (_: number, node: SdLayoutMenu) => boolean;
|
|
37
30
|
onToggleMenuNode: (menu: SdLayoutMenu) => void;
|
|
38
31
|
toggleMenuLock(event: Event): void;
|
|
@@ -50,6 +43,6 @@ export declare class LayoutSidebarComponent implements OnDestroy, OnInit {
|
|
|
50
43
|
onMouseLeaveMenuGroupNode: (event: MouseEvent, menuNode: SdLayoutMenu) => void;
|
|
51
44
|
onMouseOverMenuNode: (event: MouseEvent, menuItem: SdLayoutMenu) => void;
|
|
52
45
|
onMouseLeaveMenuNode: (event: MouseEvent, menuItem: SdLayoutMenu) => void;
|
|
53
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
54
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarComponent, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SidebarComponent, "sidebar", never, { "isShowSidebar": { "alias": "isShowSidebar"; "required": true; "isSignal": true; }; "menus": { "alias": "menus"; "required": true; "isSignal": true; }; "userInfo": { "alias": "userInfo"; "required": true; "isSignal": true; }; "sidebar": { "alias": "sidebar"; "required": true; "isSignal": true; }; }, { "expandSideBar": "expandSideBar"; "popupUserMenuClosed": "popupUserMenuClosed"; "popupUserMenuOpened": "popupUserMenuOpened"; "showSideBar": "showSideBar"; }, never, never, true, never>;
|
|
55
48
|
}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SdLayoutStorageService } from '../../../../services';
|
|
3
|
-
import { ISdLayoutConfiguration } from '../../../../configurations';
|
|
1
|
+
import { SdLayoutUserInfo } from '../../../../configurations';
|
|
4
2
|
import * as i0 from "@angular/core";
|
|
5
3
|
export declare class LayoutUserComponent {
|
|
6
|
-
private
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
menuClosed:
|
|
12
|
-
menuOpened:
|
|
13
|
-
toggleMenuLock:
|
|
14
|
-
email: string;
|
|
15
|
-
username: string;
|
|
16
|
-
fullName: string;
|
|
4
|
+
#private;
|
|
5
|
+
isMobileOrTablet: import("@angular/core").InputSignal<boolean>;
|
|
6
|
+
isMenuLock: import("@angular/core").InputSignal<boolean>;
|
|
7
|
+
isShowSidebar: import("@angular/core").InputSignal<boolean>;
|
|
8
|
+
userInfo: import("@angular/core").InputSignal<SdLayoutUserInfo>;
|
|
9
|
+
menuClosed: import("@angular/core").OutputEmitterRef<void>;
|
|
10
|
+
menuOpened: import("@angular/core").OutputEmitterRef<void>;
|
|
11
|
+
toggleMenuLock: import("@angular/core").OutputEmitterRef<Event>;
|
|
17
12
|
singoutLayoutConfig: () => void | Promise<void>;
|
|
18
|
-
changePasswordLayoutConfig
|
|
19
|
-
constructor(layoutConfig: ISdLayoutConfiguration, layoutStorageService: SdLayoutStorageService);
|
|
13
|
+
changePasswordLayoutConfig: (() => void | Promise<void>) | undefined;
|
|
20
14
|
onMenuOpened: () => void;
|
|
21
15
|
onMenuClosed: () => void;
|
|
22
16
|
keepOpenWhenClickInsideMenu: (event: Event) => void;
|
|
@@ -24,5 +18,5 @@ export declare class LayoutUserComponent {
|
|
|
24
18
|
changePassword: () => void;
|
|
25
19
|
onToggleMenuLock: (event: Event) => void;
|
|
26
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutUserComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LayoutUserComponent, "lib-layout-user", never, { "isMobileOrTablet": { "alias": "isMobileOrTablet"; "required": false; }; "isMenuLock": { "alias": "isMenuLock"; "required": false; }; "isShowSidebar": { "alias": "isShowSidebar"; "required": false; }; }, { "menuClosed": "menuClosed"; "menuOpened": "menuOpened"; "toggleMenuLock": "toggleMenuLock"; }, never, never, true, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LayoutUserComponent, "lib-layout-user", never, { "isMobileOrTablet": { "alias": "isMobileOrTablet"; "required": false; "isSignal": true; }; "isMenuLock": { "alias": "isMenuLock"; "required": false; "isSignal": true; }; "isShowSidebar": { "alias": "isShowSidebar"; "required": false; "isSignal": true; }; "userInfo": { "alias": "userInfo"; "required": true; "isSignal": true; }; }, { "menuClosed": "menuClosed"; "menuOpened": "menuOpened"; "toggleMenuLock": "toggleMenuLock"; }, never, never, true, never>;
|
|
28
22
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { MatSidenav } from '@angular/material/sidenav';
|
|
2
|
-
import {
|
|
2
|
+
import { SdLayoutUserInfo, SidebarConfigurationV1 } from '../../configurations';
|
|
3
|
+
import { SdLayoutMenu } from '../../services';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class
|
|
5
|
+
export declare class SidebarV1Component {
|
|
5
6
|
#private;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
isMenuLock: boolean
|
|
12
|
-
isShowSidebar: boolean
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
timerMouseOutMenu: ReturnType<typeof setTimeout> | null;
|
|
7
|
+
sidenav: import("@angular/core").Signal<MatSidenav>;
|
|
8
|
+
menus: import("@angular/core").InputSignal<SdLayoutMenu[]>;
|
|
9
|
+
userInfo: import("@angular/core").InputSignal<SdLayoutUserInfo>;
|
|
10
|
+
sidebar: import("@angular/core").InputSignal<SidebarConfigurationV1>;
|
|
11
|
+
isMobileOrTablet: import("@angular/core").WritableSignal<boolean>;
|
|
12
|
+
isMenuLock: import("@angular/core").WritableSignal<boolean>;
|
|
13
|
+
isShowSidebar: import("@angular/core").WritableSignal<boolean>;
|
|
14
|
+
onhover: import("@angular/core").WritableSignal<boolean>;
|
|
15
|
+
constructor();
|
|
16
16
|
openSidebar: () => void;
|
|
17
17
|
onPopupOfSideBarOpened: () => void;
|
|
18
18
|
onPopupOfSideBarClosed: () => void;
|
|
19
19
|
onExpandSideBar: () => void;
|
|
20
20
|
onMouseleaveSideBar: () => void;
|
|
21
21
|
onToggle: (data: boolean | null) => void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarV1Component, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SidebarV1Component, "sidebar-v1", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "userInfo": { "alias": "userInfo"; "required": true; "isSignal": true; }; "sidebar": { "alias": "sidebar"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
24
24
|
}
|
|
@@ -1,16 +1,59 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { SdMaybeAsync } from '@sd-angular/core/utilities/models';
|
|
2
3
|
export interface ISdLayoutConfiguration {
|
|
3
4
|
homeUrl?: string;
|
|
4
|
-
sidebar: ISdSidebarConfiguration | (() =>
|
|
5
|
+
sidebar: ISdSidebarConfiguration | (() => SdMaybeAsync<ISdSidebarConfiguration>);
|
|
6
|
+
userInfo: SdLayoutUserInfo | (() => SdMaybeAsync<SdLayoutUserInfo>);
|
|
5
7
|
signout: () => void | Promise<void>;
|
|
6
8
|
changePassword?: () => void | Promise<void>;
|
|
7
9
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
+
export interface SdLayoutUserInfo {
|
|
11
|
+
/**
|
|
12
|
+
* Tên đăng nhập hoặc tên định danh của người dùng.
|
|
13
|
+
* Thường dùng làm định danh rút gọn hoặc fallback hiển thị nếu user chưa cập nhật fullName.
|
|
14
|
+
*/
|
|
15
|
+
username?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Địa chỉ thư điện tử của người dùng.
|
|
18
|
+
* Thường được hiển thị bên dưới tên người dùng trong popup/menu thông tin tài khoản.
|
|
19
|
+
*/
|
|
20
|
+
email?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Họ và tên đầy đủ của người dùng.
|
|
23
|
+
* Đây là thông tin được ưu tiên hiển thị chính trên giao diện (VD: góc phải màn hình, lời chào).
|
|
24
|
+
*/
|
|
25
|
+
fullName?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Hình đại diện (avatar) của người dùng.
|
|
28
|
+
* Nếu để trống, hệ thống sẽ tự động lấy ký tự đầu tiên của fullName hoặc username để tạo avatar mặc định.
|
|
29
|
+
* Hỗ trợ các định dạng: URL (http/https), chuỗi base64 (data:image), hoặc đường dẫn nội bộ.
|
|
30
|
+
*/
|
|
31
|
+
avatar?: string;
|
|
32
|
+
}
|
|
33
|
+
export type ISdSidebarConfiguration = SidebarConfigurationV1;
|
|
34
|
+
export interface SidebarConfigurationV1 {
|
|
10
35
|
version: 1;
|
|
36
|
+
/**
|
|
37
|
+
* Màu brand chính.
|
|
38
|
+
* Nên sử dụng mã màu #HEX hoặc rgb để hỗ trợ opacity khi hover.
|
|
39
|
+
* Ví dụ: #1890ff, rgb(24,144,255)
|
|
40
|
+
*/
|
|
11
41
|
brandColor?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Màu brand nhạt (light).
|
|
44
|
+
* Dùng cho background, hover nhẹ.
|
|
45
|
+
*/
|
|
12
46
|
brandLightColor?: string;
|
|
47
|
+
/**
|
|
48
|
+
* URL logo hiển thị ở sidebar.
|
|
49
|
+
* Nên đặt trong thư mục public hoặc dùng URL CDN.
|
|
50
|
+
*/
|
|
13
51
|
logoUrl?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Title mặc định của hệ thống.
|
|
54
|
+
* Nếu menu không truyền title thì sẽ dùng giá trị này.
|
|
55
|
+
* @default "Back Office"
|
|
56
|
+
*/
|
|
14
57
|
defaultTitle?: string;
|
|
15
58
|
}
|
|
16
59
|
export declare const SD_LAYOUT_CONFIGURATION: InjectionToken<ISdLayoutConfiguration>;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { ActivatedRoute } from '@angular/router';
|
|
2
|
-
import { SdLayoutStorageService } from '../../../../services';
|
|
3
1
|
import * as i0 from "@angular/core";
|
|
4
2
|
export declare class RootComponent {
|
|
5
3
|
#private;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
email: string;
|
|
10
|
-
constructor(route: ActivatedRoute, layoutStorageService: SdLayoutStorageService);
|
|
11
|
-
todayInfo: string;
|
|
4
|
+
readonly url: import("@angular/core").WritableSignal<string>;
|
|
5
|
+
readonly todayInfo: import("@angular/core").WritableSignal<string>;
|
|
6
|
+
userInfo: import("@angular/core").WritableSignal<import("@sd-angular/core/modules/layout").SdLayoutUserInfo | undefined>;
|
|
12
7
|
reload(): void;
|
|
13
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<RootComponent, never>;
|
|
14
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<RootComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { SdLayoutStorageService } from '../../../../services';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
2
|
export declare class HomePageComponent {
|
|
4
3
|
#private;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
constructor(layoutStorageService: SdLayoutStorageService);
|
|
8
|
-
todayInfo: string;
|
|
4
|
+
readonly todayInfo: import("@angular/core").WritableSignal<string>;
|
|
5
|
+
userInfo: import("@angular/core").WritableSignal<import("@sd-angular/core/modules/layout").SdLayoutUserInfo | undefined>;
|
|
9
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<HomePageComponent, never>;
|
|
10
7
|
static ɵcmp: i0.ɵɵComponentDeclaration<HomePageComponent, "app-home-page", never, {}, {}, never, never, true, never>;
|
|
11
8
|
}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { ActivatedRoute } from '@angular/router';
|
|
2
|
-
import { SdLayoutStorageService } from '../../../../services';
|
|
3
1
|
import * as i0 from "@angular/core";
|
|
4
2
|
export declare class RootComponent {
|
|
5
3
|
#private;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
email: string;
|
|
10
|
-
constructor(route: ActivatedRoute, layoutStorageService: SdLayoutStorageService);
|
|
11
|
-
todayInfo: string;
|
|
4
|
+
readonly url: import("@angular/core").WritableSignal<string>;
|
|
5
|
+
readonly todayInfo: import("@angular/core").WritableSignal<string>;
|
|
6
|
+
userInfo: import("@angular/core").WritableSignal<import("@sd-angular/core/modules/layout").SdLayoutUserInfo | undefined>;
|
|
12
7
|
reload(): void;
|
|
13
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<RootComponent, never>;
|
|
14
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<RootComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
@@ -2,7 +2,7 @@ import { PipeTransform } from '@angular/core';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class HighlightSearchPipe implements PipeTransform {
|
|
4
4
|
#private;
|
|
5
|
-
transform(value: string, keyword: string,
|
|
5
|
+
transform(value: string, keyword: string, args?: {
|
|
6
6
|
color?: string;
|
|
7
7
|
}): string;
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<HighlightSearchPipe, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SdLayoutUserInfo } from '../configurations';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SdLayoutService {
|
|
4
|
+
#private;
|
|
5
|
+
userInfo: import("@angular/core").WritableSignal<SdLayoutUserInfo | undefined>;
|
|
6
|
+
sidebar: import("@angular/core").WritableSignal<import("@sd-angular/core/modules/layout").SidebarConfigurationV1 | undefined>;
|
|
7
|
+
constructor();
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdLayoutService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SdLayoutService>;
|
|
10
|
+
}
|
|
@@ -5,8 +5,10 @@ export interface SdLayoutRootMenu {
|
|
|
5
5
|
id?: string;
|
|
6
6
|
path: string;
|
|
7
7
|
queryParams?: Params;
|
|
8
|
-
icon
|
|
8
|
+
icon?: string;
|
|
9
|
+
iconUrl?: string;
|
|
9
10
|
title: string;
|
|
11
|
+
permissionKey?: string;
|
|
10
12
|
permission: string | string[] | boolean | (() => boolean);
|
|
11
13
|
level?: number;
|
|
12
14
|
tooltipTitle?: string;
|
|
@@ -14,6 +16,7 @@ export interface SdLayoutRootMenu {
|
|
|
14
16
|
export interface SdLayoutChildrenMenu {
|
|
15
17
|
id?: string;
|
|
16
18
|
icon?: string;
|
|
19
|
+
iconUrl?: string;
|
|
17
20
|
title?: string;
|
|
18
21
|
children?: (SdLayoutRootMenu | SdLayoutChildrenMenu)[];
|
|
19
22
|
level?: number;
|
|
@@ -2,9 +2,6 @@ import { SdStorage, SdStorageService } from '@sd-angular/core/services';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SdLayoutStorageService {
|
|
4
4
|
private sdStorageService;
|
|
5
|
-
email: SdStorage<string>;
|
|
6
|
-
username: SdStorage<string>;
|
|
7
|
-
fullName: SdStorage<string>;
|
|
8
5
|
isShowSidebar: SdStorage<boolean>;
|
|
9
6
|
menuLockStatus: SdStorage<boolean>;
|
|
10
7
|
lastActiveMenuGroupId: SdStorage<string>;
|
|
@@ -1,9 +1,63 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { SdMaybeAsync } from '@sd-angular/core/utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Cấu hình trung tâm cho module permission.
|
|
5
|
+
*
|
|
6
|
+
* Luồng hoạt động chính:
|
|
7
|
+
* 1. `loadPermissions(key?)` ở service được gọi để lấy danh sách mã quyền theo từng `key` cấu hình.
|
|
8
|
+
* 2. Guard/service đối chiếu mã quyền theo route metadata.
|
|
9
|
+
* 3. Khi không đủ quyền, callback `onForbiden()` sẽ được gọi (nếu có).
|
|
10
|
+
*
|
|
11
|
+
* Lưu ý:
|
|
12
|
+
* - `SD_PERMISSION_CONFIGURATION` hỗ trợ cả cấu hình đơn và mảng cấu hình (`multi: true`).
|
|
13
|
+
* - Nếu cần tạm bỏ qua kiểm tra quyền (POC/UAT cục bộ), đặt `disabled = true`.
|
|
14
|
+
*/
|
|
3
15
|
export interface ISdPermissionConfiguration {
|
|
16
|
+
/**
|
|
17
|
+
* Khóa định danh cấu hình.
|
|
18
|
+
* Dùng để phân biệt khi hệ thống mở rộng theo nhiều profile permission.
|
|
19
|
+
*
|
|
20
|
+
* Lưu ý: `undefined` cũng được xem là một key hợp lệ (cấu hình mặc định).
|
|
21
|
+
*/
|
|
22
|
+
key?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Bật/tắt kiểm tra permission toàn cục.
|
|
25
|
+
* - `true`: bỏ qua kiểm tra quyền.
|
|
26
|
+
* - `false | undefined`: kiểm tra quyền theo cấu hình route.
|
|
27
|
+
*/
|
|
4
28
|
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Trả về danh sách mã quyền của user hiện tại.
|
|
31
|
+
* Có thể đồng bộ hoặc bất đồng bộ.
|
|
32
|
+
*
|
|
33
|
+
* Ví dụ giá trị trả về:
|
|
34
|
+
* - `['PRODUCT_C_EMPLOYEE_VIEW', 'PRODUCT_C_EMPLOYEE_UPDATE']`
|
|
35
|
+
*/
|
|
5
36
|
loadPermissions: () => SdMaybeAsync<string[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Callback xử lý khi user không có quyền truy cập URL hiện tại.
|
|
39
|
+
* Thường dùng để điều hướng sang trang forbidden hoặc hiển thị thông báo.
|
|
40
|
+
*
|
|
41
|
+
* Giữ nguyên tên `onForbiden` để tương thích API hiện tại.
|
|
42
|
+
*/
|
|
6
43
|
onForbiden?: () => void;
|
|
7
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Cung cấp access token hiện tại cho các tác vụ liên quan permission.
|
|
46
|
+
* Hỗ trợ trả về đồng bộ, Promise hoặc Observable.
|
|
47
|
+
*/
|
|
48
|
+
getToken?: () => SdMaybeAsync<string | undefined | null>;
|
|
8
49
|
}
|
|
9
|
-
|
|
50
|
+
/**
|
|
51
|
+
* InjectionToken cho cấu hình permission.
|
|
52
|
+
*
|
|
53
|
+
* Ví dụ provider:
|
|
54
|
+
* {
|
|
55
|
+
* provide: SD_PERMISSION_CONFIGURATION,
|
|
56
|
+
* useValue: {
|
|
57
|
+
* disabled: false,
|
|
58
|
+
* loadPermissions: () => ['SAMPLE_C_EMPLOYEE_VIEW'],
|
|
59
|
+
* onForbiden: () => router.navigateByUrl('/layout/forbidden')
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
*/
|
|
63
|
+
export declare const SD_PERMISSION_CONFIGURATION: InjectionToken<ISdPermissionConfiguration | ISdPermissionConfiguration[]>;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { SdPermissionService } from '../services';
|
|
3
1
|
import * as i0 from "@angular/core";
|
|
4
2
|
export declare class SdPermissionDirective {
|
|
5
|
-
private
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef, permissionService: SdPermissionService);
|
|
3
|
+
#private;
|
|
4
|
+
readonly sdPermission: import("@angular/core").InputSignal<string | string[] | null | undefined>;
|
|
5
|
+
readonly sdPermissionKey: import("@angular/core").InputSignal<string | undefined>;
|
|
6
|
+
constructor();
|
|
10
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdPermissionDirective, never>;
|
|
11
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SdPermissionDirective, "[sdPermission]", never, { "sdPermission": { "alias": "sdPermission"; "required": false; }; }, {}, never, never, true, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdPermissionDirective, "[sdPermission]", never, { "sdPermission": { "alias": "sdPermission"; "required": false; "isSignal": true; }; "sdPermissionKey": { "alias": "sdPermissionKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
12
9
|
}
|
|
@@ -3,9 +3,10 @@ import { ISdPermissionConfiguration } from '../configurations';
|
|
|
3
3
|
import { SdPermissionService } from '../services';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SdPermissionGuard implements CanActivate, CanActivateChild {
|
|
6
|
+
#private;
|
|
6
7
|
private configuration;
|
|
7
8
|
private permissionService;
|
|
8
|
-
constructor(configuration: ISdPermissionConfiguration, permissionService: SdPermissionService);
|
|
9
|
+
constructor(configuration: ISdPermissionConfiguration | ISdPermissionConfiguration[], permissionService: SdPermissionService);
|
|
9
10
|
canActivate: (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => Promise<boolean>;
|
|
10
11
|
canActivateChild: (activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot) => Promise<boolean>;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdPermissionGuard, never>;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { SdCacheService } from '@sd-angular/core/services/cache';
|
|
2
|
-
import { ISdPermissionConfiguration } from '../configurations';
|
|
3
1
|
import * as i0 from "@angular/core";
|
|
4
2
|
export declare class SdPermissionService {
|
|
5
3
|
#private;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
decodeToken: <T>() => Promise<T | null>;
|
|
4
|
+
constructor();
|
|
5
|
+
loadPermissions: (key?: string) => Promise<string[]>;
|
|
6
|
+
loadAllPermissions: () => Promise<void>;
|
|
7
|
+
hasPermission: (permission: string | string[], key?: string) => boolean;
|
|
8
|
+
getToken: (key?: string) => Promise<string | null | undefined>;
|
|
9
|
+
decodeToken: <T>(key?: string) => Promise<T | null>;
|
|
13
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdPermissionService, never>;
|
|
14
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<SdPermissionService>;
|
|
15
12
|
}
|