@dwidge/json-forms-expo 0.0.2 → 0.0.3
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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaSelectScreen = 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 react_1 = require("react");
|
|
9
|
+
const components_rnw_1 = require("@dwidge/components-rnw");
|
|
10
|
+
const hooks_expo_1 = require("@dwidge/hooks-expo");
|
|
11
|
+
const components_rnw_2 = require("@dwidge/components-rnw");
|
|
12
|
+
const SchemaSelectView_1 = require("./SchemaSelectView");
|
|
13
|
+
const FormsContext_1 = require("../hooks/FormsContext");
|
|
14
|
+
const components_expo_1 = require("@dwidge/components-expo");
|
|
15
|
+
const hooks_1 = require("../hooks");
|
|
16
|
+
const useOnSelectSchema = () => (0, hooks_expo_1.useNavAction2)((0, FormsContext_1.useNavRoutes)().FORM_EDIT_SCREEN, (0, hooks_1.useCreateBlankForm)({}));
|
|
17
|
+
const SchemaSelectScreen = ({ onSelectSchema = useOnSelectSchema(), selected: [selected, setSelected] = (0, react_1.useState)([]), }) => ((0, jsx_runtime_1.jsxs)(components_rnw_1.ScreenView, { children: [(0, jsx_runtime_1.jsx)(components_expo_1.StyledHeader, { title: "Select Schema" }), (0, jsx_runtime_1.jsxs)(components_rnw_1.ScrollView, { gap: true, pad: true, children: [(0, jsx_runtime_1.jsx)(components_rnw_1.StyledView, { children: (0, jsx_runtime_1.jsx)(components_rnw_1.StyledText, { center: true, children: "Select one or more" }) }), (0, jsx_runtime_1.jsx)(SchemaSelectView_1.SchemaSelectView, { selected: [selected, setSelected] }), (0, jsx_runtime_1.jsx)(components_rnw_2.StyledButton, { onPress: selected.length > 0 && onSelectSchema
|
|
18
|
+
? () => onSelectSchema(selected.map((id) => ({ id })))
|
|
19
|
+
: undefined, children: "Select Schema" })] })] }));
|
|
20
|
+
exports.SchemaSelectScreen = SchemaSelectScreen;
|
|
21
|
+
//# sourceMappingURL=SchemaSelectScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaSelectScreen.js","sourceRoot":"","sources":["../../../src/Schema/SchemaSelectScreen.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,iCAAwC;AACxC,2DAKgC;AAChC,mDAAmD;AACnD,2DAAsD;AACtD,yDAAsD;AACtD,wDAAqD;AACrD,6DAAuD;AACvD,oCAA8C;AAE9C,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAC7B,IAAA,0BAAa,EAAC,IAAA,2BAAY,GAAE,CAAC,gBAAgB,EAAE,IAAA,0BAAkB,EAAC,EAAE,CAAC,CAAC,CAAC;AAElE,MAAM,kBAAkB,GAAG,CAAC,EACjC,cAAc,GAAG,iBAAiB,EAAE,EACpC,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAW,EAAE,CAAC,GAC3D,EAAE,EAAE,CAAC,CACJ,wBAAC,2BAAU,eACT,uBAAC,8BAAY,IAAC,KAAK,EAAC,eAAe,GAAG,EACtC,wBAAC,2BAAU,IAAC,GAAG,QAAC,GAAG,mBACjB,uBAAC,2BAAU,cACT,uBAAC,2BAAU,IAAC,MAAM,yCAAgC,GACvC,EACb,uBAAC,mCAAgB,IAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAI,EACvD,uBAAC,6BAAY,IACX,OAAO,EACL,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,cAAc;wBACnC,CAAC,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;wBACtD,CAAC,CAAC,SAAS,8BAIF,IACJ,IACF,CACd,CAAC;AAtBW,QAAA,kBAAkB,sBAsB7B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaSelectView = 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 react_1 = require("react");
|
|
10
|
+
const SchemaApi_1 = require("../hooks/SchemaApi");
|
|
11
|
+
const SchemaListView_1 = require("./SchemaListView");
|
|
12
|
+
const SchemaSelectView = ({ formList = SchemaApi_1.SchemaApi.useGetList(), selected: [selected, setSelected] = (0, react_1.useState)([]), searchValue: [searchValue, setSearchValue] = (0, react_1.useState)(""), createSchemaList = SchemaApi_1.SchemaApi.useCreateList(), }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SchemaListView_1.SchemaListView, { elements: searchValue
|
|
13
|
+
? formList?.filter((form) => form.name?.toLowerCase().includes(searchValue.toLowerCase()))
|
|
14
|
+
: formList, selection: [selected, setSelected] }), (0, jsx_runtime_1.jsx)(components_rnw_1.StyledButton, { onPress: createSchemaList && (() => createSchemaList([{}])), children: "Create New Schema" })] }));
|
|
15
|
+
exports.SchemaSelectView = SchemaSelectView;
|
|
16
|
+
//# sourceMappingURL=SchemaSelectView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaSelectView.js","sourceRoot":"","sources":["../../../src/Schema/SchemaSelectView.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,2DAAsD;AACtD,iCAA4C;AAC5C,kDAA+C;AAC/C,qDAAkD;AAE3C,MAAM,gBAAgB,GAAG,CAAC,EAC/B,QAAQ,GAAG,qBAAS,CAAC,UAAU,EAAE,EACjC,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAW,EAAE,CAAC,EAC1D,WAAW,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,EACzD,gBAAgB,GAAG,qBAAS,CAAC,aAAa,EAAE,GAC7C,EAAa,EAAE,CAAC,CACf,6DACE,uBAAC,+BAAc,IACb,QAAQ,EACN,WAAW;gBACT,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CACxB,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAC7D;gBACH,CAAC,CAAC,QAAQ,EAEd,SAAS,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,GAClC,EACF,uBAAC,6BAAY,IAAC,OAAO,EAAE,gBAAgB,IAAI,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,kCAE1D,IACd,CACJ,CAAC;AArBW,QAAA,gBAAgB,oBAqB3B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaView = 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 SchemaView = ({ form = SchemaApi_1.SchemaApi.useGetItem(), onPress = () => { }, }) => (0, jsx_runtime_1.jsx)(components_rnw_1.StyledText, { children: form?.name || "untitled" });
|
|
11
|
+
exports.SchemaView = SchemaView;
|
|
12
|
+
//# sourceMappingURL=SchemaView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaView.js","sourceRoot":"","sources":["../../../src/Schema/SchemaView.tsx"],"names":[],"mappings":";;;;AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,2DAAoD;AACpD,kDAA+C;AAExC,MAAM,UAAU,GAAG,CAAC,EACzB,IAAI,GAAG,qBAAS,CAAC,UAAU,EAAE,EAC7B,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,GACnB,EAAE,EAAE,CAAC,uBAAC,2BAAU,cAAE,IAAI,EAAE,IAAI,IAAI,UAAU,GAAc,CAAC;AAH7C,QAAA,UAAU,cAGmC"}
|
|
@@ -14,10 +14,13 @@ 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("./
|
|
17
|
+
__exportStar(require("./EditSchemaScreen.js"), exports);
|
|
18
|
+
__exportStar(require("./SchemaEdit.js"), exports);
|
|
19
|
+
__exportStar(require("./SchemaEditScreen.js"), exports);
|
|
20
|
+
__exportStar(require("./SchemaListEdit.js"), exports);
|
|
21
|
+
__exportStar(require("./SchemaListScreen.js"), exports);
|
|
22
|
+
__exportStar(require("./SchemaListView.js"), exports);
|
|
23
|
+
__exportStar(require("./SchemaSelectScreen.js"), exports);
|
|
24
|
+
__exportStar(require("./SchemaSelectView.js"), exports);
|
|
25
|
+
__exportStar(require("./SchemaView.js"), exports);
|
|
23
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,kDAAgC;AAChC,wDAAsC;AACtC,sDAAoC;AACpC,wDAAsC;AACtC,sDAAoC;AACpC,0DAAwC;AACxC,wDAAsC;AACtC,kDAAgC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AttachmentApi = void 0;
|
|
4
4
|
const createApi_js_1 = require("./createApi.js");
|
|
5
|
-
exports.
|
|
5
|
+
exports.AttachmentApi = (0, createApi_js_1.createApi)("Attachment", {
|
|
6
6
|
id: undefined,
|
|
7
7
|
createdAt: undefined,
|
|
8
8
|
createdBy: undefined,
|
|
9
9
|
FileId: undefined,
|
|
10
|
+
SchemaId: undefined,
|
|
10
11
|
FormId: undefined,
|
|
11
|
-
FormAttachmentId: undefined,
|
|
12
12
|
});
|
|
13
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=AttachmentApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentApi.js","sourceRoot":"","sources":["../../../src/hooks/AttachmentApi.ts"],"names":[],"mappings":";;;AACA,iDAA2C;AAE9B,QAAA,aAAa,GAAG,IAAA,wBAAS,EAAQ,YAAY,EAAE;IAC1D,EAAE,EAAE,SAAS;IACb,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,SAAS;CAClB,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FileApi = void 0;
|
|
4
4
|
const createApi_js_1 = require("./createApi.js");
|
|
5
|
-
exports.FileApi = (0, createApi_js_1.createApi)({
|
|
5
|
+
exports.FileApi = (0, createApi_js_1.createApi)("File", {
|
|
6
6
|
id: undefined,
|
|
7
7
|
createdAt: undefined,
|
|
8
8
|
createdBy: undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileApi.js","sourceRoot":"","sources":["../../../src/hooks/FileApi.ts"],"names":[],"mappings":";;;AACA,iDAA2C;AAE9B,QAAA,OAAO,GAAG,IAAA,wBAAS,EAAQ;
|
|
1
|
+
{"version":3,"file":"FileApi.js","sourceRoot":"","sources":["../../../src/hooks/FileApi.ts"],"names":[],"mappings":";;;AACA,iDAA2C;AAE9B,QAAA,OAAO,GAAG,IAAA,wBAAS,EAAQ,MAAM,EAAE;IAC9C,EAAE,EAAE,SAAS;IACb,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;CAClB,CAAC,CAAC"}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FormApi = void 0;
|
|
4
4
|
const createApi_js_1 = require("./createApi.js");
|
|
5
|
-
exports.FormApi = (0, createApi_js_1.createApi)({
|
|
5
|
+
exports.FormApi = (0, createApi_js_1.createApi)("Form", {
|
|
6
6
|
id: undefined,
|
|
7
7
|
createdAt: undefined,
|
|
8
8
|
createdBy: undefined,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
schema: undefined,
|
|
9
|
+
SchemaId: undefined,
|
|
10
|
+
data: undefined,
|
|
12
11
|
});
|
|
13
12
|
//# sourceMappingURL=FormApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormApi.js","sourceRoot":"","sources":["../../../src/hooks/FormApi.ts"],"names":[],"mappings":";;;AACA,iDAA2C;AAE9B,QAAA,OAAO,GAAG,IAAA,wBAAS,EAAQ;
|
|
1
|
+
{"version":3,"file":"FormApi.js","sourceRoot":"","sources":["../../../src/hooks/FormApi.ts"],"names":[],"mappings":";;;AACA,iDAA2C;AAE9B,QAAA,OAAO,GAAG,IAAA,wBAAS,EAAQ,MAAM,EAAE;IAC9C,EAAE,EAAE,SAAS;IACb,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,SAAS;IACnB,IAAI,EAAE,SAAS;CAChB,CAAC,CAAC"}
|
|
@@ -9,15 +9,15 @@ const react_1 = require("react");
|
|
|
9
9
|
const zod_1 = require("zod");
|
|
10
10
|
exports.FormsContext = (0, react_1.createContext)({
|
|
11
11
|
routes: {
|
|
12
|
-
|
|
13
|
-
FORM_ATTACHMENT_EDIT_SCREEN: "",
|
|
12
|
+
FORM_LIST_SCREEN: "",
|
|
14
13
|
FORM_EDIT_SCREEN: "",
|
|
15
|
-
|
|
14
|
+
SCHEMA_EDIT_SCREEN: "",
|
|
15
|
+
SCHEMA_SELECT_SCREEN: "",
|
|
16
16
|
},
|
|
17
17
|
useParams: () => zod_1.z
|
|
18
18
|
.object({
|
|
19
19
|
FormId: zod_1.z.coerce.string().nullable(),
|
|
20
|
-
|
|
20
|
+
SchemaId: zod_1.z.coerce.string().nullable(),
|
|
21
21
|
AttachmentId: zod_1.z.coerce.string().nullable(),
|
|
22
22
|
})
|
|
23
23
|
.partial()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormsContext.js","sourceRoot":"","sources":["../../../src/hooks/FormsContext.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;;;AAExC,6CAAmD;AACnD,iCAAkD;AAClD,6BAAwB;AAEX,QAAA,YAAY,GAAG,IAAA,qBAAa,EAAC;IACxC,MAAM,EAAE;QACN,
|
|
1
|
+
{"version":3,"file":"FormsContext.js","sourceRoot":"","sources":["../../../src/hooks/FormsContext.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;;;AAExC,6CAAmD;AACnD,iCAAkD;AAClD,6BAAwB;AAEX,QAAA,YAAY,GAAG,IAAA,qBAAa,EAAC;IACxC,MAAM,EAAE;QACN,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,kBAAkB,EAAE,EAAE;QACtB,oBAAoB,EAAE,EAAE;KACzB;IACD,SAAS,EAAE,GAAG,EAAE,CACd,OAAC;SACE,MAAM,CAAC;QACN,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACpC,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACtC,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC3C,CAAC;SACD,OAAO,EAAE;SACT,KAAK,CAAC;QACL,GAAG,IAAA,kCAAoB,GAAE;KAC1B,CAAkD;CACxD,CAAC,CAAC;AAEI,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,IAAA,kBAAU,EAAC,oBAAY,CAAC,CAAC,MAAM,CAAC;AAArD,QAAA,YAAY,gBAAyC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SchemaApi = void 0;
|
|
4
4
|
const createApi_js_1 = require("./createApi.js");
|
|
5
|
-
exports.
|
|
5
|
+
exports.SchemaApi = (0, createApi_js_1.createApi)("Schema", {
|
|
6
6
|
id: undefined,
|
|
7
7
|
createdAt: undefined,
|
|
8
8
|
createdBy: undefined,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
name: undefined,
|
|
10
|
+
type: undefined,
|
|
11
|
+
schema: undefined,
|
|
11
12
|
});
|
|
12
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=SchemaApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaApi.js","sourceRoot":"","sources":["../../../src/hooks/SchemaApi.ts"],"names":[],"mappings":";;;AACA,iDAA2C;AAE9B,QAAA,SAAS,GAAG,IAAA,wBAAS,EAAU,QAAQ,EAAE;IACpD,EAAE,EAAE,SAAS;IACb,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;CAClB,CAAC,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createApi = void 0;
|
|
4
|
-
const hooks_react_1 = require("@dwidge/hooks-react");
|
|
5
4
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
7
|
-
const createApi = (defaultFilter = {}) => {
|
|
5
|
+
const createApi = (name, defaultFilter = {}) => {
|
|
8
6
|
getList: (filter) => Promise;
|
|
9
7
|
setList: (list) => Promise;
|
|
10
8
|
createList: (list) => Promise;
|
|
@@ -13,19 +11,20 @@ const createApi = (defaultFilter = {}) => {
|
|
|
13
11
|
getItem: (item) => Promise;
|
|
14
12
|
updateItem: (item) => Promise;
|
|
15
13
|
deleteItem: (item) => Promise;
|
|
16
|
-
const message =
|
|
14
|
+
const message = name +
|
|
15
|
+
": createApiW1: Please wrap App with <Context.Provider value={{}}></Context.Provider>";
|
|
17
16
|
const Context = (0, react_1.createContext)({
|
|
18
|
-
useGetList: () => (console.warn(message), undefined),
|
|
19
|
-
useCreateList: () => (console.warn(message), undefined),
|
|
20
|
-
useDeleteList: () => (console.warn(message), undefined),
|
|
21
|
-
useGetItem: () => (console.warn(message), undefined),
|
|
22
|
-
useItem: () => (console.warn(message), []),
|
|
17
|
+
useGetList: () => (console.warn("useGetList1: " + message), undefined),
|
|
18
|
+
useCreateList: () => (console.warn("useCreateList1: " + message), undefined),
|
|
19
|
+
useDeleteList: () => (console.warn("useDeleteList1: " + message), undefined),
|
|
20
|
+
useGetItem: () => (console.warn("useGetItem1: " + message), undefined),
|
|
21
|
+
useItem: () => (console.warn("useItem1: " + message), []),
|
|
23
22
|
});
|
|
24
|
-
const useGetList = (filter
|
|
23
|
+
const useGetList = (filter) => (0, react_1.useContext)(Context).useGetList({ ...defaultFilter, ...filter });
|
|
25
24
|
const useCreateList = () => (0, react_1.useContext)(Context).useCreateList();
|
|
26
25
|
const useDeleteList = () => (0, react_1.useContext)(Context).useDeleteList();
|
|
27
|
-
const useGetItem = (
|
|
28
|
-
const useItem = (
|
|
26
|
+
const useGetItem = (filter) => (0, react_1.useContext)(Context).useGetItem(filter ? { ...defaultFilter, ...filter } : undefined);
|
|
27
|
+
const useItem = (filter) => (0, react_1.useContext)(Context).useItem(filter ? { ...defaultFilter, ...filter } : undefined);
|
|
29
28
|
return {
|
|
30
29
|
Context,
|
|
31
30
|
Provider: Context.Provider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createApi.js","sourceRoot":"","sources":["../../../src/hooks/createApi.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"createApi.js","sourceRoot":"","sources":["../../../src/hooks/createApi.ts"],"names":[],"mappings":";;;AACA,iCAAkD;AAI3C,MAAM,SAAS,GAAG,CACvB,IAAY,EACZ,gBAA4B,EAAE,EAC9B,EAAE;IAMF,OAAO,EAAE,CAAC,MAAe,EAAE,EAAE,CAAC,OAAc,CAAC;IAC7C,OAAO,EAAE,CAAC,IAAW,EAAE,EAAE,CAAC,OAAuB,CAAC;IAClD,UAAU,EAAE,CAAC,IAAW,EAAE,EAAE,CAAC,OAAuB,CAAC;IACrD,UAAU,EAAE,CAAC,IAAW,EAAE,EAAE,CAAC,OAAuB,CAAC;IACrD,UAAU,EAAE,CAAC,IAAW,EAAE,EAAE,CAAC,OAAuB,CAAC;IACrD,OAAO,EAAE,CAAC,IAAkB,EAAE,EAAE,CAAC,OAAmB,CAAC;IACrD,UAAU,EAAE,CAAC,IAAS,EAAE,EAAE,CAAC,OAAmB,CAAC;IAC/C,UAAU,EAAE,CAAC,IAAS,EAAE,EAAE,CAAC,OAAmB,CAAC;IAE/C,MAAM,OAAO,GACX,IAAI;QACJ,sFAAsF,CAAC;IAEzF,MAAM,OAAO,GAAG,IAAA,qBAAa,EAM1B;QACD,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,EAAE,SAAS,CAAC;QACtE,aAAa,EAAE,GAAG,EAAE,CAAC,CACnB,OAAO,CAAC,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,EAAE,SAAS,CACtD;QACD,aAAa,EAAE,GAAG,EAAE,CAAC,CACnB,OAAO,CAAC,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,EAAE,SAAS,CACtD;QACD,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,EAAE,SAAS,CAAC;QACtE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,EAAE,EAAE,CAAC;KAC1D,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,CAAC,MAAe,EAAE,EAAE,CACrC,IAAA,kBAAU,EAAC,OAAO,CAAC,CAAC,UAAU,CAAC,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAClE,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAA,kBAAU,EAAC,OAAO,CAAC,CAAC,aAAa,EAAE,CAAC;IAChE,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAA,kBAAU,EAAC,OAAO,CAAC,CAAC,aAAa,EAAE,CAAC;IAChE,MAAM,UAAU,GAAG,CAAC,MAAe,EAAE,EAAE,CACrC,IAAA,kBAAU,EAAC,OAAO,CAAC,CAAC,UAAU,CAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CACrD,CAAC;IACJ,MAAM,OAAO,GAAG,CAAC,MAAe,EAAE,EAAE,CAClC,IAAA,kBAAU,EAAC,OAAO,CAAC,CAAC,OAAO,CACzB,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CACrD,CAAC;IAEJ,OAAO;QACL,OAAO;QACP,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,UAAU;QACV,UAAU;QACV,OAAO;QACP,aAAa;QACb,aAAa;KACd,CAAC;AACJ,CAAC,CAAC;AA9DW,QAAA,SAAS,aA8DpB"}
|
package/dist/cjs/hooks/index.js
CHANGED
|
@@ -14,14 +14,15 @@ 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("./FileApi"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./FormsContext"), exports);
|
|
22
|
-
__exportStar(require("./createApi"), exports);
|
|
23
|
-
__exportStar(require("./useCreateBlankAttachment"), exports);
|
|
24
|
-
__exportStar(require("./
|
|
25
|
-
__exportStar(require("./
|
|
26
|
-
__exportStar(require("./useParams"), exports);
|
|
17
|
+
__exportStar(require("./FileApi.js"), exports);
|
|
18
|
+
__exportStar(require("./AttachmentApi.js"), exports);
|
|
19
|
+
__exportStar(require("./SchemaApi.js"), exports);
|
|
20
|
+
__exportStar(require("./FormApi.js"), exports);
|
|
21
|
+
__exportStar(require("./FormsContext.js"), exports);
|
|
22
|
+
__exportStar(require("./createApi.js"), exports);
|
|
23
|
+
__exportStar(require("./useCreateBlankAttachment.js"), exports);
|
|
24
|
+
__exportStar(require("./useCreateBlankSchema.js"), exports);
|
|
25
|
+
__exportStar(require("./useCreateBlankForm.js"), exports);
|
|
26
|
+
__exportStar(require("./useParams.js"), exports);
|
|
27
|
+
__exportStar(require("./useIdFilter.js"), exports);
|
|
27
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,qDAAmC;AACnC,iDAA+B;AAC/B,+CAA6B;AAC7B,oDAAkC;AAClC,iDAA+B;AAC/B,gEAA8C;AAC9C,4DAA0C;AAC1C,0DAAwC;AACxC,iDAA+B;AAC/B,mDAAiC"}
|
|
@@ -7,8 +7,8 @@ exports.useCreateBlankAttachment = void 0;
|
|
|
7
7
|
const assert_1 = __importDefault(require("assert"));
|
|
8
8
|
const useParams_1 = require("./useParams");
|
|
9
9
|
const FileApi_1 = require("./FileApi");
|
|
10
|
-
const
|
|
11
|
-
const useCreateBlankAttachment = ({ createAttachmentList =
|
|
10
|
+
const AttachmentApi_1 = require("./AttachmentApi");
|
|
11
|
+
const useCreateBlankAttachment = ({ createAttachmentList = AttachmentApi_1.AttachmentApi.useCreateList(), createFileList = FileApi_1.FileApi.useCreateList(), AttachIds = (0, useParams_1.useParams)(), } = {}) => createAttachmentList && createFileList
|
|
12
12
|
? () => createFileList([{}]).then(([file]) => ((0, assert_1.default)(file),
|
|
13
13
|
createAttachmentList([
|
|
14
14
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateBlankAttachment.js","sourceRoot":"","sources":["../../../src/hooks/useCreateBlankAttachment.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,2CAAwC;AACxC,uCAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"useCreateBlankAttachment.js","sourceRoot":"","sources":["../../../src/hooks/useCreateBlankAttachment.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,2CAAwC;AACxC,uCAAoC;AACpC,mDAAgD;AAEzC,MAAM,wBAAwB,GAAG,CAAC,EACvC,oBAAoB,GAAG,6BAAa,CAAC,aAAa,EAAE,EACpD,cAAc,GAAG,iBAAO,CAAC,aAAa,EAAE,EACxC,SAAS,GAAG,IAAA,qBAAS,GAAE,GACxB,GAAG,EAAE,EAAE,EAAE,CACR,oBAAoB,IAAI,cAAc;IACpC,CAAC,CAAC,GAAG,EAAE,CACH,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CACvB,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CACV,IAAA,gBAAM,EAAC,IAAI,CAAC;QACZ,oBAAoB,CAAC;YACnB;gBACE,MAAM,EAAE,IAAI,CAAC,EAAE;gBACf,GAAG,SAAS;aACb;SACF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CACpB,CACF;IACL,CAAC,CAAC,SAAS,CAAC;AAlBH,QAAA,wBAAwB,4BAkBrB"}
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useCreateBlankForm = void 0;
|
|
7
|
+
const SchemaApi_1 = require("./SchemaApi");
|
|
7
8
|
const FormApi_1 = require("./FormApi");
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
: () =>
|
|
9
|
+
const useParams_1 = require("./useParams");
|
|
10
|
+
const useCreateBlankForm = ({ createSchemaList = SchemaApi_1.SchemaApi.useCreateList(), createFormList = FormApi_1.FormApi.useCreateList(), AttachmentIds = (0, useParams_1.useParams)(), } = {}) => createSchemaList && createFormList
|
|
11
|
+
? async (forms) => createFormList(forms.map((form) => ({ ...AttachmentIds, FormId: form.id }))).then(([r]) => ({ FormId: r?.id }))
|
|
12
|
+
: async () => undefined;
|
|
11
13
|
exports.useCreateBlankForm = useCreateBlankForm;
|
|
12
14
|
//# sourceMappingURL=useCreateBlankForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateBlankForm.js","sourceRoot":"","sources":["../../../src/hooks/useCreateBlankForm.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;;;
|
|
1
|
+
{"version":3,"file":"useCreateBlankForm.js","sourceRoot":"","sources":["../../../src/hooks/useCreateBlankForm.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;;;AAGxC,2CAAwC;AACxC,uCAAoC;AACpC,2CAAwC;AAEjC,MAAM,kBAAkB,GAAG,CAAC,EACjC,gBAAgB,GAAG,qBAAS,CAAC,aAAa,EAAE,EAC5C,cAAc,GAAG,iBAAO,CAAC,aAAa,EAAE,EACxC,aAAa,GAAG,IAAA,qBAAS,GAAE,GAC5B,GAAG,EAAE,EAAE,EAAE,CACR,gBAAgB,IAAI,cAAc;IAChC,CAAC,CAAC,KAAK,EAAE,KAAmB,EAAE,EAAE,CAC5B,cAAc,CACZ,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAC7D,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACxC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,SAAS,CAAC;AAVf,QAAA,kBAAkB,sBAUH"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright DWJ 2024.
|
|
3
|
+
// Distributed under the Boost Software License, Version 1.0.
|
|
4
|
+
// https://www.boost.org/LICENSE_1_0.txt
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useCreateBlankSchema = void 0;
|
|
7
|
+
const SchemaApi_1 = require("./SchemaApi");
|
|
8
|
+
const useCreateBlankSchema = ({ createList = SchemaApi_1.SchemaApi.useCreateList(), } = {}) => createList
|
|
9
|
+
? () => createList([{}]).then(([v]) => ({ SchemaId: v?.id }))
|
|
10
|
+
: undefined;
|
|
11
|
+
exports.useCreateBlankSchema = useCreateBlankSchema;
|
|
12
|
+
//# sourceMappingURL=useCreateBlankSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateBlankSchema.js","sourceRoot":"","sources":["../../../src/hooks/useCreateBlankSchema.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;;;AAExC,2CAAwC;AAEjC,MAAM,oBAAoB,GAAG,CAAC,EACnC,UAAU,GAAG,qBAAS,CAAC,aAAa,EAAE,GACvC,GAAG,EAAE,EAAE,EAAE,CACR,UAAU;IACR,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7D,CAAC,CAAC,SAAS,CAAC;AALH,QAAA,oBAAoB,wBAKjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIdFilter.js","sourceRoot":"","sources":["../../../src/hooks/useIdFilter.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CAA4B,EAAa,EAAE,EAAE,CACnE,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AADrB,QAAA,QAAQ,YACa"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,9 +14,9 @@ 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("./hooks"), exports);
|
|
21
|
-
__exportStar(require("./types"), exports);
|
|
17
|
+
__exportStar(require("./Attachment/index.js"), exports);
|
|
18
|
+
__exportStar(require("./Schema/index.js"), exports);
|
|
19
|
+
__exportStar(require("./Form/index.js"), exports);
|
|
20
|
+
__exportStar(require("./hooks/index.js"), exports);
|
|
21
|
+
__exportStar(require("./types/index.js"), exports);
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,oDAAkC;AAClC,kDAAgC;AAChC,mDAAiC;AACjC,mDAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"File1.js","sourceRoot":"","sources":["../../../src/types/File1.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Schema1.js","sourceRoot":"","sources":["../../../src/types/Schema1.ts"],"names":[],"mappings":""}
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -14,8 +14,8 @@ 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("./File2"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./File2.js"), exports);
|
|
18
|
+
__exportStar(require("./File1.js"), exports);
|
|
19
|
+
__exportStar(require("./Schema1.js"), exports);
|
|
20
|
+
__exportStar(require("./Form1.js"), exports);
|
|
21
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,6CAA2B;AAC3B,+CAA6B;AAC7B,6CAA2B"}
|
|
@@ -4,7 +4,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
5
5
|
import { FileEdit } from "@dwidge/components-expo";
|
|
6
6
|
import { FileApi } from "../hooks/FileApi";
|
|
7
|
-
import {
|
|
7
|
+
import { AttachmentApi } from "../hooks/AttachmentApi";
|
|
8
8
|
import { useParams } from "../hooks/useParams";
|
|
9
|
-
|
|
9
|
+
import { filterId } from "../hooks/useIdFilter";
|
|
10
|
+
export const AttachmentEdit = ({ id = useParams().AttachmentId, attachment: [attachment] = AttachmentApi.useItem(filterId(id)), file: [file, setFile] = FileApi.useItem(filterId(attachment?.FileId)), }) => _jsx(FileEdit, { file: [file, setFile] });
|
|
10
11
|
//# 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,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,EAAE,GAAG,SAAS,EAAE,CAAC,YAAY,EAC7B,UAAU,EAAE,CAAC,UAAU,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAC9D,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,GACtE,EAAE,EAAE,CAAC,KAAC,QAAQ,IAAC,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,GAAI,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright DWJ 2024.
|
|
3
|
+
// Distributed under the Boost Software License, Version 1.0.
|
|
4
|
+
// https://www.boost.org/LICENSE_1_0.txt
|
|
5
|
+
import { StyledButton, StyledView, UnstyledList, viewStyles, } from "@dwidge/components-rnw";
|
|
6
|
+
import assert from "assert";
|
|
7
|
+
import { useState } from "react";
|
|
8
|
+
import { AttachmentApi } from "../hooks/AttachmentApi";
|
|
9
|
+
import { useCreateBlankAttachment } from "../hooks/useCreateBlankAttachment";
|
|
10
|
+
import { useParams } from "../hooks/useParams";
|
|
11
|
+
import { AttachmentEdit } from "./AttachmentEdit";
|
|
12
|
+
export const AttachmentListEdit = ({ ids = useParams(), elements = AttachmentApi.useGetList(ids), selection: [selection, setSelection] = useState([]), onCreateAttachment = useCreateBlankAttachment({ AttachIds: ids }), onDeleteAttachmentList = AttachmentApi.useDeleteList(), }) => (_jsxs(StyledView, { column: true, children: [_jsx(UnstyledList, { items: elements, keyExtractor: (item) => (assert(item.id), item.id), selection: [selection, setSelection], render: (item) => _jsx(AttachmentEdit, { id: item.id }), selectStyle: viewStyles.select, style: viewStyles.unselect }), _jsxs(StyledView, { row: true, gap: true, center: true, middle: true, children: [_jsx(StyledButton, { icon: "add", onPress: onCreateAttachment }), _jsx(StyledButton, { icon: "remove", onPress: onDeleteAttachmentList &&
|
|
13
|
+
(() => onDeleteAttachmentList(selection.map((id) => ({ id })))) })] })] }));
|
|
14
|
+
//# 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,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,UAAU,GACX,MAAM,wBAAwB,CAAC;AAChC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAU,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,GAAG,GAAG,SAAS,EAAY,EAC3B,QAAQ,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,EACxC,SAAS,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,EAC7D,kBAAkB,GAAG,wBAAwB,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,EACjE,sBAAsB,GAAG,aAAa,CAAC,aAAa,EAAE,GACvD,EAAE,EAAE,CAAC,CACJ,MAAC,UAAU,IAAC,MAAM,mBAChB,KAAC,YAAY,IACX,KAAK,EAAE,QAAQ,EACf,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,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,KAAC,cAAc,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,GAAI,EACjD,WAAW,EAAE,UAAU,CAAC,MAAM,EAC9B,KAAK,EAAE,UAAU,CAAC,QAAQ,GAC1B,EACF,MAAC,UAAU,IAAC,GAAG,QAAC,GAAG,QAAC,MAAM,QAAC,MAAM,mBAC/B,KAAC,YAAY,IAAC,IAAI,EAAC,KAAK,EAAC,OAAO,EAAE,kBAAkB,GAAI,EACxD,KAAC,YAAY,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"}
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// Copyright DWJ 2024.
|
|
3
3
|
// Distributed under the Boost Software License, Version 1.0.
|
|
4
4
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
5
|
-
import {
|
|
5
|
+
import { AttachmentApi } from "../hooks/AttachmentApi";
|
|
6
6
|
import { useParams } from "../hooks/useParams";
|
|
7
7
|
import { AttachmentView } from "./AttachmentView";
|
|
8
|
-
export const AttachmentListView = ({ ids = useParams(), attachments =
|
|
8
|
+
export const AttachmentListView = ({ ids = useParams(), attachments = AttachmentApi.useGetList(ids), }) => attachments?.map((a) => _jsx(AttachmentView, { id: a.id }, a.id));
|
|
9
9
|
//# 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,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,GAAG,GAAG,SAAS,EAAE,EACjB,WAAW,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,GAC5C,EAAE,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAC,cAAc,IAAY,EAAE,EAAE,CAAC,CAAC,EAAE,IAAd,CAAC,CAAC,EAAE,CAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentScreen.js","sourceRoot":"","sources":["../../../src/Attachment/AttachmentScreen.tsx"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,6DAA6D;AAC7D,wCAAwC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,GAAG,GAAG,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,CACzD,MAAC,UAAU,eACT,KAAC,YAAY,IAAC,KAAK,EAAC,aAAa,GAAG,EACpC,KAAC,UAAU,IAAC,GAAG,QAAC,GAAG,kBACjB,KAAC,UAAU,IAAC,IAAI,QAAC,MAAM,kBACrB,KAAC,UAAU,cACT,KAAC,kBAAkB,IAAC,GAAG,EAAE,GAAG,GAAI,GACrB,GACF,GACF,IACF,CACd,CAAC"}
|
|
@@ -4,7 +4,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
5
5
|
import { useIdStringParam } from "@dwidge/hooks-expo";
|
|
6
6
|
import { FileView } from "@dwidge/components-expo";
|
|
7
|
-
import {
|
|
7
|
+
import { AttachmentApi } from "../hooks/AttachmentApi";
|
|
8
8
|
import { FileApi } from "../hooks/FileApi";
|
|
9
|
-
|
|
9
|
+
import { filterId } from "../hooks/useIdFilter";
|
|
10
|
+
export const AttachmentView = ({ id = useIdStringParam(), attachment: [attachment] = AttachmentApi.useItem(filterId(id)), file: [file, setFile] = FileApi.useItem(filterId(attachment?.FileId)), }) => _jsx(FileView, { file: [file, setFile] });
|
|
10
11
|
//# 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,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,EAAE,GAAG,gBAAgB,EAAE,EACvB,UAAU,EAAE,CAAC,UAAU,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAC9D,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,GACtE,EAAE,EAAE,CAAC,KAAC,QAAQ,IAAC,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,GAAI,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./AttachmentEdit.js";
|
|
2
|
+
export * from "./AttachmentListEdit.js";
|
|
3
|
+
export * from "./AttachmentListView.js";
|
|
4
|
+
export * from "./AttachmentScreen.js";
|
|
5
|
+
export * from "./AttachmentView.js";
|
|
6
|
+
export * from "./useFileAttachmentUrl.js";
|
|
7
|
+
export * from "./useFileUrl.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Attachment/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Distributed under the Boost Software License, Version 1.0.
|
|
3
3
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
4
4
|
import { FileApi } from "../hooks/FileApi";
|
|
5
|
-
import {
|
|
5
|
+
import { AttachmentApi } from "../hooks/AttachmentApi";
|
|
6
|
+
import { filterId } from "../hooks/useIdFilter";
|
|
6
7
|
export const useFileAttachmentUrl = (attachmentId) => useFileAttachmentUrlInternal(attachmentId);
|
|
7
|
-
const useFileAttachmentUrlInternal = (attachmentId, attachment =
|
|
8
|
+
const useFileAttachmentUrlInternal = (attachmentId, attachment = AttachmentApi.useGetItem(filterId(attachmentId)), file = FileApi.useGetItem(filterId(attachment?.FileId))) => file?.getUrl;
|
|
8
9
|
//# 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,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,YAAqB,EACM,EAAE,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;AAC3E,MAAM,4BAA4B,GAAG,CACnC,YAAqB,EACrB,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAC7D,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,EACvD,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Distributed under the Boost Software License, Version 1.0.
|
|
3
3
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
4
4
|
import { FileApi } from "../hooks/FileApi";
|
|
5
|
+
import { filterId } from "../hooks/useIdFilter";
|
|
5
6
|
export const useFileUrl = (fileId) => useFileUrlInternal(fileId);
|
|
6
|
-
const useFileUrlInternal = (fileId, file = FileApi.useGetItem(fileId)) => file?.getUrl;
|
|
7
|
+
const useFileUrlInternal = (fileId, file = FileApi.useGetItem(filterId(fileId))) => file?.getUrl;
|
|
7
8
|
//# 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,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAe,EAA6B,EAAE,CACvE,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,kBAAkB,GAAG,CACzB,MAAe,EACf,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAC3C,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC"}
|