@cmstops/pro-compo 3.9.1-rc.1 → 3.9.1-rc.10

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 (319) hide show
  1. package/README.md +134 -107
  2. package/dist/index.css +49 -4
  3. package/dist/index.min.css +1 -1
  4. package/dist/index.min.js.map +1 -1
  5. package/es/baseFilter/component.js +71 -14
  6. package/es/config.js +1 -1
  7. package/es/contentDetailList/component.js +24 -0
  8. package/es/contentDetailList/components/Content/index.js +2 -1
  9. package/es/contentDetailList/components/Doc/index.js +6 -0
  10. package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.js +4 -2
  11. package/es/contentModal/component.js +16 -8
  12. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -1
  13. package/es/contentModal/components/storeBox/index.js +4 -2
  14. package/es/dataTags/component.js +10 -5
  15. package/es/docHistory/component.js +43 -13
  16. package/es/docHistory/scripts/diff.js +4 -3
  17. package/es/docHistory/style/index.css +4 -0
  18. package/es/docHistory/style/index.less +37 -32
  19. package/es/docPreview/component.js +10 -5
  20. package/es/editMetaInfo/components/metaInfoForm.js +4 -2
  21. package/es/hooks/useAttachement.js +2 -9
  22. package/es/hooks/usePopper.js +3 -3
  23. package/es/hooks/useUpload.js +43 -4
  24. package/es/imageCrop/component.js +4 -2
  25. package/es/importData/component.js +6 -3
  26. package/es/index.css +49 -4
  27. package/es/mediaFilter/components/DocFilter.js +2 -1
  28. package/es/resourceGridList/component.js +4 -2
  29. package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +2 -1
  30. package/es/resourceModal/components/MediaSelection/MainContent/index.js +4 -2
  31. package/es/selectResourceModal/component.js +10 -5
  32. package/es/selectResourceModal/components/List/ListLocal/Upload.js +2 -1
  33. package/es/selectResourceModal/components/List/ListLocal/index.js +9 -4
  34. package/es/selectResourceModal/components/List/ListNormal/Filter.js +208 -92
  35. package/es/selectResourceModal/components/List/ListNormal/index.js +23 -7
  36. package/es/selectResourceModal/components/List/ListSystem/Filter.js +2 -1
  37. package/es/selectResourceModal/hooks/useResponsiveFilter.js +142 -0
  38. package/es/selectResourceModal/scripts/useCompoLf.js +1 -1
  39. package/es/selectResourceModal/style/index.css +45 -4
  40. package/es/selectResourceModal/style/index.less +55 -41
  41. package/es/selectResourceModal/style/list.less +203 -167
  42. package/es/selectThumb/component.js +16 -27
  43. package/es/userAvater/component.js +2 -1
  44. package/es/userDirector/component.js +2 -1
  45. package/es/utils/index.js +6 -6
  46. package/lib/baseFilter/component.js +69 -12
  47. package/lib/config.js +1 -1
  48. package/lib/contentDetailList/component.js +24 -0
  49. package/lib/contentDetailList/components/Content/index.js +2 -1
  50. package/lib/contentDetailList/components/Doc/index.js +6 -0
  51. package/lib/contentDetailList/components/ShowQRCode/QrcodeView/index.js +4 -2
  52. package/lib/contentModal/component.js +16 -8
  53. package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -1
  54. package/lib/contentModal/components/storeBox/index.js +4 -2
  55. package/lib/dataTags/component.js +10 -5
  56. package/lib/docHistory/component.js +41 -11
  57. package/lib/docHistory/scripts/diff.js +4 -3
  58. package/lib/docHistory/style/index.css +4 -0
  59. package/lib/docHistory/style/index.less +37 -32
  60. package/lib/docPreview/component.js +10 -5
  61. package/lib/editMetaInfo/components/metaInfoForm.js +4 -2
  62. package/lib/hooks/useAttachement.js +2 -9
  63. package/lib/hooks/usePopper.js +3 -3
  64. package/lib/hooks/useUpload.js +43 -3
  65. package/lib/imageCrop/component.js +4 -2
  66. package/lib/importData/component.js +6 -3
  67. package/lib/index.css +49 -4
  68. package/lib/mediaFilter/components/DocFilter.js +2 -1
  69. package/lib/resourceGridList/component.js +4 -2
  70. package/lib/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +2 -1
  71. package/lib/resourceModal/components/MediaSelection/MainContent/index.js +4 -2
  72. package/lib/selectResourceModal/component.js +10 -5
  73. package/lib/selectResourceModal/components/List/ListLocal/Upload.js +2 -1
  74. package/lib/selectResourceModal/components/List/ListLocal/index.js +7 -2
  75. package/lib/selectResourceModal/components/List/ListNormal/Filter.js +205 -89
  76. package/lib/selectResourceModal/components/List/ListNormal/index.js +22 -6
  77. package/lib/selectResourceModal/components/List/ListSystem/Filter.js +2 -1
  78. package/lib/selectResourceModal/hooks/useResponsiveFilter.js +144 -0
  79. package/lib/selectResourceModal/scripts/useCompoLf.js +1 -1
  80. package/lib/selectResourceModal/style/index.css +45 -4
  81. package/lib/selectResourceModal/style/index.less +55 -41
  82. package/lib/selectResourceModal/style/list.less +203 -167
  83. package/lib/selectThumb/component.js +16 -27
  84. package/lib/userAvater/component.js +2 -1
  85. package/lib/userDirector/component.js +2 -1
  86. package/lib/utils/index.js +6 -6
  87. package/package.json +138 -138
  88. package/es/appCenter/component.d.ts +0 -0
  89. package/es/appCenter/index.d.ts +0 -2
  90. package/es/appCenter/script/api.d.ts +0 -11
  91. package/es/appCenter/script/apps.d.ts +0 -14
  92. package/es/appCenter/script/permissionMap.d.ts +0 -6
  93. package/es/appCenter/script/routeMap.d.ts +0 -4
  94. package/es/appCenter/style/index.d.ts +0 -1
  95. package/es/baseFilter/component.d.ts +0 -0
  96. package/es/baseFilter/components/FilterGroup.d.ts +0 -0
  97. package/es/baseFilter/components/filterItem.d.ts +0 -0
  98. package/es/baseFilter/index.d.ts +0 -2
  99. package/es/baseFilter/style/index.d.ts +0 -1
  100. package/es/baseFilter/useCalcWidth.d.ts +0 -16
  101. package/es/colorPalette/component.d.ts +0 -0
  102. package/es/colorPalette/components/colorPicker.d.ts +0 -0
  103. package/es/colorPalette/index.d.ts +0 -2
  104. package/es/colorPalette/style/index.d.ts +0 -1
  105. package/es/components.d.ts +0 -5
  106. package/es/config.d.ts +0 -4
  107. package/es/contentDetailList/__demo__/matrix/platform.d.ts +0 -36
  108. package/es/contentDetailList/component.d.ts +0 -0
  109. package/es/contentDetailList/components/Content/CompoItem/index.d.ts +0 -0
  110. package/es/contentDetailList/components/Content/ContentListItem/index.d.ts +0 -0
  111. package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.d.ts +0 -0
  112. package/es/contentDetailList/components/Content/DocItem/index.d.ts +0 -0
  113. package/es/contentDetailList/components/Content/DocMpItem/index.d.ts +0 -0
  114. package/es/contentDetailList/components/Content/GroupPieceItem/index.d.ts +0 -0
  115. package/es/contentDetailList/components/Content/KongoNavItem/index.d.ts +0 -0
  116. package/es/contentDetailList/components/Content/LiveItem/index.d.ts +0 -0
  117. package/es/contentDetailList/components/Content/MaccountItem/index.d.ts +0 -0
  118. package/es/contentDetailList/components/Content/courseItem/index.d.ts +0 -0
  119. package/es/contentDetailList/components/Content/funhdItem/index.d.ts +0 -0
  120. package/es/contentDetailList/components/Content/index.d.ts +0 -0
  121. package/es/contentDetailList/components/CustomWrp/CustomItem.d.ts +0 -0
  122. package/es/contentDetailList/components/CustomWrp/index.d.ts +0 -0
  123. package/es/contentDetailList/components/Doc/index.d.ts +0 -0
  124. package/es/contentDetailList/components/Records/MatrixItem/index.d.ts +0 -0
  125. package/es/contentDetailList/components/Records/index.d.ts +0 -0
  126. package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.d.ts +0 -0
  127. package/es/contentDetailList/components/ShowQRCode/index.d.ts +0 -0
  128. package/es/contentDetailList/index.d.ts +0 -2
  129. package/es/contentDetailList/script/api.d.ts +0 -6
  130. package/es/contentDetailList/style/index.d.ts +0 -1
  131. package/es/contentModal/component.d.ts +0 -0
  132. package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
  133. package/es/contentModal/components/CompoList/index.d.ts +0 -0
  134. package/es/contentModal/components/ContentList/MediaFilter/index.d.ts +0 -0
  135. package/es/contentModal/components/ContentList/index.d.ts +0 -0
  136. package/es/contentModal/components/Dejin/MediaFilter/index.d.ts +0 -0
  137. package/es/contentModal/components/Dejin/index.d.ts +0 -0
  138. package/es/contentModal/components/EqxiuList/MediaFilter/index.d.ts +0 -0
  139. package/es/contentModal/components/EqxiuList/index.d.ts +0 -0
  140. package/es/contentModal/components/LiveList/MediaFilter/index.d.ts +0 -0
  141. package/es/contentModal/components/LiveList/index.d.ts +0 -0
  142. package/es/contentModal/components/MpAccountList/MpAccountFilter/index.d.ts +0 -0
  143. package/es/contentModal/components/MpAccountList/index.d.ts +0 -0
  144. package/es/contentModal/components/MpContentList/MediaFilter/index.d.ts +0 -0
  145. package/es/contentModal/components/MpContentList/index.d.ts +0 -0
  146. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
  147. package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
  148. package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
  149. package/es/contentModal/components/storeBox/index.d.ts +0 -0
  150. package/es/contentModal/index.d.ts +0 -2
  151. package/es/contentModal/script/api.d.ts +0 -18
  152. package/es/contentModal/style/index.d.ts +0 -1
  153. package/es/dataTags/component.d.ts +0 -0
  154. package/es/dataTags/index.d.ts +0 -2
  155. package/es/dataTags/style/index.d.ts +0 -1
  156. package/es/docHistory/component.d.ts +0 -0
  157. package/es/docHistory/components/DocDiffPanel/index.d.ts +0 -0
  158. package/es/docHistory/components/DocHistoryList/index.d.ts +0 -0
  159. package/es/docHistory/index.d.ts +0 -2
  160. package/es/docHistory/scripts/diff.d.ts +0 -1
  161. package/es/docHistory/scripts/useDocHistory.d.ts +0 -10
  162. package/es/docHistory/style/index.d.ts +0 -1
  163. package/es/docPreview/component.d.ts +0 -0
  164. package/es/docPreview/components/PreviewIframe.d.ts +0 -0
  165. package/es/docPreview/index.d.ts +0 -2
  166. package/es/docPreview/scripts/api.d.ts +0 -1
  167. package/es/docPreview/scripts/hook.d.ts +0 -33
  168. package/es/docPreview/style/index.d.ts +0 -1
  169. package/es/editMetaInfo/component.d.ts +0 -0
  170. package/es/editMetaInfo/components/metaInfoForm.d.ts +0 -0
  171. package/es/editMetaInfo/index.d.ts +0 -2
  172. package/es/editMetaInfo/script/api.d.ts +0 -6
  173. package/es/editMetaInfo/script/restaurants.d.ts +0 -4
  174. package/es/editMetaInfo/style/index.d.ts +0 -1
  175. package/es/emptyData/component.d.ts +0 -0
  176. package/es/emptyData/index.d.ts +0 -2
  177. package/es/emptyData/style/index.d.ts +0 -1
  178. package/es/emptyData/svg/add.d.ts +0 -0
  179. package/es/hooks/assets.d.ts +0 -1
  180. package/es/hooks/batch.d.ts +0 -8
  181. package/es/hooks/dialogVisible.d.ts +0 -8
  182. package/es/hooks/source.d.ts +0 -9
  183. package/es/hooks/toggle.d.ts +0 -6
  184. package/es/hooks/useAttachement.d.ts +0 -53
  185. package/es/hooks/useLocalStorage.d.ts +0 -10
  186. package/es/hooks/useMediaContext.d.ts +0 -12
  187. package/es/hooks/usePopper.d.ts +0 -8
  188. package/es/hooks/useSelection.d.ts +0 -30
  189. package/es/hooks/useUpload.d.ts +0 -30
  190. package/es/hooks/user.d.ts +0 -9
  191. package/es/imageCrop/component.d.ts +0 -0
  192. package/es/imageCrop/index.d.ts +0 -2
  193. package/es/imageCrop/script/api.d.ts +0 -1
  194. package/es/imageCrop/style/index.d.ts +0 -1
  195. package/es/importData/component.d.ts +0 -0
  196. package/es/importData/index.d.ts +0 -2
  197. package/es/importData/style/index.d.ts +0 -1
  198. package/es/index.d.ts +0 -30
  199. package/es/mediaFilter/component.d.ts +0 -0
  200. package/es/mediaFilter/components/DocFilter.d.ts +0 -0
  201. package/es/mediaFilter/components/FilterGroup.d.ts +0 -0
  202. package/es/mediaFilter/components/FilterItem.d.ts +0 -0
  203. package/es/mediaFilter/components/MpAccountFilter.d.ts +0 -0
  204. package/es/mediaFilter/components/MpContentFilter.d.ts +0 -0
  205. package/es/mediaFilter/index.d.ts +0 -3
  206. package/es/mediaFilter/script/optionsGetter.d.ts +0 -26
  207. package/es/mediaFilter/script/types.d.ts +0 -16
  208. package/es/mediaFilter/style/index.d.ts +0 -1
  209. package/es/mediaView/component.d.ts +0 -0
  210. package/es/mediaView/index.d.ts +0 -2
  211. package/es/mediaView/style/index.d.ts +0 -1
  212. package/es/messageBox/component.d.ts +0 -0
  213. package/es/messageBox/index.d.ts +0 -2
  214. package/es/messageBox/list.d.ts +0 -0
  215. package/es/messageBox/script/api.d.ts +0 -6
  216. package/es/messageBox/style/index.d.ts +0 -1
  217. package/es/previousVersion/component.d.ts +0 -0
  218. package/es/previousVersion/index.d.ts +0 -2
  219. package/es/previousVersion/script/api.d.ts +0 -15
  220. package/es/previousVersion/script/tool.d.ts +0 -6
  221. package/es/previousVersion/style/index.d.ts +0 -1
  222. package/es/resourceGridList/component.d.ts +0 -0
  223. package/es/resourceGridList/components/FileTypeThumb/index.d.ts +0 -0
  224. package/es/resourceGridList/index.d.ts +0 -2
  225. package/es/resourceGridList/style/index.d.ts +0 -1
  226. package/es/resourceModal/component.d.ts +0 -0
  227. package/es/resourceModal/components/MediaPreviewer/index.d.ts +0 -0
  228. package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.d.ts +0 -0
  229. package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.d.ts +0 -0
  230. package/es/resourceModal/components/MediaSelection/MainContent/index.d.ts +0 -0
  231. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceFilter.d.ts +0 -0
  232. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.d.ts +0 -0
  233. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/index.d.ts +0 -0
  234. package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.d.ts +0 -0
  235. package/es/resourceModal/components/MediaSelection/index.d.ts +0 -0
  236. package/es/resourceModal/index.d.ts +0 -2
  237. package/es/resourceModal/script/api.d.ts +0 -25
  238. package/es/resourceModal/script/mediaSelection.d.ts +0 -14
  239. package/es/resourceModal/style/index.d.ts +0 -1
  240. package/es/selectAvatarList/component.d.ts +0 -0
  241. package/es/selectAvatarList/index.d.ts +0 -2
  242. package/es/selectAvatarList/style/index.d.ts +0 -1
  243. package/es/selectGategory/component.d.ts +0 -0
  244. package/es/selectGategory/components/ColumnSelection/index.d.ts +0 -0
  245. package/es/selectGategory/index.d.ts +0 -2
  246. package/es/selectGategory/script/api.d.ts +0 -6
  247. package/es/selectGategory/style/index.d.ts +0 -1
  248. package/es/selectResourceModal/component.d.ts +0 -0
  249. package/es/selectResourceModal/components/List/ListAi/index.d.ts +0 -0
  250. package/es/selectResourceModal/components/List/ListCardWrapper.d.ts +0 -0
  251. package/es/selectResourceModal/components/List/ListLocal/Upload.d.ts +0 -0
  252. package/es/selectResourceModal/components/List/ListLocal/index.d.ts +0 -0
  253. package/es/selectResourceModal/components/List/ListNormal/Filter.d.ts +0 -0
  254. package/es/selectResourceModal/components/List/ListNormal/index.d.ts +0 -0
  255. package/es/selectResourceModal/components/List/ListSystem/Filter.d.ts +0 -0
  256. package/es/selectResourceModal/components/List/ListSystem/SubList.d.ts +0 -0
  257. package/es/selectResourceModal/components/List/ListSystem/index.d.ts +0 -0
  258. package/es/selectResourceModal/components/List/ListVideo/index.d.ts +0 -0
  259. package/es/selectResourceModal/components/List/ListWraper.d.ts +0 -0
  260. package/es/selectResourceModal/components/ListSelected/index.d.ts +0 -0
  261. package/es/selectResourceModal/components/ListTabs/index.d.ts +0 -0
  262. package/es/selectResourceModal/index.d.ts +0 -2
  263. package/es/selectResourceModal/scripts/selectionApis.d.ts +0 -2
  264. package/es/selectResourceModal/scripts/useCompoLf.d.ts +0 -27
  265. package/es/selectResourceModal/scripts/useResourceSelect.d.ts +0 -7
  266. package/es/selectResourceModal/scripts/useTabFilter.d.ts +0 -22
  267. package/es/selectResourceModal/style/index.d.ts +0 -1
  268. package/es/selectThumb/component.d.ts +0 -0
  269. package/es/selectThumb/components/card.d.ts +0 -0
  270. package/es/selectThumb/components/colorPalette.d.ts +0 -0
  271. package/es/selectThumb/components/colorPicker.d.ts +0 -0
  272. package/es/selectThumb/index.d.ts +0 -2
  273. package/es/selectThumb/style/index.d.ts +0 -1
  274. package/es/thumbCard/component.d.ts +0 -0
  275. package/es/thumbCard/components/ThumbUploading/index.d.ts +0 -0
  276. package/es/thumbCard/index.d.ts +0 -2
  277. package/es/thumbCard/style/index.d.ts +0 -1
  278. package/es/typeIcons/component.d.ts +0 -0
  279. package/es/typeIcons/index.d.ts +0 -2
  280. package/es/typeIcons/style/index.d.ts +0 -1
  281. package/es/uploadBefore/component.d.ts +0 -0
  282. package/es/uploadBefore/components/UploadBefore.d.ts +0 -0
  283. package/es/uploadBefore/components/UploadForClick.d.ts +0 -0
  284. package/es/uploadBefore/index.d.ts +0 -2
  285. package/es/uploadBefore/script/api.d.ts +0 -16
  286. package/es/uploadBefore/script/fileTypeAdapter.d.ts +0 -39
  287. package/es/uploadBefore/script/fileUpload.d.ts +0 -7
  288. package/es/uploadBefore/script/uploadHooks.d.ts +0 -96
  289. package/es/uploadBefore/style/index.d.ts +0 -1
  290. package/es/uploadBefore/utils/dragUploadEvent.d.ts +0 -0
  291. package/es/uploadStep/component.d.ts +0 -0
  292. package/es/uploadStep/index.d.ts +0 -2
  293. package/es/uploadStep/script/fileTypeAdapter.d.ts +0 -20
  294. package/es/uploadStep/style/index.d.ts +0 -1
  295. package/es/userAvater/component.d.ts +0 -0
  296. package/es/userAvater/index.d.ts +0 -2
  297. package/es/userAvater/script/api.d.ts +0 -8
  298. package/es/userAvater/style/index.d.ts +0 -1
  299. package/es/userDirector/component.d.ts +0 -0
  300. package/es/userDirector/components/userTree.d.ts +0 -0
  301. package/es/userDirector/index.d.ts +0 -2
  302. package/es/userDirector/script/api.d.ts +0 -10
  303. package/es/userDirector/style/index.d.ts +0 -1
  304. package/es/utils/auth.d.ts +0 -5
  305. package/es/utils/date.d.ts +0 -3
  306. package/es/utils/doc.d.ts +0 -76
  307. package/es/utils/filter.d.ts +0 -21
  308. package/es/utils/index.d.ts +0 -17
  309. package/es/utils/request.d.ts +0 -9
  310. package/es/utils/resource.d.ts +0 -4
  311. package/es/utils/transcodeMedia.d.ts +0 -13
  312. package/es/utils/tusUpload.d.ts +0 -16
  313. package/es/utils/typeMap.d.ts +0 -185
  314. package/es/utils/uploadCatalog.d.ts +0 -1
  315. package/es/videoThumb/component.d.ts +0 -0
  316. package/es/videoThumb/index.d.ts +0 -2
  317. package/es/videoThumb/scripts/api.d.ts +0 -9
  318. package/es/videoThumb/scripts/useVideoThumbs.d.ts +0 -12
  319. package/es/videoThumb/style/index.d.ts +0 -1
@@ -1,43 +1,71 @@
1
- import { defineComponent, inject, computed, ref, watch, onMounted, openBlock, createElementBlock, createElementVNode, createCommentVNode, createVNode, unref, withCtx, createTextVNode, toDisplayString, Fragment, renderList, createBlock, normalizeClass } from "vue";
2
- import { Input, Dropdown, Doption, Button, Select, Option, TreeSelect, RangePicker } from "@arco-design/web-vue";
3
- import { IconUpload } from "@arco-design/web-vue/es/icon";
1
+ import { defineComponent, inject, computed, ref, watch, onMounted, openBlock, createElementBlock, createCommentVNode, createElementVNode, withDirectives, createVNode, unref, withModifiers, withCtx, createTextVNode, vShow, toDisplayString, Fragment, renderList, createBlock, normalizeClass } from "vue";
2
+ import { Button, Input, Dropdown, Doption, TreeSelect, Select, Option, RangePicker } from "@arco-design/web-vue";
3
+ import { IconCaretDown, IconRefresh, IconUpload } from "@arco-design/web-vue/es/icon";
4
4
  import useSelection from "../../../../hooks/useSelection.js";
5
5
  import { useDirectory } from "../../../../hooks/useAttachement.js";
6
6
  import { RESOURCE_SOURCE_OPTIONS, RESOURCE_CATALOG_OPTIONS } from "../../../../utils/typeMap.js";
7
7
  import { getAccountList } from "../../../scripts/selectionApis.js";
8
8
  import { keywordsSelection } from "../../../../utils/resource.js";
9
+ import { useResponsiveFilter } from "../../../hooks/useResponsiveFilter.js";
9
10
  const _hoisted_1 = { class: "list-filter-wrapper" };
10
11
  const _hoisted_2 = { class: "list-filter" };
11
- const _hoisted_3 = { class: "filter-list" };
12
- const _hoisted_4 = { style: { "width": "200px" } };
12
+ const _hoisted_3 = { class: "more-btn" };
13
+ const _hoisted_4 = { class: "right-prefix" };
13
14
  const _hoisted_5 = {
14
15
  class: "filter-item",
15
16
  style: { "width": "200px" }
16
17
  };
17
- const _hoisted_6 = { class: "filter-item" };
18
+ const _hoisted_6 = {
19
+ class: "filter-item",
20
+ style: { "width": "180px" }
21
+ };
18
22
  const _hoisted_7 = {
23
+ class: "filter-item",
24
+ style: { "width": "170px" }
25
+ };
26
+ const _hoisted_8 = {
27
+ class: "filter-item",
28
+ style: { "width": "240px" }
29
+ };
30
+ const _hoisted_9 = {
31
+ class: "filter-item",
32
+ style: { "width": "240px" }
33
+ };
34
+ const _hoisted_10 = {
19
35
  key: 0,
20
36
  class: "filter-item"
21
37
  };
22
- const _hoisted_8 = { class: "filter-extra" };
23
- const _hoisted_9 = {
38
+ const _hoisted_11 = { class: "filter-extra" };
39
+ const _hoisted_12 = { class: "filter-item" };
40
+ const _hoisted_13 = {
24
41
  key: 0,
25
42
  class: "list-filter-tags"
26
43
  };
27
- const _hoisted_10 = ["onClick"];
44
+ const _hoisted_14 = ["onClick"];
28
45
  const _sfc_main = defineComponent({
29
46
  __name: "Filter",
30
47
  props: {
48
+ smallScreen: { type: Boolean },
31
49
  disableUploadBy: { type: Boolean }
32
50
  },
33
51
  emits: ["upload", "change"],
34
52
  setup(__props, { expose: __expose, emit: __emit }) {
53
+ var _a, _b, _c;
35
54
  const props = __props;
36
55
  const emits = __emit;
37
56
  const userInfo = inject("userInfo");
38
57
  const baseAPI = inject("baseAPI");
39
58
  const filterOptions = inject("filterOptions");
40
59
  const domainId = computed(() => userInfo == null ? void 0 : userInfo.value.domain_id);
60
+ const filterItemsRef = ref();
61
+ const {
62
+ moreBtnRef,
63
+ popperPanelRef,
64
+ hiddenElementList,
65
+ visible,
66
+ show,
67
+ hide
68
+ } = useResponsiveFilter(filterItemsRef);
41
69
  const { options, loading, load, loadMore, handleSearch } = useSelection({
42
70
  labelStr: "alias",
43
71
  valueStr: "id",
@@ -57,7 +85,7 @@ const _sfc_main = defineComponent({
57
85
  });
58
86
  const resourceSource = RESOURCE_SOURCE_OPTIONS;
59
87
  const resourceCatalog = RESOURCE_CATALOG_OPTIONS;
60
- const { tree, loadMore: loadDirMore } = useDirectory({
88
+ const { tree } = useDirectory({
61
89
  BASE_API: baseAPI
62
90
  });
63
91
  const originFilter = {
@@ -71,7 +99,17 @@ const _sfc_main = defineComponent({
71
99
  sf: "",
72
100
  directory_id: void 0
73
101
  };
74
- const filter = ref(JSON.parse(JSON.stringify(originFilter)));
102
+ if ((_a = filterOptions == null ? void 0 : filterOptions.value) == null ? void 0 : _a.mediaTypeStrict) {
103
+ originFilter.catalog = filterOptions.value.mediaType.split(",");
104
+ }
105
+ const filter = ref(
106
+ JSON.parse(
107
+ JSON.stringify({
108
+ ...originFilter,
109
+ catalog: ((_c = (_b = filterOptions == null ? void 0 : filterOptions.value) == null ? void 0 : _b.mediaType) == null ? void 0 : _c.split(",")) || []
110
+ })
111
+ )
112
+ );
75
113
  const handleReset = () => {
76
114
  filter.value = JSON.parse(JSON.stringify(originFilter));
77
115
  };
@@ -116,85 +154,119 @@ const _sfc_main = defineComponent({
116
154
  filter.value.keyword = val;
117
155
  filter.value.precise_keyword = "";
118
156
  }
157
+ filter.value.sf = "";
119
158
  }
120
159
  });
121
- watch(
122
- () => searchType.value,
123
- () => {
124
- searchInput.value = filter.value.keyword || filter.value.precise_keyword;
125
- }
126
- );
127
160
  const isEmpty = computed(() => {
128
- return Object.keys(filter.value).every((key) => {
161
+ return Object.keys(originFilter).every((key) => {
162
+ if (key === "catalog") {
163
+ const currentCatalog = filter.value[key] || [];
164
+ const originCatalog = originFilter[key] || [];
165
+ return currentCatalog.length === originCatalog.length && currentCatalog.every((v) => originCatalog.includes(v));
166
+ }
129
167
  return filter.value[key] === originFilter[key];
130
168
  });
131
169
  });
132
170
  watch(
133
171
  () => filter.value,
134
- () => {
135
- const result = { ...filter.value };
172
+ (val) => {
173
+ const result = { ...val };
136
174
  Object.keys(result).forEach((key) => {
137
175
  if (props.disableUploadBy && key === "upload_by")
138
176
  delete result[key];
139
- if (!result[key])
140
- delete result[key];
177
+ if (result[key] === "" || result[key] === null || result[key] === void 0) {
178
+ if (key !== "catalog") {
179
+ delete result[key];
180
+ }
181
+ }
141
182
  });
142
- if (!result.catalog)
143
- result.catalog = "image,video,audio";
144
- else
145
- result.catalog = result.catalog.join(",");
146
- emits("change", result);
147
- },
148
- { deep: true, immediate: true }
149
- );
150
- watch(
151
- () => filterOptions == null ? void 0 : filterOptions.value,
152
- () => {
153
- var _a;
154
- if ((_a = filterOptions == null ? void 0 : filterOptions.value) == null ? void 0 : _a.mediaType) {
155
- filter.value.catalog = filterOptions == null ? void 0 : filterOptions.value.mediaType.split(",");
156
- if (filterOptions == null ? void 0 : filterOptions.value.mediaTypeStrict) {
157
- originFilter.catalog = filterOptions == null ? void 0 : filterOptions.value.mediaType.split(",");
183
+ if (result.catalog && Array.isArray(result.catalog)) {
184
+ if (result.catalog.length > 0) {
185
+ result.catalog = result.catalog.join(",");
186
+ } else {
187
+ delete result.catalog;
158
188
  }
159
189
  }
190
+ emits("change", result);
160
191
  },
161
- { immediate: true, deep: true }
192
+ { deep: true, immediate: true }
162
193
  );
163
194
  onMounted(() => {
164
195
  load();
165
196
  });
166
197
  __expose({
167
- resetFilter: handleReset
198
+ filter,
199
+ handleReset
168
200
  });
169
201
  return (_ctx, _cache) => {
170
- var _a;
202
+ var _a2;
171
203
  return openBlock(), createElementBlock("div", _hoisted_1, [
204
+ createCommentVNode(" Use filterItemsRef's parentElement as the container for boundary checks "),
172
205
  createElementVNode("div", _hoisted_2, [
173
- createElementVNode("div", _hoisted_3, [
206
+ createCommentVNode(" Filter Items Container "),
207
+ createElementVNode("div", {
208
+ id: "resource-filter-pannel",
209
+ ref_key: "filterItemsRef",
210
+ ref: filterItemsRef,
211
+ class: "filter-list"
212
+ }, [
213
+ createCommentVNode(" More Filters Button and Popper Panel "),
214
+ createElementVNode("div", _hoisted_3, [
215
+ createElementVNode("div", {
216
+ ref_key: "moreBtnRef",
217
+ ref: moreBtnRef
218
+ }, [
219
+ withDirectives(createVNode(unref(Button), {
220
+ style: { marginRight: "10px" },
221
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => unref(visible) ? unref(hide)() : unref(show)(), ["stop"]))
222
+ }, {
223
+ default: withCtx(() => [
224
+ createElementVNode("span", _hoisted_4, [
225
+ _cache[11] || (_cache[11] = createTextVNode(" \u66F4\u591A ")),
226
+ createVNode(unref(IconCaretDown))
227
+ ])
228
+ ]),
229
+ _: 1
230
+ }, 512), [
231
+ [vShow, unref(hiddenElementList).length]
232
+ ])
233
+ ], 512),
234
+ withDirectives(createElementVNode("div", {
235
+ ref_key: "popperPanelRef",
236
+ ref: popperPanelRef,
237
+ class: "filter-pannel",
238
+ onClick: _cache[1] || (_cache[1] = withModifiers(() => {
239
+ }, ["stop"]))
240
+ }, null, 512), [
241
+ [vShow, unref(visible)]
242
+ ])
243
+ ]),
174
244
  createCommentVNode(" \u5173\u952E\u8BCD "),
175
- createElementVNode("div", _hoisted_4, [
245
+ createElementVNode("div", _hoisted_5, [
176
246
  createVNode(unref(Input), {
177
247
  modelValue: searchInput.value,
178
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchInput.value = $event),
248
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => searchInput.value = $event),
179
249
  "allow-clear": "",
180
250
  placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD"
181
251
  }, {
182
252
  prepend: withCtx(() => [
183
253
  createVNode(unref(Dropdown), {
184
- onSelect: _cache[0] || (_cache[0] = (e) => searchType.value = e)
254
+ onSelect: _cache[2] || (_cache[2] = (e) => searchType.value = e)
185
255
  }, {
186
256
  content: withCtx(() => [
187
257
  createVNode(unref(Doption), { value: 0 }, {
188
- default: withCtx(() => _cache[8] || (_cache[8] = [
258
+ default: withCtx(() => _cache[12] || (_cache[12] = [
189
259
  createTextVNode("\u7CBE\u51C6\u641C")
190
260
  ])),
191
- _: 1
261
+ _: 1,
262
+ __: [12]
192
263
  }),
193
264
  createVNode(unref(Doption), { value: 1 }, {
194
- default: withCtx(() => _cache[9] || (_cache[9] = [
265
+ default: withCtx(() => _cache[13] || (_cache[13] = [
195
266
  createTextVNode("\u6A21\u7CCA\u641C")
196
267
  ])),
197
- _: 1
268
+ _: 1,
269
+ __: [13]
198
270
  })
199
271
  ]),
200
272
  default: withCtx(() => [
@@ -211,15 +283,39 @@ const _sfc_main = defineComponent({
211
283
  _: 1
212
284
  }, 8, ["modelValue"])
213
285
  ]),
286
+ createCommentVNode(" \u76EE\u5F55 "),
287
+ createElementVNode("div", _hoisted_6, [
288
+ createVNode(unref(TreeSelect), {
289
+ modelValue: filter.value.directory_id,
290
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter.value.directory_id = $event),
291
+ data: unref(tree),
292
+ "popup-container": "#resource-filter-pannel",
293
+ placeholder: "\u8BF7\u9009\u62E9\u76EE\u5F55",
294
+ "field-names": {
295
+ title: "alias",
296
+ key: "id"
297
+ },
298
+ "allow-clear": "",
299
+ "allow-search": "",
300
+ "filter-tree-node": (searchValue, nodeData) => {
301
+ console.log(nodeData);
302
+ if (!nodeData.alias)
303
+ return false;
304
+ return nodeData.alias.toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
305
+ }
306
+ }, null, 8, ["modelValue", "data", "filter-tree-node"])
307
+ ]),
214
308
  createCommentVNode(" \u7D20\u6750\u7C7B\u578B "),
215
- createElementVNode("div", _hoisted_5, [
309
+ createElementVNode("div", _hoisted_7, [
216
310
  createVNode(unref(Select), {
217
311
  modelValue: filter.value.catalog,
218
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.catalog = $event),
219
- disabled: (_a = unref(filterOptions)) == null ? void 0 : _a.mediaTypeStrict,
312
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.catalog = $event),
313
+ disabled: (_a2 = unref(filterOptions)) == null ? void 0 : _a2.mediaTypeStrict,
314
+ "popup-container": "#resource-filter-pannel",
220
315
  "allow-clear": "",
221
316
  placeholder: "\u7C7B\u578B",
222
- multiple: ""
317
+ multiple: "",
318
+ "max-tag-count": 1
223
319
  }, {
224
320
  default: withCtx(() => [
225
321
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(resourceCatalog), (item) => {
@@ -233,30 +329,23 @@ const _sfc_main = defineComponent({
233
329
  _: 1
234
330
  }, 8, ["modelValue", "disabled"])
235
331
  ]),
236
- createCommentVNode(" \u76EE\u5F55 "),
237
- createVNode(unref(TreeSelect), {
238
- modelValue: filter.value.directory_id,
239
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => filter.value.directory_id = $event),
240
- data: unref(tree),
241
- "load-more": unref(loadDirMore),
242
- placeholder: "\u8BF7\u9009\u62E9\u76EE\u5F55",
243
- style: { "width": "180px" },
244
- "allow-clear": ""
245
- }, null, 8, ["modelValue", "data", "load-more"]),
246
332
  createCommentVNode(" \u65F6\u95F4\u8303\u56F4 "),
247
- createVNode(unref(RangePicker), {
248
- modelValue: rangeTime.value,
249
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => rangeTime.value = $event),
250
- "allow-clear": "",
251
- style: { "width": "240px" }
252
- }, null, 8, ["modelValue"]),
333
+ createElementVNode("div", _hoisted_8, [
334
+ createVNode(unref(RangePicker), {
335
+ modelValue: rangeTime.value,
336
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => rangeTime.value = $event),
337
+ "allow-clear": "",
338
+ "popup-container": "#resource-filter-pannel"
339
+ }, null, 8, ["modelValue"])
340
+ ]),
253
341
  createCommentVNode(" \u7D20\u6750\u4E0A\u4F20\u6765\u6E90 "),
254
- createElementVNode("div", _hoisted_6, [
342
+ createElementVNode("div", _hoisted_9, [
255
343
  createVNode(unref(Select), {
256
344
  modelValue: filter.value.source,
257
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.source = $event),
345
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => filter.value.source = $event),
258
346
  "allow-clear": "",
259
- placeholder: "\u6765\u6E90"
347
+ placeholder: "\u6765\u6E90",
348
+ "popup-container": "#resource-filter-pannel"
260
349
  }, {
261
350
  default: withCtx(() => [
262
351
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(resourceSource), (item) => {
@@ -271,14 +360,15 @@ const _sfc_main = defineComponent({
271
360
  }, 8, ["modelValue"])
272
361
  ]),
273
362
  createCommentVNode(" \u7D20\u6750\u4E0A\u4F20\u4EBA "),
274
- !_ctx.disableUploadBy ? (openBlock(), createElementBlock("div", _hoisted_7, [
363
+ !_ctx.disableUploadBy ? (openBlock(), createElementBlock("div", _hoisted_10, [
275
364
  createVNode(unref(Select), {
276
365
  modelValue: filter.value.upload_by,
277
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => filter.value.upload_by = $event),
366
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => filter.value.upload_by = $event),
278
367
  "allow-clear": "",
279
368
  placeholder: "\u4E0A\u4F20\u4EBA",
280
369
  loading: unref(loading),
281
370
  "allow-search": "",
371
+ "popup-container": "#resource-filter-pannel",
282
372
  onSearch: unref(handleSearch),
283
373
  onDropdownReachBottom: unref(loadMore)
284
374
  }, {
@@ -293,40 +383,66 @@ const _sfc_main = defineComponent({
293
383
  ]),
294
384
  _: 1
295
385
  }, 8, ["modelValue", "loading", "onSearch", "onDropdownReachBottom"])
296
- ])) : createCommentVNode("v-if", true),
297
- !isEmpty.value ? (openBlock(), createBlock(unref(Button), {
298
- key: 1,
299
- type: "text",
300
- onClick: handleReset
386
+ ])) : createCommentVNode("v-if", true)
387
+ ], 512),
388
+ createElementVNode("div", _hoisted_11, [
389
+ createCommentVNode(" \u91CD\u7F6E\u6309\u94AE - Wrap in filter-item to be managed by the hook "),
390
+ withDirectives(createElementVNode("div", _hoisted_12, [
391
+ _ctx.smallScreen ? (openBlock(), createBlock(unref(Button), {
392
+ key: 0,
393
+ type: "text",
394
+ onClick: handleReset
395
+ }, {
396
+ icon: withCtx(() => [
397
+ createVNode(unref(IconRefresh))
398
+ ]),
399
+ _: 1
400
+ })) : (openBlock(), createBlock(unref(Button), {
401
+ key: 1,
402
+ type: "text",
403
+ onClick: handleReset
404
+ }, {
405
+ default: withCtx(() => _cache[14] || (_cache[14] = [
406
+ createTextVNode(" \u91CD\u7F6E ")
407
+ ])),
408
+ _: 1,
409
+ __: [14]
410
+ }))
411
+ ], 512), [
412
+ [vShow, !isEmpty.value]
413
+ ]),
414
+ _ctx.smallScreen ? (openBlock(), createBlock(unref(Button), {
415
+ key: 0,
416
+ type: "primary",
417
+ onClick: _cache[9] || (_cache[9] = ($event) => emits("upload"))
301
418
  }, {
302
- default: withCtx(() => _cache[10] || (_cache[10] = [
303
- createTextVNode(" \u91CD\u7F6E ")
304
- ])),
419
+ icon: withCtx(() => [
420
+ createVNode(unref(IconUpload))
421
+ ]),
305
422
  _: 1
306
- })) : createCommentVNode("v-if", true)
307
- ]),
308
- createElementVNode("div", _hoisted_8, [
309
- createVNode(unref(Button), {
423
+ })) : (openBlock(), createBlock(unref(Button), {
424
+ key: 1,
310
425
  type: "primary",
311
- onClick: _cache[7] || (_cache[7] = ($event) => emits("upload"))
426
+ onClick: _cache[10] || (_cache[10] = ($event) => emits("upload"))
312
427
  }, {
313
428
  icon: withCtx(() => [
314
429
  createVNode(unref(IconUpload))
315
430
  ]),
316
431
  default: withCtx(() => [
317
- _cache[11] || (_cache[11] = createTextVNode(" \u4E0A\u4F20 "))
432
+ _cache[15] || (_cache[15] = createTextVNode(" \u4E0A\u4F20 "))
318
433
  ]),
319
- _: 1
320
- })
434
+ _: 1,
435
+ __: [15]
436
+ }))
321
437
  ])
322
438
  ]),
323
- searchInput.value ? (openBlock(), createElementBlock("div", _hoisted_9, [
439
+ searchInput.value ? (openBlock(), createElementBlock("div", _hoisted_13, [
324
440
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(keywordsSelection), (item) => {
325
441
  return openBlock(), createElementBlock("div", {
326
442
  key: item.value,
327
443
  class: normalizeClass(["list-filter-tag", { active: filter.value.sf === item.value }]),
328
444
  onClick: ($event) => filter.value.sf = item.value
329
- }, toDisplayString(item.name), 11, _hoisted_10);
445
+ }, toDisplayString(item.name), 11, _hoisted_14);
330
446
  }), 128))
331
447
  ])) : createCommentVNode("v-if", true)
332
448
  ]);
@@ -1,9 +1,8 @@
1
- import { defineComponent, inject, watch, onMounted, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, isRef, createElementVNode, createElementBlock, Fragment, renderList } from "vue";
1
+ import { defineComponent, inject, watch, ref, onMounted, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, isRef, createElementVNode, createElementBlock, Fragment, renderList } from "vue";
2
2
  import { Pagination } from "@arco-design/web-vue";
3
3
  import _sfc_main$1 from "../ListWraper.js";
4
4
  import useAttachement from "../../../../hooks/useAttachement.js";
5
5
  import _sfc_main$2 from "./Filter.js";
6
- const _hoisted_1 = { class: "list-item-grid" };
7
6
  const _sfc_main = defineComponent({
8
7
  __name: "index",
9
8
  props: {
@@ -27,6 +26,18 @@ const _sfc_main = defineComponent({
27
26
  changeKey
28
27
  } = useAttachement({ key: props.activeKey, BASE_API });
29
28
  watch(() => props.activeKey, changeKey);
29
+ const listWrapper = ref(null);
30
+ const smallScreen = ref(false);
31
+ watch(
32
+ () => {
33
+ var _a;
34
+ return (_a = listWrapper.value) == null ? void 0 : _a.offsetWidth;
35
+ },
36
+ (val) => {
37
+ smallScreen.value = !!(val && val < 600);
38
+ },
39
+ { immediate: true }
40
+ );
30
41
  onMounted(() => {
31
42
  loadData();
32
43
  });
@@ -40,9 +51,10 @@ const _sfc_main = defineComponent({
40
51
  ]),
41
52
  header: withCtx(() => [
42
53
  createVNode(_sfc_main$2, {
54
+ smallScreen: smallScreen.value,
43
55
  onChange: unref(changeFilter),
44
56
  onUpload: _cache[0] || (_cache[0] = ($event) => emits("change-tab", "local"))
45
- }, null, 8, ["onChange"])
57
+ }, null, 8, ["smallScreen", "onChange"])
46
58
  ]),
47
59
  footer: withCtx(() => [
48
60
  createVNode(unref(Pagination), {
@@ -51,22 +63,26 @@ const _sfc_main = defineComponent({
51
63
  total: unref(total),
52
64
  "page-size": unref(limit),
53
65
  "show-total": "",
54
- "show-page-size": "",
66
+ "show-page-size": !smallScreen.value,
55
67
  "base-size": 3,
56
68
  "buffer-size": 1,
57
69
  onChange: _cache[2] || (_cache[2] = (e) => unref(changePage)((e - 1) * unref(limit))),
58
70
  onPageSizeChange: unref(changeSize)
59
- }, null, 8, ["current", "total", "page-size", "onPageSizeChange"])
71
+ }, null, 8, ["current", "total", "page-size", "show-page-size", "onPageSizeChange"])
60
72
  ]),
61
73
  default: withCtx(() => [
62
- createElementVNode("div", _hoisted_1, [
74
+ createElementVNode("div", {
75
+ ref_key: "listWrapper",
76
+ ref: listWrapper,
77
+ class: "list-item-grid"
78
+ }, [
63
79
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (item) => {
64
80
  return renderSlot(_ctx.$slots, "item", {
65
81
  key: item.id,
66
82
  item
67
83
  });
68
84
  }), 128))
69
- ])
85
+ ], 512)
70
86
  ]),
71
87
  _: 3
72
88
  }, 8, ["loading", "is-empty"]);
@@ -130,7 +130,8 @@ const _sfc_main = defineComponent({
130
130
  default: withCtx(() => _cache[3] || (_cache[3] = [
131
131
  createTextVNode(" \u91CD\u7F6E ")
132
132
  ])),
133
- _: 1
133
+ _: 1,
134
+ __: [3]
134
135
  })) : createCommentVNode("v-if", true)
135
136
  ])
136
137
  ])