@pnkx-lib/ui 1.9.474 → 1.9.475

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.
@@ -11500,7 +11500,7 @@ function GenericUploadModal({
11500
11500
  control,
11501
11501
  setFileList,
11502
11502
  record,
11503
- allowedExtensions,
11503
+ // allowedExtensions,
11504
11504
  maxSize = 5,
11505
11505
  texts
11506
11506
  }) {
@@ -11524,11 +11524,6 @@ function GenericUploadModal({
11524
11524
  fileList: displayFileList,
11525
11525
  beforeUpload: async (file) => {
11526
11526
  const isLtMax = file.size / 1024 / 1024 <= maxSize;
11527
- const fileExtension = file.name.split(".").pop()?.toLowerCase() || "";
11528
- if (allowedExtensions.includes(fileExtension) && texts?.fileTypeError) {
11529
- toast.warning(texts?.fileTypeError);
11530
- return;
11531
- }
11532
11527
  if (!isLtMax) {
11533
11528
  toast.warning(
11534
11529
  texts?.fileSizeError ?? `File must be smaller than ${maxSize}MB`
package/es/index.js CHANGED
@@ -65,7 +65,7 @@ export { ViewPdf } from './ui/ViewPdf.js';
65
65
  export { S as Sidebar } from './chunks/index-skybeDDP.js';
66
66
  export { SelectTable } from './ui/SelectTable.js';
67
67
  export { SelectSingleTable } from './ui/SelectSingleTable.js';
68
- export { G as GenericUploadModal } from './chunks/GenericUploadModal-ClzfSP57.js';
68
+ export { G as GenericUploadModal } from './chunks/GenericUploadModal-BjOOfYoY.js';
69
69
  export { Input } from './fields/Input.js';
70
70
  export { PnkxField } from './fields/PnkxField.js';
71
71
  export { Select } from './fields/Select.js';
@@ -1,6 +1,6 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'antd';
3
- export { G as GenericUploadModal } from '../chunks/GenericUploadModal-ClzfSP57.js';
3
+ export { G as GenericUploadModal } from '../chunks/GenericUploadModal-BjOOfYoY.js';
4
4
  import '../chunks/index.esm-Dr5ZHcf7.js';
5
5
  import 'react';
6
6
  import '@pnkx-lib/core';
package/es/ui/Tabs.js CHANGED
@@ -23,7 +23,7 @@ const createStoreImpl = (createState) => {
23
23
  const initialState = state = createState(setState, getState, api);
24
24
  return api;
25
25
  };
26
- const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
26
+ const createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);
27
27
 
28
28
  const identity = (arg) => arg;
29
29
  function useStore(api, selector = identity) {
@@ -41,7 +41,7 @@ const createImpl = (createState) => {
41
41
  Object.assign(useBoundStore, api);
42
42
  return useBoundStore;
43
43
  };
44
- const create = (createState) => createState ? createImpl(createState) : createImpl;
44
+ const create = ((createState) => createState ? createImpl(createState) : createImpl);
45
45
 
46
46
  const useTabStore = create((set) => ({
47
47
  activeTabKey: void 0,
package/es/ui/index.js CHANGED
@@ -62,8 +62,8 @@ export { CategoryStatus, badgeStatusCategoryConfig } from './CategoryStatus.js';
62
62
  import { useToggle } from '@pnkx-lib/core';
63
63
  import { c as classNames, r as requireClassnames } from '../chunks/index-BLRvgOFN.js';
64
64
  import { a as getAugmentedNamespace, g as getDefaultExportFromCjs } from '../chunks/_commonjsHelpers-D5KtpA0t.js';
65
- import { u as useComposeRef, R as RefIcon$cH, a as RefIcon$cK, b as RefIcon$cN, c as RefIcon$cO, d as RefIcon$cP, e as RefIcon$cV, f as RefIcon$cW, K as Keyframe, s as supportNodeRef, g as supportRef, h as useEvent$1, i as useMergedState$1, C as CSSMotion, j as CSSMotionList, k as es$F, r as requireReactIs, p as pickAttrs$1, l as Color, m as useId$2, P as Portal, _ as _asyncToGenerator, n as _regeneratorRuntime, o as RefResizeObserver, w as wrapperRaf, q as composeRef, T as Trigger, t as isMobile, v as Tooltip, x as Popup$1, y as getNodeRef, z as isVisible$1, A as index$2, B as defaultProps$1, D as useTransitionDuration, E as Circle$1, F as fillRef, H as getDOM, I as getScrollBarSize, J as getTargetScrollBarSize, U as Upload$1, L as findDOMNode$1 } from '../chunks/GenericUploadModal-ClzfSP57.js';
66
- export { G as GenericUploadModal } from '../chunks/GenericUploadModal-ClzfSP57.js';
65
+ import { u as useComposeRef, R as RefIcon$cH, a as RefIcon$cK, b as RefIcon$cN, c as RefIcon$cO, d as RefIcon$cP, e as RefIcon$cV, f as RefIcon$cW, K as Keyframe, s as supportNodeRef, g as supportRef, h as useEvent$1, i as useMergedState$1, C as CSSMotion, j as CSSMotionList, k as es$F, r as requireReactIs, p as pickAttrs$1, l as Color, m as useId$2, P as Portal, _ as _asyncToGenerator, n as _regeneratorRuntime, o as RefResizeObserver, w as wrapperRaf, q as composeRef, T as Trigger, t as isMobile, v as Tooltip, x as Popup$1, y as getNodeRef, z as isVisible$1, A as index$2, B as defaultProps$1, D as useTransitionDuration, E as Circle$1, F as fillRef, H as getDOM, I as getScrollBarSize, J as getTargetScrollBarSize, U as Upload$1, L as findDOMNode$1 } from '../chunks/GenericUploadModal-BjOOfYoY.js';
66
+ export { G as GenericUploadModal } from '../chunks/GenericUploadModal-BjOOfYoY.js';
67
67
  import { F as FastColor, m as blue, n as blueDark, o as cyan, q as cyanDark, s as geekblue, t as geekblueDark, i as generate, v as gold, x as goldDark, y as gray, z as green, A as greenDark, B as grey, C as greyDark, D as lime, E as limeDark, G as magenta, H as magentaDark, J as orange, K as orangeDark, L as presetDarkPalettes, j as presetPalettes, p as presetPrimaryColors, M as purple, N as purpleDark, O as red, P as redDark, Q as volcano, R as volcanoDark, S as yellow, T as yellowDark, I as Icon$3, _ as _extends$1, a as _objectWithoutProperties, U as warning$3, V as useInsertStyles, k as IconContext, b as _objectSpread2, W as svgBaseProps, X as getTwoToneColor, Y as setTwoToneColor, c as _slicedToArray, w as warningOnce, d as warning$4, Z as contains$1, e as canUseDom$1, $ as noteOnce } from '../chunks/AntdIcon--fhhlrN2.js';
68
68
  import { b as _defineProperty, a as _typeof$1 } from '../chunks/defineProperty-CnMPreZi.js';
69
69
  import { z as lintWarning, A as toStyleStr, B as ATTR_CACHE_MAP, E as serialize, F as extract, G as CSS_VAR_PREFIX, H as STYLE_PREFIX, I as extract$1, T as TOKEN_PREFIX, J as extract$2, K as unitlessKeys, M as supportWhere, N as supportLogicProps, O as StyleContext, P as StyleProvider, Q as Theme, R as createCache, U as createTheme, V as getComputedToken, W as token2CSSVar, u as unit$1, X as useCSSVarRegister, Y as useCacheToken, Z as useStyleRegister, $ as get$1, a0 as set$1, a1 as genCalc$1, a2 as genStyleUtils$1, m as merge, a3 as statistic$1, a4 as statisticToken, a5 as MotionProvider, _ as _toConsumableArray, t as toArray$7, a6 as merge$1, a7 as isEqual$1, e as useLayoutEffect$2, a8 as _toArray, b as useMemo$2, o as omit$1, c as useLayoutUpdateEffect } from '../chunks/toArray-DA_RJdbk.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.474",
4
+ "version": "1.9.475",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",
@@ -28,4 +28,4 @@ export interface GenericUploadModalProps {
28
28
  uploading?: string;
29
29
  };
30
30
  }
31
- export declare function GenericUploadModal({ open, onCancel, control, setFileList, record, allowedExtensions, maxSize, texts, }: GenericUploadModalProps): import("react/jsx-runtime").JSX.Element;
31
+ export declare function GenericUploadModal({ open, onCancel, control, setFileList, record, maxSize, texts, }: GenericUploadModalProps): import("react/jsx-runtime").JSX.Element;