@soroka282/migrant.ui-kit 0.0.71 → 0.0.72
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/capacitor.config.example.ts +59 -0
- package/dist/{List-B_0nmv3s.js → List-b0OFoaNM.js} +1 -1
- package/dist/index-BwKENOPu.js +332 -0
- package/dist/{index-CfRguWoq.js → index-CoXUGbZ8.js} +1272 -1228
- package/dist/migrant.ui-kit.es.js +2 -2
- package/dist/migrant.ui-kit.umd.js +14 -14
- package/package.json +12 -2
- package/src/components/UI-kit/modal/IONIC_INTEGRATION.md +386 -0
- package/src/components/UI-kit/modal/UIModal.vue +136 -8
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CapacitorConfig } from '@capacitor/cli';
|
|
2
|
+
|
|
3
|
+
const config: CapacitorConfig = {
|
|
4
|
+
appId: 'com.sir.app',
|
|
5
|
+
appName: 'SIR',
|
|
6
|
+
webDir: 'dist',
|
|
7
|
+
|
|
8
|
+
plugins: {
|
|
9
|
+
Keyboard: {
|
|
10
|
+
resize: 'none',
|
|
11
|
+
style: 'dark',
|
|
12
|
+
resizeOnFullScreen: true,
|
|
13
|
+
// accessoryBarVisible: false,
|
|
14
|
+
hideKeyboardAccessoryBar: true,
|
|
15
|
+
},
|
|
16
|
+
StatusBar: {
|
|
17
|
+
style: 'dark', // 'dark' или 'light'
|
|
18
|
+
backgroundColor: '#ffffff',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
ios: {
|
|
22
|
+
/**
|
|
23
|
+
* Схема URL для deep linking (если используется)
|
|
24
|
+
*/
|
|
25
|
+
// scheme: 'myapp',
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Дополнительные настройки WebView
|
|
29
|
+
*/
|
|
30
|
+
contentInset: 'automatic',
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Поддержка safe area (notch)
|
|
34
|
+
*/
|
|
35
|
+
// allowsLinkPreview: false,
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Настройки для Android платформы
|
|
40
|
+
*/
|
|
41
|
+
android: {
|
|
42
|
+
/**
|
|
43
|
+
* Режим клавиатуры для Android
|
|
44
|
+
*/
|
|
45
|
+
// buildOptions: {
|
|
46
|
+
// keystorePassword: process.env.ANDROID_KEYSTORE_PASSWORD,
|
|
47
|
+
// },
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Настройки сервера разработки
|
|
52
|
+
*/
|
|
53
|
+
server: {
|
|
54
|
+
// url: 'http://192.168.1.100:5173', // Для тестирования на реальном устройстве
|
|
55
|
+
// cleartext: true,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default config;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as b, ref as p, computed as w, createElementBlock as s, openBlock as o, createCommentVNode as a, createElementVNode as d, createVNode as I, renderSlot as V, createBlock as B, resolveDynamicComponent as L, Fragment as g, renderList as _, normalizeStyle as m, normalizeClass as N, createTextVNode as F, toDisplayString as f } from "vue";
|
|
2
|
-
import { u as T, U, _ as $ } from "./index-
|
|
2
|
+
import { u as T, U, _ as $ } from "./index-CoXUGbZ8.js";
|
|
3
3
|
const z = { class: "select-list" }, A = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "search-wrapper"
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
/*! Capacitor: https://capacitorjs.com/ - MIT License */
|
|
2
|
+
var L;
|
|
3
|
+
(function(r) {
|
|
4
|
+
r.Unimplemented = "UNIMPLEMENTED", r.Unavailable = "UNAVAILABLE";
|
|
5
|
+
})(L || (L = {}));
|
|
6
|
+
class x extends Error {
|
|
7
|
+
constructor(e, t, i) {
|
|
8
|
+
super(e), this.message = e, this.code = t, this.data = i;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const q = (r) => {
|
|
12
|
+
var e, t;
|
|
13
|
+
return r != null && r.androidBridge ? "android" : !((t = (e = r == null ? void 0 : r.webkit) === null || e === void 0 ? void 0 : e.messageHandlers) === null || t === void 0) && t.bridge ? "ios" : "web";
|
|
14
|
+
}, B = (r) => {
|
|
15
|
+
const e = r.CapacitorCustomPlatform || null, t = r.Capacitor || {}, i = t.Plugins = t.Plugins || {}, s = () => e !== null ? e.name : q(r), n = () => s() !== "web", a = (o) => {
|
|
16
|
+
const c = w.get(o);
|
|
17
|
+
return !!(c != null && c.platforms.has(s()) || d(o));
|
|
18
|
+
}, d = (o) => {
|
|
19
|
+
var c;
|
|
20
|
+
return (c = t.PluginHeaders) === null || c === void 0 ? void 0 : c.find((E) => E.name === o);
|
|
21
|
+
}, u = (o) => r.console.error(o), w = /* @__PURE__ */ new Map(), P = (o, c = {}) => {
|
|
22
|
+
const E = w.get(o);
|
|
23
|
+
if (E)
|
|
24
|
+
return console.warn(`Capacitor plugin "${o}" already registered. Cannot register plugins twice.`), E.proxy;
|
|
25
|
+
const v = s(), p = d(o);
|
|
26
|
+
let b;
|
|
27
|
+
const W = async () => (!b && v in c ? b = typeof c[v] == "function" ? b = await c[v]() : b = c[v] : e !== null && !b && "web" in c && (b = typeof c.web == "function" ? b = await c.web() : b = c.web), b), I = (l, f) => {
|
|
28
|
+
var g, y;
|
|
29
|
+
if (p) {
|
|
30
|
+
const m = p == null ? void 0 : p.methods.find((h) => f === h.name);
|
|
31
|
+
if (m)
|
|
32
|
+
return m.rtype === "promise" ? (h) => t.nativePromise(o, f.toString(), h) : (h, C) => t.nativeCallback(o, f.toString(), h, C);
|
|
33
|
+
if (l)
|
|
34
|
+
return (g = l[f]) === null || g === void 0 ? void 0 : g.bind(l);
|
|
35
|
+
} else {
|
|
36
|
+
if (l)
|
|
37
|
+
return (y = l[f]) === null || y === void 0 ? void 0 : y.bind(l);
|
|
38
|
+
throw new x(`"${o}" plugin is not implemented on ${v}`, L.Unimplemented);
|
|
39
|
+
}
|
|
40
|
+
}, O = (l) => {
|
|
41
|
+
let f;
|
|
42
|
+
const g = (...y) => {
|
|
43
|
+
const m = W().then((h) => {
|
|
44
|
+
const C = I(h, l);
|
|
45
|
+
if (C) {
|
|
46
|
+
const k = C(...y);
|
|
47
|
+
return f = k == null ? void 0 : k.remove, k;
|
|
48
|
+
} else
|
|
49
|
+
throw new x(`"${o}.${l}()" is not implemented on ${v}`, L.Unimplemented);
|
|
50
|
+
});
|
|
51
|
+
return l === "addListener" && (m.remove = async () => f()), m;
|
|
52
|
+
};
|
|
53
|
+
return g.toString = () => `${l.toString()}() { [capacitor code] }`, Object.defineProperty(g, "name", {
|
|
54
|
+
value: l,
|
|
55
|
+
writable: !1,
|
|
56
|
+
configurable: !1
|
|
57
|
+
}), g;
|
|
58
|
+
}, j = O("addListener"), T = O("removeListener"), _ = (l, f) => {
|
|
59
|
+
const g = j({ eventName: l }, f), y = async () => {
|
|
60
|
+
const h = await g;
|
|
61
|
+
T({
|
|
62
|
+
eventName: l,
|
|
63
|
+
callbackId: h
|
|
64
|
+
}, f);
|
|
65
|
+
}, m = new Promise((h) => g.then(() => h({ remove: y })));
|
|
66
|
+
return m.remove = async () => {
|
|
67
|
+
console.warn("Using addListener() without 'await' is deprecated."), await y();
|
|
68
|
+
}, m;
|
|
69
|
+
}, $ = new Proxy({}, {
|
|
70
|
+
get(l, f) {
|
|
71
|
+
switch (f) {
|
|
72
|
+
case "$$typeof":
|
|
73
|
+
return;
|
|
74
|
+
case "toJSON":
|
|
75
|
+
return () => ({});
|
|
76
|
+
case "addListener":
|
|
77
|
+
return p ? _ : j;
|
|
78
|
+
case "removeListener":
|
|
79
|
+
return T;
|
|
80
|
+
default:
|
|
81
|
+
return O(f);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
return i[o] = $, w.set(o, {
|
|
86
|
+
name: o,
|
|
87
|
+
proxy: $,
|
|
88
|
+
platforms: /* @__PURE__ */ new Set([...Object.keys(c), ...p ? [v] : []])
|
|
89
|
+
}), $;
|
|
90
|
+
};
|
|
91
|
+
return t.convertFileSrc || (t.convertFileSrc = (o) => o), t.getPlatform = s, t.handleError = u, t.isNativePlatform = n, t.isPluginAvailable = a, t.registerPlugin = P, t.Exception = x, t.DEBUG = !!t.DEBUG, t.isLoggingEnabled = !!t.isLoggingEnabled, t;
|
|
92
|
+
}, M = (r) => r.Capacitor = B(r), A = /* @__PURE__ */ M(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {}), U = A.registerPlugin;
|
|
93
|
+
class R {
|
|
94
|
+
constructor() {
|
|
95
|
+
this.listeners = {}, this.retainedEventArguments = {}, this.windowListeners = {};
|
|
96
|
+
}
|
|
97
|
+
addListener(e, t) {
|
|
98
|
+
let i = !1;
|
|
99
|
+
this.listeners[e] || (this.listeners[e] = [], i = !0), this.listeners[e].push(t);
|
|
100
|
+
const n = this.windowListeners[e];
|
|
101
|
+
n && !n.registered && this.addWindowListener(n), i && this.sendRetainedArgumentsForEvent(e);
|
|
102
|
+
const a = async () => this.removeListener(e, t);
|
|
103
|
+
return Promise.resolve({ remove: a });
|
|
104
|
+
}
|
|
105
|
+
async removeAllListeners() {
|
|
106
|
+
this.listeners = {};
|
|
107
|
+
for (const e in this.windowListeners)
|
|
108
|
+
this.removeWindowListener(this.windowListeners[e]);
|
|
109
|
+
this.windowListeners = {};
|
|
110
|
+
}
|
|
111
|
+
notifyListeners(e, t, i) {
|
|
112
|
+
const s = this.listeners[e];
|
|
113
|
+
if (!s) {
|
|
114
|
+
if (i) {
|
|
115
|
+
let n = this.retainedEventArguments[e];
|
|
116
|
+
n || (n = []), n.push(t), this.retainedEventArguments[e] = n;
|
|
117
|
+
}
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
s.forEach((n) => n(t));
|
|
121
|
+
}
|
|
122
|
+
hasListeners(e) {
|
|
123
|
+
var t;
|
|
124
|
+
return !!(!((t = this.listeners[e]) === null || t === void 0) && t.length);
|
|
125
|
+
}
|
|
126
|
+
registerWindowListener(e, t) {
|
|
127
|
+
this.windowListeners[t] = {
|
|
128
|
+
registered: !1,
|
|
129
|
+
windowEventName: e,
|
|
130
|
+
pluginEventName: t,
|
|
131
|
+
handler: (i) => {
|
|
132
|
+
this.notifyListeners(t, i);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
unimplemented(e = "not implemented") {
|
|
137
|
+
return new A.Exception(e, L.Unimplemented);
|
|
138
|
+
}
|
|
139
|
+
unavailable(e = "not available") {
|
|
140
|
+
return new A.Exception(e, L.Unavailable);
|
|
141
|
+
}
|
|
142
|
+
async removeListener(e, t) {
|
|
143
|
+
const i = this.listeners[e];
|
|
144
|
+
if (!i)
|
|
145
|
+
return;
|
|
146
|
+
const s = i.indexOf(t);
|
|
147
|
+
this.listeners[e].splice(s, 1), this.listeners[e].length || this.removeWindowListener(this.windowListeners[e]);
|
|
148
|
+
}
|
|
149
|
+
addWindowListener(e) {
|
|
150
|
+
window.addEventListener(e.windowEventName, e.handler), e.registered = !0;
|
|
151
|
+
}
|
|
152
|
+
removeWindowListener(e) {
|
|
153
|
+
e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
|
|
154
|
+
}
|
|
155
|
+
sendRetainedArgumentsForEvent(e) {
|
|
156
|
+
const t = this.retainedEventArguments[e];
|
|
157
|
+
t && (delete this.retainedEventArguments[e], t.forEach((i) => {
|
|
158
|
+
this.notifyListeners(e, i);
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
const D = (r) => encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), S = (r) => r.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
163
|
+
class G extends R {
|
|
164
|
+
async getCookies() {
|
|
165
|
+
const e = document.cookie, t = {};
|
|
166
|
+
return e.split(";").forEach((i) => {
|
|
167
|
+
if (i.length <= 0)
|
|
168
|
+
return;
|
|
169
|
+
let [s, n] = i.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
|
|
170
|
+
s = S(s).trim(), n = S(n).trim(), t[s] = n;
|
|
171
|
+
}), t;
|
|
172
|
+
}
|
|
173
|
+
async setCookie(e) {
|
|
174
|
+
try {
|
|
175
|
+
const t = D(e.key), i = D(e.value), s = `; expires=${(e.expires || "").replace("expires=", "")}`, n = (e.path || "/").replace("path=", ""), a = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
|
|
176
|
+
document.cookie = `${t}=${i || ""}${s}; path=${n}; ${a};`;
|
|
177
|
+
} catch (t) {
|
|
178
|
+
return Promise.reject(t);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
async deleteCookie(e) {
|
|
182
|
+
try {
|
|
183
|
+
document.cookie = `${e.key}=; Max-Age=0`;
|
|
184
|
+
} catch (t) {
|
|
185
|
+
return Promise.reject(t);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
async clearCookies() {
|
|
189
|
+
try {
|
|
190
|
+
const e = document.cookie.split(";") || [];
|
|
191
|
+
for (const t of e)
|
|
192
|
+
document.cookie = t.replace(/^ +/, "").replace(/=.*/, `=;expires=${(/* @__PURE__ */ new Date()).toUTCString()};path=/`);
|
|
193
|
+
} catch (e) {
|
|
194
|
+
return Promise.reject(e);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
async clearAllCookies() {
|
|
198
|
+
try {
|
|
199
|
+
await this.clearCookies();
|
|
200
|
+
} catch (e) {
|
|
201
|
+
return Promise.reject(e);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
U("CapacitorCookies", {
|
|
206
|
+
web: () => new G()
|
|
207
|
+
});
|
|
208
|
+
const K = async (r) => new Promise((e, t) => {
|
|
209
|
+
const i = new FileReader();
|
|
210
|
+
i.onload = () => {
|
|
211
|
+
const s = i.result;
|
|
212
|
+
e(s.indexOf(",") >= 0 ? s.split(",")[1] : s);
|
|
213
|
+
}, i.onerror = (s) => t(s), i.readAsDataURL(r);
|
|
214
|
+
}), V = (r = {}) => {
|
|
215
|
+
const e = Object.keys(r);
|
|
216
|
+
return Object.keys(r).map((s) => s.toLocaleLowerCase()).reduce((s, n, a) => (s[n] = r[e[a]], s), {});
|
|
217
|
+
}, J = (r, e = !0) => r ? Object.entries(r).reduce((i, s) => {
|
|
218
|
+
const [n, a] = s;
|
|
219
|
+
let d, u;
|
|
220
|
+
return Array.isArray(a) ? (u = "", a.forEach((w) => {
|
|
221
|
+
d = e ? encodeURIComponent(w) : w, u += `${n}=${d}&`;
|
|
222
|
+
}), u.slice(0, -1)) : (d = e ? encodeURIComponent(a) : a, u = `${n}=${d}`), `${i}&${u}`;
|
|
223
|
+
}, "").substr(1) : null, z = (r, e = {}) => {
|
|
224
|
+
const t = Object.assign({ method: r.method || "GET", headers: r.headers }, e), s = V(r.headers)["content-type"] || "";
|
|
225
|
+
if (typeof r.data == "string")
|
|
226
|
+
t.body = r.data;
|
|
227
|
+
else if (s.includes("application/x-www-form-urlencoded")) {
|
|
228
|
+
const n = new URLSearchParams();
|
|
229
|
+
for (const [a, d] of Object.entries(r.data || {}))
|
|
230
|
+
n.set(a, d);
|
|
231
|
+
t.body = n.toString();
|
|
232
|
+
} else if (s.includes("multipart/form-data") || r.data instanceof FormData) {
|
|
233
|
+
const n = new FormData();
|
|
234
|
+
if (r.data instanceof FormData)
|
|
235
|
+
r.data.forEach((d, u) => {
|
|
236
|
+
n.append(u, d);
|
|
237
|
+
});
|
|
238
|
+
else
|
|
239
|
+
for (const d of Object.keys(r.data))
|
|
240
|
+
n.append(d, r.data[d]);
|
|
241
|
+
t.body = n;
|
|
242
|
+
const a = new Headers(t.headers);
|
|
243
|
+
a.delete("content-type"), t.headers = a;
|
|
244
|
+
} else (s.includes("application/json") || typeof r.data == "object") && (t.body = JSON.stringify(r.data));
|
|
245
|
+
return t;
|
|
246
|
+
};
|
|
247
|
+
class Q extends R {
|
|
248
|
+
/**
|
|
249
|
+
* Perform an Http request given a set of options
|
|
250
|
+
* @param options Options to build the HTTP request
|
|
251
|
+
*/
|
|
252
|
+
async request(e) {
|
|
253
|
+
const t = z(e, e.webFetchExtra), i = J(e.params, e.shouldEncodeUrlParams), s = i ? `${e.url}?${i}` : e.url, n = await fetch(s, t), a = n.headers.get("content-type") || "";
|
|
254
|
+
let { responseType: d = "text" } = n.ok ? e : {};
|
|
255
|
+
a.includes("application/json") && (d = "json");
|
|
256
|
+
let u, w;
|
|
257
|
+
switch (d) {
|
|
258
|
+
case "arraybuffer":
|
|
259
|
+
case "blob":
|
|
260
|
+
w = await n.blob(), u = await K(w);
|
|
261
|
+
break;
|
|
262
|
+
case "json":
|
|
263
|
+
u = await n.json();
|
|
264
|
+
break;
|
|
265
|
+
case "document":
|
|
266
|
+
case "text":
|
|
267
|
+
default:
|
|
268
|
+
u = await n.text();
|
|
269
|
+
}
|
|
270
|
+
const P = {};
|
|
271
|
+
return n.headers.forEach((o, c) => {
|
|
272
|
+
P[c] = o;
|
|
273
|
+
}), {
|
|
274
|
+
data: u,
|
|
275
|
+
headers: P,
|
|
276
|
+
status: n.status,
|
|
277
|
+
url: n.url
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Perform an Http GET request given a set of options
|
|
282
|
+
* @param options Options to build the HTTP request
|
|
283
|
+
*/
|
|
284
|
+
async get(e) {
|
|
285
|
+
return this.request(Object.assign(Object.assign({}, e), { method: "GET" }));
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Perform an Http POST request given a set of options
|
|
289
|
+
* @param options Options to build the HTTP request
|
|
290
|
+
*/
|
|
291
|
+
async post(e) {
|
|
292
|
+
return this.request(Object.assign(Object.assign({}, e), { method: "POST" }));
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Perform an Http PUT request given a set of options
|
|
296
|
+
* @param options Options to build the HTTP request
|
|
297
|
+
*/
|
|
298
|
+
async put(e) {
|
|
299
|
+
return this.request(Object.assign(Object.assign({}, e), { method: "PUT" }));
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Perform an Http PATCH request given a set of options
|
|
303
|
+
* @param options Options to build the HTTP request
|
|
304
|
+
*/
|
|
305
|
+
async patch(e) {
|
|
306
|
+
return this.request(Object.assign(Object.assign({}, e), { method: "PATCH" }));
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Perform an Http DELETE request given a set of options
|
|
310
|
+
* @param options Options to build the HTTP request
|
|
311
|
+
*/
|
|
312
|
+
async delete(e) {
|
|
313
|
+
return this.request(Object.assign(Object.assign({}, e), { method: "DELETE" }));
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
U("CapacitorHttp", {
|
|
317
|
+
web: () => new Q()
|
|
318
|
+
});
|
|
319
|
+
var H;
|
|
320
|
+
(function(r) {
|
|
321
|
+
r.Dark = "DARK", r.Light = "LIGHT", r.Default = "DEFAULT";
|
|
322
|
+
})(H || (H = {}));
|
|
323
|
+
var F;
|
|
324
|
+
(function(r) {
|
|
325
|
+
r.Body = "body", r.Ionic = "ionic", r.Native = "native", r.None = "none";
|
|
326
|
+
})(F || (F = {}));
|
|
327
|
+
const X = U("Keyboard");
|
|
328
|
+
export {
|
|
329
|
+
X as Keyboard,
|
|
330
|
+
F as KeyboardResize,
|
|
331
|
+
H as KeyboardStyle
|
|
332
|
+
};
|