@sdcorejs/angular 21.1.3 → 21.1.5
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 +19 -14
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +14 -14
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-audit-diff.mjs +332 -0
- package/fesm2022/sdcorejs-angular-components-audit-diff.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-badge.mjs +1 -0
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs +121 -0
- package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-data-state.mjs +68 -0
- package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-document-builder.mjs +18 -23
- package/fesm2022/sdcorejs-angular-components-document-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor.mjs +6 -4
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +495 -838
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +24 -34
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-job-progress.mjs +97 -0
- package/fesm2022/sdcorejs-angular-components-job-progress.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +10 -20
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +61 -4
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-preview.mjs +1438 -218
- package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +4 -4
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +39 -2
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +16 -22
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +48 -4
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +96 -63
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs +186 -17
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +15 -22
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components.mjs +4 -0
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +29 -41
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +7 -7
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs +20 -71
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +6 -3
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +6 -3
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +16 -13
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +42 -65
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +51 -66
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +384 -0
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +7 -5
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +290 -56
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-models.mjs +155 -2
- package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +44 -66
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +6 -20
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +19 -64
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +6 -5
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time-range.mjs +277 -0
- package/fesm2022/sdcorejs-angular-forms-time-range.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-forms-time.mjs +307 -0
- package/fesm2022/sdcorejs-angular-forms-time.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +210 -0
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-forms.mjs +73 -4
- package/fesm2022/sdcorejs-angular-forms.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +375 -10
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-interceptors.mjs +12 -17
- package/fesm2022/sdcorejs-angular-interceptors.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +994 -168
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-pipes.mjs +5 -7
- package/fesm2022/sdcorejs-angular-pipes.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-api.mjs +407 -137
- package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-cache.mjs +515 -105
- package/fesm2022/sdcorejs-angular-services-cache.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +5 -7
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-docx.mjs +7 -10
- package/fesm2022/sdcorejs-angular-services-docx.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs +339 -74
- package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-notify.mjs +7 -10
- package/fesm2022/sdcorejs-angular-services-notify.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-persistence.mjs +899 -0
- package/fesm2022/sdcorejs-angular-services-persistence.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-services-storage.mjs +324 -122
- package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-task.mjs +389 -0
- package/fesm2022/sdcorejs-angular-services-task.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs +255 -0
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-services-viewport.mjs +76 -0
- package/fesm2022/sdcorejs-angular-services-viewport.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-services.mjs +4 -0
- package/fesm2022/sdcorejs-angular-services.mjs.map +1 -1
- package/package.json +49 -1
- package/types/sdcorejs-angular-components-audit-diff.d.ts +74 -0
- package/types/sdcorejs-angular-components-badge.d.ts +1 -1
- package/types/sdcorejs-angular-components-breadcrumb.d.ts +53 -0
- package/types/sdcorejs-angular-components-data-state.d.ts +44 -0
- package/types/sdcorejs-angular-components-document-builder.d.ts +5 -5
- package/types/sdcorejs-angular-components-form-generic.d.ts +67 -104
- package/types/sdcorejs-angular-components-import-excel.d.ts +4 -14
- package/types/sdcorejs-angular-components-job-progress.d.ts +38 -0
- package/types/sdcorejs-angular-components-mini-editor.d.ts +9 -9
- package/types/sdcorejs-angular-components-modal.d.ts +7 -1
- package/types/sdcorejs-angular-components-preview.d.ts +181 -28
- package/types/sdcorejs-angular-components-side-drawer.d.ts +7 -1
- package/types/sdcorejs-angular-components-tab.d.ts +9 -2
- package/types/sdcorejs-angular-components-table.d.ts +8 -7
- package/types/sdcorejs-angular-components-tree.d.ts +24 -2
- package/types/sdcorejs-angular-components-upload-file.d.ts +5 -4
- package/types/sdcorejs-angular-components.d.ts +4 -0
- package/types/sdcorejs-angular-directives.d.ts +10 -8
- package/types/sdcorejs-angular-forms-autocomplete.d.ts +3 -4
- package/types/sdcorejs-angular-forms-checkbox.d.ts +4 -8
- package/types/sdcorejs-angular-forms-date-range.d.ts +6 -7
- package/types/sdcorejs-angular-forms-date.d.ts +2 -2
- package/types/sdcorejs-angular-forms-datetime.d.ts +2 -2
- package/types/sdcorejs-angular-forms-entity-picker.d.ts +128 -0
- package/types/sdcorejs-angular-forms-input-number.d.ts +1 -1
- package/types/sdcorejs-angular-forms-input.d.ts +74 -11
- package/types/sdcorejs-angular-forms-models.d.ts +86 -3
- package/types/sdcorejs-angular-forms-radio.d.ts +12 -8
- package/types/sdcorejs-angular-forms-switch.d.ts +4 -7
- package/types/sdcorejs-angular-forms-time-range.d.ts +98 -0
- package/types/sdcorejs-angular-forms-time.d.ts +117 -0
- package/types/sdcorejs-angular-forms-tree-select.d.ts +76 -0
- package/types/sdcorejs-angular-forms.d.ts +15 -5
- package/types/sdcorejs-angular-i18n.d.ts +72 -2
- package/types/sdcorejs-angular-interceptors.d.ts +5 -6
- package/types/sdcorejs-angular-modules-layout.d.ts +354 -17
- package/types/sdcorejs-angular-pipes.d.ts +2 -2
- package/types/sdcorejs-angular-services-api.d.ts +68 -24
- package/types/sdcorejs-angular-services-cache.d.ts +52 -16
- package/types/sdcorejs-angular-services-confirm.d.ts +3 -2
- package/types/sdcorejs-angular-services-docx.d.ts +2 -3
- package/types/sdcorejs-angular-services-loading.d.ts +16 -8
- package/types/sdcorejs-angular-services-persistence.d.ts +159 -0
- package/types/sdcorejs-angular-services-storage.d.ts +26 -8
- package/types/sdcorejs-angular-services-task.d.ts +104 -0
- package/types/sdcorejs-angular-services-unsaved-changes.d.ts +83 -0
- package/types/sdcorejs-angular-services-viewport.d.ts +42 -0
- package/types/sdcorejs-angular-services.d.ts +4 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { Signal, InjectionToken, PipeTransform } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import * as i1 from '@angular/router';
|
|
5
5
|
import { Params } from '@angular/router';
|
|
6
|
-
import { SdStorage
|
|
6
|
+
import { SdStorage } from '@sdcorejs/angular/services';
|
|
7
|
+
import { SdViewport } from '@sdcorejs/angular/services/viewport';
|
|
7
8
|
import * as _sdcorejs_angular_modules_layout from '@sdcorejs/angular/modules/layout';
|
|
8
9
|
import { MaybeAsync } from '@sdcorejs/utils/models';
|
|
10
|
+
import { Observable } from 'rxjs';
|
|
9
11
|
|
|
10
12
|
declare class HomeRoutingModule {
|
|
11
13
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HomeRoutingModule, never>;
|
|
@@ -56,22 +58,80 @@ interface SdLayoutChildrenMenu {
|
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
declare class SdLayoutStorageService {
|
|
59
|
-
private
|
|
60
|
-
isShowSidebar: SdStorage<boolean>;
|
|
61
|
-
menuLockStatus: SdStorage<boolean>;
|
|
62
|
-
lastActiveMenuGroupId: SdStorage<string>;
|
|
63
|
-
pinnedMenuGroup: SdStorage<SdLayoutChildrenMenu>;
|
|
64
|
-
|
|
61
|
+
#private;
|
|
62
|
+
readonly isShowSidebar: SdStorage<boolean>;
|
|
63
|
+
readonly menuLockStatus: SdStorage<boolean>;
|
|
64
|
+
readonly lastActiveMenuGroupId: SdStorage<string>;
|
|
65
|
+
readonly pinnedMenuGroup: SdStorage<SdLayoutChildrenMenu>;
|
|
66
|
+
readonly pinnedMenuKeys: SdStorage<string[]>;
|
|
67
|
+
readonly recentMenuKeys: SdStorage<string[]>;
|
|
68
|
+
readonly versionStates: SdStorage<Record<string, SdLayoutVersionState>>;
|
|
69
|
+
readPinnedMenuKeys(menus: SdLayoutMenu[]): string[];
|
|
70
|
+
writePinnedMenuKeys(keys: string[]): void;
|
|
71
|
+
readRecentMenuKeys(menus: SdLayoutMenu[], maximum?: number): string[];
|
|
72
|
+
writeRecentMenuKeys(keys: string[]): void;
|
|
73
|
+
readVersionState(version: 1 | 2 | 3): SdLayoutVersionState;
|
|
74
|
+
patchVersionState(version: 1 | 2 | 3, patch: SdLayoutVersionState): SdLayoutVersionState;
|
|
65
75
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutStorageService, never>;
|
|
66
76
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutStorageService>;
|
|
67
77
|
}
|
|
78
|
+
interface SdLayoutVersionState {
|
|
79
|
+
activeGroupKey?: string;
|
|
80
|
+
locked?: boolean;
|
|
81
|
+
collapsed?: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
type SdLayoutViewport = SdViewport;
|
|
85
|
+
declare const SD_LAYOUT_VIEWPORT: _angular_core.InjectionToken<SdViewport | null>;
|
|
86
|
+
/** @deprecated Prefer `SdViewportService` from `@sdcorejs/angular/services/viewport`. */
|
|
87
|
+
declare class SdLayoutResponsiveService {
|
|
88
|
+
#private;
|
|
89
|
+
readonly viewportWidth: _angular_core.Signal<number>;
|
|
90
|
+
isMobile(breakpoint: number): boolean;
|
|
91
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutResponsiveService, never>;
|
|
92
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutResponsiveService>;
|
|
93
|
+
}
|
|
68
94
|
|
|
95
|
+
/** Consumer-owned account action invoked without arguments by the shared user menu. */
|
|
96
|
+
type SdLayoutAccountAction = () => void | Promise<void>;
|
|
97
|
+
/** Notification badge source and the action that opens the consumer's notification experience. */
|
|
98
|
+
interface SdLayoutNotificationConfiguration {
|
|
99
|
+
/**
|
|
100
|
+
* Số lượng thông báo chưa đọc. Hỗ trợ giá trị tĩnh hoặc nguồn reactive dài hạn.
|
|
101
|
+
*/
|
|
102
|
+
count: number | Signal<number> | Observable<number>;
|
|
103
|
+
/**
|
|
104
|
+
* Tác vụ do consumer xử lý khi người dùng chọn thông báo.
|
|
105
|
+
*/
|
|
106
|
+
action: SdLayoutAccountAction;
|
|
107
|
+
}
|
|
69
108
|
interface ISdLayoutConfiguration {
|
|
70
109
|
homeUrl?: string;
|
|
110
|
+
mobileBreakpoint?: number;
|
|
71
111
|
sidebar: ISdSidebarConfiguration | (() => MaybeAsync<ISdSidebarConfiguration>);
|
|
72
112
|
userInfo: SdLayoutUserInfo | (() => MaybeAsync<SdLayoutUserInfo>);
|
|
73
|
-
signout:
|
|
74
|
-
changePassword?:
|
|
113
|
+
signout: SdLayoutAccountAction;
|
|
114
|
+
changePassword?: SdLayoutAccountAction;
|
|
115
|
+
/**
|
|
116
|
+
* Tác vụ chỉnh sửa hồ sơ do consumer cung cấp.
|
|
117
|
+
*/
|
|
118
|
+
updateProfile?: SdLayoutAccountAction;
|
|
119
|
+
/**
|
|
120
|
+
* Tác vụ mở thiết lập tài khoản do consumer cung cấp.
|
|
121
|
+
*/
|
|
122
|
+
setting?: SdLayoutAccountAction;
|
|
123
|
+
/**
|
|
124
|
+
* Cấu hình số lượng và tác vụ thông báo của tài khoản.
|
|
125
|
+
*/
|
|
126
|
+
notification?: SdLayoutNotificationConfiguration;
|
|
127
|
+
}
|
|
128
|
+
/** Optional role metadata rendered below the user's email when `text` is non-empty. */
|
|
129
|
+
interface SdLayoutUserRole {
|
|
130
|
+
text: string;
|
|
131
|
+
/** Icon name resolved by `SdIcon`. */
|
|
132
|
+
icon?: string;
|
|
133
|
+
/** CSS color applied to the role metadata. */
|
|
134
|
+
color?: string;
|
|
75
135
|
}
|
|
76
136
|
interface SdLayoutUserInfo {
|
|
77
137
|
/**
|
|
@@ -95,9 +155,24 @@ interface SdLayoutUserInfo {
|
|
|
95
155
|
* Hỗ trợ các định dạng: URL (http/https), chuỗi base64 (data:image), hoặc đường dẫn nội bộ.
|
|
96
156
|
*/
|
|
97
157
|
avatar?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Chức vụ hoặc vai trò hiển thị cùng thông tin người dùng.
|
|
160
|
+
* Không render khi `text` rỗng.
|
|
161
|
+
*/
|
|
162
|
+
role?: SdLayoutUserRole;
|
|
163
|
+
}
|
|
164
|
+
declare const DEFAULT_LAYOUT_MOBILE_BREAKPOINT = 1024;
|
|
165
|
+
interface SidebarConfigurationBase {
|
|
166
|
+
brandColor?: string;
|
|
167
|
+
brandLightColor?: string;
|
|
168
|
+
logoUrl?: string;
|
|
169
|
+
defaultTitle?: string;
|
|
170
|
+
pin?: {
|
|
171
|
+
enabled?: boolean;
|
|
172
|
+
};
|
|
98
173
|
}
|
|
99
|
-
type ISdSidebarConfiguration = SidebarConfigurationV1;
|
|
100
|
-
interface SidebarConfigurationV1 {
|
|
174
|
+
type ISdSidebarConfiguration = SidebarConfigurationV1 | SidebarConfigurationV2 | SidebarConfigurationV3;
|
|
175
|
+
interface SidebarConfigurationV1 extends SidebarConfigurationBase {
|
|
101
176
|
version: 1;
|
|
102
177
|
/**
|
|
103
178
|
* Màu brand chính.
|
|
@@ -130,12 +205,56 @@ interface SidebarConfigurationV1 {
|
|
|
130
205
|
enabled?: boolean;
|
|
131
206
|
};
|
|
132
207
|
}
|
|
208
|
+
interface SidebarConfigurationV2 extends SidebarConfigurationBase {
|
|
209
|
+
version: 2;
|
|
210
|
+
interaction?: 'click' | 'hover-lock';
|
|
211
|
+
primaryMenuIds?: string[];
|
|
212
|
+
}
|
|
213
|
+
interface SidebarConfigurationV3 extends SidebarConfigurationBase {
|
|
214
|
+
version: 3;
|
|
215
|
+
defaultCollapsed?: boolean;
|
|
216
|
+
recent?: {
|
|
217
|
+
enabled?: boolean;
|
|
218
|
+
maxItems?: number;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
interface ResolvedSidebarRecentConfiguration {
|
|
222
|
+
enabled: boolean;
|
|
223
|
+
maxItems: number;
|
|
224
|
+
}
|
|
225
|
+
declare function normalizeLayoutMobileBreakpoint(value: number | undefined): number;
|
|
226
|
+
declare function resolveSidebarV2Interaction(sidebar: SidebarConfigurationV2): 'click' | 'hover-lock';
|
|
227
|
+
declare function resolveSidebarV3Recent(sidebar: SidebarConfigurationV3): ResolvedSidebarRecentConfiguration;
|
|
228
|
+
declare function normalizeSidebarConfiguration(_sidebar: SidebarConfigurationV1): SidebarConfigurationV1;
|
|
229
|
+
declare function normalizeSidebarConfiguration(_sidebar: SidebarConfigurationV2): SidebarConfigurationV2;
|
|
230
|
+
declare function normalizeSidebarConfiguration(_sidebar: SidebarConfigurationV3): SidebarConfigurationV3;
|
|
133
231
|
declare const SD_LAYOUT_CONFIGURATION: InjectionToken<ISdLayoutConfiguration>;
|
|
134
232
|
|
|
233
|
+
declare class SdLayoutNavigationStateService {
|
|
234
|
+
#private;
|
|
235
|
+
readonly pinnedKeys: _angular_core.WritableSignal<string[]>;
|
|
236
|
+
readonly recentKeys: _angular_core.WritableSignal<string[]>;
|
|
237
|
+
readonly pinnedMenus: _angular_core.Signal<(_sdcorejs_angular_modules_layout.SdLayoutRootMenu | _sdcorejs_angular_modules_layout.SdLayoutChildrenMenu)[]>;
|
|
238
|
+
readonly recentMenus: _angular_core.Signal<(_sdcorejs_angular_modules_layout.SdLayoutRootMenu | _sdcorejs_angular_modules_layout.SdLayoutChildrenMenu)[]>;
|
|
239
|
+
hydrate(menus: SdLayoutMenu[], recentMaximum?: number): void;
|
|
240
|
+
togglePinned(menu: SdLayoutMenu): void;
|
|
241
|
+
recordRecent(menu: SdLayoutMenu, configuration: ResolvedSidebarRecentConfiguration): void;
|
|
242
|
+
patchVersionState(version: 1 | 2 | 3, patch: SdLayoutVersionState): void;
|
|
243
|
+
versionState(version: 1 | 2 | 3): SdLayoutVersionState;
|
|
244
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutNavigationStateService, never>;
|
|
245
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutNavigationStateService>;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
declare function getMenuStableKey(menu: SdLayoutMenu | null | undefined, ancestors?: string[]): string;
|
|
249
|
+
declare function searchMenuLeaves(menus: SdLayoutMenu[], query: string): SdLayoutRootMenu[];
|
|
250
|
+
declare function selectPrimaryMenuGroups(menus: SdLayoutMenu[], requestedIds: string[] | undefined, maximum?: number): SdLayoutMenu[];
|
|
251
|
+
declare function resolveMenuKeys(menus: SdLayoutMenu[], keys: string[]): (SdLayoutRootMenu | SdLayoutChildrenMenu)[];
|
|
252
|
+
declare function flattenMenuLeaves(menus: SdLayoutMenu[]): SdLayoutRootMenu[];
|
|
253
|
+
|
|
135
254
|
declare class SdLayoutService {
|
|
136
255
|
#private;
|
|
137
256
|
userInfo: _angular_core.WritableSignal<SdLayoutUserInfo | undefined>;
|
|
138
|
-
sidebar: _angular_core.WritableSignal<
|
|
257
|
+
sidebar: _angular_core.WritableSignal<ISdSidebarConfiguration | undefined>;
|
|
139
258
|
constructor();
|
|
140
259
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutService, never>;
|
|
141
260
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutService>;
|
|
@@ -156,8 +275,12 @@ declare class SdLayoutComponent {
|
|
|
156
275
|
menusInput: _angular_core.InputSignal<SdLayoutMenu[]>;
|
|
157
276
|
menus: _angular_core.Signal<SdLayoutMenu[]>;
|
|
158
277
|
userInfo: _angular_core.WritableSignal<_sdcorejs_angular_modules_layout.SdLayoutUserInfo | undefined>;
|
|
159
|
-
sidebar: _angular_core.WritableSignal<_sdcorejs_angular_modules_layout.
|
|
160
|
-
|
|
278
|
+
sidebar: _angular_core.WritableSignal<_sdcorejs_angular_modules_layout.ISdSidebarConfiguration | undefined>;
|
|
279
|
+
sidebarV1: _angular_core.Signal<SidebarConfigurationV1 | undefined>;
|
|
280
|
+
sidebarV2: _angular_core.Signal<SidebarConfigurationV2 | undefined>;
|
|
281
|
+
sidebarV3: _angular_core.Signal<SidebarConfigurationV3 | undefined>;
|
|
282
|
+
mobileBreakpoint: number;
|
|
283
|
+
isMobile: _angular_core.Signal<boolean>;
|
|
161
284
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutComponent, never>;
|
|
162
285
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdLayoutComponent, "sd-layout", never, { "menusInput": { "alias": "menus"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
163
286
|
}
|
|
@@ -213,11 +336,225 @@ declare class SidebarMobileOverlayComponent {
|
|
|
213
336
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarMobileOverlayComponent, "sd-sidebar-mobile-overlay", never, { "isShowSidebar": { "alias": "isShowSidebar"; "required": false; "isSignal": true; }; "menus": { "alias": "menus"; "required": true; "isSignal": true; }; "userInfo": { "alias": "userInfo"; "required": true; "isSignal": true; }; "sidebar": { "alias": "sidebar"; "required": true; "isSignal": true; }; }, { "showSideBar": "showSideBar"; "expandSideBar": "expandSideBar"; "popupUserMenuOpened": "popupUserMenuOpened"; "popupUserMenuClosed": "popupUserMenuClosed"; "titleMenuGroupChanged": "titleMenuGroupChanged"; }, never, never, true, never>;
|
|
214
337
|
}
|
|
215
338
|
|
|
339
|
+
interface SdLayoutMenuTreeNode {
|
|
340
|
+
menu: SdLayoutMenu;
|
|
341
|
+
key: string;
|
|
342
|
+
title: string;
|
|
343
|
+
depth: number;
|
|
344
|
+
paddingLeft: number;
|
|
345
|
+
isGroup: boolean;
|
|
346
|
+
isActive: boolean;
|
|
347
|
+
isPinned: boolean;
|
|
348
|
+
isPinVisible: boolean;
|
|
349
|
+
}
|
|
350
|
+
declare class SdLayoutMenuTreeComponent {
|
|
351
|
+
#private;
|
|
352
|
+
menus: _angular_core.InputSignal<SdLayoutMenu[]>;
|
|
353
|
+
query: _angular_core.InputSignal<string>;
|
|
354
|
+
activePath: _angular_core.InputSignal<string>;
|
|
355
|
+
pinnedKeys: _angular_core.InputSignal<string[]>;
|
|
356
|
+
showPin: _angular_core.InputSignal<boolean>;
|
|
357
|
+
pinVisibility: _angular_core.InputSignal<"hover" | "always">;
|
|
358
|
+
navigate: _angular_core.OutputEmitterRef<SdLayoutRootMenu>;
|
|
359
|
+
togglePinned: _angular_core.OutputEmitterRef<SdLayoutMenu>;
|
|
360
|
+
nodes: _angular_core.Signal<SdLayoutMenuTreeNode[]>;
|
|
361
|
+
constructor();
|
|
362
|
+
onNavigate(menu: SdLayoutMenu): void;
|
|
363
|
+
onTogglePinned(event: MouseEvent, menu: SdLayoutMenu): void;
|
|
364
|
+
onPinHoverStart(key: string): void;
|
|
365
|
+
onPinHoverEnd(key: string): void;
|
|
366
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutMenuTreeComponent, never>;
|
|
367
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdLayoutMenuTreeComponent, "sd-layout-menu-tree", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "activePath": { "alias": "activePath"; "required": false; "isSignal": true; }; "pinnedKeys": { "alias": "pinnedKeys"; "required": false; "isSignal": true; }; "showPin": { "alias": "showPin"; "required": false; "isSignal": true; }; "pinVisibility": { "alias": "pinVisibility"; "required": false; "isSignal": true; }; }, { "navigate": "navigate"; "togglePinned": "togglePinned"; }, never, never, true, never>;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
declare class SdLayoutUserMenuComponent {
|
|
371
|
+
#private;
|
|
372
|
+
private readonly trigger;
|
|
373
|
+
private readonly menu;
|
|
374
|
+
userInfo: _angular_core.InputSignal<SdLayoutUserInfo>;
|
|
375
|
+
signout: _angular_core.InputSignal<SdLayoutAccountAction | undefined>;
|
|
376
|
+
changePassword: _angular_core.InputSignal<SdLayoutAccountAction | undefined>;
|
|
377
|
+
updateProfile: _angular_core.InputSignal<SdLayoutAccountAction | undefined>;
|
|
378
|
+
setting: _angular_core.InputSignal<SdLayoutAccountAction | undefined>;
|
|
379
|
+
notification: _angular_core.InputSignal<SdLayoutNotificationConfiguration | undefined>;
|
|
380
|
+
compact: _angular_core.InputSignal<boolean>;
|
|
381
|
+
presentation: _angular_core.InputSignal<"disclosure" | "mobile" | "mobile-inline">;
|
|
382
|
+
opened: _angular_core.OutputEmitterRef<void>;
|
|
383
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
384
|
+
isOpen: _angular_core.WritableSignal<boolean>;
|
|
385
|
+
avatar: _angular_core.Signal<string | undefined>;
|
|
386
|
+
displayName: _angular_core.Signal<string>;
|
|
387
|
+
role: _angular_core.Signal<{
|
|
388
|
+
text: string;
|
|
389
|
+
icon?: string;
|
|
390
|
+
color?: string;
|
|
391
|
+
} | undefined>;
|
|
392
|
+
signoutAction: _angular_core.Signal<SdLayoutAccountAction | undefined>;
|
|
393
|
+
changePasswordAction: _angular_core.Signal<SdLayoutAccountAction | undefined>;
|
|
394
|
+
updateProfileAction: _angular_core.Signal<SdLayoutAccountAction | undefined>;
|
|
395
|
+
settingAction: _angular_core.Signal<SdLayoutAccountAction | undefined>;
|
|
396
|
+
notificationConfiguration: _angular_core.Signal<SdLayoutNotificationConfiguration | undefined>;
|
|
397
|
+
notificationAction: _angular_core.Signal<SdLayoutAccountAction | undefined>;
|
|
398
|
+
notificationCount: _angular_core.Signal<number>;
|
|
399
|
+
notificationBadge: _angular_core.Signal<string | undefined>;
|
|
400
|
+
constructor();
|
|
401
|
+
open(): void;
|
|
402
|
+
toggle(): void;
|
|
403
|
+
close(restoreFocus?: boolean): void;
|
|
404
|
+
onMenuKeydown(event: KeyboardEvent): void;
|
|
405
|
+
runChangePassword(): void;
|
|
406
|
+
runSignout(): void;
|
|
407
|
+
runUpdateProfile(): void;
|
|
408
|
+
runSetting(): void;
|
|
409
|
+
runNotification(): void;
|
|
410
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutUserMenuComponent, never>;
|
|
411
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdLayoutUserMenuComponent, "sd-layout-user-menu", never, { "userInfo": { "alias": "userInfo"; "required": true; "isSignal": true; }; "signout": { "alias": "signout"; "required": false; "isSignal": true; }; "changePassword": { "alias": "changePassword"; "required": false; "isSignal": true; }; "updateProfile": { "alias": "updateProfile"; "required": false; "isSignal": true; }; "setting": { "alias": "setting"; "required": false; "isSignal": true; }; "notification": { "alias": "notification"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "presentation": { "alias": "presentation"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
interface SidebarV2RailItem {
|
|
415
|
+
menu: SdLayoutMenu;
|
|
416
|
+
key: string;
|
|
417
|
+
title: string;
|
|
418
|
+
}
|
|
419
|
+
declare class SidebarV2Component {
|
|
420
|
+
#private;
|
|
421
|
+
menus: _angular_core.InputSignal<SdLayoutMenu[]>;
|
|
422
|
+
userInfo: _angular_core.InputSignal<SdLayoutUserInfo>;
|
|
423
|
+
sidebar: _angular_core.InputSignal<SidebarConfigurationV2>;
|
|
424
|
+
activeGroupKey: _angular_core.WritableSignal<string>;
|
|
425
|
+
isFlyoutOpen: _angular_core.WritableSignal<boolean>;
|
|
426
|
+
isFlyoutLocked: _angular_core.WritableSignal<boolean>;
|
|
427
|
+
searchText: _angular_core.WritableSignal<string>;
|
|
428
|
+
activePath: _angular_core.WritableSignal<string>;
|
|
429
|
+
interaction: _angular_core.Signal<"click" | "hover-lock">;
|
|
430
|
+
railItems: _angular_core.Signal<SidebarV2RailItem[]>;
|
|
431
|
+
activeGroup: _angular_core.Signal<SdLayoutMenu | undefined>;
|
|
432
|
+
contextMenus: _angular_core.Signal<SdLayoutMenu[]>;
|
|
433
|
+
pinnedKeys: _angular_core.WritableSignal<string[]>;
|
|
434
|
+
constructor();
|
|
435
|
+
selectGroup(menu: SdLayoutMenu): void;
|
|
436
|
+
previewGroup(menu: SdLayoutMenu): void;
|
|
437
|
+
leaveFlyout(): void;
|
|
438
|
+
closeFromBackdrop(): void;
|
|
439
|
+
closeFromEscape(): void;
|
|
440
|
+
closeFromNavigation(): void;
|
|
441
|
+
onNavigate(menu: SdLayoutMenu): void;
|
|
442
|
+
onTogglePinned(menu: SdLayoutMenu): void;
|
|
443
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarV2Component, never>;
|
|
444
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarV2Component, "sidebar-v2", 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>;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
declare class SidebarMobileV2Component {
|
|
448
|
+
#private;
|
|
449
|
+
menus: _angular_core.InputSignal<SdLayoutMenu[]>;
|
|
450
|
+
userInfo: _angular_core.InputSignal<SdLayoutUserInfo>;
|
|
451
|
+
sidebar: _angular_core.InputSignal<SidebarConfigurationV2>;
|
|
452
|
+
primaryMenus: _angular_core.Signal<SdLayoutMenu[]>;
|
|
453
|
+
overflowMenus: _angular_core.Signal<SdLayoutMenu[]>;
|
|
454
|
+
isSheetOpen: _angular_core.WritableSignal<boolean>;
|
|
455
|
+
sheetGroupKey: _angular_core.WritableSignal<string>;
|
|
456
|
+
sheetTitle: _angular_core.WritableSignal<string>;
|
|
457
|
+
sheetMenus: _angular_core.WritableSignal<SdLayoutMenu[]>;
|
|
458
|
+
searchText: _angular_core.WritableSignal<string>;
|
|
459
|
+
activePath: _angular_core.WritableSignal<string>;
|
|
460
|
+
pinnedKeys: _angular_core.WritableSignal<string[]>;
|
|
461
|
+
constructor();
|
|
462
|
+
openMore(trigger?: EventTarget | null): void;
|
|
463
|
+
activateMenu(menu: SdLayoutMenu, trigger?: EventTarget | null): void;
|
|
464
|
+
closeSheet(restoreFocus?: boolean): void;
|
|
465
|
+
onSheetKeydown(event: KeyboardEvent): void;
|
|
466
|
+
onNavigate(menu: SdLayoutMenu): void;
|
|
467
|
+
onTogglePinned(menu: SdLayoutMenu): void;
|
|
468
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarMobileV2Component, never>;
|
|
469
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarMobileV2Component, "sidebar-mobile-v2", 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>;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
declare class SidebarV3Component {
|
|
473
|
+
#private;
|
|
474
|
+
menus: _angular_core.InputSignal<SdLayoutMenu[]>;
|
|
475
|
+
userInfo: _angular_core.InputSignal<SdLayoutUserInfo>;
|
|
476
|
+
sidebar: _angular_core.InputSignal<SidebarConfigurationV3>;
|
|
477
|
+
isCollapsed: _angular_core.WritableSignal<boolean>;
|
|
478
|
+
searchText: _angular_core.WritableSignal<string>;
|
|
479
|
+
activePath: _angular_core.WritableSignal<string>;
|
|
480
|
+
searchResults: _angular_core.Signal<SdLayoutRootMenu[]>;
|
|
481
|
+
recentConfiguration: _angular_core.Signal<_sdcorejs_angular_modules_layout.ResolvedSidebarRecentConfiguration>;
|
|
482
|
+
pinnedKeys: _angular_core.WritableSignal<string[]>;
|
|
483
|
+
pinnedMenus: _angular_core.Signal<(SdLayoutRootMenu | _sdcorejs_angular_modules_layout.SdLayoutChildrenMenu)[]>;
|
|
484
|
+
recentMenus: _angular_core.Signal<(SdLayoutRootMenu | _sdcorejs_angular_modules_layout.SdLayoutChildrenMenu)[]>;
|
|
485
|
+
collapsedItems: _angular_core.Signal<{
|
|
486
|
+
menu: SdLayoutMenu;
|
|
487
|
+
key: string;
|
|
488
|
+
title: string;
|
|
489
|
+
}[]>;
|
|
490
|
+
constructor();
|
|
491
|
+
toggleCollapsed(): void;
|
|
492
|
+
activateCollapsedMenu(menu: SdLayoutMenu): void;
|
|
493
|
+
navigateMenu(menu: SdLayoutMenu): void;
|
|
494
|
+
onTogglePinned(menu: SdLayoutMenu): void;
|
|
495
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarV3Component, never>;
|
|
496
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarV3Component, "sidebar-v3", 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>;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
declare class SidebarMobileV3Component {
|
|
500
|
+
#private;
|
|
501
|
+
private readonly trigger;
|
|
502
|
+
menus: _angular_core.InputSignal<SdLayoutMenu[]>;
|
|
503
|
+
userInfo: _angular_core.InputSignal<SdLayoutUserInfo>;
|
|
504
|
+
sidebar: _angular_core.InputSignal<SidebarConfigurationV3>;
|
|
505
|
+
isDrawerOpen: _angular_core.WritableSignal<boolean>;
|
|
506
|
+
searchText: _angular_core.WritableSignal<string>;
|
|
507
|
+
activePath: _angular_core.WritableSignal<string>;
|
|
508
|
+
searchResults: _angular_core.Signal<SdLayoutRootMenu[]>;
|
|
509
|
+
recentConfiguration: _angular_core.Signal<_sdcorejs_angular_modules_layout.ResolvedSidebarRecentConfiguration>;
|
|
510
|
+
pinnedKeys: _angular_core.WritableSignal<string[]>;
|
|
511
|
+
pinnedMenus: _angular_core.Signal<(SdLayoutRootMenu | _sdcorejs_angular_modules_layout.SdLayoutChildrenMenu)[]>;
|
|
512
|
+
recentMenus: _angular_core.Signal<(SdLayoutRootMenu | _sdcorejs_angular_modules_layout.SdLayoutChildrenMenu)[]>;
|
|
513
|
+
constructor();
|
|
514
|
+
openDrawer(trigger?: EventTarget | null): void;
|
|
515
|
+
closeFromBackdrop(): void;
|
|
516
|
+
closeFromEscape(): void;
|
|
517
|
+
closeFromNavigation(): void;
|
|
518
|
+
onDrawerKeydown(event: KeyboardEvent): void;
|
|
519
|
+
navigateMenu(menu: SdLayoutMenu): void;
|
|
520
|
+
onTogglePinned(menu: SdLayoutMenu): void;
|
|
521
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarMobileV3Component, never>;
|
|
522
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarMobileV3Component, "sidebar-mobile-v3", 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>;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
declare class MenuPipe implements PipeTransform {
|
|
526
|
+
#private;
|
|
527
|
+
private permissionService;
|
|
528
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
529
|
+
constructor(...args: unknown[]);
|
|
530
|
+
transform(menus: SdLayoutMenu[]): SdLayoutMenu[];
|
|
531
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuPipe, never>;
|
|
532
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<MenuPipe, "menu", true>;
|
|
533
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MenuPipe>;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
declare class MenuFocusPipe implements PipeTransform {
|
|
537
|
+
#private;
|
|
538
|
+
transform(routePath: string, menuItem: SdLayoutMenu): boolean;
|
|
539
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuFocusPipe, never>;
|
|
540
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<MenuFocusPipe, "menuFocus", true>;
|
|
541
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MenuFocusPipe>;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
declare class HighlightSearchPipe implements PipeTransform {
|
|
545
|
+
#private;
|
|
546
|
+
transform(value: string, keyword: string, args?: {
|
|
547
|
+
color?: string;
|
|
548
|
+
}): string;
|
|
549
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HighlightSearchPipe, never>;
|
|
550
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<HighlightSearchPipe, "highLightSearch", true>;
|
|
551
|
+
}
|
|
552
|
+
|
|
216
553
|
declare class SdLayoutModule {
|
|
217
554
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutModule, never>;
|
|
218
555
|
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<SdLayoutModule, never, [typeof i1.RouterModule], never>;
|
|
219
556
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<SdLayoutModule>;
|
|
220
557
|
}
|
|
221
558
|
|
|
222
|
-
export { ForbiddenModule, HomeModule, NotFoundModule, SD_LAYOUT_CONFIGURATION, SdLayoutComponent, SdLayoutModule, SdLayoutService, SdLayoutStorageService, SdPageComponent, SidebarMobileOverlayComponent, SidebarMobileV1Component };
|
|
223
|
-
export type { ISdLayoutConfiguration, ISdSidebarConfiguration, Menus, SdLayoutChildrenMenu, SdLayoutMenu, SdLayoutRootMenu, SdLayoutUserInfo, SidebarConfigurationV1 };
|
|
559
|
+
export { DEFAULT_LAYOUT_MOBILE_BREAKPOINT, ForbiddenModule, HighlightSearchPipe, HomeModule, MenuFocusPipe, MenuPipe, NotFoundModule, SD_LAYOUT_CONFIGURATION, SD_LAYOUT_VIEWPORT, SdLayoutComponent, SdLayoutMenuTreeComponent, SdLayoutModule, SdLayoutNavigationStateService, SdLayoutResponsiveService, SdLayoutService, SdLayoutStorageService, SdLayoutUserMenuComponent, SdPageComponent, SidebarMobileOverlayComponent, SidebarMobileV1Component, SidebarMobileV2Component, SidebarMobileV3Component, SidebarV2Component, SidebarV3Component, flattenMenuLeaves, getMenuStableKey, normalizeLayoutMobileBreakpoint, normalizeSidebarConfiguration, resolveMenuKeys, resolveSidebarV2Interaction, resolveSidebarV3Recent, searchMenuLeaves, selectPrimaryMenuGroups };
|
|
560
|
+
export type { ISdLayoutConfiguration, ISdSidebarConfiguration, Menus, ResolvedSidebarRecentConfiguration, SdLayoutAccountAction, SdLayoutChildrenMenu, SdLayoutMenu, SdLayoutNotificationConfiguration, SdLayoutRootMenu, SdLayoutUserInfo, SdLayoutUserRole, SdLayoutVersionState, SdLayoutViewport, SidebarConfigurationBase, SidebarConfigurationV1, SidebarConfigurationV2, SidebarConfigurationV3 };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { PipeTransform } from '@angular/core';
|
|
3
3
|
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
4
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
5
4
|
import { Observable } from 'rxjs';
|
|
6
5
|
|
|
7
6
|
declare class SdFormatDatePipe implements PipeTransform {
|
|
@@ -28,7 +27,8 @@ declare class SdFormatNumberPipe implements PipeTransform {
|
|
|
28
27
|
|
|
29
28
|
declare class SdSafeHtmlPipe implements PipeTransform {
|
|
30
29
|
private sanitizer;
|
|
31
|
-
|
|
30
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
31
|
+
constructor(...args: unknown[]);
|
|
32
32
|
transform(html: string | number | undefined | null): _angular_platform_browser.SafeHtml | undefined;
|
|
33
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdSafeHtmlPipe, never>;
|
|
34
34
|
static ɵpipe: i0.ɵɵPipeDeclaration<SdSafeHtmlPipe, "sdSafeHtml", true>;
|
|
@@ -1,62 +1,106 @@
|
|
|
1
|
-
import { HttpRequest, HttpResponse, HttpErrorResponse, HttpClient, HttpInterceptor, HttpHandler, HttpEvent } from '@angular/common/http';
|
|
1
|
+
import { HttpRequest, HttpResponse, HttpErrorResponse, HttpHeaders, HttpContext, HttpParams, HttpClient, HttpInterceptor, HttpHandler, HttpEvent } from '@angular/common/http';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { InjectionToken } from '@angular/core';
|
|
4
4
|
import { SdCacheOption } from '@sdcorejs/angular/services/cache';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
|
|
7
|
+
type SdApiResponseType = 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
8
|
+
type SdApiBivariantCallback<TArgument, TResult> = {
|
|
9
|
+
bivarianceHack(argument: TArgument): TResult;
|
|
10
|
+
}['bivarianceHack'];
|
|
11
|
+
interface SdApiHttpOption {
|
|
12
|
+
headers?: HttpHeaders | Record<string, string | string[]>;
|
|
13
|
+
context?: HttpContext;
|
|
14
|
+
params?: HttpParams | Record<string, string | number | boolean | readonly (string | number | boolean)[]>;
|
|
15
|
+
observe?: 'body';
|
|
16
|
+
reportProgress?: boolean;
|
|
17
|
+
responseType?: SdApiResponseType;
|
|
18
|
+
withCredentials?: boolean;
|
|
19
|
+
transferCache?: {
|
|
20
|
+
includeHeaders?: string[];
|
|
21
|
+
} | boolean;
|
|
22
|
+
}
|
|
23
|
+
interface SdApiRetryOption {
|
|
24
|
+
/** Number of retries after the initial request. Values are clamped to a finite safe limit. */
|
|
25
|
+
attempts: number;
|
|
26
|
+
/** Delay before the first retry. Defaults to 0. */
|
|
27
|
+
delayMs?: number;
|
|
28
|
+
/** Multiplier applied to each subsequent delay. Defaults to 1. */
|
|
29
|
+
backoff?: number;
|
|
30
|
+
/** Overrides the default transient HTTP-status predicate. `attempt` is one-based. */
|
|
31
|
+
retryWhen?: (error: unknown, attempt: number) => boolean;
|
|
32
|
+
/** Required to retry POST, PUT, PATCH, or DELETE. */
|
|
33
|
+
mutations?: boolean;
|
|
34
|
+
}
|
|
7
35
|
interface SdApiOption {
|
|
8
36
|
cacheOption?: SdCacheOption;
|
|
9
37
|
timeout?: number;
|
|
38
|
+
/** Cancels only this caller; a shared HTTP request continues while another caller remains. */
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
/** Enables request deduplication. Defaults to true for GET and false for mutations. */
|
|
41
|
+
dedupe?: boolean;
|
|
42
|
+
/** Keeps a successful dedupe result replayable for this duration. Defaults to 1000ms. */
|
|
43
|
+
dedupeWindowMs?: number;
|
|
44
|
+
/** Opt-in bounded retry policy. The default is no retries. */
|
|
45
|
+
retry?: SdApiRetryOption;
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Use `dedupe`. When both are provided, `dedupe` takes precedence.
|
|
48
|
+
* Explicit `true` remains a compatibility opt-in for mutation deduplication.
|
|
49
|
+
*/
|
|
10
50
|
autoCache?: boolean;
|
|
11
51
|
}
|
|
12
|
-
type
|
|
13
|
-
type
|
|
14
|
-
type
|
|
15
|
-
type
|
|
16
|
-
type
|
|
17
|
-
type
|
|
18
|
-
type HttpDeleteOption = Parameters<HttpClient['delete']>[1];
|
|
19
|
-
type SdDeleteOption = HttpDeleteOption & SdApiOption;
|
|
52
|
+
type SdGetOption = SdApiHttpOption & SdApiOption;
|
|
53
|
+
type SdPostOption = SdApiHttpOption & SdApiOption;
|
|
54
|
+
type SdPutOption = SdApiHttpOption & SdApiOption;
|
|
55
|
+
type SdPatchOption = SdApiHttpOption & SdApiOption;
|
|
56
|
+
type SdDeleteOption = SdApiHttpOption & SdApiOption;
|
|
57
|
+
type SdApiRequestUpdate = Parameters<HttpRequest<unknown>['clone']>[0];
|
|
20
58
|
interface SdApiHandler {
|
|
21
59
|
/** Danh sách host URL mà handler này sẽ xử lý */
|
|
22
60
|
hosts: string[];
|
|
23
61
|
/** Can thiệp request: gắn header, token, transform body... */
|
|
24
|
-
intercept?:
|
|
62
|
+
intercept?: SdApiBivariantCallback<HttpRequest<unknown>, HttpRequest<unknown> | SdApiRequestUpdate>;
|
|
25
63
|
/** Hook chạy TRƯỚC khi gửi request (dùng để log, tracking...) */
|
|
26
|
-
beforeRemote?:
|
|
64
|
+
beforeRemote?: SdApiBivariantCallback<HttpRequest<unknown>, void | Promise<void>>;
|
|
27
65
|
/** Hook chạy SAU khi nhận response (xử lý lỗi, notify...) */
|
|
28
|
-
afterRemote?:
|
|
66
|
+
afterRemote?: SdApiBivariantCallback<HttpResponse<unknown> | HttpErrorResponse | Error, void | Promise<void>>;
|
|
29
67
|
/** Transform response body thành kiểu dữ liệu mong muốn */
|
|
30
|
-
mapResponse?: <
|
|
31
|
-
/** Timeout tính bằng milliseconds. Mặc định:
|
|
68
|
+
mapResponse?: SdApiBivariantCallback<unknown, unknown>;
|
|
69
|
+
/** Timeout tính bằng milliseconds. Mặc định: 60000 (60 giây) */
|
|
32
70
|
timeout?: number;
|
|
33
71
|
}
|
|
34
72
|
interface ISdApiConfiguration {
|
|
35
|
-
handlers
|
|
73
|
+
handlers?: SdApiHandler[];
|
|
36
74
|
}
|
|
37
75
|
declare const SD_API_CONFIG: InjectionToken<ISdApiConfiguration>;
|
|
76
|
+
/** @deprecated Use `SD_API_CONFIG`. This is the same injection token. */
|
|
38
77
|
declare const SD_API_CONFIGURATION: InjectionToken<ISdApiConfiguration>;
|
|
39
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Response generics intentionally default to `unknown` for type safety.
|
|
81
|
+
* Callers should specify `T`; migration guidance is tracked for Task 13.
|
|
82
|
+
*/
|
|
40
83
|
declare class SdApiService {
|
|
41
84
|
#private;
|
|
42
85
|
constructor();
|
|
43
86
|
get http(): HttpClient;
|
|
44
|
-
get: <T =
|
|
45
|
-
post: <T =
|
|
46
|
-
put: <T =
|
|
47
|
-
|
|
48
|
-
|
|
87
|
+
get: <T = unknown>(url: string, option?: SdGetOption) => Promise<T>;
|
|
88
|
+
post: <T = unknown>(url: string, body?: unknown, option?: SdPostOption) => Promise<T>;
|
|
89
|
+
put: <T = unknown>(url: string, body?: unknown, option?: SdPutOption) => Promise<T>;
|
|
90
|
+
patch: <T = unknown>(url: string, body?: unknown, option?: SdPatchOption) => Promise<T>;
|
|
91
|
+
delete: <T = unknown>(url: string, option?: SdDeleteOption) => Promise<T>;
|
|
92
|
+
upload: <T = unknown>(url: string, option?: {
|
|
49
93
|
extensions?: string[];
|
|
50
94
|
maxSizeInMb?: number;
|
|
51
|
-
}) => Promise<
|
|
52
|
-
uploadFile: (url: string, file: File) => Promise<
|
|
95
|
+
}) => Promise<T | null | undefined>;
|
|
96
|
+
uploadFile: <T = unknown>(url: string, file: File | null | undefined) => Promise<T | null>;
|
|
53
97
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdApiService, never>;
|
|
54
98
|
static ɵprov: i0.ɵɵInjectableDeclaration<SdApiService>;
|
|
55
99
|
}
|
|
56
100
|
|
|
57
101
|
declare class SdHttpInterceptor implements HttpInterceptor {
|
|
58
102
|
#private;
|
|
59
|
-
intercept(request: HttpRequest<
|
|
103
|
+
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
|
|
60
104
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdHttpInterceptor, never>;
|
|
61
105
|
static ɵprov: i0.ɵɵInjectableDeclaration<SdHttpInterceptor>;
|
|
62
106
|
}
|
|
@@ -68,4 +112,4 @@ declare class SdApiModule {
|
|
|
68
112
|
}
|
|
69
113
|
|
|
70
114
|
export { SD_API_CONFIG, SD_API_CONFIGURATION, SdApiModule, SdApiService, SdHttpInterceptor };
|
|
71
|
-
export type { ISdApiConfiguration, SdApiHandler, SdApiOption, SdDeleteOption, SdGetOption, SdPostOption, SdPutOption };
|
|
115
|
+
export type { ISdApiConfiguration, SdApiHandler, SdApiHttpOption, SdApiOption, SdApiRequestUpdate, SdApiResponseType, SdApiRetryOption, SdDeleteOption, SdGetOption, SdPatchOption, SdPostOption, SdPutOption };
|