@owp/core 2.5.34 → 2.5.36

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 (88) 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/OwpTreeGrid/internal/treeGridTheme.js +298 -248
  21. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  22. package/dist/configs/layoutConfig.js +0 -6
  23. package/dist/configs/layoutConfig.js.map +1 -1
  24. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +15 -15
  25. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
  26. package/dist/hooks/internal/useNavbar.js +4 -4
  27. package/dist/hooks/useConfirm.js +1 -1
  28. package/dist/hooks/useConfirm.js.map +1 -1
  29. package/dist/hooks/useOwpDialogs.js +19 -0
  30. package/dist/hooks/useOwpDialogs.js.map +1 -0
  31. package/dist/hooks.js +34 -32
  32. package/dist/hooks.js.map +1 -1
  33. package/dist/index.js +69 -71
  34. package/dist/index.js.map +1 -1
  35. package/dist/layout/Layout.js +23 -27
  36. package/dist/layout/Layout.js.map +1 -1
  37. package/dist/layout/components/layouts/FooterLayout.js.map +1 -1
  38. package/dist/layout/components/menus/PasswordChangeMenu.js +25 -25
  39. package/dist/layout/components/menus/PasswordChangeMenu.js.map +1 -1
  40. package/dist/layout/components/toggles/NavigationSearchToggle.js +1 -1
  41. package/dist/layout/components/toggles/NavigationSearchToggle.js.map +1 -1
  42. package/dist/layout/components/toggles/NavigationShortcutsToggle.js +1 -1
  43. package/dist/layout/components/toggles/NavigationShortcutsToggle.js.map +1 -1
  44. package/dist/layout/components/toggles/ThemePreviewToggle.js +14 -14
  45. package/dist/layout/components/toggles/ThemePreviewToggle.js.map +1 -1
  46. package/dist/node_modules/.pnpm/inko@1.1.1/node_modules/inko/index.js +1 -1
  47. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/index.js +1 -1
  48. package/dist/types/components/OwpAutoLogoutDialog/OwpAutoLogoutDialog.d.ts +5 -3
  49. package/dist/types/components/OwpDialog/OwpAlertDialog.d.ts +1 -1
  50. package/dist/types/components/OwpDialog/internal/useDialogOpenFocusCleanup.d.ts +5 -0
  51. package/dist/types/components/OwpErrorBoundary/OwpErrorBoundary.d.ts +8 -14
  52. package/dist/types/components/OwpNumberField/OwpNumberField.d.ts +18 -4
  53. package/dist/types/components/OwpScrollbars/OwpScrollbars.d.ts +28 -14
  54. package/dist/types/configs/layoutConfig.d.ts +0 -6
  55. package/dist/types/features/themePreview/dialogs/ThemePreviewDialog.d.ts +1 -1
  56. package/dist/types/hooks/index.d.ts +1 -0
  57. package/dist/types/hooks/useOwpDialogs.d.ts +5 -0
  58. package/dist/types/hooks/useOwpSettings.d.ts +0 -6
  59. package/dist/types/index.d.ts +0 -1
  60. package/dist/types/store/atoms/owpSettingsAtoms.d.ts +0 -6
  61. package/dist/types/types/OwpDialogTypes.d.ts +1 -0
  62. package/dist/types/types/OwpRouteTypes.d.ts +25 -0
  63. package/dist/types/types/index.d.ts +2 -0
  64. package/dist/types/utils/index.d.ts +0 -1
  65. package/dist/types/utils/internal/blurActiveElement.d.ts +4 -0
  66. package/dist/utils/internal/blurActiveElement.js +12 -0
  67. package/dist/utils/internal/blurActiveElement.js.map +1 -0
  68. package/dist/utils/{navigationUtils.js → internal/navigationUtils.js} +3 -3
  69. package/dist/utils/internal/navigationUtils.js.map +1 -0
  70. package/dist/utils.js +23 -25
  71. package/dist/utils.js.map +1 -1
  72. package/package.json +1 -1
  73. package/dist/components/OwpEventEmitter/OwpEventEmitter.js +0 -51
  74. package/dist/components/OwpEventEmitter/OwpEventEmitter.js.map +0 -1
  75. package/dist/layout/components/layouts/LeftSideLayout.js +0 -13
  76. package/dist/layout/components/layouts/LeftSideLayout.js.map +0 -1
  77. package/dist/node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/some.js +0 -66
  78. package/dist/node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/some.js.map +0 -1
  79. package/dist/node_modules/.pnpm/perfect-scrollbar@1.5.6/node_modules/perfect-scrollbar/css/perfect-scrollbar.css +0 -1
  80. package/dist/types/components/OwpEventEmitter/OwpEventEmitter.d.ts +0 -27
  81. package/dist/types/components/OwpEventEmitter/index.d.ts +0 -1
  82. package/dist/types/layout/components/layouts/LeftSideLayout.d.ts +0 -6
  83. package/dist/types/utils/common/OwpUtils.d.ts +0 -119
  84. package/dist/types/utils/common/index.d.ts +0 -1
  85. package/dist/utils/common/OwpUtils.js +0 -196
  86. package/dist/utils/common/OwpUtils.js.map +0 -1
  87. package/dist/utils/navigationUtils.js.map +0 -1
  88. /package/dist/types/utils/{navigationUtils.d.ts → internal/navigationUtils.d.ts} +0 -0
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.36",
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 {};
@@ -1 +0,0 @@
1
- export * from './OwpUtils';
@@ -1,196 +0,0 @@
1
- var d = Object.defineProperty;
2
- var I = (f, t, n) => t in f ? d(f, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : f[t] = n;
3
- var u = (f, t) => d(f, "name", { value: t, configurable: !0 });
4
- var a = (f, t, n) => I(f, typeof t != "symbol" ? t + "" : t, n);
5
- import * as h from "@mui/material/colors";
6
- import { find as C } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/find.js";
7
- import { some as S } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/some.js";
8
- import { OwpEventEmitter as E } from "../../components/OwpEventEmitter/OwpEventEmitter.js";
9
- import { merge as O } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/merge.js";
10
- import { isEqual as B } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
11
- import { isObject as g } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isObject.js";
12
- const c = class c {
13
- /**
14
- * The filterArrayByString function filters an array of objects by a search string.
15
- * It takes in an array of objects and a search string as parameters and returns a filtered array of objects.
16
- *
17
- */
18
- static filterArrayByString(t, n) {
19
- if (!n || (n == null ? void 0 : n.length) === 0 || !n)
20
- return t;
21
- n = n == null ? void 0 : n.toLowerCase();
22
- const r = t.filter((e) => this.searchInObj(e, n));
23
- return r.length === t.length ? t : r;
24
- }
25
- static filterArrayByString2(t, n) {
26
- return typeof n != "string" || n === "" ? t : (n = n == null ? void 0 : n.toLowerCase(), t.filter((r) => this.searchInObj(r, n)));
27
- }
28
- /**
29
- * The searchInObj function searches an object for a given search string.
30
- * 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.
31
- *
32
- */
33
- static searchInObj(t, n) {
34
- if (!e(t))
35
- return !1;
36
- const r = Object.keys(t);
37
- function e(i) {
38
- return !!(i && typeof i == "object" && !Array.isArray(i) && typeof i != "function");
39
- }
40
- u(e, "isRecord");
41
- for (let i = 0; i < r.length; i += 1) {
42
- const s = r[i], o = t[s];
43
- if (typeof o == "string") {
44
- if (this.searchInString(o, n))
45
- return !0;
46
- } else if (Array.isArray(o) && this.searchInArray(o, n))
47
- return !0;
48
- if (typeof o == "object" && this.searchInObj(o, n))
49
- return !0;
50
- }
51
- return !1;
52
- }
53
- /**
54
- * The searchInArray function searches an array for a given search string.
55
- * 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.
56
- *
57
- */
58
- static searchInArray(t, n) {
59
- return t.forEach((r) => !!(typeof r == "string" && this.searchInString(r, n) || r && typeof r == "object" && this.searchInObj(r, n))), !1;
60
- }
61
- /**
62
- * The searchInString function searches a string for a given search string.
63
- * 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.
64
- *
65
- */
66
- static searchInString(t, n) {
67
- return t.toLowerCase().includes(n);
68
- }
69
- /**
70
- * The generateGUID function generates a globally unique identifier.
71
- * It returns a string representing the GUID.
72
- *
73
- */
74
- static generateGUID() {
75
- function t() {
76
- return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
77
- }
78
- return u(t, "S4"), t() + t();
79
- }
80
- /**
81
- * The toggleInArray function toggles an item in an array.
82
- */
83
- static toggleInArray(t, n) {
84
- n.indexOf(t) === -1 ? n.push(t) : n.splice(n.indexOf(t), 1);
85
- }
86
- /**
87
- * The handleize function converts a string to a handle.
88
- */
89
- static handleize(t) {
90
- return t.toString().toLowerCase().replace(/\s+/g, "-").replace(/\W+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
91
- }
92
- /**
93
- * The setRoutes function sets the routes for the Owp project.
94
- */
95
- static setRoutes(t, n = void 0) {
96
- let r = [];
97
- t != null && t.routes && (r = [...t.routes]);
98
- const e = /* @__PURE__ */ u((i, s) => {
99
- const o = i.auth || i.auth === null ? i.auth : s, l = O({}, t.settings, i.settings), p = {
100
- ...i,
101
- settings: l,
102
- auth: o
103
- };
104
- return i.children && (p.children = i.children.map((m) => e(m, o))), p;
105
- }, "applyAuth");
106
- return r = r.map((i) => {
107
- const s = t.auth || t.auth === null ? t.auth : n || null;
108
- return e(i, s);
109
- }), [...r];
110
- }
111
- /**
112
- * The generateRoutesFromConfigs function generates routes from a set of route configurations.
113
- * It takes in an array of route configurations as a parameter and returns an array of routes.
114
- *
115
- */
116
- static generateRoutesFromConfigs(t, n) {
117
- let r = [];
118
- return t.forEach((e) => {
119
- r = [...r, ...this.setRoutes(e, n)];
120
- }), r;
121
- }
122
- /**
123
- * The findById function finds an object by its id.
124
- */
125
- static findById(t, n) {
126
- const r = C(t, { id: n });
127
- if (r)
128
- return r;
129
- let e;
130
- return S(t, (i) => i.children ? (e = this.findById(i.children, n), e) : !1), e;
131
- }
132
- /**
133
- * The randomMatColor function generates a random material color.
134
- */
135
- static randomMatColor(t = "400") {
136
- var e;
137
- const n = [
138
- "red",
139
- "pink",
140
- "purple",
141
- "deepPurple",
142
- "indigo",
143
- "blue",
144
- "lightBlue",
145
- "cyan",
146
- "teal",
147
- "green",
148
- "lightGreen",
149
- "lime",
150
- "yellow",
151
- "amber",
152
- "orange",
153
- "deepOrange"
154
- ], r = n[Math.floor(Math.random() * n.length)];
155
- return (e = h[r]) == null ? void 0 : e[t];
156
- }
157
- /**
158
- * The findNavItemById function finds a navigation item by its id.
159
- */
160
- static difference(t, n) {
161
- function r(e, i) {
162
- return e == null ? void 0 : e.reduce((s, o, l) => (B(o, i[l]) || (s[l] = g(o) && g(i[l]) ? r(o, i[l]) : o), s), {});
163
- }
164
- return u(r, "changes"), r(t, n);
165
- }
166
- /**
167
- * The hasPermission function checks if a user has permission to access a resource.
168
- */
169
- // @ts-expect-error
170
- static hasPermission(t, n) {
171
- var r;
172
- return t == null ? !0 : Array.isArray(t) && (t == null ? void 0 : t.length) === 0 ? !n || n.length === 0 : n && Array.isArray(t) && Array.isArray(n) ? t.some((e) => n.indexOf(e) >= 0) : typeof n == "string" && Array.isArray(t) ? (r = t == null ? void 0 : t.includes) == null ? void 0 : r.call(t, n) : !1;
173
- }
174
- /**
175
- * The filterArrayByString function filters an array of objects by a search string.
176
- */
177
- static filterRecursive(t, n) {
178
- return t ? t.reduce((r, e) => {
179
- let i = null;
180
- if (n(e) && (i = { ...e }), e.children != null) {
181
- const s = this.filterRecursive(e.children, n);
182
- s && (s == null ? void 0 : s.length) > 0 && (i = { ...e, children: s });
183
- }
184
- return i && r.push(i), r;
185
- }, []) : null;
186
- }
187
- };
188
- u(c, "OwpUtils"), /**
189
- * OwpEventEmitter class reference
190
- */
191
- a(c, "EventEmitter", E);
192
- let y = c;
193
- export {
194
- y as OwpUtils
195
- };
196
- //# sourceMappingURL=OwpUtils.js.map