@simplysm/angular 14.0.40 → 14.0.42
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/dist/controls/collapse/sd-collapse-icon.d.ts +2 -4
- package/dist/controls/collapse/sd-collapse-icon.d.ts.map +1 -1
- package/dist/controls/collapse/sd-collapse-icon.js +5 -5
- package/dist/core/app-structure/sd-app-structure.provider.d.ts +2 -2
- package/dist/core/app-structure/sd-app-structure.provider.d.ts.map +1 -1
- package/dist/core/app-structure/sd-app-structure.provider.js +4 -4
- package/dist/core/config/sd-local-storage.provider.d.ts +1 -1
- package/dist/core/config/sd-local-storage.provider.d.ts.map +1 -1
- package/dist/core/config/sd-local-storage.provider.js +4 -4
- package/dist/core/error-handler/sd-global-error-handler.plugin.d.ts +1 -1
- package/dist/core/error-handler/sd-global-error-handler.plugin.d.ts.map +1 -1
- package/dist/core/error-handler/sd-global-error-handler.plugin.js +3 -3
- package/dist/core/modal/sd-modal.d.ts +4 -3
- package/dist/core/modal/sd-modal.d.ts.map +1 -1
- package/dist/core/modal/sd-modal.js +14 -12
- package/dist/core/modal/sd-modal.provider.d.ts +1 -0
- package/dist/core/modal/sd-modal.provider.d.ts.map +1 -1
- package/dist/core/routing/injectViewTitleSignal.js +3 -3
- package/dist/core/routing/injectViewTypeSignal.js +2 -2
- package/dist/core/routing/sd-router-link.d.ts +1 -1
- package/dist/core/routing/sd-router-link.d.ts.map +1 -1
- package/dist/core/routing/sd-router-link.js +4 -4
- package/dist/core/routing/setupCanDeactivate.js +3 -3
- package/dist/core/service-client/sd-service-client-factory.provider.d.ts +2 -2
- package/dist/core/service-client/sd-service-client-factory.provider.d.ts.map +1 -1
- package/dist/core/service-client/sd-service-client-factory.provider.js +4 -4
- package/dist/core/shared-data/sd-shared-data.provider.d.ts +4 -3
- package/dist/core/shared-data/sd-shared-data.provider.d.ts.map +1 -1
- package/dist/core/shared-data/sd-shared-data.provider.js +4 -4
- package/dist/core/toast/sd-toast.provider.d.ts +3 -3
- package/dist/core/toast/sd-toast.provider.d.ts.map +1 -1
- package/dist/core/toast/sd-toast.provider.js +2 -2
- package/dist/data/data-detail/sd-data-detail.base.d.ts +6 -4
- package/dist/data/data-detail/sd-data-detail.base.d.ts.map +1 -1
- package/dist/data/data-select-button/sd-data-select-button.base.d.ts +2 -2
- package/dist/data/data-select-button/sd-data-select-button.base.d.ts.map +1 -1
- package/dist/data/data-sheet/sd-data-sheet.d.ts.map +1 -1
- package/dist/data/data-sheet/sd-data-sheet.js +75 -43
- package/dist/data/sheet/sd-sheet-column-cell-template.d.ts +9 -0
- package/dist/data/sheet/sd-sheet-column-cell-template.d.ts.map +1 -0
- package/dist/data/sheet/sd-sheet-column-cell-template.js +17 -0
- package/dist/data/sheet/sd-sheet-column.d.ts +10 -7
- package/dist/data/sheet/sd-sheet-column.d.ts.map +1 -1
- package/dist/data/sheet/sd-sheet-column.js +10 -6
- package/dist/data/sheet/sd-sheet-config.modal.d.ts +1 -1
- package/dist/data/sheet/sd-sheet-config.modal.d.ts.map +1 -1
- package/dist/data/sheet/sd-sheet.d.ts +4 -3
- package/dist/data/sheet/sd-sheet.d.ts.map +1 -1
- package/dist/data/sheet/sd-sheet.js +61 -36
- package/dist/data/sheet/types.d.ts +2 -0
- package/dist/data/sheet/types.d.ts.map +1 -1
- package/dist/data/sheet/useSheetCellStyling.d.ts.map +1 -1
- package/dist/data/sheet/useSheetCellStyling.js +7 -1
- package/dist/data/sheet/useSheetLayoutEngine.d.ts.map +1 -1
- package/dist/data/sheet/useSheetLayoutEngine.js +2 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/layout/base-container/sd-base-container.d.ts +1 -1
- package/dist/layout/base-container/sd-base-container.d.ts.map +1 -1
- package/dist/layout/base-container/sd-base-container.js +2 -2
- package/package.json +6 -6
- package/src/controls/collapse/sd-collapse-icon.ts +2 -3
- package/src/core/app-structure/sd-app-structure.provider.ts +4 -4
- package/src/core/config/sd-local-storage.provider.ts +4 -4
- package/src/core/error-handler/sd-global-error-handler.plugin.ts +3 -3
- package/src/core/modal/sd-modal.provider.ts +1 -0
- package/src/core/modal/sd-modal.ts +10 -9
- package/src/core/routing/injectViewTitleSignal.ts +3 -3
- package/src/core/routing/injectViewTypeSignal.ts +2 -2
- package/src/core/routing/sd-router-link.ts +4 -4
- package/src/core/routing/setupCanDeactivate.ts +3 -3
- package/src/core/service-client/sd-service-client-factory.provider.ts +4 -4
- package/src/core/shared-data/sd-shared-data.provider.ts +5 -5
- package/src/core/toast/sd-toast.provider.ts +6 -6
- package/src/data/data-detail/sd-data-detail.base.ts +3 -3
- package/src/data/data-select-button/sd-data-select-button.base.ts +1 -1
- package/src/data/data-sheet/sd-data-sheet.ts +14 -5
- package/src/data/sheet/sd-sheet-column-cell-template.ts +17 -0
- package/src/data/sheet/sd-sheet-column.ts +12 -5
- package/src/data/sheet/sd-sheet.ts +14 -3
- package/src/data/sheet/types.ts +2 -0
- package/src/data/sheet/useSheetCellStyling.ts +5 -1
- package/src/data/sheet/useSheetLayoutEngine.ts +2 -0
- package/src/index.ts +2 -1
- package/src/layout/base-container/sd-base-container.ts +2 -2
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class SdCollapseIcon {
|
|
3
|
+
icon: import("@angular/core").InputSignal<string>;
|
|
3
4
|
open: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
4
5
|
openRotate: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
5
|
-
icons: {
|
|
6
|
-
tablerChevronRight: string;
|
|
7
|
-
};
|
|
8
6
|
transformStyle: import("@angular/core").Signal<string>;
|
|
9
7
|
transitionStyle: import("@angular/core").Signal<"transform 0.1s ease-out" | "transform 0.1s ease-in">;
|
|
10
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdCollapseIcon, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdCollapseIcon, "sd-collapse-icon", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "openRotate": { "alias": "openRotate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdCollapseIcon, "sd-collapse-icon", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "openRotate": { "alias": "openRotate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
12
10
|
}
|
|
13
11
|
//# sourceMappingURL=sd-collapse-icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-collapse-icon.d.ts","sourceRoot":"","sources":["../../../src/controls/collapse/sd-collapse-icon.ts"],"names":[],"mappings":";AAYA,qBAyBa,cAAc;IACzB,IAAI,qEAAiD;IACrD,UAAU,oEAA6C;IAEvD,
|
|
1
|
+
{"version":3,"file":"sd-collapse-icon.d.ts","sourceRoot":"","sources":["../../../src/controls/collapse/sd-collapse-icon.ts"],"names":[],"mappings":";AAYA,qBAyBa,cAAc;IACzB,IAAI,8CAA6B;IACjC,IAAI,qEAAiD;IACrD,UAAU,oEAA6C;IAEvD,cAAc,yCAEX;IAEH,eAAe,uFAEZ;yCAXQ,cAAc;2CAAd,cAAc;CAY1B"}
|
|
@@ -3,9 +3,9 @@ import { NgIcon } from "@ng-icons/core";
|
|
|
3
3
|
import { tablerChevronRight } from "@ng-icons/tabler-icons";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export class SdCollapseIcon {
|
|
6
|
+
icon = input(tablerChevronRight, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
6
7
|
open = input(false, { ...(ngDevMode ? { debugName: "open" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
7
8
|
openRotate = input(90, { ...(ngDevMode ? { debugName: "openRotate" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
8
|
-
icons = { tablerChevronRight };
|
|
9
9
|
transformStyle = computed(() => {
|
|
10
10
|
return this.open() ? `rotate(${this.openRotate()}deg)` : "";
|
|
11
11
|
}, ...(ngDevMode ? [{ debugName: "transformStyle" }] : /* istanbul ignore next */ []));
|
|
@@ -15,19 +15,19 @@ export class SdCollapseIcon {
|
|
|
15
15
|
static ɵfac = function SdCollapseIcon_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdCollapseIcon)(); };
|
|
16
16
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdCollapseIcon, selectors: [["sd-collapse-icon"]], hostVars: 4, hostBindings: function SdCollapseIcon_HostBindings(rf, ctx) { if (rf & 2) {
|
|
17
17
|
i0.ɵɵstyleProp("transform", ctx.transformStyle())("transition", ctx.transitionStyle());
|
|
18
|
-
} }, inputs: { open: [1, "open"], openRotate: [1, "openRotate"] }, decls: 1, vars: 1, consts: [[3, "svg"]], template: function SdCollapseIcon_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
} }, inputs: { icon: [1, "icon"], open: [1, "open"], openRotate: [1, "openRotate"] }, decls: 1, vars: 1, consts: [[3, "svg"]], template: function SdCollapseIcon_Template(rf, ctx) { if (rf & 1) {
|
|
19
19
|
i0.ɵɵelement(0, "ng-icon", 0);
|
|
20
20
|
} if (rf & 2) {
|
|
21
|
-
i0.ɵɵproperty("svg", ctx.
|
|
21
|
+
i0.ɵɵproperty("svg", ctx.icon());
|
|
22
22
|
} }, dependencies: [NgIcon], styles: ["sd-collapse-icon {\n display: inline-block;\n}\nsd-collapse-icon > ng-icon {\n display: block;\n}"], encapsulation: 2, changeDetection: 0 });
|
|
23
23
|
}
|
|
24
24
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdCollapseIcon, [{
|
|
25
25
|
type: Component,
|
|
26
26
|
args: [{ selector: "sd-collapse-icon", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [NgIcon], template: `
|
|
27
|
-
<ng-icon [svg]="
|
|
27
|
+
<ng-icon [svg]="icon()" />
|
|
28
28
|
`, host: {
|
|
29
29
|
"[style.transform]": "transformStyle()",
|
|
30
30
|
"[style.transition]": "transitionStyle()",
|
|
31
31
|
}, styles: ["sd-collapse-icon {\n display: inline-block;\n}\nsd-collapse-icon > ng-icon {\n display: block;\n}"] }]
|
|
32
|
-
}], null, { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], openRotate: [{ type: i0.Input, args: [{ isSignal: true, alias: "openRotate", required: false }] }] }); })();
|
|
32
|
+
}], null, { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], openRotate: [{ type: i0.Input, args: [{ isSignal: true, alias: "openRotate", required: false }] }] }); })();
|
|
33
33
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdCollapseIcon, { className: "SdCollapseIcon", filePath: "packages/angular/src/controls/collapse/sd-collapse-icon.ts", lineNumber: 38, forbidOrphanRendering: true }); })();
|
|
@@ -4,8 +4,8 @@ import type { SdFlatMenu } from "./sd-app-structure.types";
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare function injectPermsSignal<K extends string>(viewCodes: string[], keys: K[]): Signal<K[]>;
|
|
6
6
|
export declare class SdAppStructureProvider<TModule = unknown> {
|
|
7
|
-
private readonly
|
|
8
|
-
private readonly
|
|
7
|
+
private readonly _sdServiceClientFactory;
|
|
8
|
+
private readonly _sdAngularConfig;
|
|
9
9
|
readonly usableModules: import("@angular/core").WritableSignal<TModule[] | undefined>;
|
|
10
10
|
readonly permRecord: import("@angular/core").WritableSignal<Record<string, boolean> | undefined>;
|
|
11
11
|
readonly items: import("@angular/core").WritableSignal<AppStructureItem<TModule>[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-app-structure.provider.d.ts","sourceRoot":"","sources":["../../../src/core/app-structure/sd-app-structure.provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;;AAK3D,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAG/F;AAID,qBACa,sBAAsB,CAAC,OAAO,GAAG,OAAO;IACnD,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"sd-app-structure.provider.d.ts","sourceRoot":"","sources":["../../../src/core/app-structure/sd-app-structure.provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;;AAK3D,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAG/F;AAID,qBACa,sBAAsB,CAAC,OAAO,GAAG,OAAO;IACnD,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAA0C;IAClF,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmC;IAEpE,QAAQ,CAAC,aAAa,gEAA4C;IAClE,QAAQ,CAAC,UAAU,8EAA0D;IAC7E,QAAQ,CAAC,KAAK,sEAA2C;IAEnD,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASnD,WAAW,sDAET;IACF,eAAe,gCAEb;IAEF,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,GAAE,MAAM,EAAO;IAItF,kBAAkB,CAAC,QAAQ,EAAE,MAAM;IAInC,sBAAsB,CAAC,QAAQ,EAAE,MAAM;IAIvC,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE;yCApClE,sBAAsB;6CAAtB,sBAAsB;CA4ClC"}
|
|
@@ -10,16 +10,16 @@ export function injectPermsSignal(viewCodes, keys) {
|
|
|
10
10
|
// 권한은 모듈만 체크하고
|
|
11
11
|
// 메뉴는 모듈/권한 모두 체크함
|
|
12
12
|
export class SdAppStructureProvider {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
_sdServiceClientFactory = inject(SdServiceClientFactoryProvider);
|
|
14
|
+
_sdAngularConfig = inject(SdAngularConfigProvider);
|
|
15
15
|
usableModules = signal(undefined, ...(ngDevMode ? [{ debugName: "usableModules" }] : /* istanbul ignore next */ []));
|
|
16
16
|
permRecord = signal(undefined, ...(ngDevMode ? [{ debugName: "permRecord" }] : /* istanbul ignore next */ []));
|
|
17
17
|
items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
18
18
|
async initialize(serviceKey) {
|
|
19
|
-
const client = this.
|
|
19
|
+
const client = this._sdServiceClientFactory.get(serviceKey);
|
|
20
20
|
const svc = client.getService("AppStructure");
|
|
21
21
|
const itemsMap = await svc.getItems();
|
|
22
|
-
this.items.set((itemsMap[this.
|
|
22
|
+
this.items.set((itemsMap[this._sdAngularConfig.clientName] ?? []));
|
|
23
23
|
}
|
|
24
24
|
usableMenus = computed(() => SdAppStructureUtils.getMenus(this.items(), [], this.usableModules(), this.permRecord()), ...(ngDevMode ? [{ debugName: "usableMenus" }] : /* istanbul ignore next */ []));
|
|
25
25
|
usableFlatMenus = computed(() => SdAppStructureUtils.getFlatMenus(this.items(), this.usableModules(), this.permRecord()), ...(ngDevMode ? [{ debugName: "usableFlatMenus" }] : /* istanbul ignore next */ []));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class SdLocalStorageProvider<T> {
|
|
3
|
-
private readonly
|
|
3
|
+
private readonly _sdAngularConfig;
|
|
4
4
|
set<K extends keyof T & string>(key: K, value: T[K]): void;
|
|
5
5
|
get<K extends keyof T & string>(key: K): T[K] | undefined;
|
|
6
6
|
remove(key: keyof T & string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-local-storage.provider.d.ts","sourceRoot":"","sources":["../../../src/core/config/sd-local-storage.provider.ts"],"names":[],"mappings":";AAGA,qBACa,sBAAsB,CAAC,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"sd-local-storage.provider.d.ts","sourceRoot":"","sources":["../../../src/core/config/sd-local-storage.provider.ts"],"names":[],"mappings":";AAGA,qBACa,sBAAsB,CAAC,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmC;IAEpE,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAInD,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;IAUzD,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM;yCAjBjB,sBAAsB;6CAAtB,sBAAsB;CAoBlC"}
|
|
@@ -2,12 +2,12 @@ import { inject, Injectable } from "@angular/core";
|
|
|
2
2
|
import { SdAngularConfigProvider } from "./sd-angular-config.provider";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export class SdLocalStorageProvider {
|
|
5
|
-
|
|
5
|
+
_sdAngularConfig = inject(SdAngularConfigProvider);
|
|
6
6
|
set(key, value) {
|
|
7
|
-
localStorage.setItem(`${this.
|
|
7
|
+
localStorage.setItem(`${this._sdAngularConfig.clientName}.${key}`, JSON.stringify(value));
|
|
8
8
|
}
|
|
9
9
|
get(key) {
|
|
10
|
-
const json = localStorage.getItem(`${this.
|
|
10
|
+
const json = localStorage.getItem(`${this._sdAngularConfig.clientName}.${key}`);
|
|
11
11
|
if (json == null)
|
|
12
12
|
return undefined;
|
|
13
13
|
try {
|
|
@@ -18,7 +18,7 @@ export class SdLocalStorageProvider {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
remove(key) {
|
|
21
|
-
localStorage.removeItem(`${this.
|
|
21
|
+
localStorage.removeItem(`${this._sdAngularConfig.clientName}.${key}`);
|
|
22
22
|
}
|
|
23
23
|
static ɵfac = function SdLocalStorageProvider_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdLocalStorageProvider)(); };
|
|
24
24
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SdLocalStorageProvider, factory: SdLocalStorageProvider.ɵfac, providedIn: "root" });
|
|
@@ -2,7 +2,7 @@ import { ErrorHandler } from "@angular/core";
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SdGlobalErrorHandlerPlugin implements ErrorHandler {
|
|
4
4
|
private readonly _envInjector;
|
|
5
|
-
private readonly
|
|
5
|
+
private readonly _sdSystemLog;
|
|
6
6
|
private _hasDisplayedError;
|
|
7
7
|
handleError(event: any): false | undefined;
|
|
8
8
|
private _displayErrorMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-global-error-handler.plugin.d.ts","sourceRoot":"","sources":["../../../src/core/error-handler/sd-global-error-handler.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAIb,MAAM,eAAe,CAAC;;AAGvB,qBACa,0BAA2B,YAAW,YAAY;IAC7D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"sd-global-error-handler.plugin.d.ts","sourceRoot":"","sources":["../../../src/core/error-handler/sd-global-error-handler.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAIb,MAAM,eAAe,CAAC;;AAGvB,qBACa,0BAA2B,YAAW,YAAY;IAC7D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,kBAAkB,CAAS;IAEnC,WAAW,CAAC,KAAK,EAAE,GAAG;IA2EtB,OAAO,CAAC,oBAAoB;yCAhFjB,0BAA0B;6CAA1B,0BAA0B;CAwHtC"}
|
|
@@ -3,7 +3,7 @@ import { SdSystemLogProvider } from "../config/sd-system-log.provider";
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export class SdGlobalErrorHandlerPlugin {
|
|
5
5
|
_envInjector = inject(EnvironmentInjector);
|
|
6
|
-
|
|
6
|
+
_sdSystemLog = inject(SdSystemLogProvider);
|
|
7
7
|
_hasDisplayedError = false;
|
|
8
8
|
handleError(event) {
|
|
9
9
|
try {
|
|
@@ -34,7 +34,7 @@ export class SdGlobalErrorHandlerPlugin {
|
|
|
34
34
|
else if (event instanceof ErrorEvent) {
|
|
35
35
|
const { message, filename, lineno, colno, error } = event;
|
|
36
36
|
if (error == null) {
|
|
37
|
-
void this.
|
|
37
|
+
void this._sdSystemLog.writeAsync("warn", message);
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
40
|
let stack = "";
|
|
@@ -82,7 +82,7 @@ export class SdGlobalErrorHandlerPlugin {
|
|
|
82
82
|
return;
|
|
83
83
|
this._hasDisplayedError = true;
|
|
84
84
|
const paramLines = Object.keys(param).map((key) => key + ": " + param[key]);
|
|
85
|
-
void this.
|
|
85
|
+
void this._sdSystemLog.writeAsync("error", `[${title}]\n${paramLines.join("\n")}`);
|
|
86
86
|
const appRef = this._envInjector.get(ApplicationRef);
|
|
87
87
|
appRef.destroy();
|
|
88
88
|
const plainText = `[${title}]\n${paramLines.join("\n")}`;
|
|
@@ -3,8 +3,8 @@ import "@simplysm/core-browser";
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SdModal {
|
|
5
5
|
private readonly _elRef;
|
|
6
|
-
private readonly
|
|
7
|
-
private readonly
|
|
6
|
+
private readonly _sdActivatedModal;
|
|
7
|
+
private readonly _sdSystemConfig;
|
|
8
8
|
private readonly _errorHandler;
|
|
9
9
|
private readonly _focusTrap;
|
|
10
10
|
protected readonly tablerX = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M18 6l-12 12\"></path><path d=\"M6 6l12 12\"></path></svg>";
|
|
@@ -13,6 +13,7 @@ export declare class SdModal {
|
|
|
13
13
|
title: import("@angular/core").InputSignal<string>;
|
|
14
14
|
hideHeader: import("@angular/core").InputSignal<boolean>;
|
|
15
15
|
hideCloseButton: import("@angular/core").InputSignal<boolean>;
|
|
16
|
+
headerStyle: import("@angular/core").InputSignal<string | undefined>;
|
|
16
17
|
useCloseByBackdrop: import("@angular/core").InputSignal<boolean>;
|
|
17
18
|
useCloseByEscapeKey: import("@angular/core").InputSignal<boolean>;
|
|
18
19
|
float: import("@angular/core").InputSignal<boolean>;
|
|
@@ -40,6 +41,6 @@ export declare class SdModal {
|
|
|
40
41
|
private _saveConfig;
|
|
41
42
|
private _restoreConfig;
|
|
42
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdModal, never>;
|
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdModal, "sd-modal", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "hideHeader": { "alias": "hideHeader"; "required": false; "isSignal": true; }; "hideCloseButton": { "alias": "hideCloseButton"; "required": false; "isSignal": true; }; "useCloseByBackdrop": { "alias": "useCloseByBackdrop"; "required": false; "isSignal": true; }; "useCloseByEscapeKey": { "alias": "useCloseByEscapeKey"; "required": false; "isSignal": true; }; "float": { "alias": "float"; "required": false; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "movable": { "alias": "movable"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "minHeightPx": { "alias": "minHeightPx"; "required": false; "isSignal": true; }; "minWidthPx": { "alias": "minWidthPx"; "required": false; "isSignal": true; }; "heightPx": { "alias": "heightPx"; "required": false; "isSignal": true; }; "widthPx": { "alias": "widthPx"; "required": false; "isSignal": true; }; "actionTplRef": { "alias": "actionTplRef"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closeRequest": "closeRequest"; }, never, ["*"], true, never>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdModal, "sd-modal", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "hideHeader": { "alias": "hideHeader"; "required": false; "isSignal": true; }; "hideCloseButton": { "alias": "hideCloseButton"; "required": false; "isSignal": true; }; "headerStyle": { "alias": "headerStyle"; "required": false; "isSignal": true; }; "useCloseByBackdrop": { "alias": "useCloseByBackdrop"; "required": false; "isSignal": true; }; "useCloseByEscapeKey": { "alias": "useCloseByEscapeKey"; "required": false; "isSignal": true; }; "float": { "alias": "float"; "required": false; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "movable": { "alias": "movable"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "minHeightPx": { "alias": "minHeightPx"; "required": false; "isSignal": true; }; "minWidthPx": { "alias": "minWidthPx"; "required": false; "isSignal": true; }; "heightPx": { "alias": "heightPx"; "required": false; "isSignal": true; }; "widthPx": { "alias": "widthPx"; "required": false; "isSignal": true; }; "actionTplRef": { "alias": "actionTplRef"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closeRequest": "closeRequest"; }, never, ["*"], true, never>;
|
|
44
45
|
}
|
|
45
46
|
//# sourceMappingURL=sd-modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-modal.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAC;AAQvB,OAAO,wBAAwB,CAAC;;AAEhC,qBAuQa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAC1D,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"sd-modal.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAC;AAQvB,OAAO,wBAAwB,CAAC;;AAEhC,qBAuQa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAC1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAwD;IAC1F,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsD;IACtF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAwB;IACtD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;IAEhD,SAAS,CAAC,QAAQ,CAAC,OAAO,yVAAW;IAErC,IAAI,+CAAgB;IACpB,GAAG,0DAAwC;IAC3C,KAAK,8CAAa;IAClB,UAAU,+CAAgB;IAC1B,eAAe,+CAAgB;IAC/B,WAAW,0DAAwC;IACnD,kBAAkB,+CAAe;IACjC,mBAAmB,+CAAe;IAClC,KAAK,+CAAgB;IACrB,IAAI,+CAAgB;IACpB,SAAS,+CAAgB;IACzB,OAAO,+CAAgB;IACvB,QAAQ,gFAA8D;IACtE,WAAW,0DAAwC;IACnD,UAAU,0DAAwC;IAClD,QAAQ,0DAAwC;IAChD,OAAO,0DAAwC;IAC/C,YAAY,oEAAkD;IAE9D,YAAY,iDAAkB;IAE9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAKzB;;IAqCH,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAKvD,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAO1C,eAAe,IAAI,IAAI;IAKvB,kBAAkB,IAAI,IAAI;IAI1B,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAS3C,aAAa,IAAI,IAAI;IAIrB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,YAAY;YAIN,WAAW;YAgBX,cAAc;yCAtJjB,OAAO;2CAAP,OAAO;CAsKnB"}
|
|
@@ -41,6 +41,7 @@ function SdModal_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
41
41
|
i0.ɵɵelementEnd();
|
|
42
42
|
} if (rf & 2) {
|
|
43
43
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
44
|
+
i0.ɵɵstyleMap(ctx_r1.headerStyle());
|
|
44
45
|
i0.ɵɵadvance(2);
|
|
45
46
|
i0.ɵɵtextInterpolate(ctx_r1.title());
|
|
46
47
|
i0.ɵɵadvance();
|
|
@@ -77,8 +78,8 @@ function SdModal_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
77
78
|
} }
|
|
78
79
|
export class SdModal {
|
|
79
80
|
_elRef = inject((ElementRef));
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
_sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
82
|
+
_sdSystemConfig = inject(SdSystemConfigProvider, { optional: true });
|
|
82
83
|
_errorHandler = inject(ErrorHandler);
|
|
83
84
|
_focusTrap = injectFocusTrap();
|
|
84
85
|
tablerX = tablerX;
|
|
@@ -87,6 +88,7 @@ export class SdModal {
|
|
|
87
88
|
title = input("", ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
88
89
|
hideHeader = input(false, ...(ngDevMode ? [{ debugName: "hideHeader" }] : /* istanbul ignore next */ []));
|
|
89
90
|
hideCloseButton = input(false, ...(ngDevMode ? [{ debugName: "hideCloseButton" }] : /* istanbul ignore next */ []));
|
|
91
|
+
headerStyle = input(undefined, ...(ngDevMode ? [{ debugName: "headerStyle" }] : /* istanbul ignore next */ []));
|
|
90
92
|
useCloseByBackdrop = input(true, ...(ngDevMode ? [{ debugName: "useCloseByBackdrop" }] : /* istanbul ignore next */ []));
|
|
91
93
|
useCloseByEscapeKey = input(true, ...(ngDevMode ? [{ debugName: "useCloseByEscapeKey" }] : /* istanbul ignore next */ []));
|
|
92
94
|
float = input(false, ...(ngDevMode ? [{ debugName: "float" }] : /* istanbul ignore next */ []));
|
|
@@ -134,7 +136,7 @@ export class SdModal {
|
|
|
134
136
|
// key 기반 설정 복원
|
|
135
137
|
effect(() => {
|
|
136
138
|
const k = this.key();
|
|
137
|
-
if (k === undefined || this.
|
|
139
|
+
if (k === undefined || this._sdSystemConfig == null)
|
|
138
140
|
return;
|
|
139
141
|
void this._restoreConfig(k).catch((err) => this._errorHandler.handleError(err));
|
|
140
142
|
});
|
|
@@ -173,7 +175,7 @@ export class SdModal {
|
|
|
173
175
|
this._bringToFront();
|
|
174
176
|
}
|
|
175
177
|
_requestClose() {
|
|
176
|
-
if (this.
|
|
178
|
+
if (this._sdActivatedModal !== null && !this._sdActivatedModal.canDeactivateFn()) {
|
|
177
179
|
return;
|
|
178
180
|
}
|
|
179
181
|
void this._saveConfig().catch((err) => this._errorHandler.handleError(err));
|
|
@@ -201,7 +203,7 @@ export class SdModal {
|
|
|
201
203
|
}
|
|
202
204
|
async _saveConfig() {
|
|
203
205
|
const k = this.key();
|
|
204
|
-
if (k === undefined || this.
|
|
206
|
+
if (k === undefined || this._sdSystemConfig == null)
|
|
205
207
|
return;
|
|
206
208
|
const dialogEl = this._getDialogEl();
|
|
207
209
|
if (dialogEl === null)
|
|
@@ -215,12 +217,12 @@ export class SdModal {
|
|
|
215
217
|
config["left"] = dialogEl.style.left;
|
|
216
218
|
if (dialogEl.style.top !== "")
|
|
217
219
|
config["top"] = dialogEl.style.top;
|
|
218
|
-
await this.
|
|
220
|
+
await this._sdSystemConfig.setAsync(`sd-modal.${k}`, config);
|
|
219
221
|
}
|
|
220
222
|
async _restoreConfig(k) {
|
|
221
|
-
if (this.
|
|
223
|
+
if (this._sdSystemConfig == null)
|
|
222
224
|
return;
|
|
223
|
-
const config = (await this.
|
|
225
|
+
const config = (await this._sdSystemConfig.getAsync(`sd-modal.${k}`));
|
|
224
226
|
if (config == null)
|
|
225
227
|
return;
|
|
226
228
|
const dialogEl = this._getDialogEl();
|
|
@@ -238,14 +240,14 @@ export class SdModal {
|
|
|
238
240
|
static ɵfac = function SdModal_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdModal)(); };
|
|
239
241
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdModal, selectors: [["sd-modal"]], hostVars: 4, hostBindings: function SdModal_HostBindings(rf, ctx) { if (rf & 2) {
|
|
240
242
|
i0.ɵɵattribute("data-sd-open", ctx.open() || undefined)("data-sd-float", ctx.float() || undefined)("data-sd-fill", ctx.fill() || undefined)("data-sd-position", ctx.position() || undefined);
|
|
241
|
-
} }, inputs: { open: [1, "open"], key: [1, "key"], title: [1, "title"], hideHeader: [1, "hideHeader"], hideCloseButton: [1, "hideCloseButton"], useCloseByBackdrop: [1, "useCloseByBackdrop"], useCloseByEscapeKey: [1, "useCloseByEscapeKey"], float: [1, "float"], fill: [1, "fill"], resizable: [1, "resizable"], movable: [1, "movable"], position: [1, "position"], minHeightPx: [1, "minHeightPx"], minWidthPx: [1, "minWidthPx"], heightPx: [1, "heightPx"], widthPx: [1, "widthPx"], actionTplRef: [1, "actionTplRef"] }, outputs: { open: "openChange", closeRequest: "closeRequest" }, ngContentSelectors: _c0, decls: 6, vars: 2, consts: [[1, "_backdrop", 3, "mousedown"], ["tabindex", "-1", 1, "_dialog", 3, "keydown", "focus"], [1, "_header"], [1, "_content"], [1, "_header", 3, "mousedown"], [1, "_title"], [1, "_close-btn"], [4, "ngTemplateOutlet"], [1, "_close-btn", 3, "click"], [3, "svg"], ["data-resize-dir", "top", 1, "_resize-handle", "_resize-top", 3, "mousedown"], ["data-resize-dir", "bottom", 1, "_resize-handle", "_resize-bottom", 3, "mousedown"], ["data-resize-dir", "left", 1, "_resize-handle", "_resize-left", 3, "mousedown"], ["data-resize-dir", "right", 1, "_resize-handle", "_resize-right", 3, "mousedown"], ["data-resize-dir", "top-left", 1, "_resize-handle", "_resize-top-left", 3, "mousedown"], ["data-resize-dir", "top-right", 1, "_resize-handle", "_resize-top-right", 3, "mousedown"], ["data-resize-dir", "bottom-left", 1, "_resize-handle", "_resize-bottom-left", 3, "mousedown"], ["data-resize-dir", "bottom-right", 1, "_resize-handle", "_resize-bottom-right", 3, "mousedown"]], template: function SdModal_Template(rf, ctx) { if (rf & 1) {
|
|
243
|
+
} }, inputs: { open: [1, "open"], key: [1, "key"], title: [1, "title"], hideHeader: [1, "hideHeader"], hideCloseButton: [1, "hideCloseButton"], headerStyle: [1, "headerStyle"], useCloseByBackdrop: [1, "useCloseByBackdrop"], useCloseByEscapeKey: [1, "useCloseByEscapeKey"], float: [1, "float"], fill: [1, "fill"], resizable: [1, "resizable"], movable: [1, "movable"], position: [1, "position"], minHeightPx: [1, "minHeightPx"], minWidthPx: [1, "minWidthPx"], heightPx: [1, "heightPx"], widthPx: [1, "widthPx"], actionTplRef: [1, "actionTplRef"] }, outputs: { open: "openChange", closeRequest: "closeRequest" }, ngContentSelectors: _c0, decls: 6, vars: 2, consts: [[1, "_backdrop", 3, "mousedown"], ["tabindex", "-1", 1, "_dialog", 3, "keydown", "focus"], [1, "_header", 3, "style"], [1, "_content"], [1, "_header", 3, "mousedown"], [1, "_title"], [1, "_close-btn"], [4, "ngTemplateOutlet"], [1, "_close-btn", 3, "click"], [3, "svg"], ["data-resize-dir", "top", 1, "_resize-handle", "_resize-top", 3, "mousedown"], ["data-resize-dir", "bottom", 1, "_resize-handle", "_resize-bottom", 3, "mousedown"], ["data-resize-dir", "left", 1, "_resize-handle", "_resize-left", 3, "mousedown"], ["data-resize-dir", "right", 1, "_resize-handle", "_resize-right", 3, "mousedown"], ["data-resize-dir", "top-left", 1, "_resize-handle", "_resize-top-left", 3, "mousedown"], ["data-resize-dir", "top-right", 1, "_resize-handle", "_resize-top-right", 3, "mousedown"], ["data-resize-dir", "bottom-left", 1, "_resize-handle", "_resize-bottom-left", 3, "mousedown"], ["data-resize-dir", "bottom-right", 1, "_resize-handle", "_resize-bottom-right", 3, "mousedown"]], template: function SdModal_Template(rf, ctx) { if (rf & 1) {
|
|
242
244
|
i0.ɵɵprojectionDef();
|
|
243
245
|
i0.ɵɵelementStart(0, "div", 0);
|
|
244
246
|
i0.ɵɵlistener("mousedown", function SdModal_Template_div_mousedown_0_listener() { return ctx.onBackdropClick(); });
|
|
245
247
|
i0.ɵɵelementEnd();
|
|
246
248
|
i0.ɵɵelementStart(1, "div", 1);
|
|
247
249
|
i0.ɵɵlistener("keydown", function SdModal_Template_div_keydown_1_listener($event) { return ctx.onDialogKeydown($event); })("focus", function SdModal_Template_div_focus_1_listener() { return ctx.onDialogFocus(); });
|
|
248
|
-
i0.ɵɵconditionalCreate(2, SdModal_Conditional_2_Template, 5,
|
|
250
|
+
i0.ɵɵconditionalCreate(2, SdModal_Conditional_2_Template, 5, 5, "div", 2);
|
|
249
251
|
i0.ɵɵelementStart(3, "div", 3);
|
|
250
252
|
i0.ɵɵprojection(4);
|
|
251
253
|
i0.ɵɵelementEnd();
|
|
@@ -271,7 +273,7 @@ export class SdModal {
|
|
|
271
273
|
(keydown)="onDialogKeydown($event)"
|
|
272
274
|
(focus)="onDialogFocus()">
|
|
273
275
|
@if (!hideHeader()) {
|
|
274
|
-
<div class="_header" (mousedown)="onHeaderMouseDown($event)">
|
|
276
|
+
<div class="_header" (mousedown)="onHeaderMouseDown($event)" [style]="headerStyle()">
|
|
275
277
|
<span class="_title">{{ title() }}</span>
|
|
276
278
|
@if (actionTplRef()) {
|
|
277
279
|
<ng-container *ngTemplateOutlet="actionTplRef()!" />
|
|
@@ -294,5 +296,5 @@ export class SdModal {
|
|
|
294
296
|
}
|
|
295
297
|
</div>
|
|
296
298
|
`, styles: ["sd-modal {\n display: block;\n position: fixed;\n z-index: var(--z-index-modal);\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding-top: calc(var(--topbar-height) + var(--gap-sm));\n opacity: 0;\n transition: opacity var(--animation-duration) ease-in-out;\n pointer-events: none;\n}\nsd-modal > ._backdrop {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: var(--trans-default);\n}\nsd-modal > ._dialog {\n position: relative;\n display: flex;\n flex-direction: column;\n margin: 0 auto;\n width: fit-content;\n min-width: 200px;\n background: var(--control-color);\n overflow: hidden;\n box-shadow: 0 calc(16 * var(--elevation-size)) calc(16 * 4 * var(--elevation-size)) var(--trans-lighter), 0 var(--elevation-size) var(--elevation-size) var(--trans-lighter);\n border-radius: var(--border-radius-default);\n transform: translateY(-25px);\n transition: transform var(--animation-duration) ease-in-out;\n}\nsd-modal > ._dialog:focus {\n outline: none;\n}\nsd-modal > ._dialog > ._header {\n display: flex;\n align-items: center;\n user-select: none;\n border-bottom: 1px solid var(--theme-gray-lightest);\n}\nsd-modal > ._dialog > ._header > ._title {\n flex: 1;\n padding: var(--gap-sm) var(--gap-default);\n}\nsd-modal > ._dialog > ._header > ._close-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--gap-sm) var(--gap-default);\n border: none;\n background: transparent;\n cursor: pointer;\n font-size: inherit;\n color: inherit;\n}\nsd-modal > ._dialog > ._header > ._close-btn:hover {\n background: var(--trans-lightest);\n}\nsd-modal > ._dialog > ._content {\n flex: 1;\n overflow: auto;\n}\nsd-modal > ._dialog > ._resize-handle {\n position: absolute;\n}\nsd-modal > ._dialog > ._resize-handle._resize-left {\n top: 0;\n left: 0;\n width: var(--gap-sm);\n height: 100%;\n cursor: ew-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-right {\n top: 0;\n right: 0;\n width: var(--gap-sm);\n height: 100%;\n cursor: ew-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-top {\n top: 0;\n left: 0;\n width: 100%;\n height: var(--gap-sm);\n cursor: ns-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-top-right {\n right: 0;\n top: 0;\n width: var(--gap-sm);\n height: var(--gap-sm);\n z-index: 1;\n cursor: nesw-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-top-left {\n left: 0;\n top: 0;\n width: var(--gap-sm);\n height: var(--gap-sm);\n cursor: nwse-resize;\n z-index: 1;\n}\nsd-modal > ._dialog > ._resize-handle._resize-bottom {\n bottom: 0;\n left: 0;\n width: 100%;\n height: var(--gap-sm);\n cursor: ns-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-bottom-right {\n right: 0;\n bottom: 0;\n width: var(--gap-sm);\n height: var(--gap-sm);\n z-index: 1;\n cursor: nwse-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-bottom-left {\n left: 0;\n bottom: 0;\n width: var(--gap-sm);\n height: var(--gap-sm);\n cursor: nesw-resize;\n z-index: 1;\n}\nsd-modal[data-sd-open][data-sd-init] {\n opacity: 1;\n pointer-events: auto;\n}\nsd-modal[data-sd-open][data-sd-init] > ._dialog {\n transform: none;\n}\nsd-modal[data-sd-float] {\n pointer-events: none;\n}\nsd-modal[data-sd-float] > ._backdrop {\n display: none;\n}\nsd-modal[data-sd-float] > ._dialog {\n pointer-events: auto;\n opacity: 0;\n box-shadow: 0 calc(4 * var(--elevation-size)) calc(4 * 4 * var(--elevation-size)) var(--trans-lighter), 0 var(--elevation-size) var(--elevation-size) var(--trans-lighter);\n border: 1px solid var(--theme-gray-lighter);\n}\nsd-modal[data-sd-float] > ._dialog:focus {\n box-shadow: 0 calc(16 * var(--elevation-size)) calc(16 * 4 * var(--elevation-size)) var(--trans-lighter), 0 var(--elevation-size) var(--elevation-size) var(--trans-lighter);\n}\nsd-modal[data-sd-float][data-sd-open][data-sd-init] {\n pointer-events: none;\n}\nsd-modal[data-sd-float][data-sd-open][data-sd-init] > ._dialog {\n pointer-events: auto;\n opacity: 1;\n}\nsd-modal[data-sd-position=bottom-right] > ._dialog {\n position: absolute;\n right: calc(var(--gap-xxl) * 2);\n bottom: var(--gap-xxl);\n}\nsd-modal[data-sd-position=top-right] > ._dialog {\n position: absolute;\n right: var(--gap-xxl);\n top: var(--gap-xxl);\n}\nsd-modal[data-sd-fill] {\n padding-top: 0;\n}\nsd-modal[data-sd-fill] > ._dialog {\n width: 100%;\n height: 100%;\n border: none;\n border-radius: 0;\n}\nsd-modal[data-sd-fill] > ._dialog > ._header {\n background: transparent;\n color: var(--text-trans-lighter);\n}"] }]
|
|
297
|
-
}], () => [], { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }], hideCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCloseButton", required: false }] }], useCloseByBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "useCloseByBackdrop", required: false }] }], useCloseByEscapeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "useCloseByEscapeKey", required: false }] }], float: [{ type: i0.Input, args: [{ isSignal: true, alias: "float", required: false }] }], fill: [{ type: i0.Input, args: [{ isSignal: true, alias: "fill", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], movable: [{ type: i0.Input, args: [{ isSignal: true, alias: "movable", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], minHeightPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeightPx", required: false }] }], minWidthPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidthPx", required: false }] }], heightPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "heightPx", required: false }] }], widthPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "widthPx", required: false }] }], actionTplRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionTplRef", required: false }] }], closeRequest: [{ type: i0.Output, args: ["closeRequest"] }] }); })();
|
|
299
|
+
}], () => [], { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }], hideCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCloseButton", required: false }] }], headerStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerStyle", required: false }] }], useCloseByBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "useCloseByBackdrop", required: false }] }], useCloseByEscapeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "useCloseByEscapeKey", required: false }] }], float: [{ type: i0.Input, args: [{ isSignal: true, alias: "float", required: false }] }], fill: [{ type: i0.Input, args: [{ isSignal: true, alias: "fill", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], movable: [{ type: i0.Input, args: [{ isSignal: true, alias: "movable", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], minHeightPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeightPx", required: false }] }], minWidthPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidthPx", required: false }] }], heightPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "heightPx", required: false }] }], widthPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "widthPx", required: false }] }], actionTplRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionTplRef", required: false }] }], closeRequest: [{ type: i0.Output, args: ["closeRequest"] }] }); })();
|
|
298
300
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdModal, { className: "SdModal", filePath: "packages/angular/src/core/modal/sd-modal.ts", lineNumber: 286, forbidOrphanRendering: true }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-modal.provider.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-modal.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,IAAI,EACV,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EACV,qBAAqB,EACrB,YAAY,EACb,MAAM,4BAA4B,CAAC;AAGpC,OAAO,wBAAwB,CAAC;;AAEhC;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,KAAK,EAAE,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAChC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACxC;AAED,KAAK,kBAAkB,GAAG,aAAa,GAAG,OAAO,GAA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IAC5D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAE9C,UAAU,iDAAa;IAEjB,SAAS,CAAC,CAAC,SAAS,iBAAiB,CAAC,GAAG,CAAC,EAC9C,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IA0JzD,OAAO,CAAC,aAAa;yCApKV,eAAe;6CAAf,eAAe;CA+K3B"}
|
|
@@ -4,13 +4,13 @@ import { SdAppStructureProvider } from "../app-structure/sd-app-structure.provid
|
|
|
4
4
|
import { injectFullPageCodeSignal } from "./injectFullPageCodeSignal";
|
|
5
5
|
import { injectCurrentPageCodeSignal } from "./injectCurrentPageCodeSignal";
|
|
6
6
|
export function injectViewTitleSignal() {
|
|
7
|
-
const
|
|
7
|
+
const sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
8
8
|
const sdAppStructure = inject(SdAppStructureProvider);
|
|
9
9
|
const fullPageCode = injectFullPageCodeSignal();
|
|
10
10
|
const currPageCode = injectCurrentPageCodeSignal();
|
|
11
11
|
return computed(() => {
|
|
12
|
-
if (
|
|
13
|
-
return
|
|
12
|
+
if (sdActivatedModal != null) {
|
|
13
|
+
return sdActivatedModal.modalComponent()?.title() ?? "";
|
|
14
14
|
}
|
|
15
15
|
try {
|
|
16
16
|
return sdAppStructure.getTitleByFullCode(currPageCode?.() ?? fullPageCode());
|
|
@@ -4,12 +4,12 @@ import { SdActivatedModalProvider } from "../modal/sd-activated-modal.provider";
|
|
|
4
4
|
import { injectCurrentPageCodeSignal } from "./injectCurrentPageCodeSignal";
|
|
5
5
|
import { injectFullPageCodeSignal } from "./injectFullPageCodeSignal";
|
|
6
6
|
export function injectViewTypeSignal(getComp) {
|
|
7
|
-
const
|
|
7
|
+
const sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
8
8
|
const activatedRoute = inject(ActivatedRoute, { optional: true });
|
|
9
9
|
const fullPageCode = injectFullPageCodeSignal();
|
|
10
10
|
const currPageCode = injectCurrentPageCodeSignal();
|
|
11
11
|
return computed(() => {
|
|
12
|
-
if (
|
|
12
|
+
if (sdActivatedModal != null) {
|
|
13
13
|
return "modal";
|
|
14
14
|
}
|
|
15
15
|
const comp = getComp();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class SdRouterLink {
|
|
3
3
|
private readonly _router;
|
|
4
|
-
private readonly
|
|
4
|
+
private readonly _sdNavigateWindow;
|
|
5
5
|
option: import("@angular/core").InputSignal<{
|
|
6
6
|
link: string;
|
|
7
7
|
params?: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-router-link.d.ts","sourceRoot":"","sources":["../../../src/core/routing/sd-router-link.ts"],"names":[],"mappings":";AAIA,qBAQa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"sd-router-link.d.ts","sourceRoot":"","sources":["../../../src/core/routing/sd-router-link.ts"],"names":[],"mappings":";AAIA,qBAQa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoC;IAEtE,MAAM;cAEM,MAAM;iBACH,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;iBACtB;YACP,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB;qBACY,MAAM;sBACL,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;mBAGF;IAElC,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;yCAlBpC,YAAY;2CAAZ,YAAY;CA4DxB"}
|
|
@@ -4,7 +4,7 @@ import { SdNavigateWindowProvider } from "./sd-navigate-window.provider";
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export class SdRouterLink {
|
|
6
6
|
_router = inject(Router);
|
|
7
|
-
|
|
7
|
+
_sdNavigateWindow = inject(SdNavigateWindowProvider);
|
|
8
8
|
option = input(undefined, { ...(ngDevMode ? { debugName: "option" } : /* istanbul ignore next */ {}), alias: "sdRouterLink" });
|
|
9
9
|
async onClick(event) {
|
|
10
10
|
const option = this.option();
|
|
@@ -15,19 +15,19 @@ export class SdRouterLink {
|
|
|
15
15
|
return;
|
|
16
16
|
event.preventDefault();
|
|
17
17
|
event.stopPropagation();
|
|
18
|
-
if (this.
|
|
18
|
+
if (this._sdNavigateWindow.isWindow) {
|
|
19
19
|
const width = option.window?.width ?? 800;
|
|
20
20
|
const height = option.window?.height ?? 800;
|
|
21
21
|
const qp = option.queryParams
|
|
22
22
|
? "?" + new URLSearchParams(option.queryParams).toString()
|
|
23
23
|
: "";
|
|
24
|
-
this.
|
|
24
|
+
this._sdNavigateWindow.open(option.link + qp, option.params, `width=${width},height=${height}`);
|
|
25
25
|
}
|
|
26
26
|
else if (event.ctrlKey || event.shiftKey) {
|
|
27
27
|
const qp = option.queryParams
|
|
28
28
|
? "?" + new URLSearchParams(option.queryParams).toString()
|
|
29
29
|
: "";
|
|
30
|
-
this.
|
|
30
|
+
this._sdNavigateWindow.open(option.link + qp, option.params);
|
|
31
31
|
}
|
|
32
32
|
else if (option.outletName === undefined) {
|
|
33
33
|
await this._router.navigate([option.link, ...(option.params ? [option.params] : [])], option.queryParams ? { queryParams: option.queryParams } : undefined);
|
|
@@ -2,11 +2,11 @@ import { DestroyRef, ElementRef, inject, reflectComponentType } from "@angular/c
|
|
|
2
2
|
import { ActivatedRoute } from "@angular/router";
|
|
3
3
|
import { SdActivatedModalProvider } from "../modal/sd-activated-modal.provider";
|
|
4
4
|
export function setupCanDeactivate(fn) {
|
|
5
|
-
const
|
|
5
|
+
const sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
6
6
|
const activatedRoute = inject(ActivatedRoute, { optional: true });
|
|
7
7
|
const elRef = inject(ElementRef);
|
|
8
|
-
if (
|
|
9
|
-
|
|
8
|
+
if (sdActivatedModal != null) {
|
|
9
|
+
sdActivatedModal.canDeactivateFn = fn;
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
if (activatedRoute) {
|
|
@@ -2,8 +2,8 @@ import type { ServiceConnectionOptions } from "@simplysm/service-client";
|
|
|
2
2
|
import { ServiceClient } from "@simplysm/service-client";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SdServiceClientFactoryProvider {
|
|
5
|
-
private readonly
|
|
6
|
-
private readonly
|
|
5
|
+
private readonly _sdToast;
|
|
6
|
+
private readonly _sdAngularConfig;
|
|
7
7
|
private readonly _destroyRef;
|
|
8
8
|
private readonly _clientMap;
|
|
9
9
|
private readonly _closedKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-service-client-factory.provider.d.ts","sourceRoot":"","sources":["../../../src/core/service-client/sd-service-client-factory.provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAwB,MAAM,0BAA0B,CAAC;AAC/F,OAAO,EAAuB,aAAa,EAAE,MAAM,0BAA0B,CAAC;;AAI9E,qBACa,8BAA8B;IACzC,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"sd-service-client-factory.provider.d.ts","sourceRoot":"","sources":["../../../src/core/service-client/sd-service-client-factory.provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAwB,MAAM,0BAA0B,CAAC;AAC/F,OAAO,EAAuB,aAAa,EAAE,MAAM,0BAA0B,CAAC;;AAI9E,qBACa,8BAA8B;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IACpD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmC;IACpE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsB;IAElD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAC/D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6C;;IAWpE,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAkCrF,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW5C,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa;IAW/B,OAAO,CAAC,eAAe;yCA1EZ,8BAA8B;6CAA9B,8BAA8B;CA0F1C"}
|
|
@@ -4,8 +4,8 @@ import { SdAngularConfigProvider } from "../config/sd-angular-config.provider";
|
|
|
4
4
|
import { SdToastProvider } from "../toast/sd-toast.provider";
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export class SdServiceClientFactoryProvider {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
_sdToast = inject(SdToastProvider);
|
|
8
|
+
_sdAngularConfig = inject(SdAngularConfigProvider);
|
|
9
9
|
_destroyRef = inject(DestroyRef);
|
|
10
10
|
_clientMap = new Map();
|
|
11
11
|
_closedKeys = new Set();
|
|
@@ -35,7 +35,7 @@ export class SdServiceClientFactoryProvider {
|
|
|
35
35
|
...defaultOptions,
|
|
36
36
|
...options,
|
|
37
37
|
};
|
|
38
|
-
const client = createServiceClient(this.
|
|
38
|
+
const client = createServiceClient(this._sdAngularConfig.clientName, mergedOptions);
|
|
39
39
|
client.on("request-progress", (state) => {
|
|
40
40
|
this._handleProgress("요청을 전송하는 중입니다.", state);
|
|
41
41
|
});
|
|
@@ -69,7 +69,7 @@ export class SdServiceClientFactoryProvider {
|
|
|
69
69
|
const progress = totalSize === 0 ? 0 : Math.round((completedSize / totalSize) * 100);
|
|
70
70
|
let progressSignal = this._progressMap.get(uuid);
|
|
71
71
|
if (progressSignal == null) {
|
|
72
|
-
progressSignal = this.
|
|
72
|
+
progressSignal = this._sdToast.info(message, true);
|
|
73
73
|
this._progressMap.set(uuid, progressSignal);
|
|
74
74
|
}
|
|
75
75
|
progressSignal.set(progress);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type Signal, type WritableSignal } from "@angular/core";
|
|
1
|
+
import { ErrorHandler, type Signal, type WritableSignal } from "@angular/core";
|
|
2
|
+
import { SdServiceClientFactoryProvider } from "../service-client/sd-service-client-factory.provider";
|
|
2
3
|
import "@simplysm/core-common";
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export interface SharedDataBase<TKey extends string | number> {
|
|
@@ -22,8 +23,8 @@ export declare const SdSharedDataChangeEvent: import("@simplysm/service-common")
|
|
|
22
23
|
filter: unknown;
|
|
23
24
|
}, (string | number)[] | undefined>;
|
|
24
25
|
export declare abstract class SdSharedDataProvider<T extends Record<string, SharedDataBase<string | number>>> {
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
protected readonly _sdServiceClientFactory: SdServiceClientFactoryProvider;
|
|
27
|
+
protected readonly _errorHandler: ErrorHandler;
|
|
27
28
|
readonly loadingCount: WritableSignal<number>;
|
|
28
29
|
private readonly _entries;
|
|
29
30
|
abstract initialize(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-shared-data.provider.d.ts","sourceRoot":"","sources":["../../../src/core/shared-data/sd-shared-data.provider.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sd-shared-data.provider.d.ts","sourceRoot":"","sources":["../../../src/core/shared-data/sd-shared-data.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,YAAY,EAA8B,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAGrH,OAAO,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAC;AACtG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QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAqC/E,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAchE,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,EACxC,IAAI,EAAE,CAAC,EACP,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAC/B,OAAO,CAAC,IAAI,CAAC;IAcV,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,OAAO,CAAC,cAAc;YAuCR,QAAQ;yCAzHF,oBAAoB;6CAApB,oBAAoB;CAkKzC"}
|
|
@@ -6,7 +6,7 @@ import "@simplysm/core-common";
|
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export const SdSharedDataChangeEvent = defineEvent("SdSharedDataChange");
|
|
8
8
|
export class SdSharedDataProvider {
|
|
9
|
-
|
|
9
|
+
_sdServiceClientFactory = inject(SdServiceClientFactoryProvider);
|
|
10
10
|
_errorHandler = inject(ErrorHandler);
|
|
11
11
|
loadingCount = signal(0, ...(ngDevMode ? [{ debugName: "loadingCount" }] : /* istanbul ignore next */ []));
|
|
12
12
|
_entries = new Map();
|
|
@@ -15,7 +15,7 @@ export class SdSharedDataProvider {
|
|
|
15
15
|
if (existing != null) {
|
|
16
16
|
// 기존 리스너 키 초기화 + generation 증가로 이전 이벤트 무시
|
|
17
17
|
if (existing.listenerKey != null) {
|
|
18
|
-
const client = this.
|
|
18
|
+
const client = this._sdServiceClientFactory.get(existing.info.serviceKey);
|
|
19
19
|
void client.removeListener(existing.listenerKey);
|
|
20
20
|
existing.listenerKey = undefined;
|
|
21
21
|
}
|
|
@@ -60,7 +60,7 @@ export class SdSharedDataProvider {
|
|
|
60
60
|
if (entry == null) {
|
|
61
61
|
throw new Error(`등록되지 않은 공유 데이터: ${name}`);
|
|
62
62
|
}
|
|
63
|
-
const client = this.
|
|
63
|
+
const client = this._sdServiceClientFactory.get(entry.info.serviceKey);
|
|
64
64
|
const event = client.getEvent("SdSharedDataChange");
|
|
65
65
|
await event.emit((item) => item.name === name && obj.equal(item.filter, entry.info.filter), changeKeys);
|
|
66
66
|
}
|
|
@@ -81,7 +81,7 @@ export class SdSharedDataProvider {
|
|
|
81
81
|
entry.itemsSignal.set(data);
|
|
82
82
|
// 이벤트 리스너 등록
|
|
83
83
|
if (entry.listenerKey == null) {
|
|
84
|
-
const client = this.
|
|
84
|
+
const client = this._sdServiceClientFactory.get(entry.info.serviceKey);
|
|
85
85
|
const event = client.getEvent("SdSharedDataChange");
|
|
86
86
|
entry.listenerKey = await event.addListener({ name, filter: entry.info.filter }, async (changeKeys) => {
|
|
87
87
|
await this._onEvent(name, entry, changeKeys, capturedGeneration);
|