ablok-components 0.3.57 → 0.3.59
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/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/ablok-components.umd.js +2 -2
- package/dist/assets/img/guide.png.js +4 -0
- package/dist/components/atoms/base-button/base-button.vue.js +92 -0
- package/dist/components/atoms/base-button/base-button.vue3.js +5 -0
- package/dist/components/atoms/base-headline/base-headline.vue.js +30 -0
- package/dist/components/atoms/base-headline/base-headline.vue2.js +4 -0
- package/dist/components/atoms/base-image/base-image.vue.js +75 -0
- package/dist/components/atoms/base-image/base-image.vue3.js +5 -0
- package/dist/components/atoms/base-input/base-input.vue.js +181 -0
- package/dist/components/atoms/base-input/base-input.vue3.js +5 -0
- package/dist/components/atoms/base-paragraph/base-paragraph.vue.js +21 -0
- package/dist/components/atoms/base-paragraph/base-paragraph.vue2.js +4 -0
- package/dist/components/atoms/canvas-confetti/canvas-confetti.vue.js +113 -0
- package/dist/components/atoms/canvas-confetti/canvas-confetti.vue3.js +5 -0
- package/dist/components/atoms/check-group/check-group.vue.js +86 -0
- package/dist/components/atoms/check-group/check-group.vue3.js +5 -0
- package/dist/components/atoms/custom-html/custom-html.vue.js +26 -0
- package/dist/components/atoms/custom-html/custom-html.vue2.js +4 -0
- package/dist/components/atoms/input-checkbox/input-checkbox.vue.js +84 -0
- package/dist/components/atoms/input-checkbox/input-checkbox.vue3.js +5 -0
- package/dist/components/atoms/input-datetime/input-datetime.vue.js +99 -0
- package/dist/components/atoms/input-datetime/input-datetime.vue2.js +4 -0
- package/dist/components/atoms/input-file/input-file.vue.js +130 -0
- package/dist/components/atoms/input-file/input-file.vue2.js +4 -0
- package/dist/components/atoms/input-passcode/input-passcode.vue.js +149 -0
- package/dist/components/atoms/input-passcode/input-passcode.vue2.js +4 -0
- package/dist/components/atoms/input-password/input-password.vue.js +118 -0
- package/dist/components/atoms/input-password/input-password.vue2.js +4 -0
- package/dist/components/atoms/input-textarea/input-textarea.vue.js +105 -0
- package/dist/components/atoms/input-textarea/input-textarea.vue2.js +4 -0
- package/dist/components/atoms/loading-spinner/loading-spinner.vue.js +38 -0
- package/dist/components/atoms/loading-spinner/loading-spinner.vue3.js +5 -0
- package/dist/components/atoms/radio-group/radio-group.vue.js +99 -0
- package/dist/components/atoms/radio-group/radio-group.vue3.js +5 -0
- package/dist/components/atoms/svg-icon/svg-icon.vue.js +44 -0
- package/dist/components/atoms/svg-icon/svg-icon.vue3.js +5 -0
- package/dist/components/atoms/zoom-slider/zoom-slider.vue.js +59 -0
- package/dist/components/atoms/zoom-slider/zoom-slider.vue3.js +5 -0
- package/dist/components/molecules/accordion/accordion-item.vue.js +76 -0
- package/dist/components/molecules/accordion/accordion-item.vue3.js +5 -0
- package/dist/components/molecules/accordion/accordion.vue.js +12 -0
- package/dist/components/molecules/auto-suggest/auto-suggest.vue.js +132 -0
- package/dist/components/molecules/auto-suggest/auto-suggest.vue3.js +5 -0
- package/dist/components/molecules/base-camera/base-camera.vue.js +392 -0
- package/dist/components/molecules/base-camera/base-camera.vue3.js +5 -0
- package/dist/components/molecules/base-map/base-map.vue.js +386 -0
- package/dist/components/molecules/base-map/base-map.vue3.js +5 -0
- package/dist/components/molecules/color-palette/color-palette.vue.js +72 -0
- package/dist/components/molecules/color-palette/color-palette.vue3.js +5 -0
- package/dist/components/molecules/dom-renderer/dom-renderer.vue.js +102 -0
- package/dist/components/molecules/dom-renderer/dom-renderer.vue2.js +4 -0
- package/dist/components/molecules/file-upload/file-upload.vue.js +177 -0
- package/dist/components/molecules/file-upload/file-upload.vue3.js +5 -0
- package/dist/components/molecules/hint-system/hint-system.vue.d.ts +1 -1
- package/dist/components/molecules/hint-system/hint-system.vue.js +111 -0
- package/dist/components/molecules/hint-system/hint-system.vue3.js +5 -0
- package/dist/components/molecules/image-crop/image-crop.vue.js +82 -0
- package/dist/components/molecules/image-crop/image-crop.vue2.js +4 -0
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue.js +120 -0
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue2.js +4 -0
- package/dist/components/molecules/image-resize/image-resize.vue.js +143 -0
- package/dist/components/molecules/image-resize/image-resize.vue2.js +4 -0
- package/dist/components/molecules/image-upload/image-upload.vue.js +274 -0
- package/dist/components/molecules/image-upload/image-upload.vue3.js +5 -0
- package/dist/components/molecules/image-zoom/image-zoom.vue.js +209 -0
- package/dist/components/molecules/image-zoom/image-zoom.vue3.js +5 -0
- package/dist/components/molecules/input-color/input-color.vue.js +105 -0
- package/dist/components/molecules/input-color/input-color.vue3.js +5 -0
- package/dist/components/molecules/input-datepicker/input-datepicker.vue.js +263 -0
- package/dist/components/molecules/input-datepicker/input-datepicker.vue3.js +5 -0
- package/dist/components/molecules/input-dropdown/input-dropdown.vue.js +207 -0
- package/dist/components/molecules/input-dropdown/input-dropdown.vue3.js +5 -0
- package/dist/components/molecules/link-sharing/link-sharing.vue.js +177 -0
- package/dist/components/molecules/link-sharing/link-sharing.vue3.js +7 -0
- package/dist/components/molecules/location-list/location-list.vue.js +98 -0
- package/dist/components/molecules/location-list/location-list.vue3.js +5 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue.js +55 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue3.js +5 -0
- package/dist/components/molecules/popover-notifications/popover-notifications.vue.js +135 -0
- package/dist/components/molecules/popover-notifications/popover-notifications.vue3.js +5 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue.js +134 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue3.js +5 -0
- package/dist/components/molecules/progress-steps/progress-steps.vue.js +84 -0
- package/dist/components/molecules/progress-steps/progress-steps.vue3.js +5 -0
- package/dist/components/molecules/qr-code/qr-code.vue.js +103 -0
- package/dist/components/molecules/qr-code/qr-code.vue3.js +5 -0
- package/dist/components/molecules/radio-buttons/radio-buttons.vue.js +79 -0
- package/dist/components/molecules/radio-buttons/radio-buttons.vue3.js +5 -0
- package/dist/components/molecules/rte-editor/rte-editor.vue.js +455 -0
- package/dist/components/molecules/rte-editor/rte-editor.vue3.js +5 -0
- package/dist/components/molecules/select-media/select-media.vue.js +87 -0
- package/dist/components/molecules/select-media/select-media.vue3.js +5 -0
- package/dist/components/molecules/upload-group/upload-group.vue.js +178 -0
- package/dist/components/molecules/upload-group/upload-group.vue3.js +5 -0
- package/dist/components/organisms/asset-uploader/asset-uploader.vue.js +126 -0
- package/dist/components/organisms/asset-uploader/asset-uploader.vue3.js +5 -0
- package/dist/components/organisms/location-finder/location-finder.vue.js +634 -0
- package/dist/components/organisms/location-finder/location-finder.vue3.js +5 -0
- package/dist/components/templates/base-carousel/base-carousel.vue.js +94 -0
- package/dist/components/templates/base-carousel/base-carousel.vue3.js +5 -0
- package/dist/components/templates/base-form/base-form.vue.js +35 -0
- package/dist/components/templates/base-form/base-form.vue3.js +5 -0
- package/dist/components/templates/modal-dialog/modal-dialog.vue.js +123 -0
- package/dist/components/templates/modal-dialog/modal-dialog.vue3.js +5 -0
- package/dist/components/templates/popover-dialog/popover-dialog.vue.js +95 -0
- package/dist/components/templates/popover-dialog/popover-dialog.vue3.js +5 -0
- package/dist/components/templates/sortable-list/sortable-list.vue.js +158 -0
- package/dist/components/templates/sortable-list/sortable-list.vue3.js +5 -0
- package/dist/components/templates/touch-wrapper/touch-wrapper.vue.js +85 -0
- package/dist/components/templates/touch-wrapper/touch-wrapper.vue3.js +5 -0
- package/dist/composables/useCameraFilter.js +56 -0
- package/dist/composables/useConfetti.js +12 -0
- package/dist/composables/useDirections.js +62 -0
- package/dist/composables/useFileUpload.js +79 -0
- package/dist/composables/useGeocoding.js +85 -0
- package/dist/composables/useGeolocation.js +71 -0
- package/dist/composables/useSanitize.js +23 -0
- package/dist/i18n.d.ts +3 -0
- package/dist/index.js +156 -0
- package/dist/locales/en.d.ts +3 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/formatDistance.js +163 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/formatLong.js +37 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/formatRelative.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/localize.js +161 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/match.js +112 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de.js +20 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US.js +20 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +70 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +33 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/localize.js +121 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/match.js +110 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr.js +20 -0
- package/dist/utilities/helpers.js +79 -0
- package/package.json +80 -25
- package/dist/ablok-components.es.js +0 -8654
- package/dist/components/atoms/base-button/base-button.spec.d.ts +0 -1
- package/dist/components/atoms/base-headline/base-headline.spec.d.ts +0 -1
- package/dist/components/atoms/base-image/base-image.spec.d.ts +0 -1
- package/dist/components/atoms/base-input/base-input.spec.d.ts +0 -1
- package/dist/components/atoms/base-paragraph/base-paragraph.spec.d.ts +0 -1
- package/dist/components/atoms/canvas-confetti/canvas-confetti.spec.d.ts +0 -1
- package/dist/components/atoms/check-group/check-group.spec.d.ts +0 -1
- package/dist/components/atoms/custom-html/custom-html.spec.d.ts +0 -1
- package/dist/components/atoms/input-checkbox/input-checkbox.spec.d.ts +0 -1
- package/dist/components/atoms/input-file/input-file.spec.d.ts +0 -1
- package/dist/components/atoms/input-passcode/input-passcode.spec.d.ts +0 -1
- package/dist/components/atoms/input-password/input-password.spec.d.ts +0 -1
- package/dist/components/atoms/input-textarea/input-textarea.spec.d.ts +0 -1
- package/dist/components/atoms/loading-spinner/loading-spinner.spec.d.ts +0 -1
- package/dist/components/atoms/radio-group/radio-group.spec.d.ts +0 -1
- package/dist/components/atoms/svg-icon/svg-icon.spec.d.ts +0 -1
- package/dist/components/atoms/zoom-slider/zoom-slider.spec.d.ts +0 -1
- package/dist/components/molecules/accordion/accordion-item.spec.d.ts +0 -1
- package/dist/components/molecules/auto-suggest/auto-suggest.spec.d.ts +0 -1
- package/dist/components/molecules/base-map/base-map.spec.d.ts +0 -1
- package/dist/components/molecules/color-palette/color-palette.spec.d.ts +0 -1
- package/dist/components/molecules/dom-renderer/dom-renderer.spec.d.ts +0 -1
- package/dist/components/molecules/file-upload/file-upload.spec.d.ts +0 -1
- package/dist/components/molecules/hint-system/hint-system.spec.d.ts +0 -1
- package/dist/components/molecules/image-crop/image-crop.spec.d.ts +0 -1
- package/dist/components/molecules/image-crop-resize/image-crop-resize.spec.d.ts +0 -1
- package/dist/components/molecules/image-resize/image-resize.spec.d.ts +0 -1
- package/dist/components/molecules/image-upload/image-upload.spec.d.ts +0 -1
- package/dist/components/molecules/image-zoom/image-zoom.spec.d.ts +0 -1
- package/dist/components/molecules/input-color/input-color.spec.d.ts +0 -1
- package/dist/components/molecules/input-datepicker/input-datepicker.spec.d.ts +0 -1
- package/dist/components/molecules/input-dropdown/input-dropdown.spec.d.ts +0 -1
- package/dist/components/molecules/link-sharing/link-sharing.spec.d.ts +0 -1
- package/dist/components/molecules/media-thumbnails/media-thumbnails.spec.d.ts +0 -1
- package/dist/components/molecules/popover-notifications/popover-notifications.spec.d.ts +0 -1
- package/dist/components/molecules/popover-tooltip/popover-tooltip.spec.d.ts +0 -1
- package/dist/components/molecules/progress-steps/progress-steps.spec.d.ts +0 -1
- package/dist/components/molecules/qr-code/qr-code.spec.d.ts +0 -1
- package/dist/components/molecules/radio-buttons/radio-buttons.spec.d.ts +0 -1
- package/dist/components/molecules/rte-editor/rte-editor.spec.d.ts +0 -1
- package/dist/components/molecules/select-media/select-media.spec.d.ts +0 -1
- package/dist/components/molecules/upload-group/upload-group.spec.d.ts +0 -1
- package/dist/components/organisms/asset-uploader/asset-uploader.spec.d.ts +0 -1
- package/dist/components/organisms/location-finder/location-finder.spec.d.ts +0 -1
- package/dist/components/templates/base-carousel/base-carousel.spec.d.ts +0 -1
- package/dist/components/templates/base-form/base-form.spec.d.ts +0 -1
- package/dist/components/templates/modal-dialog/modal-dialog.spec.d.ts +0 -1
- package/dist/components/templates/popover-dialog/popover-dialog.spec.d.ts +0 -1
- package/dist/components/templates/sortable-list/sortable-list.spec.d.ts +0 -1
- package/dist/components/templates/touch-wrapper/touch-wrapper.spec.d.ts +0 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent as o, ref as c, onMounted as s, openBlock as l, createElementBlock as r, renderSlot as m, createElementVNode as u, createCommentVNode as a } from "vue";
|
|
2
|
+
const d = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "custom-html"
|
|
5
|
+
}, i = ["innerHTML"], p = /* @__PURE__ */ o({
|
|
6
|
+
__name: "custom-html",
|
|
7
|
+
props: {
|
|
8
|
+
content: {}
|
|
9
|
+
},
|
|
10
|
+
setup(t) {
|
|
11
|
+
const e = c(!1);
|
|
12
|
+
return s(() => {
|
|
13
|
+
window !== void 0 && (e.value = !0);
|
|
14
|
+
}), (n, _) => e.value ? (l(), r("div", d, [
|
|
15
|
+
m(n.$slots, "default", {}, () => [
|
|
16
|
+
u("div", {
|
|
17
|
+
class: "custom-html__content",
|
|
18
|
+
innerHTML: t.content
|
|
19
|
+
}, null, 8, i)
|
|
20
|
+
])
|
|
21
|
+
])) : a("", !0);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
p as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { defineComponent as r, computed as c, openBlock as s, createElementBlock as m, withDirectives as f, createElementVNode as d, vModelCheckbox as p, unref as y } from "vue";
|
|
2
|
+
import { sanitizeHtml as b } from "../../../composables/useSanitize.js";
|
|
3
|
+
const h = { class: "form-check input input--checkbox" }, k = ["value", "id", "name", "required", "disabled", "true-value", "false-value"], v = ["for", "innerHTML"], g = /* @__PURE__ */ r({
|
|
4
|
+
__name: "input-checkbox",
|
|
5
|
+
props: {
|
|
6
|
+
id: {
|
|
7
|
+
type: String
|
|
8
|
+
},
|
|
9
|
+
name: {
|
|
10
|
+
type: String
|
|
11
|
+
},
|
|
12
|
+
label: {
|
|
13
|
+
type: String
|
|
14
|
+
},
|
|
15
|
+
error: {
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
readOnly: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
required: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
modelValue: {
|
|
31
|
+
type: [Boolean, Array]
|
|
32
|
+
},
|
|
33
|
+
value: {
|
|
34
|
+
type: [String, Object]
|
|
35
|
+
},
|
|
36
|
+
checked: {
|
|
37
|
+
type: Boolean
|
|
38
|
+
},
|
|
39
|
+
trueValue: {
|
|
40
|
+
type: null,
|
|
41
|
+
default: !0
|
|
42
|
+
},
|
|
43
|
+
falseValue: {
|
|
44
|
+
type: null,
|
|
45
|
+
default: !1
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
emits: ["update:modelValue", "update:checked"],
|
|
49
|
+
setup(e, { emit: i }) {
|
|
50
|
+
const t = e, a = i, u = c({
|
|
51
|
+
get() {
|
|
52
|
+
return t.modelValue || t.checked;
|
|
53
|
+
},
|
|
54
|
+
set(l) {
|
|
55
|
+
a("update:checked", l), a("update:modelValue", l);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return (l, n) => (s(), m("div", h, [
|
|
59
|
+
f(d("input", {
|
|
60
|
+
ref: "input",
|
|
61
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => u.value = o),
|
|
62
|
+
value: e.value,
|
|
63
|
+
id: e.id,
|
|
64
|
+
name: e.name,
|
|
65
|
+
type: "checkbox",
|
|
66
|
+
required: e.required,
|
|
67
|
+
disabled: e.disabled,
|
|
68
|
+
class: "form-check-input",
|
|
69
|
+
"true-value": e.trueValue,
|
|
70
|
+
"false-value": e.falseValue
|
|
71
|
+
}, null, 8, k), [
|
|
72
|
+
[p, u.value]
|
|
73
|
+
]),
|
|
74
|
+
d("label", {
|
|
75
|
+
class: "input__label form-check-label",
|
|
76
|
+
for: e.id,
|
|
77
|
+
innerHTML: y(b)(e.label || "")
|
|
78
|
+
}, null, 8, v)
|
|
79
|
+
]));
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
export {
|
|
83
|
+
g as default
|
|
84
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { defineComponent as c, computed as f, openBlock as i, createElementBlock as d, normalizeClass as y, createElementVNode as r, renderSlot as a, withDirectives as g, vModelText as S, unref as b, createCommentVNode as V } from "vue";
|
|
2
|
+
import { uniqueId as u } from "../../../utilities/helpers.js";
|
|
3
|
+
import { sanitizeHtml as h } from "../../../composables/useSanitize.js";
|
|
4
|
+
const v = { class: "input-group input__input-group" }, D = ["id", "name", "placeholder", "pattern", "disabled", "read-only", "required", "aria-label"], $ = ["for", "innerHTML"], O = /* @__PURE__ */ c({
|
|
5
|
+
__name: "input-datetime",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: [String, Number, Boolean, Date],
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
type: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "text"
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: () => u()
|
|
18
|
+
},
|
|
19
|
+
id: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: () => u()
|
|
22
|
+
},
|
|
23
|
+
label: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
placeholder: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ""
|
|
30
|
+
},
|
|
31
|
+
variant: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
disabled: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
38
|
+
},
|
|
39
|
+
readOnly: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !1
|
|
42
|
+
},
|
|
43
|
+
required: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
pattern: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: null
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
emits: ["update:modelValue"],
|
|
53
|
+
setup(e, { emit: s }) {
|
|
54
|
+
const n = e, m = s, o = f({
|
|
55
|
+
get() {
|
|
56
|
+
const t = n.modelValue && /* @__PURE__ */ new Date(`${n.modelValue}Z`), l = t && new Date(t.getTime() + (/* @__PURE__ */ new Date()).getTimezoneOffset() * -60 * 1e3).toISOString();
|
|
57
|
+
return l && l.replace("Z", "");
|
|
58
|
+
},
|
|
59
|
+
set(t) {
|
|
60
|
+
const l = t && new Date(t);
|
|
61
|
+
t = l && l.toISOString(), m("update:modelValue", t && t.replace("Z", ""));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return (t, l) => (i(), d("div", {
|
|
65
|
+
class: y(["input", `input--${e.type}`])
|
|
66
|
+
}, [
|
|
67
|
+
r("div", v, [
|
|
68
|
+
a(t.$slots, "input-prepend", { slotScope: "props" }),
|
|
69
|
+
g(r("input", {
|
|
70
|
+
"onUpdate:modelValue": l[0] || (l[0] = (p) => o.value = p),
|
|
71
|
+
type: "datetime-local",
|
|
72
|
+
id: e.id,
|
|
73
|
+
name: e.name,
|
|
74
|
+
placeholder: e.placeholder,
|
|
75
|
+
pattern: e.pattern,
|
|
76
|
+
disabled: e.disabled,
|
|
77
|
+
"read-only": e.readOnly,
|
|
78
|
+
required: e.required,
|
|
79
|
+
class: "form-control",
|
|
80
|
+
"aria-label": e.label
|
|
81
|
+
}, null, 8, D), [
|
|
82
|
+
[S, o.value]
|
|
83
|
+
]),
|
|
84
|
+
a(t.$slots, "input-append", { slotScope: "props" })
|
|
85
|
+
]),
|
|
86
|
+
a(t.$slots, "label", {}, () => [
|
|
87
|
+
e.label ? (i(), d("label", {
|
|
88
|
+
key: 0,
|
|
89
|
+
for: e.id,
|
|
90
|
+
class: "input__label",
|
|
91
|
+
innerHTML: b(h)(`${e.label}${e.required ? " *" : ""}`)
|
|
92
|
+
}, null, 8, $)) : V("", !0)
|
|
93
|
+
])
|
|
94
|
+
], 2));
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
export {
|
|
98
|
+
O as default
|
|
99
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { defineComponent as b, ref as y, reactive as h, computed as g, watch as s, openBlock as S, createElementBlock as z, normalizeClass as $, createElementVNode as l, renderSlot as d, toDisplayString as v, unref as B } from "vue";
|
|
2
|
+
import { uniqueId as r } from "../../../utilities/helpers.js";
|
|
3
|
+
import { sanitizeHtml as F } from "../../../composables/useSanitize.js";
|
|
4
|
+
const V = ["id", "name", "multiple", "accept", "disabled"], C = { class: "input__input-group input-group" }, k = ["value", "id", "name", "disabled"], q = ["for", "disabled"], w = { class: "btn btn-outline-contrast" }, x = ["for"], E = ["innerHTML"], L = /* @__PURE__ */ b({
|
|
5
|
+
__name: "input-file",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: Array,
|
|
9
|
+
default: []
|
|
10
|
+
},
|
|
11
|
+
name: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: () => r()
|
|
14
|
+
},
|
|
15
|
+
id: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: () => r()
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
placeholder: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
variant: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ""
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
readOnly: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
38
|
+
},
|
|
39
|
+
required: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !1
|
|
42
|
+
},
|
|
43
|
+
pattern: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: null
|
|
46
|
+
},
|
|
47
|
+
multiple: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
accept: {
|
|
52
|
+
type: String
|
|
53
|
+
},
|
|
54
|
+
maxFileSize: {
|
|
55
|
+
type: Number,
|
|
56
|
+
default: 0
|
|
57
|
+
},
|
|
58
|
+
dropzone: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
emits: ["update:modelValue"],
|
|
64
|
+
setup(e, { emit: m }) {
|
|
65
|
+
const i = e, f = m;
|
|
66
|
+
function p(t) {
|
|
67
|
+
const n = t.target && t.target.files;
|
|
68
|
+
n && (a.splice(0, a.length), Array.from(n).forEach((o) => {
|
|
69
|
+
if (i.maxFileSize && o.size > i.maxFileSize) {
|
|
70
|
+
console.warn(`File ${o.name} exceeds the ${i.maxFileSize} bytes size limit and will not be added.`);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
a.push(o);
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
const u = y(), a = h([]), c = g(() => a && a.map((t) => t.name));
|
|
77
|
+
return s(() => i.modelValue, (t, n) => {
|
|
78
|
+
t.length === 0 && (u.value.value = null);
|
|
79
|
+
}, { deep: !0 }), s(() => a, (t, n) => {
|
|
80
|
+
f("update:modelValue", t);
|
|
81
|
+
}, { deep: !0 }), (t, n) => (S(), z("div", {
|
|
82
|
+
class: $(["input input-file", "input-file--primary"])
|
|
83
|
+
}, [
|
|
84
|
+
l("input", {
|
|
85
|
+
ref_key: "input",
|
|
86
|
+
ref: u,
|
|
87
|
+
type: "file",
|
|
88
|
+
id: e.id,
|
|
89
|
+
name: e.name,
|
|
90
|
+
class: "d-none",
|
|
91
|
+
onChange: p,
|
|
92
|
+
multiple: e.multiple,
|
|
93
|
+
accept: e.accept,
|
|
94
|
+
disabled: e.disabled
|
|
95
|
+
}, null, 40, V),
|
|
96
|
+
l("div", C, [
|
|
97
|
+
d(t.$slots, "input-prepend"),
|
|
98
|
+
l("input", {
|
|
99
|
+
type: "text",
|
|
100
|
+
value: c.value,
|
|
101
|
+
id: e.id,
|
|
102
|
+
name: e.name,
|
|
103
|
+
class: "form-control",
|
|
104
|
+
disabled: e.disabled
|
|
105
|
+
}, null, 8, k),
|
|
106
|
+
d(t.$slots, "input-append", {}, () => [
|
|
107
|
+
l("label", {
|
|
108
|
+
for: e.id,
|
|
109
|
+
disabled: e.disabled
|
|
110
|
+
}, [
|
|
111
|
+
d(t.$slots, "button", {}, () => [
|
|
112
|
+
l("span", w, v(t.$t("common.selectFile")), 1)
|
|
113
|
+
])
|
|
114
|
+
], 8, q)
|
|
115
|
+
])
|
|
116
|
+
]),
|
|
117
|
+
l("label", { for: e.id }, [
|
|
118
|
+
d(t.$slots, "label", {}, () => [
|
|
119
|
+
l("span", {
|
|
120
|
+
class: "input__label",
|
|
121
|
+
innerHTML: B(F)(`${e.label}${e.required ? " *" : ""}`)
|
|
122
|
+
}, null, 8, E)
|
|
123
|
+
])
|
|
124
|
+
], 8, x)
|
|
125
|
+
]));
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
export {
|
|
129
|
+
L as default
|
|
130
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { defineComponent as k, ref as m, computed as I, watch as h, openBlock as r, createElementBlock as p, normalizeClass as w, createElementVNode as q, createBlock as D, Fragment as P, renderList as T, withDirectives as x, vModelText as E } from "vue";
|
|
2
|
+
import { uniqueId as y } from "../../../utilities/helpers.js";
|
|
3
|
+
import K from "../input-password/input-password.vue.js";
|
|
4
|
+
const N = { class: "input-group input__input-group" }, O = ["onUpdate:modelValue", "disabled", "readonly", "onPaste", "onInput", "onKeydown"], j = /* @__PURE__ */ k({
|
|
5
|
+
__name: "input-passcode",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: [String, Number, Boolean, Date],
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
type: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "text"
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: () => y()
|
|
18
|
+
},
|
|
19
|
+
id: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: () => y()
|
|
22
|
+
},
|
|
23
|
+
label: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
placeholder: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ""
|
|
30
|
+
},
|
|
31
|
+
variant: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
disabled: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
38
|
+
},
|
|
39
|
+
readOnly: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !1
|
|
42
|
+
},
|
|
43
|
+
required: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
maxlength: {
|
|
48
|
+
type: Number
|
|
49
|
+
},
|
|
50
|
+
pattern: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: null
|
|
53
|
+
},
|
|
54
|
+
role: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "presentation"
|
|
57
|
+
},
|
|
58
|
+
autocomplete: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: "off"
|
|
61
|
+
},
|
|
62
|
+
passcodeMatch: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ""
|
|
65
|
+
},
|
|
66
|
+
confirm: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !1
|
|
69
|
+
},
|
|
70
|
+
splitInput: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: !1
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
emits: ["update:modelValue"],
|
|
76
|
+
setup(o, { emit: g }) {
|
|
77
|
+
const d = m([]), u = m([]), n = o, c = g, i = I({
|
|
78
|
+
get() {
|
|
79
|
+
return n.modelValue;
|
|
80
|
+
},
|
|
81
|
+
set(a) {
|
|
82
|
+
n.passcodeMatch === a || !n.passcodeMatch ? c("update:modelValue", a) : c("update:modelValue", "");
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
h(() => n.modelValue, (a) => {
|
|
86
|
+
const e = a?.toString() || "";
|
|
87
|
+
for (u.value = e.split("").slice(0, n.passcodeMatch?.length || 6); u.value.length < (n.passcodeMatch?.length || 6); )
|
|
88
|
+
u.value.push("");
|
|
89
|
+
}, { immediate: !0 }), h(() => u.value, (a) => {
|
|
90
|
+
const e = a.join("");
|
|
91
|
+
n.passcodeMatch === e || !n.passcodeMatch ? c("update:modelValue", e) : c("update:modelValue", "");
|
|
92
|
+
}, { deep: !0 });
|
|
93
|
+
const v = (a, e) => {
|
|
94
|
+
a.preventDefault();
|
|
95
|
+
const s = a.clipboardData?.getData("text") || "";
|
|
96
|
+
console.log("Paste detected:", s);
|
|
97
|
+
const t = s.split(""), l = n.passcodeMatch?.length || 6;
|
|
98
|
+
t.forEach((S, B) => {
|
|
99
|
+
const f = e + B;
|
|
100
|
+
f < l && (u.value[f] = S);
|
|
101
|
+
});
|
|
102
|
+
const M = Math.min(e + t.length, l - 1);
|
|
103
|
+
setTimeout(() => d.value[M]?.focus(), 0);
|
|
104
|
+
}, b = (a, e) => {
|
|
105
|
+
n.passcodeMatch?.length, a.key === "Backspace" && !u.value[e] && e > 0 && d.value[e - 1]?.focus();
|
|
106
|
+
}, V = (a, e) => {
|
|
107
|
+
let t = a.target.value;
|
|
108
|
+
t.length > 1 && (t = t.slice(-1)), u.value[e] = t;
|
|
109
|
+
const l = n.passcodeMatch?.length || 6;
|
|
110
|
+
t && e < l - 1 && setTimeout(() => d.value[e + 1]?.focus(), 0);
|
|
111
|
+
};
|
|
112
|
+
return (a, e) => (r(), p("div", {
|
|
113
|
+
class: w(["input", "input-passcode"])
|
|
114
|
+
}, [
|
|
115
|
+
q("div", N, [
|
|
116
|
+
o.splitInput ? (r(!0), p(P, { key: 1 }, T(o.passcodeMatch, (s, t) => x((r(), p("input", {
|
|
117
|
+
key: t,
|
|
118
|
+
"onUpdate:modelValue": (l) => u.value[t] = l,
|
|
119
|
+
type: "text",
|
|
120
|
+
ref_for: !0,
|
|
121
|
+
ref: (l) => d.value[t] = l,
|
|
122
|
+
maxlength: 1,
|
|
123
|
+
disabled: o.disabled,
|
|
124
|
+
readonly: o.readOnly,
|
|
125
|
+
onPaste: (l) => v(l, t),
|
|
126
|
+
onInput: (l) => V(l, t),
|
|
127
|
+
onKeydown: (l) => b(l, t),
|
|
128
|
+
size: "1",
|
|
129
|
+
class: "form-control text-center"
|
|
130
|
+
}, null, 40, O)), [
|
|
131
|
+
[E, u.value[t]]
|
|
132
|
+
])), 128)) : (r(), D(K, {
|
|
133
|
+
key: 0,
|
|
134
|
+
modelValue: i.value,
|
|
135
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => i.value = s),
|
|
136
|
+
type: o.type,
|
|
137
|
+
placeholder: o.placeholder,
|
|
138
|
+
disabled: o.disabled,
|
|
139
|
+
readonly: o.readOnly,
|
|
140
|
+
required: o.required,
|
|
141
|
+
label: o.label
|
|
142
|
+
}, null, 8, ["modelValue", "type", "placeholder", "disabled", "readonly", "required", "label"]))
|
|
143
|
+
])
|
|
144
|
+
]));
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
export {
|
|
148
|
+
j as default
|
|
149
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { defineComponent as m, computed as f, openBlock as n, createElementBlock as c, normalizeClass as y, createElementVNode as g, createVNode as S, withCtx as p, renderSlot as u, createBlock as V, createCommentVNode as b } from "vue";
|
|
2
|
+
import { uniqueId as i } from "../../../utilities/helpers.js";
|
|
3
|
+
import w from "../base-input/base-input.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import B from "../svg-icon/svg-icon.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
const h = { class: "input-group input__input-group" }, x = /* @__PURE__ */ m({
|
|
8
|
+
__name: "input-password",
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: [String, Number, Boolean, Date],
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "text"
|
|
17
|
+
},
|
|
18
|
+
name: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: () => i()
|
|
21
|
+
},
|
|
22
|
+
id: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: () => i()
|
|
25
|
+
},
|
|
26
|
+
label: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
placeholder: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
variant: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
disabled: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
readOnly: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
required: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
maxlength: {
|
|
51
|
+
type: Number
|
|
52
|
+
},
|
|
53
|
+
pattern: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: null
|
|
56
|
+
},
|
|
57
|
+
role: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "presentation"
|
|
60
|
+
},
|
|
61
|
+
autocomplete: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "off"
|
|
64
|
+
},
|
|
65
|
+
password: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: ""
|
|
68
|
+
},
|
|
69
|
+
confirm: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: !1
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
emits: ["update:modelValue"],
|
|
75
|
+
setup(e, { emit: s }) {
|
|
76
|
+
const l = e, o = s, d = f({
|
|
77
|
+
get() {
|
|
78
|
+
return l.modelValue;
|
|
79
|
+
},
|
|
80
|
+
set(t) {
|
|
81
|
+
l.password === t || !l.password ? o("update:modelValue", t) : o("update:modelValue", "");
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
return (t, r) => (n(), c("div", {
|
|
85
|
+
class: y(["input", "input-password"])
|
|
86
|
+
}, [
|
|
87
|
+
g("div", h, [
|
|
88
|
+
S(w, {
|
|
89
|
+
modelValue: d.value,
|
|
90
|
+
"onUpdate:modelValue": r[0] || (r[0] = (a) => d.value = a),
|
|
91
|
+
type: "password",
|
|
92
|
+
placeholder: e.placeholder,
|
|
93
|
+
disabled: e.disabled,
|
|
94
|
+
readonly: e.readOnly,
|
|
95
|
+
required: e.required,
|
|
96
|
+
label: e.label
|
|
97
|
+
}, {
|
|
98
|
+
"input-prepend": p((a) => [
|
|
99
|
+
u(t.$slots, "input-prepend", { slotScope: "props" })
|
|
100
|
+
]),
|
|
101
|
+
"input-append": p((a) => [
|
|
102
|
+
u(t.$slots, "input-append", { slotScope: "props" }, () => [
|
|
103
|
+
e.confirm && e.modelValue === e.password ? (n(), V(B, {
|
|
104
|
+
key: 0,
|
|
105
|
+
symbol: "check",
|
|
106
|
+
class: "ms-2"
|
|
107
|
+
})) : b("", !0)
|
|
108
|
+
])
|
|
109
|
+
]),
|
|
110
|
+
_: 3
|
|
111
|
+
}, 8, ["modelValue", "placeholder", "disabled", "readonly", "required", "label"])
|
|
112
|
+
])
|
|
113
|
+
]));
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export {
|
|
117
|
+
x as default
|
|
118
|
+
};
|