@pisell/materials 6.5.5 → 6.5.7
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 +7 -7
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +41 -26
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +45 -30
- package/es/components/batch-editor/index.d.ts +0 -1
- package/es/components/cardPro/index.js +10 -3
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +22 -11
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +199 -19
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.js +66 -0
- package/es/components/dataSourceComponents/fields/Upload/index.less +35 -3
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -12
- package/es/components/filter/index.d.ts +0 -1
- package/es/components/iconfont/index.js +1 -1
- package/es/components/list/index.d.ts +0 -1
- package/es/components/pisellCamera/index.d.ts +4 -0
- package/es/components/pisellCamera/index.js +228 -0
- package/es/components/pisellCamera/index.less +131 -0
- package/es/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
- package/es/components/pisellInput/components/BankCard/index.d.ts +1 -0
- package/es/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
- package/es/components/pisellInput/index.d.ts +1 -0
- package/es/components/pisellTooltip/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -1
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/index.d.ts +0 -1
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/es/components/table/Actions/index.d.ts +0 -1
- package/es/components/table/BasicTable/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- 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/tableConfig/SortRow/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +0 -1
- package/es/components/walletCard/index.d.ts +4 -0
- package/es/components/walletCard/index.js +29 -3
- package/es/components/walletCard/index.less +27 -0
- package/es/locales/en-US.js +94 -66
- package/es/locales/zh-CN.js +95 -67
- package/es/locales/zh-TW.js +95 -67
- package/lib/components/batch-editor/index.d.ts +0 -1
- package/lib/components/cardPro/index.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +9 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +168 -5
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.js +95 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.less +35 -3
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -12
- package/lib/components/filter/index.d.ts +0 -1
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/list/index.d.ts +0 -1
- package/lib/components/pisellCamera/index.d.ts +4 -0
- package/lib/components/pisellCamera/index.js +222 -0
- package/lib/components/pisellCamera/index.less +131 -0
- package/lib/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
- package/lib/components/pisellInput/components/BankCard/index.d.ts +1 -0
- package/lib/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
- package/lib/components/pisellInput/index.d.ts +1 -0
- package/lib/components/pisellTooltip/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -1
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/lib/components/table/Actions/index.d.ts +0 -1
- package/lib/components/table/BasicTable/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- 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/tableConfig/SortRow/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +0 -1
- package/lib/components/walletCard/index.d.ts +4 -0
- package/lib/components/walletCard/index.js +27 -3
- package/lib/components/walletCard/index.less +27 -0
- package/lib/locales/en-US.js +25 -1
- package/lib/locales/zh-CN.js +25 -1
- package/lib/locales/zh-TW.js +25 -1
- package/lowcode/auto-resize-text/meta.ts +35 -9419
- package/lowcode/data-source-table/meta.ts +119 -66
- package/lowcode/form-item-upload/meta.ts +20 -5
- package/lowcode/pisell-upload/meta.ts +8 -0
- package/lowcode/wallet-card/meta.ts +81 -63
- package/package.json +3 -2
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/es/components/auto-resize-text/index.d.ts +0 -6
- package/es/components/cardPro/index.d.ts +0 -4
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/keyboard/index.d.ts +0 -22
- package/es/components/pisell-config-provider/context.d.ts +0 -22
- package/es/components/pisell-config-provider/index.d.ts +0 -13
- package/es/components/pisellAdjustPrice/index.d.ts +0 -4
- package/es/components/pisellAdjustPrice/status.d.ts +0 -32
- package/es/components/pisellAdjustPrice/type.d.ts +0 -22
- package/es/components/pisellCheckboxGroup/index.d.ts +0 -40
- package/es/components/pisellQRScanner/index.d.ts +0 -24
- package/es/components/pisellText/components/Amount/index.d.ts +0 -20
- package/es/components/pisellToast/index.d.ts +0 -17
- package/es/components/pisellToast/squareToast/index.d.ts +0 -15
- package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/es/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/es/components/productCard/components/Action/index.d.ts +0 -3
- package/es/components/productCard/components/Header/index.d.ts +0 -3
- package/es/components/productCard/components/Sales/index.d.ts +0 -3
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
- package/es/components/productCard/locales.d.ts +0 -84
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -5
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -25
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/index.d.ts +0 -5
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/es/components/virtual-keyboard/index.d.ts +0 -25
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
- package/es/components/virtualInput/index.d.ts +0 -24
- package/es/locales/en-US.d.ts +0 -286
- package/es/locales/zh-CN.d.ts +0 -281
- package/es/locales/zh-TW.d.ts +0 -281
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/lib/components/auto-resize-text/index.d.ts +0 -6
- package/lib/components/cardPro/index.d.ts +0 -4
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/keyboard/index.d.ts +0 -22
- package/lib/components/pisell-config-provider/context.d.ts +0 -22
- package/lib/components/pisell-config-provider/index.d.ts +0 -13
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -4
- package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
- package/lib/components/pisellCheckboxGroup/index.d.ts +0 -40
- package/lib/components/pisellQRScanner/index.d.ts +0 -24
- package/lib/components/pisellText/components/Amount/index.d.ts +0 -20
- package/lib/components/pisellToast/index.d.ts +0 -17
- package/lib/components/pisellToast/squareToast/index.d.ts +0 -15
- package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/lib/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/lib/components/productCard/components/Action/index.d.ts +0 -3
- package/lib/components/productCard/components/Header/index.d.ts +0 -3
- package/lib/components/productCard/components/Sales/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
- package/lib/components/productCard/locales.d.ts +0 -84
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -5
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -25
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/index.d.ts +0 -5
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/lib/components/virtual-keyboard/index.d.ts +0 -25
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
- package/lib/components/virtualInput/index.d.ts +0 -24
- package/lib/locales/en-US.d.ts +0 -286
- package/lib/locales/zh-CN.d.ts +0 -281
- package/lib/locales/zh-TW.d.ts +0 -281
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/dataSourceComponents/fields/Upload/CameraPopover.tsx
|
|
30
|
+
var CameraPopover_exports = {};
|
|
31
|
+
__export(CameraPopover_exports, {
|
|
32
|
+
default: () => CameraPopover_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(CameraPopover_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_locales = require("../../../../locales");
|
|
38
|
+
var import_pisellCamera = __toESM(require("../../../pisellCamera"));
|
|
39
|
+
var CameraPopover = (props) => {
|
|
40
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
41
|
+
const cameraRef = (0, import_react.useRef)(null);
|
|
42
|
+
const handleOpenChange = (newOpen) => {
|
|
43
|
+
setOpen(newOpen);
|
|
44
|
+
};
|
|
45
|
+
const onClick = (e, type) => {
|
|
46
|
+
var _a;
|
|
47
|
+
e.stopPropagation();
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
if (type === "upload") {
|
|
50
|
+
console.log("本地文件");
|
|
51
|
+
props.onLocalFileClick();
|
|
52
|
+
} else {
|
|
53
|
+
console.log("拍照");
|
|
54
|
+
(_a = cameraRef.current) == null ? void 0 : _a.open();
|
|
55
|
+
}
|
|
56
|
+
handleOpenChange(false);
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-upload-camera-popover" }, /* @__PURE__ */ import_react.default.createElement(
|
|
59
|
+
import_antd.Popover,
|
|
60
|
+
{
|
|
61
|
+
open,
|
|
62
|
+
onOpenChange: handleOpenChange,
|
|
63
|
+
trigger: "click",
|
|
64
|
+
arrow: false,
|
|
65
|
+
content: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-upload-camera-popover-content" }, /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: "pisell-lowcode-upload-camera-popover-content-item",
|
|
69
|
+
onClick: (e) => onClick(e, "upload")
|
|
70
|
+
},
|
|
71
|
+
(0, import_locales.getText)("pisell-upload-camera-local-files")
|
|
72
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: "pisell-lowcode-upload-camera-popover-content-item",
|
|
76
|
+
onClick: (e) => onClick(e, "photo")
|
|
77
|
+
},
|
|
78
|
+
(0, import_locales.getText)("pisell-upload-camera-capture")
|
|
79
|
+
)),
|
|
80
|
+
destroyTooltipOnHide: true
|
|
81
|
+
},
|
|
82
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
className: "pisell-lowcode-upload-camera-wrapper",
|
|
86
|
+
onClick: (e) => {
|
|
87
|
+
e.stopPropagation();
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
handleOpenChange(true);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
), /* @__PURE__ */ import_react.default.createElement(import_pisellCamera.default, { ref: cameraRef, onChange: props.onCameraChange }));
|
|
94
|
+
};
|
|
95
|
+
var CameraPopover_default = CameraPopover;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
right: 6px;
|
|
17
17
|
bottom: 6px;
|
|
18
18
|
cursor: pointer;
|
|
19
|
-
color: #
|
|
19
|
+
color: #98a2b3;
|
|
20
20
|
font-size: 20px;
|
|
21
21
|
&:hover {
|
|
22
22
|
transition: color 0.3s;
|
|
@@ -78,5 +78,37 @@
|
|
|
78
78
|
z-index: 1201 !important;
|
|
79
79
|
}
|
|
80
80
|
.pisell-lowcode-image-preview-operations-wrapper {
|
|
81
|
-
z-index: 1202!important;
|
|
82
|
-
}
|
|
81
|
+
z-index: 1202 !important;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.pisell-lowcode-upload-camera-popover {
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
right: 0;
|
|
89
|
+
bottom: 0;
|
|
90
|
+
background-color: transparent;
|
|
91
|
+
|
|
92
|
+
.pisell-lowcode-upload-camera-wrapper {
|
|
93
|
+
height: 100%;
|
|
94
|
+
width: 100%;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.pisell-lowcode-upload-camera-popover-content {
|
|
99
|
+
margin: -12px;
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
width: 200px;
|
|
103
|
+
border-radius: 10px;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
|
|
106
|
+
.pisell-lowcode-upload-camera-popover-content-item {
|
|
107
|
+
padding: 10px 12px;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
|
|
110
|
+
&:hover {
|
|
111
|
+
background-color: #f0f0f0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const formFieldMap: {
|
|
3
2
|
FormItemCheckbox: import("react").FC<{}> & {
|
|
4
3
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -20,7 +19,7 @@ declare const formFieldMap: {
|
|
|
20
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
21
20
|
onChange: (value: string) => void;
|
|
22
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
23
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
24
23
|
customDomain?: string | undefined;
|
|
25
24
|
value?: string | undefined;
|
|
26
25
|
tenantId: string;
|
|
@@ -60,13 +59,7 @@ declare const formFieldMap: {
|
|
|
60
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
62
61
|
};
|
|
63
|
-
declare const getFieldComponent: (fieldComponent: string) =>
|
|
64
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
65
|
-
} & {
|
|
66
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
67
|
-
}) | 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 & {
|
|
68
|
-
onChange: (value: string) => void;
|
|
69
|
-
} & 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> & {
|
|
70
63
|
JSON: import("react").FC<any>;
|
|
71
64
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
72
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>;
|
|
@@ -79,14 +72,18 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
79
72
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
80
73
|
onChange: (value: string) => void;
|
|
81
74
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
82
|
-
rootDomain: "custom" | "
|
|
75
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
83
76
|
customDomain?: string | undefined;
|
|
84
77
|
value?: string | undefined;
|
|
85
78
|
tenantId: string;
|
|
86
79
|
name?: string | undefined;
|
|
87
80
|
fieldKey?: string | undefined;
|
|
88
81
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
89
|
-
}) |
|
|
82
|
+
}) | (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<{}> & {
|
|
90
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
91
88
|
} & {
|
|
92
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -98,5 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
98
95
|
extraParams?: Record<string, any> | undefined;
|
|
99
96
|
} & {
|
|
100
97
|
dataSource?: any;
|
|
101
|
-
}) => JSX.Element) | import("react").FC<
|
|
98
|
+
}) => JSX.Element) | import("react").FC<any> | 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>;
|
|
102
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(iconfont_exports);
|
|
|
35
35
|
var import_icons = require("@ant-design/icons");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var MyIcon = (0, import_icons.createFromIconfontCN)({
|
|
38
|
-
scriptUrl: "https://static.pisellcdn.com/pisell2iconfont1.
|
|
38
|
+
scriptUrl: "https://static.pisellcdn.com/pisell2iconfont1.16.js"
|
|
39
39
|
// 在 iconfont.cn 上生成
|
|
40
40
|
});
|
|
41
41
|
var IconFont = (props) => {
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellCamera/index.tsx
|
|
30
|
+
var pisellCamera_exports = {};
|
|
31
|
+
__export(pisellCamera_exports, {
|
|
32
|
+
default: () => pisellCamera_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellCamera_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_react_camera_pro = require("react-camera-pro");
|
|
37
|
+
var import_iconfont = __toESM(require("../iconfont"));
|
|
38
|
+
var import_locales = require("../../locales");
|
|
39
|
+
var import_pisellModal = __toESM(require("../../components/pisellModal"));
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var PisellCamera = (0, import_react.forwardRef)((props, ref) => {
|
|
42
|
+
const cameraRef = (0, import_react.useRef)(null);
|
|
43
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
44
|
+
const [photo, setPhoto] = (0, import_react.useState)("");
|
|
45
|
+
const [cameraAvailable, setCameraAvailable] = (0, import_react.useState)(null);
|
|
46
|
+
const uploadFileRef = (0, import_react.useRef)(null);
|
|
47
|
+
const base64ToFile = (base64String, filename) => {
|
|
48
|
+
var _a;
|
|
49
|
+
const arr = base64String.split(",");
|
|
50
|
+
const mime = ((_a = arr[0].match(/:(.*?);/)) == null ? void 0 : _a[1]) || "";
|
|
51
|
+
const bstr = atob(arr[1]);
|
|
52
|
+
let n = bstr.length;
|
|
53
|
+
const u8arr = new Uint8Array(n);
|
|
54
|
+
while (n--) {
|
|
55
|
+
u8arr[n] = bstr.charCodeAt(n);
|
|
56
|
+
}
|
|
57
|
+
return new File([u8arr], filename, { type: mime });
|
|
58
|
+
};
|
|
59
|
+
const takePhoto = () => {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
if (!cameraRef.current || !cameraRef.current.takePhoto) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
const photo2 = (_b = (_a = cameraRef.current) == null ? void 0 : _a.takePhoto) == null ? void 0 : _b.call(_a);
|
|
66
|
+
const timestamp = Date.now();
|
|
67
|
+
const filename = `photo-${timestamp}.jpg`;
|
|
68
|
+
setPhoto(photo2);
|
|
69
|
+
const file = base64ToFile(photo2, filename);
|
|
70
|
+
const uploadFile = {
|
|
71
|
+
uid: timestamp.toString(),
|
|
72
|
+
name: filename,
|
|
73
|
+
status: "uploading",
|
|
74
|
+
url: photo2,
|
|
75
|
+
// 用于预览
|
|
76
|
+
originFileObj: file,
|
|
77
|
+
// 原始文件对象,用于上传
|
|
78
|
+
thumbUrl: photo2,
|
|
79
|
+
lastModified: Date.now(),
|
|
80
|
+
lastModifiedDate: /* @__PURE__ */ new Date(),
|
|
81
|
+
type: "image/jpeg",
|
|
82
|
+
size: file.size
|
|
83
|
+
};
|
|
84
|
+
console.log("takePhoto_uploadFile", uploadFile);
|
|
85
|
+
uploadFileRef.current = uploadFile;
|
|
86
|
+
return uploadFile;
|
|
87
|
+
} catch (error) {
|
|
88
|
+
console.error("takePhoto_error", error);
|
|
89
|
+
uploadFileRef.current = null;
|
|
90
|
+
setPhoto("");
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const onOpen = () => {
|
|
95
|
+
setCameraAvailable(null);
|
|
96
|
+
setPhoto("");
|
|
97
|
+
uploadFileRef.current = null;
|
|
98
|
+
setOpen(true);
|
|
99
|
+
};
|
|
100
|
+
const onClose = () => {
|
|
101
|
+
cameraRef.current = null;
|
|
102
|
+
uploadFileRef.current = null;
|
|
103
|
+
setOpen(false);
|
|
104
|
+
setPhoto("");
|
|
105
|
+
setCameraAvailable(null);
|
|
106
|
+
};
|
|
107
|
+
const onRetakePhoto = () => {
|
|
108
|
+
setPhoto("");
|
|
109
|
+
};
|
|
110
|
+
const onUsePhoto = () => {
|
|
111
|
+
var _a;
|
|
112
|
+
(_a = props == null ? void 0 : props.onChange) == null ? void 0 : _a.call(props, uploadFileRef.current);
|
|
113
|
+
onClose();
|
|
114
|
+
};
|
|
115
|
+
(0, import_react.useImperativeHandle)(ref, () => {
|
|
116
|
+
return {
|
|
117
|
+
open: onOpen,
|
|
118
|
+
takePhoto,
|
|
119
|
+
isCameraAvailable: () => cameraAvailable
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
console.log("cameraAvailable", cameraAvailable);
|
|
123
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
124
|
+
import_pisellModal.default,
|
|
125
|
+
{
|
|
126
|
+
open,
|
|
127
|
+
onCancel: (e) => {
|
|
128
|
+
e.stopPropagation();
|
|
129
|
+
e.preventDefault();
|
|
130
|
+
onClose();
|
|
131
|
+
},
|
|
132
|
+
header: false,
|
|
133
|
+
footer: null,
|
|
134
|
+
destroyOnClose: true,
|
|
135
|
+
bodyStyle: { padding: 0 },
|
|
136
|
+
width: "90vw",
|
|
137
|
+
className: "pisell-camera-modal"
|
|
138
|
+
},
|
|
139
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
140
|
+
"div",
|
|
141
|
+
{
|
|
142
|
+
className: "pisell-camera-container",
|
|
143
|
+
onClick: (e) => {
|
|
144
|
+
e.stopPropagation();
|
|
145
|
+
e.preventDefault();
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
cameraAvailable === null ? (
|
|
149
|
+
// 检测中
|
|
150
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-loading" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-loading-text" }, (0, import_locales.getText)("pisell-camera-checking")))
|
|
151
|
+
) : cameraAvailable === false ? (
|
|
152
|
+
// 无摄像头
|
|
153
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-no-camera" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-no-camera-icon" }, "📷"), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-no-camera-text" }, (0, import_locales.getText)("pisell-camera-no-camera-accessible")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-no-camera-desc" }, (0, import_locales.getText)("pisell-camera-no-camera-desc")))
|
|
154
|
+
) : null,
|
|
155
|
+
/* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
156
|
+
import_react_camera_pro.Camera,
|
|
157
|
+
{
|
|
158
|
+
ref: cameraRef,
|
|
159
|
+
facingMode: "environment",
|
|
160
|
+
errorMessages: {
|
|
161
|
+
// noCameraAccessible: getText('pisell-camera-no-camera-accessible'),
|
|
162
|
+
// permissionDenied: getText('pisell-camera-permission-denied'),
|
|
163
|
+
// switchCamera: getText('pisell-camera-switch-camera'),
|
|
164
|
+
// canvas: getText('pisell-camera-canvas'),
|
|
165
|
+
},
|
|
166
|
+
numberOfCamerasCallback: (numberOfCameras) => {
|
|
167
|
+
console.log("numberOfCameras", numberOfCameras);
|
|
168
|
+
if (!cameraRef.current) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (numberOfCameras <= 0) {
|
|
172
|
+
setTimeout(() => {
|
|
173
|
+
setCameraAvailable((pre) => {
|
|
174
|
+
if (pre === true) {
|
|
175
|
+
return true;
|
|
176
|
+
}
|
|
177
|
+
return false;
|
|
178
|
+
});
|
|
179
|
+
}, 5e3);
|
|
180
|
+
} else {
|
|
181
|
+
setCameraAvailable(true);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
), cameraAvailable === true && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-camera-action" }, /* @__PURE__ */ import_react.default.createElement(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
className: "pisell-camera-action-item-wrap",
|
|
189
|
+
onClick: (e) => {
|
|
190
|
+
e.stopPropagation();
|
|
191
|
+
e.preventDefault();
|
|
192
|
+
takePhoto();
|
|
193
|
+
}
|
|
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 } }))
|
|
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(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
className: "pisell-camera-photo-img-action-item",
|
|
200
|
+
onClick: (e) => {
|
|
201
|
+
e.stopPropagation();
|
|
202
|
+
e.preventDefault();
|
|
203
|
+
onRetakePhoto();
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
(0, import_locales.getText)("pisell-upload-camera-retake")
|
|
207
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
208
|
+
"div",
|
|
209
|
+
{
|
|
210
|
+
className: "pisell-camera-photo-img-action-item",
|
|
211
|
+
onClick: (e) => {
|
|
212
|
+
e.stopPropagation();
|
|
213
|
+
e.preventDefault();
|
|
214
|
+
onUsePhoto();
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
(0, import_locales.getText)("pisell-upload-camera-use")
|
|
218
|
+
))))
|
|
219
|
+
)
|
|
220
|
+
);
|
|
221
|
+
});
|
|
222
|
+
var pisellCamera_default = PisellCamera;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
.pisell-camera-modal {
|
|
2
|
+
.pisell-camera-container {
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 90vh;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
|
|
10
|
+
.pisell-camera-action {
|
|
11
|
+
position: absolute;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
right: 0;
|
|
15
|
+
height: 100px;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
|
|
20
|
+
.pisell-camera-action-item-wrap {
|
|
21
|
+
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
|
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
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pisell-camera-photo-container {
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 0;
|
|
43
|
+
left: 0;
|
|
44
|
+
right: 0;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
|
|
49
|
+
.pisell-camera-photo {
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
object-fit: cover;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.pisell-camera-photo-img-action {
|
|
57
|
+
position: absolute;
|
|
58
|
+
bottom: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
right: 0;
|
|
61
|
+
height: 100px;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: row;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
67
|
+
|
|
68
|
+
.pisell-camera-photo-img-action-item {
|
|
69
|
+
padding: 20px 60px;
|
|
70
|
+
font-size: 20px;
|
|
71
|
+
color: #fff;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.pisell-camera-loading {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: 0;
|
|
79
|
+
left: 0;
|
|
80
|
+
right: 0;
|
|
81
|
+
bottom: 0;
|
|
82
|
+
background-color: transparent;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
|
|
87
|
+
.pisell-camera-loading-text {
|
|
88
|
+
font-size: 18px;
|
|
89
|
+
color: #666;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.pisell-camera-no-camera {
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 0;
|
|
96
|
+
left: 0;
|
|
97
|
+
right: 0;
|
|
98
|
+
bottom: 0;
|
|
99
|
+
background-color: #ffffff;
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
align-items: center;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
width: 100%;
|
|
105
|
+
height: 100%;
|
|
106
|
+
background-color: #f5f5f5;
|
|
107
|
+
padding: 40px;
|
|
108
|
+
text-align: center;
|
|
109
|
+
|
|
110
|
+
.pisell-camera-no-camera-icon {
|
|
111
|
+
font-size: 64px;
|
|
112
|
+
margin-bottom: 20px;
|
|
113
|
+
opacity: 0.6;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.pisell-camera-no-camera-text {
|
|
117
|
+
font-size: 20px;
|
|
118
|
+
color: #333;
|
|
119
|
+
margin-bottom: 12px;
|
|
120
|
+
font-weight: 500;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.pisell-camera-no-camera-desc {
|
|
124
|
+
font-size: 14px;
|
|
125
|
+
color: #666;
|
|
126
|
+
line-height: 1.5;
|
|
127
|
+
max-width: 300px;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|