@avakhula/ui 0.0.111 → 0.0.112

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/index.js CHANGED
@@ -19552,6 +19552,7 @@ class sa {
19552
19552
  return this.tooltipContainer;
19553
19553
  }
19554
19554
  createTooltip(n, e) {
19555
+ debugger;
19555
19556
  console.log("create tooltip"), console.log(e == null ? void 0 : e.length);
19556
19557
  const i = `
19557
19558
  position: absolute;
@@ -206,7 +206,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
206
206
  <rect x="7" y="9.5" width="11" height="2" rx="1" class="fill" fill="#1A1A1A"/>
207
207
  <rect x="7" y="14.5" width="11" height="2" rx="1" class="fill" fill="#1A1A1A"/>
208
208
  </svg>
209
- `,E1="",at=mt.import("ui/icons");at.bold=Uf,at.italic=Kf,at.underline=Gf,at.strike=Yf,at["code-block"]=Zf,at.link=Wf,at.align[""]=Jf,at.align.center=Xf,at.align.right=Qf,at.align.justify=eh,at.list.ordered=th,at.list.bullet=nh,at["alphabet-list"]=rh,mt.register({"formats/alphabet-list":qt,"formats/alphabet-list/item":er}),mt.register(at),mt.debug("error");const ih={name:"IbTextEditor",props:{placeholder:{type:String,default:""},modelValue:{type:String},content:{type:String,default:""},readOnly:{type:Boolean,default:!1},enable:{type:Boolean,default:!0},modules:{type:[Object,Array],default:()=>{}},options:{type:Object,default:()=>{}},characterLimit:{type:[String,Number],default:null},error:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},errorMessage:{type:String,default:""},characterLimitErrorMessage:{type:String,default:""},height:{type:String}},mounted(){this.$refs.toolbar.classList.remove("ql-toolbar");const t=this.$refs.wrapper.querySelector("input[data-link]");t.dataset.link="Enter Link",this.updateCharacterLength()},data(){return{data:this.modelValue?this.modelValue:this.content,characterLength:0,isFocus:!1}},watch:{content(t){this.data=t},data(t){this.$emit("update:modelValue",t)}},methods:{onChange(){this.updateCharacterLength(),this.$emit("change",this.data)},onBlur(t){this.$emit("blur",this.data,t),this.isFocus=!1},onFocus(){this.isFocus=!0},updateCharacterLength(){this.characterLength=this.$refs.quill.getText().length-1}},computed:{config(){const t={placeholder:this.data.length?"":this.placeholder,readOnly:this.readOnly?this.readOnly:this.disable,enable:this.enable};return Object.assign(t,this.options)},characterOverLimit(){return!!this.characterLimit&&this.characterLength>this.characterLimit}},components:{QuillEditor:qf,IbIconButton:ut,IbAlert:It,IbCharacterCount:Di}},oh={id:"toolbar",class:"toolbar",ref:"toolbar"},ah=i.createStaticVNode('<div class="toolbar-group header-toolbar-group"><select class="ql-header"><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option><option selected></option></select></div>',1),lh={class:"toolbar-group"},sh=i.createElementVNode("div",{class:"toolbar-group"},[i.createElementVNode("select",{class:"ql-background"}),i.createElementVNode("select",{class:"ql-color"})],-1),dh={class:"toolbar-group"},ch={class:"toolbar-group"},uh={class:"toolbar-group"};function fh(t,n,e,o,a,r){const s=i.resolveComponent("ib-character-count"),l=i.resolveComponent("ib-alert"),u=i.resolveComponent("QuillEditor"),h=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["textarea-wrapper",{error:r.characterOverLimit||e.error||e.errorMessage.length,focus:a.isFocus,disable:e.disable}])},[e.characterLimit?(i.openBlock(),i.createBlock(s,{key:0,"character-limit":e.characterLimit,"character-length":a.characterLength},null,8,["character-limit","character-length"])):i.createCommentVNode("",!0),e.errorMessage.length?(i.openBlock(),i.createBlock(l,{key:1,class:"error-message"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.withDirectives(i.createVNode(l,{class:"error-message"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.characterLimitErrorMessage),1)]),_:1},512),[[i.vShow,e.characterLimitErrorMessage.length&&r.characterOverLimit]]),i.createElementVNode("div",{class:i.normalizeClass(["ib-text-editor-wrapper",{disable:e.disable}])},[i.createElementVNode("div",{class:"ib-text-editor",style:i.normalizeStyle({height:e.height?e.height+"px":""}),ref:"wrapper"},[i.createVNode(u,{onTextChange:r.onChange,onBlur:r.onBlur,onFocus:r.onFocus,ref:"quill",toolbar:"#toolbar",content:a.data,"onUpdate:content":n[0]||(n[0]=p=>a.data=p),contentType:"html",options:r.config,modules:e.modules},null,8,["onTextChange","onBlur","onFocus","content","options","modules"])],4),i.createElementVNode("div",oh,[ah,i.createElementVNode("div",lh,[i.createVNode(h,{class:"toolbar-item ql-bold",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-italic",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-underline",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-strike",kind:"ghost"})]),sh,i.createElementVNode("div",dh,[i.createVNode(h,{class:"toolbar-item ql-code-block",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-link",kind:"ghost"})]),i.createElementVNode("div",ch,[i.createVNode(h,{class:"toolbar-item ql-align",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"center",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"right",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"justify",kind:"ghost"})]),i.createElementVNode("div",uh,[i.createVNode(h,{class:"ql-list toolbar-item",value:"ordered",kind:"ghost"}),i.createVNode(h,{class:"ql-list toolbar-item",value:"bullet",kind:"ghost"}),i.createVNode(h,{class:"ql-alphabet-list alphabet-list toolbar-item",kind:"ghost"})])],512)],2)],2)}const hh=_e(ih,[["render",fh]]),S1="",ph={name:"IbTable",computed:{hasThead(){return!!this.$slots.thead}}},mh={class:"ib-table-wrapper"},gh={class:"ib-table"};function yh(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("div",mh,[i.createElementVNode("table",gh,[r.hasThead?i.renderSlot(t.$slots,"thead",{key:0},void 0,!0):i.createCommentVNode("",!0),i.createElementVNode("tbody",null,[i.renderSlot(t.$slots,"tbody",{},void 0,!0)])])])}const vh=_e(ph,[["render",yh],["__scopeId","data-v-5dceb760"]]),N1="",bh={name:"IbRow"},_h={class:"ib-tr"};function $h(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("tr",_h,[i.renderSlot(t.$slots,"default",{ref:"row"})])}const wh=_e(bh,[["render",$h]]),x1="",kh={name:"IbCell",props:{fixed:{type:Boolean,default:!1}},data(){return{attr:{}}},mounted(){this.fixed&&this.freezeCol()},methods:{freezeCol(){const t=this.$el.getBoundingClientRect(),n=this.$el.closest("tr").getBoundingClientRect();this.attr.style||(this.attr.style={}),this.attr.style.minWidth=`${t.width}px`,this.attr.style.left=`${t.left-n.left}px`,this.attr.class+=" fixed"}}},Ch={class:"cell"};function Oh(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("td",i.mergeProps({onResize:n[0]||(n[0]=(...s)=>r.freezeCol&&r.freezeCol(...s)),class:"ib-cell"},this.attr),[i.createElementVNode("div",Ch,[i.renderSlot(t.$slots,"default",{},void 0,!0)])],16)}const Mo=_e(kh,[["render",Oh],["__scopeId","data-v-e74bb0f3"]]),T1="",Eh={name:"IbCheckboxCell",props:{isChecked:{type:Boolean,default:!1},fixed:{type:Boolean,default:!1}},components:{IbCell:Mo,IbCheckbox:vr}};function Sh(t,n,e,o,a,r){const s=i.resolveComponent("ib-checkbox"),l=i.resolveComponent("ib-cell");return i.openBlock(),i.createBlock(l,{fixed:e.fixed,class:"ib-checkbox-cell"},{default:i.withCtx(()=>[i.createVNode(s,{"is-checked":e.isChecked},null,8,["is-checked"])]),_:1},8,["fixed"])}const Nh=_e(Eh,[["render",Sh]]);class Po{constructor(){this.tooltipInstance=null,this.tooltipContainer=null}getTooltipInstance(){return this.getTooltipInstance}getTooltipContainer(){return this.tooltipContainer}createTooltip(n,e){console.log("create tooltip"),console.log(e==null?void 0:e.length);const o=`
209
+ `,E1="",at=mt.import("ui/icons");at.bold=Uf,at.italic=Kf,at.underline=Gf,at.strike=Yf,at["code-block"]=Zf,at.link=Wf,at.align[""]=Jf,at.align.center=Xf,at.align.right=Qf,at.align.justify=eh,at.list.ordered=th,at.list.bullet=nh,at["alphabet-list"]=rh,mt.register({"formats/alphabet-list":qt,"formats/alphabet-list/item":er}),mt.register(at),mt.debug("error");const ih={name:"IbTextEditor",props:{placeholder:{type:String,default:""},modelValue:{type:String},content:{type:String,default:""},readOnly:{type:Boolean,default:!1},enable:{type:Boolean,default:!0},modules:{type:[Object,Array],default:()=>{}},options:{type:Object,default:()=>{}},characterLimit:{type:[String,Number],default:null},error:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},errorMessage:{type:String,default:""},characterLimitErrorMessage:{type:String,default:""},height:{type:String}},mounted(){this.$refs.toolbar.classList.remove("ql-toolbar");const t=this.$refs.wrapper.querySelector("input[data-link]");t.dataset.link="Enter Link",this.updateCharacterLength()},data(){return{data:this.modelValue?this.modelValue:this.content,characterLength:0,isFocus:!1}},watch:{content(t){this.data=t},data(t){this.$emit("update:modelValue",t)}},methods:{onChange(){this.updateCharacterLength(),this.$emit("change",this.data)},onBlur(t){this.$emit("blur",this.data,t),this.isFocus=!1},onFocus(){this.isFocus=!0},updateCharacterLength(){this.characterLength=this.$refs.quill.getText().length-1}},computed:{config(){const t={placeholder:this.data.length?"":this.placeholder,readOnly:this.readOnly?this.readOnly:this.disable,enable:this.enable};return Object.assign(t,this.options)},characterOverLimit(){return!!this.characterLimit&&this.characterLength>this.characterLimit}},components:{QuillEditor:qf,IbIconButton:ut,IbAlert:It,IbCharacterCount:Di}},oh={id:"toolbar",class:"toolbar",ref:"toolbar"},ah=i.createStaticVNode('<div class="toolbar-group header-toolbar-group"><select class="ql-header"><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option><option selected></option></select></div>',1),lh={class:"toolbar-group"},sh=i.createElementVNode("div",{class:"toolbar-group"},[i.createElementVNode("select",{class:"ql-background"}),i.createElementVNode("select",{class:"ql-color"})],-1),dh={class:"toolbar-group"},ch={class:"toolbar-group"},uh={class:"toolbar-group"};function fh(t,n,e,o,a,r){const s=i.resolveComponent("ib-character-count"),l=i.resolveComponent("ib-alert"),u=i.resolveComponent("QuillEditor"),h=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["textarea-wrapper",{error:r.characterOverLimit||e.error||e.errorMessage.length,focus:a.isFocus,disable:e.disable}])},[e.characterLimit?(i.openBlock(),i.createBlock(s,{key:0,"character-limit":e.characterLimit,"character-length":a.characterLength},null,8,["character-limit","character-length"])):i.createCommentVNode("",!0),e.errorMessage.length?(i.openBlock(),i.createBlock(l,{key:1,class:"error-message"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.withDirectives(i.createVNode(l,{class:"error-message"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.characterLimitErrorMessage),1)]),_:1},512),[[i.vShow,e.characterLimitErrorMessage.length&&r.characterOverLimit]]),i.createElementVNode("div",{class:i.normalizeClass(["ib-text-editor-wrapper",{disable:e.disable}])},[i.createElementVNode("div",{class:"ib-text-editor",style:i.normalizeStyle({height:e.height?e.height+"px":""}),ref:"wrapper"},[i.createVNode(u,{onTextChange:r.onChange,onBlur:r.onBlur,onFocus:r.onFocus,ref:"quill",toolbar:"#toolbar",content:a.data,"onUpdate:content":n[0]||(n[0]=p=>a.data=p),contentType:"html",options:r.config,modules:e.modules},null,8,["onTextChange","onBlur","onFocus","content","options","modules"])],4),i.createElementVNode("div",oh,[ah,i.createElementVNode("div",lh,[i.createVNode(h,{class:"toolbar-item ql-bold",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-italic",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-underline",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-strike",kind:"ghost"})]),sh,i.createElementVNode("div",dh,[i.createVNode(h,{class:"toolbar-item ql-code-block",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-link",kind:"ghost"})]),i.createElementVNode("div",ch,[i.createVNode(h,{class:"toolbar-item ql-align",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"center",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"right",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"justify",kind:"ghost"})]),i.createElementVNode("div",uh,[i.createVNode(h,{class:"ql-list toolbar-item",value:"ordered",kind:"ghost"}),i.createVNode(h,{class:"ql-list toolbar-item",value:"bullet",kind:"ghost"}),i.createVNode(h,{class:"ql-alphabet-list alphabet-list toolbar-item",kind:"ghost"})])],512)],2)],2)}const hh=_e(ih,[["render",fh]]),S1="",ph={name:"IbTable",computed:{hasThead(){return!!this.$slots.thead}}},mh={class:"ib-table-wrapper"},gh={class:"ib-table"};function yh(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("div",mh,[i.createElementVNode("table",gh,[r.hasThead?i.renderSlot(t.$slots,"thead",{key:0},void 0,!0):i.createCommentVNode("",!0),i.createElementVNode("tbody",null,[i.renderSlot(t.$slots,"tbody",{},void 0,!0)])])])}const vh=_e(ph,[["render",yh],["__scopeId","data-v-5dceb760"]]),N1="",bh={name:"IbRow"},_h={class:"ib-tr"};function $h(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("tr",_h,[i.renderSlot(t.$slots,"default",{ref:"row"})])}const wh=_e(bh,[["render",$h]]),x1="",kh={name:"IbCell",props:{fixed:{type:Boolean,default:!1}},data(){return{attr:{}}},mounted(){this.fixed&&this.freezeCol()},methods:{freezeCol(){const t=this.$el.getBoundingClientRect(),n=this.$el.closest("tr").getBoundingClientRect();this.attr.style||(this.attr.style={}),this.attr.style.minWidth=`${t.width}px`,this.attr.style.left=`${t.left-n.left}px`,this.attr.class+=" fixed"}}},Ch={class:"cell"};function Oh(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("td",i.mergeProps({onResize:n[0]||(n[0]=(...s)=>r.freezeCol&&r.freezeCol(...s)),class:"ib-cell"},this.attr),[i.createElementVNode("div",Ch,[i.renderSlot(t.$slots,"default",{},void 0,!0)])],16)}const Mo=_e(kh,[["render",Oh],["__scopeId","data-v-e74bb0f3"]]),T1="",Eh={name:"IbCheckboxCell",props:{isChecked:{type:Boolean,default:!1},fixed:{type:Boolean,default:!1}},components:{IbCell:Mo,IbCheckbox:vr}};function Sh(t,n,e,o,a,r){const s=i.resolveComponent("ib-checkbox"),l=i.resolveComponent("ib-cell");return i.openBlock(),i.createBlock(l,{fixed:e.fixed,class:"ib-checkbox-cell"},{default:i.withCtx(()=>[i.createVNode(s,{"is-checked":e.isChecked},null,8,["is-checked"])]),_:1},8,["fixed"])}const Nh=_e(Eh,[["render",Sh]]);class Po{constructor(){this.tooltipInstance=null,this.tooltipContainer=null}getTooltipInstance(){return this.getTooltipInstance}getTooltipContainer(){return this.tooltipContainer}createTooltip(n,e){debugger;console.log("create tooltip"),console.log(e==null?void 0:e.length);const o=`
210
210
  position: absolute;
211
211
  top: 0px;
212
212
  left: 0px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avakhula/ui",
3
- "version": "0.0.111",
3
+ "version": "0.0.112",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
@@ -16,6 +16,7 @@ export default class Tooltip {
16
16
  }
17
17
 
18
18
  createTooltip(el, text) {
19
+ debugger;
19
20
  console.log('create tooltip')
20
21
  console.log(text?.length);
21
22
  // if (!text.length) {
@@ -32,6 +33,7 @@ export default class Tooltip {
32
33
  this.tooltipContainer.setAttribute("style", tooltipContainerStyles);
33
34
 
34
35
  document.body.appendChild(this.tooltipContainer);
36
+
35
37
  this.tooltipInstance = createApp(IbTooltip, {
36
38
  text: text,
37
39
  alwaysVisible: true,