@nocobase/client 0.8.1-alpha.4 → 0.9.0-alpha.2

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 (195) hide show
  1. package/es/acl/ACLProvider.d.ts +16 -2
  2. package/es/acl/ACLProvider.js +271 -100
  3. package/es/acl/Configuration/ConfigureCenter.d.ts +2 -0
  4. package/es/acl/Configuration/ConfigureCenter.js +254 -0
  5. package/es/acl/Configuration/MenuConfigure.js +2 -2
  6. package/es/acl/Configuration/PermisionProvider.d.ts +4 -0
  7. package/es/acl/Configuration/PermisionProvider.js +132 -0
  8. package/es/acl/Configuration/RoleConfigure.js +98 -23
  9. package/es/acl/Configuration/RoleTable.d.ts +1 -1
  10. package/es/acl/Configuration/RoleTable.js +6 -3
  11. package/es/acl/Configuration/RolesResourcesActions.js +2 -2
  12. package/es/acl/Configuration/index.d.ts +1 -0
  13. package/es/acl/Configuration/index.js +2 -1
  14. package/es/acl/Configuration/schemas/roleCollections.js +41 -13
  15. package/es/acl/Configuration/schemas/roles.js +42 -2
  16. package/es/acl/Configuration/schemas/scopes.js +2 -0
  17. package/es/acl/index.d.ts +1 -0
  18. package/es/acl/index.js +2 -1
  19. package/es/acl/style.less +10 -0
  20. package/es/antd-config-provider/index.d.ts +3 -1
  21. package/es/antd-config-provider/index.js +25 -6
  22. package/es/antd-config-provider/loadConstrueLocale.d.ts +1 -0
  23. package/es/antd-config-provider/loadConstrueLocale.js +293 -0
  24. package/es/api-client/APIClient.js +5 -0
  25. package/es/block-provider/FormBlockProvider.js +5 -2
  26. package/es/block-provider/KanbanBlockProvider.js +3 -3
  27. package/es/block-provider/SharedFilterProvider.d.ts +1 -0
  28. package/es/block-provider/SharedFilterProvider.js +22 -6
  29. package/es/collection-manager/CollectionHistoryProvider.js +14 -2
  30. package/es/collection-manager/hooks/useCollection.d.ts +1 -0
  31. package/es/collection-manager/hooks/useCollection.js +10 -0
  32. package/es/collection-manager/interfaces/index.d.ts +0 -1
  33. package/es/collection-manager/interfaces/index.js +0 -1
  34. package/es/collection-manager/interfaces/o2m.js +1 -0
  35. package/es/collection-manager/interfaces/properties/operators.js +7 -0
  36. package/es/collection-manager/interfaces/subTable.js +1 -0
  37. package/es/collection-manager/templates/calendar.js +5 -0
  38. package/es/formula/Expression.d.ts +2 -0
  39. package/es/formula/Expression.js +296 -0
  40. package/es/formula/Result.d.ts +2 -0
  41. package/es/formula/Result.js +91 -0
  42. package/es/formula/index.d.ts +6 -0
  43. package/es/formula/index.js +8 -0
  44. package/es/i18n/i18n.js +7 -12
  45. package/es/index.d.ts +2 -1
  46. package/es/index.js +3 -2
  47. package/es/locale/en_US.d.ts +108 -28
  48. package/es/locale/en_US.js +108 -28
  49. package/es/locale/index.d.ts +201 -4
  50. package/es/locale/index.js +191 -58
  51. package/es/locale/ja_JP.d.ts +4 -0
  52. package/es/locale/ja_JP.js +4 -0
  53. package/es/locale/zh_CN.d.ts +11 -1
  54. package/es/locale/zh_CN.js +12 -2
  55. package/es/plugin-manager/PluginManager.js +19 -13
  56. package/es/pm/PluginManagerLink.js +38 -43
  57. package/es/pm/index.d.ts +1 -0
  58. package/es/pm/index.js +84 -35
  59. package/es/record-provider/index.d.ts +1 -0
  60. package/es/record-provider/index.js +7 -4
  61. package/es/route-switch/antd/admin-layout/index.d.ts +1 -0
  62. package/es/route-switch/antd/admin-layout/index.js +4 -6
  63. package/es/schema-component/antd/action/Action.js +19 -16
  64. package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +24 -23
  65. package/es/schema-component/antd/cron/Cron.d.ts +0 -1
  66. package/es/schema-component/antd/cron/Cron.js +16 -19
  67. package/es/schema-component/antd/cron/locale/index.d.ts +37 -0
  68. package/es/schema-component/antd/cron/locale/index.js +6 -0
  69. package/es/schema-component/antd/filter/useFilterActionProps.js +17 -23
  70. package/es/schema-component/antd/form-item/FormItem.js +5 -4
  71. package/es/schema-component/antd/index.d.ts +1 -2
  72. package/es/schema-component/antd/index.js +1 -2
  73. package/es/schema-component/antd/page/FixedBlock.d.ts +1 -1
  74. package/es/schema-component/antd/page/FixedBlock.js +70 -21
  75. package/es/schema-component/antd/page/Page.js +15 -10
  76. package/es/schema-component/antd/remote-select/RemoteSelect.js +12 -2
  77. package/es/schema-component/antd/table/Table.Array.js +1 -1
  78. package/es/schema-component/antd/table-v2/Table.js +13 -6
  79. package/es/schema-component/antd/table-v2/TableBlockDesigner.js +24 -8
  80. package/es/schema-component/hooks/useDesignable.d.ts +1 -1
  81. package/es/schema-component/hooks/useDesignable.js +45 -16
  82. package/es/schema-component/hooks/useFieldTitle.js +3 -1
  83. package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +3 -0
  84. package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +1 -0
  85. package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -0
  86. package/es/schema-initializer/utils.js +6 -9
  87. package/es/schema-templates/BlockTemplate.js +2 -2
  88. package/es/schema-templates/SchemaTemplateManagerProvider.js +1 -1
  89. package/es/system-settings/SystemSettingsShortcut.js +1 -1
  90. package/lib/acl/ACLProvider.d.ts +16 -2
  91. package/lib/acl/ACLProvider.js +283 -102
  92. package/lib/acl/Configuration/ConfigureCenter.d.ts +2 -0
  93. package/lib/acl/Configuration/ConfigureCenter.js +278 -0
  94. package/lib/acl/Configuration/MenuConfigure.js +3 -3
  95. package/lib/acl/Configuration/PermisionProvider.d.ts +4 -0
  96. package/lib/acl/Configuration/PermisionProvider.js +156 -0
  97. package/lib/acl/Configuration/RoleConfigure.js +107 -23
  98. package/lib/acl/Configuration/RoleTable.d.ts +1 -1
  99. package/lib/acl/Configuration/RoleTable.js +8 -4
  100. package/lib/acl/Configuration/RolesResourcesActions.js +2 -2
  101. package/lib/acl/Configuration/index.d.ts +1 -0
  102. package/lib/acl/Configuration/index.js +15 -1
  103. package/lib/acl/Configuration/schemas/roleCollections.js +41 -13
  104. package/lib/acl/Configuration/schemas/roles.js +47 -2
  105. package/lib/acl/Configuration/schemas/scopes.js +2 -0
  106. package/lib/acl/index.d.ts +1 -0
  107. package/lib/acl/index.js +3 -1
  108. package/lib/acl/style.less +10 -0
  109. package/lib/antd-config-provider/index.d.ts +3 -1
  110. package/lib/antd-config-provider/index.js +40 -6
  111. package/lib/antd-config-provider/loadConstrueLocale.d.ts +1 -0
  112. package/lib/antd-config-provider/loadConstrueLocale.js +304 -0
  113. package/lib/api-client/APIClient.js +5 -0
  114. package/lib/block-provider/FormBlockProvider.js +9 -3
  115. package/lib/block-provider/KanbanBlockProvider.js +3 -3
  116. package/lib/block-provider/SharedFilterProvider.d.ts +1 -0
  117. package/lib/block-provider/SharedFilterProvider.js +26 -7
  118. package/lib/collection-manager/CollectionHistoryProvider.js +14 -1
  119. package/lib/collection-manager/hooks/useCollection.d.ts +1 -0
  120. package/lib/collection-manager/hooks/useCollection.js +10 -0
  121. package/lib/collection-manager/interfaces/index.d.ts +0 -1
  122. package/lib/collection-manager/interfaces/index.js +0 -13
  123. package/lib/collection-manager/interfaces/o2m.js +1 -0
  124. package/lib/collection-manager/interfaces/properties/operators.js +7 -0
  125. package/lib/collection-manager/interfaces/subTable.js +1 -0
  126. package/lib/collection-manager/templates/calendar.js +5 -0
  127. package/lib/formula/Expression.d.ts +2 -0
  128. package/lib/formula/Expression.js +319 -0
  129. package/lib/formula/Result.d.ts +2 -0
  130. package/lib/formula/Result.js +114 -0
  131. package/lib/formula/index.d.ts +6 -0
  132. package/lib/formula/index.js +22 -0
  133. package/lib/i18n/i18n.js +7 -14
  134. package/lib/index.d.ts +2 -1
  135. package/lib/index.js +26 -13
  136. package/lib/locale/en_US.d.ts +108 -28
  137. package/lib/locale/en_US.js +108 -28
  138. package/lib/locale/index.d.ts +201 -4
  139. package/lib/locale/index.js +197 -67
  140. package/lib/locale/ja_JP.d.ts +4 -0
  141. package/lib/locale/ja_JP.js +4 -0
  142. package/lib/locale/zh_CN.d.ts +11 -1
  143. package/lib/locale/zh_CN.js +12 -2
  144. package/lib/plugin-manager/PluginManager.js +20 -13
  145. package/lib/pm/PluginManagerLink.js +37 -43
  146. package/lib/pm/index.d.ts +1 -0
  147. package/lib/pm/index.js +90 -35
  148. package/lib/record-provider/index.d.ts +1 -0
  149. package/lib/record-provider/index.js +7 -4
  150. package/lib/route-switch/antd/admin-layout/index.d.ts +1 -0
  151. package/lib/route-switch/antd/admin-layout/index.js +5 -4
  152. package/lib/schema-component/antd/action/Action.js +19 -16
  153. package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +22 -21
  154. package/lib/schema-component/antd/cron/Cron.d.ts +0 -1
  155. package/lib/schema-component/antd/cron/Cron.js +19 -24
  156. package/lib/schema-component/antd/cron/locale/index.d.ts +37 -0
  157. package/lib/schema-component/antd/cron/locale/index.js +18 -0
  158. package/lib/schema-component/antd/filter/useFilterActionProps.js +16 -23
  159. package/lib/schema-component/antd/form-item/FormItem.js +6 -4
  160. package/lib/schema-component/antd/index.d.ts +1 -2
  161. package/lib/schema-component/antd/index.js +8 -21
  162. package/lib/schema-component/antd/page/FixedBlock.d.ts +1 -1
  163. package/lib/schema-component/antd/page/FixedBlock.js +71 -21
  164. package/lib/schema-component/antd/page/Page.js +14 -9
  165. package/lib/schema-component/antd/remote-select/RemoteSelect.js +18 -3
  166. package/lib/schema-component/antd/table/Table.Array.js +1 -1
  167. package/lib/schema-component/antd/table-v2/Table.js +14 -6
  168. package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +25 -8
  169. package/lib/schema-component/hooks/useDesignable.d.ts +1 -1
  170. package/lib/schema-component/hooks/useDesignable.js +47 -18
  171. package/lib/schema-component/hooks/useFieldTitle.js +4 -1
  172. package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +3 -0
  173. package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +1 -0
  174. package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +1 -0
  175. package/lib/schema-initializer/utils.js +6 -9
  176. package/lib/schema-templates/BlockTemplate.js +2 -2
  177. package/lib/schema-templates/SchemaTemplateManagerProvider.js +1 -1
  178. package/lib/system-settings/SystemSettingsShortcut.js +1 -1
  179. package/package.json +6 -11
  180. package/es/collection-manager/interfaces/formula.d.ts +0 -2
  181. package/es/collection-manager/interfaces/formula.js +0 -74
  182. package/es/schema-component/antd/formula-input/Compute.d.ts +0 -3
  183. package/es/schema-component/antd/formula-input/Compute.js +0 -55
  184. package/es/schema-component/antd/formula-input/FormulaInput.d.ts +0 -3
  185. package/es/schema-component/antd/formula-input/FormulaInput.js +0 -167
  186. package/es/schema-component/antd/formula-input/index.d.ts +0 -1
  187. package/es/schema-component/antd/formula-input/index.js +0 -7
  188. package/lib/collection-manager/interfaces/formula.d.ts +0 -2
  189. package/lib/collection-manager/interfaces/formula.js +0 -83
  190. package/lib/schema-component/antd/formula-input/Compute.d.ts +0 -3
  191. package/lib/schema-component/antd/formula-input/Compute.js +0 -79
  192. package/lib/schema-component/antd/formula-input/FormulaInput.d.ts +0 -3
  193. package/lib/schema-component/antd/formula-input/FormulaInput.js +0 -191
  194. package/lib/schema-component/antd/formula-input/index.d.ts +0 -1
  195. package/lib/schema-component/antd/formula-input/index.js +0 -18
@@ -1,8 +1,205 @@
1
1
  export declare type LocaleOptions = {
2
2
  label: string;
3
- moment: string;
4
- antd: any;
5
- resources?: any;
6
3
  };
7
- declare const _default: Record<string, LocaleOptions>;
4
+ export { default as cron } from '../schema-component/antd/cron/locale';
5
+ declare const _default: {
6
+ 'ar-EG': {
7
+ label: string;
8
+ };
9
+ 'az-AZ': {
10
+ label: string;
11
+ };
12
+ 'bg-BG': {
13
+ label: string;
14
+ };
15
+ 'bn-BD': {
16
+ label: string;
17
+ };
18
+ 'by-BY': {
19
+ label: string;
20
+ };
21
+ 'ca-ES': {
22
+ label: string;
23
+ };
24
+ 'cs-CZ': {
25
+ label: string;
26
+ };
27
+ 'da-DK': {
28
+ label: string;
29
+ };
30
+ 'de-DE': {
31
+ label: string;
32
+ };
33
+ 'el-GR': {
34
+ label: string;
35
+ };
36
+ 'en-GB': {
37
+ label: string;
38
+ };
39
+ 'en-US': {
40
+ label: string;
41
+ };
42
+ 'es-ES': {
43
+ label: string;
44
+ };
45
+ 'et-EE': {
46
+ label: string;
47
+ };
48
+ 'fa-IR': {
49
+ label: string;
50
+ };
51
+ 'fi-FI': {
52
+ label: string;
53
+ };
54
+ 'fr-BE': {
55
+ label: string;
56
+ };
57
+ 'fr-CA': {
58
+ label: string;
59
+ };
60
+ 'fr-FR': {
61
+ label: string;
62
+ };
63
+ 'ga-IE': {
64
+ label: string;
65
+ };
66
+ 'gl-ES': {
67
+ label: string;
68
+ };
69
+ 'he-IL': {
70
+ label: string;
71
+ };
72
+ 'hi-IN': {
73
+ label: string;
74
+ };
75
+ 'hr-HR': {
76
+ label: string;
77
+ };
78
+ 'hu-HU': {
79
+ label: string;
80
+ };
81
+ 'hy-AM': {
82
+ label: string;
83
+ };
84
+ 'id-ID': {
85
+ label: string;
86
+ };
87
+ 'is-IS': {
88
+ label: string;
89
+ };
90
+ 'it-IT': {
91
+ label: string;
92
+ };
93
+ 'ja-JP': {
94
+ label: string;
95
+ };
96
+ 'ka-GE': {
97
+ label: string;
98
+ };
99
+ 'kk-KZ': {
100
+ label: string;
101
+ };
102
+ 'km-KH': {
103
+ label: string;
104
+ };
105
+ 'kn-IN': {
106
+ label: string;
107
+ };
108
+ 'ko-KR': {
109
+ label: string;
110
+ };
111
+ 'ku-IQ': {
112
+ label: string;
113
+ };
114
+ 'lt-LT': {
115
+ label: string;
116
+ };
117
+ 'lv-LV': {
118
+ label: string;
119
+ };
120
+ 'mk-MK': {
121
+ label: string;
122
+ };
123
+ 'ml-IN': {
124
+ label: string;
125
+ };
126
+ 'mn-MN': {
127
+ label: string;
128
+ };
129
+ 'ms-MY': {
130
+ label: string;
131
+ };
132
+ 'nb-NO': {
133
+ label: string;
134
+ };
135
+ 'ne-NP': {
136
+ label: string;
137
+ };
138
+ 'nl-BE': {
139
+ label: string;
140
+ };
141
+ 'nl-NL': {
142
+ label: string;
143
+ };
144
+ 'pl-PL': {
145
+ label: string;
146
+ };
147
+ 'pt-BR': {
148
+ label: string;
149
+ };
150
+ 'pt-PT': {
151
+ label: string;
152
+ };
153
+ 'ro-RO': {
154
+ label: string;
155
+ };
156
+ 'ru-RU': {
157
+ label: string;
158
+ };
159
+ 'si-LK': {
160
+ label: string;
161
+ };
162
+ 'sk-SK': {
163
+ label: string;
164
+ };
165
+ 'sl-SI': {
166
+ label: string;
167
+ };
168
+ 'sr-RS': {
169
+ label: string;
170
+ };
171
+ 'sv-SE': {
172
+ label: string;
173
+ };
174
+ 'ta-IN': {
175
+ label: string;
176
+ };
177
+ 'th-TH': {
178
+ label: string;
179
+ };
180
+ 'tk-TK': {
181
+ label: string;
182
+ };
183
+ 'tr-TR': {
184
+ label: string;
185
+ };
186
+ 'uk-UA': {
187
+ label: string;
188
+ };
189
+ 'ur-PK': {
190
+ label: string;
191
+ };
192
+ 'vi-VN': {
193
+ label: string;
194
+ };
195
+ 'zh-CN': {
196
+ label: string;
197
+ };
198
+ 'zh-HK': {
199
+ label: string;
200
+ };
201
+ 'zh-TW': {
202
+ label: string;
203
+ };
204
+ };
8
205
  export default _default;
@@ -1,69 +1,202 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
- import antdEnUS from 'antd/lib/locale/en_US';
8
- import antdJaJP from 'antd/lib/locale/ja_JP';
9
- import antdRuRU from 'antd/lib/locale/ru_RU';
10
- import antdTrTR from 'antd/lib/locale/tr_TR';
11
- import antdZhCN from 'antd/lib/locale/zh_CN';
12
- import enUS from './en_US';
13
- import jaJP from './ja_JP';
14
- import ruRU from './ru_RU';
15
- import trTR from './tr_TR';
16
- import zhCN from './zh_CN';
1
+ export { default as cron } from '../schema-component/antd/cron/locale';
17
2
  export default {
3
+ 'ar-EG': {
4
+ label: 'العربية'
5
+ },
6
+ 'az-AZ': {
7
+ label: 'Azərbaycan dili'
8
+ },
9
+ 'bg-BG': {
10
+ label: 'Български'
11
+ },
12
+ 'bn-BD': {
13
+ label: 'Bengali'
14
+ },
15
+ 'by-BY': {
16
+ label: 'Беларускі'
17
+ },
18
+ 'ca-ES': {
19
+ label: 'Сatalà/Espanya'
20
+ },
21
+ 'cs-CZ': {
22
+ label: 'Česky'
23
+ },
24
+ 'da-DK': {
25
+ label: 'Dansk'
26
+ },
27
+ 'de-DE': {
28
+ label: 'Deutsch'
29
+ },
30
+ 'el-GR': {
31
+ label: 'Ελληνικά'
32
+ },
33
+ 'en-GB': {
34
+ label: 'English(GB)'
35
+ },
18
36
  'en-US': {
19
- label: 'English',
20
- // https://github.com/moment/moment/blob/develop/locale/en.js
21
- moment: 'en',
22
- // https://github.com/ant-design/ant-design/tree/master/components/locale/en_US
23
- antd: antdEnUS,
24
- resources: {
25
- client: _objectSpread({}, enUS)
26
- }
37
+ label: 'English'
38
+ },
39
+ 'es-ES': {
40
+ label: 'Español'
41
+ },
42
+ 'et-EE': {
43
+ label: 'Estonian (Eesti)'
44
+ },
45
+ 'fa-IR': {
46
+ label: 'فارسی'
47
+ },
48
+ 'fi-FI': {
49
+ label: 'Suomi'
50
+ },
51
+ 'fr-BE': {
52
+ label: 'Français(BE)'
53
+ },
54
+ 'fr-CA': {
55
+ label: 'Français(CA)'
56
+ },
57
+ 'fr-FR': {
58
+ label: 'Français'
59
+ },
60
+ 'ga-IE': {
61
+ label: 'Gaeilge'
62
+ },
63
+ 'gl-ES': {
64
+ label: 'Galego'
65
+ },
66
+ 'he-IL': {
67
+ label: 'עברית'
68
+ },
69
+ 'hi-IN': {
70
+ label: 'हिन्दी'
71
+ },
72
+ 'hr-HR': {
73
+ label: 'Hrvatski jezik'
74
+ },
75
+ 'hu-HU': {
76
+ label: 'Magyar'
77
+ },
78
+ 'hy-AM': {
79
+ label: 'Հայերեն'
80
+ },
81
+ 'id-ID': {
82
+ label: 'Bahasa Indonesia'
83
+ },
84
+ 'is-IS': {
85
+ label: 'Íslenska'
86
+ },
87
+ 'it-IT': {
88
+ label: 'Italiano'
27
89
  },
28
90
  'ja-JP': {
29
- label: '日本語',
30
- // https://github.com/moment/moment/blob/develop/locale/ja.js
31
- moment: 'ja',
32
- // https://github.com/ant-design/ant-design/tree/master/components/locale/ja_JP
33
- antd: antdJaJP,
34
- resources: {
35
- client: _objectSpread({}, jaJP)
36
- }
91
+ label: '日本語'
37
92
  },
38
- 'zh-CN': {
39
- label: '简体中文',
40
- // https://github.com/moment/moment/blob/develop/locale/zh-cn.js
41
- moment: 'zh-cn',
42
- // https://github.com/ant-design/ant-design/tree/master/components/locale/zh_CN
43
- antd: antdZhCN,
44
- // i18next
45
- resources: {
46
- client: _objectSpread({}, zhCN)
47
- }
93
+ 'ka-GE': {
94
+ label: 'ქართული'
95
+ },
96
+ 'kk-KZ': {
97
+ label: 'Қазақ тілі'
98
+ },
99
+ 'km-KH': {
100
+ label: 'ភាសាខ្មែរ'
101
+ },
102
+ // 'kmr-IQ': { label: 'kmr_IQ' },
103
+ 'kn-IN': {
104
+ label: 'ಕನ್ನಡ'
105
+ },
106
+ 'ko-KR': {
107
+ label: '한국어'
108
+ },
109
+ 'ku-IQ': {
110
+ label: 'کوردی'
111
+ },
112
+ 'lt-LT': {
113
+ label: 'lietuvių'
114
+ },
115
+ 'lv-LV': {
116
+ label: 'Latviešu valoda'
117
+ },
118
+ 'mk-MK': {
119
+ label: 'македонски јазик'
120
+ },
121
+ 'ml-IN': {
122
+ label: 'മലയാളം'
123
+ },
124
+ 'mn-MN': {
125
+ label: 'Монгол хэл'
126
+ },
127
+ 'ms-MY': {
128
+ label: 'بهاس ملايو'
129
+ },
130
+ 'nb-NO': {
131
+ label: 'Norsk bokmål'
132
+ },
133
+ 'ne-NP': {
134
+ label: 'नेपाली'
135
+ },
136
+ 'nl-BE': {
137
+ label: 'Vlaams'
138
+ },
139
+ 'nl-NL': {
140
+ label: 'Nederlands'
141
+ },
142
+ 'pl-PL': {
143
+ label: 'Polski'
144
+ },
145
+ 'pt-BR': {
146
+ label: 'Português brasileiro'
147
+ },
148
+ 'pt-PT': {
149
+ label: 'Português'
150
+ },
151
+ 'ro-RO': {
152
+ label: 'România'
48
153
  },
49
154
  'ru-RU': {
50
- label: 'Русский',
51
- // https://github.com/moment/moment/blob/develop/locale/ru.js
52
- moment: 'ru',
53
- // https://github.com/ant-design/ant-design/tree/master/components/locale/ru_RU
54
- antd: antdRuRU,
55
- resources: {
56
- client: _objectSpread({}, ruRU)
57
- }
155
+ label: 'Русский'
156
+ },
157
+ 'si-LK': {
158
+ label: 'සිංහල'
159
+ },
160
+ 'sk-SK': {
161
+ label: 'Slovenčina'
162
+ },
163
+ 'sl-SI': {
164
+ label: 'Slovenščina'
165
+ },
166
+ 'sr-RS': {
167
+ label: 'српски језик'
168
+ },
169
+ 'sv-SE': {
170
+ label: 'Svenska'
171
+ },
172
+ 'ta-IN': {
173
+ label: 'Tamil'
174
+ },
175
+ 'th-TH': {
176
+ label: 'ภาษาไทย'
177
+ },
178
+ 'tk-TK': {
179
+ label: 'Turkmen'
58
180
  },
59
181
  'tr-TR': {
60
- label: 'Türkçe',
61
- // https://github.com/moment/moment/blob/develop/locale/tr.js
62
- moment: 'tr',
63
- // https://github.com/ant-design/ant-design/tree/master/components/locale/tr_TR
64
- antd: antdTrTR,
65
- resources: {
66
- client: _objectSpread({}, trTR)
67
- }
182
+ label: 'Türkçe'
183
+ },
184
+ 'uk-UA': {
185
+ label: 'Українська'
186
+ },
187
+ 'ur-PK': {
188
+ label: 'Oʻzbekcha'
189
+ },
190
+ 'vi-VN': {
191
+ label: 'Tiếng Việt'
192
+ },
193
+ 'zh-CN': {
194
+ label: '简体中文'
195
+ },
196
+ 'zh-HK': {
197
+ label: '繁體中文(香港)'
198
+ },
199
+ 'zh-TW': {
200
+ label: '繁體中文(台湾)'
68
201
  }
69
202
  };
@@ -402,6 +402,10 @@ declare const _default: {
402
402
  "General permissions": string;
403
403
  "Global action permissions": string;
404
404
  "General action permissions": string;
405
+ "Plugin settings permissions": string;
406
+ 'Allow to desgin pages': string;
407
+ "Allow to manage plugins": string;
408
+ "Allow to configure plugins": string;
405
409
  "Action display name": string;
406
410
  Allow: string;
407
411
  "Data scope": string;
@@ -402,6 +402,10 @@ export default {
402
402
  "General permissions": "一般設定",
403
403
  "Global action permissions": "グローバル操作権限",
404
404
  "General action permissions": "一般操作権限",
405
+ "Plugin settings permissions": "中央権限の設定",
406
+ 'Allow to desgin pages': "インタフェース構成の許可",
407
+ "Allow to manage plugins": "管理プラグインの許可",
408
+ "Allow to configure plugins": "管理構成センターの許可",
405
409
  "Action display name": "操作名",
406
410
  "Allow": "許可する",
407
411
  "Data scope": "レコードスコープ",
@@ -426,6 +426,7 @@ declare const _default: {
426
426
  exists: string;
427
427
  'not exists': string;
428
428
  'is current logged-in user': string;
429
+ 'is not current logged-in user': string;
429
430
  '=': string;
430
431
  '\u2260': string;
431
432
  '>': string;
@@ -469,6 +470,13 @@ declare const _default: {
469
470
  'General permissions': string;
470
471
  'Global action permissions': string;
471
472
  'General action permissions': string;
473
+ "Plugin settings permissions": string;
474
+ 'Allow to desgin pages': string;
475
+ "Allow to manage plugins": string;
476
+ "Allow to configure plugins": string;
477
+ 'Allows to configure interface': string;
478
+ 'Allows to install, activate, disable plugins': string;
479
+ 'Allows to configure plugins': string;
472
480
  'Action display name': string;
473
481
  Allow: string;
474
482
  'Data scope': string;
@@ -559,7 +567,7 @@ declare const _default: {
559
567
  'Built-in': string;
560
568
  Marketplace: string;
561
569
  'Coming soon...': string;
562
- 'Settings center': string;
570
+ 'All plugin settings': string;
563
571
  Bookmark: string;
564
572
  'Manage all settings': string;
565
573
  'Create inverse field in the target collection': string;
@@ -583,5 +591,7 @@ declare const _default: {
583
591
  "Search and select collection": string;
584
592
  'Please fill in the iframe URL': string;
585
593
  'Fix block': string;
594
+ 'Plugin name': string;
595
+ 'Plugin tab name': string;
586
596
  };
587
597
  export default _default;
@@ -426,6 +426,7 @@ export default {
426
426
  'exists': '存在',
427
427
  'not exists': '不存在',
428
428
  'is current logged-in user': '为当前登录用户',
429
+ 'is not current logged-in user': '不为当前登录用户',
429
430
  '=': '=',
430
431
  '≠': '≠',
431
432
  '>': '>',
@@ -469,6 +470,13 @@ export default {
469
470
  'General permissions': '通用配置',
470
471
  'Global action permissions': '全局操作权限',
471
472
  'General action permissions': '通用操作权限',
473
+ "Plugin settings permissions": "插件配置权限",
474
+ 'Allow to desgin pages': "允许界面配置",
475
+ "Allow to manage plugins": "允许管理插件",
476
+ "Allow to configure plugins": "允许管理配置中心",
477
+ 'Allows to configure interface': '允许配置界面',
478
+ 'Allows to install, activate, disable plugins': '允许安装、激活、禁用插件',
479
+ 'Allows to configure plugins': '允许配置插件',
472
480
  'Action display name': '操作名称',
473
481
  'Allow': '允许',
474
482
  'Data scope': '数据范围',
@@ -560,7 +568,7 @@ export default {
560
568
  'Built-in': '内置',
561
569
  'Marketplace': '插件市场',
562
570
  'Coming soon...': '敬请期待...',
563
- 'Settings center': '配置中心',
571
+ 'All plugin settings': '所有插件配置',
564
572
  'Bookmark': '书签',
565
573
  'Manage all settings': '管理所有配置',
566
574
  'Create inverse field in the target collection': '在目标数据表里创建反向关系字段',
@@ -583,5 +591,7 @@ export default {
583
591
  "Inner": "里面",
584
592
  "Search and select collection": "搜索并选择数据表",
585
593
  'Please fill in the iframe URL': '请填写嵌入的地址',
586
- 'Fix block': '固定区块'
594
+ 'Fix block': '固定区块',
595
+ 'Plugin name': '插件',
596
+ 'Plugin tab name': '插件标签页'
587
597
  };
@@ -36,6 +36,7 @@ import { get } from 'lodash';
36
36
  import React, { createContext, useContext } from 'react';
37
37
  import { useTranslation } from 'react-i18next';
38
38
  import { useHistory } from 'react-router-dom';
39
+ import { useACLRoleContext } from '../acl/ACLProvider';
39
40
  import { PluginManagerContext } from './context';
40
41
  export var usePrefixCls = function usePrefixCls(tag, props) {
41
42
  var _useContext = useContext(ConfigProvider.ConfigContext),
@@ -125,7 +126,7 @@ PluginManager.Toolbar = function (props) {
125
126
  history.push('/admin/settings');
126
127
  },
127
128
  icon: /*#__PURE__*/React.createElement(SettingOutlined, null)
128
- }, t('Settings center')))));
129
+ }, t('All plugin settings')))));
129
130
  };
130
131
 
131
132
  PluginManager.Toolbar.Item = function (props) {
@@ -164,26 +165,31 @@ PluginManager.Toolbar.Item = function (props) {
164
165
  };
165
166
 
166
167
  export var RemotePluginManagerToolbar = function RemotePluginManagerToolbar() {
167
- // const api = useAPIClient();
168
- // const { data, loading } = useRequest({
169
- // resource: 'plugins',
170
- // action: 'getPinned',
171
- // });
172
- // if (loading) {
173
- // return <Spin />;
174
- // }
168
+ var _useACLRoleContext = useACLRoleContext(),
169
+ allowAll = _useACLRoleContext.allowAll,
170
+ snippets = _useACLRoleContext.snippets;
171
+
172
+ var getSnippetsAllow = function getSnippetsAllow(aclKey) {
173
+ return allowAll || (snippets === null || snippets === void 0 ? void 0 : snippets.includes(aclKey));
174
+ };
175
+
175
176
  var items = [{
176
177
  component: 'DesignableSwitch',
177
- pin: true
178
+ pin: true,
179
+ isAllow: getSnippetsAllow('ui.*')
178
180
  }, {
179
181
  component: 'PluginManagerLink',
180
- pin: true
182
+ pin: true,
183
+ isAllow: getSnippetsAllow('pm')
181
184
  }, {
182
185
  component: 'SettingsCenterDropdown',
183
- pin: true
186
+ pin: true,
187
+ isAllow: getSnippetsAllow('pm.*')
184
188
  } // ...data?.data,
185
189
  ];
186
190
  return /*#__PURE__*/React.createElement(PluginManager.Toolbar, {
187
- items: items
191
+ items: items.filter(function (v) {
192
+ return v.isAllow;
193
+ })
188
194
  });
189
195
  };