@apia/execution 4.0.28 → 4.0.30
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/dist/index.d.ts +2597 -1788
- package/dist/index.js +85 -73
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1187,7 +1187,7 @@ async function getApiaFunctions(execution) {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
return af;
|
|
1189
1189
|
}
|
|
1190
|
-
|
|
1190
|
+
class Field extends WithProperties {
|
|
1191
1191
|
constructor({ properties, ...definition }) {
|
|
1192
1192
|
super();
|
|
1193
1193
|
__publicField$n(this, "form", {});
|
|
@@ -1391,10 +1391,10 @@ let Field$1 = class Field extends WithProperties {
|
|
|
1391
1391
|
this.definition.index
|
|
1392
1392
|
);
|
|
1393
1393
|
}
|
|
1394
|
-
}
|
|
1394
|
+
}
|
|
1395
1395
|
_hasInited$1 = new WeakMap();
|
|
1396
1396
|
|
|
1397
|
-
class Button extends Field
|
|
1397
|
+
class Button extends Field {
|
|
1398
1398
|
fireEvent(eventName) {
|
|
1399
1399
|
return super.fireEvent(eventName);
|
|
1400
1400
|
}
|
|
@@ -1406,7 +1406,7 @@ var __publicField$m = (obj, key, value) => {
|
|
|
1406
1406
|
__defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1407
1407
|
return value;
|
|
1408
1408
|
};
|
|
1409
|
-
const _Captcha = class _Captcha extends Field
|
|
1409
|
+
const _Captcha = class _Captcha extends Field {
|
|
1410
1410
|
constructor(definition) {
|
|
1411
1411
|
super(definition);
|
|
1412
1412
|
__publicField$m(this, "id", "");
|
|
@@ -1567,7 +1567,7 @@ class Attribute {
|
|
|
1567
1567
|
this.valueType = valueType;
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
|
-
class FieldWithAttribute extends Field
|
|
1570
|
+
class FieldWithAttribute extends Field {
|
|
1571
1571
|
constructor({
|
|
1572
1572
|
attId,
|
|
1573
1573
|
attName,
|
|
@@ -2122,8 +2122,12 @@ class UploaderModalController {
|
|
|
2122
2122
|
}
|
|
2123
2123
|
deleteMetadata(indices) {
|
|
2124
2124
|
const deleteSet = new Set(indices);
|
|
2125
|
+
const offset = this.state.metadata.metadataArray.length;
|
|
2125
2126
|
this.state.metadata.freeMetadataArray = this.state.metadata.freeMetadataArray.filter(
|
|
2126
|
-
(
|
|
2127
|
+
(_, localIndex) => (
|
|
2128
|
+
// conservamos sólo los que NO estén en deleteSet
|
|
2129
|
+
!deleteSet.has(localIndex + offset)
|
|
2130
|
+
)
|
|
2127
2131
|
);
|
|
2128
2132
|
}
|
|
2129
2133
|
deletePermission(item) {
|
|
@@ -4181,7 +4185,7 @@ async function inlineTimeout(cb, _t) {
|
|
|
4181
4185
|
setTimeout(cb, _t);
|
|
4182
4186
|
return Promise.resolve(true);
|
|
4183
4187
|
}
|
|
4184
|
-
class Grid extends Field
|
|
4188
|
+
class Grid extends Field {
|
|
4185
4189
|
constructor({ properties, field, ...definition }) {
|
|
4186
4190
|
super({
|
|
4187
4191
|
...definition,
|
|
@@ -4764,7 +4768,7 @@ class Grid extends Field$1 {
|
|
|
4764
4768
|
for await (const row of this.tableController.body.rows) {
|
|
4765
4769
|
for await (const cell of row.cells) {
|
|
4766
4770
|
const field = cell.getState("properties")?.field;
|
|
4767
|
-
if (field instanceof Field
|
|
4771
|
+
if (field instanceof Field) {
|
|
4768
4772
|
const result = await field.validate();
|
|
4769
4773
|
if (!result && isValid && !firstInvalid) {
|
|
4770
4774
|
isValid = false;
|
|
@@ -5200,7 +5204,7 @@ class GridPaginated extends Grid {
|
|
|
5200
5204
|
}
|
|
5201
5205
|
}
|
|
5202
5206
|
|
|
5203
|
-
class Image extends Field
|
|
5207
|
+
class Image extends Field {
|
|
5204
5208
|
}
|
|
5205
5209
|
|
|
5206
5210
|
class Input extends TranslatableField {
|
|
@@ -5253,10 +5257,10 @@ class Input extends TranslatableField {
|
|
|
5253
5257
|
}
|
|
5254
5258
|
}
|
|
5255
5259
|
|
|
5256
|
-
class Label extends Field
|
|
5260
|
+
class Label extends Field {
|
|
5257
5261
|
}
|
|
5258
5262
|
|
|
5259
|
-
class Link extends Field
|
|
5263
|
+
class Link extends Field {
|
|
5260
5264
|
}
|
|
5261
5265
|
|
|
5262
5266
|
class Multiple extends FieldWithAttribute {
|
|
@@ -5344,7 +5348,7 @@ class Textarea extends TranslatableField {
|
|
|
5344
5348
|
}
|
|
5345
5349
|
}
|
|
5346
5350
|
|
|
5347
|
-
class Title extends Field
|
|
5351
|
+
class Title extends Field {
|
|
5348
5352
|
}
|
|
5349
5353
|
|
|
5350
5354
|
var __defProp$a = Object.defineProperty;
|
|
@@ -5461,7 +5465,7 @@ var __publicField$9 = (obj, key, value) => {
|
|
|
5461
5465
|
__defNormalProp$9(obj, key + "" , value);
|
|
5462
5466
|
return value;
|
|
5463
5467
|
};
|
|
5464
|
-
class SchedulerField extends Field
|
|
5468
|
+
class SchedulerField extends Field {
|
|
5465
5469
|
constructor(definition) {
|
|
5466
5470
|
super(definition);
|
|
5467
5471
|
__publicField$9(this, "_schedController");
|
|
@@ -5554,7 +5558,7 @@ class SchedulerField extends Field$1 {
|
|
|
5554
5558
|
}
|
|
5555
5559
|
}
|
|
5556
5560
|
|
|
5557
|
-
const
|
|
5561
|
+
const FieldConstants = Object.freeze({
|
|
5558
5562
|
// field types
|
|
5559
5563
|
TYPE_INPUT: "input",
|
|
5560
5564
|
TYPE_SELECT: "select",
|
|
@@ -5574,16 +5578,6 @@ const Field = {
|
|
|
5574
5578
|
TYPE_EDITOR: "editor",
|
|
5575
5579
|
TYPE_TREE: "tree",
|
|
5576
5580
|
TYPE_CAPTCHA: "captcha",
|
|
5577
|
-
// field functions
|
|
5578
|
-
FUNC_CLICK: "onclick",
|
|
5579
|
-
FUNC_CHANGE: "onchange",
|
|
5580
|
-
FUNC_MODAL_RETURN: "onmodalreturn",
|
|
5581
|
-
FUNC_ROW_ADD: "onrowadd",
|
|
5582
|
-
FUNC_ROW_DELETE: "onrowdelete",
|
|
5583
|
-
FUNC_ROW_SORT: "onrowsort",
|
|
5584
|
-
FUNC_COL_SELECT: "oncolselect",
|
|
5585
|
-
// Attribute w/ props json for fields
|
|
5586
|
-
FIELD_PROPERTIES: "properties",
|
|
5587
5581
|
// Field properties
|
|
5588
5582
|
PROPERTY_NAME: "name",
|
|
5589
5583
|
PROPERTY_SIZE: "size",
|
|
@@ -5687,27 +5681,20 @@ const Field = {
|
|
|
5687
5681
|
PROPERTY_INPUT_TYPE: "inputType",
|
|
5688
5682
|
PROPERTY_PLACE_HOLDER: "placeHolder",
|
|
5689
5683
|
PROPERTY_TITLE: "title"
|
|
5690
|
-
};
|
|
5684
|
+
});
|
|
5691
5685
|
|
|
5692
|
-
const
|
|
5693
|
-
FUNC_LOAD: "onload",
|
|
5694
|
-
FUNC_RELOAD: "onreload",
|
|
5695
|
-
PROPERTY_FORM_INVISIBLE: "frmInvisible",
|
|
5686
|
+
const FormConstants = Object.freeze({
|
|
5696
5687
|
PROPERTY_FORM_HIDDEN: "frmHidden",
|
|
5688
|
+
PROPERTY_FORM_HIGHLIGHT: "frmHighlight",
|
|
5697
5689
|
PROPERTY_FORM_CLOSED: "prpFrmClosed",
|
|
5698
5690
|
PROPERTY_FORM_TAB: "frmTab",
|
|
5699
|
-
PROPERTY_FORM_HIGHLIGHT: "frmHighlight",
|
|
5700
5691
|
PROPERTY_FORM_DONT_FIRE: "frmDontFire",
|
|
5701
|
-
PROPERTY_FORM_READONLY: "readOnly"
|
|
5702
|
-
|
|
5703
|
-
MARKED_TO_SIGN: "markedToSign",
|
|
5704
|
-
REQUIRED_SIGN: "requiredSignableForm",
|
|
5705
|
-
LANGUAGES: "langs"
|
|
5706
|
-
};
|
|
5692
|
+
PROPERTY_FORM_READONLY: "readOnly"
|
|
5693
|
+
});
|
|
5707
5694
|
|
|
5708
5695
|
const IProperty = {
|
|
5709
|
-
...
|
|
5710
|
-
...
|
|
5696
|
+
...FieldConstants,
|
|
5697
|
+
...FormConstants
|
|
5711
5698
|
};
|
|
5712
5699
|
|
|
5713
5700
|
class ButtonsAction {
|
|
@@ -5835,11 +5822,12 @@ var __privateSet$h = (obj, member, value, setter) => {
|
|
|
5835
5822
|
member.set(obj, value);
|
|
5836
5823
|
return value;
|
|
5837
5824
|
};
|
|
5838
|
-
var _field$e;
|
|
5825
|
+
var _execution$2, _field$e;
|
|
5839
5826
|
class ApiaField {
|
|
5840
5827
|
constructor(execution, field) {
|
|
5841
|
-
this
|
|
5828
|
+
__privateAdd$h(this, _execution$2, void 0);
|
|
5842
5829
|
__privateAdd$h(this, _field$e, void 0);
|
|
5830
|
+
__privateSet$h(this, _execution$2, execution);
|
|
5843
5831
|
__privateSet$h(this, _field$e, field);
|
|
5844
5832
|
}
|
|
5845
5833
|
get fldType() {
|
|
@@ -5849,7 +5837,7 @@ class ApiaField {
|
|
|
5849
5837
|
return __privateGet$h(this, _field$e).definition.id;
|
|
5850
5838
|
}
|
|
5851
5839
|
get form() {
|
|
5852
|
-
return new ApiaForm(this
|
|
5840
|
+
return new ApiaForm(__privateGet$h(this, _execution$2), __privateGet$h(this, _field$e).getForm());
|
|
5853
5841
|
}
|
|
5854
5842
|
get index() {
|
|
5855
5843
|
return __privateGet$h(this, _field$e).definition.index || 0;
|
|
@@ -5867,6 +5855,7 @@ class ApiaField {
|
|
|
5867
5855
|
return !!__privateGet$h(this, _field$e).properties.inGrid;
|
|
5868
5856
|
}
|
|
5869
5857
|
}
|
|
5858
|
+
_execution$2 = new WeakMap();
|
|
5870
5859
|
_field$e = new WeakMap();
|
|
5871
5860
|
|
|
5872
5861
|
var __accessCheck$g = (obj, member, msg) => {
|
|
@@ -5955,7 +5944,6 @@ _attribute = new WeakMap();
|
|
|
5955
5944
|
class ApiaFieldWithAttribute extends ApiaField {
|
|
5956
5945
|
constructor(execution, field) {
|
|
5957
5946
|
super(execution, field);
|
|
5958
|
-
this.execution = execution;
|
|
5959
5947
|
__privateAdd$f(this, _field$c, void 0);
|
|
5960
5948
|
__privateSet$f(this, _field$c, field);
|
|
5961
5949
|
}
|
|
@@ -6564,58 +6552,58 @@ const createNewField = (execution, field) => {
|
|
|
6564
6552
|
return new ModalInputField(execution, field);
|
|
6565
6553
|
}
|
|
6566
6554
|
switch (fieldType) {
|
|
6567
|
-
case
|
|
6555
|
+
case FieldConstants.TYPE_INPUT:
|
|
6568
6556
|
newField = new InputField(execution, field);
|
|
6569
6557
|
break;
|
|
6570
|
-
case
|
|
6558
|
+
case FieldConstants.TYPE_PASSWORD:
|
|
6571
6559
|
newField = new PasswordField(execution, field);
|
|
6572
6560
|
break;
|
|
6573
|
-
case
|
|
6561
|
+
case FieldConstants.TYPE_SELECT:
|
|
6574
6562
|
newField = new SelectField(execution, field);
|
|
6575
6563
|
break;
|
|
6576
|
-
case
|
|
6564
|
+
case FieldConstants.TYPE_RADIO:
|
|
6577
6565
|
newField = new RadioField(execution, field);
|
|
6578
6566
|
break;
|
|
6579
|
-
case
|
|
6567
|
+
case FieldConstants.TYPE_CHECK:
|
|
6580
6568
|
newField = new CheckField(execution, field);
|
|
6581
6569
|
break;
|
|
6582
|
-
case
|
|
6570
|
+
case FieldConstants.TYPE_BUTTON:
|
|
6583
6571
|
newField = new ButtonField(execution, field);
|
|
6584
6572
|
break;
|
|
6585
|
-
case
|
|
6573
|
+
case FieldConstants.TYPE_MULTIPLE:
|
|
6586
6574
|
newField = new MultipleField(execution, field);
|
|
6587
6575
|
break;
|
|
6588
|
-
case
|
|
6576
|
+
case FieldConstants.TYPE_HIDDEN:
|
|
6589
6577
|
newField = new HiddenField(execution, field);
|
|
6590
6578
|
break;
|
|
6591
|
-
case
|
|
6579
|
+
case FieldConstants.TYPE_AREA:
|
|
6592
6580
|
newField = new AreaField(execution, field);
|
|
6593
6581
|
break;
|
|
6594
|
-
case
|
|
6582
|
+
case FieldConstants.TYPE_GRID:
|
|
6595
6583
|
newField = new GridField(execution, field);
|
|
6596
6584
|
break;
|
|
6597
|
-
case
|
|
6585
|
+
case FieldConstants.TYPE_IMAGE:
|
|
6598
6586
|
newField = new ImageField(execution, field);
|
|
6599
6587
|
break;
|
|
6600
|
-
case
|
|
6588
|
+
case FieldConstants.TYPE_HREF:
|
|
6601
6589
|
newField = new LinkField(execution, field);
|
|
6602
6590
|
break;
|
|
6603
|
-
case
|
|
6591
|
+
case FieldConstants.TYPE_LABEL:
|
|
6604
6592
|
newField = new TextField(execution, field);
|
|
6605
6593
|
break;
|
|
6606
|
-
case
|
|
6594
|
+
case FieldConstants.TYPE_TITLE:
|
|
6607
6595
|
newField = new TextField(execution, field);
|
|
6608
6596
|
break;
|
|
6609
|
-
case
|
|
6597
|
+
case FieldConstants.TYPE_FILE:
|
|
6610
6598
|
newField = new FileUploaderField(execution, field);
|
|
6611
6599
|
break;
|
|
6612
|
-
case
|
|
6600
|
+
case FieldConstants.TYPE_CAPTCHA:
|
|
6613
6601
|
newField = new CaptchaField(execution, field);
|
|
6614
6602
|
break;
|
|
6615
|
-
case
|
|
6603
|
+
case FieldConstants.TYPE_TREE:
|
|
6616
6604
|
newField = new TreeField(execution, field);
|
|
6617
6605
|
break;
|
|
6618
|
-
case
|
|
6606
|
+
case FieldConstants.TYPE_EDITOR:
|
|
6619
6607
|
newField = new EditorField(execution, field);
|
|
6620
6608
|
break;
|
|
6621
6609
|
}
|
|
@@ -6646,12 +6634,14 @@ var __privateSet$5 = (obj, member, value, setter) => {
|
|
|
6646
6634
|
member.set(obj, value);
|
|
6647
6635
|
return value;
|
|
6648
6636
|
};
|
|
6649
|
-
var _field$2, _mutex;
|
|
6637
|
+
var _execution$1, _field$2, _mutex;
|
|
6650
6638
|
class GridField extends ApiaField {
|
|
6651
6639
|
constructor(execution, field) {
|
|
6652
6640
|
super(execution, field);
|
|
6641
|
+
__privateAdd$5(this, _execution$1, void 0);
|
|
6653
6642
|
__privateAdd$5(this, _field$2, void 0);
|
|
6654
6643
|
__privateAdd$5(this, _mutex, new Mutex());
|
|
6644
|
+
__privateSet$5(this, _execution$1, execution);
|
|
6655
6645
|
__privateSet$5(this, _field$2, field);
|
|
6656
6646
|
}
|
|
6657
6647
|
async addRow() {
|
|
@@ -6714,7 +6704,7 @@ class GridField extends ApiaField {
|
|
|
6714
6704
|
}
|
|
6715
6705
|
}
|
|
6716
6706
|
editRow(index) {
|
|
6717
|
-
getWindow(this
|
|
6707
|
+
getWindow(__privateGet$5(this, _execution$1)).dispatchEvent(
|
|
6718
6708
|
new CustomEvent("openGridEdition", {
|
|
6719
6709
|
detail: { index, grid: __privateGet$5(this, _field$2) }
|
|
6720
6710
|
})
|
|
@@ -6790,6 +6780,7 @@ class GridField extends ApiaField {
|
|
|
6790
6780
|
__privateGet$5(this, _field$2).toggleEditFormButton(rowIndex, isShown);
|
|
6791
6781
|
}
|
|
6792
6782
|
}
|
|
6783
|
+
_execution$1 = new WeakMap();
|
|
6793
6784
|
_field$2 = new WeakMap();
|
|
6794
6785
|
_mutex = new WeakMap();
|
|
6795
6786
|
|
|
@@ -6901,12 +6892,13 @@ var __privateSet$2 = (obj, member, value, setter) => {
|
|
|
6901
6892
|
member.set(obj, value);
|
|
6902
6893
|
return value;
|
|
6903
6894
|
};
|
|
6904
|
-
var _form;
|
|
6895
|
+
var _form, _execution;
|
|
6905
6896
|
class ApiaForm {
|
|
6906
6897
|
constructor(execution, form) {
|
|
6907
|
-
this.execution = execution;
|
|
6908
6898
|
__privateAdd$2(this, _form, void 0);
|
|
6899
|
+
__privateAdd$2(this, _execution, void 0);
|
|
6909
6900
|
__privateSet$2(this, _form, form);
|
|
6901
|
+
__privateSet$2(this, _execution, execution);
|
|
6910
6902
|
}
|
|
6911
6903
|
getFrmParent() {
|
|
6912
6904
|
return __privateGet$2(this, _form).definition.frmParent;
|
|
@@ -6930,6 +6922,9 @@ class ApiaForm {
|
|
|
6930
6922
|
return __privateGet$2(this, _form).getProperty(name);
|
|
6931
6923
|
}
|
|
6932
6924
|
setProperty(name, value) {
|
|
6925
|
+
if (name === "readOnly") {
|
|
6926
|
+
throw new Error("Cannot update readonly property on forms");
|
|
6927
|
+
}
|
|
6933
6928
|
__privateGet$2(this, _form).setProperty(name, value);
|
|
6934
6929
|
}
|
|
6935
6930
|
getCustomComponent(attName) {
|
|
@@ -6938,22 +6933,22 @@ class ApiaForm {
|
|
|
6938
6933
|
getField(fld, index) {
|
|
6939
6934
|
const field = __privateGet$2(this, _form).getField(fld, index);
|
|
6940
6935
|
if (field) {
|
|
6941
|
-
return createNewField(this
|
|
6936
|
+
return createNewField(__privateGet$2(this, _execution), field);
|
|
6942
6937
|
}
|
|
6943
6938
|
return void 0;
|
|
6944
6939
|
}
|
|
6945
6940
|
getFieldById(fldId) {
|
|
6946
6941
|
const field = __privateGet$2(this, _form).getFieldById(fldId);
|
|
6947
6942
|
if (field) {
|
|
6948
|
-
return createNewField(this
|
|
6943
|
+
return createNewField(__privateGet$2(this, _execution), field);
|
|
6949
6944
|
}
|
|
6950
6945
|
return void 0;
|
|
6951
6946
|
}
|
|
6952
6947
|
getFieldColumn(name) {
|
|
6953
|
-
return arrayOrArray(__privateGet$2(this, _form).getFieldByName(name)).map((c) => createNewField(this
|
|
6948
|
+
return arrayOrArray(__privateGet$2(this, _form).getFieldByName(name)).map((c) => createNewField(__privateGet$2(this, _execution), c)).filter((f) => Boolean(f));
|
|
6954
6949
|
}
|
|
6955
6950
|
getAllFields() {
|
|
6956
|
-
return __privateGet$2(this, _form).allFields.map((c) => createNewField(this
|
|
6951
|
+
return __privateGet$2(this, _form).allFields.map((c) => createNewField(__privateGet$2(this, _execution), c)).filter((f) => Boolean(f));
|
|
6957
6952
|
}
|
|
6958
6953
|
clearForm(clearReadonlyFields, deleteGridsRows) {
|
|
6959
6954
|
this.getAllFields().forEach((c) => {
|
|
@@ -6969,6 +6964,7 @@ class ApiaForm {
|
|
|
6969
6964
|
}
|
|
6970
6965
|
}
|
|
6971
6966
|
_form = new WeakMap();
|
|
6967
|
+
_execution = new WeakMap();
|
|
6972
6968
|
|
|
6973
6969
|
const OptionButton = {
|
|
6974
6970
|
BTN_VIEW_DOCS: 100,
|
|
@@ -7263,6 +7259,9 @@ class CustomComponent {
|
|
|
7263
7259
|
getAdditional() {
|
|
7264
7260
|
return this.state.additional;
|
|
7265
7261
|
}
|
|
7262
|
+
getCurrentForm() {
|
|
7263
|
+
return new ApiaForm(this.execution, this.form);
|
|
7264
|
+
}
|
|
7266
7265
|
async init(form) {
|
|
7267
7266
|
if (__privateGet$1(this, _hasInited))
|
|
7268
7267
|
throw new Error("Cannot init field twice");
|
|
@@ -7898,6 +7897,9 @@ class Form extends WithProperties {
|
|
|
7898
7897
|
async validate() {
|
|
7899
7898
|
let isValid = true;
|
|
7900
7899
|
let firstInvalid = null;
|
|
7900
|
+
if (this.properties.frmHidden) {
|
|
7901
|
+
return true;
|
|
7902
|
+
}
|
|
7901
7903
|
for await (const field of this.allFields) {
|
|
7902
7904
|
if (field.definition.fieldType === "grid") {
|
|
7903
7905
|
const result = await field.validate();
|
|
@@ -7907,7 +7909,7 @@ class Form extends WithProperties {
|
|
|
7907
7909
|
} else {
|
|
7908
7910
|
isValid = isValid && result === true;
|
|
7909
7911
|
}
|
|
7910
|
-
} else if (field instanceof Field
|
|
7912
|
+
} else if (field instanceof Field) {
|
|
7911
7913
|
isValid = await field.validate() && isValid;
|
|
7912
7914
|
if (!isValid && !firstInvalid) {
|
|
7913
7915
|
firstInvalid = field;
|
|
@@ -7916,6 +7918,12 @@ class Form extends WithProperties {
|
|
|
7916
7918
|
}
|
|
7917
7919
|
return isValid || firstInvalid;
|
|
7918
7920
|
}
|
|
7921
|
+
getProperty(propName) {
|
|
7922
|
+
if (propName === "readOnly") {
|
|
7923
|
+
return this.definition.readOnly || this.definition.readonly;
|
|
7924
|
+
}
|
|
7925
|
+
return super.getProperty(propName);
|
|
7926
|
+
}
|
|
7919
7927
|
}
|
|
7920
7928
|
|
|
7921
7929
|
function decodeBase64ToUtf8(base64String) {
|
|
@@ -8994,7 +9002,6 @@ class Execution extends EventEmitter$1 {
|
|
|
8994
9002
|
P: /* @__PURE__ */ new Map()
|
|
8995
9003
|
});
|
|
8996
9004
|
__publicField(this, "state", {
|
|
8997
|
-
formsReady: [],
|
|
8998
9005
|
executionState: ExecutionState.LOADING,
|
|
8999
9006
|
locked: true,
|
|
9000
9007
|
hasChangedAnything: false
|
|
@@ -9108,7 +9115,8 @@ class Execution extends EventEmitter$1 {
|
|
|
9108
9115
|
const res = await InitialData.getFormsDefinition(this);
|
|
9109
9116
|
try {
|
|
9110
9117
|
for await (const formDefinition of res) {
|
|
9111
|
-
|
|
9118
|
+
const props = parseFakeJSON$1(formDefinition.properties);
|
|
9119
|
+
if (!props.frmTab && !props.frmHidden && (arrayOrArray(formDefinition.field).length > 0 || arrayOrArray(formDefinition.customField).length > 0)) {
|
|
9112
9120
|
this.mustRenderForms.push(
|
|
9113
9121
|
formDefinition.frmParent + "_" + formDefinition.formName
|
|
9114
9122
|
);
|
|
@@ -9125,7 +9133,6 @@ class Execution extends EventEmitter$1 {
|
|
|
9125
9133
|
this.formsById.P.set(String(formDefinition.id), newForm);
|
|
9126
9134
|
}
|
|
9127
9135
|
}
|
|
9128
|
-
this.state.formsReady = this.getAllForms();
|
|
9129
9136
|
this.state.executionState = this.mustRenderForms.length === 0 ? ExecutionState.RUNNING : ExecutionState.RENDERING;
|
|
9130
9137
|
this.state.locked = false;
|
|
9131
9138
|
this.fireEvents("onLoad");
|
|
@@ -9356,6 +9363,11 @@ class Execution extends EventEmitter$1 {
|
|
|
9356
9363
|
);
|
|
9357
9364
|
const canClose = response?.data?.load?.canClose;
|
|
9358
9365
|
if (canClose) {
|
|
9366
|
+
getWindow(this).location.assign(
|
|
9367
|
+
makeApiaUrl(this, {
|
|
9368
|
+
action: "refreshPage"
|
|
9369
|
+
})
|
|
9370
|
+
);
|
|
9359
9371
|
return response;
|
|
9360
9372
|
}
|
|
9361
9373
|
}
|
|
@@ -9423,5 +9435,5 @@ class Execution extends EventEmitter$1 {
|
|
|
9423
9435
|
}
|
|
9424
9436
|
}
|
|
9425
9437
|
|
|
9426
|
-
export { ActionsController, AdditionalCell, ApiaAttribute, ApiaField, ApiaFieldWithAttribute, ApiaForm, ApiaFunctions, BouncingEmitter, Button, ButtonField, Captcha, CaptchaField, CheckField, Checkbox, CustomComponent, GridField as DataGridField, Editor, EditorField, EventEmitter, Execution, ExecutionState, Field
|
|
9438
|
+
export { ActionsController, AdditionalCell, ApiaAttribute, ApiaField, ApiaFieldWithAttribute, ApiaForm, ApiaFunctions, BouncingEmitter, Button, ButtonField, Captcha, CaptchaField, CheckField, Checkbox, CustomComponent, GridField as DataGridField, Editor, EditorField, EventEmitter, Execution, ExecutionState, Field, FieldWithAttribute, File, FileUploaderField, FlowModal$1 as FlowModal, Form, FormsUploader, Grid, GridCell, GridField, GridPaginated, HeaderCell, Hidden, HiddenField, IProperty, Image, ImageField, Input, InputField, InvalidSessionException, Label, Link, LinkField, MessageNotification, ModalInput, ModalInputField, Multiple, MultipleField, Notifications, Password, PasswordField, Radio, RadioField, SchedulerField, Select, SelectField, ShowConfirmMessage, ShowPathSelection, ShowPoolSelection, ShowSign$1 as ShowSign, ShowSignSelection$1 as ShowSignSelection, StatefulEmitter, StatusNotification, AreaField as TextAreaField, TextField, Textarea, Title, TranslatableField, Translation, Tree, TreeField, UploaderApi, UploaderModalController, createNewField, deepEqual, get, getLabel, isHtmlResponse, isJsonResponse, isOneClickUploadEnabled, isXmlResponse, makeApiaUrl, parseFakeJSON$1 as parseFakeJSON, parseFileDefinition, parseSuccessfulResponse, parseXml, post, returnExactlyTheSame, shallowEqual };
|
|
9427
9439
|
//# sourceMappingURL=index.js.map
|