nxt-json-view 21.0.0-alpha.0 → 21.0.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.
- package/fesm2022/nxt-json-view.mjs +13 -13
- package/package.json +5 -5
|
@@ -25,10 +25,10 @@ class ExpanderService {
|
|
|
25
25
|
i.toggle();
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0
|
|
29
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ExpanderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
29
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ExpanderService, providedIn: 'root' }); }
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ExpanderService, decorators: [{
|
|
32
32
|
type: Injectable,
|
|
33
33
|
args: [{
|
|
34
34
|
providedIn: 'root'
|
|
@@ -146,10 +146,10 @@ class JsonViewItemComponent {
|
|
|
146
146
|
}
|
|
147
147
|
this.isOpen.set(!this.isOpen());
|
|
148
148
|
}
|
|
149
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0
|
|
150
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0
|
|
149
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: JsonViewItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
150
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: JsonViewItemComponent, isStandalone: true, selector: "nxt-json-view-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, levelOpen: { classPropertyName: "levelOpen", publicName: "levelOpen", isSignal: true, isRequired: false, transformFunction: null }, levelLabels: { classPropertyName: "levelLabels", publicName: "levelLabels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { levelOpen: "levelOpenChange" }, ngImport: i0, template: "<div class=\"json-view\">\r\n <a (click)=\"toggle()\"\r\n tabindex=\"0\"\r\n (keydown.space)=\"toggle()\">\r\n <span class=\"toggler\"\r\n [class]=\"{'collapse': isOpen(), 'expand': !isOpen()}\"\r\n [style.visibility]=\"hasChildren()?'visible':'hidden'\"></span>\r\n @if (key()) {\r\n <span class=\"key\">\r\n <span>{{key()}}</span>\r\n <span>: </span>\r\n </span>\r\n }\r\n <span class=\"value\">\r\n @if (isObject()) {\r\n <span>\r\n {{ dataType() }}\r\n @if (isArray()) {\r\n <span>[ {{ $any(data())?.length }} ]</span>\r\n }\r\n </span>\r\n }\r\n @if (!isObject() && valueType()) {\r\n <span [class]=\"valueType()\">{{ value() }}</span>\r\n }\r\n </span>\r\n </a>\r\n @if (hasChildren() && isOpen()) {\r\n <div class=\"children\">\r\n @for (_key of childrenKeys(); track _key) {\r\n <nxt-json-view-item [data]=\"data()[_key]\"\r\n [key]=\"_key\"\r\n [level]=\"level()+1\"\r\n [levelOpen]=\"levelOpen()\"\r\n [levelLabels]=\"levelLabels()\" />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".json-view a{cursor:pointer;text-decoration:none}.json-view .toggler{width:1em;padding:0;display:block;text-align:center;float:left}.json-view .collapse:before{content:\"-\"}.json-view .expand:before{content:\"+\"}.json-view .key{color:var(--nxt-json-view-color-key, #92278f)}.json-view .value{color:var(--nxt-json-view-color-value, #000000)}.json-view .value .string{color:var(--nxt-json-view-color-string, #3ab54a)}.json-view .value .number{color:var(--nxt-json-view-color-number, #25aae2)}.json-view .value .boolean{color:var(--nxt-json-view-color-boolean, #aa0d91)}.json-view .value .null{color:var(--nxt-json-view-color-null, #f1592a)}.json-view .children{margin-left:1em}\n"], dependencies: [{ kind: "component", type: JsonViewItemComponent, selector: "nxt-json-view-item", inputs: ["data", "key", "level", "levelOpen", "levelLabels"], outputs: ["levelOpenChange"] }] }); }
|
|
151
151
|
}
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: JsonViewItemComponent, decorators: [{
|
|
153
153
|
type: Component,
|
|
154
154
|
args: [{ selector: 'nxt-json-view-item', encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"json-view\">\r\n <a (click)=\"toggle()\"\r\n tabindex=\"0\"\r\n (keydown.space)=\"toggle()\">\r\n <span class=\"toggler\"\r\n [class]=\"{'collapse': isOpen(), 'expand': !isOpen()}\"\r\n [style.visibility]=\"hasChildren()?'visible':'hidden'\"></span>\r\n @if (key()) {\r\n <span class=\"key\">\r\n <span>{{key()}}</span>\r\n <span>: </span>\r\n </span>\r\n }\r\n <span class=\"value\">\r\n @if (isObject()) {\r\n <span>\r\n {{ dataType() }}\r\n @if (isArray()) {\r\n <span>[ {{ $any(data())?.length }} ]</span>\r\n }\r\n </span>\r\n }\r\n @if (!isObject() && valueType()) {\r\n <span [class]=\"valueType()\">{{ value() }}</span>\r\n }\r\n </span>\r\n </a>\r\n @if (hasChildren() && isOpen()) {\r\n <div class=\"children\">\r\n @for (_key of childrenKeys(); track _key) {\r\n <nxt-json-view-item [data]=\"data()[_key]\"\r\n [key]=\"_key\"\r\n [level]=\"level()+1\"\r\n [levelOpen]=\"levelOpen()\"\r\n [levelLabels]=\"levelLabels()\" />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".json-view a{cursor:pointer;text-decoration:none}.json-view .toggler{width:1em;padding:0;display:block;text-align:center;float:left}.json-view .collapse:before{content:\"-\"}.json-view .expand:before{content:\"+\"}.json-view .key{color:var(--nxt-json-view-color-key, #92278f)}.json-view .value{color:var(--nxt-json-view-color-value, #000000)}.json-view .value .string{color:var(--nxt-json-view-color-string, #3ab54a)}.json-view .value .number{color:var(--nxt-json-view-color-number, #25aae2)}.json-view .value .boolean{color:var(--nxt-json-view-color-boolean, #aa0d91)}.json-view .value .null{color:var(--nxt-json-view-color-null, #f1592a)}.json-view .children{margin-left:1em}\n"] }]
|
|
155
155
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], levelOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelOpen", required: false }] }, { type: i0.Output, args: ["levelOpenChange"] }], levelLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelLabels", required: false }] }] } });
|
|
@@ -182,15 +182,15 @@ class JsonViewComponent {
|
|
|
182
182
|
collapseTo(level) {
|
|
183
183
|
this.expanderService.collapseTo(level);
|
|
184
184
|
}
|
|
185
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0
|
|
186
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0
|
|
185
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: JsonViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
186
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: JsonViewComponent, isStandalone: true, selector: "nxt-json-view", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, levelOpen: { classPropertyName: "levelOpen", publicName: "levelOpen", isSignal: true, isRequired: false, transformFunction: null }, levelLabels: { classPropertyName: "levelLabels", publicName: "levelLabels", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
187
187
|
{
|
|
188
188
|
provide: ExpanderService,
|
|
189
189
|
useClass: ExpanderService
|
|
190
190
|
}
|
|
191
191
|
], ngImport: i0, template: "<div class=\"nxt-json-view\">\r\n <nxt-json-view-item [data]=\"data()\"\r\n [level]=\"0\"\r\n [levelOpen]=\"_levelOpen()\"\r\n [levelLabels]=\"levelLabels()\"\r\n class=\"json-view\" />\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: JsonViewItemComponent, selector: "nxt-json-view-item", inputs: ["data", "key", "level", "levelOpen", "levelLabels"], outputs: ["levelOpenChange"] }] }); }
|
|
192
192
|
}
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: JsonViewComponent, decorators: [{
|
|
194
194
|
type: Component,
|
|
195
195
|
args: [{ selector: 'nxt-json-view', encapsulation: ViewEncapsulation.Emulated, providers: [
|
|
196
196
|
{
|
|
@@ -204,11 +204,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
204
204
|
|
|
205
205
|
/** @deprecated use standalone imports */
|
|
206
206
|
class JsonViewModule {
|
|
207
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0
|
|
208
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0
|
|
209
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0
|
|
207
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: JsonViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
208
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: JsonViewModule, imports: [JsonViewComponent], exports: [JsonViewComponent] }); }
|
|
209
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: JsonViewModule }); }
|
|
210
210
|
}
|
|
211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0
|
|
211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: JsonViewModule, decorators: [{
|
|
212
212
|
type: NgModule,
|
|
213
213
|
args: [{
|
|
214
214
|
imports: [
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "nxt-json-view",
|
|
3
3
|
"description": "Angular component for interactive json view.",
|
|
4
4
|
"bugs": "https://github.com/Liquid-JS/nxt-components/issues",
|
|
5
|
-
"version": "21.0.0
|
|
5
|
+
"version": "21.0.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"repository": {
|
|
@@ -26,9 +26,6 @@
|
|
|
26
26
|
"@angular/common": "^21.0.0",
|
|
27
27
|
"@angular/core": "^21.0.0"
|
|
28
28
|
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"tslib": "^2.8.1"
|
|
31
|
-
},
|
|
32
29
|
"module": "fesm2022/nxt-json-view.mjs",
|
|
33
30
|
"typings": "types/nxt-json-view.d.ts",
|
|
34
31
|
"exports": {
|
|
@@ -40,5 +37,8 @@
|
|
|
40
37
|
"default": "./fesm2022/nxt-json-view.mjs"
|
|
41
38
|
}
|
|
42
39
|
},
|
|
43
|
-
"sideEffects": false
|
|
40
|
+
"sideEffects": false,
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"tslib": "^2.3.0"
|
|
43
|
+
}
|
|
44
44
|
}
|