@pisell/materials 6.3.6 → 6.3.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.
Files changed (186) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +7 -7
  6. package/build/lowcode/preview.js +150 -150
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +39 -28
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +45 -34
  11. package/es/components/colorPicker/index.d.ts +0 -1
  12. package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
  13. package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +11 -4
  14. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -1
  15. package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
  16. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  17. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +2 -3
  18. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +10 -11
  19. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +11 -4
  20. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +2 -2
  21. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +92 -6
  22. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +5 -0
  23. package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +1 -0
  24. package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +1 -0
  25. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  26. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +199 -19
  27. package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +6 -0
  28. package/es/components/dataSourceComponents/fields/Upload/CameraPopover.js +66 -0
  29. package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
  30. package/es/components/dataSourceComponents/fields/Upload/index.less +35 -3
  31. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
  32. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  33. package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
  34. package/es/components/date-picker/datePickerCpt.d.ts +1 -0
  35. package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -1
  36. package/es/components/filter/components/items/index.d.ts +0 -1
  37. package/es/components/filter/components/items/text/Editor/index.d.ts +0 -1
  38. package/es/components/filter/components/items/text/Preview/index.d.ts +0 -1
  39. package/es/components/filter/components/items/text/index.d.ts +0 -1
  40. package/es/components/filter/index.d.ts +0 -1
  41. package/es/components/filter/types.d.ts +1 -0
  42. package/es/components/list/index.d.ts +1 -0
  43. package/es/components/lowCodePage/index.d.ts +1 -0
  44. package/es/components/page/index.d.ts +1 -0
  45. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  46. package/es/components/pisellCamera/index.d.ts +4 -0
  47. package/es/components/pisellCamera/index.js +228 -0
  48. package/es/components/pisellCamera/index.less +131 -0
  49. package/es/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
  50. package/es/components/pisellInput/components/BankCard/index.d.ts +1 -0
  51. package/es/components/pisellInput/components/Copy/index.d.ts +1 -0
  52. package/es/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
  53. package/es/components/pisellInput/index.d.ts +1 -0
  54. package/es/components/pisellTooltip/index.d.ts +1 -0
  55. package/es/components/productCard/components/Action/index.d.ts +1 -0
  56. package/es/components/productCard/components/AmountFooter/index.d.ts +1 -0
  57. package/es/components/productCard/components/Header/EditButton/index.d.ts +1 -0
  58. package/es/components/productCard/components/Header/index.d.ts +1 -0
  59. package/es/components/productCard/components/Note/index.d.ts +1 -0
  60. package/es/components/productCard/components/Packages/index.d.ts +1 -0
  61. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  62. package/es/components/productCard/components/Sales/index.d.ts +1 -0
  63. package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +1 -0
  64. package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +1 -0
  65. package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +1 -0
  66. package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +1 -0
  67. package/es/components/qrcode/index.d.ts +1 -0
  68. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
  69. package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
  70. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
  71. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
  72. package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
  73. package/es/components/table/Actions/component/Group/index.d.ts +0 -1
  74. package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -1
  75. package/es/components/table/Actions/index.d.ts +0 -1
  76. package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
  77. package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +1 -0
  78. package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
  79. package/es/components/table/Table/SelectField/index.d.ts +0 -1
  80. package/es/components/table/Table/fields/date/Show/index.d.ts +1 -0
  81. package/es/components/table/Table/fields/link/Show/index.d.ts +1 -0
  82. package/es/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  83. package/es/components/table/Table/utils.d.ts +1 -1
  84. package/es/components/table/Table/utils.js +22 -1
  85. package/es/components/table/View/index.d.ts +0 -1
  86. package/es/components/table/hooks/useTableSetting.d.ts +3 -4
  87. package/es/components/table/hooks/useTableSetting.js +113 -5
  88. package/es/components/table/index.js +14 -3
  89. package/es/components/table/types.d.ts +17 -0
  90. package/es/locales/en-US.d.ts +10 -0
  91. package/es/locales/en-US.js +13 -1
  92. package/es/locales/zh-CN.d.ts +10 -0
  93. package/es/locales/zh-CN.js +13 -1
  94. package/es/locales/zh-TW.d.ts +10 -0
  95. package/es/locales/zh-TW.js +13 -1
  96. package/es/utils/platform.d.ts +1 -1
  97. package/lib/components/colorPicker/index.d.ts +0 -1
  98. package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
  99. package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +8 -2
  100. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -1
  101. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
  102. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  103. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +2 -3
  104. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +10 -11
  105. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +11 -4
  106. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +2 -2
  107. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +78 -7
  108. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +5 -0
  109. package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +1 -0
  110. package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +1 -0
  111. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  112. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +168 -5
  113. package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +6 -0
  114. package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.js +95 -0
  115. package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
  116. package/lib/components/dataSourceComponents/fields/Upload/index.less +35 -3
  117. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
  118. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  119. package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
  120. package/lib/components/date-picker/datePickerCpt.d.ts +1 -0
  121. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -1
  122. package/lib/components/filter/components/items/index.d.ts +0 -1
  123. package/lib/components/filter/components/items/text/Editor/index.d.ts +0 -1
  124. package/lib/components/filter/components/items/text/Preview/index.d.ts +0 -1
  125. package/lib/components/filter/components/items/text/index.d.ts +0 -1
  126. package/lib/components/filter/index.d.ts +0 -1
  127. package/lib/components/filter/types.d.ts +1 -0
  128. package/lib/components/list/index.d.ts +1 -0
  129. package/lib/components/lowCodePage/index.d.ts +1 -0
  130. package/lib/components/page/index.d.ts +1 -0
  131. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  132. package/lib/components/pisellCamera/index.d.ts +4 -0
  133. package/lib/components/pisellCamera/index.js +222 -0
  134. package/lib/components/pisellCamera/index.less +131 -0
  135. package/lib/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
  136. package/lib/components/pisellInput/components/BankCard/index.d.ts +1 -0
  137. package/lib/components/pisellInput/components/Copy/index.d.ts +1 -0
  138. package/lib/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
  139. package/lib/components/pisellInput/index.d.ts +1 -0
  140. package/lib/components/pisellTooltip/index.d.ts +1 -0
  141. package/lib/components/productCard/components/Action/index.d.ts +1 -0
  142. package/lib/components/productCard/components/AmountFooter/index.d.ts +1 -0
  143. package/lib/components/productCard/components/Header/EditButton/index.d.ts +1 -0
  144. package/lib/components/productCard/components/Header/index.d.ts +1 -0
  145. package/lib/components/productCard/components/Note/index.d.ts +1 -0
  146. package/lib/components/productCard/components/Packages/index.d.ts +1 -0
  147. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  148. package/lib/components/productCard/components/Sales/index.d.ts +1 -0
  149. package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +1 -0
  150. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +1 -0
  151. package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +1 -0
  152. package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +1 -0
  153. package/lib/components/qrcode/index.d.ts +1 -0
  154. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
  155. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
  156. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
  157. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
  158. package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
  159. package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
  160. package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -1
  161. package/lib/components/table/Actions/index.d.ts +0 -1
  162. package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
  163. package/lib/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +1 -0
  164. package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
  165. package/lib/components/table/Table/SelectField/index.d.ts +0 -1
  166. package/lib/components/table/Table/fields/date/Show/index.d.ts +1 -0
  167. package/lib/components/table/Table/fields/link/Show/index.d.ts +1 -0
  168. package/lib/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  169. package/lib/components/table/Table/utils.d.ts +1 -1
  170. package/lib/components/table/Table/utils.js +18 -1
  171. package/lib/components/table/View/index.d.ts +0 -1
  172. package/lib/components/table/hooks/useTableSetting.d.ts +3 -4
  173. package/lib/components/table/hooks/useTableSetting.js +114 -4
  174. package/lib/components/table/index.js +12 -1
  175. package/lib/components/table/types.d.ts +17 -0
  176. package/lib/locales/en-US.d.ts +10 -0
  177. package/lib/locales/en-US.js +13 -1
  178. package/lib/locales/zh-CN.d.ts +10 -0
  179. package/lib/locales/zh-CN.js +13 -1
  180. package/lib/locales/zh-TW.d.ts +10 -0
  181. package/lib/locales/zh-TW.js +13 -1
  182. package/lib/utils/platform.d.ts +1 -1
  183. package/lowcode/data-source-table/meta.ts +239 -0
  184. package/lowcode/form-item-upload/meta.ts +20 -5
  185. package/lowcode/table/meta.ts +104 -0
  186. package/package.json +4 -3
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FilterProps } from "./types";
3
2
  declare const Filter: (props: FilterProps) => JSX.Element | null;
4
3
  export default Filter;
@@ -9,6 +9,7 @@ export declare type FilterType = {
9
9
  sortButtonShow: boolean;
10
10
  /** 筛选列表 */
11
11
  list: FilterItemProps[];
12
+ items?: string[];
12
13
  /** 快速筛选最大长度 */
13
14
  quickFilterMaxLength: number;
14
15
  /** 配置存储模式 */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const List: {
3
4
  (props: any): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare type LowCodePageProps = {
2
3
  id: number;
3
4
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ConfigProviderProps } from '../config-provider';
2
3
  interface PageProps extends ConfigProviderProps {
3
4
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputNumberProps } from 'antd/es/input-number';
3
2
  export interface PisellAdjustPriceInputNumberProps extends Omit<InputNumberProps, 'onChange'> {
4
3
  value?: number;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const PisellCamera: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
+ export default PisellCamera;
@@ -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
+ }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PickerDateProps } from 'antd/es/date-picker/generatePicker';
2
3
  import { Dayjs } from 'dayjs';
3
4
  import './detePickerCpt.less';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InputProps } from 'antd';
2
3
  import { PisellContextType } from "../../../pisell-config-provider/context";
3
4
  import './index.less';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InputProps, ButtonProps } from 'antd';
2
3
  import { PisellContextType } from "../../../pisell-config-provider/context";
3
4
  export interface CopyProps extends InputProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InputProps } from 'antd';
2
3
  import './index.less';
3
4
  import { PisellContextType } from "../../../pisell-config-provider/context";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InputProps } from 'antd';
2
3
  import { PisellContextType } from '../pisell-config-provider/context';
3
4
  declare const PisellInput: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TooltipPropsWithTitle } from 'antd/es/tooltip';
2
3
  import { PisellContextType } from "../pisell-config-provider/context";
3
4
  import './index.less';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Action: ({ item, onAction }: any) => JSX.Element;
3
4
  export default Action;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: ({ item, hideDivider, type, isOnlyTotal }: any) => JSX.Element;
3
4
  export default Footer;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const EditButton: ({ onEdit }: any) => JSX.Element;
3
4
  export default EditButton;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Header: (props: any) => JSX.Element;
3
4
  export default Header;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Note: (props: any) => JSX.Element | null;
3
4
  export default Note;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Packages: ({ item, isShowPackageNote }: any) => JSX.Element | null;
3
4
  export default Packages;
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
17
17
  * @Author: WangHan
18
18
  * @Date: 2024-11-22 10:58
19
19
  */
20
- export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Sales: ({ item, isShowNote }: any) => JSX.Element | null;
3
4
  export default Sales;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const SelectHolder: ({ lists, value, onChange, holderMode, isShowAddHolderButton, onAddHolder, addHolderButtonText, onClearHolder, isErrorHolder, allowClear, holderMaxCount, }: any) => JSX.Element;
3
4
  export default SelectHolder;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface SelectHolderModalProps {
3
4
  visible: boolean;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SelectHolderMultiple: ({ lists, value, onChange, holderMode, isShowAddHolderButton, onAddHolder, addHolderButtonText, onClearHolder, isErrorHolder, allowClear, holderMaxCount, }: any) => JSX.Element;
2
3
  export default SelectHolderMultiple;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface ResourceItem {
3
4
  id: string | number;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const QRCode: (props: any) => JSX.Element;
2
3
  export default QRCode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ExportImportType } from '../../../../../types';
3
2
  import './index.less';
4
3
  declare const ExportFile: (props: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ExportImportType } from "../../../../../types";
3
2
  import "./index.less";
4
3
  declare const ExportTable: (props: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ExportImportType } from '../../../../../types';
3
2
  import './index.less';
4
3
  declare const ImportLog: (props: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ExportImportType } from '../../../../../types';
3
2
  import './index.less';
4
3
  declare type ImportTableProps = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GallerySettingType, ModeType } from "../../../types";
3
2
  import "./index.less";
4
3
  declare type GallerySettingProps = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DataSourceGroupType } from "../../../types";
3
2
  declare type GroupProps = {
4
3
  setting: DataSourceGroupType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GridViewType, ModeType } from "../../../types";
3
2
  declare type ViewModeProps = {
4
3
  view: GridViewType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FilterType } from "../../filter/types";
3
2
  import { ColumnSettingType, DataSourceGroupType, ExportImportType, GallerySettingType, GridViewType, SortType } from "../types";
4
3
  import "./index.less";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GallerySettingType, GallerySettingValueType } from "../../../../../types";
3
2
  declare type CoverProps = {
4
3
  cover?: GallerySettingType["cover"];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type RenderFieldsProps = {
3
4
  fields: string[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GallerySettingType } from "../../../../../types";
3
2
  import "./index.less";
4
3
  declare type TitleProps = GallerySettingType["title"] & {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SelectField: () => JSX.Element;
3
2
  export default SelectField;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FieldPropsType } from "../../types";
2
3
  declare const Show: (props: FieldPropsType) => JSX.Element;
3
4
  export default Show;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FieldPropsType } from "../../types";
2
3
  declare const Show: (props: FieldPropsType) => JSX.Element;
3
4
  export default Show;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const summary: (props: any) => JSX.Element;
3
2
  export default summary;
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("column_setting" | "gallery_setting" | "order_by" | "group_by" | "view_mode" | "filter_setting")[];
158
+ }) => ("filters" | "order_by" | "group_by" | "column_setting" | "gallery_setting" | "filter_setting" | "view_mode")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -307,7 +307,24 @@ var setFormValuesToLocalStorage = ({
307
307
  currentSettingHash
308
308
  });
309
309
  };
310
- var getTableKey = (tableId) => `${tableKeyPrefix}-${tableId}`;
310
+ var getTableKey = (tableId) => {
311
+ if (typeof window === "undefined" || typeof window.location === "undefined") {
312
+ return `${tableKeyPrefix}-${tableId}`;
313
+ }
314
+ const { pathname, search } = window.location;
315
+ let appendPath = pathname || "/";
316
+ let memoryKey = "";
317
+ try {
318
+ const params = new URLSearchParams(search || "");
319
+ const mk = params.get("memory_key");
320
+ if (mk && mk.trim() !== "") {
321
+ memoryKey = mk.trim();
322
+ }
323
+ } catch (e) {
324
+ }
325
+ const urlPart = memoryKey ? `${appendPath}#${memoryKey}` : appendPath;
326
+ return `${tableKeyPrefix}-${tableId}-${urlPart}`;
327
+ };
311
328
  var mergeFilterSetting = ({
312
329
  list,
313
330
  quickFilterMaxLength,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GridViewProps } from '../types';
3
2
  declare const View: (props: GridViewProps & {
4
3
  setTableSetting: (values: Record<string, any>) => void;