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,66 +0,0 @@
|
|
|
1
|
-
# App Shell Code Page Entries
|
|
2
|
-
|
|
3
|
-
Use this pattern for formal user-facing entries such as admin consoles, PC
|
|
4
|
-
portals, and mobile portals.
|
|
5
|
-
|
|
6
|
-
## Required Page Config
|
|
7
|
-
|
|
8
|
-
`page.config.ts` must declare app-shell entry metadata:
|
|
9
|
-
|
|
10
|
-
```ts
|
|
11
|
-
export default {
|
|
12
|
-
code: "instrument_admin",
|
|
13
|
-
name: "Instrument Admin",
|
|
14
|
-
route: { pathKey: "instrument_admin" },
|
|
15
|
-
entry: {
|
|
16
|
-
mode: "app-shell",
|
|
17
|
-
hidePlatformNav: true,
|
|
18
|
-
defaultRoute: "dashboard",
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Rules:
|
|
24
|
-
|
|
25
|
-
- `entry.mode` is `"app-shell"` for formal product entries.
|
|
26
|
-
- `entry.hidePlatformNav` is `true` unless the page is explicitly a debugging or maintenance page.
|
|
27
|
-
- `entry.defaultRoute` is required and must point at the shell home route.
|
|
28
|
-
- Plain one-off custom pages may omit `entry` or use `mode: "plain-page"`.
|
|
29
|
-
|
|
30
|
-
## Expected File Shape
|
|
31
|
-
|
|
32
|
-
Prefer this layout for app-shell pages:
|
|
33
|
-
|
|
34
|
-
```text
|
|
35
|
-
src/pages/<pageCode>/
|
|
36
|
-
page.config.ts
|
|
37
|
-
index.tsx
|
|
38
|
-
<Feature>Shell.tsx
|
|
39
|
-
routes.ts
|
|
40
|
-
modules/
|
|
41
|
-
__tests__/
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
`routes.ts` should export the route registry, default route, route parser, and
|
|
45
|
-
route builder. Page components should navigate through that helper or
|
|
46
|
-
`openxiangda/runtime` navigation.
|
|
47
|
-
|
|
48
|
-
## Navigation Rules
|
|
49
|
-
|
|
50
|
-
- Use the standard query key `route` for shell routes.
|
|
51
|
-
- Use `navigation.pushRoute(route, query?)` and
|
|
52
|
-
`navigation.replaceRoute(route, query?)` for same-page shell navigation.
|
|
53
|
-
- Do not scatter hardcoded `/view/...&isRenderNav=false` URLs through page code.
|
|
54
|
-
- Menu links should bind the formal app-shell code page only. Native forms,
|
|
55
|
-
workflows, and view pages can stay as development resources or permission
|
|
56
|
-
targets, but should not become the product navigation shell.
|
|
57
|
-
|
|
58
|
-
## Tests
|
|
59
|
-
|
|
60
|
-
Add focused contract tests for:
|
|
61
|
-
|
|
62
|
-
- `page.config.ts` includes `entry.mode: "app-shell"`.
|
|
63
|
-
- default route fallback.
|
|
64
|
-
- unknown route fallback.
|
|
65
|
-
- preserving and deleting business query values.
|
|
66
|
-
- preserving hidden platform nav when the route helper updates the URL.
|
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
# Page Runtime SDK
|
|
2
|
-
|
|
3
|
-
Use `openxiangda/runtime` for platform data access in code pages.
|
|
4
|
-
|
|
5
|
-
Guidelines:
|
|
6
|
-
|
|
7
|
-
- Do not hardcode `/openxiangda-api` calls inside end-user page components unless the page is explicitly an admin tool.
|
|
8
|
-
- Prefer SDK modules for form data, user context, permissions, and platform navigation.
|
|
9
|
-
- Use `sdk.dataView.query` for published read-only multi-form row data views. Use `sdk.dataView.stats` for aggregate data views declared with `viewType: "aggregate"`.
|
|
10
|
-
- Data views can be `storageMode: "materialized"` for refreshed report/list data or `storageMode: "live"` for bounded real-time joins. Page code calls the same SDK methods for both modes and should inspect `response.storageMode` / `response.lastRefreshedAt` when freshness is visible to users.
|
|
11
|
-
- Data view runtime queries can filter, sort, paginate, and select only output aliases.
|
|
12
|
-
- Keep data view page calls paginated and field-scoped. Runtime filters/order should use aliases that the data view indexes, especially for aggregate dimensions and date buckets.
|
|
13
|
-
- Runtime data view filters may use `{ key, operator, value }` or `{ field, operator, value }`. Prefer `key` in new page code to match search-expression style.
|
|
14
|
-
- If a data view exposes a full option-like JSON field, runtime string `EQ` and `IN` filters can match it for compatibility. New pages should prefer scalar output aliases such as `statusValue` or `statusLabel` declared by the data view.
|
|
15
|
-
- Use `sdk.dataSource.run()` with a page data source descriptor when the page config should own the data view code, default fields, or default filters.
|
|
16
|
-
- Use `sdk.function.invoke(code, { input })` for reusable backend business logic declared under `src/resources/functions/` and `src/functions/`. Do not implement multi-form orchestration, connector fan-out, notification orchestration, or permission-sensitive backend rules directly in a page component.
|
|
17
|
-
- Use `sdk.connector.invoke`, `sdk.connector.call("connector.api")`, or `sdk.connector.download` for external services. The SDK calls the platform runtime connector endpoint; it must not call third-party domains directly.
|
|
18
|
-
- Use `sdk.notification.sendByType` and `batchSendByType` for reusable business messages. Custom notification types must be declared in `src/resources/notifications/` and published with `openxiangda resource publish`.
|
|
19
|
-
- Use `sdk.export.create` and `sdk.export.get` for asynchronous XLSX exports. Simple pages may send a declarative workbook definition. Complex or reusable exports should send only a published App Function `definitionCode`, the current query snapshot, export scope, and stable selected row IDs. The server executes `structured_export_provider_v1` with fresh user permissions; never upload executable rendering code from the browser. See `docs/structured-export-v1.md`.
|
|
20
|
-
- Use `AttachmentPreviewList`, `ImagePreviewGrid`, or `useFilePreview` from `openxiangda/runtime/react` for in-page attachment previews in a custom React SPA page. They use the current PageSdk context and enforce the platform capability and ticket contracts. Use `sdk.createFileAccessTicket(bucketName, objectName, fileName, "preview", { appType })` only when the page needs a shareable or new-window preview link. `appType` defaults to the current page context. Open `response.result.previewPageUrl`; do not use `previewUrl` or `/service/file/preview-by-ticket/:ticket` as the page entry.
|
|
21
|
-
- Use `sdk.organization.departments.*` and `sdk.organization.accounts.*` only for intentional organization pages. Read-only list/detail pages need `app:organization:read` or `app:organization:manage`; writes and password operations need `app:organization:manage`. Do not call legacy `/user` or `/department` endpoints from pages.
|
|
22
|
-
- Use `sdk.organization.schoolContact.*` for synchronized guardian/student and teacher/class relationships. `SCHOOL_HEAD_TEACHER` identifies a user who currently heads at least one class; use `teachers.list({ classId, isHeadTeacher: true })` to resolve the exact class. Authenticated non-guest users default to all relationships in the current tenant without an app-role permission binding. Use the optional `self:read` or `class:read` permission only when the product explicitly needs a narrower data scope. The response intentionally includes platform user ID, mobile, DingTalk userid, and name. Read `references/school-contact-relations.md` before building a family or class page.
|
|
23
|
-
- Synchronized school-contact users also receive platform identity codes: `SCHOOL_GUARDIAN`, `SCHOOL_STUDENT`, and `SCHOOL_TEACHER`. Page permission groups select them with `platformRoleCodes` (additive to app `roles`), and runtime permissions expose them in `permissions.platformRoleCodes`. App Functions can use a `platform_roles` invocation audience and trusted `ctx.operator.platformRoleCodes`; these roles are maintained only by the daily organization sync.
|
|
24
|
-
- Use `sdk.workCenter.listItems({ boxType })` and `sdk.workCenter.getStats()` for current-user work center lists and counts. `boxType` is one of `todo`, `done`, `cc`, or `initiated`. This is the end-user task/handled/cc/initiated surface; do not build todo pages by reading workflow operation logs, automation logs, or raw process-task tables.
|
|
25
|
-
- `sdk.form.create` returns identifiers and generated serial number values only. Treat `formInstId` / `formInstanceId` as the required success contract; `serialNumber` / `serialNumbers` are present only when the form has `SerialNumberField`. Do not expect the save response to contain the full row, formula results, or other server-generated field values. Call `sdk.form.getDetail` explicitly after create when those values are needed.
|
|
26
|
-
- Missing `formInstId` / `formInstanceId` is a real error in strict mode. Do not create fake IDs, mock rows, or fallback display data to hide it.
|
|
27
|
-
- `lookupAfterCreate` is legacy compatibility only. New pages should save, read the returned instance ID, then explicitly query detail if needed.
|
|
28
|
-
- Use `createAuthClient` from `openxiangda/runtime` or `LoginPage` / `useAuth` from `openxiangda/runtime/react` for application login pages. Auth provider App Functions return identity assertions only; platform auth owns create/bind/reject/token decisions.
|
|
29
|
-
- Use `PublicAccessGate` from `openxiangda/runtime/react` or `createPublicAccessClient` from `openxiangda/runtime` for React SPA public pages under `/view/:appType/public/*`. Do not append old `?publicAccess=guest` links in new apps.
|
|
30
|
-
- In React SPA apps, wrap route children with `OpenXiangdaPageProvider` inside `OpenXiangdaProvider` before using `usePageSdk()`, `usePageContext()`, `useDataSource()`, or `useFormViewPermissions()`. `OpenXiangdaProvider` alone is not enough and missing the page provider causes `usePageSdkStore 必须在 PageProvider 内使用`.
|
|
31
|
-
- For the current user's department hierarchy, use `sdk.department.getCurrentUserParentDepartments()`; do not hardcode `GET /department/:id/parentDepartments` in page code.
|
|
32
|
-
- Use `sdk.auth.logoutAndRedirect({ loginUrl })` for user logout when the page should return after login. It calls the platform logout endpoint, appends the current page URL as `callback`, and redirects to the login URL. Use `sdk.auth.logout()` only when the page wants to handle redirect itself.
|
|
33
|
-
- Use `sdk.role.getMyRoles()`, `sdk.role.getCurrentRole()`, and `sdk.role.switchAppRole()` for current-user app role switching. Pass `roleId: ""` to switch back to all app roles.
|
|
34
|
-
- Keep API calls behind small local functions so generated UI stays testable.
|
|
35
|
-
- Treat user context and tenant context as runtime-provided values.
|
|
36
|
-
|
|
37
|
-
When the SDK lacks a capability, document the fallback and keep it isolated.
|
|
38
|
-
|
|
39
|
-
Data view query:
|
|
40
|
-
|
|
41
|
-
```ts
|
|
42
|
-
const response = await sdk.dataView.query("ticket_with_customer", {
|
|
43
|
-
fields: ["ticketId", "ticketTitle", "customerName"],
|
|
44
|
-
filters: [
|
|
45
|
-
{ key: "customerName", operator: "contains", value: keyword },
|
|
46
|
-
{ key: "statusValue", operator: "EQ", value: "已发布" },
|
|
47
|
-
],
|
|
48
|
-
order: [{ field: "ticketTitle", isAsc: "y" }],
|
|
49
|
-
currentPage: 1,
|
|
50
|
-
pageSize: 20,
|
|
51
|
-
})
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Data view stats:
|
|
55
|
-
|
|
56
|
-
```ts
|
|
57
|
-
const response = await sdk.dataView.stats("ticket_stats_by_customer", {
|
|
58
|
-
fields: ["customerName", "ticketCount", "totalAmount"],
|
|
59
|
-
filters: [
|
|
60
|
-
{ key: "customerName", operator: "contains", value: keyword },
|
|
61
|
-
],
|
|
62
|
-
having: [
|
|
63
|
-
{ key: "ticketCount", operator: ">", value: 0 },
|
|
64
|
-
],
|
|
65
|
-
order: [{ field: "ticketCount", isAsc: "n" }],
|
|
66
|
-
currentPage: 1,
|
|
67
|
-
pageSize: 20,
|
|
68
|
-
})
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Data view data source descriptor:
|
|
72
|
-
|
|
73
|
-
```ts
|
|
74
|
-
export default {
|
|
75
|
-
dataSources: [
|
|
76
|
-
{
|
|
77
|
-
key: "tickets",
|
|
78
|
-
type: "dataView.query",
|
|
79
|
-
code: "ticket_with_customer",
|
|
80
|
-
fields: ["ticketId", "ticketTitle", "customerName"],
|
|
81
|
-
defaultFilter: [
|
|
82
|
-
{ key: "ticketTitle", operator: "isNotEmpty" }
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
key: "ticketStats",
|
|
87
|
-
type: "dataView.stats",
|
|
88
|
-
code: "ticket_stats_by_customer",
|
|
89
|
-
fields: ["customerName", "ticketCount"],
|
|
90
|
-
defaultHaving: [
|
|
91
|
-
{ key: "ticketCount", operator: ">", value: 0 }
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const response = await sdk.dataSource.run("tickets", {
|
|
98
|
-
filters: [
|
|
99
|
-
{ key: "customerName", operator: "contains", value: keyword }
|
|
100
|
-
],
|
|
101
|
-
pageSize: 20,
|
|
102
|
-
})
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Data view filters, having, and fields use output aliases such as `customerName` or `ticketCount`, not source references such as `customer.name`. For option-like fields, prefer scalar aliases such as `statusValue` in the view definition and page filters. If the page only needs one form, prefer `sdk.form.advancedSearch`. If the page only needs a simple one-form dropdown, prefer linkedForm options.
|
|
106
|
-
|
|
107
|
-
Standalone in-page file preview:
|
|
108
|
-
|
|
109
|
-
```tsx
|
|
110
|
-
import { EyeOutlined } from "@ant-design/icons"
|
|
111
|
-
import { Button } from "antd"
|
|
112
|
-
import {
|
|
113
|
-
AttachmentPreviewList,
|
|
114
|
-
ImagePreviewGrid,
|
|
115
|
-
useFilePreview,
|
|
116
|
-
} from "openxiangda/runtime/react"
|
|
117
|
-
|
|
118
|
-
export function RecordFiles({ record }) {
|
|
119
|
-
const files = record.attachments || []
|
|
120
|
-
const preview = useFilePreview({ items: files })
|
|
121
|
-
const primary = files[0]
|
|
122
|
-
|
|
123
|
-
return (
|
|
124
|
-
<>
|
|
125
|
-
<AttachmentPreviewList items={files} />
|
|
126
|
-
<ImagePreviewGrid items={record.photos || []} />
|
|
127
|
-
{primary && preview.canPreview(primary) ? (
|
|
128
|
-
<Button icon={<EyeOutlined />} onClick={() => void preview.open(primary)}>
|
|
129
|
-
Preview primary file
|
|
130
|
-
</Button>
|
|
131
|
-
) : null}
|
|
132
|
-
{preview.host}
|
|
133
|
-
</>
|
|
134
|
-
)
|
|
135
|
-
}
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
These APIs must render below `OpenXiangdaProvider` and `OpenXiangdaPageProvider`. `useFilePreview` returns `canPreview`, `getCapability`, `open`, `download`, `isOpening`, and `host`. Render `host` once in the component tree. Do not import the internal `FilePreviewContent` or `useFilePreviewController`, create a fake `FormProvider`, or keep a local previewable-extension list.
|
|
139
|
-
|
|
140
|
-
For a real custom edit surface that embeds platform form fields, adapt PageSdk with the public form runtime API instead of hand-writing a request bridge:
|
|
141
|
-
|
|
142
|
-
```tsx
|
|
143
|
-
import { AttachmentField, FormProvider } from "openxiangda"
|
|
144
|
-
import { usePageFormRuntimeApi } from "openxiangda/runtime/react"
|
|
145
|
-
|
|
146
|
-
const api = usePageFormRuntimeApi()
|
|
147
|
-
|
|
148
|
-
<FormProvider
|
|
149
|
-
config={{ api, appType, formUuid: "training_lesson", mode: "edit" }}
|
|
150
|
-
schema={schema}
|
|
151
|
-
initialValues={values}
|
|
152
|
-
>
|
|
153
|
-
<AttachmentField fieldId="materials" label="Materials" />
|
|
154
|
-
</FormProvider>
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
Use `createPageFormRuntimeApi(sdk)` when hooks are unavailable. Both APIs preserve JSON envelopes, route `responseType: "blob"` through `sdk.transport.download`, and normalize ticket content URLs such as `/file/download-by-ticket/*` with the current PageSdk `servicePrefix`. They do not rewrite `/view/*` page URLs or absolute storage URLs. Never forward every form request to `sdk.request`, and never prepend `/service` in application code.
|
|
158
|
-
|
|
159
|
-
Shareable file preview ticket:
|
|
160
|
-
|
|
161
|
-
```ts
|
|
162
|
-
const ticketResponse = await sdk.createFileAccessTicket(
|
|
163
|
-
"lowcode",
|
|
164
|
-
"attachments/contracts/demo.docx",
|
|
165
|
-
"demo.docx",
|
|
166
|
-
"preview",
|
|
167
|
-
{ appType: sdk.context.app.appType },
|
|
168
|
-
)
|
|
169
|
-
|
|
170
|
-
const previewPageUrl = ticketResponse.result?.previewPageUrl
|
|
171
|
-
if (previewPageUrl) {
|
|
172
|
-
window.open(previewPageUrl, "_blank")
|
|
173
|
-
}
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
`previewPageUrl` is the final browser page URL, normally `/view/:appType/file-preview?ticket=...`. `previewUrl` is the file content stream for the preview renderer and should not be used as the user-facing page entry. The request contract calls this fourth argument `purpose`; supported values are `preview`, `download`, and `onlyoffice`.
|
|
177
|
-
|
|
178
|
-
App Function invocation:
|
|
179
|
-
|
|
180
|
-
```ts
|
|
181
|
-
const result = await sdk.function.invoke("reservation_reminder_summary", {
|
|
182
|
-
input: {
|
|
183
|
-
scope: "today",
|
|
184
|
-
keyword,
|
|
185
|
-
},
|
|
186
|
-
})
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
App Function source should prefer `export default async function(ctx, input) {}`.
|
|
190
|
-
The second argument is the `input` passed by `sdk.function.invoke`, and the
|
|
191
|
-
same value is also available as `ctx.input` for compatibility.
|
|
192
|
-
|
|
193
|
-
Use App Functions when the logic must run server-side and be reusable by pages, automations, or workflows. Runtime invocation requires app automation management permission by default. To let ordinary app users call a function from a page, declare `definitionJson.runtimeInvoke.audience` with `authenticated`, `page_permission_group`, `app_roles`, `platform_roles`, or `scope_policy`; use `roleCodes` only for current app-role grants and `platformRoleCodes` for synchronized identities. Do not use `"*"` or `"all-app-roles"` as role codes. Inside the function, authorize sensitive actions with trusted runtime context such as `ctx.operator.roleCodes`, `ctx.operator.platformRoleCodes`, `ctx.operator.currentRoleCode`, `ctx.operator.hasFullAccess`, `ctx.currentUser`, or `ctx.permissions`; do not trust role codes sent in the page input. Published trusted code may write any form in its current tenant/application; per-function `resources.forms` is optional mapping and audit metadata, not an authorization allowlist. Do not open direct submit permission on internal forms just for that page action.
|
|
194
|
-
|
|
195
|
-
Server-defined export:
|
|
196
|
-
|
|
197
|
-
```ts
|
|
198
|
-
const response = await sdk.export.create({
|
|
199
|
-
exportKey: "orders",
|
|
200
|
-
definitionCode: "order_export_provider",
|
|
201
|
-
definitionInput: { variant: "finance" },
|
|
202
|
-
query: {
|
|
203
|
-
filters,
|
|
204
|
-
sorts: [{ field: "createTime", direction: "descend" }],
|
|
205
|
-
},
|
|
206
|
-
scope: selectedIds.length ? "selected" : "all",
|
|
207
|
-
rowIds: selectedIds,
|
|
208
|
-
})
|
|
209
|
-
|
|
210
|
-
const task = response.result
|
|
211
|
-
const latest = task ? await sdk.export.get(task.id) : null
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
`definitionCode` must identify a published, permission-scoped App Function
|
|
215
|
-
implementing `structured_export_provider_v1`. Its `describe` phase owns the
|
|
216
|
-
workbook and column definition; its paged `query` phase owns trusted data
|
|
217
|
-
selection and custom computed fields. The platform owns the queue, permission
|
|
218
|
-
revalidation, XLSX generation, formula hardening, storage, and download ticket.
|
|
219
|
-
|
|
220
|
-
Organization management:
|
|
221
|
-
|
|
222
|
-
```ts
|
|
223
|
-
const capabilities = await sdk.organization.capabilities()
|
|
224
|
-
if (!capabilities.result?.canManage) {
|
|
225
|
-
throw new Error("当前用户缺少组织账号管理权限")
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
await sdk.organization.departments.create({
|
|
229
|
-
name: "销售部",
|
|
230
|
-
parentId: rootDepartmentId,
|
|
231
|
-
})
|
|
232
|
-
|
|
233
|
-
const accounts = await sdk.organization.accounts.list({
|
|
234
|
-
keyword,
|
|
235
|
-
departmentIds: [rootDepartmentId],
|
|
236
|
-
page: 1,
|
|
237
|
-
pageSize: 20,
|
|
238
|
-
})
|
|
239
|
-
|
|
240
|
-
await sdk.organization.accounts.create({
|
|
241
|
-
username: "alice",
|
|
242
|
-
password: initialPassword,
|
|
243
|
-
name: "Alice",
|
|
244
|
-
jobNumber: "E001",
|
|
245
|
-
departmentIds: [rootDepartmentId],
|
|
246
|
-
affiliatedDepartmentId: rootDepartmentId,
|
|
247
|
-
})
|
|
248
|
-
|
|
249
|
-
await sdk.organization.accounts.resetPassword("alice", {
|
|
250
|
-
newPassword,
|
|
251
|
-
})
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
Use `ctx.organization.departments.*` and `ctx.organization.accounts.*` inside App Functions or trusted JS nodes for the same capability. Runtime service principals must resolve a real operator/audit actor; permission is checked against that user, not against the runtime service account. Keep password changes on dedicated endpoints: update account metadata with `update`, reset another user's password with `resetPassword`, and change the current user's password with `changeMyPassword({ oldPassword, newPassword })`.
|
|
255
|
-
|
|
256
|
-
For synchronized school-contact relationships, use `sdk.organization.schoolContact.relations.list`, `teachers.list`, `children.list`, `guardians.list`, or `myFamily.get`; App Functions use the same paths under `ctx.organization.schoolContact`. Do not infer a family relationship from class membership, infer a specific head-teacher class from the global role, or persist a second relationship master inside application forms. See `references/school-contact-relations.md` for permission codes, filters, response fields, and examples.
|
|
257
|
-
|
|
258
|
-
Work center:
|
|
259
|
-
|
|
260
|
-
```ts
|
|
261
|
-
const todoList = await sdk.workCenter.listItems({
|
|
262
|
-
boxType: "todo",
|
|
263
|
-
page: 1,
|
|
264
|
-
limit: 20,
|
|
265
|
-
keyword,
|
|
266
|
-
appType,
|
|
267
|
-
})
|
|
268
|
-
|
|
269
|
-
const stats = await sdk.workCenter.getStats({ appType })
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
Use `actionUrl` from a work-center item when present; otherwise link workflow items with both `formUuid` and `formInstanceId` to the app's process detail route. Keep lists paginated and role-scoped by the platform current user.
|
|
273
|
-
|
|
274
|
-
Application auth:
|
|
275
|
-
|
|
276
|
-
```tsx
|
|
277
|
-
import { LoginPage, useAuth, useLoginMethods } from "openxiangda/runtime/react";
|
|
278
|
-
|
|
279
|
-
export function DefaultLogin() {
|
|
280
|
-
return <LoginPage dingtalkFlow="auto" />;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export function CustomPhoneLogin() {
|
|
284
|
-
const auth = useAuth();
|
|
285
|
-
const methods = useLoginMethods();
|
|
286
|
-
|
|
287
|
-
async function submit(phone: string, code: string, challengeId: string) {
|
|
288
|
-
await auth.phoneCodeLogin({ phone, code, challengeId });
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
return null;
|
|
292
|
-
}
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
Standalone client:
|
|
296
|
-
|
|
297
|
-
```ts
|
|
298
|
-
import { createAuthClient } from "openxiangda/runtime";
|
|
299
|
-
|
|
300
|
-
const auth = createAuthClient({ appType, servicePrefix: "/service" });
|
|
301
|
-
const methods = await auth.getMethods();
|
|
302
|
-
|
|
303
|
-
async function startDingTalkLogin() {
|
|
304
|
-
const { loginUrl } = await auth.getDingTalkOAuthUrl({
|
|
305
|
-
returnUrl: `/view/${encodeURIComponent(appType)}/admin`,
|
|
306
|
-
});
|
|
307
|
-
window.location.assign(loginUrl);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
const sent = await auth.sendPhoneCode({ phone, purpose: "login" });
|
|
311
|
-
const result = await auth.phoneCodeLogin({
|
|
312
|
-
phone,
|
|
313
|
-
code,
|
|
314
|
-
challengeId: sent.challengeId,
|
|
315
|
-
});
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
`dingtalkFlow="auto"` is the default. It uses DingTalk JSAPI only when both the container and `requestAuthCode` are available; otherwise it starts browser OAuth. Explicit `dingtalkFlow="jsapi"` or `"oauth"` overrides the auth method's `flow` setting. Browser OAuth is a full-page redirect whose callback is handled by the platform, so custom pages should pass an app-local `/view/:appType/*` return URL and must not implement their own callback or OAuth `state`. `LoginPage` normalizes a same-origin absolute guard callback to that relative form and rejects cross-origin or other-app callbacks before making the OAuth start request.
|
|
319
|
-
|
|
320
|
-
For phone-code auth, the App Function provider receives `event`, `appType`, `method`, `credential`, `requestId`, `request`, and `challenge`. It may return `{ ok, providerState }` for send and `{ ok, identity }` for verify. It must not return `token`, `accessToken`, `refreshToken`, cookies, or mutate platform account tables.
|
|
321
|
-
|
|
322
|
-
Public access route:
|
|
323
|
-
|
|
324
|
-
```tsx
|
|
325
|
-
import {
|
|
326
|
-
OpenXiangdaPageProvider,
|
|
327
|
-
OpenXiangdaProvider,
|
|
328
|
-
PublicAccessGate,
|
|
329
|
-
} from "openxiangda/runtime/react";
|
|
330
|
-
|
|
331
|
-
const PublicLoading = () => <div role="status">正在进入公开页面</div>;
|
|
332
|
-
const PublicAccessError = ({ error }: { error: { message?: string } }) => (
|
|
333
|
-
<div role="alert">{error.message || "公开链接不可用或已过期"}</div>
|
|
334
|
-
);
|
|
335
|
-
|
|
336
|
-
export function PublicRegisterRoute() {
|
|
337
|
-
return (
|
|
338
|
-
<OpenXiangdaProvider appType={appType} servicePrefix="/service">
|
|
339
|
-
<OpenXiangdaPageProvider>
|
|
340
|
-
<PublicAccessGate
|
|
341
|
-
errorFallback={error => <PublicAccessError error={error} />}
|
|
342
|
-
fallback={<PublicLoading />}
|
|
343
|
-
policyCode="public_register"
|
|
344
|
-
routeCode="public.register"
|
|
345
|
-
>
|
|
346
|
-
<PublicRegisterPage />
|
|
347
|
-
</PublicAccessGate>
|
|
348
|
-
</OpenXiangdaPageProvider>
|
|
349
|
-
</OpenXiangdaProvider>
|
|
350
|
-
);
|
|
351
|
-
}
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
Standalone public session client:
|
|
355
|
-
|
|
356
|
-
```ts
|
|
357
|
-
import { createPublicAccessClient } from "openxiangda/runtime";
|
|
358
|
-
|
|
359
|
-
const publicAccess = createPublicAccessClient({ appType, servicePrefix: "/service" });
|
|
360
|
-
|
|
361
|
-
await publicAccess.startSession({
|
|
362
|
-
policyCode: "public_register",
|
|
363
|
-
routeCode: "public.register",
|
|
364
|
-
path: window.location.pathname,
|
|
365
|
-
ticket: new URLSearchParams(window.location.search).get("ticket") || undefined,
|
|
366
|
-
});
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
`PublicAccessGate` stores the returned bearer token in the runtime provider and injects it into follow-up SDK requests. It does not replace `OpenXiangdaPageProvider`. Always provide `fallback` and `errorFallback` so slow networks, missing tickets, or expired tickets do not render a blank public page. If you call `createPublicAccessClient` directly outside the provider, pass the returned `accessToken` as `Authorization: Bearer <token>` for follow-up APIs. The matching resources must exist under `src/resources/routes/` and `src/resources/public-access/`. Public guest access to forms, data views, functions, and connectors is denied unless the policy `grants` explicitly names that resource.
|
|
370
|
-
|
|
371
|
-
When testing public pages or writing direct fetch wrappers, check the JSON envelope, not only `response.ok`. Platform runtime APIs can return HTTP 200 with `code: "PUBLIC_GRANT_DENIED"`; this is a failed request. Treat only `code === 200`, `code === "200"`, or compatible success code `0` as success, and fail on `success: false`.
|
|
372
|
-
|
|
373
|
-
Logout and current-user role switching:
|
|
374
|
-
|
|
375
|
-
```ts
|
|
376
|
-
await sdk.auth.logoutAndRedirect({
|
|
377
|
-
loginUrl: "/login",
|
|
378
|
-
})
|
|
379
|
-
|
|
380
|
-
await sdk.auth.logoutAndRedirect({
|
|
381
|
-
loginUrl: "/login",
|
|
382
|
-
callbackParamName: "redirect",
|
|
383
|
-
})
|
|
384
|
-
|
|
385
|
-
await sdk.auth.logout()
|
|
386
|
-
|
|
387
|
-
const roles = await sdk.role.getMyRoles({ scope: "app" })
|
|
388
|
-
const currentRole = await sdk.role.getCurrentRole({ scope: "app" })
|
|
389
|
-
|
|
390
|
-
await sdk.role.switchAppRole({
|
|
391
|
-
roleId: roles.result?.[0]?.id || "",
|
|
392
|
-
})
|
|
393
|
-
|
|
394
|
-
await sdk.role.switchAppRole({
|
|
395
|
-
roleId: "",
|
|
396
|
-
})
|
|
397
|
-
|
|
398
|
-
await sdk.role.switchPlatformRole({
|
|
399
|
-
roleId: "platform-admin",
|
|
400
|
-
})
|
|
401
|
-
```
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# Code Page Publish Flow
|
|
2
|
-
|
|
3
|
-
Preferred React SPA release entry:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
openxiangda workspace plan --change <change> --changed --profile <name>
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Do not run `lowcode-workspace publish-all`, `pnpm publish:all`, or legacy
|
|
10
|
-
project scripts such as `scripts/openxiangda-publish.mjs` directly for live
|
|
11
|
-
publishing. Those commands are workspace internals. They may skip OpenXiangda's
|
|
12
|
-
normal-user token/profile injection and fall back to old `APP_KEY` /
|
|
13
|
-
`APP_SECRET` behavior, or publish with a buildId that the platform menu does not
|
|
14
|
-
activate. Use the staged Form/Backend/Runtime commands emitted by the workspace
|
|
15
|
-
plan, then one Root App finalize.
|
|
16
|
-
|
|
17
|
-
For day-to-day AI edits, prefer a targeted publish:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# First ask OpenXiangda for the release plan and reliability checks.
|
|
21
|
-
openxiangda workspace plan --changed --json
|
|
22
|
-
openxiangda workspace check --changed
|
|
23
|
-
|
|
24
|
-
# Preview what git-touched forms/pages would publish.
|
|
25
|
-
openxiangda workspace publish --profile <name> --changed --dry-run
|
|
26
|
-
|
|
27
|
-
# Stage one exact Form bundle; React page changes are staged in Runtime.
|
|
28
|
-
openxiangda resource publish form-setting --only customer --change <change> --profile <name>
|
|
29
|
-
openxiangda runtime deploy --no-activate --change <change> --profile <name>
|
|
30
|
-
|
|
31
|
-
# Atomically activate every staged child and the App head.
|
|
32
|
-
openxiangda release app-finalize --staged-resources-json .openxiangda/releases/<change>/staged-resources.json --change <change> --profile <name>
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Do not use full workspace publish as a reflex. Full publish is only appropriate
|
|
36
|
-
when many modules were intentionally changed, shared/config changes affect many
|
|
37
|
-
pages, or the incremental cache needs a repair pass. For a single page edit,
|
|
38
|
-
publish that page.
|
|
39
|
-
|
|
40
|
-
Targeted publish skips `src/resources` by default. Add `--resources` if resource
|
|
41
|
-
manifests changed too, or run `openxiangda resource plan|publish` separately.
|
|
42
|
-
Use `--skip-resources` when you explicitly want forms/pages only.
|
|
43
|
-
|
|
44
|
-
React SPA workspaces use a fixed staged release order:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
openxiangda workspace plan --change <change> --changed --profile <name> --json
|
|
48
|
-
openxiangda resource publish form-setting --only <formCode> --change <change> --profile <name>
|
|
49
|
-
openxiangda resource publish function,automation --only function:<code>,automation:<code> --stage-only --change <change> --profile <name>
|
|
50
|
-
openxiangda runtime deploy --no-activate --change <change> --profile <name>
|
|
51
|
-
openxiangda release app-finalize --staged-resources-json .openxiangda/releases/<change>/staged-resources.json --change <change> --profile <name>
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
If `workspace check --changed` reports risky AI fallback code, missing schema,
|
|
55
|
-
or direct platform API calls, fix those issues before publishing.
|
|
56
|
-
|
|
57
|
-
The CLI injects:
|
|
58
|
-
|
|
59
|
-
- `OPENXIANGDA_PROFILE`
|
|
60
|
-
- `OPENXIANGDA_BASE_URL`
|
|
61
|
-
- `OPENXIANGDA_ACCESS_TOKEN`
|
|
62
|
-
- `OPENXIANGDA_APP_TYPE`
|
|
63
|
-
|
|
64
|
-
Workspace tools then:
|
|
65
|
-
|
|
66
|
-
1. Scan `src/forms/*/schema.ts` and `page.tsx` for normal and workflow form pages.
|
|
67
|
-
2. Scan `src/pages/*/page.config.ts` and React entries for custom code pages.
|
|
68
|
-
3. Create or bind platform form shells only as needed.
|
|
69
|
-
4. Build shared form/page runtimes and per-form/per-page bundles.
|
|
70
|
-
5. Upload assets to OSS.
|
|
71
|
-
6. Sync form metadata and register form/page bundles through `/openxiangda-api/v1`.
|
|
72
|
-
|
|
73
|
-
Direct code page publish:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
openxiangda page publish <pageCode> \
|
|
77
|
-
--entry-url <url> \
|
|
78
|
-
--css-urls <url1,url2> \
|
|
79
|
-
--version <version> \
|
|
80
|
-
--build-id <buildId> \
|
|
81
|
-
--profile <name>
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Use direct publish only for already built assets or targeted repair. It is not the normal AI generation flow.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# App Workspace Structure
|
|
2
|
-
|
|
3
|
-
Form pages, workflow form pages, and custom code pages live in `sy-lowcode-app-workspace`.
|
|
4
|
-
|
|
5
|
-
Create a new workspace with:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
openxiangda workspace init ./my-app-workspace --profile <name> --app-name "应用名称"
|
|
9
|
-
cd ./my-app-workspace
|
|
10
|
-
pnpm install
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Local workspace state is authoritative. If the current folder has no app binding, create a new app; do not search the platform for similar app names.
|
|
14
|
-
|
|
15
|
-
Bind an existing app only when the user explicitly provides `appType` or asks to reuse that app:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
openxiangda workspace init ./my-app-workspace --profile <name> --app-type APP_XXXX
|
|
19
|
-
openxiangda workspace bind --profile <name> --app-type APP_XXXX
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Typical code page layout:
|
|
23
|
-
|
|
24
|
-
```text
|
|
25
|
-
src/pages/<pageCode>/
|
|
26
|
-
├── page.tsx
|
|
27
|
-
├── index.tsx
|
|
28
|
-
├── styles.css
|
|
29
|
-
└── assets/
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Rules:
|
|
33
|
-
|
|
34
|
-
- `pageCode` is the stable local key.
|
|
35
|
-
- Form pages use `src/forms/<formCode>/schema.ts` plus `src/forms/<formCode>/page.tsx`.
|
|
36
|
-
- Workflow form pages use the same form page structure; workflow v3 definitions are separate platform resources.
|
|
37
|
-
- Keep page-specific assets under the page directory.
|
|
38
|
-
- Shared components can live under `src/components/` when reused.
|
|
39
|
-
- Build artifacts under `dist/` are generated and should not be hand edited.
|
|
40
|
-
- Publish through `openxiangda workspace publish --profile <name>`.
|
|
41
|
-
- Visible page copy must be written for end users. Do not show implementation notes, schema explanations, or developer-only guidance inside page sections, cards, alerts, tooltips, or empty states.
|