@pisell/materials 1.0.813 → 1.0.815
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 +150 -150
- package/build/lowcode/render/default/view.js +27 -23
- package/build/lowcode/view.js +28 -24
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/colorPicker/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +12 -4
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/filter/components/items/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/es/components/filter/components/items/text/index.d.ts +1 -0
- package/es/components/productCard/components/Header/Actions/index.d.ts +1 -0
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/tableConfig/summary/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/colorPicker/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +15 -7
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/filter/components/items/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/index.d.ts +1 -0
- package/lib/components/productCard/components/Header/Actions/index.d.ts +1 -0
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/tableConfig/summary/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
|
|
|
5
5
|
className: string;
|
|
6
6
|
defaultCurrent: number;
|
|
7
7
|
showTotal: (total: number, range: [number, number]) => string;
|
|
8
|
-
itemRender: (page: number, type: "
|
|
8
|
+
itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
|
|
9
9
|
responsive: boolean;
|
|
10
10
|
size: string;
|
|
11
11
|
};
|
|
@@ -17,7 +17,7 @@ interface UseTablePropsProps {
|
|
|
17
17
|
* @returns
|
|
18
18
|
*/
|
|
19
19
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
20
|
-
title: number | boolean |
|
|
20
|
+
title: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
21
21
|
pagination: {
|
|
22
22
|
total: number;
|
|
23
23
|
current: number;
|
|
@@ -26,7 +26,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
26
26
|
showSizeChanger: boolean;
|
|
27
27
|
};
|
|
28
28
|
columns: import("./useColumns").Column[];
|
|
29
|
-
subTitle: number | boolean |
|
|
29
|
+
subTitle: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
30
30
|
buttons: any[] | null;
|
|
31
31
|
filter: JSX.Element | null;
|
|
32
32
|
onRow: (record: any) => any;
|
|
@@ -3,15 +3,23 @@ import classNames from 'classnames';
|
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import usePisellConfig from "../../../pisell-config-provider/hooks/usePisellConfig";
|
|
5
5
|
import "./ReadPretty.less";
|
|
6
|
-
var DEFAULT_FORMAT = 'YYYY
|
|
6
|
+
var DEFAULT_FORMAT = 'DD/MM/YYYY HH:mm';
|
|
7
7
|
var DATE_FORMATS = {
|
|
8
8
|
'zh-CN': {
|
|
9
|
-
withTime: 'YYYY-MM-DD HH:mm
|
|
9
|
+
withTime: 'YYYY-MM-DD HH:mm',
|
|
10
10
|
withoutTime: 'YYYY-MM-DD'
|
|
11
11
|
},
|
|
12
12
|
'en-US': {
|
|
13
|
-
withTime: 'HH:mm
|
|
14
|
-
withoutTime: '
|
|
13
|
+
withTime: 'MM/DD/YYYY HH:mm',
|
|
14
|
+
withoutTime: 'MM/DD/YYYY'
|
|
15
|
+
},
|
|
16
|
+
'en-AU': {
|
|
17
|
+
withTime: 'DD/MM/YYYY HH:mm',
|
|
18
|
+
withoutTime: 'DD/MM/YYYY'
|
|
19
|
+
},
|
|
20
|
+
en: {
|
|
21
|
+
withTime: 'DD/MM/YYYY HH:mm',
|
|
22
|
+
withoutTime: 'DD/MM/YYYY'
|
|
15
23
|
}
|
|
16
24
|
};
|
|
17
25
|
var DatePickerReadPretty = function DatePickerReadPretty(_ref) {
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
|
|
@@ -198,12 +198,12 @@ export declare const fieldList: ({
|
|
|
198
198
|
field_icon: string;
|
|
199
199
|
field_name: string;
|
|
200
200
|
field_type: string;
|
|
201
|
-
default_value:
|
|
201
|
+
default_value: string;
|
|
202
202
|
} | {
|
|
203
203
|
field_icon: string;
|
|
204
204
|
field_name: string;
|
|
205
205
|
field_type: string;
|
|
206
|
-
default_value:
|
|
206
|
+
default_value: boolean;
|
|
207
207
|
} | {
|
|
208
208
|
field_icon: string;
|
|
209
209
|
field_name: string;
|
|
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
167
167
|
sort?: SortType | undefined;
|
|
168
168
|
mode: "" | "localStorage" | "remote";
|
|
169
169
|
currentViewMode: ModeType;
|
|
170
|
-
}) => ("
|
|
170
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
171
171
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
172
172
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
173
173
|
export {};
|
|
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
|
|
|
5
5
|
className: string;
|
|
6
6
|
defaultCurrent: number;
|
|
7
7
|
showTotal: (total: number, range: [number, number]) => string;
|
|
8
|
-
itemRender: (page: number, type: "
|
|
8
|
+
itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
|
|
9
9
|
responsive: boolean;
|
|
10
10
|
size: string;
|
|
11
11
|
};
|
|
@@ -17,7 +17,7 @@ interface UseTablePropsProps {
|
|
|
17
17
|
* @returns
|
|
18
18
|
*/
|
|
19
19
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
20
|
-
title: number | boolean |
|
|
20
|
+
title: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
21
21
|
pagination: {
|
|
22
22
|
total: number;
|
|
23
23
|
current: number;
|
|
@@ -26,7 +26,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
26
26
|
showSizeChanger: boolean;
|
|
27
27
|
};
|
|
28
28
|
columns: import("./useColumns").Column[];
|
|
29
|
-
subTitle: number | boolean |
|
|
29
|
+
subTitle: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
30
30
|
buttons: any[] | null;
|
|
31
31
|
filter: JSX.Element | null;
|
|
32
32
|
onRow: (record: any) => any;
|
|
@@ -37,18 +37,24 @@ var import_classnames = __toESM(require("classnames"));
|
|
|
37
37
|
var import_dayjs = __toESM(require("dayjs"));
|
|
38
38
|
var import_usePisellConfig = __toESM(require("../../../pisell-config-provider/hooks/usePisellConfig"));
|
|
39
39
|
var import_ReadPretty = require("./ReadPretty.less");
|
|
40
|
-
var DEFAULT_FORMAT = "YYYY
|
|
40
|
+
var DEFAULT_FORMAT = "DD/MM/YYYY HH:mm";
|
|
41
41
|
var DATE_FORMATS = {
|
|
42
42
|
"zh-CN": {
|
|
43
|
-
withTime: "YYYY-MM-DD HH:mm
|
|
43
|
+
withTime: "YYYY-MM-DD HH:mm",
|
|
44
44
|
withoutTime: "YYYY-MM-DD"
|
|
45
45
|
},
|
|
46
46
|
"en-US": {
|
|
47
|
-
withTime: "HH:mm
|
|
48
|
-
withoutTime: "
|
|
49
|
-
}
|
|
47
|
+
withTime: "MM/DD/YYYY HH:mm",
|
|
48
|
+
withoutTime: "MM/DD/YYYY"
|
|
49
|
+
},
|
|
50
|
+
"en-AU": { withTime: "DD/MM/YYYY HH:mm", withoutTime: "DD/MM/YYYY" },
|
|
51
|
+
en: { withTime: "DD/MM/YYYY HH:mm", withoutTime: "DD/MM/YYYY" }
|
|
50
52
|
};
|
|
51
|
-
var DatePickerReadPretty = ({
|
|
53
|
+
var DatePickerReadPretty = ({
|
|
54
|
+
value,
|
|
55
|
+
renderMode,
|
|
56
|
+
showTime
|
|
57
|
+
}) => {
|
|
52
58
|
const { locale = "zh-CN" } = (0, import_usePisellConfig.default)();
|
|
53
59
|
const dateFormat = (0, import_react.useMemo)(() => {
|
|
54
60
|
if (locale in DATE_FORMATS) {
|
|
@@ -56,7 +62,9 @@ var DatePickerReadPretty = ({ value, renderMode, showTime }) => {
|
|
|
56
62
|
return showTime ? formats.withTime : formats.withoutTime;
|
|
57
63
|
}
|
|
58
64
|
if (process.env.NODE_ENV !== "production") {
|
|
59
|
-
console.warn(
|
|
65
|
+
console.warn(
|
|
66
|
+
`Unsupported locale: ${locale}, falling back to default format`
|
|
67
|
+
);
|
|
60
68
|
}
|
|
61
69
|
return DEFAULT_FORMAT;
|
|
62
70
|
}, [locale, showTime]);
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
|
|
@@ -198,12 +198,12 @@ export declare const fieldList: ({
|
|
|
198
198
|
field_icon: string;
|
|
199
199
|
field_name: string;
|
|
200
200
|
field_type: string;
|
|
201
|
-
default_value:
|
|
201
|
+
default_value: string;
|
|
202
202
|
} | {
|
|
203
203
|
field_icon: string;
|
|
204
204
|
field_name: string;
|
|
205
205
|
field_type: string;
|
|
206
|
-
default_value:
|
|
206
|
+
default_value: boolean;
|
|
207
207
|
} | {
|
|
208
208
|
field_icon: string;
|
|
209
209
|
field_name: string;
|
|
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
167
167
|
sort?: SortType | undefined;
|
|
168
168
|
mode: "" | "localStorage" | "remote";
|
|
169
169
|
currentViewMode: ModeType;
|
|
170
|
-
}) => ("
|
|
170
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
171
171
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
172
172
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
173
173
|
export {};
|