vasat-gms-sdk 1.0.1 → 1.0.2
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/gms-sdk.cesium.es.js +32 -0
- package/gms-sdk.cesium.umd.js +1 -0
- package/gms-sdk.es.js +43 -74
- package/gms-sdk.umd.js +1 -1
- package/package.json +22 -2
- package/types/cesium.lib.d.ts +1 -0
- package/types/umd.lib.d.ts +0 -1
- /package/{gms-sdk.css → gms-sdk.cesium.css} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createElementBlock as e, defineComponent as t, onBeforeUnmount as n, onMounted as r, openBlock as i, ref as a } from "vue";
|
|
2
|
+
import { Cartesian3 as o, Viewer as s } from "cesium";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/CesiumMap.vue
|
|
5
|
+
var c = /*#__PURE__*/ ((e, t) => {
|
|
6
|
+
let n = e.__vccOpts || e;
|
|
7
|
+
for (let [e, r] of t) n[e] = r;
|
|
8
|
+
return n;
|
|
9
|
+
})(/* @__PURE__ */ t({
|
|
10
|
+
__name: "CesiumMap",
|
|
11
|
+
setup(t) {
|
|
12
|
+
let c = a(null), l = null;
|
|
13
|
+
return r(() => {
|
|
14
|
+
c.value && (l = new s(c.value, {
|
|
15
|
+
animation: !1,
|
|
16
|
+
timeline: !1,
|
|
17
|
+
baseLayerPicker: !1,
|
|
18
|
+
navigationHelpButton: !1,
|
|
19
|
+
geocoder: !1,
|
|
20
|
+
homeButton: !1
|
|
21
|
+
}), l.camera.setView({ destination: o.fromDegrees(12.4964, 41.9028, 2500) }));
|
|
22
|
+
}), n(() => {
|
|
23
|
+
l &&= (l.destroy(), null);
|
|
24
|
+
}), (t, n) => (i(), e("div", {
|
|
25
|
+
ref_key: "cesiumContainer",
|
|
26
|
+
ref: c,
|
|
27
|
+
class: "cesium-container"
|
|
28
|
+
}, null, 512));
|
|
29
|
+
}
|
|
30
|
+
}), [["__scopeId", "data-v-1be03b11"]]);
|
|
31
|
+
//#endregion
|
|
32
|
+
export { c as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t(require("vue"),require("cesium")):typeof define==`function`&&define.amd?define([`vue`,`cesium`],t):(e=typeof globalThis<`u`?globalThis:e||self,e.GMSCesium=t(e.Vue,e.Cesium))})(this,function(e,t){return((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,e.defineComponent)({__name:`CesiumMap`,setup(n){let r=(0,e.ref)(null),i=null;return(0,e.onMounted)(()=>{r.value&&(i=new t.Viewer(r.value,{animation:!1,timeline:!1,baseLayerPicker:!1,navigationHelpButton:!1,geocoder:!1,homeButton:!1}),i.camera.setView({destination:t.Cartesian3.fromDegrees(12.4964,41.9028,2500)}))}),(0,e.onBeforeUnmount)(()=>{i&&=(i.destroy(),null)}),(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{ref_key:`cesiumContainer`,ref:r,class:`cesium-container`},null,512))}}),[[`__scopeId`,`data-v-1be03b11`]])});
|
package/gms-sdk.es.js
CHANGED
|
@@ -1,38 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { BehaviorSubject as u, Subject as d, forkJoin as f, map as p, tap as m } from "rxjs";
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/CesiumMap.vue
|
|
7
|
-
var h = /*#__PURE__*/ ((e, t) => {
|
|
8
|
-
let n = e.__vccOpts || e;
|
|
9
|
-
for (let [e, r] of t) n[e] = r;
|
|
10
|
-
return n;
|
|
11
|
-
})(/* @__PURE__ */ t({
|
|
12
|
-
__name: "CesiumMap",
|
|
13
|
-
setup(t) {
|
|
14
|
-
let c = a(null), l = null;
|
|
15
|
-
return r(() => {
|
|
16
|
-
c.value && (l = new s(c.value, {
|
|
17
|
-
animation: !1,
|
|
18
|
-
timeline: !1,
|
|
19
|
-
baseLayerPicker: !1,
|
|
20
|
-
navigationHelpButton: !1,
|
|
21
|
-
geocoder: !1,
|
|
22
|
-
homeButton: !1
|
|
23
|
-
}), l.camera.setView({ destination: o.fromDegrees(12.4964, 41.9028, 2500) }));
|
|
24
|
-
}), n(() => {
|
|
25
|
-
l &&= (l.destroy(), null);
|
|
26
|
-
}), (t, n) => (i(), e("div", {
|
|
27
|
-
ref_key: "cesiumContainer",
|
|
28
|
-
ref: c,
|
|
29
|
-
class: "cesium-container"
|
|
30
|
-
}, null, 512));
|
|
31
|
-
}
|
|
32
|
-
}), [["__scopeId", "data-v-1be03b11"]]);
|
|
33
|
-
//#endregion
|
|
1
|
+
import { AsClass as e, VasatModel as t } from "vasat";
|
|
2
|
+
import { BehaviorSubject as n, Subject as r, forkJoin as i, map as a, tap as o } from "rxjs";
|
|
3
|
+
import "vue";
|
|
34
4
|
//#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorate.js
|
|
35
|
-
function
|
|
5
|
+
function s(e, t, n, r) {
|
|
36
6
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
37
7
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
38
8
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
@@ -40,7 +10,7 @@ function g(e, t, n, r) {
|
|
|
40
10
|
}
|
|
41
11
|
//#endregion
|
|
42
12
|
//#region src/models/gms.ts
|
|
43
|
-
var
|
|
13
|
+
var c = [
|
|
44
14
|
"queued",
|
|
45
15
|
"plucked",
|
|
46
16
|
"fetching",
|
|
@@ -49,7 +19,7 @@ var _ = [
|
|
|
49
19
|
"failed",
|
|
50
20
|
"reforge",
|
|
51
21
|
"cancel"
|
|
52
|
-
],
|
|
22
|
+
], l = class extends t {
|
|
53
23
|
firstName;
|
|
54
24
|
lastName;
|
|
55
25
|
email;
|
|
@@ -59,7 +29,7 @@ var _ = [
|
|
|
59
29
|
constructor(e) {
|
|
60
30
|
super(e, "User");
|
|
61
31
|
}
|
|
62
|
-
},
|
|
32
|
+
}, u = class extends t {
|
|
63
33
|
subtitle;
|
|
64
34
|
uiSettings;
|
|
65
35
|
constructor(e) {
|
|
@@ -68,14 +38,14 @@ var _ = [
|
|
|
68
38
|
isOwner() {
|
|
69
39
|
return this.acl?.indexOf("*") != -1;
|
|
70
40
|
}
|
|
71
|
-
},
|
|
41
|
+
}, d = class extends t {
|
|
72
42
|
metaFields = [];
|
|
73
43
|
fileExtensions;
|
|
74
44
|
jobs;
|
|
75
45
|
constructor(e) {
|
|
76
46
|
super(e, "FileType");
|
|
77
47
|
}
|
|
78
|
-
},
|
|
48
|
+
}, f = class extends t {
|
|
79
49
|
parent;
|
|
80
50
|
account;
|
|
81
51
|
startDate;
|
|
@@ -93,8 +63,8 @@ var _ = [
|
|
|
93
63
|
super(e, "Folder");
|
|
94
64
|
}
|
|
95
65
|
};
|
|
96
|
-
|
|
97
|
-
var
|
|
66
|
+
s([e(f)], f.prototype, "parent", void 0), s([e(u)], f.prototype, "account", void 0), s([e(d)], f.prototype, "folderType", void 0);
|
|
67
|
+
var p = class extends t {
|
|
98
68
|
description;
|
|
99
69
|
fileType;
|
|
100
70
|
bounds;
|
|
@@ -117,8 +87,8 @@ var S = class extends l {
|
|
|
117
87
|
super(e, "Fileset");
|
|
118
88
|
}
|
|
119
89
|
};
|
|
120
|
-
|
|
121
|
-
var
|
|
90
|
+
s([e(d)], p.prototype, "fileType", void 0), s([e(f)], p.prototype, "folder", void 0);
|
|
91
|
+
var m = class extends t {
|
|
122
92
|
description;
|
|
123
93
|
referenceFile;
|
|
124
94
|
notes;
|
|
@@ -138,8 +108,8 @@ var C = class extends l {
|
|
|
138
108
|
super(e, "VectorData");
|
|
139
109
|
}
|
|
140
110
|
};
|
|
141
|
-
|
|
142
|
-
var
|
|
111
|
+
s([e(p)], m.prototype, "fileset", void 0);
|
|
112
|
+
var h = class extends t {
|
|
143
113
|
_modelPath = "/processing/api/v2";
|
|
144
114
|
status;
|
|
145
115
|
tag;
|
|
@@ -152,7 +122,7 @@ var w = class extends l {
|
|
|
152
122
|
constructor(e) {
|
|
153
123
|
super(e, "JobConfig");
|
|
154
124
|
}
|
|
155
|
-
},
|
|
125
|
+
}, g = class extends t {
|
|
156
126
|
_modelPath = "/processing/api/v2";
|
|
157
127
|
status;
|
|
158
128
|
account;
|
|
@@ -172,36 +142,36 @@ var w = class extends l {
|
|
|
172
142
|
super(e, "Job");
|
|
173
143
|
}
|
|
174
144
|
};
|
|
175
|
-
|
|
145
|
+
s([e(h)], g.prototype, "config", void 0);
|
|
176
146
|
//#endregion
|
|
177
147
|
//#region src/service/gms-sdk-service.ts
|
|
178
|
-
var
|
|
148
|
+
var _ = 5e3, v = 6e4, y = class {
|
|
179
149
|
vasat;
|
|
180
|
-
jobs = new
|
|
181
|
-
jobChange = new
|
|
182
|
-
fileTypes = new
|
|
183
|
-
jobTypes = new
|
|
150
|
+
jobs = new n([]);
|
|
151
|
+
jobChange = new r();
|
|
152
|
+
fileTypes = new n([]);
|
|
153
|
+
jobTypes = new n([]);
|
|
184
154
|
pollHandle;
|
|
185
155
|
constructor(e) {
|
|
186
|
-
this.vasat = e, this.pollHandle = setInterval(() => this.refreshJobs().subscribe(),
|
|
156
|
+
this.vasat = e, this.pollHandle = setInterval(() => this.refreshJobs().subscribe(), _);
|
|
187
157
|
}
|
|
188
158
|
init() {
|
|
189
|
-
return
|
|
159
|
+
return i([this.vasat.searchByObject(d).useCache(!0).limit(9999).query().pipe(o((e) => this.fileTypes.next(e.items))), this.vasat.searchByObject(h).useCache(!0).limit(9999).query().pipe(o((e) => this.jobTypes.next(e.items)))]);
|
|
190
160
|
}
|
|
191
161
|
refreshJobs() {
|
|
192
|
-
let e = { or: [{ status: { in:
|
|
193
|
-
return this.vasat.searchByObject(
|
|
162
|
+
let e = { or: [{ status: { in: c } }, { and: [{ status: { eq: "finished" } }, { dateUpdated: { gt: Date.now() - v } }] }] };
|
|
163
|
+
return this.vasat.searchByObject(g).complexQuery(e).query().pipe(o((e) => {
|
|
194
164
|
let t = e.items.filter((e) => {
|
|
195
165
|
let t = this.jobs.value.find((t) => t.id == e.id);
|
|
196
166
|
return !t || t.status != e.status;
|
|
197
167
|
});
|
|
198
168
|
this.jobs.next(e.items), t.forEach((e) => this.jobChange.next(e));
|
|
199
|
-
}),
|
|
169
|
+
}), a((e) => e.items));
|
|
200
170
|
}
|
|
201
171
|
destroy() {
|
|
202
172
|
this.pollHandle && clearInterval(this.pollHandle);
|
|
203
173
|
}
|
|
204
|
-
},
|
|
174
|
+
}, b = class {
|
|
205
175
|
_service = void 0;
|
|
206
176
|
_credentials = {};
|
|
207
177
|
get service() {
|
|
@@ -217,22 +187,21 @@ var E = 5e3, D = 6e4, O = class {
|
|
|
217
187
|
return this._credentials[e];
|
|
218
188
|
}
|
|
219
189
|
initService(e) {
|
|
220
|
-
return this._service = new
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
Fileset:
|
|
224
|
-
Folder:
|
|
225
|
-
Account:
|
|
226
|
-
VectorData:
|
|
227
|
-
JobConfig:
|
|
228
|
-
Job:
|
|
229
|
-
GMSSDKService:
|
|
190
|
+
return this._service = new y(e), this._service;
|
|
191
|
+
}
|
|
192
|
+
}, x = new b(), S = {
|
|
193
|
+
Fileset: p,
|
|
194
|
+
Folder: f,
|
|
195
|
+
Account: u,
|
|
196
|
+
VectorData: m,
|
|
197
|
+
JobConfig: h,
|
|
198
|
+
Job: g,
|
|
199
|
+
GMSSDKService: y,
|
|
230
200
|
serviceProvider: new class {
|
|
231
|
-
currentConfig = new
|
|
232
|
-
currentScope = new
|
|
233
|
-
messages = new
|
|
234
|
-
}()
|
|
235
|
-
cesiumView: h
|
|
201
|
+
currentConfig = new n(void 0);
|
|
202
|
+
currentScope = new n(void 0);
|
|
203
|
+
messages = new r();
|
|
204
|
+
}()
|
|
236
205
|
};
|
|
237
206
|
//#endregion
|
|
238
|
-
export {
|
|
207
|
+
export { u as Account, d as FileType, p as Fileset, f as Folder, y as GMSSDKService, c as JOB_STATUSES, g as Job, h as JobConfig, b as ServiceProvider, l as User, m as VectorData, S as default, x as serviceProvider };
|
package/gms-sdk.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vasat"),require("rxjs"),require("vue")):typeof define==`function`&&define.amd?define([`exports`,`vasat`,`rxjs`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.GMS={},e.V,e.rxjs,e.Vue))})(this,function(e,t,n,r){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});function i(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var a=[`queued`,`plucked`,`fetching`,`processing`,`writing`,`failed`,`reforge`,`cancel`],o=class extends t.VasatModel{firstName;lastName;email;jobTitle;invited;uiSettings;constructor(e){super(e,`User`)}},s=class extends t.VasatModel{subtitle;uiSettings;constructor(e){super(e,`Account`)}isOwner(){return this.acl?.indexOf(`*`)!=-1}},c=class extends t.VasatModel{metaFields=[];fileExtensions;jobs;constructor(e){super(e,`FileType`)}},l=class extends t.VasatModel{parent;account;startDate;endDate;folderType;gmsSettings;bounds;geom;mode;icon;deleted;seq;meta;constructor(e){super(e,`Folder`)}};i([(0,t.AsClass)(l)],l.prototype,`parent`,void 0),i([(0,t.AsClass)(s)],l.prototype,`account`,void 0),i([(0,t.AsClass)(c)],l.prototype,`folderType`,void 0);var u=class extends t.VasatModel{description;fileType;bounds;folder;gmsSettings;fields;config;status;dateCollected;progress;primaryFile;errors;storagePath;deleted;seq;startDate;endDate;fileSize;constructor(e){super(e,`Fileset`)}};i([(0,t.AsClass)(c)],u.prototype,`fileType`,void 0),i([(0,t.AsClass)(l)],u.prototype,`folder`,void 0);var d=class extends t.VasatModel{description;referenceFile;notes;geom;category;fileset;dateCollected;vectorType;geomType;area;gmsSettings;meta;seq;startDate;endDate;constructor(e){super(e,`VectorData`)}};i([(0,t.AsClass)(u)],d.prototype,`fileset`,void 0);var f=class extends t.VasatModel{_modelPath=`/processing/api/v2`;status;tag;jobType;fields;commands;config;preZippedFile;gmsSettings;constructor(e){super(e,`JobConfig`)}},p=class extends t.VasatModel{_modelPath=`/processing/api/v2`;status;account;folder;fileset;config;notifications;inputFiles;meta;timeStarted;timeStopped;tag;progress;errors;target;constructor(e){super(e,`Job`)}};i([(0,t.AsClass)(f)],p.prototype,`config`,void 0);var m=5e3,h=6e4,g=class{vasat;jobs=new n.BehaviorSubject([]);jobChange=new n.Subject;fileTypes=new n.BehaviorSubject([]);jobTypes=new n.BehaviorSubject([]);pollHandle;constructor(e){this.vasat=e,this.pollHandle=setInterval(()=>this.refreshJobs().subscribe(),m)}init(){return(0,n.forkJoin)([this.vasat.searchByObject(c).useCache(!0).limit(9999).query().pipe((0,n.tap)(e=>this.fileTypes.next(e.items))),this.vasat.searchByObject(f).useCache(!0).limit(9999).query().pipe((0,n.tap)(e=>this.jobTypes.next(e.items)))])}refreshJobs(){let e={or:[{status:{in:a}},{and:[{status:{eq:`finished`}},{dateUpdated:{gt:Date.now()-h}}]}]};return this.vasat.searchByObject(p).complexQuery(e).query().pipe((0,n.tap)(e=>{let t=e.items.filter(e=>{let t=this.jobs.value.find(t=>t.id==e.id);return!t||t.status!=e.status});this.jobs.next(e.items),t.forEach(e=>this.jobChange.next(e))}),(0,n.map)(e=>e.items))}destroy(){this.pollHandle&&clearInterval(this.pollHandle)}},_=class{_service=void 0;_credentials={};get service(){return this._service}registerService(e){this._service=e}registerCredential(e,t){this._credentials[e]=t}getCredential(e){return this._credentials[e]}initService(e){return this._service=new g(e),this._service}},v=new _,y={Fileset:u,Folder:l,Account:s,VectorData:d,JobConfig:f,Job:p,GMSSDKService:g,serviceProvider:new class{currentConfig=new n.BehaviorSubject(void 0);currentScope=new n.BehaviorSubject(void 0);messages=new n.Subject}};e.Account=s,e.FileType=c,e.Fileset=u,e.Folder=l,e.GMSSDKService=g,e.JOB_STATUSES=a,e.Job=p,e.JobConfig=f,e.ServiceProvider=_,e.User=o,e.VectorData=d,e.default=y,e.serviceProvider=v});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vasat-gms-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "GMS SDK to access GMS components",
|
|
6
6
|
"homepage": "https://vasat.io/gms",
|
|
@@ -9,7 +9,19 @@
|
|
|
9
9
|
"url": "git@gitlab.correllink.com:gms/gms-sdk.git"
|
|
10
10
|
},
|
|
11
11
|
"module": "gms-sdk.es.js",
|
|
12
|
-
"types": "
|
|
12
|
+
"types": "./types/umd.lib.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./types/umd.lib.d.ts",
|
|
16
|
+
"import": "./gms-sdk.es.js",
|
|
17
|
+
"require": "./gms-sdk.umd.js"
|
|
18
|
+
},
|
|
19
|
+
"./cesium": {
|
|
20
|
+
"types": "./types/cesium.lib.d.ts",
|
|
21
|
+
"import": "./gms-sdk.cesium.es.js",
|
|
22
|
+
"require": "./gms-sdk.cesium.umd.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
13
25
|
"author": {
|
|
14
26
|
"name": "CorrelLink",
|
|
15
27
|
"email": "dev@correllink.com"
|
|
@@ -21,5 +33,13 @@
|
|
|
21
33
|
"rxjs": "^7.8.2",
|
|
22
34
|
"vasat": "^3.6.2",
|
|
23
35
|
"vue": "^3.5.40"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"cesium": "^1.143.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"cesium": {
|
|
42
|
+
"optional": true
|
|
43
|
+
}
|
|
24
44
|
}
|
|
25
45
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CesiumMap.vue';
|
package/types/umd.lib.d.ts
CHANGED
|
@@ -11,6 +11,5 @@ declare const _default: {
|
|
|
11
11
|
Job: typeof Job;
|
|
12
12
|
GMSSDKService: typeof GMSSDKService;
|
|
13
13
|
serviceProvider: import("vasat-vibe/src/service-provider").VasatEmitter;
|
|
14
|
-
cesiumView: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
14
|
};
|
|
16
15
|
export default _default;
|
|
File without changes
|