@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,156 @@
|
|
|
1
|
+
import { Scheduler } from '@apia/scheduler-controller';
|
|
2
|
+
import { Field } from '../../Field.js';
|
|
3
|
+
import { getWindow } from '../../../../../util/dom/getWindow.js';
|
|
4
|
+
import dayjs from 'dayjs';
|
|
5
|
+
import { getDateFormat } from '@apia/util';
|
|
6
|
+
import { get, makeApiaUrl, post } from '../../../../../util/api/apiaApi.js';
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __publicField = (obj, key, value) => {
|
|
11
|
+
__defNormalProp(obj, key + "" , value);
|
|
12
|
+
return value;
|
|
13
|
+
};
|
|
14
|
+
class SchedulerField extends Field {
|
|
15
|
+
constructor(definition) {
|
|
16
|
+
super(definition);
|
|
17
|
+
__publicField(this, "_schedController");
|
|
18
|
+
}
|
|
19
|
+
async deleteDate() {
|
|
20
|
+
const res = await get(
|
|
21
|
+
this.form.execution,
|
|
22
|
+
makeApiaUrl(this.form.execution, {
|
|
23
|
+
ajaxUrl: "/apia.design.TaskSchedulerAction.run",
|
|
24
|
+
action: "clearExecutionSchedulerSelectedDay"
|
|
25
|
+
})
|
|
26
|
+
);
|
|
27
|
+
if (res?.data?.success) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
get parsedInitialProperties() {
|
|
33
|
+
const value = String(this.properties.value);
|
|
34
|
+
let start = 0;
|
|
35
|
+
let end = 0;
|
|
36
|
+
start = value?.indexOf("loadSchedExec");
|
|
37
|
+
start += 14;
|
|
38
|
+
end = value?.indexOf(";</div>");
|
|
39
|
+
end -= 1;
|
|
40
|
+
const strParts = value?.slice(start, end).replaceAll(`'`, ``).replaceAll(" ", "");
|
|
41
|
+
const arrParts = strParts.split(",");
|
|
42
|
+
return {
|
|
43
|
+
schId: arrParts[1],
|
|
44
|
+
proId: arrParts[2],
|
|
45
|
+
proVerId: arrParts[3],
|
|
46
|
+
tskId: arrParts[4],
|
|
47
|
+
showDisponibility: arrParts[5],
|
|
48
|
+
showAttributes: arrParts[6]
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
async init(form) {
|
|
52
|
+
await super.init(form);
|
|
53
|
+
this._schedController = new Scheduler(
|
|
54
|
+
this.parsedInitialProperties,
|
|
55
|
+
{
|
|
56
|
+
loadWeek: this.loadWeek.bind(this),
|
|
57
|
+
deleteDate: this.deleteDate.bind(this),
|
|
58
|
+
markDay: this.markDay.bind(this),
|
|
59
|
+
loadInfo: this.loadInfo.bind(this),
|
|
60
|
+
selectDayHandler: this.selectDayHandler.bind(this)
|
|
61
|
+
},
|
|
62
|
+
"Scheduler",
|
|
63
|
+
getWindow(this.getForm().execution)
|
|
64
|
+
);
|
|
65
|
+
if (this._schedController)
|
|
66
|
+
this._schedController.loadWeek();
|
|
67
|
+
}
|
|
68
|
+
async loadWeek(weekDay, schId, proId, proVerId, tskId) {
|
|
69
|
+
const res = await get(
|
|
70
|
+
this.form.execution,
|
|
71
|
+
makeApiaUrl(this.form.execution, {
|
|
72
|
+
ajaxUrl: "/apia.design.TaskSchedulerAction.run",
|
|
73
|
+
action: "getExecutionSchedulerWeek",
|
|
74
|
+
weekDay,
|
|
75
|
+
schId,
|
|
76
|
+
proId,
|
|
77
|
+
proVerId,
|
|
78
|
+
tskId
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
return res?.data ?? null;
|
|
82
|
+
}
|
|
83
|
+
async loadInfo(schId, weekDay, dayNumber, hour) {
|
|
84
|
+
const res = await post(
|
|
85
|
+
this.form.execution,
|
|
86
|
+
makeApiaUrl(this.form.execution, {
|
|
87
|
+
ajaxUrl: "/apia.design.TaskSchedulerAction.run",
|
|
88
|
+
action: "getExecutionSchedulerDayInfo",
|
|
89
|
+
schId,
|
|
90
|
+
weekDay,
|
|
91
|
+
dayNumber,
|
|
92
|
+
hour
|
|
93
|
+
})
|
|
94
|
+
);
|
|
95
|
+
return res?.data?.pro_instances?.pro_instance ?? [];
|
|
96
|
+
}
|
|
97
|
+
async markDay(weekDay, hour, dayNumber) {
|
|
98
|
+
await get(
|
|
99
|
+
this.form.execution,
|
|
100
|
+
makeApiaUrl(this.form.execution, {
|
|
101
|
+
ajaxUrl: "/apia.design.TaskSchedulerAction.run",
|
|
102
|
+
action: "setExecutionSchedulerSelectedDay",
|
|
103
|
+
weekDay,
|
|
104
|
+
hour,
|
|
105
|
+
dayNumber
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
async selectDayHandler({
|
|
110
|
+
cellId,
|
|
111
|
+
currentDayDefinition,
|
|
112
|
+
dayNumber,
|
|
113
|
+
hour,
|
|
114
|
+
weekDay
|
|
115
|
+
}) {
|
|
116
|
+
await get(
|
|
117
|
+
this.form.execution,
|
|
118
|
+
makeApiaUrl(this.form.execution, {
|
|
119
|
+
ajaxUrl: "/apia.design.TaskSchedulerAction.run",
|
|
120
|
+
action: "setExecutionSchedulerSelectedDay",
|
|
121
|
+
weekDay,
|
|
122
|
+
hour,
|
|
123
|
+
dayNumber
|
|
124
|
+
})
|
|
125
|
+
).then((response) => {
|
|
126
|
+
if (response?.data?.success) {
|
|
127
|
+
this._schedController?.setState({
|
|
128
|
+
...this._schedController.state,
|
|
129
|
+
selectedCell: cellId,
|
|
130
|
+
selectedDay: {
|
|
131
|
+
hour: String(hour),
|
|
132
|
+
day: dayjs(weekDay, getDateFormat()).add(Number(dayNumber) - 1, "day").format(getDateFormat()),
|
|
133
|
+
mondayWeek: String(
|
|
134
|
+
dayjs(weekDay, getDateFormat()).format(getDateFormat())
|
|
135
|
+
),
|
|
136
|
+
dayNumber: Number(dayNumber),
|
|
137
|
+
morningOrAfternoonSelected: Number(hour)
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
if (currentDayDefinition) {
|
|
141
|
+
this._schedController?.syncStage(
|
|
142
|
+
currentDayDefinition,
|
|
143
|
+
Number(hour)
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}).catch(() => {
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
get schedController() {
|
|
151
|
+
return this._schedController;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export { SchedulerField };
|
|
156
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/main/Execution/FormsExecution/fields/Scheduler/index.ts"],"sourcesContent":["import {\r\n Scheduler,\r\n TScheduleResult,\r\n TSchInfoResult,\r\n TTskSchDay,\r\n} from '@apia/scheduler-controller';\r\nimport { TApiaSchedulerProperties } from '../../../../InitialData/types/fields/TApiaFieldProperties';\r\nimport { TApiaFieldBaseDefinition } from '../../../../InitialData/types/TApiaField';\r\nimport { Field } from '../../Field';\r\nimport { Form } from '../../Form';\r\nimport { get, makeApiaUrl, post } from '../../../../../util';\r\nimport { getWindow } from '../../../../../util/dom/getWindow';\r\nimport dayjs from 'dayjs';\r\nimport { getDateFormat } from '@apia/util';\r\n\r\nexport class SchedulerField extends Field<TApiaSchedulerProperties> {\r\n private _schedController: Scheduler | undefined = undefined;\r\n constructor(definition: TApiaFieldBaseDefinition<TApiaSchedulerProperties>) {\r\n super(definition);\r\n }\r\n\r\n async deleteDate() {\r\n const res = await get<TScheduleResult>(\r\n this.form.execution,\r\n makeApiaUrl(this.form.execution, {\r\n ajaxUrl: '/apia.design.TaskSchedulerAction.run',\r\n action: 'clearExecutionSchedulerSelectedDay',\r\n }),\r\n );\r\n\r\n if (res?.data?.success) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n get parsedInitialProperties() {\r\n const value = String(this.properties.value);\r\n let start = 0;\r\n let end = 0;\r\n start = value?.indexOf('loadSchedExec');\r\n start += 14;\r\n\r\n end = value?.indexOf(';</div>');\r\n end -= 1;\r\n\r\n const strParts = value\r\n ?.slice(start, end)\r\n .replaceAll(`'`, ``)\r\n .replaceAll(' ', '');\r\n const arrParts = strParts.split(',');\r\n\r\n return {\r\n schId: arrParts[1],\r\n proId: arrParts[2],\r\n proVerId: arrParts[3],\r\n tskId: arrParts[4],\r\n showDisponibility: arrParts[5],\r\n showAttributes: arrParts[6],\r\n };\r\n }\r\n\r\n async init(form: Form): Promise<void> {\r\n await super.init(form);\r\n this._schedController = new Scheduler(\r\n this.parsedInitialProperties,\r\n {\r\n loadWeek: this.loadWeek.bind(this),\r\n deleteDate: this.deleteDate.bind(this),\r\n markDay: this.markDay.bind(this),\r\n loadInfo: this.loadInfo.bind(this),\r\n selectDayHandler: this.selectDayHandler.bind(this),\r\n },\r\n 'Scheduler',\r\n getWindow(this.getForm().execution),\r\n );\r\n if (this._schedController) this._schedController.loadWeek();\r\n }\r\n\r\n async loadWeek(\r\n weekDay: string,\r\n schId: string,\r\n proId: string,\r\n proVerId: string,\r\n tskId: string,\r\n ) {\r\n const res = await get<TScheduleResult>(\r\n this.form.execution,\r\n makeApiaUrl(this.form.execution, {\r\n ajaxUrl: '/apia.design.TaskSchedulerAction.run',\r\n action: 'getExecutionSchedulerWeek',\r\n weekDay,\r\n schId,\r\n proId,\r\n proVerId,\r\n tskId,\r\n }),\r\n );\r\n return res?.data ?? null;\r\n }\r\n\r\n async loadInfo(\r\n schId: string,\r\n weekDay: string,\r\n dayNumber: number,\r\n hour: string,\r\n ) {\r\n const res = await post<TSchInfoResult>(\r\n this.form.execution,\r\n makeApiaUrl(this.form.execution, {\r\n ajaxUrl: '/apia.design.TaskSchedulerAction.run',\r\n action: 'getExecutionSchedulerDayInfo',\r\n schId,\r\n weekDay,\r\n dayNumber,\r\n hour,\r\n }),\r\n );\r\n return res?.data?.pro_instances?.pro_instance ?? [];\r\n }\r\n\r\n async markDay(weekDay: string, hour: string, dayNumber: number) {\r\n await get<TScheduleResult>(\r\n this.form.execution,\r\n makeApiaUrl(this.form.execution, {\r\n ajaxUrl: '/apia.design.TaskSchedulerAction.run',\r\n action: 'setExecutionSchedulerSelectedDay',\r\n weekDay,\r\n hour,\r\n dayNumber,\r\n }),\r\n );\r\n }\r\n async selectDayHandler({\r\n cellId,\r\n currentDayDefinition,\r\n dayNumber,\r\n hour,\r\n weekDay,\r\n }: {\r\n cellId: string;\r\n weekDay: string;\r\n dayNumber: number;\r\n hour: string;\r\n currentDayDefinition: TTskSchDay;\r\n }) {\r\n await get<TScheduleResult>(\r\n this.form.execution,\r\n makeApiaUrl(this.form.execution, {\r\n ajaxUrl: '/apia.design.TaskSchedulerAction.run',\r\n action: 'setExecutionSchedulerSelectedDay',\r\n weekDay,\r\n hour,\r\n dayNumber,\r\n }),\r\n )\r\n .then((response) => {\r\n if (response?.data?.success) {\r\n this._schedController?.setState({\r\n ...this._schedController.state,\r\n selectedCell: cellId,\r\n selectedDay: {\r\n hour: String(hour),\r\n day: dayjs(weekDay, getDateFormat())\r\n .add(Number(dayNumber) - 1, 'day')\r\n .format(getDateFormat()),\r\n mondayWeek: String(\r\n dayjs(weekDay, getDateFormat()).format(getDateFormat()),\r\n ),\r\n dayNumber: Number(dayNumber),\r\n morningOrAfternoonSelected: Number(hour),\r\n },\r\n });\r\n if (currentDayDefinition) {\r\n this._schedController?.syncStage(\r\n currentDayDefinition,\r\n Number(hour),\r\n );\r\n }\r\n }\r\n })\r\n .catch(() => {});\r\n }\r\n\r\n get schedController() {\r\n return this._schedController;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;AAeO,MAAM,uBAAuB,KAAA,CAAgC;AAAA,EAElE,YAAY,UAAA,EAAgE;AAC1E,IAAA,KAAA,CAAM,UAAU,CAAA;AAFlB,IAAA,aAAA,CAAA,IAAA,EAAQ,kBAAA,CAAA;AAAA;AAGR,EAEA,MAAM,UAAA,GAAa;AACjB,IAAA,MAAM,MAAM,MAAM,GAAA;AAAA,MAChB,KAAK,IAAA,CAAK,SAAA;AAAA,MACV,WAAA,CAAY,IAAA,CAAK,IAAA,CAAK,SAAA,EAAW;AAAA,QAC/B,OAAA,EAAS,sCAAA;AAAA,QACT,MAAA,EAAQ;AAAA,OACT;AAAA,KACH;AAEA,IAAA,IAAI,GAAA,EAAK,MAAM,OAAA,EAAS;AACtB,MAAA,OAAO,IAAA;AAAA;AAET,IAAA,OAAO,KAAA;AAAA;AACT,EAEA,IAAI,uBAAA,GAA0B;AAC5B,IAAA,MAAM,KAAA,GAAQ,MAAA,CAAO,IAAA,CAAK,UAAA,CAAW,KAAK,CAAA;AAC1C,IAAA,IAAI,KAAA,GAAQ,CAAA;AACZ,IAAA,IAAI,GAAA,GAAM,CAAA;AACV,IAAA,KAAA,GAAQ,KAAA,EAAO,QAAQ,eAAe,CAAA;AACtC,IAAA,KAAA,IAAS,EAAA;AAET,IAAA,GAAA,GAAM,KAAA,EAAO,QAAQ,SAAS,CAAA;AAC9B,IAAA,GAAA,IAAO,CAAA;AAEP,IAAA,MAAM,QAAA,GAAW,KAAA,EACb,KAAA,CAAM,KAAA,EAAO,GAAG,CAAA,CACjB,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{ TApiaSelectProperties } from '../../../../InitialData/types/fields/TApiaFieldProperties.js';
|
|
2
|
+
import { TApiaSelectDefinition } from '../../../../InitialData/types/fields/TApiaSelectDefinition.js';
|
|
3
|
+
import { TApiaFieldWithAttributeBaseProps } from '../../../../InitialData/types/TApiaField.js';
|
|
4
|
+
import { FieldWithAttribute } from '../../FieldWithAttribute.js';
|
|
5
|
+
import { IApiaApiPostConfig } from '../../../../../util/api/types.js';
|
|
6
|
+
|
|
7
|
+
declare class Select extends FieldWithAttribute<TApiaSelectProperties, string, TApiaSelectDefinition> {
|
|
8
|
+
constructor({ possibleValue, ...definition }: TApiaSelectDefinition);
|
|
9
|
+
protected getInitialValue({ properties: { possibleValue }, }: TApiaFieldWithAttributeBaseProps<TApiaSelectProperties>): Promise<string>;
|
|
10
|
+
protected getSynchronizePostConfiguration(value: any): IApiaApiPostConfig<any>;
|
|
11
|
+
getTextValue(value: any): any;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { Select };
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { arrayOrArray } from '@apia/util';
|
|
2
|
+
import { FieldWithAttribute } from '../../FieldWithAttribute.js';
|
|
3
|
+
|
|
4
|
+
class Select extends FieldWithAttribute {
|
|
5
|
+
constructor({ possibleValue, ...definition }) {
|
|
6
|
+
super({
|
|
7
|
+
...definition,
|
|
8
|
+
properties: {
|
|
9
|
+
...definition.properties,
|
|
10
|
+
possibleValue: arrayOrArray(possibleValue)
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
getInitialValue({
|
|
15
|
+
properties: { possibleValue }
|
|
16
|
+
}) {
|
|
17
|
+
return Promise.resolve(
|
|
18
|
+
String(
|
|
19
|
+
this.state.value !== "" ? this.state.value : possibleValue?.find((c) => c.selected)?.value ?? (possibleValue?.[0]?.value || "")
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
getSynchronizePostConfiguration(value) {
|
|
24
|
+
const conf = super.getSynchronizePostConfiguration(String(value));
|
|
25
|
+
return conf;
|
|
26
|
+
}
|
|
27
|
+
getTextValue(value) {
|
|
28
|
+
return this.properties.possibleValue ? arrayOrArray(this.properties.possibleValue).find(
|
|
29
|
+
(c) => c.value === value
|
|
30
|
+
)?.label : value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { Select };
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/main/Execution/FormsExecution/fields/Select/index.ts"],"sourcesContent":["import { arrayOrArray } from '@apia/util';\r\nimport { TApiaSelectProperties } from '../../../../InitialData/types/fields/TApiaFieldProperties';\r\nimport { TApiaSelectDefinition } from '../../../../InitialData/types/fields/TApiaSelectDefinition';\r\nimport { TApiaFieldWithAttributeBaseProps } from '../../../../InitialData/types/TApiaField';\r\nimport { FieldWithAttribute } from '../../FieldWithAttribute';\r\nimport { IApiaApiPostConfig } from '../../../../../util/api/types';\r\n\r\nexport class Select extends FieldWithAttribute<\r\n TApiaSelectProperties,\r\n string,\r\n TApiaSelectDefinition\r\n> {\r\n constructor({ possibleValue, ...definition }: TApiaSelectDefinition) {\r\n super({\r\n ...definition,\r\n properties: {\r\n ...definition.properties,\r\n possibleValue: arrayOrArray(possibleValue),\r\n },\r\n });\r\n }\r\n\r\n protected getInitialValue({\r\n properties: { possibleValue },\r\n }: TApiaFieldWithAttributeBaseProps<TApiaSelectProperties>): Promise<string> {\r\n return Promise.resolve(\r\n String(\r\n this.state.value !== ''\r\n ? this.state.value\r\n : (possibleValue?.find((c) => c.selected)?.value ??\r\n (possibleValue?.[0]?.value || '')),\r\n ),\r\n );\r\n }\r\n\r\n protected getSynchronizePostConfiguration(\r\n value: any,\r\n ): IApiaApiPostConfig<any> {\r\n const conf = super.getSynchronizePostConfiguration(String(value));\r\n return conf;\r\n }\r\n\r\n public getTextValue(value: any) {\r\n return this.properties.possibleValue\r\n ? arrayOrArray(this.properties.possibleValue).find(\r\n (c) => c.value === value,\r\n )?.label\r\n : value;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAOO,MAAM,eAAe,kBAAA,CAI1B;AAAA,EACA,WAAA,CAAY,EAAE,aAAA,EAAe,GAAG,YAAW,EAA0B;AACnE,IAAA,KAAA,CAAM;AAAA,MACJ,GAAG,UAAA;AAAA,MACH,UAAA,EAAY;AAAA,QACV,GAAG,UAAA,CAAW,UAAA;AAAA,QACd,aAAA,EAAe,aAAa,aAAa;AAAA;AAC3C,KACD,CAAA;AAAA;AACH,EAEU,eAAA,CAAgB;AAAA,IACxB,UAAA,EAAY,EAAE,aAAA;AAAc,GAC9B,EAA6E;AAC3E,IAAA,OAAO,OAAA,CAAQ,OAAA;AAAA,MACb,MAAA;AAAA,QACE,KAAK,KAAA,CAAM,KAAA,KAAU,KACjB,IAAA,CAAK,KAAA,CAAM,QACV,aAAA,EAAe,IAAA,CAAK,CAAC,CAAA,KAAM,EAAE,QAAQ,CAAA,EAAG,UACtC,aAAA,GAAgB,CAAC,GAAG,KAAA,IAAS,EAAA;AAAA;AACtC,KACF;AAAA;AACF,EAEU,gCACR,KAAA,EACyB;AACzB,IAAA,MAAM,IAAA,GAAO,KAAA,CAAM,+BAAA,CAAgC,MAAA,CAAO,KAAK,CAAC,CAAA;AAChE,IAAA,OAAO,IAAA;AAAA;AACT,EAEO,aAAa,KAAA,EAAY;AAC9B,IAAA,OAAO,KAAK,UAAA,CAAW,aAAA,GACnB,aAAa,IAAA,CAAK,UAAA,CAAW,aAAa,CAAA,CAAE,IAAA;AAAA,MAC1C,CAAC,CAAA,KAAM,CAAA,CAAE,KAAA,KAAU;AAAA,OAClB,KAAA,GACH,KAAA;AAAA;AAER;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IApiaApiPostConfig } from '../../../../../util/api/types.js';
|
|
2
|
+
import { TApiaTextareaProperties } from '../../../../InitialData/types/fields/TApiaFieldProperties.js';
|
|
3
|
+
import { TranslatableField } from '../../TranslatableField/index.js';
|
|
4
|
+
|
|
5
|
+
declare class Textarea extends TranslatableField<TApiaTextareaProperties, string> {
|
|
6
|
+
protected isValidValue(): boolean;
|
|
7
|
+
protected getSynchronizePostConfiguration(value: string): IApiaApiPostConfig<any>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { Textarea };
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TranslatableField } from '../../TranslatableField/index.js';
|
|
2
|
+
|
|
3
|
+
class Textarea extends TranslatableField {
|
|
4
|
+
isValidValue() {
|
|
5
|
+
return !!String(this.getValue()).trim();
|
|
6
|
+
}
|
|
7
|
+
getSynchronizePostConfiguration(value) {
|
|
8
|
+
const conf = super.getSynchronizePostConfiguration(value);
|
|
9
|
+
conf.postData.clearValues = "true";
|
|
10
|
+
return conf;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { Textarea };
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/main/Execution/FormsExecution/fields/Textarea/index.ts"],"sourcesContent":["import { IApiaApiPostConfig } from '../../../../../util/api/types';\r\nimport { TApiaTextareaProperties } from '../../../../InitialData/types/fields/TApiaFieldProperties';\r\nimport { TranslatableField } from '../../TranslatableField';\r\n\r\nexport class Textarea extends TranslatableField<\r\n TApiaTextareaProperties,\r\n string\r\n> {\r\n protected isValidValue(): boolean {\r\n return !!String(this.getValue()).trim();\r\n }\r\n\r\n protected getSynchronizePostConfiguration(\r\n value: string,\r\n ): IApiaApiPostConfig<any> {\r\n const conf = super.getSynchronizePostConfiguration(value);\r\n conf.postData!.clearValues = 'true';\r\n return conf;\r\n }\r\n}\r\n"],"names":[],"mappings":";;AAIO,MAAM,iBAAiB,iBAAA,CAG5B;AAAA,EACU,YAAA,GAAwB;AAChC,IAAA,OAAO,CAAC,CAAC,MAAA,CAAO,KAAK,QAAA,EAAU,EAAE,IAAA,EAAK;AAAA;AACxC,EAEU,gCACR,KAAA,EACyB;AACzB,IAAA,MAAM,IAAA,GAAO,KAAA,CAAM,+BAAA,CAAgC,KAAK,CAAA;AACxD,IAAA,IAAA,CAAK,SAAU,WAAA,GAAc,MAAA;AAC7B,IAAA,OAAO,IAAA;AAAA;AAEX;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TApiaTitleProperties } from '../../../../InitialData/types/fields/TApiaFieldProperties.js';
|
|
2
|
+
import { Field } from '../../Field.js';
|
|
3
|
+
|
|
4
|
+
declare class Title extends Field<TApiaTitleProperties> {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { Title };
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/main/Execution/FormsExecution/fields/Title/index.ts"],"sourcesContent":["import { TApiaTitleProperties } from '../../../../InitialData/types/fields/TApiaFieldProperties';\r\nimport { Field } from '../../Field';\r\n\r\nexport class Title extends Field<TApiaTitleProperties> {}\r\n"],"names":[],"mappings":";;AAGO,MAAM,cAAc,KAAA,CAA4B;AAAC;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IApiaApiPostConfig } from '../../../../../util/api/types.js';
|
|
2
|
+
import { TApiaTreeProperties } from '../../../../InitialData/types/fields/TApiaFieldProperties.js';
|
|
3
|
+
import { TApiaTreeDefinition } from '../../../../InitialData/types/fields/TApiaTreeDefinition.js';
|
|
4
|
+
import { FieldWithAttribute, TFireEventOptions } from '../../FieldWithAttribute.js';
|
|
5
|
+
import { MobXTree } from '@apia/tree2-controller';
|
|
6
|
+
import { Form } from '../../Form.js';
|
|
7
|
+
import { Comparator } from '../../../../../util/comparators/shallowEqual.js';
|
|
8
|
+
|
|
9
|
+
type TTreeValue = string | number;
|
|
10
|
+
type TreeEvents = 'onPopulate' | 'onChange' | 'onClick';
|
|
11
|
+
declare class Tree extends FieldWithAttribute<TApiaTreeProperties, TTreeValue[], TApiaTreeDefinition> {
|
|
12
|
+
controller: MobXTree;
|
|
13
|
+
private parseTreeValues;
|
|
14
|
+
constructor({ possibleValue, ...props }: TApiaTreeDefinition);
|
|
15
|
+
protected getSynchronizePostConfiguration(value: TTreeValue[]): IApiaApiPostConfig<any>;
|
|
16
|
+
fireEvent(eventName: TreeEvents, options?: TFireEventOptions): Promise<boolean>;
|
|
17
|
+
protected hasValue(): boolean;
|
|
18
|
+
setProperty<K extends keyof TApiaTreeProperties>(propName: K, propValue: TApiaTreeProperties[K]): void;
|
|
19
|
+
init(form: Form): Promise<void>;
|
|
20
|
+
protected isValidValue(): boolean;
|
|
21
|
+
setValue(newValue: TTreeValue[], options?: Partial<{
|
|
22
|
+
comparator: Comparator<any>;
|
|
23
|
+
format: 'd/m/Y' | 'apia';
|
|
24
|
+
markAsDirty: boolean;
|
|
25
|
+
synchronize: boolean;
|
|
26
|
+
}> | undefined): Promise<boolean>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { type TTreeValue, Tree };
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { FieldWithAttribute } from '../../FieldWithAttribute.js';
|
|
2
|
+
import { arrayOrArray } from '@apia/util';
|
|
3
|
+
import { MobXTree } from '@apia/tree2-controller';
|
|
4
|
+
import { isFieldShowAsText } from '../../util/isFieldShowAsText.js';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, key + "" , value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
function getValuesArray(tree) {
|
|
13
|
+
return tree.reduce((acc, curr) => {
|
|
14
|
+
if (curr.selected) {
|
|
15
|
+
acc.push(curr.value);
|
|
16
|
+
}
|
|
17
|
+
if (curr.possibleValue) {
|
|
18
|
+
acc.push(...getValuesArray(arrayOrArray(curr.possibleValue)));
|
|
19
|
+
}
|
|
20
|
+
return acc;
|
|
21
|
+
}, []);
|
|
22
|
+
}
|
|
23
|
+
class Tree extends FieldWithAttribute {
|
|
24
|
+
constructor({ possibleValue, ...props }) {
|
|
25
|
+
super(props);
|
|
26
|
+
__publicField(this, "controller", {});
|
|
27
|
+
this.properties.possibleValue = arrayOrArray(possibleValue);
|
|
28
|
+
}
|
|
29
|
+
parseTreeValues(parent, pv) {
|
|
30
|
+
arrayOrArray(pv).forEach((c) => {
|
|
31
|
+
const node = parent.create({
|
|
32
|
+
id: String(c.value),
|
|
33
|
+
initialState: {
|
|
34
|
+
label: c.text,
|
|
35
|
+
isSelected: this.state.value.find((s) => s === c.value) !== void 0,
|
|
36
|
+
isSelectable: arrayOrArray(c.possibleValue).length === 0 || this.properties.selParent,
|
|
37
|
+
isExpanded: true,
|
|
38
|
+
icon: () => {
|
|
39
|
+
if (this.properties.parentIcon && c.possibleValue || this.properties.leafIcon && !c.possibleValue) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
this.parseTreeValues(node, c.possibleValue);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
getSynchronizePostConfiguration(value) {
|
|
50
|
+
const conf = super.getSynchronizePostConfiguration(value);
|
|
51
|
+
return {
|
|
52
|
+
...conf,
|
|
53
|
+
postData: {
|
|
54
|
+
...conf.postData,
|
|
55
|
+
clearValues: true
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
fireEvent(eventName, options) {
|
|
60
|
+
return super.fireEvent(eventName, options);
|
|
61
|
+
}
|
|
62
|
+
hasValue() {
|
|
63
|
+
return this.state.value.length > 0;
|
|
64
|
+
}
|
|
65
|
+
setProperty(propName, propValue) {
|
|
66
|
+
if (propName === "possibleValue") {
|
|
67
|
+
this.controller.removeAllChildren();
|
|
68
|
+
this.state.value = getValuesArray(
|
|
69
|
+
arrayOrArray(propValue)
|
|
70
|
+
);
|
|
71
|
+
this.parseTreeValues(
|
|
72
|
+
this.controller,
|
|
73
|
+
propValue
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
super.setProperty(propName, propValue);
|
|
77
|
+
}
|
|
78
|
+
async init(form) {
|
|
79
|
+
await super.init(form);
|
|
80
|
+
this.state.value = getValuesArray(this.properties.possibleValue);
|
|
81
|
+
this.controller = new MobXTree({
|
|
82
|
+
onSelect: (ev) => {
|
|
83
|
+
if (isFieldShowAsText(this) || this.properties.disabled || this.properties.readOnly || this.properties.readonly || this.getParentGrid()?.properties.readonly) {
|
|
84
|
+
return false;
|
|
85
|
+
} else {
|
|
86
|
+
const selection = [...ev.values()].map((c) => c.id);
|
|
87
|
+
this.setValue(selection, { markAsDirty: false });
|
|
88
|
+
if (selection.length === 0) {
|
|
89
|
+
this.setValue([], { markAsDirty: false });
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
isMultiple: this.properties.multiselect,
|
|
95
|
+
toggleNodesOnLabelClick: !this.properties.selParent
|
|
96
|
+
});
|
|
97
|
+
this.setProperty(
|
|
98
|
+
"possibleValue",
|
|
99
|
+
arrayOrArray(this.properties.possibleValue)
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
isValidValue() {
|
|
103
|
+
return this.state.value.length > 0;
|
|
104
|
+
}
|
|
105
|
+
async setValue(newValue, options) {
|
|
106
|
+
const res = await super.setValue(newValue, options);
|
|
107
|
+
if (res) {
|
|
108
|
+
this.controller.setSelectedNodes(new Set(newValue.map((c) => String(c))));
|
|
109
|
+
}
|
|
110
|
+
return res;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export { Tree };
|
|
115
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/main/Execution/FormsExecution/fields/Tree/index.ts"],"sourcesContent":["import type { IApiaApiPostConfig } from '../../../../../util/api/types';\r\nimport type { TApiaTreeProperties } from '../../../../InitialData/types/fields/TApiaFieldProperties';\r\nimport type {\r\n TApiaTreeDefinition,\r\n TApiaTreePossibleValue,\r\n} from '../../../../InitialData/types/fields/TApiaTreeDefinition';\r\nimport {\r\n FieldWithAttribute,\r\n TFireEventOptions,\r\n} from '../../FieldWithAttribute';\r\nimport { arrayOrArray } from '@apia/util';\r\nimport { IMobXChildKeeper, MobXTree } from '@apia/tree2-controller';\r\nimport { Form } from '../../Form';\r\nimport { isFieldShowAsText } from '../../util/isFieldShowAsText';\r\nimport { Comparator } from '../../../../../util/comparators/shallowEqual';\r\n\r\nexport type TTreeValue = string | number;\r\ntype TreeEvents = 'onPopulate' | 'onChange' | 'onClick';\r\n\r\nfunction getValuesArray(tree: TApiaTreePossibleValue[]) {\r\n return tree.reduce((acc, curr) => {\r\n if (curr.selected) {\r\n acc.push(curr.value);\r\n }\r\n if (curr.possibleValue) {\r\n acc.push(...getValuesArray(arrayOrArray(curr.possibleValue)));\r\n }\r\n return acc;\r\n }, [] as TTreeValue[]);\r\n}\r\n\r\nexport class Tree extends FieldWithAttribute<\r\n TApiaTreeProperties,\r\n TTreeValue[],\r\n TApiaTreeDefinition\r\n> {\r\n controller: MobXTree = {} as MobXTree;\r\n\r\n private parseTreeValues(\r\n parent: IMobXChildKeeper,\r\n pv: TApiaTreePossibleValue | TApiaTreePossibleValue[] | undefined,\r\n ) {\r\n arrayOrArray(pv).forEach((c) => {\r\n const node = parent.create({\r\n id: String(c.value),\r\n initialState: {\r\n label: c.text,\r\n isSelected: this.state.value.find((s) => s === c.value) !== undefined,\r\n isSelectable:\r\n arrayOrArray(c.possibleValue).length === 0 ||\r\n this.properties.selParent,\r\n isExpanded: true,\r\n icon: () => {\r\n if (\r\n (this.properties.parentIcon && c.possibleValue) ||\r\n (this.properties.leafIcon && !c.possibleValue)\r\n ) {\r\n return null;\r\n }\r\n return null;\r\n },\r\n },\r\n });\r\n\r\n this.parseTreeValues(node, c.possibleValue);\r\n });\r\n }\r\n\r\n constructor({ possibleValue, ...props }: TApiaTreeDefinition) {\r\n super(props);\r\n this.properties.possibleValue = arrayOrArray(possibleValue);\r\n }\r\n\r\n protected getSynchronizePostConfiguration(\r\n value: TTreeValue[],\r\n ): IApiaApiPostConfig<any> {\r\n const conf = super.getSynchronizePostConfiguration(value);\r\n return {\r\n ...conf,\r\n postData: {\r\n ...conf.postData,\r\n clearValues: true,\r\n },\r\n };\r\n }\r\n\r\n fireEvent(\r\n eventName: TreeEvents,\r\n options?: TFireEventOptions,\r\n ): Promise<boolean> {\r\n return super.fireEvent(eventName, options);\r\n }\r\n\r\n protected hasValue(): boolean {\r\n return this.state.value.length > 0;\r\n }\r\n\r\n setProperty<K extends keyof TApiaTreeProperties>(\r\n propName: K,\r\n propValue: TApiaTreeProperties[K],\r\n ) {\r\n if (propName === 'possibleValue') {\r\n this.controller.removeAllChildren();\r\n this.state.value = getValuesArray(\r\n arrayOrArray(propValue as any) as TApiaTreePossibleValue[],\r\n );\r\n this.parseTreeValues(\r\n this.controller,\r\n propValue as TApiaTreeProperties['possibleValue'],\r\n );\r\n }\r\n super.setProperty(propName, propValue);\r\n }\r\n\r\n async init(form: Form): Promise<void> {\r\n await super.init(form);\r\n\r\n this.state.value = getValuesArray(this.properties.possibleValue);\r\n\r\n this.controller = new MobXTree({\r\n onSelect: (ev) => {\r\n if (\r\n isFieldShowAsText(this) ||\r\n this.properties.disabled ||\r\n this.properties.readOnly ||\r\n this.properties.readonly ||\r\n this.getParentGrid()?.properties.readonly\r\n ) {\r\n return false;\r\n } else {\r\n const selection = [...ev.values()].map((c) => c.id);\r\n this.setValue(selection, { markAsDirty: false });\r\n if (selection.length === 0) {\r\n this.setValue([], { markAsDirty: false });\r\n }\r\n return true;\r\n }\r\n },\r\n isMultiple: this.properties.multiselect,\r\n toggleNodesOnLabelClick: !this.properties.selParent,\r\n });\r\n\r\n this.setProperty(\r\n 'possibleValue',\r\n arrayOrArray(this.properties.possibleValue),\r\n );\r\n }\r\n\r\n protected isValidValue() {\r\n return this.state.value.length > 0;\r\n }\r\n\r\n public async setValue(\r\n newValue: TTreeValue[],\r\n options?:\r\n | Partial<{\r\n comparator: Comparator<any>;\r\n format: 'd/m/Y' | 'apia';\r\n markAsDirty: boolean;\r\n synchronize: boolean;\r\n }>\r\n | undefined,\r\n ): Promise<boolean> {\r\n const res = await super.setValue(newValue, options);\r\n\r\n if (res) {\r\n this.controller.setSelectedNodes(new Set(newValue.map((c) => String(c))));\r\n }\r\n\r\n return res;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;AAmBA,SAAS,eAAe,IAAA,EAAgC;AACtD,EAAA,OAAO,IAAA,CAAK,MAAA,CAAO,CAAC,GAAA,EAAK,IAAA,KAAS;AAChC,IAAA,IAAI,KAAK,QAAA,EAAU;AACjB,MAAA,GAAA,CAAI,IAAA,CAAK,KAAK,KAAK,CAAA;AAAA;AAErB,IAAA,IAAI,KAAK,aAAA,EAAe;AACtB,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;AAAA;AAEX;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Field } from './Field.js';
|
|
2
|
+
import { TranslatableField } from './TranslatableField/index.js';
|
|
3
|
+
import { FieldWithAttribute } from './FieldWithAttribute.js';
|
|
4
|
+
|
|
5
|
+
type FieldConstructor = new (definition: any) => Field<any, any, any> | FieldWithAttribute<any, any, any> | TranslatableField<any, any, any>;
|
|
6
|
+
type FieldsMapping = Record<string, (definition: any) => FieldConstructor>;
|
|
7
|
+
|
|
8
|
+
export type { FieldConstructor, FieldsMapping };
|
|
9
|
+
//# sourceMappingURL=fieldsMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldsMap.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Button } from './fields/Button/index.js';
|
|
2
|
+
import { Captcha } from './fields/Captcha/index.js';
|
|
3
|
+
import { Checkbox } from './fields/Checkbox/index.js';
|
|
4
|
+
import { Editor } from './fields/Editor/index.js';
|
|
5
|
+
import { File } from './fields/File/index.js';
|
|
6
|
+
import { Grid } from './fields/Grid/index.js';
|
|
7
|
+
import { GridPaginated } from './fields/GridPaginated/index.js';
|
|
8
|
+
import { Hidden } from './fields/Hidden/index.js';
|
|
9
|
+
import { Image } from './fields/Image/index.js';
|
|
10
|
+
import { Input } from './fields/Input/index.js';
|
|
11
|
+
import { Label } from './fields/Label/index.js';
|
|
12
|
+
import { Link } from './fields/Link/index.js';
|
|
13
|
+
import { ModalInput } from './fields/ModalInput/index.js';
|
|
14
|
+
import { Multiple } from './fields/Multiple/index.js';
|
|
15
|
+
import { Password } from './fields/Password/index.js';
|
|
16
|
+
import { Radio } from './fields/Radio/index.js';
|
|
17
|
+
import { Select } from './fields/Select/index.js';
|
|
18
|
+
import { Textarea } from './fields/Textarea/index.js';
|
|
19
|
+
import { Title } from './fields/Title/index.js';
|
|
20
|
+
import { Tree } from './fields/Tree/index.js';
|
|
21
|
+
import { SchedulerField } from './fields/Scheduler/index.js';
|
|
22
|
+
|
|
23
|
+
const defaultFieldsMap = Object.freeze({
|
|
24
|
+
area: () => Textarea,
|
|
25
|
+
button: () => Button,
|
|
26
|
+
captcha: () => Captcha,
|
|
27
|
+
check: () => Checkbox,
|
|
28
|
+
editor: () => Editor,
|
|
29
|
+
file: () => File,
|
|
30
|
+
grid: (def) => {
|
|
31
|
+
const definition = def;
|
|
32
|
+
if (definition?.properties?.paged) {
|
|
33
|
+
return GridPaginated;
|
|
34
|
+
}
|
|
35
|
+
return Grid;
|
|
36
|
+
},
|
|
37
|
+
hidden: () => Hidden,
|
|
38
|
+
href: () => Link,
|
|
39
|
+
image: () => Image,
|
|
40
|
+
input: (def) => {
|
|
41
|
+
const definition = def;
|
|
42
|
+
if (definition.qryId) {
|
|
43
|
+
return ModalInput;
|
|
44
|
+
}
|
|
45
|
+
return Input;
|
|
46
|
+
},
|
|
47
|
+
label: (def) => {
|
|
48
|
+
const definition = def;
|
|
49
|
+
const value = definition.properties?.value;
|
|
50
|
+
if (value && String(value).indexOf("schedContainer") !== -1) {
|
|
51
|
+
return SchedulerField;
|
|
52
|
+
}
|
|
53
|
+
return Label;
|
|
54
|
+
},
|
|
55
|
+
multiple: () => Multiple,
|
|
56
|
+
password: () => Password,
|
|
57
|
+
radio: () => Radio,
|
|
58
|
+
select: () => Select,
|
|
59
|
+
title: () => Title,
|
|
60
|
+
tree: () => Tree
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export { defaultFieldsMap };
|
|
64
|
+
//# sourceMappingURL=fieldsMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldsMap.js","sources":["../../../../src/main/Execution/FormsExecution/fieldsMap.ts"],"sourcesContent":["import {\r\n TApiaFieldBaseDefinition,\r\n TApiaFieldWithAttributeBaseProps,\r\n} from '../../InitialData/types/TApiaField';\r\nimport { Field } from './Field';\r\nimport { TranslatableField } from './TranslatableField';\r\nimport { Button } from './fields/Button';\r\nimport { Captcha } from './fields/Captcha';\r\nimport { Checkbox } from './fields/Checkbox';\r\nimport { Editor } from './fields/Editor';\r\nimport { File } from './fields/File';\r\nimport { Grid } from './fields/Grid';\r\nimport { GridPaginated } from './fields/GridPaginated';\r\nimport { Hidden } from './fields/Hidden';\r\nimport { Image } from './fields/Image';\r\nimport { Input } from './fields/Input';\r\nimport { Label } from './fields/Label';\r\nimport { Link } from './fields/Link';\r\nimport { ModalInput } from './fields/ModalInput';\r\nimport { Multiple } from './fields/Multiple';\r\nimport { Password } from './fields/Password';\r\nimport { Radio } from './fields/Radio';\r\nimport { Select } from './fields/Select';\r\nimport { Textarea } from './fields/Textarea';\r\nimport { Title } from './fields/Title';\r\nimport { Tree } from './fields/Tree';\r\nimport { FieldWithAttribute } from './FieldWithAttribute';\r\nimport { GridProps } from './fields/Grid/types';\r\nimport { SchedulerField } from './fields/Scheduler';\r\nimport { TApiaLabelProperties } from '../../InitialData/types/fields/TApiaFieldProperties';\r\n\r\nexport type FieldConstructor = new (\r\n definition: any,\r\n) =>\r\n | Field<any, any, any>\r\n | FieldWithAttribute<any, any, any>\r\n | TranslatableField<any, any, any>;\r\n\r\nexport type FieldsMapping = Record<\r\n string,\r\n (definition: any) => FieldConstructor\r\n>;\r\n\r\nexport const defaultFieldsMap: FieldsMapping = Object.freeze({\r\n area: () => Textarea,\r\n button: () => Button,\r\n captcha: () => Captcha,\r\n check: () => Checkbox,\r\n editor: () => Editor,\r\n file: () => File,\r\n grid: (def) => {\r\n const definition = def as TApiaFieldBaseDefinition<GridProps>;\r\n\r\n if (definition?.properties?.paged) {\r\n return GridPaginated;\r\n }\r\n\r\n return Grid;\r\n },\r\n hidden: () => Hidden,\r\n href: () => Link,\r\n image: () => Image,\r\n input: (def) => {\r\n const definition = def as TApiaFieldWithAttributeBaseProps<any>;\r\n\r\n if (definition.qryId) {\r\n return ModalInput;\r\n }\r\n\r\n return Input;\r\n },\r\n label: (def) => {\r\n const definition =\r\n def as TApiaFieldWithAttributeBaseProps<TApiaLabelProperties>;\r\n const value = definition.properties?.value;\r\n if (value && String(value).indexOf('schedContainer') !== -1) {\r\n return SchedulerField;\r\n }\r\n\r\n return Label;\r\n },\r\n multiple: () => Multiple,\r\n password: () => Password,\r\n radio: () => Radio,\r\n select: () => Select,\r\n title: () => Title,\r\n tree: () =>\r\n Tree as new (definition: any) => FieldWithAttribute<any, any, any>,\r\n});\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2CO,MAAM,gBAAA,GAAkC,OAAO,MAAA,CAAO;AAAA,EAC3D,MAAM,MAAM,QAAA;AAAA,EACZ,QAAQ,MAAM,MAAA;AAAA,EACd,SAAS,MAAM,OAAA;AAAA,EACf,OAAO,MAAM,QAAA;AAAA,EACb,QAAQ,MAAM,MAAA;AAAA,EACd,MAAM,MAAM,IAAA;AAAA,EACZ,IAAA,EAAM,CAAC,GAAA,KAAQ;AACb,IAAA,MAAM,UAAA,GAAa,GAAA;AAEnB,IAAA,IAAI,UAAA,EAAY,YAAY,KAAA,EAAO;AACjC,MAAA,OAAO,aAAA;AAAA;AAGT,IAAA,OAAO,IAAA;AAAA,GACT;AAAA,EACA,QAAQ,MAAM,MAAA;AAAA,EACd,MAAM,MAAM,IAAA;AAAA,EACZ,OAAO,MAAM,KAAA;AAAA,EACb,KAAA,EAAO,CAAC,GAAA,KAAQ;AACd,IAAA,MAAM,UAAA,GAAa,GAAA;AAEnB,IAAA,IAAI,WAAW,KAAA,EAAO;AACpB,MAAA,OAAO,UAAA;AAAA;AAGT,IAAA,OAAO,KAAA;AAAA,GACT;AAAA,EACA,KAAA,EAAO,CAAC,GAAA,KAAQ;AACd,IAAA,MAAM,UAAA,GACJ,GAAA;AACF,IAAA,MAAM,KAAA,GAAQ,WAAW,UAAA,EAAY,KAAA;AACrC,IAAA,IAAI,SAAS,MAAA,CAAO,KAAK,EAAE,OAAA,CAAQ,gBAAgB,MAAM,EAAA,EAAI;AAC3D,MAAA,OAAO,cAAA;AAAA;AAGT,IAAA,OAAO,KAAA;AAAA,GACT;AAAA,EACA,UAAU,MAAM,QAAA;AAAA,EAChB,UAAU,MAAM,QAAA;AAAA,EAChB,OAAO,MAAM,KAAA;AAAA,EACb,QAAQ,MAAM,MAAA;AAAA,EACd,OAAO,MAAM,KAAA;AAAA,EACb,MAAM,MACJ;AACJ,CAAC;;;;"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Comparator } from '../../../util/comparators/shallowEqual.js';
|
|
2
|
+
|
|
3
|
+
type SetValueOptions = Partial<{
|
|
4
|
+
comparator: Comparator<any>;
|
|
5
|
+
format: 'd/m/Y' | 'apia';
|
|
6
|
+
markAsDirty: boolean;
|
|
7
|
+
synchronize: boolean;
|
|
8
|
+
force: boolean;
|
|
9
|
+
fireEvents?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
type FireEventParameters = Record<string, unknown>;
|
|
12
|
+
type FieldValidationState = {
|
|
13
|
+
dirty: boolean;
|
|
14
|
+
errorMessage: string | null;
|
|
15
|
+
synchronizing: boolean;
|
|
16
|
+
};
|
|
17
|
+
type FieldWithAttributeState<D, P, V> = {
|
|
18
|
+
definition: D;
|
|
19
|
+
properties: P;
|
|
20
|
+
value: V;
|
|
21
|
+
};
|
|
22
|
+
type TSignaturesData = {
|
|
23
|
+
ajaxUrl: string;
|
|
24
|
+
DownloadLabel: string;
|
|
25
|
+
DownloadToolTip: string;
|
|
26
|
+
docId?: string;
|
|
27
|
+
fldId?: string;
|
|
28
|
+
frmId: number;
|
|
29
|
+
frmParent: string;
|
|
30
|
+
index?: number;
|
|
31
|
+
isDoc?: boolean;
|
|
32
|
+
isField?: boolean;
|
|
33
|
+
noSignaturesLabel: string;
|
|
34
|
+
PKCS7Label: string;
|
|
35
|
+
PKCS7ToolTip: string;
|
|
36
|
+
prefix?: string;
|
|
37
|
+
signatures: ISignatureData[];
|
|
38
|
+
signedByLabel: string;
|
|
39
|
+
signedByToolTip: string;
|
|
40
|
+
signedDateLabel: string;
|
|
41
|
+
signedDateToolTip: string;
|
|
42
|
+
title: string;
|
|
43
|
+
verifyAction: string;
|
|
44
|
+
verifySignLabel: string;
|
|
45
|
+
verifySignToolTip: string;
|
|
46
|
+
};
|
|
47
|
+
interface ISignatureData {
|
|
48
|
+
date: string;
|
|
49
|
+
hasPKCS7: boolean;
|
|
50
|
+
user: string;
|
|
51
|
+
userId: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type { FieldValidationState, FieldWithAttributeState, FireEventParameters, ISignatureData, SetValueOptions, TSignaturesData };
|
|
55
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { isTrue } from '@apia/util';
|
|
2
|
+
|
|
3
|
+
function isFieldShowAsText(f) {
|
|
4
|
+
return isTrue(f.properties.disabled) || isTrue(f.getForm().definition.readonly) || isTrue(f.getForm().definition.readOnly) || isTrue(f.properties.inputAsText);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { isFieldShowAsText };
|
|
8
|
+
//# sourceMappingURL=isFieldShowAsText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isFieldShowAsText.js","sources":["../../../../../src/main/Execution/FormsExecution/util/isFieldShowAsText.ts"],"sourcesContent":["import { isTrue } from '@apia/util';\r\nimport type { FieldWithAttribute } from '../FieldWithAttribute';\r\n\r\nexport function isFieldShowAsText(\r\n f: Pick<FieldWithAttribute<any, any, any>, 'properties' | 'getForm'>,\r\n): boolean {\r\n return (\r\n isTrue(f.properties.disabled) ||\r\n isTrue(f.getForm().definition.readonly) ||\r\n isTrue(f.getForm().definition.readOnly) ||\r\n isTrue(f.properties.inputAsText)\r\n );\r\n}\r\n"],"names":[],"mappings":";;AAGO,SAAS,kBACd,CAAA,EACS;AACT,EAAA,OACE,MAAA,CAAO,EAAE,UAAA,CAAW,QAAQ,KAC5B,MAAA,CAAO,CAAA,CAAE,OAAA,EAAQ,CAAE,UAAA,CAAW,QAAQ,KACtC,MAAA,CAAO,CAAA,CAAE,SAAQ,CAAE,UAAA,CAAW,QAAQ,CAAA,IACtC,MAAA,CAAO,CAAA,CAAE,UAAA,CAAW,WAAW,CAAA;AAEnC;;;;"}
|