@nocobase/plugin-localization 1.2.12-alpha → 1.3.0-alpha.20240710084543

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 (48) hide show
  1. package/package.json +2 -2
  2. package/dist/client/Localization.d.ts +0 -10
  3. package/dist/client/index.d.ts +0 -13
  4. package/dist/client/index.js +0 -10
  5. package/dist/client/locale/index.d.ts +0 -10
  6. package/dist/client/schemas/localization.d.ts +0 -10
  7. package/dist/externalVersion.js +0 -24
  8. package/dist/index.d.ts +0 -10
  9. package/dist/index.js +0 -48
  10. package/dist/locale/en-US.json +0 -24
  11. package/dist/locale/ko_KR.json +0 -23
  12. package/dist/locale/zh-CN.json +0 -24
  13. package/dist/node_modules/deepmerge/.editorconfig +0 -7
  14. package/dist/node_modules/deepmerge/.eslintcache +0 -1
  15. package/dist/node_modules/deepmerge/dist/cjs.js +0 -1
  16. package/dist/node_modules/deepmerge/dist/umd.js +0 -139
  17. package/dist/node_modules/deepmerge/index.d.ts +0 -20
  18. package/dist/node_modules/deepmerge/index.js +0 -106
  19. package/dist/node_modules/deepmerge/license.txt +0 -21
  20. package/dist/node_modules/deepmerge/package.json +0 -1
  21. package/dist/node_modules/deepmerge/rollup.config.js +0 -22
  22. package/dist/server/actions/localization.d.ts +0 -23
  23. package/dist/server/actions/localization.js +0 -237
  24. package/dist/server/actions/localizationTexts.d.ts +0 -13
  25. package/dist/server/actions/localizationTexts.js +0 -139
  26. package/dist/server/collections/localization-texts.d.ts +0 -10
  27. package/dist/server/collections/localization-texts.js +0 -95
  28. package/dist/server/collections/localization-translations.d.ts +0 -10
  29. package/dist/server/collections/localization-translations.js +0 -93
  30. package/dist/server/constans.d.ts +0 -16
  31. package/dist/server/constans.js +0 -57
  32. package/dist/server/index.d.ts +0 -9
  33. package/dist/server/index.js +0 -42
  34. package/dist/server/migrations/20230706200900-roles-add-translation.d.ts +0 -14
  35. package/dist/server/migrations/20230706200900-roles-add-translation.js +0 -59
  36. package/dist/server/migrations/20231206161851-fix-module.d.ts +0 -14
  37. package/dist/server/migrations/20231206161851-fix-module.js +0 -100
  38. package/dist/server/migrations/20240425224508-change-locale-module.d.ts +0 -14
  39. package/dist/server/migrations/20240425224508-change-locale-module.js +0 -51
  40. package/dist/server/migrations/20240426123538-delete-pkg-name-ns.d.ts +0 -28
  41. package/dist/server/migrations/20240426123538-delete-pkg-name-ns.js +0 -82
  42. package/dist/server/plugin.d.ts +0 -23
  43. package/dist/server/plugin.js +0 -156
  44. package/dist/server/resources.d.ts +0 -27
  45. package/dist/server/resources.js +0 -101
  46. package/dist/server/utils.d.ts +0 -11
  47. package/dist/server/utils.js +0 -89
  48. package/dist/swagger/index.json +0 -156
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-localization",
3
- "version": "1.2.12-alpha",
3
+ "version": "1.3.0-alpha.20240710084543",
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": "553231d4882496cb7f1f17fa7541899ce82a27ab"
27
+ "gitHead": "07a8b596fc64a9779a194cb9b0dc2ca7570ed9d4"
28
28
  }
@@ -1,10 +0,0 @@
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 Localization: () => React.JSX.Element;
@@ -1,13 +0,0 @@
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 PluginLocalizationClient extends Plugin {
11
- load(): Promise<void>;
12
- }
13
- export default PluginLocalizationClient;
@@ -1,10 +0,0 @@
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("@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,10 +0,0 @@
1
- /**
2
- * This file is part of the NocoBase (R) project.
3
- * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
- * Authors: NocoBase Team.
5
- *
6
- * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
- * For more information, please refer to: https://www.nocobase.com/agreement.
8
- */
9
- export declare const NAMESPACE = "localization";
10
- export declare const useLocalTranslation: () => import("react-i18next").UseTranslationResponse<("localization" | "client")[], undefined>;
@@ -1,10 +0,0 @@
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 '@formily/react';
10
- export declare const localizationSchema: ISchema;
@@ -1,24 +0,0 @@
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
- "@ant-design/icons": "5.2.6",
12
- "@formily/core": "2.3.0",
13
- "@formily/react": "2.3.0",
14
- "@nocobase/client": "1.2.12-alpha",
15
- "ahooks": "3.7.8",
16
- "antd": "5.12.8",
17
- "react": "18.2.0",
18
- "@nocobase/database": "1.2.12-alpha",
19
- "@nocobase/plugin-ui-schema-storage": "1.2.12-alpha",
20
- "@nocobase/server": "1.2.12-alpha",
21
- "@nocobase/cache": "1.2.12-alpha",
22
- "react-i18next": "11.18.6",
23
- "@nocobase/actions": "1.2.12-alpha"
24
- };
package/dist/index.d.ts DELETED
@@ -1,10 +0,0 @@
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 DELETED
@@ -1,48 +0,0 @@
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
- });
@@ -1,24 +0,0 @@
1
- {
2
- "Edit": "Edit",
3
- "Add new": "Add new",
4
- "Localization management": "Localization management",
5
- "No data": "No data",
6
- "Delete text": "Delete text",
7
- "Delete translation": "Delete translation",
8
- "Module": "Module",
9
- "Text": "Text",
10
- "Translation": "Translation",
11
- "Sync": "Sync",
12
- "Current language": "Current language",
13
- "Keyword": "Keyword",
14
- "All": "All",
15
- "No translation": "No translation",
16
- "System & Plugins": "System & Plugins",
17
- "User interfaces": "User interfaces",
18
- "Collections & Fields": "Collections & Fields",
19
- "Please select the resources you want to synchronize": "Please select the resources you want to synchronize",
20
- "Menu": "Menu",
21
- "Publish": "Publish",
22
- "Translations": "Translations",
23
- "Localization": "Localization"
24
- }
@@ -1,23 +0,0 @@
1
- {
2
- "Edit": "편집",
3
- "Add new": "새로 추가",
4
- "Localization management": "다국어 관리",
5
- "No data": "데이터 없음",
6
- "Delete text": "원본 삭제",
7
- "Delete translation": "번역 삭제",
8
- "Module": "모듈",
9
- "Text": "원본 텍스트",
10
- "Translation": "번역",
11
- "Sync": "동기화",
12
- "Current language": "현재 언어",
13
- "Keyword": "키워드",
14
- "All": "모두",
15
- "No translation": "번역 없음",
16
- "System & Plugins": "시스템 및 플러그인",
17
- "User interfaces": "사용자 인터페이스",
18
- "Collections & Fields": "컬렉션 및 필드",
19
- "Please select the resources you want to synchronize": "동기화하려는 리소스를 선택하세요",
20
- "Menu": "메뉴",
21
- "Publish": "게시",
22
- "Translations": "번역"
23
- }
@@ -1,24 +0,0 @@
1
- {
2
- "Edit": "编辑",
3
- "Add new": "新增",
4
- "Localization management": "本地化管理",
5
- "No data": "暂无数据",
6
- "Delete text": "删除原文",
7
- "Delete translation": "删除译文",
8
- "Module": "模块",
9
- "Text": "原文",
10
- "Translation": "译文",
11
- "Sync": "同步",
12
- "Current language": "当前语言",
13
- "Keyword": "关键字",
14
- "All": "全部",
15
- "No translation": "待翻译",
16
- "System & Plugins": "系统和插件",
17
- "User interfaces": "用户界面配置",
18
- "Collections & Fields": "数据表和字段",
19
- "Please select the resources you want to synchronize": "请选择需要同步的资源",
20
- "Menu": "菜单",
21
- "Publish": "发布",
22
- "Translations": "翻译",
23
- "Localization": "本地化"
24
- }
@@ -1,7 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = tab
5
- end_of_line = lf
6
- trim_trailing_whitespace = true
7
- insert_final_newline = true
@@ -1 +0,0 @@
1
- [{"/Users/joshduff/code/deepmerge/test/custom-is-mergeable-object.js":"1"},{"size":1990,"mtime":1679007485753,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"ktjd5k","/Users/joshduff/code/deepmerge/test/custom-is-mergeable-object.js",[],[]]
@@ -1 +0,0 @@
1
- (function(){"use strict";var e={323:function(e){var r=function isMergeableObject(e){return isNonNullObject(e)&&!isSpecial(e)};function isNonNullObject(e){return!!e&&typeof e==="object"}function isSpecial(e){var r=Object.prototype.toString.call(e);return r==="[object RegExp]"||r==="[object Date]"||isReactElement(e)}var t=typeof Symbol==="function"&&Symbol.for;var n=t?Symbol.for("react.element"):60103;function isReactElement(e){return e.$$typeof===n}function emptyTarget(e){return Array.isArray(e)?[]:{}}function cloneUnlessOtherwiseSpecified(e,r){return r.clone!==false&&r.isMergeableObject(e)?deepmerge(emptyTarget(e),e,r):e}function defaultArrayMerge(e,r,t){return e.concat(r).map((function(e){return cloneUnlessOtherwiseSpecified(e,t)}))}function getMergeFunction(e,r){if(!r.customMerge){return deepmerge}var t=r.customMerge(e);return typeof t==="function"?t:deepmerge}function getEnumerableOwnPropertySymbols(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(r){return Object.propertyIsEnumerable.call(e,r)})):[]}function getKeys(e){return Object.keys(e).concat(getEnumerableOwnPropertySymbols(e))}function propertyIsOnObject(e,r){try{return r in e}catch(e){return false}}function propertyIsUnsafe(e,r){return propertyIsOnObject(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))}function mergeObject(e,r,t){var n={};if(t.isMergeableObject(e)){getKeys(e).forEach((function(r){n[r]=cloneUnlessOtherwiseSpecified(e[r],t)}))}getKeys(r).forEach((function(c){if(propertyIsUnsafe(e,c)){return}if(propertyIsOnObject(e,c)&&t.isMergeableObject(r[c])){n[c]=getMergeFunction(c,t)(e[c],r[c],t)}else{n[c]=cloneUnlessOtherwiseSpecified(r[c],t)}}));return n}function deepmerge(e,t,n){n=n||{};n.arrayMerge=n.arrayMerge||defaultArrayMerge;n.isMergeableObject=n.isMergeableObject||r;n.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var c=Array.isArray(t);var i=Array.isArray(e);var o=c===i;if(!o){return cloneUnlessOtherwiseSpecified(t,n)}else if(c){return n.arrayMerge(e,t,n)}else{return mergeObject(e,t,n)}}deepmerge.all=function deepmergeAll(e,r){if(!Array.isArray(e)){throw new Error("first argument should be an array")}return e.reduce((function(e,t){return deepmerge(e,t,r)}),{})};var c=deepmerge;e.exports=c}};var r={};function __nccwpck_require__(t){var n=r[t];if(n!==undefined){return n.exports}var c=r[t]={exports:{}};var i=true;try{e[t](c,c.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return c.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(323);module.exports=t})();
@@ -1,139 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
- typeof define === 'function' && define.amd ? define(factory) :
4
- (global = global || self, global.deepmerge = factory());
5
- }(this, function () { 'use strict';
6
-
7
- var isMergeableObject = function isMergeableObject(value) {
8
- return isNonNullObject(value)
9
- && !isSpecial(value)
10
- };
11
-
12
- function isNonNullObject(value) {
13
- return !!value && typeof value === 'object'
14
- }
15
-
16
- function isSpecial(value) {
17
- var stringValue = Object.prototype.toString.call(value);
18
-
19
- return stringValue === '[object RegExp]'
20
- || stringValue === '[object Date]'
21
- || isReactElement(value)
22
- }
23
-
24
- // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
25
- var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
26
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
27
-
28
- function isReactElement(value) {
29
- return value.$$typeof === REACT_ELEMENT_TYPE
30
- }
31
-
32
- function emptyTarget(val) {
33
- return Array.isArray(val) ? [] : {}
34
- }
35
-
36
- function cloneUnlessOtherwiseSpecified(value, options) {
37
- return (options.clone !== false && options.isMergeableObject(value))
38
- ? deepmerge(emptyTarget(value), value, options)
39
- : value
40
- }
41
-
42
- function defaultArrayMerge(target, source, options) {
43
- return target.concat(source).map(function(element) {
44
- return cloneUnlessOtherwiseSpecified(element, options)
45
- })
46
- }
47
-
48
- function getMergeFunction(key, options) {
49
- if (!options.customMerge) {
50
- return deepmerge
51
- }
52
- var customMerge = options.customMerge(key);
53
- return typeof customMerge === 'function' ? customMerge : deepmerge
54
- }
55
-
56
- function getEnumerableOwnPropertySymbols(target) {
57
- return Object.getOwnPropertySymbols
58
- ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
59
- return Object.propertyIsEnumerable.call(target, symbol)
60
- })
61
- : []
62
- }
63
-
64
- function getKeys(target) {
65
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
66
- }
67
-
68
- function propertyIsOnObject(object, property) {
69
- try {
70
- return property in object
71
- } catch(_) {
72
- return false
73
- }
74
- }
75
-
76
- // Protects from prototype poisoning and unexpected merging up the prototype chain.
77
- function propertyIsUnsafe(target, key) {
78
- return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
79
- && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
80
- && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
81
- }
82
-
83
- function mergeObject(target, source, options) {
84
- var destination = {};
85
- if (options.isMergeableObject(target)) {
86
- getKeys(target).forEach(function(key) {
87
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
88
- });
89
- }
90
- getKeys(source).forEach(function(key) {
91
- if (propertyIsUnsafe(target, key)) {
92
- return
93
- }
94
-
95
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
96
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
97
- } else {
98
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
99
- }
100
- });
101
- return destination
102
- }
103
-
104
- function deepmerge(target, source, options) {
105
- options = options || {};
106
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
107
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
108
- // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
109
- // implementations can use it. The caller may not replace it.
110
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
111
-
112
- var sourceIsArray = Array.isArray(source);
113
- var targetIsArray = Array.isArray(target);
114
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
115
-
116
- if (!sourceAndTargetTypesMatch) {
117
- return cloneUnlessOtherwiseSpecified(source, options)
118
- } else if (sourceIsArray) {
119
- return options.arrayMerge(target, source, options)
120
- } else {
121
- return mergeObject(target, source, options)
122
- }
123
- }
124
-
125
- deepmerge.all = function deepmergeAll(array, options) {
126
- if (!Array.isArray(array)) {
127
- throw new Error('first argument should be an array')
128
- }
129
-
130
- return array.reduce(function(prev, next) {
131
- return deepmerge(prev, next, options)
132
- }, {})
133
- };
134
-
135
- var deepmerge_1 = deepmerge;
136
-
137
- return deepmerge_1;
138
-
139
- }));
@@ -1,20 +0,0 @@
1
- declare function deepmerge<T>(x: Partial<T>, y: Partial<T>, options?: deepmerge.Options): T;
2
- declare function deepmerge<T1, T2>(x: Partial<T1>, y: Partial<T2>, options?: deepmerge.Options): T1 & T2;
3
-
4
- declare namespace deepmerge {
5
- export interface Options {
6
- arrayMerge?(target: any[], source: any[], options?: ArrayMergeOptions): any[];
7
- clone?: boolean;
8
- customMerge?: (key: string, options?: Options) => ((x: any, y: any) => any) | undefined;
9
- isMergeableObject?(value: object): boolean;
10
- }
11
- export interface ArrayMergeOptions {
12
- isMergeableObject(value: object): boolean;
13
- cloneUnlessOtherwiseSpecified(value: object, options?: Options): object;
14
- }
15
-
16
- export function all (objects: object[], options?: Options): object;
17
- export function all<T> (objects: Partial<T>[], options?: Options): T;
18
- }
19
-
20
- export = deepmerge;
@@ -1,106 +0,0 @@
1
- var defaultIsMergeableObject = require('is-mergeable-object')
2
-
3
- function emptyTarget(val) {
4
- return Array.isArray(val) ? [] : {}
5
- }
6
-
7
- function cloneUnlessOtherwiseSpecified(value, options) {
8
- return (options.clone !== false && options.isMergeableObject(value))
9
- ? deepmerge(emptyTarget(value), value, options)
10
- : value
11
- }
12
-
13
- function defaultArrayMerge(target, source, options) {
14
- return target.concat(source).map(function(element) {
15
- return cloneUnlessOtherwiseSpecified(element, options)
16
- })
17
- }
18
-
19
- function getMergeFunction(key, options) {
20
- if (!options.customMerge) {
21
- return deepmerge
22
- }
23
- var customMerge = options.customMerge(key)
24
- return typeof customMerge === 'function' ? customMerge : deepmerge
25
- }
26
-
27
- function getEnumerableOwnPropertySymbols(target) {
28
- return Object.getOwnPropertySymbols
29
- ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
30
- return Object.propertyIsEnumerable.call(target, symbol)
31
- })
32
- : []
33
- }
34
-
35
- function getKeys(target) {
36
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
37
- }
38
-
39
- function propertyIsOnObject(object, property) {
40
- try {
41
- return property in object
42
- } catch(_) {
43
- return false
44
- }
45
- }
46
-
47
- // Protects from prototype poisoning and unexpected merging up the prototype chain.
48
- function propertyIsUnsafe(target, key) {
49
- return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
50
- && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
51
- && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
52
- }
53
-
54
- function mergeObject(target, source, options) {
55
- var destination = {}
56
- if (options.isMergeableObject(target)) {
57
- getKeys(target).forEach(function(key) {
58
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options)
59
- })
60
- }
61
- getKeys(source).forEach(function(key) {
62
- if (propertyIsUnsafe(target, key)) {
63
- return
64
- }
65
-
66
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
67
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options)
68
- } else {
69
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options)
70
- }
71
- })
72
- return destination
73
- }
74
-
75
- function deepmerge(target, source, options) {
76
- options = options || {}
77
- options.arrayMerge = options.arrayMerge || defaultArrayMerge
78
- options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject
79
- // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
80
- // implementations can use it. The caller may not replace it.
81
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified
82
-
83
- var sourceIsArray = Array.isArray(source)
84
- var targetIsArray = Array.isArray(target)
85
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray
86
-
87
- if (!sourceAndTargetTypesMatch) {
88
- return cloneUnlessOtherwiseSpecified(source, options)
89
- } else if (sourceIsArray) {
90
- return options.arrayMerge(target, source, options)
91
- } else {
92
- return mergeObject(target, source, options)
93
- }
94
- }
95
-
96
- deepmerge.all = function deepmergeAll(array, options) {
97
- if (!Array.isArray(array)) {
98
- throw new Error('first argument should be an array')
99
- }
100
-
101
- return array.reduce(function(prev, next) {
102
- return deepmerge(prev, next, options)
103
- }, {})
104
- }
105
-
106
- module.exports = deepmerge
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2012 James Halliday, Josh Duff, and other contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
@@ -1 +0,0 @@
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-07-05T09:19:57.901Z"}
@@ -1,22 +0,0 @@
1
- import resolve from 'rollup-plugin-node-resolve'
2
- import commonjs from 'rollup-plugin-commonjs'
3
- import pkg from './package.json'
4
-
5
- export default {
6
- input: `index.js`,
7
- plugins: [
8
- commonjs(),
9
- resolve(),
10
- ],
11
- output: [
12
- {
13
- file: pkg.main,
14
- format: `cjs`
15
- },
16
- {
17
- name: 'deepmerge',
18
- file: 'dist/umd.js',
19
- format: `umd`
20
- },
21
- ],
22
- }
@@ -1,23 +0,0 @@
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 { Context, Next } from '@nocobase/actions';
10
- import { Database, Model } from '@nocobase/database';
11
- export declare const getResources: (ctx: Context) => Promise<{}>;
12
- export declare const getUISchemas: (db: Database) => Promise<Model<any, any>[]>;
13
- export declare const getTextsFromDB: (db: Database) => Promise<{}>;
14
- export declare const getSchemaUid: (db: Database, migrate?: boolean) => Promise<{
15
- adminSchemaUid: any;
16
- mobileSchemaUid: any;
17
- }>;
18
- export declare const getTextsFromMenu: (db: Database, migrate?: boolean) => Promise<{}>;
19
- declare const _default: {
20
- publish: (ctx: Context, next: Next) => Promise<void>;
21
- sync: (ctx: Context, next: Next) => Promise<void>;
22
- };
23
- export default _default;