@pnkx-lib/ui 1.9.146 → 1.9.148
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/{PageNotFound-CwB9QL3G.js → PageNotFound-CHnHOjoP.js} +3 -9
- package/es/chunks/{Switch-C87zdzNW.js → Switch-205iadu5.js} +2 -2
- package/es/chunks/{index-E0vjqVeH.js → index-FkelwSrE.js} +251 -251
- package/es/fields/index.js +2 -2
- package/es/index.js +3 -3
- package/es/ui/index.js +2 -2
- package/package.json +1 -1
- package/types/components/fields/DatePicker.d.ts +4 -2
- package/types/components/fields/Input.d.ts +1 -1
- package/types/components/fields/PnkxField.d.ts +1 -2
- package/types/components/fields/index.d.ts +1 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import { j as jsxRuntimeExports,
|
1
|
+
import { j as jsxRuntimeExports, i as Icon, _ as _extends, P as PnkxField, C as Checkbox, u as useSortable, k as CSS, t as twMerge, l as useForm, m as DndContext, n as closestCenter, o as SortableContext, v as verticalListSortingStrategy, p as arrayMove, q as className, a as Tooltip, r as lodashExports, s as distExports, w as useTabStore, x as distExports$1, I as Input, T as Typography$1 } from './index-FkelwSrE.js';
|
2
2
|
import { Button as Button$1, Cascader, Modal as Modal$1, Badge as Badge$1, Breadcrumb as Breadcrumb$1, Divider as Divider$1, Table as Table$1, Tabs as Tabs$1, Space, 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, Pagination as Pagination$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 as Collapse$1, ColorPicker as ColorPicker$1, Empty as Empty$1, Image as Image$1, ConfigProvider as ConfigProvider$1 } from 'antd';
|
3
3
|
import * as React from 'react';
|
4
4
|
import { useState, useEffect, Component } from 'react';
|
@@ -1274,16 +1274,10 @@ const SearchFiltersForm = ({
|
|
1274
1274
|
|
1275
1275
|
const Container = ({
|
1276
1276
|
children,
|
1277
|
-
className
|
1277
|
+
className,
|
1278
1278
|
size
|
1279
1279
|
}) => {
|
1280
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
1281
|
-
"div",
|
1282
|
-
{
|
1283
|
-
className: className(size, "mx-auto px-4 sm:px-6 lg:px-8", className$1),
|
1284
|
-
children
|
1285
|
-
}
|
1286
|
-
);
|
1280
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: twMerge(size, "mx-auto px-4 sm:px-6 lg:px-8", className), children });
|
1287
1281
|
};
|
1288
1282
|
|
1289
1283
|
const Col = (props) => {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { h as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, i as Icon, _ as _extends } from './index-FkelwSrE.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';
|
@@ -249,7 +249,7 @@ const Switch = (props) => {
|
|
249
249
|
{
|
250
250
|
checked: !!value,
|
251
251
|
onChange: handleChange,
|
252
|
-
className:
|
252
|
+
className: twMerge("focus:outline-none", customStyleSwitch),
|
253
253
|
disabled,
|
254
254
|
...restProps
|
255
255
|
}
|
@@ -5394,93 +5394,6 @@ function requireGet () {
|
|
5394
5394
|
var getExports = requireGet();
|
5395
5395
|
const get$6 = /*@__PURE__*/getDefaultExportFromCjs(getExports);
|
5396
5396
|
|
5397
|
-
var classnames = {exports: {}};
|
5398
|
-
|
5399
|
-
/*!
|
5400
|
-
Copyright (c) 2018 Jed Watson.
|
5401
|
-
Licensed under the MIT License (MIT), see
|
5402
|
-
http://jedwatson.github.io/classnames
|
5403
|
-
*/
|
5404
|
-
|
5405
|
-
var hasRequiredClassnames;
|
5406
|
-
|
5407
|
-
function requireClassnames () {
|
5408
|
-
if (hasRequiredClassnames) return classnames.exports;
|
5409
|
-
hasRequiredClassnames = 1;
|
5410
|
-
(function (module) {
|
5411
|
-
/* global define */
|
5412
|
-
|
5413
|
-
(function () {
|
5414
|
-
|
5415
|
-
var hasOwn = {}.hasOwnProperty;
|
5416
|
-
|
5417
|
-
function classNames () {
|
5418
|
-
var classes = '';
|
5419
|
-
|
5420
|
-
for (var i = 0; i < arguments.length; i++) {
|
5421
|
-
var arg = arguments[i];
|
5422
|
-
if (arg) {
|
5423
|
-
classes = appendClass(classes, parseValue(arg));
|
5424
|
-
}
|
5425
|
-
}
|
5426
|
-
|
5427
|
-
return classes;
|
5428
|
-
}
|
5429
|
-
|
5430
|
-
function parseValue (arg) {
|
5431
|
-
if (typeof arg === 'string' || typeof arg === 'number') {
|
5432
|
-
return arg;
|
5433
|
-
}
|
5434
|
-
|
5435
|
-
if (typeof arg !== 'object') {
|
5436
|
-
return '';
|
5437
|
-
}
|
5438
|
-
|
5439
|
-
if (Array.isArray(arg)) {
|
5440
|
-
return classNames.apply(null, arg);
|
5441
|
-
}
|
5442
|
-
|
5443
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
5444
|
-
return arg.toString();
|
5445
|
-
}
|
5446
|
-
|
5447
|
-
var classes = '';
|
5448
|
-
|
5449
|
-
for (var key in arg) {
|
5450
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
5451
|
-
classes = appendClass(classes, key);
|
5452
|
-
}
|
5453
|
-
}
|
5454
|
-
|
5455
|
-
return classes;
|
5456
|
-
}
|
5457
|
-
|
5458
|
-
function appendClass (value, newClass) {
|
5459
|
-
if (!newClass) {
|
5460
|
-
return value;
|
5461
|
-
}
|
5462
|
-
|
5463
|
-
if (value) {
|
5464
|
-
return value + ' ' + newClass;
|
5465
|
-
}
|
5466
|
-
|
5467
|
-
return value + newClass;
|
5468
|
-
}
|
5469
|
-
|
5470
|
-
if (module.exports) {
|
5471
|
-
classNames.default = classNames;
|
5472
|
-
module.exports = classNames;
|
5473
|
-
} else {
|
5474
|
-
window.classNames = classNames;
|
5475
|
-
}
|
5476
|
-
}());
|
5477
|
-
} (classnames));
|
5478
|
-
return classnames.exports;
|
5479
|
-
}
|
5480
|
-
|
5481
|
-
var classnamesExports = requireClassnames();
|
5482
|
-
const className = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
5483
|
-
|
5484
5397
|
/**
|
5485
5398
|
* react-number-format - 5.4.4
|
5486
5399
|
* Author : Sudhanshu Yadav
|
@@ -6715,168 +6628,6 @@ const Label = ({ label, required }) => {
|
|
6715
6628
|
] });
|
6716
6629
|
};
|
6717
6630
|
|
6718
|
-
const Input = (props) => {
|
6719
|
-
//! State
|
6720
|
-
const {
|
6721
|
-
label,
|
6722
|
-
required,
|
6723
|
-
field,
|
6724
|
-
formState,
|
6725
|
-
type = "text",
|
6726
|
-
afterOnChange,
|
6727
|
-
iconStartInput,
|
6728
|
-
iconEndInput,
|
6729
|
-
customStyleInput,
|
6730
|
-
decimalScale,
|
6731
|
-
contentTooltip,
|
6732
|
-
...restProps
|
6733
|
-
} = props;
|
6734
|
-
const { name, value, onChange, onBlur } = field || {};
|
6735
|
-
const { touchedFields, errors, isSubmitted } = formState || {};
|
6736
|
-
const isTouched = get$6(touchedFields, name);
|
6737
|
-
const errorMessage = get$6(errors, name)?.message;
|
6738
|
-
const inputRef = useRef(null);
|
6739
|
-
//! Function
|
6740
|
-
const renderErrorMessage = () => {
|
6741
|
-
if (!errorMessage) return null;
|
6742
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
6743
|
-
ErrorMessage,
|
6744
|
-
{
|
6745
|
-
errorMessage,
|
6746
|
-
isTouched,
|
6747
|
-
isSubmitted
|
6748
|
-
}
|
6749
|
-
);
|
6750
|
-
};
|
6751
|
-
const wrapWithTooltip = (node) => {
|
6752
|
-
if (contentTooltip) {
|
6753
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
6754
|
-
Tooltip,
|
6755
|
-
{
|
6756
|
-
trigger: ["focus"],
|
6757
|
-
title: contentTooltip,
|
6758
|
-
placement: "topLeft",
|
6759
|
-
classNames: { root: "numeric-input" },
|
6760
|
-
children: node
|
6761
|
-
}
|
6762
|
-
);
|
6763
|
-
}
|
6764
|
-
return node;
|
6765
|
-
};
|
6766
|
-
const handleChange = useCallback(
|
6767
|
-
(e) => {
|
6768
|
-
onChange?.(e);
|
6769
|
-
afterOnChange?.(e.target.value);
|
6770
|
-
},
|
6771
|
-
[onChange, afterOnChange]
|
6772
|
-
);
|
6773
|
-
const renderInput = () => {
|
6774
|
-
const isNumberInput = type === "number" || type === "money";
|
6775
|
-
if (isNumberInput) {
|
6776
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
6777
|
-
NumericFormatCustom,
|
6778
|
-
{
|
6779
|
-
name,
|
6780
|
-
ref: inputRef,
|
6781
|
-
type,
|
6782
|
-
value,
|
6783
|
-
onChange: (e) => handleChange(e),
|
6784
|
-
helperText: () => renderErrorMessage(),
|
6785
|
-
className: className("", customStyleInput),
|
6786
|
-
status: (isTouched || isSubmitted) && Boolean(errorMessage) ? "error" : void 0,
|
6787
|
-
decimalScale,
|
6788
|
-
...restProps
|
6789
|
-
}
|
6790
|
-
);
|
6791
|
-
}
|
6792
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
6793
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
6794
|
-
Input$1,
|
6795
|
-
{
|
6796
|
-
ref: inputRef,
|
6797
|
-
value,
|
6798
|
-
onChange: handleChange,
|
6799
|
-
onBlur,
|
6800
|
-
prefix: iconStartInput,
|
6801
|
-
suffix: iconEndInput,
|
6802
|
-
className: className(customStyleInput),
|
6803
|
-
status: (isTouched || isSubmitted) && errorMessage ? "error" : "",
|
6804
|
-
...restProps
|
6805
|
-
}
|
6806
|
-
),
|
6807
|
-
renderErrorMessage()
|
6808
|
-
] });
|
6809
|
-
};
|
6810
|
-
//! Render
|
6811
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
6812
|
-
label && /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { label, required }),
|
6813
|
-
wrapWithTooltip(renderInput())
|
6814
|
-
] });
|
6815
|
-
};
|
6816
|
-
const NumericFormatCustom = forwardRef((props, ref) => {
|
6817
|
-
//! State
|
6818
|
-
const {
|
6819
|
-
onChange,
|
6820
|
-
afterOnChange,
|
6821
|
-
value,
|
6822
|
-
name,
|
6823
|
-
allowNegative,
|
6824
|
-
type,
|
6825
|
-
prefix,
|
6826
|
-
helperText,
|
6827
|
-
...restProps
|
6828
|
-
} = props;
|
6829
|
-
const isMoney = type === "money";
|
6830
|
-
//! Function
|
6831
|
-
const handleValueChange = (values) => {
|
6832
|
-
const numericValue = parseFloat(values.value.replace(/,/g, ""));
|
6833
|
-
if (onChange && name) {
|
6834
|
-
onChange({
|
6835
|
-
target: {
|
6836
|
-
name,
|
6837
|
-
value: numericValue
|
6838
|
-
}
|
6839
|
-
});
|
6840
|
-
}
|
6841
|
-
if (afterOnChange) {
|
6842
|
-
afterOnChange(numericValue);
|
6843
|
-
}
|
6844
|
-
};
|
6845
|
-
//! Render
|
6846
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
6847
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
6848
|
-
NumericFormat,
|
6849
|
-
{
|
6850
|
-
allowNegative,
|
6851
|
-
customInput: Input,
|
6852
|
-
onValueChange: handleValueChange,
|
6853
|
-
value,
|
6854
|
-
thousandSeparator: ",",
|
6855
|
-
decimalSeparator: ".",
|
6856
|
-
valueIsNumericString: true,
|
6857
|
-
getInputRef: ref,
|
6858
|
-
prefix: isMoney ? "$" : prefix,
|
6859
|
-
...restProps
|
6860
|
-
}
|
6861
|
-
),
|
6862
|
-
helperText && helperText()
|
6863
|
-
] });
|
6864
|
-
});
|
6865
|
-
|
6866
|
-
class PnkxField extends React.PureComponent {
|
6867
|
-
render() {
|
6868
|
-
const { name, component: Component, control, ...rest } = this.props;
|
6869
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
6870
|
-
Controller,
|
6871
|
-
{
|
6872
|
-
control,
|
6873
|
-
name,
|
6874
|
-
render: ({ field, formState }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { field, formState, ...rest })
|
6875
|
-
}
|
6876
|
-
);
|
6877
|
-
}
|
6878
|
-
}
|
6879
|
-
|
6880
6631
|
const CLASS_PART_SEPARATOR = '-';
|
6881
6632
|
const createClassGroupUtils = config => {
|
6882
6633
|
const classMap = createClassMap(config);
|
@@ -9832,6 +9583,168 @@ const getDefaultConfig = () => {
|
|
9832
9583
|
};
|
9833
9584
|
const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
|
9834
9585
|
|
9586
|
+
const Input = (props) => {
|
9587
|
+
//! State
|
9588
|
+
const {
|
9589
|
+
label,
|
9590
|
+
required,
|
9591
|
+
field,
|
9592
|
+
formState,
|
9593
|
+
type = "text",
|
9594
|
+
afterOnChange,
|
9595
|
+
iconStartInput,
|
9596
|
+
iconEndInput,
|
9597
|
+
classNameInput,
|
9598
|
+
decimalScale,
|
9599
|
+
contentTooltip,
|
9600
|
+
...restProps
|
9601
|
+
} = props;
|
9602
|
+
const { name, value, onChange, onBlur } = field || {};
|
9603
|
+
const { touchedFields, errors, isSubmitted } = formState || {};
|
9604
|
+
const isTouched = get$6(touchedFields, name);
|
9605
|
+
const errorMessage = get$6(errors, name)?.message;
|
9606
|
+
const inputRef = useRef(null);
|
9607
|
+
//! Function
|
9608
|
+
const renderErrorMessage = () => {
|
9609
|
+
if (!errorMessage) return null;
|
9610
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9611
|
+
ErrorMessage,
|
9612
|
+
{
|
9613
|
+
errorMessage,
|
9614
|
+
isTouched,
|
9615
|
+
isSubmitted
|
9616
|
+
}
|
9617
|
+
);
|
9618
|
+
};
|
9619
|
+
const wrapWithTooltip = (node) => {
|
9620
|
+
if (contentTooltip) {
|
9621
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9622
|
+
Tooltip,
|
9623
|
+
{
|
9624
|
+
trigger: ["focus"],
|
9625
|
+
title: contentTooltip,
|
9626
|
+
placement: "topLeft",
|
9627
|
+
classNames: { root: "numeric-input" },
|
9628
|
+
children: node
|
9629
|
+
}
|
9630
|
+
);
|
9631
|
+
}
|
9632
|
+
return node;
|
9633
|
+
};
|
9634
|
+
const handleChange = useCallback(
|
9635
|
+
(e) => {
|
9636
|
+
onChange?.(e);
|
9637
|
+
afterOnChange?.(e.target.value);
|
9638
|
+
},
|
9639
|
+
[onChange, afterOnChange]
|
9640
|
+
);
|
9641
|
+
const renderInput = () => {
|
9642
|
+
const isNumberInput = type === "number" || type === "money";
|
9643
|
+
if (isNumberInput) {
|
9644
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9645
|
+
NumericFormatCustom,
|
9646
|
+
{
|
9647
|
+
name,
|
9648
|
+
ref: inputRef,
|
9649
|
+
type,
|
9650
|
+
value,
|
9651
|
+
onChange: (e) => handleChange(e),
|
9652
|
+
helperText: () => renderErrorMessage(),
|
9653
|
+
className: twMerge("", classNameInput),
|
9654
|
+
status: (isTouched || isSubmitted) && Boolean(errorMessage) ? "error" : void 0,
|
9655
|
+
decimalScale,
|
9656
|
+
...restProps
|
9657
|
+
}
|
9658
|
+
);
|
9659
|
+
}
|
9660
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
9661
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
9662
|
+
Input$1,
|
9663
|
+
{
|
9664
|
+
ref: inputRef,
|
9665
|
+
value,
|
9666
|
+
onChange: handleChange,
|
9667
|
+
onBlur,
|
9668
|
+
prefix: iconStartInput,
|
9669
|
+
suffix: iconEndInput,
|
9670
|
+
className: twMerge(classNameInput),
|
9671
|
+
status: (isTouched || isSubmitted) && errorMessage ? "error" : "",
|
9672
|
+
...restProps
|
9673
|
+
}
|
9674
|
+
),
|
9675
|
+
renderErrorMessage()
|
9676
|
+
] });
|
9677
|
+
};
|
9678
|
+
//! Render
|
9679
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
9680
|
+
label && /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { label, required }),
|
9681
|
+
wrapWithTooltip(renderInput())
|
9682
|
+
] });
|
9683
|
+
};
|
9684
|
+
const NumericFormatCustom = forwardRef((props, ref) => {
|
9685
|
+
//! State
|
9686
|
+
const {
|
9687
|
+
onChange,
|
9688
|
+
afterOnChange,
|
9689
|
+
value,
|
9690
|
+
name,
|
9691
|
+
allowNegative,
|
9692
|
+
type,
|
9693
|
+
prefix,
|
9694
|
+
helperText,
|
9695
|
+
...restProps
|
9696
|
+
} = props;
|
9697
|
+
const isMoney = type === "money";
|
9698
|
+
//! Function
|
9699
|
+
const handleValueChange = (values) => {
|
9700
|
+
const numericValue = parseFloat(values.value.replace(/,/g, ""));
|
9701
|
+
if (onChange && name) {
|
9702
|
+
onChange({
|
9703
|
+
target: {
|
9704
|
+
name,
|
9705
|
+
value: numericValue
|
9706
|
+
}
|
9707
|
+
});
|
9708
|
+
}
|
9709
|
+
if (afterOnChange) {
|
9710
|
+
afterOnChange(numericValue);
|
9711
|
+
}
|
9712
|
+
};
|
9713
|
+
//! Render
|
9714
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
9715
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
9716
|
+
NumericFormat,
|
9717
|
+
{
|
9718
|
+
allowNegative,
|
9719
|
+
customInput: Input,
|
9720
|
+
onValueChange: handleValueChange,
|
9721
|
+
value,
|
9722
|
+
thousandSeparator: ",",
|
9723
|
+
decimalSeparator: ".",
|
9724
|
+
valueIsNumericString: true,
|
9725
|
+
getInputRef: ref,
|
9726
|
+
prefix: isMoney ? "$" : prefix,
|
9727
|
+
...restProps
|
9728
|
+
}
|
9729
|
+
),
|
9730
|
+
helperText && helperText()
|
9731
|
+
] });
|
9732
|
+
});
|
9733
|
+
|
9734
|
+
class PnkxField extends React.PureComponent {
|
9735
|
+
render() {
|
9736
|
+
const { name, component: Component, control, ...rest } = this.props;
|
9737
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9738
|
+
Controller,
|
9739
|
+
{
|
9740
|
+
control,
|
9741
|
+
name,
|
9742
|
+
render: ({ field, formState }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { field, formState, ...rest })
|
9743
|
+
}
|
9744
|
+
);
|
9745
|
+
}
|
9746
|
+
}
|
9747
|
+
|
9835
9748
|
var propTypes = {exports: {}};
|
9836
9749
|
|
9837
9750
|
var reactIs$1 = {exports: {}};
|
@@ -35728,7 +35641,7 @@ const Textarea = forwardRef(
|
|
35728
35641
|
TextArea,
|
35729
35642
|
{
|
35730
35643
|
ref,
|
35731
|
-
className:
|
35644
|
+
className: twMerge(
|
35732
35645
|
autoSize ? "textarea-custom" : "",
|
35733
35646
|
customStyleTextarea
|
35734
35647
|
),
|
@@ -35798,6 +35711,93 @@ const Checkbox = (props) => {
|
|
35798
35711
|
] });
|
35799
35712
|
};
|
35800
35713
|
|
35714
|
+
var classnames = {exports: {}};
|
35715
|
+
|
35716
|
+
/*!
|
35717
|
+
Copyright (c) 2018 Jed Watson.
|
35718
|
+
Licensed under the MIT License (MIT), see
|
35719
|
+
http://jedwatson.github.io/classnames
|
35720
|
+
*/
|
35721
|
+
|
35722
|
+
var hasRequiredClassnames;
|
35723
|
+
|
35724
|
+
function requireClassnames () {
|
35725
|
+
if (hasRequiredClassnames) return classnames.exports;
|
35726
|
+
hasRequiredClassnames = 1;
|
35727
|
+
(function (module) {
|
35728
|
+
/* global define */
|
35729
|
+
|
35730
|
+
(function () {
|
35731
|
+
|
35732
|
+
var hasOwn = {}.hasOwnProperty;
|
35733
|
+
|
35734
|
+
function classNames () {
|
35735
|
+
var classes = '';
|
35736
|
+
|
35737
|
+
for (var i = 0; i < arguments.length; i++) {
|
35738
|
+
var arg = arguments[i];
|
35739
|
+
if (arg) {
|
35740
|
+
classes = appendClass(classes, parseValue(arg));
|
35741
|
+
}
|
35742
|
+
}
|
35743
|
+
|
35744
|
+
return classes;
|
35745
|
+
}
|
35746
|
+
|
35747
|
+
function parseValue (arg) {
|
35748
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
35749
|
+
return arg;
|
35750
|
+
}
|
35751
|
+
|
35752
|
+
if (typeof arg !== 'object') {
|
35753
|
+
return '';
|
35754
|
+
}
|
35755
|
+
|
35756
|
+
if (Array.isArray(arg)) {
|
35757
|
+
return classNames.apply(null, arg);
|
35758
|
+
}
|
35759
|
+
|
35760
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
35761
|
+
return arg.toString();
|
35762
|
+
}
|
35763
|
+
|
35764
|
+
var classes = '';
|
35765
|
+
|
35766
|
+
for (var key in arg) {
|
35767
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
35768
|
+
classes = appendClass(classes, key);
|
35769
|
+
}
|
35770
|
+
}
|
35771
|
+
|
35772
|
+
return classes;
|
35773
|
+
}
|
35774
|
+
|
35775
|
+
function appendClass (value, newClass) {
|
35776
|
+
if (!newClass) {
|
35777
|
+
return value;
|
35778
|
+
}
|
35779
|
+
|
35780
|
+
if (value) {
|
35781
|
+
return value + ' ' + newClass;
|
35782
|
+
}
|
35783
|
+
|
35784
|
+
return value + newClass;
|
35785
|
+
}
|
35786
|
+
|
35787
|
+
if (module.exports) {
|
35788
|
+
classNames.default = classNames;
|
35789
|
+
module.exports = classNames;
|
35790
|
+
} else {
|
35791
|
+
window.classNames = classNames;
|
35792
|
+
}
|
35793
|
+
}());
|
35794
|
+
} (classnames));
|
35795
|
+
return classnames.exports;
|
35796
|
+
}
|
35797
|
+
|
35798
|
+
var classnamesExports = requireClassnames();
|
35799
|
+
const className = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
35800
|
+
|
35801
35801
|
function _typeof(o) {
|
35802
35802
|
"@babel/helpers - typeof";
|
35803
35803
|
|
@@ -61019,4 +61019,4 @@ React keys must be passed directly to JSX without using spread:
|
|
61019
61019
|
|
61020
61020
|
var distExports = requireDist();
|
61021
61021
|
|
61022
|
-
export { Checkbox as C, DatePicker as D, ErrorMessage as E, Input as I, Label as L, Menu as M, PnkxField as P, RangePicker as R, Space as S, Typography as T, _extends as _, Tooltip as a, Layout as b, Splitter as c, Steps as d, TINY_API as e, TinyMCE as f,
|
61022
|
+
export { Checkbox as C, DatePicker as D, ErrorMessage as E, Input as I, Label as L, Menu as M, PnkxField as P, RangePicker as R, Space as S, Typography as T, _extends as _, Tooltip as a, Layout as b, Splitter as c, Steps as d, TINY_API as e, TinyMCE as f, er as g, get$6 as h, Icon as i, jsxRuntimeExports as j, CSS as k, useForm as l, DndContext as m, closestCenter as n, SortableContext as o, arrayMove as p, className as q, lodashExports as r, distExports$1 as s, twMerge as t, useSortable as u, verticalListSortingStrategy as v, useTabStore as w, distExports as x };
|
package/es/fields/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { C as Checkbox, D as DatePicker, I as Input, P as PnkxField, R as RangePicker, f as TinyMCE } from '../chunks/index-
|
2
|
-
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-
|
1
|
+
export { C as Checkbox, D as DatePicker, I as Input, P as PnkxField, R as RangePicker, g as ReactDatePicker, f as TinyMCE } from '../chunks/index-FkelwSrE.js';
|
2
|
+
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-205iadu5.js';
|
package/es/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { O as ActionRowTable, A as Alert, v as Anchor, w as Appfix, x as AutoComplete, d as Badge, f as Breadcrumb, a3 as BreadcrumbHeading, a2 as BulkActions, B as Button, K as CATEGORY_LIST_ENUM, a4 as Card, C as CascaderField, N as CategoryStatus, e as Col, y as Collapse, z as ColorPicker, a5 as ConfigProvider, G as ConfirmModal, c as Container, j as Divider, l as Drawer, D as Dropdown, E as Empty, J as ErrorBoundary, F as Flex, H as Heading, I as Image, M as Modal, X as PAGE_NUMBER, Y as PAGE_SIZE, a6 as PageNotFound, g as Pagination, m as Popconfirm, P as Popover, Q as QRCode, o as Rate, n as Result, R as Row, Z as SORT_BY, _ as SORT_DESC, U as START_PAGE, V as START_PAGE_SIZE, b as SearchFiltersForm, p as Segmented, h as Sidebar, S as Skeleton, k as Spin, q as Statistic, T as Table, a as Tabs, i as Tag, r as Timeline, s as Tour, u as Tree, $ as TypeActionRowTable, a0 as TypeBulkActions, a1 as TypeStatusTable, W as Watermark, L as badgeStatusCategoryConfig, t as typeColorMap } from './chunks/PageNotFound-
|
2
|
-
export { C as Checkbox, D as DatePicker, E as ErrorMessage, I as Input, L as Label, b as Layout, M as Menu, P as PnkxField, R as RangePicker, S as Space, c as Splitter, d as Steps, e as TINY_API, f as TinyMCE, a as Tooltip, T as Typography } from './chunks/index-
|
3
|
-
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-
|
1
|
+
export { O as ActionRowTable, A as Alert, v as Anchor, w as Appfix, x as AutoComplete, d as Badge, f as Breadcrumb, a3 as BreadcrumbHeading, a2 as BulkActions, B as Button, K as CATEGORY_LIST_ENUM, a4 as Card, C as CascaderField, N as CategoryStatus, e as Col, y as Collapse, z as ColorPicker, a5 as ConfigProvider, G as ConfirmModal, c as Container, j as Divider, l as Drawer, D as Dropdown, E as Empty, J as ErrorBoundary, F as Flex, H as Heading, I as Image, M as Modal, X as PAGE_NUMBER, Y as PAGE_SIZE, a6 as PageNotFound, g as Pagination, m as Popconfirm, P as Popover, Q as QRCode, o as Rate, n as Result, R as Row, Z as SORT_BY, _ as SORT_DESC, U as START_PAGE, V as START_PAGE_SIZE, b as SearchFiltersForm, p as Segmented, h as Sidebar, S as Skeleton, k as Spin, q as Statistic, T as Table, a as Tabs, i as Tag, r as Timeline, s as Tour, u as Tree, $ as TypeActionRowTable, a0 as TypeBulkActions, a1 as TypeStatusTable, W as Watermark, L as badgeStatusCategoryConfig, t as typeColorMap } from './chunks/PageNotFound-CHnHOjoP.js';
|
2
|
+
export { C as Checkbox, D as DatePicker, E as ErrorMessage, I as Input, L as Label, b as Layout, M as Menu, P as PnkxField, R as RangePicker, g as ReactDatePicker, S as Space, c as Splitter, d as Steps, e as TINY_API, f as TinyMCE, a as Tooltip, T as Typography } from './chunks/index-FkelwSrE.js';
|
3
|
+
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-205iadu5.js';
|
4
4
|
export { a as useMessage, u as useToast } from './chunks/useMessage-CUPcOtIS.js';
|
package/es/ui/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { O as ActionRowTable, A as Alert, v as Anchor, w as Appfix, x as AutoComplete, d as Badge, f as Breadcrumb, a3 as BreadcrumbHeading, a2 as BulkActions, B as Button, K as CATEGORY_LIST_ENUM, a4 as Card, C as CascaderField, N as CategoryStatus, e as Col, y as Collapse, z as ColorPicker, a5 as ConfigProvider, G as ConfirmModal, c as Container, j as Divider, l as Drawer, D as Dropdown, E as Empty, J as ErrorBoundary, F as Flex, H as Heading, I as Image, M as Modal, X as PAGE_NUMBER, Y as PAGE_SIZE, a6 as PageNotFound, g as Pagination, m as Popconfirm, P as Popover, Q as QRCode, o as Rate, n as Result, R as Row, Z as SORT_BY, _ as SORT_DESC, U as START_PAGE, V as START_PAGE_SIZE, b as SearchFiltersForm, p as Segmented, h as Sidebar, S as Skeleton, k as Spin, q as Statistic, T as Table, a as Tabs, i as Tag, r as Timeline, s as Tour, u as Tree, $ as TypeActionRowTable, a0 as TypeBulkActions, a1 as TypeStatusTable, W as Watermark, L as badgeStatusCategoryConfig, t as typeColorMap } from '../chunks/PageNotFound-
|
2
|
-
export { E as ErrorMessage, L as Label, b as Layout, M as Menu, S as Space, c as Splitter, d as Steps, e as TINY_API, a as Tooltip, T as Typography } from '../chunks/index-
|
1
|
+
export { O as ActionRowTable, A as Alert, v as Anchor, w as Appfix, x as AutoComplete, d as Badge, f as Breadcrumb, a3 as BreadcrumbHeading, a2 as BulkActions, B as Button, K as CATEGORY_LIST_ENUM, a4 as Card, C as CascaderField, N as CategoryStatus, e as Col, y as Collapse, z as ColorPicker, a5 as ConfigProvider, G as ConfirmModal, c as Container, j as Divider, l as Drawer, D as Dropdown, E as Empty, J as ErrorBoundary, F as Flex, H as Heading, I as Image, M as Modal, X as PAGE_NUMBER, Y as PAGE_SIZE, a6 as PageNotFound, g as Pagination, m as Popconfirm, P as Popover, Q as QRCode, o as Rate, n as Result, R as Row, Z as SORT_BY, _ as SORT_DESC, U as START_PAGE, V as START_PAGE_SIZE, b as SearchFiltersForm, p as Segmented, h as Sidebar, S as Skeleton, k as Spin, q as Statistic, T as Table, a as Tabs, i as Tag, r as Timeline, s as Tour, u as Tree, $ as TypeActionRowTable, a0 as TypeBulkActions, a1 as TypeStatusTable, W as Watermark, L as badgeStatusCategoryConfig, t as typeColorMap } from '../chunks/PageNotFound-CHnHOjoP.js';
|
2
|
+
export { E as ErrorMessage, L as Label, b as Layout, M as Menu, S as Space, c as Splitter, d as Steps, e as TINY_API, a as Tooltip, T as Typography } from '../chunks/index-FkelwSrE.js';
|
package/package.json
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
import { default as React } from 'react';
|
2
2
|
import { ReactDatePickerProps } from 'react-datepicker';
|
3
3
|
import { ControllerRenderProps, UseFormSetValue, UseFormStateReturn } from 'react-hook-form';
|
4
|
+
export { default as ReactDatePicker } from 'react-datepicker';
|
4
5
|
export type TSize = "small" | "medium" | "large";
|
5
|
-
export interface
|
6
|
+
export interface DatePickerProps extends Omit<ReactDatePickerProps, "onChange"> {
|
6
7
|
field?: ControllerRenderProps<any, any>;
|
7
8
|
formState?: UseFormStateReturn<any>;
|
8
9
|
setValue?: UseFormSetValue<any>;
|
@@ -18,4 +19,5 @@ export interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange
|
|
18
19
|
customValue?: Date | null;
|
19
20
|
size?: TSize;
|
20
21
|
}
|
21
|
-
|
22
|
+
declare const DatePicker: (props: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
23
|
+
export default DatePicker;
|
@@ -7,7 +7,7 @@ export interface InputProps extends InputPropsAntd {
|
|
7
7
|
field?: ControllerRenderProps<any, any>;
|
8
8
|
formState?: UseFormStateReturn<any>;
|
9
9
|
label?: string;
|
10
|
-
|
10
|
+
classNameInput?: string;
|
11
11
|
type?: CustomInputTypeAttribute;
|
12
12
|
afterOnChange?: (value: number | string | null) => void;
|
13
13
|
iconStartInput?: React.ReactNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Control } from 'react-hook-form';
|
2
2
|
import * as React from "react";
|
3
|
-
type ComponentPropsType<TComponent> = TComponent extends React.ComponentType<infer P> ? P : never;
|
3
|
+
export type ComponentPropsType<TComponent> = TComponent extends React.ComponentType<infer P> ? P : never;
|
4
4
|
export type PnkxFieldProps<TComponent extends React.ComponentType<any>> = {
|
5
5
|
control: Control<any, any>;
|
6
6
|
name: string;
|
@@ -9,4 +9,3 @@ export type PnkxFieldProps<TComponent extends React.ComponentType<any>> = {
|
|
9
9
|
export declare class PnkxField<TComponent extends React.ComponentType<any>> extends React.PureComponent<PnkxFieldProps<TComponent>> {
|
10
10
|
render(): import("react/jsx-runtime").JSX.Element;
|
11
11
|
}
|
12
|
-
export {};
|