@memberjunction/ng-deep-diff 6.2.0-edge.0 → 6.2.0-edge.1
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/lib/deep-diff-dialog.component.d.ts +90 -14
- package/dist/lib/deep-diff-dialog.component.d.ts.map +1 -1
- package/dist/lib/deep-diff-dialog.component.js +187 -23
- package/dist/lib/deep-diff-dialog.component.js.map +1 -1
- package/dist/lib/deep-diff.component.d.ts +84 -8
- package/dist/lib/deep-diff.component.d.ts.map +1 -1
- package/dist/lib/deep-diff.component.js +225 -67
- package/dist/lib/deep-diff.component.js.map +1 -1
- package/package.json +5 -5
|
@@ -313,60 +313,148 @@ export class DeepDiffComponent {
|
|
|
313
313
|
this._newValue = value;
|
|
314
314
|
this.generateDiff();
|
|
315
315
|
}
|
|
316
|
-
get
|
|
316
|
+
get ShowUnchanged() {
|
|
317
317
|
return this._showUnchanged;
|
|
318
318
|
}
|
|
319
|
-
set
|
|
319
|
+
set ShowUnchanged(value) {
|
|
320
320
|
this._showUnchanged = value;
|
|
321
321
|
this.updateDifferConfig();
|
|
322
322
|
this.generateDiff();
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
/** @deprecated Use {@link ShowUnchanged}. */
|
|
325
|
+
get showUnchanged() {
|
|
326
|
+
return this.ShowUnchanged;
|
|
327
|
+
}
|
|
328
|
+
/** @deprecated Use {@link ShowUnchanged}. */
|
|
329
|
+
set showUnchanged(value) {
|
|
330
|
+
this.ShowUnchanged = value;
|
|
331
|
+
}
|
|
332
|
+
get MaxDepth() {
|
|
325
333
|
return this._maxDepth;
|
|
326
334
|
}
|
|
327
|
-
set
|
|
335
|
+
set MaxDepth(value) {
|
|
328
336
|
this._maxDepth = value;
|
|
329
337
|
this.updateDifferConfig();
|
|
330
338
|
this.generateDiff();
|
|
331
339
|
}
|
|
332
|
-
|
|
340
|
+
/** @deprecated Use {@link MaxDepth}. */
|
|
341
|
+
get maxDepth() {
|
|
342
|
+
return this.MaxDepth;
|
|
343
|
+
}
|
|
344
|
+
/** @deprecated Use {@link MaxDepth}. */
|
|
345
|
+
set maxDepth(value) {
|
|
346
|
+
this.MaxDepth = value;
|
|
347
|
+
}
|
|
348
|
+
get MaxStringLength() {
|
|
333
349
|
return this._maxStringLength;
|
|
334
350
|
}
|
|
335
|
-
set
|
|
351
|
+
set MaxStringLength(value) {
|
|
336
352
|
this._maxStringLength = value;
|
|
337
353
|
this.updateDifferConfig();
|
|
338
354
|
this.generateDiff();
|
|
339
355
|
}
|
|
340
|
-
|
|
356
|
+
/** @deprecated Use {@link MaxStringLength}. */
|
|
357
|
+
get maxStringLength() {
|
|
358
|
+
return this.MaxStringLength;
|
|
359
|
+
}
|
|
360
|
+
/** @deprecated Use {@link MaxStringLength}. */
|
|
361
|
+
set maxStringLength(value) {
|
|
362
|
+
this.MaxStringLength = value;
|
|
363
|
+
}
|
|
364
|
+
get TreatNullAsUndefined() {
|
|
341
365
|
return this._treatNullAsUndefined;
|
|
342
366
|
}
|
|
343
|
-
set
|
|
367
|
+
set TreatNullAsUndefined(value) {
|
|
344
368
|
this._treatNullAsUndefined = value;
|
|
345
369
|
this.updateDifferConfig();
|
|
346
370
|
this.generateDiff();
|
|
347
371
|
}
|
|
372
|
+
/** @deprecated Use {@link TreatNullAsUndefined}. */
|
|
373
|
+
get treatNullAsUndefined() {
|
|
374
|
+
return this.TreatNullAsUndefined;
|
|
375
|
+
}
|
|
376
|
+
/** @deprecated Use {@link TreatNullAsUndefined}. */
|
|
377
|
+
set treatNullAsUndefined(value) {
|
|
378
|
+
this.TreatNullAsUndefined = value;
|
|
379
|
+
}
|
|
348
380
|
title = 'Deep Diff Analysis';
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
381
|
+
ShowSummary = true;
|
|
382
|
+
/** @deprecated Use {@link ShowSummary}. */
|
|
383
|
+
set showSummary(value) {
|
|
384
|
+
this.ShowSummary = value;
|
|
385
|
+
}
|
|
386
|
+
/** @deprecated Use {@link ShowSummary}. */
|
|
387
|
+
get showSummary() {
|
|
388
|
+
return this.ShowSummary;
|
|
389
|
+
}
|
|
390
|
+
ExpandAll = false;
|
|
391
|
+
/** @deprecated Use {@link ExpandAll}. */
|
|
392
|
+
set expandAll(value) {
|
|
393
|
+
this.ExpandAll = value;
|
|
394
|
+
}
|
|
395
|
+
/** @deprecated Use {@link ExpandAll}. */
|
|
396
|
+
get expandAll() {
|
|
397
|
+
return this.ExpandAll;
|
|
398
|
+
}
|
|
399
|
+
TruncateValues = true;
|
|
400
|
+
/** @deprecated Use {@link TruncateValues}. */
|
|
401
|
+
set truncateValues(value) {
|
|
402
|
+
this.TruncateValues = value;
|
|
403
|
+
}
|
|
404
|
+
/** @deprecated Use {@link TruncateValues}. */
|
|
405
|
+
get truncateValues() {
|
|
406
|
+
return this.TruncateValues;
|
|
407
|
+
}
|
|
408
|
+
DiffResult = null;
|
|
409
|
+
/** @deprecated Use {@link DiffResult}. */
|
|
410
|
+
get diffResult() {
|
|
411
|
+
return this.DiffResult;
|
|
412
|
+
}
|
|
413
|
+
/** @deprecated Use {@link DiffResult}. */
|
|
414
|
+
set diffResult(value) {
|
|
415
|
+
this.DiffResult = value;
|
|
416
|
+
}
|
|
417
|
+
DiffItems = [];
|
|
418
|
+
/** @deprecated Use {@link DiffItems}. */
|
|
419
|
+
get diffItems() {
|
|
420
|
+
return this.DiffItems;
|
|
421
|
+
}
|
|
422
|
+
/** @deprecated Use {@link DiffItems}. */
|
|
423
|
+
set diffItems(value) {
|
|
424
|
+
this.DiffItems = value;
|
|
425
|
+
}
|
|
354
426
|
_filter = '';
|
|
355
|
-
get
|
|
427
|
+
get Filter() {
|
|
356
428
|
return this._filter;
|
|
357
429
|
}
|
|
358
|
-
set
|
|
430
|
+
set Filter(value) {
|
|
359
431
|
this._filter = value;
|
|
360
432
|
this.recomputeFilteredItems();
|
|
361
433
|
}
|
|
434
|
+
/** @deprecated Use {@link Filter}. */
|
|
435
|
+
get filter() {
|
|
436
|
+
return this.Filter;
|
|
437
|
+
}
|
|
438
|
+
/** @deprecated Use {@link Filter}. */
|
|
439
|
+
set filter(value) {
|
|
440
|
+
this.Filter = value;
|
|
441
|
+
}
|
|
362
442
|
_filterType = 'all';
|
|
363
|
-
get
|
|
443
|
+
get FilterType() {
|
|
364
444
|
return this._filterType;
|
|
365
445
|
}
|
|
366
|
-
set
|
|
446
|
+
set FilterType(value) {
|
|
367
447
|
this._filterType = value;
|
|
368
448
|
this.recomputeFilteredItems();
|
|
369
449
|
}
|
|
450
|
+
/** @deprecated Use {@link FilterType}. */
|
|
451
|
+
get filterType() {
|
|
452
|
+
return this.FilterType;
|
|
453
|
+
}
|
|
454
|
+
/** @deprecated Use {@link FilterType}. */
|
|
455
|
+
set filterType(value) {
|
|
456
|
+
this.FilterType = value;
|
|
457
|
+
}
|
|
370
458
|
/**
|
|
371
459
|
* Precomputed filtered diff tree. Recomputed only when the source data
|
|
372
460
|
* (`diffItems`) or the filter inputs (`filter` / `filterType`) change —
|
|
@@ -374,8 +462,24 @@ export class DeepDiffComponent {
|
|
|
374
462
|
* `@for` and empty-state length check, which preserves `@for` referential
|
|
375
463
|
* stability between CD passes (the recursive walk no longer runs >= 2x/CD).
|
|
376
464
|
*/
|
|
377
|
-
|
|
378
|
-
|
|
465
|
+
FilteredItems = [];
|
|
466
|
+
/** @deprecated Use {@link FilteredItems}. */
|
|
467
|
+
get filteredItems() {
|
|
468
|
+
return this.FilteredItems;
|
|
469
|
+
}
|
|
470
|
+
/** @deprecated Use {@link FilteredItems}. */
|
|
471
|
+
set filteredItems(value) {
|
|
472
|
+
this.FilteredItems = value;
|
|
473
|
+
}
|
|
474
|
+
ExpandedValuesMap = {};
|
|
475
|
+
/** @deprecated Use {@link ExpandedValuesMap}. */
|
|
476
|
+
get expandedValuesMap() {
|
|
477
|
+
return this.ExpandedValuesMap;
|
|
478
|
+
}
|
|
479
|
+
/** @deprecated Use {@link ExpandedValuesMap}. */
|
|
480
|
+
set expandedValuesMap(value) {
|
|
481
|
+
this.ExpandedValuesMap = value;
|
|
482
|
+
}
|
|
379
483
|
/**
|
|
380
484
|
* Memoization cache for {@link formatValue} / {@link isValueTruncated}. Keyed
|
|
381
485
|
* by `${path}|${expanded}` so the expensive `JSON.stringify` of object values
|
|
@@ -390,9 +494,9 @@ export class DeepDiffComponent {
|
|
|
390
494
|
this.cdr = cdr;
|
|
391
495
|
this.differ = new DeepDiffer({
|
|
392
496
|
includeUnchanged: false,
|
|
393
|
-
maxDepth: this.
|
|
394
|
-
maxStringLength: this.
|
|
395
|
-
treatNullAsUndefined: this.
|
|
497
|
+
maxDepth: this.MaxDepth,
|
|
498
|
+
maxStringLength: this.MaxStringLength,
|
|
499
|
+
treatNullAsUndefined: this.TreatNullAsUndefined
|
|
396
500
|
});
|
|
397
501
|
}
|
|
398
502
|
ngOnInit() {
|
|
@@ -400,27 +504,27 @@ export class DeepDiffComponent {
|
|
|
400
504
|
}
|
|
401
505
|
updateDifferConfig() {
|
|
402
506
|
this.differ.updateConfig({
|
|
403
|
-
includeUnchanged: this.
|
|
404
|
-
maxDepth: this.
|
|
405
|
-
maxStringLength: this.
|
|
406
|
-
treatNullAsUndefined: this.
|
|
507
|
+
includeUnchanged: this.ShowUnchanged,
|
|
508
|
+
maxDepth: this.MaxDepth,
|
|
509
|
+
maxStringLength: this.MaxStringLength,
|
|
510
|
+
treatNullAsUndefined: this.TreatNullAsUndefined
|
|
407
511
|
});
|
|
408
512
|
}
|
|
409
513
|
generateDiff() {
|
|
410
514
|
if (this.oldValue === undefined && this.newValue === undefined) {
|
|
411
515
|
this.formatValueCache.clear();
|
|
412
516
|
this.truncatedCache.clear();
|
|
413
|
-
this.
|
|
414
|
-
this.
|
|
517
|
+
this.DiffResult = null;
|
|
518
|
+
this.DiffItems = [];
|
|
415
519
|
this.recomputeFilteredItems();
|
|
416
520
|
return;
|
|
417
521
|
}
|
|
418
522
|
this.formatValueCache.clear();
|
|
419
523
|
this.truncatedCache.clear();
|
|
420
|
-
this.
|
|
421
|
-
this.
|
|
422
|
-
if (this.
|
|
423
|
-
this.
|
|
524
|
+
this.DiffResult = this.differ.diff(this.oldValue, this.newValue);
|
|
525
|
+
this.DiffItems = this.buildHierarchicalItems(this.DiffResult.changes);
|
|
526
|
+
if (this.ExpandAll) {
|
|
527
|
+
this.ExpandAllItems();
|
|
424
528
|
}
|
|
425
529
|
this.recomputeFilteredItems();
|
|
426
530
|
}
|
|
@@ -456,11 +560,15 @@ export class DeepDiffComponent {
|
|
|
456
560
|
}
|
|
457
561
|
return rootItems;
|
|
458
562
|
}
|
|
459
|
-
|
|
563
|
+
ToggleItem(item) {
|
|
460
564
|
item.isExpanded = !item.isExpanded;
|
|
461
565
|
this.cdr.markForCheck();
|
|
462
566
|
}
|
|
463
|
-
|
|
567
|
+
/** @deprecated Use {@link ToggleItem}. */
|
|
568
|
+
toggleItem(item) {
|
|
569
|
+
return this.ToggleItem(item);
|
|
570
|
+
}
|
|
571
|
+
ExpandAllItems() {
|
|
464
572
|
const expand = (items) => {
|
|
465
573
|
for (const item of items) {
|
|
466
574
|
item.isExpanded = true;
|
|
@@ -469,10 +577,14 @@ export class DeepDiffComponent {
|
|
|
469
577
|
}
|
|
470
578
|
}
|
|
471
579
|
};
|
|
472
|
-
expand(this.
|
|
580
|
+
expand(this.DiffItems);
|
|
473
581
|
this.cdr.markForCheck();
|
|
474
582
|
}
|
|
475
|
-
|
|
583
|
+
/** @deprecated Use {@link ExpandAllItems}. */
|
|
584
|
+
expandAllItems() {
|
|
585
|
+
return this.ExpandAllItems();
|
|
586
|
+
}
|
|
587
|
+
CollapseAllItems() {
|
|
476
588
|
const collapse = (items) => {
|
|
477
589
|
for (const item of items) {
|
|
478
590
|
item.isExpanded = false;
|
|
@@ -481,29 +593,33 @@ export class DeepDiffComponent {
|
|
|
481
593
|
}
|
|
482
594
|
}
|
|
483
595
|
};
|
|
484
|
-
collapse(this.
|
|
596
|
+
collapse(this.DiffItems);
|
|
485
597
|
this.cdr.markForCheck();
|
|
486
598
|
}
|
|
599
|
+
/** @deprecated Use {@link CollapseAllItems}. */
|
|
600
|
+
collapseAllItems() {
|
|
601
|
+
return this.CollapseAllItems();
|
|
602
|
+
}
|
|
487
603
|
/**
|
|
488
604
|
* Recomputes {@link filteredItems} from the current `diffItems` + filter
|
|
489
605
|
* inputs. Called from `generateDiff()` (data change) and from the
|
|
490
606
|
* `filter` / `filterType` setters (filter change) — NOT per CD cycle.
|
|
491
607
|
*/
|
|
492
608
|
recomputeFilteredItems() {
|
|
493
|
-
if (!this.
|
|
494
|
-
this.
|
|
609
|
+
if (!this.Filter && this.FilterType === 'all') {
|
|
610
|
+
this.FilteredItems = this.DiffItems;
|
|
495
611
|
this.cdr.markForCheck();
|
|
496
612
|
return;
|
|
497
613
|
}
|
|
498
614
|
const filterFn = (item) => {
|
|
499
|
-
const matchesType = this.
|
|
500
|
-
(this.
|
|
501
|
-
(this.
|
|
502
|
-
(this.
|
|
503
|
-
(this.
|
|
504
|
-
const matchesText = !this.
|
|
505
|
-
item.path.toLowerCase().includes(this.
|
|
506
|
-
item.description.toLowerCase().includes(this.
|
|
615
|
+
const matchesType = this.FilterType === 'all' ||
|
|
616
|
+
(this.FilterType === 'added' && item.type === DiffChangeType.Added) ||
|
|
617
|
+
(this.FilterType === 'removed' && item.type === DiffChangeType.Removed) ||
|
|
618
|
+
(this.FilterType === 'modified' && item.type === DiffChangeType.Modified) ||
|
|
619
|
+
(this.FilterType === 'unchanged' && item.type === DiffChangeType.Unchanged);
|
|
620
|
+
const matchesText = !this.Filter ||
|
|
621
|
+
item.path.toLowerCase().includes(this.Filter.toLowerCase()) ||
|
|
622
|
+
item.description.toLowerCase().includes(this.Filter.toLowerCase());
|
|
507
623
|
return matchesType && matchesText;
|
|
508
624
|
};
|
|
509
625
|
const filterRecursive = (items) => {
|
|
@@ -519,7 +635,7 @@ export class DeepDiffComponent {
|
|
|
519
635
|
return acc;
|
|
520
636
|
}, []);
|
|
521
637
|
};
|
|
522
|
-
this.
|
|
638
|
+
this.FilteredItems = filterRecursive(this.DiffItems);
|
|
523
639
|
this.cdr.markForCheck();
|
|
524
640
|
}
|
|
525
641
|
getIcon(type) {
|
|
@@ -531,7 +647,7 @@ export class DeepDiffComponent {
|
|
|
531
647
|
default: return 'fa-question-circle';
|
|
532
648
|
}
|
|
533
649
|
}
|
|
534
|
-
|
|
650
|
+
GetTypeClass(type) {
|
|
535
651
|
switch (type) {
|
|
536
652
|
case DiffChangeType.Added: return 'added';
|
|
537
653
|
case DiffChangeType.Removed: return 'removed';
|
|
@@ -540,12 +656,16 @@ export class DeepDiffComponent {
|
|
|
540
656
|
default: return '';
|
|
541
657
|
}
|
|
542
658
|
}
|
|
659
|
+
/** @deprecated Use {@link GetTypeClass}. */
|
|
660
|
+
getTypeClass(type) {
|
|
661
|
+
return this.GetTypeClass(type);
|
|
662
|
+
}
|
|
543
663
|
formatValue(value, path) {
|
|
544
664
|
if (value === undefined)
|
|
545
665
|
return 'undefined';
|
|
546
666
|
if (value === null)
|
|
547
667
|
return 'null';
|
|
548
|
-
const isExpanded = !!this.
|
|
668
|
+
const isExpanded = !!this.ExpandedValuesMap[path];
|
|
549
669
|
const cacheKey = `${path}|${isExpanded ? 1 : 0}`;
|
|
550
670
|
const cached = this.formatValueCache.get(cacheKey);
|
|
551
671
|
if (cached !== undefined)
|
|
@@ -555,10 +675,10 @@ export class DeepDiffComponent {
|
|
|
555
675
|
return formatted;
|
|
556
676
|
}
|
|
557
677
|
computeFormattedValue(value, isExpanded) {
|
|
558
|
-
const shouldTruncate = this.
|
|
678
|
+
const shouldTruncate = this.TruncateValues && !isExpanded;
|
|
559
679
|
if (typeof value === 'string') {
|
|
560
|
-
if (shouldTruncate && value.length > this.
|
|
561
|
-
return `"${value.substring(0, this.
|
|
680
|
+
if (shouldTruncate && value.length > this.MaxStringLength) {
|
|
681
|
+
return `"${value.substring(0, this.MaxStringLength)}..."`;
|
|
562
682
|
}
|
|
563
683
|
return `"${value}"`;
|
|
564
684
|
}
|
|
@@ -578,8 +698,8 @@ export class DeepDiffComponent {
|
|
|
578
698
|
}
|
|
579
699
|
return String(value);
|
|
580
700
|
}
|
|
581
|
-
|
|
582
|
-
if (!this.
|
|
701
|
+
IsValueTruncated(value, path) {
|
|
702
|
+
if (!this.TruncateValues || this.ExpandedValuesMap[path]) {
|
|
583
703
|
return false;
|
|
584
704
|
}
|
|
585
705
|
const cacheKey = `${path}|0`;
|
|
@@ -590,9 +710,13 @@ export class DeepDiffComponent {
|
|
|
590
710
|
this.truncatedCache.set(cacheKey, result);
|
|
591
711
|
return result;
|
|
592
712
|
}
|
|
713
|
+
/** @deprecated Use {@link IsValueTruncated}. */
|
|
714
|
+
isValueTruncated(value, path) {
|
|
715
|
+
return this.IsValueTruncated(value, path);
|
|
716
|
+
}
|
|
593
717
|
computeValueTruncated(value) {
|
|
594
718
|
if (typeof value === 'string') {
|
|
595
|
-
return value.length > this.
|
|
719
|
+
return value.length > this.MaxStringLength;
|
|
596
720
|
}
|
|
597
721
|
if (typeof value === 'object' && value !== null) {
|
|
598
722
|
try {
|
|
@@ -605,31 +729,43 @@ export class DeepDiffComponent {
|
|
|
605
729
|
}
|
|
606
730
|
return false;
|
|
607
731
|
}
|
|
608
|
-
|
|
732
|
+
ToggleValueExpansion(path, event) {
|
|
609
733
|
event.stopPropagation();
|
|
610
734
|
// Create a new object to trigger change detection
|
|
611
|
-
this.
|
|
612
|
-
...this.
|
|
613
|
-
[path]: !this.
|
|
735
|
+
this.ExpandedValuesMap = {
|
|
736
|
+
...this.ExpandedValuesMap,
|
|
737
|
+
[path]: !this.ExpandedValuesMap[path]
|
|
614
738
|
};
|
|
615
739
|
// Force change detection
|
|
616
740
|
this.cdr.markForCheck();
|
|
617
741
|
}
|
|
742
|
+
/** @deprecated Use {@link ToggleValueExpansion}. */
|
|
743
|
+
toggleValueExpansion(path, event) {
|
|
744
|
+
return this.ToggleValueExpansion(path, event);
|
|
745
|
+
}
|
|
618
746
|
getObjectSize(obj) {
|
|
619
747
|
if (Array.isArray(obj)) {
|
|
620
748
|
return obj.length;
|
|
621
749
|
}
|
|
622
750
|
return Object.keys(obj).length;
|
|
623
751
|
}
|
|
624
|
-
|
|
752
|
+
CopyToClipboard(text) {
|
|
625
753
|
navigator.clipboard.writeText(text).then(() => {
|
|
626
754
|
// Could add a toast notification here
|
|
627
755
|
});
|
|
628
756
|
}
|
|
757
|
+
/** @deprecated Use {@link CopyToClipboard}. */
|
|
758
|
+
copyToClipboard(text) {
|
|
759
|
+
return this.CopyToClipboard(text);
|
|
760
|
+
}
|
|
761
|
+
IsExpanded(path) {
|
|
762
|
+
return !!this.ExpandedValuesMap[path];
|
|
763
|
+
}
|
|
764
|
+
/** @deprecated Use {@link IsExpanded}. */
|
|
629
765
|
isExpanded(path) {
|
|
630
|
-
return
|
|
766
|
+
return this.IsExpanded(path);
|
|
631
767
|
}
|
|
632
|
-
|
|
768
|
+
CopyValueToClipboard(value, event) {
|
|
633
769
|
event.stopPropagation();
|
|
634
770
|
let textToCopy;
|
|
635
771
|
if (value === undefined) {
|
|
@@ -653,10 +789,14 @@ export class DeepDiffComponent {
|
|
|
653
789
|
// Could add a toast notification here
|
|
654
790
|
});
|
|
655
791
|
}
|
|
656
|
-
|
|
657
|
-
|
|
792
|
+
/** @deprecated Use {@link CopyValueToClipboard}. */
|
|
793
|
+
copyValueToClipboard(value, event) {
|
|
794
|
+
return this.CopyValueToClipboard(value, event);
|
|
795
|
+
}
|
|
796
|
+
ExportDiff() {
|
|
797
|
+
if (!this.DiffResult)
|
|
658
798
|
return;
|
|
659
|
-
const blob = new Blob([JSON.stringify(this.
|
|
799
|
+
const blob = new Blob([JSON.stringify(this.DiffResult, null, 2)], { type: 'application/json' });
|
|
660
800
|
const url = URL.createObjectURL(blob);
|
|
661
801
|
const a = document.createElement('a');
|
|
662
802
|
a.href = url;
|
|
@@ -664,8 +804,12 @@ export class DeepDiffComponent {
|
|
|
664
804
|
a.click();
|
|
665
805
|
URL.revokeObjectURL(url);
|
|
666
806
|
}
|
|
807
|
+
/** @deprecated Use {@link ExportDiff}. */
|
|
808
|
+
exportDiff() {
|
|
809
|
+
return this.ExportDiff();
|
|
810
|
+
}
|
|
667
811
|
static ɵfac = function DeepDiffComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DeepDiffComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
668
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DeepDiffComponent, selectors: [["mj-deep-diff"]], inputs: { oldValue: "oldValue", newValue: "newValue", showUnchanged: "showUnchanged", maxDepth: "maxDepth", maxStringLength: "maxStringLength", treatNullAsUndefined: "treatNullAsUndefined", title: "title", showSummary: "showSummary", expandAll: "expandAll", truncateValues: "truncateValues" }, standalone: false, decls: 36, vars: 13, consts: [["diffItem", ""], [1, "deep-diff-container"], [1, "diff-header"], [1, "header-content"], [1, "diff-title"], [1, "fa-solid", "fa-code-branch"], [1, "header-actions"], ["title", "Expand All", "aria-label", "Expand All", 1, "btn-icon", 3, "click"], [1, "fa-solid", "fa-expand"], ["title", "Collapse All", "aria-label", "Collapse All", 1, "btn-icon", 3, "click"], [1, "fa-solid", "fa-compress"], ["title", "Export Diff", "aria-label", "Export Diff", 1, "btn-icon", 3, "click", "disabled"], [1, "fa-solid", "fa-download"], [1, "diff-summary"], [1, "diff-filters"], [1, "filter-search"], [1, "fa-solid", "fa-search"], ["type", "text", "placeholder", "Filter by path or description...", 1, "filter-input", 3, "ngModelChange", "ngModel"], [1, "filter-types"], [1, "filter-btn", 3, "click"], [1, "filter-btn", "added", 3, "click"], [1, "fa-solid", "fa-plus-circle"], [1, "filter-btn", "removed", 3, "click"], [1, "fa-solid", "fa-minus-circle"], [1, "filter-btn", "modified", 3, "click"], [1, "fa-solid", "fa-edit"], [1, "diff-content"], ["Icon", "fa-solid fa-code-compare", "Title", "No data to compare", 1, "empty-state-fill"], ["Variant", "no-results", "Icon", "fa-solid fa-filter", "Title", "No changes match your filter criteria", 1, "empty-state-fill"], [1, "diff-tree"], [1, "summary-item", "added"], [1, "count"], [1, "label"], [1, "summary-item", "removed"], [1, "summary-item", "modified"], [1, "summary-item", "unchanged"], [1, "fa-solid", "fa-check-circle"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "diff-item"], [1, "item-header", 3, "click"], [1, "fa-solid", "fa-chevron-right", "expand-icon", 3, "expanded"], [1, "expand-spacer"], [1, "fa-solid", "type-icon", 3, "ngClass"], [1, "item-path"], [1, "item-description"], ["title", "Copy path", "aria-label", "Copy path", 1, "btn-copy", 3, "click"], [1, "fa-solid", "fa-copy"], [1, "value-details"], [1, "item-children"], [1, "fa-solid", "fa-chevron-right", "expand-icon"], [1, "value-row", "old"], [1, "value-label"], [1, "value-content"], ["title", "Copy value", "aria-label", "Copy value", 1, "btn-copy", 3, "click"], [1, "btn-expand-value", 3, "title"], [1, "value-row", "new"], [1, "btn-expand-value", 3, "click", "title"], [1, "fa-solid", 3, "ngClass"]], template: function DeepDiffComponent_Template(rf, ctx) { if (rf & 1) {
|
|
812
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DeepDiffComponent, selectors: [["mj-deep-diff"]], inputs: { oldValue: "oldValue", newValue: "newValue", ShowUnchanged: "ShowUnchanged", showUnchanged: "showUnchanged", MaxDepth: "MaxDepth", maxDepth: "maxDepth", MaxStringLength: "MaxStringLength", maxStringLength: "maxStringLength", TreatNullAsUndefined: "TreatNullAsUndefined", treatNullAsUndefined: "treatNullAsUndefined", title: "title", ShowSummary: "ShowSummary", showSummary: "showSummary", ExpandAll: "ExpandAll", expandAll: "expandAll", TruncateValues: "TruncateValues", truncateValues: "truncateValues" }, standalone: false, decls: 36, vars: 13, consts: [["diffItem", ""], [1, "deep-diff-container"], [1, "diff-header"], [1, "header-content"], [1, "diff-title"], [1, "fa-solid", "fa-code-branch"], [1, "header-actions"], ["title", "Expand All", "aria-label", "Expand All", 1, "btn-icon", 3, "click"], [1, "fa-solid", "fa-expand"], ["title", "Collapse All", "aria-label", "Collapse All", 1, "btn-icon", 3, "click"], [1, "fa-solid", "fa-compress"], ["title", "Export Diff", "aria-label", "Export Diff", 1, "btn-icon", 3, "click", "disabled"], [1, "fa-solid", "fa-download"], [1, "diff-summary"], [1, "diff-filters"], [1, "filter-search"], [1, "fa-solid", "fa-search"], ["type", "text", "placeholder", "Filter by path or description...", 1, "filter-input", 3, "ngModelChange", "ngModel"], [1, "filter-types"], [1, "filter-btn", 3, "click"], [1, "filter-btn", "added", 3, "click"], [1, "fa-solid", "fa-plus-circle"], [1, "filter-btn", "removed", 3, "click"], [1, "fa-solid", "fa-minus-circle"], [1, "filter-btn", "modified", 3, "click"], [1, "fa-solid", "fa-edit"], [1, "diff-content"], ["Icon", "fa-solid fa-code-compare", "Title", "No data to compare", 1, "empty-state-fill"], ["Variant", "no-results", "Icon", "fa-solid fa-filter", "Title", "No changes match your filter criteria", 1, "empty-state-fill"], [1, "diff-tree"], [1, "summary-item", "added"], [1, "count"], [1, "label"], [1, "summary-item", "removed"], [1, "summary-item", "modified"], [1, "summary-item", "unchanged"], [1, "fa-solid", "fa-check-circle"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "diff-item"], [1, "item-header", 3, "click"], [1, "fa-solid", "fa-chevron-right", "expand-icon", 3, "expanded"], [1, "expand-spacer"], [1, "fa-solid", "type-icon", 3, "ngClass"], [1, "item-path"], [1, "item-description"], ["title", "Copy path", "aria-label", "Copy path", 1, "btn-copy", 3, "click"], [1, "fa-solid", "fa-copy"], [1, "value-details"], [1, "item-children"], [1, "fa-solid", "fa-chevron-right", "expand-icon"], [1, "value-row", "old"], [1, "value-label"], [1, "value-content"], ["title", "Copy value", "aria-label", "Copy value", 1, "btn-copy", 3, "click"], [1, "btn-expand-value", 3, "title"], [1, "value-row", "new"], [1, "btn-expand-value", 3, "click", "title"], [1, "fa-solid", 3, "ngClass"]], template: function DeepDiffComponent_Template(rf, ctx) { if (rf & 1) {
|
|
669
813
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
670
814
|
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "div", 3)(3, "h2", 4);
|
|
671
815
|
i0.ɵɵelement(4, "i", 5);
|
|
@@ -741,20 +885,34 @@ export class DeepDiffComponent {
|
|
|
741
885
|
type: Input
|
|
742
886
|
}], newValue: [{
|
|
743
887
|
type: Input
|
|
888
|
+
}], ShowUnchanged: [{
|
|
889
|
+
type: Input
|
|
744
890
|
}], showUnchanged: [{
|
|
745
891
|
type: Input
|
|
892
|
+
}], MaxDepth: [{
|
|
893
|
+
type: Input
|
|
746
894
|
}], maxDepth: [{
|
|
747
895
|
type: Input
|
|
896
|
+
}], MaxStringLength: [{
|
|
897
|
+
type: Input
|
|
748
898
|
}], maxStringLength: [{
|
|
749
899
|
type: Input
|
|
900
|
+
}], TreatNullAsUndefined: [{
|
|
901
|
+
type: Input
|
|
750
902
|
}], treatNullAsUndefined: [{
|
|
751
903
|
type: Input
|
|
752
904
|
}], title: [{
|
|
753
905
|
type: Input
|
|
906
|
+
}], ShowSummary: [{
|
|
907
|
+
type: Input
|
|
754
908
|
}], showSummary: [{
|
|
755
909
|
type: Input
|
|
910
|
+
}], ExpandAll: [{
|
|
911
|
+
type: Input
|
|
756
912
|
}], expandAll: [{
|
|
757
913
|
type: Input
|
|
914
|
+
}], TruncateValues: [{
|
|
915
|
+
type: Input
|
|
758
916
|
}], truncateValues: [{
|
|
759
917
|
type: Input
|
|
760
918
|
}] }); })();
|