sti-antd-package 0.0.14 → 0.0.16
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/components/Table/Async/types.d.ts +12 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.esm.js +33 -24
- package/dist/index.js +33 -24
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableComponentProps } from "../types";
|
|
1
|
+
import { TableButtonMiddle, TableComponentProps } from "../types";
|
|
2
2
|
import { TableAsyncSearchItem } from "./Search";
|
|
3
3
|
import { AnyObject } from "antd/es/_util/type";
|
|
4
4
|
import { ColumnGroupType, ColumnType, TableRowSelection } from "antd/es/table/interface";
|
|
@@ -52,10 +52,21 @@ export interface TableParams {
|
|
|
52
52
|
};
|
|
53
53
|
['default']?: DefaultParams;
|
|
54
54
|
}
|
|
55
|
+
export type TableButtonMiddleAsync = TableButtonMiddle & {
|
|
56
|
+
disabled?: boolean | ((states: {
|
|
57
|
+
tableParams: TableParams | undefined;
|
|
58
|
+
tableSearch: string | undefined;
|
|
59
|
+
selectedRowKeys: React.Key[] | undefined;
|
|
60
|
+
}) => boolean);
|
|
61
|
+
};
|
|
55
62
|
export interface TableAsyncComponentRef {
|
|
56
63
|
reload: () => void;
|
|
64
|
+
filters: () => AnyObject | undefined;
|
|
65
|
+
tableSearch: () => string | undefined;
|
|
66
|
+
selectedRowKeys: () => React.Key[] | undefined;
|
|
57
67
|
}
|
|
58
68
|
export type TableAsyncComponentProps = TableComponentProps<AnyObject> & {
|
|
69
|
+
buttonMiddle?: TableButtonMiddleAsync[];
|
|
59
70
|
search?: boolean;
|
|
60
71
|
searchOnChange?: boolean;
|
|
61
72
|
noReload?: boolean;
|
|
@@ -42,7 +42,7 @@ export type { SwitchComponentProps } from "./Switch";
|
|
|
42
42
|
export { default as TableComponent } from "./Table";
|
|
43
43
|
export type { TableButtonMiddle, TableComponentProps } from "./Table";
|
|
44
44
|
export { default as TableAsyncComponent } from "./Table/Async";
|
|
45
|
-
export type { DefaultColumn, DefaultParams, TableAsyncComponentProps, TableAsyncComponentRef, TableParams, YajraColumn, YajraColumnParams, YajraOrderParams, YajraParams, YajraSearchParams } from "./Table/Async";
|
|
45
|
+
export type { DefaultColumn, DefaultParams, TableAsyncComponentProps, TableAsyncComponentRef, TableButtonMiddleAsync, TableParams, YajraColumn, YajraColumnParams, YajraOrderParams, YajraParams, YajraSearchParams } from "./Table/Async";
|
|
46
46
|
export type { TableAsyncSearchCheckbox, TableAsyncSearchDate, TableAsyncSearchDateRange, TableAsyncSearchFetchSelectMultiple, TableAsyncSearchItem, TableAsyncSearchItemType, TableAsyncSearchLocalSelectMultiple, TableAsyncSearchSelect, TableAsyncSearchSelectMultiple, TableAsyncSearchSwitch, TableAsyncSearchText } from "./Table/Async/Search";
|
|
47
47
|
export { default as TableCellEditableComponent } from "./Table/CellEditable";
|
|
48
48
|
export type { TableCellEditableProps } from "./Table/CellEditable";
|
package/dist/index.d.ts
CHANGED
|
@@ -953,10 +953,21 @@ interface TableParams {
|
|
|
953
953
|
};
|
|
954
954
|
['default']?: DefaultParams;
|
|
955
955
|
}
|
|
956
|
+
type TableButtonMiddleAsync = TableButtonMiddle & {
|
|
957
|
+
disabled?: boolean | ((states: {
|
|
958
|
+
tableParams: TableParams | undefined;
|
|
959
|
+
tableSearch: string | undefined;
|
|
960
|
+
selectedRowKeys: React.Key[] | undefined;
|
|
961
|
+
}) => boolean);
|
|
962
|
+
};
|
|
956
963
|
interface TableAsyncComponentRef {
|
|
957
964
|
reload: () => void;
|
|
965
|
+
filters: () => AnyObject | undefined;
|
|
966
|
+
tableSearch: () => string | undefined;
|
|
967
|
+
selectedRowKeys: () => React.Key[] | undefined;
|
|
958
968
|
}
|
|
959
969
|
type TableAsyncComponentProps = TableComponentProps<AnyObject> & {
|
|
970
|
+
buttonMiddle?: TableButtonMiddleAsync[];
|
|
960
971
|
search?: boolean;
|
|
961
972
|
searchOnChange?: boolean;
|
|
962
973
|
noReload?: boolean;
|
|
@@ -1057,4 +1068,4 @@ declare const useRemoveError: (setInputErrors: React.Dispatch<React.SetStateActi
|
|
|
1057
1068
|
}>>) => (name?: string) => void;
|
|
1058
1069
|
|
|
1059
1070
|
export { BaseModel, ButtonComponent, ButtonGroupAddComponent, ButtonGroupEditComponent, CardComponent, CascaderComponent, CheckboxComponent$1 as CheckboxComponent, CheckboxComponent as CheckboxGroupComponent, ConfigProvider, DataGridComponent, DateFormat, DatePickerComponent, DateRangePickerComponent, DropdownButtonComponent, FeedbackProvider, FormItemComponent, IconCheckOrClose, InputComponent, LinkComponent, NumberFormatComponent, RadioComponent, SelectAsyncComponent, SelectComponent, SwitchComponent, TableAsyncComponent, TableCellEditableComponent, TableComponent, TableRowProvider, TabsComponent, TagComponent, TextAreaComponent, TransformBoolean, TransformDayjs, TransformNumber, colInline, colLayout, datePickerFormat, _default as formColLayout, getTableAsyncName, getTableFilterStorage, selectAsync, styleCSS, toCamel, useConfig, useDataGrid, useFeedback, useRemoveError, useTableAsyncSearch, useTableRow };
|
|
1060
|
-
export type { ButtonComponentProps, ButtonComponentRef, ButtonGroupAddComponentProps, ButtonGroupEditComponentProps, CardComponentProps, CascaderComponentProps, CascaderComponentRef, CheckboxComponentProps, CheckboxComponentRef, CheckboxGroupComponentProps, CheckboxGroupComponentRef, ConfigContextType, ConfigProviderProps, DataGridColumn, DataGridColumnType, DataGridComponentProps, DataGridComponentRef, DataGridContextType, DataGridFilter, DataGridFilterColumn, DataGridRow, DatePickerComponentProps, DatePickerComponentRef, DatePickerFormat, DatePickerFormatType, DateRangePickerComponentProps, DateRangePickerComponentRef, DefaultColumn, DefaultParams, DropdownButtonComponentProps, DropdownButtonMenuItem, FeedbackContextType, FormColLayout, FormColSizeSpan, FormItemComponentProps, IconCheckOrCloseProps, InputComponentProps, InputComponentRef, LinkComponentProps, LinkType, NumberFormatComponentProps, NumberFormatComponentRef, RadioComponentProps, SelectAsyncComponentProps, SelectAsyncComponentRef, SelectAsyncFormat, SelectAsyncProps, SelectComponentProps, SelectOption, SwitchComponentProps, TableAsyncComponentProps, TableAsyncComponentRef, TableAsyncSearchCheckbox, TableAsyncSearchContextType, TableAsyncSearchDate, TableAsyncSearchDateRange, TableAsyncSearchFetchSelectMultiple, TableAsyncSearchItem, TableAsyncSearchItemType, TableAsyncSearchLocalSelectMultiple, TableAsyncSearchProviderProps, TableAsyncSearchSelect, TableAsyncSearchSelectMultiple, TableAsyncSearchSwitch, TableAsyncSearchText, TableAsyncType, TableButtonMiddle, TableCellEditableProps, TableComponentProps, TableParams, TableParamsFormatter, TableRowContextType, TableRowProviderProps, TabsComponentProps, TagComponentProps, TextAreaComponentProps, TextAreaComponentRef, YajraColumn, YajraColumnParams, YajraOrderParams, YajraParams, YajraSearchParams };
|
|
1071
|
+
export type { ButtonComponentProps, ButtonComponentRef, ButtonGroupAddComponentProps, ButtonGroupEditComponentProps, CardComponentProps, CascaderComponentProps, CascaderComponentRef, CheckboxComponentProps, CheckboxComponentRef, CheckboxGroupComponentProps, CheckboxGroupComponentRef, ConfigContextType, ConfigProviderProps, DataGridColumn, DataGridColumnType, DataGridComponentProps, DataGridComponentRef, DataGridContextType, DataGridFilter, DataGridFilterColumn, DataGridRow, DatePickerComponentProps, DatePickerComponentRef, DatePickerFormat, DatePickerFormatType, DateRangePickerComponentProps, DateRangePickerComponentRef, DefaultColumn, DefaultParams, DropdownButtonComponentProps, DropdownButtonMenuItem, FeedbackContextType, FormColLayout, FormColSizeSpan, FormItemComponentProps, IconCheckOrCloseProps, InputComponentProps, InputComponentRef, LinkComponentProps, LinkType, NumberFormatComponentProps, NumberFormatComponentRef, RadioComponentProps, SelectAsyncComponentProps, SelectAsyncComponentRef, SelectAsyncFormat, SelectAsyncProps, SelectComponentProps, SelectOption, SwitchComponentProps, TableAsyncComponentProps, TableAsyncComponentRef, TableAsyncSearchCheckbox, TableAsyncSearchContextType, TableAsyncSearchDate, TableAsyncSearchDateRange, TableAsyncSearchFetchSelectMultiple, TableAsyncSearchItem, TableAsyncSearchItemType, TableAsyncSearchLocalSelectMultiple, TableAsyncSearchProviderProps, TableAsyncSearchSelect, TableAsyncSearchSelectMultiple, TableAsyncSearchSwitch, TableAsyncSearchText, TableAsyncType, TableButtonMiddle, TableButtonMiddleAsync, TableCellEditableProps, TableComponentProps, TableParams, TableParamsFormatter, TableRowContextType, TableRowProviderProps, TabsComponentProps, TagComponentProps, TextAreaComponentProps, TextAreaComponentRef, YajraColumn, YajraColumnParams, YajraOrderParams, YajraParams, YajraSearchParams };
|
package/dist/index.esm.js
CHANGED
|
@@ -8377,8 +8377,8 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8377
8377
|
const filterStorage = getTableFilterStorage();
|
|
8378
8378
|
const filter = name ? (_a = filterStorage[name]) !== null && _a !== void 0 ? _a : {} : {};
|
|
8379
8379
|
const [form] = Form$2.useForm();
|
|
8380
|
-
const
|
|
8381
|
-
const dj = dayjs(
|
|
8380
|
+
const toDayjs = (value, format) => {
|
|
8381
|
+
const dj = !dayjs.isDayjs(value) ? dayjs(value) : value;
|
|
8382
8382
|
return format ? dj.format() : dj;
|
|
8383
8383
|
};
|
|
8384
8384
|
const setInitialValue = (format) => {
|
|
@@ -8392,10 +8392,10 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8392
8392
|
result[name] = currentFilter.map((item) => item.value);
|
|
8393
8393
|
break;
|
|
8394
8394
|
case 'date':
|
|
8395
|
-
result[name] =
|
|
8395
|
+
result[name] = toDayjs(currentFilter, format);
|
|
8396
8396
|
break;
|
|
8397
8397
|
case 'date-range':
|
|
8398
|
-
result[name] = currentFilter.map((item) =>
|
|
8398
|
+
result[name] = currentFilter.map((item) => toDayjs(item, format));
|
|
8399
8399
|
break;
|
|
8400
8400
|
default:
|
|
8401
8401
|
result[name] = currentFilter;
|
|
@@ -8407,7 +8407,7 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8407
8407
|
return result;
|
|
8408
8408
|
}, {})) !== null && _a !== void 0 ? _a : {};
|
|
8409
8409
|
};
|
|
8410
|
-
const initialValues = setInitialValue(
|
|
8410
|
+
const initialValues = setInitialValue();
|
|
8411
8411
|
const getMultiSelectValue = () => multiSelectedOptions
|
|
8412
8412
|
? Object.keys(multiSelectedOptions).reduce((result, current) => {
|
|
8413
8413
|
var _a;
|
|
@@ -8415,7 +8415,6 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8415
8415
|
return result;
|
|
8416
8416
|
}, {})
|
|
8417
8417
|
: {};
|
|
8418
|
-
const toDayjs = (value) => !dayjs.isDayjs(value) ? dayjs(value) : value;
|
|
8419
8418
|
const getDateAndDateRangeValue = (values) => items === null || items === void 0 ? void 0 : items.reduce((result, current) => {
|
|
8420
8419
|
const { name, type } = current;
|
|
8421
8420
|
const currentValue = values[name];
|
|
@@ -8426,8 +8425,8 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8426
8425
|
'date-range',
|
|
8427
8426
|
].includes(type))
|
|
8428
8427
|
result[name] = Array.isArray(currentValue)
|
|
8429
|
-
? currentValue.map(item => toDayjs(item)
|
|
8430
|
-
: toDayjs(currentValue)
|
|
8428
|
+
? currentValue.map(item => toDayjs(item))
|
|
8429
|
+
: toDayjs(currentValue);
|
|
8431
8430
|
return result;
|
|
8432
8431
|
}, {});
|
|
8433
8432
|
const handleSubmit = (inputs) => {
|
|
@@ -8449,7 +8448,7 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8449
8448
|
result[name] = null;
|
|
8450
8449
|
break;
|
|
8451
8450
|
case 'date-range':
|
|
8452
|
-
result[name] =
|
|
8451
|
+
result[name] = null;
|
|
8453
8452
|
break;
|
|
8454
8453
|
default:
|
|
8455
8454
|
result[name] = undefined;
|
|
@@ -8509,18 +8508,19 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8509
8508
|
const TableAsyncChildrenComponent = (_a) => {
|
|
8510
8509
|
var _b, _c, _d;
|
|
8511
8510
|
var { search, searchOnChange, rowSelect, noReload, filterFields, ref } = _a, props = __rest$5(_a, ["search", "searchOnChange", "rowSelect", "noReload", "filterFields", "ref"]);
|
|
8512
|
-
const { loading, tableData, tableParams, setTableParams, tableSearch, setTableSearch, selectedRowKeys, setSelectedRowKeys, tableParamsFormatter, pagination, fetchData, } = useTableAsyncSearch();
|
|
8511
|
+
const { loading, filters, tableData, tableParams, setTableParams, tableSearch, setTableSearch, selectedRowKeys, setSelectedRowKeys, tableParamsFormatter, pagination, fetchData, } = useTableAsyncSearch();
|
|
8513
8512
|
const buttonMiddle = ((_b = props.buttonMiddle) === null || _b === void 0 ? void 0 : _b.map((item) => {
|
|
8514
8513
|
const { component } = item;
|
|
8515
8514
|
item.component = jsxRuntimeExports.jsx("div", {});
|
|
8516
8515
|
const states = { tableParams, tableSearch, selectedRowKeys };
|
|
8517
|
-
const additionalProps =
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
return result;
|
|
8521
|
-
}, {});
|
|
8516
|
+
const additionalProps = {
|
|
8517
|
+
disabled: typeof item.disabled === 'function' ? item.disabled(states) : item.disabled
|
|
8518
|
+
};
|
|
8522
8519
|
item.component = component;
|
|
8523
|
-
return
|
|
8520
|
+
return {
|
|
8521
|
+
classNames: item.classNames,
|
|
8522
|
+
component: cloneElement(component, additionalProps),
|
|
8523
|
+
};
|
|
8524
8524
|
})) || props.buttonMiddle || [];
|
|
8525
8525
|
const buttonDelete = props.buttonDelete
|
|
8526
8526
|
? {
|
|
@@ -8578,6 +8578,9 @@ const TableAsyncChildrenComponent = (_a) => {
|
|
|
8578
8578
|
} : undefined;
|
|
8579
8579
|
useImperativeHandle(ref, () => ({
|
|
8580
8580
|
reload: () => fetchData === null || fetchData === void 0 ? void 0 : fetchData(),
|
|
8581
|
+
filters: () => filters,
|
|
8582
|
+
tableSearch: () => tableSearch,
|
|
8583
|
+
selectedRowKeys: () => selectedRowKeys,
|
|
8581
8584
|
}));
|
|
8582
8585
|
return (jsxRuntimeExports.jsx(TableComponent, Object.assign({}, props, { buttonMiddle }, buttonDelete, { buttonReload: !noReload ? {
|
|
8583
8586
|
onClick: fetchData,
|
|
@@ -9408,7 +9411,8 @@ var Input$1 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
9408
9411
|
disabled: disabled,
|
|
9409
9412
|
classes: classes,
|
|
9410
9413
|
classNames: classNames$1,
|
|
9411
|
-
styles: styles
|
|
9414
|
+
styles: styles,
|
|
9415
|
+
ref: holderRef
|
|
9412
9416
|
}), getInputElement());
|
|
9413
9417
|
});
|
|
9414
9418
|
|
|
@@ -15458,7 +15462,7 @@ function getFontSizes(base) {
|
|
|
15458
15462
|
}));
|
|
15459
15463
|
}
|
|
15460
15464
|
|
|
15461
|
-
var version = '5.24.
|
|
15465
|
+
var version = '5.24.9';
|
|
15462
15466
|
|
|
15463
15467
|
const defaultPresetColors = {
|
|
15464
15468
|
blue: '#1677FF',
|
|
@@ -22692,7 +22696,7 @@ const genAllowClearStyle = token => {
|
|
|
22692
22696
|
outline: 'none',
|
|
22693
22697
|
backgroundColor: 'transparent',
|
|
22694
22698
|
'&:hover': {
|
|
22695
|
-
color: token.
|
|
22699
|
+
color: token.colorIcon
|
|
22696
22700
|
},
|
|
22697
22701
|
'&:active': {
|
|
22698
22702
|
color: token.colorText
|
|
@@ -22763,7 +22767,8 @@ const genAffixStyle = token => {
|
|
|
22763
22767
|
}
|
|
22764
22768
|
},
|
|
22765
22769
|
'&-show-count-suffix': {
|
|
22766
|
-
color: colorTextDescription
|
|
22770
|
+
color: colorTextDescription,
|
|
22771
|
+
direction: 'ltr'
|
|
22767
22772
|
},
|
|
22768
22773
|
'&-show-count-has-suffix': {
|
|
22769
22774
|
marginInlineEnd: token.paddingXXS
|
|
@@ -23198,10 +23203,6 @@ const genTextAreaStyle = token => {
|
|
|
23198
23203
|
[textareaPrefixCls]: {
|
|
23199
23204
|
position: 'relative',
|
|
23200
23205
|
'&-show-count': {
|
|
23201
|
-
// https://github.com/ant-design/ant-design/issues/33049
|
|
23202
|
-
[`> ${componentCls}`]: {
|
|
23203
|
-
height: '100%'
|
|
23204
|
-
},
|
|
23205
23206
|
[`${componentCls}-data-count`]: {
|
|
23206
23207
|
position: 'absolute',
|
|
23207
23208
|
bottom: token.calc(token.fontSize).mul(token.lineHeight).mul(-1).equal(),
|
|
@@ -23254,6 +23255,14 @@ const genTextAreaStyle = token => {
|
|
|
23254
23255
|
}
|
|
23255
23256
|
}
|
|
23256
23257
|
},
|
|
23258
|
+
[`&-affix-wrapper${componentCls}-affix-wrapper-rtl`]: {
|
|
23259
|
+
[`${componentCls}-suffix`]: {
|
|
23260
|
+
[`${componentCls}-data-count`]: {
|
|
23261
|
+
direction: 'ltr',
|
|
23262
|
+
insetInlineStart: 0
|
|
23263
|
+
}
|
|
23264
|
+
}
|
|
23265
|
+
},
|
|
23257
23266
|
[`&-affix-wrapper${componentCls}-affix-wrapper-sm`]: {
|
|
23258
23267
|
[`${componentCls}-suffix`]: {
|
|
23259
23268
|
[`${componentCls}-clear-icon`]: {
|
package/dist/index.js
CHANGED
|
@@ -8396,8 +8396,8 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8396
8396
|
const filterStorage = getTableFilterStorage();
|
|
8397
8397
|
const filter = name ? (_a = filterStorage[name]) !== null && _a !== void 0 ? _a : {} : {};
|
|
8398
8398
|
const [form] = antd.Form.useForm();
|
|
8399
|
-
const
|
|
8400
|
-
const dj = dayjs(
|
|
8399
|
+
const toDayjs = (value, format) => {
|
|
8400
|
+
const dj = !dayjs.isDayjs(value) ? dayjs(value) : value;
|
|
8401
8401
|
return format ? dj.format() : dj;
|
|
8402
8402
|
};
|
|
8403
8403
|
const setInitialValue = (format) => {
|
|
@@ -8411,10 +8411,10 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8411
8411
|
result[name] = currentFilter.map((item) => item.value);
|
|
8412
8412
|
break;
|
|
8413
8413
|
case 'date':
|
|
8414
|
-
result[name] =
|
|
8414
|
+
result[name] = toDayjs(currentFilter, format);
|
|
8415
8415
|
break;
|
|
8416
8416
|
case 'date-range':
|
|
8417
|
-
result[name] = currentFilter.map((item) =>
|
|
8417
|
+
result[name] = currentFilter.map((item) => toDayjs(item, format));
|
|
8418
8418
|
break;
|
|
8419
8419
|
default:
|
|
8420
8420
|
result[name] = currentFilter;
|
|
@@ -8426,7 +8426,7 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8426
8426
|
return result;
|
|
8427
8427
|
}, {})) !== null && _a !== void 0 ? _a : {};
|
|
8428
8428
|
};
|
|
8429
|
-
const initialValues = setInitialValue(
|
|
8429
|
+
const initialValues = setInitialValue();
|
|
8430
8430
|
const getMultiSelectValue = () => multiSelectedOptions
|
|
8431
8431
|
? Object.keys(multiSelectedOptions).reduce((result, current) => {
|
|
8432
8432
|
var _a;
|
|
@@ -8434,7 +8434,6 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8434
8434
|
return result;
|
|
8435
8435
|
}, {})
|
|
8436
8436
|
: {};
|
|
8437
|
-
const toDayjs = (value) => !dayjs.isDayjs(value) ? dayjs(value) : value;
|
|
8438
8437
|
const getDateAndDateRangeValue = (values) => items === null || items === void 0 ? void 0 : items.reduce((result, current) => {
|
|
8439
8438
|
const { name, type } = current;
|
|
8440
8439
|
const currentValue = values[name];
|
|
@@ -8445,8 +8444,8 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8445
8444
|
'date-range',
|
|
8446
8445
|
].includes(type))
|
|
8447
8446
|
result[name] = Array.isArray(currentValue)
|
|
8448
|
-
? currentValue.map(item => toDayjs(item)
|
|
8449
|
-
: toDayjs(currentValue)
|
|
8447
|
+
? currentValue.map(item => toDayjs(item))
|
|
8448
|
+
: toDayjs(currentValue);
|
|
8450
8449
|
return result;
|
|
8451
8450
|
}, {});
|
|
8452
8451
|
const handleSubmit = (inputs) => {
|
|
@@ -8468,7 +8467,7 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8468
8467
|
result[name] = null;
|
|
8469
8468
|
break;
|
|
8470
8469
|
case 'date-range':
|
|
8471
|
-
result[name] =
|
|
8470
|
+
result[name] = null;
|
|
8472
8471
|
break;
|
|
8473
8472
|
default:
|
|
8474
8473
|
result[name] = undefined;
|
|
@@ -8528,18 +8527,19 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8528
8527
|
const TableAsyncChildrenComponent = (_a) => {
|
|
8529
8528
|
var _b, _c, _d;
|
|
8530
8529
|
var { search, searchOnChange, rowSelect, noReload, filterFields, ref } = _a, props = __rest$5(_a, ["search", "searchOnChange", "rowSelect", "noReload", "filterFields", "ref"]);
|
|
8531
|
-
const { loading, tableData, tableParams, setTableParams, tableSearch, setTableSearch, selectedRowKeys, setSelectedRowKeys, tableParamsFormatter, pagination, fetchData, } = useTableAsyncSearch();
|
|
8530
|
+
const { loading, filters, tableData, tableParams, setTableParams, tableSearch, setTableSearch, selectedRowKeys, setSelectedRowKeys, tableParamsFormatter, pagination, fetchData, } = useTableAsyncSearch();
|
|
8532
8531
|
const buttonMiddle = ((_b = props.buttonMiddle) === null || _b === void 0 ? void 0 : _b.map((item) => {
|
|
8533
8532
|
const { component } = item;
|
|
8534
8533
|
item.component = jsxRuntimeExports.jsx("div", {});
|
|
8535
8534
|
const states = { tableParams, tableSearch, selectedRowKeys };
|
|
8536
|
-
const additionalProps =
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
return result;
|
|
8540
|
-
}, {});
|
|
8535
|
+
const additionalProps = {
|
|
8536
|
+
disabled: typeof item.disabled === 'function' ? item.disabled(states) : item.disabled
|
|
8537
|
+
};
|
|
8541
8538
|
item.component = component;
|
|
8542
|
-
return
|
|
8539
|
+
return {
|
|
8540
|
+
classNames: item.classNames,
|
|
8541
|
+
component: React.cloneElement(component, additionalProps),
|
|
8542
|
+
};
|
|
8543
8543
|
})) || props.buttonMiddle || [];
|
|
8544
8544
|
const buttonDelete = props.buttonDelete
|
|
8545
8545
|
? {
|
|
@@ -8597,6 +8597,9 @@ const TableAsyncChildrenComponent = (_a) => {
|
|
|
8597
8597
|
} : undefined;
|
|
8598
8598
|
React.useImperativeHandle(ref, () => ({
|
|
8599
8599
|
reload: () => fetchData === null || fetchData === void 0 ? void 0 : fetchData(),
|
|
8600
|
+
filters: () => filters,
|
|
8601
|
+
tableSearch: () => tableSearch,
|
|
8602
|
+
selectedRowKeys: () => selectedRowKeys,
|
|
8600
8603
|
}));
|
|
8601
8604
|
return (jsxRuntimeExports.jsx(TableComponent, Object.assign({}, props, { buttonMiddle }, buttonDelete, { buttonReload: !noReload ? {
|
|
8602
8605
|
onClick: fetchData,
|
|
@@ -9427,7 +9430,8 @@ var Input$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
9427
9430
|
disabled: disabled,
|
|
9428
9431
|
classes: classes,
|
|
9429
9432
|
classNames: classNames$1,
|
|
9430
|
-
styles: styles
|
|
9433
|
+
styles: styles,
|
|
9434
|
+
ref: holderRef
|
|
9431
9435
|
}), getInputElement());
|
|
9432
9436
|
});
|
|
9433
9437
|
|
|
@@ -15477,7 +15481,7 @@ function getFontSizes(base) {
|
|
|
15477
15481
|
}));
|
|
15478
15482
|
}
|
|
15479
15483
|
|
|
15480
|
-
var version = '5.24.
|
|
15484
|
+
var version = '5.24.9';
|
|
15481
15485
|
|
|
15482
15486
|
const defaultPresetColors = {
|
|
15483
15487
|
blue: '#1677FF',
|
|
@@ -22711,7 +22715,7 @@ const genAllowClearStyle = token => {
|
|
|
22711
22715
|
outline: 'none',
|
|
22712
22716
|
backgroundColor: 'transparent',
|
|
22713
22717
|
'&:hover': {
|
|
22714
|
-
color: token.
|
|
22718
|
+
color: token.colorIcon
|
|
22715
22719
|
},
|
|
22716
22720
|
'&:active': {
|
|
22717
22721
|
color: token.colorText
|
|
@@ -22782,7 +22786,8 @@ const genAffixStyle = token => {
|
|
|
22782
22786
|
}
|
|
22783
22787
|
},
|
|
22784
22788
|
'&-show-count-suffix': {
|
|
22785
|
-
color: colorTextDescription
|
|
22789
|
+
color: colorTextDescription,
|
|
22790
|
+
direction: 'ltr'
|
|
22786
22791
|
},
|
|
22787
22792
|
'&-show-count-has-suffix': {
|
|
22788
22793
|
marginInlineEnd: token.paddingXXS
|
|
@@ -23217,10 +23222,6 @@ const genTextAreaStyle = token => {
|
|
|
23217
23222
|
[textareaPrefixCls]: {
|
|
23218
23223
|
position: 'relative',
|
|
23219
23224
|
'&-show-count': {
|
|
23220
|
-
// https://github.com/ant-design/ant-design/issues/33049
|
|
23221
|
-
[`> ${componentCls}`]: {
|
|
23222
|
-
height: '100%'
|
|
23223
|
-
},
|
|
23224
23225
|
[`${componentCls}-data-count`]: {
|
|
23225
23226
|
position: 'absolute',
|
|
23226
23227
|
bottom: token.calc(token.fontSize).mul(token.lineHeight).mul(-1).equal(),
|
|
@@ -23273,6 +23274,14 @@ const genTextAreaStyle = token => {
|
|
|
23273
23274
|
}
|
|
23274
23275
|
}
|
|
23275
23276
|
},
|
|
23277
|
+
[`&-affix-wrapper${componentCls}-affix-wrapper-rtl`]: {
|
|
23278
|
+
[`${componentCls}-suffix`]: {
|
|
23279
|
+
[`${componentCls}-data-count`]: {
|
|
23280
|
+
direction: 'ltr',
|
|
23281
|
+
insetInlineStart: 0
|
|
23282
|
+
}
|
|
23283
|
+
}
|
|
23284
|
+
},
|
|
23276
23285
|
[`&-affix-wrapper${componentCls}-affix-wrapper-sm`]: {
|
|
23277
23286
|
[`${componentCls}-suffix`]: {
|
|
23278
23287
|
[`${componentCls}-clear-icon`]: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sti-antd-package",
|
|
3
3
|
"description": "STI ANT Design",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.16",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/lodash": "^4.17.16",
|
|
45
45
|
"@types/react": "^19.0.12",
|
|
46
46
|
"@types/react-dom": "^19.0.4",
|
|
47
|
-
"antd": "^5.24.
|
|
47
|
+
"antd": "^5.24.9",
|
|
48
48
|
"axios": "^1.8.4",
|
|
49
49
|
"lodash": "^4.17.21",
|
|
50
50
|
"react": "^19.0.0",
|