@adyen/bento-vue2 1.64.1 → 1.66.0
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/@types/index.d.ts +416 -234
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/info-icon.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/tab.css +1 -0
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.DHdrZtmW.js → action-bar.C8zeHAJG.js} +31 -31
- package/dist/chunks/action-bar.C8zeHAJG.js.map +1 -0
- package/dist/chunks/button-actions-with-menu.BVU1NS0m.js +83 -0
- package/dist/chunks/button-actions-with-menu.BVU1NS0m.js.map +1 -0
- package/dist/chunks/calendar.DvIQEYwN.js +2086 -0
- package/dist/chunks/calendar.DvIQEYwN.js.map +1 -0
- package/dist/chunks/{checkbox-group.DVX0GFm9.js → checkbox-group.BVMGnokj.js} +4 -4
- package/dist/chunks/{checkbox-group.DVX0GFm9.js.map → checkbox-group.BVMGnokj.js.map} +1 -1
- package/dist/chunks/{checkbox.nHrvoKfp.js → checkbox.Bg5FM5Oa.js} +2 -2
- package/dist/chunks/{checkbox.nHrvoKfp.js.map → checkbox.Bg5FM5Oa.js.map} +1 -1
- package/dist/chunks/{code-snippet.y-fe04wy.js → code-snippet.BcoVTIs2.js} +3 -3
- package/dist/chunks/{code-snippet.y-fe04wy.js.map → code-snippet.BcoVTIs2.js.map} +1 -1
- package/dist/chunks/{controls-group.BWAmz7Tg.js → controls-group.CccuLkgP.js} +2 -2
- package/dist/chunks/{controls-group.BWAmz7Tg.js.map → controls-group.CccuLkgP.js.map} +1 -1
- package/dist/chunks/copy.CF8Fzu2Y.js +96 -0
- package/dist/chunks/copy.CF8Fzu2Y.js.map +1 -0
- package/dist/chunks/{dashboard-section.Bz54Z6Hh.js → dashboard-section.CcEIwDqX.js} +3 -3
- package/dist/chunks/{dashboard-section.Bz54Z6Hh.js.map → dashboard-section.CcEIwDqX.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DtFRjaR8.js → data-grid-template.DJQcVuPs.js} +16 -14
- package/dist/chunks/data-grid-template.DJQcVuPs.js.map +1 -0
- package/dist/chunks/{data-grid.DCPJKAXM.js → data-grid.t4fCoE2Y.js} +70 -64
- package/dist/chunks/{data-grid.DCPJKAXM.js.map → data-grid.t4fCoE2Y.js.map} +1 -1
- package/dist/chunks/{date-picker.k0g6anfy.js → date-picker.DOAWsba5.js} +6 -7
- package/dist/chunks/{date-picker.k0g6anfy.js.map → date-picker.DOAWsba5.js.map} +1 -1
- package/dist/chunks/{date-range-picker.C1NVoQMD.js → date-range-picker.DYxZygbL.js} +22 -23
- package/dist/chunks/{date-range-picker.C1NVoQMD.js.map → date-range-picker.DYxZygbL.js.map} +1 -1
- package/dist/chunks/date.BfyWX2PY.js +160 -0
- package/dist/chunks/date.BfyWX2PY.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Bz9wsYt7.js → dropdown-tag.DYg5l6HT.js} +2 -2
- package/dist/chunks/{dropdown-tag.Bz9wsYt7.js.map → dropdown-tag.DYg5l6HT.js.map} +1 -1
- package/dist/chunks/{dropdown.9xELPCKZ.js → dropdown.BWsU98dn.js} +273 -267
- package/dist/chunks/dropdown.BWsU98dn.js.map +1 -0
- package/dist/chunks/{error-message.1Em7Lis3.js → error-message.BgxnwPLF.js} +2 -2
- package/dist/chunks/{error-message.1Em7Lis3.js.map → error-message.BgxnwPLF.js.map} +1 -1
- package/dist/chunks/es6.n1ewaW31.js.map +1 -1
- package/dist/chunks/{file-uploader.DyjdNLOa.js → file-uploader.BPslxGI8.js} +323 -323
- package/dist/chunks/file-uploader.BPslxGI8.js.map +1 -0
- package/dist/chunks/{filter-bar.u3zmwRsM.js → filter-bar.Bx3wivl8.js} +664 -649
- package/dist/chunks/{filter-bar.u3zmwRsM.js.map → filter-bar.Bx3wivl8.js.map} +1 -1
- package/dist/chunks/{get-date-locale.BN8xEjY0.js → get-date-locale.CAyOIbcp.js} +288 -649
- package/dist/chunks/get-date-locale.CAyOIbcp.js.map +1 -0
- package/dist/chunks/{header-with-views.piXHBTLd.js → header-with-views.B6mwBJjk.js} +13 -13
- package/dist/chunks/{header-with-views.piXHBTLd.js.map → header-with-views.B6mwBJjk.js.map} +1 -1
- package/dist/chunks/{header.Cb644uAi.js → header.hTMmMN8n.js} +25 -24
- package/dist/chunks/{header.Cb644uAi.js.map → header.hTMmMN8n.js.map} +1 -1
- package/dist/chunks/index.BrH1t1iu.js +407 -0
- package/dist/chunks/index.BrH1t1iu.js.map +1 -0
- package/dist/chunks/info-icon.CYOXx8CL.js +37 -0
- package/dist/chunks/info-icon.CYOXx8CL.js.map +1 -0
- package/dist/chunks/input-field-password.B8qWGzaB.js +252 -0
- package/dist/chunks/input-field-password.B8qWGzaB.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.pnq9LO1V.js → input-field-phone-number.Bi4TJhbX.js} +3 -3
- package/dist/chunks/{input-field-phone-number.pnq9LO1V.js.map → input-field-phone-number.Bi4TJhbX.js.map} +1 -1
- package/dist/chunks/{input-field.CloLEXr_.js → input-field.L5bWjTpB.js} +3 -3
- package/dist/chunks/{input-field.CloLEXr_.js.map → input-field.L5bWjTpB.js.map} +1 -1
- package/dist/chunks/{pagination.1XBgTs6T.js → pagination.CW_1yX5C.js} +115 -115
- package/dist/chunks/pagination.CW_1yX5C.js.map +1 -0
- package/dist/chunks/{radio-group.CtPG_iiI.js → radio-group.4_KKjvAm.js} +3 -3
- package/dist/chunks/{radio-group.CtPG_iiI.js.map → radio-group.4_KKjvAm.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.CLxVaskq.js → rich-text-editor.BpaFd2-y.js} +3 -3
- package/dist/chunks/{rich-text-editor.CLxVaskq.js.map → rich-text-editor.BpaFd2-y.js.map} +1 -1
- package/dist/chunks/{search-bar.BIVcXNZZ.js → search-bar.5JHI6li0.js} +3 -3
- package/dist/chunks/{search-bar.BIVcXNZZ.js.map → search-bar.5JHI6li0.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CR5uIx-H.js → secondary-nav.D4hrWvf7.js} +2 -2
- package/dist/chunks/{secondary-nav.CR5uIx-H.js.map → secondary-nav.D4hrWvf7.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CoqBRUT8.js → selection-card-group.0o5T4tab.js} +3 -3
- package/dist/chunks/{selection-card-group.CoqBRUT8.js.map → selection-card-group.0o5T4tab.js.map} +1 -1
- package/dist/chunks/step.DMMofD4B.js +217 -0
- package/dist/chunks/step.DMMofD4B.js.map +1 -0
- package/dist/chunks/{structured-list-item.tox2Kcb6.js → structured-list-item.Bnn6-Z3q.js} +3 -3
- package/dist/chunks/{structured-list-item.tox2Kcb6.js.map → structured-list-item.Bnn6-Z3q.js.map} +1 -1
- package/dist/chunks/summary-grid.types.Cwri2Y3T.js +337 -0
- package/dist/chunks/summary-grid.types.Cwri2Y3T.js.map +1 -0
- package/dist/chunks/tab.BhWPBxcB.js +192 -0
- package/dist/chunks/tab.BhWPBxcB.js.map +1 -0
- package/dist/chunks/{tabs.keys.Bc2pSKRw.js → tabs.keys.Cb4Vw5Jh.js} +3 -3
- package/dist/chunks/{tabs.keys.Bc2pSKRw.js.map → tabs.keys.Cb4Vw5Jh.js.map} +1 -1
- package/dist/chunks/{textarea.BPeDUAPL.js → textarea.RAU710Uw.js} +83 -80
- package/dist/chunks/textarea.RAU710Uw.js.map +1 -0
- package/dist/chunks/{timeline-item.CS9ZDOsm.js → timeline-item.DK2d00rt.js} +10 -11
- package/dist/chunks/timeline-item.DK2d00rt.js.map +1 -0
- package/dist/chunks/use-cached-selected-values.CusB5KBl.js +1320 -0
- package/dist/chunks/use-cached-selected-values.CusB5KBl.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +34 -34
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +6 -6
- package/dist/pagination.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +1 -0
- package/dist/styles/bento-light.css +1 -0
- package/dist/styles/bento.css +1 -0
- package/dist/styles/legacy.css +1 -0
- package/dist/styles/styleguide.css +1 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/web-types.json +197 -79
- package/package.json +7 -6
- package/dist/assets/tabs.css +0 -1
- package/dist/chunks/action-bar.DHdrZtmW.js.map +0 -1
- package/dist/chunks/button-actions-with-menu.CYkEoiee.js +0 -166
- package/dist/chunks/button-actions-with-menu.CYkEoiee.js.map +0 -1
- package/dist/chunks/calendar.DbTC35rM.js +0 -1167
- package/dist/chunks/calendar.DbTC35rM.js.map +0 -1
- package/dist/chunks/copy.CXeLbvUP.js +0 -129
- package/dist/chunks/copy.CXeLbvUP.js.map +0 -1
- package/dist/chunks/data-grid-template.DtFRjaR8.js.map +0 -1
- package/dist/chunks/date.dYFFEunA.js +0 -987
- package/dist/chunks/date.dYFFEunA.js.map +0 -1
- package/dist/chunks/dropdown.9xELPCKZ.js.map +0 -1
- package/dist/chunks/file-uploader.DyjdNLOa.js.map +0 -1
- package/dist/chunks/get-date-locale.BN8xEjY0.js.map +0 -1
- package/dist/chunks/index.BDuTpjD8.js +0 -40
- package/dist/chunks/index.BDuTpjD8.js.map +0 -1
- package/dist/chunks/index.DD7TppDb.js +0 -10
- package/dist/chunks/index.DD7TppDb.js.map +0 -1
- package/dist/chunks/info-icon.B9aTl1nU.js +0 -41
- package/dist/chunks/info-icon.B9aTl1nU.js.map +0 -1
- package/dist/chunks/input-field-password.CH6pc2CI.js +0 -252
- package/dist/chunks/input-field-password.CH6pc2CI.js.map +0 -1
- package/dist/chunks/pagination.1XBgTs6T.js.map +0 -1
- package/dist/chunks/step.dNTg2rtW.js +0 -217
- package/dist/chunks/step.dNTg2rtW.js.map +0 -1
- package/dist/chunks/summary-grid.types.CkUIw703.js +0 -301
- package/dist/chunks/summary-grid.types.CkUIw703.js.map +0 -1
- package/dist/chunks/tabs.Dx6teJGW.js +0 -205
- package/dist/chunks/tabs.Dx6teJGW.js.map +0 -1
- package/dist/chunks/textarea.BPeDUAPL.js.map +0 -1
- package/dist/chunks/timeline-item.CS9ZDOsm.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.C1CeSurp.js +0 -1271
- package/dist/chunks/use-cached-selected-values.C1CeSurp.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-section.Bz54Z6Hh.js","sources":["../../src/templates/dashboard-template/dashboard-template.vue","../../src/templates/dashboard-template/components/dashboard-section/dashboard-section.vue"],"sourcesContent":["<template>\n <main class=\"b-dashboard-template\">\n <bento-header v-bind=\"header\" variant=\"page\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div class=\"b-dashboard-template__top-section\" :class=\"dashboardTopSectionConditionalClasses\">\n <div\n v-if=\"hasSlot('filters')\"\n ref=\"filtersRef\"\n class=\"b-dashboard-template__filters\"\n :class=\"dashboardFiltersConditionalClasses\"\n data-testid=\"filters\"\n >\n <slot name=\"filters\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n :sticky-options=\"computedTabsOptions\"\n data-testid=\"tabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <div class=\"b-dashboard-template__container b-dashboard-template__container--tabs\">\n <slot :name=\"`tab-${index + 1}`\" />\n </div>\n </bento-tab>\n </bento-tabs>\n <div v-else class=\"b-dashboard-template__container\">\n <slot />\n </div>\n </div>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onUnmounted, ref, useSlots, watch } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useWindowScroll } from '@vueuse/core';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader, BentoDashboardTemplateTabs } from './dashboard-template.types';\n\n const props = defineProps({\n header: null,\n tabs: { default: undefined },\n stickyTabs: { type: Boolean, default: false },\n stickyFilters: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const tabsRef = ref<InstanceType<typeof BentoTabs>>();\n const filtersRef = ref<HTMLDivElement>(null);\n const isFiltersPinned = ref(false);\n let filtersElementObserver: ResizeObserver | null = null;\n const tabsPosition = ref(0);\n\n const hasStickyFilters = computed(() => filtersRef.value && props.stickyFilters);\n const hasStickyTabs = computed(() => tabsRef.value && props.stickyTabs);\n\n const dashboardFiltersConditionalClasses = computed(() => ({\n 'b-dashboard-template__filters--sticky': props.stickyFilters,\n 'b-dashboard-template__filters--show-border':\n hasStickyFilters.value && !hasStickyTabs.value && isFiltersPinned.value,\n }));\n\n const dashboardTopSectionConditionalClasses = computed(() => ({\n 'b-dashboard-template__top-section--sticky': props.stickyTabs || props.stickyFilters,\n }));\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const computedTabsOptions = computed(() => (tabsPosition.value ? { top: tabsPosition.value } : undefined));\n\n const { y } = useWindowScroll();\n\n watch(\n () => filtersRef.value,\n () => {\n if (!filtersElementObserver && filtersRef.value) {\n filtersElementObserver = observeSizeOfElement(filtersRef.value, () => {\n if (filtersRef.value && hasStickyTabs.value) {\n const filtersHeight = filtersRef.value.offsetHeight;\n tabsPosition.value = hasStickyFilters.value ? filtersHeight : 0;\n }\n });\n }\n }\n );\n\n watch(\n () => y.value,\n () => {\n if (hasStickyFilters.value) {\n isFiltersPinned.value = filtersRef.value?.getBoundingClientRect().top === 0;\n }\n }\n );\n\n onUnmounted(() => {\n filtersElementObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard template is a full page template used to visualize data on pages such as data dashboards and reports.\n *\n * @example\n * import { BentoDashboardTemplate, BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardTemplate, BentoDashboardSection },\n * template: `\n * <bento-dashboard-template :header=\"{ title: 'Dashboard'}\" :tabs=\"tabs: [{ title: 'Tab 1' }, { title: 'Tab 2' }]\" sticky-tabs sticky-filters>\n * <template #tab-1>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * <template #controls>\n * // Add your controls here\n * </template>\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * <template #tab-2>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * </bento-dashboard-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-template.scss\" />\n","<template>\n <div class=\"b-dashboard-section\" :class=\"conditionalClasses\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div v-if=\"hasSlot('controls')\" class=\"b-dashboard-section__controls\">\n <slot name=\"controls\"></slot>\n </div>\n <div v-if=\"!hasSlot('content-col-1') && !hasSlot('content-col-2')\" class=\"b-dashboard-section__content\">\n <slot name=\"default\"></slot>\n </div>\n <div v-else class=\"b-dashboard-section__columns\">\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-1\"></slot></div>\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-2\"></slot></div>\n </div>\n <bento-divider class=\"b-dashboard-section__divider\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoDivider } from '@/components/divider';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader } from '../../dashboard-template.types';\n\n const props = defineProps({\n header: null,\n halfWidth: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const conditionalClasses = computed(() => ({\n 'b-dashboard-section--half-width': props.halfWidth,\n }));\n\n onMounted(() => {\n if ((hasSlot('content-col-1') || hasSlot('content-col-2')) && props.halfWidth) {\n throw new Error('`content-col-1` and `content-col-2` cannot be used with half-width prop');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard section is subcomponent of Dashboard template meant to be used to create the different sections within the page.\n *\n * @example\n * import { BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardSection },\n * template: `\n * <bento-dashboard-section :header=\"{ title: 'Section' }\" half-width>\n * <template #controls>\n * // Add your controls here\n * </template>\n * // You can render content with two cols\n * <template #content-col-1>\n * // Add your content here\n * </template>\n * <template #content-col-2>\n * // Add your content here\n * </template>\n * // Or you can render full width content by using default slot\n * // Add your content here\n * </bento-dashboard-section>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-section.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","filtersRef","isFiltersPinned","filtersElementObserver","tabsPosition","hasStickyFilters","computed","props","hasStickyTabs","dashboardFiltersConditionalClasses","dashboardTopSectionConditionalClasses","tabsSlots","el","getTabTitle","index","_b","_a","computedTabsOptions","y","useWindowScroll","watch","observeSizeOfElement","filtersHeight","onUnmounted","__default__","conditionalClasses","onMounted"],"mappings":";;;;;;;;;AA6II,MAAAA,IAAA,CAAA;;;;;;;;;;iBAtFAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,EAAA;AACA,QAAAG,IAAA;AACA,UAAAC,IAAAJ,EAAA,CAAA,GAEAK,IAAAC,EAAA,MAAAL,EAAA,SAAAM,EAAA,aAAA,GACAC,IAAAF,EAAA,MAAAP,EAAA,SAAAQ,EAAA,UAAA,GAEAE,IAAAH,EAAA,OAAA;AAAA,MAA2D,yCAAAC,EAAA;AAAA,MACR,8CAAAF,EAAA,SAAA,CAAAG,EAAA,SAAAN,EAAA;AAAA,IAEuB,EAAA,GAG1EQ,IAAAJ,EAAA,OAAA;AAAA,MAA8D,6CAAAC,EAAA,cAAAA,EAAA;AAAA,IACa,EAAA,GAG3EI,IAAAL,EAAA,MAAA,OAAA,KAAAX,CAAA,EAAA,OAAA,CAAAiB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;;AAAA,eAAAC,KAAAC,IAAAT,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAS,EAAAF,OAAA,gBAAAC,EAAA,UAAA,OAAAD,IAAA,CAAA;AAAA,OAEAG,IAAAX,EAAA,MAAAF,EAAA,QAAA,EAAA,KAAAA,EAAA,MAAA,IAAA,MAAA,GAEA,EAAA,GAAAc,EAAA,IAAAC,EAAA;AAEA,WAAAC;AAAA,MAAA,MAAAnB,EAAA;AAAA,MACqB,MAAA;AAEb,QAAA,CAAAE,KAAAF,EAAA,UACIE,IAAAkB,EAAApB,EAAA,OAAA,MAAA;AACI,cAAAA,EAAA,SAAAO,EAAA,OAAA;AACI,kBAAAc,IAAArB,EAAA,MAAA;AACA,YAAAG,EAAA,QAAAC,EAAA,QAAAiB,IAAA;AAAA,UAA8D;AAAA,QAClE,CAAA;AAAA,MAER;AAAA,IACJ,GAGJF;AAAA,MAAA,MAAAF,EAAA;AAAA,MACY,MAAA;;AAEJ,QAAAb,EAAA,UACIH,EAAA,UAAAc,IAAAf,EAAA,UAAA,gBAAAe,EAAA,wBAAA,SAAA;AAAA,MACJ;AAAA,IACJ,GAGJO,EAAA,MAAA;AACI,MAAApB,KAAA,QAAAA,EAAA;AAAA,IAAmC,CAAA;;;;;;;;;;;;;;;;;;qBCnCvCqB,IAAA,CAAA;;;;;;;;iBAzCA7B,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEA8B,IAAAnB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;AAG7C,WAAAmB,EAAA,MAAA;AACI,WAAA7B,EAAA,eAAA,KAAAA,EAAA,eAAA,MAAAU,EAAA;AACI,cAAA,IAAA,MAAA,yEAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dashboard-section.CcEIwDqX.js","sources":["../../src/templates/dashboard-template/dashboard-template.vue","../../src/templates/dashboard-template/components/dashboard-section/dashboard-section.vue"],"sourcesContent":["<template>\n <main class=\"b-dashboard-template\">\n <bento-header v-bind=\"header\" variant=\"page\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div class=\"b-dashboard-template__top-section\" :class=\"dashboardTopSectionConditionalClasses\">\n <div\n v-if=\"hasSlot('filters')\"\n ref=\"filtersRef\"\n class=\"b-dashboard-template__filters\"\n :class=\"dashboardFiltersConditionalClasses\"\n data-testid=\"filters\"\n >\n <slot name=\"filters\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n :sticky-options=\"computedTabsOptions\"\n data-testid=\"tabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <div class=\"b-dashboard-template__container b-dashboard-template__container--tabs\">\n <slot :name=\"`tab-${index + 1}`\" />\n </div>\n </bento-tab>\n </bento-tabs>\n <div v-else class=\"b-dashboard-template__container\">\n <slot />\n </div>\n </div>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onUnmounted, ref, useSlots, watch } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useWindowScroll } from '@vueuse/core';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader, BentoDashboardTemplateTabs } from './dashboard-template.types';\n\n const props = defineProps({\n header: null,\n tabs: { default: undefined },\n stickyTabs: { type: Boolean, default: false },\n stickyFilters: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const tabsRef = ref<InstanceType<typeof BentoTabs>>();\n const filtersRef = ref<HTMLDivElement>(null);\n const isFiltersPinned = ref(false);\n let filtersElementObserver: ResizeObserver | null = null;\n const tabsPosition = ref(0);\n\n const hasStickyFilters = computed(() => filtersRef.value && props.stickyFilters);\n const hasStickyTabs = computed(() => tabsRef.value && props.stickyTabs);\n\n const dashboardFiltersConditionalClasses = computed(() => ({\n 'b-dashboard-template__filters--sticky': props.stickyFilters,\n 'b-dashboard-template__filters--show-border':\n hasStickyFilters.value && !hasStickyTabs.value && isFiltersPinned.value,\n }));\n\n const dashboardTopSectionConditionalClasses = computed(() => ({\n 'b-dashboard-template__top-section--sticky': props.stickyTabs || props.stickyFilters,\n }));\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const computedTabsOptions = computed(() => (tabsPosition.value ? { top: tabsPosition.value } : undefined));\n\n const { y } = useWindowScroll();\n\n watch(\n () => filtersRef.value,\n () => {\n if (!filtersElementObserver && filtersRef.value) {\n filtersElementObserver = observeSizeOfElement(filtersRef.value, () => {\n if (filtersRef.value && hasStickyTabs.value) {\n const filtersHeight = filtersRef.value.offsetHeight;\n tabsPosition.value = hasStickyFilters.value ? filtersHeight : 0;\n }\n });\n }\n }\n );\n\n watch(\n () => y.value,\n () => {\n if (hasStickyFilters.value) {\n isFiltersPinned.value = filtersRef.value?.getBoundingClientRect().top === 0;\n }\n }\n );\n\n onUnmounted(() => {\n filtersElementObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard template is a full page template used to visualize data on pages such as data dashboards and reports.\n *\n * @example\n * import { BentoDashboardTemplate, BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardTemplate, BentoDashboardSection },\n * template: `\n * <bento-dashboard-template :header=\"{ title: 'Dashboard'}\" :tabs=\"tabs: [{ title: 'Tab 1' }, { title: 'Tab 2' }]\" sticky-tabs sticky-filters>\n * <template #tab-1>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * <template #controls>\n * // Add your controls here\n * </template>\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * <template #tab-2>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * </bento-dashboard-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-template.scss\" />\n","<template>\n <div class=\"b-dashboard-section\" :class=\"conditionalClasses\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div v-if=\"hasSlot('controls')\" class=\"b-dashboard-section__controls\">\n <slot name=\"controls\"></slot>\n </div>\n <div v-if=\"!hasSlot('content-col-1') && !hasSlot('content-col-2')\" class=\"b-dashboard-section__content\">\n <slot name=\"default\"></slot>\n </div>\n <div v-else class=\"b-dashboard-section__columns\">\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-1\"></slot></div>\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-2\"></slot></div>\n </div>\n <bento-divider class=\"b-dashboard-section__divider\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoDivider } from '@/components/divider';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader } from '../../dashboard-template.types';\n\n const props = defineProps({\n header: null,\n halfWidth: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const conditionalClasses = computed(() => ({\n 'b-dashboard-section--half-width': props.halfWidth,\n }));\n\n onMounted(() => {\n if ((hasSlot('content-col-1') || hasSlot('content-col-2')) && props.halfWidth) {\n throw new Error('`content-col-1` and `content-col-2` cannot be used with half-width prop');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard section is subcomponent of Dashboard template meant to be used to create the different sections within the page.\n *\n * @example\n * import { BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardSection },\n * template: `\n * <bento-dashboard-section :header=\"{ title: 'Section' }\" half-width>\n * <template #controls>\n * // Add your controls here\n * </template>\n * // You can render content with two cols\n * <template #content-col-1>\n * // Add your content here\n * </template>\n * <template #content-col-2>\n * // Add your content here\n * </template>\n * // Or you can render full width content by using default slot\n * // Add your content here\n * </bento-dashboard-section>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-section.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","filtersRef","isFiltersPinned","filtersElementObserver","tabsPosition","hasStickyFilters","computed","props","hasStickyTabs","dashboardFiltersConditionalClasses","dashboardTopSectionConditionalClasses","tabsSlots","el","getTabTitle","index","_b","_a","computedTabsOptions","y","useWindowScroll","watch","observeSizeOfElement","filtersHeight","onUnmounted","__default__","conditionalClasses","onMounted"],"mappings":";;;;;;;;;AA6II,MAAAA,IAAA,CAAA;;;;;;;;;;iBAtFAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,EAAA;AACA,QAAAG,IAAA;AACA,UAAAC,IAAAJ,EAAA,CAAA,GAEAK,IAAAC,EAAA,MAAAL,EAAA,SAAAM,EAAA,aAAA,GACAC,IAAAF,EAAA,MAAAP,EAAA,SAAAQ,EAAA,UAAA,GAEAE,IAAAH,EAAA,OAAA;AAAA,MAA2D,yCAAAC,EAAA;AAAA,MACR,8CAAAF,EAAA,SAAA,CAAAG,EAAA,SAAAN,EAAA;AAAA,IAEuB,EAAA,GAG1EQ,IAAAJ,EAAA,OAAA;AAAA,MAA8D,6CAAAC,EAAA,cAAAA,EAAA;AAAA,IACa,EAAA,GAG3EI,IAAAL,EAAA,MAAA,OAAA,KAAAX,CAAA,EAAA,OAAA,CAAAiB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;;AAAA,eAAAC,KAAAC,IAAAT,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAS,EAAAF,OAAA,gBAAAC,EAAA,UAAA,OAAAD,IAAA,CAAA;AAAA,OAEAG,IAAAX,EAAA,MAAAF,EAAA,QAAA,EAAA,KAAAA,EAAA,MAAA,IAAA,MAAA,GAEA,EAAA,GAAAc,EAAA,IAAAC,EAAA;AAEA,WAAAC;AAAA,MAAA,MAAAnB,EAAA;AAAA,MACqB,MAAA;AAEb,QAAA,CAAAE,KAAAF,EAAA,UACIE,IAAAkB,EAAApB,EAAA,OAAA,MAAA;AACI,cAAAA,EAAA,SAAAO,EAAA,OAAA;AACI,kBAAAc,IAAArB,EAAA,MAAA;AACA,YAAAG,EAAA,QAAAC,EAAA,QAAAiB,IAAA;AAAA,UAA8D;AAAA,QAClE,CAAA;AAAA,MAER;AAAA,IACJ,GAGJF;AAAA,MAAA,MAAAF,EAAA;AAAA,MACY,MAAA;;AAEJ,QAAAb,EAAA,UACIH,EAAA,UAAAc,IAAAf,EAAA,UAAA,gBAAAe,EAAA,wBAAA,SAAA;AAAA,MACJ;AAAA,IACJ,GAGJO,EAAA,MAAA;AACI,MAAApB,KAAA,QAAAA,EAAA;AAAA,IAAmC,CAAA;;;;;;;;;;;;;;;;;;qBCnCvCqB,IAAA,CAAA;;;;;;;;iBAzCA7B,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEA8B,IAAAnB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;AAG7C,WAAAmB,EAAA,MAAA;AACI,WAAA7B,EAAA,eAAA,KAAAA,EAAA,eAAA,MAAAU,EAAA;AACI,cAAA,IAAA,MAAA,yEAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as R, useSlots as S, ref as d, computed as i, provide as I, toRef as b } from "vue";
|
|
2
|
-
import { B } from "./header.
|
|
3
|
-
import { B
|
|
4
|
-
import {
|
|
2
|
+
import { B as h } from "./header.hTMmMN8n.js";
|
|
3
|
+
import { B } from "./inspector.BI28vKQz.js";
|
|
4
|
+
import { B as x, a as A } from "./tab.BhWPBxcB.js";
|
|
5
5
|
import { u as E } from "./use-has-slot.C9lQZ6nz.js";
|
|
6
6
|
import { D } from "./data-grid-template.keys.2_AkxuNT.js";
|
|
7
7
|
import { n as G } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
@@ -15,7 +15,7 @@ const H = {}, O = /* @__PURE__ */ R({
|
|
|
15
15
|
*/
|
|
16
16
|
header: {
|
|
17
17
|
type: Object,
|
|
18
|
-
|
|
18
|
+
default: void 0
|
|
19
19
|
},
|
|
20
20
|
/**
|
|
21
21
|
* All the tab properties that can be set on the inner tab components.
|
|
@@ -49,8 +49,8 @@ const H = {}, O = /* @__PURE__ */ R({
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
emits: ["update:tabs", "update:is-open:inspector", "update:active-page:inspector", "expand:inspector"],
|
|
52
|
-
setup(
|
|
53
|
-
const o =
|
|
52
|
+
setup(l, { emit: t }) {
|
|
53
|
+
const o = l, n = S(), p = E(n), s = d(null), r = d(null), _ = d(null), m = i(() => ({
|
|
54
54
|
"b-data-grid-template__additional-content--sticky": o.stickyAdditionalContent
|
|
55
55
|
})), T = i(() => ({
|
|
56
56
|
title: "",
|
|
@@ -80,15 +80,17 @@ const H = {}, O = /* @__PURE__ */ R({
|
|
|
80
80
|
additionalContentSlotRef: r
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
-
return I(D, f), { __sfc: !0, props: o, slots: n, hasSlot:
|
|
83
|
+
return I(D, f), { __sfc: !0, props: o, slots: n, hasSlot: p, emit: t, tabsRef: s, additionalContentRef: r, inspectorRef: _, additionalContentConditionalClasses: m, computedInspectorProps: T, computedStickyAdditionalContentHeight: y, computedTabsRef: u, tabsSlots: C, inspectorEvents: v, emitTabs: k, getTabTitle: g, registerDatagridInDataGridTemplate: f, BentoHeader: h, BentoInspector: B, BentoTab: A, BentoTabs: x };
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
var j = function() {
|
|
87
87
|
var t = this, o = t._self._c, n = t._self._setupProxy;
|
|
88
88
|
return o("main", { staticClass: "b-data-grid-template" }, [o(n.BentoInspector, t._g(t._b({ ref: "inspectorRef", scopedSlots: t._u([{ key: "page", fn: function() {
|
|
89
|
-
return [o(
|
|
90
|
-
return [t.
|
|
91
|
-
|
|
89
|
+
return [o("div", { staticClass: "b-data-grid-template__header" }, [t._t("header", function() {
|
|
90
|
+
return [o(n.BentoHeader, t._b({ attrs: { variant: "component" }, scopedSlots: t._u([n.hasSlot("infoIconTooltipContent") ? { key: "infoIconTooltipContent", fn: function() {
|
|
91
|
+
return [t._t("infoIconTooltipContent")];
|
|
92
|
+
}, proxy: !0 } : null], null, !0) }, "bento-header", t.header, !1))];
|
|
93
|
+
})], 2), n.hasSlot("additionalContent") ? o("div", { ref: "additionalContentRef", staticClass: "b-data-grid-template__additional-content", class: n.additionalContentConditionalClasses }, [t._t("additionalContent")], 2) : t._e(), n.tabsSlots.length > 1 ? o(n.BentoTabs, { ref: "tabsRef", attrs: { "active-tab-index": t.tabs.activeTabIndex, sticky: t.stickyTabs, "sticky-options": t.stickyAdditionalContent ? { top: n.computedStickyAdditionalContentHeight } : null }, on: { "update:active-tab-index": n.emitTabs } }, t._l(n.tabsSlots, function(p, s) {
|
|
92
94
|
return o(n.BentoTab, { key: `tab-${s}`, attrs: { title: n.getTabTitle(s) } }, [t._t(`tab-${s + 1}`)], 2);
|
|
93
95
|
}), 1) : t._t("default")];
|
|
94
96
|
}, proxy: !0 }, { key: "content", fn: function() {
|
|
@@ -100,10 +102,10 @@ var j = function() {
|
|
|
100
102
|
P,
|
|
101
103
|
!1,
|
|
102
104
|
null,
|
|
103
|
-
"
|
|
105
|
+
"e1b91496"
|
|
104
106
|
);
|
|
105
|
-
const
|
|
107
|
+
const q = $.exports;
|
|
106
108
|
export {
|
|
107
|
-
|
|
109
|
+
q as d
|
|
108
110
|
};
|
|
109
|
-
//# sourceMappingURL=data-grid-template.
|
|
111
|
+
//# sourceMappingURL=data-grid-template.DJQcVuPs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-template.DJQcVuPs.js","sources":["../../src/templates/data-grid-template/data-grid-template.vue"],"sourcesContent":["<template>\n <main class=\"b-data-grid-template\">\n <bento-inspector v-bind=\"computedInspectorProps\" ref=\"inspectorRef\" v-on=\"inspectorEvents\">\n <template #page>\n <div class=\"b-data-grid-template__header\">\n <slot name=\"header\">\n <bento-header v-bind=\"header\" variant=\"component\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n </slot>\n </div>\n\n <div\n v-if=\"hasSlot('additionalContent')\"\n ref=\"additionalContentRef\"\n class=\"b-data-grid-template__additional-content\"\n :class=\"additionalContentConditionalClasses\"\n >\n <slot name=\"additionalContent\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n :sticky-options=\"stickyAdditionalContent ? { top: computedStickyAdditionalContentHeight } : null\"\n @update:active-tab-index=\"emitTabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <slot :name=\"`tab-${index + 1}`\" />\n </bento-tab>\n </bento-tabs>\n\n <slot v-else />\n </template>\n\n <template #content>\n <slot name=\"inspector-content\" />\n </template>\n </bento-inspector>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoHeader } from '@/components/header';\n import { BentoInspector } from '@/components/inspector';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useHasSlot } from '@/composables';\n import { computed, PropType, provide, Ref, ref, toRef, UnwrapRef, useSlots } from 'vue';\n import { DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY } from './data-grid-template.keys';\n import type {\n BentoDataGridTemplateDataGrid,\n BentoDataGridTemplateHeader,\n BentoDataGridTemplateInspector,\n BentoDataGridTemplateTabs,\n } from './data-grid-template.types';\n\n const props = defineProps({\n /**\n * The header that goes to the top of the template\n */\n header: {\n type: Object as PropType<BentoDataGridTemplateHeader>,\n default: undefined,\n },\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currenly active tab index.\n * - tabs.tabs: an array of BentoTab props, the first item in the array will affect the `tab-1` slot and so on.\n */\n tabs: {\n type: Object as PropType<BentoDataGridTemplateTabs>,\n default: undefined,\n },\n\n /**\n * Renders the additional content slot with a sticky positioning\n */\n stickyAdditionalContent: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs: {\n type: Boolean,\n default: false,\n },\n\n /**\n * All the inspector properties that can be set on the inner inspector component.\n */\n inspector: {\n type: Object as PropType<BentoDataGridTemplateInspector>,\n default: undefined,\n },\n });\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"update:tabs\", \"update:is-open:inspector\", \"update:active-page:inspector\", \"expand:inspector\"]);\n\n const tabsRef = ref(null);\n const additionalContentRef = ref(null);\n const inspectorRef = ref(null);\n\n const additionalContentConditionalClasses = computed(() => ({\n 'b-data-grid-template__additional-content--sticky': props.stickyAdditionalContent,\n }));\n\n const computedInspectorProps = computed(() => ({\n title: '',\n ...props.inspector,\n }));\n\n const computedStickyAdditionalContentHeight = computed(() => additionalContentRef?.value?.offsetHeight);\n\n const computedTabsRef = computed(() => tabsRef.value?.$refs?.tablistwrapper);\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const inspectorEvents = computed(() => ({\n 'update:is-open': (value: boolean) => emit('update:is-open:inspector', value),\n 'update:active-page': (value: string) => emit('update:active-page:inspector', value),\n expand: (value: boolean) => emit('expand:inspector', value),\n }));\n\n const emitTabs = (newActiveTabIndex: number) => {\n emit('update:tabs', { ...props.tabs, activeTabIndex: newActiveTabIndex });\n };\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const registerDatagridInDataGridTemplate: BentoDataGridTemplateDataGrid = () => {\n const isDataGridTemplate = true;\n const stickyTabs: Ref<boolean> = toRef(props, 'stickyTabs');\n const stickyAdditionalContent: Ref<boolean> = toRef(props, 'stickyAdditionalContent');\n const tabsRef: Ref<UnwrapRef<HTMLDivElement>> | null = computedTabsRef;\n const additionalContentSlotRef: Ref<UnwrapRef<HTMLDivElement>> | null = additionalContentRef;\n\n // return values to the Tab component\n return {\n isDataGridTemplate,\n stickyTabs,\n tabsRef,\n stickyAdditionalContent,\n additionalContentSlotRef,\n };\n };\n\n provide(DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY, registerDatagridInDataGridTemplate);\n</script>\n\n<script lang=\"ts\">\n /**\n * The data grid template is a restrictive, full-page data grid used to display information from a data set.\n * You can use this data grid template when your user needs a clear overview of data or a way of organizing and analyzing the data in their own way.\n * This data grid template shouldn’t be confused with the data grid.\n *\n * @example\n * import { BentoDataGridTemplate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDataGridTemplate },\n * template: `\n * // If you want to display multiple data grids in the same page (they will be rendered in different tabs)\n * <bento-data-grid-template>\n * <template #tab-1><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 1\"/></template>\n * <template #tab-2><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 2\"/></template>\n * </bento-data-grid-template>\n * // Alternatively, if you only want to pass one data grid to your template:\n * <bento-data-grid-template>\n * <template #default><bento-data-grid v-bind=\"your-data-grid-args\"/></template>\n * </bento-data-grid-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./data-grid-template.scss\" />\n"],"names":["__default__","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","additionalContentRef","inspectorRef","additionalContentConditionalClasses","computed","props","computedInspectorProps","computedStickyAdditionalContentHeight","_a","computedTabsRef","_b","tabsSlots","el","inspectorEvents","value","emit","emitTabs","newActiveTabIndex","getTabTitle","index","registerDatagridInDataGridTemplate","stickyTabs","toRef","stickyAdditionalContent","provide","DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY"],"mappings":";;;;;;;;AAuLI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAhFAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAIAI,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,IAAA,GAEAG,IAAAC,EAAA,OAAA;AAAA,MAA4D,oDAAAC,EAAA;AAAA,IACE,EAAA,GAG9DC,IAAAF,EAAA,OAAA;AAAA,MAA+C,OAAA;AAAA,MACpC,GAAAC,EAAA;AAAA,IACE,EAAA,GAGbE,IAAAH,EAAA,MAAA;;AAAA,cAAAI,IAAAP,KAAA,gBAAAA,EAAA,UAAA,gBAAAO,EAAA;AAAA,KAAA,GAEAC,IAAAL,EAAA,MAAA;;AAAA,cAAAM,KAAAF,IAAAT,EAAA,UAAA,gBAAAS,EAAA,UAAA,gBAAAE,EAAA;AAAA,KAAA,GAEAC,IAAAP,EAAA,MAAA,OAAA,KAAAT,CAAA,EAAA,OAAA,CAAAiB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAAT,EAAA,OAAA;AAAA,MAAwC,kBAAA,CAAAU,MAAAC,EAAA,4BAAAD,CAAA;AAAA,MACwC,sBAAA,CAAAA,MAAAC,EAAA,gCAAAD,CAAA;AAAA,MACO,QAAA,CAAAA,MAAAC,EAAA,oBAAAD,CAAA;AAAA,IACzB,EAAA,GAG9DE,IAAA,CAAAC,MAAA;AACI,MAAAF,EAAA,eAAA,EAAA,GAAAV,EAAA,MAAA,gBAAAY,EAAA,CAAA;AAAA,IAAwE,GAG5EC,IAAA,CAAAC,MAAA;;AAAA,eAAAT,KAAAF,IAAAH,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAG,EAAAW,OAAA,gBAAAT,EAAA,UAAA,OAAAS,IAAA,CAAA;AAAA,OAEAC,IAAA,MAAA;AAEI,YAAAC,IAAAC,EAAAjB,GAAA,YAAA,GACAkB,IAAAD,EAAAjB,GAAA,yBAAA;AAKA,aAAA;AAAA,QAAO;AAAA,QACH,YAAAgB;AAAA,QACA,SANJZ;AAAA,QAOI,yBAAAc;AAAA,QACA,0BAPJtB;AAAA,MAQI;AAAA,IACJ;AAGJ,WAAAuB,EAAAC,GAAAL,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,38 +10,38 @@ import { E as oe, B as An, a as On, T as Tn } from "./tooltip.wQsyAwkC.js";
|
|
|
10
10
|
import { B as Nn } from "./dashed-underline.CEaAmjDa.js";
|
|
11
11
|
import { B as be, p as Ct } from "./typography.J1v_SPG3.js";
|
|
12
12
|
import { u as ce } from "./i18n.BQkEbtPM.js";
|
|
13
|
-
import { B as In } from "./action-bar.
|
|
14
|
-
import { B as Dn } from "./pagination.
|
|
15
|
-
import { B as
|
|
16
|
-
import { u as
|
|
13
|
+
import { B as In } from "./action-bar.C8zeHAJG.js";
|
|
14
|
+
import { B as Dn } from "./pagination.CW_1yX5C.js";
|
|
15
|
+
import { B as Pe } from "./loading-indicator.z8COalOc.js";
|
|
16
|
+
import { u as $e } from "./use-has-slot.C9lQZ6nz.js";
|
|
17
17
|
import { u as xn } from "./aria-label.CaUURpnB.js";
|
|
18
18
|
import { g as Fn } from "./get-slot-text.BQS5Olxm.js";
|
|
19
|
-
import { B as Te } from "./filter-bar.
|
|
19
|
+
import { B as Te } from "./filter-bar.Bx3wivl8.js";
|
|
20
20
|
import { B as Mn } from "./empty-state.mtXfb1BB.js";
|
|
21
|
-
import { E as Bn } from "./tabs.keys.
|
|
22
|
-
import { D as
|
|
21
|
+
import { E as Bn } from "./tabs.keys.Cb4Vw5Jh.js";
|
|
22
|
+
import { D as Pn } from "./data-grid-template.keys.2_AkxuNT.js";
|
|
23
23
|
import { o as Ue } from "./resize.Bqks3WUm.js";
|
|
24
24
|
import "./index.Cl4_42j5.js";
|
|
25
|
-
import { u as
|
|
25
|
+
import { u as $n } from "./use-expandable-content-height.GkjjbmPy.js";
|
|
26
26
|
import { g as De } from "./generate-uid.NJ8tVoha.js";
|
|
27
27
|
import { B as ht } from "./button.hF-nD1Og.js";
|
|
28
28
|
import { B as pt, O as Un, D as zn } from "./menu.BCD4FW54.js";
|
|
29
29
|
import { E as kn } from "./link.CXy_LoFI.js";
|
|
30
|
-
import { C as Wn } from "./copy.
|
|
31
|
-
import { B as wt } from "./checkbox.
|
|
30
|
+
import { C as Wn } from "./copy.CF8Fzu2Y.js";
|
|
31
|
+
import { B as wt } from "./checkbox.Bg5FM5Oa.js";
|
|
32
32
|
import { C as Gn } from "./chevron-down.eYtgv5ly.js";
|
|
33
33
|
import { C as Hn } from "./chevron-up.d8cwIlA_.js";
|
|
34
34
|
import { b as St } from "./focus-trap.C-wIQqpO.js";
|
|
35
35
|
import { B as ze } from "./toggle-button.DEVVvpkw.js";
|
|
36
36
|
import { e as Vn, d as Zn } from "./button-actions._OIvTdKt.js";
|
|
37
|
-
import { B as jn } from "./info-icon.
|
|
37
|
+
import { B as jn } from "./info-icon.CYOXx8CL.js";
|
|
38
38
|
import { a as Je, B as qn } from "./popover.B05xkQ4e.js";
|
|
39
39
|
import { A as Yn } from "./dialog-page.CLHZqQeU.js";
|
|
40
40
|
import { H as Kn, S as Xn } from "./show.B_mKPF6I.js";
|
|
41
41
|
import { l as Qe } from "./events.CMzGybJJ.js";
|
|
42
42
|
import { B as bt } from "./toggle.DyXL09-x.js";
|
|
43
|
-
import { B as Jn } from "./search-bar.
|
|
44
|
-
import { u as Qn } from "./dropdown.
|
|
43
|
+
import { B as Jn } from "./search-bar.5JHI6li0.js";
|
|
44
|
+
import { u as Qn } from "./dropdown.BWsU98dn.js";
|
|
45
45
|
import { S as es } from "./search.D53Ia3rC.js";
|
|
46
46
|
import { B as ts } from "./directive.Cbdox5VL.js";
|
|
47
47
|
import "../assets/data-grid.css";
|
|
@@ -711,7 +711,7 @@ const Fs = {
|
|
|
711
711
|
var Ms = function() {
|
|
712
712
|
var t = this, n = t._self._c;
|
|
713
713
|
return n("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? n("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), n("g", { attrs: { "clip-path": "url(#uia-ui-assets/icons-16-freeze__a" + t.uuid + ")" } }, [n("path", { attrs: { fill: "#001222", d: "M7.99989 14.0605L9.49989 15.5605L10.5605 14.4999L8.75 12.6893V10.9334L10.169 10.116L11.6861 10.9939L12.3501 13.4688L13.7988 13.0801L13.2488 11.0301L15.2988 10.4801L14.9101 9.03129L12.4363 9.695L10.9199 8.81745V7.18276L12.4365 6.3051L14.9101 6.96875L15.2988 5.51999L13.2488 4.96999L13.7988 2.91999L12.3501 2.53129L11.686 5.00635L10.1693 5.88407L8.75 5.06648L8.75 3.31043L10.5605 1.49989L9.49989 0.439226L7.99989 1.93923L6.49989 0.439226L5.43923 1.49989L7.25 3.31066V5.06639L5.83078 5.88392L4.31419 5.00626L3.65018 2.53129L2.20141 2.91998L2.384 3.60052L2.38063 3.60143L2.75032 4.97028L0.701408 5.51999L1.0901 6.96875L1.7708 6.78612L1.77173 6.78955L3.56437 6.30541L5.07992 7.18246L5.07992 8.81775L3.564 9.69502L1.0901 9.03129L0.701408 10.4801L2.75141 11.0301L2.20141 13.0801L3.65018 13.4687L4.31414 10.994L5.83106 10.1161L7.25 10.9335V12.6891L5.43923 14.4999L6.49989 15.5605L7.99989 14.0605ZM9.41992 7.18345V8.81644L7.99992 9.63441L6.57992 8.81644L6.57992 7.18345L7.99992 6.36548L9.41992 7.18345Z" } })]), n("defs", [n("clipPath", { attrs: { id: "uia-ui-assets/icons-16-freeze__a" + t.uuid } }, [n("rect", { attrs: { width: "16", height: "16", fill: "#fff", transform: "matrix(1 0 0 -1 0 16)" } })])])]);
|
|
714
|
-
}, Bs = [],
|
|
714
|
+
}, Bs = [], Ps = /* @__PURE__ */ G(
|
|
715
715
|
Fs,
|
|
716
716
|
Ms,
|
|
717
717
|
Bs,
|
|
@@ -719,9 +719,9 @@ var Ms = function() {
|
|
|
719
719
|
null,
|
|
720
720
|
null
|
|
721
721
|
);
|
|
722
|
-
const Et =
|
|
722
|
+
const Et = Ps.exports;
|
|
723
723
|
let it = 0;
|
|
724
|
-
const
|
|
724
|
+
const $s = {
|
|
725
725
|
beforeCreate() {
|
|
726
726
|
this.uuid = it.toString(), it += 1;
|
|
727
727
|
}
|
|
@@ -730,7 +730,7 @@ var Us = function() {
|
|
|
730
730
|
var t = this, n = t._self._c;
|
|
731
731
|
return n("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? n("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), n("g", { attrs: { fill: "#001222", "clip-path": "url(#uia-ui-assets/icons-16-sort_ascending__a" + t.uuid + ")" } }, [n("path", { attrs: { d: "M12.0001 1.93945L16.0608 6.00011L15.0001 7.06077L12.75 4.81066V12.75H11.25V4.81089L9.00011 7.06077L7.93945 6.00011L12.0001 1.93945Z" } }), n("path", { attrs: { d: "M6.75 7.25H1.25V8.75H6.75V7.25Z" } }), n("path", { attrs: { d: "M1.25 11.25H8.75V12.75H1.25V11.25Z" } }), n("path", { attrs: { d: "M6.75 3.25H1.25V4.75H6.75V3.25Z" } })]), n("defs", [n("clipPath", { attrs: { id: "uia-ui-assets/icons-16-sort_ascending__a" + t.uuid } }, [n("rect", { attrs: { width: "16", height: "16", fill: "#fff" } })])])]);
|
|
732
732
|
}, zs = [], ks = /* @__PURE__ */ G(
|
|
733
|
-
|
|
733
|
+
$s,
|
|
734
734
|
Us,
|
|
735
735
|
zs,
|
|
736
736
|
!1,
|
|
@@ -1051,7 +1051,7 @@ const Js = Xs.exports, Qs = {
|
|
|
1051
1051
|
"b-data-grid-columns--unfrozen": !0
|
|
1052
1052
|
};
|
|
1053
1053
|
}), j = (i, B) => i && B === 0 ? Je.BOTTOM_START : Je.BOTTOM_END, V = (i, B) => {
|
|
1054
|
-
var Y, K, Q, ve, me, ue, b, F, P
|
|
1054
|
+
var Y, K, Q, ve, me, ue, b, F, $, P;
|
|
1055
1055
|
return {
|
|
1056
1056
|
"b-data-grid-columns__column--column-hovered": i.field === e.hoveredOverColumnState.hoveredOverColumnField,
|
|
1057
1057
|
"b-data-grid-columns__column--column-hovered-no-border-left": i.field === e.hoveredOverColumnState.hoveredOverColumnField && e.hoveredOverColumnState.noBorderLeft,
|
|
@@ -1064,7 +1064,7 @@ const Js = Xs.exports, Qs = {
|
|
|
1064
1064
|
"b-data-grid-columns__column--frozen": i == null ? void 0 : i.frozen,
|
|
1065
1065
|
"b-data-grid-columns__column--is-re-ordering": (i == null ? void 0 : i.field) === ((ve = (Q = e.draggingColumns) == null ? void 0 : Q.dragging) == null ? void 0 : ve.field),
|
|
1066
1066
|
"b-data-grid-columns__column--is-re-ordering-target-left": (i == null ? void 0 : i.field) === ((ue = (me = e.draggingColumns) == null ? void 0 : me.target) == null ? void 0 : ue.field) && ((b = e.draggingColumns) == null ? void 0 : b.dragToLeft),
|
|
1067
|
-
"b-data-grid-columns__column--is-re-ordering-target-right": (i == null ? void 0 : i.field) === ((
|
|
1067
|
+
"b-data-grid-columns__column--is-re-ordering-target-right": (i == null ? void 0 : i.field) === (($ = (F = e.draggingColumns) == null ? void 0 : F.target) == null ? void 0 : $.field) && !((P = e.draggingColumns) != null && P.dragToLeft),
|
|
1068
1068
|
"b-data-grid-columns__column--with-sorting-or-column-panel": i.sortable || i.infoIconTooltip || e.hasColumnPanel && R.value === i.field || e.selectableAcrossPages
|
|
1069
1069
|
};
|
|
1070
1070
|
}, q = (i) => ({
|
|
@@ -1384,7 +1384,7 @@ const yo = bo.exports, Lt = {
|
|
|
1384
1384
|
},
|
|
1385
1385
|
setup(s) {
|
|
1386
1386
|
const { t } = ce();
|
|
1387
|
-
return { __sfc: !0, t, BentoLoadingButton: Zn, BentoLoadingButtonState: Vn, BentoLoadingIndicator:
|
|
1387
|
+
return { __sfc: !0, t, BentoLoadingButton: Zn, BentoLoadingButtonState: Vn, BentoLoadingIndicator: Pe, BentoDatagridEvent: T };
|
|
1388
1388
|
}
|
|
1389
1389
|
});
|
|
1390
1390
|
var Lo = function() {
|
|
@@ -1440,7 +1440,7 @@ const Fo = xo.exports, Mo = {
|
|
|
1440
1440
|
}, Bo = {
|
|
1441
1441
|
i18n: { messages: Mo },
|
|
1442
1442
|
name: "data-grid-cell-actions"
|
|
1443
|
-
},
|
|
1443
|
+
}, Po = /* @__PURE__ */ ae({
|
|
1444
1444
|
...Bo,
|
|
1445
1445
|
props: {
|
|
1446
1446
|
/**
|
|
@@ -1536,7 +1536,7 @@ const Fo = xo.exports, Mo = {
|
|
|
1536
1536
|
}, shouldShowMenuIconLeft: (d) => d.iconLeft || (d == null ? void 0 : d.variant) === "more", BentoButton: ht, BentoMenu: pt, Copy: Wn, Edit1Icon: Fo, ExternalLinkIcon: kn, OptionsVerticalIcon: Un };
|
|
1537
1537
|
}
|
|
1538
1538
|
});
|
|
1539
|
-
var
|
|
1539
|
+
var $o = function() {
|
|
1540
1540
|
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
1541
1541
|
return n("Transition", { attrs: { name: "b-data-grid-cell-actions__animation", appear: "" } }, [n("div", { staticClass: "b-data-grid-cell-actions" }, [e.showGradientElement ? n("div", { staticClass: "b-data-grid-cell-actions__background-gradient", class: e.conditionalCellActionsBackgroundGradientClasses }) : t._e(), n("div", { staticClass: "b-data-grid-cell-actions__actions", class: e.conditionalCellActionsClasses, attrs: { role: "group" } }, t._l(e.computedCellActions, function(o, l) {
|
|
1542
1542
|
return n("div", { key: l, staticClass: "b-data-grid-cell-actions__action" }, [o.menuData ? n(e.BentoMenu, { attrs: { data: e.transformMenuEvents(o.menuData), button: {
|
|
@@ -1565,8 +1565,8 @@ var Po = function() {
|
|
|
1565
1565
|
}, proxy: !0 } : null], null, !0) }, e.generateButtonEvents(o)))], 1);
|
|
1566
1566
|
}), 0)])]);
|
|
1567
1567
|
}, Uo = [], zo = /* @__PURE__ */ G(
|
|
1568
|
-
$o,
|
|
1569
1568
|
Po,
|
|
1569
|
+
$o,
|
|
1570
1570
|
Uo,
|
|
1571
1571
|
!1,
|
|
1572
1572
|
null,
|
|
@@ -1709,7 +1709,7 @@ const ft = () => {
|
|
|
1709
1709
|
},
|
|
1710
1710
|
emits: ["on-frozen-columns-key-press", "select-row", "register-row-cell-element", "cell-hovered", "nested-content-toggled"],
|
|
1711
1711
|
setup(s, { expose: t, emit: n }) {
|
|
1712
|
-
const e = s, o = Be(), l =
|
|
1712
|
+
const e = s, o = Be(), l = $e(o), { t: a } = ce(), f = y(null), _ = y(null), r = y(!1), R = y([]), u = y(!1), E = y(), p = y(!1), c = h(() => {
|
|
1713
1713
|
var m;
|
|
1714
1714
|
return !!((m = e.rowData) != null && m[e.column.field]);
|
|
1715
1715
|
}), C = h(
|
|
@@ -2027,7 +2027,7 @@ const jo = Zo.exports, qo = {
|
|
|
2027
2027
|
},
|
|
2028
2028
|
emits: ["cell-hovered", "on-frozen-columns-key-press", "select-row", "select-nested-row", "row-click", "nested-content-toggled"],
|
|
2029
2029
|
setup(s, { expose: t, emit: n }) {
|
|
2030
|
-
const e = s, o = Be(), l =
|
|
2030
|
+
const e = s, o = Be(), l = $e(o), a = y({}), f = y(!1), _ = y(), r = y(), R = De("nested-content-slot"), u = y(!1), E = y();
|
|
2031
2031
|
Se(() => {
|
|
2032
2032
|
r.value && (E.value = ge(r.value));
|
|
2033
2033
|
});
|
|
@@ -2071,7 +2071,7 @@ const jo = Zo.exports, qo = {
|
|
|
2071
2071
|
};
|
|
2072
2072
|
}), S = h(() => {
|
|
2073
2073
|
var b, F;
|
|
2074
|
-
return c.value ? (F = (b = e.rowData) == null ? void 0 : b.children) == null ? void 0 : F.reduce((P,
|
|
2074
|
+
return c.value ? (F = (b = e.rowData) == null ? void 0 : b.children) == null ? void 0 : F.reduce(($, P, le) => ($[le] = De("nested-row"), $), {}) : [];
|
|
2075
2075
|
}), A = h(() => {
|
|
2076
2076
|
var b;
|
|
2077
2077
|
if (f.value) {
|
|
@@ -2085,37 +2085,39 @@ const jo = Zo.exports, qo = {
|
|
|
2085
2085
|
return [];
|
|
2086
2086
|
}
|
|
2087
2087
|
}), N = h(() => {
|
|
2088
|
-
var F,
|
|
2089
|
-
const b = (
|
|
2088
|
+
var F, $;
|
|
2089
|
+
const b = ($ = (F = e.rowData) == null ? void 0 : F.children) == null ? void 0 : $.map((P) => e.getDataItemId(P));
|
|
2090
2090
|
if ((b == null ? void 0 : b.length) > 0) {
|
|
2091
|
-
const
|
|
2091
|
+
const P = b.every((Ce) => {
|
|
2092
2092
|
var ie;
|
|
2093
2093
|
return (ie = e == null ? void 0 : e.selectedItems) == null ? void 0 : ie.includes(Ce);
|
|
2094
2094
|
}), le = b.some((Ce) => {
|
|
2095
2095
|
var ie;
|
|
2096
2096
|
return (ie = e == null ? void 0 : e.selectedItems) == null ? void 0 : ie.includes(Ce);
|
|
2097
2097
|
});
|
|
2098
|
-
return
|
|
2098
|
+
return !P && le;
|
|
2099
2099
|
}
|
|
2100
2100
|
return !1;
|
|
2101
2101
|
}), I = (b, F) => {
|
|
2102
|
-
const
|
|
2103
|
-
b !== null && (
|
|
2102
|
+
const $ = b;
|
|
2103
|
+
b !== null && ($ != null && $.gridcellRef) && (a.value[F] = $.gridcellRef);
|
|
2104
2104
|
}, g = (b) => S.value[b], O = (b) => {
|
|
2105
2105
|
if (!e.selectable)
|
|
2106
2106
|
return null;
|
|
2107
2107
|
const F = e.getDataItemId(b);
|
|
2108
2108
|
return e.selectedItems.includes(F).toString();
|
|
2109
2109
|
}, D = (b) => {
|
|
2110
|
-
var
|
|
2110
|
+
var P;
|
|
2111
|
+
if (!e.allowRowClicks)
|
|
2112
|
+
return;
|
|
2111
2113
|
let F = !1;
|
|
2112
|
-
const
|
|
2113
|
-
for (let le = 0; le <
|
|
2114
|
-
if ((
|
|
2114
|
+
const $ = ["button", "input", "a"];
|
|
2115
|
+
for (let le = 0; le < $.length; le++)
|
|
2116
|
+
if ((P = b == null ? void 0 : b.target) != null && P.closest($[le])) {
|
|
2115
2117
|
F = !0;
|
|
2116
2118
|
break;
|
|
2117
2119
|
}
|
|
2118
|
-
|
|
2120
|
+
F || n("row-click", e.rowData, b);
|
|
2119
2121
|
}, z = (b) => {
|
|
2120
2122
|
n("select-row", b, e.rowData);
|
|
2121
2123
|
}, H = (b, F) => {
|
|
@@ -2130,9 +2132,9 @@ const jo = Zo.exports, qo = {
|
|
|
2130
2132
|
}, V = () => {
|
|
2131
2133
|
ge(r.value);
|
|
2132
2134
|
}, q = (b) => {
|
|
2133
|
-
var F,
|
|
2134
|
-
b.key !== oe.TAB && ge(r.value), b.key === oe.ARROW_RIGHT && ((F = E.value) == null ? void 0 : F.length) > 1 && E.value[0].node === document.activeElement ? (ge(r.value), E.value[1].node.setAttribute("tabindex", "0"), E.value[1].node.focus(), b.stopPropagation(), b.preventDefault()) : b.key === oe.ARROW_LEFT && ((
|
|
2135
|
-
}, m = () => e.columnSets.reduce((b, { columnSet: F }) => b + F.length, 0), L = () => m() * e.rowIndex + m(), { updateContentHeight: M, contentHeight: i } =
|
|
2135
|
+
var F, $;
|
|
2136
|
+
b.key !== oe.TAB && ge(r.value), b.key === oe.ARROW_RIGHT && ((F = E.value) == null ? void 0 : F.length) > 1 && E.value[0].node === document.activeElement ? (ge(r.value), E.value[1].node.setAttribute("tabindex", "0"), E.value[1].node.focus(), b.stopPropagation(), b.preventDefault()) : b.key === oe.ARROW_LEFT && (($ = E.value) == null ? void 0 : $.length) > 1 && E.value[1].node === document.activeElement && (ge(r.value), E.value[0].node.setAttribute("tabindex", "0"), E.value[0].node.focus(), b.stopPropagation(), b.preventDefault());
|
|
2137
|
+
}, m = () => e.columnSets.reduce((b, { columnSet: F }) => b + F.length, 0), L = () => m() * e.rowIndex + m(), { updateContentHeight: M, contentHeight: i } = $n(_, f), B = h(() => {
|
|
2136
2138
|
var b;
|
|
2137
2139
|
if (e.hasNestedContent || e.hasNestedRows)
|
|
2138
2140
|
return {
|
|
@@ -2158,8 +2160,8 @@ const jo = Zo.exports, qo = {
|
|
|
2158
2160
|
return (b = e.rowData) == null ? void 0 : b.children;
|
|
2159
2161
|
},
|
|
2160
2162
|
(b, F) => {
|
|
2161
|
-
var P
|
|
2162
|
-
((
|
|
2163
|
+
var $, P;
|
|
2164
|
+
((P = ($ = e == null ? void 0 : e.rowData) == null ? void 0 : $.children) == null ? void 0 : P.length) > 0 && F === void 0 && !f.value && M();
|
|
2163
2165
|
}
|
|
2164
2166
|
);
|
|
2165
2167
|
const K = (b, F) => ({
|
|
@@ -2186,13 +2188,17 @@ const jo = Zo.exports, qo = {
|
|
|
2186
2188
|
return t({
|
|
2187
2189
|
gridcellRefs: a,
|
|
2188
2190
|
rowActionsRef: r
|
|
2189
|
-
}), { __sfc: !0, slots: o, hasSlot: l, props: e, emit: n, gridcellRefs: a, isNestedContentShown: f, nestedContentRef: _, rowActionsRef: r, nestedContentSlotId: R, isRowActionMenuOpen: u, focusableItems: E, shouldShowNestedRowsBooleanResult: p, shouldShowRenderNestedRows: c, isLoadingNestedRows: C, shouldShowNestedContentToggle: d, ariaRowAttributes: w, nestedContentContainerDivAriaAttributes: v, nestedRowIds: S, allNestedRowIds: A, hasUnSelectedNestedRows: N, registerRowCellRef: I, getRowId: g, getRowAriaSelectedValue: O, onRowClick: D, onRowSelect: z, onNestedRowSelect: H, onRowActionMenuOpen: k, onRowActionMenuClose: X, onRowActionsCellFocus: j, onRowActionsCellFocusOut: V, onRowActionsCellOnKeyDown: q, sumColumnAmountsInColumnSets: m, getRowActionsCellIndex: L, updateContentHeight: M, contentHeight: i, nestedContentStyles: B, nestedContentToggled: Y, conditionalRowClasses: K, conditionalRowSetClasses: Q, conditionalNestedRowClasses: ve, conditionalRowActionsContainerClasses: me, computedRowActionsStyles: ue, DataGridCell: jo, DataGridCellActions: At, BentoLoadingIndicator:
|
|
2191
|
+
}), { __sfc: !0, slots: o, hasSlot: l, props: e, emit: n, gridcellRefs: a, isNestedContentShown: f, nestedContentRef: _, rowActionsRef: r, nestedContentSlotId: R, isRowActionMenuOpen: u, focusableItems: E, shouldShowNestedRowsBooleanResult: p, shouldShowRenderNestedRows: c, isLoadingNestedRows: C, shouldShowNestedContentToggle: d, ariaRowAttributes: w, nestedContentContainerDivAriaAttributes: v, nestedRowIds: S, allNestedRowIds: A, hasUnSelectedNestedRows: N, registerRowCellRef: I, getRowId: g, getRowAriaSelectedValue: O, onRowClick: D, onRowSelect: z, onNestedRowSelect: H, onRowActionMenuOpen: k, onRowActionMenuClose: X, onRowActionsCellFocus: j, onRowActionsCellFocusOut: V, onRowActionsCellOnKeyDown: q, sumColumnAmountsInColumnSets: m, getRowActionsCellIndex: L, updateContentHeight: M, contentHeight: i, nestedContentStyles: B, nestedContentToggled: Y, conditionalRowClasses: K, conditionalRowSetClasses: Q, conditionalNestedRowClasses: ve, conditionalRowActionsContainerClasses: me, computedRowActionsStyles: ue, DataGridCell: jo, DataGridCellActions: At, BentoLoadingIndicator: Pe, DataGridRow: Tt };
|
|
2190
2192
|
}
|
|
2191
2193
|
});
|
|
2192
2194
|
var Ko = function() {
|
|
2193
2195
|
var o;
|
|
2194
2196
|
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
2195
|
-
return n("div", { staticClass: "b-data-grid-row-container" }, [n("div", t._b({ key: t.rowIndex, staticClass: "b-data-grid-row-container__row", class: e.conditionalRowClasses(t.rowData, t.rowIndex), attrs: { id: (o = t.rowId) == null ? void 0 : o.toString(), role: "row", "aria-selected": e.getRowAriaSelectedValue(t.rowData) }, on: { click: e.onRowClick
|
|
2197
|
+
return n("div", { staticClass: "b-data-grid-row-container" }, [n("div", t._b({ key: t.rowIndex, staticClass: "b-data-grid-row-container__row", class: e.conditionalRowClasses(t.rowData, t.rowIndex), attrs: { id: (o = t.rowId) == null ? void 0 : o.toString(), role: "row", "aria-selected": e.getRowAriaSelectedValue(t.rowData) }, on: { click: e.onRowClick, keyup: [function(l) {
|
|
2198
|
+
return !l.type.indexOf("key") && t._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : e.onRowClick.apply(null, arguments);
|
|
2199
|
+
}, function(l) {
|
|
2200
|
+
return !l.type.indexOf("key") && t._k(l.keyCode, "space", 32, l.key, [" ", "Spacebar"]) ? null : e.onRowClick.apply(null, arguments);
|
|
2201
|
+
}] } }, "div", e.ariaRowAttributes, !1), [t._l(t.columnSets, function({ columnSet: l, id: a, isFrozenColumns: f }, _) {
|
|
2196
2202
|
return [l != null && l.length ? n("div", { key: `data-grid-rows-${a}`, staticClass: "b-data-grid-row-container__cells", class: e.conditionalRowSetClasses(f), attrs: { "data-testid": `data-grid-${a}-rows` } }, t._l(l, function(r, R) {
|
|
2197
2203
|
return n(e.DataGridCell, { key: `cell-${r.field}`, ref: (u) => e.registerRowCellRef(u, r.field), refInFor: !0, staticClass: "b-data-grid-row-container__cell", attrs: { column: r, "column-set-index": _, "col-index": R, "column-sets": t.columnSets, condensed: t.condensed, "dragging-columns": t.draggingColumns, "dragging-events-for-row-cell": t.draggingEventsForRowCell, "get-data-item-id": t.getDataItemId, "hovered-over-column-state": t.hoveredOverColumnState, "is-data-item-disabled": t.isDataItemDisabled, "is-measuring-column-widths": t.isMeasuringColumnWidths, "is-nested-content-expanded": e.isNestedContentShown, "nested-content": e.shouldShowNestedContentToggle, "nested-rows-element-ids": e.allNestedRowIds, "row-data": t.rowData, "row-index": t.rowIndex, "selection-is-indeterminate": e.hasUnSelectedNestedRows, selectable: t.selectable, "selected-items": t.selectedItems }, on: { "cell-hovered": function(u) {
|
|
2198
2204
|
return e.emit("cell-hovered", u);
|
|
@@ -2225,7 +2231,7 @@ var Ko = function() {
|
|
|
2225
2231
|
Xo,
|
|
2226
2232
|
!1,
|
|
2227
2233
|
null,
|
|
2228
|
-
"
|
|
2234
|
+
"4557cada"
|
|
2229
2235
|
);
|
|
2230
2236
|
const Tt = Jo.exports;
|
|
2231
2237
|
let gt = 0;
|
|
@@ -2668,7 +2674,7 @@ const ga = _l.exports, vl = {
|
|
|
2668
2674
|
T.SORT
|
|
2669
2675
|
],
|
|
2670
2676
|
setup(s, { expose: t, emit: n }) {
|
|
2671
|
-
const e = s, o = Be(), l =
|
|
2677
|
+
const e = s, o = Be(), l = $e(o), a = y(null), f = y(), _ = y({}), r = y(null), R = y(null), u = y(), E = y(null), p = y(null), c = y(null), {
|
|
2672
2678
|
allowColumnDragAndDrop: C,
|
|
2673
2679
|
columns: d,
|
|
2674
2680
|
columnPanel: w,
|
|
@@ -2684,7 +2690,7 @@ const ga = _l.exports, vl = {
|
|
|
2684
2690
|
outline: H,
|
|
2685
2691
|
pagination: k
|
|
2686
2692
|
} = Me(e), X = y(-1), { t: j } = ce(), V = h(() => K.value.filter((x) => x.frozen).length), q = Ie(
|
|
2687
|
-
|
|
2693
|
+
Pn,
|
|
2688
2694
|
() => ({
|
|
2689
2695
|
additionalContentSlotRef: y(null),
|
|
2690
2696
|
isDataGridTemplate: !1,
|
|
@@ -2700,7 +2706,7 @@ const ga = _l.exports, vl = {
|
|
|
2700
2706
|
isTotalWidthOfColumnsTakingUpAllAvailableGridWidth: ue,
|
|
2701
2707
|
columns: b,
|
|
2702
2708
|
totalWidthOfAllColumns: F,
|
|
2703
|
-
rowActionsMaxWidth:
|
|
2709
|
+
rowActionsMaxWidth: $
|
|
2704
2710
|
} = gs(d, v, a, _, r, {
|
|
2705
2711
|
hasColumnPanel: w,
|
|
2706
2712
|
hasSelectableColumn: g,
|
|
@@ -2709,7 +2715,7 @@ const ga = _l.exports, vl = {
|
|
|
2709
2715
|
hasNestedRows: I,
|
|
2710
2716
|
allowColumnDragAndDrop: C,
|
|
2711
2717
|
isDataGridTemplate: L
|
|
2712
|
-
}),
|
|
2718
|
+
}), P = (x, ...U) => {
|
|
2713
2719
|
(x === T.COLUMNS || x === T.UPDATE_COLUMNS) && ([b.value] = U), n(x, ...U);
|
|
2714
2720
|
}, le = tt(
|
|
2715
2721
|
i,
|
|
@@ -2727,14 +2733,14 @@ const ga = _l.exports, vl = {
|
|
|
2727
2733
|
onConfigSettingsUpdate: Dt,
|
|
2728
2734
|
onConfigSettingsColumnsUpdate: xt,
|
|
2729
2735
|
onConfigSettingsColumnUpdate: Ft
|
|
2730
|
-
} = ws(K,
|
|
2736
|
+
} = ws(K, P), { hoveredOverColumn: Mt, hoveredOverColumnState: Bt } = bs(
|
|
2731
2737
|
Ee,
|
|
2732
2738
|
g,
|
|
2733
2739
|
H,
|
|
2734
2740
|
ue
|
|
2735
|
-
), { draggingColumns:
|
|
2741
|
+
), { draggingColumns: Pt, draggingEventsForColumns: $t, draggingEventsForRowCell: Ut, onMoveColumnByOffset: zt } = ps(Re, C, P), { onAllRowSelect: kt, onRowSelect: Wt, onNestedRowSelect: Gt, selectedItems: We, allItemsSelectedState: Ht } = _s(
|
|
2736
2742
|
O,
|
|
2737
|
-
|
|
2743
|
+
P,
|
|
2738
2744
|
v,
|
|
2739
2745
|
e.getDataItemId,
|
|
2740
2746
|
e.isDataItemDisabled
|
|
@@ -2750,7 +2756,7 @@ const ga = _l.exports, vl = {
|
|
|
2750
2756
|
p,
|
|
2751
2757
|
a,
|
|
2752
2758
|
A,
|
|
2753
|
-
|
|
2759
|
+
P
|
|
2754
2760
|
), {
|
|
2755
2761
|
updateScrollPosition: qt,
|
|
2756
2762
|
updateScrollPositionOnFrozenColumnsNavigation: Yt,
|
|
@@ -2810,13 +2816,13 @@ const ga = _l.exports, vl = {
|
|
|
2810
2816
|
Object.entries(J == null ? void 0 : J.gridcellRefs).map(([Oe, Sn]) => {
|
|
2811
2817
|
var Ke;
|
|
2812
2818
|
((Ke = r.value) == null ? void 0 : Ke[Oe]) === void 0 && (r.value = { ...r.value, [Oe]: [] }), r.value[Oe][U] = Sn;
|
|
2813
|
-
}), wn && (((fe = r.value) == null ? void 0 : fe[we]) === void 0 && (r.value = { ...r.value, [we]: [] }), r.value[we][U] = (he = J.rowActionsRef) == null ? void 0 : he[0],
|
|
2814
|
-
|
|
2819
|
+
}), wn && (((fe = r.value) == null ? void 0 : fe[we]) === void 0 && (r.value = { ...r.value, [we]: [] }), r.value[we][U] = (he = J.rowActionsRef) == null ? void 0 : he[0], $.value = Math.max(
|
|
2820
|
+
$.value,
|
|
2815
2821
|
((Ye = (pe = J.rowActionsRef) == null ? void 0 : pe[0]) == null ? void 0 : Ye.offsetWidth) ?? 0
|
|
2816
2822
|
));
|
|
2817
2823
|
}
|
|
2818
2824
|
}, rn = (x, U) => {
|
|
2819
|
-
e.allowRowClicks &&
|
|
2825
|
+
e.allowRowClicks && P(T.ROW_CLICK, x, U);
|
|
2820
2826
|
}, dn = (x) => {
|
|
2821
2827
|
X.value = x;
|
|
2822
2828
|
}, cn = h(() => !!e.selectableAcrossPages && !!e.pagination), un = h(() => e.hasNestedContent || e.hasNestedRows ? "treegrid" : "grid"), fn = xn({
|
|
@@ -2825,26 +2831,26 @@ const ga = _l.exports, vl = {
|
|
|
2825
2831
|
}), Ze = h(() => {
|
|
2826
2832
|
var x;
|
|
2827
2833
|
return ((x = We.value) == null ? void 0 : x.length) ?? 0;
|
|
2828
|
-
}), gn = h(() => e.bulkActions && Ze.value > 0), _n = (x) =>
|
|
2829
|
-
|
|
2834
|
+
}), gn = h(() => e.bulkActions && Ze.value > 0), _n = (x) => P(T.COLUMN_RESIZE, x), vn = (x) => {
|
|
2835
|
+
P(T.UPDATE_SORT_BY, x), P(T.SORT, x);
|
|
2830
2836
|
}, mn = (x, U) => {
|
|
2831
|
-
|
|
2837
|
+
P(T.NAVIGATE, x), P(T.UPDATE_PAGINATION, {
|
|
2832
2838
|
...e.pagination,
|
|
2833
2839
|
size: U,
|
|
2834
2840
|
page: x
|
|
2835
2841
|
});
|
|
2836
2842
|
}, Cn = (x) => {
|
|
2837
|
-
|
|
2843
|
+
P(T.ITEMS_PAGE, x);
|
|
2838
2844
|
}, hn = () => {
|
|
2839
|
-
|
|
2845
|
+
P(T.FILTER_SEARCH_CLEAR);
|
|
2840
2846
|
}, pn = (x) => {
|
|
2841
|
-
|
|
2847
|
+
P(T.UPDATE_FILTER_SEARCH_TERM, x), P(T.FILTER_SEARCH_INPUT, x);
|
|
2842
2848
|
}, je = h(() => d.value.some((x) => x.mandatory));
|
|
2843
2849
|
je.value || Ct(
|
|
2844
2850
|
"WARNING: At least one BentoDataGrid column should be set as mandatory to ensure data is always displayed correctly."
|
|
2845
2851
|
);
|
|
2846
2852
|
const qe = Ie(Bn, () => null);
|
|
2847
|
-
return qe(e.tabTitle), vt(Ot, Ne(e, "slashedZero")), t({ onEmptyStateClearResetButtonClick: Ve }), { __sfc: !0, props: e, slots: o, hasSlot: l, body: a, columnsRef: f, columnHeaderRefs: _, gridcellRefs: r, filtersRef: R, filterBarRef: u, paginationContainerRef: E, verticalScrollPositionRef: p, virtualHorizontalScrollbarRef: c, allowColumnDragAndDrop: C, columns: d, columnPanel: w, data: v, lazyLoadType: S, loading: A, hasNestedContent: N, hasNestedRows: I, selectable: g, selection: O, selectableAcrossPages: D, stickyPagination: z, outline: H, pagination: k, hoveredRowIndex: X, t: j, frozenColumnsLength: V, registerDatagridInDataGridTemplate: q, additionalContentSlotRef: m, isDataGridTemplate: L, stickyTabs: M, tabsRef: i, stickyAdditionalContent: B, computedColumnsTabIndex: Y, columnDefs: K, onColumnWidthOverride: Q, gridRowWidthStyle: ve, isMeasuringColumnWidths: me, isTotalWidthOfColumnsTakingUpAllAvailableGridWidth: ue, localColumnsState: b, totalWidthOfAllColumns: F, rowActionsMaxWidth:
|
|
2853
|
+
return qe(e.tabTitle), vt(Ot, Ne(e, "slashedZero")), t({ onEmptyStateClearResetButtonClick: Ve }), { __sfc: !0, props: e, slots: o, hasSlot: l, body: a, columnsRef: f, columnHeaderRefs: _, gridcellRefs: r, filtersRef: R, filterBarRef: u, paginationContainerRef: E, verticalScrollPositionRef: p, virtualHorizontalScrollbarRef: c, allowColumnDragAndDrop: C, columns: d, columnPanel: w, data: v, lazyLoadType: S, loading: A, hasNestedContent: N, hasNestedRows: I, selectable: g, selection: O, selectableAcrossPages: D, stickyPagination: z, outline: H, pagination: k, hoveredRowIndex: X, t: j, frozenColumnsLength: V, registerDatagridInDataGridTemplate: q, additionalContentSlotRef: m, isDataGridTemplate: L, stickyTabs: M, tabsRef: i, stickyAdditionalContent: B, computedColumnsTabIndex: Y, columnDefs: K, onColumnWidthOverride: Q, gridRowWidthStyle: ve, isMeasuringColumnWidths: me, isTotalWidthOfColumnsTakingUpAllAvailableGridWidth: ue, localColumnsState: b, totalWidthOfAllColumns: F, rowActionsMaxWidth: $, definedEmitsFunction: n, emit: P, stickyFiltersHeight: le, computedStickyFiltersTopPosition: Ce, columnHeadersHeight: ie, computedColumnHeadersTopPosition: Nt, sortedColumns: Re, columnSets: Ee, isOnlyOneVisibleColumn: It, onConfigSettingsUpdate: Dt, onConfigSettingsColumnsUpdate: xt, onConfigSettingsColumnUpdate: Ft, hoveredOverColumn: Mt, hoveredOverColumnState: Bt, draggingColumns: Pt, draggingEventsForColumns: $t, draggingEventsForRowCell: Ut, onMoveColumnByOffset: zt, onAllRowSelect: kt, onRowSelect: Wt, onNestedRowSelect: Gt, selectedItems: We, allItemsSelectedState: Ht, navigationInput: Vt, isLazyLoad: Le, isInfiniteScroll: Zt, verticalScrollPosition: Ge, emitLazyLoadEvent: jt, updateScrollPosition: qt, updateScrollPositionOnFrozenColumnsNavigation: Yt, syncVirtualScrollerWithBody: Kt, hasLeftOverflow: Ae, hasRightOverflow: He, horizontalScrollbarConditionalStyles: Xt, onEmptyStateClearResetButtonClick: Ve, limitedEmptyStateProps: Jt, conditionalGridClasses: Qt, conditionalGridBodyClasses: en, computedColumnPanelAlignment: tn, showFrozenColumnsSeparator: nn, conditionalFilterClasses: sn, conditionalPaginationClasses: on, registerColumnHeaderRefs: ln, registerRowCellRefs: an, onRowClick: rn, onCellHover: dn, selectableAcrossPagesComputed: cn, ariaGridRole: un, ariaGridHeaderText: fn, itemsSelectedCounter: Ze, showActionBar: gn, onColumnResized: _n, onSort: vn, onPaginationNavigate: mn, onItemsPerPageChange: Cn, onSearchTermCleared: hn, onSearchTermInput: pn, hasMandatoryColumn: je, setTitle: qe, BentoActionBar: In, BentoPagination: Dn, BentoLoadingIndicator: Pe, BentoTypography: be, BentoDataGridConfigSettings: yo, DataGridColumns: lo, DataGridLazyLoad: To, DataGridRow: Tt, handleClipboard: ys, BentoDatagridEvent: T, BentoFilterBar: Te, BentoEmptyState: Mn };
|
|
2848
2854
|
}
|
|
2849
2855
|
});
|
|
2850
2856
|
var Cl = function() {
|
|
@@ -2891,4 +2897,4 @@ export {
|
|
|
2891
2897
|
T as f,
|
|
2892
2898
|
ye as g
|
|
2893
2899
|
};
|
|
2894
|
-
//# sourceMappingURL=data-grid.
|
|
2900
|
+
//# sourceMappingURL=data-grid.t4fCoE2Y.js.map
|