@capillarytech/blaze-ui 6.1.4 → 6.1.5
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/CapDragReorder/Card.d.ts +2 -2
- package/CapDragReorder/Card.d.ts.map +1 -1
- package/CapDragReorder/Card.js +53 -51
- package/CapDragReorder/index.d.ts +2 -9
- package/CapDragReorder/index.d.ts.map +1 -1
- package/CapDragReorder/index.js +26 -15
- package/CapDragReorder/styles.css +12 -2
- package/CapDragReorder/styles.d.ts +2 -12
- package/CapDragReorder/styles.d.ts.map +1 -1
- package/CapDragReorder/styles.js +1 -1
- package/CapDragReorder/styles.module.scss.js +29 -0
- package/CapDragReorder/styles.scss +23 -10
- package/CapDragReorder/tests/CapDragReorder.mockData.d.ts +4 -0
- package/CapDragReorder/tests/CapDragReorder.mockData.d.ts.map +1 -0
- package/CapDragReorder/types.d.ts +32 -0
- package/CapDragReorder/types.d.ts.map +1 -0
- package/CapDragReorder/types.js +1 -0
- package/CapSelectFilter/index.js +2 -2
- package/CapTreeView/index.d.ts +6 -28
- package/CapTreeView/index.d.ts.map +1 -1
- package/CapTreeView/index.js +63 -78
- package/CapTreeView/styles.css +12 -22
- package/CapTreeView/styles.module.scss.js +16 -0
- package/CapTreeView/styles.scss +26 -39
- package/CapTreeView/tests/CapTreeView.mockData.d.ts +5 -0
- package/CapTreeView/tests/CapTreeView.mockData.d.ts.map +1 -0
- package/CapTreeView/types.d.ts +16 -0
- package/CapTreeView/types.d.ts.map +1 -0
- package/CapTreeView/types.js +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -1
- package/index.js +169 -165
- package/package.json +1 -1
- package/utils/getCapThemeConfig.d.ts.map +1 -1
- package/utils/getCapThemeConfig.js +11 -2
- package/.npmrc +0 -3
package/CapDragReorder/Card.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './
|
|
3
|
-
export declare const Card: React.
|
|
2
|
+
import type { CardProps } from './types';
|
|
3
|
+
export declare const Card: React.MemoExoticComponent<({ id, text, moveCard, findCard, title, weightage, tooltipMessage }: CardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
4
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../components/CapDragReorder/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../components/CapDragReorder/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAWpC,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,IAAI,iGACsD,SAAS,6CA+D/E,CAAC"}
|
package/CapDragReorder/Card.js
CHANGED
|
@@ -7,59 +7,61 @@ import CapLabelWithStatic from "../CapLabel/index.js";
|
|
|
7
7
|
import CapTooltip from "../CapTooltip/index.js";
|
|
8
8
|
import messages from "./messages.js";
|
|
9
9
|
import { style } from "./styles.js";
|
|
10
|
-
import
|
|
11
|
-
const Card = memo(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
[id, originalIndex, moveCard]
|
|
29
|
-
);
|
|
30
|
-
const [, drop] = useDrop(
|
|
31
|
-
{
|
|
32
|
-
accept: "card",
|
|
33
|
-
hover({ id: draggedId }) {
|
|
34
|
-
if (draggedId !== id) {
|
|
35
|
-
const { index: overIndex } = findCard(id);
|
|
36
|
-
moveCard(draggedId, overIndex);
|
|
10
|
+
import styles from "./styles.module.scss.js";
|
|
11
|
+
const Card = memo(
|
|
12
|
+
({ id, text, moveCard, findCard, title, weightage, tooltipMessage }) => {
|
|
13
|
+
const originalIndex = findCard(id).index;
|
|
14
|
+
const [{ isDragging }, drag, preview] = useDrag(
|
|
15
|
+
{
|
|
16
|
+
type: "card",
|
|
17
|
+
item: { id, originalIndex, type: "card" },
|
|
18
|
+
collect: (monitor) => ({
|
|
19
|
+
isDragging: monitor.isDragging()
|
|
20
|
+
}),
|
|
21
|
+
end: (item, monitor) => {
|
|
22
|
+
const { id: droppedId, originalIndex: origIdx } = item;
|
|
23
|
+
const didDrop = monitor.didDrop();
|
|
24
|
+
if (!didDrop) {
|
|
25
|
+
moveCard(droppedId, origIdx);
|
|
26
|
+
}
|
|
37
27
|
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const opacity = isDragging ? 0 : 1;
|
|
43
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { ref: (node) => preview(drop(node)), style: { ...style, opacity }, children: /* @__PURE__ */ jsxs("div", { className: "card-body", children: [
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
45
|
-
CapTooltip,
|
|
28
|
+
},
|
|
29
|
+
[id, originalIndex, moveCard]
|
|
30
|
+
);
|
|
31
|
+
const [, drop] = useDrop(
|
|
46
32
|
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
})
|
|
33
|
+
accept: "card",
|
|
34
|
+
hover({ id: draggedId }) {
|
|
35
|
+
if (draggedId !== id) {
|
|
36
|
+
const { index: overIndex } = findCard(id);
|
|
37
|
+
moveCard(draggedId, overIndex);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
[findCard, moveCard]
|
|
42
|
+
);
|
|
43
|
+
const opacity = isDragging ? 0 : 1;
|
|
44
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { ref: (node) => preview(drop(node)), style: { ...style, opacity }, children: /* @__PURE__ */ jsxs("div", { className: styles["card-body"], children: [
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
CapTooltip,
|
|
47
|
+
{
|
|
48
|
+
title: tooltipMessage ? tooltipMessage : /* @__PURE__ */ jsx(FormattedMessage, { ...messages.dragTooltip }),
|
|
49
|
+
children: /* @__PURE__ */ jsx("div", { ref: drag, children: /* @__PURE__ */ jsx(CapIcon, { type: "six-dots", className: styles["six-dots"] }) })
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ jsxs("div", { className: styles["card-data"], children: [
|
|
53
|
+
/* @__PURE__ */ jsx(CapLabelWithStatic, { type: "label16", children: title }),
|
|
54
|
+
/* @__PURE__ */ jsx(CapLabelWithStatic, { type: "label1", className: styles["kpi-desc"], children: text })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsx(CapLabelWithStatic, { className: styles["cross"], type: "label16", children: "x" }),
|
|
57
|
+
/* @__PURE__ */ jsx(CapIcon, { className: styles["fill"], type: "fill-circle", percent: weightage, size: "s" }),
|
|
58
|
+
/* @__PURE__ */ jsxs(CapLabelWithStatic, { type: "label33", className: styles["card-split"], children: [
|
|
59
|
+
weightage,
|
|
60
|
+
"%"
|
|
61
|
+
] })
|
|
62
|
+
] }) }) });
|
|
63
|
+
}
|
|
64
|
+
);
|
|
63
65
|
export {
|
|
64
66
|
Card
|
|
65
67
|
};
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare namespace CapDragReorder {
|
|
4
|
-
var propTypes: {
|
|
5
|
-
cards: PropTypes.Requireable<any[]>;
|
|
6
|
-
setCards: PropTypes.Requireable<(...args: any[]) => any>;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
export default CapDragReorder;
|
|
1
|
+
import type { CapDragReorderProps } from './types';
|
|
2
|
+
export default function CapDragReorder({ cards, setCards, onCardDelete, supportDelete, tooltipMessage, }: CapDragReorderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapDragReorder/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapDragReorder/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,cAAc,GACf,EAAE,mBAAmB,2CAiFrB"}
|
package/CapDragReorder/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import update from "immutability-helper";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
3
|
import { useCallback } from "react";
|
|
5
4
|
import { useDrop } from "react-dnd";
|
|
6
5
|
import CapButton from "../CapButton/index.js";
|
|
@@ -8,8 +7,14 @@ import CapDivider from "../CapDivider/index.js";
|
|
|
8
7
|
import CapIcon from "../CapIcon/index.js";
|
|
9
8
|
import CapLabelWithStatic from "../CapLabel/index.js";
|
|
10
9
|
import { Card } from "./Card.js";
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import styles from "./styles.module.scss.js";
|
|
11
|
+
function CapDragReorder({
|
|
12
|
+
cards,
|
|
13
|
+
setCards,
|
|
14
|
+
onCardDelete,
|
|
15
|
+
supportDelete,
|
|
16
|
+
tooltipMessage
|
|
17
|
+
}) {
|
|
13
18
|
const findCard = useCallback(
|
|
14
19
|
(id) => {
|
|
15
20
|
const card = cards.filter((c) => `${c.id}` === id)[0];
|
|
@@ -35,14 +40,15 @@ function CapDragReorder(props) {
|
|
|
35
40
|
[findCard, cards, setCards]
|
|
36
41
|
);
|
|
37
42
|
const handleDelete = (event) => {
|
|
38
|
-
|
|
43
|
+
const target = event.currentTarget;
|
|
44
|
+
onCardDelete == null ? void 0 : onCardDelete(Number(target.id));
|
|
39
45
|
};
|
|
40
46
|
const [, drop] = useDrop({
|
|
41
47
|
accept: "card"
|
|
42
48
|
});
|
|
43
|
-
return /* @__PURE__ */ jsx("div", { ref: drop, children: cards.map((card, index) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "card-area", children: [
|
|
44
|
-
/* @__PURE__ */ jsx("div", { className: "rank-area", children: /* @__PURE__ */ jsx(CapLabelWithStatic, { className: "rank-label", type: "label2", children: index + 1 }) }),
|
|
45
|
-
/* @__PURE__ */ jsxs("div", { className: "card", children: [
|
|
49
|
+
return /* @__PURE__ */ jsx("div", { ref: drop, children: cards.map((card, index) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: styles["card-area"], children: [
|
|
50
|
+
/* @__PURE__ */ jsx("div", { className: styles["rank-area"], children: /* @__PURE__ */ jsx(CapLabelWithStatic, { className: styles["rank-label"], type: "label2", children: index + 1 }) }),
|
|
51
|
+
/* @__PURE__ */ jsxs("div", { className: styles["card"], children: [
|
|
46
52
|
/* @__PURE__ */ jsx(
|
|
47
53
|
Card,
|
|
48
54
|
{
|
|
@@ -56,18 +62,23 @@ function CapDragReorder(props) {
|
|
|
56
62
|
},
|
|
57
63
|
card.id
|
|
58
64
|
),
|
|
59
|
-
index !== cards.length - 1 && /* @__PURE__ */ jsxs("div", { className: "separator", children: [
|
|
60
|
-
/* @__PURE__ */ jsx(CapIcon, { className: "plus-icon", type: "add", size: "s" }),
|
|
61
|
-
/* @__PURE__ */ jsx(CapDivider, { className: "card-divider" })
|
|
65
|
+
index !== cards.length - 1 && /* @__PURE__ */ jsxs("div", { className: styles["separator"], children: [
|
|
66
|
+
/* @__PURE__ */ jsx(CapIcon, { className: styles["plus-icon"], type: "add", size: "s" }),
|
|
67
|
+
/* @__PURE__ */ jsx(CapDivider, { className: styles["card-divider"] })
|
|
62
68
|
] })
|
|
63
69
|
] }),
|
|
64
|
-
supportDelete && /* @__PURE__ */ jsx("div", { className: "delete-area", children: /* @__PURE__ */ jsx(
|
|
70
|
+
supportDelete && /* @__PURE__ */ jsx("div", { className: styles["delete-area"], children: /* @__PURE__ */ jsx(
|
|
71
|
+
CapButton,
|
|
72
|
+
{
|
|
73
|
+
type: "flat",
|
|
74
|
+
className: styles["delete-icon"],
|
|
75
|
+
id: String(index),
|
|
76
|
+
onClick: handleDelete,
|
|
77
|
+
children: /* @__PURE__ */ jsx(CapIcon, { type: "delete", "aria-label": "delete icon" })
|
|
78
|
+
}
|
|
79
|
+
) })
|
|
65
80
|
] }) })) });
|
|
66
81
|
}
|
|
67
|
-
CapDragReorder.propTypes = {
|
|
68
|
-
cards: PropTypes.array,
|
|
69
|
-
setCards: PropTypes.func
|
|
70
|
-
};
|
|
71
82
|
export {
|
|
72
83
|
CapDragReorder as default
|
|
73
84
|
};
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
width: 41.5rem;
|
|
18
18
|
}
|
|
19
19
|
.rank-area {
|
|
20
|
-
background: #
|
|
20
|
+
background: #dfe2e7;
|
|
21
21
|
margin-top: 0.857rem;
|
|
22
22
|
width: 2rem;
|
|
23
23
|
height: 2rem;
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
}
|
|
46
46
|
.card-body {
|
|
47
47
|
text-align: left;
|
|
48
|
-
padding-top: 0.571rem;
|
|
49
48
|
display: flex;
|
|
50
49
|
}
|
|
51
50
|
.six-dots {
|
|
@@ -62,6 +61,17 @@
|
|
|
62
61
|
.fill {
|
|
63
62
|
margin-left: 6rem;
|
|
64
63
|
}
|
|
64
|
+
.fill .pie {
|
|
65
|
+
width: 2.571rem;
|
|
66
|
+
background: #b3bac5;
|
|
67
|
+
border-radius: 50%;
|
|
68
|
+
transform: rotate(-90deg);
|
|
69
|
+
}
|
|
70
|
+
.fill .pie circle {
|
|
71
|
+
fill: none;
|
|
72
|
+
stroke: #091e42;
|
|
73
|
+
stroke-width: 32;
|
|
74
|
+
}
|
|
65
75
|
.card-split {
|
|
66
76
|
display: inline;
|
|
67
77
|
margin-top: 0.57rem;
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
display: string;
|
|
4
|
-
marginBottom: string;
|
|
5
|
-
backgroundColor: string;
|
|
6
|
-
height: string;
|
|
7
|
-
borderRadius: string;
|
|
8
|
-
justify: string;
|
|
9
|
-
padding: string;
|
|
10
|
-
background: string;
|
|
11
|
-
textAlign: string;
|
|
12
|
-
};
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export declare const style: CSSProperties;
|
|
13
3
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../components/CapDragReorder/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../components/CapDragReorder/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,eAAO,MAAM,KAAK,EAAE,aAWnB,CAAC"}
|
package/CapDragReorder/styles.js
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import './styles.css';const card = "card";
|
|
2
|
+
const separator = "separator";
|
|
3
|
+
const cross = "cross";
|
|
4
|
+
const fill = "fill";
|
|
5
|
+
const styles = {
|
|
6
|
+
"kpi-desc": "kpi-desc",
|
|
7
|
+
"card-area": "card-area",
|
|
8
|
+
"rank-area": "rank-area",
|
|
9
|
+
"rank-label": "rank-label",
|
|
10
|
+
card,
|
|
11
|
+
separator,
|
|
12
|
+
"card-divider": "card-divider",
|
|
13
|
+
"plus-icon": "plus-icon",
|
|
14
|
+
"card-body": "card-body",
|
|
15
|
+
"six-dots": "six-dots",
|
|
16
|
+
"card-data": "card-data",
|
|
17
|
+
cross,
|
|
18
|
+
fill,
|
|
19
|
+
"card-split": "card-split",
|
|
20
|
+
"delete-area": "delete-area",
|
|
21
|
+
"delete-icon": "delete-icon"
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
card,
|
|
25
|
+
cross,
|
|
26
|
+
styles as default,
|
|
27
|
+
fill,
|
|
28
|
+
separator
|
|
29
|
+
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
width: 41.5rem;
|
|
11
11
|
}
|
|
12
12
|
.rank-area {
|
|
13
|
-
background:
|
|
13
|
+
background: $CAP_G07;
|
|
14
14
|
margin-top: $CAP_SPACE_12;
|
|
15
15
|
width: $CAP_SPACE_28;
|
|
16
16
|
height: $CAP_SPACE_28;
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
margin-right: $CAP_SPACE_16;
|
|
19
19
|
text-align: center;
|
|
20
20
|
}
|
|
21
|
-
.rank-label{
|
|
21
|
+
.rank-label {
|
|
22
22
|
margin-top: $CAP_SPACE_06;
|
|
23
23
|
}
|
|
24
24
|
.card {
|
|
25
25
|
width: 32.9rem;
|
|
26
26
|
}
|
|
27
|
-
.separator{
|
|
27
|
+
.separator {
|
|
28
28
|
display: flex;
|
|
29
29
|
height: $CAP_SPACE_32;
|
|
30
30
|
}
|
|
31
|
-
.card-divider{
|
|
31
|
+
.card-divider {
|
|
32
32
|
margin: auto !important;
|
|
33
33
|
min-width: 29.9rem;
|
|
34
34
|
width: 29.9rem;
|
|
@@ -36,17 +36,16 @@
|
|
|
36
36
|
.plus-icon {
|
|
37
37
|
margin: auto;
|
|
38
38
|
}
|
|
39
|
-
.card-body{
|
|
39
|
+
.card-body {
|
|
40
40
|
text-align: left;
|
|
41
|
-
padding-top: $CAP_SPACE_08;
|
|
42
41
|
display: flex;
|
|
43
42
|
}
|
|
44
|
-
.six-dots{
|
|
43
|
+
.six-dots {
|
|
45
44
|
padding: 0.3125rem 0.5rem 1rem 1rem;
|
|
46
45
|
cursor: move;
|
|
47
46
|
}
|
|
48
47
|
.card-data {
|
|
49
|
-
margin-top: 0.25rem;
|
|
48
|
+
margin-top: 0.25rem;
|
|
50
49
|
width: 13.72rem;
|
|
51
50
|
}
|
|
52
51
|
.cross {
|
|
@@ -54,17 +53,31 @@
|
|
|
54
53
|
}
|
|
55
54
|
.fill {
|
|
56
55
|
margin-left: 6rem;
|
|
56
|
+
|
|
57
|
+
// Pie chart icon styles for fill-circle CapIcon
|
|
58
|
+
:global(.pie) {
|
|
59
|
+
width: $CAP_SPACE_36;
|
|
60
|
+
background: $CAP_G06;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
transform: rotate(-90deg);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:global(.pie) circle {
|
|
66
|
+
fill: none;
|
|
67
|
+
stroke: $CAP_G01;
|
|
68
|
+
stroke-width: 32;
|
|
69
|
+
}
|
|
57
70
|
}
|
|
58
71
|
.card-split {
|
|
59
72
|
display: inline;
|
|
60
73
|
margin-top: 0.57rem;
|
|
61
74
|
margin-left: $CAP_SPACE_16;
|
|
62
75
|
}
|
|
63
|
-
.delete-area{
|
|
76
|
+
.delete-area {
|
|
64
77
|
margin-left: auto;
|
|
65
78
|
margin-top: $CAP_SPACE_08;
|
|
66
79
|
}
|
|
67
80
|
.delete-icon {
|
|
68
81
|
color: $CAP_G01 !important;
|
|
69
82
|
margin-left: $CAP_SPACE_08;
|
|
70
|
-
}
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CapDragReorder.mockData.d.ts","sourceRoot":"","sources":["../../../components/CapDragReorder/tests/CapDragReorder.mockData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,eAAO,MAAM,SAAS,EAAE,QAAQ,EAI/B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,QAAQ,EAG9B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface DragItem {
|
|
3
|
+
id: string;
|
|
4
|
+
originalIndex: number;
|
|
5
|
+
type: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CardData {
|
|
8
|
+
id: number | string;
|
|
9
|
+
title: string;
|
|
10
|
+
text: string;
|
|
11
|
+
weightage: number;
|
|
12
|
+
}
|
|
13
|
+
export interface CardProps {
|
|
14
|
+
id: string;
|
|
15
|
+
text: string;
|
|
16
|
+
title: string;
|
|
17
|
+
weightage: number;
|
|
18
|
+
moveCard: (id: string, atIndex: number) => void;
|
|
19
|
+
findCard: (id: string) => {
|
|
20
|
+
card: CardData;
|
|
21
|
+
index: number;
|
|
22
|
+
};
|
|
23
|
+
tooltipMessage?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export interface CapDragReorderProps {
|
|
26
|
+
cards: CardData[];
|
|
27
|
+
setCards: (cards: CardData[]) => void;
|
|
28
|
+
onCardDelete?: (id: number | string) => void;
|
|
29
|
+
supportDelete?: boolean;
|
|
30
|
+
tooltipMessage?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapDragReorder/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC7C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/CapSelectFilter/index.js
CHANGED
|
@@ -67,8 +67,8 @@ const CapSelectFilter = ({
|
|
|
67
67
|
trigger: ["click"],
|
|
68
68
|
menu: { items: renderMenuItem(data, selectedValue), onClick: handleMenuClick },
|
|
69
69
|
className: classNames(styles[clsPrefix]),
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
classNames: { root: classNames(`${clsPrefix}-overlay`, overlayClassName) },
|
|
71
|
+
popupRender: (menu) => renderDropdownMenu(menu, dropdownMaxHeight, dropdownWidth),
|
|
72
72
|
getPopupContainer: (trigger) => trigger.parentNode,
|
|
73
73
|
...rest,
|
|
74
74
|
children: /* @__PURE__ */ jsxs(
|
package/CapTreeView/index.d.ts
CHANGED
|
@@ -1,31 +1,9 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import '
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
key: PropTypes.Validator<string>;
|
|
10
|
-
children: PropTypes.Requireable<any[]>;
|
|
11
|
-
}>[]>;
|
|
12
|
-
placeholder: PropTypes.Requireable<string>;
|
|
13
|
-
showLine: PropTypes.Requireable<boolean>;
|
|
14
|
-
showIcon: PropTypes.Requireable<boolean>;
|
|
15
|
-
defaultExpandAll: PropTypes.Requireable<boolean>;
|
|
16
|
-
counterMargin: PropTypes.Requireable<number>;
|
|
17
|
-
};
|
|
18
|
-
defaultProps: {
|
|
19
|
-
className: string;
|
|
20
|
-
searchClassName: string;
|
|
21
|
-
treeClassName: string;
|
|
22
|
-
placeholder: string;
|
|
23
|
-
showLine: boolean;
|
|
24
|
-
showIcon: boolean;
|
|
25
|
-
defaultExpandAll: boolean;
|
|
26
|
-
counterMargin: number;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
declare const _default: React.ComponentType<Omit<any, "intl">>;
|
|
2
|
+
import { type IntlShape } from 'react-intl';
|
|
3
|
+
import type { CapTreeViewProps } from './types';
|
|
4
|
+
export declare const CapTreeView: ({ className, searchClassName, treeClassName, treeData, placeholder, showLine, defaultExpandAll, showIcon, counterMargin: _counterMargin, intl: _intl, ...rest }: CapTreeViewProps & {
|
|
5
|
+
intl?: IntlShape;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const _default: React.ComponentType<Omit<import("react-intl").WrappedComponentProps, "intl">>;
|
|
30
8
|
export default _default;
|
|
31
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapTreeView/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapTreeView/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAOxD,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,SAAS,CAAC;AAoB9D,eAAO,MAAM,WAAW,GAAI,iKAYzB,gBAAgB,GAAG;IAAE,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,4CAgKzC,CAAC;;AAEF,wBAAuC"}
|