tuain-ng-forms-lib 15.1.16 → 15.1.17
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 +1 -11
- package/esm2020/lib/classes/forms/form.mjs +5 -1
- package/fesm2015/tuain-ng-forms-lib.mjs +4 -10
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -1
- package/fesm2020/tuain-ng-forms-lib.mjs +4 -10
- package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -1
- package/lib/classes/forms/form.d.ts +1 -0
- package/package.json +1 -1
|
@@ -935,16 +935,6 @@ class FieldDescriptor extends FormElement {
|
|
|
935
935
|
return true;
|
|
936
936
|
}
|
|
937
937
|
;
|
|
938
|
-
if (this._fieldType === this._formConfig.fieldTypes.daterange) {
|
|
939
|
-
if (!Array.isArray(fieldCurrentValue)) {
|
|
940
|
-
return true;
|
|
941
|
-
}
|
|
942
|
-
if (fieldCurrentValue.length !== 2 || !fieldCurrentValue[0] || !fieldCurrentValue[1]) {
|
|
943
|
-
return true;
|
|
944
|
-
}
|
|
945
|
-
return false;
|
|
946
|
-
}
|
|
947
|
-
;
|
|
948
938
|
if (this._fieldType === this._formConfig.fieldTypes.phone) {
|
|
949
939
|
if (!Array.isArray(fieldCurrentValue)) {
|
|
950
940
|
return true;
|
|
@@ -2314,6 +2304,10 @@ class FormStructureAndData {
|
|
|
2314
2304
|
get states() { return this.stateFlow.states; }
|
|
2315
2305
|
get stateDescriptions() { return this.stateFlow.stateDescriptions; }
|
|
2316
2306
|
supportState(state = '') { var _a; return (!!state && ((_a = this.stateFlow.states) === null || _a === void 0 ? void 0 : _a.includes(state))); }
|
|
2307
|
+
getNextStates() {
|
|
2308
|
+
return this.stateFlow.transitions.filter(trns => trns.source === this.state)
|
|
2309
|
+
.map(trns => trns.destination);
|
|
2310
|
+
}
|
|
2317
2311
|
changeState(newState) {
|
|
2318
2312
|
const currentState = this.state;
|
|
2319
2313
|
if (!newState || !this.supportState(newState) || currentState === newState) {
|