@pisell/materials 2.2.20 → 2.2.21
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 +4 -4
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +4 -4
- package/es/components/page/index.js +4 -2
- package/es/components/table/Table/fields/rangePicker/Edit/index.js +13 -11
- package/lib/components/page/index.js +3 -2
- package/lib/components/table/Table/fields/rangePicker/Edit/index.js +1 -9
- package/lowcode/page/meta.ts +1 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
-
var _excluded = ["children", "style", "locale"];
|
|
2
|
+
var _excluded = ["children", "style", "className", "locale"];
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -47,6 +47,7 @@ var Page = function Page(props) {
|
|
|
47
47
|
var _context$appHelper, _context$engine, _context$engine$props, _localeDateMap;
|
|
48
48
|
var children = props.children,
|
|
49
49
|
style = props.style,
|
|
50
|
+
className = props.className,
|
|
50
51
|
propsLocale = props.locale,
|
|
51
52
|
others = _objectWithoutProperties(props, _excluded);
|
|
52
53
|
var context = useEngineContext();
|
|
@@ -252,7 +253,8 @@ var Page = function Page(props) {
|
|
|
252
253
|
}, /*#__PURE__*/React.createElement("div", {
|
|
253
254
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
254
255
|
'--theme-color': themeColor || '#7F56D9'
|
|
255
|
-
})
|
|
256
|
+
}),
|
|
257
|
+
className: className
|
|
256
258
|
}, children)))))));
|
|
257
259
|
};
|
|
258
260
|
export default Page;
|
|
@@ -1,3 +1,4 @@
|
|
|
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); }
|
|
1
2
|
var _excluded = ["value", "onChange", "onPressEnter", "onBlur", "style", "bordered", "presets", "showTime", "format"];
|
|
2
3
|
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
4
|
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; }
|
|
@@ -5,10 +6,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
5
6
|
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; }
|
|
6
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
8
|
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); }
|
|
8
|
-
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); }
|
|
9
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
10
|
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; }
|
|
11
|
-
import { isArr,
|
|
11
|
+
import { isArr, isString } from "@pisell/utils";
|
|
12
12
|
import dayjs from "dayjs";
|
|
13
13
|
import React, { forwardRef, useMemo } from "react";
|
|
14
14
|
import DatePicker from "../../../../../date-picker";
|
|
@@ -64,17 +64,19 @@ var Edit = function Edit(props, ref) {
|
|
|
64
64
|
label: getText("table-action-range-picker-presets-last-90-day"),
|
|
65
65
|
value: [dayjs().add(-90, "d").startOf("day"), dayjs().endOf("day")]
|
|
66
66
|
}];
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
|
|
68
|
+
// const _showTime = useMemo(() => {
|
|
69
|
+
// if (isBoolean(showTime)) {
|
|
70
|
+
// return showTime;
|
|
71
|
+
// } else if (typeof showTime === "object") {
|
|
72
|
+
// return showTime;
|
|
73
|
+
// }
|
|
74
|
+
// return true;
|
|
75
|
+
// }, [showTime]);
|
|
76
|
+
|
|
75
77
|
return /*#__PURE__*/React.createElement(RangePicker, _extends({}, others, {
|
|
76
78
|
format: format,
|
|
77
|
-
showTime:
|
|
79
|
+
showTime: showTime,
|
|
78
80
|
presets: presets || rangePresets,
|
|
79
81
|
ref: ref,
|
|
80
82
|
value: dayjsVal,
|
|
@@ -69,7 +69,7 @@ var localeDateMap = {
|
|
|
69
69
|
};
|
|
70
70
|
var Page = (props) => {
|
|
71
71
|
var _a, _b, _c, _d;
|
|
72
|
-
const { children, style, locale: propsLocale, ...others } = props;
|
|
72
|
+
const { children, style, className, locale: propsLocale, ...others } = props;
|
|
73
73
|
const context = (0, import_useEngineContext.default)();
|
|
74
74
|
const { platform, themeColor } = ((_a = context.appHelper) == null ? void 0 : _a.constants) || {};
|
|
75
75
|
const locale = propsLocale || ((_c = (_b = context == null ? void 0 : context.engine) == null ? void 0 : _b.props) == null ? void 0 : _c.locale) || "en";
|
|
@@ -271,7 +271,8 @@ var Page = (props) => {
|
|
|
271
271
|
/* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement(import_date_picker.LocaleProvider, { value: { locale } }, /* @__PURE__ */ import_react.default.createElement(import_pisell_config_provider.default, { locale }, /* @__PURE__ */ import_react.default.createElement(
|
|
272
272
|
"div",
|
|
273
273
|
{
|
|
274
|
-
style: { ...style, "--theme-color": themeColor || "#7F56D9" }
|
|
274
|
+
style: { ...style, "--theme-color": themeColor || "#7F56D9" },
|
|
275
|
+
className
|
|
275
276
|
},
|
|
276
277
|
children
|
|
277
278
|
))))
|
|
@@ -94,20 +94,12 @@ var Edit = (props, ref) => {
|
|
|
94
94
|
value: [(0, import_dayjs.default)().add(-90, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
95
95
|
}
|
|
96
96
|
];
|
|
97
|
-
const _showTime = (0, import_react.useMemo)(() => {
|
|
98
|
-
if ((0, import_utils.isBoolean)(showTime)) {
|
|
99
|
-
return showTime;
|
|
100
|
-
} else if (typeof showTime === "object") {
|
|
101
|
-
return showTime;
|
|
102
|
-
}
|
|
103
|
-
return true;
|
|
104
|
-
}, [showTime]);
|
|
105
97
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
106
98
|
RangePicker,
|
|
107
99
|
{
|
|
108
100
|
...others,
|
|
109
101
|
format,
|
|
110
|
-
showTime
|
|
102
|
+
showTime,
|
|
111
103
|
presets: presets || rangePresets,
|
|
112
104
|
ref,
|
|
113
105
|
value: dayjsVal,
|
package/lowcode/page/meta.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.21",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"crypto-js": "^4.2.0",
|
|
65
65
|
"@zxing/library": "0.21.2",
|
|
66
66
|
"@pisell/utils": "2.0.1",
|
|
67
|
-
"@pisell/
|
|
68
|
-
"@pisell/
|
|
67
|
+
"@pisell/date-picker": "1.0.100",
|
|
68
|
+
"@pisell/icon": "0.0.11"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"react": "^18.0.0",
|