@jitera/jitera-web-ui-library 1.68.0 → 1.69.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -8,17 +8,20 @@ In the project directory, you can run:
8
8
 
9
9
  Runs the storybook in the development mode.\
10
10
  Open [http://localhost:6006](http://localhost:6006) to view it in the browser.
11
+
11
12
  ```
12
13
  yarn storybook
13
14
  ```
14
15
 
15
16
  Format Code
17
+
16
18
  ```
17
19
  yarn lint
18
20
  yarn format
19
21
  ```
20
22
 
21
23
  Builds the app for publishing as NPM Package to the `dist` folder.
24
+
22
25
  ```
23
26
  yarn build
24
27
  ```
package/dist/index.css CHANGED
@@ -14,4 +14,4 @@
14
14
  /* src/components/atoms/HamburgerMenu/HamburgerMenu.module.css */
15
15
  .mca48d82cd_Wrapper {
16
16
  width: fit-content;
17
- }
17
+ }
package/dist/index.d.ts CHANGED
@@ -15,11 +15,11 @@ import {
15
15
  SpaceProps,
16
16
  CheckboxProps as CheckboxProps$1,
17
17
  UploadProps,
18
+ DatePickerProps,
18
19
  DrawerProps,
19
20
  TabsProps,
20
- ModalProps,
21
21
  PaginationProps,
22
- MessageArgsProps
22
+ ModalProps as ModalProps$1
23
23
  } from 'antd'
24
24
  export { CheckboxOptionType as RadioCheckboxOptionType } from 'antd'
25
25
  import * as react_icons_lib from 'react-icons/lib'
@@ -30,8 +30,7 @@ import { Props, OptionsOrGroups, GroupBase, SelectInstance } from 'react-select'
30
30
  export { SelectInstance as SelectRef } from 'react-select'
31
31
  import { TextAreaProps as TextAreaProps$1 } from 'antd/lib/input/TextArea'
32
32
  import { CheckboxGroupProps } from 'antd/lib/checkbox'
33
- import { Dayjs } from 'dayjs'
34
- import { PickerDateProps } from 'antd/lib/date-picker/generatePicker'
33
+ import moment from 'moment'
35
34
  import { Settings, ResponsiveObject } from 'react-slick'
36
35
  import {
37
36
  RowData,
@@ -43,7 +42,7 @@ import {
43
42
  } from '@tanstack/table-core'
44
43
  import { DragEndEvent } from '@dnd-kit/core'
45
44
  import { OtpInputProps } from 'react-otp-input'
46
- import * as antd_lib_message from 'antd/lib/message'
45
+ export { toast as Toast, ToastContainer, ToastContainerProps } from 'react-toastify'
47
46
  export { createColumnHelper } from '@tanstack/react-table'
48
47
  export { arrayMove } from '@dnd-kit/sortable'
49
48
 
@@ -353,11 +352,12 @@ declare enum PickerEnum {
353
352
  }
354
353
  interface DateTimePickerProps
355
354
  extends PreviewProps,
356
- ComponentProps<Omit<PickerDateProps<Dayjs>, 'picker' | 'defaultValue'>> {
355
+ ComponentProps<Omit<DatePickerProps, 'picker' | 'defaultValue' | 'value'>> {
357
356
  picker?: `${PickerEnum}`
358
357
  showTime?: boolean
359
358
  errorMessage?: string
360
- defaultValue?: Pick<PickerDateProps<Dayjs>, 'defaultValue'> | string
359
+ defaultValue?: string
360
+ value?: moment.Moment | string
361
361
  }
362
362
  declare const DateTimePicker: React.ForwardRefExoticComponent<
363
363
  DateTimePickerProps & React.RefAttributes<HTMLDivElement>
@@ -433,36 +433,6 @@ interface TabProps extends PreviewProps, ComponentProps<TabsProps> {
433
433
  }
434
434
  declare const Tab: React.ForwardRefExoticComponent<TabProps & React.RefAttributes<HTMLDivElement>>
435
435
 
436
- declare enum ModalPositionEnum {
437
- DEFAULT = 'default',
438
- TOP = 'top',
439
- CENTER = 'center'
440
- }
441
- interface ModalShowOptions
442
- extends Omit<
443
- ModalProps,
444
- | 'visible'
445
- | 'closable'
446
- | 'footer'
447
- | 'modalRender'
448
- | 'cancelText'
449
- | 'cancelButtonProps'
450
- | 'okText'
451
- | 'onOk'
452
- | 'okButtonProps'
453
- | 'okType'
454
- | 'title'
455
- | 'closeIcon'
456
- | 'bodyStyle'
457
- > {
458
- position?: `${ModalPositionEnum}`
459
- }
460
- declare const Modal: {
461
- show(ReactComponent: React.ReactNode, options?: ModalShowOptions): void
462
- hide(): void
463
- hideAll(): void
464
- }
465
-
466
436
  interface RichTextProps {
467
437
  data?: string
468
438
  style?: CSSProperties
@@ -631,38 +601,53 @@ declare const OTPInput: React.ForwardRefExoticComponent<
631
601
  OTPInputProps & React.RefAttributes<HTMLDivElement>
632
602
  >
633
603
 
634
- declare const Toast: {
635
- success(
636
- ReactComponent: React.ReactNode | string | MessageArgsProps,
637
- duration?: number,
638
- onClose?: () => void
639
- ): void
640
- error(
641
- ReactComponent: React.ReactNode | string | MessageArgsProps,
642
- duration?: number,
643
- onClose?: () => void
644
- ): void
645
- info(
646
- ReactComponent: React.ReactNode | string | MessageArgsProps,
647
- duration?: number,
648
- onClose?: () => void
649
- ): void
650
- warning(
651
- ReactComponent: React.ReactNode | string | MessageArgsProps,
652
- duration?: number,
653
- onClose?: () => void
654
- ): void
655
- warn(
656
- ReactComponent: React.ReactNode | string | MessageArgsProps,
657
- duration?: number,
658
- onClose?: () => void
659
- ): void
660
- loading(
661
- ReactComponent: React.ReactNode | string | MessageArgsProps,
662
- duration?: number,
663
- onClose?: () => void
664
- ): void
665
- message: antd_lib_message.MessageApi
604
+ declare enum ModalPositionEnum {
605
+ DEFAULT = 'default',
606
+ TOP = 'top',
607
+ CENTER = 'center'
608
+ }
609
+ interface ModalOptions
610
+ extends Omit<
611
+ ModalProps$1,
612
+ | 'visible'
613
+ | 'closable'
614
+ | 'footer'
615
+ | 'modalRender'
616
+ | 'cancelText'
617
+ | 'cancelButtonProps'
618
+ | 'okText'
619
+ | 'onOk'
620
+ | 'okButtonProps'
621
+ | 'okType'
622
+ | 'title'
623
+ | 'closeIcon'
624
+ | 'bodyStyle'
625
+ > {
626
+ position?: `${ModalPositionEnum}`
627
+ }
628
+ declare type ModalProps = {
629
+ local?: boolean
630
+ }
631
+ declare type ModalState = {
632
+ modals: {
633
+ options: ModalOptions
634
+ component: React.ReactNode
635
+ visible: boolean
636
+ id: string
637
+ }[]
638
+ }
639
+ declare class ModalComponent extends React.PureComponent<ModalProps, ModalState> {
640
+ constructor(props: ModalProps)
641
+ componentDidMount(): void
642
+ componentWillUnmount(): void
643
+ clearModal: (hideId?: string) => void
644
+ hide: (id?: string) => void
645
+ show: (component: React.ReactNode, options: ModalOptions) => string
646
+ render(): JSX.Element
647
+ }
648
+ declare const Modal: {
649
+ show(component: React.ReactNode, modalOptions?: ModalOptions): string
650
+ hide(id?: string): void
666
651
  }
667
652
 
668
653
  declare type ThemeProviderProps = {
@@ -2565,8 +2550,10 @@ export {
2565
2550
  MenuItemProps,
2566
2551
  MenuProps,
2567
2552
  Modal,
2553
+ ModalComponent,
2554
+ ModalOptions,
2568
2555
  ModalPositionEnum,
2569
- ModalShowOptions,
2556
+ ModalProps,
2570
2557
  OTPInput,
2571
2558
  OTPInputProps,
2572
2559
  OTPInputType,
@@ -2599,7 +2586,6 @@ export {
2599
2586
  TextProps,
2600
2587
  TextTypeEnum,
2601
2588
  ThemeProvider,
2602
- Toast,
2603
2589
  assertUnreachable,
2604
2590
  defaultTheme,
2605
2591
  getIconComponent,