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.
@@ -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) {