/**
 * ldesign v0.2.14
 * (c) 2022/11/2 16:16 built by swimly
 * @license MIT
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var helper$1 = require('../../../chunks/helper.js');
var VueCompositionAPI = require('@vue/composition-api');
var pick = require('lodash/pick');
var log = require('../../../chunks/log.js');
var helper = require('../../../chunks/helper2.js');
var hooks_useVirtualScroll = require('../../../hooks/use-virtual-scroll.js');
var components_loading_index = require('../../loading/index.js');
var hooks_lnode = require('../../../hooks/lnode.js');
var components_configProvider_useConfig = require('../../config-provider/useConfig.js');
var components_affix_index = require('../../affix/index.js');
var components_table_props = require('../props.js');
var components_table_hooks_useTableHeader = require('../hooks/useTableHeader.js');
var components_table_hooks_useColumnResize = require('../hooks/useColumnResize.js');
var components_table_hooks_useFixed = require('../hooks/useFixed.js');
var components_table_hooks_usePagination = require('../hooks/usePagination.js');
var components_table_hooks_useAffix = require('../hooks/useAffix.js');
var components_table_hooks_useStyle = require('../hooks/useStyle.js');
var components_table_hooks_useClassName = require('../hooks/useClassName.js');
var components_table_utils = require('../utils.js');
var components_table_core_tbody = require('./tbody.js');
var components_table_core_tr = require('./tr.js');
var components_table_core_thead = require('./thead.js');
var components_table_core_tfoot = require('./tfoot.js');
require('../../../chunks/_commonjsHelpers-2e6815bd.js');
require('../../../utils/with-install.js');
require('vue');
require('lodash');
require('../../../config.js');
require('../../loading/loading.js');
require('../../../utils/dom.js');
require('raf');
require('lodash/isString');
require('../../../utils/easing.js');
require('../../../utils/render-node.js');
require('../../../utils/transfer-dom.js');
require('../../config-provider/config-receiver.js');
require('lodash/mergeWith');
require('../../config-provider/context.js');
require('../../../chunks/zh_CN.js');
require('../../../utils/mixins.js');
require('../../loading/props.js');
require('../../loading/icon/gradient.js');
require('../../../chunks/defineProperty-838e4192.js');
require('../../../chunks/set-style.js');
require('../../loading/plugin.js');
require('lodash/isEmpty');
require('lodash/isFunction');
require('lodash/camelCase');
require('lodash/kebabCase');
require('../../../hooks/render-lnode.js');
require('../../affix/affix.js');
require('../../affix/props.js');
require('./ellipsis.js');
require('lodash/debounce');
require('../../tooltip/index.js');
require('../../../utils/map-props.js');
require('../../tooltip/tooltip.js');
require('../../popup/props.js');
require('../../popup/popup.js');
require('@popperjs/core');
require('../../../utils/helper.js');
require('../../popup/container.js');
require('../../tooltip/props.js');
require('../hooks/useMultiHeader.js');
require('lodash/isNumber');
require('../../../chunks/utils3.js');
require('../../../chunks/isFunction-91acade7.js');
require('../../../chunks/isObjectLike-c22c7e3b.js');
require('../../../chunks/isNumber-c4eb560e.js');
require('lodash/get');
require('../../pagination/index.js');
require('../../pagination/pagination.js');
require('@ldesign/icons-vue');
require('../../input-number/index.js');
require('../../input-number/input-number.js');
require('../../button/index.js');
require('../../button/button.js');
require('../../../utils/ripple.js');
require('../../button/props.js');
require('../../input/index.js');
require('../../input/input.js');
require('../../../utils/event.js');
require('../../input/props.js');
require('../../input/group.js');
require('../../../hooks/use-global-icon.js');
require('../../input-number/props.js');
require('../../input-number/hooks/use-input-number.js');
require('../../../chunks/isArray-cd7357b9.js');
require('../../../hooks/use-common-classname.js');
require('../../../hooks/use-vmodel.js');
require('../../../hooks/use-form-disabled.js');
require('../../select/index.js');
require('../../select/select.js');
require('lodash/cloneDeep');
require('lodash/isArray');
require('lodash/isObject');
require('../../../hooks/use-default-value.js');
require('../../popup/index.js');
require('../../tag/index.js');
require('../../tag/tag.js');
require('../../tag/props.js');
require('../../tag/check-tag.js');
require('../../select-input/index.js');
require('../../select-input/select-input.js');
require('../../select-input/props.js');
require('../../select-input/hooks/use-single.js');
require('../../../hooks/use-config.js');
require('../../select-input/hooks/use-multiple.js');
require('../../tag-input/index.js');
require('../../tag-input/tag-input.js');
require('../../tag-input/props.js');
require('../../tag-input/hooks/use-tag-scroll.js');
require('../../tag-input/hooks/use-tag-list.js');
require('../../tag-input/hooks/use-hover.js');
require('../../tag-input/hooks/use-drag-sorter.js');
require('../../select-input/hooks/use-overlay-innerstyle.js');
require('../../common/fake-arrow.js');
require('../../select/option.js');
require('../../checkbox/index.js');
require('../../checkbox/group.js');
require('lodash/intersection');
require('../../checkbox/checkbox.js');
require('../../checkbox/props.js');
require('../../../hooks/use-lazy-load.js');
require('../../../chunks/observe.js');
require('../../select/utils.js');
require('../../select/props.js');
require('../../select/select-panel.js');
require('../../select/hooks/use-select-options.js');
require('../../select/option-group.js');
require('../../input-adornment/index.js');
require('../../input-adornment/input-adornment.js');
require('../../input-adornment/props.js');
require('../../pagination/props.js');
require('../hooks/useRowspanAndColspan.js');
require('lodash/upperFirst');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var pick__default = /*#__PURE__*/_interopDefaultLegacy(pick);

const BASE_TABLE_EVENTS = ["page-change", "cell-click", "scroll", "scrollX", "scrollY"];
const BASE_TABLE_ALL_EVENTS = components_table_core_tr.ROW_LISTENERS.map(t => `row-${t}`).concat(BASE_TABLE_EVENTS);
var _BaseTable = VueCompositionAPI.defineComponent({
  name: "LBaseTable",
  props: {
    ...components_table_props.BaseTableProps,
    renderExpandedRow: Function,
    onLeafColumnsChange: Function
  },
  setup(props2, context) {
    var _props2$scroll3;
    const renderLNode = hooks_lnode.useLNodeJSX();
    const tableRef = VueCompositionAPI.ref();
    const tableElmRef = VueCompositionAPI.ref();
    const tableBodyRef = VueCompositionAPI.ref();
    const tableFootHeight = VueCompositionAPI.ref(0);
    const {
      classPrefix,
      virtualScrollClasses,
      tableLayoutClasses,
      tableBaseClass,
      tableColFixedClasses
    } = components_table_hooks_useClassName["default"]();
    const {
      tableClasses,
      sizeClassNames,
      tableContentStyles,
      tableElementStyles
    } = components_table_hooks_useStyle["default"](props2);
    const {
      global
    } = components_configProvider_useConfig.useConfig("table");
    const {
      isMultipleHeader,
      spansAndLeafNodes,
      thList
    } = components_table_hooks_useTableHeader["default"](props2);
    const finalColumns = VueCompositionAPI.computed(() => {
      var _spansAndLeafNodes$va;
      return ((_spansAndLeafNodes$va = spansAndLeafNodes.value) === null || _spansAndLeafNodes$va === void 0 ? void 0 : _spansAndLeafNodes$va.leafColumns) || props2.columns;
    });
    const paginationAffixRef = VueCompositionAPI.ref();
    const horizontalScrollAffixRef = VueCompositionAPI.ref();
    const headerTopAffixRef = VueCompositionAPI.ref();
    const footerBottomAffixRef = VueCompositionAPI.ref();
    const {
      scrollbarWidth,
      tableWidth,
      tableElmWidth,
      tableContentRef,
      isFixedHeader,
      isWidthOverflow,
      isFixedColumn,
      thWidthList,
      showColumnShadow,
      rowAndColFixedPosition,
      setData,
      refreshTable,
      emitScrollEvent,
      setUseFixedTableElmRef,
      updateColumnFixedShadow,
      getThWidthList,
      updateThWidthList,
      setRecalculateColWidthFuncRef,
      addTableResizeObserver
    } = components_table_hooks_useFixed["default"](props2, context, finalColumns, {
      paginationAffixRef,
      horizontalScrollAffixRef,
      headerTopAffixRef,
      footerBottomAffixRef
    });
    const {
      affixHeaderRef,
      affixFooterRef,
      horizontalScrollbarRef,
      paginationRef,
      showAffixHeader,
      showAffixFooter,
      showAffixPagination,
      onHorizontalScroll,
      updateAffixHeaderOrFooter,
      setTableContentRef
    } = components_table_hooks_useAffix["default"](props2);
    const {
      dataSource,
      isPaginateData,
      renderPagination
    } = components_table_hooks_usePagination["default"](props2, context);
    const columnResizeParams = components_table_hooks_useColumnResize["default"](tableContentRef, refreshTable, getThWidthList, updateThWidthList);
    const {
      resizeLineRef,
      resizeLineStyle,
      recalculateColWidth,
      setEffectColMap
    } = columnResizeParams;
    setRecalculateColWidthFuncRef(recalculateColWidth);
    const dynamicBaseTableClasses = VueCompositionAPI.computed(() => [tableClasses.value, {
      [tableBaseClass.headerFixed]: isFixedHeader.value,
      [tableBaseClass.columnFixed]: isFixedColumn.value,
      [tableBaseClass.widthOverflow]: isWidthOverflow.value,
      [tableBaseClass.multipleHeader]: isMultipleHeader.value,
      [tableColFixedClasses.leftShadow]: showColumnShadow.left,
      [tableColFixedClasses.rightShadow]: showColumnShadow.right,
      [tableBaseClass.columnResizableTable]: props2.resizable
    }]);
    const tableElmClasses = VueCompositionAPI.computed(() => [[tableLayoutClasses[props2.tableLayout]], {
      [tableBaseClass.fullHeight]: props2.height
    }]);
    const isVirtual = VueCompositionAPI.computed(() => {
      var _props2$scroll, _props2$data, _props2$scroll2;
      return ((_props2$scroll = props2.scroll) === null || _props2$scroll === void 0 ? void 0 : _props2$scroll.type) === "virtual" && ((_props2$data = props2.data) === null || _props2$data === void 0 ? void 0 : _props2$data.length) > (((_props2$scroll2 = props2.scroll) === null || _props2$scroll2 === void 0 ? void 0 : _props2$scroll2.threshold) || 100);
    });
    const showRightDivider = VueCompositionAPI.computed(() => props2.bordered && isFixedHeader.value && (isMultipleHeader.value && isWidthOverflow.value || !isMultipleHeader.value));
    const columnResizable = VueCompositionAPI.computed(() => props2.allowResizeColumnWidth === void 0 ? props2.resizable : props2.allowResizeColumnWidth);
    VueCompositionAPI.watch(tableElmRef, () => {
      setUseFixedTableElmRef(tableElmRef.value);
    });
    VueCompositionAPI.watch(() => [props2.data, dataSource, isPaginateData], () => {
      setData(isPaginateData.value ? dataSource.value : props2.data);
    });
    VueCompositionAPI.watch(spansAndLeafNodes, () => {
      var _props2$onLeafColumns;
      (_props2$onLeafColumns = props2.onLeafColumnsChange) === null || _props2$onLeafColumns === void 0 ? void 0 : _props2$onLeafColumns.call(props2, spansAndLeafNodes.value.leafColumns);
      context.emit("LeafColumnsChange", spansAndLeafNodes.value.leafColumns);
    }, {
      immediate: true
    });
    VueCompositionAPI.watch(thList, () => {
      setEffectColMap(thList.value[0], null);
    }, {
      immediate: true
    });
    const onFixedChange = () => {
      VueCompositionAPI.nextTick(() => {
        onHorizontalScroll();
        updateAffixHeaderOrFooter();
      });
    };
    const getListener = () => {
      const listener = {};
      BASE_TABLE_ALL_EVENTS.forEach(key => {
        listener[key] = function () {
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          context.emit(key, ...args);
        };
      });
      return listener;
    };
    const {
      type,
      rowHeight,
      bufferSize = 20,
      isFixedRowHeight = false
    } = props2.scroll || {};
    const {
      data
    } = VueCompositionAPI.toRefs(props2);
    const {
      trs = null,
      scrollHeight = null,
      visibleData = null,
      translateY = null,
      handleScroll: handleVirtualScroll = null,
      handleRowMounted = null
    } = type === "virtual" ? hooks_useVirtualScroll["default"]({
      container: tableContentRef,
      data,
      fixedHeight: isFixedRowHeight,
      lineHeight: rowHeight,
      bufferSize,
      threshold: (_props2$scroll3 = props2.scroll) === null || _props2$scroll3 === void 0 ? void 0 : _props2$scroll3.threshold
    }) : {};
    VueCompositionAPI.provide("tableContentRef", tableContentRef);
    VueCompositionAPI.provide("rowHeightRef", VueCompositionAPI.ref(rowHeight));
    let lastScrollY = 0;
    const onInnerVirtualScroll = e => {
      const target = e.target || e.srcElement;
      const top = target.scrollTop;
      if (lastScrollY !== top) {
        isVirtual.value && handleVirtualScroll();
      } else {
        lastScrollY = 0;
        updateColumnFixedShadow(target);
      }
      lastScrollY = top;
      emitScrollEvent(e);
    };
    const getTFootHeight = () => {
      var _tableElmRef$value$qu;
      if (!tableElmRef.value) return;
      tableFootHeight.value = (_tableElmRef$value$qu = tableElmRef.value.querySelector("tfoot")) === null || _tableElmRef$value$qu === void 0 ? void 0 : _tableElmRef$value$qu.getBoundingClientRect().height;
    };
    VueCompositionAPI.watch(tableContentRef, () => {
      setTableContentRef(tableContentRef.value);
    });
    VueCompositionAPI.watch(tableElmRef, getTFootHeight);
    VueCompositionAPI.watch(tableRef, tableRef2 => {
      addTableResizeObserver(tableRef2);
    });
    VueCompositionAPI.onMounted(() => {
      getTFootHeight();
      setTableContentRef(tableContentRef.value);
      addTableResizeObserver(tableRef.value);
    });
    return {
      columnResizable,
      thList,
      classPrefix,
      isVirtual,
      global,
      tableFootHeight,
      tableWidth,
      tableElmWidth,
      tableRef,
      tableElmRef,
      sizeClassNames,
      tableBaseClass,
      spansAndLeafNodes,
      dynamicBaseTableClasses,
      tableContentStyles,
      tableElementStyles,
      virtualScrollClasses,
      tableLayoutClasses,
      tableElmClasses,
      tableContentRef,
      isFixedHeader,
      isWidthOverflow,
      isFixedColumn,
      rowAndColFixedPosition,
      showColumnShadow,
      thWidthList,
      isPaginateData,
      dataSource,
      scrollType: type,
      rowHeight,
      trs,
      bufferSize,
      scrollHeight,
      visibleData,
      translateY,
      affixHeaderRef,
      affixFooterRef,
      paginationRef,
      showAffixHeader,
      showAffixFooter,
      scrollbarWidth,
      isMultipleHeader,
      showRightDivider,
      resizeLineRef,
      resizeLineStyle,
      columnResizeParams,
      horizontalScrollbarRef,
      tableBodyRef,
      showAffixPagination,
      getListener,
      renderPagination,
      renderLNode,
      handleRowMounted,
      onFixedChange,
      onHorizontalScroll,
      updateAffixHeaderOrFooter,
      refreshTable,
      onInnerVirtualScroll,
      paginationAffixRef,
      horizontalScrollAffixRef,
      headerTopAffixRef,
      footerBottomAffixRef
    };
  },
  methods: {
    renderColGroup(columns) {
      const h = this.$createElement;
      const defaultColWidth = this.tableLayout === "fixed" && this.isWidthOverflow ? "100px" : void 0;
      return h("colgroup", [columns.map(col => {
        const style = {
          width: components_table_hooks_useStyle.formatCSSUnit(this.thWidthList[col.colKey] || col.width) || defaultColWidth
        };
        if (col.minWidth) style.minWidth = components_table_hooks_useStyle.formatCSSUnit(col.minWidth);
        return h("col", {
          "key": col.colKey,
          "style": style
        });
      })]);
    },
    getHeadProps() {
      const headProps = {
        isFixedHeader: this.isFixedHeader,
        rowAndColFixedPosition: this.rowAndColFixedPosition,
        isMultipleHeader: this.isMultipleHeader,
        bordered: this.bordered,
        spansAndLeafNodes: this.spansAndLeafNodes,
        thList: this.thList,
        thWidthList: this.thWidthList,
        resizable: this.resizable,
        columnResizeParams: this.columnResizeParams,
        classPrefix: this.classPrefix,
        ellipsisOverlayClassName: this.size !== "medium" ? this.sizeClassNames[this.size] : ""
      };
      return headProps;
    },
    renderFixedHeader(columns) {
      var _navigator, _this$affixHeaderRef;
      const h = this.$createElement;
      if (!this.showHeader) return null;
      const onlyVirtualScrollBordered = !!(this.isVirtual && !this.headerAffixedTop && this.bordered) && /Chrome/.test((_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.userAgent);
      const borderWidth = this.bordered && onlyVirtualScrollBordered ? 1 : 0;
      const barWidth = this.isWidthOverflow ? this.scrollbarWidth : 0;
      const IEHeaderWrap = helper.getIEVersion() <= 11 ? 4 : 0;
      const affixHeaderHeight = (((_this$affixHeaderRef = this.affixHeaderRef) === null || _this$affixHeaderRef === void 0 ? void 0 : _this$affixHeaderRef.getBoundingClientRect().height) || 0) - IEHeaderWrap;
      const affixHeaderWrapHeight = affixHeaderHeight - barWidth - borderWidth;
      const headerOpacity = this.headerAffixedTop ? Number(this.showAffixHeader) : 1;
      const affixHeaderWrapHeightStyle = {
        width: `${this.tableWidth}px`,
        height: `${affixHeaderWrapHeight}px`,
        opacity: headerOpacity,
        marginTop: onlyVirtualScrollBordered ? `${borderWidth}px` : 0
      };
      const colgroup = this.renderColGroup(columns);
      const affixedLeftBorder = this.bordered ? 1 : 0;
      const affixedHeader = Boolean((this.headerAffixedTop || this.isVirtual) && this.tableWidth) && h("div", {
        "ref": "affixHeaderRef",
        "style": {
          width: `${this.tableWidth - affixedLeftBorder}px`,
          opacity: headerOpacity
        },
        "class": ["scrollbar", {
          [this.tableBaseClass.affixedHeaderElm]: this.headerAffixedTop || this.isVirtual
        }]
      }, [h("table", {
        "class": this.tableElmClasses,
        "style": {
          ...this.tableElementStyles,
          width: `${this.tableElmWidth}px`
        }
      }, [colgroup, h(components_table_core_thead["default"], helper$1.helper([{
        "scopedSlots": this.$scopedSlots
      }, {
        "props": this.getHeadProps()
      }]))])]);
      const affixHeaderWithWrap = h("div", {
        "class": this.tableBaseClass.affixedHeaderWrap,
        "style": affixHeaderWrapHeightStyle
      }, [affixedHeader]);
      return affixHeaderWithWrap;
    },
    renderAffixedFooter(columns) {
      var _this$footData;
      const h = this.$createElement;
      const barWidth = this.isWidthOverflow ? this.scrollbarWidth : 0;
      const affixedLeftBorder = this.bordered ? 1 : 0;
      let marginScrollbarWidth = barWidth;
      if (this.bordered) marginScrollbarWidth += 1;
      const affixedFooter = Boolean(this.footerAffixedBottom && ((_this$footData = this.footData) === null || _this$footData === void 0 ? void 0 : _this$footData.length) && this.tableWidth) && h(components_affix_index.Affix, helper$1.helper([{
        "class": this.tableBaseClass.affixedFooterWrap,
        "on": {
          "fixedChange": this.onFixedChange
        },
        "attrs": {
          "offsetBottom": marginScrollbarWidth || 0
        }
      }, {
        "props": components_table_utils.getAffixProps(this.footerAffixedBottom, this.footerAffixProps)
      }, {
        "style": {
          marginTop: `${-1 * (this.tableFootHeight + marginScrollbarWidth)}px`
        },
        "ref": "footerBottomAffixRef"
      }]), [h("div", {
        "ref": "affixFooterRef",
        "style": {
          width: `${this.tableWidth - affixedLeftBorder}px`,
          opacity: Number(this.showAffixFooter)
        },
        "class": ["scrollbar", {
          [this.tableBaseClass.affixedFooterElm]: this.footerAffixedBottom || this.isVirtual
        }]
      }, [h("table", {
        "class": this.tableElmClasses,
        "style": {
          ...this.tableElementStyles,
          width: `${this.tableElmWidth}px`
        }
      }, [this.renderColGroup(columns), h(components_table_core_tfoot["default"], {
        "attrs": {
          "rowKey": this.rowKey,
          "isFixedHeader": this.isFixedHeader,
          "rowAndColFixedPosition": this.rowAndColFixedPosition,
          "footData": this.footData,
          "columns": columns,
          "rowAttributes": this.rowAttributes,
          "rowClassName": this.rowClassName,
          "thWidthList": this.thWidthList,
          "footerSummary": this.footerSummary,
          "rowspanAndColspanInFooter": this.rowspanAndColspanInFooter
        },
        "scopedSlots": this.$scopedSlots
      })])])]);
      return affixedFooter;
    },
    renderAffixedHeader(columns) {
      const h = this.$createElement;
      if (!components_table_props.BaseTableProps.showHeader) return null;
      return !!(this.isVirtual || this.headerAffixedTop) && (this.headerAffixedTop ? h(components_affix_index.Affix, helper$1.helper([{
        "attrs": {
          "offsetTop": 0
        }
      }, {
        "props": components_table_utils.getAffixProps(this.headerAffixedTop, this.headerAffixProps)
      }, {
        "on": {
          "fixedChange": this.onFixedChange
        },
        "ref": "headerTopAffixRef"
      }]), [this.renderFixedHeader(columns)]) : this.isFixedHeader && this.renderFixedHeader(columns));
    }
  },
  render(h) {
    var _this$spansAndLeafNod, _this$tableContentRef;
    const {
      rowAndColFixedPosition
    } = this;
    const data = this.isPaginateData ? this.dataSource : this.data;
    const columns = ((_this$spansAndLeafNod = this.spansAndLeafNodes) === null || _this$spansAndLeafNod === void 0 ? void 0 : _this$spansAndLeafNod.leafColumns) || this.columns;
    if (this.allowResizeColumnWidth) log.log.warn("Table", "allowResizeColumnWidth is going to be deprecated, please use resizable instead.");
    if (this.columnResizable && this.tableLayout === "auto") log.log.warn("Table", "table-layout can not be `auto` for resizable column table, set `table-layout: fixed` please.");
    const translate = `translate(0, ${this.scrollHeight}px)`;
    const virtualStyle = {
      "transform": translate,
      "-ms-transform": translate,
      "-moz-transform": translate,
      "-webkit-transform": translate
    };
    const tableBodyProps = {
      rowAndColFixedPosition,
      showColumnShadow: this.showColumnShadow,
      data: this.isVirtual ? this.visibleData : data,
      columns,
      tableElm: this.tableRef,
      tableContentElm: this.tableContentRef,
      tableWidth: this.tableWidth,
      isWidthOverflow: this.isWidthOverflow,
      isVirtual: this.isVirtual,
      translateY: this.translateY,
      scrollType: this.scrollType,
      rowHeight: this.rowHeight,
      trs: this.trs,
      bufferSize: this.bufferSize,
      scroll: this.scroll,
      classPrefix: this.classPrefix,
      cellEmptyContent: this.cellEmptyContent,
      handleRowMounted: this.handleRowMounted,
      renderExpandedRow: this.renderExpandedRow,
      ...pick__default["default"](this.$props, components_table_core_tbody.extendTableProps)
    };
    const tBodyListener = this.getListener();
    const tableContent = h("div", helper$1.helper([{
      "ref": "tableContentRef",
      "class": this.tableBaseClass.content,
      "style": this.tableContentStyles
    }, {
      "on": {
        scroll: this.onInnerVirtualScroll
      }
    }]), [this.isVirtual && h("div", {
      "class": this.virtualScrollClasses.cursor,
      "style": virtualStyle
    }), h("table", {
      "ref": "tableElmRef",
      "class": this.tableElmClasses,
      "style": this.tableElementStyles
    }, [this.renderColGroup(columns), this.showHeader && h(components_table_core_thead["default"], helper$1.helper([{
      "scopedSlots": this.$scopedSlots
    }, {
      "props": this.getHeadProps()
    }])), h(components_table_core_tbody["default"], helper$1.helper([{
      "ref": "tableBodyRef",
      "scopedSlots": this.$scopedSlots
    }, {
      "props": tableBodyProps
    }, {}, {
      "on": tBodyListener
    }])), h(components_table_core_tfoot["default"], {
      "attrs": {
        "rowKey": this.rowKey,
        "isFixedHeader": this.isFixedHeader,
        "rowAndColFixedPosition": rowAndColFixedPosition,
        "footData": this.footData,
        "columns": columns,
        "rowAttributes": this.rowAttributes,
        "rowClassName": this.rowClassName,
        "footerSummary": this.footerSummary,
        "rowspanAndColspanInFooter": this.rowspanAndColspanInFooter
      },
      "scopedSlots": this.$scopedSlots
    })])]);
    const customLoadingText = this.renderLNode("loading");
    const loadingContent = this.loading !== void 0 && h(components_loading_index.Loading, helper$1.helper([{
      "attrs": {
        "loading": !!this.loading,
        "text": customLoadingText ? () => customLoadingText : void 0,
        "attach": this.tableRef ? () => this.tableRef : void 0,
        "showOverlay": true
      }
    }, {
      "props": {
        size: "small",
        ...this.loadingProps
      }
    }]));
    const topContent = this.renderLNode("topContent");
    const bottomContent = this.renderLNode("bottomContent");
    const pagination = h("div", {
      "ref": "paginationRef",
      "class": this.tableBaseClass.paginationWrap,
      "style": {
        opacity: Number(this.showAffixPagination)
      }
    }, [this.renderPagination(h)]);
    const bottom = !!bottomContent && h("div", {
      "class": this.tableBaseClass.bottomContent
    }, [bottomContent]);
    return h("div", {
      "ref": "tableRef",
      "class": this.dynamicBaseTableClasses,
      "style": "position: relative"
    }, [!!topContent && h("div", {
      "class": this.tableBaseClass.topContent
    }, [topContent]), this.renderAffixedHeader(columns), tableContent, this.renderAffixedFooter(columns), loadingContent, this.showRightDivider && h("div", {
      "class": this.tableBaseClass.scrollbarDivider,
      "style": {
        right: `${this.scrollbarWidth}px`,
        height: `${(_this$tableContentRef = this.tableContentRef) === null || _this$tableContentRef === void 0 ? void 0 : _this$tableContentRef.getBoundingClientRect().height}px`
      }
    }), bottom, this.horizontalScrollAffixedBottom && h(components_affix_index.Affix, helper$1.helper([{
      "attrs": {
        "offsetBottom": 0
      }
    }, {
      "props": components_table_utils.getAffixProps(this.horizontalScrollAffixedBottom)
    }, {
      "style": this.showAffixFooter ? {
        marginTop: `-${this.scrollbarWidth * 2}px`
      } : {
        float: "right",
        visibility: "hidden"
      },
      "ref": "horizontalScrollAffixRef"
    }]), [h("div", {
      "ref": "horizontalScrollbarRef",
      "class": ["scrollbar", this.tableBaseClass.obviousScrollbar],
      "style": {
        width: `${this.tableWidth}px`,
        overflow: "auto",
        opacity: Number(this.showAffixFooter)
      }
    }, [h("div", {
      "style": {
        width: `${this.tableElmWidth}px`,
        height: "5px"
      }
    })])]), this.paginationAffixedBottom ? h(components_affix_index.Affix, helper$1.helper([{
      "attrs": {
        "offsetBottom": 0
      }
    }, {
      "props": components_table_utils.getAffixProps(this.paginationAffixedBottom)
    }, {
      "ref": "paginationAffixRef"
    }]), [pagination]) : pagination, h("div", {
      "ref": "resizeLineRef",
      "class": this.tableBaseClass.resizeLine,
      "style": this.resizeLineStyle
    })]);
  }
});

exports.BASE_TABLE_ALL_EVENTS = BASE_TABLE_ALL_EVENTS;
exports.BASE_TABLE_EVENTS = BASE_TABLE_EVENTS;
exports["default"] = _BaseTable;
//# sourceMappingURL=base-table.js.map
