@pnkx-lib/ui 1.9.497 → 1.9.499
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/es/chunks/{GenericUploadModal-DZ5QrHqG.js → GenericUploadModal-DxRzdkYF.js} +16 -7
- package/es/index.js +1 -1
- package/es/ui/GenericUploadModal.js +1 -1
- package/es/ui/SelectTable.js +1 -1
- package/es/ui/index.js +2 -2
- package/package.json +1 -1
- package/types/components/ui/GenericUploadModal.d.ts +3 -1
|
@@ -11483,7 +11483,8 @@ function GenericUploadModal({
|
|
|
11483
11483
|
setFileList,
|
|
11484
11484
|
fileList,
|
|
11485
11485
|
trans,
|
|
11486
|
-
onDeleteFile
|
|
11486
|
+
onDeleteFile,
|
|
11487
|
+
listType
|
|
11487
11488
|
}) {
|
|
11488
11489
|
const [displayFileList, setDisplayFileList] = useState(fileList);
|
|
11489
11490
|
const [listFileId, setListFileId] = useState([]);
|
|
@@ -11582,12 +11583,20 @@ function GenericUploadModal({
|
|
|
11582
11583
|
render: ({ field }) => {
|
|
11583
11584
|
const { onChange } = field;
|
|
11584
11585
|
const props = createUploadProps(onChange);
|
|
11585
|
-
return /* @__PURE__ */ jsx(Spin, { spinning: false, tip: texts?.uploading, children: /* @__PURE__ */ jsxs(
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11586
|
+
return /* @__PURE__ */ jsx(Spin, { spinning: false, tip: texts?.uploading, children: /* @__PURE__ */ jsxs(
|
|
11587
|
+
Dragger,
|
|
11588
|
+
{
|
|
11589
|
+
...props,
|
|
11590
|
+
listType,
|
|
11591
|
+
accept: ".pdf,.doc,.docx,.jpg,.jpeg,.png",
|
|
11592
|
+
children: [
|
|
11593
|
+
/* @__PURE__ */ jsx("p", { className: "ant-upload-drag-icon", children: /* @__PURE__ */ jsx(RefIcon$b, {}) }),
|
|
11594
|
+
/* @__PURE__ */ jsx("p", { className: "ant-upload-text", children: texts?.dragText }),
|
|
11595
|
+
/* @__PURE__ */ jsx("p", { className: "ant-upload-hint", children: texts?.hint1 }),
|
|
11596
|
+
/* @__PURE__ */ jsx("p", { className: "ant-upload-hint", children: texts?.hint2 })
|
|
11597
|
+
]
|
|
11598
|
+
}
|
|
11599
|
+
) });
|
|
11591
11600
|
}
|
|
11592
11601
|
}
|
|
11593
11602
|
) })
|
package/es/index.js
CHANGED
|
@@ -65,7 +65,7 @@ export { ViewPdf } from './ui/ViewPdf.js';
|
|
|
65
65
|
export { Sidebar } from './ui/Sidebar/index.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-
|
|
68
|
+
export { G as GenericUploadModal } from './chunks/GenericUploadModal-DxRzdkYF.js';
|
|
69
69
|
export { Descriptions } from './ui/Descriptions.js';
|
|
70
70
|
export { Input } from './fields/Input.js';
|
|
71
71
|
export { PnkxField } from './fields/PnkxField.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'antd';
|
|
3
|
-
export { G as GenericUploadModal } from '../chunks/GenericUploadModal-
|
|
3
|
+
export { G as GenericUploadModal } from '../chunks/GenericUploadModal-DxRzdkYF.js';
|
|
4
4
|
import '../chunks/index.esm-Dr5ZHcf7.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@pnkx-lib/core';
|
package/es/ui/SelectTable.js
CHANGED
package/es/ui/index.js
CHANGED
|
@@ -64,8 +64,8 @@ import { r as requireClassnames, c as classNames } from '../chunks/index-BLRvgOF
|
|
|
64
64
|
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, c as _slicedToArray, b as _objectSpread2, w as warningOnce, a as _objectWithoutProperties, _ as _extends$1 } from '../chunks/AntdIcon-Bve8mGNz.js';
|
|
65
65
|
import { b as _defineProperty, _ as _typeof$1 } from '../chunks/defineProperty-CTLrw71t.js';
|
|
66
66
|
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 genCalc$1, a0 as genStyleUtils$1, m as merge, a1 as statistic, a2 as statisticToken, a3 as MotionProvider, _ as _toConsumableArray, a4 as merge$1, a5 as get$1, a6 as set$1, a7 as isEqual$1, t as toArray$3 } from '../chunks/toArray-2LkvUaha.js';
|
|
67
|
-
import { K as Keyframe, C as CSSMotion, a as CSSMotionList, T as Tooltip, P as Popup, _ as _asyncToGenerator, b as _regeneratorRuntime, c as Color, u as useEvent$2, d as useMergedState$1, r as requireReactIs, p as pickAttrs } from '../chunks/GenericUploadModal-
|
|
68
|
-
export { G as GenericUploadModal } from '../chunks/GenericUploadModal-
|
|
67
|
+
import { K as Keyframe, C as CSSMotion, a as CSSMotionList, T as Tooltip, P as Popup, _ as _asyncToGenerator, b as _regeneratorRuntime, c as Color, u as useEvent$2, d as useMergedState$1, r as requireReactIs, p as pickAttrs } from '../chunks/GenericUploadModal-DxRzdkYF.js';
|
|
68
|
+
export { G as GenericUploadModal } from '../chunks/GenericUploadModal-DxRzdkYF.js';
|
|
69
69
|
import { _ as _createClass, a as _classCallCheck, b as _inherits, c as _createSuper, d as _assertThisInitialized, e as _isNativeReflectConstruct, f as _setPrototypeOf, g as _getPrototypeOf } from '../chunks/createSuper-C9_dQ5Zr.js';
|
|
70
70
|
import ReactDOM__default, { unstable_batchedUpdates, createPortal } from 'react-dom';
|
|
71
71
|
import { isEmpty, isBoolean } from 'lodash';
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Control } from 'react-hook-form';
|
|
2
|
+
import { UploadListType } from 'antd/es/upload/interface';
|
|
2
3
|
export interface GenericUploadModalProps {
|
|
3
4
|
open: boolean;
|
|
4
5
|
onCancel: () => void;
|
|
@@ -15,6 +16,7 @@ export interface GenericUploadModalProps {
|
|
|
15
16
|
allowedExtensions: string[];
|
|
16
17
|
maxSize?: number;
|
|
17
18
|
trans: any;
|
|
19
|
+
listType?: UploadListType;
|
|
18
20
|
texts?: {
|
|
19
21
|
title?: string;
|
|
20
22
|
okText?: string;
|
|
@@ -27,4 +29,4 @@ export interface GenericUploadModalProps {
|
|
|
27
29
|
uploading?: string;
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
|
-
export declare function GenericUploadModal({ open, onCancel, control, record, texts, setFileList, fileList, trans, onDeleteFile, }: GenericUploadModalProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function GenericUploadModal({ open, onCancel, control, record, texts, setFileList, fileList, trans, onDeleteFile, listType, }: GenericUploadModalProps): import("react/jsx-runtime").JSX.Element;
|