@nocobase/plugin-flow-engine 2.1.0-alpha.16 → 2.1.0-alpha.18
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/blueprint/compile-blocks.js +16 -5
- package/dist/server/flow-surfaces/payload-shape.js +0 -3
- package/dist/server/flow-surfaces/service.d.ts +11 -2
- package/dist/server/flow-surfaces/service.js +89 -26
- package/dist/swagger/flow-surfaces.d.ts +4 -0
- package/dist/swagger/flow-surfaces.examples.d.ts +31 -0
- package/dist/swagger/flow-surfaces.examples.js +33 -0
- package/dist/swagger/flow-surfaces.js +39 -13
- package/dist/swagger/index.d.ts +4 -0
- package/package.json +2 -2
package/dist/externalVersion.js
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.1.0-alpha.18",
|
|
12
12
|
"lodash": "4.17.21",
|
|
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.
|
|
21
|
-
"@nocobase/ai": "2.1.0-alpha.
|
|
13
|
+
"@nocobase/database": "2.1.0-alpha.18",
|
|
14
|
+
"@nocobase/data-source-manager": "2.1.0-alpha.18",
|
|
15
|
+
"@nocobase/resourcer": "2.1.0-alpha.18",
|
|
16
|
+
"@nocobase/utils": "2.1.0-alpha.18",
|
|
17
|
+
"@nocobase/cache": "2.1.0-alpha.18",
|
|
18
|
+
"@nocobase/plugin-localization": "2.1.0-alpha.18",
|
|
19
|
+
"@nocobase/server": "2.1.0-alpha.18",
|
|
20
|
+
"@nocobase/actions": "2.1.0-alpha.18",
|
|
21
|
+
"@nocobase/ai": "2.1.0-alpha.18"
|
|
22
22
|
};
|
|
@@ -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-17T05:12:19.380Z"}
|
|
@@ -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-17T05:12:20.428Z"}
|
|
@@ -117,15 +117,15 @@ const APPLY_BLUEPRINT_BLOCK_RESOURCE_SHORTHAND_KEYS = [
|
|
|
117
117
|
"associationField"
|
|
118
118
|
];
|
|
119
119
|
const APPLY_BLUEPRINT_RECORD_CAPABLE_BLOCK_TYPES = /* @__PURE__ */ new Set(["table", "details", "list", "gridCard"]);
|
|
120
|
-
const
|
|
120
|
+
const APPLY_BLUEPRINT_AUTO_PROMOTED_RECORD_ACTION_TYPES = /* @__PURE__ */ new Set([
|
|
121
121
|
"view",
|
|
122
122
|
"edit",
|
|
123
123
|
"delete",
|
|
124
124
|
"updateRecord",
|
|
125
|
-
"duplicate"
|
|
126
|
-
"addChild"
|
|
125
|
+
"duplicate"
|
|
127
126
|
]);
|
|
128
127
|
const APPLY_BLUEPRINT_BLOCK_TYPES = new Set(APPLY_BLUEPRINT_BLOCK_TYPE_ENUM);
|
|
128
|
+
const APPLY_BLUEPRINT_ADD_CHILD_RECORD_ACTION_ERROR = "type 'addChild' must be authored under recordActions and is only valid when the live target catalog.recordActions exposes it for a tree collection table with treeTable enabled";
|
|
129
129
|
function assertNoBlockLevelLayout(input, context) {
|
|
130
130
|
if (Object.prototype.hasOwnProperty.call(input, "layout")) {
|
|
131
131
|
(0, import_errors.throwBadRequest)(`${context}.layout is not supported; layout is only allowed on tabs[] and popup`);
|
|
@@ -266,9 +266,12 @@ function splitApplyBlueprintBlockActionsByScope(block, context) {
|
|
|
266
266
|
}
|
|
267
267
|
const promotedRecordActions = [];
|
|
268
268
|
const remainingActions = [];
|
|
269
|
-
rawActions.forEach((action) => {
|
|
269
|
+
rawActions.forEach((action, index) => {
|
|
270
270
|
const actionType = readApplyBlueprintActionType(action);
|
|
271
|
-
if (actionType
|
|
271
|
+
if (actionType === "addChild") {
|
|
272
|
+
(0, import_errors.throwBadRequest)(`${context}.actions[${index}] ${APPLY_BLUEPRINT_ADD_CHILD_RECORD_ACTION_ERROR}`);
|
|
273
|
+
}
|
|
274
|
+
if (actionType && APPLY_BLUEPRINT_AUTO_PROMOTED_RECORD_ACTION_TYPES.has(actionType)) {
|
|
272
275
|
promotedRecordActions.push(action);
|
|
273
276
|
return;
|
|
274
277
|
}
|
|
@@ -486,6 +489,14 @@ function compilePopup(popup, scopePrefix, assets, context, options = {}) {
|
|
|
486
489
|
(0, import_private_utils.assertOnlyAllowedKeys)(popup, context, APPLY_BLUEPRINT_POPUP_ALLOWED_KEYS);
|
|
487
490
|
const popupTitle = (0, import_private_utils.readOptionalString)(popup.title);
|
|
488
491
|
const template = ensureOptionalTemplate(popup.template, `${context}.template`);
|
|
492
|
+
if (template) {
|
|
493
|
+
return {
|
|
494
|
+
popup: {
|
|
495
|
+
template
|
|
496
|
+
},
|
|
497
|
+
popupTitle
|
|
498
|
+
};
|
|
499
|
+
}
|
|
489
500
|
const rawPopupBlocks = readOptionalItems(popup.blocks, `${context}.blocks`);
|
|
490
501
|
const popupBlocks = options.ownerActionType === "edit" && rawPopupBlocks.length ? normalizeEditPopupBlocks(rawPopupBlocks, context) : rawPopupBlocks;
|
|
491
502
|
const compiledBlocks = popupBlocks.length ? compileBlocks(
|
|
@@ -53,9 +53,6 @@ function validateFlowSurfacePayloadShape(actionName, value, path) {
|
|
|
53
53
|
if (import_lodash.default.isPlainObject(value.stepParams) && Object.prototype.hasOwnProperty.call(value.stepParams, import_key_registry.FLOW_SURFACE_INTERNAL_META_KEY)) {
|
|
54
54
|
(0, import_errors.throwBadRequest)(`flowSurfaces ${actionName} ${path}.stepParams.${import_key_registry.FLOW_SURFACE_INTERNAL_META_KEY} is reserved`);
|
|
55
55
|
}
|
|
56
|
-
if (import_lodash.default.isPlainObject(value.template) && (Object.prototype.hasOwnProperty.call(value, "mode") || Object.prototype.hasOwnProperty.call(value, "blocks") || Object.prototype.hasOwnProperty.call(value, "layout"))) {
|
|
57
|
-
(0, import_errors.throwBadRequest)(`flowSurfaces ${actionName} ${path} cannot mix template with local popup content`);
|
|
58
|
-
}
|
|
59
56
|
Object.entries(value).forEach(([key, child]) => validateFlowSurfacePayloadShape(actionName, child, `${path}.${key}`));
|
|
60
57
|
}
|
|
61
58
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -380,6 +380,7 @@ export declare class FlowSurfacesService {
|
|
|
380
380
|
}>;
|
|
381
381
|
private normalizeInlineSettings;
|
|
382
382
|
private normalizeInlinePopup;
|
|
383
|
+
private buildInlinePopupTemplateOpenView;
|
|
383
384
|
private peekInlineFieldSettingsOpenView;
|
|
384
385
|
private assertOpenViewUidTarget;
|
|
385
386
|
private normalizeFlowTemplateMode;
|
|
@@ -399,7 +400,6 @@ export declare class FlowSurfacesService {
|
|
|
399
400
|
private buildDefaultFieldOpenView;
|
|
400
401
|
private ensureLocalFieldPopupSurface;
|
|
401
402
|
private applyInlineNodeSettings;
|
|
402
|
-
private assertInlinePopupTemplateConflict;
|
|
403
403
|
private applyInlineFieldPopup;
|
|
404
404
|
private applyInlineFieldSettings;
|
|
405
405
|
private applyInlineStandaloneFieldSettings;
|
|
@@ -516,7 +516,16 @@ export declare class FlowSurfacesService {
|
|
|
516
516
|
private resolveAddRecordActionCatalogItem;
|
|
517
517
|
private resolveComposeBlockActionCatalogItem;
|
|
518
518
|
private resolveComposeRecordActionCatalogItem;
|
|
519
|
-
private
|
|
519
|
+
private isAddChildCatalogItem;
|
|
520
|
+
private isTreeCollection;
|
|
521
|
+
private isTreeTableEnabled;
|
|
522
|
+
private resolveAddChildOwnerNode;
|
|
523
|
+
private resolveOwnerCollectionForAddChild;
|
|
524
|
+
private canUseAddChildOnOwnerNode;
|
|
525
|
+
private assertAddChildSupportedForOwnerNode;
|
|
526
|
+
private filterTargetRecordActions;
|
|
527
|
+
private inspectRecordActionContainer;
|
|
528
|
+
private materializeRecordActionContainer;
|
|
520
529
|
private runBatchCreate;
|
|
521
530
|
private normalizeComposeBlock;
|
|
522
531
|
private normalizeComposeBlocks;
|
|
@@ -684,7 +684,8 @@ class FlowSurfacesService {
|
|
|
684
684
|
}
|
|
685
685
|
if (catalogAnalysis.selectedSections.includes("recordActions")) {
|
|
686
686
|
const availableRecordActions = node ? catalogAnalysis.recordActionContainerUse ? (0, import_catalog.getAvailableActionCatalogItems)(catalogAnalysis.recordActionContainerUse, "record", enabledPackages) : [] : (0, import_catalog.getAvailableActionCatalogItems)(void 0, "record", enabledPackages);
|
|
687
|
-
|
|
687
|
+
const filteredRecordActions = node ? await this.filterTargetRecordActions(availableRecordActions, node, options.transaction) : availableRecordActions;
|
|
688
|
+
response.recordActions = filteredRecordActions.map((item) => this.projectCatalogItem(item, expandFlags));
|
|
688
689
|
}
|
|
689
690
|
if (catalogAnalysis.selectedSections.includes("node")) {
|
|
690
691
|
response.node = this.projectCatalogNode(node, resolved, expandFlags);
|
|
@@ -4837,7 +4838,7 @@ class FlowSurfacesService {
|
|
|
4837
4838
|
const inlineSettings = this.normalizeInlineSettings("addRecordAction", values.settings);
|
|
4838
4839
|
const inlinePopup = this.normalizeInlinePopup("addRecordAction", values.popup);
|
|
4839
4840
|
const enabledPackages = await this.resolveEnabledPluginPackages(options);
|
|
4840
|
-
const container = await this.
|
|
4841
|
+
const container = await this.inspectRecordActionContainer(target, options.transaction);
|
|
4841
4842
|
const actionCatalogItem = this.resolveAddRecordActionCatalogItem(
|
|
4842
4843
|
{
|
|
4843
4844
|
type: values.type,
|
|
@@ -4851,12 +4852,16 @@ class FlowSurfacesService {
|
|
|
4851
4852
|
if (inlinePopup && !POPUP_ACTION_USES.has(actionCatalogItem.use)) {
|
|
4852
4853
|
(0, import_errors.throwBadRequest)(`flowSurfaces addRecordAction type '${actionCatalogItem.key}' does not support popup`);
|
|
4853
4854
|
}
|
|
4855
|
+
if (this.isAddChildCatalogItem(actionCatalogItem)) {
|
|
4856
|
+
await this.assertAddChildSupportedForOwnerNode(container.ownerNode, "addRecordAction", options.transaction);
|
|
4857
|
+
}
|
|
4854
4858
|
(0, import_action_scope.assertRequestedActionScope)({
|
|
4855
4859
|
requestedScope: void 0,
|
|
4856
4860
|
resolvedScope,
|
|
4857
4861
|
containerUse: container.containerUse,
|
|
4858
4862
|
context: "addRecordAction"
|
|
4859
4863
|
});
|
|
4864
|
+
const materializedContainer = await this.materializeRecordActionContainer(container, options.transaction);
|
|
4860
4865
|
const resourceContext = container.ownerUid ? await this.locator.resolveCollectionContext(container.ownerUid, options.transaction).catch(() => null) : null;
|
|
4861
4866
|
const action = (0, import_builder.buildActionTree)({
|
|
4862
4867
|
use: actionCatalogItem.use,
|
|
@@ -4870,9 +4875,9 @@ class FlowSurfacesService {
|
|
|
4870
4875
|
this.contractGuard.validateNodeTreeAgainstContract(action);
|
|
4871
4876
|
const created = await this.repository.upsertModel(
|
|
4872
4877
|
{
|
|
4873
|
-
parentId:
|
|
4874
|
-
subKey:
|
|
4875
|
-
subType:
|
|
4878
|
+
parentId: materializedContainer.parentUid,
|
|
4879
|
+
subKey: materializedContainer.subKey,
|
|
4880
|
+
subType: materializedContainer.subType,
|
|
4876
4881
|
...action
|
|
4877
4882
|
},
|
|
4878
4883
|
{ transaction: options.transaction }
|
|
@@ -4882,8 +4887,8 @@ class FlowSurfacesService {
|
|
|
4882
4887
|
await this.syncFlowTemplateUsagesForNodeTree(created, options.transaction);
|
|
4883
4888
|
const result = {
|
|
4884
4889
|
uid: created,
|
|
4885
|
-
parentUid:
|
|
4886
|
-
subKey:
|
|
4890
|
+
parentUid: materializedContainer.parentUid,
|
|
4891
|
+
subKey: materializedContainer.subKey,
|
|
4887
4892
|
scope: actionCatalogItem.scope,
|
|
4888
4893
|
...await this.collectComposeActionKeys(created, options.transaction)
|
|
4889
4894
|
};
|
|
@@ -4962,6 +4967,13 @@ class FlowSurfacesService {
|
|
|
4962
4967
|
}
|
|
4963
4968
|
return popup;
|
|
4964
4969
|
}
|
|
4970
|
+
buildInlinePopupTemplateOpenView(popup) {
|
|
4971
|
+
const normalizedTitle = import_lodash.default.isUndefined(popup == null ? void 0 : popup.title) || import_lodash.default.isNull(popup == null ? void 0 : popup.title) ? void 0 : String(popup.title).trim() || void 0;
|
|
4972
|
+
return (0, import_service_utils.buildDefinedPayload)({
|
|
4973
|
+
template: popup == null ? void 0 : popup.template,
|
|
4974
|
+
title: normalizedTitle
|
|
4975
|
+
});
|
|
4976
|
+
}
|
|
4965
4977
|
peekInlineFieldSettingsOpenView(settings, wrapperUse) {
|
|
4966
4978
|
if (!settings || !Object.keys(settings).length) {
|
|
4967
4979
|
return void 0;
|
|
@@ -5351,19 +5363,9 @@ class FlowSurfacesService {
|
|
|
5351
5363
|
(0, import_service_utils.rethrowInlineConfigurationError)(error, `flowSurfaces ${actionName} settings invalid`);
|
|
5352
5364
|
}
|
|
5353
5365
|
}
|
|
5354
|
-
assertInlinePopupTemplateConflict(actionName, popup) {
|
|
5355
|
-
const forbiddenKeys = ["blocks", "layout", "mode"].filter((key) => !import_lodash.default.isUndefined(popup[key]));
|
|
5356
|
-
if (forbiddenKeys.length) {
|
|
5357
|
-
(0, import_errors.throwBadRequest)(
|
|
5358
|
-
`flowSurfaces ${actionName} popup.template cannot be combined with ${forbiddenKeys.join(", ")}`,
|
|
5359
|
-
"FLOW_SURFACE_TEMPLATE_POPUP_CONFLICT"
|
|
5360
|
-
);
|
|
5361
|
-
}
|
|
5362
|
-
}
|
|
5363
5366
|
async applyInlineFieldPopup(actionName, result, popup, options) {
|
|
5364
5367
|
const fieldHostUid = result.fieldUid || result.uid;
|
|
5365
5368
|
if (!import_lodash.default.isUndefined(popup == null ? void 0 : popup.template)) {
|
|
5366
|
-
this.assertInlinePopupTemplateConflict(actionName, popup);
|
|
5367
5369
|
Object.assign(
|
|
5368
5370
|
result,
|
|
5369
5371
|
await this.configureFieldNode(
|
|
@@ -5371,9 +5373,7 @@ class FlowSurfacesService {
|
|
|
5371
5373
|
uid: fieldHostUid
|
|
5372
5374
|
},
|
|
5373
5375
|
{
|
|
5374
|
-
openView:
|
|
5375
|
-
template: popup.template
|
|
5376
|
-
}
|
|
5376
|
+
openView: this.buildInlinePopupTemplateOpenView(popup)
|
|
5377
5377
|
},
|
|
5378
5378
|
{
|
|
5379
5379
|
...options,
|
|
@@ -5724,16 +5724,13 @@ class FlowSurfacesService {
|
|
|
5724
5724
|
(0, import_errors.throwBadRequest)(`flowSurfaces ${actionName} popup cannot be combined with external openView.uid`);
|
|
5725
5725
|
}
|
|
5726
5726
|
if (popup && (0, import_default_action_popup.hasFlowSurfaceInlinePopupTemplate)(popup)) {
|
|
5727
|
-
this.assertInlinePopupTemplateConflict(actionName, popup);
|
|
5728
5727
|
await this.configureActionNode(
|
|
5729
5728
|
{
|
|
5730
5729
|
uid: actionUid
|
|
5731
5730
|
},
|
|
5732
5731
|
actionNode.use,
|
|
5733
5732
|
{
|
|
5734
|
-
openView:
|
|
5735
|
-
template: popup.template
|
|
5736
|
-
}
|
|
5733
|
+
openView: this.buildInlinePopupTemplateOpenView(popup)
|
|
5737
5734
|
},
|
|
5738
5735
|
{
|
|
5739
5736
|
...options,
|
|
@@ -6823,23 +6820,79 @@ class FlowSurfacesService {
|
|
|
6823
6820
|
}
|
|
6824
6821
|
);
|
|
6825
6822
|
}
|
|
6826
|
-
|
|
6823
|
+
isAddChildCatalogItem(item) {
|
|
6824
|
+
return (item == null ? void 0 : item.key) === "addChild" || (item == null ? void 0 : item.use) === "AddChildActionModel";
|
|
6825
|
+
}
|
|
6826
|
+
isTreeCollection(collection) {
|
|
6827
|
+
var _a;
|
|
6828
|
+
return (collection == null ? void 0 : collection.template) === "tree" || ((_a = collection == null ? void 0 : collection.options) == null ? void 0 : _a.template) === "tree" || (collection == null ? void 0 : collection.tree) === true;
|
|
6829
|
+
}
|
|
6830
|
+
isTreeTableEnabled(node) {
|
|
6831
|
+
var _a, _b;
|
|
6832
|
+
return (node == null ? void 0 : node.use) === "TableBlockModel" && (((_a = node == null ? void 0 : node.props) == null ? void 0 : _a.treeTable) === true || ((_b = node == null ? void 0 : node.decoratorProps) == null ? void 0 : _b.treeTable) === true || import_lodash.default.get(node, ["stepParams", "tableSettings", "treeTable", "treeTable"]) === true);
|
|
6833
|
+
}
|
|
6834
|
+
async resolveAddChildOwnerNode(node, transaction) {
|
|
6835
|
+
if (!(node == null ? void 0 : node.uid) || (node == null ? void 0 : node.use) !== "TableActionsColumnModel") {
|
|
6836
|
+
return node;
|
|
6837
|
+
}
|
|
6838
|
+
const ownerUid = node.parentId || await this.locator.findParentUid(node.uid, transaction);
|
|
6839
|
+
if (!ownerUid) {
|
|
6840
|
+
return node;
|
|
6841
|
+
}
|
|
6842
|
+
return await this.repository.findModelById(ownerUid, {
|
|
6843
|
+
transaction,
|
|
6844
|
+
includeAsyncNode: true
|
|
6845
|
+
}) || node;
|
|
6846
|
+
}
|
|
6847
|
+
async resolveOwnerCollectionForAddChild(node, transaction) {
|
|
6848
|
+
var _a;
|
|
6849
|
+
const ownerNode = await this.resolveAddChildOwnerNode(node, transaction);
|
|
6850
|
+
const resourceInit = import_lodash.default.get(ownerNode, ["stepParams", "resourceSettings", "init"]) || ((ownerNode == null ? void 0 : ownerNode.uid) ? (_a = await this.locator.resolveCollectionContext(ownerNode.uid, transaction).catch(() => null)) == null ? void 0 : _a.resourceInit : null);
|
|
6851
|
+
return this.resolveCollectionFromInit(resourceInit);
|
|
6852
|
+
}
|
|
6853
|
+
async canUseAddChildOnOwnerNode(node, transaction) {
|
|
6854
|
+
const ownerNode = await this.resolveAddChildOwnerNode(node, transaction);
|
|
6855
|
+
if ((ownerNode == null ? void 0 : ownerNode.use) !== "TableBlockModel" || !this.isTreeTableEnabled(ownerNode)) {
|
|
6856
|
+
return false;
|
|
6857
|
+
}
|
|
6858
|
+
const collection = await this.resolveOwnerCollectionForAddChild(ownerNode, transaction);
|
|
6859
|
+
return this.isTreeCollection(collection);
|
|
6860
|
+
}
|
|
6861
|
+
async assertAddChildSupportedForOwnerNode(node, context, transaction) {
|
|
6862
|
+
if (await this.canUseAddChildOnOwnerNode(node, transaction)) {
|
|
6863
|
+
return;
|
|
6864
|
+
}
|
|
6865
|
+
(0, import_errors.throwBadRequest)(
|
|
6866
|
+
`flowSurfaces ${context} type 'addChild' only supports tables bound to tree collections with tree table enabled`
|
|
6867
|
+
);
|
|
6868
|
+
}
|
|
6869
|
+
async filterTargetRecordActions(items, node, transaction) {
|
|
6870
|
+
if (!items.some((item) => this.isAddChildCatalogItem(item))) {
|
|
6871
|
+
return items;
|
|
6872
|
+
}
|
|
6873
|
+
if (await this.canUseAddChildOnOwnerNode(node, transaction)) {
|
|
6874
|
+
return items;
|
|
6875
|
+
}
|
|
6876
|
+
return items.filter((item) => !this.isAddChildCatalogItem(item));
|
|
6877
|
+
}
|
|
6878
|
+
async inspectRecordActionContainer(target, transaction) {
|
|
6827
6879
|
var _a, _b;
|
|
6828
6880
|
const resolved = await this.locator.resolve(target, { transaction });
|
|
6829
6881
|
const node = resolved.node || await this.repository.findModelById(resolved.uid, { transaction, includeAsyncNode: true });
|
|
6830
6882
|
const use = node == null ? void 0 : node.use;
|
|
6831
6883
|
if (use === "TableBlockModel") {
|
|
6832
6884
|
return {
|
|
6885
|
+
ownerNode: node,
|
|
6833
6886
|
ownerUid: node.uid,
|
|
6834
6887
|
ownerUse: use,
|
|
6835
6888
|
containerUse: "TableActionsColumnModel",
|
|
6836
|
-
parentUid: await this.ensureTableActionsColumn(node.uid, transaction),
|
|
6837
6889
|
subKey: "actions",
|
|
6838
6890
|
subType: "array"
|
|
6839
6891
|
};
|
|
6840
6892
|
}
|
|
6841
6893
|
if (use === "DetailsBlockModel") {
|
|
6842
6894
|
return {
|
|
6895
|
+
ownerNode: node,
|
|
6843
6896
|
ownerUid: node.uid,
|
|
6844
6897
|
ownerUse: use,
|
|
6845
6898
|
containerUse: use,
|
|
@@ -6857,6 +6910,7 @@ class FlowSurfacesService {
|
|
|
6857
6910
|
);
|
|
6858
6911
|
}
|
|
6859
6912
|
return {
|
|
6913
|
+
ownerNode: node,
|
|
6860
6914
|
ownerUid: node.uid,
|
|
6861
6915
|
ownerUse: use,
|
|
6862
6916
|
containerUse: use === "ListBlockModel" ? "ListItemModel" : "GridCardItemModel",
|
|
@@ -6879,6 +6933,15 @@ class FlowSurfacesService {
|
|
|
6879
6933
|
`flowSurfaces addRecordAction target '${use || resolved.uid}' is not a supported record action surface`
|
|
6880
6934
|
);
|
|
6881
6935
|
}
|
|
6936
|
+
async materializeRecordActionContainer(container, transaction) {
|
|
6937
|
+
if (container.ownerUse !== "TableBlockModel") {
|
|
6938
|
+
return container;
|
|
6939
|
+
}
|
|
6940
|
+
return {
|
|
6941
|
+
...container,
|
|
6942
|
+
parentUid: container.parentUid || await this.ensureTableActionsColumn(container.ownerUid, transaction)
|
|
6943
|
+
};
|
|
6944
|
+
}
|
|
6882
6945
|
async runBatchCreate(options) {
|
|
6883
6946
|
var _a, _b;
|
|
6884
6947
|
const target = this.normalizeWriteTarget(options.actionName, (_a = options.values) == null ? void 0 : _a.target, options.values);
|
|
@@ -1771,6 +1771,7 @@ declare const _default: {
|
|
|
1771
1771
|
FlowSurfaceApplyBlueprintActionSpec: {
|
|
1772
1772
|
oneOf: ({
|
|
1773
1773
|
type: string;
|
|
1774
|
+
enum: string[];
|
|
1774
1775
|
required?: undefined;
|
|
1775
1776
|
properties?: undefined;
|
|
1776
1777
|
additionalProperties?: undefined;
|
|
@@ -1804,11 +1805,13 @@ declare const _default: {
|
|
|
1804
1805
|
};
|
|
1805
1806
|
};
|
|
1806
1807
|
additionalProperties: boolean;
|
|
1808
|
+
enum?: undefined;
|
|
1807
1809
|
})[];
|
|
1808
1810
|
};
|
|
1809
1811
|
FlowSurfaceApplyBlueprintRecordActionSpec: {
|
|
1810
1812
|
oneOf: ({
|
|
1811
1813
|
type: string;
|
|
1814
|
+
enum: string[];
|
|
1812
1815
|
required?: undefined;
|
|
1813
1816
|
properties?: undefined;
|
|
1814
1817
|
additionalProperties?: undefined;
|
|
@@ -1842,6 +1845,7 @@ declare const _default: {
|
|
|
1842
1845
|
};
|
|
1843
1846
|
};
|
|
1844
1847
|
additionalProperties: boolean;
|
|
1848
|
+
enum?: undefined;
|
|
1845
1849
|
})[];
|
|
1846
1850
|
};
|
|
1847
1851
|
FlowSurfaceApplyBlueprintBlockSpec: {
|
|
@@ -909,6 +909,20 @@ export declare const flowSurfaceExamples: {
|
|
|
909
909
|
}[];
|
|
910
910
|
};
|
|
911
911
|
};
|
|
912
|
+
addRecordAddChildAction: {
|
|
913
|
+
target: {
|
|
914
|
+
uid: string;
|
|
915
|
+
};
|
|
916
|
+
type: string;
|
|
917
|
+
settings: {
|
|
918
|
+
title: string;
|
|
919
|
+
openView: {
|
|
920
|
+
dataSourceKey: string;
|
|
921
|
+
collectionName: string;
|
|
922
|
+
mode: string;
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
};
|
|
912
926
|
addRecordJsAction: {
|
|
913
927
|
target: {
|
|
914
928
|
uid: string;
|
|
@@ -1045,6 +1059,23 @@ export declare const flowSurfaceExamples: {
|
|
|
1045
1059
|
popup?: undefined;
|
|
1046
1060
|
})[];
|
|
1047
1061
|
};
|
|
1062
|
+
addRecordAddChildActions: {
|
|
1063
|
+
target: {
|
|
1064
|
+
uid: string;
|
|
1065
|
+
};
|
|
1066
|
+
recordActions: {
|
|
1067
|
+
key: string;
|
|
1068
|
+
type: string;
|
|
1069
|
+
settings: {
|
|
1070
|
+
title: string;
|
|
1071
|
+
openView: {
|
|
1072
|
+
dataSourceKey: string;
|
|
1073
|
+
collectionName: string;
|
|
1074
|
+
mode: string;
|
|
1075
|
+
};
|
|
1076
|
+
};
|
|
1077
|
+
}[];
|
|
1078
|
+
};
|
|
1048
1079
|
updateSettings: {
|
|
1049
1080
|
target: {
|
|
1050
1081
|
uid: string;
|
|
@@ -1058,6 +1058,20 @@ const flowSurfaceExamples = {
|
|
|
1058
1058
|
]
|
|
1059
1059
|
}
|
|
1060
1060
|
},
|
|
1061
|
+
addRecordAddChildAction: {
|
|
1062
|
+
target: {
|
|
1063
|
+
uid: "tree-table-block-uid"
|
|
1064
|
+
},
|
|
1065
|
+
type: "addChild",
|
|
1066
|
+
settings: {
|
|
1067
|
+
title: "Add child category",
|
|
1068
|
+
openView: {
|
|
1069
|
+
dataSourceKey: "main",
|
|
1070
|
+
collectionName: "categories",
|
|
1071
|
+
mode: "drawer"
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
},
|
|
1061
1075
|
addRecordJsAction: {
|
|
1062
1076
|
target: {
|
|
1063
1077
|
uid: "details-block-uid"
|
|
@@ -1203,6 +1217,25 @@ const flowSurfaceExamples = {
|
|
|
1203
1217
|
}
|
|
1204
1218
|
]
|
|
1205
1219
|
},
|
|
1220
|
+
addRecordAddChildActions: {
|
|
1221
|
+
target: {
|
|
1222
|
+
uid: "tree-table-block-uid"
|
|
1223
|
+
},
|
|
1224
|
+
recordActions: [
|
|
1225
|
+
{
|
|
1226
|
+
key: "addChild",
|
|
1227
|
+
type: "addChild",
|
|
1228
|
+
settings: {
|
|
1229
|
+
title: "Add child category",
|
|
1230
|
+
openView: {
|
|
1231
|
+
dataSourceKey: "main",
|
|
1232
|
+
collectionName: "categories",
|
|
1233
|
+
mode: "drawer"
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
]
|
|
1238
|
+
},
|
|
1206
1239
|
updateSettings: {
|
|
1207
1240
|
target: {
|
|
1208
1241
|
uid: "table-block-uid"
|
|
@@ -74,6 +74,7 @@ const ACTION_TYPE_ENUM = [
|
|
|
74
74
|
"reset",
|
|
75
75
|
"collapse"
|
|
76
76
|
];
|
|
77
|
+
const APPLY_BLUEPRINT_ACTION_TYPE_ENUM = ACTION_TYPE_ENUM.filter((item) => item !== "addChild");
|
|
77
78
|
const NON_RECORD_ACTION_TYPE_ENUM = [
|
|
78
79
|
"filter",
|
|
79
80
|
"addNew",
|
|
@@ -124,6 +125,8 @@ const APPLY_BLUEPRINT_BLOCK_TYPE_ENUM = [
|
|
|
124
125
|
"actionPanel",
|
|
125
126
|
"jsBlock"
|
|
126
127
|
];
|
|
128
|
+
const ADD_CHILD_TREE_TABLE_NOTE = "`addChild` is only valid when the live target `catalog.recordActions` exposes it, which normally means a table bound to a tree collection with `treeTable` enabled.";
|
|
129
|
+
const APPLY_BLUEPRINT_ADD_CHILD_NOTE = "`addChild` is not auto-promoted from `actions`; author it only under `recordActions`, and only when the live target `catalog.recordActions` exposes it for a tree table.";
|
|
127
130
|
const REACTION_FINGERPRINT_DESCRIPTION = "Optional optimistic-concurrency fingerprint from `getReactionMeta.capabilities[].fingerprint`. When provided, the write fails with HTTP 409 if the current slot fingerprint no longer matches.";
|
|
128
131
|
const REACTION_RULES_REPLACE_DESCRIPTION = "Full replacement payload for the resolved reaction slot. Pass `[]` to clear all rules from that slot.";
|
|
129
132
|
const REACTION_LOCALIZED_FORM_TARGET_DESCRIPTION = "Reaction write target. Use the live block/action uid for localized edits. For form field-value and form field-linkage writes, keep passing the outer form block uid; the backend resolves the inner form-grid slot automatically.";
|
|
@@ -707,7 +710,7 @@ const actionDocs = {
|
|
|
707
710
|
tags: [FLOW_SURFACES_TAG],
|
|
708
711
|
summary: "Add a field wrapper and inner field under a field container",
|
|
709
712
|
description: valuesCompatibilityNote(
|
|
710
|
-
"Automatically derives the wrapper/inner-field combination from the container use and the field interface. It can also import a form template through `template`, using `reference` or `copy` mode for the target form grid. `fieldUse` is only kept as a compatibility check and is no longer an arbitrary creation entry. Direct add does not accept raw `wrapperProps` / `fieldProps` / `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse the public configuration semantics from `configure.changes` plus the catalog item/node `configureOptions`. Popup-capable fields can also pass `popup` directly to append a local popup subtree or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. If local openView is enabled but no popup content is provided, the server fills in the popup page/tab/grid shell automatically."
|
|
713
|
+
"Automatically derives the wrapper/inner-field combination from the container use and the field interface. It can also import a form template through `template`, using `reference` or `copy` mode for the target form grid. `fieldUse` is only kept as a compatibility check and is no longer an arbitrary creation entry. Direct add does not accept raw `wrapperProps` / `fieldProps` / `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse the public configuration semantics from `configure.changes` plus the catalog item/node `configureOptions`. Popup-capable fields can also pass `popup` directly to append a local popup subtree or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. When `popup.template` is present, `popup.title` still applies, while local `popup.mode` / `popup.blocks` / `popup.layout` are accepted but ignored. If local openView is enabled but no popup content is provided, the server fills in the popup page/tab/grid shell automatically."
|
|
711
714
|
),
|
|
712
715
|
requestBody: {
|
|
713
716
|
required: true,
|
|
@@ -745,7 +748,7 @@ const actionDocs = {
|
|
|
745
748
|
tags: [FLOW_SURFACES_TAG],
|
|
746
749
|
summary: "Add a non-record action under an allowed block/form/filter-form/action-panel container",
|
|
747
750
|
description: valuesCompatibilityNote(
|
|
748
|
-
"Only non-record actions that are public in the catalog and visible in the current container may be created. Typical cases include table block actions, form submit, filter-form reset, and action-panel actions. Use `addRecordAction` for record actions. Direct add does not accept raw `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse `configure.changes` plus the catalog item/node `configureOptions`. Popup-capable actions may also include `popup` directly to append a popup subtree or `popup.template` to reuse a saved popup template in `reference` / `copy` mode."
|
|
751
|
+
"Only non-record actions that are public in the catalog and visible in the current container may be created. Typical cases include table block actions, form submit, filter-form reset, and action-panel actions. Use `addRecordAction` for record actions. Direct add does not accept raw `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse `configure.changes` plus the catalog item/node `configureOptions`. Popup-capable actions may also include `popup` directly to append a popup subtree or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. When `popup.template` is present, `popup.title` still applies, while local `popup.mode` / `popup.blocks` / `popup.layout` are accepted but ignored."
|
|
749
752
|
),
|
|
750
753
|
requestBody: {
|
|
751
754
|
required: true,
|
|
@@ -779,7 +782,7 @@ const actionDocs = {
|
|
|
779
782
|
tags: [FLOW_SURFACES_TAG],
|
|
780
783
|
summary: "Add a record action under a record-capable owner target",
|
|
781
784
|
description: valuesCompatibilityNote(
|
|
782
|
-
|
|
785
|
+
`Only record actions that are public in the catalog and visible in the current container may be created. The public target must be a record-capable owner target such as table/details/list/gridCard. Do not pass internal container uids such as a table actions column or a list/gridCard item. ${ADD_CHILD_TREE_TABLE_NOTE} Direct add does not accept raw \`props\` / \`decoratorProps\` / \`stepParams\` / \`flowRegistry\`. Use \`settings\` and reuse \`configure.changes\` plus the catalog item/node \`configureOptions\`. Popup-capable actions may also include \`popup\` directly to append a popup subtree or \`popup.template\` to reuse a saved popup template in \`reference\` / \`copy\` mode. When \`popup.template\` is present, \`popup.title\` still applies, while local \`popup.mode\` / \`popup.blocks\` / \`popup.layout\` are accepted but ignored.`
|
|
783
786
|
),
|
|
784
787
|
requestBody: {
|
|
785
788
|
required: true,
|
|
@@ -791,6 +794,10 @@ const actionDocs = {
|
|
|
791
794
|
summary: "Create a view action under a table record-action owner target",
|
|
792
795
|
value: import_flow_surfaces.flowSurfaceExamples.addRecordAction
|
|
793
796
|
},
|
|
797
|
+
addChild: {
|
|
798
|
+
summary: "Create an addChild record action on a tree table target",
|
|
799
|
+
value: import_flow_surfaces.flowSurfaceExamples.addRecordAddChildAction
|
|
800
|
+
},
|
|
794
801
|
js: {
|
|
795
802
|
summary: "Create a JS record action under a details block owner target",
|
|
796
803
|
value: import_flow_surfaces.flowSurfaceExamples.addRecordJsAction
|
|
@@ -814,7 +821,7 @@ const actionDocs = {
|
|
|
814
821
|
tags: [FLOW_SURFACES_TAG],
|
|
815
822
|
summary: "Add multiple fields sequentially under the same target",
|
|
816
823
|
description: valuesCompatibilityNote(
|
|
817
|
-
"Creates multiple fields sequentially under the same target. The request may either import one shared `template` or create explicit `fields[]`. Each item may include `settings`, and popup-capable fields may also include `popup` directly for local popup content or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. Raw `wrapperProps` / `fieldProps` / `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Partial-success semantics apply: a failure in one item does not roll back the others. Results are returned in input order as `index/key/ok/result/error`, and each `error` always includes `message/type/code/status`."
|
|
824
|
+
"Creates multiple fields sequentially under the same target. The request may either import one shared `template` or create explicit `fields[]`. Each item may include `settings`, and popup-capable fields may also include `popup` directly for local popup content or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. When `popup.template` is present, `popup.title` still applies, while local `popup.mode` / `popup.blocks` / `popup.layout` are accepted but ignored. Raw `wrapperProps` / `fieldProps` / `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Partial-success semantics apply: a failure in one item does not roll back the others. Results are returned in input order as `index/key/ok/result/error`, and each `error` always includes `message/type/code/status`."
|
|
818
825
|
),
|
|
819
826
|
requestBody: requestBody("FlowSurfaceAddFieldsRequest", import_flow_surfaces.flowSurfaceExamples.addFields),
|
|
820
827
|
responses: responses("FlowSurfaceAddFieldsResult")
|
|
@@ -823,7 +830,7 @@ const actionDocs = {
|
|
|
823
830
|
tags: [FLOW_SURFACES_TAG],
|
|
824
831
|
summary: "Add multiple non-record actions sequentially under the same target",
|
|
825
832
|
description: valuesCompatibilityNote(
|
|
826
|
-
"Creates multiple non-record actions sequentially under the same target. Each item may include `settings`, and popup-capable actions may also include `popup
|
|
833
|
+
"Creates multiple non-record actions sequentially under the same target. Each item may include `settings`, and popup-capable actions may also include `popup` directly for local popup content or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. When `popup.template` is present, `popup.title` still applies, while local `popup.mode` / `popup.blocks` / `popup.layout` are accepted but ignored. Raw `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Partial-success semantics apply. Record actions do not belong to this entry and should use `addRecordActions` instead. Each failed item always returns an `error` with `message/type/code/status`."
|
|
827
834
|
),
|
|
828
835
|
requestBody: requestBody("FlowSurfaceAddActionsRequest", import_flow_surfaces.flowSurfaceExamples.addActions),
|
|
829
836
|
responses: responses("FlowSurfaceAddActionsResult")
|
|
@@ -832,9 +839,26 @@ const actionDocs = {
|
|
|
832
839
|
tags: [FLOW_SURFACES_TAG],
|
|
833
840
|
summary: "Add multiple record actions sequentially under the same record-capable owner target",
|
|
834
841
|
description: valuesCompatibilityNote(
|
|
835
|
-
|
|
842
|
+
`Creates multiple record actions sequentially under the same target. The target must be a record-capable owner target, and the server resolves the canonical record-action container automatically. Do not pass internal container uids such as a table actions column or a list/gridCard item. ${ADD_CHILD_TREE_TABLE_NOTE} Each item may include \`settings\`, and popup-capable actions may also include \`popup\` directly for local popup content or \`popup.template\` to reuse a saved popup template in \`reference\` / \`copy\` mode. When \`popup.template\` is present, \`popup.title\` still applies, while local \`popup.mode\` / \`popup.blocks\` / \`popup.layout\` are accepted but ignored. Raw \`props\` / \`decoratorProps\` / \`stepParams\` / \`flowRegistry\` are not accepted. Partial-success semantics apply: a failure in one item does not roll back the others. Each failed item always returns an \`error\` with \`message/type/code/status\`.`
|
|
836
843
|
),
|
|
837
|
-
requestBody:
|
|
844
|
+
requestBody: {
|
|
845
|
+
required: true,
|
|
846
|
+
content: {
|
|
847
|
+
"application/json": {
|
|
848
|
+
schema: ref("FlowSurfaceAddRecordActionsRequest"),
|
|
849
|
+
examples: {
|
|
850
|
+
basic: {
|
|
851
|
+
summary: "Create multiple standard record actions under a table owner target",
|
|
852
|
+
value: import_flow_surfaces.flowSurfaceExamples.addRecordActions
|
|
853
|
+
},
|
|
854
|
+
addChild: {
|
|
855
|
+
summary: "Create addChild under a tree table owner target",
|
|
856
|
+
value: import_flow_surfaces.flowSurfaceExamples.addRecordAddChildActions
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
},
|
|
838
862
|
responses: responses("FlowSurfaceAddRecordActionsResult")
|
|
839
863
|
},
|
|
840
864
|
updateSettings: {
|
|
@@ -3072,7 +3096,8 @@ const schemas = {
|
|
|
3072
3096
|
FlowSurfaceApplyBlueprintActionSpec: {
|
|
3073
3097
|
oneOf: [
|
|
3074
3098
|
{
|
|
3075
|
-
type: "string"
|
|
3099
|
+
type: "string",
|
|
3100
|
+
enum: APPLY_BLUEPRINT_ACTION_TYPE_ENUM
|
|
3076
3101
|
},
|
|
3077
3102
|
{
|
|
3078
3103
|
type: "object",
|
|
@@ -3081,8 +3106,8 @@ const schemas = {
|
|
|
3081
3106
|
key: { type: "string" },
|
|
3082
3107
|
type: {
|
|
3083
3108
|
type: "string",
|
|
3084
|
-
enum:
|
|
3085
|
-
description:
|
|
3109
|
+
enum: APPLY_BLUEPRINT_ACTION_TYPE_ENUM,
|
|
3110
|
+
description: `Action type. On record-capable blocks (\`table\`, \`details\`, \`list\`, \`gridCard\`), record actions such as \`view\`, \`edit\`, \`updateRecord\`, \`delete\`, and \`duplicate\` should normally be authored under \`recordActions\`; applyBlueprint also auto-promotes those common record actions from \`actions\` for convenience. ${APPLY_BLUEPRINT_ADD_CHILD_NOTE} For custom \`edit\` popups, include exactly one \`editForm\` block inside popup.blocks.`
|
|
3086
3111
|
},
|
|
3087
3112
|
title: { type: "string" },
|
|
3088
3113
|
settings: ANY_OBJECT_SCHEMA,
|
|
@@ -3097,7 +3122,8 @@ const schemas = {
|
|
|
3097
3122
|
FlowSurfaceApplyBlueprintRecordActionSpec: {
|
|
3098
3123
|
oneOf: [
|
|
3099
3124
|
{
|
|
3100
|
-
type: "string"
|
|
3125
|
+
type: "string",
|
|
3126
|
+
enum: RECORD_ACTION_TYPE_ENUM
|
|
3101
3127
|
},
|
|
3102
3128
|
{
|
|
3103
3129
|
type: "object",
|
|
@@ -3107,7 +3133,7 @@ const schemas = {
|
|
|
3107
3133
|
type: {
|
|
3108
3134
|
type: "string",
|
|
3109
3135
|
enum: RECORD_ACTION_TYPE_ENUM,
|
|
3110
|
-
description:
|
|
3136
|
+
description: `Record-action type for record-capable blocks such as \`table\`, \`details\`, \`list\`, and \`gridCard\`. ${ADD_CHILD_TREE_TABLE_NOTE} For custom \`edit\` popups, include exactly one \`editForm\` block inside popup.blocks.`
|
|
3111
3137
|
},
|
|
3112
3138
|
title: { type: "string" },
|
|
3113
3139
|
settings: ANY_OBJECT_SCHEMA,
|
|
@@ -3157,7 +3183,7 @@ const schemas = {
|
|
|
3157
3183
|
},
|
|
3158
3184
|
actions: {
|
|
3159
3185
|
type: "array",
|
|
3160
|
-
description:
|
|
3186
|
+
description: `Block-level actions. On record-capable blocks, \`view\`, \`edit\`, \`updateRecord\`, \`delete\`, and \`duplicate\` should normally go to \`recordActions\`; applyBlueprint auto-promotes those common record actions when they are written here. ${APPLY_BLUEPRINT_ADD_CHILD_NOTE}`,
|
|
3161
3187
|
items: ref("FlowSurfaceApplyBlueprintActionSpec")
|
|
3162
3188
|
},
|
|
3163
3189
|
recordActions: {
|
package/dist/swagger/index.d.ts
CHANGED
|
@@ -1771,6 +1771,7 @@ declare const _default: {
|
|
|
1771
1771
|
FlowSurfaceApplyBlueprintActionSpec: {
|
|
1772
1772
|
oneOf: ({
|
|
1773
1773
|
type: string;
|
|
1774
|
+
enum: string[];
|
|
1774
1775
|
required?: undefined;
|
|
1775
1776
|
properties?: undefined;
|
|
1776
1777
|
additionalProperties?: undefined;
|
|
@@ -1804,11 +1805,13 @@ declare const _default: {
|
|
|
1804
1805
|
};
|
|
1805
1806
|
};
|
|
1806
1807
|
additionalProperties: boolean;
|
|
1808
|
+
enum?: undefined;
|
|
1807
1809
|
})[];
|
|
1808
1810
|
};
|
|
1809
1811
|
FlowSurfaceApplyBlueprintRecordActionSpec: {
|
|
1810
1812
|
oneOf: ({
|
|
1811
1813
|
type: string;
|
|
1814
|
+
enum: string[];
|
|
1812
1815
|
required?: undefined;
|
|
1813
1816
|
properties?: undefined;
|
|
1814
1817
|
additionalProperties?: undefined;
|
|
@@ -1842,6 +1845,7 @@ declare const _default: {
|
|
|
1842
1845
|
};
|
|
1843
1846
|
};
|
|
1844
1847
|
additionalProperties: boolean;
|
|
1848
|
+
enum?: undefined;
|
|
1845
1849
|
})[];
|
|
1846
1850
|
};
|
|
1847
1851
|
FlowSurfaceApplyBlueprintBlockSpec: {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "前端流引擎",
|
|
5
5
|
"description": "",
|
|
6
6
|
"description.zh-CN": "",
|
|
7
|
-
"version": "2.1.0-alpha.
|
|
7
|
+
"version": "2.1.0-alpha.18",
|
|
8
8
|
"main": "./dist/server/index.js",
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"devDependencies": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@nocobase/test": "2.x",
|
|
25
25
|
"@nocobase/utils": "2.x"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "e75843d4c557117bbcced047b88ed11d601ff86d"
|
|
28
28
|
}
|