@pisell/materials 1.0.204 → 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 +3 -3
- 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
package/lib/index.js
CHANGED
|
@@ -42,8 +42,10 @@ __export(src_exports, {
|
|
|
42
42
|
Carousel: () => import_antd9.Carousel,
|
|
43
43
|
Cascader: () => import_cascader.default,
|
|
44
44
|
Checkbox: () => import_checkbox.default,
|
|
45
|
+
ClassicLayout: () => import_classicLayout.default,
|
|
45
46
|
Col: () => import_antd10.Col,
|
|
46
47
|
Collapse: () => import_antd8.Collapse,
|
|
48
|
+
Component: () => import_component.default,
|
|
47
49
|
ConfigProvider: () => import_config_provider.default,
|
|
48
50
|
DatePicker: () => import_date_picker.default,
|
|
49
51
|
Descriptions: () => import_antd11.Descriptions,
|
|
@@ -59,8 +61,9 @@ __export(src_exports, {
|
|
|
59
61
|
Image: () => import_antd15.Image,
|
|
60
62
|
Input: () => import_input.default,
|
|
61
63
|
InputNumber: () => import_antd16.InputNumber,
|
|
62
|
-
List: () =>
|
|
64
|
+
List: () => import_list.default,
|
|
63
65
|
Mentions: () => import_antd19.Mentions,
|
|
66
|
+
Menu: () => import_antd18.Menu,
|
|
64
67
|
Modal: () => import_modal.default,
|
|
65
68
|
Page: () => import_page.default,
|
|
66
69
|
Pagination: () => import_antd22.Pagination,
|
|
@@ -76,6 +79,7 @@ __export(src_exports, {
|
|
|
76
79
|
Select: () => import_select.default,
|
|
77
80
|
Skeleton: () => import_skeleton.default,
|
|
78
81
|
Slider: () => import_slider.default,
|
|
82
|
+
Sort: () => import_sort.default,
|
|
79
83
|
SortableList: () => import_sortableList.default,
|
|
80
84
|
Space: () => import_antd29.Space,
|
|
81
85
|
Spin: () => import_antd30.Spin,
|
|
@@ -94,7 +98,7 @@ __export(src_exports, {
|
|
|
94
98
|
TreeSelect: () => import_tree_select.default,
|
|
95
99
|
Typography: () => import_typography.default,
|
|
96
100
|
Upload: () => import_upload.default,
|
|
97
|
-
message: () =>
|
|
101
|
+
message: () => import_antd17.message,
|
|
98
102
|
notification: () => import_antd21.notification,
|
|
99
103
|
version: () => import_antd38.version
|
|
100
104
|
});
|
|
@@ -162,11 +166,15 @@ var import_cascader = __toESM(require("./components/cascader"));
|
|
|
162
166
|
var import_auto_complete = __toESM(require("./components/auto-complete"));
|
|
163
167
|
var import_div = __toESM(require("./components/div"));
|
|
164
168
|
var import_page = __toESM(require("./components/page"));
|
|
169
|
+
var import_component = __toESM(require("./components/component"));
|
|
165
170
|
var import_filter = __toESM(require("./components/filter"));
|
|
166
171
|
var import_translation = __toESM(require("./components/translation"));
|
|
167
172
|
var import_sortableList = __toESM(require("./components/sortableList"));
|
|
168
173
|
var import_record_view = __toESM(require("./components/record-view"));
|
|
169
174
|
var import_qrcode = __toESM(require("./components/qrcode"));
|
|
175
|
+
var import_classicLayout = __toESM(require("./components/classicLayout"));
|
|
176
|
+
var import_list = __toESM(require("./components/list"));
|
|
177
|
+
var import_sort = __toESM(require("./components/sort"));
|
|
170
178
|
// Annotate the CommonJS export names for ESM import in node:
|
|
171
179
|
0 && (module.exports = {
|
|
172
180
|
Affix,
|
|
@@ -182,8 +190,10 @@ var import_qrcode = __toESM(require("./components/qrcode"));
|
|
|
182
190
|
Carousel,
|
|
183
191
|
Cascader,
|
|
184
192
|
Checkbox,
|
|
193
|
+
ClassicLayout,
|
|
185
194
|
Col,
|
|
186
195
|
Collapse,
|
|
196
|
+
Component,
|
|
187
197
|
ConfigProvider,
|
|
188
198
|
DatePicker,
|
|
189
199
|
Descriptions,
|
|
@@ -201,6 +211,7 @@ var import_qrcode = __toESM(require("./components/qrcode"));
|
|
|
201
211
|
InputNumber,
|
|
202
212
|
List,
|
|
203
213
|
Mentions,
|
|
214
|
+
Menu,
|
|
204
215
|
Modal,
|
|
205
216
|
Page,
|
|
206
217
|
Pagination,
|
|
@@ -216,6 +227,7 @@ var import_qrcode = __toESM(require("./components/qrcode"));
|
|
|
216
227
|
Select,
|
|
217
228
|
Skeleton,
|
|
218
229
|
Slider,
|
|
230
|
+
Sort,
|
|
219
231
|
SortableList,
|
|
220
232
|
Space,
|
|
221
233
|
Spin,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"table-filter-search": string;
|
|
3
|
+
"table-filter-clear": string;
|
|
4
|
+
"table-filter-filter": string;
|
|
5
|
+
"table-filter-min": string;
|
|
6
|
+
"table-filter-max": string;
|
|
7
|
+
"table-pagination-previous": string;
|
|
8
|
+
"table-pagination-next": string;
|
|
9
|
+
"table-pagination-total": (current: string, total: string) => string;
|
|
10
|
+
'select-dropdown-render-select-all': string;
|
|
11
|
+
'sort-button-text': string;
|
|
12
|
+
'sort-oldest-to-newest': string;
|
|
13
|
+
'sort-newest-to-oldest': string;
|
|
14
|
+
'sort-a-z': string;
|
|
15
|
+
'sort-z-a': string;
|
|
16
|
+
'sort-from-morning-to-night': string;
|
|
17
|
+
'sort-from-evening-to-morning': string;
|
|
18
|
+
'sort-0-9': string;
|
|
19
|
+
'sort-9-0': string;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/locales/en-US.ts
|
|
20
|
+
var en_US_exports = {};
|
|
21
|
+
__export(en_US_exports, {
|
|
22
|
+
default: () => en_US_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(en_US_exports);
|
|
25
|
+
var en_US_default = {
|
|
26
|
+
"table-filter-search": "Search",
|
|
27
|
+
"table-filter-clear": "Clear",
|
|
28
|
+
"table-filter-filter": "Filter",
|
|
29
|
+
"table-filter-min": "Min",
|
|
30
|
+
"table-filter-max": "Max",
|
|
31
|
+
"table-pagination-previous": "Previous",
|
|
32
|
+
"table-pagination-next": "Next",
|
|
33
|
+
"table-pagination-total": (current, total) => `Page ${current} of ${total}`,
|
|
34
|
+
"select-dropdown-render-select-all": "Select all",
|
|
35
|
+
"sort-button-text": "Sort",
|
|
36
|
+
"sort-oldest-to-newest": "Oldest to newest",
|
|
37
|
+
"sort-newest-to-oldest": "Newest to oldest",
|
|
38
|
+
"sort-a-z": "A to Z",
|
|
39
|
+
"sort-z-a": "Z to A",
|
|
40
|
+
"sort-from-morning-to-night": "From morning to night",
|
|
41
|
+
"sort-from-evening-to-morning": "From evening to morning",
|
|
42
|
+
"sort-0-9": "0 ~ 9",
|
|
43
|
+
"sort-9-0": "9 ~ 0"
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getText: (id: string) => any;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/locales/index.ts
|
|
30
|
+
var locales_exports = {};
|
|
31
|
+
__export(locales_exports, {
|
|
32
|
+
getText: () => getText
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(locales_exports);
|
|
35
|
+
var import_zh_CN = __toESM(require("./zh-CN"));
|
|
36
|
+
var import_en_US = __toESM(require("./en-US"));
|
|
37
|
+
var import_zh_TW = __toESM(require("./zh-TW"));
|
|
38
|
+
var import_locale = require("../utils/locale");
|
|
39
|
+
var langMap = {
|
|
40
|
+
"zh-CN": import_zh_CN.default,
|
|
41
|
+
"en-US": import_en_US.default,
|
|
42
|
+
"zh-TW": import_zh_TW.default
|
|
43
|
+
};
|
|
44
|
+
var getText = (id) => {
|
|
45
|
+
if (!id) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
let locale = (0, import_locale.getCurrentLocale)();
|
|
49
|
+
if (!locale) {
|
|
50
|
+
localStorage.setItem("umi_locale", "en-US");
|
|
51
|
+
locale = "en-US";
|
|
52
|
+
}
|
|
53
|
+
return langMap[locale][id] || id;
|
|
54
|
+
};
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
getText
|
|
58
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'table-filter-search': string;
|
|
3
|
+
'table-filter-clear': string;
|
|
4
|
+
'table-filter-filter': string;
|
|
5
|
+
'table-filter-min': string;
|
|
6
|
+
'table-filter-max': string;
|
|
7
|
+
'table-pagination-previous': string;
|
|
8
|
+
'table-pagination-next': string;
|
|
9
|
+
'table-pagination-total': (current: string, total: string) => string;
|
|
10
|
+
'select-dropdown-render-select-all': string;
|
|
11
|
+
'sort-button-text': string;
|
|
12
|
+
'sort-oldest-to-newest': string;
|
|
13
|
+
'sort-newest-to-oldest': string;
|
|
14
|
+
'sort-a-z': string;
|
|
15
|
+
'sort-z-a': string;
|
|
16
|
+
'sort-from-morning-to-night': string;
|
|
17
|
+
'sort-from-evening-to-morning': string;
|
|
18
|
+
'sort-0-9': string;
|
|
19
|
+
'sort-9-0': string;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/locales/zh-CN.ts
|
|
20
|
+
var zh_CN_exports = {};
|
|
21
|
+
__export(zh_CN_exports, {
|
|
22
|
+
default: () => zh_CN_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(zh_CN_exports);
|
|
25
|
+
var zh_CN_default = {
|
|
26
|
+
"table-filter-search": "搜索",
|
|
27
|
+
"table-filter-clear": "清除",
|
|
28
|
+
"table-filter-filter": "筛选",
|
|
29
|
+
"table-filter-min": "最小",
|
|
30
|
+
"table-filter-max": "最大",
|
|
31
|
+
"table-pagination-previous": "上一页",
|
|
32
|
+
"table-pagination-next": "下一页",
|
|
33
|
+
"table-pagination-total": (current, total) => `第${current}页 共${total}页`,
|
|
34
|
+
"select-dropdown-render-select-all": "全选",
|
|
35
|
+
"sort-button-text": "排序",
|
|
36
|
+
"sort-oldest-to-newest": "从旧到新",
|
|
37
|
+
"sort-newest-to-oldest": "从新到旧",
|
|
38
|
+
"sort-a-z": "A 到 Z",
|
|
39
|
+
"sort-z-a": "Z 到 A",
|
|
40
|
+
"sort-from-morning-to-night": "从早到晚",
|
|
41
|
+
"sort-from-evening-to-morning": "从晚到早",
|
|
42
|
+
"sort-0-9": "0 ~ 9",
|
|
43
|
+
"sort-9-0": "9 ~ 0"
|
|
44
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'table-filter-search': string;
|
|
3
|
+
'table-filter-clear': string;
|
|
4
|
+
'table-filter-filter': string;
|
|
5
|
+
'table-filter-min': string;
|
|
6
|
+
'table-filter-max': string;
|
|
7
|
+
'table-pagination-previous': string;
|
|
8
|
+
'table-pagination-next': string;
|
|
9
|
+
'table-pagination-total': (current: string, total: string) => string;
|
|
10
|
+
'select-dropdown-render-select-all': string;
|
|
11
|
+
'sort-button-text': string;
|
|
12
|
+
'sort-oldest-to-newest': string;
|
|
13
|
+
'sort-newest-to-oldest': string;
|
|
14
|
+
'sort-a-z': string;
|
|
15
|
+
'sort-z-a': string;
|
|
16
|
+
'sort-from-morning-to-night': string;
|
|
17
|
+
'sort-from-evening-to-morning': string;
|
|
18
|
+
'sort-0-9': string;
|
|
19
|
+
'sort-9-0': string;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/locales/zh-TW.ts
|
|
20
|
+
var zh_TW_exports = {};
|
|
21
|
+
__export(zh_TW_exports, {
|
|
22
|
+
default: () => zh_TW_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(zh_TW_exports);
|
|
25
|
+
var zh_TW_default = {
|
|
26
|
+
"table-filter-search": "搜索",
|
|
27
|
+
"table-filter-clear": "清除",
|
|
28
|
+
"table-filter-filter": "篩選",
|
|
29
|
+
"table-filter-min": "最小",
|
|
30
|
+
"table-filter-max": "最大",
|
|
31
|
+
"table-pagination-previous": "上一頁",
|
|
32
|
+
"table-pagination-next": "下一頁",
|
|
33
|
+
"table-pagination-total": (current, total) => `第${current}頁 共${total}頁`,
|
|
34
|
+
"select-dropdown-render-select-all": "全選",
|
|
35
|
+
"sort-button-text": "排序",
|
|
36
|
+
"sort-oldest-to-newest": "從舊到新",
|
|
37
|
+
"sort-newest-to-oldest": "從新到舊",
|
|
38
|
+
"sort-a-z": "A 到 Z",
|
|
39
|
+
"sort-z-a": "Z 到 A",
|
|
40
|
+
"sort-from-morning-to-night": "從早到晚",
|
|
41
|
+
"sort-from-evening-to-morning": "從晚到早",
|
|
42
|
+
"sort-0-9": "0 ~ 9",
|
|
43
|
+
"sort-9-0": "9 ~ 0"
|
|
44
|
+
};
|
package/lib/utils/hoc.d.ts
CHANGED
|
@@ -3,15 +3,15 @@ import React, { ComponentType } from 'react';
|
|
|
3
3
|
* 简单包装,不做任何处理
|
|
4
4
|
* 部分组件ref比较特殊,包一层会解决这个问题
|
|
5
5
|
*/
|
|
6
|
-
export declare function withWrap<T extends ComponentType<any>>(Comp: T):
|
|
6
|
+
export declare function withWrap<T extends ComponentType<any>>(Comp: T): (props: any) => React.JSX.Element;
|
|
7
7
|
/**
|
|
8
8
|
* 某些组件会用React.Children.only检查子节点
|
|
9
9
|
* 需要做处理避免报错
|
|
10
10
|
*/
|
|
11
|
-
export declare function withSingleChild(Comp: ComponentType<any>, needsConvert?: string[]): (props: any) => JSX.Element;
|
|
12
|
-
export declare function withSingleFunctionChild(Comp: ComponentType<any>): (props: any) => JSX.Element;
|
|
11
|
+
export declare function withSingleChild(Comp: ComponentType<any>, needsConvert?: string[]): (props: any) => React.JSX.Element;
|
|
12
|
+
export declare function withSingleFunctionChild(Comp: ComponentType<any>): (props: any) => React.JSX.Element;
|
|
13
13
|
/**
|
|
14
14
|
* moment对象在序列化后会被转为字符串
|
|
15
15
|
* 需要让日期类组件支持接受字符串值
|
|
16
16
|
*/
|
|
17
|
-
export declare function withMomentProps(Comp: ComponentType<any>, needsConvert?: string[]): (props: any) => JSX.Element;
|
|
17
|
+
export declare function withMomentProps(Comp: ComponentType<any>, needsConvert?: string[]): (props: any) => React.JSX.Element;
|
package/lib/utils/hoc.js
CHANGED
|
@@ -48,9 +48,9 @@ function convertProps(props, list, mapper) {
|
|
|
48
48
|
return out;
|
|
49
49
|
}
|
|
50
50
|
function withWrap(Comp) {
|
|
51
|
-
return (
|
|
52
|
-
return /* @__PURE__ */ import_react.default.createElement(Comp, { ...props
|
|
53
|
-
}
|
|
51
|
+
return (props) => {
|
|
52
|
+
return /* @__PURE__ */ import_react.default.createElement(Comp, { ...props });
|
|
53
|
+
};
|
|
54
54
|
}
|
|
55
55
|
function withSingleChild(Comp, needsConvert = ["children"]) {
|
|
56
56
|
return (props) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCurrentLocale: () => string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/utils/locale.ts
|
|
20
|
+
var locale_exports = {};
|
|
21
|
+
__export(locale_exports, {
|
|
22
|
+
getCurrentLocale: () => getCurrentLocale
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(locale_exports);
|
|
25
|
+
var getCurrentLocale = () => {
|
|
26
|
+
const locale = localStorage.getItem("umi_locale") || "en-US";
|
|
27
|
+
return locale;
|
|
28
|
+
};
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
getCurrentLocale
|
|
32
|
+
});
|
package/lib/utils/miniRedux.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ declare const _default: <State extends Record<string, any>, Namespace extends st
|
|
|
12
12
|
payload: any;
|
|
13
13
|
}) => void;
|
|
14
14
|
}>;
|
|
15
|
-
Provider: (ComponentUi: any) => (props: any) => JSX.Element;
|
|
15
|
+
Provider: (ComponentUi: any) => (props: any) => React.JSX.Element;
|
|
16
16
|
};
|
|
17
17
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isMobile: () => boolean;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/utils/platform.ts
|
|
20
|
+
var platform_exports = {};
|
|
21
|
+
__export(platform_exports, {
|
|
22
|
+
isMobile: () => isMobile
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(platform_exports);
|
|
25
|
+
var import_utils = require("@pisell/utils");
|
|
26
|
+
var import_index = require("./index");
|
|
27
|
+
var isMobile = () => {
|
|
28
|
+
if (import_index.isBrowser) {
|
|
29
|
+
return window.innerWidth <= 768 || (0, import_utils.isMobile)();
|
|
30
|
+
}
|
|
31
|
+
return (0, import_utils.isMobile)();
|
|
32
|
+
};
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
isMobile
|
|
36
|
+
});
|
package/lowcode/drawer/meta.ts
CHANGED
|
@@ -283,6 +283,11 @@ export default {
|
|
|
283
283
|
display: 'block',
|
|
284
284
|
type: 'group',
|
|
285
285
|
items: [
|
|
286
|
+
{
|
|
287
|
+
title: "others",
|
|
288
|
+
name: "others",
|
|
289
|
+
setter: ["JsonSetter", "VariableSetter"],
|
|
290
|
+
},
|
|
286
291
|
{
|
|
287
292
|
name: 'className',
|
|
288
293
|
title: { label: '容器类名', tip: 'className | 对话框外层容器的类名' },
|
package/lowcode/item/meta.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.206",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@dnd-kit/utilities": "^3.2.1",
|
|
58
58
|
"ahooks": "^3.7.6",
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
|
+
"@pisell/utils": "1.0.23",
|
|
60
61
|
"@pisell/icon": "0.0.8",
|
|
61
|
-
"@pisell/date-picker": "1.0.67"
|
|
62
|
-
"@pisell/utils": "1.0.21"
|
|
62
|
+
"@pisell/date-picker": "1.0.67"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"react": "^18.0.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare type SortItemProps = {
|
|
3
|
-
type: "date" | "string" | "number";
|
|
4
|
-
label: string;
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
declare type SortListProps = {
|
|
8
|
-
list: SortItemProps[];
|
|
9
|
-
onChange?: (val: string) => void;
|
|
10
|
-
};
|
|
11
|
-
declare const Sort: React.FC<SortListProps>;
|
|
12
|
-
export default Sort;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from "react";
|
|
2
|
-
import { Button, Dropdown } from "antd";
|
|
3
|
-
import SwitchVertical01 from "@pisell/icon/es/SwitchVertical01";
|
|
4
|
-
var sortChildrenMap = {
|
|
5
|
-
date: function date(key) {
|
|
6
|
-
return [{
|
|
7
|
-
key: "".concat(key, ":desc"),
|
|
8
|
-
label: "Oldest to newest"
|
|
9
|
-
}, {
|
|
10
|
-
key: "".concat(key, ":asc"),
|
|
11
|
-
label: "Newest to oldest"
|
|
12
|
-
}];
|
|
13
|
-
},
|
|
14
|
-
string: function string(key) {
|
|
15
|
-
return [{
|
|
16
|
-
key: "".concat(key, ":asc"),
|
|
17
|
-
label: "A to Z"
|
|
18
|
-
}, {
|
|
19
|
-
key: "".concat(key, ":desc"),
|
|
20
|
-
label: "Z to A"
|
|
21
|
-
}];
|
|
22
|
-
},
|
|
23
|
-
number: function number(key) {
|
|
24
|
-
return [{
|
|
25
|
-
key: "".concat(key, ":asc"),
|
|
26
|
-
label: "Lowest to highest"
|
|
27
|
-
}, {
|
|
28
|
-
key: "".concat(key, ":desc"),
|
|
29
|
-
label: "Highest to lowest"
|
|
30
|
-
}];
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
var Sort = function Sort(_ref) {
|
|
34
|
-
var _ref$list = _ref.list,
|
|
35
|
-
list = _ref$list === void 0 ? [] : _ref$list,
|
|
36
|
-
onChange = _ref.onChange;
|
|
37
|
-
var sortItems = useMemo(function () {
|
|
38
|
-
return list.map(function (d) {
|
|
39
|
-
return {
|
|
40
|
-
key: d.name,
|
|
41
|
-
label: d.label,
|
|
42
|
-
children: sortChildrenMap[d.type](d.name)
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
}, [list]);
|
|
46
|
-
var onClick = function onClick(detail) {
|
|
47
|
-
var _detail$keyPath;
|
|
48
|
-
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]);
|
|
49
|
-
};
|
|
50
|
-
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
51
|
-
menu: {
|
|
52
|
-
items: sortItems,
|
|
53
|
-
onClick: onClick
|
|
54
|
-
}
|
|
55
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
56
|
-
icon: /*#__PURE__*/React.createElement(SwitchVertical01, null)
|
|
57
|
-
}, "Sort"));
|
|
58
|
-
};
|
|
59
|
-
export default Sort;
|
|
File without changes
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare type SortItemProps = {
|
|
3
|
-
type: "date" | "string" | "number";
|
|
4
|
-
label: string;
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
declare type SortListProps = {
|
|
8
|
-
list: SortItemProps[];
|
|
9
|
-
onChange?: (val: string) => void;
|
|
10
|
-
};
|
|
11
|
-
declare const Sort: React.FC<SortListProps>;
|
|
12
|
-
export default Sort;
|