@pisell/materials 1.0.511 → 1.0.512
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 +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -20
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/es/components/pisellAnchor/index.js +6 -37
- package/es/components/pisellAnchor/index.less +36 -34
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/lib/components/pisellAnchor/index.js +8 -35
- package/lib/components/pisellAnchor/index.less +36 -34
- 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" | "large" | "middle";
|
|
69
69
|
openTitle: string;
|
|
70
70
|
key: string;
|
|
71
71
|
} | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _excluded = ["items", "getContainer", "className"];
|
|
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
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
3
|
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
4
|
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); }
|
|
@@ -9,12 +8,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
9
8
|
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
9
|
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
10
|
import React, { useRef, useState, useEffect } from 'react';
|
|
12
|
-
import { Anchor
|
|
13
|
-
import { LeftOutlined, RightOutlined } from '@ant-design/icons';
|
|
11
|
+
import { Anchor } from 'antd';
|
|
14
12
|
import classNames from 'classnames';
|
|
15
13
|
import "./index.less";
|
|
16
14
|
var PisellAnchor = function PisellAnchor(props) {
|
|
17
|
-
var _items$;
|
|
18
15
|
var _props$items = props.items,
|
|
19
16
|
items = _props$items === void 0 ? [] : _props$items,
|
|
20
17
|
getContainer = props.getContainer,
|
|
@@ -86,40 +83,12 @@ var PisellAnchor = function PisellAnchor(props) {
|
|
|
86
83
|
requestAnimationFrame(animation);
|
|
87
84
|
};
|
|
88
85
|
return /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
className: classNames('pisell-anchor-
|
|
90
|
-
}, /*#__PURE__*/React.createElement(
|
|
91
|
-
|
|
92
|
-
ref: scrollRef
|
|
93
|
-
}, /*#__PURE__*/React.createElement(Anchor, _extends({
|
|
94
|
-
className: "pisell-lowcode-anchor",
|
|
86
|
+
className: classNames('pisell-anchor-containers', className)
|
|
87
|
+
}, /*#__PURE__*/React.createElement(Anchor, {
|
|
88
|
+
direction: "horizontal",
|
|
95
89
|
getContainer: getContainer,
|
|
96
90
|
items: items,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
getCurrentAnchor: items === null || items === void 0 ? void 0 : (_items$ = items[0]) === null || _items$ === void 0 ? void 0 : _items$.href,
|
|
100
|
-
showInkInFixed: true
|
|
101
|
-
// targetOffset={40}
|
|
102
|
-
// bounds={40}
|
|
103
|
-
,
|
|
104
|
-
affix: false
|
|
105
|
-
}, rest))), (canScrollRight || canScrollLeft) && /*#__PURE__*/React.createElement("div", {
|
|
106
|
-
className: "pisell-anchor-buttons"
|
|
107
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
108
|
-
className: classNames('scroll-button', {
|
|
109
|
-
disabled: !canScrollLeft
|
|
110
|
-
}),
|
|
111
|
-
onClick: function onClick() {
|
|
112
|
-
return handleScroll('left');
|
|
113
|
-
},
|
|
114
|
-
disabled: !canScrollLeft
|
|
115
|
-
}, /*#__PURE__*/React.createElement(LeftOutlined, null)), /*#__PURE__*/React.createElement(Button, {
|
|
116
|
-
className: classNames('scroll-button', {
|
|
117
|
-
disabled: !canScrollRight
|
|
118
|
-
}),
|
|
119
|
-
onClick: function onClick() {
|
|
120
|
-
return handleScroll('right');
|
|
121
|
-
},
|
|
122
|
-
disabled: !canScrollRight
|
|
123
|
-
}, /*#__PURE__*/React.createElement(RightOutlined, null))));
|
|
91
|
+
targetOffset: 39
|
|
92
|
+
}));
|
|
124
93
|
};
|
|
125
94
|
export default PisellAnchor;
|
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
.pisell-anchor-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.pisell-lowcode-anchor {
|
|
11
|
-
height: 40px;
|
|
12
|
-
border-bottom: none !important;
|
|
13
|
-
|
|
14
|
-
.pisell-lowcode-anchor-ink {
|
|
1
|
+
.pisell-anchor-containers {
|
|
2
|
+
// display: flex;
|
|
3
|
+
// align-items: center;
|
|
4
|
+
// background-color: #fff;
|
|
5
|
+
// height: 40px;
|
|
6
|
+
.pisell-lowcode-anchor-wrapper {
|
|
7
|
+
&::before {
|
|
8
|
+
content: '';
|
|
15
9
|
display: none;
|
|
16
10
|
}
|
|
11
|
+
.pisell-lowcode-anchor {
|
|
12
|
+
height: 40px;
|
|
13
|
+
border-bottom: none !important;
|
|
14
|
+
background-color: #fff;
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
.pisell-lowcode-anchor-ink {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pisell-lowcode-anchor-link {
|
|
21
|
+
height: 100%;
|
|
22
|
+
padding: 0 16px;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
&-title {
|
|
27
|
+
color: var(--Gray-900, #101828);
|
|
28
|
+
font-family: Inter;
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
line-height: 40px;
|
|
32
|
+
}
|
|
30
33
|
}
|
|
31
|
-
}
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
.pisell-lowcode-anchor-link-active {
|
|
36
|
+
border-radius: 100px;
|
|
37
|
+
background: var(--theme-color, #7f56d9);
|
|
38
|
+
height: 40px;
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
.pisell-lowcode-anchor-link-title {
|
|
41
|
+
color: var(--White, #fff);
|
|
42
|
+
line-height: 40px;
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
|
-
|
|
45
47
|
.pisell-anchor-scroll {
|
|
46
48
|
height: 40px;
|
|
47
49
|
flex: 1;
|
|
@@ -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" | "large" | "middle";
|
|
69
69
|
openTitle: string;
|
|
70
70
|
key: string;
|
|
71
71
|
} | undefined;
|
|
@@ -34,11 +34,9 @@ __export(pisellAnchor_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(pisellAnchor_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
|
-
var import_icons = require("@ant-design/icons");
|
|
38
37
|
var import_classnames = __toESM(require("classnames"));
|
|
39
38
|
var import_index = require("./index.less");
|
|
40
39
|
var PisellAnchor = (props) => {
|
|
41
|
-
var _a;
|
|
42
40
|
const { items = [], getContainer, className, ...rest } = props;
|
|
43
41
|
const scrollRef = (0, import_react.useRef)(null);
|
|
44
42
|
const [canScrollLeft, setCanScrollLeft] = (0, import_react.useState)(false);
|
|
@@ -51,13 +49,13 @@ var PisellAnchor = (props) => {
|
|
|
51
49
|
}
|
|
52
50
|
};
|
|
53
51
|
(0, import_react.useEffect)(() => {
|
|
54
|
-
var
|
|
52
|
+
var _a;
|
|
55
53
|
document.body.id = "body";
|
|
56
54
|
checkScroll();
|
|
57
|
-
(
|
|
55
|
+
(_a = scrollRef.current) == null ? void 0 : _a.addEventListener("scroll", checkScroll);
|
|
58
56
|
return () => {
|
|
59
|
-
var
|
|
60
|
-
(
|
|
57
|
+
var _a2;
|
|
58
|
+
(_a2 = scrollRef.current) == null ? void 0 : _a2.removeEventListener("scroll", checkScroll);
|
|
61
59
|
};
|
|
62
60
|
}, []);
|
|
63
61
|
const handleScroll = (direction) => {
|
|
@@ -90,39 +88,14 @@ var PisellAnchor = (props) => {
|
|
|
90
88
|
};
|
|
91
89
|
requestAnimationFrame(animation);
|
|
92
90
|
};
|
|
93
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-anchor-
|
|
91
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-anchor-containers", className) }, /* @__PURE__ */ import_react.default.createElement(
|
|
94
92
|
import_antd.Anchor,
|
|
95
93
|
{
|
|
96
|
-
|
|
94
|
+
direction: "horizontal",
|
|
97
95
|
getContainer,
|
|
98
96
|
items,
|
|
99
|
-
|
|
100
|
-
replace: true,
|
|
101
|
-
getCurrentAnchor: (_a = items == null ? void 0 : items[0]) == null ? void 0 : _a.href,
|
|
102
|
-
showInkInFixed: true,
|
|
103
|
-
affix: false,
|
|
104
|
-
...rest
|
|
97
|
+
targetOffset: 39
|
|
105
98
|
}
|
|
106
|
-
))
|
|
107
|
-
import_antd.Button,
|
|
108
|
-
{
|
|
109
|
-
className: (0, import_classnames.default)("scroll-button", {
|
|
110
|
-
disabled: !canScrollLeft
|
|
111
|
-
}),
|
|
112
|
-
onClick: () => handleScroll("left"),
|
|
113
|
-
disabled: !canScrollLeft
|
|
114
|
-
},
|
|
115
|
-
/* @__PURE__ */ import_react.default.createElement(import_icons.LeftOutlined, null)
|
|
116
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
117
|
-
import_antd.Button,
|
|
118
|
-
{
|
|
119
|
-
className: (0, import_classnames.default)("scroll-button", {
|
|
120
|
-
disabled: !canScrollRight
|
|
121
|
-
}),
|
|
122
|
-
onClick: () => handleScroll("right"),
|
|
123
|
-
disabled: !canScrollRight
|
|
124
|
-
},
|
|
125
|
-
/* @__PURE__ */ import_react.default.createElement(import_icons.RightOutlined, null)
|
|
126
|
-
)));
|
|
99
|
+
));
|
|
127
100
|
};
|
|
128
101
|
var pisellAnchor_default = PisellAnchor;
|
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
.pisell-anchor-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.pisell-lowcode-anchor {
|
|
11
|
-
height: 40px;
|
|
12
|
-
border-bottom: none !important;
|
|
13
|
-
|
|
14
|
-
.pisell-lowcode-anchor-ink {
|
|
1
|
+
.pisell-anchor-containers {
|
|
2
|
+
// display: flex;
|
|
3
|
+
// align-items: center;
|
|
4
|
+
// background-color: #fff;
|
|
5
|
+
// height: 40px;
|
|
6
|
+
.pisell-lowcode-anchor-wrapper {
|
|
7
|
+
&::before {
|
|
8
|
+
content: '';
|
|
15
9
|
display: none;
|
|
16
10
|
}
|
|
11
|
+
.pisell-lowcode-anchor {
|
|
12
|
+
height: 40px;
|
|
13
|
+
border-bottom: none !important;
|
|
14
|
+
background-color: #fff;
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
.pisell-lowcode-anchor-ink {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pisell-lowcode-anchor-link {
|
|
21
|
+
height: 100%;
|
|
22
|
+
padding: 0 16px;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
&-title {
|
|
27
|
+
color: var(--Gray-900, #101828);
|
|
28
|
+
font-family: Inter;
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
line-height: 40px;
|
|
32
|
+
}
|
|
30
33
|
}
|
|
31
|
-
}
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
.pisell-lowcode-anchor-link-active {
|
|
36
|
+
border-radius: 100px;
|
|
37
|
+
background: var(--theme-color, #7f56d9);
|
|
38
|
+
height: 40px;
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
.pisell-lowcode-anchor-link-title {
|
|
41
|
+
color: var(--White, #fff);
|
|
42
|
+
line-height: 40px;
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
|
-
|
|
45
47
|
.pisell-anchor-scroll {
|
|
46
48
|
height: 40px;
|
|
47
49
|
flex: 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.512",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"styled-components": "^6.0.0-rc.3",
|
|
69
69
|
"libphonenumber-js": "^1.11.17",
|
|
70
70
|
"swiper": "^8.4.7",
|
|
71
|
-
"@pisell/utils": "1.0.43",
|
|
72
71
|
"@pisell/date-picker": "1.0.114",
|
|
73
|
-
"@pisell/icon": "0.0.10"
|
|
72
|
+
"@pisell/icon": "0.0.10",
|
|
73
|
+
"@pisell/utils": "1.0.43"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"react": "^18.0.0",
|