@nocobase/plugin-flow-engine 2.1.0-beta.15 → 2.1.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/ai-employees/nathan/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/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 +11 -10
- 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/flow-surfaces/action-scope.d.ts +38 -0
- package/dist/server/flow-surfaces/action-scope.js +152 -0
- package/dist/server/flow-surfaces/apply/compiler.d.ts +13 -0
- package/dist/server/flow-surfaces/apply/compiler.js +969 -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-title-field.d.ts +20 -0
- package/dist/server/flow-surfaces/association-title-field.js +158 -0
- package/dist/server/flow-surfaces/blueprint/compile-blocks.d.ts +14 -0
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +1007 -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 +193 -0
- package/dist/server/flow-surfaces/blueprint/public-types.js +24 -0
- package/dist/server/flow-surfaces/builder.d.ts +211 -0
- package/dist/server/flow-surfaces/builder.js +1029 -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 +78 -0
- package/dist/server/flow-surfaces/catalog.js +3496 -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 +108 -0
- package/dist/server/flow-surfaces/compose-compiler.js +167 -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 +827 -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/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 +185 -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 +23 -0
- package/dist/server/flow-surfaces/field-binding-registry.js +391 -0
- package/dist/server/flow-surfaces/field-semantics.d.ts +15 -0
- package/dist/server/flow-surfaces/field-semantics.js +81 -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 +243 -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 +131 -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 +195 -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 +20 -0
- package/dist/server/flow-surfaces/public-data-surface-default-filter.js +111 -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 +377 -0
- package/dist/server/flow-surfaces/service-utils.d.ts +108 -0
- package/dist/server/flow-surfaces/service-utils.js +811 -0
- package/dist/server/flow-surfaces/service.d.ts +773 -0
- package/dist/server/flow-surfaces/service.js +13008 -0
- package/dist/server/flow-surfaces/support-matrix.d.ts +31 -0
- package/dist/server/flow-surfaces/support-matrix.js +259 -0
- package/dist/server/flow-surfaces/surface-context.d.ts +52 -0
- package/dist/server/flow-surfaces/surface-context.js +437 -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/plugin.js +2 -0
- package/dist/swagger/flow-surfaces.d.ts +5964 -0
- package/dist/swagger/flow-surfaces.examples.d.ts +1533 -0
- package/dist/swagger/flow-surfaces.examples.js +1758 -0
- package/dist/swagger/flow-surfaces.js +5315 -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 +5969 -0
- package/dist/swagger/index.js +50 -0
- package/package.json +2 -2
- /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,1758 @@
|
|
|
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 flow_surfaces_examples_exports = {};
|
|
28
|
+
__export(flow_surfaces_examples_exports, {
|
|
29
|
+
flowSurfaceExamples: () => flowSurfaceExamples
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(flow_surfaces_examples_exports);
|
|
32
|
+
const makePublicBlockDefaultFilter = (items = [
|
|
33
|
+
{
|
|
34
|
+
path: "username",
|
|
35
|
+
operator: "$includes",
|
|
36
|
+
value: ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
path: "email",
|
|
40
|
+
operator: "$includes",
|
|
41
|
+
value: ""
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
path: "status",
|
|
45
|
+
operator: "$eq",
|
|
46
|
+
value: ""
|
|
47
|
+
}
|
|
48
|
+
]) => ({
|
|
49
|
+
logic: "$and",
|
|
50
|
+
items
|
|
51
|
+
});
|
|
52
|
+
const flowSurfaceExamples = {
|
|
53
|
+
catalog: {
|
|
54
|
+
target: {
|
|
55
|
+
uid: "table-block-uid"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
context: {
|
|
59
|
+
target: {
|
|
60
|
+
uid: "details-block-uid"
|
|
61
|
+
},
|
|
62
|
+
path: "record",
|
|
63
|
+
maxDepth: 3
|
|
64
|
+
},
|
|
65
|
+
getReactionMeta: {
|
|
66
|
+
target: {
|
|
67
|
+
uid: "employees-form-uid"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
describeSurface: {
|
|
71
|
+
locator: {
|
|
72
|
+
pageSchemaUid: "employees-page-schema"
|
|
73
|
+
},
|
|
74
|
+
bindKeys: [
|
|
75
|
+
{
|
|
76
|
+
key: "employeesTable",
|
|
77
|
+
locator: {
|
|
78
|
+
uid: "employees-table-uid"
|
|
79
|
+
},
|
|
80
|
+
expectedKind: "block"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
applyBlueprint: {
|
|
85
|
+
version: "1",
|
|
86
|
+
mode: "create",
|
|
87
|
+
navigation: {
|
|
88
|
+
group: {
|
|
89
|
+
title: "Workspace"
|
|
90
|
+
},
|
|
91
|
+
item: {
|
|
92
|
+
title: "Employees"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
page: {
|
|
96
|
+
title: "Employees",
|
|
97
|
+
documentTitle: "Employees workspace",
|
|
98
|
+
enableHeader: true,
|
|
99
|
+
displayTitle: true
|
|
100
|
+
},
|
|
101
|
+
tabs: [
|
|
102
|
+
{
|
|
103
|
+
key: "main",
|
|
104
|
+
title: "Overview",
|
|
105
|
+
blocks: [
|
|
106
|
+
{
|
|
107
|
+
key: "employeeForm",
|
|
108
|
+
type: "createForm",
|
|
109
|
+
collection: "employees",
|
|
110
|
+
fields: [
|
|
111
|
+
{ key: "nicknameField", field: "nickname" },
|
|
112
|
+
{ key: "statusField", field: "status" },
|
|
113
|
+
"amount",
|
|
114
|
+
"taxRate",
|
|
115
|
+
"subtotal",
|
|
116
|
+
"total"
|
|
117
|
+
],
|
|
118
|
+
fieldsLayout: {
|
|
119
|
+
rows: [
|
|
120
|
+
["nicknameField"],
|
|
121
|
+
[
|
|
122
|
+
{ key: "statusField", span: 12 },
|
|
123
|
+
{ key: "amount", span: 12 }
|
|
124
|
+
],
|
|
125
|
+
["taxRate"],
|
|
126
|
+
["subtotal"],
|
|
127
|
+
["total"]
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
actions: ["submit"]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
key: "employeesTable",
|
|
134
|
+
type: "table",
|
|
135
|
+
collection: "employees",
|
|
136
|
+
defaultFilter: makePublicBlockDefaultFilter([
|
|
137
|
+
{
|
|
138
|
+
path: "nickname",
|
|
139
|
+
operator: "$includes",
|
|
140
|
+
value: ""
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
path: "status",
|
|
144
|
+
operator: "$eq",
|
|
145
|
+
value: ""
|
|
146
|
+
}
|
|
147
|
+
]),
|
|
148
|
+
fields: ["nickname", "status", "total"],
|
|
149
|
+
actions: [
|
|
150
|
+
{
|
|
151
|
+
key: "filterAction",
|
|
152
|
+
type: "filter",
|
|
153
|
+
settings: {
|
|
154
|
+
defaultFilter: makePublicBlockDefaultFilter([
|
|
155
|
+
{
|
|
156
|
+
path: "status",
|
|
157
|
+
operator: "$eq",
|
|
158
|
+
value: "active"
|
|
159
|
+
}
|
|
160
|
+
])
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
key: "refreshAction",
|
|
165
|
+
type: "refresh"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
layout: {
|
|
171
|
+
rows: [["main.employeeForm"], ["main.employeesTable"]]
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
reaction: {
|
|
176
|
+
items: [
|
|
177
|
+
{
|
|
178
|
+
type: "setFieldValueRules",
|
|
179
|
+
target: "main.employeeForm",
|
|
180
|
+
rules: [
|
|
181
|
+
{
|
|
182
|
+
key: "defaultStatus",
|
|
183
|
+
targetPath: "status",
|
|
184
|
+
mode: "default",
|
|
185
|
+
value: {
|
|
186
|
+
source: "literal",
|
|
187
|
+
value: "draft"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
type: "setBlockLinkageRules",
|
|
194
|
+
target: "main.employeesTable",
|
|
195
|
+
rules: [
|
|
196
|
+
{
|
|
197
|
+
key: "hideTable",
|
|
198
|
+
when: {
|
|
199
|
+
logic: "$and",
|
|
200
|
+
items: [
|
|
201
|
+
{
|
|
202
|
+
path: "params.query.hideTable",
|
|
203
|
+
operator: "$isTruly"
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
then: [{ type: "setBlockState", state: "hidden" }]
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
type: "setFieldLinkageRules",
|
|
213
|
+
target: "main.employeeForm",
|
|
214
|
+
rules: [
|
|
215
|
+
{
|
|
216
|
+
key: "recomputeTotals",
|
|
217
|
+
when: {
|
|
218
|
+
logic: "$and",
|
|
219
|
+
items: [
|
|
220
|
+
{
|
|
221
|
+
path: "formValues.amount",
|
|
222
|
+
operator: "$notEmpty"
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
then: [
|
|
227
|
+
{
|
|
228
|
+
type: "assignField",
|
|
229
|
+
items: [
|
|
230
|
+
{
|
|
231
|
+
targetPath: "subtotal",
|
|
232
|
+
value: {
|
|
233
|
+
source: "runjs",
|
|
234
|
+
version: "v2",
|
|
235
|
+
code: "const amount = Number(ctx.formValues?.amount || 0); return amount;"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
targetPath: "total",
|
|
240
|
+
value: {
|
|
241
|
+
source: "runjs",
|
|
242
|
+
version: "v2",
|
|
243
|
+
code: "const amount = Number(ctx.formValues?.amount || 0); const taxRate = Number(ctx.formValues?.taxRate || 0); return amount + amount * taxRate;"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
type: "setActionLinkageRules",
|
|
254
|
+
target: "main.employeesTable.refreshAction",
|
|
255
|
+
rules: [
|
|
256
|
+
{
|
|
257
|
+
key: "disableRefresh",
|
|
258
|
+
when: {
|
|
259
|
+
logic: "$and",
|
|
260
|
+
items: [
|
|
261
|
+
{
|
|
262
|
+
path: "params.query.readonly",
|
|
263
|
+
operator: "$isTruly"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
then: [{ type: "setActionState", state: "disabled" }]
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
applyBlueprintReplace: {
|
|
275
|
+
version: "1",
|
|
276
|
+
mode: "replace",
|
|
277
|
+
target: {
|
|
278
|
+
pageSchemaUid: "employees-page-schema"
|
|
279
|
+
},
|
|
280
|
+
page: {
|
|
281
|
+
title: "Employees workspace",
|
|
282
|
+
documentTitle: "Employees replace flow",
|
|
283
|
+
displayTitle: false,
|
|
284
|
+
enableTabs: true
|
|
285
|
+
},
|
|
286
|
+
tabs: [
|
|
287
|
+
{
|
|
288
|
+
title: "Overview",
|
|
289
|
+
blocks: [
|
|
290
|
+
{
|
|
291
|
+
key: "employeesTable",
|
|
292
|
+
type: "table",
|
|
293
|
+
collection: "employees",
|
|
294
|
+
fields: ["nickname", "status", "total"]
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
applyApprovalBlueprintInitiator: {
|
|
301
|
+
version: "1",
|
|
302
|
+
surface: "initiator",
|
|
303
|
+
workflowId: 101,
|
|
304
|
+
blocks: [
|
|
305
|
+
{
|
|
306
|
+
key: "initiatorForm",
|
|
307
|
+
type: "approvalInitiator",
|
|
308
|
+
resource: {
|
|
309
|
+
dataSourceKey: "main",
|
|
310
|
+
collectionName: "employees"
|
|
311
|
+
},
|
|
312
|
+
fields: ["nickname", "status"],
|
|
313
|
+
actions: ["approvalSaveDraft", "approvalWithdraw"]
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
layout: {
|
|
317
|
+
rows: [["initiatorForm"]]
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
applyApprovalBlueprintApprover: {
|
|
321
|
+
version: "1",
|
|
322
|
+
surface: "approver",
|
|
323
|
+
nodeId: 201,
|
|
324
|
+
blocks: [
|
|
325
|
+
{
|
|
326
|
+
key: "processForm",
|
|
327
|
+
type: "approvalApprover",
|
|
328
|
+
resource: {
|
|
329
|
+
dataSourceKey: "main",
|
|
330
|
+
collectionName: "employees"
|
|
331
|
+
},
|
|
332
|
+
fields: ["nickname"],
|
|
333
|
+
actions: [
|
|
334
|
+
"approvalApprove",
|
|
335
|
+
"approvalReject",
|
|
336
|
+
{
|
|
337
|
+
type: "approvalReturn",
|
|
338
|
+
settings: {
|
|
339
|
+
approvalReturn: {
|
|
340
|
+
type: "count",
|
|
341
|
+
count: 1
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
key: "approvalInfo",
|
|
349
|
+
type: "approvalInformation",
|
|
350
|
+
resource: {
|
|
351
|
+
dataSourceKey: "main",
|
|
352
|
+
collectionName: "employees"
|
|
353
|
+
},
|
|
354
|
+
fields: ["status"]
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
layout: {
|
|
358
|
+
rows: [["processForm"], ["approvalInfo"]]
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
applyApprovalBlueprintTaskCard: {
|
|
362
|
+
version: "1",
|
|
363
|
+
surface: "taskCard",
|
|
364
|
+
nodeId: 201,
|
|
365
|
+
fields: [
|
|
366
|
+
{
|
|
367
|
+
key: "nickname",
|
|
368
|
+
fieldPath: "nickname"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
key: "status",
|
|
372
|
+
fieldPath: "status"
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
layout: {
|
|
376
|
+
rows: [["nickname", "status"]]
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
setFieldValueRules: {
|
|
380
|
+
target: {
|
|
381
|
+
uid: "employees-form-uid"
|
|
382
|
+
},
|
|
383
|
+
rules: [
|
|
384
|
+
{
|
|
385
|
+
key: "defaultStatus",
|
|
386
|
+
targetPath: "status",
|
|
387
|
+
mode: "default",
|
|
388
|
+
value: {
|
|
389
|
+
source: "literal",
|
|
390
|
+
value: "draft"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
],
|
|
394
|
+
expectedFingerprint: "field-value-fp-1"
|
|
395
|
+
},
|
|
396
|
+
setBlockLinkageRules: {
|
|
397
|
+
target: {
|
|
398
|
+
uid: "employees-table-uid"
|
|
399
|
+
},
|
|
400
|
+
rules: [
|
|
401
|
+
{
|
|
402
|
+
key: "hideTable",
|
|
403
|
+
when: {
|
|
404
|
+
logic: "$and",
|
|
405
|
+
items: [
|
|
406
|
+
{
|
|
407
|
+
path: "params.query.hideTable",
|
|
408
|
+
operator: "$isTruly"
|
|
409
|
+
}
|
|
410
|
+
]
|
|
411
|
+
},
|
|
412
|
+
then: [{ type: "setBlockState", state: "hidden" }]
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
expectedFingerprint: "block-linkage-fp-1"
|
|
416
|
+
},
|
|
417
|
+
setFieldLinkageRules: {
|
|
418
|
+
target: {
|
|
419
|
+
uid: "employees-form-uid"
|
|
420
|
+
},
|
|
421
|
+
rules: [
|
|
422
|
+
{
|
|
423
|
+
key: "recomputeTotals",
|
|
424
|
+
when: {
|
|
425
|
+
logic: "$and",
|
|
426
|
+
items: [
|
|
427
|
+
{
|
|
428
|
+
path: "formValues.amount",
|
|
429
|
+
operator: "$notEmpty"
|
|
430
|
+
}
|
|
431
|
+
]
|
|
432
|
+
},
|
|
433
|
+
then: [
|
|
434
|
+
{
|
|
435
|
+
type: "assignField",
|
|
436
|
+
items: [
|
|
437
|
+
{
|
|
438
|
+
targetPath: "subtotal",
|
|
439
|
+
value: {
|
|
440
|
+
source: "runjs",
|
|
441
|
+
version: "v2",
|
|
442
|
+
code: "const amount = Number(ctx.formValues?.amount || 0); return amount;"
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
targetPath: "total",
|
|
447
|
+
value: {
|
|
448
|
+
source: "runjs",
|
|
449
|
+
version: "v2",
|
|
450
|
+
code: "const amount = Number(ctx.formValues?.amount || 0); const taxRate = Number(ctx.formValues?.taxRate || 0); return amount + amount * taxRate;"
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
]
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
expectedFingerprint: "field-linkage-fp-1"
|
|
459
|
+
},
|
|
460
|
+
setActionLinkageRules: {
|
|
461
|
+
target: {
|
|
462
|
+
uid: "refresh-action-uid"
|
|
463
|
+
},
|
|
464
|
+
expectedFingerprint: "action-linkage-fp-1",
|
|
465
|
+
rules: [
|
|
466
|
+
{
|
|
467
|
+
key: "disableRefresh",
|
|
468
|
+
when: {
|
|
469
|
+
logic: "$and",
|
|
470
|
+
items: [
|
|
471
|
+
{
|
|
472
|
+
path: "params.query.readonly",
|
|
473
|
+
operator: "$isTruly"
|
|
474
|
+
}
|
|
475
|
+
]
|
|
476
|
+
},
|
|
477
|
+
then: [{ type: "setActionState", state: "disabled" }]
|
|
478
|
+
}
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
compose: {
|
|
482
|
+
target: {
|
|
483
|
+
uid: "page-grid-uid"
|
|
484
|
+
},
|
|
485
|
+
mode: "append",
|
|
486
|
+
blocks: [
|
|
487
|
+
{
|
|
488
|
+
key: "filter",
|
|
489
|
+
type: "filterForm",
|
|
490
|
+
resource: {
|
|
491
|
+
dataSourceKey: "main",
|
|
492
|
+
collectionName: "users"
|
|
493
|
+
},
|
|
494
|
+
fields: [
|
|
495
|
+
{
|
|
496
|
+
fieldPath: "username",
|
|
497
|
+
target: "table"
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
fieldPath: "nickname",
|
|
501
|
+
target: "table"
|
|
502
|
+
}
|
|
503
|
+
],
|
|
504
|
+
fieldsLayout: {
|
|
505
|
+
rows: [
|
|
506
|
+
[
|
|
507
|
+
{ key: "nickname", span: 12 },
|
|
508
|
+
{ key: "username", span: 12 }
|
|
509
|
+
]
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
actions: ["submit", "reset", "collapse"]
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
key: "table",
|
|
516
|
+
type: "table",
|
|
517
|
+
resource: {
|
|
518
|
+
dataSourceKey: "main",
|
|
519
|
+
collectionName: "users"
|
|
520
|
+
},
|
|
521
|
+
defaultFilter: makePublicBlockDefaultFilter(),
|
|
522
|
+
fields: ["username", "nickname", { fieldPath: "roles.title" }],
|
|
523
|
+
actions: [
|
|
524
|
+
{
|
|
525
|
+
type: "filter",
|
|
526
|
+
settings: {
|
|
527
|
+
defaultFilter: makePublicBlockDefaultFilter([
|
|
528
|
+
{
|
|
529
|
+
path: "status",
|
|
530
|
+
operator: "$eq",
|
|
531
|
+
value: "active"
|
|
532
|
+
}
|
|
533
|
+
])
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"addNew",
|
|
537
|
+
"refresh",
|
|
538
|
+
"bulkDelete",
|
|
539
|
+
"link"
|
|
540
|
+
],
|
|
541
|
+
recordActions: [
|
|
542
|
+
"view",
|
|
543
|
+
"edit",
|
|
544
|
+
{
|
|
545
|
+
type: "popup",
|
|
546
|
+
popup: {
|
|
547
|
+
mode: "replace",
|
|
548
|
+
blocks: [
|
|
549
|
+
{
|
|
550
|
+
key: "details",
|
|
551
|
+
type: "details",
|
|
552
|
+
resource: {
|
|
553
|
+
dataSourceKey: "main",
|
|
554
|
+
collectionName: "users"
|
|
555
|
+
},
|
|
556
|
+
fields: ["username", "nickname"]
|
|
557
|
+
}
|
|
558
|
+
]
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
"updateRecord",
|
|
562
|
+
"delete"
|
|
563
|
+
]
|
|
564
|
+
}
|
|
565
|
+
],
|
|
566
|
+
layout: {
|
|
567
|
+
rows: [
|
|
568
|
+
[
|
|
569
|
+
{
|
|
570
|
+
key: "filter",
|
|
571
|
+
span: 3
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
key: "table",
|
|
575
|
+
span: 7
|
|
576
|
+
}
|
|
577
|
+
]
|
|
578
|
+
]
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
composeStatic: {
|
|
582
|
+
target: {
|
|
583
|
+
uid: "page-grid-uid"
|
|
584
|
+
},
|
|
585
|
+
blocks: [
|
|
586
|
+
{
|
|
587
|
+
key: "markdown",
|
|
588
|
+
type: "markdown",
|
|
589
|
+
settings: {
|
|
590
|
+
content: "# Team handbook"
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
key: "iframe",
|
|
595
|
+
type: "iframe",
|
|
596
|
+
settings: {
|
|
597
|
+
mode: "url",
|
|
598
|
+
url: "https://example.com/embed",
|
|
599
|
+
height: 360
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
key: "panel",
|
|
604
|
+
type: "actionPanel",
|
|
605
|
+
settings: {
|
|
606
|
+
layout: "list",
|
|
607
|
+
ellipsis: false
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
],
|
|
611
|
+
layout: {
|
|
612
|
+
rows: [["markdown", "iframe"], ["panel"]]
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
composeListRich: {
|
|
616
|
+
target: {
|
|
617
|
+
uid: "page-grid-uid"
|
|
618
|
+
},
|
|
619
|
+
blocks: [
|
|
620
|
+
{
|
|
621
|
+
key: "employeesList",
|
|
622
|
+
type: "list",
|
|
623
|
+
resource: {
|
|
624
|
+
dataSourceKey: "main",
|
|
625
|
+
collectionName: "employees"
|
|
626
|
+
},
|
|
627
|
+
defaultFilter: makePublicBlockDefaultFilter([
|
|
628
|
+
{
|
|
629
|
+
path: "nickname",
|
|
630
|
+
operator: "$includes",
|
|
631
|
+
value: ""
|
|
632
|
+
}
|
|
633
|
+
]),
|
|
634
|
+
fields: [
|
|
635
|
+
"nickname",
|
|
636
|
+
{
|
|
637
|
+
fieldPath: "department.name"
|
|
638
|
+
}
|
|
639
|
+
],
|
|
640
|
+
actions: ["addNew", "refresh"],
|
|
641
|
+
recordActions: [
|
|
642
|
+
"view",
|
|
643
|
+
"edit",
|
|
644
|
+
{
|
|
645
|
+
type: "popup",
|
|
646
|
+
popup: {
|
|
647
|
+
mode: "replace",
|
|
648
|
+
blocks: [
|
|
649
|
+
{
|
|
650
|
+
key: "details",
|
|
651
|
+
type: "details",
|
|
652
|
+
resource: {
|
|
653
|
+
dataSourceKey: "main",
|
|
654
|
+
collectionName: "employees"
|
|
655
|
+
},
|
|
656
|
+
fields: ["nickname"]
|
|
657
|
+
}
|
|
658
|
+
]
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
"delete"
|
|
662
|
+
],
|
|
663
|
+
settings: {
|
|
664
|
+
pageSize: 20,
|
|
665
|
+
layout: "vertical"
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
]
|
|
669
|
+
},
|
|
670
|
+
composeGridCardRich: {
|
|
671
|
+
target: {
|
|
672
|
+
uid: "page-grid-uid"
|
|
673
|
+
},
|
|
674
|
+
blocks: [
|
|
675
|
+
{
|
|
676
|
+
key: "employeeCards",
|
|
677
|
+
type: "gridCard",
|
|
678
|
+
resource: {
|
|
679
|
+
dataSourceKey: "main",
|
|
680
|
+
collectionName: "employees"
|
|
681
|
+
},
|
|
682
|
+
defaultFilter: makePublicBlockDefaultFilter([
|
|
683
|
+
{
|
|
684
|
+
path: "nickname",
|
|
685
|
+
operator: "$includes",
|
|
686
|
+
value: ""
|
|
687
|
+
}
|
|
688
|
+
]),
|
|
689
|
+
fields: [
|
|
690
|
+
"nickname",
|
|
691
|
+
{
|
|
692
|
+
fieldPath: "department.name"
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
actions: ["addNew", "refresh"],
|
|
696
|
+
recordActions: ["view", "edit", "updateRecord", "delete"],
|
|
697
|
+
settings: {
|
|
698
|
+
columns: 3,
|
|
699
|
+
rowCount: 2,
|
|
700
|
+
layout: "vertical"
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
]
|
|
704
|
+
},
|
|
705
|
+
composeJsBlock: {
|
|
706
|
+
target: {
|
|
707
|
+
uid: "page-grid-uid"
|
|
708
|
+
},
|
|
709
|
+
blocks: [
|
|
710
|
+
{
|
|
711
|
+
key: "customHero",
|
|
712
|
+
type: "jsBlock",
|
|
713
|
+
settings: {
|
|
714
|
+
title: "Custom hero",
|
|
715
|
+
description: "Rendered by JS block runtime",
|
|
716
|
+
className: "hero-shell",
|
|
717
|
+
version: "1.0.0",
|
|
718
|
+
code: "ctx.render('<div>Hello from JS block</div>');"
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
]
|
|
722
|
+
},
|
|
723
|
+
configure: {
|
|
724
|
+
target: {
|
|
725
|
+
uid: "details-field-uid"
|
|
726
|
+
},
|
|
727
|
+
changes: {
|
|
728
|
+
clickToOpen: true,
|
|
729
|
+
openView: {
|
|
730
|
+
dataSourceKey: "main",
|
|
731
|
+
collectionName: "departments",
|
|
732
|
+
associationName: "users.department",
|
|
733
|
+
mode: "drawer"
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
configureAssociationPopup: {
|
|
738
|
+
target: {
|
|
739
|
+
uid: "roles-field-wrapper-uid"
|
|
740
|
+
},
|
|
741
|
+
changes: {
|
|
742
|
+
clickToOpen: true,
|
|
743
|
+
openView: {
|
|
744
|
+
dataSourceKey: "main",
|
|
745
|
+
collectionName: "roles",
|
|
746
|
+
associationName: "users.roles",
|
|
747
|
+
mode: "drawer"
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
configureBlock: {
|
|
752
|
+
target: {
|
|
753
|
+
uid: "list-block-uid"
|
|
754
|
+
},
|
|
755
|
+
changes: {
|
|
756
|
+
pageSize: 50,
|
|
757
|
+
dataScope: {
|
|
758
|
+
logic: "$and",
|
|
759
|
+
items: [
|
|
760
|
+
{
|
|
761
|
+
path: "nickname",
|
|
762
|
+
operator: "$eq",
|
|
763
|
+
value: "beta"
|
|
764
|
+
}
|
|
765
|
+
]
|
|
766
|
+
},
|
|
767
|
+
sorting: [
|
|
768
|
+
{
|
|
769
|
+
field: "username",
|
|
770
|
+
direction: "asc"
|
|
771
|
+
}
|
|
772
|
+
],
|
|
773
|
+
layout: "vertical"
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
createMenu: {
|
|
777
|
+
title: "Employees",
|
|
778
|
+
type: "item",
|
|
779
|
+
parentMenuRouteId: 1001
|
|
780
|
+
},
|
|
781
|
+
updateMenu: {
|
|
782
|
+
menuRouteId: 1002,
|
|
783
|
+
title: "Employees Center",
|
|
784
|
+
parentMenuRouteId: null
|
|
785
|
+
},
|
|
786
|
+
configureAction: {
|
|
787
|
+
target: {
|
|
788
|
+
uid: "update-record-action-uid"
|
|
789
|
+
},
|
|
790
|
+
changes: {
|
|
791
|
+
title: "Quick update",
|
|
792
|
+
type: "primary",
|
|
793
|
+
color: "gold",
|
|
794
|
+
htmlType: "button",
|
|
795
|
+
position: "end",
|
|
796
|
+
confirm: {
|
|
797
|
+
enable: true,
|
|
798
|
+
title: "Confirm update",
|
|
799
|
+
content: "Apply assigned values?"
|
|
800
|
+
},
|
|
801
|
+
assignValues: {
|
|
802
|
+
status: "active"
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
configureJsBlock: {
|
|
807
|
+
target: {
|
|
808
|
+
uid: "js-block-uid"
|
|
809
|
+
},
|
|
810
|
+
changes: {
|
|
811
|
+
title: "Users hero",
|
|
812
|
+
description: "Rendered from FlowSurfaces configure",
|
|
813
|
+
className: "users-hero",
|
|
814
|
+
version: "1.0.1",
|
|
815
|
+
code: "ctx.render('<div>Users hero</div>');"
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
configureJsAction: {
|
|
819
|
+
target: {
|
|
820
|
+
uid: "js-action-uid"
|
|
821
|
+
},
|
|
822
|
+
changes: {
|
|
823
|
+
title: "Run diagnostics",
|
|
824
|
+
type: "primary",
|
|
825
|
+
version: "1.0.1",
|
|
826
|
+
code: `await ctx.runjs('console.log("diagnostics")');`
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
configureJsItemAction: {
|
|
830
|
+
target: {
|
|
831
|
+
uid: "js-item-action-uid"
|
|
832
|
+
},
|
|
833
|
+
changes: {
|
|
834
|
+
title: "Run item diagnostics",
|
|
835
|
+
type: "default",
|
|
836
|
+
version: "1.0.1",
|
|
837
|
+
code: `await ctx.runjs('console.log("item diagnostics")');`
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
configureJsField: {
|
|
841
|
+
target: {
|
|
842
|
+
uid: "js-field-wrapper-uid"
|
|
843
|
+
},
|
|
844
|
+
changes: {
|
|
845
|
+
label: "Custom renderer",
|
|
846
|
+
version: "1.0.1",
|
|
847
|
+
code: "ctx.render(String(ctx.record?.nickname?.toUpperCase?.() || ''));"
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
configureJsColumn: {
|
|
851
|
+
target: {
|
|
852
|
+
uid: "js-column-uid"
|
|
853
|
+
},
|
|
854
|
+
changes: {
|
|
855
|
+
title: "JS column",
|
|
856
|
+
width: 240,
|
|
857
|
+
fixed: "left",
|
|
858
|
+
version: "1.0.1",
|
|
859
|
+
code: "ctx.render(String(ctx.record?.username || ''));"
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
configureJsItem: {
|
|
863
|
+
target: {
|
|
864
|
+
uid: "js-item-uid"
|
|
865
|
+
},
|
|
866
|
+
changes: {
|
|
867
|
+
label: "JS item",
|
|
868
|
+
showLabel: true,
|
|
869
|
+
labelWidth: 120,
|
|
870
|
+
version: "1.0.1",
|
|
871
|
+
code: "ctx.render(String(ctx.record?.nickname || ''));"
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
configurePage: {
|
|
875
|
+
target: {
|
|
876
|
+
uid: "employees-page-uid"
|
|
877
|
+
},
|
|
878
|
+
changes: {
|
|
879
|
+
icon: "UserOutlined",
|
|
880
|
+
enableHeader: false
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
configureTableAdvanced: {
|
|
884
|
+
target: {
|
|
885
|
+
uid: "tree-table-block-uid"
|
|
886
|
+
},
|
|
887
|
+
changes: {
|
|
888
|
+
quickEdit: true,
|
|
889
|
+
treeTable: true,
|
|
890
|
+
defaultExpandAllRows: true,
|
|
891
|
+
dragSort: true,
|
|
892
|
+
dragSortBy: "sort"
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
configureEditForm: {
|
|
896
|
+
target: {
|
|
897
|
+
uid: "edit-form-block-uid"
|
|
898
|
+
},
|
|
899
|
+
changes: {
|
|
900
|
+
colon: false,
|
|
901
|
+
dataScope: {
|
|
902
|
+
logic: "$and",
|
|
903
|
+
items: [
|
|
904
|
+
{
|
|
905
|
+
path: "status",
|
|
906
|
+
operator: "$eq",
|
|
907
|
+
value: "draft"
|
|
908
|
+
}
|
|
909
|
+
]
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
},
|
|
913
|
+
configureDetailsCompatibility: {
|
|
914
|
+
target: {
|
|
915
|
+
uid: "details-block-uid"
|
|
916
|
+
},
|
|
917
|
+
changes: {
|
|
918
|
+
colon: true,
|
|
919
|
+
linkageRules: [
|
|
920
|
+
{
|
|
921
|
+
when: {
|
|
922
|
+
path: "status",
|
|
923
|
+
operator: "$eq",
|
|
924
|
+
value: "archived"
|
|
925
|
+
},
|
|
926
|
+
set: {
|
|
927
|
+
hidden: true
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
]
|
|
931
|
+
}
|
|
932
|
+
},
|
|
933
|
+
composePopupCurrentRecord: {
|
|
934
|
+
target: {
|
|
935
|
+
uid: "view-action-uid"
|
|
936
|
+
},
|
|
937
|
+
mode: "replace",
|
|
938
|
+
blocks: [
|
|
939
|
+
{
|
|
940
|
+
key: "details",
|
|
941
|
+
type: "details",
|
|
942
|
+
resource: {
|
|
943
|
+
binding: "currentRecord"
|
|
944
|
+
},
|
|
945
|
+
fields: ["nickname", "department.title"]
|
|
946
|
+
}
|
|
947
|
+
]
|
|
948
|
+
},
|
|
949
|
+
composePopupAssociatedRecords: {
|
|
950
|
+
target: {
|
|
951
|
+
uid: "association-popup-action-uid"
|
|
952
|
+
},
|
|
953
|
+
mode: "replace",
|
|
954
|
+
blocks: [
|
|
955
|
+
{
|
|
956
|
+
key: "employees",
|
|
957
|
+
type: "table",
|
|
958
|
+
resource: {
|
|
959
|
+
binding: "associatedRecords",
|
|
960
|
+
associationField: "employee"
|
|
961
|
+
},
|
|
962
|
+
fields: ["nickname", "status"],
|
|
963
|
+
actions: ["refresh"],
|
|
964
|
+
recordActions: ["view", "edit"]
|
|
965
|
+
}
|
|
966
|
+
]
|
|
967
|
+
},
|
|
968
|
+
configureActionModesCompatibility: {
|
|
969
|
+
target: {
|
|
970
|
+
uid: "compose-email-action-uid"
|
|
971
|
+
},
|
|
972
|
+
changes: {
|
|
973
|
+
linkageRules: [
|
|
974
|
+
{
|
|
975
|
+
when: {
|
|
976
|
+
path: "status",
|
|
977
|
+
operator: "$eq",
|
|
978
|
+
value: "draft"
|
|
979
|
+
},
|
|
980
|
+
set: {
|
|
981
|
+
disabled: true
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
],
|
|
985
|
+
editMode: "drawer",
|
|
986
|
+
updateMode: "overwrite",
|
|
987
|
+
duplicateMode: "popup",
|
|
988
|
+
collapsedRows: 2,
|
|
989
|
+
defaultCollapsed: true,
|
|
990
|
+
emailFieldNames: ["email", "backupEmail"],
|
|
991
|
+
defaultSelectAllRecords: true
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
createPage: {
|
|
995
|
+
menuRouteId: 1002,
|
|
996
|
+
title: "Employees",
|
|
997
|
+
tabTitle: "Overview",
|
|
998
|
+
enableTabs: true,
|
|
999
|
+
displayTitle: true,
|
|
1000
|
+
documentTitle: "Employees workspace",
|
|
1001
|
+
tabDocumentTitle: "Employees overview"
|
|
1002
|
+
},
|
|
1003
|
+
addTab: {
|
|
1004
|
+
target: {
|
|
1005
|
+
uid: "employees-page-uid"
|
|
1006
|
+
},
|
|
1007
|
+
title: "Details",
|
|
1008
|
+
icon: "TableOutlined",
|
|
1009
|
+
documentTitle: "Employee details tab"
|
|
1010
|
+
},
|
|
1011
|
+
updateTab: {
|
|
1012
|
+
target: {
|
|
1013
|
+
uid: "details-tab-schema"
|
|
1014
|
+
},
|
|
1015
|
+
title: "Details",
|
|
1016
|
+
icon: "TableOutlined",
|
|
1017
|
+
documentTitle: "Employee details tab",
|
|
1018
|
+
flowRegistry: {
|
|
1019
|
+
beforeRenderApply: {
|
|
1020
|
+
key: "beforeRenderApply",
|
|
1021
|
+
on: "beforeRender",
|
|
1022
|
+
steps: {}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
addPopupTab: {
|
|
1027
|
+
target: {
|
|
1028
|
+
uid: "view-action-popup-page-uid"
|
|
1029
|
+
},
|
|
1030
|
+
title: "Popup details",
|
|
1031
|
+
icon: "TableOutlined",
|
|
1032
|
+
documentTitle: "Popup details tab"
|
|
1033
|
+
},
|
|
1034
|
+
updatePopupTab: {
|
|
1035
|
+
target: {
|
|
1036
|
+
uid: "popup-secondary-tab-uid"
|
|
1037
|
+
},
|
|
1038
|
+
title: "Popup details updated",
|
|
1039
|
+
icon: "AppstoreOutlined",
|
|
1040
|
+
documentTitle: "Popup details updated tab",
|
|
1041
|
+
flowRegistry: {
|
|
1042
|
+
beforeRenderApply: {
|
|
1043
|
+
key: "beforeRenderApply",
|
|
1044
|
+
on: "beforeRender",
|
|
1045
|
+
steps: {}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
movePopupTab: {
|
|
1050
|
+
sourceUid: "popup-secondary-tab-uid",
|
|
1051
|
+
targetUid: "popup-primary-tab-uid",
|
|
1052
|
+
position: "before"
|
|
1053
|
+
},
|
|
1054
|
+
removePopupTab: {
|
|
1055
|
+
target: {
|
|
1056
|
+
uid: "popup-secondary-tab-uid"
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
addBlock: {
|
|
1060
|
+
target: {
|
|
1061
|
+
uid: "view-action-uid"
|
|
1062
|
+
},
|
|
1063
|
+
type: "details",
|
|
1064
|
+
resource: {
|
|
1065
|
+
binding: "currentRecord"
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
addTableBlockWithDefaultFilters: {
|
|
1069
|
+
target: {
|
|
1070
|
+
uid: "page-grid-uid"
|
|
1071
|
+
},
|
|
1072
|
+
type: "table",
|
|
1073
|
+
defaultFilter: makePublicBlockDefaultFilter([
|
|
1074
|
+
{
|
|
1075
|
+
path: "username",
|
|
1076
|
+
operator: "$includes",
|
|
1077
|
+
value: "staff"
|
|
1078
|
+
}
|
|
1079
|
+
]),
|
|
1080
|
+
resourceInit: {
|
|
1081
|
+
dataSourceKey: "main",
|
|
1082
|
+
collectionName: "users"
|
|
1083
|
+
},
|
|
1084
|
+
defaultActionSettings: {
|
|
1085
|
+
filter: {
|
|
1086
|
+
filterableFieldNames: ["username", "email", "status"],
|
|
1087
|
+
defaultFilter: {
|
|
1088
|
+
logic: "$and",
|
|
1089
|
+
items: [
|
|
1090
|
+
{
|
|
1091
|
+
path: "username",
|
|
1092
|
+
operator: "$includes",
|
|
1093
|
+
value: ""
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
path: "email",
|
|
1097
|
+
operator: "$includes",
|
|
1098
|
+
value: ""
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
path: "status",
|
|
1102
|
+
operator: "$eq",
|
|
1103
|
+
value: ""
|
|
1104
|
+
}
|
|
1105
|
+
]
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
addPopupAssociatedBlock: {
|
|
1111
|
+
target: {
|
|
1112
|
+
uid: "association-popup-action-uid"
|
|
1113
|
+
},
|
|
1114
|
+
type: "table",
|
|
1115
|
+
resource: {
|
|
1116
|
+
binding: "associatedRecords",
|
|
1117
|
+
associationField: "employee"
|
|
1118
|
+
}
|
|
1119
|
+
},
|
|
1120
|
+
addPopupOtherRecordsBlock: {
|
|
1121
|
+
target: {
|
|
1122
|
+
uid: "popup-action-uid"
|
|
1123
|
+
},
|
|
1124
|
+
type: "table",
|
|
1125
|
+
resource: {
|
|
1126
|
+
binding: "otherRecords",
|
|
1127
|
+
dataSourceKey: "main",
|
|
1128
|
+
collectionName: "departments"
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1131
|
+
addJsBlock: {
|
|
1132
|
+
target: {
|
|
1133
|
+
uid: "page-grid-uid"
|
|
1134
|
+
},
|
|
1135
|
+
type: "jsBlock",
|
|
1136
|
+
settings: {
|
|
1137
|
+
title: "Users banner",
|
|
1138
|
+
description: "Custom JS rendered banner",
|
|
1139
|
+
version: "1.0.0",
|
|
1140
|
+
code: "ctx.render('<div>Users banner</div>');"
|
|
1141
|
+
}
|
|
1142
|
+
},
|
|
1143
|
+
addField: {
|
|
1144
|
+
target: {
|
|
1145
|
+
uid: "create-form-block-uid"
|
|
1146
|
+
},
|
|
1147
|
+
fieldPath: "nickname",
|
|
1148
|
+
renderer: "js",
|
|
1149
|
+
settings: {
|
|
1150
|
+
label: "Nickname (JS)",
|
|
1151
|
+
code: "ctx.render(String(ctx.value?.toUpperCase?.() || ctx.value || ''));",
|
|
1152
|
+
version: "1.0.0"
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
addAssociationField: {
|
|
1156
|
+
target: {
|
|
1157
|
+
uid: "table-block-uid"
|
|
1158
|
+
},
|
|
1159
|
+
fieldPath: "title",
|
|
1160
|
+
associationPathName: "department",
|
|
1161
|
+
settings: {
|
|
1162
|
+
title: "Department title",
|
|
1163
|
+
width: 240
|
|
1164
|
+
},
|
|
1165
|
+
popup: {
|
|
1166
|
+
mode: "replace",
|
|
1167
|
+
blocks: [
|
|
1168
|
+
{
|
|
1169
|
+
key: "departmentDetails",
|
|
1170
|
+
type: "details",
|
|
1171
|
+
resource: {
|
|
1172
|
+
binding: "currentRecord"
|
|
1173
|
+
},
|
|
1174
|
+
fields: ["title", "manager.nickname"]
|
|
1175
|
+
}
|
|
1176
|
+
]
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
addJsColumn: {
|
|
1180
|
+
target: {
|
|
1181
|
+
uid: "table-block-uid"
|
|
1182
|
+
},
|
|
1183
|
+
type: "jsColumn",
|
|
1184
|
+
settings: {
|
|
1185
|
+
title: "Runtime column",
|
|
1186
|
+
width: 240,
|
|
1187
|
+
version: "1.0.0",
|
|
1188
|
+
code: "ctx.render(String(ctx.record?.nickname || ''));"
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
addJsItem: {
|
|
1192
|
+
target: {
|
|
1193
|
+
uid: "create-form-grid-uid"
|
|
1194
|
+
},
|
|
1195
|
+
type: "jsItem",
|
|
1196
|
+
settings: {
|
|
1197
|
+
label: "Runtime item",
|
|
1198
|
+
showLabel: true,
|
|
1199
|
+
version: "1.0.0",
|
|
1200
|
+
code: "ctx.render(String(ctx.record?.nickname || ''));"
|
|
1201
|
+
}
|
|
1202
|
+
},
|
|
1203
|
+
addFieldPopupTemplate: {
|
|
1204
|
+
target: {
|
|
1205
|
+
uid: "details-block-uid"
|
|
1206
|
+
},
|
|
1207
|
+
fieldPath: "nickname",
|
|
1208
|
+
popup: {
|
|
1209
|
+
template: {
|
|
1210
|
+
uid: "employee-popup-template",
|
|
1211
|
+
mode: "reference"
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
},
|
|
1215
|
+
addFieldAutoPopupTemplate: {
|
|
1216
|
+
target: {
|
|
1217
|
+
uid: "details-block-uid"
|
|
1218
|
+
},
|
|
1219
|
+
fieldPath: "department.title",
|
|
1220
|
+
popup: {
|
|
1221
|
+
tryTemplate: true
|
|
1222
|
+
}
|
|
1223
|
+
},
|
|
1224
|
+
addFieldDefaultEditPopup: {
|
|
1225
|
+
target: {
|
|
1226
|
+
uid: "details-block-uid"
|
|
1227
|
+
},
|
|
1228
|
+
fieldPath: "department.title",
|
|
1229
|
+
popup: {
|
|
1230
|
+
defaultType: "edit"
|
|
1231
|
+
}
|
|
1232
|
+
},
|
|
1233
|
+
addFieldSavePopupTemplate: {
|
|
1234
|
+
target: {
|
|
1235
|
+
uid: "details-block-uid"
|
|
1236
|
+
},
|
|
1237
|
+
fieldPath: "nickname",
|
|
1238
|
+
popup: {
|
|
1239
|
+
blocks: [
|
|
1240
|
+
{
|
|
1241
|
+
key: "employee-popup-details",
|
|
1242
|
+
type: "details",
|
|
1243
|
+
resource: {
|
|
1244
|
+
binding: "currentRecord"
|
|
1245
|
+
},
|
|
1246
|
+
fields: ["nickname"]
|
|
1247
|
+
}
|
|
1248
|
+
],
|
|
1249
|
+
saveAsTemplate: {
|
|
1250
|
+
name: "employee-popup-template",
|
|
1251
|
+
description: "Save this explicit field popup as a reusable popup template."
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
addAction: {
|
|
1256
|
+
target: {
|
|
1257
|
+
uid: "filter-form-block-uid"
|
|
1258
|
+
},
|
|
1259
|
+
type: "submit",
|
|
1260
|
+
settings: {
|
|
1261
|
+
title: "Apply filters",
|
|
1262
|
+
confirm: false
|
|
1263
|
+
}
|
|
1264
|
+
},
|
|
1265
|
+
addLinkAction: {
|
|
1266
|
+
target: {
|
|
1267
|
+
uid: "table-block-uid"
|
|
1268
|
+
},
|
|
1269
|
+
type: "link",
|
|
1270
|
+
settings: {
|
|
1271
|
+
title: "Open docs"
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
addAutoPopupAction: {
|
|
1275
|
+
target: {
|
|
1276
|
+
uid: "table-block-uid"
|
|
1277
|
+
},
|
|
1278
|
+
type: "popup",
|
|
1279
|
+
popup: {
|
|
1280
|
+
tryTemplate: true
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
addSavePopupAction: {
|
|
1284
|
+
target: {
|
|
1285
|
+
uid: "table-block-uid"
|
|
1286
|
+
},
|
|
1287
|
+
type: "popup",
|
|
1288
|
+
popup: {
|
|
1289
|
+
blocks: [
|
|
1290
|
+
{
|
|
1291
|
+
key: "employee-popup-table",
|
|
1292
|
+
type: "table",
|
|
1293
|
+
resource: {
|
|
1294
|
+
binding: "currentCollection"
|
|
1295
|
+
},
|
|
1296
|
+
fields: ["username", "nickname"]
|
|
1297
|
+
}
|
|
1298
|
+
],
|
|
1299
|
+
saveAsTemplate: {
|
|
1300
|
+
name: "employee-popup-template",
|
|
1301
|
+
description: "Save this explicit action popup as a reusable popup template."
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
addJsAction: {
|
|
1306
|
+
target: {
|
|
1307
|
+
uid: "action-panel-uid"
|
|
1308
|
+
},
|
|
1309
|
+
type: "js",
|
|
1310
|
+
settings: {
|
|
1311
|
+
title: "Run JS",
|
|
1312
|
+
type: "primary",
|
|
1313
|
+
version: "1.0.0",
|
|
1314
|
+
code: `await ctx.runjs('console.log("hello")');`
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
addJsItemAction: {
|
|
1318
|
+
target: {
|
|
1319
|
+
uid: "create-form-uid"
|
|
1320
|
+
},
|
|
1321
|
+
type: "jsItem",
|
|
1322
|
+
settings: {
|
|
1323
|
+
title: "Run item JS",
|
|
1324
|
+
type: "default",
|
|
1325
|
+
version: "1.0.0",
|
|
1326
|
+
code: `await ctx.runjs('console.log("item")');`
|
|
1327
|
+
}
|
|
1328
|
+
},
|
|
1329
|
+
addRecordAction: {
|
|
1330
|
+
target: {
|
|
1331
|
+
uid: "table-block-uid"
|
|
1332
|
+
},
|
|
1333
|
+
type: "view",
|
|
1334
|
+
settings: {
|
|
1335
|
+
title: "View user",
|
|
1336
|
+
openView: {
|
|
1337
|
+
dataSourceKey: "main",
|
|
1338
|
+
collectionName: "users",
|
|
1339
|
+
mode: "drawer"
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
popup: {
|
|
1343
|
+
mode: "replace",
|
|
1344
|
+
blocks: [
|
|
1345
|
+
{
|
|
1346
|
+
key: "details",
|
|
1347
|
+
type: "details",
|
|
1348
|
+
resource: {
|
|
1349
|
+
dataSourceKey: "main",
|
|
1350
|
+
collectionName: "users"
|
|
1351
|
+
},
|
|
1352
|
+
fields: ["username", "nickname"]
|
|
1353
|
+
}
|
|
1354
|
+
]
|
|
1355
|
+
}
|
|
1356
|
+
},
|
|
1357
|
+
addRecordAutoPopupTemplate: {
|
|
1358
|
+
target: {
|
|
1359
|
+
uid: "table-block-uid"
|
|
1360
|
+
},
|
|
1361
|
+
type: "view",
|
|
1362
|
+
popup: {
|
|
1363
|
+
tryTemplate: true
|
|
1364
|
+
}
|
|
1365
|
+
},
|
|
1366
|
+
addRecordSavePopupTemplate: {
|
|
1367
|
+
target: {
|
|
1368
|
+
uid: "table-block-uid"
|
|
1369
|
+
},
|
|
1370
|
+
type: "view",
|
|
1371
|
+
popup: {
|
|
1372
|
+
blocks: [
|
|
1373
|
+
{
|
|
1374
|
+
key: "employee-record-popup-details",
|
|
1375
|
+
type: "details",
|
|
1376
|
+
resource: {
|
|
1377
|
+
binding: "currentRecord"
|
|
1378
|
+
},
|
|
1379
|
+
fields: ["username", "nickname"]
|
|
1380
|
+
}
|
|
1381
|
+
],
|
|
1382
|
+
saveAsTemplate: {
|
|
1383
|
+
name: "employee-popup-template",
|
|
1384
|
+
description: "Save this explicit record-action popup as a reusable popup template."
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
},
|
|
1388
|
+
addRecordAddChildAction: {
|
|
1389
|
+
target: {
|
|
1390
|
+
uid: "tree-table-block-uid"
|
|
1391
|
+
},
|
|
1392
|
+
type: "addChild",
|
|
1393
|
+
settings: {
|
|
1394
|
+
title: "Add child category",
|
|
1395
|
+
openView: {
|
|
1396
|
+
dataSourceKey: "main",
|
|
1397
|
+
collectionName: "categories",
|
|
1398
|
+
mode: "drawer"
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
addRecordJsAction: {
|
|
1403
|
+
target: {
|
|
1404
|
+
uid: "details-block-uid"
|
|
1405
|
+
},
|
|
1406
|
+
type: "js",
|
|
1407
|
+
settings: {
|
|
1408
|
+
title: "Inspect record",
|
|
1409
|
+
type: "default",
|
|
1410
|
+
version: "1.0.0",
|
|
1411
|
+
code: "return currentRecord?.id;"
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
addBlocks: {
|
|
1415
|
+
target: {
|
|
1416
|
+
uid: "page-grid-uid"
|
|
1417
|
+
},
|
|
1418
|
+
blocks: [
|
|
1419
|
+
{
|
|
1420
|
+
key: "usersTable",
|
|
1421
|
+
type: "table",
|
|
1422
|
+
defaultFilter: makePublicBlockDefaultFilter([
|
|
1423
|
+
{
|
|
1424
|
+
path: "username",
|
|
1425
|
+
operator: "$includes",
|
|
1426
|
+
value: "staff"
|
|
1427
|
+
}
|
|
1428
|
+
]),
|
|
1429
|
+
resourceInit: {
|
|
1430
|
+
dataSourceKey: "main",
|
|
1431
|
+
collectionName: "users"
|
|
1432
|
+
},
|
|
1433
|
+
settings: {
|
|
1434
|
+
title: "Users table",
|
|
1435
|
+
pageSize: 50
|
|
1436
|
+
},
|
|
1437
|
+
defaultActionSettings: {
|
|
1438
|
+
filter: {
|
|
1439
|
+
filterableFieldNames: ["username", "email", "status"],
|
|
1440
|
+
defaultFilter: {
|
|
1441
|
+
logic: "$and",
|
|
1442
|
+
items: [
|
|
1443
|
+
{
|
|
1444
|
+
path: "username",
|
|
1445
|
+
operator: "$includes",
|
|
1446
|
+
value: ""
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
path: "email",
|
|
1450
|
+
operator: "$includes",
|
|
1451
|
+
value: ""
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
path: "status",
|
|
1455
|
+
operator: "$eq",
|
|
1456
|
+
value: ""
|
|
1457
|
+
}
|
|
1458
|
+
]
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
{
|
|
1464
|
+
key: "teamNotes",
|
|
1465
|
+
type: "markdown",
|
|
1466
|
+
settings: {
|
|
1467
|
+
content: "# Team notes"
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
]
|
|
1471
|
+
},
|
|
1472
|
+
addFields: {
|
|
1473
|
+
target: {
|
|
1474
|
+
uid: "table-block-uid"
|
|
1475
|
+
},
|
|
1476
|
+
fields: [
|
|
1477
|
+
{
|
|
1478
|
+
key: "username",
|
|
1479
|
+
fieldPath: "username",
|
|
1480
|
+
settings: {
|
|
1481
|
+
title: "User name",
|
|
1482
|
+
width: 220
|
|
1483
|
+
},
|
|
1484
|
+
popup: {
|
|
1485
|
+
mode: "replace",
|
|
1486
|
+
blocks: [
|
|
1487
|
+
{
|
|
1488
|
+
key: "details",
|
|
1489
|
+
type: "details",
|
|
1490
|
+
resource: {
|
|
1491
|
+
binding: "currentRecord"
|
|
1492
|
+
},
|
|
1493
|
+
fields: ["username", "nickname"]
|
|
1494
|
+
}
|
|
1495
|
+
]
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
key: "nickname",
|
|
1500
|
+
fieldPath: "nickname",
|
|
1501
|
+
renderer: "js",
|
|
1502
|
+
settings: {
|
|
1503
|
+
label: "Nickname (JS)",
|
|
1504
|
+
code: "return value;",
|
|
1505
|
+
version: "1.0.0"
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
]
|
|
1509
|
+
},
|
|
1510
|
+
addActions: {
|
|
1511
|
+
target: {
|
|
1512
|
+
uid: "filter-form-block-uid"
|
|
1513
|
+
},
|
|
1514
|
+
actions: [
|
|
1515
|
+
{
|
|
1516
|
+
key: "submit",
|
|
1517
|
+
type: "submit",
|
|
1518
|
+
settings: {
|
|
1519
|
+
title: "Search",
|
|
1520
|
+
confirm: false
|
|
1521
|
+
}
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
key: "reset",
|
|
1525
|
+
type: "reset",
|
|
1526
|
+
settings: {
|
|
1527
|
+
title: "Reset filters"
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
]
|
|
1531
|
+
},
|
|
1532
|
+
addRecordActions: {
|
|
1533
|
+
target: {
|
|
1534
|
+
uid: "table-block-uid"
|
|
1535
|
+
},
|
|
1536
|
+
recordActions: [
|
|
1537
|
+
{
|
|
1538
|
+
key: "view",
|
|
1539
|
+
type: "view",
|
|
1540
|
+
settings: {
|
|
1541
|
+
title: "View user",
|
|
1542
|
+
openView: {
|
|
1543
|
+
dataSourceKey: "main",
|
|
1544
|
+
collectionName: "users",
|
|
1545
|
+
mode: "drawer"
|
|
1546
|
+
}
|
|
1547
|
+
},
|
|
1548
|
+
popup: {
|
|
1549
|
+
mode: "replace",
|
|
1550
|
+
blocks: [
|
|
1551
|
+
{
|
|
1552
|
+
key: "details",
|
|
1553
|
+
type: "details",
|
|
1554
|
+
resource: {
|
|
1555
|
+
dataSourceKey: "main",
|
|
1556
|
+
collectionName: "users"
|
|
1557
|
+
},
|
|
1558
|
+
fields: ["username"]
|
|
1559
|
+
}
|
|
1560
|
+
]
|
|
1561
|
+
}
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
key: "edit",
|
|
1565
|
+
type: "edit",
|
|
1566
|
+
settings: {
|
|
1567
|
+
title: "Edit user"
|
|
1568
|
+
}
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
key: "delete",
|
|
1572
|
+
type: "delete",
|
|
1573
|
+
settings: {
|
|
1574
|
+
title: "Delete user"
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
]
|
|
1578
|
+
},
|
|
1579
|
+
addRecordAddChildActions: {
|
|
1580
|
+
target: {
|
|
1581
|
+
uid: "tree-table-block-uid"
|
|
1582
|
+
},
|
|
1583
|
+
recordActions: [
|
|
1584
|
+
{
|
|
1585
|
+
key: "addChild",
|
|
1586
|
+
type: "addChild",
|
|
1587
|
+
settings: {
|
|
1588
|
+
title: "Add child category",
|
|
1589
|
+
openView: {
|
|
1590
|
+
dataSourceKey: "main",
|
|
1591
|
+
collectionName: "categories",
|
|
1592
|
+
mode: "drawer"
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
]
|
|
1597
|
+
},
|
|
1598
|
+
updateSettings: {
|
|
1599
|
+
target: {
|
|
1600
|
+
uid: "table-block-uid"
|
|
1601
|
+
},
|
|
1602
|
+
stepParams: {
|
|
1603
|
+
tableSettings: {
|
|
1604
|
+
pageSize: {
|
|
1605
|
+
pageSize: 50
|
|
1606
|
+
},
|
|
1607
|
+
tableDensity: {
|
|
1608
|
+
size: "middle"
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
},
|
|
1612
|
+
flowRegistry: {
|
|
1613
|
+
beforeRenderApply: {
|
|
1614
|
+
key: "beforeRenderApply",
|
|
1615
|
+
on: "beforeRender",
|
|
1616
|
+
steps: {}
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
},
|
|
1620
|
+
setEventFlows: {
|
|
1621
|
+
target: {
|
|
1622
|
+
uid: "view-action-uid"
|
|
1623
|
+
},
|
|
1624
|
+
flowRegistry: {
|
|
1625
|
+
popupSettings: {
|
|
1626
|
+
key: "popupSettings",
|
|
1627
|
+
on: "click",
|
|
1628
|
+
steps: {
|
|
1629
|
+
openView: {
|
|
1630
|
+
params: {
|
|
1631
|
+
title: "Employee details",
|
|
1632
|
+
size: "large"
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1639
|
+
setLayout: {
|
|
1640
|
+
target: {
|
|
1641
|
+
uid: "page-grid-uid"
|
|
1642
|
+
},
|
|
1643
|
+
rows: {
|
|
1644
|
+
row1: [["block-a"], ["block-b"]]
|
|
1645
|
+
},
|
|
1646
|
+
sizes: {
|
|
1647
|
+
row1: [12, 12]
|
|
1648
|
+
},
|
|
1649
|
+
rowOrder: ["row1"]
|
|
1650
|
+
},
|
|
1651
|
+
moveNode: {
|
|
1652
|
+
sourceUid: "block-b",
|
|
1653
|
+
targetUid: "block-a",
|
|
1654
|
+
position: "before"
|
|
1655
|
+
},
|
|
1656
|
+
removeNode: {
|
|
1657
|
+
target: {
|
|
1658
|
+
uid: "obsolete-block-uid"
|
|
1659
|
+
}
|
|
1660
|
+
},
|
|
1661
|
+
mutate: {
|
|
1662
|
+
atomic: true,
|
|
1663
|
+
ops: [
|
|
1664
|
+
{
|
|
1665
|
+
opId: "menu",
|
|
1666
|
+
type: "createMenu",
|
|
1667
|
+
values: {
|
|
1668
|
+
title: "Employees",
|
|
1669
|
+
type: "item"
|
|
1670
|
+
}
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
opId: "page",
|
|
1674
|
+
type: "createPage",
|
|
1675
|
+
values: {
|
|
1676
|
+
menuRouteId: {
|
|
1677
|
+
step: "menu",
|
|
1678
|
+
path: "routeId"
|
|
1679
|
+
},
|
|
1680
|
+
tabTitle: "Overview"
|
|
1681
|
+
}
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
opId: "table",
|
|
1685
|
+
type: "addBlock",
|
|
1686
|
+
values: {
|
|
1687
|
+
target: {
|
|
1688
|
+
uid: {
|
|
1689
|
+
step: "page",
|
|
1690
|
+
path: "tabSchemaUid"
|
|
1691
|
+
}
|
|
1692
|
+
},
|
|
1693
|
+
type: "table",
|
|
1694
|
+
resourceInit: {
|
|
1695
|
+
dataSourceKey: "main",
|
|
1696
|
+
collectionName: "employees"
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
type: "addField",
|
|
1702
|
+
values: {
|
|
1703
|
+
target: {
|
|
1704
|
+
uid: {
|
|
1705
|
+
step: "table",
|
|
1706
|
+
path: "uid"
|
|
1707
|
+
}
|
|
1708
|
+
},
|
|
1709
|
+
fieldPath: "nickname"
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
]
|
|
1713
|
+
},
|
|
1714
|
+
apply: {
|
|
1715
|
+
target: {
|
|
1716
|
+
uid: "page-grid-uid"
|
|
1717
|
+
},
|
|
1718
|
+
mode: "replace",
|
|
1719
|
+
spec: {
|
|
1720
|
+
popup: {
|
|
1721
|
+
tryTemplate: true
|
|
1722
|
+
},
|
|
1723
|
+
subModels: {
|
|
1724
|
+
items: [
|
|
1725
|
+
{
|
|
1726
|
+
clientKey: "table-a",
|
|
1727
|
+
use: "TableBlockModel",
|
|
1728
|
+
stepParams: {
|
|
1729
|
+
resourceSettings: {
|
|
1730
|
+
init: {
|
|
1731
|
+
dataSourceKey: "main",
|
|
1732
|
+
collectionName: "employees"
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
clientKey: "markdown-a",
|
|
1739
|
+
use: "MarkdownBlockModel",
|
|
1740
|
+
props: {
|
|
1741
|
+
content: "Employee handbook"
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
]
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
},
|
|
1748
|
+
getPopupQuery: {
|
|
1749
|
+
uid: "view-action-uid"
|
|
1750
|
+
},
|
|
1751
|
+
getPageQuery: {
|
|
1752
|
+
pageSchemaUid: "employees-page-schema"
|
|
1753
|
+
}
|
|
1754
|
+
};
|
|
1755
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1756
|
+
0 && (module.exports = {
|
|
1757
|
+
flowSurfaceExamples
|
|
1758
|
+
});
|