dtable-ui-component 6.0.110 → 6.0.111-amk.13

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 (184) hide show
  1. package/lib/ActionSheet/index.js +42 -35
  2. package/lib/ActivityIndicator/index.js +9 -9
  3. package/lib/AsyncUserSelect/index.js +3 -3
  4. package/lib/Badge/index.js +27 -31
  5. package/lib/CheckboxEditor/index.js +15 -14
  6. package/lib/CollaboratorEditor/index.js +16 -15
  7. package/lib/CollaboratorEditor/pc-editor/index.js +1 -1
  8. package/lib/CollapsibleSettingLayout/index.js +1 -1
  9. package/lib/Comment/body/comment.js +1 -1
  10. package/lib/Comment/body/index.js +7 -9
  11. package/lib/Comment/footer/index.js +1 -1
  12. package/lib/Comment/footer/input/index.js +5 -5
  13. package/lib/Comment/footer/input/participant/index.js +1 -1
  14. package/lib/Comment/footer/participants/participant-select/index.js +2 -2
  15. package/lib/Comment/utils/utilities.js +1 -1
  16. package/lib/DTableColorPicker/ColorPickerPortal/index.js +8 -6
  17. package/lib/DTableColorPicker/index.js +13 -12
  18. package/lib/DTableColorPicker/utils.js +1 -1
  19. package/lib/DTableCommonAddTool/index.js +2 -2
  20. package/lib/DTableFiltersPopover/index.js +1 -1
  21. package/lib/DTableFiltersPopover/utils/index.js +1 -1
  22. package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
  23. package/lib/DTableFiltersPopover/widgets/filter-item.js +1 -1
  24. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
  25. package/lib/DTableFiltersPopover/widgets/rate-item.js +5 -5
  26. package/lib/DTableGroupSelect/select-option-group.js +1 -1
  27. package/lib/DTableIcon/index.js +4 -4
  28. package/lib/DTableIcon/svg-icon.js +4 -4
  29. package/lib/DTableModalHeader/index.js +6 -8
  30. package/lib/DTableRadioGroup/index.js +3 -3
  31. package/lib/DTableSelect/dtable-select-label.js +1 -1
  32. package/lib/DTableSelect/utils.js +55 -36
  33. package/lib/DateEditor/index.js +13 -10
  34. package/lib/DateEditor/pc-editor.js +1 -1
  35. package/lib/DatePicker/utils.js +4 -4
  36. package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
  37. package/lib/DepartmentSelectFilter/index.js +5 -2
  38. package/lib/DepartmentSingleSelectEditor/index.js +15 -14
  39. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
  40. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +6 -6
  41. package/lib/DigitalSignEditor/index.js +15 -14
  42. package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
  43. package/lib/DigitalSignEditor/pc-editor/index.js +7 -6
  44. package/lib/DigitalSignEditor/service.js +1 -1
  45. package/lib/DigitalSignEditor/signature-board/index.js +2 -2
  46. package/lib/DigitalSignFormatter/utils.js +1 -1
  47. package/lib/Drawer/index.js +3 -2
  48. package/lib/FieldDisplaySetting/field-item.js +1 -1
  49. package/lib/FieldDisplaySetting/index.js +11 -9
  50. package/lib/FileEditor/files-previewer/index.js +15 -14
  51. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +2 -2
  52. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +3 -3
  53. package/lib/FileEditor/index.js +15 -14
  54. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -1
  55. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
  56. package/lib/FileEditor/pc-editor/index.js +3 -3
  57. package/lib/FileFormatter/index.js +5 -3
  58. package/lib/FileItemFormatter/index.js +1 -1
  59. package/lib/FileUploader/index.js +1 -1
  60. package/lib/FormulaFormatter/index.js +15 -9
  61. package/lib/GeolocationEditor/index.js +23 -19
  62. package/lib/GeolocationEditor/map-editor-utils.js +10 -6
  63. package/lib/GeolocationEditor/mb-editor/index.js +27 -23
  64. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +9 -6
  65. package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
  66. package/lib/GeolocationEditor/pc-editor/index.js +21 -15
  67. package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
  68. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +13 -9
  69. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +9 -6
  70. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +24 -7
  71. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +20 -3
  72. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +1 -1
  73. package/lib/GeolocationEditor/pc-editor/province-editor.js +2 -2
  74. package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
  75. package/lib/HtmlLongTextFormatter/index.js +1 -1
  76. package/lib/Icon/index.js +13 -17
  77. package/lib/Icon/load-sprite.js +13 -2
  78. package/lib/IconButton/index.js +11 -14
  79. package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
  80. package/lib/ImageEditor/index.js +15 -14
  81. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +2 -2
  82. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +5 -5
  83. package/lib/ImageEditor/pc-editor/images-previewer/index.js +1 -1
  84. package/lib/ImageFormatter/index.js +1 -1
  85. package/lib/ImagePreviewerLightbox/index.js +20 -17
  86. package/lib/ImageThumbnail/index.js +2 -2
  87. package/lib/InputItem/custom-input.js +9 -9
  88. package/lib/InputItem/custom-keyboard.js +34 -37
  89. package/lib/InputItem/index.js +52 -49
  90. package/lib/InputItem/input.js +9 -13
  91. package/lib/LinkEditor/pc-popover/index.js +3 -2
  92. package/lib/List/index.js +17 -21
  93. package/lib/List/list-item.js +50 -52
  94. package/lib/MBEditorHeader/index.js +1 -1
  95. package/lib/MobileFullScreenPage/body/index.js +1 -1
  96. package/lib/MobileFullScreenPage/header/index.js +4 -4
  97. package/lib/MobileFullScreenPage/index.js +1 -1
  98. package/lib/MobileModal/index.js +7 -10
  99. package/lib/Modal/alert.js +2 -2
  100. package/lib/Modal/modal.js +28 -31
  101. package/lib/Modal/prompt.js +10 -10
  102. package/lib/MultipleSelectEditor/index.js +6 -8
  103. package/lib/MultipleSelectFormatter/index.js +1 -1
  104. package/lib/PhoneNumberLink/index.js +1 -1
  105. package/lib/Picker/AbstractPicker.js +26 -28
  106. package/lib/Popover/index.js +9 -12
  107. package/lib/Popover/item.js +22 -26
  108. package/lib/Progress/index.js +10 -8
  109. package/lib/Radio/Radio.js +13 -15
  110. package/lib/Radio/RadioItem.js +18 -18
  111. package/lib/RateFormatter/index.js +2 -2
  112. package/lib/RoleStatusEditor/index.js +1 -1
  113. package/lib/RowExpand/index.js +7 -6
  114. package/lib/RowExpandDialog/body/index.js +14 -14
  115. package/lib/RowExpandDialog/column-content/index.js +1 -1
  116. package/lib/RowExpandDialog/header/index.js +4 -3
  117. package/lib/RowExpandDialog/index.js +43 -32
  118. package/lib/RowExpandEditor/add-btn/index.js +7 -6
  119. package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
  120. package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
  121. package/lib/RowExpandEditor/date-editor/index.js +7 -6
  122. package/lib/RowExpandEditor/department-editor/index.js +7 -6
  123. package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
  124. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +4 -4
  125. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +4 -4
  126. package/lib/RowExpandEditor/duration-editor/index.js +7 -6
  127. package/lib/RowExpandEditor/email-editor/index.js +7 -6
  128. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
  129. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
  130. package/lib/RowExpandEditor/file-editor/index.js +7 -6
  131. package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
  132. package/lib/RowExpandEditor/image-editor/index.js +7 -6
  133. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
  134. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
  135. package/lib/RowExpandEditor/index.js +11 -10
  136. package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
  137. package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
  138. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
  139. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
  140. package/lib/RowExpandEditor/number-editor/index.js +7 -6
  141. package/lib/RowExpandEditor/rate-editor/index.js +7 -6
  142. package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
  143. package/lib/RowExpandEditor/rate-editor/pc-editor.js +5 -5
  144. package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
  145. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +4 -4
  146. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
  147. package/lib/RowExpandEditor/text-editor/index.js +7 -6
  148. package/lib/RowExpandEditor/url-editor/index.js +7 -6
  149. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +2 -2
  150. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +2 -2
  151. package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
  152. package/lib/RowExpandFormatter/email-formatter/index.js +1 -1
  153. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
  154. package/lib/RowExpandFormatter/formula-formatter/index.js +17 -11
  155. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
  156. package/lib/RowExpandFormatter/index.js +11 -7
  157. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
  158. package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
  159. package/lib/RowExpandFormatter/rate-formatter/index.js +2 -2
  160. package/lib/RowExpandFormatter/url-formatter/index.js +2 -2
  161. package/lib/RowExpandView/body/index.js +13 -15
  162. package/lib/RowExpandView/index.js +39 -28
  163. package/lib/SelectOptionGroup/index.js +1 -1
  164. package/lib/SelectedDepartments/index.js +3 -3
  165. package/lib/SimpleLongTextFormatter/index.js +2 -2
  166. package/lib/SingleSelectEditor/index.js +6 -8
  167. package/lib/TabBar/Tab.js +10 -10
  168. package/lib/TabBar/index.js +7 -6
  169. package/lib/Tabs/index.js +10 -9
  170. package/lib/TextareaItem/index.js +43 -45
  171. package/lib/Toast/index.js +5 -5
  172. package/lib/formatterConfig/index.js +3 -3
  173. package/lib/select-editor/index.js +15 -14
  174. package/lib/select-editor/pc-editor/index.js +5 -5
  175. package/lib/toaster/alert.js +1 -1
  176. package/lib/toaster/toast.js +1 -1
  177. package/lib/toaster/toastManager.js +12 -14
  178. package/lib/toaster/toaster.js +12 -9
  179. package/lib/utils/class.js +3 -3
  180. package/lib/utils/departments.js +3 -4
  181. package/lib/utils/getLocale.js +11 -5
  182. package/lib/utils/object-utils.js +5 -4
  183. package/lib/utils/url.js +4 -4
  184. package/package.json +3 -3
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.searchDepartments = exports.getNormalizedDepartments = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
7
  const searchDepartments = (departments, searchValue) => {
10
8
  const validSearchValue = searchValue ? searchValue.trim().toLowerCase() : '';
11
9
  const validDepartments = Array.isArray(departments) ? departments : [];
@@ -29,10 +27,11 @@ const getNormalizedDepartments = function (departments) {
29
27
  return departments.map(depart => {
30
28
  const hasChild = canExpand && !!parentIdMap[depart.id];
31
29
  const isExpanded = depart.parent_id === -1 ? true : false;
32
- return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, depart), {}, {
30
+ return {
31
+ ...depart,
33
32
  hasChild,
34
33
  isExpanded
35
- });
34
+ };
36
35
  });
37
36
  };
38
37
  exports.getNormalizedDepartments = getNormalizedDepartments;
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.getComponentLocale = getComponentLocale;
8
7
  exports.getLocaleCode = getLocaleCode;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
8
  function getComponentLocale(props, context, componentName, getDefaultLocale) {
11
9
  let locale = {};
12
10
  if (context && context.antLocale && context.antLocale[componentName]) {
@@ -17,11 +15,19 @@ function getComponentLocale(props, context, componentName, getDefaultLocale) {
17
15
  // https://github.com/ant-design/ant-design/issues/6334
18
16
  locale = defaultLocale.default || defaultLocale;
19
17
  }
20
- let result = (0, _objectSpread2.default)({}, locale);
18
+ let result = {
19
+ ...locale
20
+ };
21
21
  if (props.locale) {
22
- result = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, result), props.locale);
22
+ result = {
23
+ ...result,
24
+ ...props.locale
25
+ };
23
26
  if (props.locale.lang) {
24
- result.lang = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, locale.lang), props.locale.lang);
27
+ result.lang = {
28
+ ...locale.lang,
29
+ ...props.locale.lang
30
+ };
25
31
  }
26
32
  }
27
33
  return result;
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.shallowCloneObject = exports.hasOwnProperty = exports.default = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
7
  class ObjectUtils {
10
8
  static getDataType(data) {
11
9
  let type = typeof data;
@@ -19,13 +17,16 @@ class ObjectUtils {
19
17
  }
20
18
  static isObjectChanged(source, comparison) {
21
19
  if (!this.iterable(source)) {
22
- throw new Error("source should be a Object or Array , but got ".concat(this.getDataType(source)));
20
+ throw new Error(`source should be a Object or Array , but got ${this.getDataType(source)}`);
23
21
  }
24
22
  if (this.getDataType(source) !== this.getDataType(comparison)) {
25
23
  return true;
26
24
  }
27
25
  const sourceKeys = Object.keys(source);
28
- const comparisonKeys = Object.keys((0, _objectSpread2.default)((0, _objectSpread2.default)({}, source), comparison));
26
+ const comparisonKeys = Object.keys({
27
+ ...source,
28
+ ...comparison
29
+ });
29
30
  if (sourceKeys.length !== comparisonKeys.length) {
30
31
  return true;
31
32
  }
package/lib/utils/url.js CHANGED
@@ -80,9 +80,9 @@ const generateCurrentBaseImageThumbnailUrl = _ref => {
80
80
  } = _ref;
81
81
  const validServer = server || ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.dtable) && window.dtable.server || '';
82
82
  if (!partUrl || typeof partUrl !== 'string') return '';
83
- let url = "".concat(validServer, "/thumbnail/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(partUrl);
84
- if (url.indexOf('?') > -1) return "".concat(url, "&size=").concat(size);
85
- return "".concat(url, "?size=").concat(size);
83
+ let url = `${validServer}/thumbnail/workspace/${workspaceID}/asset/${dtableUuid}${partUrl}`;
84
+ if (url.indexOf('?') > -1) return `${url}&size=${size}`;
85
+ return `${url}?size=${size}`;
86
86
  };
87
87
  exports.generateCurrentBaseImageThumbnailUrl = generateCurrentBaseImageThumbnailUrl;
88
88
  const generateCurrentBaseImageUrl = _ref2 => {
@@ -96,7 +96,7 @@ const generateCurrentBaseImageUrl = _ref2 => {
96
96
  if (!partUrl || typeof partUrl !== 'string') return '';
97
97
  if (partUrl.startsWith('http')) return partUrl;
98
98
  const validServer = server || ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.dtable) && window.dtable.server || '';
99
- return "".concat(validServer, "/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(partUrl);
99
+ return `${validServer}/workspace/${workspaceID}/asset/${dtableUuid}${partUrl}`;
100
100
  };
101
101
  exports.generateCurrentBaseImageUrl = generateCurrentBaseImageUrl;
102
102
  const getImageThumbnailUrl = function (url) {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.110",
3
+ "version": "6.0.111amk.13",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^5.0.4",
7
7
  "@seafile/seafile-calendar": "^1.0.8",
8
- "@seafile/seafile-editor": "^3.0.26",
8
+ "@seafile/seafile-editor": "^3.0.30",
9
9
  "classnames": "~2.5.*",
10
10
  "dayjs": "1.10.7",
11
11
  "dtable-utils": "~5.0.27",
@@ -112,7 +112,7 @@
112
112
  "less-loader": "^11.1.3",
113
113
  "mini-css-extract-plugin": "^2.4.5",
114
114
  "path-browserify": "^1.0.1",
115
- "postcss": "^8.5.3",
115
+ "postcss": "^8.5.12",
116
116
  "postcss-flexbugs-fixes": "^5.0.2",
117
117
  "postcss-loader": "^6.2.1",
118
118
  "postcss-normalize": "^10.0.1",