@sd-angular/core 19.0.0-beta.5 → 19.0.0-beta.50
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 +60 -2
- package/assets/scss/core/bootstrap.scss +17 -0
- package/assets/scss/core/grid.scss +40 -0
- package/assets/scss/sd-core.scss +1 -0
- package/components/avatar/index.d.ts +1 -0
- package/components/avatar/src/avatar.component.d.ts +15 -0
- package/components/badge/src/badge.component.d.ts +77 -19
- package/components/button/src/button.component.d.ts +26 -28
- 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 +18 -36
- package/components/document-builder/src/document-builder.model.d.ts +10 -10
- 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 +56 -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/index.d.ts +4 -0
- package/components/mini-editor/index.d.ts +2 -0
- package/components/mini-editor/src/mini-editor.component.d.ts +90 -0
- package/components/mini-editor/src/mini-editor.model.d.ts +44 -0
- package/components/side-drawer/src/side-drawer.component.d.ts +1 -2
- 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/src/components/selector-action/action-filter.pipe.d.ts +11 -10
- package/components/table/src/directives/index.d.ts +2 -0
- package/components/table/src/directives/sd-table-column-filter-def.directive.d.ts +9 -0
- package/components/table/src/directives/sticky-shadow.directive.d.ts +17 -0
- package/components/table/src/models/table-column.model.d.ts +32 -32
- 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-export.model.d.ts +3 -2
- package/components/table/src/models/table-option-selector.model.d.ts +11 -10
- package/components/table/src/models/table-option.model.d.ts +10 -8
- package/components/table/src/services/table-filter/table-filter.model.d.ts +2 -2
- package/components/table/src/table.component.d.ts +33 -35
- package/components/view/index.d.ts +1 -0
- package/components/view/src/view.component.d.ts +16 -0
- package/components/workflow/src/models/index.d.ts +1 -0
- package/directives/index.d.ts +1 -0
- package/directives/src/sd-href.directive.d.ts +9 -0
- package/fesm2022/sd-angular-core-components-avatar.mjs +90 -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 +64 -96
- package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-code-editor.mjs +129 -0
- package/fesm2022/sd-angular-core-components-code-editor.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-document-builder.mjs +3635 -521
- 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 +326 -0
- package/fesm2022/sd-angular-core-components-mini-editor.mjs.map +1 -0
- 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-side-drawer.mjs +21 -8
- package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab-router.mjs +152 -226
- package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs +646 -460
- package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-upload-file.mjs +1 -1
- 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 +33 -43
- package/fesm2022/sd-angular-core-components-workflow.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components.mjs +4 -0
- package/fesm2022/sd-angular-core-components.mjs.map +1 -1
- package/fesm2022/sd-angular-core-directives.mjs +80 -27
- package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs +257 -363
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date-range.mjs +145 -245
- package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date.mjs +137 -273
- package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-datetime.mjs +136 -288
- package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-number.mjs +174 -337
- package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input.mjs +130 -285
- 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 +336 -421
- package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-textarea.mjs +121 -226
- package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
- 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 +440 -431
- package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules.mjs +1 -1
- package/fesm2022/sd-angular-core-services-confirm.mjs +2 -2
- 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 +10 -6
- 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/forms/autocomplete/src/autocomplete.component.d.ts +51 -56
- package/forms/date/src/date.component.d.ts +41 -45
- package/forms/date-range/src/date-range.component.d.ts +28 -33
- package/forms/datetime/src/datetime.component.d.ts +41 -48
- package/forms/input/src/input.component.d.ts +46 -56
- package/forms/input-number/src/input-number.component.d.ts +47 -54
- package/forms/select/src/select.component.d.ts +58 -58
- package/forms/textarea/src/textarea.component.d.ts +34 -41
- package/modules/index.d.ts +1 -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/layout-main/layout-main.component.d.ts +7 -12
- 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/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 +2 -0
- package/modules/layout/services/storage/storage.service.d.ts +0 -3
- package/package.json +91 -68
- package/services/confirm/src/lib/confirm.service.d.ts +1 -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/utilities/extensions/src/string.extension.d.ts +2 -0
- package/utilities/models/index.d.ts +3 -0
- package/utilities/models/src/filter.model.d.ts +14 -2
- 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/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/fesm2022/sd-angular-core-modules-oidc.mjs +0 -127
- package/fesm2022/sd-angular-core-modules-oidc.mjs.map +0 -1
- 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
|
@@ -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
|
+
}
|
|
@@ -6,6 +6,7 @@ export interface SdLayoutRootMenu {
|
|
|
6
6
|
path: string;
|
|
7
7
|
queryParams?: Params;
|
|
8
8
|
icon: string;
|
|
9
|
+
iconUrl?: string;
|
|
9
10
|
title: string;
|
|
10
11
|
permission: string | string[] | boolean | (() => boolean);
|
|
11
12
|
level?: number;
|
|
@@ -14,6 +15,7 @@ export interface SdLayoutRootMenu {
|
|
|
14
15
|
export interface SdLayoutChildrenMenu {
|
|
15
16
|
id?: string;
|
|
16
17
|
icon?: string;
|
|
18
|
+
iconUrl?: string;
|
|
17
19
|
title?: string;
|
|
18
20
|
children?: (SdLayoutRootMenu | SdLayoutChildrenMenu)[];
|
|
19
21
|
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>;
|
package/package.json
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sd-angular/core",
|
|
3
|
-
"version": "19.0.0-beta.
|
|
3
|
+
"version": "19.0.0-beta.50",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^19.0.0 || ^20.0.0 || ^21.0.0",
|
|
6
6
|
"@angular/core": "^19.0.0 || ^20.0.0 || ^21.0.0",
|
|
7
7
|
"@angular/material": "^19.0.0 || ^20.0.0 || ^21.0.0",
|
|
8
|
-
"@angular/material-moment-adapter": "^19.0.0 || ^20.0.0 || ^21.0.0"
|
|
9
|
-
"angular-auth-oidc-client": "^19.0.0 || ^20.0.0 || ^21.0.0"
|
|
8
|
+
"@angular/material-moment-adapter": "^19.0.0 || ^20.0.0 || ^21.0.0"
|
|
10
9
|
},
|
|
11
10
|
"dependencies": {
|
|
12
|
-
"tslib": "^2.8.0",
|
|
13
11
|
"@ckeditor/ckeditor5-angular": "^11.0.0",
|
|
12
|
+
"@omer-go/docx-parser-converter-ts": "^1.0.0",
|
|
14
13
|
"ckeditor5": "^47.3.0",
|
|
15
|
-
"moment": "^2.30.1",
|
|
16
14
|
"exceljs": "^4.4.0",
|
|
17
|
-
"export-to-csv": "^1.4.0"
|
|
15
|
+
"export-to-csv": "^1.4.0",
|
|
16
|
+
"mammoth": "^1.11.0",
|
|
17
|
+
"moment": "^2.30.1",
|
|
18
|
+
"keycloak-js": "^26.0.0",
|
|
19
|
+
"prismjs": "^1.30.0",
|
|
20
|
+
"tslib": "^2.8.0"
|
|
18
21
|
},
|
|
19
22
|
"sideEffects": false,
|
|
20
23
|
"module": "fesm2022/sd-angular-core.mjs",
|
|
@@ -27,6 +30,10 @@
|
|
|
27
30
|
"types": "./index.d.ts",
|
|
28
31
|
"default": "./fesm2022/sd-angular-core.mjs"
|
|
29
32
|
},
|
|
33
|
+
"./configurations": {
|
|
34
|
+
"types": "./configurations/index.d.ts",
|
|
35
|
+
"default": "./fesm2022/sd-angular-core-configurations.mjs"
|
|
36
|
+
},
|
|
30
37
|
"./directives": {
|
|
31
38
|
"types": "./directives/index.d.ts",
|
|
32
39
|
"default": "./fesm2022/sd-angular-core-directives.mjs"
|
|
@@ -35,9 +42,9 @@
|
|
|
35
42
|
"types": "./components/index.d.ts",
|
|
36
43
|
"default": "./fesm2022/sd-angular-core-components.mjs"
|
|
37
44
|
},
|
|
38
|
-
"./
|
|
39
|
-
"types": "./
|
|
40
|
-
"default": "./fesm2022/sd-angular-core-
|
|
45
|
+
"./forms": {
|
|
46
|
+
"types": "./forms/index.d.ts",
|
|
47
|
+
"default": "./fesm2022/sd-angular-core-forms.mjs"
|
|
41
48
|
},
|
|
42
49
|
"./guards": {
|
|
43
50
|
"types": "./guards/index.d.ts",
|
|
@@ -47,10 +54,6 @@
|
|
|
47
54
|
"types": "./handlers/index.d.ts",
|
|
48
55
|
"default": "./fesm2022/sd-angular-core-handlers.mjs"
|
|
49
56
|
},
|
|
50
|
-
"./forms": {
|
|
51
|
-
"types": "./forms/index.d.ts",
|
|
52
|
-
"default": "./fesm2022/sd-angular-core-forms.mjs"
|
|
53
|
-
},
|
|
54
57
|
"./interceptors": {
|
|
55
58
|
"types": "./interceptors/index.d.ts",
|
|
56
59
|
"default": "./fesm2022/sd-angular-core-interceptors.mjs"
|
|
@@ -83,17 +86,33 @@
|
|
|
83
86
|
"types": "./components/badge/index.d.ts",
|
|
84
87
|
"default": "./fesm2022/sd-angular-core-components-badge.mjs"
|
|
85
88
|
},
|
|
89
|
+
"./components/avatar": {
|
|
90
|
+
"types": "./components/avatar/index.d.ts",
|
|
91
|
+
"default": "./fesm2022/sd-angular-core-components-avatar.mjs"
|
|
92
|
+
},
|
|
86
93
|
"./components/base": {
|
|
87
94
|
"types": "./components/base/index.d.ts",
|
|
88
95
|
"default": "./fesm2022/sd-angular-core-components-base.mjs"
|
|
89
96
|
},
|
|
97
|
+
"./components/button": {
|
|
98
|
+
"types": "./components/button/index.d.ts",
|
|
99
|
+
"default": "./fesm2022/sd-angular-core-components-button.mjs"
|
|
100
|
+
},
|
|
101
|
+
"./components/code-editor": {
|
|
102
|
+
"types": "./components/code-editor/index.d.ts",
|
|
103
|
+
"default": "./fesm2022/sd-angular-core-components-code-editor.mjs"
|
|
104
|
+
},
|
|
90
105
|
"./components/document-builder": {
|
|
91
106
|
"types": "./components/document-builder/index.d.ts",
|
|
92
107
|
"default": "./fesm2022/sd-angular-core-components-document-builder.mjs"
|
|
93
108
|
},
|
|
94
|
-
"./components/
|
|
95
|
-
"types": "./components/
|
|
96
|
-
"default": "./fesm2022/sd-angular-core-components-
|
|
109
|
+
"./components/mini-editor": {
|
|
110
|
+
"types": "./components/mini-editor/index.d.ts",
|
|
111
|
+
"default": "./fesm2022/sd-angular-core-components-mini-editor.mjs"
|
|
112
|
+
},
|
|
113
|
+
"./components/modal": {
|
|
114
|
+
"types": "./components/modal/index.d.ts",
|
|
115
|
+
"default": "./fesm2022/sd-angular-core-components-modal.mjs"
|
|
97
116
|
},
|
|
98
117
|
"./components/history": {
|
|
99
118
|
"types": "./components/history/index.d.ts",
|
|
@@ -103,46 +122,46 @@
|
|
|
103
122
|
"types": "./components/import-excel/index.d.ts",
|
|
104
123
|
"default": "./fesm2022/sd-angular-core-components-import-excel.mjs"
|
|
105
124
|
},
|
|
106
|
-
"./components/modal": {
|
|
107
|
-
"types": "./components/modal/index.d.ts",
|
|
108
|
-
"default": "./fesm2022/sd-angular-core-components-modal.mjs"
|
|
109
|
-
},
|
|
110
125
|
"./components/preview": {
|
|
111
126
|
"types": "./components/preview/index.d.ts",
|
|
112
127
|
"default": "./fesm2022/sd-angular-core-components-preview.mjs"
|
|
113
128
|
},
|
|
114
|
-
"./components/
|
|
115
|
-
"types": "./components/
|
|
116
|
-
"default": "./fesm2022/sd-angular-core-components-
|
|
129
|
+
"./components/query-builder": {
|
|
130
|
+
"types": "./components/query-builder/index.d.ts",
|
|
131
|
+
"default": "./fesm2022/sd-angular-core-components-query-builder.mjs"
|
|
117
132
|
},
|
|
118
133
|
"./components/quick-action": {
|
|
119
134
|
"types": "./components/quick-action/index.d.ts",
|
|
120
135
|
"default": "./fesm2022/sd-angular-core-components-quick-action.mjs"
|
|
121
136
|
},
|
|
122
|
-
"./components/
|
|
123
|
-
"types": "./components/
|
|
124
|
-
"default": "./fesm2022/sd-angular-core-components-
|
|
137
|
+
"./components/tab-router": {
|
|
138
|
+
"types": "./components/tab-router/index.d.ts",
|
|
139
|
+
"default": "./fesm2022/sd-angular-core-components-tab-router.mjs"
|
|
125
140
|
},
|
|
126
141
|
"./components/side-drawer": {
|
|
127
142
|
"types": "./components/side-drawer/index.d.ts",
|
|
128
143
|
"default": "./fesm2022/sd-angular-core-components-side-drawer.mjs"
|
|
129
144
|
},
|
|
130
|
-
"./components/
|
|
131
|
-
"types": "./components/
|
|
132
|
-
"default": "./fesm2022/sd-angular-core-components-
|
|
145
|
+
"./components/section": {
|
|
146
|
+
"types": "./components/section/index.d.ts",
|
|
147
|
+
"default": "./fesm2022/sd-angular-core-components-section.mjs"
|
|
133
148
|
},
|
|
134
|
-
"./components/
|
|
135
|
-
"types": "./components/
|
|
136
|
-
"default": "./fesm2022/sd-angular-core-components-
|
|
137
|
-
},
|
|
138
|
-
"./components/upload-file": {
|
|
139
|
-
"types": "./components/upload-file/index.d.ts",
|
|
140
|
-
"default": "./fesm2022/sd-angular-core-components-upload-file.mjs"
|
|
149
|
+
"./components/view": {
|
|
150
|
+
"types": "./components/view/index.d.ts",
|
|
151
|
+
"default": "./fesm2022/sd-angular-core-components-view.mjs"
|
|
141
152
|
},
|
|
142
153
|
"./components/workflow": {
|
|
143
154
|
"types": "./components/workflow/index.d.ts",
|
|
144
155
|
"default": "./fesm2022/sd-angular-core-components-workflow.mjs"
|
|
145
156
|
},
|
|
157
|
+
"./forms/checkbox": {
|
|
158
|
+
"types": "./forms/checkbox/index.d.ts",
|
|
159
|
+
"default": "./fesm2022/sd-angular-core-forms-checkbox.mjs"
|
|
160
|
+
},
|
|
161
|
+
"./forms/chip": {
|
|
162
|
+
"types": "./forms/chip/index.d.ts",
|
|
163
|
+
"default": "./fesm2022/sd-angular-core-forms-chip.mjs"
|
|
164
|
+
},
|
|
146
165
|
"./forms/autocomplete": {
|
|
147
166
|
"types": "./forms/autocomplete/index.d.ts",
|
|
148
167
|
"default": "./fesm2022/sd-angular-core-forms-autocomplete.mjs"
|
|
@@ -151,22 +170,18 @@
|
|
|
151
170
|
"types": "./forms/chip-calendar/index.d.ts",
|
|
152
171
|
"default": "./fesm2022/sd-angular-core-forms-chip-calendar.mjs"
|
|
153
172
|
},
|
|
154
|
-
"./
|
|
155
|
-
"types": "./
|
|
156
|
-
"default": "./fesm2022/sd-angular-core-
|
|
173
|
+
"./components/table": {
|
|
174
|
+
"types": "./components/table/index.d.ts",
|
|
175
|
+
"default": "./fesm2022/sd-angular-core-components-table.mjs"
|
|
157
176
|
},
|
|
158
|
-
"./forms/
|
|
159
|
-
"types": "./forms/
|
|
160
|
-
"default": "./fesm2022/sd-angular-core-forms-
|
|
177
|
+
"./forms/date-range": {
|
|
178
|
+
"types": "./forms/date-range/index.d.ts",
|
|
179
|
+
"default": "./fesm2022/sd-angular-core-forms-date-range.mjs"
|
|
161
180
|
},
|
|
162
181
|
"./forms/date": {
|
|
163
182
|
"types": "./forms/date/index.d.ts",
|
|
164
183
|
"default": "./fesm2022/sd-angular-core-forms-date.mjs"
|
|
165
184
|
},
|
|
166
|
-
"./forms/date-range": {
|
|
167
|
-
"types": "./forms/date-range/index.d.ts",
|
|
168
|
-
"default": "./fesm2022/sd-angular-core-forms-date-range.mjs"
|
|
169
|
-
},
|
|
170
185
|
"./forms/datetime": {
|
|
171
186
|
"types": "./forms/datetime/index.d.ts",
|
|
172
187
|
"default": "./fesm2022/sd-angular-core-forms-datetime.mjs"
|
|
@@ -179,6 +194,10 @@
|
|
|
179
194
|
"types": "./forms/input/index.d.ts",
|
|
180
195
|
"default": "./fesm2022/sd-angular-core-forms-input.mjs"
|
|
181
196
|
},
|
|
197
|
+
"./forms/input-number": {
|
|
198
|
+
"types": "./forms/input-number/index.d.ts",
|
|
199
|
+
"default": "./fesm2022/sd-angular-core-forms-input-number.mjs"
|
|
200
|
+
},
|
|
182
201
|
"./forms/label": {
|
|
183
202
|
"types": "./forms/label/index.d.ts",
|
|
184
203
|
"default": "./fesm2022/sd-angular-core-forms-label.mjs"
|
|
@@ -187,38 +206,38 @@
|
|
|
187
206
|
"types": "./forms/models/index.d.ts",
|
|
188
207
|
"default": "./fesm2022/sd-angular-core-forms-models.mjs"
|
|
189
208
|
},
|
|
190
|
-
"./forms/
|
|
191
|
-
"types": "./forms/
|
|
192
|
-
"default": "./fesm2022/sd-angular-core-forms-
|
|
209
|
+
"./forms/radio": {
|
|
210
|
+
"types": "./forms/radio/index.d.ts",
|
|
211
|
+
"default": "./fesm2022/sd-angular-core-forms-radio.mjs"
|
|
193
212
|
},
|
|
194
213
|
"./forms/select": {
|
|
195
214
|
"types": "./forms/select/index.d.ts",
|
|
196
215
|
"default": "./fesm2022/sd-angular-core-forms-select.mjs"
|
|
197
216
|
},
|
|
198
|
-
"./forms/
|
|
199
|
-
"types": "./forms/
|
|
200
|
-
"default": "./fesm2022/sd-angular-core-forms-
|
|
217
|
+
"./forms/switch": {
|
|
218
|
+
"types": "./forms/switch/index.d.ts",
|
|
219
|
+
"default": "./fesm2022/sd-angular-core-forms-switch.mjs"
|
|
201
220
|
},
|
|
202
221
|
"./forms/textarea": {
|
|
203
222
|
"types": "./forms/textarea/index.d.ts",
|
|
204
223
|
"default": "./fesm2022/sd-angular-core-forms-textarea.mjs"
|
|
205
224
|
},
|
|
206
|
-
"./
|
|
207
|
-
"types": "./
|
|
208
|
-
"default": "./fesm2022/sd-angular-core-
|
|
225
|
+
"./guards/permission": {
|
|
226
|
+
"types": "./guards/permission/index.d.ts",
|
|
227
|
+
"default": "./fesm2022/sd-angular-core-guards-permission.mjs"
|
|
209
228
|
},
|
|
210
229
|
"./modules/auth": {
|
|
211
230
|
"types": "./modules/auth/index.d.ts",
|
|
212
231
|
"default": "./fesm2022/sd-angular-core-modules-auth.mjs"
|
|
213
232
|
},
|
|
214
|
-
"./modules/oidc": {
|
|
215
|
-
"types": "./modules/oidc/index.d.ts",
|
|
216
|
-
"default": "./fesm2022/sd-angular-core-modules-oidc.mjs"
|
|
217
|
-
},
|
|
218
233
|
"./modules/layout": {
|
|
219
234
|
"types": "./modules/layout/index.d.ts",
|
|
220
235
|
"default": "./fesm2022/sd-angular-core-modules-layout.mjs"
|
|
221
236
|
},
|
|
237
|
+
"./modules/keycloak": {
|
|
238
|
+
"types": "./modules/keycloak/index.d.ts",
|
|
239
|
+
"default": "./fesm2022/sd-angular-core-modules-keycloak.mjs"
|
|
240
|
+
},
|
|
222
241
|
"./modules/permission": {
|
|
223
242
|
"types": "./modules/permission/index.d.ts",
|
|
224
243
|
"default": "./fesm2022/sd-angular-core-modules-permission.mjs"
|
|
@@ -235,9 +254,9 @@
|
|
|
235
254
|
"types": "./services/confirm/index.d.ts",
|
|
236
255
|
"default": "./fesm2022/sd-angular-core-services-confirm.mjs"
|
|
237
256
|
},
|
|
238
|
-
"./services/
|
|
239
|
-
"types": "./services/
|
|
240
|
-
"default": "./fesm2022/sd-angular-core-services-
|
|
257
|
+
"./services/docx": {
|
|
258
|
+
"types": "./services/docx/index.d.ts",
|
|
259
|
+
"default": "./fesm2022/sd-angular-core-services-docx.mjs"
|
|
241
260
|
},
|
|
242
261
|
"./services/excel": {
|
|
243
262
|
"types": "./services/excel/index.d.ts",
|
|
@@ -247,9 +266,9 @@
|
|
|
247
266
|
"types": "./services/firebase/index.d.ts",
|
|
248
267
|
"default": "./fesm2022/sd-angular-core-services-firebase.mjs"
|
|
249
268
|
},
|
|
250
|
-
"./services/
|
|
251
|
-
"types": "./services/
|
|
252
|
-
"default": "./fesm2022/sd-angular-core-services-
|
|
269
|
+
"./services/license": {
|
|
270
|
+
"types": "./services/license/index.d.ts",
|
|
271
|
+
"default": "./fesm2022/sd-angular-core-services-license.mjs"
|
|
253
272
|
},
|
|
254
273
|
"./services/storage": {
|
|
255
274
|
"types": "./services/storage/index.d.ts",
|
|
@@ -259,6 +278,10 @@
|
|
|
259
278
|
"types": "./services/notify/index.d.ts",
|
|
260
279
|
"default": "./fesm2022/sd-angular-core-services-notify.mjs"
|
|
261
280
|
},
|
|
281
|
+
"./services/loading": {
|
|
282
|
+
"types": "./services/loading/index.d.ts",
|
|
283
|
+
"default": "./fesm2022/sd-angular-core-services-loading.mjs"
|
|
284
|
+
},
|
|
262
285
|
"./utilities/extensions": {
|
|
263
286
|
"types": "./utilities/extensions/index.d.ts",
|
|
264
287
|
"default": "./fesm2022/sd-angular-core-utilities-extensions.mjs"
|
|
@@ -267,9 +290,9 @@
|
|
|
267
290
|
"types": "./utilities/models/index.d.ts",
|
|
268
291
|
"default": "./fesm2022/sd-angular-core-utilities-models.mjs"
|
|
269
292
|
},
|
|
270
|
-
"./
|
|
271
|
-
"types": "./
|
|
272
|
-
"default": "./fesm2022/sd-angular-core-
|
|
293
|
+
"./components/upload-file": {
|
|
294
|
+
"types": "./components/upload-file/index.d.ts",
|
|
295
|
+
"default": "./fesm2022/sd-angular-core-components-upload-file.mjs"
|
|
273
296
|
}
|
|
274
297
|
}
|
|
275
298
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/public-api';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SdDocxConvertOptions, SdDocxConvertResult } from './docx.model';
|
|
2
|
+
import { SdNotifyService } from '@sd-angular/core/services/notify';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SdDocxService {
|
|
5
|
+
#private;
|
|
6
|
+
private notifyService;
|
|
7
|
+
constructor(notifyService: SdNotifyService);
|
|
8
|
+
open(options?: SdDocxConvertOptions): Promise<SdDocxConvertResult | null>;
|
|
9
|
+
convertToHtml(input: File | Blob | ArrayBuffer, options?: SdDocxConvertOptions): Promise<SdDocxConvertResult | null>;
|
|
10
|
+
convertToHtmlString(input: File | Blob | ArrayBuffer, options?: SdDocxConvertOptions): Promise<string | null>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdDocxService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SdDocxService>;
|
|
13
|
+
}
|
package/services/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export declare const StringUtilities: {
|
|
|
2
2
|
REGEX_EMAIL: string;
|
|
3
3
|
REGEX_PHONE: string;
|
|
4
4
|
REGEX_PHONE_VN: string;
|
|
5
|
+
REGEX_IDVN_OR_PASSPORT: string;
|
|
6
|
+
REGEX_TIME: string;
|
|
5
7
|
isValidEmail: (value: any) => boolean;
|
|
6
8
|
isValidPhone: (value: any) => boolean;
|
|
7
9
|
isValidCode: (value: any) => boolean;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export * from './src/color.model';
|
|
2
2
|
export * from './src/size.model';
|
|
3
|
+
export * from './src/icon.model';
|
|
3
4
|
export * from './src/pattern.model';
|
|
4
5
|
export * from './src/empty.model';
|
|
5
6
|
export * from './src/maybe-async.model';
|
|
7
|
+
export * from './src/nested-key-of.model';
|
|
8
|
+
export * from './src/unwrap-signal.model';
|
|
6
9
|
export * from './src/operator.model';
|
|
7
10
|
export * from './src/filter.model';
|
|
8
11
|
export * from './src/order.model';
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { SdOperatorHasData, SdOperatorNoData } from './operator.model';
|
|
2
|
-
export type SdFilter<T = any> = SdFilterHasData<T> | SdFilterNoData<T>;
|
|
2
|
+
export type SdFilter<T = any> = SdFilterHasData<T> | SdFilterBetween<T> | SdFilterNoData<T> | SdFilterAndOr<T>;
|
|
3
3
|
export interface SdFilterHasData<T = any> {
|
|
4
4
|
field: Extract<keyof T, string>;
|
|
5
|
-
operator: SdOperatorHasData
|
|
5
|
+
operator: Exclude<SdOperatorHasData, 'BETWEEN'>;
|
|
6
6
|
data: any;
|
|
7
7
|
}
|
|
8
|
+
export interface SdFilterBetween<T = any> {
|
|
9
|
+
field: Extract<keyof T, string>;
|
|
10
|
+
operator: 'BETWEEN';
|
|
11
|
+
data: {
|
|
12
|
+
from: string | number;
|
|
13
|
+
to: string | number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
8
16
|
export interface SdFilterNoData<T = any> {
|
|
9
17
|
field: Extract<keyof T, string>;
|
|
10
18
|
operator: SdOperatorNoData;
|
|
11
19
|
}
|
|
20
|
+
export interface SdFilterAndOr<T = any> {
|
|
21
|
+
operator: 'AND' | 'OR';
|
|
22
|
+
data: SdFilter<T>[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type Primitive = string | number | boolean | null | undefined | Date | Function;
|
|
2
|
+
export type SdNestedKeyOf<ObjectType, Depth extends number[] = []> = Depth['length'] extends 5 ? never : ObjectType extends object ? {
|
|
3
|
+
[Key in keyof ObjectType & string]: ObjectType[Key] extends Primitive ? Key : ObjectType[Key] extends Array<any> ? Key : ObjectType[Key] extends object ? Key | `${Key}.${SdNestedKeyOf<ObjectType[Key], [...Depth, 1]>}` : Key;
|
|
4
|
+
}[keyof ObjectType & string] : string;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InputSignal, InputSignalWithTransform, ModelSignal } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* Utility Type: Bóc tách kiểu dữ liệu gốc từ Angular Signal Inputs & Models
|
|
4
|
+
*/
|
|
5
|
+
export type SdUnwrapSignal<T> = T extends InputSignalWithTransform<any, infer WriteT> ? WriteT : T extends InputSignal<infer ReadT> ? ReadT : T extends ModelSignal<infer ModelT> ? ModelT : T;
|
|
6
|
+
export type SdUnwrapSafe<T> = SdUnwrapSignal<NonNullable<T>>;
|
|
@@ -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 */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|