prlg-ui 1.7.45 → 1.7.47

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("../Image-DIcd8Rr2.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,c=e.computed(()=>URL.createObjectURL(s.file));return(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-file",{"chat-file--image":e.unref(u.getFileTypeByMime)(l.file.type)==="image"}])},[e.createElementVNode("button",{class:"chat-file__delete",onClick:d[0]||(d[0]=a=>i("deleteFile",l.file))},[e.createVNode(e.unref(f.CloseIcon))]),e.createElementVNode("div",v,[e.unref(u.getFileTypeByMime)(l.file.type)==="image"?(e.openBlock(),e.createBlock(e.unref(u.Image),{key:0,file:c.value,size:"large",fullScreen:""},null,8,["file"])):(e.openBlock(),e.createBlock(e.unref(u.File),{key:1,file:c.value,outlined:!1},null,8,["file"]))])],2))}}),k=f._export_sfc(h,[["__scopeId","data-v-25ab2b0f"]]),B={class:"chat-field-actions"},g={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"),c=e.useTemplateRef("overlay"),l=e.ref(!1),d=e.reactive({image:{icon:e.shallowRef(m.ImageIcon),label:"Добавить изображение"},file:{icon:e.shallowRef(f.FileIcon),label:"Добавить файл"}}),a=o=>{_.openFileDialog({accept:o==="image"?["image"]:["pdf","excel","word"],maxFileSize:"5mb",maxFiles:1}).then(t=>{n.value?n.value=s.multiple?[...n.value,...t]:t:n.value=[...t],l.value=!1})};return e.onMounted(()=>{p.onClickOutside(c.value,()=>{l.value=!1},{ignore:[i.value]})}),(o,t)=>(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.Transition,{name:"slide-up"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",g,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.actions,r=>(e.openBlock(),e.createElementBlock("div",{class:"chat-field-actions__overlay-item",key:r,onClick:R=>a(r)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d[r].icon),{class:"chat-field-actions__overlay-item__icon"})),e.createElementVNode("span",b,e.toDisplayString(d[r].label),1)],8,y))),128))],512),[[e.vShow,l.value]])]),_:1}),e.createElementVNode("button",{ref:"button",onClick:t[0]||(t[0]=r=>l.value=!l.value),class:e.normalizeClass(["chat-field-actions__button",{"chat-field-actions__button--active":l.value}]),disabled:o.disabled},[e.createVNode(e.unref(m.PlusRoundedIcon))],10,C)]))}}),F=f._export_sfc(V,[["__scopeId","data-v-e64085d6"]]),E={class:"chat-field"},M={key:0,class:"chat-field__files"},N={class:"chat-field__wrapper"},I=["placeholder"],$=e.defineComponent({__name:"ChatField",props:e.mergeModels({viewActions:{type:Boolean,default:!1},actions:{default:()=>["file","image"]},placeholder:{default:"Введите сообщение"},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,c=e.useModel(s,"message"),l=e.useModel(s,"files"),d=a=>{l.value&&(l.value=l.value.filter(o=>o.name!==a.name))};return(a,o)=>(e.openBlock(),e.createElementBlock("div",E,[l.value&&l.value.length>0?(e.openBlock(),e.createElementBlock("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,t=>(e.openBlock(),e.createBlock(k,{key:t.name,file:t,onDeleteFile:d},null,8,["file"]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",N,[a.viewActions&&a.actions.length>0?(e.openBlock(),e.createBlock(F,{key:0,modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=t=>l.value=t),actions:a.actions,disabled:a.disabled},null,8,["modelValue","actions","disabled"])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=t=>c.value=t),class:"chat-field__input",placeholder:a.placeholder},null,8,I),[[e.vModelText,c.value]]),e.createElementVNode("button",{class:"chat-field__button",onClick:o[2]||(o[2]=t=>i("sendMessage"))},[e.createVNode(e.unref(m.SendIcon))])])]))}}),S={class:"bonus-summary"},w=e.defineComponent({__name:"BonusSummary",setup(s){return(n,i)=>(e.openBlock(),e.createElementBlock("div",S,[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=w;exports.ChatField=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("../Image-DIcd8Rr2.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=["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:"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;
@@ -1,35 +1,35 @@
1
- import { defineComponent as p, computed as V, createElementBlock as c, openBlock as a, normalizeClass as k, unref as u, createElementVNode as i, createVNode as _, createBlock as v, mergeModels as h, useModel as b, useTemplateRef as y, ref as w, reactive as S, shallowRef as g, onMounted as R, Transition as D, withCtx as L, withDirectives as $, Fragment as B, renderList as I, resolveDynamicComponent as T, toDisplayString as U, vShow as z, createCommentVNode as C, vModelText as N } from "vue";
2
- import { g as F, I as O, F as A } from "../Image-CHlS9buq.js";
3
- import { C as E, _ as M, F as P } from "../FileIcon-DkEbi-bi.js";
4
- import { I as j, P as q, S as x, B as H } from "../SendIcon-BGGNLlmf.js";
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-CHlS9buq.js";
3
+ import { C as A, _ as M, F as E } from "../FileIcon-DkEbi-bi.js";
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";
6
6
  import { o as J } from "../uploadFile.util-CorOn5lO.js";
7
- const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ p({
7
+ const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ g({
8
8
  __name: "ChatFile",
9
9
  props: {
10
10
  file: {}
11
11
  },
12
12
  emits: ["deleteFile"],
13
- setup(n, { emit: o }) {
14
- const d = o, r = V(() => URL.createObjectURL(n.file));
15
- return (e, m) => (a(), c("div", {
16
- class: k(["chat-file", { "chat-file--image": u(F)(e.file.type) === "image" }])
13
+ setup(r, { emit: i }) {
14
+ const d = i, u = V(() => URL.createObjectURL(r.file));
15
+ return (l, m) => (a(), o("div", {
16
+ class: C(["chat-file", { "chat-file--image": c($)(l.file.type) === "image" }])
17
17
  }, [
18
- i("button", {
18
+ n("button", {
19
19
  class: "chat-file__delete",
20
- onClick: m[0] || (m[0] = (s) => d("deleteFile", e.file))
20
+ onClick: m[0] || (m[0] = (e) => d("deleteFile", l.file))
21
21
  }, [
22
- _(u(E))
22
+ v(c(A))
23
23
  ]),
24
- i("div", K, [
25
- u(F)(e.file.type) === "image" ? (a(), v(u(O), {
24
+ n("div", K, [
25
+ c($)(l.file.type) === "image" ? (a(), p(c(O), {
26
26
  key: 0,
27
- file: r.value,
27
+ file: u.value,
28
28
  size: "large",
29
29
  fullScreen: ""
30
- }, null, 8, ["file"])) : (a(), v(u(A), {
30
+ }, null, 8, ["file"])) : (a(), p(c(x), {
31
31
  key: 1,
32
- file: r.value,
32
+ file: u.value,
33
33
  outlined: !1
34
34
  }, null, 8, ["file"]))
35
35
  ])
@@ -38,9 +38,9 @@ const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ p({
38
38
  }), W = /* @__PURE__ */ M(Q, [["__scopeId", "data-v-25ab2b0f"]]), X = { class: "chat-field-actions" }, Y = {
39
39
  ref: "overlay",
40
40
  class: "chat-field-actions__overlay"
41
- }, Z = ["onClick"], ee = { class: "chat-field-actions__overlay-item__label" }, le = ["disabled"], te = /* @__PURE__ */ p({
41
+ }, Z = ["onClick"], ee = { class: "chat-field-actions__overlay-item__label" }, le = ["disabled"], ae = /* @__PURE__ */ g({
42
42
  __name: "ChatFieldActions",
43
- props: /* @__PURE__ */ h({
43
+ props: /* @__PURE__ */ y({
44
44
  actions: {},
45
45
  disabled: { type: Boolean, default: !1 },
46
46
  multiple: { type: Boolean, default: !0 }
@@ -49,66 +49,76 @@ const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ p({
49
49
  modelModifiers: {}
50
50
  }),
51
51
  emits: ["update:modelValue"],
52
- setup(n) {
53
- const o = b(n, "modelValue"), d = y("button"), r = y("overlay"), e = w(!1), m = S({
52
+ setup(r) {
53
+ const i = b(r, "modelValue"), d = F("button"), u = F("overlay"), l = L(!1), m = w({
54
54
  image: {
55
- icon: g(j),
55
+ icon: k(P),
56
56
  label: "Добавить изображение"
57
57
  },
58
58
  file: {
59
- icon: g(P),
59
+ icon: k(E),
60
60
  label: "Добавить файл"
61
61
  }
62
- }), s = (t) => {
62
+ }), e = (s) => {
63
63
  J({
64
- accept: t === "image" ? ["image"] : ["pdf", "excel", "word"],
64
+ accept: s === "image" ? ["image"] : ["pdf", "excel", "word"],
65
65
  maxFileSize: "5mb",
66
66
  maxFiles: 1
67
- }).then((l) => {
68
- o.value ? o.value = n.multiple ? [...o.value, ...l] : l : o.value = [...l], e.value = !1;
67
+ }).then((t) => {
68
+ i.value ? i.value = r.multiple ? [...i.value, ...t] : t : i.value = [...t], l.value = !1;
69
69
  });
70
70
  };
71
- return R(() => {
72
- G(r.value, () => {
73
- e.value = !1;
71
+ return S(() => {
72
+ G(u.value, () => {
73
+ l.value = !1;
74
74
  }, { ignore: [d.value] });
75
- }), (t, l) => (a(), c("div", X, [
76
- _(D, { name: "slide-up" }, {
77
- default: L(() => [
78
- $(i("div", Y, [
79
- (a(!0), c(B, null, I(t.actions, (f) => (a(), c("div", {
75
+ }), (s, t) => (a(), o("div", X, [
76
+ v(R, { name: "slide-up" }, {
77
+ default: D(() => [
78
+ B(n("div", Y, [
79
+ (a(!0), o(I, null, T(s.actions, (f) => (a(), o("div", {
80
80
  class: "chat-field-actions__overlay-item",
81
81
  key: f,
82
- onClick: (ue) => s(f)
82
+ onClick: (ce) => e(f)
83
83
  }, [
84
- (a(), v(T(m[f].icon), { class: "chat-field-actions__overlay-item__icon" })),
85
- i("span", ee, U(m[f].label), 1)
84
+ (a(), p(U(m[f].icon), { class: "chat-field-actions__overlay-item__icon" })),
85
+ n("span", ee, h(m[f].label), 1)
86
86
  ], 8, Z))), 128))
87
87
  ], 512), [
88
- [z, e.value]
88
+ [z, l.value]
89
89
  ])
90
90
  ]),
91
91
  _: 1
92
92
  }),
93
- i("button", {
93
+ n("button", {
94
94
  ref: "button",
95
- onClick: l[0] || (l[0] = (f) => e.value = !e.value),
96
- class: k(["chat-field-actions__button", { "chat-field-actions__button--active": e.value }]),
97
- disabled: t.disabled
95
+ onClick: t[0] || (t[0] = (f) => l.value = !l.value),
96
+ class: C(["chat-field-actions__button", { "chat-field-actions__button--active": l.value }]),
97
+ disabled: s.disabled
98
98
  }, [
99
- _(u(q))
99
+ v(c(j))
100
100
  ], 10, le)
101
101
  ]));
102
102
  }
103
- }), ae = /* @__PURE__ */ M(te, [["__scopeId", "data-v-e64085d6"]]), se = { class: "chat-field" }, oe = {
103
+ }), te = /* @__PURE__ */ M(ae, [["__scopeId", "data-v-e64085d6"]]), se = { class: "chat-field" }, oe = {
104
104
  key: 0,
105
105
  class: "chat-field__files"
106
- }, ie = { class: "chat-field__wrapper" }, ne = ["placeholder"], pe = /* @__PURE__ */ p({
106
+ }, ie = { class: "chat-field__wrapper" }, ne = ["placeholder"], re = {
107
+ key: 1,
108
+ class: "chat-field__footer"
109
+ }, de = {
110
+ key: 1,
111
+ class: "chat-field__char-count"
112
+ }, ge = /* @__PURE__ */ g({
107
113
  __name: "ChatField",
108
- props: /* @__PURE__ */ h({
114
+ props: /* @__PURE__ */ y({
109
115
  viewActions: { type: Boolean, default: !1 },
110
116
  actions: { default: () => ["file", "image"] },
111
117
  placeholder: { default: "Введите сообщение" },
118
+ maxLength: {},
119
+ smallText: {},
120
+ error: { type: Boolean },
121
+ errorText: {},
112
122
  disabled: { type: Boolean, default: !1 }
113
123
  }, {
114
124
  message: { required: !0 },
@@ -116,53 +126,61 @@ const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ p({
116
126
  files: {},
117
127
  filesModifiers: {}
118
128
  }),
119
- emits: /* @__PURE__ */ h(["sendMessage"], ["update:message", "update:files"]),
120
- setup(n, { emit: o }) {
121
- const d = o, r = b(n, "message"), e = b(n, "files"), m = (s) => {
122
- e.value && (e.value = e.value.filter((t) => t.name !== s.name));
129
+ emits: /* @__PURE__ */ y(["sendMessage"], ["update:message", "update:files"]),
130
+ setup(r, { emit: i }) {
131
+ const d = i, u = b(r, "message"), l = b(r, "files"), m = (e) => {
132
+ l.value && (l.value = l.value.filter((s) => s.name !== e.name));
123
133
  };
124
- return (s, t) => (a(), c("div", se, [
125
- e.value && e.value.length > 0 ? (a(), c("div", oe, [
126
- (a(!0), c(B, null, I(e.value, (l) => (a(), v(W, {
127
- key: l.name,
128
- file: l,
134
+ return (e, s) => (a(), o("div", se, [
135
+ l.value && l.value.length > 0 ? (a(), o("div", oe, [
136
+ (a(!0), o(I, null, T(l.value, (t) => (a(), p(W, {
137
+ key: t.name,
138
+ file: t,
129
139
  onDeleteFile: m
130
140
  }, null, 8, ["file"]))), 128))
131
- ])) : C("", !0),
132
- i("div", ie, [
133
- s.viewActions && s.actions.length > 0 ? (a(), v(ae, {
141
+ ])) : _("", !0),
142
+ n("div", ie, [
143
+ e.viewActions && e.actions.length > 0 ? (a(), p(te, {
134
144
  key: 0,
135
- modelValue: e.value,
136
- "onUpdate:modelValue": t[0] || (t[0] = (l) => e.value = l),
137
- actions: s.actions,
138
- disabled: s.disabled
139
- }, null, 8, ["modelValue", "actions", "disabled"])) : C("", !0),
140
- $(i("input", {
141
- "onUpdate:modelValue": t[1] || (t[1] = (l) => r.value = l),
145
+ modelValue: l.value,
146
+ "onUpdate:modelValue": s[0] || (s[0] = (t) => l.value = t),
147
+ actions: e.actions,
148
+ disabled: e.disabled
149
+ }, null, 8, ["modelValue", "actions", "disabled"])) : _("", !0),
150
+ B(n("input", {
151
+ "onUpdate:modelValue": s[1] || (s[1] = (t) => u.value = t),
142
152
  class: "chat-field__input",
143
- placeholder: s.placeholder
153
+ maxlength: "maxLength",
154
+ placeholder: e.placeholder
144
155
  }, null, 8, ne), [
145
- [N, r.value]
156
+ [N, u.value]
146
157
  ]),
147
- i("button", {
158
+ n("button", {
148
159
  class: "chat-field__button",
149
- onClick: t[2] || (t[2] = (l) => d("sendMessage"))
160
+ onClick: s[2] || (s[2] = (t) => d("sendMessage"))
150
161
  }, [
151
- _(u(x))
162
+ v(c(q))
152
163
  ])
153
- ])
164
+ ]),
165
+ e.smallText || e.error && e.errorText || e.maxLength ? (a(), o("div", re, [
166
+ e.smallText || e.error && e.errorText ? (a(), o("div", {
167
+ key: 0,
168
+ class: C(["chat-field__small", { "chat-field__small--error": e.error }])
169
+ }, h(e.error ? e.errorText : e.smallText), 3)) : _("", !0),
170
+ e.maxLength ? (a(), o("div", de, h(u.value.length) + " / " + h(e.maxLength), 1)) : _("", !0)
171
+ ])) : _("", !0)
154
172
  ]));
155
173
  }
156
- }), de = { class: "bonus-summary" }, he = /* @__PURE__ */ p({
174
+ }), ue = { class: "bonus-summary" }, ye = /* @__PURE__ */ g({
157
175
  __name: "BonusSummary",
158
- setup(n) {
159
- return (o, d) => (a(), c("div", de, [
160
- _(u(H), { class: "bonus-summary__icon" }),
161
- d[0] || (d[0] = i("div", { class: "bonus-summary__number" }, "123", -1))
176
+ setup(r) {
177
+ return (i, d) => (a(), o("div", ue, [
178
+ v(c(H), { class: "bonus-summary__icon" }),
179
+ d[0] || (d[0] = n("div", { class: "bonus-summary__number" }, "123", -1))
162
180
  ]));
163
181
  }
164
182
  });
165
183
  export {
166
- he as BonusSummary,
167
- pe as ChatField
184
+ ye as BonusSummary,
185
+ ge as ChatField
168
186
  };
package/dist/blocks.d.ts CHANGED
@@ -7,6 +7,10 @@ declare type __VLS_Props = {
7
7
  viewActions?: boolean;
8
8
  actions?: Array<'file' | 'image'>;
9
9
  placeholder?: string;
10
+ maxLength?: number;
11
+ smallText?: string;
12
+ error?: boolean;
13
+ errorText?: string;
10
14
  disabled?: boolean;
11
15
  };
12
16