@owp/core 2.4.0 → 2.4.1

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 (115) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index12.js +2 -2
  3. package/dist/_virtual/index13.js +2 -2
  4. package/dist/_virtual/index14.js +2 -2
  5. package/dist/_virtual/index15.js +2 -2
  6. package/dist/_virtual/index17.js +5 -2
  7. package/dist/_virtual/index17.js.map +1 -1
  8. package/dist/_virtual/index18.js +4 -4
  9. package/dist/_virtual/index19.js +4 -4
  10. package/dist/_virtual/index20.js +2 -5
  11. package/dist/_virtual/index20.js.map +1 -1
  12. package/dist/_virtual/index5.js +2 -2
  13. package/dist/components/OwpCommonCode/OwpCommonCodeRadioGroup.js +38 -38
  14. package/dist/components/OwpCommonCode/OwpCommonCodeRadioGroup.js.map +1 -1
  15. package/dist/components/OwpFieldHelperText/OwpFieldHelperText.js +34 -0
  16. package/dist/components/OwpFieldHelperText/OwpFieldHelperText.js.map +1 -0
  17. package/dist/components/OwpRequiredHelperText/OwpRequiredHelperText.js +38 -0
  18. package/dist/components/OwpRequiredHelperText/OwpRequiredHelperText.js.map +1 -0
  19. package/dist/components/OwpTable/OwpFieldTable.js +99 -0
  20. package/dist/components/OwpTable/OwpFieldTable.js.map +1 -0
  21. package/dist/components/OwpTextField/OwpTextMaskField.js +138 -87
  22. package/dist/components/OwpTextField/OwpTextMaskField.js.map +1 -1
  23. package/dist/hooks/useCurrentUserSeq.js +20 -6
  24. package/dist/hooks/useCurrentUserSeq.js.map +1 -1
  25. package/dist/hooks.js +50 -49
  26. package/dist/index.js +74 -70
  27. package/dist/index.js.map +1 -1
  28. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  29. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  30. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  31. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  32. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  33. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  34. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  35. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  36. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  37. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  38. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  39. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  40. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  41. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  42. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  43. package/dist/owp-app.css +1 -1
  44. package/dist/types/components/OwpFieldHelperText/OwpFieldHelperText.d.ts +14 -0
  45. package/dist/types/components/OwpFieldHelperText/index.d.ts +2 -0
  46. package/dist/types/components/OwpRequiredHelperText/OwpRequiredHelperText.d.ts +18 -0
  47. package/dist/types/components/OwpRequiredHelperText/index.d.ts +2 -0
  48. package/dist/types/components/OwpTable/{OwpVerticalTable.d.ts → OwpFieldTable.d.ts} +9 -8
  49. package/dist/types/components/OwpTable/index.d.ts +1 -1
  50. package/dist/types/components/OwpTextField/OwpTextMaskField.d.ts +5 -3
  51. package/dist/types/hooks/useCurrentUserSeq.d.ts +11 -2
  52. package/dist/types/index.d.ts +3 -1
  53. package/package.json +2 -2
  54. package/dist/components/OwpTable/OwpVerticalTable.js +0 -96
  55. package/dist/components/OwpTable/OwpVerticalTable.js.map +0 -1
  56. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/html-contenteditable-mask-element.js +0 -39
  57. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/html-contenteditable-mask-element.js.map +0 -1
  58. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/html-input-mask-element.js +0 -36
  59. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/html-input-mask-element.js.map +0 -1
  60. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/html-mask-element.js +0 -52
  61. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/html-mask-element.js.map +0 -1
  62. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/input-history.js +0 -35
  63. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/input-history.js.map +0 -1
  64. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/input.js +0 -227
  65. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/input.js.map +0 -1
  66. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/mask-element.js +0 -48
  67. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/mask-element.js.map +0 -1
  68. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/core/action-details.js +0 -56
  69. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/core/action-details.js.map +0 -1
  70. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/core/change-details.js +0 -41
  71. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/core/change-details.js.map +0 -1
  72. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/core/continuous-tail-details.js +0 -47
  73. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/core/continuous-tail-details.js.map +0 -1
  74. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/core/holder.js +0 -10
  75. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/core/holder.js.map +0 -1
  76. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/core/utils.js +0 -76
  77. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/core/utils.js.map +0 -1
  78. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/index.js +0 -51
  79. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/index.js.map +0 -1
  80. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/base.js +0 -257
  81. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/base.js.map +0 -1
  82. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/date.js +0 -121
  83. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/date.js.map +0 -1
  84. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/dynamic.js +0 -227
  85. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/dynamic.js.map +0 -1
  86. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/enum.js +0 -74
  87. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/enum.js.map +0 -1
  88. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/factory.js +0 -52
  89. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/factory.js.map +0 -1
  90. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/function.js +0 -28
  91. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/function.js.map +0 -1
  92. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/number.js +0 -217
  93. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/number.js.map +0 -1
  94. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pattern/chunk-tail-details.js +0 -108
  95. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pattern/chunk-tail-details.js.map +0 -1
  96. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pattern/cursor.js +0 -105
  97. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pattern/cursor.js.map +0 -1
  98. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pattern/fixed-definition.js +0 -107
  99. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pattern/fixed-definition.js.map +0 -1
  100. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pattern/input-definition.js +0 -138
  101. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pattern/input-definition.js.map +0 -1
  102. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pattern.js +0 -327
  103. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pattern.js.map +0 -1
  104. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pipe.js +0 -28
  105. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/pipe.js.map +0 -1
  106. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/range.js +0 -83
  107. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/range.js.map +0 -1
  108. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/regexp.js +0 -26
  109. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/regexp.js.map +0 -1
  110. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/repeat.js +0 -109
  111. package/dist/node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/masked/repeat.js.map +0 -1
  112. package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/input.js +0 -28
  113. package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/input.js.map +0 -1
  114. package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.js +0 -136
  115. package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.js.map +0 -1
@@ -0,0 +1,18 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface OwpRequiredHelperTextProps {
3
+ children?: ReactNode;
4
+ message?: ReactNode;
5
+ className?: string;
6
+ required?: boolean;
7
+ requiredPosition?: 'left' | 'right';
8
+ }
9
+ /**
10
+ * 필수 표시 안내 문구
11
+ * @param children 안내 문구
12
+ * @param message 안내 문구
13
+ * @param className 추가 스타일 클래스
14
+ * @param required 필수 표시 노출 여부
15
+ * @param requiredPosition 필수 표시 위치
16
+ */
17
+ declare function OwpRequiredHelperText({ children, message, className, required, requiredPosition, }: OwpRequiredHelperTextProps): import("react/jsx-runtime").JSX.Element;
18
+ export { OwpRequiredHelperText };
@@ -0,0 +1,2 @@
1
+ export { OwpRequiredHelperText } from './OwpRequiredHelperText';
2
+ export type { OwpRequiredHelperTextProps } from './OwpRequiredHelperText';
@@ -1,8 +1,9 @@
1
1
  import { type TableCellProps } from '@mui/material';
2
2
  import { type CSSProperties, type ReactNode } from 'react';
3
- type OwpVerticalTableCell = {
3
+ type OwpFieldTableCell = {
4
4
  title: string;
5
5
  key: string;
6
+ required?: boolean;
6
7
  disableLocaleString?: boolean;
7
8
  useDate?: boolean;
8
9
  withTime?: boolean;
@@ -14,11 +15,11 @@ type OwpVerticalTableCell = {
14
15
  render?: () => ReactNode;
15
16
  validate?: (v?: number | string) => boolean;
16
17
  };
17
- type OwpVerticalTableValue = string | number | '';
18
- type OwpVerticalTableDataRecord = Record<string, OwpVerticalTableValue | undefined>;
19
- interface OwpVerticalTableProps {
20
- layout: OwpVerticalTableCell[][];
21
- data?: OwpVerticalTableDataRecord;
18
+ type OwpFieldTableValue = string | number | '';
19
+ type OwpFieldTableDataRecord = Record<string, OwpFieldTableValue | undefined>;
20
+ interface OwpFieldTableProps {
21
+ layout: OwpFieldTableCell[][];
22
+ data?: OwpFieldTableDataRecord;
22
23
  titleSx?: TableCellProps['sx'];
23
24
  treeGridTitleCellSx?: TableCellProps['sx'] & CSSProperties;
24
25
  cellSx?: TableCellProps['sx'] & CSSProperties;
@@ -29,7 +30,7 @@ interface OwpVerticalTableProps {
29
30
  canUseTreeGridStyle?: boolean;
30
31
  }
31
32
  /**
32
- * OwpVerticalTable 컴포넌트
33
+ * OwpFieldTable 컴포넌트
33
34
  * @param layout layout 값
34
35
  * @param titleWidth titleWidth 값
35
36
  * @param titleSx titleSx 값
@@ -41,5 +42,5 @@ interface OwpVerticalTableProps {
41
42
  * @param tableLayout tableLayout 값
42
43
  * @param canUseTreeGridStyle TreeGrid 스타일 사용 여부
43
44
  */
44
- export declare function OwpVerticalTable({ layout, titleWidth, titleSx, treeGridTitleCellSx, cellSx, data, colGroupSlot, className, tableLayout, canUseTreeGridStyle, }: OwpVerticalTableProps): import("react/jsx-runtime").JSX.Element;
45
+ export declare function OwpFieldTable({ layout, titleWidth, titleSx, treeGridTitleCellSx, cellSx, data, colGroupSlot, className, tableLayout, canUseTreeGridStyle, }: OwpFieldTableProps): import("react/jsx-runtime").JSX.Element;
45
46
  export {};
@@ -1,3 +1,3 @@
1
1
  export * from './OwpDataTable';
2
2
  export * from './OwpTable';
3
- export * from './OwpVerticalTable';
3
+ export * from './OwpFieldTable';
@@ -1,6 +1,7 @@
1
1
  import type { FormControlProps } from '@mui/material/FormControl';
2
2
  import type { InputProps as MuiInputProps } from '@mui/material/Input';
3
3
  import { type ReactNode } from 'react';
4
+ import { type Definitions, type FactoryOpts } from 'imask';
4
5
  type TextMaskFieldChangeEvent = {
5
6
  target: {
6
7
  name: string;
@@ -8,11 +9,12 @@ type TextMaskFieldChangeEvent = {
8
9
  };
9
10
  unmaskedValue: string;
10
11
  };
12
+ type TextMaskValue = FactoryOpts['mask'];
11
13
  interface CustomProps {
12
14
  onMaskChange: (event: TextMaskFieldChangeEvent) => void;
13
15
  name?: string;
14
- mask: string;
15
- definitions?: Record<string, unknown>;
16
+ mask: TextMaskValue;
17
+ definitions?: Definitions;
16
18
  }
17
19
  type OwpTextMaskFieldProps = Omit<MuiInputProps, 'onChange' | 'inputComponent'> & Omit<CustomProps, 'onMaskChange'> & {
18
20
  label?: ReactNode;
@@ -22,7 +24,7 @@ type OwpTextMaskFieldProps = Omit<MuiInputProps, 'onChange' | 'inputComponent'>
22
24
  };
23
25
  /**
24
26
  * 마스크 텍스트 입력 필드
25
- * @param mask 입력 마스크 문자열
27
+ * @param mask 입력 마스크 정의
26
28
  * @param definitions 사용자 정의 마스크 정의
27
29
  * @param onChange 마스크 변경 이벤트 핸들러
28
30
  */
@@ -1,8 +1,17 @@
1
+ export type CurrentUserSeq = string | number;
2
+ export interface UseEnsureCurrentUserSeqOptions {
3
+ snackbarMessageKey?: string;
4
+ }
1
5
  /**
2
6
  * 현재 사용자 USERSEQ 조회 훅
3
7
  */
4
- export declare const useGetCurrentUserSeq: () => string | number;
8
+ export declare const useGetCurrentUserSeq: () => CurrentUserSeq;
5
9
  /**
6
10
  * 현재 사용자 USERSEQ 설정 훅
7
11
  */
8
- export declare const useSetCurrentUserSeq: () => (args_0: string | number | typeof import("jotai/utils").RESET | ((prev: string | number) => string | number | typeof import("jotai/utils").RESET)) => void;
12
+ export declare const useSetCurrentUserSeq: () => (args_0: typeof import("jotai/utils").RESET | CurrentUserSeq | ((prev: CurrentUserSeq) => typeof import("jotai/utils").RESET | CurrentUserSeq)) => void;
13
+ /**
14
+ * 현재 사용자 USERSEQ 필수 검증 훅
15
+ * @param snackbarMessageKey 사용자 정보 부재 안내 메시지 키
16
+ */
17
+ export declare const useEnsureCurrentUserSeq: ({ snackbarMessageKey, }?: UseEnsureCurrentUserSeqOptions) => () => CurrentUserSeq;
@@ -10,6 +10,7 @@ export * from './components/OwpExportExcelButton/OwpExportExcelButton';
10
10
  export { OwpErrorBoundary } from './components/OwpErrorBoundary';
11
11
  export * from './components/OwpErrorStatusPage';
12
12
  export { OwpEventEmitter } from './components/OwpEventEmitter';
13
+ export * from './components/OwpFieldHelperText';
13
14
  export * from './components/OwpFileUploadButton/OwpFileUploadButton';
14
15
  export * from './components/OwpLayout';
15
16
  export * from './components/OwpLoading';
@@ -34,9 +35,10 @@ export * from './components/OwpSection';
34
35
  export * from './components/OwpStyleProvider';
35
36
  export * from './components/OwpSuspense';
36
37
  export * from './components/OwpSvgIcon';
38
+ export * from './components/OwpRequiredHelperText';
37
39
  export * from './components/OwpTable/OwpDataTable';
38
40
  export * from './components/OwpTable/OwpTable';
39
- export * from './components/OwpTable/OwpVerticalTable';
41
+ export * from './components/OwpTable/OwpFieldTable';
40
42
  export * from './components/OwpTextField/OwpTextMaskField';
41
43
  export * from './components/OwpTabs';
42
44
  export * from './components/OwpTreeGridExcelButton';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@owp/core",
3
3
  "private": false,
4
- "version": "2.4.0",
4
+ "version": "2.4.1",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -27,6 +27,7 @@
27
27
  "date-fns": "^4.1.0",
28
28
  "es-toolkit": "^1.39.10",
29
29
  "history": "^5.3.0",
30
+ "imask": "^7.6.1",
30
31
  "inko": "^1.1.1",
31
32
  "jsbarcode": "^3.12.1",
32
33
  "jszip": "^3.10.1",
@@ -38,7 +39,6 @@
38
39
  "react-autosuggest": "^10.1.0",
39
40
  "react-datepicker": "^8.7.0",
40
41
  "react-idle-timer": "^5.7.2",
41
- "react-imask": "^7.6.1",
42
42
  "react-number-format": "^5.4.4",
43
43
  "react-overlays": "^5.2.1",
44
44
  "type-fest": "^4.41.0"
@@ -1,96 +0,0 @@
1
- var D = Object.defineProperty;
2
- var o = (r, e) => D(r, "name", { value: e, configurable: !0 });
3
- import { jsxs as f, jsx as s } 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 { TableCell as u, TableBody as x, Checkbox as S } from "@mui/material";
5
- import { clsx as T } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
6
- import N from "dayjs";
7
- import { Fragment as H } from "react";
8
- import { StyledTableRow as M, StyledTable as c } from "./OwpTable.js";
9
- import { isNaN as k } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isNaN.js";
10
- import { toNumber as F } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/util/toNumber.js";
11
- const y = 28, V = {
12
- "&&": {
13
- fontFamily: "inherit",
14
- fontSize: "1.7rem",
15
- fontWeight: 600,
16
- lineHeight: "normal",
17
- minHeight: "unset",
18
- padding: "7px 10px"
19
- }
20
- }, E = {
21
- borderRadius: 0,
22
- overflow: "visible"
23
- }, h = {
24
- borderTop: "1px solid #CDD8E4"
25
- }, j = /* @__PURE__ */ o((r, e) => r == null ? void 0 : r[e], "getVerticalTableValue"), z = /* @__PURE__ */ o((r, e) => typeof e == "function" ? e(r) : k(F(r)) ? r === "Y" : !!Number(r), "getCheckboxChecked"), B = /* @__PURE__ */ o((r) => r.withTime ? "YYYY-MM-DD HH:mm" : r.withTimeAndSec ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD", "getDateFormat"), L = /* @__PURE__ */ o((r, e, m) => {
26
- const i = j(e, r.key);
27
- return typeof r.render == "function" ? r.render() : r.useCheckbox ? /* @__PURE__ */ s(
28
- S,
29
- {
30
- checked: z(i, r.validate),
31
- sx: { "& .MuiSvgIcon-root": { fontSize: (m == null ? void 0 : m.fontSize) ?? y } }
32
- }
33
- ) : r.useDate ? i && N(i).format(B(r)) : r.disableLocaleString ? i : i == null ? void 0 : i.toLocaleString();
34
- }, "renderVerticalTableCellValue");
35
- function W({
36
- layout: r,
37
- titleWidth: e,
38
- titleSx: m,
39
- treeGridTitleCellSx: i,
40
- cellSx: a,
41
- data: d,
42
- colGroupSlot: b,
43
- className: w,
44
- tableLayout: Y = "fixed",
45
- canUseTreeGridStyle: n = !1
46
- }) {
47
- return /* @__PURE__ */ f(
48
- c,
49
- {
50
- canUseTreeGridStyle: n,
51
- className: T("w-full", w),
52
- containerProps: { sx: n ? E : void 0 },
53
- tableLayout: Y,
54
- children: [
55
- b,
56
- /* @__PURE__ */ s(x, { children: r.map((C, p) => /* @__PURE__ */ s(M, { children: C.map((t, g) => /* @__PURE__ */ f(H, { children: [
57
- /* @__PURE__ */ s(
58
- u,
59
- {
60
- component: "th",
61
- className: "whitespace-pre-wrap",
62
- width: e ?? 200,
63
- sx: {
64
- ...n ? V : {},
65
- ...n ? i ?? {} : {},
66
- ...n && p === 0 ? h : {},
67
- ...m ?? {}
68
- },
69
- rowSpan: t == null ? void 0 : t.rowSpan,
70
- children: t.title
71
- }
72
- ),
73
- /* @__PURE__ */ s(
74
- u,
75
- {
76
- className: "whitespace-pre-wrap",
77
- sx: {
78
- ...n && p === 0 ? h : {},
79
- ...a ?? {}
80
- },
81
- style: (t == null ? void 0 : t.style) ?? {},
82
- colSpan: t == null ? void 0 : t.colSpan,
83
- rowSpan: t == null ? void 0 : t.rowSpan,
84
- children: L(t, d, a)
85
- }
86
- )
87
- ] }, `owp-vertical-cell-${p}-${g}`)) }, `owp-vertical-col-${p}`)) })
88
- ]
89
- }
90
- );
91
- }
92
- o(W, "OwpVerticalTable");
93
- export {
94
- W as OwpVerticalTable
95
- };
96
- //# sourceMappingURL=OwpVerticalTable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OwpVerticalTable.js","sources":["../../../src/components/OwpTable/OwpVerticalTable.tsx"],"sourcesContent":["import { Checkbox, TableBody, TableCell, type TableCellProps } from '@mui/material';\nimport clsx from 'clsx';\nimport dayjs from 'dayjs';\nimport { isNaN, toNumber } from 'es-toolkit/compat';\nimport { Fragment, type CSSProperties, type ReactNode } from 'react';\nimport { StyledTable, StyledTableRow } from './OwpTable';\n\ntype OwpVerticalTableCell = {\n title: string;\n key: string;\n disableLocaleString?: boolean;\n useDate?: boolean;\n withTime?: boolean;\n withTimeAndSec?: boolean;\n useCheckbox?: boolean;\n colSpan?: number;\n rowSpan?: number;\n style?: CSSProperties;\n render?: () => ReactNode;\n validate?: (v?: number | string) => boolean;\n};\n\ntype OwpVerticalTableValue = string | number | '';\ntype OwpVerticalTableDataRecord = Record<string, OwpVerticalTableValue | undefined>;\n\ninterface OwpVerticalTableProps {\n layout: OwpVerticalTableCell[][];\n data?: OwpVerticalTableDataRecord;\n titleSx?: TableCellProps['sx'];\n treeGridTitleCellSx?: TableCellProps['sx'] & CSSProperties;\n cellSx?: TableCellProps['sx'] & CSSProperties;\n titleWidth?: number | string;\n colGroupSlot?: ReactNode;\n className?: string;\n tableLayout?: 'auto' | 'fixed';\n canUseTreeGridStyle?: boolean;\n}\n\nconst DEFAULT_CHECKBOX_FONT_SIZE = 28;\n\nconst defaultTreeGridTitleCellSx = {\n '&&': {\n fontFamily: 'inherit',\n fontSize: '1.7rem',\n fontWeight: 600,\n lineHeight: 'normal',\n minHeight: 'unset',\n padding: '7px 10px',\n },\n} as const;\n\nconst treeGridContainerSx = {\n borderRadius: 0,\n overflow: 'visible',\n} as const;\n\nconst treeGridFirstRowCellSx = {\n borderTop: '1px solid #CDD8E4',\n} as const;\n\nconst getVerticalTableValue = (data: OwpVerticalTableProps['data'], key: string) => {\n return data?.[key];\n};\n\nconst getCheckboxChecked = (\n value: OwpVerticalTableValue | undefined,\n validate?: OwpVerticalTableCell['validate'],\n) => {\n if (typeof validate === 'function') {\n return validate(value);\n }\n\n if (isNaN(toNumber(value))) {\n return value === 'Y';\n }\n\n return Boolean(Number(value));\n};\n\nconst getDateFormat = (cell: OwpVerticalTableCell) => {\n if (cell.withTime) {\n return 'YYYY-MM-DD HH:mm';\n }\n\n if (cell.withTimeAndSec) {\n return 'YYYY-MM-DD HH:mm:ss';\n }\n\n return 'YYYY-MM-DD';\n};\n\nconst renderVerticalTableCellValue = (\n cell: OwpVerticalTableCell,\n data: OwpVerticalTableProps['data'],\n cellSx?: OwpVerticalTableProps['cellSx'],\n): ReactNode => {\n const value = getVerticalTableValue(data, cell.key);\n\n if (typeof cell.render === 'function') {\n return cell.render();\n }\n\n if (cell.useCheckbox) {\n return (\n <Checkbox\n checked={getCheckboxChecked(value, cell.validate)}\n sx={{ '& .MuiSvgIcon-root': { fontSize: cellSx?.fontSize ?? DEFAULT_CHECKBOX_FONT_SIZE } }}\n />\n );\n }\n\n if (cell.useDate) {\n return value ? dayjs(value).format(getDateFormat(cell)) : value;\n }\n\n if (cell.disableLocaleString) {\n return value;\n }\n\n return value?.toLocaleString();\n};\n\n/**\n * OwpVerticalTable 컴포넌트\n * @param layout layout 값\n * @param titleWidth titleWidth 값\n * @param titleSx titleSx 값\n * @param treeGridTitleCellSx TreeGrid title cell sx 값\n * @param cellSx cellSx 값\n * @param data 데이터\n * @param colGroupSlot colGroupSlot 값\n * @param className className 값\n * @param tableLayout tableLayout 값\n * @param canUseTreeGridStyle TreeGrid 스타일 사용 여부\n */\nexport function OwpVerticalTable({\n layout,\n titleWidth,\n titleSx,\n treeGridTitleCellSx,\n cellSx,\n data,\n colGroupSlot,\n className,\n tableLayout = 'fixed',\n canUseTreeGridStyle = false,\n}: OwpVerticalTableProps) {\n return (\n <StyledTable\n canUseTreeGridStyle={canUseTreeGridStyle}\n className={clsx('w-full', className)}\n containerProps={{ sx: canUseTreeGridStyle ? treeGridContainerSx : undefined }}\n tableLayout={tableLayout}\n >\n {colGroupSlot}\n <TableBody>\n {layout.map((cols, rowIndex) => (\n <StyledTableRow key={`owp-vertical-col-${rowIndex}`}>\n {cols.map((col, colIndex) => (\n <Fragment key={`owp-vertical-cell-${rowIndex}-${colIndex}`}>\n <TableCell\n component=\"th\"\n className=\"whitespace-pre-wrap\"\n width={titleWidth ?? 200}\n sx={{\n ...(canUseTreeGridStyle ? defaultTreeGridTitleCellSx : {}),\n ...(canUseTreeGridStyle ? (treeGridTitleCellSx ?? {}) : {}),\n ...(canUseTreeGridStyle && rowIndex === 0 ? treeGridFirstRowCellSx : {}),\n ...(titleSx ?? {}),\n }}\n rowSpan={col?.rowSpan}\n >\n {col.title}\n </TableCell>\n <TableCell\n className=\"whitespace-pre-wrap\"\n sx={{\n ...(canUseTreeGridStyle && rowIndex === 0 ? treeGridFirstRowCellSx : {}),\n ...(cellSx ?? {}),\n }}\n style={col?.style ?? {}}\n colSpan={col?.colSpan}\n rowSpan={col?.rowSpan}\n >\n {renderVerticalTableCellValue(col, data, cellSx)}\n </TableCell>\n </Fragment>\n ))}\n </StyledTableRow>\n ))}\n </TableBody>\n </StyledTable>\n );\n}\n"],"names":["DEFAULT_CHECKBOX_FONT_SIZE","defaultTreeGridTitleCellSx","treeGridContainerSx","treeGridFirstRowCellSx","getVerticalTableValue","__name","data","key","getCheckboxChecked","value","validate","isNaN","toNumber","getDateFormat","cell","renderVerticalTableCellValue","cellSx","jsx","Checkbox","dayjs","OwpVerticalTable","layout","titleWidth","titleSx","treeGridTitleCellSx","colGroupSlot","className","tableLayout","canUseTreeGridStyle","jsxs","StyledTable","clsx","TableBody","cols","rowIndex","StyledTableRow","col","colIndex","Fragment","TableCell"],"mappings":";;;;;;;;;;AAsCA,MAAMA,IAA6B,IAE7BC,IAA6B;AAAA,EACjC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ba,qBAAqBkB,CAAQ,IAAIG,CAAQ,EA2BxD,CACD,EAAA,GA9BkB,oBAAoBH,CAAQ,EA+BjD,CACD,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AA1DgB7B,EAAAe,GAAA;"}
@@ -1,39 +0,0 @@
1
- var f = Object.defineProperty;
2
- var c = (l, t) => f(l, "name", { value: t, configurable: !0 });
3
- import u from "./html-mask-element.js";
4
- import a from "../core/holder.js";
5
- import "./mask-element.js";
6
- const r = class r extends u {
7
- /** Returns HTMLElement selection start */
8
- get _unsafeSelectionStart() {
9
- const t = this.rootElement, e = t.getSelection && t.getSelection(), n = e && e.anchorOffset, o = e && e.focusOffset;
10
- return o == null || n == null || n < o ? n : o;
11
- }
12
- /** Returns HTMLElement selection end */
13
- get _unsafeSelectionEnd() {
14
- const t = this.rootElement, e = t.getSelection && t.getSelection(), n = e && e.anchorOffset, o = e && e.focusOffset;
15
- return o == null || n == null || n > o ? n : o;
16
- }
17
- /** Sets HTMLElement selection */
18
- _unsafeSelect(t, e) {
19
- if (!this.rootElement.createRange) return;
20
- const n = this.rootElement.createRange();
21
- n.setStart(this.input.firstChild || this.input, t), n.setEnd(this.input.lastChild || this.input, e);
22
- const o = this.rootElement, s = o.getSelection && o.getSelection();
23
- s && (s.removeAllRanges(), s.addRange(n));
24
- }
25
- /** HTMLElement value */
26
- get value() {
27
- return this.input.textContent || "";
28
- }
29
- set value(t) {
30
- this.input.textContent = t;
31
- }
32
- };
33
- c(r, "HTMLContenteditableMaskElement");
34
- let i = r;
35
- a.HTMLContenteditableMaskElement = i;
36
- export {
37
- i as default
38
- };
39
- //# sourceMappingURL=html-contenteditable-mask-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html-contenteditable-mask-element.js","sources":["../../../../../../../../../../node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/html-contenteditable-mask-element.js"],"sourcesContent":["import HTMLMaskElement from './html-mask-element.js';\nimport IMask from '../core/holder.js';\nimport './mask-element.js';\n\nclass HTMLContenteditableMaskElement extends HTMLMaskElement {\n /** Returns HTMLElement selection start */\n get _unsafeSelectionStart() {\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n const anchorOffset = selection && selection.anchorOffset;\n const focusOffset = selection && selection.focusOffset;\n if (focusOffset == null || anchorOffset == null || anchorOffset < focusOffset) {\n return anchorOffset;\n }\n return focusOffset;\n }\n\n /** Returns HTMLElement selection end */\n get _unsafeSelectionEnd() {\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n const anchorOffset = selection && selection.anchorOffset;\n const focusOffset = selection && selection.focusOffset;\n if (focusOffset == null || anchorOffset == null || anchorOffset > focusOffset) {\n return anchorOffset;\n }\n return focusOffset;\n }\n\n /** Sets HTMLElement selection */\n _unsafeSelect(start, end) {\n if (!this.rootElement.createRange) return;\n const range = this.rootElement.createRange();\n range.setStart(this.input.firstChild || this.input, start);\n range.setEnd(this.input.lastChild || this.input, end);\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n\n /** HTMLElement value */\n get value() {\n return this.input.textContent || '';\n }\n set value(value) {\n this.input.textContent = value;\n }\n}\nIMask.HTMLContenteditableMaskElement = HTMLContenteditableMaskElement;\n\nexport { HTMLContenteditableMaskElement as default };\n"],"names":["_HTMLContenteditableMaskElement","HTMLMaskElement","root","selection","anchorOffset","focusOffset","start","end","range","value","__name","HTMLContenteditableMaskElement","IMask"],"mappings":";;;;;AAIA,MAAMA,IAAN,MAAMA,UAAuCC,EAAgB;AAAA;AAAA,EAE3D,IAAI,wBAAwB;AAC1B,UAAMC,IAAO,KAAK,aACZC,IAAYD,EAAK,gBAAgBA,EAAK,aAAY,GAClDE,IAAeD,KAAaA,EAAU,cACtCE,IAAcF,KAAaA,EAAU;AAC3C,WAAIE,KAAe,QAAQD,KAAgB,QAAQA,IAAeC,IACzDD,IAEFC;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,sBAAsB;AACxB,UAAMH,IAAO,KAAK,aACZC,IAAYD,EAAK,gBAAgBA,EAAK,aAAY,GAClDE,IAAeD,KAAaA,EAAU,cACtCE,IAAcF,KAAaA,EAAU;AAC3C,WAAIE,KAAe,QAAQD,KAAgB,QAAQA,IAAeC,IACzDD,IAEFC;AAAA,EACT;AAAA;AAAA,EAGA,cAAcC,GAAOC,GAAK;AACxB,QAAI,CAAC,KAAK,YAAY,YAAa;AACnC,UAAMC,IAAQ,KAAK,YAAY,YAAW;AAC1C,IAAAA,EAAM,SAAS,KAAK,MAAM,cAAc,KAAK,OAAOF,CAAK,GACzDE,EAAM,OAAO,KAAK,MAAM,aAAa,KAAK,OAAOD,CAAG;AACpD,UAAML,IAAO,KAAK,aACZC,IAAYD,EAAK,gBAAgBA,EAAK,aAAY;AACxD,IAAIC,MACFA,EAAU,gBAAe,GACzBA,EAAU,SAASK,CAAK;AAAA,EAE5B;AAAA;AAAA,EAGA,IAAI,QAAQ;AACV,WAAO,KAAK,MAAM,eAAe;AAAA,EACnC;AAAA,EACA,IAAI,MAAMC,GAAO;AACf,SAAK,MAAM,cAAcA;AAAA,EAC3B;AACF;AA9C6DC,EAAAV,GAAA;AAA7D,IAAMW,IAANX;AA+CAY,EAAM,iCAAiCD;","x_google_ignoreList":[0]}
@@ -1,36 +0,0 @@
1
- var l = Object.defineProperty;
2
- var i = (u, t) => l(u, "name", { value: t, configurable: !0 });
3
- import s from "./html-mask-element.js";
4
- import a from "../core/holder.js";
5
- import "./mask-element.js";
6
- const e = class e extends s {
7
- /** InputElement to use mask on */
8
- constructor(t) {
9
- super(t), this.input = t;
10
- }
11
- /** Returns InputElement selection start */
12
- get _unsafeSelectionStart() {
13
- return this.input.selectionStart != null ? this.input.selectionStart : this.value.length;
14
- }
15
- /** Returns InputElement selection end */
16
- get _unsafeSelectionEnd() {
17
- return this.input.selectionEnd;
18
- }
19
- /** Sets InputElement selection */
20
- _unsafeSelect(t, r) {
21
- this.input.setSelectionRange(t, r);
22
- }
23
- get value() {
24
- return this.input.value;
25
- }
26
- set value(t) {
27
- this.input.value = t;
28
- }
29
- };
30
- i(e, "HTMLInputMaskElement");
31
- let n = e;
32
- a.HTMLMaskElement = s;
33
- export {
34
- n as default
35
- };
36
- //# sourceMappingURL=html-input-mask-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html-input-mask-element.js","sources":["../../../../../../../../../../node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/html-input-mask-element.js"],"sourcesContent":["import HTMLMaskElement from './html-mask-element.js';\nimport IMask from '../core/holder.js';\nimport './mask-element.js';\n\n/** Bridge between InputElement and {@link Masked} */\nclass HTMLInputMaskElement extends HTMLMaskElement {\n /** InputElement to use mask on */\n\n constructor(input) {\n super(input);\n this.input = input;\n }\n\n /** Returns InputElement selection start */\n get _unsafeSelectionStart() {\n return this.input.selectionStart != null ? this.input.selectionStart : this.value.length;\n }\n\n /** Returns InputElement selection end */\n get _unsafeSelectionEnd() {\n return this.input.selectionEnd;\n }\n\n /** Sets InputElement selection */\n _unsafeSelect(start, end) {\n this.input.setSelectionRange(start, end);\n }\n get value() {\n return this.input.value;\n }\n set value(value) {\n this.input.value = value;\n }\n}\nIMask.HTMLMaskElement = HTMLMaskElement;\n\nexport { HTMLInputMaskElement as default };\n"],"names":["_HTMLInputMaskElement","HTMLMaskElement","input","start","end","value","__name","HTMLInputMaskElement","IMask"],"mappings":";;;;;AAKA,MAAMA,IAAN,MAAMA,UAA6BC,EAAgB;AAAA;AAAA,EAGjD,YAAYC,GAAO;AACjB,UAAMA,CAAK,GACX,KAAK,QAAQA;AAAA,EACf;AAAA;AAAA,EAGA,IAAI,wBAAwB;AAC1B,WAAO,KAAK,MAAM,kBAAkB,OAAO,KAAK,MAAM,iBAAiB,KAAK,MAAM;AAAA,EACpF;AAAA;AAAA,EAGA,IAAI,sBAAsB;AACxB,WAAO,KAAK,MAAM;AAAA,EACpB;AAAA;AAAA,EAGA,cAAcC,GAAOC,GAAK;AACxB,SAAK,MAAM,kBAAkBD,GAAOC,CAAG;AAAA,EACzC;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,KAAK,MAAM;AAAA,EACpB;AAAA,EACA,IAAI,MAAMC,GAAO;AACf,SAAK,MAAM,QAAQA;AAAA,EACrB;AACF;AA5BmDC,EAAAN,GAAA;AAAnD,IAAMO,IAANP;AA6BAQ,EAAM,kBAAkBP;","x_google_ignoreList":[0]}
@@ -1,52 +0,0 @@
1
- var d = Object.defineProperty;
2
- var o = (h, t) => d(h, "name", { value: t, configurable: !0 });
3
- import u from "./mask-element.js";
4
- import p from "../core/holder.js";
5
- const r = 90, _ = 89, i = class i extends u {
6
- /** HTMLElement to use mask on */
7
- constructor(t) {
8
- super(), this.input = t, this._onKeydown = this._onKeydown.bind(this), this._onInput = this._onInput.bind(this), this._onBeforeinput = this._onBeforeinput.bind(this), this._onCompositionEnd = this._onCompositionEnd.bind(this);
9
- }
10
- get rootElement() {
11
- var t, e, s;
12
- return (t = (e = (s = this.input).getRootNode) == null ? void 0 : e.call(s)) != null ? t : document;
13
- }
14
- /** Is element in focus */
15
- get isActive() {
16
- return this.input === this.rootElement.activeElement;
17
- }
18
- /** Binds HTMLElement events to mask internal events */
19
- bindEvents(t) {
20
- this.input.addEventListener("keydown", this._onKeydown), this.input.addEventListener("input", this._onInput), this.input.addEventListener("beforeinput", this._onBeforeinput), this.input.addEventListener("compositionend", this._onCompositionEnd), this.input.addEventListener("drop", t.drop), this.input.addEventListener("click", t.click), this.input.addEventListener("focus", t.focus), this.input.addEventListener("blur", t.commit), this._handlers = t;
21
- }
22
- _onKeydown(t) {
23
- if (this._handlers.redo && (t.keyCode === r && t.shiftKey && (t.metaKey || t.ctrlKey) || t.keyCode === _ && t.ctrlKey))
24
- return t.preventDefault(), this._handlers.redo(t);
25
- if (this._handlers.undo && t.keyCode === r && (t.metaKey || t.ctrlKey))
26
- return t.preventDefault(), this._handlers.undo(t);
27
- t.isComposing || this._handlers.selectionChange(t);
28
- }
29
- _onBeforeinput(t) {
30
- if (t.inputType === "historyUndo" && this._handlers.undo)
31
- return t.preventDefault(), this._handlers.undo(t);
32
- if (t.inputType === "historyRedo" && this._handlers.redo)
33
- return t.preventDefault(), this._handlers.redo(t);
34
- }
35
- _onCompositionEnd(t) {
36
- this._handlers.input(t);
37
- }
38
- _onInput(t) {
39
- t.isComposing || this._handlers.input(t);
40
- }
41
- /** Unbinds HTMLElement events to mask internal events */
42
- unbindEvents() {
43
- this.input.removeEventListener("keydown", this._onKeydown), this.input.removeEventListener("input", this._onInput), this.input.removeEventListener("beforeinput", this._onBeforeinput), this.input.removeEventListener("compositionend", this._onCompositionEnd), this.input.removeEventListener("drop", this._handlers.drop), this.input.removeEventListener("click", this._handlers.click), this.input.removeEventListener("focus", this._handlers.focus), this.input.removeEventListener("blur", this._handlers.commit), this._handlers = {};
44
- }
45
- };
46
- o(i, "HTMLMaskElement");
47
- let n = i;
48
- p.HTMLMaskElement = n;
49
- export {
50
- n as default
51
- };
52
- //# sourceMappingURL=html-mask-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html-mask-element.js","sources":["../../../../../../../../../../node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/html-mask-element.js"],"sourcesContent":["import MaskElement from './mask-element.js';\nimport IMask from '../core/holder.js';\n\nconst KEY_Z = 90;\nconst KEY_Y = 89;\n\n/** Bridge between HTMLElement and {@link Masked} */\nclass HTMLMaskElement extends MaskElement {\n /** HTMLElement to use mask on */\n\n constructor(input) {\n super();\n this.input = input;\n this._onKeydown = this._onKeydown.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onBeforeinput = this._onBeforeinput.bind(this);\n this._onCompositionEnd = this._onCompositionEnd.bind(this);\n }\n get rootElement() {\n var _this$input$getRootNo, _this$input$getRootNo2, _this$input;\n return (_this$input$getRootNo = (_this$input$getRootNo2 = (_this$input = this.input).getRootNode) == null ? void 0 : _this$input$getRootNo2.call(_this$input)) != null ? _this$input$getRootNo : document;\n }\n\n /** Is element in focus */\n get isActive() {\n return this.input === this.rootElement.activeElement;\n }\n\n /** Binds HTMLElement events to mask internal events */\n bindEvents(handlers) {\n this.input.addEventListener('keydown', this._onKeydown);\n this.input.addEventListener('input', this._onInput);\n this.input.addEventListener('beforeinput', this._onBeforeinput);\n this.input.addEventListener('compositionend', this._onCompositionEnd);\n this.input.addEventListener('drop', handlers.drop);\n this.input.addEventListener('click', handlers.click);\n this.input.addEventListener('focus', handlers.focus);\n this.input.addEventListener('blur', handlers.commit);\n this._handlers = handlers;\n }\n _onKeydown(e) {\n if (this._handlers.redo && (e.keyCode === KEY_Z && e.shiftKey && (e.metaKey || e.ctrlKey) || e.keyCode === KEY_Y && e.ctrlKey)) {\n e.preventDefault();\n return this._handlers.redo(e);\n }\n if (this._handlers.undo && e.keyCode === KEY_Z && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n return this._handlers.undo(e);\n }\n if (!e.isComposing) this._handlers.selectionChange(e);\n }\n _onBeforeinput(e) {\n if (e.inputType === 'historyUndo' && this._handlers.undo) {\n e.preventDefault();\n return this._handlers.undo(e);\n }\n if (e.inputType === 'historyRedo' && this._handlers.redo) {\n e.preventDefault();\n return this._handlers.redo(e);\n }\n }\n _onCompositionEnd(e) {\n this._handlers.input(e);\n }\n _onInput(e) {\n if (!e.isComposing) this._handlers.input(e);\n }\n\n /** Unbinds HTMLElement events to mask internal events */\n unbindEvents() {\n this.input.removeEventListener('keydown', this._onKeydown);\n this.input.removeEventListener('input', this._onInput);\n this.input.removeEventListener('beforeinput', this._onBeforeinput);\n this.input.removeEventListener('compositionend', this._onCompositionEnd);\n this.input.removeEventListener('drop', this._handlers.drop);\n this.input.removeEventListener('click', this._handlers.click);\n this.input.removeEventListener('focus', this._handlers.focus);\n this.input.removeEventListener('blur', this._handlers.commit);\n this._handlers = {};\n }\n}\nIMask.HTMLMaskElement = HTMLMaskElement;\n\nexport { HTMLMaskElement as default };\n"],"names":["KEY_Z","KEY_Y","_HTMLMaskElement","MaskElement","input","_this$input$getRootNo","_this$input$getRootNo2","_this$input","handlers","e","__name","HTMLMaskElement","IMask"],"mappings":";;;;AAGA,MAAMA,IAAQ,IACRC,IAAQ,IAGRC,IAAN,MAAMA,UAAwBC,EAAY;AAAA;AAAA,EAGxC,YAAYC,GAAO;AACjB,UAAK,GACL,KAAK,QAAQA,GACb,KAAK,aAAa,KAAK,WAAW,KAAK,IAAI,GAC3C,KAAK,WAAW,KAAK,SAAS,KAAK,IAAI,GACvC,KAAK,iBAAiB,KAAK,eAAe,KAAK,IAAI,GACnD,KAAK,oBAAoB,KAAK,kBAAkB,KAAK,IAAI;AAAA,EAC3D;AAAA,EACA,IAAI,cAAc;AAChB,QAAIC,GAAuBC,GAAwBC;AACnD,YAAQF,KAAyBC,KAA0BC,IAAc,KAAK,OAAO,gBAAgB,OAAO,SAASD,EAAuB,KAAKC,CAAW,MAAM,OAAOF,IAAwB;AAAA,EACnM;AAAA;AAAA,EAGA,IAAI,WAAW;AACb,WAAO,KAAK,UAAU,KAAK,YAAY;AAAA,EACzC;AAAA;AAAA,EAGA,WAAWG,GAAU;AACnB,SAAK,MAAM,iBAAiB,WAAW,KAAK,UAAU,GACtD,KAAK,MAAM,iBAAiB,SAAS,KAAK,QAAQ,GAClD,KAAK,MAAM,iBAAiB,eAAe,KAAK,cAAc,GAC9D,KAAK,MAAM,iBAAiB,kBAAkB,KAAK,iBAAiB,GACpE,KAAK,MAAM,iBAAiB,QAAQA,EAAS,IAAI,GACjD,KAAK,MAAM,iBAAiB,SAASA,EAAS,KAAK,GACnD,KAAK,MAAM,iBAAiB,SAASA,EAAS,KAAK,GACnD,KAAK,MAAM,iBAAiB,QAAQA,EAAS,MAAM,GACnD,KAAK,YAAYA;AAAA,EACnB;AAAA,EACA,WAAWC,GAAG;AACZ,QAAI,KAAK,UAAU,SAASA,EAAE,YAAYT,KAASS,EAAE,aAAaA,EAAE,WAAWA,EAAE,YAAYA,EAAE,YAAYR,KAASQ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;
2
- var h = (r, t) => n(r, "name", { value: t, configurable: !0 });
3
- const s = class s {
4
- constructor() {
5
- this.states = [], this.currentIndex = 0;
6
- }
7
- get currentState() {
8
- return this.states[this.currentIndex];
9
- }
10
- get isEmpty() {
11
- return this.states.length === 0;
12
- }
13
- push(t) {
14
- this.currentIndex < this.states.length - 1 && (this.states.length = this.currentIndex + 1), this.states.push(t), this.states.length > s.MAX_LENGTH && this.states.shift(), this.currentIndex = this.states.length - 1;
15
- }
16
- go(t) {
17
- return this.currentIndex = Math.min(Math.max(this.currentIndex + t, 0), this.states.length - 1), this.currentState;
18
- }
19
- undo() {
20
- return this.go(-1);
21
- }
22
- redo() {
23
- return this.go(1);
24
- }
25
- clear() {
26
- this.states.length = 0, this.currentIndex = 0;
27
- }
28
- };
29
- h(s, "InputHistory");
30
- let e = s;
31
- e.MAX_LENGTH = 100;
32
- export {
33
- e as default
34
- };
35
- //# sourceMappingURL=input-history.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-history.js","sources":["../../../../../../../../../../node_modules/.pnpm/imask@7.6.1/node_modules/imask/esm/controls/input-history.js"],"sourcesContent":["class InputHistory {\n constructor() {\n this.states = [];\n this.currentIndex = 0;\n }\n get currentState() {\n return this.states[this.currentIndex];\n }\n get isEmpty() {\n return this.states.length === 0;\n }\n push(state) {\n // if current index points before the last element then remove the future\n if (this.currentIndex < this.states.length - 1) this.states.length = this.currentIndex + 1;\n this.states.push(state);\n if (this.states.length > InputHistory.MAX_LENGTH) this.states.shift();\n this.currentIndex = this.states.length - 1;\n }\n go(steps) {\n this.currentIndex = Math.min(Math.max(this.currentIndex + steps, 0), this.states.length - 1);\n return this.currentState;\n }\n undo() {\n return this.go(-1);\n }\n redo() {\n return this.go(+1);\n }\n clear() {\n this.states.length = 0;\n this.currentIndex = 0;\n }\n}\nInputHistory.MAX_LENGTH = 100;\n\nexport { InputHistory as default };\n"],"names":["_InputHistory","state","steps","__name","InputHistory"],"mappings":";;AAAA,MAAMA,IAAN,MAAMA,EAAa;AAAA,EACjB,cAAc;AACZ,SAAK,SAAS,CAAA,GACd,KAAK,eAAe;AAAA,EACtB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,KAAK,OAAO,KAAK,YAAY;AAAA,EACtC;AAAA,EACA,IAAI,UAAU;AACZ,WAAO,KAAK,OAAO,WAAW;AAAA,EAChC;AAAA,EACA,KAAKC,GAAO;AAEV,IAAI,KAAK,eAAe,KAAK,OAAO,SAAS,MAAG,KAAK,OAAO,SAAS,KAAK,eAAe,IACzF,KAAK,OAAO,KAAKA,CAAK,GAClB,KAAK,OAAO,SAASD,EAAa,cAAY,KAAK,OAAO,MAAK,GACnE,KAAK,eAAe,KAAK,OAAO,SAAS;AAAA,EAC3C;AAAA,EACA,GAAGE,GAAO;AACR,gBAAK,eAAe,KAAK,IAAI,KAAK,IAAI,KAAK,eAAeA,GAAO,CAAC,GAAG,KAAK,OAAO,SAAS,CAAC,GACpF,KAAK;AAAA,EACd;AAAA,EACA,OAAO;AACL,WAAO,KAAK,GAAG,EAAE;AAAA,EACnB;AAAA,EACA,OAAO;AACL,WAAO,KAAK,GAAG,CAAE;AAAA,EACnB;AAAA,EACA,QAAQ;AACN,SAAK,OAAO,SAAS,GACrB,KAAK,eAAe;AAAA,EACtB;AACF;AAhCmBC,EAAAH,GAAA;AAAnB,IAAMI,IAANJ;AAiCAI,EAAa,aAAa;","x_google_ignoreList":[0]}