@revolist/vue-datagrid 4.2.0-next.6 → 4.2.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vgrid.d.ts +7 -58
- package/dist/vgrid.js +1 -1
- package/package.json +1 -1
- package/src/component.tsx +84 -0
- package/src/vgrid.ts +1 -1
- package/src/revogrid.ts +0 -306
- package/src/vue-component-lib/utils.ts +0 -53
package/dist/vgrid.d.ts
CHANGED
|
@@ -2,65 +2,14 @@ declare function install(Vue: any): void;
|
|
|
2
2
|
export declare const VGridPlugin: {
|
|
3
3
|
install: typeof install;
|
|
4
4
|
};
|
|
5
|
-
export declare const VGrid:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
updateColumns: (cols: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.ColumnRegular[]) => Promise<void>;
|
|
11
|
-
addTrimmed: (trimmed: Record<number, boolean>, trimmedType?: string | undefined, type?: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.DimensionRows | undefined) => Promise<CustomEvent<{
|
|
12
|
-
trimmed: Record<number, boolean>;
|
|
13
|
-
trimmedType: string;
|
|
14
|
-
type: string;
|
|
15
|
-
}>>;
|
|
16
|
-
scrollToCoordinate: (cell: Partial<import("@revolist/revogrid/dist/types/interfaces").Selection.Cell>) => Promise<void>;
|
|
17
|
-
setCellEdit: (rgRow: number, prop: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.ColumnProp, rowSource?: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.DimensionRows | undefined) => Promise<void>;
|
|
18
|
-
setCellsFocus: (cellStart?: import("@revolist/revogrid/dist/types/interfaces").Selection.Cell | undefined, cellEnd?: import("@revolist/revogrid/dist/types/interfaces").Selection.Cell | undefined, colType?: string | undefined, rowType?: string | undefined) => Promise<void>;
|
|
19
|
-
registerVNode: (elements: import("@revolist/revogrid/dist/types/stencil-public-runtime").VNode[]) => Promise<void>;
|
|
20
|
-
getSource: (type?: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.DimensionRows | undefined) => Promise<import("@revolist/revogrid/dist/types/interfaces").RevoGrid.DataType[]>;
|
|
21
|
-
getVisibleSource: (type?: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.DimensionRows | undefined) => Promise<any[]>;
|
|
22
|
-
getSourceStore: (type?: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.DimensionRows | undefined) => Promise<import("@revolist/revogrid/dist/types/components/data/columnService").RowSource>;
|
|
23
|
-
getColumnStore: (type?: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.DimensionCols | undefined) => Promise<import("@revolist/revogrid/dist/types/components/data/columnService").ColumnSource>;
|
|
24
|
-
updateColumnSorting: (column: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.ColumnRegular, index: number, order: "asc" | "desc", additive: boolean) => Promise<import("@revolist/revogrid/dist/types/interfaces").RevoGrid.ColumnRegular>;
|
|
25
|
-
clearSorting: () => Promise<void>;
|
|
26
|
-
getColumns: () => Promise<import("@revolist/revogrid/dist/types/interfaces").RevoGrid.ColumnRegular[]>;
|
|
27
|
-
clearFocus: () => Promise<void>;
|
|
28
|
-
getPlugins: () => Promise<import("@revolist/revogrid/dist/types/interfaces").RevoPlugin.Plugin[]>;
|
|
29
|
-
getFocused: () => Promise<import("@revolist/revogrid/dist/types/components/revoGrid/viewport.service").FocusedData | null>;
|
|
30
|
-
getContentSize: () => Promise<import("@revolist/revogrid/dist/types/interfaces").Selection.Cell>;
|
|
31
|
-
getSelectedRange: () => Promise<import("@revolist/revogrid/dist/types/interfaces").Selection.RangeArea | null>;
|
|
32
|
-
}, unknown, {
|
|
33
|
-
rowHeaders: boolean | import("@revolist/revogrid/dist/types/interfaces").RevoGrid.RowHeaders;
|
|
34
|
-
frameSize: number;
|
|
35
|
-
rowSize: number;
|
|
36
|
-
colSize: number;
|
|
37
|
-
range: boolean;
|
|
38
|
-
readonly: boolean;
|
|
39
|
-
resize: boolean;
|
|
40
|
-
canFocus: boolean;
|
|
41
|
-
useClipboard: boolean;
|
|
42
|
-
columns: (import("@revolist/revogrid/dist/types/interfaces").RevoGrid.ColumnRegular | import("@revolist/revogrid/dist/types/interfaces").RevoGrid.ColumnGrouping)[];
|
|
43
|
-
source: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.DataType[];
|
|
44
|
-
pinnedTopSource: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.DataType[];
|
|
45
|
-
pinnedBottomSource: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.DataType[];
|
|
46
|
-
rowDefinitions: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.RowDefinition[];
|
|
47
|
-
editors: import("@revolist/revogrid/dist/types/interfaces").Edition.Editors;
|
|
48
|
-
applyEditorChangesOnClose: boolean;
|
|
49
|
-
plugins: typeof import("@revolist/revogrid/dist/types/interfaces").RevoPlugin.Plugin[];
|
|
50
|
-
columnTypes: {
|
|
51
|
-
[name: string]: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.ColumnType;
|
|
5
|
+
export declare const VGrid: {
|
|
6
|
+
name: string;
|
|
7
|
+
props: string[];
|
|
8
|
+
watch: {
|
|
9
|
+
[prop: string]: (this: import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>>, newVal: any, oldVal: any) => void;
|
|
52
10
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
autoSizeColumn: boolean | import("@revolist/revogrid/dist/types/plugins/autoSizeColumn").AutoSizeColumnConfig;
|
|
56
|
-
filter: boolean | import("@revolist/revogrid/dist/types/plugins/filter/filter.plugin").ColumnFilterConfig;
|
|
57
|
-
focusTemplate: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.FocusTemplateFunc;
|
|
58
|
-
canMoveColumns: boolean;
|
|
59
|
-
trimmedRows: Record<number, boolean>;
|
|
60
|
-
exporting: boolean;
|
|
61
|
-
grouping: import("@revolist/revogrid/dist/types/plugins/groupingRow/grouping.row.types").GroupingOptions;
|
|
62
|
-
stretch: string | boolean;
|
|
63
|
-
}, {}>;
|
|
11
|
+
render(this: import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>>, h: import("vue").CreateElement): JSX.Element;
|
|
12
|
+
};
|
|
64
13
|
export declare const VGridVueTemplate: (cntr: import("vue").VueConstructor<import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>>>, customProps?: any) => (h: Function, p: any) => JSX.Element;
|
|
65
14
|
export declare const VGridVueTemplateConstructor: (vueConstructor: import("vue").VueConstructor<import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>>>, e: HTMLElement, p: Record<string, any>) => import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>> | null | undefined;
|
|
66
15
|
export declare const VGridVueEditor: (vueConstructor: import("vue/types/umd").VueConstructor<import("vue/types/umd")>) => (column: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.ColumnDataSchemaModel, save: Function, close: Function) => import("./vue-editor-adapter").default;
|
package/dist/vgrid.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@revolist/revogrid/custom-element"),require("vue")):"function"==typeof define&&define.amd?define("VGrid",["@revolist/revogrid/custom-element","vue"],r):"object"==typeof exports?exports.VGrid=r(require("@revolist/revogrid/custom-element"),require("vue")):e.VGrid=r(e["@revolist/revogrid/custom-element"],e.vue)}(self,(function(e,r){return function(){"use strict";var t={239:function(r){r.exports=e},748:function(e){e.exports=r}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){o.r(i),o.d(i,{VGrid:function(){return m},VGridPlugin:function(){return h},VGridVueEditor:function(){return b},VGridVueTemplate:function(){return y},VGridVueTemplateConstructor:function(){return g},default:function(){return j}}),o(239);var e=function(){return e=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},e.apply(this,arguments)},r=["rowHeaders","frameSize","rowSize","colSize","range","readonly","resize","canFocus","useClipboard","columns","source","pinnedTopSource","pinnedBottomSource","rowDefinitions","editors","applyEditorChangesOnClose","plugins","columnTypes","theme","rowClass","autoSizeColumn","filter","focusTemplate","canMoveColumns","trimmedRows","exporting","grouping","stretch"],t={},n=[];r.forEach((function(e){var r=e;t[r]=e,n.push(r),r=e.toLowerCase(),t[r]=e,n.push(r),r=e.split(/(?=[A-Z])/).join("-"),t[r]=e,n.push(r)}));var u=r.reduce((function(e,r){return e[r]=function(e){this.$refs.grid[r]=e},e}),{}),s={name:"vue-data-grid",props:n,watch:u,render:function(r){var t={};for(var n in this.$props)t[n]=this.$props[n];return r("revo-grid",{ref:"grid",domProps:t,on:e({},this.$listeners)})}},c=o(748),l=o.n(c),f=function(){return f=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},f.apply(this,arguments)},a=function(e,r,t){if(!r)return null;var n;if((null==r?void 0:r.childNodes.length)&&(n=r.childNodes[0]),!n)return n=document.createElement("span"),r.appendChild(n),"object"==typeof e&&(e=l().extend(e)),new e({el:n,propsData:t});var o=n.__vue__;if(o)for(var i in t)o.$props[i]=t[i];return o},p=function(){return p=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},p.apply(this,arguments)},d=function(){function e(e,r,t,n){this.VueEditorConstructor=e,this.column=r,this.save=t,this.close=n,this.element=null,this.editCell=null}return e.prototype.componentDidRender=function(){},e.prototype.disconnectedCallback=function(){var e;null===(e=this.vueEl)||void 0===e||e.$destroy(),this.vueEl=void 0},e.prototype.render=function(e){var r=this;return e("span",{ref:function(e){return r.renderAdapter(e)}})},e.prototype.renderAdapter=function(e){if(e){var r=a(this.VueEditorConstructor,e,p(p({},this.editCell),{save:this.save,close:this.close}));r&&(this.vueEl=r)}},e}(),v=!1,h={install:function(e){v||(v=!0,e.component("vue-data-grid",m))}},m=s,y=function(e,r){return function(t,n){var o=r?f(f({},r),n):n;return t("span",{ref:function(r){return a(e,r,o)}})}},g=a,b=function(e){return function(r,t,n){return new d(e,r,t,n)}},w=null;"undefined"!=typeof window?w=window.Vue:void 0!==o.g&&(w=o.g.Vue),w&&w.use(h);var j=m}(),i}()}));
|
package/package.json
CHANGED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import Vue, { CreateElement } from "vue";
|
|
2
|
+
import { RevoGrid as RevoGridComponent } from "@revolist/revogrid/custom-element";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
type Prop = any;
|
|
6
|
+
type WatchFunction = (this: Vue, newVal: any, oldVal: any) => void;
|
|
7
|
+
type WatchResult = { [prop: string]: WatchFunction };
|
|
8
|
+
const REVOGRID_PROPS = [
|
|
9
|
+
'rowHeaders',
|
|
10
|
+
'frameSize',
|
|
11
|
+
'rowSize',
|
|
12
|
+
'colSize',
|
|
13
|
+
'range',
|
|
14
|
+
'readonly',
|
|
15
|
+
'resize',
|
|
16
|
+
'canFocus',
|
|
17
|
+
'useClipboard',
|
|
18
|
+
'columns',
|
|
19
|
+
'source',
|
|
20
|
+
'pinnedTopSource',
|
|
21
|
+
'pinnedBottomSource',
|
|
22
|
+
'rowDefinitions',
|
|
23
|
+
'editors',
|
|
24
|
+
'applyEditorChangesOnClose',
|
|
25
|
+
'plugins',
|
|
26
|
+
'columnTypes',
|
|
27
|
+
'theme',
|
|
28
|
+
'rowClass',
|
|
29
|
+
'autoSizeColumn',
|
|
30
|
+
'filter',
|
|
31
|
+
'focusTemplate',
|
|
32
|
+
'canMoveColumns',
|
|
33
|
+
'trimmedRows',
|
|
34
|
+
'exporting',
|
|
35
|
+
'grouping',
|
|
36
|
+
'stretch'
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
const propsKeys: Record<string, any> = {};
|
|
40
|
+
const propsExtended: string[] = [];
|
|
41
|
+
REVOGRID_PROPS.forEach((prop) => {
|
|
42
|
+
let p: string = prop;
|
|
43
|
+
propsKeys[p] = prop; // regular
|
|
44
|
+
propsExtended.push(p);
|
|
45
|
+
|
|
46
|
+
p = prop.toLowerCase();
|
|
47
|
+
propsKeys[p] = prop; // lower cased
|
|
48
|
+
propsExtended.push(p);
|
|
49
|
+
|
|
50
|
+
p = prop.split(/(?=[A-Z])/).join("-");
|
|
51
|
+
propsKeys[p] = prop; // kebab
|
|
52
|
+
propsExtended.push(p);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const watch = REVOGRID_PROPS.reduce((res: WatchResult, p: Prop) => {
|
|
56
|
+
const watchFunc = function (this: Vue, newVal: any) {
|
|
57
|
+
const grid = this.$refs.grid as any;
|
|
58
|
+
grid[p] = newVal as never;
|
|
59
|
+
};
|
|
60
|
+
res[p] = watchFunc;
|
|
61
|
+
return res;
|
|
62
|
+
}, {});
|
|
63
|
+
|
|
64
|
+
export { RevoGridComponent };
|
|
65
|
+
export default {
|
|
66
|
+
name: "vue-data-grid",
|
|
67
|
+
props: propsExtended,
|
|
68
|
+
watch,
|
|
69
|
+
render(this: Vue, h: CreateElement) {
|
|
70
|
+
const domProps: Record<string, any> = {};
|
|
71
|
+
for (const key in this.$props) {
|
|
72
|
+
domProps[key] = this.$props[key];
|
|
73
|
+
}
|
|
74
|
+
return (
|
|
75
|
+
<revo-grid
|
|
76
|
+
ref="grid"
|
|
77
|
+
domProps={domProps}
|
|
78
|
+
on={{
|
|
79
|
+
...this.$listeners,
|
|
80
|
+
}}
|
|
81
|
+
/>
|
|
82
|
+
);
|
|
83
|
+
},
|
|
84
|
+
};
|
package/src/vgrid.ts
CHANGED
package/src/revogrid.ts
DELETED
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* auto-generated vue proxies */
|
|
4
|
-
import Vue, { PropOptions } from 'vue';
|
|
5
|
-
import { createCommonRender, createCommonMethod } from './vue-component-lib/utils';
|
|
6
|
-
|
|
7
|
-
import type { Components } from '@revolist/revogrid';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import * as Default from '@revolist/revogrid/custom-element';
|
|
11
|
-
|
|
12
|
-
export default Default;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const customElementTags: string[] = [
|
|
18
|
-
'revo-grid',
|
|
19
|
-
'revogr-clipboard',
|
|
20
|
-
'revogr-data',
|
|
21
|
-
'revogr-edit',
|
|
22
|
-
'revogr-filter-panel',
|
|
23
|
-
'revogr-focus',
|
|
24
|
-
'revogr-header',
|
|
25
|
-
'revogr-order-editor',
|
|
26
|
-
'revogr-overlay-selection',
|
|
27
|
-
'revogr-row-headers',
|
|
28
|
-
'revogr-scroll-virtual',
|
|
29
|
-
'revogr-temp-range',
|
|
30
|
-
'revogr-viewport-scroll',
|
|
31
|
-
];
|
|
32
|
-
Vue.config.ignoredElements = [...Vue.config.ignoredElements, ...customElementTags];
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export const RevoGrid = /*@__PURE__*/ Vue.extend({
|
|
36
|
-
|
|
37
|
-
props: {
|
|
38
|
-
rowHeaders: {} as PropOptions<Components.RevoGrid['rowHeaders']>,
|
|
39
|
-
frameSize: {} as PropOptions<Components.RevoGrid['frameSize']>,
|
|
40
|
-
rowSize: {} as PropOptions<Components.RevoGrid['rowSize']>,
|
|
41
|
-
colSize: {} as PropOptions<Components.RevoGrid['colSize']>,
|
|
42
|
-
range: {} as PropOptions<Components.RevoGrid['range']>,
|
|
43
|
-
readonly: {} as PropOptions<Components.RevoGrid['readonly']>,
|
|
44
|
-
resize: {} as PropOptions<Components.RevoGrid['resize']>,
|
|
45
|
-
canFocus: {} as PropOptions<Components.RevoGrid['canFocus']>,
|
|
46
|
-
useClipboard: {} as PropOptions<Components.RevoGrid['useClipboard']>,
|
|
47
|
-
columns: {} as PropOptions<Components.RevoGrid['columns']>,
|
|
48
|
-
source: {} as PropOptions<Components.RevoGrid['source']>,
|
|
49
|
-
pinnedTopSource: {} as PropOptions<Components.RevoGrid['pinnedTopSource']>,
|
|
50
|
-
pinnedBottomSource: {} as PropOptions<Components.RevoGrid['pinnedBottomSource']>,
|
|
51
|
-
rowDefinitions: {} as PropOptions<Components.RevoGrid['rowDefinitions']>,
|
|
52
|
-
editors: {} as PropOptions<Components.RevoGrid['editors']>,
|
|
53
|
-
applyEditorChangesOnClose: {} as PropOptions<Components.RevoGrid['applyEditorChangesOnClose']>,
|
|
54
|
-
plugins: {} as PropOptions<Components.RevoGrid['plugins']>,
|
|
55
|
-
columnTypes: {} as PropOptions<Components.RevoGrid['columnTypes']>,
|
|
56
|
-
theme: {} as PropOptions<Components.RevoGrid['theme']>,
|
|
57
|
-
rowClass: {} as PropOptions<Components.RevoGrid['rowClass']>,
|
|
58
|
-
autoSizeColumn: {} as PropOptions<Components.RevoGrid['autoSizeColumn']>,
|
|
59
|
-
filter: {} as PropOptions<Components.RevoGrid['filter']>,
|
|
60
|
-
focusTemplate: {} as PropOptions<Components.RevoGrid['focusTemplate']>,
|
|
61
|
-
canMoveColumns: {} as PropOptions<Components.RevoGrid['canMoveColumns']>,
|
|
62
|
-
trimmedRows: {} as PropOptions<Components.RevoGrid['trimmedRows']>,
|
|
63
|
-
exporting: {} as PropOptions<Components.RevoGrid['exporting']>,
|
|
64
|
-
grouping: {} as PropOptions<Components.RevoGrid['grouping']>,
|
|
65
|
-
stretch: {} as PropOptions<Components.RevoGrid['stretch']>,
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
methods: {
|
|
70
|
-
refresh: createCommonMethod('refresh') as Components.RevoGrid['refresh'],
|
|
71
|
-
scrollToRow: createCommonMethod('scrollToRow') as Components.RevoGrid['scrollToRow'],
|
|
72
|
-
scrollToColumnIndex: createCommonMethod('scrollToColumnIndex') as Components.RevoGrid['scrollToColumnIndex'],
|
|
73
|
-
scrollToColumnProp: createCommonMethod('scrollToColumnProp') as Components.RevoGrid['scrollToColumnProp'],
|
|
74
|
-
updateColumns: createCommonMethod('updateColumns') as Components.RevoGrid['updateColumns'],
|
|
75
|
-
addTrimmed: createCommonMethod('addTrimmed') as Components.RevoGrid['addTrimmed'],
|
|
76
|
-
scrollToCoordinate: createCommonMethod('scrollToCoordinate') as Components.RevoGrid['scrollToCoordinate'],
|
|
77
|
-
setCellEdit: createCommonMethod('setCellEdit') as Components.RevoGrid['setCellEdit'],
|
|
78
|
-
setCellsFocus: createCommonMethod('setCellsFocus') as Components.RevoGrid['setCellsFocus'],
|
|
79
|
-
registerVNode: createCommonMethod('registerVNode') as Components.RevoGrid['registerVNode'],
|
|
80
|
-
getSource: createCommonMethod('getSource') as Components.RevoGrid['getSource'],
|
|
81
|
-
getVisibleSource: createCommonMethod('getVisibleSource') as Components.RevoGrid['getVisibleSource'],
|
|
82
|
-
getSourceStore: createCommonMethod('getSourceStore') as Components.RevoGrid['getSourceStore'],
|
|
83
|
-
getColumnStore: createCommonMethod('getColumnStore') as Components.RevoGrid['getColumnStore'],
|
|
84
|
-
updateColumnSorting: createCommonMethod('updateColumnSorting') as Components.RevoGrid['updateColumnSorting'],
|
|
85
|
-
clearSorting: createCommonMethod('clearSorting') as Components.RevoGrid['clearSorting'],
|
|
86
|
-
getColumns: createCommonMethod('getColumns') as Components.RevoGrid['getColumns'],
|
|
87
|
-
clearFocus: createCommonMethod('clearFocus') as Components.RevoGrid['clearFocus'],
|
|
88
|
-
getPlugins: createCommonMethod('getPlugins') as Components.RevoGrid['getPlugins'],
|
|
89
|
-
getFocused: createCommonMethod('getFocused') as Components.RevoGrid['getFocused'],
|
|
90
|
-
getContentSize: createCommonMethod('getContentSize') as Components.RevoGrid['getContentSize'],
|
|
91
|
-
getSelectedRange: createCommonMethod('getSelectedRange') as Components.RevoGrid['getSelectedRange'],
|
|
92
|
-
},
|
|
93
|
-
render: createCommonRender('revo-grid', ['contentsizechanged', 'beforeedit', 'beforerangeedit', 'afteredit', 'beforeautofill', 'beforeange', 'afterfocus', 'roworderchanged', 'beforesourcesortingapply', 'beforesortingapply', 'beforesorting', 'rowdragstart', 'headerclick', 'beforecellfocus', 'beforefocuslost', 'beforesourceset', 'before-any-source', 'aftersourceset', 'beforecolumnsset', 'beforecolumnapplied', 'aftercolumnsset', 'beforefilterapply', 'beforefiltertrimmed', 'beforetrimmed', 'aftertrimmed', 'viewportscroll', 'beforeexport', 'beforeeditstart', 'aftercolumnresize', 'beforerowdefinition', 'filterconfigchanged', 'rowheaderschanged']),
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export const RevogrClipboard = /*@__PURE__*/ Vue.extend({
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
methods: {
|
|
102
|
-
doCopy: createCommonMethod('doCopy') as Components.RevogrClipboard['doCopy'],
|
|
103
|
-
},
|
|
104
|
-
render: createCommonRender('revogr-clipboard', ['copyRegion', 'pasteRegion']),
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
export const RevogrData = /*@__PURE__*/ Vue.extend({
|
|
109
|
-
|
|
110
|
-
props: {
|
|
111
|
-
readonly: {} as PropOptions<Components.RevogrData['readonly']>,
|
|
112
|
-
range: {} as PropOptions<Components.RevogrData['range']>,
|
|
113
|
-
rowClass: {} as PropOptions<Components.RevogrData['rowClass']>,
|
|
114
|
-
rowSelectionStore: {} as PropOptions<Components.RevogrData['rowSelectionStore']>,
|
|
115
|
-
viewportRow: {} as PropOptions<Components.RevogrData['viewportRow']>,
|
|
116
|
-
viewportCol: {} as PropOptions<Components.RevogrData['viewportCol']>,
|
|
117
|
-
dimensionRow: {} as PropOptions<Components.RevogrData['dimensionRow']>,
|
|
118
|
-
colData: {} as PropOptions<Components.RevogrData['colData']>,
|
|
119
|
-
dataStore: {} as PropOptions<Components.RevogrData['dataStore']>,
|
|
120
|
-
type: {} as PropOptions<Components.RevogrData['type']>,
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
render: createCommonRender('revogr-data', ['dragStartCell', 'beforeRowRender', 'before-cell-render']),
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
export const RevogrEdit = /*@__PURE__*/ Vue.extend({
|
|
129
|
-
|
|
130
|
-
props: {
|
|
131
|
-
editCell: {} as PropOptions<Components.RevogrEdit['editCell']>,
|
|
132
|
-
column: {} as PropOptions<Components.RevogrEdit['column']>,
|
|
133
|
-
editor: {} as PropOptions<Components.RevogrEdit['editor']>,
|
|
134
|
-
saveOnClose: {} as PropOptions<Components.RevogrEdit['saveOnClose']>,
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
methods: {
|
|
139
|
-
cancel: createCommonMethod('cancel') as Components.RevogrEdit['cancel'],
|
|
140
|
-
},
|
|
141
|
-
render: createCommonRender('revogr-edit', ['cellEdit', 'closeEdit']),
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
export const RevogrFilterPanel = /*@__PURE__*/ Vue.extend({
|
|
146
|
-
|
|
147
|
-
props: {
|
|
148
|
-
uuid: {} as PropOptions<Components.RevogrFilterPanel['uuid']>,
|
|
149
|
-
filterItems: {} as PropOptions<Components.RevogrFilterPanel['filterItems']>,
|
|
150
|
-
filterTypes: {} as PropOptions<Components.RevogrFilterPanel['filterTypes']>,
|
|
151
|
-
filterNames: {} as PropOptions<Components.RevogrFilterPanel['filterNames']>,
|
|
152
|
-
filterEntities: {} as PropOptions<Components.RevogrFilterPanel['filterEntities']>,
|
|
153
|
-
filterCaptions: {} as PropOptions<Components.RevogrFilterPanel['filterCaptions']>,
|
|
154
|
-
disableDynamicFiltering: {} as PropOptions<Components.RevogrFilterPanel['disableDynamicFiltering']>,
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
methods: {
|
|
159
|
-
show: createCommonMethod('show') as Components.RevogrFilterPanel['show'],
|
|
160
|
-
getChanges: createCommonMethod('getChanges') as Components.RevogrFilterPanel['getChanges'],
|
|
161
|
-
},
|
|
162
|
-
render: createCommonRender('revogr-filter-panel', ['filterChange']),
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
export const RevogrFocus = /*@__PURE__*/ Vue.extend({
|
|
167
|
-
|
|
168
|
-
props: {
|
|
169
|
-
selectionStore: {} as PropOptions<Components.RevogrFocus['selectionStore']>,
|
|
170
|
-
dimensionRow: {} as PropOptions<Components.RevogrFocus['dimensionRow']>,
|
|
171
|
-
dimensionCol: {} as PropOptions<Components.RevogrFocus['dimensionCol']>,
|
|
172
|
-
dataStore: {} as PropOptions<Components.RevogrFocus['dataStore']>,
|
|
173
|
-
colData: {} as PropOptions<Components.RevogrFocus['colData']>,
|
|
174
|
-
colType: {} as PropOptions<Components.RevogrFocus['colType']>,
|
|
175
|
-
rowType: {} as PropOptions<Components.RevogrFocus['rowType']>,
|
|
176
|
-
focusTemplate: {} as PropOptions<Components.RevogrFocus['focusTemplate']>,
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
render: createCommonRender('revogr-focus', ['before-focus-render', 'afterfocus']),
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
export const RevogrHeader = /*@__PURE__*/ Vue.extend({
|
|
185
|
-
|
|
186
|
-
props: {
|
|
187
|
-
viewportCol: {} as PropOptions<Components.RevogrHeader['viewportCol']>,
|
|
188
|
-
dimensionCol: {} as PropOptions<Components.RevogrHeader['dimensionCol']>,
|
|
189
|
-
selectionStore: {} as PropOptions<Components.RevogrHeader['selectionStore']>,
|
|
190
|
-
parent: {} as PropOptions<Components.RevogrHeader['parent']>,
|
|
191
|
-
groups: {} as PropOptions<Components.RevogrHeader['groups']>,
|
|
192
|
-
groupingDepth: {} as PropOptions<Components.RevogrHeader['groupingDepth']>,
|
|
193
|
-
canResize: {} as PropOptions<Components.RevogrHeader['canResize']>,
|
|
194
|
-
colData: {} as PropOptions<Components.RevogrHeader['colData']>,
|
|
195
|
-
columnFilter: {} as PropOptions<Components.RevogrHeader['columnFilter']>,
|
|
196
|
-
type: {} as PropOptions<Components.RevogrHeader['type']>,
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
render: createCommonRender('revogr-header', ['initialHeaderClick', 'headerresize', 'before-resize', 'headerdblClick']),
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
export const RevogrOrderEditor = /*@__PURE__*/ Vue.extend({
|
|
205
|
-
|
|
206
|
-
props: {
|
|
207
|
-
parent: {} as PropOptions<Components.RevogrOrderEditor['parent']>,
|
|
208
|
-
dimensionRow: {} as PropOptions<Components.RevogrOrderEditor['dimensionRow']>,
|
|
209
|
-
dimensionCol: {} as PropOptions<Components.RevogrOrderEditor['dimensionCol']>,
|
|
210
|
-
dataStore: {} as PropOptions<Components.RevogrOrderEditor['dataStore']>,
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
methods: {
|
|
215
|
-
dragStart: createCommonMethod('dragStart') as Components.RevogrOrderEditor['dragStart'],
|
|
216
|
-
endOrder: createCommonMethod('endOrder') as Components.RevogrOrderEditor['endOrder'],
|
|
217
|
-
clearOrder: createCommonMethod('clearOrder') as Components.RevogrOrderEditor['clearOrder'],
|
|
218
|
-
},
|
|
219
|
-
render: createCommonRender('revogr-order-editor', ['internalRowDragStart', 'internalRowDragEnd', 'internalRowDrag', 'internalRowMouseMove', 'initialRowDropped']),
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
export const RevogrOverlaySelection = /*@__PURE__*/ Vue.extend({
|
|
224
|
-
|
|
225
|
-
props: {
|
|
226
|
-
readonly: {} as PropOptions<Components.RevogrOverlaySelection['readonly']>,
|
|
227
|
-
range: {} as PropOptions<Components.RevogrOverlaySelection['range']>,
|
|
228
|
-
canDrag: {} as PropOptions<Components.RevogrOverlaySelection['canDrag']>,
|
|
229
|
-
useClipboard: {} as PropOptions<Components.RevogrOverlaySelection['useClipboard']>,
|
|
230
|
-
selectionStore: {} as PropOptions<Components.RevogrOverlaySelection['selectionStore']>,
|
|
231
|
-
dimensionRow: {} as PropOptions<Components.RevogrOverlaySelection['dimensionRow']>,
|
|
232
|
-
dimensionCol: {} as PropOptions<Components.RevogrOverlaySelection['dimensionCol']>,
|
|
233
|
-
dataStore: {} as PropOptions<Components.RevogrOverlaySelection['dataStore']>,
|
|
234
|
-
colData: {} as PropOptions<Components.RevogrOverlaySelection['colData']>,
|
|
235
|
-
lastCell: {} as PropOptions<Components.RevogrOverlaySelection['lastCell']>,
|
|
236
|
-
editors: {} as PropOptions<Components.RevogrOverlaySelection['editors']>,
|
|
237
|
-
applyChangesOnClose: {} as PropOptions<Components.RevogrOverlaySelection['applyChangesOnClose']>,
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
render: createCommonRender('revogr-overlay-selection', ['internalCopy', 'internalPaste', 'internalCellEdit', 'beforeFocusCell', 'setEdit', 'before-apply-range', 'before-set-range', 'before-edit-render', 'setRange', 'setTempRange', 'applyFocus', 'focusCell', 'beforeRangeDataApply', 'internalSelectionChanged', 'beforeRangeCopyApply', 'internalRangeDataApply', 'rangeClipboardCopy', 'rangeClipboardPaste', 'before-cell-save']),
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
export const RevogrRowHeaders = /*@__PURE__*/ Vue.extend({
|
|
246
|
-
|
|
247
|
-
props: {
|
|
248
|
-
height: {} as PropOptions<Components.RevogrRowHeaders['height']>,
|
|
249
|
-
dataPorts: {} as PropOptions<Components.RevogrRowHeaders['dataPorts']>,
|
|
250
|
-
headerProp: {} as PropOptions<Components.RevogrRowHeaders['headerProp']>,
|
|
251
|
-
uiid: {} as PropOptions<Components.RevogrRowHeaders['uiid']>,
|
|
252
|
-
rowClass: {} as PropOptions<Components.RevogrRowHeaders['rowClass']>,
|
|
253
|
-
resize: {} as PropOptions<Components.RevogrRowHeaders['resize']>,
|
|
254
|
-
rowHeaderColumn: {} as PropOptions<Components.RevogrRowHeaders['rowHeaderColumn']>,
|
|
255
|
-
},
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
render: createCommonRender('revogr-row-headers', ['scrollViewport', 'elementToScroll']),
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
export const RevogrScrollVirtual = /*@__PURE__*/ Vue.extend({
|
|
263
|
-
|
|
264
|
-
props: {
|
|
265
|
-
dimension: {} as PropOptions<Components.RevogrScrollVirtual['dimension']>,
|
|
266
|
-
viewportStore: {} as PropOptions<Components.RevogrScrollVirtual['viewportStore']>,
|
|
267
|
-
dimensionStore: {} as PropOptions<Components.RevogrScrollVirtual['dimensionStore']>,
|
|
268
|
-
},
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
methods: {
|
|
272
|
-
setScroll: createCommonMethod('setScroll') as Components.RevogrScrollVirtual['setScroll'],
|
|
273
|
-
changeScroll: createCommonMethod('changeScroll') as Components.RevogrScrollVirtual['changeScroll'],
|
|
274
|
-
},
|
|
275
|
-
render: createCommonRender('revogr-scroll-virtual', ['scrollVirtual']),
|
|
276
|
-
});
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
export const RevogrTempRange = /*@__PURE__*/ Vue.extend({
|
|
280
|
-
|
|
281
|
-
props: {
|
|
282
|
-
selectionStore: {} as PropOptions<Components.RevogrTempRange['selectionStore']>,
|
|
283
|
-
dimensionRow: {} as PropOptions<Components.RevogrTempRange['dimensionRow']>,
|
|
284
|
-
dimensionCol: {} as PropOptions<Components.RevogrTempRange['dimensionCol']>,
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
render: createCommonRender('revogr-temp-range', []),
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
export const RevogrViewportScroll = /*@__PURE__*/ Vue.extend({
|
|
293
|
-
|
|
294
|
-
props: {
|
|
295
|
-
contentWidth: {} as PropOptions<Components.RevogrViewportScroll['contentWidth']>,
|
|
296
|
-
contentHeight: {} as PropOptions<Components.RevogrViewportScroll['contentHeight']>,
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
methods: {
|
|
301
|
-
setScroll: createCommonMethod('setScroll') as Components.RevogrViewportScroll['setScroll'],
|
|
302
|
-
changeScroll: createCommonMethod('changeScroll') as Components.RevogrViewportScroll['changeScroll'],
|
|
303
|
-
},
|
|
304
|
-
render: createCommonRender('revogr-viewport-scroll', ['scrollViewport', 'resizeViewport', 'scrollchange']),
|
|
305
|
-
});
|
|
306
|
-
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import Vue, { VNode, CreateElement } from "vue";
|
|
2
|
-
|
|
3
|
-
export const createCommonRender = (
|
|
4
|
-
tagName: string,
|
|
5
|
-
eventNames: string[] = []
|
|
6
|
-
) =>
|
|
7
|
-
function (this: Vue, createElement: CreateElement): VNode {
|
|
8
|
-
const vueElement = this;
|
|
9
|
-
const allListeners = eventNames.reduce((listeners, eventName) => {
|
|
10
|
-
return {
|
|
11
|
-
...listeners,
|
|
12
|
-
[eventName]: (event: CustomEvent<any>) => {
|
|
13
|
-
let emittedValue = event.detail;
|
|
14
|
-
if (event.detail?.value) {
|
|
15
|
-
emittedValue = event.detail.value;
|
|
16
|
-
}
|
|
17
|
-
vueElement.$emit(eventName, emittedValue);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
}, vueElement.$listeners);
|
|
21
|
-
const attributes = vueElement.$props
|
|
22
|
-
? Object.keys(vueElement.$props).reduce((attrs: any, prop: string) => {
|
|
23
|
-
const attributeName = toDashCase(prop);
|
|
24
|
-
attrs[attributeName] = vueElement.$props[prop];
|
|
25
|
-
return attrs;
|
|
26
|
-
}, {})
|
|
27
|
-
: {};
|
|
28
|
-
return createElement(
|
|
29
|
-
tagName,
|
|
30
|
-
{
|
|
31
|
-
ref: "wc",
|
|
32
|
-
domProps: vueElement.$props,
|
|
33
|
-
on: allListeners,
|
|
34
|
-
attrs: { ...attributes, "data-testid": tagName },
|
|
35
|
-
},
|
|
36
|
-
[vueElement.$slots.default]
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const createCommonMethod = (methodName: string) =>
|
|
41
|
-
function (this: any, ...args: any[]) {
|
|
42
|
-
this.$refs.wc[methodName](...args);
|
|
43
|
-
} as unknown;
|
|
44
|
-
|
|
45
|
-
export const toLowerCase = (str: string) => str.toLowerCase();
|
|
46
|
-
|
|
47
|
-
export const toDashCase = (str: string) =>
|
|
48
|
-
toLowerCase(
|
|
49
|
-
str
|
|
50
|
-
.replace(/([A-Z0-9])/g, (g) => " " + g[0])
|
|
51
|
-
.trim()
|
|
52
|
-
.replace(/ /g, "-")
|
|
53
|
-
);
|