vue-spear-tip 0.1.21 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/.vite/manifest.json +37 -13
  2. package/dist/Button-CnxLmWuM.cjs +1 -0
  3. package/dist/{Button-B5JC_Z3M.js → Button-jDTW2utE.js} +6 -6
  4. package/dist/CodeHighlight-Byhxopeg.cjs +12 -0
  5. package/dist/CodeHighlight-cRYe58WO.js +44042 -0
  6. package/dist/DateField-DFWnFHty.cjs +18 -0
  7. package/dist/DateField-DeypzFPh.js +1779 -0
  8. package/dist/Interfaces/IGlobalComponent.d.ts +7 -0
  9. package/dist/{SelectField-CqIgEXt0.cjs → SelectField-CA-d5mIM.cjs} +1 -1
  10. package/dist/{SelectField-C-W06YsI.js → SelectField-O0_v8Hhl.js} +1 -1
  11. package/dist/StringField-Dyt_6I3b.cjs +1 -0
  12. package/dist/StringField-GNYdeEY4.js +59 -0
  13. package/dist/components/CodeHighlight/index.d.ts +2 -0
  14. package/dist/components/Documentation/Guides/guides.routes.d.ts +10 -0
  15. package/dist/components/Documentation/Kit/kit.routes.d.ts +10 -0
  16. package/dist/components/Documentation/router.d.ts +19 -0
  17. package/dist/components/Fields/DateField/index.d.ts +2 -0
  18. package/dist/components/LazyComponents.d.ts +3 -1
  19. package/dist/core/DT.d.ts +9 -0
  20. package/dist/core/EventManager.d.ts +24 -0
  21. package/dist/grid-style.css +1 -1
  22. package/dist/index-6ckmdr4W.cjs +1 -0
  23. package/dist/index-DqCea3It.js +4564 -0
  24. package/dist/index.d.ts +2 -1
  25. package/dist/kit/fields/index.d.ts +2 -1
  26. package/dist/replaceable/BaseComponent.vue +2 -5
  27. package/dist/vue-spear-tip.cjs.js +1 -1
  28. package/dist/vue-spear-tip.css +1 -1
  29. package/dist/vue-spear-tip.es.js +13 -11
  30. package/docs/index.html +2 -2
  31. package/docs/static/Button-BYNjxbzy.css +1 -0
  32. package/docs/static/Button-Cj0SWlj9.js +1 -0
  33. package/docs/static/CodeHighlight-BcUKYHid.js +12 -0
  34. package/docs/static/CodeHighlight-CGrGqjhz.css +1 -0
  35. package/docs/static/DateField-BdXIy9u5.js +18 -0
  36. package/docs/static/DateField-C4W5EEHZ.css +1 -0
  37. package/docs/static/{FieldComponent.vue_vue_type_script_lang-BwrX41LK.js → FieldComponent.vue_vue_type_script_lang-C74Z2qOx.js} +1 -1
  38. package/docs/static/{SelectField-C32fQ45_.css → SelectField-CM692gdJ.css} +1 -1
  39. package/docs/static/{SelectField-BEvxlKuY.js → SelectField-DyuIqNre.js} +4 -4
  40. package/docs/static/StringField-B__pgc9Z.css +1 -0
  41. package/docs/static/StringField-BapMRab1.js +1 -0
  42. package/docs/static/index-BYmsfhJF.js +2 -0
  43. package/docs/static/index-BZRwTK7V.js +2 -0
  44. package/docs/static/index-BlpLaTnO.js +2 -0
  45. package/docs/static/index-C-tYF7fp.js +2 -0
  46. package/docs/static/index-j64A2orD.js +2 -0
  47. package/docs/static/main-DHQAnZD9.js +98 -0
  48. package/docs/static/main-TZcMwf9S.css +1 -0
  49. package/package.json +10 -6
  50. package/dist/Button-BM4dbkA-.cjs +0 -1
  51. package/dist/StringField-CxzFR0Xg.cjs +0 -1
  52. package/dist/StringField-hh1z2GxL.js +0 -55
  53. package/dist/index-BlANuvIl.js +0 -843
  54. package/dist/index-COcPXtwa.cjs +0 -1
  55. package/docs/static/Button-CW0489RR.js +0 -1
  56. package/docs/static/Button-CtZSeU7e.css +0 -1
  57. package/docs/static/StringField-BHmLwqhr.js +0 -1
  58. package/docs/static/StringField-T9r0UtfP.css +0 -1
  59. package/docs/static/Watch-nc5lWXLk.js +0 -1
  60. package/docs/static/index-DEzBQmYG.js +0 -2
  61. package/docs/static/index-DRymGyyQ.js +0 -2
  62. package/docs/static/index-urSlQnTJ.js +0 -2
  63. package/docs/static/main-brDyF8bF.css +0 -1
  64. package/docs/static/main-d7PKjD0_.js +0 -22
@@ -1,843 +0,0 @@
1
- var D = Object.defineProperty;
2
- var a = (s, t) => D(s, "name", { value: t, configurable: !0 });
3
- import { defineComponent as U, nextTick as F, getCurrentInstance as R, defineAsyncComponent as O } from "vue";
4
- const k = class k {
5
- mixins = [];
6
- components = {};
7
- emits = [];
8
- emitsParent = [];
9
- inject = [];
10
- injectParent = [];
11
- provide = {};
12
- provideParent = {};
13
- instance = this;
14
- $attrs = {};
15
- $data = {};
16
- $root;
17
- $emit(t, ...e) {
18
- }
19
- $forceUpdate(t) {
20
- }
21
- $watch(t, e, n) {
22
- }
23
- $nextTick(t) {
24
- }
25
- $ = {};
26
- beforeCreate() {
27
- }
28
- created() {
29
- }
30
- beforeMount() {
31
- }
32
- mounted() {
33
- }
34
- beforeUpdate() {
35
- }
36
- updated() {
37
- }
38
- beforeUnmount() {
39
- }
40
- unmounted() {
41
- }
42
- beforeCreateParent() {
43
- }
44
- createdParent() {
45
- }
46
- beforeMountParent() {
47
- }
48
- mountedParent() {
49
- }
50
- beforeUpdateParent() {
51
- }
52
- updatedParent() {
53
- }
54
- beforeUnmountParent() {
55
- }
56
- unmountedParent() {
57
- }
58
- nextTick(t, e = 1) {
59
- }
60
- hasExternalHandlerEvent(t) {
61
- return !1;
62
- }
63
- };
64
- a(k, "VueClass");
65
- let v = k;
66
- const M = [
67
- "$attrs",
68
- "$data",
69
- "$el",
70
- "$off",
71
- "$on",
72
- "$emit",
73
- "$forceUpdate",
74
- "$nextTick",
75
- "$options",
76
- "$parent",
77
- "$props",
78
- "$refs",
79
- "$root",
80
- "$slots",
81
- "$watch"
82
- ];
83
- typeof globalThis.$VST > "u" && (globalThis.$VST = {});
84
- typeof globalThis.$VST._vueClassInstances > "u" && (globalThis.$VST._vueClassInstances = {});
85
- typeof globalThis.$VST._vueClassProps > "u" && (globalThis.$VST._vueClassProps = {});
86
- typeof globalThis.$VST._vueClassWatchers > "u" && (globalThis.$VST._vueClassWatchers = {});
87
- typeof globalThis.$VST._vueComputed > "u" && (globalThis.$VST._vueComputed = {});
88
- function N(s) {
89
- return typeof s == "function" ? W(s) : function(t) {
90
- return W(t, s);
91
- };
92
- }
93
- a(N, "VueClassComponentDecorator");
94
- function W(s, t = {}) {
95
- let e = globalThis.$VST?._vueClassInstances[s.name] ?? new s();
96
- if (!(e instanceof v))
97
- throw `Класс ${s.name} должен наследоваться от класса VueClass или его потомков`;
98
- globalThis.$VST?._vueClassInstances[s.name] || (globalThis.$VST._vueClassInstances[s.name] = e);
99
- const n = {}, l = new A();
100
- for (let d of q(E(e), E(l, !0)))
101
- n[d] = e[d];
102
- const u = {};
103
- let f = Object.assign({}, globalThis.$VST._vueClassProps[s.name] ?? {}), g = Object.getPrototypeOf(e);
104
- do
105
- f = Object.assign(f, globalThis.$VST._vueClassProps[g.constructor.name] ?? {});
106
- while ((g = Object.getPrototypeOf(g)) instanceof v);
107
- for (let d of L(e))
108
- f[d] || (u[d] = e[d]);
109
- let $ = Object.assign({}, globalThis.$VST._vueClassWatchers[s.name] ?? {}), _ = Object.getPrototypeOf(e);
110
- do
111
- $ = Object.assign($, globalThis.$VST._vueClassWatchers[_.constructor.name] ?? {});
112
- while ((_ = Object.getPrototypeOf(_)) instanceof v);
113
- let H = Object.assign({}, globalThis.$VST._vueComputed[s.name] ?? {});
114
- for (let d in H)
115
- delete e[d];
116
- let S = [];
117
- return U({
118
- props: f,
119
- watch: $,
120
- computed: H,
121
- name: e.name ?? e.instance?.constructor?.name,
122
- mixins: e.mixins,
123
- components: e.components,
124
- emits: e.emits.concat(e.emitsParent),
125
- inject: e.inject.concat(e.injectParent),
126
- provide: { ...e.provideParent, ...e.provide },
127
- beforeCreate: /* @__PURE__ */ a(function() {
128
- e = new s(), e.$options = this.$options, e.$parent = this.$parent, e.$root = this.$root, e.$slots = this.$slots, e.instance = e, this.name = e.name ?? e.instance?.constructor.name, this.nextTick = e.nextTick = (d, p = 1) => {
129
- const b = /* @__PURE__ */ a((I) => {
130
- this.$nextTick(() => {
131
- I > 1 ? b(I - 1) : typeof d == "function" && !(d instanceof Promise) && d?.call?.(this);
132
- });
133
- }, "recursiveNextTick");
134
- b(p);
135
- }, e.beforeCreateParent.call(this), e.beforeCreate.call(this);
136
- }, "beforeCreate"),
137
- created: /* @__PURE__ */ a(function() {
138
- this.name = e.name ?? e.instance?.constructor.name;
139
- for (let d in n)
140
- this[d] = e?.[d].bind?.(this);
141
- e.createdParent.call(this), e.created.call(this);
142
- }, "created"),
143
- beforeMount: /* @__PURE__ */ a(function() {
144
- e.beforeMountParent.call(this), e.beforeMount.call(this);
145
- const d = /* @__PURE__ */ a(() => {
146
- const p = R();
147
- p && p.vnode.props && (S = Object.keys(p.vnode.props).filter((b) => b.startsWith("on")).map((b) => b.slice(2).toLowerCase()));
148
- }, "updateEventHandlers");
149
- d(), F(() => {
150
- d();
151
- }), this.hasExternalHandlerEvent = (p) => S.includes(p);
152
- }, "beforeMount"),
153
- mounted: /* @__PURE__ */ a(function() {
154
- e.mountedParent.call(this), e.mounted.call(this);
155
- }, "mounted"),
156
- beforeUpdate: /* @__PURE__ */ a(function() {
157
- e.beforeUpdateParent.call(this), e.beforeUpdate.call(this);
158
- const d = /* @__PURE__ */ a(() => {
159
- const p = R();
160
- p && p.vnode.props && (S = Object.keys(p.vnode.props).filter((b) => b.startsWith("on")).map((b) => b.slice(2).toLowerCase()));
161
- }, "updateEventHandlers");
162
- d(), F(() => {
163
- d();
164
- }), this.hasExternalHandlerEvent = (p) => S.includes(p);
165
- }, "beforeUpdate"),
166
- updated: /* @__PURE__ */ a(function() {
167
- e.updatedParent.call(this), e.updated.call(this);
168
- }, "updated"),
169
- beforeUnmount: /* @__PURE__ */ a(function() {
170
- e.beforeUnmountParent.call(this), e.beforeUnmount.call(this);
171
- }, "beforeUnmount"),
172
- unmounted: /* @__PURE__ */ a(function() {
173
- e.unmountedParent.call(this), e.unmounted.call(this);
174
- }, "unmounted"),
175
- data: /* @__PURE__ */ a(function() {
176
- return { ...u, __vue_class_instance__: null };
177
- }, "data")
178
- });
179
- }
180
- a(W, "createComponent");
181
- const z = N;
182
- function E(s, t = !1) {
183
- let e = /* @__PURE__ */ new Set(), n = s;
184
- do {
185
- if (!t && n.constructor.name == "VueClass")
186
- break;
187
- Object.getOwnPropertyNames(n).map((l) => e.add(l));
188
- } while (n = Object.getPrototypeOf(n));
189
- return [...e.keys()].filter((l) => typeof s[l] == "function" && typeof Object[l] != "function");
190
- }
191
- a(E, "getMethods");
192
- function L(s, t = !1) {
193
- let e = /* @__PURE__ */ new Set(), n = s;
194
- do {
195
- if (!t && n.constructor.name == "VueClass")
196
- break;
197
- Object.getOwnPropertyNames(n).map((l) => e.add(l));
198
- } while (n = Object.getPrototypeOf(n));
199
- return [...e.keys()].filter((l) => M.indexOf(l) == -1 && l != "__vue_props__" && s[l] !== "function" && typeof Object[l] != "function");
200
- }
201
- a(L, "getObjProps");
202
- function q(s, t) {
203
- return s.filter((e) => !t.includes(e));
204
- }
205
- a(q, "arrayDiff");
206
- const x = class x extends v {
207
- };
208
- a(x, "VueClassChild");
209
- let A = x;
210
- const i = /* @__PURE__ */ a((s, ...t) => (e, n, l) => {
211
- globalThis.$VST._vueClassInstances[e.constructor.name] || (globalThis.$VST._vueClassInstances[e.constructor.name] = new e.constructor(), globalThis.$VST._vueClassInstances[e.constructor.name].name = // @ts-ignore
212
- globalThis.$VST._vueClassInstances[e.constructor.name]?.constructor?.name?.toString() ?? globalThis.$VST._vueClassInstances[e.constructor.name].name ?? "");
213
- let u = typeof s == "object" ? s : {
214
- type: [s, ...t]
215
- };
216
- globalThis.$VST._vueClassInstances[e.constructor.name][n] && (u.default = globalThis.$VST._vueClassInstances[e.constructor.name][n]), globalThis.$VST._vueClassProps[e.constructor.name] || (globalThis.$VST._vueClassProps[e.constructor.name] = {}), globalThis.$VST._vueClassProps[e.constructor.name][n] = u;
217
- }, "Prop"), y = /* @__PURE__ */ a(function(s, t = !1, e = !1) {
218
- return (n, l, u) => {
219
- globalThis.$VST._vueClassInstances[n.constructor.name] || (globalThis.$VST._vueClassInstances[n.constructor.name] = new n.constructor(), globalThis.$VST._vueClassInstances[n.constructor.name].name = // @ts-ignore
220
- globalThis.$VST._vueClassInstances[n.constructor.name]?.constructor?.name?.toString() ?? globalThis.$VST._vueClassInstances[n.constructor.name].name ?? ""), n?.constructor?.prototype?.__vue_watch__ || (n.constructor.prototype.__vue_watch__ = {}), n?.constructor?.prototype?.__vue_watch__[n.constructor.name] || (n.constructor.prototype.__vue_watch__[n.constructor.name] = {}), n.constructor.prototype.__vue_watch__[n.constructor.name][s] = globalThis.$VST._vueClassInstances[n.constructor.name][l], globalThis.$VST._vueClassWatchers[n.constructor.name] || (globalThis.$VST._vueClassWatchers[n.constructor.name] = {}), globalThis.$VST._vueClassWatchers[n.constructor.name][s] = {
221
- // @ts-ignore
222
- handler: globalThis.$VST._vueClassInstances[n.constructor.name][l],
223
- deep: t,
224
- immediate: e
225
- };
226
- };
227
- }, "Watch"), Y = /* @__PURE__ */ a(function(s) {
228
- return (t, e, n) => {
229
- globalThis.$VST._vueClassInstances[t.constructor.name] || (globalThis.$VST._vueClassInstances[t.constructor.name] = new t.constructor(), globalThis.$VST._vueClassInstances[t.constructor.name].name = "test", globalThis.$VST._vueClassInstances[t.constructor.name].name = // @ts-ignore
230
- globalThis.$VST._vueClassInstances[t.constructor.name]?.constructor?.name?.toString() ?? globalThis.$VST._vueClassInstances[t.constructor.name].name ?? ""), t?.constructor?.prototype?.__vue_computed__ || (t.constructor.prototype.__vue_computed__ = {}), t?.constructor?.prototype?.__vue_computed__[t.constructor.name] || (t.constructor.prototype.__vue_computed__[t.constructor.name] = {}), t.constructor.prototype.__vue_computed__[t.constructor.name][s ?? e] = globalThis.$VST._vueClassInstances[t.constructor.name][e], globalThis.$VST._vueComputed[t.constructor.name] || (globalThis.$VST._vueComputed[t.constructor.name] = {});
231
- let l = globalThis.$VST._vueClassInstances[t.constructor.name][e];
232
- globalThis.$VST._vueClassInstances[t.constructor.name][e] = void 0, delete globalThis.$VST._vueClassInstances[t.constructor.name][e], globalThis.$VST._vueComputed[t.constructor.name][s ?? e] = {
233
- get: l
234
- };
235
- };
236
- }, "Computed");
237
- var m;
238
- let G = (m = class extends v {
239
- emitsParent = ["update:modelValue"];
240
- constructor() {
241
- super();
242
- }
243
- mountedParent() {
244
- }
245
- }, a(m, "BaseComponent"), m);
246
- globalThis.$VST = {
247
- _vueClassInstances: {},
248
- _vueClassProps: {},
249
- _vueClassWatchers: {},
250
- _vueComputed: {}
251
- };
252
- const Z = z;
253
- function r(s, t, e, n) {
254
- var l = arguments.length, u = l < 3 ? t : n === null ? n = Object.getOwnPropertyDescriptor(t, e) : n, f;
255
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") u = Reflect.decorate(s, t, e, n);
256
- else for (var g = s.length - 1; g >= 0; g--) (f = s[g]) && (u = (l < 3 ? f(u) : l > 3 ? f(t, e, u) : f(t, e)) || u);
257
- return l > 3 && u && Object.defineProperty(t, e, u), u;
258
- }
259
- a(r, "__decorate");
260
- function o(s, t) {
261
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(s, t);
262
- }
263
- a(o, "__metadata");
264
- var T;
265
- let h = (T = class extends G {
266
- emits = [
267
- "click",
268
- "touchstart",
269
- "touchend",
270
- "mousedown",
271
- "mouseup",
272
- "clickTap",
273
- "clickTouch",
274
- "clickOrTouchstart",
275
- "clickOrTouchend",
276
- "mousedownOrTouchstart",
277
- "mouseupOrTouchend",
278
- "keydownEnter"
279
- ];
280
- icon = "";
281
- iconRight = "";
282
- badge = "";
283
- badgeBg = null;
284
- badgeColor = null;
285
- style = {};
286
- bg = null;
287
- color = null;
288
- borderColor = null;
289
- bgActive = null;
290
- colorActive = null;
291
- colorHover = null;
292
- borderColorActive = null;
293
- boxShadowColor = null;
294
- fontSize = "1rem";
295
- fontFamily = null;
296
- // @Prop(String) readonly bgHover: string = '#333'
297
- bgGradientTop = null;
298
- // '#d2d2d2'
299
- bgGradientBottom = null;
300
- // '#ccc'
301
- disabled = !1;
302
- shine = !1;
303
- type = "button";
304
- title = null;
305
- disabledTitle = null;
306
- dataTheme = "black";
307
- dataDisabledTheme = "gray";
308
- dataPlacement = "top";
309
- dataOffset = "top";
310
- width = "calc(100% - 8px)";
311
- borderRadius = "3px";
312
- /** Открыть ссылку при нажатии, если начинается с http или https будет открыто в новом окне */
313
- link = null;
314
- /** Для открытия локальных ссылок в новом окне и внешних в текущем, будет проигнорирован при указанном link */
315
- linkRevert = null;
316
- theme = "default";
317
- backgroundCss = "";
318
- boxShadowCss = "";
319
- isOnHover = !1;
320
- isButtonActive = !1;
321
- randomClass = "";
322
- dataThemeInner = "";
323
- showButton = !0;
324
- currentBg = null;
325
- currentColor = null;
326
- currentColorHover = null;
327
- currentBorderColor = null;
328
- currentBgActive = null;
329
- currentBorderColorActive = null;
330
- currentBoxShadowColor = null;
331
- currentColorActive = null;
332
- innerTitle = null;
333
- hasTouchpad = !1;
334
- // TODO добавить проверку и Hammer
335
- mountedParent() {
336
- this.randomClass = "button-c" + Math.random().toString().split(".")[1], this.updateTheme(), this.$refs?.button;
337
- }
338
- updateTheme() {
339
- const t = "#ccc", e = "#000", n = "#cacaca", l = "#ccc", u = "#b6b6b6", f = "#5b5a5a";
340
- this.currentBgActive, this.currentBorderColor = this.currentColor = this.currentBg = this.currentColorActive = null, this.theme == "primary" && (this.currentBg = "#005bbf", this.currentColor = "#fff", this.currentBorderColor = "#0367d5", this.currentBgActive = "#005fc8", this.currentBorderColorActive = "#0871e3", this.currentBoxShadowColor = "#065e8d", this.currentColorActive = "#fff", this.currentColorHover = "#fff"), this.theme == "success" ? (this.currentBg = "#0aa86d", this.currentColor = "#fff", this.currentBorderColor = "#24a876", this.currentBgActive = "#0b9762", this.currentBorderColorActive = "#0b9762", this.currentBoxShadowColor = "#31735b", this.currentColorActive = "#fff", this.currentColorHover = "#fff") : this.theme == "danger" ? (this.currentBg = "#FF3B30", this.currentColor = "#fff", this.currentBorderColor = "#FF3B30", this.currentBgActive = "#FF3B30", this.currentBorderColorActive = "#FF3B30", this.currentBoxShadowColor = "#ff8179", this.currentColorActive = "#fff", this.currentColorHover = "#fff") : this.theme == "pink" ? (this.currentBg = "#ff6161", this.currentColor = "#fff", this.currentBorderColor = "#ff4741c9", this.currentBgActive = "#ff6a60", this.currentBorderColorActive = "#ff4141", this.currentBoxShadowColor = "#ff6a60", this.currentColorActive = "#fff", this.currentColorHover = "#fff") : this.theme == "warning" ? (this.currentBg = "#FF9500", this.currentColor = "#fff", this.currentBorderColor = "#FF9500", this.currentBgActive = "#ffb546", this.currentBorderColorActive = "#ffb546", this.currentBoxShadowColor = "#ffbe64", this.currentColorActive = "#fdff98", this.currentColorHover = "#fff8e8") : this.theme == "info" ? (this.currentBg = "#78d9ff", this.currentColor = "#203464", this.currentColorHover = "#34aff1", this.currentBorderColor = "#3db0ee", this.currentBgActive = "#78d9ff", this.currentBorderColorActive = "#78d9ff", this.currentBoxShadowColor = "#78d9ff", this.currentColorActive = "#fff", this.currentColorHover = "#304460") : this.theme == "yellow" ? (this.currentBg = "#ffd900", this.currentColor = "#444", this.currentBorderColor = "#ffd900", this.currentBgActive = "#ffc400", this.currentBorderColorActive = "#f3c922", this.currentBoxShadowColor = "#cac838", this.currentColorActive = "#fff") : this.theme == "white" ? (this.currentBg = "#ffffff", this.currentColor = "#444", this.currentColorHover = "#164205", this.currentBorderColor = "#cacaca", this.currentBgActive = "#efede7", this.currentBorderColorActive = "##cacaca", this.currentBoxShadowColor = "#b3b3ab", this.currentColorActive = "#164205") : this.theme == "purple" ? (this.currentBg = "#942cdd", this.currentColor = "#fff", this.currentColorHover = "#e7c0ff", this.currentBorderColor = "#a539f3", this.currentBgActive = "#b755ff", this.currentBorderColorActive = "#b755ff", this.currentBoxShadowColor = "#7f18c5", this.currentColorActive = "#ffffff") : this.theme == "indigo" ? (this.currentBg = "#5b2cdd", this.currentColor = "#fff", this.currentColorHover = "#e7c0ff", this.currentBorderColor = "#6b39f3", this.currentBgActive = "#8855ff", this.currentBorderColorActive = "#6f55ff", this.currentBoxShadowColor = "#5a18c5", this.currentColorActive = "#ffffff") : this.theme == "black" ? (this.currentBg = "#32383e", this.currentColor = "#fff", this.currentColorHover = "#ebf8b3", this.currentBorderColor = "#32383e", this.currentBgActive = "#3b4249", this.currentBorderColorActive = "#3b4249", this.currentBoxShadowColor = "#32383e", this.currentColorActive = "#ffffff") : this.theme == "grey" && (this.currentBg = "#5f6163", this.currentColor = "#fff", this.currentColorHover = "#cec6c4", this.currentBorderColor = "#898d90", this.currentBgActive = "#878c92", this.currentBorderColorActive = "#686c71", this.currentBoxShadowColor = "#626a71", this.currentColorActive = "#ffffff"), this.currentBg = this.bg ?? this.currentBg ?? t, this.currentColor = this.color ?? this.currentColor ?? e, this.currentBorderColor = this.borderColor ?? this.currentBorderColor ?? n, this.currentBgActive = this.bgActive ?? this.currentBgActive ?? l, this.currentBorderColorActive = this.borderColorActive ?? this.currentBorderColorActive ?? u, this.currentBoxShadowColor = this.boxShadowColor ?? this.currentBoxShadowColor ?? f, this.currentColorActive = this.colorActive ?? this.currentColorActive ?? null, this.boxShadowCss = this.disabled ? "box-shadow: none" : `box-shadow: 0px 1px 2px 0px ${this.currentBoxShadowColor}`, this.dataThemeInner = this.disabled ? this.dataDisabledTheme : this.dataTheme, this.backgroundCss = "background: " + (this.bgGradientTop && this.bgGradientBottom ? `linear-gradient(to bottom, ${this.bgGradientTop}, ${this.bgGradientBottom})` : this.bg);
341
- }
342
- click(t) {
343
- this.disabled || (this.$emit("click", t, this), this.hasTouchpad || (this.$emit("clickTouch", t, this), this.$emit("clickOrTouchstart", t, this), this.$emit("clickTap", t, this), this.link && (this.link?.startsWith("http") || this.link?.startsWith("//")) || this.link && this.linkRevert && !this.linkRevert?.startsWith("http") && !this.linkRevert?.startsWith("//") ? this.$refs.link?.click() : (this.link || this.linkRevert) && window.pjax(this.link || this.linkRevert)));
344
- }
345
- touchstart(t) {
346
- this.disabled || (this.$emit("touchstart", t, this), this.hasTouchpad && (this.$emit("clickTouch", t, this), this.$emit("clickOrTouchstart", t, this)));
347
- }
348
- touchend(t) {
349
- this.disabled || (this.$emit("touchend", t, this), this.hasTouchpad || this.$emit("clickOrTouchend", t, this));
350
- }
351
- mouseup(t) {
352
- this.disabled || (this.$emit("mouseup", t, this), this.$emit("mouseupOrTouchend", t, this), this.$emit("clickOrTouchend", t, this));
353
- }
354
- mousedown(t) {
355
- this.disabled || (this.$emit("mousedown", t, this), this.$emit("mousedownOrTouchstart", t, this));
356
- }
357
- keydownEnter(t) {
358
- this.disabled || this.$emit("keydownEnter", t, this);
359
- }
360
- focus() {
361
- this.$refs?.button?.focus();
362
- }
363
- _onThemeChanged() {
364
- this.updateTheme();
365
- }
366
- _onTitleChanged(t) {
367
- this.innerTitle = null, t && this.nextTick(() => this.innerTitle = t);
368
- }
369
- _onDisabledChanged(t) {
370
- this.dataThemeInner = t ? this.dataDisabledTheme : this.dataTheme, this.showButton = !1, this.nextTick(() => this.showButton = !0);
371
- }
372
- }, a(T, "ButtonInherited"), T);
373
- r([
374
- i(String),
375
- o("design:type", String)
376
- ], h.prototype, "icon", void 0);
377
- r([
378
- i(String),
379
- o("design:type", String)
380
- ], h.prototype, "iconRight", void 0);
381
- r([
382
- i(String),
383
- o("design:type", String)
384
- ], h.prototype, "badge", void 0);
385
- r([
386
- i(String),
387
- o("design:type", Object)
388
- ], h.prototype, "badgeBg", void 0);
389
- r([
390
- i(String),
391
- o("design:type", Object)
392
- ], h.prototype, "badgeColor", void 0);
393
- r([
394
- i(Object),
395
- o("design:type", Object)
396
- ], h.prototype, "style", void 0);
397
- r([
398
- i(String, null),
399
- o("design:type", Object)
400
- ], h.prototype, "bg", void 0);
401
- r([
402
- i(String, null),
403
- o("design:type", Object)
404
- ], h.prototype, "color", void 0);
405
- r([
406
- i(String, null),
407
- o("design:type", Object)
408
- ], h.prototype, "borderColor", void 0);
409
- r([
410
- i(String, null),
411
- o("design:type", Object)
412
- ], h.prototype, "bgActive", void 0);
413
- r([
414
- i(String, null),
415
- o("design:type", Object)
416
- ], h.prototype, "colorActive", void 0);
417
- r([
418
- i(String, null),
419
- o("design:type", Object)
420
- ], h.prototype, "colorHover", void 0);
421
- r([
422
- i(String, null),
423
- o("design:type", Object)
424
- ], h.prototype, "borderColorActive", void 0);
425
- r([
426
- i(String, null),
427
- o("design:type", Object)
428
- ], h.prototype, "boxShadowColor", void 0);
429
- r([
430
- i(String),
431
- o("design:type", Object)
432
- ], h.prototype, "fontSize", void 0);
433
- r([
434
- i(String),
435
- o("design:type", Object)
436
- ], h.prototype, "fontFamily", void 0);
437
- r([
438
- i(String),
439
- o("design:type", Object)
440
- ], h.prototype, "bgGradientTop", void 0);
441
- r([
442
- i(String),
443
- o("design:type", Object)
444
- ], h.prototype, "bgGradientBottom", void 0);
445
- r([
446
- i(Boolean),
447
- o("design:type", Boolean)
448
- ], h.prototype, "disabled", void 0);
449
- r([
450
- i(Boolean),
451
- o("design:type", Boolean)
452
- ], h.prototype, "shine", void 0);
453
- r([
454
- i(String),
455
- o("design:type", String)
456
- ], h.prototype, "type", void 0);
457
- r([
458
- i(String),
459
- o("design:type", Object)
460
- ], h.prototype, "title", void 0);
461
- r([
462
- i(String),
463
- o("design:type", Object)
464
- ], h.prototype, "disabledTitle", void 0);
465
- r([
466
- i(String),
467
- o("design:type", String)
468
- ], h.prototype, "dataTheme", void 0);
469
- r([
470
- i(String),
471
- o("design:type", String)
472
- ], h.prototype, "dataDisabledTheme", void 0);
473
- r([
474
- i(String),
475
- o("design:type", String)
476
- ], h.prototype, "dataPlacement", void 0);
477
- r([
478
- i(String),
479
- o("design:type", String)
480
- ], h.prototype, "dataOffset", void 0);
481
- r([
482
- i(String),
483
- o("design:type", String)
484
- ], h.prototype, "width", void 0);
485
- r([
486
- i(String),
487
- o("design:type", String)
488
- ], h.prototype, "borderRadius", void 0);
489
- r([
490
- i(String),
491
- o("design:type", Object)
492
- ], h.prototype, "link", void 0);
493
- r([
494
- i(String),
495
- o("design:type", Object)
496
- ], h.prototype, "linkRevert", void 0);
497
- r([
498
- i(String, null),
499
- o("design:type", Object)
500
- ], h.prototype, "theme", void 0);
501
- r([
502
- y("theme"),
503
- o("design:type", Function),
504
- o("design:paramtypes", []),
505
- o("design:returntype", void 0)
506
- ], h.prototype, "_onThemeChanged", null);
507
- r([
508
- y("title", !1, !0),
509
- o("design:type", Function),
510
- o("design:paramtypes", [String]),
511
- o("design:returntype", void 0)
512
- ], h.prototype, "_onTitleChanged", null);
513
- r([
514
- y("disabled"),
515
- o("design:type", Function),
516
- o("design:paramtypes", [Boolean]),
517
- o("design:returntype", void 0)
518
- ], h.prototype, "_onDisabledChanged", null);
519
- const K = O(() => import("./Button-B5JC_Z3M.js")), j = class j extends v {
520
- emitsParent = ["update:modelValue"];
521
- constructor() {
522
- super();
523
- }
524
- mountedParent() {
525
- }
526
- };
527
- a(j, "BaseComponent");
528
- let w = j;
529
- const V = class V extends w {
530
- emits = [
531
- "click",
532
- "touchstart",
533
- "touchend",
534
- "mousedown",
535
- "mouseup",
536
- "clickTap",
537
- "clickTouch",
538
- "clickOrTouchstart",
539
- "clickOrTouchend",
540
- "mousedownOrTouchstart",
541
- "mouseupOrTouchend",
542
- "keydownEnter"
543
- ];
544
- icon = "";
545
- iconRight = "";
546
- badge = "";
547
- badgeBg = null;
548
- badgeColor = null;
549
- style = {};
550
- bg = null;
551
- color = null;
552
- borderColor = null;
553
- bgActive = null;
554
- colorActive = null;
555
- colorHover = null;
556
- borderColorActive = null;
557
- boxShadowColor = null;
558
- fontSize = "1rem";
559
- fontFamily = null;
560
- // @Prop(String) readonly bgHover: string = '#333'
561
- bgGradientTop = null;
562
- // '#d2d2d2'
563
- bgGradientBottom = null;
564
- // '#ccc'
565
- disabled = !1;
566
- shine = !1;
567
- type = "button";
568
- title = null;
569
- disabledTitle = null;
570
- dataTheme = "black";
571
- dataDisabledTheme = "gray";
572
- dataPlacement = "top";
573
- dataOffset = "top";
574
- width = "calc(100% - 8px)";
575
- borderRadius = "3px";
576
- /** Открыть ссылку при нажатии, если начинается с http или https будет открыто в новом окне */
577
- link = null;
578
- /** Для открытия локальных ссылок в новом окне и внешних в текущем, будет проигнорирован при указанном link */
579
- linkRevert = null;
580
- theme = "default";
581
- backgroundCss = "";
582
- boxShadowCss = "";
583
- isOnHover = !1;
584
- isButtonActive = !1;
585
- randomClass = "";
586
- dataThemeInner = "";
587
- showButton = !0;
588
- currentBg = null;
589
- currentColor = null;
590
- currentColorHover = null;
591
- currentBorderColor = null;
592
- currentBgActive = null;
593
- currentBorderColorActive = null;
594
- currentBoxShadowColor = null;
595
- currentColorActive = null;
596
- innerTitle = null;
597
- hasTouchpad = !1;
598
- // TODO добавить проверку и Hammer
599
- mountedParent() {
600
- this.randomClass = "button-c" + Math.random().toString().split(".")[1], this.updateTheme(), this.$refs?.button;
601
- }
602
- updateTheme() {
603
- const t = "#ccc", e = "#000", n = "#cacaca", l = "#ccc", u = "#b6b6b6", f = "#5b5a5a";
604
- this.currentBgActive, this.currentBorderColor = this.currentColor = this.currentBg = this.currentColorActive = null, this.theme == "primary" && (this.currentBg = "#005bbf", this.currentColor = "#fff", this.currentBorderColor = "#0367d5", this.currentBgActive = "#005fc8", this.currentBorderColorActive = "#0871e3", this.currentBoxShadowColor = "#065e8d", this.currentColorActive = "#fff", this.currentColorHover = "#fff"), this.theme == "success" ? (this.currentBg = "#0aa86d", this.currentColor = "#fff", this.currentBorderColor = "#24a876", this.currentBgActive = "#0b9762", this.currentBorderColorActive = "#0b9762", this.currentBoxShadowColor = "#31735b", this.currentColorActive = "#fff", this.currentColorHover = "#fff") : this.theme == "danger" ? (this.currentBg = "#FF3B30", this.currentColor = "#fff", this.currentBorderColor = "#FF3B30", this.currentBgActive = "#FF3B30", this.currentBorderColorActive = "#FF3B30", this.currentBoxShadowColor = "#ff8179", this.currentColorActive = "#fff", this.currentColorHover = "#fff") : this.theme == "pink" ? (this.currentBg = "#ff6161", this.currentColor = "#fff", this.currentBorderColor = "#ff4741c9", this.currentBgActive = "#ff6a60", this.currentBorderColorActive = "#ff4141", this.currentBoxShadowColor = "#ff6a60", this.currentColorActive = "#fff", this.currentColorHover = "#fff") : this.theme == "warning" ? (this.currentBg = "#FF9500", this.currentColor = "#fff", this.currentBorderColor = "#FF9500", this.currentBgActive = "#ffb546", this.currentBorderColorActive = "#ffb546", this.currentBoxShadowColor = "#ffbe64", this.currentColorActive = "#fdff98", this.currentColorHover = "#fff8e8") : this.theme == "info" ? (this.currentBg = "#78d9ff", this.currentColor = "#203464", this.currentColorHover = "#34aff1", this.currentBorderColor = "#3db0ee", this.currentBgActive = "#78d9ff", this.currentBorderColorActive = "#78d9ff", this.currentBoxShadowColor = "#78d9ff", this.currentColorActive = "#fff", this.currentColorHover = "#304460") : this.theme == "yellow" ? (this.currentBg = "#ffd900", this.currentColor = "#444", this.currentBorderColor = "#ffd900", this.currentBgActive = "#ffc400", this.currentBorderColorActive = "#f3c922", this.currentBoxShadowColor = "#cac838", this.currentColorActive = "#fff") : this.theme == "white" ? (this.currentBg = "#ffffff", this.currentColor = "#444", this.currentColorHover = "#164205", this.currentBorderColor = "#cacaca", this.currentBgActive = "#efede7", this.currentBorderColorActive = "##cacaca", this.currentBoxShadowColor = "#b3b3ab", this.currentColorActive = "#164205") : this.theme == "purple" ? (this.currentBg = "#942cdd", this.currentColor = "#fff", this.currentColorHover = "#e7c0ff", this.currentBorderColor = "#a539f3", this.currentBgActive = "#b755ff", this.currentBorderColorActive = "#b755ff", this.currentBoxShadowColor = "#7f18c5", this.currentColorActive = "#ffffff") : this.theme == "indigo" ? (this.currentBg = "#5b2cdd", this.currentColor = "#fff", this.currentColorHover = "#e7c0ff", this.currentBorderColor = "#6b39f3", this.currentBgActive = "#8855ff", this.currentBorderColorActive = "#6f55ff", this.currentBoxShadowColor = "#5a18c5", this.currentColorActive = "#ffffff") : this.theme == "black" ? (this.currentBg = "#32383e", this.currentColor = "#fff", this.currentColorHover = "#ebf8b3", this.currentBorderColor = "#32383e", this.currentBgActive = "#3b4249", this.currentBorderColorActive = "#3b4249", this.currentBoxShadowColor = "#32383e", this.currentColorActive = "#ffffff") : this.theme == "grey" && (this.currentBg = "#5f6163", this.currentColor = "#fff", this.currentColorHover = "#cec6c4", this.currentBorderColor = "#898d90", this.currentBgActive = "#878c92", this.currentBorderColorActive = "#686c71", this.currentBoxShadowColor = "#626a71", this.currentColorActive = "#ffffff"), this.currentBg = this.bg ?? this.currentBg ?? t, this.currentColor = this.color ?? this.currentColor ?? e, this.currentBorderColor = this.borderColor ?? this.currentBorderColor ?? n, this.currentBgActive = this.bgActive ?? this.currentBgActive ?? l, this.currentBorderColorActive = this.borderColorActive ?? this.currentBorderColorActive ?? u, this.currentBoxShadowColor = this.boxShadowColor ?? this.currentBoxShadowColor ?? f, this.currentColorActive = this.colorActive ?? this.currentColorActive ?? null, this.boxShadowCss = this.disabled ? "box-shadow: none" : `box-shadow: 0px 1px 2px 0px ${this.currentBoxShadowColor}`, this.dataThemeInner = this.disabled ? this.dataDisabledTheme : this.dataTheme, this.backgroundCss = "background: " + (this.bgGradientTop && this.bgGradientBottom ? `linear-gradient(to bottom, ${this.bgGradientTop}, ${this.bgGradientBottom})` : this.bg);
605
- }
606
- click(t) {
607
- this.disabled || (this.$emit("click", t, this), this.hasTouchpad || (this.$emit("clickTouch", t, this), this.$emit("clickOrTouchstart", t, this), this.$emit("clickTap", t, this), this.link && (this.link?.startsWith("http") || this.link?.startsWith("//")) || this.link && this.linkRevert && !this.linkRevert?.startsWith("http") && !this.linkRevert?.startsWith("//") ? this.$refs.link?.click() : (this.link || this.linkRevert) && window.pjax(this.link || this.linkRevert)));
608
- }
609
- touchstart(t) {
610
- this.disabled || (this.$emit("touchstart", t, this), this.hasTouchpad && (this.$emit("clickTouch", t, this), this.$emit("clickOrTouchstart", t, this)));
611
- }
612
- touchend(t) {
613
- this.disabled || (this.$emit("touchend", t, this), this.hasTouchpad || this.$emit("clickOrTouchend", t, this));
614
- }
615
- mouseup(t) {
616
- this.disabled || (this.$emit("mouseup", t, this), this.$emit("mouseupOrTouchend", t, this), this.$emit("clickOrTouchend", t, this));
617
- }
618
- mousedown(t) {
619
- this.disabled || (this.$emit("mousedown", t, this), this.$emit("mousedownOrTouchstart", t, this));
620
- }
621
- keydownEnter(t) {
622
- this.disabled || this.$emit("keydownEnter", t, this);
623
- }
624
- focus() {
625
- this.$refs?.button?.focus();
626
- }
627
- _onThemeChanged() {
628
- this.updateTheme();
629
- }
630
- _onTitleChanged(t) {
631
- this.innerTitle = null, t && this.nextTick(() => this.innerTitle = t);
632
- }
633
- _onDisabledChanged(t) {
634
- this.dataThemeInner = t ? this.dataDisabledTheme : this.dataTheme, this.showButton = !1, this.nextTick(() => this.showButton = !0);
635
- }
636
- };
637
- a(V, "ButtonInherited");
638
- let c = V;
639
- r([
640
- i(String),
641
- o("design:type", String)
642
- ], c.prototype, "icon", void 0);
643
- r([
644
- i(String),
645
- o("design:type", String)
646
- ], c.prototype, "iconRight", void 0);
647
- r([
648
- i(String),
649
- o("design:type", String)
650
- ], c.prototype, "badge", void 0);
651
- r([
652
- i(String),
653
- o("design:type", Object)
654
- ], c.prototype, "badgeBg", void 0);
655
- r([
656
- i(String),
657
- o("design:type", Object)
658
- ], c.prototype, "badgeColor", void 0);
659
- r([
660
- i(Object),
661
- o("design:type", Object)
662
- ], c.prototype, "style", void 0);
663
- r([
664
- i(String, null),
665
- o("design:type", Object)
666
- ], c.prototype, "bg", void 0);
667
- r([
668
- i(String, null),
669
- o("design:type", Object)
670
- ], c.prototype, "color", void 0);
671
- r([
672
- i(String, null),
673
- o("design:type", Object)
674
- ], c.prototype, "borderColor", void 0);
675
- r([
676
- i(String, null),
677
- o("design:type", Object)
678
- ], c.prototype, "bgActive", void 0);
679
- r([
680
- i(String, null),
681
- o("design:type", Object)
682
- ], c.prototype, "colorActive", void 0);
683
- r([
684
- i(String, null),
685
- o("design:type", Object)
686
- ], c.prototype, "colorHover", void 0);
687
- r([
688
- i(String, null),
689
- o("design:type", Object)
690
- ], c.prototype, "borderColorActive", void 0);
691
- r([
692
- i(String, null),
693
- o("design:type", Object)
694
- ], c.prototype, "boxShadowColor", void 0);
695
- r([
696
- i(String),
697
- o("design:type", Object)
698
- ], c.prototype, "fontSize", void 0);
699
- r([
700
- i(String),
701
- o("design:type", Object)
702
- ], c.prototype, "fontFamily", void 0);
703
- r([
704
- i(String),
705
- o("design:type", Object)
706
- ], c.prototype, "bgGradientTop", void 0);
707
- r([
708
- i(String),
709
- o("design:type", Object)
710
- ], c.prototype, "bgGradientBottom", void 0);
711
- r([
712
- i(Boolean),
713
- o("design:type", Boolean)
714
- ], c.prototype, "disabled", void 0);
715
- r([
716
- i(Boolean),
717
- o("design:type", Boolean)
718
- ], c.prototype, "shine", void 0);
719
- r([
720
- i(String),
721
- o("design:type", String)
722
- ], c.prototype, "type", void 0);
723
- r([
724
- i(String),
725
- o("design:type", Object)
726
- ], c.prototype, "title", void 0);
727
- r([
728
- i(String),
729
- o("design:type", Object)
730
- ], c.prototype, "disabledTitle", void 0);
731
- r([
732
- i(String),
733
- o("design:type", String)
734
- ], c.prototype, "dataTheme", void 0);
735
- r([
736
- i(String),
737
- o("design:type", String)
738
- ], c.prototype, "dataDisabledTheme", void 0);
739
- r([
740
- i(String),
741
- o("design:type", String)
742
- ], c.prototype, "dataPlacement", void 0);
743
- r([
744
- i(String),
745
- o("design:type", String)
746
- ], c.prototype, "dataOffset", void 0);
747
- r([
748
- i(String),
749
- o("design:type", String)
750
- ], c.prototype, "width", void 0);
751
- r([
752
- i(String),
753
- o("design:type", String)
754
- ], c.prototype, "borderRadius", void 0);
755
- r([
756
- i(String),
757
- o("design:type", Object)
758
- ], c.prototype, "link", void 0);
759
- r([
760
- i(String),
761
- o("design:type", Object)
762
- ], c.prototype, "linkRevert", void 0);
763
- r([
764
- i(String, null),
765
- o("design:type", Object)
766
- ], c.prototype, "theme", void 0);
767
- r([
768
- y("theme"),
769
- o("design:type", Function),
770
- o("design:paramtypes", []),
771
- o("design:returntype", void 0)
772
- ], c.prototype, "_onThemeChanged", null);
773
- r([
774
- y("title", !1, !0),
775
- o("design:type", Function),
776
- o("design:paramtypes", [String]),
777
- o("design:returntype", void 0)
778
- ], c.prototype, "_onTitleChanged", null);
779
- r([
780
- y("disabled"),
781
- o("design:type", Function),
782
- o("design:paramtypes", [Boolean]),
783
- o("design:returntype", void 0)
784
- ], c.prototype, "_onDisabledChanged", null);
785
- const tt = O(() => import("./SelectField-C-W06YsI.js")), et = O(() => import("./StringField-hh1z2GxL.js"));
786
- var J = Object.defineProperty, B = /* @__PURE__ */ a((s, t, e, n) => {
787
- for (var l = void 0, u = s.length - 1, f; u >= 0; u--)
788
- (f = s[u]) && (l = f(t, e, l) || l);
789
- return l && J(t, e, l), l;
790
- }, "__decorateClass");
791
- const P = class P extends G {
792
- inputValue = null;
793
- modelValue = null;
794
- default = null;
795
- disabled = !1;
796
- placeholder = "";
797
- emitsParent = ["update:modelValue"];
798
- /** Динамическое значение поля */
799
- value = null;
800
- constructor() {
801
- super();
802
- }
803
- mountedParent() {
804
- }
805
- getValue() {
806
- return this.value;
807
- }
808
- setValue(t) {
809
- this.value = t;
810
- }
811
- };
812
- a(P, "FieldComponent");
813
- let C = P;
814
- B([
815
- i(String, Number, Array, Object, Boolean)
816
- ], C.prototype, "inputValue");
817
- B([
818
- i(String, Number, Array, Object, Boolean)
819
- ], C.prototype, "modelValue");
820
- B([
821
- i(String, Number, Array, Object, Boolean)
822
- ], C.prototype, "default");
823
- B([
824
- i(Boolean)
825
- ], C.prototype, "disabled");
826
- B([
827
- i(String)
828
- ], C.prototype, "placeholder");
829
- export {
830
- h as B,
831
- Y as C,
832
- C as F,
833
- i as P,
834
- Z as V,
835
- y as W,
836
- w as a,
837
- z as b,
838
- v as c,
839
- c as d,
840
- tt as e,
841
- et as f,
842
- K as i
843
- };