@nocobase/plugin-workflow-json-query 1.9.0-beta.17

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.
Files changed (50) hide show
  1. package/LICENSE.txt +172 -0
  2. package/README.md +1 -0
  3. package/client.d.ts +2 -0
  4. package/client.js +1 -0
  5. package/dist/client/index.d.ts +23 -0
  6. package/dist/client/index.js +10 -0
  7. package/dist/client/instruction.d.ts +167 -0
  8. package/dist/externalVersion.js +19 -0
  9. package/dist/index.d.ts +17 -0
  10. package/dist/index.js +42 -0
  11. package/dist/locale/en-US.json +13 -0
  12. package/dist/locale/index.d.ts +10 -0
  13. package/dist/locale/index.js +42 -0
  14. package/dist/locale/zh-CN.json +14 -0
  15. package/dist/node_modules/jmespath/LICENSE +13 -0
  16. package/dist/node_modules/jmespath/artifacts/jmespath.min.js +2 -0
  17. package/dist/node_modules/jmespath/bower.json +24 -0
  18. package/dist/node_modules/jmespath/jmespath.js +1 -0
  19. package/dist/node_modules/jmespath/jp.js +23 -0
  20. package/dist/node_modules/jmespath/package.json +1 -0
  21. package/dist/node_modules/jsonata/LICENSE +19 -0
  22. package/dist/node_modules/jsonata/jsonata-es5.js +9875 -0
  23. package/dist/node_modules/jsonata/jsonata-es5.min.js +1 -0
  24. package/dist/node_modules/jsonata/jsonata.d.ts +72 -0
  25. package/dist/node_modules/jsonata/jsonata.js +1 -0
  26. package/dist/node_modules/jsonata/jsonata.min.js +1 -0
  27. package/dist/node_modules/jsonata/package.json +1 -0
  28. package/dist/node_modules/jsonpath-plus/LICENSE +22 -0
  29. package/dist/node_modules/jsonpath-plus/bin/jsonpath-cli.js +36 -0
  30. package/dist/node_modules/jsonpath-plus/dist/index-browser-esm.js +2158 -0
  31. package/dist/node_modules/jsonpath-plus/dist/index-browser-esm.min.js +2 -0
  32. package/dist/node_modules/jsonpath-plus/dist/index-browser-umd.cjs +2166 -0
  33. package/dist/node_modules/jsonpath-plus/dist/index-browser-umd.min.cjs +2 -0
  34. package/dist/node_modules/jsonpath-plus/dist/index-node-cjs.cjs +1 -0
  35. package/dist/node_modules/jsonpath-plus/dist/index-node-esm.js +2068 -0
  36. package/dist/node_modules/jsonpath-plus/package.json +1 -0
  37. package/dist/node_modules/jsonpath-plus/src/Safe-Script.js +200 -0
  38. package/dist/node_modules/jsonpath-plus/src/jsonpath-browser.js +102 -0
  39. package/dist/node_modules/jsonpath-plus/src/jsonpath-node.js +8 -0
  40. package/dist/node_modules/jsonpath-plus/src/jsonpath.d.ts +226 -0
  41. package/dist/node_modules/jsonpath-plus/src/jsonpath.js +784 -0
  42. package/dist/server/JSONQueryInstruction.d.ts +42 -0
  43. package/dist/server/JSONQueryInstruction.js +99 -0
  44. package/dist/server/Plugin.d.ts +24 -0
  45. package/dist/server/Plugin.js +62 -0
  46. package/dist/server/index.d.ts +17 -0
  47. package/dist/server/index.js +42 -0
  48. package/package.json +31 -0
  49. package/server.d.ts +2 -0
  50. package/server.js +1 -0
package/LICENSE.txt ADDED
@@ -0,0 +1,172 @@
1
+ Updated Date: October 2, 2025
2
+
3
+ NocoBase License Agreement
4
+
5
+ NOCOBASE PTE. LTD.,a Singaporean Exempt Private Company Limited by Shares with its principal place of business located at 112 ROBINSON ROAD, #03-01, SINGAPORE ("The Company") https://www.nocobase.com/ issues this License Agreement ("Agreement") to you. You, as an individual or a company ("The User"), will be deemed to voluntarily accept all terms of this Agreement by using NocoBase (including but not limited to obtaining NocoBase source code or installation package in any form, installing and using NocoBase, purchasing NocoBase commercial license and services, purchasing NocoBase commercial plugins). If the User does not agree to any term of this Agreement, or cannot accurately understand our interpretation of the relevant terms, please stop using it immediately.
6
+
7
+ This Agreement applies to any use, quotation, contract, invoice, and all software delivered by the Company. The User and the Company or NocoBase's agents can no longer sign a separate license agreement for the sale and delivery of the software.
8
+
9
+ The Company reserves the right to formulate and modify this Agreement from time to time as needed. If there are changes, the Company will announce them in the form of website announcements, without further individual notification. The changed Agreement will automatically take effect once it is announced, becoming part of this Agreement.
10
+
11
+ ==============
12
+ 1. Definitions
13
+ ==============
14
+
15
+ 1.1 "Software" refers to the NocoBase kernel and plugins placed in the same code repository as the kernel, including their source code, installation packages, images, and all their modifications, updates, and upgrades.
16
+
17
+ 1.2 "Community Edition" refers to the free version of the Software provided to the User through public channels.
18
+
19
+ 1.3 "Commercial Edition" refers to the paid version of the Software purchased by the User from the Company or its agents, downloaded through exclusive channels, and includes additional benefits. It consists of three versions: Standard Edition, Professional Edition, and Enterprise Edition.
20
+
21
+ 1.4 "Marketplace" refers to the marketplace provided by the Company for selling Software plugins and solutions.
22
+
23
+ 1.5 "Commercial Plugin" refers to the paid plugins sold in the Marketplace.
24
+
25
+ 1.6 "Upper Layer Application" refers to a specific business use case application serving internal or external customers of the User, developed based on Software and Commercial Plugins, such as ERP/CRM.
26
+
27
+ 1.7 "Customer" refers to the clients who purchase the User's Upper Layer Application.
28
+
29
+ 1.8 "Third-Party Open Source Software" refers to open source software provided with Software and Commercial Plugins. They are licensed through various published open source software licenses or copyright notices accompanying such software.
30
+
31
+ ===================================
32
+ 2. Intellectual Property Protection
33
+ ===================================
34
+
35
+ Except for Third-Party Open Source Software, the Company owns all copyrights, trademark rights, patent rights, trade secrets, and other intellectual property rights of the Software, and has registered and protected them in relevant countries and regions according to the "Paris Convention" or "TRIPS Agreement", ensuring that the intellectual property rights of the Software and Commercial Plugins are internationally recognized and protected.
36
+
37
+ =============
38
+ 3. Disclaimer
39
+ =============
40
+
41
+ 3.1 The User shall not use the Software and Commercial Plugins to engage in activities that contravene applicable laws and regulations or offend against public order or religious prohibitions. All legal liabilities and consequences arising from the User’s use shall be borne by the User.
42
+
43
+ 3.2 The Company shall not be liable for any direct, indirect, special, incidental, or consequential damages (including but not limited to loss of profits, business interruption, data loss, or business information disclosure) caused by the User's use of the Software and Commercial Plugins, even if it has been previously informed of the possibility of such damages.
44
+
45
+ ===============
46
+ 4. License Type
47
+ ===============
48
+
49
+ 4.1 This Agreement serves as the unified license agreement for NocoBase Software, applying to both the Community Edition and the Commercial Editions.
50
+
51
+ 4.2 For the Community Edition, this Agreement incorporates and references the full text of the GNU Affero General Public License v3.0 (“AGPL-3.0”, available at: https://www.gnu.org/licenses/agpl-3.0.html ). Community Edition users must comply with the AGPL-3.0 License as well as the supplementary terms set forth in this Agreement. In case of any inconsistency between AGPL-3.0 and this Agreement, the supplementary terms of this Agreement shall prevail.
52
+
53
+ 4.3 For the Commercial Edition (including Standard, Professional, and Enterprise Editions), only the Commercial License terms contained in this Agreement apply. Commercial Edition users are not subject to AGPL-3.0 obligations.
54
+
55
+ 4.4 For Commercial Plugins, only the Commercial Plugin License terms contained in this Agreement apply.
56
+
57
+ ================================================
58
+ 5. Rights and Obligations of Open Source License
59
+ ================================================
60
+
61
+ 5.1 The Software can be used for commercial purposes.
62
+
63
+ 5.2 The User can sell plugins developed for the Software in the Marketplace.
64
+
65
+ 5.3 Outside the Marketplace, changes and plugins to the Software developed by the User or third parties, and third-party applications developed based on the Software must all be open-sourced under the AGPL-3.0 license.
66
+
67
+ 5.4 It is not allowed to remove or change the brand, name, link, version number, license, and other information about NocoBase on the Software interface, except for the main LOGO in the upper left corner of the page.
68
+
69
+ 5.5 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
70
+
71
+ 5.6 It is not allowed to provide to the public any form of no-code, zero-code, or low-code platform SaaS/PaaS products using the original or modified Software.
72
+
73
+ 5.7 Comply with all requirements of the AGPL-3.0 License, including but not limited to:
74
+ (a) Any modifications, extensions, or derivative works of the Software must be released under the AGPL-3.0 License;
75
+ (b) If Upper Layer Applications are provided as a network service (including SaaS or PaaS), the complete corresponding source code must be made available to all users of the service;
76
+ (c) The Software may not be combined with other software under incompatible licenses in a manner that would violate the AGPL-3.0 License;
77
+ (d) No additional contractual restrictions may be imposed when redistributing the Software.
78
+
79
+ ===============================
80
+ 6. Rights of Commercial License
81
+ ===============================
82
+
83
+ 6.1 Obtain a permanent commercial license of the Software.
84
+
85
+ 6.2 Get software upgrades and exclusive technical support during the upgrade validity period.
86
+
87
+ 6.3 The licensed Software can be used for commercial purposes with no restrictions on the number of applications and users.
88
+
89
+ 6.4 Changes and plugins to the Software, and applications integrated with the Software do not need to be open sourced.
90
+
91
+ 6.5 Can remove or change the brand, name, link, version number, license, and other information about NocoBase on the Software interface.
92
+
93
+ 6.6 Can sell plugins developed for Software in the Marketplace.
94
+
95
+ 6.7 The User holding a Professional or Enterprise Edition License can sell Upper Layer Application to its Customers.
96
+
97
+ 6.8 Exemption from AGPL-3.0 obligations, including but not limited to:
98
+ (a) the requirement to release source code of modifications, extensions, or derivative works;
99
+ (b) the requirement to provide source code when offering the Software as a network service;
100
+ (c) restrictions on combining the Software with other software under different license terms; and
101
+ (d) limitations on adding contractual terms for redistribution.
102
+ The User remains bound by this Agreement and by its commercial license contract.
103
+
104
+ 6.9 If there are other agreements in the contract for the above rights, the contract agreement shall prevail.
105
+
106
+ ====================================
107
+ 7. Obligations of Commercial License
108
+ ====================================
109
+
110
+ 7.1 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
111
+
112
+ 7.2 It is not allowed to sell, transfer, lease, share, gift, or distribute the Commercial License.
113
+
114
+ 7.3 It is not allowed to sell, transfer, lease, share, or distribute any form of no-code, zero-code, low-code platform, or developer tools developed based on Software.
115
+
116
+ 7.4 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS/PaaS products to the public using the original or modified Software.
117
+
118
+ 7.5 It is not allowed for the User holding a Standard Edition license to sell Upper Layer Application to Customers without a Commercial license.
119
+
120
+ 7.6 It is not allowed for the User holding a Professional or Enterprise Edition license to sell Upper Layer Application to Customers without a Commercial license with access to further development and configuration.
121
+
122
+ 7.7 It is not allowed to publicly sell plugins developed for Software outside of the Marketplace.
123
+
124
+ 7.8 If there is a violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.
125
+
126
+ 7.9 If there are other agreements in the contract for the above obligations, the contract agreement shall prevail.
127
+
128
+ ======================================
129
+ 8. Rights of Commercial Plugin License
130
+ ======================================
131
+
132
+ 8.1 Obtain a permanent Commercial Plugin License for the Commercial Plugin.
133
+
134
+ 8.2 Receive plugin upgrades and exclusive technical support during the upgrade validity period.
135
+
136
+ 8.3 Can be used for commercial purposes without restrictions on the number of applications or users.
137
+
138
+ 8.4 The User holding a Professional or Enterprise Edition License can use the Commercial Plugin in Upper Layer Applications sold to its customers.
139
+
140
+ 8.5 Exemption from AGPL-3.0 obligations.
141
+
142
+ 8.6 If there are other agreements in the contract regarding the above rights, the contract agreement shall prevail.
143
+
144
+ ===========================================
145
+ 9. Obligations of Commercial Plugin License
146
+ ===========================================
147
+
148
+ 9.1 It is not allowed to remove or change any intellectual property statements about NocoBase and the plugin authors in the code.
149
+
150
+ 9.2 It is not allowed to sell, transfer, lease, share, or gift the Commercial Plugin.
151
+
152
+ 9.3 It is not allowed to use reverse engineering, decompilation, or other methods to attempt to discover the source code of Commercial Plugins without obtaining a source code license.
153
+
154
+ 9.4 It is not allowed to disclose the source code of Commercial Plugins to any third party.
155
+
156
+ 9.5 It is not allowed for the User holding a Community or Standard Edition license to use Commercial Plugins in Upper Layer Applications sold to its customers. Such Commercial Plugins are limited to internal use within the licensed company only.
157
+
158
+ 9.6 If there is any violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.
159
+
160
+ 9.7 If there are other agreements in the contract regarding the above obligations, the contract agreement shall prevail.
161
+
162
+ =============================================================
163
+ 10. Legal Jurisdiction, Interpretation, and Dispute Resolution
164
+ =============================================================
165
+
166
+ 10.1 Except for Mainland China, the interpretation, application, and all matters related to this agreement are subject to the jurisdiction of Singapore law.
167
+
168
+ 10.2 Any dispute related to this Agreement should first be resolved through friendly negotiation. If the negotiation fails to resolve the dispute, the dispute should be submitted to the International Chamber of Commerce (ICC) for arbitration. The arbitration venue should be Singapore, conducted in English.
169
+
170
+ 10.3 All terms and conditions of this Agreement shall be deemed enforceable to the maximum extent permitted by applicable law. If any term of this Agreement is deemed invalid by any applicable law, the invalidity of that term does not affect the validity of any other term of this Agreement, and it should be deemed that the invalid term has been modified as much as possible to make it valid and enforceable, or if the term cannot be modified, it should be deemed to have been deleted from this Agreement.
171
+
172
+ 10.4 The arbitration award is final, binding on both parties, and can be enforced in any court with jurisdiction.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # JSON query node for workflow of NocoBase
package/client.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './dist/client';
2
+ export { default } from './dist/client';
package/client.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/client/index.js');
@@ -0,0 +1,23 @@
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
+ * This file is part of the NocoBase (R) project.
11
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
12
+ * Authors: NocoBase Team.
13
+ *
14
+ * This program is offered under a commercial license.
15
+ * For more information, see <https://www.nocobase.com/agreement>
16
+ */
17
+ import { Plugin } from '@nocobase/client';
18
+ export declare class PluginWorkflowJSONQueryClient extends Plugin {
19
+ constructor(options: any, app: any);
20
+ beforeLoad(): Promise<void>;
21
+ load(): Promise<void>;
22
+ }
23
+ export default PluginWorkflowJSONQueryClient;
@@ -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("react"),require("@formily/antd-v5"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/utils/client"),require("@nocobase/plugin-workflow/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-json-query",["react","@formily/antd-v5","@nocobase/client","@ant-design/icons","@nocobase/utils/client","@nocobase/plugin-workflow/client"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-json-query"]=t(require("react"),require("@formily/antd-v5"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/utils/client"),require("@nocobase/plugin-workflow/client")):e["@nocobase/plugin-workflow-json-query"]=t(e.react,e["@formily/antd-v5"],e["@nocobase/client"],e["@ant-design/icons"],e["@nocobase/utils/client"],e["@nocobase/plugin-workflow/client"])}(self,function(e,t,n,r,o,i){return function(){"use strict";var a={482:function(e){e.exports=r},632:function(e){e.exports=t},772:function(e){e.exports=n},433:function(e){e.exports=i},584:function(e){e.exports=o},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}()});
@@ -0,0 +1,167 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ import { Instruction, WorkflowVariableInput, WorkflowVariableTextArea } from '@nocobase/plugin-workflow/client';
11
+ declare function getEngineOptions(): unknown;
12
+ declare function renderEngineReference(key: string): React.JSX.Element;
13
+ export default class extends Instruction {
14
+ title: string;
15
+ type: string;
16
+ group: string;
17
+ description: string;
18
+ icon: React.JSX.Element;
19
+ fieldset: {
20
+ engine: {
21
+ type: string;
22
+ title: string;
23
+ 'x-decorator': string;
24
+ 'x-component': string;
25
+ enum: string;
26
+ required: boolean;
27
+ default: string;
28
+ };
29
+ source: {
30
+ type: string;
31
+ title: string;
32
+ 'x-decorator': string;
33
+ 'x-component': string;
34
+ 'x-component-props': {
35
+ changeOnSelect: boolean;
36
+ };
37
+ required: boolean;
38
+ };
39
+ expression: {
40
+ type: string;
41
+ title: string;
42
+ 'x-decorator': string;
43
+ 'x-component': string;
44
+ required: boolean;
45
+ 'x-reactions': {
46
+ dependencies: string[];
47
+ fulfill: {
48
+ state: {
49
+ visible: string;
50
+ };
51
+ schema: {
52
+ description: string;
53
+ };
54
+ };
55
+ };
56
+ };
57
+ model: {
58
+ type: string;
59
+ title: string;
60
+ description: string;
61
+ 'x-decorator': string;
62
+ 'x-component': string;
63
+ items: {
64
+ type: string;
65
+ properties: {
66
+ path: {
67
+ type: string;
68
+ 'x-component': string;
69
+ 'x-component-props': {
70
+ title: string;
71
+ };
72
+ properties: {
73
+ path: {
74
+ type: string;
75
+ name: string;
76
+ required: boolean;
77
+ 'x-decorator': string;
78
+ 'x-component': string;
79
+ };
80
+ };
81
+ };
82
+ alias: {
83
+ type: string;
84
+ 'x-component': string;
85
+ 'x-component-props': {
86
+ title: string;
87
+ };
88
+ properties: {
89
+ alias: {
90
+ type: string;
91
+ name: string;
92
+ 'x-decorator': string;
93
+ 'x-component': string;
94
+ };
95
+ };
96
+ };
97
+ label: {
98
+ type: string;
99
+ 'x-component': string;
100
+ 'x-component-props': {
101
+ title: string;
102
+ };
103
+ properties: {
104
+ label: {
105
+ type: string;
106
+ name: string;
107
+ required: boolean;
108
+ 'x-decorator': string;
109
+ 'x-component': string;
110
+ };
111
+ };
112
+ };
113
+ operations: {
114
+ type: string;
115
+ 'x-component': string;
116
+ 'x-component-props': {
117
+ dataIndex: string;
118
+ fixed: string;
119
+ className: string;
120
+ };
121
+ properties: {
122
+ remove: {
123
+ type: string;
124
+ 'x-component': string;
125
+ };
126
+ };
127
+ };
128
+ };
129
+ };
130
+ properties: {
131
+ add: {
132
+ type: string;
133
+ 'x-component': string;
134
+ 'x-component-props': {
135
+ defaultValue: {};
136
+ };
137
+ title: string;
138
+ };
139
+ };
140
+ };
141
+ };
142
+ scope: {
143
+ renderEngineReference: typeof renderEngineReference;
144
+ getEngineOptions: typeof getEngineOptions;
145
+ };
146
+ components: {
147
+ ArrayTable: import("@formily/reactive-react").ReactFC<import("antd").TableProps<any>> & import("@formily/antd-v5").ArrayBaseMixins & {
148
+ Column: import("@formily/reactive-react").ReactFC<import("antd").TableColumnProps<any>>;
149
+ Addition: import("@formily/reactive-react").ReactFC<import("@formily/antd-v5").IArrayBaseAdditionProps>;
150
+ };
151
+ WorkflowVariableInput: typeof WorkflowVariableInput;
152
+ WorkflowVariableTextArea: typeof WorkflowVariableTextArea;
153
+ };
154
+ useVariables({ key, title, config }: {
155
+ key: any;
156
+ title: any;
157
+ config: any;
158
+ }, { types, fieldNames }: {
159
+ types: any;
160
+ fieldNames?: import("@nocobase/client").FieldNames;
161
+ }): {
162
+ [x: string]: any;
163
+ children: any;
164
+ };
165
+ testable: boolean;
166
+ }
167
+ export {};
@@ -0,0 +1,19 @@
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
+ "@nocobase/client": "1.9.0-beta.17",
12
+ "@nocobase/plugin-workflow": "1.9.0-beta.17",
13
+ "@ant-design/icons": "5.6.1",
14
+ "@formily/antd-v5": "1.2.3",
15
+ "@nocobase/utils": "1.9.0-beta.17",
16
+ "react": "18.2.0",
17
+ "lodash": "4.17.21",
18
+ "@nocobase/server": "1.9.0-beta.17"
19
+ };
@@ -0,0 +1,17 @@
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
+ * This file is part of the NocoBase (R) project.
11
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
12
+ * Authors: NocoBase Team.
13
+ *
14
+ * This program is offered under a commercial license.
15
+ * For more information, see <https://www.nocobase.com/agreement>
16
+ */
17
+ export { default } from './server';
package/dist/index.js ADDED
@@ -0,0 +1,42 @@
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var src_exports = {};
38
+ __export(src_exports, {
39
+ default: () => import_server.default
40
+ });
41
+ module.exports = __toCommonJS(src_exports);
42
+ var import_server = __toESM(require("./server"));
@@ -0,0 +1,13 @@
1
+ {
2
+ "JSON calculation": "JSON calculation",
3
+ "Transforming or calculating values from complex JSON data.": "Transforming or calculating values from complex JSON data.",
4
+ "Query engine": "Query engine",
5
+ "Data source": "Data source",
6
+ "Query expression": "Query expression",
7
+ "Properties mapping": "Properties mapping",
8
+ "If the type of query result is object or array of object, could map the properties which to be accessed in subsequent nodes.": "If the type of query result is object or array of object, could map the properties which to be accessed in subsequent nodes.",
9
+ "Property key": "Property key",
10
+ "Alias": "Alias",
11
+ "Display label": "Display label",
12
+ "Add property": "Add property"
13
+ }
@@ -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
+ export declare const NAMESPACE = "@nocobase/plugin-workflow-json-query";
10
+ export declare function lang(key: string, options?: {}): string;
@@ -0,0 +1,42 @@
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
+ });
32
+ module.exports = __toCommonJS(locale_exports);
33
+ var import_client = require("@nocobase/client");
34
+ const NAMESPACE = "@nocobase/plugin-workflow-json-query";
35
+ function lang(key, options = {}) {
36
+ return import_client.i18n.t(key, { ...options, ns: NAMESPACE });
37
+ }
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ NAMESPACE,
41
+ lang
42
+ });
@@ -0,0 +1,14 @@
1
+ {
2
+ "JSON calculation": "JSON 计算",
3
+ "Transforming or calculating values from complex JSON data.": "从复杂的 JSON 对象中转换或计算值。",
4
+ "Query engine": "解析引擎",
5
+ "Data source": "数据来源",
6
+ "Query expression": "查询表达式",
7
+ "Properties mapping": "属性映射",
8
+ "If the type of query result is object or array of object, could map the properties which to be accessed in subsequent nodes.":
9
+ "如果查询结果的类型是对象或对象数组,则可以映射后续节点中要访问的属性。",
10
+ "Property key": "属性键名",
11
+ "Alias": "别名",
12
+ "Display label": "展示名称",
13
+ "Add property": "添加属性"
14
+ }
@@ -0,0 +1,13 @@
1
+ Copyright 2014 James Saryerwinnie
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.