@simplysm/angular 14.0.46 → 14.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +468 -0
- package/dist/controls/dropdown/sd-dropdown-popup.d.ts +1 -0
- package/dist/controls/dropdown/sd-dropdown-popup.d.ts.map +1 -1
- package/dist/controls/dropdown/sd-dropdown-popup.js +6 -1
- package/dist/controls/dropdown/sd-dropdown.d.ts.map +1 -1
- package/dist/controls/dropdown/sd-dropdown.js +6 -2
- package/dist/controls/select/sd-select.d.ts.map +1 -1
- package/dist/controls/select/sd-select.js +12 -34
- package/dist/core/routing/injectViewTypeSignal.d.ts +1 -1
- package/dist/core/routing/injectViewTypeSignal.d.ts.map +1 -1
- package/dist/core/routing/injectViewTypeSignal.js +15 -7
- package/dist/core/selection/useSelectionManager.d.ts +1 -0
- package/dist/core/selection/useSelectionManager.d.ts.map +1 -1
- package/dist/core/selection/useSelectionManager.js +54 -14
- package/dist/data/shared-data/sd-shared-data-select-button.d.ts +11 -5
- package/dist/data/shared-data/sd-shared-data-select-button.d.ts.map +1 -1
- package/dist/data/shared-data/sd-shared-data-select-button.js +68 -29
- package/dist/data/sheet/sd-sheet.d.ts +4 -1
- package/dist/data/sheet/sd-sheet.d.ts.map +1 -1
- package/dist/data/sheet/sd-sheet.js +23 -4
- package/dist/index.d.ts +0 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -17
- package/docs/bootstrap.md +38 -0
- package/docs/directives.md +236 -0
- package/docs/features.md +169 -0
- package/docs/pipes.md +32 -0
- package/docs/plugins.md +37 -0
- package/docs/provider-types.md +283 -0
- package/docs/providers.md +379 -0
- package/docs/recipes/crud-detail.md +860 -0
- package/docs/recipes/crud-list.md +779 -0
- package/docs/recipes/data-select-button.md +319 -0
- package/docs/recipes/page-modal-container.md +178 -0
- package/docs/styling.md +222 -0
- package/docs/type-utilities.md +250 -0
- package/docs/ui-data.md +333 -0
- package/docs/ui-form.md +502 -0
- package/docs/ui-layout.md +140 -0
- package/docs/ui-navigation.md +273 -0
- package/docs/ui-overlay.md +157 -0
- package/docs/ui-visual.md +127 -0
- package/docs/utils.md +244 -0
- package/package.json +27 -26
- package/src/controls/dropdown/sd-dropdown-popup.ts +6 -2
- package/src/controls/dropdown/sd-dropdown.ts +3 -4
- package/src/controls/select/sd-select.ts +6 -30
- package/src/core/routing/injectViewTypeSignal.ts +17 -10
- package/src/core/selection/useSelectionManager.ts +62 -12
- package/src/data/shared-data/sd-shared-data-select-button.ts +49 -14
- package/src/data/sheet/sd-sheet.ts +21 -0
- package/src/index.ts +0 -29
- package/dist/core/commons.d.ts +0 -2
- package/dist/core/commons.d.ts.map +0 -1
- package/dist/core/commons.js +0 -4
- package/dist/core/injectParent.d.ts +0 -7
- package/dist/core/injectParent.d.ts.map +0 -1
- package/dist/core/injectParent.js +0 -30
- package/dist/core/selection/setupCumulateSelectedKeys.d.ts +0 -9
- package/dist/core/selection/setupCumulateSelectedKeys.d.ts.map +0 -1
- package/dist/core/selection/setupCumulateSelectedKeys.js +0 -27
- package/dist/core/withBusy.d.ts +0 -3
- package/dist/core/withBusy.d.ts.map +0 -1
- package/dist/core/withBusy.js +0 -9
- package/dist/data/data-detail/sd-data-detail.base.d.ts +0 -51
- package/dist/data/data-detail/sd-data-detail.base.d.ts.map +0 -1
- package/dist/data/data-detail/sd-data-detail.base.js +0 -127
- package/dist/data/data-detail/sd-data-detail.d.ts +0 -30
- package/dist/data/data-detail/sd-data-detail.d.ts.map +0 -1
- package/dist/data/data-detail/sd-data-detail.js +0 -495
- package/dist/data/data-select-button/sd-data-select-button.base.d.ts +0 -24
- package/dist/data/data-select-button/sd-data-select-button.base.d.ts.map +0 -1
- package/dist/data/data-select-button/sd-data-select-button.base.js +0 -68
- package/dist/data/data-select-button/sd-data-select-button.d.ts +0 -15
- package/dist/data/data-select-button/sd-data-select-button.d.ts.map +0 -1
- package/dist/data/data-select-button/sd-data-select-button.js +0 -152
- package/dist/data/data-sheet/injectDataSheetExcelManager.d.ts +0 -14
- package/dist/data/data-sheet/injectDataSheetExcelManager.d.ts.map +0 -1
- package/dist/data/data-sheet/injectDataSheetExcelManager.js +0 -31
- package/dist/data/data-sheet/injectDataSheetInlineEditManager.d.ts +0 -26
- package/dist/data/data-sheet/injectDataSheetInlineEditManager.d.ts.map +0 -1
- package/dist/data/data-sheet/injectDataSheetInlineEditManager.js +0 -54
- package/dist/data/data-sheet/injectDataSheetModalEditManager.d.ts +0 -19
- package/dist/data/data-sheet/injectDataSheetModalEditManager.d.ts.map +0 -1
- package/dist/data/data-sheet/injectDataSheetModalEditManager.js +0 -44
- package/dist/data/data-sheet/injectDataSheetRefreshManager.d.ts +0 -25
- package/dist/data/data-sheet/injectDataSheetRefreshManager.d.ts.map +0 -1
- package/dist/data/data-sheet/injectDataSheetRefreshManager.js +0 -50
- package/dist/data/data-sheet/sd-data-sheet-column.d.ts +0 -8
- package/dist/data/data-sheet/sd-data-sheet-column.d.ts.map +0 -1
- package/dist/data/data-sheet/sd-data-sheet-column.js +0 -15
- package/dist/data/data-sheet/sd-data-sheet.base.d.ts +0 -75
- package/dist/data/data-sheet/sd-data-sheet.base.d.ts.map +0 -1
- package/dist/data/data-sheet/sd-data-sheet.base.js +0 -188
- package/dist/data/data-sheet/sd-data-sheet.d.ts +0 -49
- package/dist/data/data-sheet/sd-data-sheet.d.ts.map +0 -1
- package/dist/data/data-sheet/sd-data-sheet.js +0 -968
- package/dist/data/data-sheet/sd-data-sheet.types.d.ts +0 -17
- package/dist/data/data-sheet/sd-data-sheet.types.d.ts.map +0 -1
- package/dist/data/data-sheet/sd-data-sheet.types.js +0 -1
- package/dist/data/data-sheet/setupCloserWhenSingleSelectionChange.d.ts +0 -9
- package/dist/data/data-sheet/setupCloserWhenSingleSelectionChange.d.ts.map +0 -1
- package/dist/data/data-sheet/setupCloserWhenSingleSelectionChange.js +0 -20
- package/dist/data/data-sheet/useDataSheetFilterManager.d.ts +0 -13
- package/dist/data/data-sheet/useDataSheetFilterManager.d.ts.map +0 -1
- package/dist/data/data-sheet/useDataSheetFilterManager.js +0 -19
- package/dist/layout/base-container/sd-base-container.d.ts +0 -27
- package/dist/layout/base-container/sd-base-container.d.ts.map +0 -1
- package/dist/layout/base-container/sd-base-container.js +0 -193
- package/src/core/commons.ts +0 -4
- package/src/core/injectParent.ts +0 -45
- package/src/core/selection/setupCumulateSelectedKeys.ts +0 -38
- package/src/core/withBusy.ts +0 -13
- package/src/data/data-detail/sd-data-detail.base.ts +0 -187
- package/src/data/data-detail/sd-data-detail.ts +0 -237
- package/src/data/data-select-button/sd-data-select-button.base.ts +0 -104
- package/src/data/data-select-button/sd-data-select-button.ts +0 -105
- package/src/data/data-sheet/injectDataSheetExcelManager.ts +0 -57
- package/src/data/data-sheet/injectDataSheetInlineEditManager.ts +0 -89
- package/src/data/data-sheet/injectDataSheetModalEditManager.ts +0 -76
- package/src/data/data-sheet/injectDataSheetRefreshManager.ts +0 -90
- package/src/data/data-sheet/sd-data-sheet-column.ts +0 -10
- package/src/data/data-sheet/sd-data-sheet.base.ts +0 -294
- package/src/data/data-sheet/sd-data-sheet.ts +0 -479
- package/src/data/data-sheet/sd-data-sheet.types.ts +0 -18
- package/src/data/data-sheet/setupCloserWhenSingleSelectionChange.ts +0 -29
- package/src/data/data-sheet/useDataSheetFilterManager.ts +0 -30
- package/src/layout/base-container/sd-base-container.ts +0 -121
|
@@ -1,495 +0,0 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, contentChild, effect, TemplateRef, viewChild, ViewEncapsulation, } from "@angular/core";
|
|
3
|
-
import { FormatPipe } from "../../core/format.pipe";
|
|
4
|
-
import { injectParent } from "../../core/injectParent";
|
|
5
|
-
import { SdButton } from "../../controls/button/sd-button";
|
|
6
|
-
import { SdAnchor } from "../../controls/button/sd-anchor";
|
|
7
|
-
import { SdForm } from "../../controls/form/sd-form";
|
|
8
|
-
import { SdBaseContainer } from "../../layout/base-container/sd-base-container";
|
|
9
|
-
import { NgIcon } from "@ng-icons/core";
|
|
10
|
-
import { tablerDeviceFloppy, tablerEraser, tablerRefresh, tablerRestore, } from "@ng-icons/tabler-icons";
|
|
11
|
-
import { SdDataDetailBase } from "./sd-data-detail.base";
|
|
12
|
-
import { SdCommandDirective } from "../../core/commands/sd-command";
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
import * as i1 from "../../core/commands/sd-command";
|
|
15
|
-
const _c0 = ["toolTpl"];
|
|
16
|
-
const _c1 = ["prevTpl"];
|
|
17
|
-
const _c2 = ["contentTpl"];
|
|
18
|
-
const _c3 = ["nextTpl"];
|
|
19
|
-
const _c4 = ["formCtrl"];
|
|
20
|
-
const _c5 = ["modalActionTpl"];
|
|
21
|
-
function SdDataDetail_ng_template_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
22
|
-
const _r2 = i0.ɵɵgetCurrentView();
|
|
23
|
-
i0.ɵɵelementStart(0, "sd-button", 7);
|
|
24
|
-
i0.ɵɵlistener("click", function SdDataDetail_ng_template_1_Conditional_0_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onSubmitButtonClick()); });
|
|
25
|
-
i0.ɵɵelement(1, "ng-icon", 8);
|
|
26
|
-
i0.ɵɵtext(2, " \uC800\uC7A5 ");
|
|
27
|
-
i0.ɵɵelementStart(3, "small");
|
|
28
|
-
i0.ɵɵtext(4, "(CTRL+S)");
|
|
29
|
-
i0.ɵɵelementEnd()();
|
|
30
|
-
} if (rf & 2) {
|
|
31
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
32
|
-
i0.ɵɵproperty("theme", "link-primary");
|
|
33
|
-
i0.ɵɵadvance();
|
|
34
|
-
i0.ɵɵproperty("svg", ctx_r2.icons.tablerDeviceFloppy);
|
|
35
|
-
} }
|
|
36
|
-
function SdDataDetail_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
37
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
38
|
-
i0.ɵɵconditionalCreate(0, SdDataDetail_ng_template_1_Conditional_0_Template, 5, 2, "sd-button", 6);
|
|
39
|
-
i0.ɵɵelementStart(1, "sd-button", 7);
|
|
40
|
-
i0.ɵɵlistener("click", function SdDataDetail_ng_template_1_Template_sd_button_click_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onRefreshButtonClick()); });
|
|
41
|
-
i0.ɵɵelement(2, "ng-icon", 8);
|
|
42
|
-
i0.ɵɵtext(3, " \uC0C8\uB85C\uACE0\uCE68 ");
|
|
43
|
-
i0.ɵɵelementStart(4, "small");
|
|
44
|
-
i0.ɵɵtext(5, "(CTRL+ALT+L)");
|
|
45
|
-
i0.ɵɵelementEnd()();
|
|
46
|
-
} if (rf & 2) {
|
|
47
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
48
|
-
i0.ɵɵconditional(ctx_r2.parent.canEdit() && ctx_r2.parent.submit ? 0 : -1);
|
|
49
|
-
i0.ɵɵadvance();
|
|
50
|
-
i0.ɵɵproperty("theme", "link-info");
|
|
51
|
-
i0.ɵɵadvance();
|
|
52
|
-
i0.ɵɵproperty("svg", ctx_r2.icons.tablerRefresh);
|
|
53
|
-
} }
|
|
54
|
-
function SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
-
const _r5 = i0.ɵɵgetCurrentView();
|
|
56
|
-
i0.ɵɵelementStart(0, "sd-button", 7);
|
|
57
|
-
i0.ɵɵlistener("click", function SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_0_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.onSubmitButtonClick()); });
|
|
58
|
-
i0.ɵɵelement(1, "ng-icon", 8);
|
|
59
|
-
i0.ɵɵtext(2, " \uC800\uC7A5 ");
|
|
60
|
-
i0.ɵɵelementStart(3, "small");
|
|
61
|
-
i0.ɵɵtext(4, "(CTRL+S)");
|
|
62
|
-
i0.ɵɵelementEnd()();
|
|
63
|
-
i0.ɵɵelementStart(5, "sd-button", 7);
|
|
64
|
-
i0.ɵɵlistener("click", function SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_0_Template_sd_button_click_5_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.onRefreshButtonClick()); });
|
|
65
|
-
i0.ɵɵelement(6, "ng-icon", 8);
|
|
66
|
-
i0.ɵɵtext(7, " \uC0C8\uB85C\uACE0\uCE68 ");
|
|
67
|
-
i0.ɵɵelementStart(8, "small");
|
|
68
|
-
i0.ɵɵtext(9, "(CTRL+ALT+L)");
|
|
69
|
-
i0.ɵɵelementEnd()();
|
|
70
|
-
} if (rf & 2) {
|
|
71
|
-
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
72
|
-
i0.ɵɵproperty("theme", "primary");
|
|
73
|
-
i0.ɵɵadvance();
|
|
74
|
-
i0.ɵɵproperty("svg", ctx_r2.icons.tablerDeviceFloppy);
|
|
75
|
-
i0.ɵɵadvance(4);
|
|
76
|
-
i0.ɵɵproperty("theme", "info");
|
|
77
|
-
i0.ɵɵadvance();
|
|
78
|
-
i0.ɵɵproperty("svg", ctx_r2.icons.tablerRefresh);
|
|
79
|
-
} }
|
|
80
|
-
function SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
81
|
-
const _r6 = i0.ɵɵgetCurrentView();
|
|
82
|
-
i0.ɵɵelementStart(0, "sd-button", 7);
|
|
83
|
-
i0.ɵɵlistener("click", function SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_1_Conditional_0_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.onRestoreButtonClick()); });
|
|
84
|
-
i0.ɵɵelement(1, "ng-icon", 8);
|
|
85
|
-
i0.ɵɵtext(2, " \uBCF5\uAD6C ");
|
|
86
|
-
i0.ɵɵelementEnd();
|
|
87
|
-
} if (rf & 2) {
|
|
88
|
-
const ctx_r2 = i0.ɵɵnextContext(5);
|
|
89
|
-
i0.ɵɵproperty("theme", "warning");
|
|
90
|
-
i0.ɵɵadvance();
|
|
91
|
-
i0.ɵɵproperty("svg", ctx_r2.icons.tablerRestore);
|
|
92
|
-
} }
|
|
93
|
-
function SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
94
|
-
const _r7 = i0.ɵɵgetCurrentView();
|
|
95
|
-
i0.ɵɵelementStart(0, "sd-button", 7);
|
|
96
|
-
i0.ɵɵlistener("click", function SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_1_Conditional_1_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.onDeleteButtonClick()); });
|
|
97
|
-
i0.ɵɵelement(1, "ng-icon", 8);
|
|
98
|
-
i0.ɵɵtext(2, " \uC0AD\uC81C ");
|
|
99
|
-
i0.ɵɵelementEnd();
|
|
100
|
-
} if (rf & 2) {
|
|
101
|
-
const ctx_r2 = i0.ɵɵnextContext(5);
|
|
102
|
-
i0.ɵɵproperty("theme", "danger");
|
|
103
|
-
i0.ɵɵadvance();
|
|
104
|
-
i0.ɵɵproperty("svg", ctx_r2.icons.tablerEraser);
|
|
105
|
-
} }
|
|
106
|
-
function SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
107
|
-
i0.ɵɵconditionalCreate(0, SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_1_Conditional_0_Template, 3, 2, "sd-button", 6)(1, SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_1_Conditional_1_Template, 3, 2, "sd-button", 6);
|
|
108
|
-
} if (rf & 2) {
|
|
109
|
-
let tmp_7_0;
|
|
110
|
-
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
111
|
-
i0.ɵɵconditional(((tmp_7_0 = ctx_r2.parent.dataInfo()) == null ? null : tmp_7_0.isDeleted) ? 0 : 1);
|
|
112
|
-
} }
|
|
113
|
-
function SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
114
|
-
i0.ɵɵconditionalCreate(0, SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_0_Template, 10, 4);
|
|
115
|
-
i0.ɵɵconditionalCreate(1, SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Conditional_1_Template, 2, 1);
|
|
116
|
-
} if (rf & 2) {
|
|
117
|
-
let tmp_7_0;
|
|
118
|
-
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
119
|
-
i0.ɵɵconditional(ctx_r2.parent.submit ? 0 : -1);
|
|
120
|
-
i0.ɵɵadvance();
|
|
121
|
-
i0.ɵɵconditional(!((tmp_7_0 = ctx_r2.parent.dataInfo()) == null ? null : tmp_7_0.isNew) && ctx_r2.parent.toggleDelete && (!ctx_r2.parent.canDelete || ctx_r2.parent.canDelete()) ? 1 : -1);
|
|
122
|
-
} }
|
|
123
|
-
function SdDataDetail_ng_template_3_Conditional_1_ng_template_2_Template(rf, ctx) { }
|
|
124
|
-
function SdDataDetail_ng_template_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
125
|
-
i0.ɵɵelementStart(0, "div", 10);
|
|
126
|
-
i0.ɵɵconditionalCreate(1, SdDataDetail_ng_template_3_Conditional_1_Conditional_1_Template, 2, 2);
|
|
127
|
-
i0.ɵɵtemplate(2, SdDataDetail_ng_template_3_Conditional_1_ng_template_2_Template, 0, 0, "ng-template", 13);
|
|
128
|
-
i0.ɵɵelementEnd();
|
|
129
|
-
} if (rf & 2) {
|
|
130
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
131
|
-
i0.ɵɵadvance();
|
|
132
|
-
i0.ɵɵconditional(ctx_r2.parent.viewType() === "control" && ctx_r2.parent.canEdit() ? 1 : -1);
|
|
133
|
-
i0.ɵɵadvance();
|
|
134
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.toolTplRef() ?? null);
|
|
135
|
-
} }
|
|
136
|
-
function SdDataDetail_ng_template_3_Conditional_2_ng_template_1_Template(rf, ctx) { }
|
|
137
|
-
function SdDataDetail_ng_template_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
138
|
-
i0.ɵɵelementStart(0, "div");
|
|
139
|
-
i0.ɵɵtemplate(1, SdDataDetail_ng_template_3_Conditional_2_ng_template_1_Template, 0, 0, "ng-template", 13);
|
|
140
|
-
i0.ɵɵelementEnd();
|
|
141
|
-
} if (rf & 2) {
|
|
142
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
143
|
-
i0.ɵɵadvance();
|
|
144
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.prevTplRef() ?? null);
|
|
145
|
-
} }
|
|
146
|
-
function SdDataDetail_ng_template_3_ng_template_6_Template(rf, ctx) { }
|
|
147
|
-
function SdDataDetail_ng_template_3_Conditional_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
148
|
-
i0.ɵɵtext(0);
|
|
149
|
-
i0.ɵɵpipe(1, "format");
|
|
150
|
-
} if (rf & 2) {
|
|
151
|
-
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
152
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(1, 1, ctx_r2.parent.dataInfo().lastModifiedAt, "yyyy-MM-dd HH:mm"), " ");
|
|
153
|
-
} }
|
|
154
|
-
function SdDataDetail_ng_template_3_Conditional_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
155
|
-
i0.ɵɵtext(0);
|
|
156
|
-
} if (rf & 2) {
|
|
157
|
-
let tmp_6_0;
|
|
158
|
-
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
159
|
-
i0.ɵɵtextInterpolate1(" (", (tmp_6_0 = ctx_r2.parent.dataInfo()) == null ? null : tmp_6_0.lastModifiedBy, ") ");
|
|
160
|
-
} }
|
|
161
|
-
function SdDataDetail_ng_template_3_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
162
|
-
i0.ɵɵelementStart(0, "div", 15);
|
|
163
|
-
i0.ɵɵtext(1, " \uCD5C\uC885\uC218\uC815: ");
|
|
164
|
-
i0.ɵɵconditionalCreate(2, SdDataDetail_ng_template_3_Conditional_7_Conditional_2_Template, 2, 4);
|
|
165
|
-
i0.ɵɵconditionalCreate(3, SdDataDetail_ng_template_3_Conditional_7_Conditional_3_Template, 1, 1);
|
|
166
|
-
i0.ɵɵelementEnd();
|
|
167
|
-
} if (rf & 2) {
|
|
168
|
-
let tmp_6_0;
|
|
169
|
-
let tmp_7_0;
|
|
170
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
171
|
-
i0.ɵɵclassProp("bg-theme-gray-lightest", ctx_r2.parent.viewType() === "modal");
|
|
172
|
-
i0.ɵɵadvance(2);
|
|
173
|
-
i0.ɵɵconditional(((tmp_6_0 = ctx_r2.parent.dataInfo()) == null ? null : tmp_6_0.lastModifiedAt) ? 2 : -1);
|
|
174
|
-
i0.ɵɵadvance();
|
|
175
|
-
i0.ɵɵconditional(((tmp_7_0 = ctx_r2.parent.dataInfo()) == null ? null : tmp_7_0.lastModifiedBy) ? 3 : -1);
|
|
176
|
-
} }
|
|
177
|
-
function SdDataDetail_ng_template_3_Conditional_8_ng_template_1_Template(rf, ctx) { }
|
|
178
|
-
function SdDataDetail_ng_template_3_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
179
|
-
i0.ɵɵelementStart(0, "div");
|
|
180
|
-
i0.ɵɵtemplate(1, SdDataDetail_ng_template_3_Conditional_8_ng_template_1_Template, 0, 0, "ng-template", 13);
|
|
181
|
-
i0.ɵɵelementEnd();
|
|
182
|
-
} if (rf & 2) {
|
|
183
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
184
|
-
i0.ɵɵadvance();
|
|
185
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.nextTplRef() ?? null);
|
|
186
|
-
} }
|
|
187
|
-
function SdDataDetail_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
188
|
-
const _r4 = i0.ɵɵgetCurrentView();
|
|
189
|
-
i0.ɵɵelementStart(0, "div", 9);
|
|
190
|
-
i0.ɵɵconditionalCreate(1, SdDataDetail_ng_template_3_Conditional_1_Template, 3, 2, "div", 10);
|
|
191
|
-
i0.ɵɵconditionalCreate(2, SdDataDetail_ng_template_3_Conditional_2_Template, 2, 1, "div");
|
|
192
|
-
i0.ɵɵelementStart(3, "div", 11)(4, "sd-form", 12, 2);
|
|
193
|
-
i0.ɵɵlistener("formSubmit", function SdDataDetail_ng_template_3_Template_sd_form_formSubmit_4_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSubmit()); });
|
|
194
|
-
i0.ɵɵtemplate(6, SdDataDetail_ng_template_3_ng_template_6_Template, 0, 0, "ng-template", 13);
|
|
195
|
-
i0.ɵɵelementEnd()();
|
|
196
|
-
i0.ɵɵconditionalCreate(7, SdDataDetail_ng_template_3_Conditional_7_Template, 4, 4, "div", 14);
|
|
197
|
-
i0.ɵɵconditionalCreate(8, SdDataDetail_ng_template_3_Conditional_8_Template, 2, 1, "div");
|
|
198
|
-
i0.ɵɵelementEnd();
|
|
199
|
-
} if (rf & 2) {
|
|
200
|
-
let tmp_7_0;
|
|
201
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
202
|
-
i0.ɵɵadvance();
|
|
203
|
-
i0.ɵɵconditional(ctx_r2.parent.viewType() === "control" && ctx_r2.parent.canEdit() || ctx_r2.toolTplRef() ? 1 : -1);
|
|
204
|
-
i0.ɵɵadvance();
|
|
205
|
-
i0.ɵɵconditional(ctx_r2.prevTplRef() ? 2 : -1);
|
|
206
|
-
i0.ɵɵadvance(4);
|
|
207
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.contentTplRef());
|
|
208
|
-
i0.ɵɵadvance();
|
|
209
|
-
i0.ɵɵconditional(((tmp_7_0 = ctx_r2.parent.dataInfo()) == null ? null : tmp_7_0.lastModifiedAt) || ((tmp_7_0 = ctx_r2.parent.dataInfo()) == null ? null : tmp_7_0.lastModifiedBy) ? 7 : -1);
|
|
210
|
-
i0.ɵɵadvance();
|
|
211
|
-
i0.ɵɵconditional(ctx_r2.nextTplRef() ? 8 : -1);
|
|
212
|
-
} }
|
|
213
|
-
function SdDataDetail_Conditional_5_ng_template_0_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
214
|
-
const _r9 = i0.ɵɵgetCurrentView();
|
|
215
|
-
i0.ɵɵelementStart(0, "sd-button", 18);
|
|
216
|
-
i0.ɵɵlistener("click", function SdDataDetail_Conditional_5_ng_template_0_Conditional_1_Conditional_0_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.onRestoreButtonClick()); });
|
|
217
|
-
i0.ɵɵtext(1, " \uBCF5\uAD6C ");
|
|
218
|
-
i0.ɵɵelementEnd();
|
|
219
|
-
} if (rf & 2) {
|
|
220
|
-
i0.ɵɵproperty("size", "sm")("theme", "warning");
|
|
221
|
-
} }
|
|
222
|
-
function SdDataDetail_Conditional_5_ng_template_0_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
223
|
-
const _r10 = i0.ɵɵgetCurrentView();
|
|
224
|
-
i0.ɵɵelementStart(0, "sd-button", 18);
|
|
225
|
-
i0.ɵɵlistener("click", function SdDataDetail_Conditional_5_ng_template_0_Conditional_1_Conditional_1_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.onDeleteButtonClick()); });
|
|
226
|
-
i0.ɵɵtext(1, " \uC0AD\uC81C ");
|
|
227
|
-
i0.ɵɵelementEnd();
|
|
228
|
-
} if (rf & 2) {
|
|
229
|
-
i0.ɵɵproperty("size", "sm")("theme", "danger");
|
|
230
|
-
} }
|
|
231
|
-
function SdDataDetail_Conditional_5_ng_template_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
232
|
-
i0.ɵɵconditionalCreate(0, SdDataDetail_Conditional_5_ng_template_0_Conditional_1_Conditional_0_Template, 2, 2, "sd-button", 19)(1, SdDataDetail_Conditional_5_ng_template_0_Conditional_1_Conditional_1_Template, 2, 2, "sd-button", 19);
|
|
233
|
-
} if (rf & 2) {
|
|
234
|
-
let tmp_7_0;
|
|
235
|
-
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
236
|
-
i0.ɵɵconditional(((tmp_7_0 = ctx_r2.parent.dataInfo()) == null ? null : tmp_7_0.isDeleted) ? 0 : 1);
|
|
237
|
-
} }
|
|
238
|
-
function SdDataDetail_Conditional_5_ng_template_0_Template(rf, ctx) { if (rf & 1) {
|
|
239
|
-
const _r8 = i0.ɵɵgetCurrentView();
|
|
240
|
-
i0.ɵɵelementStart(0, "div", 16);
|
|
241
|
-
i0.ɵɵconditionalCreate(1, SdDataDetail_Conditional_5_ng_template_0_Conditional_1_Template, 2, 1);
|
|
242
|
-
i0.ɵɵelementStart(2, "div", 17)(3, "sd-button", 18);
|
|
243
|
-
i0.ɵɵlistener("click", function SdDataDetail_Conditional_5_ng_template_0_Template_sd_button_click_3_listener() { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onSubmitButtonClick()); });
|
|
244
|
-
i0.ɵɵtext(4, " \uD655\uC778 ");
|
|
245
|
-
i0.ɵɵelementEnd()()();
|
|
246
|
-
} if (rf & 2) {
|
|
247
|
-
let tmp_6_0;
|
|
248
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
249
|
-
i0.ɵɵadvance();
|
|
250
|
-
i0.ɵɵconditional(!((tmp_6_0 = ctx_r2.parent.dataInfo()) == null ? null : tmp_6_0.isNew) && ctx_r2.parent.toggleDelete && (!ctx_r2.parent.canDelete || ctx_r2.parent.canDelete()) ? 1 : -1);
|
|
251
|
-
i0.ɵɵadvance(2);
|
|
252
|
-
i0.ɵɵproperty("size", "sm")("theme", "primary");
|
|
253
|
-
} }
|
|
254
|
-
function SdDataDetail_Conditional_5_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
255
|
-
const _r11 = i0.ɵɵgetCurrentView();
|
|
256
|
-
i0.ɵɵelementStart(0, "sd-anchor", 20);
|
|
257
|
-
i0.ɵɵlistener("click", function SdDataDetail_Conditional_5_ng_template_2_Template_sd_anchor_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onRefreshButtonClick()); });
|
|
258
|
-
i0.ɵɵelement(1, "ng-icon", 8);
|
|
259
|
-
i0.ɵɵelementEnd();
|
|
260
|
-
} if (rf & 2) {
|
|
261
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
262
|
-
i0.ɵɵproperty("theme", "gray");
|
|
263
|
-
i0.ɵɵadvance();
|
|
264
|
-
i0.ɵɵproperty("svg", ctx_r2.icons.tablerRefresh);
|
|
265
|
-
} }
|
|
266
|
-
function SdDataDetail_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
267
|
-
i0.ɵɵtemplate(0, SdDataDetail_Conditional_5_ng_template_0_Template, 5, 3, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor)(2, SdDataDetail_Conditional_5_ng_template_2_Template, 2, 2, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
|
|
268
|
-
} }
|
|
269
|
-
//#region SdDataDetail
|
|
270
|
-
export class SdDataDetail {
|
|
271
|
-
parent = injectParent();
|
|
272
|
-
formCtrl = viewChild("formCtrl", ...(ngDevMode ? [{ debugName: "formCtrl" }] : /* istanbul ignore next */ []));
|
|
273
|
-
toolTplRef = contentChild("toolTpl", { ...(ngDevMode ? { debugName: "toolTplRef" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
274
|
-
prevTplRef = contentChild("prevTpl", { ...(ngDevMode ? { debugName: "prevTplRef" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
275
|
-
contentTplRef = contentChild.required("contentTpl", { read: TemplateRef });
|
|
276
|
-
nextTplRef = contentChild("nextTpl", { ...(ngDevMode ? { debugName: "nextTplRef" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
277
|
-
modalActionTplRef = viewChild("modalActionTpl", { ...(ngDevMode ? { debugName: "modalActionTplRef" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
278
|
-
constructor() {
|
|
279
|
-
effect(() => {
|
|
280
|
-
this.parent.actionTplRef = this.modalActionTplRef();
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
async onRefreshButtonClick() {
|
|
284
|
-
await this.parent.doRefresh();
|
|
285
|
-
}
|
|
286
|
-
async onDeleteButtonClick() {
|
|
287
|
-
await this.parent.doToggleDelete(true);
|
|
288
|
-
}
|
|
289
|
-
async onRestoreButtonClick() {
|
|
290
|
-
await this.parent.doToggleDelete(false);
|
|
291
|
-
}
|
|
292
|
-
onSubmitButtonClick() {
|
|
293
|
-
this.formCtrl()?.requestSubmit();
|
|
294
|
-
}
|
|
295
|
-
async onSubmit() {
|
|
296
|
-
await this.parent.doSubmit({ permCheck: true });
|
|
297
|
-
}
|
|
298
|
-
icons = {
|
|
299
|
-
tablerDeviceFloppy,
|
|
300
|
-
tablerRefresh,
|
|
301
|
-
tablerRestore,
|
|
302
|
-
tablerEraser,
|
|
303
|
-
};
|
|
304
|
-
static ɵfac = function SdDataDetail_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdDataDetail)(); };
|
|
305
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdDataDetail, selectors: [["sd-data-detail"]], contentQueries: function SdDataDetail_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
306
|
-
i0.ɵɵcontentQuerySignal(dirIndex, ctx.toolTplRef, _c0, 5, TemplateRef)(dirIndex, ctx.prevTplRef, _c1, 5, TemplateRef)(dirIndex, ctx.contentTplRef, _c2, 5, TemplateRef)(dirIndex, ctx.nextTplRef, _c3, 5, TemplateRef);
|
|
307
|
-
} if (rf & 2) {
|
|
308
|
-
i0.ɵɵqueryAdvance(4);
|
|
309
|
-
} }, viewQuery: function SdDataDetail_Query(rf, ctx) { if (rf & 1) {
|
|
310
|
-
i0.ɵɵviewQuerySignal(ctx.formCtrl, _c4, 5)(ctx.modalActionTplRef, _c5, 5, TemplateRef);
|
|
311
|
-
} if (rf & 2) {
|
|
312
|
-
i0.ɵɵqueryAdvance(2);
|
|
313
|
-
} }, hostBindings: function SdDataDetail_HostBindings(rf, ctx) { if (rf & 1) {
|
|
314
|
-
i0.ɵɵlistener("sdRefreshCommand", function SdDataDetail_sdRefreshCommand_HostBindingHandler() { return ctx.onRefreshButtonClick(); })("sdSaveCommand", function SdDataDetail_sdSaveCommand_HostBindingHandler() { return ctx.onSubmitButtonClick(); });
|
|
315
|
-
} }, features: [i0.ɵɵHostDirectivesFeature([{ directive: i1.SdCommandDirective, outputs: ["sdRefreshCommand", "sdRefreshCommand", "sdSaveCommand", "sdSaveCommand"] }])], decls: 6, vars: 6, consts: [["pageTopbarTpl", ""], ["contentTpl", ""], ["formCtrl", ""], ["modalBottomTpl", ""], ["modalActionTpl", ""], [3, "busy", "busyMessage", "viewType", "initialized", "restricted"], [3, "theme"], [3, "click", "theme"], [3, "svg"], [1, "flex-column", "fill"], [1, "p-default", "flex-row", "gap-default", "bdb", "bdb-theme-gray-lightest"], [1, "flex-fill"], [3, "formSubmit"], [3, "ngTemplateOutlet"], [1, "p-sm-default", 3, "bg-theme-gray-lightest"], [1, "p-sm-default"], [1, "p-sm-default", "flex-row", "gap-sm"], [1, "flex-fill", "flex-row", "gap-sm", "main-align-end"], [3, "click", "size", "theme"], [3, "size", "theme"], ["title", "\uC0C8\uB85C\uACE0\uCE68(CTRL+ALT+L)", 1, "p-sm-default", 3, "click", "theme"]], template: function SdDataDetail_Template(rf, ctx) { if (rf & 1) {
|
|
316
|
-
i0.ɵɵelementStart(0, "sd-base-container", 5);
|
|
317
|
-
i0.ɵɵtemplate(1, SdDataDetail_ng_template_1_Template, 6, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(3, SdDataDetail_ng_template_3_Template, 9, 5, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
318
|
-
i0.ɵɵconditionalCreate(5, SdDataDetail_Conditional_5_Template, 4, 0);
|
|
319
|
-
i0.ɵɵelementEnd();
|
|
320
|
-
} if (rf & 2) {
|
|
321
|
-
i0.ɵɵproperty("busy", ctx.parent.busyCount() > 0)("busyMessage", ctx.parent.busyMessage())("viewType", ctx.parent.viewType())("initialized", ctx.parent.initialized())("restricted", !ctx.parent.canUse());
|
|
322
|
-
i0.ɵɵadvance(5);
|
|
323
|
-
i0.ɵɵconditional(ctx.parent.canEdit() ? 5 : -1);
|
|
324
|
-
} }, dependencies: [SdBaseContainer,
|
|
325
|
-
SdForm,
|
|
326
|
-
SdButton,
|
|
327
|
-
NgTemplateOutlet,
|
|
328
|
-
SdAnchor,
|
|
329
|
-
NgIcon,
|
|
330
|
-
FormatPipe], encapsulation: 2, changeDetection: 0 });
|
|
331
|
-
}
|
|
332
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdDataDetail, [{
|
|
333
|
-
type: Component,
|
|
334
|
-
args: [{
|
|
335
|
-
selector: "sd-data-detail",
|
|
336
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
337
|
-
encapsulation: ViewEncapsulation.None,
|
|
338
|
-
standalone: true,
|
|
339
|
-
imports: [
|
|
340
|
-
SdBaseContainer,
|
|
341
|
-
SdForm,
|
|
342
|
-
SdButton,
|
|
343
|
-
NgTemplateOutlet,
|
|
344
|
-
FormatPipe,
|
|
345
|
-
SdAnchor,
|
|
346
|
-
NgIcon,
|
|
347
|
-
],
|
|
348
|
-
hostDirectives: [
|
|
349
|
-
{ directive: SdCommandDirective, outputs: ["sdRefreshCommand", "sdSaveCommand"] },
|
|
350
|
-
],
|
|
351
|
-
host: {
|
|
352
|
-
"(sdRefreshCommand)": "onRefreshButtonClick()",
|
|
353
|
-
"(sdSaveCommand)": "onSubmitButtonClick()",
|
|
354
|
-
},
|
|
355
|
-
template: `
|
|
356
|
-
<sd-base-container
|
|
357
|
-
[busy]="parent.busyCount() > 0"
|
|
358
|
-
[busyMessage]="parent.busyMessage()"
|
|
359
|
-
[viewType]="parent.viewType()"
|
|
360
|
-
[initialized]="parent.initialized()"
|
|
361
|
-
[restricted]="!parent.canUse()"
|
|
362
|
-
>
|
|
363
|
-
<ng-template #pageTopbarTpl>
|
|
364
|
-
@if (parent.canEdit() && parent.submit) {
|
|
365
|
-
<sd-button [theme]="'link-primary'" (click)="onSubmitButtonClick()">
|
|
366
|
-
<ng-icon [svg]="icons.tablerDeviceFloppy" />
|
|
367
|
-
저장
|
|
368
|
-
<small>(CTRL+S)</small>
|
|
369
|
-
</sd-button>
|
|
370
|
-
}
|
|
371
|
-
<sd-button [theme]="'link-info'" (click)="onRefreshButtonClick()">
|
|
372
|
-
<ng-icon [svg]="icons.tablerRefresh" />
|
|
373
|
-
새로고침
|
|
374
|
-
<small>(CTRL+ALT+L)</small>
|
|
375
|
-
</sd-button>
|
|
376
|
-
</ng-template>
|
|
377
|
-
|
|
378
|
-
<ng-template #contentTpl>
|
|
379
|
-
<div class="flex-column fill">
|
|
380
|
-
@if ((parent.viewType() === "control" && parent.canEdit()) || toolTplRef()) {
|
|
381
|
-
<div class="p-default flex-row gap-default bdb bdb-theme-gray-lightest">
|
|
382
|
-
@if (parent.viewType() === "control" && parent.canEdit()) {
|
|
383
|
-
@if (parent.submit) {
|
|
384
|
-
<sd-button [theme]="'primary'" (click)="onSubmitButtonClick()">
|
|
385
|
-
<ng-icon [svg]="icons.tablerDeviceFloppy" />
|
|
386
|
-
저장
|
|
387
|
-
<small>(CTRL+S)</small>
|
|
388
|
-
</sd-button>
|
|
389
|
-
<sd-button [theme]="'info'" (click)="onRefreshButtonClick()">
|
|
390
|
-
<ng-icon [svg]="icons.tablerRefresh" />
|
|
391
|
-
새로고침
|
|
392
|
-
<small>(CTRL+ALT+L)</small>
|
|
393
|
-
</sd-button>
|
|
394
|
-
}
|
|
395
|
-
@if (
|
|
396
|
-
!parent.dataInfo()?.isNew &&
|
|
397
|
-
parent.toggleDelete &&
|
|
398
|
-
(!parent.canDelete || parent.canDelete())
|
|
399
|
-
) {
|
|
400
|
-
@if (parent.dataInfo()?.isDeleted) {
|
|
401
|
-
<sd-button [theme]="'warning'" (click)="onRestoreButtonClick()">
|
|
402
|
-
<ng-icon [svg]="icons.tablerRestore" />
|
|
403
|
-
복구
|
|
404
|
-
</sd-button>
|
|
405
|
-
} @else {
|
|
406
|
-
<sd-button [theme]="'danger'" (click)="onDeleteButtonClick()">
|
|
407
|
-
<ng-icon [svg]="icons.tablerEraser" />
|
|
408
|
-
삭제
|
|
409
|
-
</sd-button>
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
<ng-template [ngTemplateOutlet]="toolTplRef() ?? null" />
|
|
415
|
-
</div>
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
@if (prevTplRef()) {
|
|
419
|
-
<div>
|
|
420
|
-
<ng-template [ngTemplateOutlet]="prevTplRef() ?? null" />
|
|
421
|
-
</div>
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
<div class="flex-fill">
|
|
425
|
-
<sd-form #formCtrl (formSubmit)="onSubmit()">
|
|
426
|
-
<ng-template [ngTemplateOutlet]="contentTplRef()" />
|
|
427
|
-
</sd-form>
|
|
428
|
-
</div>
|
|
429
|
-
|
|
430
|
-
@if (parent.dataInfo()?.lastModifiedAt || parent.dataInfo()?.lastModifiedBy) {
|
|
431
|
-
<div
|
|
432
|
-
class="p-sm-default"
|
|
433
|
-
[class.bg-theme-gray-lightest]="parent.viewType() === 'modal'"
|
|
434
|
-
>
|
|
435
|
-
최종수정:
|
|
436
|
-
@if (parent.dataInfo()?.lastModifiedAt) {
|
|
437
|
-
{{ parent.dataInfo()!.lastModifiedAt | format: "yyyy-MM-dd HH:mm" }}
|
|
438
|
-
}
|
|
439
|
-
@if (parent.dataInfo()?.lastModifiedBy) {
|
|
440
|
-
({{ parent.dataInfo()?.lastModifiedBy }})
|
|
441
|
-
}
|
|
442
|
-
</div>
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
@if (nextTplRef()) {
|
|
446
|
-
<div>
|
|
447
|
-
<ng-template [ngTemplateOutlet]="nextTplRef() ?? null" />
|
|
448
|
-
</div>
|
|
449
|
-
}
|
|
450
|
-
</div>
|
|
451
|
-
</ng-template>
|
|
452
|
-
|
|
453
|
-
@if (parent.canEdit()) {
|
|
454
|
-
<ng-template #modalBottomTpl>
|
|
455
|
-
<div class="p-sm-default flex-row gap-sm">
|
|
456
|
-
@if (
|
|
457
|
-
!parent.dataInfo()?.isNew &&
|
|
458
|
-
parent.toggleDelete &&
|
|
459
|
-
(!parent.canDelete || parent.canDelete())
|
|
460
|
-
) {
|
|
461
|
-
@if (parent.dataInfo()?.isDeleted) {
|
|
462
|
-
<sd-button [size]="'sm'" [theme]="'warning'" (click)="onRestoreButtonClick()">
|
|
463
|
-
복구
|
|
464
|
-
</sd-button>
|
|
465
|
-
} @else {
|
|
466
|
-
<sd-button [size]="'sm'" [theme]="'danger'" (click)="onDeleteButtonClick()">
|
|
467
|
-
삭제
|
|
468
|
-
</sd-button>
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
<div class="flex-fill flex-row gap-sm main-align-end">
|
|
473
|
-
<sd-button [size]="'sm'" [theme]="'primary'" (click)="onSubmitButtonClick()">
|
|
474
|
-
확인
|
|
475
|
-
</sd-button>
|
|
476
|
-
</div>
|
|
477
|
-
</div>
|
|
478
|
-
</ng-template>
|
|
479
|
-
|
|
480
|
-
<ng-template #modalActionTpl>
|
|
481
|
-
<sd-anchor
|
|
482
|
-
[theme]="'gray'"
|
|
483
|
-
class="p-sm-default"
|
|
484
|
-
(click)="onRefreshButtonClick()"
|
|
485
|
-
title="새로고침(CTRL+ALT+L)"
|
|
486
|
-
>
|
|
487
|
-
<ng-icon [svg]="icons.tablerRefresh" />
|
|
488
|
-
</sd-anchor>
|
|
489
|
-
</ng-template>
|
|
490
|
-
}
|
|
491
|
-
</sd-base-container>
|
|
492
|
-
`,
|
|
493
|
-
}]
|
|
494
|
-
}], () => [], { formCtrl: [{ type: i0.ViewChild, args: ["formCtrl", { isSignal: true }] }], toolTplRef: [{ type: i0.ContentChild, args: ["toolTpl", { ...{ read: TemplateRef }, isSignal: true }] }], prevTplRef: [{ type: i0.ContentChild, args: ["prevTpl", { ...{ read: TemplateRef }, isSignal: true }] }], contentTplRef: [{ type: i0.ContentChild, args: ["contentTpl", { ...{ read: TemplateRef }, isSignal: true }] }], nextTplRef: [{ type: i0.ContentChild, args: ["nextTpl", { ...{ read: TemplateRef }, isSignal: true }] }], modalActionTplRef: [{ type: i0.ViewChild, args: ["modalActionTpl", { ...{ read: TemplateRef }, isSignal: true }] }] }); })();
|
|
495
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdDataDetail, { className: "SdDataDetail", filePath: "packages/angular/src/data/data-detail/sd-data-detail.ts", lineNumber: 191 }); })();
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type Signal } from "@angular/core";
|
|
2
|
-
import type { SelectModeValue } from "../../controls/select/sd-select";
|
|
3
|
-
import { SdModalProvider, type SdModalOptions } from "../../core/modal/sd-modal.provider";
|
|
4
|
-
import type { SdSelectModal, SdSelectModalInfo } from "../../controls/button/sd-modal-select-button";
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare abstract class SdDataSelectButtonBase<TItem extends object, TKey, TMode extends keyof SelectModeValue<TKey> = keyof SelectModeValue<TKey>> {
|
|
7
|
-
abstract modal: Signal<SdSelectModalInfo<SdSelectModal<any>>>;
|
|
8
|
-
abstract load(keys: TKey[]): Promise<TItem[]> | TItem[];
|
|
9
|
-
protected readonly _sdModal: SdModalProvider;
|
|
10
|
-
value: import("@angular/core").ModelSignal<SelectModeValue<TKey>[TMode] | undefined>;
|
|
11
|
-
disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
12
|
-
required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
13
|
-
inset: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
14
|
-
size: import("@angular/core").InputSignal<"sm" | "lg" | undefined>;
|
|
15
|
-
selectMode: import("@angular/core").InputSignal<TMode>;
|
|
16
|
-
isNoValue: Signal<boolean>;
|
|
17
|
-
selectedItems: import("@angular/core").WritableSignal<TItem[]>;
|
|
18
|
-
constructor();
|
|
19
|
-
doShowModal(options?: SdModalOptions): Promise<void>;
|
|
20
|
-
doInitialValue(): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SdDataSelectButtonBase<any, any, any>, never>;
|
|
22
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SdDataSelectButtonBase<any, any, any>, never, never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "inset": { "alias": "inset"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "selectMode": { "alias": "selectMode"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=sd-data-select-button.base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { booleanAttribute, computed, Directive, effect, inject, input, model, signal, } from "@angular/core";
|
|
2
|
-
import { SdModalProvider, } from "../../core/modal/sd-modal.provider";
|
|
3
|
-
import { setupInvalid } from "../../core/validation/setupInvalid";
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class SdDataSelectButtonBase {
|
|
6
|
-
//-- implement
|
|
7
|
-
_sdModal = inject(SdModalProvider);
|
|
8
|
-
value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
9
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
10
|
-
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
11
|
-
inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
12
|
-
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
|
|
13
|
-
selectMode = input("single", ...(ngDevMode ? [{ debugName: "selectMode" }] : /* istanbul ignore next */ []));
|
|
14
|
-
isNoValue = computed(() => {
|
|
15
|
-
const v = this.value();
|
|
16
|
-
if (v == null)
|
|
17
|
-
return true;
|
|
18
|
-
if (Array.isArray(v))
|
|
19
|
-
return v.length === 0;
|
|
20
|
-
return false;
|
|
21
|
-
}, ...(ngDevMode ? [{ debugName: "isNoValue" }] : /* istanbul ignore next */ []));
|
|
22
|
-
selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
|
|
23
|
-
constructor() {
|
|
24
|
-
setupInvalid(() => (this.required() && this.value() == null ? "값을 입력하세요." : ""));
|
|
25
|
-
effect(() => {
|
|
26
|
-
const value = this.value();
|
|
27
|
-
const selectMode = this.selectMode();
|
|
28
|
-
queueMicrotask(async () => {
|
|
29
|
-
if (selectMode === "multi" &&
|
|
30
|
-
Array.isArray(value) &&
|
|
31
|
-
value.filterExists().length > 0) {
|
|
32
|
-
this.selectedItems.set(await this.load(value.filterExists()));
|
|
33
|
-
}
|
|
34
|
-
else if (selectMode === "single" && !Array.isArray(value) && value != null) {
|
|
35
|
-
this.selectedItems.set(await this.load([value]));
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.selectedItems.set([]);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
async doShowModal(options) {
|
|
44
|
-
const modal = this.modal();
|
|
45
|
-
const result = await this._sdModal.showAsync({
|
|
46
|
-
...modal,
|
|
47
|
-
inputs: {
|
|
48
|
-
selectMode: this.selectMode(),
|
|
49
|
-
selectedItemKeys: (this.selectMode() === "multi"
|
|
50
|
-
? (this.value() ?? [])
|
|
51
|
-
: [this.value()]).filterExists(),
|
|
52
|
-
...modal.inputs,
|
|
53
|
-
},
|
|
54
|
-
}, options);
|
|
55
|
-
if (result) {
|
|
56
|
-
const newValue = this.selectMode() === "multi" ? result.selectedItemKeys : result.selectedItemKeys[0];
|
|
57
|
-
this.value.set(newValue);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
doInitialValue() {
|
|
61
|
-
this.value.set((this.selectMode() === "multi" ? [] : undefined));
|
|
62
|
-
}
|
|
63
|
-
static ɵfac = function SdDataSelectButtonBase_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdDataSelectButtonBase)(); };
|
|
64
|
-
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: SdDataSelectButtonBase, inputs: { value: [1, "value"], disabled: [1, "disabled"], required: [1, "required"], inset: [1, "inset"], size: [1, "size"], selectMode: [1, "selectMode"] }, outputs: { value: "valueChange" } });
|
|
65
|
-
}
|
|
66
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdDataSelectButtonBase, [{
|
|
67
|
-
type: Directive
|
|
68
|
-
}], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }] }); })();
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TemplateRef } from "@angular/core";
|
|
2
|
-
import { type SdItemOfTemplateContext } from "../../core/template/sd-item-of-template";
|
|
3
|
-
import { SdDataSelectButtonBase } from "./sd-data-select-button.base";
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SdDataSelectButton {
|
|
6
|
-
parent: SdDataSelectButtonBase<any, any, keyof import("../..").SelectModeValue<TKey>>;
|
|
7
|
-
itemTplRef: import("@angular/core").Signal<TemplateRef<SdItemOfTemplateContext<any>> | undefined>;
|
|
8
|
-
onSearchClick(event: MouseEvent): Promise<void>;
|
|
9
|
-
onEraseClick(): void;
|
|
10
|
-
protected readonly tablerEraser = "<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=\"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3\"></path><path d=\"M18 13.3l-6.3 -6.3\"></path></svg>";
|
|
11
|
-
protected readonly tablerSearch = "<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=\"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0\"></path><path d=\"M21 21l-6 -6\"></path></svg>";
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SdDataSelectButton, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdDataSelectButton, "sd-data-select-button", never, {}, {}, ["itemTplRef"], ["*"], true, never>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=sd-data-select-button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sd-data-select-button.d.ts","sourceRoot":"","sources":["../../../src/data/data-select-button/sd-data-select-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,WAAW,EAEZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,yCAAyC,CAAC;AAQjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;;AAItE,qBA4Da,kBAAkB;IAC7B,MAAM,gFAAoD;IAE1D,UAAU,wFAGR;IAEI,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrD,YAAY,IAAI,IAAI;IAIpB,SAAS,CAAC,QAAQ,CAAC,YAAY,obAAgB;IAC/C,SAAS,CAAC,QAAQ,CAAC,YAAY,yXAAgB;yCAnBpC,kBAAkB;2CAAlB,kBAAkB;CAoB9B"}
|