@owp/core 2.5.8 → 2.5.10
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/index16.js +4 -4
- package/dist/_virtual/index17.js +4 -4
- package/dist/_virtual/index18.js +4 -4
- package/dist/_virtual/index19.js +4 -4
- package/dist/components/OwpDialog/OwpDialog.js +67 -46
- package/dist/components/OwpDialog/OwpDialog.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +162 -153
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
- package/dist/components/OwpTable/OwpDataTable.js +297 -283
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpFieldTable.js +98 -86
- package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +145 -127
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTable/internal/defaultTableStyle.js +21 -15
- package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +195 -147
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/constants/tableTheme.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewCanvas.js +300 -263
- package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +148 -141
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewColorField.js +168 -138
- package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewControls.js +410 -218
- package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -1
- package/dist/features/themePreview/components/themePreviewCanvas.shared.js +145 -125
- package/dist/features/themePreview/components/themePreviewCanvas.shared.js.map +1 -1
- package/dist/features/themePreview/configs/table.js +4 -2
- package/dist/features/themePreview/configs/table.js.map +1 -1
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +124 -118
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
- package/dist/features/themePreview/hooks/useThemePreview.js +275 -193
- package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
- package/dist/features/themePreview/utils/themePreviewDefinitions.js +8 -0
- package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
- package/dist/features/themePreview/utils/themePreviewSettings.js +188 -151
- package/dist/features/themePreview/utils/themePreviewSettings.js.map +1 -1
- package/dist/features/themePreview.js +18 -17
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- package/dist/layout/components/toolbar/ToolbarLayout.js +36 -35
- package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestartAltOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestartAltOutlined.js.map +1 -0
- 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/CODE93/constants.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/ITF/constants.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-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpDialog/OwpDialog.d.ts +2 -0
- package/dist/types/components/OwpTable/OwpFieldTable.d.ts +3 -2
- package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +2 -0
- package/dist/types/constants/tableTheme.d.ts +1 -0
- package/dist/types/features/themePreview/components/ThemePreviewColorField.d.ts +3 -1
- package/dist/types/features/themePreview/components/ThemePreviewControls.d.ts +4 -1
- package/dist/types/features/themePreview/configs/settings.d.ts +2 -0
- package/dist/types/features/themePreview/configs/table.d.ts +2 -0
- package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +3 -0
- package/dist/types/features/themePreview/utils/index.d.ts +1 -1
- package/dist/types/features/themePreview/utils/themePreviewSettings.d.ts +11 -1
- package/dist/types/types/OwpTableThemeTypes.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themePreviewCanvas.shared.js","sources":["../../../../src/features/themePreview/components/themePreviewCanvas.shared.ts"],"sourcesContent":["import type { OwpFieldTable } from '@/components/OwpTable/OwpFieldTable';\nimport type { SnackbarVariantKey } from '@/features/themePreview/configs/snackbar';\nimport type { ThemePreviewTableConfigType } from '@/features/themePreview/configs/table';\nimport { getContrastRatio, type SxProps, type Theme } from '@mui/material/styles';\nimport type { ComponentProps } from 'react';\nimport type {\n ThemePreviewPaletteSectionKey,\n ThemePreviewSectionKey,\n ThemePreviewSettings,\n} from '../types';\nimport { getThemePreviewPaletteValue } from '../utils';\n\nexport const previewChromeBorder = '#e2e8f0';\nexport const previewSectionCardClassName = 'rounded-lg p-14';\nexport const previewInnerCardSx = {\n boxShadow: 'none',\n} as const;\nexport const themePreviewEditableTreeGridId = 'ThemePreviewGrid';\nexport const themePreviewReadonlyTreeGridId = 'ThemePreviewReadonlyGrid';\nexport const gridPreviewBodyBackground = '#ffffff';\nexport const gridPreviewBodyText = 'rgb(17, 24, 39)';\nexport const defaultPreviewSectionOrder = ['buttons', 'searchHeader'] as const;\nexport const gridPreviewColumnLabels = ['부서명', '사용자ID', '성명', '사용여부'] as const;\nexport const navbarPreviewItems = ['Dashboard', 'Theme Preview', '사용자 관리', '권한 그룹'] as const;\nexport const previewUserNameById = {\n admin: '관리자',\n impix: '담당자1',\n owp: '담당자2',\n} as const;\nexport const snackbarPreviewMessageByVariant: Record<SnackbarVariantKey, string> = {\n default: '기본 snackbar 메시지',\n success: '정상적으로 처리되었습니다.',\n info: '확인이 필요한 안내 메시지입니다.',\n warning: '입력값을 다시 확인해주세요.',\n error: '오류가 발생했습니다.',\n};\nexport const searchHeaderPreviewData = { previewValue: '적용 대기' };\nexport const tableFieldPreviewData = {\n departmentName: '생산1팀',\n managerName: previewUserNameById.impix,\n useYn: '사용',\n locationName: '제1공장',\n};\nexport const tableFieldPreviewLayout = [\n [\n { title: '부서명', key: 'departmentName' },\n { title: '담당자', key: 'managerName' },\n ],\n [\n { title: '사용여부', key: 'useYn' },\n { title: '위치', key: 'locationName' },\n ],\n];\nexport const tablePreviewHeaders = {\n departmentName: '부서명',\n managerName: '담당자',\n useYn: '사용여부',\n};\nexport const tablePreviewRows = [\n {\n departmentName: '생산1팀',\n managerName: previewUserNameById.impix,\n useYn: '사용',\n },\n {\n departmentName: '품질팀',\n managerName: previewUserNameById.owp,\n useYn: '사용',\n },\n];\nexport const gridStyledTablePreviewRows = tablePreviewRows.slice(0, 1);\nexport const dataTablePreviewHeadCells = [\n { id: 'userId', label: '사용자ID', align: 'center', valueAlign: 'center' },\n { id: 'userName', label: '성명', align: 'center', valueAlign: 'center' },\n { id: 'useYn', label: '사용여부', align: 'center', valueAlign: 'center' },\n];\nexport const dataTablePreviewRows = [\n {\n userId: 'impix',\n userName: previewUserNameById.impix,\n useYn: '사용',\n },\n {\n userId: 'owp',\n userName: previewUserNameById.owp,\n useYn: '미사용',\n },\n];\nexport const gridStyledDataTablePreviewRows = dataTablePreviewRows.slice(0, 1);\nexport const gridCanvasPreviewRows = [\n {\n 'OWP_THEME_PREVIEW.ITEM_NAME': '원자재',\n 'OWP_THEME_PREVIEW.REMARK': '초기 점검',\n 'OWP_THEME_PREVIEW.STATUS': 'READY',\n 'OWP_THEME_PREVIEW.USER_ID': 'admin',\n 'OWP_THEME_PREVIEW.WEIGHT': 12.5,\n 'OWP_THEME_PREVIEW.WORK_DATE': '2026-04-18',\n CanSelect: 1,\n Selected: 1,\n },\n {\n 'OWP_THEME_PREVIEW.ITEM_NAME': '가공품',\n 'OWP_THEME_PREVIEW.REMARK': '조건 확인',\n 'OWP_THEME_PREVIEW.STATUS': 'DONE',\n 'OWP_THEME_PREVIEW.USER_ID': 'impix',\n 'OWP_THEME_PREVIEW.WEIGHT': 8.2,\n 'OWP_THEME_PREVIEW.WORK_DATE': '2026-04-17',\n CanSelect: 1,\n },\n {\n 'OWP_THEME_PREVIEW.ITEM_NAME': '완제품',\n 'OWP_THEME_PREVIEW.REMARK': '샘플 데이터',\n 'OWP_THEME_PREVIEW.STATUS': 'READY',\n 'OWP_THEME_PREVIEW.USER_ID': 'owp',\n 'OWP_THEME_PREVIEW.WEIGHT': 15.75,\n 'OWP_THEME_PREVIEW.WORK_DATE': '2026-04-16',\n CanSelect: 1,\n },\n];\nexport const previewNoop = () => {};\n\ntype ThemePreviewFieldTableCellSx = NonNullable<ComponentProps<typeof OwpFieldTable>['cellSx']>;\ntype ThemePreviewFieldTableTitleSx = NonNullable<ComponentProps<typeof OwpFieldTable>['titleSx']>;\n\nexport type ThemePreviewLayoutSectionKey =\n | 'buttons'\n | 'snackbars'\n | 'searchHeader'\n | 'grid'\n | 'tables';\n\nfunction createGridPreviewRows() {\n return [\n ['관리부', 'admin', previewUserNameById.admin, '사용'],\n ['생산1팀', 'impix', previewUserNameById.impix, '사용'],\n ['품질팀', 'owp', previewUserNameById.owp, '미사용'],\n ] as const;\n}\n\nexport const gridPreviewRows = createGridPreviewRows();\n\nexport function createThemePreviewVersionKey(sourceValue: unknown) {\n const source = JSON.stringify(sourceValue ?? {});\n let hash = 0;\n\n for (let index = 0; index < source.length; index += 1) {\n hash = Math.imul(31, hash) + source.charCodeAt(index);\n hash |= 0;\n }\n\n return Math.abs(hash).toString(36);\n}\n\nexport function getPaletteValue(\n settings: ThemePreviewSettings,\n sectionKey: ThemePreviewPaletteSectionKey,\n path: string,\n) {\n return getThemePreviewPaletteValue(settings, sectionKey, path);\n}\n\nexport function getThemePreviewStyleValue<T extends number | string | undefined>(value: T) {\n if (typeof value !== 'string') {\n return value;\n }\n\n const trimmedValue = value.trim();\n\n return trimmedValue ? (trimmedValue as T) : undefined;\n}\n\nexport function getThemePreviewResolvedBorderRadius(\n borderRadius: ThemePreviewTableConfigType['borderRadius'],\n canTableRadiusZero = false,\n) {\n return canTableRadiusZero ? 0 : getThemePreviewStyleValue(borderRadius);\n}\n\nexport function getThemePreviewTableFrameSx(\n tableTheme: ThemePreviewTableConfigType,\n canTableRadiusZero = false,\n): SxProps<Theme> {\n const borderRadius = getThemePreviewResolvedBorderRadius(\n tableTheme.borderRadius,\n canTableRadiusZero,\n );\n\n if (typeof borderRadius === 'undefined') {\n return {};\n }\n\n return {\n '& > .MuiPaper-root, & > .MuiTableContainer-root.MuiPaper-root': {\n borderRadius,\n overflow: 'hidden',\n },\n '& > .MuiPaper-root > .MuiTableContainer-root': {\n borderRadius,\n overflow: 'hidden',\n },\n };\n}\n\nexport function getThemePreviewFieldTableSx(\n tableTheme: ThemePreviewTableConfigType,\n canTableRadiusZero = false,\n): SxProps<Theme> {\n const cellBackgroundColor = getThemePreviewStyleValue(tableTheme.field?.cell?.backgroundColor);\n const cellFontSize = getThemePreviewStyleValue(tableTheme.field?.cell?.fontSize);\n\n return {\n ...getThemePreviewTableFrameSx(tableTheme, canTableRadiusZero),\n ...((cellBackgroundColor || cellFontSize) && {\n '& tbody td': {\n ...(cellBackgroundColor && { backgroundColor: cellBackgroundColor }),\n ...(cellFontSize && { fontSize: cellFontSize }),\n },\n }),\n };\n}\n\nexport function getThemePreviewFieldTableTitleSx(\n tableTheme: ThemePreviewTableConfigType,\n): ThemePreviewFieldTableTitleSx | undefined {\n const titleFontSize = getThemePreviewStyleValue(tableTheme.field?.header?.fontSize);\n const titleFontWeight = getThemePreviewStyleValue(tableTheme.field?.header?.fontWeight);\n\n if (!titleFontSize && !titleFontWeight) {\n return undefined;\n }\n\n return {\n ...(titleFontSize && {\n fontSize: titleFontSize,\n }),\n ...(titleFontWeight && {\n fontWeight: titleFontWeight,\n }),\n };\n}\n\nexport function getThemePreviewFieldTableCellSx(\n tableTheme: ThemePreviewTableConfigType,\n): ThemePreviewFieldTableCellSx | undefined {\n const cellBackgroundColor = getThemePreviewStyleValue(tableTheme.field?.cell?.backgroundColor);\n const cellFontSize = getThemePreviewStyleValue(tableTheme.field?.cell?.fontSize);\n\n if (!cellBackgroundColor && !cellFontSize) {\n return undefined;\n }\n\n return {\n ...(cellBackgroundColor && {\n backgroundColor: cellBackgroundColor,\n }),\n ...(cellFontSize && {\n fontSize: cellFontSize,\n }),\n };\n}\n\nexport function getThemePreviewBasicTableSx(\n tableTheme: ThemePreviewTableConfigType,\n canTableRadiusZero = false,\n): SxProps<Theme> {\n const rowBackgroundColor = getThemePreviewStyleValue(tableTheme.row?.backgroundColor);\n const hoverBackgroundColor = getThemePreviewStyleValue(tableTheme.row?.hoverBackgroundColor);\n const cellFontSize = getThemePreviewStyleValue(tableTheme.cell?.fontSize);\n\n return {\n ...getThemePreviewTableFrameSx(tableTheme, canTableRadiusZero),\n ...(rowBackgroundColor && {\n '& tbody > .MuiTableRow-root': {\n backgroundColor: rowBackgroundColor,\n },\n }),\n ...(hoverBackgroundColor && {\n '& tbody > .MuiTableRow-root:hover': {\n backgroundColor: hoverBackgroundColor,\n },\n }),\n ...(cellFontSize && {\n '& tbody > .MuiTableRow-root > .MuiTableCell-root': {\n fontSize: cellFontSize,\n },\n }),\n };\n}\n\nexport function getThemePreviewDataTableSx(\n tableTheme: ThemePreviewTableConfigType,\n canTableRadiusZero = false,\n): SxProps<Theme> {\n const rowBackgroundColor = getThemePreviewStyleValue(tableTheme.row?.backgroundColor);\n const hoverBackgroundColor = getThemePreviewStyleValue(tableTheme.row?.hoverBackgroundColor);\n const selectedBackgroundColor = getThemePreviewStyleValue(\n tableTheme.row?.selectedBackgroundColor,\n );\n const cellFontSize = getThemePreviewStyleValue(tableTheme.cell?.fontSize);\n\n return {\n ...getThemePreviewTableFrameSx(tableTheme, canTableRadiusZero),\n ...(rowBackgroundColor && {\n '& .MuiTableBody-root > .MuiTableRow-root:not(.Mui-selected)': {\n backgroundColor: rowBackgroundColor,\n },\n }),\n ...(hoverBackgroundColor && {\n '& .MuiTableBody-root > .MuiTableRow-root.MuiTableRow-hover:hover:not(.Mui-selected)': {\n backgroundColor: hoverBackgroundColor,\n },\n }),\n ...(selectedBackgroundColor && {\n '& .MuiTableBody-root > .MuiTableRow-root.Mui-selected, & .MuiTableBody-root > .MuiTableRow-root.Mui-selected:hover':\n {\n backgroundColor: selectedBackgroundColor,\n },\n }),\n ...(cellFontSize && {\n '& .MuiTableBody-root > .MuiTableRow-root > .MuiTableCell-root': {\n fontSize: cellFontSize,\n },\n }),\n };\n}\n\nexport function getPreviewContrastColor(color: string, fallbackColor: string) {\n const lightTextColor = '#ffffff';\n const darkTextColor = '#0f172a';\n const lightContrastRatio = getContrastRatio(color, lightTextColor);\n const darkContrastRatio = getContrastRatio(color, darkTextColor);\n\n if (lightContrastRatio === darkContrastRatio) {\n return fallbackColor;\n }\n\n return lightContrastRatio > darkContrastRatio ? lightTextColor : darkTextColor;\n}\n\nexport function getPreviewSectionOrder(\n activeSection: ThemePreviewSectionKey,\n): ThemePreviewLayoutSectionKey[] {\n switch (activeSection) {\n case 'main':\n case 'navbar':\n case 'toolbar':\n return [...defaultPreviewSectionOrder];\n case 'grid':\n return ['grid'];\n case 'snackbar':\n return ['snackbars'];\n case 'table':\n return ['tables'];\n default:\n return [...defaultPreviewSectionOrder];\n }\n}\n"],"names":["previewChromeBorder","previewSectionCardClassName","previewInnerCardSx","themePreviewEditableTreeGridId","themePreviewReadonlyTreeGridId","gridPreviewBodyBackground","gridPreviewBodyText","defaultPreviewSectionOrder","gridPreviewColumnLabels","navbarPreviewItems","previewUserNameById","snackbarPreviewMessageByVariant","searchHeaderPreviewData","tableFieldPreviewData","tableFieldPreviewLayout","tablePreviewHeaders","tablePreviewRows","gridStyledTablePreviewRows","dataTablePreviewHeadCells","dataTablePreviewRows","gridStyledDataTablePreviewRows","gridCanvasPreviewRows","previewNoop","__name","createGridPreviewRows","gridPreviewRows","createThemePreviewVersionKey","sourceValue","source","hash","index","getPaletteValue","settings","sectionKey","path","getThemePreviewPaletteValue","getThemePreviewStyleValue","value","trimmedValue","getThemePreviewResolvedBorderRadius","borderRadius","canTableRadiusZero","getThemePreviewTableFrameSx","tableTheme","getThemePreviewFieldTableSx","cellBackgroundColor","_b","_a","cellFontSize","_d","_c","getThemePreviewFieldTableTitleSx","titleFontSize","titleFontWeight","getThemePreviewFieldTableCellSx","getThemePreviewBasicTableSx","rowBackgroundColor","hoverBackgroundColor","getThemePreviewDataTableSx","selectedBackgroundColor","getPreviewContrastColor","color","fallbackColor","lightTextColor","darkTextColor","lightContrastRatio","getContrastRatio","darkContrastRatio","getPreviewSectionOrder","activeSection"],"mappings":";;;;AAYO,MAAMA,IAAsB,WACtBC,IAA8B,mBAC9BC,IAAqB;AAAA,EAChC,WAAW;AACb,GACaC,IAAiC,oBACjCC,IAAiC,4BACjCC,IAA4B,WAC5BC,IAAsB,mBACtBC,IAA6B,CAAC,WAAW,cAAc,GACvDC,IAA0B,CAAC,OAAO,SAAS,MAAM,MAAM,GACvDC,IAAqB,CAAC,aAAa,iBAAiB,UAAU,OAAO,GACrEC,IAAsB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,KAAK;AACP,GACaC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QA,GAAA;AAAA,IACN,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO,CAAC,GAAG9D,CAA0B;AAAA,IACvC,KAAK;AACH,aAAO,CAAC,MAAM;AAAA,IAChB,KAAK;AACH,aAAO,CAAC,WAAW;AAAA,IACrB,KAAK;AACH,aAAO,CAAC,QAAQ;AAAA,IAClB;AACE,aAAO,CAAC,GAAGA,CAA0B;AAAA,EAAA;AAE3C;AAjBgBgB,EAAA6C,GAAA;"}
|
|
1
|
+
{"version":3,"file":"themePreviewCanvas.shared.js","sources":["../../../../src/features/themePreview/components/themePreviewCanvas.shared.ts"],"sourcesContent":["import type { OwpFieldTable } from '@/components/OwpTable/OwpFieldTable';\nimport type { SnackbarVariantKey } from '@/features/themePreview/configs/snackbar';\nimport type { ThemePreviewTableConfigType } from '@/features/themePreview/configs/table';\nimport { getContrastRatio, type SxProps, type Theme } from '@mui/material/styles';\nimport type { ComponentProps } from 'react';\nimport type {\n ThemePreviewPaletteSectionKey,\n ThemePreviewSectionKey,\n ThemePreviewSettings,\n} from '../types';\nimport { getThemePreviewPaletteValue } from '../utils';\n\nexport const previewChromeBorder = '#e2e8f0';\nexport const previewSectionCardClassName = 'rounded-lg p-14';\nexport const previewInnerCardSx = {\n boxShadow: 'none',\n} as const;\nexport const themePreviewEditableTreeGridId = 'ThemePreviewGrid';\nexport const themePreviewReadonlyTreeGridId = 'ThemePreviewReadonlyGrid';\nexport const gridPreviewBodyBackground = '#ffffff';\nexport const gridPreviewBodyText = 'rgb(17, 24, 39)';\nexport const defaultPreviewSectionOrder = ['buttons', 'searchHeader'] as const;\nexport const gridPreviewColumnLabels = ['부서명', '사용자ID', '성명', '사용여부'] as const;\nexport const navbarPreviewItems = ['Dashboard', 'Theme Preview', '사용자 관리', '권한 그룹'] as const;\nexport const previewUserNameById = {\n admin: '관리자',\n impix: '담당자1',\n owp: '담당자2',\n} as const;\nexport const snackbarPreviewMessageByVariant: Record<SnackbarVariantKey, string> = {\n default: '기본 snackbar 메시지',\n success: '정상적으로 처리되었습니다.',\n info: '확인이 필요한 안내 메시지입니다.',\n warning: '입력값을 다시 확인해주세요.',\n error: '오류가 발생했습니다.',\n};\nexport const searchHeaderPreviewData = { previewValue: '적용 대기' };\nexport const tableFieldPreviewData = {\n departmentName: '생산1팀',\n managerName: previewUserNameById.impix,\n useYn: '사용',\n locationName: '제1공장',\n};\nexport const tableFieldPreviewLayout = [\n [\n { title: '부서명', key: 'departmentName' },\n { title: '담당자', key: 'managerName' },\n ],\n [\n { title: '사용여부', key: 'useYn' },\n { title: '위치', key: 'locationName' },\n ],\n];\nexport const tablePreviewHeaders = {\n departmentName: '부서명',\n managerName: '담당자',\n useYn: '사용여부',\n};\nexport const tablePreviewRows = [\n {\n departmentName: '생산1팀',\n managerName: previewUserNameById.impix,\n useYn: '사용',\n },\n {\n departmentName: '품질팀',\n managerName: previewUserNameById.owp,\n useYn: '사용',\n },\n];\nexport const gridStyledTablePreviewRows = tablePreviewRows.slice(0, 1);\nexport const dataTablePreviewHeadCells = [\n { id: 'userId', label: '사용자ID', align: 'center', valueAlign: 'center' },\n { id: 'userName', label: '성명', align: 'center', valueAlign: 'center' },\n { id: 'useYn', label: '사용여부', align: 'center', valueAlign: 'center' },\n];\nexport const dataTablePreviewRows = [\n {\n userId: 'impix',\n userName: previewUserNameById.impix,\n useYn: '사용',\n },\n {\n userId: 'owp',\n userName: previewUserNameById.owp,\n useYn: '미사용',\n },\n];\nexport const gridStyledDataTablePreviewRows = dataTablePreviewRows.slice(0, 1);\nexport const gridCanvasPreviewRows = [\n {\n 'OWP_THEME_PREVIEW.ITEM_NAME': '원자재',\n 'OWP_THEME_PREVIEW.REMARK': '초기 점검',\n 'OWP_THEME_PREVIEW.STATUS': 'READY',\n 'OWP_THEME_PREVIEW.USER_ID': 'admin',\n 'OWP_THEME_PREVIEW.WEIGHT': 12.5,\n 'OWP_THEME_PREVIEW.WORK_DATE': '2026-04-18',\n CanSelect: 1,\n Selected: 1,\n },\n {\n 'OWP_THEME_PREVIEW.ITEM_NAME': '가공품',\n 'OWP_THEME_PREVIEW.REMARK': '조건 확인',\n 'OWP_THEME_PREVIEW.STATUS': 'DONE',\n 'OWP_THEME_PREVIEW.USER_ID': 'impix',\n 'OWP_THEME_PREVIEW.WEIGHT': 8.2,\n 'OWP_THEME_PREVIEW.WORK_DATE': '2026-04-17',\n CanSelect: 1,\n },\n {\n 'OWP_THEME_PREVIEW.ITEM_NAME': '완제품',\n 'OWP_THEME_PREVIEW.REMARK': '샘플 데이터',\n 'OWP_THEME_PREVIEW.STATUS': 'READY',\n 'OWP_THEME_PREVIEW.USER_ID': 'owp',\n 'OWP_THEME_PREVIEW.WEIGHT': 15.75,\n 'OWP_THEME_PREVIEW.WORK_DATE': '2026-04-16',\n CanSelect: 1,\n },\n];\nexport const previewNoop = () => {};\n\ntype ThemePreviewFieldTableCellSx = NonNullable<ComponentProps<typeof OwpFieldTable>['cellSx']>;\ntype ThemePreviewFieldTableTitleSx = NonNullable<ComponentProps<typeof OwpFieldTable>['titleSx']>;\n\nexport type ThemePreviewLayoutSectionKey =\n | 'buttons'\n | 'snackbars'\n | 'searchHeader'\n | 'grid'\n | 'tables';\n\nfunction createGridPreviewRows() {\n return [\n ['관리부', 'admin', previewUserNameById.admin, '사용'],\n ['생산1팀', 'impix', previewUserNameById.impix, '사용'],\n ['품질팀', 'owp', previewUserNameById.owp, '미사용'],\n ] as const;\n}\n\nexport const gridPreviewRows = createGridPreviewRows();\n\nexport function createThemePreviewVersionKey(sourceValue: unknown) {\n const source = JSON.stringify(sourceValue ?? {});\n let hash = 0;\n\n for (let index = 0; index < source.length; index += 1) {\n hash = Math.imul(31, hash) + source.charCodeAt(index);\n hash |= 0;\n }\n\n return Math.abs(hash).toString(36);\n}\n\nexport function getPaletteValue(\n settings: ThemePreviewSettings,\n sectionKey: ThemePreviewPaletteSectionKey,\n path: string,\n) {\n return getThemePreviewPaletteValue(settings, sectionKey, path);\n}\n\nexport function getThemePreviewStyleValue<T extends number | string | undefined>(value: T) {\n if (typeof value !== 'string') {\n return value;\n }\n\n const trimmedValue = value.trim();\n\n return trimmedValue ? (trimmedValue as T) : undefined;\n}\n\nexport function getThemePreviewResolvedBorderRadius(\n borderRadius: ThemePreviewTableConfigType['borderRadius'],\n canTableRadiusZero = false,\n) {\n return canTableRadiusZero ? 0 : getThemePreviewStyleValue(borderRadius);\n}\n\nexport function getThemePreviewTableFrameSx(\n tableTheme: ThemePreviewTableConfigType,\n canTableRadiusZero = false,\n): SxProps<Theme> {\n const borderRadius = getThemePreviewResolvedBorderRadius(\n tableTheme.borderRadius,\n canTableRadiusZero,\n );\n\n if (typeof borderRadius === 'undefined') {\n return {};\n }\n\n return {\n '& > .MuiPaper-root, & > .MuiTableContainer-root.MuiPaper-root': {\n borderRadius,\n overflow: 'hidden',\n },\n '& > .MuiPaper-root > .MuiTableContainer-root': {\n borderRadius,\n overflow: 'hidden',\n },\n };\n}\n\nexport function getThemePreviewFieldTableSx(\n tableTheme: ThemePreviewTableConfigType,\n canTableRadiusZero = false,\n): SxProps<Theme> {\n const cellBackgroundColor = getThemePreviewStyleValue(tableTheme.field?.cell?.backgroundColor);\n const cellFontSize = getThemePreviewStyleValue(tableTheme.field?.cell?.fontSize);\n\n return {\n ...getThemePreviewTableFrameSx(tableTheme, canTableRadiusZero),\n ...((cellBackgroundColor || cellFontSize) && {\n '& tbody td': {\n ...(cellBackgroundColor && { backgroundColor: cellBackgroundColor }),\n ...(cellFontSize && { fontSize: cellFontSize }),\n },\n }),\n };\n}\n\nexport function getThemePreviewFieldTableTitleSx(\n tableTheme: ThemePreviewTableConfigType,\n): ThemePreviewFieldTableTitleSx | undefined {\n const titleBackgroundColor = getThemePreviewStyleValue(tableTheme.field?.header?.backgroundColor);\n const titleColor = getThemePreviewStyleValue(tableTheme.field?.header?.color);\n const titleFontSize = getThemePreviewStyleValue(tableTheme.field?.header?.fontSize);\n const titleFontWeight = getThemePreviewStyleValue(tableTheme.field?.header?.fontWeight);\n\n if (!titleBackgroundColor && !titleColor && !titleFontSize && !titleFontWeight) {\n return undefined;\n }\n\n return {\n ...(titleBackgroundColor && {\n backgroundColor: titleBackgroundColor,\n }),\n ...(titleColor && {\n color: titleColor,\n }),\n ...(titleFontSize && {\n fontSize: titleFontSize,\n }),\n ...(titleFontWeight && {\n fontWeight: titleFontWeight,\n }),\n };\n}\n\nexport function getThemePreviewFieldTableCellSx(\n tableTheme: ThemePreviewTableConfigType,\n): ThemePreviewFieldTableCellSx | undefined {\n const cellBackgroundColor = getThemePreviewStyleValue(tableTheme.field?.cell?.backgroundColor);\n const cellFontSize = getThemePreviewStyleValue(tableTheme.field?.cell?.fontSize);\n\n if (!cellBackgroundColor && !cellFontSize) {\n return undefined;\n }\n\n return {\n ...(cellBackgroundColor && {\n backgroundColor: cellBackgroundColor,\n }),\n ...(cellFontSize && {\n fontSize: cellFontSize,\n }),\n };\n}\n\nexport function getThemePreviewBasicTableSx(\n tableTheme: ThemePreviewTableConfigType,\n canTableRadiusZero = false,\n): SxProps<Theme> {\n const headerBackgroundColor = getThemePreviewStyleValue(tableTheme.header?.backgroundColor);\n const headerColor = getThemePreviewStyleValue(tableTheme.header?.color);\n const headerFontSize = getThemePreviewStyleValue(tableTheme.header?.fontSize);\n const rowBackgroundColor = getThemePreviewStyleValue(tableTheme.row?.backgroundColor);\n const hoverBackgroundColor = getThemePreviewStyleValue(tableTheme.row?.hoverBackgroundColor);\n const cellFontSize = getThemePreviewStyleValue(tableTheme.cell?.fontSize);\n\n return {\n ...getThemePreviewTableFrameSx(tableTheme, canTableRadiusZero),\n ...((headerBackgroundColor || headerColor || headerFontSize) && {\n '& thead th': {\n ...(headerBackgroundColor && { backgroundColor: headerBackgroundColor }),\n ...(headerColor && { color: headerColor }),\n ...(headerFontSize && { fontSize: headerFontSize }),\n },\n }),\n ...(rowBackgroundColor && {\n '& tbody > .MuiTableRow-root': {\n backgroundColor: rowBackgroundColor,\n },\n }),\n ...(hoverBackgroundColor && {\n '& tbody > .MuiTableRow-root:hover': {\n backgroundColor: hoverBackgroundColor,\n },\n }),\n ...(cellFontSize && {\n '& tbody > .MuiTableRow-root > .MuiTableCell-root': {\n fontSize: cellFontSize,\n },\n }),\n };\n}\n\nexport function getThemePreviewDataTableSx(\n tableTheme: ThemePreviewTableConfigType,\n canTableRadiusZero = false,\n): SxProps<Theme> {\n const headerBackgroundColor = getThemePreviewStyleValue(tableTheme.header?.backgroundColor);\n const headerColor = getThemePreviewStyleValue(tableTheme.header?.color);\n const headerFontSize = getThemePreviewStyleValue(tableTheme.header?.fontSize);\n const rowBackgroundColor = getThemePreviewStyleValue(tableTheme.row?.backgroundColor);\n const hoverBackgroundColor = getThemePreviewStyleValue(tableTheme.row?.hoverBackgroundColor);\n const selectedBackgroundColor = getThemePreviewStyleValue(\n tableTheme.row?.selectedBackgroundColor,\n );\n const cellFontSize = getThemePreviewStyleValue(tableTheme.cell?.fontSize);\n\n return {\n ...getThemePreviewTableFrameSx(tableTheme, canTableRadiusZero),\n ...((headerBackgroundColor || headerColor || headerFontSize) && {\n '& thead th': {\n ...(headerBackgroundColor && { backgroundColor: headerBackgroundColor }),\n ...(headerColor && { color: headerColor }),\n ...(headerFontSize && { fontSize: headerFontSize }),\n },\n }),\n ...(rowBackgroundColor && {\n '& .MuiTableBody-root > .MuiTableRow-root:not(.Mui-selected)': {\n backgroundColor: rowBackgroundColor,\n },\n }),\n ...(hoverBackgroundColor && {\n '& .MuiTableBody-root > .MuiTableRow-root.MuiTableRow-hover:hover:not(.Mui-selected)': {\n backgroundColor: hoverBackgroundColor,\n },\n }),\n ...(selectedBackgroundColor && {\n '& .MuiTableBody-root > .MuiTableRow-root.Mui-selected, & .MuiTableBody-root > .MuiTableRow-root.Mui-selected:hover':\n {\n backgroundColor: selectedBackgroundColor,\n },\n }),\n ...(cellFontSize && {\n '& .MuiTableBody-root > .MuiTableRow-root > .MuiTableCell-root': {\n fontSize: cellFontSize,\n },\n }),\n };\n}\n\nexport function getPreviewContrastColor(color: string, fallbackColor: string) {\n const lightTextColor = '#ffffff';\n const darkTextColor = '#0f172a';\n const lightContrastRatio = getContrastRatio(color, lightTextColor);\n const darkContrastRatio = getContrastRatio(color, darkTextColor);\n\n if (lightContrastRatio === darkContrastRatio) {\n return fallbackColor;\n }\n\n return lightContrastRatio > darkContrastRatio ? lightTextColor : darkTextColor;\n}\n\nexport function getPreviewSectionOrder(\n activeSection: ThemePreviewSectionKey,\n): ThemePreviewLayoutSectionKey[] {\n switch (activeSection) {\n case 'main':\n case 'navbar':\n case 'toolbar':\n return [...defaultPreviewSectionOrder];\n case 'grid':\n return ['grid'];\n case 'snackbar':\n return ['snackbars'];\n case 'table':\n return ['tables'];\n default:\n return [...defaultPreviewSectionOrder];\n }\n}\n"],"names":["previewChromeBorder","previewSectionCardClassName","previewInnerCardSx","themePreviewEditableTreeGridId","themePreviewReadonlyTreeGridId","gridPreviewBodyBackground","gridPreviewBodyText","defaultPreviewSectionOrder","gridPreviewColumnLabels","navbarPreviewItems","previewUserNameById","snackbarPreviewMessageByVariant","searchHeaderPreviewData","tableFieldPreviewData","tableFieldPreviewLayout","tablePreviewHeaders","tablePreviewRows","gridStyledTablePreviewRows","dataTablePreviewHeadCells","dataTablePreviewRows","gridStyledDataTablePreviewRows","gridCanvasPreviewRows","previewNoop","__name","createGridPreviewRows","gridPreviewRows","createThemePreviewVersionKey","sourceValue","source","hash","index","getPaletteValue","settings","sectionKey","path","getThemePreviewPaletteValue","getThemePreviewStyleValue","value","trimmedValue","getThemePreviewResolvedBorderRadius","borderRadius","canTableRadiusZero","getThemePreviewTableFrameSx","tableTheme","getThemePreviewFieldTableSx","cellBackgroundColor","_b","_a","cellFontSize","_d","_c","getThemePreviewFieldTableTitleSx","titleBackgroundColor","titleColor","titleFontSize","_f","_e","titleFontWeight","_h","_g","getThemePreviewFieldTableCellSx","getThemePreviewBasicTableSx","headerBackgroundColor","headerColor","headerFontSize","rowBackgroundColor","hoverBackgroundColor","getThemePreviewDataTableSx","selectedBackgroundColor","getPreviewContrastColor","color","fallbackColor","lightTextColor","darkTextColor","lightContrastRatio","getContrastRatio","darkContrastRatio","getPreviewSectionOrder","activeSection"],"mappings":";;;;AAYO,MAAMA,IAAsB,WACtBC,IAA8B,mBAC9BC,IAAqB;AAAA,EAChC,WAAW;AACb,GACaC,IAAiC,oBACjCC,IAAiC,4BACjCC,IAA4B,WAC5BC,IAAsB,mBACtBC,IAA6B,CAAC,WAAW,cAAc,GACvDC,IAA0B,CAAC,OAAO,SAAS,MAAM,MAAM,GACvDC,IAAqB,CAAC,aAAa,iBAAiB,UAAU,OAAO,GACrEC,IAAsB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,KAAK;AACP,GACaC,IAAsE;AAAA,EACjF,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AACT,GACaC,IAA0B,EAAE,cAAc,QAAA,GAC1CC,IAAwB;AAAA,EACnC,gBAAgB;AAAA,EAChB,aAAaH,EAAoB;AAAA,EACjC,OAAO;AAAA,EACP,cAAc;AAChB,GACaI,IAA0B;AAAA,EACrC;AAAA,IACE,EAAE,OAAO,OAAO,KAAK,iBAAA;AAAA,IACrB,EAAE,OAAO,OAAO,KAAK,cAAA;AAAA,EAAc;AAAA,EAErC;AAAA,IACE,EAAE,OAAO,QAAQ,KAAK,QAAA;AAAA,IACtB,EAAE,OAAO,MAAM,KAAK,eAAA;AAAA,EAAe;AAEvC,GACaC,IAAsB;AAAA,EACjC,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,OAAO;AACT,GACaC,IAAmB;AAAA,EAC9B;AAAA,IACE,gBAAgB;AAAA,IAChB,aAAaN,EAAoB;AAAA,IACjC,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,gBAAgB;AAAA,IAChB,aAAaA,EAAoB;AAAA,IACjC,OAAO;AAAA,EAAA;AAEX,GACaO,IAA6BD,EAAiB,MAAM,GAAG,C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iBA;AAAA,MAAA;AAAA,IACnB;AAAA,IAEJ,GAAIpB,KAAgB;AAAA,MAClB,iEAAiE;AAAA,QAC/D,UAAUA;AAAA,MAAA;AAAA,IACZ;AAAA,EACF;AAEJ;AA7CgBzB,EAAA4C,IAAA;AA+CT,SAASE,GAAwBC,GAAeC,GAAuB;AAC5E,QAAMC,IAAiB,WACjBC,IAAgB,WAChBC,IAAqBC,EAAiBL,GAAOE,CAAc,GAC3DI,IAAoBD,EAAiBL,GAAOG,CAAa;AAE/D,SAAIC,MAAuBE,IAClBL,IAGFG,IAAqBE,IAAoBJ,IAAiBC;AACnE;AAXgBlD,EAAA8C,IAAA;AAaT,SAASQ,GACdC,GACgC;AAChC,UAAQA,GAAA;AAAA,IACN,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO,CAAC,GAAGvE,CAA0B;AAAA,IACvC,KAAK;AACH,aAAO,CAAC,MAAM;AAAA,IAChB,KAAK;AACH,aAAO,CAAC,WAAW;AAAA,IACrB,KAAK;AACH,aAAO,CAAC,QAAQ;AAAA,IAClB;AACE,aAAO,CAAC,GAAGA,CAA0B;AAAA,EAAA;AAE3C;AAjBgBgB,EAAAsD,IAAA;"}
|
|
@@ -9,17 +9,19 @@ const e = {
|
|
|
9
9
|
fontSize: "1.4rem"
|
|
10
10
|
},
|
|
11
11
|
row: {
|
|
12
|
-
backgroundColor: "",
|
|
12
|
+
backgroundColor: "#FFFFFF",
|
|
13
13
|
hoverBackgroundColor: "",
|
|
14
14
|
selectedBackgroundColor: ""
|
|
15
15
|
},
|
|
16
16
|
field: {
|
|
17
17
|
header: {
|
|
18
|
+
backgroundColor: "#eeeeee",
|
|
19
|
+
color: "#111827",
|
|
18
20
|
fontSize: "1.7rem",
|
|
19
21
|
fontWeight: 600
|
|
20
22
|
},
|
|
21
23
|
cell: {
|
|
22
|
-
backgroundColor: "",
|
|
24
|
+
backgroundColor: "#FFFFFF",
|
|
23
25
|
fontSize: "1.7rem"
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sources":["../../../../src/features/themePreview/configs/table.ts"],"sourcesContent":["import type { OwpTableThemeConfigType } from '@/types';\n\ntype OwpTableHeaderConfigType = NonNullable<OwpTableThemeConfigType['header']>;\ntype OwpTableCellConfigType = NonNullable<OwpTableThemeConfigType['cell']>;\n\nexport type ThemePreviewTableCellConfigType = OwpTableCellConfigType & {\n backgroundColor?: string;\n};\n\nexport type ThemePreviewTableVariantConfigType = {\n header?: OwpTableHeaderConfigType;\n cell?: ThemePreviewTableCellConfigType;\n};\n\nexport type ThemePreviewTableRowConfigType = {\n backgroundColor?: string;\n hoverBackgroundColor?: string;\n selectedBackgroundColor?: string;\n};\n\nexport type ThemePreviewTableConfigType = ThemePreviewTableVariantConfigType & {\n borderRadius?: number | string;\n field?: ThemePreviewTableVariantConfigType;\n row?: ThemePreviewTableRowConfigType;\n};\n\nexport const defaultTableTheme = {\n borderRadius: '',\n header: {\n backgroundColor: '#eeeeee',\n color: '#111827',\n fontSize: '1.5rem',\n },\n cell: {\n fontSize: '1.4rem',\n },\n row: {\n backgroundColor: '',\n hoverBackgroundColor: '',\n selectedBackgroundColor: '',\n },\n field: {\n header: {\n fontSize: '1.7rem',\n fontWeight: 600,\n },\n cell: {\n backgroundColor: '',\n fontSize: '1.7rem',\n },\n },\n} satisfies ThemePreviewTableConfigType;\n"],"names":["defaultTableTheme"],"mappings":"AA0BO,MAAMA,IAAoB;AAAA,EAC/B,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,UAAU;AAAA,EAAA;AAAA,EAEZ,MAAM;AAAA,IACJ,UAAU;AAAA,EAAA;AAAA,EAEZ,KAAK;AAAA,IACH,iBAAiB;AAAA,IACjB,sBAAsB;AAAA,IACtB,yBAAyB;AAAA,EAAA;AAAA,EAE3B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,UAAU;AAAA,MACV,YAAY;AAAA,IAAA;AAAA,IAEd,MAAM;AAAA,MACJ,iBAAiB;AAAA,MACjB,UAAU;AAAA,IAAA;AAAA,EACZ;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"table.js","sources":["../../../../src/features/themePreview/configs/table.ts"],"sourcesContent":["import type { OwpTableThemeConfigType } from '@/types';\n\ntype OwpTableHeaderConfigType = NonNullable<OwpTableThemeConfigType['header']>;\ntype OwpTableCellConfigType = NonNullable<OwpTableThemeConfigType['cell']>;\n\nexport type ThemePreviewTableCellConfigType = OwpTableCellConfigType & {\n backgroundColor?: string;\n};\n\nexport type ThemePreviewTableVariantConfigType = {\n header?: OwpTableHeaderConfigType;\n cell?: ThemePreviewTableCellConfigType;\n};\n\nexport type ThemePreviewTableRowConfigType = {\n backgroundColor?: string;\n hoverBackgroundColor?: string;\n selectedBackgroundColor?: string;\n};\n\nexport type ThemePreviewTableConfigType = ThemePreviewTableVariantConfigType & {\n borderRadius?: number | string;\n field?: ThemePreviewTableVariantConfigType;\n row?: ThemePreviewTableRowConfigType;\n};\n\nexport const defaultTableTheme = {\n borderRadius: '',\n header: {\n backgroundColor: '#eeeeee',\n color: '#111827',\n fontSize: '1.5rem',\n },\n cell: {\n fontSize: '1.4rem',\n },\n row: {\n backgroundColor: '#FFFFFF',\n hoverBackgroundColor: '',\n selectedBackgroundColor: '',\n },\n field: {\n header: {\n backgroundColor: '#eeeeee',\n color: '#111827',\n fontSize: '1.7rem',\n fontWeight: 600,\n },\n cell: {\n backgroundColor: '#FFFFFF',\n fontSize: '1.7rem',\n },\n },\n} satisfies ThemePreviewTableConfigType;\n"],"names":["defaultTableTheme"],"mappings":"AA0BO,MAAMA,IAAoB;AAAA,EAC/B,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,UAAU;AAAA,EAAA;AAAA,EAEZ,MAAM;AAAA,IACJ,UAAU;AAAA,EAAA;AAAA,EAEZ,KAAK;AAAA,IACH,iBAAiB;AAAA,IACjB,sBAAsB;AAAA,IACtB,yBAAyB;AAAA,EAAA;AAAA,EAE3B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,iBAAiB;AAAA,MACjB,OAAO;AAAA,MACP,UAAU;AAAA,MACV,YAAY;AAAA,IAAA;AAAA,IAEd,MAAM;AAAA,MACJ,iBAAiB;AAAA,MACjB,UAAU;AAAA,IAAA;AAAA,EACZ;AAEJ;"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var n = (r, i) =>
|
|
3
|
-
import { jsx as t, jsxs as
|
|
4
|
-
import { defaultSnackbarTheme as
|
|
5
|
-
import { themesConfig as
|
|
6
|
-
import { defaultSettingsConfig as
|
|
7
|
-
import { useConfirm as
|
|
8
|
-
import { readZipEntryJson as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { Button as h, Typography as W, TextField as
|
|
14
|
-
import { useDialogs as
|
|
1
|
+
var xe = Object.defineProperty;
|
|
2
|
+
var n = (r, i) => xe(r, "name", { value: i, configurable: !0 });
|
|
3
|
+
import { jsx as t, jsxs as f } 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 { defaultSnackbarTheme as Pe } from "../configs/snackbar.js";
|
|
5
|
+
import { themesConfig as Ce } from "../configs/presets.js";
|
|
6
|
+
import { defaultSettingsConfig as Te } from "../configs/settings.js";
|
|
7
|
+
import { useConfirm as be } from "../../../hooks/useConfirm.js";
|
|
8
|
+
import { readZipEntryJson as Ee, saveAsZipFile as Se } from "../../../utils/zipUtil.js";
|
|
9
|
+
import ye from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DownloadOutlined.js";
|
|
10
|
+
import Ae from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestoreOutlined.js";
|
|
11
|
+
import Fe from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SaveOutlined.js";
|
|
12
|
+
import Le from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UploadFileOutlined.js";
|
|
13
|
+
import { Button as h, Typography as W, TextField as ke } from "@mui/material";
|
|
14
|
+
import { useDialogs as _e } from "@toolpad/core/useDialogs";
|
|
15
15
|
import { enqueueSnackbar as m } from "notistack";
|
|
16
|
-
import { useState as k, useRef as
|
|
17
|
-
import { useThemePreview as
|
|
18
|
-
import { ThemePreviewControls as
|
|
19
|
-
import { ThemePreviewCanvas as
|
|
20
|
-
import { resetThemePreviewSessionState as
|
|
21
|
-
import { createThemePreviewExportData as
|
|
16
|
+
import { useState as k, useRef as u, useEffect as v } from "react";
|
|
17
|
+
import { useThemePreview as Re } from "../hooks/useThemePreview.js";
|
|
18
|
+
import { ThemePreviewControls as Ie } from "../components/ThemePreviewControls.js";
|
|
19
|
+
import { ThemePreviewCanvas as Me } from "../components/ThemePreviewCanvas.js";
|
|
20
|
+
import { resetThemePreviewSessionState as Ne } from "../utils/themePreviewSettings.js";
|
|
21
|
+
import { createThemePreviewExportData as De, createThemePreviewAppConfigFiles as Ve } from "../utils/themePreviewExport.js";
|
|
22
22
|
import { OwpDialog as j } from "../../../components/OwpDialog/OwpDialog.js";
|
|
23
|
-
const
|
|
24
|
-
function
|
|
25
|
-
const i =
|
|
23
|
+
const Oe = Ce, We = ".owp,.zip,application/zip", O = 300 * 1e3, je = 2 * 1e3, ze = 15 * 1e3;
|
|
24
|
+
function Be(r) {
|
|
25
|
+
const i = De(r);
|
|
26
26
|
return [
|
|
27
|
-
...
|
|
27
|
+
...Ve(r).map(({ fileName: l, content: p }) => ({
|
|
28
28
|
fileName: l,
|
|
29
29
|
blob: new Blob([p], {
|
|
30
30
|
type: "text/plain;charset=utf-8"
|
|
@@ -38,17 +38,17 @@ function We(r) {
|
|
|
38
38
|
}))
|
|
39
39
|
];
|
|
40
40
|
}
|
|
41
|
-
n(
|
|
42
|
-
function
|
|
41
|
+
n(Be, "createThemePreviewArchiveFiles");
|
|
42
|
+
function Ue(r) {
|
|
43
43
|
var i;
|
|
44
44
|
return (r == null ? void 0 : r.defaultSnackbarProviderProps) ?? ((i = r == null ? void 0 : r.defaultSettingsConfig) == null ? void 0 : i.snackbarProviderProps);
|
|
45
45
|
}
|
|
46
|
-
n(
|
|
47
|
-
function
|
|
46
|
+
n(Ue, "getThemePreviewArchiveProviderProps");
|
|
47
|
+
function He(r) {
|
|
48
48
|
const i = r.trim().replace(/[^0-9A-Za-z가-힣 _-]+/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^[-_]+|[-_]+$/g, "");
|
|
49
49
|
return i ? `theme-preview-config-${i}` : "theme-preview-config";
|
|
50
50
|
}
|
|
51
|
-
n(
|
|
51
|
+
n(He, "getThemePreviewConfigFileTitle");
|
|
52
52
|
const g = {
|
|
53
53
|
"&.MuiButton-root": {
|
|
54
54
|
fontSize: "1.3rem",
|
|
@@ -94,7 +94,7 @@ const g = {
|
|
|
94
94
|
backgroundColor: "#ffffff",
|
|
95
95
|
border: "1px solid #111827",
|
|
96
96
|
color: "#111827"
|
|
97
|
-
},
|
|
97
|
+
}, Ke = "#111827", Ze = /* @__PURE__ */ n(({
|
|
98
98
|
open: r,
|
|
99
99
|
payload: i,
|
|
100
100
|
onClose: w
|
|
@@ -114,9 +114,9 @@ const g = {
|
|
|
114
114
|
p: 3
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ f("div", { className: "flex flex-col gap-12", children: [
|
|
118
118
|
/* @__PURE__ */ t(
|
|
119
|
-
|
|
119
|
+
ke,
|
|
120
120
|
{
|
|
121
121
|
label: "저장 이름",
|
|
122
122
|
value: l,
|
|
@@ -130,62 +130,65 @@ const g = {
|
|
|
130
130
|
] })
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
|
-
}, "ThemePreviewSaveDialog"),
|
|
133
|
+
}, "ThemePreviewSaveDialog"), hn = /* @__PURE__ */ n(({
|
|
134
134
|
open: r,
|
|
135
135
|
payload: i,
|
|
136
136
|
onClose: w
|
|
137
137
|
}) => {
|
|
138
|
-
const [l, p] = k(""), [b, _] = k(!1),
|
|
139
|
-
}), c =
|
|
138
|
+
const [l, p] = k(""), [b, _] = k(!1), R = u(null), I = u(null), x = u(null), E = u(!1), M = u(Date.now()), N = u(!1), S = u(() => {
|
|
139
|
+
}), c = u(null), z = _e(), { confirmSave: B } = be(), {
|
|
140
140
|
activeSection: d,
|
|
141
141
|
canApplyToMain: U,
|
|
142
142
|
draftSettings: y,
|
|
143
143
|
hasTemporaryChanges: A,
|
|
144
144
|
hasTemporarySnapshot: H,
|
|
145
145
|
presetOptions: K,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
146
|
+
resetVersion: Z,
|
|
147
|
+
selectedModes: q,
|
|
148
|
+
selectedPresetKeys: $,
|
|
149
|
+
setActiveSection: J,
|
|
150
|
+
handlePaletteValueChange: Y,
|
|
151
|
+
handlePaletteValuesChange: G,
|
|
152
|
+
handlePaletteValueReset: Q,
|
|
153
|
+
handlePaletteValuesReset: X,
|
|
154
|
+
handleApplyToMain: ee,
|
|
155
|
+
handleLoadSettings: ne,
|
|
156
|
+
handlePresetKeyChange: te,
|
|
157
|
+
handlePresetModeChange: re,
|
|
158
|
+
handleReset: ie,
|
|
159
|
+
handleTemporaryLoad: oe,
|
|
160
|
+
handleTemporarySave: P
|
|
161
|
+
} = Re({
|
|
159
162
|
initialSection: i == null ? void 0 : i.initialSection,
|
|
160
163
|
initialPresetKeys: {
|
|
161
164
|
main: "light1",
|
|
162
165
|
navbar: "light2",
|
|
163
166
|
toolbar: "surfaceDark"
|
|
164
167
|
},
|
|
165
|
-
presetThemes:
|
|
166
|
-
resetTheme:
|
|
167
|
-
}),
|
|
168
|
-
|
|
169
|
-
}, "handleThemePreviewInteraction"),
|
|
170
|
-
await
|
|
171
|
-
fileTitle:
|
|
168
|
+
presetThemes: Oe,
|
|
169
|
+
resetTheme: Te.theme
|
|
170
|
+
}), D = d === "main" || d === "navbar" || d === "toolbar", ae = D ? q[d] : "light", se = D ? $[d] : "", o = /* @__PURE__ */ n(() => {
|
|
171
|
+
M.current = Date.now();
|
|
172
|
+
}, "handleThemePreviewInteraction"), le = /* @__PURE__ */ n(async (e) => {
|
|
173
|
+
await Se(Be(y), {
|
|
174
|
+
fileTitle: He(e),
|
|
172
175
|
archiveExtension: "owp",
|
|
173
176
|
preserveFileNames: !0
|
|
174
177
|
});
|
|
175
|
-
}, "handleSaveConfigFiles"),
|
|
176
|
-
const e = await z.open(
|
|
178
|
+
}, "handleSaveConfigFiles"), ce = /* @__PURE__ */ n(async () => {
|
|
179
|
+
const e = await z.open(Ze, {
|
|
177
180
|
initialFileName: l
|
|
178
181
|
});
|
|
179
|
-
e !== void 0 && (p(e), await
|
|
180
|
-
}, "handleOpenSaveDialog"),
|
|
182
|
+
e !== void 0 && (p(e), await le(e));
|
|
183
|
+
}, "handleOpenSaveDialog"), de = /* @__PURE__ */ n(() => {
|
|
181
184
|
var e;
|
|
182
|
-
(e =
|
|
183
|
-
}, "handleOpenZipFile"),
|
|
184
|
-
|
|
185
|
+
(e = I.current) == null || e.click();
|
|
186
|
+
}, "handleOpenZipFile"), me = /* @__PURE__ */ n(() => {
|
|
187
|
+
P("manual"), m("임시 저장을 완료했습니다.", {
|
|
185
188
|
variant: "success"
|
|
186
189
|
});
|
|
187
|
-
}, "handleManualTemporarySave"),
|
|
188
|
-
if (!
|
|
190
|
+
}, "handleManualTemporarySave"), ue = /* @__PURE__ */ n(() => {
|
|
191
|
+
if (!oe()) {
|
|
189
192
|
m("불러올 임시 저장 데이터가 없습니다.", {
|
|
190
193
|
variant: "warning"
|
|
191
194
|
});
|
|
@@ -194,20 +197,20 @@ const g = {
|
|
|
194
197
|
m("임시 저장 데이터를 불러왔습니다.", {
|
|
195
198
|
variant: "success"
|
|
196
199
|
});
|
|
197
|
-
}, "handleManualTemporaryLoad"),
|
|
200
|
+
}, "handleManualTemporaryLoad"), fe = /* @__PURE__ */ n(async () => {
|
|
198
201
|
A && (await B({
|
|
199
202
|
title: "변경된 값을 저장하겠습니까?"
|
|
200
|
-
}) ? (
|
|
203
|
+
}) ? (P("manual"), m("임시 저장되었습니다. 다시 실행하면 저장된 데이터를 불러옵니다.", {
|
|
201
204
|
variant: "info"
|
|
202
|
-
})) :
|
|
203
|
-
}, "handleDialogClose"),
|
|
204
|
-
var s,
|
|
205
|
+
})) : Ne()), w(void 0);
|
|
206
|
+
}, "handleDialogClose"), pe = /* @__PURE__ */ n(async (e) => {
|
|
207
|
+
var s, C;
|
|
205
208
|
const a = (s = e.target.files) == null ? void 0 : s[0];
|
|
206
209
|
if (a)
|
|
207
210
|
try {
|
|
208
|
-
const T = await
|
|
211
|
+
const T = await Ee(
|
|
209
212
|
a,
|
|
210
|
-
(
|
|
213
|
+
(we) => we.endsWith("settings.json")
|
|
211
214
|
);
|
|
212
215
|
if (!T) {
|
|
213
216
|
m("settings.json 파일이 없습니다.", {
|
|
@@ -215,14 +218,14 @@ const g = {
|
|
|
215
218
|
});
|
|
216
219
|
return;
|
|
217
220
|
}
|
|
218
|
-
const
|
|
219
|
-
if (!
|
|
221
|
+
const V = (C = T.defaultSettingsConfig) == null ? void 0 : C.theme, ve = T.defaultSnackbarTheme ?? Pe, ge = Ue(T);
|
|
222
|
+
if (!V) {
|
|
220
223
|
m("theme 설정을 읽지 못했습니다.", {
|
|
221
224
|
variant: "warning"
|
|
222
225
|
});
|
|
223
226
|
return;
|
|
224
227
|
}
|
|
225
|
-
|
|
228
|
+
ne(V, ve, ge), m("설정 파일을 로드하고 메인 화면에 적용했습니다.", {
|
|
226
229
|
variant: "success"
|
|
227
230
|
});
|
|
228
231
|
} catch {
|
|
@@ -232,19 +235,19 @@ const g = {
|
|
|
232
235
|
} finally {
|
|
233
236
|
e.target.value = "";
|
|
234
237
|
}
|
|
235
|
-
}, "handleZipFileChange"),
|
|
238
|
+
}, "handleZipFileChange"), he = /* @__PURE__ */ n((e) => {
|
|
236
239
|
e !== d && (c.current && (cancelAnimationFrame(c.current), c.current = null), _(!0), c.current = requestAnimationFrame(() => {
|
|
237
|
-
|
|
240
|
+
J(e), c.current = requestAnimationFrame(() => {
|
|
238
241
|
_(!1), c.current = null;
|
|
239
242
|
});
|
|
240
243
|
}));
|
|
241
244
|
}, "handleSectionChange");
|
|
242
245
|
return v(() => {
|
|
243
|
-
S.current =
|
|
244
|
-
}, [
|
|
245
|
-
|
|
246
|
+
S.current = P;
|
|
247
|
+
}, [P]), v(() => {
|
|
248
|
+
N.current = A;
|
|
246
249
|
}, [A]), v(() => {
|
|
247
|
-
const e =
|
|
250
|
+
const e = R.current;
|
|
248
251
|
if (!e)
|
|
249
252
|
return;
|
|
250
253
|
const a = /* @__PURE__ */ n(() => {
|
|
@@ -260,20 +263,20 @@ const g = {
|
|
|
260
263
|
x.current && (window.clearTimeout(x.current), x.current = null);
|
|
261
264
|
}, "clearAutoSaveTimeout"), a = /* @__PURE__ */ n((s) => {
|
|
262
265
|
e(), x.current = window.setTimeout(() => {
|
|
263
|
-
const
|
|
264
|
-
if (document.hidden ||
|
|
265
|
-
a(
|
|
266
|
+
const C = E.current || Date.now() - M.current < je;
|
|
267
|
+
if (document.hidden || C) {
|
|
268
|
+
a(ze);
|
|
266
269
|
return;
|
|
267
270
|
}
|
|
268
|
-
S.current("auto"), a(
|
|
271
|
+
S.current("auto"), a(O);
|
|
269
272
|
}, s);
|
|
270
273
|
}, "scheduleAutoSave");
|
|
271
|
-
return a(
|
|
274
|
+
return a(O), () => {
|
|
272
275
|
e();
|
|
273
276
|
};
|
|
274
277
|
}, []), v(() => {
|
|
275
278
|
const e = /* @__PURE__ */ n(() => {
|
|
276
|
-
|
|
279
|
+
N.current && S.current("manual");
|
|
277
280
|
}, "handlePageExit");
|
|
278
281
|
return window.addEventListener("pagehide", e), window.addEventListener("beforeunload", e), () => {
|
|
279
282
|
window.removeEventListener("pagehide", e), window.removeEventListener("beforeunload", e);
|
|
@@ -283,9 +286,9 @@ const g = {
|
|
|
283
286
|
}, []), /* @__PURE__ */ t(
|
|
284
287
|
j,
|
|
285
288
|
{
|
|
286
|
-
title: /* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */ t(W, { variant: "h6", fontWeight: 700, sx: { color:
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
+
title: /* @__PURE__ */ f("div", { className: "flex w-full flex-wrap items-center justify-between gap-12", children: [
|
|
290
|
+
/* @__PURE__ */ t(W, { variant: "h6", fontWeight: 700, sx: { color: Ke }, children: "OWP Theme Preview" }),
|
|
291
|
+
/* @__PURE__ */ f("div", { className: "flex flex-wrap items-center gap-8", children: [
|
|
289
292
|
/* @__PURE__ */ t(
|
|
290
293
|
h,
|
|
291
294
|
{
|
|
@@ -295,7 +298,7 @@ const g = {
|
|
|
295
298
|
...g,
|
|
296
299
|
...L
|
|
297
300
|
},
|
|
298
|
-
onClick:
|
|
301
|
+
onClick: ie,
|
|
299
302
|
children: "기본 설정으로 되돌리기"
|
|
300
303
|
}
|
|
301
304
|
),
|
|
@@ -309,7 +312,7 @@ const g = {
|
|
|
309
312
|
...g,
|
|
310
313
|
...F
|
|
311
314
|
},
|
|
312
|
-
onClick:
|
|
315
|
+
onClick: ee,
|
|
313
316
|
children: "메인에 적용해보기"
|
|
314
317
|
}
|
|
315
318
|
)
|
|
@@ -318,19 +321,19 @@ const g = {
|
|
|
318
321
|
open: r,
|
|
319
322
|
maxWidth: "xl",
|
|
320
323
|
canConfirm: !1,
|
|
321
|
-
onClose:
|
|
322
|
-
actions: /* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
+
onClose: fe,
|
|
325
|
+
actions: /* @__PURE__ */ f("div", { className: "grid min-w-0 flex-1 grid-cols-[1fr_auto_1fr] items-center gap-y-8", children: [
|
|
326
|
+
/* @__PURE__ */ f("div", { className: "flex flex-wrap items-center justify-start gap-8", children: [
|
|
324
327
|
/* @__PURE__ */ t(
|
|
325
328
|
h,
|
|
326
329
|
{
|
|
327
330
|
variant: "contained",
|
|
328
|
-
startIcon: /* @__PURE__ */ t(
|
|
331
|
+
startIcon: /* @__PURE__ */ t(Fe, {}),
|
|
329
332
|
sx: {
|
|
330
333
|
...g,
|
|
331
334
|
...F
|
|
332
335
|
},
|
|
333
|
-
onClick:
|
|
336
|
+
onClick: me,
|
|
334
337
|
children: "임시 저장하기"
|
|
335
338
|
}
|
|
336
339
|
),
|
|
@@ -338,28 +341,28 @@ const g = {
|
|
|
338
341
|
h,
|
|
339
342
|
{
|
|
340
343
|
variant: "outlined",
|
|
341
|
-
startIcon: /* @__PURE__ */ t(
|
|
344
|
+
startIcon: /* @__PURE__ */ t(Ae, {}),
|
|
342
345
|
disabled: !H,
|
|
343
346
|
sx: {
|
|
344
347
|
...g,
|
|
345
348
|
...L
|
|
346
349
|
},
|
|
347
|
-
onClick:
|
|
350
|
+
onClick: ue,
|
|
348
351
|
children: "임시 저장 불러오기"
|
|
349
352
|
}
|
|
350
353
|
)
|
|
351
354
|
] }),
|
|
352
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ f("div", { className: "flex flex-wrap items-center justify-center gap-8", children: [
|
|
353
356
|
/* @__PURE__ */ t(
|
|
354
357
|
h,
|
|
355
358
|
{
|
|
356
359
|
variant: "contained",
|
|
357
|
-
startIcon: /* @__PURE__ */ t(
|
|
360
|
+
startIcon: /* @__PURE__ */ t(ye, {}),
|
|
358
361
|
sx: {
|
|
359
362
|
...g,
|
|
360
363
|
...F
|
|
361
364
|
},
|
|
362
|
-
onClick:
|
|
365
|
+
onClick: ce,
|
|
363
366
|
children: "설정파일 저장하기"
|
|
364
367
|
}
|
|
365
368
|
),
|
|
@@ -367,12 +370,12 @@ const g = {
|
|
|
367
370
|
h,
|
|
368
371
|
{
|
|
369
372
|
variant: "outlined",
|
|
370
|
-
startIcon: /* @__PURE__ */ t(
|
|
373
|
+
startIcon: /* @__PURE__ */ t(Le, {}),
|
|
371
374
|
sx: {
|
|
372
375
|
...g,
|
|
373
376
|
...L
|
|
374
377
|
},
|
|
375
|
-
onClick:
|
|
378
|
+
onClick: de,
|
|
376
379
|
children: "설정파일 불러오기"
|
|
377
380
|
}
|
|
378
381
|
)
|
|
@@ -395,35 +398,38 @@ const g = {
|
|
|
395
398
|
p: 3
|
|
396
399
|
}
|
|
397
400
|
},
|
|
398
|
-
children: /* @__PURE__ */
|
|
401
|
+
children: /* @__PURE__ */ f("div", { ref: R, className: "flex h-full min-h-0 flex-col gap-12", children: [
|
|
399
402
|
/* @__PURE__ */ t(
|
|
400
403
|
"input",
|
|
401
404
|
{
|
|
402
|
-
ref:
|
|
405
|
+
ref: I,
|
|
403
406
|
type: "file",
|
|
404
|
-
accept:
|
|
407
|
+
accept: We,
|
|
405
408
|
className: "hidden",
|
|
406
|
-
onChange:
|
|
409
|
+
onChange: pe
|
|
407
410
|
}
|
|
408
411
|
),
|
|
409
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ f("div", { className: "grid min-h-0 flex-1 gap-20 xl:grid-cols-[420px_minmax(0,1fr)]", children: [
|
|
410
413
|
/* @__PURE__ */ t(
|
|
411
|
-
|
|
414
|
+
Ie,
|
|
412
415
|
{
|
|
413
416
|
activeSection: d,
|
|
414
417
|
presetOptions: K,
|
|
415
|
-
selectedMode:
|
|
416
|
-
selectedPresetKey:
|
|
418
|
+
selectedMode: ae,
|
|
419
|
+
selectedPresetKey: se,
|
|
417
420
|
settings: y,
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
resetVersion: Z,
|
|
422
|
+
onSectionChange: he,
|
|
423
|
+
onPaletteValueChange: Y,
|
|
424
|
+
onPaletteValuesChange: G,
|
|
425
|
+
onPaletteValueReset: Q,
|
|
426
|
+
onPaletteValuesReset: X,
|
|
427
|
+
onPresetKeyChange: te,
|
|
428
|
+
onPresetModeChange: re
|
|
423
429
|
}
|
|
424
430
|
),
|
|
425
431
|
/* @__PURE__ */ t(
|
|
426
|
-
|
|
432
|
+
Me,
|
|
427
433
|
{
|
|
428
434
|
activeSection: d,
|
|
429
435
|
isLoading: b,
|
|
@@ -436,6 +442,6 @@ const g = {
|
|
|
436
442
|
);
|
|
437
443
|
}, "ThemePreviewDialog");
|
|
438
444
|
export {
|
|
439
|
-
|
|
445
|
+
hn as ThemePreviewDialog
|
|
440
446
|
};
|
|
441
447
|
//# sourceMappingURL=ThemePreviewDialog.js.map
|