@ctlyst.id/internal-ui 3.4.0 → 3.4.2
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/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
    
        package/dist/index.d.mts
    CHANGED
    
    | @@ -20,6 +20,7 @@ export { ToastContainer } from 'react-toastify'; | |
| 20 20 | 
             
            import { Id, ToastIcon } from 'react-toastify/dist/types';
         | 
| 21 21 | 
             
            import * as axios from 'axios';
         | 
| 22 22 | 
             
            import { AxiosRequestConfig, AxiosInstance, AxiosResponse } from 'axios';
         | 
| 23 | 
            +
            export { id } from 'date-fns/locale';
         | 
| 23 24 | 
             
            export { ThemeTypings } from '@chakra-ui/styled-system';
         | 
| 24 25 |  | 
| 25 26 | 
             
            declare const AccordionEye: ({ position }: {
         | 
    
        package/dist/index.d.ts
    CHANGED
    
    | @@ -20,6 +20,7 @@ export { ToastContainer } from 'react-toastify'; | |
| 20 20 | 
             
            import { Id, ToastIcon } from 'react-toastify/dist/types';
         | 
| 21 21 | 
             
            import * as axios from 'axios';
         | 
| 22 22 | 
             
            import { AxiosRequestConfig, AxiosInstance, AxiosResponse } from 'axios';
         | 
| 23 | 
            +
            export { id } from 'date-fns/locale';
         | 
| 23 24 | 
             
            export { ThemeTypings } from '@chakra-ui/styled-system';
         | 
| 24 25 |  | 
| 25 26 | 
             
            declare const AccordionEye: ({ position }: {
         | 
    
        package/dist/index.js
    CHANGED
    
    | @@ -340,6 +340,7 @@ __export(src_exports, { | |
| 340 340 | 
             
              forwardRef: () => import_react104.forwardRef,
         | 
| 341 341 | 
             
              getSelectAllCheckboxState: () => getSelectAllCheckboxState,
         | 
| 342 342 | 
             
              getTheme: () => getTheme,
         | 
| 343 | 
            +
              id: () => id,
         | 
| 343 344 | 
             
              isCellDisabled: () => isCellDisabled,
         | 
| 344 345 | 
             
              selectStyles: () => selectStyles,
         | 
| 345 346 | 
             
              theme: () => theme4,
         | 
| @@ -1276,6 +1277,7 @@ var isCellDisabled = (row, cellId) => { | |
| 1276 1277 | 
             
            };
         | 
| 1277 1278 | 
             
            var getCommonPinningStyles = (column) => {
         | 
| 1278 1279 | 
             
              const isPinned = column.getIsPinned();
         | 
| 1280 | 
            +
              const isFirstLeftPinnedColumn = isPinned === "left" && column.getIsFirstColumn("left");
         | 
| 1279 1281 | 
             
              const isLastLeftPinnedColumn = isPinned === "left" && column.getIsLastColumn("left");
         | 
| 1280 1282 | 
             
              const isFirstRightPinnedColumn = isPinned === "right" && column.getIsFirstColumn("right");
         | 
| 1281 1283 | 
             
              return {
         | 
| @@ -1284,8 +1286,12 @@ var getCommonPinningStyles = (column) => { | |
| 1284 1286 | 
             
                position: isPinned ? "sticky" : "relative",
         | 
| 1285 1287 | 
             
                zIndex: isPinned ? 1 : 0,
         | 
| 1286 1288 | 
             
                backgroundColor: "white",
         | 
| 1289 | 
            +
                ...isFirstLeftPinnedColumn ? {
         | 
| 1290 | 
            +
                  pl: "16px"
         | 
| 1291 | 
            +
                } : { pl: "8px" },
         | 
| 1287 1292 | 
             
                ...isLastLeftPinnedColumn ? {
         | 
| 1288 | 
            -
                   | 
| 1293 | 
            +
                  py: "16px",
         | 
| 1294 | 
            +
                  pr: "8px",
         | 
| 1289 1295 | 
             
                  "&:after": {
         | 
| 1290 1296 | 
             
                    transition: "all 0.3s",
         | 
| 1291 1297 | 
             
                    content: "''",
         | 
| @@ -1296,12 +1302,13 @@ var getCommonPinningStyles = (column) => { | |
| 1296 1302 | 
             
                    top: 0,
         | 
| 1297 1303 | 
             
                    transform: "translateX(100%)"
         | 
| 1298 1304 | 
             
                  },
         | 
| 1299 | 
            -
                  "[pin-left=true] &:after": {
         | 
| 1305 | 
            +
                  "[data-pin-left=true] &:after": {
         | 
| 1300 1306 | 
             
                    boxShadow: "inset 14px 0px 20px -10px #00000010"
         | 
| 1301 1307 | 
             
                  }
         | 
| 1302 1308 | 
             
                } : {},
         | 
| 1303 1309 | 
             
                ...isFirstRightPinnedColumn ? {
         | 
| 1304 | 
            -
                   | 
| 1310 | 
            +
                  py: "16px",
         | 
| 1311 | 
            +
                  px: "8px",
         | 
| 1305 1312 | 
             
                  "&:after": {
         | 
| 1306 1313 | 
             
                    transition: "all 0.3s",
         | 
| 1307 1314 | 
             
                    content: "''",
         | 
| @@ -1312,7 +1319,7 @@ var getCommonPinningStyles = (column) => { | |
| 1312 1319 | 
             
                    bottom: "-1px",
         | 
| 1313 1320 | 
             
                    transform: "translateX(-100%)"
         | 
| 1314 1321 | 
             
                  },
         | 
| 1315 | 
            -
                  "[pin-right=true] &:after": {
         | 
| 1322 | 
            +
                  "[data-pin-right=true] &:after": {
         | 
| 1316 1323 | 
             
                    boxShadow: "inset -14px 0px 20px -10px #00000010"
         | 
| 1317 1324 | 
             
                  }
         | 
| 1318 1325 | 
             
                } : {}
         | 
| @@ -1412,7 +1419,7 @@ var useDataTable = ({ | |
| 1412 1419 | 
             
              };
         | 
| 1413 1420 | 
             
            };
         | 
| 1414 1421 | 
             
            var DataTable = React5.forwardRef((props, ref) => {
         | 
| 1415 | 
            -
              var _a, _b, _c;
         | 
| 1422 | 
            +
              var _a, _b, _c, _d;
         | 
| 1416 1423 | 
             
              const { isLoading, styles, headerSticky, onRowClick, container, columnPinning } = props;
         | 
| 1417 1424 | 
             
              const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
         | 
| 1418 1425 | 
             
              const refTable = React5.useRef(null);
         | 
| @@ -1421,17 +1428,17 @@ var DataTable = React5.forwardRef((props, ref) => { | |
| 1421 1428 | 
             
              }));
         | 
| 1422 1429 | 
             
              let lastPinnedColumn = 0;
         | 
| 1423 1430 | 
             
              (_a = refTable.current) == null ? void 0 : _a.addEventListener("scroll", (s) => {
         | 
| 1424 | 
            -
                var _a2, _b2, _c2,  | 
| 1431 | 
            +
                var _a2, _b2, _c2, _d2;
         | 
| 1425 1432 | 
             
                const element = s.currentTarget;
         | 
| 1426 1433 | 
             
                if (element.scrollLeft > 0) {
         | 
| 1427 | 
            -
                  (_a2 = refTable.current) == null ? void 0 : _a2.setAttribute("pin-left", "true");
         | 
| 1434 | 
            +
                  (_a2 = refTable.current) == null ? void 0 : _a2.setAttribute("data-pin-left", "true");
         | 
| 1428 1435 | 
             
                } else {
         | 
| 1429 | 
            -
                  (_b2 = refTable.current) == null ? void 0 : _b2.removeAttribute("pin-left");
         | 
| 1436 | 
            +
                  (_b2 = refTable.current) == null ? void 0 : _b2.removeAttribute("data-pin-left");
         | 
| 1430 1437 | 
             
                }
         | 
| 1431 1438 | 
             
                if (element.scrollLeft < element.scrollWidth - (lastPinnedColumn + element.offsetWidth)) {
         | 
| 1432 | 
            -
                  (_c2 = refTable.current) == null ? void 0 : _c2.setAttribute("pin-right", "true");
         | 
| 1439 | 
            +
                  (_c2 = refTable.current) == null ? void 0 : _c2.setAttribute("data-pin-right", "true");
         | 
| 1433 1440 | 
             
                } else {
         | 
| 1434 | 
            -
                  ( | 
| 1441 | 
            +
                  (_d2 = refTable.current) == null ? void 0 : _d2.removeAttribute("data-pin-right");
         | 
| 1435 1442 | 
             
                }
         | 
| 1436 1443 | 
             
              });
         | 
| 1437 1444 | 
             
              return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
         | 
| @@ -1445,6 +1452,7 @@ var DataTable = React5.forwardRef((props, ref) => { | |
| 1445 1452 | 
             
                  maxW: "100%",
         | 
| 1446 1453 | 
             
                  w: "full",
         | 
| 1447 1454 | 
             
                  ref: refTable,
         | 
| 1455 | 
            +
                  ...((_d = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _d.length) ? { "data-pin-right": true } : {},
         | 
| 1448 1456 | 
             
                  ...container,
         | 
| 1449 1457 | 
             
                  children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react28.Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
         | 
| 1450 1458 | 
             
                    /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
         | 
| @@ -8026,6 +8034,7 @@ var import_react104 = require("@chakra-ui/react"); | |
| 8026 8034 | 
             
              forwardRef,
         | 
| 8027 8035 | 
             
              getSelectAllCheckboxState,
         | 
| 8028 8036 | 
             
              getTheme,
         | 
| 8037 | 
            +
              id,
         | 
| 8029 8038 | 
             
              isCellDisabled,
         | 
| 8030 8039 | 
             
              selectStyles,
         | 
| 8031 8040 | 
             
              theme,
         |