@simplysm/angular 14.0.52 → 14.0.54

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.
Files changed (51) hide show
  1. package/dist/controls/button/sd-modal-select-button.d.ts +9 -10
  2. package/dist/controls/button/sd-modal-select-button.d.ts.map +1 -1
  3. package/dist/controls/button/sd-modal-select-button.js +4 -7
  4. package/dist/core/select-modal-output-result.d.ts +2 -3
  5. package/dist/core/select-modal-output-result.d.ts.map +1 -1
  6. package/dist/core/selection/useSelectionManager.d.ts +11 -11
  7. package/dist/core/selection/useSelectionManager.d.ts.map +1 -1
  8. package/dist/core/selection/useSelectionManager.js +29 -28
  9. package/dist/data/crud/sd-base-container.d.ts +21 -0
  10. package/dist/data/crud/sd-base-container.d.ts.map +1 -0
  11. package/dist/data/crud/sd-base-container.js +200 -0
  12. package/dist/data/crud/sd-crud-detail.d.ts +22 -0
  13. package/dist/data/crud/sd-crud-detail.d.ts.map +1 -0
  14. package/dist/data/crud/sd-crud-detail.js +267 -0
  15. package/dist/data/crud/sd-crud-list.d.ts +54 -0
  16. package/dist/data/crud/sd-crud-list.d.ts.map +1 -0
  17. package/dist/data/crud/sd-crud-list.js +592 -0
  18. package/dist/data/shared-data/sd-shared-data-select-button.d.ts.map +1 -1
  19. package/dist/data/shared-data/sd-shared-data-select-button.js +4 -5
  20. package/dist/data/shared-data/sd-shared-data-select-list.js +2 -2
  21. package/dist/data/shared-data/sd-shared-data-select.js +3 -3
  22. package/dist/data/sheet/injectSheetSelectRowIndicator.d.ts +4 -3
  23. package/dist/data/sheet/injectSheetSelectRowIndicator.d.ts.map +1 -1
  24. package/dist/data/sheet/injectSheetSelectRowIndicator.js +12 -4
  25. package/dist/data/sheet/sd-sheet.d.ts +39 -39
  26. package/dist/data/sheet/sd-sheet.d.ts.map +1 -1
  27. package/dist/data/sheet/sd-sheet.js +96 -74
  28. package/dist/data/sheet/types.d.ts +1 -0
  29. package/dist/data/sheet/types.d.ts.map +1 -1
  30. package/dist/data/sheet/useSheetLayoutEngine.d.ts.map +1 -1
  31. package/dist/data/sheet/useSheetLayoutEngine.js +3 -1
  32. package/dist/index.d.ts +3 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +4 -0
  35. package/dist/styles.css +2 -2
  36. package/package.json +13 -13
  37. package/scss/commons/_variables.scss +2 -2
  38. package/src/controls/button/sd-modal-select-button.ts +9 -13
  39. package/src/core/select-modal-output-result.ts +2 -3
  40. package/src/core/selection/useSelectionManager.ts +47 -49
  41. package/src/data/crud/sd-base-container.ts +115 -0
  42. package/src/data/crud/sd-crud-detail.ts +122 -0
  43. package/src/data/crud/sd-crud-list.ts +316 -0
  44. package/src/data/shared-data/sd-shared-data-select-button.ts +0 -1
  45. package/src/data/shared-data/sd-shared-data-select-list.ts +2 -2
  46. package/src/data/shared-data/sd-shared-data-select.ts +3 -3
  47. package/src/data/sheet/injectSheetSelectRowIndicator.ts +17 -7
  48. package/src/data/sheet/sd-sheet.ts +59 -42
  49. package/src/data/sheet/types.ts +1 -0
  50. package/src/data/sheet/useSheetLayoutEngine.ts +3 -1
  51. package/src/index.ts +5 -0
@@ -0,0 +1,592 @@
1
+ import { ChangeDetectionStrategy, Component, computed, contentChild, contentChildren, inject, input, model, output, TemplateRef, viewChild, ViewEncapsulation, } from "@angular/core";
2
+ import { SdActivatedModalProvider } from "../../core/modal/sd-activated-modal.provider";
3
+ import { SdAnchor } from "../../controls/button/sd-anchor";
4
+ import { SdButton } from "../../controls/button/sd-button";
5
+ import { SdCommandDirective } from "../../core/commands/sd-command";
6
+ import { SdForm } from "../../controls/form/sd-form";
7
+ import { SdSheet } from "../sheet/sd-sheet";
8
+ import { SdSheetColumn } from "../sheet/sd-sheet-column";
9
+ import { SdSheetColumnCellTemplate } from "../sheet/sd-sheet-column-cell-template";
10
+ import { SdBaseContainer } from "./sd-base-container";
11
+ import { NgIcon } from "@ng-icons/core";
12
+ import { NgTemplateOutlet } from "@angular/common";
13
+ import { tablerCirclePlus, tablerDeviceFloppy, tablerEraser, tablerRestore, tablerSearch, } from "@ng-icons/tabler-icons";
14
+ import * as i0 from "@angular/core";
15
+ import * as i1 from "../../core/commands/sd-command";
16
+ const _c0 = ["commandTpl"];
17
+ const _c1 = ["filterTpl"];
18
+ const _c2 = ["toolTpl"];
19
+ const _c3 = ["bottomCommandTpl"];
20
+ const _c4 = ["formCtrl"];
21
+ function SdCrudList_Conditional_1_ng_template_0_Conditional_0_Template(rf, ctx) { if (rf & 1) {
22
+ const _r2 = i0.ɵɵgetCurrentView();
23
+ i0.ɵɵelementStart(0, "sd-button", 13);
24
+ i0.ɵɵlistener("click", function SdCrudList_Conditional_1_ng_template_0_Conditional_0_Template_sd_button_click_0_listener() { let tmp_6_0; i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView((tmp_6_0 = ctx_r2.formCtrl()) == null ? null : tmp_6_0.requestSubmit()); });
25
+ i0.ɵɵelement(1, "ng-icon", 14);
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(3);
32
+ i0.ɵɵproperty("theme", "link-primary");
33
+ i0.ɵɵadvance();
34
+ i0.ɵɵproperty("svg", ctx_r2.tablerDeviceFloppy);
35
+ } }
36
+ function SdCrudList_Conditional_1_ng_template_0_ng_template_1_Template(rf, ctx) { }
37
+ function SdCrudList_Conditional_1_ng_template_0_Template(rf, ctx) { if (rf & 1) {
38
+ i0.ɵɵconditionalCreate(0, SdCrudList_Conditional_1_ng_template_0_Conditional_0_Template, 5, 2, "sd-button", 11);
39
+ i0.ɵɵtemplate(1, SdCrudList_Conditional_1_ng_template_0_ng_template_1_Template, 0, 0, "ng-template", 12);
40
+ } if (rf & 2) {
41
+ const ctx_r2 = i0.ɵɵnextContext(2);
42
+ i0.ɵɵconditional(!ctx_r2.readonly() ? 0 : -1);
43
+ i0.ɵɵadvance();
44
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.commandTplRef());
45
+ } }
46
+ function SdCrudList_Conditional_1_Template(rf, ctx) { if (rf & 1) {
47
+ i0.ɵɵtemplate(0, SdCrudList_Conditional_1_ng_template_0_Template, 2, 2, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
48
+ } }
49
+ function SdCrudList_Conditional_2_ng_template_0_Conditional_0_Template(rf, ctx) { if (rf & 1) {
50
+ const _r4 = i0.ɵɵgetCurrentView();
51
+ i0.ɵɵelementStart(0, "sd-button", 13);
52
+ i0.ɵɵlistener("click", function SdCrudList_Conditional_2_ng_template_0_Conditional_0_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onSaveButtonClick()); });
53
+ i0.ɵɵelement(1, "ng-icon", 14);
54
+ i0.ɵɵtext(2, " \uC800\uC7A5 ");
55
+ i0.ɵɵelementStart(3, "small");
56
+ i0.ɵɵtext(4, "(CTRL+S)");
57
+ i0.ɵɵelementEnd()();
58
+ } if (rf & 2) {
59
+ const ctx_r2 = i0.ɵɵnextContext(3);
60
+ i0.ɵɵproperty("theme", "primary");
61
+ i0.ɵɵadvance();
62
+ i0.ɵɵproperty("svg", ctx_r2.tablerDeviceFloppy);
63
+ } }
64
+ function SdCrudList_Conditional_2_ng_template_0_ng_template_1_Template(rf, ctx) { }
65
+ function SdCrudList_Conditional_2_ng_template_0_Template(rf, ctx) { if (rf & 1) {
66
+ i0.ɵɵconditionalCreate(0, SdCrudList_Conditional_2_ng_template_0_Conditional_0_Template, 5, 2, "sd-button", 11);
67
+ i0.ɵɵtemplate(1, SdCrudList_Conditional_2_ng_template_0_ng_template_1_Template, 0, 0, "ng-template", 12);
68
+ } if (rf & 2) {
69
+ const ctx_r2 = i0.ɵɵnextContext(2);
70
+ i0.ɵɵconditional(!ctx_r2.readonly() ? 0 : -1);
71
+ i0.ɵɵadvance();
72
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.commandTplRef());
73
+ } }
74
+ function SdCrudList_Conditional_2_Template(rf, ctx) { if (rf & 1) {
75
+ i0.ɵɵtemplate(0, SdCrudList_Conditional_2_ng_template_0_Template, 2, 2, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
76
+ } }
77
+ function SdCrudList_Conditional_3_ng_template_0_Conditional_0_ng_template_1_Template(rf, ctx) { }
78
+ function SdCrudList_Conditional_3_ng_template_0_Conditional_0_Template(rf, ctx) { if (rf & 1) {
79
+ i0.ɵɵelementStart(0, "div", 15);
80
+ i0.ɵɵtemplate(1, SdCrudList_Conditional_3_ng_template_0_Conditional_0_ng_template_1_Template, 0, 0, "ng-template", 12);
81
+ i0.ɵɵelementEnd();
82
+ } if (rf & 2) {
83
+ const ctx_r2 = i0.ɵɵnextContext(3);
84
+ i0.ɵɵadvance();
85
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.bottomCommandTplRef());
86
+ } }
87
+ function SdCrudList_Conditional_3_ng_template_0_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
88
+ const _r6 = i0.ɵɵgetCurrentView();
89
+ i0.ɵɵelementStart(0, "sd-button", 18);
90
+ i0.ɵɵlistener("click", function SdCrudList_Conditional_3_ng_template_0_Conditional_1_Conditional_2_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.onModalSelectionConfirmClick()); });
91
+ i0.ɵɵtext(1);
92
+ i0.ɵɵelementEnd();
93
+ } if (rf & 2) {
94
+ const ctx_r2 = i0.ɵɵnextContext(4);
95
+ i0.ɵɵproperty("size", "sm")("theme", "primary");
96
+ i0.ɵɵadvance();
97
+ i0.ɵɵtextInterpolate1(" \uD655\uC778(", ctx_r2.selectedKeys().length, ") ");
98
+ } }
99
+ function SdCrudList_Conditional_3_ng_template_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
100
+ const _r5 = i0.ɵɵgetCurrentView();
101
+ i0.ɵɵelementStart(0, "sd-button", 16);
102
+ i0.ɵɵlistener("click", function SdCrudList_Conditional_3_ng_template_0_Conditional_1_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onModalSelectionCancelClick()); });
103
+ i0.ɵɵtext(1, " \uC120\uD0DD \uD574\uC81C ");
104
+ i0.ɵɵelementEnd();
105
+ i0.ɵɵconditionalCreate(2, SdCrudList_Conditional_3_ng_template_0_Conditional_1_Conditional_2_Template, 2, 3, "sd-button", 17);
106
+ } if (rf & 2) {
107
+ const ctx_r2 = i0.ɵɵnextContext(3);
108
+ i0.ɵɵproperty("size", "sm")("theme", "danger")("disabled", ctx_r2.selectedKeys().length < 1);
109
+ i0.ɵɵadvance(2);
110
+ i0.ɵɵconditional(ctx_r2.selectMode() === "multi" ? 2 : -1);
111
+ } }
112
+ function SdCrudList_Conditional_3_ng_template_0_Template(rf, ctx) { if (rf & 1) {
113
+ i0.ɵɵconditionalCreate(0, SdCrudList_Conditional_3_ng_template_0_Conditional_0_Template, 2, 1, "div", 15);
114
+ i0.ɵɵconditionalCreate(1, SdCrudList_Conditional_3_ng_template_0_Conditional_1_Template, 3, 4);
115
+ } if (rf & 2) {
116
+ const ctx_r2 = i0.ɵɵnextContext(2);
117
+ i0.ɵɵconditional(ctx_r2.bottomCommandTplRef() ? 0 : -1);
118
+ i0.ɵɵadvance();
119
+ i0.ɵɵconditional(ctx_r2.selectMode() != null ? 1 : -1);
120
+ } }
121
+ function SdCrudList_Conditional_3_Template(rf, ctx) { if (rf & 1) {
122
+ i0.ɵɵtemplate(0, SdCrudList_Conditional_3_ng_template_0_Template, 2, 2, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor);
123
+ } }
124
+ function SdCrudList_Conditional_5_ng_template_6_Template(rf, ctx) { }
125
+ function SdCrudList_Conditional_5_Template(rf, ctx) { if (rf & 1) {
126
+ const _r7 = i0.ɵɵgetCurrentView();
127
+ i0.ɵɵelementStart(0, "sd-form", 19);
128
+ i0.ɵɵlistener("formSubmit", function SdCrudList_Conditional_5_Template_sd_form_formSubmit_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.filterSubmit.emit()); });
129
+ i0.ɵɵelementStart(1, "div", 20)(2, "div")(3, "sd-button", 21);
130
+ i0.ɵɵelement(4, "ng-icon", 14);
131
+ i0.ɵɵtext(5, " \uC870\uD68C ");
132
+ i0.ɵɵelementEnd()();
133
+ i0.ɵɵtemplate(6, SdCrudList_Conditional_5_ng_template_6_Template, 0, 0, "ng-template", 12);
134
+ i0.ɵɵelementEnd()();
135
+ } if (rf & 2) {
136
+ const ctx_r2 = i0.ɵɵnextContext();
137
+ i0.ɵɵadvance(3);
138
+ i0.ɵɵproperty("type", "submit")("theme", "info");
139
+ i0.ɵɵadvance();
140
+ i0.ɵɵproperty("svg", ctx_r2.tablerSearch);
141
+ i0.ɵɵadvance(2);
142
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.filterTplRef());
143
+ } }
144
+ function SdCrudList_Conditional_6_Conditional_1_Conditional_3_Conditional_3_Template(rf, ctx) { if (rf & 1) {
145
+ const _r10 = i0.ɵɵgetCurrentView();
146
+ i0.ɵɵelementStart(0, "sd-button", 18);
147
+ i0.ɵɵlistener("click", function SdCrudList_Conditional_6_Conditional_1_Conditional_3_Conditional_3_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.restore.emit(ctx_r2.currSelectedItems())); });
148
+ i0.ɵɵelement(1, "ng-icon", 14);
149
+ i0.ɵɵtext(2, " \uC120\uD0DD \uBCF5\uAD6C ");
150
+ i0.ɵɵelementEnd();
151
+ } if (rf & 2) {
152
+ const ctx_r2 = i0.ɵɵnextContext(4);
153
+ i0.ɵɵproperty("size", "sm")("theme", "link-warning");
154
+ i0.ɵɵadvance();
155
+ i0.ɵɵproperty("svg", ctx_r2.tablerRestore);
156
+ } }
157
+ function SdCrudList_Conditional_6_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
158
+ const _r9 = i0.ɵɵgetCurrentView();
159
+ i0.ɵɵelementStart(0, "sd-button", 16);
160
+ i0.ɵɵlistener("click", function SdCrudList_Conditional_6_Conditional_1_Conditional_3_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.delete.emit(ctx_r2.currSelectedItems())); });
161
+ i0.ɵɵelement(1, "ng-icon", 14);
162
+ i0.ɵɵtext(2, " \uC120\uD0DD \uC0AD\uC81C ");
163
+ i0.ɵɵelementEnd();
164
+ i0.ɵɵconditionalCreate(3, SdCrudList_Conditional_6_Conditional_1_Conditional_3_Conditional_3_Template, 3, 3, "sd-button", 17);
165
+ } if (rf & 2) {
166
+ const ctx_r2 = i0.ɵɵnextContext(3);
167
+ i0.ɵɵproperty("size", "sm")("theme", "link-danger")("disabled", !ctx_r2.hasSelectedNotDeleted());
168
+ i0.ɵɵadvance();
169
+ i0.ɵɵproperty("svg", ctx_r2.tablerEraser);
170
+ i0.ɵɵadvance(2);
171
+ i0.ɵɵconditional(ctx_r2.hasSelectedDeleted() ? 3 : -1);
172
+ } }
173
+ function SdCrudList_Conditional_6_Conditional_1_Template(rf, ctx) { if (rf & 1) {
174
+ const _r8 = i0.ɵɵgetCurrentView();
175
+ i0.ɵɵelementStart(0, "sd-button", 18);
176
+ i0.ɵɵlistener("click", function SdCrudList_Conditional_6_Conditional_1_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.create.emit()); });
177
+ i0.ɵɵelement(1, "ng-icon", 14);
178
+ i0.ɵɵtext(2, " \uB4F1\uB85D ");
179
+ i0.ɵɵelementEnd();
180
+ i0.ɵɵconditionalCreate(3, SdCrudList_Conditional_6_Conditional_1_Conditional_3_Template, 4, 5);
181
+ } if (rf & 2) {
182
+ const ctx_r2 = i0.ɵɵnextContext(2);
183
+ i0.ɵɵproperty("size", "sm")("theme", "link-primary");
184
+ i0.ɵɵadvance();
185
+ i0.ɵɵproperty("svg", ctx_r2.tablerCirclePlus);
186
+ i0.ɵɵadvance(2);
187
+ i0.ɵɵconditional(ctx_r2.selectMode() !== "single" ? 3 : -1);
188
+ } }
189
+ function SdCrudList_Conditional_6_Conditional_2_ng_template_0_Template(rf, ctx) { }
190
+ function SdCrudList_Conditional_6_Conditional_2_Template(rf, ctx) { if (rf & 1) {
191
+ i0.ɵɵtemplate(0, SdCrudList_Conditional_6_Conditional_2_ng_template_0_Template, 0, 0, "ng-template", 12);
192
+ } if (rf & 2) {
193
+ const ctx_r2 = i0.ɵɵnextContext(2);
194
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.toolTplRef());
195
+ } }
196
+ function SdCrudList_Conditional_6_Template(rf, ctx) { if (rf & 1) {
197
+ i0.ɵɵelementStart(0, "div", 9);
198
+ i0.ɵɵconditionalCreate(1, SdCrudList_Conditional_6_Conditional_1_Template, 4, 4);
199
+ i0.ɵɵconditionalCreate(2, SdCrudList_Conditional_6_Conditional_2_Template, 1, 1, null, 12);
200
+ i0.ɵɵelementEnd();
201
+ } if (rf & 2) {
202
+ const ctx_r2 = i0.ɵɵnextContext();
203
+ i0.ɵɵadvance();
204
+ i0.ɵɵconditional(!ctx_r2.readonly() ? 1 : -1);
205
+ i0.ɵɵadvance();
206
+ i0.ɵɵconditional(ctx_r2.toolTplRef() ? 2 : -1);
207
+ } }
208
+ function SdCrudList_Conditional_7_ng_template_1_Template(rf, ctx) { }
209
+ function SdCrudList_Conditional_7_Template(rf, ctx) { if (rf & 1) {
210
+ i0.ɵɵelementStart(0, "div", 10);
211
+ i0.ɵɵtemplate(1, SdCrudList_Conditional_7_ng_template_1_Template, 0, 0, "ng-template", 12);
212
+ i0.ɵɵelementEnd();
213
+ } if (rf & 2) {
214
+ i0.ɵɵnextContext();
215
+ const sheet_r11 = i0.ɵɵreference(10);
216
+ i0.ɵɵadvance();
217
+ i0.ɵɵproperty("ngTemplateOutlet", sheet_r11);
218
+ } }
219
+ function SdCrudList_Conditional_8_ng_template_2_Template(rf, ctx) { }
220
+ function SdCrudList_Conditional_8_Template(rf, ctx) { if (rf & 1) {
221
+ const _r12 = i0.ɵɵgetCurrentView();
222
+ i0.ɵɵelementStart(0, "sd-form", 22, 4);
223
+ i0.ɵɵlistener("formSubmit", function SdCrudList_Conditional_8_Template_sd_form_formSubmit_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.submit.emit()); });
224
+ i0.ɵɵtemplate(2, SdCrudList_Conditional_8_ng_template_2_Template, 0, 0, "ng-template", 12);
225
+ i0.ɵɵelementEnd();
226
+ } if (rf & 2) {
227
+ i0.ɵɵnextContext();
228
+ const sheet_r11 = i0.ɵɵreference(10);
229
+ i0.ɵɵadvance(2);
230
+ i0.ɵɵproperty("ngTemplateOutlet", sheet_r11);
231
+ } }
232
+ function SdCrudList_ng_template_9_Conditional_1_ng_template_1_Template(rf, ctx) { if (rf & 1) {
233
+ i0.ɵɵelementStart(0, "div", 26);
234
+ i0.ɵɵelement(1, "ng-icon", 14);
235
+ i0.ɵɵelementEnd();
236
+ } if (rf & 2) {
237
+ const ctx_r2 = i0.ɵɵnextContext(3);
238
+ i0.ɵɵadvance();
239
+ i0.ɵɵproperty("svg", ctx_r2.tablerEraser);
240
+ } }
241
+ function SdCrudList_ng_template_9_Conditional_1_ng_template_3_Template(rf, ctx) { if (rf & 1) {
242
+ const _r14 = i0.ɵɵgetCurrentView();
243
+ i0.ɵɵelementStart(0, "div", 27)(1, "sd-anchor", 13);
244
+ i0.ɵɵlistener("click", function SdCrudList_ng_template_9_Conditional_1_ng_template_3_Template_sd_anchor_click_1_listener() { const item_r15 = i0.ɵɵrestoreView(_r14).item; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.isDeleted(item_r15) ? ctx_r2.restore.emit([item_r15]) : ctx_r2.delete.emit([item_r15])); });
245
+ i0.ɵɵelement(2, "ng-icon", 14);
246
+ i0.ɵɵelementEnd()();
247
+ } if (rf & 2) {
248
+ const item_r15 = ctx.item;
249
+ const ctx_r2 = i0.ɵɵnextContext(3);
250
+ i0.ɵɵadvance();
251
+ i0.ɵɵproperty("theme", "danger");
252
+ i0.ɵɵadvance();
253
+ i0.ɵɵproperty("svg", ctx_r2.isDeleted(item_r15) ? ctx_r2.tablerRestore : ctx_r2.tablerEraser);
254
+ } }
255
+ function SdCrudList_ng_template_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
256
+ i0.ɵɵelementStart(0, "sd-sheet-column", 24);
257
+ i0.ɵɵtemplate(1, SdCrudList_ng_template_9_Conditional_1_ng_template_1_Template, 2, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor)(3, SdCrudList_ng_template_9_Conditional_1_ng_template_3_Template, 3, 2, "ng-template", 25);
258
+ i0.ɵɵelementEnd();
259
+ } if (rf & 2) {
260
+ const ctx_r2 = i0.ɵɵnextContext(2);
261
+ i0.ɵɵproperty("fixed", true)("key", "deleteButton")("disableResizing", true)("disableSorting", true);
262
+ i0.ɵɵadvance(3);
263
+ i0.ɵɵproperty("cell", ctx_r2.items());
264
+ } }
265
+ function SdCrudList_ng_template_9_Template(rf, ctx) { if (rf & 1) {
266
+ const _r13 = i0.ɵɵgetCurrentView();
267
+ i0.ɵɵelementStart(0, "sd-sheet", 23);
268
+ i0.ɵɵtwoWayListener("currentPageChange", function SdCrudList_ng_template_9_Template_sd_sheet_currentPageChange_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.currentPage, $event) || (ctx_r2.currentPage = $event); return i0.ɵɵresetView($event); })("sortsChange", function SdCrudList_ng_template_9_Template_sd_sheet_sortsChange_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.sorts, $event) || (ctx_r2.sorts = $event); return i0.ɵɵresetView($event); })("selectedKeysChange", function SdCrudList_ng_template_9_Template_sd_sheet_selectedKeysChange_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.selectedKeys, $event) || (ctx_r2.selectedKeys = $event); return i0.ɵɵresetView($event); });
269
+ i0.ɵɵlistener("selectedKeysChange", function SdCrudList_ng_template_9_Template_sd_sheet_selectedKeysChange_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSelectedKeysChange()); });
270
+ i0.ɵɵconditionalCreate(1, SdCrudList_ng_template_9_Conditional_1_Template, 4, 5, "sd-sheet-column", 24);
271
+ i0.ɵɵelementEnd();
272
+ } if (rf & 2) {
273
+ const ctx_r2 = i0.ɵɵnextContext();
274
+ i0.ɵɵproperty("key", ctx_r2.key() + "-sheet")("items", ctx_r2.items());
275
+ i0.ɵɵtwoWayProperty("currentPage", ctx_r2.currentPage);
276
+ i0.ɵɵproperty("totalPageCount", ctx_r2.totalPageCount());
277
+ i0.ɵɵtwoWayProperty("sorts", ctx_r2.sorts);
278
+ i0.ɵɵproperty("useAutoSort", ctx_r2.totalPageCount() === 0)("selectMode", ctx_r2.selectMode() ?? (ctx_r2.readonly() ? undefined : "multi"));
279
+ i0.ɵɵtwoWayProperty("selectedKeys", ctx_r2.selectedKeys);
280
+ i0.ɵɵproperty("trackByFn", ctx_r2.trackByFn())("getItemCellStyleFn", ctx_r2.getItemCellStyleFn)("autoSelect", ctx_r2.selectMode() === "single" ? "click" : undefined)("columnControlsInput", ctx_r2.columnControls());
281
+ i0.ɵɵadvance();
282
+ i0.ɵɵconditional(!ctx_r2.readonly() ? 1 : -1);
283
+ } }
284
+ export class SdCrudList {
285
+ _sdActivatedModal = inject(SdActivatedModalProvider, { optional: true });
286
+ ready = model(false, ...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
287
+ initialized = input(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
288
+ busyCount = model(0, ...(ngDevMode ? [{ debugName: "busyCount" }] : /* istanbul ignore next */ []));
289
+ restricted = input(false, ...(ngDevMode ? [{ debugName: "restricted" }] : /* istanbul ignore next */ []));
290
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
291
+ viewType = input.required(...(ngDevMode ? [{ debugName: "viewType" }] : /* istanbul ignore next */ []));
292
+ selectMode = input(...(ngDevMode ? [undefined, { debugName: "selectMode" }] : /* istanbul ignore next */ []));
293
+ key = input.required(...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
294
+ formCtrl = viewChild("formCtrl", ...(ngDevMode ? [{ debugName: "formCtrl" }] : /* istanbul ignore next */ []));
295
+ filterSubmit = output();
296
+ submit = output();
297
+ create = output();
298
+ delete = output();
299
+ restore = output();
300
+ items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
301
+ selectedKeys = model([], ...(ngDevMode ? [{ debugName: "selectedKeys" }] : /* istanbul ignore next */ []));
302
+ currDeletedItems = input([], ...(ngDevMode ? [{ debugName: "currDeletedItems" }] : /* istanbul ignore next */ []));
303
+ currDeletedSet = computed(() => new Set(this.currDeletedItems()), ...(ngDevMode ? [{ debugName: "currDeletedSet" }] : /* istanbul ignore next */ []));
304
+ currSelectedItems = computed(() => this.items().filter((it) => {
305
+ const key = this.trackByFn()(it);
306
+ return key != null && this.selectedKeys().includes(key);
307
+ }), ...(ngDevMode ? [{ debugName: "currSelectedItems" }] : /* istanbul ignore next */ []));
308
+ currentPage = model(0, ...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
309
+ totalPageCount = input(0, ...(ngDevMode ? [{ debugName: "totalPageCount" }] : /* istanbul ignore next */ []));
310
+ sorts = model([], ...(ngDevMode ? [{ debugName: "sorts" }] : /* istanbul ignore next */ []));
311
+ trackByFn = input.required(...(ngDevMode ? [{ debugName: "trackByFn" }] : /* istanbul ignore next */ []));
312
+ commandTplRef = contentChild("commandTpl", ...(ngDevMode ? [{ debugName: "commandTplRef" }] : /* istanbul ignore next */ []));
313
+ filterTplRef = contentChild("filterTpl", ...(ngDevMode ? [{ debugName: "filterTplRef" }] : /* istanbul ignore next */ []));
314
+ toolTplRef = contentChild("toolTpl", ...(ngDevMode ? [{ debugName: "toolTplRef" }] : /* istanbul ignore next */ []));
315
+ bottomCommandTplRef = contentChild("bottomCommandTpl", ...(ngDevMode ? [{ debugName: "bottomCommandTplRef" }] : /* istanbul ignore next */ []));
316
+ columnControls = contentChildren(SdSheetColumn, ...(ngDevMode ? [{ debugName: "columnControls" }] : /* istanbul ignore next */ []));
317
+ hasSelectedDeleted = computed(() => this.currSelectedItems().some((it) => this.isDeleted(it)), ...(ngDevMode ? [{ debugName: "hasSelectedDeleted" }] : /* istanbul ignore next */ []));
318
+ hasSelectedNotDeleted = computed(() => this.currSelectedItems().some((it) => !this.isDeleted(it)), ...(ngDevMode ? [{ debugName: "hasSelectedNotDeleted" }] : /* istanbul ignore next */ []));
319
+ getItemCellStyleFn = (item) => this.isDeleted(item) ? "text-decoration: line-through;" : undefined;
320
+ isDeleted(item) {
321
+ return this.currDeletedSet().has(item);
322
+ }
323
+ onSaveButtonClick() {
324
+ this.formCtrl()?.requestSubmit();
325
+ }
326
+ onModalSelectionCancelClick() {
327
+ this.selectedKeys.set([]);
328
+ if (this.selectMode() === "single") {
329
+ this._sdActivatedModal?.contentComponent().close.emit({ selectedKeys: [] });
330
+ }
331
+ }
332
+ onModalSelectionConfirmClick() {
333
+ const selectedKeys = this.selectedKeys();
334
+ this._sdActivatedModal?.contentComponent().close.emit({ selectedKeys });
335
+ }
336
+ onSelectedKeysChange() {
337
+ if (this.viewType() !== "modal")
338
+ return;
339
+ if (this.selectMode() !== "single")
340
+ return;
341
+ const selectedKeys = this.selectedKeys();
342
+ if (selectedKeys.length !== 1)
343
+ return;
344
+ this._sdActivatedModal?.contentComponent().close.emit({ selectedKeys });
345
+ }
346
+ tablerDeviceFloppy = tablerDeviceFloppy;
347
+ tablerCirclePlus = tablerCirclePlus;
348
+ tablerEraser = tablerEraser;
349
+ tablerRestore = tablerRestore;
350
+ tablerSearch = tablerSearch;
351
+ static ɵfac = function SdCrudList_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdCrudList)(); };
352
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdCrudList, selectors: [["sd-crud-list"]], contentQueries: function SdCrudList_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
353
+ i0.ɵɵcontentQuerySignal(dirIndex, ctx.commandTplRef, _c0, 5)(dirIndex, ctx.filterTplRef, _c1, 5)(dirIndex, ctx.toolTplRef, _c2, 5)(dirIndex, ctx.bottomCommandTplRef, _c3, 5)(dirIndex, ctx.columnControls, SdSheetColumn, 4);
354
+ } if (rf & 2) {
355
+ i0.ɵɵqueryAdvance(5);
356
+ } }, viewQuery: function SdCrudList_Query(rf, ctx) { if (rf & 1) {
357
+ i0.ɵɵviewQuerySignal(ctx.formCtrl, _c4, 5);
358
+ } if (rf & 2) {
359
+ i0.ɵɵqueryAdvance();
360
+ } }, hostBindings: function SdCrudList_HostBindings(rf, ctx) { if (rf & 1) {
361
+ i0.ɵɵlistener("sdSaveCommand", function SdCrudList_sdSaveCommand_HostBindingHandler() { return ctx.onSaveButtonClick(); });
362
+ } }, inputs: { ready: [1, "ready"], initialized: [1, "initialized"], busyCount: [1, "busyCount"], restricted: [1, "restricted"], readonly: [1, "readonly"], viewType: [1, "viewType"], selectMode: [1, "selectMode"], key: [1, "key"], items: [1, "items"], selectedKeys: [1, "selectedKeys"], currDeletedItems: [1, "currDeletedItems"], currentPage: [1, "currentPage"], totalPageCount: [1, "totalPageCount"], sorts: [1, "sorts"], trackByFn: [1, "trackByFn"] }, outputs: { ready: "readyChange", busyCount: "busyCountChange", filterSubmit: "filterSubmit", submit: "submit", create: "create", delete: "delete", restore: "restore", selectedKeys: "selectedKeysChange", currentPage: "currentPageChange", sorts: "sortsChange" }, features: [i0.ɵɵHostDirectivesFeature([{ directive: i1.SdCommandDirective, outputs: ["sdSaveCommand", "sdSaveCommand"] }])], decls: 11, vars: 10, consts: [["sheet", ""], ["topbarTpl", ""], ["commandTpl", ""], ["bottomCommandTpl", ""], ["formCtrl", ""], ["headerTpl", ""], [3, "readyChange", "busyCountChange", "ready", "initialized", "busyCount", "restricted", "viewType"], [1, "flex-column", "fill"], [1, "block", "p-default"], [1, "flex-row", "gap-sm", "p-xs-default"], [1, "flex-fill", "p-default", "pt-0"], [3, "theme"], [3, "ngTemplateOutlet"], [3, "click", "theme"], [3, "svg"], [1, "flex-fill", "flex-row", "main-align-start", "gap-sm"], [3, "click", "size", "theme", "disabled"], [3, "size", "theme"], [3, "click", "size", "theme"], [1, "block", "p-default", 3, "formSubmit"], [1, "form-box-inline"], [3, "type", "theme"], [1, "flex-fill", "p-default", "pt-0", 3, "formSubmit"], [3, "currentPageChange", "sortsChange", "selectedKeysChange", "key", "items", "currentPage", "totalPageCount", "sorts", "useAutoSort", "selectMode", "selectedKeys", "trackByFn", "getItemCellStyleFn", "autoSelect", "columnControlsInput"], [3, "fixed", "key", "disableResizing", "disableSorting"], [3, "cell"], [1, "p-xs-sm", "tx-center"], [1, "p-xs-sm"]], template: function SdCrudList_Template(rf, ctx) { if (rf & 1) {
363
+ const _r1 = i0.ɵɵgetCurrentView();
364
+ i0.ɵɵelementStart(0, "sd-base-container", 6);
365
+ i0.ɵɵtwoWayListener("readyChange", function SdCrudList_Template_sd_base_container_readyChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.ready, $event) || (ctx.ready = $event); return i0.ɵɵresetView($event); })("busyCountChange", function SdCrudList_Template_sd_base_container_busyCountChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.busyCount, $event) || (ctx.busyCount = $event); return i0.ɵɵresetView($event); });
366
+ i0.ɵɵconditionalCreate(1, SdCrudList_Conditional_1_Template, 2, 0)(2, SdCrudList_Conditional_2_Template, 2, 0);
367
+ i0.ɵɵconditionalCreate(3, SdCrudList_Conditional_3_Template, 2, 0);
368
+ i0.ɵɵelementStart(4, "div", 7);
369
+ i0.ɵɵconditionalCreate(5, SdCrudList_Conditional_5_Template, 7, 4, "sd-form", 8);
370
+ i0.ɵɵconditionalCreate(6, SdCrudList_Conditional_6_Template, 3, 2, "div", 9);
371
+ i0.ɵɵconditionalCreate(7, SdCrudList_Conditional_7_Template, 2, 1, "div", 10)(8, SdCrudList_Conditional_8_Template, 3, 1, "sd-form", 10);
372
+ i0.ɵɵelementEnd()();
373
+ i0.ɵɵtemplate(9, SdCrudList_ng_template_9_Template, 2, 13, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
374
+ } if (rf & 2) {
375
+ i0.ɵɵtwoWayProperty("ready", ctx.ready);
376
+ i0.ɵɵproperty("initialized", ctx.initialized());
377
+ i0.ɵɵtwoWayProperty("busyCount", ctx.busyCount);
378
+ i0.ɵɵproperty("restricted", ctx.restricted())("viewType", ctx.viewType());
379
+ i0.ɵɵadvance();
380
+ i0.ɵɵconditional(ctx.viewType() === "page" && (!ctx.readonly() || ctx.commandTplRef()) ? 1 : !ctx.readonly() || ctx.commandTplRef() ? 2 : -1);
381
+ i0.ɵɵadvance(2);
382
+ i0.ɵɵconditional(ctx.viewType() === "modal" && ctx.selectMode() != null || ctx.bottomCommandTplRef() ? 3 : -1);
383
+ i0.ɵɵadvance(2);
384
+ i0.ɵɵconditional(ctx.filterTplRef() ? 5 : -1);
385
+ i0.ɵɵadvance();
386
+ i0.ɵɵconditional(!ctx.readonly() || ctx.toolTplRef() ? 6 : -1);
387
+ i0.ɵɵadvance();
388
+ i0.ɵɵconditional(ctx.readonly() ? 7 : 8);
389
+ } }, dependencies: [SdBaseContainer,
390
+ SdButton,
391
+ NgIcon,
392
+ NgTemplateOutlet,
393
+ SdSheet,
394
+ SdForm,
395
+ SdAnchor,
396
+ SdSheetColumn,
397
+ SdSheetColumnCellTemplate], encapsulation: 2, changeDetection: 0 });
398
+ }
399
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdCrudList, [{
400
+ type: Component,
401
+ args: [{
402
+ selector: "sd-crud-list",
403
+ changeDetection: ChangeDetectionStrategy.OnPush,
404
+ encapsulation: ViewEncapsulation.None,
405
+ standalone: true,
406
+ imports: [
407
+ SdBaseContainer,
408
+ SdButton,
409
+ NgIcon,
410
+ NgTemplateOutlet,
411
+ SdSheet,
412
+ SdForm,
413
+ SdAnchor,
414
+ SdSheetColumn,
415
+ SdSheetColumnCellTemplate,
416
+ ],
417
+ hostDirectives: [{ directive: SdCommandDirective, outputs: ["sdSaveCommand"] }],
418
+ host: {
419
+ "(sdSaveCommand)": "onSaveButtonClick()",
420
+ },
421
+ template: `
422
+ <sd-base-container
423
+ [(ready)]="ready"
424
+ [initialized]="initialized()"
425
+ [(busyCount)]="busyCount"
426
+ [restricted]="restricted()"
427
+ [viewType]="viewType()"
428
+ >
429
+ <!-- TOP -->
430
+ @if (viewType() === "page" && (!readonly() || commandTplRef())) {
431
+ <ng-template #topbarTpl>
432
+ @if (!readonly()) {
433
+ <sd-button [theme]="'link-primary'" (click)="formCtrl()?.requestSubmit()">
434
+ <ng-icon [svg]="tablerDeviceFloppy" />
435
+ 저장
436
+ <small>(CTRL+S)</small>
437
+ </sd-button>
438
+ }
439
+
440
+ <ng-template [ngTemplateOutlet]="commandTplRef()" />
441
+ </ng-template>
442
+ } @else if (!readonly() || commandTplRef()) {
443
+ <ng-template #commandTpl>
444
+ @if (!readonly()) {
445
+ <sd-button [theme]="'primary'" (click)="onSaveButtonClick()">
446
+ <ng-icon [svg]="tablerDeviceFloppy" />
447
+ 저장
448
+ <small>(CTRL+S)</small>
449
+ </sd-button>
450
+ }
451
+
452
+ <ng-template [ngTemplateOutlet]="commandTplRef()" />
453
+ </ng-template>
454
+ }
455
+
456
+ <!-- BOTTOM -->
457
+ @if ((viewType() === "modal" && selectMode() != null) || bottomCommandTplRef()) {
458
+ <ng-template #bottomCommandTpl>
459
+ @if (bottomCommandTplRef()) {
460
+ <div class="flex-fill flex-row main-align-start gap-sm">
461
+ <ng-template [ngTemplateOutlet]="bottomCommandTplRef()" />
462
+ </div>
463
+ }
464
+
465
+ @if (selectMode() != null) {
466
+ <sd-button
467
+ [size]="'sm'"
468
+ [theme]="'danger'"
469
+ (click)="onModalSelectionCancelClick()"
470
+ [disabled]="selectedKeys().length < 1"
471
+ >
472
+ 선택 해제
473
+ </sd-button>
474
+ @if (selectMode() === "multi") {
475
+ <sd-button [size]="'sm'" [theme]="'primary'" (click)="onModalSelectionConfirmClick()">
476
+ 확인({{ selectedKeys().length }})
477
+ </sd-button>
478
+ }
479
+ }
480
+ </ng-template>
481
+ }
482
+
483
+ <!-- CONTENT -->
484
+ <div class="flex-column fill">
485
+ @if (filterTplRef()) {
486
+ <sd-form (formSubmit)="filterSubmit.emit()" class="block p-default">
487
+ <div class="form-box-inline">
488
+ <div>
489
+ <sd-button [type]="'submit'" [theme]="'info'">
490
+ <ng-icon [svg]="tablerSearch" />
491
+ 조회
492
+ </sd-button>
493
+ </div>
494
+ <ng-template [ngTemplateOutlet]="filterTplRef()" />
495
+ </div>
496
+ </sd-form>
497
+ }
498
+
499
+ @if (!readonly() || toolTplRef()) {
500
+ <div class="flex-row gap-sm p-xs-default">
501
+ @if (!readonly()) {
502
+ <sd-button [size]="'sm'" [theme]="'link-primary'" (click)="create.emit()">
503
+ <ng-icon [svg]="tablerCirclePlus" />
504
+ 등록
505
+ </sd-button>
506
+ @if (selectMode() !== "single") {
507
+ <sd-button
508
+ [size]="'sm'"
509
+ [theme]="'link-danger'"
510
+ (click)="delete.emit(currSelectedItems())"
511
+ [disabled]="!hasSelectedNotDeleted()"
512
+ >
513
+ <ng-icon [svg]="tablerEraser" />
514
+ 선택 삭제
515
+ </sd-button>
516
+ @if (hasSelectedDeleted()) {
517
+ <sd-button
518
+ [size]="'sm'"
519
+ [theme]="'link-warning'"
520
+ (click)="restore.emit(currSelectedItems())"
521
+ >
522
+ <ng-icon [svg]="tablerRestore" />
523
+ 선택 복구
524
+ </sd-button>
525
+ }
526
+ }
527
+ }
528
+
529
+ @if (toolTplRef()) {
530
+ <ng-template [ngTemplateOutlet]="toolTplRef()" />
531
+ }
532
+ </div>
533
+ }
534
+
535
+ @if (readonly()) {
536
+ <div class="flex-fill p-default pt-0">
537
+ <ng-template [ngTemplateOutlet]="sheet" />
538
+ </div>
539
+ } @else {
540
+ <sd-form #formCtrl (formSubmit)="submit.emit()" class="flex-fill p-default pt-0">
541
+ <ng-template [ngTemplateOutlet]="sheet" />
542
+ </sd-form>
543
+ }
544
+ </div>
545
+ </sd-base-container>
546
+
547
+ <ng-template #sheet>
548
+ <sd-sheet
549
+ [key]="key() + '-sheet'"
550
+ [items]="items()"
551
+ [(currentPage)]="currentPage"
552
+ [totalPageCount]="totalPageCount()"
553
+ [(sorts)]="sorts"
554
+ [useAutoSort]="totalPageCount() === 0"
555
+ [selectMode]="selectMode() ?? (readonly() ? undefined : 'multi')"
556
+ [(selectedKeys)]="selectedKeys"
557
+ [trackByFn]="trackByFn()"
558
+ [getItemCellStyleFn]="getItemCellStyleFn"
559
+ [autoSelect]="selectMode() === 'single' ? 'click' : undefined"
560
+ [columnControlsInput]="columnControls()"
561
+ (selectedKeysChange)="onSelectedKeysChange()"
562
+ >
563
+ @if (!readonly()) {
564
+ <sd-sheet-column
565
+ [fixed]="true"
566
+ [key]="'deleteButton'"
567
+ [disableResizing]="true"
568
+ [disableSorting]="true"
569
+ >
570
+ <ng-template #headerTpl>
571
+ <div class="p-xs-sm tx-center">
572
+ <ng-icon [svg]="tablerEraser" />
573
+ </div>
574
+ </ng-template>
575
+ <ng-template [cell]="items()" let-item="item">
576
+ <div class="p-xs-sm">
577
+ <sd-anchor
578
+ [theme]="'danger'"
579
+ (click)="isDeleted(item) ? restore.emit([item]) : delete.emit([item])"
580
+ >
581
+ <ng-icon [svg]="isDeleted(item) ? tablerRestore : tablerEraser" />
582
+ </sd-anchor>
583
+ </div>
584
+ </ng-template>
585
+ </sd-sheet-column>
586
+ }
587
+ </sd-sheet>
588
+ </ng-template>
589
+ `,
590
+ }]
591
+ }], null, { ready: [{ type: i0.Input, args: [{ isSignal: true, alias: "ready", required: false }] }, { type: i0.Output, args: ["readyChange"] }], initialized: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialized", required: false }] }], busyCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "busyCount", required: false }] }, { type: i0.Output, args: ["busyCountChange"] }], restricted: [{ type: i0.Input, args: [{ isSignal: true, alias: "restricted", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], viewType: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewType", required: true }] }], selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }], formCtrl: [{ type: i0.ViewChild, args: ["formCtrl", { isSignal: true }] }], filterSubmit: [{ type: i0.Output, args: ["filterSubmit"] }], submit: [{ type: i0.Output, args: ["submit"] }], create: [{ type: i0.Output, args: ["create"] }], delete: [{ type: i0.Output, args: ["delete"] }], restore: [{ type: i0.Output, args: ["restore"] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], selectedKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedKeys", required: false }] }, { type: i0.Output, args: ["selectedKeysChange"] }], currDeletedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "currDeletedItems", required: false }] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], totalPageCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPageCount", required: false }] }], sorts: [{ type: i0.Input, args: [{ isSignal: true, alias: "sorts", required: false }] }, { type: i0.Output, args: ["sortsChange"] }], trackByFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackByFn", required: true }] }], commandTplRef: [{ type: i0.ContentChild, args: ["commandTpl", { isSignal: true }] }], filterTplRef: [{ type: i0.ContentChild, args: ["filterTpl", { isSignal: true }] }], toolTplRef: [{ type: i0.ContentChild, args: ["toolTpl", { isSignal: true }] }], bottomCommandTplRef: [{ type: i0.ContentChild, args: ["bottomCommandTpl", { isSignal: true }] }], columnControls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdSheetColumn), { isSignal: true }] }] }); })();
592
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdCrudList, { className: "SdCrudList", filePath: "packages/angular/src/data/crud/sd-crud-list.ts", lineNumber: 226 }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"sd-shared-data-select-button.d.ts","sourceRoot":"","sources":["../../../src/data/shared-data/sd-shared-data-select-button.ts"],"names":[],"mappings":"AACA,OAAO,EASL,WAAW,EAEZ,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACvB,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;;AAEvE,qBAkCa,wBAAwB,CACnC,KAAK,SAAS,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,EAC7C,KAAK,SAAS,MAAM,eAAe,CAAC,MAAM,GAAG,MAAM,CAAC,EACpD,MAAM,SAAS,aAAa,CAAC,GAAG,CAAC;IAEjC,KAAK,2FAAoD;IACzD,KAAK,+CAAsB;IAC3B,KAAK,iEAA+C;IACpD,UAAU,6CAAmC;IAC7C,QAAQ,qEAAiD;IACzD,QAAQ,qEAAiD;IACzD,KAAK,qEAAiD;IACtD,IAAI,+DAAwB;IAE5B,UAAU,8EAGR;IAEF,SAAS,CAAC,QAAQ,CAAC,cAAc,kDAAuB;;yCAnB7C,wBAAwB;2CAAxB,wBAAwB;CAqCpC"}
1
+ {"version":3,"file":"sd-shared-data-select-button.d.ts","sourceRoot":"","sources":["../../../src/data/shared-data/sd-shared-data-select-button.ts"],"names":[],"mappings":"AACA,OAAO,EASL,WAAW,EAEZ,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACvB,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;;AAEvE,qBAiCa,wBAAwB,CACnC,KAAK,SAAS,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,EAC7C,KAAK,SAAS,MAAM,eAAe,CAAC,MAAM,GAAG,MAAM,CAAC,EACpD,MAAM,SAAS,aAAa,CAAC,GAAG,CAAC;IAEjC,KAAK,2FAAoD;IACzD,KAAK,+CAAsB;IAC3B,KAAK,iEAA+C;IACpD,UAAU,6CAAmC;IAC7C,QAAQ,qEAAiD;IACzD,QAAQ,qEAAiD;IACzD,KAAK,qEAAiD;IACtD,IAAI,+DAAwB;IAE5B,UAAU,8EAGR;IAEF,SAAS,CAAC,QAAQ,CAAC,cAAc,kDAAuB;;yCAnB7C,wBAAwB;2CAAxB,wBAAwB;CAqCpC"}
@@ -54,13 +54,13 @@ export class SdSharedDataSelectButton {
54
54
  i0.ɵɵcontentQuerySignal(dirIndex, ctx.itemTplRef, SdItemOfTemplate, 5, TemplateRef);
55
55
  } if (rf & 2) {
56
56
  i0.ɵɵqueryAdvance();
57
- } }, inputs: { value: [1, "value"], items: [1, "items"], modal: [1, "modal"], selectMode: [1, "selectMode"], disabled: [1, "disabled"], required: [1, "required"], inset: [1, "inset"], size: [1, "size"] }, outputs: { value: "valueChange" }, decls: 3, vars: 8, consts: [[3, "valueChange", "selectedItemsChange", "value", "selectedItems", "modal", "disabled", "required", "inset", "size", "selectMode"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function SdSharedDataSelectButton_Template(rf, ctx) { if (rf & 1) {
57
+ } }, inputs: { value: [1, "value"], items: [1, "items"], modal: [1, "modal"], selectMode: [1, "selectMode"], disabled: [1, "disabled"], required: [1, "required"], inset: [1, "inset"], size: [1, "size"] }, outputs: { value: "valueChange" }, decls: 3, vars: 7, consts: [[3, "valueChange", "value", "modal", "disabled", "required", "inset", "size", "selectMode"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function SdSharedDataSelectButton_Template(rf, ctx) { if (rf & 1) {
58
58
  i0.ɵɵelementStart(0, "sd-modal-select-button", 0);
59
- i0.ɵɵtwoWayListener("valueChange", function SdSharedDataSelectButton_Template_sd_modal_select_button_valueChange_0_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.value, $event) || (ctx.value = $event); return $event; })("selectedItemsChange", function SdSharedDataSelectButton_Template_sd_modal_select_button_selectedItemsChange_0_listener($event) { i0.ɵɵtwoWayBindingSet(ctx._selectedItems, $event) || (ctx._selectedItems = $event); return $event; });
59
+ i0.ɵɵtwoWayListener("valueChange", function SdSharedDataSelectButton_Template_sd_modal_select_button_valueChange_0_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.value, $event) || (ctx.value = $event); return $event; });
60
60
  i0.ɵɵrepeaterCreate(1, SdSharedDataSelectButton_For_2_Template, 2, 7, null, null, i0.ɵɵrepeaterTrackByIdentity);
61
61
  i0.ɵɵelementEnd();
62
62
  } if (rf & 2) {
63
- i0.ɵɵtwoWayProperty("value", ctx.value)("selectedItems", ctx._selectedItems);
63
+ i0.ɵɵtwoWayProperty("value", ctx.value);
64
64
  i0.ɵɵproperty("modal", ctx.modal())("disabled", ctx.disabled())("required", ctx.required())("inset", ctx.inset())("size", ctx.size())("selectMode", ctx.selectMode());
65
65
  i0.ɵɵadvance();
66
66
  i0.ɵɵrepeater(ctx._selectedItems());
@@ -77,7 +77,6 @@ export class SdSharedDataSelectButton {
77
77
  template: `
78
78
  <sd-modal-select-button
79
79
  [(value)]="value"
80
- [(selectedItems)]="_selectedItems"
81
80
  [modal]="modal()"
82
81
  [disabled]="disabled()"
83
82
  [required]="required()"
@@ -103,4 +102,4 @@ export class SdSharedDataSelectButton {
103
102
  `,
104
103
  }]
105
104
  }], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: true }] }], selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }], 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 }] }], itemTplRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdItemOfTemplate), { ...{ read: TemplateRef }, isSignal: true }] }] }); })();
106
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSharedDataSelectButton, { className: "SdSharedDataSelectButton", filePath: "packages/angular/src/data/shared-data/sd-shared-data-select-button.ts", lineNumber: 60 }); })();
105
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSharedDataSelectButton, { className: "SdSharedDataSelectButton", filePath: "packages/angular/src/data/shared-data/sd-shared-data-select-button.ts", lineNumber: 59 }); })();