@pisell/materials 1.0.491 → 1.0.493
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 +14 -14
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +17 -17
- package/es/components/browserSelect/index.js +2 -2
- package/es/components/browserSelect/index.less +49 -47
- package/es/components/dataSourceComponents/dataSourceForm/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceForm/style.less +12 -3
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +5 -2
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +12 -6
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +14 -13
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +4 -5
- package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceWrapper/index.js +4 -2
- package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +5 -3
- package/es/components/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +7 -2
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +2 -1
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.js +10 -1
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.less +8 -0
- package/es/components/dataSourceComponents/fields/Upload/fallback.png +0 -0
- package/es/components/dataSourceComponents/fields/Upload/index.less +9 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +2 -1
- package/es/components/dataSourceComponents/fields/index.js +1 -0
- package/es/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +51 -22
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +2 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +6 -3
- package/es/components/dataSourceComponents/utils/index.d.ts +0 -0
- package/es/components/dataSourceComponents/utils/index.js +0 -0
- package/es/components/pisellWalletPassCard/index.d.ts +1 -1
- package/es/components/productCard/components/MultiDay/index.js +2 -4
- package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/components/MultiDay/utils.js +54 -0
- package/es/components/select/index.js +5 -2
- package/es/components/select/index.less +11 -0
- package/es/components/table/Tabs/index.js +8 -2
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +2 -1
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +2 -1
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +2 -1
- package/lib/components/browserSelect/index.js +2 -2
- package/lib/components/browserSelect/index.less +49 -47
- package/lib/components/dataSourceComponents/dataSourceForm/index.js +10 -2
- package/lib/components/dataSourceComponents/dataSourceForm/style.less +12 -3
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +5 -2
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +2 -3
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +14 -13
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.js +11 -2
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +11 -2
- package/lib/components/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +2 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +2 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.js +15 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.less +8 -0
- package/lib/components/dataSourceComponents/fields/Upload/fallback.png +0 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.less +9 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +2 -1
- package/lib/components/dataSourceComponents/fields/index.js +1 -0
- package/lib/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/lib/components/dataSourceComponents/hooks/useActions.js +22 -3
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +2 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +7 -3
- package/lib/components/dataSourceComponents/utils/index.d.ts +0 -0
- package/lib/components/dataSourceComponents/utils/index.js +0 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -1
- package/lib/components/productCard/components/MultiDay/index.js +2 -7
- package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/components/MultiDay/utils.js +77 -0
- package/lib/components/select/index.js +5 -2
- package/lib/components/select/index.less +11 -0
- package/lib/components/table/Tabs/index.js +1 -0
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +2 -1
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +2 -1
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +2 -1
- package/lowcode/button/meta.ts +1 -1
- package/lowcode/data-source-form/utils.ts +21 -2
- package/lowcode/data-source-table/meta.ts +18 -1
- package/lowcode/data-source-table/utils.tsx +2 -2
- package/lowcode/form-item-select/meta.ts +12 -6
- package/lowcode/form-item-select/snippets.ts +2 -6
- package/lowcode/form-item-upload/__screenshots__/upload.png +0 -0
- package/lowcode/form-item-upload/meta.ts +2 -2
- package/lowcode/form-item-upload/snippets.ts +1 -0
- package/lowcode/select/snippets.ts +1 -0
- package/lowcode/submit-button/meta.ts +67 -16
- package/lowcode/submit-button/snippets.ts +6 -1
- package/package.json +3 -3
|
@@ -45,11 +45,11 @@ var BrowserSelect = function BrowserSelect(props) {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
className: "browser-select-wrapper",
|
|
48
|
+
className: "pisell-browser-select-wrapper",
|
|
49
49
|
style: _objectSpread({}, style)
|
|
50
50
|
}, /*#__PURE__*/React.createElement("select", _extends({}, resetProps, {
|
|
51
51
|
value: value,
|
|
52
|
-
className: classNames("date-picker-pisell-browser-select", resetProps.className),
|
|
52
|
+
className: classNames("pisell-date-picker-pisell-browser-select", resetProps.className),
|
|
53
53
|
onChange: handleChange
|
|
54
54
|
}), _options), /*#__PURE__*/React.createElement(DownOutlined, {
|
|
55
55
|
className: "browser-select-icon"
|
|
@@ -1,62 +1,64 @@
|
|
|
1
|
-
.browser-select-wrapper {
|
|
1
|
+
.pisell-browser-select-wrapper {
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
4
|
display: inline-block;
|
|
5
|
-
}
|
|
6
5
|
|
|
7
|
-
.browser-select-icon {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
6
|
+
.browser-select-icon {
|
|
7
|
+
position: absolute;
|
|
8
|
+
right: 10px;
|
|
9
|
+
top: 50%;
|
|
10
|
+
transform: translateY(-50%);
|
|
11
|
+
color: #D0D5DD;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
}
|
|
16
15
|
|
|
17
|
-
.date-picker-pisell-browser-select {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
.pisell-date-picker-pisell-browser-select {
|
|
17
|
+
padding: 10px 16px;
|
|
18
|
+
padding-right: 30px;
|
|
19
|
+
border-radius: 8px;
|
|
20
|
+
background-color: #fff;
|
|
21
|
+
color: var(--Gray-true-900, #141414);
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
border: 1px solid var(--Gray-300, #D0D5DD);
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
appearance: none;
|
|
28
|
+
-webkit-appearance: none;
|
|
29
|
+
-moz-appearance: none;
|
|
30
|
+
width: 100%;
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
&:hover {
|
|
33
|
+
border-color: var(--theme-color, #7F56D9);
|
|
34
|
+
& + .browser-select-icon {
|
|
35
|
+
color: var(--theme-color, #7F56D9);
|
|
36
|
+
}
|
|
37
37
|
}
|
|
38
|
-
}
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
&:focus {
|
|
40
|
+
border-color: var(--theme-color, #7F56D9);
|
|
41
|
+
box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
|
|
42
|
+
outline: none;
|
|
43
|
+
& + .browser-select-icon {
|
|
44
|
+
color: var(--theme-color, #7F56D9);
|
|
45
|
+
}
|
|
46
46
|
}
|
|
47
|
-
}
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
&:active {
|
|
49
|
+
border-color: var(--theme-color, #7F56D9);
|
|
50
|
+
}
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
color: rgba(0, 0, 0, 0.25);
|
|
58
|
-
& + .browser-select-icon {
|
|
52
|
+
&:disabled {
|
|
53
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
54
|
+
border-color: #d9d9d9;
|
|
55
|
+
cursor: not-allowed;
|
|
59
56
|
color: rgba(0, 0, 0, 0.25);
|
|
57
|
+
& + .browser-select-icon {
|
|
58
|
+
color: rgba(0, 0, 0, 0.25);
|
|
59
|
+
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
|
|
62
63
|
}
|
|
64
|
+
|
|
@@ -11,10 +11,12 @@ import "./index.less";
|
|
|
11
11
|
*/
|
|
12
12
|
var DataSourceForm = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
13
13
|
var dataSource = props.dataSource,
|
|
14
|
-
currentValue = props.currentValue
|
|
14
|
+
currentValue = props.currentValue,
|
|
15
|
+
__designMode = props.__designMode;
|
|
15
16
|
return /*#__PURE__*/React.createElement(DataSourceProvider, {
|
|
16
17
|
dataSource: dataSource,
|
|
17
|
-
currentValue: currentValue
|
|
18
|
+
currentValue: currentValue,
|
|
19
|
+
__designMode: __designMode
|
|
18
20
|
}, /*#__PURE__*/React.createElement(BaseForm, _extends({}, props, {
|
|
19
21
|
ref: ref
|
|
20
22
|
})));
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
.pisell-lowcode-form-vertical {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
.pisell-data-source-form-item .pisell-lowcode-form-item-label > label {
|
|
3
|
+
height: auto;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.pisell-form-read-pretty {
|
|
8
|
+
&-value {
|
|
9
|
+
color: var(--Gray-900, #101828);
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
line-height: 24px; /* 150% */
|
|
13
|
+
}
|
|
5
14
|
}
|
|
@@ -27,7 +27,10 @@ var SubmitButton = function SubmitButton(props) {
|
|
|
27
27
|
refreshData = props.refreshData,
|
|
28
28
|
afterSubmitType = props.afterSubmitType,
|
|
29
29
|
afterSubmitModalConfig = props.afterSubmitModalConfig,
|
|
30
|
-
afterSubmitNotificationConfig = props.afterSubmitNotificationConfig
|
|
30
|
+
afterSubmitNotificationConfig = props.afterSubmitNotificationConfig,
|
|
31
|
+
childrenString = props.childrenString;
|
|
32
|
+
console.log(props, 'propsprops');
|
|
33
|
+
console.log(childrenString, 'childrenchildren');
|
|
31
34
|
var _useState = useState(false),
|
|
32
35
|
_useState2 = _slicedToArray(_useState, 2),
|
|
33
36
|
loading = _useState2[0],
|
|
@@ -217,6 +220,6 @@ var SubmitButton = function SubmitButton(props) {
|
|
|
217
220
|
loading: loading,
|
|
218
221
|
onClick: onSubmitClick,
|
|
219
222
|
disabled: isDisabled
|
|
220
|
-
},
|
|
223
|
+
}, childrenString), contextHolder));
|
|
221
224
|
};
|
|
222
225
|
export default SubmitButton;
|
|
@@ -18,7 +18,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
18
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
19
|
import React, { useEffect, useMemo } from 'react';
|
|
20
20
|
import { isArr, isString } from '@pisell/utils';
|
|
21
|
-
import { Tag } from 'antd';
|
|
22
21
|
import { parsePhoneNumberFromString, isValidPhoneNumber } from 'libphonenumber-js';
|
|
23
22
|
import { getText } from "../../../locales";
|
|
24
23
|
import Form from "../../form";
|
|
@@ -292,13 +291,20 @@ export var getNestedValue = function getNestedValue(obj, path) {
|
|
|
292
291
|
// 根据valueMap渲染value 用于ReadPretty组件 Select Radio Checkbox
|
|
293
292
|
export var renderValueWithMap = function renderValueWithMap(value, valueMap) {
|
|
294
293
|
if (isArr(value)) {
|
|
295
|
-
return /*#__PURE__*/React.createElement(
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
294
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
295
|
+
className: "pisell-form-read-pretty-text"
|
|
296
|
+
}, value.map(function (item, index) {
|
|
297
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
298
|
+
key: item,
|
|
299
|
+
className: "pisell-form-read-pretty-value"
|
|
300
|
+
}, valueMap === null || valueMap === void 0 ? void 0 : valueMap[item]), index < value.length - 1 && ',');
|
|
299
301
|
}));
|
|
300
302
|
} else if (isString(value)) {
|
|
301
|
-
return /*#__PURE__*/React.createElement(
|
|
303
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
304
|
+
className: "pisell-form-read-pretty-text"
|
|
305
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
306
|
+
className: "pisell-form-read-pretty-value"
|
|
307
|
+
}, (valueMap === null || valueMap === void 0 ? void 0 : valueMap[value]) || value));
|
|
302
308
|
}
|
|
303
309
|
return null;
|
|
304
310
|
};
|
|
@@ -21,19 +21,20 @@ export var genGetField = function genGetField(dataSource) {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
var fieldType2FilterMap = {
|
|
24
|
-
Checkbox: '
|
|
25
|
-
ColorPicker: '
|
|
26
|
-
DatePicker: '
|
|
27
|
-
Input: '
|
|
28
|
-
Radio: '
|
|
29
|
-
Select: '
|
|
30
|
-
Percent: '
|
|
31
|
-
InputNumber: '
|
|
32
|
-
'Input.JSON': '
|
|
33
|
-
'Input.
|
|
34
|
-
'Input.
|
|
35
|
-
'
|
|
36
|
-
'
|
|
24
|
+
Checkbox: 'FormItemSelect',
|
|
25
|
+
ColorPicker: 'FormItemInput',
|
|
26
|
+
DatePicker: 'FormItemDateRangePicker',
|
|
27
|
+
Input: 'FormItemInput',
|
|
28
|
+
Radio: 'FormItemSelect',
|
|
29
|
+
Select: 'FormItemSelect',
|
|
30
|
+
Percent: 'FormItemPercent',
|
|
31
|
+
InputNumber: 'FormItemInputNumber',
|
|
32
|
+
'Input.JSON': 'FormItemInput',
|
|
33
|
+
'Input.Email': 'FormItemInput',
|
|
34
|
+
'Input.URL': 'FormItemInput',
|
|
35
|
+
'Input.Password': 'FormItemInput',
|
|
36
|
+
'Radio.Group': 'FormItemSelect',
|
|
37
|
+
'Checkbox.Group': 'FormItemSelect'
|
|
37
38
|
};
|
|
38
39
|
var getCptProps = function getCptProps(field, cptType, item) {
|
|
39
40
|
var _field$uiSchema, _field$uiSchema2, _field$uiSchema3, _field$uiSchema3$enum, _field$uiSchema6, _field$uiSchema8;
|
|
@@ -16,7 +16,7 @@ interface UseTablePropsProps {
|
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
18
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
19
|
-
title: number | boolean |
|
|
19
|
+
title: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
20
20
|
pagination: {
|
|
21
21
|
total: number;
|
|
22
22
|
current: number;
|
|
@@ -25,7 +25,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
25
25
|
showSizeChanger: boolean;
|
|
26
26
|
};
|
|
27
27
|
columns: import("./useColumns").Column[];
|
|
28
|
-
subTitle: number | boolean |
|
|
28
|
+
subTitle: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
29
29
|
buttons: any[] | null;
|
|
30
30
|
filter: React.JSX.Element | null;
|
|
31
31
|
onRow: (record: any) => any;
|
|
@@ -40,7 +40,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
40
40
|
width: number;
|
|
41
41
|
align: "center" | "left" | "right";
|
|
42
42
|
fixed: false | "left" | "right";
|
|
43
|
-
type: "
|
|
43
|
+
type: "link" | "button";
|
|
44
44
|
items: OperationItem[];
|
|
45
45
|
} | undefined;
|
|
46
46
|
operationContent?: {
|
|
@@ -103,11 +103,10 @@ var useTableProps = function useTableProps(props) {
|
|
|
103
103
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
104
104
|
while (1) switch (_context.prev = _context.next) {
|
|
105
105
|
case 0:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
case 3:
|
|
106
|
+
destroy === null || destroy === void 0 ? void 0 : destroy.runAsync(record.id).then(function () {
|
|
107
|
+
refreshData();
|
|
108
|
+
});
|
|
109
|
+
case 1:
|
|
111
110
|
case "end":
|
|
112
111
|
return _context.stop();
|
|
113
112
|
}
|
|
@@ -3,9 +3,11 @@ import BaseTable from "./BaseTable";
|
|
|
3
3
|
import DataSourceProvider from "../provider/dataSource/DataSourceProvider";
|
|
4
4
|
import "./index.less";
|
|
5
5
|
var DataSourceTable = function DataSourceTable(props) {
|
|
6
|
-
var dataSource = props.dataSource
|
|
6
|
+
var dataSource = props.dataSource,
|
|
7
|
+
__designMode = props.__designMode;
|
|
7
8
|
return /*#__PURE__*/React.createElement(DataSourceProvider, {
|
|
8
|
-
dataSource: dataSource
|
|
9
|
+
dataSource: dataSource,
|
|
10
|
+
__designMode: __designMode
|
|
9
11
|
}, /*#__PURE__*/React.createElement(BaseTable, props));
|
|
10
12
|
};
|
|
11
13
|
export default DataSourceTable;
|
|
@@ -9,13 +9,15 @@ var DataSourceWrapper = function DataSourceWrapper(props) {
|
|
|
9
9
|
overrideData = props.overrideData,
|
|
10
10
|
autoRun = props.autoRun,
|
|
11
11
|
actions = props.actions,
|
|
12
|
-
currentValue = props.currentValue
|
|
12
|
+
currentValue = props.currentValue,
|
|
13
|
+
__designMode = props.__designMode;
|
|
13
14
|
return /*#__PURE__*/React.createElement(DataSourceProvider, {
|
|
14
15
|
dataSource: dataSource,
|
|
15
16
|
overrideData: overrideData,
|
|
16
17
|
actions: actions,
|
|
17
18
|
autoRun: autoRun,
|
|
18
|
-
currentValue: currentValue
|
|
19
|
+
currentValue: currentValue,
|
|
20
|
+
__designMode: __designMode
|
|
19
21
|
}, /*#__PURE__*/React.createElement(BaseWrapper, props, children));
|
|
20
22
|
};
|
|
21
23
|
export default DataSourceWrapper;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CheckOutlined } from '@ant-design/icons';
|
|
3
2
|
import useValueMap from "../../hooks/useValueMap";
|
|
4
3
|
import { renderValueWithMap } from "../../dataSourceForm/utils";
|
|
5
4
|
import "./ReadPretty.less";
|
|
5
|
+
import Iconfont from "../../../iconfont";
|
|
6
6
|
var CheckboxReadPretty = function CheckboxReadPretty(props) {
|
|
7
7
|
var value = props.value;
|
|
8
|
-
return value ? /*#__PURE__*/React.createElement(
|
|
8
|
+
return value ? /*#__PURE__*/React.createElement(Iconfont, {
|
|
9
|
+
type: "pisell2-check",
|
|
9
10
|
style: {
|
|
10
|
-
color: '
|
|
11
|
+
color: 'var(--theme-color)',
|
|
12
|
+
fontSize: 20
|
|
11
13
|
}
|
|
12
14
|
}) : null;
|
|
13
15
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const ColorPicker: React.FC<import("
|
|
2
|
+
declare const ColorPicker: React.FC<import("./type").ColorPickerProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
|
|
3
3
|
export default ColorPicker;
|
|
@@ -347,7 +347,11 @@ var BaseUpload = function BaseUpload(props) {
|
|
|
347
347
|
});
|
|
348
348
|
},
|
|
349
349
|
listType: "picture-card",
|
|
350
|
-
fileList: fileList
|
|
350
|
+
fileList: fileList
|
|
351
|
+
// itemRender={(originNode, file) => {
|
|
352
|
+
// return <Image src={file.url} />
|
|
353
|
+
// }}
|
|
354
|
+
,
|
|
351
355
|
onChange: handleChange,
|
|
352
356
|
action: mediaUploadUrl,
|
|
353
357
|
method: "post",
|
|
@@ -377,7 +381,8 @@ var BaseUpload = function BaseUpload(props) {
|
|
|
377
381
|
} : {});
|
|
378
382
|
},
|
|
379
383
|
headers: getHeaders === null || getHeaders === void 0 ? void 0 : getHeaders(),
|
|
380
|
-
beforeUpload: beforeUpload
|
|
384
|
+
beforeUpload: beforeUpload,
|
|
385
|
+
className: 'pisell-data-source-upload'
|
|
381
386
|
}), fileList.length >= calcMaxCount ? null : uploadButton), previewImage && /*#__PURE__*/React.createElement(Image, {
|
|
382
387
|
wrapperStyle: {
|
|
383
388
|
display: 'none'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UploadProps } from './type';
|
|
3
|
-
|
|
3
|
+
import './ReadPretty.less';
|
|
4
|
+
declare const UploadReadPretty: (props: UploadProps) => React.JSX.Element | null;
|
|
4
5
|
export default UploadReadPretty;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Image } from 'antd';
|
|
3
|
+
import fallback from "./fallback.png";
|
|
4
|
+
import "./ReadPretty.less";
|
|
3
5
|
var UploadReadPretty = function UploadReadPretty(props) {
|
|
6
|
+
if (!props.value) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
4
9
|
return /*#__PURE__*/React.createElement(Image, {
|
|
5
|
-
|
|
10
|
+
className: "pisell-upload-read-pretty",
|
|
11
|
+
src: props === null || props === void 0 ? void 0 : props.value,
|
|
12
|
+
width: 100,
|
|
13
|
+
height: 100,
|
|
14
|
+
fallback: fallback
|
|
6
15
|
});
|
|
7
16
|
};
|
|
8
17
|
export default UploadReadPretty;
|
|
Binary file
|
|
@@ -32,6 +32,7 @@ declare const formFieldMap: {
|
|
|
32
32
|
FormItemPercent: import("react").FC<any>;
|
|
33
33
|
FormItemTimePicker: import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
34
34
|
'FormItemInput.JSON': import("react").FC<any>;
|
|
35
|
+
'FormItemInput.Email': import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
35
36
|
'FormItemInput.URL': import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
36
37
|
'FormItemInput.Password': import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
37
38
|
'FormItemRadio.Group': import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -43,7 +44,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
43
44
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
44
45
|
} & {
|
|
45
46
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
46
|
-
}) | 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("./Input/type").InputProps> & {
|
|
47
|
+
}) | 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 & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
47
48
|
JSON: import("react").FC<any>;
|
|
48
49
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
49
50
|
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>;
|
|
@@ -21,6 +21,7 @@ var formFieldMap = {
|
|
|
21
21
|
FormItemPercent: InputNumber,
|
|
22
22
|
FormItemTimePicker: TimePicker,
|
|
23
23
|
'FormItemInput.JSON': Input.JSON,
|
|
24
|
+
'FormItemInput.Email': Input.Email,
|
|
24
25
|
'FormItemInput.URL': Input.URL,
|
|
25
26
|
'FormItemInput.Password': Input.Password,
|
|
26
27
|
'FormItemRadio.Group': Radio.Group,
|
|
@@ -2,8 +2,9 @@ import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
|
2
2
|
export interface UseActionsParams {
|
|
3
3
|
dataSource?: DataSourceType;
|
|
4
4
|
currentValue?: 'server' | 'local';
|
|
5
|
+
__designMode?: string;
|
|
5
6
|
}
|
|
6
|
-
declare const useActions: ({ dataSource: propsDataSource, currentValue: propsCurrentValue, }?: UseActionsParams) => {
|
|
7
|
+
declare const useActions: ({ dataSource: propsDataSource, currentValue: propsCurrentValue, __designMode, }?: UseActionsParams) => {
|
|
7
8
|
create: (values: Record<string, any>) => Promise<any>;
|
|
8
9
|
get: () => Promise<any>;
|
|
9
10
|
update: (values: Record<string, any>) => Promise<any>;
|