@mindfusion/dataviews 2.1.1 → 2.2.0
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 +19 -3
- package/dataviews.d.ts +46 -6
- package/dist/cjs/dataviews.js +1 -1
- package/dist/esm/dataviews.js +1 -1
- package/dist/umd/dataviews.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -27,17 +27,33 @@ npm i @mindfusion/dataviews
|
|
|
27
27
|
- Styling through themes
|
|
28
28
|
- Row virtualization for faster rendering
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## What's new in JS DataViews 2.1.2
|
|
31
31
|
|
|
32
|
-
The
|
|
32
|
+
The library registers the [Grid](https://www.mindfusion.eu/onlinehelp/javascript.pack/T_MindFusion_DataViews_Grid.htm) class as a web component. You can use the <mindfusion-grid> tag to create the control.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
When instantiated as a web component, the control creates required HTML elements as internal shadow DOM. You can get the JavaScript object corresponding to a web component by calling the [find](https://www.mindfusion.eu/onlinehelp/javascript.pack/M_MindFusion_Common_Control_find_1_String.htm) method with id argument.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
<mindfusion-grid id="grid">
|
|
38
|
+
</mindfusion-grid>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
var dv = MindFusion.DataViews;
|
|
43
|
+
var grid = dv.Grid.find("grid");
|
|
44
|
+
grid.model = new dv.ArrayModel(participants, columns, "index");
|
|
45
|
+
```
|
|
35
46
|
|
|
36
47
|
|
|
37
48
|
## What's new in JS DataViews 2.1
|
|
38
49
|
|
|
39
50
|
The [DataViews](https://www.mindfusion.eu/onlinehelp/javascript.pack/index.htm?N_MindFusion_DataViews.htm) module now includes a [Property Grid](https://www.mindfusion.eu/onlinehelp/javascript.pack/index.htm?PropertyGrid.htm) providing user interface for browsing and editing the properties of an object. The [PropertyGrid](https://www.mindfusion.eu/onlinehelp/javascript.pack/index.htm?T_MindFusion_DataViews_PropertyGrid.htm) control can be bound to any object or an array of objects as specified by its [selectedObject](https://www.mindfusion.eu/onlinehelp/javascript.pack/index.htm?P_MindFusion_DataViews_PropertyGrid_selectedObject_0.htm) property. If [showAllProperties](https://www.mindfusion.eu/onlinehelp/javascript.pack/index.htm?P_MindFusion_DataViews_PropertyGrid_showAllProperties_0.htm) is set to **true**, the control enumerates all properties and fields of the object and its prototype chain, resolves their data types and displays their name and value in a grid layout. If showAllProperties is set to **false**, only properties and fields included in the [metaData](https://www.mindfusion.eu/onlinehelp/javascript.pack/index.htm?P_MindFusion_DataViews_PropertyGrid_metaData_0.htm) dictionary are displayed.
|
|
40
51
|
|
|
52
|
+
## React support
|
|
53
|
+
|
|
54
|
+
The GridView React component allows integrating the MindFusion.DataViews API into React applications. It is a wrapper component for the Grid control, handles the rendering and keeps its DOM in sync with React’s virtual DOM. Grid properties can be set from JSX, and grid events can be handled through JSX syntax as well.
|
|
55
|
+
|
|
56
|
+
[The GridView component for React on npm.](https://www.npmjs.com/package/grid-library-react)
|
|
41
57
|
|
|
42
58
|
## Documentation
|
|
43
59
|
|
package/dataviews.d.ts
CHANGED
|
@@ -849,6 +849,14 @@ declare module "DataViews/jsdv/src/UIControl" {
|
|
|
849
849
|
export class UIControl extends Control {
|
|
850
850
|
static get tm(): number[];
|
|
851
851
|
static get ns(): string;
|
|
852
|
+
/**
|
|
853
|
+
* Initializes a new instance of the UIControl class.
|
|
854
|
+
* @constructor
|
|
855
|
+
* @param {HTMLElement} [element] The control's associated Dom element.
|
|
856
|
+
* @param {String} [tagName] The tag name of the element.
|
|
857
|
+
* @param {Type} [componentType] The type of the component.
|
|
858
|
+
*/
|
|
859
|
+
constructor(element?: HTMLElement, tagName?: string, componentType?: any);
|
|
852
860
|
_messenger: {
|
|
853
861
|
message(control: any): void;
|
|
854
862
|
setKey(value: any): void;
|
|
@@ -1546,6 +1554,15 @@ declare module "DataViews/jsdv/src/Grid" {
|
|
|
1546
1554
|
* @private
|
|
1547
1555
|
*/
|
|
1548
1556
|
private get contentClientHeight();
|
|
1557
|
+
set uiThemesPath(arg: string);
|
|
1558
|
+
/**
|
|
1559
|
+
* Gets or sets the path to the control's css themes.
|
|
1560
|
+
* @type {String}
|
|
1561
|
+
* @summary A string specifying the path.
|
|
1562
|
+
* @remarks Only applies to web components.
|
|
1563
|
+
*/
|
|
1564
|
+
get uiThemesPath(): string;
|
|
1565
|
+
_uiThemesPath: string;
|
|
1549
1566
|
/**
|
|
1550
1567
|
* Gets the width of the specified grid column.
|
|
1551
1568
|
* @param {Number} column The column index.
|
|
@@ -1800,12 +1817,12 @@ declare module "DataViews/jsdv/src/Grid" {
|
|
|
1800
1817
|
*/
|
|
1801
1818
|
get getCellValue(): EventDispatcher<any>;
|
|
1802
1819
|
/**
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1820
|
+
* Raised when the data type of a cell in a DynamicType column has to be resolved.
|
|
1821
|
+
* @event resolveCellDataType
|
|
1822
|
+
* @type {EventDispatcher}
|
|
1823
|
+
* @property {Grid} sender
|
|
1824
|
+
* @property {CellResolveEventArgs} args
|
|
1825
|
+
*/
|
|
1809
1826
|
get resolveCellMetaData(): EventDispatcher<any>;
|
|
1810
1827
|
/**
|
|
1811
1828
|
* Raised when the value of a cell in a DynamicType column has to be formatted.
|
|
@@ -1820,6 +1837,7 @@ declare module "DataViews/jsdv/src/Grid" {
|
|
|
1820
1837
|
* @private
|
|
1821
1838
|
*/
|
|
1822
1839
|
private get objectButtonClick();
|
|
1840
|
+
connectedCallback(): void;
|
|
1823
1841
|
}
|
|
1824
1842
|
import { UIControl } from "DataViews/jsdv/src/UIControl";
|
|
1825
1843
|
import { Unit } from "@mindfusion/common";
|
|
@@ -2734,6 +2752,15 @@ declare module "DataViews/jsdv/src/PropertyGrid" {
|
|
|
2734
2752
|
get allowScroll(): boolean;
|
|
2735
2753
|
_allowScroll: any;
|
|
2736
2754
|
_selectedItem: PropertyGridPage;
|
|
2755
|
+
set uiThemesPath(arg: string);
|
|
2756
|
+
/**
|
|
2757
|
+
* Gets or sets the path to the control's css themes.
|
|
2758
|
+
* @type {String}
|
|
2759
|
+
* @summary A string specifying the path.
|
|
2760
|
+
* @remarks Only applies to web components.
|
|
2761
|
+
*/
|
|
2762
|
+
get uiThemesPath(): string;
|
|
2763
|
+
_uiThemesPath: string;
|
|
2737
2764
|
set allowDrag(arg: boolean);
|
|
2738
2765
|
/**
|
|
2739
2766
|
* ListContainer.allowDrag override.
|
|
@@ -2834,6 +2861,7 @@ declare module "DataViews/jsdv/src/PropertyGrid" {
|
|
|
2834
2861
|
* @protected
|
|
2835
2862
|
*/
|
|
2836
2863
|
protected onItemsChanging(sender: any, args: any): void;
|
|
2864
|
+
connectedCallback(): void;
|
|
2837
2865
|
}
|
|
2838
2866
|
import { UIControl } from "DataViews/jsdv/src/UIControl";
|
|
2839
2867
|
import { Unit } from "@mindfusion/common";
|
|
@@ -2841,6 +2869,17 @@ declare module "DataViews/jsdv/src/PropertyGrid" {
|
|
|
2841
2869
|
import { EventDispatcher } from "@mindfusion/common";
|
|
2842
2870
|
import { PropertyGridPage } from "DataViews/jsdv/src/PropertyGridPage";
|
|
2843
2871
|
}
|
|
2872
|
+
declare module "DataViews/jsdv/src/WebComponents" {
|
|
2873
|
+
/**
|
|
2874
|
+
* @class Contains web components-related functions.
|
|
2875
|
+
*/
|
|
2876
|
+
export class WebComponents {
|
|
2877
|
+
/**
|
|
2878
|
+
* @class Registers the controls in the package as web components.
|
|
2879
|
+
*/
|
|
2880
|
+
static register(): void;
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2844
2883
|
declare module "@mindfusion/dataviews" {
|
|
2845
2884
|
export { ArrayModel } from "DataViews/jsdv/src/ArrayModel";
|
|
2846
2885
|
export { Command } from "DataViews/jsdv/src/Command";
|
|
@@ -2868,4 +2907,5 @@ declare module "@mindfusion/dataviews" {
|
|
|
2868
2907
|
export { BooleanType } from "DataViews/jsdv/src/BooleanType";
|
|
2869
2908
|
export { ObjectType } from "DataViews/jsdv/src/ObjectType";
|
|
2870
2909
|
export { CollectionType } from "DataViews/jsdv/src/CollectionType";
|
|
2910
|
+
export { WebComponents } from "DataViews/jsdv/src/WebComponents";
|
|
2871
2911
|
}
|