mazer-rails 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +75 -0
  3. data/lib/mazer-rails.rb +13 -0
  4. data/lib/mazer_rails/engine.rb +27 -0
  5. data/lib/mazer_rails/version.rb +1 -1
  6. data/mazer-rails.gemspec +5 -2
  7. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-300-normal.woff +0 -0
  8. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-400-normal.woff +0 -0
  9. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-600-normal.woff +0 -0
  10. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-700-normal.woff +0 -0
  11. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-800-normal.woff +0 -0
  12. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-300-normal.woff2 +0 -0
  13. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-400-normal.woff2 +0 -0
  14. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-600-normal.woff2 +0 -0
  15. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-700-normal.woff2 +0 -0
  16. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-800-normal.woff2 +0 -0
  17. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-300-normal.woff2 +0 -0
  18. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-400-normal.woff2 +0 -0
  19. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-600-normal.woff2 +0 -0
  20. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-700-normal.woff2 +0 -0
  21. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-800-normal.woff2 +0 -0
  22. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-300-normal.woff2 +0 -0
  23. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-400-normal.woff2 +0 -0
  24. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-600-normal.woff2 +0 -0
  25. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-700-normal.woff2 +0 -0
  26. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-800-normal.woff2 +0 -0
  27. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-300-normal.woff2 +0 -0
  28. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-400-normal.woff2 +0 -0
  29. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-600-normal.woff2 +0 -0
  30. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-700-normal.woff2 +0 -0
  31. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-800-normal.woff2 +0 -0
  32. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-300-normal.woff2 +0 -0
  33. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-400-normal.woff2 +0 -0
  34. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-600-normal.woff2 +0 -0
  35. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-700-normal.woff2 +0 -0
  36. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-800-normal.woff2 +0 -0
  37. data/vendor/assets/fonts/vendor/bootstrap-icons/bootstrap-icons.woff +0 -0
  38. data/vendor/assets/fonts/vendor/bootstrap-icons/bootstrap-icons.woff2 +0 -0
  39. data/vendor/assets/javascripts/mazer/app.js +2 -0
  40. data/vendor/assets/javascripts/mazer/bootstrap.js +2 -0
  41. data/vendor/assets/javascripts/mazer/initTheme.js +1 -0
  42. data/vendor/assets/javascripts/mazer/mazer.js +2 -0
  43. data/vendor/assets/stylesheets/mazer/app-dark.scss +1 -0
  44. data/vendor/assets/stylesheets/mazer/app.scss +13 -0
  45. metadata +60 -120
  46. data/lib/mazer_rails.rb +0 -7
  47. data/vendor/assets/fonts/iconly/Iconly---Bold.eot +0 -0
  48. data/vendor/assets/fonts/iconly/Iconly---Bold.svg +0 -19
  49. data/vendor/assets/fonts/iconly/Iconly---Bold.ttf +0 -0
  50. data/vendor/assets/fonts/iconly/Iconly---Bold.woff +0 -0
  51. data/vendor/assets/images/bg/4853433.png +0 -0
  52. data/vendor/assets/images/faces/1.jpg +0 -0
  53. data/vendor/assets/images/faces/2.jpg +0 -0
  54. data/vendor/assets/images/faces/3.jpg +0 -0
  55. data/vendor/assets/images/faces/4.jpg +0 -0
  56. data/vendor/assets/images/faces/5.jpg +0 -0
  57. data/vendor/assets/images/faces/6.jpg +0 -0
  58. data/vendor/assets/images/faces/7.jpg +0 -0
  59. data/vendor/assets/images/faces/8.jpg +0 -0
  60. data/vendor/assets/images/logo/favicon.png +0 -0
  61. data/vendor/assets/images/logo/favicon.svg +0 -1
  62. data/vendor/assets/images/logo/logo.svg +0 -1
  63. data/vendor/assets/images/samples/1.png +0 -0
  64. data/vendor/assets/images/samples/2.png +0 -0
  65. data/vendor/assets/images/samples/3.png +0 -0
  66. data/vendor/assets/images/samples/4.png +0 -0
  67. data/vendor/assets/images/samples/architecture1.jpg +0 -0
  68. data/vendor/assets/images/samples/banana.jpg +0 -0
  69. data/vendor/assets/images/samples/bg-mountain.jpg +0 -0
  70. data/vendor/assets/images/samples/building.jpg +0 -0
  71. data/vendor/assets/images/samples/error-403.svg +0 -94
  72. data/vendor/assets/images/samples/error-404.svg +0 -88
  73. data/vendor/assets/images/samples/error-500.svg +0 -76
  74. data/vendor/assets/images/samples/jump.jpg +0 -0
  75. data/vendor/assets/images/samples/motorcycle.jpg +0 -0
  76. data/vendor/assets/images/samples/origami.jpg +0 -0
  77. data/vendor/assets/images/samples/water.jpg +0 -0
  78. data/vendor/assets/images/svg-loaders/audio.svg +0 -29
  79. data/vendor/assets/images/svg-loaders/ball-triangle.svg +0 -1
  80. data/vendor/assets/images/svg-loaders/bars.svg +0 -1
  81. data/vendor/assets/images/svg-loaders/circles.svg +0 -20
  82. data/vendor/assets/images/svg-loaders/grid.svg +0 -1
  83. data/vendor/assets/images/svg-loaders/hearts.svg +0 -1
  84. data/vendor/assets/images/svg-loaders/oval.svg +0 -1
  85. data/vendor/assets/images/svg-loaders/puff.svg +0 -1
  86. data/vendor/assets/images/svg-loaders/rings.svg +0 -1
  87. data/vendor/assets/images/svg-loaders/spinning-circles.svg +0 -1
  88. data/vendor/assets/images/svg-loaders/tail-spin.svg +0 -1
  89. data/vendor/assets/images/svg-loaders/three-dots.svg +0 -1
  90. data/vendor/assets/javascripts/app.js +0 -9
  91. data/vendor/assets/javascripts/bootstrap.js +0 -6
  92. data/vendor/assets/javascripts/components/dark.js +0 -65
  93. data/vendor/assets/javascripts/components/sidebar.js +0 -185
  94. data/vendor/assets/javascripts/helper/isDesktop.js +0 -1
  95. data/vendor/assets/javascripts/initTheme.js +0 -5
  96. data/vendor/assets/javascripts/mazer.js +0 -9
  97. data/vendor/assets/javascripts/pages/ckeditor.js +0 -3
  98. data/vendor/assets/javascripts/pages/component-toasts.js +0 -9
  99. data/vendor/assets/javascripts/pages/dashboard.js +0 -158
  100. data/vendor/assets/javascripts/pages/datatables.js +0 -1
  101. data/vendor/assets/javascripts/pages/filepond.js +0 -181
  102. data/vendor/assets/javascripts/pages/form-editor.js +0 -27
  103. data/vendor/assets/javascripts/pages/form-element-select.js +0 -14
  104. data/vendor/assets/javascripts/pages/horizontal-layout.js +0 -43
  105. data/vendor/assets/javascripts/pages/jquery.js +0 -1
  106. data/vendor/assets/javascripts/pages/jsvectormap.js +0 -60
  107. data/vendor/assets/javascripts/pages/parsley.js +0 -55
  108. data/vendor/assets/javascripts/pages/quill.js +0 -27
  109. data/vendor/assets/javascripts/pages/rater-js.js +0 -38
  110. data/vendor/assets/javascripts/pages/simple-datatables.js +0 -46
  111. data/vendor/assets/javascripts/pages/summernote.js +0 -20
  112. data/vendor/assets/javascripts/pages/sweetalert2.js +0 -142
  113. data/vendor/assets/javascripts/pages/tinymce.js +0 -22
  114. data/vendor/assets/javascripts/pages/toastify.js +0 -81
  115. data/vendor/assets/javascripts/pages/ui-apexchart.js +0 -521
  116. data/vendor/assets/javascripts/pages/ui-chartjs.js +0 -445
  117. data/vendor/assets/javascripts/pages/ui-todolist.js +0 -5
  118. data/vendor/assets/stylesheets/_fonts.scss +0 -5
  119. data/vendor/assets/stylesheets/_mazer.scss +0 -103
  120. data/vendor/assets/stylesheets/_utilities.scss +0 -53
  121. data/vendor/assets/stylesheets/_variables.scss +0 -1626
  122. data/vendor/assets/stylesheets/app.scss +0 -20
  123. data/vendor/assets/stylesheets/bootstrap.scss +0 -58
  124. data/vendor/assets/stylesheets/components/_alert.scss +0 -43
  125. data/vendor/assets/stylesheets/components/_avatar.scss +0 -78
  126. data/vendor/assets/stylesheets/components/_badge.scss +0 -20
  127. data/vendor/assets/stylesheets/components/_breadcrumb.scss +0 -10
  128. data/vendor/assets/stylesheets/components/_buttons.scss +0 -62
  129. data/vendor/assets/stylesheets/components/_card.scss +0 -126
  130. data/vendor/assets/stylesheets/components/_carousel.scss +0 -6
  131. data/vendor/assets/stylesheets/components/_divider.scss +0 -37
  132. data/vendor/assets/stylesheets/components/_dropdowns.scss +0 -24
  133. data/vendor/assets/stylesheets/components/_forms.scss +0 -213
  134. data/vendor/assets/stylesheets/components/_icons.scss +0 -48
  135. data/vendor/assets/stylesheets/components/_modal.scss +0 -46
  136. data/vendor/assets/stylesheets/components/_navbar.scss +0 -280
  137. data/vendor/assets/stylesheets/components/_navs.scss +0 -32
  138. data/vendor/assets/stylesheets/components/_pagination.scss +0 -39
  139. data/vendor/assets/stylesheets/components/_progress.scss +0 -32
  140. data/vendor/assets/stylesheets/components/_sidebar.scss +0 -171
  141. data/vendor/assets/stylesheets/components/_table.scss +0 -36
  142. data/vendor/assets/stylesheets/iconly.scss +0 -327
  143. data/vendor/assets/stylesheets/layouts/main.scss +0 -48
  144. data/vendor/assets/stylesheets/mixins/_navbar.scss +0 -20
  145. data/vendor/assets/stylesheets/pages/auth.scss +0 -51
  146. data/vendor/assets/stylesheets/pages/chat.scss +0 -145
  147. data/vendor/assets/stylesheets/pages/datatables.scss +0 -7
  148. data/vendor/assets/stylesheets/pages/dripicons.scss +0 -20
  149. data/vendor/assets/stylesheets/pages/email.scss +0 -625
  150. data/vendor/assets/stylesheets/pages/error.scss +0 -22
  151. data/vendor/assets/stylesheets/pages/form-element-select.scss +0 -7
  152. data/vendor/assets/stylesheets/pages/simple-datatables.scss +0 -20
  153. data/vendor/assets/stylesheets/pages/summernote.scss +0 -4
  154. data/vendor/assets/stylesheets/themes/dark/_mazer-dark.scss +0 -82
  155. data/vendor/assets/stylesheets/themes/dark/_root.scss +0 -55
  156. data/vendor/assets/stylesheets/themes/dark/_variables-dark.scss +0 -329
  157. data/vendor/assets/stylesheets/themes/dark/app-dark.scss +0 -54
  158. data/vendor/assets/stylesheets/widgets/chat.scss +0 -26
  159. data/vendor/assets/stylesheets/widgets/todo.scss +0 -33
@@ -1,60 +0,0 @@
1
- var world_map = new jsVectorMap({
2
- selector: "#world-map",
3
- map: "world",
4
- zoomOnScroll: false,
5
- regionStyle: {
6
- hover: {
7
- fill: '#435ebe'
8
- }
9
- },
10
- markers: [
11
- {
12
- name: 'Indonesia',
13
- coords: [-6.229728, 106.6894311],
14
- style: {
15
- fill: '#435ebe'
16
- }
17
- },
18
- {
19
- name: 'United States',
20
- coords: [38.8936708, -77.1546604],
21
- style: {
22
- fill: '#28ab55'
23
- }
24
- },
25
- {
26
- name: 'Russia',
27
- coords: [55.5807481, 36.825129],
28
- style: {
29
- fill: '#f3616d'
30
- }
31
- },
32
- {
33
- name: 'China',
34
- coords: [39.9385466, 116.1172735]
35
- },
36
- {
37
- name: 'United Kingdom',
38
- coords: [51.5285582, -0.2416812]
39
- },
40
- {
41
- name: 'India',
42
- coords: [26.8851417, 75.6504721]
43
- },
44
- {
45
- name: 'Australia',
46
- coords: [-35.2813046, 149.124822]
47
- },
48
- {
49
- name: 'Brazil',
50
- coords: [-22.9140693, -43.5860681]
51
- },
52
- {
53
- name: 'Egypt',
54
- coords: [26.834955, 26.3823725]
55
- },
56
- ],
57
- onRegionTooltipShow(event, tooltip) {
58
- tooltip.css({ backgroundColor: '#435ebe' })
59
- }
60
- });
@@ -1,55 +0,0 @@
1
- $.extend(window.Parsley.options, {
2
- focus: "first",
3
- excluded:
4
- "input[type=button], input[type=submit], input[type=reset], .search, .ignore",
5
- triggerAfterFailure: "change blur",
6
- errorsContainer: function (element) {},
7
- trigger: "change",
8
- successClass: "is-valid",
9
- errorClass: "is-invalid",
10
- classHandler: function (el) {
11
- return el.$element.closest(".form-group")
12
- },
13
- errorsContainer: function (el) {
14
- return el.$element.closest(".form-group")
15
- },
16
- errorsWrapper: '<div class="parsley-error"></div>',
17
- errorTemplate: "<span></span>",
18
- })
19
-
20
- Parsley.on("field:validated", function (el) {
21
- var elNode = $(el)[0]
22
- if (elNode && !elNode.isValid()) {
23
- var rqeuiredValResult = elNode.validationResult.filter(function (vr) {
24
- return vr.assert.name === "required"
25
- })
26
- if (rqeuiredValResult.length > 0) {
27
- var fieldNode = $(elNode.element)
28
- var formGroupNode = fieldNode.closest(".form-group")
29
- var lblNode = formGroupNode.find(".form-label:first")
30
- if (lblNode.length > 0) {
31
- // change default error message to include field label
32
- var errorNode = formGroupNode.find(
33
- "div.parsley-error span[class*=parsley-]"
34
- )
35
- if (errorNode.length > 0) {
36
- var lblText = lblNode.text()
37
- if (lblText) {
38
- errorNode.html(lblText + " is required.")
39
- }
40
- }
41
- }
42
- }
43
- }
44
- })
45
-
46
- Parsley.addValidator("restrictedCity", {
47
- requirementType: "string",
48
- validateString: function (value, requirement) {
49
- value = (value || "").trim()
50
- return value === "" || value.toLowerCase() === requirement.toLowerCase()
51
- },
52
- messages: {
53
- en: 'You have to live in <a href="https://www.google.com/maps/place/Jakarta">Jakarta</a>.',
54
- },
55
- })
@@ -1,27 +0,0 @@
1
- var snow = new Quill("#snow", {
2
- theme: "snow",
3
- })
4
- var bubble = new Quill("#bubble", {
5
- theme: "bubble",
6
- })
7
- new Quill("#full", {
8
- bounds: "#full-container .editor",
9
- modules: {
10
- toolbar: [
11
- [{ font: [] }, { size: [] }],
12
- ["bold", "italic", "underline", "strike"],
13
- [{ color: [] }, { background: [] }],
14
- [{ script: "super" }, { script: "sub" }],
15
- [
16
- { list: "ordered" },
17
- { list: "bullet" },
18
- { indent: "-1" },
19
- { indent: "+1" },
20
- ],
21
- ["direction", { align: [] }],
22
- ["link", "image", "video"],
23
- ["clean"],
24
- ],
25
- },
26
- theme: "snow",
27
- })
@@ -1,38 +0,0 @@
1
- raterJs({
2
- element: document.querySelector("#basic"),
3
- starSize: 32,
4
- rateCallback: function rateCallback(rating, done) {
5
- this.setRating(rating)
6
- done()
7
- },
8
- })
9
-
10
- raterJs({
11
- element: document.querySelector("#step"),
12
- rateCallback: function rateCallback(rating, done) {
13
- this.setRating(rating)
14
- done()
15
- },
16
- starSize: 32,
17
- step: 0.5,
18
- })
19
- raterJs({
20
- element: document.querySelector("#unli1"),
21
- rateCallback: function rateCallback(rating, done) {
22
- this.setRating(rating)
23
- done()
24
- },
25
- starSize: 32,
26
- max: 10,
27
- step: 0.5,
28
- })
29
- raterJs({
30
- element: document.querySelector("#unli2"),
31
- rateCallback: function rateCallback(rating, done) {
32
- this.setRating(rating)
33
- done()
34
- },
35
- starSize: 32,
36
- max: 16,
37
- step: 0.5,
38
- })
@@ -1,46 +0,0 @@
1
- let dataTable = new simpleDatatables.DataTable(
2
- document.getElementById("table1")
3
- )
4
- // Move "per page dropdown" selector element out of label
5
- // to make it work with bootstrap 5. Add bs5 classes.
6
- function adaptPageDropdown() {
7
- const selector = dataTable.wrapper.querySelector(".dataTable-selector")
8
- selector.parentNode.parentNode.insertBefore(selector, selector.parentNode)
9
- selector.classList.add("form-select")
10
- }
11
-
12
- // Add bs5 classes to pagination elements
13
- function adaptPagination() {
14
- const paginations = dataTable.wrapper.querySelectorAll(
15
- "ul.dataTable-pagination-list"
16
- )
17
-
18
- for (const pagination of paginations) {
19
- pagination.classList.add(...["pagination", "pagination-primary"])
20
- }
21
-
22
- const paginationLis = dataTable.wrapper.querySelectorAll(
23
- "ul.dataTable-pagination-list li"
24
- )
25
-
26
- for (const paginationLi of paginationLis) {
27
- paginationLi.classList.add("page-item")
28
- }
29
-
30
- const paginationLinks = dataTable.wrapper.querySelectorAll(
31
- "ul.dataTable-pagination-list li a"
32
- )
33
-
34
- for (const paginationLink of paginationLinks) {
35
- paginationLink.classList.add("page-link")
36
- }
37
- }
38
-
39
- // Patch "per page dropdown" and pagination after table rendered
40
- dataTable.on("datatable.init", function () {
41
- adaptPageDropdown()
42
- adaptPagination()
43
- })
44
-
45
- // Re-patch pagination after the page was changed
46
- dataTable.on("datatable.page", adaptPagination)
@@ -1,20 +0,0 @@
1
- $("#summernote").summernote({
2
- tabsize: 2,
3
- height: 120,
4
- })
5
- $("#hint").summernote({
6
- height: 100,
7
- toolbar: false,
8
- placeholder: "type with apple, orange, watermelon and lemon",
9
- hint: {
10
- words: ["apple", "orange", "watermelon", "lemon"],
11
- match: /\b(\w{1,})$/,
12
- search: function (keyword, callback) {
13
- callback(
14
- $.grep(this.words, function (item) {
15
- return item.indexOf(keyword) === 0
16
- })
17
- )
18
- },
19
- },
20
- })
@@ -1,142 +0,0 @@
1
- document.getElementById("basic").addEventListener("click", (e) => {
2
- Swal.fire("Any fool can use a computer")
3
- })
4
- document.getElementById("footer").addEventListener("click", (e) => {
5
- Swal.fire({
6
- icon: "error",
7
- title: "Oops...",
8
- text: "Something went wrong!",
9
- footer: "<a href>Why do I have this issue?</a>",
10
- })
11
- })
12
- document.getElementById("title").addEventListener("click", (e) => {
13
- Swal.fire("The Internet?", "That thing is still around?", "question")
14
- })
15
- document.getElementById("success").addEventListener("click", (e) => {
16
- Swal.fire({
17
- icon: "success",
18
- title: "Success",
19
- })
20
- })
21
- document.getElementById("error").addEventListener("click", (e) => {
22
- Swal.fire({
23
- icon: "error",
24
- title: "Error",
25
- })
26
- })
27
- document.getElementById("warning").addEventListener("click", (e) => {
28
- Swal.fire({
29
- icon: "warning",
30
- title: "Warning",
31
- })
32
- })
33
- document.getElementById("info").addEventListener("click", (e) => {
34
- Swal.fire({
35
- icon: "info",
36
- title: "Info",
37
- })
38
- })
39
- document.getElementById("question").addEventListener("click", (e) => {
40
- Swal.fire({
41
- icon: "question",
42
- title: "Question",
43
- })
44
- })
45
- document.getElementById("text").addEventListener("click", (e) => {
46
- Swal.fire({
47
- title: "Enter your IP address",
48
- input: "text",
49
- inputLabel: "Your IP address",
50
- showCancelButton: true,
51
- })
52
- })
53
- document.getElementById("email").addEventListener("click", async (e) => {
54
- const { value: email } = await Swal.fire({
55
- title: "Input email address",
56
- input: "email",
57
- inputLabel: "Your email address",
58
- inputPlaceholder: "Enter your email address",
59
- })
60
-
61
- if (email) {
62
- Swal.fire(`Entered email: ${email}`)
63
- }
64
- })
65
- document.getElementById("url").addEventListener("click", async (e) => {
66
- const { value: url } = await Swal.fire({
67
- input: "url",
68
- inputLabel: "URL address",
69
- inputPlaceholder: "Enter the URL",
70
- })
71
-
72
- if (url) {
73
- Swal.fire(`Entered URL: ${url}`)
74
- }
75
- })
76
- document.getElementById("password").addEventListener("click", async (e) => {
77
- const { value: password } = await Swal.fire({
78
- title: "Enter your password",
79
- input: "password",
80
- inputLabel: "Password",
81
- inputPlaceholder: "Enter your password",
82
- inputAttributes: {
83
- maxlength: 10,
84
- autocapitalize: "off",
85
- autocorrect: "off",
86
- },
87
- })
88
-
89
- if (password) {
90
- Swal.fire(`Entered password: ${password}`)
91
- }
92
- })
93
- document.getElementById("textarea").addEventListener("click", async (e) => {
94
- const { value: text } = await Swal.fire({
95
- input: "textarea",
96
- inputLabel: "Message",
97
- inputPlaceholder: "Type your message here...",
98
- inputAttributes: {
99
- "aria-label": "Type your message here",
100
- },
101
- showCancelButton: true,
102
- })
103
-
104
- if (text) {
105
- Swal.fire(text)
106
- }
107
- })
108
- document.getElementById("select").addEventListener("click", async (e) => {
109
- const { value: fruit } = await Swal.fire({
110
- title: "Select field validation",
111
- input: "select",
112
- inputOptions: {
113
- Fruits: {
114
- apples: "Apples",
115
- bananas: "Bananas",
116
- grapes: "Grapes",
117
- oranges: "Oranges",
118
- },
119
- Vegetables: {
120
- potato: "Potato",
121
- broccoli: "Broccoli",
122
- carrot: "Carrot",
123
- },
124
- icecream: "Ice cream",
125
- },
126
- inputPlaceholder: "Select a fruit",
127
- showCancelButton: true,
128
- inputValidator: (value) => {
129
- return new Promise((resolve) => {
130
- if (value === "oranges") {
131
- resolve()
132
- } else {
133
- resolve("You need to select oranges :)")
134
- }
135
- })
136
- },
137
- })
138
-
139
- if (fruit) {
140
- Swal.fire(`You selected: ${fruit}`)
141
- }
142
- })
@@ -1,22 +0,0 @@
1
- document.addEventListener("DOMContentLoaded", () => {
2
- console.log("initing", document.body.classList.contains("theme-dark"))
3
-
4
- const themeOptions = document.body.classList.contains("theme-dark")
5
- ? {
6
- skin: "oxide-dark",
7
- content_css: "dark",
8
- }
9
- : {
10
- skin: "oxide",
11
- content_css: "default",
12
- }
13
-
14
- tinymce.init({ selector: "#default", ...themeOptions })
15
- tinymce.init({
16
- selector: "#dark",
17
- toolbar:
18
- "undo redo styleselect bold italic alignleft aligncenter alignright bullist numlist outdent indent code",
19
- plugins: "code",
20
- ...themeOptions,
21
- })
22
- })
@@ -1,81 +0,0 @@
1
- document.getElementById("basic").addEventListener("click", () => {
2
- Toastify({
3
- text: "This is a toast",
4
- duration: 3000,
5
- }).showToast()
6
- })
7
- document.getElementById("background").addEventListener("click", () => {
8
- Toastify({
9
- text: "This is a toast",
10
- duration: 3000,
11
- backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
12
- }).showToast()
13
- })
14
- document.getElementById("close").addEventListener("click", () => {
15
- Toastify({
16
- text: "Click close button",
17
- duration: 3000,
18
- close: true,
19
- backgroundColor: "#4fbe87",
20
- }).showToast()
21
- })
22
- document.getElementById("top-left").addEventListener("click", () => {
23
- Toastify({
24
- text: "This is toast in top left",
25
- duration: 3000,
26
- close: true,
27
- gravity: "top",
28
- position: "left",
29
- backgroundColor: "#4fbe87",
30
- }).showToast()
31
- })
32
- document.getElementById("top-center").addEventListener("click", () => {
33
- Toastify({
34
- text: "This is toast in top center",
35
- duration: 3000,
36
- close: true,
37
- gravity: "top",
38
- position: "center",
39
- backgroundColor: "#4fbe87",
40
- }).showToast()
41
- })
42
- document.getElementById("top-right").addEventListener("click", () => {
43
- Toastify({
44
- text: "This is toast in top right",
45
- duration: 3000,
46
- close: true,
47
- gravity: "top",
48
- position: "right",
49
- backgroundColor: "#4fbe87",
50
- }).showToast()
51
- })
52
- document.getElementById("bottom-right").addEventListener("click", () => {
53
- Toastify({
54
- text: "This is toast in bottom right",
55
- duration: 3000,
56
- close: true,
57
- gravity: "bottom",
58
- position: "right",
59
- backgroundColor: "#4fbe87",
60
- }).showToast()
61
- })
62
- document.getElementById("bottom-center").addEventListener("click", () => {
63
- Toastify({
64
- text: "This is toast in bottom center",
65
- duration: 3000,
66
- close: true,
67
- gravity: "bottom",
68
- position: "center",
69
- backgroundColor: "#4fbe87",
70
- }).showToast()
71
- })
72
- document.getElementById("bottom-left").addEventListener("click", () => {
73
- Toastify({
74
- text: "This is toast in bottom left",
75
- duration: 3000,
76
- close: true,
77
- gravity: "bottom",
78
- position: "left",
79
- backgroundColor: "#4fbe87",
80
- }).showToast()
81
- })