synos-helena 21.11.1 → 21.11.2

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 CHANGED
@@ -44,6 +44,7 @@ import { CheckboxChangeEvent } from 'antd/lib/checkbox';
44
44
  import { SyntaxHighlighterProps } from 'react-syntax-highlighter';
45
45
  import { CollapseProps } from 'antd/lib/collapse';
46
46
  import { CollapsePanelProps } from 'antd/lib/collapse';
47
+ import React from 'react';
47
48
  import { DATE_TIME, DATE } from 'src/util/constants';
48
49
  import { HLInputPropTypes } from 'src/HLInput';
49
50
  import { SizeType } from 'antd/lib/config-provider/SizeContext';
@@ -55,7 +56,7 @@ import { DescriptionsProps } from 'antd/lib/descriptions';
55
56
  import { DividerProps } from 'antd/lib/divider';
56
57
  import { DrawerProps } from 'antd/lib/drawer';
57
58
  import { DropDownProps } from 'antd/lib/dropdown';
58
- import { TableProps } from "antd";
59
+ import { TableProps } from 'antd';
59
60
  import { Form } from 'antd';
60
61
  import { ReactNode } from 'react';
61
62
  import { HLHeaderButtonPropTypes } from 'src/HLHeaderButton';
@@ -102,6 +103,7 @@ export type HLButtonPropTypes = ButtonProps & {
102
103
  premium?: boolean;
103
104
  tooltip?: string;
104
105
  borderless?: boolean;
106
+ 'data-cy'?: string;
105
107
  };
106
108
 
107
109
  export const HLButton: React.FC<HLButtonPropTypes>;
@@ -194,7 +196,7 @@ export interface HLContextPropTypes {
194
196
  serie?: Record<string, any>;
195
197
  series?: any[];
196
198
  format?: string;
197
- onApply?: Function;
199
+ onApply?: (estabelecimento: any, format: 'YYYY-MM-DDTHH:mm:ss' | 'YYYY-MM-DD' | null, serie: any) => any | undefined;
198
200
  periodo?: number;
199
201
  width?: any;
200
202
  useISOFormat: 'YYYY-MM-DDTHH:mm:ss' | 'YYYY-MM-DD';
@@ -218,15 +220,15 @@ export type DatePickerProps = {
218
220
  } & PickerProps<Dayjs | Moment>;
219
221
 
220
222
  export type HLDatePickerPropTypes = DatePickerProps & {
221
- disableDateAfterThan?: Object;
222
- disableDateBeforeThan?: Object;
223
+ disableDateAfterThan?: Record<string, unknown>;
224
+ disableDateBeforeThan?: Record<string, unknown>;
223
225
  disableDateRange?: any[];
224
226
  disabled?: boolean;
225
227
  form?: any;
226
228
  initialValue?: any;
227
229
  domainAttribute: string;
228
230
  label?: string;
229
- onChange?: Function;
231
+ onChange?: (date: moment, dateString: string) => void;
230
232
  placeholder?: string;
231
233
  rules?: any[];
232
234
  size?: SizeType;
@@ -250,7 +252,7 @@ export type HLMonthPickerProps = DatePickerProps & {
250
252
  domainAttribute: string;
251
253
  form?: Record<string, any>;
252
254
  label?: string;
253
- onChange?: Function;
255
+ onChange?: (value: Dayjs | moment.Moment | null, dateString: string) => void;
254
256
  rules?: any[];
255
257
  key?: any;
256
258
  format?: string;
@@ -268,7 +270,7 @@ export type HLRangePickerProps = RangeDatePickerProps & {
268
270
  domainAttribute: string;
269
271
  form?: any;
270
272
  label?: string;
271
- onChange?: Function;
273
+ onChange?: (value: Dayjs | moment.Moment | null, dateString: string) => void;
272
274
  rules?: any[];
273
275
  key?: any;
274
276
  format?: string;
@@ -303,13 +305,14 @@ export type HLDropdownPropTypes = DropDownProps & {
303
305
 
304
306
  export const HLDropdown: React.FC<HLDropdownPropTypes>;
305
307
 
308
+
306
309
  interface Menu {
307
310
  divider?: boolean;
308
311
  label?: string;
309
312
  link?: string;
310
313
  disabled?: boolean;
311
314
  query?: string;
312
- onClick?: Function;
315
+ onClick?: React.MouseEvent<HTMLElement>;
313
316
  }
314
317
  export interface HLDropdownButtonPropTypes {
315
318
  menus: Menu[];
@@ -324,7 +327,7 @@ export const HLDropdownButton: React.FC<HLDropdownButtonPropTypes>;
324
327
 
325
328
  export type HLEditTablePropTypes = TableProps & {
326
329
  handleSave: (row: any) => void;
327
- }
330
+ };
328
331
  export const HLEditTable: React.FC<HLEditTablePropTypes>;
329
332
 
330
333
  export interface Page500PropTypes {
@@ -357,13 +360,13 @@ export type HLFromToPanelTypes<P> = {
357
360
  };
358
361
  table?: {
359
362
  loading?: boolean;
360
- columns: object[];
361
- dataSource: object[];
362
- loadMore?: object;
363
+ columns: Record<string, unknown>;
364
+ dataSource: Record<string, unknown>[];
365
+ loadMore?: Record<string, unknown>;
363
366
  onSelect?: (selectedRows?: P | P[]) => void;
364
367
  };
365
368
  powerSearch?: {
366
- columns: object[];
369
+ columns: Record<string, unknown>;
367
370
  onSubmit: (params) => void;
368
371
  };
369
372
  custom?: {
@@ -377,7 +380,7 @@ export type HLFromToPanelTypes<P> = {
377
380
  export interface HLHeaderPropTypes {
378
381
  children: ReactNode;
379
382
  collapsed: boolean;
380
- collapsedClick: Function;
383
+ collapsedClick: () => unknown;
381
384
  headerSearch?: HLHeaderSearchPropTypes;
382
385
  moduleName: string;
383
386
  modulesMenu?: HLModulesMenuPropTypes;
@@ -399,7 +402,7 @@ export interface HLHeaderButtonPropTypes {
399
402
  export const HLHeaderButton: React.FC<HLHeaderButtonPropTypes>;
400
403
 
401
404
  export interface HLHeaderSearchPropTypes {
402
- onSubmit: Function;
405
+ onSubmit: (unknown) => unknown;
403
406
  }
404
407
 
405
408
  export const HLHeaderSearch: React.FC<HLHeaderSearchPropTypes>;
@@ -410,6 +413,7 @@ export interface HLInputPropTypes {
410
413
  label?: string;
411
414
  disabled?: boolean;
412
415
  domainAttribute: string;
416
+ 'data-cy'?: string;
413
417
  form?: Record<string, any>;
414
418
  initialValue?: string | number;
415
419
  onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -419,8 +423,12 @@ export interface HLInputPropTypes {
419
423
  maxLength?: number;
420
424
  onPressEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
421
425
  ref?: ((instance: Input | null) => void) | React.RefObject<Input> | null;
422
- onValueFromEvent?: Function;
426
+ onValueFromEvent?: (unknown) => unknown;
423
427
  style?: React.CSSProperties;
428
+ autoComplete?: string;
429
+ readOnly?: boolean;
430
+ onFocus?: (unknown) => unknown | undefined;
431
+ onBlur?: (unknown) => unknown | undefined;
424
432
  }
425
433
 
426
434
  interface HLInputChildren {
@@ -494,12 +502,12 @@ interface Notification {
494
502
  date: number;
495
503
  isVisualized: boolean;
496
504
  link?: string;
497
- onClick?: Function;
505
+ onClick?: React.MouseEvent<HTMLElement>;
498
506
  }
499
507
 
500
508
  export interface HLNotificationPropTypes {
501
509
  buttonLabel?: string;
502
- onClearNotification?: Function;
510
+ onClearNotification?: () => any;
503
511
  title?: string;
504
512
  placement?:
505
513
  | 'bottom'
@@ -531,12 +539,12 @@ interface Notification {
531
539
  date: number;
532
540
  isVisualized: boolean;
533
541
  link?: string;
534
- onClick?: Function;
542
+ onClick?: React.MouseEvent<HTMLElement>;
535
543
  }
536
544
 
537
545
  export interface NotificationListPropTypes {
538
546
  Link?: Link;
539
- onClickNotification?: Function;
547
+ onClickNotification?: (unknown) => any;
540
548
  notifications?: Notification[];
541
549
  useDayjs?: boolean;
542
550
  }
@@ -547,7 +555,7 @@ export const NotificationList: React.FC<NotificationListPropTypes>;
547
555
  interface Context {
548
556
  label: string;
549
557
  value?: any;
550
- render?: Function;
558
+ render?: (unknown) => unknown;
551
559
  }
552
560
 
553
561
  interface ContextInfo {
@@ -633,11 +641,11 @@ export interface HLSideMenuPropTypes {
633
641
  collapsed: boolean;
634
642
  location: any;
635
643
  subMenus: any[];
636
- changeOpenKeys: Function;
637
- onOpenChange: Function;
638
- generateLink: Function;
639
- allowsAccessByUrl: Function;
640
- changeCollapsedState: Function;
644
+ changeOpenKeys: (unknown) => unknown;
645
+ onOpenChange: (unknown) => unknown;
646
+ generateLink: (unknown, unknown, unknown) => any;
647
+ allowsAccessByUrl: (unknown) => unknown;
648
+ changeCollapsedState: (unknown) => unknown;
641
649
  openKeys: any[];
642
650
  baseboardLogoPath?: string;
643
651
  baseboardText?: string;
@@ -707,7 +715,7 @@ interface User {
707
715
  export interface HLUserBoxPropTypes {
708
716
  options?: any[];
709
717
  user?: User;
710
- logout?: Function;
718
+ logout?: (unknown) => unknown;
711
719
  tenant?: string;
712
720
  moduleInfo?: ModuleInfo;
713
721
  sysStatus?: any;
@@ -774,6 +782,7 @@ export interface HLInputPropTypes {
774
782
  label?: string;
775
783
  disabled?: boolean;
776
784
  domainAttribute: string;
785
+ 'data-cy'?: string;
777
786
  form?: Record<string, any>;
778
787
  initialValue?: string | number;
779
788
  onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -783,8 +792,12 @@ export interface HLInputPropTypes {
783
792
  maxLength?: number;
784
793
  onPressEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
785
794
  ref?: ((instance: Input | null) => void) | React.RefObject<Input> | null;
786
- onValueFromEvent?: Function;
795
+ onValueFromEvent?: (unknown) => unknown;
787
796
  style?: React.CSSProperties;
797
+ autoComplete?: string;
798
+ readOnly?: boolean;
799
+ onFocus?: (unknown) => unknown | undefined;
800
+ onBlur?: (unknown) => unknown | undefined;
788
801
  }
789
802
 
790
803
  interface HLInputChildren {