wonder-image 1.2.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 (223) hide show
  1. package/DOCS.md +12 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1 -0
  4. package/babel.config.json +3 -0
  5. package/demo/backend/body-end.php +10 -0
  6. package/demo/backend/head.php +93 -0
  7. package/demo/frontend/body-end.php +19 -0
  8. package/demo/frontend/head.php +244 -0
  9. package/demo/wonder-image.php +41 -0
  10. package/dist/0d01fa889dc2b0202b98.png +0 -0
  11. package/dist/203d1199e7aef04c0a34.gif +0 -0
  12. package/dist/26d6ed3fa1c815e4c78f.png +0 -0
  13. package/dist/39795c0b4513de014cf8.woff +0 -0
  14. package/dist/40b30ca122107c2852be.png +0 -0
  15. package/dist/4a7b4107b62ef059ba65.png +0 -0
  16. package/dist/4dce7f71b08755f19759.png +0 -0
  17. package/dist/60af14fddca897f348bb.png +0 -0
  18. package/dist/67172a36bcdeaca8592a.png +0 -0
  19. package/dist/a85c6dc53638f894de38.png +0 -0
  20. package/dist/b7bcc075b395c14ce8c2.woff2 +0 -0
  21. package/dist/backend/body-end.js +3 -0
  22. package/dist/backend/body-end.js.LICENSE.txt +44 -0
  23. package/dist/backend/body-end.js.map +1 -0
  24. package/dist/backend/head.css +2 -0
  25. package/dist/backend/head.css.map +1 -0
  26. package/dist/backend/head.js +3 -0
  27. package/dist/backend/head.js.LICENSE.txt +46 -0
  28. package/dist/backend/head.js.map +1 -0
  29. package/dist/backend/lib.js +2 -0
  30. package/dist/backend/lib.js.LICENSE.txt +1 -0
  31. package/dist/frontend/body-end.js +3 -0
  32. package/dist/frontend/body-end.js.LICENSE.txt +46 -0
  33. package/dist/frontend/body-end.js.map +1 -0
  34. package/dist/frontend/head.css +2 -0
  35. package/dist/frontend/head.css.map +1 -0
  36. package/dist/frontend/head.js +3 -0
  37. package/dist/frontend/head.js.LICENSE.txt +46 -0
  38. package/dist/frontend/head.js.map +1 -0
  39. package/dist/frontend/lib.css +2 -0
  40. package/dist/frontend/lib.css.map +1 -0
  41. package/dist/frontend/lib.js +3 -0
  42. package/dist/frontend/lib.js.LICENSE.txt +151 -0
  43. package/dist/frontend/lib.js.map +1 -0
  44. package/dist/lib/autonumeric/autonumeric.js +3 -0
  45. package/dist/lib/autonumeric/autonumeric.js.LICENSE.txt +47 -0
  46. package/dist/lib/autonumeric/autonumeric.js.map +1 -0
  47. package/dist/lib/bootstrap/bootstrap-datepicker.css +2 -0
  48. package/dist/lib/bootstrap/bootstrap-datepicker.css.map +1 -0
  49. package/dist/lib/bootstrap/bootstrap-datepicker.js +3 -0
  50. package/dist/lib/bootstrap/bootstrap-datepicker.js.LICENSE.txt +42 -0
  51. package/dist/lib/bootstrap/bootstrap-datepicker.js.map +1 -0
  52. package/dist/lib/bootstrap/bootstrap-icons.css +2 -0
  53. package/dist/lib/bootstrap/bootstrap-icons.css.map +1 -0
  54. package/dist/lib/bootstrap/bootstrap-icons.js +3 -0
  55. package/dist/lib/bootstrap/bootstrap-icons.js.LICENSE.txt +13 -0
  56. package/dist/lib/bootstrap/bootstrap-icons.js.map +1 -0
  57. package/dist/lib/bootstrap/bootstrap.css +2 -0
  58. package/dist/lib/bootstrap/bootstrap.css.map +1 -0
  59. package/dist/lib/bootstrap/bootstrap.js +3 -0
  60. package/dist/lib/bootstrap/bootstrap.js.LICENSE.txt +44 -0
  61. package/dist/lib/bootstrap/bootstrap.js.map +1 -0
  62. package/dist/lib/chartjs/chart.js +3 -0
  63. package/dist/lib/chartjs/chart.js.LICENSE.txt +1467 -0
  64. package/dist/lib/chartjs/chart.js.map +1 -0
  65. package/dist/lib/datatables/datatables.css +2 -0
  66. package/dist/lib/datatables/datatables.css.map +1 -0
  67. package/dist/lib/datatables/datatables.js +3 -0
  68. package/dist/lib/datatables/datatables.js.LICENSE.txt +8988 -0
  69. package/dist/lib/datatables/datatables.js.map +1 -0
  70. package/dist/lib/editorjs/editor.js +3 -0
  71. package/dist/lib/editorjs/editor.js.LICENSE.txt +5812 -0
  72. package/dist/lib/editorjs/editor.js.map +1 -0
  73. package/dist/lib/fancyapps/fancyapps.css +2 -0
  74. package/dist/lib/fancyapps/fancyapps.css.map +1 -0
  75. package/dist/lib/fancyapps/fancyapps.js +3 -0
  76. package/dist/lib/fancyapps/fancyapps.js.LICENSE.txt +19 -0
  77. package/dist/lib/fancyapps/fancyapps.js.map +1 -0
  78. package/dist/lib/filepond/filepond.css +2 -0
  79. package/dist/lib/filepond/filepond.css.map +1 -0
  80. package/dist/lib/filepond/filepond.js +3 -0
  81. package/dist/lib/filepond/filepond.js.LICENSE.txt +2797 -0
  82. package/dist/lib/filepond/filepond.js.map +1 -0
  83. package/dist/lib/fullcalendar/fullcalendar.js +3 -0
  84. package/dist/lib/fullcalendar/fullcalendar.js.LICENSE.txt +3787 -0
  85. package/dist/lib/fullcalendar/fullcalendar.js.map +1 -0
  86. package/dist/lib/jquery/jquery-plugin.css +2 -0
  87. package/dist/lib/jquery/jquery-plugin.css.map +1 -0
  88. package/dist/lib/jquery/jquery-plugin.js +3 -0
  89. package/dist/lib/jquery/jquery-plugin.js.LICENSE.txt +60 -0
  90. package/dist/lib/jquery/jquery-plugin.js.map +1 -0
  91. package/dist/lib/jquery/jquery.js +3 -0
  92. package/dist/lib/jquery/jquery.js.LICENSE.txt +3240 -0
  93. package/dist/lib/jquery/jquery.js.map +1 -0
  94. package/dist/lib/jstree/jstree.css +2 -0
  95. package/dist/lib/jstree/jstree.css.map +1 -0
  96. package/dist/lib/jstree/jstree.js +3 -0
  97. package/dist/lib/jstree/jstree.js.LICENSE.txt +42 -0
  98. package/dist/lib/jstree/jstree.js.map +1 -0
  99. package/dist/lib/moment/moment.js +3 -0
  100. package/dist/lib/moment/moment.js.LICENSE.txt +772 -0
  101. package/dist/lib/moment/moment.js.map +1 -0
  102. package/dist/lib/quilljs/quill.css +2 -0
  103. package/dist/lib/quilljs/quill.css.map +1 -0
  104. package/dist/lib/quilljs/quill.js +3 -0
  105. package/dist/lib/quilljs/quill.js.LICENSE.txt +3038 -0
  106. package/dist/lib/quilljs/quill.js.map +1 -0
  107. package/dist/lib/swiperjs/swiper-plugin.css +2 -0
  108. package/dist/lib/swiperjs/swiper-plugin.css.map +1 -0
  109. package/dist/lib/swiperjs/swiper-plugin.js +3 -0
  110. package/dist/lib/swiperjs/swiper-plugin.js.LICENSE.txt +1113 -0
  111. package/dist/lib/swiperjs/swiper-plugin.js.map +1 -0
  112. package/dist/lib/swiperjs/swiper.css +2 -0
  113. package/dist/lib/swiperjs/swiper.css.map +1 -0
  114. package/dist/lib/swiperjs/swiper.js +3 -0
  115. package/dist/lib/swiperjs/swiper.js.LICENSE.txt +651 -0
  116. package/dist/lib/swiperjs/swiper.js.map +1 -0
  117. package/dist/lib/videojs/video.css +2 -0
  118. package/dist/lib/videojs/video.css.map +1 -0
  119. package/dist/lib/videojs/video.js +3 -0
  120. package/dist/lib/videojs/video.js.LICENSE.txt +23391 -0
  121. package/dist/lib/videojs/video.js.map +1 -0
  122. package/package.json +95 -0
  123. package/src/build/backend/css/header.css +252 -0
  124. package/src/build/backend/css/input.css +295 -0
  125. package/src/build/backend/css/list.css +57 -0
  126. package/src/build/backend/css/order.css +99 -0
  127. package/src/build/backend/js/ajax.js +96 -0
  128. package/src/build/backend/js/alert.js +78 -0
  129. package/src/build/backend/js/bootstrap.js +52 -0
  130. package/src/build/backend/js/form/editor.js +293 -0
  131. package/src/build/backend/js/form/file.js +142 -0
  132. package/src/build/backend/js/form/filepond.js +11 -0
  133. package/src/build/backend/js/form/input.js +313 -0
  134. package/src/build/backend/js/form/inputRow.js +164 -0
  135. package/src/build/backend/js/form/send.js +14 -0
  136. package/src/build/backend/js/form/set.js +314 -0
  137. package/src/build/backend/js/jquery.js +15 -0
  138. package/src/build/backend/js/list.js +19 -0
  139. package/src/build/backend/js/modal.js +31 -0
  140. package/src/build/backend/js/pageSetUp.js +125 -0
  141. package/src/build/backend/js/utility.js +38 -0
  142. package/src/build/frontend/css/class/dimension.css +3376 -0
  143. package/src/build/frontend/css/class/function.css +316 -0
  144. package/src/build/frontend/css/class/grid.css +240 -0
  145. package/src/build/frontend/css/class/margin.css +823 -0
  146. package/src/build/frontend/css/class/padding.css +760 -0
  147. package/src/build/frontend/css/class/position.css +351 -0
  148. package/src/build/frontend/css/class/resize.css +24 -0
  149. package/src/build/frontend/css/class/section.css +41 -0
  150. package/src/build/frontend/css/class/text.css +244 -0
  151. package/src/build/frontend/css/components/alert.css +42 -0
  152. package/src/build/frontend/css/components/button.css +107 -0
  153. package/src/build/frontend/css/components/dropdown.css +118 -0
  154. package/src/build/frontend/css/components/form/address.css +26 -0
  155. package/src/build/frontend/css/components/form/checkbox.css +65 -0
  156. package/src/build/frontend/css/components/form/date.css +133 -0
  157. package/src/build/frontend/css/components/form/input.css +176 -0
  158. package/src/build/frontend/css/components/form/select.css +69 -0
  159. package/src/build/frontend/css/components/header/hamburger/hamburger-1.css +56 -0
  160. package/src/build/frontend/css/components/header/hamburger/hamburger.css +58 -0
  161. package/src/build/frontend/css/components/header/header.css +57 -0
  162. package/src/build/frontend/css/components/header/mobile-nav.css +79 -0
  163. package/src/build/frontend/css/components/modal.css +76 -0
  164. package/src/build/frontend/css/components/spinner.css +37 -0
  165. package/src/build/frontend/css/generator/dimension.php +93 -0
  166. package/src/build/frontend/css/generator/margin.php +48 -0
  167. package/src/build/frontend/css/generator/padding.php +48 -0
  168. package/src/build/frontend/css/lib.css +3 -0
  169. package/src/build/frontend/css/main.css +37 -0
  170. package/src/build/frontend/js/alert.js +64 -0
  171. package/src/build/frontend/js/aos.js +9 -0
  172. package/src/build/frontend/js/dropdown.js +73 -0
  173. package/src/build/frontend/js/form/input.js +211 -0
  174. package/src/build/frontend/js/form/list.js +155 -0
  175. package/src/build/frontend/js/form/select.js +108 -0
  176. package/src/build/frontend/js/form/send.js +137 -0
  177. package/src/build/frontend/js/header.js +12 -0
  178. package/src/build/frontend/js/modal.js +26 -0
  179. package/src/build/frontend/js/pageSetUp.js +35 -0
  180. package/src/build/frontend/js/scroll.js +70 -0
  181. package/src/build/frontend/js/utility.js +21 -0
  182. package/src/build/global/js/canvas.js +82 -0
  183. package/src/build/global/js/fetch.js +47 -0
  184. package/src/build/global/js/form/autonumeric.js +136 -0
  185. package/src/build/global/js/form/phone.js +19 -0
  186. package/src/build/global/js/utility.js +88 -0
  187. package/src/build/global/js/video.js +7 -0
  188. package/src/build/lib/editorjs/gallery.js +39 -0
  189. package/src/build/lib/editorjs/hyperlink.js +170 -0
  190. package/src/build/lib/editorjs/video.js +61 -0
  191. package/src/build/lib/swiperjs/effect-carousel.css +24 -0
  192. package/src/build/lib/swiperjs/effect-carousel.esm.js +102 -0
  193. package/src/build/lib/swiperjs/effect-shutters.css +33 -0
  194. package/src/build/lib/swiperjs/effect-shutters.esm.js +114 -0
  195. package/src/build/lib/swiperjs/effect-slicer.css +39 -0
  196. package/src/build/lib/swiperjs/effect-slicer.esm.js +198 -0
  197. package/src/build/lib/swiperjs/swiper-gl.css +44 -0
  198. package/src/build/lib/swiperjs/swiper-gl.esm.js +6063 -0
  199. package/src/export/backend/body-end.js +4 -0
  200. package/src/export/backend/head.js +25 -0
  201. package/src/export/backend/lib.js +0 -0
  202. package/src/export/frontend/body-end.js +9 -0
  203. package/src/export/frontend/head.js +42 -0
  204. package/src/export/frontend/lib.js +17 -0
  205. package/src/export/lib/autonumeric/autonumeric.js +3 -0
  206. package/src/export/lib/bootstrap/bootstrap-datepicker.js +4 -0
  207. package/src/export/lib/bootstrap/bootstrap-icons.js +2 -0
  208. package/src/export/lib/bootstrap/bootstrap.js +3 -0
  209. package/src/export/lib/chartjs/chart.js +4 -0
  210. package/src/export/lib/datatables/datatables.js +6 -0
  211. package/src/export/lib/editorjs/editor.js +48 -0
  212. package/src/export/lib/fancyapps/fancyapps.js +7 -0
  213. package/src/export/lib/filepond/filepond.js +51 -0
  214. package/src/export/lib/fullcalendar/fullcalendar.js +29 -0
  215. package/src/export/lib/jquery/jquery-plugin.js +14 -0
  216. package/src/export/lib/jquery/jquery.js +4 -0
  217. package/src/export/lib/jstree/jstree.js +2 -0
  218. package/src/export/lib/moment/moment.js +12 -0
  219. package/src/export/lib/quilljs/quill.js +4 -0
  220. package/src/export/lib/swiperjs/swiper-plugin.js +20 -0
  221. package/src/export/lib/swiperjs/swiper.js +4 -0
  222. package/src/export/lib/videojs/video.js +3 -0
  223. package/webpack.config.js +79 -0
@@ -0,0 +1,99 @@
1
+ .order-1 { order: 1 !important; }
2
+ .order-2 { order: 2 !important; }
3
+ .order-3 { order: 3 !important; }
4
+ .order-4 { order: 4 !important; }
5
+ .order-5 { order: 5 !important; }
6
+ .order-6 { order: 6 !important; }
7
+ .order-7 { order: 7 !important; }
8
+ .order-8 { order: 8 !important; }
9
+ .order-9 { order: 9 !important; }
10
+ .order-10 { order: 10 !important; }
11
+ .order-11 { order: 11 !important; }
12
+ .order-12 { order: 12 !important; }
13
+ .order-13 { order: 13 !important; }
14
+ .order-14 { order: 14 !important; }
15
+ .order-15 { order: 15 !important; }
16
+ .order-16 { order: 16 !important; }
17
+ .order-17 { order: 17 !important; }
18
+ .order-18 { order: 18 !important; }
19
+ .order-19 { order: 19 !important; }
20
+ .order-20 { order: 20 !important; }
21
+ .order-21 { order: 21 !important; }
22
+ .order-22 { order: 22 !important; }
23
+ .order-23 { order: 23 !important; }
24
+ .order-24 { order: 24 !important; }
25
+ .order-25 { order: 25 !important; }
26
+ .order-26 { order: 26 !important; }
27
+ .order-27 { order: 27 !important; }
28
+ .order-28 { order: 28 !important; }
29
+ .order-29 { order: 29 !important; }
30
+ .order-30 { order: 30 !important; }
31
+ .order-31 { order: 31 !important; }
32
+ .order-32 { order: 32 !important; }
33
+ .order-33 { order: 33 !important; }
34
+ .order-34 { order: 34 !important; }
35
+ .order-35 { order: 35 !important; }
36
+ .order-36 { order: 36 !important; }
37
+ .order-37 { order: 37 !important; }
38
+ .order-38 { order: 38 !important; }
39
+ .order-39 { order: 39 !important; }
40
+ .order-40 { order: 40 !important; }
41
+ .order-41 { order: 41 !important; }
42
+ .order-42 { order: 42 !important; }
43
+ .order-43 { order: 43 !important; }
44
+ .order-44 { order: 44 !important; }
45
+ .order-45 { order: 45 !important; }
46
+ .order-46 { order: 46 !important; }
47
+ .order-47 { order: 47 !important; }
48
+ .order-48 { order: 48 !important; }
49
+ .order-49 { order: 49 !important; }
50
+ .order-50 { order: 50 !important; }
51
+ .order-51 { order: 51 !important; }
52
+ .order-52 { order: 52 !important; }
53
+ .order-53 { order: 53 !important; }
54
+ .order-54 { order: 54 !important; }
55
+ .order-55 { order: 55 !important; }
56
+ .order-56 { order: 56 !important; }
57
+ .order-57 { order: 57 !important; }
58
+ .order-58 { order: 58 !important; }
59
+ .order-59 { order: 59 !important; }
60
+ .order-60 { order: 60 !important; }
61
+ .order-61 { order: 61 !important; }
62
+ .order-62 { order: 62 !important; }
63
+ .order-63 { order: 63 !important; }
64
+ .order-64 { order: 64 !important; }
65
+ .order-65 { order: 65 !important; }
66
+ .order-66 { order: 66 !important; }
67
+ .order-67 { order: 67 !important; }
68
+ .order-68 { order: 68 !important; }
69
+ .order-69 { order: 69 !important; }
70
+ .order-70 { order: 70 !important; }
71
+ .order-71 { order: 71 !important; }
72
+ .order-72 { order: 72 !important; }
73
+ .order-73 { order: 73 !important; }
74
+ .order-74 { order: 74 !important; }
75
+ .order-75 { order: 75 !important; }
76
+ .order-76 { order: 76 !important; }
77
+ .order-77 { order: 77 !important; }
78
+ .order-78 { order: 78 !important; }
79
+ .order-79 { order: 79 !important; }
80
+ .order-80 { order: 80 !important; }
81
+ .order-81 { order: 81 !important; }
82
+ .order-82 { order: 82 !important; }
83
+ .order-83 { order: 83 !important; }
84
+ .order-84 { order: 84 !important; }
85
+ .order-85 { order: 85 !important; }
86
+ .order-86 { order: 86 !important; }
87
+ .order-87 { order: 87 !important; }
88
+ .order-88 { order: 88 !important; }
89
+ .order-89 { order: 89 !important; }
90
+ .order-90 { order: 90 !important; }
91
+ .order-91 { order: 91 !important; }
92
+ .order-92 { order: 92 !important; }
93
+ .order-93 { order: 93 !important; }
94
+ .order-94 { order: 94 !important; }
95
+ .order-95 { order: 95 !important; }
96
+ .order-96 { order: 96 !important; }
97
+ .order-97 { order: 77 !important; }
98
+ .order-98 { order: 98 !important; }
99
+ .order-99 { order: 99 !important; }
@@ -0,0 +1,96 @@
1
+ function ajaxRequest(link, onSuccess = reloadPage, params = null) {
2
+
3
+ loadingSpinner();
4
+
5
+ $.ajax({
6
+ type: "POST",
7
+ url: link,
8
+ data: {
9
+ post: 'true'
10
+ },
11
+ success: function(data) {
12
+
13
+ if (onSuccess != null) {
14
+ if (typeof onSuccess === 'function') {
15
+
16
+ if (params == null) {
17
+ onSuccess();
18
+ } else {
19
+ onSuccess(params);
20
+ }
21
+
22
+ } else {
23
+
24
+ try {
25
+
26
+ var x = JSON.parse(onSuccess.replace('"', '"'));
27
+
28
+ var f = x.function;
29
+ var p = x.parameters;
30
+
31
+ } catch {
32
+
33
+ var f = onSuccess;
34
+ var p = params;
35
+
36
+ }
37
+
38
+ window[f](p);
39
+
40
+ }
41
+ }
42
+
43
+ loadingSpinner();
44
+
45
+ },
46
+ error: function (XMLHttpRequest) {
47
+ ajaxRequestError(XMLHttpRequest);
48
+ loadingSpinner();
49
+ }
50
+ });
51
+
52
+ }
53
+
54
+ function reloadPage() {
55
+
56
+ location.reload();
57
+
58
+ }
59
+
60
+ async function postData(url, data) {
61
+
62
+ loadingSpinner();
63
+
64
+ if (data === undefined) {
65
+
66
+ console.error("Non è stato passato alcun dato alla funzione postData()");
67
+
68
+ } else {
69
+
70
+ if (data instanceof FormData === false) {
71
+ var data = createPostData(data)
72
+ }
73
+
74
+ await fetch(url, {
75
+ method: "POST",
76
+ body: data
77
+ })
78
+ .then((response) => { loadingSpinner(); return fetchResponse(response); })
79
+ .then((value) => { return fetchValue(value); })
80
+ .catch((error) => { fetchValue(error); });
81
+
82
+ }
83
+
84
+ }
85
+
86
+ function createPostData(array = {}) {
87
+
88
+ var data = new FormData();
89
+
90
+ Object.keys(array).forEach(key => {
91
+ data.append(key, array[key]);
92
+ });
93
+
94
+ return data;
95
+
96
+ }
@@ -0,0 +1,78 @@
1
+ function toastContainer() {
2
+
3
+ if (document.querySelector('.toast-container')) {
4
+
5
+ var container = document.querySelector('.toast-container');
6
+
7
+ }else{
8
+
9
+ var container = document.createElement('div');
10
+ container.classList.add('toast-container');
11
+ container.classList.add('position-fixed');
12
+ container.classList.add('top-0');
13
+ container.classList.add('end-0');
14
+ container.classList.add('p-3');
15
+
16
+ document.body.insertBefore(container, document.body.firstChild);
17
+
18
+ }
19
+
20
+ return container;
21
+
22
+ }
23
+
24
+ function alertToast(alert, type = null, title = null, text = null) {
25
+
26
+ var container = toastContainer();
27
+
28
+ $(".toast.show").toast().hide();
29
+
30
+ if (alert == 801) {
31
+
32
+ container.innerHTML = NO_INTERNET_ALERT + container.innerHTML;
33
+ const toast = new bootstrap.Toast(container.firstElementChild);
34
+ toast.show();
35
+
36
+ } else if (alert != undefined) {
37
+
38
+ if (alert == 'custom') {
39
+
40
+ var data = {
41
+ post: 'true',
42
+ backend: 'true',
43
+ alert: alert,
44
+ alertType: type,
45
+ alertTitle: title,
46
+ alertText: text
47
+ }
48
+
49
+ } else {
50
+
51
+ var data = {
52
+ post: 'true',
53
+ backend: 'true',
54
+ alert: alert
55
+ };
56
+
57
+ }
58
+
59
+ $.ajax({
60
+ type: "POST",
61
+ url: pathApp+'/api/alert.php',
62
+ data: data,
63
+ success: function (data) {
64
+
65
+ container.innerHTML = data + container.innerHTML;
66
+ const toast = new bootstrap.Toast(container.firstElementChild);
67
+ toast.show();
68
+
69
+ var url = new URL(window.location.href);
70
+ url.searchParams.delete('alert');
71
+ window.history.replaceState(null, null, url);
72
+
73
+ }
74
+ });
75
+
76
+ }
77
+
78
+ }
@@ -0,0 +1,52 @@
1
+ function bootstrapToast() {
2
+
3
+ var toastElList = [].slice.call(document.querySelectorAll('.toast'))
4
+ var toastList = toastElList.map(function(toastEl) {
5
+ return new bootstrap.Toast(toastEl)
6
+ });
7
+ toastList.forEach(toast => toast.show());
8
+
9
+ }
10
+
11
+ function bootstrapTooltip() { $('[data-bs-toggle="tooltip"]').tooltip(); }
12
+
13
+ function bootstrapTheme(theme) {
14
+
15
+ document.querySelector("html").setAttribute("data-bs-theme", theme);
16
+
17
+ localStorage.setItem('theme', theme);
18
+
19
+ if (theme == 'light') {
20
+
21
+ if (document.querySelector('#bs-theme i.light-theme')) { document.querySelector('#bs-theme i.light-theme').classList.remove('d-none'); }
22
+ if (document.querySelector('#bs-theme i.dark-theme')) { document.querySelector('#bs-theme i.dark-theme').classList.add('d-none'); }
23
+
24
+ document.querySelector('#be-logo-white').classList.add('d-none');
25
+ document.querySelector('#be-logo-black').classList.remove('d-none');
26
+
27
+ element = document.querySelector('[data-bs-theme-value="light"]');
28
+ el = document.querySelector('[data-bs-theme-value="dark"]');
29
+
30
+ } else if (theme == 'dark') {
31
+
32
+ if (document.querySelector('#bs-theme i.light-theme')) { document.querySelector('#bs-theme i.light-theme').classList.add('d-none'); }
33
+ if (document.querySelector('#bs-theme i.dark-theme')) { document.querySelector('#bs-theme i.dark-theme').classList.remove('d-none'); }
34
+
35
+ document.querySelector('#be-logo-white').classList.remove('d-none');
36
+ document.querySelector('#be-logo-black').classList.add('d-none');
37
+
38
+ element = document.querySelector('[data-bs-theme-value="dark"]');
39
+ el = document.querySelector('[data-bs-theme-value="light"]');
40
+
41
+ }
42
+
43
+ if (el) { el.classList.remove('active'); }
44
+ if (element) { element.classList.add('active'); }
45
+
46
+ }
47
+
48
+ function setUpBootstrap() {
49
+
50
+ bootstrapTooltip();
51
+
52
+ }
@@ -0,0 +1,293 @@
1
+ class CustomHyperlink extends Hyperlink {
2
+ iconSvg(name, width = 14, height = 14) {
3
+ const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
4
+ svg.classList.add('icon', 'icon--' + name);
5
+ svg.setAttribute('width', '24');
6
+ svg.setAttribute('height','24');
7
+ svg.setAttribute('viewBox', '0 0 24 24')
8
+ svg.setAttribute('fill', 'none');
9
+ if (name == 'link') {
10
+ svg.innerHTML = `
11
+ <path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72"></path>
12
+ `;
13
+ } else {
14
+ svg.innerHTML = `
15
+ <path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15.7795 11.5C15.7795 11.5 16.053 11.1962 16.5497 10.6722C17.4442 9.72856 17.4701 8.2475 16.5781 7.30145V7.30145C15.6482 6.31522 14.0873 6.29227 13.1288 7.25073L11.8796 8.49999"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8.24517 12.3883C8.24517 12.3883 7.97171 12.6922 7.47504 13.2161C6.58051 14.1598 6.55467 15.6408 7.44666 16.5869V16.5869C8.37653 17.5731 9.93744 17.5961 10.8959 16.6376L12.1452 15.3883"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17.7802 15.1032L16.597 14.9422C16.0109 14.8624 15.4841 15.3059 15.4627 15.8969L15.4199 17.0818"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.39064 9.03238L7.58432 9.06668C8.17551 9.08366 8.6522 8.58665 8.61056 7.99669L8.5271 6.81397"></path><line x1="12.1142" x2="11.7" y1="12.2" y2="11.7858" stroke="currentColor" stroke-linecap="round" stroke-width="2"></line>
16
+ `;
17
+ }
18
+ return svg;
19
+ }
20
+ }
21
+
22
+ class CustomEmded extends Embed {
23
+
24
+ static get toolbox() {
25
+ return {
26
+ title: 'Iframe',
27
+ icon: '<svg width="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 1 0-6M14 11a5 5 0 0 1 0 6"></path><line x1="14" y1="7" x2="14" y2="7"></line><line x1="10" y1="17" x2="10" y2="17"></line></svg>'
28
+ };
29
+ }
30
+
31
+ /**
32
+ * Render Embed tool content
33
+ *
34
+ * @returns {HTMLElement}
35
+ */
36
+ render() {
37
+ if (!this.data.service) {
38
+ const container = document.createElement('div');
39
+
40
+ this.element = container;
41
+ const input = document.createElement('input');
42
+ input.classList.add('cdx-input');
43
+ input.placeholder = 'https://www.youtube.com/watch?v=w8vsuOXZBXc';
44
+ input.type = 'url';
45
+ input.addEventListener('paste', (event) => {
46
+ const url = event.clipboardData.getData('text');
47
+ const service = Object.keys(Embed.services).find((key) => Embed.services[key].regex.test(url));
48
+ if (service) {
49
+ this.onPaste({detail: {key: service, data: url}});
50
+ }
51
+ });
52
+ container.appendChild(input);
53
+
54
+ return container;
55
+ }
56
+ return super.render();
57
+ }
58
+
59
+ validate(savedData) {
60
+ return savedData.service && savedData.source ? true : false;
61
+ }
62
+ }
63
+
64
+ class CustomVideoTool extends VideoTool {
65
+
66
+ static get toolbox() {
67
+ return {
68
+ title: 'Video',
69
+ icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 10.5606V13.4394C10 14.4777 11.1572 15.0971 12.0211 14.5211L14.1803 13.0817C14.9536 12.5661 14.9503 11.4317 14.18 10.9181L12.0214 9.47907C11.1591 8.9042 10 9.5203 10 10.5606Z" stroke="black" stroke-width="2"/><rect x="5" y="5" width="14" height="14" rx="4" stroke="black" stroke-width="2"/></svg>'
70
+ };
71
+ }
72
+
73
+ }
74
+
75
+ var EDITORJS_TOOLS_BLOG = {
76
+ paragraph: {
77
+ inlineToolbar: true,
78
+ tunes: ['textAlign']
79
+ },
80
+ header: {
81
+ class: Header,
82
+ inlineToolbar: true,
83
+ tunes: ['textAlign'],
84
+ config: {
85
+ placeholder: 'Titolo...',
86
+ levels: [1, 2, 4],
87
+ defaultLevel: 2
88
+ }
89
+ },
90
+ quote: {
91
+ class: Quote,
92
+ inlineToolbar: true,
93
+ config: {
94
+ quotePlaceholder: 'Scrivi una citazione...',
95
+ captionPlaceholder: 'Autore',
96
+ },
97
+ },
98
+ list: {
99
+ class: NestedList,
100
+ inlineToolbar: true,
101
+ config: {
102
+ defaultStyle: 'unordered'
103
+ },
104
+ },
105
+ delimiter: Delimiter,
106
+ table: {
107
+ class: Table,
108
+ inlineToolbar: ['link', 'italic', 'bold'],
109
+ },
110
+ // code: CodeTool,
111
+ image: {
112
+ class: ImageTool,
113
+ config: {
114
+ captionPlaceholder: 'Caption...',
115
+ endpoints: {
116
+ byFile: pathApp+'/api/backend/editorjs/image.php'
117
+ // Aggiungere cartella dove caricare i file
118
+ },
119
+ field: 'image',
120
+ types: 'image/png, image/jpg, image/jpeg',
121
+ additionalRequestHeaders: { dir: '' }
122
+ // Forzo nel css la rimozione "display: none" di withBorder, stretched e withBackground
123
+ }
124
+ },
125
+ gallery: {
126
+ class: ImageGallery,
127
+ config: {
128
+ captionPlaceholder: 'Caption galleria...',
129
+ endpoints: {
130
+ byFile: pathApp+'/api/backend/editorjs/image.php'
131
+ // Aggiungere cartella dove caricare i file
132
+ },
133
+ field: 'image',
134
+ types: 'image/png, image/jpg, image/jpeg',
135
+ additionalRequestHeaders: { dir: '' }
136
+ // Forzo nel css la rimozione "display: none" di fit e slider
137
+ },
138
+ },
139
+ Marker: Marker,
140
+ inlineCode: InlineCode,
141
+ attaches: {
142
+ class: AttachesTool,
143
+ config: {
144
+ endpoint: pathApp+'/api/backend/editorjs/file.php',
145
+ // Aggiungere cartella dove caricare i file
146
+ field: 'file',
147
+ additionalRequestHeaders: { dir: '' }
148
+ }
149
+ },
150
+ // TODO: Aggiungi caricamento video (potrebbe tornare utile la classe ImageTool)
151
+ // video: {
152
+ // class: CustomVideoTool,
153
+ // config: {
154
+ // captionPlaceholder: 'Caption...',
155
+ // endpoints: {
156
+ // byFile: pathSite+'/api/task/article/file.php'
157
+ // },
158
+ // player: {
159
+ // controls: true,
160
+ // autoplay: false,
161
+ // },
162
+ // field: 'file',
163
+ // types: 'video/quicktime, video/mp4'
164
+ // // Forzo nel css la rimozione "display: none" di withBorder, stretched e withBackground
165
+ // }
166
+ // },
167
+ // TODO: embed non funziona. Trovare un modo per caricare iframe
168
+ // embed: {
169
+ // class: CustomEmded,
170
+ // },
171
+ textAlign: {
172
+ class: AlignmentTuneTool,
173
+ config:{
174
+ default: "left"
175
+ },
176
+ },
177
+ link: {
178
+ class: CustomHyperlink,
179
+ config: {
180
+ shortcut: 'CMD+L',
181
+ target: '_blank',
182
+ rel: 'nofollow',
183
+ availableTargets: ['_blank', '_self'],
184
+ availableRels: ['author', 'noreferrer'],
185
+ validate: false,
186
+ }
187
+ },
188
+ };
189
+
190
+ var EDITORJS_TOOLS_TABLE = {
191
+ paragraph: false,
192
+ inlineCode: InlineCode,
193
+ table: {
194
+ class: Table,
195
+ inlineToolbar: ['link', 'italic', 'bold'],
196
+ }
197
+ };
198
+
199
+ var EDITORJS_i18n_IT = {
200
+ messages: {
201
+ ui: {
202
+ "blockTunes": {
203
+ "toggler": {
204
+ "Click to tune": "Modifica",
205
+ "or drag to move": "Trascina per muovere"
206
+ },
207
+ },
208
+ "inlineToolbar": {
209
+ "converter": {
210
+ "Convert to": "Converti"
211
+ }
212
+ },
213
+ "toolbar": {
214
+ "toolbox": {
215
+ "Add": "Aggiungi",
216
+ }
217
+ }
218
+ },
219
+ toolNames: {
220
+ "Add": "Aggiungi",
221
+ "Quote": "Citazione",
222
+ "Delimiter": "Linea",
223
+ "Text": "Testo",
224
+ "Heading": "Titolo",
225
+ "Table": "Tabella",
226
+ "Code": "Codice",
227
+ "List": "Elenco",
228
+ "Bold": "Grassetto",
229
+ "Italic": "Corsivo",
230
+ "Marker": "Evidenzia",
231
+ "InlineCode": "Codice",
232
+ "TextAlign": "Allineamento",
233
+ "Gallery": "Galleria",
234
+ "Image": "Immagine",
235
+ "Attachment": "Allega file",
236
+ },
237
+ tools: {
238
+ "header": {
239
+ "Heading 1": "Titolo grande",
240
+ "Heading 2": "Titolo",
241
+ "Heading 4": "Sottotitolo"
242
+ },
243
+ "link": {
244
+ "Add a link": "Aggiungi link"
245
+ },
246
+ "code": {
247
+ "Enter a code": "Inserisci codice",
248
+ },
249
+ "quote": {
250
+ "Align Left": "Allinea a sinistra",
251
+ "Align Center": "Allinea in centro",
252
+ },
253
+ "table": {
254
+ "With headings": "Con intestazione",
255
+ "Without headings": "Senza intestazione",
256
+ "Add column to left": "Aggiungi colonna sinistra",
257
+ "Add column to right": "Aggiungi colonna destra",
258
+ "Add row above": "Aggiungi riga sopra",
259
+ "Add row below": "Aggiungi riga sotto",
260
+ "Delete column": "Elimina colonna",
261
+ "Delete row": "Elimina riga",
262
+ },
263
+ "list": {
264
+ "Ordered": "Elenco numerato",
265
+ "Unordered": "Elenco puntato",
266
+ },
267
+ "gallery": {
268
+ "Select an Image": "Seleziona immagini",
269
+ },
270
+ "image": {
271
+ "Select an Image": "Seleziona immagine",
272
+ },
273
+ "video": {
274
+ "Select an Video": "Seleziona video",
275
+ },
276
+ "attaches": {
277
+ "Select file to upload": "Seleziona file da allegare",
278
+ },
279
+ },
280
+ blockTunes: {
281
+ "delete": {
282
+ "Delete": "Elimina",
283
+ "Click to delete": "Clicca per elimina"
284
+ },
285
+ "moveUp": {
286
+ "Move up": "Su"
287
+ },
288
+ "moveDown": {
289
+ "Move down": "Giù"
290
+ }
291
+ },
292
+ }
293
+ };