tuain-ng-forms-lib 12.0.43 → 12.0.47

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.
@@ -1992,7 +1992,10 @@
1992
1992
  this.setAttr(fldAttr.maxValue, maxValue);
1993
1993
  };
1994
1994
  FieldDescriptor.prototype.getFieldOptions = function () {
1995
- return JSON.parse(JSON.stringify(this.fieldOptions));
1995
+ return this.fieldOptions.map(function (option) {
1996
+ var optionCopy = Object.assign({}, option);
1997
+ return optionCopy;
1998
+ });
1996
1999
  };
1997
2000
  FieldDescriptor.prototype.setFieldOptions = function (newOptions) {
1998
2001
  var _this = this;
@@ -2140,6 +2143,12 @@
2140
2143
  RecordFormSubSection.prototype.getFieldNames = function () {
2141
2144
  return this.subSectionFields.map(function (field) { return field.fieldCode; });
2142
2145
  };
2146
+ RecordFormSubSection.prototype.getActions = function () {
2147
+ return this.subSectionActions;
2148
+ };
2149
+ RecordFormSubSection.prototype.getActionNames = function () {
2150
+ return this.subSectionActions.map(function (action) { return action.actionCode; });
2151
+ };
2143
2152
  RecordFormSubSection.prototype.viewOnState = function (state) {
2144
2153
  return this.visibleStates.includes(state);
2145
2154
  };
@@ -2269,14 +2278,14 @@
2269
2278
  }
2270
2279
  return fieldsArray;
2271
2280
  };
2272
- RecordFormSection.prototype.getFieldNames = function () {
2281
+ RecordFormSection.prototype.getActions = function () {
2273
2282
  var e_3, _c;
2274
- var fieldsArray = [];
2283
+ var actionArray = [];
2275
2284
  if (this.subSections && this.subSections.length > 0) {
2276
2285
  try {
2277
2286
  for (var _d = __values(this.subSections), _e = _d.next(); !_e.done; _e = _d.next()) {
2278
2287
  var subSection = _e.value;
2279
- fieldsArray = fieldsArray.concat(subSection.getFieldNames());
2288
+ actionArray = actionArray.concat(subSection.getActions());
2280
2289
  }
2281
2290
  }
2282
2291
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
@@ -2287,10 +2296,50 @@
2287
2296
  finally { if (e_3) throw e_3.error; }
2288
2297
  }
2289
2298
  }
2299
+ return actionArray;
2300
+ };
2301
+ RecordFormSection.prototype.getActionNames = function () {
2302
+ var e_4, _c;
2303
+ var actionArray = [];
2304
+ if (this.subSections && this.subSections.length > 0) {
2305
+ try {
2306
+ for (var _d = __values(this.subSections), _e = _d.next(); !_e.done; _e = _d.next()) {
2307
+ var subSection = _e.value;
2308
+ actionArray = actionArray.concat(subSection.getActionNames());
2309
+ }
2310
+ }
2311
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
2312
+ finally {
2313
+ try {
2314
+ if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
2315
+ }
2316
+ finally { if (e_4) throw e_4.error; }
2317
+ }
2318
+ }
2319
+ return actionArray;
2320
+ };
2321
+ RecordFormSection.prototype.getFieldNames = function () {
2322
+ var e_5, _c;
2323
+ var fieldsArray = [];
2324
+ if (this.subSections && this.subSections.length > 0) {
2325
+ try {
2326
+ for (var _d = __values(this.subSections), _e = _d.next(); !_e.done; _e = _d.next()) {
2327
+ var subSection = _e.value;
2328
+ fieldsArray = fieldsArray.concat(subSection.getFieldNames());
2329
+ }
2330
+ }
2331
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
2332
+ finally {
2333
+ try {
2334
+ if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
2335
+ }
2336
+ finally { if (e_5) throw e_5.error; }
2337
+ }
2338
+ }
2290
2339
  return fieldsArray;
2291
2340
  };
2292
2341
  RecordFormSection.prototype.getField = function (name) {
2293
- var e_4, _c;
2342
+ var e_6, _c;
2294
2343
  var field = null;
2295
2344
  if (this.subSections && this.subSections.length > 0) {
2296
2345
  try {
@@ -2302,12 +2351,12 @@
2302
2351
  }
2303
2352
  }
2304
2353
  }
2305
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
2354
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
2306
2355
  finally {
2307
2356
  try {
2308
2357
  if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
2309
2358
  }
2310
- finally { if (e_4) throw e_4.error; }
2359
+ finally { if (e_6) throw e_6.error; }
2311
2360
  }
2312
2361
  }
2313
2362
  return null;
@@ -2569,7 +2618,7 @@
2569
2618
  FormStructureAndData.prototype.disableField = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.disable(); };
2570
2619
  FormStructureAndData.prototype.getFieldValue = function (code) { var _a; return (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getValue(); };
2571
2620
  FormStructureAndData.prototype.getFieldOptionText = function (code) { var _a; return (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getOptionText(); };
2572
- FormStructureAndData.prototype.getFieldOptions = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getFieldOptions(); };
2621
+ FormStructureAndData.prototype.getFieldOptions = function (code) { var _a, _b; return (_b = (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getFieldOptions()) !== null && _b !== void 0 ? _b : null; };
2573
2622
  FormStructureAndData.prototype.setFieldValue = function (code, value) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.setValue(value); };
2574
2623
  FormStructureAndData.prototype.setFieldError = function (code, message, type) {
2575
2624
  if (type === void 0) { type = 'error'; }
@@ -2666,7 +2715,7 @@
2666
2715
  return this.applyOnFields(function (fld) { return fld.setErrorMessage(message); }, codes, secCode, subCode);
2667
2716
  };
2668
2717
  FormStructureAndData.prototype.cleanErrorFields = function (codes, secCode, subCode) {
2669
- this.tagFieldsWithError('', codes, secCode, subCode);
2718
+ return this.tagFieldsWithError('', codes, secCode, subCode);
2670
2719
  };
2671
2720
  FormStructureAndData.prototype.tagEmptyRequiredFields = function (message, codes, secCode, subCode) {
2672
2721
  if (codes === void 0) { codes = null; }
@@ -2772,6 +2821,8 @@
2772
2821
  FormStructureAndData.prototype.getSubSection = function (code, subCode) { var _a, _b; return (_b = (_a = this.getSection(code)) === null || _a === void 0 ? void 0 : _a.getSubsection(subCode)) !== null && _b !== void 0 ? _b : null; };
2773
2822
  FormStructureAndData.prototype.showSubSections = function (code, subCodes) { return this.execOnSubSections(code, subCodes, SHOW); };
2774
2823
  FormStructureAndData.prototype.hideSubSections = function (code, subCodes) { return this.execOnSubSections(code, subCodes, HIDE); };
2824
+ FormStructureAndData.prototype.getSectionActions = function (code) { var _a, _b; return (_b = (_a = this.getSection(code)) === null || _a === void 0 ? void 0 : _a.getActions()) !== null && _b !== void 0 ? _b : null; };
2825
+ FormStructureAndData.prototype.getSectionActionNames = function (code) { var _a, _b; return (_b = (_a = this.getSection(code)) === null || _a === void 0 ? void 0 : _a.getActionNames()) !== null && _b !== void 0 ? _b : null; };
2775
2826
  FormStructureAndData.prototype.activateSection = function (code) {
2776
2827
  var _a, _b;
2777
2828
  if (code === this._exclusiveSectionsByAttr[ACTIVE]) {
@@ -3235,6 +3286,14 @@
3235
3286
  var _a;
3236
3287
  return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.hideSubSections(code, subCodes);
3237
3288
  };
3289
+ BasicFormComponent.prototype.getSectionActions = function (code) {
3290
+ var _a;
3291
+ return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getSectionActions(code);
3292
+ };
3293
+ BasicFormComponent.prototype.getSectionActionNames = function (code) {
3294
+ var _a;
3295
+ return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getSectionActionNames(code);
3296
+ };
3238
3297
  BasicFormComponent.prototype.getTables = function () {
3239
3298
  var _a;
3240
3299
  return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getTables();