@pisell/materials 1.0.533 → 1.0.535
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 +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -8
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +4 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +1 -1
- package/es/components/pisellViewGrid/index.js +19 -4
- package/es/components/pisellViewGrid/index.less +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -8
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +3 -1
- package/lib/components/dataSourceComponents/hooks/useActions.js +1 -1
- package/lib/components/pisellViewGrid/index.js +35 -11
- package/lib/components/pisellViewGrid/index.less +1 -0
- package/package.json +3 -3
|
@@ -65,7 +65,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
65
65
|
useCustomAction: boolean;
|
|
66
66
|
actionType: string;
|
|
67
67
|
openMode: "modal" | "drawer";
|
|
68
|
-
openContentSize: "small" | "
|
|
68
|
+
openContentSize: "small" | "middle" | "large";
|
|
69
69
|
openTitle: string;
|
|
70
70
|
key: string;
|
|
71
71
|
} | undefined;
|
|
@@ -81,12 +81,5 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
81
81
|
}[];
|
|
82
82
|
} | undefined;
|
|
83
83
|
onValuesChange?: ((changedValues: any, values: any) => void) | undefined;
|
|
84
|
-
extraParams?: {
|
|
85
|
-
list?: Record<string, any> | undefined;
|
|
86
|
-
get?: Record<string, any> | undefined;
|
|
87
|
-
update?: Record<string, any> | undefined;
|
|
88
|
-
create?: Record<string, any> | undefined;
|
|
89
|
-
destroy?: Record<string, any> | undefined;
|
|
90
|
-
} | undefined;
|
|
91
84
|
};
|
|
92
85
|
export default useTableProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["value", "onChange", "isVerification"];
|
|
1
|
+
var _excluded = ["value", "onChange", "isVerification", "disabled"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
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."); }
|
|
@@ -22,6 +22,7 @@ var PhoneInput = function PhoneInput(_ref) {
|
|
|
22
22
|
var propsValue = _ref.value,
|
|
23
23
|
onChange = _ref.onChange,
|
|
24
24
|
isVerification = _ref.isVerification,
|
|
25
|
+
disabled = _ref.disabled,
|
|
25
26
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
27
|
var _useCountries = useCountries(),
|
|
27
28
|
_useCountries$data = _useCountries.data,
|
|
@@ -102,6 +103,7 @@ var PhoneInput = function PhoneInput(_ref) {
|
|
|
102
103
|
return /*#__PURE__*/React.createElement(Space.Compact, {
|
|
103
104
|
block: true
|
|
104
105
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
106
|
+
disabled: disabled,
|
|
105
107
|
value: countryCode,
|
|
106
108
|
onChange: handleCountryChange,
|
|
107
109
|
style: {
|
|
@@ -120,6 +122,7 @@ var PhoneInput = function PhoneInput(_ref) {
|
|
|
120
122
|
};
|
|
121
123
|
})
|
|
122
124
|
}), /*#__PURE__*/React.createElement(Input, _extends({}, props, {
|
|
125
|
+
disabled: disabled,
|
|
123
126
|
status: status,
|
|
124
127
|
type: "tel",
|
|
125
128
|
value: phoneNumber,
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
7
|
import React from 'react';
|
|
2
8
|
import Loading from "../pisellLoading";
|
|
3
9
|
import classNames from 'classnames';
|
|
@@ -30,21 +36,30 @@ var PisellViewGrid = function PisellViewGrid(_ref) {
|
|
|
30
36
|
}
|
|
31
37
|
}, /*#__PURE__*/React.createElement("div", {
|
|
32
38
|
className: classes,
|
|
33
|
-
style: style
|
|
39
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
40
|
+
width: '100%',
|
|
41
|
+
overflow: 'hidden'
|
|
42
|
+
})
|
|
34
43
|
}, /*#__PURE__*/React.createElement("div", {
|
|
35
44
|
className: "pisell-view-grid-content",
|
|
36
45
|
style: !singleRow ? {
|
|
37
46
|
gap: "".concat(verticalGap, "px ").concat(horizontalGap, "px"),
|
|
38
|
-
gridTemplateColumns: "repeat(".concat(columns, ", 1fr)")
|
|
47
|
+
gridTemplateColumns: "repeat(".concat(columns, ", 1fr)"),
|
|
48
|
+
width: '100%'
|
|
39
49
|
} : {
|
|
40
50
|
display: 'flex',
|
|
41
51
|
flexWrap: 'nowrap',
|
|
42
|
-
overflowX: 'auto'
|
|
52
|
+
overflowX: 'auto',
|
|
53
|
+
width: '100%'
|
|
43
54
|
}
|
|
44
55
|
}, dataSource.map(function (item, index) {
|
|
45
56
|
return /*#__PURE__*/React.createElement("div", {
|
|
46
57
|
key: index,
|
|
47
|
-
className: "pisell-view-grid-item"
|
|
58
|
+
className: "pisell-view-grid-item",
|
|
59
|
+
style: {
|
|
60
|
+
minWidth: 0,
|
|
61
|
+
flex: "0 0 calc(100% / ".concat(columns, ")")
|
|
62
|
+
}
|
|
48
63
|
}, renderItem === null || renderItem === void 0 ? void 0 : renderItem(item, index));
|
|
49
64
|
}))));
|
|
50
65
|
};
|
|
@@ -65,7 +65,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
65
65
|
useCustomAction: boolean;
|
|
66
66
|
actionType: string;
|
|
67
67
|
openMode: "modal" | "drawer";
|
|
68
|
-
openContentSize: "small" | "
|
|
68
|
+
openContentSize: "small" | "middle" | "large";
|
|
69
69
|
openTitle: string;
|
|
70
70
|
key: string;
|
|
71
71
|
} | undefined;
|
|
@@ -81,12 +81,5 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
81
81
|
}[];
|
|
82
82
|
} | undefined;
|
|
83
83
|
onValuesChange?: ((changedValues: any, values: any) => void) | undefined;
|
|
84
|
-
extraParams?: {
|
|
85
|
-
list?: Record<string, any> | undefined;
|
|
86
|
-
get?: Record<string, any> | undefined;
|
|
87
|
-
update?: Record<string, any> | undefined;
|
|
88
|
-
create?: Record<string, any> | undefined;
|
|
89
|
-
destroy?: Record<string, any> | undefined;
|
|
90
|
-
} | undefined;
|
|
91
84
|
};
|
|
92
85
|
export default useTableProps;
|
|
@@ -42,7 +42,7 @@ var import_ReadPretty = __toESM(require("./ReadPretty"));
|
|
|
42
42
|
var import_utils2 = require("../../dataSourceForm/utils");
|
|
43
43
|
var import_useTranslationOriginal = __toESM(require("../../../../hooks/useTranslationOriginal"));
|
|
44
44
|
var { Option } = import_select.default;
|
|
45
|
-
var PhoneInput = ({ value: propsValue, onChange, isVerification, ...props }) => {
|
|
45
|
+
var PhoneInput = ({ value: propsValue, onChange, isVerification, disabled, ...props }) => {
|
|
46
46
|
const { data: countries = [] } = (0, import_serve.useCountries)();
|
|
47
47
|
const translationOriginal = (0, import_useTranslationOriginal.default)();
|
|
48
48
|
const value = (0, import_react.useMemo)(() => {
|
|
@@ -106,6 +106,7 @@ var PhoneInput = ({ value: propsValue, onChange, isVerification, ...props }) =>
|
|
|
106
106
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Space.Compact, { block: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
107
107
|
import_select.default,
|
|
108
108
|
{
|
|
109
|
+
disabled,
|
|
109
110
|
value: countryCode,
|
|
110
111
|
onChange: handleCountryChange,
|
|
111
112
|
style: { width: "90px" },
|
|
@@ -124,6 +125,7 @@ var PhoneInput = ({ value: propsValue, onChange, isVerification, ...props }) =>
|
|
|
124
125
|
import_antd.Input,
|
|
125
126
|
{
|
|
126
127
|
...props,
|
|
128
|
+
disabled,
|
|
127
129
|
status,
|
|
128
130
|
type: "tel",
|
|
129
131
|
value: phoneNumber,
|
|
@@ -55,20 +55,44 @@ var PisellViewGrid = ({
|
|
|
55
55
|
},
|
|
56
56
|
className
|
|
57
57
|
);
|
|
58
|
-
return /* @__PURE__ */ import_react.default.createElement(import_pisellLoading.default, { loading, fullscreen: false, style: { width: "100%" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
58
|
+
return /* @__PURE__ */ import_react.default.createElement(import_pisellLoading.default, { loading, fullscreen: false, style: { width: "100%" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
61
|
-
className:
|
|
62
|
-
style:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
display: "flex",
|
|
67
|
-
flexWrap: "nowrap",
|
|
68
|
-
overflowX: "auto"
|
|
61
|
+
className: classes,
|
|
62
|
+
style: {
|
|
63
|
+
...style,
|
|
64
|
+
width: "100%",
|
|
65
|
+
overflow: "hidden"
|
|
69
66
|
}
|
|
70
67
|
},
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: "pisell-view-grid-content",
|
|
72
|
+
style: !singleRow ? {
|
|
73
|
+
gap: `${verticalGap}px ${horizontalGap}px`,
|
|
74
|
+
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
75
|
+
width: "100%"
|
|
76
|
+
} : {
|
|
77
|
+
display: "flex",
|
|
78
|
+
flexWrap: "nowrap",
|
|
79
|
+
overflowX: "auto",
|
|
80
|
+
width: "100%"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
dataSource.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
key: index,
|
|
87
|
+
className: "pisell-view-grid-item",
|
|
88
|
+
style: {
|
|
89
|
+
minWidth: 0,
|
|
90
|
+
flex: `0 0 calc(100% / ${columns})`
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
renderItem == null ? void 0 : renderItem(item, index)
|
|
94
|
+
))
|
|
95
|
+
)
|
|
96
|
+
));
|
|
73
97
|
};
|
|
74
98
|
var pisellViewGrid_default = PisellViewGrid;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.535",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"libphonenumber-js": "^1.11.17",
|
|
70
70
|
"swiper": "^8.4.7",
|
|
71
71
|
"react-barcode": "^1.5.3",
|
|
72
|
-
"@pisell/
|
|
72
|
+
"@pisell/utils": "1.0.43",
|
|
73
73
|
"@pisell/icon": "0.0.10",
|
|
74
|
-
"@pisell/
|
|
74
|
+
"@pisell/date-picker": "1.0.115"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"react": "^18.0.0",
|