golden-logic-ui 1.3.9 → 1.3.10

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.
@@ -0,0 +1,187 @@
1
+ import { ref as C, computed as y, watch as T, createElementBlock as o, openBlock as u, normalizeClass as S, createCommentVNode as p, createElementVNode as g, toDisplayString as c, Fragment as B, createTextVNode as L, renderList as V } from "vue";
2
+ import { PHONE_PREFERRED as U, PHONE_COUNTRIES as z, PHONE_CODE_DEFAULTS as G } from "./phoneCountries.js";
3
+ const j = {
4
+ key: 0,
5
+ class: "gl-label-form"
6
+ }, J = {
7
+ class: "mt-1 text-gray-900 dark:text-white tabular-nums",
8
+ dir: "ltr"
9
+ }, K = ["for"], M = {
10
+ class: "flex",
11
+ dir: "ltr"
12
+ }, Q = {
13
+ key: 0,
14
+ class: "h-10 inline-flex shrink-0 items-center rounded-s-lg border border-e-0 border-gray-200 bg-gray-100 px-3 text-sm font-medium text-gray-700 tabular-nums dark:border-gray-700 dark:bg-gray-700 dark:text-gray-200"
15
+ }, X = ["value", "disabled", "aria-label", "title"], Y = ["label"], Z = ["value"], ee = ["label"], te = ["value"], le = ["id", "name", "value", "placeholder", "required", "disabled", "aria-invalid"], ae = { class: "gl-span-form-error" }, ne = {
16
+ key: 1,
17
+ class: "block mt-1 text-sm font-normal leading-5 text-gray-500"
18
+ }, ue = {
19
+ __name: "GlPhoneInput",
20
+ props: {
21
+ /** The number without its country code, digits only. */
22
+ modelValue: { type: [String, Number], default: "" },
23
+ /** The dialling code, such as +968. Bind with v-model:country_code. */
24
+ country_code: { type: String, default: "+968" },
25
+ /** The country's ISO code, such as OM, where a code is shared. Optional. */
26
+ country: { type: String, default: "" },
27
+ /**
28
+ * The countries offered: [{ code: 'OM', dial: '+968', name: 'Oman', length: 8 }].
29
+ * length is the digits after the code, used to warn on a short or long
30
+ * number; leave it out where numbers vary. Defaults to every country.
31
+ */
32
+ countries: { type: Array, default: () => z },
33
+ /** ISO codes listed first, above the rest. */
34
+ preferred: { type: Array, default: () => U },
35
+ /** Show the code as fixed text instead of a picker. */
36
+ lock_country: { type: Boolean, default: !1 },
37
+ field_name: { type: String, default: "" },
38
+ label_name: { type: String, default: "" },
39
+ is_required: { type: Boolean, default: !1 },
40
+ show: { type: Boolean, default: !1 },
41
+ disabled: { type: Boolean, default: !1 },
42
+ error_message: { type: String, default: "" },
43
+ description: { type: String, default: "" },
44
+ placeholder: { type: String, default: "" },
45
+ /** Shown when the length is off. :country and :length are filled in. */
46
+ length_message: { type: String, default: ":country numbers have :length digits." },
47
+ country_label: { type: String, default: "Country" },
48
+ preferred_label: { type: String, default: "Common" },
49
+ all_label: { type: String, default: "All countries" }
50
+ },
51
+ emits: ["update:modelValue", "update:country_code", "update:country", "change", "blur"],
52
+ setup(a, { expose: q, emit: $ }) {
53
+ const n = a, b = $, v = C(null), O = C(!1), i = (e) => e.code || e.dial, s = y(() => {
54
+ const e = n.countries;
55
+ return !n.country_code || e.some((l) => l.dial === n.country_code) ? e : [...e, { code: "", dial: n.country_code, name: n.country_code }];
56
+ }), w = y(
57
+ () => n.preferred.map((e) => s.value.find((l) => l.code === e)).filter(Boolean)
58
+ ), P = y(
59
+ () => s.value.filter((e) => !n.preferred.includes(e.code)).sort((e, l) => e.name.localeCompare(l.name))
60
+ );
61
+ function E(e, l = "") {
62
+ const t = s.value.filter((r) => r.dial === e);
63
+ return t.find((r) => l && r.code === l) || w.value.find((r) => r.dial === e) || t.find((r) => r.code === G[e]) || t[0] || null;
64
+ }
65
+ const h = C(i(E(n.country_code, n.country) || { dial: n.country_code }));
66
+ T(
67
+ () => [n.country_code, n.country],
68
+ ([e, l]) => {
69
+ const t = s.value.find((_) => i(_) === h.value);
70
+ if (t && t.dial === e && (!l || t.code === l))
71
+ return;
72
+ const r = E(e, l);
73
+ h.value = r ? i(r) : e;
74
+ }
75
+ );
76
+ const d = y(() => s.value.find((e) => i(e) === h.value) || null), f = y(() => String(n.modelValue ?? "")), W = y(() => {
77
+ const e = d.value?.length;
78
+ return !O.value || !e || f.value === "" || f.value.length === e ? "" : n.length_message.replace(":country", d.value.name).replace(":length", String(e));
79
+ }), m = y(() => n.error_message || W.value), A = (e) => String(e ?? "").replace(/\D/g, ""), k = (e) => e.replace(/\D/g, "");
80
+ function F(e) {
81
+ return [...new Set(s.value.map((t) => t.dial).filter(Boolean))].sort((t, r) => k(r).length - k(t).length).find((t) => e.startsWith(k(t)));
82
+ }
83
+ function N(e) {
84
+ h.value = i(e), e.dial !== n.country_code && b("update:country_code", e.dial), e.code && e.code !== n.country && b("update:country", e.code);
85
+ }
86
+ function D(e) {
87
+ const l = d.value?.dial || n.country_code;
88
+ b("change", { country_code: l, country: d.value?.code || "", number: e, full: e ? `${l}${e}` : "" });
89
+ }
90
+ function H(e) {
91
+ const l = String(e ?? "").trim();
92
+ let t = A(l);
93
+ if (!n.lock_country && (l.startsWith("+") || l.startsWith("00"))) {
94
+ const _ = l.startsWith("00") ? t.slice(2) : t, x = F(_);
95
+ x && (N(d.value?.dial === x ? d.value : E(x)), t = _.slice(k(x).length));
96
+ }
97
+ const r = d.value?.length;
98
+ r && t.length === r + 1 && t.startsWith("0") && (t = t.slice(1)), b("update:modelValue", t), D(t), v.value && v.value.value !== t && (v.value.value = t);
99
+ }
100
+ function R(e) {
101
+ const l = s.value.find((t) => i(t) === e.target.value);
102
+ l && (N(l), D(f.value));
103
+ }
104
+ function I(e) {
105
+ O.value = !0, b("blur", e);
106
+ }
107
+ return q({ focus: () => v.value?.focus() }), (e, l) => a.show ? (u(), o("div", {
108
+ key: 0,
109
+ class: S(a.field_name)
110
+ }, [
111
+ a.label_name ? (u(), o("label", j, c(a.label_name), 1)) : p("", !0),
112
+ g("p", J, [
113
+ f.value ? (u(), o(B, { key: 0 }, [
114
+ L(c(d.value?.dial || a.country_code) + " " + c(f.value), 1)
115
+ ], 64)) : p("", !0)
116
+ ]),
117
+ l[1] || (l[1] = g("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
118
+ ], 2)) : (u(), o("div", {
119
+ key: 1,
120
+ class: S(a.field_name)
121
+ }, [
122
+ a.label_name ? (u(), o("label", {
123
+ key: 0,
124
+ for: a.field_name,
125
+ class: S({
126
+ "gl-label-form": !m.value,
127
+ "gl-label-form-invalid": m.value,
128
+ required: a.is_required
129
+ })
130
+ }, c(a.label_name), 11, K)) : p("", !0),
131
+ g("div", M, [
132
+ a.lock_country ? (u(), o("span", Q, c(a.country_code), 1)) : (u(), o("select", {
133
+ key: 1,
134
+ value: h.value,
135
+ disabled: a.disabled,
136
+ "aria-label": a.country_label,
137
+ title: d.value?.name || a.country_label,
138
+ class: "h-10 w-auto max-w-32 shrink-0 cursor-pointer rounded-s-lg border border-e-0 border-gray-200 bg-gray-100 ps-3 pe-8 text-sm font-medium text-gray-700 tabular-nums outline-hidden focus:border-primary dark:border-gray-700 dark:bg-gray-700 dark:text-gray-200 dark:focus:border-primaryDark disabled:cursor-not-allowed disabled:opacity-70",
139
+ onChange: R
140
+ }, [
141
+ w.value.length ? (u(), o("optgroup", {
142
+ key: 0,
143
+ label: a.preferred_label
144
+ }, [
145
+ (u(!0), o(B, null, V(w.value, (t) => (u(), o("option", {
146
+ key: "p-" + i(t),
147
+ value: i(t)
148
+ }, c(t.code ? `${t.code} ${t.dial}` : t.dial), 9, Z))), 128))
149
+ ], 8, Y)) : p("", !0),
150
+ g("optgroup", { label: a.all_label }, [
151
+ (u(!0), o(B, null, V(P.value, (t) => (u(), o("option", {
152
+ key: i(t),
153
+ value: i(t)
154
+ }, c(t.code ? `${t.code} ${t.dial}` : t.dial), 9, te))), 128))
155
+ ], 8, ee)
156
+ ], 40, X)),
157
+ g("input", {
158
+ ref_key: "input",
159
+ ref: v,
160
+ type: "tel",
161
+ inputmode: "numeric",
162
+ autocomplete: "tel-national",
163
+ id: a.field_name,
164
+ name: a.field_name,
165
+ value: f.value,
166
+ placeholder: a.placeholder || (d.value?.length ? "0".repeat(d.value.length) : ""),
167
+ maxlength: "24",
168
+ required: a.is_required,
169
+ disabled: a.disabled,
170
+ "aria-invalid": m.value ? "true" : "false",
171
+ class: S(["min-w-0 rounded-s-none! tabular-nums", {
172
+ "gl-input-form": !m.value,
173
+ "gl-input-form-invalid": m.value,
174
+ "opacity-70 cursor-not-allowed bg-gray-100 dark:bg-gray-700": a.disabled
175
+ }]),
176
+ onInput: l[0] || (l[0] = (t) => H(t.target.value)),
177
+ onBlur: I
178
+ }, null, 42, le)
179
+ ]),
180
+ g("span", ae, c(m.value), 1),
181
+ a.description ? (u(), o("small", ne, c(a.description), 1)) : p("", !0)
182
+ ], 2));
183
+ }
184
+ };
185
+ export {
186
+ ue as default
187
+ };
@@ -0,0 +1,250 @@
1
+ const a = (n, i, e, r) => r ? { code: n, name: i, dial: e, length: r } : { code: n, name: i, dial: e }, o = [
2
+ a("AF", "Afghanistan", "+93", 9),
3
+ a("AX", "Åland Islands", "+358"),
4
+ a("AL", "Albania", "+355", 9),
5
+ a("DZ", "Algeria", "+213", 9),
6
+ a("AS", "American Samoa", "+1"),
7
+ a("AD", "Andorra", "+376", 6),
8
+ a("AO", "Angola", "+244", 9),
9
+ a("AI", "Anguilla", "+1"),
10
+ a("AG", "Antigua and Barbuda", "+1"),
11
+ a("AR", "Argentina", "+54"),
12
+ a("AM", "Armenia", "+374", 8),
13
+ a("AW", "Aruba", "+297", 7),
14
+ a("AU", "Australia", "+61", 9),
15
+ a("AT", "Austria", "+43"),
16
+ a("AZ", "Azerbaijan", "+994", 9),
17
+ a("BS", "Bahamas", "+1"),
18
+ a("BH", "Bahrain", "+973", 8),
19
+ a("BD", "Bangladesh", "+880", 10),
20
+ a("BB", "Barbados", "+1"),
21
+ a("BY", "Belarus", "+375", 9),
22
+ a("BE", "Belgium", "+32", 9),
23
+ a("BZ", "Belize", "+501", 7),
24
+ a("BJ", "Benin", "+229"),
25
+ a("BM", "Bermuda", "+1"),
26
+ a("BT", "Bhutan", "+975", 8),
27
+ a("BO", "Bolivia", "+591", 8),
28
+ a("BQ", "Caribbean Netherlands", "+599"),
29
+ a("BA", "Bosnia and Herzegovina", "+387"),
30
+ a("BW", "Botswana", "+267", 8),
31
+ a("BR", "Brazil", "+55", 11),
32
+ a("IO", "British Indian Ocean Territory", "+246"),
33
+ a("VG", "British Virgin Islands", "+1"),
34
+ a("BN", "Brunei", "+673", 7),
35
+ a("BG", "Bulgaria", "+359", 9),
36
+ a("BF", "Burkina Faso", "+226", 8),
37
+ a("BI", "Burundi", "+257", 8),
38
+ a("CV", "Cape Verde", "+238", 7),
39
+ a("KH", "Cambodia", "+855"),
40
+ a("CM", "Cameroon", "+237", 9),
41
+ a("CA", "Canada", "+1", 10),
42
+ a("KY", "Cayman Islands", "+1"),
43
+ a("CF", "Central African Republic", "+236", 8),
44
+ a("TD", "Chad", "+235", 8),
45
+ a("CL", "Chile", "+56", 9),
46
+ a("CN", "China", "+86", 11),
47
+ a("CX", "Christmas Island", "+61"),
48
+ a("CC", "Cocos (Keeling) Islands", "+61"),
49
+ a("CO", "Colombia", "+57", 10),
50
+ a("KM", "Comoros", "+269", 7),
51
+ a("CG", "Congo", "+242", 9),
52
+ a("CD", "Congo (DRC)", "+243", 9),
53
+ a("CK", "Cook Islands", "+682", 5),
54
+ a("CR", "Costa Rica", "+506", 8),
55
+ a("CI", "Côte d'Ivoire", "+225", 10),
56
+ a("HR", "Croatia", "+385"),
57
+ a("CU", "Cuba", "+53", 8),
58
+ a("CW", "Curaçao", "+599"),
59
+ a("CY", "Cyprus", "+357", 8),
60
+ a("CZ", "Czechia", "+420", 9),
61
+ a("DK", "Denmark", "+45", 8),
62
+ a("DJ", "Djibouti", "+253", 8),
63
+ a("DM", "Dominica", "+1"),
64
+ a("DO", "Dominican Republic", "+1"),
65
+ a("EC", "Ecuador", "+593", 9),
66
+ a("EG", "Egypt", "+20", 10),
67
+ a("SV", "El Salvador", "+503", 8),
68
+ a("GQ", "Equatorial Guinea", "+240", 9),
69
+ a("ER", "Eritrea", "+291", 7),
70
+ a("EE", "Estonia", "+372"),
71
+ a("SZ", "Eswatini", "+268", 8),
72
+ a("ET", "Ethiopia", "+251", 9),
73
+ a("FK", "Falkland Islands", "+500", 5),
74
+ a("FO", "Faroe Islands", "+298", 6),
75
+ a("FJ", "Fiji", "+679", 7),
76
+ a("FI", "Finland", "+358"),
77
+ a("FR", "France", "+33", 9),
78
+ a("GF", "French Guiana", "+594", 9),
79
+ a("PF", "French Polynesia", "+689", 8),
80
+ a("GA", "Gabon", "+241"),
81
+ a("GM", "Gambia", "+220", 7),
82
+ a("GE", "Georgia", "+995", 9),
83
+ a("DE", "Germany", "+49"),
84
+ a("GH", "Ghana", "+233", 9),
85
+ a("GI", "Gibraltar", "+350", 8),
86
+ a("GR", "Greece", "+30", 10),
87
+ a("GL", "Greenland", "+299", 6),
88
+ a("GD", "Grenada", "+1"),
89
+ a("GP", "Guadeloupe", "+590", 9),
90
+ a("GU", "Guam", "+1"),
91
+ a("GT", "Guatemala", "+502", 8),
92
+ a("GG", "Guernsey", "+44"),
93
+ a("GN", "Guinea", "+224", 9),
94
+ a("GW", "Guinea-Bissau", "+245"),
95
+ a("GY", "Guyana", "+592", 7),
96
+ a("HT", "Haiti", "+509", 8),
97
+ a("HN", "Honduras", "+504", 8),
98
+ a("HK", "Hong Kong", "+852", 8),
99
+ a("HU", "Hungary", "+36", 9),
100
+ a("IS", "Iceland", "+354", 7),
101
+ a("IN", "India", "+91", 10),
102
+ a("ID", "Indonesia", "+62"),
103
+ a("IR", "Iran", "+98", 10),
104
+ a("IQ", "Iraq", "+964", 10),
105
+ a("IE", "Ireland", "+353", 9),
106
+ a("IM", "Isle of Man", "+44"),
107
+ a("IL", "Israel", "+972", 9),
108
+ a("IT", "Italy", "+39"),
109
+ a("JM", "Jamaica", "+1"),
110
+ a("JP", "Japan", "+81", 10),
111
+ a("JE", "Jersey", "+44"),
112
+ a("JO", "Jordan", "+962", 9),
113
+ a("KZ", "Kazakhstan", "+7", 10),
114
+ a("KE", "Kenya", "+254", 9),
115
+ a("KI", "Kiribati", "+686"),
116
+ a("XK", "Kosovo", "+383"),
117
+ a("KW", "Kuwait", "+965", 8),
118
+ a("KG", "Kyrgyzstan", "+996", 9),
119
+ a("LA", "Laos", "+856"),
120
+ a("LV", "Latvia", "+371", 8),
121
+ a("LB", "Lebanon", "+961"),
122
+ a("LS", "Lesotho", "+266", 8),
123
+ a("LR", "Liberia", "+231"),
124
+ a("LY", "Libya", "+218", 9),
125
+ a("LI", "Liechtenstein", "+423"),
126
+ a("LT", "Lithuania", "+370", 8),
127
+ a("LU", "Luxembourg", "+352", 9),
128
+ a("MO", "Macao", "+853", 8),
129
+ a("MG", "Madagascar", "+261", 9),
130
+ a("MW", "Malawi", "+265", 9),
131
+ a("MY", "Malaysia", "+60"),
132
+ a("MV", "Maldives", "+960", 7),
133
+ a("ML", "Mali", "+223", 8),
134
+ a("MT", "Malta", "+356", 8),
135
+ a("MH", "Marshall Islands", "+692", 7),
136
+ a("MQ", "Martinique", "+596", 9),
137
+ a("MR", "Mauritania", "+222", 8),
138
+ a("MU", "Mauritius", "+230", 8),
139
+ a("YT", "Mayotte", "+262"),
140
+ a("MX", "Mexico", "+52", 10),
141
+ a("FM", "Micronesia", "+691", 7),
142
+ a("MD", "Moldova", "+373", 8),
143
+ a("MC", "Monaco", "+377"),
144
+ a("MN", "Mongolia", "+976", 8),
145
+ a("ME", "Montenegro", "+382"),
146
+ a("MS", "Montserrat", "+1"),
147
+ a("MA", "Morocco", "+212", 9),
148
+ a("MZ", "Mozambique", "+258", 9),
149
+ a("MM", "Myanmar", "+95"),
150
+ a("NA", "Namibia", "+264", 9),
151
+ a("NR", "Nauru", "+674", 7),
152
+ a("NP", "Nepal", "+977", 10),
153
+ a("NL", "Netherlands", "+31", 9),
154
+ a("NC", "New Caledonia", "+687", 6),
155
+ a("NZ", "New Zealand", "+64"),
156
+ a("NI", "Nicaragua", "+505", 8),
157
+ a("NE", "Niger", "+227", 8),
158
+ a("NG", "Nigeria", "+234", 10),
159
+ a("NU", "Niue", "+683"),
160
+ a("NF", "Norfolk Island", "+672"),
161
+ a("KP", "North Korea", "+850"),
162
+ a("MK", "North Macedonia", "+389", 8),
163
+ a("MP", "Northern Mariana Islands", "+1"),
164
+ a("NO", "Norway", "+47", 8),
165
+ a("OM", "Oman", "+968", 8),
166
+ a("PK", "Pakistan", "+92", 10),
167
+ a("PW", "Palau", "+680", 7),
168
+ a("PS", "Palestine", "+970", 9),
169
+ a("PA", "Panama", "+507", 8),
170
+ a("PG", "Papua New Guinea", "+675", 8),
171
+ a("PY", "Paraguay", "+595", 9),
172
+ a("PE", "Peru", "+51", 9),
173
+ a("PH", "Philippines", "+63", 10),
174
+ a("PL", "Poland", "+48", 9),
175
+ a("PT", "Portugal", "+351", 9),
176
+ a("PR", "Puerto Rico", "+1"),
177
+ a("QA", "Qatar", "+974", 8),
178
+ a("RE", "Réunion", "+262", 9),
179
+ a("RO", "Romania", "+40", 9),
180
+ a("RU", "Russia", "+7", 10),
181
+ a("RW", "Rwanda", "+250", 9),
182
+ a("BL", "Saint Barthélemy", "+590"),
183
+ a("SH", "Saint Helena", "+290"),
184
+ a("KN", "Saint Kitts and Nevis", "+1"),
185
+ a("LC", "Saint Lucia", "+1"),
186
+ a("MF", "Saint Martin", "+590"),
187
+ a("PM", "Saint Pierre and Miquelon", "+508", 6),
188
+ a("VC", "Saint Vincent and the Grenadines", "+1"),
189
+ a("WS", "Samoa", "+685"),
190
+ a("SM", "San Marino", "+378"),
191
+ a("ST", "São Tomé and Príncipe", "+239", 7),
192
+ a("SA", "Saudi Arabia", "+966", 9),
193
+ a("SN", "Senegal", "+221", 9),
194
+ a("RS", "Serbia", "+381"),
195
+ a("SC", "Seychelles", "+248", 7),
196
+ a("SL", "Sierra Leone", "+232", 8),
197
+ a("SG", "Singapore", "+65", 8),
198
+ a("SX", "Sint Maarten", "+1"),
199
+ a("SK", "Slovakia", "+421", 9),
200
+ a("SI", "Slovenia", "+386", 8),
201
+ a("SB", "Solomon Islands", "+677"),
202
+ a("SO", "Somalia", "+252"),
203
+ a("ZA", "South Africa", "+27", 9),
204
+ a("KR", "South Korea", "+82"),
205
+ a("SS", "South Sudan", "+211", 9),
206
+ a("ES", "Spain", "+34", 9),
207
+ a("LK", "Sri Lanka", "+94", 9),
208
+ a("SD", "Sudan", "+249", 9),
209
+ a("SR", "Suriname", "+597", 7),
210
+ a("SJ", "Svalbard and Jan Mayen", "+47"),
211
+ a("SE", "Sweden", "+46", 9),
212
+ a("CH", "Switzerland", "+41", 9),
213
+ a("SY", "Syria", "+963", 9),
214
+ a("TW", "Taiwan", "+886", 9),
215
+ a("TJ", "Tajikistan", "+992", 9),
216
+ a("TZ", "Tanzania", "+255", 9),
217
+ a("TH", "Thailand", "+66", 9),
218
+ a("TL", "Timor-Leste", "+670", 8),
219
+ a("TG", "Togo", "+228", 8),
220
+ a("TK", "Tokelau", "+690"),
221
+ a("TO", "Tonga", "+676"),
222
+ a("TT", "Trinidad and Tobago", "+1"),
223
+ a("TN", "Tunisia", "+216", 8),
224
+ a("TR", "Türkiye", "+90", 10),
225
+ a("TM", "Turkmenistan", "+993", 8),
226
+ a("TC", "Turks and Caicos Islands", "+1"),
227
+ a("TV", "Tuvalu", "+688"),
228
+ a("UG", "Uganda", "+256", 9),
229
+ a("UA", "Ukraine", "+380", 9),
230
+ a("AE", "United Arab Emirates", "+971", 9),
231
+ a("GB", "United Kingdom", "+44", 10),
232
+ a("US", "United States", "+1", 10),
233
+ a("UY", "Uruguay", "+598", 8),
234
+ a("VI", "U.S. Virgin Islands", "+1"),
235
+ a("UZ", "Uzbekistan", "+998", 9),
236
+ a("VU", "Vanuatu", "+678"),
237
+ a("VA", "Vatican City", "+39"),
238
+ a("VE", "Venezuela", "+58", 10),
239
+ a("VN", "Vietnam", "+84", 9),
240
+ a("WF", "Wallis and Futuna", "+681", 6),
241
+ a("EH", "Western Sahara", "+212"),
242
+ a("YE", "Yemen", "+967", 9),
243
+ a("ZM", "Zambia", "+260", 9),
244
+ a("ZW", "Zimbabwe", "+263", 9)
245
+ ], s = ["OM", "AE", "SA", "QA", "KW", "BH", "EG"], t = { "+1": "US", "+7": "RU", "+44": "GB", "+47": "NO", "+61": "AU", "+39": "IT", "+212": "MA", "+262": "RE", "+358": "FI", "+590": "GP", "+599": "CW" };
246
+ export {
247
+ t as PHONE_CODE_DEFAULTS,
248
+ o as PHONE_COUNTRIES,
249
+ s as PHONE_PREFERRED
250
+ };
package/dist/main.js CHANGED
@@ -6,142 +6,148 @@ import { default as u } from "./components/GeneralComponents/GlMultiSelectDropdo
6
6
  import { default as p } from "./components/GeneralComponents/GLButton.vue.js";
7
7
  import { default as G } from "./components/GeneralComponents/GlTextareaTranslate.vue.js";
8
8
  import { default as n } from "./components/GeneralComponents/GlTextTranslate.vue.js";
9
- import { default as c } from "./components/GeneralComponents/GlTextInput.vue.js";
10
- import { default as b } from "./components/GeneralComponents/GlDatePicker.vue.js";
11
- import { default as C } from "./components/GeneralComponents/GlDateTimePicker.vue.js";
12
- import { default as L } from "./components/GeneralComponents/GlDateRangePicker.vue.js";
13
- import { default as P } from "./components/GeneralComponents/GlDateTimeRangePicker.vue.js";
14
- import { default as y } from "./components/GeneralComponents/GlTimeRangePicker.vue.js";
15
- import { default as k } from "./components/GeneralComponents/GlDateRangeCalendar.vue.js";
16
- import { default as A } from "./components/GeneralComponents/GlTextInputFile.vue.js";
9
+ import { default as T } from "./components/GeneralComponents/GlTextInput.vue.js";
10
+ import { default as b } from "./components/GeneralComponents/GlPhoneInput.vue.js";
11
+ import { PHONE_CODE_DEFAULTS as C, PHONE_COUNTRIES as g, PHONE_PREFERRED as P } from "./components/GeneralComponents/phoneCountries.js";
12
+ import { default as E } from "./components/GeneralComponents/GlDatePicker.vue.js";
13
+ import { default as F } from "./components/GeneralComponents/GlDateTimePicker.vue.js";
14
+ import { default as w } from "./components/GeneralComponents/GlDateRangePicker.vue.js";
15
+ import { default as O } from "./components/GeneralComponents/GlDateTimeRangePicker.vue.js";
16
+ import { default as v } from "./components/GeneralComponents/GlTimeRangePicker.vue.js";
17
+ import { default as I } from "./components/GeneralComponents/GlDateRangeCalendar.vue.js";
18
+ import { default as N } from "./components/GeneralComponents/GlTextInputFile.vue.js";
17
19
  import { default as B } from "./components/GeneralComponents/GlTabsWrapper.vue.js";
18
- import { default as h } from "./components/GeneralComponents/GlTab.vue.js";
19
- import { default as H } from "./components/GeneralComponents/GlTabShow.vue.js";
20
- import { default as E } from "./components/GeneralComponents/GlMultiItemSlide.vue.js";
21
- import { default as U } from "./components/GeneralComponents/GlMultiItemSlideDynamic.vue.js";
22
- import { default as q } from "./components/GeneralComponents/GlModal.vue.js";
23
- import { default as J } from "./components/GeneralComponents/GlModalWithoutOverflow.vue.js";
24
- import { default as Q } from "./components/GeneralComponents/GlModalShow.vue.js";
25
- import { default as X } from "./components/GeneralComponents/GlToggleBox.vue.js";
26
- import { default as Z } from "./components/GeneralComponents/GlToggleBoxTrueFalse.vue.js";
27
- import { default as $ } from "./components/GeneralComponents/GlDropdown.vue.js";
28
- import { default as ea } from "./components/GeneralComponents/GLTextarea.vue.js";
29
- import { default as oa } from "./components/GeneralComponents/GlTinymce.vue.js";
30
- import { default as ra } from "./components/GeneralComponents/GlCodeMirror.vue.js";
31
- import { default as sa } from "./components/GeneralComponents/GlCodeMirrorTranslate.vue.js";
32
- import { default as ua } from "./components/GeneralComponents/GlTinymceTranslate.vue.js";
33
- import { default as pa } from "./components/GeneralComponents/DataTable/GLDataTableServerSide.vue.js";
34
- import { default as Ga } from "./components/GeneralComponents/DataTable/GlDataTableComponent.vue.js";
35
- import { default as na } from "./components/GeneralComponents/DataTable/GlDataTableServerSideGroupBy.vue.js";
36
- import { default as ca } from "./components/GeneralComponents/DataTable/GLDataTable.vue.js";
37
- import { default as ba } from "./components/GeneralComponents/DataTable/DatatableConvertCronToHuman.vue.js";
38
- import { default as Ca } from "./components/GeneralComponents/DeleteConfirmationModal.vue.js";
39
- import { default as La } from "./components/GeneralComponents/GlAccordionsWrapper.vue.js";
40
- import { default as Pa } from "./components/GeneralComponents/GlAccordion.vue.js";
41
- import { default as ya } from "./components/GeneralComponents/GlToastList.vue.js";
42
- import { default as ka } from "./Stores/toast.js";
43
- import { default as Aa } from "./components/GeneralComponents/DataTable/DatatableAction.vue.js";
20
+ import { default as U } from "./components/GeneralComponents/GlTab.vue.js";
21
+ import { default as j } from "./components/GeneralComponents/GlTabShow.vue.js";
22
+ import { default as z } from "./components/GeneralComponents/GlMultiItemSlide.vue.js";
23
+ import { default as K } from "./components/GeneralComponents/GlMultiItemSlideDynamic.vue.js";
24
+ import { default as V } from "./components/GeneralComponents/GlModal.vue.js";
25
+ import { default as Y } from "./components/GeneralComponents/GlModalWithoutOverflow.vue.js";
26
+ import { default as $ } from "./components/GeneralComponents/GlModalShow.vue.js";
27
+ import { default as ea } from "./components/GeneralComponents/GlToggleBox.vue.js";
28
+ import { default as oa } from "./components/GeneralComponents/GlToggleBoxTrueFalse.vue.js";
29
+ import { default as ra } from "./components/GeneralComponents/GlDropdown.vue.js";
30
+ import { default as sa } from "./components/GeneralComponents/GLTextarea.vue.js";
31
+ import { default as ua } from "./components/GeneralComponents/GlTinymce.vue.js";
32
+ import { default as pa } from "./components/GeneralComponents/GlCodeMirror.vue.js";
33
+ import { default as Ga } from "./components/GeneralComponents/GlCodeMirrorTranslate.vue.js";
34
+ import { default as na } from "./components/GeneralComponents/GlTinymceTranslate.vue.js";
35
+ import { default as Ta } from "./components/GeneralComponents/DataTable/GLDataTableServerSide.vue.js";
36
+ import { default as ba } from "./components/GeneralComponents/DataTable/GlDataTableComponent.vue.js";
37
+ import { default as Ca } from "./components/GeneralComponents/DataTable/GlDataTableServerSideGroupBy.vue.js";
38
+ import { default as Pa } from "./components/GeneralComponents/DataTable/GLDataTable.vue.js";
39
+ import { default as Ea } from "./components/GeneralComponents/DataTable/DatatableConvertCronToHuman.vue.js";
40
+ import { default as Fa } from "./components/GeneralComponents/DeleteConfirmationModal.vue.js";
41
+ import { default as wa } from "./components/GeneralComponents/GlAccordionsWrapper.vue.js";
42
+ import { default as Oa } from "./components/GeneralComponents/GlAccordion.vue.js";
43
+ import { default as va } from "./components/GeneralComponents/GlToastList.vue.js";
44
+ import { default as Ia } from "./Stores/toast.js";
45
+ import { default as Na } from "./components/GeneralComponents/DataTable/DatatableAction.vue.js";
44
46
  import { default as Ba } from "./components/GeneralComponents/DataTable/DatatableDeleteAction.vue.js";
45
- import { default as ha } from "./components/GeneralComponents/DataTable/DatatableDeleteEditAction.vue.js";
46
- import { default as Ha } from "./components/GeneralComponents/DataTable/DatatableFileDownload.vue.js";
47
- import { default as Ea } from "./components/GeneralComponents/DataTable/DatatableFiles.vue.js";
48
- import { default as Ua } from "./components/GeneralComponents/DataTable/DatatableHtml.vue.js";
49
- import { default as qa } from "./components/GeneralComponents/DataTable/DatatableList.vue.js";
50
- import { default as Ja } from "./components/GeneralComponents/DataTable/DatatableListNested.vue.js";
51
- import { default as Qa } from "./components/GeneralComponents/DataTable/DatatablePicture.vue.js";
52
- import { default as Xa } from "./components/GeneralComponents/DataTable/DatatablePictures.vue.js";
53
- import { default as Za } from "./components/GeneralComponents/DataTable/DatatableStatus.vue.js";
54
- import { default as $a } from "./components/GeneralComponents/DataTable/DatatableStatusGeneral.vue.js";
55
- import { default as ee } from "./components/GeneralComponents/DataTable/DatatableStatusSpecficColor.vue.js";
56
- import { default as oe } from "./components/GeneralComponents/DataTable/DatatableStatusTextLabelGeneral.vue.js";
57
- import { default as re } from "./components/GeneralComponents/DataTable/DatatableDateTime.vue.js";
58
- import { default as se } from "./components/GeneralComponents/DataTable/DatatableDate.vue.js";
59
- import { default as ue } from "./components/GeneralComponents/DataTable/DatatableStatusServer.vue.js";
60
- import { default as pe } from "./components/GeneralComponents/DataTable/DatatableCommand.vue.js";
61
- import { default as Ge } from "./components/LaravelVuePagination/TailwindPagination.vue.js";
62
- import { default as ne } from "./components/GeneralComponents/ConfirmationModal.vue.js";
63
- import { default as ce } from "./components/GeneralComponents/DynamicConfirmation.vue.js";
64
- import { default as be } from "./components/GeneralComponents/GlCodeCopy.vue.js";
65
- import { default as Ce } from "./components/GeneralComponents/GlTextCopy.vue.js";
66
- import { default as Le } from "./components/GeneralComponents/StatusRunningSuccessFailed.vue.js";
67
- import { default as Pe } from "./components/GeneralComponents/StatusConnectingConnectedDisconnected.vue.js";
68
- import { default as ye } from "./ClickOutsideDirective.js";
69
- import { default as ke } from "./Form.js";
70
- import { default as Ae } from "./multilingual.js";
71
- import { glLocale as Be, setGlLocales as Ie } from "./localeStore.js";
72
- import { default as We, triggerPrint as He } from "./print/print.js";
47
+ import { default as Ua } from "./components/GeneralComponents/DataTable/DatatableDeleteEditAction.vue.js";
48
+ import { default as ja } from "./components/GeneralComponents/DataTable/DatatableFileDownload.vue.js";
49
+ import { default as za } from "./components/GeneralComponents/DataTable/DatatableFiles.vue.js";
50
+ import { default as Ka } from "./components/GeneralComponents/DataTable/DatatableHtml.vue.js";
51
+ import { default as Va } from "./components/GeneralComponents/DataTable/DatatableList.vue.js";
52
+ import { default as Ya } from "./components/GeneralComponents/DataTable/DatatableListNested.vue.js";
53
+ import { default as $a } from "./components/GeneralComponents/DataTable/DatatablePicture.vue.js";
54
+ import { default as ee } from "./components/GeneralComponents/DataTable/DatatablePictures.vue.js";
55
+ import { default as oe } from "./components/GeneralComponents/DataTable/DatatableStatus.vue.js";
56
+ import { default as re } from "./components/GeneralComponents/DataTable/DatatableStatusGeneral.vue.js";
57
+ import { default as se } from "./components/GeneralComponents/DataTable/DatatableStatusSpecficColor.vue.js";
58
+ import { default as ue } from "./components/GeneralComponents/DataTable/DatatableStatusTextLabelGeneral.vue.js";
59
+ import { default as pe } from "./components/GeneralComponents/DataTable/DatatableDateTime.vue.js";
60
+ import { default as Ge } from "./components/GeneralComponents/DataTable/DatatableDate.vue.js";
61
+ import { default as ne } from "./components/GeneralComponents/DataTable/DatatableStatusServer.vue.js";
62
+ import { default as Te } from "./components/GeneralComponents/DataTable/DatatableCommand.vue.js";
63
+ import { default as be } from "./components/LaravelVuePagination/TailwindPagination.vue.js";
64
+ import { default as Ce } from "./components/GeneralComponents/ConfirmationModal.vue.js";
65
+ import { default as Pe } from "./components/GeneralComponents/DynamicConfirmation.vue.js";
66
+ import { default as Ee } from "./components/GeneralComponents/GlCodeCopy.vue.js";
67
+ import { default as Fe } from "./components/GeneralComponents/GlTextCopy.vue.js";
68
+ import { default as we } from "./components/GeneralComponents/StatusRunningSuccessFailed.vue.js";
69
+ import { default as Oe } from "./components/GeneralComponents/StatusConnectingConnectedDisconnected.vue.js";
70
+ import { default as ve } from "./ClickOutsideDirective.js";
71
+ import { default as Ie } from "./Form.js";
72
+ import { default as Ne } from "./multilingual.js";
73
+ import { glLocale as Be, setGlLocales as _e } from "./localeStore.js";
74
+ import { default as We, triggerPrint as je } from "./print/print.js";
73
75
  export {
74
- ye as ClickOutsideDirective,
75
- oe as DatatableStatusTextLabelGeneral,
76
- ke as Form,
77
- pe as GLDatatableCommand,
78
- se as GLDatatableDate,
79
- re as GLDatatableDateTime,
80
- ue as GLDatatableStatusServer,
81
- Pa as GlAccordion,
82
- La as GlAccordionsWrapper,
76
+ ve as ClickOutsideDirective,
77
+ ue as DatatableStatusTextLabelGeneral,
78
+ Ie as Form,
79
+ Te as GLDatatableCommand,
80
+ Ge as GLDatatableDate,
81
+ pe as GLDatatableDateTime,
82
+ ne as GLDatatableStatusServer,
83
+ Oa as GlAccordion,
84
+ wa as GlAccordionsWrapper,
83
85
  p as GlButton,
84
86
  s as GlCard,
85
- be as GlCodeCopy,
86
- ra as GlCodeMirror,
87
- sa as GlCodeMirrorTranslate,
88
- ne as GlConfirmationModal,
89
- ca as GlDataTable,
90
- Ga as GlDataTableComponent,
91
- pa as GlDataTableServerSide,
92
- na as GlDataTableServerSideGroupBy,
93
- Aa as GlDatatableAction,
94
- ba as GlDatatableConvertCronToHuman,
87
+ Ee as GlCodeCopy,
88
+ pa as GlCodeMirror,
89
+ Ga as GlCodeMirrorTranslate,
90
+ Ce as GlConfirmationModal,
91
+ Pa as GlDataTable,
92
+ ba as GlDataTableComponent,
93
+ Ta as GlDataTableServerSide,
94
+ Ca as GlDataTableServerSideGroupBy,
95
+ Na as GlDatatableAction,
96
+ Ea as GlDatatableConvertCronToHuman,
95
97
  Ba as GlDatatableDeleteAction,
96
- ha as GlDatatableDeleteEditAction,
97
- Ha as GlDatatableFileDownload,
98
- Ea as GlDatatableFiles,
99
- Ua as GlDatatableHtml,
100
- qa as GlDatatableList,
101
- Ja as GlDatatableListNested,
102
- Qa as GlDatatablePicture,
103
- Xa as GlDatatablePictures,
104
- Za as GlDatatableStatus,
105
- $a as GlDatatableStatusGeneral,
106
- ee as GlDatatableStatusSpecficColor,
107
- b as GlDatePicker,
108
- k as GlDateRangeCalendar,
109
- L as GlDateRangePicker,
110
- C as GlDateTimePicker,
111
- P as GlDateTimeRangePicker,
112
- Ca as GlDeleteConfirmationModal,
113
- $ as GlDropdown,
114
- ce as GlDynamicConfirmation,
98
+ Ua as GlDatatableDeleteEditAction,
99
+ ja as GlDatatableFileDownload,
100
+ za as GlDatatableFiles,
101
+ Ka as GlDatatableHtml,
102
+ Va as GlDatatableList,
103
+ Ya as GlDatatableListNested,
104
+ $a as GlDatatablePicture,
105
+ ee as GlDatatablePictures,
106
+ oe as GlDatatableStatus,
107
+ re as GlDatatableStatusGeneral,
108
+ se as GlDatatableStatusSpecficColor,
109
+ E as GlDatePicker,
110
+ I as GlDateRangeCalendar,
111
+ w as GlDateRangePicker,
112
+ F as GlDateTimePicker,
113
+ O as GlDateTimeRangePicker,
114
+ Fa as GlDeleteConfirmationModal,
115
+ ra as GlDropdown,
116
+ Pe as GlDynamicConfirmation,
115
117
  o as GlFilesUpload,
116
118
  r as GlLanguageSelector,
117
- q as GlModal,
118
- Q as GlModalShow,
119
- J as GlModalWithoutOverflow,
120
- E as GlMultiItemSlide,
121
- U as GlMultiItemSlideDynamic,
119
+ V as GlModal,
120
+ $ as GlModalShow,
121
+ Y as GlModalWithoutOverflow,
122
+ z as GlMultiItemSlide,
123
+ K as GlMultiItemSlideDynamic,
122
124
  u as GlMultiSelectDropdown,
125
+ b as GlPhoneInput,
123
126
  We as GlPrint,
124
- Pe as GlStatusConnectingConnectedDisconnected,
125
- Le as GlStatusRunningSuccessFailed,
126
- h as GlTab,
127
- H as GlTabShow,
127
+ Oe as GlStatusConnectingConnectedDisconnected,
128
+ we as GlStatusRunningSuccessFailed,
129
+ U as GlTab,
130
+ j as GlTabShow,
128
131
  B as GlTabsWrapper,
129
- Ge as GlTailwindPagination,
130
- Ce as GlTextCopy,
131
- c as GlTextInput,
132
- A as GlTextInputFile,
132
+ be as GlTailwindPagination,
133
+ Fe as GlTextCopy,
134
+ T as GlTextInput,
135
+ N as GlTextInputFile,
133
136
  n as GlTextTranslate,
134
- ea as GlTextarea,
137
+ sa as GlTextarea,
135
138
  G as GlTextareaTranslate,
136
- y as GlTimeRangePicker,
137
- oa as GlTinymce,
138
- ua as GlTinymceTranslate,
139
- ka as GlToast,
140
- ya as GlToastList,
141
- X as GlToggleBox,
142
- Z as GlToggleBoxTrueFalse,
139
+ v as GlTimeRangePicker,
140
+ ua as GlTinymce,
141
+ na as GlTinymceTranslate,
142
+ Ia as GlToast,
143
+ va as GlToastList,
144
+ ea as GlToggleBox,
145
+ oa as GlToggleBoxTrueFalse,
146
+ C as PHONE_CODE_DEFAULTS,
147
+ g as PHONE_COUNTRIES,
148
+ P as PHONE_PREFERRED,
143
149
  Be as glLocale,
144
- Ae as multilingual,
145
- Ie as setGlLocales,
146
- He as triggerPrint
150
+ Ne as multilingual,
151
+ _e as setGlLocales,
152
+ je as triggerPrint
147
153
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "The most popular library of interactive components built with Vuejs && Tailwind CSS",
4
4
  "type": "module",
5
5
  "private": false,
6
- "version": "1.3.9",
6
+ "version": "1.3.10",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/mrgiant/GoldenLogicUi.git"