@pnkx-lib/ui 1.9.122 → 1.9.125

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.
@@ -1,5 +1,5 @@
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
- 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';
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-BS99Z6_t.js';
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, ConfigProvider as ConfigProvider$2 } 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';
@@ -5257,7 +5257,8 @@ const Heading = (props) => {
5257
5257
  const pathUrl = location.pathname;
5258
5258
  const breadcrumbs = [{ title: "Trang chủ", href: "/" }];
5259
5259
  menu.forEach((itemMenu) => {
5260
- itemMenu.children.forEach((itemModule) => {
5260
+ itemMenu.children?.forEach((itemModule) => {
5261
+ console.log("itemModule", itemModule);
5261
5262
  if (pathUrl.startsWith(itemModule.path)) {
5262
5263
  breadcrumbs.push({
5263
5264
  title: itemModule.name,
@@ -8472,11 +8473,10 @@ const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
8472
8473
  motion: true
8473
8474
  });
8474
8475
 
8475
- function genColorMapToken(seed, _ref) {
8476
- let {
8477
- generateColorPalettes,
8478
- generateNeutralColorPalettes
8479
- } = _ref;
8476
+ function genColorMapToken(seed, {
8477
+ generateColorPalettes,
8478
+ generateNeutralColorPalettes
8479
+ }) {
8480
8480
  const {
8481
8481
  colorSuccess: colorSuccessBase,
8482
8482
  colorWarning: colorWarningBase,
@@ -8916,11 +8916,10 @@ function registerTheme(globalPrefixCls, theme) {
8916
8916
  }
8917
8917
 
8918
8918
  const DisabledContext = /*#__PURE__*/React.createContext(false);
8919
- const DisabledContextProvider = _ref => {
8920
- let {
8921
- children,
8922
- disabled
8923
- } = _ref;
8919
+ const DisabledContextProvider = ({
8920
+ children,
8921
+ disabled
8922
+ }) => {
8924
8923
  const originDisabled = React.useContext(DisabledContext);
8925
8924
  return /*#__PURE__*/React.createElement(DisabledContext.Provider, {
8926
8925
  value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
@@ -8928,11 +8927,10 @@ const DisabledContextProvider = _ref => {
8928
8927
  };
8929
8928
 
8930
8929
  const SizeContext = /*#__PURE__*/React.createContext(undefined);
8931
- const SizeContextProvider = _ref => {
8932
- let {
8933
- children,
8934
- size
8935
- } = _ref;
8930
+ const SizeContextProvider = ({
8931
+ children,
8932
+ size
8933
+ }) => {
8936
8934
  const originSize = React.useContext(SizeContext);
8937
8935
  return /*#__PURE__*/React.createElement(SizeContext.Provider, {
8938
8936
  value: size || originSize
@@ -9645,7 +9643,7 @@ function genStyleUtils(config) {
9645
9643
  };
9646
9644
  }
9647
9645
 
9648
- const version = '5.24.7';
9646
+ const version = '5.25.3';
9649
9647
 
9650
9648
  function isStableColor(color) {
9651
9649
  return color >= 0 && color <= 255;
@@ -9932,8 +9930,7 @@ const getComputedToken = (originToken, overrideToken, theme) => {
9932
9930
  // Format if needed
9933
9931
  mergedDerivativeToken = formatToken(mergedDerivativeToken);
9934
9932
  if (components) {
9935
- Object.entries(components).forEach(_ref => {
9936
- let [key, value] = _ref;
9933
+ Object.entries(components).forEach(([key, value]) => {
9937
9934
  const {
9938
9935
  theme: componentTheme
9939
9936
  } = value,
@@ -11106,10 +11103,9 @@ function MotionWrapper(props) {
11106
11103
  * Warning for ConfigProviderProps.
11107
11104
  * This will be empty function in production.
11108
11105
  */
11109
- const PropWarning = /*#__PURE__*/React.memo(_ref => {
11110
- let {
11111
- dropdownMatchSelectWidth
11112
- } = _ref;
11106
+ const PropWarning = /*#__PURE__*/React.memo(({
11107
+ dropdownMatchSelectWidth
11108
+ }) => {
11113
11109
  const warning = devUseWarning('ConfigProvider');
11114
11110
  warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
11115
11111
  return null;
@@ -11419,8 +11415,7 @@ const ProviderChildren = props => {
11419
11415
  rest = __rest$2(_a, ["algorithm", "token", "components", "cssVar"]);
11420
11416
  const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
11421
11417
  const parsedComponents = {};
11422
- Object.entries(components || {}).forEach(_ref => {
11423
- let [componentName, componentToken] = _ref;
11418
+ Object.entries(components || {}).forEach(([componentName, componentToken]) => {
11424
11419
  const parsedToken = Object.assign({}, componentToken);
11425
11420
  if ('algorithm' in parsedToken) {
11426
11421
  if (parsedToken.algorithm === true) {
@@ -11464,7 +11459,7 @@ const ProviderChildren = props => {
11464
11459
  value: memoedConfig
11465
11460
  }, childNode);
11466
11461
  };
11467
- const ConfigProvider = props => {
11462
+ const ConfigProvider$1 = props => {
11468
11463
  const context = React.useContext(ConfigContext);
11469
11464
  const antLocale = React.useContext(LocaleContext);
11470
11465
  return /*#__PURE__*/React.createElement(ProviderChildren, Object.assign({
@@ -11472,18 +11467,18 @@ const ConfigProvider = props => {
11472
11467
  legacyLocale: antLocale
11473
11468
  }, props));
11474
11469
  };
11475
- ConfigProvider.ConfigContext = ConfigContext;
11476
- ConfigProvider.SizeContext = SizeContext;
11477
- ConfigProvider.config = setGlobalConfig;
11478
- ConfigProvider.useConfig = useConfig;
11479
- Object.defineProperty(ConfigProvider, 'SizeContext', {
11470
+ ConfigProvider$1.ConfigContext = ConfigContext;
11471
+ ConfigProvider$1.SizeContext = SizeContext;
11472
+ ConfigProvider$1.config = setGlobalConfig;
11473
+ ConfigProvider$1.useConfig = useConfig;
11474
+ Object.defineProperty(ConfigProvider$1, 'SizeContext', {
11480
11475
  get: () => {
11481
11476
  process.env.NODE_ENV !== "production" ? warning(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;
11482
11477
  return SizeContext;
11483
11478
  }
11484
11479
  });
11485
11480
  if (process.env.NODE_ENV !== 'production') {
11486
- ConfigProvider.displayName = 'ConfigProvider';
11481
+ ConfigProvider$1.displayName = 'ConfigProvider';
11487
11482
  }
11488
11483
 
11489
11484
  const LayoutContext = /*#__PURE__*/React.createContext({
@@ -11511,6 +11506,23 @@ function toArray(children) {
11511
11506
  return ret;
11512
11507
  }
11513
11508
 
11509
+ const addMediaQueryListener = (mql, handler) => {
11510
+ // Don't delete here, please keep the code compatible
11511
+ if (typeof (mql === null || mql === void 0 ? void 0 : mql.addEventListener) !== 'undefined') {
11512
+ mql.addEventListener('change', handler);
11513
+ } else if (typeof (mql === null || mql === void 0 ? void 0 : mql.addListener) !== 'undefined') {
11514
+ mql.addListener(handler);
11515
+ }
11516
+ };
11517
+ const removeMediaQueryListener = (mql, handler) => {
11518
+ // Don't delete here, please keep the code compatible
11519
+ if (typeof (mql === null || mql === void 0 ? void 0 : mql.removeEventListener) !== 'undefined') {
11520
+ mql.removeEventListener('change', handler);
11521
+ } else if (typeof (mql === null || mql === void 0 ? void 0 : mql.removeListener) !== 'undefined') {
11522
+ mql.removeListener(handler);
11523
+ }
11524
+ };
11525
+
11514
11526
  const genLayoutStyle = token => {
11515
11527
  const {
11516
11528
  antCls,
@@ -11754,8 +11766,7 @@ const isNumeric = value => !Number.isNaN(Number.parseFloat(value)) && isFinite(v
11754
11766
  const SiderContext = /*#__PURE__*/React.createContext({});
11755
11767
  const generateId = (() => {
11756
11768
  let i = 0;
11757
- return function () {
11758
- let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
11769
+ return (prefix = '') => {
11759
11770
  i += 1;
11760
11771
  return `${prefix}${i}`;
11761
11772
  };
@@ -11813,29 +11824,17 @@ const Sider = /*#__PURE__*/React.forwardRef((props, ref) => {
11813
11824
  };
11814
11825
  useEffect(() => {
11815
11826
  function responsiveHandler(mql) {
11816
- return responsiveHandlerRef.current(mql);
11827
+ var _a;
11828
+ return (_a = responsiveHandlerRef.current) === null || _a === void 0 ? void 0 : _a.call(responsiveHandlerRef, mql);
11817
11829
  }
11818
11830
  let mql;
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
- }
11831
+ if (typeof (window === null || window === void 0 ? void 0 : window.matchMedia) !== 'undefined' && breakpoint && breakpoint in dimensionMaxMap) {
11832
+ mql = window.matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);
11833
+ addMediaQueryListener(mql, responsiveHandler);
11834
+ responsiveHandler(mql);
11832
11835
  }
11833
11836
  return () => {
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
- }
11837
+ removeMediaQueryListener(mql, responsiveHandler);
11839
11838
  };
11840
11839
  }, [breakpoint]); // in order to accept dynamic 'breakpoint' property, we need to add 'breakpoint' into dependency array.
11841
11840
  useEffect(() => {
@@ -11919,12 +11918,11 @@ var __rest = undefined && undefined.__rest || function (s, e) {
11919
11918
  }
11920
11919
  return t;
11921
11920
  };
11922
- function generator(_ref) {
11923
- let {
11924
- suffixCls,
11925
- tagName,
11926
- displayName
11927
- } = _ref;
11921
+ function generator({
11922
+ suffixCls,
11923
+ tagName,
11924
+ displayName
11925
+ }) {
11928
11926
  return BasicComponent => {
11929
11927
  const Adapter = /*#__PURE__*/React.forwardRef((props, ref) => (/*#__PURE__*/React.createElement(BasicComponent, Object.assign({
11930
11928
  ref: ref,
@@ -12164,7 +12162,7 @@ const languageInfo = {
12164
12162
  label: "Tiếng việt"
12165
12163
  };
12166
12164
  const Sidebar = ({ children, menu, userInfo }) => {
12167
- [
12165
+ const bottomMenu = [
12168
12166
  {
12169
12167
  key: "user",
12170
12168
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -12312,91 +12310,108 @@ const Sidebar = ({ children, menu, userInfo }) => {
12312
12310
  placeholder: "Tìm kiếm"
12313
12311
  }
12314
12312
  ) }) }),
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: [
12329
- /* @__PURE__ */ jsxRuntimeExports.jsx(
12330
- "span",
12331
- {
12332
- className: twMerge(
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"
12342
- )
12343
- }
12344
- )
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
- }
12354
- ),
12313
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("nav", { className: twMerge("flex flex-1 flex-col px-2"), children: [
12314
+ /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { role: "list", className: twMerge("-mx-2 space-y-1 relative"), children: newMenu.flatMap(
12315
+ (item) => {
12316
+ const isActiveMainMenu = activeMainMenu === item.path;
12317
+ const isActivePathUrl = pathUrl === item.path;
12318
+ const isActive = isActiveMainMenu || isActivePathUrl;
12319
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
12320
+ "li",
12321
+ {
12322
+ className: twMerge(
12323
+ "relative cursor-pointer",
12324
+ isActive ? "ml-2" : "ml-0"
12325
+ ),
12326
+ children: [
12327
+ isActive && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
12328
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
12329
+ "span",
12330
+ {
12331
+ className: twMerge(
12332
+ "absolute top-[-40px] right-0 w-10 h-10 rounded-full"
12333
+ )
12334
+ }
12335
+ ),
12336
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
12337
+ "span",
12338
+ {
12339
+ className: twMerge(
12340
+ "absolute bottom-[-40px] right-0 w-10 h-10 rounded-full"
12341
+ )
12342
+ }
12343
+ )
12344
+ ] }),
12345
+ isActive && !collapse && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
12346
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
12347
+ "span",
12348
+ {
12349
+ className: twMerge(
12350
+ "absolute top-[-40px] right-0 w-10 h-10 rounded-full shadow-[24px_24px_0_white]"
12351
+ )
12352
+ }
12353
+ ),
12354
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
12355
+ "span",
12356
+ {
12357
+ className: twMerge(
12358
+ "absolute bottom-[-40px] right-0 w-10 h-10 rounded-full shadow-[24px_-24px_0_white]"
12359
+ )
12360
+ }
12361
+ )
12362
+ ] }),
12355
12363
  /* @__PURE__ */ jsxRuntimeExports.jsx(
12356
- "span",
12364
+ "div",
12357
12365
  {
12358
12366
  className: twMerge(
12359
- "absolute bottom-[-40px] right-0 w-10 h-10 rounded-full shadow-[24px_-24px_0_white]"
12367
+ "relative group rounded-bl-full rounded-tl-full hover:text-black",
12368
+ !collapse && "hover:bg-[#FFFFFF]"
12369
+ ),
12370
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
12371
+ "a",
12372
+ {
12373
+ onClick: () => {
12374
+ handleActiveMain(item.path);
12375
+ setCollapse(false);
12376
+ setOpenSubCollapse(true);
12377
+ },
12378
+ className: twMerge(
12379
+ isActive ? "bg-[#FFFFFF] text-black hover:text-black" : "text-[#FFFFFF] hover:bg-[#FFFFFF] hover:text-black",
12380
+ "py-2 rounded-md m-auto text-sm whitespace-nowrap leading-6 font-semibold relative z-10",
12381
+ collapse ? "pl-4 mr-2" : "rounded-bl-full rounded-tl-full justify-center",
12382
+ "flex items-center whitespace-nowrap gap-2",
12383
+ !isActive && collapse ? "ml-2" : ""
12384
+ ),
12385
+ children: [
12386
+ item.icon,
12387
+ collapse && item.name
12388
+ ]
12389
+ }
12360
12390
  )
12361
12391
  }
12362
12392
  )
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
- )
12393
+ ]
12394
+ },
12395
+ item.name
12396
+ );
12397
+ }
12398
+ ) }),
12399
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: twMerge("mt-auto pb-4"), children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: bottomMenu.map(
12400
+ (bm) => bm.show && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: "list-none cursor-pointer group", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
12401
+ "div",
12402
+ {
12403
+ className: twMerge(
12404
+ collapse ? "" : "justify-center",
12405
+ "hover:bg-[#FFFFFF] hover:text-black flex items-center w-full whitespace-nowrap p-2 rounded-md gap-2"
12406
+ ),
12407
+ children: [
12408
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex max-w-8 min-w-8 min-h-6 justify-center hover:text-black", children: bm.icon }),
12409
+ collapse && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm hover:text-black", children: bm.label })
12394
12410
  ]
12395
- },
12396
- item.name
12397
- );
12398
- }
12399
- ) }) })
12411
+ }
12412
+ ) }, bm.key)
12413
+ ) }) })
12414
+ ] })
12400
12415
  ]
12401
12416
  }
12402
12417
  ),
@@ -12657,10 +12672,23 @@ const AnchorLink = props => {
12657
12672
  href
12658
12673
  });
12659
12674
  scrollTo === null || scrollTo === void 0 ? void 0 : scrollTo(href);
12660
- if (replace) {
12661
- e.preventDefault();
12662
- window.location.replace(href);
12675
+ // Support clicking on an anchor does not record history.
12676
+ if (e.defaultPrevented) {
12677
+ return;
12678
+ }
12679
+ const isExternalLink = href.startsWith('http://') || href.startsWith('https://');
12680
+ // Support external link
12681
+ if (isExternalLink) {
12682
+ if (replace) {
12683
+ e.preventDefault();
12684
+ window.location.replace(href);
12685
+ }
12686
+ return;
12663
12687
  }
12688
+ // Handling internal anchor link
12689
+ e.preventDefault();
12690
+ const historyMethod = replace ? 'replaceState' : 'pushState';
12691
+ window.history[historyMethod](null, '', href);
12664
12692
  };
12665
12693
  // =================== Warning =====================
12666
12694
  if (process.env.NODE_ENV !== 'production') {
@@ -12901,15 +12929,15 @@ const BreadcrumbHeading = (props) => {
12901
12929
  const pathUrl = location.pathname;
12902
12930
  const breadcrumbs = [{ title: "Trang chủ", href: "/" }];
12903
12931
  menu.forEach((itemMenu) => {
12904
- itemMenu.modules.forEach((itemModule) => {
12905
- if (pathUrl.startsWith(itemModule.path)) {
12932
+ itemMenu?.children?.forEach((itemModule) => {
12933
+ if (pathUrl.startsWith(itemModule?.path)) {
12906
12934
  breadcrumbs.push({
12907
12935
  title: itemModule.name,
12908
12936
  href: itemModule.path
12909
12937
  });
12910
12938
  }
12911
- itemModule.subMenu?.forEach((itemSubmenu) => {
12912
- if (pathUrl.startsWith(itemSubmenu.path)) {
12939
+ itemModule?.children?.forEach((itemSubmenu) => {
12940
+ if (pathUrl.startsWith(itemSubmenu?.path)) {
12913
12941
  breadcrumbs.push({
12914
12942
  title: itemSubmenu.name,
12915
12943
  href: itemSubmenu.path
@@ -12927,4 +12955,11 @@ const Card = ({ children, ...rest }) => {
12927
12955
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Card$1, { ...rest, children });
12928
12956
  };
12929
12957
 
12930
- export { PAGE_NUMBER as $, Alert as A, Button as B, CascaderField as C, Dropdown as D, Anchor as E, Flex as F, Appfix as G, Heading as H, AutoComplete as I, PnkxCollapse as J, PnkxColorPicker as K, Layout as L, Modal as M, Empty as N, Image as O, Popover as P, QRCode as Q, Row as R, Skeleton as S, Table as T, ConfirmModal as U, ErrorBoundary as V, Watermark as W, CategoryStatus as X, ActionRowTable as Y, START_PAGE as Z, START_PAGE_SIZE as _, Tooltip as a, PAGE_SIZE as a0, SORT_BY as a1, SORT_DESC as a2, TypeActionRowTable as a3, TypeBulkActions as a4, TypeStatusTable as a5, BulkActions as a6, BreadcrumbHeading as a7, Card as a8, Tabs as b, SearchFiltersForm as c, Container as d, Badge as e, Col as f, Breadcrumb as g, Space as h, Splitter as i, Menu as j, Pagination as k, Steps as l, Sidebar as m, Tag as n, Divider$1 as o, Spin as p, Drawer as q, Popconfirm as r, Result as s, typeColorMap as t, Rate as u, Segmented as v, Statistic as w, Timeline as x, Tour as y, Tree as z };
12958
+ const ConfigProvider = ({
12959
+ children,
12960
+ ...rest
12961
+ }) => {
12962
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigProvider$2, { ...rest, children });
12963
+ };
12964
+
12965
+ export { PAGE_NUMBER as $, Alert as A, Button as B, CascaderField as C, Dropdown as D, Anchor as E, Flex as F, Appfix as G, Heading as H, AutoComplete as I, PnkxCollapse as J, PnkxColorPicker as K, Layout as L, Modal as M, Empty as N, Image as O, Popover as P, QRCode as Q, Row as R, Skeleton as S, Table as T, ConfirmModal as U, ErrorBoundary as V, Watermark as W, CategoryStatus as X, ActionRowTable as Y, START_PAGE as Z, START_PAGE_SIZE as _, Tooltip as a, PAGE_SIZE as a0, SORT_BY as a1, SORT_DESC as a2, TypeActionRowTable as a3, TypeBulkActions as a4, TypeStatusTable as a5, BulkActions as a6, BreadcrumbHeading as a7, Card as a8, ConfigProvider as a9, Tabs as b, SearchFiltersForm as c, Container as d, Badge as e, Col as f, Breadcrumb as g, Space as h, Splitter as i, Menu as j, Pagination as k, Steps as l, Sidebar as m, Tag as n, Divider$1 as o, Spin as p, Drawer as q, Popconfirm as r, Result as s, typeColorMap as t, Rate as u, Segmented as v, Statistic as w, Timeline as x, Tour as y, Tree as z };
@@ -1,4 +1,4 @@
1
- import { g as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, c as Icon, _ as _extends, d as className } from './AntdIcon-CtaI55qk.js';
1
+ import { g as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, c as Icon, _ as _extends, d as className } from './AntdIcon-BS99Z6_t.js';
2
2
  import { Select as Select$1, Radio, Upload, Image, Switch as Switch$1 } from 'antd';
3
3
  import * as React from 'react';
4
4
  import { useState } from 'react';
@@ -1,2 +1,2 @@
1
- export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, b as TinyMCE } from '../chunks/AntdIcon-CtaI55qk.js';
2
- export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-CigYj8FF.js';
1
+ export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, b as TinyMCE } from '../chunks/AntdIcon-BS99Z6_t.js';
2
+ export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-vaUhKEAu.js';
package/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { Y as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, a7 as BreadcrumbHeading, a6 as BulkActions, B as Button, a8 as Card, C as CascaderField, X as CategoryStatus, f as Col, U as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, V as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, $ as PAGE_NUMBER, a0 as PAGE_SIZE, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, a1 as SORT_BY, a2 as SORT_DESC, Z as START_PAGE, _ as START_PAGE_SIZE, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, a3 as TypeActionRowTable, a4 as TypeBulkActions, a5 as TypeStatusTable, W as Watermark, t as typeColorMap } from './chunks/Card-DJZ1AqcL.js';
2
- export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TINY_API, b as TinyMCE, T as Typography } from './chunks/AntdIcon-CtaI55qk.js';
1
+ export { Y as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, a7 as BreadcrumbHeading, a6 as BulkActions, B as Button, a8 as Card, C as CascaderField, X as CategoryStatus, f as Col, a9 as ConfigProvider, U as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, V as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, $ as PAGE_NUMBER, a0 as PAGE_SIZE, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, a1 as SORT_BY, a2 as SORT_DESC, Z as START_PAGE, _ as START_PAGE_SIZE, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, a3 as TypeActionRowTable, a4 as TypeBulkActions, a5 as TypeStatusTable, W as Watermark, t as typeColorMap } from './chunks/ConfigProvider-Bsz3gTK1.js';
2
+ export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TINY_API, b as TinyMCE, T as Typography } from './chunks/AntdIcon-BS99Z6_t.js';
3
3
  import 'react-router';
4
- export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-CigYj8FF.js';
4
+ export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-vaUhKEAu.js';
5
5
  export { a as useMessage, u as useToast } from './chunks/useMessage-CUPcOtIS.js';
package/es/ui/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Y as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, a7 as BreadcrumbHeading, a6 as BulkActions, B as Button, a8 as Card, C as CascaderField, X as CategoryStatus, f as Col, U as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, V as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, $ as PAGE_NUMBER, a0 as PAGE_SIZE, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, a1 as SORT_BY, a2 as SORT_DESC, Z as START_PAGE, _ as START_PAGE_SIZE, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, a3 as TypeActionRowTable, a4 as TypeBulkActions, a5 as TypeStatusTable, W as Watermark, t as typeColorMap } from '../chunks/Card-DJZ1AqcL.js';
2
- export { E as ErrorMessage, L as Label, a as TINY_API, T as Typography } from '../chunks/AntdIcon-CtaI55qk.js';
1
+ export { Y as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, a7 as BreadcrumbHeading, a6 as BulkActions, B as Button, a8 as Card, C as CascaderField, X as CategoryStatus, f as Col, a9 as ConfigProvider, U as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, V as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, $ as PAGE_NUMBER, a0 as PAGE_SIZE, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, a1 as SORT_BY, a2 as SORT_DESC, Z as START_PAGE, _ as START_PAGE_SIZE, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, a3 as TypeActionRowTable, a4 as TypeBulkActions, a5 as TypeStatusTable, W as Watermark, t as typeColorMap } from '../chunks/ConfigProvider-Bsz3gTK1.js';
2
+ export { E as ErrorMessage, L as Label, a as TINY_API, T as Typography } from '../chunks/AntdIcon-BS99Z6_t.js';
3
3
  import 'react-router';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.122",
4
+ "version": "1.9.125",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const SvgDollar: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export default SvgDollar;
@@ -1,6 +1,6 @@
1
1
  import { ConfirmModalProps } from '../ConfirmModal';
2
2
  import { TListIcon } from '.';
3
- import { TypeStatusTable } from '../../../../../../../../../../../../src/constants';
3
+ import { TypeStatusTable } from '../../../../../../../../../../../src/constants';
4
4
  export interface BulkActionProps {
5
5
  quantity?: number;
6
6
  listIcon?: TListIcon[];
@@ -1,6 +1,6 @@
1
1
  import { CATEGORY_LIST_ENUM } from '../../../../../core/src/constants/enum';
2
2
  import { ConfirmModalProps } from '../ConfirmModal';
3
- import { TypeBulkActions, TypeStatusTable } from '../../../../../../../../../../../../src/constants';
3
+ import { TypeBulkActions, TypeStatusTable } from '../../../../../../../../../../../src/constants';
4
4
  interface IBulkActionsProps {
5
5
  quantity?: number;
6
6
  handleRestore?: () => void;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { ConfigProviderProps as AntdConfigProviderProps } from 'antd';
3
+ export type ConfigProviderProps = AntdConfigProviderProps;
4
+ export declare const ConfigProvider: React.FC<ConfigProviderProps>;
@@ -2,13 +2,14 @@ import { ReactNode, default as React } from 'react';
2
2
  export type MenuType = {
3
3
  name: string;
4
4
  path: string;
5
- isShow: boolean;
5
+ isShowModules: boolean;
6
6
  isPrivateRoute?: boolean;
7
7
  layout?: React.LazyExoticComponent<React.MemoExoticComponent<any>> | React.ExoticComponent<any> | typeof React.Component;
8
8
  children: {
9
9
  name: string;
10
10
  path: string;
11
11
  icon?: ReactNode;
12
+ isShowChildren?: boolean;
12
13
  component: typeof React.Component | React.FC;
13
14
  children?: Array<{
14
15
  name: string;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { TypeActionRowTable } from '../../../../../../../../../../../../../src/constants/table';
2
+ import { TypeActionRowTable } from '../../../../../../../../../../../../src/constants/table';
3
3
  export interface ActionRowTableProps {
4
4
  type: TypeActionRowTable;
5
5
  handleClick?: () => void;
@@ -1,5 +1,5 @@
1
1
  import { InitialFiltersSearch } from '@pnkx-lib/core';
2
- import { TFilters, TypeStatusTable } from '../../../../../../../../../../../../../../src/components/ui';
2
+ import { TFilters, TypeStatusTable } from '../../../../../../../../../../../../../src/components/ui';
3
3
  export interface GroupHeadingButtonItem {
4
4
  label: string;
5
5
  quantity: number;
@@ -4,7 +4,7 @@ import { TableProps } from 'antd/lib/table';
4
4
  import { InitialFiltersSearch } from '@pnkx-lib/core';
5
5
  import { MenuType } from '../Sidebar';
6
6
  import { GroupHeadingButtonItem } from './HeadingTable/components/GroupHeadingButton';
7
- import { TypeStatusTable } from '../../../../../../../../../../../../src/constants';
7
+ import { TypeStatusTable } from '../../../../../../../../../../../src/constants';
8
8
  interface RowCommon {
9
9
  [x: string]: any;
10
10
  }
@@ -56,3 +56,4 @@ export * from '../../constants/index';
56
56
  export * from './BulkActions';
57
57
  export * from './BreadcrumbHeading';
58
58
  export * from './Card';
59
+ export * from './ConfigProvider';