@apia/execution 5.0.0 → 5.0.1
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 +92 -3688
- package/dist/index.js +83 -8379
- package/dist/index.js.map +1 -1
- package/dist/main/Execution/Entity/index.d.ts +30 -0
- package/dist/main/Execution/Entity/index.d.ts.map +1 -0
- package/dist/main/Execution/Entity/index.js +268 -0
- package/dist/main/Execution/Entity/index.js.map +1 -0
- package/dist/main/Execution/Entity/type.d.ts +98 -0
- package/dist/main/Execution/Entity/type.d.ts.map +1 -0
- package/dist/main/Execution/EntityFlowModals/confirmFlow.js +200 -0
- package/dist/main/Execution/EntityFlowModals/confirmFlow.js.map +1 -0
- package/dist/main/Execution/FlowModals/FlowModal.d.ts +18 -0
- package/dist/main/Execution/FlowModals/FlowModal.d.ts.map +1 -0
- package/dist/main/Execution/FlowModals/FlowModal.js +5 -0
- package/dist/main/Execution/FlowModals/FlowModal.js.map +1 -0
- package/dist/main/Execution/FlowModals/ShowConfirmMessage.d.ts +16 -0
- package/dist/main/Execution/FlowModals/ShowConfirmMessage.d.ts.map +1 -0
- package/dist/main/Execution/FlowModals/ShowConfirmMessage.js +12 -0
- package/dist/main/Execution/FlowModals/ShowConfirmMessage.js.map +1 -0
- package/dist/main/Execution/FlowModals/ShowPathSelection.d.ts +29 -0
- package/dist/main/Execution/FlowModals/ShowPathSelection.d.ts.map +1 -0
- package/dist/main/Execution/FlowModals/ShowPathSelection.js +50 -0
- package/dist/main/Execution/FlowModals/ShowPathSelection.js.map +1 -0
- package/dist/main/Execution/FlowModals/ShowPoolSelection.d.ts +20 -0
- package/dist/main/Execution/FlowModals/ShowPoolSelection.d.ts.map +1 -0
- package/dist/main/Execution/FlowModals/ShowPoolSelection.js +12 -0
- package/dist/main/Execution/FlowModals/ShowPoolSelection.js.map +1 -0
- package/dist/main/Execution/FlowModals/ShowSign.d.ts +16 -0
- package/dist/main/Execution/FlowModals/ShowSign.d.ts.map +1 -0
- package/dist/main/Execution/FlowModals/ShowSign.js +12 -0
- package/dist/main/Execution/FlowModals/ShowSign.js.map +1 -0
- package/dist/main/Execution/FlowModals/ShowSignSelection.d.ts +19 -0
- package/dist/main/Execution/FlowModals/ShowSignSelection.d.ts.map +1 -0
- package/dist/main/Execution/FlowModals/ShowSignSelection.js +12 -0
- package/dist/main/Execution/FlowModals/ShowSignSelection.js.map +1 -0
- package/dist/main/Execution/FlowModals/confirmFlow.js +420 -0
- package/dist/main/Execution/FlowModals/confirmFlow.js.map +1 -0
- package/dist/main/Execution/FlowModals/types.d.ts +44 -0
- package/dist/main/Execution/FlowModals/types.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/Field.d.ts +43 -0
- package/dist/main/Execution/FormsExecution/Field.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/Field.js +289 -0
- package/dist/main/Execution/FormsExecution/Field.js.map +1 -0
- package/dist/main/Execution/FormsExecution/FieldWithAttribute.d.ts +43 -0
- package/dist/main/Execution/FormsExecution/FieldWithAttribute.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/FieldWithAttribute.js +244 -0
- package/dist/main/Execution/FormsExecution/FieldWithAttribute.js.map +1 -0
- package/dist/main/Execution/FormsExecution/Form.d.ts +83 -0
- package/dist/main/Execution/FormsExecution/Form.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/Form.js +378 -0
- package/dist/main/Execution/FormsExecution/Form.js.map +1 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/Translation.d.ts +19 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/Translation.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/Translation.js +72 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/Translation.js.map +1 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/index.d.ts +38 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/index.js +141 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/types.d.ts +11 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/types.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/util.js +9 -0
- package/dist/main/Execution/FormsExecution/TranslatableField/util.js.map +1 -0
- package/dist/main/Execution/FormsExecution/WithProperties.d.ts +17 -0
- package/dist/main/Execution/FormsExecution/WithProperties.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/WithProperties.js +38 -0
- package/dist/main/Execution/FormsExecution/WithProperties.js.map +1 -0
- package/dist/main/Execution/FormsExecution/constants/IProperty.js +10 -0
- package/dist/main/Execution/FormsExecution/constants/IProperty.js.map +1 -0
- package/dist/main/Execution/FormsExecution/constants/actions.js +5 -0
- package/dist/main/Execution/FormsExecution/constants/actions.js.map +1 -0
- package/dist/main/Execution/FormsExecution/constants/eventTypes.js +5 -0
- package/dist/main/Execution/FormsExecution/constants/eventTypes.js.map +1 -0
- package/dist/main/Execution/FormsExecution/constants/fieldProps.js +124 -0
- package/dist/main/Execution/FormsExecution/constants/fieldProps.js.map +1 -0
- package/dist/main/Execution/FormsExecution/constants/formProps.js +18 -0
- package/dist/main/Execution/FormsExecution/constants/formProps.js.map +1 -0
- package/dist/main/Execution/FormsExecution/constants/props/booleanProps.js +67 -0
- package/dist/main/Execution/FormsExecution/constants/props/booleanProps.js.map +1 -0
- package/dist/main/Execution/FormsExecution/constants/props/numberProps.js +14 -0
- package/dist/main/Execution/FormsExecution/constants/props/numberProps.js.map +1 -0
- package/dist/main/Execution/FormsExecution/customComponents/CustomComponent.d.ts +62 -0
- package/dist/main/Execution/FormsExecution/customComponents/CustomComponent.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/customComponents/CustomComponent.js +378 -0
- package/dist/main/Execution/FormsExecution/customComponents/CustomComponent.js.map +1 -0
- package/dist/main/Execution/FormsExecution/events/setAjaxFormResponse.js +150 -0
- package/dist/main/Execution/FormsExecution/events/setAjaxFormResponse.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Button/index.d.ts +10 -0
- package/dist/main/Execution/FormsExecution/fields/Button/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Button/index.js +10 -0
- package/dist/main/Execution/FormsExecution/fields/Button/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Captcha/index.d.ts +28 -0
- package/dist/main/Execution/FormsExecution/fields/Captcha/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Captcha/index.js +71 -0
- package/dist/main/Execution/FormsExecution/fields/Captcha/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Checkbox/index.d.ts +12 -0
- package/dist/main/Execution/FormsExecution/fields/Checkbox/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Checkbox/index.js +19 -0
- package/dist/main/Execution/FormsExecution/fields/Checkbox/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Editor/index.d.ts +14 -0
- package/dist/main/Execution/FormsExecution/fields/Editor/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Editor/index.js +18 -0
- package/dist/main/Execution/FormsExecution/fields/Editor/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/File/index.d.ts +22 -0
- package/dist/main/Execution/FormsExecution/fields/File/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/File/index.js +116 -0
- package/dist/main/Execution/FormsExecution/fields/File/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/AdditionalCell.d.ts +15 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/AdditionalCell.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/AdditionalCell.js +17 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/AdditionalCell.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/FieldsCache.d.ts +24 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/FieldsCache.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/FieldsCache.js +43 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/FieldsCache.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/GridCell.d.ts +9 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/GridCell.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/GridCell.js +10 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/GridCell.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/GridEditionModal.d.ts +7 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/GridEditionModal.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/GridFooterHandler.d.ts +27 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/GridFooterHandler.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/GridFooterHandler.js +100 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/GridFooterHandler.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/HeaderCell.d.ts +14 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/HeaderCell.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/HeaderCell.js +17 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/HeaderCell.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/index.d.ts +122 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/index.js +961 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/types.d.ts +47 -0
- package/dist/main/Execution/FormsExecution/fields/Grid/types.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/GridPaginated/index.d.ts +21 -0
- package/dist/main/Execution/FormsExecution/fields/GridPaginated/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/GridPaginated/index.js +204 -0
- package/dist/main/Execution/FormsExecution/fields/GridPaginated/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Hidden/index.d.ts +8 -0
- package/dist/main/Execution/FormsExecution/fields/Hidden/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Hidden/index.js +7 -0
- package/dist/main/Execution/FormsExecution/fields/Hidden/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Image/index.d.ts +8 -0
- package/dist/main/Execution/FormsExecution/fields/Image/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Image/index.js +7 -0
- package/dist/main/Execution/FormsExecution/fields/Image/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Input/index.d.ts +18 -0
- package/dist/main/Execution/FormsExecution/fields/Input/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Input/index.js +146 -0
- package/dist/main/Execution/FormsExecution/fields/Input/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Label/index.d.ts +9 -0
- package/dist/main/Execution/FormsExecution/fields/Label/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Label/index.js +7 -0
- package/dist/main/Execution/FormsExecution/fields/Label/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Link/index.d.ts +8 -0
- package/dist/main/Execution/FormsExecution/fields/Link/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Link/index.js +7 -0
- package/dist/main/Execution/FormsExecution/fields/Link/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/ModalInput/index.d.ts +25 -0
- package/dist/main/Execution/FormsExecution/fields/ModalInput/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/ModalInput/index.js +145 -0
- package/dist/main/Execution/FormsExecution/fields/ModalInput/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Multiple/index.d.ts +19 -0
- package/dist/main/Execution/FormsExecution/fields/Multiple/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Multiple/index.js +42 -0
- package/dist/main/Execution/FormsExecution/fields/Multiple/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Password/index.d.ts +9 -0
- package/dist/main/Execution/FormsExecution/fields/Password/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Password/index.js +10 -0
- package/dist/main/Execution/FormsExecution/fields/Password/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Radio/index.d.ts +15 -0
- package/dist/main/Execution/FormsExecution/fields/Radio/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Radio/index.js +26 -0
- package/dist/main/Execution/FormsExecution/fields/Radio/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Scheduler/index.d.ts +36 -0
- package/dist/main/Execution/FormsExecution/fields/Scheduler/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Scheduler/index.js +156 -0
- package/dist/main/Execution/FormsExecution/fields/Scheduler/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Select/index.d.ts +15 -0
- package/dist/main/Execution/FormsExecution/fields/Select/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Select/index.js +35 -0
- package/dist/main/Execution/FormsExecution/fields/Select/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Textarea/index.d.ts +11 -0
- package/dist/main/Execution/FormsExecution/fields/Textarea/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Textarea/index.js +15 -0
- package/dist/main/Execution/FormsExecution/fields/Textarea/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Title/index.d.ts +8 -0
- package/dist/main/Execution/FormsExecution/fields/Title/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Title/index.js +7 -0
- package/dist/main/Execution/FormsExecution/fields/Title/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Tree/index.d.ts +30 -0
- package/dist/main/Execution/FormsExecution/fields/Tree/index.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fields/Tree/index.js +115 -0
- package/dist/main/Execution/FormsExecution/fields/Tree/index.js.map +1 -0
- package/dist/main/Execution/FormsExecution/fieldsMap.d.ts +9 -0
- package/dist/main/Execution/FormsExecution/fieldsMap.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/fieldsMap.js +64 -0
- package/dist/main/Execution/FormsExecution/fieldsMap.js.map +1 -0
- package/dist/main/Execution/FormsExecution/types.d.ts +55 -0
- package/dist/main/Execution/FormsExecution/types.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/util/isFieldShowAsText.js +8 -0
- package/dist/main/Execution/FormsExecution/util/isFieldShowAsText.js.map +1 -0
- package/dist/main/Execution/FormsExecution/util/util.d.ts +6 -0
- package/dist/main/Execution/FormsExecution/util/util.d.ts.map +1 -0
- package/dist/main/Execution/FormsExecution/util/util.js +7 -0
- package/dist/main/Execution/FormsExecution/util/util.js.map +1 -0
- package/dist/main/Execution/Observations/index.d.ts +16 -0
- package/dist/main/Execution/Observations/index.d.ts.map +1 -0
- package/dist/main/Execution/Observations/index.js +89 -0
- package/dist/main/Execution/Observations/index.js.map +1 -0
- package/dist/main/Execution/Observations/types.d.ts +26 -0
- package/dist/main/Execution/Observations/types.d.ts.map +1 -0
- package/dist/main/Execution/Process/index.d.ts +23 -0
- package/dist/main/Execution/Process/index.d.ts.map +1 -0
- package/dist/main/Execution/Process/index.js +77 -0
- package/dist/main/Execution/Process/index.js.map +1 -0
- package/dist/main/Execution/Process/types.d.ts +95 -0
- package/dist/main/Execution/Process/types.d.ts.map +1 -0
- package/dist/main/Execution/Signature/SignatureController.d.ts +23 -0
- package/dist/main/Execution/Signature/SignatureController.d.ts.map +1 -0
- package/dist/main/Execution/Signature/SignatureController.js +71 -0
- package/dist/main/Execution/Signature/SignatureController.js.map +1 -0
- package/dist/main/Execution/Task.d.ts +9 -0
- package/dist/main/Execution/Task.d.ts.map +1 -0
- package/dist/main/Execution/Task.js +34 -0
- package/dist/main/Execution/Task.js.map +1 -0
- package/dist/main/Execution/Uploader/FormsUploader.d.ts +145 -0
- package/dist/main/Execution/Uploader/FormsUploader.d.ts.map +1 -0
- package/dist/main/Execution/Uploader/FormsUploader.js +299 -0
- package/dist/main/Execution/Uploader/FormsUploader.js.map +1 -0
- package/dist/main/Execution/Uploader/UploaderApi.d.ts +40 -0
- package/dist/main/Execution/Uploader/UploaderApi.d.ts.map +1 -0
- package/dist/main/Execution/Uploader/UploaderApi.js +127 -0
- package/dist/main/Execution/Uploader/UploaderApi.js.map +1 -0
- package/dist/main/Execution/index.d.ts +184 -0
- package/dist/main/Execution/index.d.ts.map +1 -0
- package/dist/main/Execution/index.js +662 -0
- package/dist/main/Execution/index.js.map +1 -0
- package/dist/main/Execution/types.d.ts +99 -0
- package/dist/main/Execution/types.d.ts.map +1 -0
- package/dist/main/Execution/types.js +12 -0
- package/dist/main/Execution/types.js.map +1 -0
- package/dist/main/InitialData/bootstrap/readFormsDefinition.js +55 -0
- package/dist/main/InitialData/bootstrap/readFormsDefinition.js.map +1 -0
- package/dist/main/InitialData/index.js +10 -0
- package/dist/main/InitialData/index.js.map +1 -0
- package/dist/main/InitialData/types/TApiaField.d.ts +73 -0
- package/dist/main/InitialData/types/TApiaField.d.ts.map +1 -0
- package/dist/main/InitialData/types/TApiaForm.d.ts +102 -0
- package/dist/main/InitialData/types/TApiaForm.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaButtonDefinition.d.ts +9 -0
- package/dist/main/InitialData/types/fields/TApiaButtonDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaCaptchaDefinition.d.ts +11 -0
- package/dist/main/InitialData/types/fields/TApiaCaptchaDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaCheckboxDefinition.d.ts +10 -0
- package/dist/main/InitialData/types/fields/TApiaCheckboxDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaEditorDefinition.d.ts +10 -0
- package/dist/main/InitialData/types/fields/TApiaEditorDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaFieldProperties.d.ts +194 -0
- package/dist/main/InitialData/types/fields/TApiaFieldProperties.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaFileUploaderDefinition.d.ts +11 -0
- package/dist/main/InitialData/types/fields/TApiaFileUploaderDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaGridDefinition.d.ts +33 -0
- package/dist/main/InitialData/types/fields/TApiaGridDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaHiddenInputDefinition.d.ts +11 -0
- package/dist/main/InitialData/types/fields/TApiaHiddenInputDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaImageDefinition.d.ts +9 -0
- package/dist/main/InitialData/types/fields/TApiaImageDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaInputDefinition.d.ts +21 -0
- package/dist/main/InitialData/types/fields/TApiaInputDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaLabelDefinition.d.ts +10 -0
- package/dist/main/InitialData/types/fields/TApiaLabelDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaLinkDefinition.d.ts +10 -0
- package/dist/main/InitialData/types/fields/TApiaLinkDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaModalInputDefinition.d.ts +24 -0
- package/dist/main/InitialData/types/fields/TApiaModalInputDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaMultipleDefinition.d.ts +11 -0
- package/dist/main/InitialData/types/fields/TApiaMultipleDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaPasswordDefinition.d.ts +10 -0
- package/dist/main/InitialData/types/fields/TApiaPasswordDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaRadioButtonDefinition.d.ts +11 -0
- package/dist/main/InitialData/types/fields/TApiaRadioButtonDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaSelectDefinition.d.ts +11 -0
- package/dist/main/InitialData/types/fields/TApiaSelectDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaTextareaDefinition.d.ts +11 -0
- package/dist/main/InitialData/types/fields/TApiaTextareaDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaTitleDefinition.d.ts +9 -0
- package/dist/main/InitialData/types/fields/TApiaTitleDefinition.d.ts.map +1 -0
- package/dist/main/InitialData/types/fields/TApiaTreeDefinition.d.ts +17 -0
- package/dist/main/InitialData/types/fields/TApiaTreeDefinition.d.ts.map +1 -0
- package/dist/main/Notifications/MessageNotification.d.ts +8 -0
- package/dist/main/Notifications/MessageNotification.d.ts.map +1 -0
- package/dist/main/Notifications/MessageNotification.js +10 -0
- package/dist/main/Notifications/MessageNotification.js.map +1 -0
- package/dist/main/Notifications/Notification.d.ts +26 -0
- package/dist/main/Notifications/Notification.d.ts.map +1 -0
- package/dist/main/Notifications/Notification.js +40 -0
- package/dist/main/Notifications/Notification.js.map +1 -0
- package/dist/main/Notifications/StatusNotification.d.ts +15 -0
- package/dist/main/Notifications/StatusNotification.d.ts.map +1 -0
- package/dist/main/Notifications/StatusNotification.js +11 -0
- package/dist/main/Notifications/StatusNotification.js.map +1 -0
- package/dist/main/Notifications/index.d.ts +26 -0
- package/dist/main/Notifications/index.d.ts.map +1 -0
- package/dist/main/Notifications/index.js +48 -0
- package/dist/main/Notifications/index.js.map +1 -0
- package/dist/programming/ActionController/index.d.ts +36 -0
- package/dist/programming/ActionController/index.d.ts.map +1 -0
- package/dist/programming/ActionController/index.js +69 -0
- package/dist/programming/ActionController/index.js.map +1 -0
- package/dist/programming/ApiaField.d.ts +21 -0
- package/dist/programming/ApiaField.d.ts.map +1 -0
- package/dist/programming/ApiaField.js +58 -0
- package/dist/programming/ApiaField.js.map +1 -0
- package/dist/programming/ApiaFieldWithAttribute.d.ts +31 -0
- package/dist/programming/ApiaFieldWithAttribute.d.ts.map +1 -0
- package/dist/programming/ApiaFieldWithAttribute.js +72 -0
- package/dist/programming/ApiaFieldWithAttribute.js.map +1 -0
- package/dist/programming/ApiaForm.d.ts +148 -0
- package/dist/programming/ApiaForm.d.ts.map +1 -0
- package/dist/programming/ApiaForm.js +105 -0
- package/dist/programming/ApiaForm.js.map +1 -0
- package/dist/programming/ApiaFunctions.d.ts +54 -0
- package/dist/programming/ApiaFunctions.d.ts.map +1 -0
- package/dist/programming/ApiaFunctions.js +223 -0
- package/dist/programming/ApiaFunctions.js.map +1 -0
- package/dist/programming/constants/BooleanProps.d.ts +4 -0
- package/dist/programming/constants/BooleanProps.d.ts.map +1 -0
- package/dist/programming/constants/BooleanProps.js +67 -0
- package/dist/programming/constants/BooleanProps.js.map +1 -0
- package/dist/programming/constants/FieldConstants.d.ts +121 -0
- package/dist/programming/constants/FieldConstants.d.ts.map +1 -0
- package/dist/programming/constants/FieldConstants.js +127 -0
- package/dist/programming/constants/FieldConstants.js.map +1 -0
- package/dist/programming/constants/FormConstants.d.ts +15 -0
- package/dist/programming/constants/FormConstants.d.ts.map +1 -0
- package/dist/programming/constants/FormConstants.js +15 -0
- package/dist/programming/constants/FormConstants.js.map +1 -0
- package/dist/programming/constants/IProperty.d.ts +131 -0
- package/dist/programming/constants/IProperty.d.ts.map +1 -0
- package/dist/programming/constants/IProperty.js +10 -0
- package/dist/programming/constants/IProperty.js.map +1 -0
- package/dist/programming/constants/NumberProps.d.ts +4 -0
- package/dist/programming/constants/NumberProps.d.ts.map +1 -0
- package/dist/programming/constants/NumberProps.js +14 -0
- package/dist/programming/constants/NumberProps.js.map +1 -0
- package/dist/programming/fields/AreaField.d.ts +7 -0
- package/dist/programming/fields/AreaField.d.ts.map +1 -0
- package/dist/programming/fields/AreaField.js +7 -0
- package/dist/programming/fields/AreaField.js.map +1 -0
- package/dist/programming/fields/ButtonField.d.ts +22 -0
- package/dist/programming/fields/ButtonField.d.ts.map +1 -0
- package/dist/programming/fields/ButtonField.js +49 -0
- package/dist/programming/fields/ButtonField.js.map +1 -0
- package/dist/programming/fields/CaptchaField.d.ts +9 -0
- package/dist/programming/fields/CaptchaField.d.ts.map +1 -0
- package/dist/programming/fields/CaptchaField.js +7 -0
- package/dist/programming/fields/CaptchaField.js.map +1 -0
- package/dist/programming/fields/CheckField.d.ts +9 -0
- package/dist/programming/fields/CheckField.d.ts.map +1 -0
- package/dist/programming/fields/CheckField.js +23 -0
- package/dist/programming/fields/CheckField.js.map +1 -0
- package/dist/programming/fields/CustomComponentField.js +56 -0
- package/dist/programming/fields/CustomComponentField.js.map +1 -0
- package/dist/programming/fields/EditorField.d.ts +7 -0
- package/dist/programming/fields/EditorField.d.ts.map +1 -0
- package/dist/programming/fields/EditorField.js +7 -0
- package/dist/programming/fields/EditorField.js.map +1 -0
- package/dist/programming/fields/FileUploaderField.d.ts +17 -0
- package/dist/programming/fields/FileUploaderField.d.ts.map +1 -0
- package/dist/programming/fields/FileUploaderField.js +58 -0
- package/dist/programming/fields/FileUploaderField.js.map +1 -0
- package/dist/programming/fields/GridField.d.ts +624 -0
- package/dist/programming/fields/GridField.d.ts.map +1 -0
- package/dist/programming/fields/GridField.js +181 -0
- package/dist/programming/fields/GridField.js.map +1 -0
- package/dist/programming/fields/HiddenField.d.ts +7 -0
- package/dist/programming/fields/HiddenField.d.ts.map +1 -0
- package/dist/programming/fields/HiddenField.js +7 -0
- package/dist/programming/fields/HiddenField.js.map +1 -0
- package/dist/programming/fields/ImageField.d.ts +24 -0
- package/dist/programming/fields/ImageField.d.ts.map +1 -0
- package/dist/programming/fields/ImageField.js +61 -0
- package/dist/programming/fields/ImageField.js.map +1 -0
- package/dist/programming/fields/InputField.d.ts +15 -0
- package/dist/programming/fields/InputField.d.ts.map +1 -0
- package/dist/programming/fields/InputField.js +42 -0
- package/dist/programming/fields/InputField.js.map +1 -0
- package/dist/programming/fields/LinkField.d.ts +18 -0
- package/dist/programming/fields/LinkField.d.ts.map +1 -0
- package/dist/programming/fields/LinkField.js +39 -0
- package/dist/programming/fields/LinkField.js.map +1 -0
- package/dist/programming/fields/ModalInput.d.ts +16 -0
- package/dist/programming/fields/ModalInput.d.ts.map +1 -0
- package/dist/programming/fields/ModalInput.js +41 -0
- package/dist/programming/fields/ModalInput.js.map +1 -0
- package/dist/programming/fields/MultipleField.d.ts +22 -0
- package/dist/programming/fields/MultipleField.d.ts.map +1 -0
- package/dist/programming/fields/MultipleField.js +102 -0
- package/dist/programming/fields/MultipleField.js.map +1 -0
- package/dist/programming/fields/PasswordField.d.ts +7 -0
- package/dist/programming/fields/PasswordField.d.ts.map +1 -0
- package/dist/programming/fields/PasswordField.js +7 -0
- package/dist/programming/fields/PasswordField.js.map +1 -0
- package/dist/programming/fields/RadioField.d.ts +22 -0
- package/dist/programming/fields/RadioField.d.ts.map +1 -0
- package/dist/programming/fields/RadioField.js +98 -0
- package/dist/programming/fields/RadioField.js.map +1 -0
- package/dist/programming/fields/SelectField.d.ts +24 -0
- package/dist/programming/fields/SelectField.d.ts.map +1 -0
- package/dist/programming/fields/SelectField.js +104 -0
- package/dist/programming/fields/SelectField.js.map +1 -0
- package/dist/programming/fields/TextField.d.ts +18 -0
- package/dist/programming/fields/TextField.d.ts.map +1 -0
- package/dist/programming/fields/TextField.js +43 -0
- package/dist/programming/fields/TextField.js.map +1 -0
- package/dist/programming/fields/TreeField.d.ts +14 -0
- package/dist/programming/fields/TreeField.d.ts.map +1 -0
- package/dist/programming/fields/TreeField.js +36 -0
- package/dist/programming/fields/TreeField.js.map +1 -0
- package/dist/programming/types.d.ts +73 -0
- package/dist/programming/types.d.ts.map +1 -0
- package/dist/programming/utils/asynCreateApiaField.d.ts +10 -0
- package/dist/programming/utils/asynCreateApiaField.d.ts.map +1 -0
- package/dist/programming/utils/asynCreateApiaField.js +10 -0
- package/dist/programming/utils/asynCreateApiaField.js.map +1 -0
- package/dist/programming/utils/createApiaField.d.ts +6 -0
- package/dist/programming/utils/createApiaField.d.ts.map +1 -0
- package/dist/programming/utils/createApiaField.js +94 -0
- package/dist/programming/utils/createApiaField.js.map +1 -0
- package/dist/util/api/apiaApi.d.ts +159 -0
- package/dist/util/api/apiaApi.d.ts.map +1 -0
- package/dist/util/api/apiaApi.js +243 -0
- package/dist/util/api/apiaApi.js.map +1 -0
- package/dist/util/api/types.d.ts +38 -0
- package/dist/util/api/types.d.ts.map +1 -0
- package/dist/util/app/getCurrentTabsString.js +13 -0
- package/dist/util/app/getCurrentTabsString.js.map +1 -0
- package/dist/util/comparators/deepEqual.d.ts +5 -0
- package/dist/util/comparators/deepEqual.d.ts.map +1 -0
- package/dist/util/comparators/deepEqual.js +38 -0
- package/dist/util/comparators/deepEqual.js.map +1 -0
- package/dist/util/comparators/shallowEqual.d.ts +5 -0
- package/dist/util/comparators/shallowEqual.d.ts.map +1 -0
- package/dist/util/comparators/shallowEqual.js +38 -0
- package/dist/util/comparators/shallowEqual.js.map +1 -0
- package/dist/util/dataTypes/parseBoolean.js +12 -0
- package/dist/util/dataTypes/parseBoolean.js.map +1 -0
- package/dist/util/dom/getDocument.js +6 -0
- package/dist/util/dom/getDocument.js.map +1 -0
- package/dist/util/dom/getWindow.js +6 -0
- package/dist/util/dom/getWindow.js.map +1 -0
- package/dist/util/events/BouncingEmitter.d.ts +66 -0
- package/dist/util/events/BouncingEmitter.d.ts.map +1 -0
- package/dist/util/events/BouncingEmitter.js +78 -0
- package/dist/util/events/BouncingEmitter.js.map +1 -0
- package/dist/util/events/EventEmitter.d.ts +47 -0
- package/dist/util/events/EventEmitter.d.ts.map +1 -0
- package/dist/util/events/EventEmitter.js +81 -0
- package/dist/util/events/EventEmitter.js.map +1 -0
- package/dist/util/events/StatefulEmitter.d.ts +37 -0
- package/dist/util/events/StatefulEmitter.d.ts.map +1 -0
- package/dist/util/events/StatefulEmitter.js +51 -0
- package/dist/util/events/StatefulEmitter.js.map +1 -0
- package/dist/util/events/types.d.ts +30 -0
- package/dist/util/events/types.d.ts.map +1 -0
- package/dist/util/labels/labels.d.ts +12 -0
- package/dist/util/labels/labels.d.ts.map +1 -0
- package/dist/util/labels/labels.js +35 -0
- package/dist/util/labels/labels.js.map +1 -0
- package/dist/util/number/noNaN.js +9 -0
- package/dist/util/number/noNaN.js.map +1 -0
- package/dist/util/other/asyncRetry.js +32 -0
- package/dist/util/other/asyncRetry.js.map +1 -0
- package/dist/util/other/parseFakeJSON.d.ts +4 -0
- package/dist/util/other/parseFakeJSON.d.ts.map +1 -0
- package/dist/util/other/parseFakeJSON.js +45 -0
- package/dist/util/other/parseFakeJSON.js.map +1 -0
- package/dist/util/xml/parseXml.d.ts +10 -0
- package/dist/util/xml/parseXml.d.ts.map +1 -0
- package/dist/util/xml/parseXml.js +172 -0
- package/dist/util/xml/parseXml.js.map +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
import { InitialData } from '../InitialData/index.js';
|
|
2
|
+
import { getLabel, labels } from '../../util/labels/labels.js';
|
|
3
|
+
import { Form } from './FormsExecution/Form.js';
|
|
4
|
+
import { defaultFieldsMap } from './FormsExecution/fieldsMap.js';
|
|
5
|
+
import { Notifications } from '../Notifications/index.js';
|
|
6
|
+
import { MessageNotification } from '../Notifications/MessageNotification.js';
|
|
7
|
+
import { Process } from './Process/index.js';
|
|
8
|
+
import { makeObservable, observable } from 'mobx';
|
|
9
|
+
import { Task } from './Task.js';
|
|
10
|
+
import { Entity } from './Entity/index.js';
|
|
11
|
+
import { EventEmitter, Mutex, noNaN, arrayOrArray, postNavigation } from '@apia/util';
|
|
12
|
+
import { Observations } from './Observations/index.js';
|
|
13
|
+
import { FlowModal } from './FlowModals/FlowModal.js';
|
|
14
|
+
import { getCurrentTabsString } from '../../util/app/getCurrentTabsString.js';
|
|
15
|
+
import { ExecutionState } from './types.js';
|
|
16
|
+
import { parseFakeJSON } from '../../util/other/parseFakeJSON.js';
|
|
17
|
+
import { confirm } from './FlowModals/confirmFlow.js';
|
|
18
|
+
import { confirmEntity } from './EntityFlowModals/confirmFlow.js';
|
|
19
|
+
import { getWindow } from '../../util/dom/getWindow.js';
|
|
20
|
+
import { SignatureController } from './Signature/SignatureController.js';
|
|
21
|
+
import { parseXml } from '../../util/xml/parseXml.js';
|
|
22
|
+
import { makeApiaUrl, post, get } from '../../util/api/apiaApi.js';
|
|
23
|
+
import { ShowConfirmMessage } from './FlowModals/ShowConfirmMessage.js';
|
|
24
|
+
import { Captcha } from './FormsExecution/fields/Captcha/index.js';
|
|
25
|
+
import { ShowSignSelection } from './FlowModals/ShowSignSelection.js';
|
|
26
|
+
|
|
27
|
+
var __defProp = Object.defineProperty;
|
|
28
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
29
|
+
var __publicField = (obj, key, value) => {
|
|
30
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
31
|
+
return value;
|
|
32
|
+
};
|
|
33
|
+
function parseNotificationType(str) {
|
|
34
|
+
let type = "warning";
|
|
35
|
+
switch (str) {
|
|
36
|
+
case "1":
|
|
37
|
+
type = "success";
|
|
38
|
+
break;
|
|
39
|
+
case "2":
|
|
40
|
+
type = "warning";
|
|
41
|
+
break;
|
|
42
|
+
case "3":
|
|
43
|
+
type = "error";
|
|
44
|
+
break;
|
|
45
|
+
case "4":
|
|
46
|
+
type = "modal";
|
|
47
|
+
break;
|
|
48
|
+
case "5":
|
|
49
|
+
type = "info";
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
return type;
|
|
53
|
+
}
|
|
54
|
+
const unescapeMarkup = (str) => {
|
|
55
|
+
if (str !== void 0 && str.length > 0) {
|
|
56
|
+
return str.replace(/'/g, "'").replace(/"/g, '"').replace(/>/g, ">").replace(/</g, "<").replace(/&/g, "&");
|
|
57
|
+
}
|
|
58
|
+
return "";
|
|
59
|
+
};
|
|
60
|
+
class Execution extends EventEmitter {
|
|
61
|
+
constructor(environment, renderers) {
|
|
62
|
+
super();
|
|
63
|
+
this.environment = environment;
|
|
64
|
+
this.renderers = renderers;
|
|
65
|
+
__publicField(this, "fieldsMapping");
|
|
66
|
+
__publicField(this, "entity");
|
|
67
|
+
__publicField(this, "process");
|
|
68
|
+
__publicField(this, "observations");
|
|
69
|
+
__publicField(this, "executedOnLoadEvents", false);
|
|
70
|
+
__publicField(this, "executionConfig", null);
|
|
71
|
+
__publicField(this, "lastFieldFocusedId", null);
|
|
72
|
+
__publicField(this, "_steps", []);
|
|
73
|
+
__publicField(this, "_currentStep", 1);
|
|
74
|
+
__publicField(this, "_stepCount", 1);
|
|
75
|
+
__publicField(this, "notifications");
|
|
76
|
+
__publicField(this, "lastModalReturn", []);
|
|
77
|
+
__publicField(this, "_pendingPromises", /* @__PURE__ */ new Set());
|
|
78
|
+
__publicField(this, "_pendingNoAjaxNavigation", false);
|
|
79
|
+
__publicField(this, "_signatureController", null);
|
|
80
|
+
__publicField(this, "formsById", {
|
|
81
|
+
E: /* @__PURE__ */ new Map(),
|
|
82
|
+
P: /* @__PURE__ */ new Map()
|
|
83
|
+
});
|
|
84
|
+
__publicField(this, "forms", {
|
|
85
|
+
E: /* @__PURE__ */ new Map(),
|
|
86
|
+
P: /* @__PURE__ */ new Map()
|
|
87
|
+
});
|
|
88
|
+
__publicField(this, "state", {
|
|
89
|
+
executionState: ExecutionState.LOADING,
|
|
90
|
+
locked: 0,
|
|
91
|
+
hasChangedAnything: false
|
|
92
|
+
});
|
|
93
|
+
__publicField(this, "hasInitializedFormsTabs", {});
|
|
94
|
+
__publicField(this, "mustRenderForms", []);
|
|
95
|
+
__publicField(this, "entMutex", new Mutex());
|
|
96
|
+
__publicField(this, "proMutex", new Mutex());
|
|
97
|
+
__publicField(this, "obsMutex", new Mutex());
|
|
98
|
+
__publicField(this, "flow", {
|
|
99
|
+
back: () => {
|
|
100
|
+
this.emit("flow", "previous");
|
|
101
|
+
},
|
|
102
|
+
confirm: () => {
|
|
103
|
+
this.emit("flow", "confirm");
|
|
104
|
+
},
|
|
105
|
+
next: () => {
|
|
106
|
+
this.emit("flow", "next");
|
|
107
|
+
},
|
|
108
|
+
previous: () => {
|
|
109
|
+
this.emit("flow", "previous");
|
|
110
|
+
},
|
|
111
|
+
save: () => {
|
|
112
|
+
this.emit("flow", "save");
|
|
113
|
+
},
|
|
114
|
+
release: () => {
|
|
115
|
+
this.emit("flow", "release");
|
|
116
|
+
},
|
|
117
|
+
delegate: () => {
|
|
118
|
+
this.emit("flow", "delegate");
|
|
119
|
+
},
|
|
120
|
+
share: () => {
|
|
121
|
+
this.emit("flow", "share");
|
|
122
|
+
},
|
|
123
|
+
viewDocs: () => {
|
|
124
|
+
this.emit("flow", "viewDocs");
|
|
125
|
+
},
|
|
126
|
+
print: () => {
|
|
127
|
+
this.emit("flow", "print");
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
this.fieldsMapping = { ...defaultFieldsMap, ...environment.fieldsMapping };
|
|
131
|
+
this.notifications = new Notifications(this);
|
|
132
|
+
makeObservable(this, { state: observable });
|
|
133
|
+
}
|
|
134
|
+
addPendingPromise(promise) {
|
|
135
|
+
this._pendingPromises.add(promise);
|
|
136
|
+
promise.finally(() => {
|
|
137
|
+
this._pendingPromises.delete(promise);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
markNoAjaxNavigationAsPending() {
|
|
141
|
+
this._pendingNoAjaxNavigation = true;
|
|
142
|
+
}
|
|
143
|
+
clearNoAjaxNavigationPendingState() {
|
|
144
|
+
this._pendingNoAjaxNavigation = false;
|
|
145
|
+
}
|
|
146
|
+
hasPendingNoAjaxNavigation() {
|
|
147
|
+
return this._pendingNoAjaxNavigation;
|
|
148
|
+
}
|
|
149
|
+
getErrorsList() {
|
|
150
|
+
const entityErrors = [];
|
|
151
|
+
this.forms.E.forEach((form) => {
|
|
152
|
+
entityErrors.push(...form.getErrorsList());
|
|
153
|
+
});
|
|
154
|
+
const processErrors = [];
|
|
155
|
+
this.forms.P.forEach((form) => {
|
|
156
|
+
processErrors.push(...form.getErrorsList());
|
|
157
|
+
});
|
|
158
|
+
return [...entityErrors, ...processErrors];
|
|
159
|
+
}
|
|
160
|
+
getAllForms() {
|
|
161
|
+
return [...this.forms.E.values(), ...this.forms.P.values()];
|
|
162
|
+
}
|
|
163
|
+
initializeFormsTabs(frmParent, cb) {
|
|
164
|
+
if (!this.hasInitializedFormsTabs[frmParent]) {
|
|
165
|
+
this.hasInitializedFormsTabs[frmParent] = true;
|
|
166
|
+
cb();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
getFormsByType(type) {
|
|
170
|
+
return [...this.forms[type].values()];
|
|
171
|
+
}
|
|
172
|
+
getFormByName(formName, frmParent) {
|
|
173
|
+
if (frmParent) {
|
|
174
|
+
return this.forms[frmParent].get(formName);
|
|
175
|
+
} else {
|
|
176
|
+
return this.forms.E.get(formName) || this.forms.P.get(formName);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
getFormById(formId, frmParent) {
|
|
180
|
+
if (frmParent)
|
|
181
|
+
return this.formsById[frmParent].get(String(formId));
|
|
182
|
+
return this.formsById.E.get(String(formId)) || this.formsById.P.get(String(formId));
|
|
183
|
+
}
|
|
184
|
+
get currentStep() {
|
|
185
|
+
return this._currentStep;
|
|
186
|
+
}
|
|
187
|
+
get signatureController() {
|
|
188
|
+
if (this._signatureController === null) {
|
|
189
|
+
this._signatureController = new SignatureController(this);
|
|
190
|
+
}
|
|
191
|
+
return this._signatureController;
|
|
192
|
+
}
|
|
193
|
+
get steps() {
|
|
194
|
+
return this._steps;
|
|
195
|
+
}
|
|
196
|
+
getEntity() {
|
|
197
|
+
return this.entity;
|
|
198
|
+
}
|
|
199
|
+
getProcess() {
|
|
200
|
+
return this.process;
|
|
201
|
+
}
|
|
202
|
+
getObservations() {
|
|
203
|
+
if (!this.observations) {
|
|
204
|
+
this.observations = new Observations(this);
|
|
205
|
+
}
|
|
206
|
+
this.observations.init();
|
|
207
|
+
return this.observations;
|
|
208
|
+
}
|
|
209
|
+
getCurrentTask() {
|
|
210
|
+
return new Task({ task: { name: "TODO" } });
|
|
211
|
+
}
|
|
212
|
+
get locked() {
|
|
213
|
+
return this.state.locked > 0;
|
|
214
|
+
}
|
|
215
|
+
lock() {
|
|
216
|
+
this.state.locked++;
|
|
217
|
+
let unlocked = false;
|
|
218
|
+
return () => {
|
|
219
|
+
if (!unlocked) {
|
|
220
|
+
unlocked = true;
|
|
221
|
+
this.state.locked--;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
async run(executionConfig) {
|
|
226
|
+
const unlock = this.lock();
|
|
227
|
+
try {
|
|
228
|
+
this._stepCount = noNaN(getWindow(this).STEP_QTY);
|
|
229
|
+
this._currentStep = noNaN(getWindow(this).CURRENT_STEP);
|
|
230
|
+
this.executionConfig = executionConfig;
|
|
231
|
+
this.environment.properties = {
|
|
232
|
+
taskName: getWindow(this).CURRENT_TASK_NAME || "",
|
|
233
|
+
processName: getWindow(this).CURRENT_PROCESS_NAME || ""
|
|
234
|
+
};
|
|
235
|
+
await this.entMutex.runExclusive(async () => {
|
|
236
|
+
if (!this.entity) {
|
|
237
|
+
this.entity = new Entity(this);
|
|
238
|
+
await this.entity.init();
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
await this.proMutex.runExclusive(async () => {
|
|
242
|
+
if (!this.process && !executionConfig.isEntity) {
|
|
243
|
+
this.process = new Process(this);
|
|
244
|
+
await this.process.init();
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
await this.obsMutex.runExclusive(async () => {
|
|
248
|
+
if (!this.observations) {
|
|
249
|
+
this.observations = new Observations(this);
|
|
250
|
+
await this.observations.init();
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
const errXML = unescapeMarkup(getWindow(this).EXEC_ERRORS ?? "");
|
|
254
|
+
if (errXML) {
|
|
255
|
+
const obj = parseXml(errXML);
|
|
256
|
+
arrayOrArray(obj.sysMessages?.message).forEach(
|
|
257
|
+
(c) => this.notifications.add(
|
|
258
|
+
new MessageNotification({
|
|
259
|
+
message: c.text,
|
|
260
|
+
title: c.title,
|
|
261
|
+
type: parseNotificationType(c.type)
|
|
262
|
+
})
|
|
263
|
+
)
|
|
264
|
+
);
|
|
265
|
+
[
|
|
266
|
+
...arrayOrArray(obj.exceptions?.exception),
|
|
267
|
+
...arrayOrArray(obj.sysExceptions?.exception)
|
|
268
|
+
].forEach(
|
|
269
|
+
(c) => this.notifications.add(
|
|
270
|
+
new MessageNotification({
|
|
271
|
+
message: c.text,
|
|
272
|
+
type: "error",
|
|
273
|
+
stackTrace: c.label
|
|
274
|
+
})
|
|
275
|
+
)
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
for (let i = 1; i < Number(getWindow(this).STEP_QTY) + 1; i++) {
|
|
279
|
+
if (i < this._currentStep) {
|
|
280
|
+
this._steps.push({
|
|
281
|
+
title: `${getLabel(this, "lblTraStep").text} ${i}`,
|
|
282
|
+
stepNumber: i,
|
|
283
|
+
status: "completed"
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
if (i > this._currentStep && i <= this._stepCount) {
|
|
287
|
+
this._steps.push({
|
|
288
|
+
title: `${getLabel(this, "lblTraStep").text} ${i}`,
|
|
289
|
+
stepNumber: i,
|
|
290
|
+
status: "pending"
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
if (i === this._currentStep) {
|
|
294
|
+
this._steps.push({
|
|
295
|
+
title: `${getLabel(this, "lblTraStep").text} ${i}`,
|
|
296
|
+
stepNumber: i,
|
|
297
|
+
status: "current"
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
const res = await InitialData.getFormsDefinition(this);
|
|
302
|
+
try {
|
|
303
|
+
for await (const formDefinition of res) {
|
|
304
|
+
const props = parseFakeJSON(formDefinition.properties);
|
|
305
|
+
if (!props.frmTab && !props.frmHidden && arrayOrArray(formDefinition.field).every(
|
|
306
|
+
(c) => !c.properties?.visibilityHidden
|
|
307
|
+
) && (arrayOrArray(formDefinition.field).length > 0 || arrayOrArray(formDefinition.customField).length > 0)) {
|
|
308
|
+
this.mustRenderForms.push(
|
|
309
|
+
formDefinition.frmParent + "_" + formDefinition.formName
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
for await (const formDefinition of res) {
|
|
314
|
+
const newForm = new Form(this, formDefinition);
|
|
315
|
+
await newForm.init();
|
|
316
|
+
if (formDefinition.frmParent === "E") {
|
|
317
|
+
this.forms.E.set(formDefinition.formName, newForm);
|
|
318
|
+
this.formsById.E.set(String(formDefinition.id), newForm);
|
|
319
|
+
} else {
|
|
320
|
+
this.forms.P.set(formDefinition.formName, newForm);
|
|
321
|
+
this.formsById.P.set(String(formDefinition.id), newForm);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
this.state.executionState = this.mustRenderForms.length === 0 ? ExecutionState.RUNNING : ExecutionState.RENDERING;
|
|
325
|
+
await this.fireEvents("onLoad");
|
|
326
|
+
this.executedOnLoadEvents = true;
|
|
327
|
+
if (this.mustRenderForms.length === 0 && this.state.executionState === ExecutionState.RENDERING) {
|
|
328
|
+
this.state.executionState = ExecutionState.RUNNING;
|
|
329
|
+
}
|
|
330
|
+
} catch (e) {
|
|
331
|
+
this.state.executionState = ExecutionState.FINISHED_WITH_ERROR;
|
|
332
|
+
throw e;
|
|
333
|
+
}
|
|
334
|
+
} finally {
|
|
335
|
+
unlock();
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
getHiddenForms() {
|
|
339
|
+
const hiddenForms = this.getAllForms().filter((form) => {
|
|
340
|
+
return form.properties.frmHidden;
|
|
341
|
+
});
|
|
342
|
+
return hiddenForms;
|
|
343
|
+
}
|
|
344
|
+
markFormAsRendered(frmParent, frmName) {
|
|
345
|
+
this.mustRenderForms = this.mustRenderForms.filter(
|
|
346
|
+
(c) => c !== frmParent + "_" + frmName
|
|
347
|
+
);
|
|
348
|
+
if (this.mustRenderForms.length === 0 && this.executedOnLoadEvents) {
|
|
349
|
+
this.state.executionState = ExecutionState.RUNNING;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
async delegate() {
|
|
353
|
+
console.warn("Delegate not implemented yet");
|
|
354
|
+
}
|
|
355
|
+
async shareSocial() {
|
|
356
|
+
console.warn("shareSocial not implemented yet");
|
|
357
|
+
}
|
|
358
|
+
sendToDesktop() {
|
|
359
|
+
this.emit("sendToDesktop", null);
|
|
360
|
+
}
|
|
361
|
+
async doBack() {
|
|
362
|
+
const canGoBack = this.executionConfig?.canGoBack;
|
|
363
|
+
if (canGoBack) {
|
|
364
|
+
const unlock = this.lock();
|
|
365
|
+
try {
|
|
366
|
+
const nextUrl = makeApiaUrl(this, {
|
|
367
|
+
action: "gotoPrevStep",
|
|
368
|
+
asXML: true,
|
|
369
|
+
react: true,
|
|
370
|
+
currentTab: getCurrentTabsString(this),
|
|
371
|
+
fromPanel: null
|
|
372
|
+
});
|
|
373
|
+
const serverParams = {
|
|
374
|
+
...this.process.getConfirmParams(),
|
|
375
|
+
...this.observations.getConfirmParams()
|
|
376
|
+
};
|
|
377
|
+
postNavigation(nextUrl, serverParams);
|
|
378
|
+
} catch (error) {
|
|
379
|
+
unlock();
|
|
380
|
+
console.error("Confirmation process failed:", error);
|
|
381
|
+
this.notifications.add(
|
|
382
|
+
new MessageNotification({
|
|
383
|
+
type: "error",
|
|
384
|
+
message: labels.errorConfirmationFailed()
|
|
385
|
+
})
|
|
386
|
+
);
|
|
387
|
+
return false;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
async doConfirm(status) {
|
|
392
|
+
if (status && !status?.step && !status?.finishedWithError) {
|
|
393
|
+
return false;
|
|
394
|
+
} else {
|
|
395
|
+
const validationResult = status !== void 0 || await this.validate();
|
|
396
|
+
if (validationResult !== true) {
|
|
397
|
+
return validationResult;
|
|
398
|
+
}
|
|
399
|
+
if (this.executionConfig?.isEntity && !this.entity.validateAssociations()) {
|
|
400
|
+
return false;
|
|
401
|
+
}
|
|
402
|
+
const isValid = status !== void 0 || await this.fireEvents("onSubmit");
|
|
403
|
+
const canConfirm = this.executionConfig?.canConfirm && isValid === true;
|
|
404
|
+
if (canConfirm) {
|
|
405
|
+
const unlock = this.lock();
|
|
406
|
+
try {
|
|
407
|
+
const result = await (this.executionConfig?.isEntity ? confirmEntity : confirm)(
|
|
408
|
+
this,
|
|
409
|
+
status || {
|
|
410
|
+
step: "CHECK_LOCK"
|
|
411
|
+
}
|
|
412
|
+
);
|
|
413
|
+
if (result instanceof FlowModal) {
|
|
414
|
+
if (!(result instanceof ShowConfirmMessage)) {
|
|
415
|
+
unlock();
|
|
416
|
+
}
|
|
417
|
+
return result;
|
|
418
|
+
}
|
|
419
|
+
unlock();
|
|
420
|
+
return result;
|
|
421
|
+
} catch (error) {
|
|
422
|
+
unlock();
|
|
423
|
+
console.error("Confirmation process failed:", error);
|
|
424
|
+
this.notifications.add(
|
|
425
|
+
new MessageNotification({
|
|
426
|
+
type: "error",
|
|
427
|
+
message: labels.errorConfirmationFailed()
|
|
428
|
+
})
|
|
429
|
+
);
|
|
430
|
+
return false;
|
|
431
|
+
}
|
|
432
|
+
} else {
|
|
433
|
+
return isValid;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
async doFree() {
|
|
438
|
+
const serverParams = {
|
|
439
|
+
...this.entity.getConfirmParams(),
|
|
440
|
+
...this.process.getConfirmParams(),
|
|
441
|
+
...this.observations.getConfirmParams(),
|
|
442
|
+
...Captcha.getConfirmParams()
|
|
443
|
+
};
|
|
444
|
+
const data = await post(
|
|
445
|
+
this,
|
|
446
|
+
makeApiaUrl(this, {
|
|
447
|
+
action: "release",
|
|
448
|
+
currentTab: getCurrentTabsString(this)
|
|
449
|
+
}),
|
|
450
|
+
{
|
|
451
|
+
postData: serverParams,
|
|
452
|
+
postDataTreatment: "stringify",
|
|
453
|
+
stringifyOptions: {
|
|
454
|
+
arrayFormat: "repeat"
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
if (data?.data?.text) {
|
|
459
|
+
this.state.executionState = ExecutionState.FINISHED;
|
|
460
|
+
}
|
|
461
|
+
return data;
|
|
462
|
+
}
|
|
463
|
+
async doNext(result) {
|
|
464
|
+
const isValid = await this.validate();
|
|
465
|
+
if (isValid === true) {
|
|
466
|
+
if (!await this.fireEvents("onSubmit")) {
|
|
467
|
+
return false;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
if (isValid !== true)
|
|
471
|
+
return isValid;
|
|
472
|
+
const canGoNext = this.executionConfig?.canGoForward && isValid === true;
|
|
473
|
+
if (canGoNext) {
|
|
474
|
+
const unlock = this.lock();
|
|
475
|
+
if (result?.confirmed === false) {
|
|
476
|
+
unlock();
|
|
477
|
+
}
|
|
478
|
+
try {
|
|
479
|
+
const checkLocksRes = await post(
|
|
480
|
+
this,
|
|
481
|
+
makeApiaUrl(this, {
|
|
482
|
+
action: "checkWebDavDocumentsLocks",
|
|
483
|
+
isAjax: true
|
|
484
|
+
}),
|
|
485
|
+
{
|
|
486
|
+
postDataTreatment: "stringify",
|
|
487
|
+
stringifyOptions: {
|
|
488
|
+
arrayFormat: "repeat"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
);
|
|
492
|
+
if (checkLocksRes?.data?.actions?.action?.param[1] !== "successWebDavLockFunction") {
|
|
493
|
+
throw new Error("Failed to check WebDAV document locks.");
|
|
494
|
+
}
|
|
495
|
+
const checkSignableFormsRes = await post(
|
|
496
|
+
this,
|
|
497
|
+
makeApiaUrl(this, {
|
|
498
|
+
action: "hasSignableForms",
|
|
499
|
+
isAjax: true,
|
|
500
|
+
appletToken: getWindow(this).appletToken
|
|
501
|
+
}),
|
|
502
|
+
{
|
|
503
|
+
postDataTreatment: "stringify",
|
|
504
|
+
stringifyOptions: {
|
|
505
|
+
arrayFormat: "repeat"
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
);
|
|
509
|
+
if (checkSignableFormsRes?.status !== 200) {
|
|
510
|
+
throw new Error("No signable forms available.");
|
|
511
|
+
}
|
|
512
|
+
const mustShowSignModal = checkSignableFormsRes?.data?.sign;
|
|
513
|
+
if (mustShowSignModal && !result?.signed) {
|
|
514
|
+
unlock();
|
|
515
|
+
return new ShowSignSelection(
|
|
516
|
+
checkSignableFormsRes?.data,
|
|
517
|
+
async () => {
|
|
518
|
+
return "";
|
|
519
|
+
}
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
if (mustShowSignModal && (!result?.confirmed || !result?.signed))
|
|
523
|
+
return;
|
|
524
|
+
const nextUrl = makeApiaUrl(this, {
|
|
525
|
+
action: "gotoNextStep",
|
|
526
|
+
asXML: true,
|
|
527
|
+
react: true,
|
|
528
|
+
currentTab: getCurrentTabsString(this, true),
|
|
529
|
+
fromPanel: null
|
|
530
|
+
});
|
|
531
|
+
const serverParams = {
|
|
532
|
+
...this.entity.getConfirmParams(),
|
|
533
|
+
...this.process.getConfirmParams(),
|
|
534
|
+
...this.observations.getConfirmParams(),
|
|
535
|
+
...Captcha.getConfirmParams()
|
|
536
|
+
};
|
|
537
|
+
postNavigation(nextUrl, serverParams);
|
|
538
|
+
return true;
|
|
539
|
+
} catch (error) {
|
|
540
|
+
unlock();
|
|
541
|
+
console.error("Confirmation process failed:", error);
|
|
542
|
+
this.notifications.add(
|
|
543
|
+
new MessageNotification({
|
|
544
|
+
type: "error",
|
|
545
|
+
message: labels.errorConfirmationFailed()
|
|
546
|
+
})
|
|
547
|
+
);
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
async doPrint() {
|
|
553
|
+
getWindow(this).print();
|
|
554
|
+
}
|
|
555
|
+
async doSave() {
|
|
556
|
+
const unlock = this.lock();
|
|
557
|
+
try {
|
|
558
|
+
const response = await post(
|
|
559
|
+
this,
|
|
560
|
+
makeApiaUrl(this, {
|
|
561
|
+
action: "saveTask",
|
|
562
|
+
asXML: true,
|
|
563
|
+
react: true,
|
|
564
|
+
currentTab: getCurrentTabsString(this)
|
|
565
|
+
}),
|
|
566
|
+
{
|
|
567
|
+
postData: {
|
|
568
|
+
...this.observations.getConfirmParams(),
|
|
569
|
+
...this.process.getConfirmParams()
|
|
570
|
+
},
|
|
571
|
+
postDataTreatment: "stringify",
|
|
572
|
+
stringifyOptions: {
|
|
573
|
+
arrayFormat: "repeat"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
);
|
|
577
|
+
const canClose = response?.data?.load?.canClose;
|
|
578
|
+
if (canClose) {
|
|
579
|
+
return response;
|
|
580
|
+
}
|
|
581
|
+
} finally {
|
|
582
|
+
unlock();
|
|
583
|
+
}
|
|
584
|
+
return false;
|
|
585
|
+
}
|
|
586
|
+
getStepTitle(step) {
|
|
587
|
+
if (this._steps)
|
|
588
|
+
return this._steps[step];
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Ends the current session
|
|
592
|
+
*/
|
|
593
|
+
kill() {
|
|
594
|
+
frameElement?.handleDeadSession?.();
|
|
595
|
+
this.state.executionState = ExecutionState.FINISHED;
|
|
596
|
+
this.notifications.kill();
|
|
597
|
+
}
|
|
598
|
+
async viewDocs() {
|
|
599
|
+
const url = `${getWindow(this).CONTEXT}/react/generic/docExecutionModal.jsp?isProcessMonitor=${getWindow(this).IN_MONITOR_PROCESS ?? "false"}&isTaskMonitor=${getWindow(this).IN_MONITOR_TASK ?? "false"}&isTask=true${getWindow(this).TAB_ID_REQUEST}&react=true`;
|
|
600
|
+
const result = await get(this, url);
|
|
601
|
+
if (result && result.data !== null) {
|
|
602
|
+
const { data } = result;
|
|
603
|
+
return data;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
setStepTitle(stepNumber, stepTitle) {
|
|
607
|
+
if (this._steps && this._steps[stepNumber - 1])
|
|
608
|
+
this._steps[stepNumber - 1].title = stepTitle;
|
|
609
|
+
}
|
|
610
|
+
async validate() {
|
|
611
|
+
let firstInvalid = null;
|
|
612
|
+
for await (const [, c] of this.forms.E) {
|
|
613
|
+
const result = await c.validate();
|
|
614
|
+
if (result !== true && !firstInvalid) {
|
|
615
|
+
firstInvalid = result;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
for await (const [, c] of this.forms.P) {
|
|
619
|
+
const result = await c.validate();
|
|
620
|
+
if (result !== true && !firstInvalid) {
|
|
621
|
+
firstInvalid = result;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
return firstInvalid ?? true;
|
|
625
|
+
}
|
|
626
|
+
setLastModalReturn(value) {
|
|
627
|
+
this.lastModalReturn = value;
|
|
628
|
+
}
|
|
629
|
+
getLastModalReturn() {
|
|
630
|
+
return this.lastModalReturn;
|
|
631
|
+
}
|
|
632
|
+
async fireEvents(evt) {
|
|
633
|
+
const unlock = this.lock();
|
|
634
|
+
let result = true;
|
|
635
|
+
try {
|
|
636
|
+
for await (const f of this.forms.E.values()) {
|
|
637
|
+
result = result && await f.fireScriptEvent(evt);
|
|
638
|
+
if (!result) {
|
|
639
|
+
return false;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
for await (const f of this.forms.P.values()) {
|
|
643
|
+
result = result && await f.fireScriptEvent(evt);
|
|
644
|
+
if (!result) {
|
|
645
|
+
return false;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
return true;
|
|
649
|
+
} finally {
|
|
650
|
+
unlock();
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
async waitForPendingSyncs() {
|
|
654
|
+
if (this._pendingPromises.size === 0)
|
|
655
|
+
return;
|
|
656
|
+
const pending = Array.from(this._pendingPromises);
|
|
657
|
+
await Promise.allSettled(pending);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export { Execution, parseNotificationType, unescapeMarkup };
|
|
662
|
+
//# sourceMappingURL=index.js.map
|