@popsure/dirty-swan 0.54.19 → 0.54.20

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 CHANGED
@@ -14360,7 +14360,7 @@ var css_248z$9 = ".TableCell-module_th__2rjCU {\n vertical-align: middle;\n sc
14360
14360
  var styles$9 = {"th":"TableCell-module_th__2rjCU","thNavigation":"TableCell-module_thNavigation__qZ2sY","fixedCell":"TableCell-module_fixedCell__cL3-m","fixedCard":"TableCell-module_fixedCard__2LO8s"};
14361
14361
  styleInject(css_248z$9);
14362
14362
 
14363
- var css_248z$8 = ".BaseCell-module_relative__1v2X0 {\n position: relative;\n}\n\n.BaseCell-module_infoButtonAbsolute__Mpjrz {\n position: absolute;\n right: -32px;\n}\n\n.BaseCell-module_icon__1775U {\n margin: 2px;\n}\n\n.BaseCell-module_description__3_kfe {\n word-break: break-word;\n}\n\n.BaseCell-module_bigWithUnderline__2xx5X {\n position: relative;\n display: none;\n line-height: 38px;\n text-decoration: underline;\n text-decoration-color: #8e8cee;\n text-decoration-thickness: 4px;\n text-underline-offset: 8px;\n}\n@media (min-width: 34rem) {\n .BaseCell-module_bigWithUnderline__2xx5X {\n display: flex;\n }\n}";
14363
+ var css_248z$8 = ".BaseCell-module_relative__1v2X0 {\n position: relative;\n}\n\n.BaseCell-module_infoButtonAbsolute__Mpjrz {\n position: absolute;\n right: -32px;\n}\n\n.BaseCell-module_icon__1775U {\n margin: 2px;\n}\n\n.BaseCell-module_description__3_kfe {\n word-break: break-word;\n}\n\n.BaseCell-module_bigWithUnderline__2xx5X {\n position: relative;\n display: flex;\n line-height: 38px;\n text-decoration: underline;\n text-decoration-color: #8e8cee;\n text-decoration-thickness: 4px;\n text-underline-offset: 8px;\n}";
14364
14364
  var styles$8 = {"relative":"BaseCell-module_relative__1v2X0","infoButtonAbsolute":"BaseCell-module_infoButtonAbsolute__Mpjrz","icon":"BaseCell-module_icon__1775U","description":"BaseCell-module_description__3_kfe","bigWithUnderline":"BaseCell-module_bigWithUnderline__2xx5X"};
14365
14365
  styleInject(css_248z$8);
14366
14366
 
@@ -14771,22 +14771,23 @@ var defaultTextOverrides = {
14771
14771
  hideDetails: 'Hide details',
14772
14772
  };
14773
14773
  var Table = function (_a) {
14774
- var _b, _c, _d, _e, _f;
14775
- var cellReplacements = _a.cellReplacements, className = _a.className, collapsibleSections = _a.collapsibleSections, _g = _a.hideColumns, hideColumns = _g === void 0 ? [] : _g, hideDetails = _a.hideDetails, imageComponent = _a.imageComponent, modalContentRenderer = _a.modalContentRenderer, onModalOpen = _a.onModalOpen, onSelectionChanged = _a.onSelectionChanged, _h = _a.stickyHeaderTopOffset, stickyHeaderTopOffset = _h === void 0 ? 0 : _h, tableData = _a.tableData, definedTextOverrides = _a.textOverrides, title = _a.title;
14774
+ var _b, _c, _d, _e, _f, _g, _h, _j;
14775
+ 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, _l = _a.stickyHeaderTopOffset, stickyHeaderTopOffset = _l === void 0 ? 0 : _l, tableData = _a.tableData, definedTextOverrides = _a.textOverrides, title = _a.title;
14776
14776
  var textOverrides = __assign(__assign({}, defaultTextOverrides), definedTextOverrides);
14777
14777
  var isMobile = useMediaQuery('BELOW_MOBILE');
14778
- var _j = require$$0.useState(null), infoModalData = _j[0], setInfoModalData = _j[1];
14779
- var _k = require$$0.useState(true), shouldHideDetails = _k[0], setShouldHideDetails = _k[1];
14778
+ var _m = require$$0.useState(null), infoModalData = _m[0], setInfoModalData = _m[1];
14779
+ var _o = require$$0.useState(true), shouldHideDetails = _o[0], setShouldHideDetails = _o[1];
14780
14780
  var containerRef = require$$0.useRef(null);
14781
14781
  var headerRef = require$$0.useRef(null);
14782
14782
  var columnsLength = tableData[0].rows[0].length;
14783
14783
  useScrollSync(headerRef, containerRef, !isMobile);
14784
- var _l = useTableNavigation({
14784
+ var _p = useTableNavigation({
14785
14785
  enabled: isMobile,
14786
14786
  containerRef: containerRef,
14787
14787
  onSelectionChanged: onSelectionChanged,
14788
- }), activeSection = _l.activeSection, navigateTable = _l.navigateTable;
14789
- var currentActiveSection = (_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[activeSection];
14788
+ }), activeSection = _p.activeSection, navigateTable = _p.navigateTable;
14789
+ 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]) || {});
14790
+ 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];
14790
14791
  var currentActiveSectionReplacements = (currentActiveSection.cellId &&
14791
14792
  (cellReplacements === null || cellReplacements === void 0 ? void 0 : cellReplacements[currentActiveSection.cellId])) ||
14792
14793
  {};
@@ -14796,16 +14797,16 @@ var Table = function (_a) {
14796
14797
  onModalOpen === null || onModalOpen === void 0 ? void 0 : onModalOpen({ body: body, title: title });
14797
14798
  setInfoModalData({ body: body, title: title });
14798
14799
  }, []);
14799
- return (jsxRuntime.jsxs("div", { className: classNames$1(styles$4.wrapper, 'bg-white'), children: [isMobile ? (jsxRuntime.jsx(TableControls, { activeSection: activeSection, columnsLength: columnsLength, navigateTable: navigateTable, stickyHeaderTopOffset: stickyHeaderTopOffset, children: jsxRuntime.jsx(TableCell, __assign({}, (isBaseCell(currentActiveSection)
14800
- ? {
14801
- openModal: function (body) {
14802
- return handleOpenModal({
14803
- body: body,
14804
- title: currentActiveSection === null || currentActiveSection === void 0 ? void 0 : currentActiveSection.text,
14805
- });
14806
- },
14807
- }
14808
- : {}), 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: [(_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]], 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 }) }), hideDetails && (jsxRuntime.jsx(Card, { "data-testid": "show-hide-details", classNames: {
14800
+ return (jsxRuntime.jsxs("div", { className: classNames$1(styles$4.wrapper, 'bg-white'), children: [isMobile ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(titleCell === null || titleCell === void 0 ? void 0 : titleCell.text) && (jsxRuntime.jsx(TableCell, __assign({}, titleCell, { align: 'left', isNavigation: true, isTopLeftCell: true, type: undefined }))), jsxRuntime.jsx(TableControls, { activeSection: activeSection, columnsLength: columnsLength, navigateTable: navigateTable, stickyHeaderTopOffset: stickyHeaderTopOffset, children: jsxRuntime.jsx(TableCell, __assign({}, (isBaseCell(currentActiveSection)
14801
+ ? {
14802
+ openModal: function (body) {
14803
+ return handleOpenModal({
14804
+ body: body,
14805
+ title: currentActiveSection === null || currentActiveSection === void 0 ? void 0 : currentActiveSection.text,
14806
+ });
14807
+ },
14808
+ }
14809
+ : {}), 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 }) }), hideDetails && (jsxRuntime.jsx(Card, { "data-testid": "show-hide-details", classNames: {
14809
14810
  buttonWrapper: 'm8 mt32',
14810
14811
  title: 'd-flex gap8 ai-center jc-center',
14811
14812
  wrapper: 'bg-grey-200',