bootstrap-vue-next 0.25.11 → 0.25.13

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 (27) hide show
  1. package/dist/{BFormGroup.vue_vue_type_script_setup_true_lang-BF4vTqnP.js → BFormGroup.vue_vue_type_script_setup_true_lang-DAyEVpcH.js} +2 -2
  2. package/dist/BFormGroup.vue_vue_type_script_setup_true_lang-DAyEVpcH.js.map +1 -0
  3. package/dist/{BFormGroup.vue_vue_type_script_setup_true_lang-CbhlDyNx.mjs → BFormGroup.vue_vue_type_script_setup_true_lang-DMeTU5tW.mjs} +2 -2
  4. package/dist/BFormGroup.vue_vue_type_script_setup_true_lang-DMeTU5tW.mjs.map +1 -0
  5. package/dist/{BTable.vue_vue_type_script_setup_true_lang-CumrgwnT.mjs → BTable.vue_vue_type_script_setup_true_lang-DPbNjtGg.mjs} +23 -9
  6. package/dist/BTable.vue_vue_type_script_setup_true_lang-DPbNjtGg.mjs.map +1 -0
  7. package/dist/BTable.vue_vue_type_script_setup_true_lang-Z3Xw0zF8.js +2 -0
  8. package/dist/BTable.vue_vue_type_script_setup_true_lang-Z3Xw0zF8.js.map +1 -0
  9. package/dist/bootstrap-vue-next.mjs +3 -3
  10. package/dist/bootstrap-vue-next.umd.js +1 -1
  11. package/dist/{index-DsBqp3u3.js → index-Cu48mp5Z.js} +2 -2
  12. package/dist/index-Cu48mp5Z.js.map +1 -0
  13. package/dist/{index-Ckv10UB0.mjs → index-D4dAqwhl.mjs} +3 -3
  14. package/dist/{index-Ckv10UB0.mjs.map → index-D4dAqwhl.mjs.map} +1 -1
  15. package/dist/src/components/BFormGroup/index.mjs +1 -1
  16. package/dist/src/components/BFormGroup/index.umd.js +1 -1
  17. package/dist/src/components/BTable/index.mjs +1 -1
  18. package/dist/src/components/BTable/index.umd.js +1 -1
  19. package/dist/src/components/index.mjs +2 -2
  20. package/dist/src/components/index.umd.js +1 -1
  21. package/package.json +1 -1
  22. package/dist/BFormGroup.vue_vue_type_script_setup_true_lang-BF4vTqnP.js.map +0 -1
  23. package/dist/BFormGroup.vue_vue_type_script_setup_true_lang-CbhlDyNx.mjs.map +0 -1
  24. package/dist/BTable.vue_vue_type_script_setup_true_lang-BgBZgKGz.js +0 -2
  25. package/dist/BTable.vue_vue_type_script_setup_true_lang-BgBZgKGz.js.map +0 -1
  26. package/dist/BTable.vue_vue_type_script_setup_true_lang-CumrgwnT.mjs.map +0 -1
  27. package/dist/index-DsBqp3u3.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),l=require("./useAriaInvalid-DUOcHX79.js"),a=require("./dom-C-F8jHop.js"),t=require("./BCol.vue_vue_type_script_setup_true_lang-DkVrxQjg.js"),o=require("./BFormValidFeedback.vue_vue_type_script_setup_true_lang-BXedB99M.js"),r=require("./stringUtils-D2ajpVM0.js"),n=require("./useStateClass-BePLKIel.js"),i=require("./useId-C1J_udPo.js"),d=require("./index-CHhN7c8p.js"),u=require("./useDefaults-DA3S59IE.js"),s=(e,l)=>l+(e?r.upperFirst(e):""),c=e.defineComponent({__name:"BFormGroup",props:{contentCols:{type:[Boolean,String,Number],default:void 0},labelCols:{type:[Boolean,String,Number],default:void 0},labelAlign:{default:void 0},ariaInvalid:{type:[Boolean,String],default:void 0},description:{default:void 0},disabled:{type:Boolean,default:!1},feedbackAriaLive:{default:"assertive"},floating:{type:Boolean,default:!1},id:{default:void 0},invalidFeedback:{default:void 0},label:{default:void 0},labelClass:{default:void 0},labelFor:{default:void 0},labelSize:{default:void 0},labelVisuallyHidden:{type:Boolean,default:!1},state:{type:[Boolean,null],default:null},tooltip:{type:Boolean,default:!1},validFeedback:{default:void 0},validated:{type:Boolean,default:!1},contentColsSm:{type:[Boolean,String,Number],default:void 0},contentColsMd:{type:[Boolean,String,Number],default:void 0},contentColsLg:{type:[Boolean,String,Number],default:void 0},contentColsXl:{type:[Boolean,String,Number],default:void 0},labelColsSm:{type:[Boolean,String,Number],default:void 0},labelColsMd:{type:[Boolean,String,Number],default:void 0},labelColsLg:{type:[Boolean,String,Number],default:void 0},labelColsXl:{type:[Boolean,String,Number],default:void 0},labelAlignSm:{default:void 0},labelAlignMd:{default:void 0},labelAlignLg:{default:void 0},labelAlignXl:{default:void 0}},setup(r){const c=["input","select","textarea"],f=r,b=u.useDefaults(f,"BFormGroup"),v=d.createReusableTemplate(),p=d.createReusableTemplate(),m=["xs","sm","md","lg","xl"],k=(e,l)=>m.reduce(((a,t)=>{const o=s("xs"===t?"":t,`${l}Cols`);let r=e[o];if(r=""===r||(r||!1),"boolean"!=typeof r&&"auto"!==r){const e=Number.parseInt(r);r=Number.isNaN(e)?0:e,r=r>0&&r}return r&&("xs"===t?a["boolean"==typeof r?"col":"cols"]=r:a[t||("boolean"==typeof r?"col":"cols")]=r),a}),{}),_=e.ref(null),y=e.computed((()=>k(b,"content"))),B=e.computed((()=>{return e=b,m.reduce(((l,a)=>{const t=s("xs"===a?"":a,"labelAlign"),o=e[t]||null;return o&&("xs"===a?l.push(`text-${o}`):l.push(`text-${a}-${o}`)),l}),[]);var e})),g=e.computed((()=>k(b,"label"))),C=e.computed((()=>Object.keys(y.value).length>0||Object.keys(g.value).length>0)),S=n.useStateClass((()=>b.state)),x=l.useAriaInvalid((()=>b.ariaInvalid),(()=>b.state)),N=e=>{if(b.labelFor||null===_.value)return;const{target:l}=e,t=l?l.tagName:"";if(-1!==[...c,"a","button","label"].indexOf(t))return;const o=[..._.value.querySelectorAll(c.map((e=>`${e}:not([disabled])`)).join())].filter(a.isVisible),[r]=o;1===o.length&&r instanceof HTMLElement&&a.attemptFocus(r)},F=i.useId((()=>b.id)),V=i.useId(void 0,"_BV_label_"),$=e.computed((()=>b.labelFor?"label":"legend")),h=e.computed((()=>[C.value?"col-form-label":"form-label",{"bv-no-focus-ring":!b.labelFor,"col-form-label":C.value||!b.labelFor,"pt-0":!C.value&&!b.labelFor,"d-block":!C.value&&b.labelFor,[`col-form-label-${b.labelSize}`]:!!b.labelSize,"visually-hidden":b.labelVisuallyHidden},B.value,b.labelClass])),I=i.useId(void 0,"_BV_feedback_invalid_"),D=i.useId(void 0,"_BV_feedback_valid_"),j=i.useId(void 0,"_BV_description_"),w=e.computed((()=>!b.labelFor));return(l,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value?"fieldset":"div"),{id:e.unref(F),disabled:w.value?e.unref(b).disabled:null,role:w.value?null:"group","aria-invalid":e.unref(x),"aria-labelledby":w.value&&C.value?e.unref(V):null,class:e.normalizeClass([e.unref(S),{"was-validated":e.unref(b).validated}])},{default:e.withCtx((()=>[e.createVNode(e.unref(p).define,null,{default:e.withCtx((()=>[l.$slots.invalidFeedback||e.unref(b).invalidFeedback?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,id:e.unref(I),"aria-live":e.unref(b).feedbackAriaLive,state:e.unref(b).state,tooltip:e.unref(b).tooltip},{default:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid-feedback",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).invalidFeedback),1)]))])),_:3},8,["id","aria-live","state","tooltip"])):e.createCommentVNode("",!0),l.$slots.validFeedback||e.unref(b).validFeedback?(e.openBlock(),e.createBlock(o._sfc_main$3,{key:1,id:e.unref(D),"aria-live":e.unref(b).feedbackAriaLive,state:e.unref(b).state,tooltip:e.unref(b).tooltip},{default:e.withCtx((()=>[e.renderSlot(l.$slots,"valid-feedback",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).validFeedback),1)]))])),_:3},8,["id","aria-live","state","tooltip"])):e.createCommentVNode("",!0),l.$slots.description||e.unref(b).description?(e.openBlock(),e.createBlock(o._sfc_main$2,{key:2,id:e.unref(j)},{default:e.withCtx((()=>[e.renderSlot(l.$slots,"description",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).description),1)]))])),_:3},8,["id"])):e.createCommentVNode("",!0)])),_:3}),e.createVNode(e.unref(v).define,null,{default:e.withCtx((()=>[l.$slots.label||e.unref(b).label||C.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[C.value?(e.openBlock(),e.createBlock(t._sfc_main,e.normalizeProps(e.mergeProps({key:0},g.value)),{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent($.value),{id:e.unref(V),for:e.unref(b).labelFor||null,tabindex:w.value?"-1":null,class:e.normalizeClass(h.value),onClick:a[0]||(a[0]=e=>w.value?N:null)},{default:e.withCtx((()=>[e.renderSlot(l.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).label),1)]))])),_:3},8,["id","for","tabindex","class"]))])),_:3},16)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent($.value),{key:1,id:e.unref(V),for:e.unref(b).labelFor||null,tabindex:w.value?"-1":null,class:e.normalizeClass(h.value),onClick:a[1]||(a[1]=e=>w.value?N:null)},{default:e.withCtx((()=>[e.renderSlot(l.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).label),1)]))])),_:3},8,["id","for","tabindex","class"]))],64)):e.createCommentVNode("",!0)])),_:3}),C.value&&!w.value?(e.openBlock(),e.createBlock(o._sfc_main$1,{key:0},{default:e.withCtx((()=>[e.createVNode(e.unref(v).reuse),e.createVNode(t._sfc_main,e.mergeProps(y.value,{ref_key:"content",ref:_}),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"default",{id:e.unref(F),ariaDescribedby:null,descriptionId:e.unref(j),labelId:e.unref(V)}),e.createVNode(e.unref(p).reuse)])),_:3},16)])),_:3})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(v).reuse),!C.value&&e.unref(b).floating?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:_,class:"form-floating"},[e.renderSlot(l.$slots,"default",{id:e.unref(F),ariaDescribedby:null,descriptionId:e.unref(j),labelId:e.unref(V)}),e.createVNode(e.unref(p).reuse)],512)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(l.$slots,"default",{id:e.unref(F),ariaDescribedby:null,descriptionId:e.unref(j),labelId:e.unref(V)}),e.createVNode(e.unref(p).reuse)],64))],64))])),_:3},8,["id","disabled","role","aria-invalid","aria-labelledby","class"]))}});exports._sfc_main=c;
2
- //# sourceMappingURL=BFormGroup.vue_vue_type_script_setup_true_lang-BF4vTqnP.js.map
1
+ "use strict";const e=require("vue"),l=require("./useAriaInvalid-DUOcHX79.js"),a=require("./dom-C-F8jHop.js"),t=require("./BCol.vue_vue_type_script_setup_true_lang-DkVrxQjg.js"),o=require("./BFormValidFeedback.vue_vue_type_script_setup_true_lang-BXedB99M.js"),r=require("./stringUtils-D2ajpVM0.js"),n=require("./useStateClass-BePLKIel.js"),i=require("./useId-C1J_udPo.js"),d=require("./index-CHhN7c8p.js"),u=require("./useDefaults-DA3S59IE.js"),s=(e,l)=>l+(e?r.upperFirst(e):""),c=e.defineComponent({__name:"BFormGroup",props:{contentCols:{type:[Boolean,String,Number],default:void 0},labelCols:{type:[Boolean,String,Number],default:void 0},labelAlign:{default:void 0},ariaInvalid:{type:[Boolean,String],default:void 0},description:{default:void 0},disabled:{type:Boolean,default:!1},feedbackAriaLive:{default:"assertive"},floating:{type:Boolean,default:!1},id:{default:void 0},invalidFeedback:{default:void 0},label:{default:void 0},labelClass:{default:void 0},labelFor:{default:void 0},labelSize:{default:void 0},labelVisuallyHidden:{type:Boolean,default:!1},state:{type:[Boolean,null],default:null},tooltip:{type:Boolean,default:!1},validFeedback:{default:void 0},validated:{type:Boolean,default:!1},contentColsSm:{type:[Boolean,String,Number],default:void 0},contentColsMd:{type:[Boolean,String,Number],default:void 0},contentColsLg:{type:[Boolean,String,Number],default:void 0},contentColsXl:{type:[Boolean,String,Number],default:void 0},labelColsSm:{type:[Boolean,String,Number],default:void 0},labelColsMd:{type:[Boolean,String,Number],default:void 0},labelColsLg:{type:[Boolean,String,Number],default:void 0},labelColsXl:{type:[Boolean,String,Number],default:void 0},labelAlignSm:{default:void 0},labelAlignMd:{default:void 0},labelAlignLg:{default:void 0},labelAlignXl:{default:void 0}},setup(r){const c=["input","select","textarea"],f=r,b=u.useDefaults(f,"BFormGroup"),v=d.createReusableTemplate(),p=d.createReusableTemplate(),m=["xs","sm","md","lg","xl"],k=(e,l)=>m.reduce(((a,t)=>{const o=s("xs"===t?"":t,`${l}Cols`);let r=e[o];if(r=""===r||(r||!1),"boolean"!=typeof r&&"auto"!==r){const e=Number.parseInt(r);r=Number.isNaN(e)?0:e,r=r>0&&r}return r&&("xs"===t?a["boolean"==typeof r?"col":"cols"]=r:a[t||("boolean"==typeof r?"col":"cols")]=r),a}),{}),_=e.ref(null),y=e.computed((()=>k(b,"content"))),B=e.computed((()=>{return e=b,m.reduce(((l,a)=>{const t=s("xs"===a?"":a,"labelAlign"),o=e[t]||null;return o&&("xs"===a?l.push(`text-${o}`):l.push(`text-${a}-${o}`)),l}),[]);var e})),g=e.computed((()=>k(b,"label"))),C=e.computed((()=>Object.keys(y.value).length>0||Object.keys(g.value).length>0)),S=n.useStateClass((()=>b.state)),x=l.useAriaInvalid((()=>b.ariaInvalid),(()=>b.state)),N=e=>{if(b.labelFor||null===_.value)return;const{target:l}=e,t=l?l.tagName:"";if(-1!==[...c,"a","button","label"].indexOf(t))return;const o=[..._.value.querySelectorAll(c.map((e=>`${e}:not([disabled])`)).join())].filter(a.isVisible),[r]=o;1===o.length&&r instanceof HTMLElement&&a.attemptFocus(r)},F=i.useId((()=>b.id)),V=i.useId(void 0,"_BV_label_"),$=e.computed((()=>b.labelFor?"label":"legend")),h=e.computed((()=>[C.value?"col-form-label":"form-label",{"bv-no-focus-ring":!b.labelFor,"col-form-label":C.value||!b.labelFor,"pt-0":!C.value&&!b.labelFor,"d-block":!C.value&&b.labelFor,[`col-form-label-${b.labelSize}`]:!!b.labelSize,"visually-hidden":b.labelVisuallyHidden},B.value,b.labelClass])),I=i.useId(void 0,"_BV_feedback_invalid_"),D=i.useId(void 0,"_BV_feedback_valid_"),j=i.useId(void 0,"_BV_description_"),w=e.computed((()=>!b.labelFor));return(l,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value?"fieldset":"div"),{id:e.unref(F),disabled:w.value?e.unref(b).disabled:null,role:w.value?null:"group","aria-invalid":e.unref(x),"aria-labelledby":w.value&&C.value?e.unref(V):null,class:e.normalizeClass([e.unref(S),{"was-validated":e.unref(b).validated}])},{default:e.withCtx((()=>[e.createVNode(e.unref(p).define,null,{default:e.withCtx((()=>[l.$slots.invalidFeedback||e.unref(b).invalidFeedback?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,id:e.unref(I),"aria-live":e.unref(b).feedbackAriaLive,state:e.unref(b).state,tooltip:e.unref(b).tooltip},{default:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid-feedback",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).invalidFeedback),1)]))])),_:3},8,["id","aria-live","state","tooltip"])):e.createCommentVNode("",!0),l.$slots.validFeedback||e.unref(b).validFeedback?(e.openBlock(),e.createBlock(o._sfc_main$3,{key:1,id:e.unref(D),"aria-live":e.unref(b).feedbackAriaLive,state:e.unref(b).state,tooltip:e.unref(b).tooltip},{default:e.withCtx((()=>[e.renderSlot(l.$slots,"valid-feedback",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).validFeedback),1)]))])),_:3},8,["id","aria-live","state","tooltip"])):e.createCommentVNode("",!0),l.$slots.description||e.unref(b).description?(e.openBlock(),e.createBlock(o._sfc_main$2,{key:2,id:e.unref(j)},{default:e.withCtx((()=>[e.renderSlot(l.$slots,"description",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).description),1)]))])),_:3},8,["id"])):e.createCommentVNode("",!0)])),_:3}),e.createVNode(e.unref(v).define,null,{default:e.withCtx((()=>[l.$slots.label||e.unref(b).label||C.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[C.value?(e.openBlock(),e.createBlock(t._sfc_main,e.normalizeProps(e.mergeProps({key:0},g.value)),{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent($.value),{id:e.unref(V),for:e.unref(b).labelFor||null,tabindex:w.value?"-1":null,class:e.normalizeClass(h.value),onClick:a[0]||(a[0]=e=>w.value?N:null)},{default:e.withCtx((()=>[e.renderSlot(l.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).label),1)]))])),_:3},8,["id","for","tabindex","class"]))])),_:3},16)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent($.value),{key:1,id:e.unref(V),for:e.unref(b).labelFor||null,tabindex:w.value?"-1":null,class:e.normalizeClass(h.value),onClick:a[1]||(a[1]=e=>w.value?N:null)},{default:e.withCtx((()=>[e.renderSlot(l.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).label),1)]))])),_:3},8,["id","for","tabindex","class"]))],64)):e.createCommentVNode("",!0)])),_:3}),C.value?(e.openBlock(),e.createBlock(o._sfc_main$1,{key:0},{default:e.withCtx((()=>[e.createVNode(e.unref(v).reuse),e.createVNode(t._sfc_main,e.mergeProps(y.value,{ref_key:"content",ref:_}),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"default",{id:e.unref(F),ariaDescribedby:null,descriptionId:e.unref(j),labelId:e.unref(V)}),e.createVNode(e.unref(p).reuse)])),_:3},16)])),_:3})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(v).reuse),!C.value&&e.unref(b).floating?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:_,class:"form-floating"},[e.renderSlot(l.$slots,"default",{id:e.unref(F),ariaDescribedby:null,descriptionId:e.unref(j),labelId:e.unref(V)}),e.createVNode(e.unref(p).reuse)],512)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(l.$slots,"default",{id:e.unref(F),ariaDescribedby:null,descriptionId:e.unref(j),labelId:e.unref(V)}),e.createVNode(e.unref(p).reuse)],64))],64))])),_:3},8,["id","disabled","role","aria-invalid","aria-labelledby","class"]))}});exports._sfc_main=c;
2
+ //# sourceMappingURL=BFormGroup.vue_vue_type_script_setup_true_lang-DAyEVpcH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BFormGroup.vue_vue_type_script_setup_true_lang-DAyEVpcH.js","sources":["../src/utils/props.ts","../src/components/BFormGroup/BFormGroup.vue"],"sourcesContent":["// Suffix can be a falsey value so nothing is appended to string\n// (helps when looping over props & some shouldn't change)\n\nimport {upperFirst} from './stringUtils'\n\n/**\n * Use data last parameters to allow for currying\n *\n * @param suffix\n * @param value\n * @returns\n */\nexport const suffixPropName = (suffix: string, value: string): string =>\n value + (suffix ? upperFirst(suffix) : '')\n","<template>\n <component\n :is=\"isFieldset ? 'fieldset' : 'div'\"\n :id=\"computedId\"\n :disabled=\"isFieldset ? props.disabled : null\"\n :role=\"isFieldset ? null : 'group'\"\n :aria-invalid=\"computedAriaInvalid\"\n :aria-labelledby=\"isFieldset && isHorizontal ? labelId : null\"\n :class=\"[stateClass, {'was-validated': props.validated}]\"\n >\n <ContentTemplate.define>\n <BFormInvalidFeedback\n v-if=\"$slots.invalidFeedback || props.invalidFeedback\"\n :id=\"invalidFeedbackId\"\n :aria-live=\"props.feedbackAriaLive\"\n :state=\"props.state\"\n :tooltip=\"props.tooltip\"\n >\n <slot name=\"invalid-feedback\">{{ props.invalidFeedback }}</slot>\n </BFormInvalidFeedback>\n <BFormValidFeedback\n v-if=\"$slots.validFeedback || props.validFeedback\"\n :id=\"validFeedbackId\"\n :aria-live=\"props.feedbackAriaLive\"\n :state=\"props.state\"\n :tooltip=\"props.tooltip\"\n >\n <slot name=\"valid-feedback\">{{ props.validFeedback }}</slot>\n </BFormValidFeedback>\n <BFormText v-if=\"$slots.description || props.description\" :id=\"descriptionId\">\n <slot name=\"description\">{{ props.description }}</slot>\n </BFormText>\n </ContentTemplate.define>\n <LabelContentTemplate.define>\n <template v-if=\"$slots.label || props.label || isHorizontal\">\n <BCol v-if=\"isHorizontal\" v-bind=\"labelColProps\">\n <component\n :is=\"labelTag\"\n :id=\"labelId\"\n :for=\"props.labelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"labelClasses\"\n @click=\"isFieldset ? onLegendClick : null\"\n >\n <slot name=\"label\">{{ props.label }}</slot>\n </component>\n </BCol>\n <component\n :is=\"labelTag\"\n v-else\n :id=\"labelId\"\n :for=\"props.labelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"labelClasses\"\n @click=\"isFieldset ? onLegendClick : null\"\n >\n <slot name=\"label\">{{ props.label }}</slot>\n </component>\n </template>\n </LabelContentTemplate.define>\n <BFormRow v-if=\"isHorizontal\">\n <LabelContentTemplate.reuse />\n <BCol v-bind=\"contentColProps\" ref=\"content\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"null\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <ContentTemplate.reuse />\n </BCol>\n </BFormRow>\n <template v-else>\n <LabelContentTemplate.reuse />\n <div v-if=\"!isHorizontal && props.floating\" ref=\"content\" class=\"form-floating\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"null\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <ContentTemplate.reuse />\n </div>\n <template v-else>\n <slot\n :id=\"computedId\"\n :aria-describedby=\"null\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <ContentTemplate.reuse />\n </template>\n </template>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, ref} from 'vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {attemptFocus, isVisible} from '../../utils/dom'\nimport BCol from '../BContainer/BCol.vue'\nimport BFormInvalidFeedback from '../BForm/BFormInvalidFeedback.vue'\nimport BFormRow from '../BForm/BFormRow.vue'\nimport BFormText from '../BForm/BFormText.vue'\nimport BFormValidFeedback from '../BForm/BFormValidFeedback.vue'\nimport {suffixPropName} from '../../utils/props'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useId} from '../../composables/useId'\nimport {createReusableTemplate} from '@vueuse/core'\nimport type {BFormGroupProps} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst INPUTS = ['input', 'select', 'textarea']\n\nconst _props = withDefaults(defineProps<BFormGroupProps>(), {\n ariaInvalid: undefined,\n contentCols: undefined,\n contentColsLg: undefined,\n contentColsMd: undefined,\n contentColsSm: undefined,\n contentColsXl: undefined,\n description: undefined,\n disabled: false,\n feedbackAriaLive: 'assertive',\n floating: false,\n id: undefined,\n invalidFeedback: undefined,\n label: undefined,\n labelAlign: undefined,\n labelAlignLg: undefined,\n labelAlignMd: undefined,\n labelAlignSm: undefined,\n labelAlignXl: undefined,\n labelClass: undefined,\n labelCols: undefined,\n labelColsLg: undefined,\n labelColsMd: undefined,\n labelColsSm: undefined,\n labelColsXl: undefined,\n labelFor: undefined,\n labelSize: undefined,\n labelVisuallyHidden: false,\n state: null,\n tooltip: false,\n validFeedback: undefined,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormGroup')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'invalid-feedback'?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'valid-feedback'?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'description'?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'label'?: (props: Record<string, never>) => any\n 'default'?: (props: {\n 'id': string\n 'ariaDescribedby': string | null\n 'descriptionId': string | undefined\n 'label-id': string | null\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n}>()\n\nconst LabelContentTemplate = createReusableTemplate()\nconst ContentTemplate = createReusableTemplate()\n\nconst breakPoints = ['xs', 'sm', 'md', 'lg', 'xl']\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst getColProps = (props: any, prefix: string) =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n breakPoints.reduce((result: any, breakpoint: string) => {\n const suffix = suffixPropName(breakpoint === 'xs' ? '' : breakpoint, `${prefix}Cols`)\n let propValue = props[suffix]\n propValue = propValue === '' ? true : propValue || false\n\n if (!(typeof propValue === 'boolean') && propValue !== 'auto') {\n const val = Number.parseInt(propValue)\n propValue = Number.isNaN(val) ? 0 : val\n propValue = propValue > 0 ? propValue : false\n }\n\n if (propValue) {\n if (breakpoint === 'xs') {\n result[typeof propValue === 'boolean' ? 'col' : 'cols'] = propValue\n } else {\n result[breakpoint || (typeof propValue === 'boolean' ? 'col' : 'cols')] = propValue\n }\n }\n return result\n }, {})\n\nconst content = ref<HTMLElement | null>(null)\n\nconst contentColProps = computed(() => getColProps(props, 'content'))\nconst labelAlignClasses = computed(() =>\n ((props: BFormGroupProps, prefix: string) =>\n breakPoints.reduce((result: string[], breakpoint) => {\n const suffix = suffixPropName(\n breakpoint === 'xs' ? '' : breakpoint,\n `${prefix}Align`\n ) as keyof BFormGroupProps\n const propValue: string = props[suffix] || null\n if (propValue) {\n breakpoint === 'xs'\n ? result.push(`text-${propValue}`)\n : result.push(`text-${breakpoint}-${propValue}`)\n }\n return result\n }, []))(props, 'label')\n)\nconst labelColProps = computed(() => getColProps(props, 'label'))\nconst isHorizontal = computed(\n () => Object.keys(contentColProps.value).length > 0 || Object.keys(labelColProps.value).length > 0\n)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst onLegendClick = (event: Readonly<MouseEvent>) => {\n if (props.labelFor || content.value === null) return\n\n const {target} = event\n const tagName = target ? (target as HTMLElement).tagName : ''\n\n if ([...INPUTS, 'a', 'button', 'label'].indexOf(tagName) !== -1) return\n\n const inputs = [\n ...content.value.querySelectorAll(INPUTS.map((v) => `${v}:not([disabled])`).join()),\n ].filter(isVisible)\n const [inp] = inputs\n if (inputs.length === 1 && inp instanceof HTMLElement) {\n attemptFocus(inp)\n }\n}\n\nconst computedId = useId(() => props.id)\nconst labelId = useId(undefined, '_BV_label_')\nconst labelTag = computed(() => (!props.labelFor ? 'legend' : 'label'))\nconst labelClasses = computed(() => [\n isHorizontal.value ? 'col-form-label' : 'form-label',\n {\n 'bv-no-focus-ring': !props.labelFor,\n 'col-form-label': isHorizontal.value || !props.labelFor,\n 'pt-0': !isHorizontal.value && !props.labelFor,\n 'd-block': !isHorizontal.value && props.labelFor,\n [`col-form-label-${props.labelSize}`]: !!props.labelSize,\n 'visually-hidden': props.labelVisuallyHidden,\n },\n labelAlignClasses.value,\n props.labelClass,\n])\n\nconst invalidFeedbackId = useId(undefined, '_BV_feedback_invalid_')\n\nconst validFeedbackId = useId(undefined, '_BV_feedback_valid_')\nconst descriptionId = useId(undefined, '_BV_description_')\n\nconst isFieldset = computed(() => !props.labelFor)\n</script>\n"],"names":["suffixPropName","suffix","value","upperFirst","INPUTS","_props","__props","props","useDefaults","LabelContentTemplate","createReusableTemplate","ContentTemplate","breakPoints","getColProps","prefix","reduce","result","breakpoint","propValue","val","Number","parseInt","isNaN","content","ref","contentColProps","computed","labelAlignClasses","push","labelColProps","isHorizontal","Object","keys","length","stateClass","useStateClass","state","computedAriaInvalid","useAriaInvalid","ariaInvalid","onLegendClick","event","labelFor","target","tagName","indexOf","inputs","querySelectorAll","map","v","join","filter","isVisible","inp","HTMLElement","attemptFocus","computedId","useId","id","labelId","labelTag","labelClasses","labelSize","labelVisuallyHidden","labelClass","invalidFeedbackId","validFeedbackId","descriptionId","isFieldset"],"mappings":"4bAYaA,EAAiB,CAACC,EAAgBC,IAC7CA,GAASD,EAASE,EAAAA,WAAWF,GAAU,kzCCmGzC,MAAMG,EAAS,CAAC,QAAS,SAAU,YAE7BC,EAASC,EAiCTC,EAAQC,EAAAA,YAAYH,EAAQ,cAoB5BI,EAAuBC,EAAAA,yBACvBC,EAAkBD,EAAAA,yBAElBE,EAAc,CAAC,KAAM,KAAM,KAAM,KAAM,MAGvCC,EAAc,CAACN,EAAYO,IAE/BF,EAAYG,QAAO,CAACC,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AA6D,IAA7D,IAAIxC,EAAQ,IAAK,SAAU,SAASyC,QAAQD,GAAiB,OAEjE,MAAME,EAAS,IACVvB,EAAQrB,MAAM6C,iBAAiB3C,EAAO4C,KAAKC,GAAM,GAAGA,sBAAqBC,SAC5EC,OAAOC,EAAAA,YACFC,GAAOP,EACQ,IAAlBA,EAAOb,QAAgBoB,aAAeC,aACxCC,EAAAA,aAAaF,EACf,EAGIG,EAAaC,EAAAA,OAAM,IAAMlD,EAAMmD,KAC/BC,EAAUF,EAAMA,WAAA,EAAW,cAC3BG,EAAWlC,EAAAA,UAAS,IAAQnB,EAAMmC,SAAsB,QAAX,WAC7CmB,EAAenC,EAAAA,UAAS,IAAM,CAClCI,EAAa5B,MAAQ,iBAAmB,aACxC,CACE,oBAAqBK,EAAMmC,SAC3B,iBAAkBZ,EAAa5B,QAAUK,EAAMmC,SAC/C,QAASZ,EAAa5B,QAAUK,EAAMmC,SACtC,WAAYZ,EAAa5B,OAASK,EAAMmC,SACxC,CAAC,kBAAkBnC,EAAMuD,eAAgBvD,EAAMuD,UAC/C,kBAAmBvD,EAAMwD,qBAE3BpC,EAAkBzB,MAClBK,EAAMyD,cAGFC,EAAoBR,EAAMA,WAAA,EAAW,yBAErCS,EAAkBT,EAAMA,WAAA,EAAW,uBACnCU,EAAgBV,EAAMA,WAAA,EAAW,oBAEjCW,EAAa1C,EAAAA,UAAS,KAAOnB,EAAMmC"}
@@ -223,7 +223,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
223
223
  ]),
224
224
  _: 3
225
225
  }),
226
- isHorizontal.value && !isFieldset.value ? (openBlock(), createBlock(_sfc_main$5, { key: 0 }, {
226
+ isHorizontal.value ? (openBlock(), createBlock(_sfc_main$5, { key: 0 }, {
227
227
  default: withCtx(() => [
228
228
  createVNode(unref(LabelContentTemplate).reuse),
229
229
  createVNode(_sfc_main$4, mergeProps(contentColProps.value, {
@@ -277,4 +277,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
277
277
  export {
278
278
  _sfc_main as _
279
279
  };
280
- //# sourceMappingURL=BFormGroup.vue_vue_type_script_setup_true_lang-CbhlDyNx.mjs.map
280
+ //# sourceMappingURL=BFormGroup.vue_vue_type_script_setup_true_lang-DMeTU5tW.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BFormGroup.vue_vue_type_script_setup_true_lang-DMeTU5tW.mjs","sources":["../src/utils/props.ts","../src/components/BFormGroup/BFormGroup.vue"],"sourcesContent":["// Suffix can be a falsey value so nothing is appended to string\n// (helps when looping over props & some shouldn't change)\n\nimport {upperFirst} from './stringUtils'\n\n/**\n * Use data last parameters to allow for currying\n *\n * @param suffix\n * @param value\n * @returns\n */\nexport const suffixPropName = (suffix: string, value: string): string =>\n value + (suffix ? upperFirst(suffix) : '')\n","<template>\n <component\n :is=\"isFieldset ? 'fieldset' : 'div'\"\n :id=\"computedId\"\n :disabled=\"isFieldset ? props.disabled : null\"\n :role=\"isFieldset ? null : 'group'\"\n :aria-invalid=\"computedAriaInvalid\"\n :aria-labelledby=\"isFieldset && isHorizontal ? labelId : null\"\n :class=\"[stateClass, {'was-validated': props.validated}]\"\n >\n <ContentTemplate.define>\n <BFormInvalidFeedback\n v-if=\"$slots.invalidFeedback || props.invalidFeedback\"\n :id=\"invalidFeedbackId\"\n :aria-live=\"props.feedbackAriaLive\"\n :state=\"props.state\"\n :tooltip=\"props.tooltip\"\n >\n <slot name=\"invalid-feedback\">{{ props.invalidFeedback }}</slot>\n </BFormInvalidFeedback>\n <BFormValidFeedback\n v-if=\"$slots.validFeedback || props.validFeedback\"\n :id=\"validFeedbackId\"\n :aria-live=\"props.feedbackAriaLive\"\n :state=\"props.state\"\n :tooltip=\"props.tooltip\"\n >\n <slot name=\"valid-feedback\">{{ props.validFeedback }}</slot>\n </BFormValidFeedback>\n <BFormText v-if=\"$slots.description || props.description\" :id=\"descriptionId\">\n <slot name=\"description\">{{ props.description }}</slot>\n </BFormText>\n </ContentTemplate.define>\n <LabelContentTemplate.define>\n <template v-if=\"$slots.label || props.label || isHorizontal\">\n <BCol v-if=\"isHorizontal\" v-bind=\"labelColProps\">\n <component\n :is=\"labelTag\"\n :id=\"labelId\"\n :for=\"props.labelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"labelClasses\"\n @click=\"isFieldset ? onLegendClick : null\"\n >\n <slot name=\"label\">{{ props.label }}</slot>\n </component>\n </BCol>\n <component\n :is=\"labelTag\"\n v-else\n :id=\"labelId\"\n :for=\"props.labelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"labelClasses\"\n @click=\"isFieldset ? onLegendClick : null\"\n >\n <slot name=\"label\">{{ props.label }}</slot>\n </component>\n </template>\n </LabelContentTemplate.define>\n <BFormRow v-if=\"isHorizontal\">\n <LabelContentTemplate.reuse />\n <BCol v-bind=\"contentColProps\" ref=\"content\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"null\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <ContentTemplate.reuse />\n </BCol>\n </BFormRow>\n <template v-else>\n <LabelContentTemplate.reuse />\n <div v-if=\"!isHorizontal && props.floating\" ref=\"content\" class=\"form-floating\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"null\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <ContentTemplate.reuse />\n </div>\n <template v-else>\n <slot\n :id=\"computedId\"\n :aria-describedby=\"null\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <ContentTemplate.reuse />\n </template>\n </template>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, ref} from 'vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {attemptFocus, isVisible} from '../../utils/dom'\nimport BCol from '../BContainer/BCol.vue'\nimport BFormInvalidFeedback from '../BForm/BFormInvalidFeedback.vue'\nimport BFormRow from '../BForm/BFormRow.vue'\nimport BFormText from '../BForm/BFormText.vue'\nimport BFormValidFeedback from '../BForm/BFormValidFeedback.vue'\nimport {suffixPropName} from '../../utils/props'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useId} from '../../composables/useId'\nimport {createReusableTemplate} from '@vueuse/core'\nimport type {BFormGroupProps} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst INPUTS = ['input', 'select', 'textarea']\n\nconst _props = withDefaults(defineProps<BFormGroupProps>(), {\n ariaInvalid: undefined,\n contentCols: undefined,\n contentColsLg: undefined,\n contentColsMd: undefined,\n contentColsSm: undefined,\n contentColsXl: undefined,\n description: undefined,\n disabled: false,\n feedbackAriaLive: 'assertive',\n floating: false,\n id: undefined,\n invalidFeedback: undefined,\n label: undefined,\n labelAlign: undefined,\n labelAlignLg: undefined,\n labelAlignMd: undefined,\n labelAlignSm: undefined,\n labelAlignXl: undefined,\n labelClass: undefined,\n labelCols: undefined,\n labelColsLg: undefined,\n labelColsMd: undefined,\n labelColsSm: undefined,\n labelColsXl: undefined,\n labelFor: undefined,\n labelSize: undefined,\n labelVisuallyHidden: false,\n state: null,\n tooltip: false,\n validFeedback: undefined,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormGroup')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'invalid-feedback'?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'valid-feedback'?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'description'?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'label'?: (props: Record<string, never>) => any\n 'default'?: (props: {\n 'id': string\n 'ariaDescribedby': string | null\n 'descriptionId': string | undefined\n 'label-id': string | null\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n}>()\n\nconst LabelContentTemplate = createReusableTemplate()\nconst ContentTemplate = createReusableTemplate()\n\nconst breakPoints = ['xs', 'sm', 'md', 'lg', 'xl']\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst getColProps = (props: any, prefix: string) =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n breakPoints.reduce((result: any, breakpoint: string) => {\n const suffix = suffixPropName(breakpoint === 'xs' ? '' : breakpoint, `${prefix}Cols`)\n let propValue = props[suffix]\n propValue = propValue === '' ? true : propValue || false\n\n if (!(typeof propValue === 'boolean') && propValue !== 'auto') {\n const val = Number.parseInt(propValue)\n propValue = Number.isNaN(val) ? 0 : val\n propValue = propValue > 0 ? propValue : false\n }\n\n if (propValue) {\n if (breakpoint === 'xs') {\n result[typeof propValue === 'boolean' ? 'col' : 'cols'] = propValue\n } else {\n result[breakpoint || (typeof propValue === 'boolean' ? 'col' : 'cols')] = propValue\n }\n }\n return result\n }, {})\n\nconst content = ref<HTMLElement | null>(null)\n\nconst contentColProps = computed(() => getColProps(props, 'content'))\nconst labelAlignClasses = computed(() =>\n ((props: BFormGroupProps, prefix: string) =>\n breakPoints.reduce((result: string[], breakpoint) => {\n const suffix = suffixPropName(\n breakpoint === 'xs' ? '' : breakpoint,\n `${prefix}Align`\n ) as keyof BFormGroupProps\n const propValue: string = props[suffix] || null\n if (propValue) {\n breakpoint === 'xs'\n ? result.push(`text-${propValue}`)\n : result.push(`text-${breakpoint}-${propValue}`)\n }\n return result\n }, []))(props, 'label')\n)\nconst labelColProps = computed(() => getColProps(props, 'label'))\nconst isHorizontal = computed(\n () => Object.keys(contentColProps.value).length > 0 || Object.keys(labelColProps.value).length > 0\n)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst onLegendClick = (event: Readonly<MouseEvent>) => {\n if (props.labelFor || content.value === null) return\n\n const {target} = event\n const tagName = target ? (target as HTMLElement).tagName : ''\n\n if ([...INPUTS, 'a', 'button', 'label'].indexOf(tagName) !== -1) return\n\n const inputs = [\n ...content.value.querySelectorAll(INPUTS.map((v) => `${v}:not([disabled])`).join()),\n ].filter(isVisible)\n const [inp] = inputs\n if (inputs.length === 1 && inp instanceof HTMLElement) {\n attemptFocus(inp)\n }\n}\n\nconst computedId = useId(() => props.id)\nconst labelId = useId(undefined, '_BV_label_')\nconst labelTag = computed(() => (!props.labelFor ? 'legend' : 'label'))\nconst labelClasses = computed(() => [\n isHorizontal.value ? 'col-form-label' : 'form-label',\n {\n 'bv-no-focus-ring': !props.labelFor,\n 'col-form-label': isHorizontal.value || !props.labelFor,\n 'pt-0': !isHorizontal.value && !props.labelFor,\n 'd-block': !isHorizontal.value && props.labelFor,\n [`col-form-label-${props.labelSize}`]: !!props.labelSize,\n 'visually-hidden': props.labelVisuallyHidden,\n },\n labelAlignClasses.value,\n props.labelClass,\n])\n\nconst invalidFeedbackId = useId(undefined, '_BV_feedback_invalid_')\n\nconst validFeedbackId = useId(undefined, '_BV_feedback_valid_')\nconst descriptionId = useId(undefined, '_BV_description_')\n\nconst isFieldset = computed(() => !props.labelFor)\n</script>\n"],"names":["props"],"mappings":";;;;;;;;;;AAYa,MAAA,iBAAiB,CAAC,QAAgB,UAC7C,SAAS,SAAS,WAAW,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmGzC,UAAM,SAAS,CAAC,SAAS,UAAU,UAAU;AAE7C,UAAM,SAAS;AAiCT,UAAA,QAAQ,YAAY,QAAQ,YAAY;AAoB9C,UAAM,uBAAuB;AAC7B,UAAM,kBAAkB;AAExB,UAAM,cAAc,CAAC,MAAM,MAAM,MAAM,MAAM,IAAI;AAG3C,UAAA,cAAc,CAACA,QAAY;AAAA;AAAA,MAE/B,YAAY,OAAO,CAAC,QAAa,eAAuB;AAChD,cAAA,SAAS,eAAe,eAAe,OAAO,KAAK,YAAY,GAAG,MAAM,MAAM;AAChF,YAAA,YAAYA,OAAM,MAAM;AAChB,oBAAA,cAAc,KAAK,OAAO,aAAa;AAEnD,YAAI,EAAE,OAAO,cAAc,cAAc,cAAc,QAAQ;AACvD,gBAAA,MAAM,OAAO,SAAS,SAAS;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, unref, ref, watch, createBlock, withCtx, withDirectives, createVNode, Fragment, renderList, mergeProps, createTextVNode, toDisplayString, createCommentVNode, vShow, createElementVNode, mergeModels, useSlots, useModel, onMounted, createSlots, normalizeProps } from "vue";
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, unref, ref, watch, createBlock, withCtx, withDirectives, createVNode, Fragment, renderList, mergeProps, createTextVNode, toDisplayString, createCommentVNode, vShow, normalizeProps, createElementVNode, mergeModels, useSlots, useModel, onMounted, createSlots } from "vue";
2
2
  import { g as get, s as set } from "./object-DIbMZaP9.mjs";
3
3
  import { _ as _sfc_main$8 } from "./BTableSimple.vue_vue_type_script_setup_true_lang-BHwMXn1g.mjs";
4
4
  import { u as useDefaults } from "./useDefaults-6tLPt05C.mjs";
@@ -310,6 +310,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
310
310
  return false;
311
311
  return true;
312
312
  });
313
+ const footerProps = computed(() => ({
314
+ variant: props.footVariant,
315
+ class: props.tfootClass
316
+ }));
313
317
  const itemAttributes = (item, fieldKey, attr) => {
314
318
  const val = get(item, fieldKey);
315
319
  return attr && typeof attr === "function" ? attr(val, fieldKey, item) : attr;
@@ -577,11 +581,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
577
581
  ]),
578
582
  _: 3
579
583
  }, 8, ["class"]),
580
- unref(props).footClone ? (openBlock(), createBlock(_sfc_main$5, {
581
- key: 0,
582
- variant: unref(props).footVariant,
583
- class: normalizeClass(unref(props).tfootClass)
584
- }, {
584
+ unref(props).footClone ? (openBlock(), createBlock(_sfc_main$5, normalizeProps(mergeProps({ key: 0 }, footerProps.value)), {
585
585
  default: withCtx(() => [
586
586
  createVNode(_sfc_main$2, {
587
587
  variant: unref(props).footRowVariant,
@@ -628,7 +628,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
628
628
  }, 8, ["variant", "class"])
629
629
  ]),
630
630
  _: 3
631
- }, 8, ["variant", "class"])) : _ctx.$slots["custom-foot"] ? (openBlock(), createBlock(_sfc_main$5, { key: 1 }, {
631
+ }, 16)) : _ctx.$slots["custom-foot"] ? (openBlock(), createBlock(_sfc_main$5, normalizeProps(mergeProps({ key: 1 }, footerProps.value)), {
632
632
  default: withCtx(() => [
633
633
  renderSlot(_ctx.$slots, "custom-foot", {
634
634
  fields: computedFields.value,
@@ -637,7 +637,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
637
637
  })
638
638
  ]),
639
639
  _: 3
640
- })) : createCommentVNode("", true),
640
+ }, 16)) : createCommentVNode("", true),
641
641
  _ctx.$slots["table-caption"] || unref(props).caption ? (openBlock(), createElementBlock("caption", _hoisted_3$1, [
642
642
  renderSlot(_ctx.$slots, "table-caption", {}, () => [
643
643
  createTextVNode(toDisplayString(unref(props).caption), 1)
@@ -753,6 +753,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
753
753
  const dynamicCellSlots = computed(
754
754
  () => Object.keys(slots).filter((key) => key.startsWith("cell("))
755
755
  );
756
+ const dynamicFootSlots = computed(
757
+ () => Object.keys(slots).filter((key) => key.startsWith("foot("))
758
+ );
756
759
  const sortByModel = useModel(__props, "sortBy");
757
760
  const busyModel = useModel(__props, "busy");
758
761
  const selectedItemsModel = useModel(
@@ -1286,6 +1289,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1286
1289
  ])
1287
1290
  };
1288
1291
  }),
1292
+ renderList(dynamicFootSlots.value, (name) => {
1293
+ return {
1294
+ name,
1295
+ fn: withCtx((scope) => [
1296
+ renderSlot(_ctx.$slots, name, mergeProps(scope, {
1297
+ selectAllRows: exposedSelectableUtilities.selectAllRows,
1298
+ clearSelected: exposedSelectableUtilities.clearSelected
1299
+ }))
1300
+ ])
1301
+ };
1302
+ }),
1289
1303
  renderList(computedFields.value, (field) => {
1290
1304
  return {
1291
1305
  name: `head(${String(field.key)})`,
@@ -1376,4 +1390,4 @@ export {
1376
1390
  _sfc_main$3 as f,
1377
1391
  _sfc_main$2 as g
1378
1392
  };
1379
- //# sourceMappingURL=BTable.vue_vue_type_script_setup_true_lang-CumrgwnT.mjs.map
1393
+ //# sourceMappingURL=BTable.vue_vue_type_script_setup_true_lang-DPbNjtGg.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BTable.vue_vue_type_script_setup_true_lang-DPbNjtGg.mjs","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/getTableFieldHeadLabel.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'\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","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\n :id=\"props.id\"\n :bordered=\"props.bordered\"\n :borderless=\"props.borderless\"\n :border-variant=\"props.borderVariant\"\n :caption-top=\"props.captionTop\"\n :dark=\"props.dark\"\n :fixed=\"props.fixed\"\n :hover=\"props.hover\"\n :no-border-collapse=\"props.noBorderCollapse\"\n :outlined=\"props.outlined\"\n :responsive=\"props.responsive\"\n :small=\"props.small\"\n :stacked=\"props.stacked\"\n :sticky-header=\"props.stickyHeader\"\n :striped=\"props.striped\"\n :table-class=\"computedTableClasses\"\n :variant=\"props.variant\"\n :striped-columns=\"props.stripedColumns\"\n >\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=\"props.primaryKey ? get(item, props.primaryKey) : itemIndex\"\n >\n <BTr\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} from '../../utils/object'\nimport {getTableFieldHeadLabel} from '../../utils/getTableFieldHeadLabel'\nimport {formatItem} from '../../utils/formatItem'\nimport {filterEvent} from '../../utils/filterEvent'\nimport {startCase} from '../../utils/stringUtils'\nimport type {LiteralUnion} from '../../types/LiteralUnion'\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 captionHtml: 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\ndefineSlots<{\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 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</script>\n","<template>\n <!-- eslint-disable prettier/prettier -->\n <BTableLite\n v-bind=\"props\"\n :aria-busy=\"busyModel\"\n :items=\"computedDisplayItems\"\n :fields=\"computedFields as TableFieldRaw<Items>[]\"\n :table-class=\"tableClasses\"\n :tbody-tr-class=\"getRowClasses\"\n :field-column-class=\"getFieldColumnClasses\"\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, set} from '../../utils/object'\nimport {startCase} from '../../utils/stringUtils'\nimport {getTableFieldHeadLabel} from '../../utils/getTableFieldHeadLabel'\nimport type {LiteralUnion} from '../../types/LiteralUnion'\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 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 captionHtml: 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 // eslint-disable-next-line @typescript-eslint/no-explicit-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 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 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 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) 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 selectedItemsSetUtilities.add(item)\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\ndefineExpose({\n // The row selection methods are really for compat. Users should probably use the v-model though\n ...exposedSelectableUtilities,\n refresh: callItemsProvider,\n})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;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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-ph_fYlOS.js"),o=require("./useDefaults-DA3S59IE.js"),a=require("./stringUtils-D2ajpVM0.js"),r=require("./index-BthPTI3K.js"),n=(e,l,o)=>{const a=t.get(e,l);return o&&"function"==typeof o?o(a,l,e):a},s=e=>"object"==typeof e&&null!==e,d=e=>"object"==typeof e&&null!==e&&"key"in e,i=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))}}),u=["scope","colspan","rowspan","data-label"],c={key:0},f=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",c,[e.renderSlot(t.$slots,"default")])):e.renderSlot(t.$slots,"default",{key:1})],10,u))}}),v=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))}}),p=["scope","colspan","rowspan","data-label"],m={key:0},y=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",m,[e.renderSlot(t.$slots,"default")])):e.renderSlot(t.$slots,"default",{key:1})],10,p))}}),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))}}),b=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))}}),g=e=>"string"==typeof e?a.titleCase(e):void 0!==e.label?e.label:"string"==typeof e.key?a.titleCase(e.key):e.key,w=["TD","TH","TR"],h=["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(","),C=e=>{if(!e||!e.target)return!1;const t=e.target;if("disabled"in t&&t.disabled||-1!==w.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(h)},B={key:0,class:"b-table-stacked-label"},S={class:"d-inline-flex flex-nowrap align-items-center gap-1"},x={key:2},$=e.defineComponent({__name:"BTableLite",props:{align:{default:void 0},caption:{default:void 0},captionHtml:{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(r,{emit:u}){const c=r,p=o.useDefaults(c,"BTableLite"),m=u,w=e.ref(new WeakMap);e.watch((()=>p.items),(e=>{e.forEach((e=>{s(e)&&w.value.set(...(e=>[e,e._showDetails])(e))}))}),{deep:!0,immediate:!0});const h=e.computed((()=>[p.tableClass,{[`align-${p.align}`]:void 0!==p.align}])),$=e.computed((()=>{if(!p.fields.length&&p.items.length){const[e]=p.items;return s(e)||Array.isArray(e)?Object.keys(e).map((e=>{const t=a.startCase(e);return{key:e,label:t,tdAttr:!0===p.stacked?{"data-label":t}:void 0}})):[{key:"",_noHeader:!0}]}return p.fields.map((e=>{if(d(e))return{...e,tdAttr:!0===p.stacked?{"data-label":a.startCase(e.key),...e.tdAttr}:e.tdAttr};const t=a.startCase(e);return{key:e,label:t,tdAttr:!0===p.stacked?{"data-label":t}:void 0}}))})),T=e.computed((()=>$.value.length)),_=e.computed((()=>!(T.value>0&&$.value.every((e=>!0===e._noHeader))))),V=e.computed((()=>({variant:p.footVariant,class:p.tfootClass}))),P=(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},N=(e,t,l=!1)=>{m("head-clicked",e.key,e,t,l)},A=e=>{if(s(e)){const t=w.value.get(e);w.value.set(e,!t),e._showDetails=!t}},E=e=>[e.class,e.thClass,{"b-table-sticky-column":e.stickyColumn},p.fieldColumnClass?"function"==typeof p.fieldColumnClass?p.fieldColumnClass(e):p.fieldColumnClass:null],D=(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,s(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}]},R=(e,t)=>p.tbodyTrAttrs?"function"==typeof p.tbodyTrAttrs?p.tbodyTrAttrs(e,t):p.tbodyTrAttrs:null,F=(e,t)=>p.tbodyTrClass?"function"==typeof p.tbodyTrClass?p.tbodyTrClass(e,t):p.tbodyTrClass:null;return(o,a)=>(e.openBlock(),e.createBlock(l._sfc_main,{id:e.unref(p).id,bordered:e.unref(p).bordered,borderless:e.unref(p).borderless,"border-variant":e.unref(p).borderVariant,"caption-top":e.unref(p).captionTop,dark:e.unref(p).dark,fixed:e.unref(p).fixed,hover:e.unref(p).hover,"no-border-collapse":e.unref(p).noBorderCollapse,outlined:e.unref(p).outlined,responsive:e.unref(p).responsive,small:e.unref(p).small,stacked:e.unref(p).stacked,"sticky-header":e.unref(p).stickyHeader,striped:e.unref(p).striped,"table-class":h.value,variant:e.unref(p).variant,"striped-columns":e.unref(p).stripedColumns},{default:e.withCtx((()=>[e.withDirectives(e.createVNode(k,{variant:e.unref(p).headVariant,class:e.normalizeClass(e.unref(p).theadClass)},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"thead-top",{columns:T.value,fields:$.value}),e.createVNode(b,{variant:e.unref(p).headRowVariant,class:e.normalizeClass(e.unref(p).theadTrClass)},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(t=>(e.openBlock(),e.createBlock(y,e.mergeProps({key:t.key,scope:"col",class:E(t),title:t.headerTitle,variant:t.variant,abbr:t.headerAbbr,style:t.thStyle,ref_for:!0},P(null,t,"top"),{onClick:e=>N(t,e)}),{default:e.withCtx((()=>[e.renderSlot(o.$slots,o.$slots[`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(g)(t)),1)]))])),_:2},1040,["class","title","variant","abbr","style","onClick"])))),128))])),_:3},8,["variant","class"]),o.$slots["thead-sub"]?(e.openBlock(),e.createBlock(b,{key:0},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(t=>(e.openBlock(),e.createBlock(f,{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(p).items,fields:$.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,_.value]]),e.createVNode(i,{class:e.normalizeClass(e.unref(p).tbodyClass)},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"custom-body",{fields:$.value,items:e.unref(p).items,columns:T.value},(()=>[!e.unref(p).stacked&&o.$slots["top-row"]?(e.openBlock(),e.createBlock(b,e.mergeProps({key:0,class:F(null,"row-top")},R(null,"row-top")),{default:e.withCtx((()=>[e.renderSlot(o.$slots,"top-row",{columns:T.value,fields:$.value})])),_:3},16,["class"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p).items,((l,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:e.unref(p).primaryKey?e.unref(t.get)(l,e.unref(p).primaryKey):a},[e.createVNode(b,e.mergeProps({class:F(l,"row"),variant:e.unref(s)(l)?l._rowVariant:void 0,ref_for:!0},R(l,"row"),{onClick:t=>!e.unref(C)(t)&&m("row-clicked",l,a,t),onDblclick:t=>!e.unref(C)(t)&&m("row-dblclicked",l,a,t),onContextmenu:t=>!e.unref(C)(t)&&m("row-contextmenu",l,a,t),onMouseenter:t=>!e.unref(C)(t)&&m("row-hovered",l,a,t),onMouseleave:t=>!e.unref(C)(t)&&m("row-unhovered",l,a,t),onMousedown:e=>((e,t,l)=>{1!==l.button||C(l)||m("row-middle-clicked",e,t,l)})(l,a,e)}),{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(r=>{var d;return e.openBlock(),e.createBlock(f,e.mergeProps({key:r.key,variant:e.unref(s)(l)&&(null==(d=l._cellVariants)?void 0:d[r.key])?null:r.variant,class:D(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(p).stacked&&e.unref(p).labelStacked?(e.openBlock(),e.createElementBlock("label",B,e.toDisplayString(e.unref(g)(r)),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,o.$slots[`cell(${String(r.key)})`]?`cell(${String(r.key)})`:"cell()",{value:e.unref(n)(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:()=>A(l),detailsShowing:!!e.unref(s)(l)&&(w.value.get(l)??!1)},(()=>[o.$slots[`cell(${String(r.key)})`]||o.$slots["cell()"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(n)(l,String(r.key),r.formatter)),1)],64))]))])),_:2},1040,["variant","class"])})),128))])),_:2},1040,["class","variant","onClick","onDblclick","onContextmenu","onMouseenter","onMouseleave","onMousedown"]),e.unref(s)(l)&&!0===w.value.get(l)&&o.$slots["row-details"]?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(b,{"aria-hidden":"true",role:"presentation",class:"d-none"}),e.createVNode(b,e.mergeProps({class:F(l,"row-details"),variant:l._rowVariant,ref_for:!0},R(l,"row-details")),{default:e.withCtx((()=>[e.createVNode(f,{colspan:T.value,class:e.normalizeClass(o.detailsTdClass)},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"row-details",{item:l,toggleDetails:()=>A(l),fields:$.value,index:a})])),_:2},1032,["colspan","class"])])),_:2},1040,["class","variant"])],64)):e.createCommentVNode("",!0)],64)))),128)),!e.unref(p).stacked&&o.$slots["bottom-row"]?(e.openBlock(),e.createBlock(b,e.mergeProps({key:1,class:["bottom-row",F(null,"row-bottom")]},R(null,"row-bottom")),{default:e.withCtx((()=>[e.renderSlot(o.$slots,"bottom-row",{columns:T.value,fields:$.value})])),_:3},16,["class"])):e.createCommentVNode("",!0)]))])),_:3},8,["class"]),e.unref(p).footClone?(e.openBlock(),e.createBlock(v,e.normalizeProps(e.mergeProps({key:0},V.value)),{default:e.withCtx((()=>[e.createVNode(b,{variant:e.unref(p).footRowVariant,class:e.normalizeClass(e.unref(p).tfootTrClass)},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(t=>(e.openBlock(),e.createBlock(y,e.mergeProps({key:t.key,scope:"col",class:E(t),title:t.headerTitle,abbr:t.headerAbbr,style:t.thStyle,variant:t.variant,ref_for:!0},P(null,t,"bottom"),{onClick:e=>N(t,e,!0)}),{default:e.withCtx((()=>[e.createElementVNode("div",S,[e.createElementVNode("div",null,[e.renderSlot(o.$slots,o.$slots[`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(g)(t)),1)]))])])])),_:2},1040,["class","title","abbr","style","variant","onClick"])))),128))])),_:3},8,["variant","class"])])),_:3},16)):o.$slots["custom-foot"]?(e.openBlock(),e.createBlock(v,e.normalizeProps(e.mergeProps({key:1},V.value)),{default:e.withCtx((()=>[e.renderSlot(o.$slots,"custom-foot",{fields:$.value,items:e.unref(p).items,columns:T.value})])),_:3},16)):e.createCommentVNode("",!0),o.$slots["table-caption"]||e.unref(p).caption?(e.openBlock(),e.createElementBlock("caption",x,[e.renderSlot(o.$slots,"table-caption",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(p).caption),1)]))])):e.createCommentVNode("",!0)])),_:3},8,["id","bordered","borderless","border-variant","caption-top","dark","fixed","hover","no-border-collapse","outlined","responsive","small","stacked","sticky-header","striped","table-class","variant","striped-columns"]))}}),T={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":""},_={role:"alert","aria-live":"polite"},V={class:"text-center my-2"},P=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},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},captionHtml:{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:i,emit:u}){const c=l,v=o.useDefaults(c,"BTable"),p=u,m=e.useSlots(),y=e.computed((()=>Object.keys(m).filter((e=>e.startsWith("cell("))))),k=e.computed((()=>Object.keys(m).filter((e=>e.startsWith("foot("))))),w=e.useModel(l,"sortBy"),h=e.useModel(l,"busy"),C=e.useModel(l,"selectedItems"),B=e.computed({get:()=>new Set([...C.value]),set:e=>{C.value=[...e]}});e.watch(B,((e,t)=>{Array.from(t).filter((t=>!e.has(t))).forEach((e=>{p("row-unselected",e)})),Array.from(e).filter((e=>!t.has(e))).forEach((e=>{p("row-selected",e)}))}));const S={add:e=>{const t=new Set(B.value);t.add(e),B.value=t},clear:()=>{B.value.forEach((e=>{S.delete(e)}))},delete:e=>{const l=new Set(B.value);if(v.primaryKey){const o=v.primaryKey;C.value.forEach(((a,r)=>{const n=t.get(a,o),s=t.get(e,o);n&&s&&n===s&&l.delete(C.value[r])}))}else l.delete(e);B.value=l},set:e=>{B.value=new Set(e)},has:e=>{if(!v.primaryKey)return B.value.has(e);const l=v.primaryKey;for(const o of B.value){const a=t.get(o,l),r=t.get(e,l);if(a&&r&&a===r)return!0}return!1}},x=e.ref([]),P=r.useToNumber((()=>v.perPage),{method:"parseInt"}),N=r.useToNumber((()=>v.currentPage),{method:"parseInt"}),A=e.computed((()=>!!v.filter)),E=e.computed((()=>void 0!==v.provider)),D=e.computed((()=>B.value.size>0)),R=e.computed((()=>void 0!==w.value||v.fields.some((e=>"object"==typeof e&&null!==e&&!0===e.sortable)))),F=e.computed((()=>v.fields.map((e=>{var t;if(!d(e)){const t=a.startCase(e);return{key:e,label:t,tdAttr:!0===v.stacked?{"data-label":t}:void 0}}const l=null==(t=w.value)?void 0:t.find((t=>e.key===t.key)),o=!1===R.value?void 0:void 0===l?"none":"desc"===l.order?"descending":"asc"===l.order?"ascending":"none";return{...e,thAttr:{"aria-sort":o,...e.thAttr}}})))),j=e.computed((()=>({"b-table-busy":h.value,"b-table-selectable":v.selectable,"user-select-none":v.selectable&&D.value}))),I=e.computed((()=>[v.tbodyTrClass?"function"==typeof v.tbodyTrClass?v.tbodyTrClass(null,"table-busy"):v.tbodyTrClass:null])),M=e=>[{"b-table-sortable-column":R.value&&e.sortable}],z=(e,t)=>[{[`selected table-${v.selectionVariant}`]:v.selectable&&!!e&&S.has(e)},v.tbodyTrClass?"function"==typeof v.tbodyTrClass?v.tbodyTrClass(e,t):v.tbodyTrClass:null],L=e=>"function"==typeof e.sortByFormatted?e.sortByFormatted:e.formatter,O=e.computed((()=>{let e=E.value?x.value:v.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===A.value&&!E.value||!0===A.value&&E.value&&v.noProviderFiltering)&&(e=e.filter((e=>!s(e)||Object.entries(e).some((([t,l])=>{var o,a,r;return!(null==l||"_"===t[0]||!(null==(o=v.filterable)?void 0:o.includes(t))&&(null==(a=v.filterable)?void 0:a.length))&&(()=>{const o=F.value.find((e=>!!d(e)&&e.key===t));if(d(o)&&o.filterByFormatted){const t=L(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=v.filter)?void 0:r.toLowerCase())??"")}))))),(!0===R.value&&!E.value&&!v.noLocalSorting||!0===R.value&&E.value&&v.noProviderSorting)&&(e=(e=>{var l;const o=null==(l=w.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],i=e=>{if(!s(e))return String(e);const l=F.value.find((e=>!!d(e)&&e.key===r.key)),o=t.get(e,r.key);if(d(l)&&l.sortByFormatted){const t=L(l);if(t)return String(n(e,String(l.key),t))}return"object"==typeof o&&null!==o?JSON.stringify(o):(null==o?void 0:o.toString())??""},u=i(e),c=i(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})),H=e.computed((()=>({emptyFilteredText:v.emptyFilteredText,emptyText:v.emptyText,fields:F.value,items:O.value}))),K=e.computed((()=>Number.isNaN(P.value)||E.value&&!v.noProviderPaging?O.value:O.value.slice((N.value-1)*(P.value||Number.POSITIVE_INFINITY),N.value*(P.value||Number.POSITIVE_INFINITY))));e.watch(K,(e=>{p("change",e)}));const q=(e,t,l)=>{!1===v.noSelectOnClick&&((e,t,l=!1,o=!1,a=!1)=>{if(v.selectable)if("single"===v.selectMode||"multi"===v.selectMode){if(l||o)return;S.has(e)?S.delete(e):"single"===v.selectMode?S.set([e]):S.add(e)}else if(o||a)S.has(e)?S.delete(e):S.add(e);else if(l){const e=[...B.value].pop(),l=O.value.findIndex((t=>t===e)),o=Math.min(l,t),a=Math.max(l,t),r=O.value.slice(o,a+1);S.set(r)}else S.set([e])})(e,t,l.shiftKey,l.ctrlKey,l.metaKey),p("row-clicked",e,t,l)},W=(e,t,l,o=!1)=>{p("head-clicked",e,t,l,o),(e=>{var t,l;if(!R.value)return;const o="object"==typeof e&&null!==e?e.key:e,a="object"==typeof e&&null!==e&&e.sortable;if(!0!==R.value||!0!==a)return;const r=e=>"asc"===e?"desc":void 0===e||!0===v.mustSort||Array.isArray(v.mustSort)&&v.mustSort.includes(o)?"asc":void 0,n=(null==(t=w.value)?void 0:t.findIndex((e=>e.key===o)))??-1,s=null==(l=w.value)?void 0:l[n],d=-1!==n&&s?{...s}:{key:o,order:"asc"};p("sorted",!0===v.multisort?(()=>{var e,t;let l=d;if(-1===n)w.value=[...w.value??[],d];else{const o=r(d.order);l={...d,order:o},w.value=o?null==(e=w.value)?void 0:e.map((e=>e.key===l.key?l:e)):null==(t=w.value)?void 0:t.filter((e=>e.key!==l.key))}return l})():(()=>{const e={...d,order:-1===n?d.order:r(d.order)};return w.value=[e],e})())})(t)},Y=async()=>{if(!E.value||void 0===v.provider||h.value)return;h.value=!0;const e=v.provider({currentPage:N.value,filter:v.filter,sortBy:w.value,perPage:P.value});try{const t=e instanceof Promise?await e:e;if(void 0===t)return;x.value=t}finally{h.value=!1}},J=async(e,t,l)=>{if(t===l)return;const o=e=>{var t;return!0===(null==(t=v.noProvider)?void 0:t.includes(e))},a=("currentPage"===e||"perPage"===e)&&(o("paging")||!0===v.noProviderPaging),r="filter"===e&&(o("filtering")||!0===v.noProviderFiltering),n=("sortBy"===e||"sortDesc"===e)&&(o("sorting")||!0===v.noProviderSorting);a||r||n||(!0===E.value&&await Y(),"currentPage"!==e&&"perPage"!==e&&p("filtered",[...O.value]))};e.watch((()=>v.filter),((e,t)=>{J("filter",e,t),e===t||E.value||e||p("filtered",[...O.value])})),e.watch(N,((e,t)=>{J("currentPage",e,t)})),e.watch(P,((e,t)=>{J("perPage",e,t)})),e.watch(w,((e,t)=>{J("sortBy",e,t)}),{deep:!0}),e.watch((()=>v.provider),(e=>{void 0!==e?Y():x.value=[]})),e.onMounted(Y);const U={clearSelected:()=>{v.selectable&&S.clear()},selectAllRows:()=>{v.selectable&&(B.value=new Set([...O.value]))},selectRow:e=>{if(!v.selectable)return;const t=O.value[e];t&&!S.has(t)&&S.add(t)},unselectRow:e=>{if(!v.selectable)return;const t=O.value[e];t&&S.has(t)&&S.delete(t)},isRowSelected:e=>{if(!v.selectable)return!1;const t=O.value[e];return S.has(t)}};return i({...U,refresh:Y}),(t,l)=>(e.openBlock(),e.createBlock($,e.mergeProps(e.unref(v),{"aria-busy":h.value,items:K.value,fields:F.value,"table-class":j.value,"tbody-tr-class":z,"field-column-class":M,onHeadClicked:W,onRowClicked:q,onRowDblclicked:l[0]||(l[0]=(e,t,l)=>{p("row-dblclicked",e,t,l)}),onRowContextmenu:l[1]||(l[1]=(e,t,l)=>{p("row-contextmenu",e,t,l)}),onRowHovered:l[2]||(l[2]=(e,t,l)=>{p("row-hovered",e,t,l)}),onRowUnhovered:l[3]||(l[3]=(e,t,l)=>{p("row-unhovered",e,t,l)}),onRowMiddleClicked:l[4]||(l[4]=(e,t,l)=>{p("row-middle-clicked",e,t,l)})}),e.createSlots({"custom-body":e.withCtx((l=>[h.value&&t.$slots["table-busy"]?(e.openBlock(),e.createBlock(b,{key:0,class:e.normalizeClass(["b-table-busy-slot",I.value])},{default:e.withCtx((()=>[e.createVNode(f,{colspan:l.fields.length},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"table-busy")])),_:2},1032,["colspan"])])),_:2},1032,["class"])):!0===e.unref(v).showEmpty&&0===O.value.length?(e.openBlock(),e.createBlock(b,{key:1,class:"b-table-empty-row"},{default:e.withCtx((()=>[e.createVNode(f,{colspan:F.value.length},{default:e.withCtx((()=>[e.createElementVNode("div",_,[e.createElementVNode("div",V,[A.value?e.renderSlot(t.$slots,"empty-filtered",e.normalizeProps(e.mergeProps({key:0},H.value)),(()=>[e.createTextVNode(e.toDisplayString(e.unref(v).emptyFilteredText),1)])):e.renderSlot(t.$slots,"empty",e.normalizeProps(e.mergeProps({key:1},H.value)),(()=>[e.createTextVNode(e.toDisplayString(e.unref(v).emptyText),1)]))])])])),_:3},8,["colspan"])])),_:3})):e.createCommentVNode("",!0)])),_:2},[m["thead-top"]?{name:"thead-top",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"thead-top",e.mergeProps(l,{clearSelected:U.clearSelected,selectAllRows:U.selectAllRows,fields:F.value}))])),key:"0"}:void 0,m["thead-sub"]?{name:"thead-sub",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"thead-sub",e.mergeProps(l,{fields:F.value}))])),key:"1"}:void 0,m["top-row"]?{name:"top-row",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"top-row",e.mergeProps(l,{fields:F.value}))])),key:"2"}:void 0,m["row-details"]?{name:"row-details",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"row-details",e.mergeProps(l,{fields:F.value,selectRow:(e=l.index)=>U.selectRow(e),unselectRow:(e=l.index)=>U.unselectRow(e),rowSelected:U.isRowSelected(l.index)}))])),key:"3"}:void 0,m["bottom-row"]?{name:"bottom-row",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"bottom-row",e.mergeProps(l,{fields:F.value}))])),key:"4"}:void 0,m["custom-foot"]?{name:"custom-foot",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"custom-foot",e.mergeProps(l,{fields:F.value}))])),key:"5"}:void 0,m["table-caption"]?{name:"table-caption",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"table-caption")])),key:"6"}:void 0,e.renderList(y.value,(l=>({name:l,fn:e.withCtx((o=>[e.renderSlot(t.$slots,l,e.mergeProps(o,{selectRow:(e=o.index)=>U.selectRow(e),unselectRow:(e=o.index)=>U.unselectRow(e),rowSelected:U.isRowSelected(o.index)}))]))}))),e.renderList(k.value,(l=>({name:l,fn:e.withCtx((o=>[e.renderSlot(t.$slots,l,e.mergeProps(o,{selectAllRows:U.selectAllRows,clearSelected:U.clearSelected}))]))}))),e.renderList(F.value,(o=>({name:`head(${String(o.key)})`,fn:e.withCtx((a=>{var r,n,s,d;return[e.renderSlot(t.$slots,t.$slots[`head(${String(o.key)})`]?`head(${String(o.key)})`:"head()",e.mergeProps(a,{selectAllRows:U.selectAllRows,clearSelected:U.clearSelected}),(()=>[e.createTextVNode(e.toDisplayString(e.unref(g)(o)),1)])),R.value&&a.field.sortable&&!1===e.unref(v).noSortableIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},["asc"===(null==(n=null==(r=w.value)?void 0:r.find((e=>e.key===a.field.key)))?void 0:n.order)?e.renderSlot(t.$slots,t.$slots[`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=w.value)?void 0:s.find((e=>e.key===a.field.key)))?void 0:d.order)?e.renderSlot(t.$slots,t.$slots[`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,t.$slots[`sortDefault(${String(a.field.key)})`]?`sortDefault(${String(a.field.key)})`:"sortDefault()",e.normalizeProps(e.mergeProps({key:2},a)),(()=>[(e.openBlock(),e.createElementBlock("svg",T,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,["aria-busy","items","fields","table-class"]))}});exports._sfc_main=P,exports._sfc_main$1=$,exports._sfc_main$2=i,exports._sfc_main$3=f,exports._sfc_main$4=v,exports._sfc_main$5=y,exports._sfc_main$6=k,exports._sfc_main$7=b;
2
+ //# sourceMappingURL=BTable.vue_vue_type_script_setup_true_lang-Z3Xw0zF8.js.map