@nocobase/plugin-flow-engine 2.1.0-alpha.24 → 2.1.0-alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/externalVersion.js +10 -10
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/apply/compiler.js +4 -2
- package/dist/server/flow-surfaces/association-interfaces.d.ts +10 -0
- package/dist/server/flow-surfaces/association-interfaces.js +39 -0
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +50 -5
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +9 -1
- package/dist/server/flow-surfaces/builder.d.ts +27 -1
- package/dist/server/flow-surfaces/builder.js +36 -4
- package/dist/server/flow-surfaces/catalog.d.ts +1 -0
- package/dist/server/flow-surfaces/catalog.js +129 -13
- package/dist/server/flow-surfaces/compose-compiler.d.ts +8 -0
- package/dist/server/flow-surfaces/compose-compiler.js +8 -0
- package/dist/server/flow-surfaces/configure-options.js +39 -6
- package/dist/server/flow-surfaces/default-action-popup.js +2 -2
- package/dist/server/flow-surfaces/field-binding-registry.d.ts +1 -0
- package/dist/server/flow-surfaces/field-binding-registry.js +5 -0
- package/dist/server/flow-surfaces/field-semantics.d.ts +1 -1
- package/dist/server/flow-surfaces/field-semantics.js +4 -3
- package/dist/server/flow-surfaces/field-type-resolver.d.ts +46 -0
- package/dist/server/flow-surfaces/field-type-resolver.js +322 -0
- package/dist/server/flow-surfaces/node-use-sets.js +1 -0
- package/dist/server/flow-surfaces/service-utils.d.ts +13 -1
- package/dist/server/flow-surfaces/service-utils.js +58 -6
- package/dist/server/flow-surfaces/service.d.ts +17 -1
- package/dist/server/flow-surfaces/service.js +820 -53
- package/dist/server/flow-surfaces/support-matrix.js +11 -0
- package/dist/swagger/flow-surfaces.d.ts +173 -2
- package/dist/swagger/flow-surfaces.examples.d.ts +20 -15
- package/dist/swagger/flow-surfaces.examples.js +22 -11
- package/dist/swagger/flow-surfaces.js +72 -10
- package/dist/swagger/index.d.ts +173 -2
- package/package.json +2 -2
package/dist/externalVersion.js
CHANGED
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.1.0-alpha.25",
|
|
12
12
|
"lodash": "4.18.1",
|
|
13
|
-
"@nocobase/database": "2.1.0-alpha.
|
|
14
|
-
"@nocobase/data-source-manager": "2.1.0-alpha.
|
|
15
|
-
"@nocobase/resourcer": "2.1.0-alpha.
|
|
16
|
-
"@nocobase/utils": "2.1.0-alpha.
|
|
17
|
-
"@nocobase/cache": "2.1.0-alpha.
|
|
18
|
-
"@nocobase/plugin-localization": "2.1.0-alpha.
|
|
19
|
-
"@nocobase/server": "2.1.0-alpha.
|
|
20
|
-
"@nocobase/actions": "2.1.0-alpha.
|
|
13
|
+
"@nocobase/database": "2.1.0-alpha.25",
|
|
14
|
+
"@nocobase/data-source-manager": "2.1.0-alpha.25",
|
|
15
|
+
"@nocobase/resourcer": "2.1.0-alpha.25",
|
|
16
|
+
"@nocobase/utils": "2.1.0-alpha.25",
|
|
17
|
+
"@nocobase/cache": "2.1.0-alpha.25",
|
|
18
|
+
"@nocobase/plugin-localization": "2.1.0-alpha.25",
|
|
19
|
+
"@nocobase/server": "2.1.0-alpha.25",
|
|
20
|
+
"@nocobase/actions": "2.1.0-alpha.25",
|
|
21
21
|
"@formily/json-schema": "2.3.7",
|
|
22
|
-
"@nocobase/ai": "2.1.0-alpha.
|
|
22
|
+
"@nocobase/ai": "2.1.0-alpha.25"
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-04-
|
|
1
|
+
{"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-04-27T22:04:16.306Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-04-
|
|
1
|
+
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-04-27T22:04:17.394Z"}
|
|
@@ -44,6 +44,7 @@ var import_catalog = require("../catalog");
|
|
|
44
44
|
var import_placement = require("../placement");
|
|
45
45
|
var import_errors = require("../errors");
|
|
46
46
|
var import_node_use_sets = require("../node-use-sets");
|
|
47
|
+
var import_field_type_resolver = require("../field-type-resolver");
|
|
47
48
|
var import_layout = require("./layout");
|
|
48
49
|
var import_matching = require("./matching");
|
|
49
50
|
function makeOpRef(path) {
|
|
@@ -580,7 +581,7 @@ function createActionNode(ops, state, parentRef, desiredNode, currentParent) {
|
|
|
580
581
|
return ref;
|
|
581
582
|
}
|
|
582
583
|
function createFieldNode(ops, state, parentRef, desiredNode) {
|
|
583
|
-
var _a;
|
|
584
|
+
var _a, _b, _c;
|
|
584
585
|
const popup = normalizeApplyPopup(desiredNode, `flowSurfaces apply field '${desiredNode.use}'`);
|
|
585
586
|
const standaloneType = desiredNode.use === "JSColumnModel" ? "jsColumn" : desiredNode.use === "JSItemModel" ? "jsItem" : desiredNode.use === "DividerItemModel" ? "divider" : void 0;
|
|
586
587
|
if (standaloneType) {
|
|
@@ -620,6 +621,7 @@ function createFieldNode(ops, state, parentRef, desiredNode) {
|
|
|
620
621
|
});
|
|
621
622
|
const fieldInit = import_lodash.default.get(innerField, ["stepParams", "fieldSettings", "init"]) || import_lodash.default.get(desiredNode, ["stepParams", "fieldSettings", "init"]);
|
|
622
623
|
const defaultTargetUid = import_lodash.default.get(desiredNode, ["stepParams", "filterFormItemSettings", "init", "defaultTargetUid"]);
|
|
624
|
+
const fieldType = (0, import_field_type_resolver.getPublicFieldTypeForUse)(((_c = (_b = innerField == null ? void 0 : innerField.stepParams) == null ? void 0 : _b.fieldBinding) == null ? void 0 : _c.use) || (innerField == null ? void 0 : innerField.use));
|
|
623
625
|
if (!(fieldInit == null ? void 0 : fieldInit.fieldPath)) {
|
|
624
626
|
throw new import_errors.FlowSurfaceBadRequestError(
|
|
625
627
|
`flowSurfaces apply field '${desiredNode.use}' requires stepParams.fieldSettings.init.fieldPath`
|
|
@@ -639,7 +641,7 @@ function createFieldNode(ops, state, parentRef, desiredNode) {
|
|
|
639
641
|
dataSourceKey: fieldInit.dataSourceKey,
|
|
640
642
|
collectionName: fieldInit.collectionName,
|
|
641
643
|
...requestedRenderer ? { renderer: requestedRenderer } : {},
|
|
642
|
-
...
|
|
644
|
+
...fieldType ? { fieldType } : {},
|
|
643
645
|
...defaultTargetUid ? { defaultTargetUid } : {},
|
|
644
646
|
...popup ? { popup } : {}
|
|
645
647
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SINGLE_VALUE_ASSOCIATION_INTERFACES: Set<string>;
|
|
10
|
+
export declare const MULTI_VALUE_ASSOCIATION_INTERFACES: Set<string>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var association_interfaces_exports = {};
|
|
28
|
+
__export(association_interfaces_exports, {
|
|
29
|
+
MULTI_VALUE_ASSOCIATION_INTERFACES: () => MULTI_VALUE_ASSOCIATION_INTERFACES,
|
|
30
|
+
SINGLE_VALUE_ASSOCIATION_INTERFACES: () => SINGLE_VALUE_ASSOCIATION_INTERFACES
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(association_interfaces_exports);
|
|
33
|
+
const SINGLE_VALUE_ASSOCIATION_INTERFACES = /* @__PURE__ */ new Set(["m2o", "o2o", "oho", "obo", "updatedBy", "createdBy"]);
|
|
34
|
+
const MULTI_VALUE_ASSOCIATION_INTERFACES = /* @__PURE__ */ new Set(["m2m", "o2m", "mbm"]);
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
MULTI_VALUE_ASSOCIATION_INTERFACES,
|
|
38
|
+
SINGLE_VALUE_ASSOCIATION_INTERFACES
|
|
39
|
+
});
|
|
@@ -47,6 +47,7 @@ var import_default_block_actions = require("../default-block-actions");
|
|
|
47
47
|
var import_public_data_surface_default_filter = require("../public-data-surface-default-filter");
|
|
48
48
|
var import_defaults = require("./defaults");
|
|
49
49
|
var import_private_utils = require("./private-utils");
|
|
50
|
+
var import_field_type_resolver = require("../field-type-resolver");
|
|
50
51
|
const APPLY_BLUEPRINT_BLOCK_TYPE_ENUM = [
|
|
51
52
|
"table",
|
|
52
53
|
"calendar",
|
|
@@ -61,7 +62,8 @@ const APPLY_BLUEPRINT_BLOCK_TYPE_ENUM = [
|
|
|
61
62
|
"iframe",
|
|
62
63
|
"chart",
|
|
63
64
|
"actionPanel",
|
|
64
|
-
"jsBlock"
|
|
65
|
+
"jsBlock",
|
|
66
|
+
"tree"
|
|
65
67
|
];
|
|
66
68
|
const APPLY_BLUEPRINT_BLOCK_ALLOWED_KEYS = [
|
|
67
69
|
"key",
|
|
@@ -90,6 +92,14 @@ const APPLY_BLUEPRINT_FIELD_ALLOWED_KEYS = [
|
|
|
90
92
|
"associationPathName",
|
|
91
93
|
"renderer",
|
|
92
94
|
"type",
|
|
95
|
+
"fieldType",
|
|
96
|
+
"fields",
|
|
97
|
+
"selectorFields",
|
|
98
|
+
"titleField",
|
|
99
|
+
"openMode",
|
|
100
|
+
"popupSize",
|
|
101
|
+
"pageSize",
|
|
102
|
+
"showIndex",
|
|
93
103
|
"label",
|
|
94
104
|
"target",
|
|
95
105
|
"settings",
|
|
@@ -196,6 +206,23 @@ function assertApplyBlueprintKanbanMainContent(block, context) {
|
|
|
196
206
|
(0, import_errors.throwBadRequest)(`${context}.recordActions is not supported on kanban main blocks in v1`);
|
|
197
207
|
}
|
|
198
208
|
}
|
|
209
|
+
function assertApplyBlueprintTreeMainContent(block, context) {
|
|
210
|
+
if ((0, import_private_utils.readOptionalString)(block.type) !== "tree") {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
if (Object.prototype.hasOwnProperty.call(block, "fields")) {
|
|
214
|
+
(0, import_errors.throwBadRequest)(`${context}.fields is not supported on tree blocks`);
|
|
215
|
+
}
|
|
216
|
+
if (Object.prototype.hasOwnProperty.call(block, "fieldGroups")) {
|
|
217
|
+
(0, import_errors.throwBadRequest)(`${context}.fieldGroups is not supported on tree blocks`);
|
|
218
|
+
}
|
|
219
|
+
if (Object.prototype.hasOwnProperty.call(block, "actions")) {
|
|
220
|
+
(0, import_errors.throwBadRequest)(`${context}.actions is not supported on tree blocks`);
|
|
221
|
+
}
|
|
222
|
+
if (Object.prototype.hasOwnProperty.call(block, "recordActions")) {
|
|
223
|
+
(0, import_errors.throwBadRequest)(`${context}.recordActions is not supported on tree blocks`);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
199
226
|
function assertApplyBlueprintBlockType(type, context) {
|
|
200
227
|
if (!type) {
|
|
201
228
|
return;
|
|
@@ -787,8 +814,16 @@ function compileField(input, index, scopePrefix, assets, localBlockKeys, context
|
|
|
787
814
|
(0, import_errors.throwBadRequest)(`${context}[${index}] must be a string or object`);
|
|
788
815
|
}
|
|
789
816
|
(0, import_private_utils.assertOnlyAllowedKeys)(input, `${context}[${index}]`, APPLY_BLUEPRINT_FIELD_ALLOWED_KEYS);
|
|
817
|
+
(0, import_field_type_resolver.assertNoInternalFieldKeys)(input, `${context}[${index}]`);
|
|
818
|
+
(0, import_field_type_resolver.assertNoInternalFieldKeys)(input.settings, `${context}[${index}].settings`);
|
|
790
819
|
const fieldPath = (0, import_private_utils.readOptionalString)(input.field);
|
|
791
820
|
const syntheticType = (0, import_private_utils.readOptionalString)(input.type);
|
|
821
|
+
const fieldType = (0, import_field_type_resolver.normalizePublicFieldType)(input.fieldType, `${context}[${index}]`);
|
|
822
|
+
const fields = (0, import_field_type_resolver.normalizePublicFieldNameList)(input.fields, `${context}[${index}].fields`);
|
|
823
|
+
const selectorFields = (0, import_field_type_resolver.normalizePublicFieldNameList)(
|
|
824
|
+
input.selectorFields,
|
|
825
|
+
`${context}[${index}].selectorFields`
|
|
826
|
+
);
|
|
792
827
|
if (!fieldPath && !syntheticType) {
|
|
793
828
|
(0, import_errors.throwBadRequest)(`${context}[${index}] requires field or type`);
|
|
794
829
|
}
|
|
@@ -814,6 +849,14 @@ function compileField(input, index, scopePrefix, assets, localBlockKeys, context
|
|
|
814
849
|
associationPathName: (0, import_private_utils.readOptionalString)(input.associationPathName),
|
|
815
850
|
renderer: (0, import_private_utils.readOptionalString)(input.renderer),
|
|
816
851
|
type: syntheticType,
|
|
852
|
+
fieldType,
|
|
853
|
+
fields,
|
|
854
|
+
selectorFields,
|
|
855
|
+
titleField: (0, import_private_utils.readOptionalString)(input.titleField),
|
|
856
|
+
openMode: (0, import_private_utils.readOptionalString)(input.openMode),
|
|
857
|
+
popupSize: (0, import_private_utils.readOptionalString)(input.popupSize),
|
|
858
|
+
pageSize: input.pageSize,
|
|
859
|
+
showIndex: input.showIndex,
|
|
817
860
|
target: resolveTargetBlockKey(input.target, localBlockKeys, `${context}[${index}].target`),
|
|
818
861
|
settings: Object.keys(settings).length ? settings : void 0,
|
|
819
862
|
popup
|
|
@@ -874,6 +917,7 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
|
|
|
874
917
|
}
|
|
875
918
|
assertApplyBlueprintCalendarMainContent(block, `${context}[${index}]`);
|
|
876
919
|
assertApplyBlueprintKanbanMainContent(block, `${context}[${index}]`);
|
|
920
|
+
assertApplyBlueprintTreeMainContent(block, `${context}[${index}]`);
|
|
877
921
|
const fields = resolveBlockFieldInputs(block, `${context}[${index}]`);
|
|
878
922
|
fields.forEach((field, fieldIndex) => {
|
|
879
923
|
if (typeof (field == null ? void 0 : field.target) !== "string" || !field.target.trim()) {
|
|
@@ -894,6 +938,7 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
|
|
|
894
938
|
assertApplyBlueprintBlockType((0, import_private_utils.readOptionalString)(block.type), `${context}[${index}]`);
|
|
895
939
|
assertApplyBlueprintCalendarMainContent(block, `${context}[${index}]`);
|
|
896
940
|
assertApplyBlueprintKanbanMainContent(block, `${context}[${index}]`);
|
|
941
|
+
assertApplyBlueprintTreeMainContent(block, `${context}[${index}]`);
|
|
897
942
|
const explicitKey = (0, import_private_utils.readString)(block.key);
|
|
898
943
|
const fallback = block.type ? `${block.type}_${index + 1}` : `block_${index + 1}`;
|
|
899
944
|
const localKey = (0, import_private_utils.normalizeBlueprintLocalKey)(block.key, fallback, `${context}[${index}].key`);
|
|
@@ -988,10 +1033,10 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
|
|
|
988
1033
|
resource: buildBlockResource(block, blockContext),
|
|
989
1034
|
template,
|
|
990
1035
|
settings: Object.keys(settings).length ? settings : void 0,
|
|
991
|
-
fields: blockType === "calendar" ? void 0 : fields,
|
|
992
|
-
fieldsLayout: blockType === "calendar" || blockType === "kanban" ? void 0 : fieldsLayout,
|
|
993
|
-
actions: actionsWithDefaultFilter,
|
|
994
|
-
recordActions: blockType === "calendar" || blockType === "kanban" ? void 0 : mergedActions.recordActions
|
|
1036
|
+
fields: blockType === "calendar" || blockType === "tree" ? void 0 : fields,
|
|
1037
|
+
fieldsLayout: blockType === "calendar" || blockType === "kanban" || blockType === "tree" ? void 0 : fieldsLayout,
|
|
1038
|
+
actions: blockType === "tree" ? void 0 : actionsWithDefaultFilter,
|
|
1039
|
+
recordActions: blockType === "calendar" || blockType === "kanban" || blockType === "tree" ? void 0 : mergedActions.recordActions
|
|
995
1040
|
});
|
|
996
1041
|
});
|
|
997
1042
|
return {
|
|
@@ -85,6 +85,14 @@ export type FlowSurfaceApplyBlueprintFieldObjectSpec = {
|
|
|
85
85
|
associationPathName?: string;
|
|
86
86
|
renderer?: string;
|
|
87
87
|
type?: string;
|
|
88
|
+
fieldType?: string;
|
|
89
|
+
fields?: string[];
|
|
90
|
+
selectorFields?: string[];
|
|
91
|
+
titleField?: string;
|
|
92
|
+
openMode?: string;
|
|
93
|
+
popupSize?: string;
|
|
94
|
+
pageSize?: number;
|
|
95
|
+
showIndex?: boolean;
|
|
88
96
|
label?: string;
|
|
89
97
|
target?: string;
|
|
90
98
|
settings?: Record<string, any>;
|
|
@@ -132,7 +140,7 @@ export type FlowSurfaceApplyBlueprintActionObjectSpec = {
|
|
|
132
140
|
chart?: string;
|
|
133
141
|
};
|
|
134
142
|
export type FlowSurfaceApplyBlueprintActionSpec = string | FlowSurfaceApplyBlueprintActionObjectSpec;
|
|
135
|
-
export type FlowSurfaceApplyBlueprintBlockType = 'table' | 'createForm' | 'editForm' | 'details' | 'filterForm' | 'calendar' | 'kanban' | 'list' | 'gridCard' | 'markdown' | 'iframe' | 'chart' | 'actionPanel' | 'jsBlock';
|
|
143
|
+
export type FlowSurfaceApplyBlueprintBlockType = 'table' | 'createForm' | 'editForm' | 'details' | 'filterForm' | 'calendar' | 'kanban' | 'list' | 'gridCard' | 'markdown' | 'iframe' | 'chart' | 'actionPanel' | 'jsBlock' | 'tree';
|
|
136
144
|
export type FlowSurfaceApplyBlueprintBlockSpec = {
|
|
137
145
|
key?: string;
|
|
138
146
|
type?: FlowSurfaceApplyBlueprintBlockType;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import _ from 'lodash';
|
|
10
|
-
import type { FlowSurfaceNodeSpec } from './types';
|
|
10
|
+
import type { FlowSurfaceNodeDefaults, FlowSurfaceNodeSpec } from './types';
|
|
11
11
|
type BuildFieldParams = {
|
|
12
12
|
wrapperUse: string;
|
|
13
13
|
fieldUse: string;
|
|
@@ -145,6 +145,31 @@ export declare function buildFieldTree(params: BuildFieldParams): {
|
|
|
145
145
|
stepParams: Record<string, any>;
|
|
146
146
|
subModels: {
|
|
147
147
|
field: {
|
|
148
|
+
uid: string;
|
|
149
|
+
use: string;
|
|
150
|
+
props: Record<string, any>;
|
|
151
|
+
stepParams: Record<string, any> & {
|
|
152
|
+
fieldSettings: {
|
|
153
|
+
init: _.Dictionary<string>;
|
|
154
|
+
};
|
|
155
|
+
fieldBinding: {
|
|
156
|
+
use: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
} | {
|
|
163
|
+
wrapperUid: string;
|
|
164
|
+
innerUid: string;
|
|
165
|
+
model: {
|
|
166
|
+
uid: string;
|
|
167
|
+
use: string;
|
|
168
|
+
props: Record<string, any>;
|
|
169
|
+
stepParams: Record<string, any>;
|
|
170
|
+
subModels: {
|
|
171
|
+
field: {
|
|
172
|
+
subModels?: Record<string, FlowSurfaceNodeSpec | FlowSurfaceNodeSpec[]>;
|
|
148
173
|
uid: string;
|
|
149
174
|
use: string;
|
|
150
175
|
props: Record<string, any>;
|
|
@@ -208,4 +233,5 @@ export declare function buildCanonicalTableActionsColumnNode(options?: {
|
|
|
208
233
|
flowRegistry: Record<string, any>;
|
|
209
234
|
};
|
|
210
235
|
export declare function assignClientKeysToUids(spec: FlowSurfaceNodeSpec, clientKeyToUid: Record<string, string>): FlowSurfaceNodeSpec;
|
|
236
|
+
export declare function getStandaloneFieldDefaults(use: string): FlowSurfaceNodeDefaults;
|
|
211
237
|
export {};
|
|
@@ -44,7 +44,8 @@ __export(builder_exports, {
|
|
|
44
44
|
buildPersistedRootPageModel: () => buildPersistedRootPageModel,
|
|
45
45
|
buildPopupPageTree: () => buildPopupPageTree,
|
|
46
46
|
buildStandaloneFieldNode: () => buildStandaloneFieldNode,
|
|
47
|
-
buildSyntheticRootPageTabModel: () => buildSyntheticRootPageTabModel
|
|
47
|
+
buildSyntheticRootPageTabModel: () => buildSyntheticRootPageTabModel,
|
|
48
|
+
getStandaloneFieldDefaults: () => getStandaloneFieldDefaults
|
|
48
49
|
});
|
|
49
50
|
module.exports = __toCommonJS(builder_exports);
|
|
50
51
|
var import_utils = require("@nocobase/utils");
|
|
@@ -595,7 +596,8 @@ function buildFieldTree(params) {
|
|
|
595
596
|
init: initPayload
|
|
596
597
|
}
|
|
597
598
|
})
|
|
598
|
-
)
|
|
599
|
+
),
|
|
600
|
+
...fieldDefaults.subModels ? { subModels: import_lodash.default.cloneDeep(fieldDefaults.subModels) } : {}
|
|
599
601
|
}
|
|
600
602
|
}
|
|
601
603
|
}
|
|
@@ -978,7 +980,7 @@ function inferActionDefaultProps(use, scope) {
|
|
|
978
980
|
);
|
|
979
981
|
}
|
|
980
982
|
function applyContainerActionStyle(props, containerUse) {
|
|
981
|
-
if (containerUse
|
|
983
|
+
if (["TableActionsColumnModel", "ListItemModel", "GridCardItemModel"].includes(String(containerUse || "").trim())) {
|
|
982
984
|
return {
|
|
983
985
|
...props,
|
|
984
986
|
type: "link",
|
|
@@ -1031,10 +1033,39 @@ function buildBlockDefaults(use) {
|
|
|
1031
1033
|
}
|
|
1032
1034
|
};
|
|
1033
1035
|
}
|
|
1036
|
+
if (use === "TreeBlockModel") {
|
|
1037
|
+
return {
|
|
1038
|
+
props: {
|
|
1039
|
+
searchable: true,
|
|
1040
|
+
defaultExpandAll: false,
|
|
1041
|
+
includeDescendants: true
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
}
|
|
1034
1045
|
return {};
|
|
1035
1046
|
}
|
|
1036
1047
|
function getStandaloneFieldDefaults(use) {
|
|
1037
1048
|
switch (use) {
|
|
1049
|
+
case "PopupSubTableFieldModel":
|
|
1050
|
+
return {
|
|
1051
|
+
subModels: {
|
|
1052
|
+
subTableColumns: [
|
|
1053
|
+
{
|
|
1054
|
+
use: "PopupSubTableActionsColumnModel",
|
|
1055
|
+
subModels: {
|
|
1056
|
+
actions: [
|
|
1057
|
+
{
|
|
1058
|
+
use: "PopupSubTableEditActionModel"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
use: "PopupSubTableRemoveActionModel"
|
|
1062
|
+
}
|
|
1063
|
+
]
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
]
|
|
1067
|
+
}
|
|
1068
|
+
};
|
|
1038
1069
|
case "JSFieldModel":
|
|
1039
1070
|
return {
|
|
1040
1071
|
stepParams: {
|
|
@@ -1093,5 +1124,6 @@ function humanizeActionTitle(use) {
|
|
|
1093
1124
|
buildPersistedRootPageModel,
|
|
1094
1125
|
buildPopupPageTree,
|
|
1095
1126
|
buildStandaloneFieldNode,
|
|
1096
|
-
buildSyntheticRootPageTabModel
|
|
1127
|
+
buildSyntheticRootPageTabModel,
|
|
1128
|
+
getStandaloneFieldDefaults
|
|
1097
1129
|
});
|
|
@@ -19,6 +19,7 @@ export declare function resolveSupportedFieldCapability(input: {
|
|
|
19
19
|
containerUse: string;
|
|
20
20
|
field?: any;
|
|
21
21
|
requestedFieldUse?: string;
|
|
22
|
+
requestedFieldUseMode?: 'fieldUse' | 'fieldType';
|
|
22
23
|
requestedWrapperUse?: string;
|
|
23
24
|
allowUnresolvedFieldUse?: boolean;
|
|
24
25
|
requestedRenderer?: string;
|