dtable-ui-component 4.4.4 → 4.4.6

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 (146) hide show
  1. package/lib/AutoNumberFormatter/index.js +14 -7
  2. package/lib/ButtonFormatter/index.js +16 -9
  3. package/lib/CTimeFormatter/index.js +16 -9
  4. package/lib/CheckboxEditor/index.js +15 -8
  5. package/lib/CheckboxFormatter/index.js +15 -8
  6. package/lib/CollaboratorEditor/index.js +29 -21
  7. package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.js +32 -25
  8. package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.js +25 -18
  9. package/lib/CollaboratorFormatter/index.js +19 -12
  10. package/lib/CollaboratorItem/index.js +17 -10
  11. package/lib/CreatorFormatter/index.js +19 -12
  12. package/lib/DTableCommonAddTool/index.js +13 -6
  13. package/lib/DTableCustomizeCollaboratorSelect/index.js +26 -18
  14. package/lib/DTableCustomizeSelect/index.js +23 -15
  15. package/lib/DTableFiltersPopover/constants/index.js +38 -33
  16. package/lib/DTableFiltersPopover/index.js +38 -31
  17. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +53 -46
  18. package/lib/DTableFiltersPopover/utils/index.js +128 -99
  19. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +34 -26
  20. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +33 -25
  21. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +34 -26
  22. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +34 -26
  23. package/lib/DTableFiltersPopover/widgets/filter-item.js +128 -120
  24. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +26 -18
  25. package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -8
  26. package/lib/DTablePopover/index.js +15 -8
  27. package/lib/DTablePopover/utils.js +9 -2
  28. package/lib/DTableRadio/index.js +17 -10
  29. package/lib/DTableSearchInput/index.js +21 -13
  30. package/lib/DTableSearchInput/utils.js +9 -2
  31. package/lib/DTableSelect/dtable-select-label.js +13 -6
  32. package/lib/DTableSelect/index.js +18 -10
  33. package/lib/DTableSelect/utils.js +20 -10
  34. package/lib/DTableSwitch/index.js +14 -7
  35. package/lib/DateEditor/index.js +30 -22
  36. package/lib/DateEditor/mb-date-editor-popover/index.js +55 -47
  37. package/lib/DateEditor/pc-date-editor-popover.js +27 -20
  38. package/lib/DateFormatter/index.js +16 -9
  39. package/lib/Department-editor/constants.js +7 -1
  40. package/lib/Department-editor/department-multiple-select/index.js +32 -24
  41. package/lib/Department-editor/department-single-select.js +41 -33
  42. package/lib/Department-editor/index.js +22 -14
  43. package/lib/Department-editor/selected-departments/index.js +32 -25
  44. package/lib/Department-editor/utils.js +11 -3
  45. package/lib/DepartmentSingleSelectFormatter/index.js +16 -9
  46. package/lib/DigitalSignFormatter/index.js +23 -15
  47. package/lib/DigitalSignFormatter/utils.js +11 -3
  48. package/lib/DurationFormatter/index.js +16 -9
  49. package/lib/EditEditorButton/index.js +12 -5
  50. package/lib/EmailFormatter/index.js +14 -7
  51. package/lib/FieldDisplaySetting/field-item.js +21 -14
  52. package/lib/FieldDisplaySetting/index.js +27 -19
  53. package/lib/FileEditor/index.js +15 -8
  54. package/lib/FileEditor/pc-files-addition/index.js +1 -0
  55. package/lib/FileEditor/pc-files-addition/pc-file-uploaded-item.js +1 -0
  56. package/lib/FileEditor/pc-files-preview/index.js +1 -0
  57. package/lib/FileEditor/pc-files-preview/pc-file-item-preview.js +1 -0
  58. package/lib/FileFormatter/index.js +19 -11
  59. package/lib/FileItemFormatter/index.js +14 -6
  60. package/lib/FileItemFormatter/utils.js +9 -2
  61. package/lib/FileUploader/index.js +11 -4
  62. package/lib/FormulaFormatter/cell-value-validator.js +24 -18
  63. package/lib/FormulaFormatter/index.js +39 -32
  64. package/lib/FormulaFormatter/utils.js +29 -13
  65. package/lib/GeolocationFormatter/index.js +16 -9
  66. package/lib/HtmlLongTextFormatter/index.js +17 -9
  67. package/lib/ImageFormatter/images-lazy-load.js +16 -9
  68. package/lib/ImageFormatter/index.js +24 -16
  69. package/lib/ImageFormatter/utils.js +9 -2
  70. package/lib/ImagePreviewerLightbox/index.js +19 -12
  71. package/lib/ImagePreviewerLightbox/utils.js +11 -3
  72. package/lib/LastModifierFormatter/index.js +19 -12
  73. package/lib/LinkEditor/index.js +33 -25
  74. package/lib/LinkEditor/link-editor-option.js +15 -8
  75. package/lib/LinkEditor/mb-link-editor-popover/index.js +30 -23
  76. package/lib/LinkEditor/pc-link-editor-popover/index.js +24 -17
  77. package/lib/LinkFormatter/index.js +20 -13
  78. package/lib/Loading/index.js +11 -4
  79. package/lib/LongTextFormatter/index.js +13 -6
  80. package/lib/MBEditorHeader/index.js +14 -7
  81. package/lib/MTimeFormatter/index.js +16 -9
  82. package/lib/ModalPortal/index.js +12 -5
  83. package/lib/MultipleSelectEditor/index.js +25 -17
  84. package/lib/MultipleSelectFormatter/index.js +17 -10
  85. package/lib/NotificationPopover/index.js +24 -16
  86. package/lib/NumberEditor/index.js +25 -18
  87. package/lib/NumberFormatter/index.js +16 -9
  88. package/lib/RateFormatter/index.js +15 -8
  89. package/lib/RoleStatusEditor/index.js +22 -14
  90. package/lib/RowExpandEmailFormatter/index.js +17 -10
  91. package/lib/RowExpandFileFormatter/index.js +16 -8
  92. package/lib/RowExpandFileFormatter/row-expand-file-item-formatter.js +27 -18
  93. package/lib/RowExpandFormatter/index.js +86 -78
  94. package/lib/RowExpandFormulaFormatter/index.js +42 -34
  95. package/lib/RowExpandImageFormatter/index.js +19 -10
  96. package/lib/RowExpandImageFormatter/row-expand-image-item-formatter.js +27 -18
  97. package/lib/RowExpandImageFormatter/utils.js +9 -2
  98. package/lib/RowExpandLinkFormatter/collaborator-item-formatter.js +16 -7
  99. package/lib/RowExpandLinkFormatter/index.js +46 -37
  100. package/lib/RowExpandLinkFormatter/utils.js +17 -6
  101. package/lib/RowExpandLinkFormatter/value-display-utils.js +12 -5
  102. package/lib/RowExpandRateFormatter/index.js +15 -8
  103. package/lib/RowExpandUrlFormatter/index.js +21 -14
  104. package/lib/SelectItem/index.js +12 -4
  105. package/lib/SelectOptionGroup/KeyCodes.js +7 -1
  106. package/lib/SelectOptionGroup/index.js +28 -20
  107. package/lib/SelectOptionGroup/option.js +11 -4
  108. package/lib/SimpleLongTextFormatter/index.js +27 -20
  109. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +7 -1
  110. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +15 -8
  111. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +14 -7
  112. package/lib/SingleSelectEditor/index.js +26 -18
  113. package/lib/SingleSelectFormatter/index.js +16 -9
  114. package/lib/TextEditor/index.js +14 -7
  115. package/lib/TextFormatter/index.js +14 -7
  116. package/lib/UrlFormatter/index.js +14 -7
  117. package/lib/cellFormatterFactory/index.js +11 -4
  118. package/lib/common/ClickOutside.js +12 -4
  119. package/lib/common/delete-tip.js +20 -12
  120. package/lib/common/modal-portal.js +13 -5
  121. package/lib/constants/index.js +28 -9
  122. package/lib/css/mb-cell-editor.css +1 -1
  123. package/lib/data/dtable-value.js +11 -6
  124. package/lib/formatterConfig/base-formatter-config.js +53 -46
  125. package/lib/formatterConfig/index.js +16 -9
  126. package/lib/hooks/common-hooks.js +11 -4
  127. package/lib/index.js +432 -75
  128. package/lib/lang/index.js +24 -13
  129. package/lib/locals/de.js +7 -1
  130. package/lib/locals/en.js +7 -1
  131. package/lib/locals/fr.js +7 -1
  132. package/lib/locals/zh-CN.js +7 -1
  133. package/lib/select-editor/index.js +27 -4
  134. package/lib/select-editor/mb-select-editor-popover/index.js +41 -33
  135. package/lib/select-editor/pc-select-editor-popover/index.js +26 -19
  136. package/lib/select-editor/select-editor-option.js +15 -8
  137. package/lib/toaster/alert.js +18 -11
  138. package/lib/toaster/index.js +10 -3
  139. package/lib/toaster/toast.js +16 -8
  140. package/lib/toaster/toastManager.js +13 -5
  141. package/lib/toaster/toaster.js +15 -7
  142. package/lib/utils/dayjs.js +11 -4
  143. package/lib/utils/editor-utils.js +15 -5
  144. package/lib/utils/event-bus.js +7 -1
  145. package/lib/utils/utils.js +17 -6
  146. package/package.json +80 -68
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "4.4.4",
3
+ "version": "4.4.6",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "2.0.5",
7
7
  "@seafile/seafile-calendar": "0.0.24",
8
- "@seafile/seafile-editor": "0.3.146",
8
+ "@seafile/seafile-editor": "1.0.32",
9
9
  "antd-mobile": "2.3.1",
10
10
  "classnames": "^2.3.2",
11
11
  "dayjs": "1.10.7",
@@ -27,8 +27,8 @@
27
27
  "build": "node scripts/build.js",
28
28
  "test": "node scripts/test.js",
29
29
  "eslint": "eslint --ext .jsx,.js src --max-warnings=0",
30
- "storybook": "start-storybook -p 6006",
31
- "build-storybook": "build-storybook -c .storybook -o docs",
30
+ "storybook": "storybook dev -p 6006",
31
+ "build-storybook": "storybook build -c .storybook -o docs",
32
32
  "pub:esm": "npm run clean:esm && export BABEL_ENV=node && ./node_modules/.bin/babel src --out-dir es --copy-files",
33
33
  "pub:lib": "npm run clean:lib && export BABEL_ENV=production && ./node_modules/.bin/babel src --out-dir lib --copy-files",
34
34
  "pub:umd": "npm run build",
@@ -56,81 +56,93 @@
56
56
  ]
57
57
  },
58
58
  "devDependencies": {
59
- "@babel/cli": "^7.8.4",
60
- "@babel/core": "^7.8.4",
61
- "@babel/plugin-proposal-class-properties": "^7.8.3",
62
- "@babel/plugin-proposal-export-default-from": "^7.8.3",
63
- "@babel/plugin-proposal-export-namespace-from": "^7.8.3",
64
- "@babel/plugin-proposal-object-rest-spread": "^7.9.5",
65
- "@babel/plugin-transform-runtime": "^7.10.1",
59
+ "@babel/cli": "7.22.15",
60
+ "@babel/core": "^7.16.0",
61
+ "@babel/eslint-parser": "^7.16.3",
62
+ "@babel/plugin-proposal-private-property-in-object": "7.21.11",
63
+ "@babel/plugin-transform-runtime": "7.22.10",
66
64
  "@babel/polyfill": "^7.10.1",
67
65
  "@babel/preset-env": "^7.9.5",
68
- "@storybook/addon-actions": "^5.3.14",
69
- "@storybook/addon-info": "^5.3.19",
70
- "@storybook/addon-knobs": "^5.3.19",
71
- "@storybook/addon-links": "^5.3.14",
72
- "@storybook/addons": "^5.3.14",
73
- "@storybook/react": "^7.5.0",
74
- "@svgr/webpack": "4.3.3",
75
- "@testing-library/jest-dom": "^4.2.4",
76
- "@testing-library/react": "^9.5.0",
77
- "@testing-library/user-event": "^7.2.1",
78
- "@typescript-eslint/eslint-plugin": "^2.10.0",
79
- "@typescript-eslint/parser": "^2.10.0",
80
- "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
81
- "babel-eslint": "10.0.3",
82
- "babel-jest": "^24.9.0",
83
- "babel-loader": "8.0.6",
66
+ "@babel/runtime": "7.22.11",
67
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
68
+ "@storybook/addon-actions": "7.6.17",
69
+ "@storybook/addon-docs": "7.6.17",
70
+ "@storybook/addon-essentials": "7.6.17",
71
+ "@storybook/addon-interactions": "7.6.17",
72
+ "@storybook/addon-knobs": "7.0.2",
73
+ "@storybook/addon-links": "7.6.17",
74
+ "@storybook/addon-onboarding": "1.0.11",
75
+ "@storybook/blocks": "7.6.17",
76
+ "@storybook/preset-create-react-app": "7.6.17",
77
+ "@storybook/react": "7.6.17",
78
+ "@storybook/react-webpack5": "7.6.17",
79
+ "@storybook/test": "7.6.17",
80
+ "@svgr/webpack": "8.1.0",
81
+ "@testing-library/jest-dom": "5.17.0",
82
+ "@testing-library/react": "^11.1.0",
83
+ "@testing-library/user-event": "13.5.0",
84
+ "@types/jest": "^29.5.10",
85
+ "@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
86
+ "autoprefixer": "10.4.5",
87
+ "babel-jest": "^27.4.2",
88
+ "babel-loader": "^8.2.3",
84
89
  "babel-plugin-import": "^1.13.6",
85
90
  "babel-plugin-named-asset-import": "^0.3.6",
86
- "babel-preset-react-app": "^9.1.1",
87
- "camelcase": "^5.3.1",
88
- "case-sensitive-paths-webpack-plugin": "2.3.0",
89
- "css-loader": "3.4.2",
90
- "dotenv": "8.2.0",
91
- "dotenv-expand": "5.1.0",
91
+ "babel-preset-react-app": "^10.0.1",
92
+ "bfj": "^7.0.2",
93
+ "browserslist": "^4.18.1",
94
+ "camelcase": "^6.2.1",
95
+ "case-sensitive-paths-webpack-plugin": "^2.4.0",
96
+ "circular-dependency-plugin": "^5.2.2",
97
+ "css-loader": "^6.5.1",
98
+ "css-minimizer-webpack-plugin": "^3.2.0",
99
+ "dotenv": "^10.0.0",
100
+ "dotenv-expand": "^5.1.0",
92
101
  "enzyme": "^3.11.0",
93
- "eslint": "^6.6.0",
94
- "eslint-config-react-app": "^5.2.0",
95
- "eslint-loader": "3.0.3",
96
- "eslint-plugin-flowtype": "4.6.0",
97
- "eslint-plugin-import": "2.20.0",
98
- "eslint-plugin-jsx-a11y": "6.2.3",
99
- "eslint-plugin-react": "7.18.0",
100
- "eslint-plugin-react-hooks": "^1.6.1",
101
- "file-loader": "4.3.0",
102
- "fs-extra": "^8.1.0",
103
- "html-webpack-plugin": "4.0.0-beta.11",
102
+ "eslint": "^8.3.0",
103
+ "eslint-config-react-app": "^7.0.1",
104
+ "eslint-plugin-storybook": "0.8.0",
105
+ "eslint-webpack-plugin": "^3.1.1",
106
+ "file-loader": "^6.2.0",
107
+ "fs-extra": "^10.0.0",
108
+ "html-webpack-plugin": "^5.5.0",
104
109
  "i18next": "22.4.9",
105
110
  "i18next-browser-languagedetector": "7.0.1",
106
111
  "i18next-xhr-backend": "3.2.2",
107
112
  "identity-obj-proxy": "3.0.0",
108
- "jest": "24.9.0",
109
- "jest-environment-jsdom-fourteen": "1.0.1",
110
- "jest-resolve": "24.9.0",
111
- "jest-watch-typeahead": "0.4.2",
112
- "mini-css-extract-plugin": "0.9.0",
113
- "optimize-css-assets-webpack-plugin": "5.0.3",
114
- "pnp-webpack-plugin": "1.6.0",
115
- "postcss-flexbugs-fixes": "4.1.0",
116
- "postcss-loader": "3.0.0",
117
- "postcss-normalize": "8.0.1",
118
- "postcss-preset-env": "6.7.0",
119
- "postcss-safe-parser": "4.0.1",
113
+ "jest": "^27.4.3",
114
+ "jest-resolve": "^27.4.2",
115
+ "jest-watch-typeahead": "^1.0.0",
116
+ "less": "^4.2.0",
117
+ "less-loader": "^11.1.3",
118
+ "mini-css-extract-plugin": "^2.4.5",
119
+ "node-polyfill-webpack-plugin": "2.0.1",
120
+ "postcss": "^8.4.31",
121
+ "postcss-flexbugs-fixes": "^5.0.2",
122
+ "postcss-loader": "^6.2.1",
123
+ "postcss-normalize": "^10.0.1",
124
+ "postcss-preset-env": "^7.0.1",
125
+ "prompts": "^2.4.2",
126
+ "react-app-polyfill": "^3.0.0",
120
127
  "react-dev-utils": "^12.0.1",
121
128
  "react-element-to-jsx-string": "^14.3.1",
122
129
  "react-i18next": "12.1.4",
123
- "resolve": "1.15.0",
124
- "resolve-url-loader": "3.1.5",
125
- "sass-loader": "8.0.2",
126
- "semver": "6.3.1",
127
- "style-loader": "0.23.1",
128
- "terser-webpack-plugin": "2.3.4",
129
- "ts-pnp": "1.1.5",
130
- "url-loader": "2.3.0",
131
- "webpack": "4.41.5",
132
- "webpack-dev-server": "3.11.3",
133
- "webpack-manifest-plugin": "2.2.0",
134
- "workbox-webpack-plugin": "4.3.1"
130
+ "react-refresh": "^0.11.0",
131
+ "resolve": "^1.20.0",
132
+ "resolve-url-loader": "^4.0.0",
133
+ "sass-loader": "^12.3.0",
134
+ "semver": "^7.3.5",
135
+ "source-map-loader": "^3.0.0",
136
+ "storybook": "7.6.17",
137
+ "style-loader": "^3.3.1",
138
+ "tailwindcss": "^3.0.2",
139
+ "terser-webpack-plugin": "^5.2.5",
140
+ "url-loader": "^4.1.1",
141
+ "web-vitals": "2.1.4",
142
+ "webpack": "^5.64.4",
143
+ "webpack-dev-server": "^4.6.0",
144
+ "webpack-manifest-plugin": "^4.0.2",
145
+ "workbox-webpack-plugin": "^6.4.1",
146
+ "worker-loader": "3.0.8"
135
147
  }
136
148
  }