@pisell/materials 1.0.923 → 1.0.924

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 (74) 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 +1 -1
  6. package/build/lowcode/preview.js +164 -148
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +45 -16
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +56 -27
  11. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  12. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  13. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  14. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  15. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +199 -19
  16. package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +5 -0
  17. package/es/components/dataSourceComponents/fields/Upload/CameraPopover.js +66 -0
  18. package/es/components/dataSourceComponents/fields/Upload/index.less +35 -3
  19. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
  20. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  21. package/es/components/dataSourceComponents/fields/index.d.ts +10 -10
  22. package/es/components/filter/index.d.ts +0 -1
  23. package/es/components/list/index.d.ts +0 -1
  24. package/es/components/pisellCamera/index.d.ts +4 -0
  25. package/es/components/pisellCamera/index.js +219 -0
  26. package/es/components/pisellCamera/index.less +120 -0
  27. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  28. package/es/components/table/Table/SelectField/index.d.ts +0 -1
  29. package/es/components/table/Table/fields/index.d.ts +0 -1
  30. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  31. package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
  32. package/es/components/table/Table/fields/text/index.d.ts +0 -1
  33. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  34. package/es/components/table/Table/utils.d.ts +1 -1
  35. package/es/locales/en-US.d.ts +10 -0
  36. package/es/locales/en-US.js +13 -1
  37. package/es/locales/zh-CN.d.ts +10 -0
  38. package/es/locales/zh-CN.js +13 -1
  39. package/es/locales/zh-TW.d.ts +10 -0
  40. package/es/locales/zh-TW.js +13 -1
  41. package/es/utils/index.d.ts +1 -1
  42. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  43. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  44. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  45. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  46. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +168 -5
  47. package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +5 -0
  48. package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.js +95 -0
  49. package/lib/components/dataSourceComponents/fields/Upload/index.less +35 -3
  50. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
  51. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  52. package/lib/components/dataSourceComponents/fields/index.d.ts +10 -10
  53. package/lib/components/filter/index.d.ts +0 -1
  54. package/lib/components/list/index.d.ts +0 -1
  55. package/lib/components/pisellCamera/index.d.ts +4 -0
  56. package/lib/components/pisellCamera/index.js +219 -0
  57. package/lib/components/pisellCamera/index.less +120 -0
  58. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  59. package/lib/components/table/Table/SelectField/index.d.ts +0 -1
  60. package/lib/components/table/Table/fields/index.d.ts +0 -1
  61. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  62. package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
  63. package/lib/components/table/Table/fields/text/index.d.ts +0 -1
  64. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  65. package/lib/components/table/Table/utils.d.ts +1 -1
  66. package/lib/locales/en-US.d.ts +10 -0
  67. package/lib/locales/en-US.js +13 -1
  68. package/lib/locales/zh-CN.d.ts +10 -0
  69. package/lib/locales/zh-CN.js +13 -1
  70. package/lib/locales/zh-TW.d.ts +10 -0
  71. package/lib/locales/zh-TW.js +13 -1
  72. package/lib/utils/index.d.ts +1 -1
  73. package/lowcode/form-item-upload/meta.ts +20 -5
  74. package/package.json +4 -3
@@ -0,0 +1,219 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';
8
+ import { Camera } from 'react-camera-pro';
9
+ import { getText } from "../../locales";
10
+ import PisellModal from "../../components/pisellModal";
11
+ import "./index.less";
12
+ var PisellCamera = /*#__PURE__*/forwardRef(function (props, ref) {
13
+ var cameraRef = useRef(null);
14
+ var _useState = useState(false),
15
+ _useState2 = _slicedToArray(_useState, 2),
16
+ open = _useState2[0],
17
+ setOpen = _useState2[1];
18
+ var _useState3 = useState(''),
19
+ _useState4 = _slicedToArray(_useState3, 2),
20
+ photo = _useState4[0],
21
+ setPhoto = _useState4[1];
22
+ var _useState5 = useState(null),
23
+ _useState6 = _slicedToArray(_useState5, 2),
24
+ cameraAvailable = _useState6[0],
25
+ setCameraAvailable = _useState6[1]; // null: 检测中, true: 可用, false: 不可用
26
+ var uploadFileRef = useRef(null);
27
+
28
+ // Base64转File对象
29
+ var base64ToFile = function base64ToFile(base64String, filename) {
30
+ var _arr$0$match;
31
+ var arr = base64String.split(',');
32
+ var mime = ((_arr$0$match = arr[0].match(/:(.*?);/)) === null || _arr$0$match === void 0 ? void 0 : _arr$0$match[1]) || '';
33
+ var bstr = atob(arr[1]);
34
+ var n = bstr.length;
35
+ var u8arr = new Uint8Array(n);
36
+ while (n--) {
37
+ u8arr[n] = bstr.charCodeAt(n);
38
+ }
39
+ return new File([u8arr], filename, {
40
+ type: mime
41
+ });
42
+ };
43
+
44
+ // 拍照并添加到fileList
45
+ var takePhoto = function takePhoto() {
46
+ if (!cameraRef.current || !cameraRef.current.takePhoto) {
47
+ return;
48
+ }
49
+ try {
50
+ var _cameraRef$current, _cameraRef$current$ta;
51
+ var _photo = (_cameraRef$current = cameraRef.current) === null || _cameraRef$current === void 0 || (_cameraRef$current$ta = _cameraRef$current.takePhoto) === null || _cameraRef$current$ta === void 0 ? void 0 : _cameraRef$current$ta.call(_cameraRef$current);
52
+ var timestamp = Date.now();
53
+ var filename = "photo-".concat(timestamp, ".jpg");
54
+ setPhoto(_photo);
55
+
56
+ // 转换为File对象
57
+ var file = base64ToFile(_photo, filename);
58
+
59
+ // 创建符合Antd Upload格式的文件对象
60
+ var uploadFile = {
61
+ uid: timestamp.toString(),
62
+ name: filename,
63
+ status: 'uploading',
64
+ url: _photo,
65
+ // 用于预览
66
+ originFileObj: file,
67
+ // 原始文件对象,用于上传
68
+ thumbUrl: _photo,
69
+ lastModified: Date.now(),
70
+ lastModifiedDate: new Date(),
71
+ type: 'image/jpeg',
72
+ size: file.size
73
+ };
74
+ console.log('takePhoto_uploadFile', uploadFile);
75
+ uploadFileRef.current = uploadFile;
76
+ return uploadFile;
77
+ } catch (error) {
78
+ console.error('takePhoto_error', error);
79
+ uploadFileRef.current = null;
80
+ setPhoto('');
81
+ return null;
82
+ }
83
+ };
84
+ var onOpen = function onOpen() {
85
+ setCameraAvailable(null);
86
+ setPhoto('');
87
+ uploadFileRef.current = null;
88
+ setOpen(true);
89
+ };
90
+
91
+ // 关闭相机弹窗,重置状态
92
+ var onClose = function onClose() {
93
+ cameraRef.current = null;
94
+ uploadFileRef.current = null;
95
+ setOpen(false);
96
+ setPhoto('');
97
+ setCameraAvailable(null);
98
+ };
99
+
100
+ // 重拍照片
101
+ var onRetakePhoto = function onRetakePhoto() {
102
+ setPhoto('');
103
+ };
104
+
105
+ // 使用照片
106
+ var onUsePhoto = function onUsePhoto() {
107
+ var _props$onChange;
108
+ props === null || props === void 0 || (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, uploadFileRef.current);
109
+ onClose();
110
+ };
111
+ useImperativeHandle(ref, function () {
112
+ return {
113
+ open: onOpen,
114
+ takePhoto: takePhoto,
115
+ isCameraAvailable: function isCameraAvailable() {
116
+ return cameraAvailable;
117
+ }
118
+ };
119
+ });
120
+ console.log('cameraAvailable', cameraAvailable);
121
+ return /*#__PURE__*/React.createElement(PisellModal, {
122
+ open: open,
123
+ onCancel: function onCancel(e) {
124
+ e.stopPropagation();
125
+ e.preventDefault();
126
+ onClose();
127
+ },
128
+ header: false,
129
+ footer: null,
130
+ destroyOnClose: true,
131
+ bodyStyle: {
132
+ padding: 0
133
+ },
134
+ width: '90vw',
135
+ className: "pisell-camera-modal"
136
+ }, /*#__PURE__*/React.createElement("div", {
137
+ className: "pisell-camera-container",
138
+ onClick: function onClick(e) {
139
+ e.stopPropagation();
140
+ e.preventDefault();
141
+ }
142
+ }, cameraAvailable === null ?
143
+ /*#__PURE__*/
144
+ // 检测中
145
+ React.createElement("div", {
146
+ className: "pisell-camera-loading"
147
+ }, /*#__PURE__*/React.createElement("div", {
148
+ className: "pisell-camera-loading-text"
149
+ }, getText('pisell-camera-checking'))) : cameraAvailable === false ?
150
+ /*#__PURE__*/
151
+ // 无摄像头
152
+ React.createElement("div", {
153
+ className: "pisell-camera-no-camera"
154
+ }, /*#__PURE__*/React.createElement("div", {
155
+ className: "pisell-camera-no-camera-icon"
156
+ }, "\uD83D\uDCF7"), /*#__PURE__*/React.createElement("div", {
157
+ className: "pisell-camera-no-camera-text"
158
+ }, getText('pisell-camera-no-camera-accessible')), /*#__PURE__*/React.createElement("div", {
159
+ className: "pisell-camera-no-camera-desc"
160
+ }, getText('pisell-camera-no-camera-desc'))) : null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Camera, {
161
+ ref: cameraRef,
162
+ errorMessages: {
163
+ // noCameraAccessible: getText('pisell-camera-no-camera-accessible'),
164
+ // permissionDenied: getText('pisell-camera-permission-denied'),
165
+ // switchCamera: getText('pisell-camera-switch-camera'),
166
+ // canvas: getText('pisell-camera-canvas'),
167
+ },
168
+ numberOfCamerasCallback: function numberOfCamerasCallback(numberOfCameras) {
169
+ console.log('numberOfCameras', numberOfCameras);
170
+ if (!cameraRef.current) {
171
+ return;
172
+ }
173
+ if (numberOfCameras <= 0) {
174
+ setTimeout(function () {
175
+ setCameraAvailable(function (pre) {
176
+ if (pre === true) {
177
+ return true;
178
+ }
179
+ return false;
180
+ });
181
+ }, 5000);
182
+ } else {
183
+ setCameraAvailable(true);
184
+ }
185
+ }
186
+ }), cameraAvailable === true && /*#__PURE__*/React.createElement("div", {
187
+ className: "pisell-camera-action"
188
+ }, /*#__PURE__*/React.createElement("div", {
189
+ className: "pisell-camera-action-item",
190
+ onClick: function onClick(e) {
191
+ e.stopPropagation();
192
+ e.preventDefault();
193
+ takePhoto();
194
+ }
195
+ })), photo && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
196
+ className: "pisell-camera-photo-container"
197
+ }, /*#__PURE__*/React.createElement("img", {
198
+ src: photo,
199
+ alt: "photo",
200
+ className: "pisell-camera-photo"
201
+ })), /*#__PURE__*/React.createElement("div", {
202
+ className: "pisell-camera-photo-img-action"
203
+ }, /*#__PURE__*/React.createElement("div", {
204
+ className: "pisell-camera-photo-img-action-item",
205
+ onClick: function onClick(e) {
206
+ e.stopPropagation();
207
+ e.preventDefault();
208
+ onRetakePhoto();
209
+ }
210
+ }, getText('pisell-upload-camera-retake')), /*#__PURE__*/React.createElement("div", {
211
+ className: "pisell-camera-photo-img-action-item",
212
+ onClick: function onClick(e) {
213
+ e.stopPropagation();
214
+ e.preventDefault();
215
+ onUsePhoto();
216
+ }
217
+ }, getText('pisell-upload-camera-use')))))));
218
+ });
219
+ export default PisellCamera;
@@ -0,0 +1,120 @@
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 {
21
+ width: 60px;
22
+ height: 60px;
23
+ background-color: #fff;
24
+ border-radius: 60px;
25
+ box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
26
+ cursor: pointer;
27
+ }
28
+ }
29
+
30
+ .pisell-camera-photo-container {
31
+ position: absolute;
32
+ top: 0;
33
+ left: 0;
34
+ right: 0;
35
+ bottom: 0;
36
+ width: 100%;
37
+ height: 100%;
38
+
39
+ .pisell-camera-photo {
40
+ width: 100%;
41
+ height: 100%;
42
+ object-fit: cover;
43
+ }
44
+ }
45
+ .pisell-camera-photo-img-action {
46
+ position: absolute;
47
+ bottom: 0;
48
+ left: 0;
49
+ right: 0;
50
+ height: 100px;
51
+ display: flex;
52
+ flex-direction: row;
53
+ align-items: center;
54
+ justify-content: space-between;
55
+ background-color: rgba(0, 0, 0, 0.5);
56
+
57
+ .pisell-camera-photo-img-action-item {
58
+ padding: 20px 60px;
59
+ font-size: 20px;
60
+ color: #fff;
61
+ cursor: pointer;
62
+ }
63
+ }
64
+
65
+ .pisell-camera-loading {
66
+ position: absolute;
67
+ top: 0;
68
+ left: 0;
69
+ right: 0;
70
+ bottom: 0;
71
+ background-color: transparent;
72
+ display: flex;
73
+ align-items: center;
74
+ justify-content: center;
75
+
76
+ .pisell-camera-loading-text {
77
+ font-size: 18px;
78
+ color: #666;
79
+ }
80
+ }
81
+
82
+ .pisell-camera-no-camera {
83
+ position: absolute;
84
+ top: 0;
85
+ left: 0;
86
+ right: 0;
87
+ bottom: 0;
88
+ background-color: #ffffff;
89
+ display: flex;
90
+ flex-direction: column;
91
+ align-items: center;
92
+ justify-content: center;
93
+ width: 100%;
94
+ height: 100%;
95
+ background-color: #f5f5f5;
96
+ padding: 40px;
97
+ text-align: center;
98
+
99
+ .pisell-camera-no-camera-icon {
100
+ font-size: 64px;
101
+ margin-bottom: 20px;
102
+ opacity: 0.6;
103
+ }
104
+
105
+ .pisell-camera-no-camera-text {
106
+ font-size: 20px;
107
+ color: #333;
108
+ margin-bottom: 12px;
109
+ font-weight: 500;
110
+ }
111
+
112
+ .pisell-camera-no-camera-desc {
113
+ font-size: 14px;
114
+ color: #666;
115
+ line-height: 1.5;
116
+ max-width: 300px;
117
+ }
118
+ }
119
+ }
120
+ }
@@ -1,5 +1,5 @@
1
1
  declare const useGapSize: (gap: number | number[]) => {
2
- horizontal: number;
3
- vertical: number;
2
+ horizontal: any;
3
+ vertical: any;
4
4
  };
5
5
  export default useGapSize;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SelectField: () => JSX.Element;
3
2
  export default SelectField;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const fieldMaps: {
3
2
  text: {
4
3
  field: {
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  import "./index.less";
4
3
  declare const Show: (props: FieldPropsType) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[] | Record<string, any>[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -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
- }) => ("order_by" | "group_by" | "column_setting" | "gallery_setting" | "filter_setting" | "view_mode")[];
170
+ }) => ("view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting")[];
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 {};
@@ -326,5 +326,15 @@ declare const _default: {
326
326
  'pisell-list-pagination-page-of': (current: number, total: number) => string;
327
327
  'pisell-list-pagination-previous': string;
328
328
  'pisell-list-pagination-next': string;
329
+ 'pisell-camera-no-camera-accessible': string;
330
+ 'pisell-camera-permission-denied': string;
331
+ 'pisell-camera-switch-camera': string;
332
+ 'pisell-camera-canvas': string;
333
+ 'pisell-camera-checking': string;
334
+ 'pisell-camera-no-camera-desc': string;
335
+ 'pisell-upload-camera-local-files': string;
336
+ 'pisell-upload-camera-capture': string;
337
+ 'pisell-upload-camera-retake': string;
338
+ 'pisell-upload-camera-use': string;
329
339
  };
330
340
  export default _default;
@@ -400,5 +400,17 @@ export default {
400
400
  return "Page ".concat(current, " of ").concat(total);
401
401
  },
402
402
  'pisell-list-pagination-previous': 'Previous',
403
- 'pisell-list-pagination-next': 'Next'
403
+ 'pisell-list-pagination-next': 'Next',
404
+ // 相机组件
405
+ 'pisell-camera-no-camera-accessible': 'No camera accessible',
406
+ 'pisell-camera-permission-denied': 'Permission denied',
407
+ 'pisell-camera-switch-camera': 'Switch camera',
408
+ 'pisell-camera-canvas': 'Canvas not supported',
409
+ 'pisell-camera-checking': 'Detecting camera...',
410
+ 'pisell-camera-no-camera-desc': 'Please check if your device has a camera or grant browser permission to access camera',
411
+ // 拍照组件
412
+ 'pisell-upload-camera-local-files': 'Local Files',
413
+ 'pisell-upload-camera-capture': 'Capture',
414
+ 'pisell-upload-camera-retake': 'Retake',
415
+ 'pisell-upload-camera-use': 'Use photo'
404
416
  };
@@ -321,5 +321,15 @@ declare const _default: {
321
321
  'pisell-list-pagination-page-of': (current: number, total: number) => string;
322
322
  'pisell-list-pagination-previous': string;
323
323
  'pisell-list-pagination-next': string;
324
+ 'pisell-camera-no-camera-accessible': string;
325
+ 'pisell-camera-permission-denied': string;
326
+ 'pisell-camera-switch-camera': string;
327
+ 'pisell-camera-canvas': string;
328
+ 'pisell-camera-checking': string;
329
+ 'pisell-camera-no-camera-desc': string;
330
+ 'pisell-upload-camera-local-files': string;
331
+ 'pisell-upload-camera-capture': string;
332
+ 'pisell-upload-camera-retake': string;
333
+ 'pisell-upload-camera-use': string;
324
334
  };
325
335
  export default _default;
@@ -391,5 +391,17 @@ export default {
391
391
  return "\u7B2C ".concat(current, " \u9875 \u5171 ").concat(total, " \u9875");
392
392
  },
393
393
  'pisell-list-pagination-previous': '上一页',
394
- 'pisell-list-pagination-next': '下一页'
394
+ 'pisell-list-pagination-next': '下一页',
395
+ // 相机组件
396
+ 'pisell-camera-no-camera-accessible': '没有找到摄像头',
397
+ 'pisell-camera-permission-denied': '没有权限使用摄像头',
398
+ 'pisell-camera-switch-camera': '切换摄像头',
399
+ 'pisell-camera-canvas': 'canvas不支持',
400
+ 'pisell-camera-checking': '正在检测摄像头...',
401
+ 'pisell-camera-no-camera-desc': '请检查设备是否连接摄像头或授权浏览器访问摄像头',
402
+ // 拍照组件
403
+ 'pisell-upload-camera-local-files': '本地文件',
404
+ 'pisell-upload-camera-capture': '拍摄/拍照',
405
+ 'pisell-upload-camera-retake': '重拍',
406
+ 'pisell-upload-camera-use': '使用照片'
395
407
  };
@@ -321,5 +321,15 @@ declare const _default: {
321
321
  'pisell-list-pagination-page-of': (current: number, total: number) => string;
322
322
  'pisell-list-pagination-previous': string;
323
323
  'pisell-list-pagination-next': string;
324
+ 'pisell-camera-no-camera-accessible': string;
325
+ 'pisell-camera-permission-denied': string;
326
+ 'pisell-camera-switch-camera': string;
327
+ 'pisell-camera-canvas': string;
328
+ 'pisell-camera-checking': string;
329
+ 'pisell-camera-no-camera-desc': string;
330
+ 'pisell-upload-camera-local-files': string;
331
+ 'pisell-upload-camera-capture': string;
332
+ 'pisell-upload-camera-retake': string;
333
+ 'pisell-upload-camera-use': string;
324
334
  };
325
335
  export default _default;
@@ -392,5 +392,17 @@ export default {
392
392
  return "\u7B2C ".concat(current, " \u9801 \u5171 ").concat(total, " \u9801");
393
393
  },
394
394
  'pisell-list-pagination-previous': '上一頁',
395
- 'pisell-list-pagination-next': '下一頁'
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': '使用照片'
396
408
  };
@@ -1,4 +1,4 @@
1
1
  export declare const isBrowser: boolean;
2
- export declare const getCssNumber: (val: string | number) => string;
2
+ export declare const getCssNumber: (val: string | number) => string | number;
3
3
  export declare function uuid(): string;
4
4
  export * from './mergeWith';
@@ -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?: "custom" | "default" | "api" | undefined;
46
+ optionSourceType?: "default" | "custom" | "api" | undefined;
47
47
  labelField: string;
48
48
  valueField: string;
49
49
  extraParams?: Record<string, any> | undefined;
@@ -1,5 +1,5 @@
1
1
  declare const useDataSourceKey: () => {
2
- dataSourceKey: string | undefined;
3
- dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
2
+ dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
3
+ dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
4
4
  };
5
5
  export default useDataSourceKey;
@@ -17,7 +17,7 @@ interface UseTablePropsProps {
17
17
  * @returns
18
18
  */
19
19
  declare const useTableProps: (props: UseTablePropsProps) => {
20
- title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
20
+ title: string | number | boolean | JSX.Element | React.ReactFragment | (() => 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 | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
29
+ subTitle: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
30
30
  buttons: any[] | null;
31
31
  filter: JSX.Element | null;
32
32
  onRow: (record: any) => any;
@@ -53,7 +53,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
53
53
  width: number;
54
54
  align: "center" | "left" | "right";
55
55
  fixed: false | "left" | "right";
56
- type: "button" | "link";
56
+ type: "link" | "button";
57
57
  items: OperationItem[];
58
58
  } | undefined;
59
59
  operationContent?: {
@@ -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?: "custom" | "default" | "api" | undefined;
3
+ optionSourceType?: "default" | "custom" | "api" | undefined;
4
4
  labelField: string;
5
5
  valueField: string;
6
6
  extraParams?: Record<string, any> | undefined;