@pisell/materials 1.0.612 → 1.0.613
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 +25 -25
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +15 -15
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +1 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +9 -3
- package/es/components/pisellLayout/content.d.ts +2 -0
- package/es/components/pisellLayout/content.js +24 -2
- package/es/components/pisellLayout/footer.d.ts +1 -0
- package/es/components/pisellLayout/footer.js +18 -3
- package/es/components/pisellLayout/header.d.ts +3 -0
- package/es/components/pisellLayout/header.js +26 -3
- package/es/components/pisellLayout/index.js +4 -1
- package/es/components/pisellLayout/index.less +23 -0
- package/es/components/pisellLayout/sider.d.ts +1 -0
- package/es/components/pisellLayout/sider.js +32 -3
- package/lib/components/dataSourceComponents/fields/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/hooks/useActions.js +3 -0
- package/lib/components/pisellLayout/content.d.ts +2 -0
- package/lib/components/pisellLayout/content.js +12 -2
- package/lib/components/pisellLayout/footer.d.ts +1 -0
- package/lib/components/pisellLayout/footer.js +8 -2
- package/lib/components/pisellLayout/header.d.ts +3 -0
- package/lib/components/pisellLayout/header.js +13 -2
- package/lib/components/pisellLayout/index.js +3 -0
- package/lib/components/pisellLayout/index.less +23 -0
- package/lib/components/pisellLayout/sider.d.ts +1 -0
- package/lib/components/pisellLayout/sider.js +23 -2
- package/lowcode/pisell-content/__screenshots__/content.png +0 -0
- package/lowcode/pisell-content/meta.ts +28 -5
- package/lowcode/pisell-footer/__screenshots__/footer.png +0 -0
- package/lowcode/pisell-footer/meta.ts +17 -4
- package/lowcode/pisell-header/__screenshots__/header.png +0 -0
- package/lowcode/pisell-header/meta.ts +29 -5
- package/lowcode/pisell-layout/__screenshots__/layout.png +0 -0
- package/lowcode/pisell-layout/meta.ts +10 -5
- package/lowcode/pisell-sider/__screenshots__/sider.png +0 -0
- package/lowcode/pisell-sider/meta.ts +41 -4
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.707 4.293a1 1 0 0 1 0 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l5.293 5.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L16.586 13H5a1 1 0 1 1 0-2h11.586l-5.293-5.293a1 1 0 0 1 0-1.414Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11.258-3.976a2 2 0 0 0-2.225 1.308 1 1 0 1 1-1.886-.664 4 4 0 0 1 7.773 1.333c0 1.53-1.135 2.54-1.945 3.081a8.044 8.044 0 0 1-1.686.848l-.035.013-.011.003-.004.002h-.002L11.92 13l.316.949a1 1 0 0 1-.633-1.897l.016-.006.074-.027a6.051 6.051 0 0 0 1.172-.6c.69-.46 1.055-.95 1.055-1.419v-.001a2 2 0 0 0-1.662-1.975ZM11 17a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L8 6.414V20a1 1 0 1 1-2 0V6.414L3.707 8.707a1 1 0 0 1-1.414-1.414l4-4ZM16 17.586V4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L16 17.586Z"/></svg>
|
|
@@ -59,7 +59,7 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<any> | (import("react").FC<{}> & {
|
|
63
63
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
64
|
} & {
|
|
65
65
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -116,13 +116,19 @@ var useActions = function useActions() {
|
|
|
116
116
|
case 2:
|
|
117
117
|
result = _context.sent;
|
|
118
118
|
if (!['pisell2-api', 'mypisell-api'].includes(dataSourceKey)) {
|
|
119
|
-
_context.next =
|
|
119
|
+
_context.next = 7;
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
if (!('mypisell-api' === dataSourceKey && designMode === 'design')) {
|
|
123
|
+
_context.next = 6;
|
|
120
124
|
break;
|
|
121
125
|
}
|
|
122
|
-
return _context.abrupt("return", result.data);
|
|
123
|
-
case 5:
|
|
124
126
|
return _context.abrupt("return", result);
|
|
125
127
|
case 6:
|
|
128
|
+
return _context.abrupt("return", result.data);
|
|
129
|
+
case 7:
|
|
130
|
+
return _context.abrupt("return", result);
|
|
131
|
+
case 8:
|
|
126
132
|
case "end":
|
|
127
133
|
return _context.stop();
|
|
128
134
|
}
|
|
@@ -3,6 +3,8 @@ import React from 'react';
|
|
|
3
3
|
export interface PisellContentProps extends Omit<LayoutProps, 'prefixCls'> {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
__designMode?: string;
|
|
6
|
+
height?: number;
|
|
7
|
+
scroll?: boolean;
|
|
6
8
|
}
|
|
7
9
|
declare const PisellContent: React.FC<PisellContentProps>;
|
|
8
10
|
export default PisellContent;
|
|
@@ -1,12 +1,23 @@
|
|
|
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", "className", "height", "scroll"];
|
|
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
|
+
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
|
+
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; }
|
|
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; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
2
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; }
|
|
3
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; }
|
|
4
11
|
import { Layout } from 'antd';
|
|
12
|
+
import classNames from 'classnames';
|
|
5
13
|
import React, { useMemo } from 'react';
|
|
6
14
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
7
15
|
var Content = Layout.Content;
|
|
8
16
|
var PisellContent = function PisellContent(props) {
|
|
9
17
|
var children = props.children,
|
|
18
|
+
className = props.className,
|
|
19
|
+
height = props.height,
|
|
20
|
+
scroll = props.scroll,
|
|
10
21
|
rest = _objectWithoutProperties(props, _excluded);
|
|
11
22
|
var lowCodeProps = useEngineContext();
|
|
12
23
|
|
|
@@ -24,6 +35,17 @@ var PisellContent = function PisellContent(props) {
|
|
|
24
35
|
}
|
|
25
36
|
return lowCodeProps.children;
|
|
26
37
|
}, [props.__designMode]);
|
|
27
|
-
|
|
38
|
+
var contentStyle = useMemo(function () {
|
|
39
|
+
return _objectSpread({
|
|
40
|
+
height: height
|
|
41
|
+
}, rest.style);
|
|
42
|
+
}, [height, rest.style]);
|
|
43
|
+
var contentClassName = classNames('pisell-layout-content', className, {
|
|
44
|
+
'pisell-layout-content-scroll': scroll
|
|
45
|
+
});
|
|
46
|
+
return /*#__PURE__*/React.createElement(Content, _extends({}, rest, {
|
|
47
|
+
style: contentStyle,
|
|
48
|
+
className: contentClassName
|
|
49
|
+
}), children, pageContent);
|
|
28
50
|
};
|
|
29
51
|
export default PisellContent;
|
|
@@ -2,6 +2,7 @@ import type { LayoutProps } from 'antd';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export interface PisellFooterProps extends Omit<LayoutProps, 'prefixCls'> {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
+
height?: number;
|
|
5
6
|
}
|
|
6
7
|
declare const PisellFooter: React.FC<PisellFooterProps>;
|
|
7
8
|
export default PisellFooter;
|
|
@@ -1,12 +1,27 @@
|
|
|
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", "height"];
|
|
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
|
+
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
|
+
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; }
|
|
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; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
2
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; }
|
|
3
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; }
|
|
4
11
|
import { Layout } from 'antd';
|
|
5
|
-
import React from 'react';
|
|
12
|
+
import React, { useMemo } from 'react';
|
|
6
13
|
var Footer = Layout.Footer;
|
|
7
14
|
var PisellFooter = function PisellFooter(props) {
|
|
8
15
|
var children = props.children,
|
|
16
|
+
height = props.height,
|
|
9
17
|
rest = _objectWithoutProperties(props, _excluded);
|
|
10
|
-
|
|
18
|
+
var footerStyle = useMemo(function () {
|
|
19
|
+
return _objectSpread({
|
|
20
|
+
height: height
|
|
21
|
+
}, rest.style);
|
|
22
|
+
}, [height, rest.style]);
|
|
23
|
+
return /*#__PURE__*/React.createElement(Footer, _extends({}, rest, {
|
|
24
|
+
style: footerStyle
|
|
25
|
+
}), children);
|
|
11
26
|
};
|
|
12
27
|
export default PisellFooter;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { LayoutProps } from 'antd';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import './index.less';
|
|
3
4
|
export interface PisellHeaderProps extends Omit<LayoutProps, 'prefixCls'> {
|
|
4
5
|
children?: React.ReactNode;
|
|
6
|
+
height?: number;
|
|
7
|
+
fixed?: boolean;
|
|
5
8
|
}
|
|
6
9
|
declare const PisellHeader: React.FC<PisellHeaderProps>;
|
|
7
10
|
export default PisellHeader;
|
|
@@ -1,12 +1,35 @@
|
|
|
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", "className", "height", "fixed"];
|
|
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
|
+
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
|
+
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; }
|
|
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; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
2
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; }
|
|
3
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; }
|
|
4
11
|
import { Layout } from 'antd';
|
|
5
|
-
import
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import React, { useMemo } from 'react';
|
|
14
|
+
import "./index.less";
|
|
6
15
|
var Header = Layout.Header;
|
|
7
16
|
var PisellHeader = function PisellHeader(props) {
|
|
8
17
|
var children = props.children,
|
|
18
|
+
className = props.className,
|
|
19
|
+
height = props.height,
|
|
20
|
+
fixed = props.fixed,
|
|
9
21
|
rest = _objectWithoutProperties(props, _excluded);
|
|
10
|
-
|
|
22
|
+
var headerStyle = useMemo(function () {
|
|
23
|
+
return _objectSpread({
|
|
24
|
+
height: height
|
|
25
|
+
}, rest.style);
|
|
26
|
+
}, [height, rest.style]);
|
|
27
|
+
var headerClassName = classNames('pisell-layout-header', className, {
|
|
28
|
+
// 'pisell-layout-header-fixed': fixed,
|
|
29
|
+
});
|
|
30
|
+
return /*#__PURE__*/React.createElement(Header, _extends({}, rest, {
|
|
31
|
+
style: headerStyle,
|
|
32
|
+
className: headerClassName
|
|
33
|
+
}), children);
|
|
11
34
|
};
|
|
12
35
|
export default PisellHeader;
|
|
@@ -2,10 +2,13 @@ var _excluded = ["children"];
|
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
4
|
import { Layout } from 'antd';
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { useEffect } from 'react';
|
|
6
6
|
var PisellLayout = function PisellLayout(props) {
|
|
7
7
|
var children = props.children,
|
|
8
8
|
rest = _objectWithoutProperties(props, _excluded);
|
|
9
|
+
useEffect(function () {
|
|
10
|
+
document.body.id = 'body';
|
|
11
|
+
}, []);
|
|
9
12
|
return /*#__PURE__*/React.createElement(Layout, rest, children);
|
|
10
13
|
};
|
|
11
14
|
PisellLayout.Header = Layout.Header;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.pisell-layout {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.pisell-layout-header {}
|
|
6
|
+
|
|
7
|
+
.pisell-layout-header-fixed {
|
|
8
|
+
position: sticky;
|
|
9
|
+
top: 0;
|
|
10
|
+
z-index: 100;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pisell-layout-content {}
|
|
14
|
+
|
|
15
|
+
.pisell-layout-content-scroll {
|
|
16
|
+
overflow-y: auto;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pisell-layout-sider {}
|
|
20
|
+
|
|
21
|
+
.pisell-lowcode-layout-sider-trigger {
|
|
22
|
+
position: unset;
|
|
23
|
+
}
|
|
@@ -1,12 +1,41 @@
|
|
|
1
|
-
var _excluded = ["children"];
|
|
1
|
+
var _excluded = ["children", "collapsible", "collapsed", "onCollapse"];
|
|
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
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."); }
|
|
5
|
+
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); }
|
|
6
|
+
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; }
|
|
7
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
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; }
|
|
3
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; }
|
|
4
11
|
import { Layout } from 'antd';
|
|
5
|
-
import
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import React, { useEffect, useState } from 'react';
|
|
14
|
+
import "./index.less";
|
|
6
15
|
var Sider = Layout.Sider;
|
|
7
16
|
var PisellSider = function PisellSider(props) {
|
|
8
17
|
var children = props.children,
|
|
18
|
+
collapsible = props.collapsible,
|
|
19
|
+
collapsed = props.collapsed,
|
|
20
|
+
onCollapse = props.onCollapse,
|
|
9
21
|
rest = _objectWithoutProperties(props, _excluded);
|
|
10
|
-
|
|
22
|
+
var _useState = useState(collapsed),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
collapsedState = _useState2[0],
|
|
25
|
+
setCollapsedState = _useState2[1];
|
|
26
|
+
var className = classNames('pisell-layout-sider', props.className);
|
|
27
|
+
var _onCollapse = function _onCollapse(val, type) {
|
|
28
|
+
onCollapse === null || onCollapse === void 0 ? void 0 : onCollapse(val, type);
|
|
29
|
+
setCollapsedState(val);
|
|
30
|
+
};
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
setCollapsedState(collapsed);
|
|
33
|
+
}, [collapsed]);
|
|
34
|
+
return /*#__PURE__*/React.createElement(Sider, _extends({}, rest, {
|
|
35
|
+
collapsible: collapsible,
|
|
36
|
+
collapsed: collapsedState,
|
|
37
|
+
onCollapse: _onCollapse,
|
|
38
|
+
className: className
|
|
39
|
+
}), children);
|
|
11
40
|
};
|
|
12
41
|
export default PisellSider;
|
|
@@ -59,7 +59,7 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<any> | (import("react").FC<{}> & {
|
|
63
63
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
64
|
} & {
|
|
65
65
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -3,6 +3,8 @@ import React from 'react';
|
|
|
3
3
|
export interface PisellContentProps extends Omit<LayoutProps, 'prefixCls'> {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
__designMode?: string;
|
|
6
|
+
height?: number;
|
|
7
|
+
scroll?: boolean;
|
|
6
8
|
}
|
|
7
9
|
declare const PisellContent: React.FC<PisellContentProps>;
|
|
8
10
|
export default PisellContent;
|
|
@@ -33,11 +33,12 @@ __export(content_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(content_exports);
|
|
35
35
|
var import_antd = require("antd");
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
36
37
|
var import_react = __toESM(require("react"));
|
|
37
38
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
38
39
|
var { Content } = import_antd.Layout;
|
|
39
40
|
var PisellContent = (props) => {
|
|
40
|
-
const { children, ...rest } = props;
|
|
41
|
+
const { children, className, height, scroll, ...rest } = props;
|
|
41
42
|
const lowCodeProps = (0, import_useEngineContext.default)();
|
|
42
43
|
const pageContent = (0, import_react.useMemo)(() => {
|
|
43
44
|
if (props.__designMode === "design") {
|
|
@@ -45,6 +46,15 @@ var PisellContent = (props) => {
|
|
|
45
46
|
}
|
|
46
47
|
return lowCodeProps.children;
|
|
47
48
|
}, [props.__designMode]);
|
|
48
|
-
|
|
49
|
+
const contentStyle = (0, import_react.useMemo)(() => {
|
|
50
|
+
return {
|
|
51
|
+
height,
|
|
52
|
+
...rest.style
|
|
53
|
+
};
|
|
54
|
+
}, [height, rest.style]);
|
|
55
|
+
const contentClassName = (0, import_classnames.default)("pisell-layout-content", className, {
|
|
56
|
+
"pisell-layout-content-scroll": scroll
|
|
57
|
+
});
|
|
58
|
+
return /* @__PURE__ */ import_react.default.createElement(Content, { ...rest, style: contentStyle, className: contentClassName }, children, pageContent);
|
|
49
59
|
};
|
|
50
60
|
var content_default = PisellContent;
|
|
@@ -2,6 +2,7 @@ import type { LayoutProps } from 'antd';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export interface PisellFooterProps extends Omit<LayoutProps, 'prefixCls'> {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
+
height?: number;
|
|
5
6
|
}
|
|
6
7
|
declare const PisellFooter: React.FC<PisellFooterProps>;
|
|
7
8
|
export default PisellFooter;
|
|
@@ -36,7 +36,13 @@ var import_antd = require("antd");
|
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var { Footer } = import_antd.Layout;
|
|
38
38
|
var PisellFooter = (props) => {
|
|
39
|
-
const { children, ...rest } = props;
|
|
40
|
-
|
|
39
|
+
const { children, height, ...rest } = props;
|
|
40
|
+
const footerStyle = (0, import_react.useMemo)(() => {
|
|
41
|
+
return {
|
|
42
|
+
height,
|
|
43
|
+
...rest.style
|
|
44
|
+
};
|
|
45
|
+
}, [height, rest.style]);
|
|
46
|
+
return /* @__PURE__ */ import_react.default.createElement(Footer, { ...rest, style: footerStyle }, children);
|
|
41
47
|
};
|
|
42
48
|
var footer_default = PisellFooter;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { LayoutProps } from 'antd';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import './index.less';
|
|
3
4
|
export interface PisellHeaderProps extends Omit<LayoutProps, 'prefixCls'> {
|
|
4
5
|
children?: React.ReactNode;
|
|
6
|
+
height?: number;
|
|
7
|
+
fixed?: boolean;
|
|
5
8
|
}
|
|
6
9
|
declare const PisellHeader: React.FC<PisellHeaderProps>;
|
|
7
10
|
export default PisellHeader;
|
|
@@ -33,10 +33,21 @@ __export(header_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(header_exports);
|
|
35
35
|
var import_antd = require("antd");
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
36
37
|
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
37
39
|
var { Header } = import_antd.Layout;
|
|
38
40
|
var PisellHeader = (props) => {
|
|
39
|
-
const { children, ...rest } = props;
|
|
40
|
-
|
|
41
|
+
const { children, className, height, fixed, ...rest } = props;
|
|
42
|
+
const headerStyle = (0, import_react.useMemo)(() => {
|
|
43
|
+
return {
|
|
44
|
+
height,
|
|
45
|
+
...rest.style
|
|
46
|
+
};
|
|
47
|
+
}, [height, rest.style]);
|
|
48
|
+
const headerClassName = (0, import_classnames.default)("pisell-layout-header", className, {
|
|
49
|
+
// 'pisell-layout-header-fixed': fixed,
|
|
50
|
+
});
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement(Header, { ...rest, style: headerStyle, className: headerClassName }, children);
|
|
41
52
|
};
|
|
42
53
|
var header_default = PisellHeader;
|
|
@@ -36,6 +36,9 @@ var import_antd = require("antd");
|
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var PisellLayout = (props) => {
|
|
38
38
|
const { children, ...rest } = props;
|
|
39
|
+
(0, import_react.useEffect)(() => {
|
|
40
|
+
document.body.id = "body";
|
|
41
|
+
}, []);
|
|
39
42
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Layout, { ...rest }, children);
|
|
40
43
|
};
|
|
41
44
|
PisellLayout.Header = import_antd.Layout.Header;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.pisell-layout {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.pisell-layout-header {}
|
|
6
|
+
|
|
7
|
+
.pisell-layout-header-fixed {
|
|
8
|
+
position: sticky;
|
|
9
|
+
top: 0;
|
|
10
|
+
z-index: 100;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pisell-layout-content {}
|
|
14
|
+
|
|
15
|
+
.pisell-layout-content-scroll {
|
|
16
|
+
overflow-y: auto;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pisell-layout-sider {}
|
|
20
|
+
|
|
21
|
+
.pisell-lowcode-layout-sider-trigger {
|
|
22
|
+
position: unset;
|
|
23
|
+
}
|
|
@@ -33,10 +33,31 @@ __export(sider_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sider_exports);
|
|
35
35
|
var import_antd = require("antd");
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
36
37
|
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
37
39
|
var { Sider } = import_antd.Layout;
|
|
38
40
|
var PisellSider = (props) => {
|
|
39
|
-
const { children, ...rest } = props;
|
|
40
|
-
|
|
41
|
+
const { children, collapsible, collapsed, onCollapse, ...rest } = props;
|
|
42
|
+
const [collapsedState, setCollapsedState] = (0, import_react.useState)(collapsed);
|
|
43
|
+
const className = (0, import_classnames.default)("pisell-layout-sider", props.className);
|
|
44
|
+
const _onCollapse = (val, type) => {
|
|
45
|
+
onCollapse == null ? void 0 : onCollapse(val, type);
|
|
46
|
+
setCollapsedState(val);
|
|
47
|
+
};
|
|
48
|
+
(0, import_react.useEffect)(() => {
|
|
49
|
+
setCollapsedState(collapsed);
|
|
50
|
+
}, [collapsed]);
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
Sider,
|
|
53
|
+
{
|
|
54
|
+
...rest,
|
|
55
|
+
collapsible,
|
|
56
|
+
collapsed: collapsedState,
|
|
57
|
+
onCollapse: _onCollapse,
|
|
58
|
+
className
|
|
59
|
+
},
|
|
60
|
+
children
|
|
61
|
+
);
|
|
41
62
|
};
|
|
42
63
|
var sider_default = PisellSider;
|
|
Binary file
|
|
@@ -2,10 +2,11 @@ import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
|
2
2
|
|
|
3
3
|
const PisellContentMeta: ComponentMetadata = {
|
|
4
4
|
componentName: 'PisellContent',
|
|
5
|
-
title: '
|
|
5
|
+
title: '内容',
|
|
6
6
|
docUrl: '',
|
|
7
|
-
screenshot: '',
|
|
7
|
+
screenshot: require('./__screenshots__/content.png'),
|
|
8
8
|
devMode: 'proCode',
|
|
9
|
+
category: "布局",
|
|
9
10
|
npm: {
|
|
10
11
|
package: '@pisell/materials',
|
|
11
12
|
version: '1.0.3',
|
|
@@ -26,6 +27,17 @@ const PisellContentMeta: ComponentMetadata = {
|
|
|
26
27
|
name: 'className',
|
|
27
28
|
setter: 'StringSetter',
|
|
28
29
|
},
|
|
30
|
+
{
|
|
31
|
+
title: {
|
|
32
|
+
label: {
|
|
33
|
+
type: 'i18n',
|
|
34
|
+
'en-US': 'height',
|
|
35
|
+
'zh-CN': '高度',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
name: 'height',
|
|
39
|
+
setter: 'NumberSetter',
|
|
40
|
+
},
|
|
29
41
|
{
|
|
30
42
|
title: {
|
|
31
43
|
label: {
|
|
@@ -37,6 +49,17 @@ const PisellContentMeta: ComponentMetadata = {
|
|
|
37
49
|
name: 'children',
|
|
38
50
|
setter: ['SlotSetter'],
|
|
39
51
|
},
|
|
52
|
+
{
|
|
53
|
+
title: {
|
|
54
|
+
label: {
|
|
55
|
+
type: 'i18n',
|
|
56
|
+
'en-US': 'Content scrolling',
|
|
57
|
+
'zh-CN': '内容滚动',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
name: 'scroll',
|
|
61
|
+
setter: 'BoolSetter',
|
|
62
|
+
},
|
|
40
63
|
{
|
|
41
64
|
title: {
|
|
42
65
|
label: {
|
|
@@ -62,8 +85,8 @@ const PisellContentMeta: ComponentMetadata = {
|
|
|
62
85
|
|
|
63
86
|
const snippets: Snippet[] = [
|
|
64
87
|
{
|
|
65
|
-
title: '
|
|
66
|
-
screenshot: '',
|
|
88
|
+
title: '内容',
|
|
89
|
+
screenshot: require('./__screenshots__/content.png'),
|
|
67
90
|
schema: {
|
|
68
91
|
componentName: 'PisellContent',
|
|
69
92
|
props: {
|
|
@@ -74,7 +97,7 @@ const snippets: Snippet[] = [
|
|
|
74
97
|
lineHeight: '120px',
|
|
75
98
|
textAlign: 'center',
|
|
76
99
|
},
|
|
77
|
-
|
|
100
|
+
scroll: true,
|
|
78
101
|
},
|
|
79
102
|
},
|
|
80
103
|
},
|
|
Binary file
|