@pisell/materials 1.0.611 → 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 +20 -12
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +28 -14
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +35 -21
- 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/Pagination/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +36 -5
- package/es/components/dataSourceComponents/hooks/useActions.js +9 -3
- package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +1 -0
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +1 -0
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.js +9 -2
- package/es/components/pisellDraggable/index.d.ts +4 -2
- package/es/components/pisellDraggable/index.js +7 -4
- package/es/components/pisellDropSort/PisellDropSort.js +4 -2
- package/es/components/pisellDropSort/components/SortableItem/index.d.ts +2 -0
- package/es/components/pisellDropSort/components/SortableItem/index.js +9 -2
- package/es/components/pisellDropSort/types.d.ts +2 -0
- 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/Pagination/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +30 -3
- package/lib/components/dataSourceComponents/hooks/useActions.js +3 -0
- package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +1 -0
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +1 -0
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.js +7 -1
- package/lib/components/pisellDraggable/index.d.ts +4 -2
- package/lib/components/pisellDraggable/index.js +7 -4
- package/lib/components/pisellDropSort/PisellDropSort.js +4 -2
- package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +2 -0
- package/lib/components/pisellDropSort/components/SortableItem/index.js +3 -2
- package/lib/components/pisellDropSort/types.d.ts +2 -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 +1 -1
|
@@ -17,7 +17,7 @@ interface UseTablePropsProps {
|
|
|
17
17
|
* @returns
|
|
18
18
|
*/
|
|
19
19
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
20
|
-
title: number | boolean | React.
|
|
20
|
+
title: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
21
21
|
pagination: {
|
|
22
22
|
total: number;
|
|
23
23
|
current: number;
|
|
@@ -26,7 +26,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
26
26
|
showSizeChanger: boolean;
|
|
27
27
|
};
|
|
28
28
|
columns: import("./useColumns").Column[];
|
|
29
|
-
subTitle: number | boolean | React.
|
|
29
|
+
subTitle: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
30
30
|
buttons: any[] | null;
|
|
31
31
|
filter: React.JSX.Element | null;
|
|
32
32
|
onRow: (record: any) => any;
|
|
@@ -47,7 +47,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
47
47
|
width: number;
|
|
48
48
|
align: "center" | "left" | "right";
|
|
49
49
|
fixed: false | "left" | "right";
|
|
50
|
-
type: "
|
|
50
|
+
type: "button" | "link";
|
|
51
51
|
items: OperationItem[];
|
|
52
52
|
} | undefined;
|
|
53
53
|
operationContent?: {
|
|
@@ -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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DatePickerProps } from './type';
|
|
3
3
|
import './ReadPretty.less';
|
|
4
|
-
declare const DatePickerReadPretty:
|
|
4
|
+
declare const DatePickerReadPretty: React.FC<DatePickerProps>;
|
|
5
5
|
export default DatePickerReadPretty;
|
|
@@ -35,9 +35,36 @@ module.exports = __toCommonJS(ReadPretty_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_classnames = __toESM(require("classnames"));
|
|
37
37
|
var import_dayjs = __toESM(require("dayjs"));
|
|
38
|
+
var import_usePisellConfig = __toESM(require("../../../pisell-config-provider/hooks/usePisellConfig"));
|
|
38
39
|
var import_ReadPretty = require("./ReadPretty.less");
|
|
39
|
-
var
|
|
40
|
-
|
|
40
|
+
var DEFAULT_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
|
41
|
+
var DATE_FORMATS = {
|
|
42
|
+
"zh-CN": "YYYY-MM-DD HH:mm:ss",
|
|
43
|
+
"en-US": "HH:mm:ss YYYY-MM-DD"
|
|
44
|
+
};
|
|
45
|
+
var DatePickerReadPretty = ({ value, renderMode }) => {
|
|
46
|
+
const { locale = "zh-CN" } = (0, import_usePisellConfig.default)();
|
|
47
|
+
const dateFormat = (0, import_react.useMemo)(() => {
|
|
48
|
+
if (locale in DATE_FORMATS) {
|
|
49
|
+
return DATE_FORMATS[locale];
|
|
50
|
+
}
|
|
51
|
+
if (process.env.NODE_ENV !== "production") {
|
|
52
|
+
console.warn(`Unsupported locale: ${locale}, falling back to default format`);
|
|
53
|
+
}
|
|
54
|
+
return DEFAULT_FORMAT;
|
|
55
|
+
}, [locale]);
|
|
56
|
+
const formattedDate = (0, import_react.useMemo)(() => {
|
|
57
|
+
if (!value)
|
|
58
|
+
return "";
|
|
59
|
+
try {
|
|
60
|
+
return (0, import_dayjs.default)(value).format(dateFormat);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
if (process.env.NODE_ENV !== "production") {
|
|
63
|
+
console.error("Error formatting date:", error);
|
|
64
|
+
}
|
|
65
|
+
return "";
|
|
66
|
+
}
|
|
67
|
+
}, [value, dateFormat]);
|
|
41
68
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
42
69
|
"span",
|
|
43
70
|
{
|
|
@@ -45,7 +72,7 @@ var DatePickerReadPretty = (props) => {
|
|
|
45
72
|
"pisell-date-picker-read-pretty-table-view": renderMode === "tableView"
|
|
46
73
|
})
|
|
47
74
|
},
|
|
48
|
-
|
|
75
|
+
formattedDate
|
|
49
76
|
);
|
|
50
77
|
};
|
|
51
78
|
var ReadPretty_default = DatePickerReadPretty;
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Props as TreeItemProps } from './TreeItem';
|
|
4
4
|
interface Props extends TreeItemProps {
|
|
5
5
|
id: UniqueIdentifier;
|
|
6
|
+
__designMode?: string;
|
|
6
7
|
}
|
|
7
8
|
export declare function SortableTreeItem({ id, depth, ...props }: Props): React.JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -17,5 +17,6 @@ export interface Props extends Omit<HTMLAttributes<HTMLLIElement>, 'id'> {
|
|
|
17
17
|
wrapperRef?(node: HTMLLIElement): void;
|
|
18
18
|
item: TreeItemType;
|
|
19
19
|
renderItem?(item: Props, ref: React.ForwardedRef<HTMLDivElement>): React.ReactNode;
|
|
20
|
+
__designMode?: string;
|
|
20
21
|
}
|
|
21
22
|
export declare const TreeItem: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -54,6 +54,7 @@ var TreeItem = (0, import_react.forwardRef)((props, ref) => {
|
|
|
54
54
|
wrapperRef,
|
|
55
55
|
item,
|
|
56
56
|
renderItem,
|
|
57
|
+
__designMode,
|
|
57
58
|
...otherProps
|
|
58
59
|
} = props;
|
|
59
60
|
if (renderItem) {
|
|
@@ -76,7 +77,12 @@ var TreeItem = (0, import_react.forwardRef)((props, ref) => {
|
|
|
76
77
|
},
|
|
77
78
|
...otherProps
|
|
78
79
|
},
|
|
79
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "TreeItem", ref, style }, /* @__PURE__ */ import_react.default.createElement(
|
|
80
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "TreeItem", ref, style }, /* @__PURE__ */ import_react.default.createElement(
|
|
81
|
+
import_components.Handle,
|
|
82
|
+
{
|
|
83
|
+
...__designMode === "design" ? {} : { ...handleProps }
|
|
84
|
+
}
|
|
85
|
+
), onCollapse && /* @__PURE__ */ import_react.default.createElement(
|
|
80
86
|
import_components.Action,
|
|
81
87
|
{
|
|
82
88
|
onClick: onCollapse,
|
|
@@ -22,7 +22,9 @@ interface Props {
|
|
|
22
22
|
onChange?: (items: TreeItems) => void;
|
|
23
23
|
/** 删除节点前 */
|
|
24
24
|
onRemoveBefore?: (item: TreeItem) => Promise<boolean>;
|
|
25
|
+
/** 设计模式 */
|
|
26
|
+
__designMode?: string;
|
|
25
27
|
}
|
|
26
|
-
export declare function SortableTree({ collapsible, value, indicator, indentationWidth, removable, renderItem, onChange, onRemoveBefore, }: Props): React.JSX.Element;
|
|
27
|
-
declare const Demo: () => React.JSX.Element;
|
|
28
|
+
export declare function SortableTree({ collapsible, value, indicator, indentationWidth, removable, renderItem, onChange, onRemoveBefore, __designMode, }: Props): React.JSX.Element;
|
|
29
|
+
declare const Demo: (props: Props) => React.JSX.Element;
|
|
28
30
|
export default Demo;
|
|
@@ -101,7 +101,8 @@ function SortableTree({
|
|
|
101
101
|
removable = true,
|
|
102
102
|
renderItem,
|
|
103
103
|
onChange,
|
|
104
|
-
onRemoveBefore
|
|
104
|
+
onRemoveBefore,
|
|
105
|
+
__designMode
|
|
105
106
|
}) {
|
|
106
107
|
const [items, setItems] = (0, import_react.useState)([]);
|
|
107
108
|
const [activeId, setActiveId] = (0, import_react.useState)(null);
|
|
@@ -148,6 +149,7 @@ function SortableTree({
|
|
|
148
149
|
(0, import_react.useEffect)(() => {
|
|
149
150
|
document.body.id = "body";
|
|
150
151
|
}, []);
|
|
152
|
+
console.log(__designMode, "__designMode");
|
|
151
153
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
152
154
|
import_core.DndContext,
|
|
153
155
|
{
|
|
@@ -174,7 +176,8 @@ function SortableTree({
|
|
|
174
176
|
collapsed: Boolean(collapsed && children.length),
|
|
175
177
|
onCollapse: collapsible && children.length ? () => handleCollapse(id) : void 0,
|
|
176
178
|
onRemove: removable ? () => handleRemove(item) : void 0,
|
|
177
|
-
renderItem
|
|
179
|
+
renderItem,
|
|
180
|
+
__designMode
|
|
178
181
|
}
|
|
179
182
|
);
|
|
180
183
|
}), (0, import_react_dom.createPortal)(
|
|
@@ -261,8 +264,8 @@ var adjustTranslate = ({ transform }) => {
|
|
|
261
264
|
y: transform.y - 25
|
|
262
265
|
};
|
|
263
266
|
};
|
|
264
|
-
var Demo = () => {
|
|
265
|
-
return /* @__PURE__ */ import_react.default.createElement(SortableTree,
|
|
267
|
+
var Demo = (props) => {
|
|
268
|
+
return /* @__PURE__ */ import_react.default.createElement(SortableTree, { ...props });
|
|
266
269
|
};
|
|
267
270
|
var pisellDraggable_default = Demo;
|
|
268
271
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -57,7 +57,8 @@ var PisellDropSort = ({
|
|
|
57
57
|
onAdd,
|
|
58
58
|
renderItem: propsRenderItem,
|
|
59
59
|
leftContent,
|
|
60
|
-
onAddRoot
|
|
60
|
+
onAddRoot,
|
|
61
|
+
__designMode
|
|
61
62
|
}) => {
|
|
62
63
|
const treeItems = (0, import_react.useMemo)(() => {
|
|
63
64
|
return value.map((item) => {
|
|
@@ -87,7 +88,8 @@ var PisellDropSort = ({
|
|
|
87
88
|
onDelete,
|
|
88
89
|
showBorder,
|
|
89
90
|
spacing,
|
|
90
|
-
maxLevel
|
|
91
|
+
maxLevel,
|
|
92
|
+
__designMode
|
|
91
93
|
}
|
|
92
94
|
);
|
|
93
95
|
},
|
|
@@ -51,7 +51,8 @@ var SortableItem = (props) => {
|
|
|
51
51
|
onDelete,
|
|
52
52
|
showBorder,
|
|
53
53
|
spacing,
|
|
54
|
-
maxLevel
|
|
54
|
+
maxLevel,
|
|
55
|
+
__designMode
|
|
55
56
|
} = props;
|
|
56
57
|
const {
|
|
57
58
|
item,
|
|
@@ -104,7 +105,7 @@ var SortableItem = (props) => {
|
|
|
104
105
|
icon: /* @__PURE__ */ import_react.default.createElement(import_DotsSix.default, { className: "pisell-lowcode-drop-sort-item-drag-handle-icon" }),
|
|
105
106
|
type: "text",
|
|
106
107
|
className: "pisell-lowcode-drop-sort-item-button",
|
|
107
|
-
...handleProps
|
|
108
|
+
...__designMode === "design" ? {} : { ...handleProps }
|
|
108
109
|
}
|
|
109
110
|
),
|
|
110
111
|
onCollapse && /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -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
|
|
@@ -2,10 +2,11 @@ import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
|
2
2
|
|
|
3
3
|
const PisellFooterMeta: ComponentMetadata = {
|
|
4
4
|
componentName: 'PisellFooter',
|
|
5
|
-
title: '
|
|
5
|
+
title: '底部',
|
|
6
6
|
docUrl: '',
|
|
7
|
-
screenshot: '',
|
|
7
|
+
screenshot: require('./__screenshots__/footer.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 PisellFooterMeta: 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: {
|
|
@@ -51,8 +63,8 @@ const PisellFooterMeta: ComponentMetadata = {
|
|
|
51
63
|
|
|
52
64
|
const snippets: Snippet[] = [
|
|
53
65
|
{
|
|
54
|
-
title: '
|
|
55
|
-
screenshot: '',
|
|
66
|
+
title: '底部',
|
|
67
|
+
screenshot: require('./__screenshots__/footer.png'),
|
|
56
68
|
schema: {
|
|
57
69
|
componentName: 'PisellFooter',
|
|
58
70
|
props: {
|
|
@@ -61,6 +73,7 @@ const snippets: Snippet[] = [
|
|
|
61
73
|
color: '#fff',
|
|
62
74
|
textAlign: 'center',
|
|
63
75
|
},
|
|
76
|
+
height: 80,
|
|
64
77
|
},
|
|
65
78
|
children: [{
|
|
66
79
|
componentName: 'PisellText',
|
|
Binary file
|
|
@@ -2,10 +2,11 @@ import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
|
2
2
|
|
|
3
3
|
const PisellHeaderMeta: ComponentMetadata = {
|
|
4
4
|
componentName: 'PisellHeader',
|
|
5
|
-
title: '
|
|
5
|
+
title: '头部',
|
|
6
6
|
docUrl: '',
|
|
7
|
-
screenshot: '',
|
|
7
|
+
screenshot: require('./__screenshots__/header.png'),
|
|
8
8
|
devMode: 'proCode',
|
|
9
|
+
category: "布局",
|
|
9
10
|
npm: {
|
|
10
11
|
package: '@pisell/materials',
|
|
11
12
|
version: '1.0.3',
|
|
@@ -26,6 +27,28 @@ const PisellHeaderMeta: 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
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: {
|
|
43
|
+
label: {
|
|
44
|
+
type: 'i18n',
|
|
45
|
+
'en-US': 'Fixed header',
|
|
46
|
+
'zh-CN': '固定头部',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
name: 'fixed',
|
|
50
|
+
setter: 'BoolSetter',
|
|
51
|
+
},
|
|
29
52
|
{
|
|
30
53
|
title: {
|
|
31
54
|
label: {
|
|
@@ -51,18 +74,19 @@ const PisellHeaderMeta: ComponentMetadata = {
|
|
|
51
74
|
|
|
52
75
|
const snippets: Snippet[] = [
|
|
53
76
|
{
|
|
54
|
-
title: '
|
|
55
|
-
screenshot: '',
|
|
77
|
+
title: '头部',
|
|
78
|
+
screenshot: require('./__screenshots__/header.png'),
|
|
56
79
|
schema: {
|
|
57
80
|
componentName: 'PisellHeader',
|
|
58
81
|
props: {
|
|
59
82
|
style: {
|
|
60
83
|
backgroundColor: '#1890ff',
|
|
61
84
|
color: '#fff',
|
|
62
|
-
height: 64,
|
|
63
85
|
lineHeight: '64px',
|
|
64
86
|
textAlign: 'center',
|
|
65
87
|
},
|
|
88
|
+
height: 64,
|
|
89
|
+
fixed: true,
|
|
66
90
|
},
|
|
67
91
|
children: [{
|
|
68
92
|
componentName: 'PisellText',
|
|
Binary file
|