claude-web/node_modules/primevue/scrollpanel/index.mjs.map

1 line
46 KiB
Plaintext
Raw Normal View History

2026-02-23 02:23:38 +00:00
{"version":3,"file":"index.mjs","sources":["../../src/scrollpanel/BaseScrollPanel.vue","../../src/scrollpanel/ScrollPanel.vue","../../src/scrollpanel/ScrollPanel.vue?vue&type=template&id=46324a00&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport ScrollPanelStyle from 'primevue/scrollpanel/style';\n\nexport default {\n name: 'BaseScrollPanel',\n extends: BaseComponent,\n props: {\n step: {\n type: Number,\n default: 5\n }\n },\n style: ScrollPanelStyle,\n provide() {\n return {\n $pcScrollPanel: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" v-bind=\"ptmi('root')\">\n <div :class=\"cx('contentContainer')\" v-bind=\"ptm('contentContainer')\">\n <div ref=\"content\" :id=\"contentId\" :class=\"cx('content')\" @scroll=\"onScroll\" @mouseenter=\"moveBar\" v-bind=\"ptm('content')\">\n <slot></slot>\n </div>\n </div>\n <div\n ref=\"xBar\"\n :class=\"cx('barx')\"\n tabindex=\"0\"\n role=\"scrollbar\"\n aria-orientation=\"horizontal\"\n :aria-controls=\"contentId\"\n :aria-valuenow=\"lastScrollLeft\"\n @mousedown=\"onXBarMouseDown\"\n @keydown=\"onKeyDown($event)\"\n @keyup=\"onKeyUp\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n v-bind=\"ptm('barx')\"\n data-pc-group-section=\"bar\"\n ></div>\n <div\n ref=\"yBar\"\n :class=\"cx('bary')\"\n tabindex=\"0\"\n role=\"scrollbar\"\n aria-orientation=\"vertical\"\n :aria-controls=\"contentId\"\n :aria-valuenow=\"lastScrollTop\"\n @mousedown=\"onYBarMouseDown\"\n @keydown=\"onKeyDown($event)\"\n @keyup=\"onKeyUp\"\n @focus=\"onFocus\"\n v-bind=\"ptm('bary')\"\n data-pc-group-section=\"bar\"\n ></div>\n </div>\n</template>\n\n<script>\nimport { addClass, getHeight, removeClass } from '@primeuix/utils/dom';\nimport BaseScrollPanel from './BaseScrollPanel.vue';\n\nexport default {\n name: 'ScrollPanel',\n extends: BaseScrollPanel,\n inheritAttrs: false,\n initialized: false,\n documentResizeListener: null,\n documentMouseMoveListener: null,\n documentMouseUpListener: null,\n frame: null,\n scrollXRatio: null,\n scrollYRatio: null,\n isXBarClicked: false,\n isYBarClicked: false,\n lastPageX: null,\n lastPageY: null,\n timer: null,\n outsideClickListener: null,\n data() {\n return {\n orientation: 'vertical',\n lastScrollTop: 0,\n lastScrollLeft: 0\n };\n },\n mounted() {\n if (this.$el.offsetParent) {\n this.initialize();\n }\n },\n updated() {\n if (!this.initialized && this.$el.offsetParent) {\n this.initialize();\n }\n },\n beforeUnmount() {\n this.unbindDocumentResizeListener();\n\n if (this.frame) {\n window.cancelAnimationFrame(this.frame);\n }\n },\n methods: {\n initialize() {\n this.moveBar();\n this.bindDocumentResizeListener();\n this.calculateContainerHeight();\n },\n calculateContainerHeight() {\n let containerStyles = getComputedStyle(this.$el),\n xBarStyles = getComputedStyle(this.$refs.xBar),\n pureContainerHeight = getHeight(this.$el) - parseInt(xBarStyles['height'], 10);\n\n if (containerStyles['max-height'] !== 'none' && pureContainerHeight === 0) {\n if (this.$refs.content.offsetHeight + parseInt(xBarStyles['height'], 10) > parseInt(containerStyles['max-height'], 10)) {\n this.$el.style.height = containerStyles['max-height'];\n } else {\n