enwawa-ui 1.7.1 → 1.9.0
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/lib/index.d.ts +127 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.es.js +173 -7
- package/lib/index.es.js.map +1 -1
- package/lib/index.js +171 -5
- package/lib/index.js.map +1 -1
- package/package.json +4 -3
package/lib/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import * as Icons from "@ant-design/icons";
|
|
|
7
7
|
import { ValueType } from "@rc-component/mini-decimal";
|
|
8
8
|
import { RadioChangeEvent } from "antd/es/radio";
|
|
9
9
|
import { DefaultOptionType, LabeledValue } from "antd/es/select";
|
|
10
|
+
import { SwitchProps } from "antd/lib";
|
|
10
11
|
import { BlockProps, EllipsisConfig, BaseType } from "antd/es/typography/Base";
|
|
11
12
|
import { DotPosition } from "antd/es/carousel";
|
|
12
13
|
import { CheckboxGroupProps } from "antd/es/checkbox/Group";
|
|
@@ -297,6 +298,101 @@ export interface AtDatePickerPros {
|
|
|
297
298
|
$width?: string;
|
|
298
299
|
}
|
|
299
300
|
export const AtDatePicker: React.FC<AtDatePickerPros>;
|
|
301
|
+
export interface AtDateRangePickerProps {
|
|
302
|
+
/**
|
|
303
|
+
* If true, the date picker will be disabled
|
|
304
|
+
*/
|
|
305
|
+
disabled?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Whether to show clear button
|
|
308
|
+
*/
|
|
309
|
+
allowClear?: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* If get focus when component mounted
|
|
312
|
+
*/
|
|
313
|
+
autoFocus?: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* Whether has border style
|
|
316
|
+
*/
|
|
317
|
+
bordered?: boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Trigger change when blur. e.g. datetime picker no need click confirm button
|
|
320
|
+
*/
|
|
321
|
+
changeOnBlur?: boolean;
|
|
322
|
+
/**
|
|
323
|
+
* Specify the date that cannot be selected
|
|
324
|
+
*/
|
|
325
|
+
disabledDate?: (currentDate: Dayjs) => boolean;
|
|
326
|
+
/**
|
|
327
|
+
* To set the date format, support multi-format matching when it is an array, display the first one shall prevail. refer to dayjs#format. for example: Custom Format
|
|
328
|
+
*/
|
|
329
|
+
format?: string | string[];
|
|
330
|
+
/**
|
|
331
|
+
* Set the readonly attribute of the input tag (avoids virtual keyboard on touch devices)
|
|
332
|
+
*/
|
|
333
|
+
inputReadOnly?: boolean;
|
|
334
|
+
/**
|
|
335
|
+
* Localization configuration
|
|
336
|
+
*/
|
|
337
|
+
locale?: DatePickerProps['locale'];
|
|
338
|
+
/**
|
|
339
|
+
* The picker panel mode( Cannot select year or month anymore? )
|
|
340
|
+
*/
|
|
341
|
+
mode?: 'time' | 'date' | 'month' | 'year' | 'decade';
|
|
342
|
+
/**
|
|
343
|
+
* The open state of picker
|
|
344
|
+
*/
|
|
345
|
+
open?: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* Set picker type
|
|
348
|
+
*/
|
|
349
|
+
picker?: DatePickerProps['picker'];
|
|
350
|
+
/**
|
|
351
|
+
* Placeholder of the input
|
|
352
|
+
*/
|
|
353
|
+
placeholder?: string;
|
|
354
|
+
/**
|
|
355
|
+
* The position where the selection box pops up
|
|
356
|
+
*/
|
|
357
|
+
placement?: DatePickerProps['placement'];
|
|
358
|
+
/**
|
|
359
|
+
* The preset ranges for quick selection
|
|
360
|
+
*/
|
|
361
|
+
presents?: DatePickerProps['presets'];
|
|
362
|
+
/**
|
|
363
|
+
* Show time on date
|
|
364
|
+
*/
|
|
365
|
+
showTime?: boolean;
|
|
366
|
+
/**
|
|
367
|
+
* To determine the size of the input box, the height of large and small, are 40px and 24px respectively, while default size is 32px
|
|
368
|
+
*/
|
|
369
|
+
size?: DatePickerProps['size'];
|
|
370
|
+
/**
|
|
371
|
+
* Set validation status
|
|
372
|
+
*/
|
|
373
|
+
status?: DatePickerProps['status'];
|
|
374
|
+
/**
|
|
375
|
+
* Callback function, can be executed whether the popup calendar is popped up or closed
|
|
376
|
+
*/
|
|
377
|
+
onOpenChange?: (status: boolean) => void;
|
|
378
|
+
/**
|
|
379
|
+
* Callback when picker panel mode is changed
|
|
380
|
+
*/
|
|
381
|
+
onPanelChange?: (value: Dayjs | null, mode: DatePickerProps['mode']) => void;
|
|
382
|
+
/**
|
|
383
|
+
* set format on 12h
|
|
384
|
+
*/
|
|
385
|
+
use12Hours?: boolean;
|
|
386
|
+
/**
|
|
387
|
+
* The computed style of the svg element
|
|
388
|
+
*/
|
|
389
|
+
style?: CSSProperties;
|
|
390
|
+
/**
|
|
391
|
+
* width of the input box
|
|
392
|
+
*/
|
|
393
|
+
$width?: string;
|
|
394
|
+
}
|
|
395
|
+
export const AtDateRangePicker: React.FC<AtDateRangePickerProps>;
|
|
300
396
|
export interface AtDividerProps {
|
|
301
397
|
/**
|
|
302
398
|
* The ID for input
|
|
@@ -901,6 +997,25 @@ export interface AtSelectProps {
|
|
|
901
997
|
$textColor?: 'white' | 'violet';
|
|
902
998
|
}
|
|
903
999
|
export const AtSelect: React.FC<AtSelectProps>;
|
|
1000
|
+
export interface AtSwitchProps extends SwitchProps {
|
|
1001
|
+
/**
|
|
1002
|
+
* Whether get focus when component mounted
|
|
1003
|
+
*/
|
|
1004
|
+
autoFocus?: boolean;
|
|
1005
|
+
/**
|
|
1006
|
+
* Determine whether the Switch is checked
|
|
1007
|
+
*/
|
|
1008
|
+
checked?: boolean;
|
|
1009
|
+
/**
|
|
1010
|
+
* Determine whether the Switch is checked
|
|
1011
|
+
*/
|
|
1012
|
+
disabled?: boolean;
|
|
1013
|
+
/**
|
|
1014
|
+
* Trigger when the checked state is changing
|
|
1015
|
+
*/
|
|
1016
|
+
onChange?: SwitchProps['onChange'];
|
|
1017
|
+
}
|
|
1018
|
+
export const AtSwitch: React.FC<AtSwitchProps>;
|
|
904
1019
|
export interface AtTagProps {
|
|
905
1020
|
/**
|
|
906
1021
|
* Custom close icon. 5.7.0: close button will be hidden when setting to null or false
|
|
@@ -2674,7 +2789,7 @@ export interface OrFormInLineItem {
|
|
|
2674
2789
|
/**
|
|
2675
2790
|
* Type of components available for the form
|
|
2676
2791
|
*/
|
|
2677
|
-
component: 'radio' | 'number-input' | 'checkbox' | 'select' | 'select-multiple' | 'text' | 'phone' | 'date-picker' | 'cvc' | 'name' | 'select-input' | 'info' | 'copy-info';
|
|
2792
|
+
component: 'radio' | 'number-input' | 'checkbox' | 'select' | 'select-multiple' | 'text' | 'phone' | 'date-picker' | 'date-range-picker' | 'cvc' | 'name' | 'select-input' | 'info' | 'copy-info';
|
|
2678
2793
|
/**
|
|
2679
2794
|
* Label of the field
|
|
2680
2795
|
*/
|
|
@@ -3348,6 +3463,17 @@ export interface TmCrudPageProps<RecordType = AnyObject, FormType = any> {
|
|
|
3348
3463
|
secondaryOnClick?: () => void;
|
|
3349
3464
|
}
|
|
3350
3465
|
export const TmCrudPage: <RecordType extends AnyObject, FormType extends Store>({ columns, data, loadingTable, formSteps, onValuesChange, onCloseLeftDrawer, leftDrawerContent, openLeftDrawer, subtitle, subContent, open, pageSize, currentPage, currentFormStep, titleLeftDrawer, leftDrawerWidth, drawerContent, showDrawerContent, showSearchBox, drawerTitle, drawerWidth, firstButtonText, secondButtonText, onClickFirstButton, onClickSecondButton, $margin, title, tableTitle, buttonAddText, addButtonOnClick, onChangePagination, total, showTotal, disabledButtons, searchBoxOnSearch, searchBoxPlaceholder, tableHeaderCustomLeftElements, pagination, handleCloseCallback, tableTitleLevel, secondaryButtonText, secondaryOnClick, }: TmCrudPageProps<RecordType, FormType>) => import("react/jsx-runtime").JSX.Element;
|
|
3466
|
+
export interface TmFormListPageProps<FormType = any> {
|
|
3467
|
+
formList?: {
|
|
3468
|
+
title?: string;
|
|
3469
|
+
formStepProps?: IFormStep<FormType>[];
|
|
3470
|
+
formProps?: OrFormProps;
|
|
3471
|
+
stepProps?: OrStepProp;
|
|
3472
|
+
disabledButtons?: boolean;
|
|
3473
|
+
formButtonProps?: AtButtonProps;
|
|
3474
|
+
}[];
|
|
3475
|
+
}
|
|
3476
|
+
export const TmFormListPage: <FormType extends Store>({ formList, }: TmFormListPageProps<FormType>) => import("react/jsx-runtime").JSX.Element;
|
|
3351
3477
|
export interface OrSimpleBannerProps {
|
|
3352
3478
|
/**
|
|
3353
3479
|
* Id of the OrSimpleBannerProps
|