linear-react-components-ui 0.4.77-beta.9 → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +99 -0
- package/.gitlab-ci.yml +19 -0
- package/.husky/pre-push +4 -0
- package/.vscode/launch.json +15 -0
- package/.vscode/settings.json +5 -2
- package/babel.config.json +11 -0
- package/config/getHttpsConfig.js +56 -0
- package/config/paths.js +140 -0
- package/config/webpackDevServer.config.js +128 -0
- package/jest.config.js +3 -3
- package/lib/@types/Align.d.ts +3 -0
- package/lib/@types/Align.js +5 -0
- package/lib/@types/ButtonTypes.d.ts +3 -0
- package/lib/@types/ButtonTypes.js +5 -0
- package/lib/@types/ColorStyles.d.ts +3 -0
- package/lib/@types/ColorStyles.js +5 -0
- package/lib/@types/DataCombo.d.ts +3 -0
- package/lib/@types/DataCombo.js +5 -0
- package/lib/@types/Icon.d.ts +5 -0
- package/lib/@types/Icon.js +5 -0
- package/lib/@types/LabelStyles.d.ts +3 -0
- package/lib/@types/Period.d.ts +6 -0
- package/lib/@types/Period.js +5 -0
- package/lib/@types/PermissionAttr.d.ts +14 -0
- package/lib/@types/PointerEvents.d.ts +3 -0
- package/lib/@types/Position.d.ts +3 -0
- package/lib/@types/PositionAlert.d.ts +3 -0
- package/lib/@types/PositionAlert.js +5 -0
- package/lib/@types/Size.d.ts +3 -0
- package/lib/@types/SizePixels.d.ts +3 -0
- package/lib/@types/StorageMock.d.ts +5 -0
- package/lib/@types/StorageMock.js +5 -0
- package/lib/alerts/AlertContainer.d.ts +16 -0
- package/lib/alerts/AlertContainer.js +16 -21
- package/lib/alerts/AlertProvider.d.ts +7 -0
- package/lib/alerts/AlertProvider.js +13 -18
- package/lib/alerts/BaseAlert.d.ts +7 -0
- package/lib/alerts/BaseAlert.js +8 -11
- package/lib/alerts/Message.d.ts +7 -0
- package/lib/alerts/Message.js +41 -50
- package/lib/alerts/helpers.d.ts +7 -0
- package/lib/alerts/helpers.js +4 -7
- package/lib/alerts/index.d.ts +6 -0
- package/lib/alerts/index.js +5 -5
- package/lib/alerts/types.d.ts +48 -0
- package/lib/alerts/types.js +5 -0
- package/lib/alerts/withAlert.d.ts +7 -0
- package/lib/alerts/withAlert.js +8 -8
- package/lib/assets/styles/commons.scss +0 -10
- package/lib/assets/styles/dropdown.scss +0 -1
- package/lib/assets/styles/list.scss +0 -8
- package/lib/assets/styles/sidenav.scss +42 -93
- package/lib/assets/styles/table.scss +7 -2
- package/lib/avatar/index.d.ts +12 -0
- package/lib/avatar/index.js +21 -66
- package/lib/avatar/types.d.ts +31 -0
- package/lib/avatar/types.js +5 -0
- package/lib/badge/index.d.ts +6 -0
- package/lib/badge/index.js +11 -27
- package/lib/badge/types.d.ts +13 -0
- package/lib/badge/types.js +5 -0
- package/lib/buttons/ActivateButton.d.ts +9 -0
- package/lib/buttons/ActivateButton.js +6 -6
- package/lib/buttons/AddButton.d.ts +9 -0
- package/lib/buttons/AddButton.js +6 -6
- package/lib/buttons/Button.d.ts +12 -0
- package/lib/buttons/Button.js +22 -14
- package/lib/buttons/ButtonGroups.d.ts +8 -0
- package/lib/buttons/ButtonGroups.js +4 -9
- package/lib/buttons/CancelButton.d.ts +9 -0
- package/lib/buttons/CancelButton.js +19 -6
- package/lib/buttons/DangerButton.d.ts +9 -0
- package/lib/buttons/DangerButton.js +16 -21
- package/lib/buttons/DefaultButton.d.ts +12 -0
- package/lib/buttons/DefaultButton.js +73 -135
- package/lib/buttons/DestroyButton.d.ts +9 -0
- package/lib/buttons/DestroyButton.js +16 -7
- package/lib/buttons/EditButton.d.ts +9 -0
- package/lib/buttons/EditButton.js +6 -6
- package/lib/buttons/InactivateButton.d.ts +9 -0
- package/lib/buttons/InactivateButton.js +6 -6
- package/lib/buttons/InfoButton.d.ts +9 -0
- package/lib/buttons/InfoButton.js +16 -21
- package/lib/buttons/PrimaryButton.d.ts +9 -0
- package/lib/buttons/PrimaryButton.js +16 -21
- package/lib/buttons/RestoreButton.d.ts +9 -0
- package/lib/buttons/RestoreButton.js +6 -6
- package/lib/buttons/SaveButton.d.ts +9 -0
- package/lib/buttons/SaveButton.js +18 -5
- package/lib/buttons/SuccessButton.d.ts +9 -0
- package/lib/buttons/SuccessButton.js +15 -20
- package/lib/buttons/WarningButton.d.ts +9 -0
- package/lib/buttons/WarningButton.js +15 -20
- package/lib/buttons/button_container/index.d.ts +12 -0
- package/lib/buttons/button_container/index.js +10 -23
- package/lib/buttons/index.d.ts +21 -0
- package/lib/buttons/index.js +18 -18
- package/lib/buttons/split_button/index.d.ts +9 -0
- package/lib/buttons/split_button/index.js +18 -35
- package/lib/buttons/types.d.ts +44 -0
- package/lib/calendar/DangerCalendar.d.ts +7 -0
- package/lib/calendar/DangerCalendar.js +15 -6
- package/lib/calendar/InfoCalendar.d.ts +7 -0
- package/lib/calendar/InfoCalendar.js +15 -6
- package/lib/calendar/PrimaryCalendar.d.ts +7 -0
- package/lib/calendar/PrimaryCalendar.js +15 -6
- package/lib/calendar/SuccessCalendar.d.ts +7 -0
- package/lib/calendar/SuccessCalendar.js +15 -6
- package/lib/calendar/WarningCalendar.d.ts +7 -0
- package/lib/calendar/WarningCalendar.js +15 -6
- package/lib/calendar/base/Day.d.ts +7 -0
- package/lib/calendar/base/Day.js +8 -14
- package/lib/calendar/base/Month.d.ts +7 -0
- package/lib/calendar/base/Month.js +5 -10
- package/lib/calendar/base/Week.d.ts +7 -0
- package/lib/calendar/base/Week.js +5 -11
- package/lib/calendar/base/helpers.d.ts +62 -0
- package/lib/calendar/base/helpers.js +9 -9
- package/lib/calendar/base/index.d.ts +7 -0
- package/lib/calendar/base/index.js +44 -47
- package/lib/calendar/index.d.ts +10 -0
- package/lib/calendar/index.js +9 -9
- package/lib/calendar/types.d.ts +25 -0
- package/lib/calendar/types.js +5 -0
- package/lib/checkbox/Label.d.ts +11 -0
- package/lib/checkbox/Label.js +7 -17
- package/lib/checkbox/index.d.ts +13 -0
- package/lib/checkbox/index.js +52 -89
- package/lib/checkbox/types.d.ts +42 -0
- package/lib/dialog/Alert.d.ts +6 -0
- package/lib/dialog/Alert.js +9 -14
- package/lib/dialog/Custom.d.ts +6 -0
- package/lib/dialog/Custom.js +26 -34
- package/lib/dialog/Error.d.ts +6 -0
- package/lib/dialog/Error.js +7 -12
- package/lib/dialog/Information.d.ts +6 -0
- package/lib/dialog/Information.js +7 -12
- package/lib/dialog/Question.d.ts +6 -0
- package/lib/dialog/Question.js +14 -25
- package/lib/dialog/Warning.d.ts +6 -0
- package/lib/dialog/Warning.js +7 -12
- package/lib/dialog/base/Content.d.ts +6 -0
- package/lib/dialog/base/Content.js +4 -13
- package/lib/dialog/base/Footer.d.ts +6 -0
- package/lib/dialog/base/Footer.js +6 -12
- package/lib/dialog/base/Header.d.ts +6 -0
- package/lib/dialog/base/Header.js +17 -31
- package/lib/dialog/base/index.d.ts +6 -0
- package/lib/dialog/base/index.js +13 -35
- package/lib/dialog/base/style.js +2 -2
- package/lib/dialog/form/index.d.ts +6 -0
- package/lib/dialog/form/index.js +34 -44
- package/lib/dialog/index.d.ts +10 -0
- package/lib/dialog/index.js +10 -10
- package/lib/dialog/types.d.ts +68 -0
- package/lib/dialog/types.js +5 -0
- package/lib/drawer/Content.d.ts +7 -0
- package/lib/drawer/Content.js +7 -16
- package/lib/drawer/Drawer.d.ts +7 -0
- package/lib/drawer/Drawer.js +36 -57
- package/lib/drawer/Header.d.ts +7 -0
- package/lib/drawer/Header.js +28 -47
- package/lib/drawer/helpers.d.ts +7 -0
- package/lib/drawer/helpers.js +4 -4
- package/lib/drawer/index.d.ts +9 -0
- package/lib/drawer/index.js +6 -6
- package/lib/drawer/types.d.ts +34 -0
- package/lib/drawer/types.js +5 -0
- package/lib/dropdown/Popup.d.ts +6 -0
- package/lib/dropdown/Popup.js +36 -20
- package/lib/dropdown/helper.d.ts +4 -0
- package/lib/dropdown/helper.js +2 -2
- package/lib/dropdown/types.d.ts +43 -0
- package/lib/dropdown/withDropdown.d.ts +10 -0
- package/lib/dropdown/withDropdown.js +22 -47
- package/lib/fieldset/index.d.ts +8 -0
- package/lib/fieldset/index.js +19 -50
- package/lib/fieldset/types.d.ts +28 -0
- package/lib/fieldset/types.js +5 -0
- package/lib/form/Field.d.ts +6 -0
- package/lib/form/Field.js +22 -49
- package/lib/form/FieldArray.d.ts +6 -0
- package/lib/form/FieldArray.js +27 -57
- package/lib/form/FieldNumber.d.ts +6 -0
- package/lib/form/FieldNumber.js +10 -32
- package/lib/form/FieldPeriod.d.ts +6 -0
- package/lib/form/FieldPeriod.js +29 -51
- package/lib/form/helpers.d.ts +11 -0
- package/lib/form/helpers.js +11 -17
- package/lib/form/index.d.ts +9 -0
- package/lib/form/index.js +68 -103
- package/lib/form/types.d.ts +167 -0
- package/lib/form/types.js +5 -0
- package/lib/form/withFieldHOC.d.ts +6 -0
- package/lib/form/withFieldHOC.js +45 -125
- package/lib/form/withFormSecurity.d.ts +7 -0
- package/lib/form/withFormSecurity.js +20 -41
- package/lib/gridlayout/GridCol.d.ts +6 -0
- package/lib/gridlayout/GridCol.js +7 -22
- package/lib/gridlayout/GridRow.d.ts +6 -0
- package/lib/gridlayout/GridRow.js +8 -28
- package/lib/gridlayout/index.d.ts +5 -0
- package/lib/gridlayout/index.js +5 -5
- package/lib/gridlayout/types.d.ts +20 -0
- package/lib/gridlayout/types.js +5 -0
- package/lib/icons/helper.d.ts +560 -0
- package/lib/icons/helper.js +560 -563
- package/lib/icons/index.d.ts +8 -0
- package/lib/icons/index.js +28 -45
- package/lib/icons/types.d.ts +28 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +10 -10
- package/lib/inputs/base/InputTextBase.d.ts +8 -0
- package/lib/inputs/base/InputTextBase.js +54 -163
- package/lib/inputs/base/helpers.d.ts +14 -0
- package/lib/inputs/base/helpers.js +9 -9
- package/lib/inputs/base/types.d.ts +68 -0
- package/lib/inputs/base/types.js +5 -0
- package/lib/inputs/color/index.d.ts +7 -0
- package/lib/inputs/color/index.js +40 -38
- package/lib/inputs/color/types.d.ts +14 -0
- package/lib/inputs/color/types.js +5 -0
- package/lib/inputs/date/Dialog.d.ts +10 -0
- package/lib/inputs/date/Dialog.js +4 -11
- package/lib/inputs/date/Dropdown.d.ts +10 -0
- package/lib/inputs/date/Dropdown.js +21 -73
- package/lib/inputs/date/helpers.d.ts +14 -0
- package/lib/inputs/date/helpers.js +4 -4
- package/lib/inputs/date/index.d.ts +10 -0
- package/lib/inputs/date/index.js +259 -415
- package/lib/inputs/date/types.d.ts +53 -0
- package/lib/inputs/date/types.js +5 -0
- package/lib/inputs/inputHOC.d.ts +11 -0
- package/lib/inputs/inputHOC.js +48 -100
- package/lib/inputs/mask/BaseMask.d.ts +12 -0
- package/lib/inputs/mask/BaseMask.js +6 -20
- package/lib/inputs/mask/Cnpj.d.ts +12 -0
- package/lib/inputs/mask/Cnpj.js +17 -24
- package/lib/inputs/mask/Cpf.d.ts +12 -0
- package/lib/inputs/mask/Cpf.js +18 -26
- package/lib/inputs/mask/Phone.d.ts +9 -0
- package/lib/inputs/mask/Phone.js +5 -13
- package/lib/inputs/mask/ZipCode.d.ts +9 -0
- package/lib/inputs/mask/ZipCode.js +5 -5
- package/lib/inputs/mask/helpers.d.ts +14 -0
- package/lib/inputs/mask/helpers.js +21 -36
- package/lib/inputs/mask/imaskHOC.d.ts +14 -0
- package/lib/inputs/mask/imaskHOC.js +188 -257
- package/lib/inputs/mask/index.d.ts +11 -0
- package/lib/inputs/mask/index.js +8 -8
- package/lib/inputs/mask/types.d.ts +66 -0
- package/lib/inputs/mask/types.js +5 -0
- package/lib/inputs/multiSelect/ActionButtons.d.ts +10 -0
- package/lib/inputs/multiSelect/ActionButtons.js +9 -21
- package/lib/inputs/multiSelect/Dropdown.d.ts +10 -0
- package/lib/inputs/multiSelect/Dropdown.js +60 -87
- package/lib/inputs/multiSelect/helper.d.ts +9 -0
- package/lib/inputs/multiSelect/helper.js +2 -2
- package/lib/inputs/multiSelect/index.d.ts +10 -0
- package/lib/inputs/multiSelect/index.js +67 -90
- package/lib/inputs/multiSelect/types.d.ts +49 -0
- package/lib/inputs/multiSelect/types.js +5 -0
- package/lib/inputs/number/BaseNumber.d.ts +9 -0
- package/lib/inputs/number/BaseNumber.js +15 -27
- package/lib/inputs/number/Currency.d.ts +9 -0
- package/lib/inputs/number/Currency.js +8 -18
- package/lib/inputs/number/Decimal.d.ts +9 -0
- package/lib/inputs/number/Decimal.js +4 -4
- package/lib/inputs/number/format_number.d.ts +4 -0
- package/lib/inputs/number/index.d.ts +11 -0
- package/lib/inputs/number/index.js +14 -20
- package/lib/inputs/number/types.d.ts +27 -0
- package/lib/inputs/number/types.js +5 -0
- package/lib/inputs/period/Dialog.d.ts +11 -0
- package/lib/inputs/period/Dialog.js +4 -11
- package/lib/inputs/period/Dropdown.d.ts +11 -0
- package/lib/inputs/period/Dropdown.js +19 -73
- package/lib/inputs/period/PeriodList.d.ts +11 -0
- package/lib/inputs/period/PeriodList.js +12 -25
- package/lib/inputs/period/helper.d.ts +19 -0
- package/lib/inputs/period/helper.js +33 -74
- package/lib/inputs/period/index.d.ts +11 -0
- package/lib/inputs/period/index.js +136 -186
- package/lib/inputs/period/types.d.ts +58 -0
- package/lib/inputs/period/types.js +5 -0
- package/lib/inputs/search/index.d.ts +11 -0
- package/lib/inputs/search/index.js +133 -265
- package/lib/inputs/select/ActionButtons.d.ts +11 -0
- package/lib/inputs/select/ActionButtons.js +19 -25
- package/lib/inputs/select/Dropdown.d.ts +11 -0
- package/lib/inputs/select/Dropdown.js +42 -75
- package/lib/inputs/select/helper.d.ts +25 -0
- package/lib/inputs/select/helper.js +18 -14
- package/lib/inputs/select/index.d.ts +10 -0
- package/lib/inputs/select/index.js +15 -16
- package/lib/inputs/select/multiple/Selecteds.d.ts +10 -0
- package/lib/inputs/select/multiple/Selecteds.js +9 -17
- package/lib/inputs/select/multiple/index.d.ts +10 -0
- package/lib/inputs/select/multiple/index.js +293 -418
- package/lib/inputs/select/simple/index.d.ts +10 -0
- package/lib/inputs/select/simple/index.js +310 -463
- package/lib/inputs/select/types.d.ts +97 -0
- package/lib/inputs/select/types.js +5 -0
- package/lib/inputs/text/index.d.ts +9 -0
- package/lib/inputs/text/index.js +5 -4
- package/lib/inputs/text/types.d.ts +22 -0
- package/lib/inputs/text/types.js +5 -0
- package/lib/inputs/textarea/index.d.ts +5 -0
- package/lib/inputs/textarea/index.js +9 -19
- package/lib/inputs/textarea/types.d.ts +8 -0
- package/lib/inputs/textarea/types.js +5 -0
- package/lib/inputs/types.d.ts +146 -0
- package/lib/inputs/types.js +5 -0
- package/lib/internals/colorStyles.d.ts +9 -0
- package/lib/internals/colorStyles.js +2 -2
- package/lib/internals/constants.d.ts +11 -0
- package/lib/internals/types.d.ts +21 -0
- package/lib/internals/withTooltip.d.ts +11 -0
- package/lib/internals/withTooltip.js +32 -40
- package/lib/labelMessages/index.d.ts +7 -0
- package/lib/labelMessages/index.js +34 -52
- package/lib/labelMessages/types.d.ts +18 -0
- package/lib/labels/DangerLabel.d.ts +9 -0
- package/lib/labels/DangerLabel.js +16 -7
- package/lib/labels/DefaultLabel.d.ts +12 -0
- package/lib/labels/DefaultLabel.js +31 -63
- package/lib/labels/InfoLabel.d.ts +9 -0
- package/lib/labels/InfoLabel.js +16 -7
- package/lib/labels/PrimaryLabel.d.ts +9 -0
- package/lib/labels/PrimaryLabel.js +16 -7
- package/lib/labels/SuccessLabel.d.ts +9 -0
- package/lib/labels/SuccessLabel.js +16 -7
- package/lib/labels/WarningLabel.d.ts +9 -0
- package/lib/labels/WarningLabel.js +16 -7
- package/lib/labels/index.d.ts +13 -0
- package/lib/labels/index.js +10 -10
- package/lib/labels/label_container/index.d.ts +12 -0
- package/lib/labels/label_container/index.js +7 -17
- package/lib/labels/types.d.ts +24 -0
- package/lib/labels/types.js +5 -0
- package/lib/list/Header.d.ts +7 -0
- package/lib/list/Header.js +5 -18
- package/lib/list/Item.d.ts +7 -0
- package/lib/list/Item.js +39 -77
- package/lib/list/Separator.d.ts +3 -0
- package/lib/list/Separator.js +4 -4
- package/lib/list/helpers.d.ts +12 -0
- package/lib/list/helpers.js +2 -2
- package/lib/list/index.d.ts +10 -0
- package/lib/list/index.js +47 -66
- package/lib/list/types.d.ts +64 -0
- package/lib/list/types.js +5 -0
- package/lib/menus/float/MenuItem.d.ts +7 -0
- package/lib/menus/float/MenuItem.js +17 -37
- package/lib/menus/float/helpers.d.ts +7 -0
- package/lib/menus/float/helpers.js +4 -4
- package/lib/menus/float/index.d.ts +8 -0
- package/lib/menus/float/index.js +17 -37
- package/lib/menus/float/types.d.ts +27 -0
- package/lib/menus/float/types.js +5 -0
- package/lib/menus/index.d.ts +6 -0
- package/lib/menus/index.js +4 -4
- package/lib/menus/sidenav/ExpandMenu.d.ts +10 -0
- package/lib/menus/sidenav/ExpandMenu.js +6 -18
- package/lib/menus/sidenav/MenuLink.d.ts +13 -0
- package/lib/menus/sidenav/MenuLink.js +5 -19
- package/lib/menus/sidenav/NavMenuGroup.d.ts +10 -0
- package/lib/menus/sidenav/NavMenuGroup.js +6 -17
- package/lib/menus/sidenav/NavMenuItem.d.ts +13 -0
- package/lib/menus/sidenav/NavMenuItem.js +30 -56
- package/lib/menus/sidenav/NavSubMenuItem.d.ts +10 -0
- package/lib/menus/sidenav/NavSubMenuItem.js +10 -21
- package/lib/menus/sidenav/helpers.d.ts +12 -0
- package/lib/menus/sidenav/helpers.js +5 -5
- package/lib/menus/sidenav/index.d.ts +14 -0
- package/lib/menus/sidenav/index.js +39 -69
- package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +10 -0
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +9 -18
- package/lib/menus/sidenav/popup_menu_search/index.d.ts +10 -0
- package/lib/menus/sidenav/popup_menu_search/index.js +25 -24
- package/lib/menus/sidenav/types.d.ts +82 -0
- package/lib/menus/sidenav/types.js +5 -0
- package/lib/noPermission/index.d.ts +3 -0
- package/lib/noPermission/index.js +7 -7
- package/lib/panel/Content.d.ts +8 -0
- package/lib/panel/Content.js +14 -26
- package/lib/panel/DangerPanel.d.ts +8 -0
- package/lib/panel/DangerPanel.js +6 -6
- package/lib/panel/Default.d.ts +8 -0
- package/lib/panel/Default.js +25 -52
- package/lib/panel/Header.d.ts +8 -0
- package/lib/panel/Header.js +18 -40
- package/lib/panel/InfoPanel.d.ts +8 -0
- package/lib/panel/InfoPanel.js +6 -6
- package/lib/panel/PrimaryPanel.d.ts +8 -0
- package/lib/panel/PrimaryPanel.js +6 -6
- package/lib/panel/SuccessPanel.d.ts +8 -0
- package/lib/panel/SuccessPanel.js +6 -6
- package/lib/panel/ToolBar.d.ts +8 -0
- package/lib/panel/ToolBar.js +4 -9
- package/lib/panel/WarningPanel.d.ts +8 -0
- package/lib/panel/WarningPanel.js +6 -6
- package/lib/panel/helpers.d.ts +4 -0
- package/lib/panel/helpers.js +9 -5
- package/lib/panel/index.d.ts +13 -0
- package/lib/panel/index.js +11 -11
- package/lib/panel/types.d.ts +4 -0
- package/lib/panel/types.js +5 -0
- package/lib/permissionValidations.d.ts +14 -0
- package/lib/permissionValidations.js +14 -12
- package/lib/popover/PopoverText.d.ts +8 -0
- package/lib/popover/PopoverText.js +4 -9
- package/lib/popover/PopoverTitle.d.ts +8 -0
- package/lib/popover/PopoverTitle.js +4 -9
- package/lib/popover/index.d.ts +13 -0
- package/lib/popover/index.js +35 -49
- package/lib/popover/types.d.ts +21 -0
- package/lib/popover/types.js +5 -0
- package/lib/progress/Bar.d.ts +6 -0
- package/lib/progress/Bar.js +42 -52
- package/lib/progress/index.d.ts +7 -0
- package/lib/progress/index.js +14 -24
- package/lib/progress/types.d.ts +37 -0
- package/lib/progress/types.js +5 -0
- package/lib/radio/index.d.ts +12 -0
- package/lib/radio/index.js +28 -52
- package/lib/radio/types.d.ts +18 -0
- package/lib/skeleton/SkeletonContainer.d.ts +7 -0
- package/lib/skeleton/SkeletonContainer.js +4 -17
- package/lib/skeleton/index.d.ts +8 -0
- package/lib/skeleton/index.js +13 -32
- package/lib/skeleton/types.d.ts +21 -0
- package/lib/skeleton/types.js +5 -0
- package/lib/spinner/SpinnerLoading.d.ts +7 -0
- package/lib/spinner/SpinnerLoading.js +45 -53
- package/lib/spinner/index.d.ts +7 -0
- package/lib/spinner/index.js +28 -33
- package/lib/spinner/types.d.ts +20 -0
- package/lib/spinner/types.js +5 -0
- package/lib/split/Split.d.ts +6 -0
- package/lib/split/Split.js +52 -69
- package/lib/split/SplitSide.d.ts +6 -0
- package/lib/split/SplitSide.js +7 -27
- package/lib/split/helpers.d.ts +10 -0
- package/lib/split/helpers.js +4 -4
- package/lib/split/index.d.ts +5 -0
- package/lib/split/index.js +5 -5
- package/lib/split/types.d.ts +34 -0
- package/lib/split/types.js +5 -0
- package/lib/table/Body.d.ts +6 -0
- package/lib/table/Body.js +21 -28
- package/lib/table/Header.d.ts +6 -0
- package/lib/table/Header.js +51 -30
- package/lib/table/HeaderColumn.d.ts +6 -0
- package/lib/table/HeaderColumn.js +13 -27
- package/lib/table/Row.d.ts +6 -0
- package/lib/table/Row.js +13 -34
- package/lib/table/RowColumn.d.ts +6 -0
- package/lib/table/RowColumn.js +18 -36
- package/lib/table/helpers.d.ts +8 -0
- package/lib/table/helpers.js +5 -5
- package/lib/table/index.d.ts +11 -0
- package/lib/table/index.js +19 -57
- package/lib/table/types.d.ts +84 -0
- package/lib/table/types.js +5 -0
- package/lib/tabs/DropdownItems.d.ts +9 -0
- package/lib/tabs/DropdownItems.js +20 -30
- package/lib/tabs/Menu.d.ts +9 -0
- package/lib/tabs/Menu.js +21 -25
- package/lib/tabs/MenuItems.d.ts +9 -0
- package/lib/tabs/MenuItems.js +33 -47
- package/lib/tabs/Panel.d.ts +9 -0
- package/lib/tabs/Panel.js +24 -57
- package/lib/tabs/index.d.ts +10 -0
- package/lib/tabs/index.js +89 -83
- package/lib/tabs/tabHelpers.d.ts +21 -0
- package/lib/tabs/tabHelpers.js +10 -9
- package/lib/tabs/types.d.ts +63 -0
- package/lib/tabs/types.js +5 -0
- package/lib/toolbar/ButtonBar.d.ts +10 -0
- package/lib/toolbar/ButtonBar.js +51 -32
- package/lib/toolbar/LabelBar.d.ts +10 -0
- package/lib/toolbar/LabelBar.js +42 -29
- package/lib/toolbar/Separator.d.ts +3 -0
- package/lib/toolbar/Separator.js +4 -4
- package/lib/toolbar/ToolBarGroup.d.ts +10 -0
- package/lib/toolbar/ToolBarGroup.js +10 -16
- package/lib/toolbar/helpers.d.ts +10 -0
- package/lib/toolbar/helpers.js +3 -3
- package/lib/toolbar/index.d.ts +14 -0
- package/lib/toolbar/index.js +26 -34
- package/lib/toolbar/types.d.ts +43 -0
- package/lib/toolbar/types.js +5 -0
- package/lib/tooltip/index.d.ts +6 -0
- package/lib/tooltip/index.js +34 -43
- package/lib/tooltip/types.d.ts +16 -0
- package/lib/tooltip/types.js +5 -0
- package/lib/treeview/Header.d.ts +7 -0
- package/lib/treeview/Header.js +5 -17
- package/lib/treeview/Node.d.ts +7 -0
- package/lib/treeview/Node.js +265 -391
- package/lib/treeview/constants.d.ts +7 -0
- package/lib/treeview/constants.js +2 -3
- package/lib/treeview/index.d.ts +9 -0
- package/lib/treeview/index.js +369 -554
- package/lib/treeview/types.d.ts +104 -0
- package/lib/treeview/types.js +5 -0
- package/lib/treeview_old/Header.js +7 -7
- package/lib/treeview_old/Node.js +18 -18
- package/lib/treeview_old/index.js +9 -9
- package/lib/types-3c6f1c20.d.ts +46 -0
- package/lib/uitour/helpers.d.ts +8 -0
- package/lib/uitour/index.d.ts +6 -0
- package/lib/uitour/index.js +28 -45
- package/lib/uitour/types.d.ts +30 -0
- package/lib/uitour/types.js +5 -0
- package/package.json +57 -18
- package/scripts/start.js +135 -0
- package/tsconfig.json +32 -0
- package/tsup.config.ts +10 -0
- package/.eslintrc.js +0 -26
- package/.husky/pre-commit +0 -4
- package/lib/alerts/alert.spec.js +0 -133
- package/lib/avatar/avatar.spec.js +0 -190
- package/lib/badge/badge.spec.js +0 -127
- package/lib/buttons/SpinnerLoading.js +0 -230
- package/lib/buttons/buttons.spec.js +0 -504
- package/lib/calendar/calendar.spec.js +0 -171
- package/lib/checkbox/checkbox.spec.js +0 -215
- package/lib/dialog/dialog.spec.js +0 -488
- package/lib/drawer/Drawer.spec.js +0 -258
- package/lib/dropdown/dropdown.spec.js +0 -168
- package/lib/fieldset/fieldset.spec.js +0 -329
- package/lib/form/form.spec.js +0 -293
- package/lib/gridlayout/gridLayout.spec.js +0 -169
- package/lib/icons/icons.spec.js +0 -86
- package/lib/inputs/base/base.spec.js +0 -690
- package/lib/inputs/base/index.js +0 -1
- package/lib/inputs/color/color_input.spec.js +0 -174
- package/lib/inputs/date/date.spec.js +0 -354
- package/lib/inputs/mask/input_mask.spec.js +0 -607
- package/lib/inputs/number/numberfield.spec.js +0 -215
- package/lib/inputs/search/search_input.spec.js +0 -209
- package/lib/inputs/select/select.spec.js +0 -391
- package/lib/inputs/text/textfield.spec.js +0 -215
- package/lib/inputs/textarea/textarea.spec.js +0 -59
- package/lib/labelMessages/labelMessages.spec.js +0 -176
- package/lib/labels/label.spec.js +0 -162
- package/lib/list/list.spec.js +0 -768
- package/lib/menus/float/float-menu.spec.js +0 -221
- package/lib/menus/sidenav/sidenav.spec.js +0 -379
- package/lib/panel/panel.spec.js +0 -216
- package/lib/popover/popover.spec.js +0 -146
- package/lib/progress/progress.spec.js +0 -86
- package/lib/radio/radio.spec.js +0 -189
- package/lib/spinner/spinner.spec.js +0 -152
- package/lib/split/split.spec.js +0 -151
- package/lib/table/table.spec.js +0 -352
- package/lib/tabs/tabs.spec.js +0 -349
- package/lib/toolbar/toolbar.spec.js +0 -394
- package/lib/tooltip/tooltip.spec.js +0 -203
- package/lib/treeview/treeview.spec.js +0 -279
- package/lib/uitour/uitour.spec.js +0 -176
package/lib/form/withFieldHOC.js
CHANGED
|
@@ -1,152 +1,72 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
12
|
var _helpers = require("./helpers");
|
|
15
13
|
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
15
|
|
|
20
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return {
|
|
21
|
-
|
|
22
|
-
function _extends() { _extends = Object.assign || 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); }
|
|
23
|
-
|
|
24
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
-
|
|
26
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
27
|
-
|
|
28
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
17
|
|
|
30
|
-
function
|
|
18
|
+
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); }
|
|
31
19
|
|
|
32
|
-
function
|
|
20
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
21
|
|
|
34
|
-
function
|
|
22
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
35
23
|
|
|
36
|
-
function
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
37
25
|
|
|
38
|
-
function
|
|
26
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
39
27
|
|
|
40
|
-
function
|
|
28
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
41
29
|
|
|
42
|
-
function
|
|
30
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
31
|
|
|
44
|
-
function withFieldHOC(WrappedComponent) {
|
|
45
|
-
var
|
|
46
|
-
|
|
32
|
+
var withFieldHOC = function withFieldHOC(WrappedComponent) {
|
|
33
|
+
var EnhancedComponent = function EnhancedComponent(props) {
|
|
34
|
+
var name = props.name,
|
|
35
|
+
validators = props.validators,
|
|
36
|
+
handlerStoreValidators = props.handlerStoreValidators,
|
|
37
|
+
handlerRemoveValidators = props.handlerRemoveValidators;
|
|
47
38
|
|
|
48
|
-
var
|
|
39
|
+
var _useState = (0, _react.useState)(undefined),
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
validatorFromComponent = _useState2[0],
|
|
42
|
+
setValidatorFromComponent = _useState2[1];
|
|
49
43
|
|
|
50
|
-
function
|
|
51
|
-
var
|
|
44
|
+
var updateValidators = function updateValidators() {
|
|
45
|
+
var validatorsArray = (0, _helpers.getValidatorsArray)(validators, validatorFromComponent);
|
|
46
|
+
if (validatorsArray && handlerStoreValidators) handlerStoreValidators(name, validatorsArray);
|
|
47
|
+
};
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
configurable: true,
|
|
58
|
-
enumerable: true,
|
|
59
|
-
writable: true,
|
|
60
|
-
value: function value() {
|
|
61
|
-
return {
|
|
62
|
-
handlerSetValidatorFromComponent: function handlerSetValidatorFromComponent(validatorFromComponent) {
|
|
63
|
-
_this.setState({
|
|
64
|
-
validatorFromComponent: validatorFromComponent
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
Object.defineProperty(_assertThisInitialized(_this), "updateValidators", {
|
|
71
|
-
configurable: true,
|
|
72
|
-
enumerable: true,
|
|
73
|
-
writable: true,
|
|
74
|
-
value: function value() {
|
|
75
|
-
var _this$props = _this.props,
|
|
76
|
-
name = _this$props.name,
|
|
77
|
-
validators = _this$props.validators,
|
|
78
|
-
handlerStoreValidators = _this$props.handlerStoreValidators;
|
|
79
|
-
var validatorFromComponent = _this.state.validatorFromComponent;
|
|
80
|
-
var validatorsArray = (0, _helpers.getValidatorsArray)(validators, validatorFromComponent);
|
|
81
|
-
if (validatorsArray) handlerStoreValidators(name, validatorsArray);
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
_this.state = {
|
|
85
|
-
validatorFromComponent: undefined
|
|
49
|
+
(0, _react.useEffect)(function () {
|
|
50
|
+
updateValidators();
|
|
51
|
+
return function () {
|
|
52
|
+
if (validators && handlerRemoveValidators) handlerRemoveValidators(name);
|
|
86
53
|
};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
}, {
|
|
96
|
-
key: "componentDidUpdate",
|
|
97
|
-
value: function componentDidUpdate(prevProps) {
|
|
98
|
-
// Update field validators only if receives validators after mounted or
|
|
99
|
-
// the validators change
|
|
100
|
-
// There are situation in that fields are mounted first than the criteria to be available.
|
|
101
|
-
// One example about it, is a validators that depend another field
|
|
102
|
-
var validators = prevProps.validators;
|
|
103
|
-
|
|
104
|
-
if (!validators || validators !== this.props.validators) {
|
|
105
|
-
this.updateValidators();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}, {
|
|
109
|
-
key: "componentWillUnmount",
|
|
110
|
-
value: function componentWillUnmount() {
|
|
111
|
-
var _this$props2 = this.props,
|
|
112
|
-
name = _this$props2.name,
|
|
113
|
-
validators = _this$props2.validators,
|
|
114
|
-
handlerRemoveValidators = _this$props2.handlerRemoveValidators;
|
|
115
|
-
if (validators) handlerRemoveValidators(name);
|
|
116
|
-
}
|
|
117
|
-
}, {
|
|
118
|
-
key: "render",
|
|
119
|
-
value: function render() {
|
|
120
|
-
return /*#__PURE__*/_react["default"].createElement(_helpers.withFieldContext.Provider, {
|
|
121
|
-
value: this.getContextValues()
|
|
122
|
-
}, /*#__PURE__*/_react["default"].createElement(WrappedComponent, this.props));
|
|
123
|
-
}
|
|
124
|
-
}], [{
|
|
125
|
-
key: "defaultProps",
|
|
126
|
-
get: function get() {
|
|
127
|
-
return {
|
|
128
|
-
validators: undefined
|
|
129
|
-
};
|
|
54
|
+
}, []);
|
|
55
|
+
(0, _react.useEffect)(function () {
|
|
56
|
+
updateValidators();
|
|
57
|
+
}, [validators]);
|
|
58
|
+
var contextValues = {
|
|
59
|
+
handlerSetValidatorFromComponent: function handlerSetValidatorFromComponent(validator) {
|
|
60
|
+
setValidatorFromComponent(validator);
|
|
130
61
|
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
Object.defineProperty(FieldHOC, "propTypes", {
|
|
137
|
-
configurable: true,
|
|
138
|
-
enumerable: true,
|
|
139
|
-
writable: true,
|
|
140
|
-
value: {
|
|
141
|
-
name: _propTypes["default"].string.isRequired,
|
|
142
|
-
validators: _propTypes["default"].any,
|
|
143
|
-
handlerStoreValidators: _propTypes["default"].func.isRequired,
|
|
144
|
-
handlerRemoveValidators: _propTypes["default"].func.isRequired
|
|
145
|
-
}
|
|
146
|
-
});
|
|
62
|
+
};
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_helpers.withFieldContext.Provider, {
|
|
64
|
+
value: contextValues
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(WrappedComponent, props));
|
|
66
|
+
};
|
|
147
67
|
|
|
148
68
|
function forwardRef(props, ref) {
|
|
149
|
-
return /*#__PURE__*/_react
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement(_helpers.FormContext.Consumer, null, function (_ref) {
|
|
150
70
|
var handlerFieldChange = _ref.handlerFieldChange,
|
|
151
71
|
handlerFieldValidade = _ref.handlerFieldValidade,
|
|
152
72
|
data = _ref.data,
|
|
@@ -155,7 +75,7 @@ function withFieldHOC(WrappedComponent) {
|
|
|
155
75
|
handlerStoreValidators = _ref.handlerStoreValidators,
|
|
156
76
|
handlerRemoveValidators = _ref.handlerRemoveValidators,
|
|
157
77
|
skeletonize = _ref.skeletonize;
|
|
158
|
-
return /*#__PURE__*/_react
|
|
78
|
+
return /*#__PURE__*/_react.default.createElement(EnhancedComponent, _extends({}, props, {
|
|
159
79
|
skeletonize: skeletonize,
|
|
160
80
|
handlerFieldChange: handlerFieldChange,
|
|
161
81
|
handlerFieldValidade: handlerFieldValidade,
|
|
@@ -169,8 +89,8 @@ function withFieldHOC(WrappedComponent) {
|
|
|
169
89
|
});
|
|
170
90
|
}
|
|
171
91
|
|
|
172
|
-
return /*#__PURE__*/_react
|
|
173
|
-
}
|
|
92
|
+
return /*#__PURE__*/_react.default.forwardRef(forwardRef);
|
|
93
|
+
};
|
|
174
94
|
|
|
175
95
|
var _default = withFieldHOC;
|
|
176
|
-
exports
|
|
96
|
+
exports.default = _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { IFormSecurityContext, IWithFormSecurity } from './types.js';
|
|
3
|
+
|
|
4
|
+
declare const FormSecurityContext: React__default.Context<IFormSecurityContext>;
|
|
5
|
+
declare const withFormSecurity: <ComponentProps extends IWithFormSecurity>(WrappedComponent: React__default.ComponentType<ComponentProps>) => (props: ComponentProps) => JSX.Element;
|
|
6
|
+
|
|
7
|
+
export { FormSecurityContext, withFormSecurity as default };
|
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports.default = exports.FormSecurityContext = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
|
-
var _excluded = ["handlerClose"];
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
13
|
|
|
20
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return {
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
15
|
|
|
22
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
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); }
|
|
23
17
|
|
|
24
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
19
|
|
|
@@ -33,19 +27,13 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
33
27
|
|
|
34
28
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
29
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
39
|
-
|
|
40
|
-
var FormSecurityContext = /*#__PURE__*/_react["default"].createContext();
|
|
30
|
+
var FormSecurityContext = /*#__PURE__*/_react.default.createContext({});
|
|
41
31
|
|
|
42
32
|
exports.FormSecurityContext = FormSecurityContext;
|
|
43
33
|
|
|
44
34
|
var withFormSecurity = function withFormSecurity(WrappedComponent) {
|
|
45
|
-
var EnhancedComponent = function EnhancedComponent(
|
|
46
|
-
var handlerClose =
|
|
47
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
48
|
-
|
|
35
|
+
var EnhancedComponent = function EnhancedComponent(props) {
|
|
36
|
+
var handlerClose = props.handlerClose;
|
|
49
37
|
var changedData = (0, _react.useRef)(false);
|
|
50
38
|
var securityBeforeUnload = (0, _react.useRef)(false);
|
|
51
39
|
|
|
@@ -57,13 +45,11 @@ var withFormSecurity = function withFormSecurity(WrappedComponent) {
|
|
|
57
45
|
var newHandlerClose = function newHandlerClose() {
|
|
58
46
|
if (changedData.current && securityBeforeUnload.current) {
|
|
59
47
|
setShowQuestion(true);
|
|
60
|
-
} else
|
|
61
|
-
handlerClose();
|
|
62
|
-
}
|
|
48
|
+
} else if (handlerClose) handlerClose();
|
|
63
49
|
};
|
|
64
50
|
|
|
65
51
|
var onConfirmClick = function onConfirmClick() {
|
|
66
|
-
handlerClose();
|
|
52
|
+
if (handlerClose) handlerClose();
|
|
67
53
|
};
|
|
68
54
|
|
|
69
55
|
var onUnconfirmClick = function onUnconfirmClick() {
|
|
@@ -78,29 +64,22 @@ var withFormSecurity = function withFormSecurity(WrappedComponent) {
|
|
|
78
64
|
securityBeforeUnload.current = value;
|
|
79
65
|
};
|
|
80
66
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
67
|
+
var contextValues = {
|
|
68
|
+
onChangedData: onChangedData,
|
|
69
|
+
showQuestion: showQuestion,
|
|
70
|
+
onConfirmClick: onConfirmClick,
|
|
71
|
+
onUnconfirmClick: onUnconfirmClick,
|
|
72
|
+
setSecurityBeforeUnload: setSecurityBeforeUnload
|
|
73
|
+
};
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(FormSecurityContext.Provider, {
|
|
75
|
+
value: contextValues
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(WrappedComponent, _extends({}, props, {
|
|
90
77
|
handlerClose: newHandlerClose
|
|
91
78
|
})));
|
|
92
79
|
};
|
|
93
80
|
|
|
94
|
-
EnhancedComponent.propTypes = {
|
|
95
|
-
handlerClose: _propTypes["default"].func,
|
|
96
|
-
onClick: _propTypes["default"].func
|
|
97
|
-
};
|
|
98
|
-
EnhancedComponent.defaultProps = {
|
|
99
|
-
handlerClose: undefined,
|
|
100
|
-
onClick: undefined
|
|
101
|
-
};
|
|
102
81
|
return EnhancedComponent;
|
|
103
82
|
};
|
|
104
83
|
|
|
105
84
|
var _default = withFormSecurity;
|
|
106
|
-
exports
|
|
85
|
+
exports.default = _default;
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
require("../assets/styles/gridlayout.scss");
|
|
13
11
|
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
13
|
|
|
16
14
|
var getClass = function getClass(col) {
|
|
17
15
|
var cols = col ? col.split(' ') : [];
|
|
@@ -28,28 +26,15 @@ var GridCol = function GridCol(props) {
|
|
|
28
26
|
customClass = props.customClass,
|
|
29
27
|
children = props.children,
|
|
30
28
|
style = props.style,
|
|
31
|
-
visible = props.visible
|
|
32
|
-
|
|
29
|
+
_props$visible = props.visible,
|
|
30
|
+
visible = _props$visible === void 0 ? true : _props$visible;
|
|
31
|
+
var gridClasses = getClass(cols || '');
|
|
33
32
|
if (!visible) return null;
|
|
34
|
-
return /*#__PURE__*/_react
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
35
34
|
className: "".concat(customClass, " ").concat(gridClasses),
|
|
36
35
|
style: style
|
|
37
36
|
}, children);
|
|
38
37
|
};
|
|
39
38
|
|
|
40
|
-
GridCol.propTypes = {
|
|
41
|
-
children: _propTypes["default"].any,
|
|
42
|
-
cols: _propTypes["default"].string,
|
|
43
|
-
customClass: _propTypes["default"].string,
|
|
44
|
-
style: _propTypes["default"].object,
|
|
45
|
-
visible: _propTypes["default"].bool
|
|
46
|
-
};
|
|
47
|
-
GridCol.defaultProps = {
|
|
48
|
-
children: undefined,
|
|
49
|
-
customClass: '',
|
|
50
|
-
cols: '',
|
|
51
|
-
style: {},
|
|
52
|
-
visible: true
|
|
53
|
-
};
|
|
54
39
|
var _default = GridCol;
|
|
55
|
-
exports
|
|
40
|
+
exports.default = _default;
|
|
@@ -3,49 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
require("../assets/styles/gridlayout.scss");
|
|
13
11
|
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
13
|
|
|
16
|
-
var getClass = function getClass(
|
|
17
|
-
|
|
18
|
-
customClass = _ref.customClass,
|
|
19
|
-
horizontalAlign = _ref.horizontalAlign,
|
|
20
|
-
withTrim = _ref.withTrim;
|
|
21
|
-
return "row ".concat(customClass, "\n ").concat(withTrim && ' -withtrim', "\n ").concat(verticalAlign && " align-".concat(verticalAlign), "\n ").concat(horizontalAlign && " justify-content-".concat(horizontalAlign));
|
|
14
|
+
var getClass = function getClass(props) {
|
|
15
|
+
return "row ".concat(props.customClass, "\n ").concat(props.withTrim && ' -withtrim', "\n ").concat(props.verticalAlign && " align-".concat(props.verticalAlign), "\n ").concat(props.horizontalAlign && " justify-content-".concat(props.horizontalAlign));
|
|
22
16
|
};
|
|
23
17
|
|
|
24
18
|
var GridRow = function GridRow(props) {
|
|
25
19
|
var style = props.style,
|
|
26
20
|
children = props.children,
|
|
27
|
-
visible = props.visible
|
|
21
|
+
_props$visible = props.visible,
|
|
22
|
+
visible = _props$visible === void 0 ? true : _props$visible;
|
|
28
23
|
if (!visible) return null;
|
|
29
|
-
return /*#__PURE__*/_react
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
30
25
|
style: style,
|
|
31
26
|
className: getClass(props)
|
|
32
27
|
}, children);
|
|
33
28
|
};
|
|
34
29
|
|
|
35
|
-
GridRow.propTypes = {
|
|
36
|
-
children: _propTypes["default"].any.isRequired,
|
|
37
|
-
verticalAlign: _propTypes["default"].string,
|
|
38
|
-
horizontalAlign: _propTypes["default"].string,
|
|
39
|
-
style: _propTypes["default"].object,
|
|
40
|
-
withTrim: _propTypes["default"].bool,
|
|
41
|
-
visible: _propTypes["default"].bool
|
|
42
|
-
};
|
|
43
|
-
GridRow.defaultProps = {
|
|
44
|
-
verticalAlign: '',
|
|
45
|
-
horizontalAlign: '',
|
|
46
|
-
style: {},
|
|
47
|
-
withTrim: false,
|
|
48
|
-
visible: true
|
|
49
|
-
};
|
|
50
30
|
var _default = GridRow;
|
|
51
|
-
exports
|
|
31
|
+
exports.default = _default;
|
package/lib/gridlayout/index.js
CHANGED
|
@@ -6,16 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "GridRow", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function get() {
|
|
9
|
-
return _GridRow
|
|
9
|
+
return _GridRow.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
exports
|
|
12
|
+
exports.default = void 0;
|
|
13
13
|
|
|
14
14
|
var _GridRow = _interopRequireDefault(require("./GridRow"));
|
|
15
15
|
|
|
16
16
|
var _GridCol = _interopRequireDefault(require("./GridCol"));
|
|
17
17
|
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
var _default = _GridCol
|
|
21
|
-
exports
|
|
20
|
+
var _default = _GridCol.default;
|
|
21
|
+
exports.default = _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
interface IGridCol {
|
|
4
|
+
children?: ReactNode | ReactNode[];
|
|
5
|
+
cols?: string;
|
|
6
|
+
customClass?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
visible?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface IGridRow {
|
|
11
|
+
children: ReactNode | ReactNode[];
|
|
12
|
+
verticalAlign?: string;
|
|
13
|
+
horizontalAlign?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
withTrim?: boolean;
|
|
16
|
+
visible?: boolean;
|
|
17
|
+
customClass?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { IGridCol, IGridRow };
|