inertia-bootstrap-forms 3.0.2 → 4.0.1
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/README.fa.md +86 -6
- package/README.md +95 -8
- package/dist/chunks/UppyInput-Dt8CPfgC.js +210 -0
- package/dist/chunks/UppyInput-ldc834tZ.cjs +1 -0
- package/dist/chunks/_plugin-vue_export-helper-13TPlHFF.js +81 -0
- package/dist/chunks/_plugin-vue_export-helper-BHyUve4F.cjs +1 -0
- package/dist/chunks/http-CDPNmbjF.cjs +1 -0
- package/dist/chunks/http-DV3dRBe5.js +158 -0
- package/dist/country-codes.cjs +1 -0
- package/dist/country-codes.js +245 -0
- package/dist/dropzone.cjs +1 -0
- package/dist/dropzone.js +81 -0
- package/dist/editor.cjs +1 -0
- package/dist/editor.js +52 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +3230 -0
- package/dist/location.cjs +1 -0
- package/dist/location.js +84 -0
- package/dist/persian-date.cjs +1 -0
- package/dist/persian-date.js +73 -0
- package/dist/style.css +1 -0
- package/dist/tel.cjs +1 -0
- package/dist/tel.js +85 -0
- package/dist/uppy-dashboard.cjs +1 -0
- package/dist/uppy-dashboard.js +31 -0
- package/dist/uppy.cjs +1 -0
- package/dist/uppy.js +4 -0
- package/index.d.ts +50 -30
- package/package.json +101 -17
- package/src/CheckboxToggle.vue +1 -1
- package/src/ComboboxInput.vue +495 -496
- package/src/PasswordInput.vue +124 -123
- package/src/StarRatingInput.vue +1 -1
- package/src/UppyDashboardInput.vue +45 -0
- package/src/UppyInput.vue +36 -3
- package/src/VoiceRecorderInput.vue +660 -0
- package/src/VoiceRecorderResultArea.vue +109 -0
- package/src/composables/useVoiceChannel.js +31 -0
- package/src/entries/country-codes.js +1 -0
- package/src/entries/dropzone.js +1 -0
- package/src/entries/editor.js +1 -0
- package/src/entries/location.js +1 -0
- package/src/entries/persian-date.js +1 -0
- package/src/entries/tel.js +1 -0
- package/src/entries/uppy-dashboard.js +1 -0
- package/src/entries/uppy.js +1 -0
- package/src/index.js +6 -19
- package/types/country-codes.d.ts +1 -0
- package/types/dropzone.d.ts +2 -0
- package/types/editor.d.ts +2 -0
- package/types/location.d.ts +2 -0
- package/types/persian-date.d.ts +2 -0
- package/types/tel.d.ts +2 -0
- package/types/uppy-dashboard.d.ts +12 -0
- package/types/uppy.d.ts +10 -0
- package/dist/inertia-bootstrap-forms.cjs.js +0 -1
- package/dist/inertia-bootstrap-forms.es.js +0 -3536
- package/src/RangeSliderInput.vue +0 -103
- package/src/Select2Input.vue +0 -251
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { reactive as d, computed as m, onBeforeUnmount as h } from "vue";
|
|
2
|
+
const r = d({
|
|
3
|
+
locale: "auto",
|
|
4
|
+
messages: {
|
|
5
|
+
en: {
|
|
6
|
+
"select.placeholder": "Select an option…",
|
|
7
|
+
"select.search": "Type to search…",
|
|
8
|
+
"select.noResults": "No results found",
|
|
9
|
+
"select.loading": "Searching…",
|
|
10
|
+
"select.selectedCount": "{count} selected",
|
|
11
|
+
"select.clear": "— Clear selection —",
|
|
12
|
+
"select.error": "Search failed",
|
|
13
|
+
"submit.default": "Submit",
|
|
14
|
+
"chips.placeholder": "Type and press Enter…",
|
|
15
|
+
"chips.remove": "Remove",
|
|
16
|
+
"email.placeholder": "Enter your email",
|
|
17
|
+
"password.placeholder": "Enter your password",
|
|
18
|
+
"password.show": "Show password",
|
|
19
|
+
"password.hide": "Hide password",
|
|
20
|
+
"mobile.placeholder": "Enter your mobile number",
|
|
21
|
+
"amount.placeholder": "Enter a number",
|
|
22
|
+
"amount.unit": "pcs",
|
|
23
|
+
"quantity.unit": "pcs",
|
|
24
|
+
"quantity.increase": "Increase",
|
|
25
|
+
"quantity.decrease": "Decrease",
|
|
26
|
+
"captcha.placeholder": "Enter the code shown",
|
|
27
|
+
"captcha.refresh": "Refresh code",
|
|
28
|
+
"captcha.alt": "captcha",
|
|
29
|
+
"file.retry": "Retry",
|
|
30
|
+
"file.remove": "Remove",
|
|
31
|
+
"upload.failed": "Upload failed",
|
|
32
|
+
"uppy.types": "Only {types} files",
|
|
33
|
+
"uppy.maxFiles": "up to {count} files",
|
|
34
|
+
"uppy.minFiles": "at least {count} files required",
|
|
35
|
+
"uppy.maxSize": "max {size} per file",
|
|
36
|
+
"uppy.minSize": "min {size} per file",
|
|
37
|
+
"uppy.maxTotal": "max {size} in total",
|
|
38
|
+
"uppy.suffix": "are allowed."
|
|
39
|
+
},
|
|
40
|
+
fa: {
|
|
41
|
+
"select.placeholder": "انتخاب کنید…",
|
|
42
|
+
"select.search": "برای جستجو تایپ کنید…",
|
|
43
|
+
"select.noResults": "نتیجهای یافت نشد",
|
|
44
|
+
"select.loading": "در حال جستجو…",
|
|
45
|
+
"select.selectedCount": "{count} مورد انتخاب شده",
|
|
46
|
+
"select.clear": "— پاک کردن انتخاب —",
|
|
47
|
+
"select.error": "جستجو با خطا مواجه شد",
|
|
48
|
+
"submit.default": "تایید و ثبت اطلاعات",
|
|
49
|
+
"chips.placeholder": "تایپ کنید و Enter بزنید…",
|
|
50
|
+
"chips.remove": "حذف",
|
|
51
|
+
"email.placeholder": "ایمیل خود را وارد کنید",
|
|
52
|
+
"password.placeholder": "گذرواژه خود را وارد کنید",
|
|
53
|
+
"password.show": "نمایش گذرواژه",
|
|
54
|
+
"password.hide": "مخفی کردن گذرواژه",
|
|
55
|
+
"mobile.placeholder": "موبایل خود را وارد کنید",
|
|
56
|
+
"amount.placeholder": "عدد را وارد کنید",
|
|
57
|
+
"amount.unit": "عدد",
|
|
58
|
+
"quantity.unit": "عدد",
|
|
59
|
+
"quantity.increase": "افزایش",
|
|
60
|
+
"quantity.decrease": "کاهش",
|
|
61
|
+
"captcha.placeholder": "کد امنیتی روبرو را وارد کنید",
|
|
62
|
+
"captcha.refresh": "کد جدید",
|
|
63
|
+
"captcha.alt": "کد امنیتی",
|
|
64
|
+
"file.retry": "تلاش مجدد",
|
|
65
|
+
"file.remove": "حذف",
|
|
66
|
+
"upload.failed": "خطا در آپلود",
|
|
67
|
+
"uppy.types": "فقط فایلهای {types}",
|
|
68
|
+
"uppy.maxFiles": "امکان انتخاب حداکثر {count} فایل",
|
|
69
|
+
"uppy.minFiles": "حداقل {count} فایل نیاز است",
|
|
70
|
+
"uppy.maxSize": "با حداکثر حجم {size} برای هر فایل",
|
|
71
|
+
"uppy.minSize": "با حداقل حجم {size} برای هر فایل",
|
|
72
|
+
"uppy.maxTotal": "و مجموع حجم کل حداکثر {size}",
|
|
73
|
+
"uppy.suffix": "مجاز است."
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
function w({ locale: s, messages: e } = {}) {
|
|
78
|
+
s && (r.locale = s), e && Object.keys(e).forEach((a) => {
|
|
79
|
+
r.messages[a] = { ...r.messages[a] || {}, ...e[a] };
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function f() {
|
|
83
|
+
var s;
|
|
84
|
+
if (typeof document < "u") {
|
|
85
|
+
const e = document.documentElement;
|
|
86
|
+
if ((e == null ? void 0 : e.dir) === "rtl" || (s = e == null ? void 0 : e.getAttribute("lang")) != null && s.startsWith("fa")) return "fa";
|
|
87
|
+
}
|
|
88
|
+
return "en";
|
|
89
|
+
}
|
|
90
|
+
function b(s = () => null) {
|
|
91
|
+
const e = m(() => {
|
|
92
|
+
const o = s() || r.locale;
|
|
93
|
+
return o === "auto" ? f() : o;
|
|
94
|
+
});
|
|
95
|
+
return { t: (o, i = {}) => {
|
|
96
|
+
let n = (r.messages[e.value] || r.messages.en)[o] ?? r.messages.en[o] ?? o;
|
|
97
|
+
return Object.keys(i).forEach((t) => {
|
|
98
|
+
n = n.replace(new RegExp(`\\{${t}\\}`, "g"), i[t]);
|
|
99
|
+
}), n;
|
|
100
|
+
}, locale: e };
|
|
101
|
+
}
|
|
102
|
+
function E() {
|
|
103
|
+
const s = [];
|
|
104
|
+
let e = !1;
|
|
105
|
+
const a = (t) => {
|
|
106
|
+
if (e) {
|
|
107
|
+
try {
|
|
108
|
+
t();
|
|
109
|
+
} catch {
|
|
110
|
+
}
|
|
111
|
+
return () => {
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return s.push(t), () => {
|
|
115
|
+
const c = s.indexOf(t);
|
|
116
|
+
c !== -1 && s.splice(c, 1);
|
|
117
|
+
};
|
|
118
|
+
}, o = (t, c, l, p) => t ? (t.addEventListener(c, l, p), a(() => t.removeEventListener(c, l, p))) : () => {
|
|
119
|
+
}, i = (t, c) => {
|
|
120
|
+
const l = setTimeout(t, c);
|
|
121
|
+
return a(() => clearTimeout(l)), l;
|
|
122
|
+
}, u = () => {
|
|
123
|
+
const t = new AbortController();
|
|
124
|
+
return a(() => t.abort()), t;
|
|
125
|
+
}, n = () => {
|
|
126
|
+
for (e = !0; s.length; )
|
|
127
|
+
try {
|
|
128
|
+
s.pop()();
|
|
129
|
+
} catch {
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
return h(n), {
|
|
133
|
+
add: a,
|
|
134
|
+
listen: o,
|
|
135
|
+
timeout: i,
|
|
136
|
+
abortable: u,
|
|
137
|
+
dispose: n,
|
|
138
|
+
isDisposed: () => e
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function x(s = {}) {
|
|
142
|
+
const e = {
|
|
143
|
+
Accept: "application/json",
|
|
144
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
145
|
+
...s
|
|
146
|
+
};
|
|
147
|
+
if (typeof document < "u") {
|
|
148
|
+
const a = document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]+)/);
|
|
149
|
+
a && !e["X-XSRF-TOKEN"] && (e["X-XSRF-TOKEN"] = decodeURIComponent(a[1]));
|
|
150
|
+
}
|
|
151
|
+
return e;
|
|
152
|
+
}
|
|
153
|
+
export {
|
|
154
|
+
E as a,
|
|
155
|
+
w as c,
|
|
156
|
+
x as l,
|
|
157
|
+
b as u
|
|
158
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=[{country:"Afghanistan",code:"93",iso:"AF"},{country:"Albania",code:"355",iso:"AL"},{country:"Algeria",code:"213",iso:"DZ"},{country:"American Samoa",code:"1-684",iso:"AS"},{country:"Andorra",code:"376",iso:"AD"},{country:"Angola",code:"244",iso:"AO"},{country:"Anguilla",code:"1-264",iso:"AI"},{country:"Antarctica",code:"672",iso:"AQ"},{country:"Antigua and Barbuda",code:"1-268",iso:"AG"},{country:"Argentina",code:"54",iso:"AR"},{country:"Armenia",code:"374",iso:"AM"},{country:"Aruba",code:"297",iso:"AW"},{country:"Australia",code:"61",iso:"AU"},{country:"Austria",code:"43",iso:"AT"},{country:"Azerbaijan",code:"994",iso:"AZ"},{country:"Bahamas",code:"1-242",iso:"BS"},{country:"Bahrain",code:"973",iso:"BH"},{country:"Bangladesh",code:"880",iso:"BD"},{country:"Barbados",code:"1-246",iso:"BB"},{country:"Belarus",code:"375",iso:"BY"},{country:"Belgium",code:"32",iso:"BE"},{country:"Belize",code:"501",iso:"BZ"},{country:"Benin",code:"229",iso:"BJ"},{country:"Bermuda",code:"1-441",iso:"BM"},{country:"Bhutan",code:"975",iso:"BT"},{country:"Bolivia",code:"591",iso:"BO"},{country:"Bosnia and Herzegovina",code:"387",iso:"BA"},{country:"Botswana",code:"267",iso:"BW"},{country:"Brazil",code:"55",iso:"BR"},{country:"British Indian Ocean Territory",code:"246",iso:"IO"},{country:"British Virgin Islands",code:"1-284",iso:"VG"},{country:"Brunei",code:"673",iso:"BN"},{country:"Bulgaria",code:"359",iso:"BG"},{country:"Burkina Faso",code:"226",iso:"BF"},{country:"Burundi",code:"257",iso:"BI"},{country:"Cambodia",code:"855",iso:"KH"},{country:"Cameroon",code:"237",iso:"CM"},{country:"Canada",code:"1",iso:"CA"},{country:"Cape Verde",code:"238",iso:"CV"},{country:"Cayman Islands",code:"1-345",iso:"KY"},{country:"Central African Republic",code:"236",iso:"CF"},{country:"Chad",code:"235",iso:"TD"},{country:"Chile",code:"56",iso:"CL"},{country:"China",code:"86",iso:"CN"},{country:"Christmas Island",code:"61",iso:"CX"},{country:"Cocos Islands",code:"61",iso:"CC"},{country:"Colombia",code:"57",iso:"CO"},{country:"Comoros",code:"269",iso:"KM"},{country:"Cook Islands",code:"682",iso:"CK"},{country:"Costa Rica",code:"506",iso:"CR"},{country:"Croatia",code:"385",iso:"HR"},{country:"Cuba",code:"53",iso:"CU"},{country:"Curacao",code:"599",iso:"CW"},{country:"Cyprus",code:"357",iso:"CY"},{country:"Czech Republic",code:"420",iso:"CZ"},{country:"Democratic Republic of the Congo",code:"243",iso:"CD"},{country:"Denmark",code:"45",iso:"DK"},{country:"Djibouti",code:"253",iso:"DJ"},{country:"Dominica",code:"1-767",iso:"DM"},{country:"Dominican Republic",code:"1-809, 1-829, 1-849",iso:"DO"},{country:"East Timor",code:"670",iso:"TL"},{country:"Ecuador",code:"593",iso:"EC"},{country:"Egypt",code:"20",iso:"EG"},{country:"El Salvador",code:"503",iso:"SV"},{country:"Equatorial Guinea",code:"240",iso:"GQ"},{country:"Eritrea",code:"291",iso:"ER"},{country:"Estonia",code:"372",iso:"EE"},{country:"Ethiopia",code:"251",iso:"ET"},{country:"Falkland Islands",code:"500",iso:"FK"},{country:"Faroe Islands",code:"298",iso:"FO"},{country:"Fiji",code:"679",iso:"FJ"},{country:"Finland",code:"358",iso:"FI"},{country:"France",code:"33",iso:"FR"},{country:"French Polynesia",code:"689",iso:"PF"},{country:"Gabon",code:"241",iso:"GA"},{country:"Gambia",code:"220",iso:"GM"},{country:"Georgia",code:"995",iso:"GE"},{country:"Germany",code:"49",iso:"DE"},{country:"Ghana",code:"233",iso:"GH"},{country:"Gibraltar",code:"350",iso:"GI"},{country:"Greece",code:"30",iso:"GR"},{country:"Greenland",code:"299",iso:"GL"},{country:"Grenada",code:"1-473",iso:"GD"},{country:"Guam",code:"1-671",iso:"GU"},{country:"Guatemala",code:"502",iso:"GT"},{country:"Guernsey",code:"44-1481",iso:"GG"},{country:"Guinea",code:"224",iso:"GN"},{country:"Guinea-Bissau",code:"245",iso:"GW"},{country:"Guyana",code:"592",iso:"GY"},{country:"Haiti",code:"509",iso:"HT"},{country:"Honduras",code:"504",iso:"HN"},{country:"Hong Kong",code:"852",iso:"HK"},{country:"Hungary",code:"36",iso:"HU"},{country:"Iceland",code:"354",iso:"IS"},{country:"India",code:"91",iso:"IN"},{country:"Indonesia",code:"62",iso:"ID"},{country:"ایران",code:"98",iso:"IR"},{country:"Iraq",code:"964",iso:"IQ"},{country:"Ireland",code:"353",iso:"IE"},{country:"Isle of Man",code:"44-1624",iso:"IM"},{country:"Israel",code:"972",iso:"IL"},{country:"Italy",code:"39",iso:"IT"},{country:"Ivory Coast",code:"225",iso:"CI"},{country:"Jamaica",code:"1-876",iso:"JM"},{country:"Japan",code:"81",iso:"JP"},{country:"Jersey",code:"44-1534",iso:"JE"},{country:"Jordan",code:"962",iso:"JO"},{country:"Kazakhstan",code:"7",iso:"KZ"},{country:"Kenya",code:"254",iso:"KE"},{country:"Kiribati",code:"686",iso:"KI"},{country:"Kosovo",code:"383",iso:"XK"},{country:"Kuwait",code:"965",iso:"KW"},{country:"Kyrgyzstan",code:"996",iso:"KG"},{country:"Laos",code:"856",iso:"LA"},{country:"Latvia",code:"371",iso:"LV"},{country:"Lebanon",code:"961",iso:"LB"},{country:"Lesotho",code:"266",iso:"LS"},{country:"Liberia",code:"231",iso:"LR"},{country:"Libya",code:"218",iso:"LY"},{country:"Liechtenstein",code:"423",iso:"LI"},{country:"Lithuania",code:"370",iso:"LT"},{country:"Luxembourg",code:"352",iso:"LU"},{country:"Macao",code:"853",iso:"MO"},{country:"Macedonia",code:"389",iso:"MK"},{country:"Madagascar",code:"261",iso:"MG"},{country:"Malawi",code:"265",iso:"MW"},{country:"Malaysia",code:"60",iso:"MY"},{country:"Maldives",code:"960",iso:"MV"},{country:"Mali",code:"223",iso:"ML"},{country:"Malta",code:"356",iso:"MT"},{country:"Marshall Islands",code:"692",iso:"MH"},{country:"Mauritania",code:"222",iso:"MR"},{country:"Mauritius",code:"230",iso:"MU"},{country:"Mayotte",code:"262",iso:"YT"},{country:"Mexico",code:"52",iso:"MX"},{country:"Micronesia",code:"691",iso:"FM"},{country:"Moldova",code:"373",iso:"MD"},{country:"Monaco",code:"377",iso:"MC"},{country:"Mongolia",code:"976",iso:"MN"},{country:"Montenegro",code:"382",iso:"ME"},{country:"Montserrat",code:"1-664",iso:"MS"},{country:"Morocco",code:"212",iso:"MA"},{country:"Mozambique",code:"258",iso:"MZ"},{country:"Myanmar",code:"95",iso:"MM"},{country:"Namibia",code:"264",iso:"NA"},{country:"Nauru",code:"674",iso:"NR"},{country:"Nepal",code:"977",iso:"NP"},{country:"Netherlands",code:"31",iso:"NL"},{country:"Netherlands Antilles",code:"599",iso:"AN"},{country:"New Caledonia",code:"687",iso:"NC"},{country:"New Zealand",code:"64",iso:"NZ"},{country:"Nicaragua",code:"505",iso:"NI"},{country:"Niger",code:"227",iso:"NE"},{country:"Nigeria",code:"234",iso:"NG"},{country:"Niue",code:"683",iso:"NU"},{country:"North Korea",code:"850",iso:"KP"},{country:"Northern Mariana Islands",code:"1-670",iso:"MP"},{country:"Norway",code:"47",iso:"NO"},{country:"Oman",code:"968",iso:"OM"},{country:"Pakistan",code:"92",iso:"PK"},{country:"Palau",code:"680",iso:"PW"},{country:"Palestine",code:"970",iso:"PS"},{country:"Panama",code:"507",iso:"PA"},{country:"Papua New Guinea",code:"675",iso:"PG"},{country:"Paraguay",code:"595",iso:"PY"},{country:"Peru",code:"51",iso:"PE"},{country:"Philippines",code:"63",iso:"PH"},{country:"Pitcairn",code:"64",iso:"PN"},{country:"Poland",code:"48",iso:"PL"},{country:"Portugal",code:"351",iso:"PT"},{country:"Puerto Rico",code:"1-787, 1-939",iso:"PR"},{country:"Qatar",code:"974",iso:"QA"},{country:"Republic of the Congo",code:"242",iso:"CG"},{country:"Reunion",code:"262",iso:"RE"},{country:"Romania",code:"40",iso:"RO"},{country:"Russia",code:"7",iso:"RU"},{country:"Rwanda",code:"250",iso:"RW"},{country:"Saint Barthelemy",code:"590",iso:"BL"},{country:"Saint Helena",code:"290",iso:"SH"},{country:"Saint Kitts and Nevis",code:"1-869",iso:"KN"},{country:"Saint Lucia",code:"1-758",iso:"LC"},{country:"Saint Martin",code:"590",iso:"MF"},{country:"Saint Pierre and Miquelon",code:"508",iso:"PM"},{country:"Saint Vincent and the Grenadines",code:"1-784",iso:"VC"},{country:"Samoa",code:"685",iso:"WS"},{country:"San Marino",code:"378",iso:"SM"},{country:"Sao Tome and Principe",code:"239",iso:"ST"},{country:"Saudi Arabia",code:"966",iso:"SA"},{country:"Senegal",code:"221",iso:"SN"},{country:"Serbia",code:"381",iso:"RS"},{country:"Seychelles",code:"248",iso:"SC"},{country:"Sierra Leone",code:"232",iso:"SL"},{country:"Singapore",code:"65",iso:"SG"},{country:"Sint Maarten",code:"1-721",iso:"SX"},{country:"Slovakia",code:"421",iso:"SK"},{country:"Slovenia",code:"386",iso:"SI"},{country:"Solomon Islands",code:"677",iso:"SB"},{country:"Somalia",code:"252",iso:"SO"},{country:"South Africa",code:"27",iso:"ZA"},{country:"South Korea",code:"82",iso:"KR"},{country:"South Sudan",code:"211",iso:"SS"},{country:"Spain",code:"34",iso:"ES"},{country:"Sri Lanka",code:"94",iso:"LK"},{country:"Sudan",code:"249",iso:"SD"},{country:"Suriname",code:"597",iso:"SR"},{country:"Svalbard and Jan Mayen",code:"47",iso:"SJ"},{country:"Swaziland",code:"268",iso:"SZ"},{country:"Sweden",code:"46",iso:"SE"},{country:"Switzerland",code:"41",iso:"CH"},{country:"Syria",code:"963",iso:"SY"},{country:"Taiwan",code:"886",iso:"TW"},{country:"Tajikistan",code:"992",iso:"TJ"},{country:"Tanzania",code:"255",iso:"TZ"},{country:"Thailand",code:"66",iso:"TH"},{country:"Togo",code:"228",iso:"TG"},{country:"Tokelau",code:"690",iso:"TK"},{country:"Tonga",code:"676",iso:"TO"},{country:"Trinidad and Tobago",code:"1-868",iso:"TT"},{country:"Tunisia",code:"216",iso:"TN"},{country:"Turkey",code:"90",iso:"TR"},{country:"Turkmenistan",code:"993",iso:"TM"},{country:"Turks and Caicos Islands",code:"1-649",iso:"TC"},{country:"Tuvalu",code:"688",iso:"TV"},{country:"U.S. Virgin Islands",code:"1-340",iso:"VI"},{country:"Uganda",code:"256",iso:"UG"},{country:"Ukraine",code:"380",iso:"UA"},{country:"United Arab Emirates",code:"971",iso:"AE"},{country:"United Kingdom",code:"44",iso:"GB"},{country:"United States",code:"1",iso:"US"},{country:"Uruguay",code:"598",iso:"UY"},{country:"Uzbekistan",code:"998",iso:"UZ"},{country:"Vanuatu",code:"678",iso:"VU"},{country:"Vatican",code:"379",iso:"VA"},{country:"Venezuela",code:"58",iso:"VE"},{country:"Vietnam",code:"84",iso:"VN"},{country:"Wallis and Futuna",code:"681",iso:"WF"},{country:"Western Sahara",code:"212",iso:"EH"},{country:"Yemen",code:"967",iso:"YE"},{country:"Zambia",code:"260",iso:"ZM"},{country:"Zimbabwe",code:"263",iso:"ZW"}];exports.countryCodes=o;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
const o = [
|
|
2
|
+
{ country: "Afghanistan", code: "93", iso: "AF" },
|
|
3
|
+
{ country: "Albania", code: "355", iso: "AL" },
|
|
4
|
+
{ country: "Algeria", code: "213", iso: "DZ" },
|
|
5
|
+
{ country: "American Samoa", code: "1-684", iso: "AS" },
|
|
6
|
+
{ country: "Andorra", code: "376", iso: "AD" },
|
|
7
|
+
{ country: "Angola", code: "244", iso: "AO" },
|
|
8
|
+
{ country: "Anguilla", code: "1-264", iso: "AI" },
|
|
9
|
+
{ country: "Antarctica", code: "672", iso: "AQ" },
|
|
10
|
+
{ country: "Antigua and Barbuda", code: "1-268", iso: "AG" },
|
|
11
|
+
{ country: "Argentina", code: "54", iso: "AR" },
|
|
12
|
+
{ country: "Armenia", code: "374", iso: "AM" },
|
|
13
|
+
{ country: "Aruba", code: "297", iso: "AW" },
|
|
14
|
+
{ country: "Australia", code: "61", iso: "AU" },
|
|
15
|
+
{ country: "Austria", code: "43", iso: "AT" },
|
|
16
|
+
{ country: "Azerbaijan", code: "994", iso: "AZ" },
|
|
17
|
+
{ country: "Bahamas", code: "1-242", iso: "BS" },
|
|
18
|
+
{ country: "Bahrain", code: "973", iso: "BH" },
|
|
19
|
+
{ country: "Bangladesh", code: "880", iso: "BD" },
|
|
20
|
+
{ country: "Barbados", code: "1-246", iso: "BB" },
|
|
21
|
+
{ country: "Belarus", code: "375", iso: "BY" },
|
|
22
|
+
{ country: "Belgium", code: "32", iso: "BE" },
|
|
23
|
+
{ country: "Belize", code: "501", iso: "BZ" },
|
|
24
|
+
{ country: "Benin", code: "229", iso: "BJ" },
|
|
25
|
+
{ country: "Bermuda", code: "1-441", iso: "BM" },
|
|
26
|
+
{ country: "Bhutan", code: "975", iso: "BT" },
|
|
27
|
+
{ country: "Bolivia", code: "591", iso: "BO" },
|
|
28
|
+
{ country: "Bosnia and Herzegovina", code: "387", iso: "BA" },
|
|
29
|
+
{ country: "Botswana", code: "267", iso: "BW" },
|
|
30
|
+
{ country: "Brazil", code: "55", iso: "BR" },
|
|
31
|
+
{ country: "British Indian Ocean Territory", code: "246", iso: "IO" },
|
|
32
|
+
{ country: "British Virgin Islands", code: "1-284", iso: "VG" },
|
|
33
|
+
{ country: "Brunei", code: "673", iso: "BN" },
|
|
34
|
+
{ country: "Bulgaria", code: "359", iso: "BG" },
|
|
35
|
+
{ country: "Burkina Faso", code: "226", iso: "BF" },
|
|
36
|
+
{ country: "Burundi", code: "257", iso: "BI" },
|
|
37
|
+
{ country: "Cambodia", code: "855", iso: "KH" },
|
|
38
|
+
{ country: "Cameroon", code: "237", iso: "CM" },
|
|
39
|
+
{ country: "Canada", code: "1", iso: "CA" },
|
|
40
|
+
{ country: "Cape Verde", code: "238", iso: "CV" },
|
|
41
|
+
{ country: "Cayman Islands", code: "1-345", iso: "KY" },
|
|
42
|
+
{ country: "Central African Republic", code: "236", iso: "CF" },
|
|
43
|
+
{ country: "Chad", code: "235", iso: "TD" },
|
|
44
|
+
{ country: "Chile", code: "56", iso: "CL" },
|
|
45
|
+
{ country: "China", code: "86", iso: "CN" },
|
|
46
|
+
{ country: "Christmas Island", code: "61", iso: "CX" },
|
|
47
|
+
{ country: "Cocos Islands", code: "61", iso: "CC" },
|
|
48
|
+
{ country: "Colombia", code: "57", iso: "CO" },
|
|
49
|
+
{ country: "Comoros", code: "269", iso: "KM" },
|
|
50
|
+
{ country: "Cook Islands", code: "682", iso: "CK" },
|
|
51
|
+
{ country: "Costa Rica", code: "506", iso: "CR" },
|
|
52
|
+
{ country: "Croatia", code: "385", iso: "HR" },
|
|
53
|
+
{ country: "Cuba", code: "53", iso: "CU" },
|
|
54
|
+
{ country: "Curacao", code: "599", iso: "CW" },
|
|
55
|
+
{ country: "Cyprus", code: "357", iso: "CY" },
|
|
56
|
+
{ country: "Czech Republic", code: "420", iso: "CZ" },
|
|
57
|
+
{ country: "Democratic Republic of the Congo", code: "243", iso: "CD" },
|
|
58
|
+
{ country: "Denmark", code: "45", iso: "DK" },
|
|
59
|
+
{ country: "Djibouti", code: "253", iso: "DJ" },
|
|
60
|
+
{ country: "Dominica", code: "1-767", iso: "DM" },
|
|
61
|
+
{ country: "Dominican Republic", code: "1-809, 1-829, 1-849", iso: "DO" },
|
|
62
|
+
{ country: "East Timor", code: "670", iso: "TL" },
|
|
63
|
+
{ country: "Ecuador", code: "593", iso: "EC" },
|
|
64
|
+
{ country: "Egypt", code: "20", iso: "EG" },
|
|
65
|
+
{ country: "El Salvador", code: "503", iso: "SV" },
|
|
66
|
+
{ country: "Equatorial Guinea", code: "240", iso: "GQ" },
|
|
67
|
+
{ country: "Eritrea", code: "291", iso: "ER" },
|
|
68
|
+
{ country: "Estonia", code: "372", iso: "EE" },
|
|
69
|
+
{ country: "Ethiopia", code: "251", iso: "ET" },
|
|
70
|
+
{ country: "Falkland Islands", code: "500", iso: "FK" },
|
|
71
|
+
{ country: "Faroe Islands", code: "298", iso: "FO" },
|
|
72
|
+
{ country: "Fiji", code: "679", iso: "FJ" },
|
|
73
|
+
{ country: "Finland", code: "358", iso: "FI" },
|
|
74
|
+
{ country: "France", code: "33", iso: "FR" },
|
|
75
|
+
{ country: "French Polynesia", code: "689", iso: "PF" },
|
|
76
|
+
{ country: "Gabon", code: "241", iso: "GA" },
|
|
77
|
+
{ country: "Gambia", code: "220", iso: "GM" },
|
|
78
|
+
{ country: "Georgia", code: "995", iso: "GE" },
|
|
79
|
+
{ country: "Germany", code: "49", iso: "DE" },
|
|
80
|
+
{ country: "Ghana", code: "233", iso: "GH" },
|
|
81
|
+
{ country: "Gibraltar", code: "350", iso: "GI" },
|
|
82
|
+
{ country: "Greece", code: "30", iso: "GR" },
|
|
83
|
+
{ country: "Greenland", code: "299", iso: "GL" },
|
|
84
|
+
{ country: "Grenada", code: "1-473", iso: "GD" },
|
|
85
|
+
{ country: "Guam", code: "1-671", iso: "GU" },
|
|
86
|
+
{ country: "Guatemala", code: "502", iso: "GT" },
|
|
87
|
+
{ country: "Guernsey", code: "44-1481", iso: "GG" },
|
|
88
|
+
{ country: "Guinea", code: "224", iso: "GN" },
|
|
89
|
+
{ country: "Guinea-Bissau", code: "245", iso: "GW" },
|
|
90
|
+
{ country: "Guyana", code: "592", iso: "GY" },
|
|
91
|
+
{ country: "Haiti", code: "509", iso: "HT" },
|
|
92
|
+
{ country: "Honduras", code: "504", iso: "HN" },
|
|
93
|
+
{ country: "Hong Kong", code: "852", iso: "HK" },
|
|
94
|
+
{ country: "Hungary", code: "36", iso: "HU" },
|
|
95
|
+
{ country: "Iceland", code: "354", iso: "IS" },
|
|
96
|
+
{ country: "India", code: "91", iso: "IN" },
|
|
97
|
+
{ country: "Indonesia", code: "62", iso: "ID" },
|
|
98
|
+
{ country: "ایران", code: "98", iso: "IR" },
|
|
99
|
+
{ country: "Iraq", code: "964", iso: "IQ" },
|
|
100
|
+
{ country: "Ireland", code: "353", iso: "IE" },
|
|
101
|
+
{ country: "Isle of Man", code: "44-1624", iso: "IM" },
|
|
102
|
+
{ country: "Israel", code: "972", iso: "IL" },
|
|
103
|
+
{ country: "Italy", code: "39", iso: "IT" },
|
|
104
|
+
{ country: "Ivory Coast", code: "225", iso: "CI" },
|
|
105
|
+
{ country: "Jamaica", code: "1-876", iso: "JM" },
|
|
106
|
+
{ country: "Japan", code: "81", iso: "JP" },
|
|
107
|
+
{ country: "Jersey", code: "44-1534", iso: "JE" },
|
|
108
|
+
{ country: "Jordan", code: "962", iso: "JO" },
|
|
109
|
+
{ country: "Kazakhstan", code: "7", iso: "KZ" },
|
|
110
|
+
{ country: "Kenya", code: "254", iso: "KE" },
|
|
111
|
+
{ country: "Kiribati", code: "686", iso: "KI" },
|
|
112
|
+
{ country: "Kosovo", code: "383", iso: "XK" },
|
|
113
|
+
{ country: "Kuwait", code: "965", iso: "KW" },
|
|
114
|
+
{ country: "Kyrgyzstan", code: "996", iso: "KG" },
|
|
115
|
+
{ country: "Laos", code: "856", iso: "LA" },
|
|
116
|
+
{ country: "Latvia", code: "371", iso: "LV" },
|
|
117
|
+
{ country: "Lebanon", code: "961", iso: "LB" },
|
|
118
|
+
{ country: "Lesotho", code: "266", iso: "LS" },
|
|
119
|
+
{ country: "Liberia", code: "231", iso: "LR" },
|
|
120
|
+
{ country: "Libya", code: "218", iso: "LY" },
|
|
121
|
+
{ country: "Liechtenstein", code: "423", iso: "LI" },
|
|
122
|
+
{ country: "Lithuania", code: "370", iso: "LT" },
|
|
123
|
+
{ country: "Luxembourg", code: "352", iso: "LU" },
|
|
124
|
+
{ country: "Macao", code: "853", iso: "MO" },
|
|
125
|
+
{ country: "Macedonia", code: "389", iso: "MK" },
|
|
126
|
+
{ country: "Madagascar", code: "261", iso: "MG" },
|
|
127
|
+
{ country: "Malawi", code: "265", iso: "MW" },
|
|
128
|
+
{ country: "Malaysia", code: "60", iso: "MY" },
|
|
129
|
+
{ country: "Maldives", code: "960", iso: "MV" },
|
|
130
|
+
{ country: "Mali", code: "223", iso: "ML" },
|
|
131
|
+
{ country: "Malta", code: "356", iso: "MT" },
|
|
132
|
+
{ country: "Marshall Islands", code: "692", iso: "MH" },
|
|
133
|
+
{ country: "Mauritania", code: "222", iso: "MR" },
|
|
134
|
+
{ country: "Mauritius", code: "230", iso: "MU" },
|
|
135
|
+
{ country: "Mayotte", code: "262", iso: "YT" },
|
|
136
|
+
{ country: "Mexico", code: "52", iso: "MX" },
|
|
137
|
+
{ country: "Micronesia", code: "691", iso: "FM" },
|
|
138
|
+
{ country: "Moldova", code: "373", iso: "MD" },
|
|
139
|
+
{ country: "Monaco", code: "377", iso: "MC" },
|
|
140
|
+
{ country: "Mongolia", code: "976", iso: "MN" },
|
|
141
|
+
{ country: "Montenegro", code: "382", iso: "ME" },
|
|
142
|
+
{ country: "Montserrat", code: "1-664", iso: "MS" },
|
|
143
|
+
{ country: "Morocco", code: "212", iso: "MA" },
|
|
144
|
+
{ country: "Mozambique", code: "258", iso: "MZ" },
|
|
145
|
+
{ country: "Myanmar", code: "95", iso: "MM" },
|
|
146
|
+
{ country: "Namibia", code: "264", iso: "NA" },
|
|
147
|
+
{ country: "Nauru", code: "674", iso: "NR" },
|
|
148
|
+
{ country: "Nepal", code: "977", iso: "NP" },
|
|
149
|
+
{ country: "Netherlands", code: "31", iso: "NL" },
|
|
150
|
+
{ country: "Netherlands Antilles", code: "599", iso: "AN" },
|
|
151
|
+
{ country: "New Caledonia", code: "687", iso: "NC" },
|
|
152
|
+
{ country: "New Zealand", code: "64", iso: "NZ" },
|
|
153
|
+
{ country: "Nicaragua", code: "505", iso: "NI" },
|
|
154
|
+
{ country: "Niger", code: "227", iso: "NE" },
|
|
155
|
+
{ country: "Nigeria", code: "234", iso: "NG" },
|
|
156
|
+
{ country: "Niue", code: "683", iso: "NU" },
|
|
157
|
+
{ country: "North Korea", code: "850", iso: "KP" },
|
|
158
|
+
{ country: "Northern Mariana Islands", code: "1-670", iso: "MP" },
|
|
159
|
+
{ country: "Norway", code: "47", iso: "NO" },
|
|
160
|
+
{ country: "Oman", code: "968", iso: "OM" },
|
|
161
|
+
{ country: "Pakistan", code: "92", iso: "PK" },
|
|
162
|
+
{ country: "Palau", code: "680", iso: "PW" },
|
|
163
|
+
{ country: "Palestine", code: "970", iso: "PS" },
|
|
164
|
+
{ country: "Panama", code: "507", iso: "PA" },
|
|
165
|
+
{ country: "Papua New Guinea", code: "675", iso: "PG" },
|
|
166
|
+
{ country: "Paraguay", code: "595", iso: "PY" },
|
|
167
|
+
{ country: "Peru", code: "51", iso: "PE" },
|
|
168
|
+
{ country: "Philippines", code: "63", iso: "PH" },
|
|
169
|
+
{ country: "Pitcairn", code: "64", iso: "PN" },
|
|
170
|
+
{ country: "Poland", code: "48", iso: "PL" },
|
|
171
|
+
{ country: "Portugal", code: "351", iso: "PT" },
|
|
172
|
+
{ country: "Puerto Rico", code: "1-787, 1-939", iso: "PR" },
|
|
173
|
+
{ country: "Qatar", code: "974", iso: "QA" },
|
|
174
|
+
{ country: "Republic of the Congo", code: "242", iso: "CG" },
|
|
175
|
+
{ country: "Reunion", code: "262", iso: "RE" },
|
|
176
|
+
{ country: "Romania", code: "40", iso: "RO" },
|
|
177
|
+
{ country: "Russia", code: "7", iso: "RU" },
|
|
178
|
+
{ country: "Rwanda", code: "250", iso: "RW" },
|
|
179
|
+
{ country: "Saint Barthelemy", code: "590", iso: "BL" },
|
|
180
|
+
{ country: "Saint Helena", code: "290", iso: "SH" },
|
|
181
|
+
{ country: "Saint Kitts and Nevis", code: "1-869", iso: "KN" },
|
|
182
|
+
{ country: "Saint Lucia", code: "1-758", iso: "LC" },
|
|
183
|
+
{ country: "Saint Martin", code: "590", iso: "MF" },
|
|
184
|
+
{ country: "Saint Pierre and Miquelon", code: "508", iso: "PM" },
|
|
185
|
+
{ country: "Saint Vincent and the Grenadines", code: "1-784", iso: "VC" },
|
|
186
|
+
{ country: "Samoa", code: "685", iso: "WS" },
|
|
187
|
+
{ country: "San Marino", code: "378", iso: "SM" },
|
|
188
|
+
{ country: "Sao Tome and Principe", code: "239", iso: "ST" },
|
|
189
|
+
{ country: "Saudi Arabia", code: "966", iso: "SA" },
|
|
190
|
+
{ country: "Senegal", code: "221", iso: "SN" },
|
|
191
|
+
{ country: "Serbia", code: "381", iso: "RS" },
|
|
192
|
+
{ country: "Seychelles", code: "248", iso: "SC" },
|
|
193
|
+
{ country: "Sierra Leone", code: "232", iso: "SL" },
|
|
194
|
+
{ country: "Singapore", code: "65", iso: "SG" },
|
|
195
|
+
{ country: "Sint Maarten", code: "1-721", iso: "SX" },
|
|
196
|
+
{ country: "Slovakia", code: "421", iso: "SK" },
|
|
197
|
+
{ country: "Slovenia", code: "386", iso: "SI" },
|
|
198
|
+
{ country: "Solomon Islands", code: "677", iso: "SB" },
|
|
199
|
+
{ country: "Somalia", code: "252", iso: "SO" },
|
|
200
|
+
{ country: "South Africa", code: "27", iso: "ZA" },
|
|
201
|
+
{ country: "South Korea", code: "82", iso: "KR" },
|
|
202
|
+
{ country: "South Sudan", code: "211", iso: "SS" },
|
|
203
|
+
{ country: "Spain", code: "34", iso: "ES" },
|
|
204
|
+
{ country: "Sri Lanka", code: "94", iso: "LK" },
|
|
205
|
+
{ country: "Sudan", code: "249", iso: "SD" },
|
|
206
|
+
{ country: "Suriname", code: "597", iso: "SR" },
|
|
207
|
+
{ country: "Svalbard and Jan Mayen", code: "47", iso: "SJ" },
|
|
208
|
+
{ country: "Swaziland", code: "268", iso: "SZ" },
|
|
209
|
+
{ country: "Sweden", code: "46", iso: "SE" },
|
|
210
|
+
{ country: "Switzerland", code: "41", iso: "CH" },
|
|
211
|
+
{ country: "Syria", code: "963", iso: "SY" },
|
|
212
|
+
{ country: "Taiwan", code: "886", iso: "TW" },
|
|
213
|
+
{ country: "Tajikistan", code: "992", iso: "TJ" },
|
|
214
|
+
{ country: "Tanzania", code: "255", iso: "TZ" },
|
|
215
|
+
{ country: "Thailand", code: "66", iso: "TH" },
|
|
216
|
+
{ country: "Togo", code: "228", iso: "TG" },
|
|
217
|
+
{ country: "Tokelau", code: "690", iso: "TK" },
|
|
218
|
+
{ country: "Tonga", code: "676", iso: "TO" },
|
|
219
|
+
{ country: "Trinidad and Tobago", code: "1-868", iso: "TT" },
|
|
220
|
+
{ country: "Tunisia", code: "216", iso: "TN" },
|
|
221
|
+
{ country: "Turkey", code: "90", iso: "TR" },
|
|
222
|
+
{ country: "Turkmenistan", code: "993", iso: "TM" },
|
|
223
|
+
{ country: "Turks and Caicos Islands", code: "1-649", iso: "TC" },
|
|
224
|
+
{ country: "Tuvalu", code: "688", iso: "TV" },
|
|
225
|
+
{ country: "U.S. Virgin Islands", code: "1-340", iso: "VI" },
|
|
226
|
+
{ country: "Uganda", code: "256", iso: "UG" },
|
|
227
|
+
{ country: "Ukraine", code: "380", iso: "UA" },
|
|
228
|
+
{ country: "United Arab Emirates", code: "971", iso: "AE" },
|
|
229
|
+
{ country: "United Kingdom", code: "44", iso: "GB" },
|
|
230
|
+
{ country: "United States", code: "1", iso: "US" },
|
|
231
|
+
{ country: "Uruguay", code: "598", iso: "UY" },
|
|
232
|
+
{ country: "Uzbekistan", code: "998", iso: "UZ" },
|
|
233
|
+
{ country: "Vanuatu", code: "678", iso: "VU" },
|
|
234
|
+
{ country: "Vatican", code: "379", iso: "VA" },
|
|
235
|
+
{ country: "Venezuela", code: "58", iso: "VE" },
|
|
236
|
+
{ country: "Vietnam", code: "84", iso: "VN" },
|
|
237
|
+
{ country: "Wallis and Futuna", code: "681", iso: "WF" },
|
|
238
|
+
{ country: "Western Sahara", code: "212", iso: "EH" },
|
|
239
|
+
{ country: "Yemen", code: "967", iso: "YE" },
|
|
240
|
+
{ country: "Zambia", code: "260", iso: "ZM" },
|
|
241
|
+
{ country: "Zimbabwe", code: "263", iso: "ZW" }
|
|
242
|
+
];
|
|
243
|
+
export {
|
|
244
|
+
o as countryCodes
|
|
245
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var b=Object.create;var D=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var E=(e,l,d,r)=>{if(l&&typeof l=="object"||typeof l=="function")for(let u of C(l))!A.call(e,u)&&u!==d&&D(e,u,{get:()=>l[u],enumerable:!(r=z(l,u))||r.enumerable});return e};var I=(e,l,d)=>(d=e!=null?b(w(e)):{},E(l||!e||!e.__esModule?D(d,"default",{value:e,enumerable:!0}):d,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("vue"),v=require("./chunks/_plugin-vue_export-helper-BHyUve4F.cjs"),f=require("./chunks/http-CDPNmbjF.cjs"),S=m.defineComponent({name:"DropzoneInput",emits:["update:modelValue","change","ready","added","success","error","removed","complete"],props:{...v.fieldProps,multiple:{type:Boolean,default:!1},url:{type:String,default:"/upload"},options:{type:Object,default:()=>({})},headers:{type:Object,default:()=>({})},locale:{type:String,default:null}},setup(e,{emit:l,expose:d}){const r=v.useField(e,l),{t:u}=f.useI18n(()=>e.locale),y=f.useDisposables(),h=m.ref(null);let a=null,p=!1;const g=()=>Array.isArray(r.model.value)?r.model.value:[];return m.onMounted(async()=>{const{default:i}=await import("dropzone");y.isDisposed()||!h.value||(i.autoDiscover=!1,a=new i(h.value,{url:e.url,addRemoveLinks:!0,maxFiles:e.multiple?null:1,headers:f.laravelHeaders(e.headers),...e.options}),a.on("addedfile",o=>l("added",o)),a.on("complete",o=>l("complete",o)),a.on("error",(o,t)=>{var c,_;let n=u("upload.failed");typeof t=="string"&&(n=t),t!=null&&t.message&&(n=t.message),(c=o.previewElement)==null||c.classList.add("dz-error");const s=(_=o.previewElement)==null?void 0:_.querySelector("[data-dz-errormessage]");s&&(s.textContent=n),l("error",o,n)}),a.on("success",(o,t)=>{const n=(t==null?void 0:t.data)??t;r.model.value=e.multiple?[...g(),n]:n,r.emitChange(r.model.value),l("success",o,n)}),a.on("removedfile",async o=>{var n;if(l("removed",o),p)return;let t=(n=o.xhr)==null?void 0:n.response;if(t)try{t=JSON.parse(t);const s=t.data??t;r.model.value=e.multiple?g().filter(c=>((c==null?void 0:c.path)??c)!==s.path):null,r.emitChange(r.model.value),await fetch(e.url,{method:"DELETE",headers:f.laravelHeaders({"Content-Type":"application/json",...e.headers}),credentials:"same-origin",body:s.path})}catch(s){console.error("[inertia-bootstrap-forms] Could not delete the uploaded file on the server",s)}}),y.add(()=>{p=!0;try{a==null||a.destroy()}catch{}a=null}),l("ready",a))}),m.watch(()=>r.model.value,i=>{var t;(i==null||i===""||Array.isArray(i)&&!i.length)&&((t=a==null?void 0:a.files)!=null&&t.length)&&(p=!0,a.removeAllFiles(!0),p=!1)}),d({dropzone:()=>a}),{...r,el:h}}}),j=["id"];function q(e,l,d,r,u,y){return m.openBlock(),m.createElementBlock("div",{ref:"el",class:m.normalizeClass(["inertia-dropzone-input dropzone",{"is-invalid":e.isInvalid}]),id:e.inputId},null,10,j)}const x=v._export_sfc(S,[["render",q]]);exports.DropzoneInput=x;
|
package/dist/dropzone.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { defineComponent as g, createElementBlock as _, openBlock as C, normalizeClass as D, ref as w, onMounted as z, watch as A } from "vue";
|
|
2
|
+
import { _ as E, f as b, u as I } from "./chunks/_plugin-vue_export-helper-13TPlHFF.js";
|
|
3
|
+
import { u as x, a as S, l as v } from "./chunks/http-DV3dRBe5.js";
|
|
4
|
+
const $ = g({
|
|
5
|
+
name: "DropzoneInput",
|
|
6
|
+
emits: ["update:modelValue", "change", "ready", "added", "success", "error", "removed", "complete"],
|
|
7
|
+
props: {
|
|
8
|
+
...b,
|
|
9
|
+
multiple: { type: Boolean, default: !1 },
|
|
10
|
+
url: { type: String, default: "/upload" },
|
|
11
|
+
/** Dropzone options (merged over the defaults). */
|
|
12
|
+
options: { type: Object, default: () => ({}) },
|
|
13
|
+
headers: { type: Object, default: () => ({}) },
|
|
14
|
+
locale: { type: String, default: null }
|
|
15
|
+
},
|
|
16
|
+
setup(l, { emit: n, expose: f }) {
|
|
17
|
+
const o = I(l, n), { t: p } = x(() => l.locale), c = S(), m = w(null);
|
|
18
|
+
let t = null, i = !1;
|
|
19
|
+
const h = () => Array.isArray(o.model.value) ? o.model.value : [];
|
|
20
|
+
return z(async () => {
|
|
21
|
+
const { default: d } = await import("dropzone");
|
|
22
|
+
c.isDisposed() || !m.value || (d.autoDiscover = !1, t = new d(m.value, {
|
|
23
|
+
url: l.url,
|
|
24
|
+
addRemoveLinks: !0,
|
|
25
|
+
maxFiles: l.multiple ? null : 1,
|
|
26
|
+
headers: v(l.headers),
|
|
27
|
+
...l.options
|
|
28
|
+
}), t.on("addedfile", (a) => n("added", a)), t.on("complete", (a) => n("complete", a)), t.on("error", (a, e) => {
|
|
29
|
+
var u, y;
|
|
30
|
+
let r = p("upload.failed");
|
|
31
|
+
typeof e == "string" && (r = e), e != null && e.message && (r = e.message), (u = a.previewElement) == null || u.classList.add("dz-error");
|
|
32
|
+
const s = (y = a.previewElement) == null ? void 0 : y.querySelector("[data-dz-errormessage]");
|
|
33
|
+
s && (s.textContent = r), n("error", a, r);
|
|
34
|
+
}), t.on("success", (a, e) => {
|
|
35
|
+
const r = (e == null ? void 0 : e.data) ?? e;
|
|
36
|
+
o.model.value = l.multiple ? [...h(), r] : r, o.emitChange(o.model.value), n("success", a, r);
|
|
37
|
+
}), t.on("removedfile", async (a) => {
|
|
38
|
+
var r;
|
|
39
|
+
if (n("removed", a), i) return;
|
|
40
|
+
let e = (r = a.xhr) == null ? void 0 : r.response;
|
|
41
|
+
if (e)
|
|
42
|
+
try {
|
|
43
|
+
e = JSON.parse(e);
|
|
44
|
+
const s = e.data ?? e;
|
|
45
|
+
o.model.value = l.multiple ? h().filter((u) => ((u == null ? void 0 : u.path) ?? u) !== s.path) : null, o.emitChange(o.model.value), await fetch(l.url, {
|
|
46
|
+
method: "DELETE",
|
|
47
|
+
headers: v({ "Content-Type": "application/json", ...l.headers }),
|
|
48
|
+
credentials: "same-origin",
|
|
49
|
+
body: s.path
|
|
50
|
+
});
|
|
51
|
+
} catch (s) {
|
|
52
|
+
console.error("[inertia-bootstrap-forms] Could not delete the uploaded file on the server", s);
|
|
53
|
+
}
|
|
54
|
+
}), c.add(() => {
|
|
55
|
+
i = !0;
|
|
56
|
+
try {
|
|
57
|
+
t == null || t.destroy();
|
|
58
|
+
} catch {
|
|
59
|
+
}
|
|
60
|
+
t = null;
|
|
61
|
+
}), n("ready", t));
|
|
62
|
+
}), A(
|
|
63
|
+
() => o.model.value,
|
|
64
|
+
(d) => {
|
|
65
|
+
var e;
|
|
66
|
+
(d == null || d === "" || Array.isArray(d) && !d.length) && ((e = t == null ? void 0 : t.files) != null && e.length) && (i = !0, t.removeAllFiles(!0), i = !1);
|
|
67
|
+
}
|
|
68
|
+
), f({ dropzone: () => t }), { ...o, el: m };
|
|
69
|
+
}
|
|
70
|
+
}), j = ["id"];
|
|
71
|
+
function k(l, n, f, o, p, c) {
|
|
72
|
+
return C(), _("div", {
|
|
73
|
+
ref: "el",
|
|
74
|
+
class: D(["inertia-dropzone-input dropzone", { "is-invalid": l.isInvalid }]),
|
|
75
|
+
id: l.inputId
|
|
76
|
+
}, null, 10, j);
|
|
77
|
+
}
|
|
78
|
+
const O = /* @__PURE__ */ E($, [["render", k]]);
|
|
79
|
+
export {
|
|
80
|
+
O as DropzoneInput
|
|
81
|
+
};
|
package/dist/editor.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var m=Object.create;var a=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var b=(e,n,o,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of f(n))!c.call(e,t)&&t!==o&&a(e,t,{get:()=>n[t],enumerable:!(l=y(n,t))||l.enumerable});return e};var S=(e,n,o)=>(o=e!=null?m(g(e)):{},b(n||!e||!e.__esModule?a(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("vue"),s=require("./chunks/_plugin-vue_export-helper-BHyUve4F.cjs"),h=d.defineAsyncComponent(()=>import("@tinymce/tinymce-vue")),v=d.defineComponent({name:"EditorInput",components:{Editor:h},emits:["update:modelValue","change","init","focus","blur"],props:{...s.fieldProps,placeholder:{type:String,default:""},options:{type:Object,default:()=>({})},height:{type:[Number,String],default:null},tinymceScriptSrc:{type:String,default:null},apiKey:{type:String,default:null}},setup(e,{emit:n,expose:o}){const l=s.useField(e,n),t=d.ref(null);function p(u,i){var r;t.value=i,(r=i.mode)==null||r.set(l.isDisabled.value||e.readonly?"readonly":"design"),n("init",i)}return d.watch(()=>l.isDisabled.value||e.readonly,u=>{var i,r;return(r=(i=t.value)==null?void 0:i.mode)==null?void 0:r.set(u?"readonly":"design")}),o({editor:()=>t.value}),{...l,onInit:p}}});function I(e,n,o,l,t,p){const u=d.resolveComponent("Editor");return d.openBlock(),d.createBlock(u,{modelValue:e.model,"onUpdate:modelValue":n[0]||(n[0]=i=>e.model=i),id:e.inputId,disabled:e.isDisabled||e.readonly,"tinymce-script-src":e.tinymceScriptSrc||void 0,"api-key":e.apiKey||void 0,init:{placeholder:e.placeholder,...e.height?{height:e.height}:{},...e.options},class:"tiny-editor-input-el",onInit:e.onInit,onChange:n[1]||(n[1]=i=>e.emitChange(e.model,i)),onFocus:n[2]||(n[2]=i=>e.$emit("focus",i)),onBlur:n[3]||(n[3]=i=>e.$emit("blur",i))},null,8,["modelValue","id","disabled","tinymce-script-src","api-key","init","onInit"])}const E=s._export_sfc(v,[["render",I]]);exports.EditorInput=E;
|
package/dist/editor.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent as u, resolveComponent as a, createBlock as p, openBlock as m, defineAsyncComponent as f, ref as y, watch as g } from "vue";
|
|
2
|
+
import { _ as c, f as b, u as h } from "./chunks/_plugin-vue_export-helper-13TPlHFF.js";
|
|
3
|
+
const S = f(() => import("@tinymce/tinymce-vue")), v = u({
|
|
4
|
+
name: "EditorInput",
|
|
5
|
+
components: { Editor: S },
|
|
6
|
+
emits: ["update:modelValue", "change", "init", "focus", "blur"],
|
|
7
|
+
props: {
|
|
8
|
+
...b,
|
|
9
|
+
placeholder: { type: String, default: "" },
|
|
10
|
+
/** TinyMCE `init` options. */
|
|
11
|
+
options: { type: Object, default: () => ({}) },
|
|
12
|
+
height: { type: [Number, String], default: null },
|
|
13
|
+
/** Self-hosted TinyMCE script (`tinymceScriptSrc`) or Tiny Cloud api key. */
|
|
14
|
+
tinymceScriptSrc: { type: String, default: null },
|
|
15
|
+
apiKey: { type: String, default: null }
|
|
16
|
+
},
|
|
17
|
+
setup(e, { emit: i, expose: r }) {
|
|
18
|
+
const t = h(e, i), l = y(null);
|
|
19
|
+
function s(d, n) {
|
|
20
|
+
var o;
|
|
21
|
+
l.value = n, (o = n.mode) == null || o.set(t.isDisabled.value || e.readonly ? "readonly" : "design"), i("init", n);
|
|
22
|
+
}
|
|
23
|
+
return g(
|
|
24
|
+
() => t.isDisabled.value || e.readonly,
|
|
25
|
+
(d) => {
|
|
26
|
+
var n, o;
|
|
27
|
+
return (o = (n = l.value) == null ? void 0 : n.mode) == null ? void 0 : o.set(d ? "readonly" : "design");
|
|
28
|
+
}
|
|
29
|
+
), r({ editor: () => l.value }), { ...t, onInit: s };
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
function I(e, i, r, t, l, s) {
|
|
33
|
+
const d = a("Editor");
|
|
34
|
+
return m(), p(d, {
|
|
35
|
+
modelValue: e.model,
|
|
36
|
+
"onUpdate:modelValue": i[0] || (i[0] = (n) => e.model = n),
|
|
37
|
+
id: e.inputId,
|
|
38
|
+
disabled: e.isDisabled || e.readonly,
|
|
39
|
+
"tinymce-script-src": e.tinymceScriptSrc || void 0,
|
|
40
|
+
"api-key": e.apiKey || void 0,
|
|
41
|
+
init: { placeholder: e.placeholder, ...e.height ? { height: e.height } : {}, ...e.options },
|
|
42
|
+
class: "tiny-editor-input-el",
|
|
43
|
+
onInit: e.onInit,
|
|
44
|
+
onChange: i[1] || (i[1] = (n) => e.emitChange(e.model, n)),
|
|
45
|
+
onFocus: i[2] || (i[2] = (n) => e.$emit("focus", n)),
|
|
46
|
+
onBlur: i[3] || (i[3] = (n) => e.$emit("blur", n))
|
|
47
|
+
}, null, 8, ["modelValue", "id", "disabled", "tinymce-script-src", "api-key", "init", "onInit"]);
|
|
48
|
+
}
|
|
49
|
+
const E = /* @__PURE__ */ c(v, [["render", I]]);
|
|
50
|
+
export {
|
|
51
|
+
E as EditorInput
|
|
52
|
+
};
|