bootstrap-vue-next 0.26.19 → 0.26.20

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 (38) hide show
  1. package/dist/{BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-1f_TuBw6.js → BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-BIUGzj9a.js} +2 -2
  2. package/dist/{BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-1f_TuBw6.js.map → BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-BIUGzj9a.js.map} +1 -1
  3. package/dist/{BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-DpmTeaLy.mjs → BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-BjEhw9SS.mjs} +2 -2
  4. package/dist/{BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-DpmTeaLy.mjs.map → BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-BjEhw9SS.mjs.map} +1 -1
  5. package/dist/BTable.vue_vue_type_script_setup_true_lang-BO8_v2Zs.js +2 -0
  6. package/dist/BTable.vue_vue_type_script_setup_true_lang-BO8_v2Zs.js.map +1 -0
  7. package/dist/{BTable.vue_vue_type_script_setup_true_lang-CjyYEhkw.mjs → BTable.vue_vue_type_script_setup_true_lang-utb_UzeE.mjs} +13 -6
  8. package/dist/BTable.vue_vue_type_script_setup_true_lang-utb_UzeE.mjs.map +1 -0
  9. package/dist/BTableSimple.vue_vue_type_script_setup_true_lang-BGc-Vbfw.js +2 -0
  10. package/dist/BTableSimple.vue_vue_type_script_setup_true_lang-BGc-Vbfw.js.map +1 -0
  11. package/dist/{BTableSimple.vue_vue_type_script_setup_true_lang-B4MDRM8j.mjs → BTableSimple.vue_vue_type_script_setup_true_lang-Dbrg2rgZ.mjs} +5 -2
  12. package/dist/BTableSimple.vue_vue_type_script_setup_true_lang-Dbrg2rgZ.mjs.map +1 -0
  13. package/dist/bootstrap-vue-next.mjs +4 -4
  14. package/dist/bootstrap-vue-next.umd.js +1 -1
  15. package/dist/{index-1NJImnAX.mjs → index-B2kD6cUC.mjs} +4 -4
  16. package/dist/{index-1NJImnAX.mjs.map → index-B2kD6cUC.mjs.map} +1 -1
  17. package/dist/{index-Bbk_WOz8.js → index-B97smCB6.js} +2 -2
  18. package/dist/index-B97smCB6.js.map +1 -0
  19. package/dist/src/components/BAvatar/BAvatar.vue.d.mts +1 -1
  20. package/dist/src/components/BAvatar/BAvatar.vue.d.ts +1 -1
  21. package/dist/src/components/BAvatar/BAvatarGroup.vue.d.mts +1 -1
  22. package/dist/src/components/BAvatar/BAvatarGroup.vue.d.ts +1 -1
  23. package/dist/src/components/BPlaceholder/index.mjs +1 -1
  24. package/dist/src/components/BPlaceholder/index.umd.js +1 -1
  25. package/dist/src/components/BTable/index.mjs +2 -2
  26. package/dist/src/components/BTable/index.umd.js +1 -1
  27. package/dist/src/components/index.mjs +3 -3
  28. package/dist/src/components/index.umd.js +1 -1
  29. package/dist/src/types/index.d.mts +1 -0
  30. package/dist/src/types/index.d.ts +1 -0
  31. package/package.json +1 -1
  32. package/dist/BTable.vue_vue_type_script_setup_true_lang-CjyYEhkw.mjs.map +0 -1
  33. package/dist/BTable.vue_vue_type_script_setup_true_lang-xQALai_U.js +0 -2
  34. package/dist/BTable.vue_vue_type_script_setup_true_lang-xQALai_U.js.map +0 -1
  35. package/dist/BTableSimple.vue_vue_type_script_setup_true_lang-B4MDRM8j.mjs.map +0 -1
  36. package/dist/BTableSimple.vue_vue_type_script_setup_true_lang-C6BcFYxA.js +0 -2
  37. package/dist/BTableSimple.vue_vue_type_script_setup_true_lang-C6BcFYxA.js.map +0 -1
  38. package/dist/index-Bbk_WOz8.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),t=require("./BCard.vue_vue_type_script_setup_true_lang-J1p9bfap.js"),a=require("./useDefaults-Bq2idhQU.js"),o=require("./BTableSimple.vue_vue_type_script_setup_true_lang-C6BcFYxA.js"),n=require("./useColorVariantClasses-CE658Sm0.js"),l=require("./index-BqHkgtNq.js"),r=e.defineComponent({inheritAttrs:!1,__name:"BPlaceholder",props:{animation:{default:void 0},cols:{default:12},size:{default:"md"},tag:{default:"span"},variant:{default:null},width:{default:void 0},wrapperTag:{default:"span"}},setup(t){const o=t,l=a.useDefaults(o,"BPlaceholder"),r=e.computed((()=>void 0===l.width?void 0:"number"==typeof l.width?l.width.toString():l.width.replace("%",""))),i=e.computed((()=>void 0===l.cols?void 0:"number"==typeof l.cols?l.cols.toString():l.cols)),d=n.useColorVariantClasses(e.computed((()=>({bgVariant:l.variant})))),u=e.computed((()=>[d.value,{[`col-${i.value}`]:void 0!==i.value&&void 0===r.value,[`placeholder-${l.size}`]:"md"!==l.size}])),s=e.computed((()=>({[`placeholder-${l.animation}`]:void 0!==l.animation}))),c=e.computed((()=>({width:void 0===r.value?void 0:`${r.value}%`})));return(t,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).wrapperTag),{class:e.normalizeClass(s.value)},{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps(t.$attrs,{class:["placeholder",u.value],style:c.value}),null,16,["class","style"]))])),_:1},8,["class"]))}}),i=e.defineComponent({__name:"BPlaceholderButton",props:{animation:{default:void 0},cols:{default:void 0},tag:{default:"div"},variant:{default:"primary"},width:{default:void 0}},setup(t){const o=t,n=a.useDefaults(o,"BPlaceholderButton"),l=e.computed((()=>({[`btn-${n.variant}`]:null!==n.variant})));return(t,a)=>(e.openBlock(),e.createBlock(r,{class:e.normalizeClass(["btn disabled",l.value]),animation:e.unref(n).animation,width:e.unref(n).width,cols:e.unref(n).cols,tag:e.unref(n).tag,style:{cursor:"wait","pointer-events":"auto"}},null,8,["class","animation","width","cols","tag"]))}}),d=e.defineComponent({__name:"BPlaceholderCard",props:{animation:{default:void 0},footerAnimation:{default:void 0},footerSize:{default:"md"},footerVariant:{default:void 0},footerWidth:{default:100},headerAnimation:{default:void 0},headerSize:{default:"md"},headerVariant:{default:void 0},headerWidth:{default:100},imgBlankColor:{default:"#868e96"},imgPlacement:{default:"top"},imgHeight:{default:100},imgSrc:{default:void 0},noButton:{type:Boolean,default:!1},noFooter:{type:Boolean,default:!1},noHeader:{type:Boolean,default:!1},noImg:{type:Boolean,default:!1},size:{default:"md"},variant:{default:void 0}},setup(o){const n=o,l=a.useDefaults(n,"BPlaceholderCard"),d=e.computed((()=>({animation:l.animation,size:l.size,variant:l.variant}))),u=e.computed((()=>l.noButton?r:i));return(a,o)=>(e.openBlock(),e.createBlock(t._sfc_main,{"img-placement":e.unref(l).imgPlacement},e.createSlots({default:e.withCtx((()=>[e.renderSlot(a.$slots,"default",{},(()=>[e.createVNode(r,e.mergeProps({cols:"7"},d.value),null,16),e.createVNode(r,e.mergeProps({cols:"4"},d.value),null,16),e.createVNode(r,e.mergeProps({cols:"4"},d.value),null,16),e.createVNode(r,e.mergeProps({cols:"6"},d.value),null,16),e.createVNode(r,e.mergeProps({cols:"8"},d.value),null,16)]))])),_:2},[e.unref(l).noImg?void 0:{name:"img",fn:e.withCtx((()=>[e.renderSlot(a.$slots,"img",{},(()=>[e.createVNode(t._sfc_main$4,{blank:!e.unref(l).imgSrc,"blank-color":e.unref(l).imgBlankColor,height:e.unref(l).imgSrc?void 0:e.unref(l).imgHeight,src:e.unref(l).imgSrc,"img-placement":e.unref(l).imgPlacement,style:{cursor:"wait"}},null,8,["blank","blank-color","height","src","img-placement"])]))])),key:"0"},e.unref(l).noHeader?void 0:{name:"header",fn:e.withCtx((()=>[e.renderSlot(a.$slots,"header",{},(()=>[e.createVNode(r,{width:e.unref(l).headerWidth,variant:e.unref(l).headerVariant,animation:e.unref(l).headerAnimation,size:e.unref(l).headerSize},null,8,["width","variant","animation","size"])]))])),key:"1"},e.unref(l).noFooter?void 0:{name:"footer",fn:e.withCtx((()=>[e.renderSlot(a.$slots,"footer",{},(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{width:e.unref(l).footerWidth,animation:e.unref(l).footerAnimation,size:e.unref(l).noButton?e.unref(l).footerSize:void 0,variant:e.unref(l).footerVariant},null,8,["width","animation","size","variant"]))]))])),key:"2"}]),1032,["img-placement"]))}}),u=e.defineComponent({__name:"BPlaceholderTable",props:{animation:{default:void 0},cellWidth:{default:100},columns:{default:5},footerAnimation:{default:void 0},footerCellWidth:{default:100},footerColumns:{default:void 0},footerSize:{default:"md"},footerVariant:{default:void 0},headerAnimation:{default:void 0},headerCellWidth:{default:100},headerColumns:{default:void 0},headerSize:{default:"md"},headerVariant:{default:void 0},noHeader:{type:Boolean,default:!1},rows:{default:3},showFooter:{type:Boolean,default:!1},size:{default:"md"},variant:{default:void 0}},setup(t){const n=t,i=a.useDefaults(n,"BPlaceholderTable"),d=l.useToNumber((()=>i.columns)),u=l.useToNumber((()=>i.rows)),s=e.computed((()=>i.headerColumns??NaN)),c=e.computed((()=>i.footerColumns??NaN)),m=l.useToNumber(s),f=l.useToNumber(c),p=e.computed((()=>d.value||5)),v=e.computed((()=>u.value||3)),h=e.computed((()=>void 0===i.headerColumns?p.value:m.value)),B=e.computed((()=>void 0===i.footerColumns?p.value:f.value));return(t,a)=>(e.openBlock(),e.createBlock(o._sfc_main,null,{default:e.withCtx((()=>[e.unref(i).noHeader?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"thead",{key:0},(()=>[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,((t,a)=>(e.openBlock(),e.createElementBlock("th",{key:a},[e.createVNode(r,{size:e.unref(i).headerSize,variant:e.unref(i).headerVariant,animation:e.unref(i).headerAnimation,width:e.unref(i).headerCellWidth},null,8,["size","variant","animation","width"])])))),128))])])])),e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,((t,a)=>(e.openBlock(),e.createElementBlock("tr",{key:a},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,((t,a)=>(e.openBlock(),e.createElementBlock("td",{key:a},[e.createVNode(r,{size:e.unref(i).size,variant:e.unref(i).variant,animation:e.unref(i).animation,width:e.unref(i).cellWidth},null,8,["size","variant","animation","width"])])))),128))])))),128))])])),e.unref(i).showFooter?e.renderSlot(t.$slots,"tfoot",{key:1},(()=>[e.createElementVNode("tfoot",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,((t,a)=>(e.openBlock(),e.createElementBlock("th",{key:a},[e.createVNode(r,{size:e.unref(i).footerSize,variant:e.unref(i).footerVariant,animation:e.unref(i).footerAnimation,width:e.unref(i).footerCellWidth},null,8,["size","variant","animation","width"])])))),128))])])])):e.createCommentVNode("",!0)])),_:3}))}}),s=e.defineComponent({__name:"BPlaceholderWrapper",props:{loading:{type:Boolean,default:!1}},setup(t){const o=t,n=a.useDefaults(o,"BPlaceholderWrapper");return(t,a)=>e.unref(n).loading?e.renderSlot(t.$slots,"loading",{key:0}):e.renderSlot(t.$slots,"default",{key:1})}});exports._sfc_main=r,exports._sfc_main$1=i,exports._sfc_main$2=d,exports._sfc_main$3=u,exports._sfc_main$4=s;
2
- //# sourceMappingURL=BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-1f_TuBw6.js.map
1
+ "use strict";const e=require("vue"),t=require("./BCard.vue_vue_type_script_setup_true_lang-J1p9bfap.js"),a=require("./useDefaults-Bq2idhQU.js"),o=require("./BTableSimple.vue_vue_type_script_setup_true_lang-BGc-Vbfw.js"),n=require("./useColorVariantClasses-CE658Sm0.js"),l=require("./index-BqHkgtNq.js"),r=e.defineComponent({inheritAttrs:!1,__name:"BPlaceholder",props:{animation:{default:void 0},cols:{default:12},size:{default:"md"},tag:{default:"span"},variant:{default:null},width:{default:void 0},wrapperTag:{default:"span"}},setup(t){const o=t,l=a.useDefaults(o,"BPlaceholder"),r=e.computed((()=>void 0===l.width?void 0:"number"==typeof l.width?l.width.toString():l.width.replace("%",""))),i=e.computed((()=>void 0===l.cols?void 0:"number"==typeof l.cols?l.cols.toString():l.cols)),d=n.useColorVariantClasses(e.computed((()=>({bgVariant:l.variant})))),u=e.computed((()=>[d.value,{[`col-${i.value}`]:void 0!==i.value&&void 0===r.value,[`placeholder-${l.size}`]:"md"!==l.size}])),s=e.computed((()=>({[`placeholder-${l.animation}`]:void 0!==l.animation}))),c=e.computed((()=>({width:void 0===r.value?void 0:`${r.value}%`})));return(t,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).wrapperTag),{class:e.normalizeClass(s.value)},{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps(t.$attrs,{class:["placeholder",u.value],style:c.value}),null,16,["class","style"]))])),_:1},8,["class"]))}}),i=e.defineComponent({__name:"BPlaceholderButton",props:{animation:{default:void 0},cols:{default:void 0},tag:{default:"div"},variant:{default:"primary"},width:{default:void 0}},setup(t){const o=t,n=a.useDefaults(o,"BPlaceholderButton"),l=e.computed((()=>({[`btn-${n.variant}`]:null!==n.variant})));return(t,a)=>(e.openBlock(),e.createBlock(r,{class:e.normalizeClass(["btn disabled",l.value]),animation:e.unref(n).animation,width:e.unref(n).width,cols:e.unref(n).cols,tag:e.unref(n).tag,style:{cursor:"wait","pointer-events":"auto"}},null,8,["class","animation","width","cols","tag"]))}}),d=e.defineComponent({__name:"BPlaceholderCard",props:{animation:{default:void 0},footerAnimation:{default:void 0},footerSize:{default:"md"},footerVariant:{default:void 0},footerWidth:{default:100},headerAnimation:{default:void 0},headerSize:{default:"md"},headerVariant:{default:void 0},headerWidth:{default:100},imgBlankColor:{default:"#868e96"},imgPlacement:{default:"top"},imgHeight:{default:100},imgSrc:{default:void 0},noButton:{type:Boolean,default:!1},noFooter:{type:Boolean,default:!1},noHeader:{type:Boolean,default:!1},noImg:{type:Boolean,default:!1},size:{default:"md"},variant:{default:void 0}},setup(o){const n=o,l=a.useDefaults(n,"BPlaceholderCard"),d=e.computed((()=>({animation:l.animation,size:l.size,variant:l.variant}))),u=e.computed((()=>l.noButton?r:i));return(a,o)=>(e.openBlock(),e.createBlock(t._sfc_main,{"img-placement":e.unref(l).imgPlacement},e.createSlots({default:e.withCtx((()=>[e.renderSlot(a.$slots,"default",{},(()=>[e.createVNode(r,e.mergeProps({cols:"7"},d.value),null,16),e.createVNode(r,e.mergeProps({cols:"4"},d.value),null,16),e.createVNode(r,e.mergeProps({cols:"4"},d.value),null,16),e.createVNode(r,e.mergeProps({cols:"6"},d.value),null,16),e.createVNode(r,e.mergeProps({cols:"8"},d.value),null,16)]))])),_:2},[e.unref(l).noImg?void 0:{name:"img",fn:e.withCtx((()=>[e.renderSlot(a.$slots,"img",{},(()=>[e.createVNode(t._sfc_main$4,{blank:!e.unref(l).imgSrc,"blank-color":e.unref(l).imgBlankColor,height:e.unref(l).imgSrc?void 0:e.unref(l).imgHeight,src:e.unref(l).imgSrc,"img-placement":e.unref(l).imgPlacement,style:{cursor:"wait"}},null,8,["blank","blank-color","height","src","img-placement"])]))])),key:"0"},e.unref(l).noHeader?void 0:{name:"header",fn:e.withCtx((()=>[e.renderSlot(a.$slots,"header",{},(()=>[e.createVNode(r,{width:e.unref(l).headerWidth,variant:e.unref(l).headerVariant,animation:e.unref(l).headerAnimation,size:e.unref(l).headerSize},null,8,["width","variant","animation","size"])]))])),key:"1"},e.unref(l).noFooter?void 0:{name:"footer",fn:e.withCtx((()=>[e.renderSlot(a.$slots,"footer",{},(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{width:e.unref(l).footerWidth,animation:e.unref(l).footerAnimation,size:e.unref(l).noButton?e.unref(l).footerSize:void 0,variant:e.unref(l).footerVariant},null,8,["width","animation","size","variant"]))]))])),key:"2"}]),1032,["img-placement"]))}}),u=e.defineComponent({__name:"BPlaceholderTable",props:{animation:{default:void 0},cellWidth:{default:100},columns:{default:5},footerAnimation:{default:void 0},footerCellWidth:{default:100},footerColumns:{default:void 0},footerSize:{default:"md"},footerVariant:{default:void 0},headerAnimation:{default:void 0},headerCellWidth:{default:100},headerColumns:{default:void 0},headerSize:{default:"md"},headerVariant:{default:void 0},noHeader:{type:Boolean,default:!1},rows:{default:3},showFooter:{type:Boolean,default:!1},size:{default:"md"},variant:{default:void 0}},setup(t){const n=t,i=a.useDefaults(n,"BPlaceholderTable"),d=l.useToNumber((()=>i.columns)),u=l.useToNumber((()=>i.rows)),s=e.computed((()=>i.headerColumns??NaN)),c=e.computed((()=>i.footerColumns??NaN)),m=l.useToNumber(s),f=l.useToNumber(c),p=e.computed((()=>d.value||5)),v=e.computed((()=>u.value||3)),h=e.computed((()=>void 0===i.headerColumns?p.value:m.value)),B=e.computed((()=>void 0===i.footerColumns?p.value:f.value));return(t,a)=>(e.openBlock(),e.createBlock(o._sfc_main,null,{default:e.withCtx((()=>[e.unref(i).noHeader?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"thead",{key:0},(()=>[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,((t,a)=>(e.openBlock(),e.createElementBlock("th",{key:a},[e.createVNode(r,{size:e.unref(i).headerSize,variant:e.unref(i).headerVariant,animation:e.unref(i).headerAnimation,width:e.unref(i).headerCellWidth},null,8,["size","variant","animation","width"])])))),128))])])])),e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,((t,a)=>(e.openBlock(),e.createElementBlock("tr",{key:a},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,((t,a)=>(e.openBlock(),e.createElementBlock("td",{key:a},[e.createVNode(r,{size:e.unref(i).size,variant:e.unref(i).variant,animation:e.unref(i).animation,width:e.unref(i).cellWidth},null,8,["size","variant","animation","width"])])))),128))])))),128))])])),e.unref(i).showFooter?e.renderSlot(t.$slots,"tfoot",{key:1},(()=>[e.createElementVNode("tfoot",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,((t,a)=>(e.openBlock(),e.createElementBlock("th",{key:a},[e.createVNode(r,{size:e.unref(i).footerSize,variant:e.unref(i).footerVariant,animation:e.unref(i).footerAnimation,width:e.unref(i).footerCellWidth},null,8,["size","variant","animation","width"])])))),128))])])])):e.createCommentVNode("",!0)])),_:3}))}}),s=e.defineComponent({__name:"BPlaceholderWrapper",props:{loading:{type:Boolean,default:!1}},setup(t){const o=t,n=a.useDefaults(o,"BPlaceholderWrapper");return(t,a)=>e.unref(n).loading?e.renderSlot(t.$slots,"loading",{key:0}):e.renderSlot(t.$slots,"default",{key:1})}});exports._sfc_main=r,exports._sfc_main$1=i,exports._sfc_main$2=d,exports._sfc_main$3=u,exports._sfc_main$4=s;
2
+ //# sourceMappingURL=BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-BIUGzj9a.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-1f_TuBw6.js","sources":["../src/components/BPlaceholder/BPlaceholder.vue","../src/components/BPlaceholder/BPlaceholderButton.vue","../src/components/BPlaceholder/BPlaceholderCard.vue","../src/components/BPlaceholder/BPlaceholderTable.vue","../src/components/BPlaceholder/BPlaceholderWrapper.vue"],"sourcesContent":["<template>\n <component :is=\"props.wrapperTag\" :class=\"wrapperClasses\">\n <component\n v-bind=\"$attrs\"\n :is=\"tag\"\n class=\"placeholder\"\n :class=\"computedClasses\"\n :style=\"computedStyle\"\n />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type CSSProperties} from 'vue'\nimport type {BPlaceholderProps} from '../../types/ComponentProps'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<BPlaceholderProps>(), {\n animation: undefined,\n cols: 12,\n size: 'md',\n tag: 'span',\n variant: null,\n width: undefined,\n wrapperTag: 'span',\n})\nconst props = useDefaults(_props, 'BPlaceholder')\n\nconst widthString = computed(() =>\n props.width === undefined\n ? undefined\n : typeof props.width === 'number'\n ? props.width.toString()\n : props.width.replace('%', '')\n)\n\nconst colsString = computed(() =>\n props.cols === undefined\n ? undefined\n : typeof props.cols === 'number'\n ? props.cols.toString()\n : props.cols\n)\n\nconst colorClasses = useColorVariantClasses(\n computed(() => ({\n bgVariant: props.variant,\n }))\n)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n [`col-${colsString.value}`]: colsString.value !== undefined && widthString.value === undefined,\n [`placeholder-${props.size}`]: props.size !== 'md',\n },\n])\n\nconst wrapperClasses = computed(() => ({\n [`placeholder-${props.animation}`]: props.animation !== undefined,\n}))\n\nconst computedStyle = computed<CSSProperties>(() => ({\n width: widthString.value === undefined ? undefined : `${widthString.value}%`,\n}))\n</script>\n","<template>\n <BPlaceholder\n class=\"btn disabled\"\n :class=\"computedClasses\"\n :animation=\"props.animation\"\n :width=\"props.width\"\n :cols=\"props.cols\"\n :tag=\"props.tag\"\n :style=\"{'cursor': 'wait', 'pointer-events': 'auto'}\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport BPlaceholder from './BPlaceholder.vue'\nimport type {BPlaceholderButtonProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BPlaceholderButtonProps>(), {\n animation: undefined,\n cols: undefined,\n tag: 'div',\n variant: 'primary',\n width: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderButton')\n\nconst computedClasses = computed(() => ({\n [`btn-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <BCard :img-placement=\"props.imgPlacement\">\n <template v-if=\"!props.noImg\" #img>\n <slot name=\"img\">\n <BCardImg\n :blank=\"!props.imgSrc ? true : false\"\n :blank-color=\"props.imgBlankColor\"\n :height=\"!props.imgSrc ? props.imgHeight : undefined\"\n :src=\"props.imgSrc\"\n :img-placement=\"props.imgPlacement\"\n :style=\"{cursor: 'wait'}\"\n />\n </slot>\n </template>\n\n <template v-if=\"!props.noHeader\" #header>\n <slot name=\"header\">\n <BPlaceholder\n :width=\"props.headerWidth\"\n :variant=\"props.headerVariant\"\n :animation=\"props.headerAnimation\"\n :size=\"props.headerSize\"\n />\n </slot>\n </template>\n <slot>\n <BPlaceholder cols=\"7\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"4\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"4\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"6\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"8\" v-bind=\"defaultAttrs\" />\n </slot>\n <template v-if=\"!props.noFooter\" #footer>\n <slot name=\"footer\">\n <component\n :is=\"footerComponent\"\n :width=\"props.footerWidth\"\n :animation=\"props.footerAnimation\"\n :size=\"props.noButton ? props.footerSize : undefined\"\n :variant=\"props.footerVariant\"\n />\n </slot>\n </template>\n </BCard>\n</template>\n\n<script setup lang=\"ts\">\nimport BCard from '../BCard/BCard.vue'\nimport BCardImg from '../BCard/BCardImg.vue'\nimport BPlaceholder from './BPlaceholder.vue'\nimport BPlaceholderButton from './BPlaceholderButton.vue'\nimport type {BPlaceholderCardProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BPlaceholderCardProps>(), {\n animation: undefined,\n footerAnimation: undefined,\n footerSize: 'md',\n footerVariant: undefined,\n footerWidth: 100,\n headerAnimation: undefined,\n headerSize: 'md',\n headerVariant: undefined,\n headerWidth: 100,\n imgBlankColor: '#868e96',\n imgPlacement: 'top',\n imgHeight: 100,\n imgSrc: undefined,\n noButton: false,\n noFooter: false,\n noHeader: false,\n noImg: false,\n size: 'md',\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderCard')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n footer?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n header?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n img?: (props: Record<string, never>) => any\n}>()\n\nconst defaultAttrs = computed(() => ({\n animation: props.animation,\n size: props.size,\n variant: props.variant,\n}))\n\nconst footerComponent = computed(() => (!props.noButton ? BPlaceholderButton : BPlaceholder))\n</script>\n","<template>\n <BTableSimple>\n <slot v-if=\"!props.noHeader\" name=\"thead\">\n <thead>\n <tr>\n <th v-for=\"(_, i) in computedHeaderColumnsLength\" :key=\"i\">\n <BPlaceholder\n :size=\"props.headerSize\"\n :variant=\"props.headerVariant\"\n :animation=\"props.headerAnimation\"\n :width=\"props.headerCellWidth\"\n />\n </th>\n </tr>\n </thead>\n </slot>\n <slot>\n <tbody>\n <tr v-for=\"(_, j) in rowsNumber\" :key=\"j\">\n <td v-for=\"(__, k) in columnsNumber\" :key=\"k\">\n <BPlaceholder\n :size=\"props.size\"\n :variant=\"props.variant\"\n :animation=\"props.animation\"\n :width=\"props.cellWidth\"\n />\n </td>\n </tr>\n </tbody>\n </slot>\n <slot v-if=\"props.showFooter\" name=\"tfoot\">\n <tfoot>\n <tr>\n <th v-for=\"(_, l) in computedFooterColumnsLength\" :key=\"l\">\n <BPlaceholder\n :size=\"props.footerSize\"\n :variant=\"props.footerVariant\"\n :animation=\"props.footerAnimation\"\n :width=\"props.footerCellWidth\"\n />\n </th>\n </tr>\n </tfoot>\n </slot>\n </BTableSimple>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BPlaceholderTableProps} from '../../types/ComponentProps'\nimport BTableSimple from '../BTable/BTableSimple.vue'\nimport BPlaceholder from './BPlaceholder.vue'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BPlaceholderTableProps>(), {\n animation: undefined,\n cellWidth: 100,\n columns: 5,\n footerAnimation: undefined,\n footerCellWidth: 100,\n footerColumns: undefined,\n footerSize: 'md',\n footerVariant: undefined,\n headerAnimation: undefined,\n headerCellWidth: 100,\n headerColumns: undefined,\n headerSize: 'md',\n headerVariant: undefined,\n noHeader: false,\n rows: 3,\n showFooter: false,\n size: 'md',\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderTable')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tfoot?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thead?: (props: Record<string, never>) => any\n}>()\n\nconst columnsToNumber = useToNumber(() => props.columns)\nconst rowsToNumber = useToNumber(() => props.rows)\nconst computedHeaderColumns = computed(() => props.headerColumns ?? NaN)\nconst computedFooterColumns = computed(() => props.footerColumns ?? NaN)\nconst headerColumnsNumber = useToNumber(computedHeaderColumns)\nconst footerColumnsNumber = useToNumber(computedFooterColumns)\n\nconst columnsNumber = computed(() => columnsToNumber.value || 5)\nconst rowsNumber = computed(() => rowsToNumber.value || 3)\n\nconst computedHeaderColumnsLength = computed(() =>\n props.headerColumns === undefined ? columnsNumber.value : headerColumnsNumber.value\n)\nconst computedFooterColumnsLength = computed(() =>\n props.footerColumns === undefined ? columnsNumber.value : footerColumnsNumber.value\n)\n</script>\n","<template>\n <slot v-if=\"props.loading\" name=\"loading\" />\n <slot v-else />\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BPlaceholderWrapperProps} from '../../types/ComponentProps'\n\nconst _props = withDefaults(defineProps<BPlaceholderWrapperProps>(), {\n loading: false,\n})\nconst props = useDefaults(_props, 'BPlaceholderWrapper')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n loading?: (props: Record<string, never>) => any\n}>()\n</script>\n"],"names":["_props","__props","props","useDefaults","widthString","computed","width","toString","replace","colsString","cols","colorClasses","useColorVariantClasses","bgVariant","variant","computedClasses","value","size","wrapperClasses","animation","computedStyle","defaultAttrs","footerComponent","noButton","BPlaceholder","BPlaceholderButton","columnsToNumber","useToNumber","columns","rowsToNumber","rows","computedHeaderColumns","headerColumns","NaN","computedFooterColumns","footerColumns","headerColumnsNumber","footerColumnsNumber","columnsNumber","rowsNumber","computedHeaderColumnsLength","computedFooterColumnsLength"],"mappings":"2hBAsBA,MAAMA,EAASC,EASTC,EAAQC,EAAAA,YAAYH,EAAQ,gBAE5BI,EAAcC,EAAAA,UAAS,SACX,IAAhBH,EAAMI,WACF,EACuB,iBAAhBJ,EAAMI,MACXJ,EAAMI,MAAMC,WACZL,EAAMI,MAAME,QAAQ,IAAK,MAG3BC,EAAaJ,EAAAA,UAAS,SACX,IAAfH,EAAMQ,UACF,EACsB,iBAAfR,EAAMQ,KACXR,EAAMQ,KAAKH,WACXL,EAAMQ,OAGRC,EAAeC,EAAAA,uBACnBP,EAAAA,UAAS,KAAO,CACdQ,UAAWX,EAAMY,aAGfC,EAAkBV,EAAAA,UAAS,IAAM,CACrCM,EAAaK,MACb,CACE,CAAC,OAAOP,EAAWO,cAA+B,IAArBP,EAAWO,YAA6C,IAAtBZ,EAAYY,MAC3E,CAAC,eAAed,EAAMe,QAAwB,OAAff,EAAMe,SAInCC,EAAiBb,EAAAA,UAAS,KAAO,CACrC,CAAC,eAAeH,EAAMiB,kBAAkC,IAApBjB,EAAMiB,cAGtCC,EAAgBf,EAAAA,UAAwB,KAAO,CACnDC,WAA6B,IAAtBF,EAAYY,WAAsB,EAAY,GAAGZ,EAAYY,qhBCjDtE,MAAMhB,EAASC,EAOTC,EAAQC,EAAAA,YAAYH,EAAQ,sBAE5Be,EAAkBV,EAAAA,UAAS,KAAO,CACtC,CAAC,OAAOH,EAAMY,WAA8B,OAAlBZ,EAAMY,s5BC2BlC,MAAMd,EAASC,EAqBTC,EAAQC,EAAAA,YAAYH,EAAQ,oBAa5BqB,EAAehB,EAAAA,UAAS,KAAO,CACnCc,UAAWjB,EAAMiB,UACjBF,KAAMf,EAAMe,KACZH,QAASZ,EAAMY,YAGXQ,EAAkBjB,EAAAA,UAAS,IAAQH,EAAMqB,SAAgCC,EAArBC,+nECxC1D,MAAMzB,EAASC,EAoBTC,EAAQC,EAAAA,YAAYH,EAAQ,qBAW5B0B,EAAkBC,EAAAA,aAAY,IAAMzB,EAAM0B,UAC1CC,EAAeF,EAAAA,aAAY,IAAMzB,EAAM4B,OACvCC,EAAwB1B,EAAAA,UAAS,IAAMH,EAAM8B,eAAiBC,MAC9DC,EAAwB7B,EAAAA,UAAS,IAAMH,EAAMiC,eAAiBF,MAC9DG,EAAsBT,cAAYI,GAClCM,EAAsBV,cAAYO,GAElCI,EAAgBjC,EAAAA,UAAS,IAAMqB,EAAgBV,OAAS,IACxDuB,EAAalC,EAAAA,UAAS,IAAMwB,EAAab,OAAS,IAElDwB,EAA8BnC,EAAAA,UAAS,SACnB,IAAxBH,EAAM8B,cAA8BM,EAActB,MAAQoB,EAAoBpB,QAE1EyB,EAA8BpC,EAAAA,UAAS,SACnB,IAAxBH,EAAMiC,cAA8BG,EAActB,MAAQqB,EAAoBrB,8tDC3FhF,MAAMhB,EAASC,EAGTC,EAAQC,EAAAA,YAAYH,EAAQ"}
1
+ {"version":3,"file":"BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-BIUGzj9a.js","sources":["../src/components/BPlaceholder/BPlaceholder.vue","../src/components/BPlaceholder/BPlaceholderButton.vue","../src/components/BPlaceholder/BPlaceholderCard.vue","../src/components/BPlaceholder/BPlaceholderTable.vue","../src/components/BPlaceholder/BPlaceholderWrapper.vue"],"sourcesContent":["<template>\n <component :is=\"props.wrapperTag\" :class=\"wrapperClasses\">\n <component\n v-bind=\"$attrs\"\n :is=\"tag\"\n class=\"placeholder\"\n :class=\"computedClasses\"\n :style=\"computedStyle\"\n />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type CSSProperties} from 'vue'\nimport type {BPlaceholderProps} from '../../types/ComponentProps'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<BPlaceholderProps>(), {\n animation: undefined,\n cols: 12,\n size: 'md',\n tag: 'span',\n variant: null,\n width: undefined,\n wrapperTag: 'span',\n})\nconst props = useDefaults(_props, 'BPlaceholder')\n\nconst widthString = computed(() =>\n props.width === undefined\n ? undefined\n : typeof props.width === 'number'\n ? props.width.toString()\n : props.width.replace('%', '')\n)\n\nconst colsString = computed(() =>\n props.cols === undefined\n ? undefined\n : typeof props.cols === 'number'\n ? props.cols.toString()\n : props.cols\n)\n\nconst colorClasses = useColorVariantClasses(\n computed(() => ({\n bgVariant: props.variant,\n }))\n)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n [`col-${colsString.value}`]: colsString.value !== undefined && widthString.value === undefined,\n [`placeholder-${props.size}`]: props.size !== 'md',\n },\n])\n\nconst wrapperClasses = computed(() => ({\n [`placeholder-${props.animation}`]: props.animation !== undefined,\n}))\n\nconst computedStyle = computed<CSSProperties>(() => ({\n width: widthString.value === undefined ? undefined : `${widthString.value}%`,\n}))\n</script>\n","<template>\n <BPlaceholder\n class=\"btn disabled\"\n :class=\"computedClasses\"\n :animation=\"props.animation\"\n :width=\"props.width\"\n :cols=\"props.cols\"\n :tag=\"props.tag\"\n :style=\"{'cursor': 'wait', 'pointer-events': 'auto'}\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport BPlaceholder from './BPlaceholder.vue'\nimport type {BPlaceholderButtonProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BPlaceholderButtonProps>(), {\n animation: undefined,\n cols: undefined,\n tag: 'div',\n variant: 'primary',\n width: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderButton')\n\nconst computedClasses = computed(() => ({\n [`btn-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <BCard :img-placement=\"props.imgPlacement\">\n <template v-if=\"!props.noImg\" #img>\n <slot name=\"img\">\n <BCardImg\n :blank=\"!props.imgSrc ? true : false\"\n :blank-color=\"props.imgBlankColor\"\n :height=\"!props.imgSrc ? props.imgHeight : undefined\"\n :src=\"props.imgSrc\"\n :img-placement=\"props.imgPlacement\"\n :style=\"{cursor: 'wait'}\"\n />\n </slot>\n </template>\n\n <template v-if=\"!props.noHeader\" #header>\n <slot name=\"header\">\n <BPlaceholder\n :width=\"props.headerWidth\"\n :variant=\"props.headerVariant\"\n :animation=\"props.headerAnimation\"\n :size=\"props.headerSize\"\n />\n </slot>\n </template>\n <slot>\n <BPlaceholder cols=\"7\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"4\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"4\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"6\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"8\" v-bind=\"defaultAttrs\" />\n </slot>\n <template v-if=\"!props.noFooter\" #footer>\n <slot name=\"footer\">\n <component\n :is=\"footerComponent\"\n :width=\"props.footerWidth\"\n :animation=\"props.footerAnimation\"\n :size=\"props.noButton ? props.footerSize : undefined\"\n :variant=\"props.footerVariant\"\n />\n </slot>\n </template>\n </BCard>\n</template>\n\n<script setup lang=\"ts\">\nimport BCard from '../BCard/BCard.vue'\nimport BCardImg from '../BCard/BCardImg.vue'\nimport BPlaceholder from './BPlaceholder.vue'\nimport BPlaceholderButton from './BPlaceholderButton.vue'\nimport type {BPlaceholderCardProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BPlaceholderCardProps>(), {\n animation: undefined,\n footerAnimation: undefined,\n footerSize: 'md',\n footerVariant: undefined,\n footerWidth: 100,\n headerAnimation: undefined,\n headerSize: 'md',\n headerVariant: undefined,\n headerWidth: 100,\n imgBlankColor: '#868e96',\n imgPlacement: 'top',\n imgHeight: 100,\n imgSrc: undefined,\n noButton: false,\n noFooter: false,\n noHeader: false,\n noImg: false,\n size: 'md',\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderCard')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n footer?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n header?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n img?: (props: Record<string, never>) => any\n}>()\n\nconst defaultAttrs = computed(() => ({\n animation: props.animation,\n size: props.size,\n variant: props.variant,\n}))\n\nconst footerComponent = computed(() => (!props.noButton ? BPlaceholderButton : BPlaceholder))\n</script>\n","<template>\n <BTableSimple>\n <slot v-if=\"!props.noHeader\" name=\"thead\">\n <thead>\n <tr>\n <th v-for=\"(_, i) in computedHeaderColumnsLength\" :key=\"i\">\n <BPlaceholder\n :size=\"props.headerSize\"\n :variant=\"props.headerVariant\"\n :animation=\"props.headerAnimation\"\n :width=\"props.headerCellWidth\"\n />\n </th>\n </tr>\n </thead>\n </slot>\n <slot>\n <tbody>\n <tr v-for=\"(_, j) in rowsNumber\" :key=\"j\">\n <td v-for=\"(__, k) in columnsNumber\" :key=\"k\">\n <BPlaceholder\n :size=\"props.size\"\n :variant=\"props.variant\"\n :animation=\"props.animation\"\n :width=\"props.cellWidth\"\n />\n </td>\n </tr>\n </tbody>\n </slot>\n <slot v-if=\"props.showFooter\" name=\"tfoot\">\n <tfoot>\n <tr>\n <th v-for=\"(_, l) in computedFooterColumnsLength\" :key=\"l\">\n <BPlaceholder\n :size=\"props.footerSize\"\n :variant=\"props.footerVariant\"\n :animation=\"props.footerAnimation\"\n :width=\"props.footerCellWidth\"\n />\n </th>\n </tr>\n </tfoot>\n </slot>\n </BTableSimple>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BPlaceholderTableProps} from '../../types/ComponentProps'\nimport BTableSimple from '../BTable/BTableSimple.vue'\nimport BPlaceholder from './BPlaceholder.vue'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BPlaceholderTableProps>(), {\n animation: undefined,\n cellWidth: 100,\n columns: 5,\n footerAnimation: undefined,\n footerCellWidth: 100,\n footerColumns: undefined,\n footerSize: 'md',\n footerVariant: undefined,\n headerAnimation: undefined,\n headerCellWidth: 100,\n headerColumns: undefined,\n headerSize: 'md',\n headerVariant: undefined,\n noHeader: false,\n rows: 3,\n showFooter: false,\n size: 'md',\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderTable')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tfoot?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thead?: (props: Record<string, never>) => any\n}>()\n\nconst columnsToNumber = useToNumber(() => props.columns)\nconst rowsToNumber = useToNumber(() => props.rows)\nconst computedHeaderColumns = computed(() => props.headerColumns ?? NaN)\nconst computedFooterColumns = computed(() => props.footerColumns ?? NaN)\nconst headerColumnsNumber = useToNumber(computedHeaderColumns)\nconst footerColumnsNumber = useToNumber(computedFooterColumns)\n\nconst columnsNumber = computed(() => columnsToNumber.value || 5)\nconst rowsNumber = computed(() => rowsToNumber.value || 3)\n\nconst computedHeaderColumnsLength = computed(() =>\n props.headerColumns === undefined ? columnsNumber.value : headerColumnsNumber.value\n)\nconst computedFooterColumnsLength = computed(() =>\n props.footerColumns === undefined ? columnsNumber.value : footerColumnsNumber.value\n)\n</script>\n","<template>\n <slot v-if=\"props.loading\" name=\"loading\" />\n <slot v-else />\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BPlaceholderWrapperProps} from '../../types/ComponentProps'\n\nconst _props = withDefaults(defineProps<BPlaceholderWrapperProps>(), {\n loading: false,\n})\nconst props = useDefaults(_props, 'BPlaceholderWrapper')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n loading?: (props: Record<string, never>) => any\n}>()\n</script>\n"],"names":["_props","__props","props","useDefaults","widthString","computed","width","toString","replace","colsString","cols","colorClasses","useColorVariantClasses","bgVariant","variant","computedClasses","value","size","wrapperClasses","animation","computedStyle","defaultAttrs","footerComponent","noButton","BPlaceholder","BPlaceholderButton","columnsToNumber","useToNumber","columns","rowsToNumber","rows","computedHeaderColumns","headerColumns","NaN","computedFooterColumns","footerColumns","headerColumnsNumber","footerColumnsNumber","columnsNumber","rowsNumber","computedHeaderColumnsLength","computedFooterColumnsLength"],"mappings":"2hBAsBA,MAAMA,EAASC,EASTC,EAAQC,EAAAA,YAAYH,EAAQ,gBAE5BI,EAAcC,EAAAA,UAAS,SACX,IAAhBH,EAAMI,WACF,EACuB,iBAAhBJ,EAAMI,MACXJ,EAAMI,MAAMC,WACZL,EAAMI,MAAME,QAAQ,IAAK,MAG3BC,EAAaJ,EAAAA,UAAS,SACX,IAAfH,EAAMQ,UACF,EACsB,iBAAfR,EAAMQ,KACXR,EAAMQ,KAAKH,WACXL,EAAMQ,OAGRC,EAAeC,EAAAA,uBACnBP,EAAAA,UAAS,KAAO,CACdQ,UAAWX,EAAMY,aAGfC,EAAkBV,EAAAA,UAAS,IAAM,CACrCM,EAAaK,MACb,CACE,CAAC,OAAOP,EAAWO,cAA+B,IAArBP,EAAWO,YAA6C,IAAt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C,EAGTC,EAAQC,EAAAA,YAAYH,EAAQ"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, mergeProps, createSlots, renderSlot, createVNode, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode } from "vue";
2
2
  import { _ as _sfc_main$5, d as _sfc_main$6 } from "./BCard.vue_vue_type_script_setup_true_lang-DoeLCt4a.mjs";
3
3
  import { u as useDefaults } from "./useDefaults-BTLXvYhO.mjs";
4
- import { _ as _sfc_main$7 } from "./BTableSimple.vue_vue_type_script_setup_true_lang-B4MDRM8j.mjs";
4
+ import { _ as _sfc_main$7 } from "./BTableSimple.vue_vue_type_script_setup_true_lang-Dbrg2rgZ.mjs";
5
5
  import { u as useColorVariantClasses } from "./useColorVariantClasses-ZDE19TZw.mjs";
6
6
  import { u as useToNumber } from "./index-D3jGjWWk.mjs";
7
7
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
@@ -300,4 +300,4 @@ export {
300
300
  _sfc_main$1 as c,
301
301
  _sfc_main as d
302
302
  };
303
- //# sourceMappingURL=BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-DpmTeaLy.mjs.map
303
+ //# sourceMappingURL=BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-BjEhw9SS.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-DpmTeaLy.mjs","sources":["../src/components/BPlaceholder/BPlaceholder.vue","../src/components/BPlaceholder/BPlaceholderButton.vue","../src/components/BPlaceholder/BPlaceholderCard.vue","../src/components/BPlaceholder/BPlaceholderTable.vue","../src/components/BPlaceholder/BPlaceholderWrapper.vue"],"sourcesContent":["<template>\n <component :is=\"props.wrapperTag\" :class=\"wrapperClasses\">\n <component\n v-bind=\"$attrs\"\n :is=\"tag\"\n class=\"placeholder\"\n :class=\"computedClasses\"\n :style=\"computedStyle\"\n />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type CSSProperties} from 'vue'\nimport type {BPlaceholderProps} from '../../types/ComponentProps'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<BPlaceholderProps>(), {\n animation: undefined,\n cols: 12,\n size: 'md',\n tag: 'span',\n variant: null,\n width: undefined,\n wrapperTag: 'span',\n})\nconst props = useDefaults(_props, 'BPlaceholder')\n\nconst widthString = computed(() =>\n props.width === undefined\n ? undefined\n : typeof props.width === 'number'\n ? props.width.toString()\n : props.width.replace('%', '')\n)\n\nconst colsString = computed(() =>\n props.cols === undefined\n ? undefined\n : typeof props.cols === 'number'\n ? props.cols.toString()\n : props.cols\n)\n\nconst colorClasses = useColorVariantClasses(\n computed(() => ({\n bgVariant: props.variant,\n }))\n)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n [`col-${colsString.value}`]: colsString.value !== undefined && widthString.value === undefined,\n [`placeholder-${props.size}`]: props.size !== 'md',\n },\n])\n\nconst wrapperClasses = computed(() => ({\n [`placeholder-${props.animation}`]: props.animation !== undefined,\n}))\n\nconst computedStyle = computed<CSSProperties>(() => ({\n width: widthString.value === undefined ? undefined : `${widthString.value}%`,\n}))\n</script>\n","<template>\n <BPlaceholder\n class=\"btn disabled\"\n :class=\"computedClasses\"\n :animation=\"props.animation\"\n :width=\"props.width\"\n :cols=\"props.cols\"\n :tag=\"props.tag\"\n :style=\"{'cursor': 'wait', 'pointer-events': 'auto'}\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport BPlaceholder from './BPlaceholder.vue'\nimport type {BPlaceholderButtonProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BPlaceholderButtonProps>(), {\n animation: undefined,\n cols: undefined,\n tag: 'div',\n variant: 'primary',\n width: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderButton')\n\nconst computedClasses = computed(() => ({\n [`btn-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <BCard :img-placement=\"props.imgPlacement\">\n <template v-if=\"!props.noImg\" #img>\n <slot name=\"img\">\n <BCardImg\n :blank=\"!props.imgSrc ? true : false\"\n :blank-color=\"props.imgBlankColor\"\n :height=\"!props.imgSrc ? props.imgHeight : undefined\"\n :src=\"props.imgSrc\"\n :img-placement=\"props.imgPlacement\"\n :style=\"{cursor: 'wait'}\"\n />\n </slot>\n </template>\n\n <template v-if=\"!props.noHeader\" #header>\n <slot name=\"header\">\n <BPlaceholder\n :width=\"props.headerWidth\"\n :variant=\"props.headerVariant\"\n :animation=\"props.headerAnimation\"\n :size=\"props.headerSize\"\n />\n </slot>\n </template>\n <slot>\n <BPlaceholder cols=\"7\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"4\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"4\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"6\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"8\" v-bind=\"defaultAttrs\" />\n </slot>\n <template v-if=\"!props.noFooter\" #footer>\n <slot name=\"footer\">\n <component\n :is=\"footerComponent\"\n :width=\"props.footerWidth\"\n :animation=\"props.footerAnimation\"\n :size=\"props.noButton ? props.footerSize : undefined\"\n :variant=\"props.footerVariant\"\n />\n </slot>\n </template>\n </BCard>\n</template>\n\n<script setup lang=\"ts\">\nimport BCard from '../BCard/BCard.vue'\nimport BCardImg from '../BCard/BCardImg.vue'\nimport BPlaceholder from './BPlaceholder.vue'\nimport BPlaceholderButton from './BPlaceholderButton.vue'\nimport type {BPlaceholderCardProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BPlaceholderCardProps>(), {\n animation: undefined,\n footerAnimation: undefined,\n footerSize: 'md',\n footerVariant: undefined,\n footerWidth: 100,\n headerAnimation: undefined,\n headerSize: 'md',\n headerVariant: undefined,\n headerWidth: 100,\n imgBlankColor: '#868e96',\n imgPlacement: 'top',\n imgHeight: 100,\n imgSrc: undefined,\n noButton: false,\n noFooter: false,\n noHeader: false,\n noImg: false,\n size: 'md',\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderCard')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n footer?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n header?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n img?: (props: Record<string, never>) => any\n}>()\n\nconst defaultAttrs = computed(() => ({\n animation: props.animation,\n size: props.size,\n variant: props.variant,\n}))\n\nconst footerComponent = computed(() => (!props.noButton ? BPlaceholderButton : BPlaceholder))\n</script>\n","<template>\n <BTableSimple>\n <slot v-if=\"!props.noHeader\" name=\"thead\">\n <thead>\n <tr>\n <th v-for=\"(_, i) in computedHeaderColumnsLength\" :key=\"i\">\n <BPlaceholder\n :size=\"props.headerSize\"\n :variant=\"props.headerVariant\"\n :animation=\"props.headerAnimation\"\n :width=\"props.headerCellWidth\"\n />\n </th>\n </tr>\n </thead>\n </slot>\n <slot>\n <tbody>\n <tr v-for=\"(_, j) in rowsNumber\" :key=\"j\">\n <td v-for=\"(__, k) in columnsNumber\" :key=\"k\">\n <BPlaceholder\n :size=\"props.size\"\n :variant=\"props.variant\"\n :animation=\"props.animation\"\n :width=\"props.cellWidth\"\n />\n </td>\n </tr>\n </tbody>\n </slot>\n <slot v-if=\"props.showFooter\" name=\"tfoot\">\n <tfoot>\n <tr>\n <th v-for=\"(_, l) in computedFooterColumnsLength\" :key=\"l\">\n <BPlaceholder\n :size=\"props.footerSize\"\n :variant=\"props.footerVariant\"\n :animation=\"props.footerAnimation\"\n :width=\"props.footerCellWidth\"\n />\n </th>\n </tr>\n </tfoot>\n </slot>\n </BTableSimple>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BPlaceholderTableProps} from '../../types/ComponentProps'\nimport BTableSimple from '../BTable/BTableSimple.vue'\nimport BPlaceholder from './BPlaceholder.vue'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BPlaceholderTableProps>(), {\n animation: undefined,\n cellWidth: 100,\n columns: 5,\n footerAnimation: undefined,\n footerCellWidth: 100,\n footerColumns: undefined,\n footerSize: 'md',\n footerVariant: undefined,\n headerAnimation: undefined,\n headerCellWidth: 100,\n headerColumns: undefined,\n headerSize: 'md',\n headerVariant: undefined,\n noHeader: false,\n rows: 3,\n showFooter: false,\n size: 'md',\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderTable')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tfoot?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thead?: (props: Record<string, never>) => any\n}>()\n\nconst columnsToNumber = useToNumber(() => props.columns)\nconst rowsToNumber = useToNumber(() => props.rows)\nconst computedHeaderColumns = computed(() => props.headerColumns ?? NaN)\nconst computedFooterColumns = computed(() => props.footerColumns ?? NaN)\nconst headerColumnsNumber = useToNumber(computedHeaderColumns)\nconst footerColumnsNumber = useToNumber(computedFooterColumns)\n\nconst columnsNumber = computed(() => columnsToNumber.value || 5)\nconst rowsNumber = computed(() => rowsToNumber.value || 3)\n\nconst computedHeaderColumnsLength = computed(() =>\n props.headerColumns === undefined ? columnsNumber.value : headerColumnsNumber.value\n)\nconst computedFooterColumnsLength = computed(() =>\n props.footerColumns === undefined ? columnsNumber.value : footerColumnsNumber.value\n)\n</script>\n","<template>\n <slot v-if=\"props.loading\" name=\"loading\" />\n <slot v-else />\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BPlaceholderWrapperProps} from '../../types/ComponentProps'\n\nconst _props = withDefaults(defineProps<BPlaceholderWrapperProps>(), {\n loading: false,\n})\nconst props = useDefaults(_props, 'BPlaceholderWrapper')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n loading?: (props: Record<string, never>) => any\n}>()\n</script>\n"],"names":["BPlaceholderButton","BPlaceholder"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,UAAM,SAAS;AAST,UAAA,QAAQ,YAAY,QAAQ,cAAc;AAEhD,UAAM,cAAc;AAAA,MAAS,MAC3B,MAAM,UAAU,SACZ,SACA,OAAO,MAAM,UAAU,WACrB,MAAM,MAAM,SAAS,IACrB,MAAM,MAAM,QAAQ,KAAK,EAAE;AAAA,IACnC;AAEA,UAAM,aAAa;AAAA,MAAS,MAC1B,MAAM,SAAS,SACX,SACA,OAAO,MAAM,SAAS,WACpB,MAAM,KAAK,SAAA,IACX,MAAM;AAAA,IACd;AAEA,UAAM,eAAe;AAAA,MACnB,SAAS,OAAO;AAAA,QACd,WAAW,MAAM;AAAA,MAAA,EACjB;AAAA,IACJ;AACM,UAAA,kBAAkB,SAAS,MAAM;AAAA,MACrC,aAAa;AAAA,MACb;AAAA,QACE,CAAC,OAAO,WAAW,KAAK,EAAE,GAAG,WAAW,UAAU,UAAa,YAAY,UAAU;AAAA,QACrF,CAAC,eAAe,MAAM,IAAI,EAAE,GAAG,MAAM,SAAS;AAAA,MAAA;AAAA,IAChD,CACD;AAEK,UAAA,iBAAiB,SAAS,OAAO;AAAA,MACrC,CAAC,eAAe,MAAM,SAAS,EAAE,GAAG,MAAM,cAAc;AAAA,IAAA,EACxD;AAEI,UAAA,gBAAgB,SAAwB,OAAO;AAAA,MACnD,OAAO,YAAY,UAAU,SAAY,SAAY,GAAG,YAA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A,IAChF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5FA,UAAM,SAAS;AAGT,UAAA,QAAQ,YAAY,QAAQ,qBAAqB;;;;;;"}
1
+ {"version":3,"file":"BPlaceholderWrapper.vue_vue_type_script_setup_true_lang-BjEhw9SS.mjs","sources":["../src/components/BPlaceholder/BPlaceholder.vue","../src/components/BPlaceholder/BPlaceholderButton.vue","../src/components/BPlaceholder/BPlaceholderCard.vue","../src/components/BPlaceholder/BPlaceholderTable.vue","../src/components/BPlaceholder/BPlaceholderWrapper.vue"],"sourcesContent":["<template>\n <component :is=\"props.wrapperTag\" :class=\"wrapperClasses\">\n <component\n v-bind=\"$attrs\"\n :is=\"tag\"\n class=\"placeholder\"\n :class=\"computedClasses\"\n :style=\"computedStyle\"\n />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type CSSProperties} from 'vue'\nimport type {BPlaceholderProps} from '../../types/ComponentProps'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<BPlaceholderProps>(), {\n animation: undefined,\n cols: 12,\n size: 'md',\n tag: 'span',\n variant: null,\n width: undefined,\n wrapperTag: 'span',\n})\nconst props = useDefaults(_props, 'BPlaceholder')\n\nconst widthString = computed(() =>\n props.width === undefined\n ? undefined\n : typeof props.width === 'number'\n ? props.width.toString()\n : props.width.replace('%', '')\n)\n\nconst colsString = computed(() =>\n props.cols === undefined\n ? undefined\n : typeof props.cols === 'number'\n ? props.cols.toString()\n : props.cols\n)\n\nconst colorClasses = useColorVariantClasses(\n computed(() => ({\n bgVariant: props.variant,\n }))\n)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n [`col-${colsString.value}`]: colsString.value !== undefined && widthString.value === undefined,\n [`placeholder-${props.size}`]: props.size !== 'md',\n },\n])\n\nconst wrapperClasses = computed(() => ({\n [`placeholder-${props.animation}`]: props.animation !== undefined,\n}))\n\nconst computedStyle = computed<CSSProperties>(() => ({\n width: widthString.value === undefined ? undefined : `${widthString.value}%`,\n}))\n</script>\n","<template>\n <BPlaceholder\n class=\"btn disabled\"\n :class=\"computedClasses\"\n :animation=\"props.animation\"\n :width=\"props.width\"\n :cols=\"props.cols\"\n :tag=\"props.tag\"\n :style=\"{'cursor': 'wait', 'pointer-events': 'auto'}\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport BPlaceholder from './BPlaceholder.vue'\nimport type {BPlaceholderButtonProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BPlaceholderButtonProps>(), {\n animation: undefined,\n cols: undefined,\n tag: 'div',\n variant: 'primary',\n width: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderButton')\n\nconst computedClasses = computed(() => ({\n [`btn-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <BCard :img-placement=\"props.imgPlacement\">\n <template v-if=\"!props.noImg\" #img>\n <slot name=\"img\">\n <BCardImg\n :blank=\"!props.imgSrc ? true : false\"\n :blank-color=\"props.imgBlankColor\"\n :height=\"!props.imgSrc ? props.imgHeight : undefined\"\n :src=\"props.imgSrc\"\n :img-placement=\"props.imgPlacement\"\n :style=\"{cursor: 'wait'}\"\n />\n </slot>\n </template>\n\n <template v-if=\"!props.noHeader\" #header>\n <slot name=\"header\">\n <BPlaceholder\n :width=\"props.headerWidth\"\n :variant=\"props.headerVariant\"\n :animation=\"props.headerAnimation\"\n :size=\"props.headerSize\"\n />\n </slot>\n </template>\n <slot>\n <BPlaceholder cols=\"7\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"4\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"4\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"6\" v-bind=\"defaultAttrs\" />\n <BPlaceholder cols=\"8\" v-bind=\"defaultAttrs\" />\n </slot>\n <template v-if=\"!props.noFooter\" #footer>\n <slot name=\"footer\">\n <component\n :is=\"footerComponent\"\n :width=\"props.footerWidth\"\n :animation=\"props.footerAnimation\"\n :size=\"props.noButton ? props.footerSize : undefined\"\n :variant=\"props.footerVariant\"\n />\n </slot>\n </template>\n </BCard>\n</template>\n\n<script setup lang=\"ts\">\nimport BCard from '../BCard/BCard.vue'\nimport BCardImg from '../BCard/BCardImg.vue'\nimport BPlaceholder from './BPlaceholder.vue'\nimport BPlaceholderButton from './BPlaceholderButton.vue'\nimport type {BPlaceholderCardProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BPlaceholderCardProps>(), {\n animation: undefined,\n footerAnimation: undefined,\n footerSize: 'md',\n footerVariant: undefined,\n footerWidth: 100,\n headerAnimation: undefined,\n headerSize: 'md',\n headerVariant: undefined,\n headerWidth: 100,\n imgBlankColor: '#868e96',\n imgPlacement: 'top',\n imgHeight: 100,\n imgSrc: undefined,\n noButton: false,\n noFooter: false,\n noHeader: false,\n noImg: false,\n size: 'md',\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderCard')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n footer?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n header?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n img?: (props: Record<string, never>) => any\n}>()\n\nconst defaultAttrs = computed(() => ({\n animation: props.animation,\n size: props.size,\n variant: props.variant,\n}))\n\nconst footerComponent = computed(() => (!props.noButton ? BPlaceholderButton : BPlaceholder))\n</script>\n","<template>\n <BTableSimple>\n <slot v-if=\"!props.noHeader\" name=\"thead\">\n <thead>\n <tr>\n <th v-for=\"(_, i) in computedHeaderColumnsLength\" :key=\"i\">\n <BPlaceholder\n :size=\"props.headerSize\"\n :variant=\"props.headerVariant\"\n :animation=\"props.headerAnimation\"\n :width=\"props.headerCellWidth\"\n />\n </th>\n </tr>\n </thead>\n </slot>\n <slot>\n <tbody>\n <tr v-for=\"(_, j) in rowsNumber\" :key=\"j\">\n <td v-for=\"(__, k) in columnsNumber\" :key=\"k\">\n <BPlaceholder\n :size=\"props.size\"\n :variant=\"props.variant\"\n :animation=\"props.animation\"\n :width=\"props.cellWidth\"\n />\n </td>\n </tr>\n </tbody>\n </slot>\n <slot v-if=\"props.showFooter\" name=\"tfoot\">\n <tfoot>\n <tr>\n <th v-for=\"(_, l) in computedFooterColumnsLength\" :key=\"l\">\n <BPlaceholder\n :size=\"props.footerSize\"\n :variant=\"props.footerVariant\"\n :animation=\"props.footerAnimation\"\n :width=\"props.footerCellWidth\"\n />\n </th>\n </tr>\n </tfoot>\n </slot>\n </BTableSimple>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BPlaceholderTableProps} from '../../types/ComponentProps'\nimport BTableSimple from '../BTable/BTableSimple.vue'\nimport BPlaceholder from './BPlaceholder.vue'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BPlaceholderTableProps>(), {\n animation: undefined,\n cellWidth: 100,\n columns: 5,\n footerAnimation: undefined,\n footerCellWidth: 100,\n footerColumns: undefined,\n footerSize: 'md',\n footerVariant: undefined,\n headerAnimation: undefined,\n headerCellWidth: 100,\n headerColumns: undefined,\n headerSize: 'md',\n headerVariant: undefined,\n noHeader: false,\n rows: 3,\n showFooter: false,\n size: 'md',\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BPlaceholderTable')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tfoot?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thead?: (props: Record<string, never>) => any\n}>()\n\nconst columnsToNumber = useToNumber(() => props.columns)\nconst rowsToNumber = useToNumber(() => props.rows)\nconst computedHeaderColumns = computed(() => props.headerColumns ?? NaN)\nconst computedFooterColumns = computed(() => props.footerColumns ?? NaN)\nconst headerColumnsNumber = useToNumber(computedHeaderColumns)\nconst footerColumnsNumber = useToNumber(computedFooterColumns)\n\nconst columnsNumber = computed(() => columnsToNumber.value || 5)\nconst rowsNumber = computed(() => rowsToNumber.value || 3)\n\nconst computedHeaderColumnsLength = computed(() =>\n props.headerColumns === undefined ? columnsNumber.value : headerColumnsNumber.value\n)\nconst computedFooterColumnsLength = computed(() =>\n props.footerColumns === undefined ? columnsNumber.value : footerColumnsNumber.value\n)\n</script>\n","<template>\n <slot v-if=\"props.loading\" name=\"loading\" />\n <slot v-else />\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BPlaceholderWrapperProps} from '../../types/ComponentProps'\n\nconst _props = withDefaults(defineProps<BPlaceholderWrapperProps>(), {\n loading: false,\n})\nconst props = useDefaults(_props, 'BPlaceholderWrapper')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n loading?: (props: Record<string, never>) => any\n}>()\n</script>\n"],"names":["BPlaceholderButton","BPlaceholder"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,UAAM,SAAS;AAST,UAAA,QAAQ,YAAY,QAAQ,cAAc;AAEhD,UAAM,cAAc;AAAA,MAAS,MAC3B,MAAM,UAAU,SACZ,SACA,OAAO,MAAM,UAAU,WACrB,MAAM,MAAM,SAAS,IACrB,MAAM,MAAM,QAAQ,KAAK,EAAE;AAAA,IACnC;AAEA,UAAM,aAAa;AAAA,MAAS,MAC1B,MAAM,SAAS,SACX,SACA,OAAO,MAAM,SAAS,WACpB,MAA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BAAmB;AAWrD,UAAM,kBAAkB,YAAY,MAAM,MAAM,OAAO;AACvD,UAAM,eAAe,YAAY,MAAM,MAAM,IAAI;AACjD,UAAM,wBAAwB,SAAS,MAAM,MAAM,iBAAiB,GAAG;AACvE,UAAM,wBAAwB,SAAS,MAAM,MAAM,iBAAiB,GAAG;AACjE,UAAA,sBAAsB,YAAY,qBAAqB;AACvD,UAAA,sBAAsB,YAAY,qBAAqB;AAE7D,UAAM,gBAAgB,SAAS,MAAM,gBAAgB,SAAS,CAAC;AAC/D,UAAM,aAAa,SAAS,MAAM,aAAa,SAAS,CAAC;AAEzD,UAAM,8BAA8B;AAAA,MAAS,MAC3C,MAAM,kBAAkB,SAAY,cAAc,QAAQ,oBAAoB;AAAA,IAChF;AACA,UAAM,8BAA8B;AAAA,MAAS,MAC3C,MAAM,kBAAkB,SAAY,cAAc,QAAQ,oBAAoB;AAAA,IAChF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5FA,UAAM,SAAS;AAGT,UAAA,QAAQ,YAAY,QAAQ,qBAAqB;;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("vue"),t=require("./object-B-6ddRYH.js"),l=require("./BTableSimple.vue_vue_type_script_setup_true_lang-BGc-Vbfw.js"),o=require("./useDefaults-Bq2idhQU.js"),a=require("./stringUtils-BBcOJJJC.js"),r=require("./useId-BOa4n5pr.js"),n=require("./index-BqHkgtNq.js"),s=(e,l,o)=>{const a=t.get(e,l);return o&&"function"==typeof o?o(a,l,e):a},d=e=>"object"==typeof e&&null!==e,i=e=>"object"==typeof e&&null!==e&&"key"in e,u=e.defineComponent({__name:"BTbody",props:{variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BTbody"),r=e.computed((()=>({[`thead-${a.variant}`]:null!==a.variant})));return(t,l)=>(e.openBlock(),e.createElementBlock("tbody",{class:e.normalizeClass(r.value)},[e.renderSlot(t.$slots,"default")],2))}}),c=["scope","colspan","rowspan","data-label"],f={key:0},v=e.defineComponent({__name:"BTd",props:{colspan:{default:void 0},rowspan:{default:void 0},stackedHeading:{default:void 0},stickyColumn:{type:Boolean,default:!1},variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BTd"),r=e.computed((()=>({[`table-${a.variant}`]:null!==a.variant,"b-table-sticky-column":a.stickyColumn,"table-b-table-default":a.stickyColumn&&null===a.variant}))),n=e.computed((()=>a.colspan?"colspan":a.rowspan?"rowspan":"col"));return(t,l)=>(e.openBlock(),e.createElementBlock("td",{scope:n.value,class:e.normalizeClass(r.value),colspan:e.unref(a).colspan,rowspan:e.unref(a).rowspan,"data-label":e.unref(a).stackedHeading},[e.unref(a).stackedHeading?(e.openBlock(),e.createElementBlock("div",f,[e.renderSlot(t.$slots,"default")])):e.renderSlot(t.$slots,"default",{key:1})],10,c))}}),p=e.defineComponent({__name:"BTfoot",props:{variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BTfoot"),r=e.computed((()=>({[`table-${a.variant}`]:null!==a.variant})));return(t,l)=>(e.openBlock(),e.createElementBlock("tfoot",{class:e.normalizeClass(r.value)},[e.renderSlot(t.$slots,"default")],2))}}),m=["scope","colspan","rowspan","data-label"],y={key:0},b=e.defineComponent({__name:"BTh",props:{colspan:{default:void 0},rowspan:{default:void 0},stackedHeading:{default:void 0},stickyColumn:{type:Boolean,default:!1},variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BTh"),r=e.computed((()=>({[`table-${a.variant}`]:null!==a.variant,"b-table-sticky-column":a.stickyColumn,"table-b-table-default":a.stickyColumn&&null===a.variant}))),n=e.computed((()=>a.colspan?"colspan":a.rowspan?"rowspan":"col"));return(t,l)=>(e.openBlock(),e.createElementBlock("th",{scope:n.value,class:e.normalizeClass(r.value),colspan:e.unref(a).colspan,rowspan:e.unref(a).rowspan,"data-label":e.unref(a).stackedHeading},[void 0!==e.unref(a).stackedHeading?(e.openBlock(),e.createElementBlock("div",y,[e.renderSlot(t.$slots,"default")])):e.renderSlot(t.$slots,"default",{key:1})],10,m))}}),k=e.defineComponent({__name:"BThead",props:{variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BThead"),r=e.computed((()=>({[`table-${a.variant}`]:null!==a.variant})));return(t,l)=>(e.openBlock(),e.createElementBlock("thead",{class:e.normalizeClass(r.value)},[e.renderSlot(t.$slots,"default")],2))}}),g=e.defineComponent({__name:"BTr",props:{variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BTr"),r=e.computed((()=>({[`table-${a.variant}`]:null!==a.variant})));return(t,l)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass(r.value)},[e.renderSlot(t.$slots,"default")],2))}}),w=e=>"string"==typeof e?a.titleCase(e):void 0!==e.label?e.label:"string"==typeof e.key?a.titleCase(e.key):e.key,h=Object.freeze(Object.keys({bordered:0,borderless:0,borderVariant:0,captionTop:0,dark:0,fixed:0,hover:0,id:0,noBorderCollapse:0,outlined:0,responsive:0,small:0,stacked:0,stickyHeader:0,striped:0,stripedColumns:0,variant:0,tableAttrs:0,tableClass:0})),C=Object.freeze(Object.keys({align:0,caption:0,detailsTdClass:0,fieldColumnClass:0,fields:0,footClone:0,footRowVariant:0,footVariant:0,headRowVariant:0,headVariant:0,items:0,labelStacked:0,modelValue:0,primaryKey:0,tbodyClass:0,tbodyTrAttrs:0,tbodyTrClass:0,tfootClass:0,tfootTrClass:0,theadClass:0,theadTrClass:0})),B=["TD","TH","TR"],S=["a","a *","button","button *","input:not(.disabled):not([disabled])","select:not(.disabled):not([disabled])","textarea:not(.disabled):not([disabled])",'[role="link"]','[role="link"] *','[role="button"]','[role="button"] *',"[tabindex]:not(.disabled):not([disabled])"].join(","),x=e=>{if(!e||!e.target)return!1;const t=e.target;if("disabled"in t&&t.disabled||-1!==B.indexOf(t.tagName))return!1;if(t.closest(".dropdown-menu"))return!0;const l="LABEL"===t.tagName?t:t.closest("label");if(l){const e=l.getAttribute("for"),t=e?document.getElementById(e):l.querySelector("input, select, textarea");if(t&&!t.disabled)return!0}return t.matches(S)},T={key:0,class:"b-table-stacked-label"},_={class:"d-inline-flex flex-nowrap align-items-center gap-1"},V={key:2},$=e.defineComponent({__name:"BTableLite",props:{align:{default:void 0},caption:{default:void 0},detailsTdClass:{default:void 0},fieldColumnClass:{type:[Function,String,Object,Array],default:void 0},fields:{default:()=>[]},footClone:{type:Boolean,default:!1},footRowVariant:{default:void 0},footVariant:{default:void 0},headRowVariant:{default:void 0},headVariant:{default:void 0},items:{default:()=>[]},labelStacked:{type:Boolean,default:!1},modelValue:{default:void 0},primaryKey:{default:void 0},tbodyClass:{default:void 0},tbodyTrAttrs:{type:[Function,Object],default:void 0},tbodyTrClass:{type:[Function,String,Array,Object],default:void 0},tfootClass:{default:void 0},tfootTrClass:{default:void 0},theadClass:{default:void 0},theadTrClass:{default:void 0},bordered:{type:Boolean,default:void 0},borderless:{type:Boolean,default:void 0},borderVariant:{default:void 0},captionTop:{type:Boolean,default:void 0},dark:{type:Boolean,default:void 0},fixed:{type:Boolean,default:void 0},hover:{type:Boolean,default:void 0},id:{default:void 0},noBorderCollapse:{type:Boolean,default:void 0},outlined:{type:Boolean,default:void 0},responsive:{type:[Boolean,String],default:void 0},small:{type:Boolean,default:void 0},stacked:{type:[Boolean,String],default:void 0},stickyHeader:{type:[Boolean,String,Number],default:void 0},striped:{type:Boolean,default:void 0},stripedColumns:{type:Boolean,default:void 0},variant:{default:void 0},tableAttrs:{},tableClass:{default:void 0}},emits:["head-clicked","row-clicked","row-dblclicked","row-contextmenu","row-hovered","row-unhovered","row-middle-clicked"],setup(n,{emit:c}){const f=n,m=o.useDefaults(f,"BTableLite"),y=c,C=e.useSlots(),B=r.useId((()=>m.id)),S=e.ref(new WeakMap);e.watch((()=>m.items),(e=>{e.forEach((e=>{d(e)&&S.value.set(...(e=>[e,e._showDetails])(e))}))}),{deep:!0,immediate:!0});const $=e.computed((()=>[m.tableClass,{[`align-${m.align}`]:void 0!==m.align}])),P=e.computed((()=>{if(!m.fields.length&&m.items.length){const[e]=m.items;return d(e)||Array.isArray(e)?Object.keys(e).map((e=>{const t=a.startCase(e);return{key:e,label:t,tdAttr:!0===m.stacked?{"data-label":t}:void 0}})):[{key:"",_noHeader:!0}]}return m.fields.map((e=>{if(i(e))return{...e,tdAttr:!0===m.stacked?{"data-label":a.startCase(e.key),...e.tdAttr}:e.tdAttr};const t=a.startCase(e);return{key:e,label:t,tdAttr:!0===m.stacked?{"data-label":t}:void 0}}))})),N=e.computed((()=>P.value.length)),A=e.computed((()=>!(N.value>0&&P.value.every((e=>!0===e._noHeader))))),E=e.computed((()=>({variant:m.footVariant,class:m.tfootClass}))),R=(e,l,o)=>{const a=String(l.key),r=t.get(e,a);return l.thAttr&&"function"==typeof l.thAttr?l.thAttr(r,a,e,o):l.thAttr},F=(e,t,l=!1)=>{y("head-clicked",e.key,e,t,l)},D=e=>{if(d(e)){const t=S.value.get(e);S.value.set(e,!t),e._showDetails=!t}},j=e=>[e.class,e.thClass,{"b-table-sticky-column":e.stickyColumn},m.fieldColumnClass?"function"==typeof m.fieldColumnClass?m.fieldColumnClass(e):m.fieldColumnClass:null],I=(e,l)=>{var o,a;const r=t.get(l,String(e.key));return[e.class,"function"==typeof e.tdClass?e.tdClass(r,String(e.key),l):e.tdClass,d(l)&&(null==(o=l._cellVariants)?void 0:o[e.key])?`table-${null==(a=l._cellVariants)?void 0:a[e.key]}`:null,{"b-table-sticky-column":e.stickyColumn}]},M=(e,t)=>m.tbodyTrAttrs?"function"==typeof m.tbodyTrAttrs?m.tbodyTrAttrs(e,t):m.tbodyTrAttrs:null,z=(e,t)=>m.tbodyTrClass?"function"==typeof m.tbodyTrClass?m.tbodyTrClass(e,t):m.tbodyTrClass:null,O=e.computed((()=>({...t.pick(m,h),tableClass:$.value,id:B.value})));return(o,a)=>(e.openBlock(),e.createBlock(l._sfc_main,e.normalizeProps(e.guardReactiveProps(O.value)),{default:e.withCtx((()=>[e.withDirectives(e.createVNode(k,{variant:e.unref(m).headVariant,class:e.normalizeClass(e.unref(m).theadClass)},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"thead-top",{columns:N.value,fields:P.value}),e.createVNode(g,{variant:e.unref(m).headRowVariant,class:e.normalizeClass(e.unref(m).theadTrClass)},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(t=>(e.openBlock(),e.createBlock(b,e.mergeProps({key:t.key,scope:"col",class:j(t),title:t.headerTitle,variant:t.variant,abbr:t.headerAbbr,style:t.thStyle,ref_for:!0},R(null,t,"top"),{onClick:e=>F(t,e)}),{default:e.withCtx((()=>[e.renderSlot(o.$slots,C[`head(${String(t.key)})`]?`head(${String(t.key)})`:"head()",{label:t.label,column:t.key,field:t,isFoot:!1},(()=>[e.createTextVNode(e.toDisplayString(e.unref(w)(t)),1)]))])),_:2},1040,["class","title","variant","abbr","style","onClick"])))),128))])),_:3},8,["variant","class"]),C["thead-sub"]?(e.openBlock(),e.createBlock(g,{key:0},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(t=>(e.openBlock(),e.createBlock(v,{key:t.key,scope:"col",variant:t.variant,class:e.normalizeClass([t.class,t.thClass])},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"thead-sub",{items:e.unref(m).items,fields:P.value,field:t},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:2},1032,["variant","class"])))),128))])),_:3})):e.createCommentVNode("",!0)])),_:3},8,["variant","class"]),[[e.vShow,A.value]]),e.createVNode(u,{class:e.normalizeClass(e.unref(m).tbodyClass)},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"custom-body",{fields:P.value,items:e.unref(m).items,columns:N.value},(()=>[!e.unref(m).stacked&&C["top-row"]?(e.openBlock(),e.createBlock(g,e.mergeProps({key:0,class:z(null,"row-top")},M(null,"row-top")),{default:e.withCtx((()=>[e.renderSlot(o.$slots,"top-row",{columns:N.value,fields:P.value})])),_:3},16,["class"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m).items,((l,a)=>{return e.openBlock(),e.createElementBlock(e.Fragment,{key:e.unref(m).primaryKey&&e.unref(t.get)(l,e.unref(m).primaryKey)?e.unref(t.get)(l,e.unref(m).primaryKey):a},[e.createVNode(g,e.mergeProps({id:e.unref(m).primaryKey&&e.unref(t.get)(l,e.unref(m).primaryKey)?(r=e.unref(t.get)(l,e.unref(m).primaryKey),`${B.value}__row_${r}`):void 0,class:z(l,"row"),variant:e.unref(d)(l)?l._rowVariant:void 0,ref_for:!0},M(l,"row"),{onClick:t=>!e.unref(x)(t)&&y("row-clicked",l,a,t),onDblclick:t=>!e.unref(x)(t)&&y("row-dblclicked",l,a,t),onContextmenu:t=>!e.unref(x)(t)&&y("row-contextmenu",l,a,t),onMouseenter:t=>!e.unref(x)(t)&&y("row-hovered",l,a,t),onMouseleave:t=>!e.unref(x)(t)&&y("row-unhovered",l,a,t),onMousedown:e=>((e,t,l)=>{1!==l.button||x(l)||y("row-middle-clicked",e,t,l)})(l,a,e)}),{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(r=>{var n;return e.openBlock(),e.createBlock(v,e.mergeProps({key:r.key,variant:e.unref(d)(l)&&(null==(n=l._cellVariants)?void 0:n[r.key])?null:r.variant,class:I(r,l),ref_for:!0},((e,l,o)=>{const a=t.get(e,l);return o&&"function"==typeof o?o(a,l,e):o})(l,String(r.key),r.tdAttr)),{default:e.withCtx((()=>[e.unref(m).stacked&&e.unref(m).labelStacked?(e.openBlock(),e.createElementBlock("label",T,e.toDisplayString(e.unref(w)(r)),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,C[`cell(${String(r.key)})`]?`cell(${String(r.key)})`:"cell()",{value:e.unref(s)(l,String(r.key),r.formatter),unformatted:e.unref(t.get)(l,String(r.key)),index:a,item:l,field:r,items:o.items,toggleDetails:()=>D(l),detailsShowing:!!e.unref(d)(l)&&(S.value.get(l)??!1)},(()=>[C[`cell(${String(r.key)})`]||C["cell()"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(s)(l,String(r.key),r.formatter)),1)],64))]))])),_:2},1040,["variant","class"])})),128))])),_:2},1040,["id","class","variant","onClick","onDblclick","onContextmenu","onMouseenter","onMouseleave","onMousedown"]),e.unref(d)(l)&&!0===S.value.get(l)&&C["row-details"]?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(g,{"aria-hidden":"true",role:"presentation",class:"d-none"}),e.createVNode(g,e.mergeProps({class:z(l,"row-details"),variant:l._rowVariant,ref_for:!0},M(l,"row-details")),{default:e.withCtx((()=>[e.createVNode(v,{colspan:N.value,class:e.normalizeClass(o.detailsTdClass)},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"row-details",{item:l,toggleDetails:()=>D(l),fields:P.value,index:a})])),_:2},1032,["colspan","class"])])),_:2},1040,["class","variant"])],64)):e.createCommentVNode("",!0)],64);var r})),128)),!e.unref(m).stacked&&C["bottom-row"]?(e.openBlock(),e.createBlock(g,e.mergeProps({key:1,class:["bottom-row",z(null,"row-bottom")]},M(null,"row-bottom")),{default:e.withCtx((()=>[e.renderSlot(o.$slots,"bottom-row",{columns:N.value,fields:P.value})])),_:3},16,["class"])):e.createCommentVNode("",!0)]))])),_:3},8,["class"]),e.unref(m).footClone?(e.openBlock(),e.createBlock(p,e.normalizeProps(e.mergeProps({key:0},E.value)),{default:e.withCtx((()=>[e.createVNode(g,{variant:e.unref(m).footRowVariant,class:e.normalizeClass(e.unref(m).tfootTrClass)},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(t=>(e.openBlock(),e.createBlock(b,e.mergeProps({key:t.key,scope:"col",class:j(t),title:t.headerTitle,abbr:t.headerAbbr,style:t.thStyle,variant:t.variant,ref_for:!0},R(null,t,"bottom"),{onClick:e=>F(t,e,!0)}),{default:e.withCtx((()=>[e.createElementVNode("div",_,[e.createElementVNode("div",null,[e.renderSlot(o.$slots,C[`foot(${String(t.key)})`]?`foot(${String(t.key)})`:"foot()",{label:t.label,column:t.key,field:t,isFoot:!0},(()=>[e.createTextVNode(e.toDisplayString(e.unref(w)(t)),1)]))])])])),_:2},1040,["class","title","abbr","style","variant","onClick"])))),128))])),_:3},8,["variant","class"])])),_:3},16)):C["custom-foot"]?(e.openBlock(),e.createBlock(p,e.normalizeProps(e.mergeProps({key:1},E.value)),{default:e.withCtx((()=>[e.renderSlot(o.$slots,"custom-foot",{fields:P.value,items:e.unref(m).items,columns:N.value})])),_:3},16)):e.createCommentVNode("",!0),C["table-caption"]||e.unref(m).caption?(e.openBlock(),e.createElementBlock("caption",V,[e.renderSlot(o.$slots,"table-caption",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(m).caption),1)]))])):e.createCommentVNode("",!0)])),_:3},16))}}),P={style:{opacity:.4},xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-arrow-up-short",viewBox:"0 0 16 16","aria-hidden":""},N={role:"alert","aria-live":"polite"},A={class:"text-center my-2"},E=e.defineComponent({__name:"BTable",props:e.mergeModels({provider:{default:void 0},noProvider:{default:void 0},noProviderPaging:{type:Boolean,default:!1},noProviderSorting:{type:Boolean,default:!1},noProviderFiltering:{type:Boolean,default:!1},mustSort:{type:[Boolean,Array],default:!1},selectable:{type:Boolean,default:!1},multisort:{type:Boolean,default:!1},stickySelect:{type:Boolean,default:!1},selectHead:{type:[Boolean,String],default:!0},selectMode:{default:"multi"},selectionVariant:{default:"primary"},busyLoadingText:{default:"Loading..."},perPage:{default:Number.POSITIVE_INFINITY},currentPage:{default:1},filter:{default:void 0},filterFunction:{type:Function,default:void 0},filterable:{default:void 0},noLocalSorting:{type:Boolean,default:!1},noSelectOnClick:{type:Boolean,default:!1},noSortableIcon:{type:Boolean,default:!1},emptyFilteredText:{default:"There are no records matching your request"},emptyText:{default:"There are no records to show"},showEmpty:{type:Boolean,default:!1},align:{default:void 0},caption:{default:void 0},detailsTdClass:{default:void 0},fieldColumnClass:{type:[Function,String,Object,Array],default:void 0},fields:{default:()=>[]},footClone:{type:Boolean,default:void 0},footRowVariant:{default:void 0},footVariant:{default:void 0},headRowVariant:{default:void 0},headVariant:{default:void 0},items:{default:()=>[]},labelStacked:{type:Boolean,default:void 0},modelValue:{default:void 0},primaryKey:{default:void 0},tbodyClass:{default:void 0},tbodyTrAttrs:{},tbodyTrClass:{type:[Function,String,Array,Object],default:void 0},tfootClass:{default:void 0},tfootTrClass:{default:void 0},theadClass:{default:void 0},theadTrClass:{default:void 0},bordered:{type:Boolean,default:void 0},borderless:{type:Boolean,default:void 0},borderVariant:{default:void 0},captionTop:{type:Boolean,default:void 0},dark:{type:Boolean,default:void 0},fixed:{type:Boolean,default:void 0},hover:{type:Boolean,default:void 0},id:{default:void 0},noBorderCollapse:{type:Boolean,default:void 0},outlined:{type:Boolean,default:void 0},responsive:{type:[Boolean,String],default:void 0},small:{type:Boolean,default:void 0},stacked:{type:[Boolean,String],default:void 0},stickyHeader:{type:[Boolean,String,Number],default:void 0},striped:{type:Boolean,default:void 0},stripedColumns:{type:Boolean,default:void 0},variant:{default:void 0},tableAttrs:{}},{sortBy:{default:void 0},sortByModifiers:{},busy:{type:Boolean,default:!1},busyModifiers:{},selectedItems:{default:()=>[]},selectedItemsModifiers:{}}),emits:e.mergeModels(["filtered","head-clicked","row-clicked","row-dblclicked","row-contextmenu","row-hovered","row-unhovered","row-middle-clicked","row-selected","row-unselected","sorted","change"],["update:sortBy","update:busy","update:selectedItems"]),setup(l,{expose:u,emit:c}){const f=l,p=o.useDefaults(f,"BTable"),m=c,y=e.useSlots(),b=e.computed((()=>Object.keys(y).filter((e=>e.startsWith("cell("))))),k=e.computed((()=>Object.keys(y).filter((e=>e.startsWith("foot("))))),B=e.useModel(l,"sortBy"),S=e.useModel(l,"busy"),x=e.useModel(l,"selectedItems"),T=r.useId((()=>p.id)),_=e.computed({get:()=>new Set([...x.value]),set:e=>{x.value=[...e]}});e.watch(_,((e,t)=>{Array.from(t).filter((t=>!e.has(t))).forEach((e=>{m("row-unselected",e)})),Array.from(e).filter((e=>!t.has(e))).forEach((e=>{m("row-selected",e)}))}));const V={add:e=>{const t=new Set(_.value);t.add(e),_.value=t},clear:()=>{_.value.forEach((e=>{V.delete(e)}))},delete:e=>{const l=new Set(_.value);if(p.primaryKey){const o=p.primaryKey;x.value.forEach(((a,r)=>{const n=t.get(a,o),s=t.get(e,o);n&&s&&n===s&&l.delete(x.value[r])}))}else l.delete(e);_.value=l},set:e=>{_.value=new Set(e)},has:e=>{if(!p.primaryKey)return _.value.has(e);const l=p.primaryKey;for(const o of _.value){const a=t.get(o,l),r=t.get(e,l);if(a&&r&&a===r)return!0}return!1}},E=e.ref([]),R=n.useToNumber((()=>p.perPage),{method:"parseInt"}),F=n.useToNumber((()=>p.currentPage),{method:"parseInt"}),D=e.computed((()=>!!p.filter)),j=e.computed((()=>void 0!==p.provider)),I=e.computed((()=>_.value.size>0)),M=e.computed((()=>void 0!==B.value||p.fields.some((e=>"object"==typeof e&&null!==e&&!0===e.sortable)))),z=e.computed((()=>p.fields.map((e=>{var t;if(!i(e)){const t=a.startCase(e);return{key:e,label:t,tdAttr:!0===p.stacked?{"data-label":t}:void 0}}const l=null==(t=B.value)?void 0:t.find((t=>e.key===t.key)),o=!1===M.value?void 0:void 0===l?"none":"desc"===l.order?"descending":"asc"===l.order?"ascending":"none";return{...e,thAttr:{"aria-sort":o,...e.thAttr}}})))),O=e.computed((()=>({"b-table-busy":S.value,"b-table-selectable":p.selectable,"user-select-none":p.selectable&&I.value}))),L=e.computed((()=>[p.tbodyTrClass?"function"==typeof p.tbodyTrClass?p.tbodyTrClass(null,"table-busy"):p.tbodyTrClass:null])),K=e=>[{"b-table-sortable-column":M.value&&e.sortable}],H=(e,t)=>[{[`selected table-${p.selectionVariant}`]:p.selectable&&!!e&&V.has(e)},p.tbodyTrClass?"function"==typeof p.tbodyTrClass?p.tbodyTrClass(e,t):p.tbodyTrClass:null],q=e=>"function"==typeof e.sortByFormatted?e.sortByFormatted:e.formatter,W=e.computed((()=>{let e=j.value?E.value:p.items;return e=e.map((e=>{if("object"==typeof e&&null!==e&&Object.keys(e).some((e=>e.includes(".")))){let l={};for(const o in e)o.includes(".")?l=t.set(l,o,e[o]):l[o]=e[o];return l}return e})),(!0===D.value&&!j.value||!0===D.value&&j.value&&p.noProviderFiltering)&&(e=e.filter((e=>!d(e)||Object.entries(e).some((([t,l])=>{var o,a,r;return!(null==l||"_"===t[0]||!(null==(o=p.filterable)?void 0:o.includes(t))&&(null==(a=p.filterable)?void 0:a.length))&&(p.filterFunction&&"function"==typeof p.filterFunction?p.filterFunction(e,p.filter):(()=>{const o=z.value.find((e=>!!i(e)&&e.key===t));if(i(o)&&o.filterByFormatted){const t=q(o);if(t)return String(t(l,String(o.key),e))}return"object"==typeof l?JSON.stringify(Object.values(l)):l.toString()})().toLowerCase().includes((null==(r=p.filter)?void 0:r.toLowerCase())??""))}))))),(!0===M.value&&!j.value&&!p.noLocalSorting||!0===M.value&&j.value&&p.noProviderSorting)&&(e=(e=>{var l;const o=null==(l=B.value)?void 0:l.filter((e=>!!e.order));return o&&0!==o.length?[...e].sort(((e,l)=>{for(let a=0;a<(o.length??0);a++){const r=o[a],n=e=>{if(!d(e))return String(e);const l=z.value.find((e=>!!i(e)&&e.key===r.key)),o=t.get(e,r.key);if(i(l)&&l.sortByFormatted){const t=q(l);if(t)return String(s(e,String(l.key),t))}return"object"==typeof o&&null!==o?JSON.stringify(o):(null==o?void 0:o.toString())??""},u=n(e),c=n(l),f=r.comparer?r.comparer(u,c):u.localeCompare(c,void 0,{numeric:!0});if(0!==f)return"asc"===r.order?f:-f}return 0})):e})(e)),e})),Y=e.computed((()=>({emptyFilteredText:p.emptyFilteredText,emptyText:p.emptyText,fields:z.value,items:W.value}))),J=e.computed((()=>Number.isNaN(R.value)||j.value&&!p.noProviderPaging?W.value:W.value.slice((F.value-1)*(R.value||Number.POSITIVE_INFINITY),F.value*(R.value||Number.POSITIVE_INFINITY))));e.watch(J,(e=>{m("change",e)}));const U=(e,t,l)=>{!1===p.noSelectOnClick&&((e,t,l=!1,o=!1,a=!1)=>{if(p.selectable)if("single"===p.selectMode||"multi"===p.selectMode){if(l||o)return;V.has(e)?V.delete(e):"single"===p.selectMode?V.set([e]):V.add(e)}else if(o||a)V.has(e)?V.delete(e):V.add(e);else if(l){const e=[..._.value].pop(),l=W.value.findIndex((t=>t===e)),o=Math.min(l,t),a=Math.max(l,t),r=W.value.slice(o,a+1);V.set(r)}else V.set([e])})(e,t,l.shiftKey,l.ctrlKey,l.metaKey),m("row-clicked",e,t,l)},G=(e,t,l,o=!1)=>{m("head-clicked",e,t,l,o),(e=>{var t,l;if(!M.value)return;const o="object"==typeof e&&null!==e?e.key:e,a="object"==typeof e&&null!==e&&e.sortable;if(!0!==M.value||!0!==a)return;const r=e=>"asc"===e?"desc":void 0===e||!0===p.mustSort||Array.isArray(p.mustSort)&&p.mustSort.includes(o)?"asc":void 0,n=(null==(t=B.value)?void 0:t.findIndex((e=>e.key===o)))??-1,s=null==(l=B.value)?void 0:l[n],d=-1!==n&&s?{...s}:{key:o,order:"asc"};m("sorted",!0===p.multisort?(()=>{var e,t;let l=d;if(-1===n)B.value=[...B.value??[],d];else{const o=r(d.order);l={...d,order:o},B.value=o?null==(e=B.value)?void 0:e.map((e=>e.key===l.key?l:e)):null==(t=B.value)?void 0:t.filter((e=>e.key!==l.key))}return l})():(()=>{const e={...d,order:-1===n?d.order:r(d.order)};return B.value=[e],e})())})(t)},Q=async()=>{if(!j.value||void 0===p.provider||S.value)return;S.value=!0;const e=p.provider({currentPage:F.value,filter:p.filter,sortBy:B.value,perPage:R.value});try{const t=e instanceof Promise?await e:e;if(void 0===t)return;E.value=t}finally{S.value=!1}},X=async(e,t,l)=>{if(t===l)return;const o=e=>{var t;return!0===(null==(t=p.noProvider)?void 0:t.includes(e))},a=("currentPage"===e||"perPage"===e)&&(o("paging")||!0===p.noProviderPaging),r="filter"===e&&(o("filtering")||!0===p.noProviderFiltering),n=("sortBy"===e||"sortDesc"===e)&&(o("sorting")||!0===p.noProviderSorting);a||r||n||(!0===j.value&&await Q(),"currentPage"!==e&&"perPage"!==e&&m("filtered",[...W.value]))};e.watch((()=>p.filter),((e,t)=>{X("filter",e,t),e===t||j.value||e||m("filtered",[...W.value])})),e.watch(F,((e,t)=>{X("currentPage",e,t)})),e.watch(R,((e,t)=>{X("perPage",e,t)})),e.watch(B,((e,t)=>{X("sortBy",e,t)}),{deep:!0}),e.watch((()=>p.provider),(e=>{void 0!==e?Q():E.value=[]})),e.onMounted(Q);const Z={clearSelected:()=>{p.selectable&&V.clear()},selectAllRows:()=>{p.selectable&&"single"!==p.selectMode&&(_.value=new Set([...W.value]))},selectRow:e=>{if(!p.selectable)return;const t=W.value[e];t&&!V.has(t)&&("single"===p.selectMode?V.set([t]):V.add(t))},unselectRow:e=>{if(!p.selectable)return;const t=W.value[e];t&&V.has(t)&&V.delete(t)},isRowSelected:e=>{if(!p.selectable)return!1;const t=W.value[e];return V.has(t)}},ee=e.computed((()=>({...t.pick(p,[...C,...h]),tableAttrs:{ariaBusy:S.value},items:J.value,fields:z.value,tableClass:O.value,tbodyTrClass:H,fieldColumnClass:K,id:T.value})));return u({...Z,items:W,refresh:Q}),(t,l)=>(e.openBlock(),e.createBlock($,e.mergeProps(ee.value,{onHeadClicked:G,onRowClicked:U,onRowDblclicked:l[0]||(l[0]=(e,t,l)=>{m("row-dblclicked",e,t,l)}),onRowContextmenu:l[1]||(l[1]=(e,t,l)=>{m("row-contextmenu",e,t,l)}),onRowHovered:l[2]||(l[2]=(e,t,l)=>{m("row-hovered",e,t,l)}),onRowUnhovered:l[3]||(l[3]=(e,t,l)=>{m("row-unhovered",e,t,l)}),onRowMiddleClicked:l[4]||(l[4]=(e,t,l)=>{m("row-middle-clicked",e,t,l)})}),e.createSlots({"custom-body":e.withCtx((l=>[S.value&&y["table-busy"]?(e.openBlock(),e.createBlock(g,{key:0,class:e.normalizeClass(["b-table-busy-slot",L.value])},{default:e.withCtx((()=>[e.createVNode(v,{colspan:l.fields.length},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"table-busy")])),_:2},1032,["colspan"])])),_:2},1032,["class"])):!0===e.unref(p).showEmpty&&0===W.value.length?(e.openBlock(),e.createBlock(g,{key:1,class:"b-table-empty-row"},{default:e.withCtx((()=>[e.createVNode(v,{colspan:z.value.length},{default:e.withCtx((()=>[e.createElementVNode("div",N,[e.createElementVNode("div",A,[D.value?e.renderSlot(t.$slots,"empty-filtered",e.normalizeProps(e.mergeProps({key:0},Y.value)),(()=>[e.createTextVNode(e.toDisplayString(e.unref(p).emptyFilteredText),1)])):e.renderSlot(t.$slots,"empty",e.normalizeProps(e.mergeProps({key:1},Y.value)),(()=>[e.createTextVNode(e.toDisplayString(e.unref(p).emptyText),1)]))])])])),_:3},8,["colspan"])])),_:3})):e.createCommentVNode("",!0)])),_:2},[y["thead-top"]?{name:"thead-top",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"thead-top",e.mergeProps(l,{clearSelected:Z.clearSelected,selectAllRows:Z.selectAllRows,fields:z.value}))])),key:"0"}:void 0,y["thead-sub"]?{name:"thead-sub",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"thead-sub",e.mergeProps(l,{fields:z.value}))])),key:"1"}:void 0,y["top-row"]?{name:"top-row",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"top-row",e.mergeProps(l,{fields:z.value}))])),key:"2"}:void 0,y["row-details"]?{name:"row-details",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"row-details",e.mergeProps(l,{fields:z.value,selectRow:(e=l.index)=>Z.selectRow(e),unselectRow:(e=l.index)=>Z.unselectRow(e),rowSelected:Z.isRowSelected(l.index)}))])),key:"3"}:void 0,y["bottom-row"]?{name:"bottom-row",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"bottom-row",e.mergeProps(l,{fields:z.value}))])),key:"4"}:void 0,y["custom-foot"]?{name:"custom-foot",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"custom-foot",e.mergeProps(l,{fields:z.value}))])),key:"5"}:void 0,y["table-caption"]?{name:"table-caption",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"table-caption")])),key:"6"}:void 0,e.renderList(b.value,(l=>({name:l,fn:e.withCtx((o=>[e.renderSlot(t.$slots,l,e.mergeProps(o,{selectRow:(e=o.index)=>Z.selectRow(e),unselectRow:(e=o.index)=>Z.unselectRow(e),rowSelected:Z.isRowSelected(o.index)}))]))}))),e.renderList(k.value,(l=>({name:l,fn:e.withCtx((o=>[e.renderSlot(t.$slots,l,e.mergeProps(o,{selectAllRows:Z.selectAllRows,clearSelected:Z.clearSelected}))]))}))),e.renderList(z.value,(o=>({name:`head(${String(o.key)})`,fn:e.withCtx((a=>{var r,n,s,d;return[e.renderSlot(t.$slots,y[`head(${String(o.key)})`]?`head(${String(o.key)})`:"head()",e.mergeProps(a,{selectAllRows:Z.selectAllRows,clearSelected:Z.clearSelected}),(()=>[e.createTextVNode(e.toDisplayString(e.unref(w)(o)),1)])),M.value&&a.field.sortable&&!1===e.unref(p).noSortableIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},["asc"===(null==(n=null==(r=B.value)?void 0:r.find((e=>e.key===a.field.key)))?void 0:n.order)?e.renderSlot(t.$slots,y[`sortAsc(${String(a.field.key)})`]?`sortAsc(${String(a.field.key)})`:"sortAsc()",e.normalizeProps(e.mergeProps({key:0},a)),(()=>[l[5]||(l[5]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-arrow-up-short",viewBox:"0 0 16 16","aria-hidden":""},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z"})],-1))])):"desc"===(null==(d=null==(s=B.value)?void 0:s.find((e=>e.key===a.field.key)))?void 0:d.order)?e.renderSlot(t.$slots,y[`sortDesc(${String(a.field.key)})`]?`sortDesc(${String(a.field.key)})`:"sortDesc()",e.normalizeProps(e.mergeProps({key:1},a)),(()=>[l[6]||(l[6]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-arrow-down-short",viewBox:"0 0 16 16","aria-hidden":""},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a.5.5 0 0 1 .5.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L7.5 10.293V4.5A.5.5 0 0 1 8 4z"})],-1))])):e.renderSlot(t.$slots,y[`sortDefault(${String(a.field.key)})`]?`sortDefault(${String(a.field.key)})`:"sortDefault()",e.normalizeProps(e.mergeProps({key:2},a)),(()=>[(e.openBlock(),e.createElementBlock("svg",P,l[7]||(l[7]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z"},null,-1)])))]))],64)):e.createCommentVNode("",!0)]}))})))]),1040))}});exports._sfc_main=E,exports._sfc_main$1=$,exports._sfc_main$2=u,exports._sfc_main$3=v,exports._sfc_main$4=p,exports._sfc_main$5=b,exports._sfc_main$6=k,exports._sfc_main$7=g;
2
+ //# sourceMappingURL=BTable.vue_vue_type_script_setup_true_lang-BO8_v2Zs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BTable.vue_vue_type_script_setup_true_lang-BO8_v2Zs.js","sources":["../src/utils/formatItem.ts","../src/types/TableTypes.ts","../src/components/BTable/BTbody.vue","../src/components/BTable/BTd.vue","../src/components/BTable/BTfoot.vue","../src/components/BTable/BTh.vue","../src/components/BTable/BThead.vue","../src/components/BTable/BTr.vue","../src/utils/tableUtils.ts","../src/utils/filterEvent.ts","../src/components/BTable/BTableLite.vue","../src/components/BTable/BTable.vue"],"sourcesContent":["import type {TableFieldFormatter} from '../types/TableTypes'\nimport {get} from './object'\n\nexport const formatItem = <T>(\n item: T,\n // Weakly type fieldKey because it can be a nested string, such as 'foo.bar.baz'\n fieldKey: string,\n formatter?: TableFieldFormatter<T>\n) => {\n const val = get(item, fieldKey)\n return formatter && typeof formatter === 'function' ? formatter(val, fieldKey, item) : val\n}\n","import type {StyleValue} from 'vue'\nimport type {ColorVariant} from './ColorTypes'\nimport type {MaybePromise} from './MaybePromise'\nimport type {LiteralUnion} from './LiteralUnion'\nimport type {AttrsValue, ClassValue} from './AnyValuedAttributes'\n\nexport type TableRowEvent<T> = [item: T, index: number, event: MouseEvent]\n\nexport type TableItem<T = Record<string, unknown>> = T & {\n _rowVariant?: ColorVariant | null\n _cellVariants?: Partial<Record<keyof T, ColorVariant>>\n _showDetails?: boolean\n}\n\nexport const isTableItem = (value: unknown): value is TableItem =>\n typeof value === 'object' && value !== null\n\n// undefined means no sorting\nexport type BTableSortByOrder = 'desc' | 'asc' | undefined\n\nexport type BTableSortBy = {\n order: BTableSortByOrder\n key: string\n comparer?: (a: string, b: string) => number\n}\n\nexport type BTableProviderContext = {\n sortBy: BTableSortBy[] | undefined\n filter: string | undefined\n currentPage: number\n perPage: number\n}\n\nexport type BTableProvider<T> = (\n context: Readonly<BTableProviderContext>\n) => MaybePromise<T[] | undefined>\n\nexport type TableFieldFormatter<T> = (value: unknown, key: string, item: T) => string\n\nexport type TableRowType = 'row' | 'row-details' | 'row-top' | 'row-bottom' | 'table-busy'\nexport type TableRowThead = 'top' | 'bottom'\n\nexport type TableStrictClassValue = string | unknown[] | Record<string, boolean>\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type TableField<T = any> = {\n key: LiteralUnion<keyof T>\n label?: string\n headerTitle?: string\n headerAbbr?: string\n class?: ClassValue\n formatter?: TableFieldFormatter<T>\n sortable?: boolean\n sortKey?: string\n sortDirection?: string\n sortByFormatted?: boolean | TableFieldFormatter<T>\n filterByFormatted?: boolean | TableFieldFormatter<T>\n tdClass?:\n | TableStrictClassValue\n | ((value: unknown, key: string, item: T) => TableStrictClassValue)\n thClass?: ClassValue\n thStyle?: StyleValue\n variant?: ColorVariant | null\n tdAttr?: AttrsValue | ((value: unknown, key: string, item: T) => AttrsValue)\n thAttr?:\n | AttrsValue\n | ((value: unknown, key: string, item: T | null, type: TableRowThead) => AttrsValue)\n isRowHeader?: boolean\n stickyColumn?: boolean\n}\n\nexport type TableFieldRaw<T = unknown> = T extends object\n ? LiteralUnion<keyof T> | TableField<T>\n : string | TableField\n\nexport const isTableField = <T>(value: unknown): value is TableField<T> =>\n typeof value === 'object' && value !== null && 'key' in value\n\nexport const isTableFieldRaw = <T>(value: unknown): value is TableFieldRaw<T> =>\n typeof value === 'string' || isTableField(value)\n\nexport type NoProviderTypes = 'paging' | 'sorting' | 'filtering'\n","<template>\n <tbody :class=\"computedClasses\">\n <slot />\n </tbody>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTbodyProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTbodyProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BTbody')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`thead-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <td\n :scope=\"scope\"\n :class=\"computedClasses\"\n :colspan=\"props.colspan\"\n :rowspan=\"props.rowspan\"\n :data-label=\"props.stackedHeading\"\n >\n <div v-if=\"props.stackedHeading\">\n <slot />\n </div>\n <slot v-else />\n </td>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTdProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTdProps>(), {\n colspan: undefined,\n rowspan: undefined,\n stackedHeading: undefined,\n stickyColumn: false,\n variant: null,\n})\nconst props = useDefaults(_props, 'BTd')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n 'b-table-sticky-column': props.stickyColumn,\n 'table-b-table-default': props.stickyColumn && props.variant === null,\n}))\n\nconst scope = computed(() => (props.colspan ? 'colspan' : props.rowspan ? 'rowspan' : 'col'))\n</script>\n","<template>\n <tfoot :class=\"computedClasses\">\n <slot />\n </tfoot>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTfootProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTfootProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BTfoot')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <th\n :scope=\"scope\"\n :class=\"computedClasses\"\n :colspan=\"props.colspan\"\n :rowspan=\"props.rowspan\"\n :data-label=\"props.stackedHeading\"\n >\n <div v-if=\"props.stackedHeading !== undefined\">\n <slot />\n </div>\n <slot v-else />\n </th>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BThProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BThProps>(), {\n colspan: undefined,\n rowspan: undefined,\n stackedHeading: undefined,\n stickyColumn: false,\n variant: null,\n})\nconst props = useDefaults(_props, 'BTh')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n 'b-table-sticky-column': props.stickyColumn,\n 'table-b-table-default': props.stickyColumn && props.variant === null,\n}))\n\nconst scope = computed(() => (props.colspan ? 'colspan' : props.rowspan ? 'rowspan' : 'col'))\n</script>\n","<template>\n <thead :class=\"computedClasses\">\n <slot />\n </thead>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTheadProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTheadProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BThead')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <tr :class=\"computedClasses\">\n <slot />\n </tr>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTrProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTrProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BTr')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","import {titleCase} from './stringUtils'\nimport type {TableFieldRaw} from '../types/TableTypes'\nimport type {BTableLiteProps, BTableSimpleProps} from '../types'\n\nexport const getTableFieldHeadLabel = (field: Readonly<TableFieldRaw<unknown>>) =>\n typeof field === 'string'\n ? titleCase(field)\n : field.label !== undefined\n ? field.label\n : typeof field.key === 'string'\n ? titleCase(field.key)\n : field.key\n\nexport const btableSimpleProps = Object.freeze(\n Object.keys({\n bordered: 0,\n borderless: 0,\n borderVariant: 0,\n captionTop: 0,\n dark: 0,\n fixed: 0,\n hover: 0,\n id: 0,\n noBorderCollapse: 0,\n outlined: 0,\n responsive: 0,\n small: 0,\n stacked: 0,\n stickyHeader: 0,\n striped: 0,\n stripedColumns: 0,\n variant: 0,\n tableAttrs: 0,\n tableClass: 0,\n } satisfies Record<keyof BTableSimpleProps, 0>)\n) as readonly (keyof BTableSimpleProps)[]\n\nexport const btableLiteProps = Object.freeze(\n Object.keys({\n align: 0,\n caption: 0,\n detailsTdClass: 0,\n fieldColumnClass: 0,\n fields: 0,\n footClone: 0,\n footRowVariant: 0,\n footVariant: 0,\n headRowVariant: 0,\n headVariant: 0,\n items: 0,\n labelStacked: 0,\n modelValue: 0,\n primaryKey: 0,\n tbodyClass: 0,\n tbodyTrAttrs: 0,\n tbodyTrClass: 0,\n tfootClass: 0,\n tfootTrClass: 0,\n theadClass: 0,\n theadTrClass: 0,\n } satisfies Record<keyof Omit<BTableLiteProps<unknown>, keyof BTableSimpleProps>, 0>)\n) as readonly (keyof Omit<BTableLiteProps<unknown>, keyof BTableSimpleProps>)[]\n","const TABLE_TAG_NAMES = ['TD', 'TH', 'TR']\n\n// Filter CSS selector for click/dblclick/etc. events\n// If any of these selectors match the clicked element, we ignore the event\nconst eventFilter = [\n 'a',\n 'a *', // Include content inside links\n 'button',\n 'button *', // Include content inside buttons\n 'input:not(.disabled):not([disabled])',\n 'select:not(.disabled):not([disabled])',\n 'textarea:not(.disabled):not([disabled])',\n '[role=\"link\"]',\n '[role=\"link\"] *',\n '[role=\"button\"]',\n '[role=\"button\"] *',\n '[tabindex]:not(.disabled):not([disabled])',\n].join(',')\n\n// Returns `true` if we should ignore the click/double-click/keypress event\n// Avoids having the user need to use `@click.stop` on the form control\nexport const filterEvent = (event: Readonly<Event>) => {\n // Exit early when we don't have a target element\n if (!event || !event.target) {\n return false\n }\n const el = event.target as HTMLElement\n // Exit early when element is disabled or a table element\n if (('disabled' in el && el.disabled) || TABLE_TAG_NAMES.indexOf(el.tagName) !== -1) {\n return false\n }\n // Ignore the click when it was inside a dropdown menu\n if (el.closest('.dropdown-menu')) return true\n\n const label = el.tagName === 'LABEL' ? el : el.closest('label')\n // If the label's form control is not disabled then we don't propagate event\n // Modern browsers have `label.control` that references the associated input, but IE 11\n // does not have this property on the label element, so we resort to DOM lookups\n if (label) {\n const labelFor = label.getAttribute('for')\n const input = labelFor\n ? document.getElementById(labelFor)\n : label.querySelector('input, select, textarea')\n if (input && !(input as HTMLInputElement).disabled) {\n return true\n }\n }\n // Otherwise check if the event target matches one of the selectors in the\n // event filter (i.e. anchors, non disabled inputs, etc.)\n // Return `true` if we should ignore the event\n return el.matches(eventFilter)\n}\n","<template>\n <BTableSimple v-bind=\"computedSimpleProps\">\n <BThead v-show=\"showComputedHeaders\" :variant=\"props.headVariant\" :class=\"props.theadClass\">\n <slot name=\"thead-top\" :columns=\"computedFieldsTotal\" :fields=\"computedFields\" />\n <BTr :variant=\"props.headRowVariant\" :class=\"props.theadTrClass\">\n <BTh\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n scope=\"col\"\n :class=\"getFieldColumnClasses(field)\"\n :title=\"field.headerTitle\"\n :variant=\"field.variant\"\n :abbr=\"field.headerAbbr\"\n :style=\"field.thStyle\"\n v-bind=\"callThAttr(null, field, 'top')\"\n @click=\"headerClicked(field, $event)\"\n >\n <!-- eslint-disable prettier/prettier -->\n <slot\n :name=\"\n slots[`head(${String(field.key)})`]\n ? (`head(${String(field.key)})` as 'head()')\n : 'head()'\n \"\n :label=\"field.label\"\n :column=\"field.key as LiteralUnion<keyof Items>\"\n :field\n :is-foot=\"false\"\n >\n <!-- eslint-enable prettier/prettier -->\n {{ getTableFieldHeadLabel(field) }}\n </slot>\n </BTh>\n </BTr>\n <BTr v-if=\"slots['thead-sub']\">\n <BTd\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n scope=\"col\"\n :variant=\"field.variant\"\n :class=\"[field.class, field.thClass]\"\n >\n <slot name=\"thead-sub\" :items=\"props.items\" :fields=\"computedFields\" :field>\n {{ field.label }}\n </slot>\n </BTd>\n </BTr>\n </BThead>\n <BTbody :class=\"props.tbodyClass\">\n <slot\n name=\"custom-body\"\n :fields=\"computedFields\"\n :items=\"props.items\"\n :columns=\"computedFieldsTotal\"\n >\n <BTr\n v-if=\"!props.stacked && slots['top-row']\"\n :class=\"getRowClasses(null, 'row-top')\"\n v-bind=\"callTbodyTrAttrs(null, 'row-top')\"\n >\n <slot name=\"top-row\" :columns=\"computedFieldsTotal\" :fields=\"computedFields\" />\n </BTr>\n\n <template\n v-for=\"(item, itemIndex) in props.items\"\n :key=\"\n props.primaryKey && get(item, props.primaryKey)\n ? get(item, props.primaryKey)\n : itemIndex\n \"\n >\n <BTr\n :id=\"\n props.primaryKey && get(item, props.primaryKey)\n ? generateTableRowId(get(item, props.primaryKey))\n : undefined\n \"\n :class=\"getRowClasses(item, 'row')\"\n :variant=\"isTableItem(item) ? item._rowVariant : undefined\"\n v-bind=\"callTbodyTrAttrs(item, 'row')\"\n @click=\"!filterEvent($event) && emit('row-clicked', item, itemIndex, $event)\"\n @dblclick=\"!filterEvent($event) && emit('row-dblclicked', item, itemIndex, $event)\"\n @contextmenu=\"!filterEvent($event) && emit('row-contextmenu', item, itemIndex, $event)\"\n @mouseenter=\"!filterEvent($event) && emit('row-hovered', item, itemIndex, $event)\"\n @mouseleave=\"!filterEvent($event) && emit('row-unhovered', item, itemIndex, $event)\"\n @mousedown=\"handleMiddleClick(item, itemIndex, $event)\"\n >\n <BTd\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n :variant=\"\n (isTableItem(item) ? item._cellVariants?.[field.key as string] : false)\n ? null\n : field.variant\n \"\n :class=\"getFieldRowClasses(field, item)\"\n v-bind=\"itemAttributes(item, String(field.key), field.tdAttr)\"\n >\n <label v-if=\"props.stacked && props.labelStacked\" class=\"b-table-stacked-label\">\n {{ getTableFieldHeadLabel(field) }}\n </label>\n <slot\n :name=\"\n slots[`cell(${String(field.key)})`]\n ? (`cell(${String(field.key)})` as 'cell()')\n : 'cell()'\n \"\n :value=\"formatItem(item, String(field.key), field.formatter)\"\n :unformatted=\"get(item, String(field.key))\"\n :index=\"itemIndex\"\n :item=\"item\"\n :field=\"field\"\n :items=\"items\"\n :toggle-details=\"() => toggleRowDetails(item)\"\n :details-showing=\"isTableItem(item) ? (detailsMap.get(item) ?? false) : false\"\n >\n <template v-if=\"!slots[`cell(${String(field.key)})`] && !slots['cell()']\">\n {{ formatItem(item, String(field.key), field.formatter) }}\n </template>\n </slot>\n </BTd>\n </BTr>\n\n <template\n v-if=\"isTableItem(item) && detailsMap.get(item) === true && slots['row-details']\"\n >\n <BTr aria-hidden=\"true\" role=\"presentation\" class=\"d-none\" />\n <BTr\n :class=\"getRowClasses(item, 'row-details')\"\n :variant=\"item._rowVariant\"\n v-bind=\"callTbodyTrAttrs(item, 'row-details')\"\n >\n <BTd :colspan=\"computedFieldsTotal\" :class=\"detailsTdClass\">\n <slot\n name=\"row-details\"\n :item=\"item\"\n :toggle-details=\"() => toggleRowDetails(item)\"\n :fields=\"computedFields\"\n :index=\"itemIndex\"\n />\n </BTd>\n </BTr>\n </template>\n </template>\n <!-- This class is for specific targetting of this slot element -->\n <BTr\n v-if=\"!props.stacked && slots['bottom-row']\"\n class=\"bottom-row\"\n :class=\"getRowClasses(null, 'row-bottom')\"\n v-bind=\"callTbodyTrAttrs(null, 'row-bottom')\"\n >\n <slot name=\"bottom-row\" :columns=\"computedFieldsTotal\" :fields=\"computedFields\" />\n </BTr>\n </slot>\n </BTbody>\n <BTfoot v-if=\"props.footClone\" v-bind=\"footerProps\">\n <BTr :variant=\"props.footRowVariant\" :class=\"props.tfootTrClass\">\n <BTh\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n scope=\"col\"\n :class=\"getFieldColumnClasses(field)\"\n :title=\"field.headerTitle\"\n :abbr=\"field.headerAbbr\"\n :style=\"field.thStyle\"\n :variant=\"field.variant\"\n v-bind=\"callThAttr(null, field, 'bottom')\"\n @click=\"headerClicked(field, $event, true)\"\n >\n <div class=\"d-inline-flex flex-nowrap align-items-center gap-1\">\n <div>\n <!-- eslint-disable prettier/prettier -->\n <slot\n :name=\"\n slots[`foot(${String(field.key)})`]\n ? (`foot(${String(field.key)})` as 'foot()')\n : 'foot()'\n \"\n :label=\"field.label\"\n :column=\"field.key as LiteralUnion<keyof Items>\"\n :field=\"field\"\n :is-foot=\"true\"\n >\n <!-- eslint-enable prettier/prettier -->\n {{ getTableFieldHeadLabel(field) }}\n </slot>\n </div>\n </div>\n </BTh>\n </BTr>\n </BTfoot>\n <BTfoot v-else-if=\"slots['custom-foot']\" v-bind=\"footerProps\">\n <slot\n name=\"custom-foot\"\n :fields=\"computedFields\"\n :items=\"props.items\"\n :columns=\"computedFieldsTotal\"\n />\n </BTfoot>\n <caption v-if=\"slots['table-caption'] || props.caption\">\n <slot name=\"table-caption\">\n {{ props.caption }}\n </slot>\n </caption>\n </BTableSimple>\n</template>\n\n<script setup lang=\"ts\" generic=\"Items\">\nimport {computed, ref, watch} from 'vue'\nimport type {BTableLiteProps} from '../../types/ComponentProps'\nimport {\n isTableField,\n isTableItem,\n type TableField,\n type TableItem,\n type TableRowEvent,\n type TableRowThead,\n type TableRowType,\n} from '../../types/TableTypes'\nimport BTableSimple from './BTableSimple.vue'\nimport BTbody from './BTbody.vue'\nimport BTd from './BTd.vue'\nimport BTfoot from './BTfoot.vue'\nimport BTh from './BTh.vue'\nimport BThead from './BThead.vue'\nimport BTr from './BTr.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {get, pick} from '../../utils/object'\nimport {btableSimpleProps, getTableFieldHeadLabel} from '../../utils/tableUtils'\nimport {formatItem} from '../../utils/formatItem'\nimport {filterEvent} from '../../utils/filterEvent'\nimport {startCase} from '../../utils/stringUtils'\nimport type {LiteralUnion} from '../../types/LiteralUnion'\nimport {useId} from '../../composables/useId'\n\nconst _props = withDefaults(defineProps<BTableLiteProps<Items>>(), {\n caption: undefined,\n align: undefined,\n fields: () => [],\n footClone: false,\n items: () => [],\n labelStacked: false,\n fieldColumnClass: undefined,\n tbodyTrClass: undefined,\n detailsTdClass: undefined,\n headVariant: undefined,\n headRowVariant: undefined,\n footRowVariant: undefined,\n footVariant: undefined,\n modelValue: undefined,\n primaryKey: undefined,\n tbodyClass: undefined,\n tbodyTrAttrs: undefined,\n tfootClass: undefined,\n tfootTrClass: undefined,\n theadClass: undefined,\n theadTrClass: undefined,\n // BTableSimpleProps props\n borderVariant: undefined,\n tableClass: undefined,\n variant: undefined,\n bordered: undefined,\n borderless: undefined,\n captionTop: undefined,\n dark: undefined,\n hover: undefined,\n id: undefined,\n noBorderCollapse: undefined,\n outlined: undefined,\n fixed: undefined,\n responsive: undefined,\n stacked: undefined,\n striped: undefined,\n stripedColumns: undefined,\n small: undefined,\n stickyHeader: undefined,\n // End BTableSimpleProps props\n})\nconst props = useDefaults(_props, 'BTableLite')\n\nconst emit = defineEmits<{\n 'head-clicked': [\n key: string,\n field: (typeof computedFields.value)[0],\n event: MouseEvent,\n isFooter: boolean,\n ]\n 'row-clicked': TableRowEvent<Items>\n 'row-dblclicked': TableRowEvent<Items>\n 'row-contextmenu': TableRowEvent<Items>\n 'row-hovered': TableRowEvent<Items>\n 'row-unhovered': TableRowEvent<Items>\n 'row-middle-clicked': TableRowEvent<Items>\n}>()\n\nconst slots = defineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'thead-top'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `head(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: false\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'thead-sub'?: (\n props: {\n items: readonly Items[]\n fields: typeof computedFields.value\n field: (typeof computedFields.value)[0]\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) => any\n 'custom-body'?: (props: {\n fields: typeof computedFields.value\n items: readonly Items[]\n columns: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'top-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `cell(${string})`]: (props: {\n value: unknown\n unformatted: unknown\n index: number\n item: Items\n field: (typeof computedFields.value)[0]\n items: readonly Items[]\n toggleDetails: () => void\n detailsShowing: boolean\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'row-details'?: (props: {\n item: Items\n toggleDetails: () => void\n fields: typeof computedFields.value\n index: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'bottom-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `foot(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: true\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'custom-foot'?: (props: {\n fields: typeof computedFields.value\n items: readonly Items[]\n columns: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'table-caption'?: (props: Record<string, never>) => any\n}>()\n\nconst computedId = useId(() => props.id)\n\nconst generateDetailsItem = (item: TableItem): [object, boolean | undefined] => [\n item,\n item._showDetails,\n]\nconst detailsMap = ref(new WeakMap<object, boolean | undefined>())\nwatch(\n () => props.items,\n (items) => {\n items.forEach((item) => {\n if (!isTableItem(item)) return\n detailsMap.value.set(...generateDetailsItem(item))\n })\n },\n {deep: true, immediate: true}\n)\n\nconst computedTableClasses = computed(() => [\n props.tableClass,\n {\n [`align-${props.align}`]: props.align !== undefined,\n },\n])\n\nconst computedFields = computed<(TableField<Items> & {_noHeader?: true})[]>(() => {\n if (!props.fields.length && props.items.length) {\n const [firstItem] = props.items\n if (isTableItem(firstItem) || Array.isArray(firstItem)) {\n return Object.keys(firstItem).map((k) => {\n const label = startCase(k)\n return {\n key: k,\n label,\n tdAttr: props.stacked === true ? {'data-label': label} : undefined,\n }\n })\n }\n // The items are primitives, so we just return a single empty field\n // No header will be shown, as we don't know what to show\n return [{key: '', _noHeader: true}]\n }\n\n return props.fields.map((f) => {\n if (isTableField(f)) {\n return {\n ...(f as TableField<Items>),\n tdAttr:\n props.stacked === true\n ? {'data-label': startCase(f.key as string), ...f.tdAttr}\n : f.tdAttr,\n }\n }\n const label = startCase(f as string)\n return {\n key: f as string,\n label,\n tdAttr: props.stacked === true ? {'data-label': label} : undefined,\n }\n })\n})\nconst computedFieldsTotal = computed(() => computedFields.value.length)\nconst showComputedHeaders = computed(() => {\n // We only hide the header if all fields have _noHeader set to true. Which would be our doing\n // This usually happens under a circumstance of displaying an array of primitives\n // Under any other circumstance, I'm not sure how this would apply\n if (computedFieldsTotal.value > 0 && computedFields.value.every((el) => el._noHeader === true))\n return false\n return true\n})\n\nconst footerProps = computed(() => ({\n variant: props.footVariant,\n class: props.tfootClass,\n}))\n\nconst itemAttributes = (item: Items, fieldKey: string, attr?: unknown) => {\n const val = get(item, fieldKey)\n return attr && typeof attr === 'function' ? attr(val, fieldKey, item) : attr\n}\n\nconst callThAttr = (item: Items | null, field: TableField<Items>, type: TableRowThead) => {\n const fieldKey = String(field.key)\n const val = get(item, fieldKey)\n return field.thAttr && typeof field.thAttr === 'function'\n ? field.thAttr(val, fieldKey, item, type)\n : field.thAttr\n}\n\nconst headerClicked = (field: TableField<Items>, event: Readonly<MouseEvent>, isFooter = false) => {\n emit('head-clicked', field.key as string, field, event, isFooter)\n}\n\nconst toggleRowDetails = (tr: Items) => {\n if (isTableItem(tr)) {\n const prevValue = detailsMap.value.get(tr)\n detailsMap.value.set(tr, !prevValue)\n tr._showDetails = !prevValue\n }\n}\n\nconst getFieldColumnClasses = (field: TableField) => [\n field.class,\n field.thClass,\n {\n 'b-table-sticky-column': field.stickyColumn,\n },\n props.fieldColumnClass\n ? typeof props.fieldColumnClass === 'function'\n ? props.fieldColumnClass(field)\n : props.fieldColumnClass\n : null,\n]\n\nconst getFieldRowClasses = (field: Readonly<TableField>, tr: Items) => {\n const val = get(tr, String(field.key))\n return [\n field.class,\n typeof field.tdClass === 'function' ? field.tdClass(val, String(field.key), tr) : field.tdClass,\n (isTableItem(tr) ? tr._cellVariants?.[field.key as string] : false)\n ? `table-${(tr as TableItem)._cellVariants?.[field.key as string]}`\n : null,\n {\n 'b-table-sticky-column': field.stickyColumn,\n },\n ]\n}\n\nconst handleMiddleClick = (item: Items, itemIndex: number, event: MouseEvent) => {\n if (event.button === 1 && !filterEvent(event)) {\n emit('row-middle-clicked', item, itemIndex, event)\n }\n}\nconst callTbodyTrAttrs = (item: Items | null, type: TableRowType) =>\n props.tbodyTrAttrs\n ? typeof props.tbodyTrAttrs === 'function'\n ? props.tbodyTrAttrs(item, type)\n : props.tbodyTrAttrs\n : null\n\nconst getRowClasses = (item: Items | null, type: TableRowType) =>\n props.tbodyTrClass\n ? typeof props.tbodyTrClass === 'function'\n ? props.tbodyTrClass(item, type)\n : props.tbodyTrClass\n : null\n\nconst generateTableRowId = (primaryKeyValue: string) =>\n `${computedId.value}__row_${primaryKeyValue}`\n\nconst computedSimpleProps = computed(() => ({\n ...pick(props, btableSimpleProps),\n tableClass: computedTableClasses.value,\n id: computedId.value,\n}))\n</script>\n","<template>\n <!-- eslint-disable prettier/prettier -->\n <BTableLite\n v-bind=\"computedLiteProps\"\n @head-clicked=\"onFieldHeadClick\"\n @row-clicked=\"onRowClick\"\n @row-dblclicked=\"\n (row, index, e) => {\n emit('row-dblclicked', row, index, e)\n }\n \"\n @row-contextmenu=\"\n (row, index, e) => {\n emit('row-contextmenu', row, index, e)\n }\n \"\n @row-hovered=\"\n (row, index, e) => {\n emit('row-hovered', row, index, e)\n }\n \"\n @row-unhovered=\"\n (row, index, e) => {\n emit('row-unhovered', row, index, e)\n }\n \"\n @row-middle-clicked=\"\n (row, index, e) => {\n emit('row-middle-clicked', row, index, e)\n }\n \"\n >\n <!-- eslint-enable prettier/prettier -->\n <template v-if=\"slots['thead-top']\" #thead-top=\"scope\">\n <slot\n name=\"thead-top\"\n v-bind=\"scope\"\n :clear-selected=\"exposedSelectableUtilities.clearSelected\"\n :select-all-rows=\"exposedSelectableUtilities.selectAllRows\"\n :fields=\"computedFields\"\n />\n </template>\n <template v-if=\"slots['thead-sub']\" #thead-sub=\"scope\">\n <slot name=\"thead-sub\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['top-row']\" #top-row=\"scope\">\n <slot name=\"top-row\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['row-details']\" #row-details=\"scope\">\n <slot\n name=\"row-details\"\n v-bind=\"scope\"\n :fields=\"computedFields\"\n :select-row=\"(index = scope.index) => exposedSelectableUtilities.selectRow(index)\"\n :unselect-row=\"(index = scope.index) => exposedSelectableUtilities.unselectRow(index)\"\n :row-selected=\"exposedSelectableUtilities.isRowSelected(scope.index)\"\n />\n </template>\n <template v-if=\"slots['bottom-row']\" #bottom-row=\"scope\">\n <slot name=\"bottom-row\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['custom-foot']\" #custom-foot=\"scope\">\n <slot name=\"custom-foot\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['table-caption']\" #table-caption>\n <slot name=\"table-caption\" />\n </template>\n <template v-for=\"name in dynamicCellSlots\" #[name]=\"scope\">\n <slot\n :name\n v-bind=\"scope\"\n :select-row=\"(index = scope.index) => exposedSelectableUtilities.selectRow(index)\"\n :unselect-row=\"(index = scope.index) => exposedSelectableUtilities.unselectRow(index)\"\n :row-selected=\"exposedSelectableUtilities.isRowSelected(scope.index)\"\n />\n </template>\n <template v-for=\"name in dynamicFootSlots\" #[name]=\"scope\">\n <slot\n :name\n v-bind=\"scope\"\n :select-all-rows=\"exposedSelectableUtilities.selectAllRows\"\n :clear-selected=\"exposedSelectableUtilities.clearSelected\"\n />\n </template>\n\n <template\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n #[`head(${String(field.key)})`]=\"scope\"\n >\n <slot\n :name=\"\n slots[`head(${String(field.key)})`]\n ? (`head(${String(field.key)})` as 'head()')\n : 'head()'\n \"\n v-bind=\"scope\"\n :select-all-rows=\"exposedSelectableUtilities.selectAllRows\"\n :clear-selected=\"exposedSelectableUtilities.clearSelected\"\n >\n {{ getTableFieldHeadLabel(field) }}\n </slot>\n <template v-if=\"isSortable && !!scope.field.sortable && props.noSortableIcon === false\">\n <slot\n v-if=\"sortByModel?.find((el) => el.key === scope.field.key)?.order === 'asc'\"\n v-bind=\"scope\"\n :name=\"\n slots[`sortAsc(${String(scope.field.key)})`]\n ? (`sortAsc(${String(scope.field.key)})` as 'sortAsc()')\n : 'sortAsc()'\n \"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-up-short\"\n viewBox=\"0 0 16 16\"\n aria-hidden\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z\"\n />\n </svg>\n </slot>\n <slot\n v-else-if=\"sortByModel?.find((el) => el.key === scope.field.key)?.order === 'desc'\"\n v-bind=\"scope\"\n :name=\"\n slots[`sortDesc(${String(scope.field.key)})`]\n ? (`sortDesc(${String(scope.field.key)})` as 'sortDesc()')\n : 'sortDesc()'\n \"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-down-short\"\n viewBox=\"0 0 16 16\"\n aria-hidden\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 4a.5.5 0 0 1 .5.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L7.5 10.293V4.5A.5.5 0 0 1 8 4z\"\n />\n </svg>\n </slot>\n <slot\n v-else\n v-bind=\"scope\"\n :name=\"\n slots[`sortDefault(${String(scope.field.key)})`]\n ? (`sortDefault(${String(scope.field.key)})` as 'sortDefault()')\n : 'sortDefault()'\n \"\n >\n <svg\n :style=\"{opacity: 0.4}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-up-short\"\n viewBox=\"0 0 16 16\"\n aria-hidden\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z\"\n />\n </svg>\n </slot>\n </template>\n </template>\n <template #custom-body=\"scope\">\n <BTr\n v-if=\"busyModel && slots['table-busy']\"\n class=\"b-table-busy-slot\"\n :class=\"getBusyRowClasses\"\n >\n <BTd :colspan=\"scope.fields.length\">\n <slot name=\"table-busy\" />\n </BTd>\n </BTr>\n\n <BTr\n v-else-if=\"props.showEmpty === true && computedItems.length === 0\"\n class=\"b-table-empty-row\"\n >\n <BTd :colspan=\"computedFields.length\">\n <div role=\"alert\" aria-live=\"polite\">\n <div class=\"text-center my-2\">\n <slot v-if=\"isFilterableTable\" name=\"empty-filtered\" v-bind=\"emptySlotScope\">\n {{ props.emptyFilteredText }}\n </slot>\n <slot v-else name=\"empty\" v-bind=\"emptySlotScope\">\n {{ props.emptyText }}\n </slot>\n </div>\n </div>\n </BTd>\n </BTr>\n </template>\n </BTableLite>\n</template>\n\n<script setup lang=\"ts\" generic=\"Items\">\nimport {useToNumber} from '@vueuse/core'\nimport {computed, onMounted, type Ref, ref, watch} from 'vue'\nimport {formatItem} from '../../utils/formatItem'\nimport BTableLite from './BTableLite.vue'\nimport BTd from './BTd.vue'\nimport BTr from './BTr.vue'\nimport {\n type BTableSortBy,\n type BTableSortByOrder,\n isTableField,\n isTableItem,\n type NoProviderTypes,\n type TableField,\n type TableFieldFormatter,\n type TableFieldRaw,\n type TableItem,\n type TableRowEvent,\n type TableRowType,\n type TableStrictClassValue,\n} from '../../types/TableTypes'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTableProps} from '../../types/ComponentProps'\nimport {get, pick, set} from '../../utils/object'\nimport {startCase} from '../../utils/stringUtils'\nimport type {LiteralUnion} from '../../types/LiteralUnion'\nimport {btableLiteProps, btableSimpleProps, getTableFieldHeadLabel} from '../../utils/tableUtils'\nimport {useId} from '../../composables/useId'\n\nconst _props = withDefaults(\n defineProps<Omit<BTableProps<Items>, 'sortBy' | 'busy' | 'selectedItems'>>(),\n {\n noSortableIcon: false,\n perPage: Number.POSITIVE_INFINITY,\n filter: undefined,\n filterFunction: undefined,\n mustSort: false,\n filterable: undefined,\n provider: undefined,\n noProvider: undefined,\n noProviderPaging: false,\n noProviderSorting: false,\n multisort: false,\n noProviderFiltering: false,\n noLocalSorting: false,\n noSelectOnClick: false,\n selectable: false,\n stickySelect: false,\n selectHead: true,\n selectMode: 'multi',\n selectionVariant: 'primary',\n busyLoadingText: 'Loading...',\n currentPage: 1,\n // BTableLite props\n items: () => [],\n fields: () => [],\n // All others use defaults\n caption: undefined,\n align: undefined,\n footClone: undefined,\n labelStacked: undefined,\n showEmpty: false,\n emptyText: 'There are no records to show',\n emptyFilteredText: 'There are no records matching your request',\n fieldColumnClass: undefined,\n tbodyTrClass: undefined,\n detailsTdClass: undefined,\n headVariant: undefined,\n headRowVariant: undefined,\n footRowVariant: undefined,\n footVariant: undefined,\n modelValue: undefined,\n primaryKey: undefined,\n tbodyClass: undefined,\n tfootClass: undefined,\n tfootTrClass: undefined,\n theadClass: undefined,\n theadTrClass: undefined,\n // End BTableLite props\n // BTableSimple props\n borderVariant: undefined,\n variant: undefined,\n bordered: undefined,\n borderless: undefined,\n captionTop: undefined,\n dark: undefined,\n hover: undefined,\n id: undefined,\n noBorderCollapse: undefined,\n outlined: undefined,\n fixed: undefined,\n responsive: undefined,\n stacked: undefined,\n striped: undefined,\n stripedColumns: undefined,\n small: undefined,\n stickyHeader: undefined,\n // End BTableSimple props\n }\n)\nconst props = useDefaults(_props, 'BTable')\n\nconst emit = defineEmits<{\n 'filtered': [value: Items[]]\n 'head-clicked': [\n key: string,\n field: (typeof computedFields.value)[0],\n event: MouseEvent,\n isFooter: boolean,\n ]\n 'row-clicked': TableRowEvent<Items>\n 'row-dblclicked': TableRowEvent<Items>\n 'row-contextmenu': TableRowEvent<Items>\n 'row-hovered': TableRowEvent<Items>\n 'row-unhovered': TableRowEvent<Items>\n 'row-middle-clicked': TableRowEvent<Items>\n 'row-selected': [value: Items]\n 'row-unselected': [value: Items]\n 'sorted': [value: BTableSortBy]\n 'change': [value: Items[]]\n}>()\n\ntype SortSlotScope = {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: false\n}\n\nconst slots = defineSlots<{\n // BTableLite\n 'thead-top'?: (props: {\n columns: number\n fields: typeof computedFields.value\n selectAllRows: () => void\n clearSelected: () => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n [key: `head(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: false\n selectAllRows: () => void\n clearSelected: () => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'thead-sub'?: (\n props: {\n items: readonly Items[]\n fields: typeof computedFields.value\n field: (typeof computedFields.value)[0]\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'top-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `cell(${string})`]: (props: {\n value: unknown\n unformatted: unknown\n index: number\n item: Items\n field: (typeof computedFields.value)[0]\n items: readonly Items[]\n toggleDetails: () => void\n detailsShowing: boolean\n rowSelected: boolean\n selectRow: (index?: number) => void\n unselectRow: (index?: number) => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'row-details'?: (props: {\n item: Items\n toggleDetails: () => void\n fields: typeof computedFields.value\n index: number\n rowSelected: boolean\n selectRow: (index?: number) => void\n unselectRow: (index?: number) => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'bottom-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n\n [key: `foot(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: true\n selectAllRows: () => void\n clearSelected: () => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'custom-foot'?: (props: {\n fields: typeof computedFields.value\n items: readonly Items[]\n columns: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'table-caption'?: (props: Record<string, never>) => any\n\n // end btable slots\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: `sortAsc(${string})`]: (props: SortSlotScope) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: `sortDesc(${string})`]: (props: SortSlotScope) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: `sortDefault(${string})`]: (props: SortSlotScope) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'table-busy'?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'empty-filtered'?: (props: typeof emptySlotScope.value) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'empty'?: (props: typeof emptySlotScope.value) => any\n}>()\n\nconst dynamicCellSlots = computed(\n () => Object.keys(slots).filter((key) => key.startsWith('cell(')) as 'cell()'[]\n)\nconst dynamicFootSlots = computed(\n () => Object.keys(slots).filter((key) => key.startsWith('foot(')) as 'foot()'[]\n)\n\nconst sortByModel = defineModel<BTableProps<Items>['sortBy']>('sortBy', {\n default: undefined,\n})\nconst busyModel = defineModel<Exclude<BTableProps<Items>['busy'], undefined>>('busy', {\n default: false,\n})\nconst selectedItemsModel = defineModel<Exclude<BTableProps<Items>['selectedItems'], undefined>>(\n 'selectedItems',\n {\n default: () => [],\n }\n)\n\nconst computedId = useId(() => props.id)\n\nconst selectedItemsToSet = computed({\n get: () => new Set([...selectedItemsModel.value]),\n set: (val) => {\n selectedItemsModel.value = [...val]\n },\n})\n\nwatch(selectedItemsToSet, (newValue, oldValue) => {\n Array.from(oldValue)\n .filter((item) => !newValue.has(item))\n .forEach((item) => {\n emit('row-unselected', item)\n })\n Array.from(newValue)\n .filter((item) => !oldValue.has(item))\n .forEach((item) => {\n emit('row-selected', item)\n })\n})\n/**\n * This is to avoid the issue of directly mutating the array structure and to properly trigger the computed setter.\n * The utils also conveniently emit the proper events after\n */\nconst selectedItemsSetUtilities = {\n add: (item: Items) => {\n const value = new Set(selectedItemsToSet.value)\n value.add(item)\n selectedItemsToSet.value = value\n },\n clear: () => {\n selectedItemsToSet.value.forEach((item) => {\n selectedItemsSetUtilities.delete(item)\n })\n },\n delete: (item: Items) => {\n const value = new Set(selectedItemsToSet.value)\n if (props.primaryKey) {\n const pkey: string = props.primaryKey\n selectedItemsModel.value.forEach((v, i) => {\n const selectedKey = get(v, pkey)\n const itemKey = get(item, pkey)\n\n if (!!selectedKey && !!itemKey && selectedKey === itemKey) {\n value.delete(selectedItemsModel.value[i])\n }\n })\n } else {\n value.delete(item)\n }\n selectedItemsToSet.value = value\n },\n set: (items: Items[]) => {\n selectedItemsToSet.value = new Set(items)\n },\n has: (item: Items) => {\n if (!props.primaryKey) return selectedItemsToSet.value.has(item)\n\n // Resolver for when we are using primary keys\n const pkey: string = props.primaryKey\n for (const selected of selectedItemsToSet.value) {\n const selectedKey = get(selected, pkey)\n const itemKey = get(item, pkey)\n\n if (!!selectedKey && !!itemKey && selectedKey === itemKey) return true\n }\n return false\n },\n} as const\n\n/**\n * Only stores data that is fetched when using the provider\n */\nconst internalItems: Ref<Items[]> = ref([])\n\nconst perPageNumber = useToNumber(() => props.perPage, {method: 'parseInt'})\nconst currentPageNumber = useToNumber(() => props.currentPage, {method: 'parseInt'})\n\nconst isFilterableTable = computed(() => !!props.filter)\nconst usesProvider = computed(() => props.provider !== undefined)\nconst isSelecting = computed(() => selectedItemsToSet.value.size > 0)\n\nconst isSortable = computed(\n () =>\n sortByModel.value !== undefined ||\n props.fields.some(\n (field) => typeof field === 'object' && field !== null && field.sortable === true\n )\n)\n\nconst computedFields = computed<TableField<Items>[]>(() =>\n props.fields.map((el) => {\n if (!isTableField<Items>(el)) {\n const label = startCase(el as string)\n return {\n key: el as string,\n label,\n tdAttr: props.stacked === true ? {'data-label': label} : undefined,\n }\n }\n\n const value = sortByModel.value?.find((sb) => el.key === sb.key)\n const sortValue =\n isSortable.value === false\n ? undefined\n : value === undefined\n ? 'none'\n : value.order === 'desc'\n ? 'descending'\n : value.order === 'asc'\n ? 'ascending'\n : 'none'\n\n return {\n ...(el as TableField<Items>),\n thAttr: {\n 'aria-sort': sortValue,\n ...el.thAttr,\n },\n }\n })\n)\n\nconst tableClasses = computed(() => ({\n 'b-table-busy': busyModel.value,\n 'b-table-selectable': props.selectable,\n 'user-select-none': props.selectable && isSelecting.value,\n}))\n\nconst getBusyRowClasses = computed(() => [\n props.tbodyTrClass\n ? typeof props.tbodyTrClass === 'function'\n ? props.tbodyTrClass(null, 'table-busy')\n : props.tbodyTrClass\n : null,\n])\nconst getFieldColumnClasses = (field: TableField) => [\n {\n 'b-table-sortable-column': isSortable.value && field.sortable,\n },\n]\n// TODO this class has issues if the table has a variant already applied\n// Also the row should technically have aria-selected . Both things could probably just use a function with tbodyTrAttrs\n// But functional tbodyTrAttrs are not supported yet\n// Also the stuff for resolving functions could probably be made a util\nconst getRowClasses = (item: Items | null, type: TableRowType): TableStrictClassValue => [\n {\n [`selected table-${props.selectionVariant}`]:\n props.selectable && !!item && selectedItemsSetUtilities.has(item),\n },\n props.tbodyTrClass\n ? typeof props.tbodyTrClass === 'function'\n ? props.tbodyTrClass(item, type)\n : props.tbodyTrClass\n : null,\n]\n\nconst getFormatter = (value: TableField<Items>): TableFieldFormatter<Items> | undefined =>\n typeof value.sortByFormatted === 'function' ? value.sortByFormatted : value.formatter\nconst computedItems = computed<Items[]>(() => {\n const sortItems = (items: Items[]) => {\n // \"undefined\" values are set by us, we do this so we dont wipe out the comparer\n const sortByItems = sortByModel.value?.filter((el) => !!el.order)\n\n if (!sortByItems || sortByItems.length === 0) return items\n\n // Multi-sort\n return [...items].sort((a, b) => {\n for (let i = 0; i < (sortByItems.length ?? 0); i++) {\n const sortOption = sortByItems[i]\n const realVal = (ob: Items): string => {\n if (!isTableItem(ob)) return String(ob)\n\n const sortField = computedFields.value.find((el) => {\n if (isTableField<Items>(el)) return el.key === sortOption.key\n\n return false\n })\n const val = get(ob, sortOption.key as keyof TableItem)\n if (isTableField<Items>(sortField) && !!sortField.sortByFormatted) {\n const formatter = getFormatter(sortField)\n if (formatter) {\n return String(formatItem(ob, String(sortField.key), formatter))\n }\n }\n return typeof val === 'object' && val !== null\n ? JSON.stringify(val)\n : (val?.toString() ?? '')\n }\n\n const aValue = realVal(a)\n const bValue = realVal(b)\n const comparison = sortOption.comparer\n ? sortOption.comparer(aValue, bValue)\n : aValue.localeCompare(bValue, undefined, {numeric: true})\n\n if (comparison !== 0) {\n return sortOption.order === 'asc' ? comparison : -comparison\n }\n }\n return 0 // items are equal\n })\n }\n\n const filterItems = (items: Items[]) =>\n items.filter((item) =>\n isTableItem(item)\n ? Object.entries(item).some(([key, val]) => {\n if (\n val === null ||\n val === undefined ||\n key[0] === '_' ||\n (!props.filterable?.includes(key) && !!props.filterable?.length)\n )\n return false\n\n if (props.filterFunction && typeof props.filterFunction === 'function') {\n return props.filterFunction(item, props.filter)\n }\n\n const realVal = (): string => {\n const filterField = computedFields.value.find((el) => {\n if (isTableField<Items>(el)) return el.key === key\n\n return false\n })\n if (isTableField<Items>(filterField) && !!filterField.filterByFormatted) {\n const formatter = getFormatter(filterField)\n if (formatter) {\n return String(formatter(val, String(filterField.key), item))\n }\n }\n return typeof val === 'object' ? JSON.stringify(Object.values(val)) : val.toString()\n }\n const itemValue: string = realVal()\n return itemValue.toLowerCase().includes(props.filter?.toLowerCase() ?? '')\n })\n : true\n )\n\n let mappedItems = usesProvider.value ? internalItems.value : (props.items as Items[])\n mappedItems = mappedItems.map((item) => {\n if (\n typeof item === 'object' &&\n item !== null &&\n Object.keys(item).some((key) => key.includes('.'))\n ) {\n // We use any here because the TS doesn't isn't certain that \"item\" is the same type as our newItem.\n // But we've determined that it's an object, so we can ignore it since they will always be the same \"object\"\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let newItem: any = {}\n for (const key in item) {\n if (key.includes('.')) {\n newItem = set(newItem, key, item[key])\n } else {\n newItem[key] = item[key]\n }\n }\n return newItem\n // return\n }\n return item\n })\n\n if (\n (isFilterableTable.value === true && !usesProvider.value) ||\n (isFilterableTable.value === true && usesProvider.value && props.noProviderFiltering)\n ) {\n mappedItems = filterItems(mappedItems)\n }\n\n if (\n (isSortable.value === true && !usesProvider.value && !props.noLocalSorting) ||\n (isSortable.value === true && usesProvider.value && props.noProviderSorting)\n ) {\n mappedItems = sortItems(mappedItems)\n }\n\n return mappedItems\n})\n\nconst emptySlotScope = computed(() => ({\n emptyFilteredText: props.emptyFilteredText,\n emptyText: props.emptyText,\n fields: computedFields.value,\n items: computedItems.value,\n}))\n\nconst computedDisplayItems = computed<Items[]>(() => {\n if (Number.isNaN(perPageNumber.value) || (usesProvider.value && !props.noProviderPaging)) {\n return computedItems.value\n }\n\n return computedItems.value.slice(\n (currentPageNumber.value - 1) * (perPageNumber.value || Number.POSITIVE_INFINITY),\n currentPageNumber.value * (perPageNumber.value || Number.POSITIVE_INFINITY)\n )\n})\n\nwatch(computedDisplayItems, (v) => {\n emit('change', v)\n})\n\nconst handleRowSelection = (\n row: Items,\n index: number,\n shiftClicked = false,\n ctrlClicked = false,\n metaClicked = false\n) => {\n if (!props.selectable) return\n\n if (props.selectMode === 'single' || props.selectMode === 'multi') {\n // Do nothing when these items are held\n if (shiftClicked || ctrlClicked) return\n // Delete if item is in\n if (selectedItemsSetUtilities.has(row)) {\n selectedItemsSetUtilities.delete(row)\n } else {\n if (props.selectMode === 'single') {\n selectedItemsSetUtilities.set([row])\n } else {\n selectedItemsSetUtilities.add(row)\n }\n }\n } else {\n if (ctrlClicked || metaClicked) {\n // Delete if in the object\n if (selectedItemsSetUtilities.has(row)) {\n selectedItemsSetUtilities.delete(row)\n // Otherwise add. Functions similarly to 'multi' at this point\n } else {\n selectedItemsSetUtilities.add(row)\n }\n // This is where range is different, due to the difference in shift\n } else if (shiftClicked) {\n const lastSelectedItem = [...selectedItemsToSet.value].pop()\n const lastSelectedIndex = computedItems.value.findIndex((i) => i === lastSelectedItem)\n const selectStartIndex = Math.min(lastSelectedIndex, index)\n const selectEndIndex = Math.max(lastSelectedIndex, index)\n const items = computedItems.value.slice(selectStartIndex, selectEndIndex + 1)\n selectedItemsSetUtilities.set(items)\n // If nothing is being held, then we just behave like it's single mode\n } else {\n selectedItemsSetUtilities.set([row])\n }\n }\n}\n\nconst onRowClick = (row: Items, index: number, e: MouseEvent) => {\n if (props.noSelectOnClick === false) {\n handleRowSelection(row, index, e.shiftKey, e.ctrlKey, e.metaKey)\n }\n emit('row-clicked', row, index, e)\n}\n\nconst handleFieldSorting = (field: TableField<Items>) => {\n if (!isSortable.value) return\n\n const fieldKey = typeof field === 'object' && field !== null ? field.key : field\n const fieldSortable = typeof field === 'object' && field !== null ? field.sortable : false\n\n if (!(isSortable.value === true && fieldSortable === true)) return\n\n const resolveOrder = (val: BTableSortByOrder): BTableSortByOrder | undefined => {\n if (val === 'asc') return 'desc'\n if (val === undefined) return 'asc'\n if (\n props.mustSort === true ||\n (Array.isArray(props.mustSort) && props.mustSort.includes(fieldKey as string))\n )\n return 'asc'\n return undefined\n }\n\n const index = sortByModel.value?.findIndex((el) => el.key === fieldKey) ?? -1\n const originalValue = sortByModel.value?.[index]\n const updatedValue: BTableSortBy =\n // If value is new, we default to ascending\n // Otherwise we make a temp copy of the value\n index === -1 || !originalValue ? {key: fieldKey as string, order: 'asc'} : {...originalValue}\n\n /**\n * @returns the updated value to emit for sorted\n */\n const handleMultiSort = (): BTableSortBy => {\n let val = updatedValue\n if (index === -1) {\n sortByModel.value = [...(sortByModel.value ?? []), updatedValue]\n } else {\n const order = resolveOrder(updatedValue.order)\n val = {...updatedValue, order}\n sortByModel.value = order\n ? sortByModel.value?.map((el) => (el.key === val.key ? val : el))\n : sortByModel.value?.filter((el) => el.key !== val.key)\n }\n return val\n }\n\n /**\n * @returns the updated value to emit for sorted\n */\n const handleSingleSort = (): BTableSortBy => {\n const val = {\n ...updatedValue,\n order: index === -1 ? updatedValue.order : resolveOrder(updatedValue.order),\n }\n sortByModel.value = [val]\n return val\n }\n\n // Then emit the returned updated value\n emit('sorted', props.multisort === true ? handleMultiSort() : handleSingleSort())\n}\n\nconst onFieldHeadClick = (\n fieldKey: string,\n field: TableField<Items>,\n event: Readonly<MouseEvent>,\n isFooter = false\n) => {\n emit('head-clicked', fieldKey, field, event, isFooter)\n handleFieldSorting(field)\n}\n\nconst callItemsProvider = async () => {\n if (!usesProvider.value || props.provider === undefined || busyModel.value) return\n busyModel.value = true\n const response = props.provider({\n currentPage: currentPageNumber.value,\n filter: props.filter,\n sortBy: sortByModel.value,\n perPage: perPageNumber.value,\n })\n try {\n const items = response instanceof Promise ? await response : response\n\n if (items === undefined) return\n internalItems.value = items\n } finally {\n // Potential race condition could occur if the user explicitly sets the busy value to a different value while the response promise is executing\n // which would have been the users choice.\n // eslint-disable-next-line require-atomic-updates\n busyModel.value = false\n }\n}\n\nconst providerPropsWatch = async (prop: string, val: unknown, oldVal: unknown) => {\n if (val === oldVal) return\n\n //stop provide when paging\n const inNoProvider = (key: NoProviderTypes) => props.noProvider?.includes(key) === true\n const noProvideWhenPaging =\n (prop === 'currentPage' || prop === 'perPage') &&\n (inNoProvider('paging') || props.noProviderPaging === true)\n const noProvideWhenFiltering =\n prop === 'filter' && (inNoProvider('filtering') || props.noProviderFiltering === true)\n const noProvideWhenSorting =\n (prop === 'sortBy' || prop === 'sortDesc') &&\n (inNoProvider('sorting') || props.noProviderSorting === true)\n\n if (noProvideWhenPaging || noProvideWhenFiltering || noProvideWhenSorting) return\n\n if (usesProvider.value === true) {\n await callItemsProvider()\n }\n\n if (!(prop === 'currentPage' || prop === 'perPage')) {\n emit('filtered', [...computedItems.value])\n }\n}\n\nwatch(\n () => props.filter,\n (filter, oldFilter) => {\n providerPropsWatch('filter', filter, oldFilter)\n\n if (filter === oldFilter || usesProvider.value) return\n if (!filter) {\n emit('filtered', [...computedItems.value])\n }\n }\n)\nwatch(currentPageNumber, (val, oldVal) => {\n providerPropsWatch('currentPage', val, oldVal)\n})\nwatch(perPageNumber, (val, oldVal) => {\n providerPropsWatch('perPage', val, oldVal)\n})\nwatch(\n sortByModel,\n (val, oldVal) => {\n providerPropsWatch('sortBy', val, oldVal)\n },\n {deep: true}\n)\n\nwatch(\n () => props.provider,\n (newValue) => {\n // Reset the internal values if the provider stops getting used\n if (newValue === undefined) {\n internalItems.value = []\n return\n }\n // Otherwise we should refresh the table on such a change\n callItemsProvider()\n }\n)\n\nonMounted(callItemsProvider)\n\nconst exposedSelectableUtilities = {\n clearSelected: () => {\n if (!props.selectable) return\n selectedItemsSetUtilities.clear()\n },\n selectAllRows: () => {\n if (!props.selectable || props.selectMode === 'single') return\n selectedItemsToSet.value = new Set([...computedItems.value])\n },\n selectRow: (index: number) => {\n if (!props.selectable) return\n const item = computedItems.value[index]\n if (!item || selectedItemsSetUtilities.has(item)) return\n if (props.selectMode === 'single') {\n selectedItemsSetUtilities.set([item])\n } else {\n selectedItemsSetUtilities.add(item)\n }\n },\n unselectRow: (index: number) => {\n if (!props.selectable) return\n const item = computedItems.value[index]\n if (!item || !selectedItemsSetUtilities.has(item)) return\n selectedItemsSetUtilities.delete(item)\n },\n isRowSelected: (index: number) => {\n if (!props.selectable) return false\n const item = computedItems.value[index]\n return selectedItemsSetUtilities.has(item)\n },\n} as const\n\nconst computedLiteProps = computed(() => ({\n ...pick(props, [...btableLiteProps, ...btableSimpleProps]),\n tableAttrs: {\n ariaBusy: busyModel.value,\n },\n items: computedDisplayItems.value,\n fields: computedFields.value as TableFieldRaw<Items>[],\n tableClass: tableClasses.value,\n tbodyTrClass: getRowClasses,\n fieldColumnClass: getFieldColumnClasses,\n id: computedId.value,\n}))\n\ndefineExpose({\n // The row selection methods are really for compat. Users should probably use the v-model though\n ...exposedSelectableUtilities,\n items: computedItems,\n refresh: callItemsProvider,\n})\n</script>\n"],"names":["formatItem","item","fieldKey","formatter","val","get","isTableItem","value","isTableField","_props","__props","props","useDefaults","computedClasses","computed","variant","stickyColumn","scope","colspan","rowspan","getTableFieldHeadLabel","field","titleCase","label","key","btableSimpleProps","Object","freeze","keys","bordered","borderless","borderVariant","captionTop","dark","fixed","hover","id","noBorderCollapse","outlined","responsive","small","stacked","stickyHeader","striped","stripedColumns","tableAttrs","tableClass","btableLiteProps","align","caption","detailsTdClass","fieldColumnClass","fields","footClone","footRowVariant","footVariant","headRowVariant","headVariant","items","labelStacked","modelValue","primaryKey","tbodyClass","tbodyTrAttrs","tbodyTrClass","tfootClass","tfootTrClass","theadClass","theadTrClass","TABLE_TAG_NAMES","eventFilter","join","filterEvent","event","target","el","disabled","indexOf","tagName","closest","labelFor","getAttribute","input","document","getElementById","querySelector","matches","emit","__emit","slots","_useSlots","computedId","useId","detailsMap","ref","WeakMap","vue","watch","forEach","set","_showDetails","generateDetailsItem","deep","immediate","computedTableClasses","computedFields","length","firstItem","Array","isArray","map","k","startCase","tdAttr","_noHeader","f","computedFieldsTotal","showComputedHeaders","every","footerProps","class","callThAttr","type","String","thAttr","headerClicked","isFooter","toggleRowDetails","tr","prevValue","getFieldColumnClasses","thClass","getFieldRowClasses","tdClass","_a","_cellVariants","_b","callTbodyTrAttrs","getRowClasses","computedSimpleProps","pick","primaryKeyValue","itemIndex","button","attr","dynamicCellSlots","filter","startsWith","dynamicFootSlots","sortByModel","_useModel","busyModel","selectedItemsModel","useModel","selectedItemsToSet","Set","newValue","oldValue","from","has","selectedItemsSetUtilities","add","clear","delete","pkey","v","i","selectedKey","itemKey","selected","internalItems","perPageNumber","useToNumber","perPage","method","currentPageNumber","currentPage","isFilterableTable","usesProvider","provider","isSelecting","size","isSortable","some","sortable","find","sb","sortValue","order","tableClasses","selectable","getBusyRowClasses","selectionVariant","getFormatter","sortByFormatted","computedItems","mappedItems","includes","newItem","noProviderFiltering","entries","filterable","filterFunction","filterField","filterByFormatted","JSON","stringify","values","toString","realVal","toLowerCase","_c","noLocalSorting","noProviderSorting","sortByItems","sort","a","b","sortOption","ob","sortField","aValue","bValue","comparison","comparer","localeCompare","numeric","sortItems","emptySlotScope","emptyFilteredText","emptyText","computedDisplayItems","Number","isNaN","noProviderPaging","slice","POSITIVE_INFINITY","onRowClick","row","index","e","noSelectOnClick","shiftClicked","ctrlClicked","metaClicked","selectMode","lastSelectedItem","pop","lastSelectedIndex","findIndex","selectStartIndex","Math","min","selectEndIndex","max","handleRowSelection","shiftKey","ctrlKey","metaKey","onFieldHeadClick","fieldSortable","resolveOrder","mustSort","originalValue","updatedValue","multisort","handleMultiSort","handleSingleSort","handleFieldSorting","callItemsProvider","async","response","sortBy","Promise","providerPropsWatch","prop","oldVal","inNoProvider","noProvider","noProvideWhenPaging","noProvideWhenFiltering","noProvideWhenSorting","oldFilter","onMounted","exposedSelectableUtilities","clearSelected","selectAllRows","selectRow","unselectRow","isRowSelected","computedLiteProps","ariaBusy","__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@ -1,8 +1,9 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, unref, useSlots, ref, watch, createBlock, normalizeProps, guardReactiveProps, withCtx, withDirectives, createVNode, Fragment, renderList, mergeProps, createTextVNode, toDisplayString, createCommentVNode, vShow, createElementVNode, mergeModels, useModel, onMounted, createSlots } from "vue";
2
2
  import { g as get, p as pick, s as set } from "./object-DIbMZaP9.mjs";
3
- import { _ as _sfc_main$8 } from "./BTableSimple.vue_vue_type_script_setup_true_lang-B4MDRM8j.mjs";
3
+ import { _ as _sfc_main$8 } from "./BTableSimple.vue_vue_type_script_setup_true_lang-Dbrg2rgZ.mjs";
4
4
  import { u as useDefaults } from "./useDefaults-BTLXvYhO.mjs";
5
5
  import { a as titleCase, s as startCase } from "./stringUtils-DNoLRB2A.mjs";
6
+ import { u as useId } from "./useId-c2wnQbyL.mjs";
6
7
  import { u as useToNumber } from "./index-D3jGjWWk.mjs";
7
8
  const formatItem = (item, fieldKey, formatter) => {
8
9
  const val = get(item, fieldKey);
@@ -301,6 +302,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
301
302
  const props = useDefaults(_props, "BTableLite");
302
303
  const emit = __emit;
303
304
  const slots = useSlots();
305
+ const computedId = useId(() => props.id);
304
306
  const generateDetailsItem = (item) => [
305
307
  item,
306
308
  item._showDetails
@@ -408,9 +410,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
408
410
  };
409
411
  const callTbodyTrAttrs = (item, type) => props.tbodyTrAttrs ? typeof props.tbodyTrAttrs === "function" ? props.tbodyTrAttrs(item, type) : props.tbodyTrAttrs : null;
410
412
  const getRowClasses = (item, type) => props.tbodyTrClass ? typeof props.tbodyTrClass === "function" ? props.tbodyTrClass(item, type) : props.tbodyTrClass : null;
413
+ const generateTableRowId = (primaryKeyValue) => `${computedId.value}__row_${primaryKeyValue}`;
411
414
  const computedSimpleProps = computed(() => ({
412
415
  ...pick(props, btableSimpleProps),
413
- tableClass: computedTableClasses.value
416
+ tableClass: computedTableClasses.value,
417
+ id: computedId.value
414
418
  }));
415
419
  return (_ctx, _cache) => {
416
420
  return openBlock(), createBlock(_sfc_main$8, normalizeProps(guardReactiveProps(computedSimpleProps.value)), {
@@ -515,9 +519,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
515
519
  }, 16, ["class"])) : createCommentVNode("", true),
516
520
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(props).items, (item, itemIndex) => {
517
521
  return openBlock(), createElementBlock(Fragment, {
518
- key: unref(props).primaryKey ? unref(get)(item, unref(props).primaryKey) : itemIndex
522
+ key: unref(props).primaryKey && unref(get)(item, unref(props).primaryKey) ? unref(get)(item, unref(props).primaryKey) : itemIndex
519
523
  }, [
520
524
  createVNode(_sfc_main$2, mergeProps({
525
+ id: unref(props).primaryKey && unref(get)(item, unref(props).primaryKey) ? generateTableRowId(unref(get)(item, unref(props).primaryKey)) : void 0,
521
526
  class: getRowClasses(item, "row"),
522
527
  variant: unref(isTableItem)(item) ? item._rowVariant : void 0,
523
528
  ref_for: true
@@ -565,7 +570,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
565
570
  }), 128))
566
571
  ]),
567
572
  _: 2
568
- }, 1040, ["class", "variant", "onClick", "onDblclick", "onContextmenu", "onMouseenter", "onMouseleave", "onMousedown"]),
573
+ }, 1040, ["id", "class", "variant", "onClick", "onDblclick", "onContextmenu", "onMouseenter", "onMouseleave", "onMousedown"]),
569
574
  unref(isTableItem)(item) && detailsMap.value.get(item) === true && slots["row-details"] ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
570
575
  createVNode(_sfc_main$2, {
571
576
  "aria-hidden": "true",
@@ -795,6 +800,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
795
800
  __props,
796
801
  "selectedItems"
797
802
  );
803
+ const computedId = useId(() => props.id);
798
804
  const selectedItemsToSet = computed({
799
805
  get: () => /* @__PURE__ */ new Set([...selectedItemsModel.value]),
800
806
  set: (val) => {
@@ -1194,7 +1200,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1194
1200
  fields: computedFields.value,
1195
1201
  tableClass: tableClasses.value,
1196
1202
  tbodyTrClass: getRowClasses,
1197
- fieldColumnClass: getFieldColumnClasses
1203
+ fieldColumnClass: getFieldColumnClasses,
1204
+ id: computedId.value
1198
1205
  }));
1199
1206
  __expose({
1200
1207
  // The row selection methods are really for compat. Users should probably use the v-model though
@@ -1436,4 +1443,4 @@ export {
1436
1443
  _sfc_main$3 as f,
1437
1444
  _sfc_main$2 as g
1438
1445
  };
1439
- //# sourceMappingURL=BTable.vue_vue_type_script_setup_true_lang-CjyYEhkw.mjs.map
1446
+ //# sourceMappingURL=BTable.vue_vue_type_script_setup_true_lang-utb_UzeE.mjs.map