@nocobase/plugin-theme-editor 1.9.0-beta.8 → 2.0.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.
- package/LICENSE.txt +31 -20
- package/dist/client/1a8ca1e21b09091e.js +10 -0
- package/dist/client/4acfe66b1504e9e2.js +10 -0
- package/dist/client/{f54828f43cde7d12.js → 56efc5f384c11f3a.js} +1 -1
- package/dist/client/{b00409d86c095c84.js → 717f252ea7b0f951.js} +1 -1
- package/dist/client/e285e1915ec4e08b.js +44 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +5 -5
- package/dist/server/builtinThemes.js +3 -1
- package/package.json +8 -8
- package/dist/client/25b861dac0654ce8.js +0 -44
- package/dist/client/c82595eedf47675d.js +0 -10
- package/dist/client/df1f6dbeeffce444.js +0 -10
package/LICENSE.txt
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
Updated Date:
|
|
1
|
+
Updated Date: October 2, 2025
|
|
2
2
|
|
|
3
3
|
NocoBase License Agreement
|
|
4
4
|
|
|
5
|
-
NOCOBASE PTE. LTD.,a Singaporean Exempt Private Company Limited by Shares with its principal place of business located at #03-01
|
|
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
6
|
|
|
7
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
8
|
|
|
@@ -38,7 +38,7 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
|
|
|
38
38
|
3. Disclaimer
|
|
39
39
|
=============
|
|
40
40
|
|
|
41
|
-
3.1 The User shall not use the Software and Commercial Plugins to engage in activities that
|
|
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
42
|
|
|
43
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
44
|
|
|
@@ -46,13 +46,13 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
|
|
|
46
46
|
4. License Type
|
|
47
47
|
===============
|
|
48
48
|
|
|
49
|
-
4.1
|
|
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
50
|
|
|
51
|
-
4.2
|
|
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
52
|
|
|
53
|
-
4.3
|
|
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
54
|
|
|
55
|
-
4.4 Commercial Plugins
|
|
55
|
+
4.4 For Commercial Plugins, only the Commercial Plugin License terms contained in this Agreement apply.
|
|
56
56
|
|
|
57
57
|
================================================
|
|
58
58
|
5. Rights and Obligations of Open Source License
|
|
@@ -68,9 +68,13 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
|
|
|
68
68
|
|
|
69
69
|
5.5 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
|
|
70
70
|
|
|
71
|
-
5.6 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS products
|
|
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
72
|
|
|
73
|
-
5.7 Comply with all requirements of the AGPL-3.0
|
|
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.
|
|
74
78
|
|
|
75
79
|
===============================
|
|
76
80
|
6. Rights of Commercial License
|
|
@@ -88,9 +92,14 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
|
|
|
88
92
|
|
|
89
93
|
6.6 Can sell plugins developed for Software in the Marketplace.
|
|
90
94
|
|
|
91
|
-
6.7 The User
|
|
95
|
+
6.7 The User holding a Professional or Enterprise Edition License can sell Upper Layer Application to its Customers.
|
|
92
96
|
|
|
93
|
-
6.8
|
|
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.
|
|
94
103
|
|
|
95
104
|
6.9 If there are other agreements in the contract for the above rights, the contract agreement shall prevail.
|
|
96
105
|
|
|
@@ -100,15 +109,15 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
|
|
|
100
109
|
|
|
101
110
|
7.1 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
|
|
102
111
|
|
|
103
|
-
7.2 It is not allowed to sell, transfer, lease, share, or distribute the Commercial License.
|
|
112
|
+
7.2 It is not allowed to sell, transfer, lease, share, gift, or distribute the Commercial License.
|
|
104
113
|
|
|
105
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.
|
|
106
115
|
|
|
107
|
-
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.
|
|
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.
|
|
108
117
|
|
|
109
|
-
7.5 It is not allowed for the User
|
|
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.
|
|
110
119
|
|
|
111
|
-
7.6 It is not allowed for the User
|
|
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.
|
|
112
121
|
|
|
113
122
|
7.7 It is not allowed to publicly sell plugins developed for Software outside of the Marketplace.
|
|
114
123
|
|
|
@@ -122,13 +131,13 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
|
|
|
122
131
|
|
|
123
132
|
8.1 Obtain a permanent Commercial Plugin License for the Commercial Plugin.
|
|
124
133
|
|
|
125
|
-
8.2
|
|
134
|
+
8.2 Receive plugin upgrades and exclusive technical support during the upgrade validity period.
|
|
126
135
|
|
|
127
136
|
8.3 Can be used for commercial purposes without restrictions on the number of applications or users.
|
|
128
137
|
|
|
129
|
-
8.4 The User
|
|
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.
|
|
130
139
|
|
|
131
|
-
8.5
|
|
140
|
+
8.5 Exemption from AGPL-3.0 obligations.
|
|
132
141
|
|
|
133
142
|
8.6 If there are other agreements in the contract regarding the above rights, the contract agreement shall prevail.
|
|
134
143
|
|
|
@@ -144,9 +153,11 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
|
|
|
144
153
|
|
|
145
154
|
9.4 It is not allowed to disclose the source code of Commercial Plugins to any third party.
|
|
146
155
|
|
|
147
|
-
9.5
|
|
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.
|
|
148
157
|
|
|
149
|
-
9.6 If there
|
|
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.
|
|
150
161
|
|
|
151
162
|
=============================================================
|
|
152
163
|
10. Legal Jurisdiction, Interpretation, and Dispute Resolution
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_theme_editor=self.webpackChunk_nocobase_plugin_theme_editor||[]).push([["39"],{8524:function(e,t,n){n.r(t),n.d(t,{default:function(){return O}});var r=n(3772),l=n(7584),a=n(2721),o=n(8156),i=n.n(o),u=n(482),s=n(6424),c=n(4936),d=n(8551),m=n(8290),f=n(3546);function p(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 h(e,t,n,r,l,a,o){try{var i=e[a](o),u=i.value}catch(e){n(e);return}i.done?t(u):Promise.resolve(u).then(r,l)}function y(e){return function(){var t=this,n=arguments;return new Promise(function(r,l){var a=e.apply(t,n);function o(e){h(a,r,l,o,i,"next",e)}function i(e){h(a,r,l,o,i,"throw",e)}o(void 0)})}}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function g(e,t){var n,r,l,a,o={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){var u=[a,i];if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(l=2&u[0]?r.return:u[0]?r.throw||((l=r.return)&&l.call(r),0):r.next)&&!(l=l.call(r,u[1])).done)return l;switch(r=0,l&&(u=[2&u[0],l.value]),u[0]){case 0:case 1:l=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(l=(l=o.trys).length>0&&l[l.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!l||u[1]>l[0]&&u[1]<l[3])){o.label=u[1];break}if(6===u[0]&&o.label<l[1]){o.label=l[1],l=u;break}if(l&&o.label<l[2]){o.label=l[2],o.ops.push(u);break}l[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=l=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var v=function(e){var t,n,l=e.theme,o=(0,r.useToken)().token;return i().createElement(a.ConfigProvider,{theme:(t=b({},l),n=n={inherit:!1},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)},i().createElement("div",{style:{display:"flex",justifyContent:"space-between",pointerEvents:"none",width:"100%",height:129,borderRadius:o.borderRadiusLG,overflow:"hidden"}},i().createElement(a.Space,{style:{transform:"scale(0.7) translate(0, 0)",transformOrigin:"0 0"},size:0,align:"start"},i().createElement(s.sq,null))))},C=function(e){var t,n,s,h,C,w,k,E,O,T,S=(0,r.useGlobalTheme)(),j=S.theme,P=S.setTheme,x=S.setCurrentSettingTheme,A=S.setCurrentEditingTheme,D=S.getCurrentEditingTheme,I=(0,f.useThemeEditorContext)().setOpen,_=(0,r.useCurrentUserContext)(),z=e.item,q=e.style,G=void 0===q?{}:q,U=e.onChange,L=(0,r.useAPIClient)(),M=(0,c.Y)().updateUserThemeSettings,R=a.App.useApp().modal,N=(t=i().useState(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,l=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=l){var a=[],o=!0,i=!1;try{for(l=l.call(e);!(o=(n=l.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){i=!0,r=e}finally{try{o||null==l.return||l.return()}finally{if(i)throw r}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return p(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 p(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.")}()),B=N[0],Y=N[1],$=(0,m.useThemeId)(),H=$.currentThemeId,F=$.defaultThemeId,J=(0,d.$)().t,K=(0,r.useToken)().token,Q=z.id===F,V=(0,o.useCallback)(function(){Q||R.confirm({title:J("Delete theme"),content:J("Deletion is unrecoverable. Confirm deletion?"),onOk:y(function(){var e,t,n;return g(this,function(r){switch(r.label){case 0:return[4,L.request({url:"themeConfig:destroy/".concat(z.id)})];case 1:return r.sent(),z.id===(null==_||null==(n=_.data)||null==(t=n.data)||null==(e=t.systemSettings)?void 0:e.themeId)&&M(null),a.message.success(J("Deleted successfully")),null==U||U({type:"delete",item:z}),[2]}})})})},[L,null==_||null==(w=_.data)||null==(C=w.data)||null==(h=C.systemSettings)?void 0:h.themeId,Q,z,R,U,J,M]),W=(0,o.useCallback)((n=y(function(e){var t,n,r,o;return g(this,function(i){switch(i.label){case 0:Y(!0),i.label=1;case 1:if(i.trys.push([1,6,,7]),e)return[3,3];return[4,Promise.all([L.request({url:"themeConfig:update/".concat(z.id),method:"post",data:{optional:e,default:!1}}),z.id===(null==_||null==(r=_.data)||null==(n=r.data)||null==(t=n.systemSettings)?void 0:t.themeId)&&M(null)])];case 2:return i.sent(),[3,5];case 3:return[4,L.request({url:"themeConfig:update/".concat(z.id),method:"post",data:{optional:e}})];case 4:i.sent(),i.label=5;case 5:return[3,7];case 6:return o=i.sent(),(0,l.error)(o),[3,7];case 7:return Y(!1),a.message.success(J("Updated successfully")),null==U||U({type:"optional",item:z}),[2]}})}),function(e){return n.apply(this,arguments)}),[L,null==_||null==(O=_.data)||null==(E=O.data)||null==(k=E.systemSettings)?void 0:k.themeId,z,U,J,M]),X=(0,o.useCallback)((s=y(function(e){var t;return g(this,function(n){switch(n.label){case 0:Y(!0),n.label=1;case 1:if(n.trys.push([1,6,,7]),!e)return[3,3];return[4,Promise.all([L.request({url:"themeConfig:update/".concat(z.id),method:"post",data:{optional:!0,default:!0}})])];case 2:return n.sent(),[3,5];case 3:return[4,L.request({url:"themeConfig:update/".concat(z.id),method:"post",data:{default:!1}})];case 4:n.sent(),n.label=5;case 5:return[3,7];case 6:return t=n.sent(),(0,l.error)(t),[3,7];case 7:return Y(!1),a.message.success(J("Updated successfully")),null==U||U({type:"optional",item:z}),[2]}})}),function(e){return s.apply(this,arguments)}),[L,z,U,J]),Z=(0,o.useCallback)(function(){x(j),A(z),P((0,r.compatOldTheme)(z.config)),I(!0)},[z,A,x,I,P,j]),ee=(0,o.useMemo)(function(){return{items:[{key:"optional",label:i().createElement(a.Space,{style:{width:"100%",justifyContent:"space-between"},align:"center",size:"middle",onClick:function(e){return e.stopPropagation()}},i().createElement("span",null,J("User selectable")),i().createElement(a.Switch,{disabled:Q,style:{transform:"translateY(-2px)"},checked:z.optional,size:"small",loading:B,onChange:W}))},{key:"system",label:i().createElement(a.Space,{style:{width:"100%",justifyContent:"space-between"},align:"center",size:"middle",onClick:function(e){return e.stopPropagation()}},i().createElement("span",null,J("Default theme")),i().createElement(a.Switch,{disabled:Q,style:{transform:"translateY(-2px)"},checked:Q,size:"small",loading:B,onChange:X}))}]}},[X,W,Q,z.optional,B,J]),et=(0,o.useMemo)(function(){return[i().createElement(u.EditOutlined,{key:"edit",onClick:Z}),i().createElement(u.DeleteOutlined,{key:"delete",style:Q?{color:K.colorTextDisabled,cursor:"not-allowed"}:null,disabled:Q,onClick:V}),i().createElement(a.Dropdown,{key:"ellipsis",menu:ee},i().createElement(u.EllipsisOutlined,null))]},[V,Z,Q,ee,K.colorTextDisabled]),en=(0,o.useMemo)(function(){if(z.id!==F&&!z.optional)return null;var e=z.id===H?J("Current"):z.id===F?J("Default"):z.optional?J("Optional"):J("Non-optional"),t=z.id===H?"processing":z.id===F?"default":z.optional?"success":"error";return i().createElement(a.Tag,{style:{marginRight:0},color:t},e)},[H,F,z.id,z.optional,J]),er=(0,o.useMemo)(function(){var e;return(null==(e=D())?void 0:e.id)===z.id?b({cursor:"default",width:240,height:240,overflow:"hidden",outline:"1px solid var(--colorSettings)"},G):b({cursor:"default",width:240,height:240,overflow:"hidden"},G)},[D,z.id,G]);return i().createElement(a.Card,{hoverable:!0,extra:en,title:J(null==(T=z.config)?void 0:T.name),size:"small",style:er,headStyle:{minHeight:38},actions:et},i().createElement(v,{theme:z.config}))};C.displayName="ThemeCard";var w=n(9204),k=function(){var e=(0,r.useGlobalTheme)(),t=e.theme,n=e.setTheme,l=e.setCurrentSettingTheme,s=(0,r.useToken)().token,c=(0,f.useThemeEditorContext)().setOpen,m=(0,d.$)().t,p=a.App.useApp().modal,h=(0,o.useCallback)(function(){var e=p.confirm({title:m("Add new theme"),closable:!0,maskClosable:!0,width:"fit-content",footer:i().createElement(a.Space,{style:{float:"right",marginTop:s.margin,justifyContent:"flex-end"},wrap:!0},i().createElement(a.Button,{onClick:function(){l(t),n((0,r.compatOldTheme)(t)),c(!0),e.destroy()}},m("Edit based on current theme")),i().createElement(a.Button,{type:"primary",onClick:function(){l(t),n((0,r.compatOldTheme)(r.defaultTheme)),c(!0),e.destroy()}},m("Create a brand new theme")))})},[p,l,c,n,m,t,s.margin]);return i().createElement(a.Button,{type:"dashed",style:{width:240,height:240,borderRadius:s.borderRadiusLG,borderColor:"var(--colorSettings)",color:"var(--colorSettings)"},icon:i().createElement(u.PlusOutlined,null),onClick:h},m("Add new theme"))};k.displayName="ToEditTheme";var E=function(){var e=(0,w.useThemeListContext)(),t=e.run,n=e.error,u=e.refresh,s=e.data,c=(0,r.useToken)().token;(0,o.useEffect)(function(){s||t()},[]);var d=(0,o.useCallback)(function(){u()},[u]);return n?((0,l.error)(n),null):i().createElement(a.Space,{size:c.marginLG,wrap:!0},null==s?void 0:s.map(function(e){return i().createElement(C,{item:e,key:e.id,onChange:d})}),i().createElement(k,null))};E.displayName="ThemeList";var O=E}}]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
(self.webpackChunk_nocobase_plugin_theme_editor=self.webpackChunk_nocobase_plugin_theme_editor||[]).push([["327"],{5092:function(e,t,r){"use strict";var a=r(437).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=a(r(4823)).default},5498:function(e,t,r){"use strict";var a=r(437).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=a(r(4361)).default},4823:function(e,t,r){"use strict";var a=r(437).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=a(r(8249)),n=a(r(3881));t.default={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},l.default),timePickerLocale:Object.assign({},n.default)}},4361:function(e,t,r){"use strict";var a=r(437).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=a(r(1632)),n=a(r(2892));let o={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},l.default),timePickerLocale:Object.assign({},n.default)};o.lang.ok="确定",t.default=o},5386:function(e,t,r){"use strict";var a=r(437).default;t.default=void 0;var l=a(r(3815)),n=a(r(5092)),o=a(r(4823)),i=a(r(3881));let c="${label} is not a valid ${type}";t.default={locale:"en",Pagination:l.default,DatePicker:o.default,TimePicker:i.default,Calendar:n.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:c,method:c,array:c,object:c,number:c,date:c,boolean:c,integer:c,float:c,regexp:c,email:c,url:c,hex:c},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}}},3090:function(e,t,r){"use strict";var a=r(437).default;t.default=void 0;var l=a(r(2204)),n=a(r(5498)),o=a(r(4361)),i=a(r(2892));let c="${label}不是一个有效的${type}";t.default={locale:"zh-cn",Pagination:l.default,DatePicker:o.default,TimePicker:i.default,Calendar:n.default,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckAll:"全选",filterSearchPlaceholder:"在筛选项中搜索",emptyText:"暂无数据",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{titles:["",""],searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",deselectAll:"取消全选",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开",collapse:"收起"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:c,method:c,array:c,object:c,number:c,date:c,boolean:c,integer:c,float:c,regexp:c,email:c,url:c,hex:c},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码过期",refresh:"点击刷新",scanned:"已扫描"},ColorPicker:{presetEmpty:"暂无",transparent:"无色",singleColor:"单色",gradientColor:"渐变色"}}},3881:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={placeholder:"Select time",rangePlaceholder:["Start time","End time"]}},2892:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]}},9598:function(e,t,r){"use strict";r.r(t);var a=r(4964),l=r(3772),n=r(7584),o=r(2721),i=r(5386),c=r(3090),u=r(8156),s=r.n(u),d=r(6424),f=r(4936),p=r(8551),m=r(9649),h=r(3546),b=r(9204);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function v(e,t,r,a,l,n,o){try{var i=e[n](o),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(a,l)}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,a,l=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=l){var n=[],o=!0,i=!1;try{for(l=l.call(e);!(o=(r=l.next()).done)&&(n.push(r.value),!t||n.length!==t);o=!0);}catch(e){i=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(i)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}}(e,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.")}()}var P=(0,l.createStyles)(function(e){var t=e.token;return{editor:(0,a.css)({"& > div:nth-child(2)":{display:"none"}}),header:(0,a.css)({width:"100%",height:56,padding:"0 16px",borderBottom:"1px solid #F0F0F0",backgroundColor:"#fff","> .ant-space-item:first-child":{flex:1}}),errorPlaceholder:(0,a.css)({"&::placeholder":{color:t.colorErrorText}})}});t.default=function(e){var t,r,g=e.onThemeChange,$=P().styles,_=(0,l.useGlobalTheme)(),S=_.theme,O=_.setTheme,C=_.getCurrentSettingTheme,w=_.setCurrentEditingTheme,k=_.getCurrentEditingTheme,j=x(s().useState(S),2),T=j[0],E=j[1],M=(0,h.useThemeEditorContext)().setOpen,Y=(0,p.$)(),A=Y.t,D=Y.i18n,F=(0,b.useThemeListContext)().refresh,N=(0,l.useAPIClient)(),I=x(s().useState(S.name),2),U=I[0],R=I[1],q=x(s().useState(!1),2),L=q[0],z=q[1],B=(0,f.Y)().updateUserThemeSettings,K=x(s().useState(),2),Q=K[0],G=K[1];(0,u.useEffect)(function(){E(S)},[S]);var V=D.language,W=(t=function(){var e,t,r;return function(e,t){var r,a,l,n,o={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return n={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function i(n){return function(i){var c=[n,i];if(r)throw TypeError("Generator is already executing.");for(;o;)try{if(r=1,a&&(l=2&c[0]?a.return:c[0]?a.throw||((l=a.return)&&l.call(a),0):a.next)&&!(l=l.call(a,c[1])).done)return l;switch(a=0,l&&(c=[2&c[0],l.value]),c[0]){case 0:case 1:l=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,a=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(l=(l=o.trys).length>0&&l[l.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!l||c[1]>l[0]&&c[1]<l[3])){o.label=c[1];break}if(6===c[0]&&o.label<l[1]){o.label=l[1],l=c;break}if(l&&o.label<l[2]){o.label=l[2],o.ops.push(c);break}l[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],a=0}finally{r=l=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(a){switch(a.label){case 0:if(!U)return G("error"),[2];if(z(!0),!k())return[3,5];(e=k()).config=(0,m.i)(T),e.config.name=U,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,N.request({url:"themeConfig:update/".concat(e.id),method:"POST",data:e})];case 2:return a.sent(),null==F||F(),o.message.success(A("Saved successfully")),[3,4];case 3:return t=a.sent(),(0,n.error)(t),[3,4];case 4:return z(!1),M(!1),w(null),E(C()),[2];case 5:var l,i;return a.trys.push([5,8,,9]),[4,N.request({url:"themeConfig:create",method:"POST",data:{config:(l=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){y(e,t,r[t])})}return e}({},(0,m.i)(T)),i=i={name:U},Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(i)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r.push.apply(r,a)}return r})(Object(i)).forEach(function(e){Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(i,e))}),l),optional:!0,isBuiltIn:!1}})];case 6:return[4,B(a.sent().data.data.id)];case 7:return a.sent(),null==F||F(),o.message.success(A("Saved successfully")),[3,9];case 8:return r=a.sent(),(0,n.error)(r),[3,9];case 9:return z(!1),M(!1),[2]}})},r=function(){var e=this,r=arguments;return new Promise(function(a,l){var n=t.apply(e,r);function o(e){v(n,a,l,o,i,"next",e)}function i(e){v(n,a,l,o,i,"throw",e)}o(void 0)})},function(){return r.apply(this,arguments)});return s().createElement(s().Fragment,null,s().createElement(o.ConfigProvider,{theme:{inherit:!1},locale:"zh-CN"===V?c.default:i.default},s().createElement(o.Space,{className:$.header},s().createElement(o.Input,{className:(0,a.cx)(y({},$.errorPlaceholder,"error"===Q)),status:Q,placeholder:A("Please set a name for this theme"),value:U,onChange:function(e){e.target.value?G(""):G("error"),R(e.target.value)},onPressEnter:W}),s().createElement(o.Button,{type:"default",onClick:function(){M(!1),O(C()),w(null)}},A("Close")),s().createElement(o.Button,{loading:L,type:"primary",onClick:W},A("Save"))),s().createElement(d.$V,{className:$.editor,theme:{name:"Custom Theme",key:"test",config:T},style:{height:"calc(100vh - 56px)",width:540},onThemeChange:function(e){E(e.config),null==g||g(e.config)},locale:"zh-CN"===V?d.U1:d._z})))}},3815:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"}},2204:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"}},5311:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.commonLocale=void 0,t.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}},8249:function(e,t,r){"use strict";var a=r(9235).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=a(r(8949)),n=r(5311);t.default=(0,l.default)((0,l.default)({},n.commonLocale),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"})},1632:function(e,t,r){"use strict";var a=r(9235).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=a(r(8949)),n=r(5311);t.default=(0,l.default)((0,l.default)({},n.commonLocale),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:!1})},437:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},6602:function(e,t,r){var a=r(4145);e.exports=function(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},9235:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},8949:function(e,t,r){var a=r(6602);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e},e.exports.__esModule=!0,e.exports.default=e.exports},2886:function(e,t,r){var a=r(781).default;e.exports=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var l=r.call(e,t||"default");if("object"!=a(l))return l;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},4145:function(e,t,r){var a=r(781).default,l=r(2886);e.exports=function(e){var t=l(e,"string");return"symbol"==a(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},781:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}]);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_theme_editor=self.webpackChunk_nocobase_plugin_theme_editor||[]).push([["
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_theme_editor=self.webpackChunk_nocobase_plugin_theme_editor||[]).push([["793"],{3546:function(e,n,t){t.r(n),t.d(n,{ThemeEditorProvider:function(){return c},useThemeEditorContext:function(){return i}});var r=t(8156),o=t.n(r),u=o().createContext(null),i=function(){return o().useContext(u)},c=function(e){var n=e.children,t=e.open,r=e.setOpen;return o().createElement(u.Provider,{value:{open:t,setOpen:r}},n)};c.displayName="ThemeEditorProvider"}}]);
|