@jswork/antd-components 1.0.210 → 1.0.212

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/main.d.mts CHANGED
@@ -1,10 +1,11 @@
1
1
  import React, { HTMLAttributes, Component, ReactNode, FC } from 'react';
2
- import { BreadcrumbProps, MenuProps, CheckboxProps, PopconfirmProps, ButtonProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, SelectProps, SliderSingleProps, SwitchProps, TableProps, TimePickerProps, TransferProps, TreeProps, TreeSelectProps, UploadFile, UploadProps, SpaceProps } from 'antd';
2
+ import { BreadcrumbProps, MenuProps, CheckboxProps, PopconfirmProps, ButtonProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, SelectProps, SliderSingleProps, SwitchProps, TableProps, TimePickerProps, TransferProps, TreeProps, TreeSelectProps, UploadProps, UploadFile, SpaceProps } from 'antd';
3
3
  import { TemplateArgs } from '@jswork/react-list';
4
4
  import { SizeType } from 'antd/es/config-provider/SizeContext';
5
5
  import { CheckableTagProps } from 'antd/es/tag';
6
6
  import { CheckboxGroupProps } from 'antd/es/checkbox';
7
7
  import * as rc_input_lib_interface from 'rc-input/lib/interface';
8
+ import { ValueType } from 'rc-input/lib/interface';
8
9
  import { RangePickerProps } from 'antd/es/date-picker';
9
10
  import { SearchProps, TextAreaProps } from 'antd/es/input';
10
11
  import { SliderRangeProps } from 'antd/es/slider';
@@ -19,60 +20,6 @@ import { UploadChangeParam } from 'antd/es/upload/interface';
19
20
  import { ReactComponent } from '@ebay/nice-form-react';
20
21
  import { ReactAntStatusSwitchProps } from '@jswork/react-ant-status-switch/dist/components';
21
22
 
22
- declare const breadcrumbDefault: ({ item, index, items }: {
23
- item: any;
24
- index: any;
25
- items: any;
26
- }) => React.JSX.Element;
27
-
28
- interface Options$1 {
29
- component: React.ComponentType<any>;
30
- value?: string;
31
- label?: string;
32
- [key: string]: any;
33
- }
34
- /**
35
- * KV component template, for key-value pair.
36
- * @param item
37
- * @param index
38
- * @param options
39
- */
40
- declare const kv: ({ item, index }: {
41
- item: any;
42
- index: any;
43
- }, options: Options$1) => React.JSX.Element;
44
- declare const checkboxKv: (args: any) => React.JSX.Element;
45
- declare const selectKv: (args: any) => React.JSX.Element;
46
- declare const radioKv: (args: any, opts: any) => React.JSX.Element;
47
- declare const treeKv: ({ item }: {
48
- item: any;
49
- }, cb: any) => React.JSX.Element;
50
- declare const treeSelectKv: ({ item }: {
51
- item: any;
52
- }, cb: any) => React.JSX.Element;
53
-
54
- interface Options {
55
- component: React.ComponentType<any>;
56
- [key: string]: any;
57
- }
58
- /**
59
- * Raw component template, for array of items.
60
- * @param item
61
- * @param index
62
- * @param options
63
- */
64
- declare const raw: ({ item, index }: {
65
- item: any;
66
- index: any;
67
- }, options: Options) => React.JSX.Element;
68
- declare const checkboxRaw: (args: any) => React.JSX.Element;
69
- declare const selectRaw: (args: any) => React.JSX.Element;
70
- declare const radioRaw: (args: any, opts: any) => React.JSX.Element;
71
-
72
- declare const transferLabel: ({ item }: {
73
- item: any;
74
- }, options?: any) => React.ReactNode;
75
-
76
23
  type StdEventTarget$q = {
77
24
  target: {
78
25
  value: any;
@@ -478,6 +425,21 @@ declare class AcInput extends React.Component<AcInputProps> {
478
425
  }
479
426
  declare const AcInputFc: (props: AcInputProps) => React.JSX.Element;
480
427
 
428
+ interface AcInputCopyableState {
429
+ value?: ValueType;
430
+ }
431
+ declare class AcInputCopyable extends React.Component<AcInputProps, AcInputCopyableState> {
432
+ static displayName: string;
433
+ static formSchema: string;
434
+ static defaultProps: {};
435
+ constructor(props: any);
436
+ get copyView(): React.JSX.Element;
437
+ shouldComponentUpdate(props: Readonly<AcInputProps>): boolean;
438
+ handleInputChange: (e: any) => void;
439
+ render(): React.JSX.Element;
440
+ }
441
+ declare const AcInputCopyableFc: (props: AcInputProps) => React.JSX.Element;
442
+
481
443
  declare class AcInputHidden extends React.Component {
482
444
  static displayName: string;
483
445
  static formSchema: string;
@@ -1216,12 +1178,39 @@ type StdEventTarget$2 = {
1216
1178
  };
1217
1179
  type StdCallback$2 = (inEvent: StdEventTarget$2) => void;
1218
1180
  type CustomRequest$1 = (inEvent: any) => Promise<any>;
1181
+ type AcUploadProps = {
1182
+ className?: string;
1183
+ value?: number;
1184
+ onChange?: StdCallback$2;
1185
+ onRequest?: CustomRequest$1;
1186
+ btnProps?: ButtonProps;
1187
+ } & UploadProps;
1188
+ declare class AcUpload extends React.Component<AcUploadProps> {
1189
+ static displayName: string;
1190
+ static formSchema: string;
1191
+ static defaultProps: {
1192
+ onChange: any;
1193
+ onRequest: (inEvent: any) => Promise<any>;
1194
+ };
1195
+ handleChange: (inEvent: any) => void;
1196
+ handleCustomRequest: (inRequestOption: any) => void;
1197
+ render(): React.JSX.Element;
1198
+ }
1199
+ declare const AcUploadFc: (props: AcUploadProps) => React.JSX.Element;
1200
+
1201
+ type StdEventTarget$1 = {
1202
+ target: {
1203
+ value: any;
1204
+ };
1205
+ };
1206
+ type StdCallback$1 = (inEvent: StdEventTarget$1) => void;
1207
+ type CustomRequest = (inEvent: any) => Promise<any>;
1219
1208
  type AcUploadDraggerProps = {
1220
1209
  className?: string;
1221
1210
  value?: any[];
1222
1211
  defaultValue?: any[];
1223
- onChange?: StdCallback$2;
1224
- onRequest?: CustomRequest$1;
1212
+ onChange?: StdCallback$1;
1213
+ onRequest?: CustomRequest;
1225
1214
  } & DraggerProps;
1226
1215
  declare class AcUploadDragger extends React.Component<AcUploadDraggerProps> {
1227
1216
  static displayName: string;
@@ -1236,16 +1225,16 @@ declare class AcUploadDragger extends React.Component<AcUploadDraggerProps> {
1236
1225
  }
1237
1226
  declare const AcUploadDraggerFc: (props: AcUploadDraggerProps) => React.JSX.Element;
1238
1227
 
1239
- type StdEventTarget$1 = {
1228
+ type StdEventTarget = {
1240
1229
  target: {
1241
1230
  value: any;
1242
1231
  };
1243
1232
  };
1244
- type StdCallback$1 = (inEvent: StdEventTarget$1) => void;
1233
+ type StdCallback = (inEvent: StdEventTarget) => void;
1245
1234
  type AcAbstractUploadProps = {
1246
1235
  className?: string;
1247
1236
  value?: any[] | [];
1248
- onChange?: StdCallback$1;
1237
+ onChange?: StdCallback;
1249
1238
  transformResponse?: (inResponse: any) => any;
1250
1239
  transformURL?: (inPid: any) => string;
1251
1240
  } & DraggerProps;
@@ -1298,32 +1287,59 @@ declare class AcUploadPictureCard extends AcAbstractUpload {
1298
1287
  }
1299
1288
  declare const AcUploadPictureCardFc: (props: any) => React.JSX.Element;
1300
1289
 
1301
- type StdEventTarget = {
1302
- target: {
1303
- value: any;
1304
- };
1305
- };
1306
- type StdCallback = (inEvent: StdEventTarget) => void;
1307
- type CustomRequest = (inEvent: any) => Promise<any>;
1308
- type AcUploadProps = {
1309
- className?: string;
1310
- value?: number;
1311
- onChange?: StdCallback;
1312
- onRequest?: CustomRequest;
1313
- btnProps?: ButtonProps;
1314
- } & UploadProps;
1315
- declare class AcUpload extends React.Component<AcUploadProps> {
1316
- static displayName: string;
1317
- static formSchema: string;
1318
- static defaultProps: {
1319
- onChange: any;
1320
- onRequest: (inEvent: any) => Promise<any>;
1321
- };
1322
- handleChange: (inEvent: any) => void;
1323
- handleCustomRequest: (inRequestOption: any) => void;
1324
- render(): React.JSX.Element;
1290
+ declare const breadcrumbDefault: ({ item, index, items }: {
1291
+ item: any;
1292
+ index: any;
1293
+ items: any;
1294
+ }) => React.JSX.Element;
1295
+
1296
+ interface Options$1 {
1297
+ component: React.ComponentType<any>;
1298
+ value?: string;
1299
+ label?: string;
1300
+ [key: string]: any;
1325
1301
  }
1326
- declare const AcUploadFc: (props: AcUploadProps) => React.JSX.Element;
1302
+ /**
1303
+ * KV component template, for key-value pair.
1304
+ * @param item
1305
+ * @param index
1306
+ * @param options
1307
+ */
1308
+ declare const kv: ({ item, index }: {
1309
+ item: any;
1310
+ index: any;
1311
+ }, options: Options$1) => React.JSX.Element;
1312
+ declare const checkboxKv: (args: any) => React.JSX.Element;
1313
+ declare const selectKv: (args: any) => React.JSX.Element;
1314
+ declare const radioKv: (args: any, opts: any) => React.JSX.Element;
1315
+ declare const treeKv: ({ item }: {
1316
+ item: any;
1317
+ }, cb: any) => React.JSX.Element;
1318
+ declare const treeSelectKv: ({ item }: {
1319
+ item: any;
1320
+ }, cb: any) => React.JSX.Element;
1321
+
1322
+ interface Options {
1323
+ component: React.ComponentType<any>;
1324
+ [key: string]: any;
1325
+ }
1326
+ /**
1327
+ * Raw component template, for array of items.
1328
+ * @param item
1329
+ * @param index
1330
+ * @param options
1331
+ */
1332
+ declare const raw: ({ item, index }: {
1333
+ item: any;
1334
+ index: any;
1335
+ }, options: Options) => React.JSX.Element;
1336
+ declare const checkboxRaw: (args: any) => React.JSX.Element;
1337
+ declare const selectRaw: (args: any) => React.JSX.Element;
1338
+ declare const radioRaw: (args: any, opts: any) => React.JSX.Element;
1339
+
1340
+ declare const transferLabel: ({ item }: {
1341
+ item: any;
1342
+ }, options?: any) => React.ReactNode;
1327
1343
 
1328
1344
  declare global {
1329
1345
  interface NxStatic {
@@ -1336,62 +1352,49 @@ declare global {
1336
1352
  }
1337
1353
  }
1338
1354
 
1339
- type ExecuteFn = (command: string, data?: any) => void;
1340
- type ListenFn = (command: string, callback: any) => void;
1341
- type Payload = Record<string, any>;
1342
- declare const useCommand: (inName?: string) => {
1343
- listen: ListenFn;
1344
- execute: ExecuteFn;
1345
- load: (payload: Payload) => void;
1346
- refetch: () => void;
1347
- reset: () => void;
1348
- add: () => void;
1349
- edit: () => void;
1350
- destroy: () => void;
1351
- draft: (payload: Payload) => void;
1352
- };
1355
+ /**
1356
+ * @Author: aric 1290657123@qq.com
1357
+ * @Date: 2025-10-24 20:40:55
1358
+ * @LastEditors: aric 1290657123@qq.com
1359
+ * @LastEditTime: 2025-10-31 14:07:56
1360
+ */
1353
1361
 
1354
1362
  declare global {
1355
1363
  interface NxStatic {
1356
1364
  $event: any;
1357
1365
  }
1358
1366
  }
1359
- type AcTableLinksProps = {
1367
+ type AcCardExtrasProps = SpaceProps & {
1360
1368
  name: string;
1361
- model?: any;
1362
1369
  lang?: string;
1370
+ as?: React.ComponentType<any>;
1363
1371
  extraBefore?: React.ReactNode;
1364
1372
  extraAfter?: React.ReactNode;
1365
- as?: React.ComponentType<any>;
1366
1373
  asProps?: any;
1367
1374
  actions?: string[];
1368
1375
  };
1369
- declare const AcTableLinks: FC<AcTableLinksProps>;
1376
+ declare const AcCardExtras: FC<AcCardExtrasProps>;
1370
1377
 
1371
1378
  /**
1372
- * @Author: aric 1290657123@qq.com
1373
- * @Date: 2025-10-24 20:40:55
1379
+ * @Author: aric.zheng 1290657123@qq.com
1380
+ * @Date: 2025-10-29 10:54:41
1374
1381
  * @LastEditors: aric 1290657123@qq.com
1375
- * @LastEditTime: 2025-10-31 14:07:56
1382
+ * @LastEditTime: 2025-10-31 08:32:21
1376
1383
  */
1377
1384
 
1378
1385
  declare global {
1379
1386
  interface NxStatic {
1380
1387
  $event: any;
1388
+ $api: Record<string, any>;
1381
1389
  }
1382
1390
  }
1383
- type AcCardExtrasProps = SpaceProps & {
1391
+ type AcExtraSearchProps = SearchProps & {
1384
1392
  name: string;
1385
1393
  lang?: string;
1386
- as?: React.ComponentType<any>;
1387
- extraBefore?: React.ReactNode;
1388
- extraAfter?: React.ReactNode;
1389
- asProps?: any;
1390
- actions?: string[];
1394
+ queryKey?: string;
1395
+ routerType?: 'hash' | 'browser';
1391
1396
  };
1392
- declare const AcCardExtras: FC<AcCardExtrasProps>;
1393
-
1394
- declare const initWidgets: (names?: string[] | null, externalWidgets?: Record<string, ReactComponent>) => void;
1397
+ declare const AcExtraSearch: FC<AcExtraSearchProps>;
1395
1398
 
1396
1399
  /**
1397
1400
  * @Author: aric 1290657123@qq.com
@@ -1427,26 +1430,24 @@ declare const FormActions: React.ForwardRefExoticComponent<SpaceProps & {
1427
1430
  asProps?: any;
1428
1431
  } & React.RefAttributes<HTMLDivElement>>;
1429
1432
 
1430
- /**
1431
- * @Author: aric.zheng 1290657123@qq.com
1432
- * @Date: 2025-10-29 10:54:41
1433
- * @LastEditors: aric 1290657123@qq.com
1434
- * @LastEditTime: 2025-10-31 08:32:21
1435
- */
1433
+ declare const initWidgets: (names?: string[] | null, externalWidgets?: Record<string, ReactComponent>) => void;
1436
1434
 
1437
1435
  declare global {
1438
1436
  interface NxStatic {
1439
1437
  $event: any;
1440
- $api: Record<string, any>;
1441
1438
  }
1442
1439
  }
1443
- type AcExtraSearchProps = SearchProps & {
1440
+ type AcTableLinksProps = {
1444
1441
  name: string;
1442
+ model?: any;
1445
1443
  lang?: string;
1446
- queryKey?: string;
1447
- routerType?: 'hash' | 'browser';
1444
+ extraBefore?: React.ReactNode;
1445
+ extraAfter?: React.ReactNode;
1446
+ as?: React.ComponentType<any>;
1447
+ asProps?: any;
1448
+ actions?: string[];
1448
1449
  };
1449
- declare const AcExtraSearch: FC<AcExtraSearchProps>;
1450
+ declare const AcTableLinks: FC<AcTableLinksProps>;
1450
1451
 
1451
1452
  declare global {
1452
1453
  interface NxStatic {
@@ -1488,6 +1489,21 @@ type AcTableToggleSwitcherProps = SwitchProps & {
1488
1489
  };
1489
1490
  declare const AcTableToggleSwitcher: FC<AcTableToggleSwitcherProps>;
1490
1491
 
1492
+ type ExecuteFn = (command: string, data?: any) => void;
1493
+ type ListenFn = (command: string, callback: any) => void;
1494
+ type Payload = Record<string, any>;
1495
+ declare const useCommand: (inName?: string) => {
1496
+ listen: ListenFn;
1497
+ execute: ExecuteFn;
1498
+ load: (payload: Payload) => void;
1499
+ refetch: () => void;
1500
+ reset: () => void;
1501
+ add: () => void;
1502
+ edit: () => void;
1503
+ destroy: () => void;
1504
+ draft: (payload: Payload) => void;
1505
+ };
1506
+
1491
1507
  /**
1492
1508
  * @Author: aric 1290657123@qq.com
1493
1509
  * @Date: 2025-10-18 07:09:31
@@ -1513,4 +1529,4 @@ declare const BtnCancel: FC<AcButtonProps>;
1513
1529
  declare const BtnSync: FC<AcButtonProps>;
1514
1530
  declare const BtnCopy: FC<AcButtonProps>;
1515
1531
 
1516
- export { AcBreadcrumb, type AcBreadcrumbProps, AcCardExtras, type AcCardExtrasProps, AcCheckableDropdown, type AcCheckableDropdownProps, AcCheckableTag, AcCheckableTagFc, AcCheckableTagList, AcCheckableTagListFc, type AcCheckableTagListProps, type AcCheckableTagProps, AcCheckbox, AcCheckboxFc, AcCheckboxGroup, AcCheckboxGroupFc, type AcCheckboxGroupProps, type AcCheckboxProps, AcCodeFlask, AcCodeFlaskFc, AcConfirmButton, type AcConfirmButtonProps, AcDatePicker, AcDatePickerFc, type AcDatePickerProps, AcEditableTagGroup, AcEditableTagGroupFc, type AcEditableTagGroupProps, AcExtraSearch, type AcExtraSearchProps, AcInput, AcInputFc, AcInputHidden, AcInputHiddenFc, AcInputNumber, AcInputNumberFc, type AcInputNumberProps, type AcInputProps, AcInputTags, AcInputTagsFc, type AcInputTagsProps, AcInputToken, AcInputTokenFc, type AcInputTokenProps, AcPreSelect, AcPreSelectFc, type AcPreSelectProps, AcRadioGroup, AcRadioGroupFc, type AcRadioGroupProps, AcRangePicker, AcRangePickerFc, type AcRangePickerProps, AcRate, AcRateFc, type AcRateProps, AcSearch, AcSearchFc, type AcSearchProps, AcSelect, AcSelectFc, type AcSelectProps, AcSlider, AcSliderFc, type AcSliderProps, AcSliderRange, AcSliderRangeFc, type AcSliderRangeProps, AcSwitch, AcSwitchFc, type AcSwitchProps, AcTable, AcTableLinks, type AcTableLinksProps, type AcTableProps, AcTableStatusSwitcher, type AcTableStatusSwitcherProps, AcTableToggleSwitcher, type AcTableToggleSwitcherProps, AcTextarea, AcTextareaFc, type AcTextareaProps, AcTimePicker, AcTimePickerFc, type AcTimePickerProps, AcTransfer, AcTransferFc, type AcTransferProps, AcTree, type AcTreeProps, AcTreeSelect, AcTreeSelectFc, type AcTreeSelectProps, AcUpload, AcUploadDragger, AcUploadDraggerFc, type AcUploadDraggerProps, AcUploadFc, AcUploadPicture, AcUploadPictureCard, AcUploadPictureCardFc, AcUploadPictureFc, type AcUploadProps, BtnBack, BtnCancel, BtnCopy, BtnCreate, BtnDelete, BtnEdit, BtnExport, BtnImport, BtnPreview, BtnRefresh, BtnSave, BtnSubmit, BtnSync, BtnView, FormActions, type FormActionsProps, breadcrumbDefault, checkboxKv, checkboxRaw, initWidgets, kv, radioKv, radioRaw, raw, selectKv, selectRaw, transferLabel, treeKv, treeSelectKv, useCommand as useTableCommand };
1532
+ export { AcBreadcrumb, type AcBreadcrumbProps, AcCardExtras, type AcCardExtrasProps, AcCheckableDropdown, type AcCheckableDropdownProps, AcCheckableTag, AcCheckableTagFc, AcCheckableTagList, AcCheckableTagListFc, type AcCheckableTagListProps, type AcCheckableTagProps, AcCheckbox, AcCheckboxFc, AcCheckboxGroup, AcCheckboxGroupFc, type AcCheckboxGroupProps, type AcCheckboxProps, AcCodeFlask, AcCodeFlaskFc, AcConfirmButton, type AcConfirmButtonProps, AcDatePicker, AcDatePickerFc, type AcDatePickerProps, AcEditableTagGroup, AcEditableTagGroupFc, type AcEditableTagGroupProps, AcExtraSearch, type AcExtraSearchProps, AcInput, AcInputCopyable, AcInputCopyableFc, AcInputFc, AcInputHidden, AcInputHiddenFc, AcInputNumber, AcInputNumberFc, type AcInputNumberProps, type AcInputProps, AcInputTags, AcInputTagsFc, type AcInputTagsProps, AcInputToken, AcInputTokenFc, type AcInputTokenProps, AcPreSelect, AcPreSelectFc, type AcPreSelectProps, AcRadioGroup, AcRadioGroupFc, type AcRadioGroupProps, AcRangePicker, AcRangePickerFc, type AcRangePickerProps, AcRate, AcRateFc, type AcRateProps, AcSearch, AcSearchFc, type AcSearchProps, AcSelect, AcSelectFc, type AcSelectProps, AcSlider, AcSliderFc, type AcSliderProps, AcSliderRange, AcSliderRangeFc, type AcSliderRangeProps, AcSwitch, AcSwitchFc, type AcSwitchProps, AcTable, AcTableLinks, type AcTableLinksProps, type AcTableProps, AcTableStatusSwitcher, type AcTableStatusSwitcherProps, AcTableToggleSwitcher, type AcTableToggleSwitcherProps, AcTextarea, AcTextareaFc, type AcTextareaProps, AcTimePicker, AcTimePickerFc, type AcTimePickerProps, AcTransfer, AcTransferFc, type AcTransferProps, AcTree, type AcTreeProps, AcTreeSelect, AcTreeSelectFc, type AcTreeSelectProps, AcUpload, AcUploadDragger, AcUploadDraggerFc, type AcUploadDraggerProps, AcUploadFc, AcUploadPicture, AcUploadPictureCard, AcUploadPictureCardFc, AcUploadPictureFc, type AcUploadProps, BtnBack, BtnCancel, BtnCopy, BtnCreate, BtnDelete, BtnEdit, BtnExport, BtnImport, BtnPreview, BtnRefresh, BtnSave, BtnSubmit, BtnSync, BtnView, FormActions, type FormActionsProps, breadcrumbDefault, checkboxKv, checkboxRaw, initWidgets, kv, radioKv, radioRaw, raw, selectKv, selectRaw, transferLabel, treeKv, treeSelectKv, useCommand as useTableCommand };