@owp/core 2.5.1 → 2.5.3
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/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/components/{OwpFileUploadButton/OwpFileUploadButton.js → OwpFilePickerButton/OwpFilePickerButton.js} +15 -15
- package/dist/components/OwpFilePickerButton/OwpFilePickerButton.js.map +1 -0
- package/dist/components/OwpLanguageSwitcherSelect/OwpLanguageSwitcherSelect.js.map +1 -1
- package/dist/components/OwpMoreActionsButton/OwpMoreActionsButton.js +27 -27
- package/dist/components/OwpMoreActionsButton/OwpMoreActionsButton.js.map +1 -1
- package/dist/components/OwpMrtTable/OwpMrtTable.js +335 -317
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpPageBreadcrumb/OwpPageBreadcrumb.js +39 -32
- package/dist/components/OwpPageBreadcrumb/OwpPageBreadcrumb.js.map +1 -1
- package/dist/components/OwpTable/OwpDataTable.js +273 -251
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +180 -159
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +267 -184
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/{OwpTreeGridExcelButton/OwpTreeGridExcelButton.js → OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js} +7 -7
- package/dist/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js.map +1 -0
- package/dist/constants/gridTheme.js +28 -0
- package/dist/constants/gridTheme.js.map +1 -0
- package/dist/hooks/useFormDataUploadMutation.js +27 -0
- package/dist/hooks/useFormDataUploadMutation.js.map +1 -0
- package/dist/hooks.js +63 -61
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +28 -28
- package/dist/layout/components/navbar/NavbarToggleButton.js +21 -22
- package/dist/layout/components/navbar/NavbarToggleButton.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyle.js +41 -37
- package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
- package/dist/layout/components/toolbar/ToolbarLayout.js +57 -69
- package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/{OwpFileUploadButton/OwpFileUploadButton.d.ts → OwpFilePickerButton/OwpFilePickerButton.d.ts} +4 -4
- package/dist/types/components/OwpFilePickerButton/index.d.ts +1 -0
- package/dist/types/components/OwpLanguageSwitcherSelect/OwpLanguageSwitcherSelect.d.ts +1 -1
- package/dist/types/components/OwpMoreActionsButton/OwpMoreActionsButton.d.ts +4 -4
- package/dist/types/components/OwpTable/OwpTable.d.ts +2 -0
- package/dist/types/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.d.ts +12 -0
- package/dist/types/components/OwpTreeGridExportExcelButton/index.d.ts +1 -0
- package/dist/types/constants/gridTheme.d.ts +30 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useFormDataUploadMutation.d.ts +30 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/types/OwpGridThemeTypes.d.ts +14 -0
- package/dist/types/types/OwpSettingsTypes.d.ts +2 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/utils/createFormDataBody.d.ts +20 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/zipUtil.d.ts +13 -0
- package/dist/utils/createFormDataBody.js +26 -0
- package/dist/utils/createFormDataBody.js.map +1 -0
- package/dist/utils/zipUtil.js +42 -29
- package/dist/utils/zipUtil.js.map +1 -1
- package/dist/utils.js +87 -82
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/OwpFileUploadButton/OwpFileUploadButton.js.map +0 -1
- package/dist/components/OwpTreeGridExcelButton/OwpTreeGridExcelButton.js.map +0 -1
- package/dist/types/components/OwpFileUploadButton/index.d.ts +0 -1
- package/dist/types/components/OwpTreeGridExcelButton/OwpTreeGridExcelButton.d.ts +0 -12
- package/dist/types/components/OwpTreeGridExcelButton/index.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwpTable.js","sources":["../../../src/components/OwpTable/OwpTable.tsx"],"sourcesContent":["import {\n getTreeGridFontFaceStyles,\n TREEGRID_FONT_FAMILY_STACK,\n} from '@/constants/treeGrid';\nimport { Divider, styled, Typography, type SxProps, type Theme } from '@mui/material';\nimport clsx from 'clsx';\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport Paper from '@mui/material/Paper';\nimport Table, { type TableProps } from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer, { type TableContainerProps } from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport { isArray, isEmpty, isNumber } from 'es-toolkit/compat';\nimport { type ReactNode, useMemo } from 'react';\n\ntype OwpTableCellValue = string | number;\ntype OwpTableHeaderRow = Record<string, OwpTableCellValue>;\ntype OwpTableRowData = Record<string, unknown>;\n\nconst getTableColumnKeys = (row?: Record<string, unknown>) => {\n if (!row) {\n return [];\n }\n\n return Object.keys(row).filter((keyName) => !keyName.includes('Span'));\n};\n\nconst getTableCellSx = (row: Record<string, unknown>, keyName: string) => {\n return (row[`${keyName}Sx`] as SxProps<Theme>) ?? {};\n};\n\nconst getTableCellSpan = (\n row: Record<string, unknown>,\n keyName: string,\n spanType: 'ColSpan' | 'RowSpan',\n) => {\n return (row[`${keyName}${spanType}`] as number | undefined) ?? undefined;\n};\n\nconst mergeSx = (...styles: Array<SxProps<Theme> | undefined | false>): SxProps<Theme> =>\n styles.reduce<Array<Exclude<SxProps<Theme>, readonly unknown[]>>>((acc, style) => {\n if (!style) {\n return acc;\n }\n\n return [...acc, ...(isArray(style) ? style : [style])];\n }, []) as SxProps<Theme>;\n\nconst treeGridContainerSx = {\n border: 0,\n borderRadius: 0,\n overflow: 'visible',\n} as const;\n\nconst treeGridFontSx = {\n fontFamily: TREEGRID_FONT_FAMILY_STACK,\n fontSize: '14px',\n fontWeight: 'normal',\n lineHeight: '16px',\n} as const;\n\ninterface StyledTableProps extends TableProps {\n canBodyFullHeight?: boolean;\n canUseTreeGridStyle?: boolean;\n containerProps?: TableContainerProps;\n footerSlot?: ReactNode;\n tableLayout?: 'auto' | 'fixed';\n title?: string;\n children: ReactNode;\n}\n\ntype StyledTableInnerProps = Pick<StyledTableProps, 'canBodyFullHeight' | 'canUseTreeGridStyle'>;\n\n/**\n * 총 row 수 표시 영역\n * @param totalCount 전체 row 수\n */\nexport function OwpTableTotalCount({ totalCount }: { totalCount?: number }) {\n return (\n <>\n <Divider />\n <Typography className=\"w-full py-8 pr-12\" align=\"right\">\n 전체: {isNumber(totalCount) ? totalCount.toLocaleString() : 0} 건\n </Typography>\n </>\n );\n}\n\n/**\n * StyledTable 스타일 컴포넌트\n * @param canBodyFullHeight body full height 사용 여부\n * @param canUseTreeGridStyle TreeGrid 스타일 사용 여부\n * @param children 하위 콘텐츠\n * @param containerProps containerProps props\n * @param footerSlot footer 영역\n * @param tableLayout tableLayout 값\n */\nexport const StyledTable = ({\n canBodyFullHeight,\n canUseTreeGridStyle,\n children,\n className,\n containerProps,\n footerSlot,\n tableLayout,\n ...tableProps\n}: StyledTableProps) => {\n return (\n <>\n {canUseTreeGridStyle && <GlobalStyles styles={getTreeGridFontFaceStyles()} />}\n <TableContainer\n component={Paper}\n variant=\"outlined\"\n {...containerProps}\n sx={mergeSx(\n canUseTreeGridStyle && treeGridContainerSx,\n canBodyFullHeight && { height: '100%' },\n containerProps?.sx,\n )}\n >\n <StyledTableInner\n {...tableProps}\n canBodyFullHeight={canBodyFullHeight}\n canUseTreeGridStyle={canUseTreeGridStyle}\n className={clsx(\n canBodyFullHeight && 'h-full',\n tableLayout === 'fixed' ? 'table-fixed' : tableLayout === 'auto' ? 'table-auto' : '',\n className,\n )}\n >\n {children}\n </StyledTableInner>\n {footerSlot}\n </TableContainer>\n </>\n );\n};\n\nconst StyledTableInner = styled(Table, {\n shouldForwardProp: (prop) => prop !== 'canBodyFullHeight' && prop !== 'canUseTreeGridStyle',\n})<StyledTableInnerProps>(({ theme, canBodyFullHeight, canUseTreeGridStyle }) => ({\n ...(canBodyFullHeight && {\n height: '100%',\n }),\n ...(canBodyFullHeight && {\n '& .MuiTableBody-root': {\n height: '100%',\n },\n '& .MuiTableBody-root > .MuiTableRow-root': {\n height: '100%',\n },\n }),\n '& .MuiTableCell-root': canUseTreeGridStyle\n ? {\n boxSizing: 'border-box',\n ...treeGridFontSx,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n verticalAlign: 'middle',\n whiteSpace: 'nowrap',\n }\n : {\n fontSize: '1.7rem',\n padding: '7px 10px',\n borderLeft: 'none',\n borderRight: 'none',\n },\n ...(!canUseTreeGridStyle && {\n '& .MuiTableRow-root > .MuiTableCell-root + .MuiTableCell-root': {\n borderLeft: `1px solid ${theme.palette.divider}`,\n },\n }),\n '& th': canUseTreeGridStyle\n ? {\n ...treeGridFontSx,\n backgroundColor: '#586980',\n borderTop: '1px solid #6F7F94',\n borderBottom: '1px solid #6F7F94',\n borderLeft: 0,\n borderRight: '1px solid #6F7F94',\n color: 'white',\n height: 33,\n minHeight: 33,\n padding: '7px 2px 6px 10px',\n '&:first-of-type': {\n borderLeft: '1px solid #6F7F94',\n },\n }\n : {\n backgroundColor: theme.palette.grey[200],\n fontWeight: 600,\n },\n '& td': canUseTreeGridStyle\n ? {\n borderBottom: '1px solid #CDD8E4',\n borderLeft: 0,\n borderRight: '1px solid #CDD8E4',\n color: '#111112',\n padding: '7px 10px 6px',\n '&:first-of-type': {\n borderLeft: '1px solid #CDD8E4',\n },\n }\n : {},\n ...(canUseTreeGridStyle && {\n '& tbody > tr:first-of-type > th:first-of-type': {\n borderTopLeftRadius: 'inherit',\n },\n '& tbody > tr:first-of-type > td:last-of-type': {\n borderTopRightRadius: 'inherit',\n },\n }),\n}));\n\nexport const StyledTableRow = styled(TableRow)`\n /* &:last-child th,\n &:last-child td {\n border-bottom: 0;\n } */\n`;\n\ninterface OwpTableProps<T> extends Omit<StyledTableProps, 'children'> {\n canTotalCountRow?: boolean;\n headers: OwpTableHeaderRow | OwpTableHeaderRow[];\n rows: T[];\n totalCount?: number;\n}\n\n/**\n * OwpTable 컴포넌트\n * @param canTotalCountRow 전체 row 수 표시 여부\n * @param headers headers 값\n * @param rows 행 데이터 목록\n * @param totalCount 전체 row 수\n */\nexport function OwpTable<T>({\n canTotalCountRow = false,\n headers,\n rows,\n totalCount,\n ...restTableProps\n}: OwpTableProps<T>) {\n const resolvedHeaderRows = useMemo(\n () => (isArray(headers) ? headers : isEmpty(headers) ? [] : [headers]),\n [headers],\n );\n const commonKeyListData = useMemo(\n () => getTableColumnKeys(isArray(headers) ? headers[0] : headers),\n [headers],\n );\n\n return (\n <StyledTable\n {...restTableProps}\n footerSlot={\n canTotalCountRow ? (\n <OwpTableTotalCount totalCount={typeof totalCount === 'undefined' ? rows.length : totalCount} />\n ) : undefined\n }\n className={clsx(restTableProps.tableLayout && 'w-full', restTableProps.className)}\n >\n <TableHead>\n {resolvedHeaderRows.map((headerData, index) => (\n <StyledTableRow key={`table-header-${index}`}>\n {getTableColumnKeys(headerData).map((keyName) => (\n <TableCell\n key={`table-header-${index}-${keyName}`}\n className=\"whitespace-pre-wrap\"\n sx={getTableCellSx(headerData, keyName)}\n colSpan={getTableCellSpan(headerData, keyName, 'ColSpan')}\n rowSpan={getTableCellSpan(headerData, keyName, 'RowSpan')}\n align=\"center\"\n >\n {headerData[keyName]}\n </TableCell>\n ))}\n </StyledTableRow>\n ))}\n </TableHead>\n <TableBody>\n {rows.map((row, index) => {\n const currentRow = row as OwpTableRowData;\n\n return (\n <StyledTableRow key={`table-row-${index}`}>\n {commonKeyListData.map((keyName) => (\n <TableCell\n key={`table-row-cell-${index}-${keyName}`}\n className=\"whitespace-pre-wrap h-64\"\n sx={getTableCellSx(currentRow, keyName)}\n align=\"center\"\n >\n {currentRow[keyName] as ReactNode}\n </TableCell>\n ))}\n </StyledTableRow>\n );\n })}\n </TableBody>\n </StyledTable>\n );\n}\n"],"names":["getTableColumnKeys","__name","row","keyName","getTableCellSx","getTableCellSpan","spanType","mergeSx","styles","acc","style","isArray","treeGridContainerSx","treeGridFontSx","TREEGRID_FONT_FAMILY_STACK","OwpTableTotalCount","totalCount","jsxs","Fragment","jsx","Divider","Typography","isNumber","StyledTable","canBodyFullHeight","canUseTreeGridStyle","children","className","containerProps","footerSlot","tableLayout","tableProps","GlobalStyles","getTreeGridFontFaceStyles","TableContainer","Paper","StyledTableInner","clsx","styled","Table","prop","theme","StyledTableRow","TableRow","OwpTable","canTotalCountRow","headers","rows","restTableProps","resolvedHeaderRows","useMemo","isEmpty","commonKeyListData","TableHead","headerData","index","TableCell","TableBody","currentRow"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,IAAqB,gBAAAC,EAAA,CAACC,MACrBA,IAIE,OAAO,KAAKA,CAAG,EAAE,OAAO,CAACC,MAAY,CAACA,EAAQ,SAAS,MAAM,CAAC,IAH5D,CAAA,GAFgB,uBAQrBC,IAAiB,gBAAAH,EAAA,CAACC,GAA8BC,MAC5CD,EAAI,GAAGC,CAAO,IAAI,KAAwB,CAAA,GAD7B,mBAIjBE,IAAmB,gBAAAJ,EAAA,CACvBC,GACAC,GACAG,MAEQJ,EAAI,GAAGC,CAAO,GAAGG,CAAQ,EAAE,KAA4B,QALxC,qBAQnBC,IAAU,gBAAAN,EAAA,IAAIO,MAClBA,EAAO,OAA2D,CAACC,GAAKC,MACjEA,IAIE,CAAC,GAAGD,GAAK,GAAIE,EAAQD,CAAK,IAAIA,IAAQ,CAACA,CAAK,CAAE,IAH5CD,GAIR,EAAE,GAPS,YASVG,IAAsB;AAAA,EAC1B,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AACZ,GAEMC,IAAiB;AAAA,EACrB,YAAYC;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AAO;AAAA,YACtC,SAASE,EAAiBiD,GAAYnD,GAAS,SAAS;AAAA,YACxD,SAASE,EAAiBiD,GAAYnD,GAAS,SAAS;AAAA,YACxD,OAAM;AAAA,YAEL,YAAWA,CAAO;AAAA,UAAA;AAAA,UAPd,gBAAgBoD,CAAK,IAAIpD,CAAO;AAAA,QAAA,CASxC,EAAA,GAZkB,gBAAgBoD,CAAK,EAa1C,CACD,EAAA,CACH;AAAA,0BACCE,GAAA,EACE,UAAAV,EAAK,IAAI,CAAC7C,GAAKqD,MAAU;AACxB,gBAAMG,IAAaxD;AAEnB,iBACE,gBAAAiB,EAACuB,GAAA,EACE,UAAAU,EAAkB,IAAI,CAACjD,MACtB,gBAAAgB;AAAA,YAACqC;AAAA,YAAA;AAAA,cAEC,WAAU;AAAA,cACV,IAAIpD,EAAesD,GAAYvD,CAAO;AAAA,cACtC,OAAM;AAAA,cAEL,YAAWA,CAAO;AAAA,YAAA;AAAA,YALd,kBAAkBoD,CAAK,IAAIpD,CAAO;AAAA,UAAA,CAO1C,KAVkB,aAAaoD,CAAK,EAWvC;AAAA,QAEJ,CAAC,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAlEgBtD,EAAA2C,IAAA;"}
|
|
1
|
+
{"version":3,"file":"OwpTable.js","sources":["../../../src/components/OwpTable/OwpTable.tsx"],"sourcesContent":["import {\n resolveOwpGridTheme,\n type OwpResolvedGridThemeConfigType,\n} from '@/constants/gridTheme';\nimport {\n getTreeGridFontFaceStyles,\n TREEGRID_FONT_FAMILY_STACK,\n} from '@/constants/treeGrid';\nimport { useGetCurrentSettings } from '@/hooks/useOwpSettings';\nimport { Divider, styled, Typography, type SxProps, type Theme } from '@mui/material';\nimport clsx from 'clsx';\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport Paper from '@mui/material/Paper';\nimport Table, { type TableProps } from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer, { type TableContainerProps } from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport { isArray, isEmpty, isNumber } from 'es-toolkit/compat';\nimport { type ReactNode, useMemo } from 'react';\n\ntype OwpTableCellValue = string | number;\ntype OwpTableHeaderRow = Record<string, OwpTableCellValue>;\ntype OwpTableRowData = Record<string, unknown>;\n\nconst getTableColumnKeys = (row?: Record<string, unknown>) => {\n if (!row) {\n return [];\n }\n\n return Object.keys(row).filter((keyName) => !keyName.includes('Span'));\n};\n\nconst getTableCellSx = (row: Record<string, unknown>, keyName: string) => {\n return (row[`${keyName}Sx`] as SxProps<Theme>) ?? {};\n};\n\nconst getTableCellSpan = (\n row: Record<string, unknown>,\n keyName: string,\n spanType: 'ColSpan' | 'RowSpan',\n) => {\n return (row[`${keyName}${spanType}`] as number | undefined) ?? undefined;\n};\n\nconst mergeSx = (...styles: Array<SxProps<Theme> | undefined | false>): SxProps<Theme> =>\n styles.reduce<Array<Exclude<SxProps<Theme>, readonly unknown[]>>>((acc, style) => {\n if (!style) {\n return acc;\n }\n\n return [...acc, ...(isArray(style) ? style : [style])];\n }, []) as SxProps<Theme>;\n\nconst treeGridContainerSx = {\n border: 0,\n borderRadius: 0,\n overflow: 'visible',\n} as const;\n\nconst getTreeGridTypographySx = (\n fontSize: number | string,\n fontWeight: number | string = 'normal',\n) => ({\n fontFamily: TREEGRID_FONT_FAMILY_STACK,\n fontSize,\n fontWeight,\n lineHeight: '16px',\n});\n\nconst getTreeGridCellBaseSx = (treeGridTheme: OwpResolvedGridThemeConfigType) => ({\n ...getTreeGridTypographySx(treeGridTheme.cell.fontSize),\n boxSizing: 'border-box',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n verticalAlign: 'middle',\n whiteSpace: 'nowrap',\n});\n\ninterface StyledTableProps extends TableProps {\n canBodyFullHeight?: boolean;\n canUseTreeGridStyle?: boolean;\n containerProps?: TableContainerProps;\n footerSlot?: ReactNode;\n tableLayout?: 'auto' | 'fixed';\n treeGridTheme?: OwpResolvedGridThemeConfigType;\n title?: string;\n children: ReactNode;\n}\n\ntype StyledTableInnerProps = Pick<\n StyledTableProps,\n 'canBodyFullHeight' | 'canUseTreeGridStyle' | 'treeGridTheme'\n>;\n\n/**\n * 총 row 수 표시 영역\n * @param totalCount 전체 row 수\n */\nexport function OwpTableTotalCount({ totalCount }: { totalCount?: number }) {\n return (\n <>\n <Divider />\n <Typography className=\"w-full py-8 pr-12\" align=\"right\">\n 전체: {isNumber(totalCount) ? totalCount.toLocaleString() : 0} 건\n </Typography>\n </>\n );\n}\n\n/**\n * StyledTable 스타일 컴포넌트\n * @param canBodyFullHeight body full height 사용 여부\n * @param canUseTreeGridStyle TreeGrid 스타일 사용 여부\n * @param children 하위 콘텐츠\n * @param containerProps containerProps props\n * @param footerSlot footer 영역\n * @param tableLayout tableLayout 값\n */\nexport const StyledTable = ({\n canBodyFullHeight,\n canUseTreeGridStyle,\n children,\n className,\n containerProps,\n footerSlot,\n tableLayout,\n ...tableProps\n}: StyledTableProps) => {\n const currentSettings = useGetCurrentSettings();\n const treeGridTheme = useMemo(\n () => resolveOwpGridTheme(currentSettings?.theme?.main?.grid),\n [currentSettings],\n );\n\n return (\n <>\n {canUseTreeGridStyle && <GlobalStyles styles={getTreeGridFontFaceStyles()} />}\n <TableContainer\n component={Paper}\n variant=\"outlined\"\n {...containerProps}\n sx={mergeSx(\n canUseTreeGridStyle && treeGridContainerSx,\n canBodyFullHeight && { height: '100%' },\n containerProps?.sx,\n )}\n >\n <StyledTableInner\n {...tableProps}\n canBodyFullHeight={canBodyFullHeight}\n canUseTreeGridStyle={canUseTreeGridStyle}\n treeGridTheme={treeGridTheme}\n className={clsx(\n canBodyFullHeight && 'h-full',\n tableLayout === 'fixed' ? 'table-fixed' : tableLayout === 'auto' ? 'table-auto' : '',\n className,\n )}\n >\n {children}\n </StyledTableInner>\n {footerSlot}\n </TableContainer>\n </>\n );\n};\n\nconst StyledTableInner = styled(Table, {\n shouldForwardProp: (prop) =>\n prop !== 'canBodyFullHeight' && prop !== 'canUseTreeGridStyle' && prop !== 'treeGridTheme',\n})<StyledTableInnerProps>(({ theme, canBodyFullHeight, canUseTreeGridStyle, treeGridTheme }) => {\n const resolvedTreeGridTheme = treeGridTheme ?? resolveOwpGridTheme();\n\n return {\n ...(canBodyFullHeight && {\n height: '100%',\n }),\n ...(canBodyFullHeight && {\n '& .MuiTableBody-root': {\n height: '100%',\n },\n '& .MuiTableBody-root > .MuiTableRow-root': {\n height: '100%',\n },\n }),\n '& .MuiTableCell-root': canUseTreeGridStyle\n ? {\n ...getTreeGridCellBaseSx(resolvedTreeGridTheme),\n }\n : {\n fontSize: '1.7rem',\n padding: '7px 10px',\n borderLeft: 'none',\n borderRight: 'none',\n },\n ...(!canUseTreeGridStyle && {\n '& .MuiTableRow-root > .MuiTableCell-root + .MuiTableCell-root': {\n borderLeft: `1px solid ${theme.palette.divider}`,\n },\n }),\n '& th': canUseTreeGridStyle\n ? {\n ...getTreeGridTypographySx(\n resolvedTreeGridTheme.header.fontSize,\n resolvedTreeGridTheme.header.fontWeight,\n ),\n backgroundColor: resolvedTreeGridTheme.header.backgroundColor,\n borderTop: '1px solid #6F7F94',\n borderBottom: '1px solid #6F7F94',\n borderLeft: 0,\n borderRight: '1px solid #6F7F94',\n color: resolvedTreeGridTheme.header.color,\n height: resolvedTreeGridTheme.header.height,\n minHeight: resolvedTreeGridTheme.header.height,\n padding: '7px 2px 6px 10px',\n '&:first-of-type': {\n borderLeft: '1px solid #6F7F94',\n },\n }\n : {\n backgroundColor: theme.palette.grey[200],\n fontWeight: 600,\n },\n '& td': canUseTreeGridStyle\n ? {\n borderBottom: '1px solid #CDD8E4',\n borderLeft: 0,\n borderRight: '1px solid #CDD8E4',\n color: '#111112',\n fontSize: resolvedTreeGridTheme.cell.fontSize,\n padding: '7px 10px 6px',\n '&:first-of-type': {\n borderLeft: '1px solid #CDD8E4',\n },\n }\n : {},\n ...(canUseTreeGridStyle && {\n '& tbody > tr:first-of-type > th:first-of-type': {\n borderTopLeftRadius: 'inherit',\n },\n '& tbody > tr:first-of-type > td:last-of-type': {\n borderTopRightRadius: 'inherit',\n },\n }),\n };\n});\n\nexport const StyledTableRow = styled(TableRow)`\n /* &:last-child th,\n &:last-child td {\n border-bottom: 0;\n } */\n`;\n\ninterface OwpTableProps<T> extends Omit<StyledTableProps, 'children'> {\n canTotalCountRow?: boolean;\n headers: OwpTableHeaderRow | OwpTableHeaderRow[];\n rows: T[];\n totalCount?: number;\n}\n\n/**\n * OwpTable 컴포넌트\n * @param canTotalCountRow 전체 row 수 표시 여부\n * @param headers headers 값\n * @param rows 행 데이터 목록\n * @param totalCount 전체 row 수\n */\nexport function OwpTable<T>({\n canTotalCountRow = false,\n headers,\n rows,\n totalCount,\n ...restTableProps\n}: OwpTableProps<T>) {\n const resolvedHeaderRows = useMemo(\n () => (isArray(headers) ? headers : isEmpty(headers) ? [] : [headers]),\n [headers],\n );\n const commonKeyListData = useMemo(\n () => getTableColumnKeys(isArray(headers) ? headers[0] : headers),\n [headers],\n );\n\n return (\n <StyledTable\n {...restTableProps}\n footerSlot={\n canTotalCountRow ? (\n <OwpTableTotalCount totalCount={typeof totalCount === 'undefined' ? rows.length : totalCount} />\n ) : undefined\n }\n className={clsx(restTableProps.tableLayout && 'w-full', restTableProps.className)}\n >\n <TableHead>\n {resolvedHeaderRows.map((headerData, index) => (\n <StyledTableRow key={`table-header-${index}`}>\n {getTableColumnKeys(headerData).map((keyName) => (\n <TableCell\n key={`table-header-${index}-${keyName}`}\n className=\"whitespace-pre-wrap\"\n sx={getTableCellSx(headerData, keyName)}\n colSpan={getTableCellSpan(headerData, keyName, 'ColSpan')}\n rowSpan={getTableCellSpan(headerData, keyName, 'RowSpan')}\n align=\"center\"\n >\n {headerData[keyName]}\n </TableCell>\n ))}\n </StyledTableRow>\n ))}\n </TableHead>\n <TableBody>\n {rows.map((row, index) => {\n const currentRow = row as OwpTableRowData;\n\n return (\n <StyledTableRow key={`table-row-${index}`}>\n {commonKeyListData.map((keyName) => (\n <TableCell\n key={`table-row-cell-${index}-${keyName}`}\n className=\"whitespace-pre-wrap h-64\"\n sx={getTableCellSx(currentRow, keyName)}\n align=\"center\"\n >\n {currentRow[keyName] as ReactNode}\n </TableCell>\n ))}\n </StyledTableRow>\n );\n })}\n </TableBody>\n </StyledTable>\n );\n}\n"],"names":["getTableColumnKeys","__name","row","keyName","getTableCellSx","getTableCellSpan","spanType","mergeSx","styles","acc","style","isArray","treeGridContainerSx","getTreeGridTypographySx","fontSize","fontWeight","TREEGRID_FONT_FAMILY_STACK","getTreeGridCellBaseSx","treeGridTheme","OwpTableTotalCount","totalCount","jsxs","Fragment","jsx","Divider","Typography","isNumber","StyledTable","canBodyFullHeight","canUseTreeGridStyle","children","className","containerProps","footerSlot","tableLayout","tableProps","currentSettings","useGetCurrentSettings","useMemo","resolveOwpGridTheme","_b","_a","GlobalStyles","getTreeGridFontFaceStyles","TableContainer","Paper","StyledTableInner","clsx","styled","Table","prop","theme","resolvedTreeGridTheme","StyledTableRow","TableRow","OwpTable","canTotalCountRow","headers","rows","restTableProps","resolvedHeaderRows","isEmpty","commonKeyListData","TableHead","headerData","index","TableCell","TableBody","currentRow"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,IAAqB,gBAAAC,EAAA,CAACC,MACrBA,IAIE,OAAO,KAAKA,CAAG,EAAE,OAAO,CAACC,MAAY,CAACA,EAAQ,SAAS,MAAM,CAAC,IAH5D,CAAA,GAFgB,uBAQrBC,IAAiB,gBAAAH,EAAA,CAACC,GAA8BC,MAC5CD,EAAI,GAAGC,CAAO,IAAI,KAAwB,CAAA,GAD7B,mBAIjBE,IAAmB,gBAAAJ,EAAA,CACvBC,GACAC,GACAG,MAEQJ,EAAI,GAAGC,CAAO,GAAGG,CAAQ,EAAE,KAA4B,QALxC,qBAQnBC,IAAU,gBAAAN,EAAA,IAAIO,MAClBA,EAAO,OAA2D,CAACC,GA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AA,EACE,UAAAT,EAAK,IAAI,CAACxD,GAAK+D,MAAU;AACxB,gBAAMG,IAAalE;AAEnB,iBACE,gBAAAqB,EAAC8B,GAAA,EACE,UAAAS,EAAkB,IAAI,CAAC3D,MACtB,gBAAAoB;AAAA,YAAC2C;AAAA,YAAA;AAAA,cAEC,WAAU;AAAA,cACV,IAAI9D,EAAegE,GAAYjE,CAAO;AAAA,cACtC,OAAM;AAAA,cAEL,YAAWA,CAAO;AAAA,YAAA;AAAA,YALd,kBAAkB8D,CAAK,IAAI9D,CAAO;AAAA,UAAA,CAO1C,KAVkB,aAAa8D,CAAK,EAWvC;AAAA,QAEJ,CAAC,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAlEgBhE,EAAAsD,IAAA;"}
|
|
@@ -1,221 +1,304 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
var je = Object.defineProperty;
|
|
2
|
+
var d = (e, n) => je(e, "name", { value: n, configurable: !0 });
|
|
3
|
+
import { jsxs as ke, jsx as L } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
+
import { resolveOwpGridTheme as qe } from "../../constants/gridTheme.js";
|
|
5
|
+
import { useGetCurrentSettings as Ye } from "../../hooks/useOwpSettings.js";
|
|
6
|
+
import { useOwpTranslation as Qe } from "../../hooks/useOwpTranslation.js";
|
|
7
|
+
import { useGetCurrentLanguage as Xe } from "../../hooks/useCurrentLanguage.js";
|
|
8
|
+
import { TREE_GRID_BODY_ROWS_CHANGED_EVENT as Be } from "../../utils/treeGridBodyRowsEvent.js";
|
|
9
|
+
import { getTreeGridPerfTimestamp as X, countTreeGridPerf as He, logTreeGridPerf as Se, measureTreeGridPerf as xe } from "./internal/utils/perf.js";
|
|
10
|
+
import { useRef as r, useState as J, useMemo as Je, useEffect as _, useLayoutEffect as Ke } from "react";
|
|
11
|
+
import Ze from "@mui/material/GlobalStyles";
|
|
12
|
+
import { useOwpTreeGridOverlayFrame as Ue } from "./internal/hooks/useOwpTreeGridOverlayFrame.js";
|
|
13
|
+
import { bindTreeGridEvents as er, getTreeGridBodyDataCount as K, buildTreeGridInitializationOptions as rr, hasTreeGridDisplayDataRows as Le, replaceTreeGridBodyData as tr, TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS as or } from "./internal/treeGridRuntime.js";
|
|
14
|
+
import { applyTreeGridLayoutToGrid as nr } from "./internal/treeGridLayout.js";
|
|
15
|
+
import { OwpTreeGridLoadingOverlay as ir } from "./internal/OwpTreeGridLoadingOverlay.js";
|
|
16
|
+
import { OwpTreeGridNoDataOverlay as sr } from "./internal/OwpTreeGridNoDataOverlay.js";
|
|
17
|
+
import { resolveTreeGridColumnEditRuleLookup as _e, createTreeGridColumnEditRulesState as ar, syncTreeGridColumnEditRules as dr } from "./internal/treeGridColumnEditRules.js";
|
|
18
|
+
import { isEmpty as O } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
|
|
19
|
+
import { delay as ur } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/delay.js";
|
|
20
|
+
import { isEqual as Oe } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
|
|
21
|
+
import { omit as lr } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.js";
|
|
22
|
+
const cr = [
|
|
23
|
+
"TS",
|
|
24
|
+
"TW",
|
|
25
|
+
"TB",
|
|
26
|
+
"TM",
|
|
27
|
+
"TT",
|
|
28
|
+
"CF",
|
|
29
|
+
"CL",
|
|
30
|
+
"CO",
|
|
31
|
+
"CG",
|
|
32
|
+
"CB",
|
|
33
|
+
"CQ",
|
|
34
|
+
"CE",
|
|
35
|
+
"CS",
|
|
36
|
+
"CR",
|
|
37
|
+
"CP",
|
|
38
|
+
"CC"
|
|
39
|
+
], Ae = "owp-tree-grid-theme", Me = /* @__PURE__ */ d((e) => typeof e == "number" ? `${e}px` : e, "toTreeGridCssValue"), Z = /* @__PURE__ */ d(({
|
|
40
|
+
rowSuffix: e,
|
|
41
|
+
suffixes: n,
|
|
42
|
+
withChildren: M = !1
|
|
43
|
+
}) => cr.flatMap((w) => n.flatMap((A) => {
|
|
44
|
+
const E = `.${Ae}`, h = e ? ` .${w}${e}` : "", f = `${E}${h} .${w}${A}`;
|
|
45
|
+
return M ? [f, `${f} *`] : [f];
|
|
46
|
+
})).join(", "), "createTreeGridSelectors"), fr = Z({
|
|
47
|
+
suffixes: ["Main"],
|
|
48
|
+
withChildren: !0
|
|
49
|
+
}), pr = Z({
|
|
50
|
+
rowSuffix: "HeaderRow",
|
|
51
|
+
suffixes: ["CellHeader", "CellIndex", "GanttHeaderBase", "LevelButton"],
|
|
52
|
+
withChildren: !0
|
|
53
|
+
}), mr = Z({
|
|
54
|
+
rowSuffix: "HeaderRow",
|
|
55
|
+
suffixes: [
|
|
56
|
+
"CellHeader",
|
|
57
|
+
"CellIndex",
|
|
58
|
+
"EditHeaderInput",
|
|
59
|
+
"EditHeaderTextarea",
|
|
60
|
+
"ColorFocusedCellHeader",
|
|
61
|
+
"ColorHoveredCellHeader",
|
|
62
|
+
"ColorHoveredCellIndex",
|
|
63
|
+
"HeaderFocus",
|
|
64
|
+
"HeaderDrag"
|
|
65
|
+
]
|
|
66
|
+
}), Rr = {
|
|
67
|
+
[fr]: {
|
|
68
|
+
fontSize: "var(--owp-tree-grid-cell-font-size, 13px)",
|
|
69
|
+
fontWeight: "normal",
|
|
70
|
+
lineHeight: "16px"
|
|
71
|
+
},
|
|
72
|
+
[pr]: {
|
|
73
|
+
color: "var(--owp-tree-grid-header-color, #ffffff) !important",
|
|
74
|
+
fontSize: "var(--owp-tree-grid-header-font-size, 14px) !important",
|
|
75
|
+
fontWeight: "var(--owp-tree-grid-header-font-weight, normal) !important",
|
|
76
|
+
lineHeight: "16px"
|
|
77
|
+
},
|
|
78
|
+
[mr]: {
|
|
79
|
+
backgroundColor: "var(--owp-tree-grid-header-background-color, #586980) !important",
|
|
80
|
+
color: "var(--owp-tree-grid-header-color, #ffffff) !important"
|
|
81
|
+
}
|
|
82
|
+
}, Pr = /* @__PURE__ */ d(({
|
|
83
|
+
id: e = "treeGridWrapper",
|
|
84
|
+
containerStyle: n,
|
|
85
|
+
containerClassName: M,
|
|
86
|
+
className: w,
|
|
87
|
+
style: A,
|
|
88
|
+
height: E = "100%",
|
|
89
|
+
width: h = "100%",
|
|
90
|
+
layoutUrl: f,
|
|
91
|
+
dataUrl: Pe,
|
|
92
|
+
layoutOverrides: P,
|
|
93
|
+
data: i,
|
|
94
|
+
useDataUrl: U,
|
|
95
|
+
onSelect: ee,
|
|
96
|
+
onRowClick: re,
|
|
97
|
+
onRowAdd: te,
|
|
98
|
+
onRowDelete: oe,
|
|
99
|
+
onRowUndelete: ne,
|
|
100
|
+
onRowChange: ie,
|
|
101
|
+
onClickButton: se,
|
|
102
|
+
onSave: ae,
|
|
103
|
+
onReady: de,
|
|
104
|
+
onAfterValueChanged: ue,
|
|
105
|
+
columnEditRules: p,
|
|
106
|
+
highlightEditableCells: le = !0,
|
|
107
|
+
highlightChangedCells: ce = !0,
|
|
108
|
+
loading: ze,
|
|
109
|
+
showLoading: s = !0
|
|
47
110
|
}) => {
|
|
48
|
-
const { t:
|
|
49
|
-
|
|
50
|
-
),
|
|
51
|
-
|
|
52
|
-
hourMinuteInvalidText:
|
|
111
|
+
const { t: z } = Qe(), D = Ye(), a = r(null), fe = r(null), pe = r(null), N = r(null), V = r(P), me = r(i), $ = r(
|
|
112
|
+
p
|
|
113
|
+
), W = r(
|
|
114
|
+
_e(p, {
|
|
115
|
+
hourMinuteInvalidText: z("Message.시간은 HH:mm 형식으로 입력해주세요.")
|
|
53
116
|
})
|
|
54
|
-
),
|
|
55
|
-
onSelect:
|
|
56
|
-
onRowClick:
|
|
57
|
-
onRowAdd:
|
|
58
|
-
onRowDelete:
|
|
59
|
-
onRowUndelete:
|
|
60
|
-
onRowChange:
|
|
61
|
-
onClickButton:
|
|
62
|
-
onSave:
|
|
63
|
-
onReady:
|
|
64
|
-
onAfterValueChanged:
|
|
65
|
-
}),
|
|
117
|
+
), Re = r({
|
|
118
|
+
onSelect: ee,
|
|
119
|
+
onRowClick: re,
|
|
120
|
+
onRowAdd: te,
|
|
121
|
+
onRowDelete: oe,
|
|
122
|
+
onRowUndelete: ne,
|
|
123
|
+
onRowChange: ie,
|
|
124
|
+
onClickButton: se,
|
|
125
|
+
onSave: ae,
|
|
126
|
+
onReady: de,
|
|
127
|
+
onAfterValueChanged: ue
|
|
128
|
+
}), m = r(void 0), F = r(!1), b = r(void 0), I = r(void 0), B = r(
|
|
66
129
|
void 0
|
|
67
|
-
),
|
|
68
|
-
|
|
130
|
+
), Te = r(ar()), Ne = r(!1), R = r(0), u = r(null), T = r(void 0), y = r(void 0), ye = r(le), ge = r(ce), [j, Ve] = J(!1), [$e, g] = J(!1), [We, ve] = J(!1), H = Xe(), v = Je(
|
|
131
|
+
() => {
|
|
132
|
+
var t, o;
|
|
133
|
+
return qe((o = (t = D == null ? void 0 : D.theme) == null ? void 0 : t.main) == null ? void 0 : o.grid);
|
|
134
|
+
},
|
|
135
|
+
[D]
|
|
136
|
+
), Ge = r(H.id), Fe = s && i !== void 0 && j && I.current !== i, k = s && ze === !0 || s && ($e || Fe), q = !k && i !== void 0 && O(i) && !We, Ce = /* @__PURE__ */ d((t) => {
|
|
137
|
+
ve(Le(t));
|
|
69
138
|
}, "syncHasDisplayDataRows");
|
|
70
|
-
|
|
71
|
-
hourMinuteInvalidText:
|
|
72
|
-
}),
|
|
73
|
-
onSelect:
|
|
74
|
-
onRowClick:
|
|
75
|
-
onRowAdd:
|
|
76
|
-
onRowDelete:
|
|
77
|
-
onRowUndelete:
|
|
78
|
-
onRowChange:
|
|
79
|
-
onClickButton:
|
|
80
|
-
onSave:
|
|
81
|
-
onReady:
|
|
82
|
-
onAfterValueChanged:
|
|
139
|
+
V.current = P, me.current = i, $.current = p, W.current = _e(p, {
|
|
140
|
+
hourMinuteInvalidText: z("Message.시간은 HH:mm 형식으로 입력해주세요.")
|
|
141
|
+
}), ye.current = le, ge.current = ce, Re.current = {
|
|
142
|
+
onSelect: ee,
|
|
143
|
+
onRowClick: re,
|
|
144
|
+
onRowAdd: te,
|
|
145
|
+
onRowDelete: oe,
|
|
146
|
+
onRowUndelete: ne,
|
|
147
|
+
onRowChange: ie,
|
|
148
|
+
onClickButton: se,
|
|
149
|
+
onSave: ae,
|
|
150
|
+
onReady: de,
|
|
151
|
+
onAfterValueChanged: ue
|
|
83
152
|
};
|
|
84
|
-
const
|
|
85
|
-
visible:
|
|
86
|
-
containerRef:
|
|
87
|
-
treeGridInstanceRef:
|
|
88
|
-
debugId:
|
|
89
|
-
}),
|
|
90
|
-
|
|
91
|
-
}, "clearBindingLoadingHideTimeout"),
|
|
153
|
+
const we = Ue({
|
|
154
|
+
visible: k || q,
|
|
155
|
+
containerRef: fe,
|
|
156
|
+
treeGridInstanceRef: a,
|
|
157
|
+
debugId: e
|
|
158
|
+
}), S = /* @__PURE__ */ d(() => {
|
|
159
|
+
T.current !== void 0 && (window.clearTimeout(T.current), T.current = void 0);
|
|
160
|
+
}, "clearBindingLoadingHideTimeout"), Y = /* @__PURE__ */ d(() => {
|
|
92
161
|
y.current !== void 0 && (window.clearTimeout(y.current), y.current = void 0);
|
|
93
162
|
}, "clearBodyReloadStartTimeout");
|
|
94
|
-
|
|
95
|
-
const t = /* @__PURE__ */
|
|
96
|
-
var
|
|
97
|
-
((
|
|
163
|
+
_(() => {
|
|
164
|
+
const t = /* @__PURE__ */ d((o) => {
|
|
165
|
+
var l;
|
|
166
|
+
((l = o.detail) == null ? void 0 : l.gridId) === e && ve(Le(a.current));
|
|
98
167
|
}, "handleBodyRowsChanged");
|
|
99
|
-
return window.addEventListener(
|
|
100
|
-
window.removeEventListener(
|
|
168
|
+
return window.addEventListener(Be, t), () => {
|
|
169
|
+
window.removeEventListener(Be, t);
|
|
101
170
|
};
|
|
102
|
-
}, [
|
|
103
|
-
|
|
104
|
-
}, [
|
|
171
|
+
}, [e]), _(() => {
|
|
172
|
+
s || (Y(), S(), u.current = null, g(!1));
|
|
173
|
+
}, [s]), _(() => {
|
|
105
174
|
var t;
|
|
106
|
-
if (
|
|
107
|
-
return
|
|
108
|
-
id:
|
|
109
|
-
latestEventHandlersRef:
|
|
110
|
-
highlightEditableCellsRef:
|
|
111
|
-
highlightChangedCellsRef:
|
|
112
|
-
treeGridInstanceRef:
|
|
113
|
-
treeGridInitStartedAtRef:
|
|
114
|
-
latestLayoutOverridesRef:
|
|
115
|
-
appliedLayoutOverridesRef:
|
|
116
|
-
appliedBodyDataPropRef:
|
|
117
|
-
latestColumnEditRulesRef:
|
|
118
|
-
latestColumnEditRuleLookupRef:
|
|
119
|
-
appliedColumnEditRulesRef:
|
|
120
|
-
columnEditRulesStateRef:
|
|
175
|
+
if (H.id !== Ge.current && !O(a.current) && ((t = a.current) == null || t.Dispose(), a.current = null, Ge.current = H.id), !!O(a.current))
|
|
176
|
+
return er({
|
|
177
|
+
id: e,
|
|
178
|
+
latestEventHandlersRef: Re,
|
|
179
|
+
highlightEditableCellsRef: ye,
|
|
180
|
+
highlightChangedCellsRef: ge,
|
|
181
|
+
treeGridInstanceRef: a,
|
|
182
|
+
treeGridInitStartedAtRef: pe,
|
|
183
|
+
latestLayoutOverridesRef: V,
|
|
184
|
+
appliedLayoutOverridesRef: b,
|
|
185
|
+
appliedBodyDataPropRef: I,
|
|
186
|
+
latestColumnEditRulesRef: $,
|
|
187
|
+
latestColumnEditRuleLookupRef: W,
|
|
188
|
+
appliedColumnEditRulesRef: B,
|
|
189
|
+
columnEditRulesStateRef: Te,
|
|
121
190
|
hasAppliedInitialLayoutRef: Ne,
|
|
122
|
-
syncHasDisplayDataRows:
|
|
123
|
-
setIsTreeGridReady:
|
|
124
|
-
}),
|
|
125
|
-
useDataUrl: !!
|
|
126
|
-
bodyRowCount:
|
|
191
|
+
syncHasDisplayDataRows: Ce,
|
|
192
|
+
setIsTreeGridReady: Ve
|
|
193
|
+
}), pe.current = X(), He(e, "init"), Se(e, "TreeGrid init start", {
|
|
194
|
+
useDataUrl: !!U,
|
|
195
|
+
bodyRowCount: K(i)
|
|
127
196
|
}), window.TreeGrid(
|
|
128
|
-
|
|
129
|
-
id:
|
|
130
|
-
layoutUrl:
|
|
131
|
-
dataUrl:
|
|
132
|
-
bodyData:
|
|
133
|
-
useDataUrl:
|
|
134
|
-
width:
|
|
135
|
-
height:
|
|
136
|
-
languageId:
|
|
197
|
+
rr({
|
|
198
|
+
id: e,
|
|
199
|
+
layoutUrl: f,
|
|
200
|
+
dataUrl: Pe,
|
|
201
|
+
bodyData: i,
|
|
202
|
+
useDataUrl: U,
|
|
203
|
+
width: h,
|
|
204
|
+
height: E,
|
|
205
|
+
languageId: H.id
|
|
137
206
|
}),
|
|
138
|
-
|
|
139
|
-
|
|
207
|
+
e,
|
|
208
|
+
e
|
|
140
209
|
), () => {
|
|
141
|
-
|
|
142
|
-
var
|
|
143
|
-
(
|
|
210
|
+
ur(() => {
|
|
211
|
+
var o;
|
|
212
|
+
(o = a.current) == null || o.Dispose();
|
|
144
213
|
}, 200);
|
|
145
214
|
};
|
|
146
|
-
}, []),
|
|
147
|
-
const t =
|
|
148
|
-
if (
|
|
215
|
+
}, []), Ke(() => {
|
|
216
|
+
const t = a.current, o = V.current, G = me.current, l = $.current;
|
|
217
|
+
if (O(t) || !j)
|
|
149
218
|
return;
|
|
150
|
-
const
|
|
151
|
-
if (!(!
|
|
152
|
-
if (
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
disableBodyReload: !!
|
|
219
|
+
const Ee = b.current !== o && !Oe(b.current, o), x = I.current !== G && (!F.current || m.current !== G), he = B.current !== l && !Oe(B.current, l);
|
|
220
|
+
if (!(!Ee && !x && !he)) {
|
|
221
|
+
if (Ee) {
|
|
222
|
+
const c = X();
|
|
223
|
+
nr(t, o, x), b.current = o, xe(e, "apply layout", c, {
|
|
224
|
+
disableBodyReload: !!x
|
|
156
225
|
});
|
|
157
226
|
}
|
|
158
|
-
if (
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
y.current = void 0,
|
|
162
|
-
bodyRowCount:
|
|
163
|
-
}),
|
|
164
|
-
if (
|
|
227
|
+
if (x) {
|
|
228
|
+
const c = R.current + 1, De = /* @__PURE__ */ d(() => {
|
|
229
|
+
const C = m.current;
|
|
230
|
+
y.current = void 0, N.current = X(), He(e, "reload"), Se(e, "ReloadBody start", {
|
|
231
|
+
bodyRowCount: K(C)
|
|
232
|
+
}), tr(t, C, () => {
|
|
233
|
+
if (R.current !== c)
|
|
165
234
|
return;
|
|
166
|
-
|
|
167
|
-
bodyRowCount:
|
|
168
|
-
}),
|
|
169
|
-
const
|
|
170
|
-
if (!
|
|
171
|
-
|
|
235
|
+
I.current = C, Ce(t), xe(e, "ReloadBody end", N.current, {
|
|
236
|
+
bodyRowCount: K(C)
|
|
237
|
+
}), N.current = null, m.current === C && (m.current = void 0, F.current = !1);
|
|
238
|
+
const be = u.current;
|
|
239
|
+
if (!s || be === null) {
|
|
240
|
+
u.current = null, g(!1);
|
|
172
241
|
return;
|
|
173
242
|
}
|
|
174
|
-
const
|
|
243
|
+
const Ie = Math.max(
|
|
175
244
|
0,
|
|
176
|
-
|
|
245
|
+
or - (Date.now() - be)
|
|
177
246
|
);
|
|
178
|
-
if (
|
|
179
|
-
|
|
247
|
+
if (S(), Ie === 0) {
|
|
248
|
+
u.current = null, g(!1);
|
|
180
249
|
return;
|
|
181
250
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
},
|
|
251
|
+
T.current = window.setTimeout(() => {
|
|
252
|
+
R.current === c && (T.current = void 0, u.current = null, g(!1));
|
|
253
|
+
}, Ie);
|
|
185
254
|
});
|
|
186
255
|
}, "runBodyReload");
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}, 0)) :
|
|
256
|
+
R.current = c, m.current = G, F.current = !0, s && G !== void 0 ? (Y(), S(), u.current = Date.now(), g(!0), y.current = window.setTimeout(() => {
|
|
257
|
+
R.current === c && De();
|
|
258
|
+
}, 0)) : De();
|
|
190
259
|
}
|
|
191
|
-
|
|
260
|
+
he && (dr(
|
|
192
261
|
t,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
),
|
|
262
|
+
W.current,
|
|
263
|
+
Te.current
|
|
264
|
+
), B.current = l);
|
|
196
265
|
}
|
|
197
|
-
}, [
|
|
198
|
-
|
|
266
|
+
}, [j, P, i, p, s, e]), _(() => () => {
|
|
267
|
+
Y(), S();
|
|
199
268
|
}, []);
|
|
200
|
-
const
|
|
201
|
-
height:
|
|
202
|
-
width:
|
|
203
|
-
|
|
269
|
+
const Q = {
|
|
270
|
+
height: E,
|
|
271
|
+
width: h,
|
|
272
|
+
"--owp-tree-grid-header-background-color": v.header.backgroundColor,
|
|
273
|
+
"--owp-tree-grid-header-color": v.header.color,
|
|
274
|
+
"--owp-tree-grid-header-font-size": Me(v.header.fontSize),
|
|
275
|
+
"--owp-tree-grid-header-font-weight": String(v.header.fontWeight),
|
|
276
|
+
"--owp-tree-grid-cell-font-size": Me(v.cell.fontSize),
|
|
277
|
+
...n
|
|
204
278
|
};
|
|
205
|
-
return (
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
279
|
+
return (s || q) && (Q.position = n != null && n.position && n.position !== "static" ? n.position : "relative", Q.isolation = "isolate"), /* @__PURE__ */ ke(
|
|
280
|
+
"div",
|
|
281
|
+
{
|
|
282
|
+
ref: fe,
|
|
283
|
+
className: [Ae, M].filter(Boolean).join(" "),
|
|
284
|
+
style: Q,
|
|
285
|
+
children: [
|
|
286
|
+
/* @__PURE__ */ L(Ze, { styles: Rr }),
|
|
287
|
+
/* @__PURE__ */ L("div", { id: e, className: w, style: lr(A, ["height", "width"]) }),
|
|
288
|
+
/* @__PURE__ */ L(
|
|
289
|
+
sr,
|
|
290
|
+
{
|
|
291
|
+
visible: q,
|
|
292
|
+
message: z("Message.조회된 결과가 없습니다."),
|
|
293
|
+
overlayFrame: we
|
|
294
|
+
}
|
|
295
|
+
),
|
|
296
|
+
/* @__PURE__ */ L(ir, { visible: k, overlayFrame: we })
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
);
|
|
217
300
|
}, "OwpTreeGrid");
|
|
218
301
|
export {
|
|
219
|
-
|
|
302
|
+
Pr as OwpTreeGrid
|
|
220
303
|
};
|
|
221
304
|
//# sourceMappingURL=OwpTreeGrid.js.map
|