dtable-ui-component 6.0.103 → 6.0.105

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 (183) hide show
  1. package/lib/ActionSheet/index.js +35 -42
  2. package/lib/ActivityIndicator/index.js +9 -9
  3. package/lib/AsyncUserSelect/index.js +3 -3
  4. package/lib/Badge/index.js +31 -27
  5. package/lib/CheckboxEditor/index.js +14 -15
  6. package/lib/CollaboratorEditor/index.js +15 -16
  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 +9 -7
  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 +6 -8
  17. package/lib/DTableColorPicker/index.js +12 -13
  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 +8 -6
  30. package/lib/DTableRadioGroup/index.js +3 -3
  31. package/lib/DTableSelect/dtable-select-label.js +1 -1
  32. package/lib/DTableSelect/utils.js +36 -55
  33. package/lib/DateEditor/index.js +10 -13
  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 +2 -5
  38. package/lib/DepartmentSingleSelectEditor/index.js +14 -15
  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 +14 -15
  42. package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
  43. package/lib/DigitalSignEditor/pc-editor/index.js +6 -7
  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 +2 -3
  48. package/lib/FieldDisplaySetting/field-item.js +1 -1
  49. package/lib/FieldDisplaySetting/index.js +9 -11
  50. package/lib/FileEditor/files-previewer/index.js +14 -15
  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 +14 -15
  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 +2 -1
  58. package/lib/FileItemFormatter/index.js +1 -1
  59. package/lib/FileUploader/index.js +1 -1
  60. package/lib/FormulaFormatter/index.js +9 -15
  61. package/lib/GeolocationEditor/index.js +19 -23
  62. package/lib/GeolocationEditor/map-editor-utils.js +6 -10
  63. package/lib/GeolocationEditor/mb-editor/index.js +24 -27
  64. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +6 -9
  65. package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
  66. package/lib/GeolocationEditor/pc-editor/index.js +15 -21
  67. package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
  68. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +9 -13
  69. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +6 -9
  70. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +7 -24
  71. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +3 -20
  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 +17 -13
  77. package/lib/Icon/load-sprite.js +2 -13
  78. package/lib/IconButton/index.js +14 -11
  79. package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
  80. package/lib/ImageEditor/index.js +14 -15
  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/ImageThumbnail/index.js +2 -2
  86. package/lib/InputItem/custom-input.js +9 -9
  87. package/lib/InputItem/custom-keyboard.js +37 -34
  88. package/lib/InputItem/index.js +49 -52
  89. package/lib/InputItem/input.js +13 -9
  90. package/lib/LinkEditor/pc-popover/index.js +2 -3
  91. package/lib/List/index.js +21 -17
  92. package/lib/List/list-item.js +52 -50
  93. package/lib/MBEditorHeader/index.js +1 -1
  94. package/lib/MobileFullScreenPage/body/index.js +1 -1
  95. package/lib/MobileFullScreenPage/header/index.js +4 -4
  96. package/lib/MobileFullScreenPage/index.js +1 -1
  97. package/lib/MobileModal/index.js +10 -7
  98. package/lib/Modal/alert.js +2 -2
  99. package/lib/Modal/modal.js +31 -28
  100. package/lib/Modal/prompt.js +10 -10
  101. package/lib/MultipleSelectEditor/index.js +8 -6
  102. package/lib/MultipleSelectFormatter/index.js +1 -1
  103. package/lib/PhoneNumberLink/index.js +1 -1
  104. package/lib/Picker/AbstractPicker.js +28 -26
  105. package/lib/Popover/index.js +12 -9
  106. package/lib/Popover/item.js +26 -22
  107. package/lib/Progress/index.js +8 -10
  108. package/lib/Radio/Radio.js +15 -13
  109. package/lib/Radio/RadioItem.js +18 -18
  110. package/lib/RateFormatter/index.js +2 -2
  111. package/lib/RoleStatusEditor/index.js +1 -1
  112. package/lib/RowExpand/index.js +6 -7
  113. package/lib/RowExpandDialog/body/index.js +14 -14
  114. package/lib/RowExpandDialog/column-content/index.js +1 -1
  115. package/lib/RowExpandDialog/header/index.js +3 -4
  116. package/lib/RowExpandDialog/index.js +32 -43
  117. package/lib/RowExpandEditor/add-btn/index.js +6 -7
  118. package/lib/RowExpandEditor/checkbox-editor/index.js +6 -7
  119. package/lib/RowExpandEditor/collaborator-editor/index.js +6 -7
  120. package/lib/RowExpandEditor/date-editor/index.js +6 -7
  121. package/lib/RowExpandEditor/department-editor/index.js +6 -7
  122. package/lib/RowExpandEditor/digital-sign-editor/index.js +6 -7
  123. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +4 -4
  124. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +4 -4
  125. package/lib/RowExpandEditor/duration-editor/index.js +6 -7
  126. package/lib/RowExpandEditor/email-editor/index.js +6 -7
  127. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
  128. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
  129. package/lib/RowExpandEditor/file-editor/index.js +6 -7
  130. package/lib/RowExpandEditor/geolocation-editor/index.js +6 -7
  131. package/lib/RowExpandEditor/image-editor/index.js +6 -7
  132. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
  133. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
  134. package/lib/RowExpandEditor/index.js +10 -11
  135. package/lib/RowExpandEditor/long-text-editor/index.js +6 -7
  136. package/lib/RowExpandEditor/multiple-select-editor/index.js +6 -7
  137. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
  138. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
  139. package/lib/RowExpandEditor/number-editor/index.js +6 -7
  140. package/lib/RowExpandEditor/rate-editor/index.js +6 -7
  141. package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
  142. package/lib/RowExpandEditor/rate-editor/pc-editor.js +5 -5
  143. package/lib/RowExpandEditor/single-select-editor/index.js +6 -7
  144. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +4 -4
  145. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
  146. package/lib/RowExpandEditor/text-editor/index.js +6 -7
  147. package/lib/RowExpandEditor/url-editor/index.js +6 -7
  148. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +2 -2
  149. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +2 -2
  150. package/lib/RowExpandFormatter/department-formatter/index.js +3 -6
  151. package/lib/RowExpandFormatter/email-formatter/index.js +1 -1
  152. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
  153. package/lib/RowExpandFormatter/formula-formatter/index.js +11 -17
  154. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
  155. package/lib/RowExpandFormatter/index.js +7 -11
  156. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
  157. package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
  158. package/lib/RowExpandFormatter/rate-formatter/index.js +2 -2
  159. package/lib/RowExpandFormatter/url-formatter/index.js +2 -2
  160. package/lib/RowExpandView/body/index.js +15 -13
  161. package/lib/RowExpandView/index.js +28 -39
  162. package/lib/SelectOptionGroup/index.js +1 -1
  163. package/lib/SelectedDepartments/index.js +3 -3
  164. package/lib/SimpleLongTextFormatter/index.js +2 -2
  165. package/lib/SingleSelectEditor/index.js +8 -6
  166. package/lib/TabBar/Tab.js +10 -10
  167. package/lib/TabBar/index.js +6 -7
  168. package/lib/Tabs/index.js +9 -10
  169. package/lib/TextareaItem/index.js +45 -43
  170. package/lib/Toast/index.js +5 -5
  171. package/lib/formatterConfig/index.js +3 -3
  172. package/lib/select-editor/index.js +14 -15
  173. package/lib/select-editor/pc-editor/index.js +5 -5
  174. package/lib/toaster/alert.js +1 -1
  175. package/lib/toaster/toast.js +1 -1
  176. package/lib/toaster/toastManager.js +15 -12
  177. package/lib/toaster/toaster.js +9 -12
  178. package/lib/utils/class.js +3 -3
  179. package/lib/utils/departments.js +4 -3
  180. package/lib/utils/getLocale.js +5 -11
  181. package/lib/utils/object-utils.js +5 -5
  182. package/lib/utils/url.js +4 -4
  183. package/package.json +3 -4
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.searchDepartments = exports.getNormalizedDepartments = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
7
9
  const searchDepartments = (departments, searchValue) => {
8
10
  const validSearchValue = searchValue ? searchValue.trim().toLowerCase() : '';
9
11
  const validDepartments = Array.isArray(departments) ? departments : [];
@@ -27,11 +29,10 @@ const getNormalizedDepartments = function (departments) {
27
29
  return departments.map(depart => {
28
30
  const hasChild = canExpand && !!parentIdMap[depart.id];
29
31
  const isExpanded = depart.parent_id === -1 ? true : false;
30
- return {
31
- ...depart,
32
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, depart), {}, {
32
33
  hasChild,
33
34
  isExpanded
34
- };
35
+ });
35
36
  });
36
37
  };
37
38
  exports.getNormalizedDepartments = getNormalizedDepartments;
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.getComponentLocale = getComponentLocale;
7
8
  exports.getLocaleCode = getLocaleCode;
9
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
8
10
  function getComponentLocale(props, context, componentName, getDefaultLocale) {
9
11
  let locale = {};
10
12
  if (context && context.antLocale && context.antLocale[componentName]) {
@@ -15,19 +17,11 @@ function getComponentLocale(props, context, componentName, getDefaultLocale) {
15
17
  // https://github.com/ant-design/ant-design/issues/6334
16
18
  locale = defaultLocale.default || defaultLocale;
17
19
  }
18
- let result = {
19
- ...locale
20
- };
20
+ let result = (0, _objectSpread2.default)({}, locale);
21
21
  if (props.locale) {
22
- result = {
23
- ...result,
24
- ...props.locale
25
- };
22
+ result = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, result), props.locale);
26
23
  if (props.locale.lang) {
27
- result.lang = {
28
- ...locale.lang,
29
- ...props.locale.lang
30
- };
24
+ result.lang = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, locale.lang), props.locale.lang);
31
25
  }
32
26
  }
33
27
  return result;
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.shallowCloneObject = exports.hasOwnProperty = exports.default = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
7
9
  class ObjectUtils {
8
10
  static getDataType(data) {
9
11
  let type = typeof data;
@@ -17,16 +19,13 @@ class ObjectUtils {
17
19
  }
18
20
  static isObjectChanged(source, comparison) {
19
21
  if (!this.iterable(source)) {
20
- throw new Error(`source should be a Object or Array , but got ${this.getDataType(source)}`);
22
+ throw new Error("source should be a Object or Array , but got ".concat(this.getDataType(source)));
21
23
  }
22
24
  if (this.getDataType(source) !== this.getDataType(comparison)) {
23
25
  return true;
24
26
  }
25
27
  const sourceKeys = Object.keys(source);
26
- const comparisonKeys = Object.keys({
27
- ...source,
28
- ...comparison
29
- });
28
+ const comparisonKeys = Object.keys((0, _objectSpread2.default)((0, _objectSpread2.default)({}, source), comparison));
30
29
  if (sourceKeys.length !== comparisonKeys.length) {
31
30
  return true;
32
31
  }
@@ -50,6 +49,7 @@ const hasOwnProperty = (obj, propertyKey) => {
50
49
  exports.hasOwnProperty = hasOwnProperty;
51
50
  const shallowCloneObject = obj => {
52
51
  const result = {};
52
+ // eslint-disable-next-line
53
53
  for (const k in obj) {
54
54
  if (Object.prototype.hasOwnProperty.call(obj, k)) {
55
55
  result[k] = obj[k];
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 = `${validServer}/thumbnail/workspace/${workspaceID}/asset/${dtableUuid}${partUrl}`;
84
- if (url.indexOf('?') > -1) return `${url}&size=${size}`;
85
- return `${url}?size=${size}`;
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);
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 `${validServer}/workspace/${workspaceID}/asset/${dtableUuid}${partUrl}`;
99
+ return "".concat(validServer, "/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(partUrl);
100
100
  };
101
101
  exports.generateCurrentBaseImageUrl = generateCurrentBaseImageUrl;
102
102
  const getImageThumbnailUrl = function (url) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.103",
3
+ "version": "6.0.105",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "4.0.2",
@@ -87,7 +87,6 @@
87
87
  "babel-plugin-import": "^1.13.6",
88
88
  "babel-plugin-named-asset-import": "^0.3.6",
89
89
  "babel-preset-react-app": "^10.0.1",
90
- "bfj": "^7.0.2",
91
90
  "browserslist": "^4.18.1",
92
91
  "camelcase": "^6.2.1",
93
92
  "case-sensitive-paths-webpack-plugin": "^2.4.0",
@@ -130,12 +129,12 @@
130
129
  "sass-loader": "^12.3.0",
131
130
  "semver": "^7.3.5",
132
131
  "source-map-loader": "^3.0.0",
133
- "storybook": "^9.1.17",
132
+ "storybook": "^9.1.19",
134
133
  "style-loader": "^3.3.1",
135
134
  "terser-webpack-plugin": "^5.2.5",
136
135
  "url-loader": "^4.1.1",
137
136
  "web-vitals": "2.1.4",
138
- "webpack": "^5.94.0",
137
+ "webpack": "^5.105.0",
139
138
  "webpack-dev-server": "^5.2.2",
140
139
  "webpack-manifest-plugin": "^4.0.2",
141
140
  "workbox-webpack-plugin": "^6.4.1",