ablok-components 0.3.106 → 0.3.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ablok-components.umd.js +2 -2
- package/dist/components/molecules/image-crop/image-crop.vue.d.ts +9 -6
- package/dist/components/molecules/image-crop/image-crop.vue_vue_type_script_setup_true_lang.js +35 -29
- package/dist/components/molecules/input-datepicker/input-datepicker.vue_vue_type_script_setup_true_lang.js +17 -15
- package/package.json +14 -54
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
declare var __VLS_13: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
actions?: (props: typeof __VLS_13) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import('../../../../vue/dist/vue.esm-bundler.js').DefineComponent<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
|
|
4
6
|
modelValue: {
|
|
5
7
|
type: StringConstructor;
|
|
6
8
|
default: string;
|
|
@@ -53,9 +55,10 @@ declare const __VLS_export: __VLS_WithSlots<import('../../../../vue/dist/vue.esm
|
|
|
53
55
|
ready: boolean;
|
|
54
56
|
modelValue: string;
|
|
55
57
|
aspectRatioOptions: number[];
|
|
56
|
-
}, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, any
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
}, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, any>;
|
|
59
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
60
|
+
declare const _default: typeof __VLS_export;
|
|
61
|
+
export default _default;
|
|
59
62
|
type __VLS_WithSlots<T, S> = T & {
|
|
60
63
|
new (): {
|
|
61
64
|
$slots: S;
|
package/dist/components/molecules/image-crop/image-crop.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import e from "../input-dropdown/input-dropdown.js";
|
|
2
|
-
|
|
3
|
-
import { createCommentVNode as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, onBeforeMount as o, openBlock as s, ref as c, renderSlot as l, toDisplayString as u, unref as d, useTemplateRef as f, withModifiers as p } from "vue";
|
|
4
|
-
import { Cropper as m } from "vue-advanced-cropper";
|
|
2
|
+
import { createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, markRaw as s, onBeforeMount as c, onMounted as l, openBlock as u, ref as d, renderSlot as f, resolveDynamicComponent as p, shallowRef as m, toDisplayString as h, useTemplateRef as g, withModifiers as _ } from "vue";
|
|
5
3
|
//#region src/components/molecules/image-crop/image-crop.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
4
|
+
var v = {
|
|
7
5
|
key: 0,
|
|
8
6
|
class: "image-crop"
|
|
9
|
-
},
|
|
7
|
+
}, y = { class: "row mb-4" }, b = { class: "col" }, x = { class: "row" }, S = { class: "col d-flex gap-2 justify-content-end gap-2" }, C = /*@__PURE__*/ o({
|
|
10
8
|
__name: "image-crop",
|
|
11
9
|
props: {
|
|
12
10
|
modelValue: {
|
|
@@ -54,38 +52,46 @@ var h = {
|
|
|
54
52
|
suggestedAspectRatio: Number
|
|
55
53
|
},
|
|
56
54
|
emits: ["update:modelValue"],
|
|
57
|
-
setup(
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
let {
|
|
61
|
-
|
|
55
|
+
setup(o, { emit: C }) {
|
|
56
|
+
let w = m(null);
|
|
57
|
+
l(async () => {
|
|
58
|
+
let [{ Cropper: e }] = await Promise.all([import("vue-advanced-cropper"), Promise.resolve({ })]);
|
|
59
|
+
w.value = s(e);
|
|
60
|
+
});
|
|
61
|
+
let T = o, E = C, D = g("cropper"), O = d(0);
|
|
62
|
+
function k() {
|
|
63
|
+
let e = D.value?.getResult();
|
|
64
|
+
if (!e?.canvas) return;
|
|
65
|
+
let t = e.canvas.toDataURL();
|
|
66
|
+
E("update:modelValue", t);
|
|
62
67
|
}
|
|
63
|
-
return
|
|
64
|
-
|
|
65
|
-
}), (
|
|
66
|
-
|
|
68
|
+
return c(() => {
|
|
69
|
+
O.value = T.suggestedAspectRatio || 0;
|
|
70
|
+
}), (s, c) => o.modelValue ? (u(), r("div", v, [
|
|
71
|
+
i("div", y, [i("div", b, [w.value ? (u(), t(p(w.value), {
|
|
72
|
+
key: 0,
|
|
67
73
|
ref: "cropper",
|
|
68
74
|
class: "cropper",
|
|
69
|
-
src:
|
|
70
|
-
"stencil-props": { ...
|
|
75
|
+
src: o.modelValue,
|
|
76
|
+
"stencil-props": { ...O.value === 0 ? {} : { aspectRatio: O.value } },
|
|
71
77
|
"resize-image": !1
|
|
72
|
-
}, null, 8, ["src", "stencil-props"])])]),
|
|
73
|
-
c[1] ||=
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
modelValue:
|
|
77
|
-
"onUpdate:modelValue": c[0] ||= (e) =>
|
|
78
|
-
options:
|
|
78
|
+
}, null, 8, ["src", "stencil-props"])) : n("", !0)])]),
|
|
79
|
+
c[1] ||= i("hr", null, null, -1),
|
|
80
|
+
i("div", x, [i("div", S, [
|
|
81
|
+
a(e, {
|
|
82
|
+
modelValue: O.value,
|
|
83
|
+
"onUpdate:modelValue": c[0] ||= (e) => O.value = e,
|
|
84
|
+
options: o.aspectRatioOptions,
|
|
79
85
|
class: "mb-0"
|
|
80
86
|
}, null, 8, ["modelValue", "options"]),
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
f(s.$slots, "actions"),
|
|
88
|
+
i("button", {
|
|
83
89
|
class: "btn btn-sm btn-primary",
|
|
84
|
-
onClick:
|
|
85
|
-
},
|
|
90
|
+
onClick: _(k, ["prevent", "stop"])
|
|
91
|
+
}, h(s.$t("common.apply")), 1)
|
|
86
92
|
])])
|
|
87
|
-
])) :
|
|
93
|
+
])) : n("", !0);
|
|
88
94
|
}
|
|
89
95
|
});
|
|
90
96
|
//#endregion
|
|
91
|
-
export {
|
|
97
|
+
export { C as default };
|
|
@@ -6,15 +6,14 @@ import r from "../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/
|
|
|
6
6
|
import i from "../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr.js";
|
|
7
7
|
import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, normalizeClass as d, onMounted as f, openBlock as p, ref as m, renderSlot as h, resolveDynamicComponent as g, shallowRef as _, unref as v, watch as y } from "vue";
|
|
8
8
|
import { useI18n as b } from "vue-i18n";
|
|
9
|
-
import { WeekStart as x } from "@vuepic/vue-datepicker";
|
|
10
9
|
//#region src/components/molecules/input-datepicker/input-datepicker.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
10
|
+
var x = { class: "row" }, S = { class: "col-12" }, C = ["for", "innerHTML"], w = { key: 0 }, T = { class: "input-group justify-content-center" }, E = {
|
|
12
11
|
key: 0,
|
|
13
12
|
class: "row"
|
|
14
|
-
},
|
|
13
|
+
}, D = { class: "col-12 col-md-6" }, O = { class: "col-12 col-md-6" }, k = {
|
|
15
14
|
key: 1,
|
|
16
15
|
class: "row"
|
|
17
|
-
},
|
|
16
|
+
}, A = { class: "col-12" }, j = /*@__PURE__*/ u({
|
|
18
17
|
__name: "input-datepicker",
|
|
19
18
|
props: {
|
|
20
19
|
modelValue: {
|
|
@@ -102,7 +101,10 @@ var S = { class: "row" }, C = { class: "col-12" }, w = ["for", "innerHTML"], T =
|
|
|
102
101
|
"update:to"
|
|
103
102
|
],
|
|
104
103
|
setup(t, { emit: u }) {
|
|
105
|
-
let
|
|
104
|
+
let j = {
|
|
105
|
+
Sunday: 0,
|
|
106
|
+
Monday: 1
|
|
107
|
+
}, M = _(null);
|
|
106
108
|
f(async () => {
|
|
107
109
|
let { VueDatePicker: e } = await import("@vuepic/vue-datepicker");
|
|
108
110
|
M.value = e, console.log("VueDatePicker loaded:", F.value, N.locale);
|
|
@@ -116,10 +118,10 @@ var S = { class: "row" }, C = { class: "col-12" }, w = ["for", "innerHTML"], T =
|
|
|
116
118
|
return I[e] || r;
|
|
117
119
|
}), R = a(() => {
|
|
118
120
|
switch (N.locale || F.value) {
|
|
119
|
-
case "en": return
|
|
121
|
+
case "en": return j.Sunday;
|
|
120
122
|
case "de":
|
|
121
|
-
case "fr": return
|
|
122
|
-
default: return
|
|
123
|
+
case "fr": return j.Monday;
|
|
124
|
+
default: return j.Sunday;
|
|
123
125
|
}
|
|
124
126
|
}), z = a(() => N.inline || !N.picker ? {
|
|
125
127
|
openMenu: !1,
|
|
@@ -214,15 +216,15 @@ var S = { class: "row" }, C = { class: "col-12" }, w = ["for", "innerHTML"], T =
|
|
|
214
216
|
}
|
|
215
217
|
let $ = (e) => (e = Array.isArray(e) ? e.map((e) => X(e)).join(" - ") : X(e), e);
|
|
216
218
|
return (n, r) => (p(), c("div", { class: d(["input", "input--datepicker"]) }, [
|
|
217
|
-
h(n.$slots, "label", {}, () => [l("div",
|
|
219
|
+
h(n.$slots, "label", {}, () => [l("div", x, [l("div", S, [t.label ? (p(), c("label", {
|
|
218
220
|
key: 0,
|
|
219
221
|
for: t.id,
|
|
220
222
|
class: "input__label",
|
|
221
223
|
innerHTML: v(e)(`${t.label}${t.required ? " *" : ""}`)
|
|
222
|
-
}, null, 8,
|
|
223
|
-
t.textInput ? (p(), c("div",
|
|
224
|
+
}, null, 8, C)) : s("", !0)])])]),
|
|
225
|
+
t.textInput ? (p(), c("div", w, [l("div", T, [
|
|
224
226
|
h(n.$slots, "input-prepend", { slotScope: "props" }),
|
|
225
|
-
t.range && !t.textRange ? (p(), c("div",
|
|
227
|
+
t.range && !t.textRange ? (p(), c("div", E, [l("div", D, [(p(), o(g(M.value), {
|
|
226
228
|
uid: `${t.id}-from`,
|
|
227
229
|
modelValue: J.value,
|
|
228
230
|
"onUpdate:modelValue": r[0] ||= (e) => J.value = e,
|
|
@@ -245,7 +247,7 @@ var S = { class: "row" }, C = { class: "col-12" }, w = ["for", "innerHTML"], T =
|
|
|
245
247
|
"required",
|
|
246
248
|
"max-date",
|
|
247
249
|
"week-start"
|
|
248
|
-
]))]), l("div",
|
|
250
|
+
]))]), l("div", O, [(p(), o(g(M.value), {
|
|
249
251
|
uid: `${t.id}-to`,
|
|
250
252
|
modelValue: Y.value,
|
|
251
253
|
"onUpdate:modelValue": r[1] ||= (e) => Y.value = e,
|
|
@@ -295,7 +297,7 @@ var S = { class: "row" }, C = { class: "col-12" }, w = ["for", "innerHTML"], T =
|
|
|
295
297
|
])),
|
|
296
298
|
h(n.$slots, "input-append", { slotScope: "props" })
|
|
297
299
|
])])) : s("", !0),
|
|
298
|
-
t.inline ? (p(), c("div",
|
|
300
|
+
t.inline ? (p(), c("div", k, [l("div", A, [(p(), o(g(M.value), {
|
|
299
301
|
uid: `${t.id}-inline`,
|
|
300
302
|
modelValue: q.value,
|
|
301
303
|
"onUpdate:modelValue": r[3] ||= (e) => q.value = e,
|
|
@@ -334,4 +336,4 @@ var S = { class: "row" }, C = { class: "col-12" }, w = ["for", "innerHTML"], T =
|
|
|
334
336
|
}
|
|
335
337
|
});
|
|
336
338
|
//#endregion
|
|
337
|
-
export {
|
|
339
|
+
export { j as default };
|
package/package.json
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ablok-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.111",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@vuepic/vue-datepicker": "^14.0.0",
|
|
8
|
-
"date-fns": "^4.4.0",
|
|
9
|
-
"dompurify": "^3.4.13",
|
|
10
|
-
"html2canvas": "^1.4.1",
|
|
11
|
-
"lodash": "^4.18.1",
|
|
12
|
-
"ofetch": "^1.5.1"
|
|
13
|
-
},
|
|
14
|
-
"peerDependencies": {
|
|
15
7
|
"@tiptap/core": "^3.30.0",
|
|
16
8
|
"@tiptap/extension-bold": "^3.30.0",
|
|
17
9
|
"@tiptap/extension-highlight": "^3.30.0",
|
|
@@ -21,57 +13,21 @@
|
|
|
21
13
|
"@tiptap/starter-kit": "^3.30.0",
|
|
22
14
|
"@tiptap/vue-3": "^3.30.0",
|
|
23
15
|
"@vue-leaflet/vue-leaflet": "^0.10.1",
|
|
16
|
+
"@vuepic/vue-datepicker": "^14.0.0",
|
|
24
17
|
"canvas-confetti": "^1.9.4",
|
|
18
|
+
"date-fns": "^4.4.0",
|
|
19
|
+
"dompurify": "^3.4.13",
|
|
20
|
+
"html2canvas": "^1.4.1",
|
|
25
21
|
"leaflet": "^1.9.4",
|
|
22
|
+
"lodash": "^4.18.1",
|
|
23
|
+
"ofetch": "^1.5.1",
|
|
26
24
|
"qr-code-styling": "^1.9.2",
|
|
25
|
+
"vue-advanced-cropper": "^2.8.9"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
27
28
|
"vue": "^3.5.27",
|
|
28
|
-
"vue-advanced-cropper": "^2.8.9",
|
|
29
29
|
"vue-i18n": "^11.2.8"
|
|
30
30
|
},
|
|
31
|
-
"peerDependenciesMeta": {
|
|
32
|
-
"@tiptap/core": {
|
|
33
|
-
"optional": true
|
|
34
|
-
},
|
|
35
|
-
"@tiptap/extension-bold": {
|
|
36
|
-
"optional": true
|
|
37
|
-
},
|
|
38
|
-
"@tiptap/extension-highlight": {
|
|
39
|
-
"optional": true
|
|
40
|
-
},
|
|
41
|
-
"@tiptap/extension-link": {
|
|
42
|
-
"optional": true
|
|
43
|
-
},
|
|
44
|
-
"@tiptap/extension-text-align": {
|
|
45
|
-
"optional": true
|
|
46
|
-
},
|
|
47
|
-
"@tiptap/pm": {
|
|
48
|
-
"optional": true
|
|
49
|
-
},
|
|
50
|
-
"@tiptap/starter-kit": {
|
|
51
|
-
"optional": true
|
|
52
|
-
},
|
|
53
|
-
"@tiptap/vue-3": {
|
|
54
|
-
"optional": true
|
|
55
|
-
},
|
|
56
|
-
"@vue-leaflet/vue-leaflet": {
|
|
57
|
-
"optional": true
|
|
58
|
-
},
|
|
59
|
-
"leaflet": {
|
|
60
|
-
"optional": true
|
|
61
|
-
},
|
|
62
|
-
"@vuepic/vue-datepicker": {
|
|
63
|
-
"optional": true
|
|
64
|
-
},
|
|
65
|
-
"canvas-confetti": {
|
|
66
|
-
"optional": true
|
|
67
|
-
},
|
|
68
|
-
"vue-advanced-cropper": {
|
|
69
|
-
"optional": true
|
|
70
|
-
},
|
|
71
|
-
"qr-code-styling": {
|
|
72
|
-
"optional": true
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
31
|
"devDependencies": {
|
|
76
32
|
"@histoire/plugin-vue": "1.0.0-beta.1",
|
|
77
33
|
"@popperjs/core": "^2.11.8",
|
|
@@ -111,6 +67,10 @@
|
|
|
111
67
|
"import": "./dist/index.js",
|
|
112
68
|
"require": "./dist/ablok-components.umd.js"
|
|
113
69
|
},
|
|
70
|
+
"./*.vue": {
|
|
71
|
+
"types": "./dist/*.vue.d.ts",
|
|
72
|
+
"import": "./dist/*.js"
|
|
73
|
+
},
|
|
114
74
|
"./*": {
|
|
115
75
|
"types": "./dist/*.d.ts",
|
|
116
76
|
"import": "./dist/*.js"
|