@nocobase/client 0.7.7-alpha.1 → 0.8.0-alpha.4

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 (229) hide show
  1. package/es/acl/ACLShortcut.d.ts +2 -0
  2. package/es/acl/ACLShortcut.js +31 -2
  3. package/es/application/Application.d.ts +3 -1
  4. package/es/application/Application.js +131 -39
  5. package/es/block-provider/CalendarBlockProvider.d.ts +1 -0
  6. package/es/block-provider/CalendarBlockProvider.js +6 -3
  7. package/es/block-provider/TableSelectorProvider.js +21 -6
  8. package/es/block-provider/hooks/index.d.ts +6 -0
  9. package/es/block-provider/hooks/index.js +485 -115
  10. package/es/collection-manager/CollectionManagerProvider.js +26 -45
  11. package/es/collection-manager/CollectionManagerShortcut.d.ts +2 -0
  12. package/es/collection-manager/CollectionManagerShortcut.js +38 -3
  13. package/es/collection-manager/Configuration/AddFieldAction.d.ts +5 -1
  14. package/es/collection-manager/Configuration/AddFieldAction.js +44 -13
  15. package/es/collection-manager/Configuration/EditFieldAction.d.ts +1 -0
  16. package/es/collection-manager/Configuration/EditFieldAction.js +24 -11
  17. package/es/collection-manager/Configuration/index.d.ts +2 -0
  18. package/es/collection-manager/Configuration/index.js +2 -0
  19. package/es/collection-manager/Configuration/schemas/collectionFields.js +2 -2
  20. package/es/collection-manager/index.d.ts +1 -0
  21. package/es/collection-manager/index.js +2 -1
  22. package/es/collection-manager/interfaces/index.d.ts +1 -0
  23. package/es/collection-manager/interfaces/index.js +1 -0
  24. package/es/collection-manager/interfaces/json.d.ts +2 -0
  25. package/es/collection-manager/interfaces/json.js +48 -0
  26. package/es/collection-manager/interfaces/m2o.js +3 -3
  27. package/es/collection-manager/interfaces/o2m.js +5 -6
  28. package/es/collection-manager/interfaces/o2o.js +5 -5
  29. package/es/collection-manager/interfaces/properties/index.d.ts +14 -0
  30. package/es/collection-manager/interfaces/properties/index.js +23 -0
  31. package/es/collection-manager/interfaces/sequence.js +13 -9
  32. package/es/index.d.ts +1 -0
  33. package/es/index.js +1 -0
  34. package/es/locale/en_US.d.ts +13 -1
  35. package/es/locale/en_US.js +14 -2
  36. package/es/locale/ja_JP.d.ts +1 -1
  37. package/es/locale/ja_JP.js +1 -1
  38. package/es/locale/ru_RU.d.ts +1 -1
  39. package/es/locale/ru_RU.js +1 -1
  40. package/es/locale/tr_TR.d.ts +1 -1
  41. package/es/locale/tr_TR.js +1 -1
  42. package/es/locale/zh_CN.d.ts +39 -1
  43. package/es/locale/zh_CN.js +40 -2
  44. package/es/plugin-manager/PluginManager.js +35 -23
  45. package/es/pm/PluginManagerLink.d.ts +2 -0
  46. package/es/pm/PluginManagerLink.js +111 -0
  47. package/es/pm/index.d.ts +4 -0
  48. package/es/pm/index.js +422 -0
  49. package/es/route-switch/antd/admin-layout/index.js +1 -1
  50. package/es/schema-component/antd/action/Action.Designer.js +35 -12
  51. package/es/schema-component/antd/action/Action.Modal.js +4 -2
  52. package/es/schema-component/antd/action/Action.js +3 -3
  53. package/es/schema-component/antd/action/context.d.ts +2 -0
  54. package/es/schema-component/antd/action/hooks.d.ts +1 -0
  55. package/es/schema-component/antd/calendar/Calendar.Designer.js +19 -6
  56. package/es/schema-component/antd/calendar/Calendar.js +23 -2
  57. package/es/schema-component/antd/calendar/Title.js +18 -3
  58. package/es/schema-component/antd/calendar/components/Header.d.ts +10 -0
  59. package/es/schema-component/antd/calendar/components/Header.js +43 -0
  60. package/es/schema-component/antd/calendar/style.less +53 -9
  61. package/es/schema-component/antd/calendar/types.d.ts +6 -0
  62. package/es/schema-component/antd/calendar/utils.d.ts +2 -0
  63. package/es/schema-component/antd/calendar/utils.js +7 -0
  64. package/es/schema-component/antd/checkbox/Checkbox.js +13 -4
  65. package/es/schema-component/antd/formula-input/FormulaInput.js +28 -37
  66. package/es/schema-component/antd/input/Input.d.ts +1 -0
  67. package/es/schema-component/antd/input/Input.js +2 -0
  68. package/es/schema-component/antd/input/Json.d.ts +6 -0
  69. package/es/schema-component/antd/input/Json.js +41 -0
  70. package/es/schema-component/antd/input/ReadPretty.d.ts +3 -0
  71. package/es/schema-component/antd/input/ReadPretty.js +15 -0
  72. package/es/schema-component/antd/input/index.d.ts +1 -0
  73. package/es/schema-component/antd/input/index.js +2 -1
  74. package/es/schema-component/antd/markdown/Markdown.Void.js +5 -2
  75. package/es/schema-component/antd/radio/Radio.js +2 -1
  76. package/es/schema-component/antd/select/ReadPretty.js +2 -1
  77. package/es/schema-component/antd/table-v2/TableSelectorDesigner.js +16 -2
  78. package/es/schema-component/antd/upload/Upload.js +2 -1
  79. package/es/schema-component/antd/upload/shared.js +5 -6
  80. package/es/schema-component/antd/upload/type.d.ts +2 -0
  81. package/es/schema-initializer/buttons/BulkEditFormItemInitializers.d.ts +1 -0
  82. package/es/schema-initializer/buttons/BulkEditFormItemInitializers.js +50 -0
  83. package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.d.ts +1 -0
  84. package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +35 -0
  85. package/es/schema-initializer/buttons/FormActionInitializers.d.ts +132 -0
  86. package/es/schema-initializer/buttons/FormActionInitializers.js +118 -0
  87. package/es/schema-initializer/buttons/TabPaneInitializers.d.ts +1 -0
  88. package/es/schema-initializer/buttons/TabPaneInitializers.js +13 -0
  89. package/es/schema-initializer/buttons/TableActionInitializers.d.ts +56 -2
  90. package/es/schema-initializer/buttons/TableActionInitializers.js +45 -0
  91. package/es/schema-initializer/buttons/index.d.ts +2 -0
  92. package/es/schema-initializer/buttons/index.js +2 -0
  93. package/es/schema-initializer/components/BulkEditField.d.ts +7 -0
  94. package/es/schema-initializer/components/BulkEditField.js +187 -0
  95. package/es/schema-initializer/components/index.d.ts +1 -0
  96. package/es/schema-initializer/components/index.js +2 -1
  97. package/es/schema-initializer/items/BlockInitializer.js +8 -8
  98. package/es/schema-initializer/items/BulkEditSubmitActionInitializer.d.ts +1 -0
  99. package/es/schema-initializer/items/BulkEditSubmitActionInitializer.js +24 -0
  100. package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.d.ts +1 -0
  101. package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +103 -0
  102. package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.d.ts +1 -0
  103. package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.js +61 -0
  104. package/es/schema-initializer/items/index.d.ts +3 -0
  105. package/es/schema-initializer/items/index.js +3 -0
  106. package/es/schema-initializer/utils.d.ts +1 -0
  107. package/es/schema-initializer/utils.js +67 -12
  108. package/es/schema-settings/SchemaSettings.d.ts +6 -0
  109. package/es/schema-settings/SchemaSettings.js +4 -1
  110. package/es/schema-templates/BlockTemplatePage.d.ts +1 -0
  111. package/es/schema-templates/BlockTemplatePage.js +7 -0
  112. package/es/schema-templates/SchemaTemplateShortcut.js +1 -1
  113. package/es/system-settings/SystemSettingsShortcut.d.ts +2 -0
  114. package/es/system-settings/SystemSettingsShortcut.js +134 -5
  115. package/lib/acl/ACLShortcut.d.ts +2 -0
  116. package/lib/acl/ACLShortcut.js +41 -4
  117. package/lib/application/Application.d.ts +3 -1
  118. package/lib/application/Application.js +139 -39
  119. package/lib/block-provider/CalendarBlockProvider.d.ts +1 -0
  120. package/lib/block-provider/CalendarBlockProvider.js +6 -3
  121. package/lib/block-provider/TableSelectorProvider.js +21 -6
  122. package/lib/block-provider/hooks/index.d.ts +6 -0
  123. package/lib/block-provider/hooks/index.js +496 -115
  124. package/lib/collection-manager/CollectionManagerProvider.js +28 -47
  125. package/lib/collection-manager/CollectionManagerShortcut.d.ts +2 -0
  126. package/lib/collection-manager/CollectionManagerShortcut.js +47 -4
  127. package/lib/collection-manager/Configuration/AddFieldAction.d.ts +5 -1
  128. package/lib/collection-manager/Configuration/AddFieldAction.js +48 -12
  129. package/lib/collection-manager/Configuration/EditFieldAction.d.ts +1 -0
  130. package/lib/collection-manager/Configuration/EditFieldAction.js +26 -10
  131. package/lib/collection-manager/Configuration/index.d.ts +2 -0
  132. package/lib/collection-manager/Configuration/index.js +26 -0
  133. package/lib/collection-manager/Configuration/schemas/collectionFields.js +2 -2
  134. package/lib/collection-manager/index.d.ts +1 -0
  135. package/lib/collection-manager/index.js +14 -0
  136. package/lib/collection-manager/interfaces/index.d.ts +1 -0
  137. package/lib/collection-manager/interfaces/index.js +13 -0
  138. package/lib/collection-manager/interfaces/json.d.ts +2 -0
  139. package/lib/collection-manager/interfaces/json.js +58 -0
  140. package/lib/collection-manager/interfaces/m2o.js +2 -2
  141. package/lib/collection-manager/interfaces/o2m.js +4 -5
  142. package/lib/collection-manager/interfaces/o2o.js +4 -4
  143. package/lib/collection-manager/interfaces/properties/index.d.ts +14 -0
  144. package/lib/collection-manager/interfaces/properties/index.js +25 -1
  145. package/lib/collection-manager/interfaces/sequence.js +13 -9
  146. package/lib/index.d.ts +1 -0
  147. package/lib/index.js +13 -0
  148. package/lib/locale/en_US.d.ts +13 -1
  149. package/lib/locale/en_US.js +14 -2
  150. package/lib/locale/ja_JP.d.ts +1 -1
  151. package/lib/locale/ja_JP.js +1 -1
  152. package/lib/locale/ru_RU.d.ts +1 -1
  153. package/lib/locale/ru_RU.js +1 -1
  154. package/lib/locale/tr_TR.d.ts +1 -1
  155. package/lib/locale/tr_TR.js +1 -1
  156. package/lib/locale/zh_CN.d.ts +39 -1
  157. package/lib/locale/zh_CN.js +40 -2
  158. package/lib/plugin-manager/PluginManager.js +33 -21
  159. package/lib/pm/PluginManagerLink.d.ts +2 -0
  160. package/lib/pm/PluginManagerLink.js +138 -0
  161. package/lib/pm/index.d.ts +4 -0
  162. package/lib/pm/index.js +474 -0
  163. package/lib/route-switch/antd/admin-layout/index.js +1 -1
  164. package/lib/schema-component/antd/action/Action.Designer.js +35 -12
  165. package/lib/schema-component/antd/action/Action.Modal.js +4 -2
  166. package/lib/schema-component/antd/action/Action.js +3 -3
  167. package/lib/schema-component/antd/action/context.d.ts +2 -0
  168. package/lib/schema-component/antd/action/hooks.d.ts +1 -0
  169. package/lib/schema-component/antd/calendar/Calendar.Designer.js +19 -6
  170. package/lib/schema-component/antd/calendar/Calendar.js +24 -2
  171. package/lib/schema-component/antd/calendar/Title.js +18 -2
  172. package/lib/schema-component/antd/calendar/components/Header.d.ts +10 -0
  173. package/lib/schema-component/antd/calendar/components/Header.js +57 -0
  174. package/lib/schema-component/antd/calendar/style.less +53 -9
  175. package/lib/schema-component/antd/calendar/types.d.ts +6 -0
  176. package/lib/schema-component/antd/calendar/utils.d.ts +2 -0
  177. package/lib/schema-component/antd/calendar/utils.js +18 -2
  178. package/lib/schema-component/antd/checkbox/Checkbox.js +13 -4
  179. package/lib/schema-component/antd/formula-input/FormulaInput.js +28 -37
  180. package/lib/schema-component/antd/input/Input.d.ts +1 -0
  181. package/lib/schema-component/antd/input/Input.js +3 -0
  182. package/lib/schema-component/antd/input/Json.d.ts +6 -0
  183. package/lib/schema-component/antd/input/Json.js +53 -0
  184. package/lib/schema-component/antd/input/ReadPretty.d.ts +3 -0
  185. package/lib/schema-component/antd/input/ReadPretty.js +16 -0
  186. package/lib/schema-component/antd/input/index.d.ts +1 -0
  187. package/lib/schema-component/antd/input/index.js +13 -0
  188. package/lib/schema-component/antd/markdown/Markdown.Void.js +8 -2
  189. package/lib/schema-component/antd/radio/Radio.js +2 -1
  190. package/lib/schema-component/antd/select/ReadPretty.js +2 -1
  191. package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +17 -2
  192. package/lib/schema-component/antd/upload/Upload.js +2 -1
  193. package/lib/schema-component/antd/upload/shared.js +4 -5
  194. package/lib/schema-component/antd/upload/type.d.ts +2 -0
  195. package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.d.ts +1 -0
  196. package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.js +66 -0
  197. package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.d.ts +1 -0
  198. package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +50 -0
  199. package/lib/schema-initializer/buttons/FormActionInitializers.d.ts +132 -0
  200. package/lib/schema-initializer/buttons/FormActionInitializers.js +121 -2
  201. package/lib/schema-initializer/buttons/TabPaneInitializers.d.ts +1 -0
  202. package/lib/schema-initializer/buttons/TabPaneInitializers.js +18 -2
  203. package/lib/schema-initializer/buttons/TableActionInitializers.d.ts +56 -2
  204. package/lib/schema-initializer/buttons/TableActionInitializers.js +45 -0
  205. package/lib/schema-initializer/buttons/index.d.ts +2 -0
  206. package/lib/schema-initializer/buttons/index.js +26 -0
  207. package/lib/schema-initializer/components/BulkEditField.d.ts +7 -0
  208. package/lib/schema-initializer/components/BulkEditField.js +210 -0
  209. package/lib/schema-initializer/components/index.d.ts +1 -0
  210. package/lib/schema-initializer/components/index.js +13 -0
  211. package/lib/schema-initializer/items/BlockInitializer.js +8 -7
  212. package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.d.ts +1 -0
  213. package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.js +37 -0
  214. package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.d.ts +1 -0
  215. package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +121 -0
  216. package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.d.ts +1 -0
  217. package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.js +74 -0
  218. package/lib/schema-initializer/items/index.d.ts +3 -0
  219. package/lib/schema-initializer/items/index.js +39 -0
  220. package/lib/schema-initializer/utils.d.ts +1 -0
  221. package/lib/schema-initializer/utils.js +71 -13
  222. package/lib/schema-settings/SchemaSettings.d.ts +6 -0
  223. package/lib/schema-settings/SchemaSettings.js +3 -0
  224. package/lib/schema-templates/BlockTemplatePage.d.ts +1 -0
  225. package/lib/schema-templates/BlockTemplatePage.js +12 -2
  226. package/lib/schema-templates/SchemaTemplateShortcut.js +1 -1
  227. package/lib/system-settings/SystemSettingsShortcut.d.ts +2 -0
  228. package/lib/system-settings/SystemSettingsShortcut.js +145 -7
  229. package/package.json +5 -4
@@ -101,9 +101,8 @@ var o2m = {
101
101
  }
102
102
  };
103
103
  } else {
104
- schema['x-component'] = 'CollectionField';
105
- schema.type = 'array';
106
-
104
+ // schema['x-component'] = 'CollectionField';
105
+ // schema.type = 'array';
107
106
  if (block === 'Form') {
108
107
  schema['properties'] = {
109
108
  viewer: (0, _lodash.cloneDeep)(_properties2.recordPickerViewer),
@@ -136,7 +135,7 @@ var o2m = {
136
135
  schema['x-component-props']['ellipsis'] = true;
137
136
  }
138
137
  },
139
- properties: _objectSpread({
138
+ properties: _objectSpread(_objectSpread({
140
139
  'uiSchema.title': {
141
140
  type: 'string',
142
141
  title: '{{t("Field display name")}}',
@@ -257,7 +256,7 @@ var o2m = {
257
256
  }
258
257
  }
259
258
  }
260
- }, _properties2.reverseFieldProperties),
259
+ }, _properties2.constraintsProps), _properties2.reverseFieldProperties),
261
260
  filterable: {
262
261
  nested: true,
263
262
  children: [// {
@@ -319,7 +319,7 @@ var oho = {
319
319
  schema['x-component-props']['ellipsis'] = true;
320
320
  }
321
321
  },
322
- properties: _objectSpread({
322
+ properties: _objectSpread(_objectSpread({
323
323
  'uiSchema.title': {
324
324
  type: 'string',
325
325
  title: '{{t("Field display name")}}',
@@ -412,7 +412,7 @@ var oho = {
412
412
  }
413
413
  }
414
414
  }
415
- }, _properties2.reverseFieldProperties),
415
+ }, _properties2.constraintsProps), _properties2.reverseFieldProperties),
416
416
  filterable: {
417
417
  nested: true,
418
418
  children: [// {
@@ -490,7 +490,7 @@ var obo = {
490
490
  schema['x-component-props']['ellipsis'] = true;
491
491
  }
492
492
  },
493
- properties: _objectSpread({
493
+ properties: _objectSpread(_objectSpread({
494
494
  'uiSchema.title': {
495
495
  type: 'string',
496
496
  title: '{{t("Field display name")}}',
@@ -584,7 +584,7 @@ var obo = {
584
584
  }
585
585
  }
586
586
  }
587
- }, _properties2.reverseFieldProperties),
587
+ }, _properties2.constraintsProps), _properties2.reverseFieldProperties),
588
588
  filterable: {
589
589
  nested: true,
590
590
  children: [// {
@@ -8,6 +8,20 @@ export declare const unique: {
8
8
  'x-component': string;
9
9
  };
10
10
  export declare const relationshipType: ISchema;
11
+ export declare const constraintsProps: {
12
+ onDelete: {
13
+ type: string;
14
+ title: string;
15
+ required: boolean;
16
+ default: string;
17
+ 'x-decorator': string;
18
+ 'x-component': string;
19
+ enum: {
20
+ label: string;
21
+ value: string;
22
+ }[];
23
+ };
24
+ };
11
25
  export declare const reverseFieldProperties: Record<string, ISchema>;
12
26
  export declare const dateTimeProps: {
13
27
  [key: string]: ISchema;
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.unique = exports.type = exports.reverseFieldProperties = exports.relationshipType = exports.recordPickerViewer = exports.recordPickerSelector = exports.operators = exports.defaultProps = exports.dateTimeProps = exports.dataSource = void 0;
8
+ exports.unique = exports.type = exports.reverseFieldProperties = exports.relationshipType = exports.recordPickerViewer = exports.recordPickerSelector = exports.operators = exports.defaultProps = exports.dateTimeProps = exports.dataSource = exports.constraintsProps = void 0;
9
9
 
10
10
  var _shared = require("@formily/shared");
11
11
 
@@ -113,6 +113,30 @@ var relationshipType = {
113
113
  }]
114
114
  };
115
115
  exports.relationshipType = relationshipType;
116
+ var constraintsProps = {
117
+ onDelete: {
118
+ type: 'string',
119
+ title: '{{t("ON DELETE")}}',
120
+ required: true,
121
+ default: 'SET NULL',
122
+ 'x-decorator': 'FormItem',
123
+ 'x-component': 'Select',
124
+ enum: [{
125
+ label: "{{t('SET NULL')}}",
126
+ value: 'SET NULL'
127
+ }, {
128
+ label: "{{t('RESTRICT')}}",
129
+ value: 'RESTRICT'
130
+ }, {
131
+ label: "{{t('CASCADE')}}",
132
+ value: 'CASCADE'
133
+ }, {
134
+ label: "{{t('NO ACTION')}}",
135
+ value: 'NO ACTION'
136
+ }]
137
+ }
138
+ };
139
+ exports.constraintsProps = constraintsProps;
116
140
  var reverseFieldProperties = {
117
141
  reverse: {
118
142
  type: 'void',
@@ -173,27 +173,31 @@ var RuleTypes = {
173
173
  }, _defineProperty(_cycle, 'x-component', function xComponent(_ref4) {
174
174
  var value = _ref4.value,
175
175
  _onChange = _ref4.onChange;
176
+
177
+ var _useTranslation3 = (0, _reactI18next.useTranslation)(),
178
+ t = _useTranslation3.t;
179
+
176
180
  var shortValues = [{
177
- label: '不重置',
181
+ label: 'No reset',
178
182
  value: 0
179
183
  }, {
180
- label: '每天',
184
+ label: 'Daily',
181
185
  value: 1,
182
186
  cron: '0 0 * * *'
183
187
  }, {
184
- label: '每周一',
188
+ label: 'Every Monday',
185
189
  value: 2,
186
190
  cron: '0 0 * * 1'
187
191
  }, {
188
- label: '每月',
192
+ label: 'Monthly',
189
193
  value: 3,
190
194
  cron: '0 0 1 * *'
191
195
  }, {
192
- label: '每年',
196
+ label: 'Yearly',
193
197
  value: 4,
194
198
  cron: '0 0 1 1 *'
195
199
  }, {
196
- label: '自定义',
200
+ label: 'Customize',
197
201
  value: 5,
198
202
  cron: '* * * * *'
199
203
  }];
@@ -209,7 +213,7 @@ var RuleTypes = {
209
213
  return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
210
214
  key: item.value,
211
215
  value: item.value
212
- }, item.label);
216
+ }, t(item.label));
213
217
  })), option.value === 5 ? /*#__PURE__*/_react.default.createElement(_schemaComponent.Cron, {
214
218
  value: value,
215
219
  setValue: _onChange,
@@ -232,8 +236,8 @@ var RuleTypes = {
232
236
  };
233
237
 
234
238
  function RuleConfigForm() {
235
- var _useTranslation3 = (0, _reactI18next.useTranslation)(),
236
- t = _useTranslation3.t;
239
+ var _useTranslation4 = (0, _reactI18next.useTranslation)(),
240
+ t = _useTranslation4.t;
237
241
 
238
242
  var compile = (0, _schemaComponent.useCompile)();
239
243
  var schemaOptions = (0, _react.useContext)(_react2.SchemaOptionsContext);
package/lib/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export * from './document-title';
13
13
  export * from './i18n';
14
14
  export * from './icon';
15
15
  export * from './plugin-manager';
16
+ export * from './pm';
16
17
  export * from './powered-by';
17
18
  export * from './record-provider';
18
19
  export * from './route-switch';
package/lib/index.js CHANGED
@@ -177,6 +177,19 @@ Object.keys(_pluginManager).forEach(function (key) {
177
177
  });
178
178
  });
179
179
 
180
+ var _pm = require("./pm");
181
+
182
+ Object.keys(_pm).forEach(function (key) {
183
+ if (key === "default" || key === "__esModule") return;
184
+ if (key in exports && exports[key] === _pm[key]) return;
185
+ Object.defineProperty(exports, key, {
186
+ enumerable: true,
187
+ get: function get() {
188
+ return _pm[key];
189
+ }
190
+ });
191
+ });
192
+
180
193
  var _poweredBy = require("./powered-by");
181
194
 
182
195
  Object.keys(_poweredBy).forEach(function (key) {
@@ -416,7 +416,7 @@ declare const _default: {
416
416
  "Tencent COS": string;
417
417
  "Amazon S3": string;
418
418
  Workflow: string;
419
- "Execution History": string;
419
+ "Execution history": string;
420
420
  "Trigger type": string;
421
421
  Description: string;
422
422
  Status: string;
@@ -557,5 +557,17 @@ declare const _default: {
557
557
  Print: string;
558
558
  'Single select and radio fields can be used as the grouping field': string;
559
559
  'Sign up successfully, and automatically jump to the sign in page': string;
560
+ "After successful bulk update": string;
561
+ All: string;
562
+ "Update selected data?": string;
563
+ "Update all data?": string;
564
+ "Bulk edit": string;
565
+ "Data will be updated": string;
566
+ Selected: string;
567
+ "Remains the same": string;
568
+ "Changed to": string;
569
+ Clear: string;
570
+ "Add attach": string;
571
+ "Please select the records to be updated": string;
560
572
  };
561
573
  export default _default;
@@ -422,7 +422,7 @@ var _default = {
422
422
  "Tencent COS": "Tencent COS",
423
423
  "Amazon S3": "Amazon S3",
424
424
  "Workflow": "Workflow",
425
- "Execution History": "Execution History",
425
+ "Execution history": "Execution history",
426
426
  "Trigger type": "Trigger type",
427
427
  "Description": "Description",
428
428
  "Status": "Status",
@@ -562,6 +562,18 @@ var _default = {
562
562
  "View all plugins": "View all plugins",
563
563
  "Print": "Print",
564
564
  'Single select and radio fields can be used as the grouping field': 'Single select and radio fields can be used as the grouping field',
565
- 'Sign up successfully, and automatically jump to the sign in page': 'Sign up successfully, and automatically jump to the sign in page'
565
+ 'Sign up successfully, and automatically jump to the sign in page': 'Sign up successfully, and automatically jump to the sign in page',
566
+ "After successful bulk update": "After successful bulk update",
567
+ "All": "All",
568
+ "Update selected data?": "Update selected data?",
569
+ "Update all data?": "Update all data?",
570
+ "Bulk edit": "Bulk edit",
571
+ "Data will be updated": "Data will be updated",
572
+ "Selected": "Selected",
573
+ "Remains the same": "Remains the same",
574
+ "Changed to": "Changed to",
575
+ "Clear": "Clear",
576
+ "Add attach": "Add attach",
577
+ "Please select the records to be updated": "Please select the records to be updated"
566
578
  };
567
579
  exports.default = _default;
@@ -416,7 +416,7 @@ declare const _default: {
416
416
  "Tencent COS": string;
417
417
  "Amazon S3": string;
418
418
  Workflow: string;
419
- "Execution History": string;
419
+ "Execution history": string;
420
420
  "Trigger type": string;
421
421
  Description: string;
422
422
  Status: string;
@@ -422,7 +422,7 @@ var _default = {
422
422
  "Tencent COS": "Tencent COS",
423
423
  "Amazon S3": "Amazon S3",
424
424
  "Workflow": "ワークフロー",
425
- "Execution History": "実行履歴",
425
+ "Execution history": "実行履歴",
426
426
  "Trigger type": "トリガータイプ",
427
427
  "Description": "説明",
428
428
  "Status": "状態",
@@ -416,7 +416,7 @@ declare const _default: {
416
416
  "Tencent COS": string;
417
417
  "Amazon S3": string;
418
418
  Workflow: string;
419
- "Execution History": string;
419
+ "Execution history": string;
420
420
  "Trigger type": string;
421
421
  Description: string;
422
422
  Status: string;
@@ -422,7 +422,7 @@ var _default = {
422
422
  "Tencent COS": "Tencent COS",
423
423
  "Amazon S3": "Amazon S3",
424
424
  "Workflow": "Workflow",
425
- "Execution History": "История запусков",
425
+ "Execution history": "История запусков",
426
426
  "Trigger type": "Тип триггера",
427
427
  "Description": "Описание",
428
428
  "Status": "Статус",
@@ -415,7 +415,7 @@ declare const _default: {
415
415
  "Aliyun OSS": string;
416
416
  "Amazon S3": string;
417
417
  Workflow: string;
418
- "Execution History": string;
418
+ "Execution history": string;
419
419
  "Trigger type": string;
420
420
  Description: string;
421
421
  Status: string;
@@ -421,7 +421,7 @@ var _default = {
421
421
  "Aliyun OSS": "Aliyun OSS",
422
422
  "Amazon S3": "Amazon S3",
423
423
  "Workflow": "İş Akışı",
424
- "Execution History": "Yürütme Geçmişi",
424
+ "Execution history": "Yürütme Geçmişi",
425
425
  "Trigger type": "Tetikleme türü",
426
426
  "Description": "Açıklama",
427
427
  "Status": "Durum",
@@ -140,6 +140,11 @@ declare const _default: {
140
140
  "Start from": string;
141
141
  "Starts from {{value}}": string;
142
142
  "Reset cycle": string;
143
+ "No reset": string;
144
+ Daily: string;
145
+ "Every Monday": string;
146
+ Monthly: string;
147
+ Yearly: string;
143
148
  Operations: string;
144
149
  Choices: string;
145
150
  Checkbox: string;
@@ -226,6 +231,7 @@ declare const _default: {
226
231
  "Edit button": string;
227
232
  Hide: string;
228
233
  "Enable actions": string;
234
+ Import: string;
229
235
  Export: string;
230
236
  Customize: string;
231
237
  Function: string;
@@ -302,12 +308,14 @@ declare const _default: {
302
308
  "Allow uploading multiple files": string;
303
309
  "Configure calendar": string;
304
310
  "Title field": string;
311
+ "Show lunar": string;
305
312
  "Start date field": string;
306
313
  "End date field": string;
307
314
  Navigate: string;
308
315
  Title: string;
309
316
  "Select view": string;
310
317
  Reset: string;
318
+ "Importable fields": string;
311
319
  "Exportable fields": string;
312
320
  "Saved successfully": string;
313
321
  Nickname: string;
@@ -479,7 +487,7 @@ declare const _default: {
479
487
  Bucket: string;
480
488
  Path: string;
481
489
  Workflow: string;
482
- 'Execution History': string;
490
+ 'Execution history': string;
483
491
  'Trigger type': string;
484
492
  Description: string;
485
493
  Status: string;
@@ -487,8 +495,10 @@ declare const _default: {
487
495
  Off: string;
488
496
  Version: string;
489
497
  'Copy to new version': string;
498
+ Loading: string;
490
499
  'Load failed': string;
491
500
  Trigger: string;
501
+ 'Triggered at': string;
492
502
  'Collection event': string;
493
503
  'Trigger on': string;
494
504
  'After record added': string;
@@ -535,9 +545,12 @@ declare const _default: {
535
545
  Comparison: string;
536
546
  'Arithmetic calculation': string;
537
547
  'String operation': string;
548
+ 'Executed at': string;
549
+ Queueing: string;
538
550
  'On going': string;
539
551
  Succeeded: string;
540
552
  Failed: string;
553
+ Pending: string;
541
554
  Canceled: string;
542
555
  'This node contains branches, deleting will also be preformed to them, are you sure?': string;
543
556
  Control: string;
@@ -626,9 +639,34 @@ declare const _default: {
626
639
  "Enabled languages": string;
627
640
  "View all plugins": string;
628
641
  Print: string;
642
+ Done: string;
629
643
  'Sign up successfully, and automatically jump to the sign in page': string;
644
+ 'File manager': string;
645
+ ACL: string;
646
+ 'Collection manager': string;
647
+ 'Plugin manager': string;
648
+ Local: string;
649
+ 'Built-in': string;
650
+ Marketplace: string;
651
+ 'Coming soon...': string;
652
+ 'Settings center': string;
653
+ Bookmark: string;
654
+ 'Manage all settings': string;
630
655
  'Create inverse field in the target collection': string;
631
656
  'Inverse field name': string;
632
657
  'Inverse field display name': string;
658
+ "Bulk update": string;
659
+ "After successful bulk update": string;
660
+ "Bulk edit": string;
661
+ "Data will be updated": string;
662
+ Selected: string;
663
+ All: string;
664
+ "Update selected data?": string;
665
+ "Update all data?": string;
666
+ "Remains the same": string;
667
+ "Changed to": string;
668
+ Clear: string;
669
+ "Add attach": string;
670
+ "Please select the records to be updated": string;
633
671
  };
634
672
  export default _default;
@@ -146,6 +146,11 @@ var _default = {
146
146
  "Start from": "起始于",
147
147
  "Starts from {{value}}": "从 {{value}} 开始",
148
148
  "Reset cycle": "重置周期",
149
+ "No reset": "不重置",
150
+ "Daily": "每天",
151
+ "Every Monday": "每周一",
152
+ "Monthly": "每月",
153
+ "Yearly": "每年",
149
154
  "Operations": "操作",
150
155
  "Choices": "选择类型",
151
156
  "Checkbox": "勾选",
@@ -232,6 +237,7 @@ var _default = {
232
237
  "Edit button": "编辑按钮",
233
238
  "Hide": "隐藏",
234
239
  "Enable actions": "启用操作",
240
+ "Import": "导入",
235
241
  "Export": "导出",
236
242
  "Customize": "自定义",
237
243
  "Function": "Function",
@@ -308,12 +314,14 @@ var _default = {
308
314
  "Allow uploading multiple files": "允许上传多个文件",
309
315
  "Configure calendar": "配置日历",
310
316
  "Title field": "标题字段",
317
+ "Show lunar": "展示农历",
311
318
  "Start date field": "开始日期字段",
312
319
  "End date field": "结束日期字段",
313
320
  "Navigate": "分页",
314
321
  "Title": "标题",
315
322
  "Select view": "切换视图",
316
323
  "Reset": "重置",
324
+ "Importable fields": "可导入字段",
317
325
  "Exportable fields": "可导出字段",
318
326
  "Saved successfully": "保存成功",
319
327
  "Nickname": "昵称",
@@ -486,7 +494,7 @@ var _default = {
486
494
  'Path': '路径(相对)',
487
495
  // plugins/workflow
488
496
  'Workflow': '工作流',
489
- 'Execution History': '执行历史',
497
+ 'Execution history': '执行历史',
490
498
  'Trigger type': '触发方式',
491
499
  'Description': '描述',
492
500
  'Status': '状态',
@@ -494,8 +502,10 @@ var _default = {
494
502
  'Off': '停用',
495
503
  'Version': '版本',
496
504
  'Copy to new version': '复制到新版本',
505
+ 'Loading': '加载中',
497
506
  'Load failed': '加载失败',
498
507
  'Trigger': '触发器',
508
+ 'Triggered at': '触发时间',
499
509
  'Collection event': '数据表事件',
500
510
  'Trigger on': '触发时机',
501
511
  'After record added': '新增数据后',
@@ -542,9 +552,12 @@ var _default = {
542
552
  'Comparison': '值比较',
543
553
  'Arithmetic calculation': '算术运算',
544
554
  'String operation': '字符串',
555
+ 'Executed at': '执行于',
556
+ 'Queueing': '队列中',
545
557
  'On going': '进行中',
546
558
  'Succeeded': '成功',
547
559
  'Failed': '失败',
560
+ 'Pending': '等待处理',
548
561
  'Canceled': '已取消',
549
562
  'This node contains branches, deleting will also be preformed to them, are you sure?': '节点包含分支,将同时删除其所有分支下的子节点,确定继续?',
550
563
  'Control': '流程控制',
@@ -634,9 +647,34 @@ var _default = {
634
647
  "Enabled languages": "启用的语言",
635
648
  "View all plugins": "查看所有插件",
636
649
  "Print": "打印",
650
+ "Done": "完成",
637
651
  'Sign up successfully, and automatically jump to the sign in page': '注册成功,即将跳转到登录页面',
652
+ 'File manager': '文件管理器',
653
+ 'ACL': '访问控制',
654
+ 'Collection manager': '数据表管理',
655
+ 'Plugin manager': '插件管理器',
656
+ 'Local': '本地',
657
+ 'Built-in': '内置',
658
+ 'Marketplace': '插件市场',
659
+ 'Coming soon...': '敬请期待...',
660
+ 'Settings center': '配置中心',
661
+ 'Bookmark': '书签',
662
+ 'Manage all settings': '管理所有配置',
638
663
  'Create inverse field in the target collection': '在目标数据表里创建反向关系字段',
639
664
  'Inverse field name': '反向关系字段标识',
640
- 'Inverse field display name': '反向关系字段名称'
665
+ 'Inverse field display name': '反向关系字段名称',
666
+ "Bulk update": "批量更新",
667
+ "After successful bulk update": "批量成功更新后",
668
+ "Bulk edit": "批量编辑",
669
+ "Data will be updated": "更新的数据",
670
+ "Selected": "选中",
671
+ "All": "所有",
672
+ "Update selected data?": "更新选中的数据吗?",
673
+ "Update all data?": "更新全部数据吗?",
674
+ "Remains the same": "不更新",
675
+ "Changed to": "修改为",
676
+ "Clear": "清空",
677
+ "Add attach": "增加关联",
678
+ "Please select the records to be updated": "请选择要更新的记录"
641
679
  };
642
680
  exports.default = _default;
@@ -21,7 +21,7 @@ var _react = _interopRequireWildcard(require("react"));
21
21
 
22
22
  var _reactI18next = require("react-i18next");
23
23
 
24
- var _apiClient = require("../api-client");
24
+ var _reactRouterDom = require("react-router-dom");
25
25
 
26
26
  var _context = require("./context");
27
27
 
@@ -118,6 +118,7 @@ PluginManager.Toolbar = function (props) {
118
118
  var _useTranslation = (0, _reactI18next.useTranslation)(),
119
119
  t = _useTranslation.t;
120
120
 
121
+ var history = (0, _reactRouterDom.useHistory)();
121
122
  return /*#__PURE__*/_react.default.createElement("div", {
122
123
  style: {
123
124
  display: 'inline-block'
@@ -138,7 +139,7 @@ PluginManager.Toolbar = function (props) {
138
139
  }), unpinned.length > 0 && /*#__PURE__*/_react.default.createElement(_antd.Menu.SubMenu, {
139
140
  popupClassName: 'pm-sub-menu',
140
141
  key: 'more',
141
- title: /*#__PURE__*/_react.default.createElement(_icons.EllipsisOutlined, null)
142
+ title: /*#__PURE__*/_react.default.createElement(_icons.SettingOutlined, null)
142
143
  }, unpinned.map(function (item, index) {
143
144
  var Action = (0, _lodash.get)(components, item.component);
144
145
  return Action && /*#__PURE__*/_react.default.createElement(ToolbarItemContext.Provider, {
@@ -149,9 +150,11 @@ PluginManager.Toolbar = function (props) {
149
150
  key: 'divider'
150
151
  }), /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
151
152
  key: 'plugins',
152
- disabled: true,
153
- icon: /*#__PURE__*/_react.default.createElement(_icons.AppstoreOutlined, null)
154
- }, t('View all plugins')))));
153
+ onClick: function onClick() {
154
+ history.push('/admin/settings');
155
+ },
156
+ icon: /*#__PURE__*/_react.default.createElement(_icons.SettingOutlined, null)
157
+ }, t('Settings center')))));
155
158
  };
156
159
 
157
160
  PluginManager.Toolbar.Item = function (props) {
@@ -173,12 +176,15 @@ PluginManager.Toolbar.Item = function (props) {
173
176
 
174
177
  var titleComponent = /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", null, title), subtitleComponent);
175
178
 
176
- return /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
179
+ return title ? /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
177
180
  title: titleComponent
178
181
  }, /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, _objectSpread(_objectSpread({}, others), {}, {
179
182
  className: className,
180
183
  eventKey: item.component
181
- }), icon));
184
+ }), icon)) : /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, _objectSpread(_objectSpread({}, others), {}, {
185
+ className: className,
186
+ eventKey: item.component
187
+ }), icon);
182
188
  }
183
189
 
184
190
  return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, _objectSpread(_objectSpread({}, others), {}, {
@@ -189,21 +195,27 @@ PluginManager.Toolbar.Item = function (props) {
189
195
  };
190
196
 
191
197
  var RemotePluginManagerToolbar = function RemotePluginManagerToolbar() {
192
- var api = (0, _apiClient.useAPIClient)();
193
-
194
- var _useRequest = (0, _apiClient.useRequest)({
195
- resource: 'plugins',
196
- action: 'getPinned'
197
- }),
198
- data = _useRequest.data,
199
- loading = _useRequest.loading;
200
-
201
- if (loading) {
202
- return /*#__PURE__*/_react.default.createElement(_antd.Spin, null);
203
- }
204
-
198
+ // const api = useAPIClient();
199
+ // const { data, loading } = useRequest({
200
+ // resource: 'plugins',
201
+ // action: 'getPinned',
202
+ // });
203
+ // if (loading) {
204
+ // return <Spin />;
205
+ // }
206
+ var items = [{
207
+ component: 'DesignableSwitch',
208
+ pin: true
209
+ }, {
210
+ component: 'PluginManagerLink',
211
+ pin: true
212
+ }, {
213
+ component: 'SettingsCenterDropdown',
214
+ pin: true
215
+ } // ...data?.data,
216
+ ];
205
217
  return /*#__PURE__*/_react.default.createElement(PluginManager.Toolbar, {
206
- items: data === null || data === void 0 ? void 0 : data.data
218
+ items: items
207
219
  });
208
220
  };
209
221
 
@@ -0,0 +1,2 @@
1
+ export declare const PluginManagerLink: () => JSX.Element;
2
+ export declare const SettingsCenterDropdown: () => JSX.Element;