@oneb/ui-vue 0.3.13 → 0.3.15

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.
Files changed (75) hide show
  1. package/dist/CheckIcon-09b84cf5.cjs +1 -0
  2. package/dist/CheckIcon-f1c94824.js +20 -0
  3. package/dist/ChevronDownIcon-6805ce6c.js +20 -0
  4. package/dist/ChevronDownIcon-6889ac87.cjs +1 -0
  5. package/dist/{ChevronRightIcon-8df1af46.js → ChevronRightIcon-4549a26b.js} +4 -21
  6. package/dist/ChevronRightIcon-7a2f0c20.cjs +1 -0
  7. package/dist/NoSymbolIcon-5d326416.cjs +1 -0
  8. package/dist/NoSymbolIcon-e58a9aee.js +71 -0
  9. package/dist/OneHelpMenu-66a2d4c2.cjs +1 -0
  10. package/dist/OneHelpMenu-d7a39a69.js +856 -0
  11. package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +1 -0
  12. package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-4ed993c7.js +1 -0
  13. package/dist/{SpinnerIcon-516264ba.js → SpinnerIcon-74648c98.js} +6 -5
  14. package/dist/SpinnerIcon-ccb6f3fc.cjs +1 -0
  15. package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +1 -0
  16. package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js +1 -0
  17. package/dist/button/index.cjs +1 -1
  18. package/dist/button/index.js +17 -16
  19. package/dist/buttonGroup/index.cjs +1 -0
  20. package/dist/buttonGroup/index.js +31 -0
  21. package/dist/checkbox/index.cjs +1 -0
  22. package/dist/checkbox/index.js +124 -0
  23. package/dist/collapse/index.cjs +1 -0
  24. package/dist/collapse/index.js +58 -0
  25. package/dist/common/index.cjs +1 -16
  26. package/dist/common/index.js +14 -3120
  27. package/dist/dataTable/index.cjs +1 -1
  28. package/dist/dataTable/index.js +846 -9
  29. package/dist/dropdown/index.cjs +1 -1
  30. package/dist/dropdown/index.js +792 -17
  31. package/dist/entityPicker/index.cjs +1 -0
  32. package/dist/entityPicker/index.js +584 -0
  33. package/dist/errorsPage/index.cjs +1 -0
  34. package/dist/errorsPage/index.js +63 -0
  35. package/dist/floating-ui.dom-2121a4fd.cjs +1 -0
  36. package/dist/floating-ui.dom-4509432e.js +941 -0
  37. package/dist/i18n/index.cjs +1 -0
  38. package/dist/{useI18n-2103b39e.js → i18n/index.js} +4 -4
  39. package/dist/index.cjs +1 -1
  40. package/dist/index.js +114 -10295
  41. package/dist/indicators/index.cjs +1 -0
  42. package/dist/indicators/index.js +84 -0
  43. package/dist/infobox/index.cjs +1 -0
  44. package/dist/infobox/index.js +111 -0
  45. package/dist/label/index.cjs +1 -0
  46. package/dist/label/index.js +47 -0
  47. package/dist/layout/index.cjs +1 -1
  48. package/dist/layout/index.js +115 -109
  49. package/dist/modal/index.cjs +1 -0
  50. package/dist/modal/index.js +41 -0
  51. package/dist/periodPicker/index.cjs +1 -0
  52. package/dist/periodPicker/index.js +1323 -0
  53. package/dist/radio/index.cjs +1 -0
  54. package/dist/radio/index.js +73 -0
  55. package/dist/skeleton/index.cjs +1 -0
  56. package/dist/skeleton/index.js +46 -0
  57. package/dist/style.css +1 -1
  58. package/dist/switch/index.cjs +1 -0
  59. package/dist/switch/index.js +142 -0
  60. package/dist/toast/index.cjs +1 -0
  61. package/dist/toast/index.js +140 -0
  62. package/dist/tooltip/index.cjs +1 -0
  63. package/dist/tooltip/index.js +20 -0
  64. package/dist/useModal-85f57682.js +177 -0
  65. package/dist/useModal-98810f6a.cjs +1 -0
  66. package/package.json +4 -4
  67. package/dist/ChevronRightIcon-6aa413c4.cjs +0 -1
  68. package/dist/OneHelpMenu-8e315cb3.js +0 -1791
  69. package/dist/OneHelpMenu-95ae3d5a.cjs +0 -1
  70. package/dist/SpinnerIcon-01be39fe.cjs +0 -1
  71. package/dist/index-19e93dfb.js +0 -954
  72. package/dist/index-85e729ab.cjs +0 -1
  73. package/dist/index-8b41a099.cjs +0 -1
  74. package/dist/index-98daa7ed.js +0 -862
  75. package/dist/useI18n-bcf9c640.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),G=require("../useModal-98810f6a.cjs"),H=require("../OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs");require("vue-markdown-render");require("../OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs");require("../SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs");const ne=require("../i18n/index.cjs");require("../_plugin-vue_export-helper-f246444f.cjs");const oe={key:0},ae={class:""},re={key:0,class:"space-y-1 flex flex-col"},se={key:0,class:"text-gray-400 text-xs font-light"},ie={key:0,class:"text-[10px] text-gray-500 ml-1 py-0.5 rounded-full font-semibold hover:text-info-base"},ue={key:0,class:"overflow-auto max-h-[85dvh] h-full"},ce={key:1,class:"overflow-auto max-h-[85dvh] h-full"},de={key:2,class:"pb-6"},me={key:0,class:"px-2 pt-3"},ve={key:1,class:"relative px-3 py-3"},ye={class:"relative"},fe=["placeholder"],ke={key:2,class:"px-2 py-3 h-[62px]"},pe={key:0,class:"flex items-center justify-center py-8"},ge={key:1,class:"relative px-5 py-10 text-center"},xe={class:"mb-4 text-sm text-gray-500"},he={key:2,class:"p-3 text-center mt-6"},Ee={class:"text-xs"},Be=["onClick"],Ce={class:"mr-2"},Ve={class:"w-full"},be={class:"font-bold truncate overflow-hidden sm:max-w-[400px] max-w-[280px] text-xs"},Se={key:0,class:"text-xs text-gray-600 divide-x font-thin"},we={class:"px-2 first:pl-0"},Ne=["onClick"],Le={key:1,class:"w-5 h-5 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Me={key:2,class:"w-5 h-5 text-gray-400 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},ze={key:1,class:"text-xs px-2 py-1 text-red-600"},qe=e.defineComponent({__name:"OneEntityPicker",props:{t:{type:Function,required:!1,default:void 0},title:{required:!1,type:String,default:""},icon:{type:[Object,Function,null],default:null},labelSelect:{type:String,default:""},labelClass:{type:String,default:""},iconClass:{type:String,default:""},iconClassBlock:{type:String,default:""},labelSelectNote:{type:String,default:""},labelCreateButton:{type:String,default:""},modelValue:{required:!0,type:[Object,null],default:null},items:{type:Array,default:()=>[]},entityListKey:{required:!1,type:String,default:"id"},entityListLabel:{required:!1,type:String,default:"name"},entityListAvatar:{required:!1,type:String,default:""},entityListAdditional:{required:!1,type:String,default:""},entityKey:{required:!1,type:String,default:"id"},entityAvatar:{required:!1,type:String,default:""},entityLabel:{required:!1,type:String,default:"name"},entityAdditional:{required:!1,type:String,default:""},isLoading:{required:!1,type:Boolean,default:!1},listEntityUse:{required:!1,type:Function,default:null},validation:{required:!1,type:Object,default:null},validationIndex:{required:!1,type:String,default:""},sizeModalCreateEntity:{required:!1,type:String,default:"sm"},readonly:{required:!1,type:Boolean,default:!1},variant:{type:String,default:"default",validator:l=>["default","compact","minimal","pill"].includes(l)},noCreate:{type:Boolean,default:!1},noEdit:{type:Boolean,default:!1},noSearch:{type:Boolean,default:!1},noIcon:{type:Boolean,default:!1},listEmptyMessage:{type:String,default:""}},emits:["update:modelValue","onSetEntity"],setup(l,{emit:W}){const J=ne.useOnebI18n(),n=l,V=W,v=e.computed(()=>n.t??J),c=G.useModal(),I=e.ref(null),g=e.ref(!1),x=e.ref(null),B=e.ref(!1),d=e.ref("sm"),b=e.ref(!1);let y=null;e.onMounted(()=>{y=window.matchMedia("(max-width: 767px)"),b.value=y.matches;const t=o=>{b.value=o.matches};y.addEventListener("change",t),e.onUnmounted(()=>{y==null||y.removeEventListener("change",t)})});const a=n.listEntityUse?n.listEntityUse():null,f=a==null?void 0:a.nodes,D=a==null?void 0:a.load,m=a==null?void 0:a.searchTerm,k=a==null?void 0:a.isLoading,h=a==null?void 0:a.isLoad,E=a==null?void 0:a.group,P=e.ref(null),R=e.computed(()=>(E==null?void 0:E.value)??P.value),X=t=>{E?E.value=t:P.value=t},S=e.ref(""),s=e.computed({get:()=>(m==null?void 0:m.value)??S.value,set:t=>{m?m.value=t:S.value=t}}),w=e.computed(()=>(k==null?void 0:k.value)??n.isLoading),N=e.computed(()=>(f==null?void 0:f.value)??n.items),L=e.computed(()=>n.icon),i=e.computed(()=>n.variant==="compact"||n.variant==="minimal"),Y=e.computed(()=>n.variant==="compact"),u=e.computed(()=>n.variant==="pill"),K=e.computed(()=>{const t=[];return n.validation==null||n.validationIndex==null||Object.keys(n.validation).forEach(o=>{o.startsWith(n.validationIndex)&&t.push(...n.validation[o])}),t}),M=e.computed(()=>{if(!s.value)return N.value;const t=s.value.toLowerCase();return N.value.filter(o=>{const r=A(o).toLowerCase(),$=j(o).toLowerCase();return r.includes(t)||$.includes(t)})}),Z=e.computed(()=>[...M.value].sort(t=>q(t)===z(n.modelValue)?-1:0)),C=t=>t?String(t[n.entityLabel]||""):"",Q=t=>!t||!n.entityAvatar?"":String(t[n.entityAvatar]||""),p=t=>!t||!n.entityAdditional?"":String(t[n.entityAdditional]||""),z=t=>t?t[n.entityKey]:"",q=t=>t[n.entityListKey],A=t=>String(t[n.entityListLabel]||""),_=t=>n.entityListAvatar?String(t[n.entityListAvatar]||""):"",j=t=>n.entityListAdditional?String(t[n.entityListAdditional]||""):"",O=t=>z(n.modelValue)===q(t),F=()=>{n.readonly||(S.value="",m&&(m.value=""),g.value=!1,x.value=null,B.value=!1,d.value="sm",c.open(),e.nextTick(()=>{var t;(t=I.value)==null||t.focus()}))},ee=t=>{V("update:modelValue",t),c.close()},te=()=>{V("update:modelValue",null)},U=()=>{g.value=!0,d.value=n.sizeModalCreateEntity},le=t=>{x.value=t,d.value=n.sizeModalCreateEntity},T=t=>{g.value=!1,x.value=null,B.value=!1,d.value="sm",t?(c.close(),V("update:modelValue",t)):!w.value&&N.value.length===0&&!s.value&&c.close()};return e.watch(c.isOpened,t=>{t&&D&&D(),t||(g.value=!1,d.value="sm")}),e.watch(()=>h==null?void 0:h.value,()=>{h&&!(k!=null&&k.value)&&h.value&&!s.value&&(f==null?void 0:f.value.length)===0&&(B.value=!0,d.value=n.sizeModalCreateEntity)}),(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["relative select-none",i.value?"space-y-1.5":"space-y-3"])},[e.renderSlot(t.$slots,"button",{title:l.title,modelValue:l.modelValue,openModal:()=>e.unref(c).open()},()=>[l.title?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["font-semibold pb-0",l.labelClass])},e.toDisplayString(l.title),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex justify-between z-10 items-center",[l.readonly?"":"cursor-pointer hover:bg-gray-50",i.value?["rounded-full",Y.value?"bg-[#4089E01A]":""]:"border px-3 pr-3 py-3 rounded-lg h-[72px]",u.value?"border-none !py-0 h-max !rounded-full":"",u.value&&l.modelValue!==null?"bg-[#4089E01A]":""]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center w-full gap-x-3",[i.value?"!gap-x-1 px-0.5 py-0.5":"",u.value?"h-9 p-0":""]]),onClick:F},[l.noIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["w-10 h-10 flex items-center justify-center",l.iconClassBlock])},[u.value?(e.openBlock(),e.createElementBlock("div",oe,[l.modelValue==null?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["w-3 text-blue-600",l.iconClass]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[...o[1]||(o[1]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"},null,-1)])],2)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L.value),{key:1,class:e.normalizeClass(["w-5",l.iconClass])},null,8,["class"]))])):L.value!=null&&l.modelValue==null||i.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(i.value?"":"bg-gray-50 p-2.5 rounded-lg")},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L.value),{class:e.normalizeClass([["w-5",l.iconClass],"text-gray-600"])},null,8,["class"]))],2)):l.modelValue?(e.openBlock(),e.createBlock(e.unref(H._sfc_main),{key:2,text:C(l.modelValue),src:Q(l.modelValue),rounded:!1,size:"40",class:"!rounded-lg"},null,8,["text","src"])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",ae,[l.modelValue==null?(e.openBlock(),e.createElementBlock("div",re,[e.createElementVNode("div",{class:e.normalizeClass(["font-medium text-gray-600 truncate overflow-hidden whitespace-nowrap",[i.value?"text-xs truncate max-w-[120px] text-[#525B66]":"text-sm",u.value?"!text-xs truncate max-w-[120px] text-[#4089E0]":""]])},e.toDisplayString(l.labelSelect),3),l.labelSelectNote&&!i.value&&!u.value?(e.openBlock(),e.createElementBlock("span",se,e.toDisplayString(l.labelSelectNote),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["grid items-center pr-2",i.value?"":"py-1"])},[e.createElementVNode("div",{class:e.normalizeClass(["break-all leading-4 truncate !text-sm",{"text-sm font-medium":C(l.modelValue).length<20,"text-xs font-semibold":C(l.modelValue).length>20,"truncate text-[#525B66] text-xs":i.value,"truncate text-xs":u.value}])},[e.createTextVNode(e.toDisplayString(C(l.modelValue))+" ",1),!l.readonly&&!i.value&&!u.value?(e.openBlock(),e.createElementBlock("span",ie,e.toDisplayString(v.value("ui.entity_picker.Change")),1)):e.createCommentVNode("",!0)],2),p(l.modelValue)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["font-thin leading-3 break-all line-clamp-2 pt-1 truncate !text-xs",{"text-xs":p(l.modelValue).length<20,"text-[10px]":p(l.modelValue).length>20&&p(l.modelValue).length<35,"text-[9px]":p(l.modelValue).length>35}])},[e.renderSlot(t.$slots,"entityAdditional",{item:l.modelValue},()=>[e.createTextVNode(e.toDisplayString(p(l.modelValue)),1)])],2)):e.createCommentVNode("",!0)],2))])],2),l.modelValue!=null&&!l.readonly?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:e.withModifiers(te,["stop"]),class:e.normalizeClass(["rounded-full hover:text-gray-900 text-gray-500",{"mr-2 text-[#525B66] p-0.5":i.value}])},[...o[2]||(o[2]=[e.createElementVNode("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],2)):!l.readonly&&!i.value&&!u.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"py-2.5 text-gray-500",onClick:F},[...o[3]||(o[3]=[e.createElementVNode("svg",{class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)])])):e.createCommentVNode("",!0)],2)])],2),e.unref(c).isOpened.value?(e.openBlock(),e.createBlock(e.unref(G.OneModal),{key:0,useModal:e.unref(c),title:v.value("ui.entity_picker.Select"),size:d.value,classModal:b.value,titleCenter:!0},{default:e.withCtx(()=>[g.value||B.value?(e.openBlock(),e.createElementBlock("div",ue,[e.renderSlot(t.$slots,"creating",{onCloseCreateEntity:T,find:s.value})])):x.value?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(t.$slots,"edit",{onCloseCreateEntity:T,editId:x.value})])):(e.openBlock(),e.createElementBlock("div",de,[t.$slots.modalHeader?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(t.$slots,"modalHeader")])):e.createCommentVNode("",!0),l.noSearch?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("div",ye,[o[4]||(o[4]=e.createElementVNode("svg",{class:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})],-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=r=>s.value=r),type:"text",class:"w-full pl-9 pr-3 py-2 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-base focus:border-transparent",placeholder:v.value("ui.entity_picker.Search"),ref_key:"searchInput",ref:I},null,8,fe),[[e.vModelText,s.value]])])])),e.renderSlot(t.$slots,"prepend",{selectedGroup:R.value,setSelectedGroup:X}),!w.value&&!l.noCreate&&l.labelCreateButton?(e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("button",{type:"button",onClick:U,class:"w-full flex items-center justify-center gap-2 py-2 text-blue-400 hover:text-blue-300 text-sm"},[o[5]||(o[5]=e.createElementVNode("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1)),e.createTextVNode(" "+e.toDisplayString(l.labelCreateButton),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["divide-y overflow-auto",{"sm:h-[40vh] h-[60dvh]":!l.noSearch,"sm:h-[52vh] h-[86dvh] min-h-[300px]":l.noSearch}])},[w.value?(e.openBlock(),e.createElementBlock("div",pe,[...o[6]||(o[6]=[e.createElementVNode("div",{class:"animate-spin w-6 h-6 border-2 border-primary-base border-t-transparent rounded-full"},null,-1)])])):M.value.length===0&&!s.value?(e.openBlock(),e.createElementBlock("div",ge,[e.renderSlot(t.$slots,"creating",{onCloseCreateEntity:T,find:s.value},()=>[e.createElementVNode("p",xe,e.toDisplayString(l.listEmptyMessage||v.value("ui.entity_picker.List empty")),1)])])):M.value.length===0&&s.value?(e.openBlock(),e.createElementBlock("div",he,[e.createElementVNode("p",Ee,[e.createTextVNode(e.toDisplayString(v.value("ui.entity_picker.Nothing found for"))+" ",1),e.createElementVNode("b",null,e.toDisplayString(s.value),1)]),!l.noCreate&&l.labelCreateButton?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:U,class:"w-full text-xs text-blue-400 hover:text-blue-300 mt-2"},e.toDisplayString(l.labelCreateButton)+" «"+e.toDisplayString(s.value)+"» ",1)):e.createCommentVNode("",!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(Z.value,r=>(e.openBlock(),e.createElementBlock("div",{key:q(r),class:e.normalizeClass(["flex items-center py-3 hover:bg-secondary-body-hover px-3 cursor-pointer",{"bg-gray-50 text-blue-900":O(r)}]),onClick:$=>ee(r)},[e.createElementVNode("div",Ce,[e.createVNode(e.unref(H._sfc_main),{text:A(r),src:_(r),rounded:!1,size:"30",class:"!rounded-lg"},null,8,["text","src"])]),e.createElementVNode("div",Ve,[e.createElementVNode("p",be,e.toDisplayString(A(r)),1),j(r)?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(t.$slots,"entityAdditional",{item:r},()=>[e.createElementVNode("span",we,e.toDisplayString(j(r)),1)])])):e.createCommentVNode("",!0)]),O(r)&&t.$slots.edit&&!l.noEdit?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:e.withModifiers($=>le(z(r)),["stop"]),class:"text-xs text-blue-400 hover:text-blue-300 mr-2"},e.toDisplayString(v.value("ui.entity_picker.Edit")),9,Ne)):e.createCommentVNode("",!0),O(r)?(e.openBlock(),e.createElementBlock("svg",Le,[...o[7]||(o[7]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",Me,[...o[8]||(o[8]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"},null,-1)])]))],10,Be))),128))],2)]))]),_:3},8,["useModal","title","size","classModal"])):e.createCommentVNode("",!0),K.value.length>0?(e.openBlock(),e.createElementBlock("div",ze,e.toDisplayString(K.value.join(" ")),1)):e.createCommentVNode("",!0)],64))}}),Ae={"entity_picker.Loading":"Завантаження...","entity_picker.Select":"Вибір","entity_picker.Search":"Пошук...","entity_picker.Change":"Змінити","entity_picker.Edit":"Редагувати","entity_picker.List empty":"Список порожній","entity_picker.Nothing found for":"За запитом нічого не знайдено:"};exports.OneEntityPicker=qe;exports.defaultEntityPickerTranslations=Ae;
@@ -0,0 +1,584 @@
1
+ import { defineComponent as ge, computed as f, ref as g, onMounted as me, onUnmounted as pe, watch as te, openBlock as l, createElementBlock as a, Fragment as le, createElementVNode as s, normalizeClass as u, renderSlot as m, unref as V, toDisplayString as d, createCommentVNode as c, createBlock as $, resolveDynamicComponent as ne, createTextVNode as z, withModifiers as ae, withCtx as ke, withDirectives as be, vModelText as Ce, renderList as we, createVNode as Se, nextTick as Ee } from "vue";
2
+ import { u as Ve, O as Le } from "../useModal-85f57682.js";
3
+ import { _ as se } from "../OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
4
+ import "vue-markdown-render";
5
+ import "../OneMarkdown.vue_vue_type_style_index_0_lang-4ed993c7.js";
6
+ import "../SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js";
7
+ import { useOnebI18n as Be } from "../i18n/index.js";
8
+ import "../_plugin-vue_export-helper-dad06003.js";
9
+ const Me = { key: 0 }, Ae = { class: "" }, qe = {
10
+ key: 0,
11
+ class: "space-y-1 flex flex-col"
12
+ }, je = {
13
+ key: 0,
14
+ class: "text-gray-400 text-xs font-light"
15
+ }, $e = {
16
+ key: 0,
17
+ class: "text-[10px] text-gray-500 ml-1 py-0.5 rounded-full font-semibold hover:text-info-base"
18
+ }, ze = {
19
+ key: 0,
20
+ class: "overflow-auto max-h-[85dvh] h-full"
21
+ }, Oe = {
22
+ key: 1,
23
+ class: "overflow-auto max-h-[85dvh] h-full"
24
+ }, Ie = {
25
+ key: 2,
26
+ class: "pb-6"
27
+ }, Ne = {
28
+ key: 0,
29
+ class: "px-2 pt-3"
30
+ }, Te = {
31
+ key: 1,
32
+ class: "relative px-3 py-3"
33
+ }, Ke = { class: "relative" }, Pe = ["placeholder"], Ue = {
34
+ key: 2,
35
+ class: "px-2 py-3 h-[62px]"
36
+ }, Fe = {
37
+ key: 0,
38
+ class: "flex items-center justify-center py-8"
39
+ }, Ge = {
40
+ key: 1,
41
+ class: "relative px-5 py-10 text-center"
42
+ }, He = { class: "mb-4 text-sm text-gray-500" }, We = {
43
+ key: 2,
44
+ class: "p-3 text-center mt-6"
45
+ }, Je = { class: "text-xs" }, Re = ["onClick"], Xe = { class: "mr-2" }, Ye = { class: "w-full" }, Ze = { class: "font-bold truncate overflow-hidden sm:max-w-[400px] max-w-[280px] text-xs" }, Qe = {
46
+ key: 0,
47
+ class: "text-xs text-gray-600 divide-x font-thin"
48
+ }, De = { class: "px-2 first:pl-0" }, _e = ["onClick"], et = {
49
+ key: 1,
50
+ class: "w-5 h-5 text-green-500 flex-shrink-0",
51
+ fill: "none",
52
+ viewBox: "0 0 24 24",
53
+ stroke: "currentColor",
54
+ "stroke-width": "2"
55
+ }, tt = {
56
+ key: 2,
57
+ class: "w-5 h-5 text-gray-400 flex-shrink-0",
58
+ fill: "none",
59
+ viewBox: "0 0 24 24",
60
+ stroke: "currentColor",
61
+ "stroke-width": "2"
62
+ }, lt = {
63
+ key: 1,
64
+ class: "text-xs px-2 py-1 text-red-600"
65
+ }, ct = /* @__PURE__ */ ge({
66
+ __name: "OneEntityPicker",
67
+ props: {
68
+ t: {
69
+ type: Function,
70
+ required: !1,
71
+ default: void 0
72
+ },
73
+ title: {
74
+ required: !1,
75
+ type: String,
76
+ default: ""
77
+ },
78
+ icon: {
79
+ type: [Object, Function, null],
80
+ default: null
81
+ },
82
+ labelSelect: {
83
+ type: String,
84
+ default: ""
85
+ },
86
+ labelClass: {
87
+ type: String,
88
+ default: ""
89
+ },
90
+ iconClass: {
91
+ type: String,
92
+ default: ""
93
+ },
94
+ iconClassBlock: {
95
+ type: String,
96
+ default: ""
97
+ },
98
+ labelSelectNote: {
99
+ type: String,
100
+ default: ""
101
+ },
102
+ labelCreateButton: {
103
+ type: String,
104
+ default: ""
105
+ },
106
+ modelValue: {
107
+ required: !0,
108
+ type: [Object, null],
109
+ default: null
110
+ },
111
+ // Static items (alternative to listEntityUse)
112
+ items: {
113
+ type: Array,
114
+ default: () => []
115
+ },
116
+ // Entity list keys (for items in modal list)
117
+ entityListKey: {
118
+ required: !1,
119
+ type: String,
120
+ default: "id"
121
+ },
122
+ entityListLabel: {
123
+ required: !1,
124
+ type: String,
125
+ default: "name"
126
+ },
127
+ entityListAvatar: {
128
+ required: !1,
129
+ type: String,
130
+ default: ""
131
+ },
132
+ entityListAdditional: {
133
+ required: !1,
134
+ type: String,
135
+ default: ""
136
+ },
137
+ // Entity keys for selected value display
138
+ entityKey: {
139
+ required: !1,
140
+ type: String,
141
+ default: "id"
142
+ },
143
+ entityAvatar: {
144
+ required: !1,
145
+ type: String,
146
+ default: ""
147
+ },
148
+ entityLabel: {
149
+ required: !1,
150
+ type: String,
151
+ default: "name"
152
+ },
153
+ entityAdditional: {
154
+ required: !1,
155
+ type: String,
156
+ default: ""
157
+ },
158
+ // State
159
+ isLoading: {
160
+ required: !1,
161
+ type: Boolean,
162
+ default: !1
163
+ },
164
+ // Dynamic list source (alternative to static items)
165
+ listEntityUse: {
166
+ required: !1,
167
+ type: Function,
168
+ default: null
169
+ },
170
+ // Validation
171
+ validation: {
172
+ required: !1,
173
+ type: Object,
174
+ default: null
175
+ },
176
+ validationIndex: {
177
+ required: !1,
178
+ type: String,
179
+ default: ""
180
+ },
181
+ // Modal size when creating entity
182
+ sizeModalCreateEntity: {
183
+ required: !1,
184
+ type: String,
185
+ default: "sm"
186
+ },
187
+ readonly: {
188
+ required: !1,
189
+ type: Boolean,
190
+ default: !1
191
+ },
192
+ // Variant
193
+ variant: {
194
+ type: String,
195
+ default: "default",
196
+ validator: (t) => ["default", "compact", "minimal", "pill"].includes(t)
197
+ },
198
+ // Options
199
+ noCreate: {
200
+ type: Boolean,
201
+ default: !1
202
+ },
203
+ noEdit: {
204
+ type: Boolean,
205
+ default: !1
206
+ },
207
+ noSearch: {
208
+ type: Boolean,
209
+ default: !1
210
+ },
211
+ noIcon: {
212
+ type: Boolean,
213
+ default: !1
214
+ },
215
+ listEmptyMessage: {
216
+ type: String,
217
+ default: ""
218
+ }
219
+ },
220
+ emits: ["update:modelValue", "onSetEntity"],
221
+ setup(t, { emit: oe }) {
222
+ const ie = Be(), n = t, O = oe, b = f(() => n.t ?? ie), h = Ve(), Y = g(null), L = g(!1), B = g(null), q = g(!1), p = g("sm"), I = g(!1);
223
+ let C = null;
224
+ me(() => {
225
+ C = window.matchMedia("(max-width: 767px)"), I.value = C.matches;
226
+ const e = (o) => {
227
+ I.value = o.matches;
228
+ };
229
+ C.addEventListener("change", e), pe(() => {
230
+ C == null || C.removeEventListener("change", e);
231
+ });
232
+ });
233
+ const i = n.listEntityUse ? n.listEntityUse() : null, w = i == null ? void 0 : i.nodes, Z = i == null ? void 0 : i.load, k = i == null ? void 0 : i.searchTerm, S = i == null ? void 0 : i.isLoading, M = i == null ? void 0 : i.isLoad, A = i == null ? void 0 : i.group, Q = g(null), re = f(() => (A == null ? void 0 : A.value) ?? Q.value), ue = (e) => {
234
+ A ? A.value = e : Q.value = e;
235
+ }, N = g(""), v = f({
236
+ get: () => (k == null ? void 0 : k.value) ?? N.value,
237
+ set: (e) => {
238
+ k ? k.value = e : N.value = e;
239
+ }
240
+ }), T = f(() => (S == null ? void 0 : S.value) ?? n.isLoading), K = f(() => (w == null ? void 0 : w.value) ?? n.items), P = f(() => n.icon), y = f(() => n.variant === "compact" || n.variant === "minimal"), de = f(() => n.variant === "compact"), x = f(() => n.variant === "pill"), D = f(() => {
241
+ const e = [];
242
+ return n.validation == null || n.validationIndex == null || Object.keys(n.validation).forEach((o) => {
243
+ o.startsWith(n.validationIndex) && e.push(...n.validation[o]);
244
+ }), e;
245
+ }), U = f(() => {
246
+ if (!v.value)
247
+ return K.value;
248
+ const e = v.value.toLowerCase();
249
+ return K.value.filter((o) => {
250
+ const r = H(o).toLowerCase(), X = W(o).toLowerCase();
251
+ return r.includes(e) || X.includes(e);
252
+ });
253
+ }), ce = f(() => [...U.value].sort((e) => G(e) === F(n.modelValue) ? -1 : 0)), j = (e) => e ? String(e[n.entityLabel] || "") : "", ve = (e) => !e || !n.entityAvatar ? "" : String(e[n.entityAvatar] || ""), E = (e) => !e || !n.entityAdditional ? "" : String(e[n.entityAdditional] || ""), F = (e) => e ? e[n.entityKey] : "", G = (e) => e[n.entityListKey], H = (e) => String(e[n.entityListLabel] || ""), ye = (e) => n.entityListAvatar ? String(e[n.entityListAvatar] || "") : "", W = (e) => n.entityListAdditional ? String(e[n.entityListAdditional] || "") : "", J = (e) => F(n.modelValue) === G(e), _ = () => {
254
+ n.readonly || (N.value = "", k && (k.value = ""), L.value = !1, B.value = null, q.value = !1, p.value = "sm", h.open(), Ee(() => {
255
+ var e;
256
+ (e = Y.value) == null || e.focus();
257
+ }));
258
+ }, fe = (e) => {
259
+ O("update:modelValue", e), h.close();
260
+ }, xe = () => {
261
+ O("update:modelValue", null);
262
+ }, ee = () => {
263
+ L.value = !0, p.value = n.sizeModalCreateEntity;
264
+ }, he = (e) => {
265
+ B.value = e, p.value = n.sizeModalCreateEntity;
266
+ }, R = (e) => {
267
+ L.value = !1, B.value = null, q.value = !1, p.value = "sm", e ? (h.close(), O("update:modelValue", e)) : !T.value && K.value.length === 0 && !v.value && h.close();
268
+ };
269
+ return te(h.isOpened, (e) => {
270
+ e && Z && Z(), e || (L.value = !1, p.value = "sm");
271
+ }), te(
272
+ () => M == null ? void 0 : M.value,
273
+ () => {
274
+ M && !(S != null && S.value) && M.value && !v.value && (w == null ? void 0 : w.value.length) === 0 && (q.value = !0, p.value = n.sizeModalCreateEntity);
275
+ }
276
+ ), (e, o) => (l(), a(le, null, [
277
+ s("div", {
278
+ class: u(["relative select-none", y.value ? "space-y-1.5" : "space-y-3"])
279
+ }, [
280
+ m(e.$slots, "button", {
281
+ title: t.title,
282
+ modelValue: t.modelValue,
283
+ openModal: () => V(h).open()
284
+ }, () => [
285
+ t.title ? (l(), a("p", {
286
+ key: 0,
287
+ class: u(["font-semibold pb-0", t.labelClass])
288
+ }, d(t.title), 3)) : c("", !0),
289
+ s("div", {
290
+ class: u(["flex justify-between z-10 items-center", [
291
+ t.readonly ? "" : "cursor-pointer hover:bg-gray-50",
292
+ y.value ? ["rounded-full", de.value ? "bg-[#4089E01A]" : ""] : "border px-3 pr-3 py-3 rounded-lg h-[72px]",
293
+ x.value ? "border-none !py-0 h-max !rounded-full" : "",
294
+ x.value && t.modelValue !== null ? "bg-[#4089E01A]" : ""
295
+ ]])
296
+ }, [
297
+ s("div", {
298
+ class: u(["flex items-center w-full gap-x-3", [y.value ? "!gap-x-1 px-0.5 py-0.5" : "", x.value ? "h-9 p-0" : ""]]),
299
+ onClick: _
300
+ }, [
301
+ t.noIcon ? c("", !0) : (l(), a("div", {
302
+ key: 0,
303
+ class: u(["w-10 h-10 flex items-center justify-center", t.iconClassBlock])
304
+ }, [
305
+ x.value ? (l(), a("div", Me, [
306
+ t.modelValue == null ? (l(), a("svg", {
307
+ key: 0,
308
+ class: u(["w-3 text-blue-600", t.iconClass]),
309
+ fill: "none",
310
+ viewBox: "0 0 24 24",
311
+ stroke: "currentColor",
312
+ "stroke-width": "2"
313
+ }, [...o[1] || (o[1] = [
314
+ s("path", {
315
+ "stroke-linecap": "round",
316
+ "stroke-linejoin": "round",
317
+ d: "M12 4.5v15m7.5-7.5h-15"
318
+ }, null, -1)
319
+ ])], 2)) : (l(), $(ne(P.value), {
320
+ key: 1,
321
+ class: u(["w-5", t.iconClass])
322
+ }, null, 8, ["class"]))
323
+ ])) : P.value != null && t.modelValue == null || y.value ? (l(), a("div", {
324
+ key: 1,
325
+ class: u(y.value ? "" : "bg-gray-50 p-2.5 rounded-lg")
326
+ }, [
327
+ (l(), $(ne(P.value), {
328
+ class: u([["w-5", t.iconClass], "text-gray-600"])
329
+ }, null, 8, ["class"]))
330
+ ], 2)) : t.modelValue ? (l(), $(V(se), {
331
+ key: 2,
332
+ text: j(t.modelValue),
333
+ src: ve(t.modelValue),
334
+ rounded: !1,
335
+ size: "40",
336
+ class: "!rounded-lg"
337
+ }, null, 8, ["text", "src"])) : c("", !0)
338
+ ], 2)),
339
+ s("div", Ae, [
340
+ t.modelValue == null ? (l(), a("div", qe, [
341
+ s("div", {
342
+ class: u(["font-medium text-gray-600 truncate overflow-hidden whitespace-nowrap", [
343
+ y.value ? "text-xs truncate max-w-[120px] text-[#525B66]" : "text-sm",
344
+ x.value ? "!text-xs truncate max-w-[120px] text-[#4089E0]" : ""
345
+ ]])
346
+ }, d(t.labelSelect), 3),
347
+ t.labelSelectNote && !y.value && !x.value ? (l(), a("span", je, d(t.labelSelectNote), 1)) : c("", !0)
348
+ ])) : (l(), a("div", {
349
+ key: 1,
350
+ class: u(["grid items-center pr-2", y.value ? "" : "py-1"])
351
+ }, [
352
+ s("div", {
353
+ class: u(["break-all leading-4 truncate !text-sm", {
354
+ "text-sm font-medium": j(t.modelValue).length < 20,
355
+ "text-xs font-semibold": j(t.modelValue).length > 20,
356
+ "truncate text-[#525B66] text-xs": y.value,
357
+ "truncate text-xs": x.value
358
+ }])
359
+ }, [
360
+ z(d(j(t.modelValue)) + " ", 1),
361
+ !t.readonly && !y.value && !x.value ? (l(), a("span", $e, d(b.value("ui.entity_picker.Change")), 1)) : c("", !0)
362
+ ], 2),
363
+ E(t.modelValue) ? (l(), a("div", {
364
+ key: 0,
365
+ class: u(["font-thin leading-3 break-all line-clamp-2 pt-1 truncate !text-xs", {
366
+ "text-xs": E(t.modelValue).length < 20,
367
+ "text-[10px]": E(t.modelValue).length > 20 && E(t.modelValue).length < 35,
368
+ "text-[9px]": E(t.modelValue).length > 35
369
+ }])
370
+ }, [
371
+ m(e.$slots, "entityAdditional", { item: t.modelValue }, () => [
372
+ z(d(E(t.modelValue)), 1)
373
+ ])
374
+ ], 2)) : c("", !0)
375
+ ], 2))
376
+ ])
377
+ ], 2),
378
+ t.modelValue != null && !t.readonly ? (l(), a("button", {
379
+ key: 0,
380
+ type: "button",
381
+ onClick: ae(xe, ["stop"]),
382
+ class: u(["rounded-full hover:text-gray-900 text-gray-500", { "mr-2 text-[#525B66] p-0.5": y.value }])
383
+ }, [...o[2] || (o[2] = [
384
+ s("svg", {
385
+ class: "w-4 h-4",
386
+ fill: "none",
387
+ viewBox: "0 0 24 24",
388
+ stroke: "currentColor",
389
+ "stroke-width": "2"
390
+ }, [
391
+ s("path", {
392
+ "stroke-linecap": "round",
393
+ "stroke-linejoin": "round",
394
+ d: "M6 18L18 6M6 6l12 12"
395
+ })
396
+ ], -1)
397
+ ])], 2)) : !t.readonly && !y.value && !x.value ? (l(), a("button", {
398
+ key: 1,
399
+ type: "button",
400
+ class: "py-2.5 text-gray-500",
401
+ onClick: _
402
+ }, [...o[3] || (o[3] = [
403
+ s("svg", {
404
+ class: "w-5 h-5",
405
+ fill: "none",
406
+ viewBox: "0 0 24 24",
407
+ stroke: "currentColor",
408
+ "stroke-width": "2"
409
+ }, [
410
+ s("path", {
411
+ "stroke-linecap": "round",
412
+ "stroke-linejoin": "round",
413
+ d: "M8.25 4.5l7.5 7.5-7.5 7.5"
414
+ })
415
+ ], -1)
416
+ ])])) : c("", !0)
417
+ ], 2)
418
+ ])
419
+ ], 2),
420
+ V(h).isOpened.value ? (l(), $(V(Le), {
421
+ key: 0,
422
+ useModal: V(h),
423
+ title: b.value("ui.entity_picker.Select"),
424
+ size: p.value,
425
+ classModal: I.value,
426
+ titleCenter: !0
427
+ }, {
428
+ default: ke(() => [
429
+ L.value || q.value ? (l(), a("div", ze, [
430
+ m(e.$slots, "creating", {
431
+ onCloseCreateEntity: R,
432
+ find: v.value
433
+ })
434
+ ])) : B.value ? (l(), a("div", Oe, [
435
+ m(e.$slots, "edit", {
436
+ onCloseCreateEntity: R,
437
+ editId: B.value
438
+ })
439
+ ])) : (l(), a("div", Ie, [
440
+ e.$slots.modalHeader ? (l(), a("div", Ne, [
441
+ m(e.$slots, "modalHeader")
442
+ ])) : c("", !0),
443
+ t.noSearch ? c("", !0) : (l(), a("div", Te, [
444
+ s("div", Ke, [
445
+ o[4] || (o[4] = s("svg", {
446
+ class: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400",
447
+ fill: "none",
448
+ viewBox: "0 0 24 24",
449
+ stroke: "currentColor",
450
+ "stroke-width": "2"
451
+ }, [
452
+ s("path", {
453
+ "stroke-linecap": "round",
454
+ "stroke-linejoin": "round",
455
+ d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"
456
+ })
457
+ ], -1)),
458
+ be(s("input", {
459
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => v.value = r),
460
+ type: "text",
461
+ class: "w-full pl-9 pr-3 py-2 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-base focus:border-transparent",
462
+ placeholder: b.value("ui.entity_picker.Search"),
463
+ ref_key: "searchInput",
464
+ ref: Y
465
+ }, null, 8, Pe), [
466
+ [Ce, v.value]
467
+ ])
468
+ ])
469
+ ])),
470
+ m(e.$slots, "prepend", {
471
+ selectedGroup: re.value,
472
+ setSelectedGroup: ue
473
+ }),
474
+ !T.value && !t.noCreate && t.labelCreateButton ? (l(), a("div", Ue, [
475
+ s("button", {
476
+ type: "button",
477
+ onClick: ee,
478
+ class: "w-full flex items-center justify-center gap-2 py-2 text-blue-400 hover:text-blue-300 text-sm"
479
+ }, [
480
+ o[5] || (o[5] = s("svg", {
481
+ class: "w-4 h-4",
482
+ fill: "none",
483
+ viewBox: "0 0 24 24",
484
+ stroke: "currentColor",
485
+ "stroke-width": "2"
486
+ }, [
487
+ s("path", {
488
+ "stroke-linecap": "round",
489
+ "stroke-linejoin": "round",
490
+ d: "M12 4.5v15m7.5-7.5h-15"
491
+ })
492
+ ], -1)),
493
+ z(" " + d(t.labelCreateButton), 1)
494
+ ])
495
+ ])) : c("", !0),
496
+ s("div", {
497
+ class: u(["divide-y overflow-auto", {
498
+ "sm:h-[40vh] h-[60dvh]": !t.noSearch,
499
+ "sm:h-[52vh] h-[86dvh] min-h-[300px]": t.noSearch
500
+ }])
501
+ }, [
502
+ T.value ? (l(), a("div", Fe, [...o[6] || (o[6] = [
503
+ s("div", { class: "animate-spin w-6 h-6 border-2 border-primary-base border-t-transparent rounded-full" }, null, -1)
504
+ ])])) : U.value.length === 0 && !v.value ? (l(), a("div", Ge, [
505
+ m(e.$slots, "creating", {
506
+ onCloseCreateEntity: R,
507
+ find: v.value
508
+ }, () => [
509
+ s("p", He, d(t.listEmptyMessage || b.value("ui.entity_picker.List empty")), 1)
510
+ ])
511
+ ])) : U.value.length === 0 && v.value ? (l(), a("div", We, [
512
+ s("p", Je, [
513
+ z(d(b.value("ui.entity_picker.Nothing found for")) + " ", 1),
514
+ s("b", null, d(v.value), 1)
515
+ ]),
516
+ !t.noCreate && t.labelCreateButton ? (l(), a("button", {
517
+ key: 0,
518
+ type: "button",
519
+ onClick: ee,
520
+ class: "w-full text-xs text-blue-400 hover:text-blue-300 mt-2"
521
+ }, d(t.labelCreateButton) + " «" + d(v.value) + "» ", 1)) : c("", !0)
522
+ ])) : (l(!0), a(le, { key: 3 }, we(ce.value, (r) => (l(), a("div", {
523
+ key: G(r),
524
+ class: u(["flex items-center py-3 hover:bg-secondary-body-hover px-3 cursor-pointer", { "bg-gray-50 text-blue-900": J(r) }]),
525
+ onClick: (X) => fe(r)
526
+ }, [
527
+ s("div", Xe, [
528
+ Se(V(se), {
529
+ text: H(r),
530
+ src: ye(r),
531
+ rounded: !1,
532
+ size: "30",
533
+ class: "!rounded-lg"
534
+ }, null, 8, ["text", "src"])
535
+ ]),
536
+ s("div", Ye, [
537
+ s("p", Ze, d(H(r)), 1),
538
+ W(r) ? (l(), a("div", Qe, [
539
+ m(e.$slots, "entityAdditional", { item: r }, () => [
540
+ s("span", De, d(W(r)), 1)
541
+ ])
542
+ ])) : c("", !0)
543
+ ]),
544
+ J(r) && e.$slots.edit && !t.noEdit ? (l(), a("button", {
545
+ key: 0,
546
+ type: "button",
547
+ onClick: ae((X) => he(F(r)), ["stop"]),
548
+ class: "text-xs text-blue-400 hover:text-blue-300 mr-2"
549
+ }, d(b.value("ui.entity_picker.Edit")), 9, _e)) : c("", !0),
550
+ J(r) ? (l(), a("svg", et, [...o[7] || (o[7] = [
551
+ s("path", {
552
+ "stroke-linecap": "round",
553
+ "stroke-linejoin": "round",
554
+ d: "M4.5 12.75l6 6 9-13.5"
555
+ }, null, -1)
556
+ ])])) : (l(), a("svg", tt, [...o[8] || (o[8] = [
557
+ s("path", {
558
+ "stroke-linecap": "round",
559
+ "stroke-linejoin": "round",
560
+ d: "M8.25 4.5l7.5 7.5-7.5 7.5"
561
+ }, null, -1)
562
+ ])]))
563
+ ], 10, Re))), 128))
564
+ ], 2)
565
+ ]))
566
+ ]),
567
+ _: 3
568
+ }, 8, ["useModal", "title", "size", "classModal"])) : c("", !0),
569
+ D.value.length > 0 ? (l(), a("div", lt, d(D.value.join(" ")), 1)) : c("", !0)
570
+ ], 64));
571
+ }
572
+ }), vt = {
573
+ "entity_picker.Loading": "Завантаження...",
574
+ "entity_picker.Select": "Вибір",
575
+ "entity_picker.Search": "Пошук...",
576
+ "entity_picker.Change": "Змінити",
577
+ "entity_picker.Edit": "Редагувати",
578
+ "entity_picker.List empty": "Список порожній",
579
+ "entity_picker.Nothing found for": "За запитом нічого не знайдено:"
580
+ };
581
+ export {
582
+ ct as OneEntityPicker,
583
+ vt as defaultEntityPickerTranslations
584
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../_plugin-vue_export-helper-f246444f.cjs"),s={statusMessage:{type:String,required:!1},statusText:{type:String,required:!1},requestId:{type:String,required:!1},statusCode:{type:String,default:"403"}},n=e.defineComponent({name:"ErrorPage",props:s});const a={class:"error-container"},l={class:"text-8xl text-secondary-content"},d={key:0},i={key:1,class:"pt-5"},p={class:"request-info hidden"};function c(u,t,m,g,_,y){const r=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",a,[e.createElementVNode("h1",l,e.toDisplayString(u.statusCode),1),u.statusMessage?(e.openBlock(),e.createElementBlock("p",d,e.toDisplayString(u.statusMessage),1)):e.createCommentVNode("",!0),t[4]||(t[4]=e.createElementVNode("div",{class:"border-b border-secondary-stroke w-full pt-10"},null,-1)),u.statusText?(e.openBlock(),e.createElementBlock("p",i,e.toDisplayString(u.statusText),1)):e.createCommentVNode("",!0),e.createElementVNode("div",p,[e.createElementVNode("p",null,[t[0]||(t[0]=e.createElementVNode("strong",null,"Request ID:",-1)),e.createTextVNode(" "+e.toDisplayString(u.requestId),1)]),t[1]||(t[1]=e.createElementVNode("button",{class:"copy-btn"},"Скопіювати",-1)),t[2]||(t[2]=e.createElementVNode("p",null,[e.createTextVNode(" Передайте цю інформацію розробнику або напишіть в "),e.createElementVNode("a",{href:"https://t.me/telegram_bot",target:"_blank"},"Telegram-бот")],-1))]),e.createVNode(r,{to:"/",class:"home-link"},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode("Перейти на головну сторінку",-1)])]),_:1})])}const E=o._export_sfc(n,[["render",c],["__scopeId","data-v-41b3a0e1"]]);exports.OneErrorPage=E;