bootstrap-vue-next 0.29.0 → 0.29.2

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 (44) hide show
  1. package/dist/{BFormFloatingLabel.vue_vue_type_script_setup_true_lang-Bmqwtcwy.js → BFormFloatingLabel.vue_vue_type_script_setup_true_lang-C10sVCk3.js} +2 -2
  2. package/dist/{BFormFloatingLabel.vue_vue_type_script_setup_true_lang-Bmqwtcwy.js.map → BFormFloatingLabel.vue_vue_type_script_setup_true_lang-C10sVCk3.js.map} +1 -1
  3. package/dist/{BFormFloatingLabel.vue_vue_type_script_setup_true_lang-D5Nog22k.mjs → BFormFloatingLabel.vue_vue_type_script_setup_true_lang-CIeh0lsL.mjs} +2 -2
  4. package/dist/{BFormFloatingLabel.vue_vue_type_script_setup_true_lang-D5Nog22k.mjs.map → BFormFloatingLabel.vue_vue_type_script_setup_true_lang-CIeh0lsL.mjs.map} +1 -1
  5. package/dist/{BFormSelect.vue_vue_type_script_setup_true_lang-BNUiLcYw.mjs → BFormSelect.vue_vue_type_script_setup_true_lang-B2LqCugy.mjs} +2 -2
  6. package/dist/{BFormSelect.vue_vue_type_script_setup_true_lang-BNUiLcYw.mjs.map → BFormSelect.vue_vue_type_script_setup_true_lang-B2LqCugy.mjs.map} +1 -1
  7. package/dist/{BFormSelect.vue_vue_type_script_setup_true_lang-ClT4WGYH.js → BFormSelect.vue_vue_type_script_setup_true_lang-h0NbN5MN.js} +2 -2
  8. package/dist/{BFormSelect.vue_vue_type_script_setup_true_lang-ClT4WGYH.js.map → BFormSelect.vue_vue_type_script_setup_true_lang-h0NbN5MN.js.map} +1 -1
  9. package/dist/{BPagination.vue_vue_type_script_setup_true_lang-sG5HjqiE.js → BPagination.vue_vue_type_script_setup_true_lang-BZqfKigW.js} +2 -2
  10. package/dist/BPagination.vue_vue_type_script_setup_true_lang-BZqfKigW.js.map +1 -0
  11. package/dist/{BPagination.vue_vue_type_script_setup_true_lang-BPoedI1D.mjs → BPagination.vue_vue_type_script_setup_true_lang-l5GT5VPN.mjs} +3 -3
  12. package/dist/BPagination.vue_vue_type_script_setup_true_lang-l5GT5VPN.mjs.map +1 -0
  13. package/dist/{BTable.vue_vue_type_script_setup_true_lang-CZti0QaN.js → BTable.vue_vue_type_script_setup_true_lang-DkUUwsW4.js} +2 -2
  14. package/dist/{BTable.vue_vue_type_script_setup_true_lang-CZti0QaN.js.map → BTable.vue_vue_type_script_setup_true_lang-DkUUwsW4.js.map} +1 -1
  15. package/dist/{BTable.vue_vue_type_script_setup_true_lang-H-Kt6GEq.mjs → BTable.vue_vue_type_script_setup_true_lang-fLGgETEG.mjs} +4 -2
  16. package/dist/{BTable.vue_vue_type_script_setup_true_lang-H-Kt6GEq.mjs.map → BTable.vue_vue_type_script_setup_true_lang-fLGgETEG.mjs.map} +1 -1
  17. package/dist/bootstrap-vue-next.css +1 -1
  18. package/dist/bootstrap-vue-next.mjs +6 -6
  19. package/dist/bootstrap-vue-next.umd.js +1 -1
  20. package/dist/{index-Dqf9K0mQ.mjs → index-DJKlaX-t.mjs} +6 -6
  21. package/dist/{index-Dqf9K0mQ.mjs.map → index-DJKlaX-t.mjs.map} +1 -1
  22. package/dist/{index-DtvmNeY_.js → index-DRP8pXCa.js} +2 -2
  23. package/dist/index-DRP8pXCa.js.map +1 -0
  24. package/dist/src/components/BForm/index.mjs +1 -1
  25. package/dist/src/components/BForm/index.umd.js +1 -1
  26. package/dist/src/components/BFormSelect/index.mjs +2 -2
  27. package/dist/src/components/BFormSelect/index.umd.js +1 -1
  28. package/dist/src/components/BPagination/index.mjs +1 -1
  29. package/dist/src/components/BPagination/index.umd.js +1 -1
  30. package/dist/src/components/BTable/index.mjs +1 -1
  31. package/dist/src/components/BTable/index.umd.js +1 -1
  32. package/dist/src/components/index.mjs +5 -5
  33. package/dist/src/components/index.umd.js +1 -1
  34. package/dist/{useFormSelect-BlDpyLP3.mjs → useFormSelect-DAr__bvr.mjs} +2 -2
  35. package/dist/useFormSelect-DAr__bvr.mjs.map +1 -0
  36. package/dist/{useFormSelect-BTyPmfZy.js → useFormSelect-DNxpW07g.js} +2 -2
  37. package/dist/useFormSelect-DNxpW07g.js.map +1 -0
  38. package/package.json +1 -1
  39. package/src/components/BTable/_table.scss +9 -0
  40. package/dist/BPagination.vue_vue_type_script_setup_true_lang-BPoedI1D.mjs.map +0 -1
  41. package/dist/BPagination.vue_vue_type_script_setup_true_lang-sG5HjqiE.js.map +0 -1
  42. package/dist/index-DtvmNeY_.js.map +0 -1
  43. package/dist/useFormSelect-BTyPmfZy.js.map +0 -1
  44. package/dist/useFormSelect-BlDpyLP3.mjs.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),t=require("./useFormSelect-BTyPmfZy.js"),l=require("./useDefaults-q0yyNSBk.js"),o=require("./useId-CVpYZavN.js"),r=["id"],a=e.defineComponent({__name:"BFormDatalist",props:{disabledField:{default:"disabled"},id:{default:void 0},options:{default:()=>[]},textField:{default:"text"},valueField:{default:"value"}},setup(a){const s=a,i=l.useDefaults(s,"BFormDatalist"),n=o.useId((()=>i.id),"datalist"),{normalizedOptions:d,isComplex:u}=t.useFormSelect((()=>i.options),e.computed((()=>({...i,optionsField:"options",labelField:"label"})))),f=e.computed((()=>d.value.filter((e=>!u(e)))));return(l,o)=>(e.openBlock(),e.createElementBlock("datalist",{id:e.unref(n)},[e.renderSlot(l.$slots,"first"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,((o,r)=>(e.openBlock(),e.createBlock(t._sfc_main,e.mergeProps({key:r,ref_for:!0},o),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"option",e.mergeProps({ref_for:!0},o),(()=>[e.createTextVNode(e.toDisplayString(o.text),1)]))])),_:2},1040)))),128)),e.renderSlot(l.$slots,"default")],8,r))}}),s={class:"form-floating"},i=["for"],n=e.defineComponent({__name:"BFormFloatingLabel",props:{label:{default:void 0},labelFor:{default:void 0}},setup(t){const o=t,r=l.useDefaults(o,"BFormFloatingLabel");return(t,l)=>(e.openBlock(),e.createElementBlock("div",s,[e.renderSlot(t.$slots,"default"),e.createElementVNode("label",{for:e.unref(r).labelFor},[e.renderSlot(t.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(r).label),1)]))],8,i)]))}});exports._sfc_main=a,exports._sfc_main$1=n;
2
- //# sourceMappingURL=BFormFloatingLabel.vue_vue_type_script_setup_true_lang-Bmqwtcwy.js.map
1
+ "use strict";const e=require("vue"),t=require("./useFormSelect-DNxpW07g.js"),l=require("./useDefaults-q0yyNSBk.js"),o=require("./useId-CVpYZavN.js"),r=["id"],a=e.defineComponent({__name:"BFormDatalist",props:{disabledField:{default:"disabled"},id:{default:void 0},options:{default:()=>[]},textField:{default:"text"},valueField:{default:"value"}},setup(a){const s=a,i=l.useDefaults(s,"BFormDatalist"),n=o.useId((()=>i.id),"datalist"),{normalizedOptions:d,isComplex:u}=t.useFormSelect((()=>i.options),e.computed((()=>({...i,optionsField:"options",labelField:"label"})))),f=e.computed((()=>d.value.filter((e=>!u(e)))));return(l,o)=>(e.openBlock(),e.createElementBlock("datalist",{id:e.unref(n)},[e.renderSlot(l.$slots,"first"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,((o,r)=>(e.openBlock(),e.createBlock(t._sfc_main,e.mergeProps({key:r,ref_for:!0},o),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"option",e.mergeProps({ref_for:!0},o),(()=>[e.createTextVNode(e.toDisplayString(o.text),1)]))])),_:2},1040)))),128)),e.renderSlot(l.$slots,"default")],8,r))}}),s={class:"form-floating"},i=["for"],n=e.defineComponent({__name:"BFormFloatingLabel",props:{label:{default:void 0},labelFor:{default:void 0}},setup(t){const o=t,r=l.useDefaults(o,"BFormFloatingLabel");return(t,l)=>(e.openBlock(),e.createElementBlock("div",s,[e.renderSlot(t.$slots,"default"),e.createElementVNode("label",{for:e.unref(r).labelFor},[e.renderSlot(t.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(r).label),1)]))],8,i)]))}});exports._sfc_main=a,exports._sfc_main$1=n;
2
+ //# sourceMappingURL=BFormFloatingLabel.vue_vue_type_script_setup_true_lang-C10sVCk3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BFormFloatingLabel.vue_vue_type_script_setup_true_lang-Bmqwtcwy.js","sources":["../src/components/BForm/BFormDatalist.vue","../src/components/BForm/BFormFloatingLabel.vue"],"sourcesContent":["<template>\n <datalist :id=\"computedId\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptsWrapper\"\n :key=\"index\"\n v-bind=\"option\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </datalist>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport type {BFormDatalistProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport BFormSelectOption from '../BFormSelect/BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<BFormDatalistProps>(), {\n disabled: false,\n disabledField: 'disabled',\n id: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormDatalist')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst computedId = useId(() => props.id, 'datalist')\n\nconst {normalizedOptions, isComplex} = useFormSelect(\n () => props.options,\n computed(() => ({...props, optionsField: 'options', labelField: 'label'}))\n)\n\nconst normalizedOptsWrapper = computed(\n () =>\n // Datalist doesn't support complex options\n normalizedOptions.value.filter((opt) => !isComplex(opt)) as readonly SelectOption<T>[]\n)\n</script>\n","<template>\n <div class=\"form-floating\">\n <slot />\n <label :for=\"props.labelFor\">\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormFloatingLabelProps} from '../../types/ComponentProps'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n label?: (props: Record<string, never>) => any\n}>()\n</script>\n"],"names":["_props","__props","props","useDefaults","computedId","useId","id","normalizedOptions","isComplex","useFormSelect","options","computed","optionsField","labelField","normalizedOptsWrapper","value","filter","opt"],"mappings":"mWAyBA,MAAMA,EAASC,EAQTC,EAAQC,EAAAA,YAAYH,EAAQ,iBAW5BI,EAAaC,EAAAA,OAAM,IAAMH,EAAMI,IAAI,aAEnCC,kBAACA,EAAAC,UAAmBA,GAAaC,EAAAA,eACrC,IAAMP,EAAMQ,SACZC,EAAAA,UAAS,KAAA,IAAWT,EAAOU,aAAc,UAAWC,WAAY,aAG5DC,EAAwBH,EAAAA,UAC5B,IAEEJ,EAAkBQ,MAAMC,QAAQC,IAAST,EAAUS,wnBCvCvD,MAAMjB,EAASC,EAKTC,EAAQC,EAAAA,YAAYH,EAAQ"}
1
+ {"version":3,"file":"BFormFloatingLabel.vue_vue_type_script_setup_true_lang-C10sVCk3.js","sources":["../src/components/BForm/BFormDatalist.vue","../src/components/BForm/BFormFloatingLabel.vue"],"sourcesContent":["<template>\n <datalist :id=\"computedId\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptsWrapper\"\n :key=\"index\"\n v-bind=\"option\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </datalist>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport type {BFormDatalistProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport BFormSelectOption from '../BFormSelect/BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<BFormDatalistProps>(), {\n disabled: false,\n disabledField: 'disabled',\n id: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormDatalist')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst computedId = useId(() => props.id, 'datalist')\n\nconst {normalizedOptions, isComplex} = useFormSelect(\n () => props.options,\n computed(() => ({...props, optionsField: 'options', labelField: 'label'}))\n)\n\nconst normalizedOptsWrapper = computed(\n () =>\n // Datalist doesn't support complex options\n normalizedOptions.value.filter((opt) => !isComplex(opt)) as readonly SelectOption<T>[]\n)\n</script>\n","<template>\n <div class=\"form-floating\">\n <slot />\n <label :for=\"props.labelFor\">\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormFloatingLabelProps} from '../../types/ComponentProps'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n label?: (props: Record<string, never>) => any\n}>()\n</script>\n"],"names":["_props","__props","props","useDefaults","computedId","useId","id","normalizedOptions","isComplex","useFormSelect","options","computed","optionsField","labelField","normalizedOptsWrapper","value","filter","opt"],"mappings":"mWAyBA,MAAMA,EAASC,EAQTC,EAAQC,EAAAA,YAAYH,EAAQ,iBAW5BI,EAAaC,EAAAA,OAAM,IAAMH,EAAMI,IAAI,aAEnCC,kBAACA,EAAAC,UAAmBA,GAAaC,EAAAA,eACrC,IAAMP,EAAMQ,SACZC,EAAAA,UAAS,KAAA,IAAWT,EAAOU,aAAc,UAAWC,WAAY,aAG5DC,EAAwBH,EAAAA,UAC5B,IAEEJ,EAAkBQ,MAAMC,QAAQC,IAAST,EAAUS,wnBCvCvD,MAAMjB,EAASC,EAKTC,EAAQC,EAAAA,YAAYH,EAAQ"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, unref, renderSlot, Fragment, renderList, createBlock, mergeProps, withCtx, createTextVNode, toDisplayString, createElementVNode } from "vue";
2
- import { u as useFormSelect, _ as _sfc_main$2 } from "./useFormSelect-BlDpyLP3.mjs";
2
+ import { u as useFormSelect, _ as _sfc_main$2 } from "./useFormSelect-DAr__bvr.mjs";
3
3
  import { u as useDefaults } from "./useDefaults-CzkRF2AY.mjs";
4
4
  import { u as useId } from "./useId-BmZnPXsS.mjs";
5
5
  const _hoisted_1$1 = ["id"];
@@ -76,4 +76,4 @@ export {
76
76
  _sfc_main$1 as _,
77
77
  _sfc_main as a
78
78
  };
79
- //# sourceMappingURL=BFormFloatingLabel.vue_vue_type_script_setup_true_lang-D5Nog22k.mjs.map
79
+ //# sourceMappingURL=BFormFloatingLabel.vue_vue_type_script_setup_true_lang-CIeh0lsL.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"BFormFloatingLabel.vue_vue_type_script_setup_true_lang-D5Nog22k.mjs","sources":["../src/components/BForm/BFormDatalist.vue","../src/components/BForm/BFormFloatingLabel.vue"],"sourcesContent":["<template>\n <datalist :id=\"computedId\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptsWrapper\"\n :key=\"index\"\n v-bind=\"option\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </datalist>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport type {BFormDatalistProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport BFormSelectOption from '../BFormSelect/BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<BFormDatalistProps>(), {\n disabled: false,\n disabledField: 'disabled',\n id: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormDatalist')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst computedId = useId(() => props.id, 'datalist')\n\nconst {normalizedOptions, isComplex} = useFormSelect(\n () => props.options,\n computed(() => ({...props, optionsField: 'options', labelField: 'label'}))\n)\n\nconst normalizedOptsWrapper = computed(\n () =>\n // Datalist doesn't support complex options\n normalizedOptions.value.filter((opt) => !isComplex(opt)) as readonly SelectOption<T>[]\n)\n</script>\n","<template>\n <div class=\"form-floating\">\n <slot />\n <label :for=\"props.labelFor\">\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormFloatingLabelProps} from '../../types/ComponentProps'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n label?: (props: Record<string, never>) => any\n}>()\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAyBA,UAAM,SAAS;AAQT,UAAA,QAAQ,YAAY,QAAQ,eAAe;AAWjD,UAAM,aAAa,MAAM,MAAM,MAAM,IAAI,UAAU;AAE7C,UAAA,EAAC,mBAAmB,UAAA,IAAa;AAAA,MACrC,MAAM,MAAM;AAAA,MACZ,SAAS,OAAO,EAAC,GAAG,OAAO,cAAc,WAAW,YAAY,UAAS;AAAA,IAC3E;AAEA,UAAM,wBAAwB;AAAA,MAC5B;AAAA;AAAA,QAEE,kBAAkB,MAAM,OAAO,CAAC,QAAQ,CAAC,UAAU,GAAG,CAAC;AAAA;AAAA,IAC3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxCA,UAAM,SAAS;AAKT,UAAA,QAAQ,YAAY,QAAQ,oBAAoB;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"BFormFloatingLabel.vue_vue_type_script_setup_true_lang-CIeh0lsL.mjs","sources":["../src/components/BForm/BFormDatalist.vue","../src/components/BForm/BFormFloatingLabel.vue"],"sourcesContent":["<template>\n <datalist :id=\"computedId\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptsWrapper\"\n :key=\"index\"\n v-bind=\"option\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </datalist>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport type {BFormDatalistProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\nimport BFormSelectOption from '../BFormSelect/BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<BFormDatalistProps>(), {\n disabled: false,\n disabledField: 'disabled',\n id: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormDatalist')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst computedId = useId(() => props.id, 'datalist')\n\nconst {normalizedOptions, isComplex} = useFormSelect(\n () => props.options,\n computed(() => ({...props, optionsField: 'options', labelField: 'label'}))\n)\n\nconst normalizedOptsWrapper = computed(\n () =>\n // Datalist doesn't support complex options\n normalizedOptions.value.filter((opt) => !isComplex(opt)) as readonly SelectOption<T>[]\n)\n</script>\n","<template>\n <div class=\"form-floating\">\n <slot />\n <label :for=\"props.labelFor\">\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormFloatingLabelProps} from '../../types/ComponentProps'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n label?: (props: Record<string, never>) => any\n}>()\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAyBA,UAAM,SAAS;AAQT,UAAA,QAAQ,YAAY,QAAQ,eAAe;AAWjD,UAAM,aAAa,MAAM,MAAM,MAAM,IAAI,UAAU;AAE7C,UAAA,EAAC,mBAAmB,UAAA,IAAa;AAAA,MACrC,MAAM,MAAM;AAAA,MACZ,SAAS,OAAO,EAAC,GAAG,OAAO,cAAc,WAAW,YAAY,UAAS;AAAA,IAC3E;AAEA,UAAM,wBAAwB;AAAA,MAC5B;AAAA;AAAA,QAEE,kBAAkB,MAAM,OAAO,CAAC,QAAQ,CAAC,UAAU,GAAG,CAAC;AAAA;AAAA,IAC3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxCA,UAAM,SAAS;AAKT,UAAA,QAAQ,YAAY,QAAQ,oBAAoB;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, createElementBlock, openBlock, unref, renderSlot, Fragment, renderList, createBlock, mergeProps, withCtx, createTextVNode, toDisplayString, mergeModels, useModel, useTemplateRef, computed, withDirectives, normalizeClass, vModelSelect } from "vue";
2
- import { u as useFormSelect, _ as _sfc_main$2 } from "./useFormSelect-BlDpyLP3.mjs";
2
+ import { u as useFormSelect, _ as _sfc_main$2 } from "./useFormSelect-DAr__bvr.mjs";
3
3
  import { u as useDefaults } from "./useDefaults-CzkRF2AY.mjs";
4
4
  import { u as useAriaInvalid } from "./useAriaInvalid-BTUbGj3Y.mjs";
5
5
  import { u as useFocus } from "./index-CMqRvrZx.mjs";
@@ -171,4 +171,4 @@ export {
171
171
  _sfc_main as _,
172
172
  _sfc_main$1 as a
173
173
  };
174
- //# sourceMappingURL=BFormSelect.vue_vue_type_script_setup_true_lang-BNUiLcYw.mjs.map
174
+ //# sourceMappingURL=BFormSelect.vue_vue_type_script_setup_true_lang-B2LqCugy.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"BFormSelect.vue_vue_type_script_setup_true_lang-BNUiLcYw.mjs","sources":["../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelect.vue"],"sourcesContent":["<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n :disabled=\"option.disabled\"\n :value=\"option.value\"\n v-bind=\"$attrs\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormSelectOptionGroupProps} from '../../types/ComponentProps'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"props.disabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else :value=\"option.value\" :disabled=\"option.disabled\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport type {BFormSelectProps} from '../../types/ComponentProps'\nimport {computed, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {ComplexSelectOptionRaw, SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<Omit<BFormSelectProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: 'md',\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst modelValue = defineModel<T>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef<HTMLElement>('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== 'md' && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== 'md' && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n selectSizeNumber.value || props.plain ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(\n () => normalizedOptions.value as readonly (ComplexSelectOptionRaw<T> | SelectOption<T>)[]\n)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n"],"names":["_useModel"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BA,UAAM,SAAS;AAOT,UAAA,QAAQ,YAAY,QAAQ,wBAAwB;AAW1D,UAAM,EAAC,kBAAiB,IAAI,cAAc,MAAM,MAAM,SAAS,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACIpE,UAAM,SAAS;AAoBT,UAAA,QAAQ,YAAY,QAAQ,aAAa;AAWzC,UAAA,aAAaA,SAGlB,SAAA,YAAA;AAED,UAAM,aAAa,MAAM,MAAM,MAAM,IAAI,OAAO;AAEhD,UAAM,mBAAmB,YAAY,MAAM,MAAM,UAAU;AAE3D,UAAM,aAAa,cAAc,MAAM,MAAM,KAAK;AAE5C,UAAA,QAAQ,eAA4B,QAAQ;AAElD,UAAM,EAAC,QAAA,IAAW,SAAS,OAAO;AAAA,MAChC,cAAc,MAAM;AAAA,IAAA,CACrB;AAEK,UAAA,kBAAkB,SAAS,MAAM;AAAA,MACrC,WAAW;AAAA,MACX;AAAA,QACE,gBAAgB,MAAM;AAAA,QACtB,CAAC,gBAAgB,MAAM,IAAI,EAAE,GAAG,MAAM,SAAS,QAAQ,MAAM;AAAA,QAC7D,eAAe,CAAC,MAAM;AAAA,QACtB,CAAC,eAAe,MAAM,IAAI,EAAE,GAAG,MAAM,SAAS,QAAQ,CAAC,MAAM;AAAA,MAAA;AAAA,IAC/D,CACD;AAED,UAAM,qBAAqB;AAAA,MAAS,MAClC,iBAAiB,SAAS,MAAM,QAAQ,iBAAiB,QAAQ;AAAA,IACnE;AAEA,UAAM,sBAAsB;AAAA,MAC1B,MAAM,MAAM;AAAA,MACZ,MAAM,MAAM;AAAA,IACd;AAEM,UAAA,EAAC,mBAAmB,UAAS,IAAI,cAAc,MAAM,MAAM,SAAS,KAAK;AAE/E,UAAM,wBAAwB;AAAA,MAC5B,MAAM,kBAAkB;AAAA,IAC1B;AAEA,UAAM,aAAa,SAAS;AAAA,MAC1B,KAAK,MAAM,WAAW;AAAA,MACtB,KAAK,CAAC,aAAa;AACjB,mBAAW,QAAQ;AAAA,MAAA;AAAA,IACrB,CACD;AAEY,aAAA;AAAA,MACX,MAAM,MAAM;AACV,gBAAQ,QAAQ;AAAA,MAClB;AAAA,MACA,SAAS;AAAA,MACT,OAAO,MAAM;AACX,gBAAQ,QAAQ;AAAA,MAAA;AAAA,IAClB,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"BFormSelect.vue_vue_type_script_setup_true_lang-B2LqCugy.mjs","sources":["../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelect.vue"],"sourcesContent":["<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n :disabled=\"option.disabled\"\n :value=\"option.value\"\n v-bind=\"$attrs\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormSelectOptionGroupProps} from '../../types/ComponentProps'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"props.disabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else :value=\"option.value\" :disabled=\"option.disabled\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport type {BFormSelectProps} from '../../types/ComponentProps'\nimport {computed, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {ComplexSelectOptionRaw, SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<Omit<BFormSelectProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: 'md',\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst modelValue = defineModel<T>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef<HTMLElement>('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== 'md' && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== 'md' && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n selectSizeNumber.value || props.plain ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(\n () => normalizedOptions.value as readonly (ComplexSelectOptionRaw<T> | SelectOption<T>)[]\n)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n"],"names":["_useModel"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BA,UAAM,SAAS;AAOT,UAAA,QAAQ,YAAY,QAAQ,wBAAwB;AAW1D,UAAM,EAAC,kBAAiB,IAAI,cAAc,MAAM,MAAM,SAAS,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACIpE,UAAM,SAAS;AAoBT,UAAA,QAAQ,YAAY,QAAQ,aAAa;AAWzC,UAAA,aAAaA,SAGlB,SAAA,YAAA;AAED,UAAM,aAAa,MAAM,MAAM,MAAM,IAAI,OAAO;AAEhD,UAAM,mBAAmB,YAAY,MAAM,MAAM,UAAU;AAE3D,UAAM,aAAa,cAAc,MAAM,MAAM,KAAK;AAE5C,UAAA,QAAQ,eAA4B,QAAQ;AAElD,UAAM,EAAC,QAAA,IAAW,SAAS,OAAO;AAAA,MAChC,cAAc,MAAM;AAAA,IAAA,CACrB;AAEK,UAAA,kBAAkB,SAAS,MAAM;AAAA,MACrC,WAAW;AAAA,MACX;AAAA,QACE,gBAAgB,MAAM;AAAA,QACtB,CAAC,gBAAgB,MAAM,IAAI,EAAE,GAAG,MAAM,SAAS,QAAQ,MAAM;AAAA,QAC7D,eAAe,CAAC,MAAM;AAAA,QACtB,CAAC,eAAe,MAAM,IAAI,EAAE,GAAG,MAAM,SAAS,QAAQ,CAAC,MAAM;AAAA,MAAA;AAAA,IAC/D,CACD;AAED,UAAM,qBAAqB;AAAA,MAAS,MAClC,iBAAiB,SAAS,MAAM,QAAQ,iBAAiB,QAAQ;AAAA,IACnE;AAEA,UAAM,sBAAsB;AAAA,MAC1B,MAAM,MAAM;AAAA,MACZ,MAAM,MAAM;AAAA,IACd;AAEM,UAAA,EAAC,mBAAmB,UAAS,IAAI,cAAc,MAAM,MAAM,SAAS,KAAK;AAE/E,UAAM,wBAAwB;AAAA,MAC5B,MAAM,kBAAkB;AAAA,IAC1B;AAEA,UAAM,aAAa,SAAS;AAAA,MAC1B,KAAK,MAAM,WAAW;AAAA,MACtB,KAAK,CAAC,aAAa;AACjB,mBAAW,QAAQ;AAAA,MAAA;AAAA,IACrB,CACD;AAEY,aAAA;AAAA,MACX,MAAM,MAAM;AACV,gBAAQ,QAAQ;AAAA,MAClB;AAAA,MACA,SAAS;AAAA,MACT,OAAO,MAAM;AACX,gBAAQ,QAAQ;AAAA,MAAA;AAAA,IAClB,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),l=require("./useFormSelect-BTyPmfZy.js"),t=require("./useDefaults-q0yyNSBk.js"),a=require("./useAriaInvalid-DUOcHX79.js"),o=require("./index-DiURjA3G.js"),i=require("./useId-CVpYZavN.js"),d=require("./useStateClass-BePLKIel.js"),u=require("./index-BjjsoN-a.js"),r=["label"],s=e.defineComponent({__name:"BFormSelectOptionGroup",props:{disabledField:{default:"disabled"},label:{default:void 0},options:{default:()=>[]},textField:{default:"text"},valueField:{default:"value"}},setup(a){const o=a,i=t.useDefaults(o,"BFormSelectOptionGroup"),{normalizedOptions:d}=l.useFormSelect((()=>i.options),i);return(t,a)=>(e.openBlock(),e.createElementBlock("optgroup",{label:e.unref(i).label},[e.renderSlot(t.$slots,"first"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),((a,o)=>(e.openBlock(),e.createBlock(l._sfc_main,e.mergeProps({key:o,disabled:a.disabled,value:a.value,ref_for:!0},t.$attrs),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.mergeProps({ref_for:!0},a),(()=>[e.createTextVNode(e.toDisplayString(a.text),1)]))])),_:2},1040,["disabled","value"])))),128)),e.renderSlot(t.$slots,"default")],8,r))}}),n=["id","name","form","multiple","size","disabled","required","aria-required","aria-invalid"],f=e.defineComponent({__name:"BFormSelect",props:e.mergeModels({ariaInvalid:{type:[Boolean,String],default:void 0},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disabledField:{default:"disabled"},form:{default:void 0},id:{default:void 0},labelField:{default:"label"},multiple:{type:Boolean,default:!1},name:{default:void 0},options:{default:()=>[]},optionsField:{default:"options"},plain:{type:Boolean,default:!1},required:{type:Boolean,default:!1},selectSize:{default:0},size:{default:"md"},state:{type:[Boolean,null],default:null},textField:{default:"text"},valueField:{default:"value"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(r,{expose:f}){const p=r,m=t.useDefaults(p,"BFormSelect"),c=e.useModel(r,"modelValue"),v=i.useId((()=>m.id),"input"),b=u.useToNumber((()=>m.selectSize)),B=d.useStateClass((()=>m.state)),F=e.useTemplateRef("_input"),{focused:S}=o.useFocus(F,{initialValue:m.autofocus}),k=e.computed((()=>[B.value,{"form-control":m.plain,[`form-control-${m.size}`]:"md"!==m.size&&m.plain,"form-select":!m.plain,[`form-select-${m.size}`]:"md"!==m.size&&!m.plain}])),_=e.computed((()=>b.value||m.plain?b.value:void 0)),x=a.useAriaInvalid((()=>m.ariaInvalid),(()=>m.state)),{normalizedOptions:q,isComplex:y}=l.useFormSelect((()=>m.options),m),g=e.computed((()=>q.value)),z=e.computed({get:()=>c.value,set:e=>{c.value=e}});return f({blur:()=>{S.value=!1},element:F,focus:()=>{S.value=!0}}),(t,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("select",{id:e.unref(v),ref:"_input","onUpdate:modelValue":a[0]||(a[0]=e=>z.value=e),class:e.normalizeClass(k.value),name:e.unref(m).name,form:e.unref(m).form||void 0,multiple:e.unref(m).multiple||void 0,size:_.value,disabled:e.unref(m).disabled,required:e.unref(m).required||void 0,"aria-required":e.unref(m).required||void 0,"aria-invalid":e.unref(x)},[e.renderSlot(t.$slots,"first"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,((a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[e.unref(y)(a)?(e.openBlock(),e.createBlock(s,{key:0,label:a.label,options:a.options,"value-field":e.unref(m).valueField,"text-field":e.unref(m).textField,"disabled-field":e.unref(m).disabledField},null,8,["label","options","value-field","text-field","disabled-field"])):(e.openBlock(),e.createBlock(l._sfc_main,{key:1,value:a.value,disabled:a.disabled},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.mergeProps({ref_for:!0},a),(()=>[e.createTextVNode(e.toDisplayString(a.text),1)]))])),_:2},1032,["value","disabled"]))],64)))),128)),e.renderSlot(t.$slots,"default")],10,n)),[[e.vModelSelect,z.value]])}});exports._sfc_main=f,exports._sfc_main$1=s;
2
- //# sourceMappingURL=BFormSelect.vue_vue_type_script_setup_true_lang-ClT4WGYH.js.map
1
+ "use strict";const e=require("vue"),l=require("./useFormSelect-DNxpW07g.js"),t=require("./useDefaults-q0yyNSBk.js"),a=require("./useAriaInvalid-DUOcHX79.js"),o=require("./index-DiURjA3G.js"),i=require("./useId-CVpYZavN.js"),d=require("./useStateClass-BePLKIel.js"),u=require("./index-BjjsoN-a.js"),r=["label"],s=e.defineComponent({__name:"BFormSelectOptionGroup",props:{disabledField:{default:"disabled"},label:{default:void 0},options:{default:()=>[]},textField:{default:"text"},valueField:{default:"value"}},setup(a){const o=a,i=t.useDefaults(o,"BFormSelectOptionGroup"),{normalizedOptions:d}=l.useFormSelect((()=>i.options),i);return(t,a)=>(e.openBlock(),e.createElementBlock("optgroup",{label:e.unref(i).label},[e.renderSlot(t.$slots,"first"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),((a,o)=>(e.openBlock(),e.createBlock(l._sfc_main,e.mergeProps({key:o,disabled:a.disabled,value:a.value,ref_for:!0},t.$attrs),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.mergeProps({ref_for:!0},a),(()=>[e.createTextVNode(e.toDisplayString(a.text),1)]))])),_:2},1040,["disabled","value"])))),128)),e.renderSlot(t.$slots,"default")],8,r))}}),n=["id","name","form","multiple","size","disabled","required","aria-required","aria-invalid"],f=e.defineComponent({__name:"BFormSelect",props:e.mergeModels({ariaInvalid:{type:[Boolean,String],default:void 0},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disabledField:{default:"disabled"},form:{default:void 0},id:{default:void 0},labelField:{default:"label"},multiple:{type:Boolean,default:!1},name:{default:void 0},options:{default:()=>[]},optionsField:{default:"options"},plain:{type:Boolean,default:!1},required:{type:Boolean,default:!1},selectSize:{default:0},size:{default:"md"},state:{type:[Boolean,null],default:null},textField:{default:"text"},valueField:{default:"value"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(r,{expose:f}){const p=r,m=t.useDefaults(p,"BFormSelect"),c=e.useModel(r,"modelValue"),v=i.useId((()=>m.id),"input"),b=u.useToNumber((()=>m.selectSize)),B=d.useStateClass((()=>m.state)),F=e.useTemplateRef("_input"),{focused:S}=o.useFocus(F,{initialValue:m.autofocus}),k=e.computed((()=>[B.value,{"form-control":m.plain,[`form-control-${m.size}`]:"md"!==m.size&&m.plain,"form-select":!m.plain,[`form-select-${m.size}`]:"md"!==m.size&&!m.plain}])),_=e.computed((()=>b.value||m.plain?b.value:void 0)),x=a.useAriaInvalid((()=>m.ariaInvalid),(()=>m.state)),{normalizedOptions:q,isComplex:y}=l.useFormSelect((()=>m.options),m),g=e.computed((()=>q.value)),z=e.computed({get:()=>c.value,set:e=>{c.value=e}});return f({blur:()=>{S.value=!1},element:F,focus:()=>{S.value=!0}}),(t,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("select",{id:e.unref(v),ref:"_input","onUpdate:modelValue":a[0]||(a[0]=e=>z.value=e),class:e.normalizeClass(k.value),name:e.unref(m).name,form:e.unref(m).form||void 0,multiple:e.unref(m).multiple||void 0,size:_.value,disabled:e.unref(m).disabled,required:e.unref(m).required||void 0,"aria-required":e.unref(m).required||void 0,"aria-invalid":e.unref(x)},[e.renderSlot(t.$slots,"first"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,((a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[e.unref(y)(a)?(e.openBlock(),e.createBlock(s,{key:0,label:a.label,options:a.options,"value-field":e.unref(m).valueField,"text-field":e.unref(m).textField,"disabled-field":e.unref(m).disabledField},null,8,["label","options","value-field","text-field","disabled-field"])):(e.openBlock(),e.createBlock(l._sfc_main,{key:1,value:a.value,disabled:a.disabled},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.mergeProps({ref_for:!0},a),(()=>[e.createTextVNode(e.toDisplayString(a.text),1)]))])),_:2},1032,["value","disabled"]))],64)))),128)),e.renderSlot(t.$slots,"default")],10,n)),[[e.vModelSelect,z.value]])}});exports._sfc_main=f,exports._sfc_main$1=s;
2
+ //# sourceMappingURL=BFormSelect.vue_vue_type_script_setup_true_lang-h0NbN5MN.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BFormSelect.vue_vue_type_script_setup_true_lang-ClT4WGYH.js","sources":["../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelect.vue"],"sourcesContent":["<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n :disabled=\"option.disabled\"\n :value=\"option.value\"\n v-bind=\"$attrs\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormSelectOptionGroupProps} from '../../types/ComponentProps'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"props.disabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else :value=\"option.value\" :disabled=\"option.disabled\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport type {BFormSelectProps} from '../../types/ComponentProps'\nimport {computed, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {ComplexSelectOptionRaw, SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<Omit<BFormSelectProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: 'md',\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst modelValue = defineModel<T>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef<HTMLElement>('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== 'md' && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== 'md' && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n selectSizeNumber.value || props.plain ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(\n () => normalizedOptions.value as readonly (ComplexSelectOptionRaw<T> | SelectOption<T>)[]\n)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n"],"names":["_props","__props","props","useDefaults","normalizedOptions","useFormSelect","options","modelValue","_useModel","computedId","useId","id","selectSizeNumber","useToNumber","selectSize","stateClass","useStateClass","state","input","useTemplateRef","focused","useFocus","initialValue","autofocus","computedClasses","computed","value","plain","size","computedSelectSize","computedAriaInvalid","useAriaInvalid","ariaInvalid","isComplex","normalizedOptsWrapper","localValue","get","set","newValue","__expose","blur","element","focus"],"mappings":"ugBA0BA,MAAMA,EAASC,EAOTC,EAAQC,EAAAA,YAAYH,EAAQ,2BAW5BI,kBAACA,GAAqBC,EAAAA,eAAc,IAAMH,EAAMI,SAASJ,w0CCI/D,MAAMF,EAASC,EAoBTC,EAAQC,EAAAA,YAAYH,EAAQ,eAW5BO,EAAaC,EAAAA,SAGlBP,EAAA,cAEKQ,EAAaC,EAAAA,OAAM,IAAMR,EAAMS,IAAI,SAEnCC,EAAmBC,EAAAA,aAAY,IAAMX,EAAMY,aAE3CC,EAAaC,EAAAA,eAAc,IAAMd,EAAMe,QAEvCC,EAAQC,iBAA4B,WAEpCC,QAACA,GAAWC,EAAAA,SAASH,EAAO,CAChCI,aAAcpB,EAAMqB,YAGhBC,EAAkBC,EAAAA,UAAS,IAAM,CACrCV,EAAWW,MACX,CACE,eAAgBxB,EAAMyB,MACtB,CAAC,gBAAgBzB,EAAM0B,QAAwB,OAAf1B,EAAM0B,MAAiB1B,EAAMyB,MAC7D,eAAgBzB,EAAMyB,MACtB,CAAC,eAAezB,EAAM0B,QAAwB,OAAf1B,EAAM0B,OAAkB1B,EAAMyB,UAI3DE,EAAqBJ,EAAAA,UAAS,IAClCb,EAAiBc,OAASxB,EAAMyB,MAAQf,EAAiBc,WAAQ,IAG7DI,EAAsBC,EAAAA,gBAC1B,IAAM7B,EAAM8B,cACZ,IAAM9B,EAAMe,SAGRb,kBAACA,YAAmB6B,GAAa5B,iBAAc,IAAMH,EAAMI,SAASJ,GAEpEgC,EAAwBT,EAAAA,UAC5B,IAAMrB,EAAkBsB,QAGpBS,EAAaV,EAAAA,SAAS,CAC1BW,IAAK,IAAM7B,EAAWmB,MACtBW,IAAMC,IACJ/B,EAAWmB,MAAQY,CAAA,WAIVC,EAAA,CACXC,KAAM,KACJpB,EAAQM,OAAQ,CAAA,EAElBe,QAASvB,EACTwB,MAAO,KACLtB,EAAQM,OAAQ,CAAA"}
1
+ {"version":3,"file":"BFormSelect.vue_vue_type_script_setup_true_lang-h0NbN5MN.js","sources":["../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelect.vue"],"sourcesContent":["<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n :disabled=\"option.disabled\"\n :value=\"option.value\"\n v-bind=\"$attrs\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormSelectOptionGroupProps} from '../../types/ComponentProps'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"props.disabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else :value=\"option.value\" :disabled=\"option.disabled\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport type {BFormSelectProps} from '../../types/ComponentProps'\nimport {computed, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {ComplexSelectOptionRaw, SelectOption} from '../../types/SelectTypes'\n\nconst _props = withDefaults(defineProps<Omit<BFormSelectProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: 'md',\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n first?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n option: (props: SelectOption<T>) => any\n}>()\n\nconst modelValue = defineModel<T>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef<HTMLElement>('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== 'md' && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== 'md' && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n selectSizeNumber.value || props.plain ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(\n () => normalizedOptions.value as readonly (ComplexSelectOptionRaw<T> | SelectOption<T>)[]\n)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n"],"names":["_props","__props","props","useDefaults","normalizedOptions","useFormSelect","options","modelValue","_useModel","computedId","useId","id","selectSizeNumber","useToNumber","selectSize","stateClass","useStateClass","state","input","useTemplateRef","focused","useFocus","initialValue","autofocus","computedClasses","computed","value","plain","size","computedSelectSize","computedAriaInvalid","useAriaInvalid","ariaInvalid","isComplex","normalizedOptsWrapper","localValue","get","set","newValue","__expose","blur","element","focus"],"mappings":"ugBA0BA,MAAMA,EAASC,EAOTC,EAAQC,EAAAA,YAAYH,EAAQ,2BAW5BI,kBAACA,GAAqBC,EAAAA,eAAc,IAAMH,EAAMI,SAASJ,w0CCI/D,MAAMF,EAASC,EAoBTC,EAAQC,EAAAA,YAAYH,EAAQ,eAW5BO,EAAaC,EAAAA,SAGlBP,EAAA,cAEKQ,EAAaC,EAAAA,OAAM,IAAMR,EAAMS,IAAI,SAEnCC,EAAmBC,EAAAA,aAAY,IAAMX,EAAMY,aAE3CC,EAAaC,EAAAA,eAAc,IAAMd,EAAMe,QAEvCC,EAAQC,iBAA4B,WAEpCC,QAACA,GAAWC,EAAAA,SAASH,EAAO,CAChCI,aAAcpB,EAAMqB,YAGhBC,EAAkBC,EAAAA,UAAS,IAAM,CACrCV,EAAWW,MACX,CACE,eAAgBxB,EAAMyB,MACtB,CAAC,gBAAgBzB,EAAM0B,QAAwB,OAAf1B,EAAM0B,MAAiB1B,EAAMyB,MAC7D,eAAgBzB,EAAMyB,MACtB,CAAC,eAAezB,EAAM0B,QAAwB,OAAf1B,EAAM0B,OAAkB1B,EAAMyB,UAI3DE,EAAqBJ,EAAAA,UAAS,IAClCb,EAAiBc,OAASxB,EAAMyB,MAAQf,EAAiBc,WAAQ,IAG7DI,EAAsBC,EAAAA,gBAC1B,IAAM7B,EAAM8B,cACZ,IAAM9B,EAAMe,SAGRb,kBAACA,YAAmB6B,GAAa5B,iBAAc,IAAMH,EAAMI,SAASJ,GAEpEgC,EAAwBT,EAAAA,UAC5B,IAAMrB,EAAkBsB,QAGpBS,EAAaV,EAAAA,SAAS,CAC1BW,IAAK,IAAM7B,EAAWmB,MACtBW,IAAMC,IACJ/B,EAAWmB,MAAQY,CAAA,WAIVC,EAAA,CACXC,KAAM,KACJpB,EAAQM,OAAQ,CAAA,EAElBe,QAASvB,EACTwB,MAAO,KACLtB,EAAQM,OAAQ,CAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),a=require("./classes-BPvGsmbC.js"),l=require("./useAlignment-BTUJZ_9x.js"),t=require("./useDefaults-q0yyNSBk.js"),s=require("./constants-B1zBgSOo.js"),o=require("./event-UQ02889E.js"),u=require("./dom-Dzr6gmPm.js"),i=require("./index-BjjsoN-a.js"),n=["aria-disabled","aria-label"],d=["displayIndex"],r=e.defineComponent({__name:"BPagination",props:e.mergeModels({align:{default:"start"},ariaControls:{default:void 0},ariaLabel:{default:"Pagination"},disabled:{type:Boolean,default:!1},ellipsisClass:{default:void 0},ellipsisText:{default:"…"},firstClass:{default:void 0},firstNumber:{type:Boolean,default:!1},firstText:{default:"«"},noEllipsis:{type:Boolean,default:!1},noGotoEndButtons:{type:Boolean,default:!1},labelFirstPage:{default:"Go to first page"},labelLastPage:{default:"Go to last page"},labelNextPage:{default:"Go to next page"},labelPage:{default:"Go to page"},labelPrevPage:{default:"Go to previous page"},lastClass:{default:void 0},lastNumber:{type:Boolean,default:!1},lastText:{default:"»"},limit:{default:5},nextClass:{default:void 0},nextText:{default:"›"},pageClass:{default:void 0},perPage:{default:20},pills:{type:Boolean,default:!1},prevClass:{default:void 0},prevText:{default:"‹"},size:{default:void 0},totalRows:{default:0}},{modelValue:{default:1},modelModifiers:{}}),emits:e.mergeModels(["page-click"],["update:modelValue"]),setup(r,{emit:v}){const p=-2,c=-3,m=r,f=t.useDefaults(m,"BPagination"),g=v,b=e.useModel(r,"modelValue"),x=e.useTemplateRef("_pageElements"),T=i.useToNumber((()=>f.limit),{nanToZero:!0,method:"parseInt"}),h=i.useToNumber((()=>f.perPage),{nanToZero:!0,method:"parseInt"}),N=i.useToNumber((()=>f.totalRows),{nanToZero:!0,method:"parseInt"}),k=i.useToNumber(b,{nanToZero:!0,method:"parseInt"}),C=e.computed((()=>Math.max(h.value||20,1))),E=e.computed((()=>Math.max(N.value||0,0))),P=e.computed((()=>Math.ceil(E.value/C.value))),B=e.computed((()=>"fill"===f.align)),y=e.computed((()=>"fill"===f.align?"start":f.align)),V=l.useAlignment(y),_=e=>e===J.value,I=e=>f.disabled||_(e)||J.value<1||e<1||e>P.value,w=e.computed((()=>I(1))),A=e.computed((()=>I(J.value-1))),M=e.computed((()=>I(P.value))),D=e.computed((()=>I(J.value+1))),O=({page:e,classVal:a,disabled:l,slotName:t,textValue:s,tabIndex:o,label:u,position:i,isActive:n,hidden:d,isSmHidden:r})=>({li:{class:["page-item",{active:n,disabled:l,"bv-d-sm-down-none":r,"flex-fill":B.value,"d-flex":B.value&&!l},a],role:"presentation","aria-hidden":d},button:{is:l?"span":"button",class:["page-link","text-center",{"flex-grow-1":!l&&B.value}],"aria-label":u,"aria-controls":f.ariaControls||void 0,"aria-disabled":!!l||void 0,"aria-posinset":i,"aria-setsize":i?P.value:void 0,role:"menuitem",type:l?void 0:"button",tabindex:l?void 0:o},text:{name:t,active:n,value:s??e,page:e,disabled:l,index:e-1,content:s?void 0:e},clickHandler:a=>F(a,e)}),G=({page:e,classVal:a,disabled:l,slotName:t,textValue:s,label:o})=>O({page:e,classVal:a,disabled:l,slotName:t,textValue:s,label:o,tabIndex:"-1"}),L=(e,a)=>{return O({page:e,disabled:f.disabled,classVal:f.pageClass,slotName:"page",label:f.labelPage?`${f.labelPage} ${e}`:void 0,tabIndex:(l=e,(f.disabled?null:_(l)?"0":"-1")??void 0),position:e,isActive:_(e),isSmHidden:a});var l},S=e.computed((()=>G({page:1,disabled:w.value,classVal:f.firstClass,slotName:"first-text",textValue:f.firstText,label:f.labelFirstPage}))),q=e.computed((()=>G({page:Math.max(J.value-1,1),disabled:A.value,classVal:f.prevClass,slotName:"prev-text",textValue:f.prevText,label:f.labelPrevPage}))),z=e.computed((()=>G({page:Math.min(J.value+1,P.value),disabled:D.value,classVal:f.nextClass,slotName:"next-text",textValue:f.nextText,label:f.labelNextPage}))),R=e.computed((()=>G({page:P.value,disabled:M.value,classVal:f.lastClass,slotName:"last-text",textValue:f.lastText,label:f.labelLastPage}))),j=e.computed((()=>({li:{class:["page-item","disabled","text-center","bv-d-sm-down-none",B.value?"flex-fill":"",f.ellipsisClass],role:"separator"},span:{class:["page-link"]}}))),$=e.computed((()=>[V.value,{[`pagination-${f.size}`]:void 0!==f.size,"b-pagination-pills":f.pills}])),H=e.computed((()=>({pageSize:C.value,totalRows:N.value,numberOfPages:P.value}))),F=(l,t)=>{if(t===J.value)return;const s=new a.BvEvent("page-click",{cancelable:!0,target:l.target});g("page-click",s,t),s.defaultPrevented||(b.value=t,e.nextTick((()=>{1===t?K():t===H.value.numberOfPages&&W()})))},Z=e=>{const a=!(!e||e.nodeType!==Node.ELEMENT_NODE),l=a?e.hasAttribute("disabled"):null,t=!(!a||!e.classList)&&e.classList.contains("disabled");return!a||e.disabled||l||t},U=()=>{var e,a,l,t;return null==(t=null==(l=null==(a=null==(e=[...x.value??[]])?void 0:e.sort(((e,a)=>parseInt(e.getAttribute("displayIndex")||"0")-parseInt(a.getAttribute("displayIndex")||"0"))))?void 0:a.map((e=>e.children[0])))?void 0:l.filter((e=>"none"!==e.getAttribute("display")&&"BUTTON"===e.tagName.toUpperCase()&&(e.getBoundingClientRect(),!0))))?void 0:t.map((e=>e))},K=()=>{e.nextTick((()=>{const e=U().find((e=>!Z(e)));null==e||e.focus()}))},W=()=>{e.nextTick((()=>{const e=U().reverse().find((e=>!Z(e)));null==e||e.focus()}))},X=a=>{const{code:l,shiftKey:t}=a;l===s.CODE_LEFT||l===s.CODE_UP?(o.stopEvent(a),t?K():e.nextTick((()=>{var e;const a=U(),l=a.indexOf(u.getActiveElement());l>0&&!Z(a[l-1])&&(null==(e=a[l-1])||e.focus())}))):l!==s.CODE_RIGHT&&l!==s.CODE_DOWN||(o.stopEvent(a),t?W():e.nextTick((()=>{var e;const a=U(),l=a.indexOf(u.getActiveElement());l<a.length-1&&!Z(a[l+1])&&(null==(e=a[l+1])||e.focus())})))},J=e.computed((()=>{const e=k.value||1;return e>P.value?P.value:e<1?1:e}));e.watch(H,((e,a)=>{a.pageSize!==e.pageSize&&a.totalRows===e.totalRows&&(b.value=1)}));const Q=e.computed((()=>f.noGotoEndButtons&&!f.firstNumber?1:0)),Y=e.computed((()=>f.noGotoEndButtons&&!f.lastNumber?1:0)),ee=e.computed((()=>Q.value?0:1)),ae=e.computed((()=>Y.value?0:1)),le=e.computed((()=>f.firstNumber?1:0)),te=e.computed((()=>f.lastNumber?1:0)),se=e.computed((()=>Math.floor(T.value/2))),oe=e.computed((()=>{const{value:e}=J,a=ue.value.map((e=>{switch(e){case-1:return{id:e,...S.value};case p:return{id:e,...q.value};case c:return{id:e,...z.value};case-4:return{id:e,...R.value};case-5:case-6:return{id:e,...j.value};default:return{id:e,...L(e)}}}));if(P.value>3){if(e>P.value-se.value-te.value){const e=2+ee.value;a[e]={id:a[e].id,...L(a[e].id,!0)}}if(e<=se.value+le.value){const e=a.length-(3+ae.value);a[e]={id:a[e].id,...L(a[e].id,!0)}}}return a})),ue=e.computed((()=>{const e=P.value,{value:a}=J,l=T.value,t=f.noEllipsis||l<=3;if(e<l+le.value+te.value)return[le.value||Q.value?null:-1,p,...Array.from({length:e},((e,a)=>a+1)),c,te.value||Y.value?null:-4].filter((e=>null!==e));const s=Array.from({length:l+4-(Q.value+Y.value)});if(Q.value?s[0]=p:le.value?(s[0]=p,s[1]=1):(s[0]=-1,s[1]=p),Y.value?s[s.length-1]=c:te.value?(s[s.length-1]=c,s[s.length-2]=e):(s[s.length-1]=-4,s[s.length-2]=c),a<=se.value+le.value){for(let e=1;e<=l;e++)s[e+1-Q.value]=e+le.value;t||(s[s.length-(2+ae.value)]=-6)}if(a>e-se.value-te.value){const a=e-(l-1)-te.value;for(let e=0;e<l;e++)s[e+2-Q.value]=a+e;t||(s[1+ee.value]=-5)}if(!s[2]){const e=a-Math.floor(l/2);for(let a=0;a<l;a++)s[a+2-Q.value]=e+a;t||(s[1+ee.value]=-5,s[s.length-(2+ae.value)]=-6)}return s.filter((e=>null!==e))}));return(a,l)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(["pagination",$.value]),role:"menubar","aria-disabled":e.unref(f).disabled,"aria-label":e.unref(f).ariaLabel||void 0,onKeydown:X},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe.value,((l,t)=>(e.openBlock(),e.createElementBlock("li",e.mergeProps({key:`page-${l.id}`,ref_for:!0},l.li,{ref_for:!0,ref:"_pageElements",displayIndex:t}),[-5===l.id||-6===l.id?(e.openBlock(),e.createElementBlock("span",e.mergeProps({key:0,ref_for:!0},j.value.span),[e.renderSlot(a.$slots,"ellipsis-text",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(f).ellipsisText||"..."),1)]))],16)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.button.is),e.mergeProps({key:1,ref_for:!0},l.button,{onClick:l.clickHandler}),{default:e.withCtx((()=>[e.renderSlot(a.$slots,l.text.name,{disabled:l.text.disabled,page:l.text.page,index:l.text.index,active:l.text.active,content:l.text.value},(()=>[e.createTextVNode(e.toDisplayString(l.text.value),1)]))])),_:2},1040,["onClick"]))],16,d)))),128))],42,n))}});exports._sfc_main=r;
2
- //# sourceMappingURL=BPagination.vue_vue_type_script_setup_true_lang-sG5HjqiE.js.map
1
+ "use strict";const e=require("vue"),a=require("./classes-BPvGsmbC.js"),l=require("./useAlignment-BTUJZ_9x.js"),t=require("./useDefaults-q0yyNSBk.js"),s=require("./constants-B1zBgSOo.js"),o=require("./event-UQ02889E.js"),u=require("./dom-Dzr6gmPm.js"),i=require("./index-BjjsoN-a.js"),n=["aria-disabled","aria-label"],d=["displayIndex"],r=e.defineComponent({__name:"BPagination",props:e.mergeModels({align:{default:"start"},ariaControls:{default:void 0},ariaLabel:{default:"Pagination"},disabled:{type:Boolean,default:!1},ellipsisClass:{default:void 0},ellipsisText:{default:"…"},firstClass:{default:void 0},firstNumber:{type:Boolean,default:!1},firstText:{default:"«"},noEllipsis:{type:Boolean,default:!1},noGotoEndButtons:{type:Boolean,default:!1},labelFirstPage:{default:"Go to first page"},labelLastPage:{default:"Go to last page"},labelNextPage:{default:"Go to next page"},labelPage:{default:"Go to page"},labelPrevPage:{default:"Go to previous page"},lastClass:{default:void 0},lastNumber:{type:Boolean,default:!1},lastText:{default:"»"},limit:{default:5},nextClass:{default:void 0},nextText:{default:"›"},pageClass:{default:void 0},perPage:{default:20},pills:{type:Boolean,default:!1},prevClass:{default:void 0},prevText:{default:"‹"},size:{default:void 0},totalRows:{default:0}},{modelValue:{default:1},modelModifiers:{}}),emits:e.mergeModels(["page-click"],["update:modelValue"]),setup(r,{emit:v}){const p=-2,c=-3,m=r,f=t.useDefaults(m,"BPagination"),g=v,b=e.useModel(r,"modelValue"),x=e.useTemplateRef("_pageElements"),h=i.useToNumber((()=>f.limit),{nanToZero:!0,method:"parseInt"}),T=i.useToNumber((()=>f.perPage),{nanToZero:!0,method:"parseInt"}),N=i.useToNumber((()=>f.totalRows),{nanToZero:!0,method:"parseInt"}),k=i.useToNumber(b,{nanToZero:!0,method:"parseInt"}),C=e.computed((()=>Math.max(T.value||20,1))),E=e.computed((()=>Math.max(N.value||0,0))),P=e.computed((()=>Math.ceil(E.value/C.value))),B=e.computed((()=>"fill"===f.align)),y=e.computed((()=>"fill"===f.align?"start":f.align)),V=l.useAlignment(y),_=e=>e===J.value,w=e=>f.disabled||_(e)||J.value<1||e<1||e>P.value,I=e.computed((()=>w(1))),A=e.computed((()=>w(J.value-1))),M=e.computed((()=>w(P.value))),D=e.computed((()=>w(J.value+1))),O=({page:e,classVal:a,disabled:l,slotName:t,textValue:s,tabIndex:o,label:u,position:i,isActive:n,hidden:d,isSmHidden:r})=>({li:{class:["page-item",{active:n,disabled:l,"bv-d-sm-down-none":r,"flex-fill":B.value,"d-flex":B.value&&!l},a],role:"presentation","aria-hidden":d},button:{is:l?"span":"button",class:["page-link","text-center",{"flex-grow-1":!l&&B.value}],"aria-label":u,"aria-controls":f.ariaControls||void 0,"aria-disabled":!!l||void 0,"aria-posinset":i,"aria-setsize":i?P.value:void 0,role:"menuitem",type:l?void 0:"button",tabindex:l?void 0:o},text:{name:t,active:n,value:s??e,page:e,disabled:l,index:e-1,content:s?void 0:e},clickHandler:a=>F(a,e)}),G=({page:e,classVal:a,disabled:l,slotName:t,textValue:s,label:o})=>O({page:e,classVal:a,disabled:l,slotName:t,textValue:s,label:o,tabIndex:"-1"}),L=(e,a)=>{return O({page:e,disabled:f.disabled,classVal:f.pageClass,slotName:"page",label:f.labelPage?`${f.labelPage} ${e}`:void 0,tabIndex:(l=e,(f.disabled?null:_(l)?"0":"-1")??void 0),position:e,isActive:_(e),isSmHidden:a});var l},S=e.computed((()=>G({page:1,disabled:I.value,classVal:f.firstClass,slotName:"first-text",textValue:f.firstText,label:f.labelFirstPage}))),q=e.computed((()=>G({page:Math.max(J.value-1,1),disabled:A.value,classVal:f.prevClass,slotName:"prev-text",textValue:f.prevText,label:f.labelPrevPage}))),z=e.computed((()=>G({page:Math.min(J.value+1,P.value),disabled:D.value,classVal:f.nextClass,slotName:"next-text",textValue:f.nextText,label:f.labelNextPage}))),R=e.computed((()=>G({page:P.value,disabled:M.value,classVal:f.lastClass,slotName:"last-text",textValue:f.lastText,label:f.labelLastPage}))),j=e.computed((()=>({li:{class:["page-item","disabled","text-center","bv-d-sm-down-none",B.value?"flex-fill":"",f.ellipsisClass],role:"separator"},span:{class:["page-link"]}}))),$=e.computed((()=>[V.value,{[`pagination-${f.size}`]:void 0!==f.size,"b-pagination-pills":f.pills}])),H=e.computed((()=>({pageSize:C.value,totalRows:N.value,numberOfPages:P.value}))),F=(l,t)=>{if(t===J.value)return;const s=new a.BvEvent("page-click",{cancelable:!0,target:l.target});g("page-click",s,t),s.defaultPrevented||(b.value=t,e.nextTick((()=>{1===t?K():t===H.value.numberOfPages&&W()})))},Z=e=>{const a=!(!e||e.nodeType!==Node.ELEMENT_NODE),l=a?e.hasAttribute("disabled"):null,t=!(!a||!e.classList)&&e.classList.contains("disabled");return!a||e.disabled||l||t},U=()=>{var e,a,l,t;return null==(t=null==(l=null==(a=null==(e=[...x.value??[]])?void 0:e.sort(((e,a)=>parseInt(e.getAttribute("displayIndex")||"0")-parseInt(a.getAttribute("displayIndex")||"0"))))?void 0:a.map((e=>e.children[0])))?void 0:l.filter((e=>{if("none"===e.getAttribute("display")||"BUTTON"!==e.tagName.toUpperCase())return!1;const a=e.getBoundingClientRect();return!!(a&&a.height>0&&a.width>0)})))?void 0:t.map((e=>e))},K=()=>{e.nextTick((()=>{const e=U().find((e=>!Z(e)));null==e||e.focus()}))},W=()=>{e.nextTick((()=>{const e=U().reverse().find((e=>!Z(e)));null==e||e.focus()}))},X=a=>{const{code:l,shiftKey:t}=a;l===s.CODE_LEFT||l===s.CODE_UP?(o.stopEvent(a),t?K():e.nextTick((()=>{var e;const a=U(),l=a.indexOf(u.getActiveElement());l>0&&!Z(a[l-1])&&(null==(e=a[l-1])||e.focus())}))):l!==s.CODE_RIGHT&&l!==s.CODE_DOWN||(o.stopEvent(a),t?W():e.nextTick((()=>{var e;const a=U(),l=a.indexOf(u.getActiveElement());l<a.length-1&&!Z(a[l+1])&&(null==(e=a[l+1])||e.focus())})))},J=e.computed((()=>{const e=k.value||1;return e>P.value?P.value:e<1?1:e}));e.watch(H,((e,a)=>{a.pageSize!==e.pageSize&&a.totalRows===e.totalRows&&(b.value=1)}));const Q=e.computed((()=>f.noGotoEndButtons&&!f.firstNumber?1:0)),Y=e.computed((()=>f.noGotoEndButtons&&!f.lastNumber?1:0)),ee=e.computed((()=>Q.value?0:1)),ae=e.computed((()=>Y.value?0:1)),le=e.computed((()=>f.firstNumber?1:0)),te=e.computed((()=>f.lastNumber?1:0)),se=e.computed((()=>Math.floor(h.value/2))),oe=e.computed((()=>{const{value:e}=J,a=ue.value.map((e=>{switch(e){case-1:return{id:e,...S.value};case p:return{id:e,...q.value};case c:return{id:e,...z.value};case-4:return{id:e,...R.value};case-5:case-6:return{id:e,...j.value};default:return{id:e,...L(e)}}}));if(P.value>3){if(e>P.value-se.value-te.value){const e=2+ee.value;a[e]={id:a[e].id,...L(a[e].id,!0)}}if(e<=se.value+le.value){const e=a.length-(3+ae.value);a[e]={id:a[e].id,...L(a[e].id,!0)}}}return a})),ue=e.computed((()=>{const e=P.value,{value:a}=J,l=h.value,t=f.noEllipsis||l<=3;if(e<l+le.value+te.value)return[le.value||Q.value?null:-1,p,...Array.from({length:e},((e,a)=>a+1)),c,te.value||Y.value?null:-4].filter((e=>null!==e));const s=Array.from({length:l+4-(Q.value+Y.value)});if(Q.value?s[0]=p:le.value?(s[0]=p,s[1]=1):(s[0]=-1,s[1]=p),Y.value?s[s.length-1]=c:te.value?(s[s.length-1]=c,s[s.length-2]=e):(s[s.length-1]=-4,s[s.length-2]=c),a<=se.value+le.value){for(let e=1;e<=l;e++)s[e+1-Q.value]=e+le.value;t||(s[s.length-(2+ae.value)]=-6)}if(a>e-se.value-te.value){const a=e-(l-1)-te.value;for(let e=0;e<l;e++)s[e+2-Q.value]=a+e;t||(s[1+ee.value]=-5)}if(!s[2]){const e=a-Math.floor(l/2);for(let a=0;a<l;a++)s[a+2-Q.value]=e+a;t||(s[1+ee.value]=-5,s[s.length-(2+ae.value)]=-6)}return s.filter((e=>null!==e))}));return(a,l)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(["pagination",$.value]),role:"menubar","aria-disabled":e.unref(f).disabled,"aria-label":e.unref(f).ariaLabel||void 0,onKeydown:X},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe.value,((l,t)=>(e.openBlock(),e.createElementBlock("li",e.mergeProps({key:`page-${l.id}`,ref_for:!0},l.li,{ref_for:!0,ref:"_pageElements",displayIndex:t}),[-5===l.id||-6===l.id?(e.openBlock(),e.createElementBlock("span",e.mergeProps({key:0,ref_for:!0},j.value.span),[e.renderSlot(a.$slots,"ellipsis-text",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(f).ellipsisText||"..."),1)]))],16)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.button.is),e.mergeProps({key:1,ref_for:!0},l.button,{onClick:l.clickHandler}),{default:e.withCtx((()=>[e.renderSlot(a.$slots,l.text.name,{disabled:l.text.disabled,page:l.text.page,index:l.text.index,active:l.text.active,content:l.text.value},(()=>[e.createTextVNode(e.toDisplayString(l.text.value),1)]))])),_:2},1040,["onClick"]))],16,d)))),128))],42,n))}});exports._sfc_main=r;
2
+ //# sourceMappingURL=BPagination.vue_vue_type_script_setup_true_lang-BZqfKigW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BPagination.vue_vue_type_script_setup_true_lang-BZqfKigW.js","sources":["../src/components/BPagination/BPagination.vue"],"sourcesContent":["<template>\n <ul\n class=\"pagination\"\n :class=\"computedWrapperClasses\"\n role=\"menubar\"\n :aria-disabled=\"props.disabled\"\n :aria-label=\"props.ariaLabel || undefined\"\n @keydown=\"handleKeyNav\"\n >\n <li\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page.id}`\"\n v-bind=\"page.li\"\n ref=\"_pageElements\"\n :displayIndex=\"index\"\n >\n <span\n v-if=\"page.id === FIRST_ELLIPSIS || page.id === LAST_ELLIPSIS\"\n v-bind=\"ellipsisProps.span\"\n >\n <slot name=\"ellipsis-text\">\n {{ props.ellipsisText || '...' }}\n </slot>\n </span>\n <component v-bind=\"page.button\" :is=\"page.button.is\" v-else @click=\"page.clickHandler\">\n <slot\n :name=\"page.text.name\"\n :disabled=\"page.text.disabled\"\n :page=\"page.text.page\"\n :index=\"page.text.index\"\n :active=\"page.text.active\"\n :content=\"page.text.value\"\n >\n {{ page.text.value }}\n </slot>\n </component>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\nimport {BvEvent} from '../../utils'\nimport {computed, nextTick, useTemplateRef, watch} from 'vue'\nimport type {BPaginationProps} from '../../types/ComponentProps'\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ClassValue} from '../../types/AnyValuedAttributes'\nimport {CODE_DOWN, CODE_LEFT, CODE_RIGHT, CODE_UP} from '../../utils/constants'\nimport {stopEvent} from '../../utils/event'\nimport {getActiveElement} from '../../utils/dom'\n\n// Threshold of limit size when we start/stop showing ellipsis\nconst ELLIPSIS_THRESHOLD = 3\n\nconst FIRST_BUTTON = -1\nconst PREV_BUTTON = -2\nconst NEXT_BUTTON = -3\nconst LAST_BUTTON = -4\nconst FIRST_ELLIPSIS = -5\nconst LAST_ELLIPSIS = -6\n\n// This is necessary because type inference isn't succeeding for the pages computed\ninterface PageButton {\n id: number\n li: Record<string, unknown>\n button: Record<string, unknown>\n text: Record<string, unknown>\n clickHandler: (e: Readonly<MouseEvent>) => void\n}\n\nconst _props = withDefaults(defineProps<Omit<BPaginationProps, 'modelValue'>>(), {\n align: 'start',\n ariaControls: undefined,\n ariaLabel: 'Pagination',\n disabled: false,\n ellipsisClass: undefined,\n ellipsisText: '\\u2026',\n firstClass: undefined,\n firstNumber: false,\n firstText: '\\u00AB',\n noEllipsis: false,\n noGotoEndButtons: false,\n labelFirstPage: 'Go to first page',\n labelLastPage: 'Go to last page',\n labelNextPage: 'Go to next page',\n labelPage: 'Go to page',\n labelPrevPage: 'Go to previous page',\n lastClass: undefined,\n lastNumber: false,\n lastText: '\\u00BB',\n limit: 5,\n nextClass: undefined,\n nextText: '\\u203A',\n pageClass: undefined,\n perPage: DEFAULT_PER_PAGE,\n pills: false,\n prevClass: undefined,\n prevText: '\\u2039',\n size: undefined,\n totalRows: DEFAULT_TOTAL_ROWS,\n})\nconst props = useDefaults(_props, 'BPagination')\n\nconst emit = defineEmits<{\n 'page-click': [event: BvEvent, pageNumber: number]\n}>()\n\nconst modelValue = defineModel<Exclude<BPaginationProps['modelValue'], undefined>>({\n default: 1,\n})\n\nconst pageElements = useTemplateRef<HTMLLIElement[]>('_pageElements')\n\nconst limitNumber = useToNumber(() => props.limit, {nanToZero: true, method: 'parseInt'})\nconst perPageNumber = useToNumber(() => props.perPage, {nanToZero: true, method: 'parseInt'})\nconst totalRowsNumber = useToNumber(() => props.totalRows, {nanToZero: true, method: 'parseInt'})\nconst modelValueNumber = useToNumber(modelValue, {nanToZero: true, method: 'parseInt'})\n\nconst perPageSanitized = computed(() => Math.max(perPageNumber.value || DEFAULT_PER_PAGE, 1))\nconst totalRowsSanitized = computed(() => Math.max(totalRowsNumber.value || DEFAULT_TOTAL_ROWS, 0))\n// Use Active to on page-item to denote active tab\nconst numberOfPages = computed(() => Math.ceil(totalRowsSanitized.value / perPageSanitized.value))\nconst computedFill = computed(() => props.align === 'fill')\n// This doesn't use the computedFill util because TS cannot infer that it would never be 'fill'\nconst justifyAlign = computed(() => (props.align === 'fill' ? 'start' : props.align))\n\nconst alignment = useAlignment(justifyAlign)\n\nconst isActivePage = (pageNumber: number) => pageNumber === computedModelValue.value\nconst getTabIndex = (num: number) => (props.disabled ? null : isActivePage(num) ? '0' : '-1')\n\nconst checkDisabled = (num: number) =>\n props.disabled ||\n isActivePage(num) ||\n computedModelValue.value < 1 ||\n // Check if the number is out of bounds\n num < 1 ||\n num > numberOfPages.value\n\nconst firstDisabled = computed(() => checkDisabled(1))\nconst prevDisabled = computed(() => checkDisabled(computedModelValue.value - 1))\nconst lastDisabled = computed(() => checkDisabled(numberOfPages.value))\nconst nextDisabled = computed(() => checkDisabled(computedModelValue.value + 1))\n\nconst getBaseButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n tabIndex,\n label,\n position,\n isActive,\n hidden,\n isSmHidden,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: string\n textValue?: string\n tabIndex?: string\n label?: string\n position?: number\n isActive?: boolean\n hidden?: boolean\n isSmHidden?: boolean\n}) => ({\n li: {\n 'class': [\n 'page-item',\n {\n 'active': isActive,\n disabled,\n 'bv-d-sm-down-none': isSmHidden,\n 'flex-fill': computedFill.value,\n 'd-flex': computedFill.value && !disabled,\n },\n classVal,\n ],\n 'role': 'presentation',\n 'aria-hidden': hidden,\n },\n button: {\n 'is': disabled ? 'span' : 'button',\n 'class': ['page-link', 'text-center', {'flex-grow-1': !disabled && computedFill.value}],\n 'aria-label': label,\n 'aria-controls': props.ariaControls || undefined,\n 'aria-disabled': disabled ? true : undefined,\n 'aria-posinset': position,\n 'aria-setsize': position ? numberOfPages.value : undefined,\n 'role': 'menuitem',\n 'type': disabled ? undefined : 'button',\n 'tabindex': disabled ? undefined : tabIndex,\n },\n text: {\n name: slotName,\n active: isActive,\n value: textValue ?? page,\n page,\n disabled,\n index: page - 1,\n content: textValue ? undefined : page,\n },\n clickHandler: (e: Readonly<MouseEvent>) => pageClick(e, page),\n})\n\nconst getButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n label,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: string\n textValue?: string\n label: string\n}) => getBaseButtonProps({page, classVal, disabled, slotName, textValue, label, tabIndex: '-1'})\n\nconst getPageButtonProps = (page: number, isSmHidden?: boolean) =>\n getBaseButtonProps({\n page,\n disabled: props.disabled,\n classVal: props.pageClass,\n slotName: 'page',\n label: props.labelPage ? `${props.labelPage} ${page}` : undefined,\n tabIndex: getTabIndex(page) ?? undefined,\n position: page,\n isActive: isActivePage(page),\n isSmHidden,\n })\n\nconst firstButtonProps = computed(() =>\n getButtonProps({\n page: 1,\n disabled: firstDisabled.value,\n classVal: props.firstClass,\n slotName: 'first-text',\n textValue: props.firstText,\n label: props.labelFirstPage,\n })\n)\nconst prevButtonProps = computed(() =>\n getButtonProps({\n page: Math.max(computedModelValue.value - 1, 1),\n disabled: prevDisabled.value,\n classVal: props.prevClass,\n slotName: 'prev-text',\n textValue: props.prevText,\n label: props.labelPrevPage,\n })\n)\nconst nextButtonProps = computed(() =>\n getButtonProps({\n page: Math.min(computedModelValue.value + 1, numberOfPages.value),\n disabled: nextDisabled.value,\n classVal: props.nextClass,\n slotName: 'next-text',\n textValue: props.nextText,\n label: props.labelNextPage,\n })\n)\nconst lastButtonProps = computed(() =>\n getButtonProps({\n page: numberOfPages.value,\n disabled: lastDisabled.value,\n classVal: props.lastClass,\n slotName: 'last-text',\n textValue: props.lastText,\n label: props.labelLastPage,\n })\n)\n\nconst ellipsisProps = computed(() => ({\n li: {\n class: [\n 'page-item',\n 'disabled',\n 'text-center',\n 'bv-d-sm-down-none',\n computedFill.value ? 'flex-fill' : '',\n props.ellipsisClass,\n ],\n role: 'separator',\n },\n span: {\n class: ['page-link'],\n },\n}))\n\nconst computedWrapperClasses = computed(() => [\n alignment.value,\n {\n [`pagination-${props.size}`]: props.size !== undefined,\n 'b-pagination-pills': props.pills,\n },\n])\n\nconst pagination = computed(() => ({\n pageSize: perPageSanitized.value,\n totalRows: totalRowsNumber.value,\n numberOfPages: numberOfPages.value,\n}))\n\nconst pageClick = (event: Readonly<MouseEvent>, pageNumber: number) => {\n if (pageNumber === computedModelValue.value) return\n const clickEvent = new BvEvent('page-click', {\n cancelable: true,\n target: event.target,\n })\n emit('page-click', clickEvent, pageNumber)\n\n if (clickEvent.defaultPrevented) return\n\n modelValue.value = pageNumber\n\n nextTick(() => {\n if (pageNumber === 1) {\n focusFirst()\n } else if (pageNumber === pagination.value.numberOfPages) {\n focusLast()\n }\n })\n // nextTick(() => {\n // if (isVisible(target) && un_element.contains(target)) {\n // attemptFocus(target)\n //} else {\n //this.focusCurrent()\n //}\n // })\n}\n\nconst isDisabled = (el: HTMLButtonElement) => {\n const isElement = !!(el && el.nodeType === Node.ELEMENT_NODE)\n const hasAttr = isElement ? el.hasAttribute('disabled') : null\n const hasClass = isElement && el.classList ? el.classList.contains('disabled') : false\n\n return !isElement || el.disabled || hasAttr || hasClass\n}\n\nconst getButtons = (): HTMLButtonElement[] =>\n [...(pageElements.value ?? [])]\n ?.sort(\n (a, b) =>\n parseInt(a.getAttribute('displayIndex') || '0') -\n parseInt(b.getAttribute('displayIndex') || '0')\n )\n ?.map((page) => page.children[0])\n ?.filter((el) => {\n if (el.getAttribute('display') === 'none' || el.tagName.toUpperCase() !== 'BUTTON') {\n return false\n }\n\n const bcr = el.getBoundingClientRect()\n\n return !!(bcr && bcr.height > 0 && bcr.width > 0)\n })\n ?.map((el) => el as HTMLButtonElement)\n\nconst focusFirst = () => {\n nextTick(() => {\n const btn = getButtons().find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusPrev = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n\n if (index > 0 && !isDisabled(buttons[index - 1])) {\n buttons[index - 1]?.focus()\n }\n })\n}\n\nconst focusLast = () => {\n nextTick(() => {\n const btn = getButtons()\n .reverse()\n .find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusNext = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n if (index < buttons.length - 1 && !isDisabled(buttons[index + 1])) {\n buttons[index + 1]?.focus()\n }\n })\n}\n\nconst handleKeyNav = (event: KeyboardEvent) => {\n const {code, shiftKey} = event\n if (code === CODE_LEFT || code === CODE_UP) {\n stopEvent(event)\n if (shiftKey) {\n focusFirst()\n } else {\n focusPrev()\n }\n } else if (code === CODE_RIGHT || code === CODE_DOWN) {\n stopEvent(event)\n if (shiftKey) {\n focusLast()\n } else {\n focusNext()\n }\n }\n}\n\nconst computedModelValue = computed(() => {\n const page = modelValueNumber.value || 1\n return page > numberOfPages.value ? numberOfPages.value : page < 1 ? 1 : page\n})\n\nwatch(pagination, (oldValue, newValue) => {\n if (newValue.pageSize !== oldValue.pageSize && newValue.totalRows === oldValue.totalRows) {\n // If the page size changes, reset to page 1\n modelValue.value = 1\n }\n})\n\nconst noFirstButton = computed(() => (props.noGotoEndButtons && !props.firstNumber ? 1 : 0))\nconst noLastButton = computed(() => (props.noGotoEndButtons && !props.lastNumber ? 1 : 0))\nconst showFirstButton = computed(() => (noFirstButton.value ? 0 : 1))\nconst showLastButton = computed(() => (noLastButton.value ? 0 : 1))\nconst firstPage = computed(() => (props.firstNumber ? 1 : 0))\nconst lastPage = computed(() => (props.lastNumber ? 1 : 0))\nconst halfLimit = computed(() => Math.floor(limitNumber.value / 2))\n\nconst pages = computed(() => {\n const {value} = computedModelValue\n\n const els = elements.value.map((p) => {\n switch (p) {\n case FIRST_BUTTON:\n return {id: p, ...firstButtonProps.value}\n case PREV_BUTTON:\n return {id: p, ...prevButtonProps.value}\n case NEXT_BUTTON:\n return {id: p, ...nextButtonProps.value}\n case LAST_BUTTON:\n return {id: p, ...lastButtonProps.value}\n case FIRST_ELLIPSIS:\n case LAST_ELLIPSIS:\n return {id: p, ...ellipsisProps.value}\n default:\n return {id: p, ...getPageButtonProps(p)}\n }\n })\n\n if (numberOfPages.value > 3) {\n if (value > numberOfPages.value - halfLimit.value - lastPage.value) {\n const idx = 2 + showFirstButton.value\n els[idx] = {id: els[idx].id, ...getPageButtonProps(els[idx].id, true)}\n }\n\n if (value <= halfLimit.value + firstPage.value) {\n const idx = els.length - (3 + showLastButton.value)\n els[idx] = {id: els[idx].id, ...getPageButtonProps(els[idx].id, true)}\n }\n }\n\n return els as PageButton[]\n})\n\nconst elements = computed(() => {\n // The idea here is to create an array of all the buttons on the page control.\n // This way we can keep the invariants in one place and the template code just\n // iterates over the array.\n\n const pages = numberOfPages.value\n const {value} = computedModelValue\n const limit = limitNumber.value\n const noEllipsis = props.noEllipsis || limit <= ELLIPSIS_THRESHOLD\n\n // The first case is when all of the page buttons fit on the control, this is\n // the simplest case and the only one that will create an array smaller than\n // Limit + 4 - noEndButtons * 2 (the [first, last,] prev, next buttons)\n\n if (pages < limit + firstPage.value + lastPage.value) {\n return [\n !firstPage.value && !noFirstButton.value ? FIRST_BUTTON : null,\n PREV_BUTTON,\n ...Array.from({length: pages}, (_, index) => index + 1),\n NEXT_BUTTON,\n !lastPage.value && !noLastButton.value ? LAST_BUTTON : null,\n ].filter((x) => x !== null) as number[]\n }\n\n // All of the remaining cases result in an array that is exactly limit + 4 - noEndButtons * 2 in length, so create\n // the array upfront and set up the beginning and end buttons, then fill the rest for each case\n\n const buttons = Array.from({length: limit + 4 - (noFirstButton.value + noLastButton.value)})\n if (!noFirstButton.value) {\n if (!firstPage.value) {\n buttons[0] = FIRST_BUTTON\n buttons[1] = PREV_BUTTON\n } else {\n buttons[0] = PREV_BUTTON\n buttons[1] = 1\n }\n } else {\n buttons[0] = PREV_BUTTON\n }\n\n if (!noLastButton.value) {\n if (!lastPage.value) {\n buttons[buttons.length - 1] = LAST_BUTTON\n buttons[buttons.length - 2] = NEXT_BUTTON\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n buttons[buttons.length - 2] = pages\n }\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n }\n\n // The next case is where the page buttons start at the begginning, with\n // no ellipsis at the beginning, but one at the end\n\n if (value <= halfLimit.value + firstPage.value) {\n for (let index = 1; index <= limit; index++) {\n buttons[index + 1 - noFirstButton.value] = index + firstPage.value\n }\n\n if (!noEllipsis) {\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n // And then we have the case where the page buttons go up to the end, with no\n // ellipsis at the end, but one at the beginning\n\n if (value > pages - halfLimit.value - lastPage.value) {\n const start = pages - (limit - 1) - lastPage.value\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n }\n }\n\n // Finally we have the case where we have ellipsis at both ends\n if (!buttons[2]) {\n // Is there a more elegant way to ceck that we're in the final case?\n const start = value - Math.floor(limit / 2)\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n //Enable sanity check for debugging purposes\n // for (let i = 0; i < buttons.length; i++) {\n // if (!buttons[i]) {\n // // eslint-disable-next-line no-console\n // console.log(\n // `Failed: button == ${i}, limit=${limit}, pages=${pages}, firstPage=${firstPage}, lastPage=${lastPage}, value=${value}`\n // )\n // }\n // }\n\n return buttons.filter((x) => x !== null) as number[]\n})\n</script>\n\n<script lang=\"ts\">\nconst DEFAULT_PER_PAGE = 20\nconst DEFAULT_TOTAL_ROWS = 0\n</script>\n"],"names":["PREV_BUTTON","NEXT_BUTTON","_props","__props","props","useDefaults","emit","__emit","modelValue","_useModel","pageElements","useTemplateRef","limitNumber","useToNumber","limit","nanToZero","method","perPageNumber","perPage","totalRowsNumber","totalRows","modelValueNumber","perPageSanitized","computed","Math","max","value","totalRowsSanitized","numberOfPages","ceil","computedFill","align","justifyAlign","alignment","useAlignment","isActivePage","pageNumber","computedModelValue","checkDisabled","num","disabled","firstDisabled","prevDisabled","lastDisabled","nextDisabled","getBaseButtonProps","page","classVal","slotName","textValue","tabIndex","label","position","isActive","hidden","isSmHidden","li","class","active","role","button","is","ariaControls","type","tabindex","text","name","index","content","clickHandler","e","pageClick","getButtonProps","getPageButtonProps","pageClass","labelPage","firstButtonProps","firstClass","firstText","labelFirstPage","prevButtonProps","prevClass","prevText","labelPrevPage","nextButtonProps","min","nextClass","nextText","labelNextPage","lastButtonProps","lastClass","lastText","labelLastPage","ellipsisProps","ellipsisClass","span","computedWrapperClasses","size","pills","pagination","pageSize","event","clickEvent","BvEvent","cancelable","target","defaultPrevented","nextTick","focusFirst","focusLast","isDisabled","el","isElement","nodeType","Node","ELEMENT_NODE","hasAttr","hasAttribute","hasClass","classList","contains","getButtons","_d","_c","_b","_a","sort","a","b","parseInt","getAttribute","map","children","filter","tagName","toUpperCase","bcr","getBoundingClientRect","height","width","btn","find","focus","reverse","handleKeyNav","code","shiftKey","CODE_LEFT","CODE_UP","stopEvent","buttons","indexOf","getActiveElement","CODE_RIGHT","CODE_DOWN","length","watch","oldValue","newValue","noFirstButton","noGotoEndButtons","firstNumber","noLastButton","lastNumber","showFirstButton","showLastButton","firstPage","lastPage","halfLimit","floor","pages","els","elements","p","id","idx","noEllipsis","Array","from","_","x","start"],"mappings":"moCAykByB,+HACE,4HArhB3B,MAGMA,GAAc,EACdC,GAAc,EAcdC,EAASC,EA+BTC,EAAQC,EAAAA,YAAYH,EAAQ,eAE5BI,EAAOC,EAIPC,EAAaC,EAAAA,SAElBN,EAAA,cAEKO,EAAeC,iBAAgC,iBAE/CC,EAAcC,eAAY,IAAMT,EAAMU,OAAO,CAACC,WAAW,EAAMC,OAAQ,aACvEC,EAAgBJ,eAAY,IAAMT,EAAMc,SAAS,CAACH,WAAW,EAAMC,OAAQ,aAC3EG,EAAkBN,eAAY,IAAMT,EAAMgB,WAAW,CAACL,WAAW,EAAMC,OAAQ,aAC/EK,EAAmBR,cAAYL,EAAY,CAACO,WAAW,EAAMC,OAAQ,aAErEM,EAAmBC,YAAS,IAAMC,KAAKC,IAAIR,EAAcS,OAkdtC,GAldiE,KACpFC,EAAqBJ,YAAS,IAAMC,KAAKC,IAAIN,EAAgBO,OAkdxC,EAldqE,KAE1FE,EAAgBL,YAAS,IAAMC,KAAKK,KAAKF,EAAmBD,MAAQJ,EAAiBI,SACrFI,EAAeP,EAAAA,UAAS,IAAsB,SAAhBnB,EAAM2B,QAEpCC,EAAeT,YAAS,IAAuB,SAAhBnB,EAAM2B,MAAmB,QAAU3B,EAAM2B,QAExEE,EAAYC,eAAaF,GAEzBG,EAAgBC,GAAuBA,IAAeC,EAAmBX,MAGzEY,EAAiBC,GACrBnC,EAAMoC,UACNL,EAA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+dlB,CAMF,GAAIA,EAAQgJ,EAAQF,GAAU9I,MAAQ6I,GAAS7I,MAAO,CACpD,MAAM2J,EAAQX,GAAS5J,EAAQ,GAAKyJ,GAAS7I,MAC7C,IAAA,IAASyC,EAAQ,EAAGA,EAAQrD,EAAOqD,IACjCmF,EAAQnF,EAAQ,EAAI4F,EAAcrI,OAAS2J,EAAQlH,EAGhD6G,IACK1B,EAAA,EAAIc,GAAgB1I,QA7eX,EA8enB,CAIE,IAAC4H,EAAQ,GAAI,CAEf,MAAM+B,EAAQ3J,EAAQF,KAAKiJ,MAAM3J,EAAQ,GACzC,IAAA,IAASqD,EAAQ,EAAGA,EAAQrD,EAAOqD,IACjCmF,EAAQnF,EAAQ,EAAI4F,EAAcrI,OAAS2J,EAAQlH,EAGhD6G,IACK1B,EAAA,EAAIc,GAAgB1I,QA1fX,EA2fjB4H,EAAQA,EAAQK,QAAU,EAAIU,GAAe3I,SA1f7B,EA2flB,CAaF,OAAO4H,EAAQjB,QAAQ+C,GAAY,OAANA,GAAU,ubAzgBlB,WACD"}
@@ -249,8 +249,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
249
249
  if (el.getAttribute("display") === "none" || el.tagName.toUpperCase() !== "BUTTON") {
250
250
  return false;
251
251
  }
252
- el.getBoundingClientRect();
253
- return true;
252
+ const bcr = el.getBoundingClientRect();
253
+ return !!(bcr && bcr.height > 0 && bcr.width > 0);
254
254
  })) == null ? void 0 : _d.map((el) => el);
255
255
  };
256
256
  const focusFirst = () => {
@@ -468,4 +468,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
468
468
  export {
469
469
  _sfc_main as _
470
470
  };
471
- //# sourceMappingURL=BPagination.vue_vue_type_script_setup_true_lang-BPoedI1D.mjs.map
471
+ //# sourceMappingURL=BPagination.vue_vue_type_script_setup_true_lang-l5GT5VPN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BPagination.vue_vue_type_script_setup_true_lang-l5GT5VPN.mjs","sources":["../src/components/BPagination/BPagination.vue"],"sourcesContent":["<template>\n <ul\n class=\"pagination\"\n :class=\"computedWrapperClasses\"\n role=\"menubar\"\n :aria-disabled=\"props.disabled\"\n :aria-label=\"props.ariaLabel || undefined\"\n @keydown=\"handleKeyNav\"\n >\n <li\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page.id}`\"\n v-bind=\"page.li\"\n ref=\"_pageElements\"\n :displayIndex=\"index\"\n >\n <span\n v-if=\"page.id === FIRST_ELLIPSIS || page.id === LAST_ELLIPSIS\"\n v-bind=\"ellipsisProps.span\"\n >\n <slot name=\"ellipsis-text\">\n {{ props.ellipsisText || '...' }}\n </slot>\n </span>\n <component v-bind=\"page.button\" :is=\"page.button.is\" v-else @click=\"page.clickHandler\">\n <slot\n :name=\"page.text.name\"\n :disabled=\"page.text.disabled\"\n :page=\"page.text.page\"\n :index=\"page.text.index\"\n :active=\"page.text.active\"\n :content=\"page.text.value\"\n >\n {{ page.text.value }}\n </slot>\n </component>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\nimport {BvEvent} from '../../utils'\nimport {computed, nextTick, useTemplateRef, watch} from 'vue'\nimport type {BPaginationProps} from '../../types/ComponentProps'\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ClassValue} from '../../types/AnyValuedAttributes'\nimport {CODE_DOWN, CODE_LEFT, CODE_RIGHT, CODE_UP} from '../../utils/constants'\nimport {stopEvent} from '../../utils/event'\nimport {getActiveElement} from '../../utils/dom'\n\n// Threshold of limit size when we start/stop showing ellipsis\nconst ELLIPSIS_THRESHOLD = 3\n\nconst FIRST_BUTTON = -1\nconst PREV_BUTTON = -2\nconst NEXT_BUTTON = -3\nconst LAST_BUTTON = -4\nconst FIRST_ELLIPSIS = -5\nconst LAST_ELLIPSIS = -6\n\n// This is necessary because type inference isn't succeeding for the pages computed\ninterface PageButton {\n id: number\n li: Record<string, unknown>\n button: Record<string, unknown>\n text: Record<string, unknown>\n clickHandler: (e: Readonly<MouseEvent>) => void\n}\n\nconst _props = withDefaults(defineProps<Omit<BPaginationProps, 'modelValue'>>(), {\n align: 'start',\n ariaControls: undefined,\n ariaLabel: 'Pagination',\n disabled: false,\n ellipsisClass: undefined,\n ellipsisText: '\\u2026',\n firstClass: undefined,\n firstNumber: false,\n firstText: '\\u00AB',\n noEllipsis: false,\n noGotoEndButtons: false,\n labelFirstPage: 'Go to first page',\n labelLastPage: 'Go to last page',\n labelNextPage: 'Go to next page',\n labelPage: 'Go to page',\n labelPrevPage: 'Go to previous page',\n lastClass: undefined,\n lastNumber: false,\n lastText: '\\u00BB',\n limit: 5,\n nextClass: undefined,\n nextText: '\\u203A',\n pageClass: undefined,\n perPage: DEFAULT_PER_PAGE,\n pills: false,\n prevClass: undefined,\n prevText: '\\u2039',\n size: undefined,\n totalRows: DEFAULT_TOTAL_ROWS,\n})\nconst props = useDefaults(_props, 'BPagination')\n\nconst emit = defineEmits<{\n 'page-click': [event: BvEvent, pageNumber: number]\n}>()\n\nconst modelValue = defineModel<Exclude<BPaginationProps['modelValue'], undefined>>({\n default: 1,\n})\n\nconst pageElements = useTemplateRef<HTMLLIElement[]>('_pageElements')\n\nconst limitNumber = useToNumber(() => props.limit, {nanToZero: true, method: 'parseInt'})\nconst perPageNumber = useToNumber(() => props.perPage, {nanToZero: true, method: 'parseInt'})\nconst totalRowsNumber = useToNumber(() => props.totalRows, {nanToZero: true, method: 'parseInt'})\nconst modelValueNumber = useToNumber(modelValue, {nanToZero: true, method: 'parseInt'})\n\nconst perPageSanitized = computed(() => Math.max(perPageNumber.value || DEFAULT_PER_PAGE, 1))\nconst totalRowsSanitized = computed(() => Math.max(totalRowsNumber.value || DEFAULT_TOTAL_ROWS, 0))\n// Use Active to on page-item to denote active tab\nconst numberOfPages = computed(() => Math.ceil(totalRowsSanitized.value / perPageSanitized.value))\nconst computedFill = computed(() => props.align === 'fill')\n// This doesn't use the computedFill util because TS cannot infer that it would never be 'fill'\nconst justifyAlign = computed(() => (props.align === 'fill' ? 'start' : props.align))\n\nconst alignment = useAlignment(justifyAlign)\n\nconst isActivePage = (pageNumber: number) => pageNumber === computedModelValue.value\nconst getTabIndex = (num: number) => (props.disabled ? null : isActivePage(num) ? '0' : '-1')\n\nconst checkDisabled = (num: number) =>\n props.disabled ||\n isActivePage(num) ||\n computedModelValue.value < 1 ||\n // Check if the number is out of bounds\n num < 1 ||\n num > numberOfPages.value\n\nconst firstDisabled = computed(() => checkDisabled(1))\nconst prevDisabled = computed(() => checkDisabled(computedModelValue.value - 1))\nconst lastDisabled = computed(() => checkDisabled(numberOfPages.value))\nconst nextDisabled = computed(() => checkDisabled(computedModelValue.value + 1))\n\nconst getBaseButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n tabIndex,\n label,\n position,\n isActive,\n hidden,\n isSmHidden,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: string\n textValue?: string\n tabIndex?: string\n label?: string\n position?: number\n isActive?: boolean\n hidden?: boolean\n isSmHidden?: boolean\n}) => ({\n li: {\n 'class': [\n 'page-item',\n {\n 'active': isActive,\n disabled,\n 'bv-d-sm-down-none': isSmHidden,\n 'flex-fill': computedFill.value,\n 'd-flex': computedFill.value && !disabled,\n },\n classVal,\n ],\n 'role': 'presentation',\n 'aria-hidden': hidden,\n },\n button: {\n 'is': disabled ? 'span' : 'button',\n 'class': ['page-link', 'text-center', {'flex-grow-1': !disabled && computedFill.value}],\n 'aria-label': label,\n 'aria-controls': props.ariaControls || undefined,\n 'aria-disabled': disabled ? true : undefined,\n 'aria-posinset': position,\n 'aria-setsize': position ? numberOfPages.value : undefined,\n 'role': 'menuitem',\n 'type': disabled ? undefined : 'button',\n 'tabindex': disabled ? undefined : tabIndex,\n },\n text: {\n name: slotName,\n active: isActive,\n value: textValue ?? page,\n page,\n disabled,\n index: page - 1,\n content: textValue ? undefined : page,\n },\n clickHandler: (e: Readonly<MouseEvent>) => pageClick(e, page),\n})\n\nconst getButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n label,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: string\n textValue?: string\n label: string\n}) => getBaseButtonProps({page, classVal, disabled, slotName, textValue, label, tabIndex: '-1'})\n\nconst getPageButtonProps = (page: number, isSmHidden?: boolean) =>\n getBaseButtonProps({\n page,\n disabled: props.disabled,\n classVal: props.pageClass,\n slotName: 'page',\n label: props.labelPage ? `${props.labelPage} ${page}` : undefined,\n tabIndex: getTabIndex(page) ?? undefined,\n position: page,\n isActive: isActivePage(page),\n isSmHidden,\n })\n\nconst firstButtonProps = computed(() =>\n getButtonProps({\n page: 1,\n disabled: firstDisabled.value,\n classVal: props.firstClass,\n slotName: 'first-text',\n textValue: props.firstText,\n label: props.labelFirstPage,\n })\n)\nconst prevButtonProps = computed(() =>\n getButtonProps({\n page: Math.max(computedModelValue.value - 1, 1),\n disabled: prevDisabled.value,\n classVal: props.prevClass,\n slotName: 'prev-text',\n textValue: props.prevText,\n label: props.labelPrevPage,\n })\n)\nconst nextButtonProps = computed(() =>\n getButtonProps({\n page: Math.min(computedModelValue.value + 1, numberOfPages.value),\n disabled: nextDisabled.value,\n classVal: props.nextClass,\n slotName: 'next-text',\n textValue: props.nextText,\n label: props.labelNextPage,\n })\n)\nconst lastButtonProps = computed(() =>\n getButtonProps({\n page: numberOfPages.value,\n disabled: lastDisabled.value,\n classVal: props.lastClass,\n slotName: 'last-text',\n textValue: props.lastText,\n label: props.labelLastPage,\n })\n)\n\nconst ellipsisProps = computed(() => ({\n li: {\n class: [\n 'page-item',\n 'disabled',\n 'text-center',\n 'bv-d-sm-down-none',\n computedFill.value ? 'flex-fill' : '',\n props.ellipsisClass,\n ],\n role: 'separator',\n },\n span: {\n class: ['page-link'],\n },\n}))\n\nconst computedWrapperClasses = computed(() => [\n alignment.value,\n {\n [`pagination-${props.size}`]: props.size !== undefined,\n 'b-pagination-pills': props.pills,\n },\n])\n\nconst pagination = computed(() => ({\n pageSize: perPageSanitized.value,\n totalRows: totalRowsNumber.value,\n numberOfPages: numberOfPages.value,\n}))\n\nconst pageClick = (event: Readonly<MouseEvent>, pageNumber: number) => {\n if (pageNumber === computedModelValue.value) return\n const clickEvent = new BvEvent('page-click', {\n cancelable: true,\n target: event.target,\n })\n emit('page-click', clickEvent, pageNumber)\n\n if (clickEvent.defaultPrevented) return\n\n modelValue.value = pageNumber\n\n nextTick(() => {\n if (pageNumber === 1) {\n focusFirst()\n } else if (pageNumber === pagination.value.numberOfPages) {\n focusLast()\n }\n })\n // nextTick(() => {\n // if (isVisible(target) && un_element.contains(target)) {\n // attemptFocus(target)\n //} else {\n //this.focusCurrent()\n //}\n // })\n}\n\nconst isDisabled = (el: HTMLButtonElement) => {\n const isElement = !!(el && el.nodeType === Node.ELEMENT_NODE)\n const hasAttr = isElement ? el.hasAttribute('disabled') : null\n const hasClass = isElement && el.classList ? el.classList.contains('disabled') : false\n\n return !isElement || el.disabled || hasAttr || hasClass\n}\n\nconst getButtons = (): HTMLButtonElement[] =>\n [...(pageElements.value ?? [])]\n ?.sort(\n (a, b) =>\n parseInt(a.getAttribute('displayIndex') || '0') -\n parseInt(b.getAttribute('displayIndex') || '0')\n )\n ?.map((page) => page.children[0])\n ?.filter((el) => {\n if (el.getAttribute('display') === 'none' || el.tagName.toUpperCase() !== 'BUTTON') {\n return false\n }\n\n const bcr = el.getBoundingClientRect()\n\n return !!(bcr && bcr.height > 0 && bcr.width > 0)\n })\n ?.map((el) => el as HTMLButtonElement)\n\nconst focusFirst = () => {\n nextTick(() => {\n const btn = getButtons().find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusPrev = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n\n if (index > 0 && !isDisabled(buttons[index - 1])) {\n buttons[index - 1]?.focus()\n }\n })\n}\n\nconst focusLast = () => {\n nextTick(() => {\n const btn = getButtons()\n .reverse()\n .find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusNext = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n if (index < buttons.length - 1 && !isDisabled(buttons[index + 1])) {\n buttons[index + 1]?.focus()\n }\n })\n}\n\nconst handleKeyNav = (event: KeyboardEvent) => {\n const {code, shiftKey} = event\n if (code === CODE_LEFT || code === CODE_UP) {\n stopEvent(event)\n if (shiftKey) {\n focusFirst()\n } else {\n focusPrev()\n }\n } else if (code === CODE_RIGHT || code === CODE_DOWN) {\n stopEvent(event)\n if (shiftKey) {\n focusLast()\n } else {\n focusNext()\n }\n }\n}\n\nconst computedModelValue = computed(() => {\n const page = modelValueNumber.value || 1\n return page > numberOfPages.value ? numberOfPages.value : page < 1 ? 1 : page\n})\n\nwatch(pagination, (oldValue, newValue) => {\n if (newValue.pageSize !== oldValue.pageSize && newValue.totalRows === oldValue.totalRows) {\n // If the page size changes, reset to page 1\n modelValue.value = 1\n }\n})\n\nconst noFirstButton = computed(() => (props.noGotoEndButtons && !props.firstNumber ? 1 : 0))\nconst noLastButton = computed(() => (props.noGotoEndButtons && !props.lastNumber ? 1 : 0))\nconst showFirstButton = computed(() => (noFirstButton.value ? 0 : 1))\nconst showLastButton = computed(() => (noLastButton.value ? 0 : 1))\nconst firstPage = computed(() => (props.firstNumber ? 1 : 0))\nconst lastPage = computed(() => (props.lastNumber ? 1 : 0))\nconst halfLimit = computed(() => Math.floor(limitNumber.value / 2))\n\nconst pages = computed(() => {\n const {value} = computedModelValue\n\n const els = elements.value.map((p) => {\n switch (p) {\n case FIRST_BUTTON:\n return {id: p, ...firstButtonProps.value}\n case PREV_BUTTON:\n return {id: p, ...prevButtonProps.value}\n case NEXT_BUTTON:\n return {id: p, ...nextButtonProps.value}\n case LAST_BUTTON:\n return {id: p, ...lastButtonProps.value}\n case FIRST_ELLIPSIS:\n case LAST_ELLIPSIS:\n return {id: p, ...ellipsisProps.value}\n default:\n return {id: p, ...getPageButtonProps(p)}\n }\n })\n\n if (numberOfPages.value > 3) {\n if (value > numberOfPages.value - halfLimit.value - lastPage.value) {\n const idx = 2 + showFirstButton.value\n els[idx] = {id: els[idx].id, ...getPageButtonProps(els[idx].id, true)}\n }\n\n if (value <= halfLimit.value + firstPage.value) {\n const idx = els.length - (3 + showLastButton.value)\n els[idx] = {id: els[idx].id, ...getPageButtonProps(els[idx].id, true)}\n }\n }\n\n return els as PageButton[]\n})\n\nconst elements = computed(() => {\n // The idea here is to create an array of all the buttons on the page control.\n // This way we can keep the invariants in one place and the template code just\n // iterates over the array.\n\n const pages = numberOfPages.value\n const {value} = computedModelValue\n const limit = limitNumber.value\n const noEllipsis = props.noEllipsis || limit <= ELLIPSIS_THRESHOLD\n\n // The first case is when all of the page buttons fit on the control, this is\n // the simplest case and the only one that will create an array smaller than\n // Limit + 4 - noEndButtons * 2 (the [first, last,] prev, next buttons)\n\n if (pages < limit + firstPage.value + lastPage.value) {\n return [\n !firstPage.value && !noFirstButton.value ? FIRST_BUTTON : null,\n PREV_BUTTON,\n ...Array.from({length: pages}, (_, index) => index + 1),\n NEXT_BUTTON,\n !lastPage.value && !noLastButton.value ? LAST_BUTTON : null,\n ].filter((x) => x !== null) as number[]\n }\n\n // All of the remaining cases result in an array that is exactly limit + 4 - noEndButtons * 2 in length, so create\n // the array upfront and set up the beginning and end buttons, then fill the rest for each case\n\n const buttons = Array.from({length: limit + 4 - (noFirstButton.value + noLastButton.value)})\n if (!noFirstButton.value) {\n if (!firstPage.value) {\n buttons[0] = FIRST_BUTTON\n buttons[1] = PREV_BUTTON\n } else {\n buttons[0] = PREV_BUTTON\n buttons[1] = 1\n }\n } else {\n buttons[0] = PREV_BUTTON\n }\n\n if (!noLastButton.value) {\n if (!lastPage.value) {\n buttons[buttons.length - 1] = LAST_BUTTON\n buttons[buttons.length - 2] = NEXT_BUTTON\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n buttons[buttons.length - 2] = pages\n }\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n }\n\n // The next case is where the page buttons start at the begginning, with\n // no ellipsis at the beginning, but one at the end\n\n if (value <= halfLimit.value + firstPage.value) {\n for (let index = 1; index <= limit; index++) {\n buttons[index + 1 - noFirstButton.value] = index + firstPage.value\n }\n\n if (!noEllipsis) {\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n // And then we have the case where the page buttons go up to the end, with no\n // ellipsis at the end, but one at the beginning\n\n if (value > pages - halfLimit.value - lastPage.value) {\n const start = pages - (limit - 1) - lastPage.value\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n }\n }\n\n // Finally we have the case where we have ellipsis at both ends\n if (!buttons[2]) {\n // Is there a more elegant way to ceck that we're in the final case?\n const start = value - Math.floor(limit / 2)\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n //Enable sanity check for debugging purposes\n // for (let i = 0; i < buttons.length; i++) {\n // if (!buttons[i]) {\n // // eslint-disable-next-line no-console\n // console.log(\n // `Failed: button == ${i}, limit=${limit}, pages=${pages}, firstPage=${firstPage}, lastPage=${lastPage}, value=${value}`\n // )\n // }\n // }\n\n return buttons.filter((x) => x !== null) as number[]\n})\n</script>\n\n<script lang=\"ts\">\nconst DEFAULT_PER_PAGE = 20\nconst DEFAULT_TOTAL_ROWS = 0\n</script>\n"],"names":["_useModel","pages"],"mappings":";;;;;;;;;;AAykBA,MAAM,mBAAmB;AACzB,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AArhB3B,UAAM,qBAAqB;AAE3B,UAAM,eAAe;AACrB,U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