@visactor/vtable 1.10.0 → 1.10.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/cjs/body-helper/style.js +2 -1
- package/cjs/components/menu/dom/logic/MenuElementStyle.js +1 -1
- package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
- package/cjs/core/BaseTable.js +2 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/utils/cell-border-stroke-width.js +9 -4
- package/cjs/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
- package/cjs/state/state.js +7 -6
- package/cjs/state/state.js.map +1 -1
- package/cjs/tools/style.d.ts +2 -0
- package/cjs/tools/style.js +17 -4
- package/cjs/tools/style.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +25 -8
- package/dist/vtable.min.js +2 -2
- package/es/body-helper/style.js +2 -1
- package/es/components/menu/dom/logic/MenuElementStyle.js +1 -1
- package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
- package/es/core/BaseTable.js +2 -3
- package/es/core/BaseTable.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/utils/cell-border-stroke-width.js +3 -1
- package/es/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
- package/es/state/state.js +7 -6
- package/es/state/state.js.map +1 -1
- package/es/tools/style.d.ts +2 -0
- package/es/tools/style.js +10 -0
- package/es/tools/style.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
package/es/body-helper/style.js
CHANGED
|
@@ -21,4 +21,5 @@ export function of(columnStyle, bodyStyle, styleArg, StyleClassDef = Style, glob
|
|
|
21
21
|
return columnStyle || bodyStyle ? columnStyle instanceof Style ? columnStyle : "function" == typeof columnStyle ? of(columnStyle(styleArg), bodyStyle, styleArg, StyleClassDef, globalAutoWrapText, theme) : (columnStyle || (columnStyle = {}),
|
|
22
22
|
globalAutoWrapText && !isValid(columnStyle.autoWrapText) && (columnStyle.autoWrapText = !0),
|
|
23
23
|
StyleClassDef === CheckboxStyle ? new CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : StyleClassDef === RadioStyle ? new RadioStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_b = theme.radioStyle) && void 0 !== _b ? _b : {}) : new StyleClassDef(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {})) : StyleClassDef.DEFAULT;
|
|
24
|
-
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -3,7 +3,7 @@ import { Env } from "../../../../tools/env";
|
|
|
3
3
|
export function importStyle() {
|
|
4
4
|
if ("node" === Env.mode) return;
|
|
5
5
|
const styleElement = document.createElement("style");
|
|
6
|
-
styleElement.id = "vtable-menu-styleSheet", styleElement.textContent = "\n@keyframes vtable__menu-element--shown-animation {\n\t0% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n.vtable__menu-element {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\tborder-radius: 4px;\n\tbackground-color: #fff;\n\tpadding: 6px 0;\n\t/* pointer-events: none; */\n\tuser-select: none;\n\tcolor: #000;\n\tmax-width: 300px;\n\tz-index: 99999;\n\tborder: #CCC 0.5px solid;\n\tcursor: default;\n\twidth: max-content;\n\tbox-shadow: 0px 8px 16px rgba(27, 31, 35, 0.12);\n max-height: 100%;\n overflow-y:
|
|
6
|
+
styleElement.id = "vtable-menu-styleSheet", styleElement.textContent = "\n@keyframes vtable__menu-element--shown-animation {\n\t0% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n.vtable__menu-element {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\tborder-radius: 4px;\n\tbackground-color: #fff;\n\tpadding: 6px 0;\n\t/* pointer-events: none; */\n\tuser-select: none;\n\tcolor: #000;\n\tmax-width: 300px;\n\tz-index: 99999;\n\tborder: #CCC 0.5px solid;\n\tcursor: default;\n\twidth: max-content;\n\tbox-shadow: 0px 8px 16px rgba(27, 31, 35, 0.12);\n max-height: 100%;\n overflow-y: auto;\n}\n.vtable__menu-element--hidden {\n\topacity: 0;\n\t/* transform: translate(-50%, -50%); */\n\ttransition: opacity 75ms linear;\n\tz-index: -9999;\n}\n.vtable__menu-element--shown {\n\topacity: 1;\n\t/* transform: translate(-50%, -50%); */\n\tanimation: vtable__menu-element--shown-animation 150ms ease-out;\n}\n.vtable__menu-element__content {\n\tfont-family: Roboto;\n\tfont-size: 12px;\n\toverflow: hidden;\n\tdisplay: inline-block;\n\t/* height: 100%; */\n\tline-height: 30px;\n}\n.vtable__menu-element__item {\n\theight: 32px;\n\tpadding: 0px 12px;\n\tcursor: pointer;\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-start;\n}\n.vtable__menu-element__item:hover {\n\tbackground-color: rgba(27, 31, 35, 0.06);\n}\n.vtable__menu-element__icon{\n\t/* vertical-align: top; */\n\tdisplay: flex;\n\t/* line-height: 30px; */\n\tmargin-right: 6px;\n}\n.vtable__menu-element__no-event {\n\tpointer-events: none;\n}\n.vtable__menu-element--select {\n\tcolor: #2E68CF;\n}.vtable__menu-element--normal {\n\tcolor: rgba(20, 20, 20, 0.9);;\n}\n.vtable__menu-element__split {\n\theight: 0px;\n\tborder: 1px solid rgb(209, 213, 218);\n\tmargin: 5px 0;\n}\n.vtable__menu-element__title {\n\tcolor: rgb(149, 149, 149);\n}\n.vtable__menu-element__arrow {\n\tposition: absolute;\n\tright: 3px;\n\tfont-weight: bold;\n\tmargin-top: 1px;\n}\n.vtable__menu-element__item-text {\n\tmargin-right: 15px;\n}\n",
|
|
7
7
|
document.head.appendChild(styleElement);
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=MenuElementStyle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/menu/dom/logic/MenuElementStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,MAAM,UAAU,WAAW;IACzB,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,EAAE;QACvB,OAAO;KACR;IACD,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,GAAG,wBAAwB,CAAC;IAC3C,YAAY,CAAC,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyF5B,CAAC;IAEA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC","file":"MenuElementStyle.js","sourcesContent":["import { Env } from '../../../../tools/env';\n\nexport function importStyle() {\n if (Env.mode === 'node') {\n return;\n }\n const styleElement = document.createElement('style');\n styleElement.id = 'vtable-menu-styleSheet';\n styleElement.textContent = `\n@keyframes vtable__menu-element--shown-animation {\n\t0% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n.vtable__menu-element {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\tborder-radius: 4px;\n\tbackground-color: #fff;\n\tpadding: 6px 0;\n\t/* pointer-events: none; */\n\tuser-select: none;\n\tcolor: #000;\n\tmax-width: 300px;\n\tz-index: 99999;\n\tborder: #CCC 0.5px solid;\n\tcursor: default;\n\twidth: max-content;\n\tbox-shadow: 0px 8px 16px rgba(27, 31, 35, 0.12);\n max-height: 100%;\n overflow-y:
|
|
1
|
+
{"version":3,"sources":["../src/components/menu/dom/logic/MenuElementStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,MAAM,UAAU,WAAW;IACzB,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,EAAE;QACvB,OAAO;KACR;IACD,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,GAAG,wBAAwB,CAAC;IAC3C,YAAY,CAAC,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyF5B,CAAC;IAEA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC","file":"MenuElementStyle.js","sourcesContent":["import { Env } from '../../../../tools/env';\n\nexport function importStyle() {\n if (Env.mode === 'node') {\n return;\n }\n const styleElement = document.createElement('style');\n styleElement.id = 'vtable-menu-styleSheet';\n styleElement.textContent = `\n@keyframes vtable__menu-element--shown-animation {\n\t0% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n.vtable__menu-element {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\tborder-radius: 4px;\n\tbackground-color: #fff;\n\tpadding: 6px 0;\n\t/* pointer-events: none; */\n\tuser-select: none;\n\tcolor: #000;\n\tmax-width: 300px;\n\tz-index: 99999;\n\tborder: #CCC 0.5px solid;\n\tcursor: default;\n\twidth: max-content;\n\tbox-shadow: 0px 8px 16px rgba(27, 31, 35, 0.12);\n max-height: 100%;\n overflow-y: auto;\n}\n.vtable__menu-element--hidden {\n\topacity: 0;\n\t/* transform: translate(-50%, -50%); */\n\ttransition: opacity 75ms linear;\n\tz-index: -9999;\n}\n.vtable__menu-element--shown {\n\topacity: 1;\n\t/* transform: translate(-50%, -50%); */\n\tanimation: vtable__menu-element--shown-animation 150ms ease-out;\n}\n.vtable__menu-element__content {\n\tfont-family: Roboto;\n\tfont-size: 12px;\n\toverflow: hidden;\n\tdisplay: inline-block;\n\t/* height: 100%; */\n\tline-height: 30px;\n}\n.vtable__menu-element__item {\n\theight: 32px;\n\tpadding: 0px 12px;\n\tcursor: pointer;\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-start;\n}\n.vtable__menu-element__item:hover {\n\tbackground-color: rgba(27, 31, 35, 0.06);\n}\n.vtable__menu-element__icon{\n\t/* vertical-align: top; */\n\tdisplay: flex;\n\t/* line-height: 30px; */\n\tmargin-right: 6px;\n}\n.vtable__menu-element__no-event {\n\tpointer-events: none;\n}\n.vtable__menu-element--select {\n\tcolor: #2E68CF;\n}.vtable__menu-element--normal {\n\tcolor: rgba(20, 20, 20, 0.9);;\n}\n.vtable__menu-element__split {\n\theight: 0px;\n\tborder: 1px solid rgb(209, 213, 218);\n\tmargin: 5px 0;\n}\n.vtable__menu-element__title {\n\tcolor: rgb(149, 149, 149);\n}\n.vtable__menu-element__arrow {\n\tposition: absolute;\n\tright: 3px;\n\tfont-weight: bold;\n\tmargin-top: 1px;\n}\n.vtable__menu-element__item-text {\n\tmargin-right: 15px;\n}\n`;\n\n document.head.appendChild(styleElement);\n}\n"]}
|
package/es/core/BaseTable.js
CHANGED
|
@@ -84,7 +84,7 @@ export class BaseTable extends EventTarget {
|
|
|
84
84
|
}
|
|
85
85
|
constructor(container, options = {}) {
|
|
86
86
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
87
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.10.
|
|
87
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.10.1", this.id = `VTable${Date.now()}`,
|
|
88
88
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
|
|
89
89
|
!container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
90
90
|
const {frozenColCount: frozenColCount = 0, frozenRowCount: frozenRowCount, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, widthAdaptiveMode: widthAdaptiveMode = "only-body", heightAdaptiveMode: heightAdaptiveMode = "only-body", keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
|
|
@@ -1784,5 +1784,4 @@ export class BaseTable extends EventTarget {
|
|
|
1784
1784
|
}
|
|
1785
1785
|
this.render();
|
|
1786
1786
|
}
|
|
1787
|
-
}
|
|
1788
|
-
//# sourceMappingURL=BaseTable.js.map
|
|
1787
|
+
}
|