@pisell/materials 1.0.205 → 1.0.206
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +20 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -20
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/DragSortList/index.d.ts +1 -1
- package/es/components/MultipleContainersSortList/index.d.ts +1 -1
- package/es/components/Pagination/index.d.ts +2 -2
- package/es/components/Pagination/index.js +9 -14
- package/es/components/auto-complete/index.d.ts +1 -5
- package/es/components/calendar/index.d.ts +1 -1
- package/es/components/checkbox/index.d.ts +1 -1
- package/es/components/classicLayout/index.d.ts +4 -0
- package/es/components/classicLayout/index.js +25 -0
- package/es/components/classicLayout/index.less +22 -0
- package/es/components/component/index.d.ts +11 -0
- package/es/components/component/index.js +10 -0
- package/es/components/config-provider/index.d.ts +2 -2
- package/es/components/date-picker/index.d.ts +1 -1
- package/es/components/div/index.d.ts +1 -1
- package/es/components/div/index.js +6 -2
- package/es/components/drawer/index.d.ts +1 -0
- package/es/components/drawer/index.js +42 -4
- package/es/components/drawer/index.less +34 -0
- package/es/components/dropdown/index.d.ts +2 -2
- package/es/components/filter/components/QuickFilter/index.d.ts +2 -2
- package/es/components/filter/components/items/index.d.ts +6 -6
- package/es/components/filter/components/items/text/Editor/index.d.ts +1 -1
- package/es/components/filter/components/items/text/Preview/index.d.ts +1 -1
- package/es/components/filter/components/items/text/index.d.ts +2 -2
- package/es/components/filter/index.d.ts +2 -2
- package/es/components/form/index.d.ts +1 -1
- package/es/components/list/index.d.ts +7 -0
- package/es/components/list/index.js +104 -0
- package/es/components/list/index.less +38 -0
- package/es/components/page/index.d.ts +2 -2
- package/es/components/page/index.js +14 -1
- package/es/components/qrcode/index.d.ts +2 -2
- package/es/components/radio/index.d.ts +1 -1
- package/es/components/record-view/index.less +2 -0
- package/es/components/select/index.d.ts +2 -5
- package/es/components/select/index.js +60 -2
- package/es/components/select/index.less +11 -0
- package/es/components/skeleton/index.d.ts +1 -1
- package/es/components/slider/index.d.ts +2 -2
- package/es/components/sort/components/InlineMenu/index.d.ts +15 -0
- package/es/components/sort/components/InlineMenu/index.js +87 -0
- package/es/components/sort/components/InlineMenu/index.less +20 -0
- package/es/components/sort/index.d.ts +18 -0
- package/es/components/sort/index.js +113 -0
- package/es/components/sort/index.less +10 -0
- package/es/components/table/Actions/index.d.ts +2 -2
- package/es/components/table/Actions/index.js +1 -1
- package/es/components/table/BasicTable/index.d.ts +2 -2
- package/es/components/table/Header/index.d.ts +2 -2
- package/es/components/table/Summary/index.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +2 -2
- package/es/components/table/Table/fields/date/Config/index.d.ts +1 -1
- package/es/components/table/Table/fields/date/Show/index.d.ts +2 -2
- package/es/components/table/Table/fields/date/Show/index.js +2 -1
- package/es/components/table/Table/fields/date/Sort/index.d.ts +1 -1
- package/es/components/table/Table/fields/date/index.d.ts +3 -3
- package/es/components/table/Table/fields/image/Config/index.d.ts +1 -1
- package/es/components/table/Table/fields/image/Show/index.d.ts +1 -1
- package/es/components/table/Table/fields/image/Show/index.js +2 -1
- package/es/components/table/Table/fields/image/Sort/index.d.ts +1 -1
- package/es/components/table/Table/fields/image/index.d.ts +3 -3
- package/es/components/table/Table/fields/index.d.ts +57 -57
- package/es/components/table/Table/fields/link/Config/index.d.ts +1 -1
- package/es/components/table/Table/fields/link/Show/index.d.ts +1 -1
- package/es/components/table/Table/fields/link/Show/index.js +7 -5
- package/es/components/table/Table/fields/link/Sort/index.d.ts +1 -1
- package/es/components/table/Table/fields/link/index.d.ts +3 -3
- package/es/components/table/Table/fields/number/Config/index.d.ts +1 -1
- package/es/components/table/Table/fields/number/Show/index.d.ts +1 -1
- package/es/components/table/Table/fields/number/Show/index.js +2 -1
- package/es/components/table/Table/fields/number/Sort/index.d.ts +1 -1
- package/es/components/table/Table/fields/number/index.d.ts +3 -3
- package/es/components/table/Table/fields/pSwitch/Config/index.d.ts +1 -1
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +2 -2
- package/es/components/table/Table/fields/pSwitch/Show/index.js +2 -1
- package/es/components/table/Table/fields/pSwitch/Sort/index.d.ts +1 -1
- package/es/components/table/Table/fields/pSwitch/index.d.ts +3 -3
- package/es/components/table/Table/fields/rangePicker/Config/index.d.ts +1 -1
- package/es/components/table/Table/fields/rangePicker/Show/index.d.ts +1 -1
- package/es/components/table/Table/fields/rangePicker/Sort/index.d.ts +1 -1
- package/es/components/table/Table/fields/rangePicker/index.d.ts +3 -3
- package/es/components/table/Table/fields/search/Config/index.d.ts +1 -1
- package/es/components/table/Table/fields/search/Show/index.d.ts +1 -1
- package/es/components/table/Table/fields/search/Show/index.js +2 -1
- package/es/components/table/Table/fields/search/Sort/index.d.ts +1 -1
- package/es/components/table/Table/fields/search/index.d.ts +3 -3
- package/es/components/table/Table/fields/select/Config/index.d.ts +1 -1
- package/es/components/table/Table/fields/select/Show/index.d.ts +1 -1
- package/es/components/table/Table/fields/select/Sort/index.d.ts +1 -1
- package/es/components/table/Table/fields/select/index.d.ts +3 -3
- package/es/components/table/Table/fields/text/Config/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Edit/index.js +8 -3
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Show/index.js +2 -1
- package/es/components/table/Table/fields/text/Sort/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/index.d.ts +3 -3
- package/es/components/table/Table/fields/utils/index.d.ts +1 -0
- package/es/components/table/Table/fields/utils/index.js +29 -0
- package/es/components/table/Table/index.js +5 -4
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +2 -2
- package/es/components/table/Table/tableConfig/summary/index.d.ts +2 -2
- package/es/components/table/TableFilter/SortIcon.d.ts +2 -2
- package/es/components/table/TableFilter/numberFilter.js +5 -4
- package/es/components/table/TableFilter/selectFilter.js +3 -2
- package/es/components/table/TableFilter/stringFilter.js +4 -3
- package/es/components/table/model.d.ts +1 -1
- package/es/components/table/model.js +1 -29
- package/es/components/tabs/index.d.ts +5 -2
- package/es/components/tabs/index.js +51 -8
- package/es/components/tabs/index.less +60 -0
- package/es/components/time-picker/index.d.ts +1 -1
- package/es/components/upload/index.d.ts +1 -1
- package/es/index.d.ts +5 -1
- package/es/index.js +6 -5
- package/es/locales/en-US.d.ts +21 -0
- package/es/locales/en-US.js +22 -0
- package/es/locales/index.d.ts +1 -0
- package/es/locales/index.js +21 -0
- package/es/locales/zh-CN.d.ts +21 -0
- package/es/locales/zh-CN.js +22 -0
- package/es/locales/zh-TW.d.ts +21 -0
- package/es/locales/zh-TW.js +22 -0
- package/es/utils/hoc.d.ts +4 -4
- package/es/utils/hoc.js +9 -8
- package/es/utils/locale.d.ts +1 -0
- package/es/utils/locale.js +5 -0
- package/es/utils/miniRedux.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -0
- package/es/utils/platform.js +8 -0
- package/lib/components/DragSortList/index.d.ts +1 -1
- package/lib/components/MultipleContainersSortList/index.d.ts +1 -1
- package/lib/components/Pagination/index.d.ts +2 -2
- package/lib/components/Pagination/index.js +9 -8
- package/lib/components/auto-complete/index.d.ts +1 -5
- package/lib/components/calendar/index.d.ts +1 -1
- package/lib/components/checkbox/index.d.ts +1 -1
- package/lib/components/classicLayout/index.d.ts +4 -0
- package/lib/components/classicLayout/index.js +59 -0
- package/lib/components/classicLayout/index.less +22 -0
- package/lib/components/component/index.d.ts +11 -0
- package/lib/components/component/index.js +29 -0
- package/lib/components/config-provider/index.d.ts +2 -2
- package/lib/components/date-picker/index.d.ts +1 -1
- package/lib/components/div/index.d.ts +1 -1
- package/lib/components/div/index.js +2 -2
- package/lib/components/drawer/index.d.ts +1 -0
- package/lib/components/drawer/index.js +37 -1
- package/lib/components/drawer/index.less +34 -0
- package/lib/components/dropdown/index.d.ts +2 -2
- package/lib/components/filter/components/QuickFilter/index.d.ts +2 -2
- package/lib/components/filter/components/items/index.d.ts +6 -6
- package/lib/components/filter/components/items/text/Editor/index.d.ts +1 -1
- package/lib/components/filter/components/items/text/Preview/index.d.ts +1 -1
- package/lib/components/filter/components/items/text/index.d.ts +2 -2
- package/lib/components/filter/index.d.ts +2 -2
- package/lib/components/form/index.d.ts +1 -1
- package/lib/components/list/index.d.ts +7 -0
- package/lib/components/list/index.js +134 -0
- package/lib/components/list/index.less +38 -0
- package/lib/components/page/index.d.ts +2 -2
- package/lib/components/page/index.js +13 -1
- package/lib/components/qrcode/index.d.ts +2 -2
- package/lib/components/radio/index.d.ts +1 -1
- package/lib/components/record-view/index.less +2 -0
- package/lib/components/select/index.d.ts +2 -5
- package/lib/components/select/index.js +67 -1
- package/lib/components/select/index.less +11 -0
- package/lib/components/skeleton/index.d.ts +1 -1
- package/lib/components/slider/index.d.ts +2 -2
- package/lib/components/sort/components/InlineMenu/index.d.ts +15 -0
- package/lib/components/sort/components/InlineMenu/index.js +89 -0
- package/lib/components/sort/components/InlineMenu/index.less +20 -0
- package/lib/components/sort/index.d.ts +18 -0
- package/lib/components/sort/index.js +147 -0
- package/lib/components/sort/index.less +10 -0
- package/lib/components/table/Actions/index.d.ts +2 -2
- package/lib/components/table/Actions/index.js +2 -2
- package/lib/components/table/BasicTable/index.d.ts +2 -2
- package/lib/components/table/Header/index.d.ts +2 -2
- package/lib/components/table/Summary/index.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +2 -2
- package/lib/components/table/Table/fields/date/Config/index.d.ts +1 -1
- package/lib/components/table/Table/fields/date/Show/index.d.ts +2 -2
- package/lib/components/table/Table/fields/date/Show/index.js +2 -1
- package/lib/components/table/Table/fields/date/Sort/index.d.ts +1 -1
- package/lib/components/table/Table/fields/date/index.d.ts +3 -3
- package/lib/components/table/Table/fields/image/Config/index.d.ts +1 -1
- package/lib/components/table/Table/fields/image/Show/index.d.ts +1 -1
- package/lib/components/table/Table/fields/image/Show/index.js +2 -1
- package/lib/components/table/Table/fields/image/Sort/index.d.ts +1 -1
- package/lib/components/table/Table/fields/image/index.d.ts +3 -3
- package/lib/components/table/Table/fields/index.d.ts +57 -57
- package/lib/components/table/Table/fields/link/Config/index.d.ts +1 -1
- package/lib/components/table/Table/fields/link/Show/index.d.ts +1 -1
- package/lib/components/table/Table/fields/link/Show/index.js +7 -5
- package/lib/components/table/Table/fields/link/Sort/index.d.ts +1 -1
- package/lib/components/table/Table/fields/link/index.d.ts +3 -3
- package/lib/components/table/Table/fields/number/Config/index.d.ts +1 -1
- package/lib/components/table/Table/fields/number/Show/index.d.ts +1 -1
- package/lib/components/table/Table/fields/number/Show/index.js +2 -1
- package/lib/components/table/Table/fields/number/Sort/index.d.ts +1 -1
- package/lib/components/table/Table/fields/number/index.d.ts +3 -3
- package/lib/components/table/Table/fields/pSwitch/Config/index.d.ts +1 -1
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +2 -2
- package/lib/components/table/Table/fields/pSwitch/Show/index.js +2 -1
- package/lib/components/table/Table/fields/pSwitch/Sort/index.d.ts +1 -1
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +3 -3
- package/lib/components/table/Table/fields/rangePicker/Config/index.d.ts +1 -1
- package/lib/components/table/Table/fields/rangePicker/Show/index.d.ts +1 -1
- package/lib/components/table/Table/fields/rangePicker/Sort/index.d.ts +1 -1
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +3 -3
- package/lib/components/table/Table/fields/search/Config/index.d.ts +1 -1
- package/lib/components/table/Table/fields/search/Show/index.d.ts +1 -1
- package/lib/components/table/Table/fields/search/Show/index.js +2 -1
- package/lib/components/table/Table/fields/search/Sort/index.d.ts +1 -1
- package/lib/components/table/Table/fields/search/index.d.ts +3 -3
- package/lib/components/table/Table/fields/select/Config/index.d.ts +1 -1
- package/lib/components/table/Table/fields/select/Show/index.d.ts +1 -1
- package/lib/components/table/Table/fields/select/Sort/index.d.ts +1 -1
- package/lib/components/table/Table/fields/select/index.d.ts +3 -3
- package/lib/components/table/Table/fields/text/Config/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Edit/index.js +2 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Show/index.js +2 -1
- package/lib/components/table/Table/fields/text/Sort/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/index.d.ts +3 -3
- package/lib/components/table/Table/fields/utils/index.d.ts +1 -0
- package/lib/components/table/Table/fields/utils/index.js +46 -0
- package/lib/components/table/Table/index.js +3 -2
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +2 -2
- package/lib/components/table/Table/tableConfig/summary/index.d.ts +2 -2
- package/lib/components/table/TableFilter/SortIcon.d.ts +2 -2
- package/lib/components/table/TableFilter/numberFilter.js +5 -4
- package/lib/components/table/TableFilter/selectFilter.js +3 -2
- package/lib/components/table/TableFilter/stringFilter.js +4 -3
- package/lib/components/table/model.d.ts +1 -1
- package/lib/components/table/model.js +1 -34
- package/lib/components/tabs/index.d.ts +5 -2
- package/lib/components/tabs/index.js +50 -1
- package/lib/components/tabs/index.less +60 -0
- package/lib/components/time-picker/index.d.ts +1 -1
- package/lib/components/upload/index.d.ts +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/index.js +14 -2
- package/lib/locales/en-US.d.ts +21 -0
- package/lib/locales/en-US.js +44 -0
- package/lib/locales/index.d.ts +1 -0
- package/lib/locales/index.js +58 -0
- package/lib/locales/zh-CN.d.ts +21 -0
- package/lib/locales/zh-CN.js +44 -0
- package/lib/locales/zh-TW.d.ts +21 -0
- package/lib/locales/zh-TW.js +44 -0
- package/lib/utils/hoc.d.ts +4 -4
- package/lib/utils/hoc.js +3 -3
- package/lib/utils/locale.d.ts +1 -0
- package/lib/utils/locale.js +32 -0
- package/lib/utils/miniRedux.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -0
- package/lib/utils/platform.js +36 -0
- package/lowcode/drawer/meta.ts +5 -0
- package/lowcode/item/meta.ts +1 -1
- package/package.json +2 -2
- package/es/components/table/Actions/Sort/index.d.ts +0 -12
- package/es/components/table/Actions/Sort/index.js +0 -59
- package/es/components/table/Actions/Sort/index.less +0 -0
- package/lib/components/table/Actions/Sort/index.d.ts +0 -12
- package/lib/components/table/Actions/Sort/index.js +0 -86
- package/lib/components/table/Actions/Sort/index.less +0 -0
|
@@ -0,0 +1 @@
|
|
|
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>
|
|
@@ -0,0 +1 @@
|
|
|
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>
|
|
@@ -0,0 +1 @@
|
|
|
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>
|
|
@@ -0,0 +1 @@
|
|
|
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>
|
|
@@ -0,0 +1 @@
|
|
|
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>
|
|
@@ -0,0 +1 @@
|
|
|
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>
|
|
@@ -18,7 +18,7 @@ export interface Props<T> {
|
|
|
18
18
|
attributes: DraggableAttributes;
|
|
19
19
|
}) => React.ReactElement<HTMLElement>;
|
|
20
20
|
}
|
|
21
|
-
export default function Sortable<T extends Record<string, any>>({ list, onChange, rowKey, children, activationConstraint, }: Props<T>): JSX.Element;
|
|
21
|
+
export default function Sortable<T extends Record<string, any>>({ list, onChange, rowKey, children, activationConstraint, }: Props<T>): React.JSX.Element;
|
|
22
22
|
export interface SortableItemProps<T> {
|
|
23
23
|
id: number;
|
|
24
24
|
index: number;
|
|
@@ -21,5 +21,5 @@ interface DefaultRenderContainerProps {
|
|
|
21
21
|
}) => React.ReactElement;
|
|
22
22
|
children: any;
|
|
23
23
|
}
|
|
24
|
-
declare const MultipleContainersSortList: <T extends Record<string, any>>(props: MultipleContainersSortListProps<T>) => JSX.Element;
|
|
24
|
+
declare const MultipleContainersSortList: <T extends Record<string, any>>(props: MultipleContainersSortListProps<T>) => React.JSX.Element;
|
|
25
25
|
export default MultipleContainersSortList;
|
|
@@ -9,6 +9,6 @@ export declare const paginationConfig: {
|
|
|
9
9
|
responsive: boolean;
|
|
10
10
|
size: string;
|
|
11
11
|
};
|
|
12
|
-
declare const Pagination: (props: PaginationProps) => JSX.Element | null;
|
|
12
|
+
declare const Pagination: (props: PaginationProps) => React.JSX.Element | null;
|
|
13
13
|
export default Pagination;
|
|
14
|
-
export declare const FormPagination: ({ value, onChange, page, pageSize, ...other }: any) => JSX.Element;
|
|
14
|
+
export declare const FormPagination: ({ value, onChange, page, pageSize, ...other }: any) => React.JSX.Element;
|
|
@@ -16,6 +16,7 @@ import { Pagination as OriginPagination } from "antd";
|
|
|
16
16
|
import classNames from "classnames";
|
|
17
17
|
import { useResponsive } from "../../hooks";
|
|
18
18
|
import "./index.less";
|
|
19
|
+
import { getText } from "../../locales";
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* @title: 自定义渲染
|
|
@@ -32,14 +33,14 @@ var itemRender = function itemRender(_, type, originalElement) {
|
|
|
32
33
|
className: "paginator-page-btn-left-icon"
|
|
33
34
|
}), /*#__PURE__*/React.createElement("span", {
|
|
34
35
|
className: "paginator-page-btn-text"
|
|
35
|
-
}, "
|
|
36
|
+
}, getText("table-pagination-previous")));
|
|
36
37
|
}
|
|
37
38
|
if (type === "next") {
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
40
|
className: classNames("paginator-page-btn", "right")
|
|
40
41
|
}, /*#__PURE__*/React.createElement("span", {
|
|
41
42
|
className: "paginator-page-btn-text"
|
|
42
|
-
}, "
|
|
43
|
+
}, getText("table-pagination-next")), /*#__PURE__*/React.createElement(ArrowRight, {
|
|
43
44
|
className: "paginator-page-btn-right-icon"
|
|
44
45
|
}));
|
|
45
46
|
}
|
|
@@ -130,13 +131,7 @@ var MiniPagination = function MiniPagination(props) {
|
|
|
130
131
|
className: "materials-grid-paginator-center"
|
|
131
132
|
}, /*#__PURE__*/React.createElement("span", {
|
|
132
133
|
className: "materials-grid-paginator-center-text"
|
|
133
|
-
}, "
|
|
134
|
-
className: "materials-grid-paginator-center-value"
|
|
135
|
-
}, current), /*#__PURE__*/React.createElement("span", {
|
|
136
|
-
className: "materials-grid-paginator-center-text"
|
|
137
|
-
}, "of"), /*#__PURE__*/React.createElement("span", {
|
|
138
|
-
className: "materials-grid-paginator-center-value"
|
|
139
|
-
}, MAX)), /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
}, getText("table-pagination-total")(current, MAX))), /*#__PURE__*/React.createElement("div", {
|
|
140
135
|
className: "pisell-lowcode-pagination-next",
|
|
141
136
|
onClick: function onClick() {
|
|
142
137
|
if (current >= MAX) {
|
|
@@ -157,11 +152,11 @@ export var FormPagination = function FormPagination(_ref) {
|
|
|
157
152
|
page = _ref.page,
|
|
158
153
|
pageSize = _ref.pageSize,
|
|
159
154
|
other = _objectWithoutProperties(_ref, _excluded);
|
|
160
|
-
var _useState = useState(1),
|
|
155
|
+
var _useState = useState(page || 1),
|
|
161
156
|
_useState2 = _slicedToArray(_useState, 2),
|
|
162
157
|
_p = _useState2[0],
|
|
163
158
|
_setP = _useState2[1];
|
|
164
|
-
var _useState3 = useState(10),
|
|
159
|
+
var _useState3 = useState(pageSize || 10),
|
|
165
160
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
166
161
|
_ps = _useState4[0],
|
|
167
162
|
_setPs = _useState4[1];
|
|
@@ -172,11 +167,11 @@ export var FormPagination = function FormPagination(_ref) {
|
|
|
172
167
|
});
|
|
173
168
|
};
|
|
174
169
|
useEffect(function () {
|
|
175
|
-
var _page = (value === null || value === void 0 ? void 0 : value.page) || 1;
|
|
176
|
-
var _size = (value === null || value === void 0 ? void 0 : value.size) || 10;
|
|
170
|
+
var _page = (value === null || value === void 0 ? void 0 : value.page) || page || 1;
|
|
171
|
+
var _size = (value === null || value === void 0 ? void 0 : value.size) || pageSize || 10;
|
|
177
172
|
_setP(_page);
|
|
178
173
|
_setPs(_size);
|
|
179
|
-
}, [value]);
|
|
174
|
+
}, [value, page, pageSize]);
|
|
180
175
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Pagination, _extends({}, other, {
|
|
181
176
|
pageSize: _ps,
|
|
182
177
|
current: _p,
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const AutoComplete:
|
|
3
|
-
children?: import("react").ReactNode;
|
|
4
|
-
} & {
|
|
5
|
-
ref?: import("react").Ref<import("antd").RefSelectProps> | undefined;
|
|
6
|
-
}, "ref"> & import("react").RefAttributes<any>>;
|
|
2
|
+
declare const AutoComplete: (props: any) => import("react").JSX.Element;
|
|
7
3
|
export default AutoComplete;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const Checkbox:
|
|
2
|
+
declare const Checkbox: (props: any) => import("react").JSX.Element;
|
|
3
3
|
export default Checkbox;
|
|
@@ -0,0 +1,25 @@
|
|
|
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;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ConfigProviderProps as OriginalConfigProviderProps } from "antd/es/config-provider";
|
|
3
3
|
import "dayjs/locale/zh-cn";
|
|
4
4
|
export interface ConfigProviderProps extends OriginalConfigProviderProps {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
}
|
|
7
|
-
declare const ConfigProvider: (props: ConfigProviderProps) => JSX.Element;
|
|
7
|
+
declare const ConfigProvider: (props: ConfigProviderProps) => React.JSX.Element;
|
|
8
8
|
export default ConfigProvider;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
var _excluded = ["children", "style", "others"];
|
|
1
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 _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; }
|
|
4
|
+
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; }
|
|
2
5
|
import React from "react";
|
|
3
6
|
var Div = function Div(props) {
|
|
4
7
|
var children = props.children,
|
|
5
8
|
_props$style = props.style,
|
|
6
9
|
style = _props$style === void 0 ? {} : _props$style,
|
|
7
10
|
_props$others = props.others,
|
|
8
|
-
others = _props$others === void 0 ? {} : _props$others
|
|
11
|
+
others = _props$others === void 0 ? {} : _props$others,
|
|
12
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
9
13
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
10
14
|
style: style
|
|
11
|
-
}, others), children);
|
|
15
|
+
}, others, otherProps), children);
|
|
12
16
|
};
|
|
13
17
|
export default Div;
|
|
@@ -1,12 +1,50 @@
|
|
|
1
|
+
var _excluded = ["others"];
|
|
1
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); }
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
import React, { useMemo } from "react";
|
|
6
|
+
import { Drawer as OriginalDrawer } from "antd";
|
|
7
|
+
import { CloseOutlined } from "@ant-design/icons";
|
|
8
|
+
import "./index.less";
|
|
9
|
+
var prefix = "pisell-lowcode-";
|
|
10
|
+
var Title = function Title(props) {
|
|
11
|
+
var placement = props.placement,
|
|
12
|
+
onClose = props.onClose;
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: "".concat(prefix, "drawer-outside-wrap ").concat(prefix, "drawer-outside-wrap-").concat(placement)
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "".concat(prefix, "drawer-outside-action-wrap"),
|
|
17
|
+
onClick: onClose
|
|
18
|
+
}, /*#__PURE__*/React.createElement(CloseOutlined, null)));
|
|
19
|
+
};
|
|
4
20
|
var Drawer = function Drawer(props) {
|
|
21
|
+
var others = props.others,
|
|
22
|
+
resetProps = _objectWithoutProperties(props, _excluded);
|
|
23
|
+
var operateMode = props.operateMode,
|
|
24
|
+
headerStyle = props.headerStyle,
|
|
25
|
+
placement = props.placement,
|
|
26
|
+
onClose = props.onClose;
|
|
5
27
|
var innerProps = {};
|
|
6
|
-
if (props.__designMode ===
|
|
28
|
+
if (props.__designMode === "design") {
|
|
7
29
|
// 低代码编辑态中强制显示,将控制权交给引擎侧
|
|
8
30
|
innerProps.open = true;
|
|
9
31
|
}
|
|
10
|
-
|
|
32
|
+
var otherProps = useMemo(function () {
|
|
33
|
+
if (operateMode === "outside") {
|
|
34
|
+
return {
|
|
35
|
+
headerStyle: {
|
|
36
|
+
border: "none",
|
|
37
|
+
height: 0,
|
|
38
|
+
padding: 0
|
|
39
|
+
},
|
|
40
|
+
title: /*#__PURE__*/React.createElement(Title, {
|
|
41
|
+
placement: placement,
|
|
42
|
+
onClose: onClose
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return headerStyle;
|
|
47
|
+
}, [operateMode, placement, onClose]);
|
|
48
|
+
return /*#__PURE__*/React.createElement(OriginalDrawer, _extends({}, resetProps, innerProps, otherProps, others));
|
|
11
49
|
};
|
|
12
50
|
export default Drawer;
|
|
@@ -0,0 +1,34 @@
|
|
|
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,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: (props: any) => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: (props: any) => React.JSX.Element;
|
|
3
3
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { FilterItemProps } from "../Dropdown";
|
|
3
3
|
interface QuickFilterProps {
|
|
4
4
|
quickFilter: FilterItemProps[];
|
|
5
5
|
}
|
|
6
|
-
declare const QuickFilter: (props: QuickFilterProps) => JSX.Element;
|
|
6
|
+
declare const QuickFilter: (props: QuickFilterProps) => React.JSX.Element;
|
|
7
7
|
export default QuickFilter;
|
|
@@ -7,8 +7,8 @@ export declare const fieldMaps: {
|
|
|
7
7
|
field_type: string;
|
|
8
8
|
default_value: string;
|
|
9
9
|
};
|
|
10
|
-
Preview: (props: any) => JSX.Element;
|
|
11
|
-
Editor: () => JSX.Element;
|
|
10
|
+
Preview: (props: any) => import("react").JSX.Element;
|
|
11
|
+
Editor: () => import("react").JSX.Element;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
export declare const fieldList: {
|
|
@@ -24,8 +24,8 @@ export declare const getFieldByType: (type: string) => {
|
|
|
24
24
|
field_type: string;
|
|
25
25
|
default_value: string;
|
|
26
26
|
};
|
|
27
|
-
Preview: (props: any) => JSX.Element;
|
|
28
|
-
Editor: () => JSX.Element;
|
|
27
|
+
Preview: (props: any) => import("react").JSX.Element;
|
|
28
|
+
Editor: () => import("react").JSX.Element;
|
|
29
29
|
};
|
|
30
30
|
declare const _default: {
|
|
31
31
|
text: {
|
|
@@ -35,8 +35,8 @@ declare const _default: {
|
|
|
35
35
|
field_type: string;
|
|
36
36
|
default_value: string;
|
|
37
37
|
};
|
|
38
|
-
Preview: (props: any) => JSX.Element;
|
|
39
|
-
Editor: () => JSX.Element;
|
|
38
|
+
Preview: (props: any) => import("react").JSX.Element;
|
|
39
|
+
Editor: () => import("react").JSX.Element;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
export default _default;
|
|
@@ -6,7 +6,7 @@ declare const _default: {
|
|
|
6
6
|
field_type: string;
|
|
7
7
|
default_value: string;
|
|
8
8
|
};
|
|
9
|
-
Preview: (props: any) => JSX.Element;
|
|
10
|
-
Editor: () => JSX.Element;
|
|
9
|
+
Preview: (props: any) => import("react").JSX.Element;
|
|
10
|
+
Editor: () => import("react").JSX.Element;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { FilterItemProps } from "./components/Dropdown";
|
|
3
3
|
export interface FilterProps {
|
|
4
4
|
filter: {
|
|
@@ -8,5 +8,5 @@ export interface FilterProps {
|
|
|
8
8
|
isRenderFormContent: boolean;
|
|
9
9
|
onValuesChange: () => void;
|
|
10
10
|
}
|
|
11
|
-
declare const Filter: (props: FilterProps) => JSX.Element | null;
|
|
11
|
+
declare const Filter: (props: FilterProps) => React.JSX.Element | null;
|
|
12
12
|
export default Filter;
|
|
@@ -0,0 +1,104 @@
|
|
|
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;
|
|
@@ -0,0 +1,38 @@
|
|
|
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,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ConfigProviderProps } from "../config-provider";
|
|
3
3
|
interface PageProps extends ConfigProviderProps {
|
|
4
4
|
}
|
|
5
|
-
declare const Page: (props: PageProps) => JSX.Element;
|
|
5
|
+
declare const Page: (props: PageProps) => React.JSX.Element;
|
|
6
6
|
export default Page;
|