@owp/core 1.30.0 → 2.0.0

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 (238) hide show
  1. package/colors/chart.d.ts +3 -0
  2. package/colors/chart.js +1 -0
  3. package/contexts.d.ts +3 -0
  4. package/contexts.js +1 -0
  5. package/dist/{Close-DnXyQZKh.js → Close-C91nHTKM.js} +280 -282
  6. package/dist/Close-C91nHTKM.js.map +1 -0
  7. package/dist/{OwpStoreProvider-Bx5p7ooQ.js → OwpStoreProvider-BPa_lWCz.js} +3 -3
  8. package/dist/OwpStoreProvider-BPa_lWCz.js.map +1 -0
  9. package/dist/OwpUtils-DV2LSByd.js +411 -0
  10. package/dist/OwpUtils-DV2LSByd.js.map +1 -0
  11. package/dist/colorMap-DP-DCZbV.js +82 -0
  12. package/dist/colorMap-DP-DCZbV.js.map +1 -0
  13. package/dist/colors/chart.js +6 -0
  14. package/dist/colors/chart.js.map +1 -0
  15. package/dist/colors.js +4 -1
  16. package/dist/colors.js.map +1 -1
  17. package/dist/commonCodeUtils-DNfSjP6S.js +42 -0
  18. package/dist/commonCodeUtils-DNfSjP6S.js.map +1 -0
  19. package/dist/contexts.js +104 -0
  20. package/dist/contexts.js.map +1 -0
  21. package/dist/{owpDark-DAY0F6Ph.js → dark-DAY0F6Ph.js} +1 -1
  22. package/dist/dark-DAY0F6Ph.js.map +1 -0
  23. package/dist/emotion-react-jsx-runtime.browser.esm-BMvSswBW.js +1496 -0
  24. package/dist/emotion-react-jsx-runtime.browser.esm-BMvSswBW.js.map +1 -0
  25. package/dist/hooks.js +119 -73
  26. package/dist/hooks.js.map +1 -1
  27. package/dist/index.css +1 -1
  28. package/dist/index.js +44321 -96
  29. package/dist/index.js.map +1 -1
  30. package/dist/isString-Codtu20I.js +55 -0
  31. package/dist/isString-Codtu20I.js.map +1 -0
  32. package/dist/isTypedArray-CCnDZ5HJ.js +609 -0
  33. package/dist/isTypedArray-CCnDZ5HJ.js.map +1 -0
  34. package/dist/language-DaxFvPOq.js +35 -0
  35. package/dist/language-DaxFvPOq.js.map +1 -0
  36. package/dist/lazyLoadedSlices-C18y0AEB.js +2773 -0
  37. package/dist/lazyLoadedSlices-C18y0AEB.js.map +1 -0
  38. package/dist/owp-app.css +1 -1
  39. package/dist/store.js +2 -2
  40. package/dist/{toUpper-i_I6Tyuv.js → toUpper-Dmh8Htx_.js} +2 -2
  41. package/dist/{toUpper-i_I6Tyuv.js.map → toUpper-Dmh8Htx_.js.map} +1 -1
  42. package/dist/{treeGridUtil-WTM_djsN.js → treeGridUtil-DAfaAk6C.js} +19 -19
  43. package/dist/{treeGridUtil-WTM_djsN.js.map → treeGridUtil-DAfaAk6C.js.map} +1 -1
  44. package/dist/types/colors/chart/colorMap.d.ts +8 -0
  45. package/dist/types/colors/chart/index.d.ts +1 -0
  46. package/dist/types/colors/index.d.ts +2 -2
  47. package/dist/types/colors/palettes/index.d.ts +2 -0
  48. package/dist/types/components/OwpErrorBoundary/OwpErrorBoundary.d.ts +1 -1
  49. package/dist/types/components/OwpFileUploadButton/OwpFileUploadButton.d.ts +2 -2
  50. package/dist/types/components/OwpHidden/OwpHidden.d.ts +19 -0
  51. package/dist/types/components/OwpHidden/index.d.ts +2 -0
  52. package/dist/types/components/OwpLayout/OwpLayout.d.ts +2 -2
  53. package/dist/types/components/OwpPageCarded/OwpPageCarded.d.ts +2 -2
  54. package/dist/types/components/OwpPageCarded/OwpPageCardedSidebar.d.ts +1 -1
  55. package/dist/types/components/OwpPicker/DatePickerInput.d.ts +1 -1
  56. package/dist/types/components/OwpStyleProvider/OwpStyleProvider.d.ts +5 -5
  57. package/dist/types/components/OwpTable/OwpTable.d.ts +1 -3
  58. package/dist/types/components/OwpTabs/OwpTab.d.ts +2 -4
  59. package/dist/types/components/OwpTabs/OwpTabs.d.ts +2 -4
  60. package/dist/types/{default-settings/OwpDefaultSettings.d.ts → configs/defaultConfig.d.ts} +1 -1
  61. package/dist/types/{components/layouts/layout2/Layout2Config.d.ts → configs/layoutConfig.d.ts} +12 -15
  62. package/dist/types/{context → contexts}/OwpAppProvider.d.ts +10 -3
  63. package/dist/types/hooks/index.d.ts +4 -2
  64. package/dist/types/{store/hooks.d.ts → hooks/useAppStore.d.ts} +1 -1
  65. package/dist/types/hooks/useCurrentLanguage.d.ts +1 -5
  66. package/dist/types/hooks/useInitApp.d.ts +8 -0
  67. package/dist/types/hooks/useInitCommonCodes.d.ts +4 -0
  68. package/dist/types/hooks/useLogoSrc.d.ts +8 -0
  69. package/dist/types/hooks/useNavigation.d.ts +3 -18
  70. package/dist/types/hooks/useOwpTranslation.d.ts +0 -2
  71. package/dist/types/hooks/useThemeMediaQuery.d.ts +1 -1
  72. package/dist/types/index.d.ts +3 -29
  73. package/dist/types/{components/layouts/layout3/Layout3.d.ts → layout/Layout.d.ts} +4 -4
  74. package/dist/types/layout/components/layouts/FooterLayout.d.ts +9 -0
  75. package/dist/types/layout/components/layouts/LeftSideLayout.d.ts +6 -0
  76. package/dist/types/layout/components/layouts/NavbarToggleFabLayout.d.ts +8 -0
  77. package/dist/types/layout/components/layouts/NavbarWrapperLayout.d.ts +5 -0
  78. package/dist/types/layout/components/menus/LogoutMenu.d.ts +8 -0
  79. package/dist/types/layout/components/menus/PasswordChangeMenu.d.ts +8 -0
  80. package/dist/types/{components/layouts/shared-components → layout/components/menus}/UserMenu.d.ts +1 -1
  81. package/dist/types/{components/layouts/shared-components → layout/components}/navbar/NavbarPinToggleButton.d.ts +1 -1
  82. package/dist/types/layout/components/navbar/NavbarToggleButton.d.ts +11 -0
  83. package/dist/types/layout/components/navbar/style/NavbarStyle.d.ts +5 -0
  84. package/dist/types/layout/components/navbar/style/NavbarStyleContent.d.ts +9 -0
  85. package/dist/types/layout/components/navigation/NavBadge.d.ts +17 -0
  86. package/dist/types/layout/components/navigation/NavItem.d.ts +14 -0
  87. package/dist/types/layout/components/navigation/Navigation.d.ts +3 -0
  88. package/dist/types/layout/components/navigation/NavigationMenu.d.ts +23 -0
  89. package/dist/types/layout/components/navigation/vertical/NavVerticalLayout.d.ts +9 -0
  90. package/dist/types/layout/components/navigation/vertical/types/NavVerticalCollapse.d.ts +6 -0
  91. package/dist/types/layout/components/navigation/vertical/types/NavVerticalGroup.d.ts +6 -0
  92. package/dist/types/layout/components/navigation/vertical/types/NavVerticalItem.d.ts +6 -0
  93. package/dist/types/layout/components/navigation/vertical/types/NavVerticalLink.d.ts +7 -0
  94. package/dist/types/layout/components/toggles/FullScreenToggle.d.ts +8 -0
  95. package/dist/types/layout/components/toggles/LanguageSwitcherToggle.d.ts +9 -0
  96. package/dist/types/layout/components/toggles/NavigationSearchToggle.d.ts +16 -0
  97. package/dist/types/layout/components/toggles/NavigationShortcutsToggle.d.ts +9 -0
  98. package/dist/types/layout/components/toggles/toggleStyles.d.ts +10 -0
  99. package/dist/types/{components/layouts/layout3/components/FooterLayout3.d.ts → layout/components/toolbar/ToolbarLayout.d.ts} +4 -4
  100. package/dist/types/{components/layouts → layout}/themeLayoutConfigs.d.ts +2 -4
  101. package/dist/types/store/index.d.ts +1 -1
  102. package/dist/types/store/lazyLoadedSlices.d.ts +2 -2
  103. package/dist/types/{components/layouts/shared-components/navigation/store → store}/navigationSlice.d.ts +10 -10
  104. package/dist/types/store/owpSettingsSlice.d.ts +18 -1356
  105. package/dist/types/{components/OwpNavigation/types/OwpNavItemType.d.ts → types/OwpNavigationTypes.d.ts} +14 -4
  106. package/dist/types/types/OwpSettingsTypes.d.ts +2 -2
  107. package/dist/types/types/index.d.ts +3 -0
  108. package/dist/types/utils/getEstimatedTextCellWidth.d.ts +12 -0
  109. package/dist/types/utils/index.d.ts +2 -0
  110. package/dist/types/utils/language.d.ts +8 -0
  111. package/dist/types/{components/OwpNavigation/utils/OwpNavigationHelper.d.ts → utils/navigationUtils.d.ts} +17 -5
  112. package/dist/types.js +2 -0
  113. package/dist/types.js.map +1 -0
  114. package/dist/{usePageLockLoading-BUI_3PlR.js → usePageLockLoading-BGODEt_k.js} +5 -5
  115. package/dist/usePageLockLoading-BGODEt_k.js.map +1 -0
  116. package/dist/useShortcuts-BjtlXprQ.js +236 -0
  117. package/dist/useShortcuts-BjtlXprQ.js.map +1 -0
  118. package/dist/useTreeGridExcelExport-BE6h1hsO.js +120 -0
  119. package/dist/useTreeGridExcelExport-BE6h1hsO.js.map +1 -0
  120. package/dist/utils.js +6911 -6671
  121. package/dist/utils.js.map +1 -1
  122. package/owp-app.css +1 -0
  123. package/package.json +51 -47
  124. package/types.d.ts +3 -0
  125. package/types.js +1 -0
  126. package/context.d.ts +0 -3
  127. package/context.js +0 -1
  128. package/dist/Close-DnXyQZKh.js.map +0 -1
  129. package/dist/OwpStoreProvider-Bx5p7ooQ.js.map +0 -1
  130. package/dist/OwpUtils-C81bM1Gz.js +0 -611
  131. package/dist/OwpUtils-C81bM1Gz.js.map +0 -1
  132. package/dist/QuickPanel-CO7Tyc8C.js +0 -104
  133. package/dist/QuickPanel-CO7Tyc8C.js.map +0 -1
  134. package/dist/context.js +0 -101
  135. package/dist/context.js.map +0 -1
  136. package/dist/emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js +0 -1751
  137. package/dist/emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js.map +0 -1
  138. package/dist/index-KlA5Es4t.js +0 -46971
  139. package/dist/index-KlA5Es4t.js.map +0 -1
  140. package/dist/isTypedArray-DPyC49cI.js +0 -411
  141. package/dist/isTypedArray-DPyC49cI.js.map +0 -1
  142. package/dist/lazyLoadedSlices-DC7yg4GT.js +0 -2832
  143. package/dist/lazyLoadedSlices-DC7yg4GT.js.map +0 -1
  144. package/dist/owpDark-DAY0F6Ph.js.map +0 -1
  145. package/dist/types/components/OwpCommonDialog/OwpCommonDialog.d.ts +0 -1
  146. package/dist/types/components/OwpCommonDialog/index.d.ts +0 -1
  147. package/dist/types/components/OwpNavigation/OwpNavBadge.d.ts +0 -17
  148. package/dist/types/components/OwpNavigation/OwpNavItem.d.ts +0 -14
  149. package/dist/types/components/OwpNavigation/OwpNavigation.d.ts +0 -23
  150. package/dist/types/components/OwpNavigation/horizontal/OwpNavHorizontalLayout1.d.ts +0 -7
  151. package/dist/types/components/OwpNavigation/horizontal/types/OwpNavHorizontalCollapse.d.ts +0 -15
  152. package/dist/types/components/OwpNavigation/horizontal/types/OwpNavHorizontalGroup.d.ts +0 -13
  153. package/dist/types/components/OwpNavigation/horizontal/types/OwpNavHorizontalItem.d.ts +0 -11
  154. package/dist/types/components/OwpNavigation/horizontal/types/OwpNavHorizontalLink.d.ts +0 -8
  155. package/dist/types/components/OwpNavigation/index.d.ts +0 -1
  156. package/dist/types/components/OwpNavigation/isUrlInChildren.d.ts +0 -7
  157. package/dist/types/components/OwpNavigation/models/OwpNavItemModel.d.ts +0 -8
  158. package/dist/types/components/OwpNavigation/types/OwpNavBadgeType.d.ts +0 -9
  159. package/dist/types/components/OwpNavigation/utils/components.d.ts +0 -4
  160. package/dist/types/components/OwpNavigation/utils/registerComponent.d.ts +0 -4
  161. package/dist/types/components/OwpNavigation/vertical/OwpNavVerticalLayout1.d.ts +0 -9
  162. package/dist/types/components/OwpNavigation/vertical/OwpNavVerticalLayout2.d.ts +0 -7
  163. package/dist/types/components/OwpNavigation/vertical/types/OwpNavVerticalCollapse.d.ts +0 -7
  164. package/dist/types/components/OwpNavigation/vertical/types/OwpNavVerticalGroup.d.ts +0 -7
  165. package/dist/types/components/OwpNavigation/vertical/types/OwpNavVerticalItem.d.ts +0 -7
  166. package/dist/types/components/OwpNavigation/vertical/types/OwpNavVerticalLink.d.ts +0 -8
  167. package/dist/types/components/OwpNavigation/vertical/types/OwpNavVerticalTab.d.ts +0 -11
  168. package/dist/types/components/OwpSearch/OwpSearch.d.ts +0 -23
  169. package/dist/types/components/OwpSearch/index.d.ts +0 -1
  170. package/dist/types/components/OwpShortcuts/OwpShortcuts.d.ts +0 -19
  171. package/dist/types/components/OwpShortcuts/index.d.ts +0 -1
  172. package/dist/types/components/OwpSidePanel/OwpSidePanel.d.ts +0 -18
  173. package/dist/types/components/OwpSidePanel/index.d.ts +0 -1
  174. package/dist/types/components/OwpTheme/OwpTheme.d.ts +0 -18
  175. package/dist/types/components/OwpTheme/index.d.ts +0 -1
  176. package/dist/types/components/OwpThemeSelector/OwpThemeSelector.d.ts +0 -16
  177. package/dist/types/components/OwpThemeSelector/SchemePreview.d.ts +0 -14
  178. package/dist/types/components/OwpThemeSelector/ThemePreview.d.ts +0 -17
  179. package/dist/types/components/OwpThemeSelector/index.d.ts +0 -1
  180. package/dist/types/components/layouts/layout1/Layout1.d.ts +0 -10
  181. package/dist/types/components/layouts/layout1/Layout1Config.d.ts +0 -114
  182. package/dist/types/components/layouts/layout1/components/FooterLayout1.d.ts +0 -9
  183. package/dist/types/components/layouts/layout1/components/LeftSideLayout1.d.ts +0 -6
  184. package/dist/types/components/layouts/layout1/components/NavbarToggleFabLayout1.d.ts +0 -8
  185. package/dist/types/components/layouts/layout1/components/NavbarWrapperLayout1.d.ts +0 -5
  186. package/dist/types/components/layouts/layout1/components/ToolbarLayout1.d.ts +0 -9
  187. package/dist/types/components/layouts/layout1/components/navbar/style-1/NavbarStyle1.d.ts +0 -5
  188. package/dist/types/components/layouts/layout1/components/navbar/style-1/NavbarStyle1Content.d.ts +0 -9
  189. package/dist/types/components/layouts/layout1/components/navbar/style-2/NavbarStyle2.d.ts +0 -5
  190. package/dist/types/components/layouts/layout1/components/navbar/style-2/NavbarStyle2Content.d.ts +0 -9
  191. package/dist/types/components/layouts/layout1/components/navbar/style-3/NavbarStyle3.d.ts +0 -9
  192. package/dist/types/components/layouts/layout1/components/navbar/style-3/NavbarStyle3Content.d.ts +0 -10
  193. package/dist/types/components/layouts/layout2/Layout2.d.ts +0 -10
  194. package/dist/types/components/layouts/layout2/components/FooterLayout2.d.ts +0 -9
  195. package/dist/types/components/layouts/layout2/components/LeftSideLayout2.d.ts +0 -6
  196. package/dist/types/components/layouts/layout2/components/NavbarLayout2.d.ts +0 -9
  197. package/dist/types/components/layouts/layout2/components/NavbarMobileLayout2.d.ts +0 -9
  198. package/dist/types/components/layouts/layout2/components/NavbarToggleFabLayout2.d.ts +0 -8
  199. package/dist/types/components/layouts/layout2/components/NavbarWrapperLayout2.d.ts +0 -5
  200. package/dist/types/components/layouts/layout2/components/RightSideLayout2.d.ts +0 -6
  201. package/dist/types/components/layouts/layout2/components/ToolbarLayout2.d.ts +0 -9
  202. package/dist/types/components/layouts/layout3/Layout3Config.d.ts +0 -110
  203. package/dist/types/components/layouts/layout3/components/LeftSideLayout3.d.ts +0 -6
  204. package/dist/types/components/layouts/layout3/components/NavbarLayout3.d.ts +0 -9
  205. package/dist/types/components/layouts/layout3/components/NavbarMobileLayout3.d.ts +0 -9
  206. package/dist/types/components/layouts/layout3/components/NavbarWrapperLayout3.d.ts +0 -5
  207. package/dist/types/components/layouts/layout3/components/RightSideLayout3.d.ts +0 -6
  208. package/dist/types/components/layouts/layout3/components/ToolbarLayout3.d.ts +0 -9
  209. package/dist/types/components/layouts/shared-components/FullScreenToggle.d.ts +0 -8
  210. package/dist/types/components/layouts/shared-components/LanguageSwitcher.d.ts +0 -7
  211. package/dist/types/components/layouts/shared-components/PasswordChangeForm.d.ts +0 -2
  212. package/dist/types/components/layouts/shared-components/navbar/NavbarToggleButton.d.ts +0 -7
  213. package/dist/types/components/layouts/shared-components/navigation/Navigation.d.ts +0 -3
  214. package/dist/types/components/layouts/shared-components/navigation/NavigationSearch.d.ts +0 -6
  215. package/dist/types/components/layouts/shared-components/navigation/NavigationShortcuts.d.ts +0 -6
  216. package/dist/types/components/layouts/shared-components/quickPanel/QuickPanel.d.ts +0 -5
  217. package/dist/types/components/layouts/shared-components/quickPanel/QuickPanelToggleButton.d.ts +0 -9
  218. package/dist/types/components/layouts/shared-components/quickPanel/quickPanelSlice.d.ts +0 -14
  219. package/dist/types/hooks/useCurrentLogoSrc.d.ts +0 -8
  220. package/dist/types/hooks/useTreeGridCommonCodeEnum.d.ts +0 -8
  221. package/dist/usePageLockLoading-BUI_3PlR.js.map +0 -1
  222. package/dist/useShortcuts-CCf98L8m.js +0 -241
  223. package/dist/useShortcuts-CCf98L8m.js.map +0 -1
  224. package/dist/useStorage-CuUmH4fD.js +0 -50
  225. package/dist/useStorage-CuUmH4fD.js.map +0 -1
  226. package/dist/useTreeGridExcelExport-N2nOKmkz.js +0 -138
  227. package/dist/useTreeGridExcelExport-N2nOKmkz.js.map +0 -1
  228. /package/dist/types/colors/{owpDark.d.ts → palettes/dark.d.ts} +0 -0
  229. /package/dist/types/colors/{skyBlue.d.ts → palettes/skyBlue.d.ts} +0 -0
  230. /package/dist/types/{context → contexts}/OwpCoreProvider.d.ts +0 -0
  231. /package/dist/types/{context → contexts}/OwpStoreProvider.d.ts +0 -0
  232. /package/dist/types/{context → contexts}/OwpUiProvider.d.ts +0 -0
  233. /package/dist/types/{context → contexts}/index.d.ts +0 -0
  234. /package/dist/types/{components/layouts/shared-components → layout/components/logo}/Logo.d.ts +0 -0
  235. /package/dist/types/{components/layouts/shared-components → layout/components}/navbar/NavbarToggleFab.d.ts +0 -0
  236. /package/dist/types/{components/layouts/shared-components → layout/components/toggles}/LogoutToggle.d.ts +0 -0
  237. /package/dist/types/{components/layouts → layout}/themeLayouts.d.ts +0 -0
  238. /package/dist/types/{components/layouts/shared-components/navbar → store}/navbarSlice.d.ts +0 -0
@@ -1,611 +0,0 @@
1
- var P = Object.defineProperty;
2
- var W = (e, n, t) => n in e ? P(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
- var u = (e, n) => P(e, "name", { value: n, configurable: !0 });
4
- var p = (e, n, t) => W(e, typeof n != "symbol" ? n + "" : n, t);
5
- import * as G from "@mui/material/colors";
6
- import { m as E, n as _, h as F, o as D, j as $, p as k, q as z, r as L, s as V, u as X, v as H, e as J, t as Q, l as m, g as U, w as Y, f as Z, c as q, b as j, k as T, x, a as ee } from "./isTypedArray-DPyC49cI.js";
7
- var me = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8
- function Ae(e) {
9
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
10
- }
11
- u(Ae, "getDefaultExportFromCjs");
12
- function Oe(e) {
13
- if (e.__esModule) return e;
14
- var n = e.default;
15
- if (typeof n == "function") {
16
- var t = /* @__PURE__ */ u(function i() {
17
- return this instanceof i ? Reflect.construct(n, arguments, this.constructor) : n.apply(this, arguments);
18
- }, "a");
19
- t.prototype = n.prototype;
20
- } else t = {};
21
- return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(i) {
22
- var f = Object.getOwnPropertyDescriptor(e, i);
23
- Object.defineProperty(t, i, f.get ? f : {
24
- enumerable: !0,
25
- get: /* @__PURE__ */ u(function() {
26
- return e[i];
27
- }, "get")
28
- });
29
- }), t;
30
- }
31
- u(Oe, "getAugmentedNamespace");
32
- function S(e) {
33
- return e;
34
- }
35
- u(S, "identity");
36
- function ne(e) {
37
- if (E(e))
38
- return e;
39
- if (Array.isArray(e) || _(e) || e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer)
40
- return e.slice(0);
41
- const n = Object.getPrototypeOf(e), t = n.constructor;
42
- if (e instanceof Date || e instanceof Map || e instanceof Set)
43
- return new t(e);
44
- if (e instanceof RegExp) {
45
- const i = new t(e);
46
- return i.lastIndex = e.lastIndex, i;
47
- }
48
- if (e instanceof DataView)
49
- return new t(e.buffer.slice(0));
50
- if (e instanceof Error) {
51
- const i = new t(e.message);
52
- return i.stack = e.stack, i.name = e.name, i.cause = e.cause, i;
53
- }
54
- if (typeof File < "u" && e instanceof File)
55
- return new t([e], e.name, { type: e.type, lastModified: e.lastModified });
56
- if (typeof e == "object") {
57
- const i = Object.create(n);
58
- return Object.assign(i, e);
59
- }
60
- return e;
61
- }
62
- u(ne, "clone");
63
- function N(e) {
64
- return function(n) {
65
- return F(n, e);
66
- };
67
- }
68
- u(N, "property");
69
- function A(e) {
70
- return e !== null && (typeof e == "object" || typeof e == "function");
71
- }
72
- u(A, "isObject");
73
- function te(e, n, t) {
74
- return typeof t != "function" ? I(e, n) : O(e, n, /* @__PURE__ */ u(function i(f, r, s, l, a, o) {
75
- const c = t(f, r, s, l, a, o);
76
- return c !== void 0 ? !!c : O(f, r, i, o);
77
- }, "doesMatch"), /* @__PURE__ */ new Map());
78
- }
79
- u(te, "isMatchWith");
80
- function O(e, n, t, i) {
81
- if (n === e)
82
- return !0;
83
- switch (typeof n) {
84
- case "object":
85
- return ie(e, n, t, i);
86
- case "function":
87
- return Object.keys(n).length > 0 ? O(e, { ...n }, t, i) : D(e, n);
88
- default:
89
- return A(e) ? typeof n == "string" ? n === "" : !0 : D(e, n);
90
- }
91
- }
92
- u(O, "isMatchWithInternal");
93
- function ie(e, n, t, i) {
94
- if (n == null)
95
- return !0;
96
- if (Array.isArray(n))
97
- return K(e, n, t, i);
98
- if (n instanceof Map)
99
- return re(e, n, t, i);
100
- if (n instanceof Set)
101
- return fe(e, n, t, i);
102
- const f = Object.keys(n);
103
- if (e == null)
104
- return f.length === 0;
105
- if (f.length === 0)
106
- return !0;
107
- if (i && i.has(n))
108
- return i.get(n) === e;
109
- i && i.set(n, e);
110
- try {
111
- for (let r = 0; r < f.length; r++) {
112
- const s = f[r];
113
- if (!E(e) && !(s in e) || n[s] === void 0 && e[s] !== void 0 || n[s] === null && e[s] !== null || !t(e[s], n[s], s, e, n, i))
114
- return !1;
115
- }
116
- return !0;
117
- } finally {
118
- i && i.delete(n);
119
- }
120
- }
121
- u(ie, "isObjectMatch");
122
- function re(e, n, t, i) {
123
- if (n.size === 0)
124
- return !0;
125
- if (!(e instanceof Map))
126
- return !1;
127
- for (const [f, r] of n.entries()) {
128
- const s = e.get(f);
129
- if (t(s, r, f, e, n, i) === !1)
130
- return !1;
131
- }
132
- return !0;
133
- }
134
- u(re, "isMapMatch");
135
- function K(e, n, t, i) {
136
- if (n.length === 0)
137
- return !0;
138
- if (!Array.isArray(e))
139
- return !1;
140
- const f = /* @__PURE__ */ new Set();
141
- for (let r = 0; r < n.length; r++) {
142
- const s = n[r];
143
- let l = !1;
144
- for (let a = 0; a < e.length; a++) {
145
- if (f.has(a))
146
- continue;
147
- const o = e[a];
148
- let c = !1;
149
- if (t(o, s, r, e, n, i) && (c = !0), c) {
150
- f.add(a), l = !0;
151
- break;
152
- }
153
- }
154
- if (!l)
155
- return !1;
156
- }
157
- return !0;
158
- }
159
- u(K, "isArrayMatch");
160
- function fe(e, n, t, i) {
161
- return n.size === 0 ? !0 : e instanceof Set ? K([...e], [...n], t, i) : !1;
162
- }
163
- u(fe, "isSetMatch");
164
- function I(e, n) {
165
- return te(e, n, () => {
166
- });
167
- }
168
- u(I, "isMatch");
169
- function R(e) {
170
- return e = $(e), (n) => I(n, e);
171
- }
172
- u(R, "matches");
173
- function se(e, n) {
174
- return k(e, (t, i, f, r) => {
175
- if (typeof e == "object")
176
- switch (Object.prototype.toString.call(e)) {
177
- case H:
178
- case X:
179
- case V: {
180
- const s = new e.constructor(e == null ? void 0 : e.valueOf());
181
- return L(s, e), s;
182
- }
183
- case z: {
184
- const s = {};
185
- return L(s, e), s.length = e.length, s[Symbol.iterator] = e[Symbol.iterator], s;
186
- }
187
- default:
188
- return;
189
- }
190
- });
191
- }
192
- u(se, "cloneDeepWith");
193
- function w(e) {
194
- return se(e);
195
- }
196
- u(w, "cloneDeep");
197
- const le = /^(?:0|[1-9]\d*)$/;
198
- function ue(e, n = Number.MAX_SAFE_INTEGER) {
199
- switch (typeof e) {
200
- case "number":
201
- return Number.isInteger(e) && e >= 0 && e < n;
202
- case "symbol":
203
- return !1;
204
- case "string":
205
- return le.test(e);
206
- }
207
- }
208
- u(ue, "isIndex");
209
- function ae(e, n) {
210
- let t;
211
- if (Array.isArray(n) ? t = n : typeof n == "string" && J(n) && (e == null ? void 0 : e[n]) == null ? t = Q(n) : t = [n], t.length === 0)
212
- return !1;
213
- let i = e;
214
- for (let f = 0; f < t.length; f++) {
215
- const r = t[f];
216
- if ((i == null || !Object.hasOwn(i, r)) && !((Array.isArray(i) || m(i)) && ue(r) && r < i.length))
217
- return !1;
218
- i = i[r];
219
- }
220
- return !0;
221
- }
222
- u(ae, "has");
223
- function v(e, n) {
224
- switch (typeof e) {
225
- case "object": {
226
- Object.is(e == null ? void 0 : e.valueOf(), -0) && (e = "-0");
227
- break;
228
- }
229
- case "number": {
230
- e = U(e);
231
- break;
232
- }
233
- }
234
- return n = w(n), function(t) {
235
- const i = F(t, e);
236
- return i === void 0 ? ae(t, e) : n === void 0 ? i === void 0 : I(i, n);
237
- };
238
- }
239
- u(v, "matchesProperty");
240
- function oe(e) {
241
- if (e == null)
242
- return S;
243
- switch (typeof e) {
244
- case "function":
245
- return e;
246
- case "object":
247
- return Array.isArray(e) && e.length === 2 ? v(e[0], e[1]) : R(e);
248
- case "string":
249
- case "symbol":
250
- case "number":
251
- return N(e);
252
- }
253
- }
254
- u(oe, "iteratee");
255
- function ce(e, n = S, t = 0) {
256
- if (!e)
257
- return;
258
- t < 0 && (t = Math.max(e.length + t, 0));
259
- const i = oe(n);
260
- if (typeof i == "function" && !Array.isArray(e)) {
261
- const r = Object.keys(e);
262
- for (let s = t; s < r.length; s++) {
263
- const l = r[s], a = e[l];
264
- if (i(a, l, e))
265
- return a;
266
- }
267
- return;
268
- }
269
- return (Array.isArray(e) ? e.slice(t) : Object.values(e).slice(t)).find(i);
270
- }
271
- u(ce, "find");
272
- function ye(e, n, t) {
273
- if (!e)
274
- return !1;
275
- n || (n = S);
276
- const i = Array.isArray(e) ? e : Object.values(e);
277
- switch (typeof n) {
278
- case "function": {
279
- if (!Array.isArray(e)) {
280
- const f = Object.keys(e);
281
- for (let r = 0; r < f.length; r++) {
282
- const s = f[r], l = e[s];
283
- if (n(l, s, e))
284
- return !0;
285
- }
286
- return !1;
287
- }
288
- for (let f = 0; f < e.length; f++)
289
- if (n(e[f], f, e))
290
- return !0;
291
- return !1;
292
- }
293
- case "object":
294
- if (Array.isArray(n) && n.length === 2) {
295
- const f = n[0], r = n[1], s = v(f, r);
296
- if (Array.isArray(e)) {
297
- for (let l = 0; l < e.length; l++)
298
- if (s(e[l]))
299
- return !0;
300
- return !1;
301
- }
302
- return i.some(s);
303
- } else {
304
- const f = R(n);
305
- if (Array.isArray(e)) {
306
- for (let r = 0; r < e.length; r++)
307
- if (f(e[r]))
308
- return !0;
309
- return !1;
310
- }
311
- return i.some(f);
312
- }
313
- case "number":
314
- case "symbol":
315
- case "string": {
316
- const f = N(n);
317
- if (Array.isArray(e)) {
318
- for (let r = 0; r < e.length; r++)
319
- if (f(e[r]))
320
- return !0;
321
- return !1;
322
- }
323
- return i.some(f);
324
- }
325
- }
326
- }
327
- u(ye, "some");
328
- function de(e, ...n) {
329
- const t = n.slice(0, -1), i = n[n.length - 1];
330
- let f = e;
331
- for (let r = 0; r < t.length; r++) {
332
- const s = t[r];
333
- f = y(f, s, i, /* @__PURE__ */ new Map());
334
- }
335
- return f;
336
- }
337
- u(de, "mergeWith");
338
- function y(e, n, t, i) {
339
- if (E(e) && (e = Object(e)), n == null || typeof n != "object")
340
- return e;
341
- if (i.has(n))
342
- return ne(i.get(n));
343
- if (i.set(n, e), Array.isArray(n)) {
344
- n = n.slice();
345
- for (let r = 0; r < n.length; r++)
346
- n[r] = n[r] ?? void 0;
347
- }
348
- const f = [...Object.keys(n), ...Y(n)];
349
- for (let r = 0; r < f.length; r++) {
350
- const s = f[r];
351
- if (Z(s))
352
- continue;
353
- let l = n[s], a = e[s];
354
- if (m(l) && (l = { ...l }), m(a) && (a = { ...a }), typeof Buffer < "u" && Buffer.isBuffer(l) && (l = w(l)), Array.isArray(l))
355
- if (typeof a == "object" && a != null) {
356
- const c = [], h = Reflect.ownKeys(a);
357
- for (let g = 0; g < h.length; g++) {
358
- const B = h[g];
359
- c[B] = a[B];
360
- }
361
- a = c;
362
- } else
363
- a = [];
364
- const o = t(a, l, s, e, n, i);
365
- o !== void 0 ? e[s] = o : Array.isArray(l) || q(a) && q(l) ? e[s] = y(a, l, t, i) : a == null && j(l) ? e[s] = y({}, l, t, i) : a == null && T(l) ? e[s] = w(l) : (a === void 0 || l !== void 0) && (e[s] = l);
366
- }
367
- return e;
368
- }
369
- u(y, "mergeWithDeep");
370
- function he(e, ...n) {
371
- return de(e, ...n, x);
372
- }
373
- u(he, "merge");
374
- const b = class b {
375
- constructor() {
376
- p(this, "events");
377
- this.events = {};
378
- }
379
- /**
380
- * Event listener set lookup
381
- */
382
- _getEventListByName(n) {
383
- return typeof this.events[n] > "u" && (this.events[n] = /* @__PURE__ */ new Set()), this.events[n];
384
- }
385
- /**
386
- * Event subscription
387
- */
388
- on(n, t) {
389
- this._getEventListByName(n).add(t);
390
- }
391
- /**
392
- * One-time event subscription
393
- */
394
- once(n, t) {
395
- const i = /* @__PURE__ */ u((...f) => {
396
- this.removeListener(n, i), t.apply(this, f);
397
- }, "onceFn");
398
- this.on(n, i);
399
- }
400
- /**
401
- * Event emission
402
- */
403
- emit(n, ...t) {
404
- this._getEventListByName(n).forEach((i) => {
405
- i.apply(this, t);
406
- });
407
- }
408
- /**
409
- * Event unsubscription
410
- */
411
- removeListener(n, t) {
412
- this._getEventListByName(n).delete(t);
413
- }
414
- };
415
- u(b, "OwpEventEmitter");
416
- let M = b;
417
- const d = class d {
418
- /**
419
- * The filterArrayByString function filters an array of objects by a search string.
420
- * It takes in an array of objects and a search string as parameters and returns a filtered array of objects.
421
- *
422
- */
423
- static filterArrayByString(n, t) {
424
- if (!t || (t == null ? void 0 : t.length) === 0 || !t)
425
- return n;
426
- t = t == null ? void 0 : t.toLowerCase();
427
- const i = n.filter((f) => this.searchInObj(f, t));
428
- return i.length === n.length ? n : i;
429
- }
430
- static filterArrayByString2(n, t) {
431
- return typeof t != "string" || t === "" ? n : (t = t == null ? void 0 : t.toLowerCase(), n.filter((i) => this.searchInObj(i, t)));
432
- }
433
- /**
434
- * The searchInObj function searches an object for a given search string.
435
- * 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.
436
- *
437
- */
438
- static searchInObj(n, t) {
439
- if (!f(n))
440
- return !1;
441
- const i = Object.keys(n);
442
- function f(r) {
443
- return !!(r && typeof r == "object" && !Array.isArray(r) && typeof r != "function");
444
- }
445
- u(f, "isRecord");
446
- for (let r = 0; r < i.length; r += 1) {
447
- const s = i[r], l = n[s];
448
- if (typeof l == "string") {
449
- if (this.searchInString(l, t))
450
- return !0;
451
- } else if (Array.isArray(l) && this.searchInArray(l, t))
452
- return !0;
453
- if (typeof l == "object" && this.searchInObj(l, t))
454
- return !0;
455
- }
456
- return !1;
457
- }
458
- /**
459
- * The searchInArray function searches an array for a given search string.
460
- * 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.
461
- *
462
- */
463
- static searchInArray(n, t) {
464
- return n.forEach((i) => !!(typeof i == "string" && this.searchInString(i, t) || i && typeof i == "object" && this.searchInObj(i, t))), !1;
465
- }
466
- /**
467
- * The searchInString function searches a string for a given search string.
468
- * 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.
469
- *
470
- */
471
- static searchInString(n, t) {
472
- return n.toLowerCase().includes(t);
473
- }
474
- /**
475
- * The generateGUID function generates a globally unique identifier.
476
- * It returns a string representing the GUID.
477
- *
478
- */
479
- static generateGUID() {
480
- function n() {
481
- return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
482
- }
483
- return u(n, "S4"), n() + n();
484
- }
485
- /**
486
- * The toggleInArray function toggles an item in an array.
487
- */
488
- static toggleInArray(n, t) {
489
- t.indexOf(n) === -1 ? t.push(n) : t.splice(t.indexOf(n), 1);
490
- }
491
- /**
492
- * The handleize function converts a string to a handle.
493
- */
494
- static handleize(n) {
495
- return n.toString().toLowerCase().replace(/\s+/g, "-").replace(/\W+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
496
- }
497
- /**
498
- * The setRoutes function sets the routes for the Owp project.
499
- */
500
- static setRoutes(n, t = void 0) {
501
- let i = [];
502
- n != null && n.routes && (i = [...n.routes]);
503
- const f = /* @__PURE__ */ u((r, s) => {
504
- const l = r.auth || r.auth === null ? r.auth : s, a = he({}, n.settings, r.settings), o = {
505
- ...r,
506
- settings: a,
507
- auth: l
508
- };
509
- return r.children && (o.children = r.children.map((c) => f(c, l))), o;
510
- }, "applyAuth");
511
- return i = i.map((r) => {
512
- const s = n.auth || n.auth === null ? n.auth : t || null;
513
- return f(r, s);
514
- }), [...i];
515
- }
516
- /**
517
- * The generateRoutesFromConfigs function generates routes from a set of route configurations.
518
- * It takes in an array of route configurations as a parameter and returns an array of routes.
519
- *
520
- */
521
- static generateRoutesFromConfigs(n, t) {
522
- let i = [];
523
- return n.forEach((f) => {
524
- i = [...i, ...this.setRoutes(f, t)];
525
- }), i;
526
- }
527
- /**
528
- * The findById function finds an object by its id.
529
- */
530
- static findById(n, t) {
531
- const i = ce(n, { id: t });
532
- if (i)
533
- return i;
534
- let f;
535
- return ye(n, (r) => r.children ? (f = this.findById(r.children, t), f) : !1), f;
536
- }
537
- /**
538
- * The randomMatColor function generates a random material color.
539
- */
540
- static randomMatColor(n = "400") {
541
- var f;
542
- const t = [
543
- "red",
544
- "pink",
545
- "purple",
546
- "deepPurple",
547
- "indigo",
548
- "blue",
549
- "lightBlue",
550
- "cyan",
551
- "teal",
552
- "green",
553
- "lightGreen",
554
- "lime",
555
- "yellow",
556
- "amber",
557
- "orange",
558
- "deepOrange"
559
- ], i = t[Math.floor(Math.random() * t.length)];
560
- return (f = G[i]) == null ? void 0 : f[n];
561
- }
562
- /**
563
- * The findNavItemById function finds a navigation item by its id.
564
- */
565
- static difference(n, t) {
566
- function i(f, r) {
567
- return f == null ? void 0 : f.reduce((s, l, a) => (ee(l, r[a]) || (s[a] = A(l) && A(r[a]) ? i(l, r[a]) : l), s), {});
568
- }
569
- return u(i, "changes"), i(n, t);
570
- }
571
- /**
572
- * The hasPermission function checks if a user has permission to access a resource.
573
- */
574
- // @ts-expect-error
575
- static hasPermission(n, t) {
576
- var i;
577
- return n == null ? !0 : Array.isArray(n) && (n == null ? void 0 : n.length) === 0 ? !t || t.length === 0 : t && Array.isArray(n) && Array.isArray(t) ? n.some((f) => t.indexOf(f) >= 0) : typeof t == "string" && Array.isArray(n) ? (i = n == null ? void 0 : n.includes) == null ? void 0 : i.call(n, t) : !1;
578
- }
579
- /**
580
- * The filterArrayByString function filters an array of objects by a search string.
581
- */
582
- static filterRecursive(n, t) {
583
- return n ? n.reduce((i, f) => {
584
- let r = null;
585
- if (t(f) && (r = { ...f }), f.children != null) {
586
- const s = this.filterRecursive(f.children, t);
587
- s && (s == null ? void 0 : s.length) > 0 && (r = { ...f, children: s });
588
- }
589
- return r && i.push(r), i;
590
- }, []) : null;
591
- }
592
- };
593
- u(d, "OwpUtils"), /**
594
- * OwpEventEmitter class reference
595
- */
596
- p(d, "EventEmitter", M);
597
- let C = d;
598
- export {
599
- C as O,
600
- ue as a,
601
- Ae as b,
602
- me as c,
603
- oe as d,
604
- S as e,
605
- ce as f,
606
- Oe as g,
607
- M as h,
608
- A as i,
609
- he as m
610
- };
611
- //# sourceMappingURL=OwpUtils-C81bM1Gz.js.map