@jswork/antd-components 1.0.210 → 1.0.211

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,5 +1,5 @@
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';
@@ -19,60 +19,6 @@ import { UploadChangeParam } from 'antd/es/upload/interface';
19
19
  import { ReactComponent } from '@ebay/nice-form-react';
20
20
  import { ReactAntStatusSwitchProps } from '@jswork/react-ant-status-switch/dist/components';
21
21
 
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
22
  type StdEventTarget$q = {
77
23
  target: {
78
24
  value: any;
@@ -478,6 +424,20 @@ declare class AcInput extends React.Component<AcInputProps> {
478
424
  }
479
425
  declare const AcInputFc: (props: AcInputProps) => React.JSX.Element;
480
426
 
427
+ interface AcInputCopyableState {
428
+ value?: string;
429
+ }
430
+ declare class AcInputCopyable extends React.Component<AcInputProps, AcInputCopyableState> {
431
+ static displayName: string;
432
+ static formSchema: string;
433
+ static defaultProps: {};
434
+ constructor(props: any);
435
+ get copyView(): React.JSX.Element;
436
+ handleInputChange: (e: any) => void;
437
+ render(): React.JSX.Element;
438
+ }
439
+ declare const AcInputCopyableFc: (props: AcInputProps) => React.JSX.Element;
440
+
481
441
  declare class AcInputHidden extends React.Component {
482
442
  static displayName: string;
483
443
  static formSchema: string;
@@ -1216,12 +1176,39 @@ type StdEventTarget$2 = {
1216
1176
  };
1217
1177
  type StdCallback$2 = (inEvent: StdEventTarget$2) => void;
1218
1178
  type CustomRequest$1 = (inEvent: any) => Promise<any>;
1179
+ type AcUploadProps = {
1180
+ className?: string;
1181
+ value?: number;
1182
+ onChange?: StdCallback$2;
1183
+ onRequest?: CustomRequest$1;
1184
+ btnProps?: ButtonProps;
1185
+ } & UploadProps;
1186
+ declare class AcUpload extends React.Component<AcUploadProps> {
1187
+ static displayName: string;
1188
+ static formSchema: string;
1189
+ static defaultProps: {
1190
+ onChange: any;
1191
+ onRequest: (inEvent: any) => Promise<any>;
1192
+ };
1193
+ handleChange: (inEvent: any) => void;
1194
+ handleCustomRequest: (inRequestOption: any) => void;
1195
+ render(): React.JSX.Element;
1196
+ }
1197
+ declare const AcUploadFc: (props: AcUploadProps) => React.JSX.Element;
1198
+
1199
+ type StdEventTarget$1 = {
1200
+ target: {
1201
+ value: any;
1202
+ };
1203
+ };
1204
+ type StdCallback$1 = (inEvent: StdEventTarget$1) => void;
1205
+ type CustomRequest = (inEvent: any) => Promise<any>;
1219
1206
  type AcUploadDraggerProps = {
1220
1207
  className?: string;
1221
1208
  value?: any[];
1222
1209
  defaultValue?: any[];
1223
- onChange?: StdCallback$2;
1224
- onRequest?: CustomRequest$1;
1210
+ onChange?: StdCallback$1;
1211
+ onRequest?: CustomRequest;
1225
1212
  } & DraggerProps;
1226
1213
  declare class AcUploadDragger extends React.Component<AcUploadDraggerProps> {
1227
1214
  static displayName: string;
@@ -1236,16 +1223,16 @@ declare class AcUploadDragger extends React.Component<AcUploadDraggerProps> {
1236
1223
  }
1237
1224
  declare const AcUploadDraggerFc: (props: AcUploadDraggerProps) => React.JSX.Element;
1238
1225
 
1239
- type StdEventTarget$1 = {
1226
+ type StdEventTarget = {
1240
1227
  target: {
1241
1228
  value: any;
1242
1229
  };
1243
1230
  };
1244
- type StdCallback$1 = (inEvent: StdEventTarget$1) => void;
1231
+ type StdCallback = (inEvent: StdEventTarget) => void;
1245
1232
  type AcAbstractUploadProps = {
1246
1233
  className?: string;
1247
1234
  value?: any[] | [];
1248
- onChange?: StdCallback$1;
1235
+ onChange?: StdCallback;
1249
1236
  transformResponse?: (inResponse: any) => any;
1250
1237
  transformURL?: (inPid: any) => string;
1251
1238
  } & DraggerProps;
@@ -1298,32 +1285,59 @@ declare class AcUploadPictureCard extends AcAbstractUpload {
1298
1285
  }
1299
1286
  declare const AcUploadPictureCardFc: (props: any) => React.JSX.Element;
1300
1287
 
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;
1288
+ declare const breadcrumbDefault: ({ item, index, items }: {
1289
+ item: any;
1290
+ index: any;
1291
+ items: any;
1292
+ }) => React.JSX.Element;
1293
+
1294
+ interface Options$1 {
1295
+ component: React.ComponentType<any>;
1296
+ value?: string;
1297
+ label?: string;
1298
+ [key: string]: any;
1325
1299
  }
1326
- declare const AcUploadFc: (props: AcUploadProps) => React.JSX.Element;
1300
+ /**
1301
+ * KV component template, for key-value pair.
1302
+ * @param item
1303
+ * @param index
1304
+ * @param options
1305
+ */
1306
+ declare const kv: ({ item, index }: {
1307
+ item: any;
1308
+ index: any;
1309
+ }, options: Options$1) => React.JSX.Element;
1310
+ declare const checkboxKv: (args: any) => React.JSX.Element;
1311
+ declare const selectKv: (args: any) => React.JSX.Element;
1312
+ declare const radioKv: (args: any, opts: any) => React.JSX.Element;
1313
+ declare const treeKv: ({ item }: {
1314
+ item: any;
1315
+ }, cb: any) => React.JSX.Element;
1316
+ declare const treeSelectKv: ({ item }: {
1317
+ item: any;
1318
+ }, cb: any) => React.JSX.Element;
1319
+
1320
+ interface Options {
1321
+ component: React.ComponentType<any>;
1322
+ [key: string]: any;
1323
+ }
1324
+ /**
1325
+ * Raw component template, for array of items.
1326
+ * @param item
1327
+ * @param index
1328
+ * @param options
1329
+ */
1330
+ declare const raw: ({ item, index }: {
1331
+ item: any;
1332
+ index: any;
1333
+ }, options: Options) => React.JSX.Element;
1334
+ declare const checkboxRaw: (args: any) => React.JSX.Element;
1335
+ declare const selectRaw: (args: any) => React.JSX.Element;
1336
+ declare const radioRaw: (args: any, opts: any) => React.JSX.Element;
1337
+
1338
+ declare const transferLabel: ({ item }: {
1339
+ item: any;
1340
+ }, options?: any) => React.ReactNode;
1327
1341
 
1328
1342
  declare global {
1329
1343
  interface NxStatic {
@@ -1336,62 +1350,49 @@ declare global {
1336
1350
  }
1337
1351
  }
1338
1352
 
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
- };
1353
+ /**
1354
+ * @Author: aric 1290657123@qq.com
1355
+ * @Date: 2025-10-24 20:40:55
1356
+ * @LastEditors: aric 1290657123@qq.com
1357
+ * @LastEditTime: 2025-10-31 14:07:56
1358
+ */
1353
1359
 
1354
1360
  declare global {
1355
1361
  interface NxStatic {
1356
1362
  $event: any;
1357
1363
  }
1358
1364
  }
1359
- type AcTableLinksProps = {
1365
+ type AcCardExtrasProps = SpaceProps & {
1360
1366
  name: string;
1361
- model?: any;
1362
1367
  lang?: string;
1368
+ as?: React.ComponentType<any>;
1363
1369
  extraBefore?: React.ReactNode;
1364
1370
  extraAfter?: React.ReactNode;
1365
- as?: React.ComponentType<any>;
1366
1371
  asProps?: any;
1367
1372
  actions?: string[];
1368
1373
  };
1369
- declare const AcTableLinks: FC<AcTableLinksProps>;
1374
+ declare const AcCardExtras: FC<AcCardExtrasProps>;
1370
1375
 
1371
1376
  /**
1372
- * @Author: aric 1290657123@qq.com
1373
- * @Date: 2025-10-24 20:40:55
1377
+ * @Author: aric.zheng 1290657123@qq.com
1378
+ * @Date: 2025-10-29 10:54:41
1374
1379
  * @LastEditors: aric 1290657123@qq.com
1375
- * @LastEditTime: 2025-10-31 14:07:56
1380
+ * @LastEditTime: 2025-10-31 08:32:21
1376
1381
  */
1377
1382
 
1378
1383
  declare global {
1379
1384
  interface NxStatic {
1380
1385
  $event: any;
1386
+ $api: Record<string, any>;
1381
1387
  }
1382
1388
  }
1383
- type AcCardExtrasProps = SpaceProps & {
1389
+ type AcExtraSearchProps = SearchProps & {
1384
1390
  name: string;
1385
1391
  lang?: string;
1386
- as?: React.ComponentType<any>;
1387
- extraBefore?: React.ReactNode;
1388
- extraAfter?: React.ReactNode;
1389
- asProps?: any;
1390
- actions?: string[];
1392
+ queryKey?: string;
1393
+ routerType?: 'hash' | 'browser';
1391
1394
  };
1392
- declare const AcCardExtras: FC<AcCardExtrasProps>;
1393
-
1394
- declare const initWidgets: (names?: string[] | null, externalWidgets?: Record<string, ReactComponent>) => void;
1395
+ declare const AcExtraSearch: FC<AcExtraSearchProps>;
1395
1396
 
1396
1397
  /**
1397
1398
  * @Author: aric 1290657123@qq.com
@@ -1427,26 +1428,24 @@ declare const FormActions: React.ForwardRefExoticComponent<SpaceProps & {
1427
1428
  asProps?: any;
1428
1429
  } & React.RefAttributes<HTMLDivElement>>;
1429
1430
 
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
- */
1431
+ declare const initWidgets: (names?: string[] | null, externalWidgets?: Record<string, ReactComponent>) => void;
1436
1432
 
1437
1433
  declare global {
1438
1434
  interface NxStatic {
1439
1435
  $event: any;
1440
- $api: Record<string, any>;
1441
1436
  }
1442
1437
  }
1443
- type AcExtraSearchProps = SearchProps & {
1438
+ type AcTableLinksProps = {
1444
1439
  name: string;
1440
+ model?: any;
1445
1441
  lang?: string;
1446
- queryKey?: string;
1447
- routerType?: 'hash' | 'browser';
1442
+ extraBefore?: React.ReactNode;
1443
+ extraAfter?: React.ReactNode;
1444
+ as?: React.ComponentType<any>;
1445
+ asProps?: any;
1446
+ actions?: string[];
1448
1447
  };
1449
- declare const AcExtraSearch: FC<AcExtraSearchProps>;
1448
+ declare const AcTableLinks: FC<AcTableLinksProps>;
1450
1449
 
1451
1450
  declare global {
1452
1451
  interface NxStatic {
@@ -1488,6 +1487,21 @@ type AcTableToggleSwitcherProps = SwitchProps & {
1488
1487
  };
1489
1488
  declare const AcTableToggleSwitcher: FC<AcTableToggleSwitcherProps>;
1490
1489
 
1490
+ type ExecuteFn = (command: string, data?: any) => void;
1491
+ type ListenFn = (command: string, callback: any) => void;
1492
+ type Payload = Record<string, any>;
1493
+ declare const useCommand: (inName?: string) => {
1494
+ listen: ListenFn;
1495
+ execute: ExecuteFn;
1496
+ load: (payload: Payload) => void;
1497
+ refetch: () => void;
1498
+ reset: () => void;
1499
+ add: () => void;
1500
+ edit: () => void;
1501
+ destroy: () => void;
1502
+ draft: (payload: Payload) => void;
1503
+ };
1504
+
1491
1505
  /**
1492
1506
  * @Author: aric 1290657123@qq.com
1493
1507
  * @Date: 2025-10-18 07:09:31
@@ -1513,4 +1527,4 @@ declare const BtnCancel: FC<AcButtonProps>;
1513
1527
  declare const BtnSync: FC<AcButtonProps>;
1514
1528
  declare const BtnCopy: FC<AcButtonProps>;
1515
1529
 
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 };
1530
+ 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 };