@owp/core 2.5.34 → 2.5.35

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 (108) hide show
  1. package/dist/_virtual/index3.js +2 -2
  2. package/dist/_virtual/index4.js +2 -2
  3. package/dist/components/OwpAutoLogoutDialog/OwpAutoLogoutDialog.js +68 -62
  4. package/dist/components/OwpAutoLogoutDialog/OwpAutoLogoutDialog.js.map +1 -1
  5. package/dist/components/OwpDialog/OwpAlertDialog.js +19 -18
  6. package/dist/components/OwpDialog/OwpAlertDialog.js.map +1 -1
  7. package/dist/components/OwpDialog/OwpDialog.js +34 -31
  8. package/dist/components/OwpDialog/OwpDialog.js.map +1 -1
  9. package/dist/components/OwpDialog/internal/useDialogOpenFocusCleanup.js +18 -0
  10. package/dist/components/OwpDialog/internal/useDialogOpenFocusCleanup.js.map +1 -0
  11. package/dist/components/OwpErrorBoundary/OwpErrorBoundary.js +25 -15
  12. package/dist/components/OwpErrorBoundary/OwpErrorBoundary.js.map +1 -1
  13. package/dist/components/OwpLayout/OwpLayout.js.map +1 -1
  14. package/dist/components/OwpNumberField/OwpNumberField.js +45 -24
  15. package/dist/components/OwpNumberField/OwpNumberField.js.map +1 -1
  16. package/dist/components/OwpScrollbars/OwpScrollbars.js +79 -52
  17. package/dist/components/OwpScrollbars/OwpScrollbars.js.map +1 -1
  18. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +157 -157
  19. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  20. package/dist/components/OwpTable/OwpDataTable.js +377 -342
  21. package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
  22. package/dist/components/OwpTable/OwpTable.js +20 -19
  23. package/dist/components/OwpTable/OwpTable.js.map +1 -1
  24. package/dist/components/OwpTable/internal/OwpTableBase.js +81 -78
  25. package/dist/components/OwpTable/internal/OwpTableBase.js.map +1 -1
  26. package/dist/components/OwpTable/internal/treeGridTableStyle.js +88 -31
  27. package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -1
  28. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +304 -262
  29. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  30. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +282 -277
  31. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  32. package/dist/configs/layoutConfig.js +0 -6
  33. package/dist/configs/layoutConfig.js.map +1 -1
  34. package/dist/constants/treeGrid.js +59 -46
  35. package/dist/constants/treeGrid.js.map +1 -1
  36. package/dist/constants.js +18 -18
  37. package/dist/constants.js.map +1 -1
  38. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +15 -15
  39. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
  40. package/dist/hooks/internal/useNavbar.js +4 -4
  41. package/dist/hooks/useConfirm.js +1 -1
  42. package/dist/hooks/useConfirm.js.map +1 -1
  43. package/dist/hooks/useOwpDialogs.js +19 -0
  44. package/dist/hooks/useOwpDialogs.js.map +1 -0
  45. package/dist/hooks.js +34 -32
  46. package/dist/hooks.js.map +1 -1
  47. package/dist/index.js +69 -71
  48. package/dist/index.js.map +1 -1
  49. package/dist/layout/Layout.js +23 -27
  50. package/dist/layout/Layout.js.map +1 -1
  51. package/dist/layout/components/layouts/FooterLayout.js.map +1 -1
  52. package/dist/layout/components/menus/PasswordChangeMenu.js +25 -25
  53. package/dist/layout/components/menus/PasswordChangeMenu.js.map +1 -1
  54. package/dist/layout/components/toggles/NavigationSearchToggle.js +1 -1
  55. package/dist/layout/components/toggles/NavigationSearchToggle.js.map +1 -1
  56. package/dist/layout/components/toggles/NavigationShortcutsToggle.js +1 -1
  57. package/dist/layout/components/toggles/NavigationShortcutsToggle.js.map +1 -1
  58. package/dist/layout/components/toggles/ThemePreviewToggle.js +14 -14
  59. package/dist/layout/components/toggles/ThemePreviewToggle.js.map +1 -1
  60. package/dist/node_modules/.pnpm/inko@1.1.1/node_modules/inko/index.js +1 -1
  61. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/index.js +1 -1
  62. package/dist/owp-app.css +1 -1
  63. package/dist/types/components/OwpAutoLogoutDialog/OwpAutoLogoutDialog.d.ts +5 -3
  64. package/dist/types/components/OwpDialog/OwpAlertDialog.d.ts +1 -1
  65. package/dist/types/components/OwpDialog/internal/useDialogOpenFocusCleanup.d.ts +5 -0
  66. package/dist/types/components/OwpErrorBoundary/OwpErrorBoundary.d.ts +8 -14
  67. package/dist/types/components/OwpNumberField/OwpNumberField.d.ts +18 -4
  68. package/dist/types/components/OwpScrollbars/OwpScrollbars.d.ts +28 -14
  69. package/dist/types/components/OwpTable/internal/OwpTableBase.d.ts +3 -1
  70. package/dist/types/components/OwpTable/internal/treeGridTableStyle.d.ts +61 -2
  71. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +2 -1
  72. package/dist/types/configs/layoutConfig.d.ts +0 -6
  73. package/dist/types/constants/index.d.ts +0 -1
  74. package/dist/types/constants/treeGrid.d.ts +9 -0
  75. package/dist/types/features/themePreview/dialogs/ThemePreviewDialog.d.ts +1 -1
  76. package/dist/types/hooks/index.d.ts +1 -0
  77. package/dist/types/hooks/useOwpDialogs.d.ts +5 -0
  78. package/dist/types/hooks/useOwpSettings.d.ts +0 -6
  79. package/dist/types/index.d.ts +0 -1
  80. package/dist/types/store/atoms/owpSettingsAtoms.d.ts +0 -6
  81. package/dist/types/types/OwpDialogTypes.d.ts +1 -0
  82. package/dist/types/types/OwpRouteTypes.d.ts +25 -0
  83. package/dist/types/types/index.d.ts +2 -0
  84. package/dist/types/utils/index.d.ts +0 -1
  85. package/dist/types/utils/internal/blurActiveElement.d.ts +4 -0
  86. package/dist/utils/internal/blurActiveElement.js +12 -0
  87. package/dist/utils/internal/blurActiveElement.js.map +1 -0
  88. package/dist/utils/{navigationUtils.js → internal/navigationUtils.js} +3 -3
  89. package/dist/utils/internal/navigationUtils.js.map +1 -0
  90. package/dist/utils.js +23 -25
  91. package/dist/utils.js.map +1 -1
  92. package/package.json +1 -1
  93. package/dist/components/OwpEventEmitter/OwpEventEmitter.js +0 -51
  94. package/dist/components/OwpEventEmitter/OwpEventEmitter.js.map +0 -1
  95. package/dist/layout/components/layouts/LeftSideLayout.js +0 -13
  96. package/dist/layout/components/layouts/LeftSideLayout.js.map +0 -1
  97. package/dist/node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/some.js +0 -66
  98. package/dist/node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/some.js.map +0 -1
  99. package/dist/node_modules/.pnpm/perfect-scrollbar@1.5.6/node_modules/perfect-scrollbar/css/perfect-scrollbar.css +0 -1
  100. package/dist/types/components/OwpEventEmitter/OwpEventEmitter.d.ts +0 -27
  101. package/dist/types/components/OwpEventEmitter/index.d.ts +0 -1
  102. package/dist/types/layout/components/layouts/LeftSideLayout.d.ts +0 -6
  103. package/dist/types/utils/common/OwpUtils.d.ts +0 -119
  104. package/dist/types/utils/common/index.d.ts +0 -1
  105. package/dist/utils/common/OwpUtils.js +0 -196
  106. package/dist/utils/common/OwpUtils.js.map +0 -1
  107. package/dist/utils/navigationUtils.js.map +0 -1
  108. /package/dist/types/utils/{navigationUtils.d.ts → internal/navigationUtils.d.ts} +0 -0
@@ -6,6 +6,8 @@ export declare const TREEGRID_CELL_HIGHLIGHT_COLOR = "#ffa726";
6
6
  export declare const TREEGRID_CELL_HIGHLIGHT_TEXT_COLOR = "#ffffff";
7
7
  export declare const TREEGRID_CELL_HIGHLIGHT_FONT_WEIGHT = 600;
8
8
  export declare const TREEGRID_FONT_FAMILY = "RobotoLight";
9
+ export declare const TREEGRID_TABLE_HEADER_BORDER_COLOR = "#6F7F94";
10
+ export declare const TREEGRID_TABLE_BODY_BORDER_COLOR = "#CDD8E4";
9
11
  export declare const TREEGRID_FONT_FAMILY_STACK: string;
10
12
  /** TreeGrid 자산 base path 조회 */
11
13
  export declare const getTreeGridAssetBasePath: () => string;
@@ -18,6 +20,13 @@ export declare const getTreeGridTextResourceUrl: (languageId: string) => string;
18
20
  * @param color CSS 색상 문자열
19
21
  */
20
22
  export declare const resolveTreeGridColorNumber: (color?: string | null) => number;
23
+ /**
24
+ * TreeGrid header 외곽선 색상 조회
25
+ * @param headerBackgroundColor header 배경색
26
+ * @param headerBorderColor header 기본 border 색상
27
+ * @param fallbackBorderColor 유사 색상이 아닐 때 사용할 border 색상
28
+ */
29
+ export declare const getTreeGridHeaderEdgeBorderColor: (headerBackgroundColor: string, headerBorderColor?: string, fallbackBorderColor?: string) => string;
21
30
  /** TreeGrid 폰트 face 스타일 조회 */
22
31
  export declare const getTreeGridFontFaceStyles: () => {
23
32
  '@font-face': Record<string, string>;
@@ -1,3 +1,3 @@
1
- import { type DialogComponent } from '@toolpad/core/useDialogs';
1
+ import { type DialogComponent } from '@/types/OwpDialogTypes';
2
2
  import type { ThemePreviewDialogPayload } from '../types';
3
3
  export declare const ThemePreviewDialog: DialogComponent<ThemePreviewDialogPayload, undefined>;
@@ -9,6 +9,7 @@ export * from './useFormDataUploadMutation';
9
9
  export * from './useInitApp';
10
10
  export * from './useNavigation';
11
11
  export * from './useOwpSettings';
12
+ export * from './useOwpDialogs';
12
13
  export * from './useOwpTranslation';
13
14
  export * from './usePageLockLoading';
14
15
  export * from './useStorage';
@@ -0,0 +1,5 @@
1
+ import type { DialogHook } from '@/types/OwpDialogTypes';
2
+ /**
3
+ * Dialog open 전 focus 정리 hook
4
+ */
5
+ export declare const useOwpDialogs: () => DialogHook;
@@ -34,12 +34,6 @@ export declare const useGetCurrentLayoutConfig: () => {
34
34
  display?: boolean;
35
35
  style?: string;
36
36
  };
37
- leftSidePanel?: {
38
- display?: boolean;
39
- };
40
- rightSidePanel?: {
41
- display?: boolean;
42
- };
43
37
  };
44
38
  /**
45
39
  * Main theme 조회 훅
@@ -10,7 +10,6 @@ export * from './components/OwpCommonCode';
10
10
  export * from './components/OwpExportExcelButton/OwpExportExcelButton';
11
11
  export { OwpErrorBoundary } from './components/OwpErrorBoundary';
12
12
  export * from './components/OwpErrorStatusPage';
13
- export { OwpEventEmitter } from './components/OwpEventEmitter';
14
13
  export * from './components/OwpFieldHelperText';
15
14
  export * from './components/OwpFilePickerButton/OwpFilePickerButton';
16
15
  export * from './components/OwpLayout';
@@ -46,12 +46,6 @@ export declare const currentLayoutConfigAtom: import("jotai").Atom<{
46
46
  display?: boolean;
47
47
  style?: string;
48
48
  };
49
- leftSidePanel?: {
50
- display?: boolean;
51
- };
52
- rightSidePanel?: {
53
- display?: boolean;
54
- };
55
49
  }>;
56
50
  export declare const customScrollbarsEnabledAtom: import("jotai").Atom<boolean>;
57
51
  export declare const directionAtom: import("jotai").Atom<"rtl" | "ltr">;
@@ -0,0 +1 @@
1
+ export type { AlertDialogPayload, AlertDialogProps, AlertOptions, CloseDialog, ConfirmDialogPayload, ConfirmDialogProps, ConfirmOptions, DialogComponent, DialogHook, DialogProviderProps, DialogProps, OpenAlertDialog, OpenConfirmDialog, OpenDialog, OpenDialogOptions, OpenPromptDialog, PromptDialogPayload, PromptDialogProps, PromptOptions, } from '@toolpad/core/useDialogs';
@@ -0,0 +1,25 @@
1
+ import type { OwpSettingsConfigType } from '@/types/OwpSettingsTypes';
2
+ import type { DeepPartial } from 'react-hook-form';
3
+ import type { RouteObject } from 'react-router-dom';
4
+ import type { PartialDeep } from 'type-fest';
5
+ /**
6
+ * React Router route item with OWP auth and settings metadata.
7
+ */
8
+ export type OwpRouteItemType = RouteObject & {
9
+ auth?: string[] | [] | null;
10
+ settings?: DeepPartial<OwpSettingsConfigType>;
11
+ children?: OwpRouteItemType[];
12
+ };
13
+ /**
14
+ * OWP route item list.
15
+ */
16
+ export type OwpRoutesType = OwpRouteItemType[];
17
+ /**
18
+ * Route config object consumed by OWP app routing setup.
19
+ */
20
+ export type OwpRouteConfigType = {
21
+ routes: OwpRoutesType;
22
+ settings?: PartialDeep<OwpSettingsConfigType>;
23
+ auth?: string[] | [];
24
+ path?: string;
25
+ };
@@ -1,6 +1,8 @@
1
1
  import './OwpMuiThemeTypes';
2
+ export type { AlertDialogPayload, AlertDialogProps, AlertOptions, CloseDialog, ConfirmDialogPayload, ConfirmDialogProps, ConfirmOptions, DialogComponent, DialogHook, DialogProviderProps, DialogProps, OpenAlertDialog, OpenConfirmDialog, OpenDialog, OpenDialogOptions, OpenPromptDialog, PromptDialogPayload, PromptDialogProps, PromptOptions, } from './OwpDialogTypes';
2
3
  export type { OwpGridBodyThemeConfigType, OwpGridCellThemeConfigType, OwpGridChangedThemeConfigType, OwpGridEditableThemeConfigType, OwpGridHeaderThemeConfigType, OwpGridRowThemeConfigType, OwpGridStateThemeConfigType, OwpGridThemeConfigType, } from './OwpGridThemeTypes';
3
4
  export type { OwpTableCellThemeConfigType, OwpTableHeaderThemeConfigType, OwpTableThemeConfigType, OwpTableVariantThemeConfigType, } from './OwpTableThemeTypes';
4
5
  export type { OwpSnackbarThemeConfigType, OwpSnackbarVariantThemeConfigType, OwpSnackbarVariantType, OwpThemeType, OwpThemesType, OwpSettingsConfigType, } from './OwpSettingsTypes';
5
6
  export type { OwpFlatNavItemType, OwpNavBadgeType, OwpNavPermission, OwpNavItemType, OwpPermissionFlag, } from './OwpNavigationTypes';
7
+ export type { OwpRouteConfigType, OwpRouteItemType, OwpRoutesType } from './OwpRouteTypes';
6
8
  export type { AnyFormFieldType, ThemeFormConfigTypes } from './ThemeFormConfigTypes';
@@ -1,6 +1,5 @@
1
1
  export * from './barcodeUtil';
2
2
  export * from './commonCodeUtils';
3
- export * from './common';
4
3
  export * from './createDateRangeSearchParams';
5
4
  export * from './createFormDataBody';
6
5
  export * from './createJsonBody';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 현재 focus 요소 blur 처리
3
+ */
4
+ export declare const blurActiveElement: () => void;
@@ -0,0 +1,12 @@
1
+ var d = Object.defineProperty;
2
+ var t = (e, n) => d(e, "name", { value: n, configurable: !0 });
3
+ const u = /* @__PURE__ */ t(() => {
4
+ if (typeof window > "u" || typeof document > "u")
5
+ return;
6
+ const { activeElement: e, body: n, documentElement: o } = document;
7
+ e === n || e === o || !(e instanceof window.HTMLElement) || e.blur();
8
+ }, "blurActiveElement");
9
+ export {
10
+ u as blurActiveElement
11
+ };
12
+ //# sourceMappingURL=blurActiveElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blurActiveElement.js","sources":["../../../src/utils/internal/blurActiveElement.ts"],"sourcesContent":["/**\n * 현재 focus 요소 blur 처리\n */\nexport const blurActiveElement = () => {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n return;\n }\n\n const { activeElement, body, documentElement } = document;\n\n if (\n activeElement === body ||\n activeElement === documentElement ||\n !(activeElement instanceof window.HTMLElement)\n ) {\n return;\n }\n\n activeElement.blur();\n};\n"],"names":["blurActiveElement","__name","activeElement","body","documentElement"],"mappings":";;AAGO,MAAMA,IAAoB,gBAAAC,EAAA,MAAM;AACrC,MAAI,OAAO,SAAW,OAAe,OAAO,WAAa;AACvD;AAGF,QAAM,EAAE,eAAAC,GAAe,MAAAC,GAAM,iBAAAC,EAAA,IAAoB;AAEjD,EACEF,MAAkBC,KAClBD,MAAkBE,KAClB,EAAEF,aAAyB,OAAO,gBAKpCA,EAAc,KAAA;AAChB,GAhBiC;"}
@@ -1,8 +1,8 @@
1
1
  var f = Object.defineProperty;
2
2
  var h = (c, i) => f(c, "name", { value: i, configurable: !0 });
3
- import { merge as p } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/merge.js";
4
- import { defaults as o } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/defaults.js";
5
- import { uniqueId as m } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/util/uniqueId.js";
3
+ import { merge as p } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/merge.js";
4
+ import { defaults as o } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/defaults.js";
5
+ import { uniqueId as m } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/util/uniqueId.js";
6
6
  function N(c) {
7
7
  return o(c || {}, {
8
8
  id: m(),
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigationUtils.js","sources":["../../../src/utils/internal/navigationUtils.ts"],"sourcesContent":["import type {\n OwpFlatNavItemType,\n OwpNavItemType,\n OwpNavPermission,\n} from '@/types/OwpNavigationTypes';\nimport { merge } from 'es-toolkit/compat';\nimport { defaults, uniqueId } from 'es-toolkit/compat';\nimport type { Pathname } from 'history';\nimport type { PartialDeep } from 'type-fest';\n\ntype OwpNavItemModelInput = PartialDeep<Omit<OwpNavItemType, 'permission'>> & {\n permission?: OwpNavPermission;\n};\n\n/**\n * Navigation item model factory\n */\nexport function OwpNavItemModel(data?: OwpNavItemModelInput): OwpNavItemType {\n return defaults(data || {}, {\n id: uniqueId(),\n title: '',\n translate: '',\n auth: null,\n subtitle: '',\n icon: '',\n iconClass: '',\n url: '',\n target: '',\n type: 'item',\n sx: {},\n disabled: false,\n active: false,\n exact: false,\n end: false,\n badge: null,\n children: [],\n });\n}\n\n/**\n * Navigation child URL matcher\n */\nexport function isUrlInChildren(parent: OwpNavItemType, url: Pathname) {\n if (!parent.children) {\n return false;\n }\n\n for (let i = 0; i < parent.children.length; i += 1) {\n const child = parent.children[i];\n\n if (child.children && isUrlInChildren(child, url)) {\n return true;\n }\n\n if (child.url && (child.url === url || url.includes(child.url))) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Navigation structure helper\n */\nexport class OwpNavigationHelper {\n static selectById(nav: OwpNavItemType[], id: string): OwpNavItemType | undefined {\n for (let i = 0; i < nav.length; i += 1) {\n const item = nav[i];\n\n if (item.id === id) {\n return item;\n }\n\n if (item.children) {\n const childItem = this.selectById(item.children, id);\n\n if (childItem) {\n return childItem;\n }\n }\n }\n\n return undefined;\n }\n\n static appendNavItem(\n nav: OwpNavItemType[],\n item: OwpNavItemType,\n parentId: string | null = null,\n ): OwpNavItemType[] {\n if (!parentId) {\n return [...nav, item];\n }\n\n return nav.map((node) => {\n if (node.id === parentId) {\n const newNode = { ...node };\n newNode.children = [...(node.children || []), item];\n return newNode;\n }\n\n if (node.children) {\n return { ...node, children: this.appendNavItem(node.children, item, parentId) };\n }\n\n return { ...node };\n });\n }\n\n static prependNavItem(\n nav: OwpNavItemType[],\n item: OwpNavItemType,\n parentId: string | null = null,\n ): OwpNavItemType[] {\n if (!parentId) {\n return [item, ...nav];\n }\n\n return nav.map((node) => {\n if (node.id === parentId) {\n const newNode = { ...node };\n newNode.children = [item, ...(node.children || [])];\n return newNode;\n }\n\n if (node.children) {\n return { ...node, children: this.prependNavItem(node.children, item, parentId) };\n }\n\n return { ...node };\n });\n }\n\n static filterNavigationByPermission(\n nav: OwpNavItemType[],\n // @ts-expect-error legacy user role contract\n userRole: User['role'],\n ): OwpNavItemType[] {\n return nav.reduce((acc: OwpNavItemType[], item) => {\n const children = item.children\n ? this.filterNavigationByPermission(item.children, userRole)\n : [];\n\n if (this.hasPermission(item.auth, userRole) || children.length) {\n const newItem = { ...item };\n newItem.children = children.length ? children : undefined;\n acc.push(newItem);\n }\n\n return acc;\n }, []);\n }\n\n /**\n * Navigation item removal\n */\n static removeNavItem(nav: OwpNavItemType[], id: string): OwpNavItemType[] {\n return nav.reduce((acc, node) => {\n if (node.id !== id) {\n if (node.children) {\n acc.push({\n ...node,\n children: this.removeNavItem(node.children, id),\n });\n } else {\n acc.push(node);\n }\n }\n\n return acc;\n }, [] as OwpNavItemType[]);\n }\n\n /**\n * Navigation item update\n */\n static updateNavItem(\n nav: OwpNavItemType[],\n id: string,\n item: PartialDeep<OwpNavItemType>,\n ): OwpNavItemType[] {\n return nav.map((node) => {\n if (node.id === id) {\n return merge({}, node, item);\n }\n\n if (node.children) {\n return {\n ...node,\n children: this.updateNavItem(node.children, id, item),\n };\n }\n\n return node;\n });\n }\n\n /**\n * Flat navigation list extraction\n */\n static getFlatNavigation(navigationItems: OwpNavItemType[] = [], flatNavigation = []) {\n for (let i = 0; i < navigationItems.length; i += 1) {\n const navItem = navigationItems[i];\n\n if (navItem.type === 'item') {\n flatNavigation.push(OwpNavItemModel(navItem));\n }\n\n if ((navItem.type === 'collapse' || navItem.type === 'group') && navItem.children) {\n this.getFlatNavigation(navItem.children, flatNavigation);\n }\n }\n\n return flatNavigation as OwpNavItemType[] | [];\n }\n\n // @ts-expect-error legacy user role contract\n static hasPermission(authArr: string[] | string | undefined, userRole: User['role']): boolean {\n if (authArr === null || authArr === undefined) {\n return true;\n }\n\n if (authArr.length === 0) {\n return !userRole || userRole.length === 0;\n }\n\n if (userRole && Array.isArray(authArr) && Array.isArray(userRole)) {\n return authArr.some((role) => userRole.indexOf(role) >= 0);\n }\n\n return authArr.includes(userRole as string);\n }\n\n static flattenNavigation(\n navigation: OwpNavItemType[],\n parentOrder: string = '',\n ): OwpFlatNavItemType[] {\n return navigation.flatMap((item, index) => {\n const order = parentOrder ? `${parentOrder}.${index + 1}` : `${index + 1}`;\n let flattened: OwpFlatNavItemType[] = [\n { ...item, order, children: item.children?.map((child) => child.id) },\n ];\n\n if (item.children) {\n flattened = flattened.concat(this.flattenNavigation(item.children, order));\n }\n\n return flattened;\n });\n }\n\n static unflattenNavigation(navigation: OwpFlatNavItemType[]): OwpNavItemType[] {\n const itemMap: { [id: string]: OwpNavItemType } = {};\n\n navigation.forEach((item) => {\n itemMap[item.id] = { ...item, children: [] };\n });\n\n const rootItems: OwpNavItemType[] = [];\n\n navigation.forEach((item) => {\n if (item.order.includes('.')) {\n const parentOrder = item.order.substring(0, item.order.lastIndexOf('.'));\n const parent = navigation.find((navItem) => navItem.order === parentOrder);\n\n if (parent) {\n itemMap[parent.id].children!.push(itemMap[item.id]);\n }\n } else {\n rootItems.push(itemMap[item.id]);\n }\n });\n\n return rootItems.map((item) => ({ ...item }));\n }\n}\n"],"names":["OwpNavItemModel","data","defaults","uniqueId","__name","_OwpNavigationHelper","nav","id","i","item","childItem","parentId","node","newNode","userRole","acc","children","newItem","merge","navigationItems","flatNavigation","navItem","authArr","role","navigation","parentOrder","index","order","flattened","_a","child","itemMap","rootItems","parent","OwpNavigationHelper"],"mappings":"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"}
package/dist/utils.js CHANGED
@@ -3,14 +3,14 @@ import { buildTreeGridEnumAttributesByCommonCodeList as d, transformCommonCodeBa
3
3
  import { createDateRangeSearchParams as m } from "./utils/createDateRangeSearchParams.js";
4
4
  import { createFormDataBody as s, normalizeFormDataUploadParams as n } from "./utils/createFormDataBody.js";
5
5
  import { createJsonBody as E } from "./utils/createJsonBody.js";
6
- import { createJsonString as x } from "./utils/createJsonString.js";
6
+ import { createJsonString as G } from "./utils/createJsonString.js";
7
7
  import { exportExcelByBuffer as C, getIndexByLetters as f, getLettersByIndex as I, setCellValue as L, setMergeCells as y } from "./utils/excelUtil.js";
8
8
  import { fetchFile as u } from "./utils/fetchFile.js";
9
9
  import { formatDateToYmd as _, getTodayYmd as A } from "./utils/formatDateToYmd.js";
10
10
  import { formatNumber as h } from "./utils/formatNumber.js";
11
11
  import { getDisplayValue as F } from "./utils/getDisplayValue.js";
12
- import { getEstimatedTextCellWidth as O } from "./utils/getEstimatedTextCellWidth.js";
13
- import { getFormDefaultValues as w } from "./utils/getFormDefaultValues.js";
12
+ import { getEstimatedTextCellWidth as N } from "./utils/getEstimatedTextCellWidth.js";
13
+ import { getFormDefaultValues as U } from "./utils/getFormDefaultValues.js";
14
14
  import { getStartPagePath as H } from "./utils/getStartPagePath.js";
15
15
  import { getTrimmedValue as P } from "./utils/getTrimmedValue.js";
16
16
  import { isEnterKeyEvent as v } from "./utils/isEnterKeyEvent.js";
@@ -21,23 +21,21 @@ import { rebuildValue as K } from "./utils/rebuildValue.js";
21
21
  import { sanitizePasswordValue as j, sanitizeUserIdValue as X } from "./utils/sanitizeAuthInputValue.js";
22
22
  import { exportTreeGridExcel as ee } from "./utils/treeGridExportExcelUtil.js";
23
23
  import { isTreeGridCheckedValue as oe, toTreeGridBoolValue as te, toTreeGridYnValue as de } from "./utils/treeGridYnUtils.js";
24
- import { addTreeGridRowById as ae, appendTreeGridAddedRowHighlightColumn as le, clearTreeGridCellHighlightById as me, exportTreeGridToExcelById as Te, getTreeGridAddedRowBaselineValue as se, getTreeGridAddedRowHighlightColumns as ne, getTreeGridById as pe, getTreeGridCellComparableValue as Ee, getTreeGridDataRowsById as ge, getTreeGridRowChangesById as xe, getTreeGridSelectedRowsById as Ge, highlightTreeGridCellById as Ce, isTreeGridRowAddedById as fe, normalizeTreeGridExternalRows as Ie, reloadTreeGridBodyById as Le, removeTreeGridAddedRowHighlightColumn as ye, resetTreeGridChangesById as Be, resetTreeGridChangesByIds as ue, resetTreeGridSelectionById as Re, resetTreeGridSelectionsByIds as _e, setTreeGridColumnEnumOptionsById as Ae, setTreeGridColumnVisibilityById as De, validateTreeGridRequiredCellsById as he } from "./utils/treeGridUtil.js";
25
- import { readZipEntryJson as Fe, readZipEntryText as Ve, saveAsZipFile as Oe } from "./utils/zipUtil.js";
26
- import { OwpUtils as we } from "./utils/common/OwpUtils.js";
27
- import { DEFAULT_CELL_ALIGNMENT as He, DEFAULT_HEADER_FILL as Se, DEFAULT_HEADER_FONT as Pe, DEFAULT_THIN_BORDER as be, DEFAULT_VALUE_FONT as ve, DEFAULT_WRAP_CELL_ALIGNMENT as ze } from "./constants/excel.js";
28
- import { TREEGRID_CELL_CHANGED_CLASS as Me, TREEGRID_CELL_HIGHLIGHT_COLOR as We, TREEGRID_INPUT_CELL_COLOR as Ye, TREEGRID_WARNING_CELL_COLOR as Ze } from "./constants/treeGrid.js";
24
+ import { addTreeGridRowById as ae, appendTreeGridAddedRowHighlightColumn as le, clearTreeGridCellHighlightById as me, exportTreeGridToExcelById as Te, getTreeGridAddedRowBaselineValue as se, getTreeGridAddedRowHighlightColumns as ne, getTreeGridById as pe, getTreeGridCellComparableValue as Ee, getTreeGridDataRowsById as ge, getTreeGridRowChangesById as Ge, getTreeGridSelectedRowsById as xe, highlightTreeGridCellById as Ce, isTreeGridRowAddedById as fe, normalizeTreeGridExternalRows as Ie, reloadTreeGridBodyById as Le, removeTreeGridAddedRowHighlightColumn as ye, resetTreeGridChangesById as Be, resetTreeGridChangesByIds as ue, resetTreeGridSelectionById as Re, resetTreeGridSelectionsByIds as _e, setTreeGridColumnEnumOptionsById as Ae, setTreeGridColumnVisibilityById as De, validateTreeGridRequiredCellsById as he } from "./utils/treeGridUtil.js";
25
+ import { readZipEntryJson as Fe, readZipEntryText as Ve, saveAsZipFile as Ne } from "./utils/zipUtil.js";
26
+ import { DEFAULT_CELL_ALIGNMENT as Ue, DEFAULT_HEADER_FILL as we, DEFAULT_HEADER_FONT as He, DEFAULT_THIN_BORDER as Se, DEFAULT_VALUE_FONT as Pe, DEFAULT_WRAP_CELL_ALIGNMENT as be } from "./constants/excel.js";
27
+ import { TREEGRID_CELL_CHANGED_CLASS as ze, TREEGRID_CELL_HIGHLIGHT_COLOR as Je, TREEGRID_INPUT_CELL_COLOR as Me, TREEGRID_WARNING_CELL_COLOR as We } from "./constants/treeGrid.js";
29
28
  export {
30
- He as DEFAULT_CELL_ALIGNMENT,
31
- Se as DEFAULT_HEADER_FILL,
32
- Pe as DEFAULT_HEADER_FONT,
33
- be as DEFAULT_THIN_BORDER,
34
- ve as DEFAULT_VALUE_FONT,
35
- ze as DEFAULT_WRAP_CELL_ALIGNMENT,
36
- we as OwpUtils,
37
- Me as TREEGRID_CELL_CHANGED_CLASS,
38
- We as TREEGRID_CELL_HIGHLIGHT_COLOR,
39
- Ye as TREEGRID_INPUT_CELL_COLOR,
40
- Ze as TREEGRID_WARNING_CELL_COLOR,
29
+ Ue as DEFAULT_CELL_ALIGNMENT,
30
+ we as DEFAULT_HEADER_FILL,
31
+ He as DEFAULT_HEADER_FONT,
32
+ Se as DEFAULT_THIN_BORDER,
33
+ Pe as DEFAULT_VALUE_FONT,
34
+ be as DEFAULT_WRAP_CELL_ALIGNMENT,
35
+ ze as TREEGRID_CELL_CHANGED_CLASS,
36
+ Je as TREEGRID_CELL_HIGHLIGHT_COLOR,
37
+ Me as TREEGRID_INPUT_CELL_COLOR,
38
+ We as TREEGRID_WARNING_CELL_COLOR,
41
39
  ae as addTreeGridRowById,
42
40
  le as appendTreeGridAddedRowHighlightColumn,
43
41
  d as buildTreeGridEnumAttributesByCommonCodeList,
@@ -45,7 +43,7 @@ export {
45
43
  m as createDateRangeSearchParams,
46
44
  s as createFormDataBody,
47
45
  E as createJsonBody,
48
- x as createJsonString,
46
+ G as createJsonString,
49
47
  C as exportExcelByBuffer,
50
48
  ee as exportTreeGridExcel,
51
49
  Te as exportTreeGridToExcelById,
@@ -56,8 +54,8 @@ export {
56
54
  k as generateQrCodeUrl,
57
55
  J as getApiLanguageCode,
58
56
  F as getDisplayValue,
59
- O as getEstimatedTextCellWidth,
60
- w as getFormDefaultValues,
57
+ N as getEstimatedTextCellWidth,
58
+ U as getFormDefaultValues,
61
59
  M as getI18nextLanguageCode,
62
60
  f as getIndexByLetters,
63
61
  I as getLettersByIndex,
@@ -68,8 +66,8 @@ export {
68
66
  pe as getTreeGridById,
69
67
  Ee as getTreeGridCellComparableValue,
70
68
  ge as getTreeGridDataRowsById,
71
- xe as getTreeGridRowChangesById,
72
- Ge as getTreeGridSelectedRowsById,
69
+ Ge as getTreeGridRowChangesById,
70
+ xe as getTreeGridSelectedRowsById,
73
71
  P as getTrimmedValue,
74
72
  Ce as highlightTreeGridCellById,
75
73
  v as isEnterKeyEvent,
@@ -89,7 +87,7 @@ export {
89
87
  _e as resetTreeGridSelectionsByIds,
90
88
  j as sanitizePasswordValue,
91
89
  X as sanitizeUserIdValue,
92
- Oe as saveAsZipFile,
90
+ Ne as saveAsZipFile,
93
91
  L as setCellValue,
94
92
  y as setMergeCells,
95
93
  Ae as setTreeGridColumnEnumOptionsById,
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@owp/core",
3
3
  "private": false,
4
- "version": "2.5.34",
4
+ "version": "2.5.35",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -1,51 +0,0 @@
1
- var o = Object.defineProperty;
2
- var a = (s, e, t) => e in s ? o(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var n = (s, e) => o(s, "name", { value: e, configurable: !0 });
4
- var r = (s, e, t) => a(s, typeof e != "symbol" ? e + "" : e, t);
5
- const h = class h {
6
- constructor() {
7
- r(this, "events");
8
- this.events = {};
9
- }
10
- /**
11
- * Event listener set lookup
12
- */
13
- _getEventListByName(e) {
14
- return typeof this.events[e] > "u" && (this.events[e] = /* @__PURE__ */ new Set()), this.events[e];
15
- }
16
- /**
17
- * Event subscription
18
- */
19
- on(e, t) {
20
- this._getEventListByName(e).add(t);
21
- }
22
- /**
23
- * One-time event subscription
24
- */
25
- once(e, t) {
26
- const i = /* @__PURE__ */ n((...y) => {
27
- this.removeListener(e, i), t.apply(this, y);
28
- }, "onceFn");
29
- this.on(e, i);
30
- }
31
- /**
32
- * Event emission
33
- */
34
- emit(e, ...t) {
35
- this._getEventListByName(e).forEach((i) => {
36
- i.apply(this, t);
37
- });
38
- }
39
- /**
40
- * Event unsubscription
41
- */
42
- removeListener(e, t) {
43
- this._getEventListByName(e).delete(t);
44
- }
45
- };
46
- n(h, "OwpEventEmitter");
47
- let c = h;
48
- export {
49
- c as OwpEventEmitter
50
- };
51
- //# sourceMappingURL=OwpEventEmitter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OwpEventEmitter.js","sources":["../../../src/components/OwpEventEmitter/OwpEventEmitter.ts"],"sourcesContent":["/**\n * Owp event emitter implementation\n */\nexport class OwpEventEmitter {\n private events: { [eventName: string]: Set<(...args: unknown[]) => void> };\n\n constructor() {\n this.events = {};\n }\n\n /**\n * Event listener set lookup\n */\n private _getEventListByName<T extends unknown[]>(eventName: string): Set<(...args: T) => void> {\n if (typeof this.events[eventName] === 'undefined') {\n this.events[eventName] = new Set();\n }\n\n return this.events[eventName];\n }\n\n /**\n * Event subscription\n */\n on<T extends unknown[]>(eventName: string, fn: (...args: T) => void): void {\n this._getEventListByName<T>(eventName).add(fn);\n }\n\n /**\n * One-time event subscription\n */\n once(eventName: string, fn: (...args: unknown[]) => void): void {\n const onceFn = (...args: unknown[]) => {\n this.removeListener(eventName, onceFn);\n fn.apply(this, args);\n };\n this.on(eventName, onceFn);\n }\n\n /**\n * Event emission\n */\n emit(eventName: string, ...args: unknown[]): void {\n this._getEventListByName(eventName).forEach((fn) => {\n fn.apply(this, args);\n });\n }\n\n /**\n * Event unsubscription\n */\n removeListener(eventName: string, fn: (...args: unknown[]) => void): void {\n this._getEventListByName(eventName).delete(fn);\n }\n}\n"],"names":["_OwpEventEmitter","__publicField","eventName","fn","onceFn","__name","args","OwpEventEmitter"],"mappings":";;;;AAGO,MAAMA,IAAN,MAAMA,EAAgB;AAAA,EAG3B,cAAc;AAFN,IAAAC,EAAA;AAGN,SAAK,SAAS,CAAA;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA,EAKQ,oBAAyCC,GAA8C;AAC7F,WAAI,OAAO,KAAK,OAAOA,CAAS,IAAM,QACpC,KAAK,OAAOA,CAAS,IAAI,oBAAI,IAAA,IAGxB,KAAK,OAAOA,CAAS;AAAA,EAC9B;AAAA;AAAA;AAAA;AAAA,EAKA,GAAwBA,GAAmBC,GAAgC;AACzE,SAAK,oBAAuBD,CAAS,EAAE,IAAIC,CAAE;AAAA,EAC/C;AAAA;AAAA;AAAA;AAAA,EAKA,KAAKD,GAAmBC,GAAwC;AAC9D,UAAMC,IAAS,gBAAAC,EAAA,IAAIC,MAAoB;AACrC,WAAK,eAAeJ,GAAWE,CAAM,GACrCD,EAAG,MAAM,MAAMG,CAAI;AAAA,IACrB,GAHe;AAIf,SAAK,GAAGJ,GAAWE,CAAM;AAAA,EAC3B;AAAA;AAAA;AAAA;AAAA,EAKA,KAAKF,MAAsBI,GAAuB;AAChD,SAAK,oBAAoBJ,CAAS,EAAE,QAAQ,CAACC,MAAO;AAClD,MAAAA,EAAG,MAAM,MAAMG,CAAI;AAAA,IACrB,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA,EAKA,eAAeJ,GAAmBC,GAAwC;AACxE,SAAK,oBAAoBD,CAAS,EAAE,OAAOC,CAAE;AAAA,EAC/C;AACF;AAnD6BE,EAAAL,GAAA;AAAtB,IAAMO,IAANP;"}
@@ -1,13 +0,0 @@
1
- var r = Object.defineProperty;
2
- var t = (o, e) => r(o, "name", { value: e, configurable: !0 });
3
- import { jsx 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 { memo as i } from "react";
5
- function m() {
6
- return /* @__PURE__ */ f("div", {});
7
- }
8
- t(m, "LeftSideLayout");
9
- const n = i(m);
10
- export {
11
- n as default
12
- };
13
- //# sourceMappingURL=LeftSideLayout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LeftSideLayout.js","sources":["../../../../src/layout/components/layouts/LeftSideLayout.tsx"],"sourcesContent":["import { memo } from 'react';\n\n/**\n * The left side layout.\n */\nfunction LeftSideLayout() {\n return <div />;\n}\n\nexport default memo(LeftSideLayout);\n"],"names":["LeftSideLayout","__name","LeftSideLayout$1","memo"],"mappings":";;;;AAKA,SAASA,IAAiB;AACxB,2BAAQ,OAAA,EAAI;AACd;AAFSC,EAAAD,GAAA;AAIT,MAAAE,IAAeC,EAAKH,CAAc;"}
@@ -1,66 +0,0 @@
1
- var s = Object.defineProperty;
2
- var a = (r, n) => s(r, "name", { value: n, configurable: !0 });
3
- import { identity as y } from "../../function/identity.js";
4
- import { property as m } from "../object/property.js";
5
- import { matches as o } from "../predicate/matches.js";
6
- import { matchesProperty as A } from "../predicate/matchesProperty.js";
7
- function j(r, n, h) {
8
- if (!r)
9
- return !1;
10
- n || (n = y);
11
- const l = Array.isArray(r) ? r : Object.values(r);
12
- switch (typeof n) {
13
- case "function": {
14
- if (!Array.isArray(r)) {
15
- const t = Object.keys(r);
16
- for (let f = 0; f < t.length; f++) {
17
- const e = t[f], i = r[e];
18
- if (n(i, e, r))
19
- return !0;
20
- }
21
- return !1;
22
- }
23
- for (let t = 0; t < r.length; t++)
24
- if (n(r[t], t, r))
25
- return !0;
26
- return !1;
27
- }
28
- case "object":
29
- if (Array.isArray(n) && n.length === 2) {
30
- const t = n[0], f = n[1], e = A(t, f);
31
- if (Array.isArray(r)) {
32
- for (let i = 0; i < r.length; i++)
33
- if (e(r[i]))
34
- return !0;
35
- return !1;
36
- }
37
- return l.some(e);
38
- } else {
39
- const t = o(n);
40
- if (Array.isArray(r)) {
41
- for (let f = 0; f < r.length; f++)
42
- if (t(r[f]))
43
- return !0;
44
- return !1;
45
- }
46
- return l.some(t);
47
- }
48
- case "number":
49
- case "symbol":
50
- case "string": {
51
- const t = m(n);
52
- if (Array.isArray(r)) {
53
- for (let f = 0; f < r.length; f++)
54
- if (t(r[f]))
55
- return !0;
56
- return !1;
57
- }
58
- return l.some(t);
59
- }
60
- }
61
- }
62
- a(j, "some");
63
- export {
64
- j as some
65
- };
66
- //# sourceMappingURL=some.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"some.js","sources":["../../../../../../../../../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/some.mjs"],"sourcesContent":["import { identity } from '../../function/identity.mjs';\nimport { property } from '../object/property.mjs';\nimport { matches } from '../predicate/matches.mjs';\nimport { matchesProperty } from '../predicate/matchesProperty.mjs';\n\nfunction some(source, predicate, guard) {\n if (!source) {\n return false;\n }\n if (guard != null) {\n predicate = undefined;\n }\n if (!predicate) {\n predicate = identity;\n }\n const values = Array.isArray(source) ? source : Object.values(source);\n switch (typeof predicate) {\n case 'function': {\n if (!Array.isArray(source)) {\n const keys = Object.keys(source);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = source[key];\n if (predicate(value, key, source)) {\n return true;\n }\n }\n return false;\n }\n for (let i = 0; i < source.length; i++) {\n if (predicate(source[i], i, source)) {\n return true;\n }\n }\n return false;\n }\n case 'object': {\n if (Array.isArray(predicate) && predicate.length === 2) {\n const key = predicate[0];\n const value = predicate[1];\n const matchFunc = matchesProperty(key, value);\n if (Array.isArray(source)) {\n for (let i = 0; i < source.length; i++) {\n if (matchFunc(source[i])) {\n return true;\n }\n }\n return false;\n }\n return values.some(matchFunc);\n }\n else {\n const matchFunc = matches(predicate);\n if (Array.isArray(source)) {\n for (let i = 0; i < source.length; i++) {\n if (matchFunc(source[i])) {\n return true;\n }\n }\n return false;\n }\n return values.some(matchFunc);\n }\n }\n case 'number':\n case 'symbol':\n case 'string': {\n const propFunc = property(predicate);\n if (Array.isArray(source)) {\n for (let i = 0; i < source.length; i++) {\n if (propFunc(source[i])) {\n return true;\n }\n }\n return false;\n }\n return values.some(propFunc);\n }\n }\n}\n\nexport { some };\n"],"names":["some","source","predicate","guard","identity","values","keys","i","key","value","matchFunc","matchesProperty","matches","propFunc","property","__name"],"mappings":";;;;;;AAKA,SAASA,EAAKC,GAAQC,GAAWC,GAAO;AACpC,MAAI,CAACF;AACD,WAAO;AAKX,EAAKC,MACDA,IAAYE;AAEhB,QAAMC,IAAS,MAAM,QAAQJ,CAAM,IAAIA,IAAS,OAAO,OAAOA,CAAM;AACpE,UAAQ,OAAOC,GAAS;AAAA,IACpB,KAAK,YAAY;AACb,UAAI,CAAC,MAAM,QAAQD,CAAM,GAAG;AACxB,cAAMK,IAAO,OAAO,KAAKL,CAAM;AAC/B,iBAASM,IAAI,GAAGA,IAAID,EAAK,QAAQC,KAAK;AAClC,gBAAMC,IAAMF,EAAKC,CAAC,GACZE,IAAQR,EAAOO,CAAG;AACxB,cAAIN,EAAUO,GAAOD,GAAKP,CAAM;AAC5B,mBAAO;AAAA,QAEf;AACA,eAAO;AAAA,MACX;AACA,eAASM,IAAI,GAAGA,IAAIN,EAAO,QAAQM;AAC/B,YAAIL,EAAUD,EAAOM,CAAC,GAAGA,GAAGN,CAAM;AAC9B,iBAAO;AAGf,aAAO;AAAA,IACX;AAAA,IACA,KAAK;AACD,UAAI,MAAM,QAAQC,CAAS,KAAKA,EAAU,WAAW,GAAG;AACpD,cAAMM,IAAMN,EAAU,CAAC,GACjBO,IAAQP,EAAU,CAAC,GACnBQ,IAAYC,EAAgBH,GAAKC,CAAK;AAC5C,YAAI,MAAM,QAAQR,CAAM,GAAG;AACvB,mBAAS,IAAI,GAAG,IAAIA,EAAO,QAAQ;AAC/B,gBAAIS,EAAUT,EAAO,CAAC,CAAC;AACnB,qBAAO;AAGf,iBAAO;AAAA,QACX;AACA,eAAOI,EAAO,KAAKK,CAAS;AAAA,MAChC,OACK;AACD,cAAMA,IAAYE,EAAQV,CAAS;AACnC,YAAI,MAAM,QAAQD,CAAM,GAAG;AACvB,mBAASM,IAAI,GAAGA,IAAIN,EAAO,QAAQM;AAC/B,gBAAIG,EAAUT,EAAOM,CAAC,CAAC;AACnB,qBAAO;AAGf,iBAAO;AAAA,QACX;AACA,eAAOF,EAAO,KAAKK,CAAS;AAAA,MAChC;AAAA,IAEJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK,UAAU;AACX,YAAMG,IAAWC,EAASZ,CAAS;AACnC,UAAI,MAAM,QAAQD,CAAM,GAAG;AACvB,iBAASM,IAAI,GAAGA,IAAIN,EAAO,QAAQM;AAC/B,cAAIM,EAASZ,EAAOM,CAAC,CAAC;AAClB,mBAAO;AAGf,eAAO;AAAA,MACX;AACA,aAAOF,EAAO,KAAKQ,CAAQ;AAAA,IAC/B;AAAA,EACR;AACA;AA1ESE,EAAAf,GAAA;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- .ps{overflow:hidden!important;overflow-anchor:none;-ms-overflow-style:none;touch-action:auto;-ms-touch-action:auto}.ps__rail-x{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;height:15px;bottom:0;position:absolute}.ps__rail-y{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;width:15px;right:0;position:absolute}.ps--active-x>.ps__rail-x,.ps--active-y>.ps__rail-y{display:block;background-color:transparent}.ps:hover>.ps__rail-x,.ps:hover>.ps__rail-y,.ps--focus>.ps__rail-x,.ps--focus>.ps__rail-y,.ps--scrolling-x>.ps__rail-x,.ps--scrolling-y>.ps__rail-y{opacity:.6}.ps .ps__rail-x:hover,.ps .ps__rail-y:hover,.ps .ps__rail-x:focus,.ps .ps__rail-y:focus,.ps .ps__rail-x.ps--clicking,.ps .ps__rail-y.ps--clicking{background-color:#eee;opacity:.9}.ps__thumb-x{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,height .2s ease-in-out;-webkit-transition:background-color .2s linear,height .2s ease-in-out;height:6px;bottom:2px;position:absolute}.ps__thumb-y{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,width .2s ease-in-out;-webkit-transition:background-color .2s linear,width .2s ease-in-out;width:6px;right:2px;position:absolute}.ps__rail-x:hover>.ps__thumb-x,.ps__rail-x:focus>.ps__thumb-x,.ps__rail-x.ps--clicking .ps__thumb-x{background-color:#999;height:11px}.ps__rail-y:hover>.ps__thumb-y,.ps__rail-y:focus>.ps__thumb-y,.ps__rail-y.ps--clicking .ps__thumb-y{background-color:#999;width:11px}@supports (-ms-overflow-style: none){.ps{overflow:auto!important}}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){.ps{overflow:auto!important}}
@@ -1,27 +0,0 @@
1
- /**
2
- * Owp event emitter implementation
3
- */
4
- export declare class OwpEventEmitter {
5
- private events;
6
- constructor();
7
- /**
8
- * Event listener set lookup
9
- */
10
- private _getEventListByName;
11
- /**
12
- * Event subscription
13
- */
14
- on<T extends unknown[]>(eventName: string, fn: (...args: T) => void): void;
15
- /**
16
- * One-time event subscription
17
- */
18
- once(eventName: string, fn: (...args: unknown[]) => void): void;
19
- /**
20
- * Event emission
21
- */
22
- emit(eventName: string, ...args: unknown[]): void;
23
- /**
24
- * Event unsubscription
25
- */
26
- removeListener(eventName: string, fn: (...args: unknown[]) => void): void;
27
- }
@@ -1 +0,0 @@
1
- export { OwpEventEmitter } from './OwpEventEmitter';
@@ -1,6 +0,0 @@
1
- /**
2
- * The left side layout.
3
- */
4
- declare function LeftSideLayout(): import("react/jsx-runtime").JSX.Element;
5
- declare const _default: import("react").MemoExoticComponent<typeof LeftSideLayout>;
6
- export default _default;
@@ -1,119 +0,0 @@
1
- import { OwpEventEmitter } from '@/components/OwpEventEmitter';
2
- import type { OwpSettingsConfigType } from '@/types/OwpSettingsTypes';
3
- import { DeepPartial } from 'react-hook-form';
4
- import { RouteObject } from 'react-router-dom';
5
- import { PartialDeep } from 'type-fest';
6
- type TreeNode = {
7
- id: string;
8
- children?: TreeNode[];
9
- };
10
- /**
11
- * The OwpRouteItemType type is a custom type that extends the RouteObject type from react-router-dom.
12
- * It adds an optional auth property and an optional settings property.
13
- */
14
- export type OwpRouteItemType = RouteObject & {
15
- auth?: string[] | [] | null;
16
- settings?: DeepPartial<OwpSettingsConfigType>;
17
- children?: OwpRouteItemType[];
18
- };
19
- /**
20
- * The OwpRoutesType type is a custom type that is an array of OwpRouteItemType objects.
21
- */
22
- export type OwpRoutesType = OwpRouteItemType[];
23
- /**
24
- * The OwpRouteConfigType type is a custom type that defines the configuration for a set of routes.
25
- * It includes an optional routes property, an optional settings property, and an optional auth property.
26
- */
27
- export type OwpRouteConfigType = {
28
- routes: OwpRoutesType;
29
- settings?: PartialDeep<OwpSettingsConfigType>;
30
- auth?: string[] | [];
31
- path?: string;
32
- };
33
- /**
34
- * The OwpRouteConfigsType type is a custom type that is an array of OwpRouteConfigType objects.
35
- */
36
- export type OwpRouteConfigsType = OwpRouteConfigType[] | [];
37
- /**
38
- * The hueTypes type is a custom type that defines the possible values for a hue.
39
- */
40
- type hueTypes = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | 'A100' | 'A200' | 'A400' | 'A700';
41
- /**
42
- * The OwpUtils class provides utility functions for the Owp project.
43
- */
44
- export declare class OwpUtils {
45
- /**
46
- * The filterArrayByString function filters an array of objects by a search string.
47
- * It takes in an array of objects and a search string as parameters and returns a filtered array of objects.
48
- *
49
- */
50
- static filterArrayByString<T>(mainArr: T[], searchText: string): T[];
51
- static filterArrayByString2<T>(mainArr: T[], searchText: string): T[];
52
- /**
53
- * The searchInObj function searches an object for a given search string.
54
- * It takes in an object and a search string as parameters and returns a boolean indicating whether the search string was found in the object.
55
- *
56
- */
57
- static searchInObj(itemObj: unknown, searchText: string): boolean;
58
- /**
59
- * The searchInArray function searches an array for a given search string.
60
- * It takes in an array and a search string as parameters and returns a boolean indicating whether the search string was found in the array.
61
- *
62
- */
63
- static searchInArray(arr: unknown[], searchText: string): boolean;
64
- /**
65
- * The searchInString function searches a string for a given search string.
66
- * It takes in a string and a search string as parameters and returns a boolean indicating whether the search string was found in the string.
67
- *
68
- */
69
- static searchInString(value: string, searchText: string): boolean;
70
- /**
71
- * The generateGUID function generates a globally unique identifier.
72
- * It returns a string representing the GUID.
73
- *
74
- */
75
- static generateGUID(): string;
76
- /**
77
- * The toggleInArray function toggles an item in an array.
78
- */
79
- static toggleInArray(item: unknown, array: unknown[]): void;
80
- /**
81
- * The handleize function converts a string to a handle.
82
- */
83
- static handleize(text: string): string;
84
- /**
85
- * The setRoutes function sets the routes for the Owp project.
86
- */
87
- static setRoutes(config: OwpRouteConfigType, defaultAuth?: OwpSettingsConfigType['defaultAuth']): OwpRouteItemType[];
88
- /**
89
- * The generateRoutesFromConfigs function generates routes from a set of route configurations.
90
- * It takes in an array of route configurations as a parameter and returns an array of routes.
91
- *
92
- */
93
- static generateRoutesFromConfigs(configs: OwpRouteConfigsType, defaultAuth: OwpSettingsConfigType['defaultAuth']): OwpRouteItemType[];
94
- /**
95
- * The findById function finds an object by its id.
96
- */
97
- static findById(tree: TreeNode[], idToFind: string): TreeNode | undefined;
98
- /**
99
- * The randomMatColor function generates a random material color.
100
- */
101
- static randomMatColor(hue?: hueTypes): string;
102
- /**
103
- * The findNavItemById function finds a navigation item by its id.
104
- */
105
- static difference(object: Record<string, unknown>, base: Record<string, unknown>): Record<string, unknown>;
106
- /**
107
- * OwpEventEmitter class reference
108
- */
109
- static EventEmitter: typeof OwpEventEmitter;
110
- /**
111
- * The hasPermission function checks if a user has permission to access a resource.
112
- */
113
- static hasPermission(authArr: string[] | string | undefined, userRole: User['role']): boolean;
114
- /**
115
- * The filterArrayByString function filters an array of objects by a search string.
116
- */
117
- static filterRecursive(data: [] | null, predicate: (arg0: unknown) => boolean): unknown[];
118
- }
119
- export {};