@nocobase/plugin-localization 1.0.0-alpha.1 → 1.0.0-alpha.11

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 (36) hide show
  1. package/dist/client/Localization.d.ts +8 -0
  2. package/dist/client/index.d.ts +8 -0
  3. package/dist/client/index.js +9 -0
  4. package/dist/client/locale/index.d.ts +8 -0
  5. package/dist/client/schemas/localization.d.ts +8 -0
  6. package/dist/externalVersion.js +15 -6
  7. package/dist/index.d.ts +8 -0
  8. package/dist/index.js +9 -0
  9. package/dist/node_modules/deepmerge/package.json +1 -1
  10. package/dist/server/actions/localization.d.ts +8 -0
  11. package/dist/server/actions/localization.js +9 -0
  12. package/dist/server/actions/localizationTexts.d.ts +8 -0
  13. package/dist/server/actions/localizationTexts.js +9 -0
  14. package/dist/server/collections/localization-texts.d.ts +8 -0
  15. package/dist/server/collections/localization-texts.js +9 -0
  16. package/dist/server/collections/localization-translations.d.ts +8 -0
  17. package/dist/server/collections/localization-translations.js +9 -0
  18. package/dist/server/constans.d.ts +8 -0
  19. package/dist/server/constans.js +9 -0
  20. package/dist/server/index.d.ts +8 -0
  21. package/dist/server/index.js +9 -0
  22. package/dist/server/migrations/20230706200900-roles-add-translation.d.ts +8 -0
  23. package/dist/server/migrations/20230706200900-roles-add-translation.js +9 -0
  24. package/dist/server/migrations/20231206161851-fix-module.d.ts +8 -0
  25. package/dist/server/migrations/20231206161851-fix-module.js +9 -0
  26. package/dist/server/migrations/20240425224508-change-locale-module.d.ts +8 -0
  27. package/dist/server/migrations/20240425224508-change-locale-module.js +9 -0
  28. package/dist/server/migrations/20240426123538-delete-pkg-name-ns.d.ts +8 -0
  29. package/dist/server/migrations/20240426123538-delete-pkg-name-ns.js +9 -0
  30. package/dist/server/plugin.d.ts +8 -0
  31. package/dist/server/plugin.js +9 -0
  32. package/dist/server/resources.d.ts +8 -0
  33. package/dist/server/resources.js +9 -0
  34. package/dist/server/utils.d.ts +8 -0
  35. package/dist/server/utils.js +9 -0
  36. package/package.json +2 -2
@@ -1,2 +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
+ */
1
9
  import React from 'react';
2
10
  export declare const Localization: () => React.JSX.Element;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Plugin } from '@nocobase/client';
2
10
  export declare class PluginLocalizationClient extends Plugin {
3
11
  load(): Promise<void>;
@@ -1 +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
+
1
10
  (function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("@ant-design/icons"),require("@formily/core"),require("@formily/react"),require("ahooks"),require("antd"),require("react"),require("react-i18next")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","@ant-design/icons","@formily/core","@formily/react","ahooks","antd","react","react-i18next"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n["@nocobase/plugin-localization"]={},n["@nocobase/client"],n.jsxRuntime,n["@ant-design/icons"],n["@formily/core"],n["@formily/react"],n.ahooks,n.antd,n.react,n["react-i18next"]))})(this,function(n,e,t,T,g,d,v,r,c,h){"use strict";var _=Object.defineProperty,H=Object.defineProperties;var J=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var L=(n,e,t)=>e in n?_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,C=(n,e)=>{for(var t in e||(e={}))Q.call(e,t)&&L(n,t,e[t]);if(P)for(var t of P(e))W.call(e,t)&&L(n,t,e[t]);return n},S=(n,e)=>H(n,J(e));var x=(n,e,t)=>new Promise((T,g)=>{var d=c=>{try{r(t.next(c))}catch(h){g(h)}},v=c=>{try{r(t.throw(c))}catch(h){g(h)}},r=c=>c.done?T(c.value):Promise.resolve(c.value).then(d,v);r((t=t.apply(n,e)).next())});const b="localization",f=()=>h.useTranslation([b,"client"],{nsMode:"fallback"}),w={name:"localization",fields:[{interface:"input",type:"string",name:"text",uiSchema:{type:"string",title:'{{t("Text")}}',"x-component":"Input.TextArea",required:!0}},{interface:"input",type:"string",name:"translation",uiSchema:{type:"string",title:'{{t("Translation")}}',"x-component":"Input.TextArea"}},{interface:"select",type:"string",name:"moduleTitle",uiSchema:{type:"string",title:'{{t("Module")}}',"x-component":"Select",enum:[{value:"Menu",label:'{{t("Menu")}}'},{value:"Collections & Fields",label:'{{t("Collections & Fields", {ns:"localization"})}}'}]}}]},I={type:"void",name:"localization","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:w,resourceName:"localizationTexts",request:{resource:"localizationTexts",action:"list",params:{pageSize:50}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:w},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{currentLang:{type:"void","x-align":"left","x-component":"CurrentLang"},filter:{type:"void",title:'{{t("Filter")}}',"x-align":"left","x-component":"Filter"},deleteTranslation:{type:"void",title:'{{t("Delete translation")}}',"x-component":"Action","x-component-props":{icon:"DeleteOutlined",useAction:"{{ useBulkDestroyTranslationAction }}",confirm:{title:"{{t('Delete translation')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},sync:{type:"void",title:'{{t("Sync")}}',"x-component":"Sync"},publish:{type:"void",title:'{{t("Publish")}}',"x-component":"Action","x-component-props":{icon:"UploadOutlined",type:"primary",useAction:"{{ usePublishAction }}"}}}},table:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"translationId",rowSelection:{type:"checkbox"},useDataSource:"{{ cm.useDataSourceFromRAC }}"},properties:{text:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{text:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},translation:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{translation:{type:"string","x-component":"CollectionField","x-component-props":{component:"TranslationField"},"x-read-pretty":!0}}},moduleTitle:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{moduleTitle:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"Table.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{update:{type:"void",title:'{{t("Edit")}}',"x-component":"Action.Link","x-component-props":{type:"primary"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:"{{ cm.useValuesFromRecord }}"},title:'{{t("Edit")}}',properties:{moduleTitle:{"x-component":"CollectionField","x-decorator":"FormItem","x-read-pretty":!0},text:{"x-component":"CollectionField","x-decorator":"FormItem","x-read-pretty":!0},translation:{"x-component":"CollectionField","x-decorator":"FormItem",required:!0},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ useUpdateTranslationAction }}"}}}}}}}},deleteTranslation:{type:"void",title:'{{ t("Delete translation") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Delete translation')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:"{{useDestroyTranslationAction}}"},"x-visible":"{{useHasTranslation()}}"}}}}}}}}},{Text:D}=r.Typography,M=()=>{const o=d.useField(),a=d.useForm(),i=e.useActionContext(),{refresh:s}=e.useResourceActionContext(),{targetKey:u}=e.useResourceContext(),{[u]:l}=e.useRecord(),p=e.useAPIClient(),m=p.auth.getLocale();return{run(){return x(this,null,function*(){yield a.submit(),o.data=o.data||{},o.data.loading=!0;try{yield p.resource("localizationTranslations").updateOrCreate({filterKeys:["textId","locale"],values:{textId:l,locale:m,translation:a.values.translation}}),i.setVisible(!1),yield a.reset(),s()}catch(A){console.log(A)}finally{o.data.loading=!1}})}}},q=()=>{const{refresh:o}=e.useResourceActionContext(),a=e.useAPIClient(),{translationId:i}=e.useRecord();return{run(){return x(this,null,function*(){yield a.resource("localizationTranslations").destroy({filterByTk:i}),o()})}}},B=()=>{const{state:o,setState:a,refresh:i}=e.useResourceActionContext(),s=e.useAPIClient(),{t:u}=f();return{run(){return x(this,null,function*(){var p;if(!((p=o==null?void 0:o.selectedRowKeys)!=null&&p.length))return r.message.error(u("Please select the records you want to delete"));yield s.resource("localizationTranslations").destroy({filterByTk:o==null?void 0:o.selectedRowKeys}),a==null||a({selectedRowKeys:[]}),i()})}}},K=()=>{const o=e.useAPIClient();return{run(){return x(this,null,function*(){yield o.resource("localization").publish(),window.location.reload()})}}},O=()=>{const{t:o}=f(),{refresh:a}=e.useResourceActionContext(),i=e.useAPIClient(),[s,u]=c.useState(!1),l=["local","menu","db"],[p,m]=c.useState(l),[E,A]=c.useState(!1),[G,z]=c.useState(!0),N=y=>{m(y),A(!!y.length&&y.length<l.length),z(y.length===l.length)},U=y=>{m(y.target.checked?l:[]),A(!1),z(y.target.checked)};return t.jsx(e.StablePopover,{placement:"bottomRight",content:t.jsxs(t.Fragment,{children:[t.jsx(r.Checkbox,{indeterminate:E,onChange:U,checked:G,children:o("All")}),t.jsx(r.Divider,{style:{margin:"5px 0"}}),t.jsx(r.Checkbox.Group,{onChange:N,value:p,children:t.jsxs(r.Col,{children:[t.jsx(r.Row,{children:t.jsx(r.Checkbox,{value:"local",children:o("System & Plugins")})}),t.jsx(r.Row,{children:t.jsx(r.Checkbox,{value:"db",children:o("Collections & Fields")})}),t.jsx(r.Row,{children:t.jsx(r.Checkbox,{value:"menu",children:o("Menu")})})]})})]}),children:t.jsx(r.Button,{icon:t.jsx(T.SyncOutlined,{}),loading:s,onClick:()=>x(this,null,function*(){if(!p.length)return r.message.error(o("Please select the resources you want to synchronize"));u(!0),yield i.resource("localization").sync({values:{types:p}}),u(!1),a()}),children:o("Sync")})})},F=()=>{var s;const{t:o}=f(),a=v.useMemoizedFn(o),{data:i}=e.useResourceActionContext();return c.useMemo(()=>{var u,l;return((l=(u=i==null?void 0:i.meta)==null?void 0:u.modules)==null?void 0:l.map(p=>({value:p.value,label:a(p.label)})))||[]},[(s=i==null?void 0:i.meta)==null?void 0:s.modules,a])},V=()=>{const{t:o}=f(),{run:a}=e.useResourceActionContext(),i=F(),s=c.useMemo(()=>g.createForm({initialValues:{hasTranslation:!0}}),[]),u=l=>{a(C({},l||s.values))};return c.useEffect(()=>{const l=s.query("module").take();l.dataSource=i},[s,i]),t.jsx(e.FormProvider,{form:s,children:t.jsxs("div",{style:{display:"flex"},children:[t.jsx(d.Field,{name:"module",dataSource:i,component:[e.Select,{allowClear:!0,placeholder:o("Module"),onChange:l=>u(S(C({},s.values),{module:l}))}]}),t.jsx(d.Field,{name:"keyword",component:[r.Input.Search,{placeholder:o("Keyword"),allowClear:!0,style:{marginLeft:"8px",width:"fit-content"},onSearch:l=>u(S(C({},s.values),{keyword:l}))}]}),t.jsx(d.Field,{name:"hasTranslation",dataSource:[{label:o("All"),value:!0},{label:o("No translation"),value:!1}],component:[e.Radio.Group,{defaultValue:!0,style:{marginLeft:"8px",width:"fit-content"},optionType:"button",onChange:()=>u()}]})]})})},j=()=>{var p;const{t:o}=f(),i=e.useAPIClient().auth.getLocale(),s=((p=e.locale[i])==null?void 0:p.label)||i,u=()=>t.jsxs(r.Typography,{children:[t.jsx(D,{strong:!0,children:o("Current language")}),t.jsx(r.Tag,{style:{marginLeft:"10px"},children:s})]}),l=m=>m.value!==void 0?t.jsx(e.Input.TextArea,C({},m)):t.jsx("div",{});return t.jsx(r.Card,{bordered:!1,children:t.jsx(e.SchemaComponent,{schema:I,components:{TranslationField:l,CurrentLang:u,Sync:O,Filter:V},scope:{t:o,useDestroyTranslationAction:q,useBulkDestroyTranslationAction:B,useUpdateTranslationAction:M,usePublishAction:K,useModules:F}})})};class k extends e.Plugin{load(){return x(this,null,function*(){this.app.pluginSettingsManager.add(b,{title:`{{t("Localization", { ns: "${b}" })}}`,icon:"GlobalOutlined",Component:j,aclSnippet:"pm.localization.localization"})})}}n.PluginLocalizationClient=k,n.default=k,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,2 +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
+ */
1
9
  export declare const NAMESPACE = "localization";
2
10
  export declare const useLocalTranslation: () => import("react-i18next").UseTranslationResponse<("localization" | "client")[], undefined>;
@@ -1,2 +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
+ */
1
9
  import { ISchema } from '@formily/react';
2
10
  export declare const localizationSchema: ISchema;
@@ -1,15 +1,24 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  module.exports = {
2
11
  "@ant-design/icons": "5.2.6",
3
12
  "@formily/core": "2.3.0",
4
13
  "@formily/react": "2.3.0",
5
- "@nocobase/client": "1.0.0-alpha.1",
14
+ "@nocobase/client": "1.0.0-alpha.11",
6
15
  "ahooks": "3.7.8",
7
16
  "antd": "5.12.8",
8
17
  "react": "18.2.0",
9
- "@nocobase/database": "1.0.0-alpha.1",
10
- "@nocobase/plugin-ui-schema-storage": "1.0.0-alpha.1",
11
- "@nocobase/server": "1.0.0-alpha.1",
12
- "@nocobase/cache": "1.0.0-alpha.1",
18
+ "@nocobase/database": "1.0.0-alpha.11",
19
+ "@nocobase/plugin-ui-schema-storage": "1.0.0-alpha.11",
20
+ "@nocobase/server": "1.0.0-alpha.11",
21
+ "@nocobase/cache": "1.0.0-alpha.11",
13
22
  "react-i18next": "11.18.6",
14
- "@nocobase/actions": "1.0.0-alpha.1"
23
+ "@nocobase/actions": "1.0.0-alpha.11"
15
24
  };
package/dist/index.d.ts CHANGED
@@ -1,2 +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
+ */
1
9
  export * from './server';
2
10
  export { default } from './server';
package/dist/index.js CHANGED
@@ -1,3 +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
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1 +1 @@
1
- {"name":"deepmerge","description":"A library for deep (recursive) merging of Javascript objects","keywords":["merge","deep","extend","copy","clone","recursive"],"version":"4.3.1","homepage":"https://github.com/TehShrike/deepmerge","repository":{"type":"git","url":"git://github.com/TehShrike/deepmerge.git"},"main":"dist/cjs.js","engines":{"node":">=0.10.0"},"scripts":{"build":"rollup -c","test":"npm run build && tape test/*.js && jsmd readme.md && npm run test:typescript","test:typescript":"tsc --noEmit test/typescript.ts && ts-node test/typescript.ts","size":"npm run build && uglifyjs --compress --mangle -- ./dist/umd.js | gzip -c | wc -c"},"devDependencies":{"@types/node":"^8.10.54","is-mergeable-object":"1.1.0","is-plain-object":"^5.0.0","jsmd":"^1.0.2","rollup":"^1.23.1","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","tape":"^4.11.0","ts-node":"7.0.1","typescript":"=2.2.2","uglify-js":"^3.6.1"},"license":"MIT","_lastModified":"2024-04-28T17:07:29.874Z"}
1
+ {"name":"deepmerge","description":"A library for deep (recursive) merging of Javascript objects","keywords":["merge","deep","extend","copy","clone","recursive"],"version":"4.3.1","homepage":"https://github.com/TehShrike/deepmerge","repository":{"type":"git","url":"git://github.com/TehShrike/deepmerge.git"},"main":"dist/cjs.js","engines":{"node":">=0.10.0"},"scripts":{"build":"rollup -c","test":"npm run build && tape test/*.js && jsmd readme.md && npm run test:typescript","test:typescript":"tsc --noEmit test/typescript.ts && ts-node test/typescript.ts","size":"npm run build && uglifyjs --compress --mangle -- ./dist/umd.js | gzip -c | wc -c"},"devDependencies":{"@types/node":"^8.10.54","is-mergeable-object":"1.1.0","is-plain-object":"^5.0.0","jsmd":"^1.0.2","rollup":"^1.23.1","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","tape":"^4.11.0","ts-node":"7.0.1","typescript":"=2.2.2","uglify-js":"^3.6.1"},"license":"MIT","_lastModified":"2024-05-11T05:37:31.658Z"}
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Context, Next } from '@nocobase/actions';
2
10
  import { Database, Model } from '@nocobase/database';
3
11
  export declare const getResources: (ctx: Context) => Promise<{}>;
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Context, Next } from '@nocobase/actions';
2
10
  declare const _default: {
3
11
  list: (ctx: Context, next: Next) => Promise<void>;
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +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
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +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
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export declare const CACHE_KEY = "localization:texts";
2
10
  export declare const NAMESPACE_PREFIX = "lm-";
3
11
  export declare const NAMESPACE_MENUS: string;
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +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
+ */
1
9
  export { default } from './plugin';
@@ -1,3 +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
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Migration } from '@nocobase/server';
2
10
  export default class AddTranslationToRoleTitleMigration extends Migration {
3
11
  appVersion: string;
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Migration } from '@nocobase/server';
2
10
  export default class FixModuleMigration extends Migration {
3
11
  appVersion: string;
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Migration } from '@nocobase/server';
2
10
  export default class extends Migration {
3
11
  on: string;
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Migration } from '@nocobase/server';
2
10
  export default class extends Migration {
3
11
  on: string;
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import PluginUISchemaStorageServer from '@nocobase/plugin-ui-schema-storage';
2
10
  import { InstallOptions, Plugin } from '@nocobase/server';
3
11
  import Resources from './resources';
@@ -1,3 +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
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Cache } from '@nocobase/cache';
2
10
  import { Database, Transaction } from '@nocobase/database';
3
11
  export default class Resources {
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export declare const compile: (title: string) => string;
2
10
  export declare const getTextsFromUISchema: (schema: any) => any[];
3
11
  export declare const getTextsFromDBRecord: (fields: string[], record: any) => any[];
@@ -1,3 +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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-localization",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.11",
4
4
  "main": "dist/server/index.js",
5
5
  "homepage": "https://docs.nocobase.com/handbook/localization-management",
6
6
  "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/localization-management",
@@ -24,5 +24,5 @@
24
24
  "displayName.zh-CN": "本地化",
25
25
  "description": "Allows to manage localization resources of the application.",
26
26
  "description.zh-CN": "支持管理应用程序的本地化资源。",
27
- "gitHead": "c73b6d2032a6151fdfeebeb0ec923d766578c53c"
27
+ "gitHead": "00ffb260456e5a22701fd16c87112a92708d9dc1"
28
28
  }