openxiangda 1.0.264 → 2.0.0-alpha.2
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/README.md +11 -666
- package/bin/run.js +11 -0
- package/dist/browser/AuthoritativeSelector.d.ts +37 -0
- package/dist/browser/AuthoritativeSelector.d.ts.map +1 -0
- package/dist/browser/AuthoritativeSelector.js +357 -0
- package/dist/browser/AuthoritativeSelector.js.map +1 -0
- package/dist/browser/FilePreviewPage.d.ts +2 -0
- package/dist/browser/FilePreviewPage.d.ts.map +1 -0
- package/dist/browser/FilePreviewPage.js +191 -0
- package/dist/browser/FilePreviewPage.js.map +1 -0
- package/dist/browser/Shell.d.ts +6 -0
- package/dist/browser/Shell.d.ts.map +1 -0
- package/dist/browser/Shell.js +198 -0
- package/dist/browser/Shell.js.map +1 -0
- package/dist/browser/appearance.d.ts +12 -0
- package/dist/browser/appearance.d.ts.map +1 -0
- package/dist/browser/appearance.js +100 -0
- package/dist/browser/appearance.js.map +1 -0
- package/dist/browser/application.d.ts +8 -0
- package/dist/browser/application.d.ts.map +1 -0
- package/dist/browser/application.js +42 -0
- package/dist/browser/application.js.map +1 -0
- package/dist/browser/components/platform-fields/AddressField.d.ts +12 -0
- package/dist/browser/components/platform-fields/AddressField.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/AddressField.js +179 -0
- package/dist/browser/components/platform-fields/AddressField.js.map +1 -0
- package/dist/browser/components/platform-fields/AttachmentFileList.d.ts +9 -0
- package/dist/browser/components/platform-fields/AttachmentFileList.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/AttachmentFileList.js +164 -0
- package/dist/browser/components/platform-fields/AttachmentFileList.js.map +1 -0
- package/dist/browser/components/platform-fields/CascadeField.d.ts +13 -0
- package/dist/browser/components/platform-fields/CascadeField.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/CascadeField.js +14 -0
- package/dist/browser/components/platform-fields/CascadeField.js.map +1 -0
- package/dist/browser/components/platform-fields/DateTimeField.d.ts +16 -0
- package/dist/browser/components/platform-fields/DateTimeField.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/DateTimeField.js +51 -0
- package/dist/browser/components/platform-fields/DateTimeField.js.map +1 -0
- package/dist/browser/components/platform-fields/JsonField.d.ts +11 -0
- package/dist/browser/components/platform-fields/JsonField.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/JsonField.js +40 -0
- package/dist/browser/components/platform-fields/JsonField.js.map +1 -0
- package/dist/browser/components/platform-fields/LocationField.d.ts +11 -0
- package/dist/browser/components/platform-fields/LocationField.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/LocationField.js +73 -0
- package/dist/browser/components/platform-fields/LocationField.js.map +1 -0
- package/dist/browser/components/platform-fields/PlatformDirectoryPicker.d.ts +12 -0
- package/dist/browser/components/platform-fields/PlatformDirectoryPicker.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/PlatformDirectoryPicker.js +269 -0
- package/dist/browser/components/platform-fields/PlatformDirectoryPicker.js.map +1 -0
- package/dist/browser/components/platform-fields/ResourceReferenceField.d.ts +12 -0
- package/dist/browser/components/platform-fields/ResourceReferenceField.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/ResourceReferenceField.js +22 -0
- package/dist/browser/components/platform-fields/ResourceReferenceField.js.map +1 -0
- package/dist/browser/components/platform-fields/RichTextField.d.ts +14 -0
- package/dist/browser/components/platform-fields/RichTextField.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/RichTextField.js +214 -0
- package/dist/browser/components/platform-fields/RichTextField.js.map +1 -0
- package/dist/browser/components/platform-fields/SignatureField.d.ts +15 -0
- package/dist/browser/components/platform-fields/SignatureField.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/SignatureField.js +179 -0
- package/dist/browser/components/platform-fields/SignatureField.js.map +1 -0
- package/dist/browser/components/platform-fields/SubtableField.d.ts +18 -0
- package/dist/browser/components/platform-fields/SubtableField.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/SubtableField.js +236 -0
- package/dist/browser/components/platform-fields/SubtableField.js.map +1 -0
- package/dist/browser/components/platform-fields/address-value.d.ts +13 -0
- package/dist/browser/components/platform-fields/address-value.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/address-value.js +70 -0
- package/dist/browser/components/platform-fields/address-value.js.map +1 -0
- package/dist/browser/components/platform-fields/cascade-value.d.ts +6 -0
- package/dist/browser/components/platform-fields/cascade-value.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/cascade-value.js +47 -0
- package/dist/browser/components/platform-fields/cascade-value.js.map +1 -0
- package/dist/browser/components/platform-fields/directory-value.d.ts +7 -0
- package/dist/browser/components/platform-fields/directory-value.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/directory-value.js +35 -0
- package/dist/browser/components/platform-fields/directory-value.js.map +1 -0
- package/dist/browser/components/platform-fields/field-form-codec.d.ts +10 -0
- package/dist/browser/components/platform-fields/field-form-codec.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/field-form-codec.js +82 -0
- package/dist/browser/components/platform-fields/field-form-codec.js.map +1 -0
- package/dist/browser/components/platform-fields/location-value.d.ts +20 -0
- package/dist/browser/components/platform-fields/location-value.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/location-value.js +57 -0
- package/dist/browser/components/platform-fields/location-value.js.map +1 -0
- package/dist/browser/components/platform-fields/resource-query.d.ts +14 -0
- package/dist/browser/components/platform-fields/resource-query.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/resource-query.js +102 -0
- package/dist/browser/components/platform-fields/resource-query.js.map +1 -0
- package/dist/browser/components/platform-fields/rich-text-value.d.ts +12 -0
- package/dist/browser/components/platform-fields/rich-text-value.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/rich-text-value.js +83 -0
- package/dist/browser/components/platform-fields/rich-text-value.js.map +1 -0
- package/dist/browser/components/platform-fields/subtable-value.d.ts +31 -0
- package/dist/browser/components/platform-fields/subtable-value.d.ts.map +1 -0
- package/dist/browser/components/platform-fields/subtable-value.js +120 -0
- package/dist/browser/components/platform-fields/subtable-value.js.map +1 -0
- package/dist/browser/components/resource/GeneratedResourceCrud.d.ts +8 -0
- package/dist/browser/components/resource/GeneratedResourceCrud.d.ts.map +1 -0
- package/dist/browser/components/resource/GeneratedResourceCrud.js +580 -0
- package/dist/browser/components/resource/GeneratedResourceCrud.js.map +1 -0
- package/dist/browser/components/resource/ResourceBatchActions.d.ts +25 -0
- package/dist/browser/components/resource/ResourceBatchActions.d.ts.map +1 -0
- package/dist/browser/components/resource/ResourceBatchActions.js +168 -0
- package/dist/browser/components/resource/ResourceBatchActions.js.map +1 -0
- package/dist/browser/components/resource/StandardResourcePages.d.ts +57 -0
- package/dist/browser/components/resource/StandardResourcePages.d.ts.map +1 -0
- package/dist/browser/components/resource/StandardResourcePages.js +89 -0
- package/dist/browser/components/resource/StandardResourcePages.js.map +1 -0
- package/dist/browser/components/resource/SurfaceFields.d.ts +88 -0
- package/dist/browser/components/resource/SurfaceFields.d.ts.map +1 -0
- package/dist/browser/components/resource/SurfaceFields.js +497 -0
- package/dist/browser/components/resource/SurfaceFields.js.map +1 -0
- package/dist/browser/components/resource/generated-resource-definition.d.ts +19 -0
- package/dist/browser/components/resource/generated-resource-definition.d.ts.map +1 -0
- package/dist/browser/components/resource/generated-resource-definition.js +2 -0
- package/dist/browser/components/resource/generated-resource-definition.js.map +1 -0
- package/dist/browser/components/resource/resource-import.d.ts +15 -0
- package/dist/browser/components/resource/resource-import.d.ts.map +1 -0
- package/dist/browser/components/resource/resource-import.js +197 -0
- package/dist/browser/components/resource/resource-import.js.map +1 -0
- package/dist/browser/data-provider.d.ts +4 -0
- package/dist/browser/data-provider.d.ts.map +1 -0
- package/dist/browser/data-provider.js +45 -0
- package/dist/browser/data-provider.js.map +1 -0
- package/dist/browser/platform-client.d.ts +81 -0
- package/dist/browser/platform-client.d.ts.map +1 -0
- package/dist/browser/platform-client.js +422 -0
- package/dist/browser/platform-client.js.map +1 -0
- package/dist/browser/resource-definitions.d.ts +8 -0
- package/dist/browser/resource-definitions.d.ts.map +1 -0
- package/dist/browser/resource-definitions.js +14 -0
- package/dist/browser/resource-definitions.js.map +1 -0
- package/dist/browser/runtime-meta.d.ts +22 -0
- package/dist/browser/runtime-meta.d.ts.map +1 -0
- package/dist/browser/runtime-meta.js +79 -0
- package/dist/browser/runtime-meta.js.map +1 -0
- package/dist/browser/runtime.d.ts +13 -0
- package/dist/browser/runtime.d.ts.map +1 -0
- package/dist/browser/runtime.js +47 -0
- package/dist/browser/runtime.js.map +1 -0
- package/dist/browser/styles.css +1941 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -0
- package/dist/core.d.ts +6 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +4 -0
- package/dist/core.js.map +1 -0
- package/dist/field-kit.d.ts +22 -0
- package/dist/field-kit.d.ts.map +1 -0
- package/dist/field-kit.js +22 -0
- package/dist/field-kit.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/nest.d.ts +10 -0
- package/dist/nest.d.ts.map +1 -0
- package/dist/nest.js +9 -0
- package/dist/nest.js.map +1 -0
- package/dist/react.d.ts +12 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +11 -0
- package/dist/react.js.map +1 -0
- package/dist/testing.d.ts +4 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +4 -0
- package/dist/testing.js.map +1 -0
- package/package.json +95 -200
- package/skills/manifest.json +10 -0
- package/skills/openxiangda-v2/SKILL.md +55 -0
- package/skills/openxiangda-v2/references/architecture.md +7 -0
- package/skills/openxiangda-v2/references/backend.md +116 -0
- package/skills/openxiangda-v2/references/data-authz.md +93 -0
- package/skills/openxiangda-v2/references/delivery.md +11 -0
- package/skills/openxiangda-v2/references/discovery.md +15 -0
- package/skills/openxiangda-v2/references/frontend.md +10 -0
- package/skills/openxiangda-v2/references/testing.md +16 -0
- package/skills/openxiangda-v2/references/workflow-notification.md +69 -0
- package/skills/openxiangda-v2/references/workspace.md +21 -0
- package/bin/openxiangda.js +0 -26
- package/lib/app-function-invoke.js +0 -28
- package/lib/application-environments.js +0 -1134
- package/lib/change-baseline.js +0 -1359
- package/lib/cli.js +0 -31084
- package/lib/config.js +0 -450
- package/lib/content-cache.js +0 -97
- package/lib/delivery-v2-cli.js +0 -329
- package/lib/delivery-v2-executor.js +0 -1703
- package/lib/delivery-v2-package.js +0 -1176
- package/lib/dependency-capsule.js +0 -246
- package/lib/design-gates.js +0 -668
- package/lib/design-review.js +0 -220
- package/lib/developer-center.js +0 -160
- package/lib/form-field-contract.js +0 -79
- package/lib/form-schema-loader.js +0 -181
- package/lib/git-remote-identity.js +0 -89
- package/lib/http.js +0 -196
- package/lib/integration-bundle.js +0 -225
- package/lib/js-code-build.js +0 -175
- package/lib/open-api.js +0 -256
- package/lib/policy.js +0 -137
- package/lib/publish-context.js +0 -98
- package/lib/publish-lease-heartbeat.js +0 -182
- package/lib/publish-lease.js +0 -221
- package/lib/release-error-classification.js +0 -41
- package/lib/release-explain.js +0 -75
- package/lib/release-mainline.js +0 -654
- package/lib/release-plan.js +0 -550
- package/lib/release-telemetry.js +0 -182
- package/lib/resource-binding-contract.js +0 -210
- package/lib/role-resolution.js +0 -57
- package/lib/runtime-lineage.js +0 -326
- package/lib/sdd.js +0 -3306
- package/lib/skills.js +0 -453
- package/lib/source-dependencies.js +0 -921
- package/lib/task-status.js +0 -330
- package/lib/utils.js +0 -178
- package/lib/workspace-bootstrap.js +0 -268
- package/lib/workspace-init.js +0 -202
- package/lib/worktree-cleanup.js +0 -631
- package/lib/worktree-owner.js +0 -354
- package/openxiangda-skills/SKILL.md +0 -226
- package/openxiangda-skills/references/architecture-design.md +0 -409
- package/openxiangda-skills/references/architecture-patterns.md +0 -264
- package/openxiangda-skills/references/automation-v3.md +0 -349
- package/openxiangda-skills/references/best-practices.md +0 -272
- package/openxiangda-skills/references/component-guide.md +0 -287
- package/openxiangda-skills/references/connector-resources.md +0 -80
- package/openxiangda-skills/references/data-views.md +0 -360
- package/openxiangda-skills/references/forms/component-registry.md +0 -90
- package/openxiangda-skills/references/forms/form-schema.md +0 -146
- package/openxiangda-skills/references/forms/layout-and-rules.md +0 -24
- package/openxiangda-skills/references/notifications.md +0 -227
- package/openxiangda-skills/references/openxiangda-api.md +0 -971
- package/openxiangda-skills/references/pages/app-shell.md +0 -66
- package/openxiangda-skills/references/pages/page-sdk.md +0 -401
- package/openxiangda-skills/references/pages/publish-flow.md +0 -84
- package/openxiangda-skills/references/pages/workspace-structure.md +0 -41
- package/openxiangda-skills/references/permission-design-patterns.md +0 -313
- package/openxiangda-skills/references/permissions-settings.md +0 -468
- package/openxiangda-skills/references/platform-data-model.md +0 -340
- package/openxiangda-skills/references/resource-manifest-cheatsheet.md +0 -936
- package/openxiangda-skills/references/school-contact-relations.md +0 -224
- package/openxiangda-skills/references/style-system.md +0 -218
- package/openxiangda-skills/references/troubleshooting.md +0 -271
- package/openxiangda-skills/references/workflow-v3.md +0 -441
- package/openxiangda-skills/references/workspace-state.md +0 -115
- package/openxiangda-skills/skills/openxiangda-app/SKILL.md +0 -118
- package/openxiangda-skills/skills/openxiangda-architecture-design/SKILL.md +0 -137
- package/openxiangda-skills/skills/openxiangda-core/SKILL.md +0 -222
- package/openxiangda-skills/skills/openxiangda-form/SKILL.md +0 -184
- package/openxiangda-skills/skills/openxiangda-inspect/SKILL.md +0 -63
- package/openxiangda-skills/skills/openxiangda-open-api/SKILL.md +0 -57
- package/openxiangda-skills/skills/openxiangda-open-api/agents/openai.yaml +0 -4
- package/openxiangda-skills/skills/openxiangda-open-api/references/backend-authentication.md +0 -63
- package/openxiangda-skills/skills/openxiangda-open-api/references/dingtalk-api.openapi.json +0 -15653
- package/openxiangda-skills/skills/openxiangda-page/SKILL.md +0 -154
- package/openxiangda-skills/skills/openxiangda-permission-settings/SKILL.md +0 -209
- package/openxiangda-skills/skills/openxiangda-workflow-automation/SKILL.md +0 -201
- package/packages/sdk/bin/lowcode-workspace.mjs +0 -4
- package/packages/sdk/dist/ProcessPreview-DSUIJi5V.d.mts +0 -1292
- package/packages/sdk/dist/ProcessPreview-DSUIJi5V.d.ts +0 -1292
- package/packages/sdk/dist/build/index.cjs +0 -1
- package/packages/sdk/dist/build/index.d.mts +0 -60
- package/packages/sdk/dist/build/index.d.ts +0 -60
- package/packages/sdk/dist/build/index.mjs +0 -1
- package/packages/sdk/dist/components/index.cjs +0 -148
- package/packages/sdk/dist/components/index.d.mts +0 -970
- package/packages/sdk/dist/components/index.d.ts +0 -970
- package/packages/sdk/dist/components/index.mjs +0 -148
- package/packages/sdk/dist/dataManagementApi-Ro9itwm8.d.ts +0 -142
- package/packages/sdk/dist/dataManagementApi-p_HOhQnA.d.mts +0 -142
- package/packages/sdk/dist/runtime/index.cjs +0 -148
- package/packages/sdk/dist/runtime/index.d.mts +0 -171
- package/packages/sdk/dist/runtime/index.d.ts +0 -171
- package/packages/sdk/dist/runtime/index.mjs +0 -148
- package/packages/sdk/dist/runtime/react.cjs +0 -148
- package/packages/sdk/dist/runtime/react.d.mts +0 -3202
- package/packages/sdk/dist/runtime/react.d.ts +0 -3202
- package/packages/sdk/dist/runtime/react.mjs +0 -148
- package/packages/sdk/dist/styles/antd-theme.cjs +0 -1
- package/packages/sdk/dist/styles/antd-theme.d.mts +0 -6
- package/packages/sdk/dist/styles/antd-theme.d.ts +0 -6
- package/packages/sdk/dist/styles/antd-theme.mjs +0 -1
- package/packages/sdk/dist/styles/tailwind-preset.cjs +0 -1
- package/packages/sdk/dist/styles/tailwind-preset.d.mts +0 -74
- package/packages/sdk/dist/styles/tailwind-preset.d.ts +0 -74
- package/packages/sdk/dist/styles/tailwind-preset.mjs +0 -1
- package/packages/sdk/dist/styles/tokens.css +0 -74
- package/packages/sdk/dist/workflow/index.cjs +0 -3
- package/packages/sdk/dist/workflow/index.d.mts +0 -291
- package/packages/sdk/dist/workflow/index.d.ts +0 -291
- package/packages/sdk/dist/workflow/index.mjs +0 -3
- package/packages/sdk/source/admin-list/AdminList.tsx +0 -1734
- package/packages/sdk/source/admin-list/README.md +0 -12
- package/packages/sdk/source/admin-list/dataSources.ts +0 -345
- package/packages/sdk/source/admin-list/index.ts +0 -42
- package/packages/sdk/source/admin-list/preferences.ts +0 -174
- package/packages/sdk/source/admin-list/types.ts +0 -273
- package/packages/sdk/src/build-source/README.md +0 -9
- package/packages/sdk/src/build-source/bin/lowcode-workspace.mjs +0 -7
- package/packages/sdk/src/build-source/package.json +0 -34
- package/packages/sdk/src/build-source/scripts/build-forms.mjs +0 -1129
- package/packages/sdk/src/build-source/scripts/build-pages.mjs +0 -897
- package/packages/sdk/src/build-source/scripts/build-workspace.mjs +0 -89
- package/packages/sdk/src/build-source/scripts/publish-all.mjs +0 -190
- package/packages/sdk/src/build-source/scripts/publish-oss.mjs +0 -144
- package/packages/sdk/src/build-source/scripts/register-bundle.mjs +0 -1
- package/packages/sdk/src/build-source/scripts/register.mjs +0 -362
- package/packages/sdk/src/build-source/scripts/sync-schema.mjs +0 -381
- package/packages/sdk/src/build-source/scripts/utils/form-api.mjs +0 -1058
- package/packages/sdk/src/build-source/scripts/utils/form-runtime-assets.mjs +0 -57
- package/packages/sdk/src/build-source/scripts/utils/incremental.mjs +0 -348
- package/packages/sdk/src/build-source/scripts/utils/load-config.mjs +0 -331
- package/packages/sdk/src/build-source/scripts/utils/mime-types.mjs +0 -70
- package/packages/sdk/src/build-source/scripts/utils/namespace-css.mjs +0 -77
- package/packages/sdk/src/build-source/scripts/utils/oss-client.mjs +0 -128
- package/packages/sdk/src/build-source/scripts/utils/pages.mjs +0 -150
- package/packages/sdk/src/build-source/scripts/utils/progress.mjs +0 -57
- package/packages/sdk/src/build-source/scripts/utils/publish-oss-patterns.mjs +0 -20
- package/packages/sdk/src/build-source/scripts/utils/register-payload.mjs +0 -90
- package/packages/sdk/src/build-source/scripts/utils/runtime-css-check.mjs +0 -44
- package/packages/sdk/src/build-source/scripts/utils/schema-transform.mjs +0 -142
- package/packages/sdk/src/build-source/scripts/utils/static-assets.mjs +0 -165
- package/packages/sdk/src/build-source/scripts/utils/tailwind-config.mjs +0 -283
- package/packages/sdk/src/build-source/scripts/utils/tailwind-token-warnings.mjs +0 -146
- package/packages/sdk/src/build-source/scripts/utils/workspace-style-entry.mjs +0 -29
- package/packages/sdk/src/build-source/src/cli.mjs +0 -735
- package/policy/openxiangda-policy.json +0 -72
- package/templates/openxiangda-react-spa/.cursor/rules/openxiangda-form.mdc +0 -24
- package/templates/openxiangda-react-spa/.cursor/rules/openxiangda-page.mdc +0 -25
- package/templates/openxiangda-react-spa/.cursor/rules/openxiangda-resources.mdc +0 -32
- package/templates/openxiangda-react-spa/.cursor/rules/openxiangda-workflow-automation.mdc +0 -26
- package/templates/openxiangda-react-spa/.cursor/rules/openxiangda.mdc +0 -68
- package/templates/openxiangda-react-spa/.env.example +0 -4
- package/templates/openxiangda-react-spa/.qoder/rules/openxiangda-form.md +0 -37
- package/templates/openxiangda-react-spa/.qoder/rules/openxiangda-page.md +0 -29
- package/templates/openxiangda-react-spa/.qoder/rules/openxiangda-resources.md +0 -32
- package/templates/openxiangda-react-spa/.qoder/rules/openxiangda-workflow-automation.md +0 -34
- package/templates/openxiangda-react-spa/.qoder/rules/openxiangda.md +0 -66
- package/templates/openxiangda-react-spa/AGENTS.md +0 -192
- package/templates/openxiangda-react-spa/DELIVERY.md +0 -43
- package/templates/openxiangda-react-spa/app-workspace.config.ts +0 -50
- package/templates/openxiangda-react-spa/index.html +0 -12
- package/templates/openxiangda-react-spa/package.json +0 -53
- package/templates/openxiangda-react-spa/postcss.config.cjs +0 -6
- package/templates/openxiangda-react-spa/scripts/build-js-code.mjs +0 -600
- package/templates/openxiangda-react-spa/scripts/deploy.mjs +0 -18
- package/templates/openxiangda-react-spa/scripts/guard-publish.mjs +0 -21
- package/templates/openxiangda-react-spa/src/app/navigation.ts +0 -73
- package/templates/openxiangda-react-spa/src/app/router.tsx +0 -146
- package/templates/openxiangda-react-spa/src/app/starter-content.ts +0 -144
- package/templates/openxiangda-react-spa/src/forms/.gitkeep +0 -1
- package/templates/openxiangda-react-spa/src/layouts/AdminShell.tsx +0 -570
- package/templates/openxiangda-react-spa/src/main.tsx +0 -21
- package/templates/openxiangda-react-spa/src/pages/admin/AdminDashboardPage.tsx +0 -170
- package/templates/openxiangda-react-spa/src/pages/admin/LoginLogPage.tsx +0 -425
- package/templates/openxiangda-react-spa/src/pages/defaults/DataRoutePage.tsx +0 -36
- package/templates/openxiangda-react-spa/src/pages/defaults/FilePreviewRoutePage.tsx +0 -65
- package/templates/openxiangda-react-spa/src/pages/defaults/FormRoutePage.tsx +0 -235
- package/templates/openxiangda-react-spa/src/pages/public/PublicRegisterPage.tsx +0 -15
- package/templates/openxiangda-react-spa/src/pages/states/NotFoundPage.tsx +0 -31
- package/templates/openxiangda-react-spa/src/resources/menus/menus.json +0 -22
- package/templates/openxiangda-react-spa/src/resources/permissions/page-groups/app-admin.json +0 -8
- package/templates/openxiangda-react-spa/src/resources/permissions/page-groups/public-visitor.json +0 -8
- package/templates/openxiangda-react-spa/src/resources/public-access/public-register.json +0 -14
- package/templates/openxiangda-react-spa/src/resources/roles/roles.json +0 -15
- package/templates/openxiangda-react-spa/src/resources/routes/public-register.json +0 -8
- package/templates/openxiangda-react-spa/src/runtime/default-page-overrides.tsx +0 -35
- package/templates/openxiangda-react-spa/src/runtime/default-routes.ts +0 -16
- package/templates/openxiangda-react-spa/src/shared/form-schema.ts +0 -135
- package/templates/openxiangda-react-spa/src/shared/mac-admin.tsx +0 -651
- package/templates/openxiangda-react-spa/src/shared/ui.tsx +0 -22
- package/templates/openxiangda-react-spa/src/styles/index.css +0 -105
- package/templates/openxiangda-react-spa/tailwind.config.cjs +0 -37
- package/templates/openxiangda-react-spa/tsconfig.app.json +0 -36
- package/templates/openxiangda-react-spa/tsconfig.js-code-nodes.json +0 -19
- package/templates/openxiangda-react-spa/tsconfig.json +0 -7
- package/templates/openxiangda-react-spa/tsconfig.node.json +0 -10
- package/templates/openxiangda-react-spa/vite.config.ts +0 -209
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda-form.mdc +0 -24
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda-page.mdc +0 -21
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda-resources.mdc +0 -40
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda-workflow-automation.mdc +0 -21
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda.mdc +0 -81
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda-form.md +0 -38
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda-page.md +0 -39
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda-resources.md +0 -59
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda-workflow-automation.md +0 -46
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda.md +0 -82
- package/templates/sy-lowcode-app-workspace/AGENTS.md +0 -158
- package/templates/sy-lowcode-app-workspace/DELIVERY.md +0 -43
- package/templates/sy-lowcode-app-workspace/app-workspace.config.ts +0 -51
- package/templates/sy-lowcode-app-workspace/examples/best-practices/README.md +0 -43
- package/templates/sy-lowcode-app-workspace/examples/best-practices/access-governance.md +0 -239
- package/templates/sy-lowcode-app-workspace/examples/best-practices/catalog.json +0 -99
- package/templates/sy-lowcode-app-workspace/examples/best-practices/decision-guide.md +0 -94
- package/templates/sy-lowcode-app-workspace/examples/best-practices/design-style.md +0 -91
- package/templates/sy-lowcode-app-workspace/examples/best-practices/module-structure.md +0 -48
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/role-governance/index.ts +0 -2
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/role-governance/permissions.test.ts +0 -52
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/role-governance/permissions.ts +0 -37
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/role-governance/types.ts +0 -19
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/index.ts +0 -4
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/permissions.test.ts +0 -42
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/permissions.ts +0 -25
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/state-machine.test.ts +0 -63
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/state-machine.ts +0 -73
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/ticket-query.test.ts +0 -34
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/ticket-query.ts +0 -73
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/types.ts +0 -66
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/app-role/page.tsx +0 -1
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/app-role/schema.ts +0 -109
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/customer-profile/page.tsx +0 -1
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/customer-profile/schema.ts +0 -92
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/service-ticket/page.tsx +0 -1
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/service-ticket/schema.ts +0 -153
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/ticket-action-log/page.tsx +0 -1
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/ticket-action-log/schema.ts +0 -65
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/js-code-nodes/daily_ticket_digest/index.ts +0 -44
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/js-code-nodes/sync_roles_to_platform/index.ts +0 -33
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/glass-home-dashboard/App.tsx +0 -8
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/glass-home-dashboard/GlassHomeDashboard.tsx +0 -232
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/glass-home-dashboard/index.tsx +0 -10
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/glass-home-dashboard/page.config.ts +0 -14
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/glass-home-dashboard/styles.css +0 -196
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/interactive-workbench/App.tsx +0 -7
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/interactive-workbench/WorkbenchPage.tsx +0 -36
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/interactive-workbench/components/ConfigPanel.tsx +0 -34
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/interactive-workbench/components/PreviewPanel.tsx +0 -17
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/interactive-workbench/index.tsx +0 -10
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/interactive-workbench/page.config.ts +0 -9
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/interactive-workbench/reducer.ts +0 -29
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/interactive-workbench/styles.css +0 -24
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mint-analytics-dashboard/App.tsx +0 -8
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mint-analytics-dashboard/MintAnalyticsDashboard.tsx +0 -279
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mint-analytics-dashboard/index.tsx +0 -10
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mint-analytics-dashboard/page.config.ts +0 -14
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mint-analytics-dashboard/styles.css +0 -163
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mobile-portal-shell/App.tsx +0 -7
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mobile-portal-shell/MobilePortalShell.tsx +0 -31
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mobile-portal-shell/index.tsx +0 -10
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mobile-portal-shell/modules/MobileHome.tsx +0 -13
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mobile-portal-shell/page.config.ts +0 -14
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mobile-portal-shell/routes.ts +0 -13
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mobile-portal-shell/styles.css +0 -11
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/ops-monitor-dashboard/App.tsx +0 -8
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/ops-monitor-dashboard/OpsMonitorDashboard.tsx +0 -306
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/ops-monitor-dashboard/index.tsx +0 -10
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/ops-monitor-dashboard/page.config.ts +0 -14
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/ops-monitor-dashboard/styles.css +0 -248
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/pc-portal-shell/App.tsx +0 -7
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/pc-portal-shell/PcPortalShell.tsx +0 -35
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/pc-portal-shell/components/PortalMetric.tsx +0 -11
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/pc-portal-shell/index.tsx +0 -10
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/pc-portal-shell/modules/HomeModule.tsx +0 -25
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/pc-portal-shell/modules/TicketsModule.tsx +0 -14
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/pc-portal-shell/page.config.ts +0 -14
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/pc-portal-shell/routes.ts +0 -19
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/pc-portal-shell/styles.css +0 -35
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/App.tsx +0 -7
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/TicketOpsPage.tsx +0 -105
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/components/TicketActionTimeline.tsx +0 -22
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/components/TicketDetailDrawer.tsx +0 -44
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/components/TicketTableActions.tsx +0 -57
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/index.tsx +0 -10
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/page.config.ts +0 -9
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/styles.css +0 -35
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/work-order-list-drawer/App.tsx +0 -8
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/work-order-list-drawer/WorkOrderListDrawerPage.tsx +0 -371
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/work-order-list-drawer/index.tsx +0 -10
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/work-order-list-drawer/page.config.ts +0 -14
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/work-order-list-drawer/styles.css +0 -182
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/resources/automations/daily-ticket-digest/automation.json +0 -25
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/resources/automations/daily-ticket-digest/trigger.json +0 -9
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/resources/notifications/daily-ticket-digest.json +0 -24
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/resources/permissions/form-groups/service-ticket-college.json +0 -21
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/resources/permissions/roles.json +0 -17
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/resources/workflows/expense-approval-workflow.json +0 -48
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/ConfirmAction.tsx +0 -22
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/QueryState.tsx +0 -37
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/StatusTag.tsx +0 -20
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/admin-ui-templates/DashboardPrimitives.tsx +0 -832
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/admin-ui-templates/chartOptions.ts +0 -140
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/admin-ui-templates/sampleData.ts +0 -466
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/admin-ui-templates/styles.css +0 -874
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/admin-ui-templates/types.ts +0 -150
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/hooks/useTicketOps.ts +0 -96
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/services/role-governance.ts +0 -48
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/services/service-ticket.ts +0 -113
- package/templates/sy-lowcode-app-workspace/examples/forms/customer/page.tsx +0 -1
- package/templates/sy-lowcode-app-workspace/examples/forms/customer/schema.ts +0 -36
- package/templates/sy-lowcode-app-workspace/index.html +0 -12
- package/templates/sy-lowcode-app-workspace/package.json +0 -58
- package/templates/sy-lowcode-app-workspace/postcss.config.cjs +0 -9
- package/templates/sy-lowcode-app-workspace/scripts/build-js-code.mjs +0 -600
- package/templates/sy-lowcode-app-workspace/scripts/guard-publish.mjs +0 -29
- package/templates/sy-lowcode-app-workspace/src/dev/App.tsx +0 -820
- package/templates/sy-lowcode-app-workspace/src/forms/.gitkeep +0 -1
- package/templates/sy-lowcode-app-workspace/src/forms/README.md +0 -52
- package/templates/sy-lowcode-app-workspace/src/index.css +0 -26
- package/templates/sy-lowcode-app-workspace/src/js-code-nodes/.gitkeep +0 -1
- package/templates/sy-lowcode-app-workspace/src/js-code-nodes/types.d.ts +0 -3
- package/templates/sy-lowcode-app-workspace/src/main.tsx +0 -29
- package/templates/sy-lowcode-app-workspace/src/pages/.gitkeep +0 -1
- package/templates/sy-lowcode-app-workspace/src/runtime/builtin-overrides.tsx +0 -8
- package/templates/sy-lowcode-app-workspace/src/shared/form-schema.ts +0 -135
- package/templates/sy-lowcode-app-workspace/src/types/app-workspace.types.ts +0 -88
- package/templates/sy-lowcode-app-workspace/tailwind.config.cjs +0 -31
- package/templates/sy-lowcode-app-workspace/tsconfig.app.json +0 -40
- package/templates/sy-lowcode-app-workspace/tsconfig.examples.json +0 -24
- package/templates/sy-lowcode-app-workspace/tsconfig.js-code-nodes.json +0 -19
- package/templates/sy-lowcode-app-workspace/tsconfig.json +0 -7
- package/templates/sy-lowcode-app-workspace/tsconfig.node.json +0 -10
- package/templates/sy-lowcode-app-workspace/vite.config.ts +0 -85
- package/v2/README.md +0 -35
- package/v2/skills/manifest.json +0 -45
- package/v2/skills/openxiangda-v1-maintenance/SKILL.md +0 -21
- package/v2/skills/openxiangda-v1-maintenance/agents/openai.yaml +0 -4
- package/v2/skills/openxiangda-v2/SKILL.md +0 -38
- package/v2/skills/openxiangda-v2-architecture/SKILL.md +0 -29
- package/v2/skills/openxiangda-v2-architecture/agents/openai.yaml +0 -4
- package/v2/skills/openxiangda-v2-backend/SKILL.md +0 -28
- package/v2/skills/openxiangda-v2-backend/agents/openai.yaml +0 -4
- package/v2/skills/openxiangda-v2-data-authz/SKILL.md +0 -28
- package/v2/skills/openxiangda-v2-data-authz/agents/openai.yaml +0 -4
- package/v2/skills/openxiangda-v2-delivery/SKILL.md +0 -30
- package/v2/skills/openxiangda-v2-delivery/agents/openai.yaml +0 -4
- package/v2/skills/openxiangda-v2-frontend/SKILL.md +0 -21
- package/v2/skills/openxiangda-v2-frontend/agents/openai.yaml +0 -4
- package/v2/skills/openxiangda-v2-workflow-events/SKILL.md +0 -28
- package/v2/skills/openxiangda-v2-workflow-events/agents/openai.yaml +0 -4
- /package/{v2/skills → skills}/openxiangda-v2/agents/openai.yaml +0 -0
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
# Automation V3 Reference
|
|
2
|
-
|
|
3
|
-
Automations have two files:
|
|
4
|
-
|
|
5
|
-
- `trigger.json`: when the automation runs.
|
|
6
|
-
- `automation.json`: what the automation does.
|
|
7
|
-
|
|
8
|
-
## Trigger Config
|
|
9
|
-
|
|
10
|
-
Automation can run from form events, workflow events, fixed cron schedules, or a form date field reaching a configured time. Pair these triggers with JS_CODE when the action must execute on the backend and cannot be handled reliably by a frontend page.
|
|
11
|
-
|
|
12
|
-
AI-authored automations must use `trigger_v2`. The CLI passes this JSON through unchanged and only fills the root `appType` and `formUuid` when they are missing and can be resolved from the active workspace/profile.
|
|
13
|
-
|
|
14
|
-
Form submit trigger:
|
|
15
|
-
|
|
16
|
-
```json
|
|
17
|
-
{
|
|
18
|
-
"version": "trigger_v2",
|
|
19
|
-
"mode": "event",
|
|
20
|
-
"appType": "APP_XXX",
|
|
21
|
-
"formUuid": "FORM_XXX",
|
|
22
|
-
"enabled": true,
|
|
23
|
-
"event": {
|
|
24
|
-
"source": "form_data",
|
|
25
|
-
"action": "submitted"
|
|
26
|
-
},
|
|
27
|
-
"filters": {
|
|
28
|
-
"conditions": []
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Form update/delete triggers use the same shape with `event.action` set to `updated` or `deleted`. Update events expose `ctx.formData.current`, `ctx.formData.previous`, `ctx.formData.changes`, and `ctx.triggerEvent.data.metadata.changeRecords`.
|
|
34
|
-
|
|
35
|
-
Form field change trigger:
|
|
36
|
-
|
|
37
|
-
```json
|
|
38
|
-
{
|
|
39
|
-
"version": "trigger_v2",
|
|
40
|
-
"mode": "event",
|
|
41
|
-
"appType": "APP_XXX",
|
|
42
|
-
"formUuid": "FORM_XXX",
|
|
43
|
-
"enabled": true,
|
|
44
|
-
"event": {
|
|
45
|
-
"source": "form_field",
|
|
46
|
-
"action": "changed"
|
|
47
|
-
},
|
|
48
|
-
"filters": {
|
|
49
|
-
"fieldChange": {
|
|
50
|
-
"fieldId": "status",
|
|
51
|
-
"changeType": "to_value",
|
|
52
|
-
"toValue": "approved"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
`fieldChange.changeType` can be `any`, `from_to`, `to_value`, or `from_value`.
|
|
59
|
-
|
|
60
|
-
Workflow task trigger:
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"version": "trigger_v2",
|
|
65
|
-
"mode": "event",
|
|
66
|
-
"appType": "APP_XXX",
|
|
67
|
-
"formUuid": "FORM_XXX",
|
|
68
|
-
"enabled": true,
|
|
69
|
-
"event": {
|
|
70
|
-
"source": "workflow_task",
|
|
71
|
-
"action": "approved"
|
|
72
|
-
},
|
|
73
|
-
"filters": {
|
|
74
|
-
"workflow": {
|
|
75
|
-
"processDefinitionId": "workflow-id",
|
|
76
|
-
"nodeId": "approval-node-id",
|
|
77
|
-
"operatorId": "",
|
|
78
|
-
"assigneeId": "",
|
|
79
|
-
"previousAssigneeId": ""
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Workflow task actions are `approved`, `rejected`, `returned`, `transferred`, and `cancelled`. Returned task events include `ctx.workflowData.targetNodeId` and `ctx.workflowData.targetNodeName` when the platform can resolve the target node.
|
|
86
|
-
|
|
87
|
-
Workflow process trigger:
|
|
88
|
-
|
|
89
|
-
```json
|
|
90
|
-
{
|
|
91
|
-
"version": "trigger_v2",
|
|
92
|
-
"mode": "event",
|
|
93
|
-
"appType": "APP_XXX",
|
|
94
|
-
"formUuid": "FORM_XXX",
|
|
95
|
-
"enabled": true,
|
|
96
|
-
"event": {
|
|
97
|
-
"source": "workflow_process",
|
|
98
|
-
"action": "rejected"
|
|
99
|
-
},
|
|
100
|
-
"filters": {
|
|
101
|
-
"workflow": {
|
|
102
|
-
"processDefinitionId": "workflow-id",
|
|
103
|
-
"finalResult": "rejected"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Workflow process actions are `started`, `approved`, `rejected`, `terminated`, and `withdrawn`. Final approval is backed by `workflow_process_completed`; final rejection is backed by `workflow_process_terminated` with `finalResult: "rejected"`; manual termination uses `finalResult: "terminated"`.
|
|
110
|
-
|
|
111
|
-
Fixed-time scheduled trigger:
|
|
112
|
-
|
|
113
|
-
```json
|
|
114
|
-
{
|
|
115
|
-
"version": "trigger_v2",
|
|
116
|
-
"mode": "scheduled",
|
|
117
|
-
"appType": "APP_XXX",
|
|
118
|
-
"enabled": true,
|
|
119
|
-
"schedule": {
|
|
120
|
-
"type": "fixed_time",
|
|
121
|
-
"fixedTime": {
|
|
122
|
-
"startTime": "2026-05-21T09:00:00+08:00",
|
|
123
|
-
"cronExpression": "0 0 9 * * *",
|
|
124
|
-
"maxExecutions": 1
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Form date-field scheduled trigger:
|
|
131
|
-
|
|
132
|
-
```json
|
|
133
|
-
{
|
|
134
|
-
"version": "trigger_v2",
|
|
135
|
-
"mode": "scheduled",
|
|
136
|
-
"appType": "APP_XXX",
|
|
137
|
-
"formUuid": "FORM_XXX",
|
|
138
|
-
"enabled": true,
|
|
139
|
-
"schedule": {
|
|
140
|
-
"type": "form_date_field",
|
|
141
|
-
"formDateField": {
|
|
142
|
-
"fieldId": "dueAt",
|
|
143
|
-
"startOffset": {
|
|
144
|
-
"type": "before",
|
|
145
|
-
"days": 1,
|
|
146
|
-
"time": "09:00:00"
|
|
147
|
-
},
|
|
148
|
-
"endFieldId": "",
|
|
149
|
-
"cronExpression": "0 0 9 * * *",
|
|
150
|
-
"maxExecutions": 1
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Use CLI flags such as `--form-code customer` so the CLI can fill `formUuid` from the current profile. Do not hardcode IDs from another profile.
|
|
157
|
-
|
|
158
|
-
## Definition JSON
|
|
159
|
-
|
|
160
|
-
AI-authored automations should prefer code-first definitions when the logic is mainly backend orchestration and does not need a visual editable canvas.
|
|
161
|
-
|
|
162
|
-
Code automation definition:
|
|
163
|
-
|
|
164
|
-
```json
|
|
165
|
-
{
|
|
166
|
-
"kind": "automation_code_ts",
|
|
167
|
-
"version": "code_v1",
|
|
168
|
-
"runtimeMode": "trusted_node",
|
|
169
|
-
"sourceType": "file_snapshot",
|
|
170
|
-
"scriptCode": "daily_ticket_digest",
|
|
171
|
-
"sourceFile": {
|
|
172
|
-
"localPath": "src/automations/daily_ticket_digest/index.ts"
|
|
173
|
-
},
|
|
174
|
-
"timeoutMs": 30000
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
Author source in `src/automations/<resourceCode>/index.ts`. During validate/create/publish, the CLI runs `pnpm build-js-code --script <resourceCode> --source automations`, uploads `dist/automations/<resourceCode>/index.cjs`, and replaces `sourceFile.localPath` with immutable snapshot metadata.
|
|
179
|
-
|
|
180
|
-
Pair it with a structured preview file:
|
|
181
|
-
|
|
182
|
-
```json
|
|
183
|
-
{
|
|
184
|
-
"kind": "automation_code_preview",
|
|
185
|
-
"version": "preview_v1",
|
|
186
|
-
"steps": [
|
|
187
|
-
{ "id": "load", "type": "data_read", "label": "查询待处理数据" },
|
|
188
|
-
{ "id": "notify", "type": "notification", "label": "发送提醒" }
|
|
189
|
-
],
|
|
190
|
-
"edges": [{ "source": "load", "target": "notify" }]
|
|
191
|
-
}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Resource manifest shape:
|
|
195
|
-
|
|
196
|
-
```json
|
|
197
|
-
{
|
|
198
|
-
"code": "daily_ticket_digest",
|
|
199
|
-
"name": "每日工单摘要",
|
|
200
|
-
"triggerConfig": {
|
|
201
|
-
"version": "trigger_v2",
|
|
202
|
-
"mode": "scheduled",
|
|
203
|
-
"enabled": true,
|
|
204
|
-
"schedule": {
|
|
205
|
-
"type": "fixed_time",
|
|
206
|
-
"fixedTime": {
|
|
207
|
-
"startTime": "2026-05-21T09:00:00+08:00",
|
|
208
|
-
"cronExpression": "0 0 9 * * *"
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
"definitionFile": "definition.code.json",
|
|
213
|
-
"previewFile": "preview.json",
|
|
214
|
-
"publish": true,
|
|
215
|
-
"enable": true
|
|
216
|
-
}
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Minimum shape:
|
|
220
|
-
|
|
221
|
-
```json
|
|
222
|
-
{
|
|
223
|
-
"version": "v3",
|
|
224
|
-
"nodes": [
|
|
225
|
-
{ "id": "start", "type": "start", "data": { "label": "开始" } },
|
|
226
|
-
{ "id": "notify", "type": "work_notification", "data": { "label": "通知" } },
|
|
227
|
-
{ "id": "end", "type": "end", "data": { "label": "结束" } }
|
|
228
|
-
],
|
|
229
|
-
"edges": [
|
|
230
|
-
{ "id": "e1", "source": "start", "target": "notify" },
|
|
231
|
-
{ "id": "e2", "source": "notify", "target": "end" }
|
|
232
|
-
]
|
|
233
|
-
}
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
Supported node types:
|
|
237
|
-
|
|
238
|
-
- `start`
|
|
239
|
-
- `end`
|
|
240
|
-
- `condition`
|
|
241
|
-
- `condition_branch`
|
|
242
|
-
- `branch`
|
|
243
|
-
- `js_code`
|
|
244
|
-
- `data_retrieve_single`
|
|
245
|
-
- `data_retrieve_batch`
|
|
246
|
-
- `data_create`
|
|
247
|
-
- `data_update`
|
|
248
|
-
- `connector_call`
|
|
249
|
-
- `callback_wait`
|
|
250
|
-
- `work_notification`
|
|
251
|
-
- `dingtalk_card`
|
|
252
|
-
|
|
253
|
-
## JS_CODE V2
|
|
254
|
-
|
|
255
|
-
Use trusted Node JS_CODE nodes for AI/admin automation logic that runs after an automation trigger. Typical cases include scheduled data cleanup, date-field reminders, cross-form synchronization after submit/update/delete, workflow-completed follow-up writes, calling internal platform APIs, calling external HTTP services, and other backend-only orchestration.
|
|
256
|
-
|
|
257
|
-
For reusable backend logic that should be shared by pages, multiple automations, and workflows, prefer an App Function under `src/functions/<functionCode>/index.ts` plus `src/resources/functions/<functionCode>.json`. Automation graphs can call it with a `function_call` node:
|
|
258
|
-
|
|
259
|
-
```json
|
|
260
|
-
{
|
|
261
|
-
"id": "call_summary",
|
|
262
|
-
"type": "function_call",
|
|
263
|
-
"data": {
|
|
264
|
-
"functionCode": "reservation_reminder_summary",
|
|
265
|
-
"input": { "scope": "today" },
|
|
266
|
-
"saveResponseTo": "summary"
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
Use JS_CODE V2 when the script is local to one automation graph node.
|
|
272
|
-
|
|
273
|
-
```json
|
|
274
|
-
{
|
|
275
|
-
"id": "sync_customer",
|
|
276
|
-
"type": "js_code",
|
|
277
|
-
"data": {
|
|
278
|
-
"label": "同步客户",
|
|
279
|
-
"runtimeMode": "trusted_node",
|
|
280
|
-
"sourceType": "file_snapshot",
|
|
281
|
-
"scriptCode": "sync_customer",
|
|
282
|
-
"sourceFile": {
|
|
283
|
-
"localPath": "src/js-code-nodes/sync_customer/index.ts"
|
|
284
|
-
},
|
|
285
|
-
"timeout": 30000
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
Author source in `src/js-code-nodes/<scriptCode>/index.ts`. AI-authored source must be TypeScript. Build with `pnpm build-js-code --script <scriptCode>`; the explicit selector typechecks only that entry plus its transitive/shared/ambient dependencies before bundling, while an unscoped build validates the whole workspace. During validate/create, the CLI uploads the generated bundle, replaces `sourceFile.localPath` with `{ bucketName, objectName, sha256, ... }`, and the backend verifies sha256 before execution.
|
|
291
|
-
|
|
292
|
-
The backend runs the snapshot in the trusted Node runtime, applies the node timeout (`30000` ms by default), stores execution logs, and writes the returned value to the node output and `variables.node_<nodeId>`. Scripts may use `export default async function (ctx) {}`, `module.exports = async (ctx) => {}`, `require`, `process`, `Buffer`, arbitrary HTTP, and `platform.api` for `/openxiangda-api/v1`.
|
|
293
|
-
|
|
294
|
-
Runtime context includes `ctx.triggerEvent`, `ctx.formData`, `ctx.workflowData`, `ctx.operator`, `ctx.app`, `ctx.variables`, and `ctx.node`. Prefer the higher-level resource helpers when available: `ctx.resources.resolveForm/resolveDataView/resolveConnector`, `ctx.form.queryOne/queryMany/getById/createOne/updateOne/updateById`, `ctx.files.readAsBase64`, `ctx.dataView.query/stats`, `ctx.connector.call/invoke`, `ctx.notification.*`, `ctx.platform.roles.*`, and `ctx.platform.api.*`. `ctx.files.readAsBase64` reads only server-authorized image attachments from current form data or an explicit form record/field reference, never an arbitrary URL; the file limit is 10 MiB and its Base64 result must not be logged or persisted. Use `ctx.platform.roles.findByCode/addUsers/removeUser` for app role member synchronization; raw `ctx.platform.api.*` returns an HTTP response and platform envelope. Published App Function and trusted-node code may write forms in its current tenant/application; per-resource declarations are mapping and audit metadata, not an application-internal allowlist. This does not grant page users direct submit access, so keep internal forms closed to raw user submission unless the business requires it. Legacy data/process bridge methods remain available as `ctx.methods.queryOneData`, `queryManyData`, `getDataByFormInstanceId`, `updateOneData`, `updateDataByFormInstanceId`, `updateManyData`, `createOneData`, `terminateProcess`, and `getAllParentDepartments`.
|
|
295
|
-
|
|
296
|
-
Code automation also exposes `ctx.logger.debug/info/warn/error(message, data?)`. AI-authored code should log input parsing, query conditions, external calls, writes, branch decisions, and caught errors. Logs are stored as full raw execution data by default. Use CLI diagnosis commands:
|
|
297
|
-
|
|
298
|
-
```bash
|
|
299
|
-
openxiangda automation executions daily_ticket_digest --status failed --profile dev
|
|
300
|
-
openxiangda automation logs <instanceId> --automation daily_ticket_digest --profile dev
|
|
301
|
-
openxiangda automation diagnose daily_ticket_digest --profile dev
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
Notification bridge methods include `ctx.notification.sendByType`, `batchSendByType`, `findConfig`, and `previewTemplate`. For custom business messages, create `src/resources/notifications/` first and use its `notificationType`; do not call legacy `/api/notification-config/*` endpoints directly.
|
|
305
|
-
|
|
306
|
-
Example `src/js-code-nodes/scheduled_reconcile/index.ts`:
|
|
307
|
-
|
|
308
|
-
```ts
|
|
309
|
-
export default async function scheduledReconcile(ctx) {
|
|
310
|
-
const appType = ctx.app.appType;
|
|
311
|
-
const current = ctx.formData?.current || {};
|
|
312
|
-
const formInstanceId =
|
|
313
|
-
ctx.triggerEvent?.data?.formInstanceId ||
|
|
314
|
-
current.formInstanceId ||
|
|
315
|
-
current.formInstId;
|
|
316
|
-
|
|
317
|
-
const pendingRows = await ctx.methods.queryManyData(appType, "FORM_ORDER", {
|
|
318
|
-
status: "pending",
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
if (formInstanceId) {
|
|
322
|
-
await ctx.methods.updateDataByFormInstanceId(
|
|
323
|
-
appType,
|
|
324
|
-
"FORM_ORDER",
|
|
325
|
-
formInstanceId,
|
|
326
|
-
{ last_checked_at: new Date().toISOString() }
|
|
327
|
-
);
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
const log = await ctx.methods.createOneData(appType, "FORM_JOB_LOG", {
|
|
331
|
-
trigger_type: ctx.triggerEvent?.type || "scheduled",
|
|
332
|
-
processed_count: Array.isArray(pendingRows) ? pendingRows.length : 0,
|
|
333
|
-
});
|
|
334
|
-
|
|
335
|
-
return {
|
|
336
|
-
processedCount: pendingRows?.length || 0,
|
|
337
|
-
logId: log?.formInstanceId || log?.id,
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
Validation rules:
|
|
343
|
-
|
|
344
|
-
- `version` must be `v3`.
|
|
345
|
-
- `nodes` and `edges` must be arrays.
|
|
346
|
-
- Exactly one `start` node is required.
|
|
347
|
-
- Each node needs `id`, `type`, and object `data`.
|
|
348
|
-
- Each edge needs `id`, `source`, and `target`.
|
|
349
|
-
- Use `openxiangda automation validate --strict` before publishing.
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
# OpenXiangda Best Practices
|
|
2
|
-
|
|
3
|
-
Use this reference before scaffolding a real app, a complex page, a data
|
|
4
|
-
management view, a portal shell, role governance, notification automation, or a
|
|
5
|
-
business lifecycle flow.
|
|
6
|
-
|
|
7
|
-
The workspace template includes examples under:
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
examples/best-practices/
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
These examples are copied by `openxiangda workspace init`, but they are not
|
|
14
|
-
published by default. Copy only the selected pattern into `src/`, then adapt the
|
|
15
|
-
form codes, field names, permissions, and page route names.
|
|
16
|
-
|
|
17
|
-
## AI Development Flow
|
|
18
|
-
|
|
19
|
-
1. Choose the architecture before writing code:
|
|
20
|
-
- normal form
|
|
21
|
-
- custom form page
|
|
22
|
-
- data management page
|
|
23
|
-
- custom data management page
|
|
24
|
-
- app-shell PC portal
|
|
25
|
-
- app-shell mobile portal
|
|
26
|
-
- pure interactive workbench
|
|
27
|
-
- business status lifecycle
|
|
28
|
-
- real approval workflow
|
|
29
|
-
- automation / JS_CODE
|
|
30
|
-
- access governance / role governance / permissions
|
|
31
|
-
- optional admin UI template:
|
|
32
|
-
`glass-home-dashboard`, `mint-analytics-dashboard`,
|
|
33
|
-
`ops-monitor-dashboard`, or `work-order-list-drawer`
|
|
34
|
-
2. Read the matching files in `examples/best-practices/`.
|
|
35
|
-
3. Copy the smallest useful slice into `src/`.
|
|
36
|
-
4. Keep view code thin; put reusable business logic in `domain/` and platform
|
|
37
|
-
calls in `shared/services/`.
|
|
38
|
-
5. Run `pnpm examples:check` while changing examples, and `pnpm check` after
|
|
39
|
-
copying code into the app source.
|
|
40
|
-
|
|
41
|
-
## State Flow Is Not Workflow
|
|
42
|
-
|
|
43
|
-
Most business processes are status lifecycles, not approval workflows.
|
|
44
|
-
|
|
45
|
-
Use a normal form plus:
|
|
46
|
-
|
|
47
|
-
- a `status` field
|
|
48
|
-
- user-facing responsibility fields such as personnel, department, enum, or
|
|
49
|
-
SDK-backed select fields
|
|
50
|
-
- hidden permission scope keys only for small fixed data-permission conditions;
|
|
51
|
-
for dynamic customer/project/region/store/college/class-like scopes, use
|
|
52
|
-
business authorization forms plus `scope_policy`
|
|
53
|
-
- an action log form
|
|
54
|
-
- a pure state machine in `domain/<feature>/state-machine.ts`
|
|
55
|
-
- a service method that changes status and writes the log in one path
|
|
56
|
-
- optional automation / JS_CODE for timed reminders or backend follow-up
|
|
57
|
-
|
|
58
|
-
Use workflow only when there are real approval tasks:
|
|
59
|
-
|
|
60
|
-
- approver assignment
|
|
61
|
-
- agree / reject / transfer / countersign behavior
|
|
62
|
-
- approval opinions
|
|
63
|
-
- node-level permissions
|
|
64
|
-
- process task records and audit requirements
|
|
65
|
-
- notification or JS_CODE nodes tied to approval nodes
|
|
66
|
-
|
|
67
|
-
Do not model ordinary "pending -> processing -> resolved -> closed" state
|
|
68
|
-
changes as workflow forms.
|
|
69
|
-
|
|
70
|
-
## Layering Rules
|
|
71
|
-
|
|
72
|
-
Use this dependency direction:
|
|
73
|
-
|
|
74
|
-
```text
|
|
75
|
-
pages/forms -> shared -> domain
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
- `domain/<feature>/`: pure TypeScript business types, state machine,
|
|
79
|
-
permission predicates, and query condition builders. No React, Ant Design,
|
|
80
|
-
runtime SDK, CSS, or platform IDs.
|
|
81
|
-
- `shared/services/<feature>.ts`: SDK/API access, paginated queries, status
|
|
82
|
-
updates, log writes, resource calls.
|
|
83
|
-
- `shared/hooks/<feature>/`: loading, refresh, submit pending, error handling,
|
|
84
|
-
optimistic or rollback behavior.
|
|
85
|
-
- `shared/components/`: reusable empty, loading, error, status tag,
|
|
86
|
-
confirmation, timeline, and list action components.
|
|
87
|
-
- `pages/<feature>/components/`: page-local reusable components.
|
|
88
|
-
- `pages/<feature>/styles.css`: page CSS namespace. Do not put all styling in
|
|
89
|
-
TSX.
|
|
90
|
-
- `pages/<feature>/index.tsx`: entry and composition only. Avoid large business
|
|
91
|
-
logic blocks here.
|
|
92
|
-
|
|
93
|
-
PC and mobile pages may have different layout/components, but must reuse the
|
|
94
|
-
same `domain/` and `shared/services/` when the business behavior is the same.
|
|
95
|
-
|
|
96
|
-
## Module Size Rules
|
|
97
|
-
|
|
98
|
-
- Avoid single-file pages. A page file over about 250 lines should be split.
|
|
99
|
-
- Move table columns, filter definitions, route configs, status configs, and
|
|
100
|
-
action visibility rules into separate files.
|
|
101
|
-
- Do not let page components assemble complex API payloads directly. Call a hook
|
|
102
|
-
or service.
|
|
103
|
-
- Keep shared modules independent from specific page folders.
|
|
104
|
-
- Keep domain functions unit-testable without a browser or platform runtime.
|
|
105
|
-
|
|
106
|
-
## Permission And Data Isolation
|
|
107
|
-
|
|
108
|
-
For account, role, RBAC, data-scope, or query-parameter authorization
|
|
109
|
-
requirements, read `permission-design-patterns.md` and choose one mode before
|
|
110
|
-
writing code:
|
|
111
|
-
|
|
112
|
-
- `managed-platform-account`: the app owns platform account/department lifecycle
|
|
113
|
-
and role synchronization.
|
|
114
|
-
- `existing-platform-user-assignment`: the app assigns existing platform users
|
|
115
|
-
to app roles and business scopes.
|
|
116
|
-
- `static-role-permission`: roles and permission groups are fixed resources.
|
|
117
|
-
- `query-param-context`: query parameters are context, filters, or ticket input
|
|
118
|
-
only; sensitive access still needs real authorization.
|
|
119
|
-
|
|
120
|
-
For apps with managed accounts or dynamic roles:
|
|
121
|
-
|
|
122
|
-
1. Create the minimum governance forms required by the chosen mode:
|
|
123
|
-
`organization_unit`, `system_account`, `role_assignment`, or a smaller app
|
|
124
|
-
role maintenance form such as `app-role`.
|
|
125
|
-
2. Use App Functions, automation, or JS_CODE to sync organization units,
|
|
126
|
-
platform accounts, and role records to platform departments/accounts/roles.
|
|
127
|
-
3. Model visible scope fields with maintainable controls:
|
|
128
|
-
- personnel and departments use platform personnel/department fields
|
|
129
|
-
- enum scopes use `SelectField` / `RadioField` with `options`
|
|
130
|
-
- class, college, project, customer, and similar maintained records use
|
|
131
|
-
`SelectField` with `optionSource.type: "linkedForm"` so the runtime queries
|
|
132
|
-
source form records through the SDK and builds dropdown options
|
|
133
|
-
- when the source form can have many records, set `remoteSearch: true`,
|
|
134
|
-
`searchFieldId`, and a reasonable `pageSize` so typing in the dropdown
|
|
135
|
-
triggers remote search
|
|
136
|
-
4. Add hidden derived scope keys only when platform form permission conditions
|
|
137
|
-
require scalar matching in a small fixed app, for example:
|
|
138
|
-
- `collegeScopeKey`
|
|
139
|
-
- `classScopeKey`
|
|
140
|
-
- `ownerDeptScopeKey`
|
|
141
|
-
- `ownerUserScopeKey`
|
|
142
|
-
5. Create page permission groups for entry visibility.
|
|
143
|
-
6. For dynamic business ranges, declare
|
|
144
|
-
`permissions/scope-dimensions`, `permissions/scope-grant-sources`, and
|
|
145
|
-
`permissions/data-scope-policies`, then reference the policy from form
|
|
146
|
-
permission groups or Data View permission groups with
|
|
147
|
-
`dataPermission.type = "scope_policy"`.
|
|
148
|
-
7. Use condition-based data permissions only when the scope values are a small,
|
|
149
|
-
fixed set or map cleanly to platform organization/departments.
|
|
150
|
-
8. For delegated administrators, add role API permissions in
|
|
151
|
-
`src/resources/roles/<code>.json` with `apiPermissionCodes`, for example
|
|
152
|
-
`app:role:manage`, `app:page-permission-group:manage`,
|
|
153
|
-
`app:form-permission-group:manage`, and `app:organization:manage`.
|
|
154
|
-
9. Put sensitive writes behind App Functions with server-side role/scope checks.
|
|
155
|
-
|
|
156
|
-
Frontend button hiding is only user experience. It is not permission control.
|
|
157
|
-
Every sensitive action must still be protected by platform role/form permission
|
|
158
|
-
groups or backend-side JS_CODE checks.
|
|
159
|
-
|
|
160
|
-
Do not generate one role or one permission group per customer, project, region,
|
|
161
|
-
store, college, class, or other maintained business object. That configuration
|
|
162
|
-
will not scale and should be replaced with a form-maintained authorization
|
|
163
|
-
relationship and `scope_policy`.
|
|
164
|
-
|
|
165
|
-
Query parameters are not permission control either. They may prefill context,
|
|
166
|
-
select filters, or carry a signed/expiring ticket, but tampering with a query
|
|
167
|
-
parameter must not expand sensitive data access.
|
|
168
|
-
|
|
169
|
-
## Form Copy And Field Visibility
|
|
170
|
-
|
|
171
|
-
- Every visible form field should have a short, user-facing placeholder.
|
|
172
|
-
- Do not add tips to every field. Tips are only for special constraints,
|
|
173
|
-
unusual formats, compliance notes, or non-obvious business rules.
|
|
174
|
-
- Use select/radio controls for enums. For values maintained by other forms, use
|
|
175
|
-
`SelectField` with SDK-backed `optionSource` options. Do not ask users to type
|
|
176
|
-
raw IDs.
|
|
177
|
-
- Hide permission scope keys, computed, sync, and developer/internal fields with
|
|
178
|
-
`behavior: "HIDDEN"` when they must exist in the schema. Scope keys should be
|
|
179
|
-
derived from visible select/person/department fields, not typed by
|
|
180
|
-
users. For select-derived scalar keys, use `valueSync`.
|
|
181
|
-
- Do not add separate creator, updater, creator department, updater department,
|
|
182
|
-
created time, or updated time fields unless the user explicitly needs a
|
|
183
|
-
separate business field. The platform creates system metadata for every form.
|
|
184
|
-
- All visible copy must be written for end users. Do not put implementation
|
|
185
|
-
notes, schema descriptions, or development explanations in sections, cards,
|
|
186
|
-
labels, tips, helper text, or empty states.
|
|
187
|
-
|
|
188
|
-
## Query Performance
|
|
189
|
-
|
|
190
|
-
- Always use paginated APIs with `currentPage`, `pageSize`, sort, and structured
|
|
191
|
-
conditions.
|
|
192
|
-
- Do not fetch a huge page and filter in the browser.
|
|
193
|
-
- Do not default to `searchKeyWord`. It is broad and expensive.
|
|
194
|
-
- For multi-field fuzzy search, build `filterGroup` with `OR` across explicit
|
|
195
|
-
fields.
|
|
196
|
-
- Put query construction in `domain/<feature>/ticket-query.ts` or the service
|
|
197
|
-
layer, not inside JSX.
|
|
198
|
-
- Keep current table/list data visible during refresh and show local refresh
|
|
199
|
-
state to avoid flicker.
|
|
200
|
-
|
|
201
|
-
## Interaction Rules
|
|
202
|
-
|
|
203
|
-
- Every list/detail page needs loading, empty, error, refresh, and submit-pending
|
|
204
|
-
states.
|
|
205
|
-
- Destructive or state-changing actions need confirmation.
|
|
206
|
-
- Show processing feedback and success/failure feedback.
|
|
207
|
-
- On failure, refresh or rollback the affected row instead of leaving stale UI.
|
|
208
|
-
- For PC CRUD, ticket, approval, and data-management pages, use overlay drawers
|
|
209
|
-
or modals for detail, create, edit, approve/reject, and process forms. Do not
|
|
210
|
-
keep a permanent right-side detail/form column that narrows the table.
|
|
211
|
-
- Keep interaction styles consistent across PC and mobile, but do not force the
|
|
212
|
-
same layout component onto both viewports.
|
|
213
|
-
|
|
214
|
-
## Library Selection
|
|
215
|
-
|
|
216
|
-
- Do not hand-write mature controls or engines. Use platform components first
|
|
217
|
-
for form-entry fields, personnel, departments, files, images, rich text,
|
|
218
|
-
signatures, locations, standard forms, and data lists.
|
|
219
|
-
- Use `antd` / `antd-mobile` as the fallback for non-platform page controls,
|
|
220
|
-
overlays, tables, steps, tabs, and temporary wrappers for missing platform
|
|
221
|
-
capabilities. AI-authored app/workspace code must not emit raw native form
|
|
222
|
-
controls; native inputs belong inside OpenXiangda SDK/platform component
|
|
223
|
-
internals only.
|
|
224
|
-
- Use ECharts for charts and dashboards.
|
|
225
|
-
- Use GSAP for complex timeline/scroll/sequence animations; simple transitions
|
|
226
|
-
can stay in CSS. If an animation-specific skill is available, read it before
|
|
227
|
-
implementing.
|
|
228
|
-
- For drag/drop, virtual lists, calendars, spreadsheet-like input, QR/barcode,
|
|
229
|
-
or export/import, research maintained packages and official docs before
|
|
230
|
-
writing code.
|
|
231
|
-
- New dependencies should have a clear reason and a small adapter layer in the
|
|
232
|
-
app, not copied third-party internals.
|
|
233
|
-
|
|
234
|
-
## Template Catalog
|
|
235
|
-
|
|
236
|
-
- `glass-home-dashboard`: optional default for PC admin home pages, management
|
|
237
|
-
portals, and business overviews. Includes sidebar, top search, welcome
|
|
238
|
-
banner, quick actions, KPI cards, charts, ranking, activity feed, query
|
|
239
|
-
states, and drawer form actions.
|
|
240
|
-
- `mint-analytics-dashboard`: optional default for data-analysis and BI-like
|
|
241
|
-
dashboards. Includes dense metric cards, line/bar/donut charts, notifications,
|
|
242
|
-
todos, business summary, system health, query states, and drawer form actions.
|
|
243
|
-
- `ops-monitor-dashboard`: optional default for realtime operations,
|
|
244
|
-
monitoring, task execution, alerts, system health, and device status. Uses
|
|
245
|
-
lightweight CSS motion by default; do not add GSAP unless a real timeline
|
|
246
|
-
requirement exists.
|
|
247
|
-
- `work-order-list-drawer`: default CRUD/list template for tickets, approvals,
|
|
248
|
-
data-management pages, orders, and assets. Includes filters, toolbar, status
|
|
249
|
-
stats, table, loading/empty/error branches, and right-side overlay drawers for
|
|
250
|
-
detail, create, edit, and process forms.
|
|
251
|
-
- `customer-profile`: standard form schema with validation, members,
|
|
252
|
-
departments, attachments, and child table.
|
|
253
|
-
- `service-ticket-lifecycle`: status lifecycle with ticket form, action-log
|
|
254
|
-
form, state machine, service layer, and operation log.
|
|
255
|
-
- `service-ticket-ops`: custom data management page based on
|
|
256
|
-
`DataManagementList`, split into page, components, hook, query builder, and
|
|
257
|
-
detail drawer.
|
|
258
|
-
- `access-governance`: account/role permission mode decision, organization,
|
|
259
|
-
account, role assignment, sync function, roles, page-group, and form-group
|
|
260
|
-
skeletons.
|
|
261
|
-
- `role-governance`: role maintenance form, role sync JS_CODE, maintainable
|
|
262
|
-
scope fields, hidden permission keys, and permission-group resource examples.
|
|
263
|
-
- `pc-portal-shell`: app-shell PC portal with routes, modules, components, and
|
|
264
|
-
services.
|
|
265
|
-
- `mobile-portal-shell`: app-shell mobile portal with mobile-only components
|
|
266
|
-
reusing the same domain/service layer.
|
|
267
|
-
- `interactive-workbench`: pure interactive page with reducer, modular panels,
|
|
268
|
-
preview, loading/error, and batch operations.
|
|
269
|
-
- `expense-approval-workflow`: real approval workflow example; use only for
|
|
270
|
-
approval scenarios.
|
|
271
|
-
- `daily-ticket-digest`: automation / JS_CODE example for paginated overdue
|
|
272
|
-
query, notification, and log writing.
|