@dwidge/json-forms-expo 0.0.2 → 0.0.4
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/cjs/{FileAttachment → Attachment}/AttachmentEdit.js +3 -2
- package/dist/cjs/Attachment/AttachmentEdit.js.map +1 -0
- package/dist/cjs/Attachment/AttachmentListEdit.js +21 -0
- package/dist/cjs/Attachment/AttachmentListEdit.js.map +1 -0
- package/dist/cjs/{FileAttachment → Attachment}/AttachmentListView.js +2 -2
- package/dist/cjs/Attachment/AttachmentListView.js.map +1 -0
- package/dist/cjs/Attachment/AttachmentScreen.js.map +1 -0
- package/dist/cjs/{FileAttachment → Attachment}/AttachmentView.js +3 -2
- package/dist/cjs/Attachment/AttachmentView.js.map +1 -0
- package/dist/cjs/{FileAttachment → Attachment}/index.js +7 -7
- package/dist/cjs/Attachment/index.js.map +1 -0
- package/dist/cjs/{FileAttachment → Attachment}/useFileAttachmentUrl.js +3 -2
- package/dist/cjs/Attachment/useFileAttachmentUrl.js.map +1 -0
- package/dist/cjs/{FileAttachment → Attachment}/useFileUrl.js +2 -1
- package/dist/cjs/Attachment/useFileUrl.js.map +1 -0
- package/dist/cjs/Form/FormEdit.js +22 -3
- package/dist/cjs/Form/FormEdit.js.map +1 -1
- package/dist/cjs/Form/FormEditScreen.js +4 -17
- package/dist/cjs/Form/FormEditScreen.js.map +1 -1
- package/dist/cjs/Form/FormListEdit.js +9 -4
- package/dist/cjs/Form/FormListEdit.js.map +1 -1
- package/dist/cjs/Form/FormListScreen.js +9 -6
- package/dist/cjs/Form/FormListScreen.js.map +1 -1
- package/dist/cjs/Form/FormListView.js +5 -2
- package/dist/cjs/Form/FormListView.js.map +1 -1
- package/dist/cjs/Form/FormView.js +5 -1
- package/dist/cjs/Form/FormView.js.map +1 -1
- package/dist/cjs/Form/index.js +6 -9
- package/dist/cjs/Form/index.js.map +1 -1
- package/dist/cjs/{Form/EditFormAttachmentScreen.js → Schema/EditSchemaScreen.js} +4 -4
- package/dist/cjs/Schema/EditSchemaScreen.js.map +1 -0
- package/dist/cjs/Schema/SchemaEdit.js +12 -0
- package/dist/cjs/Schema/SchemaEdit.js.map +1 -0
- package/dist/cjs/Schema/SchemaEditScreen.js +30 -0
- package/dist/cjs/Schema/SchemaEditScreen.js.map +1 -0
- package/dist/cjs/Schema/SchemaListEdit.js +22 -0
- package/dist/cjs/Schema/SchemaListEdit.js.map +1 -0
- package/dist/cjs/Schema/SchemaListScreen.js +28 -0
- package/dist/cjs/Schema/SchemaListScreen.js.map +1 -0
- package/dist/cjs/Schema/SchemaListView.js +18 -0
- package/dist/cjs/Schema/SchemaListView.js.map +1 -0
- package/dist/cjs/Schema/SchemaSelectScreen.js +21 -0
- package/dist/cjs/Schema/SchemaSelectScreen.js.map +1 -0
- package/dist/cjs/Schema/SchemaSelectView.js +16 -0
- package/dist/cjs/Schema/SchemaSelectView.js.map +1 -0
- package/dist/cjs/Schema/SchemaView.js +12 -0
- package/dist/cjs/Schema/SchemaView.js.map +1 -0
- package/dist/cjs/{FormAttachment → Schema}/index.js +9 -6
- package/dist/cjs/Schema/index.js.map +1 -0
- package/dist/cjs/hooks/{FileAttachmentApi.js → AttachmentApi.js} +4 -4
- package/dist/cjs/hooks/AttachmentApi.js.map +1 -0
- package/dist/cjs/hooks/FileApi.js +1 -1
- package/dist/cjs/hooks/FileApi.js.map +1 -1
- package/dist/cjs/hooks/FormApi.js +3 -4
- package/dist/cjs/hooks/FormApi.js.map +1 -1
- package/dist/cjs/hooks/FormsContext.js +4 -4
- package/dist/cjs/hooks/FormsContext.js.map +1 -1
- package/dist/cjs/hooks/{FormAttachmentApi.js → SchemaApi.js} +6 -5
- package/dist/cjs/hooks/SchemaApi.js.map +1 -0
- package/dist/cjs/hooks/createApi.js +11 -12
- package/dist/cjs/hooks/createApi.js.map +1 -1
- package/dist/cjs/hooks/index.js +11 -10
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useCreateBlankAttachment.js +2 -2
- package/dist/cjs/hooks/useCreateBlankAttachment.js.map +1 -1
- package/dist/cjs/hooks/useCreateBlankForm.js +5 -3
- package/dist/cjs/hooks/useCreateBlankForm.js.map +1 -1
- package/dist/cjs/hooks/useCreateBlankSchema.js +12 -0
- package/dist/cjs/hooks/useCreateBlankSchema.js.map +1 -0
- package/dist/cjs/hooks/useIdFilter.js +6 -0
- package/dist/cjs/hooks/useIdFilter.js.map +1 -0
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/{FileAttachment.js → File1.js} +1 -1
- package/dist/cjs/types/File1.js.map +1 -0
- package/dist/cjs/types/{FormAttachment.js → Schema1.js} +1 -1
- package/dist/cjs/types/Schema1.js.map +1 -0
- package/dist/cjs/types/index.js +4 -4
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/esm/{FileAttachment → Attachment}/AttachmentEdit.js +3 -2
- package/dist/esm/Attachment/AttachmentEdit.js.map +1 -0
- package/dist/esm/Attachment/AttachmentListEdit.js +14 -0
- package/dist/esm/Attachment/AttachmentListEdit.js.map +1 -0
- package/dist/esm/{FileAttachment → Attachment}/AttachmentListView.js +2 -2
- package/dist/esm/Attachment/AttachmentListView.js.map +1 -0
- package/dist/esm/Attachment/AttachmentScreen.js.map +1 -0
- package/dist/esm/{FileAttachment → Attachment}/AttachmentView.js +3 -2
- package/dist/esm/Attachment/AttachmentView.js.map +1 -0
- package/dist/esm/Attachment/index.js +8 -0
- package/dist/esm/Attachment/index.js.map +1 -0
- package/dist/esm/{FileAttachment → Attachment}/useFileAttachmentUrl.js +3 -2
- package/dist/esm/Attachment/useFileAttachmentUrl.js.map +1 -0
- package/dist/esm/{FileAttachment → Attachment}/useFileUrl.js +2 -1
- package/dist/esm/Attachment/useFileUrl.js.map +1 -0
- package/dist/esm/Form/FormEdit.js +22 -3
- package/dist/esm/Form/FormEdit.js.map +1 -1
- package/dist/esm/Form/FormEditScreen.js +5 -18
- package/dist/esm/Form/FormEditScreen.js.map +1 -1
- package/dist/esm/Form/FormListEdit.js +10 -5
- package/dist/esm/Form/FormListEdit.js.map +1 -1
- package/dist/esm/Form/FormListScreen.js +10 -7
- package/dist/esm/Form/FormListScreen.js.map +1 -1
- package/dist/esm/Form/FormListView.js +5 -2
- package/dist/esm/Form/FormListView.js.map +1 -1
- package/dist/esm/Form/FormView.js +7 -3
- package/dist/esm/Form/FormView.js.map +1 -1
- package/dist/esm/Form/index.js +6 -9
- package/dist/esm/Form/index.js.map +1 -1
- package/dist/esm/{Form/EditFormAttachmentScreen.js → Schema/EditSchemaScreen.js} +2 -2
- package/dist/esm/Schema/EditSchemaScreen.js.map +1 -0
- package/dist/esm/Schema/SchemaEdit.js +8 -0
- package/dist/esm/Schema/SchemaEdit.js.map +1 -0
- package/dist/esm/Schema/SchemaEditScreen.js +26 -0
- package/dist/esm/Schema/SchemaEditScreen.js.map +1 -0
- package/dist/esm/Schema/SchemaListEdit.js +15 -0
- package/dist/esm/Schema/SchemaListEdit.js.map +1 -0
- package/dist/esm/Schema/SchemaListScreen.js +24 -0
- package/dist/esm/Schema/SchemaListScreen.js.map +1 -0
- package/dist/esm/Schema/SchemaListView.js +11 -0
- package/dist/esm/Schema/SchemaListView.js.map +1 -0
- package/dist/esm/Schema/SchemaSelectScreen.js +17 -0
- package/dist/esm/Schema/SchemaSelectScreen.js.map +1 -0
- package/dist/esm/Schema/SchemaSelectView.js +12 -0
- package/dist/esm/Schema/SchemaSelectView.js.map +1 -0
- package/dist/esm/Schema/SchemaView.js +8 -0
- package/dist/esm/Schema/SchemaView.js.map +1 -0
- package/dist/esm/Schema/index.js +10 -0
- package/dist/esm/Schema/index.js.map +1 -0
- package/dist/esm/hooks/{FileAttachmentApi.js → AttachmentApi.js} +3 -3
- package/dist/esm/hooks/AttachmentApi.js.map +1 -0
- package/dist/esm/hooks/FileApi.js +1 -1
- package/dist/esm/hooks/FileApi.js.map +1 -1
- package/dist/esm/hooks/FormApi.js +3 -4
- package/dist/esm/hooks/FormApi.js.map +1 -1
- package/dist/esm/hooks/FormsContext.js +4 -4
- package/dist/esm/hooks/FormsContext.js.map +1 -1
- package/dist/esm/hooks/SchemaApi.js +10 -0
- package/dist/esm/hooks/SchemaApi.js.map +1 -0
- package/dist/esm/hooks/createApi.js +11 -12
- package/dist/esm/hooks/createApi.js.map +1 -1
- package/dist/esm/hooks/index.js +11 -10
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useCreateBlankAttachment.js +2 -2
- package/dist/esm/hooks/useCreateBlankAttachment.js.map +1 -1
- package/dist/esm/hooks/useCreateBlankForm.js +5 -3
- package/dist/esm/hooks/useCreateBlankForm.js.map +1 -1
- package/dist/esm/hooks/useCreateBlankSchema.js +8 -0
- package/dist/esm/hooks/useCreateBlankSchema.js.map +1 -0
- package/dist/esm/hooks/useIdFilter.js +2 -0
- package/dist/esm/hooks/useIdFilter.js.map +1 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/File1.js +2 -0
- package/dist/esm/types/File1.js.map +1 -0
- package/dist/esm/types/Schema1.js +2 -0
- package/dist/esm/types/Schema1.js.map +1 -0
- package/dist/esm/types/index.js +4 -4
- package/dist/esm/types/index.js.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/Attachment/AttachmentEdit.d.ts +6 -0
- package/dist/types/Attachment/AttachmentEdit.d.ts.map +1 -0
- package/dist/types/{FileAttachment → Attachment}/AttachmentListEdit.d.ts +3 -3
- package/dist/types/Attachment/AttachmentListEdit.d.ts.map +1 -0
- package/dist/types/{FileAttachment → Attachment}/AttachmentListView.d.ts +2 -2
- package/dist/types/Attachment/AttachmentListView.d.ts.map +1 -0
- package/dist/types/{FileAttachment → Attachment}/AttachmentScreen.d.ts +1 -1
- package/dist/types/Attachment/AttachmentScreen.d.ts.map +1 -0
- package/dist/types/Attachment/AttachmentView.d.ts +6 -0
- package/dist/types/Attachment/AttachmentView.d.ts.map +1 -0
- package/dist/types/Attachment/index.d.ts +8 -0
- package/dist/types/Attachment/index.d.ts.map +1 -0
- package/dist/types/Attachment/useFileAttachmentUrl.d.ts.map +1 -0
- package/dist/types/Attachment/useFileUrl.d.ts.map +1 -0
- package/dist/types/Form/FormEdit.d.ts +6 -2
- package/dist/types/Form/FormEdit.d.ts.map +1 -1
- package/dist/types/Form/FormEditScreen.d.ts +3 -2
- package/dist/types/Form/FormEditScreen.d.ts.map +1 -1
- package/dist/types/Form/FormListEdit.d.ts +7 -2
- package/dist/types/Form/FormListEdit.d.ts.map +1 -1
- package/dist/types/Form/FormListScreen.d.ts +4 -5
- package/dist/types/Form/FormListScreen.d.ts.map +1 -1
- package/dist/types/Form/FormListView.d.ts +3 -3
- package/dist/types/Form/FormListView.d.ts.map +1 -1
- package/dist/types/Form/FormView.d.ts +4 -3
- package/dist/types/Form/FormView.d.ts.map +1 -1
- package/dist/types/Form/index.d.ts +6 -9
- package/dist/types/Form/index.d.ts.map +1 -1
- package/dist/types/{Form/EditFormAttachmentScreen.d.ts → Schema/EditSchemaScreen.d.ts} +2 -2
- package/dist/types/Schema/EditSchemaScreen.d.ts.map +1 -0
- package/dist/types/Schema/SchemaEdit.d.ts +4 -0
- package/dist/types/Schema/SchemaEdit.d.ts.map +1 -0
- package/dist/types/Schema/SchemaEditScreen.d.ts +4 -0
- package/dist/types/Schema/SchemaEditScreen.d.ts.map +1 -0
- package/dist/types/Schema/SchemaListEdit.d.ts +6 -0
- package/dist/types/Schema/SchemaListEdit.d.ts.map +1 -0
- package/dist/types/Schema/SchemaListScreen.d.ts +8 -0
- package/dist/types/Schema/SchemaListScreen.d.ts.map +1 -0
- package/dist/types/Schema/SchemaListView.d.ts +5 -0
- package/dist/types/Schema/SchemaListView.d.ts.map +1 -0
- package/dist/types/Schema/SchemaSelectScreen.d.ts +6 -0
- package/dist/types/Schema/SchemaSelectScreen.d.ts.map +1 -0
- package/dist/types/Schema/SchemaSelectView.d.ts +8 -0
- package/dist/types/Schema/SchemaSelectView.d.ts.map +1 -0
- package/dist/types/Schema/SchemaView.d.ts +5 -0
- package/dist/types/Schema/SchemaView.d.ts.map +1 -0
- package/dist/types/Schema/index.d.ts +10 -0
- package/dist/types/Schema/index.d.ts.map +1 -0
- package/dist/types/hooks/AttachmentApi.d.ts +23 -0
- package/dist/types/hooks/AttachmentApi.d.ts.map +1 -0
- package/dist/types/hooks/FileApi.d.ts +7 -19
- package/dist/types/hooks/FileApi.d.ts.map +1 -1
- package/dist/types/hooks/FormApi.d.ts +7 -19
- package/dist/types/hooks/FormApi.d.ts.map +1 -1
- package/dist/types/hooks/FormsContext.d.ts +7 -7
- package/dist/types/hooks/SchemaApi.d.ts +23 -0
- package/dist/types/hooks/SchemaApi.d.ts.map +1 -0
- package/dist/types/hooks/createApi.d.ts +8 -20
- package/dist/types/hooks/createApi.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +11 -10
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/useCreateBlankAttachment.d.ts +3 -3
- package/dist/types/hooks/useCreateBlankAttachment.d.ts.map +1 -1
- package/dist/types/hooks/useCreateBlankForm.d.ts +10 -3
- package/dist/types/hooks/useCreateBlankForm.d.ts.map +1 -1
- package/dist/types/hooks/useCreateBlankSchema.d.ts +6 -0
- package/dist/types/hooks/useCreateBlankSchema.d.ts.map +1 -0
- package/dist/types/hooks/useIdFilter.d.ts +4 -0
- package/dist/types/hooks/useIdFilter.d.ts.map +1 -0
- package/dist/types/hooks/useParams.d.ts +1 -1
- package/dist/types/hooks/useParams.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/{FileAttachment.d.ts → File1.d.ts} +3 -3
- package/dist/types/types/File1.d.ts.map +1 -0
- package/dist/types/types/Form1.d.ts +2 -3
- package/dist/types/types/Form1.d.ts.map +1 -1
- package/dist/types/types/Schema1.d.ts +14 -0
- package/dist/types/types/Schema1.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +4 -4
- package/dist/types/types/index.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/{FileAttachment → Attachment}/AttachmentEdit.tsx +4 -3
- package/src/{FileAttachment → Attachment}/AttachmentListEdit.tsx +3 -3
- package/src/{FileAttachment → Attachment}/AttachmentListView.tsx +2 -2
- package/src/{FileAttachment → Attachment}/AttachmentView.tsx +4 -3
- package/src/Attachment/index.ts +7 -0
- package/src/{FileAttachment → Attachment}/useFileAttachmentUrl.ts +4 -3
- package/src/{FileAttachment → Attachment}/useFileUrl.ts +2 -1
- package/src/Form/FormEdit.tsx +60 -7
- package/src/Form/FormEditScreen.tsx +10 -42
- package/src/Form/FormListEdit.tsx +22 -14
- package/src/Form/FormListScreen.tsx +24 -19
- package/src/Form/FormListView.tsx +13 -6
- package/src/Form/FormView.tsx +26 -11
- package/src/Form/index.ts +6 -9
- package/src/{Form/EditFormAttachmentScreen.tsx → Schema/EditSchemaScreen.tsx} +4 -4
- package/src/Schema/SchemaEdit.tsx +15 -0
- package/src/Schema/SchemaEditScreen.tsx +57 -0
- package/src/{FormAttachment/FormAttachmentListView.tsx → Schema/SchemaListEdit.tsx} +13 -11
- package/src/Schema/SchemaListScreen.tsx +54 -0
- package/src/Schema/SchemaListView.tsx +23 -0
- package/src/{Form/FormSelectScreen.tsx → Schema/SchemaSelectScreen.tsx} +12 -17
- package/src/{Form/FormSelectView.tsx → Schema/SchemaSelectView.tsx} +8 -8
- package/src/Schema/SchemaView.tsx +11 -0
- package/src/Schema/index.ts +9 -0
- package/src/hooks/{FileAttachmentApi.ts → AttachmentApi.ts} +3 -3
- package/src/hooks/FileApi.ts +1 -1
- package/src/hooks/FormApi.ts +3 -4
- package/src/hooks/FormsContext.ts +4 -4
- package/src/hooks/SchemaApi.ts +11 -0
- package/src/hooks/createApi.ts +22 -19
- package/src/hooks/index.ts +11 -10
- package/src/hooks/useCreateBlankAttachment.ts +2 -2
- package/src/hooks/useCreateBlankForm.ts +11 -3
- package/src/hooks/useCreateBlankSchema.ts +12 -0
- package/src/hooks/useIdFilter.ts +2 -0
- package/src/hooks/useParams.ts +1 -1
- package/src/index.ts +5 -5
- package/src/types/{FileAttachment.ts → File1.ts} +2 -2
- package/src/types/Form1.ts +2 -3
- package/src/types/Schema1.ts +17 -0
- package/src/types/index.ts +4 -4
- package/dist/cjs/FileAttachment/AttachmentEdit.js.map +0 -1
- package/dist/cjs/FileAttachment/AttachmentListEdit.js +0 -21
- package/dist/cjs/FileAttachment/AttachmentListEdit.js.map +0 -1
- package/dist/cjs/FileAttachment/AttachmentListView.js.map +0 -1
- package/dist/cjs/FileAttachment/AttachmentScreen.js.map +0 -1
- package/dist/cjs/FileAttachment/AttachmentView.js.map +0 -1
- package/dist/cjs/FileAttachment/index.js.map +0 -1
- package/dist/cjs/FileAttachment/useFileAttachmentUrl.js.map +0 -1
- package/dist/cjs/FileAttachment/useFileUrl.js.map +0 -1
- package/dist/cjs/Form/EditFormAttachmentScreen.js.map +0 -1
- package/dist/cjs/Form/FormSelectScreen.js +0 -21
- package/dist/cjs/Form/FormSelectScreen.js.map +0 -1
- package/dist/cjs/Form/FormSelectView.js +0 -16
- package/dist/cjs/Form/FormSelectView.js.map +0 -1
- package/dist/cjs/FormAttachment/FormAttachmentEdit.js +0 -30
- package/dist/cjs/FormAttachment/FormAttachmentEdit.js.map +0 -1
- package/dist/cjs/FormAttachment/FormAttachmentEditScreen.js +0 -15
- package/dist/cjs/FormAttachment/FormAttachmentEditScreen.js.map +0 -1
- package/dist/cjs/FormAttachment/FormAttachmentListEdit.js +0 -27
- package/dist/cjs/FormAttachment/FormAttachmentListEdit.js.map +0 -1
- package/dist/cjs/FormAttachment/FormAttachmentListScreen.js +0 -31
- package/dist/cjs/FormAttachment/FormAttachmentListScreen.js.map +0 -1
- package/dist/cjs/FormAttachment/FormAttachmentListView.js +0 -21
- package/dist/cjs/FormAttachment/FormAttachmentListView.js.map +0 -1
- package/dist/cjs/FormAttachment/FormAttachmentView.js +0 -15
- package/dist/cjs/FormAttachment/FormAttachmentView.js.map +0 -1
- package/dist/cjs/FormAttachment/index.js.map +0 -1
- package/dist/cjs/hooks/FileAttachmentApi.js.map +0 -1
- package/dist/cjs/hooks/FormAttachmentApi.js.map +0 -1
- package/dist/cjs/hooks/useCreateBlankFormAttachment.js +0 -14
- package/dist/cjs/hooks/useCreateBlankFormAttachment.js.map +0 -1
- package/dist/cjs/types/FileAttachment.js.map +0 -1
- package/dist/cjs/types/FormAttachment.js.map +0 -1
- package/dist/esm/FileAttachment/AttachmentEdit.js.map +0 -1
- package/dist/esm/FileAttachment/AttachmentListEdit.js +0 -14
- package/dist/esm/FileAttachment/AttachmentListEdit.js.map +0 -1
- package/dist/esm/FileAttachment/AttachmentListView.js.map +0 -1
- package/dist/esm/FileAttachment/AttachmentScreen.js.map +0 -1
- package/dist/esm/FileAttachment/AttachmentView.js.map +0 -1
- package/dist/esm/FileAttachment/index.js +0 -8
- package/dist/esm/FileAttachment/index.js.map +0 -1
- package/dist/esm/FileAttachment/useFileAttachmentUrl.js.map +0 -1
- package/dist/esm/FileAttachment/useFileUrl.js.map +0 -1
- package/dist/esm/Form/EditFormAttachmentScreen.js.map +0 -1
- package/dist/esm/Form/FormSelectScreen.js +0 -17
- package/dist/esm/Form/FormSelectScreen.js.map +0 -1
- package/dist/esm/Form/FormSelectView.js +0 -12
- package/dist/esm/Form/FormSelectView.js.map +0 -1
- package/dist/esm/FormAttachment/FormAttachmentEdit.js +0 -26
- package/dist/esm/FormAttachment/FormAttachmentEdit.js.map +0 -1
- package/dist/esm/FormAttachment/FormAttachmentEditScreen.js +0 -11
- package/dist/esm/FormAttachment/FormAttachmentEditScreen.js.map +0 -1
- package/dist/esm/FormAttachment/FormAttachmentListEdit.js +0 -20
- package/dist/esm/FormAttachment/FormAttachmentListEdit.js.map +0 -1
- package/dist/esm/FormAttachment/FormAttachmentListScreen.js +0 -27
- package/dist/esm/FormAttachment/FormAttachmentListScreen.js.map +0 -1
- package/dist/esm/FormAttachment/FormAttachmentListView.js +0 -14
- package/dist/esm/FormAttachment/FormAttachmentListView.js.map +0 -1
- package/dist/esm/FormAttachment/FormAttachmentView.js +0 -11
- package/dist/esm/FormAttachment/FormAttachmentView.js.map +0 -1
- package/dist/esm/FormAttachment/index.js +0 -7
- package/dist/esm/FormAttachment/index.js.map +0 -1
- package/dist/esm/hooks/FileAttachmentApi.js.map +0 -1
- package/dist/esm/hooks/FormAttachmentApi.js +0 -9
- package/dist/esm/hooks/FormAttachmentApi.js.map +0 -1
- package/dist/esm/hooks/useCreateBlankFormAttachment.js +0 -10
- package/dist/esm/hooks/useCreateBlankFormAttachment.js.map +0 -1
- package/dist/esm/types/FileAttachment.js +0 -2
- package/dist/esm/types/FileAttachment.js.map +0 -1
- package/dist/esm/types/FormAttachment.js +0 -2
- package/dist/esm/types/FormAttachment.js.map +0 -1
- package/dist/types/FileAttachment/AttachmentEdit.d.ts +0 -6
- package/dist/types/FileAttachment/AttachmentEdit.d.ts.map +0 -1
- package/dist/types/FileAttachment/AttachmentListEdit.d.ts.map +0 -1
- package/dist/types/FileAttachment/AttachmentListView.d.ts.map +0 -1
- package/dist/types/FileAttachment/AttachmentScreen.d.ts.map +0 -1
- package/dist/types/FileAttachment/AttachmentView.d.ts +0 -6
- package/dist/types/FileAttachment/AttachmentView.d.ts.map +0 -1
- package/dist/types/FileAttachment/index.d.ts +0 -8
- package/dist/types/FileAttachment/index.d.ts.map +0 -1
- package/dist/types/FileAttachment/useFileAttachmentUrl.d.ts.map +0 -1
- package/dist/types/FileAttachment/useFileUrl.d.ts.map +0 -1
- package/dist/types/Form/EditFormAttachmentScreen.d.ts.map +0 -1
- package/dist/types/Form/FormSelectScreen.d.ts +0 -6
- package/dist/types/Form/FormSelectScreen.d.ts.map +0 -1
- package/dist/types/Form/FormSelectView.d.ts +0 -8
- package/dist/types/Form/FormSelectView.d.ts.map +0 -1
- package/dist/types/FormAttachment/FormAttachmentEdit.d.ts +0 -9
- package/dist/types/FormAttachment/FormAttachmentEdit.d.ts.map +0 -1
- package/dist/types/FormAttachment/FormAttachmentEditScreen.d.ts +0 -5
- package/dist/types/FormAttachment/FormAttachmentEditScreen.d.ts.map +0 -1
- package/dist/types/FormAttachment/FormAttachmentListEdit.d.ts +0 -11
- package/dist/types/FormAttachment/FormAttachmentListEdit.d.ts.map +0 -1
- package/dist/types/FormAttachment/FormAttachmentListScreen.d.ts +0 -7
- package/dist/types/FormAttachment/FormAttachmentListScreen.d.ts.map +0 -1
- package/dist/types/FormAttachment/FormAttachmentListView.d.ts +0 -5
- package/dist/types/FormAttachment/FormAttachmentListView.d.ts.map +0 -1
- package/dist/types/FormAttachment/FormAttachmentView.d.ts +0 -6
- package/dist/types/FormAttachment/FormAttachmentView.d.ts.map +0 -1
- package/dist/types/FormAttachment/index.d.ts +0 -7
- package/dist/types/FormAttachment/index.d.ts.map +0 -1
- package/dist/types/hooks/FileAttachmentApi.d.ts +0 -35
- package/dist/types/hooks/FileAttachmentApi.d.ts.map +0 -1
- package/dist/types/hooks/FormAttachmentApi.d.ts +0 -35
- package/dist/types/hooks/FormAttachmentApi.d.ts.map +0 -1
- package/dist/types/hooks/useCreateBlankFormAttachment.d.ts +0 -13
- package/dist/types/hooks/useCreateBlankFormAttachment.d.ts.map +0 -1
- package/dist/types/types/FileAttachment.d.ts.map +0 -1
- package/dist/types/types/FormAttachment.d.ts +0 -13
- package/dist/types/types/FormAttachment.d.ts.map +0 -1
- package/src/FileAttachment/index.ts +0 -7
- package/src/FormAttachment/FormAttachmentEdit.tsx +0 -72
- package/src/FormAttachment/FormAttachmentEditScreen.tsx +0 -21
- package/src/FormAttachment/FormAttachmentListEdit.tsx +0 -40
- package/src/FormAttachment/FormAttachmentListScreen.tsx +0 -62
- package/src/FormAttachment/FormAttachmentView.tsx +0 -25
- package/src/FormAttachment/index.ts +0 -6
- package/src/hooks/FormAttachmentApi.ts +0 -10
- package/src/hooks/useCreateBlankFormAttachment.ts +0 -20
- package/src/types/FormAttachment.ts +0 -19
- /package/dist/cjs/{FileAttachment → Attachment}/AttachmentScreen.js +0 -0
- /package/dist/esm/{FileAttachment → Attachment}/AttachmentScreen.js +0 -0
- /package/dist/types/{FileAttachment → Attachment}/useFileAttachmentUrl.d.ts +0 -0
- /package/dist/types/{FileAttachment → Attachment}/useFileUrl.d.ts +0 -0
- /package/src/{FileAttachment → Attachment}/AttachmentScreen.tsx +0 -0
|
@@ -7,8 +7,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
8
8
|
const components_expo_1 = require("@dwidge/components-expo");
|
|
9
9
|
const FileApi_1 = require("../hooks/FileApi");
|
|
10
|
-
const
|
|
10
|
+
const AttachmentApi_1 = require("../hooks/AttachmentApi");
|
|
11
11
|
const useParams_1 = require("../hooks/useParams");
|
|
12
|
-
const
|
|
12
|
+
const useIdFilter_1 = require("../hooks/useIdFilter");
|
|
13
|
+
const AttachmentEdit = ({ id = (0, useParams_1.useParams)().AttachmentId, attachment: [attachment] = AttachmentApi_1.AttachmentApi.useItem((0, useIdFilter_1.filterId)(id)), file: [file, setFile] = FileApi_1.FileApi.useItem((0, useIdFilter_1.filterId)(attachment?.FileId)), }) => (0, jsx_runtime_1.jsx)(components_expo_1.FileEdit, { file: [file, setFile] });
|
|
13
14
|
exports.AttachmentEdit = AttachmentEdit;
|
|
14
15
|
//# sourceMappingURL=AttachmentEdit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentEdit.js","sourceRoot":"","sources":["../../../src/Attachment/AttachmentEdit.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,6DAAmD;AACnD,8CAA2C;AAC3C,0DAAuD;AACvD,kDAA+C;AAC/C,sDAAgD;AAEzC,MAAM,cAAc,GAAG,CAAC,EAC7B,EAAE,GAAG,IAAA,qBAAS,GAAE,CAAC,YAAY,EAC7B,UAAU,EAAE,CAAC,UAAU,CAAC,GAAG,6BAAa,CAAC,OAAO,CAAC,IAAA,sBAAQ,EAAC,EAAE,CAAC,CAAC,EAC9D,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,iBAAO,CAAC,OAAO,CAAC,IAAA,sBAAQ,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC,GACtE,EAAE,EAAE,CAAC,uBAAC,0BAAQ,IAAC,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,GAAI,CAAC;AAJ7B,QAAA,cAAc,kBAIe"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AttachmentListEdit = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
// Copyright DWJ 2024.
|
|
9
|
+
// Distributed under the Boost Software License, Version 1.0.
|
|
10
|
+
// https://www.boost.org/LICENSE_1_0.txt
|
|
11
|
+
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
12
|
+
const assert_1 = __importDefault(require("assert"));
|
|
13
|
+
const react_1 = require("react");
|
|
14
|
+
const AttachmentApi_1 = require("../hooks/AttachmentApi");
|
|
15
|
+
const useCreateBlankAttachment_1 = require("../hooks/useCreateBlankAttachment");
|
|
16
|
+
const useParams_1 = require("../hooks/useParams");
|
|
17
|
+
const AttachmentEdit_1 = require("./AttachmentEdit");
|
|
18
|
+
const AttachmentListEdit = ({ ids = (0, useParams_1.useParams)(), elements = AttachmentApi_1.AttachmentApi.useGetList(ids), selection: [selection, setSelection] = (0, react_1.useState)([]), onCreateAttachment = (0, useCreateBlankAttachment_1.useCreateBlankAttachment)({ AttachIds: ids }), onDeleteAttachmentList = AttachmentApi_1.AttachmentApi.useDeleteList(), }) => ((0, jsx_runtime_1.jsxs)(components_rnw_1.StyledView, { column: true, children: [(0, jsx_runtime_1.jsx)(components_rnw_1.UnstyledList, { items: elements, keyExtractor: (item) => ((0, assert_1.default)(item.id), item.id), selection: [selection, setSelection], render: (item) => (0, jsx_runtime_1.jsx)(AttachmentEdit_1.AttachmentEdit, { id: item.id }), selectStyle: components_rnw_1.viewStyles.select, style: components_rnw_1.viewStyles.unselect }), (0, jsx_runtime_1.jsxs)(components_rnw_1.StyledView, { row: true, gap: true, center: true, middle: true, children: [(0, jsx_runtime_1.jsx)(components_rnw_1.StyledButton, { icon: "add", onPress: onCreateAttachment }), (0, jsx_runtime_1.jsx)(components_rnw_1.StyledButton, { icon: "remove", onPress: onDeleteAttachmentList &&
|
|
19
|
+
(() => onDeleteAttachmentList(selection.map((id) => ({ id })))) })] })] }));
|
|
20
|
+
exports.AttachmentListEdit = AttachmentListEdit;
|
|
21
|
+
//# sourceMappingURL=AttachmentListEdit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentListEdit.js","sourceRoot":"","sources":["../../../src/Attachment/AttachmentListEdit.tsx"],"names":[],"mappings":";;;;;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,2DAKgC;AAChC,oDAA4B;AAC5B,iCAAiC;AACjC,0DAAuD;AACvD,gFAA6E;AAC7E,kDAAuD;AACvD,qDAAkD;AAE3C,MAAM,kBAAkB,GAAG,CAAC,EACjC,GAAG,GAAG,IAAA,qBAAS,GAAY,EAC3B,QAAQ,GAAG,6BAAa,CAAC,UAAU,CAAC,GAAG,CAAC,EACxC,SAAS,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAW,EAAE,CAAC,EAC7D,kBAAkB,GAAG,IAAA,mDAAwB,EAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,EACjE,sBAAsB,GAAG,6BAAa,CAAC,aAAa,EAAE,GACvD,EAAE,EAAE,CAAC,CACJ,wBAAC,2BAAU,IAAC,MAAM,mBAChB,uBAAC,6BAAY,IACX,KAAK,EAAE,QAAQ,EACf,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAA,gBAAM,EAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,EAClD,SAAS,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,EACpC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,uBAAC,+BAAc,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,GAAI,EACjD,WAAW,EAAE,2BAAU,CAAC,MAAM,EAC9B,KAAK,EAAE,2BAAU,CAAC,QAAQ,GAC1B,EACF,wBAAC,2BAAU,IAAC,GAAG,QAAC,GAAG,QAAC,MAAM,QAAC,MAAM,mBAC/B,uBAAC,6BAAY,IAAC,IAAI,EAAC,KAAK,EAAC,OAAO,EAAE,kBAAkB,GAAI,EACxD,uBAAC,6BAAY,IACX,IAAI,EAAC,QAAQ,EACb,OAAO,EACL,sBAAsB;wBACtB,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAEjE,IACS,IACF,CACd,CAAC;AA3BW,QAAA,kBAAkB,sBA2B7B"}
|
|
@@ -5,9 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
// Copyright DWJ 2024.
|
|
6
6
|
// Distributed under the Boost Software License, Version 1.0.
|
|
7
7
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
8
|
-
const
|
|
8
|
+
const AttachmentApi_1 = require("../hooks/AttachmentApi");
|
|
9
9
|
const useParams_1 = require("../hooks/useParams");
|
|
10
10
|
const AttachmentView_1 = require("./AttachmentView");
|
|
11
|
-
const AttachmentListView = ({ ids = (0, useParams_1.useParams)(), attachments =
|
|
11
|
+
const AttachmentListView = ({ ids = (0, useParams_1.useParams)(), attachments = AttachmentApi_1.AttachmentApi.useGetList(ids), }) => attachments?.map((a) => (0, jsx_runtime_1.jsx)(AttachmentView_1.AttachmentView, { id: a.id }, a.id));
|
|
12
12
|
exports.AttachmentListView = AttachmentListView;
|
|
13
13
|
//# sourceMappingURL=AttachmentListView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentListView.js","sourceRoot":"","sources":["../../../src/Attachment/AttachmentListView.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,0DAAuD;AACvD,kDAA+C;AAC/C,qDAAkD;AAE3C,MAAM,kBAAkB,GAAG,CAAC,EACjC,GAAG,GAAG,IAAA,qBAAS,GAAE,EACjB,WAAW,GAAG,6BAAa,CAAC,UAAU,CAAC,GAAG,CAAC,GAC5C,EAAE,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAC,+BAAc,IAAY,EAAE,EAAE,CAAC,CAAC,EAAE,IAAd,CAAC,CAAC,EAAE,CAAc,CAAC,CAAC;AAH1D,QAAA,kBAAkB,sBAGwC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentScreen.js","sourceRoot":"","sources":["../../../src/Attachment/AttachmentScreen.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,6DAAuD;AACvD,2DAA4E;AAC5E,kDAA+C;AAC/C,6DAA0D;AAEnD,MAAM,gBAAgB,GAAG,CAAC,EAAE,GAAG,GAAG,IAAA,qBAAS,GAAE,EAAE,EAAE,EAAE,CAAC,CACzD,wBAAC,2BAAU,eACT,uBAAC,8BAAY,IAAC,KAAK,EAAC,aAAa,GAAG,EACpC,uBAAC,2BAAU,IAAC,GAAG,QAAC,GAAG,kBACjB,uBAAC,2BAAU,IAAC,IAAI,QAAC,MAAM,kBACrB,uBAAC,2BAAU,cACT,uBAAC,uCAAkB,IAAC,GAAG,EAAE,GAAG,GAAI,GACrB,GACF,GACF,IACF,CACd,CAAC;AAXW,QAAA,gBAAgB,oBAW3B"}
|
|
@@ -7,8 +7,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
8
8
|
const hooks_expo_1 = require("@dwidge/hooks-expo");
|
|
9
9
|
const components_expo_1 = require("@dwidge/components-expo");
|
|
10
|
-
const
|
|
10
|
+
const AttachmentApi_1 = require("../hooks/AttachmentApi");
|
|
11
11
|
const FileApi_1 = require("../hooks/FileApi");
|
|
12
|
-
const
|
|
12
|
+
const useIdFilter_1 = require("../hooks/useIdFilter");
|
|
13
|
+
const AttachmentView = ({ id = (0, hooks_expo_1.useIdStringParam)(), attachment: [attachment] = AttachmentApi_1.AttachmentApi.useItem((0, useIdFilter_1.filterId)(id)), file: [file, setFile] = FileApi_1.FileApi.useItem((0, useIdFilter_1.filterId)(attachment?.FileId)), }) => (0, jsx_runtime_1.jsx)(components_expo_1.FileView, { file: [file, setFile] });
|
|
13
14
|
exports.AttachmentView = AttachmentView;
|
|
14
15
|
//# sourceMappingURL=AttachmentView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentView.js","sourceRoot":"","sources":["../../../src/Attachment/AttachmentView.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,mDAAsD;AACtD,6DAAmD;AACnD,0DAAuD;AACvD,8CAA2C;AAC3C,sDAAgD;AAEzC,MAAM,cAAc,GAAG,CAAC,EAC7B,EAAE,GAAG,IAAA,6BAAgB,GAAE,EACvB,UAAU,EAAE,CAAC,UAAU,CAAC,GAAG,6BAAa,CAAC,OAAO,CAAC,IAAA,sBAAQ,EAAC,EAAE,CAAC,CAAC,EAC9D,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,iBAAO,CAAC,OAAO,CAAC,IAAA,sBAAQ,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC,GACtE,EAAE,EAAE,CAAC,uBAAC,0BAAQ,IAAC,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,GAAI,CAAC;AAJ7B,QAAA,cAAc,kBAIe"}
|
|
@@ -14,11 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./AttachmentEdit"), exports);
|
|
18
|
-
__exportStar(require("./AttachmentListEdit"), exports);
|
|
19
|
-
__exportStar(require("./AttachmentListView"), exports);
|
|
20
|
-
__exportStar(require("./AttachmentScreen"), exports);
|
|
21
|
-
__exportStar(require("./AttachmentView"), exports);
|
|
22
|
-
__exportStar(require("./useFileAttachmentUrl"), exports);
|
|
23
|
-
__exportStar(require("./useFileUrl"), exports);
|
|
17
|
+
__exportStar(require("./AttachmentEdit.js"), exports);
|
|
18
|
+
__exportStar(require("./AttachmentListEdit.js"), exports);
|
|
19
|
+
__exportStar(require("./AttachmentListView.js"), exports);
|
|
20
|
+
__exportStar(require("./AttachmentScreen.js"), exports);
|
|
21
|
+
__exportStar(require("./AttachmentView.js"), exports);
|
|
22
|
+
__exportStar(require("./useFileAttachmentUrl.js"), exports);
|
|
23
|
+
__exportStar(require("./useFileUrl.js"), exports);
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Attachment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,0DAAwC;AACxC,0DAAwC;AACxC,wDAAsC;AACtC,sDAAoC;AACpC,4DAA0C;AAC1C,kDAAgC"}
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useFileAttachmentUrl = void 0;
|
|
7
7
|
const FileApi_1 = require("../hooks/FileApi");
|
|
8
|
-
const
|
|
8
|
+
const AttachmentApi_1 = require("../hooks/AttachmentApi");
|
|
9
|
+
const useIdFilter_1 = require("../hooks/useIdFilter");
|
|
9
10
|
const useFileAttachmentUrl = (attachmentId) => useFileAttachmentUrlInternal(attachmentId);
|
|
10
11
|
exports.useFileAttachmentUrl = useFileAttachmentUrl;
|
|
11
|
-
const useFileAttachmentUrlInternal = (attachmentId, attachment =
|
|
12
|
+
const useFileAttachmentUrlInternal = (attachmentId, attachment = AttachmentApi_1.AttachmentApi.useGetItem((0, useIdFilter_1.filterId)(attachmentId)), file = FileApi_1.FileApi.useGetItem((0, useIdFilter_1.filterId)(attachment?.FileId))) => file?.getUrl;
|
|
12
13
|
//# sourceMappingURL=useFileAttachmentUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFileAttachmentUrl.js","sourceRoot":"","sources":["../../../src/Attachment/useFileAttachmentUrl.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;;;AAExC,8CAA2C;AAC3C,0DAAuD;AACvD,sDAAgD;AAEzC,MAAM,oBAAoB,GAAG,CAClC,YAAqB,EACM,EAAE,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;AAF9D,QAAA,oBAAoB,wBAE0C;AAC3E,MAAM,4BAA4B,GAAG,CACnC,YAAqB,EACrB,UAAU,GAAG,6BAAa,CAAC,UAAU,CAAC,IAAA,sBAAQ,EAAC,YAAY,CAAC,CAAC,EAC7D,IAAI,GAAG,iBAAO,CAAC,UAAU,CAAC,IAAA,sBAAQ,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC,EACvD,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC"}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useFileUrl = void 0;
|
|
7
7
|
const FileApi_1 = require("../hooks/FileApi");
|
|
8
|
+
const useIdFilter_1 = require("../hooks/useIdFilter");
|
|
8
9
|
const useFileUrl = (fileId) => useFileUrlInternal(fileId);
|
|
9
10
|
exports.useFileUrl = useFileUrl;
|
|
10
|
-
const useFileUrlInternal = (fileId, file = FileApi_1.FileApi.useGetItem(fileId)) => file?.getUrl;
|
|
11
|
+
const useFileUrlInternal = (fileId, file = FileApi_1.FileApi.useGetItem((0, useIdFilter_1.filterId)(fileId))) => file?.getUrl;
|
|
11
12
|
//# sourceMappingURL=useFileUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFileUrl.js","sourceRoot":"","sources":["../../../src/Attachment/useFileUrl.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;;;AAExC,8CAA2C;AAC3C,sDAAgD;AAEzC,MAAM,UAAU,GAAG,CAAC,MAAe,EAA6B,EAAE,CACvE,kBAAkB,CAAC,MAAM,CAAC,CAAC;AADhB,QAAA,UAAU,cACM;AAC7B,MAAM,kBAAkB,GAAG,CACzB,MAAe,EACf,IAAI,GAAG,iBAAO,CAAC,UAAU,CAAC,IAAA,sBAAQ,EAAC,MAAM,CAAC,CAAC,EAC3C,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC"}
|
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FormEdit = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
// Copyright DWJ 2024.
|
|
6
6
|
// Distributed under the Boost Software License, Version 1.0.
|
|
7
7
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
8
8
|
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
9
|
+
const hooks_expo_1 = require("@dwidge/hooks-expo");
|
|
10
|
+
const json_forms_designer_1 = require("@dwidge/json-forms-designer");
|
|
11
|
+
const react_1 = require("react");
|
|
12
|
+
const AttachmentListEdit_1 = require("../Attachment/AttachmentListEdit");
|
|
13
|
+
const hooks_1 = require("../hooks");
|
|
9
14
|
const FormApi_1 = require("../hooks/FormApi");
|
|
10
|
-
const
|
|
11
|
-
|
|
15
|
+
const FormsContext_1 = require("../hooks/FormsContext");
|
|
16
|
+
const SchemaApi_1 = require("../hooks/SchemaApi");
|
|
17
|
+
const useParams_1 = require("../hooks/useParams");
|
|
18
|
+
const FormEdit = ({ id = (0, useParams_1.useParams)().FormId, form: [form, setForm] = FormApi_1.FormApi.useItem((0, hooks_1.filterId)(id)), schema = SchemaApi_1.SchemaApi.useGetItem((0, hooks_1.filterId)(form?.SchemaId)), onEditSchema = (0, hooks_expo_1.useNavAction2)((0, react_1.useContext)(FormsContext_1.FormsContext).routes.SCHEMA_EDIT_SCREEN, async (SchemaId) => ({
|
|
19
|
+
SchemaId,
|
|
20
|
+
})), onSaveForm = (0, hooks_expo_1.useNavAction2)((0, react_1.useContext)(FormsContext_1.FormsContext).routes.FORM_LIST_SCREEN, async () => ({})), }) => form === undefined || schema === undefined ? ((0, jsx_runtime_1.jsx)(components_rnw_1.StyledLoader, {})) : form === null || schema === null ? ((0, jsx_runtime_1.jsx)(components_rnw_1.StyledText, { children: "No form" })) : schema.schema ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(json_forms_designer_1.FormSubmit, { dataString: [
|
|
21
|
+
form.data ?? json_forms_designer_1.defaultJsonFormDataString,
|
|
22
|
+
setForm &&
|
|
23
|
+
((data) => setForm((prev) => ({
|
|
24
|
+
...prev,
|
|
25
|
+
data: typeof data === "function"
|
|
26
|
+
? data(prev?.data ?? json_forms_designer_1.defaultJsonFormDataString)
|
|
27
|
+
: data,
|
|
28
|
+
}))),
|
|
29
|
+
], schemaString: [schema.schema ?? json_forms_designer_1.defaultFormSchemaString] }), (0, jsx_runtime_1.jsx)(AttachmentListEdit_1.AttachmentListEdit, { ids: { FormId: form.id } }), (0, jsx_runtime_1.jsx)(components_rnw_1.StyledButton, { onPress: onSaveForm, children: "Save" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_rnw_1.StyledText, { children: "This form design has not been created yet." }), onEditSchema && ((0, jsx_runtime_1.jsx)(components_rnw_1.StyledButton, { onPress: () => onEditSchema(schema.id), children: "Edit Form Design" }))] }));
|
|
30
|
+
exports.FormEdit = FormEdit;
|
|
12
31
|
//# sourceMappingURL=FormEdit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormEdit.js","sourceRoot":"","sources":["../../../src/Form/FormEdit.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,
|
|
1
|
+
{"version":3,"file":"FormEdit.js","sourceRoot":"","sources":["../../../src/Form/FormEdit.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,2DAAgF;AAChF,mDAAmD;AACnD,qEAIqC;AACrC,iCAAmC;AACnC,yEAAsE;AACtE,oCAAoC;AACpC,8CAA2C;AAC3C,wDAAqD;AACrD,kDAA+C;AAC/C,kDAA+C;AAExC,MAAM,QAAQ,GAAG,CAAC,EACvB,EAAE,GAAG,IAAA,qBAAS,GAAE,CAAC,MAAM,EACvB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,iBAAO,CAAC,OAAO,CAAC,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC,EACrD,MAAM,GAAG,qBAAS,CAAC,UAAU,CAAC,IAAA,gBAAQ,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,EACvD,YAAY,GAAG,IAAA,0BAAa,EAC1B,IAAA,kBAAU,EAAC,2BAAY,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAClD,KAAK,EAAE,QAAgB,EAAE,EAAE,CAAC,CAAC;IAC3B,QAAQ;CACT,CAAC,CACH,EACD,UAAU,GAAG,IAAA,0BAAa,EACxB,IAAA,kBAAU,EAAC,2BAAY,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAChD,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CACjB,GACF,EAAE,EAAE,CACH,IAAI,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAC3C,uBAAC,6BAAY,KAAG,CACjB,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,CACrC,uBAAC,2BAAU,0BAAqB,CACjC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAClB,6DACE,uBAAC,gCAAU,IACT,UAAU,EAAE;gBACV,IAAI,CAAC,IAAI,IAAI,+CAAyB;gBACtC,OAAO;oBACL,CAAC,CAAC,IAAI,EAAE,EAAE,CACR,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;wBACjB,GAAG,IAAI;wBACP,IAAI,EACF,OAAO,IAAI,KAAK,UAAU;4BACxB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,+CAAyB,CAAC;4BAC/C,CAAC,CAAC,IAAI;qBACX,CAAC,CAAC,CAAC;aACT,EACD,YAAY,EAAE,CAAC,MAAM,CAAC,MAAM,IAAI,6CAAuB,CAAC,GACxD,EACF,uBAAC,uCAAkB,IAAC,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,GAAI,EAChD,uBAAC,6BAAY,IAAC,OAAO,EAAE,UAAU,qBAAqB,IACrD,CACJ,CAAC,CAAC,CAAC,CACF,6DACE,uBAAC,2BAAU,6DAAwD,EAClE,YAAY,IAAI,CACf,uBAAC,6BAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,EAAG,CAAC,iCAEtC,CAChB,IACA,CACJ,CAAC;AAhDS,QAAA,QAAQ,YAgDjB"}
|
|
@@ -7,23 +7,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
8
8
|
const components_expo_1 = require("@dwidge/components-expo");
|
|
9
9
|
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
10
|
-
const
|
|
10
|
+
const SchemaApi_1 = require("../hooks/SchemaApi");
|
|
11
11
|
const FormApi_1 = require("../hooks/FormApi");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
setForm &&
|
|
16
|
-
((updater) => {
|
|
17
|
-
const next = typeof updater === "function"
|
|
18
|
-
? updater(form.schema ?? json_forms_designer_1.defaultFormSchemaString)
|
|
19
|
-
: updater;
|
|
20
|
-
const parsed = json_forms_designer_1.FormSchema.parse(JSON.parse(next));
|
|
21
|
-
setForm?.((prev) => ({
|
|
22
|
-
...prev,
|
|
23
|
-
name: parsed.schema.title,
|
|
24
|
-
schema: next,
|
|
25
|
-
}));
|
|
26
|
-
}),
|
|
27
|
-
] }) }))] }));
|
|
12
|
+
const FormEdit_1 = require("./FormEdit");
|
|
13
|
+
const hooks_1 = require("../hooks");
|
|
14
|
+
const FormEditScreen = ({ form = FormApi_1.FormApi.useGetItem((0, hooks_1.filterId)((0, hooks_1.useParams)().FormId)), schema = SchemaApi_1.SchemaApi.useGetItem((0, hooks_1.filterId)(form?.SchemaId)), }) => ((0, jsx_runtime_1.jsxs)(components_rnw_1.ScreenView, { children: [(0, jsx_runtime_1.jsx)(components_expo_1.StyledHeader, { title: ["Form", schema?.name].filter(Boolean).join(" - ") }), (0, jsx_runtime_1.jsx)(components_rnw_1.ScrollView, { flex: true, gap: true, pad: true, children: (0, jsx_runtime_1.jsx)(FormEdit_1.FormEdit, {}) })] }));
|
|
28
15
|
exports.FormEditScreen = FormEditScreen;
|
|
29
16
|
//# sourceMappingURL=FormEditScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormEditScreen.js","sourceRoot":"","sources":["../../../src/Form/FormEditScreen.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,6DAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"FormEditScreen.js","sourceRoot":"","sources":["../../../src/Form/FormEditScreen.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,6DAAuD;AACvD,2DAAgE;AAChE,kDAA+C;AAC/C,8CAA2C;AAC3C,yCAAsC;AACtC,oCAA+C;AAExC,MAAM,cAAc,GAAG,CAAC,EAC7B,IAAI,GAAG,iBAAO,CAAC,UAAU,CAAC,IAAA,gBAAQ,EAAC,IAAA,iBAAS,GAAE,CAAC,MAAM,CAAC,CAAC,EACvD,MAAM,GAAG,qBAAS,CAAC,UAAU,CAAC,IAAA,gBAAQ,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,GACxD,EAAE,EAAE,CAAC,CACJ,wBAAC,2BAAU,eACT,uBAAC,8BAAY,IAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAI,EAC3E,uBAAC,2BAAU,IAAC,IAAI,QAAC,GAAG,QAAC,GAAG,kBACtB,uBAAC,mBAAQ,KAAG,GACD,IACF,CACd,CAAC;AAVW,QAAA,cAAc,kBAUzB"}
|
|
@@ -10,13 +10,18 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
10
10
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
11
11
|
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
12
12
|
const hooks_expo_1 = require("@dwidge/hooks-expo");
|
|
13
|
+
const hooks_react_1 = require("@dwidge/hooks-react");
|
|
13
14
|
const assert_1 = __importDefault(require("assert"));
|
|
14
|
-
const
|
|
15
|
+
const hooks_1 = require("../hooks");
|
|
15
16
|
const FormApi_1 = require("../hooks/FormApi");
|
|
16
17
|
const FormsContext_1 = require("../hooks/FormsContext");
|
|
17
|
-
const
|
|
18
|
-
const FormListEdit = ({
|
|
18
|
+
const FormView_1 = require("./FormView");
|
|
19
|
+
const FormListEdit = ({ ids = (0, hooks_1.useParams)(), items = FormApi_1.FormApi.useGetList({
|
|
20
|
+
// id: undefined,
|
|
21
|
+
// data: undefined,
|
|
22
|
+
// ...ids,
|
|
23
|
+
}), selection: [selection, setSelection] = (0, hooks_react_1.useMemoState)([]), onPress = (0, hooks_expo_1.useNavAction2)((0, FormsContext_1.useNavRoutes)().FORM_EDIT_SCREEN, async (id) => ({
|
|
19
24
|
FormId: id,
|
|
20
|
-
})), }) => ((0, jsx_runtime_1.jsx)(components_rnw_1.UnstyledList, { items:
|
|
25
|
+
})), }) => ((0, jsx_runtime_1.jsx)(components_rnw_1.StyledView, { column: true, children: (0, jsx_runtime_1.jsx)(components_rnw_1.UnstyledList, { items: items, keyExtractor: (item) => ((0, assert_1.default)(item.id), item.id), selection: [selection, setSelection], render: (item) => (0, jsx_runtime_1.jsx)(FormView_1.FormView, { id: item.id }), selectStyle: components_rnw_1.viewStyles.select, style: components_rnw_1.viewStyles.unselect, onPress: onPress }) }));
|
|
21
26
|
exports.FormListEdit = FormListEdit;
|
|
22
27
|
//# sourceMappingURL=FormListEdit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormListEdit.js","sourceRoot":"","sources":["../../../src/Form/FormListEdit.tsx"],"names":[],"mappings":";;;;;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,
|
|
1
|
+
{"version":3,"file":"FormListEdit.js","sourceRoot":"","sources":["../../../src/Form/FormListEdit.tsx"],"names":[],"mappings":";;;;;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,2DAA8E;AAC9E,mDAAmD;AACnD,qDAAmD;AACnD,oDAA4B;AAC5B,oCAAqC;AACrC,8CAA2C;AAC3C,wDAAqD;AACrD,yCAAsC;AAE/B,MAAM,YAAY,GAAG,CAAC,EAC3B,GAAG,GAAG,IAAA,iBAAS,GAAE,EACjB,KAAK,GAAG,iBAAO,CAAC,UAAU,CAAC;AACzB,iBAAiB;AACjB,mBAAmB;AACnB,UAAU;CACX,CAAC,EACF,SAAS,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,0BAAY,EAAW,EAAE,CAAC,EACjE,OAAO,GAAG,IAAA,0BAAa,EACrB,IAAA,2BAAY,GAAE,CAAC,gBAAgB,EAC/B,KAAK,EAAE,EAAU,EAAE,EAAE,CAAC,CAAC;IACrB,MAAM,EAAE,EAAE;CACX,CAAC,CACH,GACF,EAAE,EAAE,CAAC,CACJ,uBAAC,2BAAU,IAAC,MAAM,kBAChB,uBAAC,6BAAY,IACX,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAA,gBAAM,EAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,EAClD,SAAS,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,EACpC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,uBAAC,mBAAQ,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,GAAI,EAC3C,WAAW,EAAE,2BAAU,CAAC,MAAM,EAC9B,KAAK,EAAE,2BAAU,CAAC,QAAQ,EAC1B,OAAO,EAAE,OAAO,GAChB,GACS,CACd,CAAC;AA1BW,QAAA,YAAY,gBA0BvB"}
|
|
@@ -7,22 +7,25 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
8
8
|
const components_expo_1 = require("@dwidge/components-expo");
|
|
9
9
|
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
10
|
+
const hooks_expo_1 = require("@dwidge/hooks-expo");
|
|
10
11
|
const hooks_react_1 = require("@dwidge/hooks-react");
|
|
11
12
|
const react_native_1 = require("react-native");
|
|
12
13
|
const FormApi_1 = require("../hooks/FormApi");
|
|
14
|
+
const FormsContext_1 = require("../hooks/FormsContext");
|
|
13
15
|
const FormListEdit_1 = require("./FormListEdit");
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
+
const FormListScreen = ({ createForm = (0, hooks_expo_1.useNavAction2)((0, FormsContext_1.useNavRoutes)().SCHEMA_SELECT_SCREEN, async () => ({})), editForm = (0, hooks_expo_1.useNavAction2)((0, FormsContext_1.useNavRoutes)().FORM_EDIT_SCREEN, async (key) => ({
|
|
17
|
+
FormId: key,
|
|
18
|
+
})), deleteFormList = FormApi_1.FormApi.useDeleteList(), selection = (0, hooks_react_1.useMemoState)([]), }) => ((0, jsx_runtime_1.jsxs)(components_rnw_1.ScreenView, { children: [(0, jsx_runtime_1.jsx)(components_expo_1.StyledHeader, { title: "Manage Forms", actions: [
|
|
16
19
|
{
|
|
17
20
|
icon: "remove-circle",
|
|
18
|
-
onPress:
|
|
19
|
-
? () =>
|
|
21
|
+
onPress: deleteFormList && selection[0].length
|
|
22
|
+
? () => deleteFormList(selection[0].map((id) => ({ id })))
|
|
20
23
|
: undefined,
|
|
21
24
|
},
|
|
22
25
|
{
|
|
23
26
|
icon: "add-circle",
|
|
24
|
-
onPress:
|
|
27
|
+
onPress: createForm,
|
|
25
28
|
},
|
|
26
|
-
] }), (0, jsx_runtime_1.
|
|
29
|
+
] }), (0, jsx_runtime_1.jsxs)(components_rnw_1.ScrollView, { gap: true, children: [(0, jsx_runtime_1.jsx)(FormListEdit_1.FormListEdit, { selection: selection, onPress: editForm }), (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: { flex: 1 }, onPress: createForm, children: (0, jsx_runtime_1.jsx)(components_rnw_1.CenterView, { row: true, gap: true, children: (0, jsx_runtime_1.jsx)(components_rnw_1.StyledFontAwesome, { name: "plus", size: 30 }) }) })] })] }));
|
|
27
30
|
exports.FormListScreen = FormListScreen;
|
|
28
31
|
//# sourceMappingURL=FormListScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormListScreen.js","sourceRoot":"","sources":["../../../src/Form/FormListScreen.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,6DAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"FormListScreen.js","sourceRoot":"","sources":["../../../src/Form/FormListScreen.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,6DAAuD;AACvD,2DAKgC;AAChC,mDAAmD;AACnD,qDAAmD;AACnD,+CAAgD;AAChD,8CAA2C;AAC3C,wDAAqD;AACrD,iDAA8C;AAEvC,MAAM,cAAc,GAAG,CAAC,EAC7B,UAAU,GAAG,IAAA,0BAAa,EACxB,IAAA,2BAAY,GAAE,CAAC,oBAAoB,EACnC,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CACjB,EACD,QAAQ,GAAG,IAAA,0BAAa,EACtB,IAAA,2BAAY,GAAE,CAAC,gBAAgB,EAC/B,KAAK,EAAE,GAAW,EAAE,EAAE,CAAC,CAAC;IACtB,MAAM,EAAE,GAAG;CACZ,CAAC,CACH,EACD,cAAc,GAAG,iBAAO,CAAC,aAAa,EAAE,EACxC,SAAS,GAAG,IAAA,0BAAY,EAAW,EAAE,CAAC,GACvC,EAAE,EAAE,CAAC,CACJ,wBAAC,2BAAU,eACT,uBAAC,8BAAY,IACX,KAAK,EAAC,cAAc,EACpB,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,eAAe;oBACrB,OAAO,EACL,cAAc,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM;wBACnC,CAAC,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;wBAC1D,CAAC,CAAC,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,YAAY;oBAClB,OAAO,EAAE,UAAU;iBACpB;aACF,GACD,EACF,wBAAC,2BAAU,IAAC,GAAG,mBACb,uBAAC,2BAAY,IAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,GAAI,EACzD,uBAAC,+BAAgB,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,YACvD,uBAAC,2BAAU,IAAC,GAAG,QAAC,GAAG,kBACjB,uBAAC,kCAAiB,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,EAAE,GAAI,GAChC,GACI,IACR,IACF,CACd,CAAC;AAxCW,QAAA,cAAc,kBAwCzB"}
|
|
@@ -9,10 +9,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
9
9
|
// Distributed under the Boost Software License, Version 1.0.
|
|
10
10
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
11
11
|
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
12
|
+
const hooks_expo_1 = require("@dwidge/hooks-expo");
|
|
12
13
|
const assert_1 = __importDefault(require("assert"));
|
|
13
|
-
const react_1 = require("react");
|
|
14
14
|
const FormApi_1 = require("../hooks/FormApi");
|
|
15
|
+
const FormsContext_1 = require("../hooks/FormsContext");
|
|
15
16
|
const FormView_1 = require("./FormView");
|
|
16
|
-
const FormListView = ({
|
|
17
|
+
const FormListView = ({ attachments = FormApi_1.FormApi.useGetList({}), onPressItem = (0, hooks_expo_1.useNavAction2)((0, FormsContext_1.useNavRoutes)().FORM_EDIT_SCREEN, async (id) => ({
|
|
18
|
+
FormId: id,
|
|
19
|
+
})), }) => ((0, jsx_runtime_1.jsx)(components_rnw_1.UnstyledList, { items: attachments, keyExtractor: (item) => ((0, assert_1.default)(item.id), item.id), selection: [[], () => { }], render: (item) => (0, jsx_runtime_1.jsx)(FormView_1.FormView, { id: item.id }), selectStyle: components_rnw_1.viewStyles.select, style: components_rnw_1.viewStyles.unselect, onPress: onPressItem }));
|
|
17
20
|
exports.FormListView = FormListView;
|
|
18
21
|
//# sourceMappingURL=FormListView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormListView.js","sourceRoot":"","sources":["../../../src/Form/FormListView.tsx"],"names":[],"mappings":";;;;;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,2DAAkE;AAClE,oDAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"FormListView.js","sourceRoot":"","sources":["../../../src/Form/FormListView.tsx"],"names":[],"mappings":";;;;;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,2DAAkE;AAClE,mDAAmD;AACnD,oDAA4B;AAC5B,8CAA2C;AAC3C,wDAAqD;AACrD,yCAAsC;AAE/B,MAAM,YAAY,GAAG,CAAC,EAC3B,WAAW,GAAG,iBAAO,CAAC,UAAU,CAAC,EAAE,CAAC,EACpC,WAAW,GAAG,IAAA,0BAAa,EACzB,IAAA,2BAAY,GAAE,CAAC,gBAAgB,EAC/B,KAAK,EAAE,EAAU,EAAE,EAAE,CAAC,CAAC;IACrB,MAAM,EAAE,EAAE;CACX,CAAC,CACH,GACF,EAAE,EAAE,CAAC,CACJ,uBAAC,6BAAY,IACX,KAAK,EAAE,WAAW,EAClB,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAA,gBAAM,EAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,EAClD,SAAS,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,EACzB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,uBAAC,mBAAQ,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,GAAI,EAC3C,WAAW,EAAE,2BAAU,CAAC,MAAM,EAC9B,KAAK,EAAE,2BAAU,CAAC,QAAQ,EAC1B,OAAO,EAAE,WAAW,GACpB,CACH,CAAC;AAlBW,QAAA,YAAY,gBAkBvB"}
|
|
@@ -5,8 +5,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
// Copyright DWJ 2024.
|
|
6
6
|
// Distributed under the Boost Software License, Version 1.0.
|
|
7
7
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
8
|
+
const components_expo_1 = require("@dwidge/components-expo");
|
|
8
9
|
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
10
|
+
const SchemaApi_1 = require("../hooks/SchemaApi");
|
|
9
11
|
const FormApi_1 = require("../hooks/FormApi");
|
|
10
|
-
const
|
|
12
|
+
const useParams_1 = require("../hooks/useParams");
|
|
13
|
+
const hooks_1 = require("../hooks");
|
|
14
|
+
const FormView = ({ id = (0, useParams_1.useParams)().FormId, attachment: [attachment, setAttachment] = FormApi_1.FormApi.useItem((0, hooks_1.filterId)(id)), form = SchemaApi_1.SchemaApi.useGetItem((0, hooks_1.filterId)(attachment?.SchemaId)), }) => attachment && form ? ((0, jsx_runtime_1.jsxs)(components_rnw_1.StyledView, { space: true, outline: true, gap: true, pad: true, flex: true, children: [(0, jsx_runtime_1.jsx)(components_rnw_1.StyledText, { children: form.name || "untitled" }), attachment.createdAt && ((0, jsx_runtime_1.jsx)(components_expo_1.StyledDate, { children: attachment.createdAt * 1000 }))] })) : ((0, jsx_runtime_1.jsx)(components_rnw_1.StyledLoader, {}));
|
|
11
15
|
exports.FormView = FormView;
|
|
12
16
|
//# sourceMappingURL=FormView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormView.js","sourceRoot":"","sources":["../../../src/Form/FormView.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,
|
|
1
|
+
{"version":3,"file":"FormView.js","sourceRoot":"","sources":["../../../src/Form/FormView.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,6DAAqD;AACrD,2DAA8E;AAC9E,kDAA+C;AAC/C,8CAA2C;AAC3C,kDAA+C;AAC/C,oCAAoC;AAE7B,MAAM,QAAQ,GAAG,CAAC,EACvB,EAAE,GAAG,IAAA,qBAAS,GAAE,CAAC,MAAM,EACvB,UAAU,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,iBAAO,CAAC,OAAO,CAAC,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC,EACvE,IAAI,GAAG,qBAAS,CAAC,UAAU,CAAC,IAAA,gBAAQ,EAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,GAC5D,EAAE,EAAE,CACH,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,CACnB,wBAAC,2BAAU,IAAC,KAAK,QAAC,OAAO,QAAC,GAAG,QAAC,GAAG,QAAC,IAAI,mBACpC,uBAAC,2BAAU,cAAE,IAAI,CAAC,IAAI,IAAI,UAAU,GAAc,EACjD,UAAU,CAAC,SAAS,IAAI,CACvB,uBAAC,4BAAU,cAAE,UAAU,CAAC,SAAS,GAAG,IAAI,GAAc,CACvD,IACU,CACd,CAAC,CAAC,CAAC,CACF,uBAAC,6BAAY,KAAG,CACjB,CAAC;AAdS,QAAA,QAAQ,YAcjB"}
|
package/dist/cjs/Form/index.js
CHANGED
|
@@ -14,13 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
23
|
-
__exportStar(require("./FormSelectScreen"), exports);
|
|
24
|
-
__exportStar(require("./FormSelectView"), exports);
|
|
25
|
-
__exportStar(require("./FormView"), exports);
|
|
17
|
+
__exportStar(require("./FormEdit.js"), exports);
|
|
18
|
+
__exportStar(require("./FormEditScreen.js"), exports);
|
|
19
|
+
__exportStar(require("./FormListEdit.js"), exports);
|
|
20
|
+
__exportStar(require("./FormListScreen.js"), exports);
|
|
21
|
+
__exportStar(require("./FormListView.js"), exports);
|
|
22
|
+
__exportStar(require("./FormView.js"), exports);
|
|
26
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Form/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Form/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,gDAA8B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.EditSchemaScreen = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
// Copyright DWJ 2024.
|
|
6
6
|
// Distributed under the Boost Software License, Version 1.0.
|
|
@@ -56,6 +56,6 @@ const Form = zod_1.z.object({
|
|
|
56
56
|
id: zod_1.z.string(),
|
|
57
57
|
schema: JsonFormSchema,
|
|
58
58
|
});
|
|
59
|
-
const
|
|
60
|
-
exports.
|
|
61
|
-
//# sourceMappingURL=
|
|
59
|
+
const EditSchemaScreen = ({ form: [form, setForm] = useForm(useFormId()), }) => ((0, jsx_runtime_1.jsxs)(components_rnw_1.ScreenView, { children: [(0, jsx_runtime_1.jsx)(components_expo_1.StyledHeader, { title: "Edit Schema" }), form == null || !form ? ((0, jsx_runtime_1.jsx)(components_rnw_1.CenterView, { children: (0, jsx_runtime_1.jsx)(components_rnw_1.StyledText, { children: form === null ? "The form schema does not exist." : "Loading..." }) })) : ((0, jsx_runtime_1.jsx)(components_rnw_1.ScrollView, { flex: true, gap: true, wide: true, pad: true, selfcenter: true, children: (0, jsx_runtime_1.jsx)(json_schema_form_rnw_1.JSONSchemaForm, { name: "Schema", schema: formSchema, value: form, onChange: setForm }) }))] }));
|
|
60
|
+
exports.EditSchemaScreen = EditSchemaScreen;
|
|
61
|
+
//# sourceMappingURL=EditSchemaScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditSchemaScreen.js","sourceRoot":"","sources":["../../../src/Schema/EditSchemaScreen.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,6DAAuD;AACvD,2DAKgC;AAChC,uEAA8D;AAE9D,iCAAiC;AACjC,6BAAwB;AAExB,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC;AAC9B,MAAM,OAAO,GAAG,CAAC,EAAW,EAAE,EAAE,CAC9B,IAAA,gBAAQ,EAA0B;IAChC,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,EAAE;CACX,CAAC,CAAC;AAaL,MAAM,UAAU,GAA6B;IAC3C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAM;SACd;QACD,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,MAAM;qBACd;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC;wBACrC,KAAK,EAAE,MAAM;qBACd;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,UAAU;qBAClB;iBACF;gBACD,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC;aACxC;SACF;KACF;IACD,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;CAC9B,CAAC;AAEF,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEH,MAAM,IAAI,GAAG,OAAC,CAAC,MAAM,CAAC;IACpB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,MAAM,EAAE,cAAc;CACvB,CAAC,CAAC;AAEI,MAAM,gBAAgB,GAAG,CAAC,EAC/B,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,GAC7C,EAAE,EAAE,CAAC,CACJ,wBAAC,2BAAU,eACT,uBAAC,8BAAY,IAAC,KAAK,EAAC,aAAa,GAAG,EACnC,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACvB,uBAAC,2BAAU,cACT,uBAAC,2BAAU,cACR,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,YAAY,GACtD,GACF,CACd,CAAC,CAAC,CAAC,CACF,uBAAC,2BAAU,IAAC,IAAI,QAAC,GAAG,QAAC,IAAI,QAAC,GAAG,QAAC,UAAU,kBACtC,uBAAC,qCAAc,IACb,IAAI,EAAC,QAAQ,EACb,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,OAAO,GACjB,GACS,CACd,IACU,CACd,CAAC;AAtBW,QAAA,gBAAgB,oBAsB3B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaCard = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
// Copyright DWJ 2024.
|
|
6
|
+
// Distributed under the Boost Software License, Version 1.0.
|
|
7
|
+
// https://www.boost.org/LICENSE_1_0.txt
|
|
8
|
+
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
9
|
+
const SchemaApi_1 = require("../hooks/SchemaApi");
|
|
10
|
+
const SchemaCard = ({ form = SchemaApi_1.SchemaApi.useGetItem() }) => form ? ((0, jsx_runtime_1.jsx)(components_rnw_1.StyledView, { flex: true, card: true, row: true, children: (0, jsx_runtime_1.jsx)(components_rnw_1.StyledText, { children: form.name ?? "untitled" }) })) : ((0, jsx_runtime_1.jsx)(components_rnw_1.StyledLoader, {}));
|
|
11
|
+
exports.SchemaCard = SchemaCard;
|
|
12
|
+
//# sourceMappingURL=SchemaEdit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaEdit.js","sourceRoot":"","sources":["../../../src/Schema/SchemaEdit.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,2DAA8E;AAC9E,kDAA+C;AAExC,MAAM,UAAU,GAAG,CAAC,EAAE,IAAI,GAAG,qBAAS,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,CAC9D,IAAI,CAAC,CAAC,CAAC,CACL,uBAAC,2BAAU,IAAC,IAAI,QAAC,IAAI,QAAC,GAAG,kBACvB,uBAAC,2BAAU,cAAE,IAAI,CAAC,IAAI,IAAI,UAAU,GAAc,GACvC,CACd,CAAC,CAAC,CAAC,CACF,uBAAC,6BAAY,KAAG,CACjB,CAAC;AAPS,QAAA,UAAU,cAOnB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaEditScreen = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
// Copyright DWJ 2024.
|
|
6
|
+
// Distributed under the Boost Software License, Version 1.0.
|
|
7
|
+
// https://www.boost.org/LICENSE_1_0.txt
|
|
8
|
+
const components_expo_1 = require("@dwidge/components-expo");
|
|
9
|
+
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
10
|
+
const json_forms_designer_1 = require("@dwidge/json-forms-designer");
|
|
11
|
+
const SchemaApi_1 = require("../hooks/SchemaApi");
|
|
12
|
+
const useParams_1 = require("../hooks/useParams");
|
|
13
|
+
const hooks_1 = require("../hooks");
|
|
14
|
+
const SchemaEditScreen = ({ schema: [schema, setSchema] = SchemaApi_1.SchemaApi.useItem((0, hooks_1.filterId)((0, useParams_1.useParams)().SchemaId)), }) => ((0, jsx_runtime_1.jsxs)(components_rnw_1.ScreenView, { children: [(0, jsx_runtime_1.jsx)(components_expo_1.StyledHeader, { title: ["Form", schema?.name].filter(Boolean).join(" - ") }), schema == null || !schema ? ((0, jsx_runtime_1.jsx)(components_rnw_1.CenterView, { children: (0, jsx_runtime_1.jsx)(components_rnw_1.StyledText, { children: schema === null ? "The form does not exist." : "Loading..." }) })) : ((0, jsx_runtime_1.jsx)(components_rnw_1.ScrollView, { flex: true, gap: true, wide: true, pad: true, selfcenter: true, children: (0, jsx_runtime_1.jsx)(json_forms_designer_1.FormDesigner, { schemaString: [
|
|
15
|
+
schema.schema ?? json_forms_designer_1.defaultFormSchemaString,
|
|
16
|
+
setSchema &&
|
|
17
|
+
((updater) => {
|
|
18
|
+
const next = typeof updater === "function"
|
|
19
|
+
? updater(schema.schema ?? json_forms_designer_1.defaultFormSchemaString)
|
|
20
|
+
: updater;
|
|
21
|
+
const parsed = json_forms_designer_1.FormSchema.parse(JSON.parse(next));
|
|
22
|
+
setSchema?.((prev) => ({
|
|
23
|
+
...prev,
|
|
24
|
+
name: parsed.schema.title,
|
|
25
|
+
schema: next,
|
|
26
|
+
}));
|
|
27
|
+
}),
|
|
28
|
+
] }) }))] }));
|
|
29
|
+
exports.SchemaEditScreen = SchemaEditScreen;
|
|
30
|
+
//# sourceMappingURL=SchemaEditScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaEditScreen.js","sourceRoot":"","sources":["../../../src/Schema/SchemaEditScreen.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,6DAAuD;AACvD,2DAKgC;AAChC,qEAIqC;AACrC,kDAA+C;AAC/C,kDAA+C;AAC/C,oCAAoC;AAE7B,MAAM,gBAAgB,GAAG,CAAC,EAC/B,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,qBAAS,CAAC,OAAO,CAC7C,IAAA,gBAAQ,EAAC,IAAA,qBAAS,GAAE,CAAC,QAAQ,CAAC,CAC/B,GACF,EAAE,EAAE,CAAC,CACJ,wBAAC,2BAAU,eACT,uBAAC,8BAAY,IAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAI,EAC1E,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAC3B,uBAAC,2BAAU,cACT,uBAAC,2BAAU,cACR,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,YAAY,GACjD,GACF,CACd,CAAC,CAAC,CAAC,CACF,uBAAC,2BAAU,IAAC,IAAI,QAAC,GAAG,QAAC,IAAI,QAAC,GAAG,QAAC,UAAU,kBACtC,uBAAC,kCAAY,IACX,YAAY,EAAE;oBACZ,MAAM,CAAC,MAAM,IAAI,6CAAuB;oBACxC,SAAS;wBACP,CAAC,CAAC,OAAO,EAAE,EAAE;4BACX,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,UAAU;gCAC3B,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,6CAAuB,CAAC;gCACnD,CAAC,CAAC,OAAO,CAAC;4BACd,MAAM,MAAM,GAAG,gCAAU,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;4BAClD,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gCACrB,GAAG,IAAI;gCACP,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK;gCACzB,MAAM,EAAE,IAAI;6BACb,CAAC,CAAC,CAAC;wBACN,CAAC,CAAC;iBACL,GACD,GACS,CACd,IACU,CACd,CAAC;AApCW,QAAA,gBAAgB,oBAoC3B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SchemaListEdit = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
// Copyright DWJ 2024.
|
|
9
|
+
// Distributed under the Boost Software License, Version 1.0.
|
|
10
|
+
// https://www.boost.org/LICENSE_1_0.txt
|
|
11
|
+
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
12
|
+
const hooks_expo_1 = require("@dwidge/hooks-expo");
|
|
13
|
+
const assert_1 = __importDefault(require("assert"));
|
|
14
|
+
const react_1 = require("react");
|
|
15
|
+
const SchemaApi_1 = require("../hooks/SchemaApi");
|
|
16
|
+
const FormsContext_1 = require("../hooks/FormsContext");
|
|
17
|
+
const SchemaEdit_1 = require("./SchemaEdit");
|
|
18
|
+
const SchemaListEdit = ({ elements = SchemaApi_1.SchemaApi.useGetList(), selection: [selection, setSelection] = (0, react_1.useState)([]), onPress = (0, hooks_expo_1.useNavAction2)((0, FormsContext_1.useNavRoutes)().SCHEMA_EDIT_SCREEN, async (id) => ({
|
|
19
|
+
SchemaId: id,
|
|
20
|
+
})), }) => ((0, jsx_runtime_1.jsx)(components_rnw_1.UnstyledList, { items: elements, keyExtractor: (item) => ((0, assert_1.default)(item.id), item.id), selection: [selection, setSelection], render: (item) => (0, jsx_runtime_1.jsx)(SchemaEdit_1.SchemaCard, { form: item }), selectStyle: components_rnw_1.viewStyles.select, style: components_rnw_1.viewStyles.unselect, onPress: onPress }));
|
|
21
|
+
exports.SchemaListEdit = SchemaListEdit;
|
|
22
|
+
//# sourceMappingURL=SchemaListEdit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaListEdit.js","sourceRoot":"","sources":["../../../src/Schema/SchemaListEdit.tsx"],"names":[],"mappings":";;;;;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,2DAAkE;AAClE,mDAAmD;AACnD,oDAA4B;AAC5B,iCAAiC;AACjC,kDAA+C;AAC/C,wDAAqD;AACrD,6CAA0C;AAEnC,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,GAAG,qBAAS,CAAC,UAAU,EAAE,EACjC,SAAS,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAW,EAAE,CAAC,EAC7D,OAAO,GAAG,IAAA,0BAAa,EACrB,IAAA,2BAAY,GAAE,CAAC,kBAAkB,EACjC,KAAK,EAAE,EAAU,EAAE,EAAE,CAAC,CAAC;IACrB,QAAQ,EAAE,EAAE;CACb,CAAC,CACH,GACF,EAAE,EAAE,CAAC,CACJ,uBAAC,6BAAY,IACX,KAAK,EAAE,QAAQ,EACf,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAA,gBAAM,EAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,EAClD,SAAS,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,EACpC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,uBAAC,uBAAU,IAAC,IAAI,EAAE,IAAI,GAAI,EAC5C,WAAW,EAAE,2BAAU,CAAC,MAAM,EAC9B,KAAK,EAAE,2BAAU,CAAC,QAAQ,EAC1B,OAAO,EAAE,OAAO,GAChB,CACH,CAAC;AAnBW,QAAA,cAAc,kBAmBzB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaListScreen = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
// Copyright DWJ 2024.
|
|
6
|
+
// Distributed under the Boost Software License, Version 1.0.
|
|
7
|
+
// https://www.boost.org/LICENSE_1_0.txt
|
|
8
|
+
const components_expo_1 = require("@dwidge/components-expo");
|
|
9
|
+
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
10
|
+
const hooks_react_1 = require("@dwidge/hooks-react");
|
|
11
|
+
const react_native_1 = require("react-native");
|
|
12
|
+
const SchemaApi_1 = require("../hooks/SchemaApi");
|
|
13
|
+
const SchemaListEdit_1 = require("./SchemaListEdit");
|
|
14
|
+
const useCreateBlankSchema_1 = require("../hooks/useCreateBlankSchema");
|
|
15
|
+
const SchemaListScreen = ({ onCreate = (0, useCreateBlankSchema_1.useCreateBlankSchema)(), onDeleteList = SchemaApi_1.SchemaApi.useDeleteList(), selection = (0, hooks_react_1.useMemoState)([]), }) => ((0, jsx_runtime_1.jsxs)(components_rnw_1.ScreenView, { children: [(0, jsx_runtime_1.jsx)(components_expo_1.StyledHeader, { title: "Schemas", actions: [
|
|
16
|
+
{
|
|
17
|
+
icon: "remove-circle",
|
|
18
|
+
onPress: onDeleteList && selection[0].length
|
|
19
|
+
? () => onDeleteList(selection[0].map((id) => ({ id })))
|
|
20
|
+
: undefined,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
icon: "add-circle",
|
|
24
|
+
onPress: onCreate,
|
|
25
|
+
},
|
|
26
|
+
] }), (0, jsx_runtime_1.jsx)(components_rnw_1.ScrollView, { gap: true, pad: true, children: (0, jsx_runtime_1.jsxs)(components_rnw_1.StyledView, { flex: true, column: true, children: [(0, jsx_runtime_1.jsx)(components_rnw_1.StyledView, { children: (0, jsx_runtime_1.jsx)(SchemaListEdit_1.SchemaListEdit, { selection: selection }) }), (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: { flex: 1 }, onPress: onCreate, children: (0, jsx_runtime_1.jsx)(components_rnw_1.CenterView, { row: true, gap: true, children: (0, jsx_runtime_1.jsx)(components_rnw_1.StyledFontAwesome, { name: "plus", size: 30 }) }) })] }) })] }));
|
|
27
|
+
exports.SchemaListScreen = SchemaListScreen;
|
|
28
|
+
//# sourceMappingURL=SchemaListScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaListScreen.js","sourceRoot":"","sources":["../../../src/Schema/SchemaListScreen.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,6DAAuD;AACvD,2DAMgC;AAChC,qDAAmD;AACnD,+CAAgD;AAChD,kDAA+C;AAC/C,qDAAkD;AAClD,wEAAqE;AAE9D,MAAM,gBAAgB,GAAG,CAAC,EAC/B,QAAQ,GAAG,IAAA,2CAAoB,GAAE,EACjC,YAAY,GAAG,qBAAS,CAAC,aAAa,EAAE,EACxC,SAAS,GAAG,IAAA,0BAAY,EAAW,EAAE,CAAC,GACvC,EAAE,EAAE,CAAC,CACJ,wBAAC,2BAAU,eACT,uBAAC,8BAAY,IACX,KAAK,EAAC,SAAS,EACf,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,eAAe;oBACrB,OAAO,EACL,YAAY,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM;wBACjC,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;wBACxD,CAAC,CAAC,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,YAAY;oBAClB,OAAO,EAAE,QAAQ;iBAClB;aACF,GACD,EACF,uBAAC,2BAAU,IAAC,GAAG,QAAC,GAAG,kBACjB,wBAAC,2BAAU,IAAC,IAAI,QAAC,MAAM,mBACrB,uBAAC,2BAAU,cACT,uBAAC,+BAAc,IAAC,SAAS,EAAE,SAAS,GAAI,GAC7B,EACb,uBAAC,+BAAgB,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,QAAQ,YACrD,uBAAC,2BAAU,IAAC,GAAG,QAAC,GAAG,kBACjB,uBAAC,kCAAiB,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,EAAE,GAAI,GAChC,GACI,IACR,GACF,IACF,CACd,CAAC;AAnCW,QAAA,gBAAgB,oBAmC3B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SchemaListView = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
// Copyright DWJ 2024.
|
|
9
|
+
// Distributed under the Boost Software License, Version 1.0.
|
|
10
|
+
// https://www.boost.org/LICENSE_1_0.txt
|
|
11
|
+
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
12
|
+
const assert_1 = __importDefault(require("assert"));
|
|
13
|
+
const react_1 = require("react");
|
|
14
|
+
const SchemaApi_1 = require("../hooks/SchemaApi");
|
|
15
|
+
const SchemaView_1 = require("./SchemaView");
|
|
16
|
+
const SchemaListView = ({ elements = SchemaApi_1.SchemaApi.useGetList(), selection: [selection, setSelection] = (0, react_1.useState)([]), }) => ((0, jsx_runtime_1.jsx)(components_rnw_1.UnstyledList, { items: elements, keyExtractor: (item) => ((0, assert_1.default)(item.id), item.id), selection: [selection, setSelection], render: (item) => (0, jsx_runtime_1.jsx)(SchemaView_1.SchemaView, { form: item }), selectStyle: components_rnw_1.viewStyles.select, style: components_rnw_1.viewStyles.unselect }));
|
|
17
|
+
exports.SchemaListView = SchemaListView;
|
|
18
|
+
//# sourceMappingURL=SchemaListView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaListView.js","sourceRoot":"","sources":["../../../src/Schema/SchemaListView.tsx"],"names":[],"mappings":";;;;;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,2DAAkE;AAClE,oDAA4B;AAC5B,iCAAiC;AACjC,kDAA+C;AAC/C,6CAA0C;AAEnC,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,GAAG,qBAAS,CAAC,UAAU,EAAE,EACjC,SAAS,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAW,EAAE,CAAC,GAC9D,EAAE,EAAE,CAAC,CACJ,uBAAC,6BAAY,IACX,KAAK,EAAE,QAAQ,EACf,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAA,gBAAM,EAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,EAClD,SAAS,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,EACpC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,uBAAC,uBAAU,IAAC,IAAI,EAAE,IAAI,GAAI,EAC5C,WAAW,EAAE,2BAAU,CAAC,MAAM,EAC9B,KAAK,EAAE,2BAAU,CAAC,QAAQ,GAC1B,CACH,CAAC;AAZW,QAAA,cAAc,kBAYzB"}
|