ablok-components 0.3.66 → 0.3.67
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.css +1 -1
- package/dist/ablok-components.umd.js +2 -2
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue.d.ts +18 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue.js +52 -20
- package/dist/types/media.d.ts +18 -0
- package/package.json +25 -25
|
@@ -29,6 +29,14 @@ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').Define
|
|
|
29
29
|
};
|
|
30
30
|
default: never[];
|
|
31
31
|
};
|
|
32
|
+
stacked: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
showCount: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
32
40
|
}>, {}, {}, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {
|
|
33
41
|
select: (...args: any[]) => void;
|
|
34
42
|
"update:modelValue": (...args: any[]) => void;
|
|
@@ -63,6 +71,14 @@ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').Define
|
|
|
63
71
|
};
|
|
64
72
|
default: never[];
|
|
65
73
|
};
|
|
74
|
+
stacked: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
78
|
+
showCount: {
|
|
79
|
+
type: BooleanConstructor;
|
|
80
|
+
default: boolean;
|
|
81
|
+
};
|
|
66
82
|
}>> & Readonly<{
|
|
67
83
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
68
84
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -71,5 +87,7 @@ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').Define
|
|
|
71
87
|
messages: Record<string, any>;
|
|
72
88
|
config: Record<string, any>;
|
|
73
89
|
assets: any[];
|
|
90
|
+
stacked: boolean;
|
|
91
|
+
showCount: boolean;
|
|
74
92
|
}, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
75
93
|
export default _default;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as f, ref as _, openBlock as t, createElementBlock as i, createVNode as s, withCtx as b, createElementVNode as y, normalizeClass as o, Fragment as g, renderList as k, createBlock as C, toDisplayString as v, createCommentVNode as V } from "vue";
|
|
2
|
+
import $ from "../../templates/base-carousel/base-carousel.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
4
|
+
import m from "../../atoms/base-image/base-image.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
const
|
|
6
|
+
const x = { class: "media-thumbnails" }, B = ["onClick", "title"], j = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "img-container"
|
|
9
|
+
}, O = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "media-thumbnails__count-badge"
|
|
12
|
+
}, w = {
|
|
13
|
+
key: 2,
|
|
14
|
+
class: "img-container"
|
|
15
|
+
}, I = /* @__PURE__ */ f({
|
|
7
16
|
__name: "media-thumbnails",
|
|
8
17
|
props: {
|
|
9
18
|
modelValue: {
|
|
@@ -20,30 +29,53 @@ const v = { class: "media-thumbnails" }, C = ["onClick", "title"], V = { class:
|
|
|
20
29
|
assets: {
|
|
21
30
|
type: Array,
|
|
22
31
|
default: []
|
|
32
|
+
},
|
|
33
|
+
stacked: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
showCount: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !0
|
|
23
40
|
}
|
|
24
41
|
},
|
|
25
42
|
emits: ["update:modelValue", "select"],
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
28
|
-
function
|
|
29
|
-
|
|
43
|
+
setup(a, { emit: d }) {
|
|
44
|
+
const c = d, u = _(-1);
|
|
45
|
+
function r(l) {
|
|
46
|
+
u.value = l, c("update:modelValue", l), c("select", l);
|
|
30
47
|
}
|
|
31
|
-
return (
|
|
32
|
-
s(
|
|
33
|
-
"carousel-item":
|
|
34
|
-
|
|
48
|
+
return (l, N) => (t(), i("div", x, [
|
|
49
|
+
s($, { items: a.assets }, {
|
|
50
|
+
"carousel-item": b((e) => [
|
|
51
|
+
y("button", {
|
|
35
52
|
type: "button",
|
|
36
|
-
class:
|
|
37
|
-
onClick: (
|
|
38
|
-
title: `${
|
|
53
|
+
class: o(["carousel__item media-thumbnails__thumbnail", e.index === a.modelValue || e.index === u.value ? "is-active" : ""]),
|
|
54
|
+
onClick: (n) => r(e.index),
|
|
55
|
+
title: `${l.$t("thumbnails.thumbnail")} ${e.index + 1}`
|
|
39
56
|
}, [
|
|
40
|
-
|
|
41
|
-
s(
|
|
57
|
+
e.item.type === "preset" && e.item.thumbnail ? (t(), i("div", j, [
|
|
58
|
+
s(m, {
|
|
59
|
+
src: e.item.thumbnail,
|
|
60
|
+
class: "img-fluid"
|
|
61
|
+
}, null, 8, ["src"])
|
|
62
|
+
])) : e.item.type === "preset" ? (t(), i("div", {
|
|
63
|
+
key: 1,
|
|
64
|
+
class: o(["img-container img-container--multi", { "img-container--stacked": a.stacked }])
|
|
65
|
+
}, [
|
|
66
|
+
(t(!0), i(g, null, k(e.item.items, (n, h) => (t(), C(m, {
|
|
67
|
+
key: h,
|
|
68
|
+
src: n.thumbnail || n.src,
|
|
69
|
+
class: "img-fluid"
|
|
70
|
+
}, null, 8, ["src"]))), 128)),
|
|
71
|
+
a.showCount && Object.keys(e.item.items || {}).length ? (t(), i("span", O, v(Object.keys(e.item.items || {}).length), 1)) : V("", !0)
|
|
72
|
+
], 2)) : (t(), i("div", w, [
|
|
73
|
+
s(m, {
|
|
42
74
|
src: e.item.thumbnail || e.item.src,
|
|
43
75
|
class: "img-fluid"
|
|
44
76
|
}, null, 8, ["src"])
|
|
45
|
-
])
|
|
46
|
-
], 10,
|
|
77
|
+
]))
|
|
78
|
+
], 10, B)
|
|
47
79
|
]),
|
|
48
80
|
_: 1
|
|
49
81
|
}, 8, ["items"])
|
|
@@ -51,5 +83,5 @@ const v = { class: "media-thumbnails" }, C = ["onClick", "title"], V = { class:
|
|
|
51
83
|
}
|
|
52
84
|
});
|
|
53
85
|
export {
|
|
54
|
-
|
|
86
|
+
I as default
|
|
55
87
|
};
|
package/dist/types/media.d.ts
CHANGED
|
@@ -11,3 +11,21 @@ export interface IMediaObject {
|
|
|
11
11
|
* Single media value (non-array)
|
|
12
12
|
*/
|
|
13
13
|
export type MediaValue = IMediaObject | string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* A single layer inside a preset asset (background, overlay, object, …)
|
|
16
|
+
*/
|
|
17
|
+
export interface IPresetAssetItem {
|
|
18
|
+
src: string;
|
|
19
|
+
thumbnail?: string;
|
|
20
|
+
type: string;
|
|
21
|
+
mediaType: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Preset asset — a named collection of layered items with an optional composite thumbnail
|
|
25
|
+
*/
|
|
26
|
+
export interface IPresetAsset {
|
|
27
|
+
type: 'preset';
|
|
28
|
+
thumbnail?: string;
|
|
29
|
+
filters?: string[];
|
|
30
|
+
items: Record<string, IPresetAssetItem>;
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ablok-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "vite --host",
|
|
7
|
-
"story:dev": "histoire dev",
|
|
8
|
-
"story:build": "histoire build",
|
|
9
|
-
"story:preview": "histoire preview",
|
|
10
|
-
"build": "vue-tsc --noEmit --project tsconfig.build.json && vite build",
|
|
11
|
-
"build:watch": "vue-tsc --noEmit --watch --project tsconfig.build.json & vite build --watch",
|
|
12
|
-
"preview": "vite preview",
|
|
13
|
-
"build-lib-bak": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types",
|
|
14
|
-
"build-lib": "vite build && vue-tsc --emitDeclarationOnly",
|
|
15
|
-
"release": "bash ./scripts/release.sh",
|
|
16
|
-
"postrelease": "bash ./scripts/publish.sh",
|
|
17
|
-
"test": "vitest run",
|
|
18
|
-
"test:watch": "vitest",
|
|
19
|
-
"test:ui": "vitest --ui"
|
|
20
|
-
},
|
|
4
|
+
"version": "0.3.67",
|
|
21
5
|
"dependencies": {
|
|
22
6
|
"date-fns": "^3.0.0",
|
|
23
7
|
"dompurify": "^3.3.1",
|
|
@@ -26,8 +10,6 @@
|
|
|
26
10
|
"ofetch": "^1.5.1"
|
|
27
11
|
},
|
|
28
12
|
"peerDependencies": {
|
|
29
|
-
"vue": "^3.5.27",
|
|
30
|
-
"vue-i18n": "^11.2.8",
|
|
31
13
|
"@tiptap/core": "^3.18.0",
|
|
32
14
|
"@tiptap/extension-bold": "^3.18.0",
|
|
33
15
|
"@tiptap/extension-highlight": "^3.18.0",
|
|
@@ -37,11 +19,13 @@
|
|
|
37
19
|
"@tiptap/starter-kit": "^3.18.0",
|
|
38
20
|
"@tiptap/vue-3": "^3.18.0",
|
|
39
21
|
"@vue-leaflet/vue-leaflet": "^0.10.1",
|
|
40
|
-
"leaflet": "^1.9.4",
|
|
41
22
|
"@vuepic/vue-datepicker": "^12.1.0",
|
|
42
23
|
"canvas-confetti": "^1.9.4",
|
|
24
|
+
"leaflet": "^1.9.4",
|
|
25
|
+
"qr-code-styling": "^1.9.2",
|
|
26
|
+
"vue": "^3.5.27",
|
|
43
27
|
"vue-advanced-cropper": "^2.8.9",
|
|
44
|
-
"
|
|
28
|
+
"vue-i18n": "^11.2.8"
|
|
45
29
|
},
|
|
46
30
|
"peerDependenciesMeta": {
|
|
47
31
|
"@tiptap/core": {
|
|
@@ -89,7 +73,9 @@
|
|
|
89
73
|
},
|
|
90
74
|
"devDependencies": {
|
|
91
75
|
"@histoire/plugin-vue": "^1.0.0-beta.1",
|
|
76
|
+
"@popperjs/core": "^2.11.8",
|
|
92
77
|
"@types/canvas-confetti": "^1.9.0",
|
|
78
|
+
"@types/dompurify": "^3.0.5",
|
|
93
79
|
"@types/leaflet": "^1.9.21",
|
|
94
80
|
"@types/lodash": "^4.17.23",
|
|
95
81
|
"@types/node": "^25.1.0",
|
|
@@ -98,9 +84,7 @@
|
|
|
98
84
|
"@vitest/ui": "^4.1.5",
|
|
99
85
|
"@vue/compiler-dom": "^3.5.33",
|
|
100
86
|
"@vue/test-utils": "^2.4.10",
|
|
101
|
-
"@types/dompurify": "^3.0.5",
|
|
102
87
|
"bootstrap": "^5.3.8",
|
|
103
|
-
"@popperjs/core": "^2.11.8",
|
|
104
88
|
"flexsearch": "^0.8.212",
|
|
105
89
|
"glob": "^13.0.0",
|
|
106
90
|
"happy-dom": "^20.9.0",
|
|
@@ -136,5 +120,21 @@
|
|
|
136
120
|
"./package.json": "./package.json"
|
|
137
121
|
},
|
|
138
122
|
"types": "./dist/index.d.ts",
|
|
139
|
-
"sideEffects": false
|
|
140
|
-
|
|
123
|
+
"sideEffects": false,
|
|
124
|
+
"scripts": {
|
|
125
|
+
"dev": "vite --host",
|
|
126
|
+
"story:dev": "histoire dev",
|
|
127
|
+
"story:build": "histoire build",
|
|
128
|
+
"story:preview": "histoire preview",
|
|
129
|
+
"build": "vue-tsc --noEmit --project tsconfig.build.json && vite build",
|
|
130
|
+
"build:watch": "vue-tsc --noEmit --watch --project tsconfig.build.json & vite build --watch",
|
|
131
|
+
"preview": "vite preview",
|
|
132
|
+
"build-lib-bak": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types",
|
|
133
|
+
"build-lib": "vite build && vue-tsc --emitDeclarationOnly",
|
|
134
|
+
"release": "bash ./scripts/release.sh",
|
|
135
|
+
"postrelease": "bash ./scripts/publish.sh",
|
|
136
|
+
"test": "vitest run",
|
|
137
|
+
"test:watch": "vitest",
|
|
138
|
+
"test:ui": "vitest --ui"
|
|
139
|
+
}
|
|
140
|
+
}
|