@nocobase/plugin-field-formula 2.1.0-alpha.12 → 2.1.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/externalVersion.js
CHANGED
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"@formily/react": "2.3.7",
|
|
12
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
12
|
+
"@nocobase/client": "2.1.0-alpha.13",
|
|
13
13
|
"react-i18next": "11.18.6",
|
|
14
14
|
"@formily/reactive": "2.3.7",
|
|
15
|
-
"@nocobase/flow-engine": "2.1.0-alpha.
|
|
15
|
+
"@nocobase/flow-engine": "2.1.0-alpha.13",
|
|
16
16
|
"antd": "5.24.2",
|
|
17
|
-
"@nocobase/evaluators": "2.1.0-alpha.
|
|
18
|
-
"@nocobase/utils": "2.1.0-alpha.
|
|
17
|
+
"@nocobase/evaluators": "2.1.0-alpha.13",
|
|
18
|
+
"@nocobase/utils": "2.1.0-alpha.13",
|
|
19
19
|
"lodash": "4.17.21",
|
|
20
20
|
"react": "18.2.0",
|
|
21
|
-
"@nocobase/database": "2.1.0-alpha.
|
|
22
|
-
"@nocobase/server": "2.1.0-alpha.
|
|
23
|
-
"@nocobase/test": "2.1.0-alpha.
|
|
21
|
+
"@nocobase/database": "2.1.0-alpha.13",
|
|
22
|
+
"@nocobase/server": "2.1.0-alpha.13",
|
|
23
|
+
"@nocobase/test": "2.1.0-alpha.13",
|
|
24
24
|
"@formily/core": "2.3.7"
|
|
25
25
|
};
|
package/dist/server/plugin.d.ts
CHANGED
|
@@ -6,11 +6,9 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import type { FlowSchemaContribution } from '@nocobase/flow-engine';
|
|
10
9
|
import { InstallOptions, Plugin } from '@nocobase/server';
|
|
11
10
|
export declare class PluginFieldFormulaServer extends Plugin {
|
|
12
11
|
afterAdd(): void;
|
|
13
|
-
getFlowSchemaContributions(): FlowSchemaContribution;
|
|
14
12
|
beforeLoad(): void;
|
|
15
13
|
load(): Promise<void>;
|
|
16
14
|
install(options?: InstallOptions): Promise<void>;
|
package/dist/server/plugin.js
CHANGED
|
@@ -33,13 +33,9 @@ module.exports = __toCommonJS(plugin_exports);
|
|
|
33
33
|
var import_server = require("@nocobase/server");
|
|
34
34
|
var import_path = require("path");
|
|
35
35
|
var import_formula_field = require("./formula-field");
|
|
36
|
-
var import_flow_schema_contributions = require("./flow-schema-contributions");
|
|
37
36
|
class PluginFieldFormulaServer extends import_server.Plugin {
|
|
38
37
|
afterAdd() {
|
|
39
38
|
}
|
|
40
|
-
getFlowSchemaContributions() {
|
|
41
|
-
return import_flow_schema_contributions.flowSchemaContribution;
|
|
42
|
-
}
|
|
43
39
|
beforeLoad() {
|
|
44
40
|
this.db.registerFieldTypes({
|
|
45
41
|
formula: import_formula_field.FormulaField
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Configure and store the results of calculations between multiple field values in the same record, supporting both Math.js and Excel formula functions.",
|
|
7
7
|
"description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎",
|
|
8
8
|
"description.ru-RU": "Настройка и сохранение результатов вычислений между значениями нескольких полей в одной записи с поддержкой движков Math.js и Excel formula functions.",
|
|
9
|
-
"version": "2.1.0-alpha.
|
|
9
|
+
"version": "2.1.0-alpha.13",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/field-formula",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@nocobase/test": "2.x",
|
|
29
29
|
"@nocobase/utils": "2.x"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "2807a8948412d9c235115a31a81a66f7c82dd173",
|
|
32
32
|
"keywords": [
|
|
33
33
|
"Collection fields"
|
|
34
34
|
]
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import type { FlowSchemaContribution } from '@nocobase/flow-engine';
|
|
10
|
-
export declare const flowSchemaContribution: FlowSchemaContribution;
|
|
@@ -1,152 +0,0 @@
|
|
|
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_schema_contributions_exports = {};
|
|
28
|
-
__export(flow_schema_contributions_exports, {
|
|
29
|
-
flowSchemaContribution: () => flowSchemaContribution
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(flow_schema_contributions_exports);
|
|
32
|
-
function createFieldContribution(use, title) {
|
|
33
|
-
return {
|
|
34
|
-
use,
|
|
35
|
-
title,
|
|
36
|
-
source: "plugin",
|
|
37
|
-
strict: false,
|
|
38
|
-
exposure: "internal",
|
|
39
|
-
stepParamsSchema: {
|
|
40
|
-
type: "object",
|
|
41
|
-
properties: {
|
|
42
|
-
fieldSettings: {
|
|
43
|
-
type: "object",
|
|
44
|
-
properties: {
|
|
45
|
-
init: {
|
|
46
|
-
type: "object",
|
|
47
|
-
properties: {
|
|
48
|
-
dataSourceKey: { type: "string" },
|
|
49
|
-
collectionName: { type: "string" },
|
|
50
|
-
fieldPath: { type: "string" },
|
|
51
|
-
associationPathName: { type: "string" }
|
|
52
|
-
},
|
|
53
|
-
additionalProperties: true
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
additionalProperties: true
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
additionalProperties: true
|
|
60
|
-
},
|
|
61
|
-
skeleton: {
|
|
62
|
-
uid: `todo-${use}`.replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase(),
|
|
63
|
-
use
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
const flowSchemaContribution = {
|
|
68
|
-
models: [createFieldContribution("FormulaFieldModel", "Formula")],
|
|
69
|
-
fieldBindings: [
|
|
70
|
-
{
|
|
71
|
-
context: "editable-field",
|
|
72
|
-
use: "FormulaFieldModel",
|
|
73
|
-
interfaces: ["formula"],
|
|
74
|
-
isDefault: true
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
context: "display-field",
|
|
78
|
-
use: "DisplayCheckboxFieldModel",
|
|
79
|
-
interfaces: ["formula"],
|
|
80
|
-
isDefault: true,
|
|
81
|
-
conditions: {
|
|
82
|
-
fieldTypes: ["boolean"]
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
context: "display-field",
|
|
87
|
-
use: "DisplayDateTimeFieldModel",
|
|
88
|
-
interfaces: ["formula"],
|
|
89
|
-
isDefault: true,
|
|
90
|
-
conditions: {
|
|
91
|
-
fieldTypes: ["date"]
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
context: "display-field",
|
|
96
|
-
use: "DisplayTextFieldModel",
|
|
97
|
-
interfaces: ["formula"],
|
|
98
|
-
isDefault: true,
|
|
99
|
-
conditions: {
|
|
100
|
-
fieldTypes: ["string"]
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
context: "display-field",
|
|
105
|
-
use: "DisplayNumberFieldModel",
|
|
106
|
-
interfaces: ["formula"],
|
|
107
|
-
isDefault: true,
|
|
108
|
-
conditions: {
|
|
109
|
-
fieldTypes: ["double", "bigInt", "integer"]
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
context: "filter-field",
|
|
114
|
-
use: "InputFieldModel",
|
|
115
|
-
interfaces: ["formula"],
|
|
116
|
-
conditions: {
|
|
117
|
-
fieldTypes: ["string", "text", "url", "uuid", "email", "phone", "nanoid"]
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
context: "filter-field",
|
|
122
|
-
use: "DateTimeFilterFieldModel",
|
|
123
|
-
interfaces: ["formula"],
|
|
124
|
-
conditions: {
|
|
125
|
-
fieldTypes: ["date"]
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
context: "filter-field",
|
|
130
|
-
use: "CheckboxFieldModel",
|
|
131
|
-
interfaces: ["formula"],
|
|
132
|
-
conditions: {
|
|
133
|
-
fieldTypes: ["boolean"]
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
context: "filter-field",
|
|
138
|
-
use: "NumberFieldModel",
|
|
139
|
-
interfaces: ["formula"],
|
|
140
|
-
conditions: {
|
|
141
|
-
fieldTypes: ["integer", "bigInt", "double", "decimal", "number"]
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
],
|
|
145
|
-
defaults: {
|
|
146
|
-
source: "plugin"
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
150
|
-
0 && (module.exports = {
|
|
151
|
-
flowSchemaContribution
|
|
152
|
-
});
|