gitlab-lookbook 2.3.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.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +98 -0
- data/app/components/lookbook/base_component.rb +52 -0
- data/app/components/lookbook/button/component.html.erb +17 -0
- data/app/components/lookbook/button/component.js +69 -0
- data/app/components/lookbook/button/component.rb +39 -0
- data/app/components/lookbook/button_group/component.html.erb +3 -0
- data/app/components/lookbook/button_group/component.rb +17 -0
- data/app/components/lookbook/code/component.css +57 -0
- data/app/components/lookbook/code/component.html.erb +11 -0
- data/app/components/lookbook/code/component.js +3 -0
- data/app/components/lookbook/code/component.rb +65 -0
- data/app/components/lookbook/code/highlight_github.css +405 -0
- data/app/components/lookbook/copy_button/component.html.erb +11 -0
- data/app/components/lookbook/copy_button/component.js +16 -0
- data/app/components/lookbook/copy_button/component.rb +26 -0
- data/app/components/lookbook/debug_menu/component.html.erb +52 -0
- data/app/components/lookbook/debug_menu/component.rb +29 -0
- data/app/components/lookbook/dimensions_display/component.html.erb +11 -0
- data/app/components/lookbook/dimensions_display/component.js +34 -0
- data/app/components/lookbook/dimensions_display/component.rb +15 -0
- data/app/components/lookbook/display_options/editor/component.html.erb +13 -0
- data/app/components/lookbook/display_options/editor/component.rb +7 -0
- data/app/components/lookbook/display_options/field/component.css +7 -0
- data/app/components/lookbook/display_options/field/component.html.erb +8 -0
- data/app/components/lookbook/display_options/field/component.js +30 -0
- data/app/components/lookbook/display_options/field/component.rb +28 -0
- data/app/components/lookbook/embed/component.html.erb +6 -0
- data/app/components/lookbook/embed/component.rb +31 -0
- data/app/components/lookbook/embed/inspector/component.html.erb +117 -0
- data/app/components/lookbook/embed/inspector/component.js +58 -0
- data/app/components/lookbook/embed/inspector/component.rb +64 -0
- data/app/components/lookbook/embed_code_dropdown/component.css +19 -0
- data/app/components/lookbook/embed_code_dropdown/component.html.erb +64 -0
- data/app/components/lookbook/embed_code_dropdown/component.js +3 -0
- data/app/components/lookbook/embed_code_dropdown/component.rb +51 -0
- data/app/components/lookbook/file_source/component.html.erb +9 -0
- data/app/components/lookbook/file_source/component.rb +73 -0
- data/app/components/lookbook/filter/component.html.erb +17 -0
- data/app/components/lookbook/filter/component.js +21 -0
- data/app/components/lookbook/filter/component.rb +15 -0
- data/app/components/lookbook/header/component.css +12 -0
- data/app/components/lookbook/header/component.html.erb +58 -0
- data/app/components/lookbook/header/component.rb +20 -0
- data/app/components/lookbook/icon/component.css +19 -0
- data/app/components/lookbook/icon/component.html.erb +5 -0
- data/app/components/lookbook/icon/component.rb +18 -0
- data/app/components/lookbook/icon_button/component.html.erb +20 -0
- data/app/components/lookbook/icon_button/component.rb +46 -0
- data/app/components/lookbook/inspector_panel/component.css +5 -0
- data/app/components/lookbook/inspector_panel/component.html.erb +8 -0
- data/app/components/lookbook/inspector_panel/component.rb +20 -0
- data/app/components/lookbook/logo/component.html.erb +6 -0
- data/app/components/lookbook/logo/component.rb +15 -0
- data/app/components/lookbook/message/component.css +34 -0
- data/app/components/lookbook/message/component.html.erb +26 -0
- data/app/components/lookbook/message/component.rb +13 -0
- data/app/components/lookbook/nav/component.html.erb +28 -0
- data/app/components/lookbook/nav/component.js +56 -0
- data/app/components/lookbook/nav/component.rb +27 -0
- data/app/components/lookbook/nav/directory/component.html.erb +28 -0
- data/app/components/lookbook/nav/directory/component.rb +4 -0
- data/app/components/lookbook/nav/entity/component.html.erb +32 -0
- data/app/components/lookbook/nav/entity/component.rb +49 -0
- data/app/components/lookbook/nav/item/component.css +15 -0
- data/app/components/lookbook/nav/item/component.js +68 -0
- data/app/components/lookbook/nav/item/component.rb +48 -0
- data/app/components/lookbook/page_tabs/component.html.erb +18 -0
- data/app/components/lookbook/page_tabs/component.rb +19 -0
- data/app/components/lookbook/params/editor/component.html.erb +21 -0
- data/app/components/lookbook/params/editor/component.js +12 -0
- data/app/components/lookbook/params/editor/component.rb +37 -0
- data/app/components/lookbook/params/field/component.css +76 -0
- data/app/components/lookbook/params/field/component.html.erb +27 -0
- data/app/components/lookbook/params/field/component.js +7 -0
- data/app/components/lookbook/params/field/component.rb +46 -0
- data/app/components/lookbook/prose/component.css +25 -0
- data/app/components/lookbook/prose/component.html.erb +8 -0
- data/app/components/lookbook/prose/component.rb +24 -0
- data/app/components/lookbook/split_layout/component.html.erb +13 -0
- data/app/components/lookbook/split_layout/component.js +151 -0
- data/app/components/lookbook/split_layout/component.rb +11 -0
- data/app/components/lookbook/tab_panels/component.html.erb +5 -0
- data/app/components/lookbook/tab_panels/component.js +25 -0
- data/app/components/lookbook/tab_panels/component.rb +20 -0
- data/app/components/lookbook/tab_panels/panel/component.html.erb +8 -0
- data/app/components/lookbook/tab_panels/panel/component.rb +8 -0
- data/app/components/lookbook/tabs/component.css +8 -0
- data/app/components/lookbook/tabs/component.html.erb +20 -0
- data/app/components/lookbook/tabs/component.js +119 -0
- data/app/components/lookbook/tabs/component.rb +28 -0
- data/app/components/lookbook/tabs/dropdown_tab/component.html.erb +21 -0
- data/app/components/lookbook/tabs/dropdown_tab/component.rb +17 -0
- data/app/components/lookbook/tabs/tab/component.html.erb +25 -0
- data/app/components/lookbook/tabs/tab/component.rb +17 -0
- data/app/components/lookbook/tag_component.rb +33 -0
- data/app/components/lookbook/text_button/component.html.erb +26 -0
- data/app/components/lookbook/text_button/component.rb +42 -0
- data/app/components/lookbook/toolbar/component.css +16 -0
- data/app/components/lookbook/toolbar/component.html.erb +5 -0
- data/app/components/lookbook/toolbar/component.rb +26 -0
- data/app/components/lookbook/viewport/component.css +11 -0
- data/app/components/lookbook/viewport/component.html.erb +69 -0
- data/app/components/lookbook/viewport/component.js +150 -0
- data/app/components/lookbook/viewport/component.rb +18 -0
- data/app/controllers/concerns/lookbook/targetable_concern.rb +123 -0
- data/app/controllers/concerns/lookbook/with_panels_concern.rb +30 -0
- data/app/controllers/concerns/lookbook/with_preview_controller_concern.rb +32 -0
- data/app/controllers/lookbook/application_controller.rb +110 -0
- data/app/controllers/lookbook/embeds_controller.rb +147 -0
- data/app/controllers/lookbook/inspector_controller.rb +18 -0
- data/app/controllers/lookbook/page_controller.rb +30 -0
- data/app/controllers/lookbook/pages_controller.rb +41 -0
- data/app/controllers/lookbook/preview_controller.rb +45 -0
- data/app/controllers/lookbook/previews_controller.rb +78 -0
- data/app/helpers/lookbook/application_helper.rb +27 -0
- data/app/views/layouts/lookbook/application.html.erb +126 -0
- data/app/views/layouts/lookbook/embed.html.erb +34 -0
- data/app/views/layouts/lookbook/skeleton.html.erb +47 -0
- data/app/views/lookbook/embeds/show.html.erb +12 -0
- data/app/views/lookbook/errors/default.html.erb +40 -0
- data/app/views/lookbook/errors/not_found.html.erb +10 -0
- data/app/views/lookbook/index.html.erb +40 -0
- data/app/views/lookbook/inspector/inputs/_color.html.erb +6 -0
- data/app/views/lookbook/inspector/inputs/_range.html.erb +15 -0
- data/app/views/lookbook/inspector/inputs/_select.html.erb +5 -0
- data/app/views/lookbook/inspector/inputs/_text.html.erb +5 -0
- data/app/views/lookbook/inspector/inputs/_text_two_step.html.erb +19 -0
- data/app/views/lookbook/inspector/inputs/_textarea.html.erb +5 -0
- data/app/views/lookbook/inspector/inputs/_toggle.html.erb +20 -0
- data/app/views/lookbook/inspector/panels/_content.html.erb +13 -0
- data/app/views/lookbook/inspector/panels/_notes.html.erb +19 -0
- data/app/views/lookbook/inspector/panels/_output.html.erb +7 -0
- data/app/views/lookbook/inspector/panels/_params.html.erb +15 -0
- data/app/views/lookbook/inspector/panels/_preview.html.erb +10 -0
- data/app/views/lookbook/inspector/panels/_source.html.erb +11 -0
- data/app/views/lookbook/inspector/show.html.erb +169 -0
- data/app/views/lookbook/pages/show.html.erb +98 -0
- data/app/views/lookbook/partials/_blank_slate.html.erb +7 -0
- data/app/views/lookbook/partials/_iframe_content_scripts.html.erb +1 -0
- data/app/views/lookbook/partials/_user_styles.html.erb +5 -0
- data/app/views/lookbook/previews/group.html.erb +15 -0
- data/app/views/lookbook/previews/preview.html.erb +13 -0
- data/app/views/lookbook/previews/show.html.erb +1 -0
- data/assets/css/fonts.css +33 -0
- data/assets/css/lookbook.css +149 -0
- data/assets/css/themes/blue.css +79 -0
- data/assets/css/themes/green.css +79 -0
- data/assets/css/themes/indigo.css +79 -0
- data/assets/css/themes/rose.css +79 -0
- data/assets/css/themes/zinc.css +79 -0
- data/assets/css/tooltip.css +53 -0
- data/assets/fonts/Inter-italic.var.woff2 +0 -0
- data/assets/fonts/Inter-roman.var.woff2 +0 -0
- data/assets/fonts/SourceCodeVariable-Italic.ttf.woff2 +0 -0
- data/assets/fonts/SourceCodeVariable-Roman.ttf.woff2 +0 -0
- data/assets/icons/accessibility.svg +1 -0
- data/assets/icons/activity.svg +1 -0
- data/assets/icons/air-vent.svg +1 -0
- data/assets/icons/airplay.svg +1 -0
- data/assets/icons/alarm-check.svg +1 -0
- data/assets/icons/alarm-clock-off.svg +1 -0
- data/assets/icons/alarm-clock.svg +1 -0
- data/assets/icons/alarm-minus.svg +1 -0
- data/assets/icons/alarm-plus.svg +1 -0
- data/assets/icons/album.svg +1 -0
- data/assets/icons/alert-circle.svg +1 -0
- data/assets/icons/alert-octagon.svg +1 -0
- data/assets/icons/alert-triangle.svg +1 -0
- data/assets/icons/align-center-horizontal.svg +1 -0
- data/assets/icons/align-center-vertical.svg +1 -0
- data/assets/icons/align-center.svg +1 -0
- data/assets/icons/align-end-horizontal.svg +1 -0
- data/assets/icons/align-end-vertical.svg +1 -0
- data/assets/icons/align-horizontal-distribute-center.svg +1 -0
- data/assets/icons/align-horizontal-distribute-end.svg +1 -0
- data/assets/icons/align-horizontal-distribute-start.svg +1 -0
- data/assets/icons/align-horizontal-justify-center.svg +1 -0
- data/assets/icons/align-horizontal-justify-end.svg +1 -0
- data/assets/icons/align-horizontal-justify-start.svg +1 -0
- data/assets/icons/align-horizontal-space-around.svg +1 -0
- data/assets/icons/align-horizontal-space-between.svg +1 -0
- data/assets/icons/align-justify.svg +1 -0
- data/assets/icons/align-left.svg +1 -0
- data/assets/icons/align-right.svg +1 -0
- data/assets/icons/align-start-horizontal.svg +1 -0
- data/assets/icons/align-start-vertical.svg +1 -0
- data/assets/icons/align-vertical-distribute-center.svg +1 -0
- data/assets/icons/align-vertical-distribute-end.svg +1 -0
- data/assets/icons/align-vertical-distribute-start.svg +1 -0
- data/assets/icons/align-vertical-justify-center.svg +1 -0
- data/assets/icons/align-vertical-justify-end.svg +1 -0
- data/assets/icons/align-vertical-justify-start.svg +1 -0
- data/assets/icons/align-vertical-space-around.svg +1 -0
- data/assets/icons/align-vertical-space-between.svg +1 -0
- data/assets/icons/anchor.svg +1 -0
- data/assets/icons/angry.svg +1 -0
- data/assets/icons/annoyed.svg +1 -0
- data/assets/icons/aperture.svg +1 -0
- data/assets/icons/apple.svg +1 -0
- data/assets/icons/archive-restore.svg +1 -0
- data/assets/icons/archive.svg +1 -0
- data/assets/icons/armchair.svg +1 -0
- data/assets/icons/arrow-big-down.svg +1 -0
- data/assets/icons/arrow-big-left.svg +1 -0
- data/assets/icons/arrow-big-right.svg +1 -0
- data/assets/icons/arrow-big-up.svg +1 -0
- data/assets/icons/arrow-down-circle.svg +1 -0
- data/assets/icons/arrow-down-left.svg +1 -0
- data/assets/icons/arrow-down-right.svg +1 -0
- data/assets/icons/arrow-down.svg +1 -0
- data/assets/icons/arrow-left-circle.svg +1 -0
- data/assets/icons/arrow-left-right.svg +1 -0
- data/assets/icons/arrow-left.svg +1 -0
- data/assets/icons/arrow-right-circle.svg +1 -0
- data/assets/icons/arrow-right.svg +1 -0
- data/assets/icons/arrow-up-circle.svg +1 -0
- data/assets/icons/arrow-up-down.svg +1 -0
- data/assets/icons/arrow-up-left.svg +1 -0
- data/assets/icons/arrow-up-right.svg +1 -0
- data/assets/icons/arrow-up.svg +1 -0
- data/assets/icons/asterisk.svg +1 -0
- data/assets/icons/at-sign.svg +1 -0
- data/assets/icons/award.svg +1 -0
- data/assets/icons/axe.svg +1 -0
- data/assets/icons/axis-3d.svg +1 -0
- data/assets/icons/baby.svg +1 -0
- data/assets/icons/backpack.svg +1 -0
- data/assets/icons/baggage-claim.svg +1 -0
- data/assets/icons/banana.svg +1 -0
- data/assets/icons/banknote.svg +1 -0
- data/assets/icons/bar-chart-2.svg +1 -0
- data/assets/icons/bar-chart-3.svg +1 -0
- data/assets/icons/bar-chart-4.svg +1 -0
- data/assets/icons/bar-chart-horizontal.svg +1 -0
- data/assets/icons/bar-chart.svg +1 -0
- data/assets/icons/baseline.svg +1 -0
- data/assets/icons/bath.svg +1 -0
- data/assets/icons/battery-charging.svg +1 -0
- data/assets/icons/battery-full.svg +1 -0
- data/assets/icons/battery-low.svg +1 -0
- data/assets/icons/battery-medium.svg +1 -0
- data/assets/icons/battery-warning.svg +1 -0
- data/assets/icons/battery.svg +1 -0
- data/assets/icons/beaker.svg +1 -0
- data/assets/icons/bean-off.svg +1 -0
- data/assets/icons/bean.svg +1 -0
- data/assets/icons/bed-double.svg +1 -0
- data/assets/icons/bed-single.svg +1 -0
- data/assets/icons/bed.svg +1 -0
- data/assets/icons/beef.svg +1 -0
- data/assets/icons/beer.svg +1 -0
- data/assets/icons/bell-minus.svg +1 -0
- data/assets/icons/bell-off.svg +1 -0
- data/assets/icons/bell-plus.svg +1 -0
- data/assets/icons/bell-ring.svg +1 -0
- data/assets/icons/bell.svg +1 -0
- data/assets/icons/bike.svg +1 -0
- data/assets/icons/binary.svg +1 -0
- data/assets/icons/bird.svg +1 -0
- data/assets/icons/bitcoin.svg +1 -0
- data/assets/icons/blinds.svg +1 -0
- data/assets/icons/bluetooth-connected.svg +1 -0
- data/assets/icons/bluetooth-off.svg +1 -0
- data/assets/icons/bluetooth-searching.svg +1 -0
- data/assets/icons/bluetooth.svg +1 -0
- data/assets/icons/bold.svg +1 -0
- data/assets/icons/bomb.svg +1 -0
- data/assets/icons/bone.svg +1 -0
- data/assets/icons/book-open-check.svg +1 -0
- data/assets/icons/book-open.svg +1 -0
- data/assets/icons/book.svg +1 -0
- data/assets/icons/bookmark-minus.svg +1 -0
- data/assets/icons/bookmark-plus.svg +1 -0
- data/assets/icons/bookmark.svg +1 -0
- data/assets/icons/bot.svg +1 -0
- data/assets/icons/box-select.svg +1 -0
- data/assets/icons/box.svg +1 -0
- data/assets/icons/boxes.svg +1 -0
- data/assets/icons/briefcase.svg +1 -0
- data/assets/icons/brush.svg +1 -0
- data/assets/icons/bug.svg +1 -0
- data/assets/icons/building-2.svg +1 -0
- data/assets/icons/building.svg +1 -0
- data/assets/icons/bus.svg +1 -0
- data/assets/icons/cake.svg +1 -0
- data/assets/icons/calculator.svg +1 -0
- data/assets/icons/calendar-check-2.svg +1 -0
- data/assets/icons/calendar-check.svg +1 -0
- data/assets/icons/calendar-clock.svg +1 -0
- data/assets/icons/calendar-days.svg +1 -0
- data/assets/icons/calendar-heart.svg +1 -0
- data/assets/icons/calendar-minus.svg +1 -0
- data/assets/icons/calendar-off.svg +1 -0
- data/assets/icons/calendar-plus.svg +1 -0
- data/assets/icons/calendar-range.svg +1 -0
- data/assets/icons/calendar-search.svg +1 -0
- data/assets/icons/calendar-x-2.svg +1 -0
- data/assets/icons/calendar-x.svg +1 -0
- data/assets/icons/calendar.svg +1 -0
- data/assets/icons/camera-off.svg +1 -0
- data/assets/icons/camera.svg +1 -0
- data/assets/icons/candy-off.svg +1 -0
- data/assets/icons/candy.svg +1 -0
- data/assets/icons/car.svg +1 -0
- data/assets/icons/carrot.svg +1 -0
- data/assets/icons/cast.svg +1 -0
- data/assets/icons/cat.svg +1 -0
- data/assets/icons/check-check.svg +1 -0
- data/assets/icons/check-circle-2.svg +1 -0
- data/assets/icons/check-circle.svg +1 -0
- data/assets/icons/check-square.svg +1 -0
- data/assets/icons/check.svg +1 -0
- data/assets/icons/chef-hat.svg +1 -0
- data/assets/icons/cherry.svg +1 -0
- data/assets/icons/chevron-down.svg +1 -0
- data/assets/icons/chevron-first.svg +1 -0
- data/assets/icons/chevron-last.svg +1 -0
- data/assets/icons/chevron-left.svg +1 -0
- data/assets/icons/chevron-right.svg +1 -0
- data/assets/icons/chevron-up.svg +1 -0
- data/assets/icons/chevrons-down-up.svg +1 -0
- data/assets/icons/chevrons-down.svg +1 -0
- data/assets/icons/chevrons-left-right.svg +1 -0
- data/assets/icons/chevrons-left.svg +1 -0
- data/assets/icons/chevrons-right-left.svg +1 -0
- data/assets/icons/chevrons-right.svg +1 -0
- data/assets/icons/chevrons-up-down.svg +1 -0
- data/assets/icons/chevrons-up.svg +1 -0
- data/assets/icons/chrome.svg +1 -0
- data/assets/icons/cigarette-off.svg +1 -0
- data/assets/icons/cigarette.svg +1 -0
- data/assets/icons/circle-dot.svg +1 -0
- data/assets/icons/circle-ellipsis.svg +1 -0
- data/assets/icons/circle-slashed.svg +1 -0
- data/assets/icons/circle.svg +1 -0
- data/assets/icons/citrus.svg +1 -0
- data/assets/icons/clapperboard.svg +1 -0
- data/assets/icons/clipboard-check.svg +1 -0
- data/assets/icons/clipboard-copy.svg +1 -0
- data/assets/icons/clipboard-edit.svg +1 -0
- data/assets/icons/clipboard-list.svg +1 -0
- data/assets/icons/clipboard-signature.svg +1 -0
- data/assets/icons/clipboard-type.svg +1 -0
- data/assets/icons/clipboard-x.svg +1 -0
- data/assets/icons/clipboard.svg +1 -0
- data/assets/icons/clock-1.svg +1 -0
- data/assets/icons/clock-10.svg +1 -0
- data/assets/icons/clock-11.svg +1 -0
- data/assets/icons/clock-12.svg +1 -0
- data/assets/icons/clock-2.svg +1 -0
- data/assets/icons/clock-3.svg +1 -0
- data/assets/icons/clock-4.svg +1 -0
- data/assets/icons/clock-5.svg +1 -0
- data/assets/icons/clock-6.svg +1 -0
- data/assets/icons/clock-7.svg +1 -0
- data/assets/icons/clock-8.svg +1 -0
- data/assets/icons/clock-9.svg +1 -0
- data/assets/icons/clock.svg +1 -0
- data/assets/icons/cloud-cog.svg +1 -0
- data/assets/icons/cloud-drizzle.svg +1 -0
- data/assets/icons/cloud-fog.svg +1 -0
- data/assets/icons/cloud-hail.svg +1 -0
- data/assets/icons/cloud-lightning.svg +1 -0
- data/assets/icons/cloud-moon-rain.svg +1 -0
- data/assets/icons/cloud-moon.svg +1 -0
- data/assets/icons/cloud-off.svg +1 -0
- data/assets/icons/cloud-rain-wind.svg +1 -0
- data/assets/icons/cloud-rain.svg +1 -0
- data/assets/icons/cloud-snow.svg +1 -0
- data/assets/icons/cloud-sun-rain.svg +1 -0
- data/assets/icons/cloud-sun.svg +1 -0
- data/assets/icons/cloud.svg +1 -0
- data/assets/icons/cloudy.svg +1 -0
- data/assets/icons/clover.svg +1 -0
- data/assets/icons/code-2.svg +1 -0
- data/assets/icons/code.svg +1 -0
- data/assets/icons/codepen.svg +1 -0
- data/assets/icons/codesandbox.svg +1 -0
- data/assets/icons/coffee.svg +1 -0
- data/assets/icons/cog.svg +1 -0
- data/assets/icons/coins.svg +1 -0
- data/assets/icons/columns.svg +1 -0
- data/assets/icons/command.svg +1 -0
- data/assets/icons/compass.svg +1 -0
- data/assets/icons/component.svg +1 -0
- data/assets/icons/concierge-bell.svg +1 -0
- data/assets/icons/construction.svg +1 -0
- data/assets/icons/contact.svg +1 -0
- data/assets/icons/contrast.svg +1 -0
- data/assets/icons/cookie.svg +1 -0
- data/assets/icons/copy.svg +1 -0
- data/assets/icons/copyleft.svg +1 -0
- data/assets/icons/copyright.svg +1 -0
- data/assets/icons/corner-down-left.svg +1 -0
- data/assets/icons/corner-down-right.svg +1 -0
- data/assets/icons/corner-left-down.svg +1 -0
- data/assets/icons/corner-left-up.svg +1 -0
- data/assets/icons/corner-right-down.svg +1 -0
- data/assets/icons/corner-right-up.svg +1 -0
- data/assets/icons/corner-up-left.svg +1 -0
- data/assets/icons/corner-up-right.svg +1 -0
- data/assets/icons/cpu.svg +1 -0
- data/assets/icons/creative-commons.svg +1 -0
- data/assets/icons/credit-card.svg +1 -0
- data/assets/icons/croissant.svg +1 -0
- data/assets/icons/crop.svg +1 -0
- data/assets/icons/cross.svg +1 -0
- data/assets/icons/crosshair.svg +1 -0
- data/assets/icons/crown.svg +1 -0
- data/assets/icons/cup-soda.svg +1 -0
- data/assets/icons/curly-braces.svg +1 -0
- data/assets/icons/currency.svg +1 -0
- data/assets/icons/database-backup.svg +1 -0
- data/assets/icons/database.svg +1 -0
- data/assets/icons/delete.svg +1 -0
- data/assets/icons/diamond.svg +1 -0
- data/assets/icons/dice-1.svg +1 -0
- data/assets/icons/dice-2.svg +1 -0
- data/assets/icons/dice-3.svg +1 -0
- data/assets/icons/dice-4.svg +1 -0
- data/assets/icons/dice-5.svg +1 -0
- data/assets/icons/dice-6.svg +1 -0
- data/assets/icons/dices.svg +1 -0
- data/assets/icons/diff.svg +1 -0
- data/assets/icons/disc.svg +1 -0
- data/assets/icons/divide-circle.svg +1 -0
- data/assets/icons/divide-square.svg +1 -0
- data/assets/icons/divide.svg +1 -0
- data/assets/icons/dna-off.svg +1 -0
- data/assets/icons/dna.svg +1 -0
- data/assets/icons/dog.svg +1 -0
- data/assets/icons/dollar-sign.svg +1 -0
- data/assets/icons/download-cloud.svg +1 -0
- data/assets/icons/download.svg +1 -0
- data/assets/icons/dribbble.svg +1 -0
- data/assets/icons/droplet.svg +1 -0
- data/assets/icons/droplets.svg +1 -0
- data/assets/icons/drumstick.svg +1 -0
- data/assets/icons/dumbbell.svg +1 -0
- data/assets/icons/ear-off.svg +1 -0
- data/assets/icons/ear.svg +1 -0
- data/assets/icons/edit-2.svg +1 -0
- data/assets/icons/edit-3.svg +1 -0
- data/assets/icons/edit.svg +1 -0
- data/assets/icons/egg-fried.svg +1 -0
- data/assets/icons/egg-off.svg +1 -0
- data/assets/icons/egg.svg +1 -0
- data/assets/icons/equal-not.svg +1 -0
- data/assets/icons/equal.svg +1 -0
- data/assets/icons/eraser.svg +1 -0
- data/assets/icons/euro.svg +1 -0
- data/assets/icons/expand.svg +1 -0
- data/assets/icons/external-link.svg +1 -0
- data/assets/icons/eye-off.svg +1 -0
- data/assets/icons/eye.svg +1 -0
- data/assets/icons/facebook.svg +1 -0
- data/assets/icons/factory.svg +1 -0
- data/assets/icons/fan.svg +1 -0
- data/assets/icons/fast-forward.svg +1 -0
- data/assets/icons/feather.svg +1 -0
- data/assets/icons/figma.svg +1 -0
- data/assets/icons/file-archive.svg +1 -0
- data/assets/icons/file-audio-2.svg +1 -0
- data/assets/icons/file-audio.svg +1 -0
- data/assets/icons/file-axis-3d.svg +1 -0
- data/assets/icons/file-badge-2.svg +1 -0
- data/assets/icons/file-badge.svg +1 -0
- data/assets/icons/file-bar-chart-2.svg +1 -0
- data/assets/icons/file-bar-chart.svg +1 -0
- data/assets/icons/file-box.svg +1 -0
- data/assets/icons/file-check-2.svg +1 -0
- data/assets/icons/file-check.svg +1 -0
- data/assets/icons/file-clock.svg +1 -0
- data/assets/icons/file-code.svg +1 -0
- data/assets/icons/file-cog-2.svg +1 -0
- data/assets/icons/file-cog.svg +1 -0
- data/assets/icons/file-diff.svg +1 -0
- data/assets/icons/file-digit.svg +1 -0
- data/assets/icons/file-down.svg +1 -0
- data/assets/icons/file-edit.svg +1 -0
- data/assets/icons/file-heart.svg +1 -0
- data/assets/icons/file-image.svg +1 -0
- data/assets/icons/file-input.svg +1 -0
- data/assets/icons/file-json-2.svg +1 -0
- data/assets/icons/file-json.svg +1 -0
- data/assets/icons/file-key-2.svg +1 -0
- data/assets/icons/file-key.svg +1 -0
- data/assets/icons/file-line-chart.svg +1 -0
- data/assets/icons/file-lock-2.svg +1 -0
- data/assets/icons/file-lock.svg +1 -0
- data/assets/icons/file-minus-2.svg +1 -0
- data/assets/icons/file-minus.svg +1 -0
- data/assets/icons/file-output.svg +1 -0
- data/assets/icons/file-pie-chart.svg +1 -0
- data/assets/icons/file-plus-2.svg +1 -0
- data/assets/icons/file-plus.svg +1 -0
- data/assets/icons/file-question.svg +1 -0
- data/assets/icons/file-scan.svg +1 -0
- data/assets/icons/file-search-2.svg +1 -0
- data/assets/icons/file-search.svg +1 -0
- data/assets/icons/file-signature.svg +1 -0
- data/assets/icons/file-spreadsheet.svg +1 -0
- data/assets/icons/file-symlink.svg +1 -0
- data/assets/icons/file-terminal.svg +1 -0
- data/assets/icons/file-text.svg +1 -0
- data/assets/icons/file-type-2.svg +1 -0
- data/assets/icons/file-type.svg +1 -0
- data/assets/icons/file-up.svg +1 -0
- data/assets/icons/file-video-2.svg +1 -0
- data/assets/icons/file-video.svg +1 -0
- data/assets/icons/file-volume-2.svg +1 -0
- data/assets/icons/file-volume.svg +1 -0
- data/assets/icons/file-warning.svg +1 -0
- data/assets/icons/file-x-2.svg +1 -0
- data/assets/icons/file-x.svg +1 -0
- data/assets/icons/file.svg +1 -0
- data/assets/icons/files.svg +1 -0
- data/assets/icons/film.svg +1 -0
- data/assets/icons/filter-x.svg +1 -0
- data/assets/icons/filter.svg +1 -0
- data/assets/icons/fingerprint.svg +1 -0
- data/assets/icons/fish-off.svg +1 -0
- data/assets/icons/fish.svg +1 -0
- data/assets/icons/flag-off.svg +1 -0
- data/assets/icons/flag-triangle-left.svg +1 -0
- data/assets/icons/flag-triangle-right.svg +1 -0
- data/assets/icons/flag.svg +1 -0
- data/assets/icons/flame.svg +1 -0
- data/assets/icons/flashlight-off.svg +1 -0
- data/assets/icons/flashlight.svg +1 -0
- data/assets/icons/flask-conical-off.svg +1 -0
- data/assets/icons/flask-conical.svg +1 -0
- data/assets/icons/flask-round.svg +1 -0
- data/assets/icons/flip-horizontal-2.svg +1 -0
- data/assets/icons/flip-horizontal.svg +1 -0
- data/assets/icons/flip-vertical-2.svg +1 -0
- data/assets/icons/flip-vertical.svg +1 -0
- data/assets/icons/flower-2.svg +1 -0
- data/assets/icons/flower.svg +1 -0
- data/assets/icons/focus.svg +1 -0
- data/assets/icons/folder-archive.svg +1 -0
- data/assets/icons/folder-check.svg +1 -0
- data/assets/icons/folder-clock.svg +1 -0
- data/assets/icons/folder-closed.svg +1 -0
- data/assets/icons/folder-cog-2.svg +1 -0
- data/assets/icons/folder-cog.svg +1 -0
- data/assets/icons/folder-down.svg +1 -0
- data/assets/icons/folder-edit.svg +1 -0
- data/assets/icons/folder-heart.svg +1 -0
- data/assets/icons/folder-input.svg +1 -0
- data/assets/icons/folder-key.svg +1 -0
- data/assets/icons/folder-lock.svg +1 -0
- data/assets/icons/folder-minus.svg +1 -0
- data/assets/icons/folder-open.svg +1 -0
- data/assets/icons/folder-output.svg +1 -0
- data/assets/icons/folder-plus.svg +1 -0
- data/assets/icons/folder-search-2.svg +1 -0
- data/assets/icons/folder-search.svg +1 -0
- data/assets/icons/folder-symlink.svg +1 -0
- data/assets/icons/folder-tree.svg +1 -0
- data/assets/icons/folder-up.svg +1 -0
- data/assets/icons/folder-x.svg +1 -0
- data/assets/icons/folder.svg +1 -0
- data/assets/icons/folders.svg +1 -0
- data/assets/icons/footprints.svg +1 -0
- data/assets/icons/forklift.svg +1 -0
- data/assets/icons/form-input.svg +1 -0
- data/assets/icons/forward.svg +1 -0
- data/assets/icons/frame.svg +1 -0
- data/assets/icons/framer.svg +1 -0
- data/assets/icons/frown.svg +1 -0
- data/assets/icons/fuel.svg +1 -0
- data/assets/icons/function-square.svg +1 -0
- data/assets/icons/gamepad-2.svg +1 -0
- data/assets/icons/gamepad.svg +1 -0
- data/assets/icons/gauge.svg +1 -0
- data/assets/icons/gavel.svg +1 -0
- data/assets/icons/gem.svg +1 -0
- data/assets/icons/ghost.svg +1 -0
- data/assets/icons/gift.svg +1 -0
- data/assets/icons/git-branch-plus.svg +1 -0
- data/assets/icons/git-branch.svg +1 -0
- data/assets/icons/git-commit.svg +1 -0
- data/assets/icons/git-compare.svg +1 -0
- data/assets/icons/git-fork.svg +1 -0
- data/assets/icons/git-merge.svg +1 -0
- data/assets/icons/git-pull-request-closed.svg +1 -0
- data/assets/icons/git-pull-request-draft.svg +1 -0
- data/assets/icons/git-pull-request.svg +1 -0
- data/assets/icons/github.svg +1 -0
- data/assets/icons/gitlab.svg +1 -0
- data/assets/icons/glass-water.svg +1 -0
- data/assets/icons/glasses.svg +1 -0
- data/assets/icons/globe-2.svg +1 -0
- data/assets/icons/globe.svg +1 -0
- data/assets/icons/grab.svg +1 -0
- data/assets/icons/graduation-cap.svg +1 -0
- data/assets/icons/grape.svg +1 -0
- data/assets/icons/grid.svg +1 -0
- data/assets/icons/grip-horizontal.svg +1 -0
- data/assets/icons/grip-vertical.svg +1 -0
- data/assets/icons/grip.svg +1 -0
- data/assets/icons/hammer.svg +1 -0
- data/assets/icons/hand-metal.svg +1 -0
- data/assets/icons/hand.svg +1 -0
- data/assets/icons/hard-drive.svg +1 -0
- data/assets/icons/hard-hat.svg +1 -0
- data/assets/icons/hash.svg +1 -0
- data/assets/icons/haze.svg +1 -0
- data/assets/icons/heading-1.svg +1 -0
- data/assets/icons/heading-2.svg +1 -0
- data/assets/icons/heading-3.svg +1 -0
- data/assets/icons/heading-4.svg +1 -0
- data/assets/icons/heading-5.svg +1 -0
- data/assets/icons/heading-6.svg +1 -0
- data/assets/icons/heading.svg +1 -0
- data/assets/icons/headphones.svg +1 -0
- data/assets/icons/heart-crack.svg +1 -0
- data/assets/icons/heart-handshake.svg +1 -0
- data/assets/icons/heart-off.svg +1 -0
- data/assets/icons/heart-pulse.svg +1 -0
- data/assets/icons/heart.svg +1 -0
- data/assets/icons/help-circle.svg +1 -0
- data/assets/icons/helping-hand.svg +1 -0
- data/assets/icons/hexagon.svg +1 -0
- data/assets/icons/highlighter.svg +1 -0
- data/assets/icons/history.svg +1 -0
- data/assets/icons/home.svg +1 -0
- data/assets/icons/hop-off.svg +1 -0
- data/assets/icons/hop.svg +1 -0
- data/assets/icons/hourglass.svg +1 -0
- data/assets/icons/ice-cream-2.svg +1 -0
- data/assets/icons/ice-cream.svg +1 -0
- data/assets/icons/image-minus.svg +1 -0
- data/assets/icons/image-off.svg +1 -0
- data/assets/icons/image-plus.svg +1 -0
- data/assets/icons/image.svg +1 -0
- data/assets/icons/import.svg +1 -0
- data/assets/icons/inbox.svg +1 -0
- data/assets/icons/indent.svg +1 -0
- data/assets/icons/indian-rupee.svg +1 -0
- data/assets/icons/infinity.svg +1 -0
- data/assets/icons/info.svg +1 -0
- data/assets/icons/inspect.svg +1 -0
- data/assets/icons/instagram.svg +1 -0
- data/assets/icons/italic.svg +1 -0
- data/assets/icons/japanese-yen.svg +1 -0
- data/assets/icons/joystick.svg +1 -0
- data/assets/icons/key.svg +1 -0
- data/assets/icons/keyboard.svg +1 -0
- data/assets/icons/lamp-ceiling.svg +1 -0
- data/assets/icons/lamp-desk.svg +1 -0
- data/assets/icons/lamp-floor.svg +1 -0
- data/assets/icons/lamp-wall-down.svg +1 -0
- data/assets/icons/lamp-wall-up.svg +1 -0
- data/assets/icons/lamp.svg +1 -0
- data/assets/icons/landmark.svg +1 -0
- data/assets/icons/languages.svg +1 -0
- data/assets/icons/laptop-2.svg +1 -0
- data/assets/icons/laptop.svg +1 -0
- data/assets/icons/lasso-select.svg +1 -0
- data/assets/icons/lasso.svg +1 -0
- data/assets/icons/laugh.svg +1 -0
- data/assets/icons/layers.svg +1 -0
- data/assets/icons/layout-dashboard.svg +1 -0
- data/assets/icons/layout-grid.svg +1 -0
- data/assets/icons/layout-list.svg +1 -0
- data/assets/icons/layout-template.svg +1 -0
- data/assets/icons/layout.svg +1 -0
- data/assets/icons/leaf.svg +1 -0
- data/assets/icons/library.svg +1 -0
- data/assets/icons/life-buoy.svg +1 -0
- data/assets/icons/lightbulb-off.svg +1 -0
- data/assets/icons/lightbulb.svg +1 -0
- data/assets/icons/line-chart.svg +1 -0
- data/assets/icons/link-2-off.svg +1 -0
- data/assets/icons/link-2.svg +1 -0
- data/assets/icons/link.svg +1 -0
- data/assets/icons/linkedin.svg +1 -0
- data/assets/icons/list-checks.svg +1 -0
- data/assets/icons/list-end.svg +1 -0
- data/assets/icons/list-minus.svg +1 -0
- data/assets/icons/list-music.svg +1 -0
- data/assets/icons/list-ordered.svg +1 -0
- data/assets/icons/list-plus.svg +1 -0
- data/assets/icons/list-start.svg +1 -0
- data/assets/icons/list-video.svg +1 -0
- data/assets/icons/list-x.svg +1 -0
- data/assets/icons/list.svg +1 -0
- data/assets/icons/loader-2.svg +1 -0
- data/assets/icons/loader.svg +1 -0
- data/assets/icons/locate-fixed.svg +1 -0
- data/assets/icons/locate-off.svg +1 -0
- data/assets/icons/locate.svg +1 -0
- data/assets/icons/lock.svg +1 -0
- data/assets/icons/log-in.svg +1 -0
- data/assets/icons/log-out.svg +1 -0
- data/assets/icons/luggage.svg +1 -0
- data/assets/icons/magnet.svg +1 -0
- data/assets/icons/mail-check.svg +1 -0
- data/assets/icons/mail-minus.svg +1 -0
- data/assets/icons/mail-open.svg +1 -0
- data/assets/icons/mail-plus.svg +1 -0
- data/assets/icons/mail-question.svg +1 -0
- data/assets/icons/mail-search.svg +1 -0
- data/assets/icons/mail-warning.svg +1 -0
- data/assets/icons/mail-x.svg +1 -0
- data/assets/icons/mail.svg +1 -0
- data/assets/icons/mails.svg +1 -0
- data/assets/icons/map-pin-off.svg +1 -0
- data/assets/icons/map-pin.svg +1 -0
- data/assets/icons/map.svg +1 -0
- data/assets/icons/martini.svg +1 -0
- data/assets/icons/maximize-2.svg +1 -0
- data/assets/icons/maximize.svg +1 -0
- data/assets/icons/medal.svg +1 -0
- data/assets/icons/megaphone-off.svg +1 -0
- data/assets/icons/megaphone.svg +1 -0
- data/assets/icons/meh.svg +1 -0
- data/assets/icons/menu.svg +1 -0
- data/assets/icons/message-circle.svg +1 -0
- data/assets/icons/message-square.svg +1 -0
- data/assets/icons/mic-2.svg +1 -0
- data/assets/icons/mic-off.svg +1 -0
- data/assets/icons/mic.svg +1 -0
- data/assets/icons/microscope.svg +1 -0
- data/assets/icons/microwave.svg +1 -0
- data/assets/icons/milestone.svg +1 -0
- data/assets/icons/milk-off.svg +1 -0
- data/assets/icons/milk.svg +1 -0
- data/assets/icons/minimize-2.svg +1 -0
- data/assets/icons/minimize.svg +1 -0
- data/assets/icons/minus-circle.svg +1 -0
- data/assets/icons/minus-square.svg +1 -0
- data/assets/icons/minus.svg +1 -0
- data/assets/icons/monitor-off.svg +1 -0
- data/assets/icons/monitor-smartphone.svg +1 -0
- data/assets/icons/monitor-speaker.svg +1 -0
- data/assets/icons/monitor.svg +1 -0
- data/assets/icons/moon.svg +1 -0
- data/assets/icons/more-horizontal.svg +1 -0
- data/assets/icons/more-vertical.svg +1 -0
- data/assets/icons/mountain-snow.svg +1 -0
- data/assets/icons/mountain.svg +1 -0
- data/assets/icons/mouse-pointer-2.svg +1 -0
- data/assets/icons/mouse-pointer-click.svg +1 -0
- data/assets/icons/mouse-pointer.svg +1 -0
- data/assets/icons/mouse.svg +1 -0
- data/assets/icons/move-3d.svg +1 -0
- data/assets/icons/move-diagonal-2.svg +1 -0
- data/assets/icons/move-diagonal.svg +1 -0
- data/assets/icons/move-horizontal.svg +1 -0
- data/assets/icons/move-vertical.svg +1 -0
- data/assets/icons/move.svg +1 -0
- data/assets/icons/music-2.svg +1 -0
- data/assets/icons/music-3.svg +1 -0
- data/assets/icons/music-4.svg +1 -0
- data/assets/icons/music.svg +1 -0
- data/assets/icons/navigation-2-off.svg +1 -0
- data/assets/icons/navigation-2.svg +1 -0
- data/assets/icons/navigation-off.svg +1 -0
- data/assets/icons/navigation.svg +1 -0
- data/assets/icons/network.svg +1 -0
- data/assets/icons/newspaper.svg +1 -0
- data/assets/icons/nfc.svg +1 -0
- data/assets/icons/nut-off.svg +1 -0
- data/assets/icons/nut.svg +1 -0
- data/assets/icons/octagon.svg +1 -0
- data/assets/icons/option.svg +1 -0
- data/assets/icons/outdent.svg +1 -0
- data/assets/icons/package-2.svg +1 -0
- data/assets/icons/package-check.svg +1 -0
- data/assets/icons/package-minus.svg +1 -0
- data/assets/icons/package-open.svg +1 -0
- data/assets/icons/package-plus.svg +1 -0
- data/assets/icons/package-search.svg +1 -0
- data/assets/icons/package-x.svg +1 -0
- data/assets/icons/package.svg +1 -0
- data/assets/icons/paint-bucket.svg +1 -0
- data/assets/icons/paintbrush-2.svg +1 -0
- data/assets/icons/paintbrush.svg +1 -0
- data/assets/icons/palette.svg +1 -0
- data/assets/icons/palmtree.svg +1 -0
- data/assets/icons/paperclip.svg +1 -0
- data/assets/icons/party-popper.svg +1 -0
- data/assets/icons/pause-circle.svg +1 -0
- data/assets/icons/pause-octagon.svg +1 -0
- data/assets/icons/pause.svg +1 -0
- data/assets/icons/pen-tool.svg +1 -0
- data/assets/icons/pencil.svg +1 -0
- data/assets/icons/percent.svg +1 -0
- data/assets/icons/person-standing.svg +1 -0
- data/assets/icons/phone-call.svg +1 -0
- data/assets/icons/phone-forwarded.svg +1 -0
- data/assets/icons/phone-incoming.svg +1 -0
- data/assets/icons/phone-missed.svg +1 -0
- data/assets/icons/phone-off.svg +1 -0
- data/assets/icons/phone-outgoing.svg +1 -0
- data/assets/icons/phone.svg +1 -0
- data/assets/icons/picture-in-picture-2.svg +1 -0
- data/assets/icons/picture-in-picture.svg +1 -0
- data/assets/icons/pie-chart.svg +1 -0
- data/assets/icons/piggy-bank.svg +1 -0
- data/assets/icons/pilcrow.svg +1 -0
- data/assets/icons/pill.svg +1 -0
- data/assets/icons/pin-off.svg +1 -0
- data/assets/icons/pin.svg +1 -0
- data/assets/icons/pipette.svg +1 -0
- data/assets/icons/pizza.svg +1 -0
- data/assets/icons/plane.svg +1 -0
- data/assets/icons/play-circle.svg +1 -0
- data/assets/icons/play.svg +1 -0
- data/assets/icons/plug-2.svg +1 -0
- data/assets/icons/plug-zap.svg +1 -0
- data/assets/icons/plug.svg +1 -0
- data/assets/icons/plus-circle.svg +1 -0
- data/assets/icons/plus-square.svg +1 -0
- data/assets/icons/plus.svg +1 -0
- data/assets/icons/pocket.svg +1 -0
- data/assets/icons/podcast.svg +1 -0
- data/assets/icons/pointer.svg +1 -0
- data/assets/icons/pound-sterling.svg +1 -0
- data/assets/icons/power-off.svg +1 -0
- data/assets/icons/power.svg +1 -0
- data/assets/icons/printer.svg +1 -0
- data/assets/icons/puzzle.svg +1 -0
- data/assets/icons/qr-code.svg +1 -0
- data/assets/icons/quote.svg +1 -0
- data/assets/icons/radio-receiver.svg +1 -0
- data/assets/icons/radio.svg +1 -0
- data/assets/icons/rectangle-horizontal.svg +1 -0
- data/assets/icons/rectangle-vertical.svg +1 -0
- data/assets/icons/recycle.svg +1 -0
- data/assets/icons/redo-2.svg +1 -0
- data/assets/icons/redo.svg +1 -0
- data/assets/icons/refresh-ccw.svg +1 -0
- data/assets/icons/refresh-cw.svg +1 -0
- data/assets/icons/refrigerator.svg +1 -0
- data/assets/icons/regex.svg +1 -0
- data/assets/icons/remove-formatting.svg +1 -0
- data/assets/icons/repeat-1.svg +1 -0
- data/assets/icons/repeat.svg +1 -0
- data/assets/icons/reply-all.svg +1 -0
- data/assets/icons/reply.svg +1 -0
- data/assets/icons/rewind.svg +1 -0
- data/assets/icons/rocket.svg +1 -0
- data/assets/icons/rocking-chair.svg +1 -0
- data/assets/icons/rotate-3d.svg +1 -0
- data/assets/icons/rotate-ccw.svg +1 -0
- data/assets/icons/rotate-cw.svg +1 -0
- data/assets/icons/router.svg +1 -0
- data/assets/icons/rss.svg +1 -0
- data/assets/icons/ruler.svg +1 -0
- data/assets/icons/russian-ruble.svg +1 -0
- data/assets/icons/sailboat.svg +1 -0
- data/assets/icons/salad.svg +1 -0
- data/assets/icons/sandwich.svg +1 -0
- data/assets/icons/save.svg +1 -0
- data/assets/icons/scale-3d.svg +1 -0
- data/assets/icons/scale.svg +1 -0
- data/assets/icons/scaling.svg +1 -0
- data/assets/icons/scan-face.svg +1 -0
- data/assets/icons/scan-line.svg +1 -0
- data/assets/icons/scan.svg +1 -0
- data/assets/icons/scissors.svg +1 -0
- data/assets/icons/screen-share-off.svg +1 -0
- data/assets/icons/screen-share.svg +1 -0
- data/assets/icons/scroll.svg +1 -0
- data/assets/icons/search.svg +1 -0
- data/assets/icons/send.svg +1 -0
- data/assets/icons/separator-horizontal.svg +1 -0
- data/assets/icons/separator-vertical.svg +1 -0
- data/assets/icons/server-cog.svg +1 -0
- data/assets/icons/server-crash.svg +1 -0
- data/assets/icons/server-off.svg +1 -0
- data/assets/icons/server.svg +1 -0
- data/assets/icons/settings-2.svg +1 -0
- data/assets/icons/settings.svg +1 -0
- data/assets/icons/share-2.svg +1 -0
- data/assets/icons/share.svg +1 -0
- data/assets/icons/sheet.svg +1 -0
- data/assets/icons/shield-alert.svg +1 -0
- data/assets/icons/shield-check.svg +1 -0
- data/assets/icons/shield-close.svg +1 -0
- data/assets/icons/shield-off.svg +1 -0
- data/assets/icons/shield.svg +1 -0
- data/assets/icons/ship.svg +1 -0
- data/assets/icons/shirt.svg +1 -0
- data/assets/icons/shopping-bag.svg +1 -0
- data/assets/icons/shopping-cart.svg +1 -0
- data/assets/icons/shovel.svg +1 -0
- data/assets/icons/shower-head.svg +1 -0
- data/assets/icons/shrink.svg +1 -0
- data/assets/icons/shrub.svg +1 -0
- data/assets/icons/shuffle.svg +1 -0
- data/assets/icons/sidebar-close.svg +1 -0
- data/assets/icons/sidebar-open.svg +1 -0
- data/assets/icons/sidebar.svg +1 -0
- data/assets/icons/sigma.svg +1 -0
- data/assets/icons/signal-high.svg +1 -0
- data/assets/icons/signal-low.svg +1 -0
- data/assets/icons/signal-medium.svg +1 -0
- data/assets/icons/signal-zero.svg +1 -0
- data/assets/icons/signal.svg +1 -0
- data/assets/icons/siren.svg +1 -0
- data/assets/icons/skip-back.svg +1 -0
- data/assets/icons/skip-forward.svg +1 -0
- data/assets/icons/skull.svg +1 -0
- data/assets/icons/slack.svg +1 -0
- data/assets/icons/slash.svg +1 -0
- data/assets/icons/slice.svg +1 -0
- data/assets/icons/sliders-horizontal.svg +1 -0
- data/assets/icons/sliders.svg +1 -0
- data/assets/icons/smartphone-charging.svg +1 -0
- data/assets/icons/smartphone-nfc.svg +1 -0
- data/assets/icons/smartphone.svg +1 -0
- data/assets/icons/smile-plus.svg +1 -0
- data/assets/icons/smile.svg +1 -0
- data/assets/icons/snowflake.svg +1 -0
- data/assets/icons/sofa.svg +1 -0
- data/assets/icons/sort-asc.svg +1 -0
- data/assets/icons/sort-desc.svg +1 -0
- data/assets/icons/soup.svg +1 -0
- data/assets/icons/speaker.svg +1 -0
- data/assets/icons/spline.svg +1 -0
- data/assets/icons/split-square-horizontal.svg +1 -0
- data/assets/icons/split-square-vertical.svg +1 -0
- data/assets/icons/sprout.svg +1 -0
- data/assets/icons/square.svg +1 -0
- data/assets/icons/stamp.svg +1 -0
- data/assets/icons/star-half.svg +1 -0
- data/assets/icons/star-off.svg +1 -0
- data/assets/icons/star.svg +1 -0
- data/assets/icons/stethoscope.svg +1 -0
- data/assets/icons/sticker.svg +1 -0
- data/assets/icons/sticky-note.svg +1 -0
- data/assets/icons/stop-circle.svg +1 -0
- data/assets/icons/stretch-horizontal.svg +1 -0
- data/assets/icons/stretch-vertical.svg +1 -0
- data/assets/icons/strikethrough.svg +1 -0
- data/assets/icons/subscript.svg +1 -0
- data/assets/icons/subtitles.svg +1 -0
- data/assets/icons/sun-dim.svg +1 -0
- data/assets/icons/sun-medium.svg +1 -0
- data/assets/icons/sun-moon.svg +1 -0
- data/assets/icons/sun-snow.svg +1 -0
- data/assets/icons/sun.svg +1 -0
- data/assets/icons/sunrise.svg +1 -0
- data/assets/icons/sunset.svg +1 -0
- data/assets/icons/superscript.svg +1 -0
- data/assets/icons/swiss-franc.svg +1 -0
- data/assets/icons/switch-camera.svg +1 -0
- data/assets/icons/sword.svg +1 -0
- data/assets/icons/swords.svg +1 -0
- data/assets/icons/syringe.svg +1 -0
- data/assets/icons/table-2.svg +1 -0
- data/assets/icons/table.svg +1 -0
- data/assets/icons/tablet.svg +1 -0
- data/assets/icons/tablets.svg +1 -0
- data/assets/icons/tag.svg +1 -0
- data/assets/icons/tags.svg +1 -0
- data/assets/icons/target.svg +1 -0
- data/assets/icons/tent.svg +1 -0
- data/assets/icons/terminal-square.svg +1 -0
- data/assets/icons/terminal.svg +1 -0
- data/assets/icons/text-cursor-input.svg +1 -0
- data/assets/icons/text-cursor.svg +1 -0
- data/assets/icons/thermometer-snowflake.svg +1 -0
- data/assets/icons/thermometer-sun.svg +1 -0
- data/assets/icons/thermometer.svg +1 -0
- data/assets/icons/thumbs-down.svg +1 -0
- data/assets/icons/thumbs-up.svg +1 -0
- data/assets/icons/ticket.svg +1 -0
- data/assets/icons/timer-off.svg +1 -0
- data/assets/icons/timer-reset.svg +1 -0
- data/assets/icons/timer.svg +1 -0
- data/assets/icons/toggle-left.svg +1 -0
- data/assets/icons/toggle-right.svg +1 -0
- data/assets/icons/tornado.svg +1 -0
- data/assets/icons/tower-control.svg +1 -0
- data/assets/icons/toy-brick.svg +1 -0
- data/assets/icons/train.svg +1 -0
- data/assets/icons/trash-2.svg +1 -0
- data/assets/icons/trash.svg +1 -0
- data/assets/icons/tree-deciduous.svg +1 -0
- data/assets/icons/tree-pine.svg +1 -0
- data/assets/icons/trees.svg +1 -0
- data/assets/icons/trello.svg +1 -0
- data/assets/icons/trending-down.svg +1 -0
- data/assets/icons/trending-up.svg +1 -0
- data/assets/icons/triangle.svg +1 -0
- data/assets/icons/trophy.svg +1 -0
- data/assets/icons/truck.svg +1 -0
- data/assets/icons/tv-2.svg +1 -0
- data/assets/icons/tv.svg +1 -0
- data/assets/icons/twitch.svg +1 -0
- data/assets/icons/twitter.svg +1 -0
- data/assets/icons/type.svg +1 -0
- data/assets/icons/umbrella.svg +1 -0
- data/assets/icons/underline.svg +1 -0
- data/assets/icons/undo-2.svg +1 -0
- data/assets/icons/undo.svg +1 -0
- data/assets/icons/unlink-2.svg +1 -0
- data/assets/icons/unlink.svg +1 -0
- data/assets/icons/unlock.svg +1 -0
- data/assets/icons/upload-cloud.svg +1 -0
- data/assets/icons/upload.svg +1 -0
- data/assets/icons/usb.svg +1 -0
- data/assets/icons/user-check.svg +1 -0
- data/assets/icons/user-cog.svg +1 -0
- data/assets/icons/user-minus.svg +1 -0
- data/assets/icons/user-plus.svg +1 -0
- data/assets/icons/user-x.svg +1 -0
- data/assets/icons/user.svg +1 -0
- data/assets/icons/users.svg +1 -0
- data/assets/icons/utensils-crossed.svg +1 -0
- data/assets/icons/utensils.svg +1 -0
- data/assets/icons/utility-pole.svg +1 -0
- data/assets/icons/vegan.svg +1 -0
- data/assets/icons/venetian-mask.svg +1 -0
- data/assets/icons/verified.svg +1 -0
- data/assets/icons/vibrate-off.svg +1 -0
- data/assets/icons/vibrate.svg +1 -0
- data/assets/icons/video-off.svg +1 -0
- data/assets/icons/video.svg +1 -0
- data/assets/icons/view.svg +1 -0
- data/assets/icons/voicemail.svg +1 -0
- data/assets/icons/volume-1.svg +1 -0
- data/assets/icons/volume-2.svg +1 -0
- data/assets/icons/volume-x.svg +1 -0
- data/assets/icons/volume.svg +1 -0
- data/assets/icons/vote.svg +1 -0
- data/assets/icons/wallet.svg +1 -0
- data/assets/icons/wand-2.svg +1 -0
- data/assets/icons/wand.svg +1 -0
- data/assets/icons/watch.svg +1 -0
- data/assets/icons/waves.svg +1 -0
- data/assets/icons/webcam.svg +1 -0
- data/assets/icons/webhook.svg +1 -0
- data/assets/icons/wheat-off.svg +1 -0
- data/assets/icons/wheat.svg +1 -0
- data/assets/icons/wifi-off.svg +1 -0
- data/assets/icons/wifi.svg +1 -0
- data/assets/icons/wind.svg +1 -0
- data/assets/icons/wine-off.svg +1 -0
- data/assets/icons/wine.svg +1 -0
- data/assets/icons/wrap-text.svg +1 -0
- data/assets/icons/wrench.svg +1 -0
- data/assets/icons/x-circle.svg +1 -0
- data/assets/icons/x-octagon.svg +1 -0
- data/assets/icons/x-square.svg +1 -0
- data/assets/icons/x.svg +1 -0
- data/assets/icons/youtube.svg +1 -0
- data/assets/icons/zap-off.svg +1 -0
- data/assets/icons/zap.svg +1 -0
- data/assets/icons/zoom-in.svg +1 -0
- data/assets/icons/zoom-out.svg +1 -0
- data/assets/img/favicon_dark.svg +1 -0
- data/assets/img/favicon_light.svg +1 -0
- data/assets/js/app.js +121 -0
- data/assets/js/components/clipboard.js +47 -0
- data/assets/js/components/params_input.js +23 -0
- data/assets/js/components/tooltip.js +30 -0
- data/assets/js/config.js +24 -0
- data/assets/js/helpers/build.js +22 -0
- data/assets/js/helpers/dom.js +42 -0
- data/assets/js/helpers/layout.js +21 -0
- data/assets/js/helpers/request.js +14 -0
- data/assets/js/helpers/string.js +26 -0
- data/assets/js/iframe.js +1 -0
- data/assets/js/index.js +61 -0
- data/assets/js/lib/lookbook.js +125 -0
- data/assets/js/lib/socket.js +28 -0
- data/assets/js/lib/tippy.js +9 -0
- data/assets/js/lookbook-core.js +1 -0
- data/assets/js/lookbook.js +2 -0
- data/assets/js/plugins/logger.js +39 -0
- data/assets/js/stores/filter.js +11 -0
- data/assets/js/stores/inspector.js +31 -0
- data/assets/js/stores/layout.js +111 -0
- data/assets/js/stores/nav.js +22 -0
- data/assets/js/stores/pages.js +7 -0
- data/assets/js/stores/settings.js +7 -0
- data/assets/js/stores/workbench.js +29 -0
- data/config/app.yml +79 -0
- data/config/inputs.yml +48 -0
- data/config/languages.yml +41 -0
- data/config/panels.yml +28 -0
- data/config/routes.rb +22 -0
- data/config/tags.yml +44 -0
- data/lib/gitlab-lookbook.rb +6 -0
- data/lib/lookbook/cable/cable.rb +53 -0
- data/lib/lookbook/cable/connection.rb +11 -0
- data/lib/lookbook/cable/reload_channel.rb +7 -0
- data/lib/lookbook/engine.rb +295 -0
- data/lib/lookbook/entities/collections/concerns/hierarchical_collection.rb +28 -0
- data/lib/lookbook/entities/collections/entity_collection.rb +66 -0
- data/lib/lookbook/entities/collections/page_collection.rb +57 -0
- data/lib/lookbook/entities/collections/preview_collection.rb +75 -0
- data/lib/lookbook/entities/collections/render_target_collection.rb +4 -0
- data/lib/lookbook/entities/collections/scenario_collection.rb +4 -0
- data/lib/lookbook/entities/concerns/annotatable_entity.rb +84 -0
- data/lib/lookbook/entities/concerns/inspectable_entity.rb +60 -0
- data/lib/lookbook/entities/concerns/locatable_entity.rb +116 -0
- data/lib/lookbook/entities/concerns/navigable_entity.rb +62 -0
- data/lib/lookbook/entities/entity.rb +84 -0
- data/lib/lookbook/entities/page_entity.rb +142 -0
- data/lib/lookbook/entities/page_section_entity.rb +47 -0
- data/lib/lookbook/entities/preview_entity.rb +214 -0
- data/lib/lookbook/entities/renderable_entity.rb +101 -0
- data/lib/lookbook/entities/rendered_scenario_entity.rb +69 -0
- data/lib/lookbook/entities/scenario_entity.rb +182 -0
- data/lib/lookbook/entities/scenario_group_entity.rb +135 -0
- data/lib/lookbook/file_watcher.rb +25 -0
- data/lib/lookbook/helpers/class_names_helper.rb +28 -0
- data/lib/lookbook/helpers/page_helper.rb +43 -0
- data/lib/lookbook/helpers/preview_helper.rb +14 -0
- data/lib/lookbook/helpers/ui_elements_helper.rb +91 -0
- data/lib/lookbook/lang.rb +24 -0
- data/lib/lookbook/param.rb +105 -0
- data/lib/lookbook/preview.rb +85 -0
- data/lib/lookbook/preview_after_render.rb +13 -0
- data/lib/lookbook/preview_controller_actions.rb +69 -0
- data/lib/lookbook/preview_parser.rb +53 -0
- data/lib/lookbook/reloaders.rb +75 -0
- data/lib/lookbook/runtime_context.rb +49 -0
- data/lib/lookbook/services/code/code_beautifier.rb +21 -0
- data/lib/lookbook/services/code/code_highlighter.rb +69 -0
- data/lib/lookbook/services/code/code_indenter.rb +14 -0
- data/lib/lookbook/services/config_loader.rb +20 -0
- data/lib/lookbook/services/data/parsers/data_parser.rb +22 -0
- data/lib/lookbook/services/data/parsers/json_parser.rb +7 -0
- data/lib/lookbook/services/data/parsers/yaml_parser.rb +7 -0
- data/lib/lookbook/services/data/resolvers/data_resolver.rb +68 -0
- data/lib/lookbook/services/data/resolvers/eval_resolver.rb +10 -0
- data/lib/lookbook/services/data/resolvers/file_resolver.rb +28 -0
- data/lib/lookbook/services/data/resolvers/method_resolver.rb +10 -0
- data/lib/lookbook/services/data/resolvers/yaml_resolver.rb +18 -0
- data/lib/lookbook/services/entities/page_tree_builder.rb +40 -0
- data/lib/lookbook/services/entities/preview_tree_builder.rb +34 -0
- data/lib/lookbook/services/list_resolver.rb +35 -0
- data/lib/lookbook/services/markdown_renderer.rb +41 -0
- data/lib/lookbook/services/priority_prefix_parser.rb +16 -0
- data/lib/lookbook/services/string_value_caster.rb +64 -0
- data/lib/lookbook/services/tags/key_value_tag_parser.rb +24 -0
- data/lib/lookbook/services/tags/tag_options_parser.rb +71 -0
- data/lib/lookbook/services/templates/action_view_annotations_stripper.rb +15 -0
- data/lib/lookbook/services/templates/action_view_config_handler.rb +50 -0
- data/lib/lookbook/services/templates/frontmatter_extractor.rb +28 -0
- data/lib/lookbook/services/templates/styles_extractor.rb +38 -0
- data/lib/lookbook/services/urls/data_uri_encoder.rb +14 -0
- data/lib/lookbook/services/urls/file_data_uri_encoder.rb +24 -0
- data/lib/lookbook/services/urls/search_param_encoder.rb +16 -0
- data/lib/lookbook/services/urls/search_param_parser.rb +16 -0
- data/lib/lookbook/stores/config_store.rb +124 -0
- data/lib/lookbook/stores/hook_store.rb +18 -0
- data/lib/lookbook/stores/input_store.rb +66 -0
- data/lib/lookbook/stores/panel_store.rb +122 -0
- data/lib/lookbook/stores/tag_store.rb +45 -0
- data/lib/lookbook/support/deprecation.rb +5 -0
- data/lib/lookbook/support/errors/config_error.rb +7 -0
- data/lib/lookbook/support/errors/error.rb +64 -0
- data/lib/lookbook/support/errors/parser_error.rb +7 -0
- data/lib/lookbook/support/errors/preview_template_error.rb +7 -0
- data/lib/lookbook/support/errors/routing_error.rb +7 -0
- data/lib/lookbook/support/errors/template_error.rb +7 -0
- data/lib/lookbook/support/evented_file_update_checker.rb +69 -0
- data/lib/lookbook/support/null_object.rb +10 -0
- data/lib/lookbook/support/null_websocket.rb +9 -0
- data/lib/lookbook/support/service.rb +7 -0
- data/lib/lookbook/support/store.rb +53 -0
- data/lib/lookbook/support/tree_node.rb +87 -0
- data/lib/lookbook/support/utils/path_utils.rb +52 -0
- data/lib/lookbook/support/utils/utils.rb +32 -0
- data/lib/lookbook/support/utils/where.rb +49 -0
- data/lib/lookbook/tags/after_render_tag.rb +7 -0
- data/lib/lookbook/tags/custom_tag.rb +61 -0
- data/lib/lookbook/tags/display_tag.rb +15 -0
- data/lib/lookbook/tags/hidden_tag.rb +13 -0
- data/lib/lookbook/tags/id_tag.rb +7 -0
- data/lib/lookbook/tags/label_tag.rb +4 -0
- data/lib/lookbook/tags/logical_path_tag.rb +7 -0
- data/lib/lookbook/tags/param_tag.rb +76 -0
- data/lib/lookbook/tags/priority_tag.rb +16 -0
- data/lib/lookbook/tags/renders_tag.rb +4 -0
- data/lib/lookbook/tags/source_tag.rb +7 -0
- data/lib/lookbook/tags/tag_provider.rb +21 -0
- data/lib/lookbook/tags/type_tag.rb +7 -0
- data/lib/lookbook/tags/yard_tag.rb +94 -0
- data/lib/lookbook/theme.rb +62 -0
- data/lib/lookbook/version.rb +3 -0
- data/lib/lookbook/websocket.rb +13 -0
- data/lib/lookbook.rb +244 -0
- data/public/lookbook-assets/Inter-italic.var.53a0de5f.woff2 +0 -0
- data/public/lookbook-assets/Inter-italic.var.69eb0fe1.woff2 +0 -0
- data/public/lookbook-assets/Inter-italic.var.736a7044.woff2 +0 -0
- data/public/lookbook-assets/Inter-roman.var.b695afbe.woff2 +0 -0
- data/public/lookbook-assets/Inter-roman.var.d4f9805a.woff2 +0 -0
- data/public/lookbook-assets/Inter-roman.var.fbdd51d0.woff2 +0 -0
- data/public/lookbook-assets/SourceCodeVariable-Italic.cad97b83.otf +0 -0
- data/public/lookbook-assets/SourceCodeVariable-Italic.ttf.09b4354a.woff2 +0 -0
- data/public/lookbook-assets/SourceCodeVariable-Italic.ttf.a93fa22f.woff2 +0 -0
- data/public/lookbook-assets/SourceCodeVariable-Italic.ttf.fcd7e9f4.woff2 +0 -0
- data/public/lookbook-assets/SourceCodeVariable-Roman.185ddb17.otf +0 -0
- data/public/lookbook-assets/SourceCodeVariable-Roman.ttf.118e9f22.woff2 +0 -0
- data/public/lookbook-assets/SourceCodeVariable-Roman.ttf.91043609.woff2 +0 -0
- data/public/lookbook-assets/SourceCodeVariable-Roman.ttf.f1c8fcce.woff2 +0 -0
- data/public/lookbook-assets/css/lookbook.css +4374 -0
- data/public/lookbook-assets/css/lookbook.css.map +1 -0
- data/public/lookbook-assets/css/themes/blue.css +80 -0
- data/public/lookbook-assets/css/themes/blue.css.map +1 -0
- data/public/lookbook-assets/css/themes/green.css +80 -0
- data/public/lookbook-assets/css/themes/green.css.map +1 -0
- data/public/lookbook-assets/css/themes/indigo.css +80 -0
- data/public/lookbook-assets/css/themes/indigo.css.map +1 -0
- data/public/lookbook-assets/css/themes/rose.css +80 -0
- data/public/lookbook-assets/css/themes/rose.css.map +1 -0
- data/public/lookbook-assets/css/themes/zinc.css +80 -0
- data/public/lookbook-assets/css/themes/zinc.css.map +1 -0
- data/public/lookbook-assets/img/lucide-sprite.svg +4960 -0
- data/public/lookbook-assets/js/iframe.js +916 -0
- data/public/lookbook-assets/js/iframe.js.map +1 -0
- data/public/lookbook-assets/js/index.js +13909 -0
- data/public/lookbook-assets/js/index.js.map +1 -0
- data/public/lookbook-assets/js/lookbook-core.js +87 -0
- data/public/lookbook-assets/js/lookbook.js +945 -0
- metadata +1434 -0
|
@@ -0,0 +1,916 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
var $b2e1fd3e30ab1f5c$exports = {};
|
|
3
|
+
/*
|
|
4
|
+
* File: iframeResizer.contentWindow.js
|
|
5
|
+
* Desc: Include this file in any page being loaded into an iframe
|
|
6
|
+
* to force the iframe to resize to the content size.
|
|
7
|
+
* Requires: iframeResizer.js on host page.
|
|
8
|
+
* Doc: https://iframe-resizer.com
|
|
9
|
+
* Author: David J. Bradshaw - info@iframe-resizer.com
|
|
10
|
+
*
|
|
11
|
+
*/ // eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names
|
|
12
|
+
(function(undefined) {
|
|
13
|
+
if (typeof window === 'undefined') return; // don't run for server side render
|
|
14
|
+
var autoResize = true, base = 10, bodyBackground = '', bodyMargin = 0, bodyMarginStr = '', bodyObserver = null, bodyPadding = '', calculateWidth = false, doubleEventList = {
|
|
15
|
+
resize: 1,
|
|
16
|
+
click: 1
|
|
17
|
+
}, eventCancelTimer = 128, firstRun = true, height = 1, heightCalcModeDefault = 'bodyOffset', heightCalcMode = heightCalcModeDefault, initLock = true, initMsg = '', inPageLinks = {}, interval = 32, intervalTimer = null, logging = false, mouseEvents = false, msgID = '[iFrameSizer]', msgIdLen = msgID.length, myID = '', resetRequiredMethods = {
|
|
18
|
+
max: 1,
|
|
19
|
+
min: 1,
|
|
20
|
+
bodyScroll: 1,
|
|
21
|
+
documentElementScroll: 1
|
|
22
|
+
}, resizeFrom = 'child', sendPermit = true, target = window.parent, targetOriginDefault = '*', tolerance = 0, triggerLocked = false, triggerLockedTimer = null, throttledTimer = 16, width = 1, widthCalcModeDefault = 'scroll', widthCalcMode = widthCalcModeDefault, win = window, onMessage = function() {
|
|
23
|
+
warn('onMessage function not defined');
|
|
24
|
+
}, onReady = function() {}, onPageInfo = function() {}, customCalcMethods = {
|
|
25
|
+
height: function() {
|
|
26
|
+
warn('Custom height calculation function not defined');
|
|
27
|
+
return document.documentElement.offsetHeight;
|
|
28
|
+
},
|
|
29
|
+
width: function() {
|
|
30
|
+
warn('Custom width calculation function not defined');
|
|
31
|
+
return document.body.scrollWidth;
|
|
32
|
+
}
|
|
33
|
+
}, eventHandlersByName = {}, passiveSupported = false;
|
|
34
|
+
function noop() {}
|
|
35
|
+
try {
|
|
36
|
+
var options = Object.create({}, {
|
|
37
|
+
passive: {
|
|
38
|
+
// eslint-disable-next-line getter-return
|
|
39
|
+
get: function() {
|
|
40
|
+
passiveSupported = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
window.addEventListener('test', noop, options);
|
|
45
|
+
window.removeEventListener('test', noop, options);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
/* */ }
|
|
48
|
+
function addEventListener(el, evt, func, options) {
|
|
49
|
+
el.addEventListener(evt, func, passiveSupported ? options || {} : false);
|
|
50
|
+
}
|
|
51
|
+
function removeEventListener(el, evt, func) {
|
|
52
|
+
el.removeEventListener(evt, func, false);
|
|
53
|
+
}
|
|
54
|
+
function capitalizeFirstLetter(string) {
|
|
55
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
56
|
+
}
|
|
57
|
+
// Based on underscore.js
|
|
58
|
+
function throttle(func) {
|
|
59
|
+
var context, args, result, timeout = null, previous = 0, later = function() {
|
|
60
|
+
previous = Date.now();
|
|
61
|
+
timeout = null;
|
|
62
|
+
result = func.apply(context, args);
|
|
63
|
+
if (!timeout) // eslint-disable-next-line no-multi-assign
|
|
64
|
+
context = args = null;
|
|
65
|
+
};
|
|
66
|
+
return function() {
|
|
67
|
+
var now = Date.now();
|
|
68
|
+
if (!previous) previous = now;
|
|
69
|
+
var remaining = throttledTimer - (now - previous);
|
|
70
|
+
context = this;
|
|
71
|
+
args = arguments;
|
|
72
|
+
if (remaining <= 0 || remaining > throttledTimer) {
|
|
73
|
+
if (timeout) {
|
|
74
|
+
clearTimeout(timeout);
|
|
75
|
+
timeout = null;
|
|
76
|
+
}
|
|
77
|
+
previous = now;
|
|
78
|
+
result = func.apply(context, args);
|
|
79
|
+
if (!timeout) // eslint-disable-next-line no-multi-assign
|
|
80
|
+
context = args = null;
|
|
81
|
+
} else if (!timeout) timeout = setTimeout(later, remaining);
|
|
82
|
+
return result;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function formatLogMsg(msg) {
|
|
86
|
+
return msgID + '[' + myID + '] ' + msg;
|
|
87
|
+
}
|
|
88
|
+
function log(msg) {
|
|
89
|
+
if (logging && 'object' === typeof window.console) // eslint-disable-next-line no-console
|
|
90
|
+
console.log(formatLogMsg(msg));
|
|
91
|
+
}
|
|
92
|
+
function warn(msg) {
|
|
93
|
+
if ('object' === typeof window.console) // eslint-disable-next-line no-console
|
|
94
|
+
console.warn(formatLogMsg(msg));
|
|
95
|
+
}
|
|
96
|
+
function init() {
|
|
97
|
+
readDataFromParent();
|
|
98
|
+
log('Initialising iFrame (' + window.location.href + ')');
|
|
99
|
+
readDataFromPage();
|
|
100
|
+
setMargin();
|
|
101
|
+
setBodyStyle('background', bodyBackground);
|
|
102
|
+
setBodyStyle('padding', bodyPadding);
|
|
103
|
+
injectClearFixIntoBodyElement();
|
|
104
|
+
checkHeightMode();
|
|
105
|
+
checkWidthMode();
|
|
106
|
+
stopInfiniteResizingOfIFrame();
|
|
107
|
+
setupPublicMethods();
|
|
108
|
+
setupMouseEvents();
|
|
109
|
+
startEventListeners();
|
|
110
|
+
inPageLinks = setupInPageLinks();
|
|
111
|
+
sendSize('init', 'Init message from host page');
|
|
112
|
+
onReady();
|
|
113
|
+
}
|
|
114
|
+
function readDataFromParent() {
|
|
115
|
+
function strBool(str) {
|
|
116
|
+
return 'true' === str;
|
|
117
|
+
}
|
|
118
|
+
var data = initMsg.slice(msgIdLen).split(':');
|
|
119
|
+
myID = data[0];
|
|
120
|
+
bodyMargin = undefined === data[1] ? bodyMargin : Number(data[1]) // For V1 compatibility
|
|
121
|
+
;
|
|
122
|
+
calculateWidth = undefined === data[2] ? calculateWidth : strBool(data[2]);
|
|
123
|
+
logging = undefined === data[3] ? logging : strBool(data[3]);
|
|
124
|
+
interval = undefined === data[4] ? interval : Number(data[4]);
|
|
125
|
+
autoResize = undefined === data[6] ? autoResize : strBool(data[6]);
|
|
126
|
+
bodyMarginStr = data[7];
|
|
127
|
+
heightCalcMode = undefined === data[8] ? heightCalcMode : data[8];
|
|
128
|
+
bodyBackground = data[9];
|
|
129
|
+
bodyPadding = data[10];
|
|
130
|
+
tolerance = undefined === data[11] ? tolerance : Number(data[11]);
|
|
131
|
+
inPageLinks.enable = undefined === data[12] ? false : strBool(data[12]);
|
|
132
|
+
resizeFrom = undefined === data[13] ? resizeFrom : data[13];
|
|
133
|
+
widthCalcMode = undefined === data[14] ? widthCalcMode : data[14];
|
|
134
|
+
mouseEvents = undefined === data[15] ? mouseEvents : strBool(data[15]);
|
|
135
|
+
}
|
|
136
|
+
function depricate(key) {
|
|
137
|
+
var splitName = key.split('Callback');
|
|
138
|
+
if (splitName.length === 2) {
|
|
139
|
+
var name = 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
|
|
140
|
+
this[name] = this[key];
|
|
141
|
+
delete this[key];
|
|
142
|
+
warn("Deprecated: '" + key + "' has been renamed '" + name + "'. The old method will be removed in the next major version.");
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function readDataFromPage() {
|
|
146
|
+
function readData() {
|
|
147
|
+
var data = window.iFrameResizer;
|
|
148
|
+
log('Reading data from page: ' + JSON.stringify(data));
|
|
149
|
+
Object.keys(data).forEach(depricate, data);
|
|
150
|
+
onMessage = 'onMessage' in data ? data.onMessage : onMessage;
|
|
151
|
+
onReady = 'onReady' in data ? data.onReady : onReady;
|
|
152
|
+
targetOriginDefault = 'targetOrigin' in data ? data.targetOrigin : targetOriginDefault;
|
|
153
|
+
heightCalcMode = 'heightCalculationMethod' in data ? data.heightCalculationMethod : heightCalcMode;
|
|
154
|
+
widthCalcMode = 'widthCalculationMethod' in data ? data.widthCalculationMethod : widthCalcMode;
|
|
155
|
+
}
|
|
156
|
+
function setupCustomCalcMethods(calcMode, calcFunc) {
|
|
157
|
+
if ('function' === typeof calcMode) {
|
|
158
|
+
log('Setup custom ' + calcFunc + 'CalcMethod');
|
|
159
|
+
customCalcMethods[calcFunc] = calcMode;
|
|
160
|
+
calcMode = 'custom';
|
|
161
|
+
}
|
|
162
|
+
return calcMode;
|
|
163
|
+
}
|
|
164
|
+
if ('iFrameResizer' in window && Object === window.iFrameResizer.constructor) {
|
|
165
|
+
readData();
|
|
166
|
+
heightCalcMode = setupCustomCalcMethods(heightCalcMode, 'height');
|
|
167
|
+
widthCalcMode = setupCustomCalcMethods(widthCalcMode, 'width');
|
|
168
|
+
}
|
|
169
|
+
log('TargetOrigin for parent set to: ' + targetOriginDefault);
|
|
170
|
+
}
|
|
171
|
+
function chkCSS(attr, value) {
|
|
172
|
+
if (-1 !== value.indexOf('-')) {
|
|
173
|
+
warn('Negative CSS value ignored for ' + attr);
|
|
174
|
+
value = '';
|
|
175
|
+
}
|
|
176
|
+
return value;
|
|
177
|
+
}
|
|
178
|
+
function setBodyStyle(attr, value) {
|
|
179
|
+
if (undefined !== value && '' !== value && 'null' !== value) {
|
|
180
|
+
document.body.style[attr] = value;
|
|
181
|
+
log('Body ' + attr + ' set to "' + value + '"');
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
function setMargin() {
|
|
185
|
+
// If called via V1 script, convert bodyMargin from int to str
|
|
186
|
+
if (undefined === bodyMarginStr) bodyMarginStr = bodyMargin + 'px';
|
|
187
|
+
setBodyStyle('margin', chkCSS('margin', bodyMarginStr));
|
|
188
|
+
}
|
|
189
|
+
function stopInfiniteResizingOfIFrame() {
|
|
190
|
+
document.documentElement.style.height = '';
|
|
191
|
+
document.body.style.height = '';
|
|
192
|
+
log('HTML & body height set to "auto"');
|
|
193
|
+
}
|
|
194
|
+
function manageTriggerEvent(options) {
|
|
195
|
+
var listener = {
|
|
196
|
+
add: function(eventName) {
|
|
197
|
+
function handleEvent() {
|
|
198
|
+
sendSize(options.eventName, options.eventType);
|
|
199
|
+
}
|
|
200
|
+
eventHandlersByName[eventName] = handleEvent;
|
|
201
|
+
addEventListener(window, eventName, handleEvent, {
|
|
202
|
+
passive: true
|
|
203
|
+
});
|
|
204
|
+
},
|
|
205
|
+
remove: function(eventName) {
|
|
206
|
+
var handleEvent = eventHandlersByName[eventName];
|
|
207
|
+
delete eventHandlersByName[eventName];
|
|
208
|
+
removeEventListener(window, eventName, handleEvent);
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
if (options.eventNames && Array.prototype.map) {
|
|
212
|
+
options.eventName = options.eventNames[0];
|
|
213
|
+
options.eventNames.map(listener[options.method]);
|
|
214
|
+
} else listener[options.method](options.eventName);
|
|
215
|
+
log(capitalizeFirstLetter(options.method) + ' event listener: ' + options.eventType);
|
|
216
|
+
}
|
|
217
|
+
function manageEventListeners(method) {
|
|
218
|
+
manageTriggerEvent({
|
|
219
|
+
method: method,
|
|
220
|
+
eventType: 'Animation Start',
|
|
221
|
+
eventNames: [
|
|
222
|
+
'animationstart',
|
|
223
|
+
'webkitAnimationStart'
|
|
224
|
+
]
|
|
225
|
+
});
|
|
226
|
+
manageTriggerEvent({
|
|
227
|
+
method: method,
|
|
228
|
+
eventType: 'Animation Iteration',
|
|
229
|
+
eventNames: [
|
|
230
|
+
'animationiteration',
|
|
231
|
+
'webkitAnimationIteration'
|
|
232
|
+
]
|
|
233
|
+
});
|
|
234
|
+
manageTriggerEvent({
|
|
235
|
+
method: method,
|
|
236
|
+
eventType: 'Animation End',
|
|
237
|
+
eventNames: [
|
|
238
|
+
'animationend',
|
|
239
|
+
'webkitAnimationEnd'
|
|
240
|
+
]
|
|
241
|
+
});
|
|
242
|
+
manageTriggerEvent({
|
|
243
|
+
method: method,
|
|
244
|
+
eventType: 'Input',
|
|
245
|
+
eventName: 'input'
|
|
246
|
+
});
|
|
247
|
+
manageTriggerEvent({
|
|
248
|
+
method: method,
|
|
249
|
+
eventType: 'Mouse Up',
|
|
250
|
+
eventName: 'mouseup'
|
|
251
|
+
});
|
|
252
|
+
manageTriggerEvent({
|
|
253
|
+
method: method,
|
|
254
|
+
eventType: 'Mouse Down',
|
|
255
|
+
eventName: 'mousedown'
|
|
256
|
+
});
|
|
257
|
+
manageTriggerEvent({
|
|
258
|
+
method: method,
|
|
259
|
+
eventType: 'Orientation Change',
|
|
260
|
+
eventName: 'orientationchange'
|
|
261
|
+
});
|
|
262
|
+
manageTriggerEvent({
|
|
263
|
+
method: method,
|
|
264
|
+
eventType: 'Print',
|
|
265
|
+
eventNames: [
|
|
266
|
+
'afterprint',
|
|
267
|
+
'beforeprint'
|
|
268
|
+
]
|
|
269
|
+
});
|
|
270
|
+
manageTriggerEvent({
|
|
271
|
+
method: method,
|
|
272
|
+
eventType: 'Ready State Change',
|
|
273
|
+
eventName: 'readystatechange'
|
|
274
|
+
});
|
|
275
|
+
manageTriggerEvent({
|
|
276
|
+
method: method,
|
|
277
|
+
eventType: 'Touch Start',
|
|
278
|
+
eventName: 'touchstart'
|
|
279
|
+
});
|
|
280
|
+
manageTriggerEvent({
|
|
281
|
+
method: method,
|
|
282
|
+
eventType: 'Touch End',
|
|
283
|
+
eventName: 'touchend'
|
|
284
|
+
});
|
|
285
|
+
manageTriggerEvent({
|
|
286
|
+
method: method,
|
|
287
|
+
eventType: 'Touch Cancel',
|
|
288
|
+
eventName: 'touchcancel'
|
|
289
|
+
});
|
|
290
|
+
manageTriggerEvent({
|
|
291
|
+
method: method,
|
|
292
|
+
eventType: 'Transition Start',
|
|
293
|
+
eventNames: [
|
|
294
|
+
'transitionstart',
|
|
295
|
+
'webkitTransitionStart',
|
|
296
|
+
'MSTransitionStart',
|
|
297
|
+
'oTransitionStart',
|
|
298
|
+
'otransitionstart'
|
|
299
|
+
]
|
|
300
|
+
});
|
|
301
|
+
manageTriggerEvent({
|
|
302
|
+
method: method,
|
|
303
|
+
eventType: 'Transition Iteration',
|
|
304
|
+
eventNames: [
|
|
305
|
+
'transitioniteration',
|
|
306
|
+
'webkitTransitionIteration',
|
|
307
|
+
'MSTransitionIteration',
|
|
308
|
+
'oTransitionIteration',
|
|
309
|
+
'otransitioniteration'
|
|
310
|
+
]
|
|
311
|
+
});
|
|
312
|
+
manageTriggerEvent({
|
|
313
|
+
method: method,
|
|
314
|
+
eventType: 'Transition End',
|
|
315
|
+
eventNames: [
|
|
316
|
+
'transitionend',
|
|
317
|
+
'webkitTransitionEnd',
|
|
318
|
+
'MSTransitionEnd',
|
|
319
|
+
'oTransitionEnd',
|
|
320
|
+
'otransitionend'
|
|
321
|
+
]
|
|
322
|
+
});
|
|
323
|
+
if ('child' === resizeFrom) manageTriggerEvent({
|
|
324
|
+
method: method,
|
|
325
|
+
eventType: 'IFrame Resized',
|
|
326
|
+
eventName: 'resize'
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
function checkCalcMode(calcMode, calcModeDefault, modes, type) {
|
|
330
|
+
if (calcModeDefault !== calcMode) {
|
|
331
|
+
if (!(calcMode in modes)) {
|
|
332
|
+
warn(calcMode + ' is not a valid option for ' + type + 'CalculationMethod.');
|
|
333
|
+
calcMode = calcModeDefault;
|
|
334
|
+
}
|
|
335
|
+
log(type + ' calculation method set to "' + calcMode + '"');
|
|
336
|
+
}
|
|
337
|
+
return calcMode;
|
|
338
|
+
}
|
|
339
|
+
function checkHeightMode() {
|
|
340
|
+
heightCalcMode = checkCalcMode(heightCalcMode, heightCalcModeDefault, getHeight, 'height');
|
|
341
|
+
}
|
|
342
|
+
function checkWidthMode() {
|
|
343
|
+
widthCalcMode = checkCalcMode(widthCalcMode, widthCalcModeDefault, getWidth, 'width');
|
|
344
|
+
}
|
|
345
|
+
function startEventListeners() {
|
|
346
|
+
if (true === autoResize) {
|
|
347
|
+
manageEventListeners('add');
|
|
348
|
+
setupMutationObserver();
|
|
349
|
+
} else log('Auto Resize disabled');
|
|
350
|
+
}
|
|
351
|
+
// function stopMsgsToParent() {
|
|
352
|
+
// log('Disable outgoing messages')
|
|
353
|
+
// sendPermit = false
|
|
354
|
+
// }
|
|
355
|
+
// function removeMsgListener() {
|
|
356
|
+
// log('Remove event listener: Message')
|
|
357
|
+
// removeEventListener(window, 'message', receiver)
|
|
358
|
+
// }
|
|
359
|
+
function disconnectMutationObserver() {
|
|
360
|
+
if (null !== bodyObserver) /* istanbul ignore next */ // Not testable in PhantonJS
|
|
361
|
+
bodyObserver.disconnect();
|
|
362
|
+
}
|
|
363
|
+
function stopEventListeners() {
|
|
364
|
+
manageEventListeners('remove');
|
|
365
|
+
disconnectMutationObserver();
|
|
366
|
+
clearInterval(intervalTimer);
|
|
367
|
+
}
|
|
368
|
+
// function teardown() {
|
|
369
|
+
// stopMsgsToParent()
|
|
370
|
+
// removeMsgListener()
|
|
371
|
+
// if (true === autoResize) stopEventListeners()
|
|
372
|
+
// }
|
|
373
|
+
function injectClearFixIntoBodyElement() {
|
|
374
|
+
var clearFix = document.createElement('div');
|
|
375
|
+
clearFix.style.clear = 'both';
|
|
376
|
+
// Guard against the following having been globally redefined in CSS.
|
|
377
|
+
clearFix.style.display = 'block';
|
|
378
|
+
clearFix.style.height = '0';
|
|
379
|
+
document.body.appendChild(clearFix);
|
|
380
|
+
}
|
|
381
|
+
function setupInPageLinks() {
|
|
382
|
+
function getPagePosition() {
|
|
383
|
+
return {
|
|
384
|
+
x: window.pageXOffset === undefined ? document.documentElement.scrollLeft : window.pageXOffset,
|
|
385
|
+
y: window.pageYOffset === undefined ? document.documentElement.scrollTop : window.pageYOffset
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
function getElementPosition(el) {
|
|
389
|
+
var elPosition = el.getBoundingClientRect(), pagePosition = getPagePosition();
|
|
390
|
+
return {
|
|
391
|
+
x: parseInt(elPosition.left, 10) + parseInt(pagePosition.x, 10),
|
|
392
|
+
y: parseInt(elPosition.top, 10) + parseInt(pagePosition.y, 10)
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
function findTarget(location) {
|
|
396
|
+
function jumpToTarget(target) {
|
|
397
|
+
var jumpPosition = getElementPosition(target);
|
|
398
|
+
log('Moving to in page link (#' + hash + ') at x: ' + jumpPosition.x + ' y: ' + jumpPosition.y);
|
|
399
|
+
sendMsg(jumpPosition.y, jumpPosition.x, 'scrollToOffset') // X&Y reversed at sendMsg uses height/width
|
|
400
|
+
;
|
|
401
|
+
}
|
|
402
|
+
var hash = location.split('#')[1] || location, hashData = decodeURIComponent(hash), target = document.getElementById(hashData) || document.getElementsByName(hashData)[0];
|
|
403
|
+
if (undefined === target) {
|
|
404
|
+
log('In page link (#' + hash + ') not found in iFrame, so sending to parent');
|
|
405
|
+
sendMsg(0, 0, 'inPageLink', '#' + hash);
|
|
406
|
+
} else jumpToTarget(target);
|
|
407
|
+
}
|
|
408
|
+
function checkLocationHash() {
|
|
409
|
+
var hash = window.location.hash;
|
|
410
|
+
var href = window.location.href;
|
|
411
|
+
if ('' !== hash && '#' !== hash) findTarget(href);
|
|
412
|
+
}
|
|
413
|
+
function bindAnchors() {
|
|
414
|
+
function setupLink(el) {
|
|
415
|
+
function linkClicked(e) {
|
|
416
|
+
e.preventDefault();
|
|
417
|
+
/* jshint validthis:true */ findTarget(this.getAttribute('href'));
|
|
418
|
+
}
|
|
419
|
+
if ('#' !== el.getAttribute('href')) addEventListener(el, 'click', linkClicked);
|
|
420
|
+
}
|
|
421
|
+
Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'), setupLink);
|
|
422
|
+
}
|
|
423
|
+
function bindLocationHash() {
|
|
424
|
+
addEventListener(window, 'hashchange', checkLocationHash);
|
|
425
|
+
}
|
|
426
|
+
function initCheck() {
|
|
427
|
+
// Check if page loaded with location hash after init resize
|
|
428
|
+
setTimeout(checkLocationHash, eventCancelTimer);
|
|
429
|
+
}
|
|
430
|
+
function enableInPageLinks() {
|
|
431
|
+
/* istanbul ignore else */ // Not testable in phantonJS
|
|
432
|
+
if (Array.prototype.forEach && document.querySelectorAll) {
|
|
433
|
+
log('Setting up location.hash handlers');
|
|
434
|
+
bindAnchors();
|
|
435
|
+
bindLocationHash();
|
|
436
|
+
initCheck();
|
|
437
|
+
} else warn('In page linking not fully supported in this browser! (See README.md for IE8 workaround)');
|
|
438
|
+
}
|
|
439
|
+
if (inPageLinks.enable) enableInPageLinks();
|
|
440
|
+
else log('In page linking not enabled');
|
|
441
|
+
return {
|
|
442
|
+
findTarget: findTarget
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
function setupMouseEvents() {
|
|
446
|
+
if (mouseEvents !== true) return;
|
|
447
|
+
function sendMouse(e) {
|
|
448
|
+
sendMsg(0, 0, e.type, e.screenY + ':' + e.screenX);
|
|
449
|
+
}
|
|
450
|
+
function addMouseListener(evt, name) {
|
|
451
|
+
log('Add event listener: ' + name);
|
|
452
|
+
addEventListener(window.document, evt, sendMouse);
|
|
453
|
+
}
|
|
454
|
+
addMouseListener('mouseenter', 'Mouse Enter');
|
|
455
|
+
addMouseListener('mouseleave', 'Mouse Leave');
|
|
456
|
+
}
|
|
457
|
+
function setupPublicMethods() {
|
|
458
|
+
log('Enable public methods');
|
|
459
|
+
win.parentIFrame = {
|
|
460
|
+
autoResize: function autoResizeF(resize) {
|
|
461
|
+
if (true === resize && false === autoResize) {
|
|
462
|
+
autoResize = true;
|
|
463
|
+
startEventListeners();
|
|
464
|
+
} else if (false === resize && true === autoResize) {
|
|
465
|
+
autoResize = false;
|
|
466
|
+
stopEventListeners();
|
|
467
|
+
}
|
|
468
|
+
sendMsg(0, 0, 'autoResize', JSON.stringify(autoResize));
|
|
469
|
+
return autoResize;
|
|
470
|
+
},
|
|
471
|
+
close: function closeF() {
|
|
472
|
+
sendMsg(0, 0, 'close');
|
|
473
|
+
// teardown()
|
|
474
|
+
},
|
|
475
|
+
getId: function getIdF() {
|
|
476
|
+
return myID;
|
|
477
|
+
},
|
|
478
|
+
getPageInfo: function getPageInfoF(callback) {
|
|
479
|
+
if ('function' === typeof callback) {
|
|
480
|
+
onPageInfo = callback;
|
|
481
|
+
sendMsg(0, 0, 'pageInfo');
|
|
482
|
+
} else {
|
|
483
|
+
onPageInfo = function() {};
|
|
484
|
+
sendMsg(0, 0, 'pageInfoStop');
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
moveToAnchor: function moveToAnchorF(hash) {
|
|
488
|
+
inPageLinks.findTarget(hash);
|
|
489
|
+
},
|
|
490
|
+
reset: function resetF() {
|
|
491
|
+
resetIFrame('parentIFrame.reset');
|
|
492
|
+
},
|
|
493
|
+
scrollTo: function scrollToF(x, y) {
|
|
494
|
+
sendMsg(y, x, 'scrollTo') // X&Y reversed at sendMsg uses height/width
|
|
495
|
+
;
|
|
496
|
+
},
|
|
497
|
+
scrollToOffset: function scrollToF(x, y) {
|
|
498
|
+
sendMsg(y, x, 'scrollToOffset') // X&Y reversed at sendMsg uses height/width
|
|
499
|
+
;
|
|
500
|
+
},
|
|
501
|
+
sendMessage: function sendMessageF(msg, targetOrigin) {
|
|
502
|
+
sendMsg(0, 0, 'message', JSON.stringify(msg), targetOrigin);
|
|
503
|
+
},
|
|
504
|
+
setHeightCalculationMethod: function setHeightCalculationMethodF(heightCalculationMethod) {
|
|
505
|
+
heightCalcMode = heightCalculationMethod;
|
|
506
|
+
checkHeightMode();
|
|
507
|
+
},
|
|
508
|
+
setWidthCalculationMethod: function setWidthCalculationMethodF(widthCalculationMethod) {
|
|
509
|
+
widthCalcMode = widthCalculationMethod;
|
|
510
|
+
checkWidthMode();
|
|
511
|
+
},
|
|
512
|
+
setTargetOrigin: function setTargetOriginF(targetOrigin) {
|
|
513
|
+
log('Set targetOrigin: ' + targetOrigin);
|
|
514
|
+
targetOriginDefault = targetOrigin;
|
|
515
|
+
},
|
|
516
|
+
size: function sizeF(customHeight, customWidth) {
|
|
517
|
+
var valString = '' + (customHeight || '') + (customWidth ? ',' + customWidth : '');
|
|
518
|
+
sendSize('size', 'parentIFrame.size(' + valString + ')', customHeight, customWidth);
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
function initInterval() {
|
|
523
|
+
if (0 !== interval) {
|
|
524
|
+
log('setInterval: ' + interval + 'ms');
|
|
525
|
+
intervalTimer = setInterval(function() {
|
|
526
|
+
sendSize('interval', 'setInterval: ' + interval);
|
|
527
|
+
}, Math.abs(interval));
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
// Not testable in PhantomJS
|
|
531
|
+
/* istanbul ignore next */ function setupBodyMutationObserver() {
|
|
532
|
+
function addImageLoadListners(mutation) {
|
|
533
|
+
function addImageLoadListener(element) {
|
|
534
|
+
if (false === element.complete) {
|
|
535
|
+
log('Attach listeners to ' + element.src);
|
|
536
|
+
element.addEventListener('load', imageLoaded, false);
|
|
537
|
+
element.addEventListener('error', imageError, false);
|
|
538
|
+
elements.push(element);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'src') addImageLoadListener(mutation.target);
|
|
542
|
+
else if (mutation.type === 'childList') Array.prototype.forEach.call(mutation.target.querySelectorAll('img'), addImageLoadListener);
|
|
543
|
+
}
|
|
544
|
+
function removeFromArray(element) {
|
|
545
|
+
elements.splice(elements.indexOf(element), 1);
|
|
546
|
+
}
|
|
547
|
+
function removeImageLoadListener(element) {
|
|
548
|
+
log('Remove listeners from ' + element.src);
|
|
549
|
+
element.removeEventListener('load', imageLoaded, false);
|
|
550
|
+
element.removeEventListener('error', imageError, false);
|
|
551
|
+
removeFromArray(element);
|
|
552
|
+
}
|
|
553
|
+
function imageEventTriggered(event, type, typeDesc) {
|
|
554
|
+
removeImageLoadListener(event.target);
|
|
555
|
+
sendSize(type, typeDesc + ': ' + event.target.src);
|
|
556
|
+
}
|
|
557
|
+
function imageLoaded(event) {
|
|
558
|
+
imageEventTriggered(event, 'imageLoad', 'Image loaded');
|
|
559
|
+
}
|
|
560
|
+
function imageError(event) {
|
|
561
|
+
imageEventTriggered(event, 'imageLoadFailed', 'Image load failed');
|
|
562
|
+
}
|
|
563
|
+
function mutationObserved(mutations) {
|
|
564
|
+
sendSize('mutationObserver', 'mutationObserver: ' + mutations[0].target + ' ' + mutations[0].type);
|
|
565
|
+
// Deal with WebKit / Blink asyncing image loading when tags are injected into the page
|
|
566
|
+
mutations.forEach(addImageLoadListners);
|
|
567
|
+
}
|
|
568
|
+
function createMutationObserver() {
|
|
569
|
+
var target = document.querySelector('body'), config = {
|
|
570
|
+
attributes: true,
|
|
571
|
+
attributeOldValue: false,
|
|
572
|
+
characterData: true,
|
|
573
|
+
characterDataOldValue: false,
|
|
574
|
+
childList: true,
|
|
575
|
+
subtree: true
|
|
576
|
+
};
|
|
577
|
+
observer = new MutationObserver(mutationObserved);
|
|
578
|
+
log('Create body MutationObserver');
|
|
579
|
+
observer.observe(target, config);
|
|
580
|
+
return observer;
|
|
581
|
+
}
|
|
582
|
+
var elements = [], MutationObserver = window.MutationObserver || window.WebKitMutationObserver, observer = createMutationObserver();
|
|
583
|
+
return {
|
|
584
|
+
disconnect: function() {
|
|
585
|
+
if ('disconnect' in observer) {
|
|
586
|
+
log('Disconnect body MutationObserver');
|
|
587
|
+
observer.disconnect();
|
|
588
|
+
elements.forEach(removeImageLoadListener);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
function setupMutationObserver() {
|
|
594
|
+
var forceIntervalTimer = 0 > interval;
|
|
595
|
+
// Not testable in PhantomJS
|
|
596
|
+
/* istanbul ignore if */ if (window.MutationObserver || window.WebKitMutationObserver) {
|
|
597
|
+
if (forceIntervalTimer) initInterval();
|
|
598
|
+
else bodyObserver = setupBodyMutationObserver();
|
|
599
|
+
} else {
|
|
600
|
+
log('MutationObserver not supported in this browser!');
|
|
601
|
+
initInterval();
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
// document.documentElement.offsetHeight is not reliable, so
|
|
605
|
+
// we have to jump through hoops to get a better value.
|
|
606
|
+
function getComputedStyle(prop, el) {
|
|
607
|
+
var retVal = 0;
|
|
608
|
+
el = el || document.body // Not testable in phantonJS
|
|
609
|
+
;
|
|
610
|
+
retVal = document.defaultView.getComputedStyle(el, null);
|
|
611
|
+
retVal = null === retVal ? 0 : retVal[prop];
|
|
612
|
+
return parseInt(retVal, base);
|
|
613
|
+
}
|
|
614
|
+
function chkEventThottle(timer) {
|
|
615
|
+
if (timer > throttledTimer / 2) {
|
|
616
|
+
throttledTimer = 2 * timer;
|
|
617
|
+
log('Event throttle increased to ' + throttledTimer + 'ms');
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
// Idea from https://github.com/guardian/iframe-messenger
|
|
621
|
+
function getMaxElement(side, elements) {
|
|
622
|
+
var elementsLength = elements.length, elVal = 0, maxVal = 0, Side = capitalizeFirstLetter(side), timer = Date.now();
|
|
623
|
+
for(var i = 0; i < elementsLength; i++){
|
|
624
|
+
elVal = elements[i].getBoundingClientRect()[side] + getComputedStyle('margin' + Side, elements[i]);
|
|
625
|
+
if (elVal > maxVal) maxVal = elVal;
|
|
626
|
+
}
|
|
627
|
+
timer = Date.now() - timer;
|
|
628
|
+
log('Parsed ' + elementsLength + ' HTML elements');
|
|
629
|
+
log('Element position calculated in ' + timer + 'ms');
|
|
630
|
+
chkEventThottle(timer);
|
|
631
|
+
return maxVal;
|
|
632
|
+
}
|
|
633
|
+
function getAllMeasurements(dimensions) {
|
|
634
|
+
return [
|
|
635
|
+
dimensions.bodyOffset(),
|
|
636
|
+
dimensions.bodyScroll(),
|
|
637
|
+
dimensions.documentElementOffset(),
|
|
638
|
+
dimensions.documentElementScroll()
|
|
639
|
+
];
|
|
640
|
+
}
|
|
641
|
+
function getTaggedElements(side, tag) {
|
|
642
|
+
function noTaggedElementsFound() {
|
|
643
|
+
warn('No tagged elements (' + tag + ') found on page');
|
|
644
|
+
return document.querySelectorAll('body *');
|
|
645
|
+
}
|
|
646
|
+
var elements = document.querySelectorAll('[' + tag + ']');
|
|
647
|
+
if (elements.length === 0) noTaggedElementsFound();
|
|
648
|
+
return getMaxElement(side, elements);
|
|
649
|
+
}
|
|
650
|
+
function getAllElements() {
|
|
651
|
+
return document.querySelectorAll('body *');
|
|
652
|
+
}
|
|
653
|
+
var getHeight = {
|
|
654
|
+
bodyOffset: function getBodyOffsetHeight() {
|
|
655
|
+
return document.body.offsetHeight + getComputedStyle('marginTop') + getComputedStyle('marginBottom');
|
|
656
|
+
},
|
|
657
|
+
offset: function() {
|
|
658
|
+
return getHeight.bodyOffset() // Backwards compatibility
|
|
659
|
+
;
|
|
660
|
+
},
|
|
661
|
+
bodyScroll: function getBodyScrollHeight() {
|
|
662
|
+
return document.body.scrollHeight;
|
|
663
|
+
},
|
|
664
|
+
custom: function getCustomWidth() {
|
|
665
|
+
return customCalcMethods.height();
|
|
666
|
+
},
|
|
667
|
+
documentElementOffset: function getDEOffsetHeight() {
|
|
668
|
+
return document.documentElement.offsetHeight;
|
|
669
|
+
},
|
|
670
|
+
documentElementScroll: function getDEScrollHeight() {
|
|
671
|
+
return document.documentElement.scrollHeight;
|
|
672
|
+
},
|
|
673
|
+
max: function getMaxHeight() {
|
|
674
|
+
return Math.max.apply(null, getAllMeasurements(getHeight));
|
|
675
|
+
},
|
|
676
|
+
min: function getMinHeight() {
|
|
677
|
+
return Math.min.apply(null, getAllMeasurements(getHeight));
|
|
678
|
+
},
|
|
679
|
+
grow: function growHeight() {
|
|
680
|
+
return getHeight.max() // Run max without the forced downsizing
|
|
681
|
+
;
|
|
682
|
+
},
|
|
683
|
+
lowestElement: function getBestHeight() {
|
|
684
|
+
return Math.max(getHeight.bodyOffset() || getHeight.documentElementOffset(), getMaxElement('bottom', getAllElements()));
|
|
685
|
+
},
|
|
686
|
+
taggedElement: function getTaggedElementsHeight() {
|
|
687
|
+
return getTaggedElements('bottom', 'data-iframe-height');
|
|
688
|
+
}
|
|
689
|
+
}, getWidth = {
|
|
690
|
+
bodyScroll: function getBodyScrollWidth() {
|
|
691
|
+
return document.body.scrollWidth;
|
|
692
|
+
},
|
|
693
|
+
bodyOffset: function getBodyOffsetWidth() {
|
|
694
|
+
return document.body.offsetWidth;
|
|
695
|
+
},
|
|
696
|
+
custom: function getCustomWidth() {
|
|
697
|
+
return customCalcMethods.width();
|
|
698
|
+
},
|
|
699
|
+
documentElementScroll: function getDEScrollWidth() {
|
|
700
|
+
return document.documentElement.scrollWidth;
|
|
701
|
+
},
|
|
702
|
+
documentElementOffset: function getDEOffsetWidth() {
|
|
703
|
+
return document.documentElement.offsetWidth;
|
|
704
|
+
},
|
|
705
|
+
scroll: function getMaxWidth() {
|
|
706
|
+
return Math.max(getWidth.bodyScroll(), getWidth.documentElementScroll());
|
|
707
|
+
},
|
|
708
|
+
max: function getMaxWidth() {
|
|
709
|
+
return Math.max.apply(null, getAllMeasurements(getWidth));
|
|
710
|
+
},
|
|
711
|
+
min: function getMinWidth() {
|
|
712
|
+
return Math.min.apply(null, getAllMeasurements(getWidth));
|
|
713
|
+
},
|
|
714
|
+
rightMostElement: function rightMostElement() {
|
|
715
|
+
return getMaxElement('right', getAllElements());
|
|
716
|
+
},
|
|
717
|
+
taggedElement: function getTaggedElementsWidth() {
|
|
718
|
+
return getTaggedElements('right', 'data-iframe-width');
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
function sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth) {
|
|
722
|
+
function resizeIFrame() {
|
|
723
|
+
height = currentHeight;
|
|
724
|
+
width = currentWidth;
|
|
725
|
+
sendMsg(height, width, triggerEvent);
|
|
726
|
+
}
|
|
727
|
+
function isSizeChangeDetected() {
|
|
728
|
+
function checkTolarance(a, b) {
|
|
729
|
+
var retVal = Math.abs(a - b) <= tolerance;
|
|
730
|
+
return !retVal;
|
|
731
|
+
}
|
|
732
|
+
currentHeight = undefined === customHeight ? getHeight[heightCalcMode]() : customHeight;
|
|
733
|
+
currentWidth = undefined === customWidth ? getWidth[widthCalcMode]() : customWidth;
|
|
734
|
+
return checkTolarance(height, currentHeight) || calculateWidth && checkTolarance(width, currentWidth);
|
|
735
|
+
}
|
|
736
|
+
function isForceResizableEvent() {
|
|
737
|
+
return !(triggerEvent in {
|
|
738
|
+
init: 1,
|
|
739
|
+
interval: 1,
|
|
740
|
+
size: 1
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
function isForceResizableCalcMode() {
|
|
744
|
+
return heightCalcMode in resetRequiredMethods || calculateWidth && widthCalcMode in resetRequiredMethods;
|
|
745
|
+
}
|
|
746
|
+
function logIgnored() {
|
|
747
|
+
log('No change in size detected');
|
|
748
|
+
}
|
|
749
|
+
function checkDownSizing() {
|
|
750
|
+
if (isForceResizableEvent() && isForceResizableCalcMode()) resetIFrame(triggerEventDesc);
|
|
751
|
+
else if (!(triggerEvent in {
|
|
752
|
+
interval: 1
|
|
753
|
+
})) logIgnored();
|
|
754
|
+
}
|
|
755
|
+
var currentHeight, currentWidth;
|
|
756
|
+
if (isSizeChangeDetected() || 'init' === triggerEvent) {
|
|
757
|
+
lockTrigger();
|
|
758
|
+
resizeIFrame();
|
|
759
|
+
} else checkDownSizing();
|
|
760
|
+
}
|
|
761
|
+
var sizeIFrameThrottled = throttle(sizeIFrame);
|
|
762
|
+
function sendSize(triggerEvent, triggerEventDesc, customHeight, customWidth) {
|
|
763
|
+
function recordTrigger() {
|
|
764
|
+
if (!(triggerEvent in {
|
|
765
|
+
reset: 1,
|
|
766
|
+
resetPage: 1,
|
|
767
|
+
init: 1
|
|
768
|
+
})) log('Trigger event: ' + triggerEventDesc);
|
|
769
|
+
}
|
|
770
|
+
function isDoubleFiredEvent() {
|
|
771
|
+
return triggerLocked && triggerEvent in doubleEventList;
|
|
772
|
+
}
|
|
773
|
+
if (isDoubleFiredEvent()) log('Trigger event cancelled: ' + triggerEvent);
|
|
774
|
+
else {
|
|
775
|
+
recordTrigger();
|
|
776
|
+
if (triggerEvent === 'init') sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth);
|
|
777
|
+
else sizeIFrameThrottled(triggerEvent, triggerEventDesc, customHeight, customWidth);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
function lockTrigger() {
|
|
781
|
+
if (!triggerLocked) {
|
|
782
|
+
triggerLocked = true;
|
|
783
|
+
log('Trigger event lock on');
|
|
784
|
+
}
|
|
785
|
+
clearTimeout(triggerLockedTimer);
|
|
786
|
+
triggerLockedTimer = setTimeout(function() {
|
|
787
|
+
triggerLocked = false;
|
|
788
|
+
log('Trigger event lock off');
|
|
789
|
+
log('--');
|
|
790
|
+
}, eventCancelTimer);
|
|
791
|
+
}
|
|
792
|
+
function triggerReset(triggerEvent) {
|
|
793
|
+
height = getHeight[heightCalcMode]();
|
|
794
|
+
width = getWidth[widthCalcMode]();
|
|
795
|
+
sendMsg(height, width, triggerEvent);
|
|
796
|
+
}
|
|
797
|
+
function resetIFrame(triggerEventDesc) {
|
|
798
|
+
var hcm = heightCalcMode;
|
|
799
|
+
heightCalcMode = heightCalcModeDefault;
|
|
800
|
+
log('Reset trigger event: ' + triggerEventDesc);
|
|
801
|
+
lockTrigger();
|
|
802
|
+
triggerReset('reset');
|
|
803
|
+
heightCalcMode = hcm;
|
|
804
|
+
}
|
|
805
|
+
function sendMsg(height, width, triggerEvent, msg, targetOrigin) {
|
|
806
|
+
function setTargetOrigin() {
|
|
807
|
+
if (undefined === targetOrigin) targetOrigin = targetOriginDefault;
|
|
808
|
+
else log('Message targetOrigin: ' + targetOrigin);
|
|
809
|
+
}
|
|
810
|
+
function sendToParent() {
|
|
811
|
+
var size = height + ':' + width, message = myID + ':' + size + ':' + triggerEvent + (undefined === msg ? '' : ':' + msg);
|
|
812
|
+
log('Sending message to host page (' + message + ')');
|
|
813
|
+
target.postMessage(msgID + message, targetOrigin);
|
|
814
|
+
}
|
|
815
|
+
if (true === sendPermit) {
|
|
816
|
+
setTargetOrigin();
|
|
817
|
+
sendToParent();
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
function receiver(event) {
|
|
821
|
+
var processRequestFromParent = {
|
|
822
|
+
init: function initFromParent() {
|
|
823
|
+
initMsg = event.data;
|
|
824
|
+
target = event.source;
|
|
825
|
+
init();
|
|
826
|
+
firstRun = false;
|
|
827
|
+
setTimeout(function() {
|
|
828
|
+
initLock = false;
|
|
829
|
+
}, eventCancelTimer);
|
|
830
|
+
},
|
|
831
|
+
reset: function resetFromParent() {
|
|
832
|
+
if (initLock) log('Page reset ignored by init');
|
|
833
|
+
else {
|
|
834
|
+
log('Page size reset by host page');
|
|
835
|
+
triggerReset('resetPage');
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
resize: function resizeFromParent() {
|
|
839
|
+
sendSize('resizeParent', 'Parent window requested size check');
|
|
840
|
+
},
|
|
841
|
+
moveToAnchor: function moveToAnchorF() {
|
|
842
|
+
inPageLinks.findTarget(getData());
|
|
843
|
+
},
|
|
844
|
+
inPageLink: function inPageLinkF() {
|
|
845
|
+
this.moveToAnchor();
|
|
846
|
+
},
|
|
847
|
+
pageInfo: function pageInfoFromParent() {
|
|
848
|
+
var msgBody = getData();
|
|
849
|
+
log('PageInfoFromParent called from parent: ' + msgBody);
|
|
850
|
+
onPageInfo(JSON.parse(msgBody));
|
|
851
|
+
log(' --');
|
|
852
|
+
},
|
|
853
|
+
message: function messageFromParent() {
|
|
854
|
+
var msgBody = getData();
|
|
855
|
+
log('onMessage called from parent: ' + msgBody);
|
|
856
|
+
// eslint-disable-next-line sonarjs/no-extra-arguments
|
|
857
|
+
onMessage(JSON.parse(msgBody));
|
|
858
|
+
log(' --');
|
|
859
|
+
}
|
|
860
|
+
};
|
|
861
|
+
function isMessageForUs() {
|
|
862
|
+
return msgID === ('' + event.data).slice(0, msgIdLen) // ''+ Protects against non-string messages
|
|
863
|
+
;
|
|
864
|
+
}
|
|
865
|
+
function getMessageType() {
|
|
866
|
+
return event.data.split(']')[1].split(':')[0];
|
|
867
|
+
}
|
|
868
|
+
function getData() {
|
|
869
|
+
return event.data.slice(event.data.indexOf(':') + 1);
|
|
870
|
+
}
|
|
871
|
+
function isMiddleTier() {
|
|
872
|
+
return !$b2e1fd3e30ab1f5c$exports && 'iFrameResize' in window || window.jQuery !== undefined && 'iFrameResize' in window.jQuery.prototype;
|
|
873
|
+
}
|
|
874
|
+
function isInitMsg() {
|
|
875
|
+
// Test if this message is from a child below us. This is an ugly test, however, updating
|
|
876
|
+
// the message format would break backwards compatibility.
|
|
877
|
+
return event.data.split(':')[2] in {
|
|
878
|
+
true: 1,
|
|
879
|
+
false: 1
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
function callFromParent() {
|
|
883
|
+
var messageType = getMessageType();
|
|
884
|
+
if (messageType in processRequestFromParent) processRequestFromParent[messageType]();
|
|
885
|
+
else if (!isMiddleTier() && !isInitMsg()) warn('Unexpected message (' + event.data + ')');
|
|
886
|
+
}
|
|
887
|
+
function processMessage() {
|
|
888
|
+
if (false === firstRun) callFromParent();
|
|
889
|
+
else if (isInitMsg()) processRequestFromParent.init();
|
|
890
|
+
else log('Ignored message of type "' + getMessageType() + '". Received before initialization.');
|
|
891
|
+
}
|
|
892
|
+
if (isMessageForUs()) processMessage();
|
|
893
|
+
}
|
|
894
|
+
// Normally the parent kicks things off when it detects the iFrame has loaded.
|
|
895
|
+
// If this script is async-loaded, then tell parent page to retry init.
|
|
896
|
+
function chkLateLoaded() {
|
|
897
|
+
if ('loading' !== document.readyState) window.parent.postMessage('[iFrameResizerChild]Ready', '*');
|
|
898
|
+
}
|
|
899
|
+
// Setup if not already running
|
|
900
|
+
if (!('iframeResizer' in window)) {
|
|
901
|
+
window.iframeChildListener = function(data) {
|
|
902
|
+
receiver({
|
|
903
|
+
data: data,
|
|
904
|
+
sameDomian: true
|
|
905
|
+
});
|
|
906
|
+
};
|
|
907
|
+
addEventListener(window, 'message', receiver);
|
|
908
|
+
addEventListener(window, 'readystatechange', chkLateLoaded);
|
|
909
|
+
chkLateLoaded();
|
|
910
|
+
}
|
|
911
|
+
})();
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
})();
|
|
916
|
+
//# sourceMappingURL=iframe.js.map
|