@nocobase/plugin-block-workbench 1.2.0-alpha
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.txt +124 -0
- package/README.md +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/ModalActionSchemaInitializerItem.d.ts +10 -0
- package/dist/client/WorkbenchAction.d.ts +10 -0
- package/dist/client/WorkbenchBlock.d.ts +9 -0
- package/dist/client/WorkbenchLinkActionSchemaInitializerItem.d.ts +12 -0
- package/dist/client/WorkbenchScanActionSchemaInitializerItem.d.ts +12 -0
- package/dist/client/blockSchema.d.ts +10 -0
- package/dist/client/index.d.ts +13 -0
- package/dist/client/index.js +17 -0
- package/dist/client/workbenchBlockInitializerItem.d.ts +10 -0
- package/dist/client/workbenchBlockSettings.d.ts +10 -0
- package/dist/client/workbenchConfigureActions.d.ts +10 -0
- package/dist/externalVersion.js +19 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +48 -0
- package/dist/locale/zh-CN.json +3 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +42 -0
- package/dist/server/plugin.d.ts +19 -0
- package/dist/server/plugin.js +54 -0
- package/package.json +11 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
Updated Date: May 29, 2024
|
|
2
|
+
|
|
3
|
+
NocoBase License Agreement
|
|
4
|
+
|
|
5
|
+
NocoBase Co., Ltd. ("The Company") https://www.nocobase.com/ issues this License Agreement ("Agreement") to you. You, as an individual or a company ("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
|
+
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.
|
|
15
|
+
|
|
16
|
+
1.2 "Plugin Market" refers to the market provided by the Company for selling Software plugins and solutions.
|
|
17
|
+
|
|
18
|
+
1.3 "Commercial Plugin" refers to the paid plugins provided by the Plugin Market.
|
|
19
|
+
|
|
20
|
+
1.4 "Root Version" refers to the major version number before the first point in the version number. For example, from 1.0 to 1.x are all the same Root Version 1.
|
|
21
|
+
|
|
22
|
+
1.5 "Plugin Package" is the unit for batch licensing Commercial Plugins. P5, P10, and P20 Plugin Packages include installation packages for 5, 10, and 20 Commercial Plugins respectively. P5+, P10+, P20+ provide the source code of the Plugins in addition to the installation packages.
|
|
23
|
+
|
|
24
|
+
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.
|
|
25
|
+
|
|
26
|
+
1.7 "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.
|
|
27
|
+
|
|
28
|
+
===================================
|
|
29
|
+
2. Intellectual Property Protection
|
|
30
|
+
===================================
|
|
31
|
+
|
|
32
|
+
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 Commercial Plugins, 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.
|
|
33
|
+
|
|
34
|
+
=============
|
|
35
|
+
3. Disclaimer
|
|
36
|
+
=============
|
|
37
|
+
|
|
38
|
+
3.1 Users shall not use the Software and Commercial Plugins to engage in activities that violate local laws and regulations, religious beliefs. All legal responsibilities and legal consequences arising from the use of Software and Commercial Plugins shall be borne by the User.
|
|
39
|
+
|
|
40
|
+
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.
|
|
41
|
+
|
|
42
|
+
===============
|
|
43
|
+
4. License Type
|
|
44
|
+
===============
|
|
45
|
+
|
|
46
|
+
4.1 The Software uses a dual license type of AGPL-3.0 Open Source License https://www.gnu.org/licenses/agpl-3..en.htm and Commercial License.
|
|
47
|
+
|
|
48
|
+
4.2 Commercial Plugins use Commercial License.
|
|
49
|
+
|
|
50
|
+
================================================
|
|
51
|
+
5. Rights and Obligations of Open Source License
|
|
52
|
+
================================================
|
|
53
|
+
|
|
54
|
+
5.1 The Software can be used for commercial purposes, such as developing applications for internal use within a company or for clients.
|
|
55
|
+
|
|
56
|
+
5.2 User can sell plugins developed for the Software in the Plugin Market.
|
|
57
|
+
|
|
58
|
+
5.3 Outside the Plugin Market, changes and plugins to the Software developed by User or third parties, and third-party software integrated with the Software must all be open sourced under the AGPL-3.0 license.
|
|
59
|
+
|
|
60
|
+
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.
|
|
61
|
+
|
|
62
|
+
5.5 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
|
|
63
|
+
|
|
64
|
+
5.6 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS products to the public using the original or modified Software.
|
|
65
|
+
|
|
66
|
+
5.7 Comply with all requirements of the AGPL-3.0 agreement.
|
|
67
|
+
|
|
68
|
+
===============================
|
|
69
|
+
6. Rights of Commercial License
|
|
70
|
+
===============================
|
|
71
|
+
|
|
72
|
+
6.1 Obtain a permanent commercial license for a Root Version of the Software or Commercial Plugin.
|
|
73
|
+
|
|
74
|
+
6.2 Get 6 months of exclusive technical support.
|
|
75
|
+
|
|
76
|
+
6.3 Upgrade to the next Root Version at 50% of the contract price.
|
|
77
|
+
|
|
78
|
+
6.4 The licensed Software and Commercial Plugins can be used for commercial purposes, such as developing applications for internal use within a company or for clients, with no restrictions on the number of applications and users.
|
|
79
|
+
|
|
80
|
+
6.5 Changes and plugins to the Software, and applications integrated with the Software do not need to be open sourced.
|
|
81
|
+
|
|
82
|
+
6.6 Can remove or change the brand, name, link, version number, license, and other information about NocoBase on the Software interface.
|
|
83
|
+
|
|
84
|
+
6.7 Can sell plugins developed for Software in the Plugin Market.
|
|
85
|
+
|
|
86
|
+
6.8 Can sell or provide Upper Layer Applications developed based on Software in the form of SaaS to the public.
|
|
87
|
+
|
|
88
|
+
6.9 Not restricted by the AGPL-3.0 agreement.
|
|
89
|
+
|
|
90
|
+
6.10 If there are other agreements in the contract for the above rights, the contract agreement shall prevail.
|
|
91
|
+
|
|
92
|
+
====================================
|
|
93
|
+
7. Obligations of Commercial License
|
|
94
|
+
====================================
|
|
95
|
+
|
|
96
|
+
7.1 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
|
|
97
|
+
|
|
98
|
+
7.2 It is not allowed to sell, transfer, lease, share, or give away the Commercial License.
|
|
99
|
+
|
|
100
|
+
7.3 It is not allowed to sell, transfer, lease, share, or give away any form of no-code, zero-code, low-code platform, or developer tools developed based on Software, except for bulk licenses obtained through an Enterprise License, with the terms of bulk licensing separately agreed upon in the contract.
|
|
101
|
+
|
|
102
|
+
7.4 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS products to the public using the original or modified Software, except for bulk licenses obtained through an Enterprise License, with the terms of bulk licensing separately agreed upon in the contract.
|
|
103
|
+
|
|
104
|
+
7.5 It is not allowed to use reverse engineering, decompilation, and other means to try to discover the source code of Commercial Plugins that have not obtained source code license.
|
|
105
|
+
|
|
106
|
+
7.6 It is not allowed to disclose the source code of Commercial Plugins to any third party.
|
|
107
|
+
|
|
108
|
+
7.7 It is not allowed to publicly sell plugins developed for Software outside of the Plugin Market.
|
|
109
|
+
|
|
110
|
+
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.
|
|
111
|
+
|
|
112
|
+
7.9 If there are other agreements in the contract for the above obligations, the contract agreement shall prevail.
|
|
113
|
+
|
|
114
|
+
=============================================================
|
|
115
|
+
8. Legal Jurisdiction, Interpretation, and Dispute Resolution
|
|
116
|
+
=============================================================
|
|
117
|
+
|
|
118
|
+
8.1 Except for Mainland China, the interpretation, application, and all matters related to this agreement are subject to the jurisdiction of Singapore law.
|
|
119
|
+
|
|
120
|
+
8.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.
|
|
121
|
+
|
|
122
|
+
8.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.
|
|
123
|
+
|
|
124
|
+
8.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
|
+
# @nocobase/plugin-block-workbench
|
package/client.d.ts
ADDED
package/client.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/client/index.js');
|
|
@@ -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
|
+
import React from 'react';
|
|
10
|
+
export declare function ModalActionSchemaInitializerItem(props: any): React.JSX.Element;
|
|
@@ -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
|
+
import React from 'react';
|
|
10
|
+
export declare const WorkbenchAction: React.FunctionComponent<any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export declare const WorkbenchBlock: any;
|
|
@@ -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
|
+
import { SchemaSettings } from '@nocobase/client';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export declare const workbenchActionSettingsLink: SchemaSettings<{}>;
|
|
12
|
+
export declare function WorkbenchLinkActionSchemaInitializerItem(props: any): React.JSX.Element;
|
|
@@ -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
|
+
import { SchemaSettings } from '@nocobase/client';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export declare const workbenchActionSettingsScanQrCode: SchemaSettings<{}>;
|
|
12
|
+
export declare function WorkbenchScanActionSchemaInitializerItem(props: any): React.JSX.Element;
|
|
@@ -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
|
+
import { ISchema } from '@nocobase/client';
|
|
10
|
+
export declare const blockSchema: ISchema;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from '@nocobase/client';
|
|
10
|
+
export declare class PluginBlockWorkbenchClient extends Plugin {
|
|
11
|
+
load(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export default PluginBlockWorkbenchClient;
|
|
@@ -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
|
+
(function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("@formily/react"),require("antd"),require("antd-style"),require("react-i18next"),require("@nocobase/utils/client"),require("react")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","@formily/react","antd","antd-style","react-i18next","@nocobase/utils/client","react"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n["@nocobase/plugin-block-workbench"]={},n["@nocobase/client"],n.jsxRuntime,n["@formily/react"],n.antd,n["antd-style"],n["react-i18next"],n["@nocobase/utils"],n.react))})(this,function(n,e,o,i,k,C,x,p,a){"use strict";var G=Object.defineProperty,H=Object.defineProperties;var J=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var F=(n,e,o)=>e in n?G(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,b=(n,e)=>{for(var o in e||(e={}))M.call(e,o)&&F(n,o,e[o]);if(g)for(var o of g(e))q.call(e,o)&&F(n,o,e[o]);return n},S=(n,e)=>H(n,J(e));var y=(n,e)=>{var o={};for(var i in n)M.call(n,i)&&e.indexOf(i)<0&&(o[i]=n[i]);if(n!=null&&g)for(var i of g(n))e.indexOf(i)<0&&q.call(n,i)&&(o[i]=n[i]);return o};var I=(n,e,o)=>new Promise((i,k)=>{var C=a=>{try{p(o.next(a))}catch(u){k(u)}},x=a=>{try{p(o.throw(a))}catch(u){k(u)}},p=a=>a.done?i(a.value):Promise.resolve(a.value).then(C,x);p((o=o.apply(n,e)).next())});const u=C.createStyles(({token:t,css:c})=>({action:c`
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
border: 0;
|
|
13
|
+
height: auto;
|
|
14
|
+
box-shadow: none;
|
|
15
|
+
`,title:c`
|
|
16
|
+
margin-top: ${t.marginSM}px;
|
|
17
|
+
`}));function W(){var m,d;const t=i.useFieldSchema(),c=(m=t["x-component-props"])==null?void 0:m.icon,s=(d=t["x-component-props"])==null?void 0:d.iconColor,{styles:r,cx:l}=u();return o.jsxs("div",{children:[o.jsx(k.Avatar,{style:{backgroundColor:s},size:64,icon:o.jsx(e.Icon,{type:c})}),o.jsx("div",{className:l(r.title),children:t.title})]})}const T=e.withDynamicSchemaProps(t=>{const m=t,{className:c}=m,s=y(m,["className"]),{styles:r,cx:l}=u();return o.jsx(e.Action,S(b({className:l(c,r.action)},s),{icon:null,title:o.jsx(W,{})}))}),L=i.observer(()=>{const t=i.useFieldSchema(),{render:c}=e.useSchemaInitializerRender(t["x-initializer"]);return c()},{displayName:"WorkbenchConfigureActionsButton"}),N=()=>{const t=i.useFieldSchema(),{designable:c}=e.useDesignable();return o.jsx("div",{style:{marginBottom:c?"1rem":0},children:o.jsx(e.DndContext,{children:o.jsx(k.Space,{wrap:!0,children:t.mapProperties((s,r)=>o.jsx(i.RecursionField,{name:r,schema:s}))})})})},A=e.withDynamicSchemaProps(t=>o.jsx("div",{children:o.jsx(e.SchemaComponentOptions,{components:{WorkbenchAction:T},children:t.children})}),{displayName:"WorkbenchBlock"});A.ActionBar=()=>o.jsxs(o.Fragment,{children:[o.jsx(N,{}),o.jsx(L,{})]});function j(t){const B=t,{modalSchema:c={}}=B,s=y(B,["modalSchema"]),v=c,{properties:r}=v,l=y(v,["properties"]),[m,d]=a.useState(!1),{setVisible:$}=e.useSchemaInitializer(),K=a.useMemo(()=>S(b({name:p.uid(),"x-component":"Action.Modal","x-component-props":{width:"520px"},type:"void","x-decorator":"FormV2","x-decorator-props":{}},l),{properties:S(b({},r),{footer1:{"x-component":"Action.Modal.Footer",type:"void",properties:{close:{title:"Cancel","x-component":"Action","x-component-props":{type:"default"},"x-use-component-props":()=>({onClick(){var h;d(!1),(h=t==null?void 0:t.onCancel)==null||h.call(t)}})},submit:{title:"OK","x-component":"Action","x-component-props":{type:"primary"},"x-use-component-props":()=>{const h=i.useForm();return{onClick(){return I(this,null,function*(){var P;yield h.submit(),d(!1),(P=t==null?void 0:t.onSubmit)==null||P.call(t,h.values)})}}}}}}})}),[]);return o.jsxs(o.Fragment,{children:[o.jsx(e.SchemaInitializerItem,S(b({},s),{onClick:h=>{var z;$(!1),d(!0),(z=t==null?void 0:t.onClick)==null||z.call(t,h)}})),o.jsx(e.ActionContextProvider,{value:{visible:m,setVisible:d},children:o.jsx(e.SchemaComponent,{components:{Action:e.Action},schema:K})})]})}const D=new e.SchemaSettings({name:"workbench:actionSettings:link",items:[{name:"editButton",Component:e.ButtonEditor,useComponentProps(){return{hasIconColor:!0}}},{name:"editLink",Component:e.SchemaSettingsActionLinkItem},{sort:800,name:"d1",type:"divider"},{sort:900,type:"remove",name:"remove"}]});function O(t){const c=e.useSchemaInitializerItem(),{insert:s}=e.useSchemaInitializer(),{t:r}=x.useTranslation();return o.jsx(j,{title:c.title,modalSchema:{title:r("Add link"),properties:{title:{title:r("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:r("Icon"),required:!0,"x-component":"IconPicker","x-decorator":"FormItem"},iconColor:{title:r("Color"),required:!0,default:"#1677FF","x-component":"ColorPicker","x-decorator":"FormItem"}}},onSubmit:l=>{s({type:"void",title:l.title,"x-action":"customize:link","x-toolbar":"ActionSchemaToolbar","x-settings":"workbench:actionSettings:link","x-component":"WorkbenchAction","x-use-component-props":"useLinkActionProps","x-component-props":{icon:l.icon,iconColor:l.iconColor}})}})}const V={type:"void","x-decorator":"CardItem","x-settings":"blockSettings:workbench","x-schema-toolbar":"BlockSchemaToolbar","x-component":"WorkbenchBlock",properties:{actions:{"x-component":"WorkbenchBlock.ActionBar","x-initializer":"workbench:configureActions"}}},f={type:"item",name:"workbenchBlock",icon:"FileImageOutlined",useComponentProps(){const{t}=x.useTranslation("@nocobase/plugin-block-workbench"),{insert:c}=e.useSchemaInitializer();return{title:t("Workbench"),onClick:()=>{c(V)}}}},E=new e.SchemaSettings({name:"blockSettings:workbench",items:[{type:"remove",name:"remove"}]}),_=new e.SchemaInitializer({name:"workbench:configureActions",title:'{{t("Configure actions")}}',insertPosition:"beforeEnd",items:[{name:"link",title:'{{t("Link")}}',Component:O}]});class w extends e.Plugin{load(){return I(this,null,function*(){this.app.addComponents({WorkbenchBlock:A}),this.app.schemaSettingsManager.add(E),this.app.schemaInitializerManager.add(_),this.app.schemaInitializerManager.addItem("page:addBlock",`otherBlocks.${f.name}`,f),this.app.schemaInitializerManager.addItem("mobilePage:addBlock",`otherBlocks.${f.name}`,f),this.app.schemaSettingsManager.add(D)})}}n.PluginBlockWorkbenchClient=w,n.default=w,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -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
|
+
import { SchemaInitializerItemType } from '@nocobase/client';
|
|
10
|
+
export declare const workbenchBlockInitializerItem: SchemaInitializerItemType;
|
|
@@ -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
|
+
import { SchemaSettings } from '@nocobase/client';
|
|
10
|
+
export declare const workbenchBlockSettings: SchemaSettings<{}>;
|
|
@@ -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
|
+
import { SchemaInitializer } from '@nocobase/client';
|
|
10
|
+
export declare const workbenchConfigureActions: SchemaInitializer<import("antd").ButtonProps, {}>;
|
|
@@ -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
|
+
"@formily/react": "2.3.0",
|
|
12
|
+
"@nocobase/client": "1.2.0-alpha",
|
|
13
|
+
"@nocobase/utils": "1.2.0-alpha",
|
|
14
|
+
"react": "18.2.0",
|
|
15
|
+
"antd": "5.12.8",
|
|
16
|
+
"antd-style": "3.4.5",
|
|
17
|
+
"react-i18next": "11.18.6",
|
|
18
|
+
"@nocobase/server": "1.2.0-alpha"
|
|
19
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -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 * from './server';
|
|
10
|
+
export { default } from './server';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
...require("./server")
|
|
48
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export { default } from './plugin';
|
|
@@ -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 server_exports = {};
|
|
38
|
+
__export(server_exports, {
|
|
39
|
+
default: () => import_plugin.default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(server_exports);
|
|
42
|
+
var import_plugin = __toESM(require("./plugin"));
|
|
@@ -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
|
+
import { Plugin } from '@nocobase/server';
|
|
10
|
+
export declare class PluginBlockWorkbenchServer extends Plugin {
|
|
11
|
+
afterAdd(): Promise<void>;
|
|
12
|
+
beforeLoad(): Promise<void>;
|
|
13
|
+
load(): Promise<void>;
|
|
14
|
+
install(): Promise<void>;
|
|
15
|
+
afterEnable(): Promise<void>;
|
|
16
|
+
afterDisable(): Promise<void>;
|
|
17
|
+
remove(): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export default PluginBlockWorkbenchServer;
|
|
@@ -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 plugin_exports = {};
|
|
28
|
+
__export(plugin_exports, {
|
|
29
|
+
PluginBlockWorkbenchServer: () => PluginBlockWorkbenchServer,
|
|
30
|
+
default: () => plugin_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(plugin_exports);
|
|
33
|
+
var import_server = require("@nocobase/server");
|
|
34
|
+
class PluginBlockWorkbenchServer extends import_server.Plugin {
|
|
35
|
+
async afterAdd() {
|
|
36
|
+
}
|
|
37
|
+
async beforeLoad() {
|
|
38
|
+
}
|
|
39
|
+
async load() {
|
|
40
|
+
}
|
|
41
|
+
async install() {
|
|
42
|
+
}
|
|
43
|
+
async afterEnable() {
|
|
44
|
+
}
|
|
45
|
+
async afterDisable() {
|
|
46
|
+
}
|
|
47
|
+
async remove() {
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
var plugin_default = PluginBlockWorkbenchServer;
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
PluginBlockWorkbenchServer
|
|
54
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nocobase/plugin-block-workbench",
|
|
3
|
+
"version": "1.2.0-alpha",
|
|
4
|
+
"main": "dist/server/index.js",
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@nocobase/client": "1.x",
|
|
7
|
+
"@nocobase/server": "1.x",
|
|
8
|
+
"@nocobase/test": "1.x"
|
|
9
|
+
},
|
|
10
|
+
"gitHead": "c7dc1f277ef3722df0ec8d5532bcb66322c0fae2"
|
|
11
|
+
}
|
package/server.d.ts
ADDED
package/server.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/server/index.js');
|