@owp/core 2.2.6 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index5.js +5 -2
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +2 -5
- package/dist/_virtual/index6.js.map +1 -1
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/OwpDialog/OwpDialog.js +30 -32
- package/dist/components/OwpDialog/OwpDialog.js.map +1 -1
- package/dist/components/OwpLayout/OwpLayout.js +29 -30
- package/dist/components/OwpLayout/OwpLayout.js.map +1 -1
- package/dist/components/OwpMrtTable/OwpMrtTable.js +393 -255
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpScrollbars/OwpScrollbars.js +16 -17
- package/dist/components/OwpScrollbars/OwpScrollbars.js.map +1 -1
- package/dist/components/OwpStyleProvider/OwpStyleProvider.js +28 -29
- package/dist/components/OwpStyleProvider/OwpStyleProvider.js.map +1 -1
- package/dist/components/OwpTable/OwpDataTable.js +45 -45
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +6 -6
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTable/OwpVerticalTable.js +55 -53
- package/dist/components/OwpTable/OwpVerticalTable.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +80 -74
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/constants/storageKeys.js +1 -0
- package/dist/constants/storageKeys.js.map +1 -1
- package/dist/contexts/OwpCoreProvider.js +22 -36
- package/dist/contexts/OwpCoreProvider.js.map +1 -1
- package/dist/contexts/OwpStoreProvider.js +9 -9
- package/dist/contexts/OwpStoreProvider.js.map +1 -1
- package/dist/hooks/useCurrentUserSeq.js +11 -0
- package/dist/hooks/useCurrentUserSeq.js.map +1 -0
- package/dist/hooks/useNavbar.js +24 -0
- package/dist/hooks/useNavbar.js.map +1 -0
- package/dist/hooks/useOwpSettings.js +21 -0
- package/dist/hooks/useOwpSettings.js.map +1 -0
- package/dist/hooks.js +78 -62
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +58 -59
- package/dist/layout/Layout.js +28 -29
- package/dist/layout/Layout.js.map +1 -1
- package/dist/layout/components/layouts/FooterLayout.js +15 -16
- package/dist/layout/components/layouts/FooterLayout.js.map +1 -1
- package/dist/layout/components/layouts/NavbarToggleFabLayout.js +21 -18
- package/dist/layout/components/layouts/NavbarToggleFabLayout.js.map +1 -1
- package/dist/layout/components/layouts/NavbarWrapperLayout.js +20 -21
- package/dist/layout/components/layouts/NavbarWrapperLayout.js.map +1 -1
- package/dist/layout/components/navbar/NavbarPinToggleButton.js +10 -11
- package/dist/layout/components/navbar/NavbarPinToggleButton.js.map +1 -1
- package/dist/layout/components/navbar/NavbarToggleButton.js +31 -32
- package/dist/layout/components/navbar/NavbarToggleButton.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyle.js +36 -37
- package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyleContent.js +29 -30
- package/dist/layout/components/navbar/style/NavbarStyleContent.js.map +1 -1
- package/dist/layout/components/navigation/Navigation.js +18 -22
- package/dist/layout/components/navigation/Navigation.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +55 -60
- package/dist/layout/components/toggles/NavigationSearchToggle.js.map +1 -1
- package/dist/layout/components/toggles/NavigationShortcutsToggle.js +44 -49
- package/dist/layout/components/toggles/NavigationShortcutsToggle.js.map +1 -1
- package/dist/layout/components/toolbar/ToolbarLayout.js +26 -27
- package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- 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
- package/dist/owp-app.css +1 -1
- package/dist/store/atoms/navbarAtoms.js +84 -0
- package/dist/store/atoms/navbarAtoms.js.map +1 -0
- package/dist/store/atoms/owpSettingsAtoms.js +140 -0
- package/dist/store/atoms/owpSettingsAtoms.js.map +1 -0
- package/dist/store/atoms/owpStore.js +29 -0
- package/dist/store/atoms/owpStore.js.map +1 -0
- package/dist/store.js +44 -39
- package/dist/store.js.map +1 -1
- package/dist/types/components/OwpDialog/OwpDialog.d.ts +1 -9
- package/dist/types/components/OwpMrtTable/OwpMrtTable.d.ts +9 -0
- package/dist/types/components/OwpPicker/internal/DatePickerInput.d.ts +1 -1
- package/dist/types/components/OwpTable/OwpTable.d.ts +1 -1
- package/dist/types/components/OwpTable/OwpVerticalTable.d.ts +3 -1
- package/dist/types/components/OwpTabs/OwpTab.d.ts +1 -1
- package/dist/types/components/OwpTabs/OwpTabs.d.ts +1 -1
- package/dist/types/constants/storageKeys.d.ts +1 -0
- package/dist/types/contexts/OwpCoreProvider.d.ts +2 -2
- package/dist/types/contexts/OwpStoreProvider.d.ts +4 -4
- package/dist/types/hooks/index.d.ts +3 -1
- package/dist/types/hooks/useCurrentUserSeq.d.ts +8 -0
- package/dist/types/hooks/useNavbar.d.ts +19 -0
- package/dist/types/hooks/useOwpSettings.d.ts +79 -0
- package/dist/types/layout/components/navigation/Navigation.d.ts +6 -2
- package/dist/types/layout/components/toggles/NavigationSearchToggle.d.ts +5 -2
- package/dist/types/layout/components/toggles/NavigationShortcutsToggle.d.ts +5 -2
- package/dist/types/store/atoms/index.d.ts +3 -0
- package/dist/types/store/atoms/internal/types.d.ts +29 -0
- package/dist/types/store/atoms/navbarAtoms.d.ts +48 -0
- package/dist/types/store/atoms/owpSettingsAtoms.d.ts +89 -0
- package/dist/types/store/atoms/owpStore.d.ts +13 -0
- package/dist/types/store/index.d.ts +1 -3
- package/dist/types/utils/treeGridExportExcelUtil.d.ts +0 -4
- package/dist/types/utils/treeGridUtil.d.ts +0 -59
- package/dist/utils/treeGridExportExcelUtil.js +57 -58
- package/dist/utils/treeGridExportExcelUtil.js.map +1 -1
- package/dist/utils/treeGridUtil.js +69 -83
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/dist/utils.js +71 -86
- package/package.json +2 -6
- package/dist/hooks/useAppStore.js +0 -8
- package/dist/hooks/useAppStore.js.map +0 -1
- package/dist/store/generateReducersFromSlices.js +0 -18
- package/dist/store/generateReducersFromSlices.js.map +0 -1
- package/dist/store/lazyLoadedSlices.js +0 -16
- package/dist/store/lazyLoadedSlices.js.map +0 -1
- package/dist/store/middleware.js +0 -9
- package/dist/store/middleware.js.map +0 -1
- package/dist/store/navbarSlice.js +0 -71
- package/dist/store/navbarSlice.js.map +0 -1
- package/dist/store/navigationSlice.js +0 -46
- package/dist/store/navigationSlice.js.map +0 -1
- package/dist/store/owpSettingsSlice.js +0 -195
- package/dist/store/owpSettingsSlice.js.map +0 -1
- package/dist/store/store.js +0 -17
- package/dist/store/store.js.map +0 -1
- package/dist/store/withSlices.js +0 -27
- package/dist/store/withSlices.js.map +0 -1
- package/dist/types/hooks/useAppStore.d.ts +0 -7
- package/dist/types/store/generateReducersFromSlices.d.ts +0 -6
- package/dist/types/store/lazyLoadedSlices.d.ts +0 -9
- package/dist/types/store/middleware.d.ts +0 -17
- package/dist/types/store/navbarSlice.d.ts +0 -22
- package/dist/types/store/navigationSlice.d.ts +0 -93
- package/dist/types/store/owpSettingsSlice.d.ts +0 -112
- package/dist/types/store/store.d.ts +0 -13
- package/dist/types/store/withSlices.d.ts +0 -11
package/dist/utils.js
CHANGED
|
@@ -1,103 +1,88 @@
|
|
|
1
|
-
import { generateBarcodeUrl as
|
|
2
|
-
import { buildTreeGridEnumAttributesByCommonCodeList as d, transformCommonCodeBasedOnGroupId as
|
|
3
|
-
import { createDateRangeSearchParams as
|
|
4
|
-
import { createJsonBody as
|
|
5
|
-
import { createJsonString as
|
|
6
|
-
import { exportExcelByBuffer as
|
|
7
|
-
import { fetchFile as
|
|
8
|
-
import { formatDateToYmd as
|
|
9
|
-
import { formatNumber as
|
|
10
|
-
import { getDisplayValue as
|
|
11
|
-
import { getEstimatedTextCellWidth as
|
|
12
|
-
import { getFormDefaultValues as
|
|
13
|
-
import { getStartPagePath as
|
|
14
|
-
import { getTrimmedValue as
|
|
15
|
-
import { isEnterKeyEvent as
|
|
16
|
-
import { getApiLanguageCode as
|
|
1
|
+
import { generateBarcodeUrl as o } from "./utils/barcodeUtil.js";
|
|
2
|
+
import { buildTreeGridEnumAttributesByCommonCodeList as d, transformCommonCodeBasedOnGroupId as m, transformGridEnumByCommonCodeList as i } from "./utils/commonCodeUtils.js";
|
|
3
|
+
import { createDateRangeSearchParams as T } from "./utils/createDateRangeSearchParams.js";
|
|
4
|
+
import { createJsonBody as l } from "./utils/createJsonBody.js";
|
|
5
|
+
import { createJsonString as n } from "./utils/createJsonString.js";
|
|
6
|
+
import { exportExcelByBuffer as E, getIndexByLetters as f, getLettersByIndex as I, setCellValue as L, setMergeCells as g } from "./utils/excelUtil.js";
|
|
7
|
+
import { fetchFile as C } from "./utils/fetchFile.js";
|
|
8
|
+
import { formatDateToYmd as y, getTodayYmd as B } from "./utils/formatDateToYmd.js";
|
|
9
|
+
import { formatNumber as R } from "./utils/formatNumber.js";
|
|
10
|
+
import { getDisplayValue as A } from "./utils/getDisplayValue.js";
|
|
11
|
+
import { getEstimatedTextCellWidth as c } from "./utils/getEstimatedTextCellWidth.js";
|
|
12
|
+
import { getFormDefaultValues as U } from "./utils/getFormDefaultValues.js";
|
|
13
|
+
import { getStartPagePath as N } from "./utils/getStartPagePath.js";
|
|
14
|
+
import { getTrimmedValue as V } from "./utils/getTrimmedValue.js";
|
|
15
|
+
import { isEnterKeyEvent as w } from "./utils/isEnterKeyEvent.js";
|
|
16
|
+
import { getApiLanguageCode as b, getI18nextLanguageCode as M } from "./utils/language.js";
|
|
17
17
|
import { formatTimeInputToHourMinute as W, normalizeTimeToHourMinute as v } from "./utils/normalizeTimeToHourMinute.js";
|
|
18
18
|
import { preloadOnIdle as Y } from "./utils/preloadOnIdle.js";
|
|
19
19
|
import { generateQrCodeUrl as Q } from "./utils/qrCodeUtil.js";
|
|
20
20
|
import { rebuildValue as j } from "./utils/rebuildValue.js";
|
|
21
21
|
import { sanitizePasswordValue as q, sanitizeUserIdValue as X } from "./utils/sanitizeAuthInputValue.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { saveAsZipFile as
|
|
25
|
-
import { OwpUtils as
|
|
26
|
-
import { DEFAULT_CELL_ALIGNMENT as
|
|
27
|
-
import { TREEGRID_CELL_HIGHLIGHT_CLASS as
|
|
22
|
+
import { exportTreeGridExcel as ee } from "./utils/treeGridExportExcelUtil.js";
|
|
23
|
+
import { addTreeGridRowById as oe, exportTreeGridToExcelById as te, getTreeGridById as de, getTreeGridDataRowsById as me, getTreeGridRowChangesById as ie, getTreeGridSelectedRowsById as ae, highlightTreeGridCellById as Te, reloadTreeGridBodyById as se, resetTreeGridChangesById as le, resetTreeGridChangesByIds as pe, resetTreeGridSelectionById as ne, resetTreeGridSelectionsByIds as xe, setTreeGridColumnEnumOptionsById as Ee, setTreeGridColumnVisibilityById as fe } from "./utils/treeGridUtil.js";
|
|
24
|
+
import { saveAsZipFile as Le } from "./utils/zipUtil.js";
|
|
25
|
+
import { OwpUtils as Ge } from "./utils/common/OwpUtils.js";
|
|
26
|
+
import { DEFAULT_CELL_ALIGNMENT as ue, DEFAULT_HEADER_FILL as ye, DEFAULT_HEADER_FONT as Be, DEFAULT_THIN_BORDER as _e, DEFAULT_VALUE_FONT as Re, DEFAULT_WRAP_CELL_ALIGNMENT as De } from "./constants/excel.js";
|
|
27
|
+
import { TREEGRID_CELL_HIGHLIGHT_CLASS as Oe, TREEGRID_CELL_HIGHLIGHT_COLOR as ce, TREEGRID_INPUT_CELL_COLOR as Fe, TREEGRID_WARNING_CELL_COLOR as Ue } from "./constants/treeGrid.js";
|
|
28
28
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
oe as
|
|
41
|
-
de as addTreeGridRowById,
|
|
29
|
+
ue as DEFAULT_CELL_ALIGNMENT,
|
|
30
|
+
ye as DEFAULT_HEADER_FILL,
|
|
31
|
+
Be as DEFAULT_HEADER_FONT,
|
|
32
|
+
_e as DEFAULT_THIN_BORDER,
|
|
33
|
+
Re as DEFAULT_VALUE_FONT,
|
|
34
|
+
De as DEFAULT_WRAP_CELL_ALIGNMENT,
|
|
35
|
+
Ge as OwpUtils,
|
|
36
|
+
Oe as TREEGRID_CELL_HIGHLIGHT_CLASS,
|
|
37
|
+
ce as TREEGRID_CELL_HIGHLIGHT_COLOR,
|
|
38
|
+
Fe as TREEGRID_INPUT_CELL_COLOR,
|
|
39
|
+
Ue as TREEGRID_WARNING_CELL_COLOR,
|
|
40
|
+
oe as addTreeGridRowById,
|
|
42
41
|
d as buildTreeGridEnumAttributesByCommonCodeList,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
n as
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
B as fetchFile,
|
|
53
|
-
C as formatDateToYmd,
|
|
54
|
-
_ as formatNumber,
|
|
42
|
+
T as createDateRangeSearchParams,
|
|
43
|
+
l as createJsonBody,
|
|
44
|
+
n as createJsonString,
|
|
45
|
+
E as exportExcelByBuffer,
|
|
46
|
+
ee as exportTreeGridExcel,
|
|
47
|
+
te as exportTreeGridToExcelById,
|
|
48
|
+
C as fetchFile,
|
|
49
|
+
y as formatDateToYmd,
|
|
50
|
+
R as formatNumber,
|
|
55
51
|
W as formatTimeInputToHourMinute,
|
|
56
|
-
|
|
52
|
+
o as generateBarcodeUrl,
|
|
57
53
|
Q as generateQrCodeUrl,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
h as getEstimatedTextCellWidth,
|
|
63
|
-
F as getFormDefaultValues,
|
|
64
|
-
ne as getGridById,
|
|
54
|
+
b as getApiLanguageCode,
|
|
55
|
+
A as getDisplayValue,
|
|
56
|
+
c as getEstimatedTextCellWidth,
|
|
57
|
+
U as getFormDefaultValues,
|
|
65
58
|
M as getI18nextLanguageCode,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
V as isEnterKeyEvent,
|
|
59
|
+
f as getIndexByLetters,
|
|
60
|
+
I as getLettersByIndex,
|
|
61
|
+
N as getStartPagePath,
|
|
62
|
+
B as getTodayYmd,
|
|
63
|
+
de as getTreeGridById,
|
|
64
|
+
me as getTreeGridDataRowsById,
|
|
65
|
+
ie as getTreeGridRowChangesById,
|
|
66
|
+
ae as getTreeGridSelectedRowsById,
|
|
67
|
+
V as getTrimmedValue,
|
|
68
|
+
Te as highlightTreeGridCellById,
|
|
69
|
+
w as isEnterKeyEvent,
|
|
78
70
|
v as normalizeTimeToHourMinute,
|
|
79
71
|
Y as preloadOnIdle,
|
|
80
72
|
j as rebuildValue,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
Ce as resetGridsSelection,
|
|
87
|
-
ue as resetTreeGridChangesById,
|
|
88
|
-
Re as resetTreeGridChangesByIds,
|
|
89
|
-
_e as resetTreeGridSelectionById,
|
|
90
|
-
De as resetTreeGridSelectionsByIds,
|
|
73
|
+
se as reloadTreeGridBodyById,
|
|
74
|
+
le as resetTreeGridChangesById,
|
|
75
|
+
pe as resetTreeGridChangesByIds,
|
|
76
|
+
ne as resetTreeGridSelectionById,
|
|
77
|
+
xe as resetTreeGridSelectionsByIds,
|
|
91
78
|
q as sanitizePasswordValue,
|
|
92
79
|
X as sanitizeUserIdValue,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
i as transformCommonCodeBasedOnGroupId,
|
|
101
|
-
a as transformGridEnumByCommonCodeList
|
|
80
|
+
Le as saveAsZipFile,
|
|
81
|
+
L as setCellValue,
|
|
82
|
+
g as setMergeCells,
|
|
83
|
+
Ee as setTreeGridColumnEnumOptionsById,
|
|
84
|
+
fe as setTreeGridColumnVisibilityById,
|
|
85
|
+
m as transformCommonCodeBasedOnGroupId,
|
|
86
|
+
i as transformGridEnumByCommonCodeList
|
|
102
87
|
};
|
|
103
88
|
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owp/core",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"@mui/material": "^7.3.2",
|
|
50
50
|
"@mui/system": "^7.3.2",
|
|
51
51
|
"@mui/x-date-pickers": "^8.11.2",
|
|
52
|
-
"@reduxjs/toolkit": "^2.9.0",
|
|
53
52
|
"@tanstack/react-query": "^5.87.1",
|
|
54
53
|
"@toolpad/core": "^0.16.0",
|
|
55
54
|
"dayjs": "^1.11.18",
|
|
@@ -61,12 +60,9 @@
|
|
|
61
60
|
"react-dom": "^19.2.0",
|
|
62
61
|
"react-hook-form": "^7.62.0",
|
|
63
62
|
"react-i18next": "^15.7.3",
|
|
64
|
-
"react-redux": "^9.2.0",
|
|
65
63
|
"react-router-dom": "^7.8.2"
|
|
66
64
|
},
|
|
67
|
-
"overrides": {
|
|
68
|
-
"redux": "^5.0.0"
|
|
69
|
-
},
|
|
65
|
+
"overrides": {},
|
|
70
66
|
"devDependencies": {
|
|
71
67
|
"@eslint/js": "^9.39.2",
|
|
72
68
|
"@mui/x-date-pickers": "^8.11.2",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { useDispatch as e, useSelector as s, useStore as t } from "react-redux";
|
|
2
|
-
const o = e.withTypes(), c = s.withTypes(), r = t.withTypes();
|
|
3
|
-
export {
|
|
4
|
-
o as useAppDispatch,
|
|
5
|
-
c as useAppSelector,
|
|
6
|
-
r as useAppStore
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=useAppStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAppStore.js","sources":["../../src/hooks/useAppStore.ts"],"sourcesContent":["import { useDispatch, useSelector, useStore } from 'react-redux';\nimport type { AppDispatch, AppStore, RootState } from '@/store/store';\n\n/**\n * Internal typed Redux hooks\n */\nexport const useAppDispatch: () => AppDispatch = useDispatch.withTypes<AppDispatch>();\nexport const useAppSelector: <T>(selector: (state: RootState) => T) => T =\n useSelector.withTypes<RootState>();\nexport const useAppStore: () => AppStore = useStore.withTypes<AppStore>();\n"],"names":["useAppDispatch","useDispatch","useAppSelector","useSelector","useAppStore","useStore"],"mappings":";AAMO,MAAMA,IAAoCC,EAAY,UAAA,GAChDC,IACXC,EAAY,UAAA,GACDC,IAA8BC,EAAS,UAAA;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var m = Object.defineProperty;
|
|
2
|
-
var f = (r, o) => m(r, "name", { value: o, configurable: !0 });
|
|
3
|
-
import { combineReducers as a } from "@reduxjs/toolkit";
|
|
4
|
-
const b = /* @__PURE__ */ f((r) => {
|
|
5
|
-
const o = {};
|
|
6
|
-
r == null || r.forEach((t) => {
|
|
7
|
-
const [e, c] = t.name.split("/");
|
|
8
|
-
c ? (o[e] || (o[e] = {}), o[e][c] = t.reducer) : o[e] = t.reducer;
|
|
9
|
-
});
|
|
10
|
-
const n = {};
|
|
11
|
-
return Object.entries(o).forEach(([t, e]) => {
|
|
12
|
-
typeof e == "function" ? n[t] = e : typeof e == "object" && (n[t] = a(e));
|
|
13
|
-
}), n;
|
|
14
|
-
}, "generateReducersFromSlices");
|
|
15
|
-
export {
|
|
16
|
-
b as generateReducersFromSlices
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=generateReducersFromSlices.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateReducersFromSlices.js","sources":["../../src/store/generateReducersFromSlices.ts"],"sourcesContent":["import { combineReducers, Reducer, ReducersMapObject } from '@reduxjs/toolkit';\nimport { DeepPartial } from 'react-hook-form';\nimport type { SlicesType } from './withSlices';\n\n/**\n * Internal grouped reducer factory\n */\nexport const generateReducersFromSlices = <T = unknown>(\n slices: SlicesType,\n): ReducersMapObject<T> => {\n const reducerGroups: DeepPartial<ReducersMapObject> = {};\n\n \n slices?.forEach((slice) => {\n const [primary, secondary] = slice.name.split('/');\n\n if (secondary) {\n if (!reducerGroups[primary]) {\n reducerGroups[primary] = {};\n }\n\n (reducerGroups[primary] as ReducersMapObject<T>)[secondary] = slice.reducer;\n } else {\n reducerGroups[primary] = slice.reducer;\n }\n });\n\n const combinedReducers = {};\n\n \n Object.entries(reducerGroups).forEach(([key, reducerGroup]) => {\n if (typeof reducerGroup === 'function') {\n combinedReducers[key] = reducerGroup as Reducer;\n } else if (typeof reducerGroup === 'object') {\n combinedReducers[key] = combineReducers(reducerGroup);\n }\n });\n\n return combinedReducers as ReducersMapObject<T>;\n};\n"],"names":["generateReducersFromSlices","__name","slices","reducerGroups","slice","primary","secondary","combinedReducers","key","reducerGroup","combineReducers"],"mappings":";;;AAOO,MAAMA,IAA6B,gBAAAC,EAAA,CACxCC,MACyB;AACzB,QAAMC,IAAgD,CAAA;AAGtD,EAAAD,KAAA,QAAAA,EAAQ,QAAQ,CAACE,MAAU;AACzB,UAAM,CAACC,GAASC,CAAS,IAAIF,EAAM,KAAK,MAAM,GAAG;AAEjD,IAAIE,KACGH,EAAcE,CAAO,MACxBF,EAAcE,CAAO,IAAI,CAAA,IAG1BF,EAAcE,CAAO,EAA2BC,CAAS,IAAIF,EAAM,WAEpED,EAAcE,CAAO,IAAID,EAAM;AAAA,EAEnC;AAEA,QAAMG,IAAmB,CAAA;AAGzB,gBAAO,QAAQJ,CAAa,EAAE,QAAQ,CAAC,CAACK,GAAKC,CAAY,MAAM;AAC7D,IAAI,OAAOA,KAAiB,aAC1BF,EAAiBC,CAAG,IAAIC,IACf,OAAOA,KAAiB,aACjCF,EAAiBC,CAAG,IAAIE,EAAgBD,CAAY;AAAA,EAExD,CAAC,GAEMF;AACT,GAhC0C;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { navbarSlice as o } from "./navbarSlice.js";
|
|
2
|
-
import { navigationSlice as i } from "./navigationSlice.js";
|
|
3
|
-
import { owpSettingsSlice as r } from "./owpSettingsSlice.js";
|
|
4
|
-
import { combineSlices as e } from "@reduxjs/toolkit";
|
|
5
|
-
const n = e(
|
|
6
|
-
/**
|
|
7
|
-
* Static slices
|
|
8
|
-
*/
|
|
9
|
-
r,
|
|
10
|
-
i,
|
|
11
|
-
o
|
|
12
|
-
).withLazyLoadedSlices();
|
|
13
|
-
export {
|
|
14
|
-
n as rootReducer
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=lazyLoadedSlices.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazyLoadedSlices.js","sources":["../../src/store/lazyLoadedSlices.ts"],"sourcesContent":["import { navbarSlice } from '@/store/navbarSlice';\nimport { navigationSlice } from '@/store/navigationSlice';\nimport { owpSettingsSlice } from '@/store/owpSettingsSlice';\nimport { combineSlices } from '@reduxjs/toolkit';\n\n// eslint-disable-next-line\nexport interface LazyLoadedSlices {}\n\n/**\n * Internal root reducer registry\n */\nexport const rootReducer: ReturnType<typeof combineSlices> = combineSlices(\n /**\n * Static slices\n */\n owpSettingsSlice,\n navigationSlice,\n navbarSlice,\n).withLazyLoadedSlices<LazyLoadedSlices>();\n"],"names":["rootReducer","combineSlices","owpSettingsSlice","navigationSlice","navbarSlice"],"mappings":";;;;AAWO,MAAMA,IAAgDC;AAAA;AAAA;AAAA;AAAA,EAI3DC;AAAA,EACAC;AAAA,EACAC;AACF,EAAE,qBAAA;"}
|
package/dist/store/middleware.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createDynamicMiddleware as d } from "@reduxjs/toolkit/react";
|
|
2
|
-
const e = d(), { middleware: a } = e;
|
|
3
|
-
e.addMiddleware.withTypes();
|
|
4
|
-
e.withMiddleware.withTypes();
|
|
5
|
-
e.createDispatchWithMiddlewareHook.withTypes();
|
|
6
|
-
export {
|
|
7
|
-
a as dynamicMiddleware
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=middleware.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sources":["../../src/store/middleware.ts"],"sourcesContent":["import { createDynamicMiddleware } from '@reduxjs/toolkit/react';\nimport type { AppDispatch, RootState } from './store';\n\n/**\n * Internal dynamic middleware instance\n */\nconst dynamicInstance = createDynamicMiddleware();\n\nexport const { middleware: dynamicMiddleware } = dynamicInstance;\n\ntype Config = {\n state: RootState;\n dispatch: AppDispatch;\n};\n\nexport const addAppMiddleware: ReturnType<typeof dynamicInstance.addMiddleware.withTypes<Config>> =\n dynamicInstance.addMiddleware.withTypes<Config>();\n\nexport const withAppMiddleware: ReturnType<\n typeof dynamicInstance.withMiddleware.withTypes<Config>\n> = dynamicInstance.withMiddleware.withTypes<Config>();\n\nexport const createAppDispatchWithMiddlewareHook: ReturnType<\n typeof dynamicInstance.createDispatchWithMiddlewareHook.withTypes<Config>\n> = dynamicInstance.createDispatchWithMiddlewareHook.withTypes<Config>();\n"],"names":["dynamicInstance","createDynamicMiddleware","dynamicMiddleware"],"mappings":";AAMA,MAAMA,IAAkBC,EAAA,GAEX,EAAE,YAAYC,MAAsBF;AAQ/CA,EAAgB,cAAc,UAAA;AAI5BA,EAAgB,eAAe,UAAA;AAI/BA,EAAgB,iCAAiC,UAAA;"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
var r = Object.defineProperty;
|
|
2
|
-
var a = (e, l) => r(e, "name", { value: l, configurable: !0 });
|
|
3
|
-
import { createSlice as b } from "@reduxjs/toolkit";
|
|
4
|
-
const n = {
|
|
5
|
-
open: !0,
|
|
6
|
-
mobileOpen: !1,
|
|
7
|
-
foldedOpen: !1
|
|
8
|
-
}, o = b({
|
|
9
|
-
name: "navbar",
|
|
10
|
-
initialState: n,
|
|
11
|
-
reducers: {
|
|
12
|
-
navbarToggleFolded: /* @__PURE__ */ a((e) => {
|
|
13
|
-
e.foldedOpen = !e.foldedOpen;
|
|
14
|
-
}, "navbarToggleFolded"),
|
|
15
|
-
navbarOpenFolded: /* @__PURE__ */ a((e) => {
|
|
16
|
-
e.foldedOpen = !0;
|
|
17
|
-
}, "navbarOpenFolded"),
|
|
18
|
-
navbarCloseFolded: /* @__PURE__ */ a((e) => {
|
|
19
|
-
e.foldedOpen = !1;
|
|
20
|
-
}, "navbarCloseFolded"),
|
|
21
|
-
navbarToggleMobile: /* @__PURE__ */ a((e) => {
|
|
22
|
-
e.mobileOpen = !e.mobileOpen;
|
|
23
|
-
}, "navbarToggleMobile"),
|
|
24
|
-
navbarOpenMobile: /* @__PURE__ */ a((e) => {
|
|
25
|
-
e.mobileOpen = !0;
|
|
26
|
-
}, "navbarOpenMobile"),
|
|
27
|
-
navbarCloseMobile: /* @__PURE__ */ a((e) => {
|
|
28
|
-
e.mobileOpen = !1;
|
|
29
|
-
}, "navbarCloseMobile"),
|
|
30
|
-
navbarClose: /* @__PURE__ */ a((e) => {
|
|
31
|
-
e.open = !1;
|
|
32
|
-
}, "navbarClose"),
|
|
33
|
-
navbarOpen: /* @__PURE__ */ a((e) => {
|
|
34
|
-
e.open = !0;
|
|
35
|
-
}, "navbarOpen"),
|
|
36
|
-
navbarToggle: /* @__PURE__ */ a((e) => {
|
|
37
|
-
e.open = !e.open;
|
|
38
|
-
}, "navbarToggle"),
|
|
39
|
-
resetNavbar: /* @__PURE__ */ a(() => n, "resetNavbar")
|
|
40
|
-
},
|
|
41
|
-
selectors: {
|
|
42
|
-
selectOwpNavbar: /* @__PURE__ */ a((e) => e, "selectOwpNavbar")
|
|
43
|
-
}
|
|
44
|
-
}), {
|
|
45
|
-
navbarToggleFolded: d,
|
|
46
|
-
navbarOpenFolded: s,
|
|
47
|
-
navbarCloseFolded: i,
|
|
48
|
-
navbarOpen: O,
|
|
49
|
-
navbarClose: t,
|
|
50
|
-
navbarToggle: c,
|
|
51
|
-
navbarOpenMobile: g,
|
|
52
|
-
navbarCloseMobile: f,
|
|
53
|
-
navbarToggleMobile: m,
|
|
54
|
-
resetNavbar: u
|
|
55
|
-
} = o.actions, C = /* @__PURE__ */ a((e) => e.navbar, "selectOwpNavbar");
|
|
56
|
-
o.reducer;
|
|
57
|
-
export {
|
|
58
|
-
t as navbarClose,
|
|
59
|
-
i as navbarCloseFolded,
|
|
60
|
-
f as navbarCloseMobile,
|
|
61
|
-
O as navbarOpen,
|
|
62
|
-
s as navbarOpenFolded,
|
|
63
|
-
g as navbarOpenMobile,
|
|
64
|
-
o as navbarSlice,
|
|
65
|
-
c as navbarToggle,
|
|
66
|
-
d as navbarToggleFolded,
|
|
67
|
-
m as navbarToggleMobile,
|
|
68
|
-
u as resetNavbar,
|
|
69
|
-
C as selectOwpNavbar
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=navbarSlice.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navbarSlice.js","sources":["../../src/store/navbarSlice.ts"],"sourcesContent":["import { RootState } from '@/store/store';\nimport { createSlice, type WithSlice } from '@reduxjs/toolkit';\n\n/**\n * The type definition for the initial state of the navbar slice.\n */\ntype initialStateProps = {\n open: boolean;\n mobileOpen: boolean;\n foldedOpen: boolean;\n};\n\n/**\n * The initial state of the navbar slice.\n */\nconst initialState: initialStateProps = {\n open: true,\n mobileOpen: false,\n foldedOpen: false,\n};\n\n/**\n * The navbar slice.\n */\nexport const navbarSlice: any = createSlice({\n name: 'navbar',\n initialState,\n reducers: {\n navbarToggleFolded: (state) => {\n state.foldedOpen = !state.foldedOpen;\n },\n navbarOpenFolded: (state) => {\n state.foldedOpen = true;\n },\n navbarCloseFolded: (state) => {\n state.foldedOpen = false;\n },\n navbarToggleMobile: (state) => {\n state.mobileOpen = !state.mobileOpen;\n },\n navbarOpenMobile: (state) => {\n state.mobileOpen = true;\n },\n navbarCloseMobile: (state) => {\n state.mobileOpen = false;\n },\n navbarClose: (state) => {\n state.open = false;\n },\n navbarOpen: (state) => {\n state.open = true;\n },\n navbarToggle: (state) => {\n state.open = !state.open;\n },\n resetNavbar: () => initialState,\n },\n selectors: {\n selectOwpNavbar: (navbar) => navbar,\n },\n});\n\n/**\n * Lazy loading\n */\n// rootReducer.inject(navbarSlice);\n// const injectedSlice = navbarSlice.injectInto(rootReducer);\ndeclare module '@/store/lazyLoadedSlices' {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n export interface LazyLoadedSlices extends WithSlice<typeof navbarSlice> {}\n}\n\nexport const {\n navbarToggleFolded,\n navbarOpenFolded,\n navbarCloseFolded,\n navbarOpen,\n navbarClose,\n navbarToggle,\n navbarOpenMobile,\n navbarCloseMobile,\n navbarToggleMobile,\n resetNavbar,\n} = navbarSlice.actions;\n\n/**\n * selectOwpNavbar selector\n * @param state state 값\n */\nexport const selectOwpNavbar = (state: RootState) => state.navbar;\n\nexport type navbarSliceType = typeof navbarSlice;\n\nexport default navbarSlice.reducer;\n"],"names":["initialState","navbarSlice","createSlice","__name","state","navbar","navbarToggleFolded","navbarOpenFolded","navbarCloseFolded","navbarOpen","navbarClose","navbarToggle","navbarOpenMobile","navbarCloseMobile","navbarToggleMobile","resetNavbar","selectOwpNavbar"],"mappings":";;;AAeA,MAAMA,IAAkC;AAAA,EACtC,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,YAAY;AACd,GAKaC,IAAmBC,EAAY;AAAA,EAC1C,MAAM;AAAA,EACN,cAAAF;AAAA,EACA,UAAU;AAAA,IACR,oBAAoB,gBAAAG,EAAA,CAACC,MAAU;AAC7B,MAAAA,EAAM,aAAa,CAACA,EAAM;AAAA,IAC5B,GAFoB;AAAA,IAGpB,kBAAkB,gBAAAD,EAAA,CAACC,MAAU;AAC3B,MAAAA,EAAM,aAAa;AAAA,IACrB,GAFkB;AAAA,IAGlB,mBAAmB,gBAAAD,EAAA,CAACC,MAAU;AAC5B,MAAAA,EAAM,aAAa;AAAA,IACrB,GAFmB;AAAA,IAGnB,oBAAoB,gBAAAD,EAAA,CAACC,MAAU;AAC7B,MAAAA,EAAM,aAAa,CAACA,EAAM;AAAA,IAC5B,GAFoB;AAAA,IAGpB,kBAAkB,gBAAAD,EAAA,CAACC,MAAU;AAC3B,MAAAA,EAAM,aAAa;AAAA,IACrB,GAFkB;AAAA,IAGlB,mBAAmB,gBAAAD,EAAA,CAACC,MAAU;AAC5B,MAAAA,EAAM,aAAa;AAAA,IACrB,GAFmB;AAAA,IAGnB,aAAa,gBAAAD,EAAA,CAACC,MAAU;AACtB,MAAAA,EAAM,OAAO;AAAA,IACf,GAFa;AAAA,IAGb,YAAY,gBAAAD,EAAA,CAACC,MAAU;AACrB,MAAAA,EAAM,OAAO;AAAA,IACf,GAFY;AAAA,IAGZ,cAAc,gBAAAD,EAAA,CAACC,MAAU;AACvB,MAAAA,EAAM,OAAO,CAACA,EAAM;AAAA,IACtB,GAFc;AAAA,IAGd,aAAa,gBAAAD,EAAA,MAAMH,GAAN;AAAA,EAAM;AAAA,EAErB,WAAW;AAAA,IACT,iBAAiB,gBAAAG,EAAA,CAACE,MAAWA,GAAZ;AAAA,EAAY;AAEjC,CAAC,GAYY;AAAA,EACX,oBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,aAAAC;AACF,IAAId,EAAY,SAMHe,IAAkB,gBAAAb,EAAA,CAACC,MAAqBA,EAAM,QAA5B;AAIhBH,EAAY;"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
var p = Object.defineProperty;
|
|
2
|
-
var e = (t, n) => p(t, "name", { value: n, configurable: !0 });
|
|
3
|
-
import { OwpNavigationHelper as r } from "../utils/navigationUtils.js";
|
|
4
|
-
import { OwpUtils as d } from "../utils/common/OwpUtils.js";
|
|
5
|
-
import { createSlice as N, createEntityAdapter as u, createSelector as c } from "@reduxjs/toolkit";
|
|
6
|
-
import f from "i18next";
|
|
7
|
-
const s = u(), I = s.getInitialState([]), i = I, {
|
|
8
|
-
selectAll: S,
|
|
9
|
-
selectIds: P,
|
|
10
|
-
selectById: V
|
|
11
|
-
} = s.getSelectors((t) => t.navigation), g = N({
|
|
12
|
-
name: "navigation",
|
|
13
|
-
initialState: i,
|
|
14
|
-
reducers: {
|
|
15
|
-
setNavigation(t, n) {
|
|
16
|
-
return s.setAll(t, r.flattenNavigation(n.payload));
|
|
17
|
-
},
|
|
18
|
-
resetNavigation: /* @__PURE__ */ e(() => i, "resetNavigation")
|
|
19
|
-
}
|
|
20
|
-
}), { setNavigation: D, resetNavigation: E } = g.actions, h = c(
|
|
21
|
-
[S],
|
|
22
|
-
(t, n) => {
|
|
23
|
-
const v = r.unflattenNavigation(t);
|
|
24
|
-
function l(o) {
|
|
25
|
-
return o == null ? void 0 : o.map((a) => ({
|
|
26
|
-
hasPermission: !!d.hasPermission(a == null ? void 0 : a.auth, n),
|
|
27
|
-
...a,
|
|
28
|
-
...a != null && a.translate && (a != null && a.title) ? { title: f.t(`navigation:${a == null ? void 0 : a.translate}`) } : {},
|
|
29
|
-
...a != null && a.children ? { children: l(a == null ? void 0 : a.children) } : {}
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
return e(l, "setAdditionalData"), l(v);
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
c([h], (t) => r.flattenNavigation(t));
|
|
36
|
-
g.reducer;
|
|
37
|
-
export {
|
|
38
|
-
g as navigationSlice,
|
|
39
|
-
E as resetNavigation,
|
|
40
|
-
h as selectNavigation,
|
|
41
|
-
S as selectNavigationAll,
|
|
42
|
-
P as selectNavigationIds,
|
|
43
|
-
V as selectNavigationItemById,
|
|
44
|
-
D as setNavigation
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=navigationSlice.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigationSlice.js","sources":["../../src/store/navigationSlice.ts"],"sourcesContent":["import type { OwpFlatNavItemType, OwpNavItemType } from '@/types/OwpNavigationTypes';\n\nimport { AppThunk, RootState } from '@/store/store';\nimport { OwpNavItemModel, OwpNavigationHelper } from '@/utils/navigationUtils';\nimport { OwpUtils } from '@/utils/common/OwpUtils';\nimport {\n createEntityAdapter,\n createSelector,\n createSlice,\n PayloadAction,\n WithSlice,\n} from '@reduxjs/toolkit';\nimport i18next from 'i18next';\nimport type { PartialDeep } from 'type-fest';\n\nconst navigationAdapter = createEntityAdapter<OwpFlatNavItemType>();\n\nconst emptyInitialState = navigationAdapter.getInitialState([]);\n\nconst initialState = emptyInitialState;\n\n/**\n * Redux Thunk actions related to the navigation store state\n */\n/**\n * Appends a navigation item to the navigation store state.\n */\nexport const appendNavigationItem =\n (item: OwpNavItemType, parentId?: string | null): AppThunk =>\n async (dispatch, getState) => {\n const AppState = getState();\n const navigation = OwpNavigationHelper.unflattenNavigation(selectNavigationAll(AppState));\n\n dispatch(\n setNavigation(OwpNavigationHelper.appendNavItem(navigation, OwpNavItemModel(item), parentId)),\n );\n\n return Promise.resolve();\n };\n\n/**\n * Prepends a navigation item to the navigation store state.\n */\nexport const prependNavigationItem =\n (item: OwpNavItemType, parentId?: string | null): AppThunk =>\n async (dispatch, getState) => {\n const AppState = getState();\n const navigation = OwpNavigationHelper.unflattenNavigation(selectNavigationAll(AppState));\n\n dispatch(\n setNavigation(\n OwpNavigationHelper.prependNavItem(navigation, OwpNavItemModel(item), parentId),\n ),\n );\n\n return Promise.resolve();\n };\n\n/**\n * Adds a navigation item to the navigation store state at the specified index.\n */\nexport const updateNavigationItem =\n (id: string, item: PartialDeep<OwpNavItemType>): AppThunk =>\n async (dispatch, getState) => {\n const AppState = getState();\n const navigation = OwpNavigationHelper.unflattenNavigation(selectNavigationAll(AppState));\n\n dispatch(setNavigation(OwpNavigationHelper.updateNavItem(navigation, id, item)));\n\n return Promise.resolve();\n };\n\n/**\n * Removes a navigation item from the navigation store state.\n */\nexport const removeNavigationItem =\n (id: string): AppThunk =>\n async (dispatch, getState) => {\n const AppState = getState();\n const navigation = OwpNavigationHelper.unflattenNavigation(selectNavigationAll(AppState));\n\n dispatch(setNavigation(OwpNavigationHelper.removeNavItem(navigation, id)));\n\n return Promise.resolve();\n };\n\nexport const {\n selectAll: selectNavigationAll,\n selectIds: selectNavigationIds,\n selectById: selectNavigationItemById,\n} = navigationAdapter.getSelectors<RootState>((state) => state.navigation!);\n\n/**\n * The navigation slice\n */\nexport const navigationSlice: any = createSlice({\n name: 'navigation',\n initialState,\n reducers: {\n setNavigation(state, action: PayloadAction<OwpNavItemType[]>) {\n return navigationAdapter.setAll(state, OwpNavigationHelper.flattenNavigation(action.payload));\n },\n resetNavigation: () => initialState,\n },\n});\n\n/**\n * Lazy load\n * */\n// rootReducer.inject(navigationSlice);\n// navigationSlice.injectInto(rootReducer);\ndeclare module '@/store/lazyLoadedSlices' {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n export interface LazyLoadedSlices extends WithSlice<typeof navigationSlice> {}\n}\n\nexport const { setNavigation, resetNavigation } = navigationSlice.actions;\n\n/**\n * selectNavigation selector\n */\nexport const selectNavigation = (createSelector as any)(\n [selectNavigationAll],\n (navigationSimple, userRole) => {\n const navigation = OwpNavigationHelper.unflattenNavigation(navigationSimple);\n\n function setAdditionalData(data: OwpNavItemType[]): OwpNavItemType[] {\n return data?.map((item) => ({\n hasPermission: Boolean(OwpUtils.hasPermission(item?.auth, userRole)),\n ...item,\n ...(item?.translate && item?.title\n ? { title: i18next.t(`navigation:${item?.translate}`) }\n : {}),\n ...(item?.children ? { children: setAdditionalData(item?.children) } : {}),\n }));\n }\n\n const translatedValues = setAdditionalData(navigation);\n\n return translatedValues;\n },\n);\n\n/**\n * selectFlatNavigation selector\n */\nexport const selectFlatNavigation = createSelector([selectNavigation], (navigation) => {\n return OwpNavigationHelper.flattenNavigation(navigation);\n});\n\nexport type navigationSliceType = typeof navigationSlice;\n\nexport default navigationSlice.reducer;\n"],"names":["navigationAdapter","createEntityAdapter","emptyInitialState","initialState","selectNavigationAll","selectNavigationIds","selectNavigationItemById","state","navigationSlice","createSlice","action","OwpNavigationHelper","__name","setNavigation","resetNavigation","selectNavigation","createSelector","navigationSimple","userRole","navigation","setAdditionalData","data","item","OwpUtils","i18next"],"mappings":";;;;;;AAeA,MAAMA,IAAoBC,EAAA,GAEpBC,IAAoBF,EAAkB,gBAAgB,EAAE,GAExDG,IAAeD,GAmER;AAAA,EACX,WAAWE;AAAA,EACX,WAAWC;AAAA,EACX,YAAYC;AACd,IAAIN,EAAkB,aAAwB,CAACO,MAAUA,EAAM,UAAW,GAK7DC,IAAuBC,EAAY;AAAA,EAC9C,MAAM;AAAA,EACN,cAAAN;AAAA,EACA,UAAU;AAAA,IACR,cAAcI,GAAOG,GAAyC;AAC5D,aAAOV,EAAkB,OAAOO,GAAOI,EAAoB,kBAAkBD,EAAO,OAAO,CAAC;AAAA,IAC9F;AAAA,IACA,iBAAiB,gBAAAE,EAAA,MAAMT,GAAN;AAAA,EAAM;AAE3B,CAAC,GAYY,EAAE,eAAAU,GAAe,iBAAAC,EAAA,IAAoBN,EAAgB,SAKrDO,IAAoBC;AAAA,EAC/B,CAACZ,CAAmB;AAAA,EACpB,CAACa,GAAkBC,MAAa;AAC9B,UAAMC,IAAaR,EAAoB,oBAAoBM,CAAgB;AAE3E,aAASG,EAAkBC,GAA0C;AACnE,aAAOA,KAAA,gBAAAA,EAAM,IAAI,CAACC,OAAU;AAAA,QAC1B,eAAe,EAAQC,EAAS,cAAcD,KAAA,gBAAAA,EAAM,MAAMJ,CAAQ;AAAA,QAClE,GAAGI;AAAA,QACH,GAAIA,KAAA,QAAAA,EAAM,cAAaA,KAAA,QAAAA,EAAM,SACzB,EAAE,OAAOE,EAAQ,EAAE,cAAcF,KAAA,gBAAAA,EAAM,SAAS,EAAE,EAAA,IAClD,CAAA;AAAA,QACJ,GAAIA,KAAA,QAAAA,EAAM,WAAW,EAAE,UAAUF,EAAkBE,KAAA,gBAAAA,EAAM,QAAQ,MAAM,CAAA;AAAA,MAAC;AAAA,IAE5E;AATS,WAAAV,EAAAQ,GAAA,sBAWgBA,EAAkBD,CAAU;AAAA,EAGvD;AACF;AAKoCH,EAAe,CAACD,CAAgB,GAAG,CAACI,MAC/DR,EAAoB,kBAAkBQ,CAAU,CACxD;AAIcX,EAAgB;"}
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
var y = Object.defineProperty;
|
|
2
|
-
var s = (e, t) => y(e, "name", { value: t, configurable: !0 });
|
|
3
|
-
import { generateSettings as T, createInitialOwpSettings as v, mustHaveThemeOptions as M, defaultThemeOptions as x, extendThemeWithMixins as L } from "../configs/defaultConfig.js";
|
|
4
|
-
import { getContrastRatio as N, createTheme as A } from "@mui/material/styles";
|
|
5
|
-
import { createAsyncThunk as b, createSlice as E, createSelector as o } from "@reduxjs/toolkit";
|
|
6
|
-
import { merge as l } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/merge.js";
|
|
7
|
-
const I = {
|
|
8
|
-
primary: "rgb(17, 24, 39)",
|
|
9
|
-
secondary: "rgb(107, 114, 128)",
|
|
10
|
-
disabled: "rgb(149, 156, 169)"
|
|
11
|
-
}, P = {
|
|
12
|
-
primary: "rgb(255,255,255)",
|
|
13
|
-
secondary: "rgb(148, 163, 184)",
|
|
14
|
-
disabled: "rgb(156, 163, 175)"
|
|
15
|
-
}, G = b(
|
|
16
|
-
"owpSettings/changeOwpTheme",
|
|
17
|
-
async (e, { dispatch: t, getState: n }) => {
|
|
18
|
-
const g = n().owpSettings, { navbar: O, footer: C, toolbar: D, main: k } = e, F = {
|
|
19
|
-
...g.current,
|
|
20
|
-
theme: {
|
|
21
|
-
main: k,
|
|
22
|
-
navbar: O,
|
|
23
|
-
toolbar: D,
|
|
24
|
-
footer: C
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
return await t(w(F)).unwrap();
|
|
28
|
-
}
|
|
29
|
-
), m = v(), f = {
|
|
30
|
-
initial: m,
|
|
31
|
-
defaults: l({}, m),
|
|
32
|
-
current: l({}, m)
|
|
33
|
-
}, w = b(
|
|
34
|
-
"owpSettings/setDefaultSettings",
|
|
35
|
-
async (e, { getState: t }) => {
|
|
36
|
-
const u = t().owpSettings, g = T(u.defaults, e);
|
|
37
|
-
return {
|
|
38
|
-
...u,
|
|
39
|
-
defaults: l({}, g),
|
|
40
|
-
current: l({}, g)
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
), r = E({
|
|
44
|
-
name: "owpSettings",
|
|
45
|
-
initialState: f,
|
|
46
|
-
reducers: {
|
|
47
|
-
setSettings: /* @__PURE__ */ s((e, t) => {
|
|
48
|
-
const n = T(e.defaults, t.payload);
|
|
49
|
-
return {
|
|
50
|
-
...e,
|
|
51
|
-
current: n
|
|
52
|
-
};
|
|
53
|
-
}, "setSettings"),
|
|
54
|
-
setInitialSettings: /* @__PURE__ */ s(() => l({}, f), "setInitialSettings"),
|
|
55
|
-
resetSettings: /* @__PURE__ */ s((e) => ({
|
|
56
|
-
...e,
|
|
57
|
-
defaults: l({}, e.defaults),
|
|
58
|
-
current: l({}, e.defaults)
|
|
59
|
-
}), "resetSettings")
|
|
60
|
-
},
|
|
61
|
-
extraReducers: /* @__PURE__ */ s((e) => {
|
|
62
|
-
e.addCase(w.fulfilled, (t, n) => n.payload);
|
|
63
|
-
}, "extraReducers"),
|
|
64
|
-
selectors: {
|
|
65
|
-
selectOwpSettings: /* @__PURE__ */ s((e) => e, "selectOwpSettings"),
|
|
66
|
-
selectOwpSettingsDefaults: /* @__PURE__ */ s((e) => e.defaults, "selectOwpSettingsDefaults"),
|
|
67
|
-
selectOwpSettingsCurrent: /* @__PURE__ */ s((e) => e.current, "selectOwpSettingsCurrent"),
|
|
68
|
-
selectOwpCurrentSettings: /* @__PURE__ */ s((e) => e.current, "selectOwpCurrentSettings"),
|
|
69
|
-
getDirection: /* @__PURE__ */ s((e) => e.current.direction, "getDirection"),
|
|
70
|
-
getMainTheme: /* @__PURE__ */ s((e) => e.current.theme.main, "getMainTheme"),
|
|
71
|
-
getNavbarTheme: /* @__PURE__ */ s((e) => e.current.theme.navbar, "getNavbarTheme"),
|
|
72
|
-
getToolbarTheme: /* @__PURE__ */ s((e) => e.current.theme.toolbar, "getToolbarTheme"),
|
|
73
|
-
getFooterTheme: /* @__PURE__ */ s((e) => e.current.theme.footer, "getFooterTheme"),
|
|
74
|
-
selectOwpCurrentLayoutConfig: /* @__PURE__ */ s((e) => e.current.layout.config, "selectOwpCurrentLayoutConfig"),
|
|
75
|
-
selectOwpDefaultSettings: /* @__PURE__ */ s((e) => e.defaults, "selectOwpDefaultSettings"),
|
|
76
|
-
selectCustomScrollbarsEnabled: /* @__PURE__ */ s((e) => e.current.customScrollbars, "selectCustomScrollbarsEnabled")
|
|
77
|
-
}
|
|
78
|
-
}), J = r.selectors.selectOwpCurrentLayoutConfig, K = r.selectors.selectOwpCurrentSettings, Q = r.selectors.selectOwpSettings, U = r.selectors.selectOwpSettingsDefaults, V = r.selectors.selectOwpSettingsCurrent, X = r.selectors.selectOwpDefaultSettings, Y = r.selectors.selectCustomScrollbarsEnabled, c = r.selectors.getDirection, h = r.selectors.getMainTheme, p = r.selectors.getNavbarTheme, d = r.selectors.getToolbarTheme, S = r.selectors.getFooterTheme;
|
|
79
|
-
function a(e, t) {
|
|
80
|
-
const n = l({}, x, e, M);
|
|
81
|
-
return A(
|
|
82
|
-
l({}, n, {
|
|
83
|
-
mixins: L(n),
|
|
84
|
-
direction: t
|
|
85
|
-
})
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
s(a, "generateMuiTheme");
|
|
89
|
-
const Z = /* @__PURE__ */ s((e) => {
|
|
90
|
-
function t(n) {
|
|
91
|
-
return N(n, "#ffffff") >= 3;
|
|
92
|
-
}
|
|
93
|
-
return s(t, "isDark"), t(e) ? R : H;
|
|
94
|
-
}, "selectContrastMainTheme");
|
|
95
|
-
function i(e, t) {
|
|
96
|
-
return l({}, e, {
|
|
97
|
-
dark: {
|
|
98
|
-
palette: {
|
|
99
|
-
mode: "dark",
|
|
100
|
-
divider: "rgba(241,245,249,.12)",
|
|
101
|
-
background: {
|
|
102
|
-
paper: "#1E2125",
|
|
103
|
-
default: "#121212"
|
|
104
|
-
},
|
|
105
|
-
text: P
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
light: {
|
|
109
|
-
palette: {
|
|
110
|
-
mode: "light",
|
|
111
|
-
divider: "#e2e8f0",
|
|
112
|
-
background: {
|
|
113
|
-
paper: "#FFFFFF",
|
|
114
|
-
default: "#F7F7F7"
|
|
115
|
-
},
|
|
116
|
-
text: I
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}[t]);
|
|
120
|
-
}
|
|
121
|
-
s(i, "changeThemeMode");
|
|
122
|
-
const _ = o(
|
|
123
|
-
[h, c],
|
|
124
|
-
(e, t) => a(e, t)
|
|
125
|
-
), R = o(
|
|
126
|
-
[h, c],
|
|
127
|
-
(e, t) => a(i(e, "dark"), t)
|
|
128
|
-
), H = o(
|
|
129
|
-
[h, c],
|
|
130
|
-
(e, t) => a(i(e, "light"), t)
|
|
131
|
-
), $ = o(
|
|
132
|
-
[p, c],
|
|
133
|
-
(e, t) => a(e, t)
|
|
134
|
-
), ee = o(
|
|
135
|
-
[p, c],
|
|
136
|
-
(e, t) => a(i(e, "dark"), t)
|
|
137
|
-
), te = o(
|
|
138
|
-
[p, c],
|
|
139
|
-
(e, t) => a(i(e, "light"), t)
|
|
140
|
-
), se = o(
|
|
141
|
-
[d, c],
|
|
142
|
-
(e, t) => a(e, t)
|
|
143
|
-
), re = o(
|
|
144
|
-
[d, c],
|
|
145
|
-
(e, t) => a(i(e, "dark"), t)
|
|
146
|
-
), ne = o(
|
|
147
|
-
[d, c],
|
|
148
|
-
(e, t) => a(i(e, "light"), t)
|
|
149
|
-
), oe = o(
|
|
150
|
-
[S, c],
|
|
151
|
-
(e, t) => a(e, t)
|
|
152
|
-
), ce = o(
|
|
153
|
-
[S, c],
|
|
154
|
-
(e, t) => a(i(e, "dark"), t)
|
|
155
|
-
), ae = o(
|
|
156
|
-
[S, c],
|
|
157
|
-
(e, t) => a(i(e, "light"), t)
|
|
158
|
-
), { resetSettings: le, setInitialSettings: ie, setSettings: ge } = r.actions;
|
|
159
|
-
r.reducer;
|
|
160
|
-
export {
|
|
161
|
-
G as changeOwpTheme,
|
|
162
|
-
P as darkPaletteText,
|
|
163
|
-
c as getDirection,
|
|
164
|
-
S as getFooterTheme,
|
|
165
|
-
h as getMainTheme,
|
|
166
|
-
p as getNavbarTheme,
|
|
167
|
-
d as getToolbarTheme,
|
|
168
|
-
I as lightPaletteText,
|
|
169
|
-
r as owpSettingsSlice,
|
|
170
|
-
le as resetSettings,
|
|
171
|
-
Z as selectContrastMainTheme,
|
|
172
|
-
Y as selectCustomScrollbarsEnabled,
|
|
173
|
-
oe as selectFooterTheme,
|
|
174
|
-
ce as selectFooterThemeDark,
|
|
175
|
-
ae as selectFooterThemeLight,
|
|
176
|
-
_ as selectMainTheme,
|
|
177
|
-
R as selectMainThemeDark,
|
|
178
|
-
H as selectMainThemeLight,
|
|
179
|
-
$ as selectNavbarTheme,
|
|
180
|
-
ee as selectNavbarThemeDark,
|
|
181
|
-
te as selectNavbarThemeLight,
|
|
182
|
-
J as selectOwpCurrentLayoutConfig,
|
|
183
|
-
K as selectOwpCurrentSettings,
|
|
184
|
-
X as selectOwpDefaultSettings,
|
|
185
|
-
Q as selectOwpSettings,
|
|
186
|
-
V as selectOwpSettingsCurrent,
|
|
187
|
-
U as selectOwpSettingsDefaults,
|
|
188
|
-
se as selectToolbarTheme,
|
|
189
|
-
re as selectToolbarThemeDark,
|
|
190
|
-
ne as selectToolbarThemeLight,
|
|
191
|
-
w as setDefaultSettings,
|
|
192
|
-
ie as setInitialSettings,
|
|
193
|
-
ge as setSettings
|
|
194
|
-
};
|
|
195
|
-
//# sourceMappingURL=owpSettingsSlice.js.map
|