@simplysm/angular 14.0.39 → 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/controls/collapse/sd-collapse.d.ts +2 -1
- package/dist/controls/collapse/sd-collapse.d.ts.map +1 -1
- package/dist/controls/collapse/sd-collapse.js +6 -0
- package/dist/controls/dropdown/sd-dropdown.js +6 -6
- package/dist/controls/list/sd-list-item.d.ts.map +1 -1
- package/dist/controls/list/sd-list-item.js +3 -3
- package/dist/controls/select/sd-select.d.ts.map +1 -1
- package/dist/controls/select/sd-select.js +7 -11
- 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/injectFocusTrap.js +4 -4
- 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/modal/sd-modal.provider.js +4 -4
- 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-container.js +2 -2
- package/dist/core/toast/sd-toast.d.ts.map +1 -1
- package/dist/core/toast/sd-toast.js +30 -25
- 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/core/validation/setupInvalid.js +6 -5
- 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/data/sheet/useSheetCellAgent.js +6 -6
- 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/dist/layout/sidebar/sd-sidebar-menu.js +3 -3
- package/dist/styles.css +1 -1
- package/package.json +5 -5
- package/scss/commons/_styles.scss +1 -1
- package/src/controls/collapse/sd-collapse.ts +6 -0
- package/src/controls/dropdown/sd-dropdown.ts +6 -6
- package/src/controls/list/sd-list-item.ts +0 -6
- package/src/controls/select/sd-select.ts +8 -13
- 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/injectFocusTrap.ts +4 -4
- package/src/core/modal/sd-modal.provider.ts +4 -4
- 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-container.ts +8 -8
- package/src/core/toast/sd-toast.provider.ts +6 -6
- package/src/core/toast/sd-toast.ts +82 -49
- package/src/core/validation/setupInvalid.ts +7 -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/data/sheet/useSheetCellAgent.ts +6 -6
- package/src/layout/base-container/sd-base-container.ts +2 -2
- package/src/layout/sidebar/sd-sidebar-menu.ts +1 -1
|
@@ -9,12 +9,12 @@ export class SdToastContainer {
|
|
|
9
9
|
} }, inputs: { overlap: [1, "overlap"] }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function SdToastContainer_Template(rf, ctx) { if (rf & 1) {
|
|
10
10
|
i0.ɵɵprojectionDef();
|
|
11
11
|
i0.ɵɵprojection(0);
|
|
12
|
-
} }, styles: ["sd-toast-container {\n position: fixed;\n top: 0;\n left: 0;\n
|
|
12
|
+
} }, styles: ["sd-toast-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n pointer-events: none;\n padding: var(--gap-xxl);\n z-index: 9999;\n flex-direction: column;\n}\n@supports not (appearance: auto) {\n sd-toast-container.gap-xxs {\n gap: 0;\n }\n sd-toast-container.gap-xxs > * + * {\n margin-top: var(--gap-xxs);\n }\n sd-toast-container.gap-xs {\n gap: 0;\n }\n sd-toast-container.gap-xs > * + * {\n margin-top: var(--gap-xs);\n }\n sd-toast-container.gap-sm {\n gap: 0;\n }\n sd-toast-container.gap-sm > * + * {\n margin-top: var(--gap-sm);\n }\n sd-toast-container.gap-default {\n gap: 0;\n }\n sd-toast-container.gap-default > * + * {\n margin-top: var(--gap-default);\n }\n sd-toast-container.gap-lg {\n gap: 0;\n }\n sd-toast-container.gap-lg > * + * {\n margin-top: var(--gap-lg);\n }\n sd-toast-container.gap-xl {\n gap: 0;\n }\n sd-toast-container.gap-xl > * + * {\n margin-top: var(--gap-xl);\n }\n sd-toast-container.gap-xxl {\n gap: 0;\n }\n sd-toast-container.gap-xxl > * + * {\n margin-top: var(--gap-xxl);\n }\n sd-toast-container.gap-0 {\n gap: 0;\n }\n sd-toast-container.gap-0 > * + * {\n margin-top: var(--gap-0);\n }\n sd-toast-container.gap-auto {\n gap: 0;\n }\n sd-toast-container.gap-auto > * + * {\n margin-top: var(--gap-auto);\n }\n}\n@media all and (max-width: 520px) {\n sd-toast-container {\n flex-direction: column-reverse;\n }\n}\nsd-toast-container[data-sd-overlap] {\n display: block;\n}\nsd-toast-container[data-sd-overlap] > sd-toast {\n position: absolute;\n bottom: var(--gap-xxl);\n left: var(--gap-xxl);\n right: var(--gap-xxl);\n width: auto;\n}"], encapsulation: 2, changeDetection: 0 });
|
|
13
13
|
}
|
|
14
14
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdToastContainer, [{
|
|
15
15
|
type: Component,
|
|
16
16
|
args: [{ selector: "sd-toast-container", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, host: {
|
|
17
17
|
"[attr.data-sd-overlap]": "overlap() || undefined",
|
|
18
|
-
}, template: `<ng-content />`, styles: ["sd-toast-container {\n position: fixed;\n top: 0;\n left: 0;\n
|
|
18
|
+
}, template: `<ng-content />`, styles: ["sd-toast-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n pointer-events: none;\n padding: var(--gap-xxl);\n z-index: 9999;\n flex-direction: column;\n}\n@supports not (appearance: auto) {\n sd-toast-container.gap-xxs {\n gap: 0;\n }\n sd-toast-container.gap-xxs > * + * {\n margin-top: var(--gap-xxs);\n }\n sd-toast-container.gap-xs {\n gap: 0;\n }\n sd-toast-container.gap-xs > * + * {\n margin-top: var(--gap-xs);\n }\n sd-toast-container.gap-sm {\n gap: 0;\n }\n sd-toast-container.gap-sm > * + * {\n margin-top: var(--gap-sm);\n }\n sd-toast-container.gap-default {\n gap: 0;\n }\n sd-toast-container.gap-default > * + * {\n margin-top: var(--gap-default);\n }\n sd-toast-container.gap-lg {\n gap: 0;\n }\n sd-toast-container.gap-lg > * + * {\n margin-top: var(--gap-lg);\n }\n sd-toast-container.gap-xl {\n gap: 0;\n }\n sd-toast-container.gap-xl > * + * {\n margin-top: var(--gap-xl);\n }\n sd-toast-container.gap-xxl {\n gap: 0;\n }\n sd-toast-container.gap-xxl > * + * {\n margin-top: var(--gap-xxl);\n }\n sd-toast-container.gap-0 {\n gap: 0;\n }\n sd-toast-container.gap-0 > * + * {\n margin-top: var(--gap-0);\n }\n sd-toast-container.gap-auto {\n gap: 0;\n }\n sd-toast-container.gap-auto > * + * {\n margin-top: var(--gap-auto);\n }\n}\n@media all and (max-width: 520px) {\n sd-toast-container {\n flex-direction: column-reverse;\n }\n}\nsd-toast-container[data-sd-overlap] {\n display: block;\n}\nsd-toast-container[data-sd-overlap] > sd-toast {\n position: absolute;\n bottom: var(--gap-xxl);\n left: var(--gap-xxl);\n right: var(--gap-xxl);\n width: auto;\n}"] }]
|
|
19
19
|
}], null, { overlap: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlap", required: false }] }] }); })();
|
|
20
20
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdToastContainer, { className: "SdToastContainer", filePath: "packages/angular/src/core/toast/sd-toast-container.ts", lineNumber: 56, forbidOrphanRendering: true }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-toast.d.ts","sourceRoot":"","sources":["../../../src/core/toast/sd-toast.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;;AAKxD,
|
|
1
|
+
{"version":3,"file":"sd-toast.d.ts","sourceRoot":"","sources":["../../../src/core/toast/sd-toast.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;;AAKxD,qBAyHa,OAAO;IAClB,IAAI,+CAAgB;IACpB,WAAW,qEAAiD;IAC5D,KAAK,oDAA+B;IACpC,QAAQ,8CAAY;IACpB,OAAO,0DAAwC;IAE/C,QAAQ,iEAKL;IAEH,QAAQ,qEAKL;yCAnBQ,OAAO;2CAAP,OAAO;CAoBnB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, model, ViewEncapsulation, } from "@angular/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
const _c0 = ["*"];
|
|
4
|
-
function
|
|
5
|
-
i0.ɵɵdomElementStart(0, "div",
|
|
4
|
+
function SdToast_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
5
|
+
i0.ɵɵdomElementStart(0, "div", 1);
|
|
6
6
|
i0.ɵɵtext(1);
|
|
7
7
|
i0.ɵɵdomElementEnd();
|
|
8
8
|
} if (rf & 2) {
|
|
@@ -10,9 +10,9 @@ function SdToast_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
10
10
|
i0.ɵɵadvance();
|
|
11
11
|
i0.ɵɵtextInterpolate(ctx_r0.message());
|
|
12
12
|
} }
|
|
13
|
-
function
|
|
14
|
-
i0.ɵɵdomElementStart(0, "div",
|
|
15
|
-
i0.ɵɵdomElement(1, "div",
|
|
13
|
+
function SdToast_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
i0.ɵɵdomElementStart(0, "div", 2);
|
|
15
|
+
i0.ɵɵdomElement(1, "div", 3);
|
|
16
16
|
i0.ɵɵdomElementEnd();
|
|
17
17
|
} if (rf & 2) {
|
|
18
18
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -45,35 +45,40 @@ export class SdToast {
|
|
|
45
45
|
}, ...(ngDevMode ? [{ debugName: "ariaLive" }] : /* istanbul ignore next */ []));
|
|
46
46
|
static ɵfac = function SdToast_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdToast)(); };
|
|
47
47
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdToast, selectors: [["sd-toast"]], hostVars: 4, hostBindings: function SdToast_HostBindings(rf, ctx) { if (rf & 2) {
|
|
48
|
-
i0.ɵɵattribute("data-sd-open", ctx.open()
|
|
49
|
-
} }, inputs: { open: [1, "open"], useProgress: [1, "useProgress"], theme: [1, "theme"], progress: [1, "progress"], message: [1, "message"] }, outputs: { open: "openChange", progress: "progressChange", message: "messageChange" }, ngContentSelectors: _c0, decls:
|
|
48
|
+
i0.ɵɵattribute("data-sd-open", ctx.open())("data-sd-theme", ctx.theme())("role", ctx.ariaRole())("aria-live", ctx.ariaLive());
|
|
49
|
+
} }, inputs: { open: [1, "open"], useProgress: [1, "useProgress"], theme: [1, "theme"], progress: [1, "progress"], message: [1, "message"] }, outputs: { open: "openChange", progress: "progressChange", message: "messageChange" }, ngContentSelectors: _c0, decls: 4, vars: 2, consts: [[1, "_block"], [1, "_message"], [1, "_progress"], [1, "_progress-bar"]], template: function SdToast_Template(rf, ctx) { if (rf & 1) {
|
|
50
50
|
i0.ɵɵprojectionDef();
|
|
51
|
-
i0.ɵɵ
|
|
52
|
-
i0.ɵɵ
|
|
53
|
-
i0.ɵɵ
|
|
51
|
+
i0.ɵɵdomElementStart(0, "div", 0);
|
|
52
|
+
i0.ɵɵconditionalCreate(1, SdToast_Conditional_1_Template, 2, 1, "div", 1);
|
|
53
|
+
i0.ɵɵprojection(2);
|
|
54
|
+
i0.ɵɵconditionalCreate(3, SdToast_Conditional_3_Template, 2, 2, "div", 2);
|
|
55
|
+
i0.ɵɵdomElementEnd();
|
|
54
56
|
} if (rf & 2) {
|
|
55
|
-
i0.ɵɵ
|
|
57
|
+
i0.ɵɵadvance();
|
|
58
|
+
i0.ɵɵconditional(ctx.message() !== undefined ? 1 : -1);
|
|
56
59
|
i0.ɵɵadvance(2);
|
|
57
|
-
i0.ɵɵconditional(ctx.useProgress() ?
|
|
58
|
-
} }, styles: ["sd-toast {\n display: block;\n
|
|
60
|
+
i0.ɵɵconditional(ctx.useProgress() ? 3 : -1);
|
|
61
|
+
} }, styles: ["sd-toast {\n display: block;\n margin-bottom: var(--gap-sm);\n text-align: center;\n width: 100%;\n pointer-events: none;\n}\nsd-toast > ._block {\n display: inline-block;\n text-align: left;\n color: var(--text-trans-rev-default);\n transform: translateY(-100%);\n border-radius: var(--border-radius-lg);\n opacity: 0;\n box-shadow: 0 calc(12 * var(--elevation-size)) calc(12 * 4 * var(--elevation-size)) var(--trans-lighter), 0 var(--elevation-size) var(--elevation-size) var(--trans-lighter);\n pointer-events: auto;\n}\nsd-toast > ._block > ._message {\n padding: var(--gap-default) var(--gap-lg);\n word-break: break-all;\n white-space: pre-wrap;\n}\nsd-toast > ._block > ._progress {\n background: var(--theme-gray-default);\n height: 4px;\n border-radius: var(--border-radius-xl);\n margin: 0 4px 4px 4px;\n}\nsd-toast > ._block > ._progress > ._progress-bar {\n border-radius: var(--border-radius-xl);\n height: 4px;\n transition: width 1s ease-out;\n}\nsd-toast[data-sd-theme=gray] > ._block {\n background: rgb(153.0022463699, 161.0057700366, 174.7317580236);\n}\nsd-toast[data-sd-theme=gray] > ._block > ._progress {\n background: rgb(101.0316959931, 111.1055377773, 128.3821070824);\n}\nsd-toast[data-sd-theme=gray] > ._block > ._progress > ._progress-bar {\n background: rgb(224.400673911, 226.801731011, 230.9195274071);\n}\nsd-toast[data-sd-theme=blue-gray] > ._block {\n background: rgb(144.0364277624, 161.0825504589, 184.9359809919);\n}\nsd-toast[data-sd-theme=blue-gray] > ._block > ._progress {\n background: rgb(95.4928842953, 118.7256854589, 151.2364222704);\n}\nsd-toast[data-sd-theme=blue-gray] > ._block > ._progress > ._progress-bar {\n background: rgb(227.2591069406, 231.5206376147, 237.483995248);\n}\nsd-toast[data-sd-theme=primary] > ._block {\n background: hsl(212.7907636992, 106.3271487689%, 66.8390389975%);\n}\nsd-toast[data-sd-theme=primary] > ._block > ._progress {\n background: hsl(212.7907636992, 106.3271487689%, 50.1292792481%);\n}\nsd-toast[data-sd-theme=primary] > ._block > ._progress > ._progress-bar {\n background: hsl(212.7907636992, 106.3271487689%, 91.7097597494%);\n}\nsd-toast[data-sd-theme=secondary] > ._block {\n background: hsl(212.7907636992, 106.3271487689%, 66.8390389975%);\n}\nsd-toast[data-sd-theme=secondary] > ._block > ._progress {\n background: hsl(212.7907636992, 106.3271487689%, 50.1292792481%);\n}\nsd-toast[data-sd-theme=secondary] > ._block > ._progress > ._progress-bar {\n background: hsl(212.7907636992, 106.3271487689%, 91.7097597494%);\n}\nsd-toast[data-sd-theme=info] > ._block {\n background: hsl(186.1271591177, 175.0224558865%, 34.577706736%);\n}\nsd-toast[data-sd-theme=info] > ._block > ._progress {\n background: hsl(186.1271591177, 175.0224558865%, 25.933280052%);\n}\nsd-toast[data-sd-theme=info] > ._block > ._progress > ._progress-bar {\n background: hsl(186.1271591177, 175.0224558865%, 83.644426684%);\n}\nsd-toast[data-sd-theme=success] > ._block {\n background: hsl(76.4778453101, 152.6473732821%, 35.6889214867%);\n}\nsd-toast[data-sd-theme=success] > ._block > ._progress {\n background: hsl(76.4778453101, 152.6473732821%, 26.766691115%);\n}\nsd-toast[data-sd-theme=success] > ._block > ._progress > ._progress-bar {\n background: hsl(76.4778453101, 152.6473732821%, 83.9222303717%);\n}\nsd-toast[data-sd-theme=warning] > ._block {\n background: hsl(31.4330872217, 102.5675912326%, 51.3170331393%);\n}\nsd-toast[data-sd-theme=warning] > ._block > ._progress {\n background: hsl(31.4330872217, 102.5675912326%, 38.4877748545%);\n}\nsd-toast[data-sd-theme=warning] > ._block > ._progress > ._progress-bar {\n background: hsl(31.4330872217, 102.5675912326%, 87.8292582848%);\n}\nsd-toast[data-sd-theme=danger] > ._block {\n background: hsl(358.7593862564, 101.8439024907%, 69.8357359211%);\n}\nsd-toast[data-sd-theme=danger] > ._block > ._progress {\n background: hsl(358.7593862564, 101.8439024907%, 52.3768019408%);\n}\nsd-toast[data-sd-theme=danger] > ._block > ._progress > ._progress-bar {\n background: hsl(358.7593862564, 101.8439024907%, 92.4589339803%);\n}\nsd-toast[data-sd-open=true] > ._block {\n transform: none;\n transition: var(--animation-duration) ease-out;\n transition-property: transform, opacity;\n opacity: 1;\n}\nsd-toast[data-sd-open=false] > ._block {\n transform: translateY(-100%);\n transition: var(--animation-duration) ease-in;\n transition-property: transform, opacity;\n opacity: 0;\n}\n@media all and (max-width: 520px) {\n sd-toast > ._block {\n border-radius: calc(var(--line-height) / 2);\n transform: translateY(100%);\n }\n sd-toast > ._block > ._message {\n padding: var(--gap-xs) var(--gap-default);\n }\n sd-toast[data-sd-open=false] > ._block {\n transform: translateY(100%);\n }\n}"], encapsulation: 2, changeDetection: 0 });
|
|
59
62
|
}
|
|
60
63
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdToast, [{
|
|
61
64
|
type: Component,
|
|
62
65
|
args: [{ selector: "sd-toast", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, host: {
|
|
63
|
-
"[attr.data-sd-open]": "open()
|
|
66
|
+
"[attr.data-sd-open]": "open()",
|
|
64
67
|
"[attr.data-sd-theme]": "theme()",
|
|
65
68
|
"[attr.role]": "ariaRole()",
|
|
66
69
|
"[attr.aria-live]": "ariaLive()",
|
|
67
70
|
}, template: `
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<div class="_progress
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
<div class="_block">
|
|
72
|
+
@if (message() !== undefined) {
|
|
73
|
+
<div class="_message">{{ message() }}</div>
|
|
74
|
+
}
|
|
75
|
+
<ng-content />
|
|
76
|
+
@if (useProgress()) {
|
|
77
|
+
<div class="_progress">
|
|
78
|
+
<div class="_progress-bar" [style.width.%]="progress()"></div>
|
|
79
|
+
</div>
|
|
80
|
+
}
|
|
81
|
+
</div>
|
|
82
|
+
`, styles: ["sd-toast {\n display: block;\n margin-bottom: var(--gap-sm);\n text-align: center;\n width: 100%;\n pointer-events: none;\n}\nsd-toast > ._block {\n display: inline-block;\n text-align: left;\n color: var(--text-trans-rev-default);\n transform: translateY(-100%);\n border-radius: var(--border-radius-lg);\n opacity: 0;\n box-shadow: 0 calc(12 * var(--elevation-size)) calc(12 * 4 * var(--elevation-size)) var(--trans-lighter), 0 var(--elevation-size) var(--elevation-size) var(--trans-lighter);\n pointer-events: auto;\n}\nsd-toast > ._block > ._message {\n padding: var(--gap-default) var(--gap-lg);\n word-break: break-all;\n white-space: pre-wrap;\n}\nsd-toast > ._block > ._progress {\n background: var(--theme-gray-default);\n height: 4px;\n border-radius: var(--border-radius-xl);\n margin: 0 4px 4px 4px;\n}\nsd-toast > ._block > ._progress > ._progress-bar {\n border-radius: var(--border-radius-xl);\n height: 4px;\n transition: width 1s ease-out;\n}\nsd-toast[data-sd-theme=gray] > ._block {\n background: rgb(153.0022463699, 161.0057700366, 174.7317580236);\n}\nsd-toast[data-sd-theme=gray] > ._block > ._progress {\n background: rgb(101.0316959931, 111.1055377773, 128.3821070824);\n}\nsd-toast[data-sd-theme=gray] > ._block > ._progress > ._progress-bar {\n background: rgb(224.400673911, 226.801731011, 230.9195274071);\n}\nsd-toast[data-sd-theme=blue-gray] > ._block {\n background: rgb(144.0364277624, 161.0825504589, 184.9359809919);\n}\nsd-toast[data-sd-theme=blue-gray] > ._block > ._progress {\n background: rgb(95.4928842953, 118.7256854589, 151.2364222704);\n}\nsd-toast[data-sd-theme=blue-gray] > ._block > ._progress > ._progress-bar {\n background: rgb(227.2591069406, 231.5206376147, 237.483995248);\n}\nsd-toast[data-sd-theme=primary] > ._block {\n background: hsl(212.7907636992, 106.3271487689%, 66.8390389975%);\n}\nsd-toast[data-sd-theme=primary] > ._block > ._progress {\n background: hsl(212.7907636992, 106.3271487689%, 50.1292792481%);\n}\nsd-toast[data-sd-theme=primary] > ._block > ._progress > ._progress-bar {\n background: hsl(212.7907636992, 106.3271487689%, 91.7097597494%);\n}\nsd-toast[data-sd-theme=secondary] > ._block {\n background: hsl(212.7907636992, 106.3271487689%, 66.8390389975%);\n}\nsd-toast[data-sd-theme=secondary] > ._block > ._progress {\n background: hsl(212.7907636992, 106.3271487689%, 50.1292792481%);\n}\nsd-toast[data-sd-theme=secondary] > ._block > ._progress > ._progress-bar {\n background: hsl(212.7907636992, 106.3271487689%, 91.7097597494%);\n}\nsd-toast[data-sd-theme=info] > ._block {\n background: hsl(186.1271591177, 175.0224558865%, 34.577706736%);\n}\nsd-toast[data-sd-theme=info] > ._block > ._progress {\n background: hsl(186.1271591177, 175.0224558865%, 25.933280052%);\n}\nsd-toast[data-sd-theme=info] > ._block > ._progress > ._progress-bar {\n background: hsl(186.1271591177, 175.0224558865%, 83.644426684%);\n}\nsd-toast[data-sd-theme=success] > ._block {\n background: hsl(76.4778453101, 152.6473732821%, 35.6889214867%);\n}\nsd-toast[data-sd-theme=success] > ._block > ._progress {\n background: hsl(76.4778453101, 152.6473732821%, 26.766691115%);\n}\nsd-toast[data-sd-theme=success] > ._block > ._progress > ._progress-bar {\n background: hsl(76.4778453101, 152.6473732821%, 83.9222303717%);\n}\nsd-toast[data-sd-theme=warning] > ._block {\n background: hsl(31.4330872217, 102.5675912326%, 51.3170331393%);\n}\nsd-toast[data-sd-theme=warning] > ._block > ._progress {\n background: hsl(31.4330872217, 102.5675912326%, 38.4877748545%);\n}\nsd-toast[data-sd-theme=warning] > ._block > ._progress > ._progress-bar {\n background: hsl(31.4330872217, 102.5675912326%, 87.8292582848%);\n}\nsd-toast[data-sd-theme=danger] > ._block {\n background: hsl(358.7593862564, 101.8439024907%, 69.8357359211%);\n}\nsd-toast[data-sd-theme=danger] > ._block > ._progress {\n background: hsl(358.7593862564, 101.8439024907%, 52.3768019408%);\n}\nsd-toast[data-sd-theme=danger] > ._block > ._progress > ._progress-bar {\n background: hsl(358.7593862564, 101.8439024907%, 92.4589339803%);\n}\nsd-toast[data-sd-open=true] > ._block {\n transform: none;\n transition: var(--animation-duration) ease-out;\n transition-property: transform, opacity;\n opacity: 1;\n}\nsd-toast[data-sd-open=false] > ._block {\n transform: translateY(-100%);\n transition: var(--animation-duration) ease-in;\n transition-property: transform, opacity;\n opacity: 0;\n}\n@media all and (max-width: 520px) {\n sd-toast > ._block {\n border-radius: calc(var(--line-height) / 2);\n transform: translateY(100%);\n }\n sd-toast > ._block > ._message {\n padding: var(--gap-xs) var(--gap-default);\n }\n sd-toast[data-sd-open=false] > ._block {\n transform: translateY(100%);\n }\n}"] }]
|
|
78
83
|
}], null, { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], useProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "useProgress", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], progress: [{ type: i0.Input, args: [{ isSignal: true, alias: "progress", required: false }] }, { type: i0.Output, args: ["progressChange"] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }, { type: i0.Output, args: ["messageChange"] }] }); })();
|
|
79
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdToast, { className: "SdToast", filePath: "packages/angular/src/core/toast/sd-toast.ts", lineNumber:
|
|
84
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdToast, { className: "SdToast", filePath: "packages/angular/src/core/toast/sd-toast.ts", lineNumber: 136, forbidOrphanRendering: true }); })();
|
|
@@ -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,WA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AAC,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAuDlH,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAC9F,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,GAAG,CAAC,GAAG,SAAS;IAmBtE,OAAO,CAAC,KAAK;IA+Db,OAAO,CAAC,iBAAiB;IA0CzB,OAAO,CAAC,aAAa;IAqBrB,OAAO,CAAC,aAAa;IAsBrB,OAAO,CAAC,gBAAgB;yCAzRb,eAAe;6CAAf,eAAe;CA8R3B"}
|
|
@@ -9,7 +9,7 @@ export class SdToastProvider {
|
|
|
9
9
|
_appRef = inject(ApplicationRef);
|
|
10
10
|
_envInjector = inject(EnvironmentInjector);
|
|
11
11
|
_injector = inject(Injector);
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import { DestroyRef, effect, ElementRef, inject, Renderer2 } from "@angular/core";
|
|
2
2
|
import { setSafeStyle } from "../setSafeStyle";
|
|
3
3
|
import { Uuid } from "@simplysm/core-common";
|
|
4
|
-
import {
|
|
4
|
+
import { isTabbable } from "tabbable";
|
|
5
5
|
export function setupInvalid(getInvalidMessage) {
|
|
6
6
|
const elRef = inject(ElementRef);
|
|
7
7
|
const renderer = inject(Renderer2);
|
|
@@ -52,6 +52,7 @@ function createInputHiddenEl(renderer, hostEl) {
|
|
|
52
52
|
newEl.type = "text";
|
|
53
53
|
newEl.name = Uuid.generate().toString();
|
|
54
54
|
newEl.className = "sd-invalid-input";
|
|
55
|
+
newEl.tabIndex = -1;
|
|
55
56
|
setSafeStyle(renderer, newEl, {
|
|
56
57
|
position: "absolute",
|
|
57
58
|
left: "2px",
|
|
@@ -64,10 +65,10 @@ function createInputHiddenEl(renderer, hostEl) {
|
|
|
64
65
|
userSelect: "none",
|
|
65
66
|
});
|
|
66
67
|
renderer.listen(newEl, "focus", () => {
|
|
67
|
-
const
|
|
68
|
-
hostEl.
|
|
69
|
-
if (
|
|
70
|
-
|
|
68
|
+
const tabbableElement = (isTabbable(hostEl) ? hostEl : hostEl.findFirstTabbableChild()) ??
|
|
69
|
+
hostEl.findTabbableParent();
|
|
70
|
+
if (tabbableElement !== undefined) {
|
|
71
|
+
tabbableElement.focus();
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
renderer.appendChild(hostEl, newEl);
|
|
@@ -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,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AC,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,MAAM,KAAK,OAAO,eAAI;IACzD,UAAU,sEAA+B;IACzC,UAAU,qEAA8B;IACxC,mBAAmB,8CAAgB,CAAC,KAAK,OAAO,GAAG,MAAM,eAAI;IAC7D,aAAa,8CAAgB,CAAC,SAAS,MAAM,KAAK,CAAC,EAAE,GAAG,SAAS,eAAI;IACrE,WAAW,qEAAiD;IAC5D,gBAAgB,8CAAa;IAC7B,cAAc,8CAAY;IAC1B,YAAY,8CAAY;IACxB,SAAS,sDAAiC;IAC1C,KAAK,qEAAiD;IACtD,YAAY,0DAAmB;IAC/B,kBAAkB,8CAAgB,CAAC,UAAU,MAAM,KAAK,MAAM,eAAI;IAClE,kBAAkB,8CAAgB,CAAC,UAAU,MAAM,KAAK,MAAM,GAAG,SAAS,eAAI;IAC9E,aAAa,qEAAiD;IAG9D,WAAW,4EAA6C;IACxD,WAAW,4EAA6C;IAGxD,aAAa,2CAAkB;IAC/B,aAAa,2CAAkB;IAC/B,KAAK,oDAA2B;IAChC,WAAW,8CAAY;IAGvB,cAAc,2DAAkC;IAGhD,OAAO,CAAC,QAAQ,CAAC,
|
|
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,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AAG,IAAI;IAOjD,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAInC,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAIjC,aAAa,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI;IAIlD,aAAa,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAI5D,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;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: {
|
|
@@ -20,9 +20,9 @@ export function useSheetCellAgent(options) {
|
|
|
20
20
|
const cell = options.domAccessor.getCell(r, c);
|
|
21
21
|
if (cell == null)
|
|
22
22
|
return;
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
25
|
-
|
|
23
|
+
const tabbable = cell.findFirstTabbableChild();
|
|
24
|
+
if (tabbable !== undefined) {
|
|
25
|
+
tabbable.focus();
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
}
|
|
@@ -45,9 +45,9 @@ export function useSheetCellAgent(options) {
|
|
|
45
45
|
const targetCell = options.domAccessor.getCell(r, c);
|
|
46
46
|
if (targetCell == null)
|
|
47
47
|
return;
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
|
|
48
|
+
const tabbable = targetCell.findFirstTabbableChild();
|
|
49
|
+
if (tabbable !== undefined) {
|
|
50
|
+
tabbable.focus();
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
}
|
|
@@ -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 */ []));
|
|
@@ -45,7 +45,7 @@ function SdSidebarMenu_ng_template_4_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
45
45
|
const menu_r2 = ctx.$implicit;
|
|
46
46
|
const depth_r4 = i0.ɵɵnextContext().depth;
|
|
47
47
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
48
|
-
i0.ɵɵstyleProp("
|
|
48
|
+
i0.ɵɵstyleProp("text-indent", depth_r4 > 0 ? (depth_r4 + 1) * 0.5 : undefined, "em");
|
|
49
49
|
i0.ɵɵproperty("sdRouterLink", ctx_r2.getMenuRouterLinkOption(menu_r2))("selected", ctx_r2.getIsMenuSelected(menu_r2))("layout", depth_r4 === 0 ? ctx_r2.rootLayout() : "accordion");
|
|
50
50
|
i0.ɵɵadvance();
|
|
51
51
|
i0.ɵɵconditional(menu_r2.icon ? 1 : -1);
|
|
@@ -81,7 +81,7 @@ export class SdSidebarMenu {
|
|
|
81
81
|
static ɵfac = function SdSidebarMenu_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdSidebarMenu)(); };
|
|
82
82
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdSidebarMenu, selectors: [["sd-sidebar-menu"]], hostAttrs: [1, "flex-column", "fill"], hostVars: 1, hostBindings: function SdSidebarMenu_HostBindings(rf, ctx) { if (rf & 2) {
|
|
83
83
|
i0.ɵɵattribute("data-sd-root-layout", ctx.rootLayout());
|
|
84
|
-
} }, inputs: { menus: [1, "menus"], layout: [1, "layout"], getMenuIsSelectedFn: [1, "getMenuIsSelectedFn"] }, decls: 6, vars: 6, consts: [["itemTpl", ""], [1, "control-header", "p-default"], [1, "flex-fill", 3, "inset"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "typed"], [3, "
|
|
84
|
+
} }, inputs: { menus: [1, "menus"], layout: [1, "layout"], getMenuIsSelectedFn: [1, "getMenuIsSelectedFn"] }, decls: 6, vars: 6, consts: [["itemTpl", ""], [1, "control-header", "p-default"], [1, "flex-fill", 3, "inset"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "typed"], [3, "text-indent", "sdRouterLink", "selected", "layout"], [3, "click", "sdRouterLink", "selected", "layout"], [3, "inset"], [3, "svg"]], template: function SdSidebarMenu_Template(rf, ctx) { if (rf & 1) {
|
|
85
85
|
i0.ɵɵelementStart(0, "div", 1);
|
|
86
86
|
i0.ɵɵtext(1, "MENU");
|
|
87
87
|
i0.ɵɵelementEnd();
|
|
@@ -129,7 +129,7 @@ export class SdSidebarMenu {
|
|
|
129
129
|
<ng-template #itemTpl [typed]="itemTemplateType" let-currMenus="menus" let-depth="depth">
|
|
130
130
|
@for (menu of currMenus; track menu.codeChain.join(".")) {
|
|
131
131
|
<sd-list-item
|
|
132
|
-
[style.
|
|
132
|
+
[style.text-indent.em]="depth > 0 ? (depth + 1) * 0.5 : undefined"
|
|
133
133
|
[sdRouterLink]="getMenuRouterLinkOption(menu)"
|
|
134
134
|
(click)="onMenuClick(menu)"
|
|
135
135
|
[selected]="getIsMenuSelected(menu)"
|
package/dist/styles.css
CHANGED
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
border: 2px solid transparent;
|
|
284
284
|
}
|
|
285
285
|
*::-webkit-scrollbar-track:hover {
|
|
286
|
-
background-color: var(--theme-gray-
|
|
286
|
+
background-color: var(--theme-gray-lightest);
|
|
287
287
|
border-radius: 0.6667rem;
|
|
288
288
|
background-clip: padding-box;
|
|
289
289
|
border: 2px solid transparent;
|
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/
|
|
55
|
-
"@simplysm/
|
|
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",
|
|
@@ -47,17 +47,23 @@ export class SdCollapse {
|
|
|
47
47
|
|
|
48
48
|
contentHeight = signal(0);
|
|
49
49
|
|
|
50
|
+
private readonly _initialized = signal(false);
|
|
51
|
+
|
|
50
52
|
contentMarginTop = computed(() => {
|
|
51
53
|
return this.open() ? "" : `-${this.contentHeight()}px`;
|
|
52
54
|
});
|
|
53
55
|
|
|
54
56
|
contentTransition = computed(() => {
|
|
57
|
+
if (!this._initialized()) return "";
|
|
55
58
|
return this.open() ? "margin-top 0.1s ease-out" : "margin-top 0.1s ease-in";
|
|
56
59
|
});
|
|
57
60
|
|
|
58
61
|
constructor() {
|
|
59
62
|
afterNextRender(() => {
|
|
60
63
|
this.contentHeight.set(this._contentElRef().nativeElement.offsetHeight);
|
|
64
|
+
requestAnimationFrame(() => {
|
|
65
|
+
this._initialized.set(true);
|
|
66
|
+
});
|
|
61
67
|
});
|
|
62
68
|
|
|
63
69
|
effect(() => {
|
|
@@ -129,11 +129,11 @@ export class SdDropdown {
|
|
|
129
129
|
this._openPopup();
|
|
130
130
|
} else {
|
|
131
131
|
const popupEl = this.popupElRef().nativeElement;
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
132
|
+
const tabbable = popupEl.findFirstTabbableChild();
|
|
133
|
+
if (tabbable) {
|
|
134
134
|
event.preventDefault();
|
|
135
135
|
event.stopPropagation();
|
|
136
|
-
|
|
136
|
+
tabbable.focus();
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -261,9 +261,9 @@ export class SdDropdown {
|
|
|
261
261
|
mouseoverEl instanceof HTMLElement &&
|
|
262
262
|
(contentEl.contains(mouseoverEl) === true || popupEl.contains(mouseoverEl) === true)
|
|
263
263
|
) {
|
|
264
|
-
const
|
|
265
|
-
if (
|
|
266
|
-
|
|
264
|
+
const tabbable = popupEl.findFirstTabbableChild();
|
|
265
|
+
if (tabbable != null) {
|
|
266
|
+
tabbable.focus();
|
|
267
267
|
} else {
|
|
268
268
|
contentEl.focus();
|
|
269
269
|
}
|
|
@@ -97,12 +97,6 @@ import { setupRipple } from "../../core/ripple/setupRipple";
|
|
|
97
97
|
background: transparent;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
&[data-sd-has-children="false"] {
|
|
102
|
-
> ._content {
|
|
103
|
-
padding-left: calc(var(--gap-default) + var(--gap-sm) + 0.75em);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
100
|
}
|
|
107
101
|
`,
|
|
108
102
|
],
|
|
@@ -279,15 +279,15 @@ export class SdSelect<M extends "single" | "multi", T> {
|
|
|
279
279
|
event.preventDefault();
|
|
280
280
|
event.stopPropagation();
|
|
281
281
|
|
|
282
|
-
const
|
|
283
|
-
if (
|
|
282
|
+
const tabbableEls = tabbable(popupEl);
|
|
283
|
+
if (tabbableEls.length === 0) return;
|
|
284
284
|
|
|
285
|
-
const currIndex =
|
|
285
|
+
const currIndex = tabbableEls.indexOf(document.activeElement as HTMLElement);
|
|
286
286
|
|
|
287
287
|
if (event.key === "ArrowDown") {
|
|
288
288
|
const nextIndex = currIndex + 1;
|
|
289
|
-
if (nextIndex <
|
|
290
|
-
|
|
289
|
+
if (nextIndex < tabbableEls.length) {
|
|
290
|
+
tabbableEls[nextIndex].focus();
|
|
291
291
|
}
|
|
292
292
|
} else {
|
|
293
293
|
// ArrowUp
|
|
@@ -295,7 +295,7 @@ export class SdSelect<M extends "single" | "multi", T> {
|
|
|
295
295
|
// Return focus to dropdown trigger
|
|
296
296
|
this._dropdownElRef().nativeElement.focus();
|
|
297
297
|
} else {
|
|
298
|
-
|
|
298
|
+
tabbableEls[currIndex - 1].focus();
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
}
|
|
@@ -321,14 +321,9 @@ export class SdSelect<M extends "single" | "multi", T> {
|
|
|
321
321
|
const items = this._itemControls();
|
|
322
322
|
const currentValue = this.value();
|
|
323
323
|
|
|
324
|
-
if (currentValue == null) {
|
|
325
|
-
this._selectedItemContentHTML.set(undefined);
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
324
|
if (this.selectMode() === "multi") {
|
|
330
|
-
const arr = currentValue as T[];
|
|
331
|
-
if (arr.length === 0) {
|
|
325
|
+
const arr = currentValue as T[] | undefined;
|
|
326
|
+
if (arr == null || arr.length === 0) {
|
|
332
327
|
this._selectedItemContentHTML.set(undefined);
|
|
333
328
|
return;
|
|
334
329
|
}
|