@popsure/dirty-swan 0.58.5 → 0.58.7
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/dist/cjs/index.js +39 -24
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/table/Table.d.ts +2 -1
- package/dist/cjs/lib/components/table/Table.stories.d.ts +6 -2
- package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +2 -1
- package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +1 -1
- package/dist/cjs/lib/components/table/components/TableContents/TableContents.d.ts +2 -1
- package/dist/cjs/lib/components/table/components/TableSection/TableSection.d.ts +2 -1
- package/dist/esm/{TableSection-f41d4248.js → TableSection-9cf86eb7.js} +4 -3
- package/dist/esm/TableSection-9cf86eb7.js.map +1 -0
- package/dist/esm/components/icon/icons/Bone.js +1 -1
- package/dist/esm/components/icon/icons/Bone.js.map +1 -1
- package/dist/esm/components/icon/icons/Car.js +1 -1
- package/dist/esm/components/icon/icons/Car.js.map +1 -1
- package/dist/esm/components/icon/icons/Files.js +1 -1
- package/dist/esm/components/icon/icons/Files.js.map +1 -1
- package/dist/esm/components/icon/icons/Id.js +1 -1
- package/dist/esm/components/icon/icons/Id.js.map +1 -1
- package/dist/esm/components/icon/icons/Prohibit.js +1 -1
- package/dist/esm/components/icon/icons/Prohibit.js.map +1 -1
- package/dist/esm/components/icon/icons/Receipt.js +1 -1
- package/dist/esm/components/icon/icons/Receipt.js.map +1 -1
- package/dist/esm/components/icon/icons/Signature.js +1 -1
- package/dist/esm/components/icon/icons/Signature.js.map +1 -1
- package/dist/esm/components/icon/icons/Stamp.js +1 -1
- package/dist/esm/components/icon/icons/Stamp.js.map +1 -1
- package/dist/esm/components/icon/icons/Translation.js +2 -2
- package/dist/esm/components/icon/icons/Translation.js.map +1 -1
- package/dist/esm/components/icon/icons.stories.js +1 -1
- package/dist/esm/components/icon/index.stories.js +1 -1
- package/dist/esm/components/table/Table.js +8 -8
- package/dist/esm/components/table/Table.js.map +1 -1
- package/dist/esm/components/table/Table.stories.js +8 -4
- package/dist/esm/components/table/Table.stories.js.map +1 -1
- package/dist/esm/components/table/Table.test.js +2 -2
- package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js +11 -3
- package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/CTACell/CTACell.stories.js +1 -0
- package/dist/esm/components/table/components/TableCell/CTACell/CTACell.stories.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/TableCell.js +1 -1
- package/dist/esm/components/table/components/TableCell/TableCell.test.js +1 -1
- package/dist/esm/components/table/components/TableContents/TableContents.js +15 -6
- package/dist/esm/components/table/components/TableContents/TableContents.js.map +1 -1
- package/dist/esm/components/table/components/TableContents/TableContents.test.js +2 -2
- package/dist/esm/components/table/components/TableSection/TableSection.js +2 -2
- package/dist/esm/components/table/components/TableSection/TableSection.test.js +2 -2
- package/dist/esm/{index-608a56e3.js → index-d2e06251.js} +1 -1
- package/dist/esm/{index-608a56e3.js.map → index-d2e06251.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/components/table/Table.d.ts +2 -1
- package/dist/esm/lib/components/table/Table.stories.d.ts +6 -2
- package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +2 -1
- package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +1 -1
- package/dist/esm/lib/components/table/components/TableContents/TableContents.d.ts +2 -1
- package/dist/esm/lib/components/table/components/TableSection/TableSection.d.ts +2 -1
- package/package.json +1 -1
- package/src/lib/components/icon/assets/bone.svg +5 -5
- package/src/lib/components/icon/assets/car.svg +10 -10
- package/src/lib/components/icon/assets/files.svg +8 -8
- package/src/lib/components/icon/assets/id.svg +9 -9
- package/src/lib/components/icon/assets/prohibit.svg +6 -6
- package/src/lib/components/icon/assets/receipt.svg +7 -7
- package/src/lib/components/icon/assets/signature.svg +6 -6
- package/src/lib/components/icon/assets/stamp.svg +7 -7
- package/src/lib/components/icon/assets/translation.svg +7 -14
- package/src/lib/components/icon/icons/Bone.tsx +2 -2
- package/src/lib/components/icon/icons/Car.tsx +4 -4
- package/src/lib/components/icon/icons/Files.tsx +4 -4
- package/src/lib/components/icon/icons/Id.tsx +3 -3
- package/src/lib/components/icon/icons/Prohibit.tsx +4 -7
- package/src/lib/components/icon/icons/Receipt.tsx +3 -3
- package/src/lib/components/icon/icons/Signature.tsx +2 -2
- package/src/lib/components/icon/icons/Stamp.tsx +3 -3
- package/src/lib/components/icon/icons/Translation.tsx +26 -25
- package/src/lib/components/table/Table.stories.tsx +6 -0
- package/src/lib/components/table/Table.tsx +4 -0
- package/src/lib/components/table/components/TableCell/CTACell/CTACell.tsx +11 -5
- package/src/lib/components/table/components/TableContents/TableContents.tsx +65 -51
- package/src/lib/components/table/components/TableSection/TableSection.tsx +8 -1
- package/dist/esm/TableSection-f41d4248.js.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -2549,7 +2549,7 @@ var Bold = (function (props) {
|
|
|
2549
2549
|
});
|
|
2550
2550
|
|
|
2551
2551
|
var Bone = (function (props) {
|
|
2552
|
-
return React.createElement(IconWrapper, props, jsxRuntime.jsx("g", { clipPath: "url(#bone_svg__a)", children: jsxRuntime.jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.8, d: "
|
|
2552
|
+
return React.createElement(IconWrapper, props, jsxRuntime.jsx("g", { clipPath: "url(#bone_svg__a)", children: jsxRuntime.jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.8, d: "M5.28 18.72a2.626 2.626 0 1 1 .985-4.82.75.75 0 0 0 .938-.1L13.8 7.2a.75.75 0 0 0 .1-.937 2.625 2.625 0 1 1 4.821-.986 2.625 2.625 0 1 1-.985 4.821.75.75 0 0 0-.938.1l-6.598 6.598a.75.75 0 0 0-.1.938 2.624 2.624 0 1 1-4.82.985Z" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "bone_svg__a", children: jsxRuntime.jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) }));
|
|
2553
2553
|
});
|
|
2554
2554
|
|
|
2555
2555
|
var BookOpen = (function (props) {
|
|
@@ -2613,7 +2613,7 @@ var CarTraffic = (function (props) {
|
|
|
2613
2613
|
});
|
|
2614
2614
|
|
|
2615
2615
|
var Car = (function (props) {
|
|
2616
|
-
return React.createElement(IconWrapper, props, jsxRuntime.jsxs("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", clipPath: "url(#car_svg__a)", children: [jsxRuntime.jsx("path", { strokeWidth: 1.8, d: "M1.
|
|
2616
|
+
return React.createElement(IconWrapper, props, jsxRuntime.jsxs("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", clipPath: "url(#car_svg__a)", children: [jsxRuntime.jsx("path", { strokeWidth: 1.8, d: "M1.5 10.5h21M21 16.5v2.25a.75.75 0 0 1-.75.75H18a.75.75 0 0 1-.75-.75V16.5M6.75 16.5v2.25a.75.75 0 0 1-.75.75H3.75a.75.75 0 0 1-.75-.75V16.5" }), jsxRuntime.jsx("path", { strokeWidth: 1.3, d: "M6 13.5h1.5M16.5 13.5H18" }), jsxRuntime.jsx("path", { strokeWidth: 1.8, d: "m21 10.5-2.802-6.305a.75.75 0 0 0-.686-.445H6.489a.75.75 0 0 0-.686.445L3 10.5v6h18v-6Z" })] }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "car_svg__a", children: jsxRuntime.jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) }));
|
|
2617
2617
|
});
|
|
2618
2618
|
|
|
2619
2619
|
var Cast = (function (props) {
|
|
@@ -2973,7 +2973,7 @@ var FileIcon = (function (props) {
|
|
|
2973
2973
|
});
|
|
2974
2974
|
|
|
2975
2975
|
var Files = (function (props) {
|
|
2976
|
-
return React.createElement(IconWrapper, props, jsxRuntime.jsxs("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth:
|
|
2976
|
+
return React.createElement(IconWrapper, props, jsxRuntime.jsxs("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, clipPath: "url(#files_svg__a)", children: [jsxRuntime.jsx("path", { d: "M15.75 21H5.25a.75.75 0 0 1-.75-.75V6.75A.75.75 0 0 1 5.25 6h7.5l3.75 3.75v10.5a.75.75 0 0 1-.75.75Z" }), jsxRuntime.jsx("path", { d: "M7.5 6V3.75A.75.75 0 0 1 8.25 3h7.5l3.75 3.75v10.5a.75.75 0 0 1-.75.75H16.5M8.25 14.25h4.5M8.25 17.25h4.5" })] }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "files_svg__a", children: jsxRuntime.jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) }));
|
|
2977
2977
|
});
|
|
2978
2978
|
|
|
2979
2979
|
var Film = (function (props) {
|
|
@@ -3089,7 +3089,7 @@ var HospitalBuilding = (function (props) {
|
|
|
3089
3089
|
});
|
|
3090
3090
|
|
|
3091
3091
|
var Id = (function (props) {
|
|
3092
|
-
return React.createElement(IconWrapper, props, jsxRuntime.jsxs("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.8, clipPath: "url(#id_svg__a)", children: [jsxRuntime.jsx("path", { d: "
|
|
3092
|
+
return React.createElement(IconWrapper, props, jsxRuntime.jsxs("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.8, clipPath: "url(#id_svg__a)", children: [jsxRuntime.jsx("path", { d: "M14.25 10.5H18M14.25 13.5H18M20.25 4.5H3.75a.75.75 0 0 0-.75.75v13.5c0 .414.336.75.75.75h16.5a.75.75 0 0 0 .75-.75V5.25a.75.75 0 0 0-.75-.75Z" }), jsxRuntime.jsx("path", { d: "M9 13.5A2.25 2.25 0 1 0 9 9a2.25 2.25 0 0 0 0 4.5ZM6 15.75c.333-1.294 1.602-2.25 3-2.25s2.668.955 3 2.25" })] }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "id_svg__a", children: jsxRuntime.jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) }));
|
|
3093
3093
|
});
|
|
3094
3094
|
|
|
3095
3095
|
var ImagePicture = (function (props) {
|
|
@@ -3433,7 +3433,7 @@ var Progress = (function (props) {
|
|
|
3433
3433
|
});
|
|
3434
3434
|
|
|
3435
3435
|
var Prohibit = (function (props) {
|
|
3436
|
-
return React.createElement(IconWrapper, props, jsxRuntime.jsxs("g", { stroke: "currentColor", strokeWidth:
|
|
3436
|
+
return React.createElement(IconWrapper, props, jsxRuntime.jsxs("g", { stroke: "currentColor", strokeWidth: 2, clipPath: "url(#prohibit_svg__a)", children: [jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18.364 18.364 5.636 5.637" }), jsxRuntime.jsx("path", { strokeMiterlimit: 10, d: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z" })] }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "prohibit_svg__a", children: jsxRuntime.jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) }));
|
|
3437
3437
|
});
|
|
3438
3438
|
|
|
3439
3439
|
var QrCode = (function (props) {
|
|
@@ -3453,7 +3453,7 @@ var Radio$1 = (function (props) {
|
|
|
3453
3453
|
});
|
|
3454
3454
|
|
|
3455
3455
|
var Receipt = (function (props) {
|
|
3456
|
-
return React.createElement(IconWrapper, props, jsxRuntime.jsx("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth:
|
|
3456
|
+
return React.createElement(IconWrapper, props, jsxRuntime.jsx("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, clipPath: "url(#receipt_svg__a)", children: jsxRuntime.jsx("path", { d: "M7.5 9.75h9M7.5 12.75h9M3 19.5V5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 .75.75V19.5L18 18l-3 1.5-3-1.5-3 1.5L6 18l-3 1.5Z" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "receipt_svg__a", children: jsxRuntime.jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) }));
|
|
3457
3457
|
});
|
|
3458
3458
|
|
|
3459
3459
|
var RefreshCcw = (function (props) {
|
|
@@ -3557,7 +3557,7 @@ var Sidebar = (function (props) {
|
|
|
3557
3557
|
});
|
|
3558
3558
|
|
|
3559
3559
|
var Signature = (function (props) {
|
|
3560
|
-
return React.createElement(IconWrapper, props, jsxRuntime.jsx("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.8, clipPath: "url(#signature_svg__a)", children: jsxRuntime.jsx("path", { d: "
|
|
3560
|
+
return React.createElement(IconWrapper, props, jsxRuntime.jsx("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.8, clipPath: "url(#signature_svg__a)", children: jsxRuntime.jsx("path", { d: "M2.25 16.8h19.5M2.25 21S13.08 3 7.304 3C3.007 3 2.961 21.104 12 9.768c0 0 .76 3.697 2.553 3.732.724.014 1.617-.592 2.697-2.25 0 0 0 2.25 4.5 2.25" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "signature_svg__a", children: jsxRuntime.jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) }));
|
|
3561
3561
|
});
|
|
3562
3562
|
|
|
3563
3563
|
var SkipBack = (function (props) {
|
|
@@ -3601,7 +3601,7 @@ var Square = (function (props) {
|
|
|
3601
3601
|
});
|
|
3602
3602
|
|
|
3603
3603
|
var Stamp = (function (props) {
|
|
3604
|
-
return React.createElement(IconWrapper, props, jsxRuntime.jsx("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth:
|
|
3604
|
+
return React.createElement(IconWrapper, props, jsxRuntime.jsx("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, clipPath: "url(#stamp_svg__a)", children: jsxRuntime.jsx("path", { d: "M3.75 21h16.5M10.717 12.75 9.051 4.969A2.25 2.25 0 0 1 11.25 2.25h1.5a2.25 2.25 0 0 1 2.2 2.719l-1.667 7.781M19.5 12.75h-15a.75.75 0 0 0-.75.75v3.75c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75Z" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "stamp_svg__a", children: jsxRuntime.jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) }));
|
|
3605
3605
|
});
|
|
3606
3606
|
|
|
3607
3607
|
var StarFilledIcon = (function (props) {
|
|
@@ -3689,7 +3689,7 @@ var TrailerParts = (function (props) {
|
|
|
3689
3689
|
});
|
|
3690
3690
|
|
|
3691
3691
|
var Translation = (function (props) {
|
|
3692
|
-
return React.createElement(IconWrapper, props, jsxRuntime.
|
|
3692
|
+
return React.createElement(IconWrapper, props, jsxRuntime.jsx("circle", { cx: 13.5, cy: 10.5, r: 8.5, stroke: "currentColor", strokeWidth: 2 }), jsxRuntime.jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeWidth: 2, d: "M14 2c-3.37 2.685-4.61 7.066-3.722 11" }), jsxRuntime.jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeWidth: 2, d: "M13 2c5.333 4.25 5.333 12.75 0 17M6 8h15M6 13h15" }), jsxRuntime.jsx("path", { fill: "#fff", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 19.375c0 .331-.13.65-.362.884a1.227 1.227 0 0 1-.873.366H4.47L2 22v-7.75c0-.332.13-.65.362-.884.231-.234.545-.366.873-.366h7.53c.328 0 .642.132.873.366.232.235.362.553.362.884v5.125Z" }));
|
|
3693
3693
|
});
|
|
3694
3694
|
|
|
3695
3695
|
var Trash2Icon = (function (props) {
|
|
@@ -16329,14 +16329,19 @@ var IconRenderer = function (_a) {
|
|
|
16329
16329
|
|
|
16330
16330
|
var CTACell = function (_a) {
|
|
16331
16331
|
var _b;
|
|
16332
|
-
var title = _a.title, price = _a.price, icon = _a.icon, grey = _a.grey, narrow = _a.narrow, href = _a.href, buttonCaption = _a.buttonCaption, imageComponent = _a.imageComponent, className = _a.className, dataCy = _a.dataCy, dataTestId = _a.dataTestId;
|
|
16332
|
+
var title = _a.title, price = _a.price, icon = _a.icon, grey = _a.grey, narrow = _a.narrow, href = _a.href, buttonCaption = _a.buttonCaption, imageComponent = _a.imageComponent, className = _a.className, dataCy = _a.dataCy, dataTestId = _a.dataTestId, onClick = _a.onClick;
|
|
16333
16333
|
var renderedIcon = (jsxRuntime.jsx(IconRenderer, { icon: icon, imageComponent: imageComponent }));
|
|
16334
|
-
return (jsxRuntime.jsxs("div", { className: classNames$1(className, "ta-center"), "data-cy": dataCy, "data-testid": dataTestId, children: [jsxRuntime.jsxs("div", { className: "d-flex jc-center ai-center gap8", children: [renderedIcon, jsxRuntime.jsxs("p", { className: "p-h3", children: [title, price && jsxRuntime.jsxs("span", { className: "tc-purple-500", children: [" ", price] })] })] }), jsxRuntime.jsx(
|
|
16334
|
+
return (jsxRuntime.jsxs("div", { className: classNames$1(className, "ta-center"), "data-cy": dataCy, "data-testid": dataTestId, children: [jsxRuntime.jsxs("div", { className: "d-flex jc-center ai-center gap8", children: [renderedIcon, jsxRuntime.jsxs("p", { className: "p-h3", children: [title, price && jsxRuntime.jsxs("span", { className: "tc-purple-500", children: [" ", price] })] })] }), jsxRuntime.jsx(Button, __assign({}, onClick ? { onClick: onClick } : {
|
|
16335
|
+
as: 'a',
|
|
16336
|
+
href: href,
|
|
16337
|
+
target: '_blank',
|
|
16338
|
+
rel: 'noopener noreferrer',
|
|
16339
|
+
}, { className: classNames$1('mt16 w100 wmx3', (_b = {
|
|
16335
16340
|
'p-btn--primary': !grey,
|
|
16336
16341
|
'p-btn--secondary-grey': grey
|
|
16337
16342
|
},
|
|
16338
16343
|
_b[styles$6.narrow] = narrow,
|
|
16339
|
-
_b)),
|
|
16344
|
+
_b)), children: buttonCaption }))] }));
|
|
16340
16345
|
};
|
|
16341
16346
|
|
|
16342
16347
|
var CardCell = function (_a) {
|
|
@@ -16399,7 +16404,7 @@ var isBaseCell = function (tableCellData) {
|
|
|
16399
16404
|
};
|
|
16400
16405
|
|
|
16401
16406
|
var TableSection = function (_a) {
|
|
16402
|
-
var className = _a.className, tableCellRows = _a.tableCellRows, _b = _a.hideColumns, hideColumns = _b === void 0 ? [] : _b, hideHeader = _a.hideHeader, openModal = _a.openModal, title = _a.title, width = _a.width, cellReplacements = _a.cellReplacements, imageComponent = _a.imageComponent;
|
|
16407
|
+
var className = _a.className, tableCellRows = _a.tableCellRows, _b = _a.hideColumns, hideColumns = _b === void 0 ? [] : _b, _c = _a.hideRows, hideRows = _c === void 0 ? [] : _c, hideHeader = _a.hideHeader, openModal = _a.openModal, title = _a.title, width = _a.width, cellReplacements = _a.cellReplacements, imageComponent = _a.imageComponent;
|
|
16403
16408
|
var headerRow = tableCellRows === null || tableCellRows === void 0 ? void 0 : tableCellRows[0];
|
|
16404
16409
|
var isBelowDesktop = useMediaQuery('BELOW_DESKTOP');
|
|
16405
16410
|
var getModalTitleFromColumnHeader = function (cellIndex) {
|
|
@@ -16425,6 +16430,7 @@ var TableSection = function (_a) {
|
|
|
16425
16430
|
return titleFromRow;
|
|
16426
16431
|
};
|
|
16427
16432
|
var isVisibleColumn = React.useCallback(function (cellIndex) { return !hideColumns.includes(cellIndex); }, [hideColumns]);
|
|
16433
|
+
var isVisibleRow = React.useCallback(function (rowIndex) { return !hideRows.includes(rowIndex); }, [hideRows]);
|
|
16428
16434
|
return (jsxRuntime.jsxs("table", { className: classNames$1(className, 'w100', styles$3.table), width: width, children: [jsxRuntime.jsx("caption", { className: "sr-only", children: title }), headerRow && (jsxRuntime.jsx("thead", { className: hideHeader ? 'sr-only' : '', children: jsxRuntime.jsx("tr", { children: headerRow.map(function (tableCellData, cellIndex) {
|
|
16429
16435
|
var isFirstCellInRow = cellIndex === 0;
|
|
16430
16436
|
var cellReplacementData = (tableCellData.cellId &&
|
|
@@ -16438,7 +16444,7 @@ var TableSection = function (_a) {
|
|
|
16438
16444
|
});
|
|
16439
16445
|
return (isVisibleColumn(cellIndex) && (jsxRuntime.jsx(TableCell, __assign({ isBelowDesktop: isBelowDesktop, isHeader: true, isFirstCellInRow: isFirstCellInRow, isTopLeftCell: isFirstCellInRow }, cellProps, { imageComponent: imageComponent }), cellIndex)));
|
|
16440
16446
|
}) }) })), jsxRuntime.jsx("tbody", { children: tableCellRows.map(function (row, rowIndex) {
|
|
16441
|
-
return rowIndex > 0 && (jsxRuntime.jsx("tr", { className: styles$3.tr, children: row.map(function (tableCellData, cellIndex) {
|
|
16447
|
+
return rowIndex > 0 && isVisibleRow(rowIndex) && (jsxRuntime.jsx("tr", { className: styles$3.tr, children: row.map(function (tableCellData, cellIndex) {
|
|
16442
16448
|
var key = "".concat(rowIndex, "-").concat(cellIndex);
|
|
16443
16449
|
var isFirstCellInRow = cellIndex === 0;
|
|
16444
16450
|
var titleFromRow = getModalTitleFromRowHeader(row);
|
|
@@ -16500,8 +16506,8 @@ var Collapsible = function (_a) {
|
|
|
16500
16506
|
|
|
16501
16507
|
var TableContents = function (_a) {
|
|
16502
16508
|
var _b, _c;
|
|
16503
|
-
var className = _a.className, collapsibleSections = _a.collapsibleSections, tableData = _a.tableData, _d = _a.hideColumns, hideColumns = _d === void 0 ? [] : _d, hideDetails = _a.hideDetails, isMobile = _a.isMobile, openModal = _a.openModal, shouldHideDetails = _a.shouldHideDetails, title = _a.title, cellReplacements = _a.cellReplacements, imageComponent = _a.imageComponent;
|
|
16504
|
-
var
|
|
16509
|
+
var className = _a.className, collapsibleSections = _a.collapsibleSections, tableData = _a.tableData, _d = _a.hideColumns, hideColumns = _d === void 0 ? [] : _d, hideDetails = _a.hideDetails, _e = _a.hideRows, hideRows = _e === void 0 ? [] : _e, isMobile = _a.isMobile, openModal = _a.openModal, shouldHideDetails = _a.shouldHideDetails, title = _a.title, cellReplacements = _a.cellReplacements, imageComponent = _a.imageComponent;
|
|
16510
|
+
var _f = React.useState(null), isSectionOpen = _f[0], setOpenSection = _f[1];
|
|
16505
16511
|
var firstHeadRow = (_c = (_b = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _b === void 0 ? void 0 : _b.rows) === null || _c === void 0 ? void 0 : _c[0];
|
|
16506
16512
|
var tableWidth = isMobile ? "".concat((firstHeadRow === null || firstHeadRow === void 0 ? void 0 : firstHeadRow.length) * 50, "%") : '';
|
|
16507
16513
|
var handleToggleSection = function (index) {
|
|
@@ -16509,6 +16515,8 @@ var TableContents = function (_a) {
|
|
|
16509
16515
|
return currentSection === index ? null : index;
|
|
16510
16516
|
});
|
|
16511
16517
|
};
|
|
16518
|
+
// Calculate global row offset for each section
|
|
16519
|
+
var globalRowOffset = 0;
|
|
16512
16520
|
return (jsxRuntime.jsx("div", { style: { width: tableWidth }, children: tableData.map(function (_a, index) {
|
|
16513
16521
|
var rows = _a.rows, _b = _a.section, section = _b === void 0 ? {} : _b;
|
|
16514
16522
|
var isFirstSection = index === 0;
|
|
@@ -16517,14 +16525,21 @@ var TableContents = function (_a) {
|
|
|
16517
16525
|
: isSectionOpen === index || isFirstSection;
|
|
16518
16526
|
var isVisible = hideDetails ? !shouldHideDetails : true;
|
|
16519
16527
|
var renderedIcon = (jsxRuntime.jsx(IconRenderer, { icon: section.icon, imageComponent: imageComponent, width: 20 }));
|
|
16520
|
-
|
|
16528
|
+
// Calculate section-specific hideRows based on global offset
|
|
16529
|
+
var sectionHideRows = hideRows
|
|
16530
|
+
.map(function (globalRowIndex) { return globalRowIndex - globalRowOffset; })
|
|
16531
|
+
.filter(function (localRowIndex) { return localRowIndex >= 0 && localRowIndex < rows.length; });
|
|
16532
|
+
var result = (isFirstSection || isVisible) && (jsxRuntime.jsxs("div", { children: [(section === null || section === void 0 ? void 0 : section.title) && (jsxRuntime.jsx("div", { className: styles$2.cardWrapper, children: jsxRuntime.jsx("div", { className: classNames$1(styles$2.card, 'p0'), children: jsxRuntime.jsx(Card, __assign({ actionIcon: isExpanded ? (jsxRuntime.jsx(ChevronUpIcon, { size: 24 })) : (jsxRuntime.jsx(ChevronDownIcon, { size: 24 })), "aria-expanded": isExpanded ? 'true' : 'false', "aria-hidden": true, classNames: {
|
|
16521
16533
|
wrapper: 'bg-purple-50 pl16',
|
|
16522
16534
|
icon: classNames$1(styles$2.cardIcon, 'tc-grey-900'),
|
|
16523
16535
|
}, dropShadow: false, icon: renderedIcon, title: section.title, titleVariant: "medium" }, (collapsibleSections
|
|
16524
16536
|
? {
|
|
16525
16537
|
onClick: function () { return handleToggleSection(index); },
|
|
16526
16538
|
}
|
|
16527
|
-
: {}))) }) })), jsxRuntime.jsx(Collapsible, { isExpanded: isExpanded, children: jsxRuntime.jsx(TableSection, { className: classNames$1(className, 'mb24'), tableCellRows: isFirstSection ? rows : __spreadArray$1([firstHeadRow], rows, true), hideColumns: hideColumns, hideHeader: true, openModal: openModal, title: "".concat(title).concat((section === null || section === void 0 ? void 0 : section.title) ? " - ".concat(section.title) : ''), width: tableWidth, cellReplacements: cellReplacements, imageComponent: imageComponent }) })] }, index))
|
|
16539
|
+
: {}))) }) })), jsxRuntime.jsx(Collapsible, { isExpanded: isExpanded, children: jsxRuntime.jsx(TableSection, { className: classNames$1(className, 'mb24'), tableCellRows: isFirstSection ? rows : __spreadArray$1([firstHeadRow], rows, true), hideColumns: hideColumns, hideRows: sectionHideRows, hideHeader: true, openModal: openModal, title: "".concat(title).concat((section === null || section === void 0 ? void 0 : section.title) ? " - ".concat(section.title) : ''), width: tableWidth, cellReplacements: cellReplacements, imageComponent: imageComponent }) })] }, index));
|
|
16540
|
+
// Update global offset for next section (excluding header row for non-first sections)
|
|
16541
|
+
globalRowOffset += rows.length;
|
|
16542
|
+
return result;
|
|
16528
16543
|
}) }));
|
|
16529
16544
|
};
|
|
16530
16545
|
|
|
@@ -16620,20 +16635,20 @@ var defaultTextOverrides = {
|
|
|
16620
16635
|
};
|
|
16621
16636
|
var Table = function (_a) {
|
|
16622
16637
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
16623
|
-
var cellReplacements = _a.cellReplacements, className = _a.className, collapsibleSections = _a.collapsibleSections, _k = _a.hideColumns, hideColumns = _k === void 0 ? [] : _k, hideDetails = _a.hideDetails, imageComponent = _a.imageComponent, modalContentRenderer = _a.modalContentRenderer, onModalOpen = _a.onModalOpen, onSelectionChanged = _a.onSelectionChanged,
|
|
16638
|
+
var cellReplacements = _a.cellReplacements, className = _a.className, collapsibleSections = _a.collapsibleSections, _k = _a.hideColumns, hideColumns = _k === void 0 ? [] : _k, hideDetails = _a.hideDetails, _l = _a.hideRows, hideRows = _l === void 0 ? [] : _l, imageComponent = _a.imageComponent, modalContentRenderer = _a.modalContentRenderer, onModalOpen = _a.onModalOpen, onSelectionChanged = _a.onSelectionChanged, _m = _a.stickyHeaderTopOffset, stickyHeaderTopOffset = _m === void 0 ? 0 : _m, tableData = _a.tableData, definedTextOverrides = _a.textOverrides, title = _a.title;
|
|
16624
16639
|
var textOverrides = __assign(__assign({}, defaultTextOverrides), definedTextOverrides);
|
|
16625
16640
|
var isMobile = useMediaQuery('BELOW_MOBILE');
|
|
16626
|
-
var
|
|
16627
|
-
var
|
|
16641
|
+
var _o = React.useState(null), infoModalData = _o[0], setInfoModalData = _o[1];
|
|
16642
|
+
var _p = React.useState(true), shouldHideDetails = _p[0], setShouldHideDetails = _p[1];
|
|
16628
16643
|
var containerRef = React.useRef(null);
|
|
16629
16644
|
var headerRef = React.useRef(null);
|
|
16630
16645
|
var columnsLength = tableData[0].rows[0].length;
|
|
16631
16646
|
useScrollSync(headerRef, containerRef, !isMobile);
|
|
16632
|
-
var
|
|
16647
|
+
var _q = useTableNavigation({
|
|
16633
16648
|
enabled: isMobile,
|
|
16634
16649
|
containerRef: containerRef,
|
|
16635
16650
|
onSelectionChanged: onSelectionChanged,
|
|
16636
|
-
}), activeSection =
|
|
16651
|
+
}), activeSection = _q.activeSection, navigateTable = _q.navigateTable;
|
|
16637
16652
|
var titleCell = __assign({ text: '' }, ((_d = (_c = (_b = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _b === void 0 ? void 0 : _b.rows) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d[0]) || {});
|
|
16638
16653
|
var currentActiveSection = (_g = (_f = (_e = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _e === void 0 ? void 0 : _e.rows) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g[activeSection];
|
|
16639
16654
|
var currentActiveSectionReplacements = (currentActiveSection.cellId &&
|
|
@@ -16654,7 +16669,7 @@ var Table = function (_a) {
|
|
|
16654
16669
|
});
|
|
16655
16670
|
},
|
|
16656
16671
|
}
|
|
16657
|
-
: {}), activeCellProps, { imageComponent: imageComponent, isNavigation: true })) })] })) : (jsxRuntime.jsx("div", { "aria-hidden": true, className: styles$4.stickyHeader, style: { top: "".concat(stickyHeaderTopOffset, "px") }, children: jsxRuntime.jsx("div", { className: styles$4.container, ref: headerRef, children: jsxRuntime.jsx(TableSection, { cellReplacements: cellReplacements, className: className, hideColumns: hideColumns, openModal: handleOpenModal, tableCellRows: [(_j = (_h = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _h === void 0 ? void 0 : _h.rows) === null || _j === void 0 ? void 0 : _j[0]], title: title, imageComponent: imageComponent }) }) })), jsxRuntime.jsx("div", { ref: containerRef, className: classNames$1(styles$4.container, 'pb8'), children: jsxRuntime.jsx(TableContents, { tableData: tableData, title: title, className: className, collapsibleSections: collapsibleSections, hideColumns: hideColumns, hideDetails: hideDetails, isMobile: isMobile, shouldHideDetails: shouldHideDetails, openModal: handleOpenModal, cellReplacements: cellReplacements, imageComponent: imageComponent }) }), (tableData === null || tableData === void 0 ? void 0 : tableData.length) > 1 && hideDetails && (jsxRuntime.jsx(Card, { "data-testid": "show-hide-details", classNames: {
|
|
16672
|
+
: {}), activeCellProps, { imageComponent: imageComponent, isNavigation: true })) })] })) : (jsxRuntime.jsx("div", { "aria-hidden": true, className: styles$4.stickyHeader, style: { top: "".concat(stickyHeaderTopOffset, "px") }, children: jsxRuntime.jsx("div", { className: styles$4.container, ref: headerRef, children: jsxRuntime.jsx(TableSection, { cellReplacements: cellReplacements, className: className, hideColumns: hideColumns, hideRows: hideRows, openModal: handleOpenModal, tableCellRows: [(_j = (_h = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _h === void 0 ? void 0 : _h.rows) === null || _j === void 0 ? void 0 : _j[0]], title: title, imageComponent: imageComponent }) }) })), jsxRuntime.jsx("div", { ref: containerRef, className: classNames$1(styles$4.container, 'pb8'), children: jsxRuntime.jsx(TableContents, { tableData: tableData, title: title, className: className, collapsibleSections: collapsibleSections, hideColumns: hideColumns, hideDetails: hideDetails, hideRows: hideRows, isMobile: isMobile, shouldHideDetails: shouldHideDetails, openModal: handleOpenModal, cellReplacements: cellReplacements, imageComponent: imageComponent }) }), (tableData === null || tableData === void 0 ? void 0 : tableData.length) > 1 && hideDetails && (jsxRuntime.jsx(Card, { "data-testid": "show-hide-details", classNames: {
|
|
16658
16673
|
buttonWrapper: 'm8 mt32',
|
|
16659
16674
|
title: 'd-flex gap8 ai-center jc-center fw-bold',
|
|
16660
16675
|
wrapper: 'bg-grey-200',
|