@dereekb/dbx-form 13.6.17 → 13.8.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/fesm2022/dereekb-dbx-form-array.field.component-1wYSd4d3.mjs +169 -0
- package/fesm2022/dereekb-dbx-form-array.field.component-1wYSd4d3.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-calendar.mjs +440 -147
- package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs +56 -0
- package/fesm2022/dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-formfield.field.component-BQyujXe3.mjs +70 -0
- package/fesm2022/dereekb-dbx-form-formfield.field.component-BQyujXe3.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-info.field.component-B0cFprvc.mjs +50 -0
- package/fesm2022/dereekb-dbx-form-info.field.component-B0cFprvc.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-info.wrapper.field.component-Crm4wVr5.mjs +35 -0
- package/fesm2022/dereekb-dbx-form-info.wrapper.field.component-Crm4wVr5.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-mapbox.mjs +629 -32
- package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-quiz.mjs +46 -55
- package/fesm2022/dereekb-dbx-form-quiz.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-section.field.component-DliafLqL.mjs +63 -0
- package/fesm2022/dereekb-dbx-form-section.field.component-DliafLqL.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-style.field.component-C3ZNiotx.mjs +71 -0
- package/fesm2022/dereekb-dbx-form-style.field.component-C3ZNiotx.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-working.field.component-CO8vK2bH.mjs +53 -0
- package/fesm2022/dereekb-dbx-form-working.field.component-CO8vK2bH.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-working.wrapper.field.component-BtD7_5i5.mjs +54 -0
- package/fesm2022/dereekb-dbx-form-working.wrapper.field.component-BtD7_5i5.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs +87 -0
- package/fesm2022/dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form.mjs +11793 -4852
- package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
- package/lib/forge/field/_field.scss +14 -0
- package/lib/forge/field/selection/_selection.scss +15 -0
- package/lib/forge/field/selection/pickable/_pickable.scss +11 -0
- package/lib/forge/field/selection/searchable/_searchable.scss +34 -0
- package/lib/forge/field/selection/sourceselect/_sourceselect.scss +46 -0
- package/lib/forge/field/wrapper/_wrapper.scss +62 -0
- package/lib/forge/style/_shared.scss +26 -0
- package/lib/form/_form.scss +95 -0
- package/lib/formly/field/texteditor/_texteditor.scss +8 -0
- package/lib/formly/field/value/array/_array.scss +6 -0
- package/lib/formly/field/value/phone/_phone.scss +4 -1
- package/lib/style/_all-core.scss +2 -0
- package/lib/style/_all-theme.scss +2 -0
- package/package.json +16 -13
- package/types/dereekb-dbx-form-calendar.d.ts +313 -96
- package/types/dereekb-dbx-form-mapbox.d.ts +297 -4
- package/types/dereekb-dbx-form.d.ts +8013 -2481
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, signal, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { CdkDropList, CdkDrag, CdkDragHandle, CdkDragPlaceholder } from '@angular/cdk/drag-drop';
|
|
4
|
+
import * as i1 from '@angular/material/icon';
|
|
5
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
6
|
+
import * as i3 from '@angular/material/button';
|
|
7
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
+
import { DynamicForm } from '@ng-forge/dynamic-forms';
|
|
9
|
+
import { DbxButtonComponent, DbxButtonSpacerDirective } from '@dereekb/dbx-web';
|
|
10
|
+
import { forgeFieldDisabled } from './dereekb-dbx-form.mjs';
|
|
11
|
+
|
|
12
|
+
let _forgeArrayItemTrackId = 0;
|
|
13
|
+
/**
|
|
14
|
+
* Forge ValueFieldComponent that renders a drag-and-drop array.
|
|
15
|
+
*
|
|
16
|
+
* Each array item is rendered as a nested `DynamicForm` using the provided template.
|
|
17
|
+
* Items can be reordered via CDK drag/drop, added, removed, and duplicated.
|
|
18
|
+
*
|
|
19
|
+
* This is the forge equivalent of formly's `DbxFormRepeatArrayTypeComponent`.
|
|
20
|
+
*/
|
|
21
|
+
class DbxForgeArrayFieldComponent {
|
|
22
|
+
// ng-forge ValueFieldComponent inputs
|
|
23
|
+
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
|
|
24
|
+
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
25
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
26
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
27
|
+
className = input('', ...(ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []));
|
|
28
|
+
tabIndex = input(...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : /* istanbul ignore next */ []));
|
|
29
|
+
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
30
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : /* istanbul ignore next */ []));
|
|
31
|
+
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : /* istanbul ignore next */ []));
|
|
32
|
+
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : /* istanbul ignore next */ []));
|
|
33
|
+
itemsSignal = signal([], ...(ngDevMode ? [{ debugName: "itemsSignal" }] : /* istanbul ignore next */ []));
|
|
34
|
+
_initialized = false;
|
|
35
|
+
templateConfigSignal = computed(() => {
|
|
36
|
+
const template = this.props()?.template;
|
|
37
|
+
if (!template) {
|
|
38
|
+
return { fields: [] };
|
|
39
|
+
}
|
|
40
|
+
const fields = Array.isArray(template) ? template : [template];
|
|
41
|
+
return { fields };
|
|
42
|
+
}, ...(ngDevMode ? [{ debugName: "templateConfigSignal" }] : /* istanbul ignore next */ []));
|
|
43
|
+
// Disabled state
|
|
44
|
+
isDisabled = forgeFieldDisabled();
|
|
45
|
+
formOptionsSignal = computed(() => (this.isDisabled() ? { disabled: true } : undefined), ...(ngDevMode ? [{ debugName: "formOptionsSignal" }] : /* istanbul ignore next */ []));
|
|
46
|
+
disableRearrangeSignal = computed(() => this.props()?.disableRearrange ?? false, ...(ngDevMode ? [{ debugName: "disableRearrangeSignal" }] : /* istanbul ignore next */ []));
|
|
47
|
+
allowAddSignal = computed(() => this.props()?.allowAdd ?? true, ...(ngDevMode ? [{ debugName: "allowAddSignal" }] : /* istanbul ignore next */ []));
|
|
48
|
+
allowRemoveSignal = computed(() => this.props()?.allowRemove ?? true, ...(ngDevMode ? [{ debugName: "allowRemoveSignal" }] : /* istanbul ignore next */ []));
|
|
49
|
+
allowDuplicateSignal = computed(() => this.props()?.allowDuplicate ?? false, ...(ngDevMode ? [{ debugName: "allowDuplicateSignal" }] : /* istanbul ignore next */ []));
|
|
50
|
+
addTextSignal = computed(() => this.props()?.addText ?? 'Add', ...(ngDevMode ? [{ debugName: "addTextSignal" }] : /* istanbul ignore next */ []));
|
|
51
|
+
removeTextSignal = computed(() => this.props()?.removeText ?? 'Remove', ...(ngDevMode ? [{ debugName: "removeTextSignal" }] : /* istanbul ignore next */ []));
|
|
52
|
+
duplicateTextSignal = computed(() => this.props()?.duplicateText ?? 'Duplicate', ...(ngDevMode ? [{ debugName: "duplicateTextSignal" }] : /* istanbul ignore next */ []));
|
|
53
|
+
static _DEFAULT_ADD_BUTTON_STYLE = { type: 'raised', color: 'primary' };
|
|
54
|
+
static _DEFAULT_REMOVE_BUTTON_STYLE = { type: 'stroked', color: 'warn' };
|
|
55
|
+
static _DEFAULT_DUPLICATE_BUTTON_STYLE = { type: 'stroked', color: 'primary' };
|
|
56
|
+
addButtonStyleSignal = computed(() => this.props()?.addButtonStyle ?? DbxForgeArrayFieldComponent._DEFAULT_ADD_BUTTON_STYLE, ...(ngDevMode ? [{ debugName: "addButtonStyleSignal" }] : /* istanbul ignore next */ []));
|
|
57
|
+
removeButtonStyleSignal = computed(() => this.props()?.removeButtonStyle ?? DbxForgeArrayFieldComponent._DEFAULT_REMOVE_BUTTON_STYLE, ...(ngDevMode ? [{ debugName: "removeButtonStyleSignal" }] : /* istanbul ignore next */ []));
|
|
58
|
+
duplicateButtonStyleSignal = computed(() => this.props()?.duplicateButtonStyle ?? DbxForgeArrayFieldComponent._DEFAULT_DUPLICATE_BUTTON_STYLE, ...(ngDevMode ? [{ debugName: "duplicateButtonStyleSignal" }] : /* istanbul ignore next */ []));
|
|
59
|
+
showAddButtonSignal = computed(() => {
|
|
60
|
+
if (!this.allowAddSignal()) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const maxLength = this.props()?.maxLength;
|
|
64
|
+
if (maxLength != null) {
|
|
65
|
+
return this.itemsSignal().length < maxLength;
|
|
66
|
+
}
|
|
67
|
+
return true;
|
|
68
|
+
}, ...(ngDevMode ? [{ debugName: "showAddButtonSignal" }] : /* istanbul ignore next */ []));
|
|
69
|
+
constructor() {
|
|
70
|
+
effect(() => {
|
|
71
|
+
const fieldState = this.field()();
|
|
72
|
+
const values = fieldState.value() ?? [];
|
|
73
|
+
if (!this._initialized && Array.isArray(values)) {
|
|
74
|
+
this._initialized = true;
|
|
75
|
+
this.itemsSignal.set(values.map((value) => ({
|
|
76
|
+
trackId: _forgeArrayItemTrackId++,
|
|
77
|
+
value
|
|
78
|
+
})));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Cast item value to Partial for the DynamicForm [value] binding.
|
|
84
|
+
*
|
|
85
|
+
* @param value - The raw array item value to cast
|
|
86
|
+
* @returns The value cast as a Record for DynamicForm binding, or undefined if null/undefined
|
|
87
|
+
*/
|
|
88
|
+
asPartial(value) {
|
|
89
|
+
return value ?? undefined;
|
|
90
|
+
}
|
|
91
|
+
labelForItem(index, value) {
|
|
92
|
+
const labelForField = this.props()?.labelForField;
|
|
93
|
+
if (!labelForField) {
|
|
94
|
+
return `${index + 1}.`;
|
|
95
|
+
}
|
|
96
|
+
if (typeof labelForField === 'string') {
|
|
97
|
+
return `${index + 1}. ${labelForField}`;
|
|
98
|
+
}
|
|
99
|
+
const pair = { index, value: value };
|
|
100
|
+
return `${index + 1}. ${labelForField(pair)}`;
|
|
101
|
+
}
|
|
102
|
+
onItemValueChange(index, newValue) {
|
|
103
|
+
const items = [...this.itemsSignal()];
|
|
104
|
+
if (items[index]) {
|
|
105
|
+
items[index] = { ...items[index], value: newValue };
|
|
106
|
+
this.itemsSignal.set(items);
|
|
107
|
+
this._syncToFieldTree();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
addItem() {
|
|
111
|
+
const items = [...this.itemsSignal()];
|
|
112
|
+
items.push({ trackId: _forgeArrayItemTrackId++, value: {} });
|
|
113
|
+
this.itemsSignal.set(items);
|
|
114
|
+
this._syncToFieldTree();
|
|
115
|
+
}
|
|
116
|
+
removeItem(index) {
|
|
117
|
+
const items = [...this.itemsSignal()];
|
|
118
|
+
items.splice(index, 1);
|
|
119
|
+
this.itemsSignal.set(items);
|
|
120
|
+
this._syncToFieldTree();
|
|
121
|
+
}
|
|
122
|
+
duplicateItem(index) {
|
|
123
|
+
const items = [...this.itemsSignal()];
|
|
124
|
+
const source = items[index];
|
|
125
|
+
if (!source) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const duplicate = {
|
|
129
|
+
trackId: _forgeArrayItemTrackId++,
|
|
130
|
+
value: structuredClone(source.value)
|
|
131
|
+
};
|
|
132
|
+
const addToEnd = this.props()?.addDuplicateToEnd ?? false;
|
|
133
|
+
if (addToEnd) {
|
|
134
|
+
items.push(duplicate);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
items.splice(index + 1, 0, duplicate);
|
|
138
|
+
}
|
|
139
|
+
this.itemsSignal.set(items);
|
|
140
|
+
this._syncToFieldTree();
|
|
141
|
+
}
|
|
142
|
+
drop(event) {
|
|
143
|
+
const items = [...this.itemsSignal()];
|
|
144
|
+
const [movedItem] = items.splice(event.previousIndex, 1);
|
|
145
|
+
if (movedItem) {
|
|
146
|
+
items.splice(event.currentIndex, 0, movedItem);
|
|
147
|
+
this.itemsSignal.set(items);
|
|
148
|
+
this._syncToFieldTree();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
_syncToFieldTree() {
|
|
152
|
+
const values = this.itemsSignal().map((item) => item.value);
|
|
153
|
+
const fieldState = this.field()();
|
|
154
|
+
fieldState.value.set(values);
|
|
155
|
+
fieldState.markAsTouched();
|
|
156
|
+
fieldState.markAsDirty();
|
|
157
|
+
}
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeArrayFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
159
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DbxForgeArrayFieldComponent, isStandalone: true, selector: "dbx-forge-array-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()" } }, ngImport: i0, template: "<div class=\"dbx-form-repeat-array\">\n <div cdkDropList [cdkDropListDisabled]=\"disableRearrangeSignal() || isDisabled()\" (cdkDropListDropped)=\"drop($event)\">\n @for (item of itemsSignal(); track item.trackId; let i = $index) {\n <div class=\"dbx-form-repeat-array-field\" cdkDrag cdkDragLockAxis=\"y\">\n <ng-template cdkDragPlaceholder>\n <div class=\"dbx-form-repeat-array-drag-placeholder\"></div>\n </ng-template>\n <div class=\"dbx-form-repeat-array-bar dbx-flex-bar\">\n @if (!disableRearrangeSignal()) {\n <button mat-icon-button type=\"button\" cdkDragHandle class=\"dbx-form-repeat-array-drag-button\" [disabled]=\"isDisabled()\" aria-label=\"Drag to reorder\">\n <mat-icon>drag_handle</mat-icon>\n </button>\n <dbx-button-spacer></dbx-button-spacer>\n }\n <span class=\"dbx-form-repeat-array-label\">{{ labelForItem(i, item.value) }}</span>\n <span class=\"spacer\"></span>\n @if (allowDuplicateSignal()) {\n <dbx-button [text]=\"duplicateTextSignal()\" [buttonStyle]=\"duplicateButtonStyleSignal()\" [disabled]=\"isDisabled()\" (buttonClick)=\"duplicateItem(i)\"></dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n }\n @if (allowRemoveSignal()) {\n <dbx-button [text]=\"removeTextSignal()\" [buttonStyle]=\"removeButtonStyleSignal()\" [disabled]=\"isDisabled()\" (buttonClick)=\"removeItem(i)\"></dbx-button>\n }\n </div>\n <div class=\"dbx-form-repeat-array-field-content\">\n <form [dynamic-form]=\"templateConfigSignal()\" [value]=\"asPartial(item.value)\" [formOptions]=\"formOptionsSignal()\" (valueChange)=\"onItemValueChange(i, $event)\"></form>\n </div>\n </div>\n }\n </div>\n @if (showAddButtonSignal()) {\n <div class=\"dbx-form-repeat-array-footer\">\n <dbx-button [text]=\"addTextSignal()\" [buttonStyle]=\"addButtonStyleSignal()\" [disabled]=\"isDisabled()\" (buttonClick)=\"addItem()\"></dbx-button>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: DynamicForm, selector: "form[dynamic-form]", inputs: ["dynamic-form", "formOptions", "value"], outputs: ["valueChange", "validityChange", "dirtyChange", "submitted", "reset", "cleared", "events", "initialized", "onPageChange", "onPageNavigationStateChange"] }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "customContent", "allowClickPropagation", "mode"] }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
160
|
+
}
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeArrayFieldComponent, decorators: [{
|
|
162
|
+
type: Component,
|
|
163
|
+
args: [{ selector: 'dbx-forge-array-field', imports: [CdkDropList, CdkDrag, CdkDragHandle, CdkDragPlaceholder, MatIconModule, MatButtonModule, DynamicForm, DbxButtonComponent, DbxButtonSpacerDirective], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, host: {
|
|
164
|
+
'[class]': 'className()'
|
|
165
|
+
}, template: "<div class=\"dbx-form-repeat-array\">\n <div cdkDropList [cdkDropListDisabled]=\"disableRearrangeSignal() || isDisabled()\" (cdkDropListDropped)=\"drop($event)\">\n @for (item of itemsSignal(); track item.trackId; let i = $index) {\n <div class=\"dbx-form-repeat-array-field\" cdkDrag cdkDragLockAxis=\"y\">\n <ng-template cdkDragPlaceholder>\n <div class=\"dbx-form-repeat-array-drag-placeholder\"></div>\n </ng-template>\n <div class=\"dbx-form-repeat-array-bar dbx-flex-bar\">\n @if (!disableRearrangeSignal()) {\n <button mat-icon-button type=\"button\" cdkDragHandle class=\"dbx-form-repeat-array-drag-button\" [disabled]=\"isDisabled()\" aria-label=\"Drag to reorder\">\n <mat-icon>drag_handle</mat-icon>\n </button>\n <dbx-button-spacer></dbx-button-spacer>\n }\n <span class=\"dbx-form-repeat-array-label\">{{ labelForItem(i, item.value) }}</span>\n <span class=\"spacer\"></span>\n @if (allowDuplicateSignal()) {\n <dbx-button [text]=\"duplicateTextSignal()\" [buttonStyle]=\"duplicateButtonStyleSignal()\" [disabled]=\"isDisabled()\" (buttonClick)=\"duplicateItem(i)\"></dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n }\n @if (allowRemoveSignal()) {\n <dbx-button [text]=\"removeTextSignal()\" [buttonStyle]=\"removeButtonStyleSignal()\" [disabled]=\"isDisabled()\" (buttonClick)=\"removeItem(i)\"></dbx-button>\n }\n </div>\n <div class=\"dbx-form-repeat-array-field-content\">\n <form [dynamic-form]=\"templateConfigSignal()\" [value]=\"asPartial(item.value)\" [formOptions]=\"formOptionsSignal()\" (valueChange)=\"onItemValueChange(i, $event)\"></form>\n </div>\n </div>\n }\n </div>\n @if (showAddButtonSignal()) {\n <div class=\"dbx-form-repeat-array-footer\">\n <dbx-button [text]=\"addTextSignal()\" [buttonStyle]=\"addButtonStyleSignal()\" [disabled]=\"isDisabled()\" (buttonClick)=\"addItem()\"></dbx-button>\n </div>\n }\n</div>\n" }]
|
|
166
|
+
}], ctorParameters: () => [], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], validationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationMessages", required: false }] }], defaultValidationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValidationMessages", required: false }] }] } });
|
|
167
|
+
|
|
168
|
+
export { DbxForgeArrayFieldComponent };
|
|
169
|
+
//# sourceMappingURL=dereekb-dbx-form-array.field.component-1wYSd4d3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dereekb-dbx-form-array.field.component-1wYSd4d3.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/value/array/array.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/value/array/array.field.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, input, signal } from '@angular/core';\nimport { type CdkDragDrop, CdkDropList, CdkDrag, CdkDragHandle, CdkDragPlaceholder } from '@angular/cdk/drag-drop';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { type FieldTree } from '@angular/forms/signals';\nimport { type DynamicText, type FieldMeta, type ValidationMessages, type FormConfig, DynamicForm } from '@ng-forge/dynamic-forms';\nimport { type FactoryWithRequiredInput } from '@dereekb/util';\nimport { DbxButtonComponent, DbxButtonSpacerDirective, type DbxButtonStyle } from '@dereekb/dbx-web';\nimport type { DbxForgeArrayFieldProps, DbxForgeArrayItemPair } from './array.field';\nimport { forgeFieldDisabled } from '../../field.disabled';\n\n/**\n * Internal state for a single array item.\n */\ninterface DbxForgeArrayItem {\n readonly trackId: number;\n value: unknown;\n}\n\nlet _forgeArrayItemTrackId = 0;\n\n/**\n * Forge ValueFieldComponent that renders a drag-and-drop array.\n *\n * Each array item is rendered as a nested `DynamicForm` using the provided template.\n * Items can be reordered via CDK drag/drop, added, removed, and duplicated.\n *\n * This is the forge equivalent of formly's `DbxFormRepeatArrayTypeComponent`.\n */\n@Component({\n selector: 'dbx-forge-array-field',\n templateUrl: './array.field.component.html',\n imports: [CdkDropList, CdkDrag, CdkDragHandle, CdkDragPlaceholder, MatIconModule, MatButtonModule, DynamicForm, DbxButtonComponent, DbxButtonSpacerDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n '[class]': 'className()'\n }\n})\nexport class DbxForgeArrayFieldComponent<T = unknown> {\n // ng-forge ValueFieldComponent inputs\n readonly field = input.required<FieldTree<unknown[]>>();\n readonly key = input.required<string>();\n readonly label = input<DynamicText | undefined>();\n readonly placeholder = input<DynamicText | undefined>();\n readonly className = input<string>('');\n readonly tabIndex = input<number | undefined>();\n readonly props = input<DbxForgeArrayFieldProps<T> | undefined>();\n readonly meta = input<FieldMeta | undefined>();\n readonly validationMessages = input<ValidationMessages | undefined>();\n readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n readonly itemsSignal = signal<DbxForgeArrayItem[]>([]);\n\n private _initialized = false;\n\n readonly templateConfigSignal = computed((): FormConfig => {\n const template = this.props()?.template;\n\n if (!template) {\n return { fields: [] } as unknown as FormConfig;\n }\n\n const fields = Array.isArray(template) ? template : [template];\n return { fields } as unknown as FormConfig;\n });\n\n // Disabled state\n readonly isDisabled = forgeFieldDisabled();\n readonly formOptionsSignal = computed(() => (this.isDisabled() ? { disabled: true } : undefined));\n\n readonly disableRearrangeSignal = computed(() => this.props()?.disableRearrange ?? false);\n readonly allowAddSignal = computed(() => this.props()?.allowAdd ?? true);\n readonly allowRemoveSignal = computed(() => this.props()?.allowRemove ?? true);\n readonly allowDuplicateSignal = computed(() => this.props()?.allowDuplicate ?? false);\n readonly addTextSignal = computed(() => this.props()?.addText ?? 'Add');\n readonly removeTextSignal = computed(() => this.props()?.removeText ?? 'Remove');\n readonly duplicateTextSignal = computed(() => this.props()?.duplicateText ?? 'Duplicate');\n\n private static readonly _DEFAULT_ADD_BUTTON_STYLE: DbxButtonStyle = { type: 'raised', color: 'primary' };\n private static readonly _DEFAULT_REMOVE_BUTTON_STYLE: DbxButtonStyle = { type: 'stroked', color: 'warn' };\n private static readonly _DEFAULT_DUPLICATE_BUTTON_STYLE: DbxButtonStyle = { type: 'stroked', color: 'primary' };\n\n readonly addButtonStyleSignal = computed(() => this.props()?.addButtonStyle ?? DbxForgeArrayFieldComponent._DEFAULT_ADD_BUTTON_STYLE);\n readonly removeButtonStyleSignal = computed(() => this.props()?.removeButtonStyle ?? DbxForgeArrayFieldComponent._DEFAULT_REMOVE_BUTTON_STYLE);\n readonly duplicateButtonStyleSignal = computed(() => this.props()?.duplicateButtonStyle ?? DbxForgeArrayFieldComponent._DEFAULT_DUPLICATE_BUTTON_STYLE);\n\n readonly showAddButtonSignal = computed(() => {\n if (!this.allowAddSignal()) {\n return false;\n }\n\n const maxLength = this.props()?.maxLength;\n\n if (maxLength != null) {\n return this.itemsSignal().length < maxLength;\n }\n\n return true;\n });\n\n constructor() {\n effect(() => {\n const fieldState = this.field()();\n const values = fieldState.value() ?? [];\n\n if (!this._initialized && Array.isArray(values)) {\n this._initialized = true;\n this.itemsSignal.set(\n values.map((value) => ({\n trackId: _forgeArrayItemTrackId++,\n value\n }))\n );\n }\n });\n }\n\n /**\n * Cast item value to Partial for the DynamicForm [value] binding.\n *\n * @param value - The raw array item value to cast\n * @returns The value cast as a Record for DynamicForm binding, or undefined if null/undefined\n */\n asPartial(value: unknown): Record<string, unknown> | undefined {\n return (value as Record<string, unknown>) ?? undefined;\n }\n\n labelForItem(index: number, value: unknown): string {\n const labelForField = this.props()?.labelForField;\n\n if (!labelForField) {\n return `${index + 1}.`;\n }\n\n if (typeof labelForField === 'string') {\n return `${index + 1}. ${labelForField}`;\n }\n\n const pair: DbxForgeArrayItemPair<T> = { index, value: value as T };\n return `${index + 1}. ${(labelForField as FactoryWithRequiredInput<string, DbxForgeArrayItemPair<T>>)(pair)}`;\n }\n\n onItemValueChange(index: number, newValue: unknown): void {\n const items = [...this.itemsSignal()];\n\n if (items[index]) {\n items[index] = { ...items[index], value: newValue };\n this.itemsSignal.set(items);\n this._syncToFieldTree();\n }\n }\n\n addItem(): void {\n const items = [...this.itemsSignal()];\n items.push({ trackId: _forgeArrayItemTrackId++, value: {} });\n this.itemsSignal.set(items);\n this._syncToFieldTree();\n }\n\n removeItem(index: number): void {\n const items = [...this.itemsSignal()];\n items.splice(index, 1);\n this.itemsSignal.set(items);\n this._syncToFieldTree();\n }\n\n duplicateItem(index: number): void {\n const items = [...this.itemsSignal()];\n const source = items[index];\n\n if (!source) {\n return;\n }\n\n const duplicate: DbxForgeArrayItem = {\n trackId: _forgeArrayItemTrackId++,\n value: structuredClone(source.value)\n };\n\n const addToEnd = this.props()?.addDuplicateToEnd ?? false;\n\n if (addToEnd) {\n items.push(duplicate);\n } else {\n items.splice(index + 1, 0, duplicate);\n }\n\n this.itemsSignal.set(items);\n this._syncToFieldTree();\n }\n\n drop(event: CdkDragDrop<unknown>): void {\n const items = [...this.itemsSignal()];\n const [movedItem] = items.splice(event.previousIndex, 1);\n\n if (movedItem) {\n items.splice(event.currentIndex, 0, movedItem);\n this.itemsSignal.set(items);\n this._syncToFieldTree();\n }\n }\n\n private _syncToFieldTree(): void {\n const values = this.itemsSignal().map((item) => item.value);\n const fieldState = this.field()();\n fieldState.value.set(values);\n fieldState.markAsTouched();\n fieldState.markAsDirty();\n }\n}\n","<div class=\"dbx-form-repeat-array\">\n <div cdkDropList [cdkDropListDisabled]=\"disableRearrangeSignal() || isDisabled()\" (cdkDropListDropped)=\"drop($event)\">\n @for (item of itemsSignal(); track item.trackId; let i = $index) {\n <div class=\"dbx-form-repeat-array-field\" cdkDrag cdkDragLockAxis=\"y\">\n <ng-template cdkDragPlaceholder>\n <div class=\"dbx-form-repeat-array-drag-placeholder\"></div>\n </ng-template>\n <div class=\"dbx-form-repeat-array-bar dbx-flex-bar\">\n @if (!disableRearrangeSignal()) {\n <button mat-icon-button type=\"button\" cdkDragHandle class=\"dbx-form-repeat-array-drag-button\" [disabled]=\"isDisabled()\" aria-label=\"Drag to reorder\">\n <mat-icon>drag_handle</mat-icon>\n </button>\n <dbx-button-spacer></dbx-button-spacer>\n }\n <span class=\"dbx-form-repeat-array-label\">{{ labelForItem(i, item.value) }}</span>\n <span class=\"spacer\"></span>\n @if (allowDuplicateSignal()) {\n <dbx-button [text]=\"duplicateTextSignal()\" [buttonStyle]=\"duplicateButtonStyleSignal()\" [disabled]=\"isDisabled()\" (buttonClick)=\"duplicateItem(i)\"></dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n }\n @if (allowRemoveSignal()) {\n <dbx-button [text]=\"removeTextSignal()\" [buttonStyle]=\"removeButtonStyleSignal()\" [disabled]=\"isDisabled()\" (buttonClick)=\"removeItem(i)\"></dbx-button>\n }\n </div>\n <div class=\"dbx-form-repeat-array-field-content\">\n <form [dynamic-form]=\"templateConfigSignal()\" [value]=\"asPartial(item.value)\" [formOptions]=\"formOptionsSignal()\" (valueChange)=\"onItemValueChange(i, $event)\"></form>\n </div>\n </div>\n }\n </div>\n @if (showAddButtonSignal()) {\n <div class=\"dbx-form-repeat-array-footer\">\n <dbx-button [text]=\"addTextSignal()\" [buttonStyle]=\"addButtonStyleSignal()\" [disabled]=\"isDisabled()\" (buttonClick)=\"addItem()\"></dbx-button>\n </div>\n }\n</div>\n"],"names":["i2"],"mappings":";;;;;;;;;;;AAmBA,IAAI,sBAAsB,GAAG,CAAC;AAE9B;;;;;;;AAOG;MAWU,2BAA2B,CAAA;;AAE7B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAwB;AAC9C,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,yEAAU;IAC9B,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;IACxC,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA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