@boldreports/angular-reporting-components 4.2.55 → 4.2.57
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/{@boldreports → dist/@boldreports}/angular-reporting-components.es5.js +1 -2
- package/dist/@boldreports/angular-reporting-components.es5.js.map +1 -0
- package/{@boldreports → dist/@boldreports}/angular-reporting-components.js +1 -2
- package/dist/@boldreports/angular-reporting-components.js.map +1 -0
- package/dist/README.md +31 -0
- package/{angular-reporting-components.d.ts → dist/angular-reporting-components.d.ts} +0 -0
- package/dist/angular-reporting-components.metadata.json +1 -0
- package/{bundles → dist/bundles}/angular-reporting-components.umd.js +1 -2
- package/dist/bundles/angular-reporting-components.umd.js.map +1 -0
- package/dist/bundles/angular-reporting-components.umd.min.js +2 -0
- package/dist/bundles/angular-reporting-components.umd.min.js.map +1 -0
- package/{core.d.ts → dist/core.d.ts} +0 -0
- package/{index.d.ts → dist/index.d.ts} +0 -0
- package/dist/package.json +67 -0
- package/{reportdesigner.component.d.ts → dist/reportdesigner.component.d.ts} +0 -0
- package/{reportdesigner.module.d.ts → dist/reportdesigner.module.d.ts} +0 -0
- package/{reports.module.d.ts → dist/reports.module.d.ts} +0 -0
- package/{reportviewer.component.d.ts → dist/reportviewer.component.d.ts} +1 -2
- package/{reportviewer.module.d.ts → dist/reportviewer.module.d.ts} +0 -0
- package/ng-package.json +10 -0
- package/package.json +62 -67
- package/src/core.ts +410 -0
- package/src/index.ts +4 -0
- package/src/reportdesigner.component.ts +100 -0
- package/src/reportdesigner.module.ts +17 -0
- package/src/reports.module.ts +20 -0
- package/src/reportviewer.component.ts +95 -0
- package/src/reportviewer.module.ts +17 -0
- package/tsconfig.json +37 -0
- package/@boldreports/angular-reporting-components.es5.js.map +0 -1
- package/@boldreports/angular-reporting-components.js.map +0 -1
- package/angular-reporting-components.metadata.json +0 -1
- package/bundles/angular-reporting-components.umd.js.map +0 -1
- package/bundles/angular-reporting-components.umd.min.js +0 -2
- package/bundles/angular-reporting-components.umd.min.js.map +0 -1
package/src/core.ts
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EventEmitter, QueryList, ElementRef, SimpleChange,
|
|
3
|
+
ChangeDetectorRef, IterableDiffers, KeyValueDiffers, OnInit,
|
|
4
|
+
DoCheck, AfterContentInit, AfterViewInit, OnChanges, AfterContentChecked, OnDestroy
|
|
5
|
+
} from '@angular/core';
|
|
6
|
+
|
|
7
|
+
export { ContentChild, Type, forwardRef } from '@angular/core';
|
|
8
|
+
|
|
9
|
+
export let currentTemplateElement: any;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export interface IParentTag {
|
|
14
|
+
tags: Array<any>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IChildChange {
|
|
18
|
+
index: number;
|
|
19
|
+
change: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IChangeSet {
|
|
23
|
+
[key: string]: Array<IChildChange>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
let firstVal = {};
|
|
27
|
+
|
|
28
|
+
/** Internal Helpers */
|
|
29
|
+
export class Utils {
|
|
30
|
+
static IterateAndGetChanges(obj: IParentTag): IChangeSet {
|
|
31
|
+
if (ej.isNullOrUndefined(obj.tags) || obj.tags.length === 0) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
let res: IChangeSet = {};
|
|
35
|
+
for (let i = 0, tags = obj.tags; i < tags.length; i++) {
|
|
36
|
+
let tag = tags[i], tagElement = (<any>obj)['tag_' + tag.replace(/\./g, '_')];
|
|
37
|
+
if (!ej.isNullOrUndefined(tagElement) && tagElement.hasChanges) {
|
|
38
|
+
res[tag] = tagElement.getChangesAndReset();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return res;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// tslint:disable-next-line:max-line-length
|
|
47
|
+
export class BoldReportComponents<W, T> implements IParentTag, OnInit, AfterContentInit, DoCheck, AfterViewInit, OnChanges, AfterContentChecked, OnDestroy {
|
|
48
|
+
public model: T = <T>{};
|
|
49
|
+
public widget: W;
|
|
50
|
+
protected outputs: Array<string> = [];
|
|
51
|
+
protected inputs: Array<string> = [];
|
|
52
|
+
protected twoways: Array<string> = [];
|
|
53
|
+
protected complexProperties: Array<string>;
|
|
54
|
+
protected isEditor: boolean;
|
|
55
|
+
|
|
56
|
+
private firstCheck: boolean;
|
|
57
|
+
ejIterable: any;
|
|
58
|
+
ejKeyValueDif: any;
|
|
59
|
+
|
|
60
|
+
private static bindAndRaiseEvent(instance: any, model: any, event: string) {
|
|
61
|
+
if (!event.startsWith('model.')) {// && instance[event]['observers'].length > 1) {
|
|
62
|
+
let originalEvt = event.startsWith('bold') ? event.substr(4) : event;
|
|
63
|
+
model[originalEvt] = function (params: any) {
|
|
64
|
+
instance[event + '_output']['emit'](params);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// tslint:disable-next-line:max-line-length
|
|
69
|
+
constructor(protected controlName: string, protected el: ElementRef, protected cdRef: ChangeDetectorRef, public tags: Array<string>, private ejIterableDiffers: IterableDiffers, private _ejKeyValueDiffers: KeyValueDiffers) {
|
|
70
|
+
// this.__shadow = this.dom.getShadowRoot(this.el.nativeElement);
|
|
71
|
+
this.firstCheck = true;
|
|
72
|
+
this.ejIterable = this.ejIterableDiffers.find([]).create(null);
|
|
73
|
+
this.ejKeyValueDif = _ejKeyValueDiffers.find([]).create();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
protected createTwoways(twoways: Array<string>) {
|
|
77
|
+
if (!twoways) { return; }
|
|
78
|
+
let model = this.model;
|
|
79
|
+
for (let i = 0; i < twoways.length; i++) {
|
|
80
|
+
let element = twoways[i].replace(/\_/g, '.');
|
|
81
|
+
ej.createObject(element + 'Change', (<any>this)[twoways[i] + '_twoChange'], model);
|
|
82
|
+
ej.createObject(element, this.addTwoways(element), model);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
protected addTwoways(prop: string): Function {
|
|
87
|
+
let model = this.model, value = firstVal; // , originalProp = prop.replace(/-/g, '.');
|
|
88
|
+
return function (newVal: any, isApp: boolean) {
|
|
89
|
+
if (value === firstVal) {
|
|
90
|
+
value = ej.getObject(prop + '_two', model);
|
|
91
|
+
if (value === undefined) {
|
|
92
|
+
value = ej.getObject(prop, this === undefined || this.defaults === undefined ? {} : this.defaults);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (newVal === undefined) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
if (value === newVal) { return; }
|
|
99
|
+
value = newVal;
|
|
100
|
+
if (!isApp) {
|
|
101
|
+
ej.createObject(prop + '_two', newVal, model);
|
|
102
|
+
ej.getObject(prop + 'Change', model).emit(newVal);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
ngOnInit() {
|
|
107
|
+
for (let key in this) {
|
|
108
|
+
if (key.indexOf('_input') != -1)
|
|
109
|
+
this.inputs.push(key);
|
|
110
|
+
if (key.indexOf('_output') != -1)
|
|
111
|
+
this.outputs.push(key);
|
|
112
|
+
if (key.indexOf('_two') != -1 && key.indexOf('_twoChange') == -1)
|
|
113
|
+
this.twoways.push(key.replace('_two', ''));
|
|
114
|
+
}
|
|
115
|
+
if (ej.isNullOrUndefined((<any>this)['options'])) {
|
|
116
|
+
this.createTwoways(this.twoways);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
ngAfterContentInit() {
|
|
121
|
+
this.firstCheck = false;
|
|
122
|
+
|
|
123
|
+
let model = this.model, events = this.outputs;
|
|
124
|
+
if (events) {
|
|
125
|
+
for (let i = 0; i < events.length; i++) {
|
|
126
|
+
let event = events[i].replace('_output', '');
|
|
127
|
+
BoldReportComponents.bindAndRaiseEvent(this, model, event);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (ej.isNullOrUndefined((<any>this)['options'])) {
|
|
131
|
+
for (let i = 0; i < this.tags.length; i++) {
|
|
132
|
+
let element = this.tags[i], item = (<any>this)['tag_' + element.replace(/\./g, '_')];
|
|
133
|
+
if (!ej.isNullOrUndefined(item)) {
|
|
134
|
+
ej.createObject(element, item.getList(), this.model);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
for (let i = 0; i < this.inputs.length; i++) {
|
|
139
|
+
let property = this.inputs[i];
|
|
140
|
+
let modelProperty = this.inputs[i].replace('_input', '');
|
|
141
|
+
if ((<any>this)[property] != null) {
|
|
142
|
+
if (modelProperty.indexOf('_') == -1) {
|
|
143
|
+
if ((<any>this.model)[modelProperty]) {
|
|
144
|
+
$.extend(true, (<any>this.model)[modelProperty], (<any>this)[property]);
|
|
145
|
+
} else {
|
|
146
|
+
(<any>this.model)[modelProperty] = (<any>this)[property];
|
|
147
|
+
}
|
|
148
|
+
} else if (modelProperty.indexOf('_two') == -1) {
|
|
149
|
+
let tempObj: any = {};
|
|
150
|
+
let key = modelProperty.replace(/\_/g, '.');
|
|
151
|
+
ej.createObject(key, (<any>this)[property], tempObj);
|
|
152
|
+
let rootProp = key.split('.')[0];
|
|
153
|
+
if ((<any>this.model)[rootProp] == undefined)
|
|
154
|
+
(<any>this.model)[rootProp] = {};
|
|
155
|
+
$.extend(true, (<any>this.model)[rootProp], tempObj[rootProp]);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
for (let i = 0; i < this.twoways.length; i++) {
|
|
160
|
+
let twoway = this.twoways[i];
|
|
161
|
+
let twowayProperty = twoway + '_two';
|
|
162
|
+
if ((<any>this)[twowayProperty] != null) {
|
|
163
|
+
if (twoway.indexOf('_') == -1) {
|
|
164
|
+
(<any>this.model)[twowayProperty] = (<any>this)[twowayProperty];
|
|
165
|
+
} else {
|
|
166
|
+
let tempObj: any = {};
|
|
167
|
+
let key = twoway.replace(/\_/g, '.') + '_two';
|
|
168
|
+
ej.createObject(key, (<any>this)[twowayProperty], tempObj);
|
|
169
|
+
let rootProp = twowayProperty.split('_')[0];
|
|
170
|
+
$.extend(true, (<any>this.model)[rootProp], tempObj[rootProp]);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else
|
|
176
|
+
this.model = jQuery.extend(this.model, (<any>this)['options']);
|
|
177
|
+
|
|
178
|
+
}
|
|
179
|
+
ngDoCheck() {
|
|
180
|
+
if (ej.isNullOrUndefined((<any>this)['options'])) {
|
|
181
|
+
this.twoways.forEach(element => {
|
|
182
|
+
if ((<any>this)[element + '_two'] instanceof Array) {
|
|
183
|
+
let changes = this.ejIterable.diff((<any>this)[element + '_two']);
|
|
184
|
+
if (changes) {
|
|
185
|
+
let ngChanges = {};
|
|
186
|
+
if (this.widget != undefined) {
|
|
187
|
+
ngChanges = this.getTwowayChanges(changes.collection, ngChanges, element.replace(/\_/g, '.'));
|
|
188
|
+
ej.createObject(element.replace(/\_/g, '.') + '.two', changes.collection, ngChanges);
|
|
189
|
+
(<any>this.widget)['setModel'](ngChanges, $.isPlainObject(ngChanges));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
let changes = this.ejKeyValueDif.diff((<any>this)['options']);
|
|
198
|
+
if (changes) {
|
|
199
|
+
if (this.widget != undefined) {
|
|
200
|
+
var ngchanges = {};
|
|
201
|
+
changes.forEachChangedItem((changedprop: any) => {
|
|
202
|
+
ej.createObject(changedprop.key, changedprop.currentValue, ngchanges);
|
|
203
|
+
});
|
|
204
|
+
(<any>this.widget)['setModel'](ngchanges, $.isPlainObject(ngchanges));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
ngAfterViewInit() {
|
|
210
|
+
let nativeElement = this.isEditor ? $(this.el.nativeElement.children) : $(this.el.nativeElement);
|
|
211
|
+
let controlName: string = this.lowerCaseFirstLetter(this.controlName);
|
|
212
|
+
this.widget = ($(nativeElement) as any)[controlName](this.model)[controlName]('instance');
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
lowerCaseFirstLetter(string: string) {
|
|
216
|
+
return string[0].toLowerCase() + string.slice(1);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
ngOnChanges(changes: { [key: string]: SimpleChange }) {
|
|
220
|
+
if (this.firstCheck) { return; }
|
|
221
|
+
let ngChanges = {};
|
|
222
|
+
if (ej.isNullOrUndefined((<any>this)['options'])) {
|
|
223
|
+
for (let key in changes) {
|
|
224
|
+
let element = changes[key];
|
|
225
|
+
if (element.previousValue === element.currentValue) {
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
key = key.replace('_input', '').replace(/\_/g, '.');
|
|
229
|
+
if (key.endsWith('.two')) {
|
|
230
|
+
let oKey = key.replace('.two', '');
|
|
231
|
+
ngChanges = this.getTwowayChanges(element.currentValue, ngChanges, oKey);
|
|
232
|
+
}
|
|
233
|
+
ej.createObject(key, element.currentValue, ngChanges);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
(<any>this.widget)['setModel'](ngChanges, $.isPlainObject(ngChanges));
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
getTwowayChanges(value: any, ngChanges: any, prop: string) {
|
|
241
|
+
let valFn = ej.getObject(prop, (<any>this.widget)['model']);
|
|
242
|
+
valFn(value, true);
|
|
243
|
+
ej.createObject(prop, valFn, ngChanges);
|
|
244
|
+
return ngChanges;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
ngAfterContentChecked() {
|
|
248
|
+
// TODO: ChangeDetection Third/Multi level
|
|
249
|
+
let changes: IChangeSet = Utils.IterateAndGetChanges(this);
|
|
250
|
+
for (let key in changes) {
|
|
251
|
+
if (changes.hasOwnProperty(key)) {
|
|
252
|
+
let element = changes[key];
|
|
253
|
+
(<any>this.widget)['_' + key](element);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
ngOnDestroy() {
|
|
259
|
+
(<any>this.widget)['destroy']();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export class ComplexTagElement implements OnInit, OnChanges, AfterContentChecked {
|
|
264
|
+
recentChanges: any;
|
|
265
|
+
hasChanges: boolean;
|
|
266
|
+
firstChange: boolean;
|
|
267
|
+
index: number;
|
|
268
|
+
valueChange: EventEmitter<any> = new EventEmitter();
|
|
269
|
+
protected complexProperties: Array<string>;
|
|
270
|
+
property: string;
|
|
271
|
+
parent: BoldReportComponents<any, any>;
|
|
272
|
+
complexes: Array<string> = [];
|
|
273
|
+
|
|
274
|
+
// tags: Array<string>;
|
|
275
|
+
|
|
276
|
+
constructor(public tags: Array<string>) {
|
|
277
|
+
this.hasChanges = false;
|
|
278
|
+
this.firstChange = true;
|
|
279
|
+
|
|
280
|
+
Object.defineProperty(this, 'parent', {
|
|
281
|
+
enumerable: false,
|
|
282
|
+
writable: true,
|
|
283
|
+
value: null
|
|
284
|
+
});
|
|
285
|
+
currentTemplateElement = this;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
ngOnInit() {
|
|
289
|
+
this.firstChange = false;
|
|
290
|
+
for (let key in this) {
|
|
291
|
+
if (key.indexOf('_') != -1 && key.indexOf('tag_') == -1)
|
|
292
|
+
this.complexes.push(key);
|
|
293
|
+
}
|
|
294
|
+
for (let i = 0; i < this.complexes.length; i++) {
|
|
295
|
+
let property = this.complexes[i];
|
|
296
|
+
if (property.indexOf('_') != -1) {
|
|
297
|
+
let tempObj: any = {};
|
|
298
|
+
let key = property.replace(/\_/g, '.');
|
|
299
|
+
ej.createObject(key, (<any>this)[property], tempObj);
|
|
300
|
+
let rootProp = key.split('.')[0];
|
|
301
|
+
if ((<any>this)[rootProp] == undefined) (<any>this)[rootProp] = {};
|
|
302
|
+
$.extend(true, (<any>this)[rootProp], tempObj[rootProp]);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
ensureCleanObject() {
|
|
308
|
+
let tags = this.tags;
|
|
309
|
+
for (let i = 0; i < tags.length; i++) {
|
|
310
|
+
let element = tags[i], tagElement = (<any>this)['tag_' + element.replace(/\./g, '_')];
|
|
311
|
+
|
|
312
|
+
if (i === 0 && (<any>this)[element]) { return; }
|
|
313
|
+
if (ej.isNullOrUndefined(tagElement)) { continue; }
|
|
314
|
+
|
|
315
|
+
ej.createObject(element, tagElement.getList(), this);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
ngOnChanges(changes: { [key: string]: SimpleChange }) {
|
|
320
|
+
if (this.firstChange) { return; }
|
|
321
|
+
this.recentChanges = changes;
|
|
322
|
+
this.hasChanges = true;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
getChangesAndReset() {
|
|
326
|
+
if (this.hasChanges === false) { return; }
|
|
327
|
+
|
|
328
|
+
let changes = this.recentChanges || {};
|
|
329
|
+
let contentChanges = Utils.IterateAndGetChanges(this);
|
|
330
|
+
if (!$.isEmptyObject(contentChanges)) {
|
|
331
|
+
for (let key in contentChanges) {
|
|
332
|
+
if (contentChanges.hasOwnProperty(key)) {
|
|
333
|
+
let element = contentChanges[key];
|
|
334
|
+
// this.el.nativeElement.
|
|
335
|
+
if (!ej.isNullOrUndefined(this.parent.widget['_' + this.property.replace(/\./g, '_') + '_' + key]))
|
|
336
|
+
this.parent.widget['_' + this.property.replace(/\./g, '_') + '_' + key](element);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
this.hasChanges = false;
|
|
342
|
+
return changes;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
ngAfterContentChecked() {
|
|
346
|
+
let tags = this.tags;
|
|
347
|
+
for (let i = 0, len = tags.length; i < len; i++) {
|
|
348
|
+
let element = tags[i], tagElement = (<any>this)['tag_' + element.replace(/\./g, '_')];
|
|
349
|
+
if (tagElement && tagElement.hasChanges) {
|
|
350
|
+
this.hasChanges = true;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export class ArrayTagElement<T extends ComplexTagElement> implements AfterContentInit, AfterContentChecked {
|
|
357
|
+
list: Array<T>;
|
|
358
|
+
children: QueryList<T>;
|
|
359
|
+
recentChanges: Array<IChildChange>;
|
|
360
|
+
hasChanges: boolean;
|
|
361
|
+
|
|
362
|
+
constructor(public propertyName: string) {
|
|
363
|
+
this.hasChanges = false;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// TODO: Need to consider dynamic child change
|
|
367
|
+
ngAfterContentInit() {
|
|
368
|
+
let index = 0;
|
|
369
|
+
this.list = this.children.map((child) => {
|
|
370
|
+
child.index = index++;
|
|
371
|
+
child.property = this.propertyName;
|
|
372
|
+
return child;
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
getList() {
|
|
377
|
+
let list = this.list;
|
|
378
|
+
for (let i = 0; i < list.length; i++) {
|
|
379
|
+
list[i].ensureCleanObject();
|
|
380
|
+
}
|
|
381
|
+
return list;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
getChangesAndReset(): Array<IChildChange> {
|
|
385
|
+
this.hasChanges = false;
|
|
386
|
+
return this.recentChanges;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
ngAfterContentChecked(): void {
|
|
390
|
+
let changes = {}, res: Array<IChildChange> = (<any>changes)[this.propertyName] = [], childChange: any;
|
|
391
|
+
|
|
392
|
+
for (let i = 0, list = this.list; i < list.length; i++) {
|
|
393
|
+
let child = list[i];
|
|
394
|
+
if (child.hasChanges) {
|
|
395
|
+
childChange = child.getChangesAndReset();
|
|
396
|
+
if (!ej.isNullOrUndefined(childChange)) {
|
|
397
|
+
res.push(<IChildChange>{
|
|
398
|
+
index: child.index,
|
|
399
|
+
change: childChange
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
if (res.length > 0) {
|
|
406
|
+
this.recentChanges = res;
|
|
407
|
+
this.hasChanges = true;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { BoldReportComponents } from './core';
|
|
2
|
+
// tslint:disable-next-line:max-line-length
|
|
3
|
+
import { EventEmitter, IterableDiffers, KeyValueDiffers, Component, ElementRef, ChangeDetectorRef, Input, Output } from '@angular/core';
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'bold-reportdesigner',
|
|
6
|
+
template: ''})
|
|
7
|
+
export class BoldReportDesignerComponent extends BoldReportComponents<any, any> {
|
|
8
|
+
@Input('configurePaneSettings') configurePaneSettings_input: any;
|
|
9
|
+
@Input('disableCodeModule') disableCodeModule_input: any;
|
|
10
|
+
@Input('enableImpersonate') enableImpersonate_input: any;
|
|
11
|
+
@Input('enableImageBlobing') enableImageBlobing_input: any;
|
|
12
|
+
@Input('filterDataConnectors') filterDataConnectors_input: any;
|
|
13
|
+
@Input('filterReportItems') filterReportItems_input: any;
|
|
14
|
+
@Input('fontNames') fontNames_input: any;
|
|
15
|
+
@Input('locale') locale_input: any;
|
|
16
|
+
@Input('permissionSettings') permissionSettings_input: any;
|
|
17
|
+
@Input('previewOptions') previewOptions_input: any;
|
|
18
|
+
@Input('reportDataExtensions') reportDataExtensions_input: any;
|
|
19
|
+
@Input('reportItemExtensions') reportItemExtensions_input: any;
|
|
20
|
+
@Input('reportPath') reportPath_input: any;
|
|
21
|
+
@Input('reportVersion') reportVersion_input: any;
|
|
22
|
+
@Input('reportType') reportType_input: any;
|
|
23
|
+
@Input('reportServerUrl') reportServerUrl_input: any;
|
|
24
|
+
@Input('serviceAuthorizationToken') serviceAuthorizationToken_input: any;
|
|
25
|
+
@Input('serviceUrl') serviceUrl_input: any;
|
|
26
|
+
@Input('toolbarSettings') toolbarSettings_input: any;
|
|
27
|
+
@Input('waitingPopupTemplate') waitingPopupTemplate_input: any;
|
|
28
|
+
@Input('dataTabIndex') dataTabIndex_input: any;
|
|
29
|
+
@Input('configurePaneSettings.items') configurePaneSettings_items_input: any;
|
|
30
|
+
@Input('configurePaneSettings.showPane') configurePaneSettings_showPane_input: any;
|
|
31
|
+
@Input('dataSources.name') dataSources_name_input: any;
|
|
32
|
+
@Input('dataSources.value') dataSources_value_input: any;
|
|
33
|
+
@Input('exportSettings.exportOptions') exportSettings_exportOptions_input: any;
|
|
34
|
+
@Input('exportSettings.excelFormat') exportSettings_excelFormat_input: any;
|
|
35
|
+
@Input('exportSettings.wordFormat') exportSettings_wordFormat_input: any;
|
|
36
|
+
@Input('exportSettings.customItems') exportSettings_customItems_input: any;
|
|
37
|
+
@Input('pageSettings.orientation') pageSettings_orientation_input: any;
|
|
38
|
+
@Input('pageSettings.paperSize') pageSettings_paperSize_input: any;
|
|
39
|
+
@Input('pageSettings.height') pageSettings_height_input: any;
|
|
40
|
+
@Input('pageSettings.width') pageSettings_width_input: any;
|
|
41
|
+
@Input('pageSettings.margins') pageSettings_margins_input: any;
|
|
42
|
+
@Input('parameters.labels') parameters_labels_input: any;
|
|
43
|
+
@Input('parameters.name') parameters_name_input: any;
|
|
44
|
+
@Input('parameters.nullable') parameters_nullable_input: any;
|
|
45
|
+
@Input('parameters.prompt') parameters_prompt_input: any;
|
|
46
|
+
@Input('parameters.values') parameters_values_input: any;
|
|
47
|
+
@Input('parameterSettings.delimiterChar') parameterSettings_delimiterChar_input: any;
|
|
48
|
+
@Input('parameterSettings.popupHeight') parameterSettings_popupHeight_input: any;
|
|
49
|
+
@Input('parameterSettings.popupWidth') parameterSettings_popupWidth_input: any;
|
|
50
|
+
@Input('parameterSettings.itemWidth') parameterSettings_itemWidth_input: any;
|
|
51
|
+
@Input('parameterSettings.labelWidth') parameterSettings_labelWidth_input: any;
|
|
52
|
+
@Input('permissionSettings.dataSet') permissionSettings_dataSet_input: any;
|
|
53
|
+
@Input('permissionSettings.dataSource') permissionSettings_dataSource_input: any;
|
|
54
|
+
@Input('previewOptions.dataSources') previewOptions_dataSources_input: any;
|
|
55
|
+
@Input('previewOptions.enableParameterBlockScroller') previewOptions_enableParameterBlockScroller_input: any;
|
|
56
|
+
@Input('previewOptions.enableDatasourceBlockScroller') previewOptions_enableDatasourceBlockScroller_input: any;
|
|
57
|
+
@Input('previewOptions.enableDropDownSearch') previewOptions_enableDropDownSearch_input: any;
|
|
58
|
+
@Input('previewOptions.exportSettings') previewOptions_exportSettings_input: any;
|
|
59
|
+
@Input('previewOptions.pageSettings') previewOptions_pageSettings_input: any;
|
|
60
|
+
@Input('previewOptions.parameters') previewOptions_parameters_input: any;
|
|
61
|
+
@Input('previewOptions.parameterSettings') previewOptions_parameterSettings_input: any;
|
|
62
|
+
@Input('previewOptions.printMode') previewOptions_printMode_input: any;
|
|
63
|
+
@Input('previewOptions.printOption') previewOptions_printOption_input: any;
|
|
64
|
+
@Input('previewOptions.toolbarSettings') previewOptions_toolbarSettings_input: any;
|
|
65
|
+
@Input('previewOptions.zoomFactor') previewOptions_zoomFactor_input: any;
|
|
66
|
+
@Input('reportDataExtensions.name') reportDataExtensions_name_input: any;
|
|
67
|
+
@Input('reportDataExtensions.className') reportDataExtensions_className_input: any;
|
|
68
|
+
@Input('reportDataExtensions.imageClass') reportDataExtensions_imageClass_input: any;
|
|
69
|
+
@Input('reportDataExtensions.displayName') reportDataExtensions_displayName_input: any;
|
|
70
|
+
@Input('reportItemExtensions.name') reportItemExtensions_name_input: any;
|
|
71
|
+
@Input('reportItemExtensions.className') reportItemExtensions_className_input: any;
|
|
72
|
+
@Input('reportItemExtensions.imageClass') reportItemExtensions_imageClass_input: any;
|
|
73
|
+
@Input('reportItemExtensions.displayName') reportItemExtensions_displayName_input: any;
|
|
74
|
+
@Input('reportItemExtensions.category') reportItemExtensions_category_input: any;
|
|
75
|
+
@Input('reportItemExtensions.toolTip') reportItemExtensions_toolTip_input: any;
|
|
76
|
+
@Input('toolbarSettings.items') toolbarSettings_items_input: any;
|
|
77
|
+
@Input('toolbarSettings.showToolbar') toolbarSettings_showToolbar_input: any;
|
|
78
|
+
@Input('toolbarSettings.templateId') toolbarSettings_templateId_input: any;
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@Output('ajaxBeforeLoad') ajaxBeforeLoad_output : any = new EventEmitter();
|
|
82
|
+
@Output('ajaxError') ajaxError_output : any = new EventEmitter();
|
|
83
|
+
@Output('ajaxSuccess') ajaxSuccess_output : any = new EventEmitter();
|
|
84
|
+
@Output('create') create_output : any = new EventEmitter();
|
|
85
|
+
@Output('destroy') destroy_output : any = new EventEmitter();
|
|
86
|
+
@Output('newDataClick') newDataClick_output : any = new EventEmitter();
|
|
87
|
+
@Output('openReportClick') openReportClick_output : any = new EventEmitter();
|
|
88
|
+
@Output('previewReport') previewReport_output : any = new EventEmitter();
|
|
89
|
+
@Output('reportModified') reportModified_output : any = new EventEmitter();
|
|
90
|
+
@Output('reportOpened') reportOpened_output : any = new EventEmitter();
|
|
91
|
+
@Output('reportSaved') reportSaved_output : any = new EventEmitter();
|
|
92
|
+
@Output('saveReportClick') saveReportClick_output : any = new EventEmitter();
|
|
93
|
+
@Output('toolbarClick') toolbarClick_output : any = new EventEmitter();
|
|
94
|
+
@Output('toolbarRendering') toolbarRendering_output : any = new EventEmitter();
|
|
95
|
+
|
|
96
|
+
// tslint:disable-next-line:max-line-length
|
|
97
|
+
constructor(public el: ElementRef, public cdRef: ChangeDetectorRef, private _ejIterableDiffers: IterableDiffers, private _ejkeyvaluediffers: KeyValueDiffers) {
|
|
98
|
+
super('BoldReportDesigner', el, cdRef, [], _ejIterableDiffers, _ejkeyvaluediffers);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { BoldReportDesignerComponent } from './reportdesigner.component';
|
|
4
|
+
|
|
5
|
+
@NgModule({
|
|
6
|
+
imports: [
|
|
7
|
+
CommonModule
|
|
8
|
+
],
|
|
9
|
+
declarations: [
|
|
10
|
+
BoldReportDesignerComponent
|
|
11
|
+
],
|
|
12
|
+
exports: [
|
|
13
|
+
BoldReportDesignerComponent
|
|
14
|
+
]
|
|
15
|
+
})
|
|
16
|
+
export class BoldReportDesignerModule {
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { BoldReportDesignerModule } from './reportdesigner.module';
|
|
4
|
+
import { BoldReportViewerModule } from './reportviewer.module';
|
|
5
|
+
|
|
6
|
+
@NgModule({
|
|
7
|
+
imports: [
|
|
8
|
+
CommonModule,
|
|
9
|
+
BoldReportViewerModule,
|
|
10
|
+
BoldReportDesignerModule
|
|
11
|
+
],
|
|
12
|
+
declarations: [
|
|
13
|
+
],
|
|
14
|
+
exports: [
|
|
15
|
+
BoldReportViewerModule,
|
|
16
|
+
BoldReportDesignerModule
|
|
17
|
+
]
|
|
18
|
+
})
|
|
19
|
+
export class BoldReportsModule {
|
|
20
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { BoldReportComponents } from './core';
|
|
2
|
+
// tslint:disable-next-line:max-line-length
|
|
3
|
+
import { EventEmitter, IterableDiffers, KeyValueDiffers, Component, ElementRef, ChangeDetectorRef, Input, Output } from '@angular/core';
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'bold-reportviewer',
|
|
6
|
+
template: ''})
|
|
7
|
+
export class BoldReportViewerComponent extends BoldReportComponents<any, any> {
|
|
8
|
+
@Input('dataSources') dataSources_input: any;
|
|
9
|
+
@Input('exportSettings') exportSettings_input: any;
|
|
10
|
+
@Input('isResponsive') isResponsive_input: any;
|
|
11
|
+
@Input('locale') locale_input: any;
|
|
12
|
+
@Input('pageSettings') pageSettings_input: any;
|
|
13
|
+
@Input('parameters') parameters_input: any;
|
|
14
|
+
@Input('toolbarSettings') toolbarSettings_input: any;
|
|
15
|
+
@Input('parameterSettings') parameterSettings_input: any;
|
|
16
|
+
@Input('printMode') printMode_input: any;
|
|
17
|
+
@Input('printOption') printOption_input: any;
|
|
18
|
+
@Input('processingMode') processingMode_input: any;
|
|
19
|
+
@Input('renderMode') renderMode_input: any;
|
|
20
|
+
@Input('reportPath') reportPath_input: any;
|
|
21
|
+
@Input('reportServerUrl') reportServerUrl_input: any;
|
|
22
|
+
@Input('reportServiceUrl') reportServiceUrl_input: any;
|
|
23
|
+
@Input('zoomFactor') zoomFactor_input: any;
|
|
24
|
+
@Input('serviceAuthorizationToken') serviceAuthorizationToken_input: any;
|
|
25
|
+
@Input('enableParameterBlockScroller') enableParameterBlockScroller_input: any;
|
|
26
|
+
@Input('enableDatasourceBlockScroller') enableDatasourceBlockScroller_input: any;
|
|
27
|
+
@Input('sizeToReportContent') sizeToReportContent_input: any;
|
|
28
|
+
@Input('autoRender') autoRender_input: any;
|
|
29
|
+
@Input('enableNotificationBar') enableNotificationBar_input: any;
|
|
30
|
+
@Input('enableDropDownSearch') enableDropDownSearch_input: any;
|
|
31
|
+
@Input('enableVirtualEvaluation') enableVirtualEvaluation_input: any;
|
|
32
|
+
@Input('waitingPopupTemplate') waitingPopupTemplate_input: any;
|
|
33
|
+
@Input('dataSources.name') dataSources_name_input: any;
|
|
34
|
+
@Input('dataSources.value') dataSources_value_input: any;
|
|
35
|
+
@Input('exportSettings.exportOptions') exportSettings_exportOptions_input: any;
|
|
36
|
+
@Input('exportSettings.excelFormat') exportSettings_excelFormat_input: any;
|
|
37
|
+
@Input('exportSettings.wordFormat') exportSettings_wordFormat_input: any;
|
|
38
|
+
@Input('exportSettings.customItems') exportSettings_customItems_input: any;
|
|
39
|
+
@Input('exportSettings.imageQuality') exportSettings_imageQuality_input: any;
|
|
40
|
+
@Input('pageSettings.orientation') pageSettings_orientation_input: any;
|
|
41
|
+
@Input('pageSettings.paperSize') pageSettings_paperSize_input: any;
|
|
42
|
+
@Input('pageSettings.height') pageSettings_height_input: any;
|
|
43
|
+
@Input('pageSettings.width') pageSettings_width_input: any;
|
|
44
|
+
@Input('pageSettings.margins') pageSettings_margins_input: any;
|
|
45
|
+
@Input('parameters.labels') parameters_labels_input: any;
|
|
46
|
+
@Input('parameters.name') parameters_name_input: any;
|
|
47
|
+
@Input('parameters.nullable') parameters_nullable_input: any;
|
|
48
|
+
@Input('parameters.prompt') parameters_prompt_input: any;
|
|
49
|
+
@Input('parameters.values') parameters_values_input: any;
|
|
50
|
+
@Input('parameterSettings.delimiterChar') parameterSettings_delimiterChar_input: any;
|
|
51
|
+
@Input('parameterSettings.popupHeight') parameterSettings_popupHeight_input: any;
|
|
52
|
+
@Input('parameterSettings.popupWidth') parameterSettings_popupWidth_input: any;
|
|
53
|
+
@Input('parameterSettings.itemWidth') parameterSettings_itemWidth_input: any;
|
|
54
|
+
@Input('parameterSettings.labelWidth') parameterSettings_labelWidth_input: any;
|
|
55
|
+
@Input('parameterSettings.minDateTime') parameterSettings_minDateTime_input: any;
|
|
56
|
+
@Input('parameterSettings.maxDateTime') parameterSettings_maxDateTime_input: any;
|
|
57
|
+
@Input('parameterSettings.hideParameterBlock') parameterSettings_hideParameterBlock_input: any;
|
|
58
|
+
@Input('parameterSettings.dateTimeFormat') parameterSettings_dateTimeFormat_input: any;
|
|
59
|
+
@Input('parameterSettings.timeDisplayFormat') parameterSettings_timeDisplayFormat_input: any;
|
|
60
|
+
@Input('parameterSettings.timeInterval') parameterSettings_timeInterval_input: any;
|
|
61
|
+
@Input('parameterSettings.accessInternalValue') parameterSettings_accessInternalValue_input: any;
|
|
62
|
+
@Input('toolbarSettings.click') toolbarSettings_click_input: any;
|
|
63
|
+
@Input('toolbarSettings.items') toolbarSettings_items_input: any;
|
|
64
|
+
@Input('toolbarSettings.showToolbar') toolbarSettings_showToolbar_input: any;
|
|
65
|
+
@Input('toolbarSettings.showTooltip') toolbarSettings_showTooltip_input: any;
|
|
66
|
+
@Input('toolbarSettings.templateId') toolbarSettings_templateId_input: any;
|
|
67
|
+
@Input('toolbarSettings.customItems') toolbarSettings_customItems_input: any;
|
|
68
|
+
@Input('toolbarSettings.customGroups') toolbarSettings_customGroups_input: any;
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@Output('drillThrough') drillThrough_output : any = new EventEmitter();
|
|
72
|
+
@Output('renderingBegin') renderingBegin_output : any = new EventEmitter();
|
|
73
|
+
@Output('renderingComplete') renderingComplete_output : any = new EventEmitter();
|
|
74
|
+
@Output('reportError') reportError_output : any = new EventEmitter();
|
|
75
|
+
@Output('reportExport') reportExport_output : any = new EventEmitter();
|
|
76
|
+
@Output('reportLoaded') reportLoaded_output : any = new EventEmitter();
|
|
77
|
+
@Output('showError') showError_output : any = new EventEmitter();
|
|
78
|
+
@Output('viewReportClick') viewReportClick_output : any = new EventEmitter();
|
|
79
|
+
@Output('ajaxBeforeLoad') ajaxBeforeLoad_output : any = new EventEmitter();
|
|
80
|
+
@Output('ajaxSuccess') ajaxSuccess_output : any = new EventEmitter();
|
|
81
|
+
@Output('ajaxError') ajaxError_output : any = new EventEmitter();
|
|
82
|
+
@Output('toolbarRendering') toolbarRendering_output : any = new EventEmitter();
|
|
83
|
+
@Output('exportProgressChanged') exportProgressChanged_output : any = new EventEmitter();
|
|
84
|
+
@Output('printProgressChanged') printProgressChanged_output : any = new EventEmitter();
|
|
85
|
+
@Output('exportItemClick') exportItemClick_output : any = new EventEmitter();
|
|
86
|
+
@Output('toolBarItemClick') toolBarItemClick_output : any = new EventEmitter();
|
|
87
|
+
@Output('hyperlink') hyperlink_output : any = new EventEmitter();
|
|
88
|
+
@Output('reportPrint') reportPrint_output : any = new EventEmitter();
|
|
89
|
+
@Output('beforeParameterAdd') beforeParameterAdd_output : any = new EventEmitter();
|
|
90
|
+
|
|
91
|
+
// tslint:disable-next-line:max-line-length
|
|
92
|
+
constructor(public el: ElementRef, public cdRef: ChangeDetectorRef, private _ejIterableDiffers: IterableDiffers, private _ejkeyvaluediffers: KeyValueDiffers) {
|
|
93
|
+
super('BoldReportViewer', el, cdRef, [], _ejIterableDiffers, _ejkeyvaluediffers);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { BoldReportViewerComponent } from './reportviewer.component';
|
|
4
|
+
|
|
5
|
+
@NgModule({
|
|
6
|
+
imports: [
|
|
7
|
+
CommonModule
|
|
8
|
+
],
|
|
9
|
+
declarations: [
|
|
10
|
+
BoldReportViewerComponent
|
|
11
|
+
],
|
|
12
|
+
exports: [
|
|
13
|
+
BoldReportViewerComponent
|
|
14
|
+
]
|
|
15
|
+
})
|
|
16
|
+
export class BoldReportViewerModule {
|
|
17
|
+
}
|