jpf-mobx 1.0.56 → 1.0.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/dist/controls/index.d.ts +2 -2
- package/dist/controls/index.js +2 -2
- package/dist/controls/index.js.map +1 -1
- package/dist/controls/jsonViewerAwesome/index.d.ts +1 -0
- package/dist/controls/jsonViewerAwesome/index.js +2 -0
- package/dist/controls/jsonViewerAwesome/index.js.map +1 -0
- package/dist/controls/jsonViewerAwesome/jsonFormatter/JsonFormatter.d.ts +29 -0
- package/dist/controls/jsonViewerAwesome/jsonFormatter/JsonFormatter.js +68 -0
- package/dist/controls/jsonViewerAwesome/jsonFormatter/JsonFormatter.js.map +1 -0
- package/package.json +1 -1
- package/src/controls/index.ts +2 -2
- /package/src/controls/{jsonViewAwesome → jsonViewerAwesome}/index.ts +0 -0
- /package/src/controls/{jsonViewAwesome → jsonViewerAwesome}/jsonFormatter/JsonFormatter.ts +0 -0
package/dist/controls/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as codeMirror from "./codeMirror/index";
|
|
2
2
|
import * as custom from "./custom/index";
|
|
3
3
|
import * as html from "./html/index";
|
|
4
|
-
import * as
|
|
4
|
+
import * as jsonViewerAwesome from "./jsonViewerAwesome/index";
|
|
5
5
|
import * as kendo from "./kendo/index";
|
|
6
6
|
import * as leaflet from "./leaflet/index";
|
|
7
7
|
import * as svg from "./svg/index";
|
|
8
8
|
export { codeMirror };
|
|
9
9
|
export { custom };
|
|
10
10
|
export { html };
|
|
11
|
-
export {
|
|
11
|
+
export { jsonViewerAwesome };
|
|
12
12
|
export { kendo };
|
|
13
13
|
export { leaflet };
|
|
14
14
|
export { svg };
|
package/dist/controls/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as codeMirror from "./codeMirror/index";
|
|
2
2
|
import * as custom from "./custom/index";
|
|
3
3
|
import * as html from "./html/index";
|
|
4
|
-
import * as
|
|
4
|
+
import * as jsonViewerAwesome from "./jsonViewerAwesome/index";
|
|
5
5
|
import * as kendo from "./kendo/index";
|
|
6
6
|
import * as leaflet from "./leaflet/index";
|
|
7
7
|
import * as svg from "./svg/index";
|
|
8
8
|
export { codeMirror };
|
|
9
9
|
export { custom };
|
|
10
10
|
export { html };
|
|
11
|
-
export {
|
|
11
|
+
export { jsonViewerAwesome };
|
|
12
12
|
export { kendo };
|
|
13
13
|
export { leaflet };
|
|
14
14
|
export { svg };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/controls/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/controls/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,iBAAiB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./jsonFormatter/JsonFormatter";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/jsonViewerAwesome/index.ts"],"names":[],"mappings":"AAAA,cAAe,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Element } from "../../../framework/element";
|
|
2
|
+
import { Properties, IProperties } from "../../../framework/properties";
|
|
3
|
+
import { Subscribable } from "../../../framework/observable";
|
|
4
|
+
export interface IJsonFormatterProperties extends IProperties {
|
|
5
|
+
json: object | Subscribable<object>;
|
|
6
|
+
showArrayIndex?: boolean;
|
|
7
|
+
quotesOnKeys?: boolean;
|
|
8
|
+
displayDataTypes?: boolean;
|
|
9
|
+
displayObjectSize?: boolean;
|
|
10
|
+
sortKeys?: boolean;
|
|
11
|
+
collapsed?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare class JsonFormatterElement extends Element<IJsonFormatterProperties> {
|
|
14
|
+
constructor(properties: IJsonFormatterProperties);
|
|
15
|
+
build(): void;
|
|
16
|
+
private setJson;
|
|
17
|
+
}
|
|
18
|
+
export declare function jsonFormatterElement(properties: IJsonFormatterProperties): JsonFormatterElement;
|
|
19
|
+
export declare class JsonFormatterProperties extends Properties implements IJsonFormatterProperties {
|
|
20
|
+
constructor(properties: IJsonFormatterProperties);
|
|
21
|
+
json: object | Subscribable<object>;
|
|
22
|
+
showArrayIndex?: boolean;
|
|
23
|
+
quotesOnKeys?: boolean;
|
|
24
|
+
displayDataTypes?: boolean;
|
|
25
|
+
displayObjectSize?: boolean;
|
|
26
|
+
sortKeys?: boolean;
|
|
27
|
+
collapsed?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Element, registerElement } from "../../../framework/element";
|
|
2
|
+
import { Properties, extendProperties } from "../../../framework/properties";
|
|
3
|
+
import { unwrap, isSubscribable, reaction } from "../../../framework/observable";
|
|
4
|
+
import { JSONFormatter } from "json-viewer-awesome/lib/json-formatter";
|
|
5
|
+
class JsonFormatterElement extends Element {
|
|
6
|
+
constructor(properties) {
|
|
7
|
+
super({
|
|
8
|
+
tagName: "div",
|
|
9
|
+
properties: extendProperties(properties, {
|
|
10
|
+
elementType: "JsonFormatter"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
build() {
|
|
15
|
+
super.build();
|
|
16
|
+
const properties = this.properties;
|
|
17
|
+
this.setJson(unwrap(properties.json));
|
|
18
|
+
if (isSubscribable(properties.json)) {
|
|
19
|
+
this.disposers.push(reaction(() => {
|
|
20
|
+
return unwrap(properties.json);
|
|
21
|
+
}, (json) => {
|
|
22
|
+
this.setJson(json);
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
setJson(json) {
|
|
27
|
+
if (json) {
|
|
28
|
+
if (typeof json === "object") {
|
|
29
|
+
const jsonFormatter = new JSONFormatter({
|
|
30
|
+
showArrayIndex: this.properties.showArrayIndex,
|
|
31
|
+
quotesOnKeys: this.properties.quotesOnKeys,
|
|
32
|
+
displayDataTypes: this.properties.displayDataTypes,
|
|
33
|
+
displayObjectSize: this.properties.displayObjectSize,
|
|
34
|
+
sortKeys: false,
|
|
35
|
+
collapsed: true,
|
|
36
|
+
iconStyle: 0,
|
|
37
|
+
theme: undefined,
|
|
38
|
+
src: json
|
|
39
|
+
});
|
|
40
|
+
this.element.replaceChildren(jsonFormatter.render());
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.element.innerHTML = json.toString();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.empty();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export function jsonFormatterElement(properties) {
|
|
52
|
+
return new JsonFormatterElement(properties);
|
|
53
|
+
}
|
|
54
|
+
export class JsonFormatterProperties extends Properties {
|
|
55
|
+
constructor(properties) {
|
|
56
|
+
super();
|
|
57
|
+
this.setProperties(this, properties);
|
|
58
|
+
}
|
|
59
|
+
json;
|
|
60
|
+
showArrayIndex;
|
|
61
|
+
quotesOnKeys;
|
|
62
|
+
displayDataTypes;
|
|
63
|
+
displayObjectSize;
|
|
64
|
+
sortKeys;
|
|
65
|
+
collapsed;
|
|
66
|
+
}
|
|
67
|
+
registerElement(JsonFormatterProperties.prototype.constructor, JsonFormatterElement);
|
|
68
|
+
//# sourceMappingURL=JsonFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JsonFormatter.js","sourceRoot":"","sources":["../../../../src/controls/jsonViewerAwesome/jsonFormatter/JsonFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAe,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAgB,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAYvE,MAAM,oBAAqB,SAAQ,OAAiC;IAChE,YAAY,UAAoC;QAC5C,KAAK,CACD;YACI,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,gBAAgB,CACxB,UAAU,EACV;gBACI,WAAW,EAAE,eAAe;aAC/B,CACJ;SACJ,CACJ,CAAC;IACN,CAAC;IAED,KAAK;QACD,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QACtC,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YACjC,IAAI,CAAC,SAAS,CAAC,IAAI,CACf,QAAQ,CACJ,GAAG,EAAE;gBACD,OAAO,MAAM,CAAC,UAAU,CAAC,I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;IAC5B,QAAQ,CAAW;IACnB,SAAS,CAAW;CACvB;AAED,eAAe,CACX,uBAAuB,CAAC,SAAS,CAAC,WAAW,EAC7C,oBAAoB,CACvB,CAAC"}
|
package/package.json
CHANGED
package/src/controls/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as codeMirror from "./codeMirror/index";
|
|
2
2
|
import * as custom from "./custom/index";
|
|
3
3
|
import * as html from "./html/index";
|
|
4
|
-
import * as
|
|
4
|
+
import * as jsonViewerAwesome from "./jsonViewerAwesome/index";
|
|
5
5
|
import * as kendo from "./kendo/index";
|
|
6
6
|
import * as leaflet from "./leaflet/index";
|
|
7
7
|
import * as svg from "./svg/index";
|
|
@@ -9,7 +9,7 @@ import * as svg from "./svg/index";
|
|
|
9
9
|
export { codeMirror };
|
|
10
10
|
export { custom };
|
|
11
11
|
export { html };
|
|
12
|
-
export {
|
|
12
|
+
export { jsonViewerAwesome };
|
|
13
13
|
export { kendo };
|
|
14
14
|
export { leaflet };
|
|
15
15
|
export { svg };
|
|
File without changes
|
|
File without changes
|