@nocobase/client 0.10.0-alpha.2 → 0.10.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 (236) hide show
  1. package/es/acl/Configuration/MenuItemsProvider.js +3 -3
  2. package/es/application/Application.js +2 -2
  3. package/es/auth/SigninPage.js +12 -9
  4. package/es/block-provider/GanttBlockProvider.js +5 -4
  5. package/es/block-provider/TableBlockProvider.d.ts +1 -0
  6. package/es/block-provider/TableBlockProvider.js +51 -17
  7. package/es/collection-manager/Configuration/AddCollectionAction.js +31 -25
  8. package/es/collection-manager/Configuration/AddFieldAction.js +45 -32
  9. package/es/collection-manager/Configuration/AddSubFieldAction.js +24 -19
  10. package/es/collection-manager/Configuration/ConfigurationTabs.js +57 -50
  11. package/es/collection-manager/hooks/useOptions.js +39 -36
  12. package/es/collection-manager/interfaces/integer.js +1 -1
  13. package/es/collection-manager/interfaces/number.js +3 -3
  14. package/es/collection-manager/interfaces/percent.js +3 -3
  15. package/es/formula/Expression.js +66 -46
  16. package/es/hooks/index.d.ts +1 -0
  17. package/es/hooks/index.js +1 -0
  18. package/es/hooks/useAdminSchemaUid.d.ts +1 -0
  19. package/es/hooks/useAdminSchemaUid.js +6 -0
  20. package/es/hooks/useMenuItem.d.ts +37 -0
  21. package/es/hooks/useMenuItem.js +93 -0
  22. package/es/index.d.ts +2 -3
  23. package/es/index.js +3 -4
  24. package/es/locale/en_US.d.ts +3 -1
  25. package/es/locale/en_US.js +4 -2
  26. package/es/locale/es_ES.d.ts +1 -1
  27. package/es/locale/es_ES.js +1 -1
  28. package/es/locale/ja_JP.d.ts +3 -1
  29. package/es/locale/ja_JP.js +4 -2
  30. package/es/locale/pt_BR.d.ts +1 -1
  31. package/es/locale/pt_BR.js +1 -1
  32. package/es/locale/ru_RU.d.ts +1 -1
  33. package/es/locale/ru_RU.js +1 -1
  34. package/es/locale/zh_CN.d.ts +3 -1
  35. package/es/locale/zh_CN.js +3 -1
  36. package/es/pm/Card.js +5 -5
  37. package/es/pm/PluginManagerLink.js +16 -12
  38. package/es/pm/index.d.ts +2 -1
  39. package/es/pm/index.js +36 -22
  40. package/es/route-switch/antd/admin-layout/index.js +5 -5
  41. package/es/schema-component/antd/action/Action.Designer.js +3 -5
  42. package/es/schema-component/antd/action/Action.Drawer.js +1 -1
  43. package/es/schema-component/antd/action/ActionBar.js +1 -1
  44. package/es/schema-component/antd/association-field/Editable.js +1 -2
  45. package/es/schema-component/antd/association-field/Nester.js +7 -1
  46. package/es/schema-component/antd/association-field/SubTable.js +1 -1
  47. package/es/schema-component/antd/calendar/DeleteEvent.js +1 -1
  48. package/es/schema-component/antd/cascader/Cascader.js +1 -1
  49. package/es/schema-component/antd/form-item/FormItem.js +10 -3
  50. package/es/schema-component/antd/form-v2/Form.js +2 -2
  51. package/es/schema-component/antd/gantt/components/gantt/gantt.js +0 -1
  52. package/es/schema-component/antd/gantt/components/grid/grid-body.js +3 -3
  53. package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.js +1 -1
  54. package/es/schema-component/antd/gantt/components/task-item/task-item.js +1 -1
  55. package/es/schema-component/antd/gantt/helpers/bar-helper.d.ts +1 -1
  56. package/es/schema-component/antd/gantt/helpers/bar-helper.js +4 -4
  57. package/es/schema-component/antd/gantt/helpers/other-helper.js +3 -1
  58. package/es/schema-component/antd/grid/Grid.js +2 -2
  59. package/es/schema-component/antd/grid-card/GridCard.Designer.js +3 -4
  60. package/es/schema-component/antd/grid-card/GridCard.Item.js +3 -3
  61. package/es/schema-component/antd/index.less +1 -3
  62. package/es/schema-component/antd/list/List.Decorator.js +3 -3
  63. package/es/schema-component/antd/list/List.Item.js +2 -2
  64. package/es/schema-component/antd/list/List.d.ts +2 -2
  65. package/es/schema-component/antd/list/List.js +6 -6
  66. package/es/schema-component/antd/menu/Menu.js +306 -156
  67. package/es/schema-component/antd/page/Page.js +29 -23
  68. package/es/schema-component/antd/remote-select/RemoteSelect.js +60 -10
  69. package/es/schema-component/antd/remote-select/utils.d.ts +4 -0
  70. package/es/schema-component/antd/remote-select/utils.js +31 -0
  71. package/es/schema-component/antd/table-v2/FilterDynamicComponent.js +17 -2
  72. package/es/schema-component/antd/table-v2/Table.Column.Designer.js +51 -12
  73. package/es/schema-component/antd/table-v2/Table.js +28 -47
  74. package/es/schema-component/antd/table-v2/utils.d.ts +0 -1
  75. package/es/schema-component/antd/table-v2/utils.js +0 -28
  76. package/es/schema-component/antd/tabs/Tabs.js +35 -22
  77. package/es/schema-component/antd/tabs/context.d.ts +1 -1
  78. package/es/schema-component/antd/upload/ReadPretty.js +7 -3
  79. package/es/schema-component/antd/variable/VariableSelect.js +1 -1
  80. package/es/schema-component/common/utils/uitls.d.ts +1 -0
  81. package/es/schema-component/common/utils/uitls.js +1 -1
  82. package/es/schema-initializer/SchemaInitializer.d.ts +7 -2
  83. package/es/schema-initializer/SchemaInitializer.js +158 -103
  84. package/es/schema-initializer/SelectCollection.d.ts +1 -2
  85. package/es/schema-initializer/SelectCollection.js +19 -16
  86. package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -1
  87. package/es/schema-initializer/buttons/TableActionInitializers.js +5 -5
  88. package/es/schema-initializer/buttons/TableColumnInitializers.js +3 -2
  89. package/es/schema-initializer/components/CreateRecordAction.js +37 -27
  90. package/es/schema-initializer/components/assigned-field/AssignedField.js +2 -1
  91. package/es/schema-initializer/items/CalendarBlockInitializer.js +2 -2
  92. package/es/schema-initializer/utils.d.ts +0 -1
  93. package/es/schema-initializer/utils.js +40 -25
  94. package/es/schema-settings/SchemaSettings.js +110 -29
  95. package/es/schema-settings/VariableInput/hooks/useFormVariable.d.ts +19 -0
  96. package/es/schema-settings/VariableInput/hooks/useFormVariable.js +89 -0
  97. package/es/schema-settings/VariableInput/hooks/useIterationVariable.d.ts +8 -0
  98. package/es/schema-settings/VariableInput/hooks/useIterationVariable.js +77 -0
  99. package/es/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +5 -12
  100. package/es/schema-settings/VariableInput/hooks/useVariableOptions.js +19 -3
  101. package/es/schema-templates/BlockTemplateDetails.js +5 -1
  102. package/es/schema-templates/BlockTemplatePage.js +4 -1
  103. package/es/user/ChangePassword.d.ts +1 -2
  104. package/es/user/ChangePassword.js +30 -26
  105. package/es/user/CurrentUser.js +172 -141
  106. package/es/user/EditProfile.d.ts +1 -2
  107. package/es/user/EditProfile.js +30 -24
  108. package/es/user/LanguageSettings.d.ts +1 -2
  109. package/es/user/LanguageSettings.js +67 -64
  110. package/es/user/SigninPage.js +25 -22
  111. package/es/user/SwitchRole.d.ts +1 -2
  112. package/es/user/SwitchRole.js +54 -49
  113. package/es/user/ThemeSettings.d.ts +1 -2
  114. package/es/user/ThemeSettings.js +56 -52
  115. package/lib/acl/Configuration/MenuItemsProvider.js +3 -3
  116. package/lib/application/Application.js +2 -2
  117. package/lib/auth/SigninPage.js +25 -22
  118. package/lib/block-provider/GanttBlockProvider.js +5 -4
  119. package/lib/block-provider/TableBlockProvider.d.ts +1 -0
  120. package/lib/block-provider/TableBlockProvider.js +53 -17
  121. package/lib/collection-manager/Configuration/AddCollectionAction.js +29 -23
  122. package/lib/collection-manager/Configuration/AddFieldAction.js +43 -30
  123. package/lib/collection-manager/Configuration/AddSubFieldAction.js +22 -17
  124. package/lib/collection-manager/Configuration/ConfigurationTabs.js +57 -49
  125. package/lib/collection-manager/hooks/useOptions.js +39 -36
  126. package/lib/collection-manager/interfaces/integer.js +1 -1
  127. package/lib/collection-manager/interfaces/number.js +3 -3
  128. package/lib/collection-manager/interfaces/percent.js +3 -3
  129. package/lib/formula/Expression.js +64 -44
  130. package/lib/hooks/index.d.ts +1 -0
  131. package/lib/hooks/index.js +11 -0
  132. package/lib/hooks/useAdminSchemaUid.d.ts +1 -0
  133. package/lib/hooks/useAdminSchemaUid.js +13 -0
  134. package/lib/hooks/useMenuItem.d.ts +37 -0
  135. package/lib/hooks/useMenuItem.js +108 -0
  136. package/lib/index.d.ts +2 -3
  137. package/lib/index.js +22 -33
  138. package/lib/locale/en_US.d.ts +3 -1
  139. package/lib/locale/en_US.js +4 -2
  140. package/lib/locale/es_ES.d.ts +1 -1
  141. package/lib/locale/es_ES.js +1 -1
  142. package/lib/locale/ja_JP.d.ts +3 -1
  143. package/lib/locale/ja_JP.js +4 -2
  144. package/lib/locale/pt_BR.d.ts +1 -1
  145. package/lib/locale/pt_BR.js +1 -1
  146. package/lib/locale/ru_RU.d.ts +1 -1
  147. package/lib/locale/ru_RU.js +1 -1
  148. package/lib/locale/zh_CN.d.ts +3 -1
  149. package/lib/locale/zh_CN.js +3 -1
  150. package/lib/pm/Card.js +6 -6
  151. package/lib/pm/PluginManagerLink.js +15 -10
  152. package/lib/pm/index.d.ts +2 -1
  153. package/lib/pm/index.js +37 -23
  154. package/lib/route-switch/antd/admin-layout/index.js +4 -4
  155. package/lib/schema-component/antd/action/Action.Designer.js +2 -4
  156. package/lib/schema-component/antd/action/Action.Drawer.js +1 -1
  157. package/lib/schema-component/antd/association-field/Editable.js +0 -1
  158. package/lib/schema-component/antd/association-field/Nester.js +6 -0
  159. package/lib/schema-component/antd/association-field/SubTable.js +1 -1
  160. package/lib/schema-component/antd/calendar/DeleteEvent.js +1 -1
  161. package/lib/schema-component/antd/cascader/Cascader.js +1 -1
  162. package/lib/schema-component/antd/form-item/FormItem.js +10 -3
  163. package/lib/schema-component/antd/form-v2/Form.js +2 -2
  164. package/lib/schema-component/antd/gantt/components/gantt/gantt.js +0 -1
  165. package/lib/schema-component/antd/gantt/components/grid/grid-body.js +2 -2
  166. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.js +1 -1
  167. package/lib/schema-component/antd/gantt/components/task-item/task-item.js +1 -1
  168. package/lib/schema-component/antd/gantt/helpers/bar-helper.d.ts +1 -1
  169. package/lib/schema-component/antd/gantt/helpers/bar-helper.js +4 -4
  170. package/lib/schema-component/antd/gantt/helpers/other-helper.js +3 -1
  171. package/lib/schema-component/antd/grid/Grid.js +1 -1
  172. package/lib/schema-component/antd/grid-card/GridCard.Designer.js +4 -5
  173. package/lib/schema-component/antd/grid-card/GridCard.Item.js +8 -8
  174. package/lib/schema-component/antd/index.less +1 -3
  175. package/lib/schema-component/antd/list/List.Decorator.js +3 -3
  176. package/lib/schema-component/antd/list/List.Item.js +6 -6
  177. package/lib/schema-component/antd/list/List.d.ts +2 -2
  178. package/lib/schema-component/antd/list/List.js +24 -24
  179. package/lib/schema-component/antd/menu/Menu.js +304 -154
  180. package/lib/schema-component/antd/page/Page.js +29 -23
  181. package/lib/schema-component/antd/remote-select/RemoteSelect.js +57 -7
  182. package/lib/schema-component/antd/remote-select/utils.d.ts +4 -0
  183. package/lib/schema-component/antd/remote-select/utils.js +41 -0
  184. package/lib/schema-component/antd/table-v2/FilterDynamicComponent.js +17 -2
  185. package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +50 -11
  186. package/lib/schema-component/antd/table-v2/Table.js +26 -45
  187. package/lib/schema-component/antd/table-v2/utils.d.ts +0 -1
  188. package/lib/schema-component/antd/table-v2/utils.js +0 -29
  189. package/lib/schema-component/antd/tabs/Tabs.js +34 -21
  190. package/lib/schema-component/antd/tabs/context.d.ts +1 -1
  191. package/lib/schema-component/antd/upload/ReadPretty.js +7 -3
  192. package/lib/schema-component/antd/variable/VariableSelect.js +1 -1
  193. package/lib/schema-component/common/utils/uitls.d.ts +1 -0
  194. package/lib/schema-component/common/utils/uitls.js +3 -1
  195. package/lib/schema-initializer/SchemaInitializer.d.ts +7 -2
  196. package/lib/schema-initializer/SchemaInitializer.js +155 -101
  197. package/lib/schema-initializer/SelectCollection.d.ts +1 -2
  198. package/lib/schema-initializer/SelectCollection.js +22 -17
  199. package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +1 -1
  200. package/lib/schema-initializer/buttons/TableActionInitializers.js +5 -5
  201. package/lib/schema-initializer/buttons/TableColumnInitializers.js +2 -1
  202. package/lib/schema-initializer/components/CreateRecordAction.js +35 -25
  203. package/lib/schema-initializer/components/assigned-field/AssignedField.js +2 -1
  204. package/lib/schema-initializer/items/CalendarBlockInitializer.js +9 -9
  205. package/lib/schema-initializer/utils.d.ts +0 -1
  206. package/lib/schema-initializer/utils.js +41 -25
  207. package/lib/schema-settings/SchemaSettings.js +106 -27
  208. package/lib/schema-settings/VariableInput/hooks/useFormVariable.d.ts +19 -0
  209. package/lib/schema-settings/VariableInput/hooks/useFormVariable.js +96 -0
  210. package/lib/schema-settings/VariableInput/hooks/useIterationVariable.d.ts +8 -0
  211. package/lib/schema-settings/VariableInput/hooks/useIterationVariable.js +84 -0
  212. package/lib/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +5 -12
  213. package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +19 -3
  214. package/lib/schema-templates/BlockTemplateDetails.js +5 -1
  215. package/lib/schema-templates/BlockTemplatePage.js +5 -2
  216. package/lib/user/ChangePassword.d.ts +1 -2
  217. package/lib/user/ChangePassword.js +30 -26
  218. package/lib/user/CurrentUser.js +166 -135
  219. package/lib/user/EditProfile.d.ts +1 -2
  220. package/lib/user/EditProfile.js +31 -25
  221. package/lib/user/LanguageSettings.d.ts +1 -2
  222. package/lib/user/LanguageSettings.js +66 -63
  223. package/lib/user/SigninPage.js +25 -22
  224. package/lib/user/SwitchRole.d.ts +1 -2
  225. package/lib/user/SwitchRole.js +57 -51
  226. package/lib/user/ThemeSettings.d.ts +1 -2
  227. package/lib/user/ThemeSettings.js +59 -54
  228. package/package.json +9 -8
  229. package/es/settings-form/SettingsForm.d.ts +0 -13
  230. package/es/settings-form/SettingsForm.js +0 -309
  231. package/es/settings-form/index.d.ts +0 -1
  232. package/es/settings-form/index.js +0 -1
  233. package/lib/settings-form/SettingsForm.d.ts +0 -13
  234. package/lib/settings-form/SettingsForm.js +0 -320
  235. package/lib/settings-form/index.d.ts +0 -1
  236. package/lib/settings-form/index.js +0 -16
@@ -101,5 +101,5 @@ export var TaskItem = function TaskItem(props) {
101
101
  y: isProjectBar ? task.y - 8 : isTextInside ? task.y + taskHeight * 0.5 : task.y + taskHeight * 0.65,
102
102
  className: isProjectBar ? cx(projectLabel) : isTextInside ? cx(barLabel) : cx(barLabel) && cx(barLabelOutside),
103
103
  ref: textRef
104
- }, isProjectBar ? "".concat(task.name, ": ").concat(getYmd(task.start), " ~ ").concat(getYmd(task.end)) : task.name));
104
+ }, isProjectBar && getYmd(task.start) && getYmd(task.end) ? "".concat(task.name, ": ").concat(getYmd(task.start), " ~ ").concat(getYmd(task.end)) : task.name));
105
105
  };
@@ -1,6 +1,6 @@
1
- import { Task } from '../types/public-types';
2
1
  import { BarTask } from '../types/bar-task';
3
2
  import { BarMoveAction } from '../types/gantt-task-actions';
3
+ import { Task } from '../types/public-types';
4
4
  export declare const convertToBarTasks: (tasks: Task[], dates: Date[], columnWidth: number, rowHeight: number, taskHeight: number, barCornerRadius: number, handleWidth: number, rtl: boolean, barProgressColor: string, barProgressSelectedColor: string, barBackgroundColor: string, barBackgroundSelectedColor: string, projectProgressColor: string, projectProgressSelectedColor: string, projectBackgroundColor: string, projectBackgroundSelectedColor: string, milestoneBackgroundColor: string, milestoneBackgroundSelectedColor: string) => BarTask[];
5
5
  export declare const progressWithByParams: (taskX1: number, taskX2: number, progress: number, rtl: boolean) => number[];
6
6
  export declare const progressByProgressWidth: (progressWidth: number, barTask: BarTask) => number;
@@ -58,7 +58,7 @@ var convertToBar = function convertToBar(task, index, dates, columnWidth, rowHei
58
58
  var typeInternal = task.type;
59
59
  if (typeInternal === 'task' && x2 - x1 < handleWidth * 2) {
60
60
  typeInternal = 'smalltask';
61
- x2 = x1 + handleWidth * 2;
61
+ x2 = x1 > 0 ? x1 + handleWidth * 2 : x1;
62
62
  }
63
63
  var _progressWithByParams = progressWithByParams(x1, x2, task.progress, rtl),
64
64
  _progressWithByParams2 = _slicedToArray(_progressWithByParams, 2),
@@ -126,16 +126,16 @@ var taskXCoordinate = function taskXCoordinate(xDate, dates, columnWidth) {
126
126
  var remainderMillis = (xDate === null || xDate === void 0 ? void 0 : xDate.getTime()) - ((_dates$index = dates[index]) === null || _dates$index === void 0 ? void 0 : _dates$index.getTime());
127
127
  var percentOfInterval = remainderMillis / (((_dates = dates[index + 1]) === null || _dates === void 0 ? void 0 : _dates.getTime()) - ((_dates$index2 = dates[index]) === null || _dates$index2 === void 0 ? void 0 : _dates$index2.getTime()));
128
128
  var x = index * columnWidth + percentOfInterval * columnWidth;
129
- return x;
129
+ return isNaN(x) ? 0 : x;
130
130
  };
131
131
  var taskXCoordinateRTL = function taskXCoordinateRTL(xDate, dates, columnWidth) {
132
132
  var x = taskXCoordinate(xDate, dates, columnWidth);
133
133
  x += columnWidth;
134
- return x;
134
+ return isNaN(x) ? 0 : x;
135
135
  };
136
136
  var taskYCoordinate = function taskYCoordinate(index, rowHeight, taskHeight) {
137
137
  var y = index * rowHeight + (rowHeight - taskHeight) / 2;
138
- return y;
138
+ return isNaN(y) ? 0 : y;
139
139
  };
140
140
  export var progressWithByParams = function progressWithByParams(taskX1, taskX2, progress, rtl) {
141
141
  var progressWidth = (taskX2 - taskX1) * progress * 0.01;
@@ -61,5 +61,7 @@ export var sortTasks = function sortTasks(taskA, taskB) {
61
61
  }
62
62
  };
63
63
  export var getYmd = function getYmd(date) {
64
- return date.getFullYear() + '/' + "".concat(date.getMonth() + 1) + '/' + date.getDate();
64
+ if (!isNaN(date.getTime())) {
65
+ return date.getFullYear() + '/' + "".concat(date.getMonth() + 1) + '/' + date.getDate();
66
+ }
65
67
  };
@@ -14,7 +14,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
15
  import { useDndContext, useDndMonitor, useDraggable, useDroppable } from '@dnd-kit/core';
16
16
  import { css } from '@emotion/css';
17
- import { observer, RecursionField, Schema, useField, useFieldSchema } from '@formily/react';
17
+ import { RecursionField, Schema, observer, useField, useFieldSchema } from '@formily/react';
18
18
  import { uid } from '@formily/shared';
19
19
  import cls from 'classnames';
20
20
  import React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
@@ -341,7 +341,7 @@ Grid.Row = observer(function () {
341
341
  cols: cols
342
342
  }
343
343
  }, /*#__PURE__*/React.createElement("div", {
344
- className: cls('nb-grid-row', css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n display: flex;\n position: relative;\n /* z-index: 0; */\n "])))),
344
+ className: cls('nb-grid-row', css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n /* z-index: 0; */\n "])))),
345
345
  style: {
346
346
  margin: showDivider ? '0 calc(-1 * var(--nb-spacing))' : null
347
347
  }
@@ -4,21 +4,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import { useFieldSchema, useField } from '@formily/react';
8
- import React, { useMemo } from 'react';
9
7
  import { ArrayItems } from '@formily/antd';
8
+ import { useField, useFieldSchema } from '@formily/react';
10
9
  import { Slider } from 'antd';
11
10
  import _ from 'lodash';
11
+ import React, { useMemo } from 'react';
12
12
  import { useTranslation } from 'react-i18next';
13
13
  import { useCollection, useCollectionFilterOptions, useSortFields } from '../../../collection-manager';
14
14
  import { GeneralSchemaDesigner, SchemaSettings } from '../../../schema-settings';
15
15
  import { useSchemaTemplate } from '../../../schema-templates';
16
+ import { SchemaComponentOptions } from '../../core';
16
17
  import { useDesignable } from '../../hooks';
17
18
  import { removeNullCondition } from '../filter';
18
19
  import { FilterDynamicComponent } from '../table-v2/FilterDynamicComponent';
19
- import { SchemaComponentOptions } from '../../core';
20
20
  import { defaultColumnCount, gridSizes, pageSizeOptions, screenSizeMaps, screenSizeTitleMaps } from './options';
21
- Slider;
22
21
  var columnCountMarks = [1, 2, 3, 4, 6, 8, 12, 24].reduce(function (obj, cur) {
23
22
  obj[cur] = cur;
24
23
  return obj;
@@ -1,15 +1,15 @@
1
1
  var _templateObject, _templateObject2;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import React from 'react';
4
- import { Card } from 'antd';
5
3
  import { css } from '@emotion/css';
6
4
  import { useField } from '@formily/react';
5
+ import { Card } from 'antd';
6
+ import React from 'react';
7
7
  import { RecordSimpleProvider } from '../../../record-provider';
8
8
  var itemCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n height: 100%;\n flex-direction: column;\n justify-content: space-between;\n gap: 8px;\n"])));
9
9
  export var GridCardItem = function GridCardItem(props) {
10
10
  var field = useField();
11
11
  return /*#__PURE__*/React.createElement(Card, {
12
- className: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &,\n & .ant-card-body {\n height: 100%;\n }\n "])))
12
+ className: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 100%;\n > .ant-card-body {\n padding: 24px 24px 0px;\n height: 100%;\n }\n .nb-action-bar button {\n margin-bottom: 10px;\n }\n "])))
13
13
  }, /*#__PURE__*/React.createElement("div", {
14
14
  className: itemCss
15
15
  }, /*#__PURE__*/React.createElement(RecordSimpleProvider, {
@@ -42,7 +42,5 @@
42
42
  }
43
43
 
44
44
  html body {
45
- --adm-font-family: -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB,
46
- Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji,
47
- Segoe UI Symbol;
45
+ --adm-font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
48
46
  }
@@ -6,11 +6,11 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
8
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
9
+ import { css, cx } from '@emotion/css';
10
+ import { FormLayout } from '@formily/antd';
9
11
  import { createForm } from '@formily/core';
10
12
  import { FormContext, useField } from '@formily/react';
11
- import { css, cx } from '@emotion/css';
12
13
  import React, { createContext, useContext, useEffect, useMemo } from 'react';
13
- import { FormLayout } from '@formily/antd';
14
14
  import { BlockProvider, useBlockRequestContext } from '../../../block-provider';
15
15
  export var ListBlockContext = /*#__PURE__*/createContext({});
16
16
  var InternalListBlockProvider = function InternalListBlockProvider(props) {
@@ -40,7 +40,7 @@ var InternalListBlockProvider = function InternalListBlockProvider(props) {
40
40
  }, /*#__PURE__*/React.createElement(FormLayout, {
41
41
  layout: 'vertical'
42
42
  }, /*#__PURE__*/React.createElement("div", {
43
- className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-description-input {\n line-height: 34px;\n }\n .ant-formily-item-feedback-layout-loose {\n margin-bottom: 12px;\n }\n "]))))
43
+ className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-description-input {\n line-height: 34px;\n }\n .ant-formily-item-feedback-layout-loose {\n display: inline;\n }\n "]))))
44
44
  }, props.children))));
45
45
  };
46
46
  export var ListBlockProvider = function ListBlockProvider(props) {
@@ -1,10 +1,10 @@
1
1
  var _templateObject;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import React from 'react';
4
3
  import { css } from '@emotion/css';
5
4
  import { useField } from '@formily/react';
5
+ import React from 'react';
6
6
  import { RecordSimpleProvider } from '../../../record-provider';
7
- var itemCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n flex-direction: column;\n // gap: 8px;\n padding: 5px 0;\n border-bottom: 1px solid #f0f0f0;\n"])));
7
+ var itemCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n flex-direction: column;\n // gap: 8px;\n padding: 4px 5px 0;\n border-bottom: 1px solid #f0f0f0;\n"])));
8
8
  export var ListItem = function ListItem(props) {
9
9
  var field = useField();
10
10
  return /*#__PURE__*/React.createElement("div", {
@@ -1,6 +1,6 @@
1
- import { ListDesigner } from './List.Designer';
2
- import { ListBlockProvider } from './List.Decorator';
3
1
  import React from 'react';
2
+ import { ListBlockProvider } from './List.Decorator';
3
+ import { ListDesigner } from './List.Designer';
4
4
  import { ListItem } from './List.Item';
5
5
  export declare const List: ((props: any) => React.JSX.Element) & {
6
6
  Item: typeof ListItem;
@@ -12,18 +12,18 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
12
12
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
14
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
- import { ListDesigner } from './List.Designer';
16
- import { ListBlockProvider, useListBlockContext, useListItemProps } from './List.Decorator';
17
- import React, { useCallback, useState } from 'react';
18
- import { RecursionField, Schema, useField, useFieldSchema } from '@formily/react';
19
15
  import { css, cx } from '@emotion/css';
16
+ import { RecursionField, Schema, useField, useFieldSchema } from '@formily/react';
20
17
  import { List as AntdList } from 'antd';
21
- import { useListActionBarProps } from './hooks';
18
+ import React, { useCallback, useState } from 'react';
22
19
  import { SortableItem } from '../../common';
23
20
  import { SchemaComponentOptions } from '../../core';
24
21
  import { useDesigner } from '../../hooks';
22
+ import { useListActionBarProps } from './hooks';
23
+ import { ListBlockProvider, useListBlockContext, useListItemProps } from './List.Decorator';
24
+ import { ListDesigner } from './List.Designer';
25
25
  import { ListItem } from './List.Item';
26
- var designerCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin-bottom: var(--nb-spacing);\n &:hover {\n > .general-schema-designer {\n display: block;\n }\n }\n\n > .general-schema-designer {\n position: absolute;\n z-index: 999;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: rgba(241, 139, 98, 0.06);\n border: 0;\n pointer-events: none;\n > .general-schema-designer-icons {\n position: absolute;\n right: 2px;\n top: 2px;\n line-height: 16px;\n pointer-events: all;\n .ant-space-item {\n background-color: #f18b62;\n color: #fff;\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n }\n }\n }\n"])));
26
+ var designerCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin-bottom: var(--nb-spacing);\n .nb-action-bar {\n margin-top: 10px;\n }\n &:hover {\n > .general-schema-designer {\n display: block;\n }\n }\n\n > .general-schema-designer {\n position: absolute;\n z-index: 999;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: rgba(241, 139, 98, 0.06);\n border: 0;\n pointer-events: none;\n > .general-schema-designer-icons {\n position: absolute;\n right: 2px;\n top: 2px;\n line-height: 16px;\n pointer-events: all;\n .ant-space-item {\n background-color: #f18b62;\n color: #fff;\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n }\n }\n }\n"])));
27
27
  var InternalList = function InternalList(props) {
28
28
  var _service$data, _field$value;
29
29
  var _useListBlockContext = useListBlockContext(),