reke-ui 0.3.0 → 0.4.1
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/README.md +6 -0
- package/custom-elements.json +1888 -445
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/components/reke-chip/reke-chip.d.ts +7 -0
- package/dist/components/reke-chip/reke-chip.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.js +8 -2
- package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.styles.js +32 -0
- package/dist/components/reke-combobox/reke-combobox.d.ts +21 -1
- package/dist/components/reke-combobox/reke-combobox.d.ts.map +1 -1
- package/dist/components/reke-combobox/reke-combobox.js +76 -16
- package/dist/components/reke-combobox/reke-combobox.styles.d.ts.map +1 -1
- package/dist/components/reke-combobox/reke-combobox.styles.js +128 -0
- package/dist/components/reke-input/reke-input.d.ts +14 -0
- package/dist/components/reke-input/reke-input.d.ts.map +1 -1
- package/dist/components/reke-input/reke-input.js +41 -22
- package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -1
- package/dist/components/reke-input/reke-input.styles.js +44 -16
- package/dist/components/reke-menu/reke-menu.d.ts +51 -0
- package/dist/components/reke-menu/reke-menu.d.ts.map +1 -0
- package/dist/components/reke-menu/reke-menu.js +106 -0
- package/dist/components/reke-menu/reke-menu.styles.d.ts +2 -0
- package/dist/components/reke-menu/reke-menu.styles.d.ts.map +1 -0
- package/dist/components/reke-menu/reke-menu.styles.js +25 -0
- package/dist/components/reke-menu-item/reke-menu-item.d.ts +32 -0
- package/dist/components/reke-menu-item/reke-menu-item.d.ts.map +1 -0
- package/dist/components/reke-menu-item/reke-menu-item.js +49 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.d.ts +2 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.d.ts.map +1 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.js +53 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +59 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.js +117 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts +2 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +28 -0
- package/dist/components/reke-table/reke-table.d.ts +202 -3
- package/dist/components/reke-table/reke-table.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.js +244 -64
- package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.styles.js +29 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -7
- package/dist/node_modules/echarts/lib/animation/basicTransition.js +70 -0
- package/dist/node_modules/echarts/lib/chart/custom/customSeriesRegister.js +7 -0
- package/dist/node_modules/echarts/lib/chart/helper/createRenderPlanner.js +11 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +11 -0
- package/dist/node_modules/echarts/lib/chart/helper/sectorHelper.js +19 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +112 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieView.js +119 -0
- package/dist/node_modules/echarts/lib/chart/pie/install.js +12 -0
- package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +190 -0
- package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +72 -0
- package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +554 -0
- package/dist/node_modules/echarts/lib/component/axis/AxisView.js +36 -0
- package/dist/node_modules/echarts/lib/component/axis/axisAction.js +4 -0
- package/dist/node_modules/echarts/lib/component/axis/axisBreakHelper.js +5 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js +57 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/AxisPointerView.js +28 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +174 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +65 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/axisTrigger.js +189 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js +27 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/globalListener.js +56 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/install.js +25 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/modelHelper.js +117 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +103 -0
- package/dist/node_modules/echarts/lib/component/helper/listComponent.js +20 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +184 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendView.js +227 -0
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendModel.js +45 -0
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +145 -0
- package/dist/node_modules/echarts/lib/component/legend/install.js +9 -0
- package/dist/node_modules/echarts/lib/component/legend/installLegendPlain.js +12 -0
- package/dist/node_modules/echarts/lib/component/legend/installLegendScroll.js +11 -0
- package/dist/node_modules/echarts/lib/component/legend/legendAction.js +38 -0
- package/dist/node_modules/echarts/lib/component/legend/legendFilter.js +12 -0
- package/dist/node_modules/echarts/lib/component/legend/scrollableLegendAction.js +15 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js +170 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipModel.js +55 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +102 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +367 -0
- package/dist/node_modules/echarts/lib/component/tooltip/helper.js +37 -0
- package/dist/node_modules/echarts/lib/component/tooltip/install.js +19 -0
- package/dist/node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.js +56 -0
- package/dist/node_modules/echarts/lib/component/tooltip/tooltipMarkup.js +173 -0
- package/dist/node_modules/echarts/lib/coord/axisBand.js +31 -0
- package/dist/node_modules/echarts/lib/coord/axisHelper.js +21 -0
- package/dist/node_modules/echarts/lib/coord/axisStatistics.js +38 -0
- package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +14 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +31 -0
- package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +50 -0
- package/dist/node_modules/echarts/lib/core/ExtensionAPI.js +32 -0
- package/dist/node_modules/echarts/lib/core/Scheduler.js +203 -0
- package/dist/node_modules/echarts/lib/core/echarts.js +986 -0
- package/dist/node_modules/echarts/lib/core/impl.js +11 -0
- package/dist/node_modules/echarts/lib/core/lifecycle.js +5 -0
- package/dist/node_modules/echarts/lib/core/locale.js +27 -0
- package/dist/node_modules/echarts/lib/core/task.js +81 -0
- package/dist/node_modules/echarts/lib/data/DataDiffer.js +68 -0
- package/dist/node_modules/echarts/lib/data/DataStore.js +359 -0
- package/dist/node_modules/echarts/lib/data/SeriesData.js +328 -0
- package/dist/node_modules/echarts/lib/data/SeriesDimensionDefine.js +10 -0
- package/dist/node_modules/echarts/lib/data/Source.js +132 -0
- package/dist/node_modules/echarts/lib/data/helper/SeriesDataSchema.js +80 -0
- package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +105 -0
- package/dist/node_modules/echarts/lib/data/helper/dataProvider.js +155 -0
- package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +87 -0
- package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +50 -0
- package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +98 -0
- package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +115 -0
- package/dist/node_modules/echarts/lib/data/helper/transform.js +145 -0
- package/dist/node_modules/echarts/lib/extension.js +62 -0
- package/dist/node_modules/echarts/lib/i18n/langEN.js +148 -0
- package/dist/node_modules/echarts/lib/i18n/langZH.js +148 -0
- package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +106 -0
- package/dist/node_modules/echarts/lib/label/labelLayoutHelper.js +152 -0
- package/dist/node_modules/echarts/lib/label/labelStyle.js +190 -0
- package/dist/node_modules/echarts/lib/legacy/dataSelectAction.js +53 -0
- package/dist/node_modules/echarts/lib/loading/default.js +85 -0
- package/dist/node_modules/echarts/lib/model/Component.js +64 -0
- package/dist/node_modules/echarts/lib/model/Global.js +320 -0
- package/dist/node_modules/echarts/lib/model/Model.js +50 -0
- package/dist/node_modules/echarts/lib/model/OptionManager.js +78 -0
- package/dist/node_modules/echarts/lib/model/Series.js +216 -0
- package/dist/node_modules/echarts/lib/model/globalDefault.js +94 -0
- package/dist/node_modules/echarts/lib/model/internalComponentCreator.js +14 -0
- package/dist/node_modules/echarts/lib/model/mixin/areaStyle.js +16 -0
- package/dist/node_modules/echarts/lib/model/mixin/dataFormat.js +63 -0
- package/dist/node_modules/echarts/lib/model/mixin/itemStyle.js +24 -0
- package/dist/node_modules/echarts/lib/model/mixin/lineStyle.js +23 -0
- package/dist/node_modules/echarts/lib/model/mixin/makeStyleMapper.js +17 -0
- package/dist/node_modules/echarts/lib/model/mixin/palette.js +32 -0
- package/dist/node_modules/echarts/lib/model/mixin/textStyle.js +36 -0
- package/dist/node_modules/echarts/lib/preprocessor/backwardCompat.js +89 -0
- package/dist/node_modules/echarts/lib/preprocessor/helper/compatStyle.js +118 -0
- package/dist/node_modules/echarts/lib/processor/dataFilter.js +18 -0
- package/dist/node_modules/echarts/lib/processor/dataStack.js +52 -0
- package/dist/node_modules/echarts/lib/processor/negativeDataFilter.js +16 -0
- package/dist/node_modules/echarts/lib/renderer/installCanvasRenderer.js +7 -0
- package/dist/node_modules/echarts/lib/scale/break.js +9 -0
- package/dist/node_modules/echarts/lib/scale/helper.js +9 -0
- package/dist/node_modules/echarts/lib/scale/scaleMapper.js +26 -0
- package/dist/node_modules/echarts/lib/theme/dark.js +159 -0
- package/dist/node_modules/echarts/lib/util/ECEventProcessor.js +52 -0
- package/dist/node_modules/echarts/lib/util/clazz.js +99 -0
- package/dist/node_modules/echarts/lib/util/component.js +75 -0
- package/dist/node_modules/echarts/lib/util/cycleCache.js +14 -0
- package/dist/node_modules/echarts/lib/util/decal.js +162 -0
- package/dist/node_modules/echarts/lib/util/event.js +7 -0
- package/dist/node_modules/echarts/lib/util/format.js +87 -0
- package/dist/node_modules/echarts/lib/util/graphic.js +361 -0
- package/dist/node_modules/echarts/lib/util/innerStore.js +13 -0
- package/dist/node_modules/echarts/lib/util/layout.js +174 -0
- package/dist/node_modules/echarts/lib/util/log.js +54 -0
- package/dist/node_modules/echarts/lib/util/model.js +296 -0
- package/dist/node_modules/echarts/lib/util/number.js +132 -0
- package/dist/node_modules/echarts/lib/util/states.js +323 -0
- package/dist/node_modules/echarts/lib/util/symbol.js +146 -0
- package/dist/node_modules/echarts/lib/util/throttle.js +37 -0
- package/dist/node_modules/echarts/lib/util/time.js +43 -0
- package/dist/node_modules/echarts/lib/util/types.js +13 -0
- package/dist/node_modules/echarts/lib/view/Chart.js +81 -0
- package/dist/node_modules/echarts/lib/view/Component.js +16 -0
- package/dist/node_modules/echarts/lib/visual/LegendVisualProvider.js +18 -0
- package/dist/node_modules/echarts/lib/visual/decal.js +25 -0
- package/dist/node_modules/echarts/lib/visual/helper.js +23 -0
- package/dist/node_modules/echarts/lib/visual/style.js +79 -0
- package/dist/node_modules/echarts/lib/visual/symbol.js +47 -0
- package/dist/node_modules/echarts/lib/visual/tokens.js +108 -0
- package/dist/node_modules/echarts/node_modules/tslib/tslib.es6.js +18 -0
- package/dist/node_modules/zrender/lib/Element.js +442 -0
- package/dist/node_modules/zrender/lib/Handler.js +167 -0
- package/dist/node_modules/zrender/lib/Storage.js +68 -0
- package/dist/node_modules/zrender/lib/animation/Animation.js +65 -0
- package/dist/node_modules/zrender/lib/animation/Animator.js +348 -0
- package/dist/node_modules/zrender/lib/animation/Clip.js +31 -0
- package/dist/node_modules/zrender/lib/animation/cubicEasing.js +17 -0
- package/dist/node_modules/zrender/lib/animation/easing.js +104 -0
- package/dist/node_modules/zrender/lib/animation/requestAnimationFrame.js +7 -0
- package/dist/node_modules/zrender/lib/canvas/Layer.js +135 -0
- package/dist/node_modules/zrender/lib/canvas/Painter.js +352 -0
- package/dist/node_modules/zrender/lib/canvas/dashStyle.js +17 -0
- package/dist/node_modules/zrender/lib/canvas/graphic.js +199 -0
- package/dist/node_modules/zrender/lib/canvas/helper.js +33 -0
- package/dist/node_modules/zrender/lib/config.js +7 -0
- package/dist/node_modules/zrender/lib/contain/arc.js +20 -0
- package/dist/node_modules/zrender/lib/contain/cubic.js +9 -0
- package/dist/node_modules/zrender/lib/contain/line.js +12 -0
- package/dist/node_modules/zrender/lib/contain/path.js +133 -0
- package/dist/node_modules/zrender/lib/contain/quadratic.js +9 -0
- package/dist/node_modules/zrender/lib/contain/text.js +106 -0
- package/dist/node_modules/zrender/lib/contain/util.js +7 -0
- package/dist/node_modules/zrender/lib/contain/windingLine.js +10 -0
- package/dist/node_modules/zrender/lib/core/BoundingRect.js +111 -0
- package/dist/node_modules/zrender/lib/core/Eventful.js +82 -0
- package/dist/node_modules/zrender/lib/core/GestureMgr.js +56 -0
- package/dist/node_modules/zrender/lib/core/LRU.js +49 -0
- package/dist/node_modules/zrender/lib/core/OrientedBoundingRect.js +41 -0
- package/dist/node_modules/zrender/lib/core/PathProxy.js +288 -0
- package/dist/node_modules/zrender/lib/core/Point.js +72 -0
- package/dist/node_modules/zrender/lib/core/Transformable.js +96 -0
- package/dist/node_modules/zrender/lib/core/WeakMap.js +25 -0
- package/dist/node_modules/zrender/lib/core/bbox.js +40 -0
- package/dist/node_modules/zrender/lib/core/curve.js +142 -0
- package/dist/node_modules/zrender/lib/core/dom.js +74 -0
- package/dist/node_modules/zrender/lib/core/env.js +22 -0
- package/dist/node_modules/zrender/lib/core/event.js +58 -0
- package/dist/node_modules/zrender/lib/core/fourPointsTransform.js +109 -0
- package/dist/node_modules/zrender/lib/core/matrix.js +39 -0
- package/dist/node_modules/zrender/lib/core/platform.js +42 -0
- package/dist/node_modules/zrender/lib/core/timsort.js +246 -0
- package/dist/node_modules/zrender/lib/core/util.js +314 -0
- package/dist/node_modules/zrender/lib/core/vector.js +52 -0
- package/dist/node_modules/zrender/lib/dom/HandlerProxy.js +190 -0
- package/dist/node_modules/zrender/lib/graphic/CompoundPath.js +25 -0
- package/dist/node_modules/zrender/lib/graphic/Displayable.js +133 -0
- package/dist/node_modules/zrender/lib/graphic/Gradient.js +14 -0
- package/dist/node_modules/zrender/lib/graphic/Group.js +86 -0
- package/dist/node_modules/zrender/lib/graphic/Image.js +49 -0
- package/dist/node_modules/zrender/lib/graphic/IncrementalDisplayable.js +65 -0
- package/dist/node_modules/zrender/lib/graphic/LinearGradient.js +13 -0
- package/dist/node_modules/zrender/lib/graphic/Path.js +200 -0
- package/dist/node_modules/zrender/lib/graphic/RadialGradient.js +13 -0
- package/dist/node_modules/zrender/lib/graphic/TSpan.js +39 -0
- package/dist/node_modules/zrender/lib/graphic/Text.js +216 -0
- package/dist/node_modules/zrender/lib/graphic/helper/image.js +39 -0
- package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +226 -0
- package/dist/node_modules/zrender/lib/graphic/helper/poly.js +21 -0
- package/dist/node_modules/zrender/lib/graphic/helper/roundRect.js +9 -0
- package/dist/node_modules/zrender/lib/graphic/helper/roundSector.js +85 -0
- package/dist/node_modules/zrender/lib/graphic/helper/smoothBezier.js +26 -0
- package/dist/node_modules/zrender/lib/graphic/helper/subPixelOptimize.js +25 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Arc.js +28 -0
- package/dist/node_modules/zrender/lib/graphic/shape/BezierCurve.js +40 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Circle.js +22 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Ellipse.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Line.js +37 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Polygon.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Polyline.js +28 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Rect.js +31 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Ring.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Sector.js +25 -0
- package/dist/node_modules/zrender/lib/mixin/Draggable.js +28 -0
- package/dist/node_modules/zrender/lib/svg/helper.js +19 -0
- package/dist/node_modules/zrender/lib/tool/color.js +1039 -0
- package/dist/node_modules/zrender/lib/tool/path.js +153 -0
- package/dist/node_modules/zrender/lib/tool/transformPath.js +41 -0
- package/dist/node_modules/zrender/lib/zrender.js +124 -0
- package/dist/node_modules/zrender/node_modules/tslib/tslib.es6.js +18 -0
- package/dist/react-bridge/table.d.ts.map +1 -1
- package/dist/react-bridge/table.js +36 -21
- package/dist/react.d.ts +8 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +58 -46
- package/dist/shared/base-element.d.ts +1 -0
- package/dist/shared/base-element.d.ts.map +1 -1
- package/dist/shared/base-element.js +6 -0
- package/dist/shared/tailwind.js +1 -1
- package/dist/tokens/reke-tokens.css +15 -0
- package/package.json +15 -1
|
@@ -4,9 +4,11 @@ import { styles as n } from "./reke-table.styles.js";
|
|
|
4
4
|
import { html as r, nothing as i } from "lit";
|
|
5
5
|
import { customElement as a, property as o, state as s } from "lit/decorators.js";
|
|
6
6
|
import { classMap as c } from "lit/directives/class-map.js";
|
|
7
|
-
import {
|
|
7
|
+
import { guard as l } from "lit/directives/guard.js";
|
|
8
|
+
import { ref as u } from "lit/directives/ref.js";
|
|
8
9
|
//#region src/components/reke-table/reke-table.ts
|
|
9
|
-
|
|
10
|
+
var d = 400, f = 20;
|
|
11
|
+
function p() {
|
|
10
12
|
try {
|
|
11
13
|
let e = {
|
|
12
14
|
BASE_URL: "/",
|
|
@@ -24,13 +26,144 @@ function u() {
|
|
|
24
26
|
} catch {}
|
|
25
27
|
return !1;
|
|
26
28
|
}
|
|
27
|
-
var
|
|
29
|
+
var m = class extends e {
|
|
28
30
|
constructor(...e) {
|
|
29
|
-
super(...e), this.columns = [], this.rows = [], this.striped = !1, this.dense = !1, this.hoverable = !1, this.bordered = !1, this.borderless = !1, this.expandable = !1, this.expandOnRowClick = !1, this.sortKey = "", this.sortDirection = "asc", this.expandedRowElement = null, this.expandedRows = /* @__PURE__ */ new Set(), this._hostCache = /* @__PURE__ */ new Map(), this._cleanupMap = /* @__PURE__ */ new Map(), this._warnedDupKeys = /* @__PURE__ */ new Set(), this._warnedNumericTarget = !1, this._mountedKeys = /* @__PURE__ */ new Set(), this._collapsingKeys = /* @__PURE__ */ new Set(), this._enteringKeys = /* @__PURE__ */ new Set(), this.
|
|
31
|
+
super(...e), this.columns = [], this.rows = [], this.striped = !1, this.dense = !1, this.hoverable = !1, this.bordered = !1, this.borderless = !1, this.expandable = !1, this.expandOnRowClick = !1, this.virtualized = !1, this.rowHeight = 0, this.maxHeight = "", this.overscan = 4, this.sortKey = "", this.sortDirection = "asc", this.expandedRowElement = null, this.expandedRows = /* @__PURE__ */ new Set(), this._hostCache = /* @__PURE__ */ new Map(), this._cleanupMap = /* @__PURE__ */ new Map(), this._warnedDupKeys = /* @__PURE__ */ new Set(), this._warnedNumericTarget = !1, this._mountedKeys = /* @__PURE__ */ new Set(), this._collapsingKeys = /* @__PURE__ */ new Set(), this._enteringKeys = /* @__PURE__ */ new Set(), this._collapseTokens = /* @__PURE__ */ new Map(), this._collapseSeq = 0, this._keyToRow = /* @__PURE__ */ new Map(), this._keyToIndex = /* @__PURE__ */ new Map(), this._expandedHeights = /* @__PURE__ */ new Map(), this._expandRowElements = /* @__PURE__ */ new Map(), this._expandRowKeys = /* @__PURE__ */ new WeakMap(), this._expandRowRefs = /* @__PURE__ */ new Map(), this._expandObserver = null, this._windowStart = 0, this._windowEnd = 0, this._previousWindowStart = 0, this._previousWindowEnd = 0, this._focusInsideRows = !1, this._focusedRowIndex = null, this._onRowsFocusIn = (e) => {
|
|
32
|
+
this._focusInsideRows = !0, this._focusedRowIndex = this._rowIndexOf(e.target);
|
|
33
|
+
}, this._refCallbacks = /* @__PURE__ */ new Map(), this._hasToolbar = !1, this._hasFooter = !1, this._scrollTop = 0, this._viewportHeight = 0, this._scrollContainer = null, this._viewportObserver = null, this._scrollFrame = null, this._onScroll = () => {
|
|
34
|
+
this._scrollFrame === null && (this._scrollFrame = requestAnimationFrame(() => {
|
|
35
|
+
this._scrollFrame = null, this._scrollContainer && (this._scrollTop = this._scrollContainer.scrollTop);
|
|
36
|
+
}));
|
|
37
|
+
}, this._bindScrollContainer = (e) => {
|
|
38
|
+
let t = e ?? null;
|
|
39
|
+
t !== this._scrollContainer && (this._scrollContainer?.removeEventListener("scroll", this._onScroll), this._viewportObserver?.disconnect(), this._viewportObserver = null, this._scrollContainer = t, t && (t.addEventListener("scroll", this._onScroll, { passive: !0 }), this._viewportObserver = new ResizeObserver(() => {
|
|
40
|
+
this._scrollContainer && (this._viewportHeight = this._scrollContainer.clientHeight);
|
|
41
|
+
}), this._viewportObserver.observe(t)));
|
|
42
|
+
}, this._warnedLegacyApi = !1, this._warnedVirtualConfig = !1;
|
|
43
|
+
}
|
|
44
|
+
static {
|
|
45
|
+
this.shadowRootOptions = {
|
|
46
|
+
...e.shadowRootOptions,
|
|
47
|
+
delegatesFocus: !1
|
|
48
|
+
};
|
|
30
49
|
}
|
|
31
50
|
static {
|
|
32
51
|
this.styles = n;
|
|
33
52
|
}
|
|
53
|
+
_rowIndexOf(e) {
|
|
54
|
+
let t = e?.closest?.("tr[aria-rowindex]") ?? null;
|
|
55
|
+
if (!t) return null;
|
|
56
|
+
let n = Number(t.getAttribute("aria-rowindex"));
|
|
57
|
+
return Number.isFinite(n) ? n : null;
|
|
58
|
+
}
|
|
59
|
+
_clearRowFocusTracking() {
|
|
60
|
+
this._focusInsideRows = !1, this._focusedRowIndex = null;
|
|
61
|
+
}
|
|
62
|
+
_extraHeights() {
|
|
63
|
+
if (this._expandedHeights.size === 0) return [];
|
|
64
|
+
let e = [];
|
|
65
|
+
for (let [t, n] of this._expandedHeights) {
|
|
66
|
+
let r = this._keyToIndex.get(t);
|
|
67
|
+
r === void 0 || n <= 0 || e.push({
|
|
68
|
+
index: r,
|
|
69
|
+
extra: n
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return e.sort((e, t) => e.index - t.index);
|
|
73
|
+
}
|
|
74
|
+
_offsetOf(e, t) {
|
|
75
|
+
let n = 0;
|
|
76
|
+
for (let r of t) {
|
|
77
|
+
if (r.index >= e) break;
|
|
78
|
+
n += r.extra;
|
|
79
|
+
}
|
|
80
|
+
return e * this.rowHeight + n;
|
|
81
|
+
}
|
|
82
|
+
_indexAtOffset(e, t, n) {
|
|
83
|
+
let r = 0;
|
|
84
|
+
for (let n of t) {
|
|
85
|
+
if ((n.index + 1) * this.rowHeight + r + n.extra > e) break;
|
|
86
|
+
r += n.extra;
|
|
87
|
+
}
|
|
88
|
+
let i = Math.floor((e - r) / this.rowHeight);
|
|
89
|
+
return Math.min(n, Math.max(0, i));
|
|
90
|
+
}
|
|
91
|
+
_computeWindow() {
|
|
92
|
+
let e = this.rows.length;
|
|
93
|
+
if (!this.virtualized || this.rowHeight <= 0) return {
|
|
94
|
+
start: 0,
|
|
95
|
+
end: e,
|
|
96
|
+
topSpacer: 0,
|
|
97
|
+
bottomSpacer: 0
|
|
98
|
+
};
|
|
99
|
+
let t = this._extraHeights(), n = 0;
|
|
100
|
+
for (let e of t) n += e.extra;
|
|
101
|
+
let r = e * this.rowHeight + n;
|
|
102
|
+
if (this._viewportHeight <= 0) {
|
|
103
|
+
let n = Math.min(e, this.overscan * 2 + f);
|
|
104
|
+
return {
|
|
105
|
+
start: 0,
|
|
106
|
+
end: n,
|
|
107
|
+
topSpacer: 0,
|
|
108
|
+
bottomSpacer: Math.max(0, r - this._offsetOf(n, t))
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
let i = Math.max(0, this._indexAtOffset(this._scrollTop, t, e) - this.overscan), a = this._indexAtOffset(this._scrollTop + this._viewportHeight, t, e), o = Math.min(e, a + 1 + this.overscan);
|
|
112
|
+
return {
|
|
113
|
+
start: i,
|
|
114
|
+
end: o,
|
|
115
|
+
topSpacer: this._offsetOf(i, t),
|
|
116
|
+
bottomSpacer: Math.max(0, r - this._offsetOf(o, t))
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
_expandRowRef(e) {
|
|
120
|
+
let t = this._expandRowRefs.get(e);
|
|
121
|
+
return t || (t = (t) => {
|
|
122
|
+
let n = this._expandRowElements.get(e);
|
|
123
|
+
n && n !== t && (this._expandObserver?.unobserve(n), this._expandRowElements.delete(e)), t && (this._expandRowElements.set(e, t), this._expandRowKeys.set(t, e), this.virtualized && this._ensureExpandObserver().observe(t));
|
|
124
|
+
}, this._expandRowRefs.set(e, t)), t;
|
|
125
|
+
}
|
|
126
|
+
_rescueFocusAfterWindowChange() {
|
|
127
|
+
if (!this._focusInsideRows || !(this._windowStart !== this._previousWindowStart || this._windowEnd !== this._previousWindowEnd)) return;
|
|
128
|
+
if (document.activeElement !== this) {
|
|
129
|
+
this._clearRowFocusTracking();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
let e = this.shadowRoot?.activeElement ?? null;
|
|
133
|
+
if (e) {
|
|
134
|
+
let t = this._rowIndexOf(e);
|
|
135
|
+
if (t === null || t === this._focusedRowIndex) return;
|
|
136
|
+
}
|
|
137
|
+
this._clearRowFocusTracking(), this._scrollContainer?.focus({ preventScroll: !0 });
|
|
138
|
+
}
|
|
139
|
+
_clampScrollToContent() {
|
|
140
|
+
let e = this._scrollContainer;
|
|
141
|
+
if (!e) return;
|
|
142
|
+
let t = Math.max(0, e.scrollHeight - e.clientHeight);
|
|
143
|
+
e.scrollTop > t && (e.scrollTop = t), Math.abs(this._scrollTop - e.scrollTop) > .5 && (this._scrollTop = e.scrollTop);
|
|
144
|
+
}
|
|
145
|
+
_ensureExpandObserver() {
|
|
146
|
+
return this._expandObserver ||= new ResizeObserver((e) => {
|
|
147
|
+
let t = !1, n = 0;
|
|
148
|
+
for (let r of e) {
|
|
149
|
+
let e = this._expandRowKeys.get(r.target);
|
|
150
|
+
if (e === void 0) continue;
|
|
151
|
+
let i = r.borderBoxSize?.[0]?.blockSize ?? r.target.offsetHeight, a = this._expandedHeights.get(e) ?? 0;
|
|
152
|
+
if (Math.abs(a - i) < .5) continue;
|
|
153
|
+
this._expandedHeights.set(e, i), t = !0;
|
|
154
|
+
let o = this._keyToIndex.get(e);
|
|
155
|
+
o !== void 0 && o < this._windowStart && (n += i - a);
|
|
156
|
+
}
|
|
157
|
+
t && (n !== 0 && this._scrollContainer && (this._scrollContainer.scrollTop += n, this._scrollTop = this._scrollContainer.scrollTop), this.requestUpdate());
|
|
158
|
+
}), this._expandObserver;
|
|
159
|
+
}
|
|
160
|
+
_renderSpacerRow(e, t) {
|
|
161
|
+
return e <= 0 ? i : r`
|
|
162
|
+
<tr class="spacer-row" aria-hidden="true" data-position=${t} style=${`height: ${e}px`}>
|
|
163
|
+
<td class="spacer-cell" colspan=${this.columns.length + +!!this.expandable}></td>
|
|
164
|
+
</tr>
|
|
165
|
+
`;
|
|
166
|
+
}
|
|
34
167
|
_resolveKey(e, t) {
|
|
35
168
|
return this.getRowKey ? this.getRowKey(e, t) : String(t);
|
|
36
169
|
}
|
|
@@ -57,14 +190,13 @@ var d = class extends e {
|
|
|
57
190
|
}
|
|
58
191
|
toggleExpand(e) {
|
|
59
192
|
let t, n, r, i = typeof e == "number" && e === Math.trunc(e) && e >= 0 && e < this.rows.length;
|
|
60
|
-
i && this.getRowKey && !this._warnedNumericTarget &&
|
|
193
|
+
i && this.getRowKey && !this._warnedNumericTarget && p() && (this._warnedNumericTarget = !0, console.warn("[reke-table] toggleExpand received a numeric target while `getRowKey` is set; in-range numeric targets are interpreted as row INDICES, not keys. Pass the resolved key to target by identity.")), i ? (n = e, r = this.rows[n], t = this._resolveKey(r, n)) : (t = e, n = this.rows.findIndex((e, n) => this._resolveKey(e, n) === t), r = n >= 0 ? this.rows[n] : void 0);
|
|
61
194
|
let a = new Set(this.expandedRows), o = !a.has(t);
|
|
62
195
|
if (o) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
} else this._collapsingKeys.add(t);
|
|
196
|
+
a.add(t);
|
|
197
|
+
let e = this._collapsingKeys.delete(t);
|
|
198
|
+
this._collapseTokens.delete(t), !e && !this._mountedKeys.has(t) && this._enteringKeys.add(t);
|
|
199
|
+
} else a.delete(t), this._collapsingKeys.add(t), this._enteringKeys.delete(t);
|
|
68
200
|
this.expandedRows = a, this.emit("reke-row-expand", {
|
|
69
201
|
row: r,
|
|
70
202
|
index: n,
|
|
@@ -92,22 +224,16 @@ var d = class extends e {
|
|
|
92
224
|
return t || (t = (t) => {
|
|
93
225
|
if (!t) return;
|
|
94
226
|
let n = t, r = this._getOrCreateHost(e);
|
|
95
|
-
r.parentElement !== n && n.
|
|
96
|
-
let i = n.parentElement;
|
|
97
|
-
if (i && !this._collapseEndHandlers.has(e)) {
|
|
98
|
-
let t = (n) => {
|
|
99
|
-
n.propertyName !== "grid-template-rows" || !this._collapsingKeys.has(e) || (this._collapsingKeys.delete(e), this._collapseEndHandlers.delete(e), i.removeEventListener("transitionend", t), this._safeCleanup(e), this._hostCache.delete(e), this._mountedKeys.delete(e), this._refCallbacks.delete(e), this.expandedRows.has(e) && (this.expandedRows = new Set([...this.expandedRows].filter((t) => t !== e))));
|
|
100
|
-
};
|
|
101
|
-
i.addEventListener("transitionend", t), this._collapseEndHandlers.set(e, t);
|
|
102
|
-
}
|
|
227
|
+
r.parentElement !== n && n.replaceChildren(r);
|
|
103
228
|
}, this._refCallbacks.set(e, t)), t;
|
|
104
229
|
}
|
|
105
230
|
_renderRow(e, t, n) {
|
|
106
|
-
let a = this.expandedRows.has(n), o = `reke-table-expand-${String(n)}`, s = this.columns.length + +!!this.expandable;
|
|
231
|
+
let a = this.expandedRows.has(n), o = `reke-table-expand-${String(n)}`, s = this.columns.length + +!!this.expandable, c = this.expandedRowElement != null && (a || this._collapsingKeys.has(n)) && this._keyToRow.get(n) === e;
|
|
107
232
|
return r`
|
|
108
233
|
<tr
|
|
109
234
|
part="row"
|
|
110
235
|
class="row ${t % 2 == 1 ? "row--even" : ""} ${a ? "row--expanded" : ""}"
|
|
236
|
+
aria-rowindex=${this.virtualized ? t + 2 : i}
|
|
111
237
|
@click=${() => this.handleRowClick(e, t)}
|
|
112
238
|
>
|
|
113
239
|
${this.expandable ? r`
|
|
@@ -139,10 +265,12 @@ var d = class extends e {
|
|
|
139
265
|
</td>
|
|
140
266
|
`)}
|
|
141
267
|
</tr>
|
|
142
|
-
${
|
|
268
|
+
${c ? r`
|
|
143
269
|
<tr
|
|
144
270
|
part="expand-row"
|
|
145
271
|
class="expand-row ${a && !this._enteringKeys.has(n) ? "" : "expand-row--collapsed"}"
|
|
272
|
+
aria-rowindex=${this.virtualized ? t + 2 : i}
|
|
273
|
+
${u(this._expandRowRef(n))}
|
|
146
274
|
>
|
|
147
275
|
<td
|
|
148
276
|
part="expand-content"
|
|
@@ -151,7 +279,7 @@ var d = class extends e {
|
|
|
151
279
|
colspan=${s}
|
|
152
280
|
>
|
|
153
281
|
<div class="expand-grid">
|
|
154
|
-
<div class="expand-inner" ${
|
|
282
|
+
<div class="expand-inner" ${u(this._expandTdRef(n))}></div>
|
|
155
283
|
</div>
|
|
156
284
|
</td>
|
|
157
285
|
</tr>
|
|
@@ -159,33 +287,32 @@ var d = class extends e {
|
|
|
159
287
|
`;
|
|
160
288
|
}
|
|
161
289
|
willUpdate(e) {
|
|
162
|
-
let t =
|
|
163
|
-
t && this.expandedRowRender != null && !this._warnedLegacyApi && (this._warnedLegacyApi = !0, console.error("[reke-table] `expandedRowRender` was removed. Use `expandedRowElement(host, row, key) => Cleanup | void` instead."))
|
|
164
|
-
|
|
290
|
+
let t = p();
|
|
291
|
+
if (t && this.expandedRowRender != null && !this._warnedLegacyApi && (this._warnedLegacyApi = !0, console.error("[reke-table] `expandedRowRender` was removed. Use `expandedRowElement(host, row, key) => Cleanup | void` instead.")), t && this.virtualized && !this._warnedVirtualConfig) {
|
|
292
|
+
let e = [];
|
|
293
|
+
this.rowHeight <= 0 && e.push("`row-height` must be a positive number — row offsets are computed from it"), this.maxHeight || e.push("`max-height` is required — windowing needs a bounded scroll container"), e.length > 0 && (this._warnedVirtualConfig = !0, console.error(`[reke-table] virtualized: ${e.join("; ")}.`));
|
|
294
|
+
}
|
|
295
|
+
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
165
296
|
for (let e = 0; e < this.rows.length; e += 1) {
|
|
166
|
-
let
|
|
167
|
-
n.has(
|
|
297
|
+
let i = this.rows[e], a = this._resolveKey(i, e);
|
|
298
|
+
r.set(a, e), n.has(a) && t && !this._warnedDupKeys.has(a) && (this._warnedDupKeys.add(a), console.warn(`[reke-table] Duplicate getRowKey value detected: ${JSON.stringify(a)}. Last row with this key wins for expand bookkeeping.`)), n.set(a, i);
|
|
168
299
|
}
|
|
169
|
-
this._keyToRow = n;
|
|
300
|
+
this._keyToRow = n, this._keyToIndex = r;
|
|
170
301
|
}
|
|
171
302
|
updated(e) {
|
|
172
|
-
if (!this.expandedRowElement) {
|
|
303
|
+
if (this.virtualized && (this._rescueFocusAfterWindowChange(), this._clampScrollToContent()), !this.expandedRowElement) {
|
|
173
304
|
this._runAllCleanupsAndClear();
|
|
174
305
|
for (let e of Array.from(this.expandedRows)) this._keyToRow.has(e) || this.expandedRows.delete(e);
|
|
175
306
|
return;
|
|
176
307
|
}
|
|
177
|
-
let t = /* @__PURE__ */ new Set([
|
|
308
|
+
let t = /* @__PURE__ */ new Set([
|
|
309
|
+
...this.expandedRows,
|
|
310
|
+
...this._collapsingKeys,
|
|
311
|
+
...this._hostCache.keys()
|
|
312
|
+
]);
|
|
178
313
|
for (let e of t) {
|
|
179
|
-
let t = this._keyToRow.has(e)
|
|
180
|
-
t &&
|
|
181
|
-
}
|
|
182
|
-
if (this._collapsingKeys.size > 0) {
|
|
183
|
-
let e = [...this._collapsingKeys];
|
|
184
|
-
requestAnimationFrame(() => {
|
|
185
|
-
let t = new Set(this.expandedRows);
|
|
186
|
-
for (let n of e) t.delete(n);
|
|
187
|
-
this.expandedRows = t;
|
|
188
|
-
});
|
|
314
|
+
let t = this._keyToRow.has(e);
|
|
315
|
+
t && (this.expandedRows.has(e) || this._collapsingKeys.has(e)) || (this._teardownKey(e), t || this.expandedRows.delete(e));
|
|
189
316
|
}
|
|
190
317
|
for (let e of this.expandedRows) {
|
|
191
318
|
if (this._mountedKeys.has(e)) continue;
|
|
@@ -194,10 +321,31 @@ var d = class extends e {
|
|
|
194
321
|
let n = this._getOrCreateHost(e), r = this.expandedRowElement(n, t, e);
|
|
195
322
|
typeof r == "function" && this._cleanupMap.set(e, r), this._mountedKeys.add(e);
|
|
196
323
|
}
|
|
324
|
+
for (let e of this._collapsingKeys) this._collapseTokens.has(e) || this._scheduleCollapseTeardown(e);
|
|
197
325
|
this._enteringKeys.size > 0 && (this.offsetHeight, requestAnimationFrame(() => {
|
|
198
|
-
this._enteringKeys.clear(), this.requestUpdate();
|
|
326
|
+
this._enteringKeys.size !== 0 && (this._enteringKeys.clear(), this.requestUpdate());
|
|
199
327
|
}));
|
|
200
328
|
}
|
|
329
|
+
_scheduleCollapseTeardown(e) {
|
|
330
|
+
this._collapseSeq += 1;
|
|
331
|
+
let t = this._collapseSeq;
|
|
332
|
+
this._collapseTokens.set(e, t);
|
|
333
|
+
let n = this._hostCache.get(e)?.parentElement?.parentElement ?? null, r = [];
|
|
334
|
+
n && (getComputedStyle(n).gridTemplateRows, r = n.getAnimations({ subtree: !0 }));
|
|
335
|
+
let i = new Promise((e) => {
|
|
336
|
+
requestAnimationFrame(() => e());
|
|
337
|
+
}), a = Promise.all([Promise.allSettled(r.map((e) => e.finished)), i]), o = new Promise((e) => {
|
|
338
|
+
setTimeout(e, d);
|
|
339
|
+
});
|
|
340
|
+
Promise.race([a, o]).then(() => {
|
|
341
|
+
this._collapseTokens.get(e) === t && (this._teardownKey(e), this.requestUpdate());
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
_teardownKey(e) {
|
|
345
|
+
this._safeCleanup(e), this._hostCache.get(e)?.remove(), this._hostCache.delete(e), this._mountedKeys.delete(e), this._refCallbacks.delete(e), this._collapsingKeys.delete(e), this._collapseTokens.delete(e), this._enteringKeys.delete(e);
|
|
346
|
+
let t = this._expandRowElements.get(e);
|
|
347
|
+
t && this._expandObserver?.unobserve(t), this._expandRowElements.delete(e), this._expandRowRefs.delete(e), this._expandedHeights.delete(e);
|
|
348
|
+
}
|
|
201
349
|
_safeCleanup(e) {
|
|
202
350
|
let t = this._cleanupMap.get(e);
|
|
203
351
|
if (t) {
|
|
@@ -208,15 +356,16 @@ var d = class extends e {
|
|
|
208
356
|
}
|
|
209
357
|
}
|
|
210
358
|
_runAllCleanupsAndClear() {
|
|
211
|
-
|
|
212
|
-
this._collapsingKeys.clear(), this._collapseEndHandlers.clear();
|
|
359
|
+
this._collapsingKeys.clear(), this._collapseTokens.clear(), this._enteringKeys.clear();
|
|
213
360
|
for (let e of this._cleanupMap.values()) try {
|
|
214
361
|
e();
|
|
215
362
|
} catch {}
|
|
216
|
-
this._cleanupMap.clear()
|
|
363
|
+
this._cleanupMap.clear();
|
|
364
|
+
for (let e of this._hostCache.values()) e.remove();
|
|
365
|
+
this._hostCache.clear(), this._expandObserver?.disconnect(), this._expandRowElements.clear(), this._expandRowRefs.clear(), this._expandedHeights.clear(), this._mountedKeys.clear(), this._refCallbacks.clear();
|
|
217
366
|
}
|
|
218
367
|
disconnectedCallback() {
|
|
219
|
-
super.disconnectedCallback(), this._runAllCleanupsAndClear();
|
|
368
|
+
super.disconnectedCallback(), this._runAllCleanupsAndClear(), this._scrollContainer?.removeEventListener("scroll", this._onScroll), this._scrollContainer = null, this._viewportObserver?.disconnect(), this._viewportObserver = null, this._expandObserver?.disconnect(), this._expandObserver = null, this._scrollFrame !== null && (cancelAnimationFrame(this._scrollFrame), this._scrollFrame = null);
|
|
220
369
|
}
|
|
221
370
|
render() {
|
|
222
371
|
let e = {
|
|
@@ -224,9 +373,10 @@ var d = class extends e {
|
|
|
224
373
|
"table--striped": this.striped,
|
|
225
374
|
"table--dense": this.dense,
|
|
226
375
|
"table--hoverable": this.hoverable,
|
|
227
|
-
"table--bordered": this.bordered
|
|
228
|
-
|
|
229
|
-
|
|
376
|
+
"table--bordered": this.bordered,
|
|
377
|
+
"table--fixed-layout": this.virtualized
|
|
378
|
+
}, { start: t, end: n, topSpacer: a, bottomSpacer: o } = this._computeWindow(), s = this.rows.length, d = this.virtualized ? this.rows.slice(t, n) : this.rows;
|
|
379
|
+
return this._previousWindowStart = this._windowStart, this._previousWindowEnd = this._windowEnd, this._windowStart = t, this._windowEnd = n, r`
|
|
230
380
|
<div class="table-container">
|
|
231
381
|
${this._hasToolbar ? r`
|
|
232
382
|
<div part="toolbar" class="table-toolbar">
|
|
@@ -234,8 +384,20 @@ var d = class extends e {
|
|
|
234
384
|
</div>
|
|
235
385
|
` : r`<slot name="toolbar" @slotchange=${this._onToolbarSlotChange} style="display:none"></slot>`}
|
|
236
386
|
|
|
237
|
-
<div
|
|
238
|
-
|
|
387
|
+
<div
|
|
388
|
+
class="table-wrapper ${this.virtualized ? "table-wrapper--virtualized" : ""}"
|
|
389
|
+
style=${this.virtualized && this.maxHeight ? `max-height: ${this.maxHeight}` : ""}
|
|
390
|
+
tabindex=${this.virtualized ? 0 : i}
|
|
391
|
+
role=${this.virtualized ? "group" : i}
|
|
392
|
+
aria-label=${this.virtualized ? "Scrollable table" : i}
|
|
393
|
+
${u(this._bindScrollContainer)}
|
|
394
|
+
>
|
|
395
|
+
<table
|
|
396
|
+
part="table"
|
|
397
|
+
class=${c(e)}
|
|
398
|
+
role="table"
|
|
399
|
+
aria-rowcount=${this.virtualized ? s : i}
|
|
400
|
+
>
|
|
239
401
|
<thead part="header">
|
|
240
402
|
<tr>
|
|
241
403
|
${this.expandable ? r`
|
|
@@ -261,11 +423,23 @@ var d = class extends e {
|
|
|
261
423
|
`)}
|
|
262
424
|
</tr>
|
|
263
425
|
</thead>
|
|
264
|
-
<tbody part="body">
|
|
265
|
-
${this.
|
|
266
|
-
|
|
267
|
-
|
|
426
|
+
<tbody part="body" @focusin=${this._onRowsFocusIn}>
|
|
427
|
+
${this._renderSpacerRow(a, "top")}
|
|
428
|
+
${d.map((e, n) => {
|
|
429
|
+
let r = t + n, i = this._resolveKey(e, r);
|
|
430
|
+
return l([
|
|
431
|
+
e,
|
|
432
|
+
r,
|
|
433
|
+
this.rows,
|
|
434
|
+
this.columns,
|
|
435
|
+
this.expandable,
|
|
436
|
+
this.expandedRowElement,
|
|
437
|
+
this.expandedRows.has(i),
|
|
438
|
+
this._collapsingKeys.has(i),
|
|
439
|
+
this._enteringKeys.has(i)
|
|
440
|
+
], () => this._renderRow(e, r, i));
|
|
268
441
|
})}
|
|
442
|
+
${this._renderSpacerRow(o, "bottom")}
|
|
269
443
|
${this.rows.length === 0 ? r`
|
|
270
444
|
<tr class="row row--empty">
|
|
271
445
|
<td
|
|
@@ -289,34 +463,40 @@ var d = class extends e {
|
|
|
289
463
|
`;
|
|
290
464
|
}
|
|
291
465
|
};
|
|
292
|
-
t([o({ attribute: !1 })],
|
|
466
|
+
t([o({ attribute: !1 })], m.prototype, "columns", void 0), t([o({ attribute: !1 })], m.prototype, "rows", void 0), t([o({
|
|
293
467
|
type: Boolean,
|
|
294
468
|
reflect: !0
|
|
295
|
-
})],
|
|
469
|
+
})], m.prototype, "striped", void 0), t([o({
|
|
296
470
|
type: Boolean,
|
|
297
471
|
reflect: !0
|
|
298
|
-
})],
|
|
472
|
+
})], m.prototype, "dense", void 0), t([o({
|
|
299
473
|
type: Boolean,
|
|
300
474
|
reflect: !0
|
|
301
|
-
})],
|
|
475
|
+
})], m.prototype, "hoverable", void 0), t([o({
|
|
302
476
|
type: Boolean,
|
|
303
477
|
reflect: !0
|
|
304
|
-
})],
|
|
478
|
+
})], m.prototype, "bordered", void 0), t([o({
|
|
305
479
|
type: Boolean,
|
|
306
480
|
reflect: !0
|
|
307
|
-
})],
|
|
481
|
+
})], m.prototype, "borderless", void 0), t([o({
|
|
308
482
|
type: Boolean,
|
|
309
483
|
reflect: !0
|
|
310
|
-
})],
|
|
484
|
+
})], m.prototype, "expandable", void 0), t([o({
|
|
311
485
|
type: Boolean,
|
|
312
486
|
reflect: !0,
|
|
313
487
|
attribute: "expand-on-row-click"
|
|
314
|
-
})],
|
|
488
|
+
})], m.prototype, "expandOnRowClick", void 0), t([o({
|
|
489
|
+
type: Boolean,
|
|
490
|
+
reflect: !0
|
|
491
|
+
})], m.prototype, "virtualized", void 0), t([o({
|
|
492
|
+
type: Number,
|
|
493
|
+
attribute: "row-height"
|
|
494
|
+
})], m.prototype, "rowHeight", void 0), t([o({ attribute: "max-height" })], m.prototype, "maxHeight", void 0), t([o({ type: Number })], m.prototype, "overscan", void 0), t([o({
|
|
315
495
|
reflect: !0,
|
|
316
496
|
attribute: "sort-key"
|
|
317
|
-
})],
|
|
497
|
+
})], m.prototype, "sortKey", void 0), t([o({
|
|
318
498
|
reflect: !0,
|
|
319
499
|
attribute: "sort-direction"
|
|
320
|
-
})],
|
|
500
|
+
})], m.prototype, "sortDirection", void 0), t([o({ attribute: !1 })], m.prototype, "expandedRowElement", void 0), t([o({ attribute: !1 })], m.prototype, "getRowKey", void 0), t([o({ attribute: !1 })], m.prototype, "expandedRows", void 0), t([s()], m.prototype, "_hasToolbar", void 0), t([s()], m.prototype, "_hasFooter", void 0), t([s()], m.prototype, "_scrollTop", void 0), t([s()], m.prototype, "_viewportHeight", void 0), m = t([a("reke-table")], m);
|
|
321
501
|
//#endregion
|
|
322
|
-
export {
|
|
502
|
+
export { m as RekeTable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reke-table.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-table/reke-table.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"reke-table.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-table/reke-table.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,2BA+TlB,CAAC"}
|
|
@@ -18,6 +18,35 @@ var n = [e, t`
|
|
|
18
18
|
overflow-x: auto;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
/* === Virtualization === */
|
|
22
|
+
|
|
23
|
+
/* The scroll container the window is computed against. Its max-height is
|
|
24
|
+
set inline from the maxHeight prop. */
|
|
25
|
+
.table-wrapper--virtualized {
|
|
26
|
+
overflow-y: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Column widths must not depend on which rows happen to be rendered, or they
|
|
30
|
+
would shift while scrolling. Fixed layout resolves them from the header. */
|
|
31
|
+
.table--fixed-layout {
|
|
32
|
+
table-layout: fixed;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.table-wrapper--virtualized thead {
|
|
36
|
+
position: sticky;
|
|
37
|
+
top: 0;
|
|
38
|
+
z-index: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Stands in for the rows outside the window. Contributes scroll height and
|
|
42
|
+
nothing else — no padding, no borders, not exposed to assistive tech. */
|
|
43
|
+
.spacer-row,
|
|
44
|
+
.spacer-cell {
|
|
45
|
+
padding: 0;
|
|
46
|
+
border: none;
|
|
47
|
+
background: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
21
50
|
.table {
|
|
22
51
|
width: 100%;
|
|
23
52
|
border-collapse: collapse;
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,11 @@ export { RekeDialog } from './components/reke-dialog/reke-dialog.js';
|
|
|
18
18
|
export { RekeFileUpload } from './components/reke-file-upload/reke-file-upload.js';
|
|
19
19
|
export type { InputSize } from './components/reke-input/reke-input.js';
|
|
20
20
|
export { RekeInput } from './components/reke-input/reke-input.js';
|
|
21
|
+
export { RekeMenu } from './components/reke-menu/reke-menu.js';
|
|
22
|
+
export type { MenuItemVariant } from './components/reke-menu-item/reke-menu-item.js';
|
|
23
|
+
export { RekeMenuItem } from './components/reke-menu-item/reke-menu-item.js';
|
|
24
|
+
export type { PieChartDatum, PieChartSelectDetail, PieChartVariant, } from './components/reke-pie-chart/reke-pie-chart.js';
|
|
25
|
+
export { RekePieChart } from './components/reke-pie-chart/reke-pie-chart.js';
|
|
21
26
|
export type { SelectSize } from './components/reke-select/reke-select.js';
|
|
22
27
|
export { RekeSelect } from './components/reke-select/reke-select.js';
|
|
23
28
|
export type { Cleanup, ExpandedRowElement, GetRowKey, RowKey, TableColumn, TableRow, } from './components/reke-table/reke-table.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,YAAY,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,YAAY,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AACnF,YAAY,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,YAAY,EACV,OAAO,EACP,kBAAkB,EAClB,SAAS,EACT,MAAM,EACN,WAAW,EACX,QAAQ,GACT,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,YAAY,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,YAAY,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,YAAY,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,YAAY,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,YAAY,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AACnF,YAAY,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,YAAY,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,eAAe,GAChB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,YAAY,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,YAAY,EACV,OAAO,EACP,kBAAkB,EAClB,SAAS,EACT,MAAM,EACN,WAAW,EACX,QAAQ,GACT,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,YAAY,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,YAAY,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,YAAY,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,10 +10,13 @@ import { RekeDateRange as c } from "./components/reke-date-range/reke-date-range
|
|
|
10
10
|
import { RekeDialog as l } from "./components/reke-dialog/reke-dialog.js";
|
|
11
11
|
import { RekeFileUpload as u } from "./components/reke-file-upload/reke-file-upload.js";
|
|
12
12
|
import { RekeInput as d } from "./components/reke-input/reke-input.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
13
|
+
import { RekeMenu as f } from "./components/reke-menu/reke-menu.js";
|
|
14
|
+
import { RekeMenuItem as p } from "./components/reke-menu-item/reke-menu-item.js";
|
|
15
|
+
import { RekePieChart as m } from "./components/reke-pie-chart/reke-pie-chart.js";
|
|
16
|
+
import { RekeSelect as h } from "./components/reke-select/reke-select.js";
|
|
17
|
+
import { RekeTable as g } from "./components/reke-table/reke-table.js";
|
|
18
|
+
import { RekeTextarea as _ } from "./components/reke-textarea/reke-textarea.js";
|
|
19
|
+
import { RekeToast as v } from "./components/reke-toast/reke-toast.js";
|
|
20
|
+
import { RekeToggle as y } from "./components/reke-toggle/reke-toggle.js";
|
|
21
|
+
import { RekeTooltip as b } from "./components/reke-tooltip/reke-tooltip.js";
|
|
22
|
+
export { t as RekeAlert, n as RekeBadge, r as RekeButton, i as RekeCard, a as RekeCheckbox, o as RekeChip, s as RekeCombobox, c as RekeDateRange, l as RekeDialog, e as RekeElement, u as RekeFileUpload, d as RekeInput, f as RekeMenu, p as RekeMenuItem, m as RekePieChart, h as RekeSelect, g as RekeTable, _ as RekeTextarea, v as RekeToast, y as RekeToggle, b as RekeTooltip };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { isFunction as e, isObject as t, retrieve2 as n } from "../../../zrender/lib/core/util.js";
|
|
2
|
+
import { makeInner as r } from "../util/model.js";
|
|
3
|
+
//#region node_modules/echarts/lib/animation/basicTransition.js
|
|
4
|
+
var i = r();
|
|
5
|
+
function a(t, r, i, a, o) {
|
|
6
|
+
var s;
|
|
7
|
+
if (r && r.ecModel) {
|
|
8
|
+
var c = r.ecModel.getUpdatePayload();
|
|
9
|
+
s = c && c.animation;
|
|
10
|
+
}
|
|
11
|
+
var l = r && r.isAnimationEnabled(), u = t === "update";
|
|
12
|
+
if (l) {
|
|
13
|
+
var d = void 0, f = void 0, p = void 0;
|
|
14
|
+
return a ? (d = n(a.duration, 200), f = n(a.easing, "cubicOut"), p = 0) : (d = r.getShallow(u ? "animationDurationUpdate" : "animationDuration"), f = r.getShallow(u ? "animationEasingUpdate" : "animationEasing"), p = r.getShallow(u ? "animationDelayUpdate" : "animationDelay")), s && (s.duration != null && (d = s.duration), s.easing != null && (f = s.easing), s.delay != null && (p = s.delay)), e(p) && (p = p(i, o)), e(d) && (d = d(i)), {
|
|
15
|
+
duration: d || 0,
|
|
16
|
+
delay: p,
|
|
17
|
+
easing: f
|
|
18
|
+
};
|
|
19
|
+
} else return null;
|
|
20
|
+
}
|
|
21
|
+
function o(n, r, i, o, s, c, l) {
|
|
22
|
+
var u = !1, d;
|
|
23
|
+
e(s) ? (l = c, c = s, s = null) : t(s) && (c = s.cb, l = s.during, u = s.isFrom, d = s.removeOpt, s = s.dataIndex);
|
|
24
|
+
var f = n === "leave";
|
|
25
|
+
f || r.stopAnimation("leave");
|
|
26
|
+
var p = a(n, o, s, f ? d || {} : null, o && o.getAnimationDelayParams ? o.getAnimationDelayParams(r, s) : null);
|
|
27
|
+
if (p && p.duration > 0) {
|
|
28
|
+
var m = p.duration, h = p.delay, g = p.easing, _ = {
|
|
29
|
+
duration: m,
|
|
30
|
+
delay: h || 0,
|
|
31
|
+
easing: g,
|
|
32
|
+
done: c,
|
|
33
|
+
force: !!c || !!l,
|
|
34
|
+
setToFinal: !f,
|
|
35
|
+
scope: n,
|
|
36
|
+
during: l
|
|
37
|
+
};
|
|
38
|
+
u ? r.animateFrom(i, _) : r.animateTo(i, _);
|
|
39
|
+
} else r.stopAnimation(), !u && r.attr(i), l && l(1), c && c();
|
|
40
|
+
}
|
|
41
|
+
function s(e, t, n, r, i, a) {
|
|
42
|
+
o("update", e, t, n, r, i, a);
|
|
43
|
+
}
|
|
44
|
+
function c(e, t, n, r, i, a) {
|
|
45
|
+
o("enter", e, t, n, r, i, a);
|
|
46
|
+
}
|
|
47
|
+
function l(e) {
|
|
48
|
+
if (!e.__zr) return !0;
|
|
49
|
+
for (var t = 0; t < e.animators.length; t++) if (e.animators[t].scope === "leave") return !0;
|
|
50
|
+
return !1;
|
|
51
|
+
}
|
|
52
|
+
function u(e, t, n, r, i, a) {
|
|
53
|
+
l(e) || o("leave", e, t, n, r, i, a);
|
|
54
|
+
}
|
|
55
|
+
function d(e, t, n, r) {
|
|
56
|
+
e.removeTextContent(), e.removeTextGuideLine(), u(e, { style: { opacity: 0 } }, t, n, r);
|
|
57
|
+
}
|
|
58
|
+
function f(e, t, n) {
|
|
59
|
+
function r() {
|
|
60
|
+
e.parent && e.parent.remove(e);
|
|
61
|
+
}
|
|
62
|
+
e.isGroup ? e.traverse(function(e) {
|
|
63
|
+
e.isGroup || d(e, t, n, r);
|
|
64
|
+
}) : d(e, t, n, r);
|
|
65
|
+
}
|
|
66
|
+
function p(e) {
|
|
67
|
+
i(e).oldStyle = e.style;
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
export { c as initProps, l as isElementRemoved, u as removeElement, f as removeElementWithFadeOut, p as saveOldStyle, s as updateProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { makeInner as e } from "../../util/model.js";
|
|
2
|
+
//#region node_modules/echarts/lib/chart/helper/createRenderPlanner.js
|
|
3
|
+
function t() {
|
|
4
|
+
var t = e();
|
|
5
|
+
return function(e) {
|
|
6
|
+
var n = t(e), r = e.pipelineContext, i = !!n.large, a = !!n.progressiveRender, o = n.large = !!(r && r.large), s = n.progressiveRender = !!(r && r.progressiveRender);
|
|
7
|
+
return (i !== o || a !== s) && "reset";
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { extend as e, isArray as t } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import n from "../../data/helper/createDimensions.js";
|
|
3
|
+
import r from "../../data/SeriesData.js";
|
|
4
|
+
//#region node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js
|
|
5
|
+
function i(i, a, o) {
|
|
6
|
+
a = t(a) && { coordDimensions: a } || e({ encodeDefine: i.getEncode() }, a);
|
|
7
|
+
var s = i.getSource(), c = n(s, a).dimensions, l = new r(c, i);
|
|
8
|
+
return l.initData(s, o), l;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { i as default };
|