@pnkx-lib/ui 1.9.121 → 1.9.122
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/style.css +2 -2
- package/es/chunks/{AntdIcon-BS99Z6_t.js → AntdIcon-CtaI55qk.js} +421 -7164
- package/es/chunks/{Card-CCVU-3bH.js → Card-DJZ1AqcL.js} +263 -217
- package/es/chunks/{Switch-vaUhKEAu.js → Switch-CigYj8FF.js} +1 -1
- package/es/chunks/{useToast-DL7nQTK1.js → useMessage-CUPcOtIS.js} +14 -2
- package/es/fields/index.js +2 -2
- package/es/hooks/index.js +1 -2
- package/es/index.js +4 -5
- package/es/ui/index.js +2 -2
- package/package.json +1 -1
- package/types/fields.d.ts +1 -1
- package/types/hooks.d.ts +1 -1
- package/types/index.d.ts +3 -2
- package/types/{components/ui → ui}/BulkActions/BulkAction.d.ts +1 -1
- package/types/{components/ui → ui}/BulkActions/index.d.ts +1 -1
- package/types/{components/ui → ui}/Sidebar.d.ts +3 -2
- package/types/{components/ui → ui}/Table/ActionRowTable/index.d.ts +1 -1
- package/types/{components/ui → ui}/Table/HeadingTable/components/GroupHeadingButton.d.ts +1 -1
- package/types/{components/ui → ui}/Table/index.d.ts +1 -1
- package/types/ui.d.ts +1 -1
- package/es/chunks/useMessage-CADDGtSx.js +0 -15
- package/types/App.d.ts +0 -2
- package/types/DemoInput/DemoInput.d.ts +0 -1
- package/types/DemoTable/FiltersCategoryDemo/components/RenderFilterFields.d.ts +0 -12
- package/types/DemoTable/FiltersCategoryDemo/components/TagsFilter.d.ts +0 -12
- package/types/DemoTable/FiltersCategoryDemo/index.d.ts +0 -8
- package/types/DemoTable/apiUser.d.ts +0 -30
- package/types/DemoTable/hooks/useConvertGroupButton.d.ts +0 -13
- package/types/DemoTable/index.d.ts +0 -2
- package/types/DemoTable/tabDemo.d.ts +0 -2
- package/types/assets/svg/404.d.ts +0 -2
- package/types/assets/svg/Flag.d.ts +0 -2
- package/types/assets/svg/Logout.d.ts +0 -2
- package/types/assets/svg/Search.d.ts +0 -2
- package/types/assets/svg/Setting.d.ts +0 -2
- package/types/components/index.d.ts +0 -3
- package/types/constants/common.d.ts +0 -1
- package/types/constants/index.d.ts +0 -2
- package/types/constants/table.d.ts +0 -32
- package/types/helpers/common.d.ts +0 -1
- package/types/interface/common.d.ts +0 -8
- package/types/interface/tab.d.ts +0 -5
- package/types/main.d.ts +0 -0
- package/types/stores/tabStore.d.ts +0 -6
- package/types/stories/Input.stories.d.ts +0 -6
- package/types/utils/router.d.ts +0 -35
- package/types/utils/timer.d.ts +0 -7
- package/types/vite-env.d.ts +0 -1
- /package/types/{components/fields → fields}/CascaderField.d.ts +0 -0
- /package/types/{components/fields → fields}/Checkbox.d.ts +0 -0
- /package/types/{components/fields → fields}/DatePicker.d.ts +0 -0
- /package/types/{components/fields → fields}/DateRangePicker.d.ts +0 -0
- /package/types/{components/fields → fields}/Input.d.ts +0 -0
- /package/types/{components/fields → fields}/PnkxField.d.ts +0 -0
- /package/types/{components/fields → fields}/Radio.d.ts +0 -0
- /package/types/{components/fields → fields}/Select.d.ts +0 -0
- /package/types/{components/fields → fields}/Switch.d.ts +0 -0
- /package/types/{components/fields → fields}/Textarea.d.ts +0 -0
- /package/types/{components/fields → fields}/TinyMCE.d.ts +0 -0
- /package/types/{components/fields → fields}/Upload.d.ts +0 -0
- /package/types/{components/fields → fields}/index.d.ts +0 -0
- /package/types/{components/hooks → hooks}/index.d.ts +0 -0
- /package/types/{components/hooks → hooks}/useDebounce.d.ts +0 -0
- /package/types/{components/hooks → hooks}/useMessage.d.ts +0 -0
- /package/types/{components/hooks → hooks}/useToast.d.ts +0 -0
- /package/types/{components/icons → icons}/ActivateIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/AllowClearIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/ApprovalIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/CancelApprovalIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/CancelSendApprovalIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/DeleteIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/DragIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/EditIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/ErrorConfirmIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/InActivateIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/InfoConfirmIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/MoreIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/PlusIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/RefuseApprovalIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/RestoreIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/SearchAdvanceIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/SearchIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/SendApprovalIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/SettingIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/SuccessIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/TrashCanIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/WaitingApprovalIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/WarningConfirmIcon.d.ts +0 -0
- /package/types/{components/icons → icons}/index.d.ts +0 -0
- /package/types/{components/ui → ui}/Alert.d.ts +0 -0
- /package/types/{components/ui → ui}/Anchor.d.ts +0 -0
- /package/types/{components/ui → ui}/Appfix.d.ts +0 -0
- /package/types/{components/ui → ui}/AutoComplete.d.ts +0 -0
- /package/types/{components/ui → ui}/Badge.d.ts +0 -0
- /package/types/{components/ui → ui}/Breadcrumb.d.ts +0 -0
- /package/types/{components/ui → ui}/BreadcrumbHeading.d.ts +0 -0
- /package/types/{components/ui → ui}/BulkActions/DropListActions.d.ts +0 -0
- /package/types/{components/ui → ui}/Button.d.ts +0 -0
- /package/types/{components/ui → ui}/Card.d.ts +0 -0
- /package/types/{components/ui → ui}/Cascader.d.ts +0 -0
- /package/types/{components/ui → ui}/CategoryStatus.d.ts +0 -0
- /package/types/{components/ui → ui}/Col.d.ts +0 -0
- /package/types/{components/ui → ui}/Collapse.d.ts +0 -0
- /package/types/{components/ui → ui}/ColorPicker.d.ts +0 -0
- /package/types/{components/ui → ui}/ConfirmModal.d.ts +0 -0
- /package/types/{components/ui → ui}/Container.d.ts +0 -0
- /package/types/{components/ui → ui}/Divider.d.ts +0 -0
- /package/types/{components/ui → ui}/Drawer.d.ts +0 -0
- /package/types/{components/ui → ui}/Dropdown.d.ts +0 -0
- /package/types/{components/ui → ui}/Empty.d.ts +0 -0
- /package/types/{components/ui → ui}/ErrorBoundary.d.ts +0 -0
- /package/types/{components/ui → ui}/ErrorMessage.d.ts +0 -0
- /package/types/{components/ui → ui}/Flex.d.ts +0 -0
- /package/types/{components/ui → ui}/Footer.d.ts +0 -0
- /package/types/{components/ui → ui}/Heading.d.ts +0 -0
- /package/types/{components/ui → ui}/Image.d.ts +0 -0
- /package/types/{components/ui → ui}/Label.d.ts +0 -0
- /package/types/{components/ui → ui}/Layout.d.ts +0 -0
- /package/types/{components/ui → ui}/Menu.d.ts +0 -0
- /package/types/{components/ui → ui}/Modal.d.ts +0 -0
- /package/types/{components/ui → ui}/Page404.d.ts +0 -0
- /package/types/{components/ui → ui}/Pagination.d.ts +0 -0
- /package/types/{components/ui → ui}/Popconfirm.d.ts +0 -0
- /package/types/{components/ui → ui}/Popover.d.ts +0 -0
- /package/types/{components/ui → ui}/QRCode.d.ts +0 -0
- /package/types/{components/ui → ui}/Rate.d.ts +0 -0
- /package/types/{components/ui → ui}/Result.d.ts +0 -0
- /package/types/{components/ui → ui}/Row.d.ts +0 -0
- /package/types/{components/ui → ui}/SearchFilterForm.d.ts +0 -0
- /package/types/{components/ui → ui}/Segmented.d.ts +0 -0
- /package/types/{components/ui → ui}/Skeleton.d.ts +0 -0
- /package/types/{components/ui → ui}/Space.d.ts +0 -0
- /package/types/{components/ui → ui}/Spin.d.ts +0 -0
- /package/types/{components/ui → ui}/Splitter.d.ts +0 -0
- /package/types/{components/ui → ui}/Statistic.d.ts +0 -0
- /package/types/{components/ui → ui}/Steps.d.ts +0 -0
- /package/types/{components/ui → ui}/Table/HeadingTable/index.d.ts +0 -0
- /package/types/{components/ui → ui}/Table/SettingTable/IconSettingTable.d.ts +0 -0
- /package/types/{components/ui → ui}/Table/SettingTable/SettingColumnItem.d.ts +0 -0
- /package/types/{components/ui → ui}/Table/SettingTable/SortableItem.d.ts +0 -0
- /package/types/{components/ui → ui}/Table/SettingTable/index.d.ts +0 -0
- /package/types/{components/ui → ui}/Tabs.d.ts +0 -0
- /package/types/{components/ui → ui}/Tag.d.ts +0 -0
- /package/types/{components/ui → ui}/Timeline.d.ts +0 -0
- /package/types/{components/ui → ui}/Tooltip.d.ts +0 -0
- /package/types/{components/ui → ui}/Tour.d.ts +0 -0
- /package/types/{components/ui → ui}/Tree.d.ts +0 -0
- /package/types/{components/ui → ui}/Typography.d.ts +0 -0
- /package/types/{components/ui → ui}/Watermark.d.ts +0 -0
- /package/types/{components/ui → ui}/index.d.ts +0 -0
@@ -1,10 +1,9 @@
|
|
1
|
-
import { j as jsxRuntimeExports, c as Icon, _ as _extends, e as _typeof, P as PnkxField, C as CheckboxField, t as twMerge, u as useForm, d as className, l as lodashExports, f as commonjsGlobal, h as _arrayLikeToArray, i as _unsupportedIterableToArray, w as warningOnce, k as _createClass, m as _classCallCheck, n as _defineProperty, o as _slicedToArray, p as warning$1, q as canUseDom, r as _objectSpread2, s as updateCSS, v as removeCSS, x as _arrayWithHoles, y as _nonIterableRest, z as resetWarned$1, F as FastColor, A as generate, B as presetPrimaryColors, G as presetPalettes, H as _inherits, J as _createSuper, K as _assertThisInitialized, M as _objectWithoutProperties, N as IconContext, I as Input } from './AntdIcon-
|
1
|
+
import { j as jsxRuntimeExports, c as Icon, _ as _extends, e as _typeof, P as PnkxField, C as CheckboxField, t as twMerge, u as useForm, d as className, l as lodashExports, f as commonjsGlobal, h as _arrayLikeToArray, i as _unsupportedIterableToArray, w as warningOnce, k as _createClass, m as _classCallCheck, n as _defineProperty, o as _slicedToArray, p as warning$1, q as canUseDom, r as _objectSpread2, s as updateCSS, v as removeCSS, x as _arrayWithHoles, y as _nonIterableRest, z as resetWarned$1, F as FastColor, A as generate, B as presetPrimaryColors, G as presetPalettes, H as _inherits, J as _createSuper, K as _assertThisInitialized, M as _objectWithoutProperties, N as IconContext, I as Input } from './AntdIcon-CtaI55qk.js';
|
2
2
|
import { Button as Button$1, Cascader, Modal as Modal$1, Badge as Badge$1, Breadcrumb as Breadcrumb$1, Tooltip as Tooltip$1, Divider as Divider$2, Table as Table$1, Tabs as Tabs$1, Space as Space$1, Card as Card$1, Skeleton as Skeleton$1, Popover as Popover$1, Col as Col$1, Row as Row$1, Dropdown as Dropdown$1, Flex as Flex$1, Splitter as Splitter$1, Menu as Menu$1, Pagination as Pagination$1, Steps as Steps$1, Tag as Tag$1, Alert as Alert$1, Spin as Spin$1, Drawer as Drawer$1, Popconfirm as Popconfirm$1, QRCode as QRCode$1, Result as Result$1, Rate as Rate$1, Segmented as Segmented$1, Statistic as Statistic$1, Timeline as Timeline$1, Tour as Tour$1, Tree as Tree$1, Typography, Watermark as Watermark$1, Anchor as Anchor$1, Affix, AutoComplete as AutoComplete$1, Input as Input$1, Collapse, ColorPicker, Empty as Empty$2, Image as Image$1 } from 'antd';
|
3
3
|
import * as React from 'react';
|
4
4
|
import React__default, { version as version$1, isValidElement, useLayoutEffect as useLayoutEffect$1, useEffect, useRef, useMemo as useMemo$1, useCallback, useState, createContext, memo, useReducer, useContext, Component } from 'react';
|
5
5
|
import ReactDOM__default, { unstable_batchedUpdates, createPortal } from 'react-dom';
|
6
6
|
import { useLocation, useNavigate } from 'react-router';
|
7
|
-
import { u as useToast } from './useToast-DL7nQTK1.js';
|
8
7
|
|
9
8
|
const Button = (props) => {
|
10
9
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { ...props });
|
@@ -42,9 +41,9 @@ var ArrowLeftOutlined = function ArrowLeftOutlined(props, ref) {
|
|
42
41
|
};
|
43
42
|
|
44
43
|
/** */
|
45
|
-
var RefIcon$
|
44
|
+
var RefIcon$9 = /*#__PURE__*/React.forwardRef(ArrowLeftOutlined);
|
46
45
|
if (process.env.NODE_ENV !== 'production') {
|
47
|
-
RefIcon$
|
46
|
+
RefIcon$9.displayName = 'ArrowLeftOutlined';
|
48
47
|
}
|
49
48
|
|
50
49
|
// This icon file is generated automatically.
|
@@ -58,9 +57,25 @@ var BarsOutlined = function BarsOutlined(props, ref) {
|
|
58
57
|
};
|
59
58
|
|
60
59
|
/** */
|
61
|
-
var RefIcon$
|
60
|
+
var RefIcon$8 = /*#__PURE__*/React.forwardRef(BarsOutlined);
|
62
61
|
if (process.env.NODE_ENV !== 'production') {
|
63
|
-
RefIcon$
|
62
|
+
RefIcon$8.displayName = 'BarsOutlined';
|
63
|
+
}
|
64
|
+
|
65
|
+
// This icon file is generated automatically.
|
66
|
+
var DownOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
|
67
|
+
|
68
|
+
var DownOutlined = function DownOutlined(props, ref) {
|
69
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
70
|
+
ref: ref,
|
71
|
+
icon: DownOutlined$1
|
72
|
+
}));
|
73
|
+
};
|
74
|
+
|
75
|
+
/** */
|
76
|
+
var RefIcon$7 = /*#__PURE__*/React.forwardRef(DownOutlined);
|
77
|
+
if (process.env.NODE_ENV !== 'production') {
|
78
|
+
RefIcon$7.displayName = 'DownOutlined';
|
64
79
|
}
|
65
80
|
|
66
81
|
// This icon file is generated automatically.
|
@@ -74,9 +89,9 @@ var FilterOutlined = function FilterOutlined(props, ref) {
|
|
74
89
|
};
|
75
90
|
|
76
91
|
/** */
|
77
|
-
var RefIcon$
|
92
|
+
var RefIcon$6 = /*#__PURE__*/React.forwardRef(FilterOutlined);
|
78
93
|
if (process.env.NODE_ENV !== 'production') {
|
79
|
-
RefIcon$
|
94
|
+
RefIcon$6.displayName = 'FilterOutlined';
|
80
95
|
}
|
81
96
|
|
82
97
|
// This icon file is generated automatically.
|
@@ -90,9 +105,9 @@ var LeftOutlined = function LeftOutlined(props, ref) {
|
|
90
105
|
};
|
91
106
|
|
92
107
|
/** */
|
93
|
-
var RefIcon$
|
108
|
+
var RefIcon$5 = /*#__PURE__*/React.forwardRef(LeftOutlined);
|
94
109
|
if (process.env.NODE_ENV !== 'production') {
|
95
|
-
RefIcon$
|
110
|
+
RefIcon$5.displayName = 'LeftOutlined';
|
96
111
|
}
|
97
112
|
|
98
113
|
// This icon file is generated automatically.
|
@@ -106,9 +121,9 @@ var LogoutOutlined = function LogoutOutlined(props, ref) {
|
|
106
121
|
};
|
107
122
|
|
108
123
|
/** */
|
109
|
-
var RefIcon$
|
124
|
+
var RefIcon$4 = /*#__PURE__*/React.forwardRef(LogoutOutlined);
|
110
125
|
if (process.env.NODE_ENV !== 'production') {
|
111
|
-
RefIcon$
|
126
|
+
RefIcon$4.displayName = 'LogoutOutlined';
|
112
127
|
}
|
113
128
|
|
114
129
|
// This icon file is generated automatically.
|
@@ -122,9 +137,9 @@ var RightOutlined = function RightOutlined(props, ref) {
|
|
122
137
|
};
|
123
138
|
|
124
139
|
/** */
|
125
|
-
var RefIcon$
|
140
|
+
var RefIcon$3 = /*#__PURE__*/React.forwardRef(RightOutlined);
|
126
141
|
if (process.env.NODE_ENV !== 'production') {
|
127
|
-
RefIcon$
|
142
|
+
RefIcon$3.displayName = 'RightOutlined';
|
128
143
|
}
|
129
144
|
|
130
145
|
// This icon file is generated automatically.
|
@@ -138,9 +153,9 @@ var SearchOutlined = function SearchOutlined(props, ref) {
|
|
138
153
|
};
|
139
154
|
|
140
155
|
/** */
|
141
|
-
var RefIcon$
|
156
|
+
var RefIcon$2 = /*#__PURE__*/React.forwardRef(SearchOutlined);
|
142
157
|
if (process.env.NODE_ENV !== 'production') {
|
143
|
-
RefIcon$
|
158
|
+
RefIcon$2.displayName = 'SearchOutlined';
|
144
159
|
}
|
145
160
|
|
146
161
|
// This icon file is generated automatically.
|
@@ -154,9 +169,25 @@ var SettingOutlined = function SettingOutlined(props, ref) {
|
|
154
169
|
};
|
155
170
|
|
156
171
|
/** */
|
157
|
-
var RefIcon = /*#__PURE__*/React.forwardRef(SettingOutlined);
|
172
|
+
var RefIcon$1 = /*#__PURE__*/React.forwardRef(SettingOutlined);
|
158
173
|
if (process.env.NODE_ENV !== 'production') {
|
159
|
-
RefIcon.displayName = 'SettingOutlined';
|
174
|
+
RefIcon$1.displayName = 'SettingOutlined';
|
175
|
+
}
|
176
|
+
|
177
|
+
// This icon file is generated automatically.
|
178
|
+
var UpOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, "name": "up", "theme": "outlined" };
|
179
|
+
|
180
|
+
var UpOutlined = function UpOutlined(props, ref) {
|
181
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
182
|
+
ref: ref,
|
183
|
+
icon: UpOutlined$1
|
184
|
+
}));
|
185
|
+
};
|
186
|
+
|
187
|
+
/** */
|
188
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(UpOutlined);
|
189
|
+
if (process.env.NODE_ENV !== 'production') {
|
190
|
+
RefIcon.displayName = 'UpOutlined';
|
160
191
|
}
|
161
192
|
|
162
193
|
var reactIs = {exports: {}};
|
@@ -5226,14 +5257,14 @@ const Heading = (props) => {
|
|
5226
5257
|
const pathUrl = location.pathname;
|
5227
5258
|
const breadcrumbs = [{ title: "Trang chủ", href: "/" }];
|
5228
5259
|
menu.forEach((itemMenu) => {
|
5229
|
-
itemMenu.
|
5260
|
+
itemMenu.children.forEach((itemModule) => {
|
5230
5261
|
if (pathUrl.startsWith(itemModule.path)) {
|
5231
5262
|
breadcrumbs.push({
|
5232
5263
|
title: itemModule.name,
|
5233
5264
|
href: itemModule.path
|
5234
5265
|
});
|
5235
5266
|
}
|
5236
|
-
itemModule.
|
5267
|
+
itemModule.children?.forEach((itemSubmenu) => {
|
5237
5268
|
if (pathUrl.startsWith(itemSubmenu.path)) {
|
5238
5269
|
breadcrumbs.push({
|
5239
5270
|
title: itemSubmenu.name,
|
@@ -5995,7 +6026,7 @@ const SearchFiltersForm = ({
|
|
5995
6026
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
5996
6027
|
Button,
|
5997
6028
|
{
|
5998
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
6029
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$2, {}),
|
5999
6030
|
className: "px-3 py-1 ",
|
6000
6031
|
color: "blue",
|
6001
6032
|
variant: "solid",
|
@@ -6006,7 +6037,7 @@ const SearchFiltersForm = ({
|
|
6006
6037
|
!hideResetButton && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
6007
6038
|
Button,
|
6008
6039
|
{
|
6009
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
6040
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$6, {}),
|
6010
6041
|
className: "px-3 py-1",
|
6011
6042
|
onClick: () => {
|
6012
6043
|
reset();
|
@@ -8441,10 +8472,11 @@ const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
|
|
8441
8472
|
motion: true
|
8442
8473
|
});
|
8443
8474
|
|
8444
|
-
function genColorMapToken(seed, {
|
8445
|
-
|
8446
|
-
|
8447
|
-
|
8475
|
+
function genColorMapToken(seed, _ref) {
|
8476
|
+
let {
|
8477
|
+
generateColorPalettes,
|
8478
|
+
generateNeutralColorPalettes
|
8479
|
+
} = _ref;
|
8448
8480
|
const {
|
8449
8481
|
colorSuccess: colorSuccessBase,
|
8450
8482
|
colorWarning: colorWarningBase,
|
@@ -8884,10 +8916,11 @@ function registerTheme(globalPrefixCls, theme) {
|
|
8884
8916
|
}
|
8885
8917
|
|
8886
8918
|
const DisabledContext = /*#__PURE__*/React.createContext(false);
|
8887
|
-
const DisabledContextProvider =
|
8888
|
-
|
8889
|
-
|
8890
|
-
|
8919
|
+
const DisabledContextProvider = _ref => {
|
8920
|
+
let {
|
8921
|
+
children,
|
8922
|
+
disabled
|
8923
|
+
} = _ref;
|
8891
8924
|
const originDisabled = React.useContext(DisabledContext);
|
8892
8925
|
return /*#__PURE__*/React.createElement(DisabledContext.Provider, {
|
8893
8926
|
value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
|
@@ -8895,10 +8928,11 @@ const DisabledContextProvider = ({
|
|
8895
8928
|
};
|
8896
8929
|
|
8897
8930
|
const SizeContext = /*#__PURE__*/React.createContext(undefined);
|
8898
|
-
const SizeContextProvider =
|
8899
|
-
|
8900
|
-
|
8901
|
-
|
8931
|
+
const SizeContextProvider = _ref => {
|
8932
|
+
let {
|
8933
|
+
children,
|
8934
|
+
size
|
8935
|
+
} = _ref;
|
8902
8936
|
const originSize = React.useContext(SizeContext);
|
8903
8937
|
return /*#__PURE__*/React.createElement(SizeContext.Provider, {
|
8904
8938
|
value: size || originSize
|
@@ -9611,7 +9645,7 @@ function genStyleUtils(config) {
|
|
9611
9645
|
};
|
9612
9646
|
}
|
9613
9647
|
|
9614
|
-
const version = '5.
|
9648
|
+
const version = '5.24.7';
|
9615
9649
|
|
9616
9650
|
function isStableColor(color) {
|
9617
9651
|
return color >= 0 && color <= 255;
|
@@ -9898,7 +9932,8 @@ const getComputedToken = (originToken, overrideToken, theme) => {
|
|
9898
9932
|
// Format if needed
|
9899
9933
|
mergedDerivativeToken = formatToken(mergedDerivativeToken);
|
9900
9934
|
if (components) {
|
9901
|
-
Object.entries(components).forEach(
|
9935
|
+
Object.entries(components).forEach(_ref => {
|
9936
|
+
let [key, value] = _ref;
|
9902
9937
|
const {
|
9903
9938
|
theme: componentTheme
|
9904
9939
|
} = value,
|
@@ -11071,9 +11106,10 @@ function MotionWrapper(props) {
|
|
11071
11106
|
* Warning for ConfigProviderProps.
|
11072
11107
|
* This will be empty function in production.
|
11073
11108
|
*/
|
11074
|
-
const PropWarning = /*#__PURE__*/React.memo(
|
11075
|
-
|
11076
|
-
|
11109
|
+
const PropWarning = /*#__PURE__*/React.memo(_ref => {
|
11110
|
+
let {
|
11111
|
+
dropdownMatchSelectWidth
|
11112
|
+
} = _ref;
|
11077
11113
|
const warning = devUseWarning('ConfigProvider');
|
11078
11114
|
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
|
11079
11115
|
return null;
|
@@ -11383,7 +11419,8 @@ const ProviderChildren = props => {
|
|
11383
11419
|
rest = __rest$2(_a, ["algorithm", "token", "components", "cssVar"]);
|
11384
11420
|
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
|
11385
11421
|
const parsedComponents = {};
|
11386
|
-
Object.entries(components || {}).forEach(
|
11422
|
+
Object.entries(components || {}).forEach(_ref => {
|
11423
|
+
let [componentName, componentToken] = _ref;
|
11387
11424
|
const parsedToken = Object.assign({}, componentToken);
|
11388
11425
|
if ('algorithm' in parsedToken) {
|
11389
11426
|
if (parsedToken.algorithm === true) {
|
@@ -11474,23 +11511,6 @@ function toArray(children) {
|
|
11474
11511
|
return ret;
|
11475
11512
|
}
|
11476
11513
|
|
11477
|
-
const addMediaQueryListener = (mql, handler) => {
|
11478
|
-
// Don't delete here, please keep the code compatible
|
11479
|
-
if (typeof (mql === null || mql === void 0 ? void 0 : mql.addEventListener) !== 'undefined') {
|
11480
|
-
mql.addEventListener('change', handler);
|
11481
|
-
} else if (typeof (mql === null || mql === void 0 ? void 0 : mql.addListener) !== 'undefined') {
|
11482
|
-
mql.addListener(handler);
|
11483
|
-
}
|
11484
|
-
};
|
11485
|
-
const removeMediaQueryListener = (mql, handler) => {
|
11486
|
-
// Don't delete here, please keep the code compatible
|
11487
|
-
if (typeof (mql === null || mql === void 0 ? void 0 : mql.removeEventListener) !== 'undefined') {
|
11488
|
-
mql.removeEventListener('change', handler);
|
11489
|
-
} else if (typeof (mql === null || mql === void 0 ? void 0 : mql.removeListener) !== 'undefined') {
|
11490
|
-
mql.removeListener(handler);
|
11491
|
-
}
|
11492
|
-
};
|
11493
|
-
|
11494
11514
|
const genLayoutStyle = token => {
|
11495
11515
|
const {
|
11496
11516
|
antCls,
|
@@ -11734,7 +11754,8 @@ const isNumeric = value => !Number.isNaN(Number.parseFloat(value)) && isFinite(v
|
|
11734
11754
|
const SiderContext = /*#__PURE__*/React.createContext({});
|
11735
11755
|
const generateId = (() => {
|
11736
11756
|
let i = 0;
|
11737
|
-
return (
|
11757
|
+
return function () {
|
11758
|
+
let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
11738
11759
|
i += 1;
|
11739
11760
|
return `${prefix}${i}`;
|
11740
11761
|
};
|
@@ -11792,17 +11813,29 @@ const Sider = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
11792
11813
|
};
|
11793
11814
|
useEffect(() => {
|
11794
11815
|
function responsiveHandler(mql) {
|
11795
|
-
|
11796
|
-
return (_a = responsiveHandlerRef.current) === null || _a === void 0 ? void 0 : _a.call(responsiveHandlerRef, mql);
|
11816
|
+
return responsiveHandlerRef.current(mql);
|
11797
11817
|
}
|
11798
11818
|
let mql;
|
11799
|
-
if (typeof
|
11800
|
-
|
11801
|
-
|
11802
|
-
|
11819
|
+
if (typeof window !== 'undefined') {
|
11820
|
+
const {
|
11821
|
+
matchMedia
|
11822
|
+
} = window;
|
11823
|
+
if (matchMedia && breakpoint && breakpoint in dimensionMaxMap) {
|
11824
|
+
mql = matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);
|
11825
|
+
try {
|
11826
|
+
mql.addEventListener('change', responsiveHandler);
|
11827
|
+
} catch (_a) {
|
11828
|
+
mql.addListener(responsiveHandler);
|
11829
|
+
}
|
11830
|
+
responsiveHandler(mql);
|
11831
|
+
}
|
11803
11832
|
}
|
11804
11833
|
return () => {
|
11805
|
-
|
11834
|
+
try {
|
11835
|
+
mql === null || mql === void 0 ? void 0 : mql.removeEventListener('change', responsiveHandler);
|
11836
|
+
} catch (_a) {
|
11837
|
+
mql === null || mql === void 0 ? void 0 : mql.removeListener(responsiveHandler);
|
11838
|
+
}
|
11806
11839
|
};
|
11807
11840
|
}, [breakpoint]); // in order to accept dynamic 'breakpoint' property, we need to add 'breakpoint' into dependency array.
|
11808
11841
|
useEffect(() => {
|
@@ -11822,11 +11855,11 @@ const Sider = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
11822
11855
|
onClick: toggle,
|
11823
11856
|
className: className(`${prefixCls}-zero-width-trigger`, `${prefixCls}-zero-width-trigger-${reverseArrow ? 'right' : 'left'}`),
|
11824
11857
|
style: zeroWidthTriggerStyle
|
11825
|
-
}, trigger || /*#__PURE__*/React.createElement(RefIcon$
|
11858
|
+
}, trigger || /*#__PURE__*/React.createElement(RefIcon$8, null))) : null;
|
11826
11859
|
const reverseIcon = direction === 'rtl' === !reverseArrow;
|
11827
11860
|
const iconObj = {
|
11828
|
-
expanded: reverseIcon ? /*#__PURE__*/React.createElement(RefIcon$
|
11829
|
-
collapsed: reverseIcon ? /*#__PURE__*/React.createElement(RefIcon$
|
11861
|
+
expanded: reverseIcon ? /*#__PURE__*/React.createElement(RefIcon$3, null) : /*#__PURE__*/React.createElement(RefIcon$5, null),
|
11862
|
+
collapsed: reverseIcon ? /*#__PURE__*/React.createElement(RefIcon$5, null) : /*#__PURE__*/React.createElement(RefIcon$3, null)
|
11830
11863
|
};
|
11831
11864
|
const status = collapsed ? 'collapsed' : 'expanded';
|
11832
11865
|
const defaultTrigger = iconObj[status];
|
@@ -11886,11 +11919,12 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
11886
11919
|
}
|
11887
11920
|
return t;
|
11888
11921
|
};
|
11889
|
-
function generator({
|
11890
|
-
|
11891
|
-
|
11892
|
-
|
11893
|
-
|
11922
|
+
function generator(_ref) {
|
11923
|
+
let {
|
11924
|
+
suffixCls,
|
11925
|
+
tagName,
|
11926
|
+
displayName
|
11927
|
+
} = _ref;
|
11894
11928
|
return BasicComponent => {
|
11895
11929
|
const Adapter = /*#__PURE__*/React.forwardRef((props, ref) => (/*#__PURE__*/React.createElement(BasicComponent, Object.assign({
|
11896
11930
|
ref: ref,
|
@@ -12130,7 +12164,7 @@ const languageInfo = {
|
|
12130
12164
|
label: "Tiếng việt"
|
12131
12165
|
};
|
12132
12166
|
const Sidebar = ({ children, menu, userInfo }) => {
|
12133
|
-
|
12167
|
+
[
|
12134
12168
|
{
|
12135
12169
|
key: "user",
|
12136
12170
|
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -12163,7 +12197,7 @@ const Sidebar = ({ children, menu, userInfo }) => {
|
|
12163
12197
|
{
|
12164
12198
|
key: "settings",
|
12165
12199
|
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
12166
|
-
RefIcon,
|
12200
|
+
RefIcon$1,
|
12167
12201
|
{
|
12168
12202
|
style: {
|
12169
12203
|
color: "white",
|
@@ -12186,7 +12220,7 @@ const Sidebar = ({ children, menu, userInfo }) => {
|
|
12186
12220
|
{
|
12187
12221
|
key: "logout",
|
12188
12222
|
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
12189
|
-
RefIcon$
|
12223
|
+
RefIcon$4,
|
12190
12224
|
{
|
12191
12225
|
style: {
|
12192
12226
|
color: "white",
|
@@ -12216,13 +12250,11 @@ const Sidebar = ({ children, menu, userInfo }) => {
|
|
12216
12250
|
const [openSubCollapse, setOpenSubCollapse] = useState(false);
|
12217
12251
|
const [valueSearch, setValueSearch] = useState("");
|
12218
12252
|
const [newMenu, setNewMenu] = useState(
|
12219
|
-
menu?.filter((route) => route.isShow)?.flatMap(
|
12253
|
+
menu?.filter((route) => route.isShow)?.flatMap(
|
12254
|
+
(route) => route.children
|
12255
|
+
)
|
12220
12256
|
);
|
12221
12257
|
const searchSidebar = useDebounce(valueSearch, 300);
|
12222
|
-
const toast = useToast({
|
12223
|
-
message: "Thông báo",
|
12224
|
-
description: "Tính năng đang được phát triển"
|
12225
|
-
});
|
12226
12258
|
const handleActiveMain = (path) => {
|
12227
12259
|
setActiveMainMenu(path);
|
12228
12260
|
router(path);
|
@@ -12236,12 +12268,18 @@ const Sidebar = ({ children, menu, userInfo }) => {
|
|
12236
12268
|
};
|
12237
12269
|
useEffect(() => {
|
12238
12270
|
const filteredMenu = menu.filter((item) => item.isShow).flatMap((menu2) => {
|
12239
|
-
return menu2.
|
12271
|
+
return menu2.children.filter((subMenu) => {
|
12240
12272
|
return subMenu.name.toLowerCase().includes(searchSidebar.toLowerCase());
|
12241
12273
|
});
|
12242
12274
|
});
|
12243
12275
|
setNewMenu(filteredMenu);
|
12244
12276
|
}, [searchSidebar]);
|
12277
|
+
const handleClick = (subPath, itemPath) => {
|
12278
|
+
const cleanedSubPath = subPath.replace(/\/$/, "");
|
12279
|
+
const cleanedItemPath = itemPath.replace(/^\//, "");
|
12280
|
+
const fullPath = `${cleanedSubPath}/${cleanedItemPath}`;
|
12281
|
+
router(fullPath);
|
12282
|
+
};
|
12245
12283
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex relative h-screen", children: [
|
12246
12284
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
12247
12285
|
"div",
|
@@ -12274,116 +12312,91 @@ const Sidebar = ({ children, menu, userInfo }) => {
|
|
12274
12312
|
placeholder: "Tìm kiếm"
|
12275
12313
|
}
|
12276
12314
|
) }) }),
|
12277
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
12278
|
-
|
12279
|
-
|
12280
|
-
|
12281
|
-
|
12282
|
-
|
12283
|
-
|
12284
|
-
|
12285
|
-
|
12286
|
-
|
12287
|
-
|
12288
|
-
|
12289
|
-
|
12290
|
-
children: [
|
12291
|
-
(activeMainMenu === item.path || item.path === pathUrl) && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
12292
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
12293
|
-
"span",
|
12294
|
-
{
|
12295
|
-
className: twMerge(
|
12296
|
-
"absolute top-[-40px] right-0 w-10 h-10 rounded-full"
|
12297
|
-
)
|
12298
|
-
}
|
12299
|
-
),
|
12300
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
12301
|
-
"span",
|
12302
|
-
{
|
12303
|
-
className: twMerge(
|
12304
|
-
"absolute bottom-[-40px] right-0 w-10 h-10 rounded-full"
|
12305
|
-
)
|
12306
|
-
}
|
12307
|
-
)
|
12308
|
-
] }),
|
12309
|
-
isActive && !collapse && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
12310
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
12311
|
-
"span",
|
12312
|
-
{
|
12313
|
-
className: twMerge(
|
12314
|
-
"absolute top-[-40px] right-0 w-10 h-10 rounded-full shadow-[24px_24px_0_white]"
|
12315
|
-
)
|
12316
|
-
}
|
12317
|
-
),
|
12318
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
12319
|
-
"span",
|
12320
|
-
{
|
12321
|
-
className: twMerge(
|
12322
|
-
"absolute bottom-[-40px] right-0 w-10 h-10 rounded-full shadow-[24px_-24px_0_white]"
|
12323
|
-
)
|
12324
|
-
}
|
12325
|
-
)
|
12326
|
-
] }),
|
12315
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("nav", { className: twMerge("flex flex-1 flex-col px-2"), children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { role: "list", className: twMerge("-mx-2 space-y-1 relative"), children: newMenu.flatMap(
|
12316
|
+
(item) => {
|
12317
|
+
const isActiveMainMenu = activeMainMenu === item.path;
|
12318
|
+
const isActivePathUrl = pathUrl === item.path;
|
12319
|
+
const isActive = isActiveMainMenu || isActivePathUrl;
|
12320
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
12321
|
+
"li",
|
12322
|
+
{
|
12323
|
+
className: twMerge(
|
12324
|
+
"relative cursor-pointer",
|
12325
|
+
isActive ? "ml-2" : "ml-0"
|
12326
|
+
),
|
12327
|
+
children: [
|
12328
|
+
isActive && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
12327
12329
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
12328
|
-
"
|
12330
|
+
"span",
|
12329
12331
|
{
|
12330
12332
|
className: twMerge(
|
12331
|
-
"
|
12332
|
-
|
12333
|
-
|
12334
|
-
|
12335
|
-
|
12336
|
-
|
12337
|
-
|
12338
|
-
|
12339
|
-
|
12340
|
-
setOpenSubCollapse(true);
|
12341
|
-
},
|
12342
|
-
className: twMerge(
|
12343
|
-
isActive ? "bg-[#FFFFFF] text-black hover:text-black" : "text-[#FFFFFF] hover:bg-[#FFFFFF] hover:text-black",
|
12344
|
-
"py-2 rounded-md m-auto text-sm whitespace-nowrap leading-6 font-semibold relative z-10",
|
12345
|
-
collapse ? "pl-4 mr-2" : "rounded-bl-full rounded-tl-full justify-center",
|
12346
|
-
"flex items-center whitespace-nowrap gap-2",
|
12347
|
-
!isActive && collapse ? "ml-2" : ""
|
12348
|
-
),
|
12349
|
-
children: [
|
12350
|
-
item.icon,
|
12351
|
-
collapse && item.name
|
12352
|
-
]
|
12353
|
-
}
|
12333
|
+
"absolute top-[-40px] right-0 w-10 h-10 rounded-full"
|
12334
|
+
)
|
12335
|
+
}
|
12336
|
+
),
|
12337
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
12338
|
+
"span",
|
12339
|
+
{
|
12340
|
+
className: twMerge(
|
12341
|
+
"absolute bottom-[-40px] right-0 w-10 h-10 rounded-full"
|
12354
12342
|
)
|
12355
12343
|
}
|
12356
12344
|
)
|
12357
|
-
]
|
12358
|
-
|
12359
|
-
|
12360
|
-
|
12361
|
-
|
12362
|
-
|
12363
|
-
|
12364
|
-
|
12365
|
-
|
12366
|
-
{
|
12367
|
-
className: "list-none cursor-pointer group",
|
12368
|
-
onClick: () => toast(),
|
12369
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
12370
|
-
"div",
|
12371
|
-
{
|
12372
|
-
className: twMerge(
|
12373
|
-
collapse ? "" : "justify-center",
|
12374
|
-
"hover:bg-[#FFFFFF] hover:text-black flex items-center w-full whitespace-nowrap p-2 rounded-md gap-2"
|
12345
|
+
] }),
|
12346
|
+
isActive && !collapse && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
12347
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
12348
|
+
"span",
|
12349
|
+
{
|
12350
|
+
className: twMerge(
|
12351
|
+
"absolute top-[-40px] right-0 w-10 h-10 rounded-full shadow-[24px_24px_0_white]"
|
12352
|
+
)
|
12353
|
+
}
|
12375
12354
|
),
|
12376
|
-
|
12377
|
-
|
12378
|
-
|
12379
|
-
|
12380
|
-
|
12381
|
-
|
12355
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
12356
|
+
"span",
|
12357
|
+
{
|
12358
|
+
className: twMerge(
|
12359
|
+
"absolute bottom-[-40px] right-0 w-10 h-10 rounded-full shadow-[24px_-24px_0_white]"
|
12360
|
+
)
|
12361
|
+
}
|
12362
|
+
)
|
12363
|
+
] }),
|
12364
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
12365
|
+
"div",
|
12366
|
+
{
|
12367
|
+
className: twMerge(
|
12368
|
+
"relative group rounded-bl-full rounded-tl-full hover:text-black",
|
12369
|
+
!collapse && "hover:bg-[#FFFFFF]"
|
12370
|
+
),
|
12371
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
12372
|
+
"a",
|
12373
|
+
{
|
12374
|
+
onClick: () => {
|
12375
|
+
handleActiveMain(item.path);
|
12376
|
+
setCollapse(false);
|
12377
|
+
setOpenSubCollapse(true);
|
12378
|
+
},
|
12379
|
+
className: twMerge(
|
12380
|
+
isActive ? "bg-[#FFFFFF] text-black hover:text-black" : "text-[#FFFFFF] hover:bg-[#FFFFFF] hover:text-black",
|
12381
|
+
"py-2 rounded-md m-auto text-sm whitespace-nowrap leading-6 font-semibold relative z-10",
|
12382
|
+
collapse ? "pl-4 mr-2" : "rounded-bl-full rounded-tl-full justify-center",
|
12383
|
+
"flex items-center whitespace-nowrap gap-2",
|
12384
|
+
!isActive && collapse ? "ml-2" : ""
|
12385
|
+
),
|
12386
|
+
children: [
|
12387
|
+
item.icon,
|
12388
|
+
collapse && item.name
|
12389
|
+
]
|
12390
|
+
}
|
12391
|
+
)
|
12392
|
+
}
|
12393
|
+
)
|
12394
|
+
]
|
12382
12395
|
},
|
12383
|
-
|
12384
|
-
)
|
12385
|
-
|
12386
|
-
|
12396
|
+
item.name
|
12397
|
+
);
|
12398
|
+
}
|
12399
|
+
) }) })
|
12387
12400
|
]
|
12388
12401
|
}
|
12389
12402
|
),
|
@@ -12394,7 +12407,7 @@ const Sidebar = ({ children, menu, userInfo }) => {
|
|
12394
12407
|
className: twMerge(
|
12395
12408
|
"absolute top-1/19 transform -translate-y-1/2 z-[100] cursor-pointer bg-[#FFFFFF] text-[#3078BD] rounded-full w-10 h-10 flex items-center justify-center shadow transition-all duration-300 left-44 sm:left-40 md:left-48 lg:left-85"
|
12396
12409
|
),
|
12397
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
12410
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$9, { className: twMerge("w-4 h-4") })
|
12398
12411
|
}
|
12399
12412
|
),
|
12400
12413
|
openSubCollapse && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
@@ -12435,23 +12448,69 @@ const Sidebar = ({ children, menu, userInfo }) => {
|
|
12435
12448
|
),
|
12436
12449
|
children: newMenu?.map(
|
12437
12450
|
(sub) => {
|
12438
|
-
const isActiveSumenu = pathUrl
|
12439
|
-
|
12440
|
-
"
|
12441
|
-
|
12442
|
-
|
12443
|
-
|
12444
|
-
|
12445
|
-
|
12446
|
-
|
12447
|
-
|
12451
|
+
const isActiveSumenu = pathUrl === sub.path;
|
12452
|
+
if (isActiveSumenu) {
|
12453
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
|
12454
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
12455
|
+
"a",
|
12456
|
+
{
|
12457
|
+
onClick: () => {
|
12458
|
+
handleOpenSubmenu(sub, sub?.children?.length > 0);
|
12459
|
+
},
|
12460
|
+
className: twMerge(
|
12461
|
+
isActiveSumenu ? "bg-[#EEEEF0]" : "",
|
12462
|
+
"group flex gap-x-3 rounded-md p-2 text-gray-700 hover:bg-[#EEEEF0] mr-8 text-sm leading-6 transition-all duration-300 font-semibold items-center"
|
12463
|
+
),
|
12464
|
+
children: [
|
12465
|
+
sub?.icon,
|
12466
|
+
sub?.name,
|
12467
|
+
sub?.children?.length > 0 && sub.isShowChildren ? openSubmenu === sub?.name ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
12468
|
+
RefIcon,
|
12469
|
+
{
|
12470
|
+
className: twMerge("w-4 h-4 ml-auto")
|
12471
|
+
}
|
12472
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
12473
|
+
RefIcon$7,
|
12474
|
+
{
|
12475
|
+
className: twMerge("w-4 h-4 ml-auto")
|
12476
|
+
}
|
12477
|
+
) : ""
|
12478
|
+
]
|
12479
|
+
}
|
12448
12480
|
),
|
12449
|
-
children
|
12450
|
-
|
12451
|
-
|
12452
|
-
|
12453
|
-
|
12454
|
-
|
12481
|
+
openSubmenu === sub?.name && sub.isShowChildren && Array.isArray(sub?.children) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
12482
|
+
"ul",
|
12483
|
+
{
|
12484
|
+
className: twMerge(
|
12485
|
+
"pl-2 transition-all duration-300"
|
12486
|
+
),
|
12487
|
+
children: sub?.children?.map(
|
12488
|
+
(item) => {
|
12489
|
+
const itemFullPath = `${sub.path.replace(
|
12490
|
+
/\/$/,
|
12491
|
+
""
|
12492
|
+
)}/${item.path.replace(/^\//, "")}`;
|
12493
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
12494
|
+
"li",
|
12495
|
+
{
|
12496
|
+
onClick: () => handleClick(sub.path, item.path),
|
12497
|
+
className: twMerge(
|
12498
|
+
pathUrl.startsWith(itemFullPath) ? "bg-[#EEEEF0] text-black" : "",
|
12499
|
+
"text-xs hover:bg-[#EEEEF0] mr-8 transition-all duration-300 mt-2 rounded-md py-2 flex items-center gap-2 p-2"
|
12500
|
+
),
|
12501
|
+
children: [
|
12502
|
+
item.icon,
|
12503
|
+
item.name
|
12504
|
+
]
|
12505
|
+
},
|
12506
|
+
`${sub.path}-${item.path}`
|
12507
|
+
);
|
12508
|
+
}
|
12509
|
+
)
|
12510
|
+
}
|
12511
|
+
)
|
12512
|
+
] }, sub?.name);
|
12513
|
+
}
|
12455
12514
|
}
|
12456
12515
|
)
|
12457
12516
|
}
|
@@ -12598,23 +12657,10 @@ const AnchorLink = props => {
|
|
12598
12657
|
href
|
12599
12658
|
});
|
12600
12659
|
scrollTo === null || scrollTo === void 0 ? void 0 : scrollTo(href);
|
12601
|
-
|
12602
|
-
|
12603
|
-
|
12604
|
-
}
|
12605
|
-
const isExternalLink = href.startsWith('http://') || href.startsWith('https://');
|
12606
|
-
// Support external link
|
12607
|
-
if (isExternalLink) {
|
12608
|
-
if (replace) {
|
12609
|
-
e.preventDefault();
|
12610
|
-
window.location.replace(href);
|
12611
|
-
}
|
12612
|
-
return;
|
12660
|
+
if (replace) {
|
12661
|
+
e.preventDefault();
|
12662
|
+
window.location.replace(href);
|
12613
12663
|
}
|
12614
|
-
// Handling internal anchor link
|
12615
|
-
e.preventDefault();
|
12616
|
-
const historyMethod = replace ? 'replaceState' : 'pushState';
|
12617
|
-
window.history[historyMethod](null, '', href);
|
12618
12664
|
};
|
12619
12665
|
// =================== Warning =====================
|
12620
12666
|
if (process.env.NODE_ENV !== 'production') {
|