@nocobase/plugin-flow-engine 2.1.0-alpha.29 → 2.1.0-alpha.30
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.d.ts +2 -1
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +110 -14
- package/dist/server/flow-surfaces/blueprint/compile-plan.d.ts +2 -1
- package/dist/server/flow-surfaces/blueprint/compile-plan.js +8 -8
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +1 -0
- package/dist/server/flow-surfaces/builder.d.ts +1 -0
- package/dist/server/flow-surfaces/builder.js +44 -2
- package/dist/server/flow-surfaces/catalog.js +6 -3
- package/dist/server/flow-surfaces/default-block-actions.js +11 -10
- package/dist/server/flow-surfaces/placement.js +1 -0
- package/dist/server/flow-surfaces/public-compatibility.d.ts +12 -0
- package/dist/server/flow-surfaces/public-compatibility.js +24 -2
- package/dist/server/flow-surfaces/service.d.ts +16 -0
- package/dist/server/flow-surfaces/service.js +458 -97
- package/package.json +2 -2
package/dist/externalVersion.js
CHANGED
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.1.0-alpha.30",
|
|
12
12
|
"lodash": "4.18.1",
|
|
13
|
-
"@nocobase/database": "2.1.0-alpha.
|
|
14
|
-
"@nocobase/data-source-manager": "2.1.0-alpha.
|
|
15
|
-
"@nocobase/resourcer": "2.1.0-alpha.
|
|
16
|
-
"@nocobase/utils": "2.1.0-alpha.
|
|
17
|
-
"@nocobase/cache": "2.1.0-alpha.
|
|
18
|
-
"@nocobase/plugin-localization": "2.1.0-alpha.
|
|
19
|
-
"@nocobase/server": "2.1.0-alpha.
|
|
20
|
-
"@nocobase/actions": "2.1.0-alpha.
|
|
13
|
+
"@nocobase/database": "2.1.0-alpha.30",
|
|
14
|
+
"@nocobase/data-source-manager": "2.1.0-alpha.30",
|
|
15
|
+
"@nocobase/resourcer": "2.1.0-alpha.30",
|
|
16
|
+
"@nocobase/utils": "2.1.0-alpha.30",
|
|
17
|
+
"@nocobase/cache": "2.1.0-alpha.30",
|
|
18
|
+
"@nocobase/plugin-localization": "2.1.0-alpha.30",
|
|
19
|
+
"@nocobase/server": "2.1.0-alpha.30",
|
|
20
|
+
"@nocobase/actions": "2.1.0-alpha.30",
|
|
21
21
|
"@formily/json-schema": "2.3.7",
|
|
22
|
-
"@nocobase/ai": "2.1.0-alpha.
|
|
22
|
+
"@nocobase/ai": "2.1.0-alpha.30"
|
|
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-05-
|
|
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-05-06T11:13:43.577Z"}
|
|
@@ -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-05-
|
|
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-05-06T11:13:44.622Z"}
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import _ from 'lodash';
|
|
10
|
-
import type { FlowSurfaceApplyBlueprintDocument, FlowSurfaceApplyBlueprintLayout, FlowSurfaceApplyBlueprintTabDocument } from './public-types';
|
|
10
|
+
import type { FlowSurfaceApplyBlueprintCollectionResolver, FlowSurfaceApplyBlueprintDocument, FlowSurfaceApplyBlueprintLayout, FlowSurfaceApplyBlueprintTabDocument } from './public-types';
|
|
11
11
|
export declare function collectReferencedBlockKeys(layout: FlowSurfaceApplyBlueprintLayout | undefined, context: string): Set<string>;
|
|
12
12
|
export declare function compileTabComposeValues(tab: FlowSurfaceApplyBlueprintTabDocument, document: FlowSurfaceApplyBlueprintDocument, tabIndex: number, options: {
|
|
13
13
|
mode: 'append' | 'replace';
|
|
14
|
+
getCollection?: FlowSurfaceApplyBlueprintCollectionResolver;
|
|
14
15
|
}): _.Dictionary<any>;
|
|
@@ -48,6 +48,7 @@ var import_public_data_surface_default_filter = require("../public-data-surface-
|
|
|
48
48
|
var import_public_compatibility = require("../public-compatibility");
|
|
49
49
|
var import_defaults = require("./defaults");
|
|
50
50
|
var import_hidden_popup_contract = require("../hidden-popup-contract");
|
|
51
|
+
var import_service_helpers = require("../service-helpers");
|
|
51
52
|
var import_private_utils = require("./private-utils");
|
|
52
53
|
var import_field_type_resolver = require("../field-type-resolver");
|
|
53
54
|
const APPLY_BLUEPRINT_BLOCK_TYPE_ENUM = [
|
|
@@ -156,7 +157,7 @@ const APPLY_BLUEPRINT_AUTO_PROMOTED_RECORD_ACTION_TYPES = /* @__PURE__ */ new Se
|
|
|
156
157
|
"updateRecord",
|
|
157
158
|
"duplicate"
|
|
158
159
|
]);
|
|
159
|
-
const APPLY_BLUEPRINT_DEFAULT_POPUP_ACTION_TYPES = /* @__PURE__ */ new Set(["addNew", "view", "edit"]);
|
|
160
|
+
const APPLY_BLUEPRINT_DEFAULT_POPUP_ACTION_TYPES = /* @__PURE__ */ new Set(["addNew", "addChild", "view", "edit"]);
|
|
160
161
|
const APPLY_BLUEPRINT_BLOCK_TYPES = new Set(APPLY_BLUEPRINT_BLOCK_TYPE_ENUM);
|
|
161
162
|
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";
|
|
162
163
|
function assertNoBlockLevelLayout(input, context) {
|
|
@@ -741,6 +742,10 @@ function shouldAttachDefaultPopupMetadata(popup, itemType, options = {}) {
|
|
|
741
742
|
function attachCompiledPopupDefaults(popup, metadata) {
|
|
742
743
|
return (0, import_defaults.attachFlowSurfaceApplyBlueprintPopupDefaults)(popup, metadata);
|
|
743
744
|
}
|
|
745
|
+
function attachDefaultActionPopupMetadata(popup, actionType, metadata) {
|
|
746
|
+
const defaultPopup = actionType === "addChild" && import_lodash.default.isUndefined(popup) ? {} : popup;
|
|
747
|
+
return attachCompiledPopupDefaults(defaultPopup, metadata);
|
|
748
|
+
}
|
|
744
749
|
function compilePopup(popup, scopePrefix, assets, context, defaults, options = {}) {
|
|
745
750
|
if (import_lodash.default.isUndefined(popup)) {
|
|
746
751
|
return {};
|
|
@@ -784,7 +789,8 @@ function compilePopup(popup, scopePrefix, assets, context, defaults, options = {
|
|
|
784
789
|
assets,
|
|
785
790
|
`${context}.blocks`,
|
|
786
791
|
defaults,
|
|
787
|
-
collectReferencedBlockKeys(popup.layout, `${context}.layout`)
|
|
792
|
+
collectReferencedBlockKeys(popup.layout, `${context}.layout`),
|
|
793
|
+
options.getCollection
|
|
788
794
|
) : { blocks: [], blockKeysByLocalKey: /* @__PURE__ */ new Map() };
|
|
789
795
|
const layout = popupBlocks.length || popup.layout ? compileLayout(
|
|
790
796
|
popup.layout || autoLayoutFromBlockKeys(compiledBlocks.blocks.map((block) => block.key)),
|
|
@@ -873,7 +879,7 @@ function compileTreeConnectSettingsTargets(settings, localBlockKeys, context) {
|
|
|
873
879
|
});
|
|
874
880
|
return nextSettings;
|
|
875
881
|
}
|
|
876
|
-
function compileField(input, index, scopePrefix, assets, localBlockKeys, context, popupDefaultsMetadata, defaults) {
|
|
882
|
+
function compileField(input, index, scopePrefix, assets, localBlockKeys, context, popupDefaultsMetadata, defaults, getCollection) {
|
|
877
883
|
if (typeof input === "string") {
|
|
878
884
|
const fieldPath2 = (0, import_private_utils.assertNonEmptyString)(input, `${context}[${index}]`);
|
|
879
885
|
return {
|
|
@@ -909,7 +915,9 @@ function compileField(input, index, scopePrefix, assets, localBlockKeys, context
|
|
|
909
915
|
if ((0, import_private_utils.readOptionalString)(input.label) && import_lodash.default.isUndefined(settings.label)) {
|
|
910
916
|
settings.label = (0, import_private_utils.readOptionalString)(input.label);
|
|
911
917
|
}
|
|
912
|
-
const popupResult = compilePopup(input.popup, `${key}.popup`, assets, `${context}[${index}].popup`, defaults
|
|
918
|
+
const popupResult = compilePopup(input.popup, `${key}.popup`, assets, `${context}[${index}].popup`, defaults, {
|
|
919
|
+
getCollection
|
|
920
|
+
});
|
|
913
921
|
settings = resolvePopupTitleSettings(settings, popupResult.popupTitle);
|
|
914
922
|
const popup = shouldAttachDefaultPopupMetadata(input.popup, void 0) ? attachCompiledPopupDefaults(popupResult.popup, popupDefaultsMetadata) : popupResult.popup;
|
|
915
923
|
return (0, import_service_utils.buildDefinedPayload)({
|
|
@@ -930,13 +938,13 @@ function compileField(input, index, scopePrefix, assets, localBlockKeys, context
|
|
|
930
938
|
popup
|
|
931
939
|
});
|
|
932
940
|
}
|
|
933
|
-
function compileAction(input, index, scopePrefix, assets, context, popupDefaultsMetadata, defaults) {
|
|
941
|
+
function compileAction(input, index, scopePrefix, assets, context, popupDefaultsMetadata, defaults, getCollection) {
|
|
934
942
|
if (typeof input === "string") {
|
|
935
943
|
const type2 = (0, import_private_utils.assertNonEmptyString)(input, `${context}[${index}]`);
|
|
936
944
|
return {
|
|
937
945
|
key: (0, import_service_utils.normalizeFlowSurfaceComposeKey)((0, import_private_utils.buildScopedKey)(scopePrefix, `${type2}_${index + 1}`), `${context}[${index}]`),
|
|
938
946
|
type: type2,
|
|
939
|
-
...APPLY_BLUEPRINT_DEFAULT_POPUP_ACTION_TYPES.has(type2) ? { popup:
|
|
947
|
+
...APPLY_BLUEPRINT_DEFAULT_POPUP_ACTION_TYPES.has(type2) ? { popup: attachDefaultActionPopupMetadata(void 0, type2, popupDefaultsMetadata) } : {}
|
|
940
948
|
};
|
|
941
949
|
}
|
|
942
950
|
if (!import_lodash.default.isPlainObject(input)) {
|
|
@@ -951,10 +959,11 @@ function compileAction(input, index, scopePrefix, assets, context, popupDefaults
|
|
|
951
959
|
settings.title = (0, import_private_utils.readOptionalString)(input.title);
|
|
952
960
|
}
|
|
953
961
|
const popupResult = compilePopup(input.popup, `${key}.popup`, assets, `${context}[${index}].popup`, defaults, {
|
|
954
|
-
ownerActionType: type
|
|
962
|
+
ownerActionType: type,
|
|
963
|
+
getCollection
|
|
955
964
|
});
|
|
956
965
|
settings = resolvePopupTitleSettings(settings, popupResult.popupTitle);
|
|
957
|
-
const popup = shouldAttachDefaultPopupMetadata(input.popup, type) ?
|
|
966
|
+
const popup = shouldAttachDefaultPopupMetadata(input.popup, type) ? attachDefaultActionPopupMetadata(popupResult.popup, type, popupDefaultsMetadata) : popupResult.popup;
|
|
958
967
|
return (0, import_service_utils.buildDefinedPayload)({
|
|
959
968
|
key,
|
|
960
969
|
type,
|
|
@@ -974,7 +983,64 @@ function compileInjectedDefaultAction(descriptor, scopePrefix, context, index, p
|
|
|
974
983
|
popup
|
|
975
984
|
});
|
|
976
985
|
}
|
|
977
|
-
function
|
|
986
|
+
function isTreeCollection(collection) {
|
|
987
|
+
var _a;
|
|
988
|
+
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;
|
|
989
|
+
}
|
|
990
|
+
function resolveTreeChildrenFieldName(collection) {
|
|
991
|
+
const field = (0, import_service_helpers.getCollectionFields)(collection).find(
|
|
992
|
+
(candidate) => {
|
|
993
|
+
var _a;
|
|
994
|
+
return (candidate == null ? void 0 : candidate.treeChildren) === true || ((_a = candidate == null ? void 0 : candidate.options) == null ? void 0 : _a.treeChildren) === true;
|
|
995
|
+
}
|
|
996
|
+
);
|
|
997
|
+
return (0, import_service_helpers.getFieldName)(field);
|
|
998
|
+
}
|
|
999
|
+
function canInjectTreeTableAddChildDefault(block, getCollection) {
|
|
1000
|
+
if (!getCollection) {
|
|
1001
|
+
return false;
|
|
1002
|
+
}
|
|
1003
|
+
const resource = import_lodash.default.isPlainObject(block.resource) ? block.resource : void 0;
|
|
1004
|
+
const dataSourceKey = (0, import_private_utils.readOptionalString)(block.dataSourceKey) || (0, import_private_utils.readOptionalString)(resource == null ? void 0 : resource.dataSourceKey) || "main";
|
|
1005
|
+
const collectionName = (0, import_private_utils.readOptionalString)(block.collection) || (0, import_private_utils.readOptionalString)(resource == null ? void 0 : resource.collectionName);
|
|
1006
|
+
if (!collectionName) {
|
|
1007
|
+
return false;
|
|
1008
|
+
}
|
|
1009
|
+
const collection = getCollection(dataSourceKey, collectionName);
|
|
1010
|
+
if (!collection) {
|
|
1011
|
+
return false;
|
|
1012
|
+
}
|
|
1013
|
+
if (!isTreeCollection(collection)) {
|
|
1014
|
+
return false;
|
|
1015
|
+
}
|
|
1016
|
+
return !!resolveTreeChildrenFieldName(collection);
|
|
1017
|
+
}
|
|
1018
|
+
function hasExplicitAddChildRecordAction(recordActions) {
|
|
1019
|
+
return recordActions.some((action) => {
|
|
1020
|
+
if (typeof action === "string") {
|
|
1021
|
+
return action.trim() === "addChild";
|
|
1022
|
+
}
|
|
1023
|
+
return (0, import_private_utils.readOptionalString)(action == null ? void 0 : action.type) === "addChild";
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
function buildTreeTableAddChildDefaultAction(scopePrefix, context, index, popupDefaultsMetadata) {
|
|
1027
|
+
const descriptorPopup = {
|
|
1028
|
+
tryTemplate: true,
|
|
1029
|
+
[import_default_block_actions.FLOW_SURFACE_INTERNAL_AUTO_SAVE_DEFAULT_POPUP_TEMPLATE_KEY]: true
|
|
1030
|
+
};
|
|
1031
|
+
return compileInjectedDefaultAction(
|
|
1032
|
+
{
|
|
1033
|
+
type: "addChild",
|
|
1034
|
+
scope: "recordActions",
|
|
1035
|
+
popup: descriptorPopup
|
|
1036
|
+
},
|
|
1037
|
+
scopePrefix,
|
|
1038
|
+
context,
|
|
1039
|
+
index,
|
|
1040
|
+
popupDefaultsMetadata
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
function compileBlocks(input, scopePrefix, assets, context, defaults, requiredExplicitBlockKeys = /* @__PURE__ */ new Set(), getCollection) {
|
|
978
1044
|
const blockKeysByLocalKey = /* @__PURE__ */ new Map();
|
|
979
1045
|
const referencedBlockKeys = new Set(requiredExplicitBlockKeys);
|
|
980
1046
|
const rawBlocks = import_lodash.default.castArray(input || []);
|
|
@@ -1071,7 +1137,8 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
|
|
|
1071
1137
|
blockKeysByLocalKey,
|
|
1072
1138
|
`${blockContext}.fields`,
|
|
1073
1139
|
popupDefaultsMetadata,
|
|
1074
|
-
defaults
|
|
1140
|
+
defaults,
|
|
1141
|
+
getCollection
|
|
1075
1142
|
)
|
|
1076
1143
|
);
|
|
1077
1144
|
const fieldsLayout = Object.prototype.hasOwnProperty.call(block, "fieldsLayout") ? compileScopedLayout(
|
|
@@ -1082,11 +1149,30 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
|
|
|
1082
1149
|
) : buildAutoCompiledFieldsLayout(fields, (0, import_private_utils.readOptionalString)(block.type));
|
|
1083
1150
|
const { actions, recordActions } = splitApplyBlueprintBlockActionsByScope(block, blockContext);
|
|
1084
1151
|
const explicitActions = actions.map(
|
|
1085
|
-
(action, actionIndex) => compileAction(
|
|
1152
|
+
(action, actionIndex) => compileAction(
|
|
1153
|
+
action,
|
|
1154
|
+
actionIndex,
|
|
1155
|
+
key,
|
|
1156
|
+
assets,
|
|
1157
|
+
`${blockContext}.actions`,
|
|
1158
|
+
popupDefaultsMetadata,
|
|
1159
|
+
defaults,
|
|
1160
|
+
getCollection
|
|
1161
|
+
)
|
|
1086
1162
|
);
|
|
1087
1163
|
const explicitRecordActions = recordActions.map(
|
|
1088
|
-
(action, actionIndex) => compileAction(
|
|
1164
|
+
(action, actionIndex) => compileAction(
|
|
1165
|
+
action,
|
|
1166
|
+
actionIndex,
|
|
1167
|
+
key,
|
|
1168
|
+
assets,
|
|
1169
|
+
`${blockContext}.recordActions`,
|
|
1170
|
+
popupDefaultsMetadata,
|
|
1171
|
+
defaults,
|
|
1172
|
+
getCollection
|
|
1173
|
+
)
|
|
1089
1174
|
);
|
|
1175
|
+
const shouldInjectAddChild = blockType === "table" && import_lodash.default.isUndefined(template) && (settings == null ? void 0 : settings.treeTable) === true && canInjectTreeTableAddChildDefault(block, getCollection);
|
|
1090
1176
|
const injectedActionIndexes = {
|
|
1091
1177
|
actions: explicitActions.length,
|
|
1092
1178
|
recordActions: explicitRecordActions.length
|
|
@@ -1104,6 +1190,15 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
|
|
|
1104
1190
|
popupDefaultsMetadata
|
|
1105
1191
|
)
|
|
1106
1192
|
});
|
|
1193
|
+
const finalRecordActions = blockType === "table" && shouldInjectAddChild && !hasExplicitAddChildRecordAction(mergedActions.recordActions) ? [
|
|
1194
|
+
...mergedActions.recordActions,
|
|
1195
|
+
buildTreeTableAddChildDefaultAction(
|
|
1196
|
+
key,
|
|
1197
|
+
`${blockContext}.recordActions`,
|
|
1198
|
+
injectedActionIndexes.recordActions++,
|
|
1199
|
+
popupDefaultsMetadata
|
|
1200
|
+
)
|
|
1201
|
+
] : mergedActions.recordActions;
|
|
1107
1202
|
const actionsWithDefaultFilter = (0, import_public_data_surface_default_filter.backfillFlowSurfaceFilterActionDefaultFilter)(
|
|
1108
1203
|
mergedActions.actions,
|
|
1109
1204
|
blockDefaultFilter
|
|
@@ -1117,7 +1212,7 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
|
|
|
1117
1212
|
fields: blockType === "calendar" || blockType === "tree" ? void 0 : fields,
|
|
1118
1213
|
fieldsLayout: blockType === "calendar" || blockType === "kanban" || blockType === "tree" ? void 0 : fieldsLayout,
|
|
1119
1214
|
actions: blockType === "tree" ? void 0 : actionsWithDefaultFilter,
|
|
1120
|
-
recordActions: blockType === "calendar" || blockType === "kanban" || blockType === "tree" ? void 0 :
|
|
1215
|
+
recordActions: blockType === "calendar" || blockType === "kanban" || blockType === "tree" ? void 0 : finalRecordActions
|
|
1121
1216
|
});
|
|
1122
1217
|
});
|
|
1123
1218
|
return {
|
|
@@ -1135,7 +1230,8 @@ function compileTabComposeValues(tab, document, tabIndex, options) {
|
|
|
1135
1230
|
document.assets,
|
|
1136
1231
|
blocksPath,
|
|
1137
1232
|
document.defaults,
|
|
1138
|
-
collectReferencedBlockKeys(tab.layout, layoutPath)
|
|
1233
|
+
collectReferencedBlockKeys(tab.layout, layoutPath),
|
|
1234
|
+
options.getCollection
|
|
1139
1235
|
);
|
|
1140
1236
|
const layout = compileLayout(
|
|
1141
1237
|
tab.layout || autoLayoutFromBlockKeys(compiledBlocks.blocks.map((block) => block.key)),
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import type { FlowSurfaceApplyBlueprintDocument, FlowSurfaceApplyBlueprintProgram, FlowSurfaceApplyBlueprintReplaceTargetInfo } from './public-types';
|
|
9
|
+
import type { FlowSurfaceApplyBlueprintCollectionResolver, FlowSurfaceApplyBlueprintDocument, FlowSurfaceApplyBlueprintProgram, FlowSurfaceApplyBlueprintReplaceTargetInfo } from './public-types';
|
|
10
10
|
export declare function compileFlowSurfaceApplyBlueprintRequest(document: FlowSurfaceApplyBlueprintDocument, options?: {
|
|
11
11
|
replaceTarget?: FlowSurfaceApplyBlueprintReplaceTargetInfo;
|
|
12
|
+
getCollection?: FlowSurfaceApplyBlueprintCollectionResolver;
|
|
12
13
|
}): FlowSurfaceApplyBlueprintProgram;
|
|
13
14
|
export declare function resolveApplyBlueprintPageLocator(program: FlowSurfaceApplyBlueprintProgram, executeResult: Record<string, any> | undefined): import("../types").FlowSurfaceReadLocator;
|
|
@@ -82,7 +82,7 @@ function buildTabSelectorFromUid(uid) {
|
|
|
82
82
|
locator: { uid }
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
function compileCreatePlan(document) {
|
|
85
|
+
function compileCreatePlan(document, getCollection) {
|
|
86
86
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
|
|
87
87
|
const steps = [];
|
|
88
88
|
const chrome = buildPageChrome(document);
|
|
@@ -134,7 +134,7 @@ function compileCreatePlan(document) {
|
|
|
134
134
|
selectors: {
|
|
135
135
|
target: buildTabSelectorFromStep(CREATE_PAGE_STEP_ID)
|
|
136
136
|
},
|
|
137
|
-
values: (0, import_compile_blocks.compileTabComposeValues)(document.tabs[0], document, 0, { mode: "append" })
|
|
137
|
+
values: (0, import_compile_blocks.compileTabComposeValues)(document.tabs[0], document, 0, { mode: "append", getCollection })
|
|
138
138
|
});
|
|
139
139
|
document.tabs.slice(1).forEach((tab, offset) => {
|
|
140
140
|
const tabIndex = offset + 1;
|
|
@@ -161,7 +161,7 @@ function compileCreatePlan(document) {
|
|
|
161
161
|
selectors: {
|
|
162
162
|
target: buildTabSelectorFromStep(addTabStepId)
|
|
163
163
|
},
|
|
164
|
-
values: (0, import_compile_blocks.compileTabComposeValues)(tab, document, tabIndex, { mode: "append" })
|
|
164
|
+
values: (0, import_compile_blocks.compileTabComposeValues)(tab, document, tabIndex, { mode: "append", getCollection })
|
|
165
165
|
});
|
|
166
166
|
});
|
|
167
167
|
steps.push(...(0, import_compile_reaction.compileReactionPlanSteps)(document.reaction));
|
|
@@ -182,7 +182,7 @@ function buildPageConfigureChanges(document) {
|
|
|
182
182
|
displayTitle: (_f = document.page) == null ? void 0 : _f.displayTitle
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
function compileReplacePlan(document, targetInfo) {
|
|
185
|
+
function compileReplacePlan(document, targetInfo, getCollection) {
|
|
186
186
|
const steps = [];
|
|
187
187
|
const pageChanges = buildPageConfigureChanges(document);
|
|
188
188
|
if (Object.keys(pageChanges).length) {
|
|
@@ -225,7 +225,7 @@ function compileReplacePlan(document, targetInfo) {
|
|
|
225
225
|
selectors: {
|
|
226
226
|
target: buildTabSelectorFromUid(existingTab.uid)
|
|
227
227
|
},
|
|
228
|
-
values: (0, import_compile_blocks.compileTabComposeValues)(tab, document, index, { mode: "replace" })
|
|
228
|
+
values: (0, import_compile_blocks.compileTabComposeValues)(tab, document, index, { mode: "replace", getCollection })
|
|
229
229
|
});
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
@@ -253,7 +253,7 @@ function compileReplacePlan(document, targetInfo) {
|
|
|
253
253
|
selectors: {
|
|
254
254
|
target: buildTabSelectorFromStep(addTabStepId)
|
|
255
255
|
},
|
|
256
|
-
values: (0, import_compile_blocks.compileTabComposeValues)(tab, document, index, { mode: "append" })
|
|
256
|
+
values: (0, import_compile_blocks.compileTabComposeValues)(tab, document, index, { mode: "append", getCollection })
|
|
257
257
|
});
|
|
258
258
|
});
|
|
259
259
|
targetInfo.tabs.slice(document.tabs.length).reverse().forEach((tab, index) => {
|
|
@@ -278,12 +278,12 @@ function compileReplacePlan(document, targetInfo) {
|
|
|
278
278
|
}
|
|
279
279
|
function compileFlowSurfaceApplyBlueprintRequest(document, options = {}) {
|
|
280
280
|
if (document.mode === "create") {
|
|
281
|
-
return compileCreatePlan(document);
|
|
281
|
+
return compileCreatePlan(document, options.getCollection);
|
|
282
282
|
}
|
|
283
283
|
if (!options.replaceTarget) {
|
|
284
284
|
(0, import_errors.throwBadRequest)(`flowSurfaces applyBlueprint replace target resolution is missing`);
|
|
285
285
|
}
|
|
286
|
-
return compileReplacePlan(document, options.replaceTarget);
|
|
286
|
+
return compileReplacePlan(document, options.replaceTarget, options.getCollection);
|
|
287
287
|
}
|
|
288
288
|
function resolveApplyBlueprintPageLocator(program, executeResult) {
|
|
289
289
|
var _a, _b, _c;
|
|
@@ -183,6 +183,7 @@ export type FlowSurfaceApplyBlueprintDocument = {
|
|
|
183
183
|
assets: FlowSurfaceApplyBlueprintAssets;
|
|
184
184
|
reaction?: FlowSurfaceApplyBlueprintReaction;
|
|
185
185
|
};
|
|
186
|
+
export type FlowSurfaceApplyBlueprintCollectionResolver = (dataSourceKey: string | undefined, collectionName: string | undefined) => any;
|
|
186
187
|
export type FlowSurfaceApplyBlueprintReplaceTargetInfo = {
|
|
187
188
|
locator: FlowSurfaceReadLocator;
|
|
188
189
|
pageUid: string;
|
|
@@ -82,6 +82,7 @@ export declare function buildBlockTree(options: {
|
|
|
82
82
|
use?: string;
|
|
83
83
|
containerUse?: string;
|
|
84
84
|
resourceInit?: Record<string, any>;
|
|
85
|
+
enableDefaultSorting?: boolean;
|
|
85
86
|
props?: Record<string, any>;
|
|
86
87
|
decoratorProps?: Record<string, any>;
|
|
87
88
|
stepParams?: Record<string, any>;
|
|
@@ -54,6 +54,7 @@ var import_catalog = require("./catalog");
|
|
|
54
54
|
var import_chart_config = require("./chart-config");
|
|
55
55
|
var import_approval = require("./approval");
|
|
56
56
|
var import_service_utils = require("./service-utils");
|
|
57
|
+
var import_public_compatibility = require("./public-compatibility");
|
|
57
58
|
var import_hidden_popup_contract = require("./hidden-popup-contract");
|
|
58
59
|
const JS_BLOCK_DEFAULT_CODE = [
|
|
59
60
|
"// Welcome to the JS block",
|
|
@@ -331,6 +332,9 @@ function buildBlockTree(options) {
|
|
|
331
332
|
} else if (Object.keys(normalizedResourceInit).length) {
|
|
332
333
|
import_lodash.default.set(baseStepParams, ["resourceSettings", "init"], normalizedResourceInit);
|
|
333
334
|
}
|
|
335
|
+
if (options.enableDefaultSorting) {
|
|
336
|
+
applyDefaultSortingIfMissing(baseStepParams, use);
|
|
337
|
+
}
|
|
334
338
|
const model = {
|
|
335
339
|
...use === "CalendarBlockModel" || use === "KanbanBlockModel" ? { uid: (0, import_utils.uid)() } : {},
|
|
336
340
|
use,
|
|
@@ -927,8 +931,10 @@ function inferActionDefaultProps(use, scope) {
|
|
|
927
931
|
icon: "DownOutlined"
|
|
928
932
|
},
|
|
929
933
|
BulkDeleteActionModel: {
|
|
930
|
-
title:
|
|
931
|
-
|
|
934
|
+
title: "",
|
|
935
|
+
tooltip: '{{t("Delete")}}',
|
|
936
|
+
icon: "DeleteOutlined",
|
|
937
|
+
position: "right"
|
|
932
938
|
},
|
|
933
939
|
BulkEditActionModel: {
|
|
934
940
|
title: '{{t("Bulk edit")}}',
|
|
@@ -1067,6 +1073,27 @@ function applyContainerActionStyle(props, containerUse) {
|
|
|
1067
1073
|
}
|
|
1068
1074
|
return props;
|
|
1069
1075
|
}
|
|
1076
|
+
const BLOCK_DEFAULT_SORTING_PATH_BY_USE = {
|
|
1077
|
+
KanbanBlockModel: ["kanbanSettings", "defaultSorting", "sort"],
|
|
1078
|
+
TreeBlockModel: ["treeSettings", "defaultSorting", "sort"],
|
|
1079
|
+
TableBlockModel: ["tableSettings", "defaultSorting", "sort"],
|
|
1080
|
+
DetailsBlockModel: ["detailsSettings", "defaultSorting", "sort"],
|
|
1081
|
+
ListBlockModel: ["listSettings", "defaultSorting", "sort"],
|
|
1082
|
+
GridCardBlockModel: ["GridCardSettings", "defaultSorting", "sort"],
|
|
1083
|
+
MapBlockModel: ["createMapBlock", "lineSort", "sort"]
|
|
1084
|
+
};
|
|
1085
|
+
function applyDefaultSortingIfMissing(stepParams, use) {
|
|
1086
|
+
const path = BLOCK_DEFAULT_SORTING_PATH_BY_USE[use];
|
|
1087
|
+
if (!path) {
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1090
|
+
const currentSorting = import_lodash.default.get(stepParams, path);
|
|
1091
|
+
if (Array.isArray(currentSorting) || import_lodash.default.isNull(currentSorting) || import_lodash.default.isUndefined(currentSorting)) {
|
|
1092
|
+
if (!import_lodash.default.has(stepParams, path) || import_lodash.default.isNull(currentSorting) || import_lodash.default.isUndefined(currentSorting)) {
|
|
1093
|
+
import_lodash.default.set(stepParams, path, import_lodash.default.cloneDeep(import_public_compatibility.FLOW_SURFACE_DEFAULT_SORTING));
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1070
1097
|
function buildBlockDefaults(use) {
|
|
1071
1098
|
if (use === "JSBlockModel") {
|
|
1072
1099
|
return {
|
|
@@ -1132,6 +1159,21 @@ function buildBlockDefaults(use) {
|
|
|
1132
1159
|
}
|
|
1133
1160
|
};
|
|
1134
1161
|
}
|
|
1162
|
+
if (use === "TableBlockModel") {
|
|
1163
|
+
return {};
|
|
1164
|
+
}
|
|
1165
|
+
if (use === "DetailsBlockModel") {
|
|
1166
|
+
return {};
|
|
1167
|
+
}
|
|
1168
|
+
if (use === "ListBlockModel") {
|
|
1169
|
+
return {};
|
|
1170
|
+
}
|
|
1171
|
+
if (use === "GridCardBlockModel") {
|
|
1172
|
+
return {};
|
|
1173
|
+
}
|
|
1174
|
+
if (use === "MapBlockModel") {
|
|
1175
|
+
return {};
|
|
1176
|
+
}
|
|
1135
1177
|
return {};
|
|
1136
1178
|
}
|
|
1137
1179
|
function getStandaloneFieldDefaults(use) {
|
|
@@ -154,7 +154,7 @@ const OPEN_VIEW_PATH_SCHEMAS = {
|
|
|
154
154
|
"openView.tryTemplate": BOOLEAN_SCHEMA
|
|
155
155
|
};
|
|
156
156
|
const CONFIRM_ALLOWED_PATHS = ["confirm.enable", "confirm.title", "confirm.content"];
|
|
157
|
-
const TABLE_COLUMN_ALLOWED_PATHS = ["title.title"];
|
|
157
|
+
const TABLE_COLUMN_ALLOWED_PATHS = ["title.title", "fieldNames.label"];
|
|
158
158
|
const FILTER_FORM_ITEM_ALLOWED_PATHS = [
|
|
159
159
|
"init.defaultTargetUid",
|
|
160
160
|
"init.filterField.name",
|
|
@@ -1433,7 +1433,8 @@ ACTION_COLUMN_CONTRACT.domains.stepParams = groupedDomain({
|
|
|
1433
1433
|
allowedPaths: TABLE_COLUMN_ALLOWED_PATHS,
|
|
1434
1434
|
mergeStrategy: "deep",
|
|
1435
1435
|
pathSchemas: {
|
|
1436
|
-
"title.title": STRING_SCHEMA
|
|
1436
|
+
"title.title": STRING_SCHEMA,
|
|
1437
|
+
"fieldNames.label": STRING_SCHEMA
|
|
1437
1438
|
}
|
|
1438
1439
|
}
|
|
1439
1440
|
});
|
|
@@ -1537,6 +1538,7 @@ TABLE_COLUMN_CONTRACT.domains.stepParams = groupedDomain({
|
|
|
1537
1538
|
mergeStrategy: "deep",
|
|
1538
1539
|
pathSchemas: {
|
|
1539
1540
|
"title.title": STRING_SCHEMA,
|
|
1541
|
+
"fieldNames.label": STRING_SCHEMA,
|
|
1540
1542
|
"model.use": STRING_SCHEMA
|
|
1541
1543
|
}
|
|
1542
1544
|
}
|
|
@@ -1560,7 +1562,8 @@ JS_COLUMN_CONTRACT.domains.stepParams = groupedDomain({
|
|
|
1560
1562
|
allowedPaths: TABLE_COLUMN_ALLOWED_PATHS,
|
|
1561
1563
|
mergeStrategy: "deep",
|
|
1562
1564
|
pathSchemas: {
|
|
1563
|
-
"title.title": STRING_SCHEMA
|
|
1565
|
+
"title.title": STRING_SCHEMA,
|
|
1566
|
+
"fieldNames.label": STRING_SCHEMA
|
|
1564
1567
|
}
|
|
1565
1568
|
},
|
|
1566
1569
|
jsSettings: RUN_JS_SETTINGS_GROUP
|
|
@@ -47,6 +47,8 @@ const FLOW_SURFACE_INTERNAL_AUTO_SAVE_DEFAULT_POPUP_TEMPLATE_KEY = "__flowSurfac
|
|
|
47
47
|
const FLOW_SURFACE_DEFAULT_BLOCK_ACTIONS = {
|
|
48
48
|
table: [
|
|
49
49
|
{ type: "filter", scope: "actions" },
|
|
50
|
+
{ type: "refresh", scope: "actions" },
|
|
51
|
+
{ type: "bulkDelete", scope: "actions" },
|
|
50
52
|
{
|
|
51
53
|
type: "addNew",
|
|
52
54
|
scope: "actions",
|
|
@@ -54,11 +56,11 @@ const FLOW_SURFACE_DEFAULT_BLOCK_ACTIONS = {
|
|
|
54
56
|
tryTemplate: true,
|
|
55
57
|
[FLOW_SURFACE_INTERNAL_AUTO_SAVE_DEFAULT_POPUP_TEMPLATE_KEY]: true
|
|
56
58
|
}
|
|
57
|
-
}
|
|
58
|
-
{ type: "refresh", scope: "actions" }
|
|
59
|
+
}
|
|
59
60
|
],
|
|
60
61
|
list: [
|
|
61
62
|
{ type: "filter", scope: "actions" },
|
|
63
|
+
{ type: "refresh", scope: "actions" },
|
|
62
64
|
{
|
|
63
65
|
type: "addNew",
|
|
64
66
|
scope: "actions",
|
|
@@ -66,11 +68,11 @@ const FLOW_SURFACE_DEFAULT_BLOCK_ACTIONS = {
|
|
|
66
68
|
tryTemplate: true,
|
|
67
69
|
[FLOW_SURFACE_INTERNAL_AUTO_SAVE_DEFAULT_POPUP_TEMPLATE_KEY]: true
|
|
68
70
|
}
|
|
69
|
-
}
|
|
70
|
-
{ type: "refresh", scope: "actions" }
|
|
71
|
+
}
|
|
71
72
|
],
|
|
72
73
|
gridCard: [
|
|
73
74
|
{ type: "filter", scope: "actions" },
|
|
75
|
+
{ type: "refresh", scope: "actions" },
|
|
74
76
|
{
|
|
75
77
|
type: "addNew",
|
|
76
78
|
scope: "actions",
|
|
@@ -78,11 +80,11 @@ const FLOW_SURFACE_DEFAULT_BLOCK_ACTIONS = {
|
|
|
78
80
|
tryTemplate: true,
|
|
79
81
|
[FLOW_SURFACE_INTERNAL_AUTO_SAVE_DEFAULT_POPUP_TEMPLATE_KEY]: true
|
|
80
82
|
}
|
|
81
|
-
}
|
|
82
|
-
{ type: "refresh", scope: "actions" }
|
|
83
|
+
}
|
|
83
84
|
],
|
|
84
85
|
calendar: [
|
|
85
86
|
{ type: "filter", scope: "actions" },
|
|
87
|
+
{ type: "refresh", scope: "actions" },
|
|
86
88
|
{
|
|
87
89
|
type: "addNew",
|
|
88
90
|
scope: "actions",
|
|
@@ -90,11 +92,11 @@ const FLOW_SURFACE_DEFAULT_BLOCK_ACTIONS = {
|
|
|
90
92
|
tryTemplate: true,
|
|
91
93
|
[FLOW_SURFACE_INTERNAL_AUTO_SAVE_DEFAULT_POPUP_TEMPLATE_KEY]: true
|
|
92
94
|
}
|
|
93
|
-
}
|
|
94
|
-
{ type: "refresh", scope: "actions" }
|
|
95
|
+
}
|
|
95
96
|
],
|
|
96
97
|
kanban: [
|
|
97
98
|
{ type: "filter", scope: "actions" },
|
|
99
|
+
{ type: "refresh", scope: "actions" },
|
|
98
100
|
{
|
|
99
101
|
type: "addNew",
|
|
100
102
|
scope: "actions",
|
|
@@ -102,8 +104,7 @@ const FLOW_SURFACE_DEFAULT_BLOCK_ACTIONS = {
|
|
|
102
104
|
tryTemplate: true,
|
|
103
105
|
[FLOW_SURFACE_INTERNAL_AUTO_SAVE_DEFAULT_POPUP_TEMPLATE_KEY]: true
|
|
104
106
|
}
|
|
105
|
-
}
|
|
106
|
-
{ type: "refresh", scope: "actions" }
|
|
107
|
+
}
|
|
107
108
|
],
|
|
108
109
|
createForm: [{ type: "submit", scope: "actions" }],
|
|
109
110
|
editForm: [{ type: "submit", scope: "actions" }],
|
|
@@ -56,6 +56,7 @@ const FLOW_SURFACE_POPUP_HOST_USES = /* @__PURE__ */ new Set([
|
|
|
56
56
|
"ViewActionModel",
|
|
57
57
|
"EditActionModel",
|
|
58
58
|
"PopupCollectionActionModel",
|
|
59
|
+
"AddChildActionModel",
|
|
59
60
|
"CalendarQuickCreateActionModel",
|
|
60
61
|
"CalendarEventViewActionModel",
|
|
61
62
|
"KanbanQuickCreateActionModel",
|
|
@@ -6,11 +6,23 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
export declare const FLOW_SURFACE_DEFAULT_SORTING: {
|
|
10
|
+
field: string;
|
|
11
|
+
direction: string;
|
|
12
|
+
}[];
|
|
9
13
|
type NormalizeSortingAliasInput = {
|
|
10
14
|
context: string;
|
|
11
15
|
type?: string;
|
|
12
16
|
use?: string;
|
|
13
17
|
settings?: any;
|
|
14
18
|
};
|
|
19
|
+
export declare function normalizeFlowSurfaceDefaultSorting(input: any, context: string): {
|
|
20
|
+
field: string;
|
|
21
|
+
direction: string;
|
|
22
|
+
}[];
|
|
23
|
+
export declare function normalizeFlowSurfaceEmptySortingAsDefault(input: any, context: string): {
|
|
24
|
+
field: string;
|
|
25
|
+
direction: string;
|
|
26
|
+
}[];
|
|
15
27
|
export declare function normalizeFlowSurfacePublicSortingAlias(input: NormalizeSortingAliasInput): any;
|
|
16
28
|
export {};
|