@nocobase/plugin-workflow-json-query 2.0.22 → 2.1.0-alpha.10

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.
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/utils/client"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-json-query",["react","@nocobase/client","@ant-design/icons","@nocobase/utils/client","@nocobase/plugin-workflow/client","@formily/antd-v5"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-json-query"]=t(require("react"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/utils/client"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5")):e["@nocobase/plugin-workflow-json-query"]=t(e.react,e["@nocobase/client"],e["@ant-design/icons"],e["@nocobase/utils/client"],e["@nocobase/plugin-workflow/client"],e["@formily/antd-v5"])}(self,function(e,t,n,r,o,i){return function(){"use strict";var a={482:function(e){e.exports=n},632:function(e){e.exports=i},772:function(e){e.exports=t},433:function(e){e.exports=o},584:function(e){e.exports=r},156:function(t){t.exports=e}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return a[e](n,n.exports,u),n.exports}u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return!function(){u.r(l),u.d(l,{PluginWorkflowJSONQueryClient:function(){return E},default:function(){return _}});var e=u(772),t=u(482),n=u(632),r=u(584),o=u(156),i=u.n(o),a=u(433),c="@nocobase/plugin-workflow-json-query";function s(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 p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){return(f=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 b(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function m(){var e=b(["\n &:after {\n content: ':';\n }\n & + a {\n margin-left: 0.25em;\n }\n "]);return m=function(){return e},e}function v(){var e=b(["\n > *:not(:last-child) {\n margin-right: 0.5em;\n }\n button {\n padding: 0;\n }\n "]);return v=function(){return e},e}var h=new r.Registry;function g(){return Array.from(h.getEntities()).reduce(function(e,t){var n=function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,c=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),i.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(c)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return s(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 s(e,t)}}(t,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.")}(),r=n[0],o=n[1];return e.concat(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){p(e,t,n[t])})}return e}({value:r},o))},[])}function x(t){var n=h.get(t);return n&&n.link?i().createElement(i().Fragment,null,i().createElement("span",{className:(0,e.css)(m())},e.i18n.t("Syntax references")),i().createElement("a",{href:n.link,target:"_blank",rel:"noreferrer"},n.label)):null}h.register("jmespath",{label:"JMESPath",link:"https://jmespath.org/"}),h.register("jsonpathplus",{label:"JSON Path Plus",link:"https://jsonpath-plus.github.io/JSONPath/docs/ts/"}),h.register("jsonata",{label:"JSONata",link:"https://jsonata.org/"});var w=function(r){var o;if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");function u(){var r,o,l;if(!(this instanceof u))throw TypeError("Cannot call a class as a function");return o=u,l=arguments,o=f(o),p(r=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,d()?Reflect.construct(o,l||[],f(this).constructor):o.apply(this,l)),"title",'{{t("JSON calculation", { ns: "'.concat(c,'" })}}')),p(r,"type","json-query"),p(r,"group","calculation"),p(r,"description",'{{t("Transforming or calculating values from complex JSON data.", { ns: "'.concat(c,'" })}}')),p(r,"icon",i().createElement(t.NodeExpandOutlined,null)),p(r,"fieldset",{engine:{type:"string",title:'{{t("Query engine", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"Radio.Group",enum:"{{getEngineOptions()}}",required:!0,default:"jmespath"},source:{type:"string",title:'{{t("Data source", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{changeOnSelect:!0},required:!0},expression:{type:"string",title:'{{t("Query expression", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableTextArea",required:!0,"x-reactions":{dependencies:["engine"],fulfill:{state:{visible:"{{$deps[0]}}"},schema:{description:"{{renderEngineReference($deps[0])}}"}}}},model:{type:"array",title:'{{t("Properties mapping", { ns: "'.concat(c,'" })}}'),description:'{{t("If the type of query result is object or array of object, could map the properties which to be accessed in subsequent nodes.", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayTable",items:{type:"object",properties:{path:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Property key", { ns: "'.concat(c,'" })}}')},properties:{path:{type:"string",name:"path",required:!0,"x-decorator":"FormItem","x-component":"Input"}}},alias:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Alias", { ns: "'.concat(c,'" })}}')},properties:{alias:{type:"string",name:"alias","x-decorator":"FormItem","x-component":"Input"}}},label:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Display label", { ns: "'.concat(c,'" })}}')},properties:{label:{type:"string",name:"label",required:!0,"x-decorator":"FormItem","x-component":"Input"}}},operations:{type:"void","x-component":"ArrayTable.Column","x-component-props":{dataIndex:"operations",fixed:"right",className:(0,e.css)(v())},properties:{remove:{type:"void","x-component":"ArrayTable.Remove"}}}}},properties:{add:{type:"void","x-component":"ArrayTable.Addition","x-component-props":{defaultValue:{}},title:'{{t("Add property", { ns: "'.concat(c,'" })}}')}}}}),p(r,"scope",{renderEngineReference:x,getEngineOptions:g}),p(r,"components",{ArrayTable:n.ArrayTable,WorkflowVariableInput:a.WorkflowVariableInput,WorkflowVariableTextArea:a.WorkflowVariableTextArea}),p(r,"testable",!0),r}return u.prototype=Object.create(r&&r.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),r&&y(u,r),o=[{key:"useVariables",value:function(t,n){var r,o,i=t.key,a=t.title,c=t.config,u=(n.types,n.fieldNames),l=void 0===u?e.defaultFieldNames:u;return p(o={},l.value,i),p(o,l.label,a),p(o,"children",(null==(r=c.model)?void 0:r.length)?c.model.map(function(e){var t;return p(t={},l.value,e.alias||e.path),p(t,l.label,e.label),t}):null),o}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,o),u}(a.Instruction);function O(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){n(e);return}c.done?t(u):Promise.resolve(u).then(r,o)}function j(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,c,"next",e)}function c(e){O(i,r,o,a,c,"throw",e)}a(void 0)})}}function k(e,t,n){return(k=A()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&P(o,n.prototype),o}).apply(null,arguments)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function q(e){var t="function"==typeof Map?new Map:void 0;return(q=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 k(e,arguments,S(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,e)})(e)}function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(A=function(){return!!e})()}function T(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var u=[i,c];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var E=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e,t){var r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e,t],r=S(r),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(r,o||[],S(this).constructor):r.apply(this,o))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&P(n,e),t=[{key:"beforeLoad",value:function(){return j(function(){return T(this,function(e){return[2]})})()}},{key:"load",value:function(){var e=this;return j(function(){var t,n;return T(this,function(r){return t=e.app.pm.get("workflow"),n=new w,t.instructions.register(n.type,n),[2]})})()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(q(e.Plugin)),_=E}(),l}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nocobase/client"),require("@ant-design/icons"),require("@formily/antd-v5"),require("@nocobase/utils/client"),require("@nocobase/plugin-workflow/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-json-query",["react","@nocobase/client","@ant-design/icons","@formily/antd-v5","@nocobase/utils/client","@nocobase/plugin-workflow/client"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-json-query"]=t(require("react"),require("@nocobase/client"),require("@ant-design/icons"),require("@formily/antd-v5"),require("@nocobase/utils/client"),require("@nocobase/plugin-workflow/client")):e["@nocobase/plugin-workflow-json-query"]=t(e.react,e["@nocobase/client"],e["@ant-design/icons"],e["@formily/antd-v5"],e["@nocobase/utils/client"],e["@nocobase/plugin-workflow/client"])}(self,function(e,t,r,n,o,i){return function(){"use strict";var a,c={375:function(e){e.exports=r},418:function(e){e.exports=n},342:function(e){e.exports=t},990:function(e){e.exports=i},768:function(e){e.exports=o},155:function(t){t.exports=e}},u={};function l(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return c[e](r,r.exports,l),r.exports}l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},l.d=function(e,t){for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.g.importScripts&&(s=l.g.location+"");var s,p=l.g.document;if(!s&&p&&(p.currentScript&&"SCRIPT"===p.currentScript.tagName.toUpperCase()&&(s=p.currentScript.src),!s)){var f=p.getElementsByTagName("script");if(f.length)for(var y=f.length-1;y>-1&&(!s||!/^http(s?):/.test(s));)s=f[y--].src}if(!s)throw Error("Automatic publicPath is not supported in this browser");l.p=s.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var b={};return"/"!==(a=window.__webpack_public_path__||"/").charAt(a.length-1)&&(a+="/"),l.p=a+"static/plugins/@nocobase/plugin-workflow-json-query/dist/client/",!function(){l.r(b),l.d(b,{PluginWorkflowJSONQueryClient:function(){return A},default:function(){return E}});var e=l(342),t=l(375),r=l(418),n=l(768),o=l(155),i=l.n(o),a=l(990),c="@nocobase/plugin-workflow-json-query";function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function m(){var e=y(["\n &:after {\n content: ':';\n }\n & + a {\n margin-left: 0.25em;\n }\n "]);return m=function(){return e},e}function h(){var e=y(["\n > *:not(:last-child) {\n margin-right: 0.5em;\n }\n button {\n padding: 0;\n }\n "]);return h=function(){return e},e}var g=new n.Registry;function v(){return Array.from(g.getEntities()).reduce(function(e,t){var r=function(e){if(Array.isArray(e))return e}(t)||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw r}}return o}}(t)||function(e){if(e){if("string"==typeof e)return u(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 u(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.")}(),n=r[0],o=r[1];return e.concat(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){s(e,t,r[t])})}return e}({value:n},o))},[])}function w(t){var r=g.get(t);return r&&r.link?i().createElement(i().Fragment,null,i().createElement("span",{className:(0,e.css)(m())},e.i18n.t("Syntax references")),i().createElement("a",{href:r.link,target:"_blank",rel:"noreferrer"},r.label)):null}g.register("jmespath",{label:"JMESPath",link:"https://jmespath.org/"}),g.register("jsonpathplus",{label:"JSON Path Plus",link:"https://jsonpath-plus.github.io/JSONPath/docs/ts/"}),g.register("jsonata",{label:"JSONata",link:"https://jsonata.org/"});var x=function(n){var o;if("function"!=typeof n&&null!==n)throw TypeError("Super expression must either be null or a function");function u(){var n,o,l;if(!(this instanceof u))throw TypeError("Cannot call a class as a function");return o=u,l=arguments,o=p(o),s(n=function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,d()?Reflect.construct(o,l||[],p(this).constructor):o.apply(this,l)),"title",'{{t("JSON calculation", { ns: "'.concat(c,'" })}}')),s(n,"type","json-query"),s(n,"group","calculation"),s(n,"description",'{{t("Transforming or calculating values from complex JSON data.", { ns: "'.concat(c,'" })}}')),s(n,"icon",i().createElement(t.NodeExpandOutlined,null)),s(n,"fieldset",{engine:{type:"string",title:'{{t("Query engine", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"Radio.Group",enum:"{{getEngineOptions()}}",required:!0,default:"jmespath"},source:{type:"string",title:'{{t("Data source", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{changeOnSelect:!0},required:!0},expression:{type:"string",title:'{{t("Query expression", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableTextArea",required:!0,"x-reactions":{dependencies:["engine"],fulfill:{state:{visible:"{{$deps[0]}}"},schema:{description:"{{renderEngineReference($deps[0])}}"}}}},model:{type:"array",title:'{{t("Properties mapping", { ns: "'.concat(c,'" })}}'),description:'{{t("If the type of query result is object or array of object, could map the properties which to be accessed in subsequent nodes.", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayTable",items:{type:"object",properties:{path:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Property key", { ns: "'.concat(c,'" })}}')},properties:{path:{type:"string",name:"path",required:!0,"x-decorator":"FormItem","x-component":"Input"}}},alias:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Alias", { ns: "'.concat(c,'" })}}')},properties:{alias:{type:"string",name:"alias","x-decorator":"FormItem","x-component":"Input"}}},label:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Display label", { ns: "'.concat(c,'" })}}')},properties:{label:{type:"string",name:"label",required:!0,"x-decorator":"FormItem","x-component":"Input"}}},operations:{type:"void","x-component":"ArrayTable.Column","x-component-props":{dataIndex:"operations",fixed:"right",className:(0,e.css)(h())},properties:{remove:{type:"void","x-component":"ArrayTable.Remove"}}}}},properties:{add:{type:"void","x-component":"ArrayTable.Addition","x-component-props":{defaultValue:{}},title:'{{t("Add property", { ns: "'.concat(c,'" })}}')}}}}),s(n,"scope",{renderEngineReference:w,getEngineOptions:v}),s(n,"components",{ArrayTable:r.ArrayTable,WorkflowVariableInput:a.WorkflowVariableInput,WorkflowVariableTextArea:a.WorkflowVariableTextArea}),s(n,"testable",!0),n}return u.prototype=Object.create(n&&n.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),n&&f(u,n),o=[{key:"useVariables",value:function(t,r){var n,o,i=t.key,a=t.title,c=t.config,u=(r.types,r.fieldNames),l=void 0===u?e.defaultFieldNames:u;return s(o={},l.value,i),s(o,l.label,a),s(o,"children",(null==(n=c.model)?void 0:n.length)?c.model.map(function(e){var t;return s(t={},l.value,e.alias||e.path),s(t,l.label,e.label),t}):null),o}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(u.prototype,o),u}(a.Instruction);function O(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function j(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){O(i,n,o,a,c,"next",e)}function c(e){O(i,n,o,a,c,"throw",e)}a(void 0)})}}function k(e,t,r){return(k=T()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&P(o,r.prototype),o}).apply(null,arguments)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t="function"==typeof Map?new Map:void 0;return(_=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,r)}function r(){return k(e,arguments,S(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),P(r,e)})(e)}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}function q(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(a,"next",{value:u(0)}),c(a,"throw",{value:u(1)}),c(a,"return",{value:u(2)}),"function"==typeof Symbol&&c(a,Symbol.iterator,{value:function(){return this}}),a;function u(c){return function(u){var l=[c,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var A=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(e,t){var n,o;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return n=r,o=[e,t],n=S(n),function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,T()?Reflect.construct(n,o||[],S(this).constructor):n.apply(this,o))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&P(r,e),t=[{key:"beforeLoad",value:function(){return j(function(){return q(this,function(e){return[2]})})()}},{key:"load",value:function(){return j(function(){var e,t;return q(this,function(r){return e=this.app.pm.get("workflow"),t=new x,e.instructions.register(t.type,t),[2]})}).call(this)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(_(e.Plugin)),E=A}(),b}()});
@@ -8,12 +8,12 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.0.22",
12
- "@nocobase/plugin-workflow": "2.0.22",
11
+ "@nocobase/client": "2.1.0-alpha.10",
12
+ "@nocobase/plugin-workflow": "2.1.0-alpha.10",
13
13
  "@ant-design/icons": "5.6.1",
14
14
  "@formily/antd-v5": "1.2.3",
15
- "@nocobase/utils": "2.0.22",
15
+ "@nocobase/utils": "2.1.0-alpha.10",
16
16
  "react": "18.2.0",
17
17
  "lodash": "4.17.21",
18
- "@nocobase/server": "2.0.22"
18
+ "@nocobase/server": "2.1.0-alpha.10"
19
19
  };
@@ -1 +1 @@
1
- {"name":"jmespath","description":"JMESPath implementation in javascript","version":"0.16.0","author":{"name":"James Saryerwinnie","email":"js@jamesls.com","url":"http://jamesls.com/"},"homepage":"https://github.com/jmespath/jmespath.js","contributors":[],"devDependencies":{"grunt":"^0.4.5","grunt-contrib-jshint":"^0.11.0","grunt-contrib-uglify":"^0.11.1","grunt-eslint":"^17.3.1","mocha":"^2.1.0"},"dependencies":{},"main":"jmespath.js","directories":{"test":"test"},"engines":{"node":">= 0.6.0"},"repository":{"type":"git","url":"git://github.com/jmespath/jmespath.js"},"bugs":{"url":"http://github.com/jmespath/jmespath.js/issues","mail":""},"license":"Apache-2.0","keywords":["jmespath","jsonpath","json","xpath"],"scripts":{"test":"mocha test/"},"_lastModified":"2026-03-20T04:52:42.326Z"}
1
+ {"name":"jmespath","description":"JMESPath implementation in javascript","version":"0.16.0","author":{"name":"James Saryerwinnie","email":"js@jamesls.com","url":"http://jamesls.com/"},"homepage":"https://github.com/jmespath/jmespath.js","contributors":[],"devDependencies":{"grunt":"^0.4.5","grunt-contrib-jshint":"^0.11.0","grunt-contrib-uglify":"^0.11.1","grunt-eslint":"^17.3.1","mocha":"^2.1.0"},"dependencies":{},"main":"jmespath.js","directories":{"test":"test"},"engines":{"node":">= 0.6.0"},"repository":{"type":"git","url":"git://github.com/jmespath/jmespath.js"},"bugs":{"url":"http://github.com/jmespath/jmespath.js/issues","mail":""},"license":"Apache-2.0","keywords":["jmespath","jsonpath","json","xpath"],"scripts":{"test":"mocha test/"},"_lastModified":"2026-03-20T09:09:15.228Z"}
@@ -1 +1 @@
1
- {"name":"jsonata","version":"2.1.0","description":"JSON query and transformation language","module":"jsonata.js","main":"jsonata.js","typings":"jsonata.d.ts","homepage":"http://jsonata.org/","repository":{"type":"git","url":"https://github.com/jsonata-js/jsonata.git"},"scripts":{"pretest":"npm run lint","mocha":"nyc ./node_modules/mocha/bin/_mocha -- \"test/**/*.js\"","test":"npm run mocha","posttest":"npm run check-coverage && npm run browserify && npm run minify && npm run build-es5","build-es5":"npm run mkdir-dist && npm run regenerator && npm run browserify-es5 && npm run minify-es5","check-coverage":"nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100","browserify":"browserify src/jsonata.js --outfile jsonata.js --standalone jsonata","mkdir-dist":"mkdirp ./dist","regenerator":"babel src --out-dir dist --presets=@babel/env","browserify-es5":"regenerator --include-runtime polyfill.js > jsonata-es5.js; browserify dist/jsonata.js --standalone jsonata >> jsonata-es5.js","prepublishOnly":"npm run browserify && npm run minify && npm run build-es5","lint":"eslint src","doc":"jsdoc --configure jsdoc.json .","cover":"nyc _mocha","minify":"uglifyjs jsonata.js -o jsonata.min.js --compress --mangle","minify-es5":"uglifyjs jsonata-es5.js -o jsonata-es5.min.js --compress --mangle"},"license":"MIT","keywords":["JSON","query","transformation","transform","mapping","path"],"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/preset-env":"^7.8.4","browserify":"^16.5.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","eslint":"8.0.0","eslint-plugin-ideal":"^0.1.3","eslint-plugin-promise":"^6.0.0","jsdoc":"^3.6.3","mkdirp":"^1.0.3","mocha":"^7.0.1","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","regenerator":"^0.14.4","request":"^2.88.2","uglify-es":"^3.3.10"},"engines":{"node":">= 8"},"_lastModified":"2026-03-20T04:52:42.986Z"}
1
+ {"name":"jsonata","version":"2.1.0","description":"JSON query and transformation language","module":"jsonata.js","main":"jsonata.js","typings":"jsonata.d.ts","homepage":"http://jsonata.org/","repository":{"type":"git","url":"https://github.com/jsonata-js/jsonata.git"},"scripts":{"pretest":"npm run lint","mocha":"nyc ./node_modules/mocha/bin/_mocha -- \"test/**/*.js\"","test":"npm run mocha","posttest":"npm run check-coverage && npm run browserify && npm run minify && npm run build-es5","build-es5":"npm run mkdir-dist && npm run regenerator && npm run browserify-es5 && npm run minify-es5","check-coverage":"nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100","browserify":"browserify src/jsonata.js --outfile jsonata.js --standalone jsonata","mkdir-dist":"mkdirp ./dist","regenerator":"babel src --out-dir dist --presets=@babel/env","browserify-es5":"regenerator --include-runtime polyfill.js > jsonata-es5.js; browserify dist/jsonata.js --standalone jsonata >> jsonata-es5.js","prepublishOnly":"npm run browserify && npm run minify && npm run build-es5","lint":"eslint src","doc":"jsdoc --configure jsdoc.json .","cover":"nyc _mocha","minify":"uglifyjs jsonata.js -o jsonata.min.js --compress --mangle","minify-es5":"uglifyjs jsonata-es5.js -o jsonata-es5.min.js --compress --mangle"},"license":"MIT","keywords":["JSON","query","transformation","transform","mapping","path"],"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/preset-env":"^7.8.4","browserify":"^16.5.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","eslint":"8.0.0","eslint-plugin-ideal":"^0.1.3","eslint-plugin-promise":"^6.0.0","jsdoc":"^3.6.3","mkdirp":"^1.0.3","mocha":"^7.0.1","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","regenerator":"^0.14.4","request":"^2.88.2","uglify-es":"^3.3.10"},"engines":{"node":">= 8"},"_lastModified":"2026-03-20T09:09:15.873Z"}
@@ -1 +1 @@
1
- {"author":"Stefan Goessner","name":"jsonpath-plus","version":"10.3.0","type":"module","bin":{"jsonpath":"./bin/jsonpath-cli.js","jsonpath-plus":"./bin/jsonpath-cli.js"},"main":"dist/index-node-cjs.cjs","exports":{"./package.json":"./package.json",".":{"types":"./src/jsonpath.d.ts","browser":"./dist/index-browser-esm.js","umd":"./dist/index-browser-umd.cjs","import":"./dist/index-node-esm.js","require":"./dist/index-node-cjs.cjs","default":"./dist/index-browser-esm.js"}},"module":"dist/index-node-esm.js","browser":"dist/index-browser-esm.js","types":"./src/jsonpath.d.ts","description":"A JS implementation of JSONPath with some additional operators","contributors":[{"name":"Prof. Gössner","email":"stefan.goessner@fh-dortmund.de"},{"name":"Subbu Allamaraju","email":"subbu@subbu.org"},{"name":"Mike Brevoort","email":"mike@brevoort.com"},{"name":"Robert Krahn","email":"robert.krahn@gmail.com"},{"name":"Brett Zamir","email":"brettz9@yahoo.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"}],"license":"MIT","repository":{"type":"git","url":"git://github.com/s3u/JSONPath.git"},"bugs":"https://github.com/s3u/JSONPath/issues/","homepage":"https://github.com/s3u/JSONPath","engines":{"node":">=18.0.0"},"react-native":{"vm":false},"dependencies":{"@jsep-plugin/assignment":"^1.3.0","@jsep-plugin/regex":"^1.0.4","jsep":"^1.4.0"},"devDependencies":{"@babel/core":"^7.26.8","@babel/preset-env":"^7.26.8","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-node-resolve":"^15.3.1","@rollup/plugin-terser":"^0.4.4","c8":"^10.1.3","chai":"^5.1.2","coveradge":"^0.8.2","eslint":"^9.20.1","eslint-config-ash-nazg":"^36.22.2","http-server":"^14.1.1","license-badger":"^0.21.1","mocha":"^10.8.2","mocha-badge-generator":"^0.11.0","mocha-multi-reporters":"^1.5.1","open-cli":"^8.0.0","rollup":"4.27.2","typedoc":"^0.27.7","typescript":"^5.7.3"},"keywords":["json","jsonpath"],"browserslist":["defaults, not op_mini all"],"c8":{"reporter":["text","html","json-summary"],"exclude":[".mocharc.cjs","eslint.config.js","src/jsonpath.d.ts","rollup.config.js",".idea","coverage","dist","demo","docs","ignore","test","test-helpers"]},"scripts":{"prepublishOnly":"pnpm i","license-badge":"license-badger --corrections --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg","license-badge-dev":"license-badger --corrections --filteredTypes=nonempty --textTemplate \"License types\n(all devDeps)\" --allDevelopment badges/licenses-badge-dev.svg","license-badges":"npm run license-badge && npm run license-badge-dev","build-docs":"typedoc --out docs/ts src --excludeExternals --entryPointStrategy Expand","open-docs":"open-cli http://localhost:8084/docs/ts/ && npm start","coverage":"open-cli http://localhost:8084/coverage/ && npm start","coverage-badge":"coveradge badges/coverage-badge.svg","node-import-test":"node --experimental-modules demo/node-import-test.mjs","open":"open-cli http://localhost:8084/demo/ && npm start","start":"http-server -p 8084","cli":"./bin/jsonpath-cli.js package.json name","typescript":"tsc","mocha":"mocha --require test-helpers/node-env.js --reporter-options configFile=mocha-multi-reporters.json test","c8":"rm -Rf ./coverage && rm -Rf ./node_modules/.cache && c8 --all npm run mocha && npm run coverage-badge","rollup":"rollup -c","eslint":"eslint .","lint":"npm run eslint","test":"npm run eslint && npm run rollup && npm run c8 && npm run typescript","browser-test":"npm run eslint && npm run rollup && open-cli http://localhost:8084/test/ && npm start"},"_lastModified":"2026-03-20T04:52:42.519Z"}
1
+ {"author":"Stefan Goessner","name":"jsonpath-plus","version":"10.3.0","type":"module","bin":{"jsonpath":"./bin/jsonpath-cli.js","jsonpath-plus":"./bin/jsonpath-cli.js"},"main":"dist/index-node-cjs.cjs","exports":{"./package.json":"./package.json",".":{"types":"./src/jsonpath.d.ts","browser":"./dist/index-browser-esm.js","umd":"./dist/index-browser-umd.cjs","import":"./dist/index-node-esm.js","require":"./dist/index-node-cjs.cjs","default":"./dist/index-browser-esm.js"}},"module":"dist/index-node-esm.js","browser":"dist/index-browser-esm.js","types":"./src/jsonpath.d.ts","description":"A JS implementation of JSONPath with some additional operators","contributors":[{"name":"Prof. Gössner","email":"stefan.goessner@fh-dortmund.de"},{"name":"Subbu Allamaraju","email":"subbu@subbu.org"},{"name":"Mike Brevoort","email":"mike@brevoort.com"},{"name":"Robert Krahn","email":"robert.krahn@gmail.com"},{"name":"Brett Zamir","email":"brettz9@yahoo.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"}],"license":"MIT","repository":{"type":"git","url":"git://github.com/s3u/JSONPath.git"},"bugs":"https://github.com/s3u/JSONPath/issues/","homepage":"https://github.com/s3u/JSONPath","engines":{"node":">=18.0.0"},"react-native":{"vm":false},"dependencies":{"@jsep-plugin/assignment":"^1.3.0","@jsep-plugin/regex":"^1.0.4","jsep":"^1.4.0"},"devDependencies":{"@babel/core":"^7.26.8","@babel/preset-env":"^7.26.8","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-node-resolve":"^15.3.1","@rollup/plugin-terser":"^0.4.4","c8":"^10.1.3","chai":"^5.1.2","coveradge":"^0.8.2","eslint":"^9.20.1","eslint-config-ash-nazg":"^36.22.2","http-server":"^14.1.1","license-badger":"^0.21.1","mocha":"^10.8.2","mocha-badge-generator":"^0.11.0","mocha-multi-reporters":"^1.5.1","open-cli":"^8.0.0","rollup":"4.27.2","typedoc":"^0.27.7","typescript":"^5.7.3"},"keywords":["json","jsonpath"],"browserslist":["defaults, not op_mini all"],"c8":{"reporter":["text","html","json-summary"],"exclude":[".mocharc.cjs","eslint.config.js","src/jsonpath.d.ts","rollup.config.js",".idea","coverage","dist","demo","docs","ignore","test","test-helpers"]},"scripts":{"prepublishOnly":"pnpm i","license-badge":"license-badger --corrections --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg","license-badge-dev":"license-badger --corrections --filteredTypes=nonempty --textTemplate \"License types\n(all devDeps)\" --allDevelopment badges/licenses-badge-dev.svg","license-badges":"npm run license-badge && npm run license-badge-dev","build-docs":"typedoc --out docs/ts src --excludeExternals --entryPointStrategy Expand","open-docs":"open-cli http://localhost:8084/docs/ts/ && npm start","coverage":"open-cli http://localhost:8084/coverage/ && npm start","coverage-badge":"coveradge badges/coverage-badge.svg","node-import-test":"node --experimental-modules demo/node-import-test.mjs","open":"open-cli http://localhost:8084/demo/ && npm start","start":"http-server -p 8084","cli":"./bin/jsonpath-cli.js package.json name","typescript":"tsc","mocha":"mocha --require test-helpers/node-env.js --reporter-options configFile=mocha-multi-reporters.json test","c8":"rm -Rf ./coverage && rm -Rf ./node_modules/.cache && c8 --all npm run mocha && npm run coverage-badge","rollup":"rollup -c","eslint":"eslint .","lint":"npm run eslint","test":"npm run eslint && npm run rollup && npm run c8 && npm run typescript","browser-test":"npm run eslint && npm run rollup && open-cli http://localhost:8084/test/ && npm start"},"_lastModified":"2026-03-20T09:09:15.406Z"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-workflow-json-query",
3
- "version": "2.0.22",
3
+ "version": "2.1.0-alpha.10",
4
4
  "displayName": "Workflow: JSON calculation",
5
5
  "displayName.zh-CN": "工作流:JSON 计算",
6
6
  "description": "Used for transforming or calculating values from complex JSON data (result of HTTP request or SQL etc.).",
@@ -24,7 +24,7 @@
24
24
  "@nocobase/test": "2.x",
25
25
  "@nocobase/utils": "2.x"
26
26
  },
27
- "gitHead": "7b703580c4bb60f1e5e44c8fd685141bb8b3a47c",
27
+ "gitHead": "ce790d46c0a5768ca9618c7d0d77ab8300de75c8",
28
28
  "nocobase": {
29
29
  "defaultEnabled": true
30
30
  },