@eturnity/eturnity_reusable_components 7.48.1-EPDM-10679.1 → 7.48.1-EPDM-12680.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/README.md +29 -29
- package/package.json +84 -85
- package/src/App.vue +30 -30
- package/src/Test.vue +128 -128
- package/src/assets/icons/arrow_down.svg +3 -3
- package/src/assets/icons/arrow_up_red.svg +3 -3
- package/src/assets/icons/black_spinner.svg +35 -35
- package/src/assets/icons/delete_icon.svg +11 -11
- package/src/assets/icons/delete_icon_gray.svg +11 -11
- package/src/assets/icons/drag_icon.svg +8 -8
- package/src/assets/icons/external_icon.svg +6 -6
- package/src/assets/icons/language_icon.svg +6 -6
- package/src/assets/icons/pdf_icon.svg +6 -6
- package/src/assets/icons/plus_button.svg +4 -4
- package/src/assets/icons/search_icon_black.svg +3 -3
- package/src/assets/icons/subposition_icon.svg +3 -3
- package/src/assets/icons/subposition_marker.svg +3 -3
- package/src/assets/icons/warning_icon.svg +3 -3
- package/src/assets/svgIcons/2d_active.svg +7 -7
- package/src/assets/svgIcons/2d_inactive.svg +8 -8
- package/src/assets/svgIcons/3d_active.svg +7 -7
- package/src/assets/svgIcons/3d_inactive.svg +8 -8
- package/src/assets/svgIcons/_readme.md +7 -7
- package/src/assets/svgIcons/accept.svg +5 -5
- package/src/assets/svgIcons/activate_panels_active.svg +22 -22
- package/src/assets/svgIcons/activate_panels_inactive.svg +20 -20
- package/src/assets/svgIcons/add_icon-1.svg +3 -3
- package/src/assets/svgIcons/add_icon.svg +4 -4
- package/src/assets/svgIcons/address_book.svg +3 -3
- package/src/assets/svgIcons/adjust_roof.svg +6 -6
- package/src/assets/svgIcons/after_sale_as_a_service.svg +6 -6
- package/src/assets/svgIcons/all_good.svg +3 -3
- package/src/assets/svgIcons/angle_active.svg +5 -5
- package/src/assets/svgIcons/angle_inactive.svg +4 -4
- package/src/assets/svgIcons/area_active.svg +11 -11
- package/src/assets/svgIcons/area_inactive.svg +26 -26
- package/src/assets/svgIcons/areas_tool.svg +14 -14
- package/src/assets/svgIcons/arrow_down.svg +3 -3
- package/src/assets/svgIcons/arrow_left.svg +4 -4
- package/src/assets/svgIcons/arrow_right.svg +4 -4
- package/src/assets/svgIcons/arrow_up.svg +3 -3
- package/src/assets/svgIcons/attachment.svg +3 -3
- package/src/assets/svgIcons/base_layer.svg +3 -3
- package/src/assets/svgIcons/battery.svg +3 -3
- package/src/assets/svgIcons/bell.svg +3 -3
- package/src/assets/svgIcons/bexio.svg +4 -4
- package/src/assets/svgIcons/bold.svg +3 -3
- package/src/assets/svgIcons/bom.svg +3 -3
- package/src/assets/svgIcons/bom_generation.svg +10 -10
- package/src/assets/svgIcons/bookmaker.svg +3 -3
- package/src/assets/svgIcons/bubble.svg +3 -3
- package/src/assets/svgIcons/bug.svg +5 -5
- package/src/assets/svgIcons/buildings.svg +55 -55
- package/src/assets/svgIcons/bullet_list.svg +8 -8
- package/src/assets/svgIcons/calendar.svg +7 -7
- package/src/assets/svgIcons/calendar_icon.svg +7 -7
- package/src/assets/svgIcons/call.svg +3 -3
- package/src/assets/svgIcons/camera.svg +3 -3
- package/src/assets/svgIcons/car.svg +3 -3
- package/src/assets/svgIcons/cart.svg +3 -3
- package/src/assets/svgIcons/charger_icon_white.svg +44 -44
- package/src/assets/svgIcons/checkbox.svg +3 -3
- package/src/assets/svgIcons/clear_formatting.svg +7 -7
- package/src/assets/svgIcons/clickable_info.svg +4 -4
- package/src/assets/svgIcons/clip.svg +3 -3
- package/src/assets/svgIcons/clock.svg +17 -17
- package/src/assets/svgIcons/clock_full.svg +3 -3
- package/src/assets/svgIcons/close_for_modals,_tool_tips.svg +4 -4
- package/src/assets/svgIcons/co_branding.svg +5 -5
- package/src/assets/svgIcons/collapse.svg +4 -4
- package/src/assets/svgIcons/collapse_all.svg +4 -0
- package/src/assets/svgIcons/collections.svg +3 -3
- package/src/assets/svgIcons/component_library.svg +7 -7
- package/src/assets/svgIcons/consumption_tariffs.svg +43 -43
- package/src/assets/svgIcons/context_menu-1.svg +6 -6
- package/src/assets/svgIcons/context_menu-2.svg +5 -5
- package/src/assets/svgIcons/context_menu.svg +5 -5
- package/src/assets/svgIcons/context_menu_tabs.svg +5 -5
- package/src/assets/svgIcons/cross.svg +4 -4
- package/src/assets/svgIcons/current_variant.svg +4 -4
- package/src/assets/svgIcons/dashboard.svg +3 -3
- package/src/assets/svgIcons/data_transfer.svg +3 -3
- package/src/assets/svgIcons/deadline.svg +4 -4
- package/src/assets/svgIcons/deal_flow.svg +5 -5
- package/src/assets/svgIcons/delete.svg +4 -4
- package/src/assets/svgIcons/delete_area_active.svg +16 -16
- package/src/assets/svgIcons/delete_area_inactive.svg +15 -15
- package/src/assets/svgIcons/direction_active-1.svg +12 -12
- package/src/assets/svgIcons/direction_active.svg +5 -5
- package/src/assets/svgIcons/direction_arrow.svg +4 -4
- package/src/assets/svgIcons/direction_inactive.svg +4 -4
- package/src/assets/svgIcons/dislike.svg +3 -3
- package/src/assets/svgIcons/distance_tool.svg +8 -8
- package/src/assets/svgIcons/distances_active.svg +9 -9
- package/src/assets/svgIcons/distances_inactive.svg +8 -8
- package/src/assets/svgIcons/distort_tool.svg +10 -10
- package/src/assets/svgIcons/distort_tool2.svg +16 -16
- package/src/assets/svgIcons/document.svg +3 -3
- package/src/assets/svgIcons/documents.svg +4 -4
- package/src/assets/svgIcons/downarrow.svg +3 -3
- package/src/assets/svgIcons/download.svg +4 -4
- package/src/assets/svgIcons/drag_icon.svg +8 -8
- package/src/assets/svgIcons/draggable_corner.svg +5 -5
- package/src/assets/svgIcons/draw_tool.svg +3 -3
- package/src/assets/svgIcons/duplicate-1.svg +8 -8
- package/src/assets/svgIcons/duplicate-2.svg +5 -5
- package/src/assets/svgIcons/duplicate.svg +4 -4
- package/src/assets/svgIcons/e-mobility_configurator.svg +6 -6
- package/src/assets/svgIcons/e_signature.svg +5 -5
- package/src/assets/svgIcons/edit_button.svg +3 -3
- package/src/assets/svgIcons/electricity_tariff.svg +3 -3
- package/src/assets/svgIcons/email.svg +3 -3
- package/src/assets/svgIcons/ems-1.svg +3 -3
- package/src/assets/svgIcons/ems.svg +3 -3
- package/src/assets/svgIcons/end_of_the_list.svg +5 -5
- package/src/assets/svgIcons/erase.svg +4 -4
- package/src/assets/svgIcons/external_icon.svg +5 -5
- package/src/assets/svgIcons/fav_icon.svg +4 -4
- package/src/assets/svgIcons/finance.svg +3 -3
- package/src/assets/svgIcons/financing_for_pv-1.svg +5 -5
- package/src/assets/svgIcons/financing_for_pv-2.svg +3 -3
- package/src/assets/svgIcons/financing_for_pv.svg +6 -6
- package/src/assets/svgIcons/finish-1.svg +4 -4
- package/src/assets/svgIcons/finish.svg +3 -3
- package/src/assets/svgIcons/flatten.svg +11 -11
- package/src/assets/svgIcons/flatten_roof.svg +20 -20
- package/src/assets/svgIcons/folder.svg +3 -3
- package/src/assets/svgIcons/free_technology.svg +5 -5
- package/src/assets/svgIcons/handle.svg +5 -5
- package/src/assets/svgIcons/heat_calc.svg +7 -7
- package/src/assets/svgIcons/height_equalize.svg +3 -3
- package/src/assets/svgIcons/height_snap.svg +3 -3
- package/src/assets/svgIcons/house.svg +3 -3
- package/src/assets/svgIcons/house_3d-1.svg +7 -7
- package/src/assets/svgIcons/house_3d.svg +7 -7
- package/src/assets/svgIcons/hybrid.svg +4 -0
- package/src/assets/svgIcons/inclination.svg +2 -2
- package/src/assets/svgIcons/info.svg +3 -3
- package/src/assets/svgIcons/initial_situation.svg +3 -3
- package/src/assets/svgIcons/integrations.svg +3 -3
- package/src/assets/svgIcons/intro-tour-1.svg +3 -3
- package/src/assets/svgIcons/intro-tour.svg +3 -3
- package/src/assets/svgIcons/inverter-1.svg +5 -5
- package/src/assets/svgIcons/inverter.svg +3 -3
- package/src/assets/svgIcons/italic.svg +3 -3
- package/src/assets/svgIcons/key.svg +3 -3
- package/src/assets/svgIcons/lake.svg +29 -29
- package/src/assets/svgIcons/layers_close.svg +4 -4
- package/src/assets/svgIcons/layers_open.svg +4 -4
- package/src/assets/svgIcons/lead_marketplace.svg +6 -6
- package/src/assets/svgIcons/lead_provider.svg +4 -4
- package/src/assets/svgIcons/length_2d.svg +2 -2
- package/src/assets/svgIcons/length_3d.svg +4 -4
- package/src/assets/svgIcons/length_calculator.svg +2 -2
- package/src/assets/svgIcons/length_in_2d_active.svg +12 -12
- package/src/assets/svgIcons/length_in_2d_inctive.svg +13 -13
- package/src/assets/svgIcons/light_bulb.svg +3 -3
- package/src/assets/svgIcons/like.svg +3 -3
- package/src/assets/svgIcons/line_graph.svg +3 -3
- package/src/assets/svgIcons/local_subsidies.svg +18 -18
- package/src/assets/svgIcons/location.svg +3 -3
- package/src/assets/svgIcons/lock.svg +3 -3
- package/src/assets/svgIcons/logout.svg +3 -3
- package/src/assets/svgIcons/loop.svg +3 -3
- package/src/assets/svgIcons/low-vegetation.svg +37 -37
- package/src/assets/svgIcons/lunch.svg +4 -4
- package/src/assets/svgIcons/magic_tool.svg +6 -6
- package/src/assets/svgIcons/map_icon.svg +5 -5
- package/src/assets/svgIcons/map_settings.svg +3 -3
- package/src/assets/svgIcons/margin_tool.svg +4 -4
- package/src/assets/svgIcons/meeting.svg +6 -6
- package/src/assets/svgIcons/module.svg +3 -0
- package/src/assets/svgIcons/move_copy.svg +4 -4
- package/src/assets/svgIcons/move_down.svg +3 -0
- package/src/assets/svgIcons/move_up.svg +3 -0
- package/src/assets/svgIcons/new_area_inactive.svg +11 -11
- package/src/assets/svgIcons/next.svg +4 -4
- package/src/assets/svgIcons/normal-tg.svg +30 -30
- package/src/assets/svgIcons/normal-vegetation.svg +53 -53
- package/src/assets/svgIcons/not_equal_to.svg +3 -3
- package/src/assets/svgIcons/numbered_list.svg +6 -6
- package/src/assets/svgIcons/obstacle_tool.svg +8 -8
- package/src/assets/svgIcons/obstacle_tool_origin.svg +3 -3
- package/src/assets/svgIcons/offset_tool.svg +8 -8
- package/src/assets/svgIcons/open-tg.svg +21 -21
- package/src/assets/svgIcons/optimizer.svg +6 -0
- package/src/assets/svgIcons/outline_tool.svg +11 -11
- package/src/assets/svgIcons/pan_tool.svg +12 -12
- package/src/assets/svgIcons/panels_tool.svg +8 -8
- package/src/assets/svgIcons/pen_tool.svg +4 -4
- package/src/assets/svgIcons/picker_tool.svg +4 -4
- package/src/assets/svgIcons/picture.svg +3 -3
- package/src/assets/svgIcons/pin.svg +5 -5
- package/src/assets/svgIcons/presentation.svg +3 -3
- package/src/assets/svgIcons/previous.svg +4 -4
- package/src/assets/svgIcons/profile-1.svg +4 -4
- package/src/assets/svgIcons/profile.svg +4 -4
- package/src/assets/svgIcons/profitability.svg +3 -3
- package/src/assets/svgIcons/project_analysis.svg +4 -4
- package/src/assets/svgIcons/project_settings.svg +4 -4
- package/src/assets/svgIcons/protected-tg.svg +47 -47
- package/src/assets/svgIcons/pv.svg +3 -3
- package/src/assets/svgIcons/quotations.svg +6 -6
- package/src/assets/svgIcons/redo.svg +6 -6
- package/src/assets/svgIcons/resizer.svg +5 -5
- package/src/assets/svgIcons/roof_layer.svg +3 -3
- package/src/assets/svgIcons/rotate_tool.svg +3 -3
- package/src/assets/svgIcons/rotate_view.svg +5 -5
- package/src/assets/svgIcons/ruler_tool.svg +3 -3
- package/src/assets/svgIcons/run_simulation.svg +3 -3
- package/src/assets/svgIcons/save.svg +3 -3
- package/src/assets/svgIcons/scaling_tool.svg +8 -8
- package/src/assets/svgIcons/sea.svg +34 -34
- package/src/assets/svgIcons/search.svg +3 -3
- package/src/assets/svgIcons/security.svg +3 -3
- package/src/assets/svgIcons/settings.svg +3 -3
- package/src/assets/svgIcons/show_in_a_new_tab.svg +12 -12
- package/src/assets/svgIcons/smartphone.svg +4 -4
- package/src/assets/svgIcons/solar_calc.svg +13 -13
- package/src/assets/svgIcons/sorting.svg +4 -4
- package/src/assets/svgIcons/split.svg +12 -12
- package/src/assets/svgIcons/start_of_the_list.svg +5 -5
- package/src/assets/svgIcons/strikethrough.svg +4 -4
- package/src/assets/svgIcons/string_design.svg +5 -0
- package/src/assets/svgIcons/subscriptions.svg +3 -3
- package/src/assets/svgIcons/subsidies-1.svg +5 -5
- package/src/assets/svgIcons/subsidies-2.svg +3 -3
- package/src/assets/svgIcons/subsidies.svg +3 -3
- package/src/assets/svgIcons/subtract_icon.svg +3 -3
- package/src/assets/svgIcons/suitcase.svg +3 -3
- package/src/assets/svgIcons/summer.svg +3 -3
- package/src/assets/svgIcons/template_icon_not_clickable.svg +6 -6
- package/src/assets/svgIcons/transfer.svg +4 -4
- package/src/assets/svgIcons/trim_tool.svg +4 -4
- package/src/assets/svgIcons/truck.svg +3 -3
- package/src/assets/svgIcons/underlined.svg +3 -3
- package/src/assets/svgIcons/undo.svg +6 -6
- package/src/assets/svgIcons/uparrow.svg +3 -3
- package/src/assets/svgIcons/update.svg +3 -3
- package/src/assets/svgIcons/upload_avatar-1.svg +12 -12
- package/src/assets/svgIcons/upload_avatar.svg +5 -5
- package/src/assets/svgIcons/upload_image.svg +8 -8
- package/src/assets/svgIcons/upload_image_tool.svg +7 -7
- package/src/assets/svgIcons/variants.svg +6 -6
- package/src/assets/svgIcons/vertical_tool.svg +3 -3
- package/src/assets/svgIcons/virtual_storage.svg +4 -4
- package/src/assets/svgIcons/warning.svg +4 -4
- package/src/assets/svgIcons/way.svg +5 -5
- package/src/assets/svgIcons/wifi.svg +3 -3
- package/src/assets/svgIcons/winter.svg +3 -3
- package/src/assets/svgIcons/workflow_template.svg +11 -11
- package/src/assets/tests/__mocks__/iconCache.js +1 -1
- package/src/assets/tests/__mocks__/svgMock.js +1 -1
- package/src/assets/tests/helpers.js +12 -12
- package/src/assets/theme.js +44 -45
- package/src/components/addNewButton/AddNewButton.stories.js +17 -17
- package/src/components/addNewButton/addNewButton.spec.js +23 -23
- package/src/components/addNewButton/index.vue +62 -62
- package/src/components/banner/actionBanner/ActionBanner.stories.js +45 -45
- package/src/components/banner/actionBanner/actionBanner.spec.js +76 -76
- package/src/components/banner/actionBanner/index.vue +86 -86
- package/src/components/banner/banner/Banner.stories.js +64 -64
- package/src/components/banner/banner/banner.spec.js +149 -149
- package/src/components/banner/banner/index.vue +205 -205
- package/src/components/banner/infoBanner/InfoBanner.spec.js +70 -70
- package/src/components/banner/infoBanner/InfoBanner.stories.js +42 -42
- package/src/components/banner/infoBanner/index.vue +97 -97
- package/src/components/buttons/buttonIcon/index.vue +147 -145
- package/src/components/buttons/closeButton/CloseButton.stories.js +25 -25
- package/src/components/buttons/closeButton/index.vue +62 -62
- package/src/components/buttons/mainButton/MainButton.stories.js +51 -51
- package/src/components/buttons/mainButton/index.vue +160 -150
- package/src/components/buttons/mainButton/mainButton.spec.js +35 -35
- package/src/components/card/Card.stories.js +79 -79
- package/src/components/card/card.spec.js +135 -135
- package/src/components/card/index.vue +116 -116
- package/src/components/collapsableInfoText/index.vue +127 -127
- package/src/components/deleteIcon/DeleteIcon.stories.js +29 -29
- package/src/components/deleteIcon/index.vue +78 -78
- package/src/components/draggableInputHandle/index.vue +46 -46
- package/src/components/dropdown/Dropdown.stories.js +53 -53
- package/src/components/dropdown/index.vue +138 -138
- package/src/components/errorMessage/index.vue +64 -64
- package/src/components/filter/filterSettings.vue +669 -669
- package/src/components/filter/index.vue +154 -154
- package/src/components/filter/parentDropdown.vue +91 -91
- package/src/components/icon/Icons.stories.js +41 -41
- package/src/components/icon/iconCache.mjs +23 -23
- package/src/components/icon/iconCollection.vue +82 -82
- package/src/components/icon/index.vue +141 -140
- package/src/components/iconWrapper/index.vue +179 -179
- package/src/components/infoCard/index.vue +67 -152
- package/src/components/infoText/index.vue +354 -190
- package/src/components/infoText/placeholder.vue +225 -0
- package/src/components/inputs/checkbox/Checkbox.stories.js +63 -63
- package/src/components/inputs/checkbox/checkbox.spec.js +109 -109
- package/src/components/inputs/checkbox/index.vue +225 -225
- package/src/components/inputs/inputNumber/InputNumber.stories.js +150 -150
- package/src/components/inputs/inputNumber/index.vue +963 -789
- package/src/components/inputs/inputNumberQuestion/index.vue +218 -218
- package/src/components/inputs/inputText/InputText.stories.js +70 -70
- package/src/components/inputs/inputText/index.vue +438 -417
- package/src/components/inputs/inputText/inputText.spec.js +588 -588
- package/src/components/inputs/radioButton/RadioButton.stories.js +77 -77
- package/src/components/inputs/radioButton/defaultProps.js +33 -31
- package/src/components/inputs/radioButton/index.vue +330 -309
- package/src/components/inputs/radioButton/radioButton.spec.js +306 -269
- package/src/components/inputs/searchInput/SearchInput.stories.js +66 -66
- package/src/components/inputs/searchInput/defaultProps.js +12 -12
- package/src/components/inputs/searchInput/index.vue +159 -159
- package/src/components/inputs/searchInput/searchInput.spec.js +64 -64
- package/src/components/inputs/select/index.vue +958 -918
- package/src/components/inputs/select/option/index.vue +165 -156
- package/src/components/inputs/select/select.stories.js +58 -58
- package/src/components/inputs/slider/index.vue +126 -126
- package/src/components/inputs/switchField/index.vue +254 -254
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +127 -127
- package/src/components/inputs/textAreaInput/index.vue +198 -198
- package/src/components/inputs/toggle/Toggle.stories.js +77 -77
- package/src/components/inputs/toggle/index.vue +317 -317
- package/src/components/inputs/toggle/toggle.spec.js +102 -102
- package/src/components/label/index.vue +99 -99
- package/src/components/markerItem/index.vue +95 -88
- package/src/components/modals/actionModal/index.vue +64 -64
- package/src/components/modals/infoModal/index.vue +52 -52
- package/src/components/modals/modal/index.vue +190 -196
- package/src/components/modals/modal/modal.stories.js +31 -31
- package/src/components/navigationTabs/index.vue +114 -114
- package/src/components/pageSubtitle/PageSubtitle.stories.js +59 -59
- package/src/components/pageSubtitle/index.vue +78 -78
- package/src/components/pageSubtitle/pageSubtitle.spec.js +46 -46
- package/src/components/pageTitle/PageTitle.stories.js +95 -95
- package/src/components/pageTitle/index.vue +91 -91
- package/src/components/pageTitle/pageTitle.spec.js +46 -46
- package/src/components/pagination/index.vue +148 -148
- package/src/components/progressBar/index.vue +125 -125
- package/src/components/projectMarker/index.vue +300 -300
- package/src/components/rangeSlider/Slider.vue +573 -573
- package/src/components/rangeSlider/index.vue +517 -517
- package/src/components/rangeSlider/utils/dom.js +49 -49
- package/src/components/rangeSlider/utils/fns.js +26 -26
- package/src/components/roundTabs/index.vue +107 -107
- package/src/components/selectedOptions/index.vue +471 -471
- package/src/components/selectedOptions/selectedOptions.spec.js +176 -176
- package/src/components/selectedOptions/selectedOptions.stories.js +155 -155
- package/src/components/sideMenu/index.vue +270 -279
- package/src/components/spinner/Spinner.stories.js +34 -34
- package/src/components/spinner/index.vue +96 -85
- package/src/components/spinner/spinner.spec.js +69 -69
- package/src/components/stringDesign/DropdownMenu/index.vue +745 -0
- package/src/components/tableDropdown/index.vue +638 -638
- package/src/components/tables/mainTable/exampleNested.vue +328 -328
- package/src/components/tables/mainTable/index.vue +510 -510
- package/src/components/tables/viewTable/index.vue +195 -195
- package/src/components/tabsHeader/index.vue +83 -83
- package/src/components/threeDots/index.vue +413 -413
- package/src/components/videoThumbnail/index.vue +103 -103
- package/src/components/videoThumbnail/videoThumbnail.stories.js +33 -33
- package/src/helpers/currencyMapping.js +28 -28
- package/src/helpers/numberConverter.js +103 -103
- package/src/helpers/translateLang.js +128 -128
- package/src/main.js +7 -7
- package/src/mixins/inputValidations.js +97 -97
- package/src/router/dynamicRoutes.js +23 -23
- package/src/stories/Button.stories.js +48 -48
- package/src/stories/Button.vue +52 -52
- package/src/stories/Configure.mdx +364 -364
- package/src/stories/Header.stories.js +41 -41
- package/src/stories/Header.vue +59 -59
- package/src/stories/Page.stories.js +30 -30
- package/src/stories/Page.vue +83 -83
- package/src/stories/button.css +30 -30
- package/src/stories/header.css +32 -32
- package/src/stories/page.css +69 -69
- package/src/utils/index.js +12 -12
- package/src/assets/svgIcons/solarmarkt.svg +0 -3
- package/src/components/infoCard/InfoCard.stories.js +0 -170
- package/src/components/infoCard/defaultProps.js +0 -7
- package/src/components/infoCard/infoCard.spec.js +0 -64
@@ -0,0 +1,745 @@
|
|
1
|
+
<template>
|
2
|
+
<PageContainer>
|
3
|
+
<PageTitleContainer>
|
4
|
+
<SectionTitleText>{{ $gettext('inverters') }}</SectionTitleText>
|
5
|
+
<ButtonIcon
|
6
|
+
custom-color="black"
|
7
|
+
:icon-name="hasExpandedSection ? 'collapse_all' : 'expand'"
|
8
|
+
:text="$gettext(hasExpandedSection ? 'collapse_all' : 'expand_all')"
|
9
|
+
@click="toggleAllSections"
|
10
|
+
/>
|
11
|
+
</PageTitleContainer>
|
12
|
+
<SectionContainer v-for="(item, index) in dataList" :key="item.inverterId">
|
13
|
+
<TopContainer>
|
14
|
+
<LeftContainer>
|
15
|
+
<TitleContainer>
|
16
|
+
<IconWrapper
|
17
|
+
v-if="item.type != 'optimizer'"
|
18
|
+
size="36px"
|
19
|
+
@click="toggleSection(item.inverterId)"
|
20
|
+
>
|
21
|
+
<RCIcon
|
22
|
+
color="white"
|
23
|
+
:name="isExpanded(item.inverterId) ? 'arrow_up' : 'arrow_down'"
|
24
|
+
size="10px"
|
25
|
+
/>
|
26
|
+
</IconWrapper>
|
27
|
+
<TextContainer
|
28
|
+
:style="{ marginLeft: item.type == 'optimizer' ? '36px' : '0' }"
|
29
|
+
>
|
30
|
+
<TitleText :title="item.model"
|
31
|
+
>{{
|
32
|
+
item.type === 'optimizer' && item.quantity
|
33
|
+
? item.quantity + ' x'
|
34
|
+
: ''
|
35
|
+
}}
|
36
|
+
{{ item.model }}</TitleText
|
37
|
+
>
|
38
|
+
<TitleSubText
|
39
|
+
>{{ item.brandName }} |
|
40
|
+
<ContainerValue v-if="item.getkWp() > 1">
|
41
|
+
{{
|
42
|
+
numberToString({
|
43
|
+
value: item.getkWp(),
|
44
|
+
numberPrecision: 2,
|
45
|
+
})
|
46
|
+
}}
|
47
|
+
kWp
|
48
|
+
</ContainerValue>
|
49
|
+
<ContainerValue v-else>
|
50
|
+
{{
|
51
|
+
numberToString({
|
52
|
+
value: 1000 * item.getkWp(),
|
53
|
+
numberPrecision: 2,
|
54
|
+
minDecimals: 2,
|
55
|
+
})
|
56
|
+
}}
|
57
|
+
Wp
|
58
|
+
</ContainerValue></TitleSubText
|
59
|
+
>
|
60
|
+
</TextContainer>
|
61
|
+
</TitleContainer>
|
62
|
+
<MarkersContainer>
|
63
|
+
<MarkerItem
|
64
|
+
v-if="item.mppts.length"
|
65
|
+
:background-color="isTargetRatioInRange(item) ? 'green' : 'red'"
|
66
|
+
>{{
|
67
|
+
numberToString({
|
68
|
+
value: 100 * item.getTargetRatio(),
|
69
|
+
numberPrecision: 2,
|
70
|
+
minDecimals: 0,
|
71
|
+
})
|
72
|
+
}}%</MarkerItem
|
73
|
+
>
|
74
|
+
<MarkerItem v-if="item.hasTemplate && !item.isLoading">
|
75
|
+
<span
|
76
|
+
:title="
|
77
|
+
item.companyProductTemplateName
|
78
|
+
? item.companyProductTemplateName
|
79
|
+
: $gettext('no_template_selected')
|
80
|
+
"
|
81
|
+
>
|
82
|
+
{{
|
83
|
+
item.companyProductTemplateName
|
84
|
+
? item.companyProductTemplateName
|
85
|
+
: $gettext('no_template_selected')
|
86
|
+
}}
|
87
|
+
</span>
|
88
|
+
</MarkerItem>
|
89
|
+
<MarkerItem>
|
90
|
+
<RCIcon
|
91
|
+
color="white"
|
92
|
+
:name="getIconName(item.type)"
|
93
|
+
size="14px"
|
94
|
+
/>
|
95
|
+
<div>{{ getTypeName(item.type) }}</div>
|
96
|
+
</MarkerItem>
|
97
|
+
</MarkersContainer>
|
98
|
+
<IconsContainer>
|
99
|
+
<IconWrapper>
|
100
|
+
<RCIcon
|
101
|
+
:color="item.isLoading ? 'grey' : 'red'"
|
102
|
+
:cursor="item.isLoading ? 'not-allowed' : 'pointer'"
|
103
|
+
:is-disabled="item.isLoading"
|
104
|
+
name="delete"
|
105
|
+
size="14px"
|
106
|
+
@click="!item.isLoading && $emit('on-delete', item)"
|
107
|
+
/>
|
108
|
+
</IconWrapper>
|
109
|
+
<IconWrapper @click="!item.isLoading && $emit('on-edit', item)">
|
110
|
+
<RCIcon
|
111
|
+
:color="
|
112
|
+
item.isLoading ||
|
113
|
+
(item.type != 'pv_storage' && !item.hasTemplate)
|
114
|
+
? 'grey'
|
115
|
+
: 'white'
|
116
|
+
"
|
117
|
+
:cursor="
|
118
|
+
item.isLoading ||
|
119
|
+
(item.type != 'pv_storage' && !item.hasTemplate)
|
120
|
+
? 'not-allowed'
|
121
|
+
: 'pointer'
|
122
|
+
"
|
123
|
+
:is-disabled="
|
124
|
+
item.isLoading ||
|
125
|
+
(item.type != 'pv_storage' && !item.hasTemplate)
|
126
|
+
"
|
127
|
+
name="edit_button"
|
128
|
+
size="14px"
|
129
|
+
/>
|
130
|
+
</IconWrapper>
|
131
|
+
<IconWrapper>
|
132
|
+
<RCIcon
|
133
|
+
color="white"
|
134
|
+
cursor="pointer"
|
135
|
+
name="document"
|
136
|
+
size="14px"
|
137
|
+
@click="$emit('on-datasheet', item)"
|
138
|
+
/>
|
139
|
+
</IconWrapper>
|
140
|
+
</IconsContainer>
|
141
|
+
</LeftContainer>
|
142
|
+
<SortingContainer v-if="dataList.length > 1">
|
143
|
+
<SortingIconWrapper
|
144
|
+
:data-test-id="'move_up_' + index"
|
145
|
+
:is-disabled="index === 0 || item.isLoading"
|
146
|
+
@click="
|
147
|
+
!item.isLoading && index > 0 && handleMoveClick('up', index)
|
148
|
+
"
|
149
|
+
>
|
150
|
+
<RCIcon
|
151
|
+
:color="index === 0 || item.isLoading ? 'grey6' : 'grey3'"
|
152
|
+
:cursor="
|
153
|
+
index === 0 || item.isLoading ? 'not-allowed' : 'pointer'
|
154
|
+
"
|
155
|
+
name="move_up"
|
156
|
+
size="14px"
|
157
|
+
/>
|
158
|
+
</SortingIconWrapper>
|
159
|
+
<SortingIconWrapper
|
160
|
+
:data-test-id="'move_down_' + index"
|
161
|
+
:is-disabled="index === dataList.length - 1"
|
162
|
+
@click="
|
163
|
+
!item.isLoading &&
|
164
|
+
index < dataList.length - 1 &&
|
165
|
+
handleMoveClick('down', index)
|
166
|
+
"
|
167
|
+
>
|
168
|
+
<RCIcon
|
169
|
+
:color="
|
170
|
+
index === dataList.length - 1 || item.isLoading
|
171
|
+
? 'grey6'
|
172
|
+
: 'grey3'
|
173
|
+
"
|
174
|
+
:cursor="
|
175
|
+
index === dataList.length - 1 || item.isLoading
|
176
|
+
? 'not-allowed'
|
177
|
+
: 'pointer'
|
178
|
+
"
|
179
|
+
:is-disabled="index === dataList.length - 1 || item.isLoading"
|
180
|
+
name="move_down"
|
181
|
+
size="14px"
|
182
|
+
/>
|
183
|
+
</SortingIconWrapper>
|
184
|
+
</SortingContainer>
|
185
|
+
</TopContainer>
|
186
|
+
<BoxContainer
|
187
|
+
v-for="mppt in item.mppts"
|
188
|
+
v-show="isExpanded(item.inverterId)"
|
189
|
+
:key="mppt.mpptId"
|
190
|
+
>
|
191
|
+
<BoxTitleWrapper>
|
192
|
+
<IconWrapper
|
193
|
+
margin-left="4px"
|
194
|
+
size="8px"
|
195
|
+
@click="toggleMppt(mppt.mpptId)"
|
196
|
+
>
|
197
|
+
<RCIcon
|
198
|
+
color="white"
|
199
|
+
cursor="pointer"
|
200
|
+
:name="isMpptExpanded(mppt.mpptId) ? 'arrow_up' : 'arrow_down'"
|
201
|
+
size="10px"
|
202
|
+
/>
|
203
|
+
</IconWrapper>
|
204
|
+
<BoxTitleText>{{ mppt.name }}</BoxTitleText>
|
205
|
+
<BoxIconsContainer>
|
206
|
+
<BoxIconWrapper>
|
207
|
+
<RCIcon
|
208
|
+
color="white"
|
209
|
+
cursor="pointer"
|
210
|
+
name="string_design"
|
211
|
+
size="11px"
|
212
|
+
/>
|
213
|
+
<div>
|
214
|
+
{{ mppt.strings.length }}/{{ mppt.getNumberOfTerminals() }}
|
215
|
+
</div>
|
216
|
+
</BoxIconWrapper>
|
217
|
+
<BoxIconWrapper>
|
218
|
+
<RCIcon
|
219
|
+
color="white"
|
220
|
+
cursor="pointer"
|
221
|
+
name="panels_tool"
|
222
|
+
size="11px"
|
223
|
+
/>
|
224
|
+
<div>{{ getNumberOfMpptModules(mppt.strings) }}</div>
|
225
|
+
</BoxIconWrapper>
|
226
|
+
</BoxIconsContainer>
|
227
|
+
</BoxTitleWrapper>
|
228
|
+
<div v-show="isMpptExpanded(mppt.mpptId)">
|
229
|
+
<StringBox v-for="string in mppt.strings" :key="string.id">
|
230
|
+
<StringColorContainer :background-color="string.color" />
|
231
|
+
<StringContainer>
|
232
|
+
<div>{{ string.name }}</div>
|
233
|
+
<StringIconContainer>
|
234
|
+
<div>{{ string.modules.length }}</div>
|
235
|
+
<RCIcon color="white" name="module" size="14px" />
|
236
|
+
</StringIconContainer>
|
237
|
+
</StringContainer>
|
238
|
+
</StringBox>
|
239
|
+
</div>
|
240
|
+
</BoxContainer>
|
241
|
+
<BoxContainer
|
242
|
+
v-if="item.storageSystem && Object.keys(item.storageSystem).length > 0"
|
243
|
+
v-show="isExpanded(item.inverterId)"
|
244
|
+
:key="item.storageSystem.storage_system_id"
|
245
|
+
>
|
246
|
+
<BoxTitleWrapper>
|
247
|
+
<IconWrapper
|
248
|
+
margin-left="4px"
|
249
|
+
size="8px"
|
250
|
+
@click="toggleMppt(item.storageSystem.storage_system_id)"
|
251
|
+
>
|
252
|
+
<RCIcon
|
253
|
+
color="white"
|
254
|
+
cursor="pointer"
|
255
|
+
:name="
|
256
|
+
isMpptExpanded(item.storageSystem.storage_system_id)
|
257
|
+
? 'arrow_up'
|
258
|
+
: 'arrow_down'
|
259
|
+
"
|
260
|
+
size="10px"
|
261
|
+
/>
|
262
|
+
</IconWrapper>
|
263
|
+
<BoxTitleText>{{ $gettext('battery') }}</BoxTitleText>
|
264
|
+
</BoxTitleWrapper>
|
265
|
+
<div v-show="isMpptExpanded(item.storageSystem.storage_system_id)">
|
266
|
+
<BatteryBox>
|
267
|
+
<RCIcon color="white" name="battery" size="14px" />
|
268
|
+
<BatteryDetailsContainer>
|
269
|
+
<BatteryType>{{ item.storageSystem.brand_name }}</BatteryType>
|
270
|
+
<BatteryModel>{{ item.storageSystem.model }}</BatteryModel>
|
271
|
+
</BatteryDetailsContainer>
|
272
|
+
<BatteryValue>
|
273
|
+
{{
|
274
|
+
numberToString({
|
275
|
+
value: item.storageSystem.nominal_capacity_kWh,
|
276
|
+
numberPrecision: 2,
|
277
|
+
minDecimals: 0,
|
278
|
+
})
|
279
|
+
}}
|
280
|
+
kWh
|
281
|
+
</BatteryValue>
|
282
|
+
</BatteryBox>
|
283
|
+
</div>
|
284
|
+
</BoxContainer>
|
285
|
+
</SectionContainer>
|
286
|
+
<DividerContainer v-if="batteryData.length" />
|
287
|
+
<UnassignedContainer v-if="batteryData.length">
|
288
|
+
<SectionTitleText>{{ $gettext('battery_information') }}</SectionTitleText>
|
289
|
+
<BatteryBox
|
290
|
+
v-for="battery in batteryData"
|
291
|
+
:key="battery.id"
|
292
|
+
:is-unassigned="true"
|
293
|
+
>
|
294
|
+
<RCIcon color="black" name="battery" size="14px" />
|
295
|
+
<BatteryDetailsContainer>
|
296
|
+
<UnassignedType>{{ battery.brand_name }}</UnassignedType>
|
297
|
+
<UnassignedModel>{{ battery.model }}</UnassignedModel>
|
298
|
+
</BatteryDetailsContainer>
|
299
|
+
<BatteryValue>
|
300
|
+
{{
|
301
|
+
numberToString({
|
302
|
+
value: battery.nominal_capacity_kWh,
|
303
|
+
numberPrecision: 2,
|
304
|
+
minDecimals: 0,
|
305
|
+
})
|
306
|
+
}}
|
307
|
+
kWh
|
308
|
+
</BatteryValue>
|
309
|
+
</BatteryBox>
|
310
|
+
</UnassignedContainer>
|
311
|
+
</PageContainer>
|
312
|
+
</template>
|
313
|
+
|
314
|
+
<script>
|
315
|
+
// import DropdownMenu from '@eturnity/eturnity_reusable_components/src/components/stringDesign/DropdownMenu'
|
316
|
+
import styled from 'vue3-styled-components'
|
317
|
+
import RCIcon from '../../icon'
|
318
|
+
import ButtonIcon from '../../buttons/buttonIcon'
|
319
|
+
import { numberToString } from '../../../helpers/numberConverter'
|
320
|
+
|
321
|
+
const PageContainer = styled.div`
|
322
|
+
position: relative;
|
323
|
+
`
|
324
|
+
|
325
|
+
const SectionContainer = styled.div`
|
326
|
+
&:not(:last-child) {
|
327
|
+
margin-bottom: 8px;
|
328
|
+
}
|
329
|
+
background-color: ${(props) => props.theme.colors.black};
|
330
|
+
padding: 8px;
|
331
|
+
border-radius: 4px;
|
332
|
+
color: ${(props) => props.theme.colors.white};
|
333
|
+
`
|
334
|
+
|
335
|
+
const TitleContainer = styled.div`
|
336
|
+
display: flex;
|
337
|
+
align-items: center;
|
338
|
+
`
|
339
|
+
|
340
|
+
const IconsContainer = styled.div`
|
341
|
+
display: flex;
|
342
|
+
align-items: center;
|
343
|
+
margin-left: 36px;
|
344
|
+
`
|
345
|
+
|
346
|
+
const TextContainer = styled.div`
|
347
|
+
display: grid;
|
348
|
+
`
|
349
|
+
|
350
|
+
const TitleText = styled.div`
|
351
|
+
font-size: 14px;
|
352
|
+
white-space: nowrap;
|
353
|
+
overflow: hidden;
|
354
|
+
text-overflow: ellipsis;
|
355
|
+
`
|
356
|
+
|
357
|
+
const TitleSubText = styled.div`
|
358
|
+
font-size: 12px;
|
359
|
+
display: flex;
|
360
|
+
gap: 4px;
|
361
|
+
`
|
362
|
+
|
363
|
+
const MarkersContainer = styled.div`
|
364
|
+
display: flex;
|
365
|
+
flex-wrap: wrap;
|
366
|
+
gap: 8px;
|
367
|
+
margin: 4px 0 2px 36px;
|
368
|
+
align-items: end;
|
369
|
+
`
|
370
|
+
|
371
|
+
const MarkerAttrs = { backgroundColor: String }
|
372
|
+
const MarkerItem = styled('div', MarkerAttrs)`
|
373
|
+
display: flex;
|
374
|
+
gap: 5px;
|
375
|
+
align-items: center;
|
376
|
+
padding: 2px 7px;
|
377
|
+
border-radius: 4px;
|
378
|
+
background-color: ${(props) =>
|
379
|
+
props.backgroundColor
|
380
|
+
? props.theme.colors[props.backgroundColor]
|
381
|
+
: props.theme.colors.grey6};
|
382
|
+
font-size: 11px;
|
383
|
+
color: ${(props) => props.theme.colors.white};
|
384
|
+
max-width: 11ch;
|
385
|
+
white-space: nowrap;
|
386
|
+
overflow: hidden;
|
387
|
+
text-overflow: ellipsis;
|
388
|
+
& > span {
|
389
|
+
overflow: hidden;
|
390
|
+
text-overflow: ellipsis;
|
391
|
+
}
|
392
|
+
`
|
393
|
+
|
394
|
+
const ContainerValue = styled.div`
|
395
|
+
font-size: 12px;
|
396
|
+
`
|
397
|
+
|
398
|
+
const IconAttrs = {
|
399
|
+
size: { type: String, default: '36px' },
|
400
|
+
marginLeft: String,
|
401
|
+
}
|
402
|
+
const IconWrapper = styled('div', IconAttrs)`
|
403
|
+
display: flex;
|
404
|
+
align-items: center;
|
405
|
+
justify-content: center;
|
406
|
+
border-radius: 4px;
|
407
|
+
cursor: pointer;
|
408
|
+
width: ${(props) => props.size};
|
409
|
+
height: ${(props) => props.size};
|
410
|
+
margin-left: ${(props) => props.marginLeft};
|
411
|
+
&:hover {
|
412
|
+
background: ${(props) =>
|
413
|
+
props.marginLeft ? 'transparent' : 'rgba(255, 255, 255, 0.1)'};
|
414
|
+
}
|
415
|
+
|
416
|
+
&:active {
|
417
|
+
background: rgba(255, 255, 255, 0.2);
|
418
|
+
}
|
419
|
+
`
|
420
|
+
|
421
|
+
const BoxContainer = styled.div`
|
422
|
+
border-radius: 4px;
|
423
|
+
background: ${(props) => props.theme.colors.grey6};
|
424
|
+
padding: 8px;
|
425
|
+
margin-top: 8px;
|
426
|
+
margin-left: 30px;
|
427
|
+
`
|
428
|
+
|
429
|
+
const BoxTitleWrapper = styled.div`
|
430
|
+
display: flex;
|
431
|
+
align-items: center;
|
432
|
+
gap: 8px;
|
433
|
+
`
|
434
|
+
|
435
|
+
const BoxTitleText = styled.div`
|
436
|
+
font-size: 13px;
|
437
|
+
`
|
438
|
+
|
439
|
+
const BoxIconsContainer = styled.div`
|
440
|
+
display: flex;
|
441
|
+
gap: 8px;
|
442
|
+
align-items: center;
|
443
|
+
margin-left: auto;
|
444
|
+
font-size: 11px;
|
445
|
+
`
|
446
|
+
|
447
|
+
const BoxIconWrapper = styled.div`
|
448
|
+
display: flex;
|
449
|
+
align-items: center;
|
450
|
+
justify-content: center;
|
451
|
+
gap: 4px;
|
452
|
+
padding: 4px;
|
453
|
+
`
|
454
|
+
|
455
|
+
const StringBox = styled.div`
|
456
|
+
display: grid;
|
457
|
+
grid-template-columns: auto 1fr;
|
458
|
+
margin-top: 8px;
|
459
|
+
border-radius: 4px;
|
460
|
+
border: 1px solid ${(props) => props.theme.colors.grey3};
|
461
|
+
`
|
462
|
+
|
463
|
+
const StringContainer = styled.div`
|
464
|
+
display: flex;
|
465
|
+
justify-content: space-between;
|
466
|
+
gap: 8px;
|
467
|
+
padding: 8px;
|
468
|
+
font-size: 11px;
|
469
|
+
`
|
470
|
+
|
471
|
+
const StringColorAttrs = { backgroundColor: String }
|
472
|
+
const StringColorContainer = styled('div', StringColorAttrs)`
|
473
|
+
background-color: ${(props) => props.backgroundColor};
|
474
|
+
width: 22px;
|
475
|
+
min-height: 100%;
|
476
|
+
border-top-left-radius: 4px;
|
477
|
+
border-bottom-left-radius: 4px;
|
478
|
+
`
|
479
|
+
|
480
|
+
const StringIconContainer = styled.div`
|
481
|
+
display: flex;
|
482
|
+
align-items: center;
|
483
|
+
justify-content: center;
|
484
|
+
gap: 2px;
|
485
|
+
padding: 0 4px;
|
486
|
+
`
|
487
|
+
|
488
|
+
const PageTitleContainer = styled.div`
|
489
|
+
position: sticky;
|
490
|
+
top: 0;
|
491
|
+
background-color: ${(props) => props.theme.colors.black};
|
492
|
+
z-index: 99;
|
493
|
+
padding: 8px;
|
494
|
+
display: flex;
|
495
|
+
justify-content: space-between;
|
496
|
+
align-items: center;
|
497
|
+
padding-bottom: 8px;
|
498
|
+
`
|
499
|
+
|
500
|
+
const SectionTitleText = styled.div`
|
501
|
+
font-size: 14px;
|
502
|
+
font-weight: 700;
|
503
|
+
color: ${(props) => props.theme.colors.white};
|
504
|
+
`
|
505
|
+
|
506
|
+
const BatteryBoxAttrs = { isUnassigned: Boolean }
|
507
|
+
const BatteryBox = styled('div', BatteryBoxAttrs)`
|
508
|
+
display: flex;
|
509
|
+
align-items: center;
|
510
|
+
gap: 8px;
|
511
|
+
border: 1px solid ${(props) => props.theme.colors.white};
|
512
|
+
border-radius: 4px;
|
513
|
+
padding: 8px;
|
514
|
+
margin-top: 8px;
|
515
|
+
background-color: ${(props) =>
|
516
|
+
props.isUnassigned ? props.theme.colors.grey2 : ''};
|
517
|
+
`
|
518
|
+
|
519
|
+
const BatteryDetailsContainer = styled.div`
|
520
|
+
display: flex;
|
521
|
+
flex-direction: column;
|
522
|
+
gap: 4px;
|
523
|
+
`
|
524
|
+
|
525
|
+
const BatteryType = styled.div`
|
526
|
+
font-size: 11px;
|
527
|
+
`
|
528
|
+
|
529
|
+
const BatteryModel = styled.div`
|
530
|
+
font-size: 10px;
|
531
|
+
`
|
532
|
+
|
533
|
+
const BatteryValue = styled.div`
|
534
|
+
font-size: 10px;
|
535
|
+
align-self: flex-end;
|
536
|
+
margin-left: auto;
|
537
|
+
`
|
538
|
+
const TopContainer = styled.div`
|
539
|
+
display: flex;
|
540
|
+
justify-content: space-between;
|
541
|
+
`
|
542
|
+
|
543
|
+
const LeftContainer = styled.div``
|
544
|
+
|
545
|
+
const SortingContainer = styled.div`
|
546
|
+
display: flex;
|
547
|
+
flex-direction: column;
|
548
|
+
align-items: center;
|
549
|
+
`
|
550
|
+
|
551
|
+
const SortingIconWrapperAttrs = { isDisabled: Boolean }
|
552
|
+
const SortingIconWrapper = styled('div', SortingIconWrapperAttrs)`
|
553
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
554
|
+
width: 30px;
|
555
|
+
height: 30px;
|
556
|
+
display: flex;
|
557
|
+
align-items: center;
|
558
|
+
justify-content: center;
|
559
|
+
`
|
560
|
+
|
561
|
+
const UnassignedContainer = styled.div`
|
562
|
+
margin-top: 8px;
|
563
|
+
`
|
564
|
+
|
565
|
+
const DividerContainer = styled.div`
|
566
|
+
height: 0.5px;
|
567
|
+
width: 100%;
|
568
|
+
background-color: ${(props) => props.theme.colors.grey4};
|
569
|
+
opacity: 0.6;
|
570
|
+
`
|
571
|
+
|
572
|
+
const UnassignedType = styled.div`
|
573
|
+
font-size: 12px;
|
574
|
+
line-height: 150%;
|
575
|
+
`
|
576
|
+
|
577
|
+
const UnassignedModel = styled.div`
|
578
|
+
font-size: 10px;
|
579
|
+
line-height: 150%;
|
580
|
+
`
|
581
|
+
|
582
|
+
export default {
|
583
|
+
name: 'DropdownMenu',
|
584
|
+
components: {
|
585
|
+
SectionContainer,
|
586
|
+
TitleContainer,
|
587
|
+
IconsContainer,
|
588
|
+
TextContainer,
|
589
|
+
TitleText,
|
590
|
+
TitleSubText,
|
591
|
+
RCIcon,
|
592
|
+
MarkersContainer,
|
593
|
+
MarkerItem,
|
594
|
+
ContainerValue,
|
595
|
+
IconWrapper,
|
596
|
+
BoxContainer,
|
597
|
+
BoxTitleWrapper,
|
598
|
+
BoxTitleText,
|
599
|
+
BoxIconsContainer,
|
600
|
+
BoxIconWrapper,
|
601
|
+
StringBox,
|
602
|
+
StringContainer,
|
603
|
+
StringColorContainer,
|
604
|
+
StringIconContainer,
|
605
|
+
PageTitleContainer,
|
606
|
+
SectionTitleText,
|
607
|
+
ButtonIcon,
|
608
|
+
PageContainer,
|
609
|
+
BatteryBox,
|
610
|
+
BatteryDetailsContainer,
|
611
|
+
BatteryType,
|
612
|
+
BatteryModel,
|
613
|
+
BatteryValue,
|
614
|
+
TopContainer,
|
615
|
+
LeftContainer,
|
616
|
+
SortingContainer,
|
617
|
+
SortingIconWrapper,
|
618
|
+
UnassignedContainer,
|
619
|
+
DividerContainer,
|
620
|
+
UnassignedType,
|
621
|
+
UnassignedModel,
|
622
|
+
},
|
623
|
+
props: {
|
624
|
+
dataList: {
|
625
|
+
required: true,
|
626
|
+
type: Array,
|
627
|
+
},
|
628
|
+
batteryData: {
|
629
|
+
required: true,
|
630
|
+
type: Array,
|
631
|
+
},
|
632
|
+
inverterParameters: {
|
633
|
+
required: true,
|
634
|
+
type: Object,
|
635
|
+
},
|
636
|
+
},
|
637
|
+
emits: ['on-edit', 'on-move'],
|
638
|
+
data() {
|
639
|
+
return {
|
640
|
+
expandedInverters: [],
|
641
|
+
expandedMppts: [],
|
642
|
+
numberToString,
|
643
|
+
}
|
644
|
+
},
|
645
|
+
computed: {
|
646
|
+
hasExpandedSection() {
|
647
|
+
return this.expandedInverters.length > 0
|
648
|
+
},
|
649
|
+
},
|
650
|
+
watch: {
|
651
|
+
dataList: {
|
652
|
+
handler(newValue) {
|
653
|
+
console.log('newValue', newValue)
|
654
|
+
},
|
655
|
+
deep: true,
|
656
|
+
},
|
657
|
+
},
|
658
|
+
methods: {
|
659
|
+
isTargetRatioInRange(inverter) {
|
660
|
+
const currentTargetRatio = inverter.getTargetRatio()
|
661
|
+
return (
|
662
|
+
this.inverterParameters.target_power_ratio - 20 <=
|
663
|
+
100 * currentTargetRatio &&
|
664
|
+
this.inverterParameters.target_power_ratio + 20 >=
|
665
|
+
100 * currentTargetRatio
|
666
|
+
)
|
667
|
+
},
|
668
|
+
getNumberOfMpptModules(strings) {
|
669
|
+
return strings.reduce((acc, curr) => acc + curr.modules.length, 0)
|
670
|
+
},
|
671
|
+
isExpanded(id) {
|
672
|
+
return this.expandedInverters.includes(id)
|
673
|
+
},
|
674
|
+
isMpptExpanded(id) {
|
675
|
+
return this.expandedMppts.includes(id)
|
676
|
+
},
|
677
|
+
toggleSection(id) {
|
678
|
+
const index = this.expandedInverters.indexOf(id)
|
679
|
+
if (index === -1) {
|
680
|
+
this.expandedInverters.push(id)
|
681
|
+
} else {
|
682
|
+
this.expandedInverters.splice(index, 1)
|
683
|
+
}
|
684
|
+
},
|
685
|
+
toggleMppt(id) {
|
686
|
+
const index = this.expandedMppts.indexOf(id)
|
687
|
+
if (index === -1) {
|
688
|
+
this.expandedMppts.push(id)
|
689
|
+
} else {
|
690
|
+
this.expandedMppts.splice(index, 1)
|
691
|
+
}
|
692
|
+
},
|
693
|
+
toggleAllSections() {
|
694
|
+
if (this.hasExpandedSection) {
|
695
|
+
this.expandedInverters = []
|
696
|
+
this.expandedMppts = []
|
697
|
+
} else {
|
698
|
+
this.expandedInverters = this.dataList.map((item) => item.inverterId)
|
699
|
+
this.expandedMppts = this.dataList.flatMap((item) => [
|
700
|
+
...item.mppts.map((mppt) => mppt.mpptId),
|
701
|
+
...(item.storageSystem
|
702
|
+
? [item.storageSystem.storage_system_id]
|
703
|
+
: []),
|
704
|
+
])
|
705
|
+
}
|
706
|
+
},
|
707
|
+
getTypeName(type) {
|
708
|
+
const value = type.toLowerCase()
|
709
|
+
switch (value) {
|
710
|
+
case 'pv':
|
711
|
+
return this.$gettext('PV')
|
712
|
+
case 'pv_storage':
|
713
|
+
return this.$gettext('hybrid')
|
714
|
+
case 'storage':
|
715
|
+
return this.$gettext('battery')
|
716
|
+
case 'optimizer':
|
717
|
+
return this.$gettext('inverter_type_optimizer')
|
718
|
+
default:
|
719
|
+
return this.$gettext('PV')
|
720
|
+
}
|
721
|
+
},
|
722
|
+
getIconName(type) {
|
723
|
+
const value = type.toLowerCase()
|
724
|
+
switch (value) {
|
725
|
+
case 'pv':
|
726
|
+
return 'pv'
|
727
|
+
case 'pv_storage':
|
728
|
+
return 'hybrid'
|
729
|
+
case 'storage':
|
730
|
+
return 'battery'
|
731
|
+
case 'optimizer':
|
732
|
+
return 'optimizer'
|
733
|
+
default:
|
734
|
+
return 'pv'
|
735
|
+
}
|
736
|
+
},
|
737
|
+
handleMoveClick(direction, index) {
|
738
|
+
this.$emit('on-move', {
|
739
|
+
direction: direction,
|
740
|
+
index: index,
|
741
|
+
})
|
742
|
+
},
|
743
|
+
},
|
744
|
+
}
|
745
|
+
</script>
|