@owp/core 2.5.3 → 2.5.4

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.
Files changed (65) hide show
  1. package/dist/_virtual/index11.js +2 -2
  2. package/dist/_virtual/index13.js +2 -2
  3. package/dist/_virtual/index14.js +2 -2
  4. package/dist/_virtual/index15.js +2 -2
  5. package/dist/components/OwpMrtTable/OwpMrtTable.js +250 -258
  6. package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
  7. package/dist/components/OwpSnackbarContent/OwpSnackbarContent.js +166 -0
  8. package/dist/components/OwpSnackbarContent/OwpSnackbarContent.js.map +1 -0
  9. package/dist/components/OwpTable/OwpDataTable.js +316 -288
  10. package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
  11. package/dist/components/OwpTable/OwpFieldTable.js +102 -58
  12. package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
  13. package/dist/components/OwpTable/OwpTable.js +163 -164
  14. package/dist/components/OwpTable/OwpTable.js.map +1 -1
  15. package/dist/components/OwpTable/internal/treeGridTableStyle.js +77 -0
  16. package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -0
  17. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +197 -252
  18. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  19. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +172 -131
  20. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  21. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +462 -0
  22. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -0
  23. package/dist/configs/defaultConfig.js +67 -44
  24. package/dist/configs/defaultConfig.js.map +1 -1
  25. package/dist/constants/gridTheme.js +60 -10
  26. package/dist/constants/gridTheme.js.map +1 -1
  27. package/dist/constants/tableTheme.js +16 -0
  28. package/dist/constants/tableTheme.js.map +1 -0
  29. package/dist/constants/treeGrid.js +44 -26
  30. package/dist/constants/treeGrid.js.map +1 -1
  31. package/dist/constants.js +21 -20
  32. package/dist/contexts/OwpUiProvider.js +59 -38
  33. package/dist/contexts/OwpUiProvider.js.map +1 -1
  34. package/dist/index.js +111 -110
  35. package/dist/layout/components/toolbar/ToolbarLayout.js +5 -4
  36. package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
  37. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  38. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  39. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  40. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  41. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  42. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  43. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  44. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  45. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  46. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  47. package/dist/types/components/OwpSnackbarContent/OwpSnackbarContent.d.ts +2 -0
  48. package/dist/types/components/OwpTable/OwpTable.d.ts +3 -1
  49. package/dist/types/components/OwpTable/internal/treeGridTableStyle.d.ts +105 -0
  50. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +5 -1
  51. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +20 -0
  52. package/dist/types/configs/defaultConfig.d.ts +22 -0
  53. package/dist/types/constants/gridTheme.d.ts +58 -0
  54. package/dist/types/constants/tableTheme.d.ts +18 -0
  55. package/dist/types/constants/treeGrid.d.ts +5 -0
  56. package/dist/types/types/OwpGridThemeTypes.d.ts +34 -0
  57. package/dist/types/types/OwpSettingsTypes.d.ts +9 -0
  58. package/dist/types/types/OwpTableThemeTypes.d.ts +16 -0
  59. package/dist/types/types/index.d.ts +3 -2
  60. package/dist/types/utils/treeGridUtil.d.ts +1 -0
  61. package/dist/utils/exceljsBrowser.js +45 -48
  62. package/dist/utils/exceljsBrowser.js.map +1 -1
  63. package/dist/utils/treeGridUtil.js +66 -66
  64. package/dist/utils/treeGridUtil.js.map +1 -1
  65. package/package.json +1 -1
@@ -0,0 +1,105 @@
1
+ import type { OwpResolvedGridThemeConfigType } from '@/constants/gridTheme';
2
+ export declare const TREEGRID_TABLE_HEADER_BORDER_COLOR = "#6F7F94";
3
+ export declare const TREEGRID_TABLE_BODY_BORDER_COLOR = "#CDD8E4";
4
+ /**
5
+ * TreeGrid 컨테이너 색상 매핑
6
+ * @param treeGridTheme Grid theme 값
7
+ */
8
+ export declare const getTreeGridContainerSx: (treeGridTheme: OwpResolvedGridThemeConfigType) => {
9
+ backgroundColor: string;
10
+ color: string;
11
+ };
12
+ /**
13
+ * TreeGrid 타이포그래피 매핑
14
+ * @param fontSize 폰트 크기
15
+ * @param fontWeight 폰트 두께
16
+ */
17
+ export declare const getTreeGridTypographySx: (fontSize: number | string, fontWeight?: number | string) => {
18
+ fontFamily: string;
19
+ fontSize: string | number;
20
+ fontWeight: string | number;
21
+ lineHeight: string;
22
+ };
23
+ /**
24
+ * TreeGrid 공통 셀 스타일 매핑
25
+ * @param treeGridTheme Grid theme 값
26
+ */
27
+ export declare const getTreeGridCellBaseSx: (treeGridTheme: OwpResolvedGridThemeConfigType) => {
28
+ boxSizing: string;
29
+ overflow: string;
30
+ textOverflow: string;
31
+ verticalAlign: string;
32
+ whiteSpace: string;
33
+ fontFamily: string;
34
+ fontSize: string | number;
35
+ fontWeight: string | number;
36
+ lineHeight: string;
37
+ };
38
+ /**
39
+ * TreeGrid header 셀 스타일 매핑
40
+ * @param treeGridTheme Grid theme 값
41
+ */
42
+ export declare const getTreeGridHeaderCellSx: (treeGridTheme: OwpResolvedGridThemeConfigType) => {
43
+ backgroundColor: string;
44
+ borderTop: string;
45
+ borderBottom: string;
46
+ borderLeft: number;
47
+ borderRight: string;
48
+ color: string;
49
+ height: string | number;
50
+ minHeight: string | number;
51
+ padding: string;
52
+ fontFamily: string;
53
+ fontSize: string | number;
54
+ fontWeight: string | number;
55
+ lineHeight: string;
56
+ };
57
+ /**
58
+ * TreeGrid body 셀 스타일 매핑
59
+ * @param treeGridTheme Grid theme 값
60
+ */
61
+ export declare const getTreeGridBodyCellSx: (treeGridTheme: OwpResolvedGridThemeConfigType) => {
62
+ backgroundColor: string;
63
+ borderBottom: string;
64
+ borderLeft: number;
65
+ borderRight: string;
66
+ color: string;
67
+ fontSize: string | number;
68
+ padding: string;
69
+ boxSizing: string;
70
+ overflow: string;
71
+ textOverflow: string;
72
+ verticalAlign: string;
73
+ whiteSpace: string;
74
+ fontFamily: string;
75
+ fontWeight: string | number;
76
+ lineHeight: string;
77
+ };
78
+ /**
79
+ * TreeGrid body row 상태 스타일 매핑
80
+ * @param treeGridTheme Grid theme 값
81
+ * @param options hover, selected 여부
82
+ */
83
+ export declare const getTreeGridBodyRowSx: (treeGridTheme: OwpResolvedGridThemeConfigType, options?: {
84
+ canHover?: boolean;
85
+ selected?: boolean;
86
+ }) => {
87
+ '&.Mui-selected > td': {
88
+ backgroundColor: string;
89
+ };
90
+ '&.Mui-selected:hover > td': {
91
+ backgroundColor: string;
92
+ };
93
+ '&:focus-within > td': {
94
+ backgroundColor: string;
95
+ };
96
+ '& > td:focus-within': {
97
+ backgroundColor: string;
98
+ };
99
+ '&:hover > td': {
100
+ backgroundColor: string;
101
+ };
102
+ '& > td': {
103
+ backgroundColor: string;
104
+ };
105
+ };
@@ -17,6 +17,10 @@ export type TreeGridEventBindingOptions<T> = Pick<OwpTreeGridProps<T>, 'id'> & {
17
17
  latestEventHandlersRef: RefObject<TreeGridEventHandlers<T>>;
18
18
  highlightEditableCellsRef: RefObject<boolean>;
19
19
  highlightChangedCellsRef: RefObject<boolean>;
20
+ editableCellBackgroundColorValueRef: RefObject<number | undefined>;
21
+ changedCellBackgroundColorRef: RefObject<string>;
22
+ selectedCellBackgroundColorRef: RefObject<string>;
23
+ hoverCellBackgroundColorRef: RefObject<string>;
20
24
  treeGridInstanceRef: RefObject<TGrid>;
21
25
  treeGridInitStartedAtRef: RefObject<number | null>;
22
26
  latestLayoutOverridesRef: RefObject<OwpTreeGridLayoutConfig | undefined>;
@@ -76,5 +80,5 @@ export declare const replaceTreeGridBodyData: <T>(grid: TGrid, bodyData: OwpTree
76
80
  * TreeGrid 이벤트 바인딩
77
81
  * @param options 이벤트 바인딩 옵션
78
82
  */
79
- export declare const bindTreeGridEvents: <T>({ id, latestEventHandlersRef, highlightEditableCellsRef, highlightChangedCellsRef, treeGridInstanceRef, treeGridInitStartedAtRef, latestLayoutOverridesRef, appliedLayoutOverridesRef, appliedBodyDataPropRef, latestColumnEditRulesRef, latestColumnEditRuleLookupRef, appliedColumnEditRulesRef, columnEditRulesStateRef, hasAppliedInitialLayoutRef, syncHasDisplayDataRows, setIsTreeGridReady, }: TreeGridEventBindingOptions<T>) => void;
83
+ export declare const bindTreeGridEvents: <T>({ id, latestEventHandlersRef, highlightEditableCellsRef, highlightChangedCellsRef, editableCellBackgroundColorValueRef, changedCellBackgroundColorRef, selectedCellBackgroundColorRef, hoverCellBackgroundColorRef, treeGridInstanceRef, treeGridInitStartedAtRef, latestLayoutOverridesRef, appliedLayoutOverridesRef, appliedBodyDataPropRef, latestColumnEditRulesRef, latestColumnEditRuleLookupRef, appliedColumnEditRulesRef, columnEditRulesStateRef, hasAppliedInitialLayoutRef, syncHasDisplayDataRows, setIsTreeGridReady, }: TreeGridEventBindingOptions<T>) => void;
80
84
  export {};
@@ -0,0 +1,20 @@
1
+ import type { OwpResolvedGridThemeConfigType } from '@/constants/gridTheme';
2
+ import type { OwpGridThemeConfigType } from '@/types/OwpGridThemeTypes';
3
+ import type { CSSProperties } from 'react';
4
+ type TreeGridThemeCssVariableName = '--owp-tree-grid-body-background-color' | '--owp-tree-grid-body-color' | '--owp-tree-grid-body-fill-background-color' | '--owp-tree-grid-row-background-color' | '--owp-tree-grid-row-solid-background-color' | '--owp-tree-grid-header-background-color' | '--owp-tree-grid-header-color' | '--owp-tree-grid-header-font-size' | '--owp-tree-grid-header-font-weight' | '--owp-tree-grid-cell-font-size' | '--owp-tree-grid-hover-row-background-color' | '--owp-tree-grid-hover-row-border-color' | '--owp-tree-grid-selected-cell-background-color' | '--owp-tree-grid-selected-row-background-color' | '--owp-tree-grid-focused-row-background-color' | '--owp-tree-grid-focused-row-border-color' | '--owp-tree-grid-hover-cell-background-color' | '--owp-tree-grid-hover-cell-border-color' | '--owp-tree-grid-focused-cell-background-color' | '--owp-tree-grid-focused-cell-border-color' | '--owp-tree-grid-editing-cell-border-color' | '--owp-tree-grid-focused-cell-rect-background-color' | '--owp-tree-grid-changed-background-color';
5
+ type TreeGridLayoutDimensionValue = string | number;
6
+ export type TreeGridThemeContainerStyle = CSSProperties & Partial<Record<TreeGridThemeCssVariableName, string>>;
7
+ export declare const TREE_GRID_THEME_WRAPPER_CLASS = "owp-tree-grid-theme";
8
+ export declare const treeGridThemeStyles: Record<string, CSSProperties>;
9
+ /**
10
+ * TreeGrid theme CSS 변수 컨테이너 스타일 생성
11
+ * @param input Grid theme 입력값
12
+ */
13
+ export declare const createTreeGridThemeContainerStyle: ({ width, height, treeGridTheme, gridThemeConfig, containerStyle, }: {
14
+ width: TreeGridLayoutDimensionValue;
15
+ height: TreeGridLayoutDimensionValue;
16
+ treeGridTheme: OwpResolvedGridThemeConfigType;
17
+ gridThemeConfig?: OwpGridThemeConfigType | null;
18
+ containerStyle?: CSSProperties;
19
+ }) => TreeGridThemeContainerStyle;
20
+ export {};
@@ -1,6 +1,28 @@
1
1
  import type { OwpSettingsConfigType, OwpThemesType } from '@/types/OwpSettingsTypes';
2
2
  import { type ThemeOptions } from '@mui/material/styles';
3
3
  import { PartialDeep } from 'type-fest';
4
+ export declare const defaultSnackbarTheme: {
5
+ default: {
6
+ backgroundColor: string;
7
+ color: string;
8
+ };
9
+ success: {
10
+ backgroundColor: string;
11
+ color: string;
12
+ };
13
+ info: {
14
+ backgroundColor: string;
15
+ color: string;
16
+ };
17
+ warning: {
18
+ backgroundColor: string;
19
+ color: string;
20
+ };
21
+ error: {
22
+ backgroundColor: string;
23
+ color: string;
24
+ };
25
+ };
4
26
  /**
5
27
  * 기본 layout 설정
6
28
  * @param style layout 스타일
@@ -7,9 +7,38 @@ export type OwpResolvedGridThemeConfigType = {
7
7
  fontWeight: number | string;
8
8
  height: number | string;
9
9
  };
10
+ body: {
11
+ backgroundColor: string;
12
+ color: string;
13
+ fillBackgroundColor: string;
14
+ };
15
+ row: {
16
+ backgroundColor: string;
17
+ solidBackgroundColor: string;
18
+ };
10
19
  cell: {
11
20
  fontSize: number | string;
12
21
  };
22
+ state: {
23
+ hoverRowBackgroundColor: string;
24
+ hoverRowBorderColor: string;
25
+ selectedCellBackgroundColor: string;
26
+ selectedRowBackgroundColor: string;
27
+ focusedRowBackgroundColor: string;
28
+ focusedRowBorderColor: string;
29
+ hoverCellBackgroundColor: string;
30
+ hoverCellBorderColor: string;
31
+ focusedCellBackgroundColor: string;
32
+ focusedCellBorderColor: string;
33
+ editingCellBorderColor: string;
34
+ focusedCellRectBackgroundColor: string;
35
+ };
36
+ editable: {
37
+ backgroundColor: string;
38
+ };
39
+ changed: {
40
+ backgroundColor: string;
41
+ };
13
42
  };
14
43
  export declare const defaultOwpGridTheme: {
15
44
  header: {
@@ -19,9 +48,38 @@ export declare const defaultOwpGridTheme: {
19
48
  fontWeight: string;
20
49
  height: number;
21
50
  };
51
+ body: {
52
+ backgroundColor: string;
53
+ color: string;
54
+ fillBackgroundColor: string;
55
+ };
56
+ row: {
57
+ backgroundColor: string;
58
+ solidBackgroundColor: string;
59
+ };
22
60
  cell: {
23
61
  fontSize: string;
24
62
  };
63
+ state: {
64
+ hoverRowBackgroundColor: string;
65
+ hoverRowBorderColor: string;
66
+ selectedCellBackgroundColor: string;
67
+ selectedRowBackgroundColor: string;
68
+ focusedRowBackgroundColor: string;
69
+ focusedRowBorderColor: string;
70
+ hoverCellBackgroundColor: string;
71
+ hoverCellBorderColor: string;
72
+ focusedCellBackgroundColor: string;
73
+ focusedCellBorderColor: string;
74
+ editingCellBorderColor: string;
75
+ focusedCellRectBackgroundColor: string;
76
+ };
77
+ editable: {
78
+ backgroundColor: string;
79
+ };
80
+ changed: {
81
+ backgroundColor: string;
82
+ };
25
83
  };
26
84
  /**
27
85
  * Grid theme 토큰 기본값 병합
@@ -0,0 +1,18 @@
1
+ import type { OwpTableVariantThemeConfigType } from '@/types/OwpTableThemeTypes';
2
+ export type OwpResolvedTableThemeConfigType = {
3
+ header: {
4
+ backgroundColor: string;
5
+ color: string;
6
+ fontSize: number | string;
7
+ fontWeight: number | string;
8
+ };
9
+ cell: {
10
+ fontSize: number | string;
11
+ };
12
+ };
13
+ /**
14
+ * Table theme 토큰 기본값 병합
15
+ * @param tableTheme 앱 theme table 설정
16
+ * @param fallbackTheme 컴포넌트 기본값
17
+ */
18
+ export declare const resolveOwpTableTheme: (tableTheme: OwpTableVariantThemeConfigType | null | undefined, fallbackTheme: OwpResolvedTableThemeConfigType) => OwpResolvedTableThemeConfigType;
@@ -10,6 +10,11 @@ export declare const getTreeGridAssetBasePath: () => string;
10
10
  export declare const resolveTreeGridAssetUrl: (assetPath: string) => string;
11
11
  /** TreeGrid 다국어 리소스 URL 조회 */
12
12
  export declare const getTreeGridTextResourceUrl: (languageId: string) => string;
13
+ /**
14
+ * TreeGrid 색상 문자열 숫자 변환
15
+ * @param color CSS 색상 문자열
16
+ */
17
+ export declare const resolveTreeGridColorNumber: (color?: string | null) => number;
13
18
  /** TreeGrid 폰트 face 스타일 조회 */
14
19
  export declare const getTreeGridFontFaceStyles: () => {
15
20
  '@font-face': Record<string, string>;
@@ -5,10 +5,44 @@ export type OwpGridHeaderThemeConfigType = {
5
5
  fontWeight?: number | string;
6
6
  height?: number | string;
7
7
  };
8
+ export type OwpGridBodyThemeConfigType = {
9
+ backgroundColor?: string;
10
+ color?: string;
11
+ fillBackgroundColor?: string;
12
+ };
13
+ export type OwpGridRowThemeConfigType = {
14
+ backgroundColor?: string;
15
+ solidBackgroundColor?: string;
16
+ };
8
17
  export type OwpGridCellThemeConfigType = {
9
18
  fontSize?: number | string;
10
19
  };
20
+ export type OwpGridStateThemeConfigType = {
21
+ hoverRowBackgroundColor?: string;
22
+ hoverRowBorderColor?: string;
23
+ selectedCellBackgroundColor?: string;
24
+ selectedRowBackgroundColor?: string;
25
+ focusedRowBackgroundColor?: string;
26
+ focusedRowBorderColor?: string;
27
+ hoverCellBackgroundColor?: string;
28
+ hoverCellBorderColor?: string;
29
+ focusedCellBackgroundColor?: string;
30
+ focusedCellBorderColor?: string;
31
+ editingCellBorderColor?: string;
32
+ focusedCellRectBackgroundColor?: string;
33
+ };
34
+ export type OwpGridEditableThemeConfigType = {
35
+ backgroundColor?: string;
36
+ };
37
+ export type OwpGridChangedThemeConfigType = {
38
+ backgroundColor?: string;
39
+ };
11
40
  export type OwpGridThemeConfigType = {
12
41
  header?: OwpGridHeaderThemeConfigType;
42
+ body?: OwpGridBodyThemeConfigType;
43
+ row?: OwpGridRowThemeConfigType;
13
44
  cell?: OwpGridCellThemeConfigType;
45
+ state?: OwpGridStateThemeConfigType;
46
+ editable?: OwpGridEditableThemeConfigType;
47
+ changed?: OwpGridChangedThemeConfigType;
14
48
  };
@@ -2,9 +2,17 @@ import { themeLayoutDefaultsProps } from '@/layout/themeLayoutConfigs';
2
2
  import type { Palette } from '@mui/material/styles';
3
3
  import { PartialDeep } from 'type-fest';
4
4
  import type { OwpGridThemeConfigType } from './OwpGridThemeTypes';
5
+ import type { OwpTableThemeConfigType } from './OwpTableThemeTypes';
6
+ export type OwpSnackbarVariantType = 'default' | 'success' | 'info' | 'warning' | 'error';
7
+ export type OwpSnackbarVariantThemeConfigType = {
8
+ backgroundColor: string;
9
+ color: string;
10
+ };
11
+ export type OwpSnackbarThemeConfigType = Record<OwpSnackbarVariantType, OwpSnackbarVariantThemeConfigType>;
5
12
  export type OwpThemeType = {
6
13
  palette: PartialDeep<Palette>;
7
14
  grid?: OwpGridThemeConfigType;
15
+ table?: OwpTableThemeConfigType;
8
16
  };
9
17
  export type OwpThemesType = {
10
18
  [key: string]: OwpThemeType;
@@ -22,6 +30,7 @@ export type OwpSettingsConfigType = {
22
30
  toolbar: OwpThemeType;
23
31
  footer: OwpThemeType;
24
32
  };
33
+ snackbar: OwpSnackbarThemeConfigType;
25
34
  defaultAuth?: string[];
26
35
  loginRedirectUrl: string;
27
36
  };
@@ -0,0 +1,16 @@
1
+ export type OwpTableHeaderThemeConfigType = {
2
+ backgroundColor?: string;
3
+ color?: string;
4
+ fontSize?: number | string;
5
+ fontWeight?: number | string;
6
+ };
7
+ export type OwpTableCellThemeConfigType = {
8
+ fontSize?: number | string;
9
+ };
10
+ export type OwpTableVariantThemeConfigType = {
11
+ header?: OwpTableHeaderThemeConfigType;
12
+ cell?: OwpTableCellThemeConfigType;
13
+ };
14
+ export type OwpTableThemeConfigType = OwpTableVariantThemeConfigType & {
15
+ field?: OwpTableVariantThemeConfigType;
16
+ };
@@ -1,4 +1,5 @@
1
- export type { OwpGridCellThemeConfigType, OwpGridHeaderThemeConfigType, OwpGridThemeConfigType, } from './OwpGridThemeTypes';
2
- export type { OwpThemeType, OwpThemesType, OwpSettingsConfigType, } from './OwpSettingsTypes';
1
+ export type { OwpGridBodyThemeConfigType, OwpGridCellThemeConfigType, OwpGridChangedThemeConfigType, OwpGridEditableThemeConfigType, OwpGridHeaderThemeConfigType, OwpGridRowThemeConfigType, OwpGridStateThemeConfigType, OwpGridThemeConfigType, } from './OwpGridThemeTypes';
2
+ export type { OwpTableCellThemeConfigType, OwpTableHeaderThemeConfigType, OwpTableThemeConfigType, OwpTableVariantThemeConfigType, } from './OwpTableThemeTypes';
3
+ export type { OwpSnackbarThemeConfigType, OwpSnackbarVariantThemeConfigType, OwpSnackbarVariantType, OwpThemeType, OwpThemesType, OwpSettingsConfigType, } from './OwpSettingsTypes';
3
4
  export type { OwpFlatNavItemType, OwpNavBadgeType, OwpNavPermission, OwpNavItemType, OwpPermissionFlag, } from './OwpNavigationTypes';
4
5
  export type { AnyFormFieldType, ThemeFormConfigTypes } from './ThemeFormConfigTypes';
@@ -15,6 +15,7 @@ type TreeGridColumnVisibilityOptions = {
15
15
  type TreeGridHighlightTargetOption = {
16
16
  row: TRow;
17
17
  col: string;
18
+ backgroundColor?: string;
18
19
  };
19
20
  /**
20
21
  * TreeGrid 인스턴스 ID 조회
@@ -1,66 +1,63 @@
1
1
  var x = Object.defineProperty;
2
- var e = (t, r) => x(t, "name", { value: r, configurable: !0 });
2
+ var e = (o, t) => x(o, "name", { value: t, configurable: !0 });
3
3
  const S = 'script[data-owp-exceljs-bundle="true"]';
4
- let d;
5
- const p = /* @__PURE__ */ e(() => typeof window > "u" ? void 0 : window.ExcelJS, "getExcelJSGlobal"), s = /* @__PURE__ */ e(() => new Error("Failed to resolve browser exceljs bundle."), "createExcelJSGlobalMissingError"), b = /* @__PURE__ */ e(async () => (await import("../_virtual/_virtual_owp-exceljs-browser-source.js")).default, "loadExcelJSBrowserSource"), m = /* @__PURE__ */ e(() => new Promise(async (t, r) => {
6
- const a = p();
7
- if (a) {
8
- t(a);
4
+ let c;
5
+ const p = /* @__PURE__ */ e(() => typeof window > "u" ? void 0 : window.ExcelJS, "getExcelJSGlobal"), l = /* @__PURE__ */ e(() => new Error("Failed to resolve browser exceljs bundle."), "createExcelJSGlobalMissingError"), b = /* @__PURE__ */ e(async () => (await import("../_virtual/_virtual_owp-exceljs-browser-source.js")).default, "loadExcelJSBrowserSource"), m = /* @__PURE__ */ e(() => new Promise((o, t) => {
6
+ const s = p();
7
+ if (s) {
8
+ o(s);
9
9
  return;
10
10
  }
11
11
  if (typeof document > "u") {
12
- r(s());
12
+ t(l());
13
13
  return;
14
14
  }
15
- const i = /* @__PURE__ */ e(() => {
16
- const n = p();
17
- if (!n) {
18
- r(s());
15
+ const a = /* @__PURE__ */ e(() => {
16
+ const r = p();
17
+ if (!r) {
18
+ t(l());
19
19
  return;
20
20
  }
21
- t(n);
22
- }, "handleLoad"), u = /* @__PURE__ */ e(() => {
23
- r(new Error("Failed to load browser exceljs bundle."));
24
- }, "handleError"), l = document.querySelector(S);
25
- if (l) {
26
- l.addEventListener("load", i, { once: !0 }), l.addEventListener("error", u, { once: !0 });
21
+ o(r);
22
+ }, "handleLoad"), i = /* @__PURE__ */ e(() => {
23
+ t(new Error("Failed to load browser exceljs bundle."));
24
+ }, "handleError"), d = document.querySelector(S);
25
+ if (d) {
26
+ d.addEventListener("load", a, { once: !0 }), d.addEventListener("error", i, { once: !0 });
27
27
  return;
28
28
  }
29
- const o = document.createElement("script"), E = document.head ?? document.body ?? document.documentElement;
30
- if (!E) {
31
- r(s());
29
+ const n = document.createElement("script"), u = document.head ?? document.body ?? document.documentElement;
30
+ if (!u) {
31
+ t(l());
32
32
  return;
33
33
  }
34
- let c;
35
- try {
36
- c = URL.createObjectURL(
37
- new Blob([await b()], {
34
+ b().then((r) => {
35
+ const E = URL.createObjectURL(
36
+ new Blob([r], {
38
37
  type: "text/javascript"
39
38
  })
40
- );
41
- } catch (n) {
42
- r(n instanceof Error ? n : new Error("Failed to create browser exceljs bundle."));
43
- return;
44
- }
45
- const w = /* @__PURE__ */ e(() => {
46
- c && URL.revokeObjectURL(c);
47
- }, "cleanupObjectUrl");
48
- o.async = !0, o.dataset.owpExceljsBundle = "true", o.src = c, o.addEventListener(
49
- "load",
50
- () => {
51
- w(), i();
52
- },
53
- { once: !0 }
54
- ), o.addEventListener(
55
- "error",
56
- () => {
57
- w(), u();
58
- },
59
- { once: !0 }
60
- ), E.append(o);
61
- }), "loadExcelJSBrowserScript"), L = /* @__PURE__ */ e(() => (d || (d = m().catch((t) => {
62
- throw d = void 0, t;
63
- })), d), "loadExcelJSBrowser");
39
+ ), w = /* @__PURE__ */ e(() => {
40
+ URL.revokeObjectURL(E);
41
+ }, "cleanupObjectUrl");
42
+ n.async = !0, n.dataset.owpExceljsBundle = "true", n.src = E, n.addEventListener(
43
+ "load",
44
+ () => {
45
+ w(), a();
46
+ },
47
+ { once: !0 }
48
+ ), n.addEventListener(
49
+ "error",
50
+ () => {
51
+ w(), i();
52
+ },
53
+ { once: !0 }
54
+ ), u.append(n);
55
+ }).catch((r) => {
56
+ t(r instanceof Error ? r : new Error("Failed to create browser exceljs bundle."));
57
+ });
58
+ }), "loadExcelJSBrowserScript"), L = /* @__PURE__ */ e(() => (c || (c = m().catch((o) => {
59
+ throw c = void 0, o;
60
+ })), c), "loadExcelJSBrowser");
64
61
  export {
65
62
  L as loadExcelJSBrowser
66
63
  };
@@ -1 +1 @@
1
- {"version":3,"file":"exceljsBrowser.js","sources":["../../src/utils/exceljsBrowser.ts"],"sourcesContent":["import type * as ExcelJSModule from 'exceljs';\n\ntype ExcelJSBrowserModule = typeof ExcelJSModule;\ntype ExcelJSWindow = Window & {\n ExcelJS?: ExcelJSBrowserModule;\n};\n\nconst EXCELJS_SCRIPT_SELECTOR = 'script[data-owp-exceljs-bundle=\"true\"]';\nlet excelJSBrowserPromise: Promise<ExcelJSBrowserModule> | undefined;\n\n/** 브라우저 전역 exceljs 모듈 조회 */\nconst getExcelJSGlobal = () =>\n typeof window === 'undefined' ? undefined : (window as ExcelJSWindow).ExcelJS;\n\n/** 브라우저 전역 exceljs 누락 오류 생성 */\nconst createExcelJSGlobalMissingError = () =>\n new Error('Failed to resolve browser exceljs bundle.');\n\n/** 브라우저 exceljs 번들 소스 지연 로드 */\nconst loadExcelJSBrowserSource = async () =>\n (await import('virtual:owp-exceljs-browser-source')).default;\n\n/** 브라우저 exceljs 스크립트 로드 */\nconst loadExcelJSBrowserScript = () =>\n new Promise<ExcelJSBrowserModule>(async (resolve, reject) => {\n const loadedExcelJS = getExcelJSGlobal();\n\n if (loadedExcelJS) {\n resolve(loadedExcelJS);\n return;\n }\n\n if (typeof document === 'undefined') {\n reject(createExcelJSGlobalMissingError());\n return;\n }\n\n const handleLoad = () => {\n const resolvedExcelJS = getExcelJSGlobal();\n\n if (!resolvedExcelJS) {\n reject(createExcelJSGlobalMissingError());\n return;\n }\n\n resolve(resolvedExcelJS);\n };\n const handleError = () => {\n reject(new Error('Failed to load browser exceljs bundle.'));\n };\n const existingScript = document.querySelector<HTMLScriptElement>(EXCELJS_SCRIPT_SELECTOR);\n\n if (existingScript) {\n existingScript.addEventListener('load', handleLoad, { once: true });\n existingScript.addEventListener('error', handleError, { once: true });\n return;\n }\n\n const scriptElement = document.createElement('script');\n const scriptParentElement = document.head ?? document.body ?? document.documentElement;\n\n if (!scriptParentElement) {\n reject(createExcelJSGlobalMissingError());\n return;\n }\n\n let objectUrl: string | undefined;\n\n try {\n objectUrl = URL.createObjectURL(\n new Blob([await loadExcelJSBrowserSource()], {\n type: 'text/javascript',\n }),\n );\n } catch (error) {\n reject(error instanceof Error ? error : new Error('Failed to create browser exceljs bundle.'));\n return;\n }\n\n const cleanupObjectUrl = () => {\n if (objectUrl) {\n URL.revokeObjectURL(objectUrl);\n }\n };\n\n scriptElement.async = true;\n scriptElement.dataset.owpExceljsBundle = 'true';\n scriptElement.src = objectUrl;\n scriptElement.addEventListener(\n 'load',\n () => {\n cleanupObjectUrl();\n handleLoad();\n },\n { once: true },\n );\n scriptElement.addEventListener(\n 'error',\n () => {\n cleanupObjectUrl();\n handleError();\n },\n { once: true },\n );\n scriptParentElement.append(scriptElement);\n });\n\n/** 브라우저 배포용 exceljs 모듈 지연 로드 */\nexport const loadExcelJSBrowser = () => {\n if (!excelJSBrowserPromise) {\n excelJSBrowserPromise = loadExcelJSBrowserScript()\n .catch((error) => {\n excelJSBrowserPromise = undefined;\n throw error;\n });\n }\n\n return excelJSBrowserPromise;\n};\n"],"names":["EXCELJS_SCRIPT_SELECTOR","excelJSBrowserPromise","getExcelJSGlobal","__name","createExcelJSGlobalMissingError","loadExcelJSBrowserSource","loadExcelJSBrowserScript","resolve","reject","loadedExcelJS","handleLoad","resolvedExcelJS","handleError","existingScript","scriptElement","scriptParentElement","objectUrl","error","cleanupObjectUrl","loadExcelJSBrowser"],"mappings":";;AAOA,MAAMA,IAA0B;AAChC,IAAIC;AAGJ,MAAMC,IAAmB,gBAAAC,EAAA,MACvB,OAAO,SAAW,MAAc,SAAa,OAAyB,SAD/C,qBAInBC,IAAkC,gBAAAD,EAAA,MACtC,IAAI,MAAM,2CAA2C,GADf,oCAIlCE,IAA2B,gBAAAF,EAAA,aAC9B,MAAM,OAAO,oDAAoC,GAAG,SADtB,6BAI3BG,IAA2B,gBAAAH,EAAA,MAC/B,IAAI,QAA8B,OAAOI,GAASC,MAAW;AAC3D,QAAMC,IAAgBP,EAAA;AAEtB,MAAIO,GAAe;AACjB,IAAAF,EAAQE,CAAa;AACrB;AAAA,EACF;AAEA,MAAI,OAAO,WAAa,KAAa;AACnC,IAAAD,EAAOJ,GAAiC;AACxC;AAAA,EACF;AAEA,QAAMM,IAAa,gBAAAP,EAAA,MAAM;AACvB,UAAMQ,IAAkBT,EAAA;AAExB,QAAI,CAACS,GAAiB;AACpB,MAAAH,EAAOJ,GAAiC;AACxC;AAAA,IACF;AAEA,IAAAG,EAAQI,CAAe;AAAA,EACzB,GATmB,eAUbC,IAAc,gBAAAT,EAAA,MAAM;AACxB,IAAAK,EAAO,IAAI,MAAM,wCAAwC,CAAC;AAAA,EAC5D,GAFoB,gBAGdK,IAAiB,SAAS,cAAiCb,CAAuB;AAExF,MAAIa,GAAgB;AAClB,IAAAA,EAAe,iBAAiB,QAAQH,GAAY,EAAE,MAAM,IAAM,GAClEG,EAAe,iBAAiB,SAASD,GAAa,EAAE,MAAM,IAAM;AACpE;AAAA,EACF;AAEA,QAAME,IAAgB,SAAS,cAAc,QAAQ,GAC/CC,IAAsB,SAAS,QAAQ,SAAS,QAAQ,SAAS;AAEvE,MAAI,CAACA,GAAqB;AACxB,IAAAP,EAAOJ,GAAiC;AACxC;AAAA,EACF;AAEA,MAAIY;AAEJ,MAAI;AACF,IAAAA,IAAY,IAAI;AAAA,MACd,IAAI,KAAK,CAAC,MAAMX,EAAA,CAA0B,GAAG;AAAA,QAC3C,MAAM;AAAA,MAAA,CACP;AAAA,IAAA;AAAA,EAEL,SAASY,GAAO;AACd,IAAAT,EAAOS,aAAiB,QAAQA,IAAQ,IAAI,MAAM,0CAA0C,CAAC;AAC7F;AAAA,EACF;AAEA,QAAMC,IAAmB,gBAAAf,EAAA,MAAM;AAC7B,IAAIa,KACF,IAAI,gBAAgBA,CAAS;AAAA,EAEjC,GAJyB;AAMzB,EAAAF,EAAc,QAAQ,IACtBA,EAAc,QAAQ,mBAAmB,QACzCA,EAAc,MAAME,GACpBF,EAAc;AAAA,IACZ;AAAA,IACA,MAAM;AACJ,MAAAI,EAAA,GACAR,EAAA;AAAA,IACF;AAAA,IACA,EAAE,MAAM,GAAA;AAAA,EAAK,GAEfI,EAAc;AAAA,IACZ;AAAA,IACA,MAAM;AACJ,MAAAI,EAAA,GACAN,EAAA;AAAA,IACF;AAAA,IACA,EAAE,MAAM,GAAA;AAAA,EAAK,GAEfG,EAAoB,OAAOD,CAAa;AAC1C,CAAC,GAlF8B,6BAqFpBK,IAAqB,gBAAAhB,EAAA,OAC3BF,MACHA,IAAwBK,EAAA,EACrB,MAAM,CAACW,MAAU;AAChB,QAAAhB,IAAwB,QAClBgB;AACR,CAAC,IAGEhB,IATyB;"}
1
+ {"version":3,"file":"exceljsBrowser.js","sources":["../../src/utils/exceljsBrowser.ts"],"sourcesContent":["import type * as ExcelJSModule from 'exceljs';\n\ntype ExcelJSBrowserModule = typeof ExcelJSModule;\ntype ExcelJSWindow = Window & {\n ExcelJS?: ExcelJSBrowserModule;\n};\n\nconst EXCELJS_SCRIPT_SELECTOR = 'script[data-owp-exceljs-bundle=\"true\"]';\nlet excelJSBrowserPromise: Promise<ExcelJSBrowserModule> | undefined;\n\n/** 브라우저 전역 exceljs 모듈 조회 */\nconst getExcelJSGlobal = () =>\n typeof window === 'undefined' ? undefined : (window as ExcelJSWindow).ExcelJS;\n\n/** 브라우저 전역 exceljs 누락 오류 생성 */\nconst createExcelJSGlobalMissingError = () =>\n new Error('Failed to resolve browser exceljs bundle.');\n\n/** 브라우저 exceljs 번들 소스 지연 로드 */\nconst loadExcelJSBrowserSource = async () =>\n (await import('virtual:owp-exceljs-browser-source')).default;\n\n/** 브라우저 exceljs 스크립트 로드 */\nconst loadExcelJSBrowserScript = () =>\n new Promise<ExcelJSBrowserModule>((resolve, reject) => {\n const loadedExcelJS = getExcelJSGlobal();\n\n if (loadedExcelJS) {\n resolve(loadedExcelJS);\n return;\n }\n\n if (typeof document === 'undefined') {\n reject(createExcelJSGlobalMissingError());\n return;\n }\n\n const handleLoad = () => {\n const resolvedExcelJS = getExcelJSGlobal();\n\n if (!resolvedExcelJS) {\n reject(createExcelJSGlobalMissingError());\n return;\n }\n\n resolve(resolvedExcelJS);\n };\n const handleError = () => {\n reject(new Error('Failed to load browser exceljs bundle.'));\n };\n const existingScript = document.querySelector<HTMLScriptElement>(EXCELJS_SCRIPT_SELECTOR);\n\n if (existingScript) {\n existingScript.addEventListener('load', handleLoad, { once: true });\n existingScript.addEventListener('error', handleError, { once: true });\n return;\n }\n\n const scriptElement = document.createElement('script');\n const scriptParentElement = document.head ?? document.body ?? document.documentElement;\n\n if (!scriptParentElement) {\n reject(createExcelJSGlobalMissingError());\n return;\n }\n\n void loadExcelJSBrowserSource()\n .then((source) => {\n const objectUrl = URL.createObjectURL(\n new Blob([source], {\n type: 'text/javascript',\n }),\n );\n const cleanupObjectUrl = () => {\n URL.revokeObjectURL(objectUrl);\n };\n\n scriptElement.async = true;\n scriptElement.dataset.owpExceljsBundle = 'true';\n scriptElement.src = objectUrl;\n scriptElement.addEventListener(\n 'load',\n () => {\n cleanupObjectUrl();\n handleLoad();\n },\n { once: true },\n );\n scriptElement.addEventListener(\n 'error',\n () => {\n cleanupObjectUrl();\n handleError();\n },\n { once: true },\n );\n scriptParentElement.append(scriptElement);\n })\n .catch((error) => {\n reject(error instanceof Error ? error : new Error('Failed to create browser exceljs bundle.'));\n });\n });\n\n/** 브라우저 배포용 exceljs 모듈 지연 로드 */\nexport const loadExcelJSBrowser = () => {\n if (!excelJSBrowserPromise) {\n excelJSBrowserPromise = loadExcelJSBrowserScript()\n .catch((error) => {\n excelJSBrowserPromise = undefined;\n throw error;\n });\n }\n\n return excelJSBrowserPromise;\n};\n"],"names":["EXCELJS_SCRIPT_SELECTOR","excelJSBrowserPromise","getExcelJSGlobal","__name","createExcelJSGlobalMissingError","loadExcelJSBrowserSource","loadExcelJSBrowserScript","resolve","reject","loadedExcelJS","handleLoad","resolvedExcelJS","handleError","existingScript","scriptElement","scriptParentElement","source","objectUrl","cleanupObjectUrl","error","loadExcelJSBrowser"],"mappings":";;AAOA,MAAMA,IAA0B;AAChC,IAAIC;AAGJ,MAAMC,IAAmB,gBAAAC,EAAA,MACvB,OAAO,SAAW,MAAc,SAAa,OAAyB,SAD/C,qBAInBC,IAAkC,gBAAAD,EAAA,MACtC,IAAI,MAAM,2CAA2C,GADf,oCAIlCE,IAA2B,gBAAAF,EAAA,aAC9B,MAAM,OAAO,oDAAoC,GAAG,SADtB,6BAI3BG,IAA2B,gBAAAH,EAAA,MAC/B,IAAI,QAA8B,CAACI,GAASC,MAAW;AACrD,QAAMC,IAAgBP,EAAA;AAEtB,MAAIO,GAAe;AACjB,IAAAF,EAAQE,CAAa;AACrB;AAAA,EACF;AAEA,MAAI,OAAO,WAAa,KAAa;AACnC,IAAAD,EAAOJ,GAAiC;AACxC;AAAA,EACF;AAEA,QAAMM,IAAa,gBAAAP,EAAA,MAAM;AACvB,UAAMQ,IAAkBT,EAAA;AAExB,QAAI,CAACS,GAAiB;AACpB,MAAAH,EAAOJ,GAAiC;AACxC;AAAA,IACF;AAEA,IAAAG,EAAQI,CAAe;AAAA,EACzB,GATmB,eAUbC,IAAc,gBAAAT,EAAA,MAAM;AACxB,IAAAK,EAAO,IAAI,MAAM,wCAAwC,CAAC;AAAA,EAC5D,GAFoB,gBAGdK,IAAiB,SAAS,cAAiCb,CAAuB;AAExF,MAAIa,GAAgB;AAClB,IAAAA,EAAe,iBAAiB,QAAQH,GAAY,EAAE,MAAM,IAAM,GAClEG,EAAe,iBAAiB,SAASD,GAAa,EAAE,MAAM,IAAM;AACpE;AAAA,EACF;AAEA,QAAME,IAAgB,SAAS,cAAc,QAAQ,GAC/CC,IAAsB,SAAS,QAAQ,SAAS,QAAQ,SAAS;AAEvE,MAAI,CAACA,GAAqB;AACxB,IAAAP,EAAOJ,GAAiC;AACxC;AAAA,EACF;AAEA,EAAKC,EAAA,EACF,KAAK,CAACW,MAAW;AAChB,UAAMC,IAAY,IAAI;AAAA,MACpB,IAAI,KAAK,CAACD,CAAM,GAAG;AAAA,QACjB,MAAM;AAAA,MAAA,CACP;AAAA,IAAA,GAEGE,IAAmB,gBAAAf,EAAA,MAAM;AAC7B,UAAI,gBAAgBc,CAAS;AAAA,IAC/B,GAFyB;AAIzB,IAAAH,EAAc,QAAQ,IACtBA,EAAc,QAAQ,mBAAmB,QACzCA,EAAc,MAAMG,GACpBH,EAAc;AAAA,MACZ;AAAA,MACA,MAAM;AACJ,QAAAI,EAAA,GACAR,EAAA;AAAA,MACF;AAAA,MACA,EAAE,MAAM,GAAA;AAAA,IAAK,GAEfI,EAAc;AAAA,MACZ;AAAA,MACA,MAAM;AACJ,QAAAI,EAAA,GACAN,EAAA;AAAA,MACF;AAAA,MACA,EAAE,MAAM,GAAA;AAAA,IAAK,GAEfG,EAAoB,OAAOD,CAAa;AAAA,EAC1C,CAAC,EACA,MAAM,CAACK,MAAU;AAChB,IAAAX,EAAOW,aAAiB,QAAQA,IAAQ,IAAI,MAAM,0CAA0C,CAAC;AAAA,EAC/F,CAAC;AACL,CAAC,GA9E8B,6BAiFpBC,IAAqB,gBAAAjB,EAAA,OAC3BF,MACHA,IAAwBK,EAAA,EACrB,MAAM,CAACa,MAAU;AAChB,QAAAlB,IAAwB,QAClBkB;AACR,CAAC,IAGElB,IATyB;"}