@pisell/materials 1.0.925 → 1.0.926
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 +164 -148
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +31 -17
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +42 -28
- 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/batch-editor/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +10 -10
- package/es/components/filter/index.d.ts +0 -1
- package/es/components/list/index.d.ts +0 -1
- package/es/components/pisellCamera/index.js +11 -2
- package/es/components/pisellCamera/index.less +17 -6
- package/es/components/pisellToast/squareToast/methods.d.ts +5 -5
- package/es/components/pisellToast/squareToast/methods.js +12 -14
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +4 -6
- package/es/components/pisellToast/squareToast/renderImperatively.js +14 -16
- package/es/components/pisellToast/squareToast/toast.d.ts +5 -3
- package/es/components/pisellToast/squareToast/toast.js +10 -21
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -3
- package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/locales/zh-TW.js +8 -15
- package/lib/components/batch-editor/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +10 -10
- package/lib/components/filter/index.d.ts +0 -1
- package/lib/components/list/index.d.ts +0 -1
- package/lib/components/pisellCamera/index.js +5 -2
- package/lib/components/pisellCamera/index.less +17 -6
- package/lib/components/pisellToast/squareToast/methods.d.ts +5 -5
- package/lib/components/pisellToast/squareToast/methods.js +11 -13
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +4 -6
- package/lib/components/pisellToast/squareToast/renderImperatively.js +9 -9
- package/lib/components/pisellToast/squareToast/toast.d.ts +5 -3
- package/lib/components/pisellToast/squareToast/toast.js +6 -9
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -3
- package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/locales/zh-TW.js +4 -0
- package/package.json +3 -3
package/es/locales/zh-TW.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
var _tableFilterSearch$;
|
|
2
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
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); }
|
|
6
|
+
export default (_tableFilterSearch$ = {
|
|
2
7
|
'table-filter-search': '搜索',
|
|
3
8
|
'table-filter-clear': '清除',
|
|
4
9
|
'table-filter-filter': '篩選',
|
|
@@ -392,17 +397,5 @@ export default {
|
|
|
392
397
|
return "\u7B2C ".concat(current, " \u9801 \u5171 ").concat(total, " \u9801");
|
|
393
398
|
},
|
|
394
399
|
'pisell-list-pagination-previous': '上一頁',
|
|
395
|
-
'pisell-list-pagination-next': '下一頁'
|
|
396
|
-
|
|
397
|
-
'pisell-camera-no-camera-accessible': '沒有找到攝像頭',
|
|
398
|
-
'pisell-camera-permission-denied': '沒有權限使用攝像頭',
|
|
399
|
-
'pisell-camera-switch-camera': '切換攝像頭',
|
|
400
|
-
'pisell-camera-canvas': 'canvas不支持',
|
|
401
|
-
'pisell-camera-checking': '正在檢測攝像頭...',
|
|
402
|
-
'pisell-camera-no-camera-desc': '請檢查設備是否連接攝像頭或授權瀏覽器訪問攝像頭',
|
|
403
|
-
// 拍照组件
|
|
404
|
-
'pisell-upload-camera-local-files': '本地文件',
|
|
405
|
-
'pisell-upload-camera-capture': '拍攝/拍照',
|
|
406
|
-
'pisell-upload-camera-retake': '重拍',
|
|
407
|
-
'pisell-upload-camera-use': '使用照片'
|
|
408
|
-
};
|
|
400
|
+
'pisell-list-pagination-next': '下一頁'
|
|
401
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_tableFilterSearch$, "pisell2.text.goodpass.product-vouchers", '優惠促銷'), "pisell2.text.goodpass.last-settlement", '(上次結算)'), "pisell2.text.goodpass.view-more", '查看更多'), "pisell2.text.goodpass.save", '節省'), 'pisell-camera-no-camera-accessible', '沒有找到攝像頭'), 'pisell-camera-permission-denied', '沒有權限使用攝像頭'), 'pisell-camera-switch-camera', '切換攝像頭'), 'pisell-camera-canvas', 'canvas不支持'), 'pisell-camera-checking', '正在檢測攝像頭...'), 'pisell-camera-no-camera-desc', '請檢查設備是否連接攝像頭或授權瀏覽器訪問攝像頭'), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_tableFilterSearch$, 'pisell-upload-camera-local-files', '本地文件'), 'pisell-upload-camera-capture', '拍攝/拍照'), 'pisell-upload-camera-retake', '重拍'), 'pisell-upload-camera-use', '使用照片'));
|
|
@@ -43,7 +43,7 @@ export declare const withDataSource: <P extends unknown>(WrappedComponent: React
|
|
|
43
43
|
}) => JSX.Element;
|
|
44
44
|
export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
45
45
|
options?: any;
|
|
46
|
-
optionSourceType?: "
|
|
46
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
47
47
|
labelField: string;
|
|
48
48
|
valueField: string;
|
|
49
49
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -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;
|
|
@@ -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" | "saas" | "xzero";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
2
2
|
options?: any;
|
|
3
|
-
optionSourceType?: "
|
|
3
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
4
4
|
labelField: string;
|
|
5
5
|
valueField: string;
|
|
6
6
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -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" | "saas" | "xzero";
|
|
23
23
|
customDomain?: string | undefined;
|
|
24
24
|
value?: string | undefined;
|
|
25
25
|
tenantId: string;
|
|
@@ -34,7 +34,7 @@ declare const formFieldMap: {
|
|
|
34
34
|
};
|
|
35
35
|
FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
36
36
|
options?: any;
|
|
37
|
-
optionSourceType?: "
|
|
37
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
38
38
|
labelField: string;
|
|
39
39
|
valueField: string;
|
|
40
40
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -59,11 +59,13 @@ 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) => import("react").FC<
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
63
63
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
64
|
} & {
|
|
65
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> |
|
|
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> & {
|
|
67
69
|
JSON: import("react").FC<any>;
|
|
68
70
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
69
71
|
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>;
|
|
@@ -76,26 +78,24 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
76
78
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
77
79
|
onChange: (value: string) => void;
|
|
78
80
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
79
|
-
rootDomain: "custom" | "
|
|
81
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
80
82
|
customDomain?: string | undefined;
|
|
81
83
|
value?: string | undefined;
|
|
82
84
|
tenantId: string;
|
|
83
85
|
name?: string | undefined;
|
|
84
86
|
fieldKey?: string | undefined;
|
|
85
87
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
86
|
-
}) | (import("react").FC<{}> & {
|
|
88
|
+
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
87
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
90
|
} & {
|
|
89
91
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
92
|
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
91
93
|
options?: any;
|
|
92
|
-
optionSourceType?: "
|
|
94
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
93
95
|
labelField: string;
|
|
94
96
|
valueField: string;
|
|
95
97
|
extraParams?: Record<string, any> | undefined;
|
|
96
98
|
} & {
|
|
97
99
|
dataSource?: any;
|
|
98
|
-
}) => JSX.Element) | import("react").FC<
|
|
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>;
|
|
100
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | 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 };
|
|
@@ -34,6 +34,7 @@ __export(pisellCamera_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(pisellCamera_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_react_camera_pro = require("react-camera-pro");
|
|
37
|
+
var import_iconfont = __toESM(require("../iconfont"));
|
|
37
38
|
var import_locales = require("../../locales");
|
|
38
39
|
var import_pisellModal = __toESM(require("../../components/pisellModal"));
|
|
39
40
|
var import_index = require("./index.less");
|
|
@@ -155,6 +156,7 @@ var PisellCamera = (0, import_react.forwardRef)((props, ref) => {
|
|
|
155
156
|
import_react_camera_pro.Camera,
|
|
156
157
|
{
|
|
157
158
|
ref: cameraRef,
|
|
159
|
+
facingMode: "environment",
|
|
158
160
|
errorMessages: {
|
|
159
161
|
// noCameraAccessible: getText('pisell-camera-no-camera-accessible'),
|
|
160
162
|
// permissionDenied: getText('pisell-camera-permission-denied'),
|
|
@@ -183,13 +185,14 @@ var PisellCamera = (0, import_react.forwardRef)((props, ref) => {
|
|
|
183
185
|
), cameraAvailable === true && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-action" }, /* @__PURE__ */ import_react.default.createElement(
|
|
184
186
|
"div",
|
|
185
187
|
{
|
|
186
|
-
className: "pisell-camera-action-item",
|
|
188
|
+
className: "pisell-camera-action-item-wrap",
|
|
187
189
|
onClick: (e) => {
|
|
188
190
|
e.stopPropagation();
|
|
189
191
|
e.preventDefault();
|
|
190
192
|
takePhoto();
|
|
191
193
|
}
|
|
192
|
-
}
|
|
194
|
+
},
|
|
195
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-action-item" }, /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-camera-01", style: { fontSize: 32 } }))
|
|
193
196
|
)), photo && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-photo-container" }, /* @__PURE__ */ import_react.default.createElement("img", { src: photo, alt: "photo", className: "pisell-camera-photo" })), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-photo-img-action" }, /* @__PURE__ */ import_react.default.createElement(
|
|
194
197
|
"div",
|
|
195
198
|
{
|
|
@@ -17,14 +17,24 @@
|
|
|
17
17
|
align-items: center;
|
|
18
18
|
justify-content: center;
|
|
19
19
|
|
|
20
|
-
.pisell-camera-action-item {
|
|
21
|
-
width: 60px;
|
|
22
|
-
height: 60px;
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
border-radius: 60px;
|
|
20
|
+
.pisell-camera-action-item-wrap {
|
|
25
21
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
|
26
22
|
cursor: pointer;
|
|
23
|
+
padding: 6px;
|
|
24
|
+
border-radius: 50%;
|
|
25
|
+
border: 2px solid #fff;
|
|
26
|
+
|
|
27
|
+
.pisell-camera-action-item {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
width: 60px;
|
|
32
|
+
height: 60px;
|
|
33
|
+
background-color: #fff;
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
}
|
|
27
36
|
}
|
|
37
|
+
|
|
28
38
|
}
|
|
29
39
|
|
|
30
40
|
.pisell-camera-photo-container {
|
|
@@ -42,6 +52,7 @@
|
|
|
42
52
|
object-fit: cover;
|
|
43
53
|
}
|
|
44
54
|
}
|
|
55
|
+
|
|
45
56
|
.pisell-camera-photo-img-action {
|
|
46
57
|
position: absolute;
|
|
47
58
|
bottom: 0;
|
|
@@ -117,4 +128,4 @@
|
|
|
117
128
|
}
|
|
118
129
|
}
|
|
119
130
|
}
|
|
120
|
-
}
|
|
131
|
+
}
|
|
@@ -3,11 +3,11 @@ import { ToastProps } from './toast';
|
|
|
3
3
|
interface ToastInstance {
|
|
4
4
|
close: () => void;
|
|
5
5
|
}
|
|
6
|
-
declare const show: (configOrContent: Partial<ToastProps> | React.ReactNode, duration?: number,
|
|
6
|
+
declare const show: (configOrContent: Partial<ToastProps> | React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
|
|
7
7
|
declare const clear: () => void;
|
|
8
|
-
declare const success: (content: React.ReactNode, duration?: number,
|
|
9
|
-
declare const info: (content: React.ReactNode, duration?: number,
|
|
10
|
-
declare const loading: (content: React.ReactNode, duration?: number,
|
|
11
|
-
declare const fail: (content: React.ReactNode, duration?: number,
|
|
8
|
+
declare const success: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
|
|
9
|
+
declare const info: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
|
|
10
|
+
declare const loading: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
|
|
11
|
+
declare const fail: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
|
|
12
12
|
declare const hide: () => void;
|
|
13
13
|
export { show, clear, success, info, loading, fail, hide };
|
|
@@ -60,14 +60,14 @@ function mergeProps(a, b) {
|
|
|
60
60
|
...filteredB
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
var show = (configOrContent, duration,
|
|
63
|
+
var show = (configOrContent, duration, afterClose) => {
|
|
64
64
|
var _a;
|
|
65
65
|
let props;
|
|
66
66
|
if (typeof configOrContent === "string" || import_react.default.isValidElement(configOrContent)) {
|
|
67
67
|
props = mergeProps(defaultProps, {
|
|
68
68
|
content: configOrContent,
|
|
69
69
|
...duration !== void 0 && { duration },
|
|
70
|
-
...
|
|
70
|
+
...afterClose !== void 0 && { afterClose }
|
|
71
71
|
});
|
|
72
72
|
} else {
|
|
73
73
|
props = mergeProps(defaultProps, configOrContent || {});
|
|
@@ -76,10 +76,8 @@ var show = (configOrContent, duration, onClose) => {
|
|
|
76
76
|
import_toast.default,
|
|
77
77
|
{
|
|
78
78
|
...props,
|
|
79
|
-
|
|
80
|
-
var _a2;
|
|
79
|
+
onCancel: () => {
|
|
81
80
|
currentHandler = null;
|
|
82
|
-
(_a2 = props.onClose) == null ? void 0 : _a2.call(props);
|
|
83
81
|
}
|
|
84
82
|
}
|
|
85
83
|
);
|
|
@@ -125,17 +123,17 @@ var clear = () => {
|
|
|
125
123
|
currentTimeout = null;
|
|
126
124
|
}
|
|
127
125
|
};
|
|
128
|
-
var success = (content, duration,
|
|
129
|
-
return show({ content, icon: "success", duration,
|
|
126
|
+
var success = (content, duration, afterClose) => {
|
|
127
|
+
return show({ content, icon: "success", duration, afterClose });
|
|
130
128
|
};
|
|
131
|
-
var info = (content, duration,
|
|
132
|
-
return show({ content, icon: "info", duration,
|
|
129
|
+
var info = (content, duration, afterClose) => {
|
|
130
|
+
return show({ content, icon: "info", duration, afterClose });
|
|
133
131
|
};
|
|
134
|
-
var loading = (content, duration,
|
|
135
|
-
return show({ content, icon: "loading", duration,
|
|
132
|
+
var loading = (content, duration, afterClose) => {
|
|
133
|
+
return show({ content, icon: "loading", duration, afterClose });
|
|
136
134
|
};
|
|
137
|
-
var fail = (content, duration,
|
|
138
|
-
return show({ content, icon: "error", duration,
|
|
135
|
+
var fail = (content, duration, afterClose) => {
|
|
136
|
+
return show({ content, icon: "error", duration, afterClose });
|
|
139
137
|
};
|
|
140
138
|
var hide = () => {
|
|
141
139
|
clear();
|
|
@@ -2,8 +2,8 @@ import type { ReactElement } from 'react';
|
|
|
2
2
|
import type { Root } from 'react-dom/client';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
declare type ImperativeProps = {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
open?: boolean;
|
|
6
|
+
onCancel?: () => void;
|
|
7
7
|
afterClose?: () => void;
|
|
8
8
|
};
|
|
9
9
|
declare type TargetElement = ReactElement<ImperativeProps>;
|
|
@@ -14,16 +14,14 @@ export declare type ImperativeHandler = {
|
|
|
14
14
|
};
|
|
15
15
|
export declare type UnmountType = () => Promise<void>;
|
|
16
16
|
export declare type RenderType = (node: React.ReactElement, container: Element | DocumentFragment) => UnmountType;
|
|
17
|
-
declare const MARK = "
|
|
17
|
+
declare const MARK = "__pisell_react_root__";
|
|
18
18
|
declare type ContainerType = (Element | DocumentFragment) & {
|
|
19
19
|
[MARK]?: Root;
|
|
20
20
|
};
|
|
21
21
|
export declare function render(node: React.ReactElement, container: ContainerType): void;
|
|
22
22
|
export declare function unmount(container: ContainerType): Promise<void>;
|
|
23
23
|
/**
|
|
24
|
-
* @deprecated
|
|
25
|
-
* This is internal usage only compatible with React 19.
|
|
26
|
-
* And will be removed in next major version.
|
|
24
|
+
* @deprecated 设置 React 渲染函数以兼容使用。
|
|
27
25
|
*/
|
|
28
26
|
export declare function unstableSetRender(render?: RenderType): RenderType;
|
|
29
27
|
export declare function renderToBody(element: ReactElement): UnmountType;
|
|
@@ -39,7 +39,7 @@ module.exports = __toCommonJS(renderImperatively_exports);
|
|
|
39
39
|
var ReactDOM = __toESM(require("react-dom"));
|
|
40
40
|
var import_client = require("react-dom/client");
|
|
41
41
|
var import_react = __toESM(require("react"));
|
|
42
|
-
var MARK = "
|
|
42
|
+
var MARK = "__pisell_react_root__";
|
|
43
43
|
function render(node, container) {
|
|
44
44
|
const root = container[MARK] || (0, import_client.createRoot)(container);
|
|
45
45
|
root.render(node);
|
|
@@ -80,22 +80,22 @@ function renderToBody(element) {
|
|
|
80
80
|
}
|
|
81
81
|
function renderImperatively(element) {
|
|
82
82
|
const Wrapper = import_react.default.forwardRef((_, ref) => {
|
|
83
|
-
const [
|
|
83
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
84
84
|
const closedRef = (0, import_react.useRef)(false);
|
|
85
85
|
const [elementToRender, setElementToRender] = (0, import_react.useState)(element);
|
|
86
86
|
const keyRef = (0, import_react.useRef)(0);
|
|
87
87
|
(0, import_react.useEffect)(() => {
|
|
88
88
|
if (!closedRef.current) {
|
|
89
|
-
|
|
89
|
+
setOpen(true);
|
|
90
90
|
} else {
|
|
91
91
|
afterClose();
|
|
92
92
|
}
|
|
93
93
|
}, []);
|
|
94
|
-
function
|
|
94
|
+
function onCancel() {
|
|
95
95
|
var _a, _b;
|
|
96
96
|
closedRef.current = true;
|
|
97
|
-
|
|
98
|
-
(_b = (_a = elementToRender.props).
|
|
97
|
+
setOpen(false);
|
|
98
|
+
(_b = (_a = elementToRender.props).onCancel) == null ? void 0 : _b.call(_a);
|
|
99
99
|
}
|
|
100
100
|
function afterClose() {
|
|
101
101
|
var _a, _b;
|
|
@@ -103,7 +103,7 @@ function renderImperatively(element) {
|
|
|
103
103
|
(_b = (_a = elementToRender.props).afterClose) == null ? void 0 : _b.call(_a);
|
|
104
104
|
}
|
|
105
105
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
106
|
-
close:
|
|
106
|
+
close: onCancel,
|
|
107
107
|
replace: (element2) => {
|
|
108
108
|
var _a, _b;
|
|
109
109
|
keyRef.current++;
|
|
@@ -114,8 +114,8 @@ function renderImperatively(element) {
|
|
|
114
114
|
return import_react.default.cloneElement(elementToRender, {
|
|
115
115
|
...elementToRender.props,
|
|
116
116
|
key: keyRef.current,
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
open,
|
|
118
|
+
onCancel,
|
|
119
119
|
afterClose
|
|
120
120
|
});
|
|
121
121
|
});
|
|
@@ -7,11 +7,13 @@ export interface ToastProps {
|
|
|
7
7
|
/** 显示的内容,支持文本或 React 节点 */
|
|
8
8
|
content: React.ReactNode;
|
|
9
9
|
/** 是否显示 */
|
|
10
|
-
|
|
10
|
+
open?: boolean;
|
|
11
11
|
/** 自动关闭时间,单位毫秒,0 表示不自动关闭 */
|
|
12
12
|
duration?: number;
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/** 关闭 */
|
|
14
|
+
onCancel?: () => void;
|
|
15
|
+
/** 关闭后回调 */
|
|
16
|
+
afterClose?: () => void;
|
|
15
17
|
/** 自定义样式类名 */
|
|
16
18
|
className?: string;
|
|
17
19
|
/** 自定义样式 */
|
|
@@ -47,11 +47,10 @@ var icons = {
|
|
|
47
47
|
};
|
|
48
48
|
var Toast = ({
|
|
49
49
|
content,
|
|
50
|
-
|
|
50
|
+
open,
|
|
51
51
|
icon,
|
|
52
52
|
className,
|
|
53
|
-
|
|
54
|
-
style
|
|
53
|
+
...rest
|
|
55
54
|
}) => {
|
|
56
55
|
const iconElement = (0, import_react.useMemo)(() => {
|
|
57
56
|
if (icon === null || icon === void 0) return null;
|
|
@@ -70,21 +69,19 @@ var Toast = ({
|
|
|
70
69
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
71
70
|
import_modal.default,
|
|
72
71
|
{
|
|
73
|
-
open
|
|
72
|
+
open,
|
|
74
73
|
footer: null,
|
|
75
74
|
closable: false,
|
|
76
75
|
centered: true,
|
|
77
76
|
maskTransitionName: "",
|
|
78
77
|
transitionName: "",
|
|
79
|
-
|
|
78
|
+
width: "unset",
|
|
80
79
|
wrapClassName: "pisell-square-toast-wrap",
|
|
81
80
|
className: (0, import_classnames.default)("pisell-square-toast-modal", className),
|
|
82
|
-
width: "auto",
|
|
83
|
-
style: { textAlign: "center", ...style },
|
|
84
81
|
bodyStyle: { padding: 0 },
|
|
85
|
-
mask,
|
|
86
82
|
destroyOnClose: true,
|
|
87
|
-
modalRender: () => /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-square-toast` }, iconElement && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-square-toast-icon-wrapper" }, iconElement), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-square-toast-content" }, content))
|
|
83
|
+
modalRender: () => /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-square-toast` }, iconElement && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-square-toast-icon-wrapper" }, iconElement), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-square-toast-content" }, content)),
|
|
84
|
+
...rest
|
|
88
85
|
}
|
|
89
86
|
);
|
|
90
87
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const fieldMaps: {
|
|
3
2
|
text: {
|
|
4
3
|
field: {
|
|
@@ -198,12 +197,12 @@ export declare const fieldList: ({
|
|
|
198
197
|
field_icon: string;
|
|
199
198
|
field_name: string;
|
|
200
199
|
field_type: string;
|
|
201
|
-
default_value:
|
|
200
|
+
default_value: string;
|
|
202
201
|
} | {
|
|
203
202
|
field_icon: string;
|
|
204
203
|
field_name: string;
|
|
205
204
|
field_type: string;
|
|
206
|
-
default_value:
|
|
205
|
+
default_value: boolean;
|
|
207
206
|
} | {
|
|
208
207
|
field_icon: string;
|
|
209
208
|
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 {};
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -377,6 +377,10 @@ var zh_TW_default = {
|
|
|
377
377
|
"pisell-list-pagination-page-of": (current, total) => `第 ${current} 頁 共 ${total} 頁`,
|
|
378
378
|
"pisell-list-pagination-previous": "上一頁",
|
|
379
379
|
"pisell-list-pagination-next": "下一頁",
|
|
380
|
+
"pisell2.text.goodpass.product-vouchers": "優惠促銷",
|
|
381
|
+
"pisell2.text.goodpass.last-settlement": "(上次結算)",
|
|
382
|
+
"pisell2.text.goodpass.view-more": "查看更多",
|
|
383
|
+
"pisell2.text.goodpass.save": "節省",
|
|
380
384
|
// 相机组件
|
|
381
385
|
"pisell-camera-no-camera-accessible": "沒有找到攝像頭",
|
|
382
386
|
"pisell-camera-permission-denied": "沒有權限使用攝像頭",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.926",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -72,11 +72,11 @@
|
|
|
72
72
|
"react-window": "^1.8.10",
|
|
73
73
|
"styled-components": "^6.0.0-rc.3",
|
|
74
74
|
"swiper": "^8.4.7",
|
|
75
|
-
"vod-js-sdk-v6": "^1.4.11",
|
|
76
75
|
"antd-mobile": "^5.38.1",
|
|
76
|
+
"vod-js-sdk-v6": "^1.4.11",
|
|
77
77
|
"react-camera-pro": "1.4.0",
|
|
78
|
-
"@pisell/icon": "0.0.10",
|
|
79
78
|
"@pisell/date-picker": "1.0.126",
|
|
79
|
+
"@pisell/icon": "0.0.10",
|
|
80
80
|
"@pisell/utils": "1.0.54"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|