linear-react-components-ui 0.4.77-beta.23 → 0.4.77-beta.25
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 +97 -0
- package/.gitlab-ci.yml +19 -0
- package/.husky/pre-push +4 -0
- package/.vscode/launch.json +15 -0
- package/.vscode/settings.json +4 -2
- package/config/getHttpsConfig.js +56 -0
- package/config/paths.js +140 -0
- package/config/webpackDevServer.config.js +128 -0
- package/images.d.ts +3 -0
- package/jest.config.js +3 -3
- package/lib/@types/Align.js +5 -0
- package/lib/@types/ButtonTypes.js +5 -0
- package/lib/@types/ColorStyles.js +5 -0
- package/lib/@types/DataCombo.js +5 -0
- package/lib/@types/Icon.js +5 -0
- package/lib/@types/LabelStyles.js +5 -0
- package/lib/@types/Period.js +5 -0
- package/lib/@types/PermissionAttr.js +5 -0
- package/lib/@types/PointerEvents.js +5 -0
- package/lib/@types/Position.js +5 -0
- package/lib/@types/PositionAlert.js +5 -0
- package/lib/@types/Size.js +5 -0
- package/lib/@types/SizePixels.js +5 -0
- package/lib/@types/StorageMock.js +5 -0
- package/lib/alerts/AlertContainer.js +28 -26
- package/lib/alerts/AlertProvider.js +29 -24
- package/lib/alerts/BaseAlert.js +22 -15
- package/lib/alerts/Message.js +41 -50
- package/lib/alerts/alert.spec.js +15 -11
- package/lib/alerts/helpers.js +4 -7
- package/lib/alerts/index.js +6 -6
- package/lib/alerts/types.js +5 -0
- package/lib/alerts/withAlert.js +10 -12
- 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/table.scss +7 -2
- package/lib/assets/styles/treetable.scss +10 -12
- package/lib/avatar/avatar.spec.js +30 -28
- package/lib/avatar/index.js +24 -69
- package/lib/avatar/types.js +5 -0
- package/lib/badge/badge.spec.js +6 -6
- package/lib/badge/index.js +12 -28
- package/lib/badge/types.js +5 -0
- package/lib/buttons/ActivateButton.js +8 -8
- package/lib/buttons/AddButton.js +8 -8
- package/lib/buttons/Button.js +22 -14
- package/lib/buttons/ButtonGroups.js +4 -9
- package/lib/buttons/CancelButton.js +20 -7
- package/lib/buttons/DangerButton.js +18 -23
- package/lib/buttons/DefaultButton.js +91 -145
- package/lib/buttons/DestroyButton.js +18 -9
- package/lib/buttons/EditButton.js +8 -8
- package/lib/buttons/InactivateButton.js +8 -8
- package/lib/buttons/InfoButton.js +18 -23
- package/lib/buttons/PrimaryButton.js +18 -23
- package/lib/buttons/RestoreButton.js +8 -8
- package/lib/buttons/SaveButton.js +19 -6
- package/lib/buttons/SuccessButton.js +17 -22
- package/lib/buttons/WarningButton.js +17 -22
- package/lib/buttons/button_container/index.js +12 -25
- package/lib/buttons/buttons.spec.js +52 -52
- package/lib/buttons/index.js +33 -33
- package/lib/buttons/split_button/index.js +9 -46
- package/lib/buttons/types.js +5 -0
- package/lib/calendar/DangerCalendar.js +17 -8
- package/lib/calendar/InfoCalendar.js +17 -8
- package/lib/calendar/PrimaryCalendar.js +17 -8
- package/lib/calendar/SuccessCalendar.js +17 -8
- package/lib/calendar/WarningCalendar.js +17 -8
- package/lib/calendar/base/Day.js +9 -15
- package/lib/calendar/base/Month.js +19 -14
- package/lib/calendar/base/Week.js +19 -15
- package/lib/calendar/base/helpers.js +16 -16
- package/lib/calendar/base/index.js +58 -51
- package/lib/calendar/calendar.spec.js +27 -25
- package/lib/calendar/index.js +15 -15
- package/lib/calendar/types.js +5 -0
- package/lib/checkbox/Label.js +8 -18
- package/lib/checkbox/checkbox.spec.js +34 -33
- package/lib/checkbox/index.js +67 -94
- package/lib/checkbox/types.js +5 -0
- package/lib/dialog/Alert.js +11 -16
- package/lib/dialog/Custom.js +26 -34
- package/lib/dialog/Error.js +9 -14
- package/lib/dialog/Information.js +9 -14
- package/lib/dialog/Question.js +16 -27
- package/lib/dialog/Warning.js +9 -14
- package/lib/dialog/base/Content.js +5 -14
- package/lib/dialog/base/Footer.js +6 -12
- package/lib/dialog/base/Header.js +17 -31
- package/lib/dialog/base/index.js +14 -36
- package/lib/dialog/base/style.js +2 -2
- package/lib/dialog/dialog.spec.js +42 -38
- package/lib/dialog/form/index.js +37 -47
- package/lib/dialog/index.js +16 -16
- package/lib/dialog/types.js +5 -0
- package/lib/drawer/Content.js +8 -17
- package/lib/drawer/Drawer.js +50 -61
- package/lib/drawer/Drawer.spec.js +35 -32
- package/lib/drawer/Header.js +29 -48
- package/lib/drawer/helpers.js +5 -5
- package/lib/drawer/index.js +9 -9
- package/lib/drawer/types.js +5 -0
- package/lib/dropdown/Popup.js +35 -21
- package/lib/dropdown/dropdown.spec.js +41 -29
- package/lib/dropdown/helper.js +2 -2
- package/lib/dropdown/types.js +5 -0
- package/lib/dropdown/withDropdown.js +34 -51
- package/lib/fieldset/fieldset.spec.js +5 -5
- package/lib/fieldset/index.js +34 -55
- package/lib/fieldset/types.js +5 -0
- package/lib/form/Field.js +40 -30
- package/lib/form/FieldArray.js +31 -31
- package/lib/form/FieldNumber.js +18 -18
- package/lib/form/FieldPeriod.js +25 -25
- package/lib/form/form.spec.js +25 -23
- package/lib/form/helpers.js +24 -13
- package/lib/form/index.js +72 -55
- package/lib/form/withFieldHOC.js +38 -32
- package/lib/form/withFormSecurity.js +32 -19
- package/lib/gridlayout/GridCol.js +8 -23
- package/lib/gridlayout/GridRow.js +9 -29
- package/lib/gridlayout/gridLayout.spec.js +8 -8
- package/lib/gridlayout/index.js +6 -6
- package/lib/gridlayout/types.js +5 -0
- package/lib/icons/helper.js +560 -563
- package/lib/icons/icons.spec.js +12 -12
- package/lib/icons/index.js +29 -46
- package/lib/icons/types.js +5 -0
- package/lib/index.js +18 -18
- package/lib/inputs/base/InputTextBase.js +58 -157
- package/lib/inputs/base/base.spec.js +39 -38
- package/lib/inputs/base/helpers.js +10 -10
- package/lib/inputs/base/types.js +5 -0
- package/lib/inputs/color/color_input.spec.js +10 -10
- package/lib/inputs/color/index.js +55 -43
- package/lib/inputs/color/types.js +5 -0
- package/lib/inputs/date/Dialog.js +5 -12
- package/lib/inputs/date/Dropdown.js +21 -63
- package/lib/inputs/date/date.spec.js +12 -14
- package/lib/inputs/date/helpers.js +6 -6
- package/lib/inputs/date/index.js +265 -415
- package/lib/inputs/date/types.js +5 -0
- package/lib/inputs/inputHOC.js +53 -99
- package/lib/inputs/mask/BaseMask.js +14 -25
- package/lib/inputs/mask/Cnpj.js +33 -32
- package/lib/inputs/mask/Cpf.js +33 -34
- package/lib/inputs/mask/Phone.js +7 -15
- package/lib/inputs/mask/ZipCode.js +7 -7
- package/lib/inputs/mask/helpers.js +25 -40
- package/lib/inputs/mask/imaskHOC.js +190 -251
- package/lib/inputs/mask/index.js +11 -11
- package/lib/inputs/mask/input_mask.spec.js +103 -126
- package/lib/inputs/mask/types.js +5 -0
- package/lib/inputs/multiSelect/ActionButtons.js +10 -22
- package/lib/inputs/multiSelect/Dropdown.js +76 -93
- package/lib/inputs/multiSelect/helper.js +2 -2
- package/lib/inputs/multiSelect/index.js +97 -104
- package/lib/inputs/multiSelect/types.js +5 -0
- package/lib/inputs/number/BaseNumber.js +18 -30
- package/lib/inputs/number/Currency.js +10 -20
- package/lib/inputs/number/Decimal.js +5 -5
- package/lib/inputs/number/format_number.js +1 -1
- package/lib/inputs/number/index.js +16 -22
- package/lib/inputs/number/numberfield.spec.js +9 -8
- package/lib/inputs/number/types.js +5 -0
- package/lib/inputs/period/Dialog.js +5 -12
- package/lib/inputs/period/Dropdown.js +19 -63
- package/lib/inputs/period/PeriodList.js +12 -25
- package/lib/inputs/period/helper.js +34 -74
- package/lib/inputs/period/index.js +156 -198
- package/lib/inputs/period/types.js +5 -0
- package/lib/inputs/search/index.js +150 -263
- package/lib/inputs/search/search_input.spec.js +19 -13
- package/lib/inputs/select/ActionButtons.js +20 -26
- package/lib/inputs/select/Dropdown.js +59 -82
- package/lib/inputs/select/helper.js +19 -15
- package/lib/inputs/select/index.js +22 -20
- package/lib/inputs/select/multiple/Selecteds.js +9 -17
- package/lib/inputs/select/multiple/index.js +299 -408
- package/lib/inputs/select/select.spec.js +71 -54
- package/lib/inputs/select/simple/index.js +310 -457
- package/lib/inputs/select/types.js +5 -0
- package/lib/inputs/text/index.js +6 -5
- package/lib/inputs/text/textfield.spec.js +7 -7
- package/lib/inputs/text/types.js +5 -0
- package/lib/inputs/textarea/index.js +11 -21
- package/lib/inputs/textarea/textarea.spec.js +7 -7
- package/lib/inputs/textarea/types.js +5 -0
- package/lib/inputs/types.js +5 -0
- package/lib/internals/colorStyles.js +2 -2
- package/lib/internals/constants.js +1 -1
- package/lib/internals/types.js +5 -0
- package/lib/internals/withTooltip.js +50 -48
- package/lib/labelMessages/index.js +48 -56
- package/lib/labelMessages/labelMessages.spec.js +17 -17
- package/lib/labelMessages/types.js +5 -0
- package/lib/labels/DangerLabel.js +18 -9
- package/lib/labels/DefaultLabel.js +44 -66
- package/lib/labels/InfoLabel.js +18 -9
- package/lib/labels/PrimaryLabel.js +18 -9
- package/lib/labels/SuccessLabel.js +18 -9
- package/lib/labels/WarningLabel.js +18 -9
- package/lib/labels/index.js +16 -16
- package/lib/labels/label.spec.js +20 -20
- package/lib/labels/label_container/index.js +7 -17
- package/lib/labels/types.js +5 -0
- package/lib/list/Header.js +5 -18
- package/lib/list/Item.js +54 -84
- package/lib/list/Separator.js +5 -5
- package/lib/list/helpers.js +6 -11
- package/lib/list/index.js +45 -123
- package/lib/list/list.spec.js +102 -131
- package/lib/list/types.js +5 -0
- package/lib/menus/float/MenuItem.js +18 -38
- package/lib/menus/float/float-menu.spec.js +39 -33
- package/lib/menus/float/helpers.js +5 -5
- package/lib/menus/float/index.js +18 -38
- package/lib/menus/float/types.js +5 -0
- package/lib/menus/index.js +5 -5
- package/lib/menus/sidenav/ExpandMenu.js +7 -19
- package/lib/menus/sidenav/MenuLink.js +6 -20
- package/lib/menus/sidenav/NavMenuGroup.js +6 -17
- package/lib/menus/sidenav/NavMenuItem.js +46 -62
- package/lib/menus/sidenav/NavSubMenuItem.js +23 -24
- package/lib/menus/sidenav/helpers.js +6 -6
- package/lib/menus/sidenav/index.js +71 -83
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +10 -19
- package/lib/menus/sidenav/popup_menu_search/index.js +41 -28
- package/lib/menus/sidenav/sidenav.spec.js +30 -26
- package/lib/menus/sidenav/types.js +5 -0
- package/lib/noPermission/index.js +8 -8
- package/lib/panel/Content.js +15 -27
- package/lib/panel/DangerPanel.js +8 -8
- package/lib/panel/Default.js +40 -57
- package/lib/panel/Header.js +19 -41
- package/lib/panel/InfoPanel.js +8 -8
- package/lib/panel/PrimaryPanel.js +8 -8
- package/lib/panel/SuccessPanel.js +8 -8
- package/lib/panel/ToolBar.js +5 -10
- package/lib/panel/WarningPanel.js +8 -8
- package/lib/panel/helpers.js +10 -6
- package/lib/panel/index.js +19 -19
- package/lib/panel/panel.spec.js +30 -30
- package/lib/panel/types.js +5 -0
- package/lib/permissionValidations.js +2 -2
- package/lib/popover/PopoverText.js +4 -9
- package/lib/popover/PopoverTitle.js +4 -9
- package/lib/popover/index.js +35 -49
- package/lib/popover/popover.spec.js +18 -18
- package/lib/popover/types.js +5 -0
- package/lib/progress/Bar.js +42 -52
- package/lib/progress/index.js +19 -27
- package/lib/progress/progress.spec.js +25 -17
- package/lib/progress/types.js +5 -0
- package/lib/radio/index.js +44 -58
- package/lib/radio/radio.spec.js +22 -20
- package/lib/radio/types.js +5 -0
- package/lib/skeleton/SkeletonContainer.js +9 -9
- package/lib/skeleton/index.js +18 -18
- package/lib/spinner/SpinnerLoading.js +45 -53
- package/lib/spinner/index.js +42 -37
- package/lib/spinner/spinner.spec.js +14 -10
- package/lib/spinner/types.js +5 -0
- package/lib/split/Split.js +83 -90
- package/lib/split/SplitSide.js +8 -28
- package/lib/split/helpers.js +5 -5
- package/lib/split/index.js +6 -6
- package/lib/split/split.spec.js +57 -40
- package/lib/split/types.js +5 -0
- package/lib/table/Body.js +25 -32
- package/lib/table/Header.js +19 -26
- package/lib/table/HeaderColumn.js +14 -28
- package/lib/table/Row.js +23 -39
- package/lib/table/RowColumn.js +23 -41
- package/lib/table/helpers.js +6 -6
- package/lib/table/index.js +45 -71
- package/lib/table/table.spec.js +52 -51
- package/lib/table/types.js +5 -0
- package/lib/tabs/DropdownItems.js +21 -31
- package/lib/tabs/Menu.js +22 -26
- package/lib/tabs/MenuItems.js +33 -47
- package/lib/tabs/Panel.js +37 -60
- package/lib/tabs/index.js +125 -99
- package/lib/tabs/tabHelpers.js +13 -11
- package/lib/tabs/tabs.spec.js +76 -111
- package/lib/tabs/types.js +5 -0
- package/lib/toolbar/ButtonBar.js +54 -35
- package/lib/toolbar/LabelBar.js +45 -32
- package/lib/toolbar/Separator.js +5 -5
- package/lib/toolbar/ToolBarGroup.js +10 -16
- package/lib/toolbar/helpers.js +3 -3
- package/lib/toolbar/index.js +35 -40
- package/lib/toolbar/toolbar.spec.js +42 -42
- package/lib/toolbar/types.js +5 -0
- package/lib/tooltip/index.js +35 -44
- package/lib/tooltip/tooltip.spec.js +42 -23
- package/lib/tooltip/types.js +5 -0
- package/lib/treetable/Body.js +64 -0
- package/lib/treetable/Header.js +37 -0
- package/lib/treetable/Row.js +317 -0
- package/lib/treetable/helpers.js +32 -53
- package/lib/treetable/index.js +16 -104
- package/lib/treetable/types.d.js +5 -0
- package/lib/treeview/Header.js +5 -17
- package/lib/treeview/Node.js +268 -390
- package/lib/treeview/constants.js +3 -3
- package/lib/treeview/index.js +379 -555
- package/lib/treeview/treeview.spec.js +38 -28
- package/lib/treeview/types.js +5 -0
- package/lib/treeview_old/Header.js +8 -8
- package/lib/treeview_old/Node.js +38 -32
- package/lib/treeview_old/index.js +10 -10
- package/lib/uitour/helpers.js +1 -1
- package/lib/uitour/index.js +53 -41
- package/lib/uitour/uitour.spec.js +22 -22
- package/package.json +44 -15
- package/scripts/start.js +135 -0
- package/tsconfig.json +17 -0
- package/.eslintrc.js +0 -26
- package/.husky/pre-commit +0 -4
- package/lib/buttons/SpinnerLoading.js +0 -230
- package/lib/inputs/base/index.js +0 -1
- package/lib/treetable/TRow.js +0 -255
- package/lib/treetable/treetable.spec.js +0 -302
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
6
|
-
|
|
7
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
|
-
|
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
|
|
11
|
-
require("@testing-library/jest-dom");
|
|
12
|
-
|
|
13
|
-
var _react = require("@testing-library/react");
|
|
14
|
-
|
|
15
|
-
require("babel-polyfill");
|
|
16
|
-
|
|
17
|
-
var _react2 = _interopRequireDefault(require("react"));
|
|
18
|
-
|
|
19
|
-
var _uuid = require("uuid");
|
|
20
|
-
|
|
21
|
-
var _ = _interopRequireDefault(require("."));
|
|
22
|
-
|
|
23
|
-
var _toolbar = require("../toolbar");
|
|
24
|
-
|
|
25
|
-
var data = [{
|
|
26
|
-
id: (0, _uuid.v4)(),
|
|
27
|
-
naturezaPaiId: 0,
|
|
28
|
-
descricao: 'ENTRADAS',
|
|
29
|
-
codigoEstrutural: '0',
|
|
30
|
-
contaContabil: '1',
|
|
31
|
-
tipoFluxoId: 'teste',
|
|
32
|
-
tipoNatureza: 0,
|
|
33
|
-
tipoNaturezaEnum: {},
|
|
34
|
-
padraoTransferenciaCaixaBanco: false,
|
|
35
|
-
ocultarInformacoesAnaliseFiliais: false,
|
|
36
|
-
ocultarInformacoesFluxoCaixa: false,
|
|
37
|
-
tipoMovimentacaoResultadoOperacional: 0,
|
|
38
|
-
tipoMovimentacaoResultadoOperacionalEnum: {},
|
|
39
|
-
tipoRelatorioApuracao: 0,
|
|
40
|
-
tipoRelatorioApuracaoEnum: {},
|
|
41
|
-
versao: 0,
|
|
42
|
-
criadoEm: new Date().toJSON(),
|
|
43
|
-
alteradoEm: null,
|
|
44
|
-
statusEnum: {
|
|
45
|
-
id: 0,
|
|
46
|
-
name: 'Ativo'
|
|
47
|
-
}
|
|
48
|
-
}, {
|
|
49
|
-
id: (0, _uuid.v4)(),
|
|
50
|
-
naturezaPaiId: null,
|
|
51
|
-
descricao: 'SAÍDAS',
|
|
52
|
-
codigoEstrutural: '0',
|
|
53
|
-
contaContabil: '2',
|
|
54
|
-
tipoFluxoId: 'teste',
|
|
55
|
-
tipoNatureza: 0,
|
|
56
|
-
tipoNaturezaEnum: {},
|
|
57
|
-
padraoTransferenciaCaixaBanco: false,
|
|
58
|
-
ocultarInformacoesAnaliseFiliais: false,
|
|
59
|
-
ocultarInformacoesFluxoCaixa: false,
|
|
60
|
-
tipoMovimentacaoResultadoOperacional: 0,
|
|
61
|
-
tipoMovimentacaoResultadoOperacionalEnum: {},
|
|
62
|
-
tipoRelatorioApuracao: 0,
|
|
63
|
-
tipoRelatorioApuracaoEnum: {},
|
|
64
|
-
versao: 0,
|
|
65
|
-
criadoEm: new Date().toJSON(),
|
|
66
|
-
alteradoEm: null,
|
|
67
|
-
statusEnum: {
|
|
68
|
-
id: 1,
|
|
69
|
-
name: 'Inativo'
|
|
70
|
-
}
|
|
71
|
-
}];
|
|
72
|
-
var dataDontChildrens = [{
|
|
73
|
-
id: (0, _uuid.v4)(),
|
|
74
|
-
naturezaPaiId: null,
|
|
75
|
-
descricao: 'ENTRADAS',
|
|
76
|
-
codigoEstrutural: '0',
|
|
77
|
-
contaContabil: '1',
|
|
78
|
-
tipoFluxoId: 'teste',
|
|
79
|
-
tipoNatureza: 0,
|
|
80
|
-
tipoNaturezaEnum: {},
|
|
81
|
-
padraoTransferenciaCaixaBanco: false,
|
|
82
|
-
ocultarInformacoesAnaliseFiliais: false,
|
|
83
|
-
ocultarInformacoesFluxoCaixa: false,
|
|
84
|
-
tipoMovimentacaoResultadoOperacional: 0,
|
|
85
|
-
tipoMovimentacaoResultadoOperacionalEnum: {},
|
|
86
|
-
tipoRelatorioApuracao: 0,
|
|
87
|
-
tipoRelatorioApuracaoEnum: {},
|
|
88
|
-
versao: 0,
|
|
89
|
-
criadoEm: new Date().toJSON(),
|
|
90
|
-
alteradoEm: null,
|
|
91
|
-
statusEnum: {
|
|
92
|
-
id: 0,
|
|
93
|
-
name: 'Ativo'
|
|
94
|
-
}
|
|
95
|
-
}, {
|
|
96
|
-
id: (0, _uuid.v4)(),
|
|
97
|
-
naturezaPaiId: null,
|
|
98
|
-
descricao: 'SAÍDAS',
|
|
99
|
-
codigoEstrutural: '0',
|
|
100
|
-
contaContabil: '2',
|
|
101
|
-
tipoFluxoId: 'teste',
|
|
102
|
-
tipoNatureza: 0,
|
|
103
|
-
tipoNaturezaEnum: {},
|
|
104
|
-
padraoTransferenciaCaixaBanco: false,
|
|
105
|
-
ocultarInformacoesAnaliseFiliais: false,
|
|
106
|
-
ocultarInformacoesFluxoCaixa: false,
|
|
107
|
-
tipoMovimentacaoResultadoOperacional: 0,
|
|
108
|
-
tipoMovimentacaoResultadoOperacionalEnum: {},
|
|
109
|
-
tipoRelatorioApuracao: 0,
|
|
110
|
-
tipoRelatorioApuracaoEnum: {},
|
|
111
|
-
versao: 0,
|
|
112
|
-
criadoEm: new Date().toJSON(),
|
|
113
|
-
alteradoEm: null,
|
|
114
|
-
statusEnum: {
|
|
115
|
-
id: 1,
|
|
116
|
-
name: 'Inativo'
|
|
117
|
-
}
|
|
118
|
-
}];
|
|
119
|
-
|
|
120
|
-
var getChildrens = /*#__PURE__*/function () {
|
|
121
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
122
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
123
|
-
while (1) {
|
|
124
|
-
switch (_context.prev = _context.next) {
|
|
125
|
-
case 0:
|
|
126
|
-
return _context.abrupt("return", new Promise(function (resolve) {
|
|
127
|
-
setTimeout(function () {
|
|
128
|
-
resolve([{
|
|
129
|
-
id: (0, _uuid.v4)(),
|
|
130
|
-
naturezaPaiId: 0,
|
|
131
|
-
descricao: 'Conta 11',
|
|
132
|
-
codigoEstrutural: '0',
|
|
133
|
-
contaContabil: '1.1',
|
|
134
|
-
tipoFluxoId: 'teste',
|
|
135
|
-
tipoNatureza: 0,
|
|
136
|
-
tipoNaturezaEnum: {},
|
|
137
|
-
padraoTransferenciaCaixaBanco: false,
|
|
138
|
-
ocultarInformacoesAnaliseFiliais: false,
|
|
139
|
-
ocultarInformacoesFluxoCaixa: false,
|
|
140
|
-
tipoMovimentacaoResultadoOperacional: 0,
|
|
141
|
-
tipoMovimentacaoResultadoOperacionalEnum: {},
|
|
142
|
-
tipoRelatorioApuracao: 0,
|
|
143
|
-
tipoRelatorioApuracaoEnum: {},
|
|
144
|
-
versao: 0,
|
|
145
|
-
criadoEm: new Date().toJSON(),
|
|
146
|
-
alteradoEm: null,
|
|
147
|
-
statusEnum: {
|
|
148
|
-
id: 0,
|
|
149
|
-
name: 'Ativo'
|
|
150
|
-
}
|
|
151
|
-
}, {
|
|
152
|
-
id: (0, _uuid.v4)(),
|
|
153
|
-
naturezaPaiId: 0,
|
|
154
|
-
descricao: 'Conta 12',
|
|
155
|
-
codigoEstrutural: '0',
|
|
156
|
-
contaContabil: '1.2',
|
|
157
|
-
tipoFluxoId: 'teste',
|
|
158
|
-
tipoNatureza: 0,
|
|
159
|
-
tipoNaturezaEnum: {},
|
|
160
|
-
padraoTransferenciaCaixaBanco: false,
|
|
161
|
-
ocultarInformacoesAnaliseFiliais: false,
|
|
162
|
-
ocultarInformacoesFluxoCaixa: false,
|
|
163
|
-
tipoMovimentacaoResultadoOperacional: 0,
|
|
164
|
-
tipoMovimentacaoResultadoOperacionalEnum: {},
|
|
165
|
-
tipoRelatorioApuracao: 0,
|
|
166
|
-
tipoRelatorioApuracaoEnum: {},
|
|
167
|
-
versao: 0,
|
|
168
|
-
criadoEm: new Date().toJSON(),
|
|
169
|
-
alteradoEm: null,
|
|
170
|
-
statusEnum: {
|
|
171
|
-
id: 0,
|
|
172
|
-
name: 'Ativo'
|
|
173
|
-
}
|
|
174
|
-
}, {
|
|
175
|
-
id: (0, _uuid.v4)(),
|
|
176
|
-
naturezaPaiId: null,
|
|
177
|
-
descricao: 'Conta 13',
|
|
178
|
-
codigoEstrutural: '0',
|
|
179
|
-
contaContabil: '1.3',
|
|
180
|
-
tipoFluxoId: 'teste',
|
|
181
|
-
tipoNatureza: 0,
|
|
182
|
-
tipoNaturezaEnum: {},
|
|
183
|
-
padraoTransferenciaCaixaBanco: false,
|
|
184
|
-
ocultarInformacoesAnaliseFiliais: false,
|
|
185
|
-
ocultarInformacoesFluxoCaixa: false,
|
|
186
|
-
tipoMovimentacaoResultadoOperacional: 0,
|
|
187
|
-
tipoMovimentacaoResultadoOperacionalEnum: {},
|
|
188
|
-
tipoRelatorioApuracao: 0,
|
|
189
|
-
tipoRelatorioApuracaoEnum: {},
|
|
190
|
-
versao: 0,
|
|
191
|
-
criadoEm: new Date().toJSON(),
|
|
192
|
-
alteradoEm: null,
|
|
193
|
-
statusEnum: {
|
|
194
|
-
id: 0,
|
|
195
|
-
name: 'Ativo'
|
|
196
|
-
}
|
|
197
|
-
}, {
|
|
198
|
-
id: (0, _uuid.v4)(),
|
|
199
|
-
naturezaPaiId: null,
|
|
200
|
-
descricao: 'Conta 14',
|
|
201
|
-
codigoEstrutural: '0',
|
|
202
|
-
contaContabil: '1.4',
|
|
203
|
-
tipoFluxoId: 'teste',
|
|
204
|
-
tipoNatureza: 0,
|
|
205
|
-
tipoNaturezaEnum: {},
|
|
206
|
-
padraoTransferenciaCaixaBanco: false,
|
|
207
|
-
ocultarInformacoesAnaliseFiliais: false,
|
|
208
|
-
ocultarInformacoesFluxoCaixa: false,
|
|
209
|
-
tipoMovimentacaoResultadoOperacional: 0,
|
|
210
|
-
tipoMovimentacaoResultadoOperacionalEnum: {},
|
|
211
|
-
tipoRelatorioApuracao: 0,
|
|
212
|
-
tipoRelatorioApuracaoEnum: {},
|
|
213
|
-
versao: 0,
|
|
214
|
-
criadoEm: new Date().toJSON(),
|
|
215
|
-
alteradoEm: null,
|
|
216
|
-
statusEnum: {
|
|
217
|
-
id: 1,
|
|
218
|
-
name: 'Inativo'
|
|
219
|
-
}
|
|
220
|
-
}]);
|
|
221
|
-
}, 2000);
|
|
222
|
-
}));
|
|
223
|
-
|
|
224
|
-
case 1:
|
|
225
|
-
case "end":
|
|
226
|
-
return _context.stop();
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}, _callee);
|
|
230
|
-
}));
|
|
231
|
-
|
|
232
|
-
return function getChildrens() {
|
|
233
|
-
return _ref.apply(this, arguments);
|
|
234
|
-
};
|
|
235
|
-
}();
|
|
236
|
-
|
|
237
|
-
var toolbar = [/*#__PURE__*/_react2["default"].createElement(_toolbar.ButtonBar, {
|
|
238
|
-
size: "small",
|
|
239
|
-
type: "edit",
|
|
240
|
-
onClick: function onClick() {}
|
|
241
|
-
})];
|
|
242
|
-
|
|
243
|
-
var treeTableRenderMock = function treeTableRenderMock(props) {
|
|
244
|
-
return /*#__PURE__*/_react2["default"].createElement(_["default"], (0, _extends2["default"])({
|
|
245
|
-
initialData: data,
|
|
246
|
-
valuePropName: "contaContabil",
|
|
247
|
-
labelPropName: "descricao",
|
|
248
|
-
propHasChildren: "naturezaPaiId",
|
|
249
|
-
onClickGetChildrens: function onClickGetChildrens() {
|
|
250
|
-
return getChildrens();
|
|
251
|
-
}
|
|
252
|
-
}, props));
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
var treeTableDontChildrensRenderMock = function treeTableDontChildrensRenderMock(props) {
|
|
256
|
-
return /*#__PURE__*/_react2["default"].createElement(_["default"], (0, _extends2["default"])({
|
|
257
|
-
initialData: dataDontChildrens,
|
|
258
|
-
valuePropName: "contaContabil",
|
|
259
|
-
labelPropName: "descricao",
|
|
260
|
-
propHasChildren: "naturezaPaiId",
|
|
261
|
-
onClickGetChildrens: function onClickGetChildrens() {
|
|
262
|
-
return getChildrens();
|
|
263
|
-
}
|
|
264
|
-
}, props));
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
describe('TreeTable', function () {
|
|
268
|
-
it('should render', function () {
|
|
269
|
-
var _render = (0, _react.render)(treeTableRenderMock()),
|
|
270
|
-
container = _render.container;
|
|
271
|
-
|
|
272
|
-
expect(container.firstChild).toBeTruthy();
|
|
273
|
-
});
|
|
274
|
-
it('should not render table header', function () {
|
|
275
|
-
var _render2 = (0, _react.render)(treeTableRenderMock({
|
|
276
|
-
showHeaderTable: false
|
|
277
|
-
})),
|
|
278
|
-
container = _render2.container;
|
|
279
|
-
|
|
280
|
-
expect(container.querySelector('.theader')).not.toBeTruthy();
|
|
281
|
-
});
|
|
282
|
-
it('should render toolbar', function () {
|
|
283
|
-
var _render3 = (0, _react.render)(treeTableRenderMock({
|
|
284
|
-
toolbarElements: toolbar
|
|
285
|
-
})),
|
|
286
|
-
container = _render3.container;
|
|
287
|
-
|
|
288
|
-
expect(container.querySelector('.container-toolbar-buttons')).toBeTruthy();
|
|
289
|
-
});
|
|
290
|
-
it('should not render toolbar', function () {
|
|
291
|
-
var _render4 = (0, _react.render)(treeTableRenderMock()),
|
|
292
|
-
container = _render4.container;
|
|
293
|
-
|
|
294
|
-
expect(container.querySelector('.container-toolbar-buttons')).not.toBeTruthy();
|
|
295
|
-
});
|
|
296
|
-
it('should not render button getChildrens when you dont have children', function () {
|
|
297
|
-
var _render5 = (0, _react.render)(treeTableDontChildrensRenderMock()),
|
|
298
|
-
container = _render5.container;
|
|
299
|
-
|
|
300
|
-
expect(container.querySelector('.open-close-children')).not.toBeTruthy();
|
|
301
|
-
});
|
|
302
|
-
});
|