@pisell/materials 6.0.15 → 6.0.17

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 (44) 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 +2 -2
  6. package/build/lowcode/preview.js +13 -21
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +21 -35
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +21 -35
  11. package/dist/umd/materials.min.css +1 -0
  12. package/dist/umd/materials.min.js +1 -0
  13. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  14. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  15. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  16. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  17. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  18. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  19. package/es/components/Pagination/index.d.ts +1 -1
  20. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +6 -3
  21. package/es/components/dataSourceComponents/fields/Input/WithMode.d.ts +1 -0
  22. package/es/components/dataSourceComponents/fields/Input/WithMode.js +605 -5
  23. package/es/components/dataSourceComponents/fields/Input/WithMode.less +96 -0
  24. package/es/components/dataSourceComponents/fields/Input/type.d.ts +1 -0
  25. package/es/components/dataSourceComponents/fields/Upload/index.js +1 -1
  26. package/es/components/dataSourceComponents/fields/index.d.ts +1 -1
  27. package/es/components/iconfont/index.d.ts +1 -0
  28. package/es/components/iconfont/index.js +1 -1
  29. package/es/components/table/Table/utils.d.ts +1 -1
  30. package/lib/components/Pagination/index.d.ts +1 -1
  31. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +31 -26
  32. package/lib/components/dataSourceComponents/fields/Input/WithMode.d.ts +1 -0
  33. package/lib/components/dataSourceComponents/fields/Input/WithMode.js +383 -1
  34. package/lib/components/dataSourceComponents/fields/Input/WithMode.less +96 -0
  35. package/lib/components/dataSourceComponents/fields/Input/type.d.ts +1 -0
  36. package/lib/components/dataSourceComponents/fields/Upload/index.js +1 -1
  37. package/lib/components/dataSourceComponents/fields/index.d.ts +1 -1
  38. package/lib/components/iconfont/index.d.ts +1 -0
  39. package/lib/components/iconfont/index.js +1 -1
  40. package/lib/components/table/Table/utils.d.ts +1 -1
  41. package/lowcode/_utils/defaultSchema.ts +18 -0
  42. package/lowcode/form-item-input/meta.ts +1 -0
  43. package/lowcode/form-item-input/snippets.ts +1 -0
  44. package/package.json +2 -2
@@ -0,0 +1,96 @@
1
+ /* 扫描线动画 */
2
+ @keyframes scanAnimation {
3
+ 0% {
4
+ top: calc(50% - 100px);
5
+ }
6
+ 50% {
7
+ top: calc(50% + 100px);
8
+ }
9
+ 100% {
10
+ top: calc(50% - 100px);
11
+ }
12
+ }
13
+
14
+ /* 扫描全屏容器 */
15
+ .pisell-scan-fullscreen {
16
+ position: fixed ;
17
+ top: 0 ;
18
+ left: 0 ;
19
+ width: 100vw ;
20
+ height: 100vh ;
21
+ background-color: #000 ;
22
+ z-index: 9999 ;
23
+ overflow: hidden ;
24
+ }
25
+
26
+ /* 视频元素 */
27
+ .scan-video {
28
+ width: 100% ;
29
+ height: 100% ;
30
+ object-fit: cover ;
31
+ object-position: center ;
32
+ }
33
+ .pisell-lowcode-input-group-addon{
34
+ background-color: var(--Primary-600, #7F56D9);
35
+ }
36
+ /* 扫码按钮 */
37
+ .scan-button {
38
+ color: #722ED1;
39
+ font-size: 18px;
40
+ cursor: pointer;
41
+ display: flex;
42
+ align-items: center;
43
+ }
44
+
45
+ /* 关闭按钮 - 左上角 */
46
+ .scan-close-left {
47
+ position: fixed ;
48
+ top: 15px ;
49
+ left: 15px ;
50
+ z-index: 9999 ;
51
+ font-size: 24px ;
52
+ color: #fff ;
53
+ cursor: pointer ;
54
+ background-color: rgba(255, 255, 255, 0.15) ;
55
+ width: 40px ;
56
+ height: 40px ;
57
+ display: flex ;
58
+ align-items: center ;
59
+ justify-content: center ;
60
+ border-radius: 50% ;
61
+ }
62
+
63
+ /* 上传按钮 - 右下角 */
64
+ .scan-upload {
65
+ position: fixed ;
66
+ right: 20px ;
67
+ bottom: 30px ;
68
+ width: 50px ;
69
+ height: 50px ;
70
+ display: flex ;
71
+ align-items: center ;
72
+ justify-content: center ;
73
+ z-index: 9999 ;
74
+ font-size: 24px ;
75
+ color: #fff ;
76
+ background-color: rgba(255, 255, 255, 0.15) ;
77
+ border-radius: 50% ;
78
+ cursor: pointer ;
79
+ }
80
+
81
+ /* 隐藏的文件输入框 */
82
+ .scan-file-input {
83
+ display: none;
84
+ }
85
+
86
+ /* iconfont通用样式 */
87
+ .scan-icon {
88
+ font-size: 24px;
89
+ color: #fff;
90
+ }
91
+
92
+ /* 扫码按钮的扫码图标 */
93
+ .scan-button-icon {
94
+ font-size: 24px;
95
+ color: #722ED1;
96
+ }
@@ -4,4 +4,5 @@ import { ModeType } from "../../dataSourceForm/type";
4
4
  export interface InputProps extends AntInputProps {
5
5
  renderMode: ModeType;
6
6
  innerRef: Ref<any>;
7
+ enableQRScanner?: boolean;
7
8
  }
@@ -45,7 +45,7 @@ var Upload = (0, import_utils.withFormItem)(import_WithMode.default, {
45
45
  const { success, message } = (0, import_utils2.checkFileCount)({
46
46
  minCount: props.minCount || 0,
47
47
  maxCount: props.maxCount || import_constants.DEFAULT_MAX_COUNT,
48
- valueLength: value.length,
48
+ valueLength: (value == null ? void 0 : value.length) || 0,
49
49
  multiple: !!props.multiple
50
50
  });
51
51
  if (!success) {
@@ -60,7 +60,7 @@ declare const formFieldMap: {
60
60
  FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
61
61
  FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
62
62
  };
63
- declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
63
+ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<any> | (import("react").FC<{}> & {
64
64
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
65
65
  } & {
66
66
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -2,6 +2,7 @@ import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
2
2
  import React from 'react';
3
3
  interface IconFontProps extends IconComponentProps {
4
4
  type: string;
5
+ onClick?: React.MouseEventHandler<HTMLSpanElement>;
5
6
  }
6
7
  declare const IconFont: React.FC<IconFontProps>;
7
8
  export default IconFont;
@@ -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/pisell2/iconfont_1.0.js"
38
+ scriptUrl: "https://static.pisellcdn.com/pisell2iconfont1.3.js"
39
39
  // 在 iconfont.cn 上生成
40
40
  });
41
41
  var IconFont = (props) => {
@@ -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
- }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
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 {};
@@ -119,6 +119,24 @@ export const generalItemMap = {
119
119
  },
120
120
  supportVariable: true,
121
121
  },
122
+ enableQRScanner: {
123
+ name: 'enableQRScanner',
124
+ title: {
125
+ label: {
126
+ type: 'i18n',
127
+ 'en-US': 'Enable QR Scanner',
128
+ 'zh-CN': '启用扫码',
129
+ },
130
+ tip: {
131
+ type: 'i18n',
132
+ 'en-US': 'Enable QR Scanner',
133
+ 'zh-CN': '启用扫码',
134
+ },
135
+ },
136
+ propType: 'bool',
137
+ defaultValue: false,
138
+ setter: 'BoolSetter',
139
+ },
122
140
  tooltip: {
123
141
  name: 'tooltip',
124
142
  title: {
@@ -33,6 +33,7 @@ export default {
33
33
  generalItemMap['hideLabel'],
34
34
  generalItemMap['renderMode'],
35
35
  generalItemMap['defaultValue'],
36
+ generalItemMap['enableQRScanner'],
36
37
  ]),
37
38
  getFormItemValidateGroup([
38
39
  generalItemMap['requiredobj'],
@@ -10,6 +10,7 @@ export default [
10
10
  props: {
11
11
  placeholder: inputPlaceholder,
12
12
  allowClear: true,
13
+ enableQRScanner: false,
13
14
  },
14
15
  },
15
16
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "6.0.15",
3
+ "version": "6.0.17",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -67,8 +67,8 @@
67
67
  "react-virtualized-auto-sizer": "^1.0.20",
68
68
  "react-window": "^1.8.10",
69
69
  "styled-components": "^6.0.0-rc.3",
70
- "@pisell/date-picker": "1.0.100",
71
70
  "@pisell/utils": "1.0.42",
71
+ "@pisell/date-picker": "1.0.100",
72
72
  "@pisell/icon": "0.0.11"
73
73
  },
74
74
  "peerDependencies": {