effective_bootstrap 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/app/assets/images/icons/activity.svg +1 -13
  4. data/app/assets/images/icons/airplay.svg +1 -14
  5. data/app/assets/images/icons/alert-circle.svg +1 -15
  6. data/app/assets/images/icons/alert-octagon.svg +1 -15
  7. data/app/assets/images/icons/alert-triangle.svg +1 -15
  8. data/app/assets/images/icons/align-center.svg +1 -16
  9. data/app/assets/images/icons/align-justify.svg +1 -16
  10. data/app/assets/images/icons/align-left.svg +1 -16
  11. data/app/assets/images/icons/align-right.svg +1 -16
  12. data/app/assets/images/icons/anchor.svg +1 -15
  13. data/app/assets/images/icons/aperture.svg +1 -19
  14. data/app/assets/images/icons/archive.svg +1 -0
  15. data/app/assets/images/icons/arrow-down-circle.svg +1 -15
  16. data/app/assets/images/icons/arrow-down-left.svg +1 -14
  17. data/app/assets/images/icons/arrow-down-right.svg +1 -14
  18. data/app/assets/images/icons/arrow-down.svg +1 -14
  19. data/app/assets/images/icons/arrow-left-circle.svg +1 -15
  20. data/app/assets/images/icons/arrow-left.svg +1 -14
  21. data/app/assets/images/icons/arrow-right-circle.svg +1 -15
  22. data/app/assets/images/icons/arrow-right.svg +1 -14
  23. data/app/assets/images/icons/arrow-up-circle.svg +1 -15
  24. data/app/assets/images/icons/arrow-up-left.svg +1 -14
  25. data/app/assets/images/icons/arrow-up-right.svg +1 -14
  26. data/app/assets/images/icons/arrow-up.svg +1 -14
  27. data/app/assets/images/icons/at-sign.svg +1 -14
  28. data/app/assets/images/icons/award.svg +1 -14
  29. data/app/assets/images/icons/bar-chart-2.svg +1 -15
  30. data/app/assets/images/icons/bar-chart.svg +1 -15
  31. data/app/assets/images/icons/battery-charging.svg +1 -15
  32. data/app/assets/images/icons/battery.svg +1 -14
  33. data/app/assets/images/icons/bell-off.svg +1 -14
  34. data/app/assets/images/icons/bell.svg +1 -13
  35. data/app/assets/images/icons/bluetooth.svg +1 -13
  36. data/app/assets/images/icons/bold.svg +1 -14
  37. data/app/assets/images/icons/book-open.svg +1 -14
  38. data/app/assets/images/icons/book.svg +1 -14
  39. data/app/assets/images/icons/bookmark.svg +1 -13
  40. data/app/assets/images/icons/box.svg +1 -15
  41. data/app/assets/images/icons/briefcase.svg +1 -14
  42. data/app/assets/images/icons/calendar.svg +1 -16
  43. data/app/assets/images/icons/camera-off.svg +1 -14
  44. data/app/assets/images/icons/camera.svg +1 -14
  45. data/app/assets/images/icons/cast.svg +1 -14
  46. data/app/assets/images/icons/check-circle.svg +1 -14
  47. data/app/assets/images/icons/check-square.svg +1 -14
  48. data/app/assets/images/icons/check.svg +1 -13
  49. data/app/assets/images/icons/chevron-down.svg +1 -13
  50. data/app/assets/images/icons/chevron-left.svg +1 -13
  51. data/app/assets/images/icons/chevron-right.svg +1 -13
  52. data/app/assets/images/icons/chevron-up.svg +1 -13
  53. data/app/assets/images/icons/chevrons-down.svg +1 -14
  54. data/app/assets/images/icons/chevrons-left.svg +1 -14
  55. data/app/assets/images/icons/chevrons-right.svg +1 -14
  56. data/app/assets/images/icons/chevrons-up.svg +1 -14
  57. data/app/assets/images/icons/chrome.svg +1 -17
  58. data/app/assets/images/icons/circle.svg +1 -13
  59. data/app/assets/images/icons/clipboard.svg +1 -14
  60. data/app/assets/images/icons/clock.svg +1 -14
  61. data/app/assets/images/icons/cloud-drizzle.svg +1 -19
  62. data/app/assets/images/icons/cloud-lightning.svg +1 -14
  63. data/app/assets/images/icons/cloud-off.svg +1 -14
  64. data/app/assets/images/icons/cloud-rain.svg +1 -16
  65. data/app/assets/images/icons/cloud-snow.svg +1 -19
  66. data/app/assets/images/icons/cloud.svg +1 -13
  67. data/app/assets/images/icons/code.svg +1 -14
  68. data/app/assets/images/icons/codepen.svg +1 -17
  69. data/app/assets/images/icons/codesandbox.svg +1 -0
  70. data/app/assets/images/icons/coffee.svg +1 -0
  71. data/app/assets/images/icons/columns.svg +1 -0
  72. data/app/assets/images/icons/command.svg +1 -13
  73. data/app/assets/images/icons/compass.svg +1 -14
  74. data/app/assets/images/icons/copy.svg +1 -14
  75. data/app/assets/images/icons/corner-down-left.svg +1 -14
  76. data/app/assets/images/icons/corner-down-right.svg +1 -14
  77. data/app/assets/images/icons/corner-left-down.svg +1 -14
  78. data/app/assets/images/icons/corner-left-up.svg +1 -14
  79. data/app/assets/images/icons/corner-right-down.svg +1 -14
  80. data/app/assets/images/icons/corner-right-up.svg +1 -14
  81. data/app/assets/images/icons/corner-up-left.svg +1 -14
  82. data/app/assets/images/icons/corner-up-right.svg +1 -14
  83. data/app/assets/images/icons/cpu.svg +1 -22
  84. data/app/assets/images/icons/credit-card.svg +1 -14
  85. data/app/assets/images/icons/crop.svg +1 -14
  86. data/app/assets/images/icons/crosshair.svg +1 -17
  87. data/app/assets/images/icons/database.svg +1 -15
  88. data/app/assets/images/icons/delete.svg +1 -15
  89. data/app/assets/images/icons/disc.svg +1 -14
  90. data/app/assets/images/icons/dollar-sign.svg +1 -14
  91. data/app/assets/images/icons/download-cloud.svg +1 -15
  92. data/app/assets/images/icons/download.svg +1 -15
  93. data/app/assets/images/icons/droplet.svg +1 -13
  94. data/app/assets/images/icons/edit-2.svg +1 -13
  95. data/app/assets/images/icons/edit-3.svg +1 -14
  96. data/app/assets/images/icons/edit.svg +1 -14
  97. data/app/assets/images/icons/external-link.svg +1 -15
  98. data/app/assets/images/icons/eye-off.svg +1 -14
  99. data/app/assets/images/icons/eye.svg +1 -14
  100. data/app/assets/images/icons/facebook.svg +1 -13
  101. data/app/assets/images/icons/fast-forward.svg +1 -14
  102. data/app/assets/images/icons/feather.svg +1 -15
  103. data/app/assets/images/icons/figma.svg +1 -0
  104. data/app/assets/images/icons/file-minus.svg +1 -15
  105. data/app/assets/images/icons/file-plus.svg +1 -16
  106. data/app/assets/images/icons/file-text.svg +1 -17
  107. data/app/assets/images/icons/file.svg +1 -14
  108. data/app/assets/images/icons/film.svg +1 -20
  109. data/app/assets/images/icons/filter.svg +1 -13
  110. data/app/assets/images/icons/flag.svg +1 -14
  111. data/app/assets/images/icons/folder-minus.svg +1 -14
  112. data/app/assets/images/icons/folder-plus.svg +1 -15
  113. data/app/assets/images/icons/folder.svg +1 -13
  114. data/app/assets/images/icons/framer.svg +1 -0
  115. data/app/assets/images/icons/frown.svg +1 -0
  116. data/app/assets/images/icons/gift.svg +1 -0
  117. data/app/assets/images/icons/git-branch.svg +1 -16
  118. data/app/assets/images/icons/git-commit.svg +1 -15
  119. data/app/assets/images/icons/git-merge.svg +1 -15
  120. data/app/assets/images/icons/git-pull-request.svg +1 -16
  121. data/app/assets/images/icons/github.svg +1 -13
  122. data/app/assets/images/icons/gitlab.svg +1 -13
  123. data/app/assets/images/icons/globe.svg +1 -15
  124. data/app/assets/images/icons/grid.svg +1 -16
  125. data/app/assets/images/icons/hard-drive.svg +1 -16
  126. data/app/assets/images/icons/hash.svg +1 -16
  127. data/app/assets/images/icons/headphones.svg +1 -14
  128. data/app/assets/images/icons/heart.svg +1 -13
  129. data/app/assets/images/icons/help-circle.svg +1 -15
  130. data/app/assets/images/icons/hexagon.svg +1 -0
  131. data/app/assets/images/icons/home.svg +1 -14
  132. data/app/assets/images/icons/image.svg +1 -15
  133. data/app/assets/images/icons/inbox.svg +1 -14
  134. data/app/assets/images/icons/info.svg +1 -15
  135. data/app/assets/images/icons/instagram.svg +1 -15
  136. data/app/assets/images/icons/italic.svg +1 -15
  137. data/app/assets/images/icons/key.svg +1 -0
  138. data/app/assets/images/icons/layers.svg +1 -15
  139. data/app/assets/images/icons/layout.svg +1 -15
  140. data/app/assets/images/icons/life-buoy.svg +1 -19
  141. data/app/assets/images/icons/link-2.svg +1 -14
  142. data/app/assets/images/icons/link.svg +1 -14
  143. data/app/assets/images/icons/linkedin.svg +1 -15
  144. data/app/assets/images/icons/list.svg +1 -18
  145. data/app/assets/images/icons/loader.svg +1 -20
  146. data/app/assets/images/icons/lock.svg +1 -14
  147. data/app/assets/images/icons/log-in.svg +1 -15
  148. data/app/assets/images/icons/log-out.svg +1 -15
  149. data/app/assets/images/icons/mail.svg +1 -14
  150. data/app/assets/images/icons/map-pin.svg +1 -14
  151. data/app/assets/images/icons/map.svg +1 -15
  152. data/app/assets/images/icons/maximize-2.svg +1 -16
  153. data/app/assets/images/icons/maximize.svg +1 -13
  154. data/app/assets/images/icons/meh.svg +1 -0
  155. data/app/assets/images/icons/menu.svg +1 -15
  156. data/app/assets/images/icons/message-circle.svg +1 -13
  157. data/app/assets/images/icons/message-square.svg +1 -13
  158. data/app/assets/images/icons/mic-off.svg +1 -17
  159. data/app/assets/images/icons/mic.svg +1 -16
  160. data/app/assets/images/icons/minimize-2.svg +1 -16
  161. data/app/assets/images/icons/minimize.svg +1 -13
  162. data/app/assets/images/icons/minus-circle.svg +1 -14
  163. data/app/assets/images/icons/minus-square.svg +1 -14
  164. data/app/assets/images/icons/minus.svg +1 -13
  165. data/app/assets/images/icons/monitor.svg +1 -15
  166. data/app/assets/images/icons/moon.svg +1 -13
  167. data/app/assets/images/icons/more-horizontal.svg +1 -15
  168. data/app/assets/images/icons/more-vertical.svg +1 -15
  169. data/app/assets/images/icons/mouse-pointer.svg +1 -0
  170. data/app/assets/images/icons/move.svg +1 -18
  171. data/app/assets/images/icons/music.svg +1 -14
  172. data/app/assets/images/icons/navigation-2.svg +1 -13
  173. data/app/assets/images/icons/navigation.svg +1 -13
  174. data/app/assets/images/icons/octagon.svg +1 -13
  175. data/app/assets/images/icons/package.svg +1 -16
  176. data/app/assets/images/icons/paperclip.svg +1 -13
  177. data/app/assets/images/icons/pause-circle.svg +1 -15
  178. data/app/assets/images/icons/pause.svg +1 -14
  179. data/app/assets/images/icons/pen-tool.svg +1 -0
  180. data/app/assets/images/icons/percent.svg +1 -15
  181. data/app/assets/images/icons/phone-call.svg +1 -13
  182. data/app/assets/images/icons/phone-forwarded.svg +1 -15
  183. data/app/assets/images/icons/phone-incoming.svg +1 -15
  184. data/app/assets/images/icons/phone-missed.svg +1 -15
  185. data/app/assets/images/icons/phone-off.svg +1 -14
  186. data/app/assets/images/icons/phone-outgoing.svg +1 -15
  187. data/app/assets/images/icons/phone.svg +1 -13
  188. data/app/assets/images/icons/pie-chart.svg +1 -14
  189. data/app/assets/images/icons/play-circle.svg +1 -14
  190. data/app/assets/images/icons/play.svg +1 -13
  191. data/app/assets/images/icons/plus-circle.svg +1 -15
  192. data/app/assets/images/icons/plus-square.svg +1 -15
  193. data/app/assets/images/icons/plus.svg +1 -14
  194. data/app/assets/images/icons/pocket.svg +1 -14
  195. data/app/assets/images/icons/power.svg +1 -14
  196. data/app/assets/images/icons/printer.svg +1 -15
  197. data/app/assets/images/icons/radio.svg +1 -14
  198. data/app/assets/images/icons/refresh-ccw.svg +1 -15
  199. data/app/assets/images/icons/refresh-cw.svg +1 -15
  200. data/app/assets/images/icons/repeat.svg +1 -16
  201. data/app/assets/images/icons/rewind.svg +1 -14
  202. data/app/assets/images/icons/rotate-ccw.svg +1 -14
  203. data/app/assets/images/icons/rotate-cw.svg +1 -14
  204. data/app/assets/images/icons/rss.svg +1 -15
  205. data/app/assets/images/icons/save.svg +1 -15
  206. data/app/assets/images/icons/scissors.svg +1 -17
  207. data/app/assets/images/icons/search.svg +1 -14
  208. data/app/assets/images/icons/send.svg +1 -14
  209. data/app/assets/images/icons/server.svg +1 -16
  210. data/app/assets/images/icons/settings.svg +1 -14
  211. data/app/assets/images/icons/share-2.svg +1 -17
  212. data/app/assets/images/icons/share.svg +1 -15
  213. data/app/assets/images/icons/shield-off.svg +1 -15
  214. data/app/assets/images/icons/shield.svg +1 -13
  215. data/app/assets/images/icons/shopping-bag.svg +1 -15
  216. data/app/assets/images/icons/shopping-cart.svg +1 -15
  217. data/app/assets/images/icons/shuffle.svg +1 -17
  218. data/app/assets/images/icons/sidebar.svg +1 -14
  219. data/app/assets/images/icons/skip-back.svg +1 -14
  220. data/app/assets/images/icons/skip-forward.svg +1 -14
  221. data/app/assets/images/icons/slack.svg +1 -17
  222. data/app/assets/images/icons/slash.svg +1 -14
  223. data/app/assets/images/icons/sliders.svg +1 -21
  224. data/app/assets/images/icons/smartphone.svg +1 -14
  225. data/app/assets/images/icons/smile.svg +1 -0
  226. data/app/assets/images/icons/speaker.svg +1 -15
  227. data/app/assets/images/icons/square.svg +1 -13
  228. data/app/assets/images/icons/star.svg +1 -13
  229. data/app/assets/images/icons/stop-circle.svg +1 -14
  230. data/app/assets/images/icons/sun.svg +1 -21
  231. data/app/assets/images/icons/sunrise.svg +1 -20
  232. data/app/assets/images/icons/sunset.svg +1 -20
  233. data/app/assets/images/icons/tablet.svg +1 -22
  234. data/app/assets/images/icons/tag.svg +1 -14
  235. data/app/assets/images/icons/target.svg +1 -15
  236. data/app/assets/images/icons/terminal.svg +1 -14
  237. data/app/assets/images/icons/thermometer.svg +1 -13
  238. data/app/assets/images/icons/thumbs-down.svg +1 -13
  239. data/app/assets/images/icons/thumbs-up.svg +1 -13
  240. data/app/assets/images/icons/toggle-left.svg +1 -14
  241. data/app/assets/images/icons/toggle-right.svg +1 -14
  242. data/app/assets/images/icons/tool.svg +1 -0
  243. data/app/assets/images/icons/trash-2.svg +1 -16
  244. data/app/assets/images/icons/trash.svg +1 -14
  245. data/app/assets/images/icons/trello.svg +1 -0
  246. data/app/assets/images/icons/trending-down.svg +1 -14
  247. data/app/assets/images/icons/trending-up.svg +1 -14
  248. data/app/assets/images/icons/triangle.svg +1 -13
  249. data/app/assets/images/icons/truck.svg +1 -16
  250. data/app/assets/images/icons/tv.svg +1 -14
  251. data/app/assets/images/icons/twitch.svg +1 -0
  252. data/app/assets/images/icons/twitter.svg +1 -13
  253. data/app/assets/images/icons/type.svg +1 -15
  254. data/app/assets/images/icons/umbrella.svg +1 -13
  255. data/app/assets/images/icons/underline.svg +1 -14
  256. data/app/assets/images/icons/unlock.svg +1 -14
  257. data/app/assets/images/icons/upload-cloud.svg +1 -16
  258. data/app/assets/images/icons/upload.svg +1 -15
  259. data/app/assets/images/icons/user-check.svg +1 -15
  260. data/app/assets/images/icons/user-minus.svg +1 -15
  261. data/app/assets/images/icons/user-plus.svg +1 -16
  262. data/app/assets/images/icons/user-x.svg +1 -16
  263. data/app/assets/images/icons/user.svg +1 -14
  264. data/app/assets/images/icons/users.svg +1 -16
  265. data/app/assets/images/icons/video-off.svg +1 -14
  266. data/app/assets/images/icons/video.svg +1 -14
  267. data/app/assets/images/icons/voicemail.svg +1 -15
  268. data/app/assets/images/icons/volume-1.svg +1 -14
  269. data/app/assets/images/icons/volume-2.svg +1 -14
  270. data/app/assets/images/icons/volume-x.svg +1 -15
  271. data/app/assets/images/icons/volume.svg +1 -13
  272. data/app/assets/images/icons/watch.svg +1 -15
  273. data/app/assets/images/icons/wifi-off.svg +1 -19
  274. data/app/assets/images/icons/wifi.svg +1 -16
  275. data/app/assets/images/icons/wind.svg +1 -13
  276. data/app/assets/images/icons/x-circle.svg +1 -15
  277. data/app/assets/images/icons/x-octagon.svg +1 -0
  278. data/app/assets/images/icons/x-square.svg +1 -15
  279. data/app/assets/images/icons/x.svg +1 -14
  280. data/app/assets/images/icons/youtube.svg +1 -0
  281. data/app/assets/images/icons/zap-off.svg +1 -16
  282. data/app/assets/images/icons/zap.svg +1 -13
  283. data/app/assets/images/icons/zoom-in.svg +1 -16
  284. data/app/assets/images/icons/zoom-out.svg +1 -15
  285. data/app/assets/javascripts/effective_editor/image-drop-and-paste.js +3 -0
  286. data/app/assets/javascripts/effective_editor/initialize.js.coffee +11 -1
  287. data/app/assets/javascripts/effective_editor/input.js +1 -0
  288. data/app/assets/javascripts/effective_select/initialize.js.coffee +5 -2
  289. data/app/helpers/effective_bootstrap_helper.rb +25 -12
  290. data/app/helpers/effective_form_builder_helper.rb +16 -13
  291. data/app/models/effective/form_builder.rb +5 -1
  292. data/app/models/effective/form_input.rb +4 -2
  293. data/app/models/effective/form_inputs/clear.rb +1 -1
  294. data/app/models/effective/form_inputs/collection_input.rb +1 -1
  295. data/app/models/effective/form_inputs/date_field.rb +2 -1
  296. data/app/models/effective/form_inputs/datetime_field.rb +2 -1
  297. data/app/models/effective/form_inputs/delete.rb +5 -1
  298. data/app/models/effective/form_inputs/editor.rb +10 -1
  299. data/app/models/effective/form_inputs/email_cc_field.rb +1 -1
  300. data/app/models/effective/form_inputs/email_field.rb +1 -1
  301. data/app/models/effective/form_inputs/error_field.rb +1 -1
  302. data/app/models/effective/form_inputs/file_field.rb +1 -0
  303. data/app/models/effective/form_inputs/float_field.rb +6 -1
  304. data/app/models/effective/form_inputs/hidden_field.rb +11 -0
  305. data/app/models/effective/form_inputs/integer_field.rb +1 -1
  306. data/app/models/effective/form_inputs/number_text_field.rb +1 -1
  307. data/app/models/effective/form_inputs/password_field.rb +1 -1
  308. data/app/models/effective/form_inputs/percent_field.rb +1 -1
  309. data/app/models/effective/form_inputs/phone_field.rb +1 -1
  310. data/app/models/effective/form_inputs/price_field.rb +1 -1
  311. data/app/models/effective/form_inputs/select.rb +35 -6
  312. data/app/models/effective/form_inputs/static_field.rb +1 -1
  313. data/app/models/effective/form_inputs/text_area.rb +1 -1
  314. data/app/models/effective/form_inputs/time_field.rb +2 -1
  315. data/app/models/effective/form_inputs/url_field.rb +1 -1
  316. data/lib/effective_bootstrap/version.rb +1 -1
  317. metadata +23 -2
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-octagon"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>
@@ -1,15 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
13
- <line x1="9" y1="9" x2="15" y2="15" />
14
- <line x1="15" y1="9" x2="9" y2="15" />
15
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-square"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>
@@ -1,14 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <line x1="18" y1="6" x2="6" y2="18" />
13
- <line x1="6" y1="6" x2="18" y2="18" />
14
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-youtube"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>
@@ -1,16 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <polyline points="12.41 6.75 13 2 10.57 4.92" />
13
- <polyline points="18.57 12.91 21 10 15.66 10" />
14
- <polyline points="8 8 3 14 12 14 11 22 16 16" />
15
- <line x1="1" y1="1" x2="23" y2="23" />
16
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zap-off"><polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line></svg>
@@ -1,13 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />
13
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zap"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>
@@ -1,16 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <circle cx="11" cy="11" r="8" />
13
- <line x1="21" y1="21" x2="16.65" y2="16.65" />
14
- <line x1="11" y1="8" x2="11" y2="14" />
15
- <line x1="8" y1="11" x2="14" y2="11" />
16
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zoom-in"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>
@@ -1,15 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <circle cx="11" cy="11" r="8" />
13
- <line x1="21" y1="21" x2="16.65" y2="16.65" />
14
- <line x1="8" y1="11" x2="14" y2="11" />
15
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zoom-out"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>
@@ -0,0 +1,3 @@
1
+ (function(){var exports={};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,a,r){if(a)e(t.prototype,a);if(r)e(t,r);return t}}();function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var ImageData=function(){function e(t,a){_classCallCheck(this,e);this.dataUrl=t;this.type=a}_createClass(e,[{key:"minify",value:function t(){var a=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return new Promise(function(t,n){var i=r.maxWidth||800;var l=r.maxHeight||800;var o=r.quality||.8;if(!a.dataUrl){return n({message:"[error] QuillImageDropAndPaste: Fail to minify the image, dataUrl should not be empty."})}var s=new Image;s.onload=function(){var r=s.width;var n=s.height;if(r>n){if(r>i){s.height=n*i/r;s.width=i}}else{if(n>l){s.width=r*l/n;s.height=l}}var u=document.createElement("canvas");u.width=s.width;u.height=s.height;var f=u.getContext("2d");f.drawImage(s,0,0,s.width,s.height);var d=a.type||"image/png";var h=u.toDataURL(d,o);t(new e(h,d))};s.src=a.dataUrl})}},{key:"toFile",value:function e(t){if(!window.File){console.error("[error] QuillImageDropAndPaste: Your browser didnot support File API.");return null}return new File([this.toBlob()],t,{type:this.type})}},{key:"toBlob",value:function e(){var t=this.dataUrl.replace(/^[^,]+,/,"");var a=this.binaryStringToArrayBuffer(atob(t));return this.createBlob([a],{type:this.type})}},{key:"binaryStringToArrayBuffer",value:function e(t){var a=t.length;var r=new ArrayBuffer(a);var n=new Uint8Array(r);var i=-1;while(++i<a){n[i]=t.charCodeAt(i)}return r}},{key:"createBlob",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(typeof a==="string")a={type:a};try{return new Blob(t,a)}catch(e){if(e.name!=="TypeError")throw e;var r=typeof BlobBuilder!=="undefined"?BlobBuilder:typeof MSBlobBuilder!=="undefined"?MSBlobBuilder:typeof MozBlobBuilder!=="undefined"?MozBlobBuilder:WebKitBlobBuilder;var n=new r;for(var i=0;i<t.length;i++){n.append(t[i])}return n.getBlob(a.type)}}}]);return e}();var ImageDropAndPaste=function(){function e(t){var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,e);this.quill=t;this.options=a;this.handleDrop=this.handleDrop.bind(this);this.handlePaste=this.handlePaste.bind(this);this.quill.root.addEventListener("drop",this.handleDrop,false);this.quill.root.addEventListener("paste",this.handlePaste,false)}_createClass(e,[{key:"handleDrop",value:function e(t){var a=this;t.preventDefault();if(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length){if(document.caretRangeFromPoint){var r=document.getSelection();var n=document.caretRangeFromPoint(t.clientX,t.clientY);if(r&&n){r.setBaseAndExtent(n.startContainer,n.startOffset,n.startContainer,n.startOffset)}}this.readFiles(t.dataTransfer.files,function(e,t){t=t||"image/png";if(typeof a.options.handler==="function"){a.options.handler.call(a,e,t,new ImageData(e,t))}else{a.insert.call(a,e,t)}},t)}}},{key:"handlePaste",value:function e(t){var a=this;if(t.clipboardData&&t.clipboardData.items&&t.clipboardData.items.length){this.readFiles(t.clipboardData.items,function(e,t){t=t||"image/png";if(typeof a.options.handler==="function"){a.options.handler.call(a,e,t,new ImageData(e,t))}else{a.insert(e,t)}},t)}}},{key:"readFiles",value:function e(t,a,r){[].forEach.call(t,function(e){var t=e.type;if(!t.match(/^image\/(gif|jpe?g|a?png|svg|webp|bmp)/i))return;r.preventDefault();var n=new FileReader;n.onload=function(e){a(e.target.result,t)};var i=e.getAsFile?e.getAsFile():e;if(i instanceof Blob)n.readAsDataURL(i)})}},{key:"insert",value:function e(t,a){var r=(this.quill.getSelection()||{}).index||this.quill.getLength();this.quill.insertEmbed(r,"image",t,"user")}}]);return e}();ImageDropAndPaste.ImageData=ImageData;exports.default=ImageDropAndPaste;
3
+ window.QuillImageDropAndPaste = ImageDropAndPaste;window.Quill.register('modules/imageDropAndPaste',ImageDropAndPaste)})();
@@ -2,6 +2,7 @@
2
2
  # https://github.com/quilljs/quill
3
3
 
4
4
  Quill.register('modules/imageResize', window.ImageResize.default)
5
+ Quill.register('modules/imageDrop', window.QuillImageDropAndPaste)
5
6
 
6
7
  (this.EffectiveBootstrap || {}).effective_editor = ($element, options) ->
7
8
  editor = '#' + $element.attr('id') + '_editor'
@@ -12,6 +13,15 @@ Quill.register('modules/imageResize', window.ImageResize.default)
12
13
  content_mode = options['content_mode']
13
14
  delete options['content_mode']
14
15
 
16
+ if options['modules']['imageDropAndPaste']
17
+ # Image Drop & Paste
18
+ # https://github.com/chenjuneking/quill-image-drop-and-paste
19
+ dropImage = (imageDataUrl, type, imageData) ->
20
+ file = imageData.toFile(type.replace('/', '.'))
21
+ uploadImage(quill, file)
22
+
23
+ options['modules']['imageDropAndPaste'] = { handler: dropImage }
24
+
15
25
  quill = new Quill($element.siblings(editor).get(0), options)
16
26
  content = $element.val() || ''
17
27
 
@@ -56,7 +66,7 @@ Quill.register('modules/imageResize', window.ImageResize.default)
56
66
  $element.on 'quill:focus', (event) -> quill.focus()
57
67
 
58
68
  # Active Storage support
59
- if active_storage
69
+ if active_storage and content_mode != 'code'
60
70
  quill.getModule('toolbar').addHandler('image', -> createImage(quill))
61
71
 
62
72
  # Active Support Direct Upload
@@ -1,3 +1,4 @@
1
1
  //= require ./quill
2
+ //= require ./image-drop-and-paste
2
3
  //= require ./image-resize
3
4
  //= require ./initialize
@@ -28,6 +28,11 @@ matchWithHtml = (params, data) ->
28
28
  options['templateSelection'] = formatWithHtml
29
29
  options['matcher'] = matchWithHtml
30
30
 
31
+ if options['noResults']
32
+ noResults = options['noResults']
33
+ delete options['noResults']
34
+ options['language'] = { noResults: (_) -> noResults }
35
+
31
36
  $select = $element.select2(options)
32
37
 
33
38
  # effective_select custom class functionality
@@ -49,5 +54,3 @@ $(document).on 'change', "select.effective_select.polymorphic", (event) ->
49
54
 
50
55
  $select.siblings("input[type='hidden'][name$='_type]']").val(value.split('_')[0] || '')
51
56
  $select.siblings("input[type='hidden'][name$='_id]']").val(value.split('_')[1] || '')
52
-
53
-
@@ -72,29 +72,42 @@ module EffectiveBootstrapHelper
72
72
  # variations can be :dropup, :dropleft, :dropright
73
73
  # split can be true, false
74
74
  # right is to right align things
75
- def dropdown(variation: nil, split: true, btn_class: nil, right: false, &block)
75
+ def dropdown(variation: nil, split: true, btn_class: nil, btn_content: nil, right: false, &block)
76
76
  raise 'expected a block' unless block_given?
77
77
 
78
78
  btn_class = btn_class.presence || 'btn-outline-primary'
79
79
 
80
- @_dropdown_link_tos = []; yield
80
+ @_dropdown_link_tos = []
81
+ @_dropdown_split = split
82
+
83
+ # process dropdown_link_tos
84
+ yield
81
85
 
82
86
  return @_dropdown_link_tos.first if @_dropdown_link_tos.length <= 1
83
87
 
84
- retval = if split
85
- first = @_dropdown_link_tos.first
86
- menu = content_tag(:div, @_dropdown_link_tos[1..-1].join.html_safe, class: ['dropdown-menu', ('dropdown-menu-right' if right)].compact.join(' '))
87
- split = content_tag(:button, class: "btn #{btn_class} dropdown-toggle dropdown-toggle-split", type: 'button', 'data-toggle': 'dropdown', 'aria-haspopup': true, 'aria-expanded': false) do
88
- content_tag(:span, 'Toggle Dropdown', class: 'sr-only')
89
- end
88
+ # Build tags
89
+ first = @_dropdown_link_tos.first
90
+
91
+ button = content_tag(:button, class: "btn #{btn_class} dropdown-toggle" + (split ? " dropdown-toggle-split" : ''), type: 'button', 'data-toggle': 'dropdown', 'aria-haspopup': true, 'aria-expanded': false) do
92
+ btn_content || content_tag(:span, 'Toggle Dropdown', class: 'sr-only')
93
+ end
90
94
 
95
+ menu = if split
96
+ content_tag(:div, @_dropdown_link_tos[1..-1].join.html_safe, class: ['dropdown-menu', ('dropdown-menu-right' if right)].compact.join(' '))
97
+ else
98
+ content_tag(:div, @_dropdown_link_tos.join.html_safe, class: ['dropdown-menu', ('dropdown-menu-right' if right)].compact.join(' '))
99
+ end
100
+
101
+ retval = if split
91
102
  content_tag(:div, class: 'btn-group') do
92
103
  content_tag(:div, class: ['btn-group', variation.to_s.presence].compact.join(' '), role: 'group') do
93
- [:dropleft].include?(variation) ? (split + menu) : (first + split + menu)
104
+ [:dropleft].include?(variation) ? (button + menu) : (first + button + menu)
94
105
  end + ([:dropleft].include?(variation) ? first : '').html_safe
95
106
  end
96
107
  else
97
- raise 'split false is unsupported'
108
+ content_tag(:div, class: 'dropdown') do
109
+ button + menu
110
+ end
98
111
  end
99
112
 
100
113
  @_dropdown_link_tos = nil
@@ -108,7 +121,7 @@ module EffectiveBootstrapHelper
108
121
  def dots(options = nil, &block)
109
122
  (options ||= {})[:class] = "dropdown dropdown-dots #{options.delete(:class)}".strip
110
123
 
111
- content_tag(:span, options) do
124
+ content_tag(:div, options) do
112
125
  content_tag(:button, class: "btn btn-dots dropdown-toggle #{options.delete(:button_class)}", 'aria-expanded': true, 'aria-haspopup': true, 'data-toggle': 'dropdown', type: 'button') do
113
126
  end + content_tag(:div, capture(&block), class: 'dropdown-menu')
114
127
  end
@@ -129,7 +142,7 @@ module EffectiveBootstrapHelper
129
142
  return link_to(label, path, options)
130
143
  end
131
144
 
132
- if @_dropdown_link_tos.length == 0
145
+ if @_dropdown_link_tos.length == 0 && @_dropdown_split
133
146
  options[:class] = [options[:class], 'btn', btn_class].compact.join(' ')
134
147
  else
135
148
  options[:class] = [options[:class], 'dropdown-item'].compact.join(' ')
@@ -1,9 +1,9 @@
1
1
  module EffectiveFormBuilderHelper
2
2
  def effective_form_with(**options, &block)
3
-
4
3
  # Compute the default ID
5
4
  subject = Array(options[:scope] || options[:model]).last
6
5
  class_name = subject.class.name.underscore
6
+ unique_id = options.except(:model).hash.abs
7
7
 
8
8
  html_id = if subject.kind_of?(Symbol)
9
9
  subject.to_s
@@ -14,9 +14,6 @@ module EffectiveFormBuilderHelper
14
14
  end
15
15
 
16
16
  options[:html] = (options[:html] || {}).merge(novalidate: true, onsubmit: 'return EffectiveForm.validate(this)')
17
-
18
- remote_index = options.except(:model).hash.abs
19
-
20
17
  options[:local] = true unless options.key?(:local)
21
18
 
22
19
  if respond_to?(:inline_datatable?) && inline_datatable?
@@ -33,21 +30,27 @@ module EffectiveFormBuilderHelper
33
30
  ('hide-flash-danger' if options[:remote] && options.key?(:flash_error) && !options[:flash_error])
34
31
  ].compact.join(' ')
35
32
 
36
- if options.delete(:remote) == true
37
- @_effective_remote_index ||= {}
38
- remote_index = remote_index + 1 if @_effective_remote_index[remote_index]
33
+ if options[:remote] || options[:unique_ids]
34
+ @_effective_unique_id ||= {}
35
+
36
+ if @_effective_unique_id.key?(unique_id)
37
+ unique_id = unique_id + @_effective_unique_id.length
38
+ end
39
39
 
40
+ options[:unique_id] = unique_id
41
+ html_id = "#{html_id}_#{unique_id}"
42
+
43
+ @_effective_unique_id[unique_id] = true
44
+ end
45
+
46
+ if options.delete(:remote) == true
40
47
  if options[:html][:data].kind_of?(Hash)
41
48
  options[:html][:data][:remote] = true
42
- options[:html][:data]['data-remote-index'] = remote_index
49
+ options[:html][:data]['data-remote-index'] = unique_id
43
50
  else
44
51
  options[:html]['data-remote'] = true
45
- options[:html]['data-remote-index'] = remote_index
52
+ options[:html]['data-remote-index'] = unique_id
46
53
  end
47
-
48
- html_id = "#{html_id}_#{remote_index}"
49
-
50
- @_effective_remote_index[remote_index] = true
51
54
  end
52
55
 
53
56
  # Assign default ID
@@ -20,6 +20,7 @@ module Effective
20
20
  alias_method :super_number_field, :number_field
21
21
  alias_method :super_text_field, :text_field
22
22
  alias_method :super_text_area, :text_area
23
+ alias_method :super_hidden_field, :hidden_field
23
24
 
24
25
  def clear(name = 'Clear', options = {})
25
26
  (options = name; name = 'Clear') if name.kind_of?(Hash)
@@ -85,6 +86,10 @@ module Effective
85
86
  Effective::FormInputs::FormGroup.new(name, options, builder: self).to_html(&block)
86
87
  end
87
88
 
89
+ def hidden_field(name = nil, options = {})
90
+ Effective::FormInputs::HiddenField.new(name, options, builder: self).to_html
91
+ end
92
+
88
93
  def integer_field(name, options = {})
89
94
  Effective::FormInputs::IntegerField.new(name, options, builder: self).to_html
90
95
  end
@@ -196,4 +201,3 @@ module Effective
196
201
 
197
202
  end
198
203
  end
199
-
@@ -24,7 +24,7 @@ module Effective
24
24
  end
25
25
 
26
26
  def input_html_options
27
- { class: 'form-control' }
27
+ { class: 'form-control', id: tag_id }
28
28
  end
29
29
 
30
30
  def input_js_options
@@ -408,7 +408,7 @@ module Effective
408
408
 
409
409
  # https://github.com/rails/rails/blob/master/actionview/lib/action_view/helpers/tags/base.rb#L120
410
410
  def tag_id(index = nil)
411
- case
411
+ id = case
412
412
  when @builder.object_name.empty?
413
413
  sanitized_method_name.dup
414
414
  when index
@@ -416,6 +416,8 @@ module Effective
416
416
  else
417
417
  "#{sanitized_object_name}_#{sanitized_method_name}"
418
418
  end.downcase.parameterize
419
+
420
+ @builder.options[:unique_ids] ? "#{id}_#{@builder.options[:unique_id]}" : id
419
421
  end
420
422
 
421
423
  def sanitized_object_name
@@ -9,7 +9,7 @@ module Effective
9
9
  end
10
10
 
11
11
  def input_html_options
12
- { class: 'btn btn-primary', type: 'clear' }
12
+ { class: 'btn btn-primary', type: 'clear', id: tag_id }
13
13
  end
14
14
 
15
15
  def icon_name
@@ -36,7 +36,7 @@ module Effective
36
36
 
37
37
  @collection_options = {
38
38
  checked: [checked, selected, polymorphic_value, value].find { |value| value != nil },
39
- selected: [selected, checked, polymorphic_value, value].find { |value| value != nil },
39
+ selected: ([selected, checked, polymorphic_value, value].find { |value| value != nil } unless kind_of?(Effective::FormInputs::Radios)),
40
40
  include_blank: include_blank
41
41
  }.compact
42
42
  end
@@ -5,7 +5,8 @@ module Effective
5
5
  def input_html_options
6
6
  {
7
7
  class: ['form-control', 'effective_date_time_picker', 'effective_date', ('not-date-linked' if not_date_linked?)].compact.join(' '),
8
- pattern: pattern
8
+ pattern: pattern,
9
+ id: tag_id
9
10
  }
10
11
  end
11
12
 
@@ -5,7 +5,8 @@ module Effective
5
5
  def input_html_options
6
6
  {
7
7
  class: ['form-control', 'effective_date_time_picker', 'effective_datetime', ('not-date-linked' if not_date_linked?)].compact.join(' '),
8
- pattern: pattern
8
+ pattern: pattern,
9
+ id: tag_id
9
10
  }
10
11
  end
11
12
 
@@ -14,7 +14,11 @@ module Effective
14
14
  end
15
15
 
16
16
  def input_html_options
17
- { class: 'btn btn-warning', data: { method: :delete, remote: true, confirm: "Really delete<br>#{object}?".html_safe } }
17
+ {
18
+ class: 'btn btn-warning',
19
+ id: tag_id,
20
+ data: { method: :delete, remote: true, confirm: "Really delete<br>#{object}?".html_safe }
21
+ }
18
22
  end
19
23
 
20
24
  def border?
@@ -15,7 +15,12 @@ module Effective
15
15
 
16
16
  def input_js_options
17
17
  {
18
- modules: { toolbar: toolbar, imageResize: imageResize, syntax: (content_mode == :code) },
18
+ modules: {
19
+ toolbar: toolbar,
20
+ imageResize: imageResize,
21
+ imageDropAndPaste: imageDropAndPaste,
22
+ syntax: (content_mode == :code)
23
+ },
19
24
  theme: 'snow',
20
25
  placeholder: "Add #{name.to_s.pluralize}...",
21
26
  content_mode: content_mode,
@@ -36,6 +41,10 @@ module Effective
36
41
  ]
37
42
  end
38
43
 
44
+ def imageDropAndPaste
45
+ active_storage && !(content_mode == :code)
46
+ end
47
+
39
48
  def imageResize
40
49
  {
41
50
  displaySize: true,
@@ -7,7 +7,7 @@ module Effective
7
7
  end
8
8
 
9
9
  def input_html_options
10
- { class: 'form-control', placeholder: 'one@example.com,two@example.com' }
10
+ { class: 'form-control', placeholder: 'one@example.com,two@example.com', id: tag_id }
11
11
  end
12
12
 
13
13
  def input_group_options
@@ -3,7 +3,7 @@ module Effective
3
3
  class EmailField < Effective::FormInput
4
4
 
5
5
  def input_html_options
6
- { class: 'form-control', placeholder: 'someone@example.com' }
6
+ { class: 'form-control', placeholder: 'someone@example.com', id: tag_id }
7
7
  end
8
8
 
9
9
  def input_group_options