@nocobase/plugin-flow-engine 2.2.0-beta.9 → 3.0.0-alpha.1
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/ai/ai-employees/nathan/prompt.md +2 -0
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/SKILLS.md +1 -0
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextApis.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextEnvs.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextVars.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/lintAndTestJS.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/patchJSCode.js +4 -4
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/readJSCode.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/writeJSCode.js +2 -2
- package/dist/ai/docs/runjs/context/ai.md +396 -0
- package/dist/externalVersion.js +9 -9
- package/dist/locale/en-US.json +2 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/zh-CN.json +2 -0
- package/dist/node_modules/@ant-design/icons-svg/package.json +1 -1
- package/dist/node_modules/acorn/package.json +1 -1
- package/dist/node_modules/acorn-jsx/package.json +1 -1
- package/dist/node_modules/acorn-walk/package.json +1 -1
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/authoring-validation.d.ts +2 -1
- package/dist/server/flow-surfaces/authoring-validation.js +167 -19
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +7 -3
- package/dist/server/flow-surfaces/blueprint/compile-plan.js +19 -15
- package/dist/server/flow-surfaces/blueprint/normalize-document.js +18 -2
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +1 -0
- package/dist/server/flow-surfaces/builder.js +3 -0
- package/dist/server/flow-surfaces/constants.d.ts +9 -2
- package/dist/server/flow-surfaces/constants.js +1 -0
- package/dist/server/flow-surfaces/contract-guard.js +20 -10
- package/dist/server/flow-surfaces/errors.d.ts +2 -2
- package/dist/server/flow-surfaces/errors.js +4 -4
- package/dist/server/flow-surfaces/navigation-targets.d.ts +80 -0
- package/dist/server/flow-surfaces/navigation-targets.js +546 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/constants.js +1 -0
- package/dist/server/flow-surfaces/service.d.ts +21 -2
- package/dist/server/flow-surfaces/service.js +610 -121
- package/dist/server/variables/records.js +7 -2
- package/dist/swagger/flow-surfaces.d.ts +96 -0
- package/dist/swagger/flow-surfaces.js +88 -7
- package/dist/swagger/index.d.ts +96 -0
- package/package.json +2 -2
|
@@ -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-07-
|
|
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-07-30T03:55:36.294Z"}
|
|
@@ -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-07-
|
|
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-07-30T03:55:38.130Z"}
|
|
@@ -13,8 +13,9 @@ export interface FlowSurfaceAuthoringValidationContext {
|
|
|
13
13
|
applyBlueprintScriptAssets?: Record<string, any>;
|
|
14
14
|
getCollection?: (dataSourceKey: string, collectionName: string) => any;
|
|
15
15
|
getDefaultFieldGroups?: (dataSourceKey: string, collectionName: string) => any;
|
|
16
|
-
findMenuGroupRoutesByTitle?: (title: string, transaction?: any, layoutUid?: string | string[]) => Promise<any[]>;
|
|
16
|
+
findMenuGroupRoutesByTitle?: (title: string, transaction?: any, layoutUid?: string | string[], portalUid?: string) => Promise<any[]>;
|
|
17
17
|
getUiLayoutTypeByUid?: (layoutUid: string, transaction?: any) => Promise<string | undefined>;
|
|
18
|
+
getPortalLayoutTypeByUid?: (portalUid: string, transaction?: any) => Promise<string | undefined>;
|
|
18
19
|
transaction?: any;
|
|
19
20
|
hostBlockType?: string;
|
|
20
21
|
hostCollectionName?: string;
|
|
@@ -63,6 +63,21 @@ var import_runjs_authoring = require("./runjs-authoring");
|
|
|
63
63
|
var import_configure_options = require("./configure-options");
|
|
64
64
|
var import_context = require("./context");
|
|
65
65
|
var import_filter_group = require("./filter-group");
|
|
66
|
+
const FLOW_SURFACE_DATA_SCOPE_DATE_EMPTY_OPERATORS = /* @__PURE__ */ new Set(["$empty", "$notEmpty"]);
|
|
67
|
+
const FLOW_SURFACE_DATA_SCOPE_DATE_ALLOWED_OPERATORS = /* @__PURE__ */ new Set([
|
|
68
|
+
...import_filter_group.FLOW_SURFACE_DATE_FILTER_OPERATORS,
|
|
69
|
+
...FLOW_SURFACE_DATA_SCOPE_DATE_EMPTY_OPERATORS
|
|
70
|
+
]);
|
|
71
|
+
const FLOW_SURFACE_DATA_SCOPE_DATE_UI_INCOMPATIBLE_OPERATORS = /* @__PURE__ */ new Set([
|
|
72
|
+
"$eq",
|
|
73
|
+
"$ne",
|
|
74
|
+
"$lt",
|
|
75
|
+
"$lte",
|
|
76
|
+
"$gt",
|
|
77
|
+
"$gte",
|
|
78
|
+
"$in",
|
|
79
|
+
"$notIn"
|
|
80
|
+
]);
|
|
66
81
|
const MAIN_BLOCK_UNSUPPORTED_SECTIONS = {
|
|
67
82
|
calendar: ["fields", "fieldGroups", "recordActions", "fieldsLayout"],
|
|
68
83
|
kanban: ["fieldGroups", "recordActions", "fieldsLayout"],
|
|
@@ -525,7 +540,7 @@ function pushChartBadRequestAuthoringError(errors, error, fallbackPath) {
|
|
|
525
540
|
});
|
|
526
541
|
}
|
|
527
542
|
async function collectNavigationGroupErrors(actionName, values, context, errors) {
|
|
528
|
-
var _a, _b;
|
|
543
|
+
var _a, _b, _c;
|
|
529
544
|
if (actionName !== "applyBlueprint" || (values == null ? void 0 : values.mode) !== "create" || !_.isPlainObject((_a = values == null ? void 0 : values.navigation) == null ? void 0 : _a.group)) {
|
|
530
545
|
return;
|
|
531
546
|
}
|
|
@@ -540,7 +555,8 @@ async function collectNavigationGroupErrors(actionName, values, context, errors)
|
|
|
540
555
|
return;
|
|
541
556
|
}
|
|
542
557
|
const layoutUid = String(((_b = values == null ? void 0 : values.navigation) == null ? void 0 : _b.layoutUid) || "").trim() || void 0;
|
|
543
|
-
const
|
|
558
|
+
const portalUid = String(((_c = values == null ? void 0 : values.navigation) == null ? void 0 : _c.portalUid) || "").trim() || void 0;
|
|
559
|
+
const matchedRoutes = await context.findMenuGroupRoutesByTitle(groupTitle, context.transaction, layoutUid, portalUid);
|
|
544
560
|
const rootMatchedRoutes = filterRootMenuGroupRoutes(matchedRoutes);
|
|
545
561
|
if (rootMatchedRoutes.length <= 1) {
|
|
546
562
|
return;
|
|
@@ -557,7 +573,7 @@ async function collectNavigationGroupErrors(actionName, values, context, errors)
|
|
|
557
573
|
});
|
|
558
574
|
}
|
|
559
575
|
async function collectNavigationIconErrors(actionName, values, context, errors) {
|
|
560
|
-
var _a, _b, _c, _d;
|
|
576
|
+
var _a, _b, _c, _d, _e;
|
|
561
577
|
if (actionName !== "applyBlueprint" || (values == null ? void 0 : values.mode) !== "create") {
|
|
562
578
|
return;
|
|
563
579
|
}
|
|
@@ -565,9 +581,10 @@ async function collectNavigationIconErrors(actionName, values, context, errors)
|
|
|
565
581
|
const group = _.isPlainObject((_a = values == null ? void 0 : values.navigation) == null ? void 0 : _a.group) ? values.navigation.group : null;
|
|
566
582
|
const groupRouteId = String((group == null ? void 0 : group.routeId) || "").trim();
|
|
567
583
|
const layoutUid = String(((_b = values == null ? void 0 : values.navigation) == null ? void 0 : _b.layoutUid) || "").trim() || void 0;
|
|
584
|
+
const portalUid = String(((_c = values == null ? void 0 : values.navigation) == null ? void 0 : _c.portalUid) || "").trim() || void 0;
|
|
568
585
|
if (!isMobileCreateNavigation && group && !groupRouteId && group.hideInMenu !== true) {
|
|
569
586
|
const groupIcon = String(group.icon || "").trim();
|
|
570
|
-
if (!groupIcon && await shouldRequireNewNavigationGroupIcon(group, context, layoutUid)) {
|
|
587
|
+
if (!groupIcon && await shouldRequireNewNavigationGroupIcon(group, context, layoutUid, portalUid)) {
|
|
571
588
|
pushAuthoringError(errors, {
|
|
572
589
|
path: "$.navigation.group.icon",
|
|
573
590
|
ruleId: "navigation-icon-required",
|
|
@@ -596,7 +613,7 @@ async function collectNavigationIconErrors(actionName, values, context, errors)
|
|
|
596
613
|
}
|
|
597
614
|
});
|
|
598
615
|
}
|
|
599
|
-
const item = _.isPlainObject((
|
|
616
|
+
const item = _.isPlainObject((_d = values == null ? void 0 : values.navigation) == null ? void 0 : _d.item) ? values.navigation.item : null;
|
|
600
617
|
const itemIcon = String((item == null ? void 0 : item.icon) || "").trim();
|
|
601
618
|
if (itemIcon && !isValidAntDesignIconName(itemIcon)) {
|
|
602
619
|
pushAuthoringError(errors, {
|
|
@@ -608,7 +625,7 @@ async function collectNavigationIconErrors(actionName, values, context, errors)
|
|
|
608
625
|
}
|
|
609
626
|
});
|
|
610
627
|
}
|
|
611
|
-
const pageIcon = String(((
|
|
628
|
+
const pageIcon = String(((_e = values == null ? void 0 : values.page) == null ? void 0 : _e.icon) || "").trim();
|
|
612
629
|
if (pageIcon && !isValidAntDesignIconName(pageIcon)) {
|
|
613
630
|
pushAuthoringError(errors, {
|
|
614
631
|
path: "$.page.icon",
|
|
@@ -621,19 +638,23 @@ async function collectNavigationIconErrors(actionName, values, context, errors)
|
|
|
621
638
|
}
|
|
622
639
|
}
|
|
623
640
|
async function isApplyBlueprintMobileCreateNavigation(values, context) {
|
|
624
|
-
var _a;
|
|
625
|
-
const
|
|
641
|
+
var _a, _b;
|
|
642
|
+
const portalUid = String(((_a = values == null ? void 0 : values.navigation) == null ? void 0 : _a.portalUid) || "").trim();
|
|
643
|
+
if (portalUid && context.getPortalLayoutTypeByUid) {
|
|
644
|
+
return await context.getPortalLayoutTypeByUid(portalUid, context.transaction) === "mobile";
|
|
645
|
+
}
|
|
646
|
+
const layoutUid = String(((_b = values == null ? void 0 : values.navigation) == null ? void 0 : _b.layoutUid) || "").trim();
|
|
626
647
|
if (!layoutUid || !context.getUiLayoutTypeByUid) {
|
|
627
648
|
return false;
|
|
628
649
|
}
|
|
629
650
|
return await context.getUiLayoutTypeByUid(layoutUid, context.transaction) === "mobile";
|
|
630
651
|
}
|
|
631
|
-
async function shouldRequireNewNavigationGroupIcon(group, context, layoutUid) {
|
|
652
|
+
async function shouldRequireNewNavigationGroupIcon(group, context, layoutUid, portalUid) {
|
|
632
653
|
const groupTitle = String((group == null ? void 0 : group.title) || "").trim();
|
|
633
654
|
if (!groupTitle || !context.findMenuGroupRoutesByTitle) {
|
|
634
655
|
return true;
|
|
635
656
|
}
|
|
636
|
-
const matchedRoutes = await context.findMenuGroupRoutesByTitle(groupTitle, context.transaction, layoutUid);
|
|
657
|
+
const matchedRoutes = await context.findMenuGroupRoutesByTitle(groupTitle, context.transaction, layoutUid, portalUid);
|
|
637
658
|
return filterRootMenuGroupRoutes(matchedRoutes).length === 0;
|
|
638
659
|
}
|
|
639
660
|
function filterRootMenuGroupRoutes(routes) {
|
|
@@ -4386,6 +4407,7 @@ async function collectConfigureErrors(values, errors, context) {
|
|
|
4386
4407
|
collectGridCardSettingsErrors(changes, hostBlockType, "$.changes", errors, { directSettings: true });
|
|
4387
4408
|
collectAssignValuesErrors(changes.assignValues, "$.changes.assignValues", errors, changesBlock, context);
|
|
4388
4409
|
collectTriggerWorkflowsErrors(changes.triggerWorkflows, "$.changes.triggerWorkflows", errors);
|
|
4410
|
+
collectLinkageRulesErrors(changes.linkageRules, "$.changes.linkageRules", errors);
|
|
4389
4411
|
collectFieldListInternalKeyErrors(changes.fields, "$.changes.fields", errors);
|
|
4390
4412
|
const connectFieldsTargets = collectTreeConnectFieldsErrors(changes.connectFields, "$.changes.connectFields", errors);
|
|
4391
4413
|
await collectTreeConnectFieldsLiveErrors(connectFieldsTargets, changes, "$.changes.connectFields", errors, context);
|
|
@@ -4497,6 +4519,82 @@ function collectDefaultFilterDateValueError(operator, value, path, errors, field
|
|
|
4497
4519
|
});
|
|
4498
4520
|
}
|
|
4499
4521
|
}
|
|
4522
|
+
function collectPublicDataScopeDateOperatorError(operator, value, path, errors, fieldContext) {
|
|
4523
|
+
const fieldMeta = getDateConditionFieldContextMeta(fieldContext);
|
|
4524
|
+
if (!(0, import_filter_group.isFlowSurfaceDateLikeFieldMeta)(fieldMeta)) {
|
|
4525
|
+
return;
|
|
4526
|
+
}
|
|
4527
|
+
const normalizedOperator = typeof operator === "string" ? operator.trim() : "";
|
|
4528
|
+
if (FLOW_SURFACE_DATA_SCOPE_DATE_ALLOWED_OPERATORS.has(normalizedOperator)) {
|
|
4529
|
+
return;
|
|
4530
|
+
}
|
|
4531
|
+
const isComparisonOperator = FLOW_SURFACE_DATA_SCOPE_DATE_UI_INCOMPATIBLE_OPERATORS.has(normalizedOperator);
|
|
4532
|
+
const suggestedOperator = isComparisonOperator ? getSuggestedPublicDataScopeDateOperator(normalizedOperator) : void 0;
|
|
4533
|
+
const suggestedValue = getSuggestedPublicDataScopeDateValue(value);
|
|
4534
|
+
pushAuthoringError(errors, {
|
|
4535
|
+
path,
|
|
4536
|
+
ruleId: "dataScope-date-operator-ui-incompatible",
|
|
4537
|
+
message: `flowSurfaces authoring ${path} cannot use operator '${normalizedOperator}' for a date/datetime DataScope condition`,
|
|
4538
|
+
details: {
|
|
4539
|
+
fieldPath: fieldContext == null ? void 0 : fieldContext.fieldPath,
|
|
4540
|
+
fieldType: fieldMeta.type,
|
|
4541
|
+
fieldInterface: fieldMeta.interface,
|
|
4542
|
+
invalidOperator: normalizedOperator,
|
|
4543
|
+
invalidValue: value,
|
|
4544
|
+
allowedOperators: Array.from(FLOW_SURFACE_DATA_SCOPE_DATE_ALLOWED_OPERATORS),
|
|
4545
|
+
...suggestedOperator ? { suggestedOperator } : {},
|
|
4546
|
+
...typeof suggestedValue !== "undefined" ? { suggestedValue } : {},
|
|
4547
|
+
repairHint: 'For public settings.dataScope date/datetime fields, use UI date operators such as $dateOn with UI date values like "2026-07-05"; do not move fixed data-range conditions to defaultFilter.',
|
|
4548
|
+
repairExample: {
|
|
4549
|
+
logic: "$and",
|
|
4550
|
+
items: [
|
|
4551
|
+
{
|
|
4552
|
+
path: (fieldContext == null ? void 0 : fieldContext.fieldPath) || "createdAt",
|
|
4553
|
+
operator: suggestedOperator || "$dateOn",
|
|
4554
|
+
value: typeof suggestedValue !== "undefined" ? suggestedValue : "2026-07-05"
|
|
4555
|
+
}
|
|
4556
|
+
]
|
|
4557
|
+
},
|
|
4558
|
+
agentInstruction: "Replace date/datetime DataScope comparison operators with $dateOn/$dateNotOn/$dateBefore/$dateAfter/$dateNotBefore/$dateNotAfter/$dateBetween and UI date values. Keep the condition in dataScope when it is a fixed data range."
|
|
4559
|
+
}
|
|
4560
|
+
});
|
|
4561
|
+
}
|
|
4562
|
+
function getSuggestedPublicDataScopeDateOperator(operator) {
|
|
4563
|
+
switch (operator) {
|
|
4564
|
+
case "$eq":
|
|
4565
|
+
return "$dateOn";
|
|
4566
|
+
case "$ne":
|
|
4567
|
+
return "$dateNotOn";
|
|
4568
|
+
case "$lt":
|
|
4569
|
+
return "$dateBefore";
|
|
4570
|
+
case "$lte":
|
|
4571
|
+
return "$dateNotAfter";
|
|
4572
|
+
case "$gt":
|
|
4573
|
+
return "$dateAfter";
|
|
4574
|
+
case "$gte":
|
|
4575
|
+
return "$dateNotBefore";
|
|
4576
|
+
default:
|
|
4577
|
+
return void 0;
|
|
4578
|
+
}
|
|
4579
|
+
}
|
|
4580
|
+
function getSuggestedPublicDataScopeDateValue(value) {
|
|
4581
|
+
if (typeof value === "string") {
|
|
4582
|
+
const match = /^(\d{4}-\d{2}-\d{2})/.exec(value.trim());
|
|
4583
|
+
if (match) {
|
|
4584
|
+
return match[1];
|
|
4585
|
+
}
|
|
4586
|
+
}
|
|
4587
|
+
if (Array.isArray(value)) {
|
|
4588
|
+
const suggested = value.map((item) => {
|
|
4589
|
+
var _a;
|
|
4590
|
+
return typeof item === "string" ? (_a = /^(\d{4}-\d{2}-\d{2})/.exec(item.trim())) == null ? void 0 : _a[1] : void 0;
|
|
4591
|
+
}).filter(Boolean);
|
|
4592
|
+
if (suggested.length === value.length && suggested.length > 0) {
|
|
4593
|
+
return suggested;
|
|
4594
|
+
}
|
|
4595
|
+
}
|
|
4596
|
+
return void 0;
|
|
4597
|
+
}
|
|
4500
4598
|
function collectTopLevelLayoutErrors(actionName, values, errors) {
|
|
4501
4599
|
if (actionName !== "applyBlueprint") {
|
|
4502
4600
|
return;
|
|
@@ -6130,13 +6228,9 @@ function collectFilterGroupDateConditionErrors(value, path, errors, block, conte
|
|
|
6130
6228
|
return;
|
|
6131
6229
|
}
|
|
6132
6230
|
const fieldPath = String(value.path || value.field || "").trim();
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
`${path}.value`,
|
|
6137
|
-
errors,
|
|
6138
|
-
fieldPath ? resolveDefaultFilterDateConditionField(fieldPath, block, context) : void 0
|
|
6139
|
-
);
|
|
6231
|
+
const fieldContext = fieldPath ? resolveDefaultFilterDateConditionField(fieldPath, block, context) : void 0;
|
|
6232
|
+
collectPublicDataScopeDateOperatorError(value.operator, value.value, `${path}.operator`, errors, fieldContext);
|
|
6233
|
+
collectDefaultFilterDateValueError(value.operator, value.value, `${path}.value`, errors, fieldContext);
|
|
6140
6234
|
}
|
|
6141
6235
|
function collectGridCardSettingsErrors(block, blockType, blockPath, errors, options = {}) {
|
|
6142
6236
|
const hasSettings = _.isPlainObject(block == null ? void 0 : block.settings);
|
|
@@ -6402,7 +6496,7 @@ function collectActionSlotErrors(actionType, path, errors, block, slot = "action
|
|
|
6402
6496
|
}
|
|
6403
6497
|
}
|
|
6404
6498
|
function collectActionErrors(action, path, errors, block, context = {}, slot = "actions") {
|
|
6405
|
-
var _a, _b, _c, _d;
|
|
6499
|
+
var _a, _b, _c, _d, _e;
|
|
6406
6500
|
const actionType = resolveAuthoringActionType(action, block);
|
|
6407
6501
|
collectActionSlotErrors(actionType, path, errors, block, slot);
|
|
6408
6502
|
if (!_.isPlainObject(action)) {
|
|
@@ -6411,6 +6505,7 @@ function collectActionErrors(action, path, errors, block, context = {}, slot = "
|
|
|
6411
6505
|
collectApplyBlueprintScriptAssetReferenceErrors(action, path, errors, context);
|
|
6412
6506
|
collectAssignValuesErrors((_a = action.settings) == null ? void 0 : _a.assignValues, `${path}.settings.assignValues`, errors, block, context);
|
|
6413
6507
|
collectTriggerWorkflowsErrors((_b = action.settings) == null ? void 0 : _b.triggerWorkflows, `${path}.settings.triggerWorkflows`, errors);
|
|
6508
|
+
collectLinkageRulesErrors((_c = action.settings) == null ? void 0 : _c.linkageRules, `${path}.settings.linkageRules`, errors);
|
|
6414
6509
|
if (hasOwn(action, "assignValues")) {
|
|
6415
6510
|
pushAuthoringError(errors, {
|
|
6416
6511
|
path: `${path}.assignValues`,
|
|
@@ -6446,7 +6541,7 @@ function collectActionErrors(action, path, errors, block, context = {}, slot = "
|
|
|
6446
6541
|
}
|
|
6447
6542
|
});
|
|
6448
6543
|
}
|
|
6449
|
-
const hasRunnableSource = typeof action.source === "string" && action.source.trim() || typeof action.code === "string" && action.code.trim() || hasApplyBlueprintRunnableScriptAssetReference(action.script, context) || typeof ((
|
|
6544
|
+
const hasRunnableSource = typeof action.source === "string" && action.source.trim() || typeof action.code === "string" && action.code.trim() || hasApplyBlueprintRunnableScriptAssetReference(action.script, context) || typeof ((_d = action.settings) == null ? void 0 : _d.source) === "string" && action.settings.source.trim() || typeof ((_e = action.settings) == null ? void 0 : _e.code) === "string" && action.settings.code.trim();
|
|
6450
6545
|
if (!hasRunnableSource) {
|
|
6451
6546
|
pushAuthoringError(errors, {
|
|
6452
6547
|
path,
|
|
@@ -6711,6 +6806,59 @@ function collectTriggerWorkflowsErrors(value, path, errors) {
|
|
|
6711
6806
|
}
|
|
6712
6807
|
});
|
|
6713
6808
|
}
|
|
6809
|
+
function collectLinkageRulesErrors(value, path, errors) {
|
|
6810
|
+
if (_.isUndefined(value)) {
|
|
6811
|
+
return;
|
|
6812
|
+
}
|
|
6813
|
+
if (!Array.isArray(value)) {
|
|
6814
|
+
pushAuthoringError(errors, {
|
|
6815
|
+
path,
|
|
6816
|
+
ruleId: "linkageRules-invalid-shape",
|
|
6817
|
+
message: `flowSurfaces authoring ${path} must be an array`
|
|
6818
|
+
});
|
|
6819
|
+
return;
|
|
6820
|
+
}
|
|
6821
|
+
value.forEach((rule, index) => {
|
|
6822
|
+
const rulePath = `${path}[${index}]`;
|
|
6823
|
+
if (!_.isPlainObject(rule)) {
|
|
6824
|
+
pushAuthoringError(errors, {
|
|
6825
|
+
path: rulePath,
|
|
6826
|
+
ruleId: "linkageRules-rule-invalid-shape",
|
|
6827
|
+
message: `flowSurfaces authoring ${rulePath} must be an object`
|
|
6828
|
+
});
|
|
6829
|
+
return;
|
|
6830
|
+
}
|
|
6831
|
+
const conditionPath = hasOwn(rule, "condition") ? `${rulePath}.condition` : hasOwn(rule, "when") ? `${rulePath}.when` : `${rulePath}.condition`;
|
|
6832
|
+
const conditionValue = hasOwn(rule, "condition") ? rule.condition : hasOwn(rule, "when") ? rule.when : import_filter_group.FLOW_SURFACE_EMPTY_FILTER_GROUP;
|
|
6833
|
+
try {
|
|
6834
|
+
(0, import_filter_group.normalizeFlowSurfaceCompatibleFilterGroupValue)(
|
|
6835
|
+
conditionValue,
|
|
6836
|
+
`flowSurfaces authoring ${conditionPath} expects FilterGroup or backend query filter like ${import_filter_group.FLOW_SURFACE_FILTER_GROUP_EXAMPLE}`,
|
|
6837
|
+
{ strictDateValues: true }
|
|
6838
|
+
);
|
|
6839
|
+
} catch (error) {
|
|
6840
|
+
pushAuthoringError(errors, {
|
|
6841
|
+
path: conditionPath,
|
|
6842
|
+
ruleId: "linkageRules-condition-invalid-shape",
|
|
6843
|
+
message: error instanceof Error ? error.message : String(error)
|
|
6844
|
+
});
|
|
6845
|
+
}
|
|
6846
|
+
if (hasOwn(rule, "actions") && !Array.isArray(rule.actions)) {
|
|
6847
|
+
pushAuthoringError(errors, {
|
|
6848
|
+
path: `${rulePath}.actions`,
|
|
6849
|
+
ruleId: "linkageRules-actions-invalid-shape",
|
|
6850
|
+
message: `flowSurfaces authoring ${rulePath}.actions must be an array`
|
|
6851
|
+
});
|
|
6852
|
+
}
|
|
6853
|
+
if (hasOwn(rule, "then") && !Array.isArray(rule.then)) {
|
|
6854
|
+
pushAuthoringError(errors, {
|
|
6855
|
+
path: `${rulePath}.then`,
|
|
6856
|
+
ruleId: "linkageRules-actions-invalid-shape",
|
|
6857
|
+
message: `flowSurfaces authoring ${rulePath}.then must be an array`
|
|
6858
|
+
});
|
|
6859
|
+
}
|
|
6860
|
+
});
|
|
6861
|
+
}
|
|
6714
6862
|
function collectPopupErrors(popup, path, errors, localKeys, context = {}) {
|
|
6715
6863
|
if (!_.isPlainObject(popup)) {
|
|
6716
6864
|
return;
|
|
@@ -960,10 +960,14 @@ function resolveApplyBlueprintAssociationContext(input) {
|
|
|
960
960
|
}
|
|
961
961
|
const targetCollection = (0, import_service_helpers.resolveFieldTargetCollection)(field, dataSourceKey, input.getCollection);
|
|
962
962
|
const targetCollectionName = normalizeMetadataText(input.targetCollectionName) || normalizeMetadataText((0, import_service_helpers.getCollectionName)(targetCollection)) || normalizeMetadataText((0, import_service_helpers.getFieldTarget)(field));
|
|
963
|
+
const resolvedAssociationName = (0, import_service_helpers.resolveAssociationNameFromField)(
|
|
964
|
+
field,
|
|
965
|
+
associationPath.includes(".") ? void 0 : sourceCollection
|
|
966
|
+
);
|
|
963
967
|
return {
|
|
964
968
|
dataSourceKey,
|
|
965
969
|
surfaceCollectionName: targetCollectionName || void 0,
|
|
966
|
-
associationName:
|
|
970
|
+
associationName: resolvedAssociationName || `${sourceCollectionName}.${associationPath || associationFieldPath}`
|
|
967
971
|
};
|
|
968
972
|
}
|
|
969
973
|
function getApplyBlueprintBlockResourceObject(block) {
|
|
@@ -1018,7 +1022,7 @@ function resolveApplyBlueprintBlockResourceContext(block, parentContext, getColl
|
|
|
1018
1022
|
return {
|
|
1019
1023
|
dataSourceKey,
|
|
1020
1024
|
surfaceCollectionName: directCollectionName || (associatedContext == null ? void 0 : associatedContext.surfaceCollectionName) || (parentContext == null ? void 0 : parentContext.surfaceCollectionName),
|
|
1021
|
-
associationName: (
|
|
1025
|
+
associationName: (associatedContext == null ? void 0 : associatedContext.associationName) || (parentContext == null ? void 0 : parentContext.associationName)
|
|
1022
1026
|
};
|
|
1023
1027
|
}
|
|
1024
1028
|
return {
|
|
@@ -1665,7 +1669,7 @@ function compileField(input, index, scopePrefix, assets, localBlockKeys, context
|
|
|
1665
1669
|
hostBlock: popupOptions.hostBlock,
|
|
1666
1670
|
dataSourceKey: (fieldAssociationContext == null ? void 0 : fieldAssociationContext.dataSourceKey) || popupOptions.dataSourceKey,
|
|
1667
1671
|
surfaceCollectionName: (fieldAssociationContext == null ? void 0 : fieldAssociationContext.surfaceCollectionName) || popupOptions.surfaceCollectionName,
|
|
1668
|
-
associationName:
|
|
1672
|
+
associationName: (fieldAssociationContext == null ? void 0 : fieldAssociationContext.associationName) || popupOptions.associationName
|
|
1669
1673
|
});
|
|
1670
1674
|
settings = resolvePopupTitleSettings(settings, popupResult.popupTitle);
|
|
1671
1675
|
const popup = shouldAttachDefaultPopupMetadata(popupInput, void 0) ? attachCompiledPopupDefaults(popupResult.popup, popupDefaultsMetadata) : popupResult.popup;
|
|
@@ -83,21 +83,23 @@ function buildTabSelectorFromUid(uid) {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
function compileCreatePlan(document, getCollection) {
|
|
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, _B, _C;
|
|
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, _B, _C, _D;
|
|
87
87
|
const steps = [];
|
|
88
88
|
const chrome = buildPageChrome(document);
|
|
89
89
|
const layoutUid = (_a = document.navigation) == null ? void 0 : _a.layoutUid;
|
|
90
|
-
|
|
90
|
+
const portalUid = (_b = document.navigation) == null ? void 0 : _b.portalUid;
|
|
91
|
+
if (import_lodash.default.isPlainObject((_c = document.navigation) == null ? void 0 : _c.group) && import_lodash.default.isUndefined(document.navigation.group.routeId)) {
|
|
91
92
|
steps.push({
|
|
92
93
|
id: CREATE_MENU_GROUP_STEP_ID,
|
|
93
94
|
action: "createMenu",
|
|
94
95
|
values: (0, import_service_utils.buildDefinedPayload)({
|
|
95
96
|
layoutUid,
|
|
96
|
-
|
|
97
|
+
portalUid,
|
|
98
|
+
title: (_e = (_d = document.navigation) == null ? void 0 : _d.group) == null ? void 0 : _e.title,
|
|
97
99
|
type: "group",
|
|
98
|
-
icon: (
|
|
99
|
-
tooltip: (
|
|
100
|
-
hideInMenu: (
|
|
100
|
+
icon: (_g = (_f = document.navigation) == null ? void 0 : _f.group) == null ? void 0 : _g.icon,
|
|
101
|
+
tooltip: (_i = (_h = document.navigation) == null ? void 0 : _h.group) == null ? void 0 : _i.tooltip,
|
|
102
|
+
hideInMenu: (_k = (_j = document.navigation) == null ? void 0 : _j.group) == null ? void 0 : _k.hideInMenu
|
|
101
103
|
})
|
|
102
104
|
});
|
|
103
105
|
}
|
|
@@ -106,12 +108,13 @@ function compileCreatePlan(document, getCollection) {
|
|
|
106
108
|
action: "createMenu",
|
|
107
109
|
values: (0, import_service_utils.buildDefinedPayload)({
|
|
108
110
|
layoutUid,
|
|
109
|
-
|
|
111
|
+
portalUid,
|
|
112
|
+
title: ((_m = (_l = document.navigation) == null ? void 0 : _l.item) == null ? void 0 : _m.title) || chrome.pageTitle,
|
|
110
113
|
type: "item",
|
|
111
|
-
icon: ((
|
|
112
|
-
tooltip: (
|
|
113
|
-
hideInMenu: (
|
|
114
|
-
parentMenuRouteId: import_lodash.default.isUndefined((
|
|
114
|
+
icon: ((_o = (_n = document.navigation) == null ? void 0 : _n.item) == null ? void 0 : _o.icon) || ((_p = document.page) == null ? void 0 : _p.icon) || "FileOutlined",
|
|
115
|
+
tooltip: (_r = (_q = document.navigation) == null ? void 0 : _q.item) == null ? void 0 : _r.tooltip,
|
|
116
|
+
hideInMenu: (_t = (_s = document.navigation) == null ? void 0 : _s.item) == null ? void 0 : _t.hideInMenu,
|
|
117
|
+
parentMenuRouteId: import_lodash.default.isUndefined((_v = (_u = document.navigation) == null ? void 0 : _u.group) == null ? void 0 : _v.routeId) ? ((_x = (_w = document.navigation) == null ? void 0 : _w.group) == null ? void 0 : _x.title) ? { step: CREATE_MENU_GROUP_STEP_ID, path: "routeId" } : void 0 : (_z = (_y = document.navigation) == null ? void 0 : _y.group) == null ? void 0 : _z.routeId
|
|
115
118
|
})
|
|
116
119
|
});
|
|
117
120
|
steps.push({
|
|
@@ -119,13 +122,14 @@ function compileCreatePlan(document, getCollection) {
|
|
|
119
122
|
action: "createPage",
|
|
120
123
|
values: (0, import_service_utils.buildDefinedPayload)({
|
|
121
124
|
layoutUid,
|
|
125
|
+
portalUid,
|
|
122
126
|
menuRouteId: { step: CREATE_MENU_ITEM_STEP_ID, path: "routeId" },
|
|
123
127
|
title: chrome.pageTitle,
|
|
124
|
-
icon: (
|
|
125
|
-
documentTitle: (
|
|
126
|
-
enableHeader: (
|
|
128
|
+
icon: (_A = document.page) == null ? void 0 : _A.icon,
|
|
129
|
+
documentTitle: (_B = document.page) == null ? void 0 : _B.documentTitle,
|
|
130
|
+
enableHeader: (_C = document.page) == null ? void 0 : _C.enableHeader,
|
|
127
131
|
enableTabs: chrome.enableTabs,
|
|
128
|
-
displayTitle: (
|
|
132
|
+
displayTitle: (_D = document.page) == null ? void 0 : _D.displayTitle,
|
|
129
133
|
tabTitle: chrome.tabTitle,
|
|
130
134
|
tabIcon: chrome.tabIcon,
|
|
131
135
|
tabDocumentTitle: chrome.tabDocumentTitle,
|
|
@@ -132,9 +132,25 @@ function normalizeNavigation(input) {
|
|
|
132
132
|
return void 0;
|
|
133
133
|
}
|
|
134
134
|
(0, import_private_utils.assertPlainObject)(input, "flowSurfaces applyBlueprint navigation");
|
|
135
|
-
(0, import_private_utils.assertOnlyAllowedKeys)(input, "flowSurfaces applyBlueprint navigation", ["layoutUid", "group", "item"]);
|
|
135
|
+
(0, import_private_utils.assertOnlyAllowedKeys)(input, "flowSurfaces applyBlueprint navigation", ["layoutUid", "portalUid", "group", "item"]);
|
|
136
|
+
const layoutUid = (0, import_private_utils.readOptionalString)(input.layoutUid);
|
|
137
|
+
const portalUid = (0, import_private_utils.readOptionalString)(input.portalUid);
|
|
138
|
+
if (layoutUid && portalUid) {
|
|
139
|
+
(0, import_errors.throwBadRequest)(
|
|
140
|
+
`flowSurfaces applyBlueprint navigation.layoutUid and navigation.portalUid are mutually exclusive`,
|
|
141
|
+
{
|
|
142
|
+
ruleId: "navigation-target-mutually-exclusive",
|
|
143
|
+
path: "$.navigation.portalUid",
|
|
144
|
+
details: {
|
|
145
|
+
layoutUid,
|
|
146
|
+
portalUid
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
136
151
|
const normalized = (0, import_service_utils.buildDefinedPayload)({
|
|
137
|
-
layoutUid
|
|
152
|
+
layoutUid,
|
|
153
|
+
portalUid,
|
|
138
154
|
group: import_lodash.default.isUndefined(input.group) ? void 0 : (() => {
|
|
139
155
|
(0, import_private_utils.assertPlainObject)(input.group, "flowSurfaces applyBlueprint navigation.group");
|
|
140
156
|
(0, import_private_utils.assertOnlyAllowedKeys)(input.group, "flowSurfaces applyBlueprint navigation.group", [
|
|
@@ -937,6 +937,9 @@ function inferPopupActionSourceId(resourceInit) {
|
|
|
937
937
|
if (!(resourceInit == null ? void 0 : resourceInit.associationName)) {
|
|
938
938
|
return void 0;
|
|
939
939
|
}
|
|
940
|
+
if (!Object.prototype.hasOwnProperty.call(resourceInit, "sourceId")) {
|
|
941
|
+
return "{{ctx.view.inputArgs.sourceId}}";
|
|
942
|
+
}
|
|
940
943
|
const sourceId = typeof (resourceInit == null ? void 0 : resourceInit.sourceId) === "string" ? resourceInit.sourceId.trim() : resourceInit == null ? void 0 : resourceInit.sourceId;
|
|
941
944
|
if (!sourceId) {
|
|
942
945
|
return void 0;
|
|
@@ -52,6 +52,13 @@ export declare const FLOW_SURFACE_ACTION_DEFINITIONS: {
|
|
|
52
52
|
readonly mutate: false;
|
|
53
53
|
readonly valueSource: "default";
|
|
54
54
|
};
|
|
55
|
+
readonly listNavigationTargets: {
|
|
56
|
+
readonly method: "post";
|
|
57
|
+
readonly read: true;
|
|
58
|
+
readonly transaction: false;
|
|
59
|
+
readonly mutate: false;
|
|
60
|
+
readonly valueSource: "default";
|
|
61
|
+
};
|
|
55
62
|
readonly getReactionMeta: {
|
|
56
63
|
readonly method: "post";
|
|
57
64
|
readonly read: true;
|
|
@@ -380,7 +387,7 @@ type SelectFlowSurfaceActionNames<TFlag extends keyof FlowSurfaceActionDefinitio
|
|
|
380
387
|
[K in FlowSurfacesActionName]: (typeof FLOW_SURFACE_ACTION_DEFINITIONS)[K][TFlag] extends true ? K : never;
|
|
381
388
|
}[FlowSurfacesActionName];
|
|
382
389
|
type FlowSurfaceMutateActionName = SelectFlowSurfaceActionNames<'mutate'>;
|
|
383
|
-
export declare const FLOW_SURFACES_ACTION_NAMES: ("setFieldValueRules" | "setBlockLinkageRules" | "setFieldLinkageRules" | "setActionLinkageRules" | "context" | "get" | "configure" | "apply" | "createPage" | "addTab" | "addPopupTab" | "addBlock" | "addField" | "addAction" | "addRecordAction" | "compose" | "createMenu" | "catalog" | "describeSurface" | "exportBlueprint" | "getReactionMeta" | "applyBlueprint" | "applyApprovalBlueprint" | "listTemplates" | "getTemplate" | "saveTemplate" | "updateTemplate" | "destroyTemplate" | "convertTemplateToCopy" | "updateMenu" | "destroyPage" | "updateTab" | "moveTab" | "removeTab" | "updatePopupTab" | "movePopupTab" | "removePopupTab" | "addBlocks" | "addFields" | "addActions" | "addRecordActions" | "updateSettings" | "getEventFlowMeta" | "addEventFlow" | "setEventFlow" | "removeEventFlow" | "setEventFlows" | "setLayout" | "moveNode" | "removeNode" | "mutate")[];
|
|
390
|
+
export declare const FLOW_SURFACES_ACTION_NAMES: ("setFieldValueRules" | "setBlockLinkageRules" | "setFieldLinkageRules" | "setActionLinkageRules" | "context" | "get" | "configure" | "apply" | "createPage" | "addTab" | "addPopupTab" | "addBlock" | "addField" | "addAction" | "addRecordAction" | "compose" | "createMenu" | "catalog" | "describeSurface" | "exportBlueprint" | "listNavigationTargets" | "getReactionMeta" | "applyBlueprint" | "applyApprovalBlueprint" | "listTemplates" | "getTemplate" | "saveTemplate" | "updateTemplate" | "destroyTemplate" | "convertTemplateToCopy" | "updateMenu" | "destroyPage" | "updateTab" | "moveTab" | "removeTab" | "updatePopupTab" | "movePopupTab" | "removePopupTab" | "addBlocks" | "addFields" | "addActions" | "addRecordActions" | "updateSettings" | "getEventFlowMeta" | "addEventFlow" | "setEventFlow" | "removeEventFlow" | "setEventFlows" | "setLayout" | "moveNode" | "removeNode" | "mutate")[];
|
|
384
391
|
export declare const FLOW_SURFACES_READ_ACTION_NAMES: SelectFlowSurfaceActionNames<"read">[];
|
|
385
392
|
export declare const FLOW_SURFACE_MUTATE_OP_TYPES: FlowSurfaceMutateActionName[];
|
|
386
|
-
export declare const FLOW_SURFACES_ACTION_METHODS: Record<"setFieldValueRules" | "setBlockLinkageRules" | "setFieldLinkageRules" | "setActionLinkageRules" | "context" | "get" | "configure" | "apply" | "createPage" | "addTab" | "addPopupTab" | "addBlock" | "addField" | "addAction" | "addRecordAction" | "compose" | "createMenu" | "catalog" | "describeSurface" | "exportBlueprint" | "getReactionMeta" | "applyBlueprint" | "applyApprovalBlueprint" | "listTemplates" | "getTemplate" | "saveTemplate" | "updateTemplate" | "destroyTemplate" | "convertTemplateToCopy" | "updateMenu" | "destroyPage" | "updateTab" | "moveTab" | "removeTab" | "updatePopupTab" | "movePopupTab" | "removePopupTab" | "addBlocks" | "addFields" | "addActions" | "addRecordActions" | "updateSettings" | "getEventFlowMeta" | "addEventFlow" | "setEventFlow" | "removeEventFlow" | "setEventFlows" | "setLayout" | "moveNode" | "removeNode" | "mutate", FlowSurfaceActionMethod>;
|
|
393
|
+
export declare const FLOW_SURFACES_ACTION_METHODS: Record<"setFieldValueRules" | "setBlockLinkageRules" | "setFieldLinkageRules" | "setActionLinkageRules" | "context" | "get" | "configure" | "apply" | "createPage" | "addTab" | "addPopupTab" | "addBlock" | "addField" | "addAction" | "addRecordAction" | "compose" | "createMenu" | "catalog" | "describeSurface" | "exportBlueprint" | "listNavigationTargets" | "getReactionMeta" | "applyBlueprint" | "applyApprovalBlueprint" | "listTemplates" | "getTemplate" | "saveTemplate" | "updateTemplate" | "destroyTemplate" | "convertTemplateToCopy" | "updateMenu" | "destroyPage" | "updateTab" | "moveTab" | "removeTab" | "updatePopupTab" | "movePopupTab" | "removePopupTab" | "addBlocks" | "addFields" | "addActions" | "addRecordActions" | "updateSettings" | "getEventFlowMeta" | "addEventFlow" | "setEventFlow" | "removeEventFlow" | "setEventFlows" | "setLayout" | "moveNode" | "removeNode" | "mutate", FlowSurfaceActionMethod>;
|
|
@@ -41,6 +41,7 @@ const FLOW_SURFACE_ACTION_DEFINITIONS = {
|
|
|
41
41
|
get: { method: "get", read: true, transaction: false, mutate: false, valueSource: "read" },
|
|
42
42
|
describeSurface: { method: "post", read: true, transaction: false, mutate: false, valueSource: "default" },
|
|
43
43
|
exportBlueprint: { method: "post", read: true, transaction: false, mutate: false, valueSource: "default" },
|
|
44
|
+
listNavigationTargets: { method: "post", read: true, transaction: false, mutate: false, valueSource: "default" },
|
|
44
45
|
getReactionMeta: { method: "post", read: true, transaction: false, mutate: false, valueSource: "default" },
|
|
45
46
|
setFieldValueRules: { method: "post", read: false, transaction: true, mutate: false, valueSource: "default" },
|
|
46
47
|
setBlockLinkageRules: { method: "post", read: false, transaction: true, mutate: false, valueSource: "default" },
|
|
@@ -393,27 +393,35 @@ function normalizeLinkageRulesValue(value, context, path) {
|
|
|
393
393
|
return value;
|
|
394
394
|
}
|
|
395
395
|
return value.map((rule, index) => {
|
|
396
|
-
if (!import_lodash.default.isPlainObject(rule)
|
|
397
|
-
|
|
396
|
+
if (!import_lodash.default.isPlainObject(rule)) {
|
|
397
|
+
(0, import_errors.throwBadRequest)(
|
|
398
|
+
`flowSurfaces updateSettings domain '${getLinkageRuleDomainPath(context, path, index)}' on '${context.use}' expects each linkage rule to be an object`
|
|
399
|
+
);
|
|
398
400
|
}
|
|
399
401
|
const normalizedRule = import_lodash.default.cloneDeep(rule);
|
|
400
|
-
const
|
|
402
|
+
const hasCondition = import_lodash.default.has(normalizedRule, "condition");
|
|
403
|
+
const hasWhen = import_lodash.default.has(normalizedRule, "when");
|
|
404
|
+
const conditionLeaf = hasCondition ? "condition" : hasWhen ? "when" : "condition";
|
|
405
|
+
const conditionInput = hasCondition ? import_lodash.default.get(normalizedRule, "condition") : hasWhen ? import_lodash.default.get(normalizedRule, "when") : import_filter_group.FLOW_SURFACE_EMPTY_FILTER_GROUP;
|
|
401
406
|
import_lodash.default.set(
|
|
402
407
|
normalizedRule,
|
|
403
408
|
"condition",
|
|
404
409
|
(0, import_filter_group.normalizeFlowSurfaceCompatibleFilterGroupValue)(
|
|
405
|
-
|
|
406
|
-
`flowSurfaces updateSettings domain '${
|
|
410
|
+
conditionInput,
|
|
411
|
+
`flowSurfaces updateSettings domain '${getLinkageRuleDomainPath(context, path, index, conditionLeaf)}' on '${context.use}' expects FilterGroup or backend query filter like ${import_filter_group.FLOW_SURFACE_FILTER_GROUP_EXAMPLE}`,
|
|
407
412
|
{ strictDateValues: true }
|
|
408
413
|
)
|
|
409
414
|
);
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
415
|
+
const hasActions = import_lodash.default.has(normalizedRule, "actions");
|
|
416
|
+
const hasThen = import_lodash.default.has(normalizedRule, "then");
|
|
417
|
+
const actionsLeaf = hasActions ? "actions" : hasThen ? "then" : "actions";
|
|
418
|
+
const actionsInput = hasActions ? import_lodash.default.get(normalizedRule, "actions") : hasThen ? import_lodash.default.get(normalizedRule, "then") : [];
|
|
419
|
+
if (!Array.isArray(actionsInput)) {
|
|
413
420
|
(0, import_errors.throwBadRequest)(
|
|
414
|
-
`flowSurfaces updateSettings domain '${getLinkageRuleDomainPath(context, path, index,
|
|
421
|
+
`flowSurfaces updateSettings domain '${getLinkageRuleDomainPath(context, path, index, actionsLeaf)}' on '${context.use}' expects actions/then to be an array`
|
|
415
422
|
);
|
|
416
423
|
}
|
|
424
|
+
import_lodash.default.set(normalizedRule, "actions", actionsInput);
|
|
417
425
|
if (!import_lodash.default.has(normalizedRule, "key")) {
|
|
418
426
|
import_lodash.default.set(normalizedRule, "key", `linkage-rule-${index + 1}`);
|
|
419
427
|
}
|
|
@@ -425,12 +433,14 @@ function normalizeLinkageRulesValue(value, context, path) {
|
|
|
425
433
|
import_lodash.default.set(normalizedRule, "enable", typeof enabled === "boolean" ? enabled : true);
|
|
426
434
|
}
|
|
427
435
|
import_lodash.default.unset(normalizedRule, "enabled");
|
|
436
|
+
import_lodash.default.unset(normalizedRule, "when");
|
|
437
|
+
import_lodash.default.unset(normalizedRule, "then");
|
|
428
438
|
return normalizedRule;
|
|
429
439
|
});
|
|
430
440
|
}
|
|
431
441
|
function getLinkageRuleDomainPath(context, path, index, leaf) {
|
|
432
442
|
const basePath = context.groupKey ? `${context.domain}.${context.groupKey}.${path}[${index}]` : `${context.domain}.${path}[${index}]`;
|
|
433
|
-
return `${basePath}.${leaf}
|
|
443
|
+
return leaf ? `${basePath}.${leaf}` : basePath;
|
|
434
444
|
}
|
|
435
445
|
function isContractDefinedFlowGroup(groupContract) {
|
|
436
446
|
if (!groupContract) {
|