jpf 4.0.24 → 4.1.10
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/package.json +66 -66
- package/dist/controls/leaflet/LabelControl.d.ts +0 -11
- package/dist/controls/leaflet/LabelControl.js +0 -31
- package/dist/controls/leaflet/LabelControl.js.map +0 -1
- package/dist/controls/leaflet/Map.d.ts +0 -46
- package/dist/controls/leaflet/Map.js +0 -120
- package/dist/controls/leaflet/Map.js.map +0 -1
- package/dist/controls/leaflet/OpenStreetMapTileLayer.d.ts +0 -7
- package/dist/controls/leaflet/OpenStreetMapTileLayer.js +0 -11
- package/dist/controls/leaflet/OpenStreetMapTileLayer.js.map +0 -1
- package/dist/controls/user/Content/Content.d.ts +0 -16
- package/dist/controls/user/Content/Content.js +0 -45
- package/dist/controls/user/Content/Content.js.map +0 -1
- package/dist/controls/user/FileSelector/FileSelector.d.ts +0 -17
- package/dist/controls/user/FileSelector/FileSelector.js +0 -54
- package/dist/controls/user/FileSelector/FileSelector.js.map +0 -1
- package/dist/controls/user/LabeledControl/LabeledControl.d.ts +0 -14
- package/dist/controls/user/LabeledControl/LabeledControl.js +0 -32
- package/dist/controls/user/LabeledControl/LabeledControl.js.map +0 -1
- package/dist/controls/user/ListItem/ListItem.d.ts +0 -30
- package/dist/controls/user/ListItem/ListItem.js +0 -61
- package/dist/controls/user/ListItem/ListItem.js.map +0 -1
- package/dist/controls/user/index.d.ts +0 -4
- package/dist/controls/user/index.js +0 -5
- package/dist/controls/user/index.js.map +0 -1
- package/dist/utilities/common/common.d.ts +0 -19
- package/dist/utilities/common/common.js +0 -193
- package/dist/utilities/common/common.js.map +0 -1
- package/dist/utilities/readerResult/readerResult.d.ts +0 -9
- package/dist/utilities/readerResult/readerResult.js +0 -24
- package/dist/utilities/readerResult/readerResult.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "jpf",
|
|
3
|
+
"version": "4.1.10",
|
|
4
|
+
"description": "Javascript Presentation Foundation",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mvvm",
|
|
7
|
+
"framework",
|
|
8
|
+
"binding",
|
|
9
|
+
"observable",
|
|
10
|
+
"single page application",
|
|
11
|
+
"spa"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://dev.azure.com/opinio/JavascriptPresentationFoundation",
|
|
14
|
+
"bugs": "",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Willy van Vroenhoven",
|
|
18
|
+
"email": "vroenhoven@opinio.nl"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "tfs",
|
|
22
|
+
"url": "https://dev.azure.com/opinio/JavascriptPresentationFoundation"
|
|
23
|
+
},
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"types": "dist/index.d.ts",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"package.json",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
34
|
+
"npmAudit": "npm audit",
|
|
35
|
+
"npmAuditFix": "npm audit fix",
|
|
36
|
+
"npmAuditFixForce": "npm audit fix --force",
|
|
37
|
+
"npmCacheClean": "npm cache clean --force",
|
|
38
|
+
"npmPublish": "tsc & npm publish",
|
|
39
|
+
"npmLogin": "npm login",
|
|
40
|
+
"npmWhoAmI": "npm whoami",
|
|
41
|
+
"npmAddUser": "npm adduser",
|
|
42
|
+
"tsc": "tsc",
|
|
43
|
+
"gitPush": "git push",
|
|
44
|
+
"gitPull": "git pull",
|
|
45
|
+
"gitCommit": "git commit"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"knockout": "3.5.1",
|
|
49
|
+
"tocca": "2.0.9",
|
|
50
|
+
"ua-parser-js": "1.0.32",
|
|
51
|
+
"toastr": "2.1.4",
|
|
52
|
+
"uuid": "9.0.0",
|
|
53
|
+
"@progress/kendo-ui": "2022.3.913",
|
|
54
|
+
"html-prettify": "1.0.7",
|
|
55
|
+
"codemirror": "6.0.1",
|
|
56
|
+
"@codemirror/lang-html": "6.4.0",
|
|
57
|
+
"@codemirror/lang-json": "6.0.1",
|
|
58
|
+
"json-viewer-awesome": "1.0.15",
|
|
59
|
+
"leaflet": "1.9.3",
|
|
60
|
+
"leaflet-arrowheads": "1.4.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@types/ua-parser-js": "^0.7.36",
|
|
64
|
+
"typescript": "4.9.4"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as leaflet from "leaflet";
|
|
2
|
-
import { IView } from "../../framework/View";
|
|
3
|
-
import { ViewModel } from "../../framework/ViewModel";
|
|
4
|
-
export interface LeafletLabelControlOptions extends leaflet.ControlOptions {
|
|
5
|
-
content: string | IView | ViewModel;
|
|
6
|
-
}
|
|
7
|
-
export declare class LeafletLabelControl extends leaflet.Control {
|
|
8
|
-
constructor(options: LeafletLabelControlOptions);
|
|
9
|
-
private readonly content;
|
|
10
|
-
onAdd(map: leaflet.Map): HTMLElement;
|
|
11
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as leaflet from "leaflet";
|
|
2
|
-
import { getView } from "../../framework/View";
|
|
3
|
-
import { ViewModel } from "../../framework/ViewModel";
|
|
4
|
-
export class LeafletLabelControl extends leaflet.Control {
|
|
5
|
-
constructor(options) {
|
|
6
|
-
super(options);
|
|
7
|
-
this.content = options.content;
|
|
8
|
-
}
|
|
9
|
-
content;
|
|
10
|
-
onAdd(map) {
|
|
11
|
-
const div = document.createElement("div");
|
|
12
|
-
let view;
|
|
13
|
-
if (this.content instanceof ViewModel) {
|
|
14
|
-
view = getView(this.content);
|
|
15
|
-
if (view) {
|
|
16
|
-
div.appendChild(view.render());
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
else if (typeof this.content === "string") {
|
|
20
|
-
div.innerText = this.content;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
view = this.content;
|
|
24
|
-
if (view.render) {
|
|
25
|
-
div.appendChild(view.render());
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return div;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=LabelControl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LabelControl.js","sourceRoot":"","sources":["../../../src/controls/leaflet/LabelControl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAS,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAMtD,MAAM,OAAO,mBAAoB,SAAQ,OAAO,CAAC,OAAO;IACpD,YAAY,OAAmC;QAC3C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IACnC,CAAC;IAEgB,OAAO,CAA6B;IAErD,KAAK,CAAC,GAAgB;QAClB,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE1C,IAAI,IAAI,CAAC;QACT,IAAI,IAAI,CAAC,OAAO,YAAY,SAAS,EAAE;YACnC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC7B,IAAI,IAAI,EAAE;gBACN,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;aAClC;SACJ;aAAM,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE;YACzC,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;SAChC;aAAM;YACH,IAAI,GAAG,IAAI,CAAC,OAAgB,CAAC;YAC7B,IAAI,IAAI,CAAC,MAAM,EAAE;gBACb,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;aAClC;SACJ;QAED,OAAO,GAAG,CAAC;IACf,CAAC;CACJ"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Observable, ObservableArray, Computed } from "knockout";
|
|
2
|
-
import * as leaflet from "leaflet";
|
|
3
|
-
import { View } from "../../framework/View";
|
|
4
|
-
import { ViewModel, ViewModelOptions } from "../../framework/ViewModel";
|
|
5
|
-
import { EventListeners } from "../../framework/event";
|
|
6
|
-
export interface MapViewModelOptions extends ViewModelOptions {
|
|
7
|
-
renderer?: leaflet.Renderer;
|
|
8
|
-
center?: leaflet.LatLngExpression | Observable<leaflet.LatLngExpression>;
|
|
9
|
-
zoom?: number;
|
|
10
|
-
tileLayers?: Array<leaflet.TileLayer>;
|
|
11
|
-
layers?: Array<leaflet.Layer> | ObservableArray<leaflet.Layer> | Computed<Array<leaflet.Layer>>;
|
|
12
|
-
controls?: Array<leaflet.Control> | ObservableArray<leaflet.Control>;
|
|
13
|
-
eventListeners?: MapEventListeners;
|
|
14
|
-
zoomInTitle: string;
|
|
15
|
-
zoomOutTitle: string;
|
|
16
|
-
}
|
|
17
|
-
export declare class MapViewModel extends ViewModel implements MapViewModelOptions {
|
|
18
|
-
constructor(options: MapViewModelOptions);
|
|
19
|
-
readonly renderer?: leaflet.Renderer;
|
|
20
|
-
readonly center: leaflet.LatLngExpression | Observable<leaflet.LatLngExpression>;
|
|
21
|
-
readonly zoom: number;
|
|
22
|
-
readonly south: number;
|
|
23
|
-
readonly north: number;
|
|
24
|
-
readonly west: number;
|
|
25
|
-
readonly east: number;
|
|
26
|
-
readonly tileLayers: Array<leaflet.TileLayer>;
|
|
27
|
-
readonly layers: Array<leaflet.Layer> | ObservableArray<leaflet.Layer> | Computed<Array<leaflet.Layer>>;
|
|
28
|
-
readonly controls: Array<leaflet.Control> | ObservableArray<leaflet.Control>;
|
|
29
|
-
readonly zoomInTitle: string;
|
|
30
|
-
readonly zoomOutTitle: string;
|
|
31
|
-
}
|
|
32
|
-
export declare class MapView extends View<MapViewModelOptions> {
|
|
33
|
-
constructor(viewModel: MapViewModelOptions, designTimeOptions?: ViewModelOptions);
|
|
34
|
-
private map;
|
|
35
|
-
private layers;
|
|
36
|
-
private controls;
|
|
37
|
-
build(): void;
|
|
38
|
-
private setTileLayers;
|
|
39
|
-
private setLayers;
|
|
40
|
-
private setControls;
|
|
41
|
-
}
|
|
42
|
-
export declare const burtonville: leaflet.LatLngExpression;
|
|
43
|
-
export interface MapEventListeners extends EventListeners {
|
|
44
|
-
zoomend?: (event: leaflet.LeafletEvent) => void;
|
|
45
|
-
moveend?: (event: leaflet.LeafletEvent) => void;
|
|
46
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { isObservable, unwrap } from "knockout";
|
|
2
|
-
import * as leaflet from "leaflet";
|
|
3
|
-
import { View, registerView } from "../../framework/View";
|
|
4
|
-
import { ViewModel, extendViewModel } from "../../framework/ViewModel";
|
|
5
|
-
export class MapViewModel extends ViewModel {
|
|
6
|
-
constructor(options) {
|
|
7
|
-
super(options);
|
|
8
|
-
if (options) {
|
|
9
|
-
this.renderer = options.renderer;
|
|
10
|
-
this.center = options.center;
|
|
11
|
-
this.zoom = options.zoom;
|
|
12
|
-
this.tileLayers = options.tileLayers;
|
|
13
|
-
this.layers = options.layers;
|
|
14
|
-
this.controls = options.controls;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
renderer;
|
|
18
|
-
center;
|
|
19
|
-
zoom;
|
|
20
|
-
south;
|
|
21
|
-
north;
|
|
22
|
-
west;
|
|
23
|
-
east;
|
|
24
|
-
tileLayers;
|
|
25
|
-
layers;
|
|
26
|
-
controls;
|
|
27
|
-
zoomInTitle;
|
|
28
|
-
zoomOutTitle;
|
|
29
|
-
}
|
|
30
|
-
export class MapView extends View {
|
|
31
|
-
constructor(viewModel, designTimeOptions) {
|
|
32
|
-
super({
|
|
33
|
-
tagName: "div",
|
|
34
|
-
viewModel: viewModel
|
|
35
|
-
}, extendViewModel({
|
|
36
|
-
viewType: "LeafletMap"
|
|
37
|
-
}, designTimeOptions));
|
|
38
|
-
}
|
|
39
|
-
map;
|
|
40
|
-
layers = new Array();
|
|
41
|
-
controls = new Array();
|
|
42
|
-
build() {
|
|
43
|
-
super.build();
|
|
44
|
-
const viewModel = this.viewModel;
|
|
45
|
-
if (!viewModel.center) {
|
|
46
|
-
viewModel.center = burtonville;
|
|
47
|
-
}
|
|
48
|
-
const options = {
|
|
49
|
-
renderer: viewModel.renderer,
|
|
50
|
-
zoomControl: false
|
|
51
|
-
};
|
|
52
|
-
setTimeout(() => {
|
|
53
|
-
this.map = leaflet.map(this.element, options).setView(unwrap(viewModel.center), this.viewModel.zoom);
|
|
54
|
-
leaflet.control.zoom({
|
|
55
|
-
position: "topleft",
|
|
56
|
-
zoomInTitle: viewModel.zoomInTitle,
|
|
57
|
-
zoomOutTitle: viewModel.zoomOutTitle
|
|
58
|
-
}).addTo(this.map);
|
|
59
|
-
if (this.viewModel.eventListeners) {
|
|
60
|
-
Object.keys(this.viewModel.eventListeners).forEach((key) => {
|
|
61
|
-
this.map.on(key, (event) => {
|
|
62
|
-
this.viewModel.eventListeners[key](event);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
this.setTileLayers(viewModel.tileLayers);
|
|
67
|
-
this.setLayers(unwrap(viewModel.layers));
|
|
68
|
-
if (isObservable(viewModel.layers)) {
|
|
69
|
-
viewModel.layers.subscribe((layers) => {
|
|
70
|
-
this.setLayers(layers);
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
this.setControls(unwrap(viewModel.controls));
|
|
74
|
-
if (isObservable(viewModel.controls)) {
|
|
75
|
-
viewModel.controls.subscribe((controls) => {
|
|
76
|
-
this.setControls(controls);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
if (isObservable(viewModel.center)) {
|
|
80
|
-
viewModel.center.subscribe((center) => {
|
|
81
|
-
this.map.panTo(center);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}, 100);
|
|
85
|
-
}
|
|
86
|
-
setTileLayers(tileLayers) {
|
|
87
|
-
if (tileLayers) {
|
|
88
|
-
tileLayers.forEach((tileLayer) => {
|
|
89
|
-
tileLayer.addTo(this.map);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
setLayers(layers) {
|
|
94
|
-
this.layers.forEach((layer) => {
|
|
95
|
-
this.map.removeLayer(layer);
|
|
96
|
-
});
|
|
97
|
-
this.layers = [];
|
|
98
|
-
if (layers) {
|
|
99
|
-
layers.forEach((layer) => {
|
|
100
|
-
this.layers.push(layer);
|
|
101
|
-
layer.addTo(this.map);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
setControls(controls) {
|
|
106
|
-
this.controls.forEach((control) => {
|
|
107
|
-
this.map.removeControl(control);
|
|
108
|
-
});
|
|
109
|
-
this.controls = [];
|
|
110
|
-
if (controls) {
|
|
111
|
-
controls.forEach((control) => {
|
|
112
|
-
this.controls.push(control);
|
|
113
|
-
control.addTo(this.map);
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
registerView(MapViewModel, MapView);
|
|
119
|
-
export const burtonville = [50.283939, 5.964070];
|
|
120
|
-
//# sourceMappingURL=Map.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Map.js","sourceRoot":"","sources":["../../../src/controls/leaflet/Map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAyC,MAAM,UAAU,CAAC;AACvF,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAoB,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAezF,MAAM,OAAO,YAAa,SAAQ,SAAS;IACvC,YAAY,OAA4B;QACpC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;YACjC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAC7B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;YACzB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;YACrC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MA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G,CAAC,CAAC;YAC5B,CAAC,CAAC,CAAC;SACN;IACL,CAAC;CACJ;AAED,YAAY,CACR,YAAY,EACZ,OAAO,CACV,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAA6B,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TileLayerOptions, TileLayer } from "leaflet";
|
|
2
|
-
export interface OpenStreetMapTileLayerOptions extends TileLayerOptions {
|
|
3
|
-
attribution?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare class OpenStreetMapTileLayer extends TileLayer {
|
|
6
|
-
constructor(options?: OpenStreetMapTileLayerOptions);
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TileLayer } from "leaflet";
|
|
2
|
-
export class OpenStreetMapTileLayer extends TileLayer {
|
|
3
|
-
constructor(options) {
|
|
4
|
-
if (!options) {
|
|
5
|
-
options = {};
|
|
6
|
-
}
|
|
7
|
-
options.attribution = "© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors";
|
|
8
|
-
super("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", options);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=OpenStreetMapTileLayer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenStreetMapTileLayer.js","sourceRoot":"","sources":["../../../src/controls/leaflet/OpenStreetMapTileLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,MAAM,SAAS,CAAC;AAMtD,MAAM,OAAO,sBAAuB,SAAQ,SAAS;IACjD,YAAY,OAAuC;QAC/C,IAAI,CAAC,OAAO,EAAE;YACV,OAAO,GAAG,EAAE,CAAC;SAChB;QACD,OAAO,CAAC,WAAW,GAAG,2FAA2F,CAAC;QAClH,KAAK,CAAC,oDAAoD,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACJ"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ViewModelOptions, ViewModel } from "../../../framework/ViewModel";
|
|
2
|
-
import { ObservableProperty } from "../../../framework/observable";
|
|
3
|
-
import { View } from "../../../framework/View";
|
|
4
|
-
export interface ContentViewModelOptions extends ViewModelOptions {
|
|
5
|
-
content?: ViewModel;
|
|
6
|
-
}
|
|
7
|
-
export declare class ContentViewModel extends ViewModel {
|
|
8
|
-
constructor(options?: ContentViewModelOptions);
|
|
9
|
-
readonly content: ObservableProperty<ViewModel>;
|
|
10
|
-
handleWebSocketMessage: (message: any) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare class ContentView extends View<ContentViewModel> {
|
|
13
|
-
constructor(viewModel: ContentViewModel, designTimeOptions?: ViewModelOptions);
|
|
14
|
-
build(): void;
|
|
15
|
-
private setContent;
|
|
16
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { unwrap } from "knockout";
|
|
2
|
-
import { ViewModel, extendViewModel } from "../../../framework/ViewModel";
|
|
3
|
-
import { observableProperty } from "../../../framework/observable";
|
|
4
|
-
import { View, getView, registerView } from "../../../framework/View";
|
|
5
|
-
export class ContentViewModel extends ViewModel {
|
|
6
|
-
constructor(options) {
|
|
7
|
-
super(options);
|
|
8
|
-
options = options || {};
|
|
9
|
-
this.content = observableProperty(options.content);
|
|
10
|
-
}
|
|
11
|
-
content;
|
|
12
|
-
handleWebSocketMessage = (message) => {
|
|
13
|
-
const content = this.content();
|
|
14
|
-
if (content.handleWebSocketMessage) {
|
|
15
|
-
content.handleWebSocketMessage(message);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export class ContentView extends View {
|
|
20
|
-
constructor(viewModel, designTimeOptions) {
|
|
21
|
-
super({
|
|
22
|
-
tagName: "div",
|
|
23
|
-
viewModel: viewModel
|
|
24
|
-
}, extendViewModel({
|
|
25
|
-
viewType: "Content"
|
|
26
|
-
}, designTimeOptions));
|
|
27
|
-
}
|
|
28
|
-
build() {
|
|
29
|
-
super.build();
|
|
30
|
-
this.setContent(unwrap(this.viewModel.content));
|
|
31
|
-
this.viewModel.content.subscribe((content) => {
|
|
32
|
-
this.setContent(content);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
setContent(content) {
|
|
36
|
-
if (content) {
|
|
37
|
-
this.setChildren(getView(content));
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
this.empty();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
registerView(ContentViewModel, ContentView);
|
|
45
|
-
//# sourceMappingURL=Content.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../src/controls/user/Content/Content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAoB,SAAS,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAsB,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAMtE,MAAM,OAAO,gBAAiB,SAAQ,SAAS;IAC3C,YAAY,OAAiC;QACzC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;QAEvB,IAAI,CAAC,OAAO,GAAG,kBAAkB,CAAY,OAAO,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IAEQ,OAAO,CAAgC;IAEhD,sBAAsB,GAAG,CAAC,OAAO,EAAE,EAAE;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,OAAO,CAAC,sBAAsB,EAAE;YAChC,OAAO,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;SAC3C;IACL,CAAC,CAAA;CACJ;AAED,MAAM,OAAO,WAAY,SAAQ,IAAsB;IACnD,YAAY,SAA2B,EAAE,iBAAoC;QACzE,KAAK,CACD;YACI,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,SAAS;SACvB,EACD,eAAe,CACX;YACI,QAAQ,EAAE,SAAS;SACtB,EACD,iBAAiB,CACpB,CACJ,CAAC;IACN,CAAC;IAED,KAAK;QACD,KAAK,CAAC,KAAK,EAAE,CAAC;QAGd,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAqB,CAAC,CAAC;QAGpE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE;YACzC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,UAAU,CAAC,OAAkB;QACjC,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;SACtC;aAAM;YACH,IAAI,CAAC,KAAK,EAAE,CAAC;SAChB;IACL,CAAC;CACJ;AAED,YAAY,CACR,gBAAgB,EAChB,WAAW,CACd,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ViewModel, ViewModelOptions } from "../../../framework/ViewModel";
|
|
2
|
-
import { View } from "../../../framework/View";
|
|
3
|
-
import { ButtonViewModelOptions } from "../../html/Button/Button";
|
|
4
|
-
import { InputViewModelOptions } from "../../html/Input/Input";
|
|
5
|
-
export interface InputFileViewModelOptions extends ViewModelOptions {
|
|
6
|
-
button?: ButtonViewModelOptions;
|
|
7
|
-
inputFile: InputViewModelOptions<FileList>;
|
|
8
|
-
}
|
|
9
|
-
export declare class FileSelectorViewModel extends ViewModel {
|
|
10
|
-
constructor(options?: InputFileViewModelOptions);
|
|
11
|
-
readonly button: ButtonViewModelOptions;
|
|
12
|
-
readonly inputFile: InputViewModelOptions<FileList>;
|
|
13
|
-
}
|
|
14
|
-
export declare class FileSelectorView extends View<FileSelectorViewModel> {
|
|
15
|
-
constructor(viewModel: FileSelectorViewModel, designTimeOptions?: ViewModelOptions);
|
|
16
|
-
protected build(): void;
|
|
17
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ViewModel, extendViewModel } from "../../../framework/ViewModel";
|
|
2
|
-
import { View, registerView } from "../../../framework/View";
|
|
3
|
-
import { ButtonView } from "../../html/Button/Button";
|
|
4
|
-
import { InputView } from "../../html/Input/Input";
|
|
5
|
-
export class FileSelectorViewModel extends ViewModel {
|
|
6
|
-
constructor(options) {
|
|
7
|
-
super(options);
|
|
8
|
-
if (options) {
|
|
9
|
-
this.button = options.button;
|
|
10
|
-
options.inputFile.type = "file";
|
|
11
|
-
if (options.button) {
|
|
12
|
-
if (!options.inputFile.style) {
|
|
13
|
-
options.inputFile.style = {};
|
|
14
|
-
}
|
|
15
|
-
options.inputFile.style.display = "none";
|
|
16
|
-
}
|
|
17
|
-
this.inputFile = options.inputFile;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
button;
|
|
21
|
-
inputFile;
|
|
22
|
-
}
|
|
23
|
-
export class FileSelectorView extends View {
|
|
24
|
-
constructor(viewModel, designTimeOptions) {
|
|
25
|
-
super({
|
|
26
|
-
tagName: "div",
|
|
27
|
-
viewModel: viewModel
|
|
28
|
-
}, extendViewModel({
|
|
29
|
-
viewType: "FileSelector"
|
|
30
|
-
}, designTimeOptions));
|
|
31
|
-
}
|
|
32
|
-
build() {
|
|
33
|
-
super.build();
|
|
34
|
-
const viewModel = this.viewModel;
|
|
35
|
-
var fileInput = new InputView(viewModel.inputFile).render();
|
|
36
|
-
this.element.appendChild(fileInput);
|
|
37
|
-
if (viewModel.button) {
|
|
38
|
-
const button = new ButtonView(viewModel.button, {
|
|
39
|
-
eventListeners: {
|
|
40
|
-
click: {
|
|
41
|
-
listener: () => {
|
|
42
|
-
var mouseEvent = document.createEvent("MouseEvent");
|
|
43
|
-
mouseEvent.initEvent("click", false, false);
|
|
44
|
-
fileInput.dispatchEvent(mouseEvent);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}).render();
|
|
49
|
-
this.element.appendChild(button);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
registerView(FileSelectorViewModel, FileSelectorView);
|
|
54
|
-
//# sourceMappingURL=FileSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSelector.js","sourceRoot":"","sources":["../../../../src/controls/user/FileSelector/FileSelector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAA0B,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAO1E,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAChD,YAAY,OAAmC;QAC3C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAC7B,OAAO,CAAC,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC;YAEhC,IAAI,OAAO,CAAC,MAAM,EAAE;gBAChB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE;oBAC1B,OAAO,CAAC,SAAS,CAAC,KAAK,GAAG,EAAE,CAAC;iBAChC;gBACD,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;aAC5C;YAED,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;SACtC;IACL,CAAC;IAEQ,MAAM,CAAyB;IAC/B,SAAS,CAAkC;CACvD;AAED,MAAM,OAAO,gBAAiB,SAAQ,IAA2B;IAC7D,YAAY,SAAgC,EAAE,iBAAoC;QAC9E,KAAK,CACD;YACI,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,SAAS;SACvB,EACD,eAAe,CACX;YACI,QAAQ,EAAE,cAAc;SAC3B,EACD,iBAAiB,CACpB,CACJ,CAAC;IACN,CAAC;IAES,KAAK;QACX,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAEjC,IAAI,SAAS,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC;QAE5D,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAEpC,IAAI,SAAS,CAAC,MAAM,EAAE;YAClB,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,MAAM,EAC1C;gBACI,cAAc,EAAE;oBACZ,KAAK,EAAE;wBACH,QAAQ,EAAE,GAAG,EAAE;4BACX,IAAI,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;4BACpD,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;4BAC5C,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;wBACxC,CAAC;qBACJ;iBACJ;aACJ,CAAC,CAAC,MAAM,EAAE,CAAC;YAEhB,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SACpC;IACL,CAAC;CACJ;AAED,YAAY,CACR,qBAAqB,EACrB,gBAAgB,CACnB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ViewModel, ViewModelOptions } from "../../../framework/ViewModel";
|
|
2
|
-
import { View, IView } from "../../../framework/View";
|
|
3
|
-
export interface LabeledViewModelOptions extends ViewModelOptions {
|
|
4
|
-
labelOptions: ViewModelOptions;
|
|
5
|
-
view: IView;
|
|
6
|
-
}
|
|
7
|
-
export declare class LabeledControlViewModel extends ViewModel implements LabeledViewModelOptions {
|
|
8
|
-
constructor(options: LabeledViewModelOptions);
|
|
9
|
-
labelOptions: ViewModelOptions;
|
|
10
|
-
view: IView;
|
|
11
|
-
}
|
|
12
|
-
export declare class LabeledControlView extends View<LabeledViewModelOptions> {
|
|
13
|
-
constructor(viewModel: LabeledViewModelOptions, designTimeOptions?: ViewModelOptions);
|
|
14
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ViewModel, extendViewModel } from "../../../framework/ViewModel";
|
|
2
|
-
import { View } from "../../../framework/View";
|
|
3
|
-
import { DivView } from "../../html/Div/Div";
|
|
4
|
-
export class LabeledControlViewModel extends ViewModel {
|
|
5
|
-
constructor(options) {
|
|
6
|
-
super(options);
|
|
7
|
-
}
|
|
8
|
-
labelOptions;
|
|
9
|
-
view;
|
|
10
|
-
}
|
|
11
|
-
export class LabeledControlView extends View {
|
|
12
|
-
constructor(viewModel, designTimeOptions) {
|
|
13
|
-
super({
|
|
14
|
-
tagName: "div",
|
|
15
|
-
viewModel: viewModel,
|
|
16
|
-
children: [
|
|
17
|
-
new DivView(viewModel.labelOptions, {
|
|
18
|
-
viewType: "Label"
|
|
19
|
-
}),
|
|
20
|
-
viewModel.view
|
|
21
|
-
]
|
|
22
|
-
}, extendViewModel({
|
|
23
|
-
viewType: "LabeledControl",
|
|
24
|
-
style: {
|
|
25
|
-
display: "flex",
|
|
26
|
-
alignItems: "center"
|
|
27
|
-
},
|
|
28
|
-
classNames: ["o-labled-control"]
|
|
29
|
-
}, designTimeOptions));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=LabeledControl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledControl.js","sourceRoot":"","sources":["../../../../src/controls/user/LabeledControl/LabeledControl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC3F,OAAO,EAAE,IAAI,EAAS,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAO7C,MAAM,OAAO,uBAAwB,SAAQ,SAAS;IAClD,YAAY,OAAgC;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;IAED,YAAY,CAAmB;IAC/B,IAAI,CAAQ;CACf;AAED,MAAM,OAAO,kBAAmB,SAAQ,IAA6B;IACjE,YAAY,SAAkC,EAAE,iBAAoC;QAChF,KAAK,CACD;YACI,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE;gBACN,IAAI,OAAO,CACP,SAAS,CAAC,YAAY,EACtB;oBACI,QAAQ,EAAE,OAAO;iBACpB,CACJ;gBACD,SAAS,CAAC,IAAI;aACjB;SACJ,EACD,eAAe,CACX;YACI,QAAQ,EAAE,gBAAgB;YAC1B,KAAK,EAAE;gBACH,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;aACvB;YACD,UAAU,EAAE,CAAC,kBAAkB,CAAC;SACnC,EACD,iBAAiB,CACpB,CACJ,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { View } from "../../../framework/View";
|
|
2
|
-
import { ViewModel, ViewModelOptions } from "../../../framework/ViewModel";
|
|
3
|
-
export interface ListItemViewModelOptions extends ViewModelOptions {
|
|
4
|
-
id: number | string;
|
|
5
|
-
text?: string | ViewModel;
|
|
6
|
-
select?: () => void;
|
|
7
|
-
order?: number | string;
|
|
8
|
-
}
|
|
9
|
-
export declare class ListItemViewModel extends ViewModel implements ListItemViewModelOptions {
|
|
10
|
-
constructor(options: ListItemViewModelOptions);
|
|
11
|
-
readonly id: number | string;
|
|
12
|
-
text: string | ViewModel;
|
|
13
|
-
readonly select: () => void;
|
|
14
|
-
order: number | string;
|
|
15
|
-
}
|
|
16
|
-
export interface HierarchicalListItemViewModelOptions extends ListItemViewModelOptions {
|
|
17
|
-
parentId?: number | string;
|
|
18
|
-
expanded?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export declare class HierarchicalListItemViewModel extends ListItemViewModel implements HierarchicalListItemViewModelOptions {
|
|
21
|
-
constructor(options: HierarchicalListItemViewModelOptions);
|
|
22
|
-
readonly parentId: number | string;
|
|
23
|
-
readonly expanded: boolean;
|
|
24
|
-
items: Array<HierarchicalListItemViewModel>;
|
|
25
|
-
}
|
|
26
|
-
export declare class ListItemView extends View<ListItemViewModel> {
|
|
27
|
-
constructor(viewModel: ListItemViewModel);
|
|
28
|
-
build(): void;
|
|
29
|
-
private setContent;
|
|
30
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { isObservable, unwrap } from "knockout";
|
|
2
|
-
import { View, getView, registerView } from "../../../framework/View";
|
|
3
|
-
import { ViewModel } from "../../../framework/ViewModel";
|
|
4
|
-
export class ListItemViewModel extends ViewModel {
|
|
5
|
-
constructor(options) {
|
|
6
|
-
super(options);
|
|
7
|
-
if (options) {
|
|
8
|
-
this.id = options.id;
|
|
9
|
-
this.text = options.text;
|
|
10
|
-
this.select = options.select;
|
|
11
|
-
this.order = options.order;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
id;
|
|
15
|
-
text;
|
|
16
|
-
select;
|
|
17
|
-
order;
|
|
18
|
-
}
|
|
19
|
-
export class HierarchicalListItemViewModel extends ListItemViewModel {
|
|
20
|
-
constructor(options) {
|
|
21
|
-
super(options);
|
|
22
|
-
this.parentId = options.parentId;
|
|
23
|
-
this.expanded = options.expanded;
|
|
24
|
-
}
|
|
25
|
-
parentId;
|
|
26
|
-
expanded;
|
|
27
|
-
items;
|
|
28
|
-
}
|
|
29
|
-
export class ListItemView extends View {
|
|
30
|
-
constructor(viewModel) {
|
|
31
|
-
super({
|
|
32
|
-
tagName: "div",
|
|
33
|
-
viewModel: viewModel
|
|
34
|
-
}, {
|
|
35
|
-
viewType: "ListItem"
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
build() {
|
|
39
|
-
super.build();
|
|
40
|
-
const viewModel = this.viewModel;
|
|
41
|
-
if (isObservable(viewModel.text)) {
|
|
42
|
-
this.setContent(unwrap(viewModel.text));
|
|
43
|
-
viewModel.text.subscribe((content) => {
|
|
44
|
-
this.setContent(content);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
this.setContent(viewModel.text);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
setContent(content) {
|
|
52
|
-
if (typeof content === "string") {
|
|
53
|
-
this.element.innerHTML = content;
|
|
54
|
-
}
|
|
55
|
-
else if (content instanceof ViewModel) {
|
|
56
|
-
this.setChildren(getView(content));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
registerView(ListItemViewModel, ListItemView);
|
|
61
|
-
//# sourceMappingURL=ListItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../../src/controls/user/ListItem/ListItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAoB,MAAM,8BAA8B,CAAC;AAa3E,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IAC5C,YAAY,OAAiC;QACzC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;YAEzB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAC7B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;SAC9B;IACL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C,OAAO,CAAC,CAAC,CAAC;SACtC;IACL,CAAC;CACJ;AAED,YAAY,CACR,iBAAiB,EACjB,YAAY,CACf,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/user/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare function setCookie(name: string, value: string, days: number): void;
|
|
2
|
-
export declare function getCookie(name: string): string;
|
|
3
|
-
export declare function eraseCookie(name: string): void;
|
|
4
|
-
export declare function getNavigatorLanguage(): any;
|
|
5
|
-
export declare function queryStringParameterExists(name: string): boolean;
|
|
6
|
-
export declare function getQueryStringParameter(name: string): string;
|
|
7
|
-
export declare function stateToQueryString(state: object): string;
|
|
8
|
-
export declare function getStateFromQueryString(): object;
|
|
9
|
-
export declare function insertRule(selector: string, style: string, markAsDynamic: boolean, index?: number, group?: string): void;
|
|
10
|
-
export declare function removeDynamicRules(group?: string): void;
|
|
11
|
-
export declare function getGuid(): string;
|
|
12
|
-
export declare function getKeys<TObject>(): (key: keyof TObject) => string;
|
|
13
|
-
export declare function getKey<TObject>(name: keyof TObject): keyof TObject;
|
|
14
|
-
export declare function convertToInt(text: any): number;
|
|
15
|
-
export declare function isInteger(text: string): boolean;
|
|
16
|
-
export declare function isIntegerOrNull(text: string): boolean;
|
|
17
|
-
export declare function isFloat(text: string): RegExpMatchArray;
|
|
18
|
-
export declare function getFormDataFromFileList(fileList: FileList): FormData;
|
|
19
|
-
export declare function prettifyHtml(html: string): string;
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { v4 } from "uuid";
|
|
2
|
-
import prettify from "html-prettify";
|
|
3
|
-
export function setCookie(name, value, days) {
|
|
4
|
-
let expires = "";
|
|
5
|
-
if (days) {
|
|
6
|
-
const date = new Date();
|
|
7
|
-
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
8
|
-
expires = "; expires=" + date.toUTCString();
|
|
9
|
-
}
|
|
10
|
-
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
|
11
|
-
}
|
|
12
|
-
export function getCookie(name) {
|
|
13
|
-
const nameEq = name + "=";
|
|
14
|
-
const ca = document.cookie.split(";");
|
|
15
|
-
for (let i = 0; i < ca.length; i++) {
|
|
16
|
-
let c = ca[i];
|
|
17
|
-
while (c.charAt(0) === " ") {
|
|
18
|
-
c = c.substring(1, c.length);
|
|
19
|
-
}
|
|
20
|
-
if (c.indexOf(nameEq) === 0) {
|
|
21
|
-
return c.substring(nameEq.length, c.length);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
export function eraseCookie(name) {
|
|
27
|
-
document.cookie = name + "=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
|
|
28
|
-
}
|
|
29
|
-
export function getNavigatorLanguage() {
|
|
30
|
-
if (window.navigator.languages) {
|
|
31
|
-
return window.navigator.languages[0];
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
return window.navigator["userLanguage"] || window.navigator.language;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export function queryStringParameterExists(name) {
|
|
38
|
-
return window.location.search.indexOf(name) >= 0;
|
|
39
|
-
}
|
|
40
|
-
export function getQueryStringParameter(name) {
|
|
41
|
-
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
|
42
|
-
const regex = new RegExp("[\\?&]" + name + "=([^&#]*)", "i");
|
|
43
|
-
const results = regex.exec(location.search);
|
|
44
|
-
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
|
|
45
|
-
}
|
|
46
|
-
;
|
|
47
|
-
export function stateToQueryString(state) {
|
|
48
|
-
const parametersArray = new Array();
|
|
49
|
-
if (state) {
|
|
50
|
-
Object.keys(state).forEach((key) => {
|
|
51
|
-
const value = state[key];
|
|
52
|
-
parametersArray.push(encodeURIComponent(key) + "=" + encodeURIComponent(value));
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
if (parametersArray.length === 0) {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
return "?" + parametersArray.join("&");
|
|
59
|
-
}
|
|
60
|
-
export function getStateFromQueryString() {
|
|
61
|
-
const result = {};
|
|
62
|
-
const search = window.location.search;
|
|
63
|
-
if (search && search.length > 2) {
|
|
64
|
-
const parameters = window.location.search.split("&");
|
|
65
|
-
if (parameters) {
|
|
66
|
-
parameters.forEach((parameter) => {
|
|
67
|
-
const nameValuePair = parameter.split("=");
|
|
68
|
-
result[decodeURIComponent(nameValuePair[0])] = JSON.parse(decodeURIComponent(nameValuePair[1]));
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return result;
|
|
73
|
-
}
|
|
74
|
-
const dynamicKey = "dynamic";
|
|
75
|
-
const groupKey = "group";
|
|
76
|
-
let styleSheet;
|
|
77
|
-
function getStyleSheet() {
|
|
78
|
-
if (!styleSheet) {
|
|
79
|
-
if (document.styleSheets.length > 0) {
|
|
80
|
-
styleSheet = document.styleSheets.item(0);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
throw "No stylesheets loaded";
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return styleSheet;
|
|
87
|
-
}
|
|
88
|
-
export function insertRule(selector, style, markAsDynamic, index, group) {
|
|
89
|
-
const styleSheet = getStyleSheet();
|
|
90
|
-
if (typeof styleSheet.insertRule === "function") {
|
|
91
|
-
const ruleExpression = selector + " {" + style + "}";
|
|
92
|
-
if (!index) {
|
|
93
|
-
index = styleSheet.cssRules.length;
|
|
94
|
-
}
|
|
95
|
-
const ruleIndex = styleSheet.insertRule(ruleExpression, index);
|
|
96
|
-
if (markAsDynamic) {
|
|
97
|
-
const rule = styleSheet.cssRules.item(ruleIndex);
|
|
98
|
-
rule[dynamicKey] = true;
|
|
99
|
-
if (group) {
|
|
100
|
-
rule[groupKey] = group;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
export function removeDynamicRules(group) {
|
|
106
|
-
const styleSheet = getStyleSheet();
|
|
107
|
-
for (let ruleIndex = styleSheet.cssRules.length - 1; ruleIndex >= 0; ruleIndex--) {
|
|
108
|
-
const rule = styleSheet.cssRules[ruleIndex];
|
|
109
|
-
if (rule[dynamicKey]) {
|
|
110
|
-
if (group) {
|
|
111
|
-
if (rule[groupKey] === group) {
|
|
112
|
-
styleSheet.deleteRule(ruleIndex);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
styleSheet.deleteRule(ruleIndex);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
export function getGuid() {
|
|
122
|
-
return v4();
|
|
123
|
-
}
|
|
124
|
-
export function getKeys() {
|
|
125
|
-
return (key) => key.toString();
|
|
126
|
-
}
|
|
127
|
-
export function getKey(name) {
|
|
128
|
-
return name;
|
|
129
|
-
}
|
|
130
|
-
function setScale(htmlElement, scale) {
|
|
131
|
-
htmlElement.style.transformOrigin = "center";
|
|
132
|
-
const scaleValue = " scale(" + scale + ")";
|
|
133
|
-
const transform = htmlElement.style.transform;
|
|
134
|
-
if (transform) {
|
|
135
|
-
if (transform.indexOf("scale") > -1) {
|
|
136
|
-
htmlElement.style.transform = transform.replace(/scale\(.*\)/, scaleValue);
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
htmlElement.style.transform += scaleValue;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
htmlElement.style.transform = scaleValue;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
export function convertToInt(text) {
|
|
147
|
-
if (typeof text === "string") {
|
|
148
|
-
if (isInteger(text)) {
|
|
149
|
-
const intValue = Number.parseInt(text);
|
|
150
|
-
if (Number.isNaN(intValue)) {
|
|
151
|
-
return null;
|
|
152
|
-
}
|
|
153
|
-
return intValue;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
if (typeof text === "number") {
|
|
157
|
-
return Math.trunc(text);
|
|
158
|
-
}
|
|
159
|
-
return null;
|
|
160
|
-
}
|
|
161
|
-
export function isInteger(text) {
|
|
162
|
-
if (!text) {
|
|
163
|
-
throw "parameter text not provided";
|
|
164
|
-
}
|
|
165
|
-
return text.match(/\D/) === null;
|
|
166
|
-
}
|
|
167
|
-
export function isIntegerOrNull(text) {
|
|
168
|
-
if (text) {
|
|
169
|
-
return isInteger(text);
|
|
170
|
-
}
|
|
171
|
-
return true;
|
|
172
|
-
}
|
|
173
|
-
export function isFloat(text) {
|
|
174
|
-
return text.match(/^[+-]?\d+(\.\d+)?$/);
|
|
175
|
-
}
|
|
176
|
-
export function getFormDataFromFileList(fileList) {
|
|
177
|
-
if (fileList && fileList.length > 0) {
|
|
178
|
-
const formData = new FormData();
|
|
179
|
-
for (let index = 0; index < fileList.length; index++) {
|
|
180
|
-
const file = fileList[index];
|
|
181
|
-
formData.append(file.name, file);
|
|
182
|
-
}
|
|
183
|
-
return formData;
|
|
184
|
-
}
|
|
185
|
-
return null;
|
|
186
|
-
}
|
|
187
|
-
export function prettifyHtml(html) {
|
|
188
|
-
if (html) {
|
|
189
|
-
return prettify(html);
|
|
190
|
-
}
|
|
191
|
-
return null;
|
|
192
|
-
}
|
|
193
|
-
//# sourceMappingURL=common.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/utilities/common/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,QAAQ,MAAM,eAAe,CAAC;AAIrC,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,KAAa,EAAE,IAAY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C,CAAC;KAC3B;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAKD,MAAM,UAAU,SAAS,CAAC,IAAY;IAClC,IAAI,CAAC,IAAI,EAAE;QACP,MAAM,6BAA6B,CAAC;KACvC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY;IACxC,IAAI,IAAI,EAAE;QACN,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;KAC1B;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAY;IAChC,OAAO,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;AAC5C,CAAC;AAID,MAAM,UAAU,uBAAuB,CAAC,QAAkB;IACtD,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QACjC,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAChC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAClD,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC7B,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SACpC;QACD,OAAO,QAAQ,CAAC;KACnB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAID,MAAM,UAAU,YAAY,CAAC,IAAY;IACrC,IAAI,IAAI,EAAE;QACN,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;KACzB;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare function convertDatareaderResultToObjectArray<T>(dataReaderResult: IDataReaderResult): Array<T>;
|
|
2
|
-
export interface IDataReaderColumn {
|
|
3
|
-
field?: string;
|
|
4
|
-
datatype?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface IDataReaderResult {
|
|
7
|
-
rows: Array<Array<any>>;
|
|
8
|
-
columns: Array<IDataReaderColumn>;
|
|
9
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export function convertDatareaderResultToObjectArray(dataReaderResult) {
|
|
2
|
-
const objects = new Array();
|
|
3
|
-
dataReaderResult.rows.forEach((row) => {
|
|
4
|
-
const object = {};
|
|
5
|
-
for (let index = 0; index < dataReaderResult.columns.length; index++) {
|
|
6
|
-
const column = dataReaderResult.columns[index];
|
|
7
|
-
if (column.datatype === "Date") {
|
|
8
|
-
const value = row[index];
|
|
9
|
-
if (value) {
|
|
10
|
-
object[column.field] = new Date(value);
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
object[column.field] = null;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
object[column.field] = row[index];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
objects.push(object);
|
|
21
|
-
});
|
|
22
|
-
return objects;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=readerResult.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readerResult.js","sourceRoot":"","sources":["../../../src/utilities/readerResult/readerResult.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,oCAAoC,CAAI,gBAAmC;IACvF,MAAM,OAAO,GAAG,IAAI,KAAK,EAAK,CAAC;IAE/B,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAe,EAAE,EAAE;QAC9C,MAAM,MAAM,GAAG,EAAO,CAAC;QACvB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAClE,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC/C,IAAI,MAAM,CAAC,QAAQ,KAAK,MAAM,EAAE;gBAC5B,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;gBACzB,IAAI,KAAK,EAAE;oBACP,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;iBAC1C;qBAAM;oBACH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;iBAC/B;aACJ;iBAAM;gBACH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;aACrC;SACJ;QACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACnB,CAAC"}
|