@nocobase/plugin-flow-engine 2.1.0-beta.2 → 2.1.0-beta.21
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/LICENSE +201 -661
- package/README.md +79 -9
- package/dist/ai/ai-employees/nathan/index.d.ts +10 -0
- package/dist/ai/ai-employees/nathan/index.js +41 -0
- package/dist/ai/ai-employees/nathan/prompt.md +132 -0
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/SKILLS.md +69 -0
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextApis.js +2 -2
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextEnvs.js +2 -2
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextVars.js +2 -2
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/lintAndTestJS.js +2 -2
- package/dist/ai/docs/runjs/context/block-model.md +35 -35
- package/dist/ai/docs/runjs/context/collection-field.md +53 -51
- package/dist/ai/docs/runjs/context/collection.md +39 -39
- package/dist/ai/docs/runjs/context/data-source-manager.md +40 -30
- package/dist/ai/docs/runjs/context/data-source.md +52 -44
- package/dist/ai/docs/runjs/context/element.md +44 -38
- package/dist/ai/docs/runjs/context/exit-all.md +37 -35
- package/dist/ai/docs/runjs/context/exit.md +38 -35
- package/dist/ai/docs/runjs/context/filter-manager.md +36 -30
- package/dist/ai/docs/runjs/context/form.md +57 -57
- package/dist/ai/docs/runjs/context/get-model.md +22 -21
- package/dist/ai/docs/runjs/context/get-value.md +20 -19
- package/dist/ai/docs/runjs/context/get-var.md +61 -55
- package/dist/ai/docs/runjs/context/i18n.md +17 -14
- package/dist/ai/docs/runjs/context/import-async.md +333 -45
- package/dist/ai/docs/runjs/context/init-resource.md +20 -20
- package/dist/ai/docs/runjs/context/libs.md +31 -31
- package/dist/ai/docs/runjs/context/location.md +34 -31
- package/dist/ai/docs/runjs/context/logger.md +41 -40
- package/dist/ai/docs/runjs/context/make-resource.md +27 -26
- package/dist/ai/docs/runjs/context/message.md +42 -41
- package/dist/ai/docs/runjs/context/modal.md +44 -44
- package/dist/ai/docs/runjs/context/model.md +36 -33
- package/dist/ai/docs/runjs/context/notification.md +41 -40
- package/dist/ai/docs/runjs/context/off.md +14 -14
- package/dist/ai/docs/runjs/context/on.md +30 -29
- package/dist/ai/docs/runjs/context/open-view.md +40 -40
- package/dist/ai/docs/runjs/context/render.md +37 -32
- package/dist/ai/docs/runjs/context/request.md +46 -45
- package/dist/ai/docs/runjs/context/require-async.md +28 -25
- package/dist/ai/docs/runjs/context/resource.md +34 -34
- package/dist/ai/docs/runjs/context/route.md +36 -34
- package/dist/ai/docs/runjs/context/router.md +43 -31
- package/dist/ai/docs/runjs/context/set-value.md +18 -17
- package/dist/ai/docs/runjs/context/sql.md +7 -15
- package/dist/ai/docs/runjs/context/t.md +20 -17
- package/dist/ai/docs/runjs/context/view.md +49 -46
- package/dist/ai/docs/runjs/document.md +1 -0
- package/dist/ai/docs/runjs/import-modules.md +32 -32
- package/dist/ai/docs/runjs/index.md +13 -13
- package/dist/ai/docs/runjs/jsx.md +19 -19
- package/dist/ai/docs/runjs/model/form-block-model.md +1 -3
- package/dist/ai/docs/runjs/render.md +15 -15
- package/dist/ai/docs/runjs/resource/api-resource.md +53 -53
- package/dist/ai/docs/runjs/resource/multi-record-resource.md +64 -64
- package/dist/ai/docs/runjs/resource/single-record-resource.md +55 -55
- package/dist/ai/docs/runjs/resource/sql-resource.md +57 -57
- package/dist/ai/docs/runjs/window.md +5 -5
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +12 -11
- package/dist/locale/en-US.json +1 -0
- package/dist/locale/index.d.ts +2 -0
- package/dist/locale/zh-CN.json +1 -0
- package/dist/node_modules/ses/dist/ses.cjs +1 -1
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/index.cjs +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/collections/flowsql.js +1 -0
- package/dist/server/flow-surfaces/action-scope.d.ts +39 -0
- package/dist/server/flow-surfaces/action-scope.js +156 -0
- package/dist/server/flow-surfaces/apply/compiler.d.ts +13 -0
- package/dist/server/flow-surfaces/apply/compiler.js +971 -0
- package/dist/server/flow-surfaces/apply/layout.d.ts +34 -0
- package/dist/server/flow-surfaces/apply/layout.js +175 -0
- package/dist/server/flow-surfaces/apply/matching.d.ts +16 -0
- package/dist/server/flow-surfaces/apply/matching.js +181 -0
- package/dist/server/flow-surfaces/approval/blueprint-service.d.ts +84 -0
- package/dist/server/flow-surfaces/approval/blueprint-service.js +589 -0
- package/dist/server/flow-surfaces/approval/blueprint.d.ts +21 -0
- package/dist/server/flow-surfaces/approval/blueprint.js +187 -0
- package/dist/server/flow-surfaces/approval/builder.d.ts +225 -0
- package/dist/server/flow-surfaces/approval/builder.js +384 -0
- package/dist/server/flow-surfaces/approval/catalog-specs.d.ts +33 -0
- package/dist/server/flow-surfaces/approval/catalog-specs.js +156 -0
- package/dist/server/flow-surfaces/approval/index.d.ts +14 -0
- package/dist/server/flow-surfaces/approval/index.js +40 -0
- package/dist/server/flow-surfaces/approval/runtime-config.d.ts +44 -0
- package/dist/server/flow-surfaces/approval/runtime-config.js +299 -0
- package/dist/server/flow-surfaces/approval/semantic-use.d.ts +23 -0
- package/dist/server/flow-surfaces/approval/semantic-use.js +155 -0
- package/dist/server/flow-surfaces/association-interfaces.d.ts +10 -0
- package/dist/server/flow-surfaces/association-interfaces.js +39 -0
- package/dist/server/flow-surfaces/association-title-field.d.ts +20 -0
- package/dist/server/flow-surfaces/association-title-field.js +192 -0
- package/dist/server/flow-surfaces/blueprint/compile-blocks.d.ts +14 -0
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +1074 -0
- package/dist/server/flow-surfaces/blueprint/compile-plan.d.ts +13 -0
- package/dist/server/flow-surfaces/blueprint/compile-plan.js +308 -0
- package/dist/server/flow-surfaces/blueprint/compile-reaction.d.ts +11 -0
- package/dist/server/flow-surfaces/blueprint/compile-reaction.js +72 -0
- package/dist/server/flow-surfaces/blueprint/defaults.d.ts +26 -0
- package/dist/server/flow-surfaces/blueprint/defaults.js +133 -0
- package/dist/server/flow-surfaces/blueprint/index.d.ts +12 -0
- package/dist/server/flow-surfaces/blueprint/index.js +44 -0
- package/dist/server/flow-surfaces/blueprint/normalize-document.d.ts +10 -0
- package/dist/server/flow-surfaces/blueprint/normalize-document.js +416 -0
- package/dist/server/flow-surfaces/blueprint/private-utils.d.ts +26 -0
- package/dist/server/flow-surfaces/blueprint/private-utils.js +182 -0
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +201 -0
- package/dist/server/flow-surfaces/blueprint/public-types.js +24 -0
- package/dist/server/flow-surfaces/builder.d.ts +237 -0
- package/dist/server/flow-surfaces/builder.js +1129 -0
- package/dist/server/flow-surfaces/catalog-smart.d.ts +18 -0
- package/dist/server/flow-surfaces/catalog-smart.js +239 -0
- package/dist/server/flow-surfaces/catalog-smart.projector.d.ts +15 -0
- package/dist/server/flow-surfaces/catalog-smart.projector.js +157 -0
- package/dist/server/flow-surfaces/catalog-smart.types.d.ts +99 -0
- package/dist/server/flow-surfaces/catalog-smart.types.js +24 -0
- package/dist/server/flow-surfaces/catalog.d.ts +79 -0
- package/dist/server/flow-surfaces/catalog.js +3693 -0
- package/dist/server/flow-surfaces/chart-config.d.ts +121 -0
- package/dist/server/flow-surfaces/chart-config.js +1394 -0
- package/dist/server/flow-surfaces/compose-compiler.d.ts +116 -0
- package/dist/server/flow-surfaces/compose-compiler.js +175 -0
- package/dist/server/flow-surfaces/compose-runtime.d.ts +93 -0
- package/dist/server/flow-surfaces/compose-runtime.js +375 -0
- package/dist/server/flow-surfaces/configure-options.d.ts +23 -0
- package/dist/server/flow-surfaces/configure-options.js +893 -0
- package/dist/server/flow-surfaces/constants.d.ts +351 -0
- package/dist/server/flow-surfaces/constants.js +104 -0
- package/dist/server/flow-surfaces/context.d.ts +72 -0
- package/dist/server/flow-surfaces/context.js +556 -0
- package/dist/server/flow-surfaces/contract-guard.d.ts +19 -0
- package/dist/server/flow-surfaces/contract-guard.js +402 -0
- package/dist/server/flow-surfaces/core-field-default-bindings.d.ts +12 -0
- package/dist/server/flow-surfaces/core-field-default-bindings.js +157 -0
- package/dist/server/flow-surfaces/default-action-popup.d.ts +63 -0
- package/dist/server/flow-surfaces/default-action-popup.js +322 -0
- package/dist/server/flow-surfaces/default-block-actions.d.ts +32 -0
- package/dist/server/flow-surfaces/default-block-actions.js +209 -0
- package/dist/server/flow-surfaces/errors.d.ts +47 -0
- package/dist/server/flow-surfaces/errors.js +145 -0
- package/dist/server/flow-surfaces/executor.d.ts +23 -0
- package/dist/server/flow-surfaces/executor.js +132 -0
- package/dist/server/flow-surfaces/field-binding-registry.d.ts +24 -0
- package/dist/server/flow-surfaces/field-binding-registry.js +396 -0
- package/dist/server/flow-surfaces/field-semantics.d.ts +15 -0
- package/dist/server/flow-surfaces/field-semantics.js +84 -0
- package/dist/server/flow-surfaces/field-type-resolver.d.ts +46 -0
- package/dist/server/flow-surfaces/field-type-resolver.js +322 -0
- package/dist/server/flow-surfaces/filter-group.d.ts +15 -0
- package/dist/server/flow-surfaces/filter-group.js +94 -0
- package/dist/server/flow-surfaces/index.d.ts +11 -0
- package/dist/server/flow-surfaces/index.js +302 -0
- package/dist/server/flow-surfaces/locator.d.ts +28 -0
- package/dist/server/flow-surfaces/locator.js +240 -0
- package/dist/server/flow-surfaces/node-use-sets.d.ts +15 -0
- package/dist/server/flow-surfaces/node-use-sets.js +135 -0
- package/dist/server/flow-surfaces/payload-shape.d.ts +9 -0
- package/dist/server/flow-surfaces/payload-shape.js +61 -0
- package/dist/server/flow-surfaces/placement.d.ts +33 -0
- package/dist/server/flow-surfaces/placement.js +198 -0
- package/dist/server/flow-surfaces/planning/action-specs.d.ts +179 -0
- package/dist/server/flow-surfaces/planning/action-specs.js +190 -0
- package/dist/server/flow-surfaces/planning/compiler.d.ts +37 -0
- package/dist/server/flow-surfaces/planning/compiler.js +376 -0
- package/dist/server/flow-surfaces/planning/context.d.ts +30 -0
- package/dist/server/flow-surfaces/planning/context.js +139 -0
- package/dist/server/flow-surfaces/planning/created-keys.d.ts +34 -0
- package/dist/server/flow-surfaces/planning/created-keys.js +375 -0
- package/dist/server/flow-surfaces/planning/key-kind.d.ts +11 -0
- package/dist/server/flow-surfaces/planning/key-kind.js +88 -0
- package/dist/server/flow-surfaces/planning/key-persistence.d.ts +34 -0
- package/dist/server/flow-surfaces/planning/key-persistence.js +148 -0
- package/dist/server/flow-surfaces/planning/key-registry.d.ts +40 -0
- package/dist/server/flow-surfaces/planning/key-registry.js +206 -0
- package/dist/server/flow-surfaces/planning/runtime.d.ts +37 -0
- package/dist/server/flow-surfaces/planning/runtime.js +259 -0
- package/dist/server/flow-surfaces/planning/step-link.d.ts +14 -0
- package/dist/server/flow-surfaces/planning/step-link.js +104 -0
- package/dist/server/flow-surfaces/planning/types.d.ts +55 -0
- package/dist/server/flow-surfaces/planning/types.js +24 -0
- package/dist/server/flow-surfaces/public-data-surface-default-filter.d.ts +24 -0
- package/dist/server/flow-surfaces/public-data-surface-default-filter.js +152 -0
- package/dist/server/flow-surfaces/reaction/errors.d.ts +20 -0
- package/dist/server/flow-surfaces/reaction/errors.js +69 -0
- package/dist/server/flow-surfaces/reaction/field-value.d.ts +34 -0
- package/dist/server/flow-surfaces/reaction/field-value.js +181 -0
- package/dist/server/flow-surfaces/reaction/fingerprint.d.ts +16 -0
- package/dist/server/flow-surfaces/reaction/fingerprint.js +71 -0
- package/dist/server/flow-surfaces/reaction/linkage.d.ts +136 -0
- package/dist/server/flow-surfaces/reaction/linkage.js +882 -0
- package/dist/server/flow-surfaces/reaction/meta.d.ts +11 -0
- package/dist/server/flow-surfaces/reaction/meta.js +451 -0
- package/dist/server/flow-surfaces/reaction/registry.d.ts +156 -0
- package/dist/server/flow-surfaces/reaction/registry.js +206 -0
- package/dist/server/flow-surfaces/reaction/resolver.d.ts +22 -0
- package/dist/server/flow-surfaces/reaction/resolver.js +202 -0
- package/dist/server/flow-surfaces/reaction/types.d.ts +241 -0
- package/dist/server/flow-surfaces/reaction/types.js +24 -0
- package/dist/server/flow-surfaces/reaction/utils.d.ts +17 -0
- package/dist/server/flow-surfaces/reaction/utils.js +67 -0
- package/dist/server/flow-surfaces/reaction/value-expr.d.ts +15 -0
- package/dist/server/flow-surfaces/reaction/value-expr.js +209 -0
- package/dist/server/flow-surfaces/reference-guards.d.ts +19 -0
- package/dist/server/flow-surfaces/reference-guards.js +103 -0
- package/dist/server/flow-surfaces/route-sync.d.ts +47 -0
- package/dist/server/flow-surfaces/route-sync.js +392 -0
- package/dist/server/flow-surfaces/service-helpers.d.ts +42 -0
- package/dist/server/flow-surfaces/service-helpers.js +310 -0
- package/dist/server/flow-surfaces/service-utils.d.ts +120 -0
- package/dist/server/flow-surfaces/service-utils.js +863 -0
- package/dist/server/flow-surfaces/service.d.ts +830 -0
- package/dist/server/flow-surfaces/service.js +15043 -0
- package/dist/server/flow-surfaces/support-matrix.d.ts +31 -0
- package/dist/server/flow-surfaces/support-matrix.js +282 -0
- package/dist/server/flow-surfaces/surface-context.d.ts +52 -0
- package/dist/server/flow-surfaces/surface-context.js +440 -0
- package/dist/server/flow-surfaces/template-compatibility.d.ts +42 -0
- package/dist/server/flow-surfaces/template-compatibility.js +189 -0
- package/dist/server/flow-surfaces/template-display.d.ts +20 -0
- package/dist/server/flow-surfaces/template-display.js +289 -0
- package/dist/server/flow-surfaces/template-service-utils.d.ts +62 -0
- package/dist/server/flow-surfaces/template-service-utils.js +281 -0
- package/dist/server/flow-surfaces/types.d.ts +288 -0
- package/dist/server/flow-surfaces/types.js +24 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +7 -2
- package/dist/server/plugin.d.ts +0 -1
- package/dist/server/plugin.js +9 -34
- package/dist/server/repository.js +0 -5
- package/dist/server/variables/resolve.d.ts +21 -0
- package/dist/server/variables/resolve.js +79 -0
- package/dist/swagger/flow-surfaces.d.ts +6135 -0
- package/dist/swagger/flow-surfaces.examples.d.ts +1577 -0
- package/dist/swagger/flow-surfaces.examples.js +1816 -0
- package/dist/swagger/flow-surfaces.js +5384 -0
- package/dist/swagger/flow-surfaces.template-action-docs.d.ts +62 -0
- package/dist/swagger/flow-surfaces.template-action-docs.js +121 -0
- package/dist/swagger/flow-surfaces.template-schemas.d.ts +239 -0
- package/dist/swagger/flow-surfaces.template-schemas.js +255 -0
- package/dist/swagger/index.d.ts +6140 -0
- package/dist/swagger/index.js +50 -0
- package/package.json +3 -3
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextApis.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextEnvs.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextVars.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/lintAndTestJS.d.ts +0 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var builder_exports = {};
|
|
38
|
+
__export(builder_exports, {
|
|
39
|
+
buildApprovalActionDefaults: () => buildApprovalActionDefaults,
|
|
40
|
+
buildApprovalApproverSurfaceTree: () => buildApprovalApproverSurfaceTree,
|
|
41
|
+
buildApprovalBlockDefaults: () => buildApprovalBlockDefaults,
|
|
42
|
+
buildApprovalFieldTree: () => buildApprovalFieldTree,
|
|
43
|
+
buildApprovalInitiatorSurfaceTree: () => buildApprovalInitiatorSurfaceTree,
|
|
44
|
+
buildApprovalTaskCardSurfaceTree: () => buildApprovalTaskCardSurfaceTree
|
|
45
|
+
});
|
|
46
|
+
module.exports = __toCommonJS(builder_exports);
|
|
47
|
+
var import_utils = require("@nocobase/utils");
|
|
48
|
+
var import_lodash = __toESM(require("lodash"));
|
|
49
|
+
const APPROVAL_CREATE_NEW_PATTERN_STEP_PARAMS = {
|
|
50
|
+
patternSettings: {
|
|
51
|
+
pattern: {
|
|
52
|
+
pattern: "createNew"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
function buildFieldInitPayload(params) {
|
|
57
|
+
return import_lodash.default.pickBy(
|
|
58
|
+
{
|
|
59
|
+
dataSourceKey: params.dataSourceKey,
|
|
60
|
+
collectionName: params.collectionName,
|
|
61
|
+
fieldPath: params.fieldPath,
|
|
62
|
+
...params.associationPathName ? { associationPathName: params.associationPathName } : {}
|
|
63
|
+
},
|
|
64
|
+
(value) => !import_lodash.default.isUndefined(value)
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function buildApprovalFieldTree(params) {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
if (params.wrapperUse !== "PatternFormItemModel") {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
const initPayload = buildFieldInitPayload(params);
|
|
73
|
+
const wrapperStepParams = {
|
|
74
|
+
fieldSettings: {
|
|
75
|
+
init: initPayload
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
if (params.filterFormInit) {
|
|
79
|
+
wrapperStepParams.filterFormItemSettings = {
|
|
80
|
+
init: params.filterFormInit
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
wrapperUid: params.uid,
|
|
85
|
+
innerUid: params.innerUid,
|
|
86
|
+
model: {
|
|
87
|
+
uid: params.uid,
|
|
88
|
+
use: "PatternFormItemModel",
|
|
89
|
+
props: import_lodash.default.cloneDeep(params.wrapperProps || {}),
|
|
90
|
+
stepParams: wrapperStepParams,
|
|
91
|
+
subModels: {
|
|
92
|
+
field: {
|
|
93
|
+
uid: params.innerUid,
|
|
94
|
+
use: "PatternFormFieldModel",
|
|
95
|
+
props: import_lodash.default.merge({}, import_lodash.default.cloneDeep(((_a = params.fieldDefaults) == null ? void 0 : _a.props) || {}), import_lodash.default.cloneDeep(params.fieldProps || {})),
|
|
96
|
+
stepParams: import_lodash.default.merge({}, import_lodash.default.cloneDeep(((_b = params.fieldDefaults) == null ? void 0 : _b.stepParams) || {}), {
|
|
97
|
+
fieldSettings: {
|
|
98
|
+
init: initPayload
|
|
99
|
+
},
|
|
100
|
+
fieldBinding: {
|
|
101
|
+
use: params.fieldUse
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function buildApprovalBlockDefaults(use) {
|
|
110
|
+
switch (String(use || "").trim()) {
|
|
111
|
+
case "ApplyFormModel":
|
|
112
|
+
return {
|
|
113
|
+
stepParams: import_lodash.default.cloneDeep(APPROVAL_CREATE_NEW_PATTERN_STEP_PARAMS),
|
|
114
|
+
subModels: {
|
|
115
|
+
grid: {
|
|
116
|
+
use: "PatternFormGridModel"
|
|
117
|
+
},
|
|
118
|
+
actions: [
|
|
119
|
+
{
|
|
120
|
+
use: "ApplyFormSubmitModel"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
case "ProcessFormModel":
|
|
126
|
+
return {
|
|
127
|
+
stepParams: import_lodash.default.cloneDeep(APPROVAL_CREATE_NEW_PATTERN_STEP_PARAMS),
|
|
128
|
+
subModels: {
|
|
129
|
+
grid: {
|
|
130
|
+
use: "PatternFormGridModel"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
case "ApprovalDetailsModel":
|
|
135
|
+
return {
|
|
136
|
+
subModels: {
|
|
137
|
+
grid: {
|
|
138
|
+
use: "ApprovalDetailsGridModel"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
default:
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function buildApprovalActionDefaults(use) {
|
|
147
|
+
switch (String(use || "").trim()) {
|
|
148
|
+
case "ApplyFormSubmitModel":
|
|
149
|
+
return {
|
|
150
|
+
props: {
|
|
151
|
+
title: '{{t("Submit")}}',
|
|
152
|
+
type: "primary",
|
|
153
|
+
htmlType: "submit"
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
case "ApplyFormSaveDraftModel":
|
|
157
|
+
return {
|
|
158
|
+
props: {
|
|
159
|
+
title: '{{t("Save draft", { ns: "@nocobase/plugin-workflow-approval" })}}',
|
|
160
|
+
type: "default",
|
|
161
|
+
htmlType: "submit"
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
case "ApplyFormWithdrawModel":
|
|
165
|
+
return {
|
|
166
|
+
props: {
|
|
167
|
+
title: '{{t("Withdraw", { ns: "@nocobase/plugin-workflow-approval" })}}',
|
|
168
|
+
type: "default",
|
|
169
|
+
htmlType: "submit"
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
case "ProcessFormApproveModel":
|
|
173
|
+
return {
|
|
174
|
+
props: {
|
|
175
|
+
title: '{{t("Approve", { ns: "@nocobase/plugin-workflow-approval" })}}',
|
|
176
|
+
type: "primary"
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
case "ProcessFormRejectModel":
|
|
180
|
+
return {
|
|
181
|
+
props: {
|
|
182
|
+
title: '{{t("Reject", { ns: "@nocobase/plugin-workflow-approval" })}}',
|
|
183
|
+
type: "default",
|
|
184
|
+
danger: true
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
case "ProcessFormReturnModel":
|
|
188
|
+
return {
|
|
189
|
+
props: {
|
|
190
|
+
title: '{{t("Return", { ns: "@nocobase/plugin-workflow-approval" })}}',
|
|
191
|
+
type: "default"
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
case "ProcessFormDelegateModel":
|
|
195
|
+
return {
|
|
196
|
+
props: {
|
|
197
|
+
title: '{{t("Delegate", { ns: "@nocobase/plugin-workflow-approval" })}}',
|
|
198
|
+
type: "default"
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
case "ProcessFormAddAssigneeModel":
|
|
202
|
+
return {
|
|
203
|
+
props: {
|
|
204
|
+
title: '{{t("Add assignee", { ns: "@nocobase/plugin-workflow-approval" })}}',
|
|
205
|
+
type: "default"
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
default:
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function buildApprovalInitiatorSurfaceTree(options) {
|
|
213
|
+
const pageUid = options.pageUid || (0, import_utils.uid)();
|
|
214
|
+
const tabUid = options.tabUid || (0, import_utils.uid)();
|
|
215
|
+
const gridUid = options.gridUid || (0, import_utils.uid)();
|
|
216
|
+
return {
|
|
217
|
+
uid: pageUid,
|
|
218
|
+
async: true,
|
|
219
|
+
subType: "object",
|
|
220
|
+
use: "TriggerChildPageModel",
|
|
221
|
+
sortIndex: 0,
|
|
222
|
+
flowRegistry: {},
|
|
223
|
+
stepParams: {
|
|
224
|
+
pageSettings: {
|
|
225
|
+
general: {
|
|
226
|
+
displayTitle: false,
|
|
227
|
+
enableTabs: false,
|
|
228
|
+
title: `{{t("Initiator's interface", { ns: "workflow" })}}`
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
TriggerChildPageSettings: {
|
|
232
|
+
init: {
|
|
233
|
+
dataSourceKey: options.dataSourceKey,
|
|
234
|
+
collectionName: options.collectionName
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
subModels: {
|
|
239
|
+
tabs: [
|
|
240
|
+
{
|
|
241
|
+
uid: tabUid,
|
|
242
|
+
parentId: pageUid,
|
|
243
|
+
use: "TriggerChildPageTabModel",
|
|
244
|
+
subKey: "tabs",
|
|
245
|
+
subType: "array",
|
|
246
|
+
sortIndex: 0,
|
|
247
|
+
flowRegistry: {},
|
|
248
|
+
stepParams: {
|
|
249
|
+
pageTabSettings: {
|
|
250
|
+
tab: {
|
|
251
|
+
title: `{{t("Details")}}`
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
subModels: {
|
|
256
|
+
grid: {
|
|
257
|
+
uid: gridUid,
|
|
258
|
+
parentId: tabUid,
|
|
259
|
+
async: true,
|
|
260
|
+
use: "TriggerBlockGridModel",
|
|
261
|
+
subKey: "grid",
|
|
262
|
+
subType: "object",
|
|
263
|
+
sortIndex: 0,
|
|
264
|
+
flowRegistry: {},
|
|
265
|
+
filterManager: []
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function buildApprovalApproverSurfaceTree(options) {
|
|
274
|
+
const pageUid = options.pageUid || (0, import_utils.uid)();
|
|
275
|
+
const tabUid = options.tabUid || (0, import_utils.uid)();
|
|
276
|
+
const gridUid = options.gridUid || (0, import_utils.uid)();
|
|
277
|
+
return {
|
|
278
|
+
uid: pageUid,
|
|
279
|
+
async: true,
|
|
280
|
+
subType: "object",
|
|
281
|
+
use: "ApprovalChildPageModel",
|
|
282
|
+
sortIndex: 0,
|
|
283
|
+
flowRegistry: {},
|
|
284
|
+
stepParams: {
|
|
285
|
+
pageSettings: {
|
|
286
|
+
general: {
|
|
287
|
+
displayTitle: false,
|
|
288
|
+
enableTabs: false,
|
|
289
|
+
title: `{{t("Approver's interface", { ns: "@nocobase/plugin-workflow-approval" })}}`
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
ApprovalChildPageSettings: {
|
|
293
|
+
init: {
|
|
294
|
+
dataSourceKey: options.dataSourceKey,
|
|
295
|
+
collectionName: options.collectionName
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
resourceSettings: {
|
|
299
|
+
init: {
|
|
300
|
+
dataSourceKey: options.dataSourceKey,
|
|
301
|
+
collectionName: options.collectionName
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
subModels: {
|
|
306
|
+
tabs: [
|
|
307
|
+
{
|
|
308
|
+
uid: tabUid,
|
|
309
|
+
parentId: pageUid,
|
|
310
|
+
use: "ApprovalChildPageTabModel",
|
|
311
|
+
subKey: "tabs",
|
|
312
|
+
subType: "array",
|
|
313
|
+
sortIndex: 0,
|
|
314
|
+
flowRegistry: {},
|
|
315
|
+
stepParams: {
|
|
316
|
+
pageTabSettings: {
|
|
317
|
+
tab: {
|
|
318
|
+
title: `{{t("Details")}}`
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
subModels: {
|
|
323
|
+
grid: {
|
|
324
|
+
uid: gridUid,
|
|
325
|
+
parentId: tabUid,
|
|
326
|
+
async: true,
|
|
327
|
+
use: "ApprovalBlockGridModel",
|
|
328
|
+
subKey: "grid",
|
|
329
|
+
subType: "object",
|
|
330
|
+
sortIndex: 0,
|
|
331
|
+
flowRegistry: {},
|
|
332
|
+
filterManager: []
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
function buildApprovalTaskCardSurfaceTree(options) {
|
|
341
|
+
const detailsUid = options.detailsUid || (0, import_utils.uid)();
|
|
342
|
+
const gridUid = options.gridUid || (0, import_utils.uid)();
|
|
343
|
+
return {
|
|
344
|
+
uid: detailsUid,
|
|
345
|
+
async: true,
|
|
346
|
+
subType: "object",
|
|
347
|
+
use: options.detailsUse,
|
|
348
|
+
sortIndex: 0,
|
|
349
|
+
flowRegistry: {},
|
|
350
|
+
stepParams: {
|
|
351
|
+
resourceSettings: {
|
|
352
|
+
init: {
|
|
353
|
+
dataSourceKey: options.dataSourceKey,
|
|
354
|
+
collectionName: options.collectionName
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
detailsSettings: {
|
|
358
|
+
layout: {
|
|
359
|
+
layout: "horizontal"
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
subModels: {
|
|
364
|
+
grid: {
|
|
365
|
+
uid: gridUid,
|
|
366
|
+
parentId: detailsUid,
|
|
367
|
+
use: options.gridUse,
|
|
368
|
+
subKey: "grid",
|
|
369
|
+
subType: "object",
|
|
370
|
+
sortIndex: 0,
|
|
371
|
+
flowRegistry: {}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
377
|
+
0 && (module.exports = {
|
|
378
|
+
buildApprovalActionDefaults,
|
|
379
|
+
buildApprovalApproverSurfaceTree,
|
|
380
|
+
buildApprovalBlockDefaults,
|
|
381
|
+
buildApprovalFieldTree,
|
|
382
|
+
buildApprovalInitiatorSurfaceTree,
|
|
383
|
+
buildApprovalTaskCardSurfaceTree
|
|
384
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { FlowSurfaceActionScope } from '../types';
|
|
10
|
+
export declare const APPROVAL_FLOW_SURFACE_OWNER_PLUGIN = "@nocobase/plugin-workflow-approval";
|
|
11
|
+
export type ApprovalFlowSurfaceBlockCatalogSpec = {
|
|
12
|
+
key: string;
|
|
13
|
+
label: string;
|
|
14
|
+
use: string;
|
|
15
|
+
requiredInitParams?: string[];
|
|
16
|
+
allowedContainerUses: string[];
|
|
17
|
+
createSupported?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type ApprovalFlowSurfaceActionCatalogSpec = {
|
|
20
|
+
publicKey: string;
|
|
21
|
+
label: string;
|
|
22
|
+
scope: FlowSurfaceActionScope;
|
|
23
|
+
scene?: string;
|
|
24
|
+
use: string;
|
|
25
|
+
allowedContainerUses: string[];
|
|
26
|
+
createSupported?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export declare const APPROVAL_BLOCK_CATALOG_SPECS: ApprovalFlowSurfaceBlockCatalogSpec[];
|
|
29
|
+
export declare const APPROVAL_ACTION_CATALOG_SPECS: ApprovalFlowSurfaceActionCatalogSpec[];
|
|
30
|
+
export declare const APPROVAL_BLOCK_PUBLIC_KEYS: string[];
|
|
31
|
+
export declare const APPROVAL_ACTION_PUBLIC_KEYS: string[];
|
|
32
|
+
export declare const APPROVAL_BLOCK_OWNER_PLUGIN_BY_USE: Map<string, string>;
|
|
33
|
+
export declare const APPROVAL_ACTION_OWNER_PLUGIN_BY_USE: Map<string, string>;
|
|
@@ -0,0 +1,156 @@
|
|
|
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 catalog_specs_exports = {};
|
|
28
|
+
__export(catalog_specs_exports, {
|
|
29
|
+
APPROVAL_ACTION_CATALOG_SPECS: () => APPROVAL_ACTION_CATALOG_SPECS,
|
|
30
|
+
APPROVAL_ACTION_OWNER_PLUGIN_BY_USE: () => APPROVAL_ACTION_OWNER_PLUGIN_BY_USE,
|
|
31
|
+
APPROVAL_ACTION_PUBLIC_KEYS: () => APPROVAL_ACTION_PUBLIC_KEYS,
|
|
32
|
+
APPROVAL_BLOCK_CATALOG_SPECS: () => APPROVAL_BLOCK_CATALOG_SPECS,
|
|
33
|
+
APPROVAL_BLOCK_OWNER_PLUGIN_BY_USE: () => APPROVAL_BLOCK_OWNER_PLUGIN_BY_USE,
|
|
34
|
+
APPROVAL_BLOCK_PUBLIC_KEYS: () => APPROVAL_BLOCK_PUBLIC_KEYS,
|
|
35
|
+
APPROVAL_FLOW_SURFACE_OWNER_PLUGIN: () => APPROVAL_FLOW_SURFACE_OWNER_PLUGIN
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(catalog_specs_exports);
|
|
38
|
+
const APPROVAL_FLOW_SURFACE_OWNER_PLUGIN = "@nocobase/plugin-workflow-approval";
|
|
39
|
+
const APPROVAL_BLOCK_CATALOG_SPECS = [
|
|
40
|
+
{
|
|
41
|
+
key: "approvalInitiator",
|
|
42
|
+
label: "Approval initiator",
|
|
43
|
+
use: "ApplyFormModel",
|
|
44
|
+
requiredInitParams: ["dataSourceKey", "collectionName"],
|
|
45
|
+
allowedContainerUses: ["TriggerBlockGridModel"],
|
|
46
|
+
createSupported: true
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "approvalApprover",
|
|
50
|
+
label: "Approval approver",
|
|
51
|
+
use: "ProcessFormModel",
|
|
52
|
+
requiredInitParams: ["dataSourceKey", "collectionName"],
|
|
53
|
+
allowedContainerUses: ["ApprovalBlockGridModel"],
|
|
54
|
+
createSupported: true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
key: "approvalInformation",
|
|
58
|
+
label: "Approval information",
|
|
59
|
+
use: "ApprovalDetailsModel",
|
|
60
|
+
requiredInitParams: ["dataSourceKey", "collectionName"],
|
|
61
|
+
allowedContainerUses: ["ApprovalBlockGridModel"],
|
|
62
|
+
createSupported: true
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
const APPROVAL_ACTION_CATALOG_SPECS = [
|
|
66
|
+
{
|
|
67
|
+
publicKey: "approvalSubmit",
|
|
68
|
+
label: "Submit",
|
|
69
|
+
scope: "form",
|
|
70
|
+
scene: "form",
|
|
71
|
+
use: "ApplyFormSubmitModel",
|
|
72
|
+
allowedContainerUses: ["ApplyFormModel"],
|
|
73
|
+
createSupported: true
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
publicKey: "approvalSaveDraft",
|
|
77
|
+
label: "Save draft",
|
|
78
|
+
scope: "form",
|
|
79
|
+
scene: "form",
|
|
80
|
+
use: "ApplyFormSaveDraftModel",
|
|
81
|
+
allowedContainerUses: ["ApplyFormModel"],
|
|
82
|
+
createSupported: true
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
publicKey: "approvalWithdraw",
|
|
86
|
+
label: "Withdraw",
|
|
87
|
+
scope: "form",
|
|
88
|
+
scene: "form",
|
|
89
|
+
use: "ApplyFormWithdrawModel",
|
|
90
|
+
allowedContainerUses: ["ApplyFormModel"],
|
|
91
|
+
createSupported: true
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
publicKey: "approvalApprove",
|
|
95
|
+
label: "Approve",
|
|
96
|
+
scope: "form",
|
|
97
|
+
scene: "form",
|
|
98
|
+
use: "ProcessFormApproveModel",
|
|
99
|
+
allowedContainerUses: ["ProcessFormModel"],
|
|
100
|
+
createSupported: true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
publicKey: "approvalReject",
|
|
104
|
+
label: "Reject",
|
|
105
|
+
scope: "form",
|
|
106
|
+
scene: "form",
|
|
107
|
+
use: "ProcessFormRejectModel",
|
|
108
|
+
allowedContainerUses: ["ProcessFormModel"],
|
|
109
|
+
createSupported: true
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
publicKey: "approvalReturn",
|
|
113
|
+
label: "Return",
|
|
114
|
+
scope: "form",
|
|
115
|
+
scene: "form",
|
|
116
|
+
use: "ProcessFormReturnModel",
|
|
117
|
+
allowedContainerUses: ["ProcessFormModel"],
|
|
118
|
+
createSupported: true
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
publicKey: "approvalDelegate",
|
|
122
|
+
label: "Delegate",
|
|
123
|
+
scope: "form",
|
|
124
|
+
scene: "form",
|
|
125
|
+
use: "ProcessFormDelegateModel",
|
|
126
|
+
allowedContainerUses: ["ProcessFormModel"],
|
|
127
|
+
createSupported: true
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
publicKey: "approvalAddAssignee",
|
|
131
|
+
label: "Add assignee",
|
|
132
|
+
scope: "form",
|
|
133
|
+
scene: "form",
|
|
134
|
+
use: "ProcessFormAddAssigneeModel",
|
|
135
|
+
allowedContainerUses: ["ProcessFormModel"],
|
|
136
|
+
createSupported: true
|
|
137
|
+
}
|
|
138
|
+
];
|
|
139
|
+
const APPROVAL_BLOCK_PUBLIC_KEYS = APPROVAL_BLOCK_CATALOG_SPECS.map((item) => item.key);
|
|
140
|
+
const APPROVAL_ACTION_PUBLIC_KEYS = APPROVAL_ACTION_CATALOG_SPECS.map((item) => item.publicKey);
|
|
141
|
+
const APPROVAL_BLOCK_OWNER_PLUGIN_BY_USE = new Map(
|
|
142
|
+
APPROVAL_BLOCK_CATALOG_SPECS.map((item) => [item.use, APPROVAL_FLOW_SURFACE_OWNER_PLUGIN])
|
|
143
|
+
);
|
|
144
|
+
const APPROVAL_ACTION_OWNER_PLUGIN_BY_USE = new Map(
|
|
145
|
+
APPROVAL_ACTION_CATALOG_SPECS.map((item) => [item.use, APPROVAL_FLOW_SURFACE_OWNER_PLUGIN])
|
|
146
|
+
);
|
|
147
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
148
|
+
0 && (module.exports = {
|
|
149
|
+
APPROVAL_ACTION_CATALOG_SPECS,
|
|
150
|
+
APPROVAL_ACTION_OWNER_PLUGIN_BY_USE,
|
|
151
|
+
APPROVAL_ACTION_PUBLIC_KEYS,
|
|
152
|
+
APPROVAL_BLOCK_CATALOG_SPECS,
|
|
153
|
+
APPROVAL_BLOCK_OWNER_PLUGIN_BY_USE,
|
|
154
|
+
APPROVAL_BLOCK_PUBLIC_KEYS,
|
|
155
|
+
APPROVAL_FLOW_SURFACE_OWNER_PLUGIN
|
|
156
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
export * from './builder';
|
|
10
|
+
export * from './blueprint';
|
|
11
|
+
export * from './blueprint-service';
|
|
12
|
+
export * from './catalog-specs';
|
|
13
|
+
export * from './runtime-config';
|
|
14
|
+
export * from './semantic-use';
|
|
@@ -0,0 +1,40 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var approval_exports = {};
|
|
25
|
+
module.exports = __toCommonJS(approval_exports);
|
|
26
|
+
__reExport(approval_exports, require("./builder"), module.exports);
|
|
27
|
+
__reExport(approval_exports, require("./blueprint"), module.exports);
|
|
28
|
+
__reExport(approval_exports, require("./blueprint-service"), module.exports);
|
|
29
|
+
__reExport(approval_exports, require("./catalog-specs"), module.exports);
|
|
30
|
+
__reExport(approval_exports, require("./runtime-config"), module.exports);
|
|
31
|
+
__reExport(approval_exports, require("./semantic-use"), module.exports);
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
...require("./builder"),
|
|
35
|
+
...require("./blueprint"),
|
|
36
|
+
...require("./blueprint-service"),
|
|
37
|
+
...require("./catalog-specs"),
|
|
38
|
+
...require("./runtime-config"),
|
|
39
|
+
...require("./semantic-use")
|
|
40
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
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 FlowModelRepository from '../../repository';
|
|
10
|
+
export declare const APPROVAL_SURFACE_ROOT_USES: Set<string>;
|
|
11
|
+
export declare const APPROVAL_SINGLETON_ACTION_USES: Set<string>;
|
|
12
|
+
type ApprovalRuntimeConfigDeps = {
|
|
13
|
+
db: {
|
|
14
|
+
getRepository: (resourceName: string) => {
|
|
15
|
+
find: (options: Record<string, any>) => Promise<any[]>;
|
|
16
|
+
update: (options: Record<string, any>) => Promise<any>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
locator: {
|
|
20
|
+
findParentUid: (uid: string, transaction?: any) => Promise<string | null | undefined>;
|
|
21
|
+
};
|
|
22
|
+
repository: Pick<FlowModelRepository, 'findModelById'>;
|
|
23
|
+
};
|
|
24
|
+
export declare class FlowSurfaceApprovalRuntimeConfigService {
|
|
25
|
+
private readonly deps;
|
|
26
|
+
constructor(deps: ApprovalRuntimeConfigDeps);
|
|
27
|
+
private getRepositoryIfAvailable;
|
|
28
|
+
private readModelField;
|
|
29
|
+
private readApprovalConfig;
|
|
30
|
+
private collectApprovalActionNodes;
|
|
31
|
+
findApprovalSurfaceRootForNode(uid: string, transaction?: any): Promise<any>;
|
|
32
|
+
private findApprovalWorkflowBySurfaceRootUid;
|
|
33
|
+
private findApprovalNodeBySurfaceRootUid;
|
|
34
|
+
private patchApprovalRuntimeConfig;
|
|
35
|
+
private getApprovalActionStepValue;
|
|
36
|
+
private buildApprovalReturnRuntimeConfig;
|
|
37
|
+
private buildApprovalReassignRuntimeConfig;
|
|
38
|
+
private syncApprovalWorkflowRuntimeConfig;
|
|
39
|
+
private syncApprovalNodeRuntimeConfig;
|
|
40
|
+
syncApprovalRuntimeConfigForSurfaceRoot(root: any, transaction?: any): Promise<void>;
|
|
41
|
+
syncApprovalRuntimeConfigForNode(uid: string, transaction?: any): Promise<void>;
|
|
42
|
+
assertApprovalActionSingleton(parentUid: string, actionUse: string, transaction?: any): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
export {};
|