@memberjunction/ng-deep-diff 4.0.0 → 4.1.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.
Files changed (2) hide show
  1. package/README.md +52 -13
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,32 @@
1
1
  # @memberjunction/ng-deep-diff
2
2
 
3
- Angular component for visualizing deep object differences using the non-visual functionality from the @memberjunction/global package.
3
+ Angular component for visualizing deep object differences using the non-visual `DeepDiffer` functionality from `@memberjunction/global`. Provides both an inline comparison view and a dialog wrapper.
4
+
5
+ ## Overview
6
+
7
+ The `@memberjunction/ng-deep-diff` package renders a hierarchical diff of two JavaScript objects, highlighting additions, removals, and modifications. It supports expandable tree navigation, change type filtering, text search, copy-to-clipboard, and JSON export. A dialog variant wraps the inline component for modal use.
8
+
9
+ ```mermaid
10
+ graph TD
11
+ A[DeepDiffModule] --> B[DeepDiffComponent]
12
+ A --> C[DeepDiffDialogComponent]
13
+
14
+ B --> D["Diff Computation
15
+ (DeepDiffer from @memberjunction/global)"]
16
+ B --> E["Tree Display"]
17
+ B --> F["Filter & Search"]
18
+ B --> G["Export & Copy"]
19
+
20
+ E --> E1["Added (green)"]
21
+ E --> E2["Removed (red)"]
22
+ E --> E3["Modified (blue)"]
23
+ E --> E4["Unchanged (gray)"]
24
+
25
+ style A fill:#2d6a9f,stroke:#1a4971,color:#fff
26
+ style B fill:#7c5295,stroke:#563a6b,color:#fff
27
+ style C fill:#2d8659,stroke:#1a5c3a,color:#fff
28
+ style D fill:#b8762f,stroke:#8a5722,color:#fff
29
+ ```
4
30
 
5
31
  ## Installation
6
32
 
@@ -55,8 +81,8 @@ export class YourModule { }
55
81
 
56
82
  | Property | Type | Default | Description |
57
83
  |----------|------|---------|-------------|
58
- | `oldValue` | `any` | - | The original value to compare |
59
- | `newValue` | `any` | - | The new value to compare against |
84
+ | `oldValue` | `Record<string, unknown>` | - | The original value to compare |
85
+ | `newValue` | `Record<string, unknown>` | - | The new value to compare against |
60
86
  | `title` | `string` | `'Deep Diff Analysis'` | Title displayed in the header |
61
87
  | `showSummary` | `boolean` | `true` | Whether to show summary statistics |
62
88
  | `showUnchanged` | `boolean` | `false` | Whether to show unchanged properties |
@@ -119,7 +145,6 @@ export class MyComponent {
119
145
 
120
146
  ```typescript
121
147
  export class ApiComponent {
122
- // API responses often use null and undefined interchangeably
123
148
  apiResponse1 = {
124
149
  id: 123,
125
150
  name: null,
@@ -150,7 +175,7 @@ export class ApiComponent {
150
175
  ```typescript
151
176
  export class ConfigComponent {
152
177
  showComparison = false;
153
-
178
+
154
179
  compareVersions() {
155
180
  this.showComparison = true;
156
181
  }
@@ -176,17 +201,31 @@ export class ConfigComponent {
176
201
 
177
202
  The component uses CSS classes that can be customized:
178
203
 
179
- - `.diff-added` - Added items (green)
180
- - `.diff-removed` - Removed items (red)
181
- - `.diff-modified` - Modified items (blue)
182
- - `.diff-unchanged` - Unchanged items (gray)
204
+ - `.diff-added` -- Added items (green)
205
+ - `.diff-removed` -- Removed items (red)
206
+ - `.diff-modified` -- Modified items (blue)
207
+ - `.diff-unchanged` -- Unchanged items (gray)
183
208
 
184
209
  ## Dependencies
185
210
 
186
- - `@memberjunction/global` - Provides the core DeepDiffer functionality
187
- - `@angular/common`
188
- - `@angular/core`
211
+ | Package | Description |
212
+ |---------|-------------|
213
+ | `@memberjunction/global` | Provides the core `DeepDiffer` functionality |
214
+ | `@angular/common` | Angular common module |
215
+ | `@angular/core` | Angular core framework |
216
+
217
+ ### Peer Dependencies
218
+
219
+ - `@angular/common` ^21.x
220
+ - `@angular/core` ^21.x
221
+
222
+ ## Build
223
+
224
+ ```bash
225
+ cd packages/Angular/Generic/deep-diff
226
+ npm run build
227
+ ```
189
228
 
190
229
  ## License
191
230
 
192
- See the main MemberJunction repository for license information.
231
+ ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-deep-diff",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "MemberJunction: Generic Angular component to display the differences between two objects, using the non-visual functionality from the @memberjunction/global package",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@angular/forms": "21.1.3",
27
- "@memberjunction/core": "4.0.0",
28
- "@memberjunction/global": "4.0.0",
27
+ "@memberjunction/core": "4.1.0",
28
+ "@memberjunction/global": "4.1.0",
29
29
  "tslib": "^2.8.1"
30
30
  },
31
31
  "sideEffects": false,