CatPtain commited on
Commit
45e5708
·
verified ·
1 Parent(s): 4aaaa07

Upload 152 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. libs/aos/aos.css +1 -0
  2. libs/aos/aos.js +1 -0
  3. libs/autocomplete/autocomplete.gif +0 -0
  4. libs/autocomplete/jquery.autocomplete.js +334 -0
  5. libs/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css +10 -0
  6. libs/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +1 -0
  7. libs/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js +10 -0
  8. libs/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js.map +0 -0
  9. libs/builder/blocks-bootstrap4.js +1244 -0
  10. libs/builder/builder.js +0 -0
  11. libs/builder/components-bootstrap4.js +2458 -0
  12. libs/builder/components-bootstrap5.js +1029 -0
  13. libs/builder/components-common.js +1135 -0
  14. libs/builder/components-elements.js +1428 -0
  15. libs/builder/components-embeds.js +92 -0
  16. libs/builder/components-html.js +1459 -0
  17. libs/builder/components-server.js +432 -0
  18. libs/builder/components-widgets.js +839 -0
  19. libs/builder/icons/accordion.svg +109 -0
  20. libs/builder/icons/alert.svg +1 -0
  21. libs/builder/icons/archives.svg +1 -0
  22. libs/builder/icons/arrow-down.svg +62 -0
  23. libs/builder/icons/arrow-right.svg +62 -0
  24. libs/builder/icons/audio.svg +1 -0
  25. libs/builder/icons/badge.svg +81 -0
  26. libs/builder/icons/bell.svg +1 -0
  27. libs/builder/icons/blockquote.svg +1 -0
  28. libs/builder/icons/breadcrumbs.svg +77 -0
  29. libs/builder/icons/button.svg +78 -0
  30. libs/builder/icons/button_group.svg +81 -0
  31. libs/builder/icons/button_toolbar.svg +87 -0
  32. libs/builder/icons/calendar.svg +79 -0
  33. libs/builder/icons/carousel.svg +3 -0
  34. libs/builder/icons/cart.svg +62 -0
  35. libs/builder/icons/categories.svg +1 -0
  36. libs/builder/icons/chart.svg +1 -0
  37. libs/builder/icons/checkbox.svg +1 -0
  38. libs/builder/icons/checkout.svg +3 -0
  39. libs/builder/icons/chevron-down.svg +67 -0
  40. libs/builder/icons/chevron-right.svg +67 -0
  41. libs/builder/icons/code.svg +1 -0
  42. libs/builder/icons/components/cart.svg +16 -0
  43. libs/builder/icons/components/checkbox.svg +1 -0
  44. libs/builder/icons/components/contact-form.svg +13 -0
  45. libs/builder/icons/components/map.svg +12 -0
  46. libs/builder/icons/container.svg +1 -0
  47. libs/builder/icons/currency.svg +1 -0
  48. libs/builder/icons/dots_three.svg +1 -0
  49. libs/builder/icons/envelope.svg +52 -0
  50. libs/builder/icons/facebook.svg +1 -0
libs/aos/aos.css ADDED
@@ -0,0 +1 @@
 
 
1
+ [data-aos][data-aos][data-aos-duration="50"],body[data-aos-duration="50"] [data-aos]{transition-duration:50ms}[data-aos][data-aos][data-aos-delay="50"],body[data-aos-delay="50"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="50"].aos-animate,body[data-aos-delay="50"] [data-aos].aos-animate{transition-delay:50ms}[data-aos][data-aos][data-aos-duration="100"],body[data-aos-duration="100"] [data-aos]{transition-duration:.1s}[data-aos][data-aos][data-aos-delay="100"],body[data-aos-delay="100"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="100"].aos-animate,body[data-aos-delay="100"] [data-aos].aos-animate{transition-delay:.1s}[data-aos][data-aos][data-aos-duration="150"],body[data-aos-duration="150"] [data-aos]{transition-duration:.15s}[data-aos][data-aos][data-aos-delay="150"],body[data-aos-delay="150"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="150"].aos-animate,body[data-aos-delay="150"] [data-aos].aos-animate{transition-delay:.15s}[data-aos][data-aos][data-aos-duration="200"],body[data-aos-duration="200"] [data-aos]{transition-duration:.2s}[data-aos][data-aos][data-aos-delay="200"],body[data-aos-delay="200"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="200"].aos-animate,body[data-aos-delay="200"] [data-aos].aos-animate{transition-delay:.2s}[data-aos][data-aos][data-aos-duration="250"],body[data-aos-duration="250"] [data-aos]{transition-duration:.25s}[data-aos][data-aos][data-aos-delay="250"],body[data-aos-delay="250"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="250"].aos-animate,body[data-aos-delay="250"] [data-aos].aos-animate{transition-delay:.25s}[data-aos][data-aos][data-aos-duration="300"],body[data-aos-duration="300"] [data-aos]{transition-duration:.3s}[data-aos][data-aos][data-aos-delay="300"],body[data-aos-delay="300"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="300"].aos-animate,body[data-aos-delay="300"] [data-aos].aos-animate{transition-delay:.3s}[data-aos][data-aos][data-aos-duration="350"],body[data-aos-duration="350"] [data-aos]{transition-duration:.35s}[data-aos][data-aos][data-aos-delay="350"],body[data-aos-delay="350"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="350"].aos-animate,body[data-aos-delay="350"] [data-aos].aos-animate{transition-delay:.35s}[data-aos][data-aos][data-aos-duration="400"],body[data-aos-duration="400"] [data-aos]{transition-duration:.4s}[data-aos][data-aos][data-aos-delay="400"],body[data-aos-delay="400"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="400"].aos-animate,body[data-aos-delay="400"] [data-aos].aos-animate{transition-delay:.4s}[data-aos][data-aos][data-aos-duration="450"],body[data-aos-duration="450"] [data-aos]{transition-duration:.45s}[data-aos][data-aos][data-aos-delay="450"],body[data-aos-delay="450"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="450"].aos-animate,body[data-aos-delay="450"] [data-aos].aos-animate{transition-delay:.45s}[data-aos][data-aos][data-aos-duration="500"],body[data-aos-duration="500"] [data-aos]{transition-duration:.5s}[data-aos][data-aos][data-aos-delay="500"],body[data-aos-delay="500"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="500"].aos-animate,body[data-aos-delay="500"] [data-aos].aos-animate{transition-delay:.5s}[data-aos][data-aos][data-aos-duration="550"],body[data-aos-duration="550"] [data-aos]{transition-duration:.55s}[data-aos][data-aos][data-aos-delay="550"],body[data-aos-delay="550"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="550"].aos-animate,body[data-aos-delay="550"] [data-aos].aos-animate{transition-delay:.55s}[data-aos][data-aos][data-aos-duration="600"],body[data-aos-duration="600"] [data-aos]{transition-duration:.6s}[data-aos][data-aos][data-aos-delay="600"],body[data-aos-delay="600"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="600"].aos-animate,body[data-aos-delay="600"] [data-aos].aos-animate{transition-delay:.6s}[data-aos][data-aos][data-aos-duration="650"],body[data-aos-duration="650"] [data-aos]{transition-duration:.65s}[data-aos][data-aos][data-aos-delay="650"],body[data-aos-delay="650"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="650"].aos-animate,body[data-aos-delay="650"] [data-aos].aos-animate{transition-delay:.65s}[data-aos][data-aos][data-aos-duration="700"],body[data-aos-duration="700"] [data-aos]{transition-duration:.7s}[data-aos][data-aos][data-aos-delay="700"],body[data-aos-delay="700"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="700"].aos-animate,body[data-aos-delay="700"] [data-aos].aos-animate{transition-delay:.7s}[data-aos][data-aos][data-aos-duration="750"],body[data-aos-duration="750"] [data-aos]{transition-duration:.75s}[data-aos][data-aos][data-aos-delay="750"],body[data-aos-delay="750"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="750"].aos-animate,body[data-aos-delay="750"] [data-aos].aos-animate{transition-delay:.75s}[data-aos][data-aos][data-aos-duration="800"],body[data-aos-duration="800"] [data-aos]{transition-duration:.8s}[data-aos][data-aos][data-aos-delay="800"],body[data-aos-delay="800"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="800"].aos-animate,body[data-aos-delay="800"] [data-aos].aos-animate{transition-delay:.8s}[data-aos][data-aos][data-aos-duration="850"],body[data-aos-duration="850"] [data-aos]{transition-duration:.85s}[data-aos][data-aos][data-aos-delay="850"],body[data-aos-delay="850"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="850"].aos-animate,body[data-aos-delay="850"] [data-aos].aos-animate{transition-delay:.85s}[data-aos][data-aos][data-aos-duration="900"],body[data-aos-duration="900"] [data-aos]{transition-duration:.9s}[data-aos][data-aos][data-aos-delay="900"],body[data-aos-delay="900"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="900"].aos-animate,body[data-aos-delay="900"] [data-aos].aos-animate{transition-delay:.9s}[data-aos][data-aos][data-aos-duration="950"],body[data-aos-duration="950"] [data-aos]{transition-duration:.95s}[data-aos][data-aos][data-aos-delay="950"],body[data-aos-delay="950"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="950"].aos-animate,body[data-aos-delay="950"] [data-aos].aos-animate{transition-delay:.95s}[data-aos][data-aos][data-aos-duration="1000"],body[data-aos-duration="1000"] [data-aos]{transition-duration:1s}[data-aos][data-aos][data-aos-delay="1000"],body[data-aos-delay="1000"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1000"].aos-animate,body[data-aos-delay="1000"] [data-aos].aos-animate{transition-delay:1s}[data-aos][data-aos][data-aos-duration="1050"],body[data-aos-duration="1050"] [data-aos]{transition-duration:1.05s}[data-aos][data-aos][data-aos-delay="1050"],body[data-aos-delay="1050"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1050"].aos-animate,body[data-aos-delay="1050"] [data-aos].aos-animate{transition-delay:1.05s}[data-aos][data-aos][data-aos-duration="1100"],body[data-aos-duration="1100"] [data-aos]{transition-duration:1.1s}[data-aos][data-aos][data-aos-delay="1100"],body[data-aos-delay="1100"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1100"].aos-animate,body[data-aos-delay="1100"] [data-aos].aos-animate{transition-delay:1.1s}[data-aos][data-aos][data-aos-duration="1150"],body[data-aos-duration="1150"] [data-aos]{transition-duration:1.15s}[data-aos][data-aos][data-aos-delay="1150"],body[data-aos-delay="1150"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1150"].aos-animate,body[data-aos-delay="1150"] [data-aos].aos-animate{transition-delay:1.15s}[data-aos][data-aos][data-aos-duration="1200"],body[data-aos-duration="1200"] [data-aos]{transition-duration:1.2s}[data-aos][data-aos][data-aos-delay="1200"],body[data-aos-delay="1200"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1200"].aos-animate,body[data-aos-delay="1200"] [data-aos].aos-animate{transition-delay:1.2s}[data-aos][data-aos][data-aos-duration="1250"],body[data-aos-duration="1250"] [data-aos]{transition-duration:1.25s}[data-aos][data-aos][data-aos-delay="1250"],body[data-aos-delay="1250"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1250"].aos-animate,body[data-aos-delay="1250"] [data-aos].aos-animate{transition-delay:1.25s}[data-aos][data-aos][data-aos-duration="1300"],body[data-aos-duration="1300"] [data-aos]{transition-duration:1.3s}[data-aos][data-aos][data-aos-delay="1300"],body[data-aos-delay="1300"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1300"].aos-animate,body[data-aos-delay="1300"] [data-aos].aos-animate{transition-delay:1.3s}[data-aos][data-aos][data-aos-duration="1350"],body[data-aos-duration="1350"] [data-aos]{transition-duration:1.35s}[data-aos][data-aos][data-aos-delay="1350"],body[data-aos-delay="1350"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1350"].aos-animate,body[data-aos-delay="1350"] [data-aos].aos-animate{transition-delay:1.35s}[data-aos][data-aos][data-aos-duration="1400"],body[data-aos-duration="1400"] [data-aos]{transition-duration:1.4s}[data-aos][data-aos][data-aos-delay="1400"],body[data-aos-delay="1400"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1400"].aos-animate,body[data-aos-delay="1400"] [data-aos].aos-animate{transition-delay:1.4s}[data-aos][data-aos][data-aos-duration="1450"],body[data-aos-duration="1450"] [data-aos]{transition-duration:1.45s}[data-aos][data-aos][data-aos-delay="1450"],body[data-aos-delay="1450"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1450"].aos-animate,body[data-aos-delay="1450"] [data-aos].aos-animate{transition-delay:1.45s}[data-aos][data-aos][data-aos-duration="1500"],body[data-aos-duration="1500"] [data-aos]{transition-duration:1.5s}[data-aos][data-aos][data-aos-delay="1500"],body[data-aos-delay="1500"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1500"].aos-animate,body[data-aos-delay="1500"] [data-aos].aos-animate{transition-delay:1.5s}[data-aos][data-aos][data-aos-duration="1550"],body[data-aos-duration="1550"] [data-aos]{transition-duration:1.55s}[data-aos][data-aos][data-aos-delay="1550"],body[data-aos-delay="1550"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1550"].aos-animate,body[data-aos-delay="1550"] [data-aos].aos-animate{transition-delay:1.55s}[data-aos][data-aos][data-aos-duration="1600"],body[data-aos-duration="1600"] [data-aos]{transition-duration:1.6s}[data-aos][data-aos][data-aos-delay="1600"],body[data-aos-delay="1600"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1600"].aos-animate,body[data-aos-delay="1600"] [data-aos].aos-animate{transition-delay:1.6s}[data-aos][data-aos][data-aos-duration="1650"],body[data-aos-duration="1650"] [data-aos]{transition-duration:1.65s}[data-aos][data-aos][data-aos-delay="1650"],body[data-aos-delay="1650"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1650"].aos-animate,body[data-aos-delay="1650"] [data-aos].aos-animate{transition-delay:1.65s}[data-aos][data-aos][data-aos-duration="1700"],body[data-aos-duration="1700"] [data-aos]{transition-duration:1.7s}[data-aos][data-aos][data-aos-delay="1700"],body[data-aos-delay="1700"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1700"].aos-animate,body[data-aos-delay="1700"] [data-aos].aos-animate{transition-delay:1.7s}[data-aos][data-aos][data-aos-duration="1750"],body[data-aos-duration="1750"] [data-aos]{transition-duration:1.75s}[data-aos][data-aos][data-aos-delay="1750"],body[data-aos-delay="1750"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1750"].aos-animate,body[data-aos-delay="1750"] [data-aos].aos-animate{transition-delay:1.75s}[data-aos][data-aos][data-aos-duration="1800"],body[data-aos-duration="1800"] [data-aos]{transition-duration:1.8s}[data-aos][data-aos][data-aos-delay="1800"],body[data-aos-delay="1800"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1800"].aos-animate,body[data-aos-delay="1800"] [data-aos].aos-animate{transition-delay:1.8s}[data-aos][data-aos][data-aos-duration="1850"],body[data-aos-duration="1850"] [data-aos]{transition-duration:1.85s}[data-aos][data-aos][data-aos-delay="1850"],body[data-aos-delay="1850"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1850"].aos-animate,body[data-aos-delay="1850"] [data-aos].aos-animate{transition-delay:1.85s}[data-aos][data-aos][data-aos-duration="1900"],body[data-aos-duration="1900"] [data-aos]{transition-duration:1.9s}[data-aos][data-aos][data-aos-delay="1900"],body[data-aos-delay="1900"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1900"].aos-animate,body[data-aos-delay="1900"] [data-aos].aos-animate{transition-delay:1.9s}[data-aos][data-aos][data-aos-duration="1950"],body[data-aos-duration="1950"] [data-aos]{transition-duration:1.95s}[data-aos][data-aos][data-aos-delay="1950"],body[data-aos-delay="1950"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="1950"].aos-animate,body[data-aos-delay="1950"] [data-aos].aos-animate{transition-delay:1.95s}[data-aos][data-aos][data-aos-duration="2000"],body[data-aos-duration="2000"] [data-aos]{transition-duration:2s}[data-aos][data-aos][data-aos-delay="2000"],body[data-aos-delay="2000"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2000"].aos-animate,body[data-aos-delay="2000"] [data-aos].aos-animate{transition-delay:2s}[data-aos][data-aos][data-aos-duration="2050"],body[data-aos-duration="2050"] [data-aos]{transition-duration:2.05s}[data-aos][data-aos][data-aos-delay="2050"],body[data-aos-delay="2050"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2050"].aos-animate,body[data-aos-delay="2050"] [data-aos].aos-animate{transition-delay:2.05s}[data-aos][data-aos][data-aos-duration="2100"],body[data-aos-duration="2100"] [data-aos]{transition-duration:2.1s}[data-aos][data-aos][data-aos-delay="2100"],body[data-aos-delay="2100"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2100"].aos-animate,body[data-aos-delay="2100"] [data-aos].aos-animate{transition-delay:2.1s}[data-aos][data-aos][data-aos-duration="2150"],body[data-aos-duration="2150"] [data-aos]{transition-duration:2.15s}[data-aos][data-aos][data-aos-delay="2150"],body[data-aos-delay="2150"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2150"].aos-animate,body[data-aos-delay="2150"] [data-aos].aos-animate{transition-delay:2.15s}[data-aos][data-aos][data-aos-duration="2200"],body[data-aos-duration="2200"] [data-aos]{transition-duration:2.2s}[data-aos][data-aos][data-aos-delay="2200"],body[data-aos-delay="2200"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2200"].aos-animate,body[data-aos-delay="2200"] [data-aos].aos-animate{transition-delay:2.2s}[data-aos][data-aos][data-aos-duration="2250"],body[data-aos-duration="2250"] [data-aos]{transition-duration:2.25s}[data-aos][data-aos][data-aos-delay="2250"],body[data-aos-delay="2250"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2250"].aos-animate,body[data-aos-delay="2250"] [data-aos].aos-animate{transition-delay:2.25s}[data-aos][data-aos][data-aos-duration="2300"],body[data-aos-duration="2300"] [data-aos]{transition-duration:2.3s}[data-aos][data-aos][data-aos-delay="2300"],body[data-aos-delay="2300"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2300"].aos-animate,body[data-aos-delay="2300"] [data-aos].aos-animate{transition-delay:2.3s}[data-aos][data-aos][data-aos-duration="2350"],body[data-aos-duration="2350"] [data-aos]{transition-duration:2.35s}[data-aos][data-aos][data-aos-delay="2350"],body[data-aos-delay="2350"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2350"].aos-animate,body[data-aos-delay="2350"] [data-aos].aos-animate{transition-delay:2.35s}[data-aos][data-aos][data-aos-duration="2400"],body[data-aos-duration="2400"] [data-aos]{transition-duration:2.4s}[data-aos][data-aos][data-aos-delay="2400"],body[data-aos-delay="2400"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2400"].aos-animate,body[data-aos-delay="2400"] [data-aos].aos-animate{transition-delay:2.4s}[data-aos][data-aos][data-aos-duration="2450"],body[data-aos-duration="2450"] [data-aos]{transition-duration:2.45s}[data-aos][data-aos][data-aos-delay="2450"],body[data-aos-delay="2450"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2450"].aos-animate,body[data-aos-delay="2450"] [data-aos].aos-animate{transition-delay:2.45s}[data-aos][data-aos][data-aos-duration="2500"],body[data-aos-duration="2500"] [data-aos]{transition-duration:2.5s}[data-aos][data-aos][data-aos-delay="2500"],body[data-aos-delay="2500"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2500"].aos-animate,body[data-aos-delay="2500"] [data-aos].aos-animate{transition-delay:2.5s}[data-aos][data-aos][data-aos-duration="2550"],body[data-aos-duration="2550"] [data-aos]{transition-duration:2.55s}[data-aos][data-aos][data-aos-delay="2550"],body[data-aos-delay="2550"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2550"].aos-animate,body[data-aos-delay="2550"] [data-aos].aos-animate{transition-delay:2.55s}[data-aos][data-aos][data-aos-duration="2600"],body[data-aos-duration="2600"] [data-aos]{transition-duration:2.6s}[data-aos][data-aos][data-aos-delay="2600"],body[data-aos-delay="2600"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2600"].aos-animate,body[data-aos-delay="2600"] [data-aos].aos-animate{transition-delay:2.6s}[data-aos][data-aos][data-aos-duration="2650"],body[data-aos-duration="2650"] [data-aos]{transition-duration:2.65s}[data-aos][data-aos][data-aos-delay="2650"],body[data-aos-delay="2650"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2650"].aos-animate,body[data-aos-delay="2650"] [data-aos].aos-animate{transition-delay:2.65s}[data-aos][data-aos][data-aos-duration="2700"],body[data-aos-duration="2700"] [data-aos]{transition-duration:2.7s}[data-aos][data-aos][data-aos-delay="2700"],body[data-aos-delay="2700"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2700"].aos-animate,body[data-aos-delay="2700"] [data-aos].aos-animate{transition-delay:2.7s}[data-aos][data-aos][data-aos-duration="2750"],body[data-aos-duration="2750"] [data-aos]{transition-duration:2.75s}[data-aos][data-aos][data-aos-delay="2750"],body[data-aos-delay="2750"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2750"].aos-animate,body[data-aos-delay="2750"] [data-aos].aos-animate{transition-delay:2.75s}[data-aos][data-aos][data-aos-duration="2800"],body[data-aos-duration="2800"] [data-aos]{transition-duration:2.8s}[data-aos][data-aos][data-aos-delay="2800"],body[data-aos-delay="2800"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2800"].aos-animate,body[data-aos-delay="2800"] [data-aos].aos-animate{transition-delay:2.8s}[data-aos][data-aos][data-aos-duration="2850"],body[data-aos-duration="2850"] [data-aos]{transition-duration:2.85s}[data-aos][data-aos][data-aos-delay="2850"],body[data-aos-delay="2850"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2850"].aos-animate,body[data-aos-delay="2850"] [data-aos].aos-animate{transition-delay:2.85s}[data-aos][data-aos][data-aos-duration="2900"],body[data-aos-duration="2900"] [data-aos]{transition-duration:2.9s}[data-aos][data-aos][data-aos-delay="2900"],body[data-aos-delay="2900"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2900"].aos-animate,body[data-aos-delay="2900"] [data-aos].aos-animate{transition-delay:2.9s}[data-aos][data-aos][data-aos-duration="2950"],body[data-aos-duration="2950"] [data-aos]{transition-duration:2.95s}[data-aos][data-aos][data-aos-delay="2950"],body[data-aos-delay="2950"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="2950"].aos-animate,body[data-aos-delay="2950"] [data-aos].aos-animate{transition-delay:2.95s}[data-aos][data-aos][data-aos-duration="3000"],body[data-aos-duration="3000"] [data-aos]{transition-duration:3s}[data-aos][data-aos][data-aos-delay="3000"],body[data-aos-delay="3000"] [data-aos]{transition-delay:0s}[data-aos][data-aos][data-aos-delay="3000"].aos-animate,body[data-aos-delay="3000"] [data-aos].aos-animate{transition-delay:3s}[data-aos]{pointer-events:none}[data-aos].aos-animate{pointer-events:auto}[data-aos][data-aos][data-aos-easing=linear],body[data-aos-easing=linear] [data-aos]{transition-timing-function:cubic-bezier(.25,.25,.75,.75)}[data-aos][data-aos][data-aos-easing=ease],body[data-aos-easing=ease] [data-aos]{transition-timing-function:ease}[data-aos][data-aos][data-aos-easing=ease-in],body[data-aos-easing=ease-in] [data-aos]{transition-timing-function:ease-in}[data-aos][data-aos][data-aos-easing=ease-out],body[data-aos-easing=ease-out] [data-aos]{transition-timing-function:ease-out}[data-aos][data-aos][data-aos-easing=ease-in-out],body[data-aos-easing=ease-in-out] [data-aos]{transition-timing-function:ease-in-out}[data-aos][data-aos][data-aos-easing=ease-in-back],body[data-aos-easing=ease-in-back] [data-aos]{transition-timing-function:cubic-bezier(.6,-.28,.735,.045)}[data-aos][data-aos][data-aos-easing=ease-out-back],body[data-aos-easing=ease-out-back] [data-aos]{transition-timing-function:cubic-bezier(.175,.885,.32,1.275)}[data-aos][data-aos][data-aos-easing=ease-in-out-back],body[data-aos-easing=ease-in-out-back] [data-aos]{transition-timing-function:cubic-bezier(.68,-.55,.265,1.55)}[data-aos][data-aos][data-aos-easing=ease-in-sine],body[data-aos-easing=ease-in-sine] [data-aos]{transition-timing-function:cubic-bezier(.47,0,.745,.715)}[data-aos][data-aos][data-aos-easing=ease-out-sine],body[data-aos-easing=ease-out-sine] [data-aos]{transition-timing-function:cubic-bezier(.39,.575,.565,1)}[data-aos][data-aos][data-aos-easing=ease-in-out-sine],body[data-aos-easing=ease-in-out-sine] [data-aos]{transition-timing-function:cubic-bezier(.445,.05,.55,.95)}[data-aos][data-aos][data-aos-easing=ease-in-quad],body[data-aos-easing=ease-in-quad] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-quad],body[data-aos-easing=ease-out-quad] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-quad],body[data-aos-easing=ease-in-out-quad] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos][data-aos][data-aos-easing=ease-in-cubic],body[data-aos-easing=ease-in-cubic] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-cubic],body[data-aos-easing=ease-out-cubic] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-cubic],body[data-aos-easing=ease-in-out-cubic] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos][data-aos][data-aos-easing=ease-in-quart],body[data-aos-easing=ease-in-quart] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-quart],body[data-aos-easing=ease-out-quart] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-quart],body[data-aos-easing=ease-in-out-quart] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}@media screen{html:not(.no-js) [data-aos^=fade][data-aos^=fade]{opacity:0;transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}html:not(.no-js) [data-aos^=fade][data-aos^=fade].aos-animate{opacity:1;-webkit-transform:none;transform:none}html:not(.no-js) [data-aos=fade-up]{-webkit-transform:translate3d(0,100px,0);transform:translate3d(0,100px,0)}html:not(.no-js) [data-aos=fade-down]{-webkit-transform:translate3d(0,-100px,0);transform:translate3d(0,-100px,0)}html:not(.no-js) [data-aos=fade-right]{-webkit-transform:translate3d(-100px,0,0);transform:translate3d(-100px,0,0)}html:not(.no-js) [data-aos=fade-left]{-webkit-transform:translate3d(100px,0,0);transform:translate3d(100px,0,0)}html:not(.no-js) [data-aos=fade-up-right]{-webkit-transform:translate3d(-100px,100px,0);transform:translate3d(-100px,100px,0)}html:not(.no-js) [data-aos=fade-up-left]{-webkit-transform:translate3d(100px,100px,0);transform:translate3d(100px,100px,0)}html:not(.no-js) [data-aos=fade-down-right]{-webkit-transform:translate3d(-100px,-100px,0);transform:translate3d(-100px,-100px,0)}html:not(.no-js) [data-aos=fade-down-left]{-webkit-transform:translate3d(100px,-100px,0);transform:translate3d(100px,-100px,0)}html:not(.no-js) [data-aos^=zoom][data-aos^=zoom]{opacity:0;transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}html:not(.no-js) [data-aos^=zoom][data-aos^=zoom].aos-animate{opacity:1;-webkit-transform:translateZ(0) scale(1);transform:translateZ(0) scale(1)}html:not(.no-js) [data-aos=zoom-in]{-webkit-transform:scale(.6);transform:scale(.6)}html:not(.no-js) [data-aos=zoom-in-up]{-webkit-transform:translate3d(0,100px,0) scale(.6);transform:translate3d(0,100px,0) scale(.6)}html:not(.no-js) [data-aos=zoom-in-down]{-webkit-transform:translate3d(0,-100px,0) scale(.6);transform:translate3d(0,-100px,0) scale(.6)}html:not(.no-js) [data-aos=zoom-in-right]{-webkit-transform:translate3d(-100px,0,0) scale(.6);transform:translate3d(-100px,0,0) scale(.6)}html:not(.no-js) [data-aos=zoom-in-left]{-webkit-transform:translate3d(100px,0,0) scale(.6);transform:translate3d(100px,0,0) scale(.6)}html:not(.no-js) [data-aos=zoom-out]{-webkit-transform:scale(1.2);transform:scale(1.2)}html:not(.no-js) [data-aos=zoom-out-up]{-webkit-transform:translate3d(0,100px,0) scale(1.2);transform:translate3d(0,100px,0) scale(1.2)}html:not(.no-js) [data-aos=zoom-out-down]{-webkit-transform:translate3d(0,-100px,0) scale(1.2);transform:translate3d(0,-100px,0) scale(1.2)}html:not(.no-js) [data-aos=zoom-out-right]{-webkit-transform:translate3d(-100px,0,0) scale(1.2);transform:translate3d(-100px,0,0) scale(1.2)}html:not(.no-js) [data-aos=zoom-out-left]{-webkit-transform:translate3d(100px,0,0) scale(1.2);transform:translate3d(100px,0,0) scale(1.2)}html:not(.no-js) [data-aos^=slide][data-aos^=slide]{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;visibility:hidden}html:not(.no-js) [data-aos^=slide][data-aos^=slide].aos-animate{visibility:visible;-webkit-transform:translateZ(0);transform:translateZ(0)}html:not(.no-js) [data-aos=slide-up]{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}html:not(.no-js) [data-aos=slide-down]{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}html:not(.no-js) [data-aos=slide-right]{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}html:not(.no-js) [data-aos=slide-left]{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}html:not(.no-js) [data-aos^=flip][data-aos^=flip]{-webkit-backface-visibility:hidden;backface-visibility:hidden;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}html:not(.no-js) [data-aos=flip-left]{-webkit-transform:perspective(2500px) rotateY(-100deg);transform:perspective(2500px) rotateY(-100deg)}html:not(.no-js) [data-aos=flip-left].aos-animate{-webkit-transform:perspective(2500px) rotateY(0);transform:perspective(2500px) rotateY(0)}html:not(.no-js) [data-aos=flip-right]{-webkit-transform:perspective(2500px) rotateY(100deg);transform:perspective(2500px) rotateY(100deg)}html:not(.no-js) [data-aos=flip-right].aos-animate{-webkit-transform:perspective(2500px) rotateY(0);transform:perspective(2500px) rotateY(0)}html:not(.no-js) [data-aos=flip-up]{-webkit-transform:perspective(2500px) rotateX(-100deg);transform:perspective(2500px) rotateX(-100deg)}html:not(.no-js) [data-aos=flip-up].aos-animate{-webkit-transform:perspective(2500px) rotateX(0);transform:perspective(2500px) rotateX(0)}html:not(.no-js) [data-aos=flip-down]{-webkit-transform:perspective(2500px) rotateX(100deg);transform:perspective(2500px) rotateX(100deg)}html:not(.no-js) [data-aos=flip-down].aos-animate{-webkit-transform:perspective(2500px) rotateX(0);transform:perspective(2500px) rotateX(0)}}
libs/aos/aos.js ADDED
@@ -0,0 +1 @@
 
 
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.AOS=t()}(this,function(){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t="Expected a function",n=NaN,o="[object Symbol]",i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt,u="object"==typeof e&&e&&e.Object===Object&&e,d="object"==typeof self&&self&&self.Object===Object&&self,l=u||d||Function("return this")(),f=Object.prototype.toString,m=Math.max,p=Math.min,b=function(){return l.Date.now()};function v(e,n,o){var i,a,r,c,s,u,d=0,l=!1,f=!1,v=!0;if("function"!=typeof e)throw new TypeError(t);function y(t){var n=i,o=a;return i=a=void 0,d=t,c=e.apply(o,n)}function h(e){var t=e-u;return void 0===u||t>=n||t<0||f&&e-d>=r}function k(){var e=b();if(h(e))return x(e);s=setTimeout(k,function(e){var t=n-(e-u);return f?p(t,r-(e-d)):t}(e))}function x(e){return s=void 0,v&&i?y(e):(i=a=void 0,c)}function O(){var e=b(),t=h(e);if(i=arguments,a=this,u=e,t){if(void 0===s)return function(e){return d=e,s=setTimeout(k,n),l?y(e):c}(u);if(f)return s=setTimeout(k,n),y(u)}return void 0===s&&(s=setTimeout(k,n)),c}return n=w(n)||0,g(o)&&(l=!!o.leading,r=(f="maxWait"in o)?m(w(o.maxWait)||0,n):r,v="trailing"in o?!!o.trailing:v),O.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=u=a=s=void 0},O.flush=function(){return void 0===s?c:x(b())},O}function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&f.call(e)==o}(e))return n;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var u=r.test(e);return u||c.test(e)?s(e.slice(2),u?2:8):a.test(e)?n:+e}var y=function(e,n,o){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError(t);return g(o)&&(i="leading"in o?!!o.leading:i,a="trailing"in o?!!o.trailing:a),v(e,n,{leading:i,maxWait:n,trailing:a})},h="Expected a function",k=NaN,x="[object Symbol]",O=/^\s+|\s+$/g,j=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,N=/^0o[0-7]+$/i,z=parseInt,C="object"==typeof e&&e&&e.Object===Object&&e,A="object"==typeof self&&self&&self.Object===Object&&self,q=C||A||Function("return this")(),L=Object.prototype.toString,T=Math.max,M=Math.min,S=function(){return q.Date.now()};function D(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&L.call(e)==x}(e))return k;if(D(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=D(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(O,"");var n=E.test(e);return n||N.test(e)?z(e.slice(2),n?2:8):j.test(e)?k:+e}var $=function(e,t,n){var o,i,a,r,c,s,u=0,d=!1,l=!1,f=!0;if("function"!=typeof e)throw new TypeError(h);function m(t){var n=o,a=i;return o=i=void 0,u=t,r=e.apply(a,n)}function p(e){var n=e-s;return void 0===s||n>=t||n<0||l&&e-u>=a}function b(){var e=S();if(p(e))return v(e);c=setTimeout(b,function(e){var n=t-(e-s);return l?M(n,a-(e-u)):n}(e))}function v(e){return c=void 0,f&&o?m(e):(o=i=void 0,r)}function g(){var e=S(),n=p(e);if(o=arguments,i=this,s=e,n){if(void 0===c)return function(e){return u=e,c=setTimeout(b,t),d?m(e):r}(s);if(l)return c=setTimeout(b,t),m(s)}return void 0===c&&(c=setTimeout(b,t)),r}return t=H(t)||0,D(n)&&(d=!!n.leading,a=(l="maxWait"in n)?T(H(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),g.cancel=function(){void 0!==c&&clearTimeout(c),u=0,o=s=i=c=void 0},g.flush=function(){return void 0===c?r:v(S())},g},W=function(){};function P(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),n=Array.prototype.slice.call(e.removedNodes);if(function e(t){var n=void 0,o=void 0;for(n=0;n<t.length;n+=1){if((o=t[n]).dataset&&o.dataset.aos)return!0;if(o.children&&e(o.children))return!0}return!1}(t.concat(n)))return W()})}function Y(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}var _={isSupported:function(){return!!Y()},ready:function(e,t){var n=window.document,o=new(Y())(P);W=t,o.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}},B=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},F=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,G=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,J=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,Q=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;function R(){return navigator.userAgent||navigator.vendor||window.opera||""}var U=new(function(){function e(){B(this,e)}return F(e,[{key:"phone",value:function(){var e=R();return!(!K.test(e)&&!G.test(e.substr(0,4)))}},{key:"mobile",value:function(){var e=R();return!(!J.test(e)&&!Q.test(e.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}},{key:"ie11",value:function(){return"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style}}]),e}()),V=function(e,t){var n=void 0;return U.ie11()?(n=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,{detail:t}):n=new CustomEvent(e,{detail:t}),document.dispatchEvent(n)},X=function(e){return e.forEach(function(e,t){return function(e,t){var n=e.options,o=e.position,i=e.node,a=(e.data,function(){e.animated&&(function(e,t){t&&t.forEach(function(t){return e.classList.remove(t)})}(i,n.animatedClassNames),V("aos:out",i),e.options.id&&V("aos:in:"+e.options.id,i),e.animated=!1)});n.mirror&&t>=o.out&&!n.once?a():t>=o.in?e.animated||(function(e,t){t&&t.forEach(function(t){return e.classList.add(t)})}(i,n.animatedClassNames),V("aos:in",i),e.options.id&&V("aos:in:"+e.options.id,i),e.animated=!0):e.animated&&!n.once&&a()}(e,window.pageYOffset)})},Z=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}},ee=function(e,t,n){var o=e.getAttribute("data-aos-"+t);if(void 0!==o){if("true"===o)return!0;if("false"===o)return!1}return o||n},te=function(e,t){return e.forEach(function(e,n){var o=ee(e.node,"mirror",t.mirror),i=ee(e.node,"once",t.once),a=ee(e.node,"id"),r=t.useClassNames&&e.node.getAttribute("data-aos"),c=[t.animatedClassName].concat(r?r.split(" "):[]).filter(function(e){return"string"==typeof e});t.initClassName&&e.node.classList.add(t.initClassName),e.position={in:function(e,t,n){var o=window.innerHeight,i=ee(e,"anchor"),a=ee(e,"anchor-placement"),r=Number(ee(e,"offset",a?0:t)),c=a||n,s=e;i&&document.querySelectorAll(i)&&(s=document.querySelectorAll(i)[0]);var u=Z(s).top-o;switch(c){case"top-bottom":break;case"center-bottom":u+=s.offsetHeight/2;break;case"bottom-bottom":u+=s.offsetHeight;break;case"top-center":u+=o/2;break;case"center-center":u+=o/2+s.offsetHeight/2;break;case"bottom-center":u+=o/2+s.offsetHeight;break;case"top-top":u+=o;break;case"bottom-top":u+=o+s.offsetHeight;break;case"center-top":u+=o+s.offsetHeight/2}return u+r}(e.node,t.offset,t.anchorPlacement),out:o&&function(e,t){window.innerHeight;var n=ee(e,"anchor"),o=ee(e,"offset",t),i=e;return n&&document.querySelectorAll(n)&&(i=document.querySelectorAll(n)[0]),Z(i).top+i.offsetHeight-o}(e.node,t.offset)},e.options={once:i,mirror:o,animatedClassNames:c,id:a}}),e},ne=function(){var e=document.querySelectorAll("[data-aos]");return Array.prototype.map.call(e,function(e){return{node:e}})},oe=[],ie=!1,ae={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,mirror:!1,anchorPlacement:"top-bottom",startEvent:"DOMContentLoaded",animatedClassName:"aos-animate",initClassName:"aos-init",useClassNames:!1,disableMutationObserver:!1,throttleDelay:99,debounceDelay:50},re=function(){return document.all&&!window.atob},ce=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(ie=!0),ie&&(oe=te(oe,ae),X(oe),window.addEventListener("scroll",y(function(){X(oe,ae.once)},ae.throttleDelay)))},se=function(){if(oe=ne(),de(ae.disable)||re())return ue();ce()},ue=function(){oe.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay"),ae.initClassName&&e.node.classList.remove(ae.initClassName),ae.animatedClassName&&e.node.classList.remove(ae.animatedClassName)})},de=function(e){return!0===e||"mobile"===e&&U.mobile()||"phone"===e&&U.phone()||"tablet"===e&&U.tablet()||"function"==typeof e&&!0===e()};return{init:function(e){return ae=I(ae,e),oe=ne(),ae.disableMutationObserver||_.isSupported()||(console.info('\n aos: MutationObserver is not supported on this browser,\n code mutations observing has been disabled.\n You may have to call "refreshHard()" by yourself.\n '),ae.disableMutationObserver=!0),ae.disableMutationObserver||_.ready("[data-aos]",se),de(ae.disable)||re()?ue():(document.querySelector("body").setAttribute("data-aos-easing",ae.easing),document.querySelector("body").setAttribute("data-aos-duration",ae.duration),document.querySelector("body").setAttribute("data-aos-delay",ae.delay),-1===["DOMContentLoaded","load"].indexOf(ae.startEvent)?document.addEventListener(ae.startEvent,function(){ce(!0)}):window.addEventListener("load",function(){ce(!0)}),"DOMContentLoaded"===ae.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1&&ce(!0),window.addEventListener("resize",$(ce,ae.debounceDelay,!0)),window.addEventListener("orientationchange",$(ce,ae.debounceDelay,!0)),oe)},refresh:ce,refreshHard:se}});
libs/autocomplete/autocomplete.gif ADDED
libs/autocomplete/jquery.autocomplete.js ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Json key/value autocomplete for jQuery
3
+ * Provides a transparent way to have key/value autocomplete
4
+ * Copyright (C) 2008 Ziadin Givan
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with this program. If not, see http://www.gnu.org/licenses/
18
+ *
19
+ * Examples
20
+ *
21
+ * $("input#example").autocomplete("autocomplete.php");//using default parameters
22
+ *
23
+ * $("input#example").autocomplete("autocomplete.php",{minChars:3,timeout:3000,validSelection:false,parameters:{'myparam':'myvalue'},before : function(input,text) {},after : function(input,text) {}});
24
+ *
25
+ * minChars = Minimum characters the input must have for the ajax request to be made
26
+ * timeOut = Number of miliseconds passed after user entered text to make the ajax request
27
+ * validSelection = If set to true then will invalidate (set to empty) the value field if the text is not selected (or modified) from the list of items.
28
+ * parameters = Custom parameters to be passed
29
+ * after, before = a function that will be caled before/after the ajax request
30
+ */
31
+ (function ($) {
32
+
33
+ $.fn.autocomplete = function(settings)
34
+ {
35
+ return this.each( function()//do it for each matched element
36
+ {
37
+ var textInput = $(this);
38
+ textInput.attr("name", textInput.attr("name") + "_text");
39
+
40
+ //create a new hidden input that will be used for holding the return value when posting the form, then swap names with the original input
41
+ var hiddenInput = $('<input type=hidden name="' + textInput.attr("name") + '"/>');
42
+ hiddenInput.val( textInput.val() );
43
+ textInput.after(hiddenInput);
44
+
45
+ var valueInput = $(this).next();
46
+ //create the ul that will hold the text and values
47
+ valueInput.after('<ul class="autocomplete"></ul>');
48
+ var list = valueInput.next();
49
+
50
+ var oldText = '';
51
+ var typingTimeout;
52
+ var size = 0;
53
+ var selected = -1;
54
+
55
+ settings = $.extend(//provide default settings
56
+ {
57
+ minChars : 1,
58
+ timeout: 1000,
59
+ after : null,
60
+ before : null,
61
+ validSelection : true,
62
+ url : this.dataset.url,
63
+ parameters : {'inputName' : valueInput.attr('name'), 'inputId' : textInput.attr('id')}
64
+ } , settings);
65
+
66
+ function getData(text)
67
+ {
68
+ window.clearInterval(typingTimeout);
69
+ if (text != oldText && (settings.minChars != null && text.length >= settings.minChars))
70
+ {
71
+ clear();
72
+ if (settings.before == "function")
73
+ {
74
+ settings.before(textInput,text);
75
+ }
76
+ textInput.addClass('autocomplete-loading');
77
+ settings.parameters.text = text;
78
+
79
+ $.getJSON(settings.url, settings.parameters, function(data)
80
+ {
81
+ var items = '';
82
+ if (data)
83
+ {
84
+ size = 0;
85
+
86
+ for ( key in data )//get key => value
87
+ {
88
+ items += '<li value="' + key + '">' + data[key].replace(new RegExp("(" + text + ")","i"),"<strong>$1</strong>") + '</li>';
89
+ size++;
90
+ }
91
+
92
+ list.css({/*top: textInput.offset().top + textInput.outerHeight(), left: textInput.offset().left,*/ width: Math.max(100, textInput.outerWidth())}).html(items);
93
+ //on mouse hover over elements set selected class and on click set the selected value and close list
94
+ list.show().children().
95
+ hover(function() { $(this).addClass("selected").siblings().removeClass("selected");}, function() { $(this).removeClass("selected") } ).
96
+ click(function () { value = $(this).attr('value'); text = $(this).text();valueInput.val( value ); textInput.val( text ); textInput.trigger("autocomplete.change", [ value, text ]);clear(); });
97
+
98
+ if (settings.after == "function")
99
+ {
100
+ settings.after(textInput,text);
101
+ }
102
+
103
+ }
104
+ textInput.removeClass('autocomplete-loading');
105
+ });
106
+ oldText = text;
107
+ }
108
+ }
109
+
110
+ function clear()
111
+ {
112
+ list.hide();
113
+ size = 0;
114
+ selected = -1;
115
+ }
116
+
117
+ textInput.keydown(function(e)
118
+ {
119
+ window.clearInterval(typingTimeout);
120
+ if(e.which == 27)//escape
121
+ {
122
+ clear();
123
+ } else if (e.which == 46 || e.which == 8)//delete and backspace
124
+ {
125
+ clear();
126
+ //invalidate previous selection
127
+ if (settings.validSelection) valueInput.val('');
128
+ }
129
+ else if(e.which == 13)//enter
130
+ {
131
+ if ( list.css("display") == "none")//if the list is not visible then make a new request, otherwise hide the list
132
+ {
133
+ getData(textInput.val());
134
+ } else
135
+ {
136
+ clear();
137
+ }
138
+ e.preventDefault();
139
+ return false;
140
+ }
141
+ else if(e.which == 40 || e.which == 9 || e.which == 38)//move up, down
142
+ {
143
+ switch(e.which)
144
+ {
145
+ case 40: //down
146
+ case 9:
147
+ selected = (selected >= size - 1) ? 0 : selected + 1; break;
148
+ case 38://up
149
+ selected = (selected < 0) ? size -1 : selected - 1; break;
150
+ default: break;
151
+ }
152
+ //set selected item and input values
153
+ textInput.val( list.children().removeClass('selected').eq(selected).addClass('selected').text() );
154
+ valueInput.val( list.children().eq(selected).attr('value') );
155
+ } else
156
+ {
157
+ //invalidate previous selection
158
+ if (settings.validSelection) valueInput.val('');
159
+ typingTimeout = window.setTimeout(function() { getData(textInput.val()) },settings.timeout);
160
+ }
161
+ });
162
+ });
163
+ };
164
+
165
+ $.autocompleteList = function(el, settings)
166
+ {
167
+ var autocomplete = $(el).autocomplete(settings);
168
+
169
+ var list = $('<div class="autocomplete-list card border-top-0"></div>');
170
+
171
+ var autocomplete_hidden = autocomplete.next();
172
+
173
+ var name = autocomplete_hidden.attr("name");
174
+
175
+ autocomplete_hidden.next().after(list);
176
+ var autocomplete_list_hidden = $('<input type=hidden name="' + name + '_list" value="' + autocomplete_hidden.val() + '"/>');
177
+
178
+ list.after(autocomplete_list_hidden);
179
+
180
+ function addItem(value, text)
181
+ {
182
+ list.append($('<div class=""><button type="button" class="remove-btn close text-muted" aria-label="Close"><div aria-hidden="true">&times;</div></button><span>' + text + '</span>\
183
+ <input name="list[]" value="' + value + '" type="hidden">\
184
+ </div>'));
185
+ autocomplete.val("");
186
+ };
187
+
188
+ function setList()
189
+ {
190
+ values = {};
191
+ $('input[name="list[]"]', list).each(function(i, el)
192
+ {
193
+ values[this.value] = $("span", this.parentNode).text();
194
+ });
195
+
196
+ autocomplete_list_hidden.val( JSON.stringify(values) );
197
+ };
198
+
199
+
200
+ function setValue(value) {
201
+ if (value == "" || value == undefined) return false;
202
+ // value = decodeURIComponent(value);
203
+ values = JSON.parse(value);
204
+
205
+ for (key in values)
206
+ {
207
+ addItem(key, values[key]);
208
+ }
209
+
210
+ setList();
211
+ };
212
+
213
+ autocomplete.on("autocomplete.change", function(event, value, text) {
214
+ var autolist = $(this).data("autocompleteList");
215
+
216
+ autolist.addItem(value, text);
217
+ autolist.setList();
218
+ autolist.trigger("autocompletelist.change", [ JSON.stringify(values) ]);
219
+ });
220
+
221
+ list.on("click", ".remove-btn", function (event, value, text)
222
+ {
223
+ this.parentNode.remove();
224
+ setList();
225
+ autocomplete.trigger("autocompletelist.change", [ JSON.stringify(values) ]);
226
+
227
+ event.preventDefault();
228
+ return false;
229
+ });
230
+
231
+ autocomplete.setValue = setValue;
232
+ autocomplete.addItem = addItem;
233
+ autocomplete.setList = setList;
234
+
235
+ $.data(el, "autocompleteList", autocomplete);
236
+
237
+ return autocomplete;
238
+ }
239
+
240
+ $.fn.autocompleteList = function(options)
241
+ {
242
+ return this.each( function()
243
+ {
244
+ $.autocompleteList(this, options);
245
+ });
246
+ };
247
+
248
+ $.tagsInput = function(el, settings)
249
+ {
250
+ var autocomplete = $(el).autocomplete(settings);
251
+
252
+ var list = autocomplete.parent();//$('<div class="form-control autocomplete-list" style="min-height: 100px;height: 100px; overflow: auto;"></div>');
253
+
254
+ var autocomplete_hidden = autocomplete.next();
255
+
256
+ var name = autocomplete_hidden.attr("name");
257
+
258
+ autocomplete_hidden.next();//.after(list);
259
+ var autocomplete_list_hidden = $('<input type=hidden name="' + name + '_list" value="' + autocomplete_hidden.val() + '"/>');
260
+
261
+ list.append(autocomplete_list_hidden);
262
+
263
+ function addItem(value, text)
264
+ {
265
+ autocomplete.before($('<div class="badge border m-1"><a href="#" class="btn-link"><i class="la la-close"></i></a> <span>' + text + '</span>\
266
+ <input name="list[]" value="' + value + '" type="hidden">\
267
+ </div>'));
268
+ autocomplete.val("");
269
+ };
270
+
271
+ function setList()
272
+ {
273
+ var values = {};
274
+ //console.log($('input[name="list[]"]', list).serialize());
275
+ $('input[name="list[]"]', list).each(function(i, el)
276
+ {
277
+ values[this.value] = $("span", this.parentNode).text();
278
+ });
279
+
280
+ //values = encodeURIComponent(JSON.stringify(values));
281
+ values = JSON.stringify(values);//.replace('"', '\"');
282
+ autocomplete_list_hidden.val( values );
283
+ return values;
284
+ };
285
+
286
+
287
+ function setValue(value) {
288
+ if (value == "" || value == undefined) return false;
289
+ values = JSON.parse(value);
290
+
291
+ for (key in values)
292
+ {
293
+ addItem(key, values[key]);
294
+ }
295
+
296
+ setList();
297
+ };
298
+
299
+ autocomplete.on("autocomplete.change", function(event, value, text) {
300
+ var autolist = $(this).data("tagsInput");
301
+
302
+ autolist.addItem(value, text);
303
+ var values = autolist.setList();
304
+ autolist.trigger("tagsinput.change", [ values ]);
305
+ });
306
+
307
+ list.on("click", ".remove-btn", function (event, value, text)
308
+ {
309
+ this.parentNode.remove();
310
+ var values = autolist.setList();
311
+ autocomplete.trigger("tagsinput.change", [ values ]);
312
+
313
+ event.preventDefault();
314
+ return false;
315
+ });
316
+
317
+ autocomplete.setValue = setValue;
318
+ autocomplete.addItem = addItem;
319
+ autocomplete.setList = setList;
320
+
321
+ $.data(el, "tagsInput", autocomplete);
322
+
323
+ return autocomplete;
324
+ }
325
+
326
+ $.fn.tagsInput = function(options)
327
+ {
328
+ return this.each( function()//do it for each matched element
329
+ {
330
+ $.tagsInput(this, options);
331
+ });
332
+ };
333
+
334
+ })(jQuery);
libs/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4.
3
+ * @package bootstrap-colorpicker
4
+ * @version v3.3.0
5
+ * @license MIT
6
+ * @link https://itsjavi.com/bootstrap-colorpicker/
7
+ * @link https://github.com/itsjavi/bootstrap-colorpicker.git
8
+ */
9
+ .colorpicker{position:relative;display:none;font-size:inherit;color:inherit;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);padding:.75rem .75rem;width:148px;border-radius:4px;-webkit-box-sizing:content-box;box-sizing:content-box}.colorpicker.colorpicker-disabled,.colorpicker.colorpicker-disabled *{cursor:default!important}.colorpicker div{position:relative}.colorpicker-popup{position:absolute;top:100%;left:0;float:left;margin-top:1px;z-index:1060}.colorpicker-popup.colorpicker-bs-popover-content{position:relative;top:auto;left:auto;float:none;margin:0;z-index:initial;border:none;padding:.25rem 0;border-radius:0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.colorpicker:after,.colorpicker:before{content:"";display:table;clear:both;line-height:0}.colorpicker-clear{clear:both;display:block}.colorpicker:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:auto;right:6px}.colorpicker:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:auto;right:7px}.colorpicker.colorpicker-with-alpha{width:170px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-saturation{position:relative;width:126px;height:126px;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(black)),-webkit-gradient(linear,left top,right top,from(white),to(rgba(255,255,255,0)));background:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);cursor:crosshair;float:left;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2);margin-bottom:6px}.colorpicker-saturation .colorpicker-guide{display:block;height:6px;width:6px;border-radius:6px;border:1px solid #000;-webkit-box-shadow:0 0 0 1px rgba(255,255,255,.8);box-shadow:0 0 0 1px rgba(255,255,255,.8);position:absolute;top:0;left:0;margin:-3px 0 0 -3px}.colorpicker-alpha,.colorpicker-hue{position:relative;width:16px;height:126px;float:left;cursor:row-resize;margin-left:6px;margin-bottom:6px}.colorpicker-alpha-color{position:absolute;top:0;left:0;width:100%;height:100%}.colorpicker-alpha-color,.colorpicker-hue{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.colorpicker-alpha .colorpicker-guide,.colorpicker-hue .colorpicker-guide{display:block;height:4px;background:rgba(255,255,255,.8);border:1px solid rgba(0,0,0,.4);position:absolute;top:0;left:0;margin-left:-2px;margin-top:-2px;right:-2px;z-index:1}.colorpicker-hue{background:-webkit-gradient(linear,left bottom,left top,from(red),color-stop(8%,#ff8000),color-stop(17%,#ff0),color-stop(25%,#80ff00),color-stop(33%,#0f0),color-stop(42%,#00ff80),color-stop(50%,#0ff),color-stop(58%,#0080ff),color-stop(67%,#00f),color-stop(75%,#8000ff),color-stop(83%,#ff00ff),color-stop(92%,#ff0080),to(red));background:linear-gradient(to top,red 0,#ff8000 8%,#ff0 17%,#80ff00 25%,#0f0 33%,#00ff80 42%,#0ff 50%,#0080ff 58%,#00f 67%,#8000ff 75%,#ff00ff 83%,#ff0080 92%,red 100%)}.colorpicker-alpha{background:linear-gradient(45deg,rgba(0,0,0,.1) 25%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),linear-gradient(45deg,rgba(0,0,0,.1) 25%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),#fff;background-size:10px 10px;background-position:0 0,5px 5px;display:none}.colorpicker-bar{min-height:16px;margin:6px 0 0 0;clear:both;text-align:center;font-size:10px;line-height:normal;max-width:100%;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.colorpicker-bar:before{content:"";display:table;clear:both}.colorpicker-bar.colorpicker-bar-horizontal{height:126px;width:16px;margin:0 0 6px 0;float:left}.colorpicker-input-addon{position:relative}.colorpicker-input-addon i{display:inline-block;cursor:pointer;vertical-align:text-top;height:16px;width:16px;position:relative}.colorpicker-input-addon:before{content:"";position:absolute;width:16px;height:16px;display:inline-block;vertical-align:text-top;background:linear-gradient(45deg,rgba(0,0,0,.1) 25%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),linear-gradient(45deg,rgba(0,0,0,.1) 25%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),#fff;background-size:10px 10px;background-position:0 0,5px 5px}.colorpicker.colorpicker-inline{position:relative;display:inline-block;float:none;z-index:auto;vertical-align:text-bottom}.colorpicker.colorpicker-horizontal{width:126px;height:auto}.colorpicker.colorpicker-horizontal .colorpicker-bar{width:126px}.colorpicker.colorpicker-horizontal .colorpicker-saturation{float:none;margin-bottom:0}.colorpicker.colorpicker-horizontal .colorpicker-alpha,.colorpicker.colorpicker-horizontal .colorpicker-hue{float:none;width:126px;height:16px;cursor:col-resize;margin-left:0;margin-top:6px;margin-bottom:0}.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide,.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide{position:absolute;display:block;bottom:-2px;left:0;right:auto;height:auto;width:4px}.colorpicker.colorpicker-horizontal .colorpicker-hue{background:-webkit-gradient(linear,right top,left top,from(red),color-stop(8%,#ff8000),color-stop(17%,#ff0),color-stop(25%,#80ff00),color-stop(33%,#0f0),color-stop(42%,#00ff80),color-stop(50%,#0ff),color-stop(58%,#0080ff),color-stop(67%,#00f),color-stop(75%,#8000ff),color-stop(83%,#ff00ff),color-stop(92%,#ff0080),to(red));background:linear-gradient(to left,red 0,#ff8000 8%,#ff0 17%,#80ff00 25%,#0f0 33%,#00ff80 42%,#0ff 50%,#0080ff 58%,#00f 67%,#8000ff 75%,#ff00ff 83%,#ff0080 92%,red 100%)}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background:linear-gradient(45deg,rgba(0,0,0,.1) 25%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),linear-gradient(45deg,rgba(0,0,0,.1) 25%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),#fff;background-size:10px 10px;background-position:0 0,5px 5px}.colorpicker-inline:before,.colorpicker-no-arrow:before,.colorpicker-popup.colorpicker-bs-popover-content:before{content:none;display:none}.colorpicker-inline:after,.colorpicker-no-arrow:after,.colorpicker-popup.colorpicker-bs-popover-content:after{content:none;display:none}.colorpicker-alpha,.colorpicker-hue,.colorpicker-saturation{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.colorpicker-alpha.colorpicker-visible,.colorpicker-bar.colorpicker-visible,.colorpicker-hue.colorpicker-visible,.colorpicker-saturation.colorpicker-visible,.colorpicker.colorpicker-visible{display:block}.colorpicker-alpha.colorpicker-hidden,.colorpicker-bar.colorpicker-hidden,.colorpicker-hue.colorpicker-hidden,.colorpicker-saturation.colorpicker-hidden,.colorpicker.colorpicker-hidden{display:none}.colorpicker-inline.colorpicker-visible{display:inline-block}.colorpicker.colorpicker-disabled:after{border:none;content:'';display:block;width:100%;height:100%;background:rgba(233,236,239,.33);top:0;left:0;right:auto;z-index:2;position:absolute}.colorpicker.colorpicker-disabled .colorpicker-guide{display:none}.colorpicker-preview{background:linear-gradient(45deg,rgba(0,0,0,.1) 25%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),linear-gradient(45deg,rgba(0,0,0,.1) 25%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),#fff;background-size:10px 10px;background-position:0 0,5px 5px}.colorpicker-preview>div{position:absolute;left:0;top:0;width:100%;height:100%}.colorpicker-bar.colorpicker-swatches{-webkit-box-shadow:none;box-shadow:none;height:auto}.colorpicker-swatches--inner{clear:both;margin-top:-6px}.colorpicker-swatch{position:relative;cursor:pointer;float:left;height:16px;width:16px;margin-right:6px;margin-top:6px;margin-left:0;display:block;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2);background:linear-gradient(45deg,rgba(0,0,0,.1) 25%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),linear-gradient(45deg,rgba(0,0,0,.1) 25%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),#fff;background-size:10px 10px;background-position:0 0,5px 5px}.colorpicker-swatch--inner{position:absolute;top:0;left:0;width:100%;height:100%}.colorpicker-swatch:nth-of-type(7n+0){margin-right:0}.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(7n+0){margin-right:6px}.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(8n+0){margin-right:0}.colorpicker-horizontal .colorpicker-swatch:nth-of-type(6n+0){margin-right:0}.colorpicker-horizontal .colorpicker-swatch:nth-of-type(7n+0){margin-right:6px}.colorpicker-horizontal .colorpicker-swatch:nth-of-type(8n+0){margin-right:6px}.colorpicker-swatch:last-of-type:after{content:"";display:table;clear:both}.colorpicker-element input[dir=rtl],.colorpicker-element[dir=rtl] input,[dir=rtl] .colorpicker-element input{direction:ltr;text-align:right}
10
+ /*# sourceMappingURL=bootstrap-colorpicker.min.css.map */
libs/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"sources":["bootstrap-colorpicker.css","bootstrap-colorpicker.css"],"names":[],"mappings":"AAiDA,aACE,SAAA,SACA,QAAA,KACA,UAAA,QACA,MAAA,QACA,WAAA,KACA,WAAA,KACA,iBAAA,KACA,gBAAA,YACA,OAAA,IAAA,MAAA,eAEA,QAAA,OAAA,OACA,MAAA,MACA,cAAA,IACA,mBAAA,YAAA,WAAA,YAGF,kCCjDA,oCDmDE,OAAA,kBAGF,iBACE,SAAA,SAGF,mBACE,SAAA,SACA,IAAA,KACA,KAAA,EACA,MAAA,KACA,WAAA,IACA,QAAA,KAGF,kDACE,SAAA,SACA,IAAA,KACA,KAAA,KACA,MAAA,KACA,OAAA,EACA,QAAA,QACA,OAAA,KACA,QAAA,OAAA,EACA,cAAA,EACA,WAAA,IACA,mBAAA,KAAA,WAAA,KCjDF,mBDoDA,oBAEE,QAAA,GACA,QAAA,MACA,MAAA,KACA,YAAA,EAGF,mBACE,MAAA,KACA,QAAA,MAGF,oBACE,QAAA,GACA,QAAA,aACA,YAAA,IAAA,MAAA,YACA,aAAA,IAAA,MAAA,YACA,cAAA,IAAA,MAAA,KACA,oBAAA,eACA,SAAA,SACA,IAAA,KACA,KAAA,KACA,MAAA,IAGF,mBACE,QAAA,GACA,QAAA,aACA,YAAA,IAAA,MAAA,YACA,aAAA,IAAA,MAAA,YACA,cAAA,IAAA,MAAA,KACA,SAAA,SACA,IAAA,KACA,KAAA,KACA,MAAA,IAGF,oCACE,MAAA,MAGF,uDACE,QAAA,MAGF,wBACE,SAAA,SACA,MAAA,MACA,OAAA,MAzHA,WAAA,2EAAA,CAAA,gFAAA,WAAA,oDAAA,CAAA,0DA2HA,OAAA,UACA,MAAA,KACA,mBAAA,EAAA,EAAA,EAAA,IAAA,eAAA,WAAA,EAAA,EAAA,EAAA,IAAA,eACA,cAAA,IARF,2CAWI,QAAA,MACA,OAAA,IACA,MAAA,IACA,cAAA,IACA,OAAA,IAAA,MAAA,KACA,mBAAA,EAAA,EAAA,EAAA,IAAA,qBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,qBACA,SAAA,SACA,IAAA,EACA,KAAA,EACA,OAAA,KAAA,EAAA,EAAA,KChDJ,mBDoDA,iBAEE,SAAA,SACA,MAAA,KACA,OAAA,MACA,MAAA,KACA,OAAA,WACA,YAAA,IACA,cAAA,IAGF,yBACE,SAAA,SACA,IAAA,EACA,KAAA,EACA,MAAA,KACA,OAAA,KCnDF,yBDsDA,iBAEE,mBAAA,EAAA,EAAA,EAAA,IAAA,eAAA,WAAA,EAAA,EAAA,EAAA,IAAA,eCnDF,sCDsDA,oCAEE,QAAA,MACA,OAAA,IACA,WAAA,qBACA,OAAA,IAAA,MAAA,eACA,SAAA,SACA,IAAA,EACA,KAAA,EACA,YAAA,KACA,WAAA,KACA,MAAA,KACA,QAAA,EAGF,iBAjKE,WAAA,2TAAA,WAAA,8JAqKF,mBA3ME,WAAA,iHAAA,CAAA,iHAAA,CAAA,KAGA,gBAAA,KAAA,KACA,oBAAA,EAAA,CAAA,CAAA,IAAA,IAyMA,QAAA,KAGF,iBACE,WAAA,KACA,OAAA,IAAA,EAAA,EAAA,EACA,MAAA,KACA,WAAA,OACA,UAAA,KACA,YAAA,OACA,UAAA,KACA,mBAAA,EAAA,EAAA,EAAA,IAAA,eAAA,WAAA,EAAA,EAAA,EAAA,IAAA,eARF,wBAWI,QAAA,GACA,QAAA,MACA,MAAA,KAIJ,4CACE,OAAA,MACA,MAAA,KACA,OAAA,EAAA,EAAA,IAAA,EACA,MAAA,KAGF,yBACE,SAAA,SAGF,2BACE,QAAA,aACA,OAAA,QACA,eAAA,SACA,OAAA,KACA,MAAA,KACA,SAAA,SAGF,gCACE,QAAA,GACA,SAAA,SACA,MAAA,KACA,OAAA,KACA,QAAA,aACA,eAAA,SA3PA,WAAA,iHAAA,CAAA,iHAAA,CAAA,KAGA,gBAAA,KAAA,KACA,oBAAA,EAAA,CAAA,CAAA,IAAA,IA2PF,gCACE,SAAA,SACA,QAAA,aACA,MAAA,KACA,QAAA,KACA,eAAA,YAGF,oCACE,MAAA,MACA,OAAA,KAGF,qDACE,MAAA,MAGF,4DACE,MAAA,KACA,cAAA,ECrDF,uDDwDA,qDAEE,MAAA,KACA,MAAA,MACA,OAAA,KACA,OAAA,WACA,YAAA,EACA,WAAA,IACA,cAAA,ECtDF,0EDyDA,wEAEE,SAAA,SACA,QAAA,MACA,OAAA,KACA,KAAA,EACA,MAAA,KACA,OAAA,KACA,MAAA,IAGF,qDA/QE,WAAA,yTAAA,WAAA,+JAmRF,uDA/SE,WAAA,iHAAA,CAAA,iHAAA,CAAA,KAGA,gBAAA,KAAA,KACA,oBAAA,EAAA,CAAA,CAAA,IAAA,IA+SF,2BCnDA,6BACA,yDDqDE,QAAA,KACA,QAAA,KAGF,0BCpDA,4BACA,wDDsDE,QAAA,KACA,QAAA,KAIF,mBCrDA,iBADA,wBDyDE,oBAAA,KAAA,iBAAA,KAAA,gBAAA,KAAA,YAAA,KCjDF,uCAGA,qCADA,qCADA,4CDmDA,iCAMI,QAAA,MCnDJ,sCAGA,oCADA,oCADA,2CDsDA,gCAMI,QAAA,KAIJ,wCACE,QAAA,aAGF,wCACE,OAAA,KACA,QAAA,GACA,QAAA,MACA,MAAA,KACA,OAAA,KACA,WAAA,sBACA,IAAA,EACA,KAAA,EACA,MAAA,KACA,QAAA,EACA,SAAA,SAGF,qDACE,QAAA,KAKF,qBApXE,WAAA,iHAAA,CAAA,iHAAA,CAAA,KAGA,gBAAA,KAAA,KACA,oBAAA,EAAA,CAAA,CAAA,IAAA,IAoXF,yBACE,SAAA,SACA,KAAA,EACA,IAAA,EACA,MAAA,KACA,OAAA,KAGF,sCACE,mBAAA,KAAA,WAAA,KACA,OAAA,KAGF,6BACE,MAAA,KACA,WAAA,KAGF,oBACE,SAAA,SACA,OAAA,QACA,MAAA,KACA,OAAA,KACA,MAAA,KACA,aAAA,IACA,WAAA,IACA,YAAA,EACA,QAAA,MACA,mBAAA,EAAA,EAAA,EAAA,IAAA,eAAA,WAAA,EAAA,EAAA,EAAA,IAAA,eApZA,WAAA,iHAAA,CAAA,iHAAA,CAAA,KAGA,gBAAA,KAAA,KACA,oBAAA,EAAA,CAAA,CAAA,IAAA,IAoZF,2BACE,SAAA,SACA,IAAA,EACA,KAAA,EACA,MAAA,KACA,OAAA,KAIF,sCACE,aAAA,EAIF,8DAEI,aAAA,IAFJ,8DAMI,aAAA,EAKJ,8DAEI,aAAA,EAFJ,8DAMI,aAAA,IANJ,8DAUI,aAAA,IAIJ,uCACE,QAAA,GACA,QAAA,MACA,MAAA,KCxEF,oCADA,oCD6EA,qCAGE,UAAA,IACA,WAAA","file":"bootstrap-colorpicker.min.css","sourcesContent":[".colorpicker {\n position: relative;\n display: none;\n font-size: inherit;\n color: inherit;\n text-align: left;\n list-style: none;\n background-color: #ffffff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n padding: .75rem .75rem;\n width: 148px;\n border-radius: 4px;\n -webkit-box-sizing: content-box;\n box-sizing: content-box; }\n\n.colorpicker.colorpicker-disabled,\n.colorpicker.colorpicker-disabled * {\n cursor: default !important; }\n\n.colorpicker div {\n position: relative; }\n\n.colorpicker-popup {\n position: absolute;\n top: 100%;\n left: 0;\n float: left;\n margin-top: 1px;\n z-index: 1060; }\n\n.colorpicker-popup.colorpicker-bs-popover-content {\n position: relative;\n top: auto;\n left: auto;\n float: none;\n margin: 0;\n z-index: initial;\n border: none;\n padding: 0.25rem 0;\n border-radius: 0;\n background: none;\n -webkit-box-shadow: none;\n box-shadow: none; }\n\n.colorpicker:before,\n.colorpicker:after {\n content: \"\";\n display: table;\n clear: both;\n line-height: 0; }\n\n.colorpicker-clear {\n clear: both;\n display: block; }\n\n.colorpicker:before {\n content: '';\n display: inline-block;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 7px solid #ccc;\n border-bottom-color: rgba(0, 0, 0, 0.2);\n position: absolute;\n top: -7px;\n left: auto;\n right: 6px; }\n\n.colorpicker:after {\n content: '';\n display: inline-block;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #ffffff;\n position: absolute;\n top: -6px;\n left: auto;\n right: 7px; }\n\n.colorpicker.colorpicker-with-alpha {\n width: 170px; }\n\n.colorpicker.colorpicker-with-alpha .colorpicker-alpha {\n display: block; }\n\n.colorpicker-saturation {\n position: relative;\n width: 126px;\n height: 126px;\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(black)), -webkit-gradient(linear, left top, right top, from(white), to(rgba(255, 255, 255, 0)));\n background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, black 100%), linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);\n /* W3C */\n cursor: crosshair;\n float: left;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n margin-bottom: 6px; }\n .colorpicker-saturation .colorpicker-guide {\n display: block;\n height: 6px;\n width: 6px;\n border-radius: 6px;\n border: 1px solid #000;\n -webkit-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);\n box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);\n position: absolute;\n top: 0;\n left: 0;\n margin: -3px 0 0 -3px; }\n\n.colorpicker-hue,\n.colorpicker-alpha {\n position: relative;\n width: 16px;\n height: 126px;\n float: left;\n cursor: row-resize;\n margin-left: 6px;\n margin-bottom: 6px; }\n\n.colorpicker-alpha-color {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-hue,\n.colorpicker-alpha-color {\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }\n\n.colorpicker-hue .colorpicker-guide,\n.colorpicker-alpha .colorpicker-guide {\n display: block;\n height: 4px;\n background: rgba(255, 255, 255, 0.8);\n border: 1px solid rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n left: 0;\n margin-left: -2px;\n margin-top: -2px;\n right: -2px;\n z-index: 1; }\n\n.colorpicker-hue {\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, left bottom, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));\n background: linear-gradient(to top, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);\n /* W3C */ }\n\n.colorpicker-alpha {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px;\n display: none; }\n\n.colorpicker-bar {\n min-height: 16px;\n margin: 6px 0 0 0;\n clear: both;\n text-align: center;\n font-size: 10px;\n line-height: normal;\n max-width: 100%;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }\n .colorpicker-bar:before {\n content: \"\";\n display: table;\n clear: both; }\n\n.colorpicker-bar.colorpicker-bar-horizontal {\n height: 126px;\n width: 16px;\n margin: 0 0 6px 0;\n float: left; }\n\n.colorpicker-input-addon {\n position: relative; }\n\n.colorpicker-input-addon i {\n display: inline-block;\n cursor: pointer;\n vertical-align: text-top;\n height: 16px;\n width: 16px;\n position: relative; }\n\n.colorpicker-input-addon:before {\n content: \"\";\n position: absolute;\n width: 16px;\n height: 16px;\n display: inline-block;\n vertical-align: text-top;\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker.colorpicker-inline {\n position: relative;\n display: inline-block;\n float: none;\n z-index: auto;\n vertical-align: text-bottom; }\n\n.colorpicker.colorpicker-horizontal {\n width: 126px;\n height: auto; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-bar {\n width: 126px; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-saturation {\n float: none;\n margin-bottom: 0; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue,\n.colorpicker.colorpicker-horizontal .colorpicker-alpha {\n float: none;\n width: 126px;\n height: 16px;\n cursor: col-resize;\n margin-left: 0;\n margin-top: 6px;\n margin-bottom: 0; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide,\n.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide {\n position: absolute;\n display: block;\n bottom: -2px;\n left: 0;\n right: auto;\n height: auto;\n width: 4px; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue {\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, right top, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));\n background: linear-gradient(to left, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);\n /* W3C */ }\n\n.colorpicker.colorpicker-horizontal .colorpicker-alpha {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-inline:before,\n.colorpicker-no-arrow:before,\n.colorpicker-popup.colorpicker-bs-popover-content:before {\n content: none;\n display: none; }\n\n.colorpicker-inline:after,\n.colorpicker-no-arrow:after,\n.colorpicker-popup.colorpicker-bs-popover-content:after {\n content: none;\n display: none; }\n\n.colorpicker-alpha,\n.colorpicker-saturation,\n.colorpicker-hue {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n\n.colorpicker.colorpicker-visible,\n.colorpicker-alpha.colorpicker-visible,\n.colorpicker-saturation.colorpicker-visible,\n.colorpicker-hue.colorpicker-visible,\n.colorpicker-bar.colorpicker-visible {\n display: block; }\n\n.colorpicker.colorpicker-hidden,\n.colorpicker-alpha.colorpicker-hidden,\n.colorpicker-saturation.colorpicker-hidden,\n.colorpicker-hue.colorpicker-hidden,\n.colorpicker-bar.colorpicker-hidden {\n display: none; }\n\n.colorpicker-inline.colorpicker-visible {\n display: inline-block; }\n\n.colorpicker.colorpicker-disabled:after {\n border: none;\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n background: rgba(233, 236, 239, 0.33);\n top: 0;\n left: 0;\n right: auto;\n z-index: 2;\n position: absolute; }\n\n.colorpicker.colorpicker-disabled .colorpicker-guide {\n display: none; }\n\n/** EXTENSIONS **/\n.colorpicker-preview {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-preview > div {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-bar.colorpicker-swatches {\n -webkit-box-shadow: none;\n box-shadow: none;\n height: auto; }\n\n.colorpicker-swatches--inner {\n clear: both;\n margin-top: -6px; }\n\n.colorpicker-swatch {\n position: relative;\n cursor: pointer;\n float: left;\n height: 16px;\n width: 16px;\n margin-right: 6px;\n margin-top: 6px;\n margin-left: 0;\n display: block;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-swatch--inner {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 0; }\n\n.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 6px; }\n\n.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(8n+0) {\n margin-right: 0; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(6n+0) {\n margin-right: 0; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 6px; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(8n+0) {\n margin-right: 6px; }\n\n.colorpicker-swatch:last-of-type:after {\n content: \"\";\n display: table;\n clear: both; }\n\n*[dir='rtl'] .colorpicker-element input,\n.colorpicker-element[dir='rtl'] input,\n.colorpicker-element input[dir='rtl'] {\n direction: ltr;\n text-align: right; }\n\n/*# sourceMappingURL=bootstrap-colorpicker.css.map */\n",".colorpicker {\n position: relative;\n display: none;\n font-size: inherit;\n color: inherit;\n text-align: left;\n list-style: none;\n background-color: #ffffff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n padding: .75rem .75rem;\n width: 148px;\n border-radius: 4px;\n -webkit-box-sizing: content-box;\n box-sizing: content-box; }\n\n.colorpicker.colorpicker-disabled,\n.colorpicker.colorpicker-disabled * {\n cursor: default !important; }\n\n.colorpicker div {\n position: relative; }\n\n.colorpicker-popup {\n position: absolute;\n top: 100%;\n left: 0;\n float: left;\n margin-top: 1px;\n z-index: 1060; }\n\n.colorpicker-popup.colorpicker-bs-popover-content {\n position: relative;\n top: auto;\n left: auto;\n float: none;\n margin: 0;\n z-index: initial;\n border: none;\n padding: 0.25rem 0;\n border-radius: 0;\n background: none;\n -webkit-box-shadow: none;\n box-shadow: none; }\n\n.colorpicker:before,\n.colorpicker:after {\n content: \"\";\n display: table;\n clear: both;\n line-height: 0; }\n\n.colorpicker-clear {\n clear: both;\n display: block; }\n\n.colorpicker:before {\n content: '';\n display: inline-block;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 7px solid #ccc;\n border-bottom-color: rgba(0, 0, 0, 0.2);\n position: absolute;\n top: -7px;\n left: auto;\n right: 6px; }\n\n.colorpicker:after {\n content: '';\n display: inline-block;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #ffffff;\n position: absolute;\n top: -6px;\n left: auto;\n right: 7px; }\n\n.colorpicker.colorpicker-with-alpha {\n width: 170px; }\n\n.colorpicker.colorpicker-with-alpha .colorpicker-alpha {\n display: block; }\n\n.colorpicker-saturation {\n position: relative;\n width: 126px;\n height: 126px;\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(black)), -webkit-gradient(linear, left top, right top, from(white), to(rgba(255, 255, 255, 0)));\n background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, black 100%), linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);\n /* W3C */\n cursor: crosshair;\n float: left;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n margin-bottom: 6px; }\n .colorpicker-saturation .colorpicker-guide {\n display: block;\n height: 6px;\n width: 6px;\n border-radius: 6px;\n border: 1px solid #000;\n -webkit-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);\n box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);\n position: absolute;\n top: 0;\n left: 0;\n margin: -3px 0 0 -3px; }\n\n.colorpicker-hue,\n.colorpicker-alpha {\n position: relative;\n width: 16px;\n height: 126px;\n float: left;\n cursor: row-resize;\n margin-left: 6px;\n margin-bottom: 6px; }\n\n.colorpicker-alpha-color {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-hue,\n.colorpicker-alpha-color {\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }\n\n.colorpicker-hue .colorpicker-guide,\n.colorpicker-alpha .colorpicker-guide {\n display: block;\n height: 4px;\n background: rgba(255, 255, 255, 0.8);\n border: 1px solid rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n left: 0;\n margin-left: -2px;\n margin-top: -2px;\n right: -2px;\n z-index: 1; }\n\n.colorpicker-hue {\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, left bottom, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));\n background: linear-gradient(to top, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);\n /* W3C */ }\n\n.colorpicker-alpha {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px;\n display: none; }\n\n.colorpicker-bar {\n min-height: 16px;\n margin: 6px 0 0 0;\n clear: both;\n text-align: center;\n font-size: 10px;\n line-height: normal;\n max-width: 100%;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }\n .colorpicker-bar:before {\n content: \"\";\n display: table;\n clear: both; }\n\n.colorpicker-bar.colorpicker-bar-horizontal {\n height: 126px;\n width: 16px;\n margin: 0 0 6px 0;\n float: left; }\n\n.colorpicker-input-addon {\n position: relative; }\n\n.colorpicker-input-addon i {\n display: inline-block;\n cursor: pointer;\n vertical-align: text-top;\n height: 16px;\n width: 16px;\n position: relative; }\n\n.colorpicker-input-addon:before {\n content: \"\";\n position: absolute;\n width: 16px;\n height: 16px;\n display: inline-block;\n vertical-align: text-top;\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker.colorpicker-inline {\n position: relative;\n display: inline-block;\n float: none;\n z-index: auto;\n vertical-align: text-bottom; }\n\n.colorpicker.colorpicker-horizontal {\n width: 126px;\n height: auto; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-bar {\n width: 126px; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-saturation {\n float: none;\n margin-bottom: 0; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue,\n.colorpicker.colorpicker-horizontal .colorpicker-alpha {\n float: none;\n width: 126px;\n height: 16px;\n cursor: col-resize;\n margin-left: 0;\n margin-top: 6px;\n margin-bottom: 0; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide,\n.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide {\n position: absolute;\n display: block;\n bottom: -2px;\n left: 0;\n right: auto;\n height: auto;\n width: 4px; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue {\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, right top, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));\n background: linear-gradient(to left, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);\n /* W3C */ }\n\n.colorpicker.colorpicker-horizontal .colorpicker-alpha {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-inline:before,\n.colorpicker-no-arrow:before,\n.colorpicker-popup.colorpicker-bs-popover-content:before {\n content: none;\n display: none; }\n\n.colorpicker-inline:after,\n.colorpicker-no-arrow:after,\n.colorpicker-popup.colorpicker-bs-popover-content:after {\n content: none;\n display: none; }\n\n.colorpicker-alpha,\n.colorpicker-saturation,\n.colorpicker-hue {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n\n.colorpicker.colorpicker-visible,\n.colorpicker-alpha.colorpicker-visible,\n.colorpicker-saturation.colorpicker-visible,\n.colorpicker-hue.colorpicker-visible,\n.colorpicker-bar.colorpicker-visible {\n display: block; }\n\n.colorpicker.colorpicker-hidden,\n.colorpicker-alpha.colorpicker-hidden,\n.colorpicker-saturation.colorpicker-hidden,\n.colorpicker-hue.colorpicker-hidden,\n.colorpicker-bar.colorpicker-hidden {\n display: none; }\n\n.colorpicker-inline.colorpicker-visible {\n display: inline-block; }\n\n.colorpicker.colorpicker-disabled:after {\n border: none;\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n background: rgba(233, 236, 239, 0.33);\n top: 0;\n left: 0;\n right: auto;\n z-index: 2;\n position: absolute; }\n\n.colorpicker.colorpicker-disabled .colorpicker-guide {\n display: none; }\n\n/** EXTENSIONS **/\n.colorpicker-preview {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-preview > div {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-bar.colorpicker-swatches {\n -webkit-box-shadow: none;\n box-shadow: none;\n height: auto; }\n\n.colorpicker-swatches--inner {\n clear: both;\n margin-top: -6px; }\n\n.colorpicker-swatch {\n position: relative;\n cursor: pointer;\n float: left;\n height: 16px;\n width: 16px;\n margin-right: 6px;\n margin-top: 6px;\n margin-left: 0;\n display: block;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-swatch--inner {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 0; }\n\n.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 6px; }\n\n.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(8n+0) {\n margin-right: 0; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(6n+0) {\n margin-right: 0; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 6px; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(8n+0) {\n margin-right: 6px; }\n\n.colorpicker-swatch:last-of-type:after {\n content: \"\";\n display: table;\n clear: both; }\n\n*[dir='rtl'] .colorpicker-element input,\n.colorpicker-element[dir='rtl'] input,\n.colorpicker-element input[dir='rtl'] {\n direction: ltr;\n text-align: right; }\n\n/*# sourceMappingURL=bootstrap-colorpicker.css.map */\n"]}
libs/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4.
3
+ * @package bootstrap-colorpicker
4
+ * @version v3.3.0
5
+ * @license MIT
6
+ * @link https://itsjavi.com/bootstrap-colorpicker/
7
+ * @link https://github.com/itsjavi/bootstrap-colorpicker.git
8
+ */
9
+ (function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory(require("jquery"));else if(typeof define==="function"&&define.amd)define("bootstrap-colorpicker",["jquery"],factory);else if(typeof exports==="object")exports["bootstrap-colorpicker"]=factory(require("jquery"));else root["bootstrap-colorpicker"]=factory(root["jQuery"])})(window,function(__WEBPACK_EXTERNAL_MODULE__0__){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{enumerable:true,get:getter})}};__webpack_require__.r=function(exports){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(exports,"__esModule",{value:true})};__webpack_require__.t=function(value,mode){if(mode&1)value=__webpack_require__(value);if(mode&8)return value;if(mode&4&&typeof value==="object"&&value&&value.__esModule)return value;var ns=Object.create(null);__webpack_require__.r(ns);Object.defineProperty(ns,"default",{enumerable:true,value});if(mode&2&&typeof value!="string")for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=7)}([function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var Extension=function(){function Extension(colorpicker){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Extension);this.colorpicker=colorpicker;this.options=options;if(!(this.colorpicker.element&&this.colorpicker.element.length)){throw new Error("Extension: this.colorpicker.element is not valid")}this.colorpicker.element.on("colorpickerCreate.colorpicker-ext",_jquery2.default.proxy(this.onCreate,this));this.colorpicker.element.on("colorpickerDestroy.colorpicker-ext",_jquery2.default.proxy(this.onDestroy,this));this.colorpicker.element.on("colorpickerUpdate.colorpicker-ext",_jquery2.default.proxy(this.onUpdate,this));this.colorpicker.element.on("colorpickerChange.colorpicker-ext",_jquery2.default.proxy(this.onChange,this));this.colorpicker.element.on("colorpickerInvalid.colorpicker-ext",_jquery2.default.proxy(this.onInvalid,this));this.colorpicker.element.on("colorpickerShow.colorpicker-ext",_jquery2.default.proxy(this.onShow,this));this.colorpicker.element.on("colorpickerHide.colorpicker-ext",_jquery2.default.proxy(this.onHide,this));this.colorpicker.element.on("colorpickerEnable.colorpicker-ext",_jquery2.default.proxy(this.onEnable,this));this.colorpicker.element.on("colorpickerDisable.colorpicker-ext",_jquery2.default.proxy(this.onDisable,this))}_createClass(Extension,[{key:"resolveColor",value:function resolveColor(color){var realColor=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;return false}},{key:"onCreate",value:function onCreate(event){}},{key:"onDestroy",value:function onDestroy(event){this.colorpicker.element.off(".colorpicker-ext")}},{key:"onUpdate",value:function onUpdate(event){}},{key:"onChange",value:function onChange(event){}},{key:"onInvalid",value:function onInvalid(event){}},{key:"onHide",value:function onHide(event){}},{key:"onShow",value:function onShow(event){}},{key:"onDisable",value:function onDisable(event){}},{key:"onEnable",value:function onEnable(event){}}]);return Extension}();exports.default=Extension;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ColorItem=exports.HSVAColor=undefined;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _color=__webpack_require__(16);var _color2=_interopRequireDefault(_color);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var HSVAColor=function(){function HSVAColor(h,s,v,a){_classCallCheck(this,HSVAColor);this.h=isNaN(h)?0:h;this.s=isNaN(s)?0:s;this.v=isNaN(v)?0:v;this.a=isNaN(h)?1:a}_createClass(HSVAColor,[{key:"toString",value:function toString(){return this.h+", "+this.s+"%, "+this.v+"%, "+this.a}}]);return HSVAColor}();var ColorItem=function(){_createClass(ColorItem,[{key:"api",value:function api(fn){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}if(arguments.length===0){return this._color}var result=this._color[fn].apply(this._color,args);if(!(result instanceof _color2.default)){return result}return new ColorItem(result,this.format)}},{key:"original",get:function get(){return this._original}}],[{key:"HSVAColor",get:function get(){return HSVAColor}}]);function ColorItem(){var color=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var format=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var disableHexInputFallback=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;_classCallCheck(this,ColorItem);this.replace(color,format,disableHexInputFallback)}_createClass(ColorItem,[{key:"replace",value:function replace(color){var format=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var disableHexInputFallback=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;format=ColorItem.sanitizeFormat(format);this._original={color,format,valid:true};this._color=ColorItem.parse(color,disableHexInputFallback);if(this._color===null){this._color=(0,_color2.default)();this._original.valid=false;return}this._format=format?format:ColorItem.isHex(color)?"hex":this._color.model}},{key:"isValid",value:function isValid(){return this._original.valid===true}},{key:"setHueRatio",value:function setHueRatio(h){this.hue=(1-h)*360}},{key:"setSaturationRatio",value:function setSaturationRatio(s){this.saturation=s*100}},{key:"setValueRatio",value:function setValueRatio(v){this.value=(1-v)*100}},{key:"setAlphaRatio",value:function setAlphaRatio(a){this.alpha=1-a}},{key:"isDesaturated",value:function isDesaturated(){return this.saturation===0}},{key:"isTransparent",value:function isTransparent(){return this.alpha===0}},{key:"hasTransparency",value:function hasTransparency(){return this.hasAlpha()&&this.alpha<1}},{key:"hasAlpha",value:function hasAlpha(){return!isNaN(this.alpha)}},{key:"toObject",value:function toObject(){return new HSVAColor(this.hue,this.saturation,this.value,this.alpha)}},{key:"toHsva",value:function toHsva(){return this.toObject()}},{key:"toHsvaRatio",value:function toHsvaRatio(){return new HSVAColor(this.hue/360,this.saturation/100,this.value/100,this.alpha)}},{key:"toString",value:function toString(){return this.string()}},{key:"string",value:function string(){var format=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;format=ColorItem.sanitizeFormat(format?format:this.format);if(!format){return this._color.round().string()}if(this._color[format]===undefined){throw new Error("Unsupported color format: '"+format+"'")}var str=this._color[format]();return str.round?str.round().string():str}},{key:"equals",value:function equals(color){color=color instanceof ColorItem?color:new ColorItem(color);if(!color.isValid()||!this.isValid()){return false}return this.hue===color.hue&&this.saturation===color.saturation&&this.value===color.value&&this.alpha===color.alpha}},{key:"getClone",value:function getClone(){return new ColorItem(this._color,this.format)}},{key:"getCloneHueOnly",value:function getCloneHueOnly(){return new ColorItem([this.hue,100,100,1],this.format)}},{key:"getCloneOpaque",value:function getCloneOpaque(){return new ColorItem(this._color.alpha(1),this.format)}},{key:"toRgbString",value:function toRgbString(){return this.string("rgb")}},{key:"toHexString",value:function toHexString(){return this.string("hex")}},{key:"toHslString",value:function toHslString(){return this.string("hsl")}},{key:"isDark",value:function isDark(){return this._color.isDark()}},{key:"isLight",value:function isLight(){return this._color.isLight()}},{key:"generate",value:function generate(formula){var hues=[];if(Array.isArray(formula)){hues=formula}else if(!ColorItem.colorFormulas.hasOwnProperty(formula)){throw new Error("No color formula found with the name '"+formula+"'.")}else{hues=ColorItem.colorFormulas[formula]}var colors=[],mainColor=this._color,format=this.format;hues.forEach(function(hue){var levels=[hue?(mainColor.hue()+hue)%360:mainColor.hue(),mainColor.saturationv(),mainColor.value(),mainColor.alpha()];colors.push(new ColorItem(levels,format))});return colors}},{key:"hue",get:function get(){return this._color.hue()},set:function set(value){this._color=this._color.hue(value)}},{key:"saturation",get:function get(){return this._color.saturationv()},set:function set(value){this._color=this._color.saturationv(value)}},{key:"value",get:function get(){return this._color.value()},set:function set(value){this._color=this._color.value(value)}},{key:"alpha",get:function get(){var a=this._color.alpha();return isNaN(a)?1:a},set:function set(value){this._color=this._color.alpha(Math.round(value*100)/100)}},{key:"format",get:function get(){return this._format?this._format:this._color.model},set:function set(value){this._format=ColorItem.sanitizeFormat(value)}}],[{key:"parse",value:function parse(color){var disableHexInputFallback=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(color instanceof _color2.default){return color}if(color instanceof ColorItem){return color._color}var format=null;if(color instanceof HSVAColor){color=[color.h,color.s,color.v,isNaN(color.a)?1:color.a]}else{color=ColorItem.sanitizeString(color)}if(color===null){return null}if(Array.isArray(color)){format="hsv"}if(ColorItem.isHex(color)&&color.length!==6&&color.length!==7&&disableHexInputFallback){return null}try{return(0,_color2.default)(color,format)}catch(e){return null}}},{key:"sanitizeString",value:function sanitizeString(str){if(!(typeof str==="string"||str instanceof String)){return str}if(str.match(/^[0-9a-f]{2,}$/i)){return"#"+str}if(str.toLowerCase()==="transparent"){return"#FFFFFF00"}return str}},{key:"isHex",value:function isHex(str){if(!(typeof str==="string"||str instanceof String)){return false}return!!str.match(/^#?[0-9a-f]{2,}$/i)}},{key:"sanitizeFormat",value:function sanitizeFormat(format){switch(format){case"hex":case"hex3":case"hex4":case"hex6":case"hex8":return"hex";case"rgb":case"rgba":case"keyword":case"name":return"rgb";case"hsl":case"hsla":case"hsv":case"hsva":case"hwb":case"hwba":return"hsl";default:return""}}}]);return ColorItem}();ColorItem.colorFormulas={complementary:[180],triad:[0,120,240],tetrad:[0,90,180,270],splitcomplement:[0,72,216]};exports.default=ColorItem;exports.HSVAColor=HSVAColor;exports.ColorItem=ColorItem},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var sassVars={bar_size_short:16,base_margin:6,columns:6};var sliderSize=sassVars.bar_size_short*sassVars.columns+sassVars.base_margin*(sassVars.columns-1);exports.default={customClass:null,color:false,fallbackColor:false,format:"auto",horizontal:false,inline:false,container:false,popover:{animation:true,placement:"bottom",fallbackPlacement:"flip"},debug:false,input:"input",addon:".colorpicker-input-addon",autoInputFallback:true,autoHexInputFallback:true,useHashPrefix:true,useAlpha:true,template:'<div class="colorpicker">\n <div class="colorpicker-saturation"><i class="colorpicker-guide"></i></div>\n <div class="colorpicker-hue"><i class="colorpicker-guide"></i></div>\n <div class="colorpicker-alpha">\n <div class="colorpicker-alpha-color"></div>\n <i class="colorpicker-guide"></i>\n </div>\n </div>',extensions:[{name:"preview",options:{showText:true}}],sliders:{saturation:{selector:".colorpicker-saturation",maxLeft:sliderSize,maxTop:sliderSize,callLeft:"setSaturationRatio",callTop:"setValueRatio"},hue:{selector:".colorpicker-hue",maxLeft:0,maxTop:sliderSize,callLeft:false,callTop:"setHueRatio"},alpha:{selector:".colorpicker-alpha",childSelector:".colorpicker-alpha-color",maxLeft:0,maxTop:sliderSize,callLeft:false,callTop:"setAlphaRatio"}},slidersHorz:{saturation:{selector:".colorpicker-saturation",maxLeft:sliderSize,maxTop:sliderSize,callLeft:"setSaturationRatio",callTop:"setValueRatio"},hue:{selector:".colorpicker-hue",maxLeft:sliderSize,maxTop:0,callLeft:"setHueRatio",callTop:false},alpha:{selector:".colorpicker-alpha",childSelector:".colorpicker-alpha-color",maxLeft:sliderSize,maxTop:0,callLeft:"setAlphaRatio",callTop:false}}};module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _Extension2=__webpack_require__(1);var _Extension3=_interopRequireDefault(_Extension2);var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var defaults={colors:null,namesAsValues:true};var Palette=function(_Extension){_inherits(Palette,_Extension);_createClass(Palette,[{key:"colors",get:function get(){return this.options.colors}}]);function Palette(colorpicker){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Palette);var _this=_possibleConstructorReturn(this,(Palette.__proto__||Object.getPrototypeOf(Palette)).call(this,colorpicker,_jquery2.default.extend(true,{},defaults,options)));if(!Array.isArray(_this.options.colors)&&_typeof(_this.options.colors)!=="object"){_this.options.colors=null}return _this}_createClass(Palette,[{key:"getLength",value:function getLength(){if(!this.options.colors){return 0}if(Array.isArray(this.options.colors)){return this.options.colors.length}if(_typeof(this.options.colors)==="object"){return Object.keys(this.options.colors).length}return 0}},{key:"resolveColor",value:function resolveColor(color){var realColor=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;if(this.getLength()<=0){return false}if(Array.isArray(this.options.colors)){if(this.options.colors.indexOf(color)>=0){return color}if(this.options.colors.indexOf(color.toUpperCase())>=0){return color.toUpperCase()}if(this.options.colors.indexOf(color.toLowerCase())>=0){return color.toLowerCase()}return false}if(_typeof(this.options.colors)!=="object"){return false}if(!this.options.namesAsValues||realColor){return this.getValue(color,false)}return this.getName(color,this.getName("#"+color))}},{key:"getName",value:function getName(value){var defaultValue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!(typeof value==="string")||!this.options.colors){return defaultValue}for(var name in this.options.colors){if(!this.options.colors.hasOwnProperty(name)){continue}if(this.options.colors[name].toLowerCase()===value.toLowerCase()){return name}}return defaultValue}},{key:"getValue",value:function getValue(name){var defaultValue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!(typeof name==="string")||!this.options.colors){return defaultValue}if(this.options.colors.hasOwnProperty(name)){return this.options.colors[name]}return defaultValue}}]);return Palette}(_Extension3.default);exports.default=Palette;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";module.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(module,exports,__webpack_require__){var cssKeywords=__webpack_require__(5);var reverseKeywords={};for(var key in cssKeywords){if(cssKeywords.hasOwnProperty(key)){reverseKeywords[cssKeywords[key]]=key}}var convert=module.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var model in convert){if(convert.hasOwnProperty(model)){if(!("channels"in convert[model])){throw new Error("missing channels property: "+model)}if(!("labels"in convert[model])){throw new Error("missing channel labels property: "+model)}if(convert[model].labels.length!==convert[model].channels){throw new Error("channel and label counts mismatch: "+model)}var channels=convert[model].channels;var labels=convert[model].labels;delete convert[model].channels;delete convert[model].labels;Object.defineProperty(convert[model],"channels",{value:channels});Object.defineProperty(convert[model],"labels",{value:labels})}}convert.rgb.hsl=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var min=Math.min(r,g,b);var max=Math.max(r,g,b);var delta=max-min;var h;var s;var l;if(max===min){h=0}else if(r===max){h=(g-b)/delta}else if(g===max){h=2+(b-r)/delta}else if(b===max){h=4+(r-g)/delta}h=Math.min(h*60,360);if(h<0){h+=360}l=(min+max)/2;if(max===min){s=0}else if(l<=.5){s=delta/(max+min)}else{s=delta/(2-max-min)}return[h,s*100,l*100]};convert.rgb.hsv=function(rgb){var rdif;var gdif;var bdif;var h;var s;var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var v=Math.max(r,g,b);var diff=v-Math.min(r,g,b);var diffc=function(c){return(v-c)/6/diff+1/2};if(diff===0){h=s=0}else{s=diff/v;rdif=diffc(r);gdif=diffc(g);bdif=diffc(b);if(r===v){h=bdif-gdif}else if(g===v){h=1/3+rdif-bdif}else if(b===v){h=2/3+gdif-rdif}if(h<0){h+=1}else if(h>1){h-=1}}return[h*360,s*100,v*100]};convert.rgb.hwb=function(rgb){var r=rgb[0];var g=rgb[1];var b=rgb[2];var h=convert.rgb.hsl(rgb)[0];var w=1/255*Math.min(r,Math.min(g,b));b=1-1/255*Math.max(r,Math.max(g,b));return[h,w*100,b*100]};convert.rgb.cmyk=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var c;var m;var y;var k;k=Math.min(1-r,1-g,1-b);c=(1-r-k)/(1-k)||0;m=(1-g-k)/(1-k)||0;y=(1-b-k)/(1-k)||0;return[c*100,m*100,y*100,k*100]};function comparativeDistance(x,y){return Math.pow(x[0]-y[0],2)+Math.pow(x[1]-y[1],2)+Math.pow(x[2]-y[2],2)}convert.rgb.keyword=function(rgb){var reversed=reverseKeywords[rgb];if(reversed){return reversed}var currentClosestDistance=Infinity;var currentClosestKeyword;for(var keyword in cssKeywords){if(cssKeywords.hasOwnProperty(keyword)){var value=cssKeywords[keyword];var distance=comparativeDistance(rgb,value);if(distance<currentClosestDistance){currentClosestDistance=distance;currentClosestKeyword=keyword}}}return currentClosestKeyword};convert.keyword.rgb=function(keyword){return cssKeywords[keyword]};convert.rgb.xyz=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;g=g>.04045?Math.pow((g+.055)/1.055,2.4):g/12.92;b=b>.04045?Math.pow((b+.055)/1.055,2.4):b/12.92;var x=r*.4124+g*.3576+b*.1805;var y=r*.2126+g*.7152+b*.0722;var z=r*.0193+g*.1192+b*.9505;return[x*100,y*100,z*100]};convert.rgb.lab=function(rgb){var xyz=convert.rgb.xyz(rgb);var x=xyz[0];var y=xyz[1];var z=xyz[2];var l;var a;var b;x/=95.047;y/=100;z/=108.883;x=x>.008856?Math.pow(x,1/3):7.787*x+16/116;y=y>.008856?Math.pow(y,1/3):7.787*y+16/116;z=z>.008856?Math.pow(z,1/3):7.787*z+16/116;l=116*y-16;a=500*(x-y);b=200*(y-z);return[l,a,b]};convert.hsl.rgb=function(hsl){var h=hsl[0]/360;var s=hsl[1]/100;var l=hsl[2]/100;var t1;var t2;var t3;var rgb;var val;if(s===0){val=l*255;return[val,val,val]}if(l<.5){t2=l*(1+s)}else{t2=l+s-l*s}t1=2*l-t2;rgb=[0,0,0];for(var i=0;i<3;i++){t3=h+1/3*-(i-1);if(t3<0){t3++}if(t3>1){t3--}if(6*t3<1){val=t1+(t2-t1)*6*t3}else if(2*t3<1){val=t2}else if(3*t3<2){val=t1+(t2-t1)*(2/3-t3)*6}else{val=t1}rgb[i]=val*255}return rgb};convert.hsl.hsv=function(hsl){var h=hsl[0];var s=hsl[1]/100;var l=hsl[2]/100;var smin=s;var lmin=Math.max(l,.01);var sv;var v;l*=2;s*=l<=1?l:2-l;smin*=lmin<=1?lmin:2-lmin;v=(l+s)/2;sv=l===0?2*smin/(lmin+smin):2*s/(l+s);return[h,sv*100,v*100]};convert.hsv.rgb=function(hsv){var h=hsv[0]/60;var s=hsv[1]/100;var v=hsv[2]/100;var hi=Math.floor(h)%6;var f=h-Math.floor(h);var p=255*v*(1-s);var q=255*v*(1-s*f);var t=255*v*(1-s*(1-f));v*=255;switch(hi){case 0:return[v,t,p];case 1:return[q,v,p];case 2:return[p,v,t];case 3:return[p,q,v];case 4:return[t,p,v];case 5:return[v,p,q]}};convert.hsv.hsl=function(hsv){var h=hsv[0];var s=hsv[1]/100;var v=hsv[2]/100;var vmin=Math.max(v,.01);var lmin;var sl;var l;l=(2-s)*v;lmin=(2-s)*vmin;sl=s*vmin;sl/=lmin<=1?lmin:2-lmin;sl=sl||0;l/=2;return[h,sl*100,l*100]};convert.hwb.rgb=function(hwb){var h=hwb[0]/360;var wh=hwb[1]/100;var bl=hwb[2]/100;var ratio=wh+bl;var i;var v;var f;var n;if(ratio>1){wh/=ratio;bl/=ratio}i=Math.floor(6*h);v=1-bl;f=6*h-i;if((i&1)!==0){f=1-f}n=wh+f*(v-wh);var r;var g;var b;switch(i){default:case 6:case 0:r=v;g=n;b=wh;break;case 1:r=n;g=v;b=wh;break;case 2:r=wh;g=v;b=n;break;case 3:r=wh;g=n;b=v;break;case 4:r=n;g=wh;b=v;break;case 5:r=v;g=wh;b=n;break}return[r*255,g*255,b*255]};convert.cmyk.rgb=function(cmyk){var c=cmyk[0]/100;var m=cmyk[1]/100;var y=cmyk[2]/100;var k=cmyk[3]/100;var r;var g;var b;r=1-Math.min(1,c*(1-k)+k);g=1-Math.min(1,m*(1-k)+k);b=1-Math.min(1,y*(1-k)+k);return[r*255,g*255,b*255]};convert.xyz.rgb=function(xyz){var x=xyz[0]/100;var y=xyz[1]/100;var z=xyz[2]/100;var r;var g;var b;r=x*3.2406+y*-1.5372+z*-.4986;g=x*-.9689+y*1.8758+z*.0415;b=x*.0557+y*-.204+z*1.057;r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92;g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g*12.92;b=b>.0031308?1.055*Math.pow(b,1/2.4)-.055:b*12.92;r=Math.min(Math.max(0,r),1);g=Math.min(Math.max(0,g),1);b=Math.min(Math.max(0,b),1);return[r*255,g*255,b*255]};convert.xyz.lab=function(xyz){var x=xyz[0];var y=xyz[1];var z=xyz[2];var l;var a;var b;x/=95.047;y/=100;z/=108.883;x=x>.008856?Math.pow(x,1/3):7.787*x+16/116;y=y>.008856?Math.pow(y,1/3):7.787*y+16/116;z=z>.008856?Math.pow(z,1/3):7.787*z+16/116;l=116*y-16;a=500*(x-y);b=200*(y-z);return[l,a,b]};convert.lab.xyz=function(lab){var l=lab[0];var a=lab[1];var b=lab[2];var x;var y;var z;y=(l+16)/116;x=a/500+y;z=y-b/200;var y2=Math.pow(y,3);var x2=Math.pow(x,3);var z2=Math.pow(z,3);y=y2>.008856?y2:(y-16/116)/7.787;x=x2>.008856?x2:(x-16/116)/7.787;z=z2>.008856?z2:(z-16/116)/7.787;x*=95.047;y*=100;z*=108.883;return[x,y,z]};convert.lab.lch=function(lab){var l=lab[0];var a=lab[1];var b=lab[2];var hr;var h;var c;hr=Math.atan2(b,a);h=hr*360/2/Math.PI;if(h<0){h+=360}c=Math.sqrt(a*a+b*b);return[l,c,h]};convert.lch.lab=function(lch){var l=lch[0];var c=lch[1];var h=lch[2];var a;var b;var hr;hr=h/360*2*Math.PI;a=c*Math.cos(hr);b=c*Math.sin(hr);return[l,a,b]};convert.rgb.ansi16=function(args){var r=args[0];var g=args[1];var b=args[2];var value=1 in arguments?arguments[1]:convert.rgb.hsv(args)[2];value=Math.round(value/50);if(value===0){return 30}var ansi=30+(Math.round(b/255)<<2|Math.round(g/255)<<1|Math.round(r/255));if(value===2){ansi+=60}return ansi};convert.hsv.ansi16=function(args){return convert.rgb.ansi16(convert.hsv.rgb(args),args[2])};convert.rgb.ansi256=function(args){var r=args[0];var g=args[1];var b=args[2];if(r===g&&g===b){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}var ansi=16+36*Math.round(r/255*5)+6*Math.round(g/255*5)+Math.round(b/255*5);return ansi};convert.ansi16.rgb=function(args){var color=args%10;if(color===0||color===7){if(args>50){color+=3.5}color=color/10.5*255;return[color,color,color]}var mult=(~~(args>50)+1)*.5;var r=(color&1)*mult*255;var g=(color>>1&1)*mult*255;var b=(color>>2&1)*mult*255;return[r,g,b]};convert.ansi256.rgb=function(args){if(args>=232){var c=(args-232)*10+8;return[c,c,c]}args-=16;var rem;var r=Math.floor(args/36)/5*255;var g=Math.floor((rem=args%36)/6)/5*255;var b=rem%6/5*255;return[r,g,b]};convert.rgb.hex=function(args){var integer=((Math.round(args[0])&255)<<16)+((Math.round(args[1])&255)<<8)+(Math.round(args[2])&255);var string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.hex.rgb=function(args){var match=args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!match){return[0,0,0]}var colorString=match[0];if(match[0].length===3){colorString=colorString.split("").map(function(char){return char+char}).join("")}var integer=parseInt(colorString,16);var r=integer>>16&255;var g=integer>>8&255;var b=integer&255;return[r,g,b]};convert.rgb.hcg=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var max=Math.max(Math.max(r,g),b);var min=Math.min(Math.min(r,g),b);var chroma=max-min;var grayscale;var hue;if(chroma<1){grayscale=min/(1-chroma)}else{grayscale=0}if(chroma<=0){hue=0}else if(max===r){hue=(g-b)/chroma%6}else if(max===g){hue=2+(b-r)/chroma}else{hue=4+(r-g)/chroma+4}hue/=6;hue%=1;return[hue*360,chroma*100,grayscale*100]};convert.hsl.hcg=function(hsl){var s=hsl[1]/100;var l=hsl[2]/100;var c=1;var f=0;if(l<.5){c=2*s*l}else{c=2*s*(1-l)}if(c<1){f=(l-.5*c)/(1-c)}return[hsl[0],c*100,f*100]};convert.hsv.hcg=function(hsv){var s=hsv[1]/100;var v=hsv[2]/100;var c=s*v;var f=0;if(c<1){f=(v-c)/(1-c)}return[hsv[0],c*100,f*100]};convert.hcg.rgb=function(hcg){var h=hcg[0]/360;var c=hcg[1]/100;var g=hcg[2]/100;if(c===0){return[g*255,g*255,g*255]}var pure=[0,0,0];var hi=h%1*6;var v=hi%1;var w=1-v;var mg=0;switch(Math.floor(hi)){case 0:pure[0]=1;pure[1]=v;pure[2]=0;break;case 1:pure[0]=w;pure[1]=1;pure[2]=0;break;case 2:pure[0]=0;pure[1]=1;pure[2]=v;break;case 3:pure[0]=0;pure[1]=w;pure[2]=1;break;case 4:pure[0]=v;pure[1]=0;pure[2]=1;break;default:pure[0]=1;pure[1]=0;pure[2]=w}mg=(1-c)*g;return[(c*pure[0]+mg)*255,(c*pure[1]+mg)*255,(c*pure[2]+mg)*255]};convert.hcg.hsv=function(hcg){var c=hcg[1]/100;var g=hcg[2]/100;var v=c+g*(1-c);var f=0;if(v>0){f=c/v}return[hcg[0],f*100,v*100]};convert.hcg.hsl=function(hcg){var c=hcg[1]/100;var g=hcg[2]/100;var l=g*(1-c)+.5*c;var s=0;if(l>0&&l<.5){s=c/(2*l)}else if(l>=.5&&l<1){s=c/(2*(1-l))}return[hcg[0],s*100,l*100]};convert.hcg.hwb=function(hcg){var c=hcg[1]/100;var g=hcg[2]/100;var v=c+g*(1-c);return[hcg[0],(v-c)*100,(1-v)*100]};convert.hwb.hcg=function(hwb){var w=hwb[1]/100;var b=hwb[2]/100;var v=1-b;var c=v-w;var g=0;if(c<1){g=(v-c)/(1-c)}return[hwb[0],c*100,g*100]};convert.apple.rgb=function(apple){return[apple[0]/65535*255,apple[1]/65535*255,apple[2]/65535*255]};convert.rgb.apple=function(rgb){return[rgb[0]/255*65535,rgb[1]/255*65535,rgb[2]/255*65535]};convert.gray.rgb=function(args){return[args[0]/100*255,args[0]/100*255,args[0]/100*255]};convert.gray.hsl=convert.gray.hsv=function(args){return[0,0,args[0]]};convert.gray.hwb=function(gray){return[0,100,gray[0]]};convert.gray.cmyk=function(gray){return[0,0,0,gray[0]]};convert.gray.lab=function(gray){return[gray[0],0,0]};convert.gray.hex=function(gray){var val=Math.round(gray[0]/100*255)&255;var integer=(val<<16)+(val<<8)+val;var string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.rgb.gray=function(rgb){var val=(rgb[0]+rgb[1]+rgb[2])/3;return[val/255*100]}},function(module,exports,__webpack_require__){"use strict";var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};var _Colorpicker=__webpack_require__(8);var _Colorpicker2=_interopRequireDefault(_Colorpicker);var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var plugin="colorpicker";_jquery2.default[plugin]=_Colorpicker2.default;_jquery2.default.fn[plugin]=function(option){var fnArgs=Array.prototype.slice.call(arguments,1),isSingleElement=this.length===1,returnValue=null;var $elements=this.each(function(){var $this=(0,_jquery2.default)(this),inst=$this.data(plugin),options=(typeof option==="undefined"?"undefined":_typeof(option))==="object"?option:{};if(!inst){inst=new _Colorpicker2.default(this,options);$this.data(plugin,inst)}if(!isSingleElement){return}returnValue=$this;if(typeof option==="string"){if(option==="colorpicker"){returnValue=inst}else if(_jquery2.default.isFunction(inst[option])){returnValue=inst[option].apply(inst,fnArgs)}else{returnValue=inst[option]}}});return isSingleElement?returnValue:$elements};_jquery2.default.fn[plugin].constructor=_Colorpicker2.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _Extension=__webpack_require__(1);var _Extension2=_interopRequireDefault(_Extension);var _options=__webpack_require__(3);var _options2=_interopRequireDefault(_options);var _extensions=__webpack_require__(9);var _extensions2=_interopRequireDefault(_extensions);var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);var _SliderHandler=__webpack_require__(13);var _SliderHandler2=_interopRequireDefault(_SliderHandler);var _PopupHandler=__webpack_require__(14);var _PopupHandler2=_interopRequireDefault(_PopupHandler);var _InputHandler=__webpack_require__(15);var _InputHandler2=_interopRequireDefault(_InputHandler);var _ColorHandler=__webpack_require__(22);var _ColorHandler2=_interopRequireDefault(_ColorHandler);var _PickerHandler=__webpack_require__(23);var _PickerHandler2=_interopRequireDefault(_PickerHandler);var _AddonHandler=__webpack_require__(24);var _AddonHandler2=_interopRequireDefault(_AddonHandler);var _ColorItem=__webpack_require__(2);var _ColorItem2=_interopRequireDefault(_ColorItem);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var colorPickerIdCounter=0;var root=typeof self!=="undefined"?self:undefined;var Colorpicker=function(){_createClass(Colorpicker,[{key:"color",get:function get(){return this.colorHandler.color}},{key:"format",get:function get(){return this.colorHandler.format}},{key:"picker",get:function get(){return this.pickerHandler.picker}}],[{key:"Color",get:function get(){return _ColorItem2.default}},{key:"Extension",get:function get(){return _Extension2.default}}]);function Colorpicker(element,options){_classCallCheck(this,Colorpicker);colorPickerIdCounter+=1;this.id=colorPickerIdCounter;this.lastEvent={alias:null,e:null};this.element=(0,_jquery2.default)(element).addClass("colorpicker-element").attr("data-colorpicker-id",this.id);this.options=_jquery2.default.extend(true,{},_options2.default,options,this.element.data());this.disabled=false;this.extensions=[];this.container=this.options.container===true||this.options.container!==true&&this.options.inline===true?this.element:this.options.container;this.container=this.container!==false?(0,_jquery2.default)(this.container):false;this.inputHandler=new _InputHandler2.default(this);this.colorHandler=new _ColorHandler2.default(this);this.sliderHandler=new _SliderHandler2.default(this);this.popupHandler=new _PopupHandler2.default(this,root);this.pickerHandler=new _PickerHandler2.default(this);this.addonHandler=new _AddonHandler2.default(this);this.init();(0,_jquery2.default)(_jquery2.default.proxy(function(){this.trigger("colorpickerCreate")},this))}_createClass(Colorpicker,[{key:"init",value:function init(){this.addonHandler.bind();this.inputHandler.bind();this.initExtensions();this.colorHandler.bind();this.pickerHandler.bind();this.sliderHandler.bind();this.popupHandler.bind();this.pickerHandler.attach();this.update();if(this.inputHandler.isDisabled()){this.disable()}}},{key:"initExtensions",value:function initExtensions(){var _this=this;if(!Array.isArray(this.options.extensions)){this.options.extensions=[]}if(this.options.debug){this.options.extensions.push({name:"debugger"})}this.options.extensions.forEach(function(ext){_this.registerExtension(Colorpicker.extensions[ext.name.toLowerCase()],ext.options||{})})}},{key:"registerExtension",value:function registerExtension(ExtensionClass){var config=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var ext=new ExtensionClass(this,config);this.extensions.push(ext);return ext}},{key:"destroy",value:function destroy(){var color=this.color;this.sliderHandler.unbind();this.inputHandler.unbind();this.popupHandler.unbind();this.colorHandler.unbind();this.addonHandler.unbind();this.pickerHandler.unbind();this.element.removeClass("colorpicker-element").removeData("colorpicker").removeData("color").off(".colorpicker");this.trigger("colorpickerDestroy",color)}},{key:"show",value:function show(e){this.popupHandler.show(e)}},{key:"hide",value:function hide(e){this.popupHandler.hide(e)}},{key:"toggle",value:function toggle(e){this.popupHandler.toggle(e)}},{key:"getValue",value:function getValue(){var defaultValue=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var val=this.colorHandler.color;val=val instanceof _ColorItem2.default?val:defaultValue;if(val instanceof _ColorItem2.default){return val.string(this.format)}return val}},{key:"setValue",value:function setValue(val){if(this.isDisabled()){return}var ch=this.colorHandler;if(ch.hasColor()&&!!val&&ch.color.equals(val)||!ch.hasColor()&&!val){return}ch.color=val?ch.createColor(val,this.options.autoInputFallback,this.options.autoHexInputFallback):null;this.trigger("colorpickerChange",ch.color,val);this.update()}},{key:"update",value:function update(){if(this.colorHandler.hasColor()){this.inputHandler.update()}else{this.colorHandler.assureColor()}this.addonHandler.update();this.pickerHandler.update();this.trigger("colorpickerUpdate")}},{key:"enable",value:function enable(){this.inputHandler.enable();this.disabled=false;this.picker.removeClass("colorpicker-disabled");this.trigger("colorpickerEnable");return true}},{key:"disable",value:function disable(){this.inputHandler.disable();this.disabled=true;this.picker.addClass("colorpicker-disabled");this.trigger("colorpickerDisable");return true}},{key:"isEnabled",value:function isEnabled(){return!this.isDisabled()}},{key:"isDisabled",value:function isDisabled(){return this.disabled===true}},{key:"trigger",value:function trigger(eventName){var color=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var value=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;this.element.trigger({type:eventName,colorpicker:this,color:color?color:this.color,value:value?value:this.getValue()})}}]);return Colorpicker}();Colorpicker.extensions=_extensions2.default;exports.default=Colorpicker;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Palette=exports.Swatches=exports.Preview=exports.Debugger=undefined;var _Debugger=__webpack_require__(10);var _Debugger2=_interopRequireDefault(_Debugger);var _Preview=__webpack_require__(11);var _Preview2=_interopRequireDefault(_Preview);var _Swatches=__webpack_require__(12);var _Swatches2=_interopRequireDefault(_Swatches);var _Palette=__webpack_require__(4);var _Palette2=_interopRequireDefault(_Palette);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.Debugger=_Debugger2.default;exports.Preview=_Preview2.default;exports.Swatches=_Swatches2.default;exports.Palette=_Palette2.default;exports.default={debugger:_Debugger2.default,preview:_Preview2.default,swatches:_Swatches2.default,palette:_Palette2.default}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _get=function get(object,property,receiver){if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined}else{return get(parent,property,receiver)}}else if("value"in desc){return desc.value}else{var getter=desc.get;if(getter===undefined){return undefined}return getter.call(receiver)}};var _Extension2=__webpack_require__(1);var _Extension3=_interopRequireDefault(_Extension2);var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Debugger=function(_Extension){_inherits(Debugger,_Extension);function Debugger(colorpicker){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Debugger);var _this=_possibleConstructorReturn(this,(Debugger.__proto__||Object.getPrototypeOf(Debugger)).call(this,colorpicker,options));_this.eventCounter=0;if(_this.colorpicker.inputHandler.hasInput()){_this.colorpicker.inputHandler.input.on("change.colorpicker-ext",_jquery2.default.proxy(_this.onChangeInput,_this))}return _this}_createClass(Debugger,[{key:"log",value:function log(eventName){var _console;for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}this.eventCounter+=1;var logMessage="#"+this.eventCounter+": Colorpicker#"+this.colorpicker.id+" ["+eventName+"]";(_console=console).debug.apply(_console,[logMessage].concat(args));this.colorpicker.element.trigger({type:"colorpickerDebug",colorpicker:this.colorpicker,color:this.color,value:null,debug:{debugger:this,eventName,logArgs:args,logMessage}})}},{key:"resolveColor",value:function resolveColor(color){var realColor=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;this.log("resolveColor()",color,realColor);return false}},{key:"onCreate",value:function onCreate(event){this.log("colorpickerCreate");return _get(Debugger.prototype.__proto__||Object.getPrototypeOf(Debugger.prototype),"onCreate",this).call(this,event)}},{key:"onDestroy",value:function onDestroy(event){this.log("colorpickerDestroy");this.eventCounter=0;if(this.colorpicker.inputHandler.hasInput()){this.colorpicker.inputHandler.input.off(".colorpicker-ext")}return _get(Debugger.prototype.__proto__||Object.getPrototypeOf(Debugger.prototype),"onDestroy",this).call(this,event)}},{key:"onUpdate",value:function onUpdate(event){this.log("colorpickerUpdate")}},{key:"onChangeInput",value:function onChangeInput(event){this.log("input:change.colorpicker",event.value,event.color)}},{key:"onChange",value:function onChange(event){this.log("colorpickerChange",event.value,event.color)}},{key:"onInvalid",value:function onInvalid(event){this.log("colorpickerInvalid",event.value,event.color)}},{key:"onHide",value:function onHide(event){this.log("colorpickerHide");this.eventCounter=0}},{key:"onShow",value:function onShow(event){this.log("colorpickerShow")}},{key:"onDisable",value:function onDisable(event){this.log("colorpickerDisable")}},{key:"onEnable",value:function onEnable(event){this.log("colorpickerEnable")}}]);return Debugger}(_Extension3.default);exports.default=Debugger;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _get=function get(object,property,receiver){if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined}else{return get(parent,property,receiver)}}else if("value"in desc){return desc.value}else{var getter=desc.get;if(getter===undefined){return undefined}return getter.call(receiver)}};var _Extension2=__webpack_require__(1);var _Extension3=_interopRequireDefault(_Extension2);var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Preview=function(_Extension){_inherits(Preview,_Extension);function Preview(colorpicker){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Preview);var _this=_possibleConstructorReturn(this,(Preview.__proto__||Object.getPrototypeOf(Preview)).call(this,colorpicker,_jquery2.default.extend(true,{},{template:'<div class="colorpicker-bar colorpicker-preview"><div /></div>',showText:true,format:colorpicker.format},options)));_this.element=(0,_jquery2.default)(_this.options.template);_this.elementInner=_this.element.find("div");return _this}_createClass(Preview,[{key:"onCreate",value:function onCreate(event){_get(Preview.prototype.__proto__||Object.getPrototypeOf(Preview.prototype),"onCreate",this).call(this,event);this.colorpicker.picker.append(this.element)}},{key:"onUpdate",value:function onUpdate(event){_get(Preview.prototype.__proto__||Object.getPrototypeOf(Preview.prototype),"onUpdate",this).call(this,event);if(!event.color){this.elementInner.css("backgroundColor",null).css("color",null).html("");return}this.elementInner.css("backgroundColor",event.color.toRgbString());if(this.options.showText){this.elementInner.html(event.color.string(this.options.format||this.colorpicker.format));if(event.color.isDark()&&event.color.alpha>.5){this.elementInner.css("color","white")}else{this.elementInner.css("color","black")}}}}]);return Preview}(_Extension3.default);exports.default=Preview;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _get=function get(object,property,receiver){if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined}else{return get(parent,property,receiver)}}else if("value"in desc){return desc.value}else{var getter=desc.get;if(getter===undefined){return undefined}return getter.call(receiver)}};var _Palette2=__webpack_require__(4);var _Palette3=_interopRequireDefault(_Palette2);var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var defaults={barTemplate:'<div class="colorpicker-bar colorpicker-swatches">\n <div class="colorpicker-swatches--inner"></div>\n </div>',swatchTemplate:'<i class="colorpicker-swatch"><i class="colorpicker-swatch--inner"></i></i>'};var Swatches=function(_Palette){_inherits(Swatches,_Palette);function Swatches(colorpicker){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Swatches);var _this=_possibleConstructorReturn(this,(Swatches.__proto__||Object.getPrototypeOf(Swatches)).call(this,colorpicker,_jquery2.default.extend(true,{},defaults,options)));_this.element=null;return _this}_createClass(Swatches,[{key:"isEnabled",value:function isEnabled(){return this.getLength()>0}},{key:"onCreate",value:function onCreate(event){_get(Swatches.prototype.__proto__||Object.getPrototypeOf(Swatches.prototype),"onCreate",this).call(this,event);if(!this.isEnabled()){return}this.element=(0,_jquery2.default)(this.options.barTemplate);this.load();this.colorpicker.picker.append(this.element)}},{key:"load",value:function load(){var _this2=this;var colorpicker=this.colorpicker,swatchContainer=this.element.find(".colorpicker-swatches--inner"),isAliased=this.options.namesAsValues===true&&!Array.isArray(this.colors);swatchContainer.empty();_jquery2.default.each(this.colors,function(name,value){var $swatch=(0,_jquery2.default)(_this2.options.swatchTemplate).attr("data-name",name).attr("data-value",value).attr("title",isAliased?name+": "+value:value).on("mousedown.colorpicker touchstart.colorpicker",function(e){var $sw=(0,_jquery2.default)(this);colorpicker.setValue(isAliased?$sw.attr("data-name"):$sw.attr("data-value"))});$swatch.find(".colorpicker-swatch--inner").css("background-color",value);swatchContainer.append($swatch)});swatchContainer.append((0,_jquery2.default)('<i class="colorpicker-clear"></i>'))}}]);return Swatches}(_Palette3.default);exports.default=Swatches;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var SliderHandler=function(){function SliderHandler(colorpicker){_classCallCheck(this,SliderHandler);this.colorpicker=colorpicker;this.currentSlider=null;this.mousePointer={left:0,top:0};this.onMove=_jquery2.default.proxy(this.defaultOnMove,this)}_createClass(SliderHandler,[{key:"defaultOnMove",value:function defaultOnMove(top,left){if(!this.currentSlider){return}var slider=this.currentSlider,cp=this.colorpicker,ch=cp.colorHandler;var color=!ch.hasColor()?ch.getFallbackColor():ch.color.getClone();slider.guideStyle.left=left+"px";slider.guideStyle.top=top+"px";if(slider.callLeft){color[slider.callLeft](left/slider.maxLeft)}if(slider.callTop){color[slider.callTop](top/slider.maxTop)}cp.setValue(color);cp.popupHandler.focus()}},{key:"bind",value:function bind(){var sliders=this.colorpicker.options.horizontal?this.colorpicker.options.slidersHorz:this.colorpicker.options.sliders;var sliderClasses=[];for(var sliderName in sliders){if(!sliders.hasOwnProperty(sliderName)){continue}sliderClasses.push(sliders[sliderName].selector)}this.colorpicker.picker.find(sliderClasses.join(", ")).on("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.pressed,this))}},{key:"unbind",value:function unbind(){(0,_jquery2.default)(this.colorpicker.picker).off({"mousemove.colorpicker":_jquery2.default.proxy(this.moved,this),"touchmove.colorpicker":_jquery2.default.proxy(this.moved,this),"mouseup.colorpicker":_jquery2.default.proxy(this.released,this),"touchend.colorpicker":_jquery2.default.proxy(this.released,this)})}},{key:"pressed",value:function pressed(e){if(this.colorpicker.isDisabled()){return}this.colorpicker.lastEvent.alias="pressed";this.colorpicker.lastEvent.e=e;if(!e.pageX&&!e.pageY&&e.originalEvent&&e.originalEvent.touches){e.pageX=e.originalEvent.touches[0].pageX;e.pageY=e.originalEvent.touches[0].pageY}var target=(0,_jquery2.default)(e.target);var zone=target.closest("div");var sliders=this.colorpicker.options.horizontal?this.colorpicker.options.slidersHorz:this.colorpicker.options.sliders;if(zone.is(".colorpicker")){return}this.currentSlider=null;for(var sliderName in sliders){if(!sliders.hasOwnProperty(sliderName)){continue}var slider=sliders[sliderName];if(zone.is(slider.selector)){this.currentSlider=_jquery2.default.extend({},slider,{name:sliderName});break}else if(slider.childSelector!==undefined&&zone.is(slider.childSelector)){this.currentSlider=_jquery2.default.extend({},slider,{name:sliderName});zone=zone.parent();break}}var guide=zone.find(".colorpicker-guide").get(0);if(this.currentSlider===null||guide===null){return}var offset=zone.offset();this.currentSlider.guideStyle=guide.style;this.currentSlider.left=e.pageX-offset.left;this.currentSlider.top=e.pageY-offset.top;this.mousePointer={left:e.pageX,top:e.pageY};(0,_jquery2.default)(this.colorpicker.picker).on({"mousemove.colorpicker":_jquery2.default.proxy(this.moved,this),"touchmove.colorpicker":_jquery2.default.proxy(this.moved,this),"mouseup.colorpicker":_jquery2.default.proxy(this.released,this),"touchend.colorpicker":_jquery2.default.proxy(this.released,this)}).trigger("mousemove")}},{key:"moved",value:function moved(e){this.colorpicker.lastEvent.alias="moved";this.colorpicker.lastEvent.e=e;if(!e.pageX&&!e.pageY&&e.originalEvent&&e.originalEvent.touches){e.pageX=e.originalEvent.touches[0].pageX;e.pageY=e.originalEvent.touches[0].pageY}e.preventDefault();var left=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((e.pageX||this.mousePointer.left)-this.mousePointer.left)));var top=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((e.pageY||this.mousePointer.top)-this.mousePointer.top)));this.onMove(top,left)}},{key:"released",value:function released(e){this.colorpicker.lastEvent.alias="released";this.colorpicker.lastEvent.e=e;(0,_jquery2.default)(this.colorpicker.picker).off({"mousemove.colorpicker":this.moved,"touchmove.colorpicker":this.moved,"mouseup.colorpicker":this.released,"touchend.colorpicker":this.released})}}]);return SliderHandler}();exports.default=SliderHandler;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);var _options=__webpack_require__(3);var _options2=_interopRequireDefault(_options);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var PopupHandler=function(){function PopupHandler(colorpicker,root){_classCallCheck(this,PopupHandler);this.root=root;this.colorpicker=colorpicker;this.popoverTarget=null;this.popoverTip=null;this.clicking=false;this.hidding=false;this.showing=false}_createClass(PopupHandler,[{key:"bind",value:function bind(){var cp=this.colorpicker;if(cp.options.inline){cp.picker.addClass("colorpicker-inline colorpicker-visible");return}cp.picker.addClass("colorpicker-popup colorpicker-hidden");if(!this.hasInput&&!this.hasAddon){return}if(cp.options.popover){this.createPopover()}if(this.hasAddon){if(!this.addon.attr("tabindex")){this.addon.attr("tabindex",0)}this.addon.on({"mousedown.colorpicker touchstart.colorpicker":_jquery2.default.proxy(this.toggle,this)});this.addon.on({"focus.colorpicker":_jquery2.default.proxy(this.show,this)});this.addon.on({"focusout.colorpicker":_jquery2.default.proxy(this.hide,this)})}if(this.hasInput&&!this.hasAddon){this.input.on({"mousedown.colorpicker touchstart.colorpicker":_jquery2.default.proxy(this.show,this),"focus.colorpicker":_jquery2.default.proxy(this.show,this)});this.input.on({"focusout.colorpicker":_jquery2.default.proxy(this.hide,this)})}(0,_jquery2.default)(this.root).on("resize.colorpicker",_jquery2.default.proxy(this.reposition,this))}},{key:"unbind",value:function unbind(){if(this.hasInput){this.input.off({"mousedown.colorpicker touchstart.colorpicker":_jquery2.default.proxy(this.show,this),"focus.colorpicker":_jquery2.default.proxy(this.show,this)});this.input.off({"focusout.colorpicker":_jquery2.default.proxy(this.hide,this)})}if(this.hasAddon){this.addon.off({"mousedown.colorpicker touchstart.colorpicker":_jquery2.default.proxy(this.toggle,this)});this.addon.off({"focus.colorpicker":_jquery2.default.proxy(this.show,this)});this.addon.off({"focusout.colorpicker":_jquery2.default.proxy(this.hide,this)})}if(this.popoverTarget){this.popoverTarget.popover("dispose")}(0,_jquery2.default)(this.root).off("resize.colorpicker",_jquery2.default.proxy(this.reposition,this));(0,_jquery2.default)(this.root.document).off("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.hide,this));(0,_jquery2.default)(this.root.document).off("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.onClickingInside,this))}},{key:"isClickingInside",value:function isClickingInside(e){if(!e){return false}return this.isOrIsInside(this.popoverTip,e.currentTarget)||this.isOrIsInside(this.popoverTip,e.target)||this.isOrIsInside(this.colorpicker.picker,e.currentTarget)||this.isOrIsInside(this.colorpicker.picker,e.target)}},{key:"isOrIsInside",value:function isOrIsInside(container,element){if(!container||!element){return false}element=(0,_jquery2.default)(element);return element.is(container)||container.find(element).length>0}},{key:"onClickingInside",value:function onClickingInside(e){this.clicking=this.isClickingInside(e)}},{key:"createPopover",value:function createPopover(){var cp=this.colorpicker;this.popoverTarget=this.hasAddon?this.addon:this.input;cp.picker.addClass("colorpicker-bs-popover-content");this.popoverTarget.popover(_jquery2.default.extend(true,{},_options2.default.popover,cp.options.popover,{trigger:"manual",content:cp.picker,html:true}));this.popoverTip=(0,_jquery2.default)(bootstrap.Popover.getInstance(this.popoverTarget[0]).getTipElement());this.popoverTip.addClass("colorpicker-bs-popover");this.popoverTarget.on("shown.bs.popover",_jquery2.default.proxy(this.fireShow,this));this.popoverTarget.on("hidden.bs.popover",_jquery2.default.proxy(this.fireHide,this))}},{key:"reposition",value:function reposition(e){if(this.popoverTarget&&this.isVisible()){this.popoverTarget.popover("update")}}},{key:"toggle",value:function toggle(e){if(this.isVisible()){this.hide(e)}else{this.show(e)}}},{key:"show",value:function show(e){if(this.isVisible()||this.showing||this.hidding){return}this.showing=true;this.hidding=false;this.clicking=false;var cp=this.colorpicker;cp.lastEvent.alias="show";cp.lastEvent.e=e;if(e&&(!this.hasInput||this.input.attr("type")==="color")&&e&&e.preventDefault){e.stopPropagation();e.preventDefault()}if(this.isPopover){(0,_jquery2.default)(this.root).on("resize.colorpicker",_jquery2.default.proxy(this.reposition,this))}cp.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden");if(this.popoverTarget){this.popoverTarget.popover("show")}else{this.fireShow()}}},{key:"fireShow",value:function fireShow(){this.hidding=false;this.showing=false;if(this.isPopover){(0,_jquery2.default)(this.root.document).on("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.hide,this));(0,_jquery2.default)(this.root.document).on("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.onClickingInside,this))}this.colorpicker.trigger("colorpickerShow")}},{key:"hide",value:function hide(e){if(this.isHidden()||this.showing||this.hidding){return}var cp=this.colorpicker,clicking=this.clicking||this.isClickingInside(e);this.hidding=true;this.showing=false;this.clicking=false;cp.lastEvent.alias="hide";cp.lastEvent.e=e;if(clicking){this.hidding=false;return}if(this.popoverTarget){this.popoverTarget.popover("hide")}else{this.fireHide()}}},{key:"fireHide",value:function fireHide(){this.hidding=false;this.showing=false;var cp=this.colorpicker;cp.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible");(0,_jquery2.default)(this.root).off("resize.colorpicker",_jquery2.default.proxy(this.reposition,this));(0,_jquery2.default)(this.root.document).off("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.hide,this));(0,_jquery2.default)(this.root.document).off("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.onClickingInside,this));cp.trigger("colorpickerHide")}},{key:"focus",value:function focus(){if(this.hasAddon){return this.addon.focus()}if(this.hasInput){return this.input.focus()}return false}},{key:"isVisible",value:function isVisible(){return this.colorpicker.picker.hasClass("colorpicker-visible")&&!this.colorpicker.picker.hasClass("colorpicker-hidden")}},{key:"isHidden",value:function isHidden(){return this.colorpicker.picker.hasClass("colorpicker-hidden")&&!this.colorpicker.picker.hasClass("colorpicker-visible")}},{key:"input",get:function get(){return this.colorpicker.inputHandler.input}},{key:"hasInput",get:function get(){return this.colorpicker.inputHandler.hasInput()}},{key:"addon",get:function get(){return this.colorpicker.addonHandler.addon}},{key:"hasAddon",get:function get(){return this.colorpicker.addonHandler.hasAddon()}},{key:"isPopover",get:function get(){return!this.colorpicker.options.inline&&!!this.popoverTip}}]);return PopupHandler}();exports.default=PopupHandler;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);var _ColorItem=__webpack_require__(2);var _ColorItem2=_interopRequireDefault(_ColorItem);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var InputHandler=function(){function InputHandler(colorpicker){_classCallCheck(this,InputHandler);this.colorpicker=colorpicker;this.input=this.colorpicker.element.is("input")?this.colorpicker.element:this.colorpicker.options.input?this.colorpicker.element.find(this.colorpicker.options.input):false;if(this.input&&this.input.length===0){this.input=false}this._initValue()}_createClass(InputHandler,[{key:"bind",value:function bind(){if(!this.hasInput()){return}this.input.on({"keyup.colorpicker":_jquery2.default.proxy(this.onkeyup,this)});this.input.on({"change.colorpicker":_jquery2.default.proxy(this.onchange,this)})}},{key:"unbind",value:function unbind(){if(!this.hasInput()){return}this.input.off(".colorpicker")}},{key:"_initValue",value:function _initValue(){if(!this.hasInput()){return}var val="";[this.input.val(),this.input.data("color"),this.input.attr("data-color")].map(function(item){if(item&&val===""){val=item}});if(val instanceof _ColorItem2.default){val=this.getFormattedColor(val.string(this.colorpicker.format))}else if(!(typeof val==="string"||val instanceof String)){val=""}this.input.prop("value",val)}},{key:"getValue",value:function getValue(){if(!this.hasInput()){return false}return this.input.val()}},{key:"setValue",value:function setValue(val){if(!this.hasInput()){return}var inputVal=this.input.prop("value");val=val?val:"";if(val===(inputVal?inputVal:"")){return}this.input.prop("value",val);this.input.trigger({type:"change",colorpicker:this.colorpicker,color:this.colorpicker.color,value:val})}},{key:"getFormattedColor",value:function getFormattedColor(){var val=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;val=val?val:this.colorpicker.colorHandler.getColorString();if(!val){return""}val=this.colorpicker.colorHandler.resolveColorDelegate(val,false);if(this.colorpicker.options.useHashPrefix===false){val=val.replace(/^#/g,"")}return val}},{key:"hasInput",value:function hasInput(){return this.input!==false}},{key:"isEnabled",value:function isEnabled(){return this.hasInput()&&!this.isDisabled()}},{key:"isDisabled",value:function isDisabled(){return this.hasInput()&&this.input.prop("disabled")===true}},{key:"disable",value:function disable(){if(this.hasInput()){this.input.prop("disabled",true)}}},{key:"enable",value:function enable(){if(this.hasInput()){this.input.prop("disabled",false)}}},{key:"update",value:function update(){if(!this.hasInput()){return}if(this.colorpicker.options.autoInputFallback===false&&this.colorpicker.colorHandler.isInvalidColor()){return}this.setValue(this.getFormattedColor())}},{key:"onchange",value:function onchange(e){this.colorpicker.lastEvent.alias="input.change";this.colorpicker.lastEvent.e=e;var val=this.getValue();if(val!==e.value){this.colorpicker.setValue(val)}}},{key:"onkeyup",value:function onkeyup(e){this.colorpicker.lastEvent.alias="input.keyup";this.colorpicker.lastEvent.e=e;var val=this.getValue();if(val!==e.value){this.colorpicker.setValue(val)}}}]);return InputHandler}();exports.default=InputHandler;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";var colorString=__webpack_require__(17);var convert=__webpack_require__(20);var _slice=[].slice;var skippedModels=["keyword","gray","hex"];var hashedModelKeys={};Object.keys(convert).forEach(function(model){hashedModelKeys[_slice.call(convert[model].labels).sort().join("")]=model});var limiters={};function Color(obj,model){if(!(this instanceof Color)){return new Color(obj,model)}if(model&&model in skippedModels){model=null}if(model&&!(model in convert)){throw new Error("Unknown model: "+model)}var i;var channels;if(obj==null){this.model="rgb";this.color=[0,0,0];this.valpha=1}else if(obj instanceof Color){this.model=obj.model;this.color=obj.color.slice();this.valpha=obj.valpha}else if(typeof obj==="string"){var result=colorString.get(obj);if(result===null){throw new Error("Unable to parse color from string: "+obj)}this.model=result.model;channels=convert[this.model].channels;this.color=result.value.slice(0,channels);this.valpha=typeof result.value[channels]==="number"?result.value[channels]:1}else if(obj.length){this.model=model||"rgb";channels=convert[this.model].channels;var newArr=_slice.call(obj,0,channels);this.color=zeroArray(newArr,channels);this.valpha=typeof obj[channels]==="number"?obj[channels]:1}else if(typeof obj==="number"){obj&=16777215;this.model="rgb";this.color=[obj>>16&255,obj>>8&255,obj&255];this.valpha=1}else{this.valpha=1;var keys=Object.keys(obj);if("alpha"in obj){keys.splice(keys.indexOf("alpha"),1);this.valpha=typeof obj.alpha==="number"?obj.alpha:0}var hashedKeys=keys.sort().join("");if(!(hashedKeys in hashedModelKeys)){throw new Error("Unable to parse color from object: "+JSON.stringify(obj))}this.model=hashedModelKeys[hashedKeys];var labels=convert[this.model].labels;var color=[];for(i=0;i<labels.length;i++){color.push(obj[labels[i]])}this.color=zeroArray(color)}if(limiters[this.model]){channels=convert[this.model].channels;for(i=0;i<channels;i++){var limit=limiters[this.model][i];if(limit){this.color[i]=limit(this.color[i])}}}this.valpha=Math.max(0,Math.min(1,this.valpha));if(Object.freeze){Object.freeze(this)}}Color.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(places){var self=this.model in colorString.to?this:this.rgb();self=self.round(typeof places==="number"?places:1);var args=self.valpha===1?self.color:self.color.concat(this.valpha);return colorString.to[self.model](args)},percentString:function(places){var self=this.rgb().round(typeof places==="number"?places:1);var args=self.valpha===1?self.color:self.color.concat(this.valpha);return colorString.to.rgb.percent(args)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){var result={};var channels=convert[this.model].channels;var labels=convert[this.model].labels;for(var i=0;i<channels;i++){result[labels[i]]=this.color[i]}if(this.valpha!==1){result.alpha=this.valpha}return result},unitArray:function(){var rgb=this.rgb().color;rgb[0]/=255;rgb[1]/=255;rgb[2]/=255;if(this.valpha!==1){rgb.push(this.valpha)}return rgb},unitObject:function(){var rgb=this.rgb().object();rgb.r/=255;rgb.g/=255;rgb.b/=255;if(this.valpha!==1){rgb.alpha=this.valpha}return rgb},round:function(places){places=Math.max(places||0,0);return new Color(this.color.map(roundToPlace(places)).concat(this.valpha),this.model)},alpha:function(val){if(arguments.length){return new Color(this.color.concat(Math.max(0,Math.min(1,val))),this.model)}return this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,function(val){return(val%360+360)%360}),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(100)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(100)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword:function(val){if(arguments.length){return new Color(val)}return convert[this.model].keyword(this.color)},hex:function(val){if(arguments.length){return new Color(val)}return colorString.to.hex(this.rgb().round().color)},rgbNumber:function(){var rgb=this.rgb().color;return(rgb[0]&255)<<16|(rgb[1]&255)<<8|rgb[2]&255},luminosity:function(){var rgb=this.rgb().color;var lum=[];for(var i=0;i<rgb.length;i++){var chan=rgb[i]/255;lum[i]=chan<=.03928?chan/12.92:Math.pow((chan+.055)/1.055,2.4)}return.2126*lum[0]+.7152*lum[1]+.0722*lum[2]},contrast:function(color2){var lum1=this.luminosity();var lum2=color2.luminosity();if(lum1>lum2){return(lum1+.05)/(lum2+.05)}return(lum2+.05)/(lum1+.05)},level:function(color2){var contrastRatio=this.contrast(color2);if(contrastRatio>=7.1){return"AAA"}return contrastRatio>=4.5?"AA":""},isDark:function(){var rgb=this.rgb().color;var yiq=(rgb[0]*299+rgb[1]*587+rgb[2]*114)/1e3;return yiq<128},isLight:function(){return!this.isDark()},negate:function(){var rgb=this.rgb();for(var i=0;i<3;i++){rgb.color[i]=255-rgb.color[i]}return rgb},lighten:function(ratio){var hsl=this.hsl();hsl.color[2]+=hsl.color[2]*ratio;return hsl},darken:function(ratio){var hsl=this.hsl();hsl.color[2]-=hsl.color[2]*ratio;return hsl},saturate:function(ratio){var hsl=this.hsl();hsl.color[1]+=hsl.color[1]*ratio;return hsl},desaturate:function(ratio){var hsl=this.hsl();hsl.color[1]-=hsl.color[1]*ratio;return hsl},whiten:function(ratio){var hwb=this.hwb();hwb.color[1]+=hwb.color[1]*ratio;return hwb},blacken:function(ratio){var hwb=this.hwb();hwb.color[2]+=hwb.color[2]*ratio;return hwb},grayscale:function(){var rgb=this.rgb().color;var val=rgb[0]*.3+rgb[1]*.59+rgb[2]*.11;return Color.rgb(val,val,val)},fade:function(ratio){return this.alpha(this.valpha-this.valpha*ratio)},opaquer:function(ratio){return this.alpha(this.valpha+this.valpha*ratio)},rotate:function(degrees){var hsl=this.hsl();var hue=hsl.color[0];hue=(hue+degrees)%360;hue=hue<0?360+hue:hue;hsl.color[0]=hue;return hsl},mix:function(mixinColor,weight){if(!mixinColor||!mixinColor.rgb){throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof mixinColor)}var color1=mixinColor.rgb();var color2=this.rgb();var p=weight===undefined?.5:weight;var w=2*p-1;var a=color1.alpha()-color2.alpha();var w1=((w*a===-1?w:(w+a)/(1+w*a))+1)/2;var w2=1-w1;return Color.rgb(w1*color1.red()+w2*color2.red(),w1*color1.green()+w2*color2.green(),w1*color1.blue()+w2*color2.blue(),color1.alpha()*p+color2.alpha()*(1-p))}};Object.keys(convert).forEach(function(model){if(skippedModels.indexOf(model)!==-1){return}var channels=convert[model].channels;Color.prototype[model]=function(){if(this.model===model){return new Color(this)}if(arguments.length){return new Color(arguments,model)}var newAlpha=typeof arguments[channels]==="number"?channels:this.valpha;return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha),model)};Color[model]=function(color){if(typeof color==="number"){color=zeroArray(_slice.call(arguments),channels)}return new Color(color,model)}});function roundTo(num,places){return Number(num.toFixed(places))}function roundToPlace(places){return function(num){return roundTo(num,places)}}function getset(model,channel,modifier){model=Array.isArray(model)?model:[model];model.forEach(function(m){(limiters[m]||(limiters[m]=[]))[channel]=modifier});model=model[0];return function(val){var result;if(arguments.length){if(modifier){val=modifier(val)}result=this[model]();result.color[channel]=val;return result}result=this[model]().color[channel];if(modifier){result=modifier(result)}return result}}function maxfn(max){return function(v){return Math.max(0,Math.min(max,v))}}function assertArray(val){return Array.isArray(val)?val:[val]}function zeroArray(arr,length){for(var i=0;i<length;i++){if(typeof arr[i]!=="number"){arr[i]=0}}return arr}module.exports=Color},function(module,exports,__webpack_require__){var colorNames=__webpack_require__(5);var swizzle=__webpack_require__(18);var reverseNames={};for(var name in colorNames){if(colorNames.hasOwnProperty(name)){reverseNames[colorNames[name]]=name}}var cs=module.exports={to:{},get:{}};cs.get=function(string){var prefix=string.substring(0,3).toLowerCase();var val;var model;switch(prefix){case"hsl":val=cs.get.hsl(string);model="hsl";break;case"hwb":val=cs.get.hwb(string);model="hwb";break;default:val=cs.get.rgb(string);model="rgb";break}if(!val){return null}return{model,value:val}};cs.get.rgb=function(string){if(!string){return null}var abbr=/^#([a-f0-9]{3,4})$/i;var hex=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i;var rgba=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;var per=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;var keyword=/(\D+)/;var rgb=[0,0,0,1];var match;var i;var hexAlpha;if(match=string.match(hex)){hexAlpha=match[2];match=match[1];for(i=0;i<3;i++){var i2=i*2;rgb[i]=parseInt(match.slice(i2,i2+2),16)}if(hexAlpha){rgb[3]=Math.round(parseInt(hexAlpha,16)/255*100)/100}}else if(match=string.match(abbr)){match=match[1];hexAlpha=match[3];for(i=0;i<3;i++){rgb[i]=parseInt(match[i]+match[i],16)}if(hexAlpha){rgb[3]=Math.round(parseInt(hexAlpha+hexAlpha,16)/255*100)/100}}else if(match=string.match(rgba)){for(i=0;i<3;i++){rgb[i]=parseInt(match[i+1],0)}if(match[4]){rgb[3]=parseFloat(match[4])}}else if(match=string.match(per)){for(i=0;i<3;i++){rgb[i]=Math.round(parseFloat(match[i+1])*2.55)}if(match[4]){rgb[3]=parseFloat(match[4])}}else if(match=string.match(keyword)){if(match[1]==="transparent"){return[0,0,0,0]}rgb=colorNames[match[1]];if(!rgb){return null}rgb[3]=1;return rgb}else{return null}for(i=0;i<3;i++){rgb[i]=clamp(rgb[i],0,255)}rgb[3]=clamp(rgb[3],0,1);return rgb};cs.get.hsl=function(string){if(!string){return null}var hsl=/^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;var match=string.match(hsl);if(match){var alpha=parseFloat(match[4]);var h=(parseFloat(match[1])+360)%360;var s=clamp(parseFloat(match[2]),0,100);var l=clamp(parseFloat(match[3]),0,100);var a=clamp(isNaN(alpha)?1:alpha,0,1);return[h,s,l,a]}return null};cs.get.hwb=function(string){if(!string){return null}var hwb=/^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;var match=string.match(hwb);if(match){var alpha=parseFloat(match[4]);var h=(parseFloat(match[1])%360+360)%360;var w=clamp(parseFloat(match[2]),0,100);var b=clamp(parseFloat(match[3]),0,100);var a=clamp(isNaN(alpha)?1:alpha,0,1);return[h,w,b,a]}return null};cs.to.hex=function(){var rgba=swizzle(arguments);return"#"+hexDouble(rgba[0])+hexDouble(rgba[1])+hexDouble(rgba[2])+(rgba[3]<1?hexDouble(Math.round(rgba[3]*255)):"")};cs.to.rgb=function(){var rgba=swizzle(arguments);return rgba.length<4||rgba[3]===1?"rgb("+Math.round(rgba[0])+", "+Math.round(rgba[1])+", "+Math.round(rgba[2])+")":"rgba("+Math.round(rgba[0])+", "+Math.round(rgba[1])+", "+Math.round(rgba[2])+", "+rgba[3]+")"};cs.to.rgb.percent=function(){var rgba=swizzle(arguments);var r=Math.round(rgba[0]/255*100);var g=Math.round(rgba[1]/255*100);var b=Math.round(rgba[2]/255*100);return rgba.length<4||rgba[3]===1?"rgb("+r+"%, "+g+"%, "+b+"%)":"rgba("+r+"%, "+g+"%, "+b+"%, "+rgba[3]+")"};cs.to.hsl=function(){var hsla=swizzle(arguments);return hsla.length<4||hsla[3]===1?"hsl("+hsla[0]+", "+hsla[1]+"%, "+hsla[2]+"%)":"hsla("+hsla[0]+", "+hsla[1]+"%, "+hsla[2]+"%, "+hsla[3]+")"};cs.to.hwb=function(){var hwba=swizzle(arguments);var a="";if(hwba.length>=4&&hwba[3]!==1){a=", "+hwba[3]}return"hwb("+hwba[0]+", "+hwba[1]+"%, "+hwba[2]+"%"+a+")"};cs.to.keyword=function(rgb){return reverseNames[rgb.slice(0,3)]};function clamp(num,min,max){return Math.min(Math.max(min,num),max)}function hexDouble(num){var str=num.toString(16).toUpperCase();return str.length<2?"0"+str:str}},function(module,exports,__webpack_require__){"use strict";var isArrayish=__webpack_require__(19);var concat=Array.prototype.concat;var slice=Array.prototype.slice;var swizzle=module.exports=function swizzle(args){var results=[];for(var i=0,len=args.length;i<len;i++){var arg=args[i];if(isArrayish(arg)){results=concat.call(results,slice.call(arg))}else{results.push(arg)}}return results};swizzle.wrap=function(fn){return function(){return fn(swizzle(arguments))}}},function(module,exports,__webpack_require__){"use strict";module.exports=function isArrayish(obj){if(!obj){return false}return obj instanceof Array||Array.isArray(obj)||obj.length>=0&&obj.splice instanceof Function}},function(module,exports,__webpack_require__){var conversions=__webpack_require__(6);var route=__webpack_require__(21);var convert={};var models=Object.keys(conversions);function wrapRaw(fn){var wrappedFn=function(args){if(args===undefined||args===null){return args}if(arguments.length>1){args=Array.prototype.slice.call(arguments)}return fn(args)};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}function wrapRounded(fn){var wrappedFn=function(args){if(args===undefined||args===null){return args}if(arguments.length>1){args=Array.prototype.slice.call(arguments)}var result=fn(args);if(typeof result==="object"){for(var len=result.length,i=0;i<len;i++){result[i]=Math.round(result[i])}}return result};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}models.forEach(function(fromModel){convert[fromModel]={};Object.defineProperty(convert[fromModel],"channels",{value:conversions[fromModel].channels});Object.defineProperty(convert[fromModel],"labels",{value:conversions[fromModel].labels});var routes=route(fromModel);var routeModels=Object.keys(routes);routeModels.forEach(function(toModel){var fn=routes[toModel];convert[fromModel][toModel]=wrapRounded(fn);convert[fromModel][toModel].raw=wrapRaw(fn)})});module.exports=convert},function(module,exports,__webpack_require__){var conversions=__webpack_require__(6);function buildGraph(){var graph={};var models=Object.keys(conversions);for(var len=models.length,i=0;i<len;i++){graph[models[i]]={distance:-1,parent:null}}return graph}function deriveBFS(fromModel){var graph=buildGraph();var queue=[fromModel];graph[fromModel].distance=0;while(queue.length){var current=queue.pop();var adjacents=Object.keys(conversions[current]);for(var len=adjacents.length,i=0;i<len;i++){var adjacent=adjacents[i];var node=graph[adjacent];if(node.distance===-1){node.distance=graph[current].distance+1;node.parent=current;queue.unshift(adjacent)}}}return graph}function link(from,to){return function(args){return to(from(args))}}function wrapConversion(toModel,graph){var path=[graph[toModel].parent,toModel];var fn=conversions[graph[toModel].parent][toModel];var cur=graph[toModel].parent;while(graph[cur].parent){path.unshift(graph[cur].parent);fn=link(conversions[graph[cur].parent][cur],fn);cur=graph[cur].parent}fn.conversion=path;return fn}module.exports=function(fromModel){var graph=deriveBFS(fromModel);var conversion={};var models=Object.keys(graph);for(var len=models.length,i=0;i<len;i++){var toModel=models[i];var node=graph[toModel];if(node.parent===null){continue}conversion[toModel]=wrapConversion(toModel,graph)}return conversion}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);var _ColorItem=__webpack_require__(2);var _ColorItem2=_interopRequireDefault(_ColorItem);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var ColorHandler=function(){function ColorHandler(colorpicker){_classCallCheck(this,ColorHandler);this.colorpicker=colorpicker}_createClass(ColorHandler,[{key:"bind",value:function bind(){if(this.colorpicker.options.color){this.color=this.createColor(this.colorpicker.options.color);return}if(!this.color&&!!this.colorpicker.inputHandler.getValue()){this.color=this.createColor(this.colorpicker.inputHandler.getValue(),this.colorpicker.options.autoInputFallback)}}},{key:"unbind",value:function unbind(){this.colorpicker.element.removeData("color")}},{key:"getColorString",value:function getColorString(){if(!this.hasColor()){return""}return this.color.string(this.format)}},{key:"setColorString",value:function setColorString(val){var color=val?this.createColor(val):null;this.color=color?color:null}},{key:"createColor",value:function createColor(val){var fallbackOnInvalid=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var autoHexInputFallback=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var disableHexInputFallback=!fallbackOnInvalid&&!autoHexInputFallback;var color=new _ColorItem2.default(this.resolveColorDelegate(val),this.format,disableHexInputFallback);if(!color.isValid()){if(fallbackOnInvalid){color=this.getFallbackColor()}this.colorpicker.trigger("colorpickerInvalid",color,val)}if(!this.isAlphaEnabled()){color.alpha=1}return color}},{key:"getFallbackColor",value:function getFallbackColor(){if(this.fallback&&this.fallback===this.color){return this.color}var fallback=this.resolveColorDelegate(this.fallback);var color=new _ColorItem2.default(fallback,this.format);if(!color.isValid()){console.warn("The fallback color is invalid. Falling back to the previous color or black if any.");return this.color?this.color:new _ColorItem2.default("#000000",this.format)}return color}},{key:"assureColor",value:function assureColor(){if(!this.hasColor()){this.color=this.getFallbackColor()}return this.color}},{key:"resolveColorDelegate",value:function resolveColorDelegate(color){var realColor=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var extResolvedColor=false;_jquery2.default.each(this.colorpicker.extensions,function(name,ext){if(extResolvedColor!==false){return}extResolvedColor=ext.resolveColor(color,realColor)});return extResolvedColor?extResolvedColor:color}},{key:"isInvalidColor",value:function isInvalidColor(){return!this.hasColor()||!this.color.isValid()}},{key:"isAlphaEnabled",value:function isAlphaEnabled(){return this.colorpicker.options.useAlpha!==false}},{key:"hasColor",value:function hasColor(){return this.color instanceof _ColorItem2.default}},{key:"fallback",get:function get(){return this.colorpicker.options.fallbackColor?this.colorpicker.options.fallbackColor:this.hasColor()?this.color:null}},{key:"format",get:function get(){if(this.colorpicker.options.format){return this.colorpicker.options.format}if(this.hasColor()&&this.color.hasTransparency()&&this.color.format.match(/^hex/)){return this.isAlphaEnabled()?"rgba":"hex"}if(this.hasColor()){return this.color.format}return"rgb"}},{key:"color",get:function get(){return this.colorpicker.element.data("color")},set:function set(value){this.colorpicker.element.data("color",value);if(value instanceof _ColorItem2.default&&this.colorpicker.options.format==="auto"){this.colorpicker.options.format=this.color.format}}}]);return ColorHandler}();exports.default=ColorHandler;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _jquery=__webpack_require__(0);var _jquery2=_interopRequireDefault(_jquery);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var PickerHandler=function(){function PickerHandler(colorpicker){_classCallCheck(this,PickerHandler);this.colorpicker=colorpicker;this.picker=null}_createClass(PickerHandler,[{key:"bind",value:function bind(){var picker=this.picker=(0,_jquery2.default)(this.options.template);if(this.options.customClass){picker.addClass(this.options.customClass)}if(this.options.horizontal){picker.addClass("colorpicker-horizontal")}if(this._supportsAlphaBar()){this.options.useAlpha=true;picker.addClass("colorpicker-with-alpha")}else{this.options.useAlpha=false}}},{key:"attach",value:function attach(){var pickerParent=this.colorpicker.container?this.colorpicker.container:null;if(pickerParent){this.picker.appendTo(pickerParent)}}},{key:"unbind",value:function unbind(){this.picker.remove()}},{key:"_supportsAlphaBar",value:function _supportsAlphaBar(){return(this.options.useAlpha||this.colorpicker.colorHandler.hasColor()&&this.color.hasTransparency())&&this.options.useAlpha!==false&&(!this.options.format||this.options.format&&!this.options.format.match(/^hex([36])?$/i))}},{key:"update",value:function update(){if(!this.colorpicker.colorHandler.hasColor()){return}var vertical=this.options.horizontal!==true,slider=vertical?this.options.sliders:this.options.slidersHorz;var saturationGuide=this.picker.find(".colorpicker-saturation .colorpicker-guide"),hueGuide=this.picker.find(".colorpicker-hue .colorpicker-guide"),alphaGuide=this.picker.find(".colorpicker-alpha .colorpicker-guide");var hsva=this.color.toHsvaRatio();if(hueGuide.length){hueGuide.css(vertical?"top":"left",(vertical?slider.hue.maxTop:slider.hue.maxLeft)*(1-hsva.h))}if(alphaGuide.length){alphaGuide.css(vertical?"top":"left",(vertical?slider.alpha.maxTop:slider.alpha.maxLeft)*(1-hsva.a))}if(saturationGuide.length){saturationGuide.css({top:slider.saturation.maxTop-hsva.v*slider.saturation.maxTop,left:hsva.s*slider.saturation.maxLeft})}this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.getCloneHueOnly().toHexString());var hexColor=this.color.toHexString();var alphaBg="";if(this.options.horizontal){alphaBg="linear-gradient(to right, "+hexColor+" 0%, transparent 100%)"}else{alphaBg="linear-gradient(to bottom, "+hexColor+" 0%, transparent 100%)"}this.picker.find(".colorpicker-alpha-color").css("background",alphaBg)}},{key:"options",get:function get(){return this.colorpicker.options}},{key:"color",get:function get(){return this.colorpicker.colorHandler.color}}]);return PickerHandler}();exports.default=PickerHandler;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var AddonHandler=function(){function AddonHandler(colorpicker){_classCallCheck(this,AddonHandler);this.colorpicker=colorpicker;this.addon=null}_createClass(AddonHandler,[{key:"hasAddon",value:function hasAddon(){return!!this.addon}},{key:"bind",value:function bind(){this.addon=this.colorpicker.options.addon?this.colorpicker.element.find(this.colorpicker.options.addon):null;if(this.addon&&this.addon.length===0){this.addon=null}}},{key:"unbind",value:function unbind(){if(this.hasAddon()){this.addon.off(".colorpicker")}}},{key:"update",value:function update(){if(!this.colorpicker.colorHandler.hasColor()||!this.hasAddon()){return}var colorStr=this.colorpicker.colorHandler.getColorString();var styles={background:colorStr};var icn=this.addon.find("i").eq(0);if(icn.length>0){icn.css(styles)}else{this.addon.css(styles)}}}]);return AddonHandler}();exports.default=AddonHandler;module.exports=exports.default}])});
10
+ //# sourceMappingURL=bootstrap-colorpicker.min.js.map
libs/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js.map ADDED
The diff for this file is too large to render. See raw diff
 
libs/builder/blocks-bootstrap4.js ADDED
@@ -0,0 +1,1244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright 2017 Ziadin Givan
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ https://github.com/givanz/Vvvebjs
17
+ */
18
+
19
+ //Snippets from https://bootsnipp.com/license
20
+
21
+ Vvveb.BlocksGroup['Bootstrap'] =
22
+ ["bootstrap4/product-card", "bootstrap4/user-online", "bootstrap4/our-team", "bootstrap4/login-form", "bootstrap4/about-team", "bootstrap4/pricing-1", "bootstrap4/loading-circle", "bootstrap4/block-quote", "bootstrap4/subscribe-newsletter"];
23
+
24
+
25
+ Vvveb.Blocks.add("bootstrap4/product-card", {
26
+ name: "Product Cards with Transition",
27
+ image: "https://d2d3qesrx8xj6s.cloudfront.net/img/screenshots/0c3153bcb2ed97483a82b1f4ea966f8187379792.png",
28
+ html: `
29
+ <div class="container">
30
+ <div class="row ads">
31
+ <!-- Category Card -->
32
+ <div class="col-md-4">
33
+ <div class="card rounded">
34
+ <div class="card-image">
35
+ <span class="card-notify-badge">Low KMS</span>
36
+ <span class="card-notify-year">2018</span>
37
+ <img class="img-fluid" src="https://imageonthefly.autodatadirect.com/images/?USER=eDealer&PW=edealer872&IMG=USC80HOC011A021001.jpg&width=440&height=262" alt="Alternate Text" />
38
+ </div>
39
+ <div class="card-image-overlay m-auto">
40
+ <span class="card-detail-badge">Used</span>
41
+ <span class="card-detail-badge">$28,000.00</span>
42
+ <span class="card-detail-badge">13000 Kms</span>
43
+ </div>
44
+ <div class="card-body text-center">
45
+ <div class="ad-title m-auto">
46
+ <h5>Honda Accord LX</h5>
47
+ </div>
48
+ <a class="ad-btn" href="#">View</a>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <div class="col-md-4">
53
+ <div class="card rounded">
54
+ <div class="card-image">
55
+ <span class="card-notify-badge">Fully-Loaded</span>
56
+ <span class="card-notify-year">2017</span>
57
+ <img class="img-fluid" src="https://imageonthefly.autodatadirect.com/images/?USER=eDealer&PW=edealer872&IMG=CAC80HOC021B121001.jpg&width=440&height=262" alt="Alternate Text" />
58
+ </div>
59
+ <div class="card-image-overlay m-auto">
60
+ <span class="card-detail-badge">Used</span>
61
+ <span class="card-detail-badge">$28,000.00</span>
62
+ <span class="card-detail-badge">13000 Kms</span>
63
+ </div>
64
+ <div class="card-body text-center">
65
+ <div class="ad-title m-auto">
66
+ <h5>Honda CIVIC HATCHBACK LS</h5>
67
+ </div>
68
+ <a class="ad-btn" href="#">View</a>
69
+ </div>
70
+ </div>
71
+ </div>
72
+
73
+ <div class="col-md-4">
74
+ <div class="card rounded">
75
+ <div class="card-image">
76
+ <span class="card-notify-badge">Price Reduced</span>
77
+ <span class="card-notify-year">2018</span>
78
+ <img class="img-fluid" src="https://imageonthefly.autodatadirect.com/images/?USER=eDealer&PW=edealer872&IMG=USC80HOC091A021001.jpg&width=440&height=262" alt="Alternate Text" />
79
+ </div>
80
+ <div class="card-image-overlay m-auto">
81
+ <span class="card-detail-badge">Used</span>
82
+ <span class="card-detail-badge">$22,000.00</span>
83
+ <span class="card-detail-badge">8000 Kms</span>
84
+ </div>
85
+ <div class="card-body text-center">
86
+ <div class="ad-title m-auto">
87
+ <h5>Honda Accord Hybrid LT</h5>
88
+ </div>
89
+ <a class="ad-btn" href="#">View</a>
90
+ </div>
91
+ </div>
92
+ </div>
93
+
94
+ </div>
95
+ <style>
96
+ .ads {
97
+ margin: 30px 0 30px 0;
98
+
99
+ }
100
+
101
+ .ads .card-notify-badge {
102
+ position: absolute;
103
+ left: -10px;
104
+ top: -20px;
105
+ background: #f2d900;
106
+ text-align: center;
107
+ border-radius: 30px 30px 30px 30px;
108
+ color: #000;
109
+ padding: 5px 10px;
110
+ font-size: 14px;
111
+
112
+ }
113
+
114
+ .ads .card-notify-year {
115
+ position: absolute;
116
+ right: -10px;
117
+ top: -20px;
118
+ background: #ff4444;
119
+ border-radius: 50%;
120
+ text-align: center;
121
+ color: #fff;
122
+ font-size: 14px;
123
+ width: 50px;
124
+ height: 50px;
125
+ padding: 15px 0 0 0;
126
+ }
127
+
128
+
129
+ .ads .card-detail-badge {
130
+ background: #f2d900;
131
+ text-align: center;
132
+ border-radius: 30px 30px 30px 30px;
133
+ color: #000;
134
+ padding: 5px 10px;
135
+ font-size: 14px;
136
+ }
137
+
138
+
139
+
140
+ .ads .card:hover {
141
+ background: #fff;
142
+ box-shadow: 12px 15px 20px 0px rgba(46,61,73,0.15);
143
+ border-radius: 4px;
144
+ transition: all 0.3s ease;
145
+ }
146
+
147
+ .ads .card-image-overlay {
148
+ font-size: 20px;
149
+
150
+ }
151
+
152
+
153
+ .ads .card-image-overlay span {
154
+ display: inline-block;
155
+ }
156
+
157
+
158
+ .ads .ad-btn {
159
+ text-transform: uppercase;
160
+ width: 150px;
161
+ height: 40px;
162
+ border-radius: 80px;
163
+ font-size: 16px;
164
+ line-height: 35px;
165
+ text-align: center;
166
+ border: 3px solid #e6de08;
167
+ display: block;
168
+ text-decoration: none;
169
+ margin: 20px auto 1px auto;
170
+ color: #000;
171
+ overflow: hidden;
172
+ position: relative;
173
+ background-color: #e6de08;
174
+ }
175
+
176
+ .ads .ad-btn:hover {
177
+ background-color: #e6de08;
178
+ color: #1e1717;
179
+ border: 2px solid #e6de08;
180
+ background: transparent;
181
+ transition: all 0.3s ease;
182
+ box-shadow: 12px 15px 20px 0px rgba(46,61,73,0.15);
183
+ }
184
+
185
+ .ads .ad-title h5 {
186
+ text-transform: uppercase;
187
+ font-size: 18px;
188
+ }
189
+ </style>
190
+ </div>
191
+ `,
192
+ });
193
+
194
+ Vvveb.Blocks.add("bootstrap4/user-online", {
195
+ name: "User online",
196
+ image: "https://d2d3qesrx8xj6s.cloudfront.net/img/screenshots/75091e3b5e6efba238457f05e6f9edd847de1bf8.jpg",
197
+ html: `
198
+ <div class="container user-online-thumb">
199
+ <div class="d-flex justify-content-center h-100">
200
+ <div class="image_outer_container">
201
+ <div class="green_icon"></div>
202
+ <div class="image_inner_container">
203
+ <img src="https://source.unsplash.com/9UVmlIb0wJU/500x500">
204
+ </div>
205
+ </div>
206
+ </div>
207
+ <style>
208
+ .container.user-online-thumb{
209
+ height: 100%;
210
+ align-content: center;
211
+ }
212
+
213
+ .user-online-thumb .image_outer_container{
214
+ margin-top: auto;
215
+ margin-bottom: auto;
216
+ border-radius: 50%;
217
+ position: relative;
218
+ }
219
+
220
+ .user-online-thumb .image_inner_container{
221
+ border-radius: 50%;
222
+ padding: 5px;
223
+ background: #833ab4;
224
+ background: -webkit-linear-gradient(to bottom, #fcb045, #fd1d1d, #833ab4);
225
+ background: linear-gradient(to bottom, #fcb045, #fd1d1d, #833ab4);
226
+ }
227
+
228
+ .user-online-thumb .image_inner_container img{
229
+ height: 200px;
230
+ width: 200px;
231
+ border-radius: 50%;
232
+ border: 5px solid white;
233
+ }
234
+
235
+ .user-online-thumb .image_outer_container .green_icon{
236
+ background-color: #4cd137;
237
+ position: absolute;
238
+ right: 30px;
239
+ bottom: 10px;
240
+ height: 30px;
241
+ width: 30px;
242
+ border:5px solid white;
243
+ border-radius: 50%;
244
+ }
245
+ </style>
246
+ </div>
247
+ `,
248
+ });
249
+
250
+ Vvveb.Blocks.add("bootstrap4/our-team", {
251
+ name: "Our team",
252
+ image: "https://d2d3qesrx8xj6s.cloudfront.net/img/screenshots/b43c39513963d870d399a0aab2438af225f9f485.jpg",
253
+ html:`
254
+ <div class="team pb-5">
255
+ <div class="container">
256
+ <h5 class="div-title h1">OUR TEAM</h5>
257
+ <div class="row">
258
+ <!-- Team member -->
259
+ <div class="col-xs-12 col-sm-6 col-md-4">
260
+ <div class="image-flip" >
261
+ <div class="mainflip flip-0">
262
+ <div class="frontside">
263
+ <div class="card">
264
+ <div class="card-body text-center">
265
+ <p><img class=" img-fluid" src="https://sunlimetech.com/portfolio/boot4menu/assets/imgs/team/img_01.png" alt="card image"></p>
266
+ <h4 class="card-title">Sunlimetech</h4>
267
+ <p class="card-text">This is basic card with image on top, title, description and button.</p>
268
+ <a href="https://www.fiverr.com/share/qb8D02" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i></a>
269
+ </div>
270
+ </div>
271
+ </div>
272
+ <div class="backside">
273
+ <div class="card">
274
+ <div class="card-body text-center mt-4">
275
+ <h4 class="card-title">Sunlimetech</h4>
276
+ <p class="card-text">This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.</p>
277
+ <ul class="list-inline">
278
+ <li class="list-inline-item">
279
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
280
+ <i class="fa fa-facebook"></i>
281
+ </a>
282
+ </li>
283
+ <li class="list-inline-item">
284
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
285
+ <i class="fa fa-twitter"></i>
286
+ </a>
287
+ </li>
288
+ <li class="list-inline-item">
289
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
290
+ <i class="fa fa-skype"></i>
291
+ </a>
292
+ </li>
293
+ <li class="list-inline-item">
294
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
295
+ <i class="fa fa-google"></i>
296
+ </a>
297
+ </li>
298
+ </ul>
299
+ </div>
300
+ </div>
301
+ </div>
302
+ </div>
303
+ </div>
304
+ </div>
305
+ <!-- ./Team member -->
306
+ <!-- Team member -->
307
+ <div class="col-xs-12 col-sm-6 col-md-4">
308
+ <div class="image-flip" ontouchstart="this.classList.toggle('hover');">
309
+ <div class="mainflip">
310
+ <div class="frontside">
311
+ <div class="card">
312
+ <div class="card-body text-center">
313
+ <p><img class=" img-fluid" src="https://sunlimetech.com/portfolio/boot4menu/assets/imgs/team/img_02.png" alt="card image"></p>
314
+ <h4 class="card-title">Sunlimetech</h4>
315
+ <p class="card-text">This is basic card with image on top, title, description and button.</p>
316
+ <a href="https://www.fiverr.com/share/qb8D02" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i></a>
317
+ </div>
318
+ </div>
319
+ </div>
320
+ <div class="backside">
321
+ <div class="card">
322
+ <div class="card-body text-center mt-4">
323
+ <h4 class="card-title">Sunlimetech</h4>
324
+ <p class="card-text">This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.</p>
325
+ <ul class="list-inline">
326
+ <li class="list-inline-item">
327
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
328
+ <i class="fa fa-facebook"></i>
329
+ </a>
330
+ </li>
331
+ <li class="list-inline-item">
332
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
333
+ <i class="fa fa-twitter"></i>
334
+ </a>
335
+ </li>
336
+ <li class="list-inline-item">
337
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
338
+ <i class="fa fa-skype"></i>
339
+ </a>
340
+ </li>
341
+ <li class="list-inline-item">
342
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
343
+ <i class="fa fa-google"></i>
344
+ </a>
345
+ </li>
346
+ </ul>
347
+ </div>
348
+ </div>
349
+ </div>
350
+ </div>
351
+ </div>
352
+ </div>
353
+ <!-- ./Team member -->
354
+ <!-- Team member -->
355
+ <div class="col-xs-12 col-sm-6 col-md-4">
356
+ <div class="image-flip" ontouchstart="this.classList.toggle('hover');">
357
+ <div class="mainflip">
358
+ <div class="frontside">
359
+ <div class="card">
360
+ <div class="card-body text-center">
361
+ <p><img class=" img-fluid" src="https://sunlimetech.com/portfolio/boot4menu/assets/imgs/team/img_03.png" alt="card image"></p>
362
+ <h4 class="card-title">Sunlimetech</h4>
363
+ <p class="card-text">This is basic card with image on top, title, description and button.</p>
364
+ <a href="https://www.fiverr.com/share/qb8D02" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i></a>
365
+ </div>
366
+ </div>
367
+ </div>
368
+ <div class="backside">
369
+ <div class="card">
370
+ <div class="card-body text-center mt-4">
371
+ <h4 class="card-title">Sunlimetech</h4>
372
+ <p class="card-text">This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.</p>
373
+ <ul class="list-inline">
374
+ <li class="list-inline-item">
375
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
376
+ <i class="fa fa-facebook"></i>
377
+ </a>
378
+ </li>
379
+ <li class="list-inline-item">
380
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
381
+ <i class="fa fa-twitter"></i>
382
+ </a>
383
+ </li>
384
+ <li class="list-inline-item">
385
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
386
+ <i class="fa fa-skype"></i>
387
+ </a>
388
+ </li>
389
+ <li class="list-inline-item">
390
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
391
+ <i class="fa fa-google"></i>
392
+ </a>
393
+ </li>
394
+ </ul>
395
+ </div>
396
+ </div>
397
+ </div>
398
+ </div>
399
+ </div>
400
+ </div>
401
+ <!-- ./Team member -->
402
+ <!-- Team member -->
403
+ <div class="col-xs-12 col-sm-6 col-md-4">
404
+ <div class="image-flip" ontouchstart="this.classList.toggle('hover');">
405
+ <div class="mainflip">
406
+ <div class="frontside">
407
+ <div class="card">
408
+ <div class="card-body text-center">
409
+ <p><img class=" img-fluid" src="https://sunlimetech.com/portfolio/boot4menu/assets/imgs/team/img_04.jpg" alt="card image"></p>
410
+ <h4 class="card-title">Sunlimetech</h4>
411
+ <p class="card-text">This is basic card with image on top, title, description and button.</p>
412
+ <a href="https://www.fiverr.com/share/qb8D02" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i></a>
413
+ </div>
414
+ </div>
415
+ </div>
416
+ <div class="backside">
417
+ <div class="card">
418
+ <div class="card-body text-center mt-4">
419
+ <h4 class="card-title">Sunlimetech</h4>
420
+ <p class="card-text">This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.</p>
421
+ <ul class="list-inline">
422
+ <li class="list-inline-item">
423
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
424
+ <i class="fa fa-facebook"></i>
425
+ </a>
426
+ </li>
427
+ <li class="list-inline-item">
428
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
429
+ <i class="fa fa-twitter"></i>
430
+ </a>
431
+ </li>
432
+ <li class="list-inline-item">
433
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
434
+ <i class="fa fa-skype"></i>
435
+ </a>
436
+ </li>
437
+ <li class="list-inline-item">
438
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
439
+ <i class="fa fa-google"></i>
440
+ </a>
441
+ </li>
442
+ </ul>
443
+ </div>
444
+ </div>
445
+ </div>
446
+ </div>
447
+ </div>
448
+ </div>
449
+ <!-- ./Team member -->
450
+ <!-- Team member -->
451
+ <div class="col-xs-12 col-sm-6 col-md-4">
452
+ <div class="image-flip" ontouchstart="this.classList.toggle('hover');">
453
+ <div class="mainflip">
454
+ <div class="frontside">
455
+ <div class="card">
456
+ <div class="card-body text-center">
457
+ <p><img class=" img-fluid" src="https://sunlimetech.com/portfolio/boot4menu/assets/imgs/team/img_05.png" alt="card image"></p>
458
+ <h4 class="card-title">Sunlimetech</h4>
459
+ <p class="card-text">This is basic card with image on top, title, description and button.</p>
460
+ <a href="https://www.fiverr.com/share/qb8D02" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i></a>
461
+ </div>
462
+ </div>
463
+ </div>
464
+ <div class="backside">
465
+ <div class="card">
466
+ <div class="card-body text-center mt-4">
467
+ <h4 class="card-title">Sunlimetech</h4>
468
+ <p class="card-text">This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.</p>
469
+ <ul class="list-inline">
470
+ <li class="list-inline-item">
471
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
472
+ <i class="fa fa-facebook"></i>
473
+ </a>
474
+ </li>
475
+ <li class="list-inline-item">
476
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
477
+ <i class="fa fa-twitter"></i>
478
+ </a>
479
+ </li>
480
+ <li class="list-inline-item">
481
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
482
+ <i class="fa fa-skype"></i>
483
+ </a>
484
+ </li>
485
+ <li class="list-inline-item">
486
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
487
+ <i class="fa fa-google"></i>
488
+ </a>
489
+ </li>
490
+ </ul>
491
+ </div>
492
+ </div>
493
+ </div>
494
+ </div>
495
+ </div>
496
+ </div>
497
+ <!-- ./Team member -->
498
+ <!-- Team member -->
499
+ <div class="col-xs-12 col-sm-6 col-md-4">
500
+ <div class="image-flip" ontouchstart="this.classList.toggle('hover');">
501
+ <div class="mainflip">
502
+ <div class="frontside">
503
+ <div class="card">
504
+ <div class="card-body text-center">
505
+ <p><img class=" img-fluid" src="https://sunlimetech.com/portfolio/boot4menu/assets/imgs/team/img_06.jpg" alt="card image"></p>
506
+ <h4 class="card-title">Sunlimetech</h4>
507
+ <p class="card-text">This is basic card with image on top, title, description and button.</p>
508
+ <a href="https://www.fiverr.com/share/qb8D02" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i></a>
509
+ </div>
510
+ </div>
511
+ </div>
512
+ <div class="backside">
513
+ <div class="card">
514
+ <div class="card-body text-center mt-4">
515
+ <h4 class="card-title">Sunlimetech</h4>
516
+ <p class="card-text">This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.This is basic card with image on top, title, description and button.</p>
517
+ <ul class="list-inline">
518
+ <li class="list-inline-item">
519
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
520
+ <i class="fa fa-facebook"></i>
521
+ </a>
522
+ </li>
523
+ <li class="list-inline-item">
524
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
525
+ <i class="fa fa-twitter"></i>
526
+ </a>
527
+ </li>
528
+ <li class="list-inline-item">
529
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
530
+ <i class="fa fa-skype"></i>
531
+ </a>
532
+ </li>
533
+ <li class="list-inline-item">
534
+ <a class="social-icon text-xs-center" target="_blank" href="https://www.fiverr.com/share/qb8D02">
535
+ <i class="fa fa-google"></i>
536
+ </a>
537
+ </li>
538
+ </ul>
539
+ </div>
540
+ </div>
541
+ </div>
542
+ </div>
543
+ </div>
544
+ </div>
545
+ <!-- ./Team member -->
546
+
547
+ </div>
548
+ </div>
549
+
550
+ <style>
551
+ @import url('https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
552
+ .team {
553
+ background: #eee !important;
554
+ }
555
+
556
+ .btn-primary:hover,
557
+ .btn-primary:focus {
558
+ background-color: #108d6f;
559
+ border-color: #108d6f;
560
+ box-shadow: none;
561
+ outline: none;
562
+ }
563
+
564
+ .btn-primary {
565
+ color: #fff;
566
+ background-color: #007b5e;
567
+ border-color: #007b5e;
568
+ }
569
+
570
+ section {
571
+ padding: 60px 0;
572
+ }
573
+
574
+ section .section-title {
575
+ text-align: center;
576
+ color: #007b5e;
577
+ margin-bottom: 50px;
578
+ text-transform: uppercase;
579
+ }
580
+
581
+ .team .card {
582
+ border: none;
583
+ background: #ffffff;
584
+ }
585
+
586
+ .image-flip:hover .backside,
587
+ .image-flip.hover .backside {
588
+ -webkit-transform: rotateY(0deg);
589
+ -moz-transform: rotateY(0deg);
590
+ -o-transform: rotateY(0deg);
591
+ -ms-transform: rotateY(0deg);
592
+ transform: rotateY(0deg);
593
+ border-radius: .25rem;
594
+ }
595
+
596
+ .image-flip:hover .frontside,
597
+ .image-flip.hover .frontside {
598
+ -webkit-transform: rotateY(180deg);
599
+ -moz-transform: rotateY(180deg);
600
+ -o-transform: rotateY(180deg);
601
+ transform: rotateY(180deg);
602
+ }
603
+
604
+ .mainflip {
605
+ -webkit-transition: 1s;
606
+ -webkit-transform-style: preserve-3d;
607
+ -ms-transition: 1s;
608
+ -moz-transition: 1s;
609
+ -moz-transform: perspective(1000px);
610
+ -moz-transform-style: preserve-3d;
611
+ -ms-transform-style: preserve-3d;
612
+ transition: 1s;
613
+ transform-style: preserve-3d;
614
+ position: relative;
615
+ }
616
+
617
+ .frontside {
618
+ position: relative;
619
+ -webkit-transform: rotateY(0deg);
620
+ -ms-transform: rotateY(0deg);
621
+ z-index: 2;
622
+ margin-bottom: 30px;
623
+ }
624
+
625
+ .backside {
626
+ position: absolute;
627
+ top: 0;
628
+ left: 0;
629
+ background: white;
630
+ -webkit-transform: rotateY(-180deg);
631
+ -moz-transform: rotateY(-180deg);
632
+ -o-transform: rotateY(-180deg);
633
+ -ms-transform: rotateY(-180deg);
634
+ transform: rotateY(-180deg);
635
+ -webkit-box-shadow: 5px 7px 9px -4px rgb(158, 158, 158);
636
+ -moz-box-shadow: 5px 7px 9px -4px rgb(158, 158, 158);
637
+ box-shadow: 5px 7px 9px -4px rgb(158, 158, 158);
638
+ }
639
+
640
+ .frontside,
641
+ .backside {
642
+ -webkit-backface-visibility: hidden;
643
+ -moz-backface-visibility: hidden;
644
+ -ms-backface-visibility: hidden;
645
+ backface-visibility: hidden;
646
+ -webkit-transition: 1s;
647
+ -webkit-transform-style: preserve-3d;
648
+ -moz-transition: 1s;
649
+ -moz-transform-style: preserve-3d;
650
+ -o-transition: 1s;
651
+ -o-transform-style: preserve-3d;
652
+ -ms-transition: 1s;
653
+ -ms-transform-style: preserve-3d;
654
+ transition: 1s;
655
+ transform-style: preserve-3d;
656
+ }
657
+
658
+ .frontside .card,
659
+ .backside .card {
660
+ min-height: 312px;
661
+ }
662
+
663
+ .backside .card a {
664
+ font-size: 18px;
665
+ color: #007b5e !important;
666
+ }
667
+
668
+ .frontside .card .card-title,
669
+ .backside .card .card-title {
670
+ color: #007b5e !important;
671
+ }
672
+
673
+ .frontside .card .card-body img {
674
+ width: 120px;
675
+ height: 120px;
676
+ border-radius: 50%;
677
+ }
678
+ </style>
679
+ </div>
680
+ `,
681
+ });
682
+
683
+
684
+ Vvveb.Blocks.add("bootstrap4/login-form", {
685
+ name: "Login form",
686
+ image: "https://d2d3qesrx8xj6s.cloudfront.net/img/screenshots/fd3f41be24ffb976d66edf08adc4b2453a871b19.jpeg",
687
+ html:`
688
+ <div class="container">
689
+ <div class="row justify-content-md-center">
690
+
691
+ <div class="col-sm-6 col-md-6 col-lg-6">
692
+ <div class="account-wall">
693
+ <div id="my-tab-content" class="tab-content">
694
+ <div class="tab-pane active" id="login">
695
+ <img class="profile-img img-fluid rounded-circle" src="https://source.unsplash.com/9UVmlIb0wJU/200x200"
696
+ alt="">
697
+ <form class="form-signin" action="" method="">
698
+ <input type="text" class="form-control" placeholder="Username" required autofocus>
699
+ <input type="password" class="form-control" placeholder="Password" required>
700
+ <input type="submit" class="btn btn-lg btn-default w-100" value="Sign In" />
701
+ </form>
702
+ <div id="tabs" data-tabs="tabs">
703
+ <p class="text-center"><a href="#register" data-bs-toggle="tab">Need an Account?</a></p>
704
+ <p class="text-center"><a href="#select" data-bs-toggle="tab">Select Account</a></p>
705
+ </div>
706
+ </div>
707
+ <div class="tab-pane" id="register">
708
+ <form class="form-signin" action="" method="">
709
+ <input type="text" class="form-control" placeholder="User Name ..." required autofocus>
710
+ <input type="email" class="form-control" placeholder="Emaill Address ..." required>
711
+ <input type="password" class="form-control" placeholder="Password ..." required>
712
+ <input type="submit" class="btn btn-lg btn-default w-100" value="Sign Up" />
713
+ </form>
714
+ <div id="tabs" data-tabs="tabs">
715
+ <p class="text-center"><a href="#login" data-bs-toggle="tab">Have an Account?</a></p>
716
+ </div>
717
+ </div>
718
+ <div class="tab-pane" id="select">
719
+ <div id="tabs" data-tabs="tabs">
720
+ <div class="media account-select">
721
+ <a href="#user1" data-bs-toggle="tab">
722
+ <div class="pull-left">
723
+ <img class="select-img" src="https://source.unsplash.com/9UVmlIb0wJU/500x500"
724
+ alt="">
725
+ </div>
726
+ <div class="media-body">
727
+ <h4 class="select-name">User Name 1</h4>
728
+ </div>
729
+ </a>
730
+ </div>
731
+ <hr />
732
+ <div class="media account-select">
733
+ <a href="#user2" data-bs-toggle="tab">
734
+ <div class="pull-left">
735
+ <img class="select-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120"
736
+ alt="">
737
+ </div>
738
+ <div class="media-body">
739
+ <h4 class="select-name">User Name 2</h4>
740
+ </div>
741
+ </a>
742
+ </div>
743
+ <hr />
744
+ <p class="text-center"><a href="#login" data-bs-toggle="tab">Back to Login</a></p>
745
+ </div>
746
+ </div>
747
+ <div class="tab-pane" id="user1">
748
+ <img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120"
749
+ alt="">
750
+ <h3 class="text-center">User Name 1</h3>
751
+ <form class="form-signin" action="" method="">
752
+ <input type="hidden" class="form-control" value="User Name">
753
+ <input type="password" class="form-control" placeholder="Password" autofocus required>
754
+ <input type="submit" class="btn btn-lg btn-default w-100" value="Sign In" />
755
+ </form>
756
+ <p class="text-center"><a href="#login" data-bs-toggle="tab">Back to Login</a></p>
757
+ <p class="text-center"><a href="#select" data-bs-toggle="tab">Select another Account</a></p>
758
+ </div>
759
+ <div class="tab-pane" id="user2">
760
+ <img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120"
761
+ alt="">
762
+ <h3 class="text-center">User Name 2</h3>
763
+ <form class="form-signin" action="" method="">
764
+ <input type="hidden" class="form-control" value="User Name">
765
+ <input type="password" class="form-control" placeholder="Password" autofocus required>
766
+ <input type="submit" class="btn btn-lg btn-default w-100" value="Sign In" />
767
+ </form>
768
+ <p class="text-center"><a href="#login" data-bs-toggle="tab">Back to Login</a></p>
769
+ <p class="text-center"><a href="#select" data-bs-toggle="tab">Select another Account</a></p>
770
+ </div>
771
+ </div>
772
+ </div>
773
+ </div>
774
+ </div>
775
+ <style>
776
+ body{
777
+ background-color:#f5f5f5;
778
+ }
779
+ .form-signin
780
+ {
781
+ max-width: 330px;
782
+ padding: 15px;
783
+ margin: 0 auto;
784
+ }
785
+ .form-signin .form-control
786
+ {
787
+ position: relative;
788
+ font-size: 16px;
789
+ height: auto;
790
+ padding: 10px;
791
+ -webkit-box-sizing: border-box;
792
+ -moz-box-sizing: border-box;
793
+ box-sizing: border-box;
794
+ }
795
+ .form-signin .form-control:focus
796
+ {
797
+ z-index: 2;
798
+ }
799
+ .form-signin input[type="text"]
800
+ {
801
+ margin-bottom: -1px;
802
+ border-bottom-left-radius: 0;
803
+ border-bottom-right-radius: 0;
804
+ }
805
+ .form-signin input[type="password"]
806
+ {
807
+ margin-bottom: 10px;
808
+ border-top-left-radius: 0;
809
+ border-top-right-radius: 0;
810
+ }
811
+ .account-wall
812
+ {
813
+ margin-top: 80px;
814
+ padding: 40px 0px 20px 0px;
815
+ background-color: #ffffff;
816
+ box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16);
817
+ }
818
+ .login-title
819
+ {
820
+ color: #555;
821
+ font-size: 22px;
822
+ font-weight: 400;
823
+ display: block;
824
+ }
825
+ .profile-img
826
+ {
827
+ width: 96px;
828
+ height: 96px;
829
+ margin: 0 auto 10px;
830
+ display: block;
831
+ -moz-border-radius: 50%;
832
+ -webkit-border-radius: 50%;
833
+ border-radius: 50%;
834
+ }
835
+ .select-img
836
+ {
837
+ border-radius: 50%;
838
+ display: block;
839
+ height: 75px;
840
+ margin: 0 30px 10px;
841
+ width: 75px;
842
+ -moz-border-radius: 50%;
843
+ -webkit-border-radius: 50%;
844
+ border-radius: 50%;
845
+ }
846
+ .select-name
847
+ {
848
+ display: block;
849
+ margin: 30px 10px 10px;
850
+ }
851
+
852
+ .logo-img
853
+ {
854
+ width: 96px;
855
+ height: 96px;
856
+ margin: 0 auto 10px;
857
+ display: block;
858
+ -moz-border-radius: 50%;
859
+ -webkit-border-radius: 50%;
860
+ border-radius: 50%;
861
+ }
862
+ </style>
863
+ </div>
864
+ `,
865
+ });
866
+
867
+
868
+
869
+ Vvveb.Blocks.add("bootstrap4/about-team", {
870
+ name: "About and Team Section",
871
+ image: "https://assets.startbootstrap.com/img/screenshots/snippets/about-team.jpg",
872
+ html:`
873
+ <div class="container">
874
+ <div class="row">
875
+ <!-- Team Member 1 -->
876
+ <div class="col-xl-3 col-md-6 mb-4">
877
+ <div class="card border-0 shadow">
878
+ <img src="https://source.unsplash.com/TMgQMXoglsM/500x350" class="card-img-top" alt="...">
879
+ <div class="card-body text-center">
880
+ <h5 class="card-title mb-0">Team Member</h5>
881
+ <div class="card-text text-black-50">Web Developer</div>
882
+ </div>
883
+ </div>
884
+ </div>
885
+ <!-- Team Member 2 -->
886
+ <div class="col-xl-3 col-md-6 mb-4">
887
+ <div class="card border-0 shadow">
888
+ <img src="https://source.unsplash.com/9UVmlIb0wJU/500x350" class="card-img-top" alt="...">
889
+ <div class="card-body text-center">
890
+ <h5 class="card-title mb-0">Team Member</h5>
891
+ <div class="card-text text-black-50">Web Developer</div>
892
+ </div>
893
+ </div>
894
+ </div>
895
+ <!-- Team Member 3 -->
896
+ <div class="col-xl-3 col-md-6 mb-4">
897
+ <div class="card border-0 shadow">
898
+ <img src="https://source.unsplash.com/sNut2MqSmds/500x350" class="card-img-top" alt="...">
899
+ <div class="card-body text-center">
900
+ <h5 class="card-title mb-0">Team Member</h5>
901
+ <div class="card-text text-black-50">Web Developer</div>
902
+ </div>
903
+ </div>
904
+ </div>
905
+ <!-- Team Member 4 -->
906
+ <div class="col-xl-3 col-md-6 mb-4">
907
+ <div class="card border-0 shadow">
908
+ <img src="https://source.unsplash.com/ZI6p3i9SbVU/500x350" class="card-img-top" alt="...">
909
+ <div class="card-body text-center">
910
+ <h5 class="card-title mb-0">Team Member</h5>
911
+ <div class="card-text text-black-50">Web Developer</div>
912
+ </div>
913
+ </div>
914
+ </div>
915
+ </div>
916
+ <!-- /.row -->
917
+
918
+ </div>
919
+ `,
920
+ });
921
+
922
+
923
+
924
+ Vvveb.Blocks.add("bootstrap4/pricing-1", {
925
+ name: "Pricing table",
926
+ image: "https://d2d3qesrx8xj6s.cloudfront.net/img/screenshots/e92f797807bb4cd880bc3f161d9f9869854b6991.jpeg",
927
+ html:`
928
+ <div id="plans">
929
+ <div class="container">
930
+ <div class="row">
931
+
932
+ <!-- item -->
933
+ <div class="col-md-4 text-center">
934
+ <div class="panel panel-danger panel-pricing">
935
+ <div class="panel-heading">
936
+ <i class="fa fa-desktop"></i>
937
+ <h3>Plan 1</h3>
938
+ </div>
939
+ <div class="panel-body text-center">
940
+ <p><strong>$100 / Month</strong></p>
941
+ </div>
942
+ <ul class="list-group text-center">
943
+ <li class="list-group-item"><i class="fa fa-check"></i> Personal use</li>
944
+ <li class="list-group-item"><i class="fa fa-check"></i> Unlimited projects</li>
945
+ <li class="list-group-item"><i class="fa fa-check"></i> 27/7 support</li>
946
+ </ul>
947
+ <div class="panel-footer">
948
+ <a class="btn btn-lg w-100 btn-danger" href="#">BUY NOW!</a>
949
+ </div>
950
+ </div>
951
+ </div>
952
+ <!-- /item -->
953
+
954
+ <!-- item -->
955
+ <div class="col-md-4 text-center">
956
+ <div class="panel panel-warning panel-pricing">
957
+ <div class="panel-heading">
958
+ <i class="fa fa-desktop"></i>
959
+ <h3>Plan 2</h3>
960
+ </div>
961
+ <div class="panel-body text-center">
962
+ <p><strong>$200 / Month</strong></p>
963
+ </div>
964
+ <ul class="list-group text-center">
965
+ <li class="list-group-item"><i class="fa fa-check"></i> Personal use</li>
966
+ <li class="list-group-item"><i class="fa fa-check"></i> Unlimited projects</li>
967
+ <li class="list-group-item"><i class="fa fa-check"></i> 27/7 support</li>
968
+ </ul>
969
+ <div class="panel-footer">
970
+ <a class="btn btn-lg w-100 btn-warning" href="#">BUY NOW!</a>
971
+ </div>
972
+ </div>
973
+ </div>
974
+ <!-- /item -->
975
+
976
+ <!-- item -->
977
+ <div class="col-md-4 text-center">
978
+ <div class="panel panel-success panel-pricing">
979
+ <div class="panel-heading">
980
+ <i class="fa fa-desktop"></i>
981
+ <h3>Plan 3</h3>
982
+ </div>
983
+ <div class="panel-body text-center">
984
+ <p><strong>$300 / Month</strong></p>
985
+ </div>
986
+ <ul class="list-group text-center">
987
+ <li class="list-group-item"><i class="fa fa-check"></i> Personal use</li>
988
+ <li class="list-group-item"><i class="fa fa-check"></i> Unlimited projects</li>
989
+ <li class="list-group-item"><i class="fa fa-check"></i> 27/7 support</li>
990
+ </ul>
991
+ <div class="panel-footer">
992
+ <a class="btn btn-lg w-100 btn-success" href="#">BUY NOW!</a>
993
+ </div>
994
+ </div>
995
+ </div>
996
+ <!-- /item -->
997
+
998
+ </div>
999
+ </div>
1000
+ <style>
1001
+ @import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css");
1002
+
1003
+ .panel-pricing {
1004
+ -moz-transition: all .3s ease;
1005
+ -o-transition: all .3s ease;
1006
+ -webkit-transition: all .3s ease;
1007
+ }
1008
+ .panel-pricing:hover {
1009
+ box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.2);
1010
+ }
1011
+ .panel-pricing .panel-heading {
1012
+ padding: 20px 10px;
1013
+ }
1014
+ .panel-pricing .panel-heading .fa {
1015
+ margin-top: 10px;
1016
+ font-size: 58px;
1017
+ }
1018
+ .panel-pricing .list-group-item {
1019
+ color: #777777;
1020
+ border-bottom: 1px solid rgba(250, 250, 250, 0.5);
1021
+ }
1022
+ .panel-pricing .list-group-item:last-child {
1023
+ border-bottom-right-radius: 0px;
1024
+ border-bottom-left-radius: 0px;
1025
+ }
1026
+ .panel-pricing .list-group-item:first-child {
1027
+ border-top-right-radius: 0px;
1028
+ border-top-left-radius: 0px;
1029
+ }
1030
+ .panel-pricing .panel-body {
1031
+ background-color: #f0f0f0;
1032
+ font-size: 40px;
1033
+ color: #777777;
1034
+ padding: 20px;
1035
+ margin: 0px;
1036
+ }
1037
+ </style>
1038
+ </div>
1039
+ `,
1040
+ });
1041
+
1042
+ Vvveb.Blocks.add("bootstrap4/loading-circle", {
1043
+ name: "Loading circle",
1044
+ image: "https://d2d3qesrx8xj6s.cloudfront.net/img/screenshots/39f0571b9a377cb7ac9c0c11d2346b07dabe1c66.png",
1045
+ html:`
1046
+ <div class="loading-circle">
1047
+ <div class="loader">
1048
+ <div class="loader">
1049
+ <div class="loader">
1050
+ <div class="loader">
1051
+
1052
+ </div>
1053
+ </div>
1054
+ </div>
1055
+ </div>
1056
+ <style>
1057
+
1058
+ .loading-circle {
1059
+ width: 150px;
1060
+ height: 150px;
1061
+ }
1062
+
1063
+ .loader {
1064
+ width: calc(100% - 0px);
1065
+ height: calc(100% - 0px);
1066
+ border: 8px solid #162534;
1067
+ border-top: 8px solid #09f;
1068
+ border-radius: 50%;
1069
+ animation: rotate 5s linear infinite;
1070
+ }
1071
+
1072
+ @keyframes rotate {
1073
+ 100% {transform: rotate(360deg);}
1074
+ }
1075
+ </style>
1076
+ </div>
1077
+ `,
1078
+ });
1079
+
1080
+
1081
+ Vvveb.Blocks.add("bootstrap4/block-quote", {
1082
+ name: "Block quote",
1083
+ image: "https://d2d3qesrx8xj6s.cloudfront.net/img/screenshots/d9f382e143b77d5a630dd79a2a3860611a8a953c.jpg",
1084
+ html:`
1085
+ <div class="container">
1086
+ <blockquote class="quote-box">
1087
+ <p class="quotation-mark">
1088
+
1089
+ </p>
1090
+ <p class="quote-text">
1091
+ Don't believe anything that you read on the internet, it may be fake.
1092
+ </p>
1093
+ <hr>
1094
+ <div class="blog-post-actions">
1095
+ <p class="blog-post-bottom pull-left">
1096
+ Abraham Lincoln
1097
+ </p>
1098
+ <p class="blog-post-bottom pull-right">
1099
+ <span class="badge quote-badge">896</span>  ❤
1100
+ </p>
1101
+ </div>
1102
+ </blockquote>
1103
+ <style>
1104
+ blockquote{
1105
+ border-left:none
1106
+ }
1107
+
1108
+ .quote-badge{
1109
+ background-color: rgba(0, 0, 0, 0.2);
1110
+ }
1111
+
1112
+ .quote-box{
1113
+
1114
+ overflow: hidden;
1115
+ margin-top: -50px;
1116
+ padding-top: -100px;
1117
+ border-radius: 17px;
1118
+ background-color: #4ADFCC;
1119
+ margin-top: 25px;
1120
+ color:white;
1121
+ width: 325px;
1122
+ box-shadow: 2px 2px 2px 2px #E0E0E0;
1123
+
1124
+ }
1125
+
1126
+ .quotation-mark{
1127
+
1128
+ margin-top: -10px;
1129
+ font-weight: bold;
1130
+ font-size:100px;
1131
+ color:white;
1132
+ font-family: "Times New Roman", Georgia, Serif;
1133
+
1134
+ }
1135
+
1136
+ .quote-text{
1137
+
1138
+ font-size: 19px;
1139
+ margin-top: -65px;
1140
+ }
1141
+ </style>
1142
+ </div>
1143
+ `,
1144
+ });
1145
+
1146
+ Vvveb.Blocks.add("bootstrap4/subscribe-newsletter", {
1147
+ name: "Subscribe newsletter",
1148
+ image: "https://d2d3qesrx8xj6s.cloudfront.net/img/screenshots/4f610196b7cb9596555c9c8c475d93ab4ef084f6.jpg",
1149
+ html:`
1150
+ <div class="subscribe-area pb-50 pt-70">
1151
+ <div class="container">
1152
+ <div class="row">
1153
+
1154
+ <div class="col-md-4">
1155
+ <div class="subscribe-text mb-15">
1156
+ <span>JOIN OUR NEWSLETTER</span>
1157
+ <h2>subscribe newsletter</h2>
1158
+ </div>
1159
+ </div>
1160
+ <div class="col-md-8">
1161
+ <div class="subscribe-wrapper subscribe2-wrapper mb-15">
1162
+ <div class="subscribe-form">
1163
+ <form action="#">
1164
+ <input placeholder="enter your email address" type="email">
1165
+ <button>subscribe <i class="fas fa-long-arrow-alt-right"></i></button>
1166
+ </form>
1167
+ </div>
1168
+ </div>
1169
+ </div>
1170
+ </div>
1171
+
1172
+ </div>
1173
+ <style>
1174
+ .subscribe-area {
1175
+ background-image: linear-gradient(to top, #00c6fb 0%, #005bea 100%);
1176
+ }
1177
+
1178
+ .pb-50 {
1179
+ padding-bottom: 50px;
1180
+ }
1181
+ .pt-70 {
1182
+ padding-top: 70px;
1183
+ }
1184
+
1185
+ .mb-15 {
1186
+ margin-bottom: 15px;
1187
+ }
1188
+
1189
+ .subscribe-text span {
1190
+ font-size: 12px;
1191
+ font-weight: 700;
1192
+ color: #fff;
1193
+ letter-spacing: 5px;
1194
+ }
1195
+ .subscribe-text h2 {
1196
+ color: #fff;
1197
+ font-size: 36px;
1198
+ font-weight: 300;
1199
+ margin-bottom: 0;
1200
+ margin-top: 6px;
1201
+ }
1202
+ .subscribe-wrapper {
1203
+ overflow: hidden;
1204
+ }
1205
+ .mb-15 {
1206
+ margin-bottom: 15px;
1207
+ }
1208
+ .subscribe-form {
1209
+ }
1210
+ .subscribe2-wrapper .subscribe-form input {
1211
+ background: none;
1212
+ border: 1px solid #fff;
1213
+ border-radius: 30px;
1214
+ color: #fff;
1215
+ display: inline-block;
1216
+ font-size: 15px;
1217
+ font-weight: 300;
1218
+ height: 57px;
1219
+ margin-right: 17px;
1220
+ padding-left: 35px;
1221
+ width: 70%;
1222
+ cursor: pointer;
1223
+ }
1224
+
1225
+ .subscribe2-wrapper .subscribe-form button {
1226
+ background: #ffff;
1227
+ border: none;
1228
+ border-radius: 30px;
1229
+ color: #4b5d73;
1230
+ display: inline-block;
1231
+ font-size: 18px;
1232
+ font-weight: 400;
1233
+ line-height: 1;
1234
+ padding: 18px 46px;
1235
+ transition: all 0.3s ease 0s;
1236
+ }
1237
+ .subscribe2-wrapper .subscribe-form button i {
1238
+ font-size: 18px;
1239
+ padding-left: 5px;
1240
+ }
1241
+ </style>
1242
+ </div>
1243
+ `,
1244
+ });
libs/builder/builder.js ADDED
The diff for this file is too large to render. See raw diff
 
libs/builder/components-bootstrap4.js ADDED
@@ -0,0 +1,2458 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright 2017 Ziadin Givan
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ https://github.com/givanz/Vvvebjs
17
+ */
18
+
19
+ bgcolorClasses = ["bg-primary", "bg-secondary", "bg-success", "bg-danger", "bg-warning", "bg-info", "bg-light-subtle", "bg-dark", "bg-white"]
20
+
21
+ bgcolorSelectOptions =
22
+ [{
23
+ value: "Default",
24
+ text: ""
25
+ },
26
+ {
27
+ value: "bg-primary",
28
+ text: "Primary"
29
+ }, {
30
+ value: "bg-secondary",
31
+ text: "Secondary"
32
+ }, {
33
+ value: "bg-success",
34
+ text: "Success"
35
+ }, {
36
+ value: "bg-danger",
37
+ text: "Danger"
38
+ }, {
39
+ value: "bg-warning",
40
+ text: "Warning"
41
+ }, {
42
+ value: "bg-info",
43
+ text: "Info"
44
+ }, {
45
+ value: "bg-light-subtle",
46
+ text: "Light"
47
+ }, {
48
+ value: "bg-dark",
49
+ text: "Dark"
50
+ }, {
51
+ value: "bg-white",
52
+ text: "White"
53
+ }];
54
+
55
+ function changeNodeName(node, newNodeName)
56
+ {
57
+ var newNode;
58
+ newNode = document.createElement(newNodeName);
59
+ attributes = node.get(0).attributes;
60
+
61
+ for (i = 0, len = attributes.length; i < len; i++) {
62
+ newNode.setAttribute(attributes[i].nodeName, attributes[i].nodeValue);
63
+ }
64
+
65
+ $(newNode).append($(node).contents());
66
+ $(node).replaceWith(newNode);
67
+
68
+ return newNode;
69
+ }
70
+
71
+ Vvveb.ComponentsGroup['Bootstrap 4'] =
72
+ ["html/container", "html/gridrow", "html/button", "html/buttongroup", "html/buttontoolbar", "html/heading", "html/image", "html/jumbotron", "html/alert", "html/card", "html/listgroup", "html/hr", "html/taglabel", "html/badge", "html/progress", "html/navbar", "html/breadcrumbs", "html/pagination", "html/form", "html/textinput", "html/textareainput", "html/selectinput", "html/fileinput", "html/checkbox", "html/radiobutton", "html/table", "html/paragraph", "html/link", "html/video", "html/button"];
73
+
74
+
75
+ var base_sort = 100;//start sorting for base component from 100 to allow extended properties to be first
76
+ var style_section = 'style';
77
+
78
+ Vvveb.Components.add("_base", {
79
+ name: "Element",
80
+ properties: [{
81
+ key: "element_header",
82
+ inputtype: SectionInput,
83
+ name:false,
84
+ sort:base_sort++,
85
+ data: {header:"General"},
86
+ }, {
87
+ name: "Id",
88
+ key: "id",
89
+ htmlAttr: "id",
90
+ sort: base_sort++,
91
+ inline:true,
92
+ col:6,
93
+ inputtype: TextInput
94
+ }, {
95
+ name: "Class",
96
+ key: "class",
97
+ htmlAttr: "class",
98
+ sort: base_sort++,
99
+ inline:true,
100
+ col:6,
101
+ inputtype: TextInput
102
+ }
103
+ ]
104
+ });
105
+
106
+ //display
107
+ Vvveb.Components.extend("_base", "_base", {
108
+ properties: [
109
+ {
110
+ key: "display_header",
111
+ inputtype: SectionInput,
112
+ name:false,
113
+ sort: base_sort++,
114
+ section: style_section,
115
+ data: {header:"Display"},
116
+ }, {
117
+ name: "Display",
118
+ key: "display",
119
+ htmlAttr: "style",
120
+ sort: base_sort++,
121
+ section: style_section,
122
+ col:6,
123
+ inline:true,
124
+ inputtype: SelectInput,
125
+ validValues: ["block", "inline", "inline-block", "none"],
126
+ data: {
127
+ options: [{
128
+ value: "block",
129
+ text: "Block"
130
+ }, {
131
+ value: "inline",
132
+ text: "Inline"
133
+ }, {
134
+ value: "inline-block",
135
+ text: "Inline Block"
136
+ }, {
137
+ value: "none",
138
+ text: "none"
139
+ }]
140
+ }
141
+ }, {
142
+ name: "Position",
143
+ key: "position",
144
+ htmlAttr: "style",
145
+ sort: base_sort++,
146
+ section: style_section,
147
+ col:6,
148
+ inline:true,
149
+ inputtype: SelectInput,
150
+ validValues: ["static", "fixed", "relative", "absolute"],
151
+ data: {
152
+ options: [{
153
+ value: "static",
154
+ text: "Static"
155
+ }, {
156
+ value: "fixed",
157
+ text: "Fixed"
158
+ }, {
159
+ value: "relative",
160
+ text: "Relative"
161
+ }, {
162
+ value: "absolute",
163
+ text: "Absolute"
164
+ }]
165
+ }
166
+ }, {
167
+ name: "Top",
168
+ key: "top",
169
+ htmlAttr: "style",
170
+ sort: base_sort++,
171
+ section: style_section,
172
+ col:6,
173
+ inline:true,
174
+ parent:"",
175
+ inputtype: CssUnitInput
176
+ }, {
177
+ name: "Left",
178
+ key: "left",
179
+ htmlAttr: "style",
180
+ sort: base_sort++,
181
+ section: style_section,
182
+ col:6,
183
+ inline:true,
184
+ parent:"",
185
+ inputtype: CssUnitInput
186
+ }, {
187
+ name: "Bottom",
188
+ key: "bottom",
189
+ htmlAttr: "style",
190
+ sort: base_sort++,
191
+ section: style_section,
192
+ col:6,
193
+ inline:true,
194
+ parent:"",
195
+ inputtype: CssUnitInput
196
+ }, {
197
+ name: "Right",
198
+ key: "right",
199
+ htmlAttr: "style",
200
+ sort: base_sort++,
201
+ section: style_section,
202
+ col:6,
203
+ inline:true,
204
+ parent:"",
205
+ inputtype: CssUnitInput
206
+ },{
207
+ name: "Float",
208
+ key: "float",
209
+ htmlAttr: "style",
210
+ sort: base_sort++,
211
+ section: style_section,
212
+ col:12,
213
+ inline:true,
214
+ inputtype: RadioButtonInput,
215
+ data: {
216
+ extraclass:"btn-group-sm btn-group-fullwidth",
217
+ options: [{
218
+ value: "none",
219
+ icon:"la la-times",
220
+ //text: "None",
221
+ title: "None",
222
+ checked:true,
223
+ }, {
224
+ value: "left",
225
+ //text: "Left",
226
+ title: "Left",
227
+ icon:"la la-align-left",
228
+ checked:false,
229
+ }, {
230
+ value: "right",
231
+ //text: "Right",
232
+ title: "Right",
233
+ icon:"la la-align-right",
234
+ checked:false,
235
+ }],
236
+ }
237
+ }, {
238
+ name: "Opacity",
239
+ key: "opacity",
240
+ htmlAttr: "style",
241
+ sort: base_sort++,
242
+ section: style_section,
243
+ col:12,
244
+ inline:true,
245
+ parent:"",
246
+ inputtype: RangeInput,
247
+ data:{
248
+ max: 1, //max zoom level
249
+ min:0,
250
+ step:0.1
251
+ },
252
+ }, {
253
+ name: "Background Color",
254
+ key: "background-color",
255
+ sort: base_sort++,
256
+ section: style_section,
257
+ col:6,
258
+ inline:true,
259
+ htmlAttr: "style",
260
+ inputtype: ColorInput,
261
+ }, {
262
+ name: "Text Color",
263
+ key: "color",
264
+ sort: base_sort++,
265
+ section: style_section,
266
+ col:6,
267
+ inline:true,
268
+ htmlAttr: "style",
269
+ inputtype: ColorInput,
270
+ }]
271
+ });
272
+
273
+ //Typography
274
+ Vvveb.Components.extend("_base", "_base", {
275
+ properties: [
276
+ {
277
+ key: "typography_header",
278
+ inputtype: SectionInput,
279
+ name:false,
280
+ sort: base_sort++,
281
+ section: style_section,
282
+ data: {header:"Typography"},
283
+
284
+ }, {
285
+ name: "Font size",
286
+ key: "font-size",
287
+ htmlAttr: "style",
288
+ sort: base_sort++,
289
+ section: style_section,
290
+ col:6,
291
+ inline:true,
292
+ inputtype: CssUnitInput
293
+ }, {
294
+ name: "Font weight",
295
+ key: "font-weight",
296
+ htmlAttr: "style",
297
+ sort: base_sort++,
298
+ section: style_section,
299
+ col:6,
300
+ inline:true,
301
+ inputtype: SelectInput,
302
+ data: {
303
+ options: [{
304
+ value: "",
305
+ text: "Default"
306
+ }, {
307
+ value: "100",
308
+ text: "Thin"
309
+ }, {
310
+ value: "200",
311
+ text: "Extra-Light"
312
+ }, {
313
+ value: "300",
314
+ text: "Light"
315
+ }, {
316
+ value: "400",
317
+ text: "Normal"
318
+ }, {
319
+ value: "500",
320
+ text: "Medium"
321
+ }, {
322
+ value: "600",
323
+ text: "Semi-Bold"
324
+ }, {
325
+ value: "700",
326
+ text: "Bold"
327
+ }, {
328
+ value: "800",
329
+ text: "Extra-Bold"
330
+ }, {
331
+ value: "900",
332
+ text: "Ultra-Bold"
333
+ }],
334
+ }
335
+ }, {
336
+ name: "Font family",
337
+ key: "font-family",
338
+ htmlAttr: "style",
339
+ sort: base_sort++,
340
+ section: style_section,
341
+ col:12,
342
+ inline:true,
343
+ inputtype: SelectInput,
344
+ data: {
345
+ options: [{
346
+ value: "",
347
+ text: "Default"
348
+ }, {
349
+ value: "Arial, Helvetica, sans-serif",
350
+ text: "Arial"
351
+ }, {
352
+ value: '\'Lucida Sans Unicode\', \'Lucida Grande\', sans-serif',
353
+ text: 'Lucida Grande'
354
+ }, {
355
+ value: '\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif',
356
+ text: 'Palatino Linotype'
357
+ }, {
358
+ value: '\'Times New Roman\', Times, serif',
359
+ text: 'Times New Roman'
360
+ }, {
361
+ value: "Georgia, serif",
362
+ text: "Georgia, serif"
363
+ }, {
364
+ value: "Tahoma, Geneva, sans-serif",
365
+ text: "Tahoma"
366
+ }, {
367
+ value: '\'Comic Sans MS\', cursive, sans-serif',
368
+ text: 'Comic Sans'
369
+ }, {
370
+ value: 'Verdana, Geneva, sans-serif',
371
+ text: 'Verdana'
372
+ }, {
373
+ value: 'Impact, Charcoal, sans-serif',
374
+ text: 'Impact'
375
+ }, {
376
+ value: '\'Arial Black\', Gadget, sans-serif',
377
+ text: 'Arial Black'
378
+ }, {
379
+ value: '\'Trebuchet MS\', Helvetica, sans-serif',
380
+ text: 'Trebuchet'
381
+ }, {
382
+ value: '\'Courier New\', Courier, monospace',
383
+ text: 'Courier New'
384
+ }, {
385
+ value: '\'Brush Script MT\', sans-serif',
386
+ text: 'Brush Script'
387
+ }]
388
+ }
389
+ }, {
390
+ name: "Text align",
391
+ key: "text-align",
392
+ htmlAttr: "style",
393
+ sort: base_sort++,
394
+ section: style_section,
395
+ col:12,
396
+ inline:true,
397
+ inputtype: RadioButtonInput,
398
+ data: {
399
+ extraclass:"btn-group-sm btn-group-fullwidth",
400
+ options: [{
401
+ value: "",
402
+ icon:"la la-times",
403
+ //text: "None",
404
+ title: "None",
405
+ checked:true,
406
+ }, {
407
+ value: "left",
408
+ //text: "Left",
409
+ title: "Left",
410
+ icon:"la la-align-left",
411
+ checked:false,
412
+ }, {
413
+ value: "center",
414
+ //text: "Center",
415
+ title: "Center",
416
+ icon:"la la-align-center",
417
+ checked:false,
418
+ }, {
419
+ value: "right",
420
+ //text: "Right",
421
+ title: "Right",
422
+ icon:"la la-align-right",
423
+ checked:false,
424
+ }, {
425
+ value: "justify",
426
+ //text: "justify",
427
+ title: "Justify",
428
+ icon:"la la-align-justify",
429
+ checked:false,
430
+ }],
431
+ },
432
+ }, {
433
+ name: "Line height",
434
+ key: "line-height",
435
+ htmlAttr: "style",
436
+ sort: base_sort++,
437
+ section: style_section,
438
+ col:6,
439
+ inline:true,
440
+ inputtype: CssUnitInput
441
+ }, {
442
+ name: "Letter spacing",
443
+ key: "letter-spacing",
444
+ htmlAttr: "style",
445
+ sort: base_sort++,
446
+ section: style_section,
447
+ col:6,
448
+ inline:true,
449
+ inputtype: CssUnitInput
450
+ }, {
451
+ name: "Text decoration",
452
+ key: "text-decoration-line",
453
+ htmlAttr: "style",
454
+ sort: base_sort++,
455
+ section: style_section,
456
+ col:12,
457
+ inline:true,
458
+ inputtype: RadioButtonInput,
459
+ data: {
460
+ extraclass:"btn-group-sm btn-group-fullwidth",
461
+ options: [{
462
+ value: "none",
463
+ icon:"la la-times",
464
+ //text: "None",
465
+ title: "None",
466
+ checked:true,
467
+ }, {
468
+ value: "underline",
469
+ //text: "Left",
470
+ title: "underline",
471
+ icon:"la la-long-arrow-alt-down",
472
+ checked:false,
473
+ }, {
474
+ value: "overline",
475
+ //text: "Right",
476
+ title: "overline",
477
+ icon:"la la-long-arrow-alt-up",
478
+ checked:false,
479
+ }, {
480
+ value: "line-through",
481
+ //text: "Right",
482
+ title: "Line Through",
483
+ icon:"la la-strikethrough",
484
+ checked:false,
485
+ }, {
486
+ value: "underline overline",
487
+ //text: "justify",
488
+ title: "Underline Overline",
489
+ icon:"la la-arrows-alt-v",
490
+ checked:false,
491
+ }],
492
+ },
493
+ }, {
494
+ name: "Decoration Color",
495
+ key: "text-decoration-color",
496
+ sort: base_sort++,
497
+ section: style_section,
498
+ col:6,
499
+ inline:true,
500
+ htmlAttr: "style",
501
+ inputtype: ColorInput,
502
+ }, {
503
+ name: "Decoration style",
504
+ key: "text-decoration-style",
505
+ htmlAttr: "style",
506
+ sort: base_sort++,
507
+ section: style_section,
508
+ col:6,
509
+ inline:true,
510
+ inputtype: SelectInput,
511
+ data: {
512
+ options: [{
513
+ value: "",
514
+ text: "Default"
515
+ }, {
516
+ value: "solid",
517
+ text: "Solid"
518
+ }, {
519
+ value: "wavy",
520
+ text: "Wavy"
521
+ }, {
522
+ value: "dotted",
523
+ text: "Dotted"
524
+ }, {
525
+ value: "dashed",
526
+ text: "Dashed"
527
+ }, {
528
+ value: "double",
529
+ text: "Double"
530
+ }],
531
+ }
532
+ }]
533
+ })
534
+
535
+ //Size
536
+ Vvveb.Components.extend("_base", "_base", {
537
+ properties: [{
538
+ key: "size_header",
539
+ inputtype: SectionInput,
540
+ name:false,
541
+ sort: base_sort++,
542
+ section: style_section,
543
+ data: {header:"Size", expanded:false},
544
+ }, {
545
+ name: "Width",
546
+ key: "width",
547
+ htmlAttr: "style",
548
+ sort: base_sort++,
549
+ section: style_section,
550
+ col:6,
551
+ inline:true,
552
+ inputtype: CssUnitInput
553
+ }, {
554
+ name: "Height",
555
+ key: "height",
556
+ htmlAttr: "style",
557
+ sort: base_sort++,
558
+ section: style_section,
559
+ col:6,
560
+ inline:true,
561
+ inputtype: CssUnitInput
562
+ }, {
563
+ name: "Min Width",
564
+ key: "min-width",
565
+ htmlAttr: "style",
566
+ sort: base_sort++,
567
+ section: style_section,
568
+ col:6,
569
+ inline:true,
570
+ inputtype: CssUnitInput
571
+ }, {
572
+ name: "Min Height",
573
+ key: "min-height",
574
+ htmlAttr: "style",
575
+ sort: base_sort++,
576
+ section: style_section,
577
+ col:6,
578
+ inline:true,
579
+ inputtype: CssUnitInput
580
+ }, {
581
+ name: "Max Width",
582
+ key: "max-width",
583
+ htmlAttr: "style",
584
+ sort: base_sort++,
585
+ section: style_section,
586
+ col:6,
587
+ inline:true,
588
+ inputtype: CssUnitInput
589
+ }, {
590
+ name: "Max Height",
591
+ key: "max-height",
592
+ htmlAttr: "style",
593
+ sort: base_sort++,
594
+ section: style_section,
595
+ col:6,
596
+ inline:true,
597
+ inputtype: CssUnitInput
598
+ }]
599
+ });
600
+
601
+ //Margin
602
+ Vvveb.Components.extend("_base", "_base", {
603
+ properties: [{
604
+ key: "margins_header",
605
+ inputtype: SectionInput,
606
+ name:false,
607
+ sort: base_sort++,
608
+ section: style_section,
609
+ data: {header:"Margin", expanded:false},
610
+ }, {
611
+ name: "Top",
612
+ key: "margin-top",
613
+ htmlAttr: "style",
614
+ sort: base_sort++,
615
+ section: style_section,
616
+ col:6,
617
+ inline:true,
618
+ inputtype: CssUnitInput
619
+ }, {
620
+ name: "Right",
621
+ key: "margin-right",
622
+ htmlAttr: "style",
623
+ sort: base_sort++,
624
+ section: style_section,
625
+ col:6,
626
+ inline:true,
627
+ inputtype: CssUnitInput
628
+ }, {
629
+ name: "Bottom",
630
+ key: "margin-bottom",
631
+ htmlAttr: "style",
632
+ sort: base_sort++,
633
+ section: style_section,
634
+ col:6,
635
+ inline:true,
636
+ inputtype: CssUnitInput
637
+ }, {
638
+ name: "Left",
639
+ key: "margin-left",
640
+ htmlAttr: "style",
641
+ sort: base_sort++,
642
+ section: style_section,
643
+ col:6,
644
+ inline:true,
645
+ inputtype: CssUnitInput
646
+ }]
647
+ });
648
+
649
+ //Padding
650
+ Vvveb.Components.extend("_base", "_base", {
651
+ properties: [{
652
+ key: "paddings_header",
653
+ inputtype: SectionInput,
654
+ name:false,
655
+ sort: base_sort++,
656
+ section: style_section,
657
+ data: {header:"Padding", expanded:false},
658
+ }, {
659
+ name: "Top",
660
+ key: "padding-top",
661
+ htmlAttr: "style",
662
+ sort: base_sort++,
663
+ section: style_section,
664
+ col:6,
665
+ inline:true,
666
+ inputtype: CssUnitInput
667
+ }, {
668
+ name: "Right",
669
+ key: "padding-right",
670
+ htmlAttr: "style",
671
+ sort: base_sort++,
672
+ section: style_section,
673
+ col:6,
674
+ inline:true,
675
+ inputtype: CssUnitInput
676
+ }, {
677
+ name: "Bottom",
678
+ key: "padding-bottom",
679
+ htmlAttr: "style",
680
+ sort: base_sort++,
681
+ section: style_section,
682
+ col:6,
683
+ inline:true,
684
+ inputtype: CssUnitInput
685
+ }, {
686
+ name: "Left",
687
+ key: "padding-left",
688
+ htmlAttr: "style",
689
+ sort: base_sort++,
690
+ section: style_section,
691
+ col:6,
692
+ inline:true,
693
+ inputtype: CssUnitInput
694
+ }]
695
+ });
696
+
697
+
698
+ //Border
699
+ Vvveb.Components.extend("_base", "_base", {
700
+ properties: [{
701
+ key: "border_header",
702
+ inputtype: SectionInput,
703
+ name:false,
704
+ sort: base_sort++,
705
+ section: style_section,
706
+ data: {header:"Border", expanded:false},
707
+ }, {
708
+ name: "Style",
709
+ key: "border-style",
710
+ htmlAttr: "style",
711
+ sort: base_sort++,
712
+ section: style_section,
713
+ col:12,
714
+ inline:true,
715
+ inputtype: SelectInput,
716
+ data: {
717
+ options: [{
718
+ value: "",
719
+ text: "Default"
720
+ }, {
721
+ value: "solid",
722
+ text: "Solid"
723
+ }, {
724
+ value: "dotted",
725
+ text: "Dotted"
726
+ }, {
727
+ value: "dashed",
728
+ text: "Dashed"
729
+ }],
730
+ }
731
+ }, {
732
+ name: "Width",
733
+ key: "border-width",
734
+ htmlAttr: "style",
735
+ sort: base_sort++,
736
+ section: style_section,
737
+ col:6,
738
+ inline:true,
739
+ inputtype: CssUnitInput
740
+ }, {
741
+ name: "Color",
742
+ key: "border-color",
743
+ sort: base_sort++,
744
+ section: style_section,
745
+ col:6,
746
+ inline:true,
747
+ htmlAttr: "style",
748
+ inputtype: ColorInput,
749
+ }]
750
+ });
751
+
752
+
753
+
754
+ //Border radius
755
+ Vvveb.Components.extend("_base", "_base", {
756
+ properties: [{
757
+ key: "border_radius_header",
758
+ inputtype: SectionInput,
759
+ name:false,
760
+ sort: base_sort++,
761
+ section: style_section,
762
+ data: {header:"Border radius", expanded:false},
763
+ }, {
764
+ name: "Top Left",
765
+ key: "border-top-left-radius",
766
+ htmlAttr: "style",
767
+ sort: base_sort++,
768
+ section: style_section,
769
+ col:6,
770
+ inline:true,
771
+ inputtype: CssUnitInput
772
+ }, {
773
+ name: "Top Right",
774
+ key: "border-top-right-radius",
775
+ htmlAttr: "style",
776
+ sort: base_sort++,
777
+ section: style_section,
778
+ col:6,
779
+ inline:true,
780
+ inputtype: CssUnitInput
781
+ }, {
782
+ name: "Bottom Left",
783
+ key: "border-bottom-left-radius",
784
+ htmlAttr: "style",
785
+ sort: base_sort++,
786
+ section: style_section,
787
+ col:6,
788
+ inline:true,
789
+ inputtype: CssUnitInput
790
+ }, {
791
+ name: "Bottom Right",
792
+ key: "border-bottom-right-radius",
793
+ htmlAttr: "style",
794
+ sort: base_sort++,
795
+ section: style_section,
796
+ col:6,
797
+ inline:true,
798
+ inputtype: CssUnitInput
799
+ }]
800
+ });
801
+
802
+ //Background image
803
+ Vvveb.Components.extend("_base", "_base", {
804
+ properties: [{
805
+ key: "background_image_header",
806
+ inputtype: SectionInput,
807
+ name:false,
808
+ sort: base_sort++,
809
+ section: style_section,
810
+ data: {header:"Background Image", expanded:false},
811
+ },{
812
+ name: "Image",
813
+ key: "Image",
814
+ sort: base_sort++,
815
+ section: style_section,
816
+ //htmlAttr: "style",
817
+ inputtype: ImageInput,
818
+
819
+ init: function(node) {
820
+ var image = $(node).css("background-image").replace(/^url\(['"]?(.+)['"]?\)/, '$1');
821
+ return image;
822
+ },
823
+
824
+ onChange: function(node, value) {
825
+
826
+ $(node).css('background-image', 'url(' + value + ')');
827
+
828
+ return node;
829
+ }
830
+
831
+ }, {
832
+ name: "Repeat",
833
+ key: "background-repeat",
834
+ sort: base_sort++,
835
+ section: style_section,
836
+ htmlAttr: "style",
837
+ inputtype: SelectInput,
838
+ data: {
839
+ options: [{
840
+ value: "",
841
+ text: "Default"
842
+ }, {
843
+ value: "repeat-x",
844
+ text: "repeat-x"
845
+ }, {
846
+ value: "repeat-y",
847
+ text: "repeat-y"
848
+ }, {
849
+ value: "no-repeat",
850
+ text: "no-repeat"
851
+ }],
852
+ }
853
+ }, {
854
+ name: "Size",
855
+ key: "background-size",
856
+ sort: base_sort++,
857
+ section: style_section,
858
+ htmlAttr: "style",
859
+ inputtype: SelectInput,
860
+ data: {
861
+ options: [{
862
+ value: "",
863
+ text: "Default"
864
+ }, {
865
+ value: "contain",
866
+ text: "contain"
867
+ }, {
868
+ value: "cover",
869
+ text: "cover"
870
+ }],
871
+ }
872
+ }, {
873
+ name: "Position x",
874
+ key: "background-position-x",
875
+ sort: base_sort++,
876
+ section: style_section,
877
+ htmlAttr: "style",
878
+ col:6,
879
+ inline:true,
880
+ inputtype: SelectInput,
881
+ data: {
882
+ options: [{
883
+ value: "",
884
+ text: "Default"
885
+ }, {
886
+ value: "center",
887
+ text: "center"
888
+ }, {
889
+ value: "right",
890
+ text: "right"
891
+ }, {
892
+ value: "left",
893
+ text: "left"
894
+ }],
895
+ }
896
+ }, {
897
+ name: "Position y",
898
+ key: "background-position-y",
899
+ sort: base_sort++,
900
+ section: style_section,
901
+ htmlAttr: "style",
902
+ col:6,
903
+ inline:true,
904
+ inputtype: SelectInput,
905
+ data: {
906
+ options: [{
907
+ value: "",
908
+ text: "Default"
909
+ }, {
910
+ value: "center",
911
+ text: "center"
912
+ }, {
913
+ value: "top",
914
+ text: "top"
915
+ }, {
916
+ value: "bottom",
917
+ text: "bottom"
918
+ }],
919
+ }
920
+ }]
921
+ });
922
+
923
+ Vvveb.Components.extend("_base", "html/container", {
924
+ classes: ["container", "container-fluid"],
925
+ image: "icons/container.svg",
926
+ html: '<div class="container" style="min-height:150px;"><div class="m-5">Container</div></div>',
927
+ name: "Container",
928
+ properties: [
929
+ {
930
+ name: "Type",
931
+ key: "type",
932
+ htmlAttr: "class",
933
+ inputtype: SelectInput,
934
+ validValues: ["container", "container-fluid"],
935
+ data: {
936
+ options: [{
937
+ value: "container",
938
+ text: "Default"
939
+ }, {
940
+ value: "container-fluid",
941
+ text: "Fluid"
942
+ }]
943
+ }
944
+ },
945
+ {
946
+ name: "Background",
947
+ key: "background",
948
+ htmlAttr: "class",
949
+ validValues: bgcolorClasses,
950
+ inputtype: SelectInput,
951
+ data: {
952
+ options: bgcolorSelectOptions
953
+ }
954
+ },
955
+ {
956
+ name: "Background Color",
957
+ key: "background-color",
958
+ htmlAttr: "style",
959
+ inputtype: ColorInput,
960
+ },
961
+ {
962
+ name: "Text Color",
963
+ key: "color",
964
+ htmlAttr: "style",
965
+ inputtype: ColorInput,
966
+ }],
967
+ });
968
+
969
+ Vvveb.Components.extend("_base", "html/heading", {
970
+ image: "icons/heading.svg",
971
+ name: "Heading",
972
+ nodes: ["h1", "h2","h3", "h4","h5","h6"],
973
+ html: "<h1>Heading</h1>",
974
+
975
+ properties: [
976
+ {
977
+ name: "Size",
978
+ key: "size",
979
+ inputtype: SelectInput,
980
+
981
+ onChange: function(node, value) {
982
+
983
+ return changeNodeName(node, "h" + value);
984
+ },
985
+
986
+ init: function(node) {
987
+ var regex;
988
+ regex = /H(\d)/.exec(node.nodeName);
989
+ if (regex && regex[1]) {
990
+ return regex[1]
991
+ }
992
+ return 1
993
+ },
994
+
995
+ data:{
996
+ options: [{
997
+ value: "1",
998
+ text: "1"
999
+ }, {
1000
+ value: "2",
1001
+ text: "2"
1002
+ }, {
1003
+ value: "3",
1004
+ text: "3"
1005
+ }, {
1006
+ value: "4",
1007
+ text: "4"
1008
+ }, {
1009
+ value: "5",
1010
+ text: "5"
1011
+ }, {
1012
+ value: "6",
1013
+ text: "6"
1014
+ }]
1015
+ },
1016
+ }]
1017
+ });
1018
+ Vvveb.Components.extend("_base", "html/link", {
1019
+ nodes: ["a"],
1020
+ name: "Link",
1021
+ html: '<a href="#" class="d-inline-block"><span>Link</span></a>',
1022
+ image: "icons/link.svg",
1023
+ properties: [{
1024
+ name: "Url",
1025
+ key: "href",
1026
+ htmlAttr: "href",
1027
+ inputtype: LinkInput
1028
+ }, {
1029
+ name: "Target",
1030
+ key: "target",
1031
+ htmlAttr: "target",
1032
+ inputtype: TextInput
1033
+ }]
1034
+ });
1035
+ Vvveb.Components.extend("_base", "html/image", {
1036
+ nodes: ["img"],
1037
+ name: "Image",
1038
+ html: '<img src="' + Vvveb.baseUrl + 'icons/image.svg" height="128" width="128">',
1039
+ /*
1040
+ afterDrop: function (node)
1041
+ {
1042
+ node.attr("src", '');
1043
+ return node;
1044
+ },*/
1045
+ image: "icons/image.svg",
1046
+ properties: [{
1047
+ name: "Image",
1048
+ key: "src",
1049
+ htmlAttr: "src",
1050
+ inputtype: ImageInput
1051
+ }, {
1052
+ name: "Width",
1053
+ key: "width",
1054
+ htmlAttr: "width",
1055
+ inputtype: TextInput
1056
+ }, {
1057
+ name: "Height",
1058
+ key: "height",
1059
+ htmlAttr: "height",
1060
+ inputtype: TextInput
1061
+ }, {
1062
+ name: "Alt",
1063
+ key: "alt",
1064
+ htmlAttr: "alt",
1065
+ inputtype: TextInput
1066
+ }]
1067
+ });
1068
+ Vvveb.Components.add("html/hr", {
1069
+ image: "icons/hr.svg",
1070
+ nodes: ["hr"],
1071
+ name: "Horizontal Rule",
1072
+ html: "<hr>"
1073
+ });
1074
+ Vvveb.Components.extend("_base", "html/label", {
1075
+ name: "Label",
1076
+ nodes: ["label"],
1077
+ html: '<label for="">Label</label>',
1078
+ properties: [{
1079
+ name: "For id",
1080
+ htmlAttr: "for",
1081
+ key: "for",
1082
+ inputtype: TextInput
1083
+ }]
1084
+ });
1085
+ Vvveb.Components.extend("_base", "html/button", {
1086
+ classes: ["btn", "btn-link"],
1087
+ name: "Button",
1088
+ image: "icons/button.svg",
1089
+ html: '<button type="button" class="btn btn-primary">Primary</button>',
1090
+ properties: [{
1091
+ name: "Link To",
1092
+ key: "href",
1093
+ htmlAttr: "href",
1094
+ inputtype: LinkInput
1095
+ }, {
1096
+ name: "Type",
1097
+ key: "type",
1098
+ htmlAttr: "class",
1099
+ inputtype: SelectInput,
1100
+ validValues: ["btn-default", "btn-primary", "btn-info", "btn-success", "btn-warning", "btn-info", "btn-light", "btn-dark", "btn-outline-primary", "btn-outline-info", "btn-outline-success", "btn-outline-warning", "btn-outline-info", "btn-outline-light", "btn-outline-dark", "btn-link"],
1101
+ data: {
1102
+ options: [{
1103
+ value: "btn-default",
1104
+ text: "Default"
1105
+ }, {
1106
+ value: "btn-primary",
1107
+ text: "Primary"
1108
+ }, {
1109
+ value: "btn btn-info",
1110
+ text: "Info"
1111
+ }, {
1112
+ value: "btn-success",
1113
+ text: "Success"
1114
+ }, {
1115
+ value: "btn-warning",
1116
+ text: "Warning"
1117
+ }, {
1118
+ value: "btn-info",
1119
+ text: "Info"
1120
+ }, {
1121
+ value: "btn-light",
1122
+ text: "Light"
1123
+ }, {
1124
+ value: "btn-dark",
1125
+ text: "Dark"
1126
+ }, {
1127
+ value: "btn-outline-primary",
1128
+ text: "Primary outline"
1129
+ }, {
1130
+ value: "btn btn-outline-info",
1131
+ text: "Info outline"
1132
+ }, {
1133
+ value: "btn-outline-success",
1134
+ text: "Success outline"
1135
+ }, {
1136
+ value: "btn-outline-warning",
1137
+ text: "Warning outline"
1138
+ }, {
1139
+ value: "btn-outline-info",
1140
+ text: "Info outline"
1141
+ }, {
1142
+ value: "btn-outline-light",
1143
+ text: "Light outline"
1144
+ }, {
1145
+ value: "btn-outline-dark",
1146
+ text: "Dark outline"
1147
+ }, {
1148
+ value: "btn-link",
1149
+ text: "Link"
1150
+ }]
1151
+ }
1152
+ }, {
1153
+ name: "Size",
1154
+ key: "size",
1155
+ htmlAttr: "class",
1156
+ inputtype: SelectInput,
1157
+ validValues: ["btn-lg", "btn-sm"],
1158
+ data: {
1159
+ options: [{
1160
+ value: "",
1161
+ text: "Default"
1162
+ }, {
1163
+ value: "btn-lg",
1164
+ text: "Large"
1165
+ }, {
1166
+ value: "btn-sm",
1167
+ text: "Small"
1168
+ }]
1169
+ }
1170
+ }, {
1171
+ name: "Target",
1172
+ key: "target",
1173
+ htmlAttr: "target",
1174
+ inputtype: TextInput
1175
+ }, {
1176
+ name: "Disabled",
1177
+ key: "disabled",
1178
+ htmlAttr: "class",
1179
+ inputtype: ToggleInput,
1180
+ validValues: ["disabled"],
1181
+ data: {
1182
+ on: "disabled",
1183
+ off: null
1184
+ }
1185
+ }]
1186
+ });
1187
+ Vvveb.Components.extend("_base", "html/buttongroup", {
1188
+ classes: ["btn-group"],
1189
+ name: "Button Group",
1190
+ image: "icons/button_group.svg",
1191
+ html: '<div class="btn-group" role="group" aria-label="Basic example"><button type="button" class="btn btn-secondary">Left</button><button type="button" class="btn btn-secondary">Middle</button> <button type="button" class="btn btn-secondary">Right</button></div>',
1192
+ properties: [{
1193
+ name: "Size",
1194
+ key: "size",
1195
+ htmlAttr: "class",
1196
+ inputtype: SelectInput,
1197
+ validValues: ["btn-group-lg", "btn-group-sm"],
1198
+ data: {
1199
+ options: [{
1200
+ value: "",
1201
+ text: "Default"
1202
+ }, {
1203
+ value: "btn-group-lg",
1204
+ text: "Large"
1205
+ }, {
1206
+ value: "btn-group-sm",
1207
+ text: "Small"
1208
+ }]
1209
+ }
1210
+ }, {
1211
+ name: "Alignment",
1212
+ key: "alignment",
1213
+ htmlAttr: "class",
1214
+ inputtype: SelectInput,
1215
+ validValues: ["btn-group", "btn-group-vertical"],
1216
+ data: {
1217
+ options: [{
1218
+ value: "",
1219
+ text: "Default"
1220
+ }, {
1221
+ value: "btn-group",
1222
+ text: "Horizontal"
1223
+ }, {
1224
+ value: "btn-group-vertical",
1225
+ text: "Vertical"
1226
+ }]
1227
+ }
1228
+ }]
1229
+ });
1230
+ Vvveb.Components.extend("_base", "html/buttontoolbar", {
1231
+ classes: ["btn-toolbar"],
1232
+ name: "Button Toolbar",
1233
+ image: "icons/button_toolbar.svg",
1234
+ html: '<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">\
1235
+ <div class="btn-group mr-2" role="group" aria-label="First group">\
1236
+ <button type="button" class="btn btn-secondary">1</button>\
1237
+ <button type="button" class="btn btn-secondary">2</button>\
1238
+ <button type="button" class="btn btn-secondary">3</button>\
1239
+ <button type="button" class="btn btn-secondary">4</button>\
1240
+ </div>\
1241
+ <div class="btn-group mr-2" role="group" aria-label="Second group">\
1242
+ <button type="button" class="btn btn-secondary">5</button>\
1243
+ <button type="button" class="btn btn-secondary">6</button>\
1244
+ <button type="button" class="btn btn-secondary">7</button>\
1245
+ </div>\
1246
+ <div class="btn-group" role="group" aria-label="Third group">\
1247
+ <button type="button" class="btn btn-secondary">8</button>\
1248
+ </div>\
1249
+ </div>'
1250
+ });
1251
+ Vvveb.Components.extend("_base","html/alert", {
1252
+ classes: ["alert"],
1253
+ name: "Alert",
1254
+ image: "icons/alert.svg",
1255
+ html: '<div class="alert alert-warning alert-dismissible fade show" role="alert">\
1256
+ <button type="button" class="btn-close" data-dismiss="alert" aria-label="Close">\
1257
+ <span aria-hidden="true">&times;</span>\
1258
+ </button>\
1259
+ <strong>Holy guacamole!</strong> You should check in on some of those fields below.\
1260
+ </div>',
1261
+ properties: [{
1262
+ name: "Type",
1263
+ key: "type",
1264
+ htmlAttr: "class",
1265
+ validValues: ["alert-primary", "alert-secondary", "alert-success", "alert-danger", "alert-warning", "alert-info", "alert-light", "alert-dark"],
1266
+ inputtype: SelectInput,
1267
+ data: {
1268
+ options: [{
1269
+ value: "alert-primary",
1270
+ text: "Default"
1271
+ }, {
1272
+ value: "alert-secondary",
1273
+ text: "Secondary"
1274
+ }, {
1275
+ value: "alert-success",
1276
+ text: "Success"
1277
+ }, {
1278
+ value: "alert-danger",
1279
+ text: "Danger"
1280
+ }, {
1281
+ value: "alert-warning",
1282
+ text: "Warning"
1283
+ }, {
1284
+ value: "alert-info",
1285
+ text: "Info"
1286
+ }, {
1287
+ value: "alert-light",
1288
+ text: "Light"
1289
+ }, {
1290
+ value: "alert-dark",
1291
+ text: "Dark"
1292
+ }]
1293
+ }
1294
+ }]
1295
+ });
1296
+ Vvveb.Components.extend("_base", "html/badge", {
1297
+ classes: ["badge"],
1298
+ image: "icons/badge.svg",
1299
+ name: "Badge",
1300
+ html: '<span class="badge badge-primary">Primary badge</span>',
1301
+ properties: [{
1302
+ name: "Color",
1303
+ key: "color",
1304
+ htmlAttr: "class",
1305
+ validValues:["badge-primary", "badge-secondary", "badge-success", "badge-danger", "badge-warning", "badge-info", "badge-light", "badge-dark"],
1306
+ inputtype: SelectInput,
1307
+ data: {
1308
+ options: [{
1309
+ value: "",
1310
+ text: "Default"
1311
+ }, {
1312
+ value: "badge-primary",
1313
+ text: "Primary"
1314
+ }, {
1315
+ value: "badge-secondary",
1316
+ text: "Secondary"
1317
+ }, {
1318
+ value: "badge-success",
1319
+ text: "Success"
1320
+ }, {
1321
+ value: "badge-warning",
1322
+ text: "Warning"
1323
+ }, {
1324
+ value: "badge-danger",
1325
+ text: "Danger"
1326
+ }, {
1327
+ value: "badge-info",
1328
+ text: "Info"
1329
+ }, {
1330
+ value: "badge-light",
1331
+ text: "Light"
1332
+ }, {
1333
+ value: "badge-dark",
1334
+ text: "Dark"
1335
+ }]
1336
+ }
1337
+ }]
1338
+ });
1339
+ Vvveb.Components.extend("_base", "html/card", {
1340
+ classes: ["card"],
1341
+ image: "icons/panel.svg",
1342
+ name: "Card",
1343
+ html: '<div class="card">\
1344
+ <img class="card-img-top" src="../libs/builder/icons/image.svg" alt="Card image cap" width="128" height="128">\
1345
+ <div class="card-body">\
1346
+ <h4 class="card-title">Card title</h4>\
1347
+ <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card\'s content.</p>\
1348
+ <a href="#" class="btn btn-primary">Go somewhere</a>\
1349
+ </div>\
1350
+ </div>'
1351
+ });
1352
+ Vvveb.Components.extend("_base", "html/listgroup", {
1353
+ name: "List Group",
1354
+ image: "icons/list_group.svg",
1355
+ classes: ["list-group"],
1356
+ html: '<ul class="list-group">\n <li class="list-group-item">\n <span class="badge">14</span>\n Cras justo odio\n </li>\n <li class="list-group-item">\n <span class="badge">2</span>\n Dapibus ac facilisis in\n </li>\n <li class="list-group-item">\n <span class="badge">1</span>\n Morbi leo risus\n </li>\n</ul>'
1357
+ });
1358
+ Vvveb.Components.extend("_base", "html/listitem", {
1359
+ name: "List Item",
1360
+ classes: ["list-group-item"],
1361
+ html: '<li class="list-group-item"><span class="badge">14</span> Cras justo odio</li>'
1362
+ });
1363
+ Vvveb.Components.extend("_base", "html/breadcrumbs", {
1364
+ classes: ["breadcrumb"],
1365
+ name: "Breadcrumbs",
1366
+ image: "icons/breadcrumbs.svg",
1367
+ html: '<ol class="breadcrumb">\
1368
+ <li class="breadcrumb-item active"><a href="#">Home</a></li>\
1369
+ <li class="breadcrumb-item active"><a href="#">Library</a></li>\
1370
+ <li class="breadcrumb-item active">Data 3</li>\
1371
+ </ol>'
1372
+ });
1373
+ Vvveb.Components.extend("_base", "html/breadcrumbitem", {
1374
+ classes: ["breadcrumb-item"],
1375
+ name: "Breadcrumb Item",
1376
+ html: '<li class="breadcrumb-item"><a href="#">Library</a></li>',
1377
+ properties: [{
1378
+ name: "Active",
1379
+ key: "active",
1380
+ htmlAttr: "class",
1381
+ validValues: ["", "active"],
1382
+ inputtype: ToggleInput,
1383
+ data: {
1384
+ on: "active",
1385
+ off: ""
1386
+ }
1387
+ }]
1388
+ });
1389
+ Vvveb.Components.extend("_base", "html/pagination", {
1390
+ classes: ["pagination"],
1391
+ name: "Pagination",
1392
+ image: "icons/pagination.svg",
1393
+ html: '<nav aria-label="Page navigation example">\
1394
+ <ul class="pagination">\
1395
+ <li class="page-item"><a class="page-link" href="#">Previous</a></li>\
1396
+ <li class="page-item"><a class="page-link" href="#">1</a></li>\
1397
+ <li class="page-item"><a class="page-link" href="#">2</a></li>\
1398
+ <li class="page-item"><a class="page-link" href="#">3</a></li>\
1399
+ <li class="page-item"><a class="page-link" href="#">Next</a></li>\
1400
+ </ul>\
1401
+ </nav>',
1402
+
1403
+ properties: [{
1404
+ name: "Size",
1405
+ key: "size",
1406
+ htmlAttr: "class",
1407
+ inputtype: SelectInput,
1408
+ validValues: ["btn-lg", "btn-sm"],
1409
+ data: {
1410
+ options: [{
1411
+ value: "",
1412
+ text: "Default"
1413
+ }, {
1414
+ value: "btn-lg",
1415
+ text: "Large"
1416
+ }, {
1417
+ value: "btn-sm",
1418
+ text: "Small"
1419
+ }]
1420
+ }
1421
+ },{
1422
+ name: "Alignment",
1423
+ key: "alignment",
1424
+ htmlAttr: "class",
1425
+ inputtype: SelectInput,
1426
+ validValues: ["justify-content-center", "justify-content-end"],
1427
+ data: {
1428
+ options: [{
1429
+ value: "",
1430
+ text: "Default"
1431
+ }, {
1432
+ value: "justify-content-center",
1433
+ text: "Center"
1434
+ }, {
1435
+ value: "justify-content-end",
1436
+ text: "Right"
1437
+ }]
1438
+ }
1439
+ }]
1440
+ });
1441
+ Vvveb.Components.extend("_base", "html/pageitem", {
1442
+ classes: ["page-item"],
1443
+ html: '<li class="page-item"><a class="page-link" href="#">1</a></li>',
1444
+ name: "Pagination Item",
1445
+ properties: [{
1446
+ name: "Link To",
1447
+ key: "href",
1448
+ htmlAttr: "href",
1449
+ child:".page-link",
1450
+ inputtype: TextInput
1451
+ }, {
1452
+ name: "Disabled",
1453
+ key: "disabled",
1454
+ htmlAttr: "class",
1455
+ validValues: ["disabled"],
1456
+ inputtype: ToggleInput,
1457
+ data: {
1458
+ on: "disabled",
1459
+ off: ""
1460
+ }
1461
+ }]
1462
+ });
1463
+ Vvveb.Components.extend("_base", "html/progress", {
1464
+ classes: ["progress"],
1465
+ name: "Progress Bar",
1466
+ image: "icons/progressbar.svg",
1467
+ html: '<div class="progress"><div class="progress-bar w-25"></div></div>',
1468
+ properties: [{
1469
+ name: "Background",
1470
+ key: "background",
1471
+ htmlAttr: "class",
1472
+ validValues: bgcolorClasses,
1473
+ inputtype: SelectInput,
1474
+ data: {
1475
+ options: bgcolorSelectOptions
1476
+ }
1477
+ },
1478
+ {
1479
+ name: "Progress",
1480
+ key: "background",
1481
+ child:".progress-bar",
1482
+ htmlAttr: "class",
1483
+ validValues: ["", "w-25", "w-50", "w-75", "w-100"],
1484
+ inputtype: SelectInput,
1485
+ data: {
1486
+ options: [{
1487
+ value: "",
1488
+ text: "None"
1489
+ }, {
1490
+ value: "w-25",
1491
+ text: "25%"
1492
+ }, {
1493
+ value: "w-50",
1494
+ text: "50%"
1495
+ }, {
1496
+ value: "w-75",
1497
+ text: "75%"
1498
+ }, {
1499
+ value: "w-100",
1500
+ text: "100%"
1501
+ }]
1502
+ }
1503
+ },
1504
+ {
1505
+ name: "Progress background",
1506
+ key: "background",
1507
+ child:".progress-bar",
1508
+ htmlAttr: "class",
1509
+ validValues: bgcolorClasses,
1510
+ inputtype: SelectInput,
1511
+ data: {
1512
+ options: bgcolorSelectOptions
1513
+ }
1514
+ }, {
1515
+ name: "Striped",
1516
+ key: "striped",
1517
+ child:".progress-bar",
1518
+ htmlAttr: "class",
1519
+ validValues: ["", "progress-bar-striped"],
1520
+ inputtype: ToggleInput,
1521
+ data: {
1522
+ on: "progress-bar-striped",
1523
+ off: "",
1524
+ }
1525
+ }, {
1526
+ name: "Animated",
1527
+ key: "animated",
1528
+ child:".progress-bar",
1529
+ htmlAttr: "class",
1530
+ validValues: ["", "progress-bar-animated"],
1531
+ inputtype: ToggleInput,
1532
+ data: {
1533
+ on: "progress-bar-animated",
1534
+ off: "",
1535
+ }
1536
+ }]
1537
+ });
1538
+ Vvveb.Components.extend("_base", "html/jumbotron", {
1539
+ classes: ["jumbotron"],
1540
+ image: "icons/jumbotron.svg",
1541
+ name: "Jumbotron",
1542
+ html: '<div class="jumbotron">\
1543
+ <h1 class="display-3">Hello, world!</h1>\
1544
+ <p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>\
1545
+ <hr class="my-4">\
1546
+ <p>It uses utility classes for typography and spacing to space content out within the larger container.</p>\
1547
+ <p class="lead">\
1548
+ <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>\
1549
+ </p>\
1550
+ </div>'
1551
+ });
1552
+ Vvveb.Components.extend("_base", "html/navbar", {
1553
+ classes: ["navbar"],
1554
+ image: "icons/navbar.svg",
1555
+ name: "Nav Bar",
1556
+ html: '<nav class="navbar navbar-expand-lg navbar-light bg-light-subtle">\
1557
+ <a class="navbar-brand" href="#">Navbar</a>\
1558
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">\
1559
+ <span class="navbar-toggler-icon"></span>\
1560
+ </button>\
1561
+ \
1562
+ <div class="collapse navbar-collapse" id="navbarSupportedContent">\
1563
+ <ul class="navbar-nav mr-auto">\
1564
+ <li class="nav-item active">\
1565
+ <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>\
1566
+ </li>\
1567
+ <li class="nav-item">\
1568
+ <a class="nav-link" href="#">Link</a>\
1569
+ </li>\
1570
+ <li class="nav-item">\
1571
+ <a class="nav-link disabled" href="#">Disabled</a>\
1572
+ </li>\
1573
+ </ul>\
1574
+ <form class="form-inline my-2 my-lg-0">\
1575
+ <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">\
1576
+ <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>\
1577
+ </form>\
1578
+ </div>\
1579
+ </nav>',
1580
+
1581
+ properties: [{
1582
+ name: "Color theme",
1583
+ key: "color",
1584
+ htmlAttr: "class",
1585
+ validValues: ["navbar-light", "navbar-dark"],
1586
+ inputtype: SelectInput,
1587
+ data: {
1588
+ options: [{
1589
+ value: "",
1590
+ text: "Default"
1591
+ }, {
1592
+ value: "navbar-light",
1593
+ text: "Light"
1594
+ }, {
1595
+ value: "navbar-dark",
1596
+ text: "Dark"
1597
+ }]
1598
+ }
1599
+ },{
1600
+ name: "Background color",
1601
+ key: "background",
1602
+ htmlAttr: "class",
1603
+ validValues: bgcolorClasses,
1604
+ inputtype: SelectInput,
1605
+ data: {
1606
+ options: bgcolorSelectOptions
1607
+ }
1608
+ }, {
1609
+ name: "Placement",
1610
+ key: "placement",
1611
+ htmlAttr: "class",
1612
+ validValues: ["fixed-top", "fixed-bottom", "sticky-top"],
1613
+ inputtype: SelectInput,
1614
+ data: {
1615
+ options: [{
1616
+ value: "",
1617
+ text: "Default"
1618
+ }, {
1619
+ value: "fixed-top",
1620
+ text: "Fixed Top"
1621
+ }, {
1622
+ value: "fixed-bottom",
1623
+ text: "Fixed Bottom"
1624
+ }, {
1625
+ value: "sticky-top",
1626
+ text: "Sticky top"
1627
+ }]
1628
+ }
1629
+ }]
1630
+ });
1631
+
1632
+ Vvveb.Components.extend("_base", "html/form", {
1633
+ nodes: ["form"],
1634
+ image: "icons/form.svg",
1635
+ name: "Form",
1636
+ html: '<form><div class="mb-3"><label>Text</label><input type="text" class="form-control"></div></div></form>',
1637
+ properties: [{
1638
+ name: "Style",
1639
+ key: "style",
1640
+ htmlAttr: "class",
1641
+ validValues: ["", "form-search", "form-inline", "form-horizontal"],
1642
+ inputtype: SelectInput,
1643
+ data: {
1644
+ options: [{
1645
+ value: "",
1646
+ text: "Default"
1647
+ }, {
1648
+ value: "form-search",
1649
+ text: "Search"
1650
+ }, {
1651
+ value: "form-inline",
1652
+ text: "Inline"
1653
+ }, {
1654
+ value: "form-horizontal",
1655
+ text: "Horizontal"
1656
+ }]
1657
+ }
1658
+ }, {
1659
+ name: "Action",
1660
+ key: "action",
1661
+ htmlAttr: "action",
1662
+ inputtype: TextInput
1663
+ }, {
1664
+ name: "Method",
1665
+ key: "method",
1666
+ htmlAttr: "method",
1667
+ inputtype: TextInput
1668
+ }]
1669
+ });
1670
+
1671
+ Vvveb.Components.extend("_base", "html/textinput", {
1672
+ name: "Input",
1673
+ nodes: ["input"],
1674
+ //attributes: {"type":"text"},
1675
+ image: "icons/text_input.svg",
1676
+ html: '<div class="mb-3"><label>Text</label><input type="text" class="form-control"></div></div>',
1677
+ properties: [{
1678
+ name: "Value",
1679
+ key: "value",
1680
+ htmlAttr: "value",
1681
+ inputtype: TextInput
1682
+ }, {
1683
+ name: "Type",
1684
+ key: "type",
1685
+ htmlAttr: "type",
1686
+ inputtype: SelectInput,
1687
+ data: {
1688
+ options: [{
1689
+ value: "text",
1690
+ text: "text"
1691
+ }, {
1692
+ value: "button",
1693
+ text: "button"
1694
+ }, {
1695
+
1696
+ value: "checkbox",
1697
+ text: "checkbox"
1698
+ }, {
1699
+
1700
+ value: "color",
1701
+ text: "color"
1702
+ }, {
1703
+
1704
+ value: "date",
1705
+ text: "date"
1706
+ }, {
1707
+
1708
+ value: "datetime-local",
1709
+ text: "datetime-local"
1710
+ }, {
1711
+
1712
+ value: "email",
1713
+ text: "email"
1714
+ }, {
1715
+
1716
+ value: "file",
1717
+ text: "file"
1718
+ }, {
1719
+
1720
+ value: "hidden",
1721
+ text: "hidden"
1722
+ }, {
1723
+
1724
+ value: "image",
1725
+ text: "image"
1726
+ }, {
1727
+
1728
+ value: "month",
1729
+ text: "month"
1730
+ }, {
1731
+
1732
+ value: "number",
1733
+ text: "number"
1734
+ }, {
1735
+
1736
+ value: "password",
1737
+ text: "password"
1738
+ }, {
1739
+
1740
+ value: "radio",
1741
+ text: "radio"
1742
+ }, {
1743
+
1744
+ value: "range",
1745
+ text: "range"
1746
+ }, {
1747
+
1748
+ value: "reset",
1749
+ text: "reset"
1750
+ }, {
1751
+
1752
+ value: "search",
1753
+ text: "search"
1754
+ }, {
1755
+
1756
+ value: "submit",
1757
+ text: "submit"
1758
+ }, {
1759
+
1760
+ value: "tel",
1761
+ text: "tel"
1762
+ }, {
1763
+
1764
+ value: "text",
1765
+ text: "text"
1766
+ }, {
1767
+
1768
+ value: "time",
1769
+ text: "time"
1770
+ }, {
1771
+
1772
+ value: "url",
1773
+ text: "url"
1774
+ }, {
1775
+
1776
+ value: "week",
1777
+ text: "week"
1778
+ }]
1779
+ }
1780
+ }, {
1781
+ name: "Placeholder",
1782
+ key: "placeholder",
1783
+ htmlAttr: "placeholder",
1784
+ inputtype: TextInput
1785
+ }, {
1786
+ name: "Disabled",
1787
+ key: "disabled",
1788
+ htmlAttr: "disabled",
1789
+ col:6,
1790
+ inputtype: CheckboxInput,
1791
+ },{
1792
+ name: "Required",
1793
+ key: "required",
1794
+ htmlAttr: "required",
1795
+ col:6,
1796
+ inputtype: CheckboxInput,
1797
+ }]
1798
+ });
1799
+
1800
+ Vvveb.Components.extend("_base", "html/selectinput", {
1801
+ nodes: ["select"],
1802
+ name: "Select Input",
1803
+ image: "icons/select_input.svg",
1804
+ html: '<div class="mb-3"><label>Choose an option </label><select class="form-control"><option value="value1">Text 1</option><option value="value2">Text 2</option><option value="value3">Text 3</option></select></div>',
1805
+
1806
+ beforeInit: function (node)
1807
+ {
1808
+ properties = [];
1809
+ var i = 0;
1810
+
1811
+ $(node).find('option').each(function() {
1812
+
1813
+ data = {"value": this.value, "text": this.text};
1814
+
1815
+ i++;
1816
+ properties.push({
1817
+ name: "Option " + i,
1818
+ key: "option" + i,
1819
+ //index: i - 1,
1820
+ optionNode: this,
1821
+ inputtype: TextValueInput,
1822
+ data: data,
1823
+ onChange: function(node, value, input) {
1824
+
1825
+ option = $(this.optionNode);
1826
+
1827
+ //if remove button is clicked remove option and render row properties
1828
+ if (input.nodeName == 'BUTTON')
1829
+ {
1830
+ option.remove();
1831
+ Vvveb.Components.render("html/selectinput");
1832
+ return node;
1833
+ }
1834
+
1835
+ if (input.name == "value") option.attr("value", value);
1836
+ else if (input.name == "text") option.text(value);
1837
+
1838
+ return node;
1839
+ },
1840
+ });
1841
+ });
1842
+
1843
+ //remove all option properties
1844
+ this.properties = this.properties.filter(function(item) {
1845
+ return item.key.indexOf("option") === -1;
1846
+ });
1847
+
1848
+ //add remaining properties to generated column properties
1849
+ properties.push(this.properties[0]);
1850
+
1851
+ this.properties = properties;
1852
+ return node;
1853
+ },
1854
+
1855
+ properties: [{
1856
+ name: "Option",
1857
+ key: "option1",
1858
+ inputtype: TextValueInput
1859
+ }, {
1860
+ name: "Option",
1861
+ key: "option2",
1862
+ inputtype: TextValueInput
1863
+ }, {
1864
+ name: "",
1865
+ key: "addChild",
1866
+ inputtype: ButtonInput,
1867
+ data: {text:"Add option", icon:"la-plus"},
1868
+ onChange: function(node)
1869
+ {
1870
+ $(node).append('<option value="value">Text</option>');
1871
+
1872
+ //render component properties again to include the new column inputs
1873
+ Vvveb.Components.render("html/selectinput");
1874
+
1875
+ return node;
1876
+ }
1877
+ }]
1878
+ });
1879
+ Vvveb.Components.extend("_base", "html/textareainput", {
1880
+ name: "Text Area",
1881
+ image: "icons/text_area.svg",
1882
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>'
1883
+ });
1884
+ Vvveb.Components.extend("_base", "html/radiobutton", {
1885
+ name: "Radio Button",
1886
+ attributes: {"type":"radio"},
1887
+ image: "icons/radio.svg",
1888
+ html: '<label class="radio"><input type="radio"> Radio</label>',
1889
+ properties: [{
1890
+ name: "Name",
1891
+ key: "name",
1892
+ htmlAttr: "name",
1893
+ inputtype: TextInput
1894
+ }]
1895
+ });
1896
+ Vvveb.Components.extend("_base", "html/checkbox", {
1897
+ name: "Checkbox",
1898
+ attributes: {"type":"checkbox"},
1899
+ image: "icons/checkbox.svg",
1900
+ html: '<label class="checkbox"><input type="checkbox"> Checkbox</label>',
1901
+ properties: [{
1902
+ name: "Name",
1903
+ key: "name",
1904
+ htmlAttr: "name",
1905
+ inputtype: TextInput
1906
+ }]
1907
+ });
1908
+ Vvveb.Components.extend("_base", "html/fileinput", {
1909
+ name: "Input group",
1910
+ attributes: {"type":"file"},
1911
+ image: "icons/text_input.svg",
1912
+ html: '<div class="mb-3">\
1913
+ <input type="file" class="form-control">\
1914
+ </div>'
1915
+ });
1916
+ Vvveb.Components.extend("_base", "html/table", {
1917
+ nodes: ["table"],
1918
+ classes: ["table"],
1919
+ image: "icons/table.svg",
1920
+ name: "Table",
1921
+ html: '<table class="table">\
1922
+ <thead>\
1923
+ <tr>\
1924
+ <th>#</th>\
1925
+ <th>First Name</th>\
1926
+ <th>Last Name</th>\
1927
+ <th>Username</th>\
1928
+ </tr>\
1929
+ </thead>\
1930
+ <tbody>\
1931
+ <tr>\
1932
+ <th scope="row">1</th>\
1933
+ <td>Mark</td>\
1934
+ <td>Otto</td>\
1935
+ <td>@mdo</td>\
1936
+ </tr>\
1937
+ <tr>\
1938
+ <th scope="row">2</th>\
1939
+ <td>Jacob</td>\
1940
+ <td>Thornton</td>\
1941
+ <td>@fat</td>\
1942
+ </tr>\
1943
+ <tr>\
1944
+ <th scope="row">3</th>\
1945
+ <td>Larry</td>\
1946
+ <td>the Bird</td>\
1947
+ <td>@twitter</td>\
1948
+ </tr>\
1949
+ </tbody>\
1950
+ </table>',
1951
+ properties: [
1952
+ {
1953
+ name: "Type",
1954
+ key: "type",
1955
+ htmlAttr: "class",
1956
+ validValues: ["table-primary", "table-secondary", "table-success", "table-danger", "table-warning", "table-info", "table-light", "table-dark", "table-white"],
1957
+ inputtype: SelectInput,
1958
+ data: {
1959
+ options: [{
1960
+ value: "Default",
1961
+ text: ""
1962
+ }, {
1963
+ value: "table-primary",
1964
+ text: "Primary"
1965
+ }, {
1966
+ value: "table-secondary",
1967
+ text: "Secondary"
1968
+ }, {
1969
+ value: "table-success",
1970
+ text: "Success"
1971
+ }, {
1972
+ value: "table-danger",
1973
+ text: "Danger"
1974
+ }, {
1975
+ value: "table-warning",
1976
+ text: "Warning"
1977
+ }, {
1978
+ value: "table-info",
1979
+ text: "Info"
1980
+ }, {
1981
+ value: "table-light",
1982
+ text: "Light"
1983
+ }, {
1984
+ value: "table-dark",
1985
+ text: "Dark"
1986
+ }, {
1987
+ value: "table-white",
1988
+ text: "White"
1989
+ }]
1990
+ }
1991
+ },
1992
+ {
1993
+ name: "Responsive",
1994
+ key: "responsive",
1995
+ htmlAttr: "class",
1996
+ validValues: ["table-responsive"],
1997
+ inputtype: ToggleInput,
1998
+ data: {
1999
+ on: "table-responsive",
2000
+ off: ""
2001
+ }
2002
+ },
2003
+ {
2004
+ name: "Small",
2005
+ key: "small",
2006
+ htmlAttr: "class",
2007
+ validValues: ["table-sm"],
2008
+ inputtype: ToggleInput,
2009
+ data: {
2010
+ on: "table-sm",
2011
+ off: ""
2012
+ }
2013
+ },
2014
+ {
2015
+ name: "Hover",
2016
+ key: "hover",
2017
+ htmlAttr: "class",
2018
+ validValues: ["table-hover"],
2019
+ inputtype: ToggleInput,
2020
+ data: {
2021
+ on: "table-hover",
2022
+ off: ""
2023
+ }
2024
+ },
2025
+ {
2026
+ name: "Bordered",
2027
+ key: "bordered",
2028
+ htmlAttr: "class",
2029
+ validValues: ["table-bordered"],
2030
+ inputtype: ToggleInput,
2031
+ data: {
2032
+ on: "table-bordered",
2033
+ off: ""
2034
+ }
2035
+ },
2036
+ {
2037
+ name: "Striped",
2038
+ key: "striped",
2039
+ htmlAttr: "class",
2040
+ validValues: ["table-striped"],
2041
+ inputtype: ToggleInput,
2042
+ data: {
2043
+ on: "table-striped",
2044
+ off: ""
2045
+ }
2046
+ },
2047
+ {
2048
+ name: "Inverse",
2049
+ key: "inverse",
2050
+ htmlAttr: "class",
2051
+ validValues: ["table-inverse"],
2052
+ inputtype: ToggleInput,
2053
+ data: {
2054
+ on: "table-inverse",
2055
+ off: ""
2056
+ }
2057
+ },
2058
+ {
2059
+ name: "Head options",
2060
+ key: "head",
2061
+ htmlAttr: "class",
2062
+ child:"thead",
2063
+ inputtype: SelectInput,
2064
+ validValues: ["", "thead-inverse", "thead-default"],
2065
+ data: {
2066
+ options: [{
2067
+ value: "",
2068
+ text: "None"
2069
+ }, {
2070
+ value: "thead-default",
2071
+ text: "Default"
2072
+ }, {
2073
+ value: "thead-inverse",
2074
+ text: "Inverse"
2075
+ }]
2076
+ }
2077
+ }]
2078
+ });
2079
+ Vvveb.Components.extend("_base", "html/tablerow", {
2080
+ nodes: ["tr"],
2081
+ name: "Table Row",
2082
+ html: "<tr><td>Cell 1</td><td>Cell 2</td><td>Cell 3</td></tr>",
2083
+ properties: [{
2084
+ name: "Type",
2085
+ key: "type",
2086
+ htmlAttr: "class",
2087
+ inputtype: SelectInput,
2088
+ validValues: ["", "success", "danger", "warning", "active"],
2089
+ data: {
2090
+ options: [{
2091
+ value: "",
2092
+ text: "Default"
2093
+ }, {
2094
+ value: "success",
2095
+ text: "Success"
2096
+ }, {
2097
+ value: "error",
2098
+ text: "Error"
2099
+ }, {
2100
+ value: "warning",
2101
+ text: "Warning"
2102
+ }, {
2103
+ value: "active",
2104
+ text: "Active"
2105
+ }]
2106
+ }
2107
+ }]
2108
+ });
2109
+ Vvveb.Components.extend("_base", "html/tablecell", {
2110
+ nodes: ["td"],
2111
+ name: "Table Cell",
2112
+ html: "<td>Cell</td>"
2113
+ });
2114
+ Vvveb.Components.extend("_base", "html/tableheadercell", {
2115
+ nodes: ["th"],
2116
+ name: "Table Header Cell",
2117
+ html: "<th>Head</th>"
2118
+ });
2119
+ Vvveb.Components.extend("_base", "html/tablehead", {
2120
+ nodes: ["thead"],
2121
+ name: "Table Head",
2122
+ html: "<thead><tr><th>Head 1</th><th>Head 2</th><th>Head 3</th></tr></thead>",
2123
+ properties: [{
2124
+ name: "Type",
2125
+ key: "type",
2126
+ htmlAttr: "class",
2127
+ inputtype: SelectInput,
2128
+ validValues: ["", "success", "danger", "warning", "info"],
2129
+ data: {
2130
+ options: [{
2131
+ value: "",
2132
+ text: "Default"
2133
+ }, {
2134
+ value: "success",
2135
+ text: "Success"
2136
+ }, {
2137
+ value: "anger",
2138
+ text: "Error"
2139
+ }, {
2140
+ value: "warning",
2141
+ text: "Warning"
2142
+ }, {
2143
+ value: "info",
2144
+ text: "Info"
2145
+ }]
2146
+ }
2147
+ }]
2148
+ });
2149
+ Vvveb.Components.extend("_base", "html/tablebody", {
2150
+ nodes: ["tbody"],
2151
+ name: "Table Body",
2152
+ html: "<tbody><tr><td>Cell 1</td><td>Cell 2</td><td>Cell 3</td></tr></tbody>"
2153
+ });
2154
+
2155
+ Vvveb.Components.add("html/gridcolumn", {
2156
+ name: "Grid Column",
2157
+ image: "icons/grid_row.svg",
2158
+ classesRegex: ["col-"],
2159
+ html: '<div class="col-sm-4"><h3>col-sm-4</h3></div>',
2160
+ properties: [{
2161
+ name: "Column",
2162
+ key: "column",
2163
+ inputtype: GridInput,
2164
+ data: {hide_remove:true},
2165
+
2166
+ beforeInit: function(node) {
2167
+ _class = $(node).attr("class");
2168
+
2169
+ var reg = /col-([^-\$ ]*)?-?(\d+)/g;
2170
+ var match;
2171
+
2172
+ while ((match = reg.exec(_class)) != null) {
2173
+ this.data["col" + ((match[1] != undefined)?"_" + match[1]:"")] = match[2];
2174
+ }
2175
+ },
2176
+
2177
+ onChange: function(node, value, input) {
2178
+ var _class = node.attr("class");
2179
+
2180
+ //remove previous breakpoint column size
2181
+ _class = _class.replace(new RegExp(input.name + '-\\d+?'), '');
2182
+ //add new column size
2183
+ if (value) _class += ' ' + input.name + '-' + value;
2184
+ node.attr("class", _class);
2185
+
2186
+ return node;
2187
+ },
2188
+ }]
2189
+ });
2190
+ Vvveb.Components.add("html/gridrow", {
2191
+ name: "Grid Row",
2192
+ image: "icons/grid_row.svg",
2193
+ classes: ["row"],
2194
+ html: '<div class="row"><div class="col-sm-4"><h3>col-sm-4</h3></div><div class="col-sm-4 col-5"><h3>col-sm-4</h3></div><div class="col-sm-4"><h3>col-sm-4</h3></div></div>',
2195
+ children :[{
2196
+ name: "html/gridcolumn",
2197
+ classesRegex: ["col-"],
2198
+ }],
2199
+ beforeInit: function (node)
2200
+ {
2201
+ properties = [];
2202
+ var i = 0;
2203
+ var j = 0;
2204
+
2205
+ $(node).find('[class*="col-"]').each(function() {
2206
+ _class = $(this).attr("class");
2207
+
2208
+ var reg = /col-([^-\$ ]*)?-?(\d+)/g;
2209
+ var match;
2210
+ var data = {};
2211
+
2212
+ while ((match = reg.exec(_class)) != null) {
2213
+ data["col" + ((match[1] != undefined)?"_" + match[1]:"")] = match[2];
2214
+ }
2215
+
2216
+ i++;
2217
+ properties.push({
2218
+ name: "Column " + i,
2219
+ key: "column" + i,
2220
+ //index: i - 1,
2221
+ columnNode: this,
2222
+ col:12,
2223
+ inline:true,
2224
+ inputtype: GridInput,
2225
+ data: data,
2226
+ onChange: function(node, value, input) {
2227
+
2228
+ //column = $('[class*="col-"]:eq(' + this.index + ')', node);
2229
+ var column = $(this.columnNode);
2230
+
2231
+ //if remove button is clicked remove column and render row properties
2232
+ if (input.nodeName == 'BUTTON')
2233
+ {
2234
+ column.remove();
2235
+ Vvveb.Components.render("html/gridrow");
2236
+ return node;
2237
+ }
2238
+
2239
+ //if select input then change column class
2240
+ _class = column.attr("class");
2241
+
2242
+ //remove previous breakpoint column size
2243
+ _class = _class.replace(new RegExp(input.name + '-\\d+?'), '');
2244
+ //add new column size
2245
+ if (value) _class += ' ' + input.name + '-' + value;
2246
+ column.attr("class", _class);
2247
+
2248
+ //console.log(this, node, value, input, input.name);
2249
+
2250
+ return node;
2251
+ },
2252
+ });
2253
+ });
2254
+
2255
+ //remove all column properties
2256
+ this.properties = this.properties.filter(function(item) {
2257
+ return item.key.indexOf("column") === -1;
2258
+ });
2259
+
2260
+ //add remaining properties to generated column properties
2261
+ properties.push(this.properties[0]);
2262
+
2263
+ this.properties = properties;
2264
+ return node;
2265
+ },
2266
+
2267
+ properties: [{
2268
+ name: "Column",
2269
+ key: "column1",
2270
+ inputtype: GridInput
2271
+ }, {
2272
+ name: "Column",
2273
+ key: "column1",
2274
+ inline:true,
2275
+ col:12,
2276
+ inputtype: GridInput
2277
+ }, {
2278
+ name: "",
2279
+ key: "addChild",
2280
+ inputtype: ButtonInput,
2281
+ data: {text:"Add column", icon:"la la-plus"},
2282
+ onChange: function(node)
2283
+ {
2284
+ $(node).append('<div class="col-3">Col-3</div>');
2285
+
2286
+ //render component properties again to include the new column inputs
2287
+ Vvveb.Components.render("html/gridrow");
2288
+
2289
+ return node;
2290
+ }
2291
+ }]
2292
+ });
2293
+
2294
+
2295
+ Vvveb.Components.extend("_base", "html/paragraph", {
2296
+ nodes: ["p"],
2297
+ name: "Paragraph",
2298
+ image: "icons/paragraph.svg",
2299
+ html: '<p>Lorem ipsum</p>',
2300
+ properties: [{
2301
+ name: "Text align",
2302
+ key: "text-align",
2303
+ htmlAttr: "class",
2304
+ inputtype: SelectInput,
2305
+ validValues: ["", "text-left", "text-center", "text-right"],
2306
+ inputtype: RadioButtonInput,
2307
+ data: {
2308
+ extraclass:"btn-group-sm btn-group-fullwidth",
2309
+ options: [{
2310
+ value: "",
2311
+ icon:"la la-times",
2312
+ //text: "None",
2313
+ title: "None",
2314
+ checked:true,
2315
+ }, {
2316
+ value: "text-left",
2317
+ //text: "Left",
2318
+ title: "text-left",
2319
+ icon:"la la-align-left",
2320
+ checked:false,
2321
+ }, {
2322
+ value: "text-center",
2323
+ //text: "Center",
2324
+ title: "Center",
2325
+ icon:"la la-align-center",
2326
+ checked:false,
2327
+ }, {
2328
+ value: "text-right",
2329
+ //text: "Right",
2330
+ title: "Right",
2331
+ icon:"la la-align-right",
2332
+ checked:false,
2333
+ }],
2334
+ },
2335
+ }]
2336
+ });
2337
+
2338
+ Vvveb.Components.extend("_base", "html/video", {
2339
+ nodes: ["video"],
2340
+ name: "Video",
2341
+ html: '<video width="320" height="240" playsinline loop autoplay><source src="../../media/sample.webm"><video>',
2342
+ dragHtml: '<img width="320" height="240" src="' + Vvveb.baseUrl + 'icons/video.svg">',
2343
+ image: "icons/video.svg",
2344
+ properties: [{
2345
+ name: "Src",
2346
+ child: "source",
2347
+ key: "src",
2348
+ htmlAttr: "src",
2349
+ inputtype: LinkInput
2350
+ },{
2351
+ name: "Width",
2352
+ key: "width",
2353
+ htmlAttr: "width",
2354
+ inputtype: TextInput
2355
+ }, {
2356
+ name: "Height",
2357
+ key: "height",
2358
+ htmlAttr: "height",
2359
+ inputtype: TextInput
2360
+ },{
2361
+ name: "Muted",
2362
+ key: "muted",
2363
+ htmlAttr: "muted",
2364
+ inputtype: CheckboxInput
2365
+ },{
2366
+ name: "Loop",
2367
+ key: "loop",
2368
+ htmlAttr: "loop",
2369
+ inputtype: CheckboxInput
2370
+ },{
2371
+ name: "Autoplay",
2372
+ key: "autoplay",
2373
+ htmlAttr: "autoplay",
2374
+ inputtype: CheckboxInput
2375
+ },{
2376
+ name: "Plays inline",
2377
+ key: "playsinline",
2378
+ htmlAttr: "playsinline",
2379
+ inputtype: CheckboxInput
2380
+ },{
2381
+ name: "Controls",
2382
+ key: "controls",
2383
+ htmlAttr: "controls",
2384
+ inputtype: CheckboxInput
2385
+ }]
2386
+ });
2387
+
2388
+
2389
+ Vvveb.Components.extend("_base", "html/button", {
2390
+ nodes: ["button"],
2391
+ name: "Html Button",
2392
+ image: "icons/button.svg",
2393
+ html: '<button>Button</button>',
2394
+ properties: [{
2395
+ name: "Text",
2396
+ key: "text",
2397
+ htmlAttr: "innerHTML",
2398
+ inputtype: TextInput
2399
+ }, {
2400
+ name: "Name",
2401
+ key: "name",
2402
+ htmlAttr: "name",
2403
+ inputtype: TextInput
2404
+ }, {
2405
+ name: "Type",
2406
+ key: "type",
2407
+ htmlAttr: "type",
2408
+ inputtype: SelectInput,
2409
+ data: {
2410
+ options: [{
2411
+ value: "button",
2412
+ text: "button"
2413
+ }, {
2414
+ value: "reset",
2415
+ text: "reset"
2416
+ }, {
2417
+ value: "submit",
2418
+ text: "submit"
2419
+ }],
2420
+ }
2421
+ },{
2422
+ name: "Autofocus",
2423
+ key: "autofocus",
2424
+ htmlAttr: "autofocus",
2425
+ inputtype: CheckboxInput,
2426
+ inline:true,
2427
+ col:6,
2428
+ },{
2429
+ name: "Disabled",
2430
+ key: "disabled",
2431
+ htmlAttr: "disabled",
2432
+ inputtype: CheckboxInput,
2433
+ inline:true,
2434
+ col:6,
2435
+ }]
2436
+ });
2437
+
2438
+ Vvveb.Components.extend("_base", "_base", {
2439
+ properties: [
2440
+ {
2441
+ name: "Font family",
2442
+ key: "font-family",
2443
+ htmlAttr: "style",
2444
+ sort: base_sort++,
2445
+ col:6,
2446
+ inline:true,
2447
+ inputtype: SelectInput,
2448
+ data: {
2449
+ options: [{
2450
+ value: "",
2451
+ text: "extended"
2452
+ }, {
2453
+ value: "Ggoogle ",
2454
+ text: "google"
2455
+ }]
2456
+ }
2457
+ }]
2458
+ });
libs/builder/components-bootstrap5.js ADDED
@@ -0,0 +1,1029 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright 2017 Ziadin Givan
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ https://github.com/givanz/Vvvebjs
17
+ */
18
+
19
+ Vvveb.ComponentsGroup['Bootstrap 5'] =
20
+ ["html/container", "html/gridrow", "html/btn", "html/btn-link", "html/buttongroup", "html/buttontoolbar", "html/alert", "html/card", "html/listgroup", "html/badge", "html/progress", "html/navbar", "html/breadcrumbs", "html/pagination"];
21
+
22
+
23
+ Vvveb.Components.extend("_base", "html/container", {
24
+ classes: ["container", "container-fluid"],
25
+ image: "icons/container.svg",
26
+ html: '<div class="container" style="min-height:150px;"><div class="m-5">Container</div></div>',
27
+ name: "Container",
28
+ properties: [
29
+ {
30
+ name: "Type",
31
+ key: "type",
32
+ htmlAttr: "class",
33
+ inputtype: SelectInput,
34
+ validValues: ["container", "container-fluid"],
35
+ data: {
36
+ options: [{
37
+ value: "container",
38
+ text: "Default"
39
+ },{
40
+ value: "container-fluid",
41
+ text: "Fluid"
42
+ }]
43
+ }
44
+ },{
45
+ name: "Background",
46
+ key: "background",
47
+ htmlAttr: "class",
48
+ validValues: bgcolorClasses,
49
+ inputtype: SelectInput,
50
+ data: {
51
+ options: bgcolorSelectOptions
52
+ }
53
+ },{
54
+ name: "Background Color",
55
+ key: "background-color",
56
+ htmlAttr: "style",
57
+ inputtype: ColorInput,
58
+ },{
59
+ name: "Text Color",
60
+ key: "color",
61
+ htmlAttr: "style",
62
+ inputtype: ColorInput,
63
+ }],
64
+ });
65
+
66
+ Vvveb.Components.extend("html/link", "html/btn", {
67
+ classes: ["btn"],
68
+ nodes: null,
69
+ name: "Button",
70
+ image: "icons/button.svg",
71
+ html: '<a class="btn btn-primary">Primary</a>',
72
+ properties: [{
73
+ name: "Background",
74
+ key: "background",
75
+ htmlAttr: "class",
76
+ inputtype: SelectInput,
77
+ validValues: ["btn-default", "btn-primary", "btn-info", "btn-success", "btn-warning", "btn-info", "btn-light", "btn-dark", "btn-outline-primary", "btn-outline-info", "btn-outline-success", "btn-outline-warning", "btn-outline-info", "btn-outline-light", "btn-outline-dark", "btn-link"],
78
+ data: {
79
+ options: [{
80
+ value: "btn-default",
81
+ text: "Default"
82
+ },{
83
+ value: "btn-primary",
84
+ text: "Primary"
85
+ },{
86
+ value: "btn btn-info",
87
+ text: "Info"
88
+ },{
89
+ value: "btn-success",
90
+ text: "Success"
91
+ },{
92
+ value: "btn-warning",
93
+ text: "Warning"
94
+ },{
95
+ value: "btn-info",
96
+ text: "Info"
97
+ },{
98
+ value: "btn-light",
99
+ text: "Light"
100
+ },{
101
+ value: "btn-dark",
102
+ text: "Dark"
103
+ },{
104
+ value: "btn-outline-primary",
105
+ text: "Primary outline"
106
+ },{
107
+ value: "btn btn-outline-info",
108
+ text: "Info outline"
109
+ },{
110
+ value: "btn-outline-success",
111
+ text: "Success outline"
112
+ },{
113
+ value: "btn-outline-warning",
114
+ text: "Warning outline"
115
+ },{
116
+ value: "btn-outline-info",
117
+ text: "Info outline"
118
+ },{
119
+ value: "btn-outline-light",
120
+ text: "Light outline"
121
+ },{
122
+ value: "btn-outline-dark",
123
+ text: "Dark outline"
124
+ },{
125
+ value: "btn-link",
126
+ text: "Link"
127
+ }]
128
+ }
129
+ },{
130
+ name: "Size",
131
+ key: "size",
132
+ htmlAttr: "class",
133
+ inputtype: SelectInput,
134
+ validValues: ["btn-lg", "btn-sm"],
135
+ data: {
136
+ options: [{
137
+ value: "",
138
+ text: "Default"
139
+ },{
140
+ value: "btn-lg",
141
+ text: "Large"
142
+ },{
143
+ value: "btn-sm",
144
+ text: "Small"
145
+ }]
146
+ }
147
+ },{
148
+ name: "Autofocus",
149
+ key: "autofocus",
150
+ htmlAttr: "autofocus",
151
+ inputtype: CheckboxInput,
152
+ inline:true,
153
+ col:6,
154
+ },{
155
+ name: "Disabled",
156
+ key: "disabled",
157
+ htmlAttr: "class",
158
+ inline:true,
159
+ col:6,
160
+ inputtype: ToggleInput,
161
+ validValues: ["disabled"],
162
+ data: {
163
+ on: "disabled",
164
+ off: null
165
+ }
166
+ },{
167
+ key: "link_options",
168
+ inputtype: SectionInput,
169
+ name:false,
170
+ data: {header:"Link"},
171
+ }]
172
+ });
173
+
174
+ Vvveb.Components.extend("_base", "html/buttongroup", {
175
+ classes: ["btn-group"],
176
+ name: "Button Group",
177
+ image: "icons/button_group.svg",
178
+ html: '<div class="btn-group" role="group" aria-label="Basic example"><button type="button" class="btn btn-secondary">Left</button><button type="button" class="btn btn-secondary">Middle</button> <button type="button" class="btn btn-secondary">Right</button></div>',
179
+ properties: [{
180
+ name: "Size",
181
+ key: "size",
182
+ htmlAttr: "class",
183
+ inputtype: SelectInput,
184
+ validValues: ["btn-group-lg", "btn-group-sm"],
185
+ data: {
186
+ options: [{
187
+ value: "",
188
+ text: "Default"
189
+ },{
190
+ value: "btn-group-lg",
191
+ text: "Large"
192
+ },{
193
+ value: "btn-group-sm",
194
+ text: "Small"
195
+ }]
196
+ }
197
+ },{
198
+ name: "Alignment",
199
+ key: "alignment",
200
+ htmlAttr: "class",
201
+ inputtype: SelectInput,
202
+ validValues: ["btn-group", "btn-group-vertical"],
203
+ data: {
204
+ options: [{
205
+ value: "",
206
+ text: "Default"
207
+ },{
208
+ value: "btn-group",
209
+ text: "Horizontal"
210
+ },{
211
+ value: "btn-group-vertical",
212
+ text: "Vertical"
213
+ }]
214
+ }
215
+ }]
216
+ });
217
+ Vvveb.Components.extend("_base", "html/buttontoolbar", {
218
+ classes: ["btn-toolbar"],
219
+ name: "Button Toolbar",
220
+ image: "icons/button_toolbar.svg",
221
+ html: '<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">\
222
+ <div class="btn-group me-2" role="group" aria-label="First group">\
223
+ <button type="button" class="btn btn-secondary">1</button>\
224
+ <button type="button" class="btn btn-secondary">2</button>\
225
+ <button type="button" class="btn btn-secondary">3</button>\
226
+ <button type="button" class="btn btn-secondary">4</button>\
227
+ </div>\
228
+ <div class="btn-group me-2" role="group" aria-label="Second group">\
229
+ <button type="button" class="btn btn-secondary">5</button>\
230
+ <button type="button" class="btn btn-secondary">6</button>\
231
+ <button type="button" class="btn btn-secondary">7</button>\
232
+ </div>\
233
+ <div class="btn-group" role="group" aria-label="Third group">\
234
+ <button type="button" class="btn btn-secondary">8</button>\
235
+ </div>\
236
+ </div>'
237
+ });
238
+ Vvveb.Components.extend("_base","html/alert", {
239
+ classes: ["alert"],
240
+ name: "Alert",
241
+ image: "icons/alert.svg",
242
+ html: '<div class="alert alert-warning alert-dismissible fade show" role="alert">\
243
+ <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">\
244
+ <!--span aria-hidden="true">&times;</span-->\
245
+ </button>\
246
+ <strong>Holy guacamole!</strong> You should check in on some of those fields below.\
247
+ </div>',
248
+ properties: [{
249
+ name: "Type",
250
+ key: "type",
251
+ htmlAttr: "class",
252
+ validValues: ["alert-primary", "alert-secondary", "alert-success", "alert-danger", "alert-warning", "alert-info", "alert-light", "alert-dark"],
253
+ inputtype: SelectInput,
254
+ data: {
255
+ options: [{
256
+ value: "alert-primary",
257
+ text: "Default"
258
+ },{
259
+ value: "alert-secondary",
260
+ text: "Secondary"
261
+ },{
262
+ value: "alert-success",
263
+ text: "Success"
264
+ },{
265
+ value: "alert-danger",
266
+ text: "Danger"
267
+ },{
268
+ value: "alert-warning",
269
+ text: "Warning"
270
+ },{
271
+ value: "alert-info",
272
+ text: "Info"
273
+ },{
274
+ value: "alert-light",
275
+ text: "Light"
276
+ },{
277
+ value: "alert-dark",
278
+ text: "Dark"
279
+ }]
280
+ }
281
+ }]
282
+ });
283
+ Vvveb.Components.extend("_base", "html/badge", {
284
+ classes: ["badge"],
285
+ image: "icons/badge.svg",
286
+ name: "Badge",
287
+ html: '<span class="badge bg-primary">Primary badge</span>',
288
+ properties: [{
289
+ name: "Color",
290
+ key: "color",
291
+ htmlAttr: "class",
292
+ validValues:["bg-primary", "bg-secondary", "bg-success", "bg-danger", "bg-warning", "bg-info", "bg-body-secondary", "bg-dark"],
293
+ inputtype: SelectInput,
294
+ data: {
295
+ options: [{
296
+ value: "",
297
+ text: "Default"
298
+ },{
299
+ value: "bg-primary",
300
+ text: "Primary"
301
+ },{
302
+ value: "bg-secondary",
303
+ text: "Secondary"
304
+ },{
305
+ value: "bg-success",
306
+ text: "Success"
307
+ },{
308
+ value: "bg-warning",
309
+ text: "Warning"
310
+ },{
311
+ value: "bg-danger",
312
+ text: "Danger"
313
+ },{
314
+ value: "bg-info",
315
+ text: "Info"
316
+ },{
317
+ value: "bg-body-secondary",
318
+ text: "Light"
319
+ },{
320
+ value: "bg-dark",
321
+ text: "Dark"
322
+ }]
323
+ }
324
+ }]
325
+ });
326
+ Vvveb.Components.extend("_base", "html/card", {
327
+ classes: ["card"],
328
+ image: "icons/panel.svg",
329
+ name: "Card",
330
+ html: '<div class="card">\
331
+ <img class="card-img-top bg-body-secondary" src="' + Vvveb.baseUrl + 'icons/image.svg" alt="Card image cap">\
332
+ <div class="card-body">\
333
+ <h4 class="card-title">Card title</h4>\
334
+ <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card\'s content.</p>\
335
+ <a href="#" class="btn btn-primary">Go somewhere</a>\
336
+ </div>\
337
+ </div>'
338
+ });
339
+
340
+ Vvveb.Components.extend("_base", "html/listgroup", {
341
+ name: "List Group",
342
+ image: "icons/list_group.svg",
343
+ classes: ["list-group"],
344
+ html: '<ul class="list-group">\n <li class="list-group-item">\n <span class="badge bg-success">14</span>\n Cras justo odio\n </li>\n <li class="list-group-item">\n <span class="badge bg-primary">2</span>\n Dapibus ac facilisis in\n </li>\n <li class="list-group-item">\n <span class="badge bg-danger">1</span>\n Morbi leo risus\n </li>\n</ul>',
345
+ properties: [{
346
+ name: "Flush",
347
+ key: "flush",
348
+ htmlAttr: "class",
349
+ validValues: ["", "list-group-flush"],
350
+ inputtype: ToggleInput,
351
+ data: {
352
+ on: "list-group-flush",
353
+ off: ""
354
+ }
355
+ },{
356
+ name: "Numbered",
357
+ key: "numbered",
358
+ htmlAttr: "class",
359
+ validValues: ["", "list-group-numbered"],
360
+ inputtype: ToggleInput,
361
+ data: {
362
+ on: "list-group-numbered",
363
+ off: ""
364
+ }
365
+ },{
366
+ name: "Horizontal",
367
+ key: "horizontal",
368
+ htmlAttr: "class",
369
+ validValues: ["", "list-group-horizontal"],
370
+ inputtype: ToggleInput,
371
+ data: {
372
+ on: "list-group-horizontal",
373
+ off: ""
374
+ }
375
+ }]
376
+ });
377
+
378
+ Vvveb.Components.extend("_base", "html/listitem", {
379
+ name: "List Item",
380
+ classes: ["list-group-item"],
381
+ html: '<li class="list-group-item"><span class="badge bg-primary">14</span> Cras justo odio</li>',
382
+ properties: [{
383
+ name: "Background",
384
+ key: "background",
385
+ htmlAttr: "class",
386
+ validValues:["list-group-item-primary", "list-group-item-secondary", "list-group-item-success", "list-group-item-danger", "list-group-item-warning", "list-group-item-info", "list-group-item-light", "list-group-item-dark"],
387
+ inputtype: SelectInput,
388
+ data: {
389
+ options: [{
390
+ value: "",
391
+ text: "Default"
392
+ },{
393
+ value: "list-group-item-primary",
394
+ text: "Primary"
395
+ },{
396
+ value: "list-group-item-secondary",
397
+ text: "Secondary"
398
+ },{
399
+ value: "list-group-item-success",
400
+ text: "Success"
401
+ },{
402
+ value: "list-group-item-warning",
403
+ text: "Warning"
404
+ },{
405
+ value: "list-group-item-danger",
406
+ text: "Danger"
407
+ },{
408
+ value: "list-group-item-info",
409
+ text: "Info"
410
+ },{
411
+ value: "list-group-item-light",
412
+ text: "Light"
413
+ },{
414
+ value: "list-group-item-dark",
415
+ text: "Dark"
416
+ }]
417
+ }
418
+ }, {
419
+ name: "Active",
420
+ key: "active",
421
+ htmlAttr: "class",
422
+ validValues: ["", "active"],
423
+ inputtype: ToggleInput,
424
+ inline:true,
425
+ col:6,
426
+ data: {
427
+ on: "active",
428
+ off: ""
429
+ }
430
+ },{
431
+ name: "Disabled",
432
+ key: "disabled",
433
+ htmlAttr: "class",
434
+ validValues: ["", "disabled"],
435
+ inputtype: ToggleInput,
436
+ inline:true,
437
+ col:6,
438
+ data: {
439
+ on: "disabled",
440
+ off: ""
441
+ }
442
+ }]
443
+ });
444
+
445
+ Vvveb.Components.extend("_base", "html/breadcrumbs", {
446
+ classes: ["breadcrumb"],
447
+ name: "Breadcrumbs",
448
+ image: "icons/breadcrumbs.svg",
449
+ html: `<ol class="breadcrumb">
450
+ <li class="breadcrumb-item"><a href="#">Home</a></li>
451
+ <li class="breadcrumb-item"><a href="#">Library</a></li>
452
+ s<li class="breadcrumb-item active" aria-current="page"><a href="#">Book</a></li>
453
+ </ol>`,
454
+ properties: [{
455
+ name: "Divider",
456
+ key: "--bs-breadcrumb-divider",
457
+ htmlAttr: "style",
458
+ inputtype: TextInput
459
+ }]
460
+ });
461
+
462
+ Vvveb.Components.extend("_base", "html/breadcrumbitem", {
463
+ classes: ["breadcrumb-item"],
464
+ name: "Breadcrumb Item",
465
+ html: '<li class="breadcrumb-item"><a href="#">Library</a></li>',
466
+ properties: [{
467
+ name: "Active",
468
+ key: "active",
469
+ htmlAttr: "class",
470
+ validValues: ["", "active"],
471
+ inputtype: ToggleInput,
472
+ data: {
473
+ on: "active",
474
+ off: ""
475
+ }
476
+ }]
477
+ });
478
+ Vvveb.Components.extend("_base", "html/pagination", {
479
+ classes: ["pagination"],
480
+ name: "Pagination",
481
+ image: "icons/pagination.svg",
482
+ html: '<nav aria-label="Page navigation example">\
483
+ <ul class="pagination">\
484
+ <li class="page-item"><a class="page-link" href="#">Previous</a></li>\
485
+ <li class="page-item"><a class="page-link" href="#">1</a></li>\
486
+ <li class="page-item"><a class="page-link" href="#">2</a></li>\
487
+ <li class="page-item"><a class="page-link" href="#">3</a></li>\
488
+ <li class="page-item"><a class="page-link" href="#">Next</a></li>\
489
+ </ul>\
490
+ </nav>',
491
+
492
+ properties: [{
493
+ name: "Size",
494
+ key: "size",
495
+ htmlAttr: "class",
496
+ inputtype: SelectInput,
497
+ validValues: ["pagination-lg", "pagination-sm"],
498
+ data: {
499
+ options: [{
500
+ value: "",
501
+ text: "Default"
502
+ },{
503
+ value: "pagination-lg",
504
+ text: "Large"
505
+ },{
506
+ value: "pagination-sm",
507
+ text: "Small"
508
+ }]
509
+ }
510
+ },{
511
+ name: "Alignment",
512
+ key: "alignment",
513
+ htmlAttr: "class",
514
+ inputtype: SelectInput,
515
+ validValues: ["justify-content-center", "justify-content-end"],
516
+ data: {
517
+ options: [{
518
+ value: "",
519
+ text: "Default"
520
+ },{
521
+ value: "justify-content-center",
522
+ text: "Center"
523
+ },{
524
+ value: "justify-content-end",
525
+ text: "Right"
526
+ }]
527
+ }
528
+ }]
529
+ });
530
+ Vvveb.Components.extend("_base", "html/pageitem", {
531
+ classes: ["page-item"],
532
+ html: '<li class="page-item"><a class="page-link" href="#">1</a></li>',
533
+ name: "Pagination Item",
534
+ properties: [{
535
+ name: "Link To",
536
+ key: "href",
537
+ htmlAttr: "href",
538
+ child:".page-link",
539
+ inputtype: LinkInput
540
+ },{
541
+ name: "Active",
542
+ key: "active",
543
+ htmlAttr: "class",
544
+ validValues: ["active"],
545
+ inputtype: ToggleInput,
546
+ data: {
547
+ on: "active",
548
+ off: ""
549
+ }
550
+ },{
551
+ name: "Disabled",
552
+ key: "disabled",
553
+ htmlAttr: "class",
554
+ validValues: ["disabled"],
555
+ inputtype: ToggleInput,
556
+ data: {
557
+ on: "disabled",
558
+ off: ""
559
+ }
560
+ }]
561
+ });
562
+ Vvveb.Components.extend("_base", "html/progress", {
563
+ classes: ["progress"],
564
+ name: "Progress Bar",
565
+ image: "icons/progressbar.svg",
566
+ html: '<div class="progress"><div class="progress-bar w-25"></div></div>',
567
+ properties: [{
568
+ name: "Background",
569
+ key: "background",
570
+ htmlAttr: "class",
571
+ validValues: bgcolorClasses,
572
+ inputtype: SelectInput,
573
+ data: {
574
+ options: bgcolorSelectOptions
575
+ }
576
+ },
577
+ {
578
+ name: "Progress",
579
+ key: "background",
580
+ child:".progress-bar",
581
+ htmlAttr: "class",
582
+ validValues: ["", "w-25", "w-50", "w-75", "w-100"],
583
+ inputtype: SelectInput,
584
+ data: {
585
+ options: [{
586
+ value: "",
587
+ text: "None"
588
+ },{
589
+ value: "w-25",
590
+ text: "25%"
591
+ },{
592
+ value: "w-50",
593
+ text: "50%"
594
+ },{
595
+ value: "w-75",
596
+ text: "75%"
597
+ },{
598
+ value: "w-100",
599
+ text: "100%"
600
+ }]
601
+ }
602
+ },
603
+ {
604
+ name: "Progress background",
605
+ key: "background",
606
+ child:".progress-bar",
607
+ htmlAttr: "class",
608
+ validValues: bgcolorClasses,
609
+ inputtype: SelectInput,
610
+ data: {
611
+ options: bgcolorSelectOptions
612
+ }
613
+ },{
614
+ name: "Striped",
615
+ key: "striped",
616
+ child:".progress-bar",
617
+ htmlAttr: "class",
618
+ validValues: ["", "progress-bar-striped"],
619
+ inputtype: ToggleInput,
620
+ data: {
621
+ on: "progress-bar-striped",
622
+ off: "",
623
+ }
624
+ },{
625
+ name: "Animated",
626
+ key: "animated",
627
+ child:".progress-bar",
628
+ htmlAttr: "class",
629
+ validValues: ["", "progress-bar-animated"],
630
+ inputtype: ToggleInput,
631
+ data: {
632
+ on: "progress-bar-animated",
633
+ off: "",
634
+ }
635
+ }]
636
+ });
637
+ Vvveb.Components.extend("_base", "html/navbar", {
638
+ classes: ["navbar"],
639
+ image: "icons/navbar.svg",
640
+ name: "Nav Bar",
641
+ html: `<nav class="navbar navbar-expand-lg bg-body-secondary bg-body-tertiary">
642
+ <div class="container-fluid">
643
+ <a class="navbar-brand" href="#">Navbar</a>
644
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
645
+ <span class="navbar-toggler-icon"></span>
646
+ </button>
647
+ <div class="collapse navbar-collapse" id="navbarTogglerDemo02">
648
+ <ul class="navbar-nav me-auto mb-2 mb-lg-0">
649
+ <li class="nav-item">
650
+ <a class="nav-link active" aria-current="page" href="#">Home</a>
651
+ </li>
652
+ <li class="nav-item">
653
+ <a class="nav-link" href="#">Link</a>
654
+ </li>
655
+ <li class="nav-item">
656
+ <a class="nav-link disabled">Disabled</a>
657
+ </li>
658
+ </ul>
659
+ <form class="d-flex" role="search">
660
+ <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
661
+ <button class="btn btn-outline-success" type="submit">Search</button>
662
+ </form>
663
+ </div>
664
+ </div>
665
+ </nav>`,
666
+
667
+ properties: [{
668
+ name: "Color theme",
669
+ key: "color",
670
+ htmlAttr: "class",
671
+ validValues: ["navbar-light", "navbar-dark"],
672
+ inputtype: SelectInput,
673
+ data: {
674
+ options: [{
675
+ value: "",
676
+ text: "Default"
677
+ },{
678
+ value: "navbar-light",
679
+ text: "Light"
680
+ },{
681
+ value: "navbar-dark",
682
+ text: "Dark"
683
+ }]
684
+ }
685
+ },{
686
+ name: "Background color",
687
+ key: "background",
688
+ htmlAttr: "class",
689
+ validValues: bgcolorClasses,
690
+ inputtype: SelectInput,
691
+ data: {
692
+ options: bgcolorSelectOptions
693
+ }
694
+ },{
695
+ name: "Placement",
696
+ key: "placement",
697
+ htmlAttr: "class",
698
+ validValues: ["fixed-top", "fixed-bottom", "sticky-top"],
699
+ inputtype: SelectInput,
700
+ data: {
701
+ options: [{
702
+ value: "",
703
+ text: "Default"
704
+ },{
705
+ value: "fixed-top",
706
+ text: "Fixed Top"
707
+ },{
708
+ value: "fixed-bottom",
709
+ text: "Fixed Bottom"
710
+ },{
711
+ value: "sticky-top",
712
+ text: "Sticky top"
713
+ }]
714
+ }
715
+ }]
716
+ });
717
+
718
+ Vvveb.Components.extend("_base", "html/tablebody", {
719
+ nodes: ["tbody"],
720
+ name: "Table Body",
721
+ html: "<tbody><tr><td>Cell 1</td><td>Cell 2</td><td>Cell 3</td></tr></tbody>"
722
+ });
723
+
724
+ Vvveb.Components.extend("_base", "html/gridcolumn", {
725
+ name: "Grid Column",
726
+ image: "icons/grid_column.svg",
727
+ classesRegex: ["col-"],
728
+ classes: ["col"],
729
+ html: '<div class="col-sm-4"><h3>col-sm-4</h3></div>',
730
+ properties: [{
731
+ name: "Column",
732
+ key: "column",
733
+ inline:false,
734
+ inputtype: GridInput,
735
+ data: {hide_remove:true},
736
+
737
+ beforeInit: function(node) {
738
+ _class = node.getAttribute("class");
739
+
740
+ let reg = /col(-[^-\$ ]*)?-?(\d+)?/g;
741
+ let match;
742
+
743
+ while ((match = reg.exec(_class)) != null) {
744
+ let key = "col" + ((match[1] != undefined) ? "_" + match[1].replace('-','') : "");
745
+ this.data[key] = match[2] ?? '';
746
+ }
747
+ },
748
+
749
+ onChange: function(node, value, input) {
750
+ let _class = node.getAttribute("class");
751
+
752
+ //remove previous breakpoint column size
753
+ _class = _class.replace(new RegExp(input.name + '-\\d+?'), '');
754
+ //add new column size
755
+ if (value) _class += ' ' + input.name + '-' + value;
756
+ node.setAttribute("class", _class);
757
+
758
+ return node;
759
+ },
760
+ }]
761
+ });
762
+
763
+ Vvveb.Components.extend("_base", "html/gridrow", {
764
+ name: "Grid Row",
765
+ image: "icons/grid_row.svg",
766
+ classes: ["row"],
767
+ html: '<div class="row"><div class="col-sm-4"><h3>col-sm-4</h3></div><div class="col-sm-4 col-5"><h3>col-sm-4</h3></div><div class="col-sm-4"><h3>col-sm-4</h3></div></div>',
768
+ children :[{
769
+ name: "html/gridcolumn",
770
+ classesRegex: ["col-"],
771
+ }],
772
+ beforeInit: function (node) {
773
+ properties = [];
774
+ let i = 0;
775
+ let j = 0;
776
+
777
+ node.querySelectorAll('[class*="col-"],.col').forEach(el => {
778
+ _class = el.getAttribute("class");
779
+
780
+ let reg = /col(-[^-\$ ]*)?-?(\d+)?/g;
781
+ let match;
782
+ let data = {};
783
+
784
+ while ((match = reg.exec(_class)) != null) {
785
+ let key = "col" + ((match[1] != undefined) ? "_" + match[1].replace('-','') : "");
786
+ data[key] = match[2] ?? '';
787
+ }
788
+
789
+ i++;
790
+ properties.push({
791
+ name: "Column " + i,
792
+ key: "column" + i,
793
+ //index: i - 1,
794
+ columnNode: el,
795
+ col:12,
796
+ inline:false,
797
+ inputtype: GridInput,
798
+ data: data,
799
+ onChange: function(node, value, input) {
800
+
801
+ let column = this.columnNode;
802
+
803
+ //if remove button is clicked remove column and render row properties
804
+ if (input.nodeName == 'BUTTON') {
805
+ column.remove();
806
+ Vvveb.Components.render("html/gridrow");
807
+ return node;
808
+ }
809
+
810
+ //if select input then change column class
811
+ _class = column.getAttribute("class");
812
+
813
+ //remove previous breakpoint column size
814
+ _class = _class.replace(new RegExp(input.name + '-\\d+?'), '');
815
+ //add new column size
816
+ if (value) _class += ' ' + input.name + '-' + value;
817
+ column.setAttribute("class", _class);
818
+
819
+ return node;
820
+ },
821
+ });
822
+ });
823
+
824
+ //remove all column properties
825
+ this.properties = this.properties.filter(function(item) {
826
+ return item.key.indexOf("column") === -1;
827
+ });
828
+
829
+ //add remaining properties to generated column properties, put first 2 align properties first
830
+ this.properties = this.properties.slice(0,4).concat(properties, this.properties.slice(4));
831
+
832
+ return node;
833
+ },
834
+
835
+ properties: [{
836
+ name: "Direction",
837
+ key: "direction",
838
+ htmlAttr: "class",
839
+ inline:false,
840
+ validValues: ["", "flex-row", "flex-row-reverse", "flex-column", "flex-column-reverse"],
841
+ inputtype: RadioButtonInput,
842
+ data: {
843
+ extraclass:"btn-group-sm btn-group-fullwidth",
844
+ options: [{
845
+ value: "",
846
+ icon:"la la-times",
847
+ //text: "None",
848
+ title: "Default",
849
+ checked:true,
850
+ },{
851
+ value: "flex-row",
852
+ //text: "Left",
853
+ title: "Row - horizontal",
854
+ icon:"la la-arrow-right",
855
+ checked:false,
856
+ },{
857
+ value: "flex-column",
858
+ //text: "Center",
859
+ title: "Column - vertical",
860
+ icon:"la la-arrow-down",
861
+ checked:false,
862
+ },{
863
+ value: "flex-row-reverse",
864
+ //text: "Right",
865
+ title: "Row - reversed",
866
+ icon:"la la-arrow-left",
867
+ checked:false,
868
+ },{
869
+ value: "flex-column-reverse",
870
+ //text: "Center",
871
+ title: "Column - reversed",
872
+ icon:"la la-arrow-up",
873
+ checked:false,
874
+ }],
875
+ },
876
+ },{
877
+ name: "Vertical align",
878
+ key: "vertical-align",
879
+ htmlAttr: "class",
880
+ inline:false,
881
+ validValues: ["", "align-items-start", "align-items-center", "align-items-end", "align-items-baseline", "align-items-stretch"],
882
+ inputtype: RadioButtonInput,
883
+ data: {
884
+ extraclass:"btn-group-sm btn-group-fullwidth",
885
+ options: [{
886
+ value: "",
887
+ icon:"la la-times",
888
+ //text: "None",
889
+ title: "None",
890
+ checked:true,
891
+ },{
892
+ value: "align-items-start",
893
+ //text: "Left",
894
+ title: "Start",
895
+ icon:"la la-align-left",
896
+ checked:false,
897
+ },{
898
+ value: "align-items-center",
899
+ //text: "Center",
900
+ title: "Center",
901
+ icon:"la la-align-center",
902
+ checked:false,
903
+ },{
904
+ value: "align-items-end",
905
+ //text: "Right",
906
+ title: "End",
907
+ icon:"la la-align-right",
908
+ checked:false,
909
+ },{
910
+ value: "align-items-baseline",
911
+ title: "Baseline",
912
+ icon:"la la-indent",
913
+ checked:false,
914
+ },{
915
+ value: "align-items-stretch",
916
+ title: "Stretch",
917
+ icon:"la la-align-justify",
918
+ checked:false,
919
+ }],
920
+ },
921
+ },{
922
+ name: "Horizontal align",
923
+ key: "horizontal-align",
924
+ htmlAttr: "class",
925
+ inline:false,
926
+ validValues: ["", "justify-content-start", "justify-content-center", "justify-content-end", "justify-content-around", "justify-content-between", "justify-content-evenly"],
927
+ inputtype: RadioButtonInput,
928
+ data: {
929
+ extraclass:"btn-group-sm btn-group-fullwidth",
930
+ options: [{
931
+ value: "",
932
+ icon:"la la-times",
933
+ //text: "None",
934
+ title: "None",
935
+ checked:true,
936
+ },{
937
+ value: "justify-content-start",
938
+ //text: "Left",
939
+ title: "Start",
940
+ icon:"la la-align-left",
941
+ checked:false,
942
+ },{
943
+ value: "justify-content-center",
944
+ //text: "Center",
945
+ title: "Center",
946
+ icon:"la la-align-center",
947
+ checked:false,
948
+ },{
949
+ value: "justify-content-end",
950
+ //text: "Right",
951
+ title: "End",
952
+ icon:"la la-align-right",
953
+ checked:false
954
+ },{
955
+ value: "justify-content-around",
956
+ //text: "Left",
957
+ title: "Around",
958
+ icon:"la la-indent",
959
+ checked:false,
960
+ },{
961
+ value: "justify-content-between",
962
+ //text: "Center",
963
+ title: "Between",
964
+ icon:"la la-outdent",
965
+ checked:false,
966
+ },{
967
+ value: "justify-content-evenly",
968
+ //text: "Right",
969
+ title: "Evenly",
970
+ icon:"la la-align-justify",
971
+ checked:false,
972
+ }],
973
+ },
974
+ },{
975
+ name: "Wrap",
976
+ key: "wrap",
977
+ htmlAttr: "class",
978
+ inline:false,
979
+ validValues: ["", "flex-wrap", "flex-nowrap"],
980
+ inputtype: RadioButtonInput,
981
+ data: {
982
+ extraclass:"btn-group-sm btn-group-fullwidth",
983
+ options: [{
984
+ value: "",
985
+ icon:"la la-times",
986
+ //text: "None",
987
+ title: "None",
988
+ checked:true,
989
+ },{
990
+ value: "flex-wrap",
991
+ //text: "Left",
992
+ title: "Wrap",
993
+ icon:"la la-undo",
994
+ checked:false,
995
+ },{
996
+ value: "flex-nowrap",
997
+ //text: "Center",
998
+ title: "No wrap",
999
+ icon:"la la-arrow-right",
1000
+ checked:false,
1001
+ }],
1002
+ },
1003
+ },{
1004
+ name: "Column",
1005
+ key: "column1",
1006
+ inputtype: GridInput
1007
+ },{
1008
+ name: "Column",
1009
+ key: "column1",
1010
+ inline:true,
1011
+ col:12,
1012
+ inputtype: GridInput
1013
+ },{
1014
+ name: "",
1015
+ key: "addChild",
1016
+ inputtype: ButtonInput,
1017
+ data: {text:"Add column", icon:"la la-plus"},
1018
+ onChange: function(node)
1019
+ {
1020
+ node.append(generateElements('<div class="col-3"><h3>Col-3</h3></div>')[0]);
1021
+
1022
+ //render component properties again to include the new column inputs
1023
+ Vvveb.Components.render("html/gridrow");
1024
+
1025
+ return node;
1026
+ }
1027
+ }]
1028
+ });
1029
+
libs/builder/components-common.js ADDED
@@ -0,0 +1,1135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright 2017 Ziadin Givan
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ https://github.com/givanz/Vvvebjs
17
+ */
18
+
19
+ bgcolorClasses = ["bg-primary", "bg-secondary", "bg-success", "bg-danger", "bg-warning", "bg-info", "bg-body-secondary", "bg-dark", "bg-white"]
20
+
21
+ bgcolorSelectOptions = [{
22
+ value: "Default",
23
+ text: ""
24
+ },{
25
+ value: "bg-primary",
26
+ text: "Primary"
27
+ },{
28
+ value: "bg-secondary",
29
+ text: "Secondary"
30
+ },{
31
+ value: "bg-success",
32
+ text: "Success"
33
+ },{
34
+ value: "bg-danger",
35
+ text: "Danger"
36
+ },{
37
+ value: "bg-warning",
38
+ text: "Warning"
39
+ },{
40
+ value: "bg-info",
41
+ text: "Info"
42
+ },{
43
+ value: "bg-body-secondary",
44
+ text: "Light"
45
+ },{
46
+ value: "bg-dark",
47
+ text: "Dark"
48
+ },{
49
+ value: "bg-white",
50
+ text: "White"
51
+ }];
52
+
53
+ function changeNodeName(node, newNodeName) {
54
+ let newNode;
55
+ newNode = document.createElement(newNodeName);
56
+ attributes = node.attributes;
57
+
58
+ for (i = 0, len = attributes.length; i < len; i++) {
59
+ newNode.setAttribute(attributes[i].nodeName, attributes[i].nodeValue);
60
+ }
61
+
62
+ while (node.hasChildNodes()) {
63
+ newNode.appendChild(node.removeChild(node.firstChild))
64
+ }
65
+
66
+ node.replaceWith(newNode);
67
+
68
+ return newNode;
69
+ }
70
+
71
+ let base_sort = 1000;//start sorting for base component from 100 to allow extended properties to be first
72
+ let style_section = 'style';
73
+ let advanced_section = 'advanced';
74
+
75
+ Vvveb.Components.add("_base", {
76
+ name: "Element",
77
+ properties: [{
78
+ key: "element_header",
79
+ inputtype: SectionInput,
80
+ name:false,
81
+ sort:base_sort++,
82
+ data: {header:"General"},
83
+ },{
84
+ name: "Id",
85
+ key: "id",
86
+ htmlAttr: "id",
87
+ sort: base_sort++,
88
+ inline:false,
89
+ col:6,
90
+ inputtype: TextInput
91
+ },{
92
+ name: "Class",
93
+ key: "class",
94
+ htmlAttr: "class",
95
+ sort: base_sort++,
96
+ inline:false,
97
+ col:6,
98
+ inputtype: TextInput
99
+ }
100
+ ]
101
+ });
102
+
103
+ //display
104
+ Vvveb.Components.extend("_base", "_base", {
105
+ properties: [{
106
+ key: "display_header",
107
+ inputtype: SectionInput,
108
+ name:false,
109
+ sort: base_sort++,
110
+ section: style_section,
111
+ data: {header:"Display"},
112
+ },{
113
+ //linked styles notice message
114
+ name:"",
115
+ key: "linked_styles_check",
116
+ sort: base_sort++,
117
+ section: style_section,
118
+ inline:false,
119
+ col:12,
120
+ inputtype: NoticeInput,
121
+ data: {
122
+ type:'warning',
123
+ title:'Linked styles',
124
+ text:'This element shares styles with other <a class="linked-elements-hover" href="javascript:void()"><b class="elements-count">4</b> elements</a>, to apply styles <b>only for this element</b> enter a <b>unique id</b> eg: <i>marketing-heading</i> in in <br/><a class="id-input" href="#content-tab" role="tab" aria-controls="components" aria-selected="false" href="#content-tab">Content > General > Id</a>.<br/><span class="text-muted small"></span>',
125
+ },
126
+ afterInit:function(node, inputElement) {
127
+ let selector = Vvveb.StyleManager.getSelectorForElement(node);
128
+ let elements = window.FrameDocument.querySelectorAll(selector);
129
+
130
+ if (elements.length <= 1) {
131
+ if (inputElement.style) {
132
+ inputElement.style.display = "none";
133
+ }
134
+ } else {
135
+ inputElement.style.display = "";
136
+ inputElement.querySelector(".elements-count").innerHTML = elements.length;
137
+ inputElement.querySelector(".text-muted").innerHTML = selector;
138
+
139
+ inputElement.querySelector(".id-input", inputElement).addEventListener("click", (event) => {
140
+ document.querySelectorAll(".content-tab a").forEach(e => e.click());
141
+
142
+ setTimeout(function () {
143
+ let idInput = document.querySelectorAll("[name=id]");
144
+ idInput.forEach(el => {if (el.offsetParent) el.focus()});/*
145
+ idInput.forEach(el => el .dispatchEvent(new FocusEvent("focusin", {
146
+ bubbles: true,
147
+ cancelable: false
148
+ })));*/
149
+ }, 700);
150
+
151
+ event.preventDefault();
152
+ return false;
153
+ });
154
+
155
+ inputElement.querySelector(".linked-elements-hover").addEventListener("mouseenter", function (){
156
+ elements.forEach( e => e.style.outline = "2px dotted blue");
157
+ });
158
+
159
+ inputElement.querySelector(".linked-elements-hover").addEventListener("mouseleave", function (){
160
+ elements.forEach( e => e.style.outline = "");
161
+ });
162
+ }
163
+ },
164
+ },{
165
+ name: "Display",
166
+ key: "display",
167
+ htmlAttr: "style",
168
+ sort: base_sort++,
169
+ section: style_section,
170
+ col:6,
171
+ inline:false,
172
+ inputtype: SelectInput,
173
+ validValues: ["block", "inline", "inline-block", "none"],
174
+ data: {
175
+ options: [{
176
+ value: "block",
177
+ text: "Block"
178
+ },{
179
+ value: "inline",
180
+ text: "Inline"
181
+ },{
182
+ value: "inline-block",
183
+ text: "Inline Block"
184
+ },{
185
+ value: "inline-block",
186
+ text: "Inline Block"
187
+ },{
188
+ value: "flex",
189
+ text: "Flex"
190
+ },{
191
+ value: "inline-flex",
192
+ text: "Inline Flex"
193
+ },{
194
+ value: "grid",
195
+ text: "Grid"
196
+ },{
197
+ value: "inline-grid",
198
+ text: "Inline grid"
199
+ },{
200
+ value: "table",
201
+ text: "Table"
202
+ },{
203
+ value: "table-row",
204
+ text: "Table Row"
205
+ },{
206
+ value: "list-item",
207
+ text: "List Item"
208
+ },{
209
+ value: "inherit",
210
+ text: "Inherit"
211
+ },{
212
+ value: "initial",
213
+ text: "Initial"
214
+ },{
215
+ value: "none",
216
+ text: "none"
217
+ }]
218
+ }
219
+ },{
220
+ name: "Position",
221
+ key: "position",
222
+ htmlAttr: "style",
223
+ sort: base_sort++,
224
+ section: style_section,
225
+ col:6,
226
+ inline:false,
227
+ inputtype: SelectInput,
228
+ validValues: ["static", "fixed", "relative", "absolute"],
229
+ data: {
230
+ options: [{
231
+ value: "static",
232
+ text: "Static"
233
+ },{
234
+ value: "fixed",
235
+ text: "Fixed"
236
+ },{
237
+ value: "relative",
238
+ text: "Relative"
239
+ },{
240
+ value: "absolute",
241
+ text: "Absolute"
242
+ }]
243
+ }
244
+ },{
245
+ name: "Top",
246
+ key: "top",
247
+ htmlAttr: "style",
248
+ sort: base_sort++,
249
+ section: style_section,
250
+ col:6,
251
+ inline:false,
252
+ parent:"",
253
+ inputtype: CssUnitInput
254
+ },{
255
+ name: "Left",
256
+ key: "left",
257
+ htmlAttr: "style",
258
+ sort: base_sort++,
259
+ section: style_section,
260
+ col:6,
261
+ inline:false,
262
+ parent:"",
263
+ inputtype: CssUnitInput
264
+ },{
265
+ name: "Bottom",
266
+ key: "bottom",
267
+ htmlAttr: "style",
268
+ sort: base_sort++,
269
+ section: style_section,
270
+ col:6,
271
+ inline:false,
272
+ parent:"",
273
+ inputtype: CssUnitInput
274
+ },{
275
+ name: "Right",
276
+ key: "right",
277
+ htmlAttr: "style",
278
+ sort: base_sort++,
279
+ section: style_section,
280
+ col:6,
281
+ inline:false,
282
+ parent:"",
283
+ inputtype: CssUnitInput
284
+ },{
285
+ name: "Float",
286
+ key: "float",
287
+ htmlAttr: "style",
288
+ sort: base_sort++,
289
+ section: style_section,
290
+ col:12,
291
+ inline:false,
292
+ inputtype: RadioButtonInput,
293
+ data: {
294
+ extraclass:"btn-group-sm btn-group-fullwidth",
295
+ options: [{
296
+ value: "none",
297
+ icon:"la la-times",
298
+ //text: "None",
299
+ title: "None",
300
+ checked:true,
301
+ },{
302
+ value: "left",
303
+ //text: "Left",
304
+ title: "Left",
305
+ icon:"la la-align-left",
306
+ checked:false,
307
+ },{
308
+ value: "right",
309
+ //text: "Right",
310
+ title: "Right",
311
+ icon:"la la-align-right",
312
+ checked:false,
313
+ }],
314
+ }
315
+ },{
316
+ name: "Opacity",
317
+ key: "opacity",
318
+ htmlAttr: "style",
319
+ sort: base_sort++,
320
+ section: style_section,
321
+ col:12,
322
+ inline:false,
323
+ parent:"",
324
+ inputtype: RangeInput,
325
+ data:{
326
+ max: 1, //max zoom level
327
+ min:0,
328
+ step:0.1
329
+ },
330
+ },{
331
+ name: "Background Color",
332
+ key: "background-color",
333
+ sort: base_sort++,
334
+ section: style_section,
335
+ col:6,
336
+ inline:true,
337
+ htmlAttr: "style",
338
+ inputtype: ColorInput,
339
+ },{
340
+ name: "Text Color",
341
+ key: "color",
342
+ sort: base_sort++,
343
+ section: style_section,
344
+ col:6,
345
+ inline:true,
346
+ htmlAttr: "style",
347
+ inputtype: ColorInput,
348
+ }]
349
+ });
350
+
351
+ //Typography
352
+ let ComponentBaseTypography = {
353
+ properties: [{
354
+ key: "typography_header",
355
+ inputtype: SectionInput,
356
+ name:false,
357
+ sort: base_sort++,
358
+ section: style_section,
359
+ data: {header:"Typography"},
360
+
361
+ },{
362
+ name: "Font size",
363
+ key: "font-size",
364
+ htmlAttr: "style",
365
+ sort: base_sort++,
366
+ section: style_section,
367
+ col:6,
368
+ inline:false,
369
+ inputtype: CssUnitInput
370
+ },{
371
+ name: "Font weight",
372
+ key: "font-weight",
373
+ htmlAttr: "style",
374
+ sort: base_sort++,
375
+ section: style_section,
376
+ col:6,
377
+ inline:false,
378
+ inputtype: SelectInput,
379
+ data: {
380
+ options: [{
381
+ value: "",
382
+ text: "Default"
383
+ },{
384
+ value: "100",
385
+ text: "Thin"
386
+ },{
387
+ value: "200",
388
+ text: "Extra-Light"
389
+ },{
390
+ value: "300",
391
+ text: "Light"
392
+ },{
393
+ value: "400",
394
+ text: "Normal"
395
+ },{
396
+ value: "500",
397
+ text: "Medium"
398
+ },{
399
+ value: "600",
400
+ text: "Semi-Bold"
401
+ },{
402
+ value: "700",
403
+ text: "Bold"
404
+ },{
405
+ value: "800",
406
+ text: "Extra-Bold"
407
+ },{
408
+ value: "900",
409
+ text: "Ultra-Bold"
410
+ }],
411
+ }
412
+ },{
413
+ name: "Font family",
414
+ key: "font-family",
415
+ htmlAttr: "style",
416
+ sort: base_sort++,
417
+ section: style_section,
418
+ col:12,
419
+ inline:false,
420
+ inputtype: SelectInput,
421
+ data: {
422
+ options: fontList
423
+ }
424
+ },{
425
+ name: "Text align",
426
+ key: "text-align",
427
+ htmlAttr: "style",
428
+ sort: base_sort++,
429
+ section: style_section,
430
+ col:12,
431
+ inline:false,
432
+ inputtype: RadioButtonInput,
433
+ data: {
434
+ extraclass:"btn-group-sm btn-group-fullwidth",
435
+ options: [{
436
+ value: "",
437
+ icon:"la la-times",
438
+ //text: "None",
439
+ title: "None",
440
+ checked:true,
441
+ },{
442
+ value: "left",
443
+ //text: "Left",
444
+ title: "Left",
445
+ icon:"la la-align-left",
446
+ checked:false,
447
+ },{
448
+ value: "center",
449
+ //text: "Center",
450
+ title: "Center",
451
+ icon:"la la-align-center",
452
+ checked:false,
453
+ },{
454
+ value: "right",
455
+ //text: "Right",
456
+ title: "Right",
457
+ icon:"la la-align-right",
458
+ checked:false,
459
+ },{
460
+ value: "justify",
461
+ //text: "justify",
462
+ title: "Justify",
463
+ icon:"la la-align-justify",
464
+ checked:false,
465
+ }],
466
+ },
467
+ },{
468
+ name: "Line height",
469
+ key: "line-height",
470
+ htmlAttr: "style",
471
+ sort: base_sort++,
472
+ section: style_section,
473
+ col:6,
474
+ inline:false,
475
+ inputtype: CssUnitInput
476
+ },{
477
+ name: "Letter spacing",
478
+ key: "letter-spacing",
479
+ htmlAttr: "style",
480
+ sort: base_sort++,
481
+ section: style_section,
482
+ col:6,
483
+ inline:false,
484
+ inputtype: CssUnitInput
485
+ },{
486
+ name: "Text decoration",
487
+ key: "text-decoration-line",
488
+ htmlAttr: "style",
489
+ sort: base_sort++,
490
+ section: style_section,
491
+ col:12,
492
+ inline:false,
493
+ inputtype: RadioButtonInput,
494
+ data: {
495
+ extraclass:"btn-group-sm btn-group-fullwidth",
496
+ options: [{
497
+ value: "none",
498
+ icon:"la la-times",
499
+ //text: "None",
500
+ title: "None",
501
+ checked:true,
502
+ },{
503
+ value: "underline",
504
+ //text: "Left",
505
+ title: "underline",
506
+ icon:"la la-long-arrow-alt-down",
507
+ checked:false,
508
+ },{
509
+ value: "overline",
510
+ //text: "Right",
511
+ title: "overline",
512
+ icon:"la la-long-arrow-alt-up",
513
+ checked:false,
514
+ },{
515
+ value: "line-through",
516
+ //text: "Right",
517
+ title: "Line Through",
518
+ icon:"la la-strikethrough",
519
+ checked:false,
520
+ },{
521
+ value: "underline overline",
522
+ //text: "justify",
523
+ title: "Underline Overline",
524
+ icon:"la la-arrows-alt-v",
525
+ checked:false,
526
+ }],
527
+ },
528
+ },{
529
+ name: "Decoration Color",
530
+ key: "text-decoration-color",
531
+ sort: base_sort++,
532
+ section: style_section,
533
+ col:6,
534
+ inline:true,
535
+ htmlAttr: "style",
536
+ inputtype: ColorInput,
537
+ },{
538
+ name: "Decoration style",
539
+ key: "text-decoration-style",
540
+ htmlAttr: "style",
541
+ sort: base_sort++,
542
+ section: style_section,
543
+ col:6,
544
+ inline:true,
545
+ inputtype: SelectInput,
546
+ data: {
547
+ options: [{
548
+ value: "",
549
+ text: "Default"
550
+ },{
551
+ value: "solid",
552
+ text: "Solid"
553
+ },{
554
+ value: "wavy",
555
+ text: "Wavy"
556
+ },{
557
+ value: "dotted",
558
+ text: "Dotted"
559
+ },{
560
+ value: "dashed",
561
+ text: "Dashed"
562
+ },{
563
+ value: "double",
564
+ text: "Double"
565
+ }],
566
+ }
567
+ }]
568
+ }
569
+
570
+ Vvveb.Components.extend("_base", "_base", ComponentBaseTypography);
571
+
572
+ //Size
573
+ let ComponentBaseSize = {
574
+ properties: [{
575
+ key: "size_header",
576
+ inputtype: SectionInput,
577
+ name:false,
578
+ sort: base_sort++,
579
+ section: style_section,
580
+ data: {header:"Size", expanded:false},
581
+ },{
582
+ name: "Width",
583
+ key: "width",
584
+ htmlAttr: "style",
585
+ sort: base_sort++,
586
+ section: style_section,
587
+ col:6,
588
+ inline:false,
589
+ inputtype: CssUnitInput
590
+ },{
591
+ name: "Height",
592
+ key: "height",
593
+ htmlAttr: "style",
594
+ sort: base_sort++,
595
+ section: style_section,
596
+ col:6,
597
+ inline:false,
598
+ inputtype: CssUnitInput
599
+ },{
600
+ name: "Min Width",
601
+ key: "min-width",
602
+ htmlAttr: "style",
603
+ sort: base_sort++,
604
+ section: style_section,
605
+ col:6,
606
+ inline:false,
607
+ inputtype: CssUnitInput
608
+ },{
609
+ name: "Min Height",
610
+ key: "min-height",
611
+ htmlAttr: "style",
612
+ sort: base_sort++,
613
+ section: style_section,
614
+ col:6,
615
+ inline:false,
616
+ inputtype: CssUnitInput
617
+ },{
618
+ name: "Max Width",
619
+ key: "max-width",
620
+ htmlAttr: "style",
621
+ sort: base_sort++,
622
+ section: style_section,
623
+ col:6,
624
+ inline:false,
625
+ inputtype: CssUnitInput
626
+ },{
627
+ name: "Max Height",
628
+ key: "max-height",
629
+ htmlAttr: "style",
630
+ sort: base_sort++,
631
+ section: style_section,
632
+ col:6,
633
+ inline:false,
634
+ inputtype: CssUnitInput
635
+ }]
636
+ }
637
+
638
+ Vvveb.Components.extend("_base", "_base", ComponentBaseSize);
639
+
640
+ //Margin
641
+ let ComponentBaseMargin = {
642
+ properties: [{
643
+ key: "margins_header",
644
+ inputtype: SectionInput,
645
+ name:false,
646
+ sort: base_sort++,
647
+ section: style_section,
648
+ data: {header:"Margin", expanded:false},
649
+ },{
650
+ name: "Top",
651
+ key: "margin-top",
652
+ htmlAttr: "style",
653
+ sort: base_sort++,
654
+ section: style_section,
655
+ col:6,
656
+ inline:false,
657
+ inputtype: CssUnitInput
658
+ },{
659
+ name: "Right",
660
+ key: "margin-right",
661
+ htmlAttr: "style",
662
+ sort: base_sort++,
663
+ section: style_section,
664
+ col:6,
665
+ inline:false,
666
+ inputtype: CssUnitInput
667
+ },{
668
+ name: "Bottom",
669
+ key: "margin-bottom",
670
+ htmlAttr: "style",
671
+ sort: base_sort++,
672
+ section: style_section,
673
+ col:6,
674
+ inline:false,
675
+ inputtype: CssUnitInput
676
+ },{
677
+ name: "Left",
678
+ key: "margin-left",
679
+ htmlAttr: "style",
680
+ sort: base_sort++,
681
+ section: style_section,
682
+ col:6,
683
+ inline:false,
684
+ inputtype: CssUnitInput
685
+ }]
686
+ }
687
+
688
+ Vvveb.Components.extend("_base", "_base", ComponentBaseMargin);
689
+
690
+ //Padding
691
+ let ComponentBasePadding = {
692
+
693
+ properties: [{
694
+ key: "paddings_header",
695
+ inputtype: SectionInput,
696
+ name:false,
697
+ sort: base_sort++,
698
+ section: style_section,
699
+ data: {header:"Padding", expanded:false},
700
+ },{
701
+ name: "Top",
702
+ key: "padding-top",
703
+ htmlAttr: "style",
704
+ sort: base_sort++,
705
+ section: style_section,
706
+ col:6,
707
+ inline:false,
708
+ inputtype: CssUnitInput
709
+ },{
710
+ name: "Right",
711
+ key: "padding-right",
712
+ htmlAttr: "style",
713
+ sort: base_sort++,
714
+ section: style_section,
715
+ col:6,
716
+ inline:false,
717
+ inputtype: CssUnitInput
718
+ },{
719
+ name: "Bottom",
720
+ key: "padding-bottom",
721
+ htmlAttr: "style",
722
+ sort: base_sort++,
723
+ section: style_section,
724
+ col:6,
725
+ inline:false,
726
+ inputtype: CssUnitInput
727
+ },{
728
+ name: "Left",
729
+ key: "padding-left",
730
+ htmlAttr: "style",
731
+ sort: base_sort++,
732
+ section: style_section,
733
+ col:6,
734
+ inline:false,
735
+ inputtype: CssUnitInput
736
+ }]
737
+ }
738
+
739
+ Vvveb.Components.extend("_base", "_base", ComponentBasePadding);
740
+
741
+
742
+ //Border
743
+ Vvveb.Components.extend("_base", "_base", {
744
+ properties: [{
745
+ key: "border_header",
746
+ inputtype: SectionInput,
747
+ name:false,
748
+ sort: base_sort++,
749
+ section: style_section,
750
+ data: {header:"Border", expanded:false},
751
+ },{
752
+ name: "Style",
753
+ key: "border-style",
754
+ htmlAttr: "style",
755
+ sort: base_sort++,
756
+ section: style_section,
757
+ col:12,
758
+ inline:false,
759
+ inputtype: SelectInput,
760
+ data: {
761
+ options: [{
762
+ value: "",
763
+ text: "Default"
764
+ },{
765
+ value: "solid",
766
+ text: "Solid"
767
+ },{
768
+ value: "dotted",
769
+ text: "Dotted"
770
+ },{
771
+ value: "dashed",
772
+ text: "Dashed"
773
+ }],
774
+ }
775
+ },{
776
+ name: "Width",
777
+ key: "border-width",
778
+ htmlAttr: "style",
779
+ sort: base_sort++,
780
+ section: style_section,
781
+ col:6,
782
+ inline:false,
783
+ inputtype: CssUnitInput
784
+ },{
785
+ name: "Color",
786
+ key: "border-color",
787
+ sort: base_sort++,
788
+ section: style_section,
789
+ col:6,
790
+ inline:false,
791
+ htmlAttr: "style",
792
+ inputtype: ColorInput,
793
+ }]
794
+ });
795
+
796
+
797
+
798
+ //Border radius
799
+ Vvveb.Components.extend("_base", "_base", {
800
+ properties: [{
801
+ key: "border_radius_header",
802
+ inputtype: SectionInput,
803
+ name:false,
804
+ sort: base_sort++,
805
+ section: style_section,
806
+ data: {header:"Border radius", expanded:false},
807
+ },{
808
+ name: "Top Left",
809
+ key: "border-top-left-radius",
810
+ htmlAttr: "style",
811
+ sort: base_sort++,
812
+ section: style_section,
813
+ col:6,
814
+ inline:false,
815
+ inputtype: CssUnitInput
816
+ },{
817
+ name: "Top Right",
818
+ key: "border-top-right-radius",
819
+ htmlAttr: "style",
820
+ sort: base_sort++,
821
+ section: style_section,
822
+ col:6,
823
+ inline:false,
824
+ inputtype: CssUnitInput
825
+ },{
826
+ name: "Bottom Left",
827
+ key: "border-bottom-left-radius",
828
+ htmlAttr: "style",
829
+ sort: base_sort++,
830
+ section: style_section,
831
+ col:6,
832
+ inline:false,
833
+ inputtype: CssUnitInput
834
+ },{
835
+ name: "Bottom Right",
836
+ key: "border-bottom-right-radius",
837
+ htmlAttr: "style",
838
+ sort: base_sort++,
839
+ section: style_section,
840
+ col:6,
841
+ inline:false,
842
+ inputtype: CssUnitInput
843
+ }]
844
+ });
845
+
846
+ //Background image
847
+ Vvveb.Components.extend("_base", "_base", {
848
+ properties: [{
849
+ key: "background_image_header",
850
+ inputtype: SectionInput,
851
+ name:false,
852
+ sort: base_sort++,
853
+ section: style_section,
854
+ data: {header:"Background Image", expanded:false},
855
+ },{
856
+ name: "Image",
857
+ key: "Image",
858
+ sort: base_sort++,
859
+ section: style_section,
860
+ //htmlAttr: "style",
861
+ inputtype: ImageInput,
862
+
863
+ init: function(node) {
864
+ let image = node.style.backgroundImage.replace(/url\(['"]?([^"\)$]+?)['"]?\).*/, '$1');
865
+ return image;
866
+ },
867
+
868
+ onChange: function(node, value) {
869
+
870
+ Vvveb.StyleManager.setStyle(node, "background-image", 'url(' + value + ')');
871
+
872
+ return node;
873
+ }
874
+
875
+ },{
876
+ name: "Repeat",
877
+ key: "background-repeat",
878
+ sort: base_sort++,
879
+ section: style_section,
880
+ htmlAttr: "style",
881
+ inputtype: SelectInput,
882
+ data: {
883
+ options: [{
884
+ value: "",
885
+ text: "Default"
886
+ },{
887
+ value: "repeat-x",
888
+ text: "repeat-x"
889
+ },{
890
+ value: "repeat-y",
891
+ text: "repeat-y"
892
+ },{
893
+ value: "no-repeat",
894
+ text: "no-repeat"
895
+ }],
896
+ }
897
+ },{
898
+ name: "Size",
899
+ key: "background-size",
900
+ sort: base_sort++,
901
+ section: style_section,
902
+ htmlAttr: "style",
903
+ inputtype: SelectInput,
904
+ data: {
905
+ options: [{
906
+ value: "",
907
+ text: "Default"
908
+ },{
909
+ value: "contain",
910
+ text: "contain"
911
+ },{
912
+ value: "cover",
913
+ text: "cover"
914
+ }],
915
+ }
916
+ },{
917
+ name: "Position x",
918
+ key: "background-position-x",
919
+ sort: base_sort++,
920
+ section: style_section,
921
+ htmlAttr: "style",
922
+ col:6,
923
+ inline:true,
924
+ inputtype: SelectInput,
925
+ data: {
926
+ options: [{
927
+ value: "",
928
+ text: "Default"
929
+ },{
930
+ value: "center",
931
+ text: "center"
932
+ },{
933
+ value: "right",
934
+ text: "right"
935
+ },{
936
+ value: "left",
937
+ text: "left"
938
+ }],
939
+ }
940
+ },{
941
+ name: "Position y",
942
+ key: "background-position-y",
943
+ sort: base_sort++,
944
+ section: style_section,
945
+ htmlAttr: "style",
946
+ col:6,
947
+ inline:true,
948
+ inputtype: SelectInput,
949
+ data: {
950
+ options: [{
951
+ value: "",
952
+ text: "Default"
953
+ },{
954
+ value: "center",
955
+ text: "center"
956
+ },{
957
+ value: "top",
958
+ text: "top"
959
+ },{
960
+ value: "bottom",
961
+ text: "bottom"
962
+ }],
963
+ }
964
+ }]
965
+ });
966
+
967
+
968
+ //Device visibility
969
+ let ComponentDeviceVisibility = {
970
+ properties: [{
971
+ key: "visibility_header",
972
+ inputtype: SectionInput,
973
+ name:false,
974
+ sort: base_sort++,
975
+ section: advanced_section,
976
+ data: {header:"Hide based on device screen width"},
977
+ },{
978
+ name: "Extra small devices",
979
+ key: "hidexs",
980
+ col:6,
981
+ inline:true,
982
+ sort: base_sort++,
983
+ section: advanced_section,
984
+ htmlAttr: "class",
985
+ validValues: ["d-xs-none"],
986
+ inputtype: ToggleInput,
987
+ data: {
988
+ on: "d-xs-none",
989
+ off: ""
990
+ }
991
+ },{
992
+ name: "Small devices",
993
+ key: "hidesm",
994
+ col:6,
995
+ inline:true,
996
+ sort: base_sort++,
997
+ section: advanced_section,
998
+ htmlAttr: "class",
999
+ validValues: ["d-sm-none"],
1000
+ inputtype: ToggleInput,
1001
+ data: {
1002
+ on: "d-sm-none",
1003
+ off: ""
1004
+ }
1005
+ },{
1006
+ name: "Medium devices",
1007
+ key: "hidemd",
1008
+ col:6,
1009
+ inline:true,
1010
+ sort: base_sort++,
1011
+ section: advanced_section,
1012
+ htmlAttr: "class",
1013
+ validValues: ["d-md-none"],
1014
+ inputtype: ToggleInput,
1015
+ data: {
1016
+ on: "d-md-none",
1017
+ off: ""
1018
+ }
1019
+ },{
1020
+ name: "Large devices",
1021
+ key: "hidelg",
1022
+ col:6,
1023
+ inline:true,
1024
+ sort: base_sort++,
1025
+ section: advanced_section,
1026
+ htmlAttr: "class",
1027
+ validValues: ["d-lg-none"],
1028
+ inputtype: ToggleInput,
1029
+ data: {
1030
+ on: "d-lg-none",
1031
+ off: ""
1032
+ }
1033
+ },{
1034
+ name: "Xl devices",
1035
+ key: "hidexl",
1036
+ col:6,
1037
+ inline:true,
1038
+ sort: base_sort++,
1039
+ section: advanced_section,
1040
+ htmlAttr: "class",
1041
+ validValues: ["d-xl-none"],
1042
+ inputtype: ToggleInput,
1043
+ data: {
1044
+ on: "d-xl-none",
1045
+ off: ""
1046
+ }
1047
+ },{
1048
+ name: "Xxl devices",
1049
+ key: "hidexxl",
1050
+ col:6,
1051
+ inline:true,
1052
+ sort: base_sort++,
1053
+ section: advanced_section,
1054
+ htmlAttr: "class",
1055
+ validValues: ["d-xxl-none"],
1056
+ inputtype: ToggleInput,
1057
+ data: {
1058
+ on: "d-xxl-none",
1059
+ off: ""
1060
+ }
1061
+ }]
1062
+ };
1063
+
1064
+ Vvveb.Components.extend("_base", "_base", ComponentDeviceVisibility);
1065
+
1066
+
1067
+ Vvveb.Components.add("config/bootstrap", {
1068
+ name: "Bootstrap Variables",
1069
+ beforeInit: function (node) {
1070
+ properties = [];
1071
+ let i = 0;
1072
+ let j = 0;
1073
+
1074
+ let cssVars = Vvveb.ColorPaletteManager.getAllCSSVariableNames(window.FrameDocument.styleSheets/*, ":root"*/);
1075
+
1076
+ for (type in cssVars) {
1077
+ properties.push({
1078
+ key: "cssVars" + type,
1079
+ inputtype: SectionInput,
1080
+ name:type,
1081
+ sort: base_sort++,
1082
+ data: {header:type[0].toUpperCase() + type.slice(1)},
1083
+ });
1084
+
1085
+ for (selector in cssVars[type]) {
1086
+
1087
+ let friendlyName = selector.replaceAll(/--bs-/g,"").replaceAll("-", " ").trim();
1088
+ friendlyName = friendlyName[0].toUpperCase() + friendlyName.slice(1);
1089
+
1090
+ let value = cssVars[type][selector];
1091
+ let input;
1092
+
1093
+ data = {selector, type:value.type, step:"any"};
1094
+
1095
+ if (value.type == "color") {
1096
+ input = ColorInput;
1097
+ } else if (value.type == "font") {
1098
+ input = SelectInput;
1099
+ data.options = fontList;
1100
+ } else if (value.type == "dimensions") {
1101
+ input = CssUnitInput;
1102
+ }
1103
+
1104
+ i++;
1105
+ properties.push({
1106
+ name: friendlyName,
1107
+ key: "cssvar" + i,
1108
+ defaultValue: value.value,
1109
+ //index: i - 1,
1110
+ columnNode: this,
1111
+ col:(value.type == "font" || value.type == "dimensions") ? 12 : 6,
1112
+ inline:(value.type == "font" || value.type == "dimensions") ? false : true,
1113
+ section: advanced_section,
1114
+ inputtype: input,
1115
+ data: data,
1116
+ onChange: function(node, value, input) {
1117
+
1118
+ if (this.data.type == "font") {
1119
+ let option = input.options[input.selectedIndex];
1120
+ Vvveb.FontsManager.addFont(option.dataset.provider, value, node[0]);
1121
+ }
1122
+
1123
+ Vvveb.StyleManager.setStyle(":root", this.data.selector, value);
1124
+
1125
+ return node;
1126
+ },
1127
+ });
1128
+ }
1129
+ }
1130
+
1131
+ this.properties = properties;
1132
+ return node;
1133
+ },
1134
+ properties: [],
1135
+ });
libs/builder/components-elements.js ADDED
@@ -0,0 +1,1428 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright 2017 Ziadin Givan
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ https://github.com/givanz/Vvvebjs
17
+ */
18
+
19
+ Vvveb.ComponentsGroup['Elements'] = [
20
+ /*sections */
21
+ "elements/font-icon",
22
+ "elements/carousel",
23
+ "elements/gallery",
24
+ "elements/slider",
25
+ "elements/tabs",
26
+ "elements/accordion",
27
+ "elements/flip-box",
28
+ "elements/counter",
29
+ "elements/svg-icon",
30
+ "elements/figure",
31
+ //"elements/testimonial",
32
+ "elements/social-icons",
33
+ //"elements/icon-list",
34
+ //"elements/divider",
35
+ //"elements/separator",
36
+ //"elements/image-box",
37
+ //"elements/icon-box",
38
+ //"elements/animated-headline",
39
+ //"elements/price-table",
40
+ //"elements/price-list",
41
+ //"elements/reviews",
42
+ "elements/code",
43
+ "elements/image-compare",
44
+ //"elements/back-to-top",
45
+ //"elements/blob",
46
+ //"elements/image-shape",
47
+ //"elements/image-shape",
48
+ //"elements/rating",
49
+ ];
50
+
51
+ Vvveb.Components.extend("_base","elements/figure", {
52
+ nodes: ["figure"],
53
+ name: "Figure",
54
+ image: "icons/image.svg",
55
+ resizable:true,
56
+ html: `<figure>
57
+ <img src="${Vvveb.baseUrl}icons/image.svg" alt="Trulli">
58
+ <figcaption>Fig.1 - Trulli, Puglia, Italy.</figcaption>
59
+ <div class="border"></div>
60
+ </figure>`,
61
+
62
+ stylesheets:[{
63
+ //the css is added in head when the element is added to page
64
+ 'src': Vvveb.baseUrl + 'css/figure.css',
65
+ //the css is removed on save if none of the figure elements are present in the page
66
+ 'mustHaveElement':"figure",
67
+ },
68
+ ],
69
+ /*
70
+ javascripts:[
71
+ {
72
+ 'src': Vvveb.baseUrl + 'css/figure.js',
73
+ //the js is removed on save if none of the figure elements are present in the page
74
+ 'mustHaveElement':"figure",
75
+ }
76
+ ],*/
77
+ resizable:true,//show select box resize handlers
78
+
79
+ properties: [{
80
+ name: "Image",
81
+ key: "src",
82
+ child:"img",
83
+ htmlAttr: "src",
84
+ inputtype: ImageInput
85
+ },{
86
+ name: "Width",
87
+ key: "width",
88
+ child:"img",
89
+ htmlAttr: "width",
90
+ inputtype: CssUnitInput
91
+ },{
92
+ name: "Height",
93
+ key: "height",
94
+ child:"img",
95
+ htmlAttr: "height",
96
+ inputtype: CssUnitInput
97
+ },{
98
+ name: "Alt",
99
+ key: "alt",
100
+ child:"img",
101
+ htmlAttr: "alt",
102
+ inputtype: TextInput
103
+ },{
104
+ name: "Caption",
105
+ key: "caption",
106
+ child:"figcaption",
107
+ htmlAttr: "innerHTML",
108
+ inputtype: TextareaInput
109
+ }]
110
+ });
111
+
112
+
113
+
114
+ //Icon
115
+ Vvveb.Components.extend("_base","elements/font-icon", {
116
+ classes: ["la", "lab"],
117
+ name: "Font Icon",
118
+ image: "icons/star.svg",
119
+ html: `<i class="la la-star la-2x"></i>`,
120
+ properties: [
121
+ {
122
+ name: "Icon",
123
+ key: "icon",
124
+ inline:true,
125
+ inputtype: HtmlListSelectInput,
126
+ onChange:function(element, value, input, component) {
127
+ element.classList.remove("la", "lab", "lar");
128
+ let className = element.getAttribute('class');
129
+ element.classList.forEach((value, key, listObj) => {
130
+ if (value.startsWith("la-") && value != "la-lg") {
131
+ element.classList.remove(value);
132
+ }
133
+ });
134
+
135
+ element.classList.add(...input.className.split(" "));
136
+ return element;
137
+ },
138
+ data: {
139
+ url: Vvveb.baseUrl + "../../resources/{value}.html",
140
+ clickElement:"li",
141
+ insertElement:"i",
142
+ elements: 'Loading ...',
143
+ options: [{
144
+ value: "line-awesome",
145
+ text: "Line-awesome"
146
+ }]
147
+ },
148
+ },{
149
+ name: "Size",
150
+ key: "type",
151
+ htmlAttr: "class",
152
+ inputtype: SelectInput,
153
+ validValues: ["","la-lg", "la-2x"],
154
+ data: {
155
+ options: [{
156
+ value: "",
157
+ text: "Normal"
158
+ },{
159
+ value: "la-lg",
160
+ text: "Large"
161
+ },{
162
+ value: "la-2x",
163
+ text: "2x"
164
+ }]
165
+ }
166
+ }]
167
+ });
168
+ /*
169
+ V.Resources.Icons =
170
+ [{
171
+ value: `stopwatch.svg`,
172
+ text: "Star"
173
+ },
174
+ {
175
+ value: `envelope.svg`,
176
+ text: "Sections"
177
+ },{
178
+ value: `star.svg`,
179
+ text: "Flipbox"
180
+ }];*/
181
+
182
+ Vvveb.Components.extend("_base","elements/svg-icon", {
183
+ nodes: ["svg"],
184
+ name: "Svg Icon",
185
+ image: "icons/star.svg",
186
+ html: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="64" height="64">
187
+ <path d="M 30.335938 12.546875 L 20.164063 11.472656 L 16 2.132813 L 11.835938 11.472656 L 1.664063 12.546875 L 9.261719 19.394531 L 7.140625 29.398438 L 16 24.289063 L 24.859375 29.398438 L 22.738281 19.394531 Z"/>
188
+ </svg>`,
189
+ properties: [{
190
+ name: "Icon",
191
+ key: "icon",
192
+ inline:true,
193
+ inputtype: HtmlListSelectInput,
194
+ onChange:function(element, value, input, component) {
195
+ let newElement = generateElements(value)[0];
196
+ let attributes = element.attributes;
197
+
198
+ //keep old svg size and colors
199
+ for (let i = 0; i < attributes.length; i++) {
200
+ let attr = attributes[i];
201
+ if (attr.name && attr.name != "viewBox") {
202
+ newElement.setAttribute(attr.name, attr.value);
203
+ }
204
+ }
205
+
206
+ element.replaceWith(newElement);
207
+ return newElement;
208
+ },
209
+ data: {
210
+ url: Vvveb.baseUrl + "../../resources/svg/icons/{value}/index.html",
211
+ clickElement:"li",
212
+ insertElement:"svg",
213
+ elements: 'Loading ...',
214
+ options: [{
215
+ value: "eva-icons",
216
+ text: "Eva icons"
217
+ },{
218
+ value: "ionicons",
219
+ text: "IonIcons"
220
+ },{
221
+ value: "linea",
222
+ text: "Linea"
223
+ },{
224
+ value: "remix-icon",
225
+ text: "RemixIcon"
226
+ },{
227
+ value: "unicons",
228
+ text: "Unicons"
229
+ },{
230
+ value: "clarity-icons",
231
+ text: "Clarity icons"
232
+ },{
233
+ value: "jam-icons",
234
+ text: "Jam icons"
235
+ },{
236
+ value: "ant-design-icons",
237
+ text: "Ant design icons"
238
+ },{
239
+ value: "themify",
240
+ text: "Themify"
241
+ },{
242
+ value: "css.gg",
243
+ text: "Css.gg"
244
+ },{
245
+ value: "olicons",
246
+ text: "Olicons"
247
+ },{
248
+ value: "open-iconic",
249
+ text: "Open iconic"
250
+ },{
251
+ value: "boxicons",
252
+ text: "Box icons"
253
+ },{
254
+ value: "elegant-font",
255
+ text: "Elegant font"
256
+ },{
257
+ value: "dripicons",
258
+ text: "Dripicons"
259
+ },{
260
+ value: "feather",
261
+ text: "Feather"
262
+ },{
263
+ value: "coreui-icons",
264
+ text: "Coreui icons"
265
+ },{
266
+ value: "heroicons",
267
+ text: "Heroicons"
268
+ },{
269
+ value: "iconoir",
270
+ text: "Iconoir"
271
+ },{
272
+ value: "iconsax",
273
+ text: "Iconsax"
274
+ },{
275
+ value: "ikonate",
276
+ text: "Ikonate"
277
+ },{
278
+ value: "tabler-icons",
279
+ text: "Tabler icons"
280
+ },{
281
+ value: "octicons",
282
+ text: "Octicons"
283
+ },{
284
+ value: "system-uicons",
285
+ text: "System-uicons"
286
+ },{
287
+ value: "font-awesome",
288
+ text: "FontAwesome"
289
+ },{
290
+ value: "pe-icon-7-stroke",
291
+ text: "Pixeden icon 7 stroke"
292
+ },{
293
+ value: "77_essential_icons",
294
+ text: "77 essential icons"
295
+ },{
296
+ value: "150-outlined-icons",
297
+ text: "150 outlined icons"
298
+ },{
299
+ value: "material-design",
300
+ text: "Material Design"
301
+ }]
302
+ },
303
+ },{
304
+ name: "Width",
305
+ key: "width",
306
+ htmlAttr: "width",
307
+ inputtype: RangeInput,
308
+ data:{
309
+ max: 640,
310
+ min:6,
311
+ step:1
312
+ }
313
+ },{
314
+ name: "Height",
315
+ key: "height",
316
+ htmlAttr: "height",
317
+ inputtype: RangeInput,
318
+ data:{
319
+ max: 640,
320
+ min:6,
321
+ step:1
322
+ }
323
+ },{
324
+ name: "Stroke width",
325
+ key: "stroke-width",
326
+ htmlAttr: "stroke-width",
327
+ inputtype: RangeInput,
328
+ data:{
329
+ max: 512,
330
+ min:1,
331
+ step:1
332
+ }
333
+ },{
334
+ key: "svg_style_header",
335
+ inputtype: SectionInput,
336
+ name:false,
337
+ //sort: base_sort++,
338
+ section: style_section,
339
+ data: {header:"Svg colors"},
340
+ },{
341
+ name: "Fill Color",
342
+ key: "fill",
343
+ //sort: base_sort++,
344
+ col:4,
345
+ inline:true,
346
+ section: style_section,
347
+ htmlAttr: "fill",
348
+ inputtype: ColorInput,
349
+ },{
350
+ name: "Color",
351
+ key: "color",
352
+ //sort: base_sort++,
353
+ col:4,
354
+ inline:true,
355
+ section: style_section,
356
+ htmlAttr: "color",
357
+ inputtype: ColorInput,
358
+ },{
359
+ name: "Stroke",
360
+ key: "Stroke",
361
+ //sort: base_sort++,
362
+ col:4,
363
+ inline:true,
364
+ section: style_section,
365
+ htmlAttr: "stroke",
366
+ inputtype: ColorInput,
367
+ }]
368
+ });
369
+
370
+
371
+ Vvveb.Components.add("elements/svg-element", {
372
+ nodes: ["path", "line", "polyline", "polygon", "rect", "circle", "ellipse", "g"],
373
+ name: "Svg element",
374
+ image: "icons/star.svg",
375
+ html: ``,
376
+ properties: [{
377
+ name: "Fill Color",
378
+ key: "fill",
379
+ //sort: base_sort++,
380
+ col:4,
381
+ inline:true,
382
+ section: style_section,
383
+ htmlAttr: "fill",
384
+ inputtype: ColorInput,
385
+ },{
386
+ name: "Color",
387
+ key: "color",
388
+ //sort: base_sort++,
389
+ col:4,
390
+ inline:true,
391
+ section: style_section,
392
+ htmlAttr: "color",
393
+ inputtype: ColorInput,
394
+ },{
395
+ name: "Stroke",
396
+ key: "Stroke",
397
+ //sort: base_sort++,
398
+ col:4,
399
+ inline:true,
400
+ section: style_section,
401
+ htmlAttr: "color",
402
+ inputtype: ColorInput,
403
+ },{
404
+ name: "Stroke width",
405
+ key: "stroke-width",
406
+ htmlAttr: "stroke-width",
407
+ inputtype: RangeInput,
408
+ data:{
409
+ max: 512,
410
+ min:1,
411
+ step:1
412
+ }
413
+ }]
414
+ });
415
+
416
+ //Gallery
417
+ Vvveb.Components.add("elements/gallery", {
418
+ attributes: ["data-component-gallery"],
419
+ name: "Gallery",
420
+ image: "icons/images.svg",
421
+ html: `
422
+ <div class="gallery masonry has-shadow" data-component-gallery>
423
+ <div class="item">
424
+ <a>
425
+ <img src="../../media/posts/1.jpg">
426
+ </a>
427
+ </div>
428
+ <div class="item">
429
+ <a>
430
+ <img src="../../media/posts/2.jpg">
431
+ </a>
432
+ </div>
433
+ <div class="item">
434
+ <a>
435
+ <img src="../../media/posts/3.jpg">
436
+ </a>
437
+ </div>
438
+ <div class="item">
439
+ <a>
440
+ <img src="../../media/posts/4.jpg">
441
+ </a>
442
+ </div>
443
+ <div class="item">
444
+ <a>
445
+ <img src="../../media/posts/5.jpg">
446
+ </a>
447
+ </div>
448
+ <div class="item">
449
+ <a>
450
+ <img src="../../media/posts/6.jpg">
451
+ </a>
452
+ </div>
453
+ <div class="item">
454
+ <a>
455
+ <img src="../../media/posts/7.jpg">
456
+ </a>
457
+ </div>
458
+ </div>
459
+ `,
460
+ properties: [{
461
+ name: "Masonry layout",
462
+ key: "masonry",
463
+ htmlAttr: "class",
464
+ validValues: ["masonry", "flex"],
465
+ inputtype: ToggleInput,
466
+ data: {
467
+ on: "masonry",
468
+ off: "flex"
469
+ },
470
+ setGroup: group => {
471
+ document.querySelectorAll(".mb-3[data-group]").forEach(el => el.style.display = "none");
472
+ document.querySelector('.mb-3[data-group="'+ group + '"]').style.display = "";
473
+ },
474
+ onChange : function(node, value, input) {
475
+ this.setGroup(value);
476
+ return node;
477
+ },
478
+ init: function (node) {
479
+ if (node.classList.contains("masonry")) {
480
+ return "masonry";
481
+ } else {
482
+ return "flex";
483
+ }
484
+ },
485
+ },{
486
+ name: "Image shadow",
487
+ key: "shadow",
488
+ htmlAttr: "class",
489
+ validValues: [ "", "has-shadow"],
490
+ inputtype: ToggleInput,
491
+ data: {
492
+ on: "has-shadow",
493
+ off: ""
494
+ },
495
+ },{
496
+ name: "Horizontal gap",
497
+ key: "column-gap",
498
+ htmlAttr: "style",
499
+ inputtype: CssUnitInput,
500
+ data:{
501
+ max: 100,
502
+ min:0,
503
+ step:1
504
+ }
505
+ },{
506
+ name: "Vertical gap",
507
+ key: "margin-bottom",
508
+ htmlAttr: "style",
509
+ child: ".item",
510
+ inputtype: CssUnitInput,
511
+ data:{
512
+ max: 100,
513
+ min:0,
514
+ step:1
515
+ }
516
+ },{
517
+ name: "Images per row masonry",
518
+ key: "column-count",
519
+ group:"masonry",
520
+ htmlAttr: "style",
521
+ inputtype: RangeInput,
522
+ data:{
523
+ max: 12,
524
+ min:1,
525
+ step:1
526
+ }
527
+ },{
528
+ name: "Images per row flex",
529
+ group:"flex",
530
+ key: "flex-basis",
531
+ child: ".item",
532
+ htmlAttr: "style",
533
+ inputtype: RangeInput,
534
+ data:{
535
+ max: 12,
536
+ min:1,
537
+ step:1
538
+ },
539
+ onChange: function(node, value, input, component, inputElement) {
540
+ if (value) {
541
+ value = 100 / value;
542
+ value += "%";
543
+ }
544
+
545
+ return value;
546
+ }
547
+ },{
548
+ name: "",
549
+ key: "addChild",
550
+ inputtype: ButtonInput,
551
+ data: {text:"Add image", icon:"la la-plus"},
552
+ onChange: function(node) {
553
+ node.append(generateElements('<div class="item"><a><img src="../../media/posts/1.jpg"></a></div>')[0]);
554
+
555
+ //render component properties again to include the new image
556
+ //Vvveb.Components.render("ellements/gallery");
557
+
558
+ return node;
559
+ }
560
+ }],
561
+ init(node) {
562
+
563
+ document.querySelectorAll(".mb-3[data-group]").forEach(el => el.style.display = "none");
564
+
565
+ let source = "flex";
566
+ if (node.classList.contains("masonry")) {
567
+ source = "masonry";
568
+ } else {
569
+ source = "flex";
570
+ }
571
+
572
+ document.querySelector('.mb-3[data-group="'+ source + '"]').style.display = "";
573
+ }
574
+ });
575
+
576
+ //Tabs
577
+ Vvveb.Components.add("elements/tab", {
578
+ //attributes: ["data-component-tabs"],
579
+ classes: ["tab-pane"],
580
+ name: "Tab",
581
+ image: "icons/tabs.svg",
582
+ html: ``,
583
+ properties: [{
584
+ name: "Id",
585
+ key: "id",
586
+ htmlAttr: "id",
587
+ inline:false,
588
+ col:6,
589
+ inputtype: TextInput
590
+ },{
591
+ name: "Class",
592
+ key: "class",
593
+ htmlAttr: "class",
594
+ inline:false,
595
+ col:6,
596
+ inputtype: TextInput
597
+
598
+ } , {
599
+ name: "Active",
600
+ key: "active",
601
+ htmlAttr: "class",
602
+ validValues: ["", "active"],
603
+ inputtype: ToggleInput,
604
+ inline:true,
605
+ col:6,
606
+ data: {
607
+ on: "active",
608
+ off: ""
609
+ }
610
+ }]
611
+ });
612
+
613
+ Vvveb.Components.add("elements/tabs", {
614
+ attributes: ["data-component-tabs"],
615
+ name: "Tabs",
616
+ image: "icons/tabs.svg",
617
+ html: `
618
+ <div data-component-tabs id="tabs-parentId">
619
+ <nav>
620
+ <div class="nav nav-tabs" role="tablist">
621
+ <button class="nav-link active" id="nav-tab-parentId-1" data-bs-toggle="tab" data-bs-target="#nav-parentId-1" type="button" role="tab" aria-controls="nav-1" aria-selected="true">Home</button>
622
+ <button class="nav-link" id="nav-tab-parentId-2" data-bs-toggle="tab" data-bs-target="#nav-parentId-2" type="button" role="tab" aria-controls="nav-2" aria-selected="false">Profile</button>
623
+ <button class="nav-link" id="nav-tab-parentId-3" data-bs-toggle="tab" data-bs-target="#nav-parentId-3" type="button" role="tab" aria-controls="nav-3" aria-selected="false">Contact</button> </div>
624
+ </nav>
625
+ <div class="tab-content">
626
+ <div class="tab-pane p-4 show active" id="nav-parentId-1" role="tabpanel" aria-labelledby="nav-tab-1" tabindex="0">
627
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis perferendis rem accusantium ducimus animi nesciunt expedita omnis aut quas molestias!</p>
628
+ </div>
629
+ <div class="tab-pane p-4" id="nav-parentId-2" role="tabpanel" aria-labelledby="nav-tab-2" tabindex="0">
630
+ <p>Mauris viverra cursus ante laoreet eleifend. Donec vel fringilla ante. Aenean finibus velit id urna vehicula, nec maximus est sollicitudin</p>
631
+ </div>
632
+ <div class="tab-pane p-4" id="nav-parentId-3" role="tabpanel" aria-labelledby="nav-tab-3" tabindex="0">
633
+ <p>Quisque sagittis non ex eget vestibulum</p>
634
+ </div>
635
+ </div>
636
+ </div>`,
637
+ afterDrop: function(node) {
638
+ //set unique accordion parent id, this is a bootstrap accordion limitation
639
+ let parentId = Math.ceil(Math.random() * 1000);
640
+ node.id = 'tabs-' + parentId;
641
+ node.innerHTML = node.innerHTML.replaceAll('parentId', parentId);
642
+
643
+ return node;
644
+ },
645
+ properties: [{
646
+ //name: "List",
647
+ key: "list",
648
+ component: "elements/tab",
649
+ children :[{
650
+ component: "elements/tab",
651
+ name: "html/gridcolumn",
652
+ classesRegex: ["col-"],
653
+ }],
654
+ inline:false,
655
+ inputtype: ListInput,
656
+ data: {
657
+ selector:"> .nav-link",
658
+ container:"nav > .nav-tabs",
659
+ prefix:"Tab ",
660
+ name: "text",
661
+ removeElement: false,//handle manually to delete pane also
662
+ //"newElement": ``
663
+ },
664
+ onChange: function(node, value, input, component, event) {
665
+ let element = node;
666
+ let tabsId = element.id.replace('tabs-','');
667
+
668
+ let nav = node.querySelector("nav .nav-tabs");
669
+ let content = node.querySelector(".tab-content");
670
+
671
+ if (event.action) {
672
+ if (event.action == "add") {
673
+ let random = Math.floor(Math.random() * 100) + 1;
674
+ let index = nav.childElementCount + 1;
675
+
676
+ nav.append(generateElements(`<button class="nav-link" id="nav-tab-${tabsId}-${index}-${random}" data-bs-toggle="tab" data-bs-target="#tab-${tabsId}-${index}-${random}" type="button" role="tab" aria-controls="tab-${index}-${random}" aria-selected="false">Tab ${index}</button>`)[0]);
677
+
678
+ content.append(generateElements(`<div class="tab-pane p-4" id="tab-${tabsId}-${index}-${random}" role="tabpanel" aria-labelledby="tab-${tabsId}-${index}-${random}" tabindex="0"><p>Never think of results, just do!</p></div>`)[0]);
679
+
680
+ //temporary solution to better update list
681
+ Vvveb.Components.render("elements/tabs");
682
+ }
683
+
684
+ let index = event.index + 1;
685
+ if (event.action == "remove") {
686
+ nav.querySelector("button:nth-child(" + index + ")").remove();
687
+ content.querySelector(".tab-pane:nth-child(" + index + ")").remove();
688
+ } else if (event.action == "select") {
689
+ let tab = nav.querySelector("button:nth-child(" + index + ")");
690
+ Vvveb.Builder.iframe.contentWindow.bootstrap.Tab.getOrCreateInstance(tab).show();
691
+ }
692
+ }
693
+
694
+ return node;
695
+ },
696
+ }
697
+ ]
698
+ });
699
+
700
+
701
+ //Accordion
702
+ Vvveb.Components.add("elements/accordion", {
703
+ classes: ["accordion"],
704
+ name: "Accordeon",
705
+ image: "icons/accordion.svg",
706
+ html: `<div class="accordion" id="accordion-parentId">
707
+ <div class="accordion-item">
708
+ <h2 class="accordion-header" id="headingOne-parentId">
709
+ <button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne-parentId" aria-expanded="true" aria-controls="collapseOne-parentId">
710
+ Accordion Item #1
711
+ </button>
712
+ </h2>
713
+ <div id="collapseOne-parentId" class="accordion-collapse collapse show" aria-labelledby="headingOne-parentId" data-bs-parent="#accordion-parentId">
714
+ <div class="accordion-body">
715
+ <p>Mauris viverra cursus ante laoreet eleifend. Donec vel fringilla ante. Aenean finibus velit id urna vehicula, nec maximus est sollicitudin</p>
716
+ </div>
717
+ </div>
718
+ </div>
719
+ <div class="accordion-item">
720
+ <h2 class="accordion-header" id="headingTwo-parentId">
721
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo-parentId" aria-expanded="false" aria-controls="collapseTwo">
722
+ Accordion Item #2
723
+ </button>
724
+ </h2>
725
+ <div id="collapseTwo-parentId" class="accordion-collapse collapse" aria-labelledby="headingTwo-parentId" data-bs-parent="#accordion-parentId">
726
+ <div class="accordion-body">
727
+ <p>Mauris viverra cursus ante laoreet eleifend. Donec vel fringilla ante. Aenean finibus velit id urna vehicula, nec maximus est sollicitudin</p>
728
+ </div>
729
+ </div>
730
+ </div>
731
+ <div class="accordion-item">
732
+ <h2 class="accordion-header" id="headingThree-parentId">
733
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree-parentId" aria-expanded="false" aria-controls="collapseThree">
734
+ Accordion Item #3
735
+ </button>
736
+ </h2>
737
+ <div id="collapseThree-parentId" class="accordion-collapse collapse" aria-labelledby="headingThree-parentId" data-bs-parent="#accordion-parentId">
738
+ <div class="accordion-body">
739
+ <p>Mauris viverra cursus ante laoreet eleifend. Donec vel fringilla ante. Aenean finibus velit id urna vehicula, nec maximus est sollicitudin</p>
740
+ </div>
741
+ </div>
742
+ </div>
743
+ </div>`,
744
+ afterDrop: function(node) {
745
+ //set unique accordion id
746
+ let parentId = Math.ceil(Math.random() * 1000);
747
+ //node.outerHTML = node.outerHTML.replaceAll('parentId', parentId);
748
+ node.id = 'accordion-' + parentId;
749
+ node.innerHTML = node.innerHTML.replaceAll('parentId', parentId);
750
+
751
+ return node;
752
+ },
753
+ properties: [{
754
+ //name: "List",
755
+ key: "list",
756
+ component: "elements/tab",
757
+ inline:false,
758
+ inputtype: ListInput,
759
+ data: {
760
+ selector:":scope > .accordion-item",
761
+ container:"",
762
+ prefix:"Item ",
763
+ name: "text",
764
+ nameElement: ".accordion-button",
765
+ removeElement: false,//handle manually
766
+ //"newElement": ``
767
+ },
768
+ onChange: function(node, value, input, component, event) {
769
+ let element = node;
770
+ let accordionId = element.id.replace('accordion-','');
771
+
772
+ if (event.action) {
773
+ if (event.action == "add") {
774
+ let random = Math.floor(Math.random() * 100) + 1;
775
+ let index = element.childElementCount + 1;
776
+
777
+ node.append(generateElements(`<div class="accordion-item">
778
+ <h2 class="accordion-header" id="heading-${index}-${random}">
779
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-${index}-${random}" aria-expanded="false" aria-controls="collapseTwo">Accordion Item #${index}</button>
780
+ </h2>
781
+ <div id="collapse-${index}-${random}" class="accordion-collapse collapse" aria-labelledby="heading-${index}-${random}" data-bs-parent="#accordion-${accordionId}">
782
+ <div class="accordion-body">
783
+ <p>Begin with the possible; begin with one step.</p>
784
+ </div>
785
+ </div>
786
+ </div>`)[0]);
787
+
788
+ //temporary solution to better update list
789
+ Vvveb.Components.render("elements/accordion");
790
+ }
791
+
792
+ let index = (event.index + 1);
793
+ if (event.action == "remove") {
794
+ node.querySelector(":scope > .accordion-item:nth-child(" + index + ")").remove();
795
+ } else if (event.action == "select") {
796
+ let el = node.querySelector(":scope > .accordion-item:nth-child(" + index + ")");
797
+ let btn= el.querySelector(".accordion-button");
798
+ let collapse = el.querySelector(" .collapse");
799
+
800
+ node.querySelectorAll(":scope > .accordion-item .collapse").forEach(e => e.classList.remove("show"));
801
+ node.querySelectorAll(":scope > .accordion-item .accordion-button").forEach(btn => btn.classList.add("collapsed"));
802
+ collapse.classList.add("show");
803
+ btn.classList.remove("collapsed");
804
+ //el[0].click();
805
+ //Vvveb.Builder.iframe.contentWindow.bootstrap.Collapse.getOrCreateInstance(el[0]).toggle();
806
+ }
807
+ }
808
+
809
+ return node;
810
+ },
811
+ },{
812
+ name: "Flush",
813
+ key: "flush",
814
+ htmlAttr: "class",
815
+ validValues: ["accordion-flush"],
816
+ inputtype: ToggleInput,
817
+ data: {
818
+ on: "accordion-flush",
819
+ off: ""
820
+ }
821
+ },
822
+ ]
823
+ });
824
+
825
+ Vvveb.Components.add("elements/flip-box", {
826
+ classes: ["flip-box"],
827
+ name: "Flip box",
828
+ image: "icons/flipbox.svg",
829
+ html: `<div class="flip-box enabled">
830
+ <div class="flip-box-inner">
831
+ <div class="flip-box-front">
832
+ <div class="card">
833
+ <img src="../../media/posts/1.jpg" class="card-img-top" alt="Post">
834
+ <div class="card-body">
835
+ <h5 class="card-title">Card title</h5>
836
+ <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
837
+ <a href="#" class="btn btn-primary">Go somewhere</a>
838
+ </div>
839
+ </div>
840
+ </div>
841
+
842
+ <div class="flip-box-back">
843
+ <div class="d-flex align-items-center flex-column">
844
+ <div class="flex-shrink-0">
845
+ <img src="../../media/posts/2.jpg" alt="Post">
846
+ </div>
847
+ <div class="flex-grow-1 ms-3">
848
+ <p>
849
+ This is some content from a media component. You can replace this with any content and adjust it as needed.
850
+ </p>
851
+
852
+ <a href="#" class="btn btn-primary">Go somewhere</a>
853
+ </div>
854
+ </div>
855
+ </div>
856
+ </div>
857
+ </div>`,
858
+ properties: [{
859
+ name: "Width",
860
+ key: "width",
861
+ htmlAttr: "style",
862
+ inputtype: CssUnitInput
863
+ },{
864
+ name: "Height",
865
+ key: "height",
866
+ htmlAttr: "style",
867
+ inputtype: CssUnitInput
868
+ },{
869
+ name: "Enabled",
870
+ key: "enabled",
871
+ htmlAttr: "class",
872
+ validValues: ["enabled"],
873
+ inputtype: ToggleInput,
874
+ data: {
875
+ on: "enabled",
876
+ off: ""
877
+ }
878
+ },{
879
+ name: "Show back",
880
+ key: "back",
881
+ htmlAttr: "class",
882
+ validValues: ["back"],
883
+ inputtype: ToggleInput,
884
+ data: {
885
+ on: "back",
886
+ off: ""
887
+ }
888
+ },
889
+ {
890
+ name: "Vertical",
891
+ key: "vertical",
892
+ htmlAttr: "class",
893
+ validValues: ["vertical"],
894
+ inputtype: ToggleInput,
895
+ data: {
896
+ on: "vertical",
897
+ off: ""
898
+ }
899
+ },
900
+ ]
901
+ });
902
+
903
+ Vvveb.Components.add("elements/counter", {
904
+ nodes: [".counter"],
905
+ name: "Counter",
906
+ image: "icons/stopwatch.svg",
907
+ html: `<i class="font-icon la la-star"></i>`,
908
+ properties: [
909
+ ]
910
+ });
911
+
912
+ Vvveb.Components.add("elements/testimonial", {
913
+ nodes: [".counter"],
914
+ name: "Testimonial",
915
+ image: "icons/testimonial.svg",
916
+ html: `<blockquote cite="https://en.wikipedia.org/wiki/Marcus_Aurelius">
917
+ <p>Today I shall be meeting with interference, ingratitude, insolence, disloyalty, ill-will, and selfishness all of them due to the offenders' ignorance of what is good or evil.</p>
918
+ <cite class="small">
919
+ <a href="https://en.wikipedia.org/wiki/Marcus_Aurelius" class="text-decoration-none" target="blank">Marcus Aurelius</a>
920
+ </cite>
921
+ </blockquote>`,
922
+ properties: [
923
+ ]
924
+ });
925
+
926
+ Vvveb.Components.add("elements/social-icons", {
927
+ classes: ["social-icons"],
928
+ name: "Social icons",
929
+ image: "icons/social-icons.svg",
930
+ html: `<ul class="social-icons list-unstyled">
931
+ <li>
932
+ <a href="https://facebook.com">
933
+ <i class="lab la-facebook-f la-2x"></i> <span>Facebook</span>
934
+ </a>
935
+ </li>
936
+ <li>
937
+ <a href="https://linkedin.com">
938
+ <i class="lab la-linkedin-in la-2x"></i> <span>Linkedin</span>
939
+ </a>
940
+ </li>
941
+ <li>
942
+ <a href="https://twitter.com">
943
+ <i class="lab la-twitter la-2x"></i> <span>Twitter</span>
944
+ </a>
945
+ </li>
946
+ <li>
947
+ <a href="https://instagram.com">
948
+ <i class="lab la-instagram la-2x"></i> <span>Instagram</span>
949
+ </a>
950
+ </li>
951
+ <li>
952
+ <a href="https://github.com">
953
+ <i class="lab la-github la-2x"></i> <span>Github</span>
954
+ </a>
955
+ </li>
956
+ </ul>`,
957
+ properties: [{
958
+ //name: "List",
959
+ key: "list",
960
+ //component: "elements/tab",
961
+ inline:false,
962
+ inputtype: ListInput,
963
+ data: {
964
+ selector:"> li",
965
+ container:"",
966
+ prefix:"Item ",
967
+ name: "text",
968
+ nameElement: "span",
969
+ removeElement: true,
970
+ //"newElement": ``
971
+ },
972
+ onChange: function(node, value, input, component, event) {
973
+ let element = node;
974
+
975
+ if (event.action) {
976
+ if (event.action == "add") {
977
+ node.append(generateElements(`<li>
978
+ <a href="https://twitter.com">
979
+ <i class="lab la-twitter la-2x"></i> <span>Twitter</span>
980
+ </a>
981
+ </li>`)[0]);
982
+
983
+ //temporary solution to better update list
984
+ Vvveb.Components.render("elements/social-icons");
985
+ }
986
+ if (event.action == "remove") {
987
+ node.querySelector(":scope > li:nth-child(" + event.index + ")").remove();
988
+ } else if (event.action == "select") {
989
+ let el = node.querySelector(":scope > li:nth-child(" + event.index + ")");
990
+ //el[0].click();
991
+ //Vvveb.Builder.iframe.contentWindow.bootstrap.Collapse.getOrCreateInstance(el[0]).toggle();
992
+ }
993
+ }
994
+
995
+ return node;
996
+ },
997
+ },{
998
+ name: "Inline",
999
+ key: "list-inline",
1000
+ htmlAttr: "class",
1001
+ validValues: ["list-inline"],
1002
+ inputtype: ToggleInput,
1003
+ data: {
1004
+ on: "list-inline",
1005
+ off: ""
1006
+ }
1007
+ },{
1008
+ name: "Unstyled",
1009
+ key: "list-unstyled",
1010
+ htmlAttr: "class",
1011
+ validValues: ["list-unstyled"],
1012
+ inputtype: ToggleInput,
1013
+ data: {
1014
+ on: "list-unstyled",
1015
+ off: ""
1016
+ }
1017
+ }]
1018
+ });
1019
+
1020
+ function carouselAfterDrop(node) {
1021
+ //check if swiper js is included and if not add it when drag starts to allow the script to load
1022
+ body = Vvveb.Builder.frameBody;
1023
+
1024
+ if (!body.querySelector("#swiper-js")) {
1025
+ let link = document.createElement('link');
1026
+ let lib = document.createElement('script');
1027
+ let code = document.createElement('script');
1028
+ link.href = '../../libs/swiper/swiper-bundle.min.css';
1029
+ link.id = 'swiper-css';
1030
+ link.rel = 'stylesheet';
1031
+ lib.id = 'swiper-js';
1032
+ lib.type = 'text/javascript';
1033
+ lib.src = '../../libs/swiper/swiper-bundle.min.js';
1034
+ code.type = 'text/javascript';
1035
+ code.text = `
1036
+ let swiper = [];
1037
+ function initSwiper(onlyNew = false) {
1038
+ if (typeof Swiper == "undefined") return;
1039
+ let list = document.querySelectorAll('.swiper' + (onlyNew ? ":not(.swiper-initialized)" : "") );
1040
+ list.forEach(el => {
1041
+ let params = {
1042
+ navigation: {
1043
+ nextEl: ".swiper-button-next",
1044
+ prevEl: ".swiper-button-prev",
1045
+ },
1046
+ pagination: {
1047
+ el: ".swiper-pagination",
1048
+ },
1049
+ };
1050
+ for (i in el.dataset) {
1051
+ let param = el.dataset[i];
1052
+ if (param[0] = '{') {
1053
+ param = JSON.parse(param);
1054
+ }
1055
+ params[i] = param;
1056
+ }
1057
+ swiper.push(new Swiper(el, params))
1058
+ //swiper.push(new Swiper(el, { ...{autoplay:{delay: 500}}, ...el.dataset}))
1059
+ });
1060
+ }
1061
+
1062
+ if (document.readyState !== 'loading') {
1063
+ initSwiper();
1064
+ } else {
1065
+ document.addEventListener('DOMContentLoaded', initSwiper);
1066
+ }`;
1067
+
1068
+ body.appendChild(link);
1069
+ body.appendChild(lib);
1070
+ body.appendChild(code);
1071
+
1072
+ lib.addEventListener('load', function() {
1073
+ Vvveb.Builder.iframe.contentWindow.initSwiper();
1074
+ });
1075
+ } else {
1076
+ Vvveb.Builder.iframe.contentWindow.initSwiper(true);
1077
+ }
1078
+
1079
+ return node;
1080
+ };
1081
+
1082
+ Vvveb.Components.add("elements/carousel", {
1083
+ name: "Carousel",
1084
+ image: "icons/carousel.svg",
1085
+ classes: ["swiper"],
1086
+ html: `
1087
+ <div class="swiper" data-slides-per-view="3" data-draggable="true">
1088
+ <div class="swiper-wrapper">
1089
+ <div class="swiper-slide"><img src="/media/4.jpg" class="img-fluid"><p>Slide 1</p></div>
1090
+ <div class="swiper-slide"><img src="/media/2.jpg" class="img-fluid"><p>Slide 2</p></div>
1091
+ <div class="swiper-slide"><img src="/media/5.jpg" class="img-fluid"><p>Slide 3</p></div>
1092
+ <div class="swiper-slide"><img src="/media/7.jpg" class="img-fluid"><p>Slide 4</p></div>
1093
+ </div>
1094
+ <div class="swiper-pagination"></div>
1095
+
1096
+ <!--
1097
+ <div class="swiper-button-prev"></div>
1098
+ <div class="swiper-button-next"></div>
1099
+ -->
1100
+
1101
+ <!-- <div class="swiper-scrollbar"></div> -->
1102
+ </div>
1103
+ `,
1104
+ afterDrop: carouselAfterDrop,
1105
+
1106
+ onChange: function (node, property, value) {
1107
+ let element = node;
1108
+ if (property.key == "autoplay" && value == true) {
1109
+ value = {"waitForTransition":true,"enabled":value,"delay":element.dataset.delay};
1110
+ }
1111
+
1112
+ element.swiper.params[property.key] = value;
1113
+ element.swiper.originalParams[property.key] = value;
1114
+ element.swiper.update();
1115
+ return node;
1116
+ },
1117
+
1118
+ properties: [{
1119
+ name: "Slides",
1120
+ key: "slidesPerView",
1121
+ inputtype: ListInput,
1122
+ htmlAttr:"data-slides-per-view",
1123
+ inline:true,
1124
+ data: {
1125
+ selector:".swiper-slide",
1126
+ container:".swiper-wrapper",
1127
+ prefix:"Slide ",
1128
+ removeElement: false,//handle manually with removeSlide
1129
+ //"newElement": `<div class="swiper-slide"><img src="../../media/posts/1.jpg" class="img-fluid"><p>Slide 1</p></div>`
1130
+ },
1131
+ onChange: function(node, value, input, component, event) {
1132
+ let element = node;
1133
+ let dataset = {};
1134
+ for (i in element.dataset) {
1135
+ dataset[i] = element.dataset[i];
1136
+ };
1137
+
1138
+ if (event.action) {
1139
+ if (event.action == "add") {
1140
+ let random = Math.floor(Math.random() * 6) + 1;
1141
+ let index = element.swiper.slides.length + 1;
1142
+ element.swiper.appendSlide(generateElements(`<div class="swiper-slide"><img src="../../media/posts/${random}.jpg" class="img-fluid"><p>Slide ${index}</p></div>`)[0]);
1143
+ element.swiper.slideTo(index);
1144
+ //temporary solution to better update list
1145
+ Vvveb.Components.render("elements/carousel");
1146
+ }
1147
+ if (event.action == "remove") {
1148
+ element.swiper.removeSlide(event.index);
1149
+ } else if (event.action == "select") {
1150
+ element.swiper.slideTo(event.index, 300, true);
1151
+ }
1152
+ }
1153
+
1154
+ setTimeout(function () {
1155
+ for (i in dataset) {
1156
+ element.swiper.params[i] = dataset[i];
1157
+ element.dataset[i] = dataset[i];
1158
+ };
1159
+ element.swiper.update();
1160
+ }, 1000);
1161
+
1162
+ return node;
1163
+ },
1164
+ },{
1165
+ name: "Slides per view",
1166
+ key: "slidesPerView",
1167
+ inputtype: NumberInput,
1168
+ htmlAttr:"data-slides-per-view",
1169
+ },{
1170
+ name: "Space between",
1171
+ key: "spaceBetween",
1172
+ inputtype: NumberInput,
1173
+ htmlAttr:"data-space-between",
1174
+ },{
1175
+ name: "Speed",
1176
+ key: "speed",
1177
+ inputtype: NumberInput,
1178
+ htmlAttr:"data-speed",
1179
+ data: {step:100},
1180
+ },{
1181
+ name: "Delay",
1182
+ key: "delay",
1183
+ inputtype: NumberInput,
1184
+ htmlAttr:"data-delay",
1185
+ data: {step:100},
1186
+ },{
1187
+ key: "carousel_options",
1188
+ inputtype: SectionInput,
1189
+ name:false,
1190
+ data: {header:"Options"},
1191
+ },{
1192
+ name: "Simulate touch",
1193
+ key: "simulateTouch",
1194
+ htmlAttr:"data-simulate-touch",
1195
+ inputtype: CheckboxInput,
1196
+ inline:true,
1197
+ col:4
1198
+ },{
1199
+ name: "Autoplay",
1200
+ key: "autoplay",
1201
+ htmlAttr:"data-autoplay",
1202
+ inputtype: CheckboxInput,
1203
+ inline:true,
1204
+ col:4
1205
+ },{
1206
+ name: "Auto height",
1207
+ key: "autoHeight",
1208
+ htmlAttr:"data-auto-height",
1209
+ inputtype: CheckboxInput,
1210
+ inline:true,
1211
+ col:4
1212
+ },{
1213
+ name: "Centered slides",
1214
+ key: "centeredSlides",
1215
+ htmlAttr:"data-centered-slides",
1216
+ inputtype: CheckboxInput,
1217
+ inline:true,
1218
+ col:4
1219
+ },{ name: "Center insufficient",
1220
+ key: "centerInsufficientSlides",
1221
+ htmlAttr:"data-center-insufficient-slides",
1222
+ inputtype: CheckboxInput,
1223
+ inline:true,
1224
+ col:4
1225
+ },{ name: "Loop",
1226
+ key: "loop",
1227
+ htmlAttr:"data-loop",
1228
+ inputtype: CheckboxInput,
1229
+ inline:true,
1230
+ col:4
1231
+ },{ name: "Mouse wheel",
1232
+ key: "mousewheel",
1233
+ htmlAttr:"data-mousewheel",
1234
+ inputtype: CheckboxInput,
1235
+ inline:true,
1236
+ col:4
1237
+ },{
1238
+ name: "Pagination",
1239
+ key: "pagination",
1240
+ htmlAttr:"data-pagination",
1241
+ inputtype: CheckboxInput,
1242
+ inline:true,
1243
+ col:4
1244
+ },{ name: "Rewind",
1245
+ key: "rewind",
1246
+ htmlAttr:"data-rewind",
1247
+ inputtype: CheckboxInput,
1248
+ inline:true,
1249
+ col:4
1250
+ },{ name: "Scrollbar",
1251
+ key: "scrollbar",
1252
+ htmlAttr:"data-scrollbar",
1253
+ inputtype: CheckboxInput,
1254
+ inline:true,
1255
+ col:4
1256
+ },/*{
1257
+ name: "direction",
1258
+ key: "direction",
1259
+ htmlAttr:"data-direction",
1260
+ section: style_section,
1261
+ col:6,
1262
+ inline:false,
1263
+ inputtype: RadioButtonInput,
1264
+ data: {
1265
+ extraclass:"btn-group-sm btn-group-fullwidth",
1266
+ options: [{
1267
+ value: "horizontal",
1268
+ icon:"la la-arrow-down",
1269
+ title: "Horizontal",
1270
+ checked:true,
1271
+ },{
1272
+ value: "vertical",
1273
+ title: "Vertical",
1274
+ icon:"la la-arrow-right",
1275
+ checked:false,
1276
+ }],
1277
+ }
1278
+ }*/]
1279
+ });
1280
+
1281
+ //Slider
1282
+ Vvveb.Components.add("elements/slider", {
1283
+ name: "Slider",
1284
+ image: "icons/slider.svg",
1285
+ html: `
1286
+ <div class="swiper" data-slides-per-view="1" data-draggable="true" data-navigation='{"nextEl": ".swiper-button-next","prevEl": ".swiper-button-prev"}'>
1287
+ <div class="swiper-wrapper">
1288
+ <div class="swiper-slide"><img src="/media/posts/1.jpg" class="img-fluid"><p>Slider 1</p></div>
1289
+ <div class="swiper-slide"><img src="/media/posts/2.jpg" class="img-fluid"><p>Slider 2</p></div>
1290
+ <div class="swiper-slide"><img src="/media/posts/3.jpg" class="img-fluid"><p>Slider 3</p></div>
1291
+ <div class="swiper-slide"><img src="/media/posts/4.jpg" class="img-fluid"><p>Slider 4</p></div>
1292
+ </div>
1293
+ <div class="swiper-pagination"></div>
1294
+
1295
+ <div class="swiper-button-prev"></div>
1296
+ <div class="swiper-button-next"></div>
1297
+
1298
+ <!-- <div class="swiper-scrollbar"></div> -->
1299
+ </div>
1300
+ `,
1301
+ afterDrop: carouselAfterDrop,
1302
+ });
1303
+
1304
+
1305
+ Vvveb.Components.add("elements/icon-list", {
1306
+ nodes: [".counter"],
1307
+ name: "Icon list",
1308
+ image: "icons/icon-list.svg",
1309
+ html: `<i class="font-icon la la-star"></i>`,
1310
+ properties: [
1311
+ ]
1312
+ });
1313
+
1314
+ Vvveb.Components.add("elements/divider", {
1315
+ nodes: [".counter"],
1316
+ name: "Divider",
1317
+ image: "icons/stopwatch.svg",
1318
+ html: `<i class="font-icon la la-star"></i>`,
1319
+ properties: [
1320
+ ]
1321
+ });
1322
+
1323
+ Vvveb.Components.add("elements/separator", {
1324
+ nodes: [".counter"],
1325
+ name: "Separator",
1326
+ image: "icons/separator.svg",
1327
+ html: `<i class="font-icon la la-star"></i>`,
1328
+ properties: [
1329
+ ]
1330
+ });
1331
+
1332
+ Vvveb.Components.add("elements/Image box", {
1333
+ nodes: [".counter"],
1334
+ name: "Image Box",
1335
+ image: "icons/stopwatch.svg",
1336
+ html: `<i class="font-icon la la-star"></i>`,
1337
+ properties: [
1338
+ ]
1339
+ });
1340
+
1341
+ Vvveb.Components.add("elements/Icon box", {
1342
+ nodes: [".counter"],
1343
+ name: "Image Box",
1344
+ image: "icons/stopwatch.svg",
1345
+ html: `<i class="font-icon la la-star"></i>`,
1346
+ properties: [
1347
+ ]
1348
+ });
1349
+
1350
+ Vvveb.Components.add("elements/animated-headline", {
1351
+ nodes: [".counter"],
1352
+ name: "Animated headline",
1353
+ image: "icons/dots_three.svg",
1354
+ html: `<i class="font-icon la la-star"></i>`,
1355
+ properties: [
1356
+ ]
1357
+ });
1358
+
1359
+ Vvveb.Components.add("elements/price-table", {
1360
+ nodes: [".counter"],
1361
+ name: "Price table",
1362
+ image: "icons/price-table.svg",
1363
+ html: `<i class="font-icon la la-star"></i>`,
1364
+ properties: [
1365
+ ]
1366
+ });
1367
+
1368
+ Vvveb.Components.add("elements/price-list", {
1369
+ nodes: [".counter"],
1370
+ name: "Price list",
1371
+ image: "icons/stopwatch.svg",
1372
+ html: `<i class="font-icon la la-star"></i>`,
1373
+ properties: [
1374
+ ]
1375
+ });
1376
+
1377
+ Vvveb.Components.add("elements/reviews", {
1378
+ nodes: [".counter"],
1379
+ name: "Reviews",
1380
+ image: "icons/reviews.svg",
1381
+ html: `<i class="font-icon la la-star"></i>`,
1382
+ properties: [
1383
+ ]
1384
+ });
1385
+
1386
+ Vvveb.Components.add("elements/code", {
1387
+ nodes: ["code"],
1388
+ name: "Code",
1389
+ image: "icons/code.svg",
1390
+ html: `<code>print "Hello world!"</code>`,
1391
+ properties: [{
1392
+ name: "Text",
1393
+ key: "text",
1394
+ inline:false,
1395
+ htmlAttr: "innerHTML",
1396
+ inputtype: TextareaInput,
1397
+ data:{
1398
+ rows:20,
1399
+ }
1400
+ }]
1401
+ });
1402
+
1403
+ Vvveb.Components.add("elements/image-compare", {
1404
+ nodes: [".counter"],
1405
+ name: "Image Compare",
1406
+ image: "icons/image-compare.svg",
1407
+ html: `<div class="c-compare" style="--value:50%;">
1408
+ <img class="c-compare__left" src="img/color.jpg" alt="" />
1409
+ <img class="c-compare__right" src="img/bw.jpg" alt="" />
1410
+ </div>`,
1411
+ properties: [
1412
+ ]
1413
+ });
1414
+
1415
+ Vvveb.Components.add("elements/rating", {
1416
+ nodes: [".rating"],
1417
+ name: "Rating stars",
1418
+ image: "icons/rating.svg",
1419
+ html: `<div class="rating">
1420
+ <i class="la la-star text-warning"></i>
1421
+ <i class="la la-star text-warning"></i>
1422
+ <i class="la la-star text-warning"></i>
1423
+ <i class="la la-star text-warning"></i>
1424
+ <i class="la la-star text-secondary"></i>
1425
+ </div>`,
1426
+ properties: [
1427
+ ]
1428
+ });
libs/builder/components-embeds.js ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright 2017 Ziadin Givan
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ https://github.com/givanz/VvvebJs
17
+ */
18
+
19
+
20
+ Vvveb.ComponentsGroup['Embeds'] = ["embeds/embed"];
21
+
22
+ Vvveb.Components.extend("_base", "embeds/embed", {
23
+ name: "Embed",
24
+ attributes: ["data-component-oembed"],
25
+ image: "icons/code.svg",
26
+ //dragHtml: '<img src="' + Vvveb.baseUrl + 'icons/maps.png">',
27
+ html: `<div data-component-oembed data-url="">
28
+ <div class="alert alert-light m-5" role="alert">
29
+ <img width="64" src="${Vvveb.baseUrl}icons/code.svg">
30
+ <h6>Enter url to embed</h6>
31
+ </div></div>`,
32
+
33
+
34
+ properties: [{
35
+ name: "Url",
36
+ key: "url",
37
+ htmlAttr: "data-url",
38
+ inputtype: TextInput,
39
+ onChange: function(node, value) {
40
+ node.innerHTML = `<div class="alert alert-light d-flex justify-content-center">
41
+ <div class="spinner-border m-5" role="status">
42
+ <span class="visually-hidden">Loading...</span>
43
+ </div>
44
+ </div>`;
45
+
46
+ getOembed(value).then(response => {
47
+ node.innerHTML = response.html;
48
+ let containerW = node.offsetWidth;
49
+ let iframe = node.querySelector("iframe");
50
+ if (iframe) {
51
+ let ratio = containerW / iframe.offsetWidth;
52
+ iframe.setAttribute("width", (width * ratio));
53
+ iframe.setAttribute("height", (height * ratio));
54
+ }
55
+
56
+ let arr = node.querySelectorAll('script').forEach(script => {
57
+ let newScript = Vvveb.Builder.frameDoc.createElement("script");
58
+ newScript.src = script.src;
59
+ script.replaceWith(newScript);
60
+ });
61
+
62
+ }).catch(error => console.log(error));
63
+
64
+ return node;
65
+ },
66
+ },{
67
+ name: "Width",
68
+ key: "width",
69
+ child:"iframe",
70
+ htmlAttr: "width",
71
+ inputtype: CssUnitInput
72
+ },{
73
+ name: "Height",
74
+ key: "height",
75
+ child:"iframe",
76
+ htmlAttr: "height",
77
+ inputtype: CssUnitInput
78
+ }]
79
+ });
80
+
81
+ for (const provider of ["youtube", "vimeo", "dailymotion", "flickr", "smugmug", "scribd", "twitter", "soundcloud", "slideshare", "spotify", "imgur", "issuu", "mixcloud", "ted", "animoto", "tumblr", "kickstarter", "reverbnation", "reddit", "speakerdeck", "screencast", "amazon", "someecards", "tiktok","pinterest", "wolfram", "anghami"]) {
82
+ Vvveb.Components.add("embeds/" + provider, {
83
+ name: provider,
84
+ image: "icons/code.svg",
85
+ html: `<div data-component-oembed data-url="">
86
+ <div class="alert alert-light m-5" role="alert">
87
+ <img width="64" src="${Vvveb.baseUrl}icons/code.svg">
88
+ <h6>Enter ${provider} url to embed</h6>
89
+ </div></div>`,
90
+ });
91
+ Vvveb.ComponentsGroup['Embeds'].push("embeds/" + provider);
92
+ }
libs/builder/components-html.js ADDED
@@ -0,0 +1,1459 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright 2017 Ziadin Givan
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ https://github.com/givanz/VvvebJs
17
+ */
18
+
19
+ Vvveb.ComponentsGroup['Base'] =
20
+ ["html/heading", "html/image", "html/hr", "html/form", "html/textinput", "html/textareainput", "html/selectinput"/*, "html/fileinput"*/, "html/checkbox", "html/radiobutton", "html/link", "html/button", "html/paragraph", "html/blockquote", "html/list", "html/table", "html/preformatted", "html/audio", "html/video","html/iframe"];
21
+
22
+ Vvveb.Components.extend("_base", "html/heading", {
23
+ image: "icons/heading.svg",
24
+ name: "Heading",
25
+ nodes: ["h1", "h2","h3", "h4","h5","h6"],
26
+ html: "<h1>Heading</h1>",
27
+
28
+ properties: [{
29
+ name: "Size",
30
+ key: "size",
31
+ inputtype: SelectInput,
32
+
33
+ onChange: function(node, value) {
34
+
35
+ return changeNodeName(node, "h" + value);
36
+ },
37
+
38
+ init: function(node) {
39
+ let regex;
40
+ regex = /H(\d)/.exec(node.nodeName);
41
+ if (regex && regex[1]) {
42
+ return regex[1]
43
+ }
44
+ return 1
45
+ },
46
+
47
+ data:{
48
+ options: [{
49
+ value: "1",
50
+ text: "Heading 1"
51
+ }, {
52
+ value: "2",
53
+ text: "Heading 2"
54
+ }, {
55
+ value: "3",
56
+ text: "Heading 3"
57
+ }, {
58
+ value: "4",
59
+ text: "Heading 4"
60
+ }, {
61
+ value: "5",
62
+ text: "Heading 5"
63
+ }, {
64
+ value: "6",
65
+ text: "Heading 6"
66
+ }]
67
+ },
68
+ }]
69
+ });
70
+
71
+
72
+ let linkComponentProperties = [
73
+ /* {
74
+ name: "Text",
75
+ key: "text",
76
+ sort:1,
77
+ htmlAttr: "innerText",
78
+ inputtype: TextInput
79
+ },*/
80
+ {
81
+ name: "Url",
82
+ key: "href",
83
+ sort:2,
84
+ htmlAttr: "href",
85
+ inputtype: LinkInput
86
+ },{
87
+ name: "Rel",
88
+ key: "rel",
89
+ sort:3,
90
+ htmlAttr: "rel",
91
+ inputtype: LinkInput
92
+ }, {
93
+ name: "Target",
94
+ key: "target",
95
+ sort:4,
96
+ htmlAttr: "target",
97
+ inputtype: SelectInput,
98
+ data:{
99
+ options: [{
100
+ value: "",
101
+ text: ""
102
+ }, {
103
+ value: "_blank",
104
+ text: "Blank"
105
+ }, {
106
+ value: "_parent",
107
+ text: "Parent"
108
+ }, {
109
+ value: "_self",
110
+ text: "Self"
111
+ }, {
112
+ value: "_top",
113
+ text: "Top"
114
+ }]
115
+ },
116
+ }, {
117
+ name: "Download",
118
+ sort:5,
119
+ key: "download",
120
+ htmlAttr: "download",
121
+ inputtype: CheckboxInput,
122
+ }];
123
+
124
+ Vvveb.Components.extend("_base", "html/link", {
125
+ nodes: ["a"],
126
+ name: "Link",
127
+ html: '<a href="#" rel="noopener">Link Text</a>',
128
+ image: "icons/link.svg",
129
+ properties: linkComponentProperties
130
+ });
131
+
132
+ Vvveb.Components.extend("_base", "html/image", {
133
+ nodes: ["img"],
134
+ name: "Image",
135
+ html: '<img src="' + Vvveb.baseUrl + 'icons/image.svg" width="200" class="img-fluid align-center">',
136
+ image: "icons/image.svg",
137
+ resizable:true,//show select box resize handlers
138
+
139
+ properties: [{
140
+ name: "Image",
141
+ key: "src",
142
+ htmlAttr: "src",
143
+ inputtype: ImageInput
144
+ }, {
145
+ name: "Width",
146
+ key: "width",
147
+ htmlAttr: "width",
148
+ inputtype: NumberInput
149
+ }, {
150
+ name: "Height",
151
+ key: "height",
152
+ htmlAttr: "height",
153
+ inputtype: NumberInput
154
+ }, {
155
+ name: "Alt",
156
+ key: "alt",
157
+ htmlAttr: "alt",
158
+ inputtype: TextInput
159
+ }, {
160
+ name: "Align",
161
+ key: "align",
162
+ htmlAttr: "class",
163
+ inline:false,
164
+ validValues: ["", "align-left", "align-center", "align-right"],
165
+ inputtype: RadioButtonInput,
166
+ data: {
167
+ extraclass:"btn-group-sm btn-group-fullwidth",
168
+ options: [{
169
+ value: "",
170
+ icon:"la la-times",
171
+ //text: "None",
172
+ title: "None",
173
+ checked:true,
174
+ }, {
175
+ value: "align-left",
176
+ //text: "Left",
177
+ title: "text-start",
178
+ icon:"la la-align-left",
179
+ checked:false,
180
+ }, {
181
+ value: "align-center",
182
+ //text: "Center",
183
+ title: "Center",
184
+ icon:"la la-align-center",
185
+ checked:false,
186
+ }, {
187
+ value: "align-right",
188
+ //text: "Right",
189
+ title: "Right",
190
+ icon:"la la-align-right",
191
+ checked:false,
192
+ }],
193
+ },
194
+ },{
195
+ key: "link_options",
196
+ inputtype: SectionInput,
197
+ //name:false,
198
+ data: {header:"Link"},
199
+ },{
200
+ name: "Enable link",
201
+ key: "enable_link",
202
+ inputtype: CheckboxInput,
203
+ data: {
204
+ className: "form-switch"
205
+ },
206
+ setGroup: value => {
207
+ let group = document.querySelectorAll('.mb-3[data-group="link"]');
208
+ if (group.length) {
209
+ group.forEach(el => {
210
+ if (value) {
211
+ el.style.display = "";
212
+ } else {
213
+ el.style.display = "none";
214
+ }
215
+ });
216
+ }
217
+ },
218
+ onChange : function(node, value, input) {
219
+ this.setGroup(value);
220
+ if (value) {
221
+ const wrappingElement = document.createElement('a');
222
+ node.replaceWith(wrappingElement);
223
+ wrappingElement.appendChild(node);
224
+ } else {
225
+ if (node.parentNode.tagName.toLowerCase() == "a"){
226
+ node.parentNode.replaceWith(node);
227
+ }
228
+ }
229
+ return node;
230
+ },
231
+ init: function (node) {
232
+ let value = node.parentNode.tagName.toLowerCase() == "a";
233
+ this.setGroup(value);
234
+ return value;
235
+ }
236
+ }].concat(
237
+ //add link properties after setting parent to <a> element
238
+ linkComponentProperties.map(
239
+ (el) => {let a = Object.assign({}, el);a["parent"] = "a";a["group"] = "link";return a}
240
+ )),
241
+
242
+ init(node) {
243
+ let group = document.querySelectorAll('.mb-3[data-group="link"]');
244
+ if (group.length) {
245
+ group.forEach(el => {
246
+ if (value) {
247
+ el.style.display = "";
248
+ } else {
249
+ el.style.display = "none";
250
+ }
251
+ });
252
+ }
253
+
254
+ return node;
255
+ }
256
+ });
257
+
258
+ Vvveb.Components.extend("_base", "html/hr", {
259
+ image: "icons/hr.svg",
260
+ nodes: ["hr"],
261
+ name: "Horizontal Rule",
262
+ html: '<hr class="border-primary border-4 opacity-25">',
263
+ properties:[{
264
+ name: "Type",
265
+ key: "border-color",
266
+ htmlAttr: "class",
267
+ validValues: ["border-primary", "border-secondary", "border-success", "border-danger", "border-warning", "border-info", "border-light", "border-dark", "border-white"],
268
+ inputtype: SelectInput,
269
+ data: {
270
+ options: [{
271
+ value: "Default",
272
+ text: ""
273
+ }, {
274
+ value: "border-primary",
275
+ text: "Primary"
276
+ }, {
277
+ value: "border-secondary",
278
+ text: "Secondary"
279
+ }, {
280
+ value: "border-success",
281
+ text: "Success"
282
+ }, {
283
+ value: "border-danger",
284
+ text: "Danger"
285
+ }, {
286
+ value: "border-warning",
287
+ text: "Warning"
288
+ }, {
289
+ value: "border-info",
290
+ text: "Info"
291
+ }, {
292
+ value: "border-light",
293
+ text: "Light"
294
+ }, {
295
+ value: "border-dark",
296
+ text: "Dark"
297
+ }, {
298
+ value: "border-white",
299
+ text: "White"
300
+ }]
301
+ }
302
+ },{
303
+ name: "Border",
304
+ key: "border-size",
305
+ htmlAttr: "class",
306
+ validValues: ["border-1", "border-2", "border-3", "border-4", "border-5"],
307
+ inputtype: SelectInput,
308
+ data: {
309
+ options: [{
310
+ value: "Default",
311
+ text: ""
312
+ }, {
313
+ value: "border-1",
314
+ text: "Size 1"
315
+ }, {
316
+ value: "border-2",
317
+ text: "Size 2"
318
+ }, {
319
+ value: "border-3",
320
+ text: "Size 3"
321
+ }, {
322
+ value: "border-4",
323
+ text: "Size 4"
324
+ }, {
325
+ value: "border-5",
326
+ text: "Size 5"
327
+ }]
328
+ }
329
+ },{
330
+ name: "Opacity",
331
+ key: "opacity",
332
+ htmlAttr: "class",
333
+ validValues: ["opacity-25", "opacity-50", "opacity-75", "opacity-100"],
334
+ inputtype: SelectInput,
335
+ data: {
336
+ options: [{
337
+ value: "Default",
338
+ text: ""
339
+ }, {
340
+ value: "opacity-25",
341
+ text: "Opacity 25%"
342
+ }, {
343
+ value: "opacity-50",
344
+ text: "Opacity 50%"
345
+ }, {
346
+ value: "opacity-75",
347
+ text: "Opacity 75%"
348
+ }, {
349
+ value: "opacity-100",
350
+ text: "Opacity 100%"
351
+ }]
352
+ }
353
+ }]
354
+ });
355
+
356
+ Vvveb.Components.extend("_base", "html/label", {
357
+ name: "Label",
358
+ nodes: ["label"],
359
+ html: '<label for="">Label</label>',
360
+ properties: [{
361
+ name: "For id",
362
+ htmlAttr: "for",
363
+ key: "for",
364
+ inputtype: TextInput
365
+ }]
366
+ });
367
+
368
+
369
+ Vvveb.Components.extend("_base", "html/textinput", {
370
+ name: "Input",
371
+ nodes: ["input"],
372
+ //attributes: {"type":"text"},
373
+ image: "icons/text_input.svg",
374
+ html: '<input type="text" class="form-control">',
375
+ properties: [{
376
+ name: "Name",
377
+ key: "name",
378
+ htmlAttr: "name",
379
+ inputtype: TextInput
380
+ }, {
381
+ name: "Value",
382
+ key: "value",
383
+ htmlAttr: "value",
384
+ inputtype: TextInput
385
+ }, {
386
+ name: "Type",
387
+ key: "type",
388
+ htmlAttr: "type",
389
+ inputtype: SelectInput,
390
+ data: {
391
+ options: [{
392
+ value: "text",
393
+ text: "text"
394
+ }, {
395
+ value: "button",
396
+ text: "button"
397
+ }, {
398
+ value: "checkbox",
399
+ text: "checkbox"
400
+ }, {
401
+ value: "color",
402
+ text: "color"
403
+ }, {
404
+ value: "date",
405
+ text: "date"
406
+ }, {
407
+ value: "datetime-local",
408
+ text: "datetime-local"
409
+ }, {
410
+ value: "email",
411
+ text: "email"
412
+ }, {
413
+ value: "file",
414
+ text: "file"
415
+ }, {
416
+ value: "hidden",
417
+ text: "hidden"
418
+ }, {
419
+ value: "image",
420
+ text: "image"
421
+ }, {
422
+ value: "month",
423
+ text: "month"
424
+ }, {
425
+ value: "number",
426
+ text: "number"
427
+ }, {
428
+ value: "password",
429
+ text: "password"
430
+ }, {
431
+ value: "radio",
432
+ text: "radio"
433
+ }, {
434
+ value: "range",
435
+ text: "range"
436
+ }, {
437
+ value: "reset",
438
+ text: "reset"
439
+ }, {
440
+ value: "search",
441
+ text: "search"
442
+ }, {
443
+ value: "submit",
444
+ text: "submit"
445
+ }, {
446
+ value: "tel",
447
+ text: "tel"
448
+ }, {
449
+ value: "text",
450
+ text: "text"
451
+ }, {
452
+ value: "time",
453
+ text: "time"
454
+ }, {
455
+ value: "url",
456
+ text: "url"
457
+ }, {
458
+ value: "week",
459
+ text: "week"
460
+ }]
461
+ }
462
+ }, {
463
+ name: "Placeholder",
464
+ key: "placeholder",
465
+ htmlAttr: "placeholder",
466
+ inputtype: TextInput
467
+ }, {
468
+ name: "Disabled",
469
+ key: "disabled",
470
+ htmlAttr: "disabled",
471
+ col:6,
472
+ inline:true,
473
+ inputtype: CheckboxInput,
474
+ },{
475
+ name: "Required",
476
+ key: "required",
477
+ htmlAttr: "required",
478
+ col:6,
479
+ inline:true,
480
+ inputtype: CheckboxInput,
481
+ }]
482
+ });
483
+
484
+ Vvveb.Components.extend("_base", "html/selectinput", {
485
+ nodes: ["select"],
486
+ name: "Select Input",
487
+ image: "icons/select_input.svg",
488
+ html: '<select class="form-control"><option value="value1">Text 1</option><option value="value2">Text 2</option><option value="value3">Text 3</option></select>',
489
+
490
+ beforeInit: function (node) {
491
+ properties = [];
492
+ let i = 0;
493
+
494
+ node.querySelectorAll('option').forEach(el => {
495
+ data = {"value": el.value, "text": el.text};
496
+ i++;
497
+ properties.push({
498
+ name: "Option " + i,
499
+ key: "option" + i,
500
+ //index: i - 1,
501
+ optionNode: el,
502
+ inline:true,
503
+ inputtype: TextValueInput,
504
+ data: data,
505
+ onChange: function(node, value, input) {
506
+
507
+ option = this.optionNode;
508
+
509
+ //if remove button is clicked remove option and render row properties
510
+ if (input.nodeName == 'BUTTON') {
511
+ option.remove();
512
+ Vvveb.Components.render("html/selectinput");
513
+ return node;
514
+ }
515
+
516
+ if (input.name == "value") option.setAttribute("value", value);
517
+ else if (input.name == "text") option.textContent = value;
518
+ return node;
519
+ },
520
+ });
521
+ });
522
+
523
+ //remove all option properties
524
+ this.properties = this.properties.filter(function(item) {
525
+ return item.key.indexOf("option") === -1;
526
+ });
527
+
528
+ //add remaining properties to generated column properties
529
+ this.properties = properties.concat(this.properties);
530
+
531
+ return node;
532
+ },
533
+
534
+ properties: [{
535
+ name: "Name",
536
+ key: "name",
537
+ htmlAttr: "name",
538
+ inputtype: TextInput
539
+ }, {
540
+ name: "Disabled",
541
+ key: "disabled",
542
+ htmlAttr: "disabled",
543
+ col:6,
544
+ inline:true,
545
+ inputtype: CheckboxInput,
546
+ },{
547
+ name: "Required",
548
+ key: "required",
549
+ htmlAttr: "required",
550
+ col:6,
551
+ inline:true,
552
+ inputtype: CheckboxInput,
553
+ }, {
554
+ name: "Option",
555
+ key: "option1",
556
+ inputtype: TextValueInput
557
+ }, {
558
+ name: "Option",
559
+ key: "option2",
560
+ inputtype: TextValueInput
561
+ }, {
562
+ name: "",
563
+ key: "addChild",
564
+ inputtype: ButtonInput,
565
+ data: {text:"Add option", icon:"la-plus"},
566
+ onChange: function(node)
567
+ {
568
+ node.append(generateElements('<option value="value">Text</option>')[0]);
569
+
570
+ //render component properties again to include the new column inputs
571
+ Vvveb.Components.render("html/selectinput");
572
+
573
+ return node;
574
+ }
575
+ }]
576
+ });
577
+
578
+ Vvveb.Components.extend("_base", "html/textareainput", {
579
+ nodes: ["textarea"],
580
+ name: "Text Area",
581
+ image: "icons/text_area.svg",
582
+ html: '<textarea class="form-control"></textarea>',
583
+ properties: [{
584
+ name: "Name",
585
+ key: "name",
586
+ htmlAttr: "name",
587
+ inputtype: TextInput
588
+ }, {
589
+ name: "Value",
590
+ key: "value",
591
+ htmlAttr: "value",
592
+ inputtype: TextInput
593
+ }, {
594
+ name: "Placeholder",
595
+ key: "placeholder",
596
+ htmlAttr: "placeholder",
597
+ inputtype: TextInput
598
+ }, {
599
+ name: "Columns",
600
+ key: "cols",
601
+ htmlAttr: "cols",
602
+ inputtype: NumberInput
603
+ }, {
604
+ name: "Rows",
605
+ key: "rows",
606
+ htmlAttr: "rows",
607
+ inputtype: NumberInput
608
+ }, {
609
+ name: "Disabled",
610
+ key: "disabled",
611
+ htmlAttr: "disabled",
612
+ col:6,
613
+ inline:true,
614
+ inputtype: CheckboxInput,
615
+ },{
616
+ name: "Required",
617
+ key: "required",
618
+ htmlAttr: "required",
619
+ col:6,
620
+ inline:true,
621
+ inputtype: CheckboxInput,
622
+ }]
623
+ });
624
+ Vvveb.Components.extend("_base", "html/radiobutton", {
625
+ name: "Radio Button",
626
+ attributes: {"type":"radio"},
627
+ image: "icons/radio.svg",
628
+ html: `<div class="form-check">
629
+ <label class="form-check-label">
630
+ <input class="form-check-input" type="radio" name="radiobutton"> Option 1
631
+ </label>
632
+ </div>
633
+ <div class="form-check">
634
+ <label class="form-check-label">
635
+ <input class="form-check-input" type="radio" name="radiobutton" checked> Option 2
636
+ </label>
637
+ </div>
638
+ <div class="form-check">
639
+ <label class="form-check-label">
640
+ <input class="form-check-input" type="radio" name="radiobutton"> Option 3
641
+ </label>
642
+ </div>`,
643
+ properties: [{
644
+ name: "Name",
645
+ key: "name",
646
+ htmlAttr: "name",
647
+ inputtype: TextInput,
648
+ //inline:true,
649
+ //col:6
650
+ },{
651
+ name: "Value",
652
+ key: "value",
653
+ htmlAttr: "value",
654
+ inputtype: TextInput,
655
+ //inline:true,
656
+ //col:6
657
+ },{
658
+ name: "Checked",
659
+ key: "checked",
660
+ htmlAttr: "Checked",
661
+ inputtype: CheckboxInput,
662
+ //inline:true,
663
+ //col:6
664
+ },{
665
+ name: "Disabled",
666
+ key: "disabled",
667
+ htmlAttr: "disabled",
668
+ col:6,
669
+ inline:true,
670
+ inputtype: CheckboxInput,
671
+ },{
672
+ name: "Required",
673
+ key: "required",
674
+ htmlAttr: "required",
675
+ col:6,
676
+ inline:true,
677
+ inputtype: CheckboxInput,
678
+ }]
679
+ });
680
+
681
+ Vvveb.Components.extend("_base", "html/checkbox", {
682
+ name: "Checkbox",
683
+ attributes: {"type":"checkbox"},
684
+ image: "icons/checkbox.svg",
685
+ html: `<div class="form-check">
686
+ <label class="form-check-label">
687
+ <input class="form-check-input" type="checkbox" value=""> Default checkbox
688
+ </label>
689
+ </div>`,
690
+ properties: [{
691
+ name: "Name",
692
+ key: "name",
693
+ htmlAttr: "name",
694
+ inputtype: TextInput,
695
+ //inline:true,
696
+ //col:6
697
+ },{
698
+ name: "Value",
699
+ key: "value",
700
+ htmlAttr: "value",
701
+ inputtype: TextInput,
702
+ //inline:true,
703
+ //col:6
704
+ },{
705
+ name: "Checked",
706
+ key: "checked",
707
+ htmlAttr: "Checked",
708
+ inputtype: CheckboxInput,
709
+ //inline:true,
710
+ //col:6
711
+ },{
712
+ name: "Disabled",
713
+ key: "disabled",
714
+ htmlAttr: "disabled",
715
+ col:6,
716
+ inline:true,
717
+ inputtype: CheckboxInput,
718
+ },{
719
+ name: "Required",
720
+ key: "required",
721
+ htmlAttr: "required",
722
+ col:6,
723
+ inline:true,
724
+ inputtype: CheckboxInput,
725
+ }]
726
+ });
727
+
728
+ /*
729
+ Vvveb.Components.extend("_base", "html/fileinput", {
730
+ name: "Input group",
731
+ attributes: {"type":"file"},
732
+ image: "icons/text_input.svg",
733
+ html: '<input type="file" class="form-control">'
734
+ });
735
+ */
736
+
737
+ Vvveb.Components.extend("_base", "html/video", {
738
+ nodes: ["video"],
739
+ name: "Video",
740
+ html: '<video width="320" height="240" playsinline loop autoplay muted src="../../media/demo/sample.webm" poster="../../media/sample.webp"><video>',
741
+ dragHtml: '<img width="320" height="240" src="' + Vvveb.baseUrl + 'icons/video.svg">',
742
+ image: "icons/video.svg",
743
+ resizable:true,//show select box resize handlers
744
+ properties: [{
745
+ name: "Video",
746
+ //child: "source",
747
+ key: "src",
748
+ htmlAttr: "src",
749
+ inputtype: VideoInput
750
+ },{
751
+ name: "Poster",
752
+ key: "poster",
753
+ htmlAttr: "poster",
754
+ inputtype: ImageInput
755
+ },{
756
+ name: "Width",
757
+ key: "width",
758
+ htmlAttr: "width",
759
+ inputtype: TextInput
760
+ }, {
761
+ name: "Height",
762
+ key: "height",
763
+ htmlAttr: "height",
764
+ inputtype: TextInput
765
+ },{
766
+ name: "Muted",
767
+ key: "muted",
768
+ htmlAttr: "muted",
769
+ inputtype: CheckboxInput
770
+ },{
771
+ name: "Loop",
772
+ key: "loop",
773
+ htmlAttr: "loop",
774
+ inputtype: CheckboxInput
775
+ },{
776
+ name: "Autoplay",
777
+ key: "autoplay",
778
+ htmlAttr: "autoplay",
779
+ inputtype: CheckboxInput
780
+ },{
781
+ name: "Plays inline",
782
+ key: "playsinline",
783
+ htmlAttr: "playsinline",
784
+ inputtype: CheckboxInput
785
+ },{
786
+ name: "Controls",
787
+ key: "controls",
788
+ htmlAttr: "controls",
789
+ inputtype: CheckboxInput
790
+ },{
791
+ name:"",
792
+ key: "autoplay_warning",
793
+ inline:false,
794
+ col:12,
795
+ inputtype: NoticeInput,
796
+ data: {
797
+ type:'warning',
798
+ title:'Autoplay',
799
+ text:'Most browsers allow auto play only if video is muted and plays inline'
800
+ }
801
+ }]
802
+ });
803
+
804
+
805
+ Vvveb.Components.extend("_base", "html/button", {
806
+ nodes: ["button"],
807
+ name: "Html Button",
808
+ image: "icons/button.svg",
809
+ html: '<button>Button</button>',
810
+ properties: [{
811
+ name: "Text",
812
+ key: "text",
813
+ htmlAttr: "innerHTML",
814
+ inputtype: TextInput
815
+ }, {
816
+ name: "Name",
817
+ key: "name",
818
+ htmlAttr: "name",
819
+ inputtype: TextInput
820
+ }, {
821
+ name: "Type",
822
+ key: "type",
823
+ htmlAttr: "type",
824
+ inputtype: SelectInput,
825
+ data: {
826
+ options: [{
827
+ value: "button",
828
+ text: "button"
829
+ }, {
830
+ value: "reset",
831
+ text: "reset"
832
+ }, {
833
+ value: "submit",
834
+ text: "submit"
835
+ }],
836
+ }
837
+ },{
838
+ name: "Autofocus",
839
+ key: "autofocus",
840
+ htmlAttr: "autofocus",
841
+ inputtype: CheckboxInput,
842
+ inline:true,
843
+ col:6,
844
+ },{
845
+ name: "Disabled",
846
+ key: "disabled",
847
+ htmlAttr: "disabled",
848
+ inputtype: CheckboxInput,
849
+ inline:true,
850
+ col:6,
851
+ }]
852
+ });
853
+
854
+ Vvveb.Components.extend("_base", "html/paragraph", {
855
+ nodes: ["p"],
856
+ name: "Paragraph",
857
+ image: "icons/paragraph.svg",
858
+ html: '<p>Lorem ipsum</p>',
859
+ properties: [{
860
+ name: "Text align",
861
+ key: "p-text-align",
862
+ htmlAttr: "class",
863
+ inline:false,
864
+ validValues: ["", "text-start", "text-center", "text-end"],
865
+ inputtype: RadioButtonInput,
866
+ data: {
867
+ extraclass:"btn-group-sm btn-group-fullwidth",
868
+ options: [{
869
+ value: "",
870
+ icon:"la la-times",
871
+ //text: "None",
872
+ title: "None",
873
+ checked:true,
874
+ }, {
875
+ value: "text-start",
876
+ //text: "Left",
877
+ title: "text-start",
878
+ icon:"la la-align-left",
879
+ checked:false,
880
+ }, {
881
+ value: "text-center",
882
+ //text: "Center",
883
+ title: "Center",
884
+ icon:"la la-align-center",
885
+ checked:false,
886
+ }, {
887
+ value: "text-end",
888
+ //text: "Right",
889
+ title: "Right",
890
+ icon:"la la-align-right",
891
+ checked:false,
892
+ }],
893
+ },
894
+ }]
895
+ });
896
+
897
+ Vvveb.Components.extend("_base", "html/blockquote", {
898
+ nodes: ["blockquote"],
899
+ name: "Blockquote",
900
+ image: "icons/blockquote.svg",
901
+ html: `<blockquote cite="https://en.wikipedia.org/wiki/Marcus_Aurelius">
902
+ <p>Today I shall be meeting with interference, ingratitude, insolence, disloyalty, ill-will, and selfishness all of them due to the offenders' ignorance of what is good or evil.</p>
903
+ <cite class="small">
904
+ <a href="https://en.wikipedia.org/wiki/Marcus_Aurelius" class="text-decoration-none" target="blank">Marcus Aurelius</a>
905
+ </cite>
906
+ </blockquote>`,
907
+ properties: [{
908
+ name: "Cite",
909
+ key: "cite",
910
+ inline:false,
911
+ htmlAttr: "cite",
912
+ inputtype: TextInput,
913
+ }]
914
+ });
915
+
916
+ Vvveb.Components.extend("_base", "html/list", {
917
+ nodes: ["ul", "ol"],
918
+ name: "List",
919
+ image: "icons/list.svg",
920
+ html: `<ul>
921
+ <li>Begin with the possible; begin with one step.</li>
922
+ <li>Never think of results, just do!</li>
923
+ <li>Patience is the mother of will.</li>
924
+ <li>Man must use what he has, not hope for what is not.</li>
925
+ <li>Only super-efforts count.</li>
926
+ </ul>`,
927
+ properties: [{
928
+ name: "Type",
929
+ key: "type",
930
+ inputtype: SelectInput,
931
+
932
+ onChange: function(node, value) {
933
+ return changeNodeName(node, value);
934
+ },
935
+
936
+ init: function(node) {
937
+ return node.nodeName.toLowerCase()
938
+ },
939
+
940
+ data:{
941
+ options: [{
942
+ value: "ul",
943
+ text: "Unordered"
944
+ }, {
945
+ value: "ol",
946
+ text: "Ordered"
947
+ }]
948
+ },
949
+ },{
950
+ name: "Items",
951
+ key: "items",
952
+ inputtype: ListInput,
953
+ htmlAttr:"data-slides-per-view",
954
+ inline:true,
955
+ data: {
956
+ selector:"li",
957
+ container:"",
958
+ prefix:"Item ",
959
+ removeElement: true,
960
+ "newElement": `<li>Do everything quickly and well.</li>`
961
+ },
962
+ onChange: function(node, value, input, component, event) {
963
+ let element = node;
964
+
965
+ if (event.action) {
966
+ if (event.action == "add") {
967
+ //node.append(generateElements(`<li>List item</li>`)[0]);
968
+
969
+ //temporary solution to better update list
970
+ Vvveb.Components.render("html/list");
971
+ }
972
+ if (event.action == "remove") {
973
+ } else if (event.action == "select") {
974
+ }
975
+ }
976
+
977
+ return node;
978
+ },
979
+ }]
980
+ });
981
+
982
+ Vvveb.Components.extend("_base", "html/preformatted", {
983
+ nodes: ["pre"],
984
+ name: "Preformatted",
985
+ image: "icons/paragraph.svg",
986
+ html: `<pre>Today I shall be meeting with interference,
987
+ ingratitude, insolence, disloyalty, ill-will, and
988
+ selfishness all of them due to the offenders'
989
+ ignorance of what is good or evil..</pre>`,
990
+ properties: [{
991
+ name: "Text",
992
+ key: "text",
993
+ inline:false,
994
+ htmlAttr: "innerHTML",
995
+ inputtype: TextareaInput,
996
+ data:{
997
+ rows:20,
998
+ }
999
+ }]
1000
+ });
1001
+
1002
+ Vvveb.Components.extend("_base", "html/form", {
1003
+ nodes: ["form"],
1004
+ image: "icons/form.svg",
1005
+ name: "Form",
1006
+ html: `<form action="" method="POST">
1007
+ <div class="mb-3">
1008
+ <label for="exampleInputEmail1" class="form-label">Email address</label>
1009
+ <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
1010
+ <div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
1011
+ </div>
1012
+ <div class="mb-3">
1013
+ <label for="exampleInputPassword1" class="form-label">Password</label>
1014
+ <input type="password" class="form-control" id="exampleInputPassword1">
1015
+ </div>
1016
+ <div class="mb-3 form-check">
1017
+ <input type="checkbox" class="form-check-input" id="exampleCheck1">
1018
+ <label class="form-check-label" for="exampleCheck1">Check me out</label>
1019
+ </div>
1020
+ <button type="submit" class="btn btn-primary">Submit</button>
1021
+ </form>`,
1022
+ properties: [/*{
1023
+ name: "Style",
1024
+ key: "style",
1025
+ htmlAttr: "class",
1026
+ validValues: ["", "form-search", "form-inline", "form-horizontal"],
1027
+ inputtype: SelectInput,
1028
+ data: {
1029
+ options: [{
1030
+ value: "",
1031
+ text: "Default"
1032
+ }, {
1033
+ value: "form-search",
1034
+ text: "Search"
1035
+ }, {
1036
+ value: "form-inline",
1037
+ text: "Inline"
1038
+ }, {
1039
+ value: "form-horizontal",
1040
+ text: "Horizontal"
1041
+ }]
1042
+ }
1043
+ }, */{
1044
+ name: "Action",
1045
+ key: "action",
1046
+ htmlAttr: "action",
1047
+ inputtype: TextInput
1048
+ }, {
1049
+ name: "Method",
1050
+ key: "method",
1051
+ htmlAttr: "method",
1052
+ inputtype: SelectInput,
1053
+ data: {
1054
+ options: [{
1055
+ value: "post",
1056
+ text: "Post"
1057
+ }, {
1058
+ value: "get",
1059
+ text: "Get"
1060
+ }]
1061
+ }
1062
+ }, {
1063
+ name: "Encoding type",
1064
+ key: "enctype",
1065
+ htmlAttr: "enctype",
1066
+ inputtype: SelectInput,
1067
+ data: {
1068
+ options: [{
1069
+ value: "",
1070
+ text: ""
1071
+ }, {
1072
+ value: "application/x-www-form-urlencoded",
1073
+ text: "Url encoded (default)"
1074
+ }, {
1075
+ value: "multipart/form-data",
1076
+ text: "Multipart (for file upload)"
1077
+ }, {
1078
+ value: "text/plain",
1079
+ text: "Text plain"
1080
+ }]
1081
+ }
1082
+ }]
1083
+ });
1084
+
1085
+ Vvveb.Components.extend("_base", "html/tablerow", {
1086
+ nodes: ["tr"],
1087
+ image: "icons/table.svg",
1088
+ name: "Table Row",
1089
+ html: "<tr><td>Cell 1</td><td>Cell 2</td><td>Cell 3</td></tr>",
1090
+ properties: [{
1091
+ name: "Type",
1092
+ key: "type",
1093
+ htmlAttr: "class",
1094
+ inputtype: SelectInput,
1095
+ validValues: ["", "success", "danger", "warning", "active"],
1096
+ data: {
1097
+ options: [{
1098
+ value: "",
1099
+ text: "Default"
1100
+ }, {
1101
+ value: "success",
1102
+ text: "Success"
1103
+ }, {
1104
+ value: "error",
1105
+ text: "Error"
1106
+ }, {
1107
+ value: "warning",
1108
+ text: "Warning"
1109
+ }, {
1110
+ value: "active",
1111
+ text: "Active"
1112
+ }]
1113
+ }
1114
+ }]
1115
+ });
1116
+ Vvveb.Components.extend("_base", "html/tablecell", {
1117
+ nodes: ["td"],
1118
+ image: "icons/table.svg",
1119
+ name: "Table Cell",
1120
+ html: "<td>Cell</td>"
1121
+ });
1122
+
1123
+ Vvveb.Components.extend("_base", "html/tableheadercell", {
1124
+ nodes: ["th"],
1125
+ image: "icons/table.svg",
1126
+ name: "Table Header Cell",
1127
+ html: "<th>Head</th>"
1128
+ });
1129
+
1130
+ Vvveb.Components.extend("_base", "html/tablebody", {
1131
+ nodes: ["tbody"],
1132
+ image: "icons/table.svg",
1133
+ name: "Table Body",
1134
+ html: "<tbody>Table body</tbody>"
1135
+ });
1136
+
1137
+ Vvveb.Components.extend("_base", "html/tablefooter", {
1138
+ nodes: ["tfooter"],
1139
+ image: "icons/table.svg",
1140
+ name: "Table Footer",
1141
+ html: "<tfooter>Table footer</tfooter>"
1142
+ });
1143
+
1144
+ Vvveb.Components.extend("_base", "html/tablehead", {
1145
+ nodes: ["thead"],
1146
+ image: "icons/table.svg",
1147
+ name: "Table Head",
1148
+ html: "<thead><tr><th>Head 1</th><th>Head 2</th><th>Head 3</th></tr></thead>",
1149
+ properties: [{
1150
+ name: "Type",
1151
+ key: "type",
1152
+ htmlAttr: "class",
1153
+ inputtype: SelectInput,
1154
+ validValues: ["", "success", "danger", "warning", "info"],
1155
+ data: {
1156
+ options: [{
1157
+ value: "",
1158
+ text: "Default"
1159
+ }, {
1160
+ value: "success",
1161
+ text: "Success"
1162
+ }, {
1163
+ value: "anger",
1164
+ text: "Error"
1165
+ }, {
1166
+ value: "warning",
1167
+ text: "Warning"
1168
+ }, {
1169
+ value: "info",
1170
+ text: "Info"
1171
+ }]
1172
+ }
1173
+ }]
1174
+ });
1175
+
1176
+ Vvveb.Components.extend("_base", "html/table", {
1177
+ nodes: ["table"],
1178
+ classes: ["table"],
1179
+ image: "icons/table.svg",
1180
+ name: "Table",
1181
+ html: `<table class="table table-striped table-hover">
1182
+ <thead>
1183
+ <tr>
1184
+ <th scope="col">#</th>
1185
+ <th scope="col">First</th>
1186
+ <th scope="col">Last</th>
1187
+ <th scope="col">Handle</th>
1188
+ </tr>
1189
+ </thead>
1190
+ <tbody>
1191
+ <tr>
1192
+ <th scope="row">1</th>
1193
+ <td>Mark</td>
1194
+ <td>Otto</td>
1195
+ <td>@mdo</td>
1196
+ </tr>
1197
+ <tr>
1198
+ <th scope="row">2</th>
1199
+ <td>Jacob</td>
1200
+ <td>Thornton</td>
1201
+ <td>@fat</td>
1202
+ </tr>
1203
+ <tr>
1204
+ <th scope="row">3</th>
1205
+ <td colspan="2">Larry the Bird</td>
1206
+ <td>@twitter</td>
1207
+ </tr>
1208
+ </tbody>
1209
+ </table>`,
1210
+ properties: [{
1211
+ name: "Type",
1212
+ key: "type",
1213
+ htmlAttr: "class",
1214
+ validValues: ["table-primary", "table-secondary", "table-success", "table-danger", "table-warning", "table-info", "table-light", "table-dark", "table-white"],
1215
+ inputtype: SelectInput,
1216
+ data: {
1217
+ options: [{
1218
+ value: "Default",
1219
+ text: ""
1220
+ }, {
1221
+ value: "table-primary",
1222
+ text: "Primary"
1223
+ },{
1224
+ value: "table-secondary",
1225
+ text: "Secondary"
1226
+ },{
1227
+ value: "table-success",
1228
+ text: "Success"
1229
+ },{
1230
+ value: "table-danger",
1231
+ text: "Danger"
1232
+ },{
1233
+ value: "table-warning",
1234
+ text: "Warning"
1235
+ },{
1236
+ value: "table-info",
1237
+ text: "Info"
1238
+ },{
1239
+ value: "table-light",
1240
+ text: "Light"
1241
+ },{
1242
+ value: "table-dark",
1243
+ text: "Dark"
1244
+ },{
1245
+ value: "table-white",
1246
+ text: "White"
1247
+ }]
1248
+ }
1249
+ }, {
1250
+ name: "Responsive",
1251
+ key: "responsive",
1252
+ htmlAttr: "class",
1253
+ validValues: ["table-responsive"],
1254
+ inputtype: ToggleInput,
1255
+ data: {
1256
+ on: "table-responsive",
1257
+ off: ""
1258
+ }
1259
+ }, {
1260
+ name: "Small",
1261
+ key: "small",
1262
+ htmlAttr: "class",
1263
+ validValues: ["table-sm"],
1264
+ inputtype: ToggleInput,
1265
+ data: {
1266
+ on: "table-sm",
1267
+ off: ""
1268
+ }
1269
+ }, {
1270
+ name: "Hover",
1271
+ key: "hover",
1272
+ htmlAttr: "class",
1273
+ validValues: ["table-hover"],
1274
+ inputtype: ToggleInput,
1275
+ data: {
1276
+ on: "table-hover",
1277
+ off: ""
1278
+ }
1279
+ }, {
1280
+ name: "Bordered",
1281
+ key: "bordered",
1282
+ htmlAttr: "class",
1283
+ validValues: ["table-bordered"],
1284
+ inputtype: ToggleInput,
1285
+ data: {
1286
+ on: "table-bordered",
1287
+ off: ""
1288
+ }
1289
+ }, {
1290
+ name: "Striped",
1291
+ key: "striped",
1292
+ htmlAttr: "class",
1293
+ validValues: ["table-striped"],
1294
+ inputtype: ToggleInput,
1295
+ data: {
1296
+ on: "table-striped",
1297
+ off: ""
1298
+ }
1299
+ }, {
1300
+ name: "Inverse",
1301
+ key: "inverse",
1302
+ htmlAttr: "class",
1303
+ validValues: ["table-inverse"],
1304
+ inputtype: ToggleInput,
1305
+ data: {
1306
+ on: "table-inverse",
1307
+ off: ""
1308
+ }
1309
+ },
1310
+ {
1311
+ name: "Head options",
1312
+ key: "head",
1313
+ htmlAttr: "class",
1314
+ child:"thead",
1315
+ inputtype: SelectInput,
1316
+ validValues: ["", "thead-dark", "thead-light"],
1317
+ data: {
1318
+ options: [{
1319
+ value: "",
1320
+ text: "None"
1321
+ }, {
1322
+ value: "thead-default",
1323
+ text: "Default"
1324
+ }, {
1325
+ value: "thead-inverse",
1326
+ text: "Inverse"
1327
+ }]
1328
+ }
1329
+ }]
1330
+ });
1331
+
1332
+ Vvveb.Components.extend("_base", "html/audio", {
1333
+ nodes: ["audio"],
1334
+ attributes: ["data-component-audio"],
1335
+ name: "Audio",
1336
+ image: "icons/audio.svg",
1337
+ html: `<figure data-component-audio><audio controls src="#"></audio></figure>`,
1338
+ properties: [{
1339
+ name: "Src",
1340
+ key: "src",
1341
+ child:"audio",
1342
+ htmlAttr: "src",
1343
+ inputtype: LinkInput
1344
+ }, {
1345
+ key: "audio_options",
1346
+ inputtype: SectionInput,
1347
+ name:false,
1348
+ data: {header:"Options"},
1349
+ }, {
1350
+ name: "Autoplay",
1351
+ key: "autoplay",
1352
+ htmlAttr: "autoplay",
1353
+ child:"audio",
1354
+ inputtype: CheckboxInput,
1355
+ inline:true,
1356
+ col:4,
1357
+ /* }, {
1358
+ name: "Controls",
1359
+ key: "controls",
1360
+ htmlAttr: "controls",
1361
+ inputtype: CheckboxInput,
1362
+ child:"audio",
1363
+ inline:true,
1364
+ col:4,
1365
+ */ }, {
1366
+ name: "Loop",
1367
+ key: "loop",
1368
+ htmlAttr: "loop",
1369
+ inputtype: CheckboxInput,
1370
+ child:"audio",
1371
+ inline:true,
1372
+ col:4
1373
+ }]
1374
+ });
1375
+
1376
+
1377
+ Vvveb.Components.extend("_base", "html/pdf", {
1378
+ attributes: ["data-component-pdf"],
1379
+ image: "icons/pdf.svg",
1380
+ name: "Pdf embed",
1381
+ html: `<object data="" type="application/pdf" data-component-pdf></object>`,
1382
+ properties: [{
1383
+ name: "Data",
1384
+ key: "data",
1385
+ htmlAttr: "data",
1386
+ inputtype: TextInput
1387
+ }]
1388
+ });
1389
+
1390
+ Vvveb.Components.extend("_base", "html/embed", {
1391
+ attributes: ["data-component-embed"],
1392
+ image: "icons/embed.svg",
1393
+ name: "Embed",
1394
+ html: `<object data="" type="application/pdf" data-component-pdf></object>`,
1395
+ properties: [{
1396
+ name: "Data",
1397
+ key: "data",
1398
+ htmlAttr: "data",
1399
+ inputtype: TextInput
1400
+ }]
1401
+ });
1402
+
1403
+ Vvveb.Components.extend("_base", "html/html", {
1404
+ nodes: ["html"],
1405
+ name: "Html Page",
1406
+ image: "icons/posts.svg",
1407
+ html: `<html><body></body></html>`,
1408
+ properties: [{
1409
+ name: "Title",
1410
+ key: "title",
1411
+ htmlAttr: "innerHTML",
1412
+ inputtype: TextInput,
1413
+ child:"title",
1414
+ }, {
1415
+ name: "Meta description",
1416
+ key: "description",
1417
+ htmlAttr: "content",
1418
+ inputtype: TextInput,
1419
+ child:'meta[name=description]',
1420
+ }, {
1421
+ name: "Meta keywords",
1422
+ key: "keywords",
1423
+ htmlAttr: "content",
1424
+ inputtype: TextInput,
1425
+ child:'meta[name=keywords]',
1426
+ }]
1427
+ });
1428
+
1429
+ /*
1430
+ Vvveb.ComponentsGroup['Base'] =
1431
+ ["html/heading", "html/image", "html/hr", "html/form", "html/textinput", "html/textareainput", "html/selectinput", "html/fileinput", "html/checkbox", "html/radiobutton", "html/link", "html/video", "html/button", "html/paragraph", "html/blockquote", "html/list", "html/table", "html/preformatted"];
1432
+
1433
+ */
1434
+
1435
+ Vvveb.Components.extend("_base", "html/iframe", {
1436
+ attributes: ["data-component-iframe"],
1437
+ name: "Iframe",
1438
+ image: "icons/file.svg",
1439
+ html: '<div data-component-iframe><iframe src="https://www.vvveb.com" width="320" height="240"></iframe></div>',
1440
+ properties: [{
1441
+ name: "Src",
1442
+ key: "src",
1443
+ htmlAttr: "src",
1444
+ child:"iframe",
1445
+ inputtype: TextInput
1446
+ }, {
1447
+ name: "Width",
1448
+ key: "width",
1449
+ htmlAttr: "width",
1450
+ child:"iframe",
1451
+ inputtype: CssUnitInput
1452
+ }, {
1453
+ name: "Height",
1454
+ key: "height",
1455
+ htmlAttr: "height",
1456
+ child:"iframe",
1457
+ inputtype: CssUnitInput
1458
+ }]
1459
+ });
libs/builder/components-server.js ADDED
@@ -0,0 +1,432 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright 2017 Ziadin Givan
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ https://github.com/givanz/VvvebJs
17
+ */
18
+
19
+ Vvveb.ComponentsGroup['Server Components'] = ["components/products", "components/product", "components/categories", "components/manufacturers", "components/search", "components/user", "components/product_gallery", "components/cart", "components/checkout", "components/filters", "components/product", "components/slider"];
20
+
21
+
22
+ Vvveb.Components.add("components/product", {
23
+ name: "Product",
24
+ attributes: ["data-component-product"],
25
+
26
+ image: "icons/map.svg",
27
+ html: '<iframe frameborder="0" src="https://maps.google.com/maps?&z=1&t=q&output=embed"></iframe>',
28
+
29
+ properties: [
30
+ {
31
+ name: "Id",
32
+ key: "id",
33
+ htmlAttr: "id",
34
+ inputtype: TextInput
35
+ },
36
+ {
37
+ name: "Select",
38
+ key: "id",
39
+ htmlAttr: "id",
40
+ inputtype: SelectInput,
41
+ data:{
42
+ options: [{
43
+ value: "",
44
+ text: "None"
45
+ }, {
46
+ value: "pull-left",
47
+ text: "Left"
48
+ }, {
49
+ value: "pull-right",
50
+ text: "Right"
51
+ }]
52
+ },
53
+ },
54
+ {
55
+ name: "Select 2",
56
+ key: "id",
57
+ htmlAttr: "id",
58
+ inputtype: SelectInput,
59
+ data:{
60
+ options: [{
61
+ value: "",
62
+ text: "nimic"
63
+ }, {
64
+ value: "pull-left",
65
+ text: "gigi"
66
+ }, {
67
+ value: "pull-right",
68
+ text: "vasile"
69
+ }, {
70
+ value: "pull-right",
71
+ text: "sad34"
72
+ }]
73
+ },
74
+ }]
75
+ });
76
+
77
+
78
+ Vvveb.Components.add("components/products", {
79
+ name: "Products",
80
+ attributes: ["data-component-products"],
81
+
82
+ image: "icons/products.svg",
83
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>',
84
+
85
+ init: function (node)
86
+ {
87
+ $('.mb-3[data-group]').hide();
88
+ if (node.dataset.type != undefined)
89
+ {
90
+ $('.mb-3[data-group="'+ node.dataset.type + '"]').show();
91
+ } else
92
+ {
93
+ $('.mb-3[data-group]:first').show();
94
+ }
95
+ },
96
+ properties: [{
97
+ name: false,
98
+ key: "type",
99
+ inputtype: RadioButtonInput,
100
+ htmlAttr:"data-type",
101
+ data: {
102
+ inline: true,
103
+ extraclass:"btn-group-fullwidth",
104
+ options: [{
105
+ value: "autocomplete",
106
+ text: "Autocomplete",
107
+ title: "Autocomplete",
108
+ icon:"la la-search",
109
+ checked:true,
110
+ }, {
111
+ value: "automatic",
112
+ icon:"la la-cog",
113
+ text: "Configuration",
114
+ title: "Configuration",
115
+ }],
116
+ },
117
+ onChange : function(element, value, input) {
118
+
119
+ $('.mb-3[data-group]').hide();
120
+ $('.mb-3[data-group="'+ input.value + '"]').show();
121
+
122
+ return element;
123
+ },
124
+ init: function(node) {
125
+ return node.dataset.type;
126
+ },
127
+ },{
128
+ name: "Products",
129
+ key: "products",
130
+ group:"autocomplete",
131
+ htmlAttr:"data-products",
132
+ inputtype: AutocompleteList,
133
+ data: {
134
+ url: "/admin/?module=editor/editor&action=productsAutocomplete",
135
+ },
136
+ },{
137
+ name: "Number of products",
138
+ group:"automatic",
139
+ key: "limit",
140
+ htmlAttr:"data-limit",
141
+ inputtype: NumberInput,
142
+ data: {
143
+ value: "8",//default
144
+ min: "1",
145
+ max: "1024",
146
+ step: "1"
147
+ },
148
+ getFromNode: function(node) {
149
+ return 10
150
+ },
151
+ },{
152
+ name: "Start from page",
153
+ group:"automatic",
154
+ key: "page",
155
+ htmlAttr:"data-page",
156
+ data: {
157
+ value: "1",//default
158
+ min: "1",
159
+ max: "1024",
160
+ step: "1"
161
+ },
162
+ inputtype: NumberInput,
163
+ getFromNode: function(node) {
164
+ return 0
165
+ },
166
+ },{
167
+ name: "Order by",
168
+ group:"automatic",
169
+ key: "order",
170
+ htmlAttr:"data-order",
171
+ inputtype: SelectInput,
172
+ data: {
173
+ options: [{
174
+ value: "price_asc",
175
+ text: "Price Ascending"
176
+ }, {
177
+ value: "price_desc",
178
+ text: "Price Descending"
179
+ }, {
180
+ value: "date_asc",
181
+ text: "Date Ascending"
182
+ }, {
183
+ value: "date_desc",
184
+ text: "Date Descending"
185
+ }, {
186
+ value: "sales_asc",
187
+ text: "Sales Ascending"
188
+ }, {
189
+ value: "sales_desc",
190
+ text: "Sales Descending"
191
+ }]
192
+ }
193
+ },{
194
+ name: "Category",
195
+ group:"automatic",
196
+ key: "category",
197
+ htmlAttr:"data-category",
198
+ inputtype: AutocompleteList,
199
+ data: {
200
+ url: "/admin/?module=editor/editor&action=productsAutocomplete",
201
+ },
202
+
203
+ },{
204
+ name: "Manufacturer",
205
+ group:"automatic",
206
+ key: "manufacturer",
207
+ htmlAttr:"data-manufacturer",
208
+ inputtype: AutocompleteList,
209
+ data: {
210
+ url: "/admin/?module=editor/editor&action=productsAutocomplete",
211
+ }
212
+ },{
213
+ name: "Manufacturer 2",
214
+ group:"automatic",
215
+ key: "manufacturer 2",
216
+ htmlAttr:"data-manufacturer2",
217
+ inputtype: AutocompleteList,
218
+ data: {
219
+ url: "/admin/?module=editor/editor&action=productsAutocomplete",
220
+ },
221
+ }]
222
+ });
223
+
224
+ Vvveb.Components.add("components/manufacturers", {
225
+ name: "Manufacturers",
226
+ classes: ["component_manufacturers"],
227
+ image: "icons/categories.svg",
228
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>',
229
+ properties: [{
230
+ nolabel:false,
231
+ inputtype: TextInput,
232
+ data: {text:"Fields"}
233
+ },{
234
+ name: "Name",
235
+ key: "category",
236
+ inputtype: TextInput
237
+ },{
238
+ name: "Image",
239
+ key: "category",
240
+ inputtype: TextInput
241
+ }
242
+ ]
243
+ });
244
+
245
+ Vvveb.Components.add("components/categories", {
246
+ name: "Categories",
247
+ classes: ["component_categories"],
248
+ image: "icons/categories.svg",
249
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>',
250
+ properties: [{
251
+ name: "Name",
252
+ key: "name",
253
+ htmlAttr: "src",
254
+ inputtype: FileUploadInput
255
+ }]
256
+ });
257
+ Vvveb.Components.add("components/search", {
258
+ name: "Search",
259
+ classes: ["component_search"],
260
+ image: "icons/search.svg",
261
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>',
262
+ properties: [{
263
+ name: "asdasdad",
264
+ key: "src",
265
+ htmlAttr: "src",
266
+ inputtype: FileUploadInput
267
+ }, {
268
+ name: "34234234",
269
+ key: "width",
270
+ htmlAttr: "width",
271
+ inputtype: TextInput
272
+ }, {
273
+ name: "d32d23",
274
+ key: "height",
275
+ htmlAttr: "height",
276
+ inputtype: TextInput
277
+ }]
278
+ });
279
+ Vvveb.Components.add("components/user", {
280
+ name: "User",
281
+ classes: ["component_user"],
282
+ image: "icons/user.svg",
283
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>',
284
+ properties: [{
285
+ name: "asdasdad",
286
+ key: "src",
287
+ htmlAttr: "src",
288
+ inputtype: FileUploadInput
289
+ }, {
290
+ name: "34234234",
291
+ key: "width",
292
+ htmlAttr: "width",
293
+ inputtype: TextInput
294
+ }, {
295
+ name: "d32d23",
296
+ key: "height",
297
+ htmlAttr: "height",
298
+ inputtype: TextInput
299
+ }]
300
+ });
301
+ Vvveb.Components.add("components/product_gallery", {
302
+ name: "Product gallery",
303
+ classes: ["component_product_gallery"],
304
+ image: "icons/product_gallery.svg",
305
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>',
306
+ properties: [{
307
+ name: "asdasdad",
308
+ key: "src",
309
+ htmlAttr: "src",
310
+ inputtype: FileUploadInput
311
+ }, {
312
+ name: "34234234",
313
+ key: "width",
314
+ htmlAttr: "width",
315
+ inputtype: TextInput
316
+ }, {
317
+ name: "d32d23",
318
+ key: "height",
319
+ htmlAttr: "height",
320
+ inputtype: TextInput
321
+ }]
322
+ });
323
+ Vvveb.Components.add("components/cart", {
324
+ name: "Cart",
325
+ classes: ["component_cart"],
326
+ image: "icons/cart.svg",
327
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>',
328
+ properties: [{
329
+ name: "asdasdad",
330
+ key: "src",
331
+ htmlAttr: "src",
332
+ inputtype: FileUploadInput
333
+ }, {
334
+ name: "34234234",
335
+ key: "width",
336
+ htmlAttr: "width",
337
+ inputtype: TextInput
338
+ }, {
339
+ name: "d32d23",
340
+ key: "height",
341
+ htmlAttr: "height",
342
+ inputtype: TextInput
343
+ }]
344
+ });
345
+ Vvveb.Components.add("components/checkout", {
346
+ name: "Checkout",
347
+ classes: ["component_checkout"],
348
+ image: "icons/checkout.svg",
349
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>',
350
+ properties: [{
351
+ name: "asdasdad",
352
+ key: "src",
353
+ htmlAttr: "src",
354
+ inputtype: FileUploadInput
355
+ }, {
356
+ name: "34234234",
357
+ key: "width",
358
+ htmlAttr: "width",
359
+ inputtype: TextInput
360
+ }, {
361
+ name: "d32d23",
362
+ key: "height",
363
+ htmlAttr: "height",
364
+ inputtype: TextInput
365
+ }]
366
+ });
367
+ Vvveb.Components.add("components/filters", {
368
+ name: "Filters",
369
+ classes: ["component_filters"],
370
+ image: "icons/filters.svg",
371
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>',
372
+ properties: [{
373
+ name: "asdasdad",
374
+ key: "src",
375
+ htmlAttr: "src",
376
+ inputtype: FileUploadInput
377
+ }, {
378
+ name: "34234234",
379
+ key: "width",
380
+ htmlAttr: "width",
381
+ inputtype: TextInput
382
+ }, {
383
+ name: "d32d23",
384
+ key: "height",
385
+ htmlAttr: "height",
386
+ inputtype: TextInput
387
+ }]
388
+ });
389
+ Vvveb.Components.add("components/product", {
390
+ name: "Product",
391
+ classes: ["component_product"],
392
+ image: "icons/product.svg",
393
+ html: '<div class="mb-3"><label>Your response:</label><textarea class="form-control"></textarea></div>',
394
+ properties: [{
395
+ name: "asdasdad",
396
+ key: "src",
397
+ htmlAttr: "src",
398
+ inputtype: FileUploadInput
399
+ }, {
400
+ name: "34234234",
401
+ key: "width",
402
+ htmlAttr: "width",
403
+ inputtype: TextInput
404
+ }, {
405
+ name: "d32d23",
406
+ key: "height",
407
+ htmlAttr: "height",
408
+ inputtype: TextInput
409
+ }]
410
+ });
411
+ Vvveb.Components.add("components/slider", {
412
+ name: "Slider",
413
+ classes: ["component_slider"],
414
+ image: "icons/slider.svg",
415
+ html: '<div class="form-group"><label>Your response:</label><textarea class="form-control"></textarea></div>',
416
+ properties: [{
417
+ name: "asdasdad",
418
+ key: "src",
419
+ htmlAttr: "src",
420
+ inputtype: FileUploadInput
421
+ }, {
422
+ name: "34234234",
423
+ key: "width",
424
+ htmlAttr: "width",
425
+ inputtype: TextInput
426
+ }, {
427
+ name: "d32d23",
428
+ key: "height",
429
+ htmlAttr: "height",
430
+ inputtype: TextInput
431
+ }]
432
+ });
libs/builder/components-widgets.js ADDED
@@ -0,0 +1,839 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright 2017 Ziadin Givan
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ https://github.com/givanz/VvvebJs
17
+ */
18
+
19
+ Vvveb.ComponentsGroup['Widgets'] = ["widgets/googlemaps", "widgets/embed-video", "widgets/chartjs", "widgets/lottie",/* "widgets/facebookpage", */"widgets/paypal", /*"widgets/instagram",*/ "widgets/twitter", "widgets/openstreetmap"/*, "widgets/facebookcomments"*/];
20
+
21
+ Vvveb.Components.extend("_base", "widgets/googlemaps", {
22
+ name: "Google Maps",
23
+ attributes: ["data-component-maps"],
24
+ image: "icons/map.svg",
25
+ dragHtml: '<img src="' + Vvveb.baseUrl + 'icons/maps.png">',
26
+ html: '<div data-component-maps><iframe frameborder="0" src="https://maps.google.com/maps?q=Bucharest&z=15&t=q&key=&output=embed" width="100%" height="100%" style="width:100%;height:100%;left:0px"></iframe></div>',
27
+ resizable:true,//show select box resize handlers
28
+ resizeMode:"css",
29
+
30
+
31
+ //url parameters
32
+ z:3, //zoom
33
+ q:'Paris',//location
34
+ t: 'q', //map type q = roadmap, w = satellite
35
+ key: '',
36
+
37
+ init: function (node) {
38
+ let iframe = node.querySelector('iframe');
39
+ let url = new URL(iframe.getAttribute("src"));
40
+ let params = new URLSearchParams(url.search);
41
+
42
+ this.z = params.get("z");
43
+ this.q = params.get("q");
44
+ this.t = params.get("t");
45
+ this.key = params.get("key");
46
+
47
+ document.querySelector(".component-properties input[name=z]").value = this.z;
48
+ document.querySelector(".component-properties input[name=q]").value = this.q;
49
+ document.querySelector(".component-properties select[name=t]").value = this.t;
50
+ document.querySelector(".component-properties input[name=key]").value = this.key;
51
+ },
52
+
53
+ onChange: function (node, property, value) {
54
+ map_iframe = node.querySelector('iframe');
55
+
56
+ this[property.key] = value;
57
+
58
+ mapurl = 'https://maps.google.com/maps?q=' + this.q + '&z=' + this.z + '&t=' + this.t + '&output=embed';
59
+
60
+ map_iframe.setAttribute("src",mapurl);
61
+
62
+ return node;
63
+ },
64
+
65
+ properties: [{
66
+ name: "Address",
67
+ key: "q",
68
+ inputtype: TextInput
69
+ },{
70
+ name: "Map type",
71
+ key: "t",
72
+ inputtype: SelectInput,
73
+ data:{
74
+ options: [{
75
+ value: "q",
76
+ text: "Roadmap"
77
+ },{
78
+ value: "w",
79
+ text: "Satellite"
80
+ }]
81
+ },
82
+ },{
83
+ name: "Zoom",
84
+ key: "z",
85
+ inputtype: RangeInput,
86
+ data:{
87
+ max: 20, //max zoom level
88
+ min:1,
89
+ step:1
90
+ }
91
+ },{
92
+ name: "Key",
93
+ key: "key",
94
+ inputtype: TextInput
95
+ }]
96
+ });
97
+
98
+ Vvveb.Components.extend("_base", "widgets/openstreetmap", {
99
+ name: "Open Street Map",
100
+ attributes: ["data-component-openstreetmap"],
101
+ image: "icons/map.svg",
102
+ dragHtml: '<img src="' + Vvveb.baseUrl + 'icons/maps.png">',
103
+ html: `<div data-component-openstreetmap><iframe width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=-62.04673002474011%2C16.95487694424327%2C-61.60521696321666%2C17.196751341562923&layer=mapnik"></iframe></div>`,
104
+ resizable:true,//show select box resize handlers
105
+ resizeMode:"css",
106
+
107
+
108
+ //url parameters
109
+ bbox:'',//location
110
+ layer: 'mapnik', //map type
111
+
112
+ init: function (node) {
113
+ let iframe = node.querySelector('iframe');
114
+ let url = new URL(iframe.getAttribute("src"));
115
+ let params = new URLSearchParams(url.search);
116
+
117
+ this.bbox = params.get("bbox");
118
+ this.layer = params.get("layer");
119
+
120
+ document.querySelector(".component-properties input[name=bbox]").value = this.bbox;
121
+ document.querySelector(".component-properties input[name=layer]").value = this.layer;
122
+ },
123
+
124
+ onChange: function (node, property, value) {
125
+ map_iframe = node.querySelector('iframe');
126
+
127
+ this[property.key] = value;
128
+
129
+ mapurl = 'https://www.openstreetmap.org/export/embed.html?bbox=' + this.bbox + '&layer=' + this.layer;
130
+
131
+ map_iframe.setAttribute("src",mapurl);
132
+
133
+ return node;
134
+ },
135
+
136
+ properties: [{
137
+ name: "Map",
138
+ key: "bbox",
139
+ inputtype: TextInput
140
+ /* },{
141
+ name: "Layer",
142
+ key: "layer",
143
+ inputtype: SelectInput,
144
+ data:{
145
+ options: [{
146
+ value: "",
147
+ text: "Default"
148
+ },{
149
+ value: "Y",
150
+ text: "CyclOSM"
151
+ },{
152
+ value: "C",
153
+ text: "Cycle Map"
154
+ },{
155
+ value: "T",
156
+ text: "Transport Map"
157
+ }]
158
+ }*/
159
+ }]
160
+ });
161
+
162
+ Vvveb.Components.extend("_base", "widgets/embed-video", {
163
+ name: "Embed Video",
164
+ attributes: ["data-component-video"],
165
+ image: "icons/youtube.svg",
166
+ dragHtml: '<img src="' + Vvveb.baseUrl + 'icons/youtube.svg" width="100" height="100">', //use image for drag and swap with iframe on drop for drag performance
167
+ html: '<div data-component-video style="width:640px;height:480px;"><iframe frameborder="0" src="https://player.vimeo.com/video/24253126?autoplay=false&controls=false&loop=false&playsinline=true&muted=false" width="100%" height="100%"></iframe></div>',
168
+
169
+
170
+ //url parameters set with onChange
171
+ t:'y',//video type
172
+ video_id:'',//video id
173
+ url: '', //html5 video src
174
+ autoplay: false,
175
+ controls: false,
176
+ loop: false,
177
+ playsinline: true,
178
+ muted: false,
179
+ resizable:true,//show select box resize handlers
180
+ resizeMode:"css",//div unlike img/iframe etc does not have width,height attributes need to use css
181
+ youtubeRegex:/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]+)/i,
182
+ vimeoRegex : /(?:vimeo\.com(?:[^\d]+))(\d+)/i,
183
+
184
+ init: function (node) {
185
+ iframe = node.querySelector('iframe');
186
+ video = node.querySelector('video');
187
+
188
+ document.querySelector(".component-properties [data-key=url]").style.display = "none";
189
+ document.querySelector(".component-properties [data-key=poster]").style.display = "none";
190
+
191
+ //check if html5
192
+ if (video) {
193
+ this.url = video.src;
194
+ } else if (iframe) {//vimeo or youtube
195
+ let src = iframe.getAttribute("src");
196
+ let match;
197
+
198
+ if (src && src.indexOf("youtube") && (match = src.match(this.youtubeRegex))) {//youtube
199
+ this.video_id = match[1];
200
+ this.t = "y";
201
+ } else if (src && src.indexOf("vimeo") && (match = src.match(this.vimeoRegex))) { //vimeo
202
+ this.video_id = match[1];
203
+ this.t = "v";
204
+ } else {
205
+ this.t = "h";
206
+ }
207
+ }
208
+
209
+ document.querySelector(".component-properties input[name=video_id]").value = this.video_id;
210
+ document.querySelector(".component-properties input[name=url]").value = this.url;
211
+ document.querySelector(".component-properties select[name=t]").value = this.t;
212
+ },
213
+
214
+ onChange: function (node, property, value) {
215
+ this[property.key] = value;
216
+ //if (property.key == "t")
217
+ {
218
+ switch (this.t) {
219
+ case 'y':
220
+ document.querySelector(".component-properties [data-key=video_id]").style.display = "";
221
+ document.querySelector(".component-properties [data-key=url]").style.display = "none";
222
+ document.querySelector(".component-properties [data-key=poster]").style.display = "none";
223
+
224
+ newnode = generateElements(`<iframe width="100%" height="100%" allowfullscreen="true" frameborder="0" allow="autoplay"
225
+ src="https://www.youtube.com/embed/${this.video_id}?autoplay=${this.autoplay}&controls=${this.controls}&loop=${this.loop}&playsinline=${this.playsinline}&muted=${this.muted}">
226
+ </iframe>`)[0];
227
+ break;
228
+ case 'v':
229
+ document.querySelector(".component-properties [data-key=video_id]").style.display = "";
230
+ document.querySelector(".component-properties [data-key=url]").style.display = "none";
231
+ document.querySelector(".component-properties [data-key=poster]").style.display = "none";
232
+ newnode = generateElements(`<iframe width="100%" height="100%" allowfullscreen="true" frameborder="0" allow="autoplay"
233
+ src="https://player.vimeo.com/video/${this.video_id}?autoplay=${this.autoplay}&controls=${this.controls}&loop=${this.loop}&playsinline=${this.playsinline}&muted=${this.muted}">
234
+ </iframe>`)[0];
235
+ break;
236
+ case 'h':
237
+ document.querySelector(".component-properties [data-key=video_id]").style.display = "none";
238
+ document.querySelector(".component-properties [data-key=url]").style.display = "";
239
+ document.querySelector(".component-properties [data-key=poster]").style.display = "";
240
+ newnode = generateElements('<video poster="' + this.poster + '" src="' + this.url + '" ' + (this.autoplay?' autoplay ':'') + (this.controls?' controls ':'') + (this.loop?' loop ':'') + (this.playsinline?' playsinline ':'') + (this.muted?' muted ':'') + ' style="height: 100%; width: 100%;"></video>')[0];
241
+ break;
242
+ }
243
+
244
+ node.querySelector(":scope > iframe,:scope > video").replaceWith(newnode);
245
+ return node;
246
+ }
247
+
248
+ return node;
249
+ },
250
+
251
+ properties: [{
252
+ name: "Provider",
253
+ key: "t",
254
+ inputtype: SelectInput,
255
+ data:{
256
+ options: [{
257
+ text: "Youtube",
258
+ value: "y"
259
+ },{
260
+ text: "Vimeo",
261
+ value: "v"
262
+ },{
263
+ text: "HTML5",
264
+ value: "h"
265
+ }]
266
+ },
267
+ },{
268
+ name: "Video",
269
+ key: "video_id",
270
+ inputtype: TextInput,
271
+ onChange: function(node, value, input, component) {
272
+
273
+ let youtube = /(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]+)/i;
274
+ let vimeo = /(?:vimeo\.com(?:[^\d]+))(\d+)/i;
275
+ let id = false;
276
+ let t = false;
277
+
278
+ if (((id = value.match(youtube)) && (t = "y")) || ((id = value.match(vimeo)) && (t = "v"))) {
279
+ document.querySelector(".component-properties select[name=t]").value = t;
280
+ document.querySelector(".component-properties select[name=video_id]").value = id[1];
281
+
282
+ component.t = t;
283
+ component.video_id = id[1];
284
+
285
+ return id[1];
286
+ }
287
+
288
+ return node;
289
+ }
290
+ },{
291
+ name: "Poster",
292
+ key: "poster",
293
+ htmlAttr: "poster",
294
+ inputtype: ImageInput
295
+ },{
296
+ name: "Url",
297
+ key: "url",
298
+ inputtype: TextInput
299
+ },{
300
+ name: "Width",
301
+ key: "width",
302
+ htmlAttr: "style",
303
+ inline:false,
304
+ col:6,
305
+ inputtype: CssUnitInput
306
+ },{
307
+ name: "Height",
308
+ key: "height",
309
+ htmlAttr: "style",
310
+ inline:false,
311
+ col:6,
312
+ inputtype: CssUnitInput
313
+ },{
314
+ key: "video_options",
315
+ inputtype: SectionInput,
316
+ name:false,
317
+ data: {header:"Options"},
318
+ },{
319
+ name: "Auto play",
320
+ key: "autoplay",
321
+ htmlAttr: "autoplay",
322
+ inline:true,
323
+ col:4,
324
+ inputtype: CheckboxInput
325
+ },{
326
+ name: "Plays inline",
327
+ key: "playsinline",
328
+ htmlAttr: "playsinline",
329
+ inline:true,
330
+ col:4,
331
+ inputtype: CheckboxInput
332
+ },{
333
+ name: "Controls",
334
+ key: "controls",
335
+ htmlAttr: "controls",
336
+ inline:true,
337
+ col:4,
338
+ inputtype: CheckboxInput
339
+ },{
340
+ name: "Loop",
341
+ key: "loop",
342
+ htmlAttr: "loop",
343
+ inline:true,
344
+ col:4,
345
+ inputtype: CheckboxInput
346
+ },{
347
+ name: "Muted",
348
+ key: "muted",
349
+ htmlAttr: "muted",
350
+ inline:true,
351
+ col:4,
352
+ inputtype: CheckboxInput
353
+ },{
354
+ name:"",
355
+ key: "autoplay_warning",
356
+ inline:false,
357
+ col:12,
358
+ inputtype: NoticeInput,
359
+ data: {
360
+ type:'warning',
361
+ title:'Autoplay',
362
+ text:'Most browsers allow auto play only if video is muted and plays inline'
363
+ }
364
+ }]
365
+ });
366
+
367
+ Vvveb.Components.extend("_base", "widgets/facebookcomments", {
368
+ name: "Facebook Comments",
369
+ attributes: ["data-component-facebookcomments"],
370
+ image: "icons/facebook.svg",
371
+ dragHtml: '<img src="' + Vvveb.baseUrl + 'icons/facebook.svg">',
372
+ html: '<div data-component-facebookcomments><script>(function(d, s, id) {\
373
+ let js, fjs = d.getElementsByTagName(s)[0];\
374
+ if (d.getElementById(id)) return;\
375
+ js = d.createElement(s); js.id = id;\
376
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6&appId=";\
377
+ fjs.parentNode.insertBefore(js, fjs);\
378
+ }(document, \'script\', \'facebook-jssdk\'));</script>\
379
+ <div class="fb-comments" \
380
+ data-href="' + window.location.href + '" \
381
+ data-numposts="5" \
382
+ data-colorscheme="light" \
383
+ data-mobile="" \
384
+ data-order-by="social" \
385
+ data-width="100%" \
386
+ ></div></div>',
387
+ properties: [{
388
+ name: "Href",
389
+ key: "business",
390
+ htmlAttr: "data-href",
391
+ child:".fb-comments",
392
+ inputtype: TextInput
393
+ },{
394
+ name: "Item name",
395
+ key: "item_name",
396
+ htmlAttr: "data-numposts",
397
+ child:".fb-comments",
398
+ inputtype: TextInput
399
+ },{
400
+ name: "Color scheme",
401
+ key: "colorscheme",
402
+ htmlAttr: "data-colorscheme",
403
+ child:".fb-comments",
404
+ inputtype: TextInput
405
+ },{
406
+ name: "Order by",
407
+ key: "order-by",
408
+ htmlAttr: "data-order-by",
409
+ child:".fb-comments",
410
+ inputtype: TextInput
411
+ },{
412
+ name: "Currency code",
413
+ key: "width",
414
+ htmlAttr: "data-width",
415
+ child:".fb-comments",
416
+ inputtype: TextInput
417
+ }]
418
+ });
419
+ /*
420
+ Vvveb.Components.extend("_base", "widgets/instagram", {
421
+ name: "Instagram",
422
+ attributes: ["data-component-instagram"],
423
+ image: "icons/instagram.svg",
424
+ drophtml: '<img src="' + Vvveb.baseUrl + 'icons/instagram.png">',
425
+ html: '<div align=center data-component-instagram>\
426
+ <blockquote class="instagram-media" data-instgrm-captioned data-instgrm-permalink="https://www.instagram.com/p/tsxp1hhQTG/" data-instgrm-version="8" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);"><div style="padding:8px;"> <div style=" background:#F8F8F8; line-height:0; margin-top:40px; padding:50% 0; text-align:center; width:100%;"> <div style=" background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;"></div></div> <p style=" margin:8px 0 0 0; padding:0 4px;"> <a href="https://www.instagram.com/p/tsxp1hhQTG/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" target="_blank">Text</a></p> <p style=" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;">A post shared by <a href="https://www.instagram.com/instagram/" style=" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px;" target="_blank"> Instagram</a> (@instagram) on <time style=" font-family:Arial,sans-serif; font-size:14px; line-height:17px;" datetime="-">-</time></p></div></blockquote>\
427
+ <script async defer src="//www.instagram.com/embed.js"></script>\
428
+ </div>',
429
+ properties: [{
430
+ name: "Widget id",
431
+ key: "instgrm-permalink",
432
+ htmlAttr: "data-instgrm-permalink",
433
+ child: ".instagram-media",
434
+ inputtype: TextInput
435
+ }],
436
+ });
437
+ */
438
+ Vvveb.Components.extend("_base", "widgets/twitter", {
439
+ name: "Twitter",
440
+ attributes: ["data-component-twitter"],
441
+ image: "icons/twitter.svg",
442
+ dragHtml: '<img src="' + Vvveb.baseUrl + 'icons/twitter.svg">',
443
+ html: '<div data-component-twitter><iframe width="100%" height="100%"src="https://platform.twitter.com/embed/Tweet.html?embedId=twitter-widget-0&frame=false&hideCard=false&hideThread=false&id=943901463998169088"></iframe></div>',
444
+ resizable:true,//show select box resize handlers
445
+ resizeMode:"css",
446
+ twitterRegex : /(?:twitter\.com(?:[^\d]+))(\d+)/i,
447
+
448
+ tweet:'',//location
449
+ init: function (node) {
450
+ let iframe = node.querySelector('iframe');
451
+ let src = iframe.getAttribute("src");
452
+ let url = new URL(src);
453
+ let params = new URLSearchParams(url.search);
454
+
455
+ this.tweet = params.get("id");
456
+
457
+ if (!this.tweet) {
458
+ if (match = src.match(this.twitterRegex)) {
459
+ this.tweet = match[1];
460
+ }
461
+
462
+ }
463
+
464
+ document.querySelector(".component-properties input[name=tweet]").value = this.tweet;
465
+ },
466
+
467
+ onChange: function (node, property, value) {
468
+ tweet_iframe = node.querySelector('iframe');
469
+
470
+ if (property.key == "tweet") {
471
+ this[property.key] = value;
472
+
473
+ tweeturl = 'https://platform.twitter.com/embed/Tweet.html?embedId=twitter-widget-0&frame=false&hideCard=false&hideThread=false&id=' + this.tweet;
474
+
475
+ tweet_iframe.setAttribute("src",tweeturl);
476
+ }
477
+
478
+ return node;
479
+ },
480
+
481
+ properties: [{
482
+ name: "Tweet",
483
+ key: "tweet",
484
+ inputtype: TextInput,
485
+ onChange: function(node, value, input, component) {
486
+
487
+ let twitterRegex = /(?:twitter\.com(?:[^\d]+))(\d+)/i;
488
+ let id = false;
489
+
490
+ if (id = value.match(twitterRegex)) {
491
+ document.querySelector(".component-properties input[name=tweet]").value = id[1];
492
+
493
+ component.tweet = id[1];
494
+ return id[1];
495
+ }
496
+
497
+ return node;
498
+ }
499
+ }]
500
+ });
501
+
502
+ Vvveb.Components.extend("_base", "widgets/paypal", {
503
+ name: "Paypal",
504
+ attributes: ["data-component-paypal"],
505
+ image: "icons/paypal.svg",
506
+ html: '<form action="https://www.paypal.com/cgi-bin/webscr" method="post" data-component-paypal>\
507
+ \
508
+ <!-- Identify your business so that you can collect the payments. -->\
509
+ <input type="hidden" name="business"\
510
+ value="givanz@yahoo.com">\
511
+ \
512
+ <!-- Specify a Donate button. -->\
513
+ <input type="hidden" name="cmd" value="_donations">\
514
+ \
515
+ <!-- Specify details about the contribution -->\
516
+ <input type="hidden" name="item_name" value="VvvebJs">\
517
+ <input type="hidden" name="item_number" value="Support">\
518
+ <input type="hidden" name="currency_code" value="USD">\
519
+ \
520
+ <!-- Display the payment button. -->\
521
+ <input type="image" name="submit"\
522
+ src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"\
523
+ alt="Donate">\
524
+ <img alt="" width="1" height="1"\
525
+ src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >\
526
+ \
527
+ </form>',
528
+ properties: [{
529
+ name: "Email",
530
+ key: "business",
531
+ htmlAttr: "value",
532
+ child:"input[name='business']",
533
+ inputtype: TextInput
534
+ },{
535
+ name: "Item name",
536
+ key: "item_name",
537
+ htmlAttr: "value",
538
+ child:"input[name='item_name']",
539
+ inputtype: TextInput
540
+ },{
541
+ name: "Item number",
542
+ key: "item_number",
543
+ htmlAttr: "value",
544
+ child:"input[name='item_number']",
545
+ inputtype: TextInput
546
+ },{
547
+ name: "Currency code",
548
+ key: "currency_code",
549
+ htmlAttr: "value",
550
+ child:"input[name='currency_code']",
551
+ inputtype: TextInput
552
+ }],
553
+ });
554
+
555
+ Vvveb.Components.extend("_base", "widgets/facebookpage", {
556
+ name: "Facebook Page Plugin",
557
+ attributes: ["data-component-facebookpage"],
558
+ image: "icons/facebook.svg",
559
+ dropHtml: '<img src="' + Vvveb.baseUrl + 'icons/facebook.png">',
560
+ html: `<div data-component-facebookpage><div class="fb-page"
561
+ data-href="https://www.facebook.com/facebook"
562
+ data-tabs="timeline"
563
+ data-width=""
564
+ data-height=""
565
+ data-small-header="true"
566
+ data-adapt-container-width="true"
567
+ data-hide-cover="false"
568
+ data-show-facepile="true">
569
+
570
+ <blockquote cite="https://www.facebook.com/facebook" class="fb-xfbml-parse-ignore">
571
+ <a href="https://www.facebook.com/facebook">Facebook</a>
572
+ </blockquote>
573
+
574
+ </div>
575
+
576
+ <div id="fb-root"></div>
577
+ <script async defer crossorigin="anonymous" src="https://connect.facebook.net/ro_RO/sdk.js#xfbml=1&version=v15.0" nonce="o7Y7zPjy"></script>
578
+ </div>`,
579
+
580
+ properties: [{
581
+ name: "Small header",
582
+ key: "small-header",
583
+ htmlAttr: "data-small-header",
584
+ child:".fb-page",
585
+ inputtype: TextInput
586
+ },{
587
+ name: "Adapt container width",
588
+ key: "adapt-container-width",
589
+ htmlAttr: "data-adapt-container-width",
590
+ child:".fb-page",
591
+ inputtype: TextInput
592
+ },{
593
+ name: "Hide cover",
594
+ key: "hide-cover",
595
+ htmlAttr: "data-hide-cover",
596
+ child:".fb-page",
597
+ inputtype: TextInput
598
+ },{
599
+ name: "Show facepile",
600
+ key: "show-facepile",
601
+ htmlAttr: "data-show-facepile",
602
+ child:".fb-page",
603
+ inputtype: TextInput
604
+ },{
605
+ name: "App Id",
606
+ key: "appid",
607
+ htmlAttr: "data-appId",
608
+ child:".fb-page",
609
+ inputtype: TextInput
610
+ }],
611
+ onChange: function(node, input, value, component) {
612
+
613
+ let newElement = generateElements(this.html)[0];
614
+ newElement.find(".fb-page").setAttribute(input.htmlAttr, value);
615
+
616
+ frameHead.querySelector("[data-fbcssmodules]").remove();
617
+ frameBody.querySelector("[data-fbcssmodules]").remove();
618
+ frameHead.querySelector("script[src^='https://connect.facebook.net']").remove();
619
+
620
+
621
+ node.parent().html(newElement.html());
622
+ return newElement;
623
+ }
624
+ });
625
+
626
+ Vvveb.Components.extend("_base", "widgets/chartjs", {
627
+ name: "Chart.js",
628
+ attributes: ["data-component-chartjs"],
629
+ image: "icons/chart.svg",
630
+ dragHtml: '<img src="' + Vvveb.baseUrl + 'icons/chart.svg">',
631
+ html: '<div data-component-chartjs class="chartjs" data-chart=\'{\
632
+ "type": "line",\
633
+ "data": {\
634
+ "labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],\
635
+ "datasets": [{\
636
+ "data": [12, 19, 3, 5, 2, 3],\
637
+ "fill": false,\
638
+ "borderColor":"rgba(255, 99, 132, 0.2)"\
639
+ },{\
640
+ "fill": false,\
641
+ "data": [3, 15, 7, 4, 19, 12],\
642
+ "borderColor": "rgba(54, 162, 235, 0.2)"\
643
+ }]\
644
+ }}\' style="min-height:240px;min-width:240px;width:100%;height:100%;position:relative">\
645
+ <canvas></canvas>\
646
+ </div>',
647
+ chartjs: null,
648
+ ctx: null,
649
+ node: null,
650
+
651
+ config: {/*
652
+ type: 'line',
653
+ data: {
654
+ labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
655
+ datasets: [{
656
+ data: [12, 19, 3, 5, 2, 3],
657
+ fill: false,
658
+ borderColor:'rgba(255, 99, 132, 0.2)',
659
+ },{
660
+ fill: false,
661
+ data: [3, 15, 7, 4, 19, 12],
662
+ borderColor: 'rgba(54, 162, 235, 0.2)',
663
+ }]
664
+ },*/
665
+ },
666
+
667
+ dragStart: function (node) {
668
+ //check if chartjs is included and if not add it when drag starts to allow the script to load
669
+ body = Vvveb.Builder.frameBody;
670
+
671
+ if (document.getElementById("#chartjs-script")) {
672
+ body.append(generateElements('<script id="chartjs-script" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.min.js"></script>')[0]);
673
+ body.append(generateElements('<script>\
674
+ $(document).ready(function() {\
675
+ $(".chartjs").each(function () {\
676
+ ctx = $("canvas", this).get(0).getContext("2d");\
677
+ config = JSON.parse(this.dataset.chart);\
678
+ chartjs = new Chart(ctx, config);\
679
+ });\
680
+ \});\
681
+ </script>')[0]);
682
+ }
683
+
684
+ return node;
685
+ },
686
+
687
+
688
+ drawChart: function () {
689
+ if (this.chartjs != null) this.chartjs.destroy();
690
+ this.node.dataset.chart = JSON.stringify(this.config);
691
+
692
+ config = Object.assign({}, this.config);//avoid passing by reference to avoid chartjs to fill the object
693
+ this.chartjs = new Chart(this.ctx, config);
694
+ },
695
+
696
+ init: function (node) {
697
+ this.node = node;
698
+ this.ctx = node.querySelector("canvas").getContext("2d");
699
+ this.config = JSON.parse(node.dataset.chart);
700
+ this.drawChart();
701
+
702
+ return node;
703
+ },
704
+
705
+
706
+ beforeInit: function (node) {
707
+ return node;
708
+ },
709
+
710
+ properties: [{
711
+ name: "Type",
712
+ key: "type",
713
+ inputtype: SelectInput,
714
+ data:{
715
+ options: [{
716
+ text: "Line",
717
+ value: "line"
718
+ },{
719
+ text: "Bar",
720
+ value: "bar"
721
+ },{
722
+ text: "Pie",
723
+ value: "pie"
724
+ },{
725
+ text: "Doughnut",
726
+ value: "doughnut"
727
+ },{
728
+ text: "Polar Area",
729
+ value: "polarArea"
730
+ },{
731
+ text: "Bubble",
732
+ value: "bubble"
733
+ },{
734
+ text: "Scatter",
735
+ value: "scatter"
736
+ },{
737
+ text: "Radar",
738
+ value: "radar"
739
+ }]
740
+ },
741
+ init: function(node) {
742
+ return JSON.parse(node.dataset.chart).type;
743
+ },
744
+ onChange: function(node, value, input, component) {
745
+ component.config.type = value;
746
+ component.drawChart();
747
+
748
+ return node;
749
+ }
750
+ }]
751
+ });
752
+
753
+ function lottieAfterDrop(node) {
754
+ //check if lottie js is included and if not add it when drag starts to allow the script to load
755
+ body = Vvveb.Builder.frameBody;
756
+
757
+ if (!body.querySelector("#lottie-js")) {
758
+ let lib = document.createElement('script');
759
+ let code = document.createElement('script');
760
+ lib.id = 'lottie-js';
761
+ lib.type = 'text/javascript';
762
+ lib.src = 'https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js';
763
+ code.type = 'text/javascript';
764
+ code.text = `
765
+ let lottie = [];
766
+ function initLottie(onlyNew = false) {
767
+ if (typeof bodymovin == "undefined") return;
768
+
769
+
770
+ let list = document.querySelectorAll('.lottie' + (onlyNew ? ":not(.lottie-initialized)" : "") );
771
+ list.forEach(el => {
772
+ el.replaceChildren();
773
+ let animItem = bodymovin.loadAnimation({
774
+ wrapper: el,
775
+ animType: 'svg',
776
+ loop: (el.dataset.loop == "true" ? true : false),
777
+ autoplay: (el.dataset.autoplay == "true" ? true : false),
778
+ path: el.dataset.path
779
+ });
780
+
781
+ });
782
+ }
783
+
784
+ if (document.readyState !== 'loading') {
785
+ initLottie();
786
+ } else {
787
+ document.addEventListener('DOMContentLoaded', initLottie);
788
+ }`;
789
+
790
+ body.appendChild(lib);
791
+ body.appendChild(code);
792
+
793
+ lib.addEventListener('load', function() {
794
+ Vvveb.Builder.iframe.contentWindow.initLottie();
795
+ });
796
+ } else {
797
+ Vvveb.Builder.iframe.contentWindow.initLottie(true);
798
+ }
799
+
800
+ return node;
801
+ };
802
+
803
+ Vvveb.Components.add("widgets/lottie", {
804
+ name: "Lottie",
805
+ image: "icons/lottie.svg",
806
+ attributes: ["data-component-lottie"],
807
+ html: `
808
+ <div class="lottie" data-component-lottie data-path="https://labs.nearpod.com/bodymovin/demo/markus/isometric/markus2.json" data-loop="true" data-autoplay="true">
809
+ </div>
810
+ `,
811
+ afterDrop: lottieAfterDrop,
812
+
813
+ onChange: function (node, property, value) {
814
+ Vvveb.Builder.iframe.contentWindow.initLottie();
815
+ Vvveb.Builder.selectNode(node);
816
+ return node;
817
+ },
818
+
819
+ properties: [{
820
+ name: "Path",
821
+ key: "path",
822
+ //inputtype: ImageInput,
823
+ inputtype: TextInput,
824
+ htmlAttr:"data-path",
825
+ },{
826
+ name: "Autoplay",
827
+ key: "autoplay",
828
+ htmlAttr:"data-autoplay",
829
+ inputtype: CheckboxInput,
830
+ inline:true,
831
+ col:4
832
+ },{ name: "Loop",
833
+ key: "loop",
834
+ htmlAttr:"data-loop",
835
+ inputtype: CheckboxInput,
836
+ inline:true,
837
+ col:4
838
+ }]
839
+ });
libs/builder/icons/accordion.svg ADDED
libs/builder/icons/alert.svg ADDED
libs/builder/icons/archives.svg ADDED
libs/builder/icons/arrow-down.svg ADDED
libs/builder/icons/arrow-right.svg ADDED
libs/builder/icons/audio.svg ADDED
libs/builder/icons/badge.svg ADDED
libs/builder/icons/bell.svg ADDED
libs/builder/icons/blockquote.svg ADDED
libs/builder/icons/breadcrumbs.svg ADDED
libs/builder/icons/button.svg ADDED
libs/builder/icons/button_group.svg ADDED
libs/builder/icons/button_toolbar.svg ADDED
libs/builder/icons/calendar.svg ADDED
libs/builder/icons/carousel.svg ADDED
libs/builder/icons/cart.svg ADDED
libs/builder/icons/categories.svg ADDED
libs/builder/icons/chart.svg ADDED
libs/builder/icons/checkbox.svg ADDED
libs/builder/icons/checkout.svg ADDED
libs/builder/icons/chevron-down.svg ADDED
libs/builder/icons/chevron-right.svg ADDED
libs/builder/icons/code.svg ADDED
libs/builder/icons/components/cart.svg ADDED
libs/builder/icons/components/checkbox.svg ADDED
libs/builder/icons/components/contact-form.svg ADDED
libs/builder/icons/components/map.svg ADDED
libs/builder/icons/container.svg ADDED
libs/builder/icons/currency.svg ADDED
libs/builder/icons/dots_three.svg ADDED
libs/builder/icons/envelope.svg ADDED
libs/builder/icons/facebook.svg ADDED