@nocobase/plugin-workflow-date-calculation 2.2.0-beta.9 → 2.3.0-alpha.1

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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_workflow_date_calculation_client_v2=self.webpackChunk_nocobase_plugin_workflow_date_calculation_client_v2||[]).push([["656"],{1275:function(e,t,n){n.d(t,{DateCalculationFieldset:function(){return q}});var r=n(9155),a=n.n(r),o=n(7375),l=n(5477),u=n(2059);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=[{labelKey:"Year",value:"year"},{labelKey:"Quarter",value:"quarter"},{labelKey:"Month",value:"month"},{labelKey:"Week",value:"week"},{labelKey:"Day",value:"day"},{labelKey:"Hour",value:"hour"},{labelKey:"Minute",value:"minute"},{labelKey:"Second",value:"second"},{labelKey:"Millisecond",value:"millisecond"}],m=[{labelKey:"Date",value:"date",color:"blue"},{labelKey:"Number",value:"number",color:"geekblue"},{labelKey:"Boolean",value:"boolean",color:"cyan"},{labelKey:"String",value:"string",color:"orange"}].reduce(function(e,t){var n,r;return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}({},e),r=null!=(r=i({},t.value,t))?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n},{}),p=["toDate","getter","converter","toString"],s={toDate:"To another date",getter:"Get value",converter:"Value conversion",toString:"Format"},f=n(197),d=n(9488);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function g(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function v(){var e,t,n=(e=["\n &.ant-select {\n width: auto;\n min-width: 6em;\n flex-shrink: 0;\n }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return v=function(){return n},n}var h=[["number",{precision:0}]],E=["date"],T=["date","number"],O=(0,l.css)(v());function w(e,t){return[e,"arguments",t]}function k(e){return{value:e,label:e}}function S(e){var t,o,i,c,m=(0,d.kj)(),p=(i=(o=function(e){if(Array.isArray(e))return e}(t=(0,r.useState)([]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,l=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(l)throw n}}return a}}(t)||function(e){if(e){if("string"==typeof e)return y(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return y(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],c=o[1],(0,r.useEffect)(function(){var e,t=!0;return(null==(e=Intl)?void 0:e.supportedValuesOf)?(c(Intl.supportedValuesOf("timeZone").map(k)),function(){t=!1}):(Promise.all([n.e("297"),n.e("200")]).then(n.t.bind(n,4743,23)).then(function(e){t&&c(e.tz.names().map(k))}).catch(function(){}),function(){t=!1})},[]),i);return a().createElement(u.Select,g(b({},e),{options:p,showSearch:!0,popupMatchSelectWidth:!1,placeholder:m("Target timezone"),className:(0,l.cx)(O,e.className)}))}function j(e){var t=e.value,n=e.onChange,r=e.options,o=void 0===r?c:r,i=e.className,m=(0,d.kj)();return a().createElement(u.Select,{value:t,onChange:n,popupMatchSelectWidth:!1,className:(0,l.cx)(O,i),options:o.map(function(e){return{value:e.value,label:m(e.labelKey)}})})}function K(e){var t=(0,d.kj)();return a().createElement(u.Select,g(b({},e),{allowClear:!1,popupMatchSelectWidth:!1,className:(0,l.cx)(O,e.className),options:[{value:!1,label:t("Keep decimals")},{value:0,label:t("Round")},{value:1,label:t("Round up")},{value:-1,label:t("Round down")}]}))}var F={add:{key:"add",titleKey:"Add a range",groupKey:"toDate",inputType:"date",outputType:"date",defaultParams:function(){return{number:1,unit:"day"}}},subtract:{key:"subtract",titleKey:"Subtract a range",groupKey:"toDate",inputType:"date",outputType:"date",defaultParams:function(){return{number:1,unit:"day"}}},diff:{key:"diff",titleKey:"Get difference with another date value",groupKey:"getter",inputType:"date",outputType:"number",defaultParams:function(){return{date:new Date,unit:"day",isAbs:!1,round:!1}}},get:{key:"get",titleKey:"Get value on specific unit of input date",groupKey:"getter",inputType:"date",outputType:"number",defaultParams:function(){return{unit:"day"}}},toTimestamp:{key:"toTimestamp",titleKey:"From date to timestamp",groupKey:"converter",inputType:"date",outputType:"number",defaultParams:function(){return{unit:"second"}}},tsToDate:{key:"tsToDate",titleKey:"From timestamp to date",groupKey:"converter",inputType:"number",outputType:"date",defaultParams:function(){return{unit:"second"}}},startOfTime:{key:"startOfTime",titleKey:"Set to time of unit start",groupKey:"toDate",inputType:"date",outputType:"date",defaultParams:function(){return{unit:"day"}}},endOfTime:{key:"endOfTime",titleKey:"Set to time of unit end",groupKey:"toDate",inputType:"date",outputType:"date",defaultParams:function(){return{unit:"day"}}},isLeapYear:{key:"isLeapYear",titleKey:"Is leap year",groupKey:"getter",inputType:"date",outputType:"boolean"},format:{key:"format",titleKey:"Format to string",groupKey:"toString",inputType:"date",outputType:"string",defaultParams:function(){return{format:"YYYY-MM-DD"}}},transDuration:{key:"transDuration",titleKey:"Convert unit",groupKey:"converter",inputType:"number",outputType:"number",defaultParams:function(){return{unitBefore:"day",unitAfter:"day",round:!1}}},changeTimezone:{key:"changeTimezone",titleKey:"Change timezone",groupKey:"toDate",inputType:"date",outputType:"date",defaultParams:function(){return{}}}};function P(e){return"string"==typeof e&&e in F}function D(e){var t=e.stepName;return a().createElement(u.Space.Compact,null,a().createElement(u.Form.Item,{name:w(t,"number"),noStyle:!0},a().createElement(f.WorkflowTypedVariableInput,{types:h})),a().createElement(u.Form.Item,{name:w(t,"unit"),noStyle:!0},a().createElement(j,null)))}function I(e){var t=e.stepName,n=(0,d.kj)();return a().createElement(u.Space,{wrap:!0},a().createElement(u.Form.Item,{name:w(t,"date"),noStyle:!0},a().createElement(f.WorkflowTypedVariableInput,{types:E,variableOptions:{types:["date"]}})),a().createElement(u.Form.Item,{name:w(t,"unit"),noStyle:!0},a().createElement(j,null)),a().createElement(u.Form.Item,{name:w(t,"isAbs"),valuePropName:"checked",noStyle:!0},a().createElement(u.Checkbox,null,n("Absolute value"))),a().createElement(u.Form.Item,{name:w(t,"round"),noStyle:!0},a().createElement(K,null)))}function x(e){var t=e.stepName,n=e.mode,r=(0,d.kj)(),o=c.filter(function(e){return"millisecond"===e.value||"second"===e.value}),l=c.filter(function(e){return"quarter"!==e.value});return"transDuration"===n?a().createElement(u.Space,{wrap:!0},a().createElement(u.Typography.Text,null,r("From")),a().createElement(u.Form.Item,{name:w(t,"unitBefore"),noStyle:!0},a().createElement(j,{options:l})),a().createElement(u.Typography.Text,null,r("To")),a().createElement(u.Form.Item,{name:w(t,"unitAfter"),noStyle:!0},a().createElement(j,{options:l})),a().createElement(u.Form.Item,{name:w(t,"round"),noStyle:!0},a().createElement(K,null))):a().createElement(u.Space,{wrap:!0},a().createElement(u.Typography.Text,null,r("toTimestamp"===n?"To":"From")),a().createElement(u.Form.Item,{name:w(t,"unit"),noStyle:!0},a().createElement(j,{options:o})))}function N(e){return a().createElement(f.WorkflowTypedVariableInput,g(b({},e),{types:T}))}function z(e){var t=e.stepName,n=e.functionKey,r=(0,d.kj)();if(!P(n))return null;switch(n){case"add":case"subtract":return a().createElement(D,{stepName:t});case"diff":return a().createElement(I,{stepName:t});case"get":case"startOfTime":case"endOfTime":return a().createElement(u.Form.Item,{name:w(t,"unit"),noStyle:!0},a().createElement(j,null));case"toTimestamp":case"tsToDate":return a().createElement(x,{stepName:t,mode:n});case"isLeapYear":default:return null;case"format":return a().createElement(u.Form.Item,{name:w(t,"format"),noStyle:!0},a().createElement(u.Input,{placeholder:r("Pattern")}));case"transDuration":return a().createElement(x,{stepName:t,mode:"transDuration"});case"changeTimezone":return a().createElement(u.Form.Item,{name:w(t,"timezone"),noStyle:!0},a().createElement(S,null))}}function M(e){var t=(0,d.kj)();return a().createElement(f.RadioWithTooltip,g(b({},e),{options:[{label:t("Date type"),value:"date",tooltip:t("Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.")},{label:t("Number type"),value:"number",tooltip:t("Only calculation functions with numeric input value are supported.")}]}))}function A(e){var t=e.functionKey,n=(0,d.kj)();if(!P(t))return null;var r=m[F[t].outputType];return a().createElement(u.Tag,{color:r.color},n(r.labelKey))}function C(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _(){var e=C(["\n width: 100%;\n "]);return _=function(){return e},e}function V(){var e=C(["\n position: relative;\n overflow: hidden;\n padding: 30px ","px ","px;\n border-radius: ","px;\n background: ",";\n\n &:hover .workflow-date-calculation-remove-button {\n opacity: 1;\n visibility: visible;\n }\n "]);return V=function(){return e},e}function R(){var e=C(["\n margin-top: ","px;\n margin-left: ","px;\n color: ",";\n "]);return R=function(){return e},e}function W(){var e=C(["\n position: absolute;\n top: 0;\n left: ","px;\n height: 1.5em;\n line-height: 1.5em;\n padding-inline: 0.5em;\n font-size: ","px;\n border-radius: 0 0 ","px ","px;\n margin-inline-end: 0;\n z-index: 1;\n\n &.ant-tag {\n background: #87d068;\n color: ",";\n border: none;\n }\n "]);return W=function(){return e},e}function L(){var e=C(["\n position: absolute;\n top: 0;\n right: 0;\n height: 22px;\n padding: 0;\n padding-inline: ","px;\n color: ",";\n z-index: 1;\n opacity: 0;\n visibility: hidden;\n transition:\n opacity 0.2s ease,\n visibility 0.2s ease;\n "]);return L=function(){return e},e}function Y(){var e=C(["\n padding-top: 0;\n "]);return Y=function(){return e},e}function G(){var e=C(["\n width: 100%;\n "]);return G=function(){return e},e}function B(){var e,t,n,i,c,f=(0,d.kj)(),y=u.theme.useToken().token,b=u.Form.useFormInstance(),g=null!=(n=u.Form.useWatch(["config","steps"],b))?n:[],v=null!=(i=u.Form.useWatch(["config","inputType"],b))?i:"date",h=(0,r.useRef)(v),E=null==(c=g[g.length-1])?void 0:c.function,T=P(E)?F[E].outputType:null,O=(e=g.length?"date"===T||"number"===T?T:null:v,t=(0,d.kj)(),e?p.flatMap(function(n){var r=Object.values(F).filter(function(t){return t.inputType===e&&t.groupKey===n});return r.length?[{key:n,label:t(s[n]),type:"group",children:r.map(function(e){return{key:e.key,label:a().createElement(u.Flex,{justify:"space-between",align:"center",gap:"small"},a().createElement("span",null,t(e.titleKey)),a().createElement(u.Tag,{color:m[e.outputType].color},t(m[e.outputType].labelKey)))}})}]:[]}):[]);(0,r.useEffect)(function(){h.current!==v&&(b.setFieldValue(["config","steps"],[]),h.current=v)},[b,v]);var w=(0,l.css)(_()),k=(0,l.css)(V(),y.paddingLG,y.paddingSM,y.borderRadiusLG,y.colorFillAlter),S=(0,l.css)(R(),y.marginSM,y.paddingLG,y.colorTextDescription),j=(0,l.css)(W(),y.paddingLG,y.fontSizeSM,y.borderRadiusSM,y.borderRadiusSM,y.colorTextLightSolid),K=(0,l.css)(L(),y.paddingSM,y.colorTextSecondary),D=(0,l.css)(Y()),I=(0,l.css)(G());return a().createElement(u.Form.List,{name:["config","steps"]},function(e,t){return a().createElement(u.Space,{direction:"vertical",size:"middle",className:w},e.map(function(n,r){var l,i=P(null==(l=g[r])?void 0:l.function)?g[r].function:void 0,c=i?f(F[i].titleKey):"",p=i?F[i].outputType:void 0,s=p?m[p]:void 0;return a().createElement("div",{key:n.key,className:I},a().createElement("div",{className:k},c?a().createElement(u.Tag,{color:"success",className:j},c):null,r===e.length-1?a().createElement(u.Button,{type:"text",icon:a().createElement(o.DeleteOutlined,null),"aria-label":f("Remove"),className:"workflow-date-calculation-remove-button ".concat(K),onClick:function(){return t.remove(n.name)}}):null,a().createElement("div",{className:D},a().createElement(u.Form.Item,{name:[n.name,"function"],hidden:!0},a().createElement("input",null)),a().createElement(z,{stepName:n.name,functionKey:i}))),s?a().createElement(u.Flex,{align:"center",gap:"small",className:S},a().createElement(o.ArrowDownOutlined,null),a().createElement(A,{functionKey:i})):null)}),O.length?a().createElement(u.Dropdown,{menu:{items:O,onClick:function(e){var n,r,a,o=e.key;P(o)&&t.add({function:o,arguments:null!=(n=null==(r=(a=F[o]).defaultParams)?void 0:r.call(a))?n:{}})}}},a().createElement(u.Button,{type:"dashed",icon:a().createElement(o.PlusOutlined,null)},f("Add step"))):a().createElement(u.Button,{disabled:!0},f("Result")))})}function q(){var e=(0,d.kj)(),t=u.Form.useFormInstance();return(0,r.useEffect)(function(){void 0===t.getFieldValue(["config","inputType"])&&t.setFieldValue(["config","inputType"],"date"),void 0===t.getFieldValue(["config","input"])&&t.setFieldValue(["config","input"],"{{$system.now}}"),void 0===t.getFieldValue(["config","steps"])&&t.setFieldValue(["config","steps"],[])},[t]),a().createElement(a().Fragment,null,a().createElement(u.Form.Item,{name:["config","input"],label:e("Input"),rules:[{required:!0}]},a().createElement(N,null)),a().createElement(u.Form.Item,{name:["config","inputType"],label:e("Input type as")},a().createElement(M,null)),a().createElement(u.Form.Item,{label:e("Calculation steps")},a().createElement(B,null)))}}}]);
@@ -0,0 +1,75 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export type DateCalculationInputType = 'date' | 'number';
10
+ export type DateCalculationOutputType = 'date' | 'number' | 'boolean' | 'string';
11
+ export type DateCalculationGroupKey = 'toDate' | 'getter' | 'converter' | 'toString';
12
+ export declare const unitOptionKeys: readonly [{
13
+ readonly labelKey: "Year";
14
+ readonly value: "year";
15
+ }, {
16
+ readonly labelKey: "Quarter";
17
+ readonly value: "quarter";
18
+ }, {
19
+ readonly labelKey: "Month";
20
+ readonly value: "month";
21
+ }, {
22
+ readonly labelKey: "Week";
23
+ readonly value: "week";
24
+ }, {
25
+ readonly labelKey: "Day";
26
+ readonly value: "day";
27
+ }, {
28
+ readonly labelKey: "Hour";
29
+ readonly value: "hour";
30
+ }, {
31
+ readonly labelKey: "Minute";
32
+ readonly value: "minute";
33
+ }, {
34
+ readonly labelKey: "Second";
35
+ readonly value: "second";
36
+ }, {
37
+ readonly labelKey: "Millisecond";
38
+ readonly value: "millisecond";
39
+ }];
40
+ export declare const dataTypeOptions: readonly [{
41
+ readonly labelKey: "Date";
42
+ readonly value: "date";
43
+ readonly color: "blue";
44
+ }, {
45
+ readonly labelKey: "Number";
46
+ readonly value: "number";
47
+ readonly color: "geekblue";
48
+ }, {
49
+ readonly labelKey: "Boolean";
50
+ readonly value: "boolean";
51
+ readonly color: "cyan";
52
+ }, {
53
+ readonly labelKey: "String";
54
+ readonly value: "string";
55
+ readonly color: "orange";
56
+ }];
57
+ export declare const dataTypeOptionMap: Record<DateCalculationOutputType, {
58
+ readonly labelKey: "Date";
59
+ readonly value: "date";
60
+ readonly color: "blue";
61
+ } | {
62
+ readonly labelKey: "Number";
63
+ readonly value: "number";
64
+ readonly color: "geekblue";
65
+ } | {
66
+ readonly labelKey: "Boolean";
67
+ readonly value: "boolean";
68
+ readonly color: "cyan";
69
+ } | {
70
+ readonly labelKey: "String";
71
+ readonly value: "string";
72
+ readonly color: "orange";
73
+ }>;
74
+ export declare const functionGroupOrder: DateCalculationGroupKey[];
75
+ export declare const functionGroupLabelKeys: Record<DateCalculationGroupKey, string>;
@@ -0,0 +1,153 @@
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 React from 'react';
10
+ import type { MenuProps } from 'antd';
11
+ import { RadioWithTooltip, WorkflowTypedVariableInput } from '@nocobase/plugin-workflow/client-v2';
12
+ import type { DateCalculationInputType } from './constants';
13
+ type StepName = number;
14
+ type StepArguments = Record<string, unknown>;
15
+ export declare const dateFunctions: {
16
+ readonly add: {
17
+ readonly key: "add";
18
+ readonly titleKey: "Add a range";
19
+ readonly groupKey: "toDate";
20
+ readonly inputType: "date";
21
+ readonly outputType: "date";
22
+ readonly defaultParams: () => {
23
+ number: number;
24
+ unit: string;
25
+ };
26
+ };
27
+ readonly subtract: {
28
+ readonly key: "subtract";
29
+ readonly titleKey: "Subtract a range";
30
+ readonly groupKey: "toDate";
31
+ readonly inputType: "date";
32
+ readonly outputType: "date";
33
+ readonly defaultParams: () => {
34
+ number: number;
35
+ unit: string;
36
+ };
37
+ };
38
+ readonly diff: {
39
+ readonly key: "diff";
40
+ readonly titleKey: "Get difference with another date value";
41
+ readonly groupKey: "getter";
42
+ readonly inputType: "date";
43
+ readonly outputType: "number";
44
+ readonly defaultParams: () => {
45
+ date: Date;
46
+ unit: string;
47
+ isAbs: boolean;
48
+ round: boolean;
49
+ };
50
+ };
51
+ readonly get: {
52
+ readonly key: "get";
53
+ readonly titleKey: "Get value on specific unit of input date";
54
+ readonly groupKey: "getter";
55
+ readonly inputType: "date";
56
+ readonly outputType: "number";
57
+ readonly defaultParams: () => {
58
+ unit: string;
59
+ };
60
+ };
61
+ readonly toTimestamp: {
62
+ readonly key: "toTimestamp";
63
+ readonly titleKey: "From date to timestamp";
64
+ readonly groupKey: "converter";
65
+ readonly inputType: "date";
66
+ readonly outputType: "number";
67
+ readonly defaultParams: () => {
68
+ unit: string;
69
+ };
70
+ };
71
+ readonly tsToDate: {
72
+ readonly key: "tsToDate";
73
+ readonly titleKey: "From timestamp to date";
74
+ readonly groupKey: "converter";
75
+ readonly inputType: "number";
76
+ readonly outputType: "date";
77
+ readonly defaultParams: () => {
78
+ unit: string;
79
+ };
80
+ };
81
+ readonly startOfTime: {
82
+ readonly key: "startOfTime";
83
+ readonly titleKey: "Set to time of unit start";
84
+ readonly groupKey: "toDate";
85
+ readonly inputType: "date";
86
+ readonly outputType: "date";
87
+ readonly defaultParams: () => {
88
+ unit: string;
89
+ };
90
+ };
91
+ readonly endOfTime: {
92
+ readonly key: "endOfTime";
93
+ readonly titleKey: "Set to time of unit end";
94
+ readonly groupKey: "toDate";
95
+ readonly inputType: "date";
96
+ readonly outputType: "date";
97
+ readonly defaultParams: () => {
98
+ unit: string;
99
+ };
100
+ };
101
+ readonly isLeapYear: {
102
+ readonly key: "isLeapYear";
103
+ readonly titleKey: "Is leap year";
104
+ readonly groupKey: "getter";
105
+ readonly inputType: "date";
106
+ readonly outputType: "boolean";
107
+ };
108
+ readonly format: {
109
+ readonly key: "format";
110
+ readonly titleKey: "Format to string";
111
+ readonly groupKey: "toString";
112
+ readonly inputType: "date";
113
+ readonly outputType: "string";
114
+ readonly defaultParams: () => {
115
+ format: string;
116
+ };
117
+ };
118
+ readonly transDuration: {
119
+ readonly key: "transDuration";
120
+ readonly titleKey: "Convert unit";
121
+ readonly groupKey: "converter";
122
+ readonly inputType: "number";
123
+ readonly outputType: "number";
124
+ readonly defaultParams: () => {
125
+ unitBefore: string;
126
+ unitAfter: string;
127
+ round: boolean;
128
+ };
129
+ };
130
+ readonly changeTimezone: {
131
+ readonly key: "changeTimezone";
132
+ readonly titleKey: "Change timezone";
133
+ readonly groupKey: "toDate";
134
+ readonly inputType: "date";
135
+ readonly outputType: "date";
136
+ readonly defaultParams: () => {};
137
+ };
138
+ };
139
+ export type DateCalculationFunctionKey = keyof typeof dateFunctions;
140
+ export declare function isDateCalculationFunctionKey(key: unknown): key is DateCalculationFunctionKey;
141
+ export declare function isDateCalculationInputType(type: unknown): type is DateCalculationInputType;
142
+ export declare function getDateCalculationDefaultParams(functionKey: DateCalculationFunctionKey): StepArguments;
143
+ export declare function useDateFunctionMenuItems(inputType?: DateCalculationInputType | null): NonNullable<MenuProps['items']>;
144
+ export declare function DateCalculationInputField(props: React.ComponentProps<typeof WorkflowTypedVariableInput>): React.JSX.Element;
145
+ export declare function DateCalculationStepArguments({ stepName, functionKey }: {
146
+ stepName: StepName;
147
+ functionKey?: string;
148
+ }): React.JSX.Element;
149
+ export declare function DateCalculationInputTypeField(props: React.ComponentProps<typeof RadioWithTooltip>): React.JSX.Element;
150
+ export declare function StepOutputTag({ functionKey }: {
151
+ functionKey?: string;
152
+ }): React.JSX.Element;
153
+ export {};
@@ -0,0 +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
+ */
9
+ export { default } from './plugin';
10
+ export * from './plugin';
11
+ export { default as DateCalculationInstruction } from './nodes/dateCalculation';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@emotion/css"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-date-calculation/client-v2",["@emotion/css","@nocobase/client-v2","react","antd","@nocobase/plugin-workflow/client-v2","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-date-calculation/client-v2"]=t(require("@emotion/css"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-workflow-date-calculation/client-v2"]=t(e["@emotion/css"],e["@nocobase/client-v2"],e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,o,r,i,c){return function(){"use strict";var u,a,l,f={9488:function(e,t,n){n.d(t,{MZ:function(){return u},kj:function(){return c}});var o=n(7694);function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var i="workflow-date-calculation";function c(){var e=(0,o.useFlowEngine)();return function(t,n){return e.context.t(t,r({ns:[i,"client"],nsMode:"fallback"},n))}}function u(e,t){return(0,o.tExpr)(e,r({ns:[i,"client"],nsMode:"fallback"},t))}},7375:function(e){e.exports=i},5477:function(t){t.exports=e},3485:function(e){e.exports=t},7694:function(e){e.exports=c},197:function(e){e.exports=r},2059:function(e){e.exports=o},9155:function(e){e.exports=n}},s={};function p(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,loaded:!1,exports:{}};return f[e].call(n.exports,n,n.exports,p),n.loaded=!0,n.exports}p.m=f,p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},d=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},p.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var n=Object.create(null);p.r(n);var o={};b=b||[null,d({}),d([]),d(d)];for(var r=2&t&&e;("object"==typeof r||"function"==typeof r)&&!~b.indexOf(r);r=d(r))Object.getOwnPropertyNames(r).forEach(function(t){o[t]=function(){return e[t]}});return o.default=function(){return e},p.d(n,o),n},p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.f={},p.e=function(e){return Promise.all(Object.keys(p.f).reduce(function(t,n){return p.f[n](e,t),t},[]))},p.u=function(e){return""+e+"."+({200:"49b5225dc7b5b6c4",297:"ce37681af1ad4cab",656:"a0f5351ed86708fe"})[e]+".js"},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},y={},p.l=function(e,t,n,o){if(y[e])return void y[e].push(t);if(void 0!==n)for(var r,i,c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var a=c[u];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-workflow-date-calculation/client-v2:"+n){r=a;break}}r||(i=!0,(r=document.createElement("script")).timeout=120,p.nc&&r.setAttribute("nonce",p.nc),r.setAttribute("data-rspack","@nocobase/plugin-workflow-date-calculation/client-v2:"+n),r.src=e),y[e]=[t];var l=function(t,n){r.onerror=r.onload=null,clearTimeout(f);var o=y[e];if(delete y[e],r.parentNode&&r.parentNode.removeChild(r),o&&o.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=l.bind(null,r.onerror),r.onload=l.bind(null,r.onload),i&&document.head.appendChild(r)},p.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},p.g.importScripts&&(v=p.g.location+"");var b,d,y,v,h=p.g.document;if(!v&&h&&(h.currentScript&&"SCRIPT"===h.currentScript.tagName.toUpperCase()&&(v=h.currentScript.src),!v)){var g=h.getElementsByTagName("script");if(g.length)for(var w=g.length-1;w>-1&&(!v||!/^http(s?):/.test(v));)v=g[w--].src}if(!v)throw Error("Automatic publicPath is not supported in this browser");p.p=v.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),u={889:0},p.f.j=function(e,t){var n=p.o(u,e)?u[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var o=new Promise(function(t,o){n=u[e]=[t,o]});t.push(n[2]=o);var r=p.p+p.u(e),i=Error();p.l(r,function(t){if(p.o(u,e)&&(0!==(n=u[e])&&(u[e]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",i.name="ChunkLoadError",i.type=o,i.request=r,n[1](i)}},"chunk-"+e,e)}},a=function(e,t){var n,o,r=t[0],i=t[1],c=t[2],a=0;if(r.some(function(e){return 0!==u[e]})){for(n in i)p.o(i,n)&&(p.m[n]=i[n]);c&&c(p)}for(e&&e(t);a<r.length;a++)o=r[a],p.o(u,o)&&u[o]&&u[o][0](),u[o]=0},(l=self.webpackChunk_nocobase_plugin_workflow_date_calculation_client_v2=self.webpackChunk_nocobase_plugin_workflow_date_calculation_client_v2||[]).forEach(a.bind(null,0)),l.push=a.bind(null,l.push.bind(l));var m={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-workflow-date-calculation/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var o=window.__webpack_public_path__||"";o&&("/"!==o.charAt(o.length-1)&&(o+="/"),e=o+"static/plugins/@nocobase/plugin-workflow-date-calculation/dist/client-v2/")}if(!e){var r=window.__nocobase_modern_client_prefix__||"v",i="/"+(r=String(r).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var c=window.location.pathname||"/",u=c.indexOf(i);e=u>=0?c.slice(0,u+1):"/"}e&&(e=e.replace(RegExp("/"+r+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-workflow-date-calculation/dist/client-v2/"}p.p=e}(),!function(){p.r(m),p.d(m,{DateCalculationInstruction:function(){return f},PluginWorkflowDateCalculationClientV2:function(){return g},default:function(){return w}});var e=p(3485),t=p(7375),n=p(9155),o=p.n(n),r=p(197),i=p(9488);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}var f=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function f(){var e,n,r;if(!(this instanceof f))throw TypeError("Cannot call a class as a function");return n=f,r=arguments,n=u(n),c(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,l()?Reflect.construct(n,r||[],u(this).constructor):n.apply(this,r)),"type","dateCalculation"),c(e,"title",(0,i.MZ)("Date calculation")),c(e,"group","calculation"),c(e,"description",(0,i.MZ)("Used for doing a series of date related calculation on an input value.")),c(e,"icon",o().createElement(t.CalendarOutlined,null)),c(e,"testable",!0),c(e,"FieldsetLoader",function(){return p.e("656").then(p.bind(p,1275)).then(function(e){return{default:e.DateCalculationFieldset}})}),e}return f.prototype=Object.create(e&&e.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),e&&a(f,e),n=[{key:"createDefaultConfig",value:function(){return{input:"{{$system.now}}",inputType:"date",steps:[]}}},{key:"useVariables",value:function(e,t){var n=null==t?void 0:t.types;return n&&!n.some(function(e){return"string"==typeof e&&(e in r.BaseTypeSets||Object.values(r.BaseTypeSets).some(function(t){return t.has(e)}))})?null:{value:e.key,label:e.title}}},{key:"getCreateModelMenuItem",value:function(e){var t,n,o=e.node;return{key:null!=(t=o.title)?t:"#".concat(o.id),label:null!=(n=o.title)?n:"#".concat(o.id),useModel:"NodeValueModel",createModelOptions:{use:"NodeValueModel",stepParams:{valueSettings:{init:{dataSource:"{{$jobsMapByNodeKey.".concat(o.key,"}}"),defaultValue:(0,i.MZ)("Date calculation result")}},cardSettings:{titleDescription:{title:(0,i.MZ)("Date calculation")}}}}}}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(f.prototype,n),f}(r.Instruction);function s(e,t,n,o,r,i,c){try{var u=e[i](c),a=u.value}catch(e){n(e);return}u.done?t(a):Promise.resolve(a).then(o,r)}function b(e,t,n){return(b=h()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&y(r,n.prototype),r}).apply(null,arguments)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t="function"==typeof Map?new Map:void 0;return(v=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return b(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,e)})(e)}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var g=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=d(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,h()?Reflect.construct(e,t||[],d(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&y(n,e),t=[{key:"load",value:function(){var e;return(e=function(){var e,t;return function(e,t){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(c,"next",{value:a(0)}),u(c,"throw",{value:a(1)}),u(c,"return",{value:a(2)}),"function"==typeof Symbol&&u(c,Symbol.iterator,{value:function(){return this}}),c;function a(u){return function(a){var l=[u,a];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,l[0]&&(i=0)),i;)try{if(n=1,o&&(r=2&l[0]?o.return:l[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;switch(o=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,o=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(r=(r=i.trys).length>0&&r[r.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(6===l[0]&&i.label<r[1]){i.label=r[1],r=l;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(l);break}r[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],o=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){return null==(t=this.app.pm.get("workflow")||this.app.pm.get("@nocobase/plugin-workflow"))||null==(e=t.registerInstruction)||e.call(t,"dateCalculation",f),[2]})},function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function c(e){s(i,o,r,c,u,"next",e)}function u(e){s(i,o,r,c,u,"throw",e)}c(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(n.prototype,t),n}(v(e.Plugin)),w=g}(),m}()});
@@ -0,0 +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
+ */
9
+ export declare const NAMESPACE = "workflow-date-calculation";
10
+ export declare function useT(): (key: string, options?: Record<string, unknown>) => string;
11
+ export declare function tExpr(key: string, options?: Record<string, unknown>): string;
@@ -0,0 +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
+ */
9
+ import React from 'react';
10
+ export declare function DateCalculationFieldset(): React.JSX.Element;
11
+ export default DateCalculationFieldset;
@@ -0,0 +1,34 @@
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 { SubModelItem } from '@nocobase/flow-engine';
10
+ import React from 'react';
11
+ import { Instruction, type UseVariableOptions, type VariableOption } from '@nocobase/plugin-workflow/client-v2';
12
+ export default class DateCalculationInstruction extends Instruction {
13
+ type: string;
14
+ title: string;
15
+ group: string;
16
+ description: string;
17
+ icon: React.JSX.Element;
18
+ testable: boolean;
19
+ createDefaultConfig(): {
20
+ input: string;
21
+ inputType: string;
22
+ steps: any[];
23
+ };
24
+ FieldsetLoader: () => Promise<{
25
+ default: typeof import("./components/dateCalculation").DateCalculationFieldset;
26
+ }>;
27
+ useVariables(node: {
28
+ key: string;
29
+ title: string;
30
+ }, options?: UseVariableOptions): VariableOption | null;
31
+ getCreateModelMenuItem({ node }: {
32
+ node: any;
33
+ }): SubModelItem;
34
+ }
@@ -0,0 +1,13 @@
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 { Application, Plugin } from '@nocobase/client-v2';
10
+ export declare class PluginWorkflowDateCalculationClientV2 extends Plugin<Record<string, never>, Application> {
11
+ load(): Promise<void>;
12
+ }
13
+ export default PluginWorkflowDateCalculationClientV2;
@@ -8,17 +8,18 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
+ "@nocobase/client": "2.3.0-alpha.1",
12
+ "@nocobase/plugin-workflow": "2.3.0-alpha.1",
13
+ "@nocobase/flow-engine": "2.3.0-alpha.1",
11
14
  "react": "18.2.0",
12
- "react-i18next": "11.18.6",
13
15
  "antd": "5.24.2",
14
- "@ant-design/icons": "5.6.1",
15
16
  "@formily/react": "2.3.7",
16
- "@formily/antd-v5": "1.2.3",
17
- "@nocobase/client": "2.2.0-beta.9",
18
- "@nocobase/plugin-workflow": "2.2.0-beta.9",
19
- "@nocobase/flow-engine": "2.2.0-beta.9",
20
17
  "lodash": "4.18.1",
18
+ "@emotion/css": "11.13.0",
19
+ "@nocobase/client-v2": "2.3.0-alpha.1",
20
+ "react-i18next": "11.18.6",
21
21
  "dayjs": "1.11.13",
22
- "@nocobase/utils": "2.2.0-beta.9",
23
- "@nocobase/server": "2.2.0-beta.9"
22
+ "@nocobase/utils": "2.3.0-alpha.1",
23
+ "@nocobase/server": "2.3.0-alpha.1",
24
+ "@ant-design/icons": "5.6.1"
24
25
  };
@@ -1 +1 @@
1
- {"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-07-06T02:56:54.548Z"}
1
+ {"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-07-16T12:58:40.801Z"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "工作流: 日期计算节点",
5
5
  "description": "Used to do date calculation in workflows, such as manipulating, comparing and formatting, etc.",
6
6
  "description.zh-CN": "可用于在工作流中对日期进行操作求值,如加减、比较操作,格式化等。",
7
- "version": "2.2.0-beta.9",
7
+ "version": "2.3.0-alpha.1",
8
8
  "main": "dist/server/index.js",
9
9
  "devDependencies": {
10
10
  "joi": "^17.13.3",
@@ -19,6 +19,7 @@
19
19
  },
20
20
  "peerDependencies": {
21
21
  "@nocobase/client": "2.x",
22
+ "@nocobase/client-v2": "2.x",
22
23
  "@nocobase/plugin-workflow": "2.x",
23
24
  "@nocobase/server": "2.x",
24
25
  "@nocobase/test": "2.x"
@@ -27,5 +28,5 @@
27
28
  "Workflow"
28
29
  ],
29
30
  "license": "Apache-2.0",
30
- "gitHead": "60e3d7abbaa0c7cead76f71a4f3d5eedb6b8acdb"
31
+ "gitHead": "2377df8ceb12549149017f7f14a61207bf6e49a2"
31
32
  }