@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;
@@ -3,87 +3,217 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "cron", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _locale.default;
10
+ }
11
+ });
6
12
  exports.default = void 0;
7
13
 
8
- var _en_US = _interopRequireDefault(require("antd/lib/locale/en_US"));
9
-
10
- var _ja_JP = _interopRequireDefault(require("antd/lib/locale/ja_JP"));
11
-
12
- var _ru_RU = _interopRequireDefault(require("antd/lib/locale/ru_RU"));
13
-
14
- var _tr_TR = _interopRequireDefault(require("antd/lib/locale/tr_TR"));
15
-
16
- var _zh_CN = _interopRequireDefault(require("antd/lib/locale/zh_CN"));
17
-
18
- var _en_US2 = _interopRequireDefault(require("./en_US"));
19
-
20
- var _ja_JP2 = _interopRequireDefault(require("./ja_JP"));
21
-
22
- var _ru_RU2 = _interopRequireDefault(require("./ru_RU"));
23
-
24
- var _tr_TR2 = _interopRequireDefault(require("./tr_TR"));
25
-
26
- var _zh_CN2 = _interopRequireDefault(require("./zh_CN"));
14
+ var _locale = _interopRequireDefault(require("../schema-component/antd/cron/locale"));
27
15
 
28
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
17
 
30
- 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; }
31
-
32
- 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; }
33
-
34
- 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; }
35
-
36
18
  var _default = {
19
+ 'ar-EG': {
20
+ label: 'العربية'
21
+ },
22
+ 'az-AZ': {
23
+ label: 'Azərbaycan dili'
24
+ },
25
+ 'bg-BG': {
26
+ label: 'Български'
27
+ },
28
+ 'bn-BD': {
29
+ label: 'Bengali'
30
+ },
31
+ 'by-BY': {
32
+ label: 'Беларускі'
33
+ },
34
+ 'ca-ES': {
35
+ label: 'Сatalà/Espanya'
36
+ },
37
+ 'cs-CZ': {
38
+ label: 'Česky'
39
+ },
40
+ 'da-DK': {
41
+ label: 'Dansk'
42
+ },
43
+ 'de-DE': {
44
+ label: 'Deutsch'
45
+ },
46
+ 'el-GR': {
47
+ label: 'Ελληνικά'
48
+ },
49
+ 'en-GB': {
50
+ label: 'English(GB)'
51
+ },
37
52
  'en-US': {
38
- label: 'English',
39
- // https://github.com/moment/moment/blob/develop/locale/en.js
40
- moment: 'en',
41
- // https://github.com/ant-design/ant-design/tree/master/components/locale/en_US
42
- antd: _en_US.default,
43
- resources: {
44
- client: _objectSpread({}, _en_US2.default)
45
- }
53
+ label: 'English'
54
+ },
55
+ 'es-ES': {
56
+ label: 'Español'
57
+ },
58
+ 'et-EE': {
59
+ label: 'Estonian (Eesti)'
60
+ },
61
+ 'fa-IR': {
62
+ label: 'فارسی'
63
+ },
64
+ 'fi-FI': {
65
+ label: 'Suomi'
66
+ },
67
+ 'fr-BE': {
68
+ label: 'Français(BE)'
69
+ },
70
+ 'fr-CA': {
71
+ label: 'Français(CA)'
72
+ },
73
+ 'fr-FR': {
74
+ label: 'Français'
75
+ },
76
+ 'ga-IE': {
77
+ label: 'Gaeilge'
78
+ },
79
+ 'gl-ES': {
80
+ label: 'Galego'
81
+ },
82
+ 'he-IL': {
83
+ label: 'עברית'
84
+ },
85
+ 'hi-IN': {
86
+ label: 'हिन्दी'
87
+ },
88
+ 'hr-HR': {
89
+ label: 'Hrvatski jezik'
90
+ },
91
+ 'hu-HU': {
92
+ label: 'Magyar'
93
+ },
94
+ 'hy-AM': {
95
+ label: 'Հայերեն'
96
+ },
97
+ 'id-ID': {
98
+ label: 'Bahasa Indonesia'
99
+ },
100
+ 'is-IS': {
101
+ label: 'Íslenska'
102
+ },
103
+ 'it-IT': {
104
+ label: 'Italiano'
46
105
  },
47
106
  'ja-JP': {
48
- label: '日本語',
49
- // https://github.com/moment/moment/blob/develop/locale/ja.js
50
- moment: 'ja',
51
- // https://github.com/ant-design/ant-design/tree/master/components/locale/ja_JP
52
- antd: _ja_JP.default,
53
- resources: {
54
- client: _objectSpread({}, _ja_JP2.default)
55
- }
107
+ label: '日本語'
56
108
  },
57
- 'zh-CN': {
58
- label: '简体中文',
59
- // https://github.com/moment/moment/blob/develop/locale/zh-cn.js
60
- moment: 'zh-cn',
61
- // https://github.com/ant-design/ant-design/tree/master/components/locale/zh_CN
62
- antd: _zh_CN.default,
63
- // i18next
64
- resources: {
65
- client: _objectSpread({}, _zh_CN2.default)
66
- }
109
+ 'ka-GE': {
110
+ label: 'ქართული'
111
+ },
112
+ 'kk-KZ': {
113
+ label: 'Қазақ тілі'
114
+ },
115
+ 'km-KH': {
116
+ label: 'ភាសាខ្មែរ'
117
+ },
118
+ // 'kmr-IQ': { label: 'kmr_IQ' },
119
+ 'kn-IN': {
120
+ label: 'ಕನ್ನಡ'
121
+ },
122
+ 'ko-KR': {
123
+ label: '한국어'
124
+ },
125
+ 'ku-IQ': {
126
+ label: 'کوردی'
127
+ },
128
+ 'lt-LT': {
129
+ label: 'lietuvių'
130
+ },
131
+ 'lv-LV': {
132
+ label: 'Latviešu valoda'
133
+ },
134
+ 'mk-MK': {
135
+ label: 'македонски јазик'
136
+ },
137
+ 'ml-IN': {
138
+ label: 'മലയാളം'
139
+ },
140
+ 'mn-MN': {
141
+ label: 'Монгол хэл'
142
+ },
143
+ 'ms-MY': {
144
+ label: 'بهاس ملايو'
145
+ },
146
+ 'nb-NO': {
147
+ label: 'Norsk bokmål'
148
+ },
149
+ 'ne-NP': {
150
+ label: 'नेपाली'
151
+ },
152
+ 'nl-BE': {
153
+ label: 'Vlaams'
154
+ },
155
+ 'nl-NL': {
156
+ label: 'Nederlands'
157
+ },
158
+ 'pl-PL': {
159
+ label: 'Polski'
160
+ },
161
+ 'pt-BR': {
162
+ label: 'Português brasileiro'
163
+ },
164
+ 'pt-PT': {
165
+ label: 'Português'
166
+ },
167
+ 'ro-RO': {
168
+ label: 'România'
67
169
  },
68
170
  'ru-RU': {
69
- label: 'Русский',
70
- // https://github.com/moment/moment/blob/develop/locale/ru.js
71
- moment: 'ru',
72
- // https://github.com/ant-design/ant-design/tree/master/components/locale/ru_RU
73
- antd: _ru_RU.default,
74
- resources: {
75
- client: _objectSpread({}, _ru_RU2.default)
76
- }
171
+ label: 'Русский'
172
+ },
173
+ 'si-LK': {
174
+ label: 'සිංහල'
175
+ },
176
+ 'sk-SK': {
177
+ label: 'Slovenčina'
178
+ },
179
+ 'sl-SI': {
180
+ label: 'Slovenščina'
181
+ },
182
+ 'sr-RS': {
183
+ label: 'српски језик'
184
+ },
185
+ 'sv-SE': {
186
+ label: 'Svenska'
187
+ },
188
+ 'ta-IN': {
189
+ label: 'Tamil'
190
+ },
191
+ 'th-TH': {
192
+ label: 'ภาษาไทย'
193
+ },
194
+ 'tk-TK': {
195
+ label: 'Turkmen'
77
196
  },
78
197
  'tr-TR': {
79
- label: 'Türkçe',
80
- // https://github.com/moment/moment/blob/develop/locale/tr.js
81
- moment: 'tr',
82
- // https://github.com/ant-design/ant-design/tree/master/components/locale/tr_TR
83
- antd: _tr_TR.default,
84
- resources: {
85
- client: _objectSpread({}, _tr_TR2.default)
86
- }
198
+ label: 'Türkçe'
199
+ },
200
+ 'uk-UA': {
201
+ label: 'Українська'
202
+ },
203
+ 'ur-PK': {
204
+ label: 'Oʻzbekcha'
205
+ },
206
+ 'vi-VN': {
207
+ label: 'Tiếng Việt'
208
+ },
209
+ 'zh-CN': {
210
+ label: '简体中文'
211
+ },
212
+ 'zh-HK': {
213
+ label: '繁體中文(香港)'
214
+ },
215
+ 'zh-TW': {
216
+ label: '繁體中文(台湾)'
87
217
  }
88
218
  };
89
219
  exports.default = _default;
@@ -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;
@@ -408,6 +408,10 @@ var _default = {
408
408
  "General permissions": "一般設定",
409
409
  "Global action permissions": "グローバル操作権限",
410
410
  "General action permissions": "一般操作権限",
411
+ "Plugin settings permissions": "中央権限の設定",
412
+ 'Allow to desgin pages': "インタフェース構成の許可",
413
+ "Allow to manage plugins": "管理プラグインの許可",
414
+ "Allow to configure plugins": "管理構成センターの許可",
411
415
  "Action display name": "操作名",
412
416
  "Allow": "許可する",
413
417
  "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;
@@ -432,6 +432,7 @@ var _default = {
432
432
  'exists': '存在',
433
433
  'not exists': '不存在',
434
434
  'is current logged-in user': '为当前登录用户',
435
+ 'is not current logged-in user': '不为当前登录用户',
435
436
  '=': '=',
436
437
  '≠': '≠',
437
438
  '>': '>',
@@ -475,6 +476,13 @@ var _default = {
475
476
  'General permissions': '通用配置',
476
477
  'Global action permissions': '全局操作权限',
477
478
  'General action permissions': '通用操作权限',
479
+ "Plugin settings permissions": "插件配置权限",
480
+ 'Allow to desgin pages': "允许界面配置",
481
+ "Allow to manage plugins": "允许管理插件",
482
+ "Allow to configure plugins": "允许管理配置中心",
483
+ 'Allows to configure interface': '允许配置界面',
484
+ 'Allows to install, activate, disable plugins': '允许安装、激活、禁用插件',
485
+ 'Allows to configure plugins': '允许配置插件',
478
486
  'Action display name': '操作名称',
479
487
  'Allow': '允许',
480
488
  'Data scope': '数据范围',
@@ -566,7 +574,7 @@ var _default = {
566
574
  'Built-in': '内置',
567
575
  'Marketplace': '插件市场',
568
576
  'Coming soon...': '敬请期待...',
569
- 'Settings center': '配置中心',
577
+ 'All plugin settings': '所有插件配置',
570
578
  'Bookmark': '书签',
571
579
  'Manage all settings': '管理所有配置',
572
580
  'Create inverse field in the target collection': '在目标数据表里创建反向关系字段',
@@ -589,6 +597,8 @@ var _default = {
589
597
  "Inner": "里面",
590
598
  "Search and select collection": "搜索并选择数据表",
591
599
  'Please fill in the iframe URL': '请填写嵌入的地址',
592
- 'Fix block': '固定区块'
600
+ 'Fix block': '固定区块',
601
+ 'Plugin name': '插件',
602
+ 'Plugin tab name': '插件标签页'
593
603
  };
594
604
  exports.default = _default;
@@ -23,6 +23,8 @@ var _reactI18next = require("react-i18next");
23
23
 
24
24
  var _reactRouterDom = require("react-router-dom");
25
25
 
26
+ var _ACLProvider = require("../acl/ACLProvider");
27
+
26
28
  var _context = require("./context");
27
29
 
28
30
  var _templateObject;
@@ -154,7 +156,7 @@ PluginManager.Toolbar = function (props) {
154
156
  history.push('/admin/settings');
155
157
  },
156
158
  icon: /*#__PURE__*/_react.default.createElement(_icons.SettingOutlined, null)
157
- }, t('Settings center')))));
159
+ }, t('All plugin settings')))));
158
160
  };
159
161
 
160
162
  PluginManager.Toolbar.Item = function (props) {
@@ -195,27 +197,32 @@ PluginManager.Toolbar.Item = function (props) {
195
197
  };
196
198
 
197
199
  var RemotePluginManagerToolbar = function RemotePluginManagerToolbar() {
198
- // const api = useAPIClient();
199
- // const { data, loading } = useRequest({
200
- // resource: 'plugins',
201
- // action: 'getPinned',
202
- // });
203
- // if (loading) {
204
- // return <Spin />;
205
- // }
200
+ var _useACLRoleContext = (0, _ACLProvider.useACLRoleContext)(),
201
+ allowAll = _useACLRoleContext.allowAll,
202
+ snippets = _useACLRoleContext.snippets;
203
+
204
+ var getSnippetsAllow = function getSnippetsAllow(aclKey) {
205
+ return allowAll || (snippets === null || snippets === void 0 ? void 0 : snippets.includes(aclKey));
206
+ };
207
+
206
208
  var items = [{
207
209
  component: 'DesignableSwitch',
208
- pin: true
210
+ pin: true,
211
+ isAllow: getSnippetsAllow('ui.*')
209
212
  }, {
210
213
  component: 'PluginManagerLink',
211
- pin: true
214
+ pin: true,
215
+ isAllow: getSnippetsAllow('pm')
212
216
  }, {
213
217
  component: 'SettingsCenterDropdown',
214
- pin: true
218
+ pin: true,
219
+ isAllow: getSnippetsAllow('pm.*')
215
220
  } // ...data?.data,
216
221
  ];
217
222
  return /*#__PURE__*/_react.default.createElement(PluginManager.Toolbar, {
218
- items: items
223
+ items: items.filter(function (v) {
224
+ return v.isAllow;
225
+ })
219
226
  });
220
227
  };
221
228