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
|
@@ -912,16 +912,6 @@ class FieldDescriptor extends FormElement {
|
|
|
912
912
|
return true;
|
|
913
913
|
}
|
|
914
914
|
;
|
|
915
|
-
if (this._fieldType === this._formConfig.fieldTypes.daterange) {
|
|
916
|
-
if (!Array.isArray(fieldCurrentValue)) {
|
|
917
|
-
return true;
|
|
918
|
-
}
|
|
919
|
-
if (fieldCurrentValue.length !== 2 || !fieldCurrentValue[0] || !fieldCurrentValue[1]) {
|
|
920
|
-
return true;
|
|
921
|
-
}
|
|
922
|
-
return false;
|
|
923
|
-
}
|
|
924
|
-
;
|
|
925
915
|
if (this._fieldType === this._formConfig.fieldTypes.phone) {
|
|
926
916
|
if (!Array.isArray(fieldCurrentValue)) {
|
|
927
917
|
return true;
|
|
@@ -2270,6 +2260,10 @@ class FormStructureAndData {
|
|
|
2270
2260
|
get states() { return this.stateFlow.states; }
|
|
2271
2261
|
get stateDescriptions() { return this.stateFlow.stateDescriptions; }
|
|
2272
2262
|
supportState(state = '') { return (!!state && this.stateFlow.states?.includes(state)); }
|
|
2263
|
+
getNextStates() {
|
|
2264
|
+
return this.stateFlow.transitions.filter(trns => trns.source === this.state)
|
|
2265
|
+
.map(trns => trns.destination);
|
|
2266
|
+
}
|
|
2273
2267
|
changeState(newState) {
|
|
2274
2268
|
const currentState = this.state;
|
|
2275
2269
|
if (!newState || !this.supportState(newState) || currentState === newState) {
|