prlg-ui 1.7.53 → 1.7.54
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/Image-Bb2-xPzv.cjs +1 -0
- package/dist/Image-CFurBS6J.js +197 -0
- package/dist/blocks/index.cjs.js +1 -1
- package/dist/blocks/index.es.js +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/prlg-ui.cjs.js +1 -1
- package/dist/prlg-ui.css +1 -1
- package/dist/prlg-ui.es.js +1168 -1147
- package/dist/scss/root-vars.scss +3 -0
- package/package.json +1 -1
- package/dist/Image-CHlS9buq.js +0 -213
- package/dist/Image-DIcd8Rr2.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),i=require("./FileIcon-sxADkCIe.cjs"),p=require("./parseFileSize.util-BTDZr2sf.cjs");function _(t){return t.startsWith("image/")?"image":t==="application/pdf"?"pdf":t==="application/msword"||t==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"?"word":t==="application/vnd.ms-excel"||t==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"?"excel":"other"}const g={key:1,class:"file__title"},y={key:2,class:"file__info"},B={key:0,class:"file__type"},V={key:1,class:"file__info-separator"},C={key:2,class:"file__size"},N=e.defineComponent({__name:"File",props:{file:{},viewName:{type:Boolean,default:!1},outlined:{type:Boolean,default:!0},removable:{type:Boolean}},emits:["remove"],setup(t,{emit:u}){const s=u,n=e.useId(),l=e.ref(null);async function m(a,c="image"){const d=await(await fetch(a)).blob(),v=d.type.split("/")[1]||"",k=v?`${c}.${v}`:c;return new File([d],k,{type:d.type})}const o=e.computed(()=>l.value&&l.value.mime?_(l.value.mime):null),r=e.computed(()=>{switch(o.value){case"pdf":return i.PdfIcon;case"word":return i.WordIcon;case"excel":return i.ExcelIcon;case"other":default:return i.FileIcon}});return e.onMounted(async()=>{if(typeof t.file=="string"){const a=await m(t.file);l.value={id:n,url:t.file,name:a.name,mime:a.type,size:a.size}}else l.value=t.file}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["file",{"file--outlined":a.outlined}])},[a.removable&&typeof a.file!="string"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"file__remove",onClick:c[0]||(c[0]=f=>s("remove",a.file))},[e.createVNode(e.unref(i.CloseIcon))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{class:"file__icon"})),l.value&&l.value.name&&a.viewName?(e.openBlock(),e.createElementBlock("div",g,e.toDisplayString(l.value?l.value.name.split(".")[0]:"unknown"),1)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",y,[l.value.mime?(e.openBlock(),e.createElementBlock("div",B,e.toDisplayString(o.value),1)):e.createCommentVNode("",!0),l.value.mime&&l.value.size?(e.openBlock(),e.createElementBlock("div",V)):e.createCommentVNode("",!0),l.value.size?(e.openBlock(),e.createElementBlock("div",C,e.toDisplayString(l.value?e.unref(p.formatFileSize)(l.value.size):"0 Б"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),E=i._export_sfc(N,[["__scopeId","data-v-9dee864d"]]),F={key:0,class:"image-full-modal"},I={class:"image-full-modal__wrapper"},w={class:"image-full-modal__header"},z={class:"image-full-modal__main"},$=["src","alt"],h=e.defineComponent({__name:"ImageFullModal",props:{src:{},alt:{}},setup(t,{expose:u}){const s=e.ref(!1);return u({open:()=>{s.value=!0},close:()=>{s.value=!1}}),(n,l)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("div",{class:"image-full-modal__overlay",onClick:l[0]||(l[0]=m=>s.value=!1)}),e.createElementVNode("div",I,[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"image-full-modal__close",onClick:l[1]||(l[1]=m=>s.value=!1)},[e.createVNode(e.unref(i.CloseIcon))])]),e.createElementVNode("div",z,[e.createElementVNode("img",{src:n.src,alt:n.alt},null,8,$)]),l[2]||(l[2]=e.createElementVNode("div",{class:"image-full-modal__footer"},null,-1))])])):e.createCommentVNode("",!0)]),_:1})]))}}),b=i._export_sfc(h,[["__scopeId","data-v-edc1a47e"]]),S=["src","alt"],M={key:1,class:"image__info"},D={key:0,class:"image__size"},q=e.defineComponent({__name:"Image",props:{file:{},alt:{},size:{default:"medium"},fullScreen:{type:Boolean},viewInfo:{type:Boolean,default:!1}},setup(t){const u=e.useId(),s=e.useTemplateRef("imageFullModal"),n=e.ref(null);async function l(o,r="image"){const c=await(await fetch(o)).blob(),f=c.type.split("/")[1]||"",d=f?`${r}.${f}`:r;return new File([c],d,{type:c.type})}const m=e.computed(()=>typeof t.file=="string"?t.file:t.file.url);return e.onMounted(async()=>{if(t.viewInfo)if(typeof t.file=="string"){const o=await l(t.file);n.value={id:u,url:t.file,name:o.name,mime:o.type,size:o.size}}else n.value=t.file}),(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["image",`image--${o.size}`,{"image--full-screen":o.fullScreen}])},[o.fullScreen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image__overlay",onClick:r[0]||(r[0]=a=>s.value?.open())},[e.createVNode(e.unref(i.EyeIcon))])):e.createCommentVNode("",!0),e.createElementVNode("img",{src:m.value,alt:o.alt},null,8,S),o.viewInfo&&n.value&&(n.value.mime||n.value.size)&&o.size==="large"?(e.openBlock(),e.createElementBlock("div",M,[n.value.size?(e.openBlock(),e.createElementBlock("div",D,e.toDisplayString(n.value?e.unref(p.formatFileSize)(n.value.size):"0 Б"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2),o.fullScreen?(e.openBlock(),e.createBlock(b,{key:0,ref:"imageFullModal",src:m.value,alt:o.alt},null,8,["src","alt"])):e.createCommentVNode("",!0)],64))}}),O=i._export_sfc(q,[["__scopeId","data-v-3a012518"]]);exports.File=E;exports.Image=O;exports.getFileTypeByMime=_;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { defineComponent as F, useId as h, ref as I, computed as w, onMounted as b, createElementBlock as o, openBlock as t, normalizeClass as C, createCommentVNode as n, createBlock as $, createVNode as y, unref as p, resolveDynamicComponent as E, toDisplayString as g, Teleport as V, Transition as N, withCtx as O, createElementVNode as c, useTemplateRef as W, Fragment as j } from "vue";
|
|
2
|
+
import { F as D, E as P, W as R, P as q, C as B, _ as k, a as x } from "./FileIcon-DkEbi-bi.js";
|
|
3
|
+
import { f as S } from "./parseFileSize.util-BoDbFdVW.js";
|
|
4
|
+
function A(l) {
|
|
5
|
+
return l.startsWith("image/") ? "image" : l === "application/pdf" ? "pdf" : l === "application/msword" || l === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ? "word" : l === "application/vnd.ms-excel" || l === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ? "excel" : "other";
|
|
6
|
+
}
|
|
7
|
+
const G = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "file__title"
|
|
10
|
+
}, H = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "file__info"
|
|
13
|
+
}, J = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "file__type"
|
|
16
|
+
}, K = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "file__info-separator"
|
|
19
|
+
}, L = {
|
|
20
|
+
key: 2,
|
|
21
|
+
class: "file__size"
|
|
22
|
+
}, Q = /* @__PURE__ */ F({
|
|
23
|
+
__name: "File",
|
|
24
|
+
props: {
|
|
25
|
+
file: {},
|
|
26
|
+
viewName: { type: Boolean, default: !1 },
|
|
27
|
+
outlined: { type: Boolean, default: !0 },
|
|
28
|
+
removable: { type: Boolean }
|
|
29
|
+
},
|
|
30
|
+
emits: ["remove"],
|
|
31
|
+
setup(l, { emit: d }) {
|
|
32
|
+
const u = d, s = h(), e = I(null);
|
|
33
|
+
async function m(i, r = "image") {
|
|
34
|
+
const v = await (await fetch(i)).blob(), z = v.type.split("/")[1] || "", M = z ? `${r}.${z}` : r;
|
|
35
|
+
return new File([v], M, { type: v.type });
|
|
36
|
+
}
|
|
37
|
+
const a = w(() => e.value && e.value.mime ? A(e.value.mime) : null), f = w(() => {
|
|
38
|
+
switch (a.value) {
|
|
39
|
+
case "pdf":
|
|
40
|
+
return q;
|
|
41
|
+
case "word":
|
|
42
|
+
return R;
|
|
43
|
+
case "excel":
|
|
44
|
+
return P;
|
|
45
|
+
case "other":
|
|
46
|
+
default:
|
|
47
|
+
return D;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return b(async () => {
|
|
51
|
+
if (typeof l.file == "string") {
|
|
52
|
+
const i = await m(l.file);
|
|
53
|
+
e.value = {
|
|
54
|
+
id: s,
|
|
55
|
+
url: l.file,
|
|
56
|
+
name: i.name,
|
|
57
|
+
mime: i.type,
|
|
58
|
+
size: i.size
|
|
59
|
+
};
|
|
60
|
+
} else
|
|
61
|
+
e.value = l.file;
|
|
62
|
+
}), (i, r) => (t(), o("div", {
|
|
63
|
+
class: C(["file", { "file--outlined": i.outlined }])
|
|
64
|
+
}, [
|
|
65
|
+
i.removable && typeof i.file != "string" ? (t(), o("button", {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "file__remove",
|
|
68
|
+
onClick: r[0] || (r[0] = (_) => u("remove", i.file))
|
|
69
|
+
}, [
|
|
70
|
+
y(p(B))
|
|
71
|
+
])) : n("", !0),
|
|
72
|
+
(t(), $(E(f.value), { class: "file__icon" })),
|
|
73
|
+
e.value && e.value.name && i.viewName ? (t(), o("div", G, g(e.value ? e.value.name.split(".")[0] : "unknown"), 1)) : n("", !0),
|
|
74
|
+
e.value ? (t(), o("div", H, [
|
|
75
|
+
e.value.mime ? (t(), o("div", J, g(a.value), 1)) : n("", !0),
|
|
76
|
+
e.value.mime && e.value.size ? (t(), o("div", K)) : n("", !0),
|
|
77
|
+
e.value.size ? (t(), o("div", L, g(e.value ? p(S)(e.value.size) : "0 Б"), 1)) : n("", !0)
|
|
78
|
+
])) : n("", !0)
|
|
79
|
+
], 2));
|
|
80
|
+
}
|
|
81
|
+
}), re = /* @__PURE__ */ k(Q, [["__scopeId", "data-v-9dee864d"]]), U = {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: "image-full-modal"
|
|
84
|
+
}, X = { class: "image-full-modal__wrapper" }, Y = { class: "image-full-modal__header" }, Z = { class: "image-full-modal__main" }, T = ["src", "alt"], ee = /* @__PURE__ */ F({
|
|
85
|
+
__name: "ImageFullModal",
|
|
86
|
+
props: {
|
|
87
|
+
src: {},
|
|
88
|
+
alt: {}
|
|
89
|
+
},
|
|
90
|
+
setup(l, { expose: d }) {
|
|
91
|
+
const u = I(!1);
|
|
92
|
+
return d({
|
|
93
|
+
open: () => {
|
|
94
|
+
u.value = !0;
|
|
95
|
+
},
|
|
96
|
+
close: () => {
|
|
97
|
+
u.value = !1;
|
|
98
|
+
}
|
|
99
|
+
}), (s, e) => (t(), $(V, { to: "body" }, [
|
|
100
|
+
y(N, { name: "fade" }, {
|
|
101
|
+
default: O(() => [
|
|
102
|
+
u.value ? (t(), o("div", U, [
|
|
103
|
+
c("div", {
|
|
104
|
+
class: "image-full-modal__overlay",
|
|
105
|
+
onClick: e[0] || (e[0] = (m) => u.value = !1)
|
|
106
|
+
}),
|
|
107
|
+
c("div", X, [
|
|
108
|
+
c("div", Y, [
|
|
109
|
+
c("button", {
|
|
110
|
+
class: "image-full-modal__close",
|
|
111
|
+
onClick: e[1] || (e[1] = (m) => u.value = !1)
|
|
112
|
+
}, [
|
|
113
|
+
y(p(B))
|
|
114
|
+
])
|
|
115
|
+
]),
|
|
116
|
+
c("div", Z, [
|
|
117
|
+
c("img", {
|
|
118
|
+
src: s.src,
|
|
119
|
+
alt: s.alt
|
|
120
|
+
}, null, 8, T)
|
|
121
|
+
]),
|
|
122
|
+
e[2] || (e[2] = c("div", { class: "image-full-modal__footer" }, null, -1))
|
|
123
|
+
])
|
|
124
|
+
])) : n("", !0)
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
})
|
|
128
|
+
]));
|
|
129
|
+
}
|
|
130
|
+
}), le = /* @__PURE__ */ k(ee, [["__scopeId", "data-v-edc1a47e"]]), ae = ["src", "alt"], te = {
|
|
131
|
+
key: 1,
|
|
132
|
+
class: "image__info"
|
|
133
|
+
}, se = {
|
|
134
|
+
key: 0,
|
|
135
|
+
class: "image__size"
|
|
136
|
+
}, ie = /* @__PURE__ */ F({
|
|
137
|
+
__name: "Image",
|
|
138
|
+
props: {
|
|
139
|
+
file: {},
|
|
140
|
+
alt: {},
|
|
141
|
+
size: { default: "medium" },
|
|
142
|
+
fullScreen: { type: Boolean },
|
|
143
|
+
viewInfo: { type: Boolean, default: !1 }
|
|
144
|
+
},
|
|
145
|
+
setup(l) {
|
|
146
|
+
const d = h(), u = W("imageFullModal"), s = I(null);
|
|
147
|
+
async function e(a, f = "image") {
|
|
148
|
+
const r = await (await fetch(a)).blob(), _ = r.type.split("/")[1] || "", v = _ ? `${f}.${_}` : f;
|
|
149
|
+
return new File([r], v, { type: r.type });
|
|
150
|
+
}
|
|
151
|
+
const m = w(() => typeof l.file == "string" ? l.file : l.file.url);
|
|
152
|
+
return b(async () => {
|
|
153
|
+
if (l.viewInfo)
|
|
154
|
+
if (typeof l.file == "string") {
|
|
155
|
+
const a = await e(l.file);
|
|
156
|
+
s.value = {
|
|
157
|
+
id: d,
|
|
158
|
+
url: l.file,
|
|
159
|
+
name: a.name,
|
|
160
|
+
mime: a.type,
|
|
161
|
+
size: a.size
|
|
162
|
+
};
|
|
163
|
+
} else
|
|
164
|
+
s.value = l.file;
|
|
165
|
+
}), (a, f) => (t(), o(j, null, [
|
|
166
|
+
c("div", {
|
|
167
|
+
class: C(["image", `image--${a.size}`, { "image--full-screen": a.fullScreen }])
|
|
168
|
+
}, [
|
|
169
|
+
a.fullScreen ? (t(), o("div", {
|
|
170
|
+
key: 0,
|
|
171
|
+
class: "image__overlay",
|
|
172
|
+
onClick: f[0] || (f[0] = (i) => u.value?.open())
|
|
173
|
+
}, [
|
|
174
|
+
y(p(x))
|
|
175
|
+
])) : n("", !0),
|
|
176
|
+
c("img", {
|
|
177
|
+
src: m.value,
|
|
178
|
+
alt: a.alt
|
|
179
|
+
}, null, 8, ae),
|
|
180
|
+
a.viewInfo && s.value && (s.value.mime || s.value.size) && a.size === "large" ? (t(), o("div", te, [
|
|
181
|
+
s.value.size ? (t(), o("div", se, g(s.value ? p(S)(s.value.size) : "0 Б"), 1)) : n("", !0)
|
|
182
|
+
])) : n("", !0)
|
|
183
|
+
], 2),
|
|
184
|
+
a.fullScreen ? (t(), $(le, {
|
|
185
|
+
key: 0,
|
|
186
|
+
ref: "imageFullModal",
|
|
187
|
+
src: m.value,
|
|
188
|
+
alt: a.alt
|
|
189
|
+
}, null, 8, ["src", "alt"])) : n("", !0)
|
|
190
|
+
], 64));
|
|
191
|
+
}
|
|
192
|
+
}), ce = /* @__PURE__ */ k(ie, [["__scopeId", "data-v-3a012518"]]);
|
|
193
|
+
export {
|
|
194
|
+
re as F,
|
|
195
|
+
ce as I,
|
|
196
|
+
A as g
|
|
197
|
+
};
|
package/dist/blocks/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("../Image-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("../Image-Bb2-xPzv.cjs"),f=require("../FileIcon-sxADkCIe.cjs"),m=require("../SendIcon-_UxV_dOO.cjs"),p=require("../parseFileSize.util-BTDZr2sf.cjs"),_=require("../uploadFile.util-Du5cumgy.cjs"),v={class:"chat-file__content"},h=e.defineComponent({__name:"ChatFile",props:{file:{}},emits:["deleteFile"],setup(s,{emit:n}){const i=n,r=e.computed(()=>URL.createObjectURL(s.file));return(t,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-file",{"chat-file--image":e.unref(u.getFileTypeByMime)(t.file.type)==="image"}])},[e.createElementVNode("button",{class:"chat-file__delete",onClick:c[0]||(c[0]=l=>i("deleteFile",t.file))},[e.createVNode(e.unref(f.CloseIcon))]),e.createElementVNode("div",v,[e.unref(u.getFileTypeByMime)(t.file.type)==="image"?(e.openBlock(),e.createBlock(e.unref(u.Image),{key:0,file:r.value,size:"large",fullScreen:""},null,8,["file"])):(e.openBlock(),e.createBlock(e.unref(u.File),{key:1,file:r.value,outlined:!1},null,8,["file"]))])],2))}}),k=f._export_sfc(h,[["__scopeId","data-v-25ab2b0f"]]),g={class:"chat-field-actions"},B={ref:"overlay",class:"chat-field-actions__overlay"},y=["onClick"],b={class:"chat-field-actions__overlay-item__label"},C=["disabled"],V=e.defineComponent({__name:"ChatFieldActions",props:e.mergeModels({actions:{},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const n=e.useModel(s,"modelValue"),i=e.useTemplateRef("button"),r=e.useTemplateRef("overlay"),t=e.ref(!1),c=e.reactive({image:{icon:e.shallowRef(m.ImageIcon),label:"Добавить изображение"},file:{icon:e.shallowRef(f.FileIcon),label:"Добавить файл"}}),l=a=>{_.openFileDialog({accept:a==="image"?["image"]:["pdf","excel","word"],maxFileSize:"5mb",maxFiles:1}).then(o=>{n.value?n.value=s.multiple?[...n.value,...o]:o:n.value=[...o],t.value=!1})};return e.onMounted(()=>{p.onClickOutside(r.value,()=>{t.value=!1},{ignore:[i.value]})}),(a,o)=>(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(e.Transition,{name:"slide-up"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.actions,d=>(e.openBlock(),e.createElementBlock("div",{class:"chat-field-actions__overlay-item",key:d,onClick:D=>l(d)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c[d].icon),{class:"chat-field-actions__overlay-item__icon"})),e.createElementVNode("span",b,e.toDisplayString(c[d].label),1)],8,y))),128))],512),[[e.vShow,t.value]])]),_:1}),e.createElementVNode("button",{ref:"button",onClick:o[0]||(o[0]=d=>t.value=!t.value),class:e.normalizeClass(["chat-field-actions__button",{"chat-field-actions__button--active":t.value}]),disabled:a.disabled},[e.createVNode(e.unref(m.PlusRoundedIcon))],10,C)]))}}),F=f._export_sfc(V,[["__scopeId","data-v-e64085d6"]]),E={class:"chat-field"},N={key:0,class:"chat-field__files"},M={class:"chat-field__wrapper"},T=["maxlength","placeholder"],S={key:1,class:"chat-field__footer"},$={key:1,class:"chat-field__char-count"},I=e.defineComponent({__name:"ChatField",props:e.mergeModels({viewActions:{type:Boolean,default:!1},actions:{default:()=>["file","image"]},placeholder:{default:"Введите сообщение"},maxLength:{},smallText:{},error:{type:Boolean},errorText:{},disabled:{type:Boolean,default:!1}},{message:{required:!0},messageModifiers:{},files:{},filesModifiers:{}}),emits:e.mergeModels(["sendMessage"],["update:message","update:files"]),setup(s,{emit:n}){const i=n,r=e.useModel(s,"message"),t=e.useModel(s,"files"),c=l=>{t.value&&(t.value=t.value.filter(a=>a.name!==l.name))};return(l,a)=>(e.openBlock(),e.createElementBlock("div",E,[t.value&&t.value.length>0?(e.openBlock(),e.createElementBlock("div",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,o=>(e.openBlock(),e.createBlock(k,{key:o.name,file:o,onDeleteFile:c},null,8,["file"]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",M,[l.viewActions&&l.actions.length>0?(e.openBlock(),e.createBlock(F,{key:0,modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),actions:l.actions,disabled:l.disabled},null,8,["modelValue","actions","disabled"])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=o=>r.value=o),class:"chat-field__input",maxlength:l.maxLength,placeholder:l.placeholder},null,8,T),[[e.vModelText,r.value]]),e.createElementVNode("button",{class:"chat-field__button",onClick:a[2]||(a[2]=o=>i("sendMessage"))},[e.createVNode(e.unref(m.SendIcon))])]),l.smallText||l.error&&l.errorText||l.maxLength?(e.openBlock(),e.createElementBlock("div",S,[l.smallText||l.error&&l.errorText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["chat-field__small",{"chat-field__small--error":l.error}])},e.toDisplayString(l.error?l.errorText:l.smallText),3)):e.createCommentVNode("",!0),l.maxLength?(e.openBlock(),e.createElementBlock("div",$,e.toDisplayString(r.value.length)+" / "+e.toDisplayString(l.maxLength),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}}),w={class:"bonus-summary"},L=e.defineComponent({__name:"BonusSummary",setup(s){return(n,i)=>(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(e.unref(m.BonusIcon),{class:"bonus-summary__icon"}),i[0]||(i[0]=e.createElementVNode("div",{class:"bonus-summary__number"},"123",-1))]))}});exports.BonusSummary=L;exports.ChatField=I;
|
package/dist/blocks/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as g, computed as V, createElementBlock as o, openBlock as a, normalizeClass as C, unref as c, createElementVNode as n, createVNode as v, createBlock as p, mergeModels as y, useModel as b, useTemplateRef as F, ref as L, reactive as w, shallowRef as k, onMounted as S, Transition as R, withCtx as D, withDirectives as B, Fragment as I, renderList as T, resolveDynamicComponent as U, toDisplayString as h, vShow as z, createCommentVNode as _, vModelText as N } from "vue";
|
|
2
|
-
import { g as $, I as O, F as x } from "../Image-
|
|
2
|
+
import { g as $, I as O, F as x } from "../Image-CFurBS6J.js";
|
|
3
3
|
import { C as A, _ as M, F as E } from "../FileIcon-DkEbi-bi.js";
|
|
4
4
|
import { I as P, P as j, S as q, B as H } from "../SendIcon-BGGNLlmf.js";
|
|
5
5
|
import { o as G } from "../parseFileSize.util-BoDbFdVW.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -246,8 +246,9 @@ declare type __VLS_Props_14 = {
|
|
|
246
246
|
declare type __VLS_Props_15 = {
|
|
247
247
|
file: string | IFile_2;
|
|
248
248
|
alt?: string;
|
|
249
|
-
size?: 'small' | 'medium' | 'large';
|
|
249
|
+
size?: 'small' | 'medium' | 'large' | 'full';
|
|
250
250
|
fullScreen?: boolean;
|
|
251
|
+
viewInfo?: boolean;
|
|
251
252
|
};
|
|
252
253
|
|
|
253
254
|
declare type __VLS_Props_16 = {
|
|
@@ -302,6 +303,7 @@ declare type __VLS_Props_23 = {
|
|
|
302
303
|
title?: string;
|
|
303
304
|
style?: CSSProperties;
|
|
304
305
|
position?: 'top' | 'center' | 'bottom';
|
|
306
|
+
zIndex?: 1002;
|
|
305
307
|
};
|
|
306
308
|
|
|
307
309
|
declare type __VLS_Props_24 = {
|
|
@@ -336,9 +338,13 @@ declare type __VLS_Props_3 = PaginatorProps;
|
|
|
336
338
|
|
|
337
339
|
declare type __VLS_Props_4 = {
|
|
338
340
|
label?: string;
|
|
339
|
-
value?: string | number
|
|
341
|
+
value?: string | number;
|
|
342
|
+
trueValue?: string | boolean;
|
|
343
|
+
falseValue?: string | boolean;
|
|
344
|
+
name?: string;
|
|
340
345
|
disabled?: boolean;
|
|
341
346
|
checked?: boolean;
|
|
347
|
+
indeterminate?: boolean;
|
|
342
348
|
size?: 'small' | 'default' | 'large';
|
|
343
349
|
};
|
|
344
350
|
|
|
@@ -995,6 +1001,7 @@ declare type DrawerProps = {
|
|
|
995
1001
|
width?: number | string;
|
|
996
1002
|
beforeClose?: (next: () => void) => void;
|
|
997
1003
|
wrapperNoStyle?: boolean;
|
|
1004
|
+
zIndex?: number;
|
|
998
1005
|
};
|
|
999
1006
|
|
|
1000
1007
|
export declare const Dropdown: DefineComponent<DropdownProps>;
|