@medyll/idae-machine 0.135.2 → 0.136.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +555 -360
- package/cli.cjs +22 -0
- package/dist/__fixtures__/demoModel.d.ts +79 -0
- package/dist/__fixtures__/demoModel.js +146 -0
- package/dist/ai/frame/AiChatSession.svelte +152 -0
- package/dist/ai/frame/AiChatSession.svelte.d.ts +7 -0
- package/dist/ai/frame/index.d.ts +1 -0
- package/dist/ai/frame/index.js +2 -0
- package/dist/ai/index.d.ts +9 -0
- package/dist/ai/index.js +12 -0
- package/dist/ai/schema/ai-catalogs.d.ts +2 -0
- package/dist/ai/schema/ai-catalogs.js +86 -0
- package/dist/ai/schema/ai-chat-session.d.ts +2 -0
- package/dist/ai/schema/ai-chat-session.js +35 -0
- package/dist/ai/schema/ai-companion.d.ts +2 -0
- package/dist/ai/schema/ai-companion.js +25 -0
- package/dist/ai/schema/ai-message.d.ts +2 -0
- package/dist/ai/schema/ai-message.js +20 -0
- package/dist/ai/schema/ai-tool-call.d.ts +2 -0
- package/dist/ai/schema/ai-tool-call.js +18 -0
- package/dist/ai/schema/ai-user-prompt.d.ts +2 -0
- package/dist/ai/schema/ai-user-prompt.js +17 -0
- package/dist/ai/schema/tag.d.ts +2 -0
- package/dist/ai/schema/tag.js +14 -0
- package/dist/ai/streamIntoRecord.d.ts +31 -0
- package/dist/ai/streamIntoRecord.js +79 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.js +19 -0
- package/dist/data-ui/controls/AlphabetFilter.svelte +114 -0
- package/dist/data-ui/controls/AlphabetFilter.svelte.d.ts +10 -0
- package/dist/data-ui/controls/ButtonAction.svelte +151 -0
- package/dist/data-ui/controls/ButtonAction.svelte.d.ts +18 -0
- package/dist/data-ui/controls/DataFind.svelte +174 -0
- package/dist/data-ui/controls/DataFind.svelte.d.ts +10 -0
- package/dist/data-ui/controls/DataGroup.svelte +150 -0
- package/dist/data-ui/controls/DataGroup.svelte.d.ts +7 -0
- package/dist/data-ui/controls/DataSort.svelte +78 -0
- package/dist/data-ui/controls/DataSort.svelte.d.ts +9 -0
- package/dist/data-ui/controls/DataToolbar.svelte +67 -0
- package/dist/data-ui/controls/DataToolbar.svelte.d.ts +11 -0
- package/dist/data-ui/controls/Find.svelte +38 -0
- package/dist/data-ui/controls/Find.svelte.d.ts +9 -0
- package/dist/data-ui/controls/FkFilter.svelte +94 -0
- package/dist/data-ui/controls/FkFilter.svelte.d.ts +11 -0
- package/dist/data-ui/controls/Group.svelte +36 -0
- package/dist/data-ui/controls/Group.svelte.d.ts +8 -0
- package/dist/data-ui/controls/ListMode.svelte +79 -0
- package/dist/data-ui/controls/ListMode.svelte.d.ts +10 -0
- package/dist/data-ui/controls/Sort.svelte +100 -0
- package/dist/data-ui/controls/Sort.svelte.d.ts +8 -0
- package/dist/data-ui/data/DataCount.svelte +67 -0
- package/dist/data-ui/data/DataCount.svelte.d.ts +36 -0
- package/dist/data-ui/data/DataFk.svelte +54 -0
- package/dist/data-ui/data/DataFk.svelte.d.ts +11 -0
- package/dist/data-ui/data/DataForm.svelte +191 -0
- package/dist/data-ui/data/DataForm.svelte.d.ts +15 -0
- package/dist/data-ui/data/DataList.svelte +645 -0
- package/dist/data-ui/data/DataList.svelte.d.ts +75 -0
- package/dist/data-ui/data/DataListFk.svelte +111 -0
- package/dist/data-ui/data/DataListFk.svelte.d.ts +13 -0
- package/dist/data-ui/data/DataListRfk.svelte +111 -0
- package/dist/data-ui/data/DataListRfk.svelte.d.ts +13 -0
- package/dist/data-ui/data/DataRecord.svelte +167 -0
- package/dist/data-ui/data/DataRecord.svelte.d.ts +22 -0
- package/dist/data-ui/data/DataRfk.svelte +73 -0
- package/dist/data-ui/data/DataRfk.svelte.d.ts +15 -0
- package/dist/data-ui/data/index.d.ts +7 -0
- package/dist/data-ui/data/index.js +8 -0
- package/dist/data-ui/field/DataField.svelte +343 -0
- package/dist/data-ui/field/DataField.svelte.d.ts +33 -0
- package/dist/{form/FieldInPlace.svelte → data-ui/field/DataFieldEdit.svelte} +103 -98
- package/dist/{form/FieldInPlace.svelte.d.ts → data-ui/field/DataFieldEdit.svelte.d.ts} +5 -5
- package/dist/data-ui/field/index.d.ts +2 -0
- package/dist/data-ui/field/index.js +3 -0
- package/dist/data-ui/field/snippets/FieldAiPrompt.svelte +145 -0
- package/dist/data-ui/field/snippets/FieldAiPrompt.svelte.d.ts +14 -0
- package/dist/data-ui/field/snippets/FieldBoolean.svelte +43 -0
- package/dist/data-ui/field/snippets/FieldBoolean.svelte.d.ts +12 -0
- package/dist/data-ui/field/snippets/FieldColor.svelte +48 -0
- package/dist/data-ui/field/snippets/FieldColor.svelte.d.ts +10 -0
- package/dist/data-ui/field/snippets/FieldCurrency.svelte +105 -0
- package/dist/data-ui/field/snippets/FieldCurrency.svelte.d.ts +15 -0
- package/dist/data-ui/field/snippets/FieldEmail.svelte +77 -0
- package/dist/data-ui/field/snippets/FieldEmail.svelte.d.ts +14 -0
- package/dist/data-ui/field/snippets/FieldIcon.svelte +73 -0
- package/dist/data-ui/field/snippets/FieldIcon.svelte.d.ts +11 -0
- package/dist/data-ui/field/snippets/FieldSelect.svelte +71 -0
- package/dist/data-ui/field/snippets/FieldSelect.svelte.d.ts +15 -0
- package/dist/data-ui/field/snippets/FieldText.svelte +52 -0
- package/dist/data-ui/field/snippets/FieldText.svelte.d.ts +13 -0
- package/dist/data-ui/field/snippets/FieldTextarea.svelte +50 -0
- package/dist/data-ui/field/snippets/FieldTextarea.svelte.d.ts +13 -0
- package/dist/data-ui/field/snippets/index.d.ts +9 -0
- package/dist/data-ui/field/snippets/index.js +10 -0
- package/dist/data-ui/fragments/ContextMenu.svelte +109 -0
- package/dist/data-ui/fragments/ContextMenu.svelte.d.ts +4 -0
- package/dist/data-ui/fragments/ContextMenuContent.svelte +275 -0
- package/dist/data-ui/fragments/ContextMenuContent.svelte.d.ts +8 -0
- package/dist/data-ui/fragments/Frame.svelte +43 -0
- package/dist/data-ui/fragments/Frame.svelte.d.ts +10 -0
- package/dist/data-ui/fragments/InfoLine.svelte +123 -0
- package/dist/data-ui/fragments/InfoLine.svelte.d.ts +12 -0
- package/dist/data-ui/fragments/Selector.svelte +56 -0
- package/dist/data-ui/fragments/Selector.svelte.d.ts +10 -0
- package/dist/{fragments → data-ui/fragments}/Skeleton.svelte +21 -21
- package/dist/data-ui/fragments/Tile.svelte +126 -0
- package/dist/data-ui/fragments/Tile.svelte.d.ts +14 -0
- package/dist/data-ui/fragments/contextMenu.svelte.d.ts +22 -0
- package/dist/data-ui/fragments/contextMenu.svelte.js +31 -0
- package/dist/data-ui/fragments/dialog/Dialog.svelte +185 -0
- package/dist/data-ui/fragments/dialog/Dialog.svelte.d.ts +29 -0
- package/dist/data-ui/fragments/dialog/dialog.svelte.d.ts +27 -0
- package/dist/data-ui/fragments/dialog/dialog.svelte.js +41 -0
- package/dist/data-ui/fragments/index.d.ts +11 -0
- package/dist/data-ui/fragments/index.js +11 -0
- package/dist/data-ui/utils/__tests__/HostProbe.svelte +18 -0
- package/dist/data-ui/utils/__tests__/HostProbe.svelte.d.ts +8 -0
- package/dist/data-ui/utils/data-utils.d.ts +29 -0
- package/dist/data-ui/utils/data-utils.js +83 -0
- package/dist/data-ui/utils/dataRelationUtils.d.ts +37 -0
- package/dist/data-ui/utils/dataRelationUtils.js +125 -0
- package/dist/data-ui/utils/diagramUtils.d.ts +6 -0
- package/dist/data-ui/utils/diagramUtils.js +131 -0
- package/dist/data-ui/utils/draggable.d.ts +15 -0
- package/dist/data-ui/utils/draggable.js +61 -0
- package/dist/data-ui/utils/menuPrefs.d.ts +80 -0
- package/dist/data-ui/utils/menuPrefs.js +119 -0
- package/dist/data-ui/utils/useMachinePrefs.svelte.d.ts +38 -0
- package/dist/data-ui/utils/useMachinePrefs.svelte.js +117 -0
- package/dist/data-ui/utils/useMenuTree.svelte.d.ts +26 -0
- package/dist/data-ui/utils/useMenuTree.svelte.js +68 -0
- package/dist/data-ui/utils/useRecordData.svelte.d.ts +22 -0
- package/dist/data-ui/utils/useRecordData.svelte.js +50 -0
- package/dist/data-ui/utils/useViewFields.svelte.d.ts +22 -0
- package/dist/data-ui/utils/useViewFields.svelte.js +59 -0
- package/dist/demo/.gitkeep +0 -0
- package/dist/demo/demo-status.json +9 -0
- package/dist/idae/boot.d.ts +28 -0
- package/dist/idae/boot.js +43 -0
- package/dist/idae/bridge/register.d.ts +4 -0
- package/dist/idae/bridge/register.js +15 -0
- package/dist/idae/capabilities/Capabilities.d.ts +10 -0
- package/dist/idae/capabilities/Capabilities.js +34 -0
- package/dist/idae/codefield/CodeFieldConvention.d.ts +3 -0
- package/dist/idae/codefield/CodeFieldConvention.js +25 -0
- package/dist/idae/fieldcatalog/defaultFieldTypesDef.d.ts +2 -0
- package/dist/idae/fieldcatalog/defaultFieldTypesDef.js +104 -0
- package/dist/idae/frames/FrameCatalog.d.ts +31 -0
- package/dist/idae/frames/FrameCatalog.js +31 -0
- package/dist/idae/index.d.ts +14 -0
- package/dist/idae/index.js +13 -0
- package/dist/idae/menu/IdaeMenuManager.d.ts +79 -0
- package/dist/idae/menu/IdaeMenuManager.js +108 -0
- package/dist/idae/menu/IdaeMenuStore.d.ts +77 -0
- package/dist/idae/menu/IdaeMenuStore.js +68 -0
- package/dist/idae/menu/menuSnapshot.d.ts +30 -0
- package/dist/idae/menu/menuSnapshot.js +30 -0
- package/dist/idae/meta/MetaModelProvider.d.ts +11 -0
- package/dist/idae/meta/MetaModelProvider.js +43 -0
- package/dist/idae/relations/RelationPolicy.d.ts +19 -0
- package/dist/idae/relations/RelationPolicy.js +125 -0
- package/dist/idae/rights/RightsPolicy.d.ts +16 -0
- package/dist/idae/rights/RightsPolicy.js +80 -0
- package/dist/idae/userscope/UserScopePolicy.d.ts +9 -0
- package/dist/idae/userscope/UserScopePolicy.js +42 -0
- package/dist/idae/userscope/navTracking.d.ts +11 -0
- package/dist/idae/userscope/navTracking.js +15 -0
- package/dist/index.d.ts +68 -35
- package/dist/index.js +82 -36
- package/dist/main/__tests__/_relationTestUtils.d.ts +12 -0
- package/dist/main/__tests__/_relationTestUtils.js +53 -0
- package/dist/main/__tests__/helpers/mockCollection.d.ts +21 -0
- package/dist/main/__tests__/helpers/mockCollection.js +27 -0
- package/dist/main/api/types.d.ts +29 -0
- package/dist/main/ext/hooks.d.ts +32 -0
- package/dist/main/ext/hooks.js +31 -0
- package/dist/main/ext/interfaces.d.ts +69 -0
- package/dist/main/ext/interfaces.js +3 -0
- package/dist/main/ext/registry.d.ts +29 -0
- package/dist/main/ext/registry.js +30 -0
- package/dist/main/frame/MachineFrameManager.d.ts +187 -0
- package/dist/main/frame/MachineFrameManager.js +403 -0
- package/dist/main/frame/contextMenuSetup.d.ts +9 -0
- package/dist/main/frame/contextMenuSetup.js +42 -0
- package/dist/main/frame/frameUrl.d.ts +1 -0
- package/dist/main/frame/frameUrl.js +8 -0
- package/dist/main/frame/frameUtils.d.ts +16 -0
- package/dist/main/frame/frameUtils.js +26 -0
- package/dist/main/frame/linkParser.d.ts +9 -0
- package/dist/main/frame/linkParser.js +15 -0
- package/dist/main/index.d.ts +15 -0
- package/dist/main/index.js +19 -0
- package/dist/main/machine/MachineAction.d.ts +62 -0
- package/dist/main/machine/MachineAction.js +96 -0
- package/dist/main/machine/MachineError.js +2 -2
- package/dist/main/machine/MachineFieldType.d.ts +25 -6
- package/dist/main/machine/MachineFieldType.js +118 -27
- package/dist/main/machine/MachineFkFold.d.ts +34 -0
- package/dist/main/machine/MachineFkFold.js +57 -0
- package/dist/main/machine/MachineRecordIdentity.d.ts +26 -0
- package/dist/main/machine/MachineRecordIdentity.js +44 -0
- package/dist/main/machine/MachineRights.d.ts +50 -0
- package/dist/main/machine/MachineRights.js +133 -0
- package/dist/main/machine/MachineRouter.d.ts +56 -0
- package/dist/main/machine/MachineRouter.js +250 -0
- package/dist/main/machine/MachineScheme.d.ts +40 -70
- package/dist/main/machine/MachineScheme.js +107 -94
- package/dist/main/machine/MachineSchemeField.js +32 -16
- package/dist/main/machine/MachineSchemeFieldForge.d.ts +11 -11
- package/dist/main/machine/MachineSchemeFieldForge.js +33 -21
- package/dist/main/machine/MachineSchemeFieldValues.d.ts +8 -9
- package/dist/main/machine/MachineSchemeFieldValues.js +12 -9
- package/dist/main/machine/MachineSchemeValidate.d.ts +69 -13
- package/dist/main/machine/MachineSchemeValidate.js +173 -46
- package/dist/main/machine/MachineSchemeValues.d.ts +32 -21
- package/dist/main/machine/MachineSchemeValues.js +132 -104
- package/dist/main/machine/SchemeFieldDefaultValues.d.ts +4 -2
- package/dist/main/machine/SchemeFieldDefaultValues.js +8 -2
- package/dist/main/machine/authState.svelte.d.ts +11 -0
- package/dist/main/machine/authState.svelte.js +17 -0
- package/dist/main/machine/fieldBuilder.d.ts +23 -0
- package/dist/main/machine/fieldBuilder.d.ts.map +1 -0
- package/dist/main/machine/fieldBuilder.js +10 -0
- package/dist/main/machine/fieldBuilder.js.map +1 -0
- package/dist/main/machine/machineLabel.d.ts +11 -0
- package/dist/main/machine/machineLabel.js +23 -0
- package/dist/main/machine/validateRules.d.ts +38 -0
- package/dist/main/machine/validateRules.js +109 -0
- package/dist/main/machine.d.ts +207 -68
- package/dist/main/machine.js +482 -96
- package/dist/main/machineDb.d.ts +21 -8
- package/dist/main/machineDb.js +33 -4
- package/dist/main/machineIdbAdapter.d.ts +83 -0
- package/dist/main/machineIdbAdapter.js +347 -0
- package/dist/main/machineModelBuilder.d.ts +31 -0
- package/dist/main/machineModelBuilder.js +58 -0
- package/dist/main/machineParserForge.d.ts +9 -18
- package/dist/main/machineParserForge.js +92 -35
- package/dist/main/machineSchemaCache.d.ts +8 -0
- package/dist/main/machineSchemaCache.js +58 -0
- package/dist/main/machineSchemaDoctor.d.ts +17 -0
- package/dist/main/machineSchemaDoctor.js +73 -0
- package/dist/main/machineSchemaLoader.d.ts +18 -0
- package/dist/main/machineSchemaLoader.js +43 -0
- package/dist/main/machineSeed.d.ts +21 -0
- package/dist/main/machineSeed.js +44 -0
- package/dist/main/router/componentRegistry.d.ts +35 -0
- package/dist/main/router/componentRegistry.js +35 -0
- package/dist/main/router/urlParser.d.ts +17 -0
- package/dist/main/router/urlParser.js +41 -0
- package/dist/main/warmupUtils.d.ts +40 -0
- package/dist/main/warmupUtils.js +73 -0
- package/dist/mcp/MachineMcpClient.d.ts +43 -0
- package/dist/mcp/MachineMcpClient.js +175 -0
- package/dist/shell/Frame.svelte +67 -0
- package/dist/shell/Frame.svelte.d.ts +11 -0
- package/dist/shell/auth/Login.svelte +244 -0
- package/dist/shell/auth/Login.svelte.d.ts +3 -0
- package/dist/shell/frame/dashboard/Dashboard.svelte +0 -0
- package/dist/shell/frame/dashboard/Dashboard.svelte.d.ts +26 -0
- package/dist/shell/frame/diagram/Diagram.svelte +244 -0
- package/dist/shell/frame/diagram/Diagram.svelte.d.ts +9 -0
- package/dist/shell/frame/explorer/Explorer.svelte +86 -0
- package/dist/shell/frame/explorer/Explorer.svelte.d.ts +29 -0
- package/dist/shell/frame/explorer/ExplorerContent.svelte +126 -0
- package/dist/shell/frame/explorer/ExplorerContent.svelte.d.ts +32 -0
- package/dist/shell/frame/index.d.ts +8 -0
- package/dist/shell/frame/index.js +9 -0
- package/dist/shell/frame/main-menu-content/MainMenuContent.svelte +100 -0
- package/dist/shell/frame/main-menu-content/MainMenuContent.svelte.d.ts +6 -0
- package/dist/shell/frame/planning/Planning.svelte +426 -0
- package/dist/shell/frame/planning/Planning.svelte.d.ts +12 -0
- package/dist/shell/frame/rbac/RbacMatrix.svelte +197 -0
- package/dist/shell/frame/rbac/RbacMatrix.svelte.d.ts +7 -0
- package/dist/shell/frame/space/Space.svelte +554 -0
- package/dist/shell/frame/space/Space.svelte.d.ts +8 -0
- package/dist/shell/frame/synthesis/Synthesis.svelte +383 -0
- package/dist/shell/frame/synthesis/Synthesis.svelte.d.ts +8 -0
- package/dist/shell/frame/today/Today.svelte +174 -0
- package/dist/shell/frame/today/Today.svelte.d.ts +3 -0
- package/dist/shell/layout/App.svelte +30 -0
- package/dist/shell/layout/App.svelte.d.ts +3 -0
- package/dist/shell/layout/Breadcrumb.svelte +67 -0
- package/dist/shell/layout/Breadcrumb.svelte.d.ts +12 -0
- package/dist/shell/layout/Columner.svelte +214 -0
- package/dist/shell/layout/Columner.svelte.d.ts +16 -0
- package/dist/shell/layout/DevResetPanel.svelte +194 -0
- package/dist/shell/layout/DevResetPanel.svelte.d.ts +7 -0
- package/dist/shell/layout/Fiche.svelte +111 -0
- package/dist/shell/layout/Fiche.svelte.d.ts +7 -0
- package/dist/shell/layout/FicheUpdate.svelte +53 -0
- package/dist/shell/layout/FicheUpdate.svelte.d.ts +7 -0
- package/dist/shell/layout/MainMenu.svelte +256 -0
- package/dist/shell/layout/MainMenu.svelte.d.ts +6 -0
- package/dist/shell/layout/MenuSettings.svelte +182 -0
- package/dist/shell/layout/MenuSettings.svelte.d.ts +6 -0
- package/dist/shell/layout/RecordTimeline.svelte +199 -0
- package/dist/shell/layout/RecordTimeline.svelte.d.ts +8 -0
- package/dist/shell/layout/RecordToolbar.svelte +39 -0
- package/dist/shell/layout/RecordToolbar.svelte.d.ts +7 -0
- package/dist/shell/layout/TaskBar.svelte +118 -0
- package/dist/shell/layout/TaskBar.svelte.d.ts +7 -0
- package/dist/shell/layout/TemplateShell.svelte +48 -0
- package/dist/shell/layout/TemplateShell.svelte.d.ts +15 -0
- package/dist/shell/layout/ThemeToggle.svelte +46 -0
- package/dist/shell/layout/ThemeToggle.svelte.d.ts +3 -0
- package/dist/shell/layout/index.d.ts +8 -0
- package/dist/shell/layout/index.js +9 -0
- package/dist/storage/ApiStorageAdapter.d.ts +41 -0
- package/dist/storage/ApiStorageAdapter.js +111 -0
- package/dist/storage/IdbStorageAdapter.d.ts +31 -0
- package/dist/storage/IdbStorageAdapter.js +72 -0
- package/dist/storage/MemoryStorageAdapter.d.ts +33 -0
- package/dist/storage/MemoryStorageAdapter.js +132 -0
- package/dist/storage/README.md +222 -0
- package/dist/storage/StorageAdapter.d.ts +75 -0
- package/dist/storage/StorageAdapter.js +7 -0
- package/dist/storage/demo/storage-demo.d.ts +22 -0
- package/dist/storage/demo/storage-demo.js +107 -0
- package/dist/storage/index.d.ts +9 -0
- package/dist/storage/index.js +9 -0
- package/dist/types/entity-types.d.ts +444 -0
- package/dist/types/entity-types.js +16 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.js +6 -0
- package/dist/types/machine-model.d.ts +198 -0
- package/dist/types/machine-model.js +5 -0
- package/dist/types/qoolie-svelte.d.ts +11 -0
- package/dist/types/schema-utils.d.ts +32 -0
- package/dist/types/schema-utils.js +103 -0
- package/dist/utils/generateCode.d.ts +5 -0
- package/dist/utils/generateCode.js +9 -0
- package/dist/utils/logger.d.ts +10 -0
- package/dist/utils/logger.js +20 -0
- package/package.json +59 -33
- package/cli.js +0 -46
- package/dist/db/CrudService.d.ts +0 -9
- package/dist/db/CrudService.js +0 -45
- package/dist/demo/dbSchema.d.ts +0 -446
- package/dist/demo/dbSchema.js +0 -449
- package/dist/demo/testScheme.d.ts +0 -56
- package/dist/demo/testScheme.js +0 -42
- package/dist/form/CreateUpdate.svelte +0 -219
- package/dist/form/CreateUpdate.svelte.d.ts +0 -27
- package/dist/form/DataProvider.svelte +0 -23
- package/dist/form/DataProvider.svelte.d.ts +0 -7
- package/dist/form/FieldValue.svelte +0 -148
- package/dist/form/FieldValue.svelte.d.ts +0 -34
- package/dist/form/types.d.ts +0 -17
- package/dist/fragments/Confirm.svelte +0 -73
- package/dist/fragments/Confirm.svelte.d.ts +0 -7
- package/dist/fragments/Frame.svelte +0 -19
- package/dist/fragments/Frame.svelte.d.ts +0 -32
- package/dist/fragments/InfoLine.svelte +0 -21
- package/dist/fragments/InfoLine.svelte.d.ts +0 -35
- package/dist/fragments/Selector.svelte +0 -26
- package/dist/fragments/Selector.svelte.d.ts +0 -38
- package/dist/main/machine/MachineSchemeField.d.ts +0 -19
- package/dist/types/appschemeTypes.d.ts +0 -71
- package/dist/types/appschemeTypes.js +0 -83
- package/dist/ui/CollectionButton.svelte +0 -29
- package/dist/ui/CollectionButton.svelte.d.ts +0 -29
- package/dist/ui/CollectionFks.svelte +0 -24
- package/dist/ui/CollectionFks.svelte.d.ts +0 -9
- package/dist/ui/CollectionList.svelte +0 -100
- package/dist/ui/CollectionList.svelte.d.ts +0 -36
- package/dist/ui/CollectionListFieldValues.svelte +0 -59
- package/dist/ui/CollectionListFieldValues.svelte.d.ts +0 -9
- package/dist/ui/CollectionListMenu.svelte +0 -39
- package/dist/ui/CollectionListMenu.svelte.d.ts +0 -34
- package/dist/ui/CollectionReverseFks.svelte +0 -37
- package/dist/ui/CollectionReverseFks.svelte.d.ts +0 -14
- /package/dist/{fragments → data-ui/fragments}/Skeleton.svelte.d.ts +0 -0
- /package/dist/{form → main/api}/types.js +0 -0
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
<script lang="ts" generics="COL = Record<string,any>">
|
|
2
|
-
import { machine } from '../main/machine.js';
|
|
3
|
-
import { SchemeFieldDefaultValues } from '../main/machine/SchemeFieldDefaultValues.js';
|
|
4
|
-
import type { CreateUpdateProps } from './types.js';
|
|
5
|
-
import CollectionReverseFks from '../ui/CollectionReverseFks.svelte';
|
|
6
|
-
import FieldInput from './FieldValue.svelte';
|
|
7
|
-
|
|
8
|
-
// Define props with Svelte 5 syntax
|
|
9
|
-
// Replaces createEventDispatcher with a callback prop
|
|
10
|
-
let {
|
|
11
|
-
onsubmit: onsubmit_callback,
|
|
12
|
-
...createUpdateProps
|
|
13
|
-
}: CreateUpdateProps<COL> & { onsubmit?: (payload: any) => void } = $props();
|
|
14
|
-
|
|
15
|
-
// Logic and Store references
|
|
16
|
-
const logic = machine.logic;
|
|
17
|
-
const store = $derived(createUpdateProps.collection ? machine.store[createUpdateProps.collection] : undefined);
|
|
18
|
-
|
|
19
|
-
// Reactive derivations for metadata
|
|
20
|
-
const collLogic = $derived(createUpdateProps.collection ? logic.collection(createUpdateProps.collection) : null);
|
|
21
|
-
const formFields = $derived(collLogic?.parse() ?? {});
|
|
22
|
-
const validator = $derived(collLogic?.validator);
|
|
23
|
-
const indexName = $derived(collLogic?.template.index);
|
|
24
|
-
|
|
25
|
-
// UI derivations
|
|
26
|
-
const inputFormId = $derived(`form-${String(createUpdateProps.collection ?? '')}-${createUpdateProps.mode ?? ''}`);
|
|
27
|
-
|
|
28
|
-
// Reactive State
|
|
29
|
-
let formData = $state<Record<string, any>>({});
|
|
30
|
-
let validationErrors = $state<Record<string, string>>({});
|
|
31
|
-
let isSubmitting = $state(false);
|
|
32
|
-
|
|
33
|
-
// Initialize or Reset form data when collection/mode/dataId changes
|
|
34
|
-
$effect(() => {
|
|
35
|
-
if (createUpdateProps.mode === 'create') {
|
|
36
|
-
formData = {
|
|
37
|
-
...SchemeFieldDefaultValues.getDefaults(Object.keys(formFields), createUpdateProps.collection),
|
|
38
|
-
...createUpdateProps.data,
|
|
39
|
-
...createUpdateProps.withData
|
|
40
|
-
};
|
|
41
|
-
} else if (store && createUpdateProps.dataId) {
|
|
42
|
-
// Logic to fetch existing data from store
|
|
43
|
-
const query = store.where({ [indexName]: { eq: createUpdateProps.dataId } });
|
|
44
|
-
const snap = $state.snapshot(query);
|
|
45
|
-
const record = Array.isArray(snap) && snap.length > 0 ? snap[0] : {};
|
|
46
|
-
|
|
47
|
-
formData = {
|
|
48
|
-
...createUpdateProps.data,
|
|
49
|
-
...createUpdateProps.withData,
|
|
50
|
-
...record
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Validates form data using the logic validator
|
|
57
|
-
*/
|
|
58
|
-
const validate = (data: Record<string, any>) => {
|
|
59
|
-
const v = typeof validator === 'function' ? validator() : validator;
|
|
60
|
-
if (!v || typeof v.validateForm !== 'function') return true;
|
|
61
|
-
|
|
62
|
-
const ignore = createUpdateProps.mode === 'create' && indexName ? [indexName] : undefined;
|
|
63
|
-
const { isValid, errors } = v.validateForm(data, { ignoreFields: ignore });
|
|
64
|
-
|
|
65
|
-
validationErrors = errors; // Updates UI automatically
|
|
66
|
-
return isValid;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Form submission handler
|
|
71
|
-
*/
|
|
72
|
-
async function handleSubmit(event: SubmitEvent) {
|
|
73
|
-
event.preventDefault();
|
|
74
|
-
isSubmitting = true;
|
|
75
|
-
|
|
76
|
-
const snapshot = $state.snapshot(formData);
|
|
77
|
-
|
|
78
|
-
if (!validate(snapshot)) {
|
|
79
|
-
isSubmitting = false;
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
try {
|
|
84
|
-
if (createUpdateProps.mode === 'create' && !createUpdateProps.dataId) {
|
|
85
|
-
await store?.add({ ...snapshot, ...createUpdateProps.withData });
|
|
86
|
-
} else if (createUpdateProps.mode === 'update' && createUpdateProps.dataId) {
|
|
87
|
-
await store?.update(createUpdateProps.dataId, snapshot);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Trigger callback if provided
|
|
91
|
-
onsubmit_callback?.({ mode: createUpdateProps.mode, data: snapshot });
|
|
92
|
-
} catch (e) {
|
|
93
|
-
console.error("Submission failed", e);
|
|
94
|
-
} finally {
|
|
95
|
-
isSubmitting = false;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Helper to clear error when user modifies a field
|
|
100
|
-
const clearError = (fieldName: string) => {
|
|
101
|
-
if (validationErrors[fieldName]) {
|
|
102
|
-
delete validationErrors[fieldName];
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
</script>
|
|
106
|
-
|
|
107
|
-
{#snippet fieldInput(fieldName: string, fieldInfo: any)}
|
|
108
|
-
<div class="field-wrapper">
|
|
109
|
-
<FieldInput
|
|
110
|
-
collection={createUpdateProps.collection}
|
|
111
|
-
{fieldName}
|
|
112
|
-
mode={createUpdateProps.mode}
|
|
113
|
-
editInPlace={createUpdateProps.inPlaceEdit === true ||
|
|
114
|
-
(Array.isArray(createUpdateProps.inPlaceEdit) && createUpdateProps.inPlaceEdit.includes(fieldName))}
|
|
115
|
-
data={formData}
|
|
116
|
-
setData={(field, value) => {
|
|
117
|
-
formData[field] = value;
|
|
118
|
-
clearError(field);
|
|
119
|
-
}}
|
|
120
|
-
inputForm={inputFormId}
|
|
121
|
-
/>
|
|
122
|
-
{#if validationErrors[fieldName]}
|
|
123
|
-
<span class="error-message" id="error-{fieldName}">
|
|
124
|
-
{validationErrors[fieldName]}
|
|
125
|
-
</span>
|
|
126
|
-
{/if}
|
|
127
|
-
</div>
|
|
128
|
-
{/snippet}
|
|
129
|
-
|
|
130
|
-
<form
|
|
131
|
-
id={inputFormId}
|
|
132
|
-
name={inputFormId}
|
|
133
|
-
aria-labelledby="form-title"
|
|
134
|
-
onsubmit={handleSubmit}
|
|
135
|
-
>
|
|
136
|
-
</form>
|
|
137
|
-
|
|
138
|
-
<h2 id="form-title" class="sr-only">
|
|
139
|
-
{createUpdateProps.mode} {createUpdateProps.collection}
|
|
140
|
-
</h2>
|
|
141
|
-
|
|
142
|
-
<div style="width:750px; display:flex;">
|
|
143
|
-
<div class="crud {createUpdateProps.displayMode}">
|
|
144
|
-
{#each Object.entries(formFields) as [fieldName, fieldInfo]}
|
|
145
|
-
{#if !createUpdateProps.showFields || createUpdateProps.showFields.includes(fieldName)}
|
|
146
|
-
{@render fieldInput(fieldName, fieldInfo)}
|
|
147
|
-
{/if}
|
|
148
|
-
{/each}
|
|
149
|
-
</div>
|
|
150
|
-
|
|
151
|
-
{#if createUpdateProps.showFks && (createUpdateProps.mode === 'show' || createUpdateProps.mode === 'update')}
|
|
152
|
-
<div>
|
|
153
|
-
<CollectionReverseFks
|
|
154
|
-
showTitle={true}
|
|
155
|
-
collection={createUpdateProps.collection}
|
|
156
|
-
collectionId={createUpdateProps.dataId}
|
|
157
|
-
>
|
|
158
|
-
{#snippet children()}
|
|
159
|
-
<div class="p2">Presentation</div>
|
|
160
|
-
{/snippet}
|
|
161
|
-
</CollectionReverseFks>
|
|
162
|
-
</div>
|
|
163
|
-
{/if}
|
|
164
|
-
</div>
|
|
165
|
-
|
|
166
|
-
<button
|
|
167
|
-
type="submit"
|
|
168
|
-
form={inputFormId}
|
|
169
|
-
disabled={isSubmitting}
|
|
170
|
-
aria-label="Submit"
|
|
171
|
-
>
|
|
172
|
-
{isSubmitting ? '...' : 'Valider'}
|
|
173
|
-
</button>
|
|
174
|
-
|
|
175
|
-
<style>
|
|
176
|
-
@reference "../../styles/references.css";
|
|
177
|
-
|
|
178
|
-
:global(.crud) {
|
|
179
|
-
min-width: 32rem;
|
|
180
|
-
padding: 2rem;
|
|
181
|
-
|
|
182
|
-
&.wrap {
|
|
183
|
-
display: flex;
|
|
184
|
-
flex-wrap: wrap;
|
|
185
|
-
gap: 0.5rem;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
&.inline {
|
|
189
|
-
display: flex;
|
|
190
|
-
flex-direction: row;
|
|
191
|
-
gap: 1rem;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.field-wrapper {
|
|
196
|
-
margin-bottom: 1rem;
|
|
197
|
-
display: flex;
|
|
198
|
-
flex-direction: column;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/* Target inputs with errors using CSS only, driven by Svelte state */
|
|
202
|
-
.error-message {
|
|
203
|
-
color: red;
|
|
204
|
-
font-size: 0.8rem;
|
|
205
|
-
margin-top: 0.25rem;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.sr-only {
|
|
209
|
-
position: absolute;
|
|
210
|
-
width: 1px;
|
|
211
|
-
height: 1px;
|
|
212
|
-
padding: 0;
|
|
213
|
-
margin: -1px;
|
|
214
|
-
overflow: hidden;
|
|
215
|
-
clip: rect(0,0,0,0);
|
|
216
|
-
white-space: nowrap;
|
|
217
|
-
border-width: 0;
|
|
218
|
-
}
|
|
219
|
-
</style>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { CreateUpdateProps } from './types.js';
|
|
2
|
-
declare function $$render<COL = Record<string, any>>(): {
|
|
3
|
-
props: CreateUpdateProps<COL> & {
|
|
4
|
-
onsubmit?: (payload: any) => void;
|
|
5
|
-
};
|
|
6
|
-
exports: {};
|
|
7
|
-
bindings: "";
|
|
8
|
-
slots: {};
|
|
9
|
-
events: {};
|
|
10
|
-
};
|
|
11
|
-
declare class __sveltets_Render<COL = Record<string, any>> {
|
|
12
|
-
props(): ReturnType<typeof $$render<COL>>['props'];
|
|
13
|
-
events(): ReturnType<typeof $$render<COL>>['events'];
|
|
14
|
-
slots(): ReturnType<typeof $$render<COL>>['slots'];
|
|
15
|
-
bindings(): "";
|
|
16
|
-
exports(): {};
|
|
17
|
-
}
|
|
18
|
-
interface $$IsomorphicComponent {
|
|
19
|
-
new <COL = Record<string, any>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<COL>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<COL>['props']>, ReturnType<__sveltets_Render<COL>['events']>, ReturnType<__sveltets_Render<COL>['slots']>> & {
|
|
20
|
-
$$bindings?: ReturnType<__sveltets_Render<COL>['bindings']>;
|
|
21
|
-
} & ReturnType<__sveltets_Render<COL>['exports']>;
|
|
22
|
-
<COL = Record<string, any>>(internal: unknown, props: ReturnType<__sveltets_Render<COL>['props']> & {}): ReturnType<__sveltets_Render<COL>['exports']>;
|
|
23
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
24
|
-
}
|
|
25
|
-
declare const CreateUpdate: $$IsomorphicComponent;
|
|
26
|
-
type CreateUpdate<COL = Record<string, any>> = InstanceType<typeof CreateUpdate<COL>>;
|
|
27
|
-
export default CreateUpdate;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
DataProvider.svelte
|
|
3
|
-
Svelte 5 context provider for collection/data
|
|
4
|
-
@role context-provider
|
|
5
|
-
@prop {string} collection - Collection name
|
|
6
|
-
@prop {object[]} data - Data array (bindable)
|
|
7
|
-
@slot children - Render children with context
|
|
8
|
-
-->
|
|
9
|
-
|
|
10
|
-
<script lang="ts">
|
|
11
|
-
import { setContext } from 'svelte';
|
|
12
|
-
const props = $props<{ collection: string; data?: Record<string, any>[] }>();
|
|
13
|
-
let data = props.data ?? $bindable();
|
|
14
|
-
setContext('collection', props.collection);
|
|
15
|
-
setContext('data', data);
|
|
16
|
-
$inspect('data.provider', data);
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
{#snippet children()}
|
|
20
|
-
<!-- Default children: nothing rendered -->
|
|
21
|
-
{/snippet}
|
|
22
|
-
|
|
23
|
-
{@render children()}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
FieldValue.svelte
|
|
3
|
-
Svelte 5 field input for all types
|
|
4
|
-
@role form-field
|
|
5
|
-
@prop {string} collection - Collection name
|
|
6
|
-
@prop {any} collectionId - Optional collection id
|
|
7
|
-
@prop {string} fieldName - Field name
|
|
8
|
-
@prop {object} data - Data object (bindable)
|
|
9
|
-
@prop {'show'|'create'|'update'} [mode] - Form mode
|
|
10
|
-
@prop {boolean} [editInPlace] - Enable in-place editing
|
|
11
|
-
@prop {string} [inputForm] - Form id
|
|
12
|
-
@prop {boolean|string} [showLabel] - Label position
|
|
13
|
-
@slot input (let:fieldName, let:fieldForge, let:data) - Custom input rendering
|
|
14
|
-
@event change - Emitted on value change (future)
|
|
15
|
-
-->
|
|
16
|
-
<script lang="ts" generics="COL extends Record<string,any>">
|
|
17
|
-
import type { TplCollectionName } from '@medyll/idae-idbql';
|
|
18
|
-
import { getContext } from 'svelte';
|
|
19
|
-
import { machine } from '../main/machine.js';
|
|
20
|
-
|
|
21
|
-
// 1. Unified props with bindable data
|
|
22
|
-
let {
|
|
23
|
-
collection = getContext('collection'),
|
|
24
|
-
fieldName,
|
|
25
|
-
data = $bindable(),
|
|
26
|
-
mode = 'show',
|
|
27
|
-
inputForm,
|
|
28
|
-
showLabel = true
|
|
29
|
-
} = $props<{
|
|
30
|
-
collection?: TplCollectionName;
|
|
31
|
-
collectionId?: any;
|
|
32
|
-
fieldName: keyof COL;
|
|
33
|
-
data: COL;
|
|
34
|
-
mode?: 'show' | 'create' | 'update';
|
|
35
|
-
editInPlace?: boolean;
|
|
36
|
-
inputForm?: string;
|
|
37
|
-
showLabel?: boolean | string
|
|
38
|
-
}>();
|
|
39
|
-
|
|
40
|
-
// 2. Pure reactive derivations
|
|
41
|
-
const scheme = $derived(machine.logic.collection(collection));
|
|
42
|
-
const fieldForge = $derived(scheme.fieldForge(String(fieldName), data));
|
|
43
|
-
const schemeFieldValues = $derived(scheme.collectionValues);
|
|
44
|
-
const inputDataset = $derived(schemeFieldValues.getInputDataSet(fieldName, data));
|
|
45
|
-
|
|
46
|
-
const isPrivate = $derived(fieldForge.fieldArgs?.includes('private'));
|
|
47
|
-
const labelPosition = $derived(
|
|
48
|
-
typeof showLabel === 'string' ? showLabel : (showLabel === true ? 'above' : '')
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
let error = $state<string | null>(null);
|
|
52
|
-
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
{#snippet fieldShow()}
|
|
57
|
-
<div class="flex w-48 gap-2">
|
|
58
|
-
<div class="flex-1" {...inputDataset}>{fieldForge.format}</div>
|
|
59
|
-
</div>
|
|
60
|
-
{/snippet}
|
|
61
|
-
|
|
62
|
-
{#snippet fieldInput()}
|
|
63
|
-
{#if fieldForge.fieldType === 'id'}
|
|
64
|
-
{#if mode !== 'create'}
|
|
65
|
-
<input type="hidden" bind:value={data[fieldName]} {...inputDataset} id={fieldName} name={fieldName} form={inputForm} />
|
|
66
|
-
{/if}
|
|
67
|
-
{:else if fieldForge.fieldType === 'boolean'}
|
|
68
|
-
<input type="checkbox" bind:checked={data[fieldName]} {...inputDataset} id={fieldName} name={fieldName} form={inputForm} />
|
|
69
|
-
{:else if fieldForge.fieldType?.includes('area')}
|
|
70
|
-
<textarea
|
|
71
|
-
style="width:100%;max-width:100%;"
|
|
72
|
-
bind:value={data[fieldName]}
|
|
73
|
-
rows="3"
|
|
74
|
-
class="input h-24"
|
|
75
|
-
{...inputDataset}
|
|
76
|
-
id={fieldName}
|
|
77
|
-
name={fieldName}
|
|
78
|
-
form={inputForm}
|
|
79
|
-
></textarea>
|
|
80
|
-
{:else}
|
|
81
|
-
<input
|
|
82
|
-
style="width: 100%"
|
|
83
|
-
class="input"
|
|
84
|
-
bind:value={data[fieldName]}
|
|
85
|
-
type={fieldForge.htmlInputType}
|
|
86
|
-
{...inputDataset}
|
|
87
|
-
id={fieldName}
|
|
88
|
-
name={fieldName}
|
|
89
|
-
form={inputForm}
|
|
90
|
-
/>
|
|
91
|
-
{/if}
|
|
92
|
-
{/snippet}
|
|
93
|
-
|
|
94
|
-
{#if fieldForge}
|
|
95
|
-
{#if !isPrivate}
|
|
96
|
-
<div class="cell relative flex flex-col gap-2 wrapper-{fieldForge.fieldType}">
|
|
97
|
-
{#if fieldForge.fieldType !== 'id' && (labelPosition === 'before' || labelPosition === 'above')}
|
|
98
|
-
<label form={inputForm} for={fieldName} class="field-label {labelPosition}">
|
|
99
|
-
{fieldName}
|
|
100
|
-
</label>
|
|
101
|
-
{/if}
|
|
102
|
-
|
|
103
|
-
<div class="field-input flex">
|
|
104
|
-
{#if mode === 'show'}
|
|
105
|
-
{@render fieldShow()}
|
|
106
|
-
{:else}
|
|
107
|
-
{@render fieldInput()}
|
|
108
|
-
{/if}
|
|
109
|
-
</div>
|
|
110
|
-
|
|
111
|
-
{#if labelPosition === 'after' || labelPosition === 'below'}
|
|
112
|
-
<label form={inputForm} for={fieldName} class="field-label {labelPosition}">
|
|
113
|
-
{fieldName}
|
|
114
|
-
</label>
|
|
115
|
-
{/if}
|
|
116
|
-
|
|
117
|
-
{#if error}
|
|
118
|
-
<div class="error-message">{error}</div>
|
|
119
|
-
{/if}
|
|
120
|
-
</div>
|
|
121
|
-
{/if}
|
|
122
|
-
{:else}
|
|
123
|
-
<div class="error-message">Champ ou schéma non trouvé pour {fieldName}</div>
|
|
124
|
-
{/if}
|
|
125
|
-
|
|
126
|
-
<style>
|
|
127
|
-
@reference "../../styles/references.css";
|
|
128
|
-
|
|
129
|
-
.error-message { color: red; font-size: 0.9em; margin-top: 0.2em; }
|
|
130
|
-
|
|
131
|
-
.field-label {
|
|
132
|
-
display: block;
|
|
133
|
-
font-weight: bold;
|
|
134
|
-
padding: 0.5rem;
|
|
135
|
-
|
|
136
|
-
&.before, &.after { display: block; margin-right: 0.5em; }
|
|
137
|
-
&.above { margin-bottom: 0.25em; }
|
|
138
|
-
&.below { margin-top: 0.25em; }
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.wrapper-text-tiny { width: 110px; }
|
|
142
|
-
.wrapper-text-medium { width: 370px; }
|
|
143
|
-
.wrapper-text-area, .wrapper-text-long {
|
|
144
|
-
flex-basis: 100%;
|
|
145
|
-
flex-grow: 1;
|
|
146
|
-
max-width: 100%;
|
|
147
|
-
}
|
|
148
|
-
</style>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { TplCollectionName } from '@medyll/idae-idbql';
|
|
2
|
-
declare function $$render<COL extends Record<string, any>>(): {
|
|
3
|
-
props: {
|
|
4
|
-
collection?: TplCollectionName;
|
|
5
|
-
collectionId?: any;
|
|
6
|
-
fieldName: keyof COL;
|
|
7
|
-
data: COL;
|
|
8
|
-
mode?: "show" | "create" | "update";
|
|
9
|
-
editInPlace?: boolean;
|
|
10
|
-
inputForm?: string;
|
|
11
|
-
showLabel?: boolean | string;
|
|
12
|
-
};
|
|
13
|
-
exports: {};
|
|
14
|
-
bindings: "data";
|
|
15
|
-
slots: {};
|
|
16
|
-
events: {};
|
|
17
|
-
};
|
|
18
|
-
declare class __sveltets_Render<COL extends Record<string, any>> {
|
|
19
|
-
props(): ReturnType<typeof $$render<COL>>['props'];
|
|
20
|
-
events(): ReturnType<typeof $$render<COL>>['events'];
|
|
21
|
-
slots(): ReturnType<typeof $$render<COL>>['slots'];
|
|
22
|
-
bindings(): "data";
|
|
23
|
-
exports(): {};
|
|
24
|
-
}
|
|
25
|
-
interface $$IsomorphicComponent {
|
|
26
|
-
new <COL extends Record<string, any>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<COL>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<COL>['props']>, ReturnType<__sveltets_Render<COL>['events']>, ReturnType<__sveltets_Render<COL>['slots']>> & {
|
|
27
|
-
$$bindings?: ReturnType<__sveltets_Render<COL>['bindings']>;
|
|
28
|
-
} & ReturnType<__sveltets_Render<COL>['exports']>;
|
|
29
|
-
<COL extends Record<string, any>>(internal: unknown, props: ReturnType<__sveltets_Render<COL>['props']> & {}): ReturnType<__sveltets_Render<COL>['exports']>;
|
|
30
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
31
|
-
}
|
|
32
|
-
declare const FieldValue: $$IsomorphicComponent;
|
|
33
|
-
type FieldValue<COL extends Record<string, any>> = InstanceType<typeof FieldValue<COL>>;
|
|
34
|
-
export default FieldValue;
|
package/dist/form/types.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface CreateUpdateProps<T = string> {
|
|
2
|
-
mode: 'create' | 'update' | 'show';
|
|
3
|
-
collection: string;
|
|
4
|
-
data?: Record<string, any>;
|
|
5
|
-
withData?: Record<string, any>;
|
|
6
|
-
dataId?: any;
|
|
7
|
-
/** fields to show in the collection */
|
|
8
|
-
showFields?: T[];
|
|
9
|
-
/**
|
|
10
|
-
allow in place edition, for all fields, or some
|
|
11
|
-
only available in show mode
|
|
12
|
-
*/
|
|
13
|
-
inPlaceEdit?: boolean | T[];
|
|
14
|
-
/** display mode for the fields */
|
|
15
|
-
displayMode?: 'vertical' | 'wrap';
|
|
16
|
-
showFks?: boolean;
|
|
17
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!--
|
|
3
|
-
Confirm.svelte
|
|
4
|
-
Svelte 5 confirm/cancel fragment
|
|
5
|
-
@role fragment
|
|
6
|
-
@prop {Function} validate - Validation callback
|
|
7
|
-
@prop {string} [message] - Confirm message
|
|
8
|
-
@slot initial - Initial content
|
|
9
|
-
@slot children - Button content
|
|
10
|
-
@slot confirm - Confirm button content (optional)
|
|
11
|
-
@slot cancel - Cancel button content (optional)
|
|
12
|
-
@event confirm - Emitted on confirm
|
|
13
|
-
@event cancel - Emitted on cancel
|
|
14
|
-
-->
|
|
15
|
-
|
|
16
|
-
<script lang="ts">
|
|
17
|
-
import { Icon } from '@medyll/idae-slotui-svelte';
|
|
18
|
-
let { validate, message = undefined } = $props<{ validate: Function; message?: string }>();
|
|
19
|
-
let status = $state('default');
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
{#snippet initial()}
|
|
23
|
-
<!-- Default initial content: empty -->
|
|
24
|
-
{/snippet}
|
|
25
|
-
|
|
26
|
-
{#snippet children()}
|
|
27
|
-
<Icon icon="mdi:pencil" class="md" />
|
|
28
|
-
{/snippet}
|
|
29
|
-
|
|
30
|
-
{#snippet confirm(message)}
|
|
31
|
-
{message ?? ''}
|
|
32
|
-
<Icon class="color-success md text-green-800" icon="mdi:done" />
|
|
33
|
-
{/snippet}
|
|
34
|
-
|
|
35
|
-
{#snippet cancel()}
|
|
36
|
-
<Icon icon="typcn:cancel" style="color: red" class="md fill-red-800" />
|
|
37
|
-
{/snippet}
|
|
38
|
-
|
|
39
|
-
<div class="line-gap-2 w-full">
|
|
40
|
-
{@render initial()}
|
|
41
|
-
{#if status === 'default'}
|
|
42
|
-
<button
|
|
43
|
-
class="line-gap-2"
|
|
44
|
-
aria-label="Editer"
|
|
45
|
-
onclick={() => { status = 'show_confirm'; }}
|
|
46
|
-
>
|
|
47
|
-
{@render children()}
|
|
48
|
-
</button>
|
|
49
|
-
{/if}
|
|
50
|
-
{#if status === 'show_confirm'}
|
|
51
|
-
<button
|
|
52
|
-
aria-label="Confirmer"
|
|
53
|
-
onclick={() => { validate?.(); status = 'default'; }}
|
|
54
|
-
>
|
|
55
|
-
{@render confirm(message)}
|
|
56
|
-
</button>
|
|
57
|
-
<button
|
|
58
|
-
aria-label="Annuler"
|
|
59
|
-
onclick={() => { status = 'default'; }}
|
|
60
|
-
>
|
|
61
|
-
{@render cancel()}
|
|
62
|
-
</button>
|
|
63
|
-
{/if}
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<style>
|
|
67
|
-
@reference "../../styles/references.css";
|
|
68
|
-
svg {
|
|
69
|
-
> path {
|
|
70
|
-
color: red !important;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
</style>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { slide } from 'svelte/transition';
|
|
3
|
-
|
|
4
|
-
export let showPanel: boolean = true;
|
|
5
|
-
export let panelMode: 'expanded' | 'reduced' = 'expanded';
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<div class="relative flex h-full gap-4">
|
|
9
|
-
{#if showPanel}
|
|
10
|
-
<div transition:slide={{ axis: 'x' }} class="paper h-64 w-64 overflow-auto overflow-x-hidden">
|
|
11
|
-
<slot name="leftNav" />
|
|
12
|
-
</div>
|
|
13
|
-
{/if}
|
|
14
|
-
<div class="flex-1">
|
|
15
|
-
<div class="flex h-full w-96 flex-col gap-1">
|
|
16
|
-
<slot />
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
-
default: any;
|
|
16
|
-
} ? Props extends Record<string, never> ? any : {
|
|
17
|
-
children?: any;
|
|
18
|
-
} : {});
|
|
19
|
-
declare const Frame: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
-
showPanel?: boolean;
|
|
21
|
-
panelMode?: "expanded" | "reduced";
|
|
22
|
-
}, {
|
|
23
|
-
leftNav: {};
|
|
24
|
-
default: {};
|
|
25
|
-
}>, {
|
|
26
|
-
[evt: string]: CustomEvent<any>;
|
|
27
|
-
}, {
|
|
28
|
-
leftNav: {};
|
|
29
|
-
default: {};
|
|
30
|
-
}, {}, string>;
|
|
31
|
-
type Frame = InstanceType<typeof Frame>;
|
|
32
|
-
export default Frame;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let className = '';
|
|
3
|
-
export let title: string | undefined = undefined;
|
|
4
|
-
export let vertical: boolean = false;
|
|
5
|
-
export { className as class };
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
{#if $$slots.input && !title}
|
|
9
|
-
<div class="w-full py-2 text-sm font-semibold">
|
|
10
|
-
{title}
|
|
11
|
-
</div>
|
|
12
|
-
{/if}
|
|
13
|
-
<div class="{vertical ? 'flex-v' : 'flex-align-middle'} gap-4 py-4">
|
|
14
|
-
<div class="flex flex-1 text-sm">
|
|
15
|
-
<div class="flex-1 font-semibold"><slot name="input">- {title}</slot></div>
|
|
16
|
-
<slot name="titleButton" />
|
|
17
|
-
</div>
|
|
18
|
-
<div class="{vertical ? 'px-2' : ''} {className}">
|
|
19
|
-
<slot />
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
-
default: any;
|
|
16
|
-
} ? Props extends Record<string, never> ? any : {
|
|
17
|
-
children?: any;
|
|
18
|
-
} : {});
|
|
19
|
-
declare const InfoLine: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
-
title?: string | undefined;
|
|
21
|
-
vertical?: boolean;
|
|
22
|
-
class?: string;
|
|
23
|
-
}, {
|
|
24
|
-
input: {};
|
|
25
|
-
titleButton: {};
|
|
26
|
-
default: {};
|
|
27
|
-
}>, {
|
|
28
|
-
[evt: string]: CustomEvent<any>;
|
|
29
|
-
}, {
|
|
30
|
-
input: {};
|
|
31
|
-
titleButton: {};
|
|
32
|
-
default: {};
|
|
33
|
-
}, {}, string>;
|
|
34
|
-
type InfoLine = InstanceType<typeof InfoLine>;
|
|
35
|
-
export default InfoLine;
|