@nocobase/plugin-flow-engine 2.1.0-beta.22 → 2.1.0-beta.24
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 +8 -8
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +0 -1
- package/dist/server/flow-surfaces/catalog.js +1 -0
- package/dist/server/flow-surfaces/compose-compiler.d.ts +0 -1
- package/dist/server/flow-surfaces/compose-compiler.js +0 -1
- package/dist/server/flow-surfaces/configure-options.js +0 -4
- package/dist/server/flow-surfaces/contract-guard.js +11 -3
- package/dist/server/flow-surfaces/field-type-resolver.d.ts +0 -1
- package/dist/server/flow-surfaces/field-type-resolver.js +3 -13
- package/dist/server/flow-surfaces/public-compatibility.d.ts +16 -0
- package/dist/server/flow-surfaces/public-compatibility.js +139 -0
- package/dist/server/flow-surfaces/service-utils.d.ts +0 -1
- package/dist/server/flow-surfaces/service-utils.js +0 -6
- package/dist/server/flow-surfaces/service.d.ts +12 -0
- package/dist/server/flow-surfaces/service.js +360 -68
- package/dist/swagger/flow-surfaces.d.ts +0 -29
- package/dist/swagger/flow-surfaces.js +2 -11
- package/dist/swagger/index.d.ts +0 -29
- 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-beta.
|
|
11
|
+
"@nocobase/client": "2.1.0-beta.24",
|
|
12
12
|
"lodash": "4.18.1",
|
|
13
|
-
"@nocobase/database": "2.1.0-beta.
|
|
14
|
-
"@nocobase/data-source-manager": "2.1.0-beta.
|
|
15
|
-
"@nocobase/resourcer": "2.1.0-beta.
|
|
16
|
-
"@nocobase/utils": "2.1.0-beta.
|
|
17
|
-
"@nocobase/cache": "2.1.0-beta.
|
|
18
|
-
"@nocobase/plugin-localization": "2.1.0-beta.
|
|
19
|
-
"@nocobase/server": "2.1.0-beta.
|
|
20
|
-
"@nocobase/actions": "2.1.0-beta.
|
|
13
|
+
"@nocobase/database": "2.1.0-beta.24",
|
|
14
|
+
"@nocobase/data-source-manager": "2.1.0-beta.24",
|
|
15
|
+
"@nocobase/resourcer": "2.1.0-beta.24",
|
|
16
|
+
"@nocobase/utils": "2.1.0-beta.24",
|
|
17
|
+
"@nocobase/cache": "2.1.0-beta.24",
|
|
18
|
+
"@nocobase/plugin-localization": "2.1.0-beta.24",
|
|
19
|
+
"@nocobase/server": "2.1.0-beta.24",
|
|
20
|
+
"@nocobase/actions": "2.1.0-beta.24",
|
|
21
21
|
"@formily/json-schema": "2.3.7",
|
|
22
|
-
"@nocobase/ai": "2.1.0-beta.
|
|
22
|
+
"@nocobase/ai": "2.1.0-beta.24"
|
|
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-29T08:16:19.164Z"}
|
|
@@ -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-29T08:16:20.198Z"}
|
|
@@ -45,6 +45,7 @@ var import_errors = require("../errors");
|
|
|
45
45
|
var import_service_utils = require("../service-utils");
|
|
46
46
|
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
|
+
var import_public_compatibility = require("../public-compatibility");
|
|
48
49
|
var import_defaults = require("./defaults");
|
|
49
50
|
var import_private_utils = require("./private-utils");
|
|
50
51
|
var import_field_type_resolver = require("../field-type-resolver");
|
|
@@ -94,7 +95,6 @@ const APPLY_BLUEPRINT_FIELD_ALLOWED_KEYS = [
|
|
|
94
95
|
"type",
|
|
95
96
|
"fieldType",
|
|
96
97
|
"fields",
|
|
97
|
-
"selectorFields",
|
|
98
98
|
"titleField",
|
|
99
99
|
"openMode",
|
|
100
100
|
"popupSize",
|
|
@@ -874,10 +874,6 @@ function compileField(input, index, scopePrefix, assets, localBlockKeys, context
|
|
|
874
874
|
const syntheticType = (0, import_private_utils.readOptionalString)(input.type);
|
|
875
875
|
const fieldType = (0, import_field_type_resolver.normalizePublicFieldType)(input.fieldType, `${context}[${index}]`);
|
|
876
876
|
const fields = (0, import_field_type_resolver.normalizePublicFieldNameList)(input.fields, `${context}[${index}].fields`);
|
|
877
|
-
const selectorFields = (0, import_field_type_resolver.normalizePublicFieldNameList)(
|
|
878
|
-
input.selectorFields,
|
|
879
|
-
`${context}[${index}].selectorFields`
|
|
880
|
-
);
|
|
881
877
|
if (!fieldPath && !syntheticType) {
|
|
882
878
|
(0, import_errors.throwBadRequest)(`${context}[${index}] requires field or type`);
|
|
883
879
|
}
|
|
@@ -905,7 +901,6 @@ function compileField(input, index, scopePrefix, assets, localBlockKeys, context
|
|
|
905
901
|
type: syntheticType,
|
|
906
902
|
fieldType,
|
|
907
903
|
fields,
|
|
908
|
-
selectorFields,
|
|
909
904
|
titleField: (0, import_private_utils.readOptionalString)(input.titleField),
|
|
910
905
|
openMode: (0, import_private_utils.readOptionalString)(input.openMode),
|
|
911
906
|
popupSize: (0, import_private_utils.readOptionalString)(input.popupSize),
|
|
@@ -1021,11 +1016,16 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
|
|
|
1021
1016
|
if (!key) {
|
|
1022
1017
|
(0, import_errors.throwBadRequest)(`${blockContext} key '${localKey}' is missing after block key compilation`);
|
|
1023
1018
|
}
|
|
1024
|
-
const
|
|
1019
|
+
const blockType = (0, import_private_utils.readOptionalString)(block.type);
|
|
1020
|
+
let settings = resolveAssetSettings(block.settings, block, assets, blockContext);
|
|
1025
1021
|
if ((0, import_private_utils.readOptionalString)(block.title) && import_lodash.default.isUndefined(settings.title)) {
|
|
1026
1022
|
settings.title = (0, import_private_utils.readOptionalString)(block.title);
|
|
1027
1023
|
}
|
|
1028
|
-
|
|
1024
|
+
settings = (0, import_public_compatibility.normalizeFlowSurfacePublicSortingAlias)({
|
|
1025
|
+
context: `${blockContext}.settings`,
|
|
1026
|
+
type: blockType,
|
|
1027
|
+
settings
|
|
1028
|
+
});
|
|
1029
1029
|
const template = ensureOptionalTemplate(block.template, `${blockContext}.template`);
|
|
1030
1030
|
const blockDefaultFilter = (0, import_public_data_surface_default_filter.normalizeFlowSurfacePublicBlockDefaultFilter)("applyBlueprint", block.defaultFilter, {
|
|
1031
1031
|
blockType,
|
|
@@ -2434,6 +2434,7 @@ const NODE_CONTRACT_ENTRIES = [
|
|
|
2434
2434
|
["TriggerBlockGridModel", GRID_NODE_CONTRACT],
|
|
2435
2435
|
["ApprovalBlockGridModel", GRID_NODE_CONTRACT],
|
|
2436
2436
|
["TableBlockModel", TABLE_BLOCK_CONTRACT],
|
|
2437
|
+
["TableSelectModel", TABLE_BLOCK_CONTRACT],
|
|
2437
2438
|
["CalendarBlockModel", CALENDAR_BLOCK_CONTRACT],
|
|
2438
2439
|
["TreeBlockModel", TREE_BLOCK_CONTRACT],
|
|
2439
2440
|
["KanbanBlockModel", KANBAN_BLOCK_CONTRACT],
|
|
@@ -125,7 +125,6 @@ function buildComposeFieldCreatePayload(fieldSpec) {
|
|
|
125
125
|
...fieldSpec.type ? { type: fieldSpec.type } : {},
|
|
126
126
|
...fieldSpec.fieldType ? { fieldType: fieldSpec.fieldType } : {},
|
|
127
127
|
...typeof fieldSpec.fields !== "undefined" ? { fields: fieldSpec.fields } : {},
|
|
128
|
-
...typeof fieldSpec.selectorFields !== "undefined" ? { selectorFields: fieldSpec.selectorFields } : {},
|
|
129
128
|
...fieldSpec.titleField ? { titleField: fieldSpec.titleField } : {},
|
|
130
129
|
...fieldSpec.openMode ? { openMode: fieldSpec.openMode } : {},
|
|
131
130
|
...fieldSpec.popupSize ? { popupSize: fieldSpec.popupSize } : {},
|
|
@@ -108,13 +108,9 @@ const FIELD_TYPE = stringOption("Public relation field presentation type", {
|
|
|
108
108
|
const RELATION_FIELDS = arrayOption("Relation target fields", {
|
|
109
109
|
example: ["title", "name"]
|
|
110
110
|
});
|
|
111
|
-
const SELECTOR_FIELDS = arrayOption("Record picker selector fields", {
|
|
112
|
-
example: ["title", "code"]
|
|
113
|
-
});
|
|
114
111
|
const RELATION_FIELD_TYPE_OPTIONS = {
|
|
115
112
|
fieldType: FIELD_TYPE,
|
|
116
113
|
fields: RELATION_FIELDS,
|
|
117
|
-
selectorFields: SELECTOR_FIELDS,
|
|
118
114
|
openMode: stringOption("Popup open mode", { example: "drawer" }),
|
|
119
115
|
popupSize: stringOption("Popup size", { example: "medium" }),
|
|
120
116
|
pageSize: numberOption("Page size", { example: 10 }),
|
|
@@ -53,7 +53,7 @@ class FlowSurfaceContractGuard {
|
|
|
53
53
|
if (!Object.keys(nextValue).length) {
|
|
54
54
|
return {};
|
|
55
55
|
}
|
|
56
|
-
return contract.mergeStrategy === "replace" ? import_lodash.default.cloneDeep(nextValue) :
|
|
56
|
+
return contract.mergeStrategy === "replace" ? import_lodash.default.cloneDeep(nextValue) : mergeFlowSurfaceSettingsValue(currentValue || {}, nextValue);
|
|
57
57
|
}
|
|
58
58
|
if (contract.groups) {
|
|
59
59
|
const unknownGroups = Object.keys(nextValue).filter((key) => !contract.allowedKeys.includes(key));
|
|
@@ -108,7 +108,7 @@ class FlowSurfaceContractGuard {
|
|
|
108
108
|
)}`
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
|
-
next2[groupKey] = groupContract.mergeStrategy === "replace" ? import_lodash.default.cloneDeep(normalizedValue2) :
|
|
111
|
+
next2[groupKey] = groupContract.mergeStrategy === "replace" ? import_lodash.default.cloneDeep(normalizedValue2) : mergeFlowSurfaceSettingsValue((currentValue == null ? void 0 : currentValue[groupKey]) || {}, normalizedValue2);
|
|
112
112
|
});
|
|
113
113
|
return next2;
|
|
114
114
|
}
|
|
@@ -135,7 +135,7 @@ class FlowSurfaceContractGuard {
|
|
|
135
135
|
}
|
|
136
136
|
const next = import_lodash.default.cloneDeep(currentValue || {});
|
|
137
137
|
Object.entries(normalizedValue).forEach(([key, value]) => {
|
|
138
|
-
next[key] = contract.mergeStrategy === "replace" || !import_lodash.default.isPlainObject(value) || !Object.keys(value).length ? import_lodash.default.cloneDeep(value) :
|
|
138
|
+
next[key] = contract.mergeStrategy === "replace" || !import_lodash.default.isPlainObject(value) || !Object.keys(value).length ? import_lodash.default.cloneDeep(value) : mergeFlowSurfaceSettingsValue((currentValue == null ? void 0 : currentValue[key]) || {}, value);
|
|
139
139
|
});
|
|
140
140
|
return next;
|
|
141
141
|
}
|
|
@@ -275,6 +275,14 @@ class FlowSurfaceContractGuard {
|
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
+
function mergeFlowSurfaceSettingsValue(currentValue, nextValue) {
|
|
279
|
+
return import_lodash.default.mergeWith({}, currentValue || {}, nextValue, (_current, next) => {
|
|
280
|
+
if (Array.isArray(next)) {
|
|
281
|
+
return import_lodash.default.cloneDeep(next);
|
|
282
|
+
}
|
|
283
|
+
return void 0;
|
|
284
|
+
});
|
|
285
|
+
}
|
|
278
286
|
function matchesContractPath(pattern, path) {
|
|
279
287
|
if (pattern === "*") {
|
|
280
288
|
return true;
|
|
@@ -93,6 +93,7 @@ const FIELD_USE_TO_PUBLIC_FIELD_TYPE = {
|
|
|
93
93
|
PopupSubTableFieldModel: "popupSubTable"
|
|
94
94
|
};
|
|
95
95
|
const FIELD_TYPES_WITH_FIELDS = /* @__PURE__ */ new Set([
|
|
96
|
+
"picker",
|
|
96
97
|
"subForm",
|
|
97
98
|
"subFormList",
|
|
98
99
|
"subDetails",
|
|
@@ -100,7 +101,6 @@ const FIELD_TYPES_WITH_FIELDS = /* @__PURE__ */ new Set([
|
|
|
100
101
|
"subTable",
|
|
101
102
|
"popupSubTable"
|
|
102
103
|
]);
|
|
103
|
-
const FIELD_TYPES_WITH_SELECTOR_FIELDS = /* @__PURE__ */ new Set(["picker"]);
|
|
104
104
|
const FIELD_TYPES_WITH_TABLE_PROPS = /* @__PURE__ */ new Set(["subTable", "popupSubTable"]);
|
|
105
105
|
function assertNoInternalFieldKeys(input, context) {
|
|
106
106
|
if (!import_lodash.default.isPlainObject(input)) {
|
|
@@ -250,16 +250,9 @@ function resolveRelationFieldType(input) {
|
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
const explicitFields = normalizePublicFieldNameList(input.fields, `${input.context}.fields`);
|
|
253
|
-
const explicitSelectorFields = normalizePublicFieldNameList(input.selectorFields, `${input.context}.selectorFields`);
|
|
254
|
-
if (explicitFields && explicitSelectorFields) {
|
|
255
|
-
(0, import_errors.throwBadRequest)(`flowSurfaces ${input.context} cannot mix fields and selectorFields on the same field`);
|
|
256
|
-
}
|
|
257
253
|
if (explicitFields && !FIELD_TYPES_WITH_FIELDS.has(fieldType)) {
|
|
258
254
|
(0, import_errors.throwBadRequest)(`flowSurfaces ${input.context} fieldType '${fieldType}' does not support fields`);
|
|
259
255
|
}
|
|
260
|
-
if (explicitSelectorFields && !FIELD_TYPES_WITH_SELECTOR_FIELDS.has(fieldType)) {
|
|
261
|
-
(0, import_errors.throwBadRequest)(`flowSurfaces ${input.context} fieldType '${fieldType}' does not support selectorFields`);
|
|
262
|
-
}
|
|
263
256
|
if ((!import_lodash.default.isUndefined(input.openMode) || !import_lodash.default.isUndefined(input.popupSize)) && fieldType !== "picker") {
|
|
264
257
|
(0, import_errors.throwBadRequest)(`flowSurfaces ${input.context} fieldType '${fieldType}' does not support openMode or popupSize`);
|
|
265
258
|
}
|
|
@@ -268,15 +261,12 @@ function resolveRelationFieldType(input) {
|
|
|
268
261
|
}
|
|
269
262
|
const shouldApplyDefaults = input.applyDefaults !== false;
|
|
270
263
|
const defaultTargetField = shouldApplyDefaults ? pickCollectionFallbackFieldName(targetCollection) : void 0;
|
|
271
|
-
const fields = explicitFields ?? (shouldApplyDefaults && usesNestedRelationFields(fieldUse) ? [defaultTargetField] : void 0);
|
|
272
|
-
const selectorFields =
|
|
264
|
+
const fields = explicitFields ?? (shouldApplyDefaults && (usesNestedRelationFields(fieldUse) || fieldType === "picker") ? [defaultTargetField] : void 0);
|
|
265
|
+
const selectorFields = ["picker", "popupSubTable"].includes(fieldType) ? fields : void 0;
|
|
273
266
|
const titleField = import_lodash.default.isUndefined(input.titleField) ? defaultTargetField : String(input.titleField || "").trim() || void 0;
|
|
274
267
|
if (fields == null ? void 0 : fields.length) {
|
|
275
268
|
assertTargetFieldNamesExist(targetCollection, fields, `${input.context}.fields`);
|
|
276
269
|
}
|
|
277
|
-
if (selectorFields == null ? void 0 : selectorFields.length) {
|
|
278
|
-
assertTargetFieldNamesExist(targetCollection, selectorFields, `${input.context}.selectorFields`);
|
|
279
|
-
}
|
|
280
270
|
if (titleField && !(0, import_service_helpers.resolveFieldFromCollection)(targetCollection, titleField)) {
|
|
281
271
|
(0, import_errors.throwBadRequest)(
|
|
282
272
|
`flowSurfaces ${input.context}.titleField '${titleField}' does not exist on relation target collection`
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
type NormalizeSortingAliasInput = {
|
|
10
|
+
context: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
use?: string;
|
|
13
|
+
settings?: any;
|
|
14
|
+
};
|
|
15
|
+
export declare function normalizeFlowSurfacePublicSortingAlias(input: NormalizeSortingAliasInput): any;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,139 @@
|
|
|
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 __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var public_compatibility_exports = {};
|
|
38
|
+
__export(public_compatibility_exports, {
|
|
39
|
+
normalizeFlowSurfacePublicSortingAlias: () => normalizeFlowSurfacePublicSortingAlias
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(public_compatibility_exports);
|
|
42
|
+
var import_lodash = __toESM(require("lodash"));
|
|
43
|
+
var import_configure_options = require("./configure-options");
|
|
44
|
+
var import_errors = require("./errors");
|
|
45
|
+
var import_support_matrix = require("./support-matrix");
|
|
46
|
+
function resolveBlockUse(input) {
|
|
47
|
+
var _a;
|
|
48
|
+
const explicitUse = String(input.use || "").trim();
|
|
49
|
+
if (explicitUse) {
|
|
50
|
+
return explicitUse;
|
|
51
|
+
}
|
|
52
|
+
const typeOrUse = String(input.type || "").trim();
|
|
53
|
+
if (!typeOrUse) {
|
|
54
|
+
return void 0;
|
|
55
|
+
}
|
|
56
|
+
if (import_support_matrix.FLOW_SURFACE_BLOCK_SUPPORT_BY_USE.has(typeOrUse)) {
|
|
57
|
+
return typeOrUse;
|
|
58
|
+
}
|
|
59
|
+
return ((_a = import_support_matrix.FLOW_SURFACE_BLOCK_SUPPORT_BY_KEY.get(typeOrUse)) == null ? void 0 : _a.modelUse) || typeOrUse;
|
|
60
|
+
}
|
|
61
|
+
function blockSupportsSorting(use) {
|
|
62
|
+
return !!use && (0, import_configure_options.getConfigureOptionKeysForUse)(use).includes("sorting");
|
|
63
|
+
}
|
|
64
|
+
function normalizeSortingDirection(input, context) {
|
|
65
|
+
const normalized = String(input || "").trim().toLowerCase();
|
|
66
|
+
if (!normalized || normalized === "asc" || normalized === "ascend" || normalized === "ascending") {
|
|
67
|
+
return "asc";
|
|
68
|
+
}
|
|
69
|
+
if (normalized === "desc" || normalized === "descend" || normalized === "descending") {
|
|
70
|
+
return "desc";
|
|
71
|
+
}
|
|
72
|
+
(0, import_errors.throwBadRequest)(`${context} must be 'asc' or 'desc'`);
|
|
73
|
+
}
|
|
74
|
+
function normalizeSortingField(input, context) {
|
|
75
|
+
const field = String(input || "").trim();
|
|
76
|
+
if (!field) {
|
|
77
|
+
(0, import_errors.throwBadRequest)(`${context} must be a non-empty field name`);
|
|
78
|
+
}
|
|
79
|
+
return field;
|
|
80
|
+
}
|
|
81
|
+
function normalizeSortingEntry(input, context) {
|
|
82
|
+
if (import_lodash.default.isString(input)) {
|
|
83
|
+
const value = input.trim();
|
|
84
|
+
if (!value) {
|
|
85
|
+
(0, import_errors.throwBadRequest)(`${context} must be a non-empty sort field`);
|
|
86
|
+
}
|
|
87
|
+
const descending = value.startsWith("-");
|
|
88
|
+
const field = descending ? value.slice(1).trim() : value;
|
|
89
|
+
return {
|
|
90
|
+
field: normalizeSortingField(field, context),
|
|
91
|
+
direction: descending ? "desc" : "asc"
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
if (!import_lodash.default.isPlainObject(input)) {
|
|
95
|
+
(0, import_errors.throwBadRequest)(`${context} must be a string or an object with field and direction`);
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
field: normalizeSortingField(input.field, `${context}.field`),
|
|
99
|
+
direction: normalizeSortingDirection(input.direction, `${context}.direction`)
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function normalizeSortingArray(input, context) {
|
|
103
|
+
if (!Array.isArray(input)) {
|
|
104
|
+
(0, import_errors.throwBadRequest)(`${context} must be an array`);
|
|
105
|
+
}
|
|
106
|
+
return input.map((item, index) => normalizeSortingEntry(item, `${context}[${index}]`));
|
|
107
|
+
}
|
|
108
|
+
function normalizeFlowSurfacePublicSortingAlias(input) {
|
|
109
|
+
if (import_lodash.default.isUndefined(input.settings)) {
|
|
110
|
+
return input.settings;
|
|
111
|
+
}
|
|
112
|
+
if (!import_lodash.default.isPlainObject(input.settings)) {
|
|
113
|
+
(0, import_errors.throwBadRequest)(`${input.context} must be an object`);
|
|
114
|
+
}
|
|
115
|
+
if (!Object.prototype.hasOwnProperty.call(input.settings, "sort")) {
|
|
116
|
+
return input.settings;
|
|
117
|
+
}
|
|
118
|
+
const use = resolveBlockUse(input);
|
|
119
|
+
if (!blockSupportsSorting(use)) {
|
|
120
|
+
return input.settings;
|
|
121
|
+
}
|
|
122
|
+
const nextSettings = import_lodash.default.cloneDeep(input.settings);
|
|
123
|
+
const sortingFromSort = normalizeSortingArray(nextSettings.sort, `${input.context}.sort`);
|
|
124
|
+
if (Object.prototype.hasOwnProperty.call(nextSettings, "sorting")) {
|
|
125
|
+
const canonicalSorting = normalizeSortingArray(nextSettings.sorting, `${input.context}.sorting`);
|
|
126
|
+
if (!import_lodash.default.isEqual(sortingFromSort, canonicalSorting)) {
|
|
127
|
+
(0, import_errors.throwBadRequest)(`${input.context}.sort conflicts with ${input.context}.sorting; use canonical sorting`);
|
|
128
|
+
}
|
|
129
|
+
nextSettings.sorting = canonicalSorting;
|
|
130
|
+
} else {
|
|
131
|
+
nextSettings.sorting = sortingFromSort;
|
|
132
|
+
}
|
|
133
|
+
delete nextSettings.sort;
|
|
134
|
+
return nextSettings;
|
|
135
|
+
}
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {
|
|
138
|
+
normalizeFlowSurfacePublicSortingAlias
|
|
139
|
+
});
|
|
@@ -388,10 +388,6 @@ function normalizeComposeFieldSpec(input, index) {
|
|
|
388
388
|
const renderer = typeof input.renderer === "undefined" ? void 0 : String(input.renderer || "").trim();
|
|
389
389
|
const fieldType = (0, import_field_type_resolver.normalizePublicFieldType)(input.fieldType, `compose field #${index + 1}`);
|
|
390
390
|
const fields = (0, import_field_type_resolver.normalizePublicFieldNameList)(input.fields, `compose field #${index + 1}.fields`);
|
|
391
|
-
const selectorFields = (0, import_field_type_resolver.normalizePublicFieldNameList)(
|
|
392
|
-
input.selectorFields,
|
|
393
|
-
`compose field #${index + 1}.selectorFields`
|
|
394
|
-
);
|
|
395
391
|
const titleField = typeof input.titleField === "undefined" ? void 0 : String(input.titleField || "").trim();
|
|
396
392
|
const openMode = typeof input.openMode === "undefined" ? void 0 : String(input.openMode || "").trim();
|
|
397
393
|
const popupSize = typeof input.popupSize === "undefined" ? void 0 : String(input.popupSize || "").trim();
|
|
@@ -423,7 +419,6 @@ function normalizeComposeFieldSpec(input, index) {
|
|
|
423
419
|
...semanticType ? { type: semanticType } : {},
|
|
424
420
|
...fieldType ? { fieldType } : {},
|
|
425
421
|
...!import_lodash.default.isUndefined(fields) ? { fields } : {},
|
|
426
|
-
...!import_lodash.default.isUndefined(selectorFields) ? { selectorFields } : {},
|
|
427
422
|
...titleField ? { titleField } : {},
|
|
428
423
|
...openMode ? { openMode } : {},
|
|
429
424
|
...popupSize ? { popupSize } : {},
|
|
@@ -665,7 +660,6 @@ function splitComposeFieldChanges(changes, wrapperUse) {
|
|
|
665
660
|
"name",
|
|
666
661
|
"fieldType",
|
|
667
662
|
"fields",
|
|
668
|
-
"selectorFields",
|
|
669
663
|
"titleField",
|
|
670
664
|
"openMode",
|
|
671
665
|
"popupSize",
|
|
@@ -77,6 +77,7 @@ export declare class FlowSurfacesService {
|
|
|
77
77
|
private patchResolvedNodeConfigureOptions;
|
|
78
78
|
private buildRelationFieldTypeCandidates;
|
|
79
79
|
private collectRelationNestedFieldPaths;
|
|
80
|
+
private collectRelationFieldPaths;
|
|
80
81
|
private collectRelationSelectorFieldPaths;
|
|
81
82
|
private projectCatalogItem;
|
|
82
83
|
private buildCatalogBlockItem;
|
|
@@ -86,6 +87,7 @@ export declare class FlowSurfacesService {
|
|
|
86
87
|
private isCatalogBlockVisibleForPopupProfile;
|
|
87
88
|
private getPopupCollectionBlockScenes;
|
|
88
89
|
private isPopupCollectionBlockSceneUnsupported;
|
|
90
|
+
private supportsPopupAssociatedRecordsBinding;
|
|
89
91
|
private isPopupCollectionBlockVisibleForScene;
|
|
90
92
|
private resolveFieldAssociationContextFromBinding;
|
|
91
93
|
private resolvePopupHostFieldAssociationContext;
|
|
@@ -104,6 +106,8 @@ export declare class FlowSurfacesService {
|
|
|
104
106
|
private assertRequiredBlockResourceInit;
|
|
105
107
|
private describeComposeBlock;
|
|
106
108
|
private resolvePopupCollectionBlockResourceInit;
|
|
109
|
+
private shouldUseLegacyAssociationPopupCurrentRecordBinding;
|
|
110
|
+
private shouldNormalizeLegacyAssociationPopupRecordBlockResource;
|
|
107
111
|
private compilePopupSemanticResourceInit;
|
|
108
112
|
private assertPopupRawResourceInit;
|
|
109
113
|
private validatePopupRawResourceInit;
|
|
@@ -541,6 +545,12 @@ export declare class FlowSurfacesService {
|
|
|
541
545
|
}>;
|
|
542
546
|
private syncFilterActionSettingsForUpdateSettings;
|
|
543
547
|
private syncMirroredStepParamsForUpdateSettings;
|
|
548
|
+
private syncUpdateActionAssignedValuesForUpdateSettings;
|
|
549
|
+
private syncUpdateActionAssignFormItems;
|
|
550
|
+
private ensureUpdateActionAssignForm;
|
|
551
|
+
private ensureUpdateActionAssignFormGrid;
|
|
552
|
+
private buildUpdateActionAssignFormItemTree;
|
|
553
|
+
private resolveUpdateActionAssignFormFieldUse;
|
|
544
554
|
private normalizeCanonicalBlockHeaderWriteForUpdateSettings;
|
|
545
555
|
private syncCanonicalBlockHeaderForUpdateSettings;
|
|
546
556
|
private stripLegacyBlockHeaderChromeForUpdateSettings;
|
|
@@ -690,6 +700,7 @@ export declare class FlowSurfacesService {
|
|
|
690
700
|
private configureFieldWrapper;
|
|
691
701
|
private configureFieldNode;
|
|
692
702
|
private normalizeFilterActionDefaultFilterValue;
|
|
703
|
+
private normalizeActionAssignValues;
|
|
693
704
|
private configureActionNode;
|
|
694
705
|
private normalizeActionPanelActionChanges;
|
|
695
706
|
private buildFieldCatalog;
|
|
@@ -824,6 +835,7 @@ export declare class FlowSurfacesService {
|
|
|
824
835
|
private ensureFieldGridSubModel;
|
|
825
836
|
private applyResolvedRelationFieldType;
|
|
826
837
|
private applyRecordPickerFieldTypeSettings;
|
|
838
|
+
private ensureRelationSelectorGridTable;
|
|
827
839
|
private buildExactFieldSettingsInitPayload;
|
|
828
840
|
private patchFieldSettingsInitExact;
|
|
829
841
|
private inferFieldComponentFlowDomain;
|