linear-react-components-ui 1.0.10-beta.12 → 1.0.10-beta.14
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/.eslintrc.json +1 -0
- package/README.md +19 -12
- package/lib/@types/Align.d.ts +2 -2
- package/lib/@types/ButtonTypes.d.ts +1 -1
- package/lib/@types/ColorStyles.d.ts +1 -1
- package/lib/@types/DataCombo.d.ts +1 -1
- package/lib/@types/Icon.d.ts +1 -1
- package/lib/@types/LabelStyles.d.ts +1 -1
- package/lib/@types/Period.d.ts +1 -1
- package/lib/@types/PermissionAttr.d.ts +2 -2
- package/lib/@types/PointerEvents.d.ts +1 -1
- package/lib/@types/Position.d.ts +1 -1
- package/lib/@types/PositionAlert.d.ts +1 -1
- package/lib/@types/Size.d.ts +1 -1
- package/lib/@types/SizePixels.d.ts +1 -1
- package/lib/alerts/AlertContainer.d.ts +2 -0
- package/lib/alerts/AlertContainer.js +5 -21
- package/lib/alerts/AlertProvider.d.ts +2 -0
- package/lib/alerts/AlertProvider.js +15 -45
- package/lib/alerts/BaseAlert.d.ts +2 -0
- package/lib/alerts/BaseAlert.js +4 -20
- package/lib/alerts/Message.d.ts +2 -0
- package/lib/alerts/Message.js +21 -32
- package/lib/alerts/helpers.d.ts +2 -0
- package/lib/alerts/helpers.js +0 -2
- package/lib/alerts/index.d.ts +6 -1
- package/lib/alerts/index.js +0 -4
- package/lib/alerts/types.d.ts +7 -5
- package/lib/alerts/withAlert.d.ts +2 -0
- package/lib/alerts/withAlert.js +1 -12
- package/lib/assets/styles/dialog.scss +9 -6
- package/lib/assets/styles/drawers.scss +9 -0
- package/lib/assets/styles/effects.scss +2 -2
- package/lib/assets/styles/radio.scss +52 -8
- package/lib/assets/styles/table.scss +30 -0
- package/lib/assets/styles/tooltip.scss +42 -2
- package/lib/avatar/index.js +20 -35
- package/lib/badge/index.js +9 -14
- package/lib/buttons/ActivateButton.d.ts +2 -0
- package/lib/buttons/ActivateButton.js +0 -6
- package/lib/buttons/AddButton.d.ts +2 -0
- package/lib/buttons/AddButton.js +0 -7
- package/lib/buttons/Button.d.ts +2 -0
- package/lib/buttons/Button.js +2 -15
- package/lib/buttons/ButtonGroups.js +0 -4
- package/lib/buttons/CancelButton.d.ts +2 -0
- package/lib/buttons/CancelButton.js +1 -11
- package/lib/buttons/DangerButton.d.ts +2 -0
- package/lib/buttons/DangerButton.js +1 -11
- package/lib/buttons/DefaultButton.d.ts +2 -0
- package/lib/buttons/DefaultButton.js +59 -85
- package/lib/buttons/DestroyButton.d.ts +2 -0
- package/lib/buttons/DestroyButton.js +1 -12
- package/lib/buttons/EditButton.d.ts +2 -0
- package/lib/buttons/EditButton.js +0 -6
- package/lib/buttons/InactivateButton.d.ts +2 -0
- package/lib/buttons/InactivateButton.js +0 -6
- package/lib/buttons/InfoButton.d.ts +2 -0
- package/lib/buttons/InfoButton.js +1 -11
- package/lib/buttons/PrimaryButton.d.ts +2 -0
- package/lib/buttons/PrimaryButton.js +1 -11
- package/lib/buttons/RestoreButton.d.ts +2 -0
- package/lib/buttons/RestoreButton.js +0 -6
- package/lib/buttons/SaveButton.d.ts +2 -0
- package/lib/buttons/SaveButton.js +1 -11
- package/lib/buttons/SuccessButton.d.ts +2 -0
- package/lib/buttons/SuccessButton.js +1 -11
- package/lib/buttons/WarningButton.d.ts +2 -0
- package/lib/buttons/WarningButton.js +1 -11
- package/lib/buttons/button_container/index.js +5 -11
- package/lib/buttons/index.d.ts +6 -1
- package/lib/buttons/index.js +0 -18
- package/lib/buttons/split_button/index.d.ts +2 -0
- package/lib/buttons/split_button/index.js +11 -17
- package/lib/buttons/types.d.ts +6 -2
- package/lib/calendar/DangerCalendar.js +1 -11
- package/lib/calendar/InfoCalendar.js +1 -11
- package/lib/calendar/PrimaryCalendar.js +1 -11
- package/lib/calendar/SuccessCalendar.js +1 -11
- package/lib/calendar/WarningCalendar.js +1 -11
- package/lib/calendar/base/Day.js +2 -13
- package/lib/calendar/base/Month.js +1 -18
- package/lib/calendar/base/Week.js +2 -18
- package/lib/calendar/base/helpers.js +8 -24
- package/lib/calendar/base/index.js +13 -37
- package/lib/calendar/index.d.ts +4 -1
- package/lib/calendar/index.js +0 -8
- package/lib/checkbox/Label.js +1 -7
- package/lib/checkbox/index.js +28 -54
- package/lib/checkbox/types.d.ts +2 -2
- package/lib/dialog/Alert.d.ts +2 -0
- package/lib/dialog/Alert.js +0 -8
- package/lib/dialog/Custom.d.ts +2 -0
- package/lib/dialog/Custom.js +5 -17
- package/lib/dialog/Error.d.ts +2 -0
- package/lib/dialog/Error.js +0 -8
- package/lib/dialog/Information.d.ts +2 -0
- package/lib/dialog/Information.js +0 -8
- package/lib/dialog/Question.d.ts +2 -0
- package/lib/dialog/Question.js +4 -15
- package/lib/dialog/Warning.d.ts +2 -0
- package/lib/dialog/Warning.js +0 -8
- package/lib/dialog/base/Content.d.ts +2 -0
- package/lib/dialog/base/Content.js +1 -6
- package/lib/dialog/base/Footer.d.ts +2 -0
- package/lib/dialog/base/Footer.js +0 -4
- package/lib/dialog/base/Header.d.ts +2 -0
- package/lib/dialog/base/Header.js +17 -14
- package/lib/dialog/base/index.d.ts +2 -0
- package/lib/dialog/base/index.js +85 -44
- package/lib/dialog/base/style.js +0 -2
- package/lib/dialog/form/index.d.ts +6 -3
- package/lib/dialog/form/index.js +20 -33
- package/lib/dialog/index.d.ts +6 -1
- package/lib/dialog/index.js +0 -9
- package/lib/dialog/types.d.ts +8 -3
- package/lib/drawer/Content.d.ts +2 -0
- package/lib/drawer/Content.js +2 -13
- package/lib/drawer/Drawer.d.ts +3 -1
- package/lib/drawer/Drawer.js +44 -60
- package/lib/drawer/Header.d.ts +2 -0
- package/lib/drawer/Header.js +10 -27
- package/lib/drawer/helpers.d.ts +2 -0
- package/lib/drawer/helpers.js +0 -4
- package/lib/drawer/index.d.ts +2 -0
- package/lib/drawer/index.js +0 -8
- package/lib/drawer/types.d.ts +4 -1
- package/lib/dropdown/Popup.js +24 -32
- package/lib/dropdown/helper.js +0 -4
- package/lib/dropdown/withDropdown.js +18 -47
- package/lib/fieldset/index.js +21 -46
- package/lib/form/Field.js +20 -46
- package/lib/form/FieldArray.js +15 -32
- package/lib/form/FieldNumber.d.ts +2 -2
- package/lib/form/FieldNumber.js +6 -20
- package/lib/form/FieldPeriod.js +9 -21
- package/lib/form/helpers.js +5 -30
- package/lib/form/index.d.ts +2 -1
- package/lib/form/index.js +45 -92
- package/lib/form/types.d.ts +8 -11
- package/lib/form/withFieldHOC.js +15 -34
- package/lib/form/withFormSecurity.js +7 -29
- package/lib/gridlayout/GridCol.js +5 -11
- package/lib/gridlayout/GridRow.js +3 -9
- package/lib/gridlayout/index.d.ts +4 -1
- package/lib/gridlayout/index.js +0 -4
- package/lib/hint/index.js +6 -11
- package/lib/icons/helper.d.ts +4 -0
- package/lib/icons/helper.js +4 -0
- package/lib/icons/index.d.ts +2 -0
- package/lib/icons/index.js +16 -26
- package/lib/icons/types.d.ts +4 -2
- package/lib/index.d.ts +3 -1
- package/lib/index.js +0 -10
- package/lib/inputs/base/InputTextBase.js +55 -75
- package/lib/inputs/base/helpers.js +6 -19
- package/lib/inputs/color/index.js +11 -38
- package/lib/inputs/date/Dialog.js +2 -7
- package/lib/inputs/date/Dropdown.js +1 -8
- package/lib/inputs/date/helpers.d.ts +1 -1
- package/lib/inputs/date/helpers.js +4 -12
- package/lib/inputs/date/index.js +65 -104
- package/lib/inputs/date/types.d.ts +2 -1
- package/lib/inputs/file/DefaultFile.js +13 -42
- package/lib/inputs/file/DragDropFile.js +37 -90
- package/lib/inputs/file/File.js +4 -25
- package/lib/inputs/file/FileButtonSettings.js +5 -11
- package/lib/inputs/file/helpers.js +0 -5
- package/lib/inputs/file/index.d.ts +4 -1
- package/lib/inputs/file/index.js +0 -6
- package/lib/inputs/file/types.d.ts +1 -1
- package/lib/inputs/inputHOC.d.ts +2 -0
- package/lib/inputs/inputHOC.js +10 -34
- package/lib/inputs/mask/BaseMask.js +21 -21
- package/lib/inputs/mask/Cnpj.js +12 -37
- package/lib/inputs/mask/Cpf.js +10 -33
- package/lib/inputs/mask/Phone.js +0 -6
- package/lib/inputs/mask/ZipCode.js +0 -6
- package/lib/inputs/mask/helpers.d.ts +2 -0
- package/lib/inputs/mask/helpers.js +9 -21
- package/lib/inputs/mask/imaskHOC.d.ts +2 -0
- package/lib/inputs/mask/imaskHOC.js +54 -85
- package/lib/inputs/mask/index.d.ts +4 -1
- package/lib/inputs/mask/index.js +0 -7
- package/lib/inputs/mask/types.d.ts +1 -1
- package/lib/inputs/multiSelect/ActionButtons.d.ts +1 -1
- package/lib/inputs/multiSelect/ActionButtons.js +7 -13
- package/lib/inputs/multiSelect/Dropdown.js +26 -49
- package/lib/inputs/multiSelect/helper.d.ts +8 -6
- package/lib/inputs/multiSelect/helper.js +7 -5
- package/lib/inputs/multiSelect/index.js +54 -114
- package/lib/inputs/multiSelect/types.d.ts +15 -6
- package/lib/inputs/number/BaseNumber.d.ts +2 -0
- package/lib/inputs/number/BaseNumber.js +3 -16
- package/lib/inputs/number/Currency.d.ts +2 -0
- package/lib/inputs/number/Currency.js +1 -7
- package/lib/inputs/number/Decimal.d.ts +2 -0
- package/lib/inputs/number/Decimal.js +0 -5
- package/lib/inputs/number/format_number.d.ts +2 -1
- package/lib/inputs/number/format_number.js +6 -9
- package/lib/inputs/number/index.d.ts +2 -0
- package/lib/inputs/number/index.js +3 -13
- package/lib/inputs/number/types.d.ts +4 -2
- package/lib/inputs/period/Dialog.js +2 -7
- package/lib/inputs/period/Dropdown.js +0 -7
- package/lib/inputs/period/PeriodList.js +1 -7
- package/lib/inputs/period/helper.js +2 -12
- package/lib/inputs/period/index.js +49 -120
- package/lib/inputs/period/types.d.ts +3 -3
- package/lib/inputs/search/index.d.ts +2 -0
- package/lib/inputs/search/index.js +18 -63
- package/lib/inputs/select/ActionButtons.d.ts +2 -0
- package/lib/inputs/select/ActionButtons.js +4 -12
- package/lib/inputs/select/Dropdown.d.ts +2 -0
- package/lib/inputs/select/Dropdown.js +29 -49
- package/lib/inputs/select/helper.d.ts +6 -9
- package/lib/inputs/select/helper.js +20 -27
- package/lib/inputs/select/index.js +9 -23
- package/lib/inputs/select/multiple/Selecteds.js +4 -8
- package/lib/inputs/select/multiple/index.js +50 -106
- package/lib/inputs/select/simple/index.js +87 -130
- package/lib/inputs/select/types.d.ts +21 -7
- package/lib/inputs/text/index.js +1 -5
- package/lib/inputs/text/types.d.ts +1 -1
- package/lib/inputs/textarea/index.js +5 -11
- package/lib/inputs/types.d.ts +5 -2
- package/lib/internals/types.d.ts +1 -0
- package/lib/internals/withTooltip.js +37 -75
- package/lib/labelMessages/index.d.ts +2 -0
- package/lib/labelMessages/index.js +26 -47
- package/lib/labelMessages/types.d.ts +3 -1
- package/lib/labels/DangerLabel.d.ts +2 -0
- package/lib/labels/DangerLabel.js +1 -11
- package/lib/labels/DefaultLabel.d.ts +2 -0
- package/lib/labels/DefaultLabel.js +19 -41
- package/lib/labels/InfoLabel.d.ts +2 -0
- package/lib/labels/InfoLabel.js +1 -11
- package/lib/labels/PrimaryLabel.d.ts +2 -0
- package/lib/labels/PrimaryLabel.js +1 -11
- package/lib/labels/SuccessLabel.d.ts +2 -0
- package/lib/labels/SuccessLabel.js +1 -11
- package/lib/labels/WarningLabel.d.ts +2 -0
- package/lib/labels/WarningLabel.js +1 -11
- package/lib/labels/index.d.ts +6 -1
- package/lib/labels/index.js +0 -10
- package/lib/labels/label_container/index.js +3 -7
- package/lib/labels/types.d.ts +3 -1
- package/lib/list/Header.d.ts +2 -0
- package/lib/list/Header.js +3 -7
- package/lib/list/Item.d.ts +2 -0
- package/lib/list/Item.js +33 -68
- package/lib/list/Separator.js +0 -4
- package/lib/list/helpers.d.ts +2 -0
- package/lib/list/helpers.js +0 -4
- package/lib/list/index.d.ts +2 -0
- package/lib/list/index.js +25 -60
- package/lib/list/types.d.ts +5 -3
- package/lib/menus/float/MenuItem.d.ts +2 -0
- package/lib/menus/float/MenuItem.js +9 -26
- package/lib/menus/float/SubMenuContainer.js +5 -17
- package/lib/menus/float/helpers.d.ts +2 -0
- package/lib/menus/float/helpers.js +0 -4
- package/lib/menus/float/index.d.ts +2 -0
- package/lib/menus/float/index.js +8 -21
- package/lib/menus/float/types.d.ts +3 -1
- package/lib/menus/index.d.ts +6 -1
- package/lib/menus/index.js +0 -3
- package/lib/menus/sidenav/ExpandMenu.d.ts +2 -0
- package/lib/menus/sidenav/ExpandMenu.js +2 -7
- package/lib/menus/sidenav/MenuLink.d.ts +2 -0
- package/lib/menus/sidenav/MenuLink.js +3 -12
- package/lib/menus/sidenav/NavMenuGroup.d.ts +2 -0
- package/lib/menus/sidenav/NavMenuGroup.js +3 -12
- package/lib/menus/sidenav/NavMenuItem.d.ts +2 -0
- package/lib/menus/sidenav/NavMenuItem.js +27 -56
- package/lib/menus/sidenav/NavSubMenuItem.d.ts +2 -0
- package/lib/menus/sidenav/NavSubMenuItem.js +8 -27
- package/lib/menus/sidenav/helpers.d.ts +2 -0
- package/lib/menus/sidenav/helpers.js +0 -9
- package/lib/menus/sidenav/index.d.ts +2 -0
- package/lib/menus/sidenav/index.js +26 -75
- package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +2 -0
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +2 -7
- package/lib/menus/sidenav/popup_menu_search/index.d.ts +2 -0
- package/lib/menus/sidenav/popup_menu_search/index.js +15 -45
- package/lib/menus/sidenav/types.d.ts +5 -3
- package/lib/noPermission/index.js +0 -6
- package/lib/panel/Content.d.ts +3 -1
- package/lib/panel/Content.js +7 -22
- package/lib/panel/DangerPanel.d.ts +3 -1
- package/lib/panel/DangerPanel.js +0 -7
- package/lib/panel/Default.d.ts +3 -1
- package/lib/panel/Default.js +20 -44
- package/lib/panel/Header.d.ts +3 -1
- package/lib/panel/Header.js +14 -30
- package/lib/panel/InfoPanel.d.ts +3 -1
- package/lib/panel/InfoPanel.js +0 -7
- package/lib/panel/PrimaryPanel.d.ts +3 -1
- package/lib/panel/PrimaryPanel.js +0 -7
- package/lib/panel/SuccessPanel.d.ts +3 -1
- package/lib/panel/SuccessPanel.js +0 -7
- package/lib/panel/ToolBar.d.ts +3 -1
- package/lib/panel/ToolBar.js +0 -5
- package/lib/panel/WarningPanel.d.ts +3 -1
- package/lib/panel/WarningPanel.js +0 -7
- package/lib/panel/helpers.d.ts +3 -1
- package/lib/panel/helpers.js +2 -10
- package/lib/panel/index.d.ts +7 -2
- package/lib/panel/index.js +0 -11
- package/lib/panel/types.d.ts +3 -1
- package/lib/permissionValidations.js +3 -15
- package/lib/popover/PopoverText.d.ts +2 -0
- package/lib/popover/PopoverText.js +0 -4
- package/lib/popover/PopoverTitle.d.ts +2 -0
- package/lib/popover/PopoverTitle.js +0 -4
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +11 -23
- package/lib/popover/types.d.ts +3 -1
- package/lib/progress/Bar.js +20 -33
- package/lib/progress/index.js +5 -14
- package/lib/radio/index.d.ts +2 -1
- package/lib/radio/index.js +26 -47
- package/lib/radio/types.d.ts +2 -0
- package/lib/skeleton/SkeletonContainer.js +3 -9
- package/lib/skeleton/index.js +10 -22
- package/lib/spinner/SpinnerLoading.js +3 -7
- package/lib/spinner/index.js +18 -40
- package/lib/split/Split.js +32 -83
- package/lib/split/SplitSide.js +6 -18
- package/lib/split/helpers.d.ts +1 -1
- package/lib/split/helpers.js +0 -4
- package/lib/split/index.d.ts +4 -1
- package/lib/split/index.js +0 -5
- package/lib/table/Body.js +22 -39
- package/lib/table/Header.js +24 -42
- package/lib/table/HeaderColumn.js +10 -21
- package/lib/table/Row.js +37 -30
- package/lib/table/RowColumn.js +12 -29
- package/lib/table/helpers.js +0 -7
- package/lib/table/index.js +33 -62
- package/lib/table/types.d.ts +8 -1
- package/lib/tabs/DropdownItems.d.ts +2 -0
- package/lib/tabs/DropdownItems.js +12 -21
- package/lib/tabs/Menu.d.ts +2 -0
- package/lib/tabs/Menu.js +5 -15
- package/lib/tabs/MenuItems.d.ts +2 -0
- package/lib/tabs/MenuItems.js +23 -33
- package/lib/tabs/Panel.d.ts +2 -0
- package/lib/tabs/Panel.js +14 -39
- package/lib/tabs/index.d.ts +2 -0
- package/lib/tabs/index.js +46 -113
- package/lib/tabs/tabHelpers.d.ts +2 -0
- package/lib/tabs/tabHelpers.js +3 -16
- package/lib/tabs/types.d.ts +3 -1
- package/lib/toolbar/ButtonBar.d.ts +2 -0
- package/lib/toolbar/ButtonBar.js +13 -29
- package/lib/toolbar/LabelBar.d.ts +2 -0
- package/lib/toolbar/LabelBar.js +11 -28
- package/lib/toolbar/Separator.js +0 -4
- package/lib/toolbar/ToolBarGroup.d.ts +2 -0
- package/lib/toolbar/ToolBarGroup.js +2 -6
- package/lib/toolbar/helpers.d.ts +2 -0
- package/lib/toolbar/helpers.js +0 -2
- package/lib/toolbar/index.d.ts +2 -0
- package/lib/toolbar/index.js +7 -23
- package/lib/toolbar/types.d.ts +4 -2
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tooltip/index.js +15 -26
- package/lib/tooltip/types.d.ts +2 -1
- package/lib/treetable/Body.js +9 -27
- package/lib/treetable/Header.js +1 -11
- package/lib/treetable/Row.js +58 -113
- package/lib/treetable/helpers.js +0 -10
- package/lib/treetable/index.js +0 -11
- package/lib/treeview/Header.js +2 -6
- package/lib/treeview/Node.js +47 -111
- package/lib/treeview/constants.js +0 -4
- package/lib/treeview/index.js +55 -134
- package/lib/treeview/types.d.ts +2 -2
- package/lib/treeview_old/Header.js +1 -6
- package/lib/treeview_old/Node.js +5 -32
- package/lib/treeview_old/index.js +1 -9
- package/lib/{types-3c6f1c20.d.ts → types-c1e2d0c9.d.ts} +3 -2
- package/lib/uitour/index.js +33 -73
- package/lib/uitour/types.d.ts +1 -1
- package/package.json +6 -3
|
@@ -5,17 +5,24 @@ import '../../@types/Align.js';
|
|
|
5
5
|
import '../../@types/Period.js';
|
|
6
6
|
import '../../@types/PermissionAttr.js';
|
|
7
7
|
|
|
8
|
+
type DescriptionKey = string | ((dataSelected: DataCombo) => string);
|
|
9
|
+
interface GetFilteredParams {
|
|
10
|
+
dataSource: DataCombo[];
|
|
11
|
+
descriptionKey: DescriptionKey;
|
|
12
|
+
inputText: string;
|
|
13
|
+
}
|
|
8
14
|
interface IActionButtonsProps {
|
|
9
15
|
handleOpenClose: () => void;
|
|
10
16
|
handleCheckAll: () => void;
|
|
11
17
|
handleUncheckAll: () => void;
|
|
12
18
|
disabled: boolean;
|
|
13
19
|
dropdownOpened?: boolean;
|
|
20
|
+
dropdownAlignButton?: 'left' | 'right';
|
|
14
21
|
}
|
|
15
22
|
interface IDropdownMultiSelectProps {
|
|
16
|
-
dataCombo
|
|
23
|
+
dataCombo?: DataCombo[];
|
|
17
24
|
idKey: string;
|
|
18
|
-
descriptionKey:
|
|
25
|
+
descriptionKey: DescriptionKey;
|
|
19
26
|
inputValue: string;
|
|
20
27
|
isAllChecked: boolean;
|
|
21
28
|
dropdownWidth: number;
|
|
@@ -37,14 +44,16 @@ interface IDropdownMultiSelectProps {
|
|
|
37
44
|
dropdownMaxHeight?: number;
|
|
38
45
|
}
|
|
39
46
|
interface IMultiSelectProps {
|
|
40
|
-
dataSource
|
|
47
|
+
dataSource?: DataCombo[];
|
|
41
48
|
idKey: string;
|
|
42
|
-
descriptionKey:
|
|
49
|
+
descriptionKey: DescriptionKey;
|
|
43
50
|
value?: any[];
|
|
44
51
|
gridLayout?: string;
|
|
45
|
-
onSelect
|
|
52
|
+
onSelect?: (data?: string[]) => void;
|
|
46
53
|
onBlur?: (e: CustomInputEvent) => void;
|
|
47
54
|
disabled?: boolean;
|
|
55
|
+
dropdownAlignButton?: 'left' | 'right';
|
|
56
|
+
label?: string;
|
|
48
57
|
}
|
|
49
58
|
|
|
50
|
-
export { IActionButtonsProps, IDropdownMultiSelectProps, IMultiSelectProps };
|
|
59
|
+
export { DescriptionKey, GetFilteredParams, IActionButtonsProps, IDropdownMultiSelectProps, IMultiSelectProps };
|
|
@@ -8,6 +8,8 @@ import '../types.js';
|
|
|
8
8
|
import '../../@types/DataCombo.js';
|
|
9
9
|
import '../../drawer/types.js';
|
|
10
10
|
import '../../@types/Position.js';
|
|
11
|
+
import '../../@types/Icon.js';
|
|
12
|
+
import '../../icons/helper.js';
|
|
11
13
|
|
|
12
14
|
declare const BaseNumber: (props: IBaseNumberProps) => JSX.Element;
|
|
13
15
|
|
|
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _BaseMask = _interopRequireDefault(require("../mask/BaseMask"));
|
|
11
|
-
|
|
12
9
|
var _format_number = require("./format_number");
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
|
|
18
12
|
var returnEventFormattedValue = function returnEventFormattedValue(props, event) {
|
|
19
13
|
if (props.returnFormattedValueOnBlur || props.returnFormattedValueOnKeyDown) {
|
|
20
14
|
// Retornando um objeto com a mesma estrutura do Proxy original
|
|
@@ -22,25 +16,21 @@ var returnEventFormattedValue = function returnEventFormattedValue(props, event)
|
|
|
22
16
|
// O retorno poderá ser modificado conforme necessidade, desde que seja
|
|
23
17
|
// mantido o path até a propriedade value e name.
|
|
24
18
|
var _event$target = event.target,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
value = _event$target.value,
|
|
20
|
+
name = _event$target.name;
|
|
28
21
|
var teste = _extends({}, event, {
|
|
29
22
|
target: {
|
|
30
23
|
value: (0, _format_number.numberToEnUS)(value),
|
|
31
24
|
name: name
|
|
32
25
|
}
|
|
33
26
|
});
|
|
34
|
-
|
|
35
27
|
return teste;
|
|
36
28
|
}
|
|
37
|
-
|
|
38
29
|
return event;
|
|
39
30
|
};
|
|
40
|
-
|
|
41
31
|
var getEventProps = function getEventProps(props) {
|
|
42
32
|
var returnFormattedValueOnBlur = props.returnFormattedValueOnBlur,
|
|
43
|
-
|
|
33
|
+
returnFormattedValueOnKeyDown = props.returnFormattedValueOnKeyDown;
|
|
44
34
|
if (props.isNumeric) return {};
|
|
45
35
|
return {
|
|
46
36
|
onBlur: function onBlur(e) {
|
|
@@ -57,13 +47,11 @@ var getEventProps = function getEventProps(props) {
|
|
|
57
47
|
}
|
|
58
48
|
};
|
|
59
49
|
};
|
|
60
|
-
|
|
61
50
|
var BaseNumber = function BaseNumber(props) {
|
|
62
51
|
var eventProps = _extends({}, props, {
|
|
63
52
|
returnFormattedValueOnBlur: true,
|
|
64
53
|
returnFormattedValueOnKeyDown: true
|
|
65
54
|
});
|
|
66
|
-
|
|
67
55
|
return /*#__PURE__*/_react.default.createElement(_BaseMask.default, _extends({
|
|
68
56
|
value: (0, _format_number.numberToPtBR)(props.value),
|
|
69
57
|
thousandsSeparator: ".",
|
|
@@ -72,6 +60,5 @@ var BaseNumber = function BaseNumber(props) {
|
|
|
72
60
|
isNumeric: true
|
|
73
61
|
}, props, getEventProps(eventProps)));
|
|
74
62
|
};
|
|
75
|
-
|
|
76
63
|
var _default = BaseNumber;
|
|
77
64
|
exports.default = _default;
|
|
@@ -8,6 +8,8 @@ import '../types.js';
|
|
|
8
8
|
import '../../@types/DataCombo.js';
|
|
9
9
|
import '../../drawer/types.js';
|
|
10
10
|
import '../../@types/Position.js';
|
|
11
|
+
import '../../@types/Icon.js';
|
|
12
|
+
import '../../icons/helper.js';
|
|
11
13
|
|
|
12
14
|
declare const CurrencyField: (props: ICurrencyProps) => JSX.Element;
|
|
13
15
|
|
|
@@ -4,18 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _BaseNumber = _interopRequireDefault(require("./BaseNumber"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
|
|
16
11
|
var CurrencyField = function CurrencyField(props) {
|
|
17
12
|
var _props$currencySymbol = props.currencySymbol,
|
|
18
|
-
|
|
13
|
+
currencySymbol = _props$currencySymbol === void 0 ? 'R$' : _props$currencySymbol;
|
|
19
14
|
var leftElements = props.displayCurrencySymbol ? /*#__PURE__*/_react.default.createElement("span", {
|
|
20
15
|
className: "currency-symbol"
|
|
21
16
|
}, currencySymbol) : [];
|
|
@@ -23,6 +18,5 @@ var CurrencyField = function CurrencyField(props) {
|
|
|
23
18
|
leftElements: leftElements
|
|
24
19
|
}));
|
|
25
20
|
};
|
|
26
|
-
|
|
27
21
|
var _default = CurrencyField;
|
|
28
22
|
exports.default = _default;
|
|
@@ -8,6 +8,8 @@ import '../types.js';
|
|
|
8
8
|
import '../../@types/DataCombo.js';
|
|
9
9
|
import '../../drawer/types.js';
|
|
10
10
|
import '../../@types/Position.js';
|
|
11
|
+
import '../../@types/Icon.js';
|
|
12
|
+
import '../../icons/helper.js';
|
|
11
13
|
|
|
12
14
|
declare const DecimalField: (props: IBaseNumberProps) => JSX.Element;
|
|
13
15
|
|
|
@@ -4,16 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _BaseNumber = _interopRequireDefault(require("./BaseNumber"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
var DecimalField = function DecimalField(props) {
|
|
15
11
|
return /*#__PURE__*/_react.default.createElement(_BaseNumber.default, props);
|
|
16
12
|
};
|
|
17
|
-
|
|
18
13
|
var _default = DecimalField;
|
|
19
14
|
exports.default = _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const numberToPtBR: (value?: string | number) => string | undefined;
|
|
2
2
|
declare const numberToEnUS: (value: string) => string | number;
|
|
3
|
+
declare const formatCnpjCpfField: (value: string) => string;
|
|
3
4
|
|
|
4
|
-
export { numberToEnUS, numberToPtBR };
|
|
5
|
+
export { formatCnpjCpfField, numberToEnUS, numberToPtBR };
|
|
@@ -3,27 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.numberToPtBR = exports.numberToEnUS = void 0;
|
|
7
|
-
|
|
6
|
+
exports.numberToPtBR = exports.numberToEnUS = exports.formatCnpjCpfField = void 0;
|
|
8
7
|
var numberToPtBR = function numberToPtBR(value) {
|
|
9
8
|
if (value !== undefined && typeof value === 'number') {
|
|
10
9
|
return value.toLocaleString('pt-BR');
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
return value;
|
|
14
12
|
};
|
|
15
|
-
|
|
16
13
|
exports.numberToPtBR = numberToPtBR;
|
|
17
|
-
|
|
18
14
|
var numberToEnUS = function numberToEnUS(value) {
|
|
19
15
|
var formattedNumber;
|
|
20
|
-
|
|
21
16
|
if (value) {
|
|
22
17
|
formattedNumber = value.replace('.', '').replace(',', '.');
|
|
23
18
|
return Number(formattedNumber);
|
|
24
19
|
}
|
|
25
|
-
|
|
26
20
|
return value;
|
|
27
21
|
};
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
exports.numberToEnUS = numberToEnUS;
|
|
23
|
+
var formatCnpjCpfField = function formatCnpjCpfField(value) {
|
|
24
|
+
return value.replace(/[._\-/]/g, '');
|
|
25
|
+
};
|
|
26
|
+
exports.formatCnpjCpfField = formatCnpjCpfField;
|
|
@@ -10,6 +10,8 @@ import '../types.js';
|
|
|
10
10
|
import '../../@types/DataCombo.js';
|
|
11
11
|
import '../../drawer/types.js';
|
|
12
12
|
import '../../@types/Position.js';
|
|
13
|
+
import '../../@types/Icon.js';
|
|
14
|
+
import '../../icons/helper.js';
|
|
13
15
|
|
|
14
16
|
declare const NumberField: (props: INumberFieldProps) => JSX.Element;
|
|
15
17
|
|
|
@@ -16,28 +16,19 @@ Object.defineProperty(exports, "DecimalField", {
|
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
exports.default = void 0;
|
|
19
|
-
|
|
20
19
|
var _react = _interopRequireDefault(require("react"));
|
|
21
|
-
|
|
22
20
|
var _BaseMask = _interopRequireDefault(require("../mask/BaseMask"));
|
|
23
|
-
|
|
24
21
|
var _Currency = _interopRequireDefault(require("./Currency"));
|
|
25
|
-
|
|
26
22
|
var _Decimal = _interopRequireDefault(require("./Decimal"));
|
|
27
|
-
|
|
28
23
|
require("../../assets/styles/numbers.scss");
|
|
29
|
-
|
|
30
24
|
var _format_number = require("./format_number");
|
|
31
|
-
|
|
32
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
-
|
|
34
26
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
|
-
|
|
36
27
|
var NumberField = function NumberField(props) {
|
|
37
28
|
var _props$textAlign = props.textAlign,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
textAlign = _props$textAlign === void 0 ? 'left' : _props$textAlign,
|
|
30
|
+
_props$value = props.value,
|
|
31
|
+
value = _props$value === void 0 ? '' : _props$value;
|
|
41
32
|
return /*#__PURE__*/_react.default.createElement(_BaseMask.default, _extends({
|
|
42
33
|
value: typeof value === 'number' ? (0, _format_number.numberToPtBR)(value) : value,
|
|
43
34
|
textAlign: textAlign,
|
|
@@ -47,6 +38,5 @@ var NumberField = function NumberField(props) {
|
|
|
47
38
|
padFractionalZeros: false
|
|
48
39
|
}, props));
|
|
49
40
|
};
|
|
50
|
-
|
|
51
41
|
var _default = NumberField;
|
|
52
42
|
exports.default = _default;
|
|
@@ -7,9 +7,11 @@ import '../../@types/Period.js';
|
|
|
7
7
|
import '../../@types/DataCombo.js';
|
|
8
8
|
import '../../drawer/types.js';
|
|
9
9
|
import '../../@types/Position.js';
|
|
10
|
+
import '../../@types/Icon.js';
|
|
11
|
+
import '../../icons/helper.js';
|
|
10
12
|
|
|
11
13
|
interface INumberFieldProps extends IMaskHOCProps {
|
|
12
|
-
value?: string;
|
|
14
|
+
value?: number | string;
|
|
13
15
|
permissionAttr?: PermissionAttr;
|
|
14
16
|
disabled?: boolean;
|
|
15
17
|
onChange?: (e?: CustomInputEvent, maskValue?: string, date?: string | {
|
|
@@ -18,7 +20,7 @@ interface INumberFieldProps extends IMaskHOCProps {
|
|
|
18
20
|
}) => void;
|
|
19
21
|
}
|
|
20
22
|
interface IBaseNumberProps extends INumberFieldProps {
|
|
21
|
-
value?: string;
|
|
23
|
+
value?: number | string;
|
|
22
24
|
leftElements?: JSX.Element | JSX.Element[];
|
|
23
25
|
onBlur?: (e: CustomInputEvent) => void;
|
|
24
26
|
returnFormattedValueOnBlur?: boolean;
|
|
@@ -4,17 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _base = _interopRequireDefault(require("../../dialog/base"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
var Dialog = function Dialog(_ref) {
|
|
15
11
|
var _handlerClose = _ref.handlerClose,
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
dialogSize = _ref.dialogSize;
|
|
18
14
|
return /*#__PURE__*/_react.default.createElement(_base.default, {
|
|
19
15
|
width: dialogSize.width,
|
|
20
16
|
height: dialogSize.height,
|
|
@@ -26,6 +22,5 @@ var Dialog = function Dialog(_ref) {
|
|
|
26
22
|
wrapperClassName: ""
|
|
27
23
|
}, children);
|
|
28
24
|
};
|
|
29
|
-
|
|
30
25
|
var _default = Dialog;
|
|
31
26
|
exports.default = _default;
|
|
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
11
|
-
|
|
12
9
|
var _helper = _interopRequireDefault(require("./helper"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
var body = document.getElementsByTagName('body')[0];
|
|
17
|
-
|
|
18
12
|
var Dropdown = function Dropdown(props) {
|
|
19
13
|
var elementRef = (0, _react.useRef)(document.createElement('div'));
|
|
20
14
|
(0, _react.useEffect)(function () {
|
|
@@ -31,6 +25,5 @@ var Dropdown = function Dropdown(props) {
|
|
|
31
25
|
}, [props]);
|
|
32
26
|
return /*#__PURE__*/_reactDom.default.createPortal(props.children, elementRef.current);
|
|
33
27
|
};
|
|
34
|
-
|
|
35
28
|
var _default = Dropdown;
|
|
36
29
|
exports.default = _default;
|
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _helper = require("./helper");
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
var periodOptions = [{
|
|
15
11
|
id: 'today',
|
|
16
12
|
label: 'Hoje'
|
|
@@ -33,10 +29,9 @@ var periodOptions = [{
|
|
|
33
29
|
id: 'custom',
|
|
34
30
|
label: 'Customizar'
|
|
35
31
|
}];
|
|
36
|
-
|
|
37
32
|
var PeriodList = function PeriodList(_ref) {
|
|
38
33
|
var selected = _ref.selected,
|
|
39
|
-
|
|
34
|
+
handleOnSelect = _ref.handleOnSelect;
|
|
40
35
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
41
36
|
className: "dropdown-period"
|
|
42
37
|
}, periodOptions.map(function (item) {
|
|
@@ -61,6 +56,5 @@ var PeriodList = function PeriodList(_ref) {
|
|
|
61
56
|
}, item.label)));
|
|
62
57
|
}));
|
|
63
58
|
};
|
|
64
|
-
|
|
65
59
|
var _default = PeriodList;
|
|
66
60
|
exports.default = _default;
|
|
@@ -4,21 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isDateValid = exports.getDropdownItemCssClass = exports.default = exports.CalcDatesByPeriod = void 0;
|
|
7
|
-
|
|
8
7
|
var _moment = _interopRequireDefault(require("moment"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var getCalendarDropdownStyle = function getCalendarDropdownStyle(_ref) {
|
|
13
10
|
var topPosition = _ref.topPosition,
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
leftPosition = _ref.leftPosition,
|
|
12
|
+
width = _ref.width;
|
|
16
13
|
return "top: ".concat(topPosition, "px;\n left: ").concat(leftPosition, "px;\n width:").concat(width, "px");
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
var _default = getCalendarDropdownStyle;
|
|
20
16
|
exports.default = _default;
|
|
21
|
-
|
|
22
17
|
var getDropdownItemCssClass = function getDropdownItemCssClass() {
|
|
23
18
|
var selected = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
24
19
|
var disabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -29,9 +24,7 @@ var getDropdownItemCssClass = function getDropdownItemCssClass() {
|
|
|
29
24
|
className += !selected && !disabled && striped ? ' -striped ' : '';
|
|
30
25
|
return className;
|
|
31
26
|
};
|
|
32
|
-
|
|
33
27
|
exports.getDropdownItemCssClass = getDropdownItemCssClass;
|
|
34
|
-
|
|
35
28
|
var CalcDatesByPeriod = function CalcDatesByPeriod(dateType) {
|
|
36
29
|
var currentDate = (0, _moment.default)();
|
|
37
30
|
var dateTypes = {
|
|
@@ -67,11 +60,8 @@ var CalcDatesByPeriod = function CalcDatesByPeriod(dateType) {
|
|
|
67
60
|
};
|
|
68
61
|
return dateTypes[dateType]();
|
|
69
62
|
};
|
|
70
|
-
|
|
71
63
|
exports.CalcDatesByPeriod = CalcDatesByPeriod;
|
|
72
|
-
|
|
73
64
|
var isDateValid = function isDateValid(date) {
|
|
74
65
|
return date && (0, _moment.default)(date).isValid();
|
|
75
66
|
};
|
|
76
|
-
|
|
77
67
|
exports.isDateValid = isDateValid;
|