@memberjunction/ng-base-forms 3.3.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/base-field-component.d.ts.map +1 -1
- package/dist/lib/base-field-component.js +107 -105
- package/dist/lib/base-field-component.js.map +1 -1
- package/dist/lib/base-form-component.d.ts +39 -10
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +82 -25
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/collapsible-panel.component.d.ts +30 -13
- package/dist/lib/collapsible-panel.component.d.ts.map +1 -1
- package/dist/lib/collapsible-panel.component.js +148 -93
- package/dist/lib/collapsible-panel.component.js.map +1 -1
- package/dist/lib/explorer-entity-data-grid.component.d.ts +0 -4
- package/dist/lib/explorer-entity-data-grid.component.d.ts.map +1 -1
- package/dist/lib/explorer-entity-data-grid.component.js +3 -10
- package/dist/lib/explorer-entity-data-grid.component.js.map +1 -1
- package/dist/lib/form-section-controls.component.d.ts +13 -2
- package/dist/lib/form-section-controls.component.d.ts.map +1 -1
- package/dist/lib/form-section-controls.component.js +149 -26
- package/dist/lib/form-section-controls.component.js.map +1 -1
- package/dist/lib/form-state.interface.d.ts +4 -2
- package/dist/lib/form-state.interface.d.ts.map +1 -1
- package/dist/lib/form-state.interface.js +3 -3
- package/dist/lib/form-state.interface.js.map +1 -1
- package/dist/lib/form-state.service.d.ts +31 -22
- package/dist/lib/form-state.service.d.ts.map +1 -1
- package/dist/lib/form-state.service.js +71 -71
- package/dist/lib/form-state.service.js.map +1 -1
- package/dist/lib/link-field.component.d.ts.map +1 -1
- package/dist/lib/link-field.component.js +19 -18
- package/dist/lib/link-field.component.js.map +1 -1
- package/dist/lib/section-loader-component.d.ts.map +1 -1
- package/dist/lib/section-loader-component.js +3 -2
- package/dist/lib/section-loader-component.js.map +1 -1
- package/dist/public-api.d.ts +1 -1
- package/dist/public-api.d.ts.map +1 -1
- package/package.json +28 -28
|
@@ -3,24 +3,63 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
import * as i1 from "@angular/forms";
|
|
4
4
|
import * as i2 from "@progress/kendo-angular-buttons";
|
|
5
5
|
const _c0 = ["toolbar-additional-controls", ""];
|
|
6
|
-
function
|
|
6
|
+
function FormSectionControlsComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
7
7
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
8
|
-
i0.ɵɵelementStart(0, "
|
|
9
|
-
i0.ɵɵ
|
|
10
|
-
i0.ɵɵ
|
|
8
|
+
i0.ɵɵelementStart(0, "div", 7);
|
|
9
|
+
i0.ɵɵelement(1, "span", 15);
|
|
10
|
+
i0.ɵɵelementStart(2, "span", 16);
|
|
11
|
+
i0.ɵɵtext(3, "Custom Order");
|
|
11
12
|
i0.ɵɵelementEnd();
|
|
13
|
+
i0.ɵɵelementStart(4, "button", 17);
|
|
14
|
+
i0.ɵɵlistener("click", function FormSectionControlsComponent_Conditional_6_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.confirmResetOrder()); });
|
|
15
|
+
i0.ɵɵelement(5, "span", 18);
|
|
16
|
+
i0.ɵɵelementEnd()();
|
|
12
17
|
} }
|
|
13
|
-
function
|
|
14
|
-
i0.ɵɵ
|
|
18
|
+
function FormSectionControlsComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
20
|
+
i0.ɵɵelementStart(0, "button", 19);
|
|
21
|
+
i0.ɵɵlistener("click", function FormSectionControlsComponent_Conditional_14_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.clearFilter()); });
|
|
22
|
+
i0.ɵɵelement(1, "span", 18);
|
|
23
|
+
i0.ɵɵelementEnd();
|
|
24
|
+
} }
|
|
25
|
+
function FormSectionControlsComponent_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
+
i0.ɵɵelementStart(0, "span", 13);
|
|
15
27
|
i0.ɵɵtext(1);
|
|
16
28
|
i0.ɵɵelementEnd();
|
|
17
29
|
} if (rf & 2) {
|
|
18
30
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
19
31
|
i0.ɵɵadvance();
|
|
20
|
-
i0.ɵɵtextInterpolate2("", ctx_r2.visibleCount, "/", ctx_r2.totalCount
|
|
32
|
+
i0.ɵɵtextInterpolate2("", ctx_r2.visibleCount, "/", ctx_r2.totalCount);
|
|
33
|
+
} }
|
|
34
|
+
function FormSectionControlsComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
35
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
36
|
+
i0.ɵɵelementStart(0, "div", 20);
|
|
37
|
+
i0.ɵɵlistener("click", function FormSectionControlsComponent_Conditional_16_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.cancelResetOrder()); });
|
|
38
|
+
i0.ɵɵelementStart(1, "div", 21);
|
|
39
|
+
i0.ɵɵlistener("click", function FormSectionControlsComponent_Conditional_16_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r5); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
40
|
+
i0.ɵɵelementStart(2, "div", 22);
|
|
41
|
+
i0.ɵɵelement(3, "span", 23);
|
|
42
|
+
i0.ɵɵelementStart(4, "h3");
|
|
43
|
+
i0.ɵɵtext(5, "Reset Section Order");
|
|
44
|
+
i0.ɵɵelementEnd()();
|
|
45
|
+
i0.ɵɵelementStart(6, "div", 24)(7, "p");
|
|
46
|
+
i0.ɵɵtext(8, "Are you sure you want to reset the section order to default?");
|
|
47
|
+
i0.ɵɵelementEnd();
|
|
48
|
+
i0.ɵɵelementStart(9, "p", 25);
|
|
49
|
+
i0.ɵɵtext(10, "This will remove your custom arrangement.");
|
|
50
|
+
i0.ɵɵelementEnd()();
|
|
51
|
+
i0.ɵɵelementStart(11, "div", 26)(12, "button", 27);
|
|
52
|
+
i0.ɵɵlistener("click", function FormSectionControlsComponent_Conditional_16_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.doResetOrder()); });
|
|
53
|
+
i0.ɵɵelement(13, "span", 28);
|
|
54
|
+
i0.ɵɵtext(14, " Reset Order ");
|
|
55
|
+
i0.ɵɵelementEnd();
|
|
56
|
+
i0.ɵɵelementStart(15, "button", 29);
|
|
57
|
+
i0.ɵɵlistener("click", function FormSectionControlsComponent_Conditional_16_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.cancelResetOrder()); });
|
|
58
|
+
i0.ɵɵtext(16, " Cancel ");
|
|
59
|
+
i0.ɵɵelementEnd()()()();
|
|
21
60
|
} }
|
|
22
61
|
/**
|
|
23
|
-
* Reusable component for form section controls (Expand All, Collapse All, Filter, Counter)
|
|
62
|
+
* Reusable component for form section controls (Expand All, Collapse All, Filter, Counter, Width Toggle)
|
|
24
63
|
* Designed to be projected into form toolbars via ng-content with [toolbar-additional-controls] selector
|
|
25
64
|
*/
|
|
26
65
|
export class FormSectionControlsComponent {
|
|
@@ -29,11 +68,16 @@ export class FormSectionControlsComponent {
|
|
|
29
68
|
searchFilter = '';
|
|
30
69
|
expandedCount = 0;
|
|
31
70
|
showEmptyFields = false;
|
|
71
|
+
widthMode = 'centered';
|
|
72
|
+
hasCustomOrder = false;
|
|
32
73
|
expandAll = new EventEmitter();
|
|
33
74
|
collapseAll = new EventEmitter();
|
|
34
75
|
filterChange = new EventEmitter();
|
|
35
76
|
showEmptyFieldsChange = new EventEmitter();
|
|
77
|
+
widthModeChange = new EventEmitter();
|
|
78
|
+
resetOrder = new EventEmitter();
|
|
36
79
|
searchTerm = '';
|
|
80
|
+
showResetConfirmDialog = false;
|
|
37
81
|
get allExpanded() {
|
|
38
82
|
return this.totalCount > 0 && this.expandedCount === this.totalCount;
|
|
39
83
|
}
|
|
@@ -44,8 +88,22 @@ export class FormSectionControlsComponent {
|
|
|
44
88
|
this.searchTerm = '';
|
|
45
89
|
this.filterChange.emit('');
|
|
46
90
|
}
|
|
91
|
+
toggleWidthMode() {
|
|
92
|
+
const newMode = this.widthMode === 'centered' ? 'full-width' : 'centered';
|
|
93
|
+
this.widthModeChange.emit(newMode);
|
|
94
|
+
}
|
|
95
|
+
confirmResetOrder() {
|
|
96
|
+
this.showResetConfirmDialog = true;
|
|
97
|
+
}
|
|
98
|
+
doResetOrder() {
|
|
99
|
+
this.showResetConfirmDialog = false;
|
|
100
|
+
this.resetOrder.emit();
|
|
101
|
+
}
|
|
102
|
+
cancelResetOrder() {
|
|
103
|
+
this.showResetConfirmDialog = false;
|
|
104
|
+
}
|
|
47
105
|
static ɵfac = function FormSectionControlsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FormSectionControlsComponent)(); };
|
|
48
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FormSectionControlsComponent, selectors: [["mj-form-section-controls", "toolbar-additional-controls", ""]], inputs: { visibleCount: "visibleCount", totalCount: "totalCount", searchFilter: "searchFilter", expandedCount: "expandedCount", showEmptyFields: "showEmptyFields" }, outputs: { expandAll: "expandAll", collapseAll: "collapseAll", filterChange: "filterChange", showEmptyFieldsChange: "showEmptyFieldsChange" }, attrs: _c0, decls:
|
|
106
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FormSectionControlsComponent, selectors: [["mj-form-section-controls", "toolbar-additional-controls", ""]], inputs: { visibleCount: "visibleCount", totalCount: "totalCount", searchFilter: "searchFilter", expandedCount: "expandedCount", showEmptyFields: "showEmptyFields", widthMode: "widthMode", hasCustomOrder: "hasCustomOrder" }, outputs: { expandAll: "expandAll", collapseAll: "collapseAll", filterChange: "filterChange", showEmptyFieldsChange: "showEmptyFieldsChange", widthModeChange: "widthModeChange", resetOrder: "resetOrder" }, standalone: false, attrs: _c0, decls: 17, vars: 11, consts: [["searchInput", ""], ["kendoButton", "", "title", "Expand all sections", 3, "click", "disabled"], [1, "fa-solid", "fa-angle-double-down"], ["kendoButton", "", "title", "Collapse all sections", 3, "click", "disabled"], [1, "fa-solid", "fa-angle-double-up"], ["kendoButton", "", 3, "click", "title"], [1, "fa-solid", "fa-left-right"], ["title", "Sections are in a custom order", 1, "custom-order-indicator"], [1, "show-empty-fields-toggle"], ["type", "checkbox", 3, "ngModelChange", "ngModel"], [2, "position", "relative"], ["type", "text", "placeholder", "Filter sections...", 1, "section-search", 3, "ngModelChange", "ngModel"], ["kendoButton", "", "title", "Clear filter", 1, "clear-search-btn"], [1, "section-count"], [1, "dialog-overlay"], [1, "fa-solid", "fa-shuffle"], [1, "indicator-label"], ["type", "button", "title", "Reset to default order", 1, "reset-order-btn", 3, "click"], [1, "fa-solid", "fa-xmark"], ["kendoButton", "", "title", "Clear filter", 1, "clear-search-btn", 3, "click"], [1, "dialog-overlay", 3, "click"], [1, "confirm-dialog", 3, "click"], [1, "dialog-header"], [1, "fa-solid", "fa-shuffle", "dialog-icon"], [1, "dialog-body"], [1, "dialog-hint"], [1, "dialog-actions"], ["type", "button", 1, "dialog-btn", "dialog-btn-primary", 3, "click"], [1, "fa-solid", "fa-check"], ["type", "button", 1, "dialog-btn", "dialog-btn-secondary", 3, "click"]], template: function FormSectionControlsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
49
107
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
50
108
|
i0.ɵɵelementStart(0, "button", 1);
|
|
51
109
|
i0.ɵɵlistener("click", function FormSectionControlsComponent_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.expandAll.emit()); });
|
|
@@ -55,37 +113,50 @@ export class FormSectionControlsComponent {
|
|
|
55
113
|
i0.ɵɵlistener("click", function FormSectionControlsComponent_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.collapseAll.emit()); });
|
|
56
114
|
i0.ɵɵelement(3, "span", 4);
|
|
57
115
|
i0.ɵɵelementEnd();
|
|
58
|
-
i0.ɵɵelementStart(4, "
|
|
59
|
-
i0.ɵɵ
|
|
60
|
-
i0.ɵɵ
|
|
116
|
+
i0.ɵɵelementStart(4, "button", 5);
|
|
117
|
+
i0.ɵɵlistener("click", function FormSectionControlsComponent_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.toggleWidthMode()); });
|
|
118
|
+
i0.ɵɵelement(5, "span", 6);
|
|
61
119
|
i0.ɵɵelementEnd();
|
|
62
|
-
i0.ɵɵ
|
|
63
|
-
i0.ɵɵ
|
|
120
|
+
i0.ɵɵconditionalCreate(6, FormSectionControlsComponent_Conditional_6_Template, 6, 0, "div", 7);
|
|
121
|
+
i0.ɵɵelementStart(7, "label", 8)(8, "input", 9);
|
|
122
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FormSectionControlsComponent_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.showEmptyFields, $event) || (ctx.showEmptyFields = $event); return i0.ɵɵresetView($event); });
|
|
123
|
+
i0.ɵɵlistener("ngModelChange", function FormSectionControlsComponent_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.showEmptyFieldsChange.emit($event)); });
|
|
124
|
+
i0.ɵɵelementEnd();
|
|
125
|
+
i0.ɵɵelementStart(9, "span");
|
|
126
|
+
i0.ɵɵtext(10, "Show Empty Fields");
|
|
64
127
|
i0.ɵɵelementEnd()();
|
|
65
|
-
i0.ɵɵelementStart(
|
|
66
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
67
|
-
i0.ɵɵlistener("ngModelChange", function
|
|
128
|
+
i0.ɵɵelementStart(11, "div", 10)(12, "input", 11, 0);
|
|
129
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FormSectionControlsComponent_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.searchTerm, $event) || (ctx.searchTerm = $event); return i0.ɵɵresetView($event); });
|
|
130
|
+
i0.ɵɵlistener("ngModelChange", function FormSectionControlsComponent_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.filterChange.emit($event)); });
|
|
68
131
|
i0.ɵɵelementEnd();
|
|
69
|
-
i0.ɵɵ
|
|
132
|
+
i0.ɵɵconditionalCreate(14, FormSectionControlsComponent_Conditional_14_Template, 2, 0, "button", 12);
|
|
70
133
|
i0.ɵɵelementEnd();
|
|
71
|
-
i0.ɵɵ
|
|
134
|
+
i0.ɵɵconditionalCreate(15, FormSectionControlsComponent_Conditional_15_Template, 2, 2, "span", 13);
|
|
135
|
+
i0.ɵɵconditionalCreate(16, FormSectionControlsComponent_Conditional_16_Template, 17, 0, "div", 14);
|
|
72
136
|
} if (rf & 2) {
|
|
73
137
|
i0.ɵɵproperty("disabled", ctx.allExpanded);
|
|
74
138
|
i0.ɵɵadvance(2);
|
|
75
139
|
i0.ɵɵproperty("disabled", ctx.allCollapsed);
|
|
76
|
-
i0.ɵɵadvance(
|
|
140
|
+
i0.ɵɵadvance(2);
|
|
141
|
+
i0.ɵɵclassProp("active", ctx.widthMode === "full-width");
|
|
142
|
+
i0.ɵɵproperty("title", ctx.widthMode === "full-width" ? "Switch to centered layout" : "Expand form to full width");
|
|
143
|
+
i0.ɵɵadvance(2);
|
|
144
|
+
i0.ɵɵconditional(ctx.hasCustomOrder ? 6 : -1);
|
|
145
|
+
i0.ɵɵadvance(2);
|
|
77
146
|
i0.ɵɵtwoWayProperty("ngModel", ctx.showEmptyFields);
|
|
78
147
|
i0.ɵɵadvance(4);
|
|
79
148
|
i0.ɵɵtwoWayProperty("ngModel", ctx.searchTerm);
|
|
80
149
|
i0.ɵɵadvance(2);
|
|
81
|
-
i0.ɵɵconditional(ctx.searchTerm ?
|
|
150
|
+
i0.ɵɵconditional(ctx.searchTerm ? 14 : -1);
|
|
151
|
+
i0.ɵɵadvance();
|
|
152
|
+
i0.ɵɵconditional(ctx.searchFilter && ctx.searchFilter.trim() ? 15 : -1);
|
|
82
153
|
i0.ɵɵadvance();
|
|
83
|
-
i0.ɵɵconditional(ctx.
|
|
84
|
-
} }, dependencies: [i1.DefaultValueAccessor, i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.ButtonComponent], styles: ["\n\n\n button[_ngcontent-%COMP%] {\n padding:
|
|
154
|
+
i0.ɵɵconditional(ctx.showResetConfirmDialog ? 16 : -1);
|
|
155
|
+
} }, dependencies: [i1.DefaultValueAccessor, i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.ButtonComponent], styles: ["\n\n\n button[_ngcontent-%COMP%] {\n padding: 6px 12px;\n font-size: 13px;\n border: 1px solid #d1d5db;\n background: white;\n color: #374151;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n margin-right: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n font-weight: 500;\n height: 36px;\n box-sizing: border-box;\n }\n\n button[_ngcontent-%COMP%]:hover {\n background: #667eea;\n color: white;\n border-color: #667eea;\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);\n }\n\n button[_ngcontent-%COMP%]:active {\n transform: translateY(0);\n }\n\n button.active[_ngcontent-%COMP%] {\n background: #667eea;\n color: white;\n border-color: #667eea;\n }\n\n button[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 0;\n font-size: 14px;\n }\n\n .section-search[_ngcontent-%COMP%] {\n padding: 6px 14px;\n font-size: 13px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n width: 240px;\n transition: all 0.2s;\n background: white;\n height: 36px;\n box-sizing: border-box;\n }\n\n .section-search[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #667eea;\n box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);\n }\n\n .section-search[_ngcontent-%COMP%]::placeholder {\n color: #9ca3af;\n font-style: italic;\n }\n\n .section-count[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #6b7280;\n font-weight: 500;\n padding: 6px 12px;\n background: #f3f4f6;\n border-radius: 6px;\n }\n\n .clear-search-btn[_ngcontent-%COMP%] {\n position: absolute;\n right: 6px;\n top: 50%;\n transform: translateY(-50%);\n padding: 4px 8px;\n min-width: unset;\n }\n\n .show-empty-fields-toggle[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 6px 14px;\n background: white;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n font-size: 13px;\n font-weight: 500;\n color: #374151;\n user-select: none;\n height: 36px;\n box-sizing: border-box;\n }\n\n .show-empty-fields-toggle[_ngcontent-%COMP%]:hover {\n background: #f3f4f6;\n border-color: #9ca3af;\n }\n\n .show-empty-fields-toggle[_ngcontent-%COMP%] input[type=\"checkbox\"][_ngcontent-%COMP%] {\n cursor: pointer;\n width: 16px;\n height: 16px;\n }\n\n .show-empty-fields-toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n white-space: nowrap;\n }\n\n .custom-order-indicator[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 8px 6px 14px;\n background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n color: white;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);\n height: 36px;\n box-sizing: border-box;\n }\n\n .custom-order-indicator[_ngcontent-%COMP%] .indicator-label[_ngcontent-%COMP%] {\n white-space: nowrap;\n }\n\n .custom-order-indicator[_ngcontent-%COMP%] .reset-order-btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n padding: 0;\n margin-left: 4px;\n background: rgba(255, 255, 255, 0.2);\n border: none;\n border-radius: 50%;\n color: white;\n cursor: pointer;\n transition: all 0.2s ease;\n font-size: 10px;\n }\n\n .custom-order-indicator[_ngcontent-%COMP%] .reset-order-btn[_ngcontent-%COMP%]:hover {\n background: rgba(255, 255, 255, 0.4);\n transform: scale(1.1);\n }\n\n .custom-order-indicator[_ngcontent-%COMP%] .reset-order-btn[_ngcontent-%COMP%]:active {\n transform: scale(0.95);\n }\n\n \n\n .dialog-overlay[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n animation: _ngcontent-%COMP%_fadeIn 0.15s ease;\n }\n\n @keyframes _ngcontent-%COMP%_fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n @keyframes _ngcontent-%COMP%_slideIn {\n from {\n opacity: 0;\n transform: scale(0.95) translateY(-10px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n }\n\n .confirm-dialog[_ngcontent-%COMP%] {\n background: white;\n border-radius: 12px;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);\n width: 380px;\n max-width: 90vw;\n overflow: hidden;\n animation: _ngcontent-%COMP%_slideIn 0.2s ease;\n }\n\n .dialog-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 20px 24px;\n background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n color: white;\n }\n\n .dialog-header[_ngcontent-%COMP%] .dialog-icon[_ngcontent-%COMP%] {\n font-size: 20px;\n }\n\n .dialog-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n }\n\n .dialog-body[_ngcontent-%COMP%] {\n padding: 24px;\n }\n\n .dialog-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0 0 8px 0;\n font-size: 15px;\n color: #374151;\n line-height: 1.5;\n }\n\n .dialog-body[_ngcontent-%COMP%] .dialog-hint[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #6b7280;\n margin-bottom: 0;\n }\n\n .dialog-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n padding: 16px 24px 24px;\n }\n\n .dialog-btn[_ngcontent-%COMP%] {\n flex: 1;\n padding: 10px 16px;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n }\n\n .dialog-btn-primary[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n color: white;\n border: none;\n }\n\n .dialog-btn-primary[_ngcontent-%COMP%]:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);\n }\n\n .dialog-btn-secondary[_ngcontent-%COMP%] {\n background: white;\n color: #374151;\n border: 1px solid #d1d5db;\n }\n\n .dialog-btn-secondary[_ngcontent-%COMP%]:hover {\n background: #f3f4f6;\n border-color: #9ca3af;\n }"], changeDetection: 0 });
|
|
85
156
|
}
|
|
86
157
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormSectionControlsComponent, [{
|
|
87
158
|
type: Component,
|
|
88
|
-
args: [{ selector: 'mj-form-section-controls[toolbar-additional-controls]', changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
159
|
+
args: [{ standalone: false, selector: 'mj-form-section-controls[toolbar-additional-controls]', changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
89
160
|
<button kendoButton
|
|
90
161
|
(click)="expandAll.emit()"
|
|
91
162
|
[disabled]="allExpanded"
|
|
@@ -98,6 +169,25 @@ export class FormSectionControlsComponent {
|
|
|
98
169
|
title="Collapse all sections">
|
|
99
170
|
<span class="fa-solid fa-angle-double-up"></span>
|
|
100
171
|
</button>
|
|
172
|
+
<button kendoButton
|
|
173
|
+
(click)="toggleWidthMode()"
|
|
174
|
+
[class.active]="widthMode === 'full-width'"
|
|
175
|
+
[title]="widthMode === 'full-width' ? 'Switch to centered layout' : 'Expand form to full width'">
|
|
176
|
+
<span class="fa-solid fa-left-right"></span>
|
|
177
|
+
</button>
|
|
178
|
+
@if (hasCustomOrder) {
|
|
179
|
+
<div class="custom-order-indicator"
|
|
180
|
+
title="Sections are in a custom order">
|
|
181
|
+
<span class="fa-solid fa-shuffle"></span>
|
|
182
|
+
<span class="indicator-label">Custom Order</span>
|
|
183
|
+
<button type="button"
|
|
184
|
+
class="reset-order-btn"
|
|
185
|
+
(click)="confirmResetOrder()"
|
|
186
|
+
title="Reset to default order">
|
|
187
|
+
<span class="fa-solid fa-xmark"></span>
|
|
188
|
+
</button>
|
|
189
|
+
</div>
|
|
190
|
+
}
|
|
101
191
|
<label class="show-empty-fields-toggle">
|
|
102
192
|
<input
|
|
103
193
|
type="checkbox"
|
|
@@ -126,7 +216,32 @@ export class FormSectionControlsComponent {
|
|
|
126
216
|
@if (searchFilter && searchFilter.trim()) {
|
|
127
217
|
<span class="section-count">{{visibleCount}}/{{totalCount}}</span>
|
|
128
218
|
}
|
|
129
|
-
|
|
219
|
+
|
|
220
|
+
<!-- Custom confirm dialog for reset order -->
|
|
221
|
+
@if (showResetConfirmDialog) {
|
|
222
|
+
<div class="dialog-overlay" (click)="cancelResetOrder()">
|
|
223
|
+
<div class="confirm-dialog" (click)="$event.stopPropagation()">
|
|
224
|
+
<div class="dialog-header">
|
|
225
|
+
<span class="fa-solid fa-shuffle dialog-icon"></span>
|
|
226
|
+
<h3>Reset Section Order</h3>
|
|
227
|
+
</div>
|
|
228
|
+
<div class="dialog-body">
|
|
229
|
+
<p>Are you sure you want to reset the section order to default?</p>
|
|
230
|
+
<p class="dialog-hint">This will remove your custom arrangement.</p>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="dialog-actions">
|
|
233
|
+
<button type="button" class="dialog-btn dialog-btn-primary" (click)="doResetOrder()">
|
|
234
|
+
<span class="fa-solid fa-check"></span>
|
|
235
|
+
Reset Order
|
|
236
|
+
</button>
|
|
237
|
+
<button type="button" class="dialog-btn dialog-btn-secondary" (click)="cancelResetOrder()">
|
|
238
|
+
Cancel
|
|
239
|
+
</button>
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
}
|
|
244
|
+
`, styles: ["\n /* Note: positioning (display, gap, align-items, margin-left) is handled by parent toolbar CSS */\n\n button {\n padding: 6px 12px;\n font-size: 13px;\n border: 1px solid #d1d5db;\n background: white;\n color: #374151;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n margin-right: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n font-weight: 500;\n height: 36px;\n box-sizing: border-box;\n }\n\n button:hover {\n background: #667eea;\n color: white;\n border-color: #667eea;\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);\n }\n\n button:active {\n transform: translateY(0);\n }\n\n button.active {\n background: #667eea;\n color: white;\n border-color: #667eea;\n }\n\n button i {\n margin-right: 0;\n font-size: 14px;\n }\n\n .section-search {\n padding: 6px 14px;\n font-size: 13px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n width: 240px;\n transition: all 0.2s;\n background: white;\n height: 36px;\n box-sizing: border-box;\n }\n\n .section-search:focus {\n outline: none;\n border-color: #667eea;\n box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);\n }\n\n .section-search::placeholder {\n color: #9ca3af;\n font-style: italic;\n }\n\n .section-count {\n font-size: 13px;\n color: #6b7280;\n font-weight: 500;\n padding: 6px 12px;\n background: #f3f4f6;\n border-radius: 6px;\n }\n\n .clear-search-btn {\n position: absolute;\n right: 6px;\n top: 50%;\n transform: translateY(-50%);\n padding: 4px 8px;\n min-width: unset;\n }\n\n .show-empty-fields-toggle {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 6px 14px;\n background: white;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n font-size: 13px;\n font-weight: 500;\n color: #374151;\n user-select: none;\n height: 36px;\n box-sizing: border-box;\n }\n\n .show-empty-fields-toggle:hover {\n background: #f3f4f6;\n border-color: #9ca3af;\n }\n\n .show-empty-fields-toggle input[type=\"checkbox\"] {\n cursor: pointer;\n width: 16px;\n height: 16px;\n }\n\n .show-empty-fields-toggle span {\n white-space: nowrap;\n }\n\n .custom-order-indicator {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 8px 6px 14px;\n background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n color: white;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);\n height: 36px;\n box-sizing: border-box;\n }\n\n .custom-order-indicator .indicator-label {\n white-space: nowrap;\n }\n\n .custom-order-indicator .reset-order-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n padding: 0;\n margin-left: 4px;\n background: rgba(255, 255, 255, 0.2);\n border: none;\n border-radius: 50%;\n color: white;\n cursor: pointer;\n transition: all 0.2s ease;\n font-size: 10px;\n }\n\n .custom-order-indicator .reset-order-btn:hover {\n background: rgba(255, 255, 255, 0.4);\n transform: scale(1.1);\n }\n\n .custom-order-indicator .reset-order-btn:active {\n transform: scale(0.95);\n }\n\n /* Custom confirm dialog styles */\n .dialog-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n animation: fadeIn 0.15s ease;\n }\n\n @keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n @keyframes slideIn {\n from {\n opacity: 0;\n transform: scale(0.95) translateY(-10px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n }\n\n .confirm-dialog {\n background: white;\n border-radius: 12px;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);\n width: 380px;\n max-width: 90vw;\n overflow: hidden;\n animation: slideIn 0.2s ease;\n }\n\n .dialog-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 20px 24px;\n background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n color: white;\n }\n\n .dialog-header .dialog-icon {\n font-size: 20px;\n }\n\n .dialog-header h3 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n }\n\n .dialog-body {\n padding: 24px;\n }\n\n .dialog-body p {\n margin: 0 0 8px 0;\n font-size: 15px;\n color: #374151;\n line-height: 1.5;\n }\n\n .dialog-body .dialog-hint {\n font-size: 13px;\n color: #6b7280;\n margin-bottom: 0;\n }\n\n .dialog-actions {\n display: flex;\n gap: 12px;\n padding: 16px 24px 24px;\n }\n\n .dialog-btn {\n flex: 1;\n padding: 10px 16px;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n }\n\n .dialog-btn-primary {\n background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n color: white;\n border: none;\n }\n\n .dialog-btn-primary:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);\n }\n\n .dialog-btn-secondary {\n background: white;\n color: #374151;\n border: 1px solid #d1d5db;\n }\n\n .dialog-btn-secondary:hover {\n background: #f3f4f6;\n border-color: #9ca3af;\n }\n "] }]
|
|
130
245
|
}], null, { visibleCount: [{
|
|
131
246
|
type: Input
|
|
132
247
|
}], totalCount: [{
|
|
@@ -137,6 +252,10 @@ export class FormSectionControlsComponent {
|
|
|
137
252
|
type: Input
|
|
138
253
|
}], showEmptyFields: [{
|
|
139
254
|
type: Input
|
|
255
|
+
}], widthMode: [{
|
|
256
|
+
type: Input
|
|
257
|
+
}], hasCustomOrder: [{
|
|
258
|
+
type: Input
|
|
140
259
|
}], expandAll: [{
|
|
141
260
|
type: Output
|
|
142
261
|
}], collapseAll: [{
|
|
@@ -145,6 +264,10 @@ export class FormSectionControlsComponent {
|
|
|
145
264
|
type: Output
|
|
146
265
|
}], showEmptyFieldsChange: [{
|
|
147
266
|
type: Output
|
|
267
|
+
}], widthModeChange: [{
|
|
268
|
+
type: Output
|
|
269
|
+
}], resetOrder: [{
|
|
270
|
+
type: Output
|
|
148
271
|
}] }); })();
|
|
149
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FormSectionControlsComponent, { className: "FormSectionControlsComponent", filePath: "src/lib/form-section-controls.component.ts", lineNumber:
|
|
272
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FormSectionControlsComponent, { className: "FormSectionControlsComponent", filePath: "src/lib/form-section-controls.component.ts", lineNumber: 384 }); })();
|
|
150
273
|
//# sourceMappingURL=form-section-controls.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-section-controls.component.js","sourceRoot":"","sources":["../../src/lib/form-section-controls.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;;;;;;;
|
|
1
|
+
{"version":3,"file":"form-section-controls.component.js","sourceRoot":"","sources":["../../src/lib/form-section-controls.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;;;;;;;IAiCpF,8BAC4C;IACxC,2BAAyC;IACzC,gCAA8B;IAAA,4BAAY;IAAA,iBAAO;IACjD,kCAGuC;IAD/B,gMAAS,0BAAmB,KAAC;IAEjC,2BAAuC;IAE/C,AADI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,AADJ,gCAAiC,oBAOZ;YAFb,kQAAwB;YACxB,qKAAiB,6BAAyB,KAAC;YAL/C,iBAMiB;YACjB,oGAAkB;YAStB,iBAAM;YACN,kGAA2C;YAK3C,kGAA8B;;YA3DtB,0CAAwB;YAMxB,eAAyB;YAAzB,2CAAyB;YAMzB,eAA2C;YAA3C,wDAA2C;YAC3C,kHAAgG;YAGxG,eAYC;YAZD,6CAYC;YAIO,eAA6B;YAA7B,mDAA6B;YAS7B,eAAwB;YAAxB,8CAAwB;YAG5B,eAQC;YARD,0CAQC;YAEL,cAEC;YAFD,uEAEC;YAGD,cAsBC;YAtBD,sDAsBC;;;iFA8RI,4BAA4B;cAtXxC,SAAS;6BACI,KAAK,YACL,uDAAuD,mBAChD,uBAAuB,CAAC,MAAM,YACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqFT;;kBA8RA,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFAbE,4BAA4B"}
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
export interface FormSectionState {
|
|
5
5
|
/** Whether the section is currently expanded */
|
|
6
6
|
isExpanded: boolean;
|
|
7
|
-
/** Width mode for the section panel */
|
|
8
|
-
widthMode: 'normal' | 'full-width';
|
|
9
7
|
}
|
|
10
8
|
/**
|
|
11
9
|
* Complete form state for an entity, persisted to User Settings
|
|
@@ -15,6 +13,10 @@ export interface FormState {
|
|
|
15
13
|
sections: Record<string, FormSectionState>;
|
|
16
14
|
/** Whether to show fields with empty values */
|
|
17
15
|
showEmptyFields: boolean;
|
|
16
|
+
/** Form width mode - 'centered' uses max-width constraint, 'full-width' uses all available space */
|
|
17
|
+
widthMode: 'centered' | 'full-width';
|
|
18
|
+
/** Custom section ordering - array of sectionKeys in user's preferred order */
|
|
19
|
+
sectionOrder?: string[];
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
20
22
|
* Default state for a new form (when no saved state exists)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-state.interface.d.ts","sourceRoot":"","sources":["../../src/lib/form-state.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,gDAAgD;IAChD,UAAU,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"form-state.interface.d.ts","sourceRoot":"","sources":["../../src/lib/form-state.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,gDAAgD;IAChD,UAAU,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC3C,+CAA+C;IAC/C,eAAe,EAAE,OAAO,CAAC;IACzB,oGAAoG;IACpG,SAAS,EAAE,UAAU,GAAG,YAAY,CAAC;IACrC,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAIhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,gBAEnC,CAAC"}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const DEFAULT_FORM_STATE = {
|
|
5
5
|
sections: {},
|
|
6
|
-
showEmptyFields: false
|
|
6
|
+
showEmptyFields: false,
|
|
7
|
+
widthMode: 'centered'
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
9
10
|
* Default state for a new section (when section not yet in saved state)
|
|
10
11
|
*/
|
|
11
12
|
export const DEFAULT_SECTION_STATE = {
|
|
12
|
-
isExpanded: true
|
|
13
|
-
widthMode: 'normal'
|
|
13
|
+
isExpanded: true
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=form-state.interface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-state.interface.js","sourceRoot":"","sources":["../../src/lib/form-state.interface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form-state.interface.js","sourceRoot":"","sources":["../../src/lib/form-state.interface.ts"],"names":[],"mappings":"AAsBA;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAc;IACzC,QAAQ,EAAE,EAAE;IACZ,eAAe,EAAE,KAAK;IACtB,SAAS,EAAE,UAAU;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAqB;IACnD,UAAU,EAAE,IAAI;CACnB,CAAC"}
|
|
@@ -9,8 +9,6 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
export declare class FormStateService {
|
|
10
10
|
/** Cache of BehaviorSubjects per entity name */
|
|
11
11
|
private stateCache;
|
|
12
|
-
/** Debounce timeouts per entity name */
|
|
13
|
-
private saveTimeouts;
|
|
14
12
|
/** Track which entities have been loaded from DB */
|
|
15
13
|
private loadedEntities;
|
|
16
14
|
/** Track loading promises to prevent duplicate loads */
|
|
@@ -64,25 +62,22 @@ export declare class FormStateService {
|
|
|
64
62
|
*/
|
|
65
63
|
toggleSection(entityName: string, sectionKey: string): void;
|
|
66
64
|
/**
|
|
67
|
-
* Get
|
|
65
|
+
* Get form width mode.
|
|
68
66
|
* @param entityName The entity name
|
|
69
|
-
* @
|
|
70
|
-
* @returns Width mode ('normal' or 'full-width')
|
|
67
|
+
* @returns Width mode ('centered' or 'full-width')
|
|
71
68
|
*/
|
|
72
|
-
|
|
69
|
+
getWidthMode(entityName: string): 'centered' | 'full-width';
|
|
73
70
|
/**
|
|
74
|
-
* Set
|
|
71
|
+
* Set form width mode.
|
|
75
72
|
* @param entityName The entity name
|
|
76
|
-
* @param sectionKey The section key
|
|
77
73
|
* @param widthMode The width mode
|
|
78
74
|
*/
|
|
79
|
-
|
|
75
|
+
setWidthMode(entityName: string, widthMode: 'centered' | 'full-width'): void;
|
|
80
76
|
/**
|
|
81
|
-
* Toggle
|
|
77
|
+
* Toggle form width mode between centered and full-width.
|
|
82
78
|
* @param entityName The entity name
|
|
83
|
-
* @param sectionKey The section key
|
|
84
79
|
*/
|
|
85
|
-
|
|
80
|
+
toggleWidthMode(entityName: string): void;
|
|
86
81
|
/**
|
|
87
82
|
* Get showEmptyFields preference for an entity.
|
|
88
83
|
* @param entityName The entity name
|
|
@@ -108,15 +103,33 @@ export declare class FormStateService {
|
|
|
108
103
|
*/
|
|
109
104
|
collapseAllSections(entityName: string, sectionKeys: string[]): void;
|
|
110
105
|
/**
|
|
111
|
-
* Reset
|
|
106
|
+
* Reset state to defaults for an entity.
|
|
112
107
|
* @param entityName The entity name
|
|
113
108
|
*/
|
|
114
|
-
|
|
109
|
+
resetToDefaults(entityName: string): void;
|
|
115
110
|
/**
|
|
116
|
-
*
|
|
111
|
+
* Get the custom section order for an entity.
|
|
117
112
|
* @param entityName The entity name
|
|
113
|
+
* @returns Array of section keys in user's preferred order, or undefined if using default order
|
|
118
114
|
*/
|
|
119
|
-
|
|
115
|
+
getSectionOrder(entityName: string): string[] | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Set the custom section order for an entity.
|
|
118
|
+
* @param entityName The entity name
|
|
119
|
+
* @param sectionOrder Array of section keys in the desired order
|
|
120
|
+
*/
|
|
121
|
+
setSectionOrder(entityName: string, sectionOrder: string[]): void;
|
|
122
|
+
/**
|
|
123
|
+
* Reset the section order to default (removes custom ordering).
|
|
124
|
+
* @param entityName The entity name
|
|
125
|
+
*/
|
|
126
|
+
resetSectionOrder(entityName: string): void;
|
|
127
|
+
/**
|
|
128
|
+
* Check if a custom section order exists for an entity.
|
|
129
|
+
* @param entityName The entity name
|
|
130
|
+
* @returns True if custom order exists
|
|
131
|
+
*/
|
|
132
|
+
hasCustomSectionOrder(entityName: string): boolean;
|
|
120
133
|
/**
|
|
121
134
|
* Get the count of expanded sections.
|
|
122
135
|
* @param entityName The entity name
|
|
@@ -141,13 +154,9 @@ export declare class FormStateService {
|
|
|
141
154
|
*/
|
|
142
155
|
private loadState;
|
|
143
156
|
/**
|
|
144
|
-
*
|
|
145
|
-
*/
|
|
146
|
-
private debouncedSave;
|
|
147
|
-
/**
|
|
148
|
-
* Save state to User Settings using UserInfoEngine for cached lookup.
|
|
157
|
+
* Queue a debounced save using UserInfoEngine's centralized debounce.
|
|
149
158
|
*/
|
|
150
|
-
private
|
|
159
|
+
private queueSave;
|
|
151
160
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormStateService, never>;
|
|
152
161
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormStateService>;
|
|
153
162
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-state.service.d.ts","sourceRoot":"","sources":["../../src/lib/form-state.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,UAAU,EAAE,MAAM,MAAM,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAA6C,MAAM,wBAAwB,CAAC;;
|
|
1
|
+
{"version":3,"file":"form-state.service.d.ts","sourceRoot":"","sources":["../../src/lib/form-state.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,UAAU,EAAE,MAAM,MAAM,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAA6C,MAAM,wBAAwB,CAAC;;AAIhH;;;;GAIG;AACH,qBAGa,gBAAgB;IACzB,gDAAgD;IAChD,OAAO,CAAC,UAAU,CAAiD;IAEnE,oDAAoD;IACpD,OAAO,CAAC,cAAc,CAAqB;IAE3C,wDAAwD;IACxD,OAAO,CAAC,eAAe,CAAoC;IAE3D,OAAO,CAAC,QAAQ,CAAkB;IAElC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAAC,SAA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