tuain-ng-forms-lib 15.1.2 → 15.1.5
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/esm2020/lib/classes/forms/field.mjs +2 -2
- package/esm2020/lib/classes/forms/form.mjs +2 -1
- package/esm2020/lib/classes/forms/piece.mjs +5 -1
- package/esm2020/lib/classes/forms/table/table.mjs +1 -1
- package/esm2020/lib/components/elements/action.component.mjs +4 -1
- package/esm2020/lib/components/elements/field.component.mjs +4 -1
- package/fesm2015/tuain-ng-forms-lib.mjs +12 -1
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -1
- package/fesm2020/tuain-ng-forms-lib.mjs +12 -1
- package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -1
- package/lib/classes/forms/form.d.ts +1 -1
- package/lib/classes/forms/piece.d.ts +4 -1
- package/lib/classes/forms/table/table.d.ts +0 -1
- package/package.json +1 -1
|
@@ -88,6 +88,9 @@ class ActionComponent extends ElementComponent {
|
|
|
88
88
|
this.defaultProcessAttributeChange(componentAttr, value);
|
|
89
89
|
this.customProcessAttributeChange(componentAttr, value);
|
|
90
90
|
});
|
|
91
|
+
if (this.action) {
|
|
92
|
+
this.action.widget = this;
|
|
93
|
+
}
|
|
91
94
|
this.start();
|
|
92
95
|
}
|
|
93
96
|
start() {
|
|
@@ -157,6 +160,9 @@ class FieldComponent extends ElementComponent {
|
|
|
157
160
|
this.defaultProcessAttributeChange(componentAttr, value);
|
|
158
161
|
this.customProcessAttributeChange(componentAttr, value);
|
|
159
162
|
});
|
|
163
|
+
if (this.field) {
|
|
164
|
+
this.field.widget = this;
|
|
165
|
+
}
|
|
160
166
|
this.start();
|
|
161
167
|
}
|
|
162
168
|
defaultProcessAttributeChange(attribute, value) {
|
|
@@ -520,6 +526,7 @@ class FormPiece {
|
|
|
520
526
|
this._formState = '';
|
|
521
527
|
this._absoluteVisible = true;
|
|
522
528
|
this._absoluteDisabled = false;
|
|
529
|
+
this._widget = null;
|
|
523
530
|
this.visibleStates = [];
|
|
524
531
|
this.enabledStates = [];
|
|
525
532
|
this._form = null;
|
|
@@ -547,6 +554,7 @@ class FormPiece {
|
|
|
547
554
|
Object.entries(attributes).forEach(([name, value]) => {
|
|
548
555
|
this.setCustomAttribute(name, value);
|
|
549
556
|
});
|
|
557
|
+
return this;
|
|
550
558
|
}
|
|
551
559
|
matchAttribute(name, value) { return this.customAttributes?.[name] === value; }
|
|
552
560
|
setVisibleStates(newStates) {
|
|
@@ -632,6 +640,8 @@ class FormPiece {
|
|
|
632
640
|
this.formStateChangeCustomSubscribe(form, formChangeSubject);
|
|
633
641
|
formChangeSubject.subscribe(event => this.formStateChange(event?.state));
|
|
634
642
|
}
|
|
643
|
+
set widget(widget) { this._widget = widget; }
|
|
644
|
+
get widget() { return this._widget; }
|
|
635
645
|
}
|
|
636
646
|
|
|
637
647
|
const VISIBLE = 'visible';
|
|
@@ -765,7 +775,7 @@ const directChanges = [
|
|
|
765
775
|
'defaultEditable', 'defaultValue', 'alignment', 'required', 'errorCode', 'errorMessage', 'errorType',
|
|
766
776
|
'tooltip', 'info', 'format', 'intrinsicErrorMessage', 'outputOnly', 'captureType', 'title', 'type',
|
|
767
777
|
'maxLength', 'maxValue', 'minLength', 'minValue', 'validateOnServer', 'serverAction', 'visibleLabel',
|
|
768
|
-
'options',
|
|
778
|
+
'options', 'placeholder'
|
|
769
779
|
];
|
|
770
780
|
const attrs$1 = {
|
|
771
781
|
_captureType: { name: '_captureType', propagate: 'captureType' },
|
|
@@ -2290,6 +2300,7 @@ class FormStructureAndData {
|
|
|
2290
2300
|
this.setCustomAttribute(name, value);
|
|
2291
2301
|
});
|
|
2292
2302
|
}
|
|
2303
|
+
return this;
|
|
2293
2304
|
}
|
|
2294
2305
|
// Fields
|
|
2295
2306
|
get fieldNames() { return this.getFieldNames(); }
|