@nocobase/plugin-flow-engine 2.1.0-alpha.12 → 2.1.0-alpha.13

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 (152) hide show
  1. package/dist/externalVersion.js +12 -11
  2. package/dist/node_modules/ajv/package.json +1 -1
  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-models/schema-contribution-collector.d.ts +2 -1
  6. package/dist/server/flow-models/schema-contribution-collector.js +26 -5
  7. package/dist/server/flow-schema-contributions/actions/aclCheck.d.ts +1 -1
  8. package/dist/server/flow-schema-contributions/actions/aclCheckRefresh.d.ts +1 -1
  9. package/dist/server/flow-schema-contributions/actions/actionLinkageRules.d.ts +1 -1
  10. package/dist/server/flow-schema-contributions/actions/confirm.d.ts +1 -1
  11. package/dist/server/flow-schema-contributions/actions/customVariable.d.ts +1 -1
  12. package/dist/server/flow-schema-contributions/actions/dataScope.d.ts +1 -1
  13. package/dist/server/flow-schema-contributions/actions/detailsFieldLinkageRules.d.ts +1 -1
  14. package/dist/server/flow-schema-contributions/actions/fieldLinkageRules.d.ts +1 -1
  15. package/dist/server/flow-schema-contributions/actions/filterFormDefaultValues.d.ts +1 -1
  16. package/dist/server/flow-schema-contributions/actions/formAssignRules.d.ts +1 -1
  17. package/dist/server/flow-schema-contributions/actions/index.d.ts +1 -1
  18. package/dist/server/flow-schema-contributions/actions/layout.d.ts +1 -1
  19. package/dist/server/flow-schema-contributions/actions/linkageRulesRefresh.d.ts +1 -1
  20. package/dist/server/flow-schema-contributions/actions/navigateToURL.d.ts +1 -1
  21. package/dist/server/flow-schema-contributions/actions/openView.d.ts +1 -1
  22. package/dist/server/flow-schema-contributions/actions/refreshTargetBlocks.d.ts +1 -1
  23. package/dist/server/flow-schema-contributions/actions/runjs.d.ts +1 -1
  24. package/dist/server/flow-schema-contributions/actions/setTargetDataScope.d.ts +1 -1
  25. package/dist/server/flow-schema-contributions/actions/showMessage.d.ts +1 -1
  26. package/dist/server/flow-schema-contributions/actions/showNotification.d.ts +1 -1
  27. package/dist/server/flow-schema-contributions/actions/sortingRule.d.ts +1 -1
  28. package/dist/server/flow-schema-contributions/field-models.d.ts +1 -1
  29. package/dist/server/flow-schema-contributions/index.d.ts +1 -1
  30. package/dist/server/flow-schema-contributions/models/ActionBulkEditModel.d.ts +10 -0
  31. package/dist/server/flow-schema-contributions/models/ActionBulkEditModel.js +382 -0
  32. package/dist/server/flow-schema-contributions/models/ActionBulkUpdateModel.d.ts +10 -0
  33. package/dist/server/flow-schema-contributions/models/ActionBulkUpdateModel.js +169 -0
  34. package/dist/server/flow-schema-contributions/models/ActionCustomRequestModel.d.ts +11 -0
  35. package/dist/server/flow-schema-contributions/models/ActionCustomRequestModel.js +115 -0
  36. package/dist/server/flow-schema-contributions/models/ActionDuplicateModel.d.ts +10 -0
  37. package/dist/server/flow-schema-contributions/models/ActionDuplicateModel.js +169 -0
  38. package/dist/server/flow-schema-contributions/models/ActionExportModel.d.ts +10 -0
  39. package/dist/server/flow-schema-contributions/models/ActionExportModel.js +141 -0
  40. package/dist/server/flow-schema-contributions/models/ActionImportModel.d.ts +10 -0
  41. package/dist/server/flow-schema-contributions/models/ActionImportModel.js +122 -0
  42. package/dist/server/flow-schema-contributions/models/ActionModel.d.ts +1 -1
  43. package/dist/server/flow-schema-contributions/models/AddChildActionModel.d.ts +1 -1
  44. package/dist/server/flow-schema-contributions/models/AddNewActionModel.d.ts +1 -1
  45. package/dist/server/flow-schema-contributions/models/AssignFormGridModel.d.ts +1 -1
  46. package/dist/server/flow-schema-contributions/models/AssignFormItemModel.d.ts +1 -1
  47. package/dist/server/flow-schema-contributions/models/AssignFormModel.d.ts +1 -1
  48. package/dist/server/flow-schema-contributions/models/BasePageTabModel.d.ts +1 -1
  49. package/dist/server/flow-schema-contributions/models/BlockGridCardModel.d.ts +10 -0
  50. package/dist/server/flow-schema-contributions/models/BlockGridCardModel.js +449 -0
  51. package/dist/server/flow-schema-contributions/models/BlockGridModel.d.ts +1 -1
  52. package/dist/server/flow-schema-contributions/models/BlockIframeModel.d.ts +10 -0
  53. package/dist/server/flow-schema-contributions/models/BlockIframeModel.js +143 -0
  54. package/dist/server/flow-schema-contributions/models/BlockListModel.d.ts +10 -0
  55. package/dist/server/flow-schema-contributions/models/BlockListModel.js +435 -0
  56. package/dist/server/flow-schema-contributions/models/BlockMarkdownModel.d.ts +10 -0
  57. package/dist/server/flow-schema-contributions/models/BlockMarkdownModel.js +108 -0
  58. package/dist/server/flow-schema-contributions/models/BlockWorkbenchModel.d.ts +10 -0
  59. package/dist/server/flow-schema-contributions/models/BlockWorkbenchModel.js +173 -0
  60. package/dist/server/flow-schema-contributions/models/BulkDeleteActionModel.d.ts +1 -1
  61. package/dist/server/flow-schema-contributions/models/ChildPageModel.d.ts +1 -1
  62. package/dist/server/flow-schema-contributions/models/ChildPageTabModel.d.ts +1 -1
  63. package/dist/server/flow-schema-contributions/models/CommentsModel.d.ts +10 -0
  64. package/dist/server/flow-schema-contributions/models/CommentsModel.js +255 -0
  65. package/dist/server/flow-schema-contributions/models/CreateFormModel.d.ts +1 -1
  66. package/dist/server/flow-schema-contributions/models/DataVisualizationModel.d.ts +10 -0
  67. package/dist/server/flow-schema-contributions/models/DataVisualizationModel.js +240 -0
  68. package/dist/server/flow-schema-contributions/models/DeleteActionModel.d.ts +1 -1
  69. package/dist/server/flow-schema-contributions/models/DetailsBlockModel.d.ts +1 -1
  70. package/dist/server/flow-schema-contributions/models/DetailsGridModel.d.ts +1 -1
  71. package/dist/server/flow-schema-contributions/models/DetailsItemModel.d.ts +1 -1
  72. package/dist/server/flow-schema-contributions/models/EditActionModel.d.ts +1 -1
  73. package/dist/server/flow-schema-contributions/models/EditFormModel.d.ts +1 -1
  74. package/dist/server/flow-schema-contributions/models/ExpandCollapseActionModel.d.ts +1 -1
  75. package/dist/server/flow-schema-contributions/models/FieldAttachmentUrlModel.d.ts +10 -0
  76. package/dist/server/flow-schema-contributions/models/FieldAttachmentUrlModel.js +87 -0
  77. package/dist/server/flow-schema-contributions/models/FieldCodeModel.d.ts +10 -0
  78. package/dist/server/flow-schema-contributions/models/FieldCodeModel.js +99 -0
  79. package/dist/server/flow-schema-contributions/models/FieldFormulaModel.d.ts +10 -0
  80. package/dist/server/flow-schema-contributions/models/FieldFormulaModel.js +152 -0
  81. package/dist/server/flow-schema-contributions/models/FieldMarkdownVditorModel.d.ts +10 -0
  82. package/dist/server/flow-schema-contributions/models/FieldMarkdownVditorModel.js +92 -0
  83. package/dist/server/flow-schema-contributions/models/FieldSequenceModel.d.ts +10 -0
  84. package/dist/server/flow-schema-contributions/models/FieldSequenceModel.js +60 -0
  85. package/dist/server/flow-schema-contributions/models/FieldSortModel.d.ts +10 -0
  86. package/dist/server/flow-schema-contributions/models/FieldSortModel.js +87 -0
  87. package/dist/server/flow-schema-contributions/models/FileManagerModel.d.ts +10 -0
  88. package/dist/server/flow-schema-contributions/models/FileManagerModel.js +115 -0
  89. package/dist/server/flow-schema-contributions/models/FilterActionModel.d.ts +1 -1
  90. package/dist/server/flow-schema-contributions/models/FilterFormBlockModel.d.ts +1 -1
  91. package/dist/server/flow-schema-contributions/models/FilterFormCollapseActionModel.d.ts +1 -1
  92. package/dist/server/flow-schema-contributions/models/FilterFormCustomFieldModel.d.ts +1 -1
  93. package/dist/server/flow-schema-contributions/models/FilterFormGridModel.d.ts +1 -1
  94. package/dist/server/flow-schema-contributions/models/FilterFormItemModel.d.ts +1 -1
  95. package/dist/server/flow-schema-contributions/models/FilterFormJSActionModel.d.ts +1 -1
  96. package/dist/server/flow-schema-contributions/models/FilterFormResetActionModel.d.ts +1 -1
  97. package/dist/server/flow-schema-contributions/models/FilterFormSubmitActionModel.d.ts +1 -1
  98. package/dist/server/flow-schema-contributions/models/FormAssociationItemModel.d.ts +1 -1
  99. package/dist/server/flow-schema-contributions/models/FormBlockModel.d.ts +1 -1
  100. package/dist/server/flow-schema-contributions/models/FormGridModel.d.ts +1 -1
  101. package/dist/server/flow-schema-contributions/models/FormItemModel.d.ts +1 -1
  102. package/dist/server/flow-schema-contributions/models/FormSubmitActionModel.d.ts +1 -1
  103. package/dist/server/flow-schema-contributions/models/JSActionModel.d.ts +1 -1
  104. package/dist/server/flow-schema-contributions/models/JSBlockModel.d.ts +1 -1
  105. package/dist/server/flow-schema-contributions/models/JSCollectionActionModel.d.ts +1 -1
  106. package/dist/server/flow-schema-contributions/models/JSColumnModel.d.ts +1 -1
  107. package/dist/server/flow-schema-contributions/models/JSFormActionModel.d.ts +1 -1
  108. package/dist/server/flow-schema-contributions/models/JSItemModel.d.ts +1 -1
  109. package/dist/server/flow-schema-contributions/models/JSRecordActionModel.d.ts +1 -1
  110. package/dist/server/flow-schema-contributions/models/LinkActionModel.d.ts +1 -1
  111. package/dist/server/flow-schema-contributions/models/MapModel.d.ts +10 -0
  112. package/dist/server/flow-schema-contributions/models/MapModel.js +427 -0
  113. package/dist/server/flow-schema-contributions/models/PageModel.d.ts +1 -1
  114. package/dist/server/flow-schema-contributions/models/PageTabModel.d.ts +1 -1
  115. package/dist/server/flow-schema-contributions/models/PopupActionModel.d.ts +1 -1
  116. package/dist/server/flow-schema-contributions/models/PopupCollectionActionModel.d.ts +1 -1
  117. package/dist/server/flow-schema-contributions/models/RefreshActionModel.d.ts +1 -1
  118. package/dist/server/flow-schema-contributions/models/RootPageModel.d.ts +1 -1
  119. package/dist/server/flow-schema-contributions/models/RootPageTabModel.d.ts +1 -1
  120. package/dist/server/flow-schema-contributions/models/RouteModel.d.ts +1 -1
  121. package/dist/server/flow-schema-contributions/models/TableActionsColumnModel.d.ts +1 -1
  122. package/dist/server/flow-schema-contributions/models/TableBlockModel.d.ts +1 -1
  123. package/dist/server/flow-schema-contributions/models/TableColumnModel.d.ts +1 -1
  124. package/dist/server/flow-schema-contributions/models/TableCustomColumnModel.d.ts +1 -1
  125. package/dist/server/flow-schema-contributions/models/UiTemplatesModel.d.ts +10 -0
  126. package/dist/server/flow-schema-contributions/models/UiTemplatesModel.js +130 -0
  127. package/dist/server/flow-schema-contributions/models/UpdateRecordActionModel.d.ts +1 -1
  128. package/dist/server/flow-schema-contributions/models/ViewActionModel.d.ts +1 -1
  129. package/dist/server/flow-schema-contributions/models/index.d.ts +6 -1
  130. package/dist/server/flow-schema-contributions/models/index.js +114 -0
  131. package/dist/server/flow-schema-contributions/shared.d.ts +1 -1
  132. package/dist/server/flow-schema-registry/FlowSchemaRegistry.d.ts +154 -0
  133. package/dist/server/flow-schema-registry/FlowSchemaRegistry.js +1424 -0
  134. package/dist/server/flow-schema-registry/flow-schema-registry/fieldBinding.d.ts +32 -0
  135. package/dist/server/flow-schema-registry/flow-schema-registry/fieldBinding.js +159 -0
  136. package/dist/server/flow-schema-registry/flow-schema-registry/modelPatches.d.ts +16 -0
  137. package/dist/server/flow-schema-registry/flow-schema-registry/modelPatches.js +226 -0
  138. package/dist/server/flow-schema-registry/flow-schema-registry/schemaInference.d.ts +17 -0
  139. package/dist/server/flow-schema-registry/flow-schema-registry/schemaInference.js +204 -0
  140. package/dist/server/flow-schema-registry/flow-schema-registry/utils.d.ts +25 -0
  141. package/dist/server/flow-schema-registry/flow-schema-registry/utils.js +278 -0
  142. package/dist/server/flow-schema-registry/index.d.ts +10 -0
  143. package/dist/server/flow-schema-registry/index.js +32 -0
  144. package/dist/server/flow-schema-registry/types.d.ts +244 -0
  145. package/dist/server/flow-schema-registry/types.js +24 -0
  146. package/dist/server/flow-schema-service.d.ts +1 -1
  147. package/dist/server/flow-schema-service.js +2 -2
  148. package/dist/server/plugin.d.ts +1 -1
  149. package/dist/server/repository.d.ts +1 -0
  150. package/dist/server/repository.js +3 -5
  151. package/dist/server/server.js +1 -1
  152. package/package.json +2 -2
@@ -0,0 +1,173 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var BlockWorkbenchModel_exports = {};
28
+ __export(BlockWorkbenchModel_exports, {
29
+ flowSchemaContribution: () => flowSchemaContribution
30
+ });
31
+ module.exports = __toCommonJS(BlockWorkbenchModel_exports);
32
+ const actionButtonGeneralStepParamsSchema = {
33
+ type: "object",
34
+ properties: {
35
+ title: { type: "string" },
36
+ tooltip: { type: "string" },
37
+ type: {
38
+ type: "string",
39
+ enum: ["default", "primary", "dashed", "link", "text"]
40
+ },
41
+ danger: { type: "boolean" },
42
+ icon: { type: ["string", "null"] },
43
+ color: { type: "string" }
44
+ },
45
+ additionalProperties: true
46
+ };
47
+ const actionButtonSettingsStepParamsSchema = {
48
+ type: "object",
49
+ properties: {
50
+ buttonSettings: {
51
+ type: "object",
52
+ properties: {
53
+ general: actionButtonGeneralStepParamsSchema
54
+ },
55
+ additionalProperties: true
56
+ }
57
+ },
58
+ additionalProperties: true
59
+ };
60
+ const actionPanelBlockModelSchemaContribution = {
61
+ use: "ActionPanelBlockModel",
62
+ title: "Action panel block",
63
+ source: "plugin",
64
+ strict: false,
65
+ stepParamsSchema: {
66
+ type: "object",
67
+ properties: {
68
+ actionPanelBlockSetting: {
69
+ type: "object",
70
+ properties: {
71
+ layout: {
72
+ type: "object",
73
+ properties: {
74
+ layout: {
75
+ type: "string",
76
+ enum: ["grid", "list"]
77
+ }
78
+ },
79
+ required: ["layout"],
80
+ additionalProperties: false
81
+ },
82
+ ellipsis: {
83
+ type: "object",
84
+ properties: {
85
+ ellipsis: {
86
+ type: "boolean"
87
+ }
88
+ },
89
+ additionalProperties: false
90
+ }
91
+ },
92
+ additionalProperties: true
93
+ }
94
+ },
95
+ additionalProperties: true
96
+ },
97
+ subModelSlots: {
98
+ actions: {
99
+ type: "array",
100
+ uses: ["PopupActionModel", "LinkActionModel", "JSActionModel", "ActionPanelScanActionModel"],
101
+ description: "Action panel items are concrete action models rendered inside the panel."
102
+ }
103
+ },
104
+ skeleton: {
105
+ uid: "todo-action-panel-block-uid",
106
+ use: "ActionPanelBlockModel",
107
+ stepParams: {
108
+ actionPanelBlockSetting: {
109
+ layout: {
110
+ layout: "grid"
111
+ },
112
+ ellipsis: {
113
+ ellipsis: true
114
+ }
115
+ }
116
+ },
117
+ subModels: {
118
+ actions: []
119
+ }
120
+ },
121
+ docs: {
122
+ minimalExample: {
123
+ uid: "action-panel-tools",
124
+ use: "ActionPanelBlockModel",
125
+ stepParams: {
126
+ actionPanelBlockSetting: {
127
+ layout: {
128
+ layout: "grid"
129
+ }
130
+ }
131
+ },
132
+ subModels: {
133
+ actions: []
134
+ }
135
+ }
136
+ }
137
+ };
138
+ const actionPanelScanActionModelSchemaContribution = {
139
+ use: "ActionPanelScanActionModel",
140
+ title: "Action panel scan action",
141
+ source: "plugin",
142
+ strict: false,
143
+ exposure: "internal",
144
+ suggestedUses: ["ActionPanelBlockModel"],
145
+ stepParamsSchema: {
146
+ ...actionButtonSettingsStepParamsSchema
147
+ },
148
+ skeleton: {
149
+ uid: "todo-action-panel-scan-action-uid",
150
+ use: "ActionPanelScanActionModel",
151
+ stepParams: {
152
+ buttonSettings: {
153
+ general: {
154
+ title: "Scan QR code",
155
+ icon: "ScanOutlined"
156
+ }
157
+ }
158
+ }
159
+ }
160
+ };
161
+ const flowSchemaContribution = {
162
+ inventory: {
163
+ publicTreeRoots: ["ActionPanelBlockModel"]
164
+ },
165
+ models: [actionPanelScanActionModelSchemaContribution, actionPanelBlockModelSchemaContribution],
166
+ defaults: {
167
+ source: "plugin"
168
+ }
169
+ };
170
+ // Annotate the CommonJS export names for ESM import in node:
171
+ 0 && (module.exports = {
172
+ flowSchemaContribution
173
+ });
@@ -6,5 +6,5 @@
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 { FlowModelSchemaContribution } from '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const bulkDeleteActionModelInternalSchemaContribution: FlowModelSchemaContribution;
@@ -6,5 +6,5 @@
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 { FlowModelSchemaContribution } from '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const childPageModelInternalSchemaContribution: FlowModelSchemaContribution;
@@ -6,5 +6,5 @@
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 { FlowModelSchemaContribution } from '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const childPageTabModelInternalSchemaContribution: FlowModelSchemaContribution;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import type { FlowSchemaContribution } from '../../flow-schema-registry';
10
+ export declare const flowSchemaContribution: FlowSchemaContribution;
@@ -0,0 +1,255 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var CommentsModel_exports = {};
28
+ __export(CommentsModel_exports, {
29
+ flowSchemaContribution: () => flowSchemaContribution
30
+ });
31
+ module.exports = __toCommonJS(CommentsModel_exports);
32
+ const genericFilterSchemaId = "urn:nocobase:schema:plugin-comments:generic-filter";
33
+ const emptyObjectSchema = {
34
+ type: "object",
35
+ additionalProperties: false
36
+ };
37
+ const genericFilterSchema = {
38
+ $id: genericFilterSchemaId,
39
+ definitions: {
40
+ filterCondition: {
41
+ type: "object",
42
+ properties: {
43
+ path: {
44
+ type: "string"
45
+ },
46
+ operator: {
47
+ type: "string"
48
+ },
49
+ value: {},
50
+ noValue: {
51
+ type: "boolean"
52
+ }
53
+ },
54
+ required: ["path"],
55
+ additionalProperties: true,
56
+ allOf: [
57
+ {
58
+ not: {
59
+ required: ["logic"]
60
+ }
61
+ },
62
+ {
63
+ not: {
64
+ required: ["items"]
65
+ }
66
+ }
67
+ ]
68
+ },
69
+ filterGroup: {
70
+ type: "object",
71
+ properties: {
72
+ logic: {
73
+ type: "string",
74
+ enum: ["$and", "$or"]
75
+ },
76
+ items: {
77
+ type: "array",
78
+ items: {
79
+ oneOf: [
80
+ { $ref: `${genericFilterSchemaId}#/definitions/filterCondition` },
81
+ { $ref: `${genericFilterSchemaId}#/definitions/filterGroup` }
82
+ ]
83
+ }
84
+ }
85
+ },
86
+ required: ["logic", "items"],
87
+ additionalProperties: true,
88
+ allOf: [
89
+ {
90
+ not: {
91
+ required: ["path"]
92
+ }
93
+ },
94
+ {
95
+ not: {
96
+ required: ["operator"]
97
+ }
98
+ },
99
+ {
100
+ not: {
101
+ required: ["value"]
102
+ }
103
+ },
104
+ {
105
+ not: {
106
+ required: ["noValue"]
107
+ }
108
+ }
109
+ ]
110
+ }
111
+ },
112
+ type: "object",
113
+ properties: {
114
+ logic: {
115
+ type: "string",
116
+ enum: ["$and", "$or"]
117
+ },
118
+ items: {
119
+ type: "array",
120
+ items: {
121
+ oneOf: [
122
+ { $ref: `${genericFilterSchemaId}#/definitions/filterCondition` },
123
+ { $ref: `${genericFilterSchemaId}#/definitions/filterGroup` }
124
+ ]
125
+ }
126
+ }
127
+ },
128
+ required: ["logic", "items"],
129
+ additionalProperties: true,
130
+ allOf: [
131
+ {
132
+ not: {
133
+ required: ["path"]
134
+ }
135
+ },
136
+ {
137
+ not: {
138
+ required: ["operator"]
139
+ }
140
+ },
141
+ {
142
+ not: {
143
+ required: ["value"]
144
+ }
145
+ },
146
+ {
147
+ not: {
148
+ required: ["noValue"]
149
+ }
150
+ }
151
+ ]
152
+ };
153
+ const commentItemModelInternalSchemaContribution = {
154
+ use: "CommentItemModel",
155
+ title: "Comment item",
156
+ source: "plugin",
157
+ strict: false,
158
+ exposure: "internal",
159
+ stepParamsSchema: emptyObjectSchema,
160
+ skeleton: {
161
+ uid: "comment-item-uid",
162
+ use: "CommentItemModel"
163
+ },
164
+ docs: {
165
+ minimalExample: {
166
+ uid: "comment-item-1",
167
+ use: "CommentItemModel"
168
+ }
169
+ }
170
+ };
171
+ const commentsBlockModelSchemaContribution = {
172
+ use: "CommentsBlockModel",
173
+ title: "Comments block",
174
+ source: "plugin",
175
+ strict: false,
176
+ stepParamsSchema: {
177
+ type: "object",
178
+ properties: {
179
+ commentsSettings: {
180
+ type: "object",
181
+ properties: {
182
+ pageSize: {
183
+ type: "object",
184
+ properties: {
185
+ pageSize: {
186
+ type: "number",
187
+ enum: [5, 10, 20, 50, 100, 200]
188
+ }
189
+ },
190
+ additionalProperties: false
191
+ },
192
+ dataScope: {
193
+ type: "object",
194
+ properties: {
195
+ filter: genericFilterSchema
196
+ },
197
+ additionalProperties: false
198
+ }
199
+ },
200
+ additionalProperties: true
201
+ }
202
+ },
203
+ additionalProperties: true
204
+ },
205
+ subModelSlots: {
206
+ items: {
207
+ type: "array",
208
+ uses: ["CommentItemModel"],
209
+ description: "Comment item renderers."
210
+ }
211
+ },
212
+ skeleton: {
213
+ uid: "todo-uid",
214
+ use: "CommentsBlockModel",
215
+ stepParams: {
216
+ commentsSettings: {
217
+ pageSize: {
218
+ pageSize: 20
219
+ }
220
+ }
221
+ },
222
+ subModels: {
223
+ items: []
224
+ }
225
+ },
226
+ docs: {
227
+ minimalExample: {
228
+ uid: "comments-users",
229
+ use: "CommentsBlockModel",
230
+ stepParams: {
231
+ commentsSettings: {
232
+ pageSize: {
233
+ pageSize: 20
234
+ }
235
+ }
236
+ },
237
+ subModels: {
238
+ items: []
239
+ }
240
+ }
241
+ }
242
+ };
243
+ const flowSchemaContribution = {
244
+ inventory: {
245
+ publicTreeRoots: ["CommentsBlockModel"]
246
+ },
247
+ models: [commentItemModelInternalSchemaContribution, commentsBlockModelSchemaContribution],
248
+ defaults: {
249
+ source: "plugin"
250
+ }
251
+ };
252
+ // Annotate the CommonJS export names for ESM import in node:
253
+ 0 && (module.exports = {
254
+ flowSchemaContribution
255
+ });
@@ -6,5 +6,5 @@
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 { FlowModelSchemaContribution } from '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const createFormModelSchemaContribution: FlowModelSchemaContribution;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import type { FlowSchemaContribution } from '../../flow-schema-registry';
10
+ export declare const flowSchemaContribution: FlowSchemaContribution;