@boldreports/angular-reporting-components 3.3.30 → 3.3.33

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.
@@ -10,6 +10,7 @@ var __extends = (this && this.__extends) || (function () {
10
10
  })();
11
11
  import { ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, IterableDiffers, KeyValueDiffers, NgModule, Output } from '@angular/core';
12
12
  import { CommonModule } from '@angular/common';
13
+ var currentTemplateElement;
13
14
  var firstVal = {};
14
15
  /**
15
16
  * Internal Helpers
@@ -300,6 +301,169 @@ var BoldReportComponents = /** @class */ (function () {
300
301
  };
301
302
  return BoldReportComponents;
302
303
  }());
304
+ var ComplexTagElement = /** @class */ (function () {
305
+ /**
306
+ * @param {?} tags
307
+ */
308
+ function ComplexTagElement(tags) {
309
+ this.tags = tags;
310
+ this.valueChange = new EventEmitter();
311
+ this.complexes = [];
312
+ this.hasChanges = false;
313
+ this.firstChange = true;
314
+ Object.defineProperty(this, 'parent', {
315
+ enumerable: false,
316
+ writable: true,
317
+ value: null
318
+ });
319
+ currentTemplateElement = this;
320
+ }
321
+ /**
322
+ * @return {?}
323
+ */
324
+ ComplexTagElement.prototype.ngOnInit = function () {
325
+ this.firstChange = false;
326
+ for (var /** @type {?} */ key in this) {
327
+ if (key.indexOf('_') != -1 && key.indexOf('tag_') == -1)
328
+ this.complexes.push(key);
329
+ }
330
+ for (var /** @type {?} */ i = 0; i < this.complexes.length; i++) {
331
+ var /** @type {?} */ property = this.complexes[i];
332
+ if (property.indexOf('_') != -1) {
333
+ var /** @type {?} */ tempObj = {};
334
+ var /** @type {?} */ key = property.replace(/\_/g, '.');
335
+ ej.createObject(key, ( /** @type {?} */(this))[property], tempObj);
336
+ var /** @type {?} */ rootProp = key.split('.')[0];
337
+ if (( /** @type {?} */(this))[rootProp] == undefined)
338
+ ( /** @type {?} */(this))[rootProp] = {};
339
+ $.extend(true, ( /** @type {?} */(this))[rootProp], tempObj[rootProp]);
340
+ }
341
+ }
342
+ };
343
+ /**
344
+ * @return {?}
345
+ */
346
+ ComplexTagElement.prototype.ensureCleanObject = function () {
347
+ var /** @type {?} */ tags = this.tags;
348
+ for (var /** @type {?} */ i = 0; i < tags.length; i++) {
349
+ var /** @type {?} */ element = tags[i], /** @type {?} */ tagElement = ( /** @type {?} */(this))['tag_' + element.replace(/\./g, '_')];
350
+ if (i === 0 && ( /** @type {?} */(this))[element]) {
351
+ return;
352
+ }
353
+ if (ej.isNullOrUndefined(tagElement)) {
354
+ continue;
355
+ }
356
+ ej.createObject(element, tagElement.getList(), this);
357
+ }
358
+ };
359
+ /**
360
+ * @param {?} changes
361
+ * @return {?}
362
+ */
363
+ ComplexTagElement.prototype.ngOnChanges = function (changes) {
364
+ if (this.firstChange) {
365
+ return;
366
+ }
367
+ this.recentChanges = changes;
368
+ this.hasChanges = true;
369
+ };
370
+ /**
371
+ * @return {?}
372
+ */
373
+ ComplexTagElement.prototype.getChangesAndReset = function () {
374
+ if (this.hasChanges === false) {
375
+ return;
376
+ }
377
+ var /** @type {?} */ changes = this.recentChanges || {};
378
+ var /** @type {?} */ contentChanges = Utils.IterateAndGetChanges(this);
379
+ if (!$.isEmptyObject(contentChanges)) {
380
+ for (var /** @type {?} */ key in contentChanges) {
381
+ if (contentChanges.hasOwnProperty(key)) {
382
+ var /** @type {?} */ element = contentChanges[key];
383
+ // this.el.nativeElement.
384
+ if (!ej.isNullOrUndefined(this.parent.widget['_' + this.property.replace(/\./g, '_') + '_' + key]))
385
+ this.parent.widget['_' + this.property.replace(/\./g, '_') + '_' + key](element);
386
+ }
387
+ }
388
+ }
389
+ this.hasChanges = false;
390
+ return changes;
391
+ };
392
+ /**
393
+ * @return {?}
394
+ */
395
+ ComplexTagElement.prototype.ngAfterContentChecked = function () {
396
+ var /** @type {?} */ tags = this.tags;
397
+ for (var /** @type {?} */ i = 0, /** @type {?} */ len = tags.length; i < len; i++) {
398
+ var /** @type {?} */ element = tags[i], /** @type {?} */ tagElement = ( /** @type {?} */(this))['tag_' + element.replace(/\./g, '_')];
399
+ if (tagElement && tagElement.hasChanges) {
400
+ this.hasChanges = true;
401
+ }
402
+ }
403
+ };
404
+ return ComplexTagElement;
405
+ }());
406
+ var ArrayTagElement = /** @class */ (function () {
407
+ /**
408
+ * @param {?} propertyName
409
+ */
410
+ function ArrayTagElement(propertyName) {
411
+ this.propertyName = propertyName;
412
+ this.hasChanges = false;
413
+ }
414
+ /**
415
+ * @return {?}
416
+ */
417
+ ArrayTagElement.prototype.ngAfterContentInit = function () {
418
+ var _this = this;
419
+ var /** @type {?} */ index = 0;
420
+ this.list = this.children.map(function (child) {
421
+ child.index = index++;
422
+ child.property = _this.propertyName;
423
+ return child;
424
+ });
425
+ };
426
+ /**
427
+ * @return {?}
428
+ */
429
+ ArrayTagElement.prototype.getList = function () {
430
+ var /** @type {?} */ list = this.list;
431
+ for (var /** @type {?} */ i = 0; i < list.length; i++) {
432
+ list[i].ensureCleanObject();
433
+ }
434
+ return list;
435
+ };
436
+ /**
437
+ * @return {?}
438
+ */
439
+ ArrayTagElement.prototype.getChangesAndReset = function () {
440
+ this.hasChanges = false;
441
+ return this.recentChanges;
442
+ };
443
+ /**
444
+ * @return {?}
445
+ */
446
+ ArrayTagElement.prototype.ngAfterContentChecked = function () {
447
+ var /** @type {?} */ changes = {}, /** @type {?} */ res = ( /** @type {?} */(changes))[this.propertyName] = [], /** @type {?} */ childChange;
448
+ for (var /** @type {?} */ i = 0, /** @type {?} */ list = this.list; i < list.length; i++) {
449
+ var /** @type {?} */ child = list[i];
450
+ if (child.hasChanges) {
451
+ childChange = child.getChangesAndReset();
452
+ if (!ej.isNullOrUndefined(childChange)) {
453
+ res.push(/** @type {?} */ ({
454
+ index: child.index,
455
+ change: childChange
456
+ }));
457
+ }
458
+ }
459
+ }
460
+ if (res.length > 0) {
461
+ this.recentChanges = res;
462
+ this.hasChanges = true;
463
+ }
464
+ };
465
+ return ArrayTagElement;
466
+ }());
303
467
  // tslint:disable-next-line:max-line-length
304
468
  var BoldReportViewerComponent = /** @class */ (function (_super) {
305
469
  __extends(BoldReportViewerComponent, _super);
@@ -636,5 +800,6 @@ BoldReportsModule.ctorParameters = function () { return []; };
636
800
  /**
637
801
  * Generated bundle index. Do not edit.
638
802
  */
639
- export { BoldReportViewerModule, BoldReportDesignerModule, BoldReportsModule, BoldReportComponents as ɵb, BoldReportDesignerComponent as ɵc, BoldReportViewerComponent as ɵa };
803
+ export { BoldReportViewerModule, BoldReportDesignerModule, BoldReportsModule, currentTemplateElement, Utils, BoldReportComponents, ComplexTagElement, ArrayTagElement, BoldReportDesignerComponent as ɵb, BoldReportViewerComponent as ɵa };
804
+ export { ContentChild, Type, forwardRef } from '@angular/core';
640
805
  //# sourceMappingURL=angular-reporting-components.es5.js.map