golden-logic-ui 1.2.21 → 1.2.23
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.
- package/dist/ConfirmationModal-i3ekouBw.js +75 -0
- package/dist/DatatableAction-D-Qdjj2W.js +113 -0
- package/dist/DatatableCommand-BoU5cYJg.js +18 -0
- package/dist/DatatableConvertCronToHuman-Coiaa-wa.js +82 -0
- package/dist/DatatableDate-DtEktp_Z.js +20 -0
- package/dist/DatatableDateTime-PEXV-bY7.js +22 -0
- package/dist/DatatableDeleteAction-BQ6MyhV6.js +104 -0
- package/dist/DatatableDeleteEditAction-Cx324OUt.js +125 -0
- package/dist/DatatableFileDownload-BxP2_lpQ.js +87 -0
- package/dist/DatatableFiles-BROH3vBH.js +80 -0
- package/dist/DatatableHtml-ChZzeapg.js +17 -0
- package/dist/DatatableList-BSVI22pu.js +35 -0
- package/dist/DatatableListNested-BWEqWRCc.js +37 -0
- package/dist/DatatablePicture-DaWD4uIX.js +26 -0
- package/dist/DatatablePictures-xxeghKp3.js +39 -0
- package/dist/DatatableStatus-Dx60sa7s.js +31 -0
- package/dist/DatatableStatusGeneral-UOub65UY.js +59 -0
- package/dist/DatatableStatusServer-Dcq11U5_.js +37 -0
- package/dist/DatatableStatusSpecficColor-BYUuGgEb.js +64 -0
- package/dist/DatatableStatusTextLabelGeneral-J4MytOnh.js +83 -0
- package/dist/DeleteConfirmationModal-CQ07_qiL.js +96 -0
- package/dist/DynamicConfirmation-rEhA3jCe.js +115 -0
- package/dist/FilesUpload-JKyOru3A.js +300 -0
- package/dist/GLButton-ByIDh6vq.js +118 -0
- package/dist/GLDataTable-Bixwkdr4.js +278 -0
- package/dist/GLDataTableServerSide-Ra5AqDGB.js +16336 -0
- package/dist/GLTextarea-j7XXWI7A.js +110 -0
- package/dist/GlAccordion-BIAfvctc.js +91 -0
- package/dist/GlAccordionsWrapper-DsdunDzi.js +31 -0
- package/dist/GlCard-BVXmTv6q.js +37 -0
- package/dist/GlCodeCopy-C068yRcM.js +86 -0
- package/dist/GlCodeMirror-Ow8TJYSN.js +161 -0
- package/dist/GlCodeMirrorTranslate-CFmoM7d6.js +2068 -0
- package/dist/GlDataTableComponent-CSsMcDcX.js +366 -0
- package/dist/GlDataTableServerSideGroupBy-cG4BhXOA.js +260 -0
- package/dist/GlDateRangePicker-BWAEfZTB.js +124 -0
- package/dist/GlDropdown-B_zVkmxO.js +414 -0
- package/dist/GlLanguageSelector-DmWuIxzK.js +68 -0
- package/dist/GlModal-AMtSRssu.js +123 -0
- package/dist/GlModalShow-BzbcLu51.js +120 -0
- package/dist/GlModalWithoutOverflow-vR50Ulka.js +127 -0
- package/dist/GlMultiItemSlide-CxsiUcTr.js +409 -0
- package/dist/GlMultiItemSlideDynamic-BhdHrj3L.js +434 -0
- package/dist/GlMultiSelectDropdown-OaAC5ouZ.js +383 -0
- package/dist/GlTab-CUbU0yit.js +22 -0
- package/dist/GlTabShow-BBU3VU7O.js +21 -0
- package/dist/GlTabsWrapper-Dw7NAgDw.js +54 -0
- package/dist/GlTextCopy-CGgnIqPh.js +93 -0
- package/dist/GlTextInput-CoL8oZSw.js +126 -0
- package/dist/GlTextInputFile-BE2maeRQ.js +95 -0
- package/dist/GlTextInputWithText-C6fzOoYl.js +116 -0
- package/dist/GlTextTranslate-C3DzCK6k.js +125 -0
- package/dist/GlTextareaTranslate-DyU86Wf_.js +126 -0
- package/dist/GlTinymce-CjsbThKo.js +118 -0
- package/dist/GlTinymceTranslate-vp6hYqDK.js +188 -0
- package/dist/GlToastList-eeZ0hUJQ.js +126 -0
- package/dist/GlToggleBox-Dym29cx5.js +120 -0
- package/dist/GlToggleBoxTrueFalse-CjvcXXTw.js +112 -0
- package/dist/StatusConnectingConnectedDisconnected-CK5YzyQH.js +63 -0
- package/dist/StatusRunningSuccessFailed-CxK20462.js +41 -0
- package/dist/TailwindPagination-Dz89aS_l.js +276 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/golden-logic-ui.css +1 -1
- package/dist/golden-logic-ui.js +217 -94352
- package/dist/golden-logic-ui.umd.cjs +94 -94
- package/dist/index-B4V16SEr.js +15668 -0
- package/dist/plugin-D6yBFU6i.js +53226 -0
- package/package.json +1 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { ref as h, onMounted as b, computed as x, createElementBlock as u, openBlock as d, Fragment as k, createCommentVNode as s, normalizeClass as m, createElementVNode as l, toDisplayString as i, withDirectives as v, vModelDynamic as S } from "vue";
|
|
2
|
+
const w = { class: "font-bold dark:text-white" }, V = { class: "mt-1 text-gray-900 dark:text-white" }, q = ["for"], B = ["minlength", "maxlength", "required", "name", "id", "type", "placeholder"], D = { class: "gl-span-form-error" }, N = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, E = {
|
|
3
|
+
__name: "GlTextInput",
|
|
4
|
+
props: {
|
|
5
|
+
is_required: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !1
|
|
8
|
+
},
|
|
9
|
+
show: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
error_message: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: [String, Number],
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
type: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "text"
|
|
24
|
+
},
|
|
25
|
+
field_name: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: ""
|
|
28
|
+
},
|
|
29
|
+
label_name: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
description: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
placeholder: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
41
|
+
minlength: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: null
|
|
44
|
+
},
|
|
45
|
+
maxlength: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: null
|
|
48
|
+
},
|
|
49
|
+
input_class: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
52
|
+
},
|
|
53
|
+
container_class: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: ""
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
emits: ["update:modelValue", "keydown", "blur-sm"],
|
|
59
|
+
setup(e, { expose: f, emit: g }) {
|
|
60
|
+
const c = e, y = g, a = h(null);
|
|
61
|
+
b(() => {
|
|
62
|
+
a.value !== null && a.value.hasAttribute("autofocus") && a.value.focus();
|
|
63
|
+
});
|
|
64
|
+
const o = x({
|
|
65
|
+
get() {
|
|
66
|
+
return c.modelValue;
|
|
67
|
+
},
|
|
68
|
+
set(r) {
|
|
69
|
+
y("update:modelValue", r);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return f({ focus: () => a.value.focus() }), (r, t) => (d(), u(k, null, [
|
|
73
|
+
e.show ? (d(), u("div", {
|
|
74
|
+
key: 0,
|
|
75
|
+
class: m(e.field_name)
|
|
76
|
+
}, [
|
|
77
|
+
l("h3", w, i(e.label_name), 1),
|
|
78
|
+
l("p", V, i(e.type == "password" ? e.modelValue.replace(/./g, "*") : e.modelValue), 1),
|
|
79
|
+
t[3] || (t[3] = l("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
80
|
+
], 2)) : s("", !0),
|
|
81
|
+
e.show ? s("", !0) : (d(), u("div", {
|
|
82
|
+
key: 1,
|
|
83
|
+
class: m({
|
|
84
|
+
[e.field_name]: e.field_name && e.field_name !== "",
|
|
85
|
+
[e.container_class]: e.container_class && e.container_class !== ""
|
|
86
|
+
})
|
|
87
|
+
}, [
|
|
88
|
+
e.label_name ? (d(), u("label", {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: m({
|
|
91
|
+
"gl-label-form": e.error_message == "",
|
|
92
|
+
"gl-label-form-invalid": e.error_message !== "",
|
|
93
|
+
required: e.is_required
|
|
94
|
+
}),
|
|
95
|
+
for: e.field_name
|
|
96
|
+
}, i(e.label_name), 11, q)) : s("", !0),
|
|
97
|
+
v(l("input", {
|
|
98
|
+
minlength: e.minlength,
|
|
99
|
+
maxlength: e.maxlength,
|
|
100
|
+
class: m(["rtl:text-right", {
|
|
101
|
+
"gl-input-form": e.error_message == "",
|
|
102
|
+
"gl-input-form-invalid": e.error_message !== "",
|
|
103
|
+
[e.input_class]: e.input_class && e.input_class !== ""
|
|
104
|
+
}]),
|
|
105
|
+
required: e.is_required,
|
|
106
|
+
name: e.field_name,
|
|
107
|
+
id: e.field_name,
|
|
108
|
+
type: e.type,
|
|
109
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => o.value = n),
|
|
110
|
+
onKeydown: t[1] || (t[1] = (n) => r.$emit("keydown", n)),
|
|
111
|
+
onBlur: t[2] || (t[2] = (n) => r.$emit("blur-sm", n)),
|
|
112
|
+
ref_key: "input",
|
|
113
|
+
ref: a,
|
|
114
|
+
placeholder: e.placeholder
|
|
115
|
+
}, null, 42, B), [
|
|
116
|
+
[S, o.value]
|
|
117
|
+
]),
|
|
118
|
+
l("span", D, i(e.error_message), 1),
|
|
119
|
+
l("small", N, i(e.description), 1)
|
|
120
|
+
], 2))
|
|
121
|
+
], 64));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
export {
|
|
125
|
+
E as default
|
|
126
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ref as c, createElementBlock as i, openBlock as d, Fragment as g, createCommentVNode as s, normalizeClass as n, createElementVNode as l, toDisplayString as a } from "vue";
|
|
2
|
+
const y = { class: "font-bold ptext-lg dark:text-white" }, h = { class: "mb-4 text-base text-gray-900 dark:text-white" }, b = ["for"], k = ["required", "name", "id", "placeholder"], x = { class: "gl-span-form-error" }, w = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, V = {
|
|
3
|
+
__name: "GlTextInputFile",
|
|
4
|
+
props: {
|
|
5
|
+
is_required: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !1
|
|
8
|
+
},
|
|
9
|
+
show: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
error_message: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
model_value: {
|
|
18
|
+
type: [String, Number],
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: File,
|
|
23
|
+
default: null
|
|
24
|
+
},
|
|
25
|
+
type: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "text"
|
|
28
|
+
},
|
|
29
|
+
field_name: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
label_name: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
description: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
41
|
+
placeholder: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: ""
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
emits: ["update:modelValue", "keydown"],
|
|
47
|
+
setup(e, { emit: m }) {
|
|
48
|
+
const o = m, u = c(null), f = (r) => {
|
|
49
|
+
const t = r.target.files[0];
|
|
50
|
+
console.log(t), o("keydown", r), t && o("update:modelValue", t);
|
|
51
|
+
};
|
|
52
|
+
return (r, t) => (d(), i(g, null, [
|
|
53
|
+
e.show ? (d(), i("div", {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: n(e.field_name)
|
|
56
|
+
}, [
|
|
57
|
+
l("h3", y, a(e.label_name), 1),
|
|
58
|
+
l("p", h, a(e.type == "password" ? e.modelValue.replace(/./g, "*") : e.modelValue), 1),
|
|
59
|
+
t[0] || (t[0] = l("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
60
|
+
], 2)) : s("", !0),
|
|
61
|
+
e.show ? s("", !0) : (d(), i("div", {
|
|
62
|
+
key: 1,
|
|
63
|
+
class: n(e.field_name)
|
|
64
|
+
}, [
|
|
65
|
+
l("label", {
|
|
66
|
+
class: n({
|
|
67
|
+
"gl-label-form": e.error_message == "",
|
|
68
|
+
"gl-label-form-invalid": e.error_message !== "",
|
|
69
|
+
required: e.is_required
|
|
70
|
+
}),
|
|
71
|
+
for: e.field_name
|
|
72
|
+
}, a(e.label_name), 11, b),
|
|
73
|
+
l("input", {
|
|
74
|
+
required: e.is_required,
|
|
75
|
+
name: e.field_name,
|
|
76
|
+
id: e.field_name,
|
|
77
|
+
class: n({
|
|
78
|
+
"gl-input-form": e.error_message == "",
|
|
79
|
+
"gl-input-form-invalid": e.error_message !== ""
|
|
80
|
+
}),
|
|
81
|
+
type: "file",
|
|
82
|
+
onChange: f,
|
|
83
|
+
ref_key: "input",
|
|
84
|
+
ref: u,
|
|
85
|
+
placeholder: e.placeholder
|
|
86
|
+
}, null, 42, k),
|
|
87
|
+
l("span", x, a(e.error_message), 1),
|
|
88
|
+
l("small", w, a(e.description), 1)
|
|
89
|
+
], 2))
|
|
90
|
+
], 64));
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
V as default
|
|
95
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { ref as b, onMounted as x, computed as h, createElementBlock as n, openBlock as d, Fragment as k, createCommentVNode as u, normalizeClass as i, createElementVNode as t, toDisplayString as a, withDirectives as v, vModelDynamic as w } from "vue";
|
|
2
|
+
const S = { class: "font-bold dark:text-white" }, V = { class: "mt-1 text-gray-900 dark:text-white" }, q = ["for"], p = { class: "flex items-center" }, B = { class: "relative w-full" }, N = ["required", "name", "id", "type", "placeholder"], D = { class: "h-10 z-10 inline-flex items-center shrink-0 px-4 text-sm font-medium text-center text-gray-500 bg-gray-100 border border-gray-300 dark:text-gray-400 rounded-e-lg focus:outline-hidden dark:bg-gray-700 dark:border-gray-600" }, z = { class: "gl-span-form-error" }, C = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, M = {
|
|
3
|
+
__name: "GlTextInputWithText",
|
|
4
|
+
props: {
|
|
5
|
+
is_required: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !1
|
|
8
|
+
},
|
|
9
|
+
show: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
error_message: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
model_value: {
|
|
18
|
+
type: [String, Number],
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: [String, Number],
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
type: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "text"
|
|
28
|
+
},
|
|
29
|
+
field_name: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
label_name: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
description: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
41
|
+
input_text: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: ""
|
|
44
|
+
},
|
|
45
|
+
placeholder: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ""
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: ["update:modelValue", "keydown"],
|
|
51
|
+
setup(e, { expose: f, emit: c }) {
|
|
52
|
+
const g = e, y = c, r = b(null);
|
|
53
|
+
x(() => {
|
|
54
|
+
r.value !== null && r.value.hasAttribute("autofocus") && r.value.focus();
|
|
55
|
+
});
|
|
56
|
+
const m = h({
|
|
57
|
+
get() {
|
|
58
|
+
return g.modelValue;
|
|
59
|
+
},
|
|
60
|
+
set(o) {
|
|
61
|
+
y("update:modelValue", o);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return f({ focus: () => r.value.focus() }), (o, l) => (d(), n(k, null, [
|
|
65
|
+
e.show ? (d(), n("div", {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: i(e.field_name)
|
|
68
|
+
}, [
|
|
69
|
+
t("h3", S, a(e.label_name), 1),
|
|
70
|
+
t("p", V, a(e.type == "password" ? e.modelValue.replace(/./g, "*") : e.modelValue), 1),
|
|
71
|
+
l[2] || (l[2] = t("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
72
|
+
], 2)) : u("", !0),
|
|
73
|
+
e.show ? u("", !0) : (d(), n("div", {
|
|
74
|
+
key: 1,
|
|
75
|
+
class: i(e.field_name)
|
|
76
|
+
}, [
|
|
77
|
+
e.label_name ? (d(), n("label", {
|
|
78
|
+
key: 0,
|
|
79
|
+
class: i({
|
|
80
|
+
"gl-label-form": e.error_message == "",
|
|
81
|
+
"gl-label-form-invalid": e.error_message !== "",
|
|
82
|
+
required: e.is_required
|
|
83
|
+
}),
|
|
84
|
+
for: e.field_name
|
|
85
|
+
}, a(e.label_name), 11, q)) : u("", !0),
|
|
86
|
+
t("div", p, [
|
|
87
|
+
t("div", B, [
|
|
88
|
+
v(t("input", {
|
|
89
|
+
required: e.is_required,
|
|
90
|
+
name: e.field_name,
|
|
91
|
+
id: e.field_name,
|
|
92
|
+
class: i([{
|
|
93
|
+
"gl-input-form-text": e.error_message == "",
|
|
94
|
+
"gl-input-form-invalid-text": e.error_message !== ""
|
|
95
|
+
}, "border-e-0! rounded-s-lg!"]),
|
|
96
|
+
type: e.type,
|
|
97
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => m.value = s),
|
|
98
|
+
onKeydown: l[1] || (l[1] = (s) => o.$emit("keydown", s)),
|
|
99
|
+
ref_key: "input",
|
|
100
|
+
ref: r,
|
|
101
|
+
placeholder: e.placeholder
|
|
102
|
+
}, null, 42, N), [
|
|
103
|
+
[w, m.value]
|
|
104
|
+
])
|
|
105
|
+
]),
|
|
106
|
+
t("label", D, a(e.input_text), 1)
|
|
107
|
+
]),
|
|
108
|
+
t("span", z, a(e.error_message), 1),
|
|
109
|
+
t("small", C, a(e.description), 1)
|
|
110
|
+
], 2))
|
|
111
|
+
], 64));
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
export {
|
|
115
|
+
M as default
|
|
116
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { ref as g, onMounted as V, createElementBlock as m, openBlock as f, Fragment as k, createCommentVNode as y, normalizeClass as s, createElementVNode as a, withDirectives as p, toDisplayString as r, vModelText as h } from "vue";
|
|
2
|
+
const x = { class: "font-bold ptext-lg dark:text-white" }, T = ["name", "id"], w = ["id"], S = ["for"], q = ["name", "id"], B = ["required", "name", "id", "type"], C = { class: "gl-span-form-error" }, j = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, D = {
|
|
3
|
+
__name: "GlTextTranslate",
|
|
4
|
+
props: {
|
|
5
|
+
is_required: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !1
|
|
8
|
+
},
|
|
9
|
+
show: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
error_message: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: [String, Number],
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
modelValueTranslate: {
|
|
22
|
+
type: [String, Object],
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
type: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "text"
|
|
28
|
+
},
|
|
29
|
+
field_name: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
label_name: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
get_field_translations: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
41
|
+
description: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: ""
|
|
44
|
+
},
|
|
45
|
+
translatable: {
|
|
46
|
+
type: Object,
|
|
47
|
+
default: null
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: ["update:modelValue", "update:modelValueTranslate", "keydown"],
|
|
51
|
+
setup(e, { expose: b, emit: c }) {
|
|
52
|
+
const n = e, o = c, l = g(null), i = g(null), v = () => {
|
|
53
|
+
i.value && o("update:modelValueTranslate", i.value.value);
|
|
54
|
+
};
|
|
55
|
+
return V(() => {
|
|
56
|
+
l.value !== null && l.value.hasAttribute("autofocus") && l.value.focus(), n.modelValue && (o("update:modelValue", n.modelValue), l.value.value = n.modelValue), n.modelValueTranslate && (o("update:modelValueTranslate", n.modelValueTranslate), i.value.value = n.modelValueTranslate), l.value.classList.add("gl-multilanguage");
|
|
57
|
+
}), b({ focus: () => l.value.focus() }), (u, t) => (f(), m(k, null, [
|
|
58
|
+
e.show ? (f(), m("div", {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: s(e.field_name)
|
|
61
|
+
}, [
|
|
62
|
+
a("h3", x, r(e.label_name), 1),
|
|
63
|
+
p(a("input", {
|
|
64
|
+
type: "hidden",
|
|
65
|
+
"data-i18n": "true",
|
|
66
|
+
name: e.field_name + "_i18n",
|
|
67
|
+
id: e.field_name + "_i18n",
|
|
68
|
+
ref_key: "input_translate",
|
|
69
|
+
ref: i,
|
|
70
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => u.inputTranslateValue = d)
|
|
71
|
+
}, null, 8, T), [
|
|
72
|
+
[h, u.inputTranslateValue]
|
|
73
|
+
]),
|
|
74
|
+
a("p", {
|
|
75
|
+
id: e.field_name,
|
|
76
|
+
class: "mb-4 text-base text-gray-900 input_tr_show dark:text-white"
|
|
77
|
+
}, r(u.model_value), 9, w),
|
|
78
|
+
t[3] || (t[3] = a("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
79
|
+
], 2)) : y("", !0),
|
|
80
|
+
e.show ? y("", !0) : (f(), m("div", {
|
|
81
|
+
key: 1,
|
|
82
|
+
class: s(["mb-4", e.field_name])
|
|
83
|
+
}, [
|
|
84
|
+
a("label", {
|
|
85
|
+
class: s({
|
|
86
|
+
"gl-label-translation-form": e.error_message == "",
|
|
87
|
+
"gl-label-translation-form-invalid": e.error_message !== "",
|
|
88
|
+
required: e.is_required
|
|
89
|
+
}),
|
|
90
|
+
for: e.field_name
|
|
91
|
+
}, r(e.label_name), 11, S),
|
|
92
|
+
t[4] || (t[4] = a("span", { class: "language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300" }, null, -1)),
|
|
93
|
+
a("input", {
|
|
94
|
+
class: "mb-4",
|
|
95
|
+
type: "hidden",
|
|
96
|
+
"data-i18n": "true",
|
|
97
|
+
name: e.field_name + "_i18n",
|
|
98
|
+
id: e.field_name + "_i18n",
|
|
99
|
+
onChange: v,
|
|
100
|
+
ref_key: "input_translate",
|
|
101
|
+
ref: i
|
|
102
|
+
}, null, 40, q),
|
|
103
|
+
a("input", {
|
|
104
|
+
required: e.is_required,
|
|
105
|
+
name: e.field_name,
|
|
106
|
+
id: e.field_name,
|
|
107
|
+
class: s(["mt-2 form-input-translation", {
|
|
108
|
+
" gl-input-form": e.error_message == "",
|
|
109
|
+
" gl-input-form-invalid": e.error_message !== ""
|
|
110
|
+
}]),
|
|
111
|
+
type: e.type,
|
|
112
|
+
onInput: t[1] || (t[1] = (d) => u.$emit("update:modelValue", d.target.value)),
|
|
113
|
+
onKeydown: t[2] || (t[2] = (d) => u.$emit("keydown", d)),
|
|
114
|
+
ref_key: "input",
|
|
115
|
+
ref: l
|
|
116
|
+
}, null, 42, B),
|
|
117
|
+
a("span", C, r(e.error_message), 1),
|
|
118
|
+
a("small", j, r(e.description), 1)
|
|
119
|
+
], 2))
|
|
120
|
+
], 64));
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
export {
|
|
124
|
+
D as default
|
|
125
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { ref as g, onMounted as V, createElementBlock as m, openBlock as f, Fragment as x, createCommentVNode as y, normalizeClass as s, createElementVNode as t, withDirectives as k, toDisplayString as r, vModelText as h } from "vue";
|
|
2
|
+
const T = { class: "font-bold ptext-lg dark:text-white" }, p = ["name", "id"], w = ["id"], S = ["for"], q = ["name", "id"], B = ["required", "name", "id", "type"], C = { class: "gl-span-form-error" }, j = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, D = {
|
|
3
|
+
__name: "GlTextareaTranslate",
|
|
4
|
+
props: {
|
|
5
|
+
is_required: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !1
|
|
8
|
+
},
|
|
9
|
+
show: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
error_message: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: [String, Number],
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
modelValueTranslate: {
|
|
22
|
+
type: [String, Object],
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
type: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "text"
|
|
28
|
+
},
|
|
29
|
+
field_name: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
label_name: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
get_field_translations: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
41
|
+
description: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: ""
|
|
44
|
+
},
|
|
45
|
+
translatable: {
|
|
46
|
+
type: Object,
|
|
47
|
+
default: null
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: ["update:modelValue", "update:modelValueTranslate", "keydown"],
|
|
51
|
+
setup(e, { expose: b, emit: c }) {
|
|
52
|
+
const n = e, o = c, l = g(null), i = g(null), v = () => {
|
|
53
|
+
i.value && o("update:modelValueTranslate", i.value.value);
|
|
54
|
+
};
|
|
55
|
+
return V(() => {
|
|
56
|
+
l.value !== null && l.value.hasAttribute("autofocus") && l.value.focus(), n.modelValue && (o("update:modelValue", n.modelValue), l.value.value = n.modelValue), n.modelValueTranslate && (o("update:modelValueTranslate", n.modelValueTranslate), i.value.value = n.modelValueTranslate), l.value.classList.add("gl-multilanguage");
|
|
57
|
+
}), b({ focus: () => l.value.focus() }), (d, a) => (f(), m(x, null, [
|
|
58
|
+
e.show ? (f(), m("div", {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: s(e.field_name)
|
|
61
|
+
}, [
|
|
62
|
+
t("h3", T, r(e.label_name), 1),
|
|
63
|
+
k(t("input", {
|
|
64
|
+
type: "hidden",
|
|
65
|
+
"data-i18n": "true",
|
|
66
|
+
name: e.field_name + "_i18n",
|
|
67
|
+
id: e.field_name + "_i18n",
|
|
68
|
+
ref_key: "input_translate",
|
|
69
|
+
ref: i,
|
|
70
|
+
"onUpdate:modelValue": a[0] || (a[0] = (u) => d.inputTranslateValue = u)
|
|
71
|
+
}, null, 8, p), [
|
|
72
|
+
[h, d.inputTranslateValue]
|
|
73
|
+
]),
|
|
74
|
+
t("p", {
|
|
75
|
+
id: e.field_name,
|
|
76
|
+
class: "mb-4 text-base text-gray-900 input_tr_show dark:text-white"
|
|
77
|
+
}, r(d.model_value), 9, w),
|
|
78
|
+
a[3] || (a[3] = t("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
79
|
+
], 2)) : y("", !0),
|
|
80
|
+
e.show ? y("", !0) : (f(), m("div", {
|
|
81
|
+
key: 1,
|
|
82
|
+
class: s(["mb-4", e.field_name])
|
|
83
|
+
}, [
|
|
84
|
+
t("label", {
|
|
85
|
+
class: s({
|
|
86
|
+
"gl-label-translation-form": e.error_message == "",
|
|
87
|
+
"gl-label-translation-form-invalid": e.error_message !== "",
|
|
88
|
+
required: e.is_required
|
|
89
|
+
}),
|
|
90
|
+
for: e.field_name
|
|
91
|
+
}, r(e.label_name), 11, S),
|
|
92
|
+
a[4] || (a[4] = t("span", { class: "language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300" }, null, -1)),
|
|
93
|
+
t("input", {
|
|
94
|
+
class: "mb-4",
|
|
95
|
+
type: "hidden",
|
|
96
|
+
"data-i18n": "true",
|
|
97
|
+
name: e.field_name + "_i18n",
|
|
98
|
+
id: e.field_name + "_i18n",
|
|
99
|
+
onChange: v,
|
|
100
|
+
ref_key: "input_translate",
|
|
101
|
+
ref: i
|
|
102
|
+
}, null, 40, q),
|
|
103
|
+
t("textarea", {
|
|
104
|
+
class: s(["mt-4 form-input-translation", {
|
|
105
|
+
" gl-textarea-form": e.error_message == "",
|
|
106
|
+
" gl-textarea-form-invalid": e.error_message !== ""
|
|
107
|
+
}]),
|
|
108
|
+
required: e.is_required,
|
|
109
|
+
name: e.field_name,
|
|
110
|
+
id: e.field_name,
|
|
111
|
+
type: e.type,
|
|
112
|
+
onInput: a[1] || (a[1] = (u) => d.$emit("update:modelValue", u.target.value)),
|
|
113
|
+
onKeydown: a[2] || (a[2] = (u) => d.$emit("keydown", u)),
|
|
114
|
+
ref_key: "input",
|
|
115
|
+
ref: l,
|
|
116
|
+
rows: "4"
|
|
117
|
+
}, " ", 42, B),
|
|
118
|
+
t("span", C, r(e.error_message), 1),
|
|
119
|
+
t("small", j, r(e.description), 1)
|
|
120
|
+
], 2))
|
|
121
|
+
], 64));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
export {
|
|
125
|
+
D as default
|
|
126
|
+
};
|