@nocobase/plugin-field-formula 1.0.0-alpha.2 → 1.0.0-alpha.3
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/client/FormulaComponentFieldSettings.d.ts +8 -0
- package/dist/client/components/Formula/Expression.d.ts +8 -0
- package/dist/client/components/Formula/Result.d.ts +8 -0
- package/dist/client/components/Formula/index.d.ts +8 -0
- package/dist/client/components/index.d.ts +8 -0
- package/dist/client/index.d.ts +8 -0
- package/dist/client/index.js +9 -0
- package/dist/client/interfaces/formula.d.ts +8 -0
- package/dist/client/locale/index.d.ts +8 -0
- package/dist/client/scopes.d.ts +8 -0
- package/dist/externalVersion.js +15 -6
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/server/formula-field.d.ts +8 -0
- package/dist/server/formula-field.js +9 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.js +9 -0
- package/dist/server/migrations/20230213161904-alter-field.d.ts +8 -0
- package/dist/server/migrations/20230213161904-alter-field.js +9 -0
- package/dist/server/migrations/20240425222058-change-locale-module.d.ts +8 -0
- package/dist/server/migrations/20240425222058-change-locale-module.js +9 -0
- package/dist/server/plugin.d.ts +8 -0
- package/dist/server/plugin.js +9 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +9 -0
- package/package.json +2 -2
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
1
9
|
import { SchemaSettings } from '@nocobase/client';
|
|
2
10
|
export declare const FormulaComponentFieldSettings: SchemaSettings<{}>;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const Expression: (props: any) => React.JSX.Element;
|
|
3
11
|
export default Expression;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare function useTargetCollectionField(schema?: any): any;
|
|
3
11
|
export declare function Result(props: any): React.JSX.Element;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
/// <reference types="react" />
|
|
2
10
|
export declare const Formula: {
|
|
3
11
|
(): any;
|
|
@@ -1 +1,9 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export { Formula } from './Formula';
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Plugin } from '@nocobase/client';
|
|
2
10
|
export declare class PluginFieldFormulaClient extends Plugin {
|
|
3
11
|
load(): Promise<void>;
|
package/dist/client/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
(function(n,r){typeof exports=="object"&&typeof module!="undefined"?r(exports,require("@nocobase/client"),require("@formily/react"),require("react/jsx-runtime"),require("@formily/core"),require("@formily/reactive"),require("@nocobase/evaluators/client"),require("@nocobase/utils/client"),require("react"),require("react-i18next")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","@formily/react","react/jsx-runtime","@formily/core","@formily/reactive","@nocobase/evaluators/client","@nocobase/utils/client","react","react-i18next"],r):(n=typeof globalThis!="undefined"?globalThis:n||self,r(n["@nocobase/plugin-field-formula"]={},n["@nocobase/client"],n["@formily/react"],n.jsxRuntime,n["@formily/core"],n["@formily/reactive"],n["@nocobase/evaluators"],n["@nocobase/utils"],n.react))})(this,function(n,r,o,s,I,E,x,b,c){"use strict";var ce=Object.defineProperty,me=Object.defineProperties;var de=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var R=(n,r,o)=>r in n?ce(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o,y=(n,r)=>{for(var o in r||(r={}))J.call(r,o)&&R(n,o,r[o]);if(D)for(var o of D(r))U.call(r,o)&&R(n,o,r[o]);return n},v=(n,r)=>me(n,de(r));var z=(n,r)=>{var o={};for(var s in n)J.call(n,s)&&r.indexOf(s)<0&&(o[s]=n[s]);if(n!=null&&D)for(var s of D(n))r.indexOf(s)<0&&U.call(n,s)&&(o[s]=n[s]);return o};var l=(n,r,o)=>(R(n,typeof r!="symbol"?r+"":r,o),o);var H=(n,r,o)=>new Promise((s,I)=>{var E=c=>{try{b(o.next(c))}catch(C){I(C)}},x=c=>{try{b(o.throw(c))}catch(C){I(C)}},b=c=>c.done?s(c.value):Promise.resolve(c.value).then(E,x);b((o=o.apply(n,r)).next())});const C=e=>{var S;const{value:t="",supports:i=[],useCurrentFields:a,onChange:u}=e,h=r.useCompile(),{interfaces:d}=r.useCollectionManager_deprecated(),f=((S=a==null?void 0:a())!=null?S:[]).filter(m=>i.includes(m.interface)).map(m=>{var q,F;return{label:h(m.uiSchema.title),value:m.name,children:(F=(q=d[m.interface]).usePathOptions)==null?void 0:F.call(q,m)}});return s.jsx(r.Variable.TextArea,{value:t,onChange:u,scope:f})},K={boolean:Boolean,integer:{boolean(e){return Number(e)},number(e){return e>=0?Math.floor(e):Math.ceil(e)},bigint(e){return Number(e)},string(e){const t=Number.parseInt(e,10);return Number.isNaN(t)||!Number.isFinite(t)?null:t},date(e){const t=e.valueOf();return Number.isNaN(t)?null:t}},bigInt:{boolean(e){return Number(e)},number(e){return Math.floor(e>=0?Math.floor(e):Math.ceil(e))},bigint(e){return Number(e)},string(e){const t=Number.parseInt(e,10);return Number.isNaN(t)||!Number.isFinite(t)?null:t},date(e){const t=e.valueOf();return Number.isNaN(t)?null:t}},double:{boolean(e){return Number(e)},number(e){return e},bigint(e){return Number(e)},string(e){const t=Number.parseFloat(e);return Number.isNaN(t)||!Number.isFinite(t)?null:t},date(e){const t=e.valueOf();return Number.isNaN(t)?null:t}},decimal:{boolean(e){return Number(e)},number(e){return e},bigint(e){return e},date(e){const t=e.valueOf();return Number.isNaN(t)?null:t}},string:{boolean(e){return e.toString()},number(e){return e.toString()},bigint(e){return e.toString()},string(e){return e},date(e){return e.toISOString()}},date:{boolean(e){return null},number(e){const t=new Date(e);return Number.isNaN(t.valueOf())?null:t},bigint(e){const t=new Date(Number(e));return Number.isNaN(t.valueOf())?null:t},string(e){const t=Date.parse(e);return Number.isNaN(t)?null:new Date(t)},date(e){return new Date(e)}}};function L(e,t){if(e==null)return null;let i=typeof e;i=="object"&&e instanceof Date&&(i="date");const a=K[t];if(!a)return null;if(typeof a=="function")return a(e);const u=a[i];return u?u(e):null}const Q={boolean:r.Checkbox.ReadPretty,integer:r.InputNumber.ReadPretty,bigInt:r.InputNumber.ReadPretty,double:r.InputNumber.ReadPretty,decimal:r.InputNumber.ReadPretty,date:r.DatePicker.ReadPretty,string:r.Input.ReadPretty};function j(e){const t=o.useFieldSchema(),i=e||t,a=r.useCollection_deprecated(),{getCollection:u,getCollectionField:h}=r.useCollectionManager_deprecated(),d=i.name.split(".");let p=a;for(let f=0;f<d.length-1;f++){const S=p.getField(d[f]);p=u(S.target)}return h(`${p.name}.${d[d.length-1]}`)}function W(e,t,i){const a=e[t];return Array.isArray(a)?a[i]:a&&typeof a=="object"?a:e}function X(e){var k,_,B;const V=e,{value:t}=V,i=z(V,["value"]),a=o.useFieldSchema(),{dataType:u,expression:h,engine:d="math.js"}=(k=j())!=null?k:{},[p,f]=c.useState(t),{evaluate:S}=x.evaluators.get(d),m=r.useFormBlockContext(),F=o.useField().path.entire,A=F==null?void 0:F.replace(`.${a.name}`,""),ae=A.split(".")[0],se=parseInt((_=A.split("."))==null?void 0:_[1]),P=c.useContext(r.ActionContext);c.useEffect(()=>{f(t)},[t]),o.useFormEffects(()=>{I.onFormValuesChange(ue=>{var G,$;if(a.name.indexOf(".")>=0||!(m!=null&&m.form)||(G=m.form)!=null&&G.readPretty)return;const le=E.toJS(W(ue.values,ae,se));let g;try{g=S(h,le),g=L(g,u)}catch(pe){g=null}g==null&&p==null&&f(g),f(g),e.onChange(g),($=P==null?void 0:P.setFormValueChanged)==null||$.call(P,!1)})});const ie=(B=Q[u])!=null?B:r.Input;return s.jsx(ie,v(y({},i),{value:u==="double"?b.toFixedByStep(p,e.step):p}))}const M=()=>null;M.Expression=C,M.Result=o.connect(X);const N="field-formula";function Y(e){const t=x.evaluators.get(e);return t!=null&&t.link?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:r.css`
|
|
2
11
|
&:after {
|
|
3
12
|
content: ':';
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { CollectionFieldInterface } from '@nocobase/client';
|
|
2
10
|
export declare class FormulaFieldInterface extends CollectionFieldInterface {
|
|
3
11
|
name: string;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export declare const NAMESPACE = "field-formula";
|
|
2
10
|
export declare function lang(key: string, options?: {}): string;
|
|
3
11
|
export declare function usePluginTranslation(): import("react-i18next").UseTranslationResponse<"field-formula", undefined>;
|
package/dist/client/scopes.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare function renderExpressionDescription(key: string): React.JSX.Element;
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
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
|
+
|
|
1
10
|
module.exports = {
|
|
2
11
|
"@formily/react": "2.3.0",
|
|
3
|
-
"@nocobase/client": "1.0.0-alpha.
|
|
4
|
-
"@nocobase/evaluators": "1.0.0-alpha.
|
|
5
|
-
"@nocobase/utils": "1.0.0-alpha.
|
|
12
|
+
"@nocobase/client": "1.0.0-alpha.3",
|
|
13
|
+
"@nocobase/evaluators": "1.0.0-alpha.3",
|
|
14
|
+
"@nocobase/utils": "1.0.0-alpha.3",
|
|
6
15
|
"react": "18.2.0",
|
|
7
|
-
"@nocobase/database": "1.0.0-alpha.
|
|
8
|
-
"@nocobase/server": "1.0.0-alpha.
|
|
9
|
-
"@nocobase/test": "1.0.0-alpha.
|
|
16
|
+
"@nocobase/database": "1.0.0-alpha.3",
|
|
17
|
+
"@nocobase/server": "1.0.0-alpha.3",
|
|
18
|
+
"@nocobase/test": "1.0.0-alpha.3",
|
|
10
19
|
"react-i18next": "11.18.6",
|
|
11
20
|
"@formily/core": "2.3.0",
|
|
12
21
|
"@formily/reactive": "2.3.0"
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
1
9
|
export * from './server';
|
|
2
10
|
export { default } from './server';
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { BaseFieldOptions, Field } from '@nocobase/database';
|
|
2
10
|
export interface FormulaFieldOptions extends BaseFieldOptions {
|
|
3
11
|
type: 'formula';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1 +1,9 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export { default } from './plugin';
|
package/dist/server/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Migration } from '@nocobase/server';
|
|
2
10
|
export default class extends Migration {
|
|
3
11
|
appVersion: string;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Migration } from '@nocobase/server';
|
|
2
10
|
export default class extends Migration {
|
|
3
11
|
on: string;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
package/dist/server/plugin.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { InstallOptions, Plugin } from '@nocobase/server';
|
|
2
10
|
export declare class PluginFieldFormulaServer extends Plugin {
|
|
3
11
|
afterAdd(): void;
|
package/dist/server/plugin.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export declare const DataTypeTransformers: {
|
|
2
10
|
boolean: BooleanConstructor;
|
|
3
11
|
integer: {
|
package/dist/utils/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "数据表字段:公式",
|
|
5
5
|
"description": "Configure and store the results of calculations between multiple field values in the same record, supporting both Math.js and Excel formula functions.",
|
|
6
6
|
"description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎",
|
|
7
|
-
"version": "1.0.0-alpha.
|
|
7
|
+
"version": "1.0.0-alpha.3",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/field-formula",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@nocobase/test": "1.x",
|
|
26
26
|
"@nocobase/utils": "1.x"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "7ccb137c7616cba5d238f87368239640e1d9ace1",
|
|
29
29
|
"keywords": [
|
|
30
30
|
"Collection fields"
|
|
31
31
|
]
|