react-asc 25.0.4 → 25.0.7
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/components/Alert/Alert.d.ts +4 -2
- package/components/AppBar/AppBar.d.ts +4 -2
- package/components/AppBar/AppBarTitle.d.ts +2 -1
- package/components/AutoComplete/AutoComplete.d.ts +2 -2
- package/components/Breadcrumb/Breadcrumb.d.ts +2 -1
- package/components/Button/ButtonContext.d.ts +1 -1
- package/components/Chip/Chip.d.ts +1 -1
- package/components/ConditionalWrapper/ConditionalWrapper.d.ts +2 -2
- package/components/ExpansionPanel/ExpansionPanel.d.ts +2 -1
- package/components/ExpansionPanel/ExpansionPanelContent.d.ts +1 -1
- package/components/ExpansionPanel/ExpansionPanelHeader.d.ts +2 -1
- package/components/Form/Form.d.ts +4 -4
- package/components/Form/FormError.d.ts +2 -2
- package/components/Form/FormGroup.d.ts +1 -1
- package/components/Form/FormInput/FormInput.d.ts +3 -3
- package/components/Form/form.interfaces.d.ts +2 -5
- package/components/Form/form.models.d.ts +5 -5
- package/components/Icon/Icon.d.ts +3 -2
- package/components/List/ListItem.d.ts +1 -1
- package/components/List/ListItemText.d.ts +2 -1
- package/components/List/list.models.d.ts +2 -2
- package/components/Menu/Menu.d.ts +5 -4
- package/components/Menu/MenuBody.d.ts +5 -4
- package/components/Menu/MenuContext.d.ts +1 -1
- package/components/Menu/MenuItem.d.ts +1 -1
- package/components/Menu/MenuToggle.d.ts +1 -1
- package/components/Modal/GlobalModal.d.ts +6 -6
- package/components/Modal/Modal.d.ts +2 -2
- package/components/Modal/ModalBody.d.ts +1 -1
- package/components/Modal/modal.interfaces.d.ts +2 -2
- package/components/Modal/modal.service.d.ts +5 -5
- package/components/Portal/Portal.d.ts +1 -1
- package/components/Select/Select.d.ts +4 -4
- package/components/Sidebar/Sidebar.d.ts +2 -2
- package/components/Sidebar/sidebar.interfaces.d.ts +1 -1
- package/components/Snackbar/Snackbar.d.ts +2 -1
- package/components/SpeedDial/SpeedDialIcon.d.ts +2 -1
- package/components/Stepper/Step/Step.d.ts +2 -1
- package/components/Stepper/StepPanel/StepPanel.d.ts +1 -1
- package/components/Stepper/Stepper.d.ts +3 -3
- package/components/Table/Table.d.ts +2 -2
- package/components/Table/TableContext.d.ts +1 -1
- package/components/Tabs/Tab.d.ts +2 -1
- package/components/Tabs/TabContext.d.ts +1 -1
- package/components/Tabs/Tabs.d.ts +3 -3
- package/hooks/useCssClasses.d.ts +1 -1
- package/hooks/useDebounce.d.ts +1 -1
- package/hooks/useHover.d.ts +1 -1
- package/index.es.js +31 -51
- package/index.js +31 -51
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { VARIANT } from '../component.enums';
|
|
3
|
-
import {
|
|
4
|
+
import type { SIZE } from '../component.enums';
|
|
5
|
+
import { COLOR } from '../component.enums';
|
|
4
6
|
export interface IAlertProps extends React.ComponentProps<'div'> {
|
|
5
7
|
children?: ReactNode;
|
|
6
8
|
className?: string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { SIZE } from '../component.enums';
|
|
4
|
+
import { COLOR } from '../component.enums';
|
|
3
5
|
export interface IAppBarProps extends React.ComponentProps<'nav'> {
|
|
4
6
|
children?: ReactNode;
|
|
5
7
|
className?: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ISelectOption } from '../component.interfaces';
|
|
2
|
+
import type { ISelectOption } from '../component.interfaces';
|
|
3
3
|
export interface IAutoCompleteProps {
|
|
4
4
|
id?: string;
|
|
5
5
|
name?: string;
|
|
6
6
|
className?: string;
|
|
7
|
-
options?:
|
|
7
|
+
options?: ISelectOption[];
|
|
8
8
|
value?: string;
|
|
9
9
|
openOnFocus?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
interface IConditionalWrapperProps {
|
|
3
3
|
condition: boolean;
|
|
4
4
|
wrapper: (children: React.ReactNode) => JSX.Element;
|
|
5
5
|
children: any;
|
|
6
6
|
}
|
|
7
|
-
export declare const ConditionalWrapper: ({ condition, wrapper, children }: IConditionalWrapperProps) =>
|
|
7
|
+
export declare const ConditionalWrapper: ({ condition, wrapper, children }: IConditionalWrapperProps) => JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { IControls
|
|
3
|
-
import { FormControl } from './form.models';
|
|
2
|
+
import type { IControls } from './form.interfaces';
|
|
3
|
+
import type { FormControl } from './form.models';
|
|
4
4
|
export interface IFormProps {
|
|
5
5
|
controls: IControls;
|
|
6
6
|
validateOnBlur?: boolean;
|
|
7
|
-
onSubmit?: (values:
|
|
8
|
-
onChange?: (values:
|
|
7
|
+
onSubmit?: (values: unknown) => void;
|
|
8
|
+
onChange?: (values: unknown) => void;
|
|
9
9
|
submitOnEnter?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export interface IFormState {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IFormInputError } from './form.interfaces';
|
|
2
|
+
import type { IFormInputError } from './form.interfaces';
|
|
3
3
|
interface IFormErrorProps {
|
|
4
4
|
className?: string;
|
|
5
|
-
errors?:
|
|
5
|
+
errors?: IFormInputError[];
|
|
6
6
|
}
|
|
7
7
|
export declare const FormError: (props: IFormErrorProps) => JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IFormInputOptions, IFormTextAreaOptions, IFormSelectOptions, IFormAutoCompleteOptions } from '../form.interfaces';
|
|
3
|
-
import { IFormControlType } from '../form.types';
|
|
2
|
+
import type { IFormInputOptions, IFormTextAreaOptions, IFormSelectOptions, IFormAutoCompleteOptions } from '../form.interfaces';
|
|
3
|
+
import type { IFormControlType } from '../form.types';
|
|
4
4
|
export interface IFormInputEvent {
|
|
5
5
|
value: any;
|
|
6
6
|
type?: string;
|
|
@@ -16,7 +16,7 @@ export interface IFormInputProps {
|
|
|
16
16
|
readonly?: boolean;
|
|
17
17
|
isValid?: boolean;
|
|
18
18
|
autoFocus?: boolean;
|
|
19
|
-
options?:
|
|
19
|
+
options?: IFormInputOptions[];
|
|
20
20
|
textareaOptions?: IFormTextAreaOptions;
|
|
21
21
|
selectOptions?: IFormSelectOptions;
|
|
22
22
|
autoCompleteOptions?: IFormAutoCompleteOptions;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { FormControl } from './form.models';
|
|
1
|
+
import type { FormControl } from './form.models';
|
|
2
2
|
export interface IControls {
|
|
3
3
|
[key: string]: FormControl;
|
|
4
4
|
}
|
|
5
|
-
export interface IFormValues {
|
|
6
|
-
[key: string]: unknown;
|
|
7
|
-
}
|
|
8
5
|
export interface IFormTextAreaOptions {
|
|
9
6
|
rows: number;
|
|
10
7
|
resize: boolean;
|
|
@@ -35,7 +32,7 @@ export interface IFormControlConfig {
|
|
|
35
32
|
hint?: string;
|
|
36
33
|
disabled?: boolean;
|
|
37
34
|
readonly?: boolean;
|
|
38
|
-
options?:
|
|
35
|
+
options?: IFormInputOptions[];
|
|
39
36
|
textareaOptions?: IFormTextAreaOptions;
|
|
40
37
|
selectOptions?: IFormSelectOptions;
|
|
41
38
|
autoCompleteOptions?: IFormAutoCompleteOptions;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IFormControlConfig, IFormInputError } from './form.interfaces';
|
|
2
|
-
import { IFormControlType } from './form.types';
|
|
1
|
+
import type { IFormControlConfig, IFormInputError } from './form.interfaces';
|
|
2
|
+
import type { IFormControlType } from './form.types';
|
|
3
3
|
export declare class FormControl {
|
|
4
4
|
value: any;
|
|
5
|
-
validators:
|
|
5
|
+
validators: string[];
|
|
6
6
|
type: IFormControlType;
|
|
7
7
|
config: IFormControlConfig;
|
|
8
|
-
constructor(value: any, validators:
|
|
9
|
-
errors:
|
|
8
|
+
constructor(value: any, validators: string[], type: IFormControlType, config: IFormControlConfig);
|
|
9
|
+
errors: IFormInputError[];
|
|
10
10
|
isValid: boolean;
|
|
11
11
|
isDirty: boolean;
|
|
12
12
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { COLOR } from '../component.enums';
|
|
3
4
|
export interface IIconProps extends ComponentProps<'div'> {
|
|
4
5
|
iconColor?: COLOR;
|
|
5
6
|
children?: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { IListItemProps } from './ListItem';
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { IListItemProps } from './ListItem';
|
|
3
3
|
export declare class ListItemModel {
|
|
4
4
|
constructor(dto: ReactElement<IListItemProps>);
|
|
5
5
|
key: unknown;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { MenuPosition } from './menu.types';
|
|
4
|
+
import type { IListItemProps } from '../List';
|
|
4
5
|
export interface IMenuProps extends React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
5
6
|
toggle?: ReactElement;
|
|
6
7
|
open?: boolean;
|
|
7
|
-
children?: ReactElement<IListItemProps> |
|
|
8
|
+
children?: ReactElement<IListItemProps> | ReactElement<IListItemProps>[];
|
|
8
9
|
menuPosition?: MenuPosition;
|
|
9
10
|
onClickBackdrop?: () => void;
|
|
10
11
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { MenuPosition } from './menu.types';
|
|
4
|
+
import type { IListItemProps } from '../List';
|
|
4
5
|
export interface IMenuBodyProps {
|
|
5
|
-
children?: ReactElement<IListItemProps> |
|
|
6
|
+
children?: ReactElement<IListItemProps> | ReactElement<IListItemProps>[];
|
|
6
7
|
className?: string;
|
|
7
8
|
menuPosition?: MenuPosition;
|
|
8
9
|
parentRef: React.RefObject<HTMLDivElement>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import { SIZE } from '../component.enums';
|
|
3
|
-
import { IControls
|
|
3
|
+
import type { IControls } from '../Form';
|
|
4
4
|
import { MODALTYPE } from './modal.enum';
|
|
5
|
-
import { IModalButton } from './modal.interfaces';
|
|
5
|
+
import type { IModalButton } from './modal.interfaces';
|
|
6
6
|
interface IModalProps {
|
|
7
7
|
title?: string;
|
|
8
8
|
description?: string | ReactElement;
|
|
9
9
|
formControls?: IControls;
|
|
10
10
|
modalType?: MODALTYPE;
|
|
11
|
-
onOk: (values?:
|
|
12
|
-
onChange?: (values?:
|
|
11
|
+
onOk: <T>(values?: T) => void;
|
|
12
|
+
onChange?: <T>(values?: T) => void;
|
|
13
13
|
onCancel?: () => void;
|
|
14
14
|
onBackdropClick?: () => void;
|
|
15
15
|
isDismissable?: boolean;
|
|
16
|
-
buttons?:
|
|
16
|
+
buttons?: IModalButton[];
|
|
17
17
|
fullScreen?: boolean;
|
|
18
18
|
size?: SIZE;
|
|
19
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { SIZE } from '../component.enums';
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { SIZE } from '../component.enums';
|
|
3
3
|
export interface IModalProps {
|
|
4
4
|
target?: HTMLElement;
|
|
5
5
|
className?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { COLOR, VARIANT } from '../component.enums';
|
|
2
|
-
import { MODALBUTTONTYPE } from './modal.enum';
|
|
1
|
+
import type { COLOR, VARIANT } from '../component.enums';
|
|
2
|
+
import type { MODALBUTTONTYPE } from './modal.enum';
|
|
3
3
|
export interface IModalButton {
|
|
4
4
|
label: string;
|
|
5
5
|
variant?: VARIANT;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { IControls } from '../Form';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
import { IModalButton } from './modal.interfaces';
|
|
4
|
-
import { SIZE } from '../component.enums';
|
|
1
|
+
import type { IControls } from '../Form';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { IModalButton } from './modal.interfaces';
|
|
4
|
+
import type { SIZE } from '../component.enums';
|
|
5
5
|
export interface IModalService {
|
|
6
6
|
show(title: string, description: string | ReactElement, options?: IModalOptions): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
export interface IModalOptions {
|
|
9
9
|
isDismissable?: boolean;
|
|
10
|
-
buttons?:
|
|
10
|
+
buttons?: IModalButton[];
|
|
11
11
|
fullScreen?: boolean;
|
|
12
12
|
size?: SIZE;
|
|
13
13
|
}
|
|
@@ -4,4 +4,4 @@ export interface IPortalProps {
|
|
|
4
4
|
target?: HTMLElement;
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const Portal: ({ children, target, className }: IPortalProps) =>
|
|
7
|
+
export declare const Portal: ({ children, target, className }: IPortalProps) => JSX.Element;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ISelectOption } from '../component.interfaces';
|
|
2
|
+
import type { ISelectOption } from '../component.interfaces';
|
|
3
3
|
export interface ISelectProps {
|
|
4
4
|
id?: string;
|
|
5
5
|
name?: string;
|
|
6
6
|
className?: string;
|
|
7
|
-
options?:
|
|
8
|
-
value?: string |
|
|
7
|
+
options?: ISelectOption[];
|
|
8
|
+
value?: string | string[];
|
|
9
9
|
multiple?: boolean;
|
|
10
10
|
multipleMaxCountItems?: number;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
readOnly?: boolean;
|
|
13
|
-
onChange?: (val: string |
|
|
13
|
+
onChange?: (val: string | string[]) => void;
|
|
14
14
|
onKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
15
15
|
}
|
|
16
16
|
export declare const Select: (props: ISelectProps) => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ISidebarItem } from './sidebar.interfaces';
|
|
2
|
+
import type { ISidebarItem } from './sidebar.interfaces';
|
|
3
3
|
interface ISidebarProps extends React.ComponentProps<'nav'> {
|
|
4
|
-
items:
|
|
4
|
+
items: ISidebarItem[];
|
|
5
5
|
currentUrl: string;
|
|
6
6
|
onItemClicked: (path: string) => void;
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
export interface ISpeedDialIconProps extends React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
3
4
|
openIcon?: ReactElement;
|
|
4
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { IStepProps } from './Step';
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { IStepProps } from './Step';
|
|
3
3
|
export interface IStepperProps {
|
|
4
|
-
children?: ReactElement<IStepProps> |
|
|
4
|
+
children?: ReactElement<IStepProps> | ReactElement<IStepProps>[];
|
|
5
5
|
isLinear?: boolean;
|
|
6
6
|
isDisabled?: boolean;
|
|
7
7
|
showLabel?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
export interface ITableProps {
|
|
3
|
-
children?: ReactElement |
|
|
3
|
+
children?: ReactElement | ReactElement[];
|
|
4
4
|
className?: string;
|
|
5
5
|
striped?: boolean;
|
|
6
6
|
bordered?: boolean;
|
package/components/Tabs/Tab.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import { COLOR } from '../component.enums';
|
|
3
|
-
import { ITabProps } from './Tab';
|
|
3
|
+
import type { ITabProps } from './Tab';
|
|
4
4
|
export interface ITabsProps {
|
|
5
5
|
color?: COLOR;
|
|
6
6
|
indicatorColor?: COLOR;
|
|
7
|
-
children?: ReactElement<ITabProps> |
|
|
7
|
+
children?: ReactElement<ITabProps> | ReactElement<ITabProps>[];
|
|
8
8
|
className?: string;
|
|
9
9
|
fixed?: boolean;
|
|
10
10
|
onChange?: (value: string) => void;
|
package/hooks/useCssClasses.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useCssClasses(cssClasses:
|
|
1
|
+
export declare function useCssClasses(cssClasses: string[]): string[];
|
package/hooks/useDebounce.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
export declare function useDebounce(callback: () => void, timeout: number, deps: React.DependencyList): void;
|
package/hooks/useHover.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare function useHover(): (boolean |
|
|
2
|
+
export declare function useHover(): (boolean | React.MutableRefObject<null>)[];
|
package/index.es.js
CHANGED
|
@@ -235,12 +235,9 @@ function useDebounce(callback, timeout, deps) {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
const useConstructor = (callBack) => {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
callBack();
|
|
243
|
-
setHasBeenCalled(true);
|
|
238
|
+
useEffect(() => {
|
|
239
|
+
callBack();
|
|
240
|
+
}, []);
|
|
244
241
|
};
|
|
245
242
|
|
|
246
243
|
function useCssClasses(cssClasses) {
|
|
@@ -406,7 +403,7 @@ styleInject(css_248z$V);
|
|
|
406
403
|
|
|
407
404
|
const ListItemAction = (_a) => {
|
|
408
405
|
var { children, onClick } = _a, rest = __rest(_a, ["children", "onClick"]);
|
|
409
|
-
return (React.createElement("div", Object.assign({ className: styles$V.listItemAction, onClick: e => onClick && onClick(e) }, rest), children));
|
|
406
|
+
return (React.createElement("div", Object.assign({ className: styles$V.listItemAction, onClick: (e) => onClick && onClick(e) }, rest), children));
|
|
410
407
|
};
|
|
411
408
|
|
|
412
409
|
var css_248z$U = ".ListItemTextIcon-module_listItemText__xCBLW {\n flex: 1;\n}";
|
|
@@ -638,7 +635,7 @@ const BreadcrumbItem = (props) => {
|
|
|
638
635
|
onClick && onClick(event);
|
|
639
636
|
};
|
|
640
637
|
return (React.createElement("li", { className: getCssClasses(), onClick: handleClick },
|
|
641
|
-
React.createElement(ConditionalWrapper, { condition: !isActive, wrapper: label => React.createElement("a", null, label) }, children)));
|
|
638
|
+
React.createElement(ConditionalWrapper, { condition: !isActive, wrapper: (label) => React.createElement("a", null, label) }, children)));
|
|
642
639
|
};
|
|
643
640
|
|
|
644
641
|
var css_248z$N = ".Card-module_card__TQdQq {\n background: var(--white);\n border-radius: var(--borderRadius);\n}\n.Card-module_card__TQdQq.Card-module_shadow__NxDVz {\n box-shadow: var(--shadow);\n}";
|
|
@@ -819,7 +816,7 @@ const Chip = (props) => {
|
|
|
819
816
|
};
|
|
820
817
|
return (React.createElement("div", Object.assign({ className: getCssClass() }, rest, { style: style }),
|
|
821
818
|
React.createElement("span", null, children),
|
|
822
|
-
isDeletable && (React.createElement("div", { className: styles$F.deleteIcon, onClick: e => handleClickOnDelete(e) }, deleteIcon))));
|
|
819
|
+
isDeletable && (React.createElement("div", { className: styles$F.deleteIcon, onClick: (e) => handleClickOnDelete(e) }, deleteIcon))));
|
|
823
820
|
};
|
|
824
821
|
|
|
825
822
|
const CssTransition = (props) => {
|
|
@@ -879,7 +876,7 @@ const CssTransition = (props) => {
|
|
|
879
876
|
};
|
|
880
877
|
useEffect(() => {
|
|
881
878
|
if (isShow !== undefined && (isShow === true || isShow === false)) {
|
|
882
|
-
renderAnimation(isShow);
|
|
879
|
+
void renderAnimation(isShow);
|
|
883
880
|
}
|
|
884
881
|
}, [isShow]);
|
|
885
882
|
const getCssClasses = () => {
|
|
@@ -902,21 +899,9 @@ var styles$E = {"column":"Column-module_column__fcTgl"};
|
|
|
902
899
|
styleInject(css_248z$E);
|
|
903
900
|
|
|
904
901
|
const Column = (props) => {
|
|
905
|
-
const { children, className } = props,
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
// md,
|
|
909
|
-
// lg,
|
|
910
|
-
// xl,
|
|
911
|
-
rest = __rest(props, ["children", "className"]);
|
|
912
|
-
const getCssClasses = () => {
|
|
913
|
-
const cssClasses = [];
|
|
914
|
-
// !xs && !sm && !md && !lg && !xl && cssClasses.push('col');
|
|
915
|
-
// if (xs) cssClasses.push(`col-${xs.toString()}`);
|
|
916
|
-
// if (sm) cssClasses.push(`col-sm-${sm.toString()}`);
|
|
917
|
-
// if (md) cssClasses.push(`col-md-${md.toString()}`);
|
|
918
|
-
// if (lg) cssClasses.push(`col-lg-${lg.toString()}`);
|
|
919
|
-
// if (xl) cssClasses.push(`col-xl-${xl.toString()}`);
|
|
902
|
+
const { children, className } = props, rest = __rest(props, ["children", "className"]);
|
|
903
|
+
const getCssClasses = () => {
|
|
904
|
+
const cssClasses = [];
|
|
920
905
|
cssClasses.push(styles$E.column);
|
|
921
906
|
className && cssClasses.push(className);
|
|
922
907
|
return cssClasses.filter(css => css).join(' ');
|
|
@@ -1126,7 +1111,7 @@ const Select = (props) => {
|
|
|
1126
1111
|
}
|
|
1127
1112
|
};
|
|
1128
1113
|
return (React.createElement("div", { ref: selectConainter, className: styles$B.selectContainer },
|
|
1129
|
-
React.createElement("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: e => handleOnKeyDown(e) },
|
|
1114
|
+
React.createElement("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: (e) => handleOnKeyDown(e) },
|
|
1130
1115
|
React.createElement(React.Fragment, null,
|
|
1131
1116
|
!multiple && renderSingleViewModel(),
|
|
1132
1117
|
multiple &&
|
|
@@ -1190,20 +1175,20 @@ const FormInput = (props) => {
|
|
|
1190
1175
|
type === 'color' ||
|
|
1191
1176
|
type === 'time')
|
|
1192
1177
|
&&
|
|
1193
|
-
React.createElement("input", { id: name, name: name, type: type, className: getCssClasses(), value: value, autoFocus: autoFocus, onInput: e => handleOnInput(e.target.value, type, name), onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), onBlur: onBlur, placeholder: placeholder, readOnly: readonly, disabled: disabled, onKeyDown: onKeyDown }),
|
|
1178
|
+
React.createElement("input", { id: name, name: name, type: type, className: getCssClasses(), value: value, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), onBlur: onBlur, placeholder: placeholder, readOnly: readonly, disabled: disabled, onKeyDown: onKeyDown }),
|
|
1194
1179
|
type === 'file' &&
|
|
1195
|
-
React.createElement(FileInput, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, autoFocus: autoFocus, readOnly: readonly, disabled: disabled, onChange: e => handleOnChange(e.target.value, type, name) }, "choose a file"),
|
|
1180
|
+
React.createElement(FileInput, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, autoFocus: autoFocus, readOnly: readonly, disabled: disabled, onChange: (e) => handleOnChange(e.target.value, type, name) }, "choose a file"),
|
|
1196
1181
|
type === 'textarea' &&
|
|
1197
|
-
React.createElement(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, autoFocus: autoFocus, onInput: e => handleOnInput(e.target.value, type, name), onChange: e => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.rows, style: (textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.resize) !== false ? undefined : { resize: 'none' } }),
|
|
1182
|
+
React.createElement(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.rows, style: (textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.resize) !== false ? undefined : { resize: 'none' } }),
|
|
1198
1183
|
type === 'select' &&
|
|
1199
|
-
React.createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: e => handleOnChange(e, type, name), options: options }),
|
|
1184
|
+
React.createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: (e) => handleOnChange(e, type, name), options: options }),
|
|
1200
1185
|
type === 'autocomplete' &&
|
|
1201
|
-
React.createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: e => handleOnChange(e, type, name), onSelect: e => handleOnChange(e.value, type, name), options: options }),
|
|
1186
|
+
React.createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: (e) => handleOnChange(e, type, name), onSelect: (e) => handleOnChange(e.value, type, name), options: options }),
|
|
1202
1187
|
type === 'checkbox' &&
|
|
1203
|
-
React.createElement(Checkbox, { id: name, name: name, label: label, className: (!isValid ? ' is-invalid' : ''), onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).checked, type, name), checked: value }),
|
|
1188
|
+
React.createElement(Checkbox, { id: name, name: name, label: label, className: (!isValid ? ' is-invalid' : ''), onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).checked, type, name), checked: value }),
|
|
1204
1189
|
type === 'radio' &&
|
|
1205
1190
|
React.createElement(React.Fragment, null, options.map((option) => React.createElement("div", { className: "form-check", key: option.id },
|
|
1206
|
-
React.createElement("input", { id: option.id ? option.id : option.value, name: name, type: "radio", className: "form-check-input", onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), value: option.value, checked: value === option.value, onKeyDown: onKeyDown }),
|
|
1191
|
+
React.createElement("input", { id: option.id ? option.id : option.value, name: name, type: "radio", className: "form-check-input", onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), value: option.value, checked: value === option.value, onKeyDown: onKeyDown }),
|
|
1207
1192
|
React.createElement("label", { className: "form-check-label", htmlFor: option.id }, option.label))))));
|
|
1208
1193
|
};
|
|
1209
1194
|
|
|
@@ -1363,7 +1348,6 @@ class Form extends Component {
|
|
|
1363
1348
|
const cssClasses = [labelClassName, this.isRequired(fieldKey) ? 'required' : undefined];
|
|
1364
1349
|
return React.createElement(FormLabel, { htmlFor: fieldKey, className: cssClasses.join(' ') }, label);
|
|
1365
1350
|
}
|
|
1366
|
-
// trigger via ref
|
|
1367
1351
|
handleFormSubmit() {
|
|
1368
1352
|
for (const fieldKey of Object.keys(this.state.controls)) {
|
|
1369
1353
|
const field = this.getControl(fieldKey);
|
|
@@ -1535,13 +1519,13 @@ const DateSelect = (props) => {
|
|
|
1535
1519
|
return (React.createElement(Row, { className: getCssClasses() },
|
|
1536
1520
|
React.createElement(Column, null,
|
|
1537
1521
|
React.createElement(FormLabel, null, "Year"),
|
|
1538
|
-
React.createElement(YearSelect, { value: currDate.getFullYear(), disabled: disabled, from: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.from, to: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.to, onChange: e => handleOnChange(e, DATEMODE.YEAR) })),
|
|
1522
|
+
React.createElement(YearSelect, { value: currDate.getFullYear(), disabled: disabled, from: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.from, to: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.to, onChange: (e) => handleOnChange(e, DATEMODE.YEAR) })),
|
|
1539
1523
|
React.createElement(Column, null,
|
|
1540
1524
|
React.createElement(FormLabel, null, "Month"),
|
|
1541
|
-
React.createElement(MonthSelect, { value: currDate.getMonth(), disabled: disabled, onChange: e => handleOnChange(e, DATEMODE.MONTH) })),
|
|
1525
|
+
React.createElement(MonthSelect, { value: currDate.getMonth(), disabled: disabled, onChange: (e) => handleOnChange(e, DATEMODE.MONTH) })),
|
|
1542
1526
|
React.createElement(Column, null,
|
|
1543
1527
|
React.createElement(FormLabel, null, "Day"),
|
|
1544
|
-
React.createElement(DaySelect, { day: currDate.getDate(), month: currDate.getMonth(), year: currDate.getFullYear(), disabled: disabled, onChange: e => handleOnChange(e, DATEMODE.DAY) }))));
|
|
1528
|
+
React.createElement(DaySelect, { day: currDate.getDate(), month: currDate.getMonth(), year: currDate.getFullYear(), disabled: disabled, onChange: (e) => handleOnChange(e, DATEMODE.DAY) }))));
|
|
1545
1529
|
};
|
|
1546
1530
|
/*
|
|
1547
1531
|
* result = { year, month, day, dayOfWeek, weekNumber }
|
|
@@ -2008,10 +1992,6 @@ class ModalService {
|
|
|
2008
1992
|
resolve(values);
|
|
2009
1993
|
this.hide();
|
|
2010
1994
|
};
|
|
2011
|
-
// TODO - for AutoComplete
|
|
2012
|
-
// const handleOnChange = (values?: IFormValues) => {
|
|
2013
|
-
// console.info(values);
|
|
2014
|
-
// }
|
|
2015
1995
|
const handleCancel = () => {
|
|
2016
1996
|
reject();
|
|
2017
1997
|
this.hide();
|
|
@@ -2199,11 +2179,11 @@ const Sidebar = (props) => {
|
|
|
2199
2179
|
setMenuItems(newMenuItems);
|
|
2200
2180
|
}
|
|
2201
2181
|
else {
|
|
2202
|
-
navigate(e,
|
|
2182
|
+
navigate(e, `${item.path}`);
|
|
2203
2183
|
}
|
|
2204
2184
|
};
|
|
2205
2185
|
const handleClickSubItem = (itemPath, subItemPath, e) => {
|
|
2206
|
-
navigate(e,
|
|
2186
|
+
navigate(e, `${itemPath}/${subItemPath}`);
|
|
2207
2187
|
};
|
|
2208
2188
|
return (React.createElement("nav", Object.assign({ className: getCssClasses() }, rest),
|
|
2209
2189
|
React.createElement(List, null, menuItems.map(item => (React.createElement(React.Fragment, { key: item.id },
|
|
@@ -2419,7 +2399,7 @@ const Stepper = (props) => {
|
|
|
2419
2399
|
});
|
|
2420
2400
|
};
|
|
2421
2401
|
const renderSteps = (child, index) => {
|
|
2422
|
-
return React.isValidElement(child) &&
|
|
2402
|
+
return (React.createElement(React.Fragment, null, React.isValidElement(child) &&
|
|
2423
2403
|
cloneElement(child, {
|
|
2424
2404
|
index: index,
|
|
2425
2405
|
isActive: activeIndex >= index,
|
|
@@ -2428,7 +2408,7 @@ const Stepper = (props) => {
|
|
|
2428
2408
|
showLabel: showLabel,
|
|
2429
2409
|
showProgressCheckIcon: showProgressCheckIcon,
|
|
2430
2410
|
onClick: (e) => handleClickStep(e.event, e.value, index)
|
|
2431
|
-
});
|
|
2411
|
+
})));
|
|
2432
2412
|
};
|
|
2433
2413
|
const isStepOptional = (index) => {
|
|
2434
2414
|
return steps && steps[index].props.isOptional;
|
|
@@ -2638,7 +2618,7 @@ const Table = (props) => {
|
|
|
2638
2618
|
className && cssClasses.push(className);
|
|
2639
2619
|
return cssClasses.filter(css => css).join(' ');
|
|
2640
2620
|
};
|
|
2641
|
-
return (React.createElement(ConditionalWrapper, { condition: responsive, wrapper: children => React.createElement("div", { className: styles$5.tableResponsive }, children) },
|
|
2621
|
+
return (React.createElement(ConditionalWrapper, { condition: responsive, wrapper: (children) => React.createElement("div", { className: styles$5.tableResponsive }, children) },
|
|
2642
2622
|
React.createElement("table", { className: getCssClasses() }, children)));
|
|
2643
2623
|
};
|
|
2644
2624
|
|
|
@@ -2667,7 +2647,7 @@ const TableBody = (props) => {
|
|
|
2667
2647
|
const TableCell = (props) => {
|
|
2668
2648
|
const { variant } = useTableContext();
|
|
2669
2649
|
const { children, component } = props, rest = __rest(props, ["children", "component"]);
|
|
2670
|
-
return (React.createElement(ConditionalWrapper, { condition: true, wrapper: children => ((variant === 'head' || component === 'th') ? (React.createElement("th", Object.assign({}, rest), children)) :
|
|
2650
|
+
return (React.createElement(ConditionalWrapper, { condition: true, wrapper: (children) => ((variant === 'head' || component === 'th') ? (React.createElement("th", Object.assign({}, rest), children)) :
|
|
2671
2651
|
React.createElement("td", Object.assign({}, rest), children)) }, children));
|
|
2672
2652
|
};
|
|
2673
2653
|
|
|
@@ -2885,19 +2865,19 @@ const TimeSelect = (props) => {
|
|
|
2885
2865
|
showHours &&
|
|
2886
2866
|
React.createElement(Column, null,
|
|
2887
2867
|
React.createElement(FormLabel, null, "Hours"),
|
|
2888
|
-
React.createElement(HourSelect, { value: currDate.getHours(), disabled: disabled, onChange: e => handleOnChange(e, TIMEMODE.HOUR) })),
|
|
2868
|
+
React.createElement(HourSelect, { value: currDate.getHours(), disabled: disabled, onChange: (e) => handleOnChange(e, TIMEMODE.HOUR) })),
|
|
2889
2869
|
showMinutes &&
|
|
2890
2870
|
React.createElement(Column, null,
|
|
2891
2871
|
React.createElement(FormLabel, null, "Minutes"),
|
|
2892
|
-
React.createElement(MinuteSelect, { value: currDate.getMinutes(), disabled: disabled, onChange: e => handleOnChange(e, TIMEMODE.MINUTE) })),
|
|
2872
|
+
React.createElement(MinuteSelect, { value: currDate.getMinutes(), disabled: disabled, onChange: (e) => handleOnChange(e, TIMEMODE.MINUTE) })),
|
|
2893
2873
|
showSeconds &&
|
|
2894
2874
|
React.createElement(Column, null,
|
|
2895
2875
|
React.createElement(FormLabel, null, "Seconds"),
|
|
2896
|
-
React.createElement(SecondSelect, { value: currDate.getSeconds(), disabled: disabled, onChange: e => handleOnChange(e, TIMEMODE.SECONDS) })),
|
|
2876
|
+
React.createElement(SecondSelect, { value: currDate.getSeconds(), disabled: disabled, onChange: (e) => handleOnChange(e, TIMEMODE.SECONDS) })),
|
|
2897
2877
|
showMilliSeconds &&
|
|
2898
2878
|
React.createElement(Column, null,
|
|
2899
2879
|
React.createElement(FormLabel, null, "Milliseconds"),
|
|
2900
|
-
React.createElement(MilliSecondSelect, { value: currDate.getMilliseconds(), disabled: disabled, onChange: e => handleOnChange(e, TIMEMODE.MILLISECONDS) }))));
|
|
2880
|
+
React.createElement(MilliSecondSelect, { value: currDate.getMilliseconds(), disabled: disabled, onChange: (e) => handleOnChange(e, TIMEMODE.MILLISECONDS) }))));
|
|
2901
2881
|
};
|
|
2902
2882
|
|
|
2903
2883
|
var css_248z$1 = ".TreeView-module_treeView__VVj-4 {\n list-style-type: none;\n margin-bottom: 0;\n padding-left: 0px !important;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 0px;\n}\n.TreeView-module_treeView__VVj-4 ul {\n padding-left: 48px !important;\n}";
|
package/index.js
CHANGED
|
@@ -244,12 +244,9 @@ function useDebounce(callback, timeout, deps) {
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
const useConstructor = (callBack) => {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
callBack();
|
|
252
|
-
setHasBeenCalled(true);
|
|
247
|
+
React.useEffect(() => {
|
|
248
|
+
callBack();
|
|
249
|
+
}, []);
|
|
253
250
|
};
|
|
254
251
|
|
|
255
252
|
function useCssClasses(cssClasses) {
|
|
@@ -415,7 +412,7 @@ styleInject(css_248z$V);
|
|
|
415
412
|
|
|
416
413
|
const ListItemAction = (_a) => {
|
|
417
414
|
var { children, onClick } = _a, rest = __rest(_a, ["children", "onClick"]);
|
|
418
|
-
return (React__default["default"].createElement("div", Object.assign({ className: styles$V.listItemAction, onClick: e => onClick && onClick(e) }, rest), children));
|
|
415
|
+
return (React__default["default"].createElement("div", Object.assign({ className: styles$V.listItemAction, onClick: (e) => onClick && onClick(e) }, rest), children));
|
|
419
416
|
};
|
|
420
417
|
|
|
421
418
|
var css_248z$U = ".ListItemTextIcon-module_listItemText__xCBLW {\n flex: 1;\n}";
|
|
@@ -647,7 +644,7 @@ const BreadcrumbItem = (props) => {
|
|
|
647
644
|
onClick && onClick(event);
|
|
648
645
|
};
|
|
649
646
|
return (React__default["default"].createElement("li", { className: getCssClasses(), onClick: handleClick },
|
|
650
|
-
React__default["default"].createElement(ConditionalWrapper, { condition: !isActive, wrapper: label => React__default["default"].createElement("a", null, label) }, children)));
|
|
647
|
+
React__default["default"].createElement(ConditionalWrapper, { condition: !isActive, wrapper: (label) => React__default["default"].createElement("a", null, label) }, children)));
|
|
651
648
|
};
|
|
652
649
|
|
|
653
650
|
var css_248z$N = ".Card-module_card__TQdQq {\n background: var(--white);\n border-radius: var(--borderRadius);\n}\n.Card-module_card__TQdQq.Card-module_shadow__NxDVz {\n box-shadow: var(--shadow);\n}";
|
|
@@ -828,7 +825,7 @@ const Chip = (props) => {
|
|
|
828
825
|
};
|
|
829
826
|
return (React__default["default"].createElement("div", Object.assign({ className: getCssClass() }, rest, { style: style }),
|
|
830
827
|
React__default["default"].createElement("span", null, children),
|
|
831
|
-
isDeletable && (React__default["default"].createElement("div", { className: styles$F.deleteIcon, onClick: e => handleClickOnDelete(e) }, deleteIcon))));
|
|
828
|
+
isDeletable && (React__default["default"].createElement("div", { className: styles$F.deleteIcon, onClick: (e) => handleClickOnDelete(e) }, deleteIcon))));
|
|
832
829
|
};
|
|
833
830
|
|
|
834
831
|
const CssTransition = (props) => {
|
|
@@ -888,7 +885,7 @@ const CssTransition = (props) => {
|
|
|
888
885
|
};
|
|
889
886
|
React.useEffect(() => {
|
|
890
887
|
if (isShow !== undefined && (isShow === true || isShow === false)) {
|
|
891
|
-
renderAnimation(isShow);
|
|
888
|
+
void renderAnimation(isShow);
|
|
892
889
|
}
|
|
893
890
|
}, [isShow]);
|
|
894
891
|
const getCssClasses = () => {
|
|
@@ -911,21 +908,9 @@ var styles$E = {"column":"Column-module_column__fcTgl"};
|
|
|
911
908
|
styleInject(css_248z$E);
|
|
912
909
|
|
|
913
910
|
const Column = (props) => {
|
|
914
|
-
const { children, className } = props,
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
// md,
|
|
918
|
-
// lg,
|
|
919
|
-
// xl,
|
|
920
|
-
rest = __rest(props, ["children", "className"]);
|
|
921
|
-
const getCssClasses = () => {
|
|
922
|
-
const cssClasses = [];
|
|
923
|
-
// !xs && !sm && !md && !lg && !xl && cssClasses.push('col');
|
|
924
|
-
// if (xs) cssClasses.push(`col-${xs.toString()}`);
|
|
925
|
-
// if (sm) cssClasses.push(`col-sm-${sm.toString()}`);
|
|
926
|
-
// if (md) cssClasses.push(`col-md-${md.toString()}`);
|
|
927
|
-
// if (lg) cssClasses.push(`col-lg-${lg.toString()}`);
|
|
928
|
-
// if (xl) cssClasses.push(`col-xl-${xl.toString()}`);
|
|
911
|
+
const { children, className } = props, rest = __rest(props, ["children", "className"]);
|
|
912
|
+
const getCssClasses = () => {
|
|
913
|
+
const cssClasses = [];
|
|
929
914
|
cssClasses.push(styles$E.column);
|
|
930
915
|
className && cssClasses.push(className);
|
|
931
916
|
return cssClasses.filter(css => css).join(' ');
|
|
@@ -1135,7 +1120,7 @@ const Select = (props) => {
|
|
|
1135
1120
|
}
|
|
1136
1121
|
};
|
|
1137
1122
|
return (React__default["default"].createElement("div", { ref: selectConainter, className: styles$B.selectContainer },
|
|
1138
|
-
React__default["default"].createElement("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: e => handleOnKeyDown(e) },
|
|
1123
|
+
React__default["default"].createElement("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: (e) => handleOnKeyDown(e) },
|
|
1139
1124
|
React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1140
1125
|
!multiple && renderSingleViewModel(),
|
|
1141
1126
|
multiple &&
|
|
@@ -1199,20 +1184,20 @@ const FormInput = (props) => {
|
|
|
1199
1184
|
type === 'color' ||
|
|
1200
1185
|
type === 'time')
|
|
1201
1186
|
&&
|
|
1202
|
-
React__default["default"].createElement("input", { id: name, name: name, type: type, className: getCssClasses(), value: value, autoFocus: autoFocus, onInput: e => handleOnInput(e.target.value, type, name), onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), onBlur: onBlur, placeholder: placeholder, readOnly: readonly, disabled: disabled, onKeyDown: onKeyDown }),
|
|
1187
|
+
React__default["default"].createElement("input", { id: name, name: name, type: type, className: getCssClasses(), value: value, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), onBlur: onBlur, placeholder: placeholder, readOnly: readonly, disabled: disabled, onKeyDown: onKeyDown }),
|
|
1203
1188
|
type === 'file' &&
|
|
1204
|
-
React__default["default"].createElement(FileInput, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, autoFocus: autoFocus, readOnly: readonly, disabled: disabled, onChange: e => handleOnChange(e.target.value, type, name) }, "choose a file"),
|
|
1189
|
+
React__default["default"].createElement(FileInput, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, autoFocus: autoFocus, readOnly: readonly, disabled: disabled, onChange: (e) => handleOnChange(e.target.value, type, name) }, "choose a file"),
|
|
1205
1190
|
type === 'textarea' &&
|
|
1206
|
-
React__default["default"].createElement(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, autoFocus: autoFocus, onInput: e => handleOnInput(e.target.value, type, name), onChange: e => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.rows, style: (textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.resize) !== false ? undefined : { resize: 'none' } }),
|
|
1191
|
+
React__default["default"].createElement(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.rows, style: (textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.resize) !== false ? undefined : { resize: 'none' } }),
|
|
1207
1192
|
type === 'select' &&
|
|
1208
|
-
React__default["default"].createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: e => handleOnChange(e, type, name), options: options }),
|
|
1193
|
+
React__default["default"].createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: (e) => handleOnChange(e, type, name), options: options }),
|
|
1209
1194
|
type === 'autocomplete' &&
|
|
1210
|
-
React__default["default"].createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: e => handleOnChange(e, type, name), onSelect: e => handleOnChange(e.value, type, name), options: options }),
|
|
1195
|
+
React__default["default"].createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: (e) => handleOnChange(e, type, name), onSelect: (e) => handleOnChange(e.value, type, name), options: options }),
|
|
1211
1196
|
type === 'checkbox' &&
|
|
1212
|
-
React__default["default"].createElement(Checkbox, { id: name, name: name, label: label, className: (!isValid ? ' is-invalid' : ''), onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).checked, type, name), checked: value }),
|
|
1197
|
+
React__default["default"].createElement(Checkbox, { id: name, name: name, label: label, className: (!isValid ? ' is-invalid' : ''), onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).checked, type, name), checked: value }),
|
|
1213
1198
|
type === 'radio' &&
|
|
1214
1199
|
React__default["default"].createElement(React__default["default"].Fragment, null, options.map((option) => React__default["default"].createElement("div", { className: "form-check", key: option.id },
|
|
1215
|
-
React__default["default"].createElement("input", { id: option.id ? option.id : option.value, name: name, type: "radio", className: "form-check-input", onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), value: option.value, checked: value === option.value, onKeyDown: onKeyDown }),
|
|
1200
|
+
React__default["default"].createElement("input", { id: option.id ? option.id : option.value, name: name, type: "radio", className: "form-check-input", onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), value: option.value, checked: value === option.value, onKeyDown: onKeyDown }),
|
|
1216
1201
|
React__default["default"].createElement("label", { className: "form-check-label", htmlFor: option.id }, option.label))))));
|
|
1217
1202
|
};
|
|
1218
1203
|
|
|
@@ -1372,7 +1357,6 @@ class Form extends React.Component {
|
|
|
1372
1357
|
const cssClasses = [labelClassName, this.isRequired(fieldKey) ? 'required' : undefined];
|
|
1373
1358
|
return React__default["default"].createElement(FormLabel, { htmlFor: fieldKey, className: cssClasses.join(' ') }, label);
|
|
1374
1359
|
}
|
|
1375
|
-
// trigger via ref
|
|
1376
1360
|
handleFormSubmit() {
|
|
1377
1361
|
for (const fieldKey of Object.keys(this.state.controls)) {
|
|
1378
1362
|
const field = this.getControl(fieldKey);
|
|
@@ -1544,13 +1528,13 @@ const DateSelect = (props) => {
|
|
|
1544
1528
|
return (React__default["default"].createElement(Row, { className: getCssClasses() },
|
|
1545
1529
|
React__default["default"].createElement(Column, null,
|
|
1546
1530
|
React__default["default"].createElement(FormLabel, null, "Year"),
|
|
1547
|
-
React__default["default"].createElement(YearSelect, { value: currDate.getFullYear(), disabled: disabled, from: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.from, to: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.to, onChange: e => handleOnChange(e, exports.DATEMODE.YEAR) })),
|
|
1531
|
+
React__default["default"].createElement(YearSelect, { value: currDate.getFullYear(), disabled: disabled, from: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.from, to: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.to, onChange: (e) => handleOnChange(e, exports.DATEMODE.YEAR) })),
|
|
1548
1532
|
React__default["default"].createElement(Column, null,
|
|
1549
1533
|
React__default["default"].createElement(FormLabel, null, "Month"),
|
|
1550
|
-
React__default["default"].createElement(MonthSelect, { value: currDate.getMonth(), disabled: disabled, onChange: e => handleOnChange(e, exports.DATEMODE.MONTH) })),
|
|
1534
|
+
React__default["default"].createElement(MonthSelect, { value: currDate.getMonth(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.DATEMODE.MONTH) })),
|
|
1551
1535
|
React__default["default"].createElement(Column, null,
|
|
1552
1536
|
React__default["default"].createElement(FormLabel, null, "Day"),
|
|
1553
|
-
React__default["default"].createElement(DaySelect, { day: currDate.getDate(), month: currDate.getMonth(), year: currDate.getFullYear(), disabled: disabled, onChange: e => handleOnChange(e, exports.DATEMODE.DAY) }))));
|
|
1537
|
+
React__default["default"].createElement(DaySelect, { day: currDate.getDate(), month: currDate.getMonth(), year: currDate.getFullYear(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.DATEMODE.DAY) }))));
|
|
1554
1538
|
};
|
|
1555
1539
|
/*
|
|
1556
1540
|
* result = { year, month, day, dayOfWeek, weekNumber }
|
|
@@ -2017,10 +2001,6 @@ class ModalService {
|
|
|
2017
2001
|
resolve(values);
|
|
2018
2002
|
this.hide();
|
|
2019
2003
|
};
|
|
2020
|
-
// TODO - for AutoComplete
|
|
2021
|
-
// const handleOnChange = (values?: IFormValues) => {
|
|
2022
|
-
// console.info(values);
|
|
2023
|
-
// }
|
|
2024
2004
|
const handleCancel = () => {
|
|
2025
2005
|
reject();
|
|
2026
2006
|
this.hide();
|
|
@@ -2208,11 +2188,11 @@ const Sidebar = (props) => {
|
|
|
2208
2188
|
setMenuItems(newMenuItems);
|
|
2209
2189
|
}
|
|
2210
2190
|
else {
|
|
2211
|
-
navigate(e,
|
|
2191
|
+
navigate(e, `${item.path}`);
|
|
2212
2192
|
}
|
|
2213
2193
|
};
|
|
2214
2194
|
const handleClickSubItem = (itemPath, subItemPath, e) => {
|
|
2215
|
-
navigate(e,
|
|
2195
|
+
navigate(e, `${itemPath}/${subItemPath}`);
|
|
2216
2196
|
};
|
|
2217
2197
|
return (React__default["default"].createElement("nav", Object.assign({ className: getCssClasses() }, rest),
|
|
2218
2198
|
React__default["default"].createElement(List, null, menuItems.map(item => (React__default["default"].createElement(React__default["default"].Fragment, { key: item.id },
|
|
@@ -2428,7 +2408,7 @@ const Stepper = (props) => {
|
|
|
2428
2408
|
});
|
|
2429
2409
|
};
|
|
2430
2410
|
const renderSteps = (child, index) => {
|
|
2431
|
-
return React__default["default"].isValidElement(child) &&
|
|
2411
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].isValidElement(child) &&
|
|
2432
2412
|
React.cloneElement(child, {
|
|
2433
2413
|
index: index,
|
|
2434
2414
|
isActive: activeIndex >= index,
|
|
@@ -2437,7 +2417,7 @@ const Stepper = (props) => {
|
|
|
2437
2417
|
showLabel: showLabel,
|
|
2438
2418
|
showProgressCheckIcon: showProgressCheckIcon,
|
|
2439
2419
|
onClick: (e) => handleClickStep(e.event, e.value, index)
|
|
2440
|
-
});
|
|
2420
|
+
})));
|
|
2441
2421
|
};
|
|
2442
2422
|
const isStepOptional = (index) => {
|
|
2443
2423
|
return steps && steps[index].props.isOptional;
|
|
@@ -2647,7 +2627,7 @@ const Table = (props) => {
|
|
|
2647
2627
|
className && cssClasses.push(className);
|
|
2648
2628
|
return cssClasses.filter(css => css).join(' ');
|
|
2649
2629
|
};
|
|
2650
|
-
return (React__default["default"].createElement(ConditionalWrapper, { condition: responsive, wrapper: children => React__default["default"].createElement("div", { className: styles$5.tableResponsive }, children) },
|
|
2630
|
+
return (React__default["default"].createElement(ConditionalWrapper, { condition: responsive, wrapper: (children) => React__default["default"].createElement("div", { className: styles$5.tableResponsive }, children) },
|
|
2651
2631
|
React__default["default"].createElement("table", { className: getCssClasses() }, children)));
|
|
2652
2632
|
};
|
|
2653
2633
|
|
|
@@ -2676,7 +2656,7 @@ const TableBody = (props) => {
|
|
|
2676
2656
|
const TableCell = (props) => {
|
|
2677
2657
|
const { variant } = useTableContext();
|
|
2678
2658
|
const { children, component } = props, rest = __rest(props, ["children", "component"]);
|
|
2679
|
-
return (React__default["default"].createElement(ConditionalWrapper, { condition: true, wrapper: children => ((variant === 'head' || component === 'th') ? (React__default["default"].createElement("th", Object.assign({}, rest), children)) :
|
|
2659
|
+
return (React__default["default"].createElement(ConditionalWrapper, { condition: true, wrapper: (children) => ((variant === 'head' || component === 'th') ? (React__default["default"].createElement("th", Object.assign({}, rest), children)) :
|
|
2680
2660
|
React__default["default"].createElement("td", Object.assign({}, rest), children)) }, children));
|
|
2681
2661
|
};
|
|
2682
2662
|
|
|
@@ -2894,19 +2874,19 @@ const TimeSelect = (props) => {
|
|
|
2894
2874
|
showHours &&
|
|
2895
2875
|
React__default["default"].createElement(Column, null,
|
|
2896
2876
|
React__default["default"].createElement(FormLabel, null, "Hours"),
|
|
2897
|
-
React__default["default"].createElement(HourSelect, { value: currDate.getHours(), disabled: disabled, onChange: e => handleOnChange(e, exports.TIMEMODE.HOUR) })),
|
|
2877
|
+
React__default["default"].createElement(HourSelect, { value: currDate.getHours(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.TIMEMODE.HOUR) })),
|
|
2898
2878
|
showMinutes &&
|
|
2899
2879
|
React__default["default"].createElement(Column, null,
|
|
2900
2880
|
React__default["default"].createElement(FormLabel, null, "Minutes"),
|
|
2901
|
-
React__default["default"].createElement(MinuteSelect, { value: currDate.getMinutes(), disabled: disabled, onChange: e => handleOnChange(e, exports.TIMEMODE.MINUTE) })),
|
|
2881
|
+
React__default["default"].createElement(MinuteSelect, { value: currDate.getMinutes(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.TIMEMODE.MINUTE) })),
|
|
2902
2882
|
showSeconds &&
|
|
2903
2883
|
React__default["default"].createElement(Column, null,
|
|
2904
2884
|
React__default["default"].createElement(FormLabel, null, "Seconds"),
|
|
2905
|
-
React__default["default"].createElement(SecondSelect, { value: currDate.getSeconds(), disabled: disabled, onChange: e => handleOnChange(e, exports.TIMEMODE.SECONDS) })),
|
|
2885
|
+
React__default["default"].createElement(SecondSelect, { value: currDate.getSeconds(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.TIMEMODE.SECONDS) })),
|
|
2906
2886
|
showMilliSeconds &&
|
|
2907
2887
|
React__default["default"].createElement(Column, null,
|
|
2908
2888
|
React__default["default"].createElement(FormLabel, null, "Milliseconds"),
|
|
2909
|
-
React__default["default"].createElement(MilliSecondSelect, { value: currDate.getMilliseconds(), disabled: disabled, onChange: e => handleOnChange(e, exports.TIMEMODE.MILLISECONDS) }))));
|
|
2889
|
+
React__default["default"].createElement(MilliSecondSelect, { value: currDate.getMilliseconds(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.TIMEMODE.MILLISECONDS) }))));
|
|
2910
2890
|
};
|
|
2911
2891
|
|
|
2912
2892
|
var css_248z$1 = ".TreeView-module_treeView__VVj-4 {\n list-style-type: none;\n margin-bottom: 0;\n padding-left: 0px !important;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 0px;\n}\n.TreeView-module_treeView__VVj-4 ul {\n padding-left: 48px !important;\n}";
|