@nocobase/plugin-workflow-date-calculation 2.0.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/LICENSE +201 -0
- package/README.md +99 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/DateCalculationInstruction.d.ts +162 -0
- package/dist/client/constants.d.ts +5 -0
- package/dist/client/dateFunctions.d.ts +386 -0
- package/dist/client/e189cd1809d7de1b.js +10 -0
- package/dist/client/f46a3514e6461e53.js +10 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.js +10 -0
- package/dist/externalVersion.js +24 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +50 -0
- package/dist/locale/de-DE.json +52 -0
- package/dist/locale/en-US.json +52 -0
- package/dist/locale/es-ES.json +52 -0
- package/dist/locale/fr-FR.json +52 -0
- package/dist/locale/hu-HU.json +52 -0
- package/dist/locale/id-ID.json +52 -0
- package/dist/locale/index.d.ts +12 -0
- package/dist/locale/index.js +54 -0
- package/dist/locale/it-IT.json +52 -0
- package/dist/locale/ja-JP.json +52 -0
- package/dist/locale/ko-KR.json +52 -0
- package/dist/locale/ko_KR.json +47 -0
- package/dist/locale/nl-NL.json +52 -0
- package/dist/locale/pt-BR.json +52 -0
- package/dist/locale/ru-RU.json +52 -0
- package/dist/locale/tr-TR.json +52 -0
- package/dist/locale/uk-UA.json +52 -0
- package/dist/locale/vi-VN.json +52 -0
- package/dist/locale/zh-CN.json +52 -0
- package/dist/locale/zh-TW.json +52 -0
- package/dist/server/DateCalculationInstruction.d.ts +43 -0
- package/dist/server/DateCalculationInstruction.js +93 -0
- package/dist/server/dateFunction.d.ts +15 -0
- package/dist/server/dateFunction.js +205 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +42 -0
- package/dist/server/plugin.d.ts +11 -0
- package/dist/server/plugin.js +68 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +39 -0
- package/package.json +30 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -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
|
+
(self.webpackChunk_nocobase_plugin_workflow_date_calculation=self.webpackChunk_nocobase_plugin_workflow_date_calculation||[]).push([["483"],{4954:function(s,j,e){var n={"./af":"8638","./af.js":"8638","./ar":"9195","./ar-dz":"5450","./ar-dz.js":"5450","./ar-kw":"276","./ar-kw.js":"276","./ar-ly":"3542","./ar-ly.js":"3542","./ar-ma":"2182","./ar-ma.js":"2182","./ar-sa":"9909","./ar-sa.js":"9909","./ar-tn":"1070","./ar-tn.js":"1070","./ar.js":"9195","./az":"737","./az.js":"737","./be":"2416","./be.js":"2416","./bg":"6803","./bg.js":"6803","./bm":"5055","./bm.js":"5055","./bn":"6137","./bn-bd":"8645","./bn-bd.js":"8645","./bn.js":"6137","./bo":"689","./bo.js":"689","./br":"9977","./br.js":"9977","./bs":"2650","./bs.js":"2650","./ca":"5484","./ca.js":"5484","./cs":"6286","./cs.js":"6286","./cv":"1940","./cv.js":"1940","./cy":"7927","./cy.js":"7927","./da":"2476","./da.js":"2476","./de":"8324","./de-at":"6400","./de-at.js":"6400","./de-ch":"4596","./de-ch.js":"4596","./de.js":"8324","./dv":"117","./dv.js":"117","./el":"4124","./el.js":"4124","./en-au":"1954","./en-au.js":"1954","./en-ca":"5002","./en-ca.js":"5002","./en-gb":"7847","./en-gb.js":"7847","./en-ie":"3753","./en-ie.js":"3753","./en-il":"6002","./en-il.js":"6002","./en-in":"404","./en-in.js":"404","./en-nz":"2377","./en-nz.js":"2377","./en-sg":"7208","./en-sg.js":"7208","./eo":"9873","./eo.js":"9873","./es":"4961","./es-do":"5870","./es-do.js":"5870","./es-mx":"1267","./es-mx.js":"1267","./es-us":"4565","./es-us.js":"4565","./es.js":"4961","./et":"4911","./et.js":"4911","./eu":"895","./eu.js":"895","./fa":"13","./fa.js":"13","./fi":"1579","./fi.js":"1579","./fil":"6384","./fil.js":"6384","./fo":"7216","./fo.js":"7216","./fr":"4159","./fr-ca":"9764","./fr-ca.js":"9764","./fr-ch":"7422","./fr-ch.js":"7422","./fr.js":"4159","./fy":"1063","./fy.js":"1063","./ga":"452","./ga.js":"452","./gd":"1805","./gd.js":"1805","./gl":"7139","./gl.js":"7139","./gom-deva":"1471","./gom-deva.js":"1471","./gom-latn":"3331","./gom-latn.js":"3331","./gu":"8143","./gu.js":"8143","./he":"3392","./he.js":"3392","./hi":"2867","./hi.js":"2867","./hr":"4248","./hr.js":"4248","./hu":"1168","./hu.js":"1168","./hy-am":"6030","./hy-am.js":"6030","./id":"5620","./id.js":"5620","./is":"3775","./is.js":"3775","./it":"3397","./it-ch":"6093","./it-ch.js":"6093","./it.js":"3397","./ja":"2528","./ja.js":"2528","./jv":"2729","./jv.js":"2729","./ka":"3249","./ka.js":"3249","./kk":"8316","./kk.js":"8316","./km":"6212","./km.js":"6212","./kn":"8651","./kn.js":"8651","./ko":"5756","./ko.js":"5756","./ku":"1917","./ku.js":"1917","./ky":"5566","./ky.js":"5566","./lb":"2153","./lb.js":"2153","./lo":"2526","./lo.js":"2526","./lt":"562","./lt.js":"562","./lv":"5229","./lv.js":"5229","./me":"9112","./me.js":"9112","./mi":"2714","./mi.js":"2714","./mk":"228","./mk.js":"228","./ml":"7072","./ml.js":"7072","./mn":"3960","./mn.js":"3960","./mr":"1537","./mr.js":"1537","./ms":"7959","./ms-my":"7270","./ms-my.js":"7270","./ms.js":"7959","./mt":"8074","./mt.js":"8074","./my":"4413","./my.js":"4413","./nb":"3560","./nb.js":"3560","./ne":"5214","./ne.js":"5214","./nl":"4393","./nl-be":"3517","./nl-be.js":"3517","./nl.js":"4393","./nn":"9649","./nn.js":"9649","./oc-lnc":"90","./oc-lnc.js":"90","./pa-in":"3597","./pa-in.js":"3597","./pl":"7050","./pl.js":"7050","./pt":"6932","./pt-br":"371","./pt-br.js":"371","./pt.js":"6932","./ro":"7221","./ro.js":"7221","./ru":"7177","./ru.js":"7177","./sd":"7352","./sd.js":"7352","./se":"6721","./se.js":"6721","./si":"3465","./si.js":"3465","./sk":"1062","./sk.js":"1062","./sl":"448","./sl.js":"448","./sq":"1714","./sq.js":"1714","./sr":"9114","./sr-cyrl":"7840","./sr-cyrl.js":"7840","./sr.js":"9114","./ss":"8360","./ss.js":"8360","./sv":"9901","./sv.js":"9901","./sw":"5206","./sw.js":"5206","./ta":"8479","./ta.js":"8479","./te":"6720","./te.js":"6720","./tet":"638","./tet.js":"638","./tg":"870","./tg.js":"870","./th":"5880","./th.js":"5880","./tk":"5339","./tk.js":"5339","./tl-ph":"710","./tl-ph.js":"710","./tlh":"1378","./tlh.js":"1378","./tr":"6550","./tr.js":"6550","./tzl":"1288","./tzl.js":"1288","./tzm":"1308","./tzm-latn":"1466","./tzm-latn.js":"1466","./tzm.js":"1308","./ug-cn":"305","./ug-cn.js":"305","./uk":"7527","./uk.js":"7527","./ur":"315","./ur.js":"315","./uz":"1514","./uz-latn":"5033","./uz-latn.js":"5033","./uz.js":"1514","./vi":"2061","./vi.js":"2061","./x-pseudo":"275","./x-pseudo.js":"275","./yo":"481","./yo.js":"481","./zh-cn":"2564","./zh-cn.js":"2564","./zh-hk":"5550","./zh-hk.js":"5550","./zh-mo":"7042","./zh-mo.js":"7042","./zh-tw":"3056","./zh-tw.js":"3056"};function a(s){return e(t(s))}function t(s){if(!e.o(n,s)){var j=Error("Cannot find module '"+s+"'");throw j.code="MODULE_NOT_FOUND",j}return n[s]}a.keys=function(){return Object.keys(n)},a.resolve=t,s.exports=a,a.id=4954}}]);
|
|
@@ -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("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5"),require("react"),require("@formily/react"),require("@ant-design/icons"),require("lodash"),require("antd"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-date-calculation",["@nocobase/client","@nocobase/plugin-workflow/client","@formily/antd-v5","react","@formily/react","@ant-design/icons","lodash","antd","react-i18next"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-date-calculation"]=t(require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5"),require("react"),require("@formily/react"),require("@ant-design/icons"),require("lodash"),require("antd"),require("react-i18next")):e["@nocobase/plugin-workflow-date-calculation"]=t(e["@nocobase/client"],e["@nocobase/plugin-workflow/client"],e["@formily/antd-v5"],e.react,e["@formily/react"],e["@ant-design/icons"],e.lodash,e.antd,e["react-i18next"])}(self,function(e,t,n,o,r,a,c,u,i){return function(){var l,s,p,f,d,m,y,b,v={3581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},482:function(e){"use strict";e.exports=a},4632:function(e){"use strict";e.exports=n},3505:function(e){"use strict";e.exports=r},3772:function(t){"use strict";t.exports=e},8433:function(e){"use strict";e.exports=t},2721:function(e){"use strict";e.exports=u},467:function(e){"use strict";e.exports=c},8156:function(e){"use strict";e.exports=o},3238:function(e){"use strict";e.exports=i}},g={};function h(e){var t=g[e];if(void 0!==t)return t.exports;var n=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(n.exports,n,n.exports,h),n.loaded=!0,n.exports}h.m=v,h.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return h.d(t,{a:t}),t},s=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},h.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);h.r(n);var o={};l=l||[null,s({}),s([]),s(s)];for(var r=2&t&&e;"object"==typeof r&&!~l.indexOf(r);r=s(r))Object.getOwnPropertyNames(r).forEach(function(t){o[t]=function(){return e[t]}});return o.default=function(){return e},h.d(n,o),n},h.d=function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.f={},h.e=function(e){return Promise.all(Object.keys(h.f).reduce(function(t,n){return h.f[n](e,t),t},[]))},h.u=function(e){return""+({457:"e189cd1809d7de1b",483:"f46a3514e6461e53"})[e]+".js"},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),h.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p={},f="@nocobase/plugin-workflow-date-calculation:",h.l=function(e,t,n,o){if(p[e])return void p[e].push(t);if(void 0!==n)for(var r,a,c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var i=c[u];if(i.getAttribute("src")==e||i.getAttribute("data-webpack")==f+n){r=i;break}}r||(a=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,h.nc&&r.setAttribute("nonce",h.nc),r.setAttribute("data-webpack",f+n),r.src=e),p[e]=[t];var l=function(t,n){r.onerror=r.onload=null,clearTimeout(s);var o=p[e];if(delete p[e],r.parentNode&&r.parentNode.removeChild(r),o&&o.forEach(function(e){return e(n)}),t)return t(n)},s=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),a&&document.head.appendChild(r)},h.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},h.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},(d=window.__webpack_public_path__||"/").endsWith("/")||(d+="/"),h.p=d+"static/plugins/@nocobase/plugin-workflow-date-calculation/dist/client/",m={909:0},h.f.j=function(e,t){var n=h.o(m,e)?m[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var o=new Promise(function(t,o){n=m[e]=[t,o]});t.push(n[2]=o);var r=h.p+h.u(e),a=Error();h.l(r,function(t){if(h.o(m,e)&&(0!==(n=m[e])&&(m[e]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",a.name="ChunkLoadError",a.type=o,a.request=r,n[1](a)}},"chunk-"+e,e)}},y=function(e,t){var n,o,r=t[0],a=t[1],c=t[2],u=0;if(r.some(function(e){return 0!==m[e]})){for(n in a)h.o(a,n)&&(h.m[n]=a[n]);c&&c(h)}for(e&&e(t);u<r.length;u++)o=r[u],h.o(m,o)&&m[o]&&m[o][0](),m[o]=0},(b=self.webpackChunk_nocobase_plugin_workflow_date_calculation=self.webpackChunk_nocobase_plugin_workflow_date_calculation||[]).forEach(y.bind(null,0)),b.push=y.bind(null,b.push.bind(b));var O={};return!function(){"use strict";h.r(O),h.d(O,{PluginWorkflowDateCalculationClient:function(){return Q},default:function(){return Z}});var e=h(3772),t=h(8156),n=h.n(t),o=h(3238),r=h(2721),a=h(482),c=h(3505),u=h(4632),i=h(8433),l=h(467),s="workflow-date-calculation";function p(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,(t=n,(0,o.useTranslation)(s,t)).t)(e)}function f(t){var n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.i18n.t(t,(n=function(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}({},r),o=o={ns:s},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n))}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=[{label:"{{t('Year', { ns: \"".concat(s,'" })}}'),value:"year"},{label:"{{t('Quarter', { ns: \"".concat(s,'" })}}'),value:"quarter"},{label:"{{t('Month', { ns: \"".concat(s,'" })}}'),value:"month"},{label:"{{t('Week', { ns: \"".concat(s,'" })}}'),value:"week"},{label:"{{t('Day', { ns: \"".concat(s,'" })}}'),value:"day"},{label:"{{t('Hour', { ns: \"".concat(s,'" })}}'),value:"hour"},{label:"{{t('Minute', { ns: \"".concat(s,'" })}}'),value:"minute"},{label:"{{t('Second', { ns: \"".concat(s,'" })}}'),value:"second"},{label:"{{t('Millisecond', { ns: \"".concat(s,'" })}}'),value:"millisecond"}],y=[{label:"{{t('Date', { ns: \"".concat(s,'" })}}'),value:"date",color:"blue"},{label:"{{t('Number', { ns: \"".concat(s,'" })}}'),value:"number",color:"geekblue"},{label:"{{t('Boolean', { ns: \"".concat(s,'" })}}'),value:"boolean",color:"cyan"},{label:"{{t('String', { ns: \"".concat(s,'" })}}'),value:"string",color:"orange"}].reduce(function(e,t){var n,o;return n=function(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){d(e,t,n[t])})}return e}({},e),o=null!=(o=d({},t.value,t))?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n},{}),b=h(3581);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function g(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}function w(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function x(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function j(){var e=x(["\n margin-inline-end: 0;\n "]);return j=function(){return e},e}function k(){var e=x(["\n display: inline-flex;\n align-items: center;\n "]);return k=function(){return e},e}function T(e){return{value:e,label:e}}var P=[{key:"toDate",label:'{{t("To another date", { ns: "'.concat(s,'" })}}')},{key:"getter",label:'{{t("Get value", { ns: "'.concat(s,'" })}}')},{key:"converter",label:'{{t("Value conversion", { ns: "'.concat(s,'" })}}')},{key:"toString",label:'{{t("Format", { ns: "'.concat(s,'" })}}')}],S={groupKey:"toDate",inputType:"date",outputType:"date",fieldset:{unit:{type:"string","x-component":"Select","x-component-props":{placeholder:"{{t('Unit', { ns: \"".concat(s,'" })}}'),className:"auto-width"},enum:m.filter(function(e){return"millisecond"!==e.value}),default:"day"}},defaultParams:function(){return{unit:"day"}}},_={add:{key:"add",title:'{{t("Add a range", { ns: "'.concat(s,'" })}}'),groupKey:"toDate",inputType:"date",outputType:"date",fieldset:{compact:{type:"void","x-component":"Space.Compact",properties:{number:{"x-component-props":{changeOnSelect:!0,useTypedConstant:[["number",{precision:0}]]},"x-component":"WorkflowVariableInput",default:1},unit:{type:"string","x-component":"Select","x-component-props":{className:"auto-width"},enum:m,default:"day"}}}},defaultParams:function(){return{number:1,unit:"day"}}},subtract:{key:"subtract",title:'{{t("Subtract a range", { ns: "'.concat(s,'" })}}'),groupKey:"toDate",inputType:"date",outputType:"date",fieldset:{compact:{type:"void","x-component":"Space.Compact",properties:{number:{"x-component-props":{changeOnSelect:!0,useTypedConstant:[["number",{precision:0}]]},"x-component":"WorkflowVariableInput",default:1},unit:{type:"string","x-component":"Select","x-component-props":{className:"auto-width"},enum:m}}}},defaultParams:function(){return{number:1,unit:"day"}}},diff:{key:"diff",title:'{{t("Get difference with another date value", { ns: "'.concat(s,'" })}}'),groupKey:"getter",inputType:"date",outputType:"number",fieldset:{date:{type:"string","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["date"],variableOptions:{types:["date"]}}},unit:{type:"string","x-component":"Select","x-component-props":{placeholder:"{{t('Unit', { ns: \"".concat(s,'" })}}'),className:"auto-width"},enum:m},isAbs:{type:"boolean","x-component":"Checkbox","x-component-props":{className:(0,e.css)(k())},"x-content":"{{t('Absolute value', { ns: \"".concat(s,'" })}}')},round:{type:"select","x-component":"Select","x-component-props":{allowClear:!1,placeholder:"小数",className:"auto-width"},enum:[{value:!1,label:"{{t('Keep decimals', { ns: \"".concat(s,'" })}}')},{value:0,label:"{{t('Round', { ns: \"".concat(s,'" })}}')},{value:1,label:"{{t('Round up', { ns: \"".concat(s,'" })}}')},{value:-1,label:"{{t('Round down', { ns: \"".concat(s,'" })}}')}]}},defaultParams:function(){return{date:new Date,unit:"day",isAbs:!1,round:!1}}},get:{key:"get",title:'{{t("Get value on specific unit of input date", { ns: "'.concat(s,'" })}}'),groupKey:"getter",inputType:"date",outputType:"number",fieldset:{unit:{type:"string","x-component":"Select","x-component-props":{placeholder:"{{t('Unit', { ns: \"".concat(s,'" })}}'),className:"auto-width"},enum:m,default:"day"}},defaultParams:function(){return{unit:"day"}}},toTimestamp:{key:"toTimestamp",title:'{{t("From date to timestamp", { ns: "'.concat(s,'" })}}'),groupKey:"converter",inputType:"date",outputType:"number",fieldset:{unitBeforeText:{type:"void","x-component":"div","x-content":'{{t("To", { ns: "'.concat(s,'" })}}')},unit:{type:"string","x-component":"Select","x-component-props":{placeholder:"{{t('Unit', { ns: \"".concat(s,'" })}}'),className:"auto-width"},enum:m.filter(function(e){return"millisecond"===e.value||"second"===e.value}),default:"second"}}},tsToDate:{key:"tsToDate",title:'{{t("From timestamp to date", { ns: "'.concat(s,'" })}}'),groupKey:"converter",inputType:"number",outputType:"date",fieldset:{unitBeforeText:{type:"void","x-component":"div","x-content":'{{t("From", { ns: "'.concat(s,'" })}}')},unit:{type:"string","x-component":"Select","x-component-props":{placeholder:"{{t('Unit', { ns: \"".concat(s,'" })}}'),className:"auto-width"},enum:m.filter(function(e){return"millisecond"===e.value||"second"===e.value}),default:"second"}}},startOfTime:w(g({},S),{key:"startOfTime",title:'{{t("Set to time of unit start", { ns: "'.concat(s,'" })}}')}),endOfTime:w(g({},S),{key:"endOfTime",title:'{{t("Set to time of unit end", { ns: "'.concat(s,'" })}}')}),isLeapYear:{key:"isLeapYear",title:'{{t("Is leap year", { ns: "'.concat(s,'" })}}'),groupKey:"getter",inputType:"date",outputType:"boolean",fieldset:{}},format:{key:"format",title:'{{t("Format to string", { ns: "'.concat(s,'" })}}'),groupKey:"toString",inputType:"date",outputType:"string",fieldset:{format:{type:"string","x-component":"Input","x-component-props":{placeholder:'{{t("Pattern", { ns: "'.concat(s,'" })}}')},default:"YYYY-MM-DD"}},defaultParams:function(){return{format:"YYYY-MM-DD"}}},transDuration:{key:"transDuration",title:'{{t("Convert unit", { ns: "'.concat(s,'" })}}'),groupKey:"converter",inputType:"number",outputType:"number",fieldset:{unitBeforeText:{type:"void","x-component":"div","x-content":'{{t("From", { ns: "'.concat(s,'" })}}')},unitBefore:{type:"string","x-component":"Select","x-component-props":{placeholder:"{{t('Unit', { ns: \"".concat(s,'" })}}'),className:"auto-width"},enum:m.filter(function(e){return"quarter"!==e.value}),default:"day"},unitAfterText:{type:"void","x-component":"div","x-content":'{{t("To", { ns: "'.concat(s,'" })}}')},unitAfter:{type:"string","x-component":"Select","x-component-props":{placeholder:"{{t('Unit', { ns: \"".concat(s,'" })}}'),className:"auto-width"},enum:m.filter(function(e){return"quarter"!==e.value}),default:"day"},round:{type:"select","x-component":"Select","x-component-props":{allowClear:!1,className:"auto-width"},enum:[{value:!1,label:"{{t('Keep decimals', { ns: \"".concat(s,'" })}}')},{value:0,label:"{{t('Round', { ns: \"".concat(s,'" })}}')},{value:1,label:"{{t('Round up', { ns: \"".concat(s,'" })}}')},{value:-1,label:"{{t('Round down', { ns: \"".concat(s,'" })}}')}]}},defaultParams:function(){return{unitBefore:"day",unitAfter:"day",round:!1}}},changeTimezone:{key:"changeTimezone",title:'{{t("Change timezone", { ns: "'.concat(s,'" })}}'),groupKey:"toDate",inputType:"date",outputType:"date",fieldset:{timezone:{type:"string","x-component":(0,c.connect)(function(e){var o,a,c,u,i=(c=(o=(0,t.useState)([]),a=function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n,o,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],c=!0,u=!1;try{for(r=r.call(e);!(c=(n=r.next()).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{c||null==r.return||r.return()}finally{if(u)throw o}}return a}}(o,2)||function(e,t){if(e){if("string"==typeof e)return v(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}}(o,2)||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],u=a[1],(0,t.useEffect)(function(){var e,t=function(){n=!1},n=!0;return(null==(e=Intl)?void 0:e.supportedValuesOf)?u(Intl.supportedValuesOf("timeZone").map(T)):b("imported_-1kudge7_component",Promise.all([h.e("457"),h.e("483")]).then(h.t.bind(h,8,23))).then(function(e){n&&u(e.tz.names().map(T))}).catch(console.error),t},[]),c);return n().createElement(r.Select,w(g({},e),{options:i}))}),"x-component-props":{placeholder:'{{t("Target timezone", { ns: "'.concat(s,'" })}}'),showSearch:!0}}}}};function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(A=function(){return!!e})()}function N(){var e=I(["\n margin: 1em;\n "]);return N=function(){return e},e}function q(){var e=I(["\n font-size: 10px;\n line-height: 14px;\n "]);return q=function(){return e},e}function M(){var e=I(["\n display: inline-block;\n background: #87d068;\n margin-left: 1rem;\n padding: 0.25em 0.5rem;\n border-radius: 0 0 0.25em 0.25em;\n color: #fff;\n font-size: 12px;\n "]);return M=function(){return e},e}function R(){var e=I(["\n display: flex;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n "]);return R=function(){return e},e}function F(){var e=I(["\n flex-direction: column;\n width: 100%;\n overflow: hidden;\n background: #f5f5f5;\n border: none;\n border-radius: 0.5em;\n padding: 0;\n margin-bottom: 0;\n "]);return F=function(){return e},e}function B(){var e=I(["\n flex-grow: 1;\n position: relative;\n line-height: 1;\n "]);return B=function(){return e},e}var z={Step:function(t){var o=t.children,c=(0,e.useCompile)(),i=u.ArrayItems.useRecord();if(!(null==i?void 0:i.function))return null;var l=y[_[i.function].outputType],s=l.color,p=l.label;return n().createElement(n().Fragment,null,o,n().createElement(r.Flex,{align:"center"},n().createElement(a.ArrowDownOutlined,{className:(0,e.css)(N())}),n().createElement(r.Tag,{color:s,className:(0,e.css)(q())},c(p))))},Title:function(t){var o=t.value,r=(0,e.useCompile)()(_[o].title);return n().createElement("span",{className:(0,e.css)(M())},r)},Arguments:function(){var t=u.ArrayItems.useIndex(),o=u.ArrayItems.useRecord(),r=_[o.function].fieldset;return n().createElement(e.SchemaComponent,{schema:{type:"void",name:"".concat(t,"_").concat(o.function),"x-component":"fieldset","x-component-props":{className:(0,e.css)(R())},properties:r}})},Addition:function(){var o,i,s=(0,c.useForm)(),f=s.values,d=s.disabled,m=u.ArrayItems.useArray(),b=function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"date",a=(0,e.useCompile)();return(0,t.useMemo)(function(){var t=(0,l.filter)(_,function(e){return e.inputType===o}),c=(0,l.groupBy)(t,"groupKey");return Object.keys(c).map(function(t){var o=P.find(function(e){return e.key===t});return{key:t,label:a(o.label),type:"group",children:c[t].map(function(t){return{key:t.key,title:a(t.title),label:n().createElement(r.Flex,{justify:"space-between",align:"center",gap:"large"},a(t.title),n().createElement(r.Tag,{color:y[t.outputType].color,className:(0,e.css)(j())},a(y[t.outputType].label)))}})}})},[a,o])}((null==(o=f.steps)?void 0:o.length)?null==(i=_[f.steps[f.steps.length-1].function])?void 0:i.outputType:f.inputType),v=p("Add step"),g=p("Result");return b.length?n().createElement(r.Dropdown,{disabled:d,menu:{items:b,onClick:function(e){var t,n,o,r,a=e.key,c=null!=(r=null==(t=(n=_[a]).defaultParams)?void 0:t.call(n))?r:{};null==(o=m.field)||o.push({function:a,arguments:c})}}},n().createElement(r.Button,{icon:n().createElement(a.PlusOutlined,null)},v)):n().createElement(r.Button,{disabled:!0},g)},Removable:function(e){var t=e.children,n=(0,c.useForm)().values;return u.ArrayItems.useIndex()===n.steps.length-1?t:null}},K=function(t){var c;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function l(){var t,c,p;if(!(this instanceof l))throw TypeError("Cannot call a class as a function");return c=l,p=arguments,c=C(c),E(t=function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=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,A()?Reflect.construct(c,p||[],C(this).constructor):c.apply(this,p)),"title",'{{t("Date calculation", { ns: "'.concat(s,'" })}}')),E(t,"type","dateCalculation"),E(t,"group","calculation"),E(t,"description",'{{t("Used for doing a series of date related calculation on an input value.", { ns: "'.concat(s,'" })}}')),E(t,"icon",n().createElement(a.CalendarOutlined,null)),E(t,"fieldset",{input:{type:"string",title:'{{t("Input", { ns: "'.concat(s,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{changeOnSelect:!0,useTypedConstant:["date","number"],parseOptions:{stringToDate:!0}},required:!0,default:"{{$system.now}}"},inputType:{type:"string",title:'{{t("Input type as", { ns: "'.concat(s,'" })}}'),"x-decorator":"FormItem","x-component":"RadioWithTooltip","x-component-props":{options:[{label:n().createElement(r.Tag,{color:y.date.color},n().createElement(o.Trans,{ns:s},"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.", { ns: "'.concat(s,'" })}}')},{label:n().createElement(r.Tag,{color:y.number.color},n().createElement(o.Trans,{ns:s},"Number type")),value:"number",tooltip:'{{t("Only calculation functions with numeric input value are supported.", { ns: "'.concat(s,'" })}}')}]},default:"date","x-reactions":[{target:"steps",effects:["onFieldValueChange"],fulfill:{state:{value:[]}}}]},steps:{type:"array",title:'{{t("Calculation steps", { ns: "'.concat(s,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"object","x-decorator":"Calculation.Step","x-component":"ArrayItems.Item","x-component-props":{className:(0,e.css)(F())},properties:{meta:{type:"void","x-component":"header","x-component-props":{className:(0,e.css)(B())},properties:{function:{type:"string","x-component":"Calculation.Title"},remove:{type:"void","x-decorator":"Calculation.Removable","x-component":"ArrayItems.Remove","x-component-props":{size:"small",style:{position:"absolute",right:"0.25rem",top:"0.25rem",padding:0,display:"flex",alignItems:"center",justifyContent:"center"}}}}},arguments:{type:"object","x-component":"Calculation.Arguments"}}},properties:{add:{type:"void","x-component":"Calculation.Addition"}}}}),E(t,"components",{WorkflowVariableInput:i.WorkflowVariableInput,RadioWithTooltip:i.RadioWithTooltip,ArrayItems:u.ArrayItems,Calculation:z,Space:r.Space}),E(t,"testable",!0),t}return l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),t&&D(l,t),c=[{key:"useVariables",value:function(e,t){var n=e.key,o=e.title,r=t.types;return(void 0===t.fieldNames&&i.defaultFieldNames,r&&!r.some(function(e){return e in i.BaseTypeSets||Object.values(i.BaseTypeSets).some(function(t){return t.has(e)})}))?null:{value:n,label:o}}},{key:"useInitializers",value:function(e){var t,n;return{name:null!=(t=e.title)?t:"#".concat(e.id),type:"item",title:null!=(n=e.title)?n:"#".concat(e.id),Component:i.ValueBlock.Initializer,node:e,resultTitle:f("Date calculation result")}}},{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:f("Date calculation result")}},cardSettings:{titleDescription:{title:'{{t("Date calculation", { ns: "'.concat(s,'" })}}')}}}}}}}],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)}}(l.prototype,c),l}(i.Instruction);function V(e,t,n,o,r,a,c){try{var u=e[a](c),i=u.value}catch(e){n(e);return}u.done?t(i):Promise.resolve(i).then(o,r)}function W(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var a=e.apply(t,n);function c(e){V(a,o,r,c,u,"next",e)}function u(e){V(a,o,r,c,u,"throw",e)}c(void 0)})}}function Y(e,t,n){return(Y=$()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&L(r,n.prototype),r}).apply(null,arguments)}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e){var t="function"==typeof Map?new Map:void 0;return(G=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 Y(e,arguments,U(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),L(n,e)})(e)}function $(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($=function(){return!!e})()}function H(e,t){var n,o,r,a,c={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){var i=[a,u];if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,o=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(r=(r=c.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){c.label=i[1];break}if(6===i[0]&&c.label<r[1]){c.label=r[1],r=i;break}if(r&&c.label<r[2]){c.label=r[2],c.ops.push(i);break}r[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}}}var Q=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=U(e),function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=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,$()?Reflect.construct(e,t||[],U(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&L(n,e),t=[{key:"afterAdd",value:function(){return W(function(){return H(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return W(function(){return H(this,function(e){return[2]})})()}},{key:"load",value:function(){var e=this;return W(function(){return H(this,function(t){return console.log(e.app),e.app.pm.get("workflow").registerInstruction("dateCalculation",K),[2]})})()}}],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}(G(e.Plugin)),Z=Q}(),O}()});
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
module.exports = {
|
|
11
|
+
"react": "18.2.0",
|
|
12
|
+
"react-i18next": "11.18.6",
|
|
13
|
+
"antd": "5.24.2",
|
|
14
|
+
"@ant-design/icons": "5.6.1",
|
|
15
|
+
"@formily/react": "2.3.7",
|
|
16
|
+
"@formily/antd-v5": "1.2.3",
|
|
17
|
+
"@nocobase/client": "2.0.3",
|
|
18
|
+
"@nocobase/plugin-workflow": "2.0.3",
|
|
19
|
+
"@nocobase/flow-engine": "2.0.3",
|
|
20
|
+
"lodash": "4.17.21",
|
|
21
|
+
"dayjs": "1.11.13",
|
|
22
|
+
"@nocobase/utils": "2.0.3",
|
|
23
|
+
"@nocobase/server": "2.0.3"
|
|
24
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -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 * from './server';
|
|
10
|
+
export { default } from './server';
|
|
11
|
+
export * from './utils';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
+
mod
|
|
36
|
+
));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var src_exports = {};
|
|
39
|
+
__export(src_exports, {
|
|
40
|
+
default: () => import_server.default
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(src_exports);
|
|
43
|
+
__reExport(src_exports, require("./server"), module.exports);
|
|
44
|
+
var import_server = __toESM(require("./server"));
|
|
45
|
+
__reExport(src_exports, require("./utils"), module.exports);
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
...require("./server"),
|
|
49
|
+
...require("./utils")
|
|
50
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Absolute value": "Absolute value",
|
|
3
|
+
"Add a range": "Add a range",
|
|
4
|
+
"Add step": "Add step",
|
|
5
|
+
"Boolean": "Boolean",
|
|
6
|
+
"Calculation steps": "Calculation steps",
|
|
7
|
+
"Change timezone": "Change timezone",
|
|
8
|
+
"Convert unit": "Convert unit",
|
|
9
|
+
"Date": "Date",
|
|
10
|
+
"Date calculation": "Date calculation",
|
|
11
|
+
"Date calculation result": "Date calculation result",
|
|
12
|
+
"Date type": "Date type",
|
|
13
|
+
"Day": "Day",
|
|
14
|
+
"Format": "Format",
|
|
15
|
+
"Format to string": "Format to string",
|
|
16
|
+
"From": "From",
|
|
17
|
+
"From date to timestamp": "From date to timestamp",
|
|
18
|
+
"From timestamp to date": "From timestamp to date",
|
|
19
|
+
"Get difference with another date value": "Get difference with another date value",
|
|
20
|
+
"Get value": "Get value",
|
|
21
|
+
"Get value on specific unit of input date": "Get value on specific unit of input date",
|
|
22
|
+
"Hour": "Hour",
|
|
23
|
+
"Input": "Input",
|
|
24
|
+
"Input type as": "Input type as",
|
|
25
|
+
"Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.": "Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.",
|
|
26
|
+
"Is leap year": "Is leap year",
|
|
27
|
+
"Keep decimals": "Keep decimals",
|
|
28
|
+
"Millisecond": "Millisecond",
|
|
29
|
+
"Minute": "Minute",
|
|
30
|
+
"Month": "Month",
|
|
31
|
+
"Number": "Number",
|
|
32
|
+
"Number type": "Number type",
|
|
33
|
+
"Only calculation functions with numeric input value are supported.": "Only calculation functions with numeric input value are supported.",
|
|
34
|
+
"Pattern": "Pattern",
|
|
35
|
+
"Quarter": "Quarter",
|
|
36
|
+
"Round": "Round",
|
|
37
|
+
"Round down": "Round down",
|
|
38
|
+
"Round up": "Round up",
|
|
39
|
+
"Second": "Second",
|
|
40
|
+
"Set to time of unit end": "Set to time of unit end",
|
|
41
|
+
"Set to time of unit start": "Set to time of unit start",
|
|
42
|
+
"String": "String",
|
|
43
|
+
"Subtract a range": "Subtract a range",
|
|
44
|
+
"Target timezone": "Target timezone",
|
|
45
|
+
"To": "To",
|
|
46
|
+
"To another date": "To another date",
|
|
47
|
+
"Unit": "Unit",
|
|
48
|
+
"Used for doing a series of date related calculation on an input value.": "Used for doing a series of date related calculation on an input value.",
|
|
49
|
+
"Value conversion": "Value conversion",
|
|
50
|
+
"Week": "Week",
|
|
51
|
+
"Year": "Year"
|
|
52
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Absolute value": "Absolute value",
|
|
3
|
+
"Add a range": "Add a range",
|
|
4
|
+
"Add step": "Add step",
|
|
5
|
+
"Boolean": "Boolean",
|
|
6
|
+
"Calculation steps": "Calculation steps",
|
|
7
|
+
"Change timezone": "Change timezone",
|
|
8
|
+
"Convert unit": "Convert unit",
|
|
9
|
+
"Date": "Date",
|
|
10
|
+
"Date calculation": "Date calculation",
|
|
11
|
+
"Date calculation result": "Date calculation result",
|
|
12
|
+
"Date type": "Date type",
|
|
13
|
+
"Day": "Day",
|
|
14
|
+
"Format": "Format",
|
|
15
|
+
"Format to string": "Format to string",
|
|
16
|
+
"From": "From",
|
|
17
|
+
"From date to timestamp": "From date to timestamp",
|
|
18
|
+
"From timestamp to date": "From timestamp to date",
|
|
19
|
+
"Get difference with another date value": "Get difference with another date value",
|
|
20
|
+
"Get value": "Get value",
|
|
21
|
+
"Get value on specific unit of input date": "Get value on specific unit of input date",
|
|
22
|
+
"Hour": "Hour",
|
|
23
|
+
"Input": "Input",
|
|
24
|
+
"Input type as": "Input type as",
|
|
25
|
+
"Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.": "Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.",
|
|
26
|
+
"Is leap year": "Is leap year",
|
|
27
|
+
"Keep decimals": "Keep decimals",
|
|
28
|
+
"Millisecond": "Millisecond",
|
|
29
|
+
"Minute": "Minute",
|
|
30
|
+
"Month": "Month",
|
|
31
|
+
"Number": "Number",
|
|
32
|
+
"Number type": "Number type",
|
|
33
|
+
"Only calculation functions with numeric input value are supported.": "Only calculation functions with numeric input value are supported.",
|
|
34
|
+
"Pattern": "Pattern",
|
|
35
|
+
"Quarter": "Quarter",
|
|
36
|
+
"Round": "Round",
|
|
37
|
+
"Round down": "Round down",
|
|
38
|
+
"Round up": "Round up",
|
|
39
|
+
"Second": "Second",
|
|
40
|
+
"Set to time of unit end": "Set to time of unit end",
|
|
41
|
+
"Set to time of unit start": "Set to time of unit start",
|
|
42
|
+
"String": "String",
|
|
43
|
+
"Subtract a range": "Subtract a range",
|
|
44
|
+
"Target timezone": "Target timezone",
|
|
45
|
+
"To": "To",
|
|
46
|
+
"To another date": "To another date",
|
|
47
|
+
"Unit": "Unit",
|
|
48
|
+
"Used for doing a series of date related calculation on an input value.": "Used for doing a series of date related calculation on an input value.",
|
|
49
|
+
"Value conversion": "Value conversion",
|
|
50
|
+
"Week": "Week",
|
|
51
|
+
"Year": "Year"
|
|
52
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Absolute value": "Absolute value",
|
|
3
|
+
"Add a range": "Add a range",
|
|
4
|
+
"Add step": "Add step",
|
|
5
|
+
"Boolean": "Boolean",
|
|
6
|
+
"Calculation steps": "Calculation steps",
|
|
7
|
+
"Change timezone": "Change timezone",
|
|
8
|
+
"Convert unit": "Convert unit",
|
|
9
|
+
"Date": "Date",
|
|
10
|
+
"Date calculation": "Date calculation",
|
|
11
|
+
"Date calculation result": "Date calculation result",
|
|
12
|
+
"Date type": "Date type",
|
|
13
|
+
"Day": "Day",
|
|
14
|
+
"Format": "Format",
|
|
15
|
+
"Format to string": "Format to string",
|
|
16
|
+
"From": "From",
|
|
17
|
+
"From date to timestamp": "From date to timestamp",
|
|
18
|
+
"From timestamp to date": "From timestamp to date",
|
|
19
|
+
"Get difference with another date value": "Get difference with another date value",
|
|
20
|
+
"Get value": "Get value",
|
|
21
|
+
"Get value on specific unit of input date": "Get value on specific unit of input date",
|
|
22
|
+
"Hour": "Hour",
|
|
23
|
+
"Input": "Input",
|
|
24
|
+
"Input type as": "Input type as",
|
|
25
|
+
"Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.": "Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.",
|
|
26
|
+
"Is leap year": "Is leap year",
|
|
27
|
+
"Keep decimals": "Keep decimals",
|
|
28
|
+
"Millisecond": "Millisecond",
|
|
29
|
+
"Minute": "Minute",
|
|
30
|
+
"Month": "Month",
|
|
31
|
+
"Number": "Number",
|
|
32
|
+
"Number type": "Number type",
|
|
33
|
+
"Only calculation functions with numeric input value are supported.": "Only calculation functions with numeric input value are supported.",
|
|
34
|
+
"Pattern": "Pattern",
|
|
35
|
+
"Quarter": "Quarter",
|
|
36
|
+
"Round": "Round",
|
|
37
|
+
"Round down": "Round down",
|
|
38
|
+
"Round up": "Round up",
|
|
39
|
+
"Second": "Second",
|
|
40
|
+
"Set to time of unit end": "Set to time of unit end",
|
|
41
|
+
"Set to time of unit start": "Set to time of unit start",
|
|
42
|
+
"String": "String",
|
|
43
|
+
"Subtract a range": "Subtract a range",
|
|
44
|
+
"Target timezone": "Target timezone",
|
|
45
|
+
"To": "To",
|
|
46
|
+
"To another date": "To another date",
|
|
47
|
+
"Unit": "Unit",
|
|
48
|
+
"Used for doing a series of date related calculation on an input value.": "Used for doing a series of date related calculation on an input value.",
|
|
49
|
+
"Value conversion": "Value conversion",
|
|
50
|
+
"Week": "Week",
|
|
51
|
+
"Year": "Year"
|
|
52
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Absolute value": "Absolute value",
|
|
3
|
+
"Add a range": "Add a range",
|
|
4
|
+
"Add step": "Add step",
|
|
5
|
+
"Boolean": "Boolean",
|
|
6
|
+
"Calculation steps": "Calculation steps",
|
|
7
|
+
"Change timezone": "Change timezone",
|
|
8
|
+
"Convert unit": "Convert unit",
|
|
9
|
+
"Date": "Date",
|
|
10
|
+
"Date calculation": "Date calculation",
|
|
11
|
+
"Date calculation result": "Date calculation result",
|
|
12
|
+
"Date type": "Date type",
|
|
13
|
+
"Day": "Day",
|
|
14
|
+
"Format": "Format",
|
|
15
|
+
"Format to string": "Format to string",
|
|
16
|
+
"From": "From",
|
|
17
|
+
"From date to timestamp": "From date to timestamp",
|
|
18
|
+
"From timestamp to date": "From timestamp to date",
|
|
19
|
+
"Get difference with another date value": "Get difference with another date value",
|
|
20
|
+
"Get value": "Get value",
|
|
21
|
+
"Get value on specific unit of input date": "Get value on specific unit of input date",
|
|
22
|
+
"Hour": "Hour",
|
|
23
|
+
"Input": "Input",
|
|
24
|
+
"Input type as": "Input type as",
|
|
25
|
+
"Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.": "Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.",
|
|
26
|
+
"Is leap year": "Is leap year",
|
|
27
|
+
"Keep decimals": "Keep decimals",
|
|
28
|
+
"Millisecond": "Millisecond",
|
|
29
|
+
"Minute": "Minute",
|
|
30
|
+
"Month": "Month",
|
|
31
|
+
"Number": "Number",
|
|
32
|
+
"Number type": "Number type",
|
|
33
|
+
"Only calculation functions with numeric input value are supported.": "Only calculation functions with numeric input value are supported.",
|
|
34
|
+
"Pattern": "Pattern",
|
|
35
|
+
"Quarter": "Quarter",
|
|
36
|
+
"Round": "Round",
|
|
37
|
+
"Round down": "Round down",
|
|
38
|
+
"Round up": "Round up",
|
|
39
|
+
"Second": "Second",
|
|
40
|
+
"Set to time of unit end": "Set to time of unit end",
|
|
41
|
+
"Set to time of unit start": "Set to time of unit start",
|
|
42
|
+
"String": "String",
|
|
43
|
+
"Subtract a range": "Subtract a range",
|
|
44
|
+
"Target timezone": "Target timezone",
|
|
45
|
+
"To": "To",
|
|
46
|
+
"To another date": "To another date",
|
|
47
|
+
"Unit": "Unit",
|
|
48
|
+
"Used for doing a series of date related calculation on an input value.": "Used for doing a series of date related calculation on an input value.",
|
|
49
|
+
"Value conversion": "Value conversion",
|
|
50
|
+
"Week": "Week",
|
|
51
|
+
"Year": "Year"
|
|
52
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Absolute value": "Abszolút érték",
|
|
3
|
+
"Add a range": "Tartomány hozzáadása",
|
|
4
|
+
"Add step": "Lépés hozzáadása",
|
|
5
|
+
"Boolean": "Logikai érték",
|
|
6
|
+
"Calculation steps": "Számítási lépések",
|
|
7
|
+
"Change timezone": "Change timezone",
|
|
8
|
+
"Convert unit": "Mértékegység konvertálása",
|
|
9
|
+
"Date": "Dátum",
|
|
10
|
+
"Date calculation": "Dátum számítás",
|
|
11
|
+
"Date calculation result": "Dátumszámítás eredménye",
|
|
12
|
+
"Date type": "Dátum típus",
|
|
13
|
+
"Day": "Nap",
|
|
14
|
+
"Format": "Formátum",
|
|
15
|
+
"Format to string": "Formázás szövegként",
|
|
16
|
+
"From": "Ettől",
|
|
17
|
+
"From date to timestamp": "Dátumból időbélyeggé",
|
|
18
|
+
"From timestamp to date": "Időbélyegből dátummá",
|
|
19
|
+
"Get difference with another date value": "Különbség számítása egy másik dátumértékkel",
|
|
20
|
+
"Get value": "Érték lekérése",
|
|
21
|
+
"Get value on specific unit of input date": "Érték lekérése a bemeneti dátum specifikus egységén",
|
|
22
|
+
"Hour": "Óra",
|
|
23
|
+
"Input": "Bemenet",
|
|
24
|
+
"Input type as": "Bemeneti típus mint",
|
|
25
|
+
"Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.": "A bemeneti érték az eredeti típusáról dátum típusra lesz konvertálva, hogy további számításokat lehessen végezni a Day.js konstruktorral.",
|
|
26
|
+
"Is leap year": "Szökőév-e",
|
|
27
|
+
"Keep decimals": "Tizedesek megtartása",
|
|
28
|
+
"Millisecond": "Ezredmásodperc",
|
|
29
|
+
"Minute": "Perc",
|
|
30
|
+
"Month": "Hónap",
|
|
31
|
+
"Number": "Szám",
|
|
32
|
+
"Number type": "Szám típus",
|
|
33
|
+
"Only calculation functions with numeric input value are supported.": "Csak a numerikus bemeneti értékekkel rendelkező számítási függvények támogatottak.",
|
|
34
|
+
"Pattern": "Minta",
|
|
35
|
+
"Quarter": "Negyedév",
|
|
36
|
+
"Round": "Kerekítés",
|
|
37
|
+
"Round down": "Lefelé kerekítés",
|
|
38
|
+
"Round up": "Felfelé kerekítés",
|
|
39
|
+
"Second": "Másodperc",
|
|
40
|
+
"Set to time of unit end": "Beállítás az egység végének idejére",
|
|
41
|
+
"Set to time of unit start": "Beállítás az egység kezdetének idejére",
|
|
42
|
+
"String": "Szöveg",
|
|
43
|
+
"Subtract a range": "Tartomány kivonása",
|
|
44
|
+
"Target timezone": "Target timezone",
|
|
45
|
+
"To": "Eddig",
|
|
46
|
+
"To another date": "Egy másik dátumhoz",
|
|
47
|
+
"Unit": "Egység",
|
|
48
|
+
"Used for doing a series of date related calculation on an input value.": "Egy bemeneti értéken végzett dátummal kapcsolatos számítások sorozatához használható.",
|
|
49
|
+
"Value conversion": "Értékkonverzió",
|
|
50
|
+
"Week": "Hét",
|
|
51
|
+
"Year": "Év"
|
|
52
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Absolute value": "Nilai absolut",
|
|
3
|
+
"Add a range": "Tambah rentang",
|
|
4
|
+
"Add step": "Tambah langkah",
|
|
5
|
+
"Boolean": "Boolean",
|
|
6
|
+
"Calculation steps": "Langkah perhitungan",
|
|
7
|
+
"Change timezone": "Change timezone",
|
|
8
|
+
"Convert unit": "Konversi unit",
|
|
9
|
+
"Date": "Tanggal",
|
|
10
|
+
"Date calculation": "Perhitungan tanggal",
|
|
11
|
+
"Date calculation result": "Hasil perhitungan tanggal",
|
|
12
|
+
"Date type": "Tipe tanggal",
|
|
13
|
+
"Day": "Hari",
|
|
14
|
+
"Format": "Format",
|
|
15
|
+
"Format to string": "Format ke string",
|
|
16
|
+
"From": "Dari",
|
|
17
|
+
"From date to timestamp": "Dari tanggal ke stempel waktu",
|
|
18
|
+
"From timestamp to date": "Dari stempel waktu ke tanggal",
|
|
19
|
+
"Get difference with another date value": "Dapatkan perbedaan dengan nilai tanggal lain",
|
|
20
|
+
"Get value": "Dapatkan nilai",
|
|
21
|
+
"Get value on specific unit of input date": "Dapatkan nilai pada unit spesifik dari tanggal input",
|
|
22
|
+
"Hour": "Jam",
|
|
23
|
+
"Input": "Input",
|
|
24
|
+
"Input type as": "Tipe input sebagai",
|
|
25
|
+
"Input value will be converted from its original type to date type to do futher calculation by Day.js constructor.": "Nilai input akan dikonversi dari tipe aslinya ke tipe tanggal untuk melakukan perhitungan lebih lanjut oleh konstruktor Day.js.",
|
|
26
|
+
"Is leap year": "Adalah tahun kabisat",
|
|
27
|
+
"Keep decimals": "Pertahankan desimal",
|
|
28
|
+
"Millisecond": "Milidetik",
|
|
29
|
+
"Minute": "Menit",
|
|
30
|
+
"Month": "Bulan",
|
|
31
|
+
"Number": "Angka",
|
|
32
|
+
"Number type": "Tipe angka",
|
|
33
|
+
"Only calculation functions with numeric input value are supported.": "Hanya fungsi perhitungan dengan nilai input numerik yang didukung.",
|
|
34
|
+
"Pattern": "Pola",
|
|
35
|
+
"Quarter": "Kuartal",
|
|
36
|
+
"Round": "Bulatkan",
|
|
37
|
+
"Round down": "Bulatkan ke bawah",
|
|
38
|
+
"Round up": "Bulatkan ke atas",
|
|
39
|
+
"Second": "Detik",
|
|
40
|
+
"Set to time of unit end": "Atur ke waktu akhir unit",
|
|
41
|
+
"Set to time of unit start": "Atur ke waktu awal unit",
|
|
42
|
+
"String": "String",
|
|
43
|
+
"Subtract a range": "Kurangi rentang",
|
|
44
|
+
"Target timezone": "Target timezone",
|
|
45
|
+
"To": "Ke",
|
|
46
|
+
"To another date": "Ke tanggal lain",
|
|
47
|
+
"Unit": "Unit",
|
|
48
|
+
"Used for doing a series of date related calculation on an input value.": "Digunakan untuk melakukan serangkaian perhitungan terkait tanggal pada nilai input.",
|
|
49
|
+
"Value conversion": "Konversi nilai",
|
|
50
|
+
"Week": "Minggu",
|
|
51
|
+
"Year": "Tahun"
|
|
52
|
+
}
|
|
@@ -0,0 +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
|
+
export declare const NAMESPACE = "workflow-date-calculation";
|
|
10
|
+
export declare function useLang(key: string, options?: {}): string;
|
|
11
|
+
export declare function lang(key: string, options?: {}): string;
|
|
12
|
+
export declare function usePluginTranslation(options: any): import("react-i18next").UseTranslationResponse<"workflow-date-calculation", undefined>;
|
|
@@ -0,0 +1,54 @@
|
|
|
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 locale_exports = {};
|
|
28
|
+
__export(locale_exports, {
|
|
29
|
+
NAMESPACE: () => NAMESPACE,
|
|
30
|
+
lang: () => lang,
|
|
31
|
+
useLang: () => useLang,
|
|
32
|
+
usePluginTranslation: () => usePluginTranslation
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(locale_exports);
|
|
35
|
+
var import_react_i18next = require("react-i18next");
|
|
36
|
+
var import_client = require("@nocobase/client");
|
|
37
|
+
const NAMESPACE = "workflow-date-calculation";
|
|
38
|
+
function useLang(key, options = {}) {
|
|
39
|
+
const { t } = usePluginTranslation(options);
|
|
40
|
+
return t(key);
|
|
41
|
+
}
|
|
42
|
+
function lang(key, options = {}) {
|
|
43
|
+
return import_client.i18n.t(key, { ...options, ns: NAMESPACE });
|
|
44
|
+
}
|
|
45
|
+
function usePluginTranslation(options) {
|
|
46
|
+
return (0, import_react_i18next.useTranslation)(NAMESPACE, options);
|
|
47
|
+
}
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
NAMESPACE,
|
|
51
|
+
lang,
|
|
52
|
+
useLang,
|
|
53
|
+
usePluginTranslation
|
|
54
|
+
});
|