@pisell/materials 1.0.359 → 1.0.360
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 +13 -13
- package/build/lowcode/assets-dev.json +4 -4
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -29
- package/es/components/date-picker/index.js +2 -2
- package/es/components/drag-sort-tree/index.d.ts +1 -0
- package/es/components/drag-sort-tree/index.js +1 -2
- package/es/components/table/Actions/component/ExportImport/index.js +4 -5
- package/es/components/table/BasicTable/index.d.ts +2 -2
- package/es/components/table/BasicTable/index.js +10 -10
- package/es/components/table/Table/utils.d.ts +2 -14
- package/es/components/table/Table/utils.js +2 -6
- package/es/components/table/hooks/useTableSetting.js +5 -26
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/es/locales/en-US.d.ts +0 -12
- package/es/locales/en-US.js +1 -14
- package/es/locales/zh-CN.d.ts +0 -12
- package/es/locales/zh-CN.js +1 -14
- package/es/locales/zh-TW.d.ts +0 -12
- package/es/locales/zh-TW.js +1 -14
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/drag-sort-tree/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/index.js +1 -0
- package/lib/components/table/Actions/component/ExportImport/index.js +5 -5
- package/lib/components/table/BasicTable/index.d.ts +2 -2
- package/lib/components/table/BasicTable/index.js +2 -5
- package/lib/components/table/Table/utils.d.ts +2 -14
- package/lib/components/table/Table/utils.js +1 -7
- package/lib/components/table/hooks/useTableSetting.js +9 -23
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/lib/locales/en-US.d.ts +0 -12
- package/lib/locales/en-US.js +1 -14
- package/lib/locales/zh-CN.d.ts +0 -12
- package/lib/locales/zh-CN.js +1 -14
- package/lib/locales/zh-TW.d.ts +0 -12
- package/lib/locales/zh-TW.js +1 -14
- package/package.json +4 -4
- package/es/components/browserSelect/chevron-down.png +0 -0
- package/es/components/browserSelect/index.d.ts +0 -15
- package/es/components/browserSelect/index.js +0 -36
- package/es/components/browserSelect/index.less +0 -18
- package/es/components/date-picker/constants.d.ts +0 -39
- package/es/components/date-picker/constants.js +0 -76
- package/es/components/date-picker/datePickerCpt.d.ts +0 -8
- package/es/components/date-picker/datePickerCpt.js +0 -290
- package/es/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
- package/es/components/date-picker/hooks/useMediaQuery.js +0 -28
- package/es/components/date-picker/index.less +0 -1847
- package/es/components/picker-view/index.d.ts +0 -2
- package/es/components/picker-view/index.js +0 -2
- package/lib/components/browserSelect/chevron-down.png +0 -0
- package/lib/components/browserSelect/index.d.ts +0 -15
- package/lib/components/browserSelect/index.js +0 -59
- package/lib/components/browserSelect/index.less +0 -18
- package/lib/components/date-picker/constants.d.ts +0 -39
- package/lib/components/date-picker/constants.js +0 -78
- package/lib/components/date-picker/datePickerCpt.d.ts +0 -8
- package/lib/components/date-picker/datePickerCpt.js +0 -297
- package/lib/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
- package/lib/components/date-picker/hooks/useMediaQuery.js +0 -43
- package/lib/components/date-picker/index.less +0 -1847
- package/lib/components/picker-view/index.d.ts +0 -2
- package/lib/components/picker-view/index.js +0 -36
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
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
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
|
|
29
19
|
// src/components/table/hooks/useTableSetting.ts
|
|
@@ -34,9 +24,7 @@ __export(useTableSetting_exports, {
|
|
|
34
24
|
module.exports = __toCommonJS(useTableSetting_exports);
|
|
35
25
|
var import_react = require("react");
|
|
36
26
|
var import_utils = require("../Table/utils");
|
|
37
|
-
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
38
27
|
var useTableSetting = (params) => {
|
|
39
|
-
var _a;
|
|
40
28
|
const {
|
|
41
29
|
tableId,
|
|
42
30
|
filter,
|
|
@@ -50,29 +38,27 @@ var useTableSetting = (params) => {
|
|
|
50
38
|
currentSettingHash,
|
|
51
39
|
exportImport
|
|
52
40
|
} = params;
|
|
53
|
-
const context = (0, import_useEngineContext.default)();
|
|
54
|
-
const { isTerminal, interaction } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
55
41
|
const columnsMap = (0, import_react.useMemo)(() => {
|
|
56
42
|
return new Map(propsColumns.map((item) => [item.key, item]));
|
|
57
43
|
}, [propsColumns]);
|
|
58
44
|
const columns = (0, import_react.useMemo)(() => {
|
|
59
|
-
var
|
|
45
|
+
var _a;
|
|
60
46
|
if (currentViewMode === "grid") {
|
|
61
47
|
return propsColumns;
|
|
62
48
|
} else if (currentViewMode === "gallery") {
|
|
63
|
-
return (((
|
|
49
|
+
return (((_a = gallery == null ? void 0 : gallery.content) == null ? void 0 : _a.fields) || []).filter((item) => item.show).map((item) => columnsMap.get(item.columnKey)).filter(Boolean);
|
|
64
50
|
}
|
|
65
51
|
return propsColumns;
|
|
66
52
|
}, [propsColumns, currentViewMode, gallery, columnsMap]);
|
|
67
53
|
const { list, quickFilterMaxLength, sortButtonShow } = filter || {};
|
|
68
54
|
const defaultGalleryCoverSetting = (0, import_react.useMemo)(() => {
|
|
69
|
-
var
|
|
55
|
+
var _a, _b;
|
|
70
56
|
return {
|
|
71
|
-
coverObjectFit: (
|
|
57
|
+
coverObjectFit: (_a = gallery == null ? void 0 : gallery.cover) == null ? void 0 : _a.objectFit,
|
|
72
58
|
coverField: (_b = columns.find(
|
|
73
59
|
(column) => {
|
|
74
|
-
var
|
|
75
|
-
return column.key === ((_b2 = (
|
|
60
|
+
var _a2, _b2;
|
|
61
|
+
return column.key === ((_b2 = (_a2 = gallery == null ? void 0 : gallery.cover) == null ? void 0 : _a2.fields) == null ? void 0 : _b2[0]);
|
|
76
62
|
}
|
|
77
63
|
)) == null ? void 0 : _b.dataIndex,
|
|
78
64
|
compactMode: "default",
|
|
@@ -116,7 +102,7 @@ var useTableSetting = (params) => {
|
|
|
116
102
|
);
|
|
117
103
|
const mergedSetting = { ...allSetting, ...currentViewModeSetting };
|
|
118
104
|
localStorageSettingKeyArr.forEach((item) => {
|
|
119
|
-
var
|
|
105
|
+
var _a, _b, _c, _d;
|
|
120
106
|
if (item === "view_mode") {
|
|
121
107
|
setting[item] = view.multiple ? (mergedSetting == null ? void 0 : mergedSetting[item]) || view.defaultViewMode : view.defaultViewMode;
|
|
122
108
|
} else if (item === "filter_setting") {
|
|
@@ -137,7 +123,7 @@ var useTableSetting = (params) => {
|
|
|
137
123
|
setting[item] = {
|
|
138
124
|
...mergedSetting == null ? void 0 : mergedSetting[item],
|
|
139
125
|
// 本地没有默认封面效果时取配置中的
|
|
140
|
-
coverObjectFit: ((
|
|
126
|
+
coverObjectFit: ((_a = mergedSetting == null ? void 0 : mergedSetting[item]) == null ? void 0 : _a.coverObjectFit) || defaultGalleryCoverSetting.coverObjectFit,
|
|
141
127
|
coverField: ((_b = mergedSetting == null ? void 0 : mergedSetting[item]) == null ? void 0 : _b.coverField) || defaultGalleryCoverSetting.coverField,
|
|
142
128
|
compactMode: ((_c = mergedSetting == null ? void 0 : mergedSetting[item]) == null ? void 0 : _c.compactMode) || defaultGalleryCoverSetting.compactMode,
|
|
143
129
|
isShowLabel: ((_d = mergedSetting == null ? void 0 : mergedSetting[item]) == null ? void 0 : _d.isShowLabel) ?? defaultGalleryCoverSetting.isShowLabel
|
|
@@ -200,7 +186,7 @@ var useTableSetting = (params) => {
|
|
|
200
186
|
sortButtonShow
|
|
201
187
|
]);
|
|
202
188
|
const setTableSetting = (values) => {
|
|
203
|
-
|
|
189
|
+
(0, import_utils.setFormValuesToLocalStorage)({
|
|
204
190
|
tableId,
|
|
205
191
|
allValues: values,
|
|
206
192
|
keys: localStorageSettingKeyArr,
|
package/lib/index.d.ts
CHANGED
|
@@ -72,7 +72,6 @@ export { default as List } from './components/list';
|
|
|
72
72
|
export { default as Sort } from './components/sort';
|
|
73
73
|
export { default as InputNumberRange } from './components/input-number-range';
|
|
74
74
|
export { default as LowCodePage } from './components/lowCodePage';
|
|
75
|
-
export { default as PickerView } from "./components/picker-view";
|
|
76
75
|
export { default as Segmented } from './components/segmented';
|
|
77
76
|
export { default as VirtualKeyboard } from './components/virtual-keyboard';
|
|
78
77
|
export { default as VirtualKeyboardTime } from './components/virtual-keyboard/Time';
|
package/lib/index.js
CHANGED
|
@@ -72,7 +72,6 @@ __export(src_exports, {
|
|
|
72
72
|
Modal: () => import_modal.default,
|
|
73
73
|
Page: () => import_page.default,
|
|
74
74
|
Pagination: () => import_antd22.Pagination,
|
|
75
|
-
PickerView: () => import_picker_view.default,
|
|
76
75
|
Popconfirm: () => import_antd23.Popconfirm,
|
|
77
76
|
Popover: () => import_antd24.Popover,
|
|
78
77
|
Progress: () => import_antd25.Progress,
|
|
@@ -187,7 +186,6 @@ var import_list = __toESM(require("./components/list"));
|
|
|
187
186
|
var import_sort = __toESM(require("./components/sort"));
|
|
188
187
|
var import_input_number_range = __toESM(require("./components/input-number-range"));
|
|
189
188
|
var import_lowCodePage = __toESM(require("./components/lowCodePage"));
|
|
190
|
-
var import_picker_view = __toESM(require("./components/picker-view"));
|
|
191
189
|
var import_segmented = __toESM(require("./components/segmented"));
|
|
192
190
|
var import_virtual_keyboard = __toESM(require("./components/virtual-keyboard"));
|
|
193
191
|
var import_Time = __toESM(require("./components/virtual-keyboard/Time"));
|
|
@@ -240,7 +238,6 @@ var import_drag_sort_tree = __toESM(require("./components/drag-sort-tree"));
|
|
|
240
238
|
Modal,
|
|
241
239
|
Page,
|
|
242
240
|
Pagination,
|
|
243
|
-
PickerView,
|
|
244
241
|
Popconfirm,
|
|
245
242
|
Popover,
|
|
246
243
|
Progress,
|
package/lib/locales/en-US.d.ts
CHANGED
|
@@ -97,17 +97,5 @@ declare const _default: {
|
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
99
|
'drag-sort-tree-unavailable-today-tip': string;
|
|
100
|
-
'date-picker-today': string;
|
|
101
|
-
'date-picker-yesterday': string;
|
|
102
|
-
'date-picker-tomorrow': string;
|
|
103
|
-
'date-picker-next_monday': string;
|
|
104
|
-
'date-picker-last_friday': string;
|
|
105
|
-
'date-picker-first_day_of_this_month': string;
|
|
106
|
-
'date-picker-last_day_of_this_month': string;
|
|
107
|
-
'date-picker-first_day_of_next_month': string;
|
|
108
|
-
'date-picker-last_day_of_last_month': string;
|
|
109
|
-
'date-picker-invalid-date': string;
|
|
110
|
-
"date-picker-apply": string;
|
|
111
|
-
'date-picker-shortcut-custom': string;
|
|
112
100
|
};
|
|
113
101
|
export default _default;
|
package/lib/locales/en-US.js
CHANGED
|
@@ -124,18 +124,5 @@ var en_US_default = {
|
|
|
124
124
|
"table-action-export-import-log-err-log": "Failure Log",
|
|
125
125
|
"table-action-export-import-log-copy": "Copy",
|
|
126
126
|
"table-action-export-import-table-success-copy": "Copy Success",
|
|
127
|
-
"drag-sort-tree-unavailable-today-tip": "Unavailable today"
|
|
128
|
-
// 日期组件
|
|
129
|
-
"date-picker-today": "Today",
|
|
130
|
-
"date-picker-yesterday": "Yesterday",
|
|
131
|
-
"date-picker-tomorrow": "Tomorrow",
|
|
132
|
-
"date-picker-next_monday": "Next monday",
|
|
133
|
-
"date-picker-last_friday": "Last friday",
|
|
134
|
-
"date-picker-first_day_of_this_month": "First day of this month",
|
|
135
|
-
"date-picker-last_day_of_this_month": "Last day of this month",
|
|
136
|
-
"date-picker-first_day_of_next_month": "First day of next month",
|
|
137
|
-
"date-picker-last_day_of_last_month": "Last day of last month",
|
|
138
|
-
"date-picker-invalid-date": "Invalid date",
|
|
139
|
-
"date-picker-apply": "Apply",
|
|
140
|
-
"date-picker-shortcut-custom": "Custom"
|
|
127
|
+
"drag-sort-tree-unavailable-today-tip": "Unavailable today"
|
|
141
128
|
};
|
package/lib/locales/zh-CN.d.ts
CHANGED
|
@@ -97,17 +97,5 @@ declare const _default: {
|
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
99
|
'drag-sort-tree-unavailable-today-tip': string;
|
|
100
|
-
'date-picker-today': string;
|
|
101
|
-
'date-picker-yesterday': string;
|
|
102
|
-
'date-picker-tomorrow': string;
|
|
103
|
-
'date-picker-next_monday': string;
|
|
104
|
-
'date-picker-last_friday': string;
|
|
105
|
-
'date-picker-first_day_of_this_month': string;
|
|
106
|
-
'date-picker-last_day_of_this_month': string;
|
|
107
|
-
'date-picker-first_day_of_next_month': string;
|
|
108
|
-
'date-picker-last_day_of_last_month': string;
|
|
109
|
-
'date-picker-invalid-date': string;
|
|
110
|
-
"date-picker-apply": string;
|
|
111
|
-
'date-picker-shortcut-custom': string;
|
|
112
100
|
};
|
|
113
101
|
export default _default;
|
package/lib/locales/zh-CN.js
CHANGED
|
@@ -124,18 +124,5 @@ var zh_CN_default = {
|
|
|
124
124
|
"table-action-export-import-log-err-log": "失败日志",
|
|
125
125
|
"table-action-export-import-log-copy": "复制",
|
|
126
126
|
"table-action-export-import-table-success-copy": "复制成功",
|
|
127
|
-
"drag-sort-tree-unavailable-today-tip": "今日不可用"
|
|
128
|
-
// 日期组件
|
|
129
|
-
"date-picker-today": "今天",
|
|
130
|
-
"date-picker-yesterday": "昨天",
|
|
131
|
-
"date-picker-tomorrow": "明天",
|
|
132
|
-
"date-picker-next_monday": "下个星期一",
|
|
133
|
-
"date-picker-last_friday": "上个星期五",
|
|
134
|
-
"date-picker-first_day_of_this_month": "本月的第一天",
|
|
135
|
-
"date-picker-last_day_of_this_month": "本月的最后一天",
|
|
136
|
-
"date-picker-first_day_of_next_month": "下个月的第一天",
|
|
137
|
-
"date-picker-last_day_of_last_month": "上个月的最后一天",
|
|
138
|
-
"date-picker-invalid-date": "无效日期",
|
|
139
|
-
"date-picker-apply": "确定",
|
|
140
|
-
"date-picker-shortcut-custom": "自定义"
|
|
127
|
+
"drag-sort-tree-unavailable-today-tip": "今日不可用"
|
|
141
128
|
};
|
package/lib/locales/zh-TW.d.ts
CHANGED
|
@@ -97,17 +97,5 @@ declare const _default: {
|
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
99
|
'drag-sort-tree-unavailable-today-tip': string;
|
|
100
|
-
'date-picker-today': string;
|
|
101
|
-
'date-picker-yesterday': string;
|
|
102
|
-
'date-picker-tomorrow': string;
|
|
103
|
-
'date-picker-next_monday': string;
|
|
104
|
-
'date-picker-last_friday': string;
|
|
105
|
-
'date-picker-first_day_of_this_month': string;
|
|
106
|
-
'date-picker-last_day_of_this_month': string;
|
|
107
|
-
'date-picker-first_day_of_next_month': string;
|
|
108
|
-
'date-picker-last_day_of_last_month': string;
|
|
109
|
-
'date-picker-invalid-date': string;
|
|
110
|
-
"date-picker-apply": string;
|
|
111
|
-
'date-picker-shortcut-custom': string;
|
|
112
100
|
};
|
|
113
101
|
export default _default;
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -124,18 +124,5 @@ var zh_TW_default = {
|
|
|
124
124
|
"table-action-export-import-log-err-log": "失敗日誌",
|
|
125
125
|
"table-action-export-import-log-copy": "復製",
|
|
126
126
|
"table-action-export-import-table-success-copy": "復製成功",
|
|
127
|
-
"drag-sort-tree-unavailable-today-tip": "今日不可用"
|
|
128
|
-
// 日期组件
|
|
129
|
-
"date-picker-today": "今天",
|
|
130
|
-
"date-picker-yesterday": "昨天",
|
|
131
|
-
"date-picker-tomorrow": "明天",
|
|
132
|
-
"date-picker-next_monday": "下個星期一",
|
|
133
|
-
"date-picker-last_friday": "上個星期五",
|
|
134
|
-
"date-picker-first_day_of_this_month": "本月的第一天",
|
|
135
|
-
"date-picker-last_day_of_this_month": "本月的最後一天",
|
|
136
|
-
"date-picker-first_day_of_next_month": "下個月的第一天",
|
|
137
|
-
"date-picker-last_day_of_last_month": "上個月的最後一天",
|
|
138
|
-
"date-picker-invalid-date": "無效日期",
|
|
139
|
-
"date-picker-apply": "确定",
|
|
140
|
-
"date-picker-shortcut-custom": "自定義"
|
|
127
|
+
"drag-sort-tree-unavailable-today-tip": "今日不可用"
|
|
141
128
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.360",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"react-window": "^1.8.10",
|
|
63
63
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
64
64
|
"crypto-js": "^4.2.0",
|
|
65
|
-
"@pisell/utils": "1.0.
|
|
66
|
-
"@pisell/
|
|
67
|
-
"@pisell/
|
|
65
|
+
"@pisell/utils": "1.0.28",
|
|
66
|
+
"@pisell/icon": "0.0.10",
|
|
67
|
+
"@pisell/date-picker": "1.0.89"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.0.0",
|
|
Binary file
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.less";
|
|
3
|
-
interface BrowserSelectProps extends React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> {
|
|
4
|
-
options: any[];
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* @title: 系统级别的下拉框
|
|
8
|
-
* @description:
|
|
9
|
-
* @param {BrowserSelectProps} props
|
|
10
|
-
* @return {*}
|
|
11
|
-
* @Author: zhiwei.Wang
|
|
12
|
-
* @Date: 2024-01-30 16:43
|
|
13
|
-
*/
|
|
14
|
-
declare const BrowserSelect: (props: BrowserSelectProps) => React.JSX.Element;
|
|
15
|
-
export default BrowserSelect;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var _excluded = ["options"];
|
|
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; }
|
|
5
|
-
import React, { useMemo } from "react";
|
|
6
|
-
import classNames from "classnames";
|
|
7
|
-
import "./index.less";
|
|
8
|
-
/**
|
|
9
|
-
* @title: 系统级别的下拉框
|
|
10
|
-
* @description:
|
|
11
|
-
* @param {BrowserSelectProps} props
|
|
12
|
-
* @return {*}
|
|
13
|
-
* @Author: zhiwei.Wang
|
|
14
|
-
* @Date: 2024-01-30 16:43
|
|
15
|
-
*/
|
|
16
|
-
var BrowserSelect = function BrowserSelect(props) {
|
|
17
|
-
var options = props.options,
|
|
18
|
-
resetProps = _objectWithoutProperties(props, _excluded);
|
|
19
|
-
var _options = useMemo(function () {
|
|
20
|
-
return (props.options || []).map(function (d) {
|
|
21
|
-
return /*#__PURE__*/React.createElement("option", {
|
|
22
|
-
value: d.value,
|
|
23
|
-
key: d.value
|
|
24
|
-
}, d.label);
|
|
25
|
-
});
|
|
26
|
-
}, [props.options]);
|
|
27
|
-
return /*#__PURE__*/React.createElement("select", _extends({}, resetProps, {
|
|
28
|
-
className: classNames("date-picker-pisell-browser-select", resetProps.className),
|
|
29
|
-
onChange: function onChange(e) {
|
|
30
|
-
var _resetProps$onChange;
|
|
31
|
-
e.persist();
|
|
32
|
-
(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 ? void 0 : _resetProps$onChange.call(resetProps, e);
|
|
33
|
-
}
|
|
34
|
-
}), _options);
|
|
35
|
-
};
|
|
36
|
-
export default BrowserSelect;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.date-picker-pisell-browser-select {
|
|
2
|
-
padding: 9px 16px;
|
|
3
|
-
border-radius: 8px;
|
|
4
|
-
background-color: #fff;
|
|
5
|
-
background-image: url('./chevron-down.png');
|
|
6
|
-
color: var(--Gray-true-900, #141414);
|
|
7
|
-
font-size: 16px;
|
|
8
|
-
font-style: normal;
|
|
9
|
-
font-weight: 600;
|
|
10
|
-
border: 1px solid var(--Gray-300, #D0D5DD);
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
appearance: none;
|
|
13
|
-
-webkit-appearance: none;
|
|
14
|
-
-moz-appearance: none;
|
|
15
|
-
background-position: right 10px center;
|
|
16
|
-
background-size: 12px;
|
|
17
|
-
background-repeat: no-repeat;
|
|
18
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
export declare const presetDetailMap: {
|
|
3
|
-
today: {
|
|
4
|
-
getValue: () => dayjs.Dayjs;
|
|
5
|
-
label: () => any;
|
|
6
|
-
};
|
|
7
|
-
yesterday: {
|
|
8
|
-
getValue: () => dayjs.Dayjs;
|
|
9
|
-
label: () => any;
|
|
10
|
-
};
|
|
11
|
-
tomorrow: {
|
|
12
|
-
getValue: () => dayjs.Dayjs;
|
|
13
|
-
label: () => any;
|
|
14
|
-
};
|
|
15
|
-
next_monday: {
|
|
16
|
-
getValue: () => dayjs.Dayjs;
|
|
17
|
-
label: () => any;
|
|
18
|
-
};
|
|
19
|
-
last_friday: {
|
|
20
|
-
getValue: () => dayjs.Dayjs;
|
|
21
|
-
label: () => any;
|
|
22
|
-
};
|
|
23
|
-
first_day_of_this_month: {
|
|
24
|
-
getValue: () => dayjs.Dayjs;
|
|
25
|
-
label: () => any;
|
|
26
|
-
};
|
|
27
|
-
last_day_of_this_month: {
|
|
28
|
-
getValue: () => dayjs.Dayjs;
|
|
29
|
-
label: () => any;
|
|
30
|
-
};
|
|
31
|
-
first_day_of_next_month: {
|
|
32
|
-
getValue: () => dayjs.Dayjs;
|
|
33
|
-
label: () => any;
|
|
34
|
-
};
|
|
35
|
-
last_day_of_last_month: {
|
|
36
|
-
getValue: () => dayjs.Dayjs;
|
|
37
|
-
label: () => any;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
import { getText } from "../../locales";
|
|
3
|
-
export var presetDetailMap = {
|
|
4
|
-
today: {
|
|
5
|
-
getValue: function getValue() {
|
|
6
|
-
return dayjs().startOf('day');
|
|
7
|
-
},
|
|
8
|
-
label: function label() {
|
|
9
|
-
return getText('date-picker-today');
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
yesterday: {
|
|
13
|
-
getValue: function getValue() {
|
|
14
|
-
return dayjs().add(-1, 'd').startOf('day');
|
|
15
|
-
},
|
|
16
|
-
label: function label() {
|
|
17
|
-
return getText('date-picker-yesterday');
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
tomorrow: {
|
|
21
|
-
getValue: function getValue() {
|
|
22
|
-
return dayjs().add(1, 'd').startOf('day');
|
|
23
|
-
},
|
|
24
|
-
label: function label() {
|
|
25
|
-
return getText('date-picker-tomorrow');
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
next_monday: {
|
|
29
|
-
getValue: function getValue() {
|
|
30
|
-
return dayjs().startOf('week').add(8, 'day').startOf('day');
|
|
31
|
-
},
|
|
32
|
-
label: function label() {
|
|
33
|
-
return getText('date-picker-next_monday');
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
last_friday: {
|
|
37
|
-
getValue: function getValue() {
|
|
38
|
-
return dayjs().subtract(1, 'week').startOf('week').add(5, 'day').startOf('day');
|
|
39
|
-
},
|
|
40
|
-
label: function label() {
|
|
41
|
-
return getText('date-picker-last_friday');
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
first_day_of_this_month: {
|
|
45
|
-
getValue: function getValue() {
|
|
46
|
-
return dayjs().startOf('month').startOf('day');
|
|
47
|
-
},
|
|
48
|
-
label: function label() {
|
|
49
|
-
return getText('date-picker-first_day_of_this_month');
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
last_day_of_this_month: {
|
|
53
|
-
getValue: function getValue() {
|
|
54
|
-
return dayjs().endOf('month').startOf('day');
|
|
55
|
-
},
|
|
56
|
-
label: function label() {
|
|
57
|
-
return getText('date-picker-last_day_of_this_month');
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
first_day_of_next_month: {
|
|
61
|
-
getValue: function getValue() {
|
|
62
|
-
return dayjs().endOf('month').add(1, 'day').startOf('day');
|
|
63
|
-
},
|
|
64
|
-
label: function label() {
|
|
65
|
-
return getText('date-picker-first_day_of_next_month');
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
last_day_of_last_month: {
|
|
69
|
-
getValue: function getValue() {
|
|
70
|
-
return dayjs().startOf('month').subtract(1, 'day').startOf('day');
|
|
71
|
-
},
|
|
72
|
-
label: function label() {
|
|
73
|
-
return getText('date-picker-last_day_of_last_month');
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PickerDateProps } from 'antd/es/date-picker/generatePicker';
|
|
3
|
-
import { Dayjs } from 'dayjs';
|
|
4
|
-
import './index.less';
|
|
5
|
-
interface DatePickerCptProps extends PickerDateProps<Dayjs> {
|
|
6
|
-
}
|
|
7
|
-
declare const DatePickerCpt: (props: DatePickerCptProps) => React.JSX.Element;
|
|
8
|
-
export default DatePickerCpt;
|