bootstrap-vue-next 0.28.1 → 0.28.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.
- package/dist/{BTable.vue_vue_type_script_setup_true_lang-B5ObxOYB.mjs → BTable.vue_vue_type_script_setup_true_lang-CfD_nWrh.mjs} +6 -5
- package/dist/BTable.vue_vue_type_script_setup_true_lang-CfD_nWrh.mjs.map +1 -0
- package/dist/BTable.vue_vue_type_script_setup_true_lang-DrQc69GD.js +2 -0
- package/dist/BTable.vue_vue_type_script_setup_true_lang-DrQc69GD.js.map +1 -0
- package/dist/bootstrap-vue-next.mjs +2 -2
- package/dist/bootstrap-vue-next.umd.js +1 -1
- package/dist/{index-BpSp8iRh.mjs → index-A_L6CWvF.mjs} +2 -2
- package/dist/{index-BpSp8iRh.mjs.map → index-A_L6CWvF.mjs.map} +1 -1
- package/dist/{index-CK6JfYqX.js → index-BQpSp6Z3.js} +2 -2
- package/dist/index-BQpSp6Z3.js.map +1 -0
- package/dist/src/components/BTable/index.mjs +1 -1
- package/dist/src/components/BTable/index.umd.js +1 -1
- package/dist/src/components/index.mjs +1 -1
- package/dist/src/components/index.umd.js +1 -1
- package/dist/src/utils/tableUtils.d.mts +7 -1
- package/dist/src/utils/tableUtils.d.ts +7 -1
- package/package.json +1 -1
- package/dist/BTable.vue_vue_type_script_setup_true_lang-B5ObxOYB.mjs.map +0 -1
- package/dist/BTable.vue_vue_type_script_setup_true_lang-BvjRjxLo.js +0 -2
- package/dist/BTable.vue_vue_type_script_setup_true_lang-BvjRjxLo.js.map +0 -1
- package/dist/index-CK6JfYqX.js.map +0 -1
|
@@ -210,6 +210,7 @@ const btableLiteProps = Object.freeze(
|
|
|
210
210
|
theadTrClass: 0
|
|
211
211
|
})
|
|
212
212
|
);
|
|
213
|
+
const getDataLabelAttr = (props, label) => props.stacked && props.labelStacked !== true ? { "data-label": label } : void 0;
|
|
213
214
|
const TABLE_TAG_NAMES = ["TD", "TH", "TR"];
|
|
214
215
|
const eventFilter = [
|
|
215
216
|
"a",
|
|
@@ -333,7 +334,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
333
334
|
return {
|
|
334
335
|
key: k,
|
|
335
336
|
label,
|
|
336
|
-
tdAttr: props
|
|
337
|
+
tdAttr: getDataLabelAttr(props, label)
|
|
337
338
|
};
|
|
338
339
|
});
|
|
339
340
|
}
|
|
@@ -344,14 +345,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
344
345
|
const label2 = f.label ?? startCase(f.key);
|
|
345
346
|
return {
|
|
346
347
|
...f,
|
|
347
|
-
tdAttr:
|
|
348
|
+
tdAttr: { ...getDataLabelAttr(props, label2), ...f.tdAttr }
|
|
348
349
|
};
|
|
349
350
|
}
|
|
350
351
|
const label = startCase(f);
|
|
351
352
|
return {
|
|
352
353
|
key: f,
|
|
353
354
|
label,
|
|
354
|
-
tdAttr: props
|
|
355
|
+
tdAttr: getDataLabelAttr(props, label)
|
|
355
356
|
};
|
|
356
357
|
});
|
|
357
358
|
});
|
|
@@ -876,7 +877,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
876
877
|
return {
|
|
877
878
|
key: el,
|
|
878
879
|
label,
|
|
879
|
-
tdAttr: props
|
|
880
|
+
tdAttr: getDataLabelAttr(props, label)
|
|
880
881
|
};
|
|
881
882
|
}
|
|
882
883
|
const value = (_a = sortByModel.value) == null ? void 0 : _a.find((sb) => el.key === sb.key);
|
|
@@ -1452,4 +1453,4 @@ export {
|
|
|
1452
1453
|
_sfc_main$3 as f,
|
|
1453
1454
|
_sfc_main$2 as g
|
|
1454
1455
|
};
|
|
1455
|
-
//# sourceMappingURL=BTable.vue_vue_type_script_setup_true_lang-
|
|
1456
|
+
//# sourceMappingURL=BTable.vue_vue_type_script_setup_true_lang-CfD_nWrh.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BTable.vue_vue_type_script_setup_true_lang-CfD_nWrh.mjs","sources":["../src/utils/formatItem.ts","../src/types/TableTypes.ts","../src/components/BTable/BTbody.vue","../src/components/BTable/BTd.vue","../src/components/BTable/BTfoot.vue","../src/components/BTable/BTh.vue","../src/components/BTable/BThead.vue","../src/components/BTable/BTr.vue","../src/utils/tableUtils.ts","../src/utils/filterEvent.ts","../src/components/BTable/BTableLite.vue","../src/components/BTable/BTable.vue"],"sourcesContent":["import type {TableFieldFormatter} from '../types/TableTypes'\nimport {get} from './object'\n\nexport const formatItem = <T>(\n item: T,\n // Weakly type fieldKey because it can be a nested string, such as 'foo.bar.baz'\n fieldKey: string,\n formatter?: TableFieldFormatter<T>\n) => {\n const val = get(item, fieldKey)\n return formatter && typeof formatter === 'function' ? formatter(val, fieldKey, item) : val\n}\n","import type {StyleValue} from 'vue'\nimport type {ColorVariant} from './ColorTypes'\nimport type {MaybePromise} from './MaybePromise'\nimport type {LiteralUnion} from './LiteralUnion'\nimport type {AttrsValue, ClassValue} from './AnyValuedAttributes'\n\nexport type TableRowEvent<T> = [item: T, index: number, event: MouseEvent]\n\nexport type TableItem<T = Record<string, unknown>> = T & {\n _rowVariant?: ColorVariant | null\n _cellVariants?: Partial<Record<keyof T, ColorVariant>>\n _showDetails?: boolean\n}\n\nexport const isTableItem = (value: unknown): value is TableItem =>\n typeof value === 'object' && value !== null\n\n/**\n * `undefined` means it's not sorting this column. It is set to undefined rather than removed from the array because\n * we don't want to make updates that remove the comparer function from the value.\n */\nexport type BTableSortByOrder = 'desc' | 'asc' | undefined\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type BTableSortByComparerFunction<T = any> = (a: T, b: T, key: string) => number\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type BTableSortBy<T = any> = {\n order: BTableSortByOrder\n key: string\n comparer?: BTableSortByComparerFunction<T>\n}\n\nexport type BTableProviderContext<T = unknown> = {\n sortBy: BTableSortBy<T>[] | undefined\n filter: string | undefined\n currentPage: number\n perPage: number\n}\n\nexport type BTableProvider<T> = (\n context: Readonly<BTableProviderContext<T>>\n) => MaybePromise<T[] | undefined>\n\nexport type TableFieldFormatter<T> = (value: unknown, key: string, item: T) => string\n\nexport type TableRowType = 'row' | 'row-details' | 'row-top' | 'row-bottom' | 'table-busy'\nexport type TableRowThead = 'top' | 'bottom'\n\nexport type TableStrictClassValue = string | unknown[] | Record<string, boolean>\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type TableField<T = any> = {\n key: LiteralUnion<keyof T>\n label?: string\n headerTitle?: string\n headerAbbr?: string\n class?: ClassValue\n formatter?: TableFieldFormatter<T>\n sortable?: boolean\n sortDirection?: string\n sortByFormatted?: boolean | TableFieldFormatter<T>\n filterByFormatted?: boolean | TableFieldFormatter<T>\n tdClass?:\n | TableStrictClassValue\n | ((value: unknown, key: string, item: T) => TableStrictClassValue)\n thClass?: ClassValue\n thStyle?: StyleValue\n variant?: ColorVariant | null\n tdAttr?: AttrsValue | ((value: unknown, key: string, item: T) => AttrsValue)\n thAttr?:\n | AttrsValue\n | ((value: unknown, key: string, item: T | null, type: TableRowThead) => AttrsValue)\n isRowHeader?: boolean\n stickyColumn?: boolean\n}\n\nexport type TableFieldRaw<T = unknown> = T extends object\n ? LiteralUnion<keyof T> | TableField<T>\n : string | TableField\n\nexport const isTableField = <T>(value: unknown): value is TableField<T> =>\n typeof value === 'object' && value !== null && 'key' in value\n\nexport const isTableFieldRaw = <T>(value: unknown): value is TableFieldRaw<T> =>\n typeof value === 'string' || isTableField(value)\n\nexport type NoProviderTypes = 'paging' | 'sorting' | 'filtering'\n","<template>\n <tbody :class=\"computedClasses\">\n <slot />\n </tbody>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTbodyProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTbodyProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BTbody')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`thead-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <td\n :scope=\"scope\"\n :class=\"computedClasses\"\n :colspan=\"props.colspan\"\n :rowspan=\"props.rowspan\"\n :data-label=\"props.stackedHeading\"\n >\n <div v-if=\"props.stackedHeading\">\n <slot />\n </div>\n <slot v-else />\n </td>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTdProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTdProps>(), {\n colspan: undefined,\n rowspan: undefined,\n stackedHeading: undefined,\n stickyColumn: false,\n variant: null,\n})\nconst props = useDefaults(_props, 'BTd')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n 'b-table-sticky-column': props.stickyColumn,\n 'table-b-table-default': props.stickyColumn && props.variant === null,\n}))\n\nconst scope = computed(() => (props.colspan ? 'colspan' : props.rowspan ? 'rowspan' : 'col'))\n</script>\n","<template>\n <tfoot :class=\"computedClasses\">\n <slot />\n </tfoot>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTfootProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTfootProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BTfoot')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <th\n :scope=\"scope\"\n :class=\"computedClasses\"\n :colspan=\"props.colspan\"\n :rowspan=\"props.rowspan\"\n :data-label=\"props.stackedHeading\"\n >\n <div v-if=\"props.stackedHeading !== undefined\">\n <slot />\n </div>\n <slot v-else />\n </th>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BThProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BThProps>(), {\n colspan: undefined,\n rowspan: undefined,\n stackedHeading: undefined,\n stickyColumn: false,\n variant: null,\n})\nconst props = useDefaults(_props, 'BTh')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n 'b-table-sticky-column': props.stickyColumn,\n 'table-b-table-default': props.stickyColumn && props.variant === null,\n}))\n\nconst scope = computed(() => (props.colspan ? 'colspan' : props.rowspan ? 'rowspan' : 'col'))\n</script>\n","<template>\n <thead :class=\"computedClasses\">\n <slot />\n </thead>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTheadProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTheadProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BThead')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <tr :class=\"computedClasses\">\n <slot />\n </tr>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTrProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTrProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BTr')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","import {titleCase} from './stringUtils'\nimport type {TableFieldRaw} from '../types/TableTypes'\nimport type {Breakpoint, BTableLiteProps, BTableSimpleProps} from '../types'\n\nexport const getTableFieldHeadLabel = (field: Readonly<TableFieldRaw<unknown>>) =>\n typeof field === 'string'\n ? titleCase(field)\n : field.label !== undefined\n ? field.label\n : typeof field.key === 'string'\n ? titleCase(field.key)\n : field.key\n\nexport const btableSimpleProps = Object.freeze(\n Object.keys({\n bordered: 0,\n borderless: 0,\n borderVariant: 0,\n captionTop: 0,\n dark: 0,\n fixed: 0,\n hover: 0,\n id: 0,\n noBorderCollapse: 0,\n outlined: 0,\n responsive: 0,\n small: 0,\n stacked: 0,\n stickyHeader: 0,\n striped: 0,\n stripedColumns: 0,\n variant: 0,\n tableAttrs: 0,\n tableClass: 0,\n } satisfies Record<keyof BTableSimpleProps, 0>)\n) as readonly (keyof BTableSimpleProps)[]\n\nexport const btableLiteProps = Object.freeze(\n Object.keys({\n align: 0,\n caption: 0,\n detailsTdClass: 0,\n fieldColumnClass: 0,\n fields: 0,\n footClone: 0,\n footRowVariant: 0,\n footVariant: 0,\n headRowVariant: 0,\n headVariant: 0,\n items: 0,\n labelStacked: 0,\n modelValue: 0,\n primaryKey: 0,\n tbodyClass: 0,\n tbodyTrAttrs: 0,\n tbodyTrClass: 0,\n tfootClass: 0,\n tfootTrClass: 0,\n theadClass: 0,\n theadTrClass: 0,\n } satisfies Record<keyof Omit<BTableLiteProps<unknown>, keyof BTableSimpleProps>, 0>)\n) as readonly (keyof Omit<BTableLiteProps<unknown>, keyof BTableSimpleProps>)[]\n\nexport const getDataLabelAttr = (\n props: {stacked: boolean | Breakpoint | undefined; labelStacked: boolean | undefined},\n label: string\n) => (props.stacked && props.labelStacked !== true ? {'data-label': label} : undefined)\n","const TABLE_TAG_NAMES = ['TD', 'TH', 'TR']\n\n// Filter CSS selector for click/dblclick/etc. events\n// If any of these selectors match the clicked element, we ignore the event\nconst eventFilter = [\n 'a',\n 'a *', // Include content inside links\n 'button',\n 'button *', // Include content inside buttons\n 'input:not(.disabled):not([disabled])',\n 'select:not(.disabled):not([disabled])',\n 'textarea:not(.disabled):not([disabled])',\n '[role=\"link\"]',\n '[role=\"link\"] *',\n '[role=\"button\"]',\n '[role=\"button\"] *',\n '[tabindex]:not(.disabled):not([disabled])',\n].join(',')\n\n// Returns `true` if we should ignore the click/double-click/keypress event\n// Avoids having the user need to use `@click.stop` on the form control\nexport const filterEvent = (event: Readonly<Event>) => {\n // Exit early when we don't have a target element\n if (!event || !event.target) {\n return false\n }\n const el = event.target as HTMLElement\n // Exit early when element is disabled or a table element\n if (('disabled' in el && el.disabled) || TABLE_TAG_NAMES.indexOf(el.tagName) !== -1) {\n return false\n }\n // Ignore the click when it was inside a dropdown menu\n if (el.closest('.dropdown-menu')) return true\n\n const label = el.tagName === 'LABEL' ? el : el.closest('label')\n // If the label's form control is not disabled then we don't propagate event\n // Modern browsers have `label.control` that references the associated input, but IE 11\n // does not have this property on the label element, so we resort to DOM lookups\n if (label) {\n const labelFor = label.getAttribute('for')\n const input = labelFor\n ? document.getElementById(labelFor)\n : label.querySelector('input, select, textarea')\n if (input && !(input as HTMLInputElement).disabled) {\n return true\n }\n }\n // Otherwise check if the event target matches one of the selectors in the\n // event filter (i.e. anchors, non disabled inputs, etc.)\n // Return `true` if we should ignore the event\n return el.matches(eventFilter)\n}\n","<template>\n <BTableSimple v-bind=\"computedSimpleProps\">\n <BThead v-show=\"showComputedHeaders\" :variant=\"props.headVariant\" :class=\"props.theadClass\">\n <slot name=\"thead-top\" :columns=\"computedFieldsTotal\" :fields=\"computedFields\" />\n <BTr :variant=\"props.headRowVariant\" :class=\"props.theadTrClass\">\n <BTh\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n scope=\"col\"\n :class=\"getFieldColumnClasses(field)\"\n :title=\"field.headerTitle\"\n :variant=\"field.variant\"\n :abbr=\"field.headerAbbr\"\n :style=\"field.thStyle\"\n v-bind=\"callThAttr(null, field, 'top')\"\n @click=\"headerClicked(field, $event)\"\n >\n <!-- eslint-disable prettier/prettier -->\n <slot\n :name=\"\n slots[`head(${String(field.key)})`]\n ? (`head(${String(field.key)})` as 'head()')\n : 'head()'\n \"\n :label=\"field.label\"\n :column=\"field.key as LiteralUnion<keyof Items>\"\n :field\n :is-foot=\"false\"\n >\n <!-- eslint-enable prettier/prettier -->\n {{ getTableFieldHeadLabel(field) }}\n </slot>\n </BTh>\n </BTr>\n <BTr v-if=\"slots['thead-sub']\">\n <BTd\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n scope=\"col\"\n :variant=\"field.variant\"\n :class=\"[field.class, field.thClass]\"\n >\n <slot name=\"thead-sub\" :items=\"props.items\" :fields=\"computedFields\" :field>\n {{ field.label }}\n </slot>\n </BTd>\n </BTr>\n </BThead>\n <BTbody :class=\"props.tbodyClass\">\n <slot\n name=\"custom-body\"\n :fields=\"computedFields\"\n :items=\"props.items\"\n :columns=\"computedFieldsTotal\"\n >\n <BTr\n v-if=\"!props.stacked && slots['top-row']\"\n :class=\"getRowClasses(null, 'row-top')\"\n v-bind=\"callTbodyTrAttrs(null, 'row-top')\"\n >\n <slot name=\"top-row\" :columns=\"computedFieldsTotal\" :fields=\"computedFields\" />\n </BTr>\n\n <template\n v-for=\"(item, itemIndex) in props.items\"\n :key=\"\n props.primaryKey && get(item, props.primaryKey)\n ? get(item, props.primaryKey)\n : itemIndex\n \"\n >\n <BTr\n :id=\"\n props.primaryKey && get(item, props.primaryKey)\n ? generateTableRowId(get(item, props.primaryKey))\n : undefined\n \"\n :class=\"getRowClasses(item, 'row')\"\n :variant=\"isTableItem(item) ? item._rowVariant : undefined\"\n v-bind=\"callTbodyTrAttrs(item, 'row')\"\n @click=\"!filterEvent($event) && emit('row-clicked', item, itemIndex, $event)\"\n @dblclick=\"!filterEvent($event) && emit('row-dblclicked', item, itemIndex, $event)\"\n @contextmenu=\"!filterEvent($event) && emit('row-contextmenu', item, itemIndex, $event)\"\n @mouseenter=\"!filterEvent($event) && emit('row-hovered', item, itemIndex, $event)\"\n @mouseleave=\"!filterEvent($event) && emit('row-unhovered', item, itemIndex, $event)\"\n @mousedown=\"handleMiddleClick(item, itemIndex, $event)\"\n >\n <BTd\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n :variant=\"\n (isTableItem(item) ? item._cellVariants?.[field.key as string] : false)\n ? null\n : field.variant\n \"\n :class=\"getFieldRowClasses(field, item)\"\n v-bind=\"itemAttributes(item, String(field.key), field.tdAttr)\"\n >\n <label v-if=\"props.stacked && props.labelStacked\" class=\"b-table-stacked-label\">\n {{ getTableFieldHeadLabel(field) }}\n </label>\n <slot\n :name=\"\n slots[`cell(${String(field.key)})`]\n ? (`cell(${String(field.key)})` as 'cell()')\n : 'cell()'\n \"\n :value=\"formatItem(item, String(field.key), field.formatter)\"\n :unformatted=\"get(item, String(field.key))\"\n :index=\"itemIndex\"\n :item=\"item\"\n :field=\"field\"\n :items=\"items\"\n :toggle-details=\"() => toggleRowDetails(item)\"\n :details-showing=\"isTableItem(item) ? (detailsMap.get(item) ?? false) : false\"\n >\n <template v-if=\"!slots[`cell(${String(field.key)})`] && !slots['cell()']\">\n {{ formatItem(item, String(field.key), field.formatter) }}\n </template>\n </slot>\n </BTd>\n </BTr>\n\n <template\n v-if=\"isTableItem(item) && detailsMap.get(item) === true && slots['row-details']\"\n >\n <BTr aria-hidden=\"true\" role=\"presentation\" class=\"d-none\" />\n <BTr\n :class=\"getRowClasses(item, 'row-details')\"\n :variant=\"item._rowVariant\"\n v-bind=\"callTbodyTrAttrs(item, 'row-details')\"\n >\n <BTd :colspan=\"computedFieldsTotal\" :class=\"detailsTdClass\">\n <slot\n name=\"row-details\"\n :item=\"item\"\n :toggle-details=\"() => toggleRowDetails(item)\"\n :fields=\"computedFields\"\n :index=\"itemIndex\"\n />\n </BTd>\n </BTr>\n </template>\n </template>\n <!-- This class is for specific targetting of this slot element -->\n <BTr\n v-if=\"!props.stacked && slots['bottom-row']\"\n class=\"bottom-row\"\n :class=\"getRowClasses(null, 'row-bottom')\"\n v-bind=\"callTbodyTrAttrs(null, 'row-bottom')\"\n >\n <slot name=\"bottom-row\" :columns=\"computedFieldsTotal\" :fields=\"computedFields\" />\n </BTr>\n </slot>\n </BTbody>\n <BTfoot v-if=\"props.footClone\" v-bind=\"footerProps\">\n <BTr :variant=\"props.footRowVariant\" :class=\"props.tfootTrClass\">\n <BTh\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n scope=\"col\"\n :class=\"getFieldColumnClasses(field)\"\n :title=\"field.headerTitle\"\n :abbr=\"field.headerAbbr\"\n :style=\"field.thStyle\"\n :variant=\"field.variant\"\n v-bind=\"callThAttr(null, field, 'bottom')\"\n @click=\"headerClicked(field, $event, true)\"\n >\n <div class=\"d-inline-flex flex-nowrap align-items-center gap-1\">\n <div>\n <!-- eslint-disable prettier/prettier -->\n <slot\n :name=\"\n slots[`foot(${String(field.key)})`]\n ? (`foot(${String(field.key)})` as 'foot()')\n : 'foot()'\n \"\n :label=\"field.label\"\n :column=\"field.key as LiteralUnion<keyof Items>\"\n :field=\"field\"\n :is-foot=\"true\"\n >\n <!-- eslint-enable prettier/prettier -->\n {{ getTableFieldHeadLabel(field) }}\n </slot>\n </div>\n </div>\n </BTh>\n </BTr>\n </BTfoot>\n <BTfoot v-else-if=\"slots['custom-foot']\" v-bind=\"footerProps\">\n <slot\n name=\"custom-foot\"\n :fields=\"computedFields\"\n :items=\"props.items\"\n :columns=\"computedFieldsTotal\"\n />\n </BTfoot>\n <caption v-if=\"slots['table-caption'] || props.caption\">\n <slot name=\"table-caption\">\n {{ props.caption }}\n </slot>\n </caption>\n </BTableSimple>\n</template>\n\n<script setup lang=\"ts\" generic=\"Items\">\nimport {computed, ref, watch} from 'vue'\nimport type {BTableLiteProps} from '../../types/ComponentProps'\nimport {\n isTableField,\n isTableItem,\n type TableField,\n type TableItem,\n type TableRowEvent,\n type TableRowThead,\n type TableRowType,\n} from '../../types/TableTypes'\nimport BTableSimple from './BTableSimple.vue'\nimport BTbody from './BTbody.vue'\nimport BTd from './BTd.vue'\nimport BTfoot from './BTfoot.vue'\nimport BTh from './BTh.vue'\nimport BThead from './BThead.vue'\nimport BTr from './BTr.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {get, pick} from '../../utils/object'\nimport {btableSimpleProps, getDataLabelAttr, getTableFieldHeadLabel} from '../../utils/tableUtils'\nimport {formatItem} from '../../utils/formatItem'\nimport {filterEvent} from '../../utils/filterEvent'\nimport {startCase} from '../../utils/stringUtils'\nimport type {LiteralUnion} from '../../types/LiteralUnion'\nimport {useId} from '../../composables/useId'\n\nconst _props = withDefaults(defineProps<BTableLiteProps<Items>>(), {\n caption: undefined,\n align: undefined,\n fields: () => [],\n footClone: false,\n items: () => [],\n labelStacked: false,\n fieldColumnClass: undefined,\n tbodyTrClass: undefined,\n detailsTdClass: undefined,\n headVariant: undefined,\n headRowVariant: undefined,\n footRowVariant: undefined,\n footVariant: undefined,\n modelValue: undefined,\n primaryKey: undefined,\n tbodyClass: undefined,\n tbodyTrAttrs: undefined,\n tfootClass: undefined,\n tfootTrClass: undefined,\n theadClass: undefined,\n theadTrClass: undefined,\n // BTableSimpleProps props\n borderVariant: undefined,\n tableClass: undefined,\n variant: undefined,\n bordered: undefined,\n borderless: undefined,\n captionTop: undefined,\n dark: undefined,\n hover: undefined,\n id: undefined,\n noBorderCollapse: undefined,\n outlined: undefined,\n fixed: undefined,\n responsive: undefined,\n stacked: undefined,\n striped: undefined,\n stripedColumns: undefined,\n small: undefined,\n stickyHeader: undefined,\n // End BTableSimpleProps props\n})\nconst props = useDefaults(_props, 'BTableLite')\n\nconst emit = defineEmits<{\n 'head-clicked': [\n key: string,\n field: (typeof computedFields.value)[0],\n event: MouseEvent,\n isFooter: boolean,\n ]\n 'row-clicked': TableRowEvent<Items>\n 'row-dblclicked': TableRowEvent<Items>\n 'row-contextmenu': TableRowEvent<Items>\n 'row-hovered': TableRowEvent<Items>\n 'row-unhovered': TableRowEvent<Items>\n 'row-middle-clicked': TableRowEvent<Items>\n}>()\n\nconst slots = defineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'thead-top'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `head(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: false\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'thead-sub'?: (\n props: {\n items: readonly Items[]\n fields: typeof computedFields.value\n field: (typeof computedFields.value)[0]\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) => any\n 'custom-body'?: (props: {\n fields: typeof computedFields.value\n items: readonly Items[]\n columns: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'top-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `cell(${string})`]: (props: {\n value: unknown\n unformatted: unknown\n index: number\n item: Items\n field: (typeof computedFields.value)[0]\n items: readonly Items[]\n toggleDetails: () => void\n detailsShowing: boolean\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'row-details'?: (props: {\n item: Items\n toggleDetails: () => void\n fields: typeof computedFields.value\n index: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'bottom-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `foot(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: true\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'custom-foot'?: (props: {\n fields: typeof computedFields.value\n items: readonly Items[]\n columns: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'table-caption'?: (props: Record<string, never>) => any\n}>()\n\nconst computedId = useId(() => props.id)\n\nconst generateDetailsItem = (item: TableItem): [object, boolean | undefined] => [\n item,\n item._showDetails,\n]\nconst detailsMap = ref(new WeakMap<object, boolean | undefined>())\nwatch(\n () => props.items,\n (items) => {\n items.forEach((item) => {\n if (!isTableItem(item)) return\n detailsMap.value.set(...generateDetailsItem(item))\n })\n },\n {deep: true, immediate: true}\n)\n\nconst computedTableClasses = computed(() => [\n props.tableClass,\n {\n [`align-${props.align}`]: props.align !== undefined,\n },\n])\n\nconst computedFields = computed<(TableField<Items> & {_noHeader?: true})[]>(() => {\n if (!props.fields.length && props.items.length) {\n const [firstItem] = props.items\n if (firstItem && (isTableItem(firstItem) || Array.isArray(firstItem))) {\n return Object.keys(firstItem).map((k) => {\n const label = startCase(k)\n return {\n key: k,\n label,\n tdAttr: getDataLabelAttr(props, label),\n }\n })\n }\n // The items are primitives, so we just return a single empty field\n // No header will be shown, as we don't know what to show\n return [{key: '', _noHeader: true}]\n }\n\n return props.fields.map((f) => {\n if (isTableField(f)) {\n const label = f.label ?? startCase(f.key as string)\n return {\n ...(f as TableField<Items>),\n tdAttr: {...getDataLabelAttr(props, label), ...f.tdAttr},\n }\n }\n const label = startCase(f as string)\n return {\n key: f as string,\n label,\n tdAttr: getDataLabelAttr(props, label),\n }\n })\n})\nconst computedFieldsTotal = computed(() => computedFields.value.length)\nconst showComputedHeaders = computed(() => {\n // We only hide the header if all fields have _noHeader set to true. Which would be our doing\n // This usually happens under a circumstance of displaying an array of primitives\n // Under any other circumstance, I'm not sure how this would apply\n if (computedFieldsTotal.value > 0 && computedFields.value.every((el) => el._noHeader === true))\n return false\n return true\n})\n\nconst footerProps = computed(() => ({\n variant: props.footVariant,\n class: props.tfootClass,\n}))\n\nconst itemAttributes = (item: Items, fieldKey: string, attr?: unknown) => {\n const val = get(item, fieldKey)\n return attr && typeof attr === 'function' ? attr(val, fieldKey, item) : attr\n}\n\nconst callThAttr = (item: Items | null, field: TableField<Items>, type: TableRowThead) => {\n const fieldKey = String(field.key)\n const val = get(item, fieldKey)\n return field.thAttr && typeof field.thAttr === 'function'\n ? field.thAttr(val, fieldKey, item, type)\n : field.thAttr\n}\n\nconst headerClicked = (field: TableField<Items>, event: Readonly<MouseEvent>, isFooter = false) => {\n emit('head-clicked', field.key as string, field, event, isFooter)\n}\n\nconst toggleRowDetails = (tr: Items) => {\n if (isTableItem(tr)) {\n const prevValue = detailsMap.value.get(tr)\n detailsMap.value.set(tr, !prevValue)\n tr._showDetails = !prevValue\n }\n}\n\nconst getFieldColumnClasses = (field: TableField) => [\n field.class,\n field.thClass,\n {\n 'b-table-sticky-column': field.stickyColumn,\n },\n props.fieldColumnClass\n ? typeof props.fieldColumnClass === 'function'\n ? props.fieldColumnClass(field)\n : props.fieldColumnClass\n : null,\n]\n\nconst getFieldRowClasses = (field: Readonly<TableField>, tr: Items) => {\n const val = get(tr, String(field.key))\n return [\n field.class,\n typeof field.tdClass === 'function' ? field.tdClass(val, String(field.key), tr) : field.tdClass,\n (isTableItem(tr) ? tr._cellVariants?.[field.key as string] : false)\n ? `table-${(tr as TableItem)._cellVariants?.[field.key as string]}`\n : null,\n {\n 'b-table-sticky-column': field.stickyColumn,\n },\n ]\n}\n\nconst handleMiddleClick = (item: Items, itemIndex: number, event: MouseEvent) => {\n if (event.button === 1 && !filterEvent(event)) {\n emit('row-middle-clicked', item, itemIndex, event)\n }\n}\nconst callTbodyTrAttrs = (item: Items | null, type: TableRowType) =>\n props.tbodyTrAttrs\n ? typeof props.tbodyTrAttrs === 'function'\n ? props.tbodyTrAttrs(item, type)\n : props.tbodyTrAttrs\n : null\n\nconst getRowClasses = (item: Items | null, type: TableRowType) =>\n props.tbodyTrClass\n ? typeof props.tbodyTrClass === 'function'\n ? props.tbodyTrClass(item, type)\n : props.tbodyTrClass\n : null\n\nconst generateTableRowId = (primaryKeyValue: string) =>\n `${computedId.value}__row_${primaryKeyValue}`\n\nconst computedSimpleProps = computed(() => ({\n ...pick(props, btableSimpleProps),\n tableClass: computedTableClasses.value,\n id: computedId.value,\n}))\n</script>\n","<template>\n <!-- eslint-disable prettier/prettier -->\n <BTableLite\n v-bind=\"computedLiteProps\"\n @head-clicked=\"onFieldHeadClick\"\n @row-clicked=\"onRowClick\"\n @row-dblclicked=\"\n (row: Items, index: number, e: MouseEvent) => {\n emit('row-dblclicked', row, index, e)\n }\n \"\n @row-contextmenu=\"\n (row: Items, index: number, e: MouseEvent) => {\n emit('row-contextmenu', row, index, e)\n }\n \"\n @row-hovered=\"\n (row: Items, index: number, e: MouseEvent) => {\n emit('row-hovered', row, index, e)\n }\n \"\n @row-unhovered=\"\n (row: Items, index: number, e: MouseEvent) => {\n emit('row-unhovered', row, index, e)\n }\n \"\n @row-middle-clicked=\"\n (row: Items, index: number, e: MouseEvent) => {\n emit('row-middle-clicked', row, index, e)\n }\n \"\n >\n <!-- eslint-enable prettier/prettier -->\n <template v-if=\"slots['thead-top']\" #thead-top=\"scope\">\n <slot\n name=\"thead-top\"\n v-bind=\"scope\"\n :clear-selected=\"exposedSelectableUtilities.clearSelected\"\n :select-all-rows=\"exposedSelectableUtilities.selectAllRows\"\n :fields=\"computedFields\"\n />\n </template>\n <template v-if=\"slots['thead-sub']\" #thead-sub=\"scope\">\n <slot name=\"thead-sub\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['top-row']\" #top-row=\"scope\">\n <slot name=\"top-row\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['row-details']\" #row-details=\"scope\">\n <slot\n name=\"row-details\"\n v-bind=\"scope\"\n :fields=\"computedFields\"\n :select-row=\"(index = scope.index) => exposedSelectableUtilities.selectRow(index)\"\n :unselect-row=\"(index = scope.index) => exposedSelectableUtilities.unselectRow(index)\"\n :row-selected=\"exposedSelectableUtilities.isRowSelected(scope.index)\"\n />\n </template>\n <template v-if=\"slots['bottom-row']\" #bottom-row=\"scope\">\n <slot name=\"bottom-row\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['custom-foot']\" #custom-foot=\"scope\">\n <slot name=\"custom-foot\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['table-caption']\" #table-caption>\n <slot name=\"table-caption\" />\n </template>\n <template v-for=\"name in dynamicCellSlots\" #[name]=\"scope\">\n <slot\n :name\n v-bind=\"scope\"\n :select-row=\"(index = scope.index) => exposedSelectableUtilities.selectRow(index)\"\n :unselect-row=\"(index = scope.index) => exposedSelectableUtilities.unselectRow(index)\"\n :row-selected=\"exposedSelectableUtilities.isRowSelected(scope.index)\"\n />\n </template>\n <template v-for=\"name in dynamicFootSlots\" #[name]=\"scope\">\n <slot\n :name\n v-bind=\"scope\"\n :select-all-rows=\"exposedSelectableUtilities.selectAllRows\"\n :clear-selected=\"exposedSelectableUtilities.clearSelected\"\n />\n </template>\n\n <template\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n #[`head(${String(field.key)})`]=\"scope\"\n >\n <slot\n :name=\"\n slots[`head(${String(field.key)})`]\n ? (`head(${String(field.key)})` as 'head()')\n : 'head()'\n \"\n v-bind=\"scope\"\n :select-all-rows=\"exposedSelectableUtilities.selectAllRows\"\n :clear-selected=\"exposedSelectableUtilities.clearSelected\"\n >\n {{ getTableFieldHeadLabel(field) }}\n </slot>\n <template v-if=\"isSortable && !!scope.field.sortable && props.noSortableIcon === false\">\n <slot\n v-if=\"sortByModel?.find((el) => el.key === scope.field.key)?.order === 'asc'\"\n v-bind=\"scope\"\n :name=\"\n slots[`sortAsc(${String(scope.field.key)})`]\n ? (`sortAsc(${String(scope.field.key)})` as 'sortAsc()')\n : 'sortAsc()'\n \"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-up-short\"\n viewBox=\"0 0 16 16\"\n aria-hidden\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z\"\n />\n </svg>\n </slot>\n <slot\n v-else-if=\"sortByModel?.find((el) => el.key === scope.field.key)?.order === 'desc'\"\n v-bind=\"scope\"\n :name=\"\n slots[`sortDesc(${String(scope.field.key)})`]\n ? (`sortDesc(${String(scope.field.key)})` as 'sortDesc()')\n : 'sortDesc()'\n \"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-down-short\"\n viewBox=\"0 0 16 16\"\n aria-hidden\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 4a.5.5 0 0 1 .5.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L7.5 10.293V4.5A.5.5 0 0 1 8 4z\"\n />\n </svg>\n </slot>\n <slot\n v-else\n v-bind=\"scope\"\n :name=\"\n slots[`sortDefault(${String(scope.field.key)})`]\n ? (`sortDefault(${String(scope.field.key)})` as 'sortDefault()')\n : 'sortDefault()'\n \"\n >\n <svg\n :style=\"{opacity: 0.4}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-up-short\"\n viewBox=\"0 0 16 16\"\n aria-hidden\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z\"\n />\n </svg>\n </slot>\n </template>\n </template>\n <template #custom-body=\"scope\">\n <BTr\n v-if=\"busyModel && slots['table-busy']\"\n class=\"b-table-busy-slot\"\n :class=\"getBusyRowClasses\"\n >\n <BTd :colspan=\"scope.fields.length\">\n <slot name=\"table-busy\" />\n </BTd>\n </BTr>\n\n <BTr\n v-else-if=\"props.showEmpty === true && computedItems.length === 0\"\n class=\"b-table-empty-row\"\n >\n <BTd :colspan=\"computedFields.length\">\n <div role=\"alert\" aria-live=\"polite\">\n <div class=\"text-center my-2\">\n <slot v-if=\"isFilterableTable\" name=\"empty-filtered\" v-bind=\"emptySlotScope\">\n {{ props.emptyFilteredText }}\n </slot>\n <slot v-else name=\"empty\" v-bind=\"emptySlotScope\">\n {{ props.emptyText }}\n </slot>\n </div>\n </div>\n </BTd>\n </BTr>\n </template>\n </BTableLite>\n</template>\n\n<script setup lang=\"ts\" generic=\"Items\">\nimport {useToNumber} from '@vueuse/core'\nimport {computed, onMounted, type Ref, ref, watch} from 'vue'\nimport {formatItem} from '../../utils/formatItem'\nimport BTableLite from './BTableLite.vue'\nimport BTd from './BTd.vue'\nimport BTr from './BTr.vue'\nimport {\n type BTableSortBy,\n type BTableSortByOrder,\n isTableField,\n isTableItem,\n type NoProviderTypes,\n type TableField,\n type TableFieldFormatter,\n type TableFieldRaw,\n type TableItem,\n type TableRowEvent,\n type TableRowType,\n type TableStrictClassValue,\n} from '../../types/TableTypes'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTableProps} from '../../types/ComponentProps'\nimport {get, pick, set} from '../../utils/object'\nimport {startCase} from '../../utils/stringUtils'\nimport type {LiteralUnion} from '../../types/LiteralUnion'\nimport {\n btableLiteProps,\n btableSimpleProps,\n getDataLabelAttr,\n getTableFieldHeadLabel,\n} from '../../utils/tableUtils'\nimport {useId} from '../../composables/useId'\n\nconst _props = withDefaults(\n defineProps<Omit<BTableProps<Items>, 'sortBy' | 'busy' | 'selectedItems'>>(),\n {\n noSortableIcon: false,\n perPage: Number.POSITIVE_INFINITY,\n filter: undefined,\n filterFunction: undefined,\n mustSort: false,\n filterable: undefined,\n provider: undefined,\n noProvider: undefined,\n noProviderPaging: false,\n noProviderSorting: false,\n multisort: false,\n noProviderFiltering: false,\n noLocalSorting: false,\n noSelectOnClick: false,\n selectable: false,\n stickySelect: false,\n selectHead: true,\n selectMode: 'multi',\n selectionVariant: 'primary',\n busyLoadingText: 'Loading...',\n currentPage: 1,\n // BTableLite props\n items: () => [],\n fields: () => [],\n // All others use defaults\n caption: undefined,\n align: undefined,\n footClone: undefined,\n labelStacked: undefined,\n showEmpty: false,\n emptyText: 'There are no records to show',\n emptyFilteredText: 'There are no records matching your request',\n fieldColumnClass: undefined,\n tbodyTrClass: undefined,\n detailsTdClass: undefined,\n headVariant: undefined,\n headRowVariant: undefined,\n footRowVariant: undefined,\n footVariant: undefined,\n modelValue: undefined,\n primaryKey: undefined,\n tbodyClass: undefined,\n tfootClass: undefined,\n tfootTrClass: undefined,\n theadClass: undefined,\n theadTrClass: undefined,\n // End BTableLite props\n // BTableSimple props\n borderVariant: undefined,\n variant: undefined,\n bordered: undefined,\n borderless: undefined,\n captionTop: undefined,\n dark: undefined,\n hover: undefined,\n id: undefined,\n noBorderCollapse: undefined,\n outlined: undefined,\n fixed: undefined,\n responsive: undefined,\n stacked: undefined,\n striped: undefined,\n stripedColumns: undefined,\n small: undefined,\n stickyHeader: undefined,\n // End BTableSimple props\n }\n)\nconst props = useDefaults(_props, 'BTable')\n\nconst emit = defineEmits<{\n 'filtered': [value: Items[]]\n 'head-clicked': [\n key: string,\n field: (typeof computedFields.value)[0],\n event: MouseEvent,\n isFooter: boolean,\n ]\n 'row-clicked': TableRowEvent<Items>\n 'row-dblclicked': TableRowEvent<Items>\n 'row-contextmenu': TableRowEvent<Items>\n 'row-hovered': TableRowEvent<Items>\n 'row-unhovered': TableRowEvent<Items>\n 'row-middle-clicked': TableRowEvent<Items>\n 'row-selected': [value: Items]\n 'row-unselected': [value: Items]\n 'sorted': [value: BTableSortBy<Items>]\n 'change': [value: Items[]]\n}>()\n\ntype SortSlotScope = {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: false\n}\n\nconst slots = defineSlots<{\n // BTableLite\n 'thead-top'?: (props: {\n columns: number\n fields: typeof computedFields.value\n selectAllRows: () => void\n clearSelected: () => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n [key: `head(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: false\n selectAllRows: () => void\n clearSelected: () => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'thead-sub'?: (\n props: {\n items: readonly Items[]\n fields: typeof computedFields.value\n field: (typeof computedFields.value)[0]\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'top-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `cell(${string})`]: (props: {\n value: unknown\n unformatted: unknown\n index: number\n item: Items\n field: (typeof computedFields.value)[0]\n items: readonly Items[]\n toggleDetails: () => void\n detailsShowing: boolean\n rowSelected: boolean\n selectRow: (index?: number) => void\n unselectRow: (index?: number) => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'row-details'?: (props: {\n item: Items\n toggleDetails: () => void\n fields: typeof computedFields.value\n index: number\n rowSelected: boolean\n selectRow: (index?: number) => void\n unselectRow: (index?: number) => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'bottom-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n\n [key: `foot(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: true\n selectAllRows: () => void\n clearSelected: () => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'custom-foot'?: (props: {\n fields: typeof computedFields.value\n items: readonly Items[]\n columns: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'table-caption'?: (props: Record<string, never>) => any\n\n // end btable slots\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: `sortAsc(${string})`]: (props: SortSlotScope) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: `sortDesc(${string})`]: (props: SortSlotScope) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: `sortDefault(${string})`]: (props: SortSlotScope) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'table-busy'?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'empty-filtered'?: (props: typeof emptySlotScope.value) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'empty'?: (props: typeof emptySlotScope.value) => any\n}>()\n\nconst dynamicCellSlots = computed(\n () => Object.keys(slots).filter((key) => key.startsWith('cell(')) as 'cell()'[]\n)\nconst dynamicFootSlots = computed(\n () => Object.keys(slots).filter((key) => key.startsWith('foot(')) as 'foot()'[]\n)\n\nconst sortByModel = defineModel<BTableProps<Items>['sortBy']>('sortBy', {\n default: undefined,\n})\nconst busyModel = defineModel<Exclude<BTableProps<Items>['busy'], undefined>>('busy', {\n default: false,\n})\nconst selectedItemsModel = defineModel<Exclude<BTableProps<Items>['selectedItems'], undefined>>(\n 'selectedItems',\n {\n default: () => [],\n }\n)\n\nconst computedId = useId(() => props.id)\n\nconst selectedItemsToSet = computed({\n get: () => new Set(selectedItemsModel.value),\n set: (val) => {\n selectedItemsModel.value = [...val]\n },\n})\n\nwatch(selectedItemsToSet, (newValue, oldValue) => {\n Array.from(oldValue)\n .filter((item) => !newValue.has(item))\n .forEach((item) => {\n emit('row-unselected', item)\n })\n Array.from(newValue)\n .filter((item) => !oldValue.has(item))\n .forEach((item) => {\n emit('row-selected', item)\n })\n})\n/**\n * This is to avoid the issue of directly mutating the array structure and to properly trigger the computed setter.\n * The utils also conveniently emit the proper events after\n */\nconst selectedItemsSetUtilities = {\n add: (item: Items) => {\n const value = new Set(selectedItemsToSet.value)\n value.add(item)\n selectedItemsToSet.value = value\n },\n clear: () => {\n selectedItemsToSet.value.forEach((item) => {\n selectedItemsSetUtilities.delete(item)\n })\n },\n delete: (item: Items) => {\n const value = new Set(selectedItemsToSet.value)\n if (props.primaryKey) {\n const pkey: string = props.primaryKey\n selectedItemsModel.value.forEach((v, i) => {\n const selectedKey = get(v, pkey)\n const itemKey = get(item, pkey)\n\n if (!!selectedKey && !!itemKey && selectedKey === itemKey) {\n value.delete(selectedItemsModel.value[i])\n }\n })\n } else {\n value.delete(item)\n }\n selectedItemsToSet.value = value\n },\n set: (items: Items[]) => {\n selectedItemsToSet.value = new Set(items)\n },\n has: (item: Items) => {\n if (!props.primaryKey) return selectedItemsToSet.value.has(item)\n\n // Resolver for when we are using primary keys\n const pkey: string = props.primaryKey\n for (const selected of selectedItemsToSet.value) {\n const selectedKey = get(selected, pkey)\n const itemKey = get(item, pkey)\n\n if (!!selectedKey && !!itemKey && selectedKey === itemKey) return true\n }\n return false\n },\n} as const\n\n/**\n * Only stores data that is fetched when using the provider\n */\nconst internalItems: Ref<Items[]> = ref([])\n\nconst perPageNumber = useToNumber(() => props.perPage, {method: 'parseInt'})\nconst currentPageNumber = useToNumber(() => props.currentPage, {method: 'parseInt'})\n\nconst isFilterableTable = computed(() => !!props.filter)\nconst usesProvider = computed(() => props.provider !== undefined)\nconst isSelecting = computed(() => selectedItemsToSet.value.size > 0)\n\nconst isSortable = computed(\n () =>\n sortByModel.value !== undefined ||\n props.fields.some(\n (field) => typeof field === 'object' && field !== null && field.sortable === true\n )\n)\n\nconst computedFields = computed<TableField<Items>[]>(() =>\n props.fields.map((el) => {\n if (!isTableField<Items>(el)) {\n const label = startCase(el as string)\n return {\n key: el as string,\n label,\n tdAttr: getDataLabelAttr(props, label),\n }\n }\n\n const value = sortByModel.value?.find((sb) => el.key === sb.key)\n const sortValue =\n isSortable.value === false\n ? undefined\n : value === undefined\n ? 'none'\n : value.order === 'desc'\n ? 'descending'\n : value.order === 'asc'\n ? 'ascending'\n : 'none'\n\n return {\n ...(el as TableField<Items>),\n thAttr: {\n 'aria-sort': sortValue,\n ...el.thAttr,\n },\n }\n })\n)\n\nconst tableClasses = computed(() => ({\n 'b-table-busy': busyModel.value,\n 'b-table-selectable': props.selectable,\n 'user-select-none': props.selectable && isSelecting.value,\n}))\n\nconst getBusyRowClasses = computed(() => [\n props.tbodyTrClass\n ? typeof props.tbodyTrClass === 'function'\n ? props.tbodyTrClass(null, 'table-busy')\n : props.tbodyTrClass\n : null,\n])\nconst getFieldColumnClasses = (field: TableField) => [\n {\n 'b-table-sortable-column': isSortable.value && field.sortable,\n },\n]\n// TODO this class has issues if the table has a variant already applied\n// Also the row should technically have aria-selected . Both things could probably just use a function with tbodyTrAttrs\n// But functional tbodyTrAttrs are not supported yet\n// Also the stuff for resolving functions could probably be made a util\nconst getRowClasses = (item: Items | null, type: TableRowType): TableStrictClassValue => [\n {\n [`selected table-${props.selectionVariant}`]:\n props.selectable && !!item && selectedItemsSetUtilities.has(item),\n },\n props.tbodyTrClass\n ? typeof props.tbodyTrClass === 'function'\n ? props.tbodyTrClass(item, type)\n : props.tbodyTrClass\n : null,\n]\n\nconst getFormatter = (value: TableField<Items>): TableFieldFormatter<Items> | undefined =>\n typeof value.sortByFormatted === 'function' ? value.sortByFormatted : value.formatter\n\nconst computedItems = computed<Items[]>(() => {\n // \"undefined\" values are set by us, we do this so we dont wipe out the comparer\n const sortByItems = sortByModel.value?.filter((el) => !!el.order)\n\n const mapItem = (item: Items): Items => {\n if (\n typeof item === 'object' &&\n item !== null &&\n Object.keys(item).some((key) => key.includes('.'))\n ) {\n let newItem: Partial<Items> = {}\n for (const key in item) {\n if (key.includes('.')) {\n newItem = set(newItem, key, item[key])\n } else {\n newItem[key] = item[key]\n }\n }\n return newItem as Items // This should be an items at this point\n }\n return item\n }\n\n const filterItem = (item: Items): boolean => {\n if (!isTableItem(item)) return true\n\n return Object.entries(item).some(([key, val]) => {\n if (\n val === null ||\n val === undefined ||\n key[0] === '_' ||\n (!props.filterable?.includes(key) && !!props.filterable?.length)\n )\n return false\n\n if (props.filterFunction && typeof props.filterFunction === 'function') {\n return props.filterFunction(item, props.filter)\n }\n\n const realVal = (): string => {\n const filterField = computedFields.value.find((el) => {\n if (isTableField<Items>(el)) return el.key === key\n return false\n })\n if (isTableField<Items>(filterField) && !!filterField.filterByFormatted) {\n const formatter = getFormatter(filterField)\n if (formatter) {\n return String(formatter(val, String(filterField.key), item))\n }\n }\n return typeof val === 'object' ? JSON.stringify(Object.values(val)) : val.toString()\n }\n const itemValue: string = realVal()\n return itemValue.toLowerCase().includes(props.filter?.toLowerCase() ?? '')\n })\n }\n\n const mappedItems = (usesProvider.value ? internalItems.value : props.items).reduce(\n (acc, val) => {\n const item = mapItem(val)\n const shouldFilter =\n isFilterableTable.value && (!usesProvider.value || props.noProviderFiltering)\n\n if (!shouldFilter || filterItem(item)) acc.push(item)\n\n return acc\n },\n [] as Items[]\n )\n\n if (\n sortByItems?.length &&\n ((isSortable.value === true && !usesProvider.value && !props.noLocalSorting) ||\n (isSortable.value === true && usesProvider.value && props.noProviderSorting))\n ) {\n // Multi-sort\n return mappedItems.sort((a, b) => {\n for (let i = 0; i < sortByItems.length; i++) {\n const {key, comparer, order} = sortByItems[i]\n const getStringValue = (ob: Items): string => {\n if (!isTableItem(ob)) return String(ob)\n\n const sortField = computedFields.value.find((el) => {\n if (isTableField<Items>(el)) return el.key === key\n\n return false\n })\n const val = get(ob, key as keyof TableItem)\n if (isTableField<Items>(sortField) && !!sortField.sortByFormatted) {\n const formatter = getFormatter(sortField)\n if (formatter) {\n return String(formatItem(ob, String(sortField.key), formatter))\n }\n }\n return typeof val === 'object' && val !== null\n ? JSON.stringify(val)\n : (val?.toString() ?? '')\n }\n\n const comparison = comparer\n ? comparer(a, b, key)\n : getStringValue(a).localeCompare(getStringValue(b), undefined, {numeric: true})\n\n if (comparison !== 0) {\n return order === 'asc' ? comparison : -comparison\n }\n }\n return 0 // items are equal\n })\n }\n\n return mappedItems\n})\n\nconst emptySlotScope = computed(() => ({\n emptyFilteredText: props.emptyFilteredText,\n emptyText: props.emptyText,\n fields: computedFields.value,\n items: computedItems.value,\n}))\n\nconst computedDisplayItems = computed<Items[]>(() => {\n if (Number.isNaN(perPageNumber.value) || (usesProvider.value && !props.noProviderPaging)) {\n return computedItems.value\n }\n\n return computedItems.value.slice(\n (currentPageNumber.value - 1) * (perPageNumber.value || Number.POSITIVE_INFINITY),\n currentPageNumber.value * (perPageNumber.value || Number.POSITIVE_INFINITY)\n )\n})\n\nwatch(computedDisplayItems, (v) => {\n emit('change', v)\n})\n\nconst handleRowSelection = (\n row: Items,\n index: number,\n shiftClicked = false,\n ctrlClicked = false,\n metaClicked = false\n) => {\n if (!props.selectable) return\n\n if (props.selectMode === 'single' || props.selectMode === 'multi') {\n // Do nothing when these items are held\n if (shiftClicked || ctrlClicked) return\n // Delete if item is in\n if (selectedItemsSetUtilities.has(row)) {\n selectedItemsSetUtilities.delete(row)\n } else {\n if (props.selectMode === 'single') {\n selectedItemsSetUtilities.set([row])\n } else {\n selectedItemsSetUtilities.add(row)\n }\n }\n } else {\n if (ctrlClicked || metaClicked) {\n // Delete if in the object\n if (selectedItemsSetUtilities.has(row)) {\n selectedItemsSetUtilities.delete(row)\n // Otherwise add. Functions similarly to 'multi' at this point\n } else {\n selectedItemsSetUtilities.add(row)\n }\n // This is where range is different, due to the difference in shift\n } else if (shiftClicked) {\n const lastSelectedItem = [...selectedItemsToSet.value].pop()\n const lastSelectedIndex = computedItems.value.findIndex((i) => i === lastSelectedItem)\n const selectStartIndex = Math.min(lastSelectedIndex, index)\n const selectEndIndex = Math.max(lastSelectedIndex, index)\n const items = computedItems.value.slice(selectStartIndex, selectEndIndex + 1)\n selectedItemsSetUtilities.set(items)\n // If nothing is being held, then we just behave like it's single mode\n } else {\n selectedItemsSetUtilities.set([row])\n }\n }\n}\n\nconst onRowClick = (row: Items, index: number, e: MouseEvent) => {\n if (props.noSelectOnClick === false) {\n handleRowSelection(row, index, e.shiftKey, e.ctrlKey, e.metaKey)\n }\n emit('row-clicked', row, index, e)\n}\n\nconst handleFieldSorting = (field: TableField<Items>) => {\n if (!isSortable.value) return\n\n const fieldKey = typeof field === 'object' && field !== null ? field.key : field\n const fieldSortable = typeof field === 'object' && field !== null ? field.sortable : false\n\n if (!(isSortable.value === true && fieldSortable === true)) return\n\n const resolveOrder = (val: BTableSortByOrder): BTableSortByOrder | undefined => {\n if (val === 'asc') return 'desc'\n if (val === undefined) return 'asc'\n if (\n props.mustSort === true ||\n (Array.isArray(props.mustSort) && props.mustSort.includes(fieldKey as string))\n )\n return 'asc'\n return undefined\n }\n\n const index = sortByModel.value?.findIndex((el) => el.key === fieldKey) ?? -1\n const originalValue = sortByModel.value?.[index]\n const updatedValue: BTableSortBy<Items> =\n // If value is new, we default to ascending\n // Otherwise we make a temp copy of the value\n index === -1 || !originalValue ? {key: fieldKey as string, order: 'asc'} : {...originalValue}\n\n /**\n * @returns the updated value to emit for sorted\n */\n const handleMultiSort = (): BTableSortBy<Items> => {\n sortByModel.value = sortByModel.value ?? []\n const val = updatedValue\n if (index === -1) {\n sortByModel.value.push(val)\n } else {\n val.order = resolveOrder(val.order)\n sortByModel.value.splice(index, 1, val)\n }\n return val\n }\n\n /**\n * @returns the updated value to emit for sorted\n */\n const handleSingleSort = (): BTableSortBy<Items> => {\n const val = {\n ...updatedValue,\n order: index === -1 ? updatedValue.order : resolveOrder(updatedValue.order),\n }\n const tmp = (sortByModel.value || []).map<BTableSortBy<Items>>((e) => ({\n ...e,\n order: undefined,\n }))\n if (index === -1) {\n tmp.push(val)\n } else {\n tmp[index] = val\n }\n sortByModel.value = tmp\n return val\n }\n\n // Then emit the returned updated value\n emit('sorted', props.multisort === true ? handleMultiSort() : handleSingleSort())\n}\n\nconst onFieldHeadClick = (\n fieldKey: string,\n field: TableField<Items>,\n event: Readonly<MouseEvent>,\n isFooter = false\n) => {\n emit('head-clicked', fieldKey, field, event, isFooter)\n handleFieldSorting(field)\n}\n\nconst callItemsProvider = async () => {\n if (!usesProvider.value || props.provider === undefined || busyModel.value) return\n busyModel.value = true\n const response = props.provider({\n currentPage: currentPageNumber.value,\n filter: props.filter,\n sortBy: sortByModel.value,\n perPage: perPageNumber.value,\n })\n try {\n const items = response instanceof Promise ? await response : response\n\n if (items === undefined) return\n internalItems.value = items\n } finally {\n // Potential race condition could occur if the user explicitly sets the busy value to a different value while the response promise is executing\n // which would have been the users choice.\n // eslint-disable-next-line require-atomic-updates\n busyModel.value = false\n }\n}\n\nconst providerPropsWatch = async (prop: string, val: unknown, oldVal: unknown) => {\n if (val === oldVal) return\n\n //stop provide when paging\n const inNoProvider = (key: NoProviderTypes) => props.noProvider?.includes(key) === true\n const noProvideWhenPaging =\n (prop === 'currentPage' || prop === 'perPage') &&\n (inNoProvider('paging') || props.noProviderPaging === true)\n const noProvideWhenFiltering =\n prop === 'filter' && (inNoProvider('filtering') || props.noProviderFiltering === true)\n const noProvideWhenSorting =\n (prop === 'sortBy' || prop === 'sortDesc') &&\n (inNoProvider('sorting') || props.noProviderSorting === true)\n\n if (noProvideWhenPaging || noProvideWhenFiltering || noProvideWhenSorting) return\n\n if (usesProvider.value === true) {\n await callItemsProvider()\n }\n\n if (!(prop === 'currentPage' || prop === 'perPage')) {\n emit('filtered', [...computedItems.value])\n }\n}\n\nwatch(\n () => props.filter,\n (filter, oldFilter) => {\n providerPropsWatch('filter', filter, oldFilter)\n\n if (filter === oldFilter || usesProvider.value) return\n if (!filter) {\n emit('filtered', [...computedItems.value])\n }\n }\n)\nwatch(currentPageNumber, (val, oldVal) => {\n providerPropsWatch('currentPage', val, oldVal)\n})\nwatch(perPageNumber, (val, oldVal) => {\n providerPropsWatch('perPage', val, oldVal)\n})\nwatch(\n sortByModel,\n (val, oldVal) => {\n providerPropsWatch('sortBy', val, oldVal)\n },\n {deep: true}\n)\n\nwatch(\n () => props.provider,\n (newValue) => {\n // Reset the internal values if the provider stops getting used\n if (newValue === undefined) {\n internalItems.value = []\n return\n }\n // Otherwise we should refresh the table on such a change\n callItemsProvider()\n }\n)\n\nonMounted(callItemsProvider)\n\nconst exposedSelectableUtilities = {\n clearSelected: () => {\n if (!props.selectable) return\n selectedItemsSetUtilities.clear()\n },\n selectAllRows: () => {\n if (!props.selectable || props.selectMode === 'single') return\n selectedItemsToSet.value = new Set(computedItems.value)\n },\n selectRow: (index: number) => {\n if (!props.selectable) return\n const item = computedItems.value[index]\n if (!item || selectedItemsSetUtilities.has(item)) return\n if (props.selectMode === 'single') {\n selectedItemsSetUtilities.set([item])\n } else {\n selectedItemsSetUtilities.add(item)\n }\n },\n unselectRow: (index: number) => {\n if (!props.selectable) return\n const item = computedItems.value[index]\n if (!item || !selectedItemsSetUtilities.has(item)) return\n selectedItemsSetUtilities.delete(item)\n },\n isRowSelected: (index: number) => {\n if (!props.selectable) return false\n const item = computedItems.value[index]\n return selectedItemsSetUtilities.has(item)\n },\n} as const\n\nconst computedLiteProps = computed(() => ({\n ...pick(props, [...btableLiteProps, ...btableSimpleProps]),\n tableAttrs: {\n ariaBusy: busyModel.value,\n },\n items: computedDisplayItems.value,\n fields: computedFields.value as TableFieldRaw<Items>[],\n tableClass: tableClasses.value,\n tbodyTrClass: getRowClasses,\n fieldColumnClass: getFieldColumnClasses,\n id: computedId.value,\n}))\n\ndefineExpose({\n // The row selection methods are really for compat. Users should probably use the v-model though\n ...exposedSelectableUtilities,\n items: computedItems,\n refresh: callItemsProvider,\n})\n</script>\n"],"names":["_useSlots","label","_useModel","_a"],"mappings":";;;;;;;AAGO,MAAM,aAAa,CACxB,MAEA,UACA,cACG;AACG,QAAA,MAAM,IAAI,MAAM,QAAQ;AACvB,SAAA,aAAa,OAAO,cAAc,aAAa,UAAU,KAAK,UAAU,IAAI,IAAI;AACzF;ACGO,MAAM,cAAc,CAAC,UAC1B,OAAO,UAAU,YAAY,UAAU;AAiE5B,MAAA,eAAe,CAAI,UAC9B,OAAO,UAAU,YAAY,UAAU,QAAQ,SAAS;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),t=require("./object-B-6ddRYH.js"),l=require("./BTableSimple.vue_vue_type_script_setup_true_lang-BGc-Vbfw.js"),o=require("./useDefaults-Bq2idhQU.js"),a=require("./stringUtils-BBcOJJJC.js"),r=require("./useId-BOa4n5pr.js"),n=require("./index-BqHkgtNq.js"),s=(e,l,o)=>{const a=t.get(e,l);return o&&"function"==typeof o?o(a,l,e):a},d=e=>"object"==typeof e&&null!==e,i=e=>"object"==typeof e&&null!==e&&"key"in e,u=e.defineComponent({__name:"BTbody",props:{variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BTbody"),r=e.computed((()=>({[`thead-${a.variant}`]:null!==a.variant})));return(t,l)=>(e.openBlock(),e.createElementBlock("tbody",{class:e.normalizeClass(r.value)},[e.renderSlot(t.$slots,"default")],2))}}),c=["scope","colspan","rowspan","data-label"],f={key:0},p=e.defineComponent({__name:"BTd",props:{colspan:{default:void 0},rowspan:{default:void 0},stackedHeading:{default:void 0},stickyColumn:{type:Boolean,default:!1},variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BTd"),r=e.computed((()=>({[`table-${a.variant}`]:null!==a.variant,"b-table-sticky-column":a.stickyColumn,"table-b-table-default":a.stickyColumn&&null===a.variant}))),n=e.computed((()=>a.colspan?"colspan":a.rowspan?"rowspan":"col"));return(t,l)=>(e.openBlock(),e.createElementBlock("td",{scope:n.value,class:e.normalizeClass(r.value),colspan:e.unref(a).colspan,rowspan:e.unref(a).rowspan,"data-label":e.unref(a).stackedHeading},[e.unref(a).stackedHeading?(e.openBlock(),e.createElementBlock("div",f,[e.renderSlot(t.$slots,"default")])):e.renderSlot(t.$slots,"default",{key:1})],10,c))}}),v=e.defineComponent({__name:"BTfoot",props:{variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BTfoot"),r=e.computed((()=>({[`table-${a.variant}`]:null!==a.variant})));return(t,l)=>(e.openBlock(),e.createElementBlock("tfoot",{class:e.normalizeClass(r.value)},[e.renderSlot(t.$slots,"default")],2))}}),m=["scope","colspan","rowspan","data-label"],y={key:0},b=e.defineComponent({__name:"BTh",props:{colspan:{default:void 0},rowspan:{default:void 0},stackedHeading:{default:void 0},stickyColumn:{type:Boolean,default:!1},variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BTh"),r=e.computed((()=>({[`table-${a.variant}`]:null!==a.variant,"b-table-sticky-column":a.stickyColumn,"table-b-table-default":a.stickyColumn&&null===a.variant}))),n=e.computed((()=>a.colspan?"colspan":a.rowspan?"rowspan":"col"));return(t,l)=>(e.openBlock(),e.createElementBlock("th",{scope:n.value,class:e.normalizeClass(r.value),colspan:e.unref(a).colspan,rowspan:e.unref(a).rowspan,"data-label":e.unref(a).stackedHeading},[void 0!==e.unref(a).stackedHeading?(e.openBlock(),e.createElementBlock("div",y,[e.renderSlot(t.$slots,"default")])):e.renderSlot(t.$slots,"default",{key:1})],10,m))}}),k=e.defineComponent({__name:"BThead",props:{variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BThead"),r=e.computed((()=>({[`table-${a.variant}`]:null!==a.variant})));return(t,l)=>(e.openBlock(),e.createElementBlock("thead",{class:e.normalizeClass(r.value)},[e.renderSlot(t.$slots,"default")],2))}}),g=e.defineComponent({__name:"BTr",props:{variant:{default:null}},setup(t){const l=t,a=o.useDefaults(l,"BTr"),r=e.computed((()=>({[`table-${a.variant}`]:null!==a.variant})));return(t,l)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass(r.value)},[e.renderSlot(t.$slots,"default")],2))}}),w=e=>"string"==typeof e?a.titleCase(e):void 0!==e.label?e.label:"string"==typeof e.key?a.titleCase(e.key):e.key,h=Object.freeze(Object.keys({bordered:0,borderless:0,borderVariant:0,captionTop:0,dark:0,fixed:0,hover:0,id:0,noBorderCollapse:0,outlined:0,responsive:0,small:0,stacked:0,stickyHeader:0,striped:0,stripedColumns:0,variant:0,tableAttrs:0,tableClass:0})),C=Object.freeze(Object.keys({align:0,caption:0,detailsTdClass:0,fieldColumnClass:0,fields:0,footClone:0,footRowVariant:0,footVariant:0,headRowVariant:0,headVariant:0,items:0,labelStacked:0,modelValue:0,primaryKey:0,tbodyClass:0,tbodyTrAttrs:0,tbodyTrClass:0,tfootClass:0,tfootTrClass:0,theadClass:0,theadTrClass:0})),B=(e,t)=>e.stacked&&!0!==e.labelStacked?{"data-label":t}:void 0,S=["TD","TH","TR"],x=["a","a *","button","button *","input:not(.disabled):not([disabled])","select:not(.disabled):not([disabled])","textarea:not(.disabled):not([disabled])",'[role="link"]','[role="link"] *','[role="button"]','[role="button"] *',"[tabindex]:not(.disabled):not([disabled])"].join(","),T=e=>{if(!e||!e.target)return!1;const t=e.target;if("disabled"in t&&t.disabled||-1!==S.indexOf(t.tagName))return!1;if(t.closest(".dropdown-menu"))return!0;const l="LABEL"===t.tagName?t:t.closest("label");if(l){const e=l.getAttribute("for"),t=e?document.getElementById(e):l.querySelector("input, select, textarea");if(t&&!t.disabled)return!0}return t.matches(x)},_={key:0,class:"b-table-stacked-label"},V={class:"d-inline-flex flex-nowrap align-items-center gap-1"},$={key:2},P=e.defineComponent({__name:"BTableLite",props:{align:{default:void 0},caption:{default:void 0},detailsTdClass:{default:void 0},fieldColumnClass:{type:[Function,String,Object,Array],default:void 0},fields:{default:()=>[]},footClone:{type:Boolean,default:!1},footRowVariant:{default:void 0},footVariant:{default:void 0},headRowVariant:{default:void 0},headVariant:{default:void 0},items:{default:()=>[]},labelStacked:{type:Boolean,default:!1},modelValue:{default:void 0},primaryKey:{default:void 0},tbodyClass:{default:void 0},tbodyTrAttrs:{type:[Function,Object],default:void 0},tbodyTrClass:{type:[Function,String,Array,Object],default:void 0},tfootClass:{default:void 0},tfootTrClass:{default:void 0},theadClass:{default:void 0},theadTrClass:{default:void 0},bordered:{type:Boolean,default:void 0},borderless:{type:Boolean,default:void 0},borderVariant:{default:void 0},captionTop:{type:Boolean,default:void 0},dark:{type:Boolean,default:void 0},fixed:{type:Boolean,default:void 0},hover:{type:Boolean,default:void 0},id:{default:void 0},noBorderCollapse:{type:Boolean,default:void 0},outlined:{type:Boolean,default:void 0},responsive:{type:[Boolean,String],default:void 0},small:{type:Boolean,default:void 0},stacked:{type:[Boolean,String],default:void 0},stickyHeader:{type:[Boolean,String,Number],default:void 0},striped:{type:Boolean,default:void 0},stripedColumns:{type:Boolean,default:void 0},variant:{default:void 0},tableAttrs:{},tableClass:{default:void 0}},emits:["head-clicked","row-clicked","row-dblclicked","row-contextmenu","row-hovered","row-unhovered","row-middle-clicked"],setup(n,{emit:c}){const f=n,m=o.useDefaults(f,"BTableLite"),y=c,C=e.useSlots(),S=r.useId((()=>m.id)),x=e.ref(new WeakMap);e.watch((()=>m.items),(e=>{e.forEach((e=>{d(e)&&x.value.set(...(e=>[e,e._showDetails])(e))}))}),{deep:!0,immediate:!0});const P=e.computed((()=>[m.tableClass,{[`align-${m.align}`]:void 0!==m.align}])),N=e.computed((()=>{if(!m.fields.length&&m.items.length){const[e]=m.items;return e&&(d(e)||Array.isArray(e))?Object.keys(e).map((e=>{const t=a.startCase(e);return{key:e,label:t,tdAttr:B(m,t)}})):[{key:"",_noHeader:!0}]}return m.fields.map((e=>{if(i(e)){const t=e.label??a.startCase(e.key);return{...e,tdAttr:{...B(m,t),...e.tdAttr}}}const t=a.startCase(e);return{key:e,label:t,tdAttr:B(m,t)}}))})),A=e.computed((()=>N.value.length)),E=e.computed((()=>!(A.value>0&&N.value.every((e=>!0===e._noHeader))))),R=e.computed((()=>({variant:m.footVariant,class:m.tfootClass}))),F=(e,l,o)=>{const a=String(l.key),r=t.get(e,a);return l.thAttr&&"function"==typeof l.thAttr?l.thAttr(r,a,e,o):l.thAttr},D=(e,t,l=!1)=>{y("head-clicked",e.key,e,t,l)},j=e=>{if(d(e)){const t=x.value.get(e);x.value.set(e,!t),e._showDetails=!t}},I=e=>[e.class,e.thClass,{"b-table-sticky-column":e.stickyColumn},m.fieldColumnClass?"function"==typeof m.fieldColumnClass?m.fieldColumnClass(e):m.fieldColumnClass:null],M=(e,l)=>{var o,a;const r=t.get(l,String(e.key));return[e.class,"function"==typeof e.tdClass?e.tdClass(r,String(e.key),l):e.tdClass,d(l)&&(null==(o=l._cellVariants)?void 0:o[e.key])?`table-${null==(a=l._cellVariants)?void 0:a[e.key]}`:null,{"b-table-sticky-column":e.stickyColumn}]},z=(e,t)=>m.tbodyTrAttrs?"function"==typeof m.tbodyTrAttrs?m.tbodyTrAttrs(e,t):m.tbodyTrAttrs:null,O=(e,t)=>m.tbodyTrClass?"function"==typeof m.tbodyTrClass?m.tbodyTrClass(e,t):m.tbodyTrClass:null,L=e.computed((()=>({...t.pick(m,h),tableClass:P.value,id:S.value})));return(o,a)=>(e.openBlock(),e.createBlock(l._sfc_main,e.normalizeProps(e.guardReactiveProps(L.value)),{default:e.withCtx((()=>[e.withDirectives(e.createVNode(k,{variant:e.unref(m).headVariant,class:e.normalizeClass(e.unref(m).theadClass)},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"thead-top",{columns:A.value,fields:N.value}),e.createVNode(g,{variant:e.unref(m).headRowVariant,class:e.normalizeClass(e.unref(m).theadTrClass)},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(t=>(e.openBlock(),e.createBlock(b,e.mergeProps({key:t.key,scope:"col",class:I(t),title:t.headerTitle,variant:t.variant,abbr:t.headerAbbr,style:t.thStyle,ref_for:!0},F(null,t,"top"),{onClick:e=>D(t,e)}),{default:e.withCtx((()=>[e.renderSlot(o.$slots,C[`head(${String(t.key)})`]?`head(${String(t.key)})`:"head()",{label:t.label,column:t.key,field:t,isFoot:!1},(()=>[e.createTextVNode(e.toDisplayString(e.unref(w)(t)),1)]))])),_:2},1040,["class","title","variant","abbr","style","onClick"])))),128))])),_:3},8,["variant","class"]),C["thead-sub"]?(e.openBlock(),e.createBlock(g,{key:0},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(t=>(e.openBlock(),e.createBlock(p,{key:t.key,scope:"col",variant:t.variant,class:e.normalizeClass([t.class,t.thClass])},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"thead-sub",{items:e.unref(m).items,fields:N.value,field:t},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:2},1032,["variant","class"])))),128))])),_:3})):e.createCommentVNode("",!0)])),_:3},8,["variant","class"]),[[e.vShow,E.value]]),e.createVNode(u,{class:e.normalizeClass(e.unref(m).tbodyClass)},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"custom-body",{fields:N.value,items:e.unref(m).items,columns:A.value},(()=>[!e.unref(m).stacked&&C["top-row"]?(e.openBlock(),e.createBlock(g,e.mergeProps({key:0,class:O(null,"row-top")},z(null,"row-top")),{default:e.withCtx((()=>[e.renderSlot(o.$slots,"top-row",{columns:A.value,fields:N.value})])),_:3},16,["class"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m).items,((l,a)=>{return e.openBlock(),e.createElementBlock(e.Fragment,{key:e.unref(m).primaryKey&&e.unref(t.get)(l,e.unref(m).primaryKey)?e.unref(t.get)(l,e.unref(m).primaryKey):a},[e.createVNode(g,e.mergeProps({id:e.unref(m).primaryKey&&e.unref(t.get)(l,e.unref(m).primaryKey)?(r=e.unref(t.get)(l,e.unref(m).primaryKey),`${S.value}__row_${r}`):void 0,class:O(l,"row"),variant:e.unref(d)(l)?l._rowVariant:void 0,ref_for:!0},z(l,"row"),{onClick:t=>!e.unref(T)(t)&&y("row-clicked",l,a,t),onDblclick:t=>!e.unref(T)(t)&&y("row-dblclicked",l,a,t),onContextmenu:t=>!e.unref(T)(t)&&y("row-contextmenu",l,a,t),onMouseenter:t=>!e.unref(T)(t)&&y("row-hovered",l,a,t),onMouseleave:t=>!e.unref(T)(t)&&y("row-unhovered",l,a,t),onMousedown:e=>((e,t,l)=>{1!==l.button||T(l)||y("row-middle-clicked",e,t,l)})(l,a,e)}),{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(r=>{var n;return e.openBlock(),e.createBlock(p,e.mergeProps({key:r.key,variant:e.unref(d)(l)&&(null==(n=l._cellVariants)?void 0:n[r.key])?null:r.variant,class:M(r,l),ref_for:!0},((e,l,o)=>{const a=t.get(e,l);return o&&"function"==typeof o?o(a,l,e):o})(l,String(r.key),r.tdAttr)),{default:e.withCtx((()=>[e.unref(m).stacked&&e.unref(m).labelStacked?(e.openBlock(),e.createElementBlock("label",_,e.toDisplayString(e.unref(w)(r)),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,C[`cell(${String(r.key)})`]?`cell(${String(r.key)})`:"cell()",{value:e.unref(s)(l,String(r.key),r.formatter),unformatted:e.unref(t.get)(l,String(r.key)),index:a,item:l,field:r,items:o.items,toggleDetails:()=>j(l),detailsShowing:!!e.unref(d)(l)&&(x.value.get(l)??!1)},(()=>[C[`cell(${String(r.key)})`]||C["cell()"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(s)(l,String(r.key),r.formatter)),1)],64))]))])),_:2},1040,["variant","class"])})),128))])),_:2},1040,["id","class","variant","onClick","onDblclick","onContextmenu","onMouseenter","onMouseleave","onMousedown"]),e.unref(d)(l)&&!0===x.value.get(l)&&C["row-details"]?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(g,{"aria-hidden":"true",role:"presentation",class:"d-none"}),e.createVNode(g,e.mergeProps({class:O(l,"row-details"),variant:l._rowVariant,ref_for:!0},z(l,"row-details")),{default:e.withCtx((()=>[e.createVNode(p,{colspan:A.value,class:e.normalizeClass(o.detailsTdClass)},{default:e.withCtx((()=>[e.renderSlot(o.$slots,"row-details",{item:l,toggleDetails:()=>j(l),fields:N.value,index:a})])),_:2},1032,["colspan","class"])])),_:2},1040,["class","variant"])],64)):e.createCommentVNode("",!0)],64);var r})),128)),!e.unref(m).stacked&&C["bottom-row"]?(e.openBlock(),e.createBlock(g,e.mergeProps({key:1,class:["bottom-row",O(null,"row-bottom")]},z(null,"row-bottom")),{default:e.withCtx((()=>[e.renderSlot(o.$slots,"bottom-row",{columns:A.value,fields:N.value})])),_:3},16,["class"])):e.createCommentVNode("",!0)]))])),_:3},8,["class"]),e.unref(m).footClone?(e.openBlock(),e.createBlock(v,e.normalizeProps(e.mergeProps({key:0},R.value)),{default:e.withCtx((()=>[e.createVNode(g,{variant:e.unref(m).footRowVariant,class:e.normalizeClass(e.unref(m).tfootTrClass)},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(t=>(e.openBlock(),e.createBlock(b,e.mergeProps({key:t.key,scope:"col",class:I(t),title:t.headerTitle,abbr:t.headerAbbr,style:t.thStyle,variant:t.variant,ref_for:!0},F(null,t,"bottom"),{onClick:e=>D(t,e,!0)}),{default:e.withCtx((()=>[e.createElementVNode("div",V,[e.createElementVNode("div",null,[e.renderSlot(o.$slots,C[`foot(${String(t.key)})`]?`foot(${String(t.key)})`:"foot()",{label:t.label,column:t.key,field:t,isFoot:!0},(()=>[e.createTextVNode(e.toDisplayString(e.unref(w)(t)),1)]))])])])),_:2},1040,["class","title","abbr","style","variant","onClick"])))),128))])),_:3},8,["variant","class"])])),_:3},16)):C["custom-foot"]?(e.openBlock(),e.createBlock(v,e.normalizeProps(e.mergeProps({key:1},R.value)),{default:e.withCtx((()=>[e.renderSlot(o.$slots,"custom-foot",{fields:N.value,items:e.unref(m).items,columns:A.value})])),_:3},16)):e.createCommentVNode("",!0),C["table-caption"]||e.unref(m).caption?(e.openBlock(),e.createElementBlock("caption",$,[e.renderSlot(o.$slots,"table-caption",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(m).caption),1)]))])):e.createCommentVNode("",!0)])),_:3},16))}}),N={style:{opacity:.4},xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-arrow-up-short",viewBox:"0 0 16 16","aria-hidden":""},A={role:"alert","aria-live":"polite"},E={class:"text-center my-2"},R=e.defineComponent({__name:"BTable",props:e.mergeModels({provider:{default:void 0},noProvider:{default:void 0},noProviderPaging:{type:Boolean,default:!1},noProviderSorting:{type:Boolean,default:!1},noProviderFiltering:{type:Boolean,default:!1},mustSort:{type:[Boolean,Array],default:!1},selectable:{type:Boolean,default:!1},multisort:{type:Boolean,default:!1},stickySelect:{type:Boolean,default:!1},selectHead:{type:[Boolean,String],default:!0},selectMode:{default:"multi"},selectionVariant:{default:"primary"},busyLoadingText:{default:"Loading..."},perPage:{default:Number.POSITIVE_INFINITY},currentPage:{default:1},filter:{default:void 0},filterFunction:{type:Function,default:void 0},filterable:{default:void 0},noLocalSorting:{type:Boolean,default:!1},noSelectOnClick:{type:Boolean,default:!1},noSortableIcon:{type:Boolean,default:!1},emptyFilteredText:{default:"There are no records matching your request"},emptyText:{default:"There are no records to show"},showEmpty:{type:Boolean,default:!1},align:{default:void 0},caption:{default:void 0},detailsTdClass:{default:void 0},fieldColumnClass:{type:[Function,String,Object,Array],default:void 0},fields:{default:()=>[]},footClone:{type:Boolean,default:void 0},footRowVariant:{default:void 0},footVariant:{default:void 0},headRowVariant:{default:void 0},headVariant:{default:void 0},items:{default:()=>[]},labelStacked:{type:Boolean,default:void 0},modelValue:{default:void 0},primaryKey:{default:void 0},tbodyClass:{default:void 0},tbodyTrAttrs:{},tbodyTrClass:{type:[Function,String,Array,Object],default:void 0},tfootClass:{default:void 0},tfootTrClass:{default:void 0},theadClass:{default:void 0},theadTrClass:{default:void 0},bordered:{type:Boolean,default:void 0},borderless:{type:Boolean,default:void 0},borderVariant:{default:void 0},captionTop:{type:Boolean,default:void 0},dark:{type:Boolean,default:void 0},fixed:{type:Boolean,default:void 0},hover:{type:Boolean,default:void 0},id:{default:void 0},noBorderCollapse:{type:Boolean,default:void 0},outlined:{type:Boolean,default:void 0},responsive:{type:[Boolean,String],default:void 0},small:{type:Boolean,default:void 0},stacked:{type:[Boolean,String],default:void 0},stickyHeader:{type:[Boolean,String,Number],default:void 0},striped:{type:Boolean,default:void 0},stripedColumns:{type:Boolean,default:void 0},variant:{default:void 0},tableAttrs:{}},{sortBy:{default:void 0},sortByModifiers:{},busy:{type:Boolean,default:!1},busyModifiers:{},selectedItems:{default:()=>[]},selectedItemsModifiers:{}}),emits:e.mergeModels(["filtered","head-clicked","row-clicked","row-dblclicked","row-contextmenu","row-hovered","row-unhovered","row-middle-clicked","row-selected","row-unselected","sorted","change"],["update:sortBy","update:busy","update:selectedItems"]),setup(l,{expose:u,emit:c}){const f=l,v=o.useDefaults(f,"BTable"),m=c,y=e.useSlots(),b=e.computed((()=>Object.keys(y).filter((e=>e.startsWith("cell("))))),k=e.computed((()=>Object.keys(y).filter((e=>e.startsWith("foot("))))),S=e.useModel(l,"sortBy"),x=e.useModel(l,"busy"),T=e.useModel(l,"selectedItems"),_=r.useId((()=>v.id)),V=e.computed({get:()=>new Set(T.value),set:e=>{T.value=[...e]}});e.watch(V,((e,t)=>{Array.from(t).filter((t=>!e.has(t))).forEach((e=>{m("row-unselected",e)})),Array.from(e).filter((e=>!t.has(e))).forEach((e=>{m("row-selected",e)}))}));const $={add:e=>{const t=new Set(V.value);t.add(e),V.value=t},clear:()=>{V.value.forEach((e=>{$.delete(e)}))},delete:e=>{const l=new Set(V.value);if(v.primaryKey){const o=v.primaryKey;T.value.forEach(((a,r)=>{const n=t.get(a,o),s=t.get(e,o);n&&s&&n===s&&l.delete(T.value[r])}))}else l.delete(e);V.value=l},set:e=>{V.value=new Set(e)},has:e=>{if(!v.primaryKey)return V.value.has(e);const l=v.primaryKey;for(const o of V.value){const a=t.get(o,l),r=t.get(e,l);if(a&&r&&a===r)return!0}return!1}},R=e.ref([]),F=n.useToNumber((()=>v.perPage),{method:"parseInt"}),D=n.useToNumber((()=>v.currentPage),{method:"parseInt"}),j=e.computed((()=>!!v.filter)),I=e.computed((()=>void 0!==v.provider)),M=e.computed((()=>V.value.size>0)),z=e.computed((()=>void 0!==S.value||v.fields.some((e=>"object"==typeof e&&null!==e&&!0===e.sortable)))),O=e.computed((()=>v.fields.map((e=>{var t;if(!i(e)){const t=a.startCase(e);return{key:e,label:t,tdAttr:B(v,t)}}const l=null==(t=S.value)?void 0:t.find((t=>e.key===t.key)),o=!1===z.value?void 0:void 0===l?"none":"desc"===l.order?"descending":"asc"===l.order?"ascending":"none";return{...e,thAttr:{"aria-sort":o,...e.thAttr}}})))),L=e.computed((()=>({"b-table-busy":x.value,"b-table-selectable":v.selectable,"user-select-none":v.selectable&&M.value}))),K=e.computed((()=>[v.tbodyTrClass?"function"==typeof v.tbodyTrClass?v.tbodyTrClass(null,"table-busy"):v.tbodyTrClass:null])),H=e=>[{"b-table-sortable-column":z.value&&e.sortable}],q=(e,t)=>[{[`selected table-${v.selectionVariant}`]:v.selectable&&!!e&&$.has(e)},v.tbodyTrClass?"function"==typeof v.tbodyTrClass?v.tbodyTrClass(e,t):v.tbodyTrClass:null],W=e=>"function"==typeof e.sortByFormatted?e.sortByFormatted:e.formatter,Y=e.computed((()=>{var e;const l=null==(e=S.value)?void 0:e.filter((e=>!!e.order)),o=(I.value?R.value:v.items).reduce(((e,l)=>{const o=(e=>{if("object"==typeof e&&null!==e&&Object.keys(e).some((e=>e.includes(".")))){let l={};for(const o in e)o.includes(".")?l=t.set(l,o,e[o]):l[o]=e[o];return l}return e})(l);return j.value&&(!I.value||v.noProviderFiltering)&&!(e=>!d(e)||Object.entries(e).some((([t,l])=>{var o,a,r;return!(null==l||"_"===t[0]||!(null==(o=v.filterable)?void 0:o.includes(t))&&(null==(a=v.filterable)?void 0:a.length))&&(v.filterFunction&&"function"==typeof v.filterFunction?v.filterFunction(e,v.filter):(()=>{const o=O.value.find((e=>!!i(e)&&e.key===t));if(i(o)&&o.filterByFormatted){const t=W(o);if(t)return String(t(l,String(o.key),e))}return"object"==typeof l?JSON.stringify(Object.values(l)):l.toString()})().toLowerCase().includes((null==(r=v.filter)?void 0:r.toLowerCase())??""))})))(o)||e.push(o),e}),[]);return(null==l?void 0:l.length)&&(!0===z.value&&!I.value&&!v.noLocalSorting||!0===z.value&&I.value&&v.noProviderSorting)?o.sort(((e,o)=>{for(let a=0;a<l.length;a++){const{key:r,comparer:n,order:u}=l[a],c=e=>{if(!d(e))return String(e);const l=O.value.find((e=>!!i(e)&&e.key===r)),o=t.get(e,r);if(i(l)&&l.sortByFormatted){const t=W(l);if(t)return String(s(e,String(l.key),t))}return"object"==typeof o&&null!==o?JSON.stringify(o):(null==o?void 0:o.toString())??""},f=n?n(e,o,r):c(e).localeCompare(c(o),void 0,{numeric:!0});if(0!==f)return"asc"===u?f:-f}return 0})):o})),J=e.computed((()=>({emptyFilteredText:v.emptyFilteredText,emptyText:v.emptyText,fields:O.value,items:Y.value}))),U=e.computed((()=>Number.isNaN(F.value)||I.value&&!v.noProviderPaging?Y.value:Y.value.slice((D.value-1)*(F.value||Number.POSITIVE_INFINITY),D.value*(F.value||Number.POSITIVE_INFINITY))));e.watch(U,(e=>{m("change",e)}));const G=(e,t,l)=>{!1===v.noSelectOnClick&&((e,t,l=!1,o=!1,a=!1)=>{if(v.selectable)if("single"===v.selectMode||"multi"===v.selectMode){if(l||o)return;$.has(e)?$.delete(e):"single"===v.selectMode?$.set([e]):$.add(e)}else if(o||a)$.has(e)?$.delete(e):$.add(e);else if(l){const e=[...V.value].pop(),l=Y.value.findIndex((t=>t===e)),o=Math.min(l,t),a=Math.max(l,t),r=Y.value.slice(o,a+1);$.set(r)}else $.set([e])})(e,t,l.shiftKey,l.ctrlKey,l.metaKey),m("row-clicked",e,t,l)},Q=(e,t,l,o=!1)=>{m("head-clicked",e,t,l,o),(e=>{var t,l;if(!z.value)return;const o="object"==typeof e&&null!==e?e.key:e,a="object"==typeof e&&null!==e&&e.sortable;if(!0!==z.value||!0!==a)return;const r=e=>"asc"===e?"desc":void 0===e||!0===v.mustSort||Array.isArray(v.mustSort)&&v.mustSort.includes(o)?"asc":void 0,n=(null==(t=S.value)?void 0:t.findIndex((e=>e.key===o)))??-1,s=null==(l=S.value)?void 0:l[n],d=-1!==n&&s?{...s}:{key:o,order:"asc"};m("sorted",!0===v.multisort?(()=>{S.value=S.value??[];const e=d;return-1===n?S.value.push(e):(e.order=r(e.order),S.value.splice(n,1,e)),e})():(()=>{const e={...d,order:-1===n?d.order:r(d.order)},t=(S.value||[]).map((e=>({...e,order:void 0})));return-1===n?t.push(e):t[n]=e,S.value=t,e})())})(t)},X=async()=>{if(!I.value||void 0===v.provider||x.value)return;x.value=!0;const e=v.provider({currentPage:D.value,filter:v.filter,sortBy:S.value,perPage:F.value});try{const t=e instanceof Promise?await e:e;if(void 0===t)return;R.value=t}finally{x.value=!1}},Z=async(e,t,l)=>{if(t===l)return;const o=e=>{var t;return!0===(null==(t=v.noProvider)?void 0:t.includes(e))},a=("currentPage"===e||"perPage"===e)&&(o("paging")||!0===v.noProviderPaging),r="filter"===e&&(o("filtering")||!0===v.noProviderFiltering),n=("sortBy"===e||"sortDesc"===e)&&(o("sorting")||!0===v.noProviderSorting);a||r||n||(!0===I.value&&await X(),"currentPage"!==e&&"perPage"!==e&&m("filtered",[...Y.value]))};e.watch((()=>v.filter),((e,t)=>{Z("filter",e,t),e===t||I.value||e||m("filtered",[...Y.value])})),e.watch(D,((e,t)=>{Z("currentPage",e,t)})),e.watch(F,((e,t)=>{Z("perPage",e,t)})),e.watch(S,((e,t)=>{Z("sortBy",e,t)}),{deep:!0}),e.watch((()=>v.provider),(e=>{void 0!==e?X():R.value=[]})),e.onMounted(X);const ee={clearSelected:()=>{v.selectable&&$.clear()},selectAllRows:()=>{v.selectable&&"single"!==v.selectMode&&(V.value=new Set(Y.value))},selectRow:e=>{if(!v.selectable)return;const t=Y.value[e];t&&!$.has(t)&&("single"===v.selectMode?$.set([t]):$.add(t))},unselectRow:e=>{if(!v.selectable)return;const t=Y.value[e];t&&$.has(t)&&$.delete(t)},isRowSelected:e=>{if(!v.selectable)return!1;const t=Y.value[e];return $.has(t)}},te=e.computed((()=>({...t.pick(v,[...C,...h]),tableAttrs:{ariaBusy:x.value},items:U.value,fields:O.value,tableClass:L.value,tbodyTrClass:q,fieldColumnClass:H,id:_.value})));return u({...ee,items:Y,refresh:X}),(t,l)=>(e.openBlock(),e.createBlock(P,e.mergeProps(te.value,{onHeadClicked:Q,onRowClicked:G,onRowDblclicked:l[0]||(l[0]=(e,t,l)=>{m("row-dblclicked",e,t,l)}),onRowContextmenu:l[1]||(l[1]=(e,t,l)=>{m("row-contextmenu",e,t,l)}),onRowHovered:l[2]||(l[2]=(e,t,l)=>{m("row-hovered",e,t,l)}),onRowUnhovered:l[3]||(l[3]=(e,t,l)=>{m("row-unhovered",e,t,l)}),onRowMiddleClicked:l[4]||(l[4]=(e,t,l)=>{m("row-middle-clicked",e,t,l)})}),e.createSlots({"custom-body":e.withCtx((l=>[x.value&&y["table-busy"]?(e.openBlock(),e.createBlock(g,{key:0,class:e.normalizeClass(["b-table-busy-slot",K.value])},{default:e.withCtx((()=>[e.createVNode(p,{colspan:l.fields.length},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"table-busy")])),_:2},1032,["colspan"])])),_:2},1032,["class"])):!0===e.unref(v).showEmpty&&0===Y.value.length?(e.openBlock(),e.createBlock(g,{key:1,class:"b-table-empty-row"},{default:e.withCtx((()=>[e.createVNode(p,{colspan:O.value.length},{default:e.withCtx((()=>[e.createElementVNode("div",A,[e.createElementVNode("div",E,[j.value?e.renderSlot(t.$slots,"empty-filtered",e.normalizeProps(e.mergeProps({key:0},J.value)),(()=>[e.createTextVNode(e.toDisplayString(e.unref(v).emptyFilteredText),1)])):e.renderSlot(t.$slots,"empty",e.normalizeProps(e.mergeProps({key:1},J.value)),(()=>[e.createTextVNode(e.toDisplayString(e.unref(v).emptyText),1)]))])])])),_:3},8,["colspan"])])),_:3})):e.createCommentVNode("",!0)])),_:2},[y["thead-top"]?{name:"thead-top",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"thead-top",e.mergeProps(l,{clearSelected:ee.clearSelected,selectAllRows:ee.selectAllRows,fields:O.value}))])),key:"0"}:void 0,y["thead-sub"]?{name:"thead-sub",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"thead-sub",e.mergeProps(l,{fields:O.value}))])),key:"1"}:void 0,y["top-row"]?{name:"top-row",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"top-row",e.mergeProps(l,{fields:O.value}))])),key:"2"}:void 0,y["row-details"]?{name:"row-details",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"row-details",e.mergeProps(l,{fields:O.value,selectRow:(e=l.index)=>ee.selectRow(e),unselectRow:(e=l.index)=>ee.unselectRow(e),rowSelected:ee.isRowSelected(l.index)}))])),key:"3"}:void 0,y["bottom-row"]?{name:"bottom-row",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"bottom-row",e.mergeProps(l,{fields:O.value}))])),key:"4"}:void 0,y["custom-foot"]?{name:"custom-foot",fn:e.withCtx((l=>[e.renderSlot(t.$slots,"custom-foot",e.mergeProps(l,{fields:O.value}))])),key:"5"}:void 0,y["table-caption"]?{name:"table-caption",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"table-caption")])),key:"6"}:void 0,e.renderList(b.value,(l=>({name:l,fn:e.withCtx((o=>[e.renderSlot(t.$slots,l,e.mergeProps(o,{selectRow:(e=o.index)=>ee.selectRow(e),unselectRow:(e=o.index)=>ee.unselectRow(e),rowSelected:ee.isRowSelected(o.index)}))]))}))),e.renderList(k.value,(l=>({name:l,fn:e.withCtx((o=>[e.renderSlot(t.$slots,l,e.mergeProps(o,{selectAllRows:ee.selectAllRows,clearSelected:ee.clearSelected}))]))}))),e.renderList(O.value,(o=>({name:`head(${String(o.key)})`,fn:e.withCtx((a=>{var r,n,s,d;return[e.renderSlot(t.$slots,y[`head(${String(o.key)})`]?`head(${String(o.key)})`:"head()",e.mergeProps(a,{selectAllRows:ee.selectAllRows,clearSelected:ee.clearSelected}),(()=>[e.createTextVNode(e.toDisplayString(e.unref(w)(o)),1)])),z.value&&a.field.sortable&&!1===e.unref(v).noSortableIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},["asc"===(null==(n=null==(r=S.value)?void 0:r.find((e=>e.key===a.field.key)))?void 0:n.order)?e.renderSlot(t.$slots,y[`sortAsc(${String(a.field.key)})`]?`sortAsc(${String(a.field.key)})`:"sortAsc()",e.normalizeProps(e.mergeProps({key:0},a)),(()=>[l[5]||(l[5]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-arrow-up-short",viewBox:"0 0 16 16","aria-hidden":""},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z"})],-1))])):"desc"===(null==(d=null==(s=S.value)?void 0:s.find((e=>e.key===a.field.key)))?void 0:d.order)?e.renderSlot(t.$slots,y[`sortDesc(${String(a.field.key)})`]?`sortDesc(${String(a.field.key)})`:"sortDesc()",e.normalizeProps(e.mergeProps({key:1},a)),(()=>[l[6]||(l[6]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-arrow-down-short",viewBox:"0 0 16 16","aria-hidden":""},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a.5.5 0 0 1 .5.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L7.5 10.293V4.5A.5.5 0 0 1 8 4z"})],-1))])):e.renderSlot(t.$slots,y[`sortDefault(${String(a.field.key)})`]?`sortDefault(${String(a.field.key)})`:"sortDefault()",e.normalizeProps(e.mergeProps({key:2},a)),(()=>[(e.openBlock(),e.createElementBlock("svg",N,l[7]||(l[7]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z"},null,-1)])))]))],64)):e.createCommentVNode("",!0)]}))})))]),1040))}});exports._sfc_main=R,exports._sfc_main$1=P,exports._sfc_main$2=u,exports._sfc_main$3=p,exports._sfc_main$4=v,exports._sfc_main$5=b,exports._sfc_main$6=k,exports._sfc_main$7=g;
|
|
2
|
+
//# sourceMappingURL=BTable.vue_vue_type_script_setup_true_lang-DrQc69GD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BTable.vue_vue_type_script_setup_true_lang-DrQc69GD.js","sources":["../src/utils/formatItem.ts","../src/types/TableTypes.ts","../src/components/BTable/BTbody.vue","../src/components/BTable/BTd.vue","../src/components/BTable/BTfoot.vue","../src/components/BTable/BTh.vue","../src/components/BTable/BThead.vue","../src/components/BTable/BTr.vue","../src/utils/tableUtils.ts","../src/utils/filterEvent.ts","../src/components/BTable/BTableLite.vue","../src/components/BTable/BTable.vue"],"sourcesContent":["import type {TableFieldFormatter} from '../types/TableTypes'\nimport {get} from './object'\n\nexport const formatItem = <T>(\n item: T,\n // Weakly type fieldKey because it can be a nested string, such as 'foo.bar.baz'\n fieldKey: string,\n formatter?: TableFieldFormatter<T>\n) => {\n const val = get(item, fieldKey)\n return formatter && typeof formatter === 'function' ? formatter(val, fieldKey, item) : val\n}\n","import type {StyleValue} from 'vue'\nimport type {ColorVariant} from './ColorTypes'\nimport type {MaybePromise} from './MaybePromise'\nimport type {LiteralUnion} from './LiteralUnion'\nimport type {AttrsValue, ClassValue} from './AnyValuedAttributes'\n\nexport type TableRowEvent<T> = [item: T, index: number, event: MouseEvent]\n\nexport type TableItem<T = Record<string, unknown>> = T & {\n _rowVariant?: ColorVariant | null\n _cellVariants?: Partial<Record<keyof T, ColorVariant>>\n _showDetails?: boolean\n}\n\nexport const isTableItem = (value: unknown): value is TableItem =>\n typeof value === 'object' && value !== null\n\n/**\n * `undefined` means it's not sorting this column. It is set to undefined rather than removed from the array because\n * we don't want to make updates that remove the comparer function from the value.\n */\nexport type BTableSortByOrder = 'desc' | 'asc' | undefined\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type BTableSortByComparerFunction<T = any> = (a: T, b: T, key: string) => number\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type BTableSortBy<T = any> = {\n order: BTableSortByOrder\n key: string\n comparer?: BTableSortByComparerFunction<T>\n}\n\nexport type BTableProviderContext<T = unknown> = {\n sortBy: BTableSortBy<T>[] | undefined\n filter: string | undefined\n currentPage: number\n perPage: number\n}\n\nexport type BTableProvider<T> = (\n context: Readonly<BTableProviderContext<T>>\n) => MaybePromise<T[] | undefined>\n\nexport type TableFieldFormatter<T> = (value: unknown, key: string, item: T) => string\n\nexport type TableRowType = 'row' | 'row-details' | 'row-top' | 'row-bottom' | 'table-busy'\nexport type TableRowThead = 'top' | 'bottom'\n\nexport type TableStrictClassValue = string | unknown[] | Record<string, boolean>\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type TableField<T = any> = {\n key: LiteralUnion<keyof T>\n label?: string\n headerTitle?: string\n headerAbbr?: string\n class?: ClassValue\n formatter?: TableFieldFormatter<T>\n sortable?: boolean\n sortDirection?: string\n sortByFormatted?: boolean | TableFieldFormatter<T>\n filterByFormatted?: boolean | TableFieldFormatter<T>\n tdClass?:\n | TableStrictClassValue\n | ((value: unknown, key: string, item: T) => TableStrictClassValue)\n thClass?: ClassValue\n thStyle?: StyleValue\n variant?: ColorVariant | null\n tdAttr?: AttrsValue | ((value: unknown, key: string, item: T) => AttrsValue)\n thAttr?:\n | AttrsValue\n | ((value: unknown, key: string, item: T | null, type: TableRowThead) => AttrsValue)\n isRowHeader?: boolean\n stickyColumn?: boolean\n}\n\nexport type TableFieldRaw<T = unknown> = T extends object\n ? LiteralUnion<keyof T> | TableField<T>\n : string | TableField\n\nexport const isTableField = <T>(value: unknown): value is TableField<T> =>\n typeof value === 'object' && value !== null && 'key' in value\n\nexport const isTableFieldRaw = <T>(value: unknown): value is TableFieldRaw<T> =>\n typeof value === 'string' || isTableField(value)\n\nexport type NoProviderTypes = 'paging' | 'sorting' | 'filtering'\n","<template>\n <tbody :class=\"computedClasses\">\n <slot />\n </tbody>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTbodyProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTbodyProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BTbody')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`thead-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <td\n :scope=\"scope\"\n :class=\"computedClasses\"\n :colspan=\"props.colspan\"\n :rowspan=\"props.rowspan\"\n :data-label=\"props.stackedHeading\"\n >\n <div v-if=\"props.stackedHeading\">\n <slot />\n </div>\n <slot v-else />\n </td>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTdProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTdProps>(), {\n colspan: undefined,\n rowspan: undefined,\n stackedHeading: undefined,\n stickyColumn: false,\n variant: null,\n})\nconst props = useDefaults(_props, 'BTd')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n 'b-table-sticky-column': props.stickyColumn,\n 'table-b-table-default': props.stickyColumn && props.variant === null,\n}))\n\nconst scope = computed(() => (props.colspan ? 'colspan' : props.rowspan ? 'rowspan' : 'col'))\n</script>\n","<template>\n <tfoot :class=\"computedClasses\">\n <slot />\n </tfoot>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTfootProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTfootProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BTfoot')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <th\n :scope=\"scope\"\n :class=\"computedClasses\"\n :colspan=\"props.colspan\"\n :rowspan=\"props.rowspan\"\n :data-label=\"props.stackedHeading\"\n >\n <div v-if=\"props.stackedHeading !== undefined\">\n <slot />\n </div>\n <slot v-else />\n </th>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BThProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BThProps>(), {\n colspan: undefined,\n rowspan: undefined,\n stackedHeading: undefined,\n stickyColumn: false,\n variant: null,\n})\nconst props = useDefaults(_props, 'BTh')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n 'b-table-sticky-column': props.stickyColumn,\n 'table-b-table-default': props.stickyColumn && props.variant === null,\n}))\n\nconst scope = computed(() => (props.colspan ? 'colspan' : props.rowspan ? 'rowspan' : 'col'))\n</script>\n","<template>\n <thead :class=\"computedClasses\">\n <slot />\n </thead>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTheadProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTheadProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BThead')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","<template>\n <tr :class=\"computedClasses\">\n <slot />\n </tr>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTrProps} from '../../types/ComponentProps'\nimport {computed} from 'vue'\n\nconst _props = withDefaults(defineProps<BTrProps>(), {\n variant: null,\n})\nconst props = useDefaults(_props, 'BTr')\n\ndefineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default?: (props: Record<string, never>) => any\n}>()\n\nconst computedClasses = computed(() => ({\n [`table-${props.variant}`]: props.variant !== null,\n}))\n</script>\n","import {titleCase} from './stringUtils'\nimport type {TableFieldRaw} from '../types/TableTypes'\nimport type {Breakpoint, BTableLiteProps, BTableSimpleProps} from '../types'\n\nexport const getTableFieldHeadLabel = (field: Readonly<TableFieldRaw<unknown>>) =>\n typeof field === 'string'\n ? titleCase(field)\n : field.label !== undefined\n ? field.label\n : typeof field.key === 'string'\n ? titleCase(field.key)\n : field.key\n\nexport const btableSimpleProps = Object.freeze(\n Object.keys({\n bordered: 0,\n borderless: 0,\n borderVariant: 0,\n captionTop: 0,\n dark: 0,\n fixed: 0,\n hover: 0,\n id: 0,\n noBorderCollapse: 0,\n outlined: 0,\n responsive: 0,\n small: 0,\n stacked: 0,\n stickyHeader: 0,\n striped: 0,\n stripedColumns: 0,\n variant: 0,\n tableAttrs: 0,\n tableClass: 0,\n } satisfies Record<keyof BTableSimpleProps, 0>)\n) as readonly (keyof BTableSimpleProps)[]\n\nexport const btableLiteProps = Object.freeze(\n Object.keys({\n align: 0,\n caption: 0,\n detailsTdClass: 0,\n fieldColumnClass: 0,\n fields: 0,\n footClone: 0,\n footRowVariant: 0,\n footVariant: 0,\n headRowVariant: 0,\n headVariant: 0,\n items: 0,\n labelStacked: 0,\n modelValue: 0,\n primaryKey: 0,\n tbodyClass: 0,\n tbodyTrAttrs: 0,\n tbodyTrClass: 0,\n tfootClass: 0,\n tfootTrClass: 0,\n theadClass: 0,\n theadTrClass: 0,\n } satisfies Record<keyof Omit<BTableLiteProps<unknown>, keyof BTableSimpleProps>, 0>)\n) as readonly (keyof Omit<BTableLiteProps<unknown>, keyof BTableSimpleProps>)[]\n\nexport const getDataLabelAttr = (\n props: {stacked: boolean | Breakpoint | undefined; labelStacked: boolean | undefined},\n label: string\n) => (props.stacked && props.labelStacked !== true ? {'data-label': label} : undefined)\n","const TABLE_TAG_NAMES = ['TD', 'TH', 'TR']\n\n// Filter CSS selector for click/dblclick/etc. events\n// If any of these selectors match the clicked element, we ignore the event\nconst eventFilter = [\n 'a',\n 'a *', // Include content inside links\n 'button',\n 'button *', // Include content inside buttons\n 'input:not(.disabled):not([disabled])',\n 'select:not(.disabled):not([disabled])',\n 'textarea:not(.disabled):not([disabled])',\n '[role=\"link\"]',\n '[role=\"link\"] *',\n '[role=\"button\"]',\n '[role=\"button\"] *',\n '[tabindex]:not(.disabled):not([disabled])',\n].join(',')\n\n// Returns `true` if we should ignore the click/double-click/keypress event\n// Avoids having the user need to use `@click.stop` on the form control\nexport const filterEvent = (event: Readonly<Event>) => {\n // Exit early when we don't have a target element\n if (!event || !event.target) {\n return false\n }\n const el = event.target as HTMLElement\n // Exit early when element is disabled or a table element\n if (('disabled' in el && el.disabled) || TABLE_TAG_NAMES.indexOf(el.tagName) !== -1) {\n return false\n }\n // Ignore the click when it was inside a dropdown menu\n if (el.closest('.dropdown-menu')) return true\n\n const label = el.tagName === 'LABEL' ? el : el.closest('label')\n // If the label's form control is not disabled then we don't propagate event\n // Modern browsers have `label.control` that references the associated input, but IE 11\n // does not have this property on the label element, so we resort to DOM lookups\n if (label) {\n const labelFor = label.getAttribute('for')\n const input = labelFor\n ? document.getElementById(labelFor)\n : label.querySelector('input, select, textarea')\n if (input && !(input as HTMLInputElement).disabled) {\n return true\n }\n }\n // Otherwise check if the event target matches one of the selectors in the\n // event filter (i.e. anchors, non disabled inputs, etc.)\n // Return `true` if we should ignore the event\n return el.matches(eventFilter)\n}\n","<template>\n <BTableSimple v-bind=\"computedSimpleProps\">\n <BThead v-show=\"showComputedHeaders\" :variant=\"props.headVariant\" :class=\"props.theadClass\">\n <slot name=\"thead-top\" :columns=\"computedFieldsTotal\" :fields=\"computedFields\" />\n <BTr :variant=\"props.headRowVariant\" :class=\"props.theadTrClass\">\n <BTh\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n scope=\"col\"\n :class=\"getFieldColumnClasses(field)\"\n :title=\"field.headerTitle\"\n :variant=\"field.variant\"\n :abbr=\"field.headerAbbr\"\n :style=\"field.thStyle\"\n v-bind=\"callThAttr(null, field, 'top')\"\n @click=\"headerClicked(field, $event)\"\n >\n <!-- eslint-disable prettier/prettier -->\n <slot\n :name=\"\n slots[`head(${String(field.key)})`]\n ? (`head(${String(field.key)})` as 'head()')\n : 'head()'\n \"\n :label=\"field.label\"\n :column=\"field.key as LiteralUnion<keyof Items>\"\n :field\n :is-foot=\"false\"\n >\n <!-- eslint-enable prettier/prettier -->\n {{ getTableFieldHeadLabel(field) }}\n </slot>\n </BTh>\n </BTr>\n <BTr v-if=\"slots['thead-sub']\">\n <BTd\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n scope=\"col\"\n :variant=\"field.variant\"\n :class=\"[field.class, field.thClass]\"\n >\n <slot name=\"thead-sub\" :items=\"props.items\" :fields=\"computedFields\" :field>\n {{ field.label }}\n </slot>\n </BTd>\n </BTr>\n </BThead>\n <BTbody :class=\"props.tbodyClass\">\n <slot\n name=\"custom-body\"\n :fields=\"computedFields\"\n :items=\"props.items\"\n :columns=\"computedFieldsTotal\"\n >\n <BTr\n v-if=\"!props.stacked && slots['top-row']\"\n :class=\"getRowClasses(null, 'row-top')\"\n v-bind=\"callTbodyTrAttrs(null, 'row-top')\"\n >\n <slot name=\"top-row\" :columns=\"computedFieldsTotal\" :fields=\"computedFields\" />\n </BTr>\n\n <template\n v-for=\"(item, itemIndex) in props.items\"\n :key=\"\n props.primaryKey && get(item, props.primaryKey)\n ? get(item, props.primaryKey)\n : itemIndex\n \"\n >\n <BTr\n :id=\"\n props.primaryKey && get(item, props.primaryKey)\n ? generateTableRowId(get(item, props.primaryKey))\n : undefined\n \"\n :class=\"getRowClasses(item, 'row')\"\n :variant=\"isTableItem(item) ? item._rowVariant : undefined\"\n v-bind=\"callTbodyTrAttrs(item, 'row')\"\n @click=\"!filterEvent($event) && emit('row-clicked', item, itemIndex, $event)\"\n @dblclick=\"!filterEvent($event) && emit('row-dblclicked', item, itemIndex, $event)\"\n @contextmenu=\"!filterEvent($event) && emit('row-contextmenu', item, itemIndex, $event)\"\n @mouseenter=\"!filterEvent($event) && emit('row-hovered', item, itemIndex, $event)\"\n @mouseleave=\"!filterEvent($event) && emit('row-unhovered', item, itemIndex, $event)\"\n @mousedown=\"handleMiddleClick(item, itemIndex, $event)\"\n >\n <BTd\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n :variant=\"\n (isTableItem(item) ? item._cellVariants?.[field.key as string] : false)\n ? null\n : field.variant\n \"\n :class=\"getFieldRowClasses(field, item)\"\n v-bind=\"itemAttributes(item, String(field.key), field.tdAttr)\"\n >\n <label v-if=\"props.stacked && props.labelStacked\" class=\"b-table-stacked-label\">\n {{ getTableFieldHeadLabel(field) }}\n </label>\n <slot\n :name=\"\n slots[`cell(${String(field.key)})`]\n ? (`cell(${String(field.key)})` as 'cell()')\n : 'cell()'\n \"\n :value=\"formatItem(item, String(field.key), field.formatter)\"\n :unformatted=\"get(item, String(field.key))\"\n :index=\"itemIndex\"\n :item=\"item\"\n :field=\"field\"\n :items=\"items\"\n :toggle-details=\"() => toggleRowDetails(item)\"\n :details-showing=\"isTableItem(item) ? (detailsMap.get(item) ?? false) : false\"\n >\n <template v-if=\"!slots[`cell(${String(field.key)})`] && !slots['cell()']\">\n {{ formatItem(item, String(field.key), field.formatter) }}\n </template>\n </slot>\n </BTd>\n </BTr>\n\n <template\n v-if=\"isTableItem(item) && detailsMap.get(item) === true && slots['row-details']\"\n >\n <BTr aria-hidden=\"true\" role=\"presentation\" class=\"d-none\" />\n <BTr\n :class=\"getRowClasses(item, 'row-details')\"\n :variant=\"item._rowVariant\"\n v-bind=\"callTbodyTrAttrs(item, 'row-details')\"\n >\n <BTd :colspan=\"computedFieldsTotal\" :class=\"detailsTdClass\">\n <slot\n name=\"row-details\"\n :item=\"item\"\n :toggle-details=\"() => toggleRowDetails(item)\"\n :fields=\"computedFields\"\n :index=\"itemIndex\"\n />\n </BTd>\n </BTr>\n </template>\n </template>\n <!-- This class is for specific targetting of this slot element -->\n <BTr\n v-if=\"!props.stacked && slots['bottom-row']\"\n class=\"bottom-row\"\n :class=\"getRowClasses(null, 'row-bottom')\"\n v-bind=\"callTbodyTrAttrs(null, 'row-bottom')\"\n >\n <slot name=\"bottom-row\" :columns=\"computedFieldsTotal\" :fields=\"computedFields\" />\n </BTr>\n </slot>\n </BTbody>\n <BTfoot v-if=\"props.footClone\" v-bind=\"footerProps\">\n <BTr :variant=\"props.footRowVariant\" :class=\"props.tfootTrClass\">\n <BTh\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n scope=\"col\"\n :class=\"getFieldColumnClasses(field)\"\n :title=\"field.headerTitle\"\n :abbr=\"field.headerAbbr\"\n :style=\"field.thStyle\"\n :variant=\"field.variant\"\n v-bind=\"callThAttr(null, field, 'bottom')\"\n @click=\"headerClicked(field, $event, true)\"\n >\n <div class=\"d-inline-flex flex-nowrap align-items-center gap-1\">\n <div>\n <!-- eslint-disable prettier/prettier -->\n <slot\n :name=\"\n slots[`foot(${String(field.key)})`]\n ? (`foot(${String(field.key)})` as 'foot()')\n : 'foot()'\n \"\n :label=\"field.label\"\n :column=\"field.key as LiteralUnion<keyof Items>\"\n :field=\"field\"\n :is-foot=\"true\"\n >\n <!-- eslint-enable prettier/prettier -->\n {{ getTableFieldHeadLabel(field) }}\n </slot>\n </div>\n </div>\n </BTh>\n </BTr>\n </BTfoot>\n <BTfoot v-else-if=\"slots['custom-foot']\" v-bind=\"footerProps\">\n <slot\n name=\"custom-foot\"\n :fields=\"computedFields\"\n :items=\"props.items\"\n :columns=\"computedFieldsTotal\"\n />\n </BTfoot>\n <caption v-if=\"slots['table-caption'] || props.caption\">\n <slot name=\"table-caption\">\n {{ props.caption }}\n </slot>\n </caption>\n </BTableSimple>\n</template>\n\n<script setup lang=\"ts\" generic=\"Items\">\nimport {computed, ref, watch} from 'vue'\nimport type {BTableLiteProps} from '../../types/ComponentProps'\nimport {\n isTableField,\n isTableItem,\n type TableField,\n type TableItem,\n type TableRowEvent,\n type TableRowThead,\n type TableRowType,\n} from '../../types/TableTypes'\nimport BTableSimple from './BTableSimple.vue'\nimport BTbody from './BTbody.vue'\nimport BTd from './BTd.vue'\nimport BTfoot from './BTfoot.vue'\nimport BTh from './BTh.vue'\nimport BThead from './BThead.vue'\nimport BTr from './BTr.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {get, pick} from '../../utils/object'\nimport {btableSimpleProps, getDataLabelAttr, getTableFieldHeadLabel} from '../../utils/tableUtils'\nimport {formatItem} from '../../utils/formatItem'\nimport {filterEvent} from '../../utils/filterEvent'\nimport {startCase} from '../../utils/stringUtils'\nimport type {LiteralUnion} from '../../types/LiteralUnion'\nimport {useId} from '../../composables/useId'\n\nconst _props = withDefaults(defineProps<BTableLiteProps<Items>>(), {\n caption: undefined,\n align: undefined,\n fields: () => [],\n footClone: false,\n items: () => [],\n labelStacked: false,\n fieldColumnClass: undefined,\n tbodyTrClass: undefined,\n detailsTdClass: undefined,\n headVariant: undefined,\n headRowVariant: undefined,\n footRowVariant: undefined,\n footVariant: undefined,\n modelValue: undefined,\n primaryKey: undefined,\n tbodyClass: undefined,\n tbodyTrAttrs: undefined,\n tfootClass: undefined,\n tfootTrClass: undefined,\n theadClass: undefined,\n theadTrClass: undefined,\n // BTableSimpleProps props\n borderVariant: undefined,\n tableClass: undefined,\n variant: undefined,\n bordered: undefined,\n borderless: undefined,\n captionTop: undefined,\n dark: undefined,\n hover: undefined,\n id: undefined,\n noBorderCollapse: undefined,\n outlined: undefined,\n fixed: undefined,\n responsive: undefined,\n stacked: undefined,\n striped: undefined,\n stripedColumns: undefined,\n small: undefined,\n stickyHeader: undefined,\n // End BTableSimpleProps props\n})\nconst props = useDefaults(_props, 'BTableLite')\n\nconst emit = defineEmits<{\n 'head-clicked': [\n key: string,\n field: (typeof computedFields.value)[0],\n event: MouseEvent,\n isFooter: boolean,\n ]\n 'row-clicked': TableRowEvent<Items>\n 'row-dblclicked': TableRowEvent<Items>\n 'row-contextmenu': TableRowEvent<Items>\n 'row-hovered': TableRowEvent<Items>\n 'row-unhovered': TableRowEvent<Items>\n 'row-middle-clicked': TableRowEvent<Items>\n}>()\n\nconst slots = defineSlots<{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'thead-top'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `head(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: false\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'thead-sub'?: (\n props: {\n items: readonly Items[]\n fields: typeof computedFields.value\n field: (typeof computedFields.value)[0]\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) => any\n 'custom-body'?: (props: {\n fields: typeof computedFields.value\n items: readonly Items[]\n columns: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'top-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `cell(${string})`]: (props: {\n value: unknown\n unformatted: unknown\n index: number\n item: Items\n field: (typeof computedFields.value)[0]\n items: readonly Items[]\n toggleDetails: () => void\n detailsShowing: boolean\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'row-details'?: (props: {\n item: Items\n toggleDetails: () => void\n fields: typeof computedFields.value\n index: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'bottom-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `foot(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: true\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'custom-foot'?: (props: {\n fields: typeof computedFields.value\n items: readonly Items[]\n columns: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'table-caption'?: (props: Record<string, never>) => any\n}>()\n\nconst computedId = useId(() => props.id)\n\nconst generateDetailsItem = (item: TableItem): [object, boolean | undefined] => [\n item,\n item._showDetails,\n]\nconst detailsMap = ref(new WeakMap<object, boolean | undefined>())\nwatch(\n () => props.items,\n (items) => {\n items.forEach((item) => {\n if (!isTableItem(item)) return\n detailsMap.value.set(...generateDetailsItem(item))\n })\n },\n {deep: true, immediate: true}\n)\n\nconst computedTableClasses = computed(() => [\n props.tableClass,\n {\n [`align-${props.align}`]: props.align !== undefined,\n },\n])\n\nconst computedFields = computed<(TableField<Items> & {_noHeader?: true})[]>(() => {\n if (!props.fields.length && props.items.length) {\n const [firstItem] = props.items\n if (firstItem && (isTableItem(firstItem) || Array.isArray(firstItem))) {\n return Object.keys(firstItem).map((k) => {\n const label = startCase(k)\n return {\n key: k,\n label,\n tdAttr: getDataLabelAttr(props, label),\n }\n })\n }\n // The items are primitives, so we just return a single empty field\n // No header will be shown, as we don't know what to show\n return [{key: '', _noHeader: true}]\n }\n\n return props.fields.map((f) => {\n if (isTableField(f)) {\n const label = f.label ?? startCase(f.key as string)\n return {\n ...(f as TableField<Items>),\n tdAttr: {...getDataLabelAttr(props, label), ...f.tdAttr},\n }\n }\n const label = startCase(f as string)\n return {\n key: f as string,\n label,\n tdAttr: getDataLabelAttr(props, label),\n }\n })\n})\nconst computedFieldsTotal = computed(() => computedFields.value.length)\nconst showComputedHeaders = computed(() => {\n // We only hide the header if all fields have _noHeader set to true. Which would be our doing\n // This usually happens under a circumstance of displaying an array of primitives\n // Under any other circumstance, I'm not sure how this would apply\n if (computedFieldsTotal.value > 0 && computedFields.value.every((el) => el._noHeader === true))\n return false\n return true\n})\n\nconst footerProps = computed(() => ({\n variant: props.footVariant,\n class: props.tfootClass,\n}))\n\nconst itemAttributes = (item: Items, fieldKey: string, attr?: unknown) => {\n const val = get(item, fieldKey)\n return attr && typeof attr === 'function' ? attr(val, fieldKey, item) : attr\n}\n\nconst callThAttr = (item: Items | null, field: TableField<Items>, type: TableRowThead) => {\n const fieldKey = String(field.key)\n const val = get(item, fieldKey)\n return field.thAttr && typeof field.thAttr === 'function'\n ? field.thAttr(val, fieldKey, item, type)\n : field.thAttr\n}\n\nconst headerClicked = (field: TableField<Items>, event: Readonly<MouseEvent>, isFooter = false) => {\n emit('head-clicked', field.key as string, field, event, isFooter)\n}\n\nconst toggleRowDetails = (tr: Items) => {\n if (isTableItem(tr)) {\n const prevValue = detailsMap.value.get(tr)\n detailsMap.value.set(tr, !prevValue)\n tr._showDetails = !prevValue\n }\n}\n\nconst getFieldColumnClasses = (field: TableField) => [\n field.class,\n field.thClass,\n {\n 'b-table-sticky-column': field.stickyColumn,\n },\n props.fieldColumnClass\n ? typeof props.fieldColumnClass === 'function'\n ? props.fieldColumnClass(field)\n : props.fieldColumnClass\n : null,\n]\n\nconst getFieldRowClasses = (field: Readonly<TableField>, tr: Items) => {\n const val = get(tr, String(field.key))\n return [\n field.class,\n typeof field.tdClass === 'function' ? field.tdClass(val, String(field.key), tr) : field.tdClass,\n (isTableItem(tr) ? tr._cellVariants?.[field.key as string] : false)\n ? `table-${(tr as TableItem)._cellVariants?.[field.key as string]}`\n : null,\n {\n 'b-table-sticky-column': field.stickyColumn,\n },\n ]\n}\n\nconst handleMiddleClick = (item: Items, itemIndex: number, event: MouseEvent) => {\n if (event.button === 1 && !filterEvent(event)) {\n emit('row-middle-clicked', item, itemIndex, event)\n }\n}\nconst callTbodyTrAttrs = (item: Items | null, type: TableRowType) =>\n props.tbodyTrAttrs\n ? typeof props.tbodyTrAttrs === 'function'\n ? props.tbodyTrAttrs(item, type)\n : props.tbodyTrAttrs\n : null\n\nconst getRowClasses = (item: Items | null, type: TableRowType) =>\n props.tbodyTrClass\n ? typeof props.tbodyTrClass === 'function'\n ? props.tbodyTrClass(item, type)\n : props.tbodyTrClass\n : null\n\nconst generateTableRowId = (primaryKeyValue: string) =>\n `${computedId.value}__row_${primaryKeyValue}`\n\nconst computedSimpleProps = computed(() => ({\n ...pick(props, btableSimpleProps),\n tableClass: computedTableClasses.value,\n id: computedId.value,\n}))\n</script>\n","<template>\n <!-- eslint-disable prettier/prettier -->\n <BTableLite\n v-bind=\"computedLiteProps\"\n @head-clicked=\"onFieldHeadClick\"\n @row-clicked=\"onRowClick\"\n @row-dblclicked=\"\n (row: Items, index: number, e: MouseEvent) => {\n emit('row-dblclicked', row, index, e)\n }\n \"\n @row-contextmenu=\"\n (row: Items, index: number, e: MouseEvent) => {\n emit('row-contextmenu', row, index, e)\n }\n \"\n @row-hovered=\"\n (row: Items, index: number, e: MouseEvent) => {\n emit('row-hovered', row, index, e)\n }\n \"\n @row-unhovered=\"\n (row: Items, index: number, e: MouseEvent) => {\n emit('row-unhovered', row, index, e)\n }\n \"\n @row-middle-clicked=\"\n (row: Items, index: number, e: MouseEvent) => {\n emit('row-middle-clicked', row, index, e)\n }\n \"\n >\n <!-- eslint-enable prettier/prettier -->\n <template v-if=\"slots['thead-top']\" #thead-top=\"scope\">\n <slot\n name=\"thead-top\"\n v-bind=\"scope\"\n :clear-selected=\"exposedSelectableUtilities.clearSelected\"\n :select-all-rows=\"exposedSelectableUtilities.selectAllRows\"\n :fields=\"computedFields\"\n />\n </template>\n <template v-if=\"slots['thead-sub']\" #thead-sub=\"scope\">\n <slot name=\"thead-sub\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['top-row']\" #top-row=\"scope\">\n <slot name=\"top-row\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['row-details']\" #row-details=\"scope\">\n <slot\n name=\"row-details\"\n v-bind=\"scope\"\n :fields=\"computedFields\"\n :select-row=\"(index = scope.index) => exposedSelectableUtilities.selectRow(index)\"\n :unselect-row=\"(index = scope.index) => exposedSelectableUtilities.unselectRow(index)\"\n :row-selected=\"exposedSelectableUtilities.isRowSelected(scope.index)\"\n />\n </template>\n <template v-if=\"slots['bottom-row']\" #bottom-row=\"scope\">\n <slot name=\"bottom-row\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['custom-foot']\" #custom-foot=\"scope\">\n <slot name=\"custom-foot\" v-bind=\"scope\" :fields=\"computedFields\" />\n </template>\n <template v-if=\"slots['table-caption']\" #table-caption>\n <slot name=\"table-caption\" />\n </template>\n <template v-for=\"name in dynamicCellSlots\" #[name]=\"scope\">\n <slot\n :name\n v-bind=\"scope\"\n :select-row=\"(index = scope.index) => exposedSelectableUtilities.selectRow(index)\"\n :unselect-row=\"(index = scope.index) => exposedSelectableUtilities.unselectRow(index)\"\n :row-selected=\"exposedSelectableUtilities.isRowSelected(scope.index)\"\n />\n </template>\n <template v-for=\"name in dynamicFootSlots\" #[name]=\"scope\">\n <slot\n :name\n v-bind=\"scope\"\n :select-all-rows=\"exposedSelectableUtilities.selectAllRows\"\n :clear-selected=\"exposedSelectableUtilities.clearSelected\"\n />\n </template>\n\n <template\n v-for=\"field in computedFields\"\n :key=\"field.key\"\n #[`head(${String(field.key)})`]=\"scope\"\n >\n <slot\n :name=\"\n slots[`head(${String(field.key)})`]\n ? (`head(${String(field.key)})` as 'head()')\n : 'head()'\n \"\n v-bind=\"scope\"\n :select-all-rows=\"exposedSelectableUtilities.selectAllRows\"\n :clear-selected=\"exposedSelectableUtilities.clearSelected\"\n >\n {{ getTableFieldHeadLabel(field) }}\n </slot>\n <template v-if=\"isSortable && !!scope.field.sortable && props.noSortableIcon === false\">\n <slot\n v-if=\"sortByModel?.find((el) => el.key === scope.field.key)?.order === 'asc'\"\n v-bind=\"scope\"\n :name=\"\n slots[`sortAsc(${String(scope.field.key)})`]\n ? (`sortAsc(${String(scope.field.key)})` as 'sortAsc()')\n : 'sortAsc()'\n \"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-up-short\"\n viewBox=\"0 0 16 16\"\n aria-hidden\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z\"\n />\n </svg>\n </slot>\n <slot\n v-else-if=\"sortByModel?.find((el) => el.key === scope.field.key)?.order === 'desc'\"\n v-bind=\"scope\"\n :name=\"\n slots[`sortDesc(${String(scope.field.key)})`]\n ? (`sortDesc(${String(scope.field.key)})` as 'sortDesc()')\n : 'sortDesc()'\n \"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-down-short\"\n viewBox=\"0 0 16 16\"\n aria-hidden\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 4a.5.5 0 0 1 .5.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L7.5 10.293V4.5A.5.5 0 0 1 8 4z\"\n />\n </svg>\n </slot>\n <slot\n v-else\n v-bind=\"scope\"\n :name=\"\n slots[`sortDefault(${String(scope.field.key)})`]\n ? (`sortDefault(${String(scope.field.key)})` as 'sortDefault()')\n : 'sortDefault()'\n \"\n >\n <svg\n :style=\"{opacity: 0.4}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-up-short\"\n viewBox=\"0 0 16 16\"\n aria-hidden\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z\"\n />\n </svg>\n </slot>\n </template>\n </template>\n <template #custom-body=\"scope\">\n <BTr\n v-if=\"busyModel && slots['table-busy']\"\n class=\"b-table-busy-slot\"\n :class=\"getBusyRowClasses\"\n >\n <BTd :colspan=\"scope.fields.length\">\n <slot name=\"table-busy\" />\n </BTd>\n </BTr>\n\n <BTr\n v-else-if=\"props.showEmpty === true && computedItems.length === 0\"\n class=\"b-table-empty-row\"\n >\n <BTd :colspan=\"computedFields.length\">\n <div role=\"alert\" aria-live=\"polite\">\n <div class=\"text-center my-2\">\n <slot v-if=\"isFilterableTable\" name=\"empty-filtered\" v-bind=\"emptySlotScope\">\n {{ props.emptyFilteredText }}\n </slot>\n <slot v-else name=\"empty\" v-bind=\"emptySlotScope\">\n {{ props.emptyText }}\n </slot>\n </div>\n </div>\n </BTd>\n </BTr>\n </template>\n </BTableLite>\n</template>\n\n<script setup lang=\"ts\" generic=\"Items\">\nimport {useToNumber} from '@vueuse/core'\nimport {computed, onMounted, type Ref, ref, watch} from 'vue'\nimport {formatItem} from '../../utils/formatItem'\nimport BTableLite from './BTableLite.vue'\nimport BTd from './BTd.vue'\nimport BTr from './BTr.vue'\nimport {\n type BTableSortBy,\n type BTableSortByOrder,\n isTableField,\n isTableItem,\n type NoProviderTypes,\n type TableField,\n type TableFieldFormatter,\n type TableFieldRaw,\n type TableItem,\n type TableRowEvent,\n type TableRowType,\n type TableStrictClassValue,\n} from '../../types/TableTypes'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BTableProps} from '../../types/ComponentProps'\nimport {get, pick, set} from '../../utils/object'\nimport {startCase} from '../../utils/stringUtils'\nimport type {LiteralUnion} from '../../types/LiteralUnion'\nimport {\n btableLiteProps,\n btableSimpleProps,\n getDataLabelAttr,\n getTableFieldHeadLabel,\n} from '../../utils/tableUtils'\nimport {useId} from '../../composables/useId'\n\nconst _props = withDefaults(\n defineProps<Omit<BTableProps<Items>, 'sortBy' | 'busy' | 'selectedItems'>>(),\n {\n noSortableIcon: false,\n perPage: Number.POSITIVE_INFINITY,\n filter: undefined,\n filterFunction: undefined,\n mustSort: false,\n filterable: undefined,\n provider: undefined,\n noProvider: undefined,\n noProviderPaging: false,\n noProviderSorting: false,\n multisort: false,\n noProviderFiltering: false,\n noLocalSorting: false,\n noSelectOnClick: false,\n selectable: false,\n stickySelect: false,\n selectHead: true,\n selectMode: 'multi',\n selectionVariant: 'primary',\n busyLoadingText: 'Loading...',\n currentPage: 1,\n // BTableLite props\n items: () => [],\n fields: () => [],\n // All others use defaults\n caption: undefined,\n align: undefined,\n footClone: undefined,\n labelStacked: undefined,\n showEmpty: false,\n emptyText: 'There are no records to show',\n emptyFilteredText: 'There are no records matching your request',\n fieldColumnClass: undefined,\n tbodyTrClass: undefined,\n detailsTdClass: undefined,\n headVariant: undefined,\n headRowVariant: undefined,\n footRowVariant: undefined,\n footVariant: undefined,\n modelValue: undefined,\n primaryKey: undefined,\n tbodyClass: undefined,\n tfootClass: undefined,\n tfootTrClass: undefined,\n theadClass: undefined,\n theadTrClass: undefined,\n // End BTableLite props\n // BTableSimple props\n borderVariant: undefined,\n variant: undefined,\n bordered: undefined,\n borderless: undefined,\n captionTop: undefined,\n dark: undefined,\n hover: undefined,\n id: undefined,\n noBorderCollapse: undefined,\n outlined: undefined,\n fixed: undefined,\n responsive: undefined,\n stacked: undefined,\n striped: undefined,\n stripedColumns: undefined,\n small: undefined,\n stickyHeader: undefined,\n // End BTableSimple props\n }\n)\nconst props = useDefaults(_props, 'BTable')\n\nconst emit = defineEmits<{\n 'filtered': [value: Items[]]\n 'head-clicked': [\n key: string,\n field: (typeof computedFields.value)[0],\n event: MouseEvent,\n isFooter: boolean,\n ]\n 'row-clicked': TableRowEvent<Items>\n 'row-dblclicked': TableRowEvent<Items>\n 'row-contextmenu': TableRowEvent<Items>\n 'row-hovered': TableRowEvent<Items>\n 'row-unhovered': TableRowEvent<Items>\n 'row-middle-clicked': TableRowEvent<Items>\n 'row-selected': [value: Items]\n 'row-unselected': [value: Items]\n 'sorted': [value: BTableSortBy<Items>]\n 'change': [value: Items[]]\n}>()\n\ntype SortSlotScope = {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: false\n}\n\nconst slots = defineSlots<{\n // BTableLite\n 'thead-top'?: (props: {\n columns: number\n fields: typeof computedFields.value\n selectAllRows: () => void\n clearSelected: () => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n [key: `head(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: false\n selectAllRows: () => void\n clearSelected: () => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'thead-sub'?: (\n props: {\n items: readonly Items[]\n fields: typeof computedFields.value\n field: (typeof computedFields.value)[0]\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'top-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n [key: `cell(${string})`]: (props: {\n value: unknown\n unformatted: unknown\n index: number\n item: Items\n field: (typeof computedFields.value)[0]\n items: readonly Items[]\n toggleDetails: () => void\n detailsShowing: boolean\n rowSelected: boolean\n selectRow: (index?: number) => void\n unselectRow: (index?: number) => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'row-details'?: (props: {\n item: Items\n toggleDetails: () => void\n fields: typeof computedFields.value\n index: number\n rowSelected: boolean\n selectRow: (index?: number) => void\n unselectRow: (index?: number) => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'bottom-row'?: (props: {columns: number; fields: typeof computedFields.value}) => any\n\n [key: `foot(${string})`]: (props: {\n label: string | undefined\n column: LiteralUnion<keyof Items>\n field: (typeof computedFields.value)[0]\n isFoot: true\n selectAllRows: () => void\n clearSelected: () => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n 'custom-foot'?: (props: {\n fields: typeof computedFields.value\n items: readonly Items[]\n columns: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'table-caption'?: (props: Record<string, never>) => any\n\n // end btable slots\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: `sortAsc(${string})`]: (props: SortSlotScope) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: `sortDesc(${string})`]: (props: SortSlotScope) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: `sortDefault(${string})`]: (props: SortSlotScope) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'table-busy'?: (props: Record<string, never>) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'empty-filtered'?: (props: typeof emptySlotScope.value) => any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'empty'?: (props: typeof emptySlotScope.value) => any\n}>()\n\nconst dynamicCellSlots = computed(\n () => Object.keys(slots).filter((key) => key.startsWith('cell(')) as 'cell()'[]\n)\nconst dynamicFootSlots = computed(\n () => Object.keys(slots).filter((key) => key.startsWith('foot(')) as 'foot()'[]\n)\n\nconst sortByModel = defineModel<BTableProps<Items>['sortBy']>('sortBy', {\n default: undefined,\n})\nconst busyModel = defineModel<Exclude<BTableProps<Items>['busy'], undefined>>('busy', {\n default: false,\n})\nconst selectedItemsModel = defineModel<Exclude<BTableProps<Items>['selectedItems'], undefined>>(\n 'selectedItems',\n {\n default: () => [],\n }\n)\n\nconst computedId = useId(() => props.id)\n\nconst selectedItemsToSet = computed({\n get: () => new Set(selectedItemsModel.value),\n set: (val) => {\n selectedItemsModel.value = [...val]\n },\n})\n\nwatch(selectedItemsToSet, (newValue, oldValue) => {\n Array.from(oldValue)\n .filter((item) => !newValue.has(item))\n .forEach((item) => {\n emit('row-unselected', item)\n })\n Array.from(newValue)\n .filter((item) => !oldValue.has(item))\n .forEach((item) => {\n emit('row-selected', item)\n })\n})\n/**\n * This is to avoid the issue of directly mutating the array structure and to properly trigger the computed setter.\n * The utils also conveniently emit the proper events after\n */\nconst selectedItemsSetUtilities = {\n add: (item: Items) => {\n const value = new Set(selectedItemsToSet.value)\n value.add(item)\n selectedItemsToSet.value = value\n },\n clear: () => {\n selectedItemsToSet.value.forEach((item) => {\n selectedItemsSetUtilities.delete(item)\n })\n },\n delete: (item: Items) => {\n const value = new Set(selectedItemsToSet.value)\n if (props.primaryKey) {\n const pkey: string = props.primaryKey\n selectedItemsModel.value.forEach((v, i) => {\n const selectedKey = get(v, pkey)\n const itemKey = get(item, pkey)\n\n if (!!selectedKey && !!itemKey && selectedKey === itemKey) {\n value.delete(selectedItemsModel.value[i])\n }\n })\n } else {\n value.delete(item)\n }\n selectedItemsToSet.value = value\n },\n set: (items: Items[]) => {\n selectedItemsToSet.value = new Set(items)\n },\n has: (item: Items) => {\n if (!props.primaryKey) return selectedItemsToSet.value.has(item)\n\n // Resolver for when we are using primary keys\n const pkey: string = props.primaryKey\n for (const selected of selectedItemsToSet.value) {\n const selectedKey = get(selected, pkey)\n const itemKey = get(item, pkey)\n\n if (!!selectedKey && !!itemKey && selectedKey === itemKey) return true\n }\n return false\n },\n} as const\n\n/**\n * Only stores data that is fetched when using the provider\n */\nconst internalItems: Ref<Items[]> = ref([])\n\nconst perPageNumber = useToNumber(() => props.perPage, {method: 'parseInt'})\nconst currentPageNumber = useToNumber(() => props.currentPage, {method: 'parseInt'})\n\nconst isFilterableTable = computed(() => !!props.filter)\nconst usesProvider = computed(() => props.provider !== undefined)\nconst isSelecting = computed(() => selectedItemsToSet.value.size > 0)\n\nconst isSortable = computed(\n () =>\n sortByModel.value !== undefined ||\n props.fields.some(\n (field) => typeof field === 'object' && field !== null && field.sortable === true\n )\n)\n\nconst computedFields = computed<TableField<Items>[]>(() =>\n props.fields.map((el) => {\n if (!isTableField<Items>(el)) {\n const label = startCase(el as string)\n return {\n key: el as string,\n label,\n tdAttr: getDataLabelAttr(props, label),\n }\n }\n\n const value = sortByModel.value?.find((sb) => el.key === sb.key)\n const sortValue =\n isSortable.value === false\n ? undefined\n : value === undefined\n ? 'none'\n : value.order === 'desc'\n ? 'descending'\n : value.order === 'asc'\n ? 'ascending'\n : 'none'\n\n return {\n ...(el as TableField<Items>),\n thAttr: {\n 'aria-sort': sortValue,\n ...el.thAttr,\n },\n }\n })\n)\n\nconst tableClasses = computed(() => ({\n 'b-table-busy': busyModel.value,\n 'b-table-selectable': props.selectable,\n 'user-select-none': props.selectable && isSelecting.value,\n}))\n\nconst getBusyRowClasses = computed(() => [\n props.tbodyTrClass\n ? typeof props.tbodyTrClass === 'function'\n ? props.tbodyTrClass(null, 'table-busy')\n : props.tbodyTrClass\n : null,\n])\nconst getFieldColumnClasses = (field: TableField) => [\n {\n 'b-table-sortable-column': isSortable.value && field.sortable,\n },\n]\n// TODO this class has issues if the table has a variant already applied\n// Also the row should technically have aria-selected . Both things could probably just use a function with tbodyTrAttrs\n// But functional tbodyTrAttrs are not supported yet\n// Also the stuff for resolving functions could probably be made a util\nconst getRowClasses = (item: Items | null, type: TableRowType): TableStrictClassValue => [\n {\n [`selected table-${props.selectionVariant}`]:\n props.selectable && !!item && selectedItemsSetUtilities.has(item),\n },\n props.tbodyTrClass\n ? typeof props.tbodyTrClass === 'function'\n ? props.tbodyTrClass(item, type)\n : props.tbodyTrClass\n : null,\n]\n\nconst getFormatter = (value: TableField<Items>): TableFieldFormatter<Items> | undefined =>\n typeof value.sortByFormatted === 'function' ? value.sortByFormatted : value.formatter\n\nconst computedItems = computed<Items[]>(() => {\n // \"undefined\" values are set by us, we do this so we dont wipe out the comparer\n const sortByItems = sortByModel.value?.filter((el) => !!el.order)\n\n const mapItem = (item: Items): Items => {\n if (\n typeof item === 'object' &&\n item !== null &&\n Object.keys(item).some((key) => key.includes('.'))\n ) {\n let newItem: Partial<Items> = {}\n for (const key in item) {\n if (key.includes('.')) {\n newItem = set(newItem, key, item[key])\n } else {\n newItem[key] = item[key]\n }\n }\n return newItem as Items // This should be an items at this point\n }\n return item\n }\n\n const filterItem = (item: Items): boolean => {\n if (!isTableItem(item)) return true\n\n return Object.entries(item).some(([key, val]) => {\n if (\n val === null ||\n val === undefined ||\n key[0] === '_' ||\n (!props.filterable?.includes(key) && !!props.filterable?.length)\n )\n return false\n\n if (props.filterFunction && typeof props.filterFunction === 'function') {\n return props.filterFunction(item, props.filter)\n }\n\n const realVal = (): string => {\n const filterField = computedFields.value.find((el) => {\n if (isTableField<Items>(el)) return el.key === key\n return false\n })\n if (isTableField<Items>(filterField) && !!filterField.filterByFormatted) {\n const formatter = getFormatter(filterField)\n if (formatter) {\n return String(formatter(val, String(filterField.key), item))\n }\n }\n return typeof val === 'object' ? JSON.stringify(Object.values(val)) : val.toString()\n }\n const itemValue: string = realVal()\n return itemValue.toLowerCase().includes(props.filter?.toLowerCase() ?? '')\n })\n }\n\n const mappedItems = (usesProvider.value ? internalItems.value : props.items).reduce(\n (acc, val) => {\n const item = mapItem(val)\n const shouldFilter =\n isFilterableTable.value && (!usesProvider.value || props.noProviderFiltering)\n\n if (!shouldFilter || filterItem(item)) acc.push(item)\n\n return acc\n },\n [] as Items[]\n )\n\n if (\n sortByItems?.length &&\n ((isSortable.value === true && !usesProvider.value && !props.noLocalSorting) ||\n (isSortable.value === true && usesProvider.value && props.noProviderSorting))\n ) {\n // Multi-sort\n return mappedItems.sort((a, b) => {\n for (let i = 0; i < sortByItems.length; i++) {\n const {key, comparer, order} = sortByItems[i]\n const getStringValue = (ob: Items): string => {\n if (!isTableItem(ob)) return String(ob)\n\n const sortField = computedFields.value.find((el) => {\n if (isTableField<Items>(el)) return el.key === key\n\n return false\n })\n const val = get(ob, key as keyof TableItem)\n if (isTableField<Items>(sortField) && !!sortField.sortByFormatted) {\n const formatter = getFormatter(sortField)\n if (formatter) {\n return String(formatItem(ob, String(sortField.key), formatter))\n }\n }\n return typeof val === 'object' && val !== null\n ? JSON.stringify(val)\n : (val?.toString() ?? '')\n }\n\n const comparison = comparer\n ? comparer(a, b, key)\n : getStringValue(a).localeCompare(getStringValue(b), undefined, {numeric: true})\n\n if (comparison !== 0) {\n return order === 'asc' ? comparison : -comparison\n }\n }\n return 0 // items are equal\n })\n }\n\n return mappedItems\n})\n\nconst emptySlotScope = computed(() => ({\n emptyFilteredText: props.emptyFilteredText,\n emptyText: props.emptyText,\n fields: computedFields.value,\n items: computedItems.value,\n}))\n\nconst computedDisplayItems = computed<Items[]>(() => {\n if (Number.isNaN(perPageNumber.value) || (usesProvider.value && !props.noProviderPaging)) {\n return computedItems.value\n }\n\n return computedItems.value.slice(\n (currentPageNumber.value - 1) * (perPageNumber.value || Number.POSITIVE_INFINITY),\n currentPageNumber.value * (perPageNumber.value || Number.POSITIVE_INFINITY)\n )\n})\n\nwatch(computedDisplayItems, (v) => {\n emit('change', v)\n})\n\nconst handleRowSelection = (\n row: Items,\n index: number,\n shiftClicked = false,\n ctrlClicked = false,\n metaClicked = false\n) => {\n if (!props.selectable) return\n\n if (props.selectMode === 'single' || props.selectMode === 'multi') {\n // Do nothing when these items are held\n if (shiftClicked || ctrlClicked) return\n // Delete if item is in\n if (selectedItemsSetUtilities.has(row)) {\n selectedItemsSetUtilities.delete(row)\n } else {\n if (props.selectMode === 'single') {\n selectedItemsSetUtilities.set([row])\n } else {\n selectedItemsSetUtilities.add(row)\n }\n }\n } else {\n if (ctrlClicked || metaClicked) {\n // Delete if in the object\n if (selectedItemsSetUtilities.has(row)) {\n selectedItemsSetUtilities.delete(row)\n // Otherwise add. Functions similarly to 'multi' at this point\n } else {\n selectedItemsSetUtilities.add(row)\n }\n // This is where range is different, due to the difference in shift\n } else if (shiftClicked) {\n const lastSelectedItem = [...selectedItemsToSet.value].pop()\n const lastSelectedIndex = computedItems.value.findIndex((i) => i === lastSelectedItem)\n const selectStartIndex = Math.min(lastSelectedIndex, index)\n const selectEndIndex = Math.max(lastSelectedIndex, index)\n const items = computedItems.value.slice(selectStartIndex, selectEndIndex + 1)\n selectedItemsSetUtilities.set(items)\n // If nothing is being held, then we just behave like it's single mode\n } else {\n selectedItemsSetUtilities.set([row])\n }\n }\n}\n\nconst onRowClick = (row: Items, index: number, e: MouseEvent) => {\n if (props.noSelectOnClick === false) {\n handleRowSelection(row, index, e.shiftKey, e.ctrlKey, e.metaKey)\n }\n emit('row-clicked', row, index, e)\n}\n\nconst handleFieldSorting = (field: TableField<Items>) => {\n if (!isSortable.value) return\n\n const fieldKey = typeof field === 'object' && field !== null ? field.key : field\n const fieldSortable = typeof field === 'object' && field !== null ? field.sortable : false\n\n if (!(isSortable.value === true && fieldSortable === true)) return\n\n const resolveOrder = (val: BTableSortByOrder): BTableSortByOrder | undefined => {\n if (val === 'asc') return 'desc'\n if (val === undefined) return 'asc'\n if (\n props.mustSort === true ||\n (Array.isArray(props.mustSort) && props.mustSort.includes(fieldKey as string))\n )\n return 'asc'\n return undefined\n }\n\n const index = sortByModel.value?.findIndex((el) => el.key === fieldKey) ?? -1\n const originalValue = sortByModel.value?.[index]\n const updatedValue: BTableSortBy<Items> =\n // If value is new, we default to ascending\n // Otherwise we make a temp copy of the value\n index === -1 || !originalValue ? {key: fieldKey as string, order: 'asc'} : {...originalValue}\n\n /**\n * @returns the updated value to emit for sorted\n */\n const handleMultiSort = (): BTableSortBy<Items> => {\n sortByModel.value = sortByModel.value ?? []\n const val = updatedValue\n if (index === -1) {\n sortByModel.value.push(val)\n } else {\n val.order = resolveOrder(val.order)\n sortByModel.value.splice(index, 1, val)\n }\n return val\n }\n\n /**\n * @returns the updated value to emit for sorted\n */\n const handleSingleSort = (): BTableSortBy<Items> => {\n const val = {\n ...updatedValue,\n order: index === -1 ? updatedValue.order : resolveOrder(updatedValue.order),\n }\n const tmp = (sortByModel.value || []).map<BTableSortBy<Items>>((e) => ({\n ...e,\n order: undefined,\n }))\n if (index === -1) {\n tmp.push(val)\n } else {\n tmp[index] = val\n }\n sortByModel.value = tmp\n return val\n }\n\n // Then emit the returned updated value\n emit('sorted', props.multisort === true ? handleMultiSort() : handleSingleSort())\n}\n\nconst onFieldHeadClick = (\n fieldKey: string,\n field: TableField<Items>,\n event: Readonly<MouseEvent>,\n isFooter = false\n) => {\n emit('head-clicked', fieldKey, field, event, isFooter)\n handleFieldSorting(field)\n}\n\nconst callItemsProvider = async () => {\n if (!usesProvider.value || props.provider === undefined || busyModel.value) return\n busyModel.value = true\n const response = props.provider({\n currentPage: currentPageNumber.value,\n filter: props.filter,\n sortBy: sortByModel.value,\n perPage: perPageNumber.value,\n })\n try {\n const items = response instanceof Promise ? await response : response\n\n if (items === undefined) return\n internalItems.value = items\n } finally {\n // Potential race condition could occur if the user explicitly sets the busy value to a different value while the response promise is executing\n // which would have been the users choice.\n // eslint-disable-next-line require-atomic-updates\n busyModel.value = false\n }\n}\n\nconst providerPropsWatch = async (prop: string, val: unknown, oldVal: unknown) => {\n if (val === oldVal) return\n\n //stop provide when paging\n const inNoProvider = (key: NoProviderTypes) => props.noProvider?.includes(key) === true\n const noProvideWhenPaging =\n (prop === 'currentPage' || prop === 'perPage') &&\n (inNoProvider('paging') || props.noProviderPaging === true)\n const noProvideWhenFiltering =\n prop === 'filter' && (inNoProvider('filtering') || props.noProviderFiltering === true)\n const noProvideWhenSorting =\n (prop === 'sortBy' || prop === 'sortDesc') &&\n (inNoProvider('sorting') || props.noProviderSorting === true)\n\n if (noProvideWhenPaging || noProvideWhenFiltering || noProvideWhenSorting) return\n\n if (usesProvider.value === true) {\n await callItemsProvider()\n }\n\n if (!(prop === 'currentPage' || prop === 'perPage')) {\n emit('filtered', [...computedItems.value])\n }\n}\n\nwatch(\n () => props.filter,\n (filter, oldFilter) => {\n providerPropsWatch('filter', filter, oldFilter)\n\n if (filter === oldFilter || usesProvider.value) return\n if (!filter) {\n emit('filtered', [...computedItems.value])\n }\n }\n)\nwatch(currentPageNumber, (val, oldVal) => {\n providerPropsWatch('currentPage', val, oldVal)\n})\nwatch(perPageNumber, (val, oldVal) => {\n providerPropsWatch('perPage', val, oldVal)\n})\nwatch(\n sortByModel,\n (val, oldVal) => {\n providerPropsWatch('sortBy', val, oldVal)\n },\n {deep: true}\n)\n\nwatch(\n () => props.provider,\n (newValue) => {\n // Reset the internal values if the provider stops getting used\n if (newValue === undefined) {\n internalItems.value = []\n return\n }\n // Otherwise we should refresh the table on such a change\n callItemsProvider()\n }\n)\n\nonMounted(callItemsProvider)\n\nconst exposedSelectableUtilities = {\n clearSelected: () => {\n if (!props.selectable) return\n selectedItemsSetUtilities.clear()\n },\n selectAllRows: () => {\n if (!props.selectable || props.selectMode === 'single') return\n selectedItemsToSet.value = new Set(computedItems.value)\n },\n selectRow: (index: number) => {\n if (!props.selectable) return\n const item = computedItems.value[index]\n if (!item || selectedItemsSetUtilities.has(item)) return\n if (props.selectMode === 'single') {\n selectedItemsSetUtilities.set([item])\n } else {\n selectedItemsSetUtilities.add(item)\n }\n },\n unselectRow: (index: number) => {\n if (!props.selectable) return\n const item = computedItems.value[index]\n if (!item || !selectedItemsSetUtilities.has(item)) return\n selectedItemsSetUtilities.delete(item)\n },\n isRowSelected: (index: number) => {\n if (!props.selectable) return false\n const item = computedItems.value[index]\n return selectedItemsSetUtilities.has(item)\n },\n} as const\n\nconst computedLiteProps = computed(() => ({\n ...pick(props, [...btableLiteProps, ...btableSimpleProps]),\n tableAttrs: {\n ariaBusy: busyModel.value,\n },\n items: computedDisplayItems.value,\n fields: computedFields.value as TableFieldRaw<Items>[],\n tableClass: tableClasses.value,\n tbodyTrClass: getRowClasses,\n fieldColumnClass: getFieldColumnClasses,\n id: computedId.value,\n}))\n\ndefineExpose({\n // The row selection methods are really for compat. Users should probably use the v-model though\n ...exposedSelectableUtilities,\n items: computedItems,\n refresh: callItemsProvider,\n})\n</script>\n"],"names":["formatItem","item","fieldKey","formatter","val","get","isTableItem","value","isTableField","_props","__props","props","useDefaults","computedClasses","computed","variant","stickyColumn","scope","colspan","rowspan","getTableFieldHeadLabel","field","titleCase","label","key","btableSimpleProps","Object","freeze","keys","bordered","borderless","borderVariant","captionTop","dark","fixed","hover","id","noBorderCollapse","outlined","responsive","small","stacked","stickyHeader","striped","stripedColumns","tableAttrs","tableClass","btableLiteProps","align","caption","detailsTdClass","fieldColumnClass","fields","footClone","footRowVariant","footVariant","headRowVariant","headVariant","items","labelStacked","modelValue","primaryKey","tbodyClass","tbodyTrAttrs","tbodyTrClass","tfootClass","tfootTrClass","theadClass","theadTrClass","getDataLabelAttr","TABLE_TAG_NAMES","eventFilter","join","filterEvent","event","target","el","disabled","indexOf","tagName","closest","labelFor","getAttribute","input","document","getElementById","querySelector","matches","emit","__emit","slots","_useSlots","computedId","useId","detailsMap","ref","WeakMap","vue","watch","forEach","set","_showDetails","generateDetailsItem","deep","immediate","computedTableClasses","computedFields","length","firstItem","Array","isArray","map","k","startCase","tdAttr","_noHeader","f","computedFieldsTotal","showComputedHeaders","every","footerProps","class","callThAttr","type","String","thAttr","headerClicked","isFooter","toggleRowDetails","tr","prevValue","getFieldColumnClasses","thClass","getFieldRowClasses","tdClass","_a","_cellVariants","_b","callTbodyTrAttrs","getRowClasses","computedSimpleProps","pick","primaryKeyValue","itemIndex","button","attr","dynamicCellSlots","filter","startsWith","dynamicFootSlots","sortByModel","_useModel","busyModel","selectedItemsModel","useModel","selectedItemsToSet","Set","newValue","oldValue","from","has","selectedItemsSetUtilities","add","clear","delete","pkey","v","i","selectedKey","itemKey","selected","internalItems","perPageNumber","useToNumber","perPage","method","currentPageNumber","currentPage","isFilterableTable","usesProvider","provider","isSelecting","size","isSortable","some","sortable","find","sb","sortValue","order","tableClasses","selectable","getBusyRowClasses","selectionVariant","getFormatter","sortByFormatted","computedItems","sortByItems","mappedItems","reduce","acc","includes","newItem","mapItem","noProviderFiltering","entries","filterable","filterFunction","filterField","filterByFormatted","JSON","stringify","values","toString","realVal","toLowerCase","_c","filterItem","push","noLocalSorting","noProviderSorting","sort","a","b","comparer","getStringValue","ob","sortField","comparison","localeCompare","numeric","emptySlotScope","emptyFilteredText","emptyText","computedDisplayItems","Number","isNaN","noProviderPaging","slice","POSITIVE_INFINITY","onRowClick","row","index","e","noSelectOnClick","shiftClicked","ctrlClicked","metaClicked","selectMode","lastSelectedItem","pop","lastSelectedIndex","findIndex","selectStartIndex","Math","min","selectEndIndex","max","handleRowSelection","shiftKey","ctrlKey","metaKey","onFieldHeadClick","fieldSortable","resolveOrder","mustSort","originalValue","updatedValue","multisort","splice","handleMultiSort","tmp","handleSingleSort","handleFieldSorting","callItemsProvider","async","response","sortBy","Promise","providerPropsWatch","prop","oldVal","inNoProvider","noProvider","noProvideWhenPaging","noProvideWhenFiltering","noProvideWhenSorting","oldFilter","onMounted","exposedSelectableUtilities","clearSelected","selectAllRows","selectRow","unselectRow","isRowSelected","computedLiteProps","ariaBusy","__expose","refresh"],"mappings":"kSAGaA,EAAa,CACxBC,EAEAC,EACAC,KAEM,MAAAC,EAAMC,EAAAA,IAAIJ,EAAMC,GACf,OAAAC,GAAkC,mBAAdA,EAA2BA,EAAUC,EAAKF,EAAUD,GAAQG,CAAA,ECI5EE,EAAeC,GACT,iBAAVA,GAAgC,OAAVA,EAiElBC,EAAmBD,GACb,iBA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L,YAAmC,WAArBpL,EAAM6O,aAC/B7F,EAAmBpJ,MAAQ,IAAIqJ,IAAIwC,EAAc7L,OAAK,EAExD6R,UAAYlD,IACN,IAACvO,EAAMoL,WAAY,OACjB,MAAA9L,EAAOmM,EAAc7L,MAAM2O,GAC5BjP,IAAQgK,EAA0BD,IAAI/J,KAClB,WAArBU,EAAM6O,WACkBvF,EAAA7D,IAAI,CAACnG,IAE/BgK,EAA0BC,IAAIjK,GAAI,EAGtCoS,YAAcnD,IACR,IAACvO,EAAMoL,WAAY,OACjB,MAAA9L,EAAOmM,EAAc7L,MAAM2O,GAC5BjP,GAASgK,EAA0BD,IAAI/J,IAC5CgK,EAA0BG,OAAOnK,EAAI,EAEvCqS,cAAgBpD,IACV,IAACvO,EAAMoL,WAAmB,OAAA,EACxB,MAAA9L,EAAOmM,EAAc7L,MAAM2O,GAC1B,OAAAjF,EAA0BD,IAAI/J,EAAI,GAIvCsS,GAAoBzR,EAAAA,UAAS,KAAO,IACrC+H,EAAAA,KAAKlI,EAAO,IAAIoC,KAAoBtB,IACvCoB,WAAY,CACV2P,SAAUhJ,EAAUjJ,OAEtBmD,MAAOgL,EAAqBnO,MAC5B6C,OAAQsD,EAAenG,MACvBuC,WAAYgJ,EAAavL,MACzByD,aAAc2E,EACdxF,iBAAkBgF,EAClB/F,GAAIwD,EAAWrF,iBAGJkS,EAAA,IAERR,GACHvO,MAAO0I,EACPsG,QAASxB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i } from "./index-BjYm4lhC.mjs";
|
|
2
2
|
import { i as i2 } from "./index-CXpBEYSc.mjs";
|
|
3
3
|
import { i as i3 } from "./index-i-UFv70c.mjs";
|
|
4
|
-
import { i as i4 } from "./index-
|
|
4
|
+
import { i as i4 } from "./index-A_L6CWvF.mjs";
|
|
5
5
|
import { c as componentNames, a as componentsWithExternalPath, b as composableNames, d as composablesWithExternalPath, e as directiveNames, f as directivesWithExternalPath } from "./index-sLCKmIWG.mjs";
|
|
6
6
|
import { B, i as i5 } from "./index-sLCKmIWG.mjs";
|
|
7
7
|
import { i as i6 } from "./index-DwDHvBIQ.mjs";
|
|
@@ -63,7 +63,7 @@ import { B as B7 } from "./floatingUi-CNPoh8hs.mjs";
|
|
|
63
63
|
import { _ as _40 } from "./BPopoverOrchestrator.vue_vue_type_script_setup_true_lang-B-n-7UQK.mjs";
|
|
64
64
|
import { _ as _41, a as a21 } from "./BProgress.vue_vue_type_script_setup_true_lang-BOhOz9Pk.mjs";
|
|
65
65
|
import { _ as _42 } from "./BSpinner.vue_vue_type_script_setup_true_lang-BBcjZkCi.mjs";
|
|
66
|
-
import { _ as _43, a as a22, b as b8, c as c7, d as d5, e as e3, f as f3, g } from "./BTable.vue_vue_type_script_setup_true_lang-
|
|
66
|
+
import { _ as _43, a as a22, b as b8, c as c7, d as d5, e as e3, f as f3, g } from "./BTable.vue_vue_type_script_setup_true_lang-CfD_nWrh.mjs";
|
|
67
67
|
import { _ as _44 } from "./BTableSimple.vue_vue_type_script_setup_true_lang-Dbrg2rgZ.mjs";
|
|
68
68
|
import { _ as _45, a as a23 } from "./BTabs.vue_vue_type_script_setup_true_lang-AmprSk-s.mjs";
|
|
69
69
|
import { B as B8, _ as _46 } from "./BToastOrchestrator.vue_vue_type_style_index_0_lang-CgGO-ddH.mjs";
|