@owp/core 2.2.5 → 2.3.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/dist/_virtual/index11.js +2 -2
  2. package/dist/_virtual/index12.js +2 -2
  3. package/dist/_virtual/index13.js +2 -2
  4. package/dist/_virtual/index14.js +2 -2
  5. package/dist/_virtual/index16.js +5 -2
  6. package/dist/_virtual/index16.js.map +1 -1
  7. package/dist/_virtual/index17.js +2 -2
  8. package/dist/_virtual/index5.js +2 -5
  9. package/dist/_virtual/index5.js.map +1 -1
  10. package/dist/_virtual/index6.js +2 -2
  11. package/dist/_virtual/index7.js +2 -2
  12. package/dist/components/OwpDialog/OwpDialog.js +48 -46
  13. package/dist/components/OwpDialog/OwpDialog.js.map +1 -1
  14. package/dist/components/OwpErrorStatusPage/OwpErrorStatusPage.js +24 -24
  15. package/dist/components/OwpErrorStatusPage/OwpErrorStatusPage.js.map +1 -1
  16. package/dist/components/OwpLayout/OwpLayout.js +29 -30
  17. package/dist/components/OwpLayout/OwpLayout.js.map +1 -1
  18. package/dist/components/OwpMrtTable/OwpMrtTable.js +2 -2
  19. package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
  20. package/dist/components/OwpMrtTable/{OwpMrtTableNoDataOverlay.js → internal/OwpMrtTableNoDataOverlay.js} +1 -1
  21. package/dist/components/OwpMrtTable/internal/OwpMrtTableNoDataOverlay.js.map +1 -0
  22. package/dist/components/OwpMrtTable/{OwpMrtTableTopToolbar.js → internal/OwpMrtTableTopToolbar.js} +3 -3
  23. package/dist/components/OwpMrtTable/internal/OwpMrtTableTopToolbar.js.map +1 -0
  24. package/dist/components/OwpPageCarded/OwpPageCarded.js +81 -77
  25. package/dist/components/OwpPageCarded/OwpPageCarded.js.map +1 -1
  26. package/dist/components/OwpPageCarded/{OwpPageCardedHeader.js → internal/OwpPageCardedHeader.js} +2 -2
  27. package/dist/components/OwpPageCarded/internal/OwpPageCardedHeader.js.map +1 -0
  28. package/dist/components/OwpPageCarded/{OwpPageCardedSidebar.js → internal/OwpPageCardedSidebar.js} +3 -3
  29. package/dist/components/OwpPageCarded/internal/OwpPageCardedSidebar.js.map +1 -0
  30. package/dist/components/OwpPageCarded/{OwpPageCardedSidebarContent.js → internal/OwpPageCardedSidebarContent.js} +2 -2
  31. package/dist/components/OwpPageCarded/internal/OwpPageCardedSidebarContent.js.map +1 -0
  32. package/dist/components/OwpPicker/OwpDatePicker.js +90 -83
  33. package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
  34. package/dist/components/OwpPicker/OwpDateRangePicker.js +57 -50
  35. package/dist/components/OwpPicker/OwpDateRangePicker.js.map +1 -1
  36. package/dist/components/OwpPicker/OwpTimePicker.js +65 -61
  37. package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
  38. package/dist/components/OwpPicker/OwpWeekDatePicker.js +58 -52
  39. package/dist/components/OwpPicker/OwpWeekDatePicker.js.map +1 -1
  40. package/dist/components/OwpPicker/OwpYearRangePicker.js +68 -62
  41. package/dist/components/OwpPicker/OwpYearRangePicker.js.map +1 -1
  42. package/dist/components/OwpPicker/{constants.js → constants/index.js} +1 -1
  43. package/dist/components/OwpPicker/constants/index.js.map +1 -0
  44. package/dist/components/OwpPicker/{AnimatedCalendarContainer.js → internal/AnimatedCalendarContainer.js} +2 -2
  45. package/dist/components/OwpPicker/internal/AnimatedCalendarContainer.js.map +1 -0
  46. package/dist/components/OwpPicker/{CalendarContainer.js → internal/CalendarContainer.js} +2 -2
  47. package/dist/components/OwpPicker/internal/CalendarContainer.js.map +1 -0
  48. package/dist/components/OwpPicker/{DatePickerInput.js → internal/DatePickerInput.js} +4 -4
  49. package/dist/components/OwpPicker/internal/DatePickerInput.js.map +1 -0
  50. package/dist/components/OwpQuerySelector/OwpQuerySelector.js +205 -171
  51. package/dist/components/OwpQuerySelector/OwpQuerySelector.js.map +1 -1
  52. package/dist/components/OwpScrollbars/OwpScrollbars.js +16 -17
  53. package/dist/components/OwpScrollbars/OwpScrollbars.js.map +1 -1
  54. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +112 -103
  55. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  56. package/dist/components/OwpStyleProvider/OwpStyleProvider.js +86 -39
  57. package/dist/components/OwpStyleProvider/OwpStyleProvider.js.map +1 -1
  58. package/dist/components/OwpSuspense/OwpSuspense.js.map +1 -1
  59. package/dist/components/OwpTable/OwpTable.js +50 -51
  60. package/dist/components/OwpTable/OwpTable.js.map +1 -1
  61. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +163 -308
  62. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  63. package/dist/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.js +1 -1
  64. package/dist/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.js.map +1 -1
  65. package/dist/components/OwpTreeGrid/{OwpTreeGridLoadingOverlay.js → internal/OwpTreeGridLoadingOverlay.js} +2 -2
  66. package/dist/components/OwpTreeGrid/internal/OwpTreeGridLoadingOverlay.js.map +1 -0
  67. package/dist/components/OwpTreeGrid/{OwpTreeGridNoDataOverlay.js → internal/OwpTreeGridNoDataOverlay.js} +2 -2
  68. package/dist/components/OwpTreeGrid/internal/OwpTreeGridNoDataOverlay.js.map +1 -0
  69. package/dist/components/OwpTreeGrid/{utils/index.js → internal/treeGridLayout.js} +1 -1
  70. package/dist/components/OwpTreeGrid/internal/treeGridLayout.js.map +1 -0
  71. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +182 -0
  72. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -0
  73. package/dist/components/OwpTreeGrid/utils/perf.js.map +1 -0
  74. package/dist/components/OwpZoomImageSlider/OwpZoomImageSlider.js +1 -1
  75. package/dist/components/OwpZoomImageSlider/OwpZoomImageSlider.js.map +1 -1
  76. package/dist/components/OwpZoomImageSlider/{ZoomImage.js → internal/ZoomImage.js} +1 -1
  77. package/dist/components/OwpZoomImageSlider/internal/ZoomImage.js.map +1 -0
  78. package/dist/contexts/OwpCoreProvider.js +22 -36
  79. package/dist/contexts/OwpCoreProvider.js.map +1 -1
  80. package/dist/contexts/OwpStoreProvider.js +9 -9
  81. package/dist/contexts/OwpStoreProvider.js.map +1 -1
  82. package/dist/hooks/useNavbar.js +24 -0
  83. package/dist/hooks/useNavbar.js.map +1 -0
  84. package/dist/hooks/useOwpSettings.js +21 -0
  85. package/dist/hooks/useOwpSettings.js.map +1 -0
  86. package/dist/hooks.js +75 -62
  87. package/dist/hooks.js.map +1 -1
  88. package/dist/index.js +98 -104
  89. package/dist/index.js.map +1 -1
  90. package/dist/layout/Layout.js +28 -29
  91. package/dist/layout/Layout.js.map +1 -1
  92. package/dist/layout/components/layouts/FooterLayout.js +15 -16
  93. package/dist/layout/components/layouts/FooterLayout.js.map +1 -1
  94. package/dist/layout/components/layouts/NavbarToggleFabLayout.js +21 -18
  95. package/dist/layout/components/layouts/NavbarToggleFabLayout.js.map +1 -1
  96. package/dist/layout/components/layouts/NavbarWrapperLayout.js +20 -21
  97. package/dist/layout/components/layouts/NavbarWrapperLayout.js.map +1 -1
  98. package/dist/layout/components/navbar/NavbarPinToggleButton.js +10 -11
  99. package/dist/layout/components/navbar/NavbarPinToggleButton.js.map +1 -1
  100. package/dist/layout/components/navbar/NavbarToggleButton.js +31 -32
  101. package/dist/layout/components/navbar/NavbarToggleButton.js.map +1 -1
  102. package/dist/layout/components/navbar/style/NavbarStyle.js +36 -37
  103. package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
  104. package/dist/layout/components/navbar/style/NavbarStyleContent.js +29 -30
  105. package/dist/layout/components/navbar/style/NavbarStyleContent.js.map +1 -1
  106. package/dist/layout/components/navigation/Navigation.js +18 -22
  107. package/dist/layout/components/navigation/Navigation.js.map +1 -1
  108. package/dist/layout/components/toggles/NavigationSearchToggle.js +55 -60
  109. package/dist/layout/components/toggles/NavigationSearchToggle.js.map +1 -1
  110. package/dist/layout/components/toggles/NavigationShortcutsToggle.js +44 -49
  111. package/dist/layout/components/toggles/NavigationShortcutsToggle.js.map +1 -1
  112. package/dist/layout/components/toolbar/ToolbarLayout.js +26 -27
  113. package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
  114. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  115. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  116. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  117. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
  118. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  119. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  120. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  121. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  122. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  123. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  124. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  125. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  126. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  127. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  128. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  129. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  130. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  131. package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.js +1 -1
  132. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  133. package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
  134. package/dist/owp-app.css +1 -1
  135. package/dist/store/atoms/navbarAtoms.js +84 -0
  136. package/dist/store/atoms/navbarAtoms.js.map +1 -0
  137. package/dist/store/atoms/owpSettingsAtoms.js +140 -0
  138. package/dist/store/atoms/owpSettingsAtoms.js.map +1 -0
  139. package/dist/store/atoms/owpStore.js +29 -0
  140. package/dist/store/atoms/owpStore.js.map +1 -0
  141. package/dist/store.js +44 -39
  142. package/dist/store.js.map +1 -1
  143. package/dist/types/components/OwpPageCarded/OwpPageCarded.d.ts +12 -41
  144. package/dist/types/components/OwpPageSkeleton/index.d.ts +1 -0
  145. package/dist/types/components/OwpPicker/OwpWeekDatePicker.d.ts +0 -1
  146. package/dist/types/components/OwpPicker/OwpYearRangePicker.d.ts +0 -1
  147. package/dist/types/components/OwpPicker/{DatePickerInput.d.ts → internal/DatePickerInput.d.ts} +1 -1
  148. package/dist/types/components/OwpQuerySelector/OwpQuerySelector.d.ts +1 -1
  149. package/dist/types/components/OwpQuerySelector/types/types.d.ts +2 -0
  150. package/dist/types/components/OwpTable/OwpTable.d.ts +1 -1
  151. package/dist/types/components/OwpTabs/OwpTab.d.ts +1 -1
  152. package/dist/types/components/OwpTabs/OwpTabs.d.ts +1 -1
  153. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +3 -1
  154. package/dist/types/components/OwpTreeGrid/{OwpTreeGridLoadingOverlay.d.ts → internal/OwpTreeGridLoadingOverlay.d.ts} +1 -1
  155. package/dist/types/components/OwpTreeGrid/{OwpTreeGridNoDataOverlay.d.ts → internal/OwpTreeGridNoDataOverlay.d.ts} +1 -1
  156. package/dist/types/components/OwpTreeGrid/{utils/index.d.ts → internal/treeGridLayout.d.ts} +0 -2
  157. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +75 -0
  158. package/dist/types/contexts/OwpCoreProvider.d.ts +2 -2
  159. package/dist/types/contexts/OwpStoreProvider.d.ts +4 -4
  160. package/dist/types/hooks/index.d.ts +2 -1
  161. package/dist/types/hooks/useNavbar.d.ts +19 -0
  162. package/dist/types/hooks/useOwpSettings.d.ts +79 -0
  163. package/dist/types/index.d.ts +1 -4
  164. package/dist/types/layout/components/navigation/Navigation.d.ts +6 -2
  165. package/dist/types/layout/components/toggles/NavigationSearchToggle.d.ts +5 -2
  166. package/dist/types/layout/components/toggles/NavigationShortcutsToggle.d.ts +5 -2
  167. package/dist/types/store/atoms/index.d.ts +3 -0
  168. package/dist/types/store/atoms/internal/types.d.ts +29 -0
  169. package/dist/types/store/atoms/navbarAtoms.d.ts +48 -0
  170. package/dist/types/store/atoms/owpSettingsAtoms.d.ts +89 -0
  171. package/dist/types/store/atoms/owpStore.d.ts +13 -0
  172. package/dist/types/store/index.d.ts +1 -3
  173. package/dist/types/types/OwpNavigationTypes.d.ts +14 -0
  174. package/dist/types/types/index.d.ts +1 -1
  175. package/dist/types/utils/index.d.ts +1 -0
  176. package/dist/types/utils/navigationUtils.d.ts +6 -2
  177. package/dist/types/utils/normalizeTimeToHourMinute.d.ts +11 -0
  178. package/dist/utils/navigationUtils.js.map +1 -1
  179. package/dist/utils/normalizeTimeToHourMinute.js +34 -0
  180. package/dist/utils/normalizeTimeToHourMinute.js.map +1 -0
  181. package/dist/utils/treeGridUtil.js +1 -1
  182. package/dist/utils/treeGridUtil.js.map +1 -1
  183. package/dist/utils.js +78 -75
  184. package/dist/utils.js.map +1 -1
  185. package/package.json +2 -6
  186. package/dist/components/OwpMrtTable/OwpMrtTableNoDataOverlay.js.map +0 -1
  187. package/dist/components/OwpMrtTable/OwpMrtTableTopToolbar.js.map +0 -1
  188. package/dist/components/OwpPageCarded/OwpPageCardedHeader.js.map +0 -1
  189. package/dist/components/OwpPageCarded/OwpPageCardedSidebar.js.map +0 -1
  190. package/dist/components/OwpPageCarded/OwpPageCardedSidebarContent.js.map +0 -1
  191. package/dist/components/OwpPicker/AnimatedCalendarContainer.js.map +0 -1
  192. package/dist/components/OwpPicker/CalendarContainer.js.map +0 -1
  193. package/dist/components/OwpPicker/DatePickerInput.js.map +0 -1
  194. package/dist/components/OwpPicker/constants.js.map +0 -1
  195. package/dist/components/OwpTreeGrid/OwpTreeGridLoadingOverlay.js.map +0 -1
  196. package/dist/components/OwpTreeGrid/OwpTreeGridNoDataOverlay.js.map +0 -1
  197. package/dist/components/OwpTreeGrid/perf.js.map +0 -1
  198. package/dist/components/OwpTreeGrid/utils/index.js.map +0 -1
  199. package/dist/components/OwpZoomImageSlider/ZoomImage.js.map +0 -1
  200. package/dist/hooks/useAppStore.js +0 -8
  201. package/dist/hooks/useAppStore.js.map +0 -1
  202. package/dist/node_modules/.pnpm/react-datepicker@8.7.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-datepicker/dist/react-datepicker.css +0 -1
  203. package/dist/store/generateReducersFromSlices.js +0 -18
  204. package/dist/store/generateReducersFromSlices.js.map +0 -1
  205. package/dist/store/lazyLoadedSlices.js +0 -16
  206. package/dist/store/lazyLoadedSlices.js.map +0 -1
  207. package/dist/store/middleware.js +0 -9
  208. package/dist/store/middleware.js.map +0 -1
  209. package/dist/store/navbarSlice.js +0 -71
  210. package/dist/store/navbarSlice.js.map +0 -1
  211. package/dist/store/navigationSlice.js +0 -46
  212. package/dist/store/navigationSlice.js.map +0 -1
  213. package/dist/store/owpSettingsSlice.js +0 -195
  214. package/dist/store/owpSettingsSlice.js.map +0 -1
  215. package/dist/store/store.js +0 -17
  216. package/dist/store/store.js.map +0 -1
  217. package/dist/store/withSlices.js +0 -27
  218. package/dist/store/withSlices.js.map +0 -1
  219. package/dist/types/hooks/useAppStore.d.ts +0 -7
  220. package/dist/types/store/generateReducersFromSlices.d.ts +0 -6
  221. package/dist/types/store/lazyLoadedSlices.d.ts +0 -9
  222. package/dist/types/store/middleware.d.ts +0 -17
  223. package/dist/types/store/navbarSlice.d.ts +0 -22
  224. package/dist/types/store/navigationSlice.d.ts +0 -92
  225. package/dist/types/store/owpSettingsSlice.d.ts +0 -112
  226. package/dist/types/store/store.d.ts +0 -13
  227. package/dist/types/store/withSlices.d.ts +0 -11
  228. /package/dist/components/OwpTreeGrid/{perf.js → utils/perf.js} +0 -0
  229. /package/dist/types/components/OwpMrtTable/{OwpMrtTableNoDataOverlay.d.ts → internal/OwpMrtTableNoDataOverlay.d.ts} +0 -0
  230. /package/dist/types/components/OwpMrtTable/{OwpMrtTableTopToolbar.d.ts → internal/OwpMrtTableTopToolbar.d.ts} +0 -0
  231. /package/dist/types/components/OwpPageCarded/{OwpPageCardedHeader.d.ts → internal/OwpPageCardedHeader.d.ts} +0 -0
  232. /package/dist/types/components/OwpPageCarded/{OwpPageCardedSidebar.d.ts → internal/OwpPageCardedSidebar.d.ts} +0 -0
  233. /package/dist/types/components/OwpPageCarded/{OwpPageCardedSidebarContent.d.ts → internal/OwpPageCardedSidebarContent.d.ts} +0 -0
  234. /package/dist/types/components/OwpPicker/{constants.d.ts → constants/index.d.ts} +0 -0
  235. /package/dist/types/components/OwpPicker/{AnimatedCalendarContainer.d.ts → internal/AnimatedCalendarContainer.d.ts} +0 -0
  236. /package/dist/types/components/OwpPicker/{CalendarContainer.d.ts → internal/CalendarContainer.d.ts} +0 -0
  237. /package/dist/types/components/OwpTreeGrid/{perf.d.ts → utils/perf.d.ts} +0 -0
  238. /package/dist/types/components/OwpZoomImageSlider/{ZoomImage.d.ts → internal/ZoomImage.d.ts} +0 -0
@@ -1,35 +1,33 @@
1
1
  var G = Object.defineProperty;
2
2
  var r = (e, o) => G(e, "name", { value: o, configurable: !0 });
3
- import { jsx as t, jsxs as m, Fragment as H } 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";
3
+ import { jsx as t, jsxs as f, Fragment as H } 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
4
  import { useGetNavigationList as K } from "../../../hooks/useNavigation.js";
5
5
  import { useOwpTranslation as _ } from "../../../hooks/useOwpTranslation.js";
6
- import { navigationSlice as J } from "../../../store/navigationSlice.js";
7
- import { withSlices as Q } from "../../../store/withSlices.js";
8
- import { OwpNavigationHelper as X } from "../../../utils/navigationUtils.js";
9
- import Y from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UnfoldLess.js";
10
- import { Stack as Z } from "@mui/material";
11
- import $ from "@mui/material/ClickAwayListener";
6
+ import { OwpNavigationHelper as J } from "../../../utils/navigationUtils.js";
7
+ import Q from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UnfoldLess.js";
8
+ import { Stack as X } from "@mui/material";
9
+ import Y from "@mui/material/ClickAwayListener";
12
10
  import { grey as F } from "@mui/material/colors";
13
11
  import k from "@mui/material/IconButton";
14
- import ee from "@mui/material/ListItemIcon";
15
- import te from "@mui/material/ListItemText";
16
- import ne from "@mui/material/MenuItem";
12
+ import Z from "@mui/material/ListItemIcon";
13
+ import $ from "@mui/material/ListItemText";
14
+ import ee from "@mui/material/MenuItem";
17
15
  import C from "@mui/material/Paper";
18
16
  import q from "@mui/material/Popper";
19
- import { styled as re } from "@mui/material/styles";
17
+ import { styled as te } from "@mui/material/styles";
20
18
  import z from "@mui/material/TextField";
21
- import oe from "@mui/material/Tooltip";
19
+ import ne from "@mui/material/Tooltip";
22
20
  import E from "@mui/material/Typography";
23
21
  import D from "../../../_virtual/index18.js";
24
- import ie from "../../../_virtual/index19.js";
25
- import { clsx as W } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
26
- import { useMemo as se, useReducer as ae, useRef as T, useEffect as le } from "react";
27
- import B from "../../../_virtual/index20.js";
28
- import { useNavigate as ce } from "react-router-dom";
29
- import { toolbarToggleSx as ue } from "./toggleStyles.js";
30
- import { OwpSvgIcon as v } from "../../../components/OwpSvgIcon/OwpSvgIcon.js";
31
- import { trim as pe } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/trim.js";
32
- const he = re("div")(({ theme: e }) => ({
22
+ import re from "../../../_virtual/index19.js";
23
+ import { clsx as B } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
24
+ import { useMemo as oe, useReducer as ie, useRef as T, useEffect as se } from "react";
25
+ import W from "../../../_virtual/index20.js";
26
+ import { useNavigate as ae } from "react-router-dom";
27
+ import { toolbarToggleSx as le } from "./toggleStyles.js";
28
+ import { OwpSvgIcon as w } from "../../../components/OwpSvgIcon/OwpSvgIcon.js";
29
+ import { trim as ce } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/trim.js";
30
+ const ue = te("div")(({ theme: e }) => ({
33
31
  "& .OwpSearch-container": {
34
32
  position: "relative"
35
33
  },
@@ -61,7 +59,7 @@ const he = re("div")(({ theme: e }) => ({
61
59
  function A(e) {
62
60
  const { variant: o, ref: i, inputRef: c = /* @__PURE__ */ r(() => {
63
61
  }, "inputRef"), key: l, ...s } = e;
64
- return /* @__PURE__ */ t("div", { className: "relative w-full", children: o === "basic" ? /* @__PURE__ */ m(H, { children: [
62
+ return /* @__PURE__ */ t("div", { className: "relative w-full", children: o === "basic" ? /* @__PURE__ */ f(H, { children: [
65
63
  /* @__PURE__ */ t(
66
64
  z,
67
65
  {
@@ -85,7 +83,7 @@ function A(e) {
85
83
  }
86
84
  ),
87
85
  /* @__PURE__ */ t(
88
- v,
86
+ w,
89
87
  {
90
88
  className: "pointer-events-none absolute top-0 h-36 w-36 p-8 ltr:right-0 rtl:left-0",
91
89
  color: "action",
@@ -116,11 +114,11 @@ function A(e) {
116
114
  r(A, "renderInputComponent");
117
115
  function M(e, { query: o, isHighlighted: i }) {
118
116
  var s;
119
- const c = D((e == null ? void 0 : e.title) ?? "", o), l = ie((e == null ? void 0 : e.title) ?? "", c);
120
- return /* @__PURE__ */ m(ne, { selected: !!i, component: "div", children: [
121
- /* @__PURE__ */ t(ee, { className: "min-w-36", children: e.icon ? /* @__PURE__ */ t(v, { children: e.icon }) : /* @__PURE__ */ t("span", { className: "w-24 text-center text-2xl font-semibold uppercase", children: (s = e == null ? void 0 : e.title) == null ? void 0 : s[0] }) }),
117
+ const c = D((e == null ? void 0 : e.title) ?? "", o), l = re((e == null ? void 0 : e.title) ?? "", c);
118
+ return /* @__PURE__ */ f(ee, { selected: !!i, component: "div", children: [
119
+ /* @__PURE__ */ t(Z, { className: "min-w-36", children: e.icon ? /* @__PURE__ */ t(w, { children: e.icon }) : /* @__PURE__ */ t("span", { className: "w-24 text-center text-2xl font-semibold uppercase", children: (s = e == null ? void 0 : e.title) == null ? void 0 : s[0] }) }),
122
120
  /* @__PURE__ */ t(
123
- te,
121
+ $,
124
122
  {
125
123
  primary: l == null ? void 0 : l.map(
126
124
  (a, p) => a.highlight ? /* @__PURE__ */ t("span", { style: { fontWeight: 600 }, children: a.text }, p) : /* @__PURE__ */ t("strong", { style: { fontWeight: 300 }, children: a.text }, p)
@@ -130,8 +128,8 @@ function M(e, { query: o, isHighlighted: i }) {
130
128
  ] });
131
129
  }
132
130
  r(M, "renderSuggestion");
133
- function de(e, o) {
134
- const i = pe(e).toLowerCase(), c = i.length;
131
+ function pe(e, o) {
132
+ const i = ce(e).toLowerCase(), c = i.length;
135
133
  let l = 0;
136
134
  return c === 0 ? [] : o.filter((s) => {
137
135
  var p;
@@ -139,19 +137,19 @@ function de(e, o) {
139
137
  return a && (l += 1), a;
140
138
  });
141
139
  }
142
- r(de, "getSuggestions");
140
+ r(pe, "getSuggestions");
143
141
  function j(e) {
144
142
  return e.title;
145
143
  }
146
144
  r(j, "getSuggestionValue");
147
- const ge = {
145
+ const he = {
148
146
  searchText: "",
149
147
  navigation: [],
150
148
  suggestions: [],
151
149
  noSuggestions: !1,
152
150
  opened: !1
153
151
  };
154
- function me(e, o) {
152
+ function de(e, o) {
155
153
  switch (o.type) {
156
154
  case "open":
157
155
  return {
@@ -175,7 +173,7 @@ function me(e, o) {
175
173
  navigation: o.data
176
174
  };
177
175
  case "updateSuggestions": {
178
- const i = de(o.value, e.navigation), l = !(typeof o.value == "string" && o.value.trim() === "") && i.length === 0;
176
+ const i = pe(o.value, e.navigation), l = !(typeof o.value == "string" && o.value.trim() === "") && i.length === 0;
179
177
  return {
180
178
  ...e,
181
179
  suggestions: i,
@@ -192,17 +190,17 @@ function me(e, o) {
192
190
  throw new Error();
193
191
  }
194
192
  }
195
- r(me, "reducer");
196
- function fe(e) {
193
+ r(de, "reducer");
194
+ function Ue(e) {
197
195
  const o = K(), {
198
196
  className: i,
199
197
  variant: c = "full",
200
- trigger: l = /* @__PURE__ */ t(k, { sx: ue, children: /* @__PURE__ */ t(v, { size: 20, children: "heroicons-outline:magnifying-glass" }) })
201
- } = e, { t: s } = _(), a = se(
202
- () => X.getFlatNavigation(o),
198
+ trigger: l = /* @__PURE__ */ t(k, { sx: le, children: /* @__PURE__ */ t(w, { size: 20, children: "heroicons-outline:magnifying-glass" }) })
199
+ } = e, { t: s } = _(), a = oe(
200
+ () => J.getFlatNavigation(o),
203
201
  [o]
204
- ), p = (e == null ? void 0 : e.placeholder) ?? s("Common.검색"), b = e.noResults ?? s("Message.검색된 결과가 없습니다..."), [u, g] = ae(me, ge), U = ce(), w = T(null), f = T(null), h = T(null);
205
- le(() => {
202
+ ), p = (e == null ? void 0 : e.placeholder) ?? s("Common.검색"), b = e.noResults ?? s("Message.검색된 결과가 없습니다..."), [u, g] = ie(de, he), U = ae(), v = T(null), m = T(null), h = T(null);
203
+ se(() => {
206
204
  g({
207
205
  type: "setNavigation",
208
206
  data: a
@@ -245,12 +243,12 @@ function fe(e) {
245
243
  }
246
244
  r(P, "handleChange");
247
245
  function V(n) {
248
- u.opened && (!f.current || !(n.target instanceof Node && f.current.contains(n.target))) && S();
246
+ u.opened && (!m.current || !(n.target instanceof Node && m.current.contains(n.target))) && S();
249
247
  }
250
248
  switch (r(V, "handleClickAway"), c) {
251
249
  case "basic":
252
- return /* @__PURE__ */ t("div", { className: W("flex w-full items-center", i), ref: h, children: /* @__PURE__ */ t(
253
- B,
250
+ return /* @__PURE__ */ t("div", { className: B("flex w-full items-center", i), ref: h, children: /* @__PURE__ */ t(
251
+ W,
254
252
  {
255
253
  renderInputComponent: A,
256
254
  highlightFirstSuggestion: !0,
@@ -263,7 +261,7 @@ function fe(e) {
263
261
  inputProps: {
264
262
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
265
263
  // @ts-ignore
266
- inputRef: /* @__PURE__ */ r((n) => w.current = n, "inputRef"),
264
+ inputRef: /* @__PURE__ */ r((n) => v.current = n, "inputRef"),
267
265
  variant: c,
268
266
  placeholder: p,
269
267
  role: "search",
@@ -288,7 +286,7 @@ function fe(e) {
288
286
  anchorEl: h.current,
289
287
  open: !!n.children || u.noSuggestions,
290
288
  className: "z-9999",
291
- children: /* @__PURE__ */ t("div", { ref: f, children: /* @__PURE__ */ m(
289
+ children: /* @__PURE__ */ t("div", { ref: m, children: /* @__PURE__ */ f(
292
290
  C,
293
291
  {
294
292
  ...N,
@@ -309,8 +307,8 @@ function fe(e) {
309
307
  }
310
308
  ) });
311
309
  case "full":
312
- return /* @__PURE__ */ m(he, { className: W("flex", i), children: [
313
- /* @__PURE__ */ t(oe, { title: s("Title.메뉴 검색"), placement: "bottom", children: /* @__PURE__ */ t(
310
+ return /* @__PURE__ */ f(ue, { className: B("flex", i), children: [
311
+ /* @__PURE__ */ t(ne, { title: s("Title.메뉴 검색"), placement: "bottom", children: /* @__PURE__ */ t(
314
312
  "div",
315
313
  {
316
314
  onClick: x,
@@ -320,9 +318,9 @@ function fe(e) {
320
318
  children: l
321
319
  }
322
320
  ) }),
323
- u.opened && /* @__PURE__ */ t($, { onClickAway: V, children: /* @__PURE__ */ t(C, { className: "absolute inset-x-0 top-0 z-9999 h-full shadow-0", square: !0, children: /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center", ref: h, children: [
321
+ u.opened && /* @__PURE__ */ t(Y, { onClickAway: V, children: /* @__PURE__ */ t(C, { className: "absolute inset-x-0 top-0 z-9999 h-full shadow-0", square: !0, children: /* @__PURE__ */ f("div", { className: "flex h-full w-full items-center", ref: h, children: [
324
322
  /* @__PURE__ */ t(
325
- B,
323
+ W,
326
324
  {
327
325
  renderInputComponent: A,
328
326
  highlightFirstSuggestion: !0,
@@ -338,7 +336,7 @@ function fe(e) {
338
336
  onChange: P,
339
337
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
340
338
  // @ts-ignore
341
- inputRef: /* @__PURE__ */ r((n) => w.current = n, "inputRef"),
339
+ inputRef: /* @__PURE__ */ r((n) => v.current = n, "inputRef"),
342
340
  InputLabelProps: {
343
341
  shrink: !0
344
342
  },
@@ -357,7 +355,7 @@ function fe(e) {
357
355
  anchorEl: h.current,
358
356
  open: !!n.children || u.noSuggestions,
359
357
  className: "z-9999",
360
- children: /* @__PURE__ */ t("div", { ref: f, children: /* @__PURE__ */ m(
358
+ children: /* @__PURE__ */ t("div", { ref: m, children: /* @__PURE__ */ f(
361
359
  C,
362
360
  {
363
361
  square: !0,
@@ -378,7 +376,7 @@ function fe(e) {
378
376
  }, "renderSuggestionsContainer")
379
377
  }
380
378
  ),
381
- /* @__PURE__ */ m(Z, { className: "mx-12", direction: "row", spacing: 1, children: [
379
+ /* @__PURE__ */ f(X, { className: "mx-12", direction: "row", spacing: 1, children: [
382
380
  /* @__PURE__ */ t(
383
381
  k,
384
382
  {
@@ -389,12 +387,12 @@ function fe(e) {
389
387
  g({
390
388
  type: "setSearchText",
391
389
  value: ""
392
- }), (n = w.current) == null || n.focus();
390
+ }), (n = v.current) == null || n.focus();
393
391
  }, "onClick"),
394
- children: /* @__PURE__ */ t(v, { children: "heroicons-outline:x-mark" })
392
+ children: /* @__PURE__ */ t(w, { children: "heroicons-outline:x-mark" })
395
393
  }
396
394
  ),
397
- /* @__PURE__ */ t(k, { sx: { color: F[600] }, size: "large", onClick: S, children: /* @__PURE__ */ t(Y, {}) })
395
+ /* @__PURE__ */ t(k, { sx: { color: F[600] }, size: "large", onClick: S, children: /* @__PURE__ */ t(Q, {}) })
398
396
  ] })
399
397
  ] }) }) })
400
398
  ] });
@@ -402,11 +400,8 @@ function fe(e) {
402
400
  return null;
403
401
  }
404
402
  }
405
- r(fe, "NavigationSearchToggle");
406
- const _e = Q([J])(
407
- fe
408
- );
403
+ r(Ue, "NavigationSearchToggle");
409
404
  export {
410
- _e as default
405
+ Ue as default
411
406
  };
412
407
  //# sourceMappingURL=NavigationSearchToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationSearchToggle.js","sources":["../../../../src/layout/components/toggles/NavigationSearchToggle.tsx"],"sourcesContent":["import { OwpSvgIcon } from '@/components/OwpSvgIcon';\nimport { useGetNavigationList } from '@/hooks/useNavigation';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport { navigationSlice } from '@/store/navigationSlice';\nimport { withSlices } from '@/store/withSlices';\nimport type { OwpFlatNavItemType as FlatNavItemType } from '@/types/OwpNavigationTypes';\nimport { OwpNavigationHelper as NavigationHelper } from '@/utils/navigationUtils';\nimport UnfoldLessIcon from '@mui/icons-material/UnfoldLess';\nimport { Stack } from '@mui/material';\nimport ClickAwayListener from '@mui/material/ClickAwayListener';\nimport { grey } from '@mui/material/colors';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport MenuItem from '@mui/material/MenuItem';\nimport Paper from '@mui/material/Paper';\nimport Popper from '@mui/material/Popper';\nimport { styled } from '@mui/material/styles';\nimport TextField from '@mui/material/TextField';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\nimport match from 'autosuggest-highlight/match';\nimport parse from 'autosuggest-highlight/parse';\nimport clsx from 'clsx';\nimport { trim } from 'es-toolkit/compat';\nimport { type FormEvent, type ReactNode, useEffect, useMemo, useReducer, useRef } from 'react';\nimport Autosuggest, {\n ChangeEvent,\n RenderInputComponentProps,\n RenderSuggestionParams,\n} from 'react-autosuggest';\nimport { useNavigate } from 'react-router-dom';\nimport { toolbarToggleSx } from './toggleStyles';\n\nconst Root = styled('div')(({ theme }) => ({\n '& .OwpSearch-container': {\n position: 'relative',\n },\n '& .OwpSearch-suggestionsContainerOpen': {\n position: 'absolute',\n zIndex: 1,\n marginTop: theme.spacing(),\n left: 0,\n right: 0,\n },\n '& .OwpSearch-suggestion': {\n display: 'block',\n },\n '& .OwpSearch-suggestionsList': {\n margin: 0,\n padding: 0,\n listStyleType: 'none',\n },\n '& .OwpSearch-input': {\n transition: theme.transitions.create(['background-color'], {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.short,\n }),\n '&:focus': {\n backgroundColor: theme.palette.background.paper,\n },\n },\n}));\n\ntype RenderInputComponentType = {\n variant?: 'basic' | 'standard';\n inputRef?: (node: HTMLInputElement) => void;\n ref?: (node: HTMLInputElement) => void;\n key?: string;\n};\n\nfunction renderInputComponent(props: RenderInputComponentProps) {\n const { variant, ref, inputRef = () => {}, key, ...other } = props as RenderInputComponentType;\n return (\n <div className=\"relative w-full\" key={key}>\n {variant === 'basic' ? (\n \n <>\n <TextField\n fullWidth\n autoComplete=\"off\"\n variant=\"outlined\"\n {...other}\n slotProps={{\n input: {\n name: 'auto-complete-search',\n role: 'search',\n inputRef: (node: HTMLInputElement) => {\n ref?.(node);\n inputRef(node);\n },\n classes: {\n input: 'OwpSearch-input py-0 px-16 h-36 md:h-36 ltr:pr-36 rtl:pl-36',\n notchedOutline: 'rounded-lg',\n },\n },\n }}\n />\n <OwpSvgIcon\n className=\"pointer-events-none absolute top-0 h-36 w-36 p-8 ltr:right-0 rtl:left-0\"\n color=\"action\"\n size={20}\n >\n heroicons-outline:magnifying-glass\n </OwpSvgIcon>\n </>\n ) : (\n \n <TextField\n fullWidth\n variant=\"standard\"\n {...other}\n slotProps={{\n input: {\n disableUnderline: true,\n inputRef: (node: HTMLInputElement) => {\n ref?.(node);\n inputRef(node);\n },\n classes: {\n input: 'OwpSearch-input py-0 px-16 h-36',\n },\n },\n }}\n />\n )}\n </div>\n );\n}\n\nfunction renderSuggestion(\n suggestion: FlatNavItemType,\n { query, isHighlighted }: RenderSuggestionParams,\n) {\n const matches = match(suggestion?.title ?? '', query);\n const parts = parse(suggestion?.title ?? '', matches);\n\n return (\n <MenuItem selected={Boolean(isHighlighted)} component=\"div\">\n <ListItemIcon className=\"min-w-36\">\n {suggestion.icon ? (\n <OwpSvgIcon>{suggestion.icon}</OwpSvgIcon>\n ) : (\n <span className=\"w-24 text-center text-2xl font-semibold uppercase\">\n {suggestion?.title?.[0]}\n </span>\n )}\n </ListItemIcon>\n <ListItemText\n primary={parts?.map((part: { text: string; highlight?: boolean }, index: number) =>\n part.highlight ? (\n <span key={index} style={{ fontWeight: 600 }}>\n {part.text}\n </span>\n ) : (\n <strong key={index} style={{ fontWeight: 300 }}>\n {part.text}\n </strong>\n ),\n )}\n />\n </MenuItem>\n );\n}\n\nfunction getSuggestions(value: string, data: FlatNavItemType[]): FlatNavItemType[] {\n const inputValue = trim(value).toLowerCase();\n const inputLength = inputValue.length;\n let count = 0;\n\n if (inputLength === 0) {\n return [];\n }\n\n return data.filter((suggestion) => {\n const keep =\n count < 10 &&\n suggestion?.title &&\n match(suggestion?.title ?? '', inputValue, { requireMatchAll: true })?.length > 0;\n\n if (keep) {\n count += 1;\n }\n\n return keep;\n });\n}\n\nfunction getSuggestionValue(suggestion: FlatNavItemType) {\n return suggestion.title;\n}\n\ntype StateType = {\n searchText: string;\n navigation: FlatNavItemType[];\n suggestions: FlatNavItemType[];\n noSuggestions: boolean;\n opened: boolean;\n};\n\nconst initialState: StateType = {\n searchText: '',\n navigation: [],\n suggestions: [],\n noSuggestions: false,\n opened: false,\n};\n\ntype ActionType =\n | { type: 'setSearchText'; value: string }\n | { type: 'setNavigation'; data: FlatNavItemType[] }\n | { type: 'updateSuggestions'; value: string }\n | { type: 'clearSuggestions' }\n | { type: 'open' }\n | { type: 'close' };\n\nfunction reducer(state: StateType, action: ActionType): StateType {\n switch (action.type) {\n case 'open': {\n return {\n ...state,\n opened: true,\n };\n }\n case 'close': {\n return {\n ...state,\n opened: false,\n searchText: '',\n };\n }\n case 'setSearchText': {\n return {\n ...state,\n searchText: action.value,\n };\n }\n case 'setNavigation': {\n return {\n ...state,\n navigation: action.data,\n };\n }\n case 'updateSuggestions': {\n const suggestions = getSuggestions(action.value, state.navigation);\n const isInputBlank = typeof action.value === 'string' && action.value.trim() === '';\n const noSuggestions = !isInputBlank && suggestions.length === 0;\n\n return {\n ...state,\n suggestions,\n noSuggestions,\n };\n }\n case 'clearSuggestions': {\n return {\n ...state,\n suggestions: [],\n noSuggestions: false,\n };\n }\n default: {\n throw new Error();\n }\n }\n}\n\n/**\n * Props for navigation search toggle.\n */\ntype NavigationSearchToggleProps = {\n className?: string;\n variant?: 'basic' | 'full';\n trigger?: ReactNode;\n placeholder?: string;\n noResults?: string;\n};\n\n/**\n * Navigation search toggle.\n */\nfunction NavigationSearchToggle(props: NavigationSearchToggleProps) {\n const navigation = useGetNavigationList();\n const {\n className,\n variant = 'full',\n trigger = (\n <IconButton sx={toolbarToggleSx}>\n <OwpSvgIcon size={20}>heroicons-outline:magnifying-glass</OwpSvgIcon>\n </IconButton>\n ),\n } = props;\n const { t } = useOwpTranslation();\n const flatNavigation = useMemo(\n () => NavigationHelper.getFlatNavigation(navigation) as FlatNavItemType[],\n [navigation],\n );\n const placeholder = props?.placeholder ?? t('Common.검색');\n const noResults = props.noResults ?? t('Message.검색된 결과가 없습니다...');\n\n const [state, dispatch] = useReducer(reducer, initialState);\n const navigate = useNavigate();\n\n const inputRef = useRef<HTMLInputElement>(null);\n const suggestionsNode = useRef<HTMLDivElement>(null);\n const popperNode = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n dispatch({\n type: 'setNavigation',\n data: flatNavigation,\n });\n }, [flatNavigation]);\n\n function showSearch() {\n dispatch({ type: 'open' });\n document.addEventListener('keydown', escFunction, false);\n }\n\n function hideSearch() {\n dispatch({ type: 'close' });\n document.removeEventListener('keydown', escFunction, false);\n }\n\n function escFunction(event: KeyboardEvent) {\n if (event.key === 'Esc' || event.key === 'Escape') {\n hideSearch();\n }\n }\n\n function handleSuggestionsFetchRequested({ value }: { value: string }) {\n dispatch({\n type: 'updateSuggestions',\n value,\n });\n }\n\n function handleSuggestionSelected(\n event: FormEvent<unknown>,\n { suggestion }: { suggestion: FlatNavItemType },\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n if (!suggestion.url) {\n return;\n }\n\n navigate(suggestion.url);\n hideSearch();\n }\n\n function handleSuggestionsClearRequested() {\n dispatch({\n type: 'clearSuggestions',\n });\n }\n\n function handleChange(_event: FormEvent<HTMLElement>, { newValue }: ChangeEvent) {\n dispatch({\n type: 'setSearchText',\n value: newValue,\n });\n }\n\n function handleClickAway(event: MouseEvent | TouchEvent) {\n if (\n state.opened &&\n (!suggestionsNode.current ||\n !(event.target instanceof Node && suggestionsNode.current.contains(event.target)))\n ) {\n hideSearch();\n }\n }\n\n switch (variant) {\n case 'basic': {\n return (\n <div className={clsx('flex w-full items-center', className)} ref={popperNode}>\n <Autosuggest\n renderInputComponent={renderInputComponent}\n highlightFirstSuggestion\n suggestions={state.suggestions}\n onSuggestionsFetchRequested={handleSuggestionsFetchRequested}\n onSuggestionsClearRequested={handleSuggestionsClearRequested}\n onSuggestionSelected={handleSuggestionSelected}\n getSuggestionValue={getSuggestionValue}\n renderSuggestion={renderSuggestion}\n inputProps={{\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n inputRef: (node) => (inputRef.current = node),\n variant,\n placeholder,\n role: 'search',\n value: state.searchText,\n onChange: handleChange,\n onFocus: showSearch,\n InputLabelProps: {\n shrink: true,\n },\n autoFocus: false,\n }}\n theme={{\n container: 'flex flex-1 w-full',\n suggestionsList: 'OwpSearch-suggestionsList',\n suggestion: 'OwpSearch-suggestion',\n }}\n renderSuggestionsContainer={(options) => {\n const { containerProps } = options;\n const { key, ...restContainerProps } = containerProps;\n\n return (\n <Popper\n anchorEl={popperNode.current}\n open={Boolean(options.children) || state.noSuggestions}\n className=\"z-9999\"\n >\n <div ref={suggestionsNode}>\n <Paper\n key={key}\n {...restContainerProps}\n style={{\n width: popperNode.current ? popperNode.current.clientWidth : '',\n }}\n className=\"overflow-hidden rounded-lg shadow-lg\"\n >\n {options.children}\n {state.noSuggestions && (\n <Typography className=\"px-16 py-12\">{noResults}</Typography>\n )}\n </Paper>\n </div>\n </Popper>\n );\n }}\n />\n </div>\n );\n }\n case 'full': {\n return (\n <Root className={clsx('flex', className)}>\n <Tooltip title={t('Title.메뉴 검색')} placement=\"bottom\">\n <div\n onClick={showSearch}\n onKeyDown={showSearch}\n role=\"button\"\n tabIndex={0}\n >\n {trigger}\n </div>\n </Tooltip>\n\n {state.opened && (\n <ClickAwayListener onClickAway={handleClickAway}>\n <Paper className=\"absolute inset-x-0 top-0 z-9999 h-full shadow-0\" square>\n <div className=\"flex h-full w-full items-center\" ref={popperNode}>\n <Autosuggest\n renderInputComponent={renderInputComponent}\n highlightFirstSuggestion\n suggestions={state.suggestions}\n onSuggestionsFetchRequested={handleSuggestionsFetchRequested}\n onSuggestionsClearRequested={handleSuggestionsClearRequested}\n onSuggestionSelected={handleSuggestionSelected}\n getSuggestionValue={getSuggestionValue}\n renderSuggestion={renderSuggestion}\n inputProps={{\n placeholder,\n value: state.searchText,\n onChange: handleChange,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n inputRef: (node) => (inputRef.current = node),\n InputLabelProps: {\n shrink: true,\n },\n autoFocus: true,\n }}\n theme={{\n container: 'flex flex-1 w-full',\n suggestionsList: 'OwpSearch-suggestionsList',\n suggestion: 'OwpSearch-suggestion',\n }}\n renderSuggestionsContainer={(options) => {\n const { containerProps } = options;\n const { key, ...restContainerProps } = containerProps;\n\n return (\n <Popper\n anchorEl={popperNode.current}\n open={Boolean(options.children) || state.noSuggestions}\n className=\"z-9999\"\n >\n <div ref={suggestionsNode}>\n <Paper\n square\n key={key}\n {...restContainerProps}\n className=\"shadow-lg\"\n style={{\n width: popperNode.current ? popperNode.current.clientWidth : 'auto',\n }}\n >\n {options.children}\n {state.noSuggestions && (\n <Typography className=\"px-16 py-12\">{noResults}</Typography>\n )}\n </Paper>\n </div>\n </Popper>\n );\n }}\n />\n <Stack className=\"mx-12\" direction=\"row\" spacing={1}>\n <IconButton\n size=\"large\"\n sx={{ color: grey[600] }}\n onClick={() => {\n dispatch({\n type: 'setSearchText',\n value: '',\n });\n inputRef.current?.focus();\n }}\n >\n <OwpSvgIcon>heroicons-outline:x-mark</OwpSvgIcon>\n </IconButton>\n <IconButton sx={{ color: grey[600] }} size=\"large\" onClick={hideSearch}>\n <UnfoldLessIcon />\n </IconButton>\n </Stack>\n </div>\n </Paper>\n </ClickAwayListener>\n )}\n </Root>\n );\n }\n default: {\n return null;\n }\n }\n}\n\n/**\n * Memoized navigation search toggle.\n */\nconst NavigationSearchToggleWithSlices = withSlices<NavigationSearchToggleProps>([navigationSlice])(\n NavigationSearchToggle,\n);\n\nexport default NavigationSearchToggleWithSlices;\n"],"names":["Root","styled","theme","renderInputComponent","props","variant","ref","inputRef","__name","key","other","jsxs","Fragment","jsx","TextField","node","OwpSvgIcon","renderSuggestion","suggestion","query","isHighlighted","matches","match","parts","parse","MenuItem","ListItemIcon","ListItemText","part","index","getSuggestions","value","data","inputValue","trim","inputLength","count","keep","_a","getSuggestionValue","initialState","reducer","state","action","suggestions","noSuggestions","NavigationSearchToggle","navigation","useGetNavigationList","className","trigger","IconButton","toolbarToggleSx","t","useOwpTranslation","flatNavigation","useMemo","NavigationHelper","placeholder","noResults","dispatch","useReducer","navigate","useNavigate","useRef","suggestionsNode","popperNode","useEffect","showSearch","escFunction","hideSearch","event","handleSuggestionsFetchRequested","handleSuggestionSelected","handleSuggestionsClearRequested","handleChange","_event","newValue","handleClickAway","clsx","Autosuggest","options","containerProps","restContainerProps","Popper","Paper","Typography","Tooltip","ClickAwayListener","Stack","grey","UnfoldLessIcon","NavigationSearchToggleWithSlices","withSlices","navigationSlice"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAMA,KAAOC,GAAO,KAAK,EAAE,CAAC,EAAE,OAAAC,SAAa;AAAA,EACzC,0BAA0B;AAAA,IACxB,UAAU;AAAA,EAAA;AAAA,EAEZ,yCAAyC;AAAA,IACvC,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,WAAWA,EAAM,QAAA;AAAA,IACjB,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAAA,EAET,2BAA2B;AAAA,IACzB,SAAS;AAAA,EAAA;AAAA,EAEX,gCAAgC;AAAA,IAC9B,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,eAAe;AAAA,EAAA;AAAA,EAEjB,sBAAsB;AAAA,IACpB,YAAYA,EAAM,YAAY,OAAO,CA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
+ {"version":3,"file":"NavigationSearchToggle.js","sources":["../../../../src/layout/components/toggles/NavigationSearchToggle.tsx"],"sourcesContent":["import { OwpSvgIcon } from '@/components/OwpSvgIcon';\nimport { useGetNavigationList } from '@/hooks/useNavigation';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport type { OwpFlatNavItemType as FlatNavItemType } from '@/types/OwpNavigationTypes';\nimport { OwpNavigationHelper as NavigationHelper } from '@/utils/navigationUtils';\nimport UnfoldLessIcon from '@mui/icons-material/UnfoldLess';\nimport { Stack } from '@mui/material';\nimport ClickAwayListener from '@mui/material/ClickAwayListener';\nimport { grey } from '@mui/material/colors';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport MenuItem from '@mui/material/MenuItem';\nimport Paper from '@mui/material/Paper';\nimport Popper from '@mui/material/Popper';\nimport { styled } from '@mui/material/styles';\nimport TextField from '@mui/material/TextField';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\nimport match from 'autosuggest-highlight/match';\nimport parse from 'autosuggest-highlight/parse';\nimport clsx from 'clsx';\nimport { trim } from 'es-toolkit/compat';\nimport { type FormEvent, type ReactNode, useEffect, useMemo, useReducer, useRef } from 'react';\nimport Autosuggest, {\n ChangeEvent,\n RenderInputComponentProps,\n RenderSuggestionParams,\n} from 'react-autosuggest';\nimport { useNavigate } from 'react-router-dom';\nimport { toolbarToggleSx } from './toggleStyles';\n\nconst Root = styled('div')(({ theme }) => ({\n '& .OwpSearch-container': {\n position: 'relative',\n },\n '& .OwpSearch-suggestionsContainerOpen': {\n position: 'absolute',\n zIndex: 1,\n marginTop: theme.spacing(),\n left: 0,\n right: 0,\n },\n '& .OwpSearch-suggestion': {\n display: 'block',\n },\n '& .OwpSearch-suggestionsList': {\n margin: 0,\n padding: 0,\n listStyleType: 'none',\n },\n '& .OwpSearch-input': {\n transition: theme.transitions.create(['background-color'], {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.short,\n }),\n '&:focus': {\n backgroundColor: theme.palette.background.paper,\n },\n },\n}));\n\ntype RenderInputComponentType = {\n variant?: 'basic' | 'standard';\n inputRef?: (node: HTMLInputElement) => void;\n ref?: (node: HTMLInputElement) => void;\n key?: string;\n};\n\nfunction renderInputComponent(props: RenderInputComponentProps) {\n const { variant, ref, inputRef = () => {}, key, ...other } = props as RenderInputComponentType;\n return (\n <div className=\"relative w-full\" key={key}>\n {variant === 'basic' ? (\n \n <>\n <TextField\n fullWidth\n autoComplete=\"off\"\n variant=\"outlined\"\n {...other}\n slotProps={{\n input: {\n name: 'auto-complete-search',\n role: 'search',\n inputRef: (node: HTMLInputElement) => {\n ref?.(node);\n inputRef(node);\n },\n classes: {\n input: 'OwpSearch-input py-0 px-16 h-36 md:h-36 ltr:pr-36 rtl:pl-36',\n notchedOutline: 'rounded-lg',\n },\n },\n }}\n />\n <OwpSvgIcon\n className=\"pointer-events-none absolute top-0 h-36 w-36 p-8 ltr:right-0 rtl:left-0\"\n color=\"action\"\n size={20}\n >\n heroicons-outline:magnifying-glass\n </OwpSvgIcon>\n </>\n ) : (\n \n <TextField\n fullWidth\n variant=\"standard\"\n {...other}\n slotProps={{\n input: {\n disableUnderline: true,\n inputRef: (node: HTMLInputElement) => {\n ref?.(node);\n inputRef(node);\n },\n classes: {\n input: 'OwpSearch-input py-0 px-16 h-36',\n },\n },\n }}\n />\n )}\n </div>\n );\n}\n\nfunction renderSuggestion(\n suggestion: FlatNavItemType,\n { query, isHighlighted }: RenderSuggestionParams,\n) {\n const matches = match(suggestion?.title ?? '', query);\n const parts = parse(suggestion?.title ?? '', matches);\n\n return (\n <MenuItem selected={Boolean(isHighlighted)} component=\"div\">\n <ListItemIcon className=\"min-w-36\">\n {suggestion.icon ? (\n <OwpSvgIcon>{suggestion.icon}</OwpSvgIcon>\n ) : (\n <span className=\"w-24 text-center text-2xl font-semibold uppercase\">\n {suggestion?.title?.[0]}\n </span>\n )}\n </ListItemIcon>\n <ListItemText\n primary={parts?.map((part: { text: string; highlight?: boolean }, index: number) =>\n part.highlight ? (\n <span key={index} style={{ fontWeight: 600 }}>\n {part.text}\n </span>\n ) : (\n <strong key={index} style={{ fontWeight: 300 }}>\n {part.text}\n </strong>\n ),\n )}\n />\n </MenuItem>\n );\n}\n\nfunction getSuggestions(value: string, data: FlatNavItemType[]): FlatNavItemType[] {\n const inputValue = trim(value).toLowerCase();\n const inputLength = inputValue.length;\n let count = 0;\n\n if (inputLength === 0) {\n return [];\n }\n\n return data.filter((suggestion) => {\n const keep =\n count < 10 &&\n suggestion?.title &&\n match(suggestion?.title ?? '', inputValue, { requireMatchAll: true })?.length > 0;\n\n if (keep) {\n count += 1;\n }\n\n return keep;\n });\n}\n\nfunction getSuggestionValue(suggestion: FlatNavItemType) {\n return suggestion.title;\n}\n\ntype StateType = {\n searchText: string;\n navigation: FlatNavItemType[];\n suggestions: FlatNavItemType[];\n noSuggestions: boolean;\n opened: boolean;\n};\n\nconst initialState: StateType = {\n searchText: '',\n navigation: [],\n suggestions: [],\n noSuggestions: false,\n opened: false,\n};\n\ntype ActionType =\n | { type: 'setSearchText'; value: string }\n | { type: 'setNavigation'; data: FlatNavItemType[] }\n | { type: 'updateSuggestions'; value: string }\n | { type: 'clearSuggestions' }\n | { type: 'open' }\n | { type: 'close' };\n\nfunction reducer(state: StateType, action: ActionType): StateType {\n switch (action.type) {\n case 'open': {\n return {\n ...state,\n opened: true,\n };\n }\n case 'close': {\n return {\n ...state,\n opened: false,\n searchText: '',\n };\n }\n case 'setSearchText': {\n return {\n ...state,\n searchText: action.value,\n };\n }\n case 'setNavigation': {\n return {\n ...state,\n navigation: action.data,\n };\n }\n case 'updateSuggestions': {\n const suggestions = getSuggestions(action.value, state.navigation);\n const isInputBlank = typeof action.value === 'string' && action.value.trim() === '';\n const noSuggestions = !isInputBlank && suggestions.length === 0;\n\n return {\n ...state,\n suggestions,\n noSuggestions,\n };\n }\n case 'clearSuggestions': {\n return {\n ...state,\n suggestions: [],\n noSuggestions: false,\n };\n }\n default: {\n throw new Error();\n }\n }\n}\n\n/**\n * Props for navigation search toggle.\n */\ntype NavigationSearchToggleProps = {\n className?: string;\n variant?: 'basic' | 'full';\n trigger?: ReactNode;\n placeholder?: string;\n noResults?: string;\n};\n\n/**\n * Navigation search toggle.\n */\nfunction NavigationSearchToggle(props: NavigationSearchToggleProps) {\n const navigation = useGetNavigationList();\n const {\n className,\n variant = 'full',\n trigger = (\n <IconButton sx={toolbarToggleSx}>\n <OwpSvgIcon size={20}>heroicons-outline:magnifying-glass</OwpSvgIcon>\n </IconButton>\n ),\n } = props;\n const { t } = useOwpTranslation();\n const flatNavigation = useMemo(\n () => NavigationHelper.getFlatNavigation(navigation) as FlatNavItemType[],\n [navigation],\n );\n const placeholder = props?.placeholder ?? t('Common.검색');\n const noResults = props.noResults ?? t('Message.검색된 결과가 없습니다...');\n\n const [state, dispatch] = useReducer(reducer, initialState);\n const navigate = useNavigate();\n\n const inputRef = useRef<HTMLInputElement>(null);\n const suggestionsNode = useRef<HTMLDivElement>(null);\n const popperNode = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n dispatch({\n type: 'setNavigation',\n data: flatNavigation,\n });\n }, [flatNavigation]);\n\n function showSearch() {\n dispatch({ type: 'open' });\n document.addEventListener('keydown', escFunction, false);\n }\n\n function hideSearch() {\n dispatch({ type: 'close' });\n document.removeEventListener('keydown', escFunction, false);\n }\n\n function escFunction(event: KeyboardEvent) {\n if (event.key === 'Esc' || event.key === 'Escape') {\n hideSearch();\n }\n }\n\n function handleSuggestionsFetchRequested({ value }: { value: string }) {\n dispatch({\n type: 'updateSuggestions',\n value,\n });\n }\n\n function handleSuggestionSelected(\n event: FormEvent<unknown>,\n { suggestion }: { suggestion: FlatNavItemType },\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n if (!suggestion.url) {\n return;\n }\n\n navigate(suggestion.url);\n hideSearch();\n }\n\n function handleSuggestionsClearRequested() {\n dispatch({\n type: 'clearSuggestions',\n });\n }\n\n function handleChange(_event: FormEvent<HTMLElement>, { newValue }: ChangeEvent) {\n dispatch({\n type: 'setSearchText',\n value: newValue,\n });\n }\n\n function handleClickAway(event: MouseEvent | TouchEvent) {\n if (\n state.opened &&\n (!suggestionsNode.current ||\n !(event.target instanceof Node && suggestionsNode.current.contains(event.target)))\n ) {\n hideSearch();\n }\n }\n\n switch (variant) {\n case 'basic': {\n return (\n <div className={clsx('flex w-full items-center', className)} ref={popperNode}>\n <Autosuggest\n renderInputComponent={renderInputComponent}\n highlightFirstSuggestion\n suggestions={state.suggestions}\n onSuggestionsFetchRequested={handleSuggestionsFetchRequested}\n onSuggestionsClearRequested={handleSuggestionsClearRequested}\n onSuggestionSelected={handleSuggestionSelected}\n getSuggestionValue={getSuggestionValue}\n renderSuggestion={renderSuggestion}\n inputProps={{\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n inputRef: (node) => (inputRef.current = node),\n variant,\n placeholder,\n role: 'search',\n value: state.searchText,\n onChange: handleChange,\n onFocus: showSearch,\n InputLabelProps: {\n shrink: true,\n },\n autoFocus: false,\n }}\n theme={{\n container: 'flex flex-1 w-full',\n suggestionsList: 'OwpSearch-suggestionsList',\n suggestion: 'OwpSearch-suggestion',\n }}\n renderSuggestionsContainer={(options) => {\n const { containerProps } = options;\n const { key, ...restContainerProps } = containerProps;\n\n return (\n <Popper\n anchorEl={popperNode.current}\n open={Boolean(options.children) || state.noSuggestions}\n className=\"z-9999\"\n >\n <div ref={suggestionsNode}>\n <Paper\n key={key}\n {...restContainerProps}\n style={{\n width: popperNode.current ? popperNode.current.clientWidth : '',\n }}\n className=\"overflow-hidden rounded-lg shadow-lg\"\n >\n {options.children}\n {state.noSuggestions && (\n <Typography className=\"px-16 py-12\">{noResults}</Typography>\n )}\n </Paper>\n </div>\n </Popper>\n );\n }}\n />\n </div>\n );\n }\n case 'full': {\n return (\n <Root className={clsx('flex', className)}>\n <Tooltip title={t('Title.메뉴 검색')} placement=\"bottom\">\n <div\n onClick={showSearch}\n onKeyDown={showSearch}\n role=\"button\"\n tabIndex={0}\n >\n {trigger}\n </div>\n </Tooltip>\n\n {state.opened && (\n <ClickAwayListener onClickAway={handleClickAway}>\n <Paper className=\"absolute inset-x-0 top-0 z-9999 h-full shadow-0\" square>\n <div className=\"flex h-full w-full items-center\" ref={popperNode}>\n <Autosuggest\n renderInputComponent={renderInputComponent}\n highlightFirstSuggestion\n suggestions={state.suggestions}\n onSuggestionsFetchRequested={handleSuggestionsFetchRequested}\n onSuggestionsClearRequested={handleSuggestionsClearRequested}\n onSuggestionSelected={handleSuggestionSelected}\n getSuggestionValue={getSuggestionValue}\n renderSuggestion={renderSuggestion}\n inputProps={{\n placeholder,\n value: state.searchText,\n onChange: handleChange,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n inputRef: (node) => (inputRef.current = node),\n InputLabelProps: {\n shrink: true,\n },\n autoFocus: true,\n }}\n theme={{\n container: 'flex flex-1 w-full',\n suggestionsList: 'OwpSearch-suggestionsList',\n suggestion: 'OwpSearch-suggestion',\n }}\n renderSuggestionsContainer={(options) => {\n const { containerProps } = options;\n const { key, ...restContainerProps } = containerProps;\n\n return (\n <Popper\n anchorEl={popperNode.current}\n open={Boolean(options.children) || state.noSuggestions}\n className=\"z-9999\"\n >\n <div ref={suggestionsNode}>\n <Paper\n square\n key={key}\n {...restContainerProps}\n className=\"shadow-lg\"\n style={{\n width: popperNode.current ? popperNode.current.clientWidth : 'auto',\n }}\n >\n {options.children}\n {state.noSuggestions && (\n <Typography className=\"px-16 py-12\">{noResults}</Typography>\n )}\n </Paper>\n </div>\n </Popper>\n );\n }}\n />\n <Stack className=\"mx-12\" direction=\"row\" spacing={1}>\n <IconButton\n size=\"large\"\n sx={{ color: grey[600] }}\n onClick={() => {\n dispatch({\n type: 'setSearchText',\n value: '',\n });\n inputRef.current?.focus();\n }}\n >\n <OwpSvgIcon>heroicons-outline:x-mark</OwpSvgIcon>\n </IconButton>\n <IconButton sx={{ color: grey[600] }} size=\"large\" onClick={hideSearch}>\n <UnfoldLessIcon />\n </IconButton>\n </Stack>\n </div>\n </Paper>\n </ClickAwayListener>\n )}\n </Root>\n );\n }\n default: {\n return null;\n }\n }\n}\n\n/**\n * Memoized navigation search toggle.\n */\nexport default NavigationSearchToggle;\n"],"names":["Root","styled","theme","renderInputComponent","props","variant","ref","inputRef","__name","key","other","jsxs","Fragment","jsx","TextField","node","OwpSvgIcon","renderSuggestion","suggestion","query","isHighlighted","matches","match","parts","parse","MenuItem","ListItemIcon","ListItemText","part","index","getSuggestions","value","data","inputValue","trim","inputLength","count","keep","_a","getSuggestionValue","initialState","reducer","state","action","suggestions","noSuggestions","NavigationSearchToggle","navigation","useGetNavigationList","className","trigger","IconButton","toolbarToggleSx","t","useOwpTranslation","flatNavigation","useMemo","NavigationHelper","placeholder","noResults","dispatch","useReducer","navigate","useNavigate","useRef","suggestionsNode","popperNode","useEffect","showSearch","escFunction","hideSearch","event","handleSuggestionsFetchRequested","handleSuggestionSelected","handleSuggestionsClearRequested","handleChange","_event","newValue","handleClickAway","clsx","Autosuggest","options","containerProps","restContainerProps","Popper","Paper","Typography","Tooltip","ClickAwayListener","Stack","grey","UnfoldLessIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAMA,KAAOC,GAAO,KAAK,EAAE,CAAC,EAAE,OAAAC,SAAa;AAAA,EACzC,0BAA0B;AAAA,IACxB,UAAU;AAAA,EAAA;AAAA,EAEZ,yCAAyC;AAAA,IACvC,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,WAAWA,EAAM,QAAA;AAAA,IACjB,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAAA,EAET,2BAA2B;AAAA,IACzB,SAAS;AAAA,EAAA;AAAA,EAEX,gCAAgC;AAAA,IAC9B,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,eAAe;AAAA,EAAA;AAAA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35 @@ var r = (s, e) => P(s, "name", { value: e, configurable: !0 });
3
3
  import { jsxs as p, jsx as t } 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
4
  import { useGetNavigationList as D } from "../../../hooks/useNavigation.js";
5
5
  import { useOwpTranslation as G } from "../../../hooks/useOwpTranslation.js";
6
- import { useSetShortcuts as W, useGetShortcuts as A } from "../../../hooks/useShortcuts.js";
7
- import { navigationSlice as F } from "../../../store/navigationSlice.js";
8
- import { withSlices as H } from "../../../store/withSlices.js";
9
- import { OwpNavigationHelper as U } from "../../../utils/navigationUtils.js";
10
- import q from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Clear.js";
6
+ import { useSetShortcuts as A, useGetShortcuts as F } from "../../../hooks/useShortcuts.js";
7
+ import { OwpNavigationHelper as H } from "../../../utils/navigationUtils.js";
8
+ import U from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Clear.js";
11
9
  import M from "@mui/material/Box";
12
10
  import { amber as L, grey as k } from "@mui/material/colors";
13
- import J from "@mui/material/Divider";
11
+ import W from "@mui/material/Divider";
14
12
  import x from "@mui/material/IconButton";
15
- import K from "@mui/material/Input";
16
- import Q from "@mui/material/ListItemIcon";
17
- import R from "@mui/material/ListItemText";
18
- import V from "@mui/material/Menu";
19
- import X from "@mui/material/MenuItem";
20
- import Y from "@mui/material/Tooltip";
21
- import Z from "@mui/material/Typography";
13
+ import q from "@mui/material/Input";
14
+ import J from "@mui/material/ListItemIcon";
15
+ import K from "@mui/material/ListItemText";
16
+ import Q from "@mui/material/Menu";
17
+ import R from "@mui/material/MenuItem";
18
+ import V from "@mui/material/Tooltip";
19
+ import X from "@mui/material/Typography";
22
20
  import { clsx as y } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
23
- import { useRef as $, useState as z, useMemo as g } from "react";
24
- import { Link as _ } from "react-router-dom";
25
- import { toolbarToggleSx as oo } from "./toggleStyles.js";
26
- import { find as to } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/find.js";
27
- import { OwpSvgIcon as S } from "../../../components/OwpSvgIcon/OwpSvgIcon.js";
28
- import { xor as eo } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/xor.js";
29
- function ro(s) {
30
- const { variant: e = "horizontal", className: d = "" } = s, i = $(null), [c, v] = z(null), [n, f] = z(""), T = D(), B = W(), a = A(), { t: h } = G(), m = g(
31
- () => U.getFlatNavigation(T),
21
+ import { useRef as Y, useState as z, useMemo as g } from "react";
22
+ import { Link as Z } from "react-router-dom";
23
+ import { toolbarToggleSx as $ } from "./toggleStyles.js";
24
+ import { find as _ } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/find.js";
25
+ import { OwpSvgIcon as v } from "../../../components/OwpSvgIcon/OwpSvgIcon.js";
26
+ import { xor as oo } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/xor.js";
27
+ function yo(s) {
28
+ const { variant: e = "horizontal", className: d = "" } = s, i = Y(null), [c, S] = z(null), [n, f] = z(""), T = D(), B = A(), a = F(), { t: h } = G(), m = g(
29
+ () => H.getFlatNavigation(T),
32
30
  [T]
33
31
  ), u = g(
34
- () => a.map((o) => to(m, { id: o })).filter((o) => !!o),
32
+ () => a.map((o) => _(m, { id: o })).filter((o) => !!o),
35
33
  [m, a]
36
- ), N = g(() => {
34
+ ), C = g(() => {
37
35
  if (!n || !m)
38
36
  return [];
39
37
  const o = n.toLowerCase();
@@ -45,22 +43,22 @@ function ro(s) {
45
43
  );
46
44
  }, [m, n]);
47
45
  function j(o) {
48
- v(o.currentTarget);
46
+ S(o.currentTarget);
49
47
  }
50
48
  r(j, "addMenuClick");
51
49
  function E() {
52
- v(null);
50
+ S(null);
53
51
  }
54
52
  r(E, "addMenuClose");
55
53
  function O(o) {
56
54
  f(o.target.value);
57
55
  }
58
56
  r(O, "search");
59
- function C(o) {
57
+ function N(o) {
60
58
  let l = [...a];
61
- l = eo(l, [o]), B(l);
59
+ l = oo(l, [o]), B(l);
62
60
  }
63
- return r(C, "toggleInShortcuts"), /* @__PURE__ */ p(
61
+ return r(N, "toggleInShortcuts"), /* @__PURE__ */ p(
64
62
  M,
65
63
  {
66
64
  className: y(
@@ -77,17 +75,17 @@ function ro(s) {
77
75
  e === "vertical" ? "flex-col" : "max-h-36"
78
76
  ),
79
77
  children: /* @__PURE__ */ t(
80
- Y,
78
+ V,
81
79
  {
82
80
  title: h("Title.즐겨찾기 등록/삭제"),
83
81
  placement: e === "horizontal" ? "bottom" : "left",
84
82
  children: /* @__PURE__ */ t(
85
83
  x,
86
84
  {
87
- sx: oo,
85
+ sx: $,
88
86
  "aria-haspopup": "true",
89
87
  onClick: j,
90
- children: /* @__PURE__ */ t(S, { size: 20, sx: { color: L[600] }, children: "heroicons-solid:star" })
88
+ children: /* @__PURE__ */ t(v, { size: 20, sx: { color: L[600] }, children: "heroicons-solid:star" })
91
89
  }
92
90
  )
93
91
  }
@@ -95,7 +93,7 @@ function ro(s) {
95
93
  }
96
94
  ),
97
95
  /* @__PURE__ */ p(
98
- V,
96
+ Q,
99
97
  {
100
98
  id: "add-menu",
101
99
  anchorEl: c,
@@ -116,7 +114,7 @@ function ro(s) {
116
114
  children: [
117
115
  /* @__PURE__ */ p("div", { className: "flex justify-between items-center p-16 pt-8", children: [
118
116
  /* @__PURE__ */ t(
119
- K,
117
+ q,
120
118
  {
121
119
  inputRef: i,
122
120
  value: n,
@@ -137,27 +135,27 @@ function ro(s) {
137
135
  var o;
138
136
  f(""), (o = i == null ? void 0 : i.current) == null || o.focus();
139
137
  }, "onClick"),
140
- children: /* @__PURE__ */ t(q, {})
138
+ children: /* @__PURE__ */ t(U, {})
141
139
  }
142
140
  )
143
141
  ] }),
144
- ((n == null ? void 0 : n.length) > 0 || (u == null ? void 0 : u.length) > 0) && /* @__PURE__ */ t(J, { sx: { backgroundColor: k[500] } }),
145
- n.length > 0 && N.map((o) => /* @__PURE__ */ t(
142
+ ((n == null ? void 0 : n.length) > 0 || (u == null ? void 0 : u.length) > 0) && /* @__PURE__ */ t(W, { sx: { backgroundColor: k[500] } }),
143
+ n.length > 0 && C.map((o) => /* @__PURE__ */ t(
146
144
  I,
147
145
  {
148
146
  shortcuts: a,
149
147
  item: o,
150
- onToggle: /* @__PURE__ */ r(() => C(o.id), "onToggle")
148
+ onToggle: /* @__PURE__ */ r(() => N(o.id), "onToggle")
151
149
  },
152
150
  o.id
153
151
  )),
154
- n.length !== 0 && N.length === 0 && /* @__PURE__ */ t(Z, { color: "text.secondary", className: "p-16 pb-8", children: h("Message.검색된 결과가 없습니다...") }),
152
+ n.length !== 0 && C.length === 0 && /* @__PURE__ */ t(X, { color: "text.secondary", className: "p-16 pb-8", children: h("Message.검색된 결과가 없습니다...") }),
155
153
  n.length === 0 && u.map((o) => /* @__PURE__ */ t(
156
154
  I,
157
155
  {
158
156
  shortcuts: a,
159
157
  item: o,
160
- onToggle: /* @__PURE__ */ r(() => C(o.id), "onToggle")
158
+ onToggle: /* @__PURE__ */ r(() => N(o.id), "onToggle")
161
159
  },
162
160
  o.id
163
161
  ))
@@ -168,12 +166,12 @@ function ro(s) {
168
166
  }
169
167
  );
170
168
  }
171
- r(ro, "NavigationShortcutsToggle");
169
+ r(yo, "NavigationShortcutsToggle");
172
170
  function I(s) {
173
171
  const { item: e, onToggle: d, shortcuts: i = [] } = s;
174
- return !e || !e.id ? null : /* @__PURE__ */ t(_, { to: e.url || "", role: "button", children: /* @__PURE__ */ p(X, { children: [
175
- /* @__PURE__ */ t(Q, { className: "min-w-36", children: e.icon ? /* @__PURE__ */ t(S, { children: e.icon }) : /* @__PURE__ */ t("span", { className: "text-center text-2xl font-semibold uppercase", children: e.title[0] }) }),
176
- /* @__PURE__ */ t(R, { primary: e.title }),
172
+ return !e || !e.id ? null : /* @__PURE__ */ t(Z, { to: e.url || "", role: "button", children: /* @__PURE__ */ p(R, { children: [
173
+ /* @__PURE__ */ t(J, { className: "min-w-36", children: e.icon ? /* @__PURE__ */ t(v, { children: e.icon }) : /* @__PURE__ */ t("span", { className: "text-center text-2xl font-semibold uppercase", children: e.title[0] }) }),
174
+ /* @__PURE__ */ t(K, { primary: e.title }),
177
175
  /* @__PURE__ */ t(
178
176
  x,
179
177
  {
@@ -181,16 +179,13 @@ function I(s) {
181
179
  c.preventDefault(), c.stopPropagation(), d();
182
180
  }, "onClick"),
183
181
  size: "large",
184
- children: /* @__PURE__ */ t(S, { size: 20, sx: { color: L[600] }, children: i.includes(e.id) ? "heroicons-solid:star" : "heroicons-outline:star" })
182
+ children: /* @__PURE__ */ t(v, { size: 20, sx: { color: L[600] }, children: i.includes(e.id) ? "heroicons-solid:star" : "heroicons-outline:star" })
185
183
  }
186
184
  )
187
185
  ] }, e.id) });
188
186
  }
189
187
  r(I, "ShortcutMenuItem");
190
- const jo = H([
191
- F
192
- ])(ro);
193
188
  export {
194
- jo as default
189
+ yo as default
195
190
  };
196
191
  //# sourceMappingURL=NavigationShortcutsToggle.js.map