@pisell/materials 1.0.206 → 1.0.207

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 (285) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +20 -20
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +20 -20
  11. package/es/components/DragSortList/index.d.ts +1 -1
  12. package/es/components/MultipleContainersSortList/index.d.ts +1 -1
  13. package/es/components/Pagination/index.d.ts +2 -2
  14. package/es/components/Pagination/index.js +14 -9
  15. package/es/components/auto-complete/index.d.ts +5 -1
  16. package/es/components/calendar/index.d.ts +1 -1
  17. package/es/components/checkbox/index.d.ts +1 -1
  18. package/es/components/config-provider/index.d.ts +2 -2
  19. package/es/components/date-picker/index.d.ts +1 -1
  20. package/es/components/div/index.d.ts +1 -1
  21. package/es/components/div/index.js +2 -6
  22. package/es/components/drawer/index.d.ts +0 -1
  23. package/es/components/drawer/index.js +4 -42
  24. package/es/components/dropdown/index.d.ts +2 -2
  25. package/es/components/filter/components/QuickFilter/index.d.ts +2 -2
  26. package/es/components/filter/components/items/index.d.ts +6 -6
  27. package/es/components/filter/components/items/text/Editor/index.d.ts +1 -1
  28. package/es/components/filter/components/items/text/Preview/index.d.ts +1 -1
  29. package/es/components/filter/components/items/text/index.d.ts +2 -2
  30. package/es/components/filter/index.d.ts +2 -2
  31. package/es/components/form/index.d.ts +1 -1
  32. package/es/components/page/index.d.ts +2 -2
  33. package/es/components/page/index.js +1 -14
  34. package/es/components/qrcode/index.d.ts +2 -2
  35. package/es/components/radio/index.d.ts +1 -1
  36. package/es/components/record-view/index.less +0 -2
  37. package/es/components/select/index.d.ts +5 -2
  38. package/es/components/select/index.js +2 -60
  39. package/es/components/skeleton/index.d.ts +1 -1
  40. package/es/components/slider/index.d.ts +2 -2
  41. package/es/components/table/Actions/Sort/index.d.ts +12 -0
  42. package/es/components/table/Actions/Sort/index.js +59 -0
  43. package/es/components/table/Actions/Sort/index.less +0 -0
  44. package/es/components/table/Actions/index.d.ts +2 -2
  45. package/es/components/table/Actions/index.js +1 -1
  46. package/es/components/table/BasicTable/index.d.ts +2 -2
  47. package/es/components/table/Header/index.d.ts +2 -2
  48. package/es/components/table/Summary/index.d.ts +2 -2
  49. package/es/components/table/Table/SelectField/index.d.ts +2 -2
  50. package/es/components/table/Table/fields/date/Config/index.d.ts +1 -1
  51. package/es/components/table/Table/fields/date/Show/index.d.ts +2 -2
  52. package/es/components/table/Table/fields/date/Show/index.js +1 -2
  53. package/es/components/table/Table/fields/date/Sort/index.d.ts +1 -1
  54. package/es/components/table/Table/fields/date/index.d.ts +3 -3
  55. package/es/components/table/Table/fields/image/Config/index.d.ts +1 -1
  56. package/es/components/table/Table/fields/image/Show/index.d.ts +1 -1
  57. package/es/components/table/Table/fields/image/Show/index.js +1 -2
  58. package/es/components/table/Table/fields/image/Sort/index.d.ts +1 -1
  59. package/es/components/table/Table/fields/image/index.d.ts +3 -3
  60. package/es/components/table/Table/fields/index.d.ts +57 -57
  61. package/es/components/table/Table/fields/link/Config/index.d.ts +1 -1
  62. package/es/components/table/Table/fields/link/Show/index.d.ts +1 -1
  63. package/es/components/table/Table/fields/link/Show/index.js +5 -7
  64. package/es/components/table/Table/fields/link/Sort/index.d.ts +1 -1
  65. package/es/components/table/Table/fields/link/index.d.ts +3 -3
  66. package/es/components/table/Table/fields/number/Config/index.d.ts +1 -1
  67. package/es/components/table/Table/fields/number/Show/index.d.ts +1 -1
  68. package/es/components/table/Table/fields/number/Show/index.js +1 -2
  69. package/es/components/table/Table/fields/number/Sort/index.d.ts +1 -1
  70. package/es/components/table/Table/fields/number/index.d.ts +3 -3
  71. package/es/components/table/Table/fields/pSwitch/Config/index.d.ts +1 -1
  72. package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +2 -2
  73. package/es/components/table/Table/fields/pSwitch/Show/index.js +1 -2
  74. package/es/components/table/Table/fields/pSwitch/Sort/index.d.ts +1 -1
  75. package/es/components/table/Table/fields/pSwitch/index.d.ts +3 -3
  76. package/es/components/table/Table/fields/rangePicker/Config/index.d.ts +1 -1
  77. package/es/components/table/Table/fields/rangePicker/Show/index.d.ts +1 -1
  78. package/es/components/table/Table/fields/rangePicker/Sort/index.d.ts +1 -1
  79. package/es/components/table/Table/fields/rangePicker/index.d.ts +3 -3
  80. package/es/components/table/Table/fields/search/Config/index.d.ts +1 -1
  81. package/es/components/table/Table/fields/search/Show/index.d.ts +1 -1
  82. package/es/components/table/Table/fields/search/Show/index.js +1 -2
  83. package/es/components/table/Table/fields/search/Sort/index.d.ts +1 -1
  84. package/es/components/table/Table/fields/search/index.d.ts +3 -3
  85. package/es/components/table/Table/fields/select/Config/index.d.ts +1 -1
  86. package/es/components/table/Table/fields/select/Show/index.d.ts +1 -1
  87. package/es/components/table/Table/fields/select/Sort/index.d.ts +1 -1
  88. package/es/components/table/Table/fields/select/index.d.ts +3 -3
  89. package/es/components/table/Table/fields/text/Config/index.d.ts +1 -1
  90. package/es/components/table/Table/fields/text/Edit/index.js +3 -8
  91. package/es/components/table/Table/fields/text/Show/index.d.ts +1 -1
  92. package/es/components/table/Table/fields/text/Show/index.js +1 -2
  93. package/es/components/table/Table/fields/text/Sort/index.d.ts +1 -1
  94. package/es/components/table/Table/fields/text/index.d.ts +3 -3
  95. package/es/components/table/Table/index.js +4 -5
  96. package/es/components/table/Table/tableConfig/SortRow/index.d.ts +2 -2
  97. package/es/components/table/Table/tableConfig/summary/index.d.ts +2 -2
  98. package/es/components/table/TableFilter/SortIcon.d.ts +2 -2
  99. package/es/components/table/TableFilter/numberFilter.js +4 -5
  100. package/es/components/table/TableFilter/selectFilter.js +2 -3
  101. package/es/components/table/TableFilter/stringFilter.js +3 -4
  102. package/es/components/table/model.d.ts +1 -1
  103. package/es/components/table/model.js +29 -1
  104. package/es/components/tabs/index.d.ts +2 -5
  105. package/es/components/tabs/index.js +8 -51
  106. package/es/components/time-picker/index.d.ts +1 -1
  107. package/es/components/upload/index.d.ts +1 -1
  108. package/es/index.d.ts +1 -5
  109. package/es/index.js +5 -6
  110. package/es/utils/hoc.d.ts +4 -4
  111. package/es/utils/hoc.js +8 -9
  112. package/es/utils/miniRedux.d.ts +1 -1
  113. package/lib/components/DragSortList/index.d.ts +1 -1
  114. package/lib/components/MultipleContainersSortList/index.d.ts +1 -1
  115. package/lib/components/Pagination/index.d.ts +2 -2
  116. package/lib/components/Pagination/index.js +8 -9
  117. package/lib/components/auto-complete/index.d.ts +5 -1
  118. package/lib/components/calendar/index.d.ts +1 -1
  119. package/lib/components/checkbox/index.d.ts +1 -1
  120. package/lib/components/config-provider/index.d.ts +2 -2
  121. package/lib/components/date-picker/index.d.ts +1 -1
  122. package/lib/components/div/index.d.ts +1 -1
  123. package/lib/components/div/index.js +2 -2
  124. package/lib/components/drawer/index.d.ts +0 -1
  125. package/lib/components/drawer/index.js +1 -37
  126. package/lib/components/dropdown/index.d.ts +2 -2
  127. package/lib/components/filter/components/QuickFilter/index.d.ts +2 -2
  128. package/lib/components/filter/components/items/index.d.ts +6 -6
  129. package/lib/components/filter/components/items/text/Editor/index.d.ts +1 -1
  130. package/lib/components/filter/components/items/text/Preview/index.d.ts +1 -1
  131. package/lib/components/filter/components/items/text/index.d.ts +2 -2
  132. package/lib/components/filter/index.d.ts +2 -2
  133. package/lib/components/form/index.d.ts +1 -1
  134. package/lib/components/page/index.d.ts +2 -2
  135. package/lib/components/page/index.js +1 -13
  136. package/lib/components/qrcode/index.d.ts +2 -2
  137. package/lib/components/radio/index.d.ts +1 -1
  138. package/lib/components/record-view/index.less +0 -2
  139. package/lib/components/select/index.d.ts +5 -2
  140. package/lib/components/select/index.js +1 -67
  141. package/lib/components/skeleton/index.d.ts +1 -1
  142. package/lib/components/slider/index.d.ts +2 -2
  143. package/lib/components/table/Actions/Sort/index.d.ts +12 -0
  144. package/lib/components/table/Actions/Sort/index.js +86 -0
  145. package/lib/components/table/Actions/Sort/index.less +0 -0
  146. package/lib/components/table/Actions/index.d.ts +2 -2
  147. package/lib/components/table/Actions/index.js +2 -2
  148. package/lib/components/table/BasicTable/index.d.ts +2 -2
  149. package/lib/components/table/Header/index.d.ts +2 -2
  150. package/lib/components/table/Summary/index.d.ts +2 -2
  151. package/lib/components/table/Table/SelectField/index.d.ts +2 -2
  152. package/lib/components/table/Table/fields/date/Config/index.d.ts +1 -1
  153. package/lib/components/table/Table/fields/date/Show/index.d.ts +2 -2
  154. package/lib/components/table/Table/fields/date/Show/index.js +1 -2
  155. package/lib/components/table/Table/fields/date/Sort/index.d.ts +1 -1
  156. package/lib/components/table/Table/fields/date/index.d.ts +3 -3
  157. package/lib/components/table/Table/fields/image/Config/index.d.ts +1 -1
  158. package/lib/components/table/Table/fields/image/Show/index.d.ts +1 -1
  159. package/lib/components/table/Table/fields/image/Show/index.js +1 -2
  160. package/lib/components/table/Table/fields/image/Sort/index.d.ts +1 -1
  161. package/lib/components/table/Table/fields/image/index.d.ts +3 -3
  162. package/lib/components/table/Table/fields/index.d.ts +57 -57
  163. package/lib/components/table/Table/fields/link/Config/index.d.ts +1 -1
  164. package/lib/components/table/Table/fields/link/Show/index.d.ts +1 -1
  165. package/lib/components/table/Table/fields/link/Show/index.js +5 -7
  166. package/lib/components/table/Table/fields/link/Sort/index.d.ts +1 -1
  167. package/lib/components/table/Table/fields/link/index.d.ts +3 -3
  168. package/lib/components/table/Table/fields/number/Config/index.d.ts +1 -1
  169. package/lib/components/table/Table/fields/number/Show/index.d.ts +1 -1
  170. package/lib/components/table/Table/fields/number/Show/index.js +1 -2
  171. package/lib/components/table/Table/fields/number/Sort/index.d.ts +1 -1
  172. package/lib/components/table/Table/fields/number/index.d.ts +3 -3
  173. package/lib/components/table/Table/fields/pSwitch/Config/index.d.ts +1 -1
  174. package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +2 -2
  175. package/lib/components/table/Table/fields/pSwitch/Show/index.js +1 -2
  176. package/lib/components/table/Table/fields/pSwitch/Sort/index.d.ts +1 -1
  177. package/lib/components/table/Table/fields/pSwitch/index.d.ts +3 -3
  178. package/lib/components/table/Table/fields/rangePicker/Config/index.d.ts +1 -1
  179. package/lib/components/table/Table/fields/rangePicker/Show/index.d.ts +1 -1
  180. package/lib/components/table/Table/fields/rangePicker/Sort/index.d.ts +1 -1
  181. package/lib/components/table/Table/fields/rangePicker/index.d.ts +3 -3
  182. package/lib/components/table/Table/fields/search/Config/index.d.ts +1 -1
  183. package/lib/components/table/Table/fields/search/Show/index.d.ts +1 -1
  184. package/lib/components/table/Table/fields/search/Show/index.js +1 -2
  185. package/lib/components/table/Table/fields/search/Sort/index.d.ts +1 -1
  186. package/lib/components/table/Table/fields/search/index.d.ts +3 -3
  187. package/lib/components/table/Table/fields/select/Config/index.d.ts +1 -1
  188. package/lib/components/table/Table/fields/select/Show/index.d.ts +1 -1
  189. package/lib/components/table/Table/fields/select/Sort/index.d.ts +1 -1
  190. package/lib/components/table/Table/fields/select/index.d.ts +3 -3
  191. package/lib/components/table/Table/fields/text/Config/index.d.ts +1 -1
  192. package/lib/components/table/Table/fields/text/Edit/index.js +1 -2
  193. package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -1
  194. package/lib/components/table/Table/fields/text/Show/index.js +1 -2
  195. package/lib/components/table/Table/fields/text/Sort/index.d.ts +1 -1
  196. package/lib/components/table/Table/fields/text/index.d.ts +3 -3
  197. package/lib/components/table/Table/index.js +2 -3
  198. package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +2 -2
  199. package/lib/components/table/Table/tableConfig/summary/index.d.ts +2 -2
  200. package/lib/components/table/TableFilter/SortIcon.d.ts +2 -2
  201. package/lib/components/table/TableFilter/numberFilter.js +4 -5
  202. package/lib/components/table/TableFilter/selectFilter.js +2 -3
  203. package/lib/components/table/TableFilter/stringFilter.js +3 -4
  204. package/lib/components/table/model.d.ts +1 -1
  205. package/lib/components/table/model.js +34 -1
  206. package/lib/components/tabs/index.d.ts +2 -5
  207. package/lib/components/tabs/index.js +1 -50
  208. package/lib/components/time-picker/index.d.ts +1 -1
  209. package/lib/components/upload/index.d.ts +1 -1
  210. package/lib/index.d.ts +1 -5
  211. package/lib/index.js +2 -14
  212. package/lib/utils/hoc.d.ts +4 -4
  213. package/lib/utils/hoc.js +3 -3
  214. package/lib/utils/miniRedux.d.ts +1 -1
  215. package/package.json +3 -3
  216. package/dist/umd/materials.min.css +0 -1
  217. package/dist/umd/materials.min.js +0 -1
  218. package/dist/umd/static/DotsSix.57d66266.svg +0 -1
  219. package/dist/umd/static/arrow-left.e542294f.svg +0 -1
  220. package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
  221. package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
  222. package/dist/umd/static/help-circle.31c9be40.svg +0 -1
  223. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
  224. package/es/components/classicLayout/index.d.ts +0 -4
  225. package/es/components/classicLayout/index.js +0 -25
  226. package/es/components/classicLayout/index.less +0 -22
  227. package/es/components/component/index.d.ts +0 -11
  228. package/es/components/component/index.js +0 -10
  229. package/es/components/drawer/index.less +0 -34
  230. package/es/components/list/index.d.ts +0 -7
  231. package/es/components/list/index.js +0 -104
  232. package/es/components/list/index.less +0 -38
  233. package/es/components/select/index.less +0 -11
  234. package/es/components/sort/components/InlineMenu/index.d.ts +0 -15
  235. package/es/components/sort/components/InlineMenu/index.js +0 -87
  236. package/es/components/sort/components/InlineMenu/index.less +0 -20
  237. package/es/components/sort/index.d.ts +0 -18
  238. package/es/components/sort/index.js +0 -113
  239. package/es/components/sort/index.less +0 -10
  240. package/es/components/table/Table/fields/utils/index.d.ts +0 -1
  241. package/es/components/table/Table/fields/utils/index.js +0 -29
  242. package/es/components/tabs/index.less +0 -60
  243. package/es/locales/en-US.d.ts +0 -21
  244. package/es/locales/en-US.js +0 -22
  245. package/es/locales/index.d.ts +0 -1
  246. package/es/locales/index.js +0 -21
  247. package/es/locales/zh-CN.d.ts +0 -21
  248. package/es/locales/zh-CN.js +0 -22
  249. package/es/locales/zh-TW.d.ts +0 -21
  250. package/es/locales/zh-TW.js +0 -22
  251. package/es/utils/locale.d.ts +0 -1
  252. package/es/utils/locale.js +0 -5
  253. package/es/utils/platform.d.ts +0 -1
  254. package/es/utils/platform.js +0 -8
  255. package/lib/components/classicLayout/index.d.ts +0 -4
  256. package/lib/components/classicLayout/index.js +0 -59
  257. package/lib/components/classicLayout/index.less +0 -22
  258. package/lib/components/component/index.d.ts +0 -11
  259. package/lib/components/component/index.js +0 -29
  260. package/lib/components/drawer/index.less +0 -34
  261. package/lib/components/list/index.d.ts +0 -7
  262. package/lib/components/list/index.js +0 -134
  263. package/lib/components/list/index.less +0 -38
  264. package/lib/components/select/index.less +0 -11
  265. package/lib/components/sort/components/InlineMenu/index.d.ts +0 -15
  266. package/lib/components/sort/components/InlineMenu/index.js +0 -89
  267. package/lib/components/sort/components/InlineMenu/index.less +0 -20
  268. package/lib/components/sort/index.d.ts +0 -18
  269. package/lib/components/sort/index.js +0 -147
  270. package/lib/components/sort/index.less +0 -10
  271. package/lib/components/table/Table/fields/utils/index.d.ts +0 -1
  272. package/lib/components/table/Table/fields/utils/index.js +0 -46
  273. package/lib/components/tabs/index.less +0 -60
  274. package/lib/locales/en-US.d.ts +0 -21
  275. package/lib/locales/en-US.js +0 -44
  276. package/lib/locales/index.d.ts +0 -1
  277. package/lib/locales/index.js +0 -58
  278. package/lib/locales/zh-CN.d.ts +0 -21
  279. package/lib/locales/zh-CN.js +0 -44
  280. package/lib/locales/zh-TW.d.ts +0 -21
  281. package/lib/locales/zh-TW.js +0 -44
  282. package/lib/utils/locale.d.ts +0 -1
  283. package/lib/utils/locale.js +0 -32
  284. package/lib/utils/platform.d.ts +0 -1
  285. package/lib/utils/platform.js +0 -36
@@ -1 +0,0 @@
1
- <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -1 +0,0 @@
1
- <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.707 4.293a1 1 0 0 1 0 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l5.293 5.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z"/></svg>
@@ -1 +0,0 @@
1
- <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L16.586 13H5a1 1 0 1 1 0-2h11.586l-5.293-5.293a1 1 0 0 1 0-1.414Z"/></svg>
@@ -1 +0,0 @@
1
- <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z"/></svg>
@@ -1 +0,0 @@
1
- <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11.258-3.976a2 2 0 0 0-2.225 1.308 1 1 0 1 1-1.886-.664 4 4 0 0 1 7.773 1.333c0 1.53-1.135 2.54-1.945 3.081a8.044 8.044 0 0 1-1.686.848l-.035.013-.011.003-.004.002h-.002L11.92 13l.316.949a1 1 0 0 1-.633-1.897l.016-.006.074-.027a6.051 6.051 0 0 0 1.172-.6c.69-.46 1.055-.95 1.055-1.419v-.001a2 2 0 0 0-1.662-1.975ZM11 17a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1Z"/></svg>
@@ -1 +0,0 @@
1
- <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L8 6.414V20a1 1 0 1 1-2 0V6.414L3.707 8.707a1 1 0 0 1-1.414-1.414l4-4ZM16 17.586V4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L16 17.586Z"/></svg>
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.less";
3
- declare const ClassicLayout: (props: any) => React.JSX.Element;
4
- export default ClassicLayout;
@@ -1,25 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- 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; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
4
- 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); }
5
- import React from "react";
6
- import classNames from "classnames";
7
- import "./index.less";
8
- var prefix = "pisell-lowcode-";
9
- var ClassicLayout = function ClassicLayout(props) {
10
- var header = props.header,
11
- content = props.content,
12
- footer = props.footer,
13
- style = props.style,
14
- fixedHeader = props.fixedHeader,
15
- fixedFooter = props.fixedFooter;
16
- return /*#__PURE__*/React.createElement("div", {
17
- className: "".concat(prefix, "claseic-layout"),
18
- style: style
19
- }, /*#__PURE__*/React.createElement("header", {
20
- className: classNames(_defineProperty({}, "".concat(prefix, "claseic-layout-fixed-header"), fixedHeader))
21
- }, header), content, /*#__PURE__*/React.createElement("footer", {
22
- className: classNames(_defineProperty({}, "".concat(prefix, "claseic-layout-fixed-footer"), fixedFooter))
23
- }, footer));
24
- };
25
- export default ClassicLayout;
@@ -1,22 +0,0 @@
1
- @pisell-prefix: pisell-lowcode;
2
-
3
- .@{pisell-prefix} {
4
- &-claseic-layout {
5
- position: relative;
6
- overflow: auto;
7
- height: 100%;
8
- width: 100%;
9
- }
10
- &-claseic-layout-fixed-header {
11
- position: sticky;
12
- top: 0;
13
- z-index: 1;
14
- width: 100%;
15
- }
16
- &-claseic-layout-fixed-footer {
17
- position: sticky;
18
- bottom: 0;
19
- z-index: 1;
20
- width: 100%;
21
- }
22
- }
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- interface ComponentProps {
3
- children: React.ReactNode;
4
- }
5
- /**
6
- * 低代码组件壳子 目前不做任何处理直接返回 如需容器包裹自行处理
7
- * @param props
8
- * @constructor
9
- */
10
- declare const Component: (props: ComponentProps) => React.ReactNode;
11
- export default Component;
@@ -1,10 +0,0 @@
1
- /**
2
- * 低代码组件壳子 目前不做任何处理直接返回 如需容器包裹自行处理
3
- * @param props
4
- * @constructor
5
- */
6
- var Component = function Component(props) {
7
- var children = props.children;
8
- return children;
9
- };
10
- export default Component;
@@ -1,34 +0,0 @@
1
- @pisell-prefix: pisell-lowcode;
2
-
3
- .@{pisell-prefix} {
4
- &-drawer-outside-wrap {
5
- position: absolute;
6
- padding: 10px;
7
- background-color: transparent;
8
- display: flex;
9
- flex-direction: column;
10
- }
11
- &-drawer-outside-wrap-right {
12
- left: -82px;
13
- }
14
- &-drawer-outside-action-wrap {
15
- width: 56px;
16
- height: 56px;
17
- border-radius: 99px;
18
- background: var(--base-white, #fff);
19
- transition: background 300ms ease;
20
- box-shadow: 0px 4px 8px 0px rgba(13, 22, 25, 0.02),
21
- 0px 12px 20px 0px rgba(0, 0, 0, 0.16);
22
- display: flex;
23
- align-items: center;
24
- justify-content: center;
25
- margin-bottom: 20px;
26
- cursor: pointer;
27
- &:hover {
28
- background: #e8e8ee;
29
- }
30
- .anticon {
31
- font-size: 20px;
32
- }
33
- }
34
- }
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import "./index.less";
3
- declare const List: {
4
- (props: any): React.JSX.Element;
5
- Item: import("antd/es/list/Item").ListItemTypeProps;
6
- };
7
- export default List;
@@ -1,104 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["className", "paginationType", "pagination", "footer", "header", "listHeight", "loadMoreData", "arrow"];
3
- 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; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
5
- 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); }
6
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
7
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
8
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
9
- import React, { useMemo, useRef } from "react";
10
- import classNames from "classnames";
11
- import { List as AntList, Skeleton } from "antd";
12
- import { getUniqueId } from "@pisell/utils";
13
- import InfiniteScroll from "react-infinite-scroll-component";
14
- import { DoubleRightOutlined } from "@ant-design/icons";
15
- import { useScroll } from "ahooks";
16
- import Pagination from "../Pagination";
17
- import "./index.less";
18
- var prefix = "pisell-lowcode-";
19
- var downArrow = /*#__PURE__*/React.createElement("div", {
20
- className: "".concat(prefix, "list-arrow-wrap ").concat(prefix, "list-arrow-down")
21
- }, /*#__PURE__*/React.createElement(DoubleRightOutlined, {
22
- style: {
23
- transform: "rotate(90deg)"
24
- }
25
- }));
26
- var upArrow = /*#__PURE__*/React.createElement("div", {
27
- className: "".concat(prefix, "list-arrow-wrap ").concat(prefix, "list-arrow-up")
28
- }, /*#__PURE__*/React.createElement(DoubleRightOutlined, {
29
- style: {
30
- transform: "rotate(-90deg)"
31
- }
32
- }));
33
- var List = function List(props) {
34
- var className = props.className,
35
- paginationType = props.paginationType,
36
- pagination = props.pagination,
37
- footer = props.footer,
38
- header = props.header,
39
- listHeight = props.listHeight,
40
- loadMoreData = props.loadMoreData,
41
- arrow = props.arrow,
42
- others = _objectWithoutProperties(props, _excluded);
43
- var listRef = useRef(null);
44
- var scrollListId = useMemo(function () {
45
- return "scrollableDiv-".concat(getUniqueId());
46
- }, []);
47
- var position = useScroll(listRef);
48
- var isShowDownArrow = useMemo(function () {
49
- var _listRef$current, _listRef$current2;
50
- return arrow && (listRef === null || listRef === void 0 ? void 0 : listRef.current) && ((position === null || position === void 0 ? void 0 : position.top) || 0) + (listRef === null || listRef === void 0 ? void 0 : (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.clientHeight) < ((_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.scrollHeight);
51
- }, [position, arrow]);
52
- var isShowUpArrow = useMemo(function () {
53
- return arrow && ((position === null || position === void 0 ? void 0 : position.top) || 0) > 0;
54
- }, [position, arrow]);
55
- var _footer = useMemo(function () {
56
- if (!(pagination && paginationType === "default") && !footer) {
57
- return null;
58
- }
59
- return /*#__PURE__*/React.createElement(React.Fragment, null, pagination && paginationType === "default" && /*#__PURE__*/React.createElement(Pagination, _extends({
60
- showLessItems: true
61
- }, pagination)), footer);
62
- }, [pagination, footer]);
63
- var list = useMemo(function () {
64
- var _props$grid2;
65
- if (paginationType === "scroll") {
66
- var _props$grid;
67
- return /*#__PURE__*/React.createElement("div", {
68
- className: "".concat(prefix, "scroll-list-wrap")
69
- }, header && /*#__PURE__*/React.createElement("div", {
70
- className: "".concat(prefix, "scroll-header-wrap")
71
- }, header), /*#__PURE__*/React.createElement("div", {
72
- id: scrollListId,
73
- ref: listRef,
74
- style: {
75
- height: listHeight || 400,
76
- overflow: "auto"
77
- }
78
- }, isShowUpArrow && upArrow, /*#__PURE__*/React.createElement(InfiniteScroll, {
79
- dataLength: props.dataSource.length,
80
- next: loadMoreData,
81
- hasMore: props.dataSource.length < ((pagination === null || pagination === void 0 ? void 0 : pagination.total) || 999999),
82
- loader: props.dataSource.length > 0 && /*#__PURE__*/React.createElement(Skeleton, {
83
- avatar: true,
84
- paragraph: {
85
- rows: 1
86
- },
87
- active: true,
88
- className: "".concat(prefix, "scroll-skeleton")
89
- }),
90
- scrollableTarget: scrollListId
91
- }, /*#__PURE__*/React.createElement(AntList, _extends({}, others, {
92
- className: classNames(className, _defineProperty({}, "".concat(prefix, "list-one-line-wrap"), props === null || props === void 0 ? void 0 : (_props$grid = props.grid) === null || _props$grid === void 0 ? void 0 : _props$grid.oneLine))
93
- }))), isShowDownArrow && downArrow), _footer && /*#__PURE__*/React.createElement("div", {
94
- className: "".concat(prefix, "scroll-footer-wrap")
95
- }, _footer));
96
- }
97
- return /*#__PURE__*/React.createElement(AntList, _extends({}, props, {
98
- className: classNames(className, _defineProperty({}, "".concat(prefix, "list-one-line-wrap"), props === null || props === void 0 ? void 0 : (_props$grid2 = props.grid) === null || _props$grid2 === void 0 ? void 0 : _props$grid2.oneLine))
99
- }));
100
- }, [props, _footer, isShowDownArrow, isShowUpArrow]);
101
- return list;
102
- };
103
- List.Item = AntList.Item;
104
- export default List;
@@ -1,38 +0,0 @@
1
- @pisell-prefix: pisell-lowcode;
2
-
3
- .@{pisell-prefix} {
4
- &-list-one-line-wrap {
5
- .pisell-lowcode-row {
6
- flex-flow: row nowrap;
7
- overflow: auto;
8
- & > div {
9
- flex-shrink: 0;
10
- }
11
- }
12
- }
13
- &-scroll-list-wrap {
14
- position: relative;
15
- }
16
- &-list-arrow-wrap {
17
- width: 40px;
18
- height: 40px;
19
- border-radius: 50%;
20
- background: rgba(0, 0, 0, 0.05);
21
- display: flex;
22
- justify-content: center;
23
- align-items: center;
24
- color: #0B5FDB;
25
- }
26
- &-list-arrow-down {
27
- position: absolute;
28
- bottom: 20px;
29
- left: 50%;
30
- transform: rotateX(-50%);
31
- }
32
- &-list-arrow-up {
33
- position: absolute;
34
- top: 20px;
35
- left: 50%;
36
- transform: rotateX(-50%);
37
- }
38
- }
@@ -1,11 +0,0 @@
1
- @pisell-prefix: pisell-lowcode;
2
-
3
-
4
- .@{pisell-prefix} {
5
- &-select-dropdown-render-divider {
6
- margin: 8px 0;
7
- }
8
- &-select-dropdown-render-options-wrap {
9
- padding: 0 5px 5px;
10
- }
11
- }
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- import { MenuProps } from "antd";
3
- import "./index.less";
4
- interface InlineMenuProps {
5
- items: any[];
6
- value?: [string, string];
7
- onChange?: (val: string, detail: Parameters<Required<MenuProps>["onClick"]>[0]) => void;
8
- }
9
- /**
10
- * 内嵌展示的菜单 只支持两级
11
- * @param props
12
- * @constructor
13
- */
14
- declare const InlineMenu: (props: InlineMenuProps) => React.JSX.Element;
15
- export default InlineMenu;
@@ -1,87 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
- 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; } }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import React, { useMemo } from "react";
8
- import { Menu, Divider } from "antd";
9
- import { CheckOutlined } from "@ant-design/icons";
10
- import { useControllableValue } from "ahooks";
11
- import "./index.less";
12
- var prefix = "pisell-lowcode-";
13
- /**
14
- * 内嵌展示的菜单 只支持两级
15
- * @param props
16
- * @constructor
17
- */
18
- var InlineMenu = function InlineMenu(props) {
19
- var items = props.items;
20
- var _useControllableValue = useControllableValue(props),
21
- _useControllableValue2 = _slicedToArray(_useControllableValue, 2),
22
- state = _useControllableValue2[0],
23
- setState = _useControllableValue2[1];
24
- var childItems = useMemo(function () {
25
- var _items$find;
26
- return ((_items$find = items.find(function (item) {
27
- return item.key === (state === null || state === void 0 ? void 0 : state[1]);
28
- })) === null || _items$find === void 0 ? void 0 : _items$find.children) || items[0].children;
29
- }, [state, items]);
30
- var handleParentClick = function handleParentClick(detail) {
31
- var children = items.find(function (item) {
32
- return item.key === detail.key;
33
- });
34
- var defaultKey = children.children[0].key;
35
- setState([defaultKey, detail.key], {
36
- key: defaultKey,
37
- item: children.children[0],
38
- keyPath: [defaultKey, detail.key]
39
- });
40
- };
41
- var handleChildrenClick = function handleChildrenClick(detail) {
42
- var parent = items.find(function (item) {
43
- return item.children.some(function (c) {
44
- return c.key === detail.key;
45
- });
46
- });
47
- setState([detail.key, parent.key], {
48
- key: detail.key,
49
- item: detail.item,
50
- keyPath: [detail.key, parent.key]
51
- });
52
- };
53
- return /*#__PURE__*/React.createElement("div", {
54
- className: "".concat(prefix, "inline-menu-wrap")
55
- }, /*#__PURE__*/React.createElement(Menu, {
56
- items: items.map(function (item) {
57
- return {
58
- key: item.key,
59
- label: /*#__PURE__*/React.createElement("span", {
60
- className: "".concat(prefix, "menu-item-label-wrap")
61
- }, /*#__PURE__*/React.createElement("span", {
62
- className: "".concat(prefix, "menu-item-label")
63
- }, item.label), item.key === (state === null || state === void 0 ? void 0 : state[1]) && /*#__PURE__*/React.createElement(CheckOutlined, null))
64
- };
65
- }),
66
- onClick: handleParentClick,
67
- selectedKeys: [state === null || state === void 0 ? void 0 : state[1]]
68
- }), /*#__PURE__*/React.createElement(Divider, {
69
- style: {
70
- margin: "6px 0"
71
- }
72
- }), /*#__PURE__*/React.createElement(Menu, {
73
- items: childItems.map(function (item) {
74
- return {
75
- key: item.key,
76
- label: /*#__PURE__*/React.createElement("span", {
77
- className: "".concat(prefix, "menu-item-label-wrap")
78
- }, /*#__PURE__*/React.createElement("span", {
79
- className: "".concat(prefix, "menu-item-label")
80
- }, item.label), item.key === (state === null || state === void 0 ? void 0 : state[0]) && /*#__PURE__*/React.createElement(CheckOutlined, null))
81
- };
82
- }),
83
- onClick: handleChildrenClick,
84
- selectedKeys: [state === null || state === void 0 ? void 0 : state[0]]
85
- }));
86
- };
87
- export default InlineMenu;
@@ -1,20 +0,0 @@
1
- @pisell-prefix: pisell-lowcode;
2
-
3
-
4
- .@{pisell-prefix} {
5
- &-inline-menu-wrap {
6
- min-width: 200px;
7
- }
8
- &-menu-item-label-wrap {
9
- width: 100%;
10
- display: flex;
11
- justify-content: space-between;
12
- }
13
- &-menu-item-label {
14
- margin-right: 16px;
15
- }
16
- &-menu-title-content {
17
- width: 100%;
18
- display: inline-block;
19
- }
20
- }
@@ -1,18 +0,0 @@
1
- import React from "react";
2
- import { MenuProps } from "antd";
3
- import "./index.less";
4
- export declare type SortItemProps = {
5
- type: "date" | "string" | "number";
6
- label: string;
7
- name: string;
8
- };
9
- declare type SortListProps = {
10
- list: SortItemProps[];
11
- onChange?: (val: string, detail: Parameters<Required<MenuProps>["onClick"]>[0]) => void;
12
- button?: React.ReactNode;
13
- style?: React.CSSProperties;
14
- value?: any;
15
- placement?: "bottom" | "bottomLeft" | "bottomRight" | "top" | "topLeft" | "topRight";
16
- };
17
- declare const Sort: React.FC<SortListProps>;
18
- export default Sort;
@@ -1,113 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
- 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; }
6
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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
- import React, { useMemo } from "react";
9
- import { Button, Dropdown, Popover } from "antd";
10
- import SwitchVertical01 from "@pisell/icon/es/SwitchVertical01";
11
- import { isMobile } from "../../utils/platform";
12
- import { getText } from "../../locales";
13
- import InlineMenu from "./components/InlineMenu";
14
- import "./index.less";
15
- var prefix = "pisell-lowcode-";
16
- var sortChildrenMap = {
17
- date: function date(key) {
18
- return [{
19
- key: "".concat(key, ":desc"),
20
- label: getText("sort-oldest-to-newest")
21
- }, {
22
- key: "".concat(key, ":asc"),
23
- label: getText("sort-newest-to-oldest")
24
- }];
25
- },
26
- time: function time(key) {
27
- return [{
28
- key: "".concat(key, ":desc"),
29
- label: getText("sort-from-morning-to-night")
30
- }, {
31
- key: "".concat(key, ":asc"),
32
- label: getText("sort-from-evening-to-morning")
33
- }];
34
- },
35
- string: function string(key) {
36
- return [{
37
- key: "".concat(key, ":asc"),
38
- label: getText("sort-a-z")
39
- }, {
40
- key: "".concat(key, ":desc"),
41
- label: getText("sort-z-a")
42
- }];
43
- },
44
- number: function number(key) {
45
- return [{
46
- key: "".concat(key, ":asc"),
47
- label: getText("sort-0-9")
48
- }, {
49
- key: "".concat(key, ":desc"),
50
- label: getText("sort-9-0")
51
- }];
52
- }
53
- };
54
- var Sort = function Sort(_ref) {
55
- var _ref$list = _ref.list,
56
- list = _ref$list === void 0 ? [] : _ref$list,
57
- onChange = _ref.onChange,
58
- button = _ref.button,
59
- style = _ref.style,
60
- value = _ref.value,
61
- placement = _ref.placement;
62
- var sortItems = useMemo(function () {
63
- return list.map(function (d) {
64
- return {
65
- key: d.name,
66
- label: d.label,
67
- children: sortChildrenMap[d.type](d.name)
68
- };
69
- });
70
- }, [list]);
71
- var onClick = function onClick(detail) {
72
- var _detail$keyPath;
73
- onChange === null || onChange === void 0 ? void 0 : onChange(detail === null || detail === void 0 ? void 0 : (_detail$keyPath = detail.keyPath) === null || _detail$keyPath === void 0 ? void 0 : _detail$keyPath[0], detail);
74
- };
75
- var btnContent = useMemo(function () {
76
- return button || /*#__PURE__*/React.createElement(Button, {
77
- icon: /*#__PURE__*/React.createElement(SwitchVertical01, null),
78
- style: style
79
- }, getText("sort-button-text"));
80
- }, [button, style]);
81
- var content = useMemo(function () {
82
- var others = {};
83
- if (value) {
84
- others = _objectSpread(_objectSpread({}, others), {}, {
85
- value: value
86
- });
87
- }
88
- return /*#__PURE__*/React.createElement(InlineMenu, _extends({
89
- items: sortItems,
90
- onChange: onChange
91
- }, others));
92
- }, [value, sortItems, onChange]);
93
- if (isMobile()) {
94
- return /*#__PURE__*/React.createElement(Popover, {
95
- placement: placement,
96
- content: content,
97
- arrow: false,
98
- overlayClassName: "".concat(prefix, "mobile-sort-overlay"),
99
- trigger: ["click", "hover"]
100
- }, btnContent);
101
- }
102
- return /*#__PURE__*/React.createElement(Dropdown, {
103
- trigger: ["click", "hover"],
104
- placement: placement,
105
- menu: {
106
- items: sortItems,
107
- onClick: onClick,
108
- selectable: true,
109
- selectedKeys: value
110
- }
111
- }, btnContent);
112
- };
113
- export default Sort;
@@ -1,10 +0,0 @@
1
- @pisell-prefix: pisell-lowcode;
2
-
3
- .@{pisell-prefix} {
4
- &-mobile-sort-overlay {
5
- .pisell-lowcode-popover-inner {
6
- padding: 0;
7
- overflow: hidden;
8
- }
9
- }
10
- }
@@ -1 +0,0 @@
1
- export declare const getValueByKeys: (obj: Record<string, any>, keys: string[] | string) => any;
@@ -1,29 +0,0 @@
1
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
- import { isString } from "@pisell/utils";
5
- export var getValueByKeys = function getValueByKeys(obj, keys) {
6
- if (!keys) return keys;
7
- if (isString(keys)) {
8
- keys = [keys];
9
- }
10
- var result = obj;
11
- var _iterator = _createForOfIteratorHelper(keys),
12
- _step;
13
- try {
14
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
15
- var _result, _result$hasOwnPropert, _result2;
16
- var key = _step.value;
17
- if (result && (_result = result) !== null && _result !== void 0 && (_result$hasOwnPropert = (_result2 = _result).hasOwnProperty) !== null && _result$hasOwnPropert !== void 0 && _result$hasOwnPropert.call(_result2, key)) {
18
- result = result[key];
19
- } else {
20
- return undefined;
21
- }
22
- }
23
- } catch (err) {
24
- _iterator.e(err);
25
- } finally {
26
- _iterator.f();
27
- }
28
- return result;
29
- };