@nocobase/plugin-flow-engine 2.1.0-beta.16 → 2.1.0-beta.19

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.
Files changed (34) hide show
  1. package/dist/ai/ai-employees/nathan/skills/frontend-developer/SKILLS.md +2 -2
  2. package/dist/externalVersion.js +10 -10
  3. package/dist/node_modules/ses/package.json +1 -1
  4. package/dist/node_modules/zod/package.json +1 -1
  5. package/dist/server/flow-surfaces/action-scope.d.ts +1 -0
  6. package/dist/server/flow-surfaces/action-scope.js +4 -0
  7. package/dist/server/flow-surfaces/association-title-field.d.ts +1 -1
  8. package/dist/server/flow-surfaces/association-title-field.js +38 -4
  9. package/dist/server/flow-surfaces/blueprint/compile-blocks.js +24 -2
  10. package/dist/server/flow-surfaces/blueprint/public-types.d.ts +1 -1
  11. package/dist/server/flow-surfaces/builder.js +69 -1
  12. package/dist/server/flow-surfaces/catalog.d.ts +1 -1
  13. package/dist/server/flow-surfaces/catalog.js +187 -106
  14. package/dist/server/flow-surfaces/compose-compiler.js +1 -1
  15. package/dist/server/flow-surfaces/configure-options.js +33 -0
  16. package/dist/server/flow-surfaces/core-field-default-bindings.d.ts +12 -0
  17. package/dist/server/flow-surfaces/core-field-default-bindings.js +157 -0
  18. package/dist/server/flow-surfaces/default-block-actions.js +24 -0
  19. package/dist/server/flow-surfaces/field-semantics.js +3 -1
  20. package/dist/server/flow-surfaces/index.js +61 -2
  21. package/dist/server/flow-surfaces/node-use-sets.js +3 -0
  22. package/dist/server/flow-surfaces/placement.js +3 -0
  23. package/dist/server/flow-surfaces/public-data-surface-default-filter.d.ts +4 -0
  24. package/dist/server/flow-surfaces/public-data-surface-default-filter.js +45 -4
  25. package/dist/server/flow-surfaces/service-helpers.js +3 -70
  26. package/dist/server/flow-surfaces/service.d.ts +42 -1
  27. package/dist/server/flow-surfaces/service.js +1392 -124
  28. package/dist/server/flow-surfaces/support-matrix.d.ts +1 -1
  29. package/dist/server/flow-surfaces/support-matrix.js +12 -0
  30. package/dist/server/flow-surfaces/surface-context.js +8 -5
  31. package/dist/swagger/flow-surfaces.examples.d.ts +39 -0
  32. package/dist/swagger/flow-surfaces.examples.js +47 -0
  33. package/dist/swagger/flow-surfaces.js +15 -8
  34. package/package.json +2 -2
@@ -2,8 +2,8 @@
2
2
  name: frontend-developer
3
3
  description: Assists with writing, validating, and testing JavaScript code snippets for NocoBase workflows and frontend blocks.
4
4
  introduction:
5
- title: '{{t("ai.skills.frontendDeveloper.title")}}'
6
- about: '{{t("ai.skills.frontendDeveloper.about")}}'
5
+ title: '{{t("ai.skills.frontendDeveloper.title", { ns: "@nocobase/plugin-ai" })}}'
6
+ about: '{{t("ai.skills.frontendDeveloper.about", { ns: "@nocobase/plugin-ai" })}}'
7
7
  ---
8
8
 
9
9
  You are a professional frontend developer assistant for NocoBase.
@@ -8,16 +8,16 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.0-beta.16",
11
+ "@nocobase/client": "2.1.0-beta.19",
12
12
  "lodash": "4.18.1",
13
- "@nocobase/database": "2.1.0-beta.16",
14
- "@nocobase/data-source-manager": "2.1.0-beta.16",
15
- "@nocobase/resourcer": "2.1.0-beta.16",
16
- "@nocobase/utils": "2.1.0-beta.16",
17
- "@nocobase/cache": "2.1.0-beta.16",
18
- "@nocobase/plugin-localization": "2.1.0-beta.16",
19
- "@nocobase/server": "2.1.0-beta.16",
20
- "@nocobase/actions": "2.1.0-beta.16",
13
+ "@nocobase/database": "2.1.0-beta.19",
14
+ "@nocobase/data-source-manager": "2.1.0-beta.19",
15
+ "@nocobase/resourcer": "2.1.0-beta.19",
16
+ "@nocobase/utils": "2.1.0-beta.19",
17
+ "@nocobase/cache": "2.1.0-beta.19",
18
+ "@nocobase/plugin-localization": "2.1.0-beta.19",
19
+ "@nocobase/server": "2.1.0-beta.19",
20
+ "@nocobase/actions": "2.1.0-beta.19",
21
21
  "@formily/json-schema": "2.3.7",
22
- "@nocobase/ai": "2.1.0-beta.16"
22
+ "@nocobase/ai": "2.1.0-beta.19"
23
23
  };
@@ -1 +1 @@
1
- {"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-04-24T10:36:09.247Z"}
1
+ {"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-04-26T10:49:26.188Z"}
@@ -1 +1 @@
1
- {"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-04-24T10:36:10.254Z"}
1
+ {"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-04-26T10:49:27.231Z"}
@@ -9,6 +9,7 @@
9
9
  import type { FlowSurfaceActionScope } from './types';
10
10
  export declare const TABLE_BLOCK_ACTION_CONTAINER_USES: string[];
11
11
  export declare const CALENDAR_BLOCK_ACTION_CONTAINER_USES: string[];
12
+ export declare const KANBAN_BLOCK_ACTION_CONTAINER_USES: string[];
12
13
  export declare const TABLE_ROW_ACTION_CONTAINER_USES: string[];
13
14
  export declare const LIST_BLOCK_ACTION_CONTAINER_USES: string[];
14
15
  export declare const LIST_RECORD_ACTION_CONTAINER_USES: string[];
@@ -33,6 +33,7 @@ __export(action_scope_exports, {
33
33
  DETAILS_ACTION_CONTAINER_USES: () => DETAILS_ACTION_CONTAINER_USES,
34
34
  FILTER_FORM_ACTION_CONTAINER_USES: () => FILTER_FORM_ACTION_CONTAINER_USES,
35
35
  FORM_ACTION_CONTAINER_USES: () => FORM_ACTION_CONTAINER_USES,
36
+ KANBAN_BLOCK_ACTION_CONTAINER_USES: () => KANBAN_BLOCK_ACTION_CONTAINER_USES,
36
37
  LIST_BLOCK_ACTION_CONTAINER_USES: () => LIST_BLOCK_ACTION_CONTAINER_USES,
37
38
  LIST_RECORD_ACTION_CONTAINER_USES: () => LIST_RECORD_ACTION_CONTAINER_USES,
38
39
  RECORD_ACTION_CONTAINER_USES: () => RECORD_ACTION_CONTAINER_USES,
@@ -50,6 +51,7 @@ var import_errors = require("./errors");
50
51
  const ACTION_SCOPE_SET = /* @__PURE__ */ new Set(["block", "record", "form", "filterForm", "actionPanel"]);
51
52
  const TABLE_BLOCK_ACTION_CONTAINER_USES = ["TableBlockModel"];
52
53
  const CALENDAR_BLOCK_ACTION_CONTAINER_USES = ["CalendarBlockModel"];
54
+ const KANBAN_BLOCK_ACTION_CONTAINER_USES = ["KanbanBlockModel"];
53
55
  const TABLE_ROW_ACTION_CONTAINER_USES = ["TableActionsColumnModel"];
54
56
  const LIST_BLOCK_ACTION_CONTAINER_USES = ["ListBlockModel", "GridCardBlockModel"];
55
57
  const LIST_RECORD_ACTION_CONTAINER_USES = ["ListItemModel", "GridCardItemModel"];
@@ -69,6 +71,7 @@ const RECORD_ACTION_CONTAINER_USES = [
69
71
  ];
70
72
  const ACTION_CONTAINER_SCOPE_BY_USE = Object.fromEntries([
71
73
  ...COLLECTION_BLOCK_ACTION_CONTAINER_USES.map((use) => [use, "block"]),
74
+ ...KANBAN_BLOCK_ACTION_CONTAINER_USES.map((use) => [use, "block"]),
72
75
  ...RECORD_ACTION_CONTAINER_USES.map((use) => [use, "record"]),
73
76
  ...FORM_ACTION_CONTAINER_USES.map((use) => [use, "form"]),
74
77
  ...FILTER_FORM_ACTION_CONTAINER_USES.map((use) => [use, "filterForm"]),
@@ -139,6 +142,7 @@ function assertRequestedActionScope(input) {
139
142
  DETAILS_ACTION_CONTAINER_USES,
140
143
  FILTER_FORM_ACTION_CONTAINER_USES,
141
144
  FORM_ACTION_CONTAINER_USES,
145
+ KANBAN_BLOCK_ACTION_CONTAINER_USES,
142
146
  LIST_BLOCK_ACTION_CONTAINER_USES,
143
147
  LIST_RECORD_ACTION_CONTAINER_USES,
144
148
  RECORD_ACTION_CONTAINER_USES,
@@ -9,7 +9,7 @@
9
9
  export type FlowSurfaceResolvedAssociationTitleField = {
10
10
  field: any;
11
11
  fieldName: string;
12
- source: 'explicit' | 'firstTitleable';
12
+ source: 'explicit' | 'firstTitleable' | 'relationFieldLabel';
13
13
  targetCollection?: any;
14
14
  };
15
15
  export declare function isTitleableCollectionField(field: any): any;
@@ -38,7 +38,6 @@ var import_errors = require("./errors");
38
38
  var import_service_helpers = require("./service-helpers");
39
39
  const FALLBACK_TITLE_USABLE_INTERFACES = /* @__PURE__ */ new Set([
40
40
  "attachmentURL",
41
- "createdAt",
42
41
  "date",
43
42
  "datetime",
44
43
  "datetimeNoTz",
@@ -60,11 +59,12 @@ const FALLBACK_TITLE_USABLE_INTERFACES = /* @__PURE__ */ new Set([
60
59
  "textarea",
61
60
  "time",
62
61
  "unixTimestamp",
63
- "updatedAt",
64
62
  "url",
65
63
  "uuid",
66
64
  "vditor"
67
65
  ]);
66
+ const LAST_RESORT_TITLE_FIELD_NAMES = /* @__PURE__ */ new Set(["createdAt", "updatedAt"]);
67
+ const LAST_RESORT_TITLE_FIELD_INTERFACES = /* @__PURE__ */ new Set(["createdAt", "updatedAt"]);
68
68
  function isTitleableCollectionField(field) {
69
69
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
70
70
  const configured = (field == null ? void 0 : field.titleable) ?? (field == null ? void 0 : field.titleUsable) ?? ((_a = field == null ? void 0 : field.options) == null ? void 0 : _a.titleable) ?? ((_b = field == null ? void 0 : field.options) == null ? void 0 : _b.titleUsable);
@@ -90,6 +90,25 @@ function getExplicitCollectionTitleFieldName(collection) {
90
90
  const explicit = (_a = collection == null ? void 0 : collection.options) == null ? void 0 : _a.titleField;
91
91
  return typeof explicit === "string" ? explicit.trim() || void 0 : void 0;
92
92
  }
93
+ function normalizeTitleFieldName(value) {
94
+ if (typeof value !== "string") {
95
+ return void 0;
96
+ }
97
+ const normalized = value.trim();
98
+ return normalized || void 0;
99
+ }
100
+ function getAssociationConfiguredLabelFieldName(field) {
101
+ var _a, _b, _c, _d, _e, _f, _g;
102
+ return normalizeTitleFieldName((_c = (_b = (_a = field == null ? void 0 : field.uiSchema) == null ? void 0 : _a["x-component-props"]) == null ? void 0 : _b.fieldNames) == null ? void 0 : _c.label) || normalizeTitleFieldName((_g = (_f = (_e = (_d = field == null ? void 0 : field.options) == null ? void 0 : _d.uiSchema) == null ? void 0 : _e["x-component-props"]) == null ? void 0 : _f.fieldNames) == null ? void 0 : _g.label);
103
+ }
104
+ function isLastResortTitleField(field) {
105
+ const fieldName = (0, import_service_helpers.getFieldName)(field);
106
+ if (fieldName && LAST_RESORT_TITLE_FIELD_NAMES.has(fieldName)) {
107
+ return true;
108
+ }
109
+ const fieldInterface = (0, import_service_helpers.getFieldInterface)(field);
110
+ return !!(fieldInterface && LAST_RESORT_TITLE_FIELD_INTERFACES.has(fieldInterface));
111
+ }
93
112
  function assertCollectionTitleFieldExists(collection, fieldName) {
94
113
  const normalizedFieldName = typeof fieldName === "string" ? fieldName.trim() : String(fieldName || "").trim();
95
114
  if (!normalizedFieldName) {
@@ -123,9 +142,12 @@ function resolveCollectionSafeTitleField(collection) {
123
142
  if (!firstTitleableField) {
124
143
  return null;
125
144
  }
145
+ const preferredTitleableField = (0, import_service_helpers.getCollectionFields)(collection).find(
146
+ (field) => !!(0, import_service_helpers.getFieldName)(field) && isTitleableCollectionField(field) && !isLastResortTitleField(field)
147
+ ) || firstTitleableField;
126
148
  return {
127
- field: firstTitleableField,
128
- fieldName: (0, import_service_helpers.getFieldName)(firstTitleableField),
149
+ field: preferredTitleableField,
150
+ fieldName: (0, import_service_helpers.getFieldName)(preferredTitleableField),
129
151
  source: "firstTitleable",
130
152
  targetCollection: collection
131
153
  };
@@ -138,6 +160,18 @@ function resolveAssociationSafeTitleField(field, dataSourceKey, getCollection) {
138
160
  if (!targetCollection) {
139
161
  return null;
140
162
  }
163
+ const configuredLabelFieldName = getAssociationConfiguredLabelFieldName(field);
164
+ if (configuredLabelFieldName) {
165
+ const configuredLabelField = (0, import_service_helpers.resolveFieldFromCollection)(targetCollection, configuredLabelFieldName);
166
+ if (configuredLabelField) {
167
+ return {
168
+ field: configuredLabelField,
169
+ fieldName: configuredLabelFieldName,
170
+ source: "relationFieldLabel",
171
+ targetCollection
172
+ };
173
+ }
174
+ }
141
175
  const resolved = resolveCollectionSafeTitleField(targetCollection);
142
176
  if (!resolved) {
143
177
  return null;
@@ -50,6 +50,7 @@ var import_private_utils = require("./private-utils");
50
50
  const APPLY_BLUEPRINT_BLOCK_TYPE_ENUM = [
51
51
  "table",
52
52
  "calendar",
53
+ "kanban",
53
54
  "createForm",
54
55
  "editForm",
55
56
  "details",
@@ -156,6 +157,9 @@ function assertApplyBlueprintFieldsLayoutHost(block, context) {
156
157
  if (!Object.prototype.hasOwnProperty.call(block, "fieldsLayout")) {
157
158
  return;
158
159
  }
160
+ if ((0, import_private_utils.readOptionalString)(block.type) === "kanban") {
161
+ (0, import_errors.throwBadRequest)(`${context}.fieldsLayout is not supported on kanban main blocks; use fields[] only`);
162
+ }
159
163
  if (APPLY_BLUEPRINT_FIELD_GRID_BLOCK_TYPES.has((0, import_private_utils.readOptionalString)(block.type) || "")) {
160
164
  return;
161
165
  }
@@ -181,6 +185,17 @@ function assertApplyBlueprintCalendarMainContent(block, context) {
181
185
  );
182
186
  }
183
187
  }
188
+ function assertApplyBlueprintKanbanMainContent(block, context) {
189
+ if ((0, import_private_utils.readOptionalString)(block.type) !== "kanban") {
190
+ return;
191
+ }
192
+ if (Object.prototype.hasOwnProperty.call(block, "fieldGroups")) {
193
+ (0, import_errors.throwBadRequest)(`${context}.fieldGroups is not supported on kanban main blocks; use fields instead`);
194
+ }
195
+ if (Object.prototype.hasOwnProperty.call(block, "recordActions")) {
196
+ (0, import_errors.throwBadRequest)(`${context}.recordActions is not supported on kanban main blocks in v1`);
197
+ }
198
+ }
184
199
  function assertApplyBlueprintBlockType(type, context) {
185
200
  if (!type) {
186
201
  return;
@@ -858,6 +873,7 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
858
873
  (0, import_errors.throwBadRequest)(`${context}[${index}] must be an object`);
859
874
  }
860
875
  assertApplyBlueprintCalendarMainContent(block, `${context}[${index}]`);
876
+ assertApplyBlueprintKanbanMainContent(block, `${context}[${index}]`);
861
877
  const fields = resolveBlockFieldInputs(block, `${context}[${index}]`);
862
878
  fields.forEach((field, fieldIndex) => {
863
879
  if (typeof (field == null ? void 0 : field.target) !== "string" || !field.target.trim()) {
@@ -877,6 +893,7 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
877
893
  (0, import_private_utils.assertOnlyAllowedKeys)(block, `${context}[${index}]`, APPLY_BLUEPRINT_BLOCK_ALLOWED_KEYS);
878
894
  assertApplyBlueprintBlockType((0, import_private_utils.readOptionalString)(block.type), `${context}[${index}]`);
879
895
  assertApplyBlueprintCalendarMainContent(block, `${context}[${index}]`);
896
+ assertApplyBlueprintKanbanMainContent(block, `${context}[${index}]`);
880
897
  const explicitKey = (0, import_private_utils.readString)(block.key);
881
898
  const fallback = block.type ? `${block.type}_${index + 1}` : `block_${index + 1}`;
882
899
  const localKey = (0, import_private_utils.normalizeBlueprintLocalKey)(block.key, fallback, `${context}[${index}].key`);
@@ -913,6 +930,11 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
913
930
  template,
914
931
  path: blockContext
915
932
  });
933
+ if (!import_lodash.default.isUndefined(blockDefaultFilter)) {
934
+ (0, import_public_data_surface_default_filter.assertFlowSurfaceConcreteDefaultFilterItem)("applyBlueprint", blockDefaultFilter, {
935
+ path: blockContext
936
+ });
937
+ }
916
938
  const fieldInputs = resolveBlockFieldInputs(block, blockContext);
917
939
  const fields = fieldInputs.map(
918
940
  (field, fieldIndex) => compileField(
@@ -967,9 +989,9 @@ function compileBlocks(input, scopePrefix, assets, context, defaults, requiredEx
967
989
  template,
968
990
  settings: Object.keys(settings).length ? settings : void 0,
969
991
  fields: blockType === "calendar" ? void 0 : fields,
970
- fieldsLayout: blockType === "calendar" ? void 0 : fieldsLayout,
992
+ fieldsLayout: blockType === "calendar" || blockType === "kanban" ? void 0 : fieldsLayout,
971
993
  actions: actionsWithDefaultFilter,
972
- recordActions: blockType === "calendar" ? void 0 : mergedActions.recordActions
994
+ recordActions: blockType === "calendar" || blockType === "kanban" ? void 0 : mergedActions.recordActions
973
995
  });
974
996
  });
975
997
  return {
@@ -132,7 +132,7 @@ export type FlowSurfaceApplyBlueprintActionObjectSpec = {
132
132
  chart?: string;
133
133
  };
134
134
  export type FlowSurfaceApplyBlueprintActionSpec = string | FlowSurfaceApplyBlueprintActionObjectSpec;
135
- export type FlowSurfaceApplyBlueprintBlockType = 'table' | 'createForm' | 'editForm' | 'details' | 'filterForm' | 'list' | 'gridCard' | 'markdown' | 'iframe' | 'chart' | 'actionPanel' | 'jsBlock';
135
+ export type FlowSurfaceApplyBlueprintBlockType = 'table' | 'createForm' | 'editForm' | 'details' | 'filterForm' | 'calendar' | 'kanban' | 'list' | 'gridCard' | 'markdown' | 'iframe' | 'chart' | 'actionPanel' | 'jsBlock';
136
136
  export type FlowSurfaceApplyBlueprintBlockSpec = {
137
137
  key?: string;
138
138
  type?: FlowSurfaceApplyBlueprintBlockType;
@@ -119,6 +119,8 @@ const JS_ITEM_DEFAULT_CODE = [
119
119
  const JS_COLUMN_DEFAULT_CODE = `ctx.render('<span class="nb-js-column">JS column</span>');`;
120
120
  const CALENDAR_QUICK_CREATE_ACTION_KEY = "quickCreateAction";
121
121
  const CALENDAR_EVENT_VIEW_ACTION_KEY = "eventViewAction";
122
+ const KANBAN_QUICK_CREATE_ACTION_KEY = "quickCreateAction";
123
+ const KANBAN_CARD_VIEW_ACTION_KEY = "cardViewAction";
122
124
  const CALENDAR_READONLY_ACTION_MODEL_USES = /* @__PURE__ */ new Set([
123
125
  "CalendarNavActionModel",
124
126
  "CalendarTitleActionModel",
@@ -264,7 +266,7 @@ function buildBlockTree(options) {
264
266
  import_lodash.default.set(baseStepParams, ["resourceSettings", "init"], normalizedResourceInit);
265
267
  }
266
268
  const model = {
267
- ...use === "CalendarBlockModel" ? { uid: (0, import_utils.uid)() } : {},
269
+ ...use === "CalendarBlockModel" || use === "KanbanBlockModel" ? { uid: (0, import_utils.uid)() } : {},
268
270
  use,
269
271
  ...typeof (approvalBlockDefaults == null ? void 0 : approvalBlockDefaults.async) === "boolean" ? { async: approvalBlockDefaults.async } : {},
270
272
  props: import_lodash.default.merge(
@@ -359,6 +361,31 @@ function buildBlockTree(options) {
359
361
  }
360
362
  }
361
363
  };
364
+ } else if (use === "KanbanBlockModel") {
365
+ const blockUid = model.uid || (0, import_utils.uid)();
366
+ model.uid = blockUid;
367
+ model.subModels = {
368
+ item: {
369
+ uid: (0, import_utils.uid)(),
370
+ use: "KanbanCardItemModel",
371
+ subModels: {
372
+ grid: {
373
+ uid: (0, import_utils.uid)(),
374
+ use: "DetailsGridModel"
375
+ }
376
+ }
377
+ },
378
+ [KANBAN_QUICK_CREATE_ACTION_KEY]: buildKanbanPopupActionNode({
379
+ actionKey: KANBAN_QUICK_CREATE_ACTION_KEY,
380
+ blockUid,
381
+ resourceInit: normalizedResourceInit
382
+ }),
383
+ [KANBAN_CARD_VIEW_ACTION_KEY]: buildKanbanPopupActionNode({
384
+ actionKey: KANBAN_CARD_VIEW_ACTION_KEY,
385
+ blockUid,
386
+ resourceInit: normalizedResourceInit
387
+ })
388
+ };
362
389
  } else if (use === "CalendarBlockModel") {
363
390
  const blockUid = model.uid || (0, import_utils.uid)();
364
391
  model.uid = blockUid;
@@ -379,6 +406,47 @@ function buildBlockTree(options) {
379
406
  }
380
407
  return assignClientKeysToUids(model, {});
381
408
  }
409
+ function buildKanbanPopupActionNode(options) {
410
+ const actionUid = options.actionKey === KANBAN_QUICK_CREATE_ACTION_KEY ? `${options.blockUid}-quick-create-action` : `${options.blockUid}-card-view-action`;
411
+ return {
412
+ uid: actionUid,
413
+ use: options.actionKey === KANBAN_QUICK_CREATE_ACTION_KEY ? "KanbanQuickCreateActionModel" : "KanbanCardViewActionModel",
414
+ stepParams: {
415
+ popupSettings: {
416
+ openView: buildKanbanPopupOpenView({
417
+ actionUid,
418
+ resourceInit: options.resourceInit,
419
+ popupSettings: options.popupSettings
420
+ })
421
+ }
422
+ }
423
+ };
424
+ }
425
+ function buildKanbanPopupOpenView(options) {
426
+ var _a, _b, _c;
427
+ const defaults = import_lodash.default.pickBy(
428
+ {
429
+ mode: "drawer",
430
+ size: "medium",
431
+ pageModelClass: "ChildPageModel",
432
+ uid: options.actionUid,
433
+ collectionName: (_a = options.resourceInit) == null ? void 0 : _a.collectionName,
434
+ dataSourceKey: ((_b = options.resourceInit) == null ? void 0 : _b.dataSourceKey) || (((_c = options.resourceInit) == null ? void 0 : _c.collectionName) ? "main" : void 0)
435
+ },
436
+ (value) => !import_lodash.default.isUndefined(value)
437
+ );
438
+ const current = import_lodash.default.cloneDeep(options.popupSettings || {});
439
+ return import_lodash.default.pickBy(
440
+ {
441
+ ...defaults,
442
+ ...current,
443
+ uid: current.uid || defaults.uid,
444
+ collectionName: current.collectionName || defaults.collectionName,
445
+ dataSourceKey: current.dataSourceKey || defaults.dataSourceKey
446
+ },
447
+ (value) => !import_lodash.default.isUndefined(value)
448
+ );
449
+ }
382
450
  function buildCalendarPopupActionNode(options) {
383
451
  const actionUid = `${options.blockUid}-${options.actionKey}`;
384
452
  return {
@@ -14,7 +14,7 @@ export declare function getSupportedFieldComponentUseSet(input: {
14
14
  enabledPackages?: ReadonlySet<string>;
15
15
  dataSourceKey?: string;
16
16
  getCollection?: (dataSourceKey: string, collectionName: string) => any;
17
- }): Set<any>;
17
+ }): Set<string>;
18
18
  export declare function resolveSupportedFieldCapability(input: {
19
19
  containerUse: string;
20
20
  field?: any;