@mescius/wijmo.angular2.core 5.20232.939

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/index.d.ts ADDED
@@ -0,0 +1,205 @@
1
+ /*!
2
+ *
3
+ * Wijmo Library 5.20232.939
4
+ * https://developer.mescius.com/wijmo
5
+ *
6
+ * Copyright(c) MESCIUS inc. All rights reserved.
7
+ *
8
+ * Licensed under the End-User License Agreement For MESCIUS Wijmo Software.
9
+ * us.sales@mescius.com
10
+ * https://developer.mescius.com/wijmo/licensing
11
+ *
12
+ */
13
+ /**
14
+ * {@module wijmo.angular2.core}
15
+ * Contains Angular 2 components for the <b>wijmo</b> module.
16
+ *
17
+ * <b>wijmo.angular2.core</b> is an external TypeScript module that can be imported to your code
18
+ * using its ambient module name. For example:
19
+ *
20
+ * <pre>import * as wjCore from 'wijmo/wijmo.angular2.core';
21
+ * &nbsp;
22
+ * &#64;Component({
23
+ * directives: [wjCore.WjTooltip],
24
+ * template: '&lt;span [wjTooltip]="'Greeting'"&gt;Hello&lt;/span&gt;',
25
+ * selector: 'my-cmp',
26
+ * })
27
+ * export class MyCmp {
28
+ * }</pre>
29
+ *
30
+ */
31
+ /**
32
+ *
33
+ */
34
+ import * as ɵngcc0 from '@angular/core';
35
+ import * as ɵngcc1 from '@angular/common';
36
+ export declare var ___keepComment: any;
37
+ import { EventEmitter, AfterViewInit, ComponentFactoryResolver, ElementRef, Injector, OnInit, OnDestroy } from '@angular/core';
38
+ import { IWjComponentMetadata, IWjDirectiveMeta } from '@grapecity/wijmo.angular2.directivebase';
39
+ import * as wjcCore from '@grapecity/wijmo';
40
+ declare var wjTooltipMeta: IWjDirectiveMeta;
41
+ export { wjTooltipMeta };
42
+ /**
43
+ * Angular 2 directive for the {@link Tooltip} class.
44
+ *
45
+ * Use the **wjTooltip** directive to add tooltips to elements on the page.
46
+ * The wjTooltip directive supports HTML content, smart positioning, and touch.
47
+ *
48
+ * The wjTooltip directive is specified as an attribute added to the
49
+ * element that the tooltip applies to. The parameter value is the tooltip
50
+ * text or the id of an element that contains the text.
51
+ *
52
+ * You can also specify the following additional properties for the tooltip:
53
+ * - wjTooltipPosition - represents the {@link Tooltip.position} property.
54
+ * For example:
55
+ * ```html
56
+ * <p [wjTooltip]="'Just a string'">
57
+ * Paragraph with a string tooltip.
58
+ * </p>
59
+ * <p [wjTooltip]="'#fineprint'" [wjTooltipPosition]="'Left'">
60
+ * Paragraph with a tooltip defined as an element.
61
+ * </p>
62
+ * ...
63
+ * <div id="fineprint" style="display:none">
64
+ * <h3>Important Note</h3>
65
+ * <p>
66
+ * Data for the current quarter is estimated
67
+ * by pro-rating etc.</p>
68
+ * </div>
69
+ * ```
70
+ */
71
+ export declare class WjTooltip implements OnInit, OnDestroy, AfterViewInit {
72
+ private static _toolTip;
73
+ private _toolTipText;
74
+ private _toolTipPosition;
75
+ private _elRef;
76
+ static readonly meta: IWjComponentMetadata;
77
+ private _wjBehaviour;
78
+ /**
79
+ * Indicates whether the component has been initialized by Angular.
80
+ * Changes its value from false to true right before triggering the <b>initialized</b> event.
81
+ */
82
+ isInitialized: boolean;
83
+ /**
84
+ * This event is triggered after the component has been initialized by Angular, that is
85
+ * all bound properties have been assigned and child components (if any) have been initialized.
86
+ */
87
+ initialized: EventEmitter<any>;
88
+ constructor(elRef: ElementRef, injector: Injector, parentCmp: any);
89
+ /**
90
+ * If you create a custom component inherited from a Wijmo component, you can override this
91
+ * method and perform necessary initializations that you usually do in a class constructor.
92
+ * This method is called in the last line of a Wijmo component constructor and allows you
93
+ * to not declare your custom component's constructor at all, thus preventing you from a necessity
94
+ * to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
95
+ */
96
+ created(): void;
97
+ ngOnInit(): void;
98
+ ngAfterViewInit(): void;
99
+ ngOnDestroy(): void;
100
+ wjTooltip: string;
101
+ wjTooltipPosition: wjcCore.PopupPosition;
102
+ static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<WjTooltip, [null, null, { optional: true; skipSelf: true; }]>;
103
+ static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<WjTooltip, "[wjTooltip]", ["wjTooltip"], { "wjTooltip": "wjTooltip"; "wjTooltipPosition": "wjTooltipPosition"; }, { "initialized": "initialized"; }, never, never, false, never>;
104
+ }
105
+ /**
106
+ * Angular component to dynamically load other components.
107
+ *
108
+ * Use the <b>wj-component-loader</b> component to create and load an instance of an arbitrary component class
109
+ * in place of wj-component-loader. You can also pass a set of property values to the instantiated component.
110
+ *
111
+ * Note that any component class which is expected to be instantiated using the <b>wj-component-loader</b>
112
+ * component must be declared in the <b>entryComponents</b> array of the application @NgModule decorator.
113
+ *
114
+ * The example below demonstrates FlexGrid with columns dynamically generated form the column definitions
115
+ * array in the data model. Column definition can optionally contain a reference to a component class
116
+ * that should be used as a cell template. The <b>wj-component-loader</b> component is used to
117
+ * instantiate such a component in the cell template.
118
+ * <pre><b>HTML</b>
119
+ * &nbsp;
120
+ * &lt;wj-flex-grid #flex [itemsSource]="data"&gt;
121
+ * &lt;wj-flex-grid-column *ngFor="let col of columns"
122
+ * [header]="col.header"
123
+ * [binding]="col.binding"
124
+ * [format]="col.format"
125
+ * [width]="col.width"&gt;
126
+ * &lt;ng-template *ngIf="col.cellTemplate"
127
+ * wjFlexGridCellTemplate [cellType]="'Cell'"
128
+ * let-cell="cell"&gt;
129
+ * &lt;wj-component-loader [component]="col.cellTemplate"
130
+ * [properties]="{item: cell.item}"&gt;
131
+ * &lt;/wj-component-loader&gt;
132
+ * &lt;/ng-template&gt;
133
+ * &lt;/wj-flex-grid-column&gt;
134
+ * &lt;/wj-flex-grid&gt;
135
+ * &nbsp;
136
+ * &nbsp;
137
+ * <b>TypeScript</b>
138
+ * &nbsp;
139
+ * &#64;Component({
140
+ * ...
141
+ * })
142
+ * export class AppCmp {
143
+ * columns: any[];
144
+ *
145
+ * constructor() {
146
+ * this.columns = [
147
+ * { header: 'Product', binding: 'product' },
148
+ * { header: 'Revenue', binding: 'amount', format: 'n0' },
149
+ * {
150
+ * header: 'Expense',
151
+ binding: 'amount2',
152
+ cellTemplate: ExpenseCellCmp
153
+ * }
154
+ * ];
155
+ * }
156
+ * }
157
+ *
158
+ * &#64;Component({
159
+ * ...
160
+ * })
161
+ * export class ExpenseCellCmp {
162
+ * item: any;
163
+ * }
164
+ * &nbsp;
165
+ * &#64;NgModule({
166
+ * imports: [CommonModule, WjGridModule],
167
+ * declarations: [AppCmp],
168
+ * entryComponents: [ExpenseCellCmp]
169
+ * })</pre>
170
+ */
171
+ export declare class WjComponentLoader implements OnInit {
172
+ private _cmpResolver;
173
+ private _elementRef;
174
+ private _component;
175
+ private _properties;
176
+ private _cmpRef;
177
+ private _isInit;
178
+ private _anchor;
179
+ propertiesChange: EventEmitter<{}>;
180
+ constructor(/*@Inject(DynamicComponentLoader) private _dcl: DynamicComponentLoader,*/ _cmpResolver: ComponentFactoryResolver, _elementRef: ElementRef);
181
+ /**
182
+ * Gets or sets a component class reference that should be instantiated by the
183
+ * <b>wj-component-loader</b> component.
184
+ *
185
+ * Note that any component class which is expected to be instantiated using the <b>wj-component-loader</b>
186
+ * component must be declared in the <b>entryComponents</b> array of the application @NgModule decorator.
187
+ */
188
+ component: any;
189
+ /**
190
+ * Gets or sets an object with property name-value pairs which is used to initialize the
191
+ * instantiated component.
192
+ */
193
+ properties: Object;
194
+ ngOnInit(): void;
195
+ private _createComponent;
196
+ private _updateProperties;
197
+ private _addPropListener;
198
+ static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<WjComponentLoader, never>;
199
+ static ɵcmp: ɵngcc0.ɵɵComponentDeclaration<WjComponentLoader, "wj-component-loader", never, { "component": "component"; "properties": "properties"; }, { "propertiesChange": "propertiesChange"; }, never, never, false, never>;
200
+ }
201
+ export declare class WjCoreModule {
202
+ static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<WjCoreModule, never>;
203
+ static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<WjCoreModule, [typeof WjTooltip, typeof WjComponentLoader], [typeof ɵngcc1.CommonModule], [typeof WjTooltip, typeof WjComponentLoader]>;
204
+ static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<WjCoreModule>;
205
+ }
package/index.js ADDED
@@ -0,0 +1,71 @@
1
+ /*!
2
+ *
3
+ * Wijmo Library 5.20232.939
4
+ * https://developer.mescius.com/wijmo
5
+ *
6
+ * Copyright(c) MESCIUS inc. All rights reserved.
7
+ *
8
+ * Licensed under the End-User License Agreement For MESCIUS Wijmo Software.
9
+ * us.sales@mescius.com
10
+ * https://developer.mescius.com/wijmo/licensing
11
+ *
12
+ */
13
+
14
+ "use strict";var ɵngcc0 = require('@angular/core');
15
+ var ɵngcc1 = require('@angular/common');
16
+
17
+ var _c0 = ["anchor"];
18
+ var __decorate=this&&this.__decorate||function(o,e,t,r){var i,n=arguments.length,p=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(o,e,t,r);else for(var a=o.length-1;a>=0;a--)(i=o[a])&&(p=(n<3?i(p):n>3?i(e,t,p):i(e,t))||p);return n>3&&p&&Object.defineProperty(e,t,p),p},__param=this&&this.__param||function(o,e){return function(t,r){e(t,r,o)}},__importStar=this&&this.__importStar||function(o){if(o&&o.__esModule)return o;var e={};if(null!=o)for(var t in o)Object.hasOwnProperty.call(o,t)&&(e[t]=o[t]);e.default=o;return e};Object.defineProperty(exports,"__esModule",{value:!0});var core_1=require("@angular/core"),common_1=require("@angular/common"),wijmo_angular2_directivebase_1=require("@mescius/wijmo.angular2.directivebase"),ngCore=__importStar(require("@angular/core")),wjcCore=__importStar(require("@mescius/wijmo")),wjTooltipMeta={selector:"[wjTooltip]",inputs:[],outputs:["initialized"],exportAs:"wjTooltip",providers:[]};exports.wjTooltipMeta=wjTooltipMeta;var WjTooltip=function(){function WjTooltip(e,t,r){this.isInitialized=!1;this._wjBehaviour=wijmo_angular2_directivebase_1.WjDirectiveBehavior.attach(this,e,t,r);this._elRef=e;o._toolTip||(o._toolTip=new wjcCore.Tooltip);this.created()}o=WjTooltip;WjTooltip.prototype.created=function(){};WjTooltip.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjTooltip.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjTooltip.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy();this.wjTooltip=null};Object.defineProperty(WjTooltip.prototype,"wjTooltip",{get:function(){return this._toolTipText},set:function(e){if(this._toolTipText!=e){this._toolTipText=e;o._toolTip.setTooltip(this._elRef.nativeElement,e,this._toolTipPosition)}},enumerable:!0,configurable:!0});Object.defineProperty(WjTooltip.prototype,"wjTooltipPosition",{get:function(){return this._toolTipPosition},set:function(e){if(this._toolTipText){var t=wjcCore.asEnum(e,wjcCore.PopupPosition);if(this._toolTipPosition!=t){this._toolTipPosition=t;o._toolTip.setTooltip(this._elRef.nativeElement,this._toolTipText,t)}}},enumerable:!0,configurable:!0});var o;WjTooltip.meta={outputs:wjTooltipMeta.outputs};__decorate([core_1.Input()],WjTooltip.prototype,"wjTooltip",null);__decorate([core_1.Input()],WjTooltip.prototype,"wjTooltipPosition",null);
19
+ WjTooltip.ɵfac = function WjTooltip_Factory(t) { return new (t || WjTooltip)(ɵngcc0.ɵɵdirectiveInject(core_1.ElementRef), ɵngcc0.ɵɵdirectiveInject(core_1.Injector), ɵngcc0.ɵɵdirectiveInject("WjComponent", 12)); };
20
+ WjTooltip.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: WjTooltip, selectors: [["", "wjTooltip", ""]], inputs: { wjTooltip: "wjTooltip", wjTooltipPosition: "wjTooltipPosition" }, outputs: { initialized: "initialized" }, exportAs: ["wjTooltip"], features: [ɵngcc0.ɵɵProvidersFeature([{ provide: "WjComponent", useExisting: core_1.forwardRef((function () { return o; })) }].concat(wjTooltipMeta.providers))] });
21
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(WjTooltip, [{
22
+ type: core_1.Directive,
23
+ args: [{ selector: wjTooltipMeta.selector, inputs: wjTooltipMeta.inputs, outputs: wjTooltipMeta.outputs, exportAs: wjTooltipMeta.exportAs, providers: [{ provide: "WjComponent", useExisting: core_1.forwardRef((function () { return o; })) }].concat(wjTooltipMeta.providers) }]
24
+ }], function () { return [{ type: undefined, decorators: [{
25
+ type: core_1.Inject,
26
+ args: [core_1.ElementRef]
27
+ }] }, { type: undefined, decorators: [{
28
+ type: core_1.Inject,
29
+ args: [core_1.Injector]
30
+ }] }, { type: undefined, decorators: [{
31
+ type: core_1.Inject,
32
+ args: ["WjComponent"]
33
+ }, {
34
+ type: core_1.SkipSelf
35
+ }, {
36
+ type: core_1.Optional
37
+ }] }]; }, { wjTooltip: [{
38
+ type: core_1.Input
39
+ }], wjTooltipPosition: [{
40
+ type: core_1.Input
41
+ }] }); })();return WjTooltip=o=__decorate([,__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional())],WjTooltip)}();exports.WjTooltip=WjTooltip;var WjComponentLoader=function(){function WjComponentLoader(o,e){this._cmpResolver=o;this._elementRef=e;this._isInit=!1;this.propertiesChange=new ngCore.EventEmitter}Object.defineProperty(WjComponentLoader.prototype,"component",{get:function(){return this._component},set:function(o){if(this._component!==o){this._component=o;this._createComponent()}},enumerable:!0,configurable:!0});Object.defineProperty(WjComponentLoader.prototype,"properties",{get:function(){return this._properties},set:function(o){this._properties=o;this._updateProperties()},enumerable:!0,configurable:!0});WjComponentLoader.prototype.ngOnInit=function(){this._isInit=!0;this._createComponent()};WjComponentLoader.prototype._createComponent=function(){if(this._isInit){if(this._cmpRef){this._cmpRef.destroy();this._cmpRef=null}var o=this._component;if(o&&this._anchor){this._cmpRef=this._anchor.createComponent(this._cmpResolver.resolveComponentFactory(o));this._updateProperties()}}};WjComponentLoader.prototype._updateProperties=function(){var o=this._cmpRef&&this._cmpRef.instance,e=this.properties;if(o&&e)for(var t=0,r=Object.getOwnPropertyNames(e);t<r.length;t++){var i=r[t];o[i]=e[i];var n=o[i+"Change"];n instanceof core_1.EventEmitter&&this._addPropListener(o,i,n)}};WjComponentLoader.prototype._addPropListener=function(o,e,t){var r=this;t.subscribe((function(t){r.properties[e]=r.properties[e]=o[e];r.propertiesChange.next(r.properties)}))};__decorate([core_1.ViewChild("anchor",{read:core_1.ViewContainerRef,static:!0})],WjComponentLoader.prototype,"_anchor",void 0);
42
+ WjComponentLoader.ɵfac = function WjComponentLoader_Factory(t) { return new (t || WjComponentLoader)(ɵngcc0.ɵɵdirectiveInject(core_1.ComponentFactoryResolver), ɵngcc0.ɵɵdirectiveInject(core_1.ElementRef)); };
43
+ WjComponentLoader.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: WjComponentLoader, selectors: [["wj-component-loader"]], viewQuery: function WjComponentLoader_Query(rf, ctx) { if (rf & 1) {
44
+ ɵngcc0.ɵɵviewQuery(_c0, 7, core_1.ViewContainerRef);
45
+ } if (rf & 2) {
46
+ var _t;
47
+ ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._anchor = _t.first);
48
+ } }, inputs: { component: "component", properties: "properties" }, outputs: { propertiesChange: "propertiesChange" }, decls: 2, vars: 0, consts: [["anchor", ""]], template: function WjComponentLoader_Template(rf, ctx) { if (rf & 1) {
49
+ ɵngcc0.ɵɵelement(0, "div", null, 0);
50
+ } }, encapsulation: 2 });
51
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(WjComponentLoader, [{
52
+ type: core_1.Component,
53
+ args: [{ selector: "wj-component-loader", template: "<div #anchor></div>", inputs: ["component", "properties"], outputs: ["propertiesChange"] }]
54
+ }], function () { return [{ type: undefined, decorators: [{
55
+ type: core_1.Inject,
56
+ args: [core_1.ComponentFactoryResolver]
57
+ }] }, { type: undefined, decorators: [{
58
+ type: core_1.Inject,
59
+ args: [core_1.ElementRef]
60
+ }] }]; }, { _anchor: [{
61
+ type: core_1.ViewChild,
62
+ args: ["anchor", { read: core_1.ViewContainerRef, static: !0 }]
63
+ }] }); })();return WjComponentLoader=__decorate([,__param(0,core_1.Inject(core_1.ComponentFactoryResolver)),__param(1,core_1.Inject(core_1.ElementRef))],WjComponentLoader)}();exports.WjComponentLoader=WjComponentLoader;var moduleExports=[WjTooltip,WjComponentLoader],WjCoreModule=function(){function WjCoreModule(){}
64
+ WjCoreModule.ɵfac = function WjCoreModule_Factory(t) { return new (t || WjCoreModule)(); };
65
+ WjCoreModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: WjCoreModule });
66
+ WjCoreModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [common_1.CommonModule] });
67
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(WjCoreModule, [{
68
+ type: core_1.NgModule,
69
+ args: [{ imports: [common_1.CommonModule], declarations: moduleExports.slice(), exports: moduleExports.slice() }]
70
+ }], function () { return []; }, null); })();
71
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(WjCoreModule, { declarations: [WjTooltip, WjComponentLoader], imports: [ɵngcc1.CommonModule], exports: [WjTooltip, WjComponentLoader] }); })();return WjCoreModule}();exports.WjCoreModule=WjCoreModule;
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@mescius/wijmo.angular2.core",
3
+ "version": "5.20232.939",
4
+ "description": "UI library for pure JS, Angular, React, Vue and more...",
5
+ "author": "MESCIUS inc",
6
+ "license": "Commercial",
7
+ "main": "./index.js",
8
+ "types": "./index.d.ts",
9
+ "dependencies": {
10
+ "@mescius/wijmo": "5.20232.939",
11
+ "@mescius/wijmo.angular2.directivebase": "5.20232.939"
12
+ },
13
+ "homepage": "https://developer.mescius.com/wijmo",
14
+ "bugs": {
15
+ "url": "https://developer.mescius.com/forums/wijmo"
16
+ },
17
+ "keywords": [
18
+ "control",
19
+ "component",
20
+ "ui",
21
+ "control library",
22
+ "component library",
23
+ "ui library",
24
+ "control-library",
25
+ "component-library",
26
+ "ui-library",
27
+ "grid",
28
+ "data grid",
29
+ "data-grid",
30
+ "datagrid",
31
+ "angular grid",
32
+ "react grid",
33
+ "vue grid",
34
+ "angular-grid",
35
+ "react-grid",
36
+ "vue-grid"
37
+ ],
38
+ "module": "./es5-esm.js",
39
+ "esm5": "./es5-esm.js",
40
+ "wj-esm5": "./es5-esm.js",
41
+ "es2015Cjs": "./es2015-commonjs.js",
42
+ "wj-es2015Cjs": "./es2015-commonjs.js",
43
+ "esm2015": "./es2015-esm.js",
44
+ "wj-esm2015": "./es2015-esm.js"
45
+ }