@simplysm/angular 14.0.40 → 14.0.41
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/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 +2 -2
- package/dist/core/modal/sd-modal.d.ts.map +1 -1
- package/dist/core/modal/sd-modal.js +8 -8
- 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/sheet/sd-sheet.d.ts +1 -1
- package/dist/data/sheet/sd-sheet.d.ts.map +1 -1
- package/dist/data/sheet/sd-sheet.js +2 -2
- 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 +5 -5
- 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.ts +8 -8
- 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/sheet/sd-sheet.ts +2 -2
- package/src/layout/base-container/sd-base-container.ts +2 -2
|
@@ -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>";
|
|
@@ -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;AA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78
|
export class SdModal {
|
|
79
79
|
_elRef = inject((ElementRef));
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
_sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
81
|
+
_sdSystemConfig = inject(SdSystemConfigProvider, { optional: true });
|
|
82
82
|
_errorHandler = inject(ErrorHandler);
|
|
83
83
|
_focusTrap = injectFocusTrap();
|
|
84
84
|
tablerX = tablerX;
|
|
@@ -134,7 +134,7 @@ export class SdModal {
|
|
|
134
134
|
// key 기반 설정 복원
|
|
135
135
|
effect(() => {
|
|
136
136
|
const k = this.key();
|
|
137
|
-
if (k === undefined || this.
|
|
137
|
+
if (k === undefined || this._sdSystemConfig == null)
|
|
138
138
|
return;
|
|
139
139
|
void this._restoreConfig(k).catch((err) => this._errorHandler.handleError(err));
|
|
140
140
|
});
|
|
@@ -173,7 +173,7 @@ export class SdModal {
|
|
|
173
173
|
this._bringToFront();
|
|
174
174
|
}
|
|
175
175
|
_requestClose() {
|
|
176
|
-
if (this.
|
|
176
|
+
if (this._sdActivatedModal !== null && !this._sdActivatedModal.canDeactivateFn()) {
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
void this._saveConfig().catch((err) => this._errorHandler.handleError(err));
|
|
@@ -201,7 +201,7 @@ export class SdModal {
|
|
|
201
201
|
}
|
|
202
202
|
async _saveConfig() {
|
|
203
203
|
const k = this.key();
|
|
204
|
-
if (k === undefined || this.
|
|
204
|
+
if (k === undefined || this._sdSystemConfig == null)
|
|
205
205
|
return;
|
|
206
206
|
const dialogEl = this._getDialogEl();
|
|
207
207
|
if (dialogEl === null)
|
|
@@ -215,12 +215,12 @@ export class SdModal {
|
|
|
215
215
|
config["left"] = dialogEl.style.left;
|
|
216
216
|
if (dialogEl.style.top !== "")
|
|
217
217
|
config["top"] = dialogEl.style.top;
|
|
218
|
-
await this.
|
|
218
|
+
await this._sdSystemConfig.setAsync(`sd-modal.${k}`, config);
|
|
219
219
|
}
|
|
220
220
|
async _restoreConfig(k) {
|
|
221
|
-
if (this.
|
|
221
|
+
if (this._sdSystemConfig == null)
|
|
222
222
|
return;
|
|
223
|
-
const config = (await this.
|
|
223
|
+
const config = (await this._sdSystemConfig.getAsync(`sd-modal.${k}`));
|
|
224
224
|
if (config == null)
|
|
225
225
|
return;
|
|
226
226
|
const dialogEl = this._getDialogEl();
|
|
@@ -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,OAAO,uBAAuB,CAAC;;AAE/B,MAAM,WAAW,cAAc,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM;IAC1D,UAAU,EAAE,IAAI,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EA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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);
|
|
@@ -15,7 +15,7 @@ export declare class SdToastProvider {
|
|
|
15
15
|
private readonly _appRef;
|
|
16
16
|
private readonly _envInjector;
|
|
17
17
|
private readonly _injector;
|
|
18
|
-
private readonly
|
|
18
|
+
private readonly _sdSystemLog;
|
|
19
19
|
alertThemes: WritableSignal<SdToastSeverity[]>;
|
|
20
20
|
overlap: WritableSignal<boolean>;
|
|
21
21
|
beforeShowFn?: (theme: SdToastSeverity) => void;
|
|
@@ -33,8 +33,8 @@ export declare class SdToastProvider {
|
|
|
33
33
|
danger(message: string, useProgress?: true): WritableSignal<number>;
|
|
34
34
|
danger(message: string, useProgress?: false): void;
|
|
35
35
|
notify<T extends SdToastContentDef<any>>(input: SdToastInput<T>): Promise<Parameters<T["close"]["emit"]>[0] | undefined>;
|
|
36
|
-
try<R>(fn: () => Promise<R
|
|
37
|
-
try<R>(fn: () =>
|
|
36
|
+
try<R>(fn: () => Promise<R>, messageFn?: (err: Error) => string): Promise<R | undefined>;
|
|
37
|
+
try<R>(fn: () => R, messageFn?: (err: Error) => string): R | undefined;
|
|
38
38
|
private _show;
|
|
39
39
|
private _setupAutoDismiss;
|
|
40
40
|
private _dismissToast;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-toast.provider.d.ts","sourceRoot":"","sources":["../../../src/core/toast/sd-toast.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,gBAAgB,EACrB,KAAK,IAAI,EACT,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAIxE,OAAO,wBAAwB,CAAC;;AAEhC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AACxE,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,eAAe,GAAG,MAAM,GAAG,WAAW,CAAC;AAE5F,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,KAAK,EAAE,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,iBAAiB,CAAC,GAAG,CAAC;IAC5D,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACd,MAAM,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;CACjD;AAED,qBACa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAC9C,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"sd-toast.provider.d.ts","sourceRoot":"","sources":["../../../src/core/toast/sd-toast.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,gBAAgB,EACrB,KAAK,IAAI,EACT,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAIxE,OAAO,wBAAwB,CAAC;;AAEhC,MAAM,MA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ector);
|
|
12
|
-
|
|
12
|
+
_sdSystemLog = inject(SdSystemLogProvider);
|
|
13
13
|
alertThemes = signal([], ...(ngDevMode ? [{ debugName: "alertThemes" }] : /* istanbul ignore next */ []));
|
|
14
14
|
overlap = signal(false, ...(ngDevMode ? [{ debugName: "overlap" }] : /* istanbul ignore next */ []));
|
|
15
15
|
beforeShowFn;
|
|
@@ -101,7 +101,7 @@ export class SdToastProvider {
|
|
|
101
101
|
}
|
|
102
102
|
const message = messageFn !== undefined ? messageFn(err) : err.message;
|
|
103
103
|
this.danger(message);
|
|
104
|
-
await this.
|
|
104
|
+
await this._sdSystemLog.writeAsync("error", err.stack ?? err.message);
|
|
105
105
|
return undefined;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { type Signal, TemplateRef } from "@angular/core";
|
|
1
|
+
import { ErrorHandler, type Signal, TemplateRef } from "@angular/core";
|
|
2
2
|
import { DateTime } from "@simplysm/core-common";
|
|
3
|
+
import { SdSharedDataProvider } from "../../core/shared-data/sd-shared-data.provider";
|
|
3
4
|
import { type SdModalContentDef } from "../../core/modal/sd-modal.provider";
|
|
5
|
+
import { SdToastProvider } from "../../core/toast/sd-toast.provider";
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
export interface SdDataDetailDataInfo {
|
|
6
8
|
isNew: boolean;
|
|
@@ -22,9 +24,9 @@ export declare abstract class SdDataDetailBase<T extends object, R = boolean> im
|
|
|
22
24
|
};
|
|
23
25
|
toggleDelete?(del: boolean): Promise<R | undefined> | R | undefined;
|
|
24
26
|
submit?(data: T): Promise<R | undefined> | R | undefined;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
protected readonly _sdToast: SdToastProvider;
|
|
28
|
+
protected readonly _sdSharedData: SdSharedDataProvider<Record<string, import("../..").SharedDataBase<string | number>>>;
|
|
29
|
+
protected readonly _errorHandler: ErrorHandler;
|
|
28
30
|
viewType: Signal<import("../..").SdViewType>;
|
|
29
31
|
busyCount: import("@angular/core").WritableSignal<number>;
|
|
30
32
|
busyMessage: import("@angular/core").WritableSignal<string | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-data-detail.base.d.ts","sourceRoot":"","sources":["../../../src/data/data-detail/sd-data-detail.base.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sd-data-detail.base.d.ts","sourceRoot":"","sources":["../../../src/data/data-detail/sd-data-detail.base.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAIZ,KAAK,MAAM,EACX,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAO,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAItF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;;AAGrE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,QAAQ,GAAG,SAAS,CAAC;IACrC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,8BACsB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,OAAO,CAClE,YAAW,iBAAiB,CAAC,CAAC,CAAC;IAI/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAE5B,oBAAoB,CAAC,IAAI,IAAI;IAE7B,QAAQ,CAAC,IAAI,IACT,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,IAAI,EAAE,oBAAoB,CAAA;KAAE,CAAC,GAChD;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,IAAI,EAAE,oBAAoB,CAAA;KAAE;IAE3C,YAAY,CAAC,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,SAAS;IAEnE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,SAAS;IAIxD,SAAS,CAAC,QAAQ,CAAC,QAAQ,kBAA2B;IACtD,SAAS,CAAC,QAAQ,CAAC,aAAa,wFAAgC;IAChE,SAAS,CAAC,QAAQ,CAAC,aAAa,eAAwB;IAExD,QAAQ,qCAAoC;IAE5C,SAAS,iDAAa;IACtB,WAAW,6DAAyC;IACpD,WAAW,kDAAiB;IAC5B,KAAK,8CAAe;IACpB,YAAY,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAEhC,IAAI,4CAAsB;IAE1B,QAAQ,2EAAuD;IAE/D,OAAO,CAAC,aAAa,CAAC,CAAI;;IAoC1B,kBAAkB;IAQZ,SAAS;IAYT,OAAO;IASP,cAAc,CAAC,GAAG,EAAE,OAAO;IAqB3B,QAAQ,CAAC,GAAG,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;KAAE;yCA3HvD,gBAAgB;2CAAhB,gBAAgB;CA8JrC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type Signal } from "@angular/core";
|
|
2
2
|
import type { SelectModeValue } from "../../controls/select/sd-select";
|
|
3
|
-
import { type SdModalOptions } from "../../core/modal/sd-modal.provider";
|
|
3
|
+
import { SdModalProvider, type SdModalOptions } from "../../core/modal/sd-modal.provider";
|
|
4
4
|
import type { SdSelectModal, SdSelectModalInfo } from "../../controls/button/sd-modal-select-button";
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare abstract class SdDataSelectButtonBase<TItem extends object, TKey, TMode extends keyof SelectModeValue<TKey> = keyof SelectModeValue<TKey>> {
|
|
7
7
|
abstract modal: Signal<SdSelectModalInfo<SdSelectModal<any>>>;
|
|
8
8
|
abstract load(keys: TKey[]): Promise<TItem[]> | TItem[];
|
|
9
|
-
|
|
9
|
+
protected readonly _sdModal: SdModalProvider;
|
|
10
10
|
value: import("@angular/core").ModelSignal<SelectModeValue<TKey>[TMode] | undefined>;
|
|
11
11
|
disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
12
12
|
required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-data-select-button.base.d.ts","sourceRoot":"","sources":["../../../src/data/data-select-button/sd-data-select-button.base.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,MAAM,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"sd-data-select-button.base.d.ts","sourceRoot":"","sources":["../../../src/data/data-select-button/sd-data-select-button.base.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,MAAM,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EACL,eAAe,EACf,KAAK,cAAc,EACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EAClB,MAAM,8CAA8C,CAAC;;AAGtD,8BACsB,sBAAsB,CAC1C,KAAK,SAAS,MAAM,EACpB,IAAI,EACJ,KAAK,SAAS,MAAM,eAAe,CAAC,IAAI,CAAC,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC;IAGvE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,KAAK,EAAE;IAIvD,SAAS,CAAC,QAAQ,CAAC,QAAQ,kBAA2B;IAEtD,KAAK,gFAAyC;IAE9C,QAAQ,qEAAiD;IACzD,QAAQ,qEAAiD;IACzD,KAAK,qEAAiD;IACtD,IAAI,+DAAwB;IAC5B,UAAU,6CAAmC;IAE7C,SAAS,kBAKN;IAEH,aAAa,kDAAuB;;IAyB9B,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB1D,cAAc,IAAI,IAAI;yCA7EF,sBAAsB;2CAAtB,sBAAsB;CAgF3C"}
|
|
@@ -27,7 +27,7 @@ export declare class SdSheet<T> {
|
|
|
27
27
|
sorts: import("@angular/core").ModelSignal<SortingDef[]>;
|
|
28
28
|
currentPage: import("@angular/core").ModelSignal<number>;
|
|
29
29
|
columnControls: import("@angular/core").Signal<readonly SdSheetColumn[]>;
|
|
30
|
-
private readonly
|
|
30
|
+
private readonly _sdModal;
|
|
31
31
|
domAccessor: {
|
|
32
32
|
getHostEl: () => HTMLElement;
|
|
33
33
|
getContainer: () => HTMLElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-sheet.d.ts","sourceRoot":"","sources":["../../../src/data/sheet/sd-sheet.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAelD,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAI5F,OAAO,KAAK,EACV,4BAA4B,EAE5B,gBAAgB,EAChB,4BAA4B,EAC7B,MAAM,SAAS,CAAC;;AAUjB,qBAiSa,OAAO,CAAC,CAAC;IAEpB,GAAG,0DAAmB;IACtB,KAAK,2CAAkB;IACvB,SAAS,8CAAgB,CAAC,SAAS,MA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AC;yCArO/B,OAAO;2CAAP,OAAO;CAqPnB;AAGD,YAAY,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC"}
|
|
@@ -307,7 +307,7 @@ export class SdSheet {
|
|
|
307
307
|
// Content query
|
|
308
308
|
columnControls = contentChildren(SdSheetColumn, ...(ngDevMode ? [{ debugName: "columnControls" }] : /* istanbul ignore next */ []));
|
|
309
309
|
// Injected providers
|
|
310
|
-
|
|
310
|
+
_sdModal = inject(SdModalProvider);
|
|
311
311
|
// DOM accessor & cell agent
|
|
312
312
|
domAccessor = injectSheetDomAccessor();
|
|
313
313
|
cellAgent = useSheetCellAgent({ domAccessor: this.domAccessor });
|
|
@@ -479,7 +479,7 @@ export class SdSheet {
|
|
|
479
479
|
this.cellKeydown.emit({ item, key: colKey, event });
|
|
480
480
|
}
|
|
481
481
|
async onConfigButtonClick() {
|
|
482
|
-
const result = await this.
|
|
482
|
+
const result = await this._sdModal.showAsync({
|
|
483
483
|
title: "시트 설정",
|
|
484
484
|
type: SdSheetConfigModal,
|
|
485
485
|
inputs: {
|
|
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class SdBaseContainer {
|
|
5
5
|
private readonly _sdActivatedModal;
|
|
6
6
|
private readonly _sdAppStructure;
|
|
7
|
-
private readonly
|
|
7
|
+
private readonly _sdSystemLog;
|
|
8
8
|
private readonly _parent;
|
|
9
9
|
private readonly _fullPageCode;
|
|
10
10
|
private readonly _currPageCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-base-container.d.ts","sourceRoot":"","sources":["../../../src/layout/base-container/sd-base-container.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,WAAW,EAEZ,MAAM,eAAe,CAAC;AAQvB,OAAO,EAEL,KAAK,UAAU,EAChB,MAAM,yCAAyC,CAAC;;AAMjD,qBAqDa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAwD;IAC1F,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkC;IAClE,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"sd-base-container.d.ts","sourceRoot":"","sources":["../../../src/layout/base-container/sd-base-container.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,WAAW,EAEZ,MAAM,eAAe,CAAC;AAQvB,OAAO,EAEL,KAAK,UAAU,EAChB,MAAM,yCAAyC,CAAC;;AAMjD,qBAqDa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAwD;IAC1F,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkC;IAClE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAE5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAE1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8B;IAC5D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiC;IAE/D,aAAa,mDAA8D;IAE3E,gBAAgB,+DAAwD;IACxE,iBAAiB,+DAAyD;IAE1E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA4C;IAC5E,QAAQ,8DAAuB;IAC/B,YAAY,6CAA6D;IAEzE,MAAM,0DAAmB;IACzB,gBAAgB,sCAWb;IAEH,WAAW,2DAAyC;IACpD,UAAU,qEAAiD;IAC3D,IAAI,qEAAiD;IACrD,WAAW,0DAAmB;IAE9B,SAAS,CAAC,QAAQ,CAAC,mBAAmB,ifAAuB;yCAtClD,eAAe;2CAAf,eAAe;CAuC3B"}
|
|
@@ -88,7 +88,7 @@ function SdBaseContainer_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
88
88
|
export class SdBaseContainer {
|
|
89
89
|
_sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
90
90
|
_sdAppStructure = inject(SdAppStructureProvider);
|
|
91
|
-
|
|
91
|
+
_sdSystemLog = inject(SdSystemLogProvider);
|
|
92
92
|
_parent = injectParent();
|
|
93
93
|
_fullPageCode = injectFullPageCodeSignal();
|
|
94
94
|
_currPageCode = injectCurrentPageCodeSignal();
|
|
@@ -106,7 +106,7 @@ export class SdBaseContainer {
|
|
|
106
106
|
this._sdAppStructure.getTitleByFullCode(this._currPageCode?.() ?? this._fullPageCode()));
|
|
107
107
|
}
|
|
108
108
|
catch (err) {
|
|
109
|
-
void this.
|
|
109
|
+
void this._sdSystemLog.writeAsync("warn", `modalOrPageTitle 계산 중 에러: ${String(err)}`);
|
|
110
110
|
return "";
|
|
111
111
|
}
|
|
112
112
|
}, ...(ngDevMode ? [{ debugName: "modalOrPageTitle" }] : /* istanbul ignore next */ []));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysm/angular",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.41",
|
|
4
4
|
"description": "심플리즘 패키지 - Angular",
|
|
5
5
|
"author": "심플리즘",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"jspdf": "^4.2.1",
|
|
51
51
|
"rxjs": "^7.8.2",
|
|
52
52
|
"tabbable": "^6.4.0",
|
|
53
|
-
"@simplysm/core-browser": "14.0.
|
|
54
|
-
"@simplysm/service-client": "14.0.
|
|
55
|
-
"@simplysm/core-common": "14.0.
|
|
56
|
-
"@simplysm/service-common": "14.0.
|
|
53
|
+
"@simplysm/core-browser": "14.0.41",
|
|
54
|
+
"@simplysm/service-client": "14.0.41",
|
|
55
|
+
"@simplysm/core-common": "14.0.41",
|
|
56
|
+
"@simplysm/service-common": "14.0.41"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@angular/compiler": "^21.2.8",
|
|
@@ -15,19 +15,19 @@ export function injectPermsSignal<K extends string>(viewCodes: string[], keys: K
|
|
|
15
15
|
// 메뉴는 모듈/권한 모두 체크함
|
|
16
16
|
@Injectable({ providedIn: "root" })
|
|
17
17
|
export class SdAppStructureProvider<TModule = unknown> {
|
|
18
|
-
private readonly
|
|
19
|
-
private readonly
|
|
18
|
+
private readonly _sdServiceClientFactory = inject(SdServiceClientFactoryProvider);
|
|
19
|
+
private readonly _sdAngularConfig = inject(SdAngularConfigProvider);
|
|
20
20
|
|
|
21
21
|
readonly usableModules = signal<TModule[] | undefined>(undefined);
|
|
22
22
|
readonly permRecord = signal<Record<string, boolean> | undefined>(undefined);
|
|
23
23
|
readonly items = signal<AppStructureItem<TModule>[]>([]);
|
|
24
24
|
|
|
25
25
|
async initialize(serviceKey: string): Promise<void> {
|
|
26
|
-
const client = this.
|
|
26
|
+
const client = this._sdServiceClientFactory.get(serviceKey);
|
|
27
27
|
const svc = client.getService<AppStructureService>("AppStructure");
|
|
28
28
|
const itemsMap = await svc.getItems();
|
|
29
29
|
this.items.set(
|
|
30
|
-
(itemsMap[this.
|
|
30
|
+
(itemsMap[this._sdAngularConfig.clientName] ?? []) as AppStructureItem<TModule>[],
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -3,14 +3,14 @@ import { SdAngularConfigProvider } from "./sd-angular-config.provider";
|
|
|
3
3
|
|
|
4
4
|
@Injectable({ providedIn: "root" })
|
|
5
5
|
export class SdLocalStorageProvider<T> {
|
|
6
|
-
private readonly
|
|
6
|
+
private readonly _sdAngularConfig = inject(SdAngularConfigProvider);
|
|
7
7
|
|
|
8
8
|
set<K extends keyof T & string>(key: K, value: T[K]) {
|
|
9
|
-
localStorage.setItem(`${this.
|
|
9
|
+
localStorage.setItem(`${this._sdAngularConfig.clientName}.${key}`, JSON.stringify(value));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
get<K extends keyof T & string>(key: K): T[K] | undefined {
|
|
13
|
-
const json = localStorage.getItem(`${this.
|
|
13
|
+
const json = localStorage.getItem(`${this._sdAngularConfig.clientName}.${key}`);
|
|
14
14
|
if (json == null) return undefined;
|
|
15
15
|
try {
|
|
16
16
|
return JSON.parse(json);
|
|
@@ -20,6 +20,6 @@ export class SdLocalStorageProvider<T> {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
remove(key: keyof T & string) {
|
|
23
|
-
localStorage.removeItem(`${this.
|
|
23
|
+
localStorage.removeItem(`${this._sdAngularConfig.clientName}.${key}`);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -11,7 +11,7 @@ import { SdSystemLogProvider } from "../config/sd-system-log.provider";
|
|
|
11
11
|
@Injectable({ providedIn: null })
|
|
12
12
|
export class SdGlobalErrorHandlerPlugin implements ErrorHandler {
|
|
13
13
|
private readonly _envInjector = inject(EnvironmentInjector);
|
|
14
|
-
private readonly
|
|
14
|
+
private readonly _sdSystemLog = inject(SdSystemLogProvider);
|
|
15
15
|
private _hasDisplayedError = false;
|
|
16
16
|
|
|
17
17
|
handleError(event: any) {
|
|
@@ -41,7 +41,7 @@ export class SdGlobalErrorHandlerPlugin implements ErrorHandler {
|
|
|
41
41
|
const { message, filename, lineno, colno, error } = event;
|
|
42
42
|
|
|
43
43
|
if (error == null) {
|
|
44
|
-
void this.
|
|
44
|
+
void this._sdSystemLog.writeAsync("warn", message);
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -95,7 +95,7 @@ export class SdGlobalErrorHandlerPlugin implements ErrorHandler {
|
|
|
95
95
|
|
|
96
96
|
const paramLines = Object.keys(param).map((key) => key + ": " + param[key]);
|
|
97
97
|
|
|
98
|
-
void this.
|
|
98
|
+
void this._sdSystemLog.writeAsync("error", `[${title}]\n${paramLines.join("\n")}`);
|
|
99
99
|
|
|
100
100
|
const appRef = this._envInjector.get<ApplicationRef>(ApplicationRef);
|
|
101
101
|
appRef.destroy();
|
|
@@ -285,8 +285,8 @@ import "@simplysm/core-browser";
|
|
|
285
285
|
})
|
|
286
286
|
export class SdModal {
|
|
287
287
|
private readonly _elRef = inject(ElementRef<HTMLElement>);
|
|
288
|
-
private readonly
|
|
289
|
-
private readonly
|
|
288
|
+
private readonly _sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
289
|
+
private readonly _sdSystemConfig = inject(SdSystemConfigProvider, { optional: true });
|
|
290
290
|
private readonly _errorHandler = inject(ErrorHandler);
|
|
291
291
|
private readonly _focusTrap = injectFocusTrap();
|
|
292
292
|
|
|
@@ -347,7 +347,7 @@ export class SdModal {
|
|
|
347
347
|
// key 기반 설정 복원
|
|
348
348
|
effect(() => {
|
|
349
349
|
const k = this.key();
|
|
350
|
-
if (k === undefined || this.
|
|
350
|
+
if (k === undefined || this._sdSystemConfig == null) return;
|
|
351
351
|
|
|
352
352
|
void this._restoreConfig(k).catch((err) => this._errorHandler.handleError(err));
|
|
353
353
|
});
|
|
@@ -389,7 +389,7 @@ export class SdModal {
|
|
|
389
389
|
}
|
|
390
390
|
|
|
391
391
|
private _requestClose(): void {
|
|
392
|
-
if (this.
|
|
392
|
+
if (this._sdActivatedModal !== null && !this._sdActivatedModal.canDeactivateFn()) {
|
|
393
393
|
return;
|
|
394
394
|
}
|
|
395
395
|
void this._saveConfig().catch((err) => this._errorHandler.handleError(err));
|
|
@@ -418,7 +418,7 @@ export class SdModal {
|
|
|
418
418
|
|
|
419
419
|
private async _saveConfig(): Promise<void> {
|
|
420
420
|
const k = this.key();
|
|
421
|
-
if (k === undefined || this.
|
|
421
|
+
if (k === undefined || this._sdSystemConfig == null) return;
|
|
422
422
|
|
|
423
423
|
const dialogEl = this._getDialogEl();
|
|
424
424
|
if (dialogEl === null) return;
|
|
@@ -429,13 +429,13 @@ export class SdModal {
|
|
|
429
429
|
if (dialogEl.style.left !== "") config["left"] = dialogEl.style.left;
|
|
430
430
|
if (dialogEl.style.top !== "") config["top"] = dialogEl.style.top;
|
|
431
431
|
|
|
432
|
-
await this.
|
|
432
|
+
await this._sdSystemConfig.setAsync(`sd-modal.${k}` as any, config as any);
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
private async _restoreConfig(k: string): Promise<void> {
|
|
436
|
-
if (this.
|
|
436
|
+
if (this._sdSystemConfig == null) return;
|
|
437
437
|
|
|
438
|
-
const config = (await this.
|
|
438
|
+
const config = (await this._sdSystemConfig.getAsync(`sd-modal.${k}` as any)) as
|
|
439
439
|
| Record<string, string | undefined>
|
|
440
440
|
| undefined;
|
|
441
441
|
if (config == null) return;
|
|
@@ -5,15 +5,15 @@ import { injectFullPageCodeSignal } from "./injectFullPageCodeSignal";
|
|
|
5
5
|
import { injectCurrentPageCodeSignal } from "./injectCurrentPageCodeSignal";
|
|
6
6
|
|
|
7
7
|
export function injectViewTitleSignal(): Signal<string> {
|
|
8
|
-
const
|
|
8
|
+
const sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
9
9
|
const sdAppStructure = inject(SdAppStructureProvider);
|
|
10
10
|
|
|
11
11
|
const fullPageCode = injectFullPageCodeSignal();
|
|
12
12
|
const currPageCode = injectCurrentPageCodeSignal();
|
|
13
13
|
|
|
14
14
|
return computed(() => {
|
|
15
|
-
if (
|
|
16
|
-
return
|
|
15
|
+
if (sdActivatedModal != null) {
|
|
16
|
+
return sdActivatedModal.modalComponent()?.title() ?? "";
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
try {
|
|
@@ -5,14 +5,14 @@ import { injectCurrentPageCodeSignal } from "./injectCurrentPageCodeSignal";
|
|
|
5
5
|
import { injectFullPageCodeSignal } from "./injectFullPageCodeSignal";
|
|
6
6
|
|
|
7
7
|
export function injectViewTypeSignal(getComp: () => object): Signal<SdViewType> {
|
|
8
|
-
const
|
|
8
|
+
const sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
9
9
|
const activatedRoute = inject(ActivatedRoute, { optional: true });
|
|
10
10
|
|
|
11
11
|
const fullPageCode = injectFullPageCodeSignal();
|
|
12
12
|
const currPageCode = injectCurrentPageCodeSignal();
|
|
13
13
|
|
|
14
14
|
return computed<SdViewType>(() => {
|
|
15
|
-
if (
|
|
15
|
+
if (sdActivatedModal != null) {
|
|
16
16
|
return "modal";
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@ import { SdNavigateWindowProvider } from "./sd-navigate-window.provider";
|
|
|
12
12
|
})
|
|
13
13
|
export class SdRouterLink {
|
|
14
14
|
private readonly _router = inject(Router);
|
|
15
|
-
private readonly
|
|
15
|
+
private readonly _sdNavigateWindow = inject(SdNavigateWindowProvider);
|
|
16
16
|
|
|
17
17
|
option = input<
|
|
18
18
|
| {
|
|
@@ -39,13 +39,13 @@ export class SdRouterLink {
|
|
|
39
39
|
event.preventDefault();
|
|
40
40
|
event.stopPropagation();
|
|
41
41
|
|
|
42
|
-
if (this.
|
|
42
|
+
if (this._sdNavigateWindow.isWindow) {
|
|
43
43
|
const width = option.window?.width ?? 800;
|
|
44
44
|
const height = option.window?.height ?? 800;
|
|
45
45
|
const qp = option.queryParams
|
|
46
46
|
? "?" + new URLSearchParams(option.queryParams).toString()
|
|
47
47
|
: "";
|
|
48
|
-
this.
|
|
48
|
+
this._sdNavigateWindow.open(
|
|
49
49
|
option.link + qp,
|
|
50
50
|
option.params,
|
|
51
51
|
`width=${width},height=${height}`,
|
|
@@ -54,7 +54,7 @@ export class SdRouterLink {
|
|
|
54
54
|
const qp = option.queryParams
|
|
55
55
|
? "?" + new URLSearchParams(option.queryParams).toString()
|
|
56
56
|
: "";
|
|
57
|
-
this.
|
|
57
|
+
this._sdNavigateWindow.open(option.link + qp, option.params);
|
|
58
58
|
} else if (option.outletName === undefined) {
|
|
59
59
|
await this._router.navigate(
|
|
60
60
|
[option.link, ...(option.params ? [option.params] : [])],
|
|
@@ -3,12 +3,12 @@ import { ActivatedRoute, type CanDeactivateFn } from "@angular/router";
|
|
|
3
3
|
import { SdActivatedModalProvider } from "../modal/sd-activated-modal.provider";
|
|
4
4
|
|
|
5
5
|
export function setupCanDeactivate(fn: () => boolean): void {
|
|
6
|
-
const
|
|
6
|
+
const sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
7
7
|
const activatedRoute = inject(ActivatedRoute, { optional: true });
|
|
8
8
|
const elRef = inject(ElementRef);
|
|
9
9
|
|
|
10
|
-
if (
|
|
11
|
-
|
|
10
|
+
if (sdActivatedModal != null) {
|
|
11
|
+
sdActivatedModal.canDeactivateFn = fn;
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -6,8 +6,8 @@ import { SdToastProvider } from "../toast/sd-toast.provider";
|
|
|
6
6
|
|
|
7
7
|
@Injectable({ providedIn: "root" })
|
|
8
8
|
export class SdServiceClientFactoryProvider {
|
|
9
|
-
private readonly
|
|
10
|
-
private readonly
|
|
9
|
+
private readonly _sdToast = inject(SdToastProvider);
|
|
10
|
+
private readonly _sdAngularConfig = inject(SdAngularConfigProvider);
|
|
11
11
|
private readonly _destroyRef = inject(DestroyRef);
|
|
12
12
|
|
|
13
13
|
private readonly _clientMap = new Map<string, ServiceClient>();
|
|
@@ -43,7 +43,7 @@ export class SdServiceClientFactoryProvider {
|
|
|
43
43
|
...options,
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
const client = createServiceClient(this.
|
|
46
|
+
const client = createServiceClient(this._sdAngularConfig.clientName, mergedOptions);
|
|
47
47
|
|
|
48
48
|
client.on("request-progress", (state: ServiceProgressState) => {
|
|
49
49
|
this._handleProgress("요청을 전송하는 중입니다.", state);
|
|
@@ -85,7 +85,7 @@ export class SdServiceClientFactoryProvider {
|
|
|
85
85
|
|
|
86
86
|
let progressSignal = this._progressMap.get(uuid);
|
|
87
87
|
if (progressSignal == null) {
|
|
88
|
-
progressSignal = this.
|
|
88
|
+
progressSignal = this._sdToast.info(message, true);
|
|
89
89
|
this._progressMap.set(uuid, progressSignal);
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -40,8 +40,8 @@ interface SharedDataEntry<T extends SharedDataBase<string | number>> {
|
|
|
40
40
|
|
|
41
41
|
@Injectable()
|
|
42
42
|
export abstract class SdSharedDataProvider<T extends Record<string, SharedDataBase<string | number>>> {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
protected readonly _sdServiceClientFactory = inject(SdServiceClientFactoryProvider);
|
|
44
|
+
protected readonly _errorHandler = inject(ErrorHandler);
|
|
45
45
|
|
|
46
46
|
readonly loadingCount: WritableSignal<number> = signal(0);
|
|
47
47
|
|
|
@@ -54,7 +54,7 @@ export abstract class SdSharedDataProvider<T extends Record<string, SharedDataBa
|
|
|
54
54
|
if (existing != null) {
|
|
55
55
|
// 기존 리스너 키 초기화 + generation 증가로 이전 이벤트 무시
|
|
56
56
|
if (existing.listenerKey != null) {
|
|
57
|
-
const client = this.
|
|
57
|
+
const client = this._sdServiceClientFactory.get(existing.info.serviceKey);
|
|
58
58
|
void client.removeListener(existing.listenerKey);
|
|
59
59
|
existing.listenerKey = undefined;
|
|
60
60
|
}
|
|
@@ -109,7 +109,7 @@ export abstract class SdSharedDataProvider<T extends Record<string, SharedDataBa
|
|
|
109
109
|
throw new Error(`등록되지 않은 공유 데이터: ${name as string}`);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
const client = this.
|
|
112
|
+
const client = this._sdServiceClientFactory.get(entry.info.serviceKey);
|
|
113
113
|
const event = client.getEvent<typeof SdSharedDataChangeEvent>("SdSharedDataChange");
|
|
114
114
|
await event.emit(
|
|
115
115
|
(item) => item.name === (name as string) && obj.equal(item.filter, entry.info.filter),
|
|
@@ -137,7 +137,7 @@ export abstract class SdSharedDataProvider<T extends Record<string, SharedDataBa
|
|
|
137
137
|
|
|
138
138
|
// 이벤트 리스너 등록
|
|
139
139
|
if (entry.listenerKey == null) {
|
|
140
|
-
const client = this.
|
|
140
|
+
const client = this._sdServiceClientFactory.get(entry.info.serviceKey);
|
|
141
141
|
const event = client.getEvent<typeof SdSharedDataChangeEvent>("SdSharedDataChange");
|
|
142
142
|
entry.listenerKey = await event.addListener(
|
|
143
143
|
{ name, filter: entry.info.filter },
|
|
@@ -36,7 +36,7 @@ export class SdToastProvider {
|
|
|
36
36
|
private readonly _appRef = inject(ApplicationRef);
|
|
37
37
|
private readonly _envInjector = inject(EnvironmentInjector);
|
|
38
38
|
private readonly _injector = inject(Injector);
|
|
39
|
-
private readonly
|
|
39
|
+
private readonly _sdSystemLog = inject(SdSystemLogProvider);
|
|
40
40
|
|
|
41
41
|
alertThemes = signal<SdToastSeverity[]>([]);
|
|
42
42
|
overlap = signal(false);
|
|
@@ -145,11 +145,11 @@ export class SdToastProvider {
|
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
async try<R>(fn: () => Promise<R
|
|
149
|
-
|
|
148
|
+
async try<R>(fn: () => Promise<R>, messageFn?: (err: Error) => string): Promise<R | undefined>;
|
|
149
|
+
try<R>(fn: () => R, messageFn?: (err: Error) => string): R | undefined;
|
|
150
150
|
async try<R>(
|
|
151
|
-
fn: () => Promise<R
|
|
152
|
-
messageFn?: (err:
|
|
151
|
+
fn: () => Promise<R> | R,
|
|
152
|
+
messageFn?: (err: Error) => string,
|
|
153
153
|
): Promise<R | undefined> {
|
|
154
154
|
try {
|
|
155
155
|
return await fn();
|
|
@@ -160,7 +160,7 @@ export class SdToastProvider {
|
|
|
160
160
|
|
|
161
161
|
const message = messageFn !== undefined ? messageFn(err) : err.message;
|
|
162
162
|
this.danger(message);
|
|
163
|
-
await this.
|
|
163
|
+
await this._sdSystemLog.writeAsync("error", err.stack ?? err.message);
|
|
164
164
|
return undefined;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
@@ -47,9 +47,9 @@ export abstract class SdDataDetailBase<T extends object, R = boolean>
|
|
|
47
47
|
|
|
48
48
|
//-- implement
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
protected readonly _sdToast = inject(SdToastProvider);
|
|
51
|
+
protected readonly _sdSharedData = inject(SdSharedDataProvider);
|
|
52
|
+
protected readonly _errorHandler = inject(ErrorHandler);
|
|
53
53
|
|
|
54
54
|
viewType = injectViewTypeSignal(() => this);
|
|
55
55
|
|
|
@@ -368,7 +368,7 @@ export class SdSheet<T> {
|
|
|
368
368
|
columnControls = contentChildren(SdSheetColumn);
|
|
369
369
|
|
|
370
370
|
// Injected providers
|
|
371
|
-
private readonly
|
|
371
|
+
private readonly _sdModal = inject(SdModalProvider);
|
|
372
372
|
|
|
373
373
|
// DOM accessor & cell agent
|
|
374
374
|
domAccessor = injectSheetDomAccessor();
|
|
@@ -564,7 +564,7 @@ export class SdSheet<T> {
|
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
async onConfigButtonClick(): Promise<void> {
|
|
567
|
-
const result = await this.
|
|
567
|
+
const result = await this._sdModal.showAsync(
|
|
568
568
|
{
|
|
569
569
|
title: "시트 설정",
|
|
570
570
|
type: SdSheetConfigModal,
|
|
@@ -82,7 +82,7 @@ import { tablerAlertTriangle } from "@ng-icons/tabler-icons";
|
|
|
82
82
|
export class SdBaseContainer {
|
|
83
83
|
private readonly _sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
|
|
84
84
|
private readonly _sdAppStructure = inject(SdAppStructureProvider);
|
|
85
|
-
private readonly
|
|
85
|
+
private readonly _sdSystemLog = inject(SdSystemLogProvider);
|
|
86
86
|
|
|
87
87
|
private readonly _parent = injectParent();
|
|
88
88
|
|
|
@@ -107,7 +107,7 @@ export class SdBaseContainer {
|
|
|
107
107
|
this._sdAppStructure.getTitleByFullCode(this._currPageCode?.() ?? this._fullPageCode())
|
|
108
108
|
);
|
|
109
109
|
} catch (err) {
|
|
110
|
-
void this.
|
|
110
|
+
void this._sdSystemLog.writeAsync("warn", `modalOrPageTitle 계산 중 에러: ${String(err)}`);
|
|
111
111
|
return "";
|
|
112
112
|
}
|
|
113
113
|
});
|