@pisell/materials 1.0.955 → 1.0.956
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 +169 -153
- package/build/lowcode/render/default/view.js +22 -17
- package/build/lowcode/view.js +32 -27
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +11 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +25 -3
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +10 -2
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +29 -7
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/package.json +3 -3
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean |
|
|
22
|
+
title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean |
|
|
31
|
+
subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -54,7 +54,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
54
54
|
width: number;
|
|
55
55
|
align: "center" | "left" | "right";
|
|
56
56
|
fixed: false | "left" | "right";
|
|
57
|
-
type: "
|
|
57
|
+
type: "link" | "button";
|
|
58
58
|
items: OperationItem[];
|
|
59
59
|
} | undefined;
|
|
60
60
|
operationContent?: {
|
|
@@ -82,7 +82,7 @@ export var useCountries = function useCountries() {
|
|
|
82
82
|
});
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
} else if (
|
|
85
|
+
} else if (isPc) {
|
|
86
86
|
var _appHelper$utils2;
|
|
87
87
|
var _codeList = appHelper === null || appHelper === void 0 || (_appHelper$utils2 = appHelper.utils) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.store) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.getState()) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.country) === null || _appHelper$utils2 === void 0 ? void 0 : _appHelper$utils2.country;
|
|
88
88
|
if (_codeList) {
|
|
@@ -92,6 +92,16 @@ export var useCountries = function useCountries() {
|
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
+
} else if (isH5) {
|
|
96
|
+
var _appHelper$utils3;
|
|
97
|
+
var _codeList2 = appHelper === null || appHelper === void 0 || (_appHelper$utils3 = appHelper.utils) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.getStore()) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.getState()) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.country) === null || _appHelper$utils3 === void 0 ? void 0 : _appHelper$utils3.country;
|
|
98
|
+
if (_codeList2) {
|
|
99
|
+
return _codeList2.map(function (item) {
|
|
100
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
101
|
+
prefix: "+".concat(item.calling_code)
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
95
105
|
}
|
|
96
106
|
return data;
|
|
97
107
|
}, [isShop, data]);
|
|
@@ -10,10 +10,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
10
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
11
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
12
12
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
13
|
-
import { useEffect, useMemo } from
|
|
13
|
+
import { useEffect, useMemo } from 'react';
|
|
14
14
|
import { useRequest } from 'ahooks';
|
|
15
15
|
import { request } from "../../../table/utils";
|
|
16
|
-
import { useIsShop } from "../../hooks/usePlatform";
|
|
16
|
+
import { useIsShop, useIsH5, useIsPc } from "../../hooks/usePlatform";
|
|
17
17
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -30,7 +30,7 @@ export var getCountryDataList = /*#__PURE__*/function () {
|
|
|
30
30
|
isNocobase: true,
|
|
31
31
|
fullResult: true,
|
|
32
32
|
headers: {
|
|
33
|
-
|
|
33
|
+
'x-data-source': 'pisell2'
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
case 2:
|
|
@@ -81,6 +81,8 @@ export var getShopCountryDataList = /*#__PURE__*/function () {
|
|
|
81
81
|
}();
|
|
82
82
|
export var useCountries = function useCountries() {
|
|
83
83
|
var isShop = useIsShop();
|
|
84
|
+
var isH5 = useIsH5();
|
|
85
|
+
var isPc = useIsPc();
|
|
84
86
|
var _useEngineContext = useEngineContext(),
|
|
85
87
|
appHelper = _useEngineContext.appHelper,
|
|
86
88
|
others = _objectWithoutProperties(_useEngineContext, _excluded);
|
|
@@ -124,6 +126,26 @@ export var useCountries = function useCountries() {
|
|
|
124
126
|
prefix: "+".concat(item.calling_code)
|
|
125
127
|
});
|
|
126
128
|
});
|
|
129
|
+
} else if (isPc) {
|
|
130
|
+
var _appHelper$utils3;
|
|
131
|
+
var codeList = appHelper === null || appHelper === void 0 || (_appHelper$utils3 = appHelper.utils) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.store) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.getState()) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.country) === null || _appHelper$utils3 === void 0 ? void 0 : _appHelper$utils3.country;
|
|
132
|
+
if (codeList) {
|
|
133
|
+
return codeList.map(function (item) {
|
|
134
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
135
|
+
prefix: "+".concat(item.calling_code)
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
} else if (isH5) {
|
|
140
|
+
var _appHelper$utils4;
|
|
141
|
+
var _codeList = appHelper === null || appHelper === void 0 || (_appHelper$utils4 = appHelper.utils) === null || _appHelper$utils4 === void 0 || (_appHelper$utils4 = _appHelper$utils4.getStore()) === null || _appHelper$utils4 === void 0 || (_appHelper$utils4 = _appHelper$utils4.getState()) === null || _appHelper$utils4 === void 0 || (_appHelper$utils4 = _appHelper$utils4.country) === null || _appHelper$utils4 === void 0 ? void 0 : _appHelper$utils4.country;
|
|
142
|
+
if (_codeList) {
|
|
143
|
+
return _codeList.map(function (item) {
|
|
144
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
145
|
+
prefix: "+".concat(item.calling_code)
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
}
|
|
127
149
|
}
|
|
128
150
|
return data;
|
|
129
151
|
}, [isShop, data, shopData]);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -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) => 1000 | 2000 | 4000 | 8000;
|
|
@@ -19,7 +19,7 @@ declare const formFieldMap: {
|
|
|
19
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
20
|
onChange: (value: string) => void;
|
|
21
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
23
23
|
customDomain?: string | undefined;
|
|
24
24
|
value?: string | undefined;
|
|
25
25
|
tenantId: string;
|
|
@@ -59,13 +59,7 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) =>
|
|
63
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
-
} & {
|
|
65
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
67
|
-
onChange: (value: string) => void;
|
|
68
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
|
|
69
63
|
JSON: import("react").FC<any>;
|
|
70
64
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
71
65
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -78,14 +72,18 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
78
72
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
79
73
|
onChange: (value: string) => void;
|
|
80
74
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
81
|
-
rootDomain: "custom" | "
|
|
75
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
82
76
|
customDomain?: string | undefined;
|
|
83
77
|
value?: string | undefined;
|
|
84
78
|
tenantId: string;
|
|
85
79
|
name?: string | undefined;
|
|
86
80
|
fieldKey?: string | undefined;
|
|
87
81
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
88
|
-
}) | import("react").FC<
|
|
82
|
+
}) | import("react").FC<any> | (import("react").FC<{}> & {
|
|
83
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
84
|
+
} & {
|
|
85
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
86
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
89
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
88
|
} & {
|
|
91
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -97,5 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
97
95
|
extraParams?: Record<string, any> | undefined;
|
|
98
96
|
} & {
|
|
99
97
|
dataSource?: any;
|
|
100
|
-
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./
|
|
98
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
99
|
+
onChange: (value: string) => void;
|
|
100
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -197,12 +197,12 @@ export declare const fieldList: ({
|
|
|
197
197
|
field_icon: string;
|
|
198
198
|
field_name: string;
|
|
199
199
|
field_type: string;
|
|
200
|
-
default_value:
|
|
200
|
+
default_value: boolean;
|
|
201
201
|
} | {
|
|
202
202
|
field_icon: string;
|
|
203
203
|
field_name: string;
|
|
204
204
|
field_type: string;
|
|
205
|
-
default_value:
|
|
205
|
+
default_value: string;
|
|
206
206
|
} | {
|
|
207
207
|
field_icon: string;
|
|
208
208
|
field_name: string;
|
|
@@ -161,7 +161,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
161
161
|
sort?: SortType | undefined;
|
|
162
162
|
mode: "" | "localStorage" | "remote";
|
|
163
163
|
currentViewMode: ModeType;
|
|
164
|
-
}) => ("filters" | "
|
|
164
|
+
}) => ("filters" | "view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting")[];
|
|
165
165
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
166
166
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
167
167
|
export {};
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean |
|
|
22
|
+
title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean |
|
|
31
|
+
subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -54,7 +54,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
54
54
|
width: number;
|
|
55
55
|
align: "center" | "left" | "right";
|
|
56
56
|
fixed: false | "left" | "right";
|
|
57
|
-
type: "
|
|
57
|
+
type: "link" | "button";
|
|
58
58
|
items: OperationItem[];
|
|
59
59
|
} | undefined;
|
|
60
60
|
operationContent?: {
|
|
@@ -75,7 +75,7 @@ var useCountries = () => {
|
|
|
75
75
|
}
|
|
76
76
|
}, [isShop]);
|
|
77
77
|
const currentData = (0, import_react.useMemo)(() => {
|
|
78
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
78
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
79
79
|
debugger;
|
|
80
80
|
if (isShop) {
|
|
81
81
|
const codeList = (_d = (_c = (_b = (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.store) == null ? void 0 : _b.getState()) == null ? void 0 : _c.global) == null ? void 0 : _d.codeList;
|
|
@@ -85,7 +85,7 @@ var useCountries = () => {
|
|
|
85
85
|
prefix: `+${item.calling_code}`
|
|
86
86
|
}));
|
|
87
87
|
}
|
|
88
|
-
} else if (
|
|
88
|
+
} else if (isPc) {
|
|
89
89
|
const codeList = (_h = (_g = (_f = (_e = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _e.store) == null ? void 0 : _f.getState()) == null ? void 0 : _g.country) == null ? void 0 : _h.country;
|
|
90
90
|
if (codeList) {
|
|
91
91
|
return codeList.map((item) => ({
|
|
@@ -93,6 +93,14 @@ var useCountries = () => {
|
|
|
93
93
|
prefix: `+${item.calling_code}`
|
|
94
94
|
}));
|
|
95
95
|
}
|
|
96
|
+
} else if (isH5) {
|
|
97
|
+
const codeList = (_l = (_k = (_j = (_i = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _i.getStore()) == null ? void 0 : _j.getState()) == null ? void 0 : _k.country) == null ? void 0 : _l.country;
|
|
98
|
+
if (codeList) {
|
|
99
|
+
return codeList.map((item) => ({
|
|
100
|
+
...item,
|
|
101
|
+
prefix: `+${item.calling_code}`
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
96
104
|
}
|
|
97
105
|
return data;
|
|
98
106
|
}, [isShop, data]);
|
|
@@ -40,13 +40,17 @@ var import_utils = require("../../../table/utils");
|
|
|
40
40
|
var import_usePlatform = require("../../hooks/usePlatform");
|
|
41
41
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
42
42
|
var getCountryDataList = async () => {
|
|
43
|
-
const { data } = await import_utils.request.getRequest().get(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
const { data } = await import_utils.request.getRequest().get(
|
|
44
|
+
`/country:list`,
|
|
45
|
+
{},
|
|
46
|
+
{
|
|
47
|
+
isNocobase: true,
|
|
48
|
+
fullResult: true,
|
|
49
|
+
headers: {
|
|
50
|
+
"x-data-source": "pisell2"
|
|
51
|
+
}
|
|
48
52
|
}
|
|
49
|
-
|
|
53
|
+
);
|
|
50
54
|
return data.map((item) => ({
|
|
51
55
|
...item,
|
|
52
56
|
prefix: `+${item.calling_code}`
|
|
@@ -61,6 +65,8 @@ var getShopCountryDataList = async (locale) => {
|
|
|
61
65
|
};
|
|
62
66
|
var useCountries = () => {
|
|
63
67
|
const isShop = (0, import_usePlatform.useIsShop)();
|
|
68
|
+
const isH5 = (0, import_usePlatform.useIsH5)();
|
|
69
|
+
const isPc = (0, import_usePlatform.useIsPc)();
|
|
64
70
|
const { appHelper, ...others } = (0, import_useEngineContext.default)();
|
|
65
71
|
const { data, run } = (0, import_ahooks.useRequest)(getCountryDataList, {
|
|
66
72
|
cacheKey: "phone-countries",
|
|
@@ -90,12 +96,28 @@ var useCountries = () => {
|
|
|
90
96
|
}
|
|
91
97
|
}, [isShop]);
|
|
92
98
|
const currentData = (0, import_react.useMemo)(() => {
|
|
93
|
-
var _a, _b, _c, _d;
|
|
99
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
94
100
|
if (isShop) {
|
|
95
101
|
return (((_d = (_c = (_b = (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.store) == null ? void 0 : _b.getState()) == null ? void 0 : _c.global) == null ? void 0 : _d.codeList) || shopData).map((item) => ({
|
|
96
102
|
...item,
|
|
97
103
|
prefix: `+${item.calling_code}`
|
|
98
104
|
}));
|
|
105
|
+
} else if (isPc) {
|
|
106
|
+
const codeList = (_h = (_g = (_f = (_e = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _e.store) == null ? void 0 : _f.getState()) == null ? void 0 : _g.country) == null ? void 0 : _h.country;
|
|
107
|
+
if (codeList) {
|
|
108
|
+
return codeList.map((item) => ({
|
|
109
|
+
...item,
|
|
110
|
+
prefix: `+${item.calling_code}`
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
} else if (isH5) {
|
|
114
|
+
const codeList = (_l = (_k = (_j = (_i = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _i.getStore()) == null ? void 0 : _j.getState()) == null ? void 0 : _k.country) == null ? void 0 : _l.country;
|
|
115
|
+
if (codeList) {
|
|
116
|
+
return codeList.map((item) => ({
|
|
117
|
+
...item,
|
|
118
|
+
prefix: `+${item.calling_code}`
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
99
121
|
}
|
|
100
122
|
return data;
|
|
101
123
|
}, [isShop, data, shopData]);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -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) => 1000 | 2000 | 4000 | 8000;
|
|
@@ -19,7 +19,7 @@ declare const formFieldMap: {
|
|
|
19
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
20
|
onChange: (value: string) => void;
|
|
21
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
23
23
|
customDomain?: string | undefined;
|
|
24
24
|
value?: string | undefined;
|
|
25
25
|
tenantId: string;
|
|
@@ -59,13 +59,7 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) =>
|
|
63
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
-
} & {
|
|
65
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
67
|
-
onChange: (value: string) => void;
|
|
68
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
|
|
69
63
|
JSON: import("react").FC<any>;
|
|
70
64
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
71
65
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -78,14 +72,18 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
78
72
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
79
73
|
onChange: (value: string) => void;
|
|
80
74
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
81
|
-
rootDomain: "custom" | "
|
|
75
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
82
76
|
customDomain?: string | undefined;
|
|
83
77
|
value?: string | undefined;
|
|
84
78
|
tenantId: string;
|
|
85
79
|
name?: string | undefined;
|
|
86
80
|
fieldKey?: string | undefined;
|
|
87
81
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
88
|
-
}) | import("react").FC<
|
|
82
|
+
}) | import("react").FC<any> | (import("react").FC<{}> & {
|
|
83
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
84
|
+
} & {
|
|
85
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
86
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
89
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
88
|
} & {
|
|
91
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -97,5 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
97
95
|
extraParams?: Record<string, any> | undefined;
|
|
98
96
|
} & {
|
|
99
97
|
dataSource?: any;
|
|
100
|
-
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./
|
|
98
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
99
|
+
onChange: (value: string) => void;
|
|
100
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -197,12 +197,12 @@ export declare const fieldList: ({
|
|
|
197
197
|
field_icon: string;
|
|
198
198
|
field_name: string;
|
|
199
199
|
field_type: string;
|
|
200
|
-
default_value:
|
|
200
|
+
default_value: boolean;
|
|
201
201
|
} | {
|
|
202
202
|
field_icon: string;
|
|
203
203
|
field_name: string;
|
|
204
204
|
field_type: string;
|
|
205
|
-
default_value:
|
|
205
|
+
default_value: string;
|
|
206
206
|
} | {
|
|
207
207
|
field_icon: string;
|
|
208
208
|
field_name: string;
|
|
@@ -161,7 +161,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
161
161
|
sort?: SortType | undefined;
|
|
162
162
|
mode: "" | "localStorage" | "remote";
|
|
163
163
|
currentViewMode: ModeType;
|
|
164
|
-
}) => ("filters" | "
|
|
164
|
+
}) => ("filters" | "view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting")[];
|
|
165
165
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
166
166
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
167
167
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.956",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"vod-js-sdk-v6": "^1.4.11",
|
|
77
77
|
"react-camera-pro": "1.4.0",
|
|
78
78
|
"@pisell/date-picker": "1.0.127",
|
|
79
|
-
"@pisell/
|
|
80
|
-
"@pisell/
|
|
79
|
+
"@pisell/icon": "0.0.10",
|
|
80
|
+
"@pisell/utils": "1.0.55"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"react": "^18.0.0",
|