{"version":3,"file":"tableConstants.cjs","names":["_styled","_interopRequireDefault","require","_Box","_index","_jsxRuntime","e","__esModule","default","dataTableImmutableSettings","exports","enableColumnActions","enableDensityToggle","enableExpandAll","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableHiding","enablePagination","layoutMode","manualFiltering","manualSorting","muiTablePaperProps","elevation","sx","overflow","positionActionsColumn","rowVirtualizerOptions","overscan","selectAllMode","displayColumnDefOptions","header","muiTableBodyCellProps","minWidth","width","className","muiTableHeadCellProps","children","jsx","Box","marginInline","DragIndicatorIcon","opacity","padding","ScrollableTableContainer","styled","shouldForwardProp","prop","odysseyDesignTokens","isScrollableStart","isScrollableEnd","marginBlockEnd","Spacing4","position","borderInlineStartColor","HueNeutral200","borderInlineStartStyle","borderInlineStartWidth","BorderWidthMain","background","content","pointerEvents","top","left","bottom","Spacing6","zIndex","transition","TransitionDurationMain","TransitionTimingMain","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","right"],"sources":["../../../../src/labs/DataView/tableConstants.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { MRT_RowData, MRT_TableOptions } from \"material-react-table\";\n\nimport { Box } from \"../../Box.js\";\nimport { DragIndicatorIcon } from \"../../icons.generated/index.js\";\nimport { DesignTokens } from \"../../OdysseyDesignTokensContext.js\";\n\nexport const dataTableImmutableSettings = {\n  enableColumnActions: false,\n  enableDensityToggle: false,\n  enableExpandAll: false,\n  enableFilters: false,\n  enableFullScreenToggle: false,\n  enableGlobalFilter: false,\n  enableHiding: false,\n  enablePagination: false,\n  layoutMode: \"grid-no-grow\" as MRT_TableOptions<MRT_RowData>[\"layoutMode\"],\n  manualFiltering: true,\n  manualSorting: true,\n  muiTablePaperProps: {\n    elevation: 0,\n    sx: {\n      overflow: \"visible\",\n    },\n  },\n  positionActionsColumn:\n    \"last\" as MRT_TableOptions<MRT_RowData>[\"positionActionsColumn\"],\n  rowVirtualizerOptions: {\n    overscan: 4,\n  },\n  selectAllMode: \"all\" as MRT_TableOptions<MRT_RowData>[\"selectAllMode\"],\n};\n\nexport const displayColumnDefOptions = {\n  \"mrt-row-drag\": {\n    header: \"\",\n    muiTableBodyCellProps: {\n      sx: {\n        minWidth: 0,\n        width: \"auto\",\n      },\n      className: \"ods-drag-handle\",\n    },\n    muiTableHeadCellProps: {\n      sx: {\n        minWidth: 0,\n        width: \"auto\",\n      },\n      children: (\n        // Add a spacer to simulate the width of the drag handle in the column. Without this, the head cells are offset from their body cell counterparts\n        <Box sx={{ marginInline: \"-0.1rem\" }}>\n          <DragIndicatorIcon sx={{ marginInline: 1, opacity: 0 }} />\n        </Box>\n      ),\n    },\n  },\n  \"mrt-row-select\": {\n    muiTableHeadCellProps: {\n      padding: \"checkbox\" as const,\n    },\n    muiTableBodyCellProps: {\n      padding: \"checkbox\" as const,\n    },\n  },\n  \"mrt-row-expand\": {\n    header: \"\",\n    muiTableBodyCellProps: {\n      sx: {\n        overflow: \"visible\",\n      },\n    },\n  },\n};\n\nexport const ScrollableTableContainer = styled(\"div\", {\n  shouldForwardProp: (prop) =>\n    prop !== \"odysseyDesignTokens\" &&\n    prop !== \"isScrollableStart\" &&\n    prop !== \"isScrollableEnd\",\n})<{\n  isScrollableEnd: boolean;\n  isScrollableStart: boolean;\n  odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens, isScrollableStart, isScrollableEnd }) => ({\n  marginBlockEnd: odysseyDesignTokens.Spacing4,\n  position: \"relative\",\n  borderInlineStartColor: isScrollableStart\n    ? odysseyDesignTokens.HueNeutral200\n    : \"transparent\",\n  borderInlineStartStyle: \"solid\",\n  borderInlineStartWidth: odysseyDesignTokens.BorderWidthMain,\n  \"::before\": {\n    background:\n      \"linear-gradient(-90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.33) 50%, rgba(0, 0, 0, 1) 100%)\",\n    content: '\"\"',\n    opacity: isScrollableStart ? \"0.075\" : \"0\",\n    pointerEvents: \"none\",\n    position: \"absolute\",\n    top: 0,\n    left: 0,\n    bottom: 0,\n    width: odysseyDesignTokens.Spacing6,\n    zIndex: 100,\n    transition: `opacity ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n  },\n  borderInlineEndColor: isScrollableEnd\n    ? odysseyDesignTokens.HueNeutral200\n    : \"transparent\",\n  borderInlineEndStyle: \"solid\",\n  borderInlineEndWidth: odysseyDesignTokens.BorderWidthMain,\n  \"::after\": {\n    background:\n      \"linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.33) 50%, rgba(0, 0, 0, 1) 100%)\",\n    content: '\"\"',\n    opacity: isScrollableEnd ? \"0.075\" : \"0\",\n    pointerEvents: \"none\",\n    position: \"absolute\",\n    top: 0,\n    right: 0,\n    bottom: 0,\n    width: odysseyDesignTokens.Spacing6,\n    transition: `opacity ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n  },\n}));\n"],"mappings":";;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAmE,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAhBnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASO,MA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