golden-logic-ui 1.2.337 → 1.2.339

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 (152) hide show
  1. package/dist/ClickOutsideDirective.js +13 -0
  2. package/dist/Form.js +151 -0
  3. package/dist/Stores/toast.js +22 -0
  4. package/dist/_virtual/_commonjsHelpers.js +6 -0
  5. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  6. package/dist/_virtual/model.js +2 -0
  7. package/dist/_virtual/model2.js +4 -0
  8. package/dist/_virtual/plugin.js +2 -0
  9. package/dist/_virtual/plugin10.js +2 -0
  10. package/dist/_virtual/plugin11.js +2 -0
  11. package/dist/_virtual/plugin12.js +2 -0
  12. package/dist/_virtual/plugin13.js +2 -0
  13. package/dist/_virtual/plugin14.js +2 -0
  14. package/dist/_virtual/plugin15.js +2 -0
  15. package/dist/_virtual/plugin16.js +2 -0
  16. package/dist/_virtual/plugin17.js +4 -0
  17. package/dist/_virtual/plugin18.js +4 -0
  18. package/dist/_virtual/plugin19.js +4 -0
  19. package/dist/_virtual/plugin2.js +2 -0
  20. package/dist/_virtual/plugin20.js +4 -0
  21. package/dist/_virtual/plugin21.js +4 -0
  22. package/dist/_virtual/plugin22.js +4 -0
  23. package/dist/_virtual/plugin23.js +4 -0
  24. package/dist/_virtual/plugin24.js +4 -0
  25. package/dist/_virtual/plugin25.js +4 -0
  26. package/dist/_virtual/plugin26.js +4 -0
  27. package/dist/_virtual/plugin27.js +4 -0
  28. package/dist/_virtual/plugin28.js +4 -0
  29. package/dist/_virtual/plugin29.js +4 -0
  30. package/dist/_virtual/plugin3.js +2 -0
  31. package/dist/_virtual/plugin30.js +4 -0
  32. package/dist/_virtual/plugin31.js +4 -0
  33. package/dist/_virtual/plugin32.js +4 -0
  34. package/dist/_virtual/plugin4.js +2 -0
  35. package/dist/_virtual/plugin5.js +2 -0
  36. package/dist/_virtual/plugin6.js +2 -0
  37. package/dist/_virtual/plugin7.js +2 -0
  38. package/dist/_virtual/plugin8.js +2 -0
  39. package/dist/_virtual/plugin9.js +2 -0
  40. package/dist/_virtual/theme.js +2 -0
  41. package/dist/_virtual/theme2.js +4 -0
  42. package/dist/_virtual/tinymce.js +7 -0
  43. package/dist/_virtual/tinymce2.js +4 -0
  44. package/dist/components/GeneralComponents/ConfirmationModal.vue.js +75 -0
  45. package/dist/components/GeneralComponents/DataTable/DatatableAction.vue.js +113 -0
  46. package/dist/components/GeneralComponents/DataTable/DatatableCommand.vue.js +18 -0
  47. package/dist/components/GeneralComponents/DataTable/DatatableConvertCronToHuman.vue.js +82 -0
  48. package/dist/components/GeneralComponents/DataTable/DatatableDate.vue.js +20 -0
  49. package/dist/components/GeneralComponents/DataTable/DatatableDateTime.vue.js +24 -0
  50. package/dist/components/GeneralComponents/DataTable/DatatableDeleteAction.vue.js +104 -0
  51. package/dist/components/GeneralComponents/DataTable/DatatableDeleteEditAction.vue.js +123 -0
  52. package/dist/components/GeneralComponents/DataTable/DatatableFileDownload.vue.js +87 -0
  53. package/dist/components/GeneralComponents/DataTable/DatatableFiles.vue.js +80 -0
  54. package/dist/components/GeneralComponents/DataTable/DatatableHtml.vue.js +17 -0
  55. package/dist/components/GeneralComponents/DataTable/DatatableList.vue.js +35 -0
  56. package/dist/components/GeneralComponents/DataTable/DatatableListNested.vue.js +37 -0
  57. package/dist/components/GeneralComponents/DataTable/DatatablePicture.vue.js +27 -0
  58. package/dist/components/GeneralComponents/DataTable/DatatablePictures.vue.js +39 -0
  59. package/dist/components/GeneralComponents/DataTable/DatatableStatus.vue.js +31 -0
  60. package/dist/components/GeneralComponents/DataTable/DatatableStatusGeneral.vue.js +59 -0
  61. package/dist/components/GeneralComponents/DataTable/DatatableStatusServer.vue.js +37 -0
  62. package/dist/components/GeneralComponents/DataTable/DatatableStatusSpecficColor.vue.js +64 -0
  63. package/dist/components/GeneralComponents/DataTable/DatatableStatusTextLabelGeneral.vue.js +83 -0
  64. package/dist/components/GeneralComponents/DataTable/GLDataTable.vue.js +351 -0
  65. package/dist/components/GeneralComponents/DataTable/GLDataTableServerSide.vue.js +637 -0
  66. package/dist/components/GeneralComponents/DataTable/GlDataTableComponent.vue.js +441 -0
  67. package/dist/components/GeneralComponents/DataTable/GlDataTableServerSideGroupBy.vue.js +273 -0
  68. package/dist/components/GeneralComponents/DeleteConfirmationModal.vue.js +89 -0
  69. package/dist/components/GeneralComponents/DynamicConfirmation.vue.js +115 -0
  70. package/dist/components/GeneralComponents/FilesUpload.vue.js +302 -0
  71. package/dist/components/GeneralComponents/GLButton.vue.js +159 -0
  72. package/dist/components/GeneralComponents/GLTextarea.vue.js +106 -0
  73. package/dist/components/GeneralComponents/GlAccordion.vue.js +91 -0
  74. package/dist/components/GeneralComponents/GlAccordionsWrapper.vue.js +31 -0
  75. package/dist/components/GeneralComponents/GlCard.vue.js +40 -0
  76. package/dist/components/GeneralComponents/GlCodeCopy.vue.js +97 -0
  77. package/dist/components/GeneralComponents/GlCodeMirror.vue.js +152 -0
  78. package/dist/components/GeneralComponents/GlCodeMirrorTranslate.vue.js +194 -0
  79. package/dist/components/GeneralComponents/GlDatePicker.vue.js +504 -0
  80. package/dist/components/GeneralComponents/GlDateRangePicker.vue.js +228 -0
  81. package/dist/components/GeneralComponents/GlDropdown.vue.js +502 -0
  82. package/dist/components/GeneralComponents/GlLanguageSelector.vue.js +72 -0
  83. package/dist/components/GeneralComponents/GlModal.vue.js +122 -0
  84. package/dist/components/GeneralComponents/GlModalShow.vue.js +119 -0
  85. package/dist/components/GeneralComponents/GlModalWithoutOverflow.vue.js +129 -0
  86. package/dist/components/GeneralComponents/GlMultiItemSlide.vue.js +427 -0
  87. package/dist/components/GeneralComponents/GlMultiItemSlideDynamic.vue.js +435 -0
  88. package/dist/components/GeneralComponents/GlMultiSelectDropdown.vue.js +389 -0
  89. package/dist/components/GeneralComponents/GlTab.vue.js +22 -0
  90. package/dist/components/GeneralComponents/GlTabShow.vue.js +21 -0
  91. package/dist/components/GeneralComponents/GlTabsWrapper.vue.js +86 -0
  92. package/dist/components/GeneralComponents/GlTextCopy.vue.js +93 -0
  93. package/dist/components/GeneralComponents/GlTextInput.vue.js +182 -0
  94. package/dist/components/GeneralComponents/GlTextInputFile.vue.js +95 -0
  95. package/dist/components/GeneralComponents/GlTextTranslate.vue.js +124 -0
  96. package/dist/components/GeneralComponents/GlTextareaTranslate.vue.js +125 -0
  97. package/dist/components/GeneralComponents/GlTinymce.vue.js +138 -0
  98. package/dist/components/GeneralComponents/GlTinymceTranslate.vue.js +208 -0
  99. package/dist/components/GeneralComponents/GlToastList.vue.js +33 -0
  100. package/dist/components/GeneralComponents/GlToggleBox.vue.js +122 -0
  101. package/dist/components/GeneralComponents/GlToggleBoxTrueFalse.vue.js +112 -0
  102. package/dist/components/GeneralComponents/StatusConnectingConnectedDisconnected.vue.js +62 -0
  103. package/dist/components/GeneralComponents/StatusRunningSuccessFailed.vue.js +41 -0
  104. package/dist/components/GeneralComponents/ToastListItem.vue.js +114 -0
  105. package/dist/components/LaravelVuePagination/RenderlessPagination.vue.js +109 -0
  106. package/dist/components/LaravelVuePagination/TailwindPagination.vue.js +172 -0
  107. package/dist/main.js +133 -0
  108. package/dist/multilingual.js +135 -0
  109. package/dist/node_modules/@codemirror/autocomplete/dist/index.js +1155 -0
  110. package/dist/node_modules/@codemirror/commands/dist/index.js +605 -0
  111. package/dist/node_modules/@codemirror/lang-css/dist/index.js +832 -0
  112. package/dist/node_modules/@codemirror/lang-html/dist/index.js +671 -0
  113. package/dist/node_modules/@codemirror/lang-javascript/dist/index.js +300 -0
  114. package/dist/node_modules/@codemirror/language/dist/index.js +872 -0
  115. package/dist/node_modules/@codemirror/state/dist/index.js +2639 -0
  116. package/dist/node_modules/@codemirror/theme-one-dark/dist/index.js +132 -0
  117. package/dist/node_modules/@codemirror/view/dist/index.js +6157 -0
  118. package/dist/node_modules/@lezer/common/dist/index.js +1672 -0
  119. package/dist/node_modules/@lezer/css/dist/index.js +119 -0
  120. package/dist/node_modules/@lezer/highlight/dist/index.js +626 -0
  121. package/dist/node_modules/@lezer/html/dist/index.js +287 -0
  122. package/dist/node_modules/@lezer/javascript/dist/index.js +161 -0
  123. package/dist/node_modules/@lezer/lr/dist/index.js +1309 -0
  124. package/dist/node_modules/@marijn/find-cluster-break/src/index.js +69 -0
  125. package/dist/node_modules/style-mod/src/style-mod.js +109 -0
  126. package/dist/node_modules/tinymce/icons/default/icons.js +230 -0
  127. package/dist/node_modules/tinymce/models/dom/model.js +4283 -0
  128. package/dist/node_modules/tinymce/plugins/advlist/plugin.js +194 -0
  129. package/dist/node_modules/tinymce/plugins/anchor/plugin.js +124 -0
  130. package/dist/node_modules/tinymce/plugins/autolink/plugin.js +111 -0
  131. package/dist/node_modules/tinymce/plugins/charmap/plugin.js +1474 -0
  132. package/dist/node_modules/tinymce/plugins/code/plugin.js +64 -0
  133. package/dist/node_modules/tinymce/plugins/fullscreen/plugin.js +691 -0
  134. package/dist/node_modules/tinymce/plugins/image/plugin.js +879 -0
  135. package/dist/node_modules/tinymce/plugins/insertdatetime/plugin.js +114 -0
  136. package/dist/node_modules/tinymce/plugins/link/plugin.js +809 -0
  137. package/dist/node_modules/tinymce/plugins/lists/plugin.js +1159 -0
  138. package/dist/node_modules/tinymce/plugins/media/plugin.js +778 -0
  139. package/dist/node_modules/tinymce/plugins/preview/plugin.js +383 -0
  140. package/dist/node_modules/tinymce/plugins/searchreplace/plugin.js +668 -0
  141. package/dist/node_modules/tinymce/plugins/table/plugin.js +2163 -0
  142. package/dist/node_modules/tinymce/plugins/visualblocks/plugin.js +67 -0
  143. package/dist/node_modules/tinymce/plugins/wordcount/plugin.js +261 -0
  144. package/dist/node_modules/tinymce/themes/silver/theme.js +21821 -0
  145. package/dist/node_modules/tinymce/tinymce.js +16987 -0
  146. package/dist/node_modules/vue3-print-nb/dist/vue3-print-nb.es.js +196 -0
  147. package/dist/node_modules/w3c-keyname/index.js +93 -0
  148. package/dist/print/print.js +62 -0
  149. package/dist/print/printarea.js +224 -0
  150. package/package.json +10 -6
  151. package/dist/golden-logic-ui.js +0 -80151
  152. package/dist/golden-logic-ui.umd.cjs +0 -136
@@ -0,0 +1,13 @@
1
+ const i = {
2
+ beforeMount: (t, c) => {
3
+ t.clickOutsideEvent = (e) => {
4
+ t == e.target || t.contains(e.target) || c.value(e, t);
5
+ }, document.addEventListener("click", t.clickOutsideEvent);
6
+ },
7
+ unmounted: (t) => {
8
+ document.removeEventListener("click", t.clickOutsideEvent);
9
+ }
10
+ };
11
+ export {
12
+ i as default
13
+ };
package/dist/Form.js ADDED
@@ -0,0 +1,151 @@
1
+ class o {
2
+ /**
3
+ * Create a new Errors instance.
4
+ */
5
+ constructor() {
6
+ this.errors = {};
7
+ }
8
+ // to get all errors
9
+ all() {
10
+ return this.errors;
11
+ }
12
+ /**
13
+ * Determine if an errors exists for the given field.
14
+ *
15
+ * @param {string} field
16
+ */
17
+ has(r) {
18
+ return this.errors.hasOwnProperty(r);
19
+ }
20
+ /**
21
+ * Determine if we have any errors.
22
+ */
23
+ any() {
24
+ return Object.keys(this.errors).length > 0;
25
+ }
26
+ /**
27
+ * Retrieve the error message for a field.
28
+ *
29
+ * @param {string} field
30
+ */
31
+ get(r) {
32
+ if (this.errors[r])
33
+ return this.errors[r][0];
34
+ }
35
+ /**
36
+ * Record the new errors.
37
+ *
38
+ * @param {object} errors
39
+ */
40
+ record(r) {
41
+ this.errors = r;
42
+ }
43
+ /**
44
+ * Clear one or all error fields.
45
+ *
46
+ * @param {string|null} field
47
+ */
48
+ clear(r) {
49
+ if (r) {
50
+ delete this.errors[r];
51
+ return;
52
+ }
53
+ this.errors = {};
54
+ }
55
+ }
56
+ class h {
57
+ /**
58
+ * Create a new Form instance.
59
+ *
60
+ * @param {object} data
61
+ */
62
+ constructor(r) {
63
+ this.originalData = r;
64
+ for (let t in r)
65
+ this[t] = r[t];
66
+ this.errors = new o();
67
+ }
68
+ /**
69
+ * Fetch all relevant data for the form.
70
+ */
71
+ data() {
72
+ let r = {};
73
+ for (let t in this.originalData)
74
+ r[t] = this[t];
75
+ return r;
76
+ }
77
+ /**
78
+ * Reset the form fields.
79
+ */
80
+ reset() {
81
+ for (let r in this.originalData)
82
+ this[r] = "";
83
+ this.errors.clear();
84
+ }
85
+ /**
86
+ * Send a POST request to the given URL.
87
+ * .
88
+ * @param {string} url
89
+ */
90
+ post(r) {
91
+ return this.submit("post", r);
92
+ }
93
+ /**
94
+ * Send a PUT request to the given URL.
95
+ * .
96
+ * @param {string} url
97
+ */
98
+ put(r) {
99
+ return this.submit("put", r);
100
+ }
101
+ /**
102
+ * Send a PATCH request to the given URL.
103
+ * .
104
+ * @param {string} url
105
+ */
106
+ patch(r) {
107
+ return this.submit("patch", r);
108
+ }
109
+ /**
110
+ * Send a DELETE request to the given URL.
111
+ * .
112
+ * @param {string} url
113
+ */
114
+ delete(r) {
115
+ return this.submit("delete", r);
116
+ }
117
+ /**
118
+ * Submit the form.
119
+ *
120
+ * @param {string} requestType
121
+ * @param {string} url
122
+ */
123
+ submit(r, t) {
124
+ return new Promise((i, a) => {
125
+ axios[r](t, this.data()).then((s) => {
126
+ this.onSuccess(s.data), i(s.data);
127
+ }).catch((s) => {
128
+ this.onFail(s.response.data), a(s.response.data);
129
+ });
130
+ });
131
+ }
132
+ /**
133
+ * Handle a successful form submission.
134
+ *
135
+ * @param {object} data
136
+ */
137
+ onSuccess(r) {
138
+ alert(r.message), this.reset();
139
+ }
140
+ /**
141
+ * Handle a failed form submission.
142
+ *
143
+ * @param {object} errors
144
+ */
145
+ onFail(r) {
146
+ this.errors.record(r);
147
+ }
148
+ }
149
+ export {
150
+ h as default
151
+ };
@@ -0,0 +1,22 @@
1
+ import { reactive as s } from "vue";
2
+ const t = s({
3
+ items: []
4
+ }), m = {
5
+ add(e) {
6
+ t.items.unshift({
7
+ key: /* @__PURE__ */ Symbol(),
8
+ message: e.message,
9
+ type: e.type,
10
+ duration: e.duration
11
+ });
12
+ },
13
+ remove(e) {
14
+ t.items.splice(e, 1);
15
+ }
16
+ }, i = {
17
+ state: t,
18
+ methods: m
19
+ };
20
+ export {
21
+ i as default
22
+ };
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
+ }
4
+ export {
5
+ e as getDefaultExportFromCjs
6
+ };
@@ -0,0 +1,9 @@
1
+ const s = (t, e) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [r, c] of e)
4
+ o[r] = c;
5
+ return o;
6
+ };
7
+ export {
8
+ s as default
9
+ };
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/models/dom/model.js";
2
+ r();
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/lists/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/advlist/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/searchreplace/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/anchor/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/autolink/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/charmap/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/insertdatetime/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/visualblocks/plugin.js";
2
+ r();
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/link/plugin.js";
2
+ r();
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/image/plugin.js";
2
+ r();
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var p = {};
2
+ export {
3
+ p as __exports
4
+ };
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/media/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/table/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/code/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/wordcount/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/fullscreen/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as r } from "../node_modules/tinymce/plugins/preview/plugin.js";
2
+ r();
@@ -0,0 +1,2 @@
1
+ import { __require as e } from "../node_modules/tinymce/themes/silver/theme.js";
2
+ e();
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
@@ -0,0 +1,7 @@
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
+ import { __require as e } from "../node_modules/tinymce/tinymce.js";
3
+ var t = e();
4
+ const i = /* @__PURE__ */ r(t);
5
+ export {
6
+ i as default
7
+ };
@@ -0,0 +1,4 @@
1
+ var e = { exports: {} };
2
+ export {
3
+ e as __module
4
+ };
@@ -0,0 +1,75 @@
1
+ import c from "./GLButton.vue.js";
2
+ import { resolveComponent as m, createElementBlock as f, createCommentVNode as _, openBlock as p, createElementVNode as t, toDisplayString as i, renderSlot as u, createVNode as l, withCtx as r, createTextVNode as d } from "vue";
3
+ import g from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const x = {
5
+ components: {
6
+ GlButton: c
7
+ },
8
+ props: ["isOpen", "title", "button_text"],
9
+ methods: {
10
+ confirmAction() {
11
+ this.$emit("confirm-action");
12
+ },
13
+ cancelAction() {
14
+ this.$emit("cancel-action");
15
+ }
16
+ }
17
+ }, b = {
18
+ key: 0,
19
+ class: "fixed inset-0 z-99999 overflow-y-auto",
20
+ role: "dialog",
21
+ "aria-modal": "true"
22
+ }, h = { class: "flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:p-0" }, v = { class: "inline-block relative overflow-hidden text-left align-bottom transition-all transform bg-white dark:bg-gray-800 rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full" }, y = { class: "px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, k = { class: "sm:flex sm:items-start" }, C = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left" }, w = { class: "text-lg font-medium leading-6" }, A = { class: "mt-2" }, N = { class: "border-t border-gray-200 rounded-b dark:border-gray-600 px-4 py-3 sm:px-6 flex gap-2" };
23
+ function V(a, e, o, B, E, n) {
24
+ const s = m("gl-button");
25
+ return o.isOpen ? (p(), f("div", b, [
26
+ t("div", h, [
27
+ e[1] || (e[1] = t("div", {
28
+ class: "fixed inset-0 transition-opacity bg-gray-500/75",
29
+ "aria-hidden": "true"
30
+ }, null, -1)),
31
+ e[2] || (e[2] = t("span", {
32
+ class: "hidden sm:inline-block sm:align-middle sm:h-screen",
33
+ "aria-hidden": "true"
34
+ }, "​", -1)),
35
+ t("div", v, [
36
+ t("div", y, [
37
+ t("div", k, [
38
+ t("div", C, [
39
+ t("h3", w, i(o.title), 1),
40
+ t("div", A, [
41
+ u(a.$slots, "default")
42
+ ])
43
+ ])
44
+ ])
45
+ ]),
46
+ t("div", N, [
47
+ l(s, {
48
+ onClick: n.confirmAction,
49
+ tag: "button",
50
+ button_type: "red"
51
+ }, {
52
+ default: r(() => [
53
+ d(i(o.button_text), 1)
54
+ ]),
55
+ _: 1
56
+ }, 8, ["onClick"]),
57
+ l(s, {
58
+ onClick: n.cancelAction,
59
+ tag: "button",
60
+ button_type: "light"
61
+ }, {
62
+ default: r(() => e[0] || (e[0] = [
63
+ d(" Cancel ")
64
+ ])),
65
+ _: 1
66
+ }, 8, ["onClick"])
67
+ ])
68
+ ])
69
+ ])
70
+ ])) : _("", !0);
71
+ }
72
+ const j = /* @__PURE__ */ g(x, [["render", V]]);
73
+ export {
74
+ j as default
75
+ };
@@ -0,0 +1,113 @@
1
+ import { ref as u, resolveDirective as w, createElementBlock as l, openBlock as s, Fragment as k, createVNode as D, withDirectives as g, createCommentVNode as n, createElementVNode as e, createTextVNode as p, withModifiers as C, vShow as $ } from "vue";
2
+ import A from "../DeleteConfirmationModal.vue.js";
3
+ import M from "../../../Stores/toast.js";
4
+ const O = {
5
+ key: 0,
6
+ class: "flex lg:justify-center"
7
+ }, _ = { class: "xs:right-[unset] ltr:lg:right-[30px] rtl:lg:left-[30px] absolute z-10 mt-11 origin-top-right bg-white rounded-lg w-44 dark:bg-gray-800 shadow-lg border dark:border-gray-700" }, j = {
8
+ class: "py-2 text-sm text-gray-700 dark:text-gray-200",
9
+ "aria-labelledby": "dropdownDividerButton"
10
+ }, B = { key: 0 }, N = ["href"], V = { key: 1 }, T = {
11
+ __name: "DatatableAction",
12
+ props: {
13
+ field: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ route_url: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ row: {
22
+ type: [Array, Object],
23
+ default: []
24
+ },
25
+ xprops: {
26
+ type: Object,
27
+ default: {}
28
+ },
29
+ tdProps: {
30
+ type: Object,
31
+ default: {}
32
+ }
33
+ },
34
+ emits: ["deleteAction"],
35
+ setup(t, { emit: m }) {
36
+ const d = t, i = u(!1), a = u(!1), f = () => {
37
+ i.value = !1;
38
+ }, h = () => {
39
+ i.value = !0;
40
+ }, c = () => {
41
+ a.value = !1;
42
+ }, y = () => {
43
+ a.value = !0;
44
+ }, v = m, x = () => {
45
+ axios.delete(`${d.xprops.route}/${d.row.id}`).then(() => {
46
+ c(), v("deleteAction"), M.methods.add({
47
+ message: "Item deleted successfully.",
48
+ type: "success",
49
+ duration: 5e3
50
+ });
51
+ }).catch((r) => {
52
+ console.log(r);
53
+ });
54
+ };
55
+ return (r, o) => {
56
+ const b = w("click-outside");
57
+ return s(), l(k, null, [
58
+ D(A, {
59
+ isOpen: a.value,
60
+ onConfirmDelete: x,
61
+ onCancelDelete: c
62
+ }, null, 8, ["isOpen"]),
63
+ t.row && r.can(`edit_${t.xprops.permission} || delete_${t.xprops.permission}`) ? g((s(), l("div", O, [
64
+ e("button", {
65
+ onClick: h,
66
+ class: "inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-hidden dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",
67
+ type: "button"
68
+ }, o[0] || (o[0] = [
69
+ e("svg", {
70
+ class: "w-5 h-5",
71
+ "aria-hidden": "true",
72
+ xmlns: "http://www.w3.org/2000/svg",
73
+ fill: "currentColor",
74
+ viewBox: "0 0 4 15"
75
+ }, [
76
+ e("path", { d: "M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" })
77
+ ], -1)
78
+ ])),
79
+ g(e("div", _, [
80
+ e("ul", j, [
81
+ r.can(`edit_${t.xprops.permission}`) ? (s(), l("li", B, [
82
+ e("a", {
83
+ href: t.xprops.route + "/" + t.row.id + "/edit",
84
+ class: "block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
85
+ }, o[1] || (o[1] = [
86
+ e("i", { class: "mr-2 fa-solid fa-list-ul opacity-80" }, null, -1),
87
+ p(" Edit")
88
+ ]), 8, N)
89
+ ])) : n("", !0),
90
+ r.can(`delete_${t.xprops.permission}`) ? (s(), l("li", V, [
91
+ e("a", {
92
+ href: "#",
93
+ onClick: C(y, ["prevent"]),
94
+ class: "block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
95
+ }, o[2] || (o[2] = [
96
+ e("i", { class: "mr-2 fa-solid fa-trash-can opacity-80" }, null, -1),
97
+ p(" Remove")
98
+ ]))
99
+ ])) : n("", !0)
100
+ ])
101
+ ], 512), [
102
+ [$, i.value]
103
+ ])
104
+ ])), [
105
+ [b, f]
106
+ ]) : n("", !0)
107
+ ], 64);
108
+ };
109
+ }
110
+ };
111
+ export {
112
+ T as default
113
+ };
@@ -0,0 +1,18 @@
1
+ import { createElementBlock as t, createCommentVNode as o, openBlock as r, createElementVNode as n, toDisplayString as l } from "vue";
2
+ import s from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ const a = {
4
+ props: ["field", "row", "tdProps"]
5
+ }, c = {
6
+ key: 0,
7
+ class: "text-nowrap w-full"
8
+ }, d = { class: "w-full h-full p-3 mx-0 mt-0 overflow-auto font-mono text-left break-words rounded-sm cursor-default whitespace-nowrap console_styles" };
9
+ function f(m, i, e, _, u, p) {
10
+ return e.row[e.field] ? (r(), t("div", c, [
11
+ n("pre", d, " " + l(e.row[e.field]) + `
12
+ `, 1)
13
+ ])) : o("", !0);
14
+ }
15
+ const h = /* @__PURE__ */ s(a, [["render", f]]);
16
+ export {
17
+ h as default
18
+ };