bruce-models 0.7.1 → 0.7.3
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/bruce-models.es5.js +182 -137
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +179 -129
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account.js +244 -244
- package/dist/lib/ann-document/ann-document.js +116 -116
- package/dist/lib/api/abstract-api.js +267 -267
- package/dist/lib/api/api.js +85 -85
- package/dist/lib/api/api.js.map +1 -1
- package/dist/lib/api/bruce-api.js +202 -202
- package/dist/lib/api/cam-api.js +132 -132
- package/dist/lib/api/global-api.js +131 -131
- package/dist/lib/api/idm-api.js +132 -132
- package/dist/lib/bruce-models.js +83 -83
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/calculator/calculator.js +158 -158
- package/dist/lib/client-file/client-file.js +188 -188
- package/dist/lib/common/bounds.js +2 -2
- package/dist/lib/common/bruce-event.js +48 -48
- package/dist/lib/common/bruce-variable.js +54 -54
- package/dist/lib/common/cache.js +86 -86
- package/dist/lib/common/camera.js +11 -11
- package/dist/lib/common/cartes.js +55 -55
- package/dist/lib/common/carto.js +60 -60
- package/dist/lib/common/color.js +86 -86
- package/dist/lib/common/delay-queue.js +60 -60
- package/dist/lib/common/dictionary.js +2 -2
- package/dist/lib/common/geometry.js +120 -120
- package/dist/lib/common/transform.js +2 -2
- package/dist/lib/common/utc.js +39 -39
- package/dist/lib/custom-form/custom-form.js +136 -136
- package/dist/lib/data-lab/data-lab.js +90 -90
- package/dist/lib/entity/entity-attachment-type.js +132 -132
- package/dist/lib/entity/entity-attachment.js +208 -208
- package/dist/lib/entity/entity-comment.js +132 -132
- package/dist/lib/entity/entity-coords.js +182 -0
- package/dist/lib/entity/entity-coords.js.map +1 -0
- package/dist/lib/entity/entity-link.js +132 -132
- package/dist/lib/entity/entity-lod.js +189 -189
- package/dist/lib/entity/entity-relation-type.js +150 -150
- package/dist/lib/entity/entity-relation.js +189 -189
- package/dist/lib/entity/entity-source.js +176 -176
- package/dist/lib/entity/entity-tag.js +229 -229
- package/dist/lib/entity/entity-type.js +163 -163
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +349 -349
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/entity/getters/batched-data-getter.js +91 -91
- package/dist/lib/entity/getters/entity-filter-getter.js +344 -344
- package/dist/lib/entity/getters/entity-globe.js +135 -135
- package/dist/lib/entity/getters/view-monitor.js +2 -2
- package/dist/lib/import/import-cad.js +82 -82
- package/dist/lib/import/import-csv.js +51 -51
- package/dist/lib/import/import-json.js +51 -51
- package/dist/lib/import/import-kml.js +51 -51
- package/dist/lib/import/imported-file.js +121 -121
- package/dist/lib/markup/markup.js +40 -40
- package/dist/lib/program-key/program-key.js +152 -152
- package/dist/lib/project/menu-item.js +115 -115
- package/dist/lib/project/project-view-bookmark.js +172 -172
- package/dist/lib/project/project-view-tile-source.js +115 -115
- package/dist/lib/project/project-view.js +166 -166
- package/dist/lib/project/zoom-control.js +17 -17
- package/dist/lib/server/pending-action.js +106 -106
- package/dist/lib/server/task.js +113 -113
- package/dist/lib/style/style.js +152 -152
- package/dist/lib/tileset/tileset-cad.js +2 -2
- package/dist/lib/tileset/tileset-entities-map-tiles.js +18 -18
- package/dist/lib/tileset/tileset-entities.js +2 -2
- package/dist/lib/tileset/tileset-ext-map-tiles.js +17 -17
- package/dist/lib/tileset/tileset-ext-terrain-tiles.js +2 -2
- package/dist/lib/tileset/tileset-map-tiles.js +2 -2
- package/dist/lib/tileset/tileset-pointcloud.js +2 -2
- package/dist/lib/tileset/tileset-terrain-tiles.js +2 -2
- package/dist/lib/tileset/tileset.js +403 -403
- package/dist/lib/user/permission.js +20 -20
- package/dist/lib/user/session.js +160 -160
- package/dist/lib/user/user-group.js +139 -139
- package/dist/lib/user/user.js +451 -451
- package/dist/lib/util/encrypt-utils.js +20 -20
- package/dist/lib/util/math-utils.js +41 -41
- package/dist/lib/util/object-utils.js +17 -17
- package/dist/lib/util/path-utils.js +61 -61
- package/dist/lib/util/url-utils.js +107 -107
- package/dist/types/api/api.d.ts +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/common/transform.d.ts +3 -0
- package/dist/types/entity/entity-coords.d.ts +37 -0
- package/dist/types/entity/entity-type.d.ts +1 -0
- package/dist/types/entity/entity.d.ts +1 -1
- package/package.json +1 -1
- package/dist/lib/ucs/ucs.js +0 -136
- package/dist/lib/ucs/ucs.js.map +0 -1
- package/dist/types/ucs/ucs.d.ts +0 -30
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.ProjectView = void 0;
|
|
40
|
-
var api_1 = require("../api/api");
|
|
41
|
-
var object_utils_1 = require("../util/object-utils");
|
|
42
|
-
/**
|
|
43
|
-
* Describes the "Project View" concept within Bruce.
|
|
44
|
-
* A project view is a collection of settings for a visualization application we support.
|
|
45
|
-
* It will describe what panels to show and how, it will also describe all possible ways data can be displayed.
|
|
46
|
-
*/
|
|
47
|
-
var ProjectView;
|
|
48
|
-
(function (ProjectView) {
|
|
49
|
-
function GetCacheKey(viewId) {
|
|
50
|
-
return "" + api_1.Api.ECacheKey.ProjectView + api_1.Api.ECacheKey.Id + viewId;
|
|
51
|
-
}
|
|
52
|
-
ProjectView.GetCacheKey = GetCacheKey;
|
|
53
|
-
function GetListCacheKey() {
|
|
54
|
-
return api_1.Api.ECacheKey.ProjectView;
|
|
55
|
-
}
|
|
56
|
-
ProjectView.GetListCacheKey = GetListCacheKey;
|
|
57
|
-
function Get(api, viewId) {
|
|
58
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
59
|
-
var key, cacheData, req;
|
|
60
|
-
return __generator(this, function (_a) {
|
|
61
|
-
if (!viewId) {
|
|
62
|
-
throw ("View ID is required.");
|
|
63
|
-
}
|
|
64
|
-
key = GetCacheKey(viewId);
|
|
65
|
-
cacheData = api.Cache.Get(key);
|
|
66
|
-
if (cacheData) {
|
|
67
|
-
return [2 /*return*/, cacheData];
|
|
68
|
-
}
|
|
69
|
-
req = api.GET("ui.view/" + viewId, api_1.Api.PrepReqParams());
|
|
70
|
-
api.Cache.Set(key, req, api_1.Api.DEFAULT_CACHE_DURATION);
|
|
71
|
-
return [2 /*return*/, req];
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
ProjectView.Get = Get;
|
|
76
|
-
function GetList(api) {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
-
var cacheData, req;
|
|
79
|
-
var _this = this;
|
|
80
|
-
return __generator(this, function (_a) {
|
|
81
|
-
cacheData = api.Cache.Get(GetListCacheKey());
|
|
82
|
-
if (cacheData) {
|
|
83
|
-
return [2 /*return*/, cacheData];
|
|
84
|
-
}
|
|
85
|
-
req = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
|
|
86
|
-
var data, e_1;
|
|
87
|
-
return __generator(this, function (_a) {
|
|
88
|
-
switch (_a.label) {
|
|
89
|
-
case 0:
|
|
90
|
-
_a.trys.push([0, 2, , 3]);
|
|
91
|
-
return [4 /*yield*/, api.GET("ui.view/list", api_1.Api.PrepReqParams())];
|
|
92
|
-
case 1:
|
|
93
|
-
data = _a.sent();
|
|
94
|
-
res(data.Items);
|
|
95
|
-
return [3 /*break*/, 3];
|
|
96
|
-
case 2:
|
|
97
|
-
e_1 = _a.sent();
|
|
98
|
-
rej(e_1);
|
|
99
|
-
return [3 /*break*/, 3];
|
|
100
|
-
case 3: return [2 /*return*/];
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}); });
|
|
104
|
-
api.Cache.Set(GetListCacheKey(), req, api_1.Api.DEFAULT_CACHE_DURATION);
|
|
105
|
-
return [2 /*return*/, req];
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
ProjectView.GetList = GetList;
|
|
110
|
-
function Delete(api, viewId) {
|
|
111
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
-
return __generator(this, function (_a) {
|
|
113
|
-
switch (_a.label) {
|
|
114
|
-
case 0:
|
|
115
|
-
if (!viewId) {
|
|
116
|
-
throw ("View ID is required.");
|
|
117
|
-
}
|
|
118
|
-
return [4 /*yield*/, api.DELETE("ui.view/" + viewId, api_1.Api.PrepReqParams())];
|
|
119
|
-
case 1:
|
|
120
|
-
_a.sent();
|
|
121
|
-
api.Cache.Remove(GetCacheKey(viewId));
|
|
122
|
-
api.Cache.Remove(GetListCacheKey());
|
|
123
|
-
return [2 /*return*/];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
ProjectView.Delete = Delete;
|
|
129
|
-
function Update(api, data) {
|
|
130
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
-
var isNew;
|
|
132
|
-
return __generator(this, function (_a) {
|
|
133
|
-
switch (_a.label) {
|
|
134
|
-
case 0:
|
|
135
|
-
if (!data) {
|
|
136
|
-
data = {};
|
|
137
|
-
}
|
|
138
|
-
isNew = !data.ID;
|
|
139
|
-
if (!data.ID) {
|
|
140
|
-
data.ID = object_utils_1.ObjectUtils.UId();
|
|
141
|
-
}
|
|
142
|
-
if (!data.Name) {
|
|
143
|
-
data.Name = data.ID;
|
|
144
|
-
}
|
|
145
|
-
if (!data.CreatedByUIVersion) {
|
|
146
|
-
data.CreatedByUIVersion = "-1";
|
|
147
|
-
}
|
|
148
|
-
if (!isNew) return [3 /*break*/, 2];
|
|
149
|
-
return [4 /*yield*/, api.POST("ui.view/" + data.ID, data, api_1.Api.PrepReqParams())];
|
|
150
|
-
case 1:
|
|
151
|
-
data = _a.sent();
|
|
152
|
-
return [3 /*break*/, 4];
|
|
153
|
-
case 2: return [4 /*yield*/, api.PUT("ui.view/" + data.ID, data, api_1.Api.PrepReqParams())];
|
|
154
|
-
case 3:
|
|
155
|
-
data = _a.sent();
|
|
156
|
-
_a.label = 4;
|
|
157
|
-
case 4:
|
|
158
|
-
api.Cache.Remove(GetCacheKey(data.ID));
|
|
159
|
-
api.Cache.Remove(GetListCacheKey());
|
|
160
|
-
return [2 /*return*/, data];
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
ProjectView.Update = Update;
|
|
166
|
-
})(ProjectView = exports.ProjectView || (exports.ProjectView = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ProjectView = void 0;
|
|
40
|
+
var api_1 = require("../api/api");
|
|
41
|
+
var object_utils_1 = require("../util/object-utils");
|
|
42
|
+
/**
|
|
43
|
+
* Describes the "Project View" concept within Bruce.
|
|
44
|
+
* A project view is a collection of settings for a visualization application we support.
|
|
45
|
+
* It will describe what panels to show and how, it will also describe all possible ways data can be displayed.
|
|
46
|
+
*/
|
|
47
|
+
var ProjectView;
|
|
48
|
+
(function (ProjectView) {
|
|
49
|
+
function GetCacheKey(viewId) {
|
|
50
|
+
return "" + api_1.Api.ECacheKey.ProjectView + api_1.Api.ECacheKey.Id + viewId;
|
|
51
|
+
}
|
|
52
|
+
ProjectView.GetCacheKey = GetCacheKey;
|
|
53
|
+
function GetListCacheKey() {
|
|
54
|
+
return api_1.Api.ECacheKey.ProjectView;
|
|
55
|
+
}
|
|
56
|
+
ProjectView.GetListCacheKey = GetListCacheKey;
|
|
57
|
+
function Get(api, viewId) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
59
|
+
var key, cacheData, req;
|
|
60
|
+
return __generator(this, function (_a) {
|
|
61
|
+
if (!viewId) {
|
|
62
|
+
throw ("View ID is required.");
|
|
63
|
+
}
|
|
64
|
+
key = GetCacheKey(viewId);
|
|
65
|
+
cacheData = api.Cache.Get(key);
|
|
66
|
+
if (cacheData) {
|
|
67
|
+
return [2 /*return*/, cacheData];
|
|
68
|
+
}
|
|
69
|
+
req = api.GET("ui.view/" + viewId, api_1.Api.PrepReqParams());
|
|
70
|
+
api.Cache.Set(key, req, api_1.Api.DEFAULT_CACHE_DURATION);
|
|
71
|
+
return [2 /*return*/, req];
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
ProjectView.Get = Get;
|
|
76
|
+
function GetList(api) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
+
var cacheData, req;
|
|
79
|
+
var _this = this;
|
|
80
|
+
return __generator(this, function (_a) {
|
|
81
|
+
cacheData = api.Cache.Get(GetListCacheKey());
|
|
82
|
+
if (cacheData) {
|
|
83
|
+
return [2 /*return*/, cacheData];
|
|
84
|
+
}
|
|
85
|
+
req = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
|
|
86
|
+
var data, e_1;
|
|
87
|
+
return __generator(this, function (_a) {
|
|
88
|
+
switch (_a.label) {
|
|
89
|
+
case 0:
|
|
90
|
+
_a.trys.push([0, 2, , 3]);
|
|
91
|
+
return [4 /*yield*/, api.GET("ui.view/list", api_1.Api.PrepReqParams())];
|
|
92
|
+
case 1:
|
|
93
|
+
data = _a.sent();
|
|
94
|
+
res(data.Items);
|
|
95
|
+
return [3 /*break*/, 3];
|
|
96
|
+
case 2:
|
|
97
|
+
e_1 = _a.sent();
|
|
98
|
+
rej(e_1);
|
|
99
|
+
return [3 /*break*/, 3];
|
|
100
|
+
case 3: return [2 /*return*/];
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}); });
|
|
104
|
+
api.Cache.Set(GetListCacheKey(), req, api_1.Api.DEFAULT_CACHE_DURATION);
|
|
105
|
+
return [2 /*return*/, req];
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
ProjectView.GetList = GetList;
|
|
110
|
+
function Delete(api, viewId) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
switch (_a.label) {
|
|
114
|
+
case 0:
|
|
115
|
+
if (!viewId) {
|
|
116
|
+
throw ("View ID is required.");
|
|
117
|
+
}
|
|
118
|
+
return [4 /*yield*/, api.DELETE("ui.view/" + viewId, api_1.Api.PrepReqParams())];
|
|
119
|
+
case 1:
|
|
120
|
+
_a.sent();
|
|
121
|
+
api.Cache.Remove(GetCacheKey(viewId));
|
|
122
|
+
api.Cache.Remove(GetListCacheKey());
|
|
123
|
+
return [2 /*return*/];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
ProjectView.Delete = Delete;
|
|
129
|
+
function Update(api, data) {
|
|
130
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
+
var isNew;
|
|
132
|
+
return __generator(this, function (_a) {
|
|
133
|
+
switch (_a.label) {
|
|
134
|
+
case 0:
|
|
135
|
+
if (!data) {
|
|
136
|
+
data = {};
|
|
137
|
+
}
|
|
138
|
+
isNew = !data.ID;
|
|
139
|
+
if (!data.ID) {
|
|
140
|
+
data.ID = object_utils_1.ObjectUtils.UId();
|
|
141
|
+
}
|
|
142
|
+
if (!data.Name) {
|
|
143
|
+
data.Name = data.ID;
|
|
144
|
+
}
|
|
145
|
+
if (!data.CreatedByUIVersion) {
|
|
146
|
+
data.CreatedByUIVersion = "-1";
|
|
147
|
+
}
|
|
148
|
+
if (!isNew) return [3 /*break*/, 2];
|
|
149
|
+
return [4 /*yield*/, api.POST("ui.view/" + data.ID, data, api_1.Api.PrepReqParams())];
|
|
150
|
+
case 1:
|
|
151
|
+
data = _a.sent();
|
|
152
|
+
return [3 /*break*/, 4];
|
|
153
|
+
case 2: return [4 /*yield*/, api.PUT("ui.view/" + data.ID, data, api_1.Api.PrepReqParams())];
|
|
154
|
+
case 3:
|
|
155
|
+
data = _a.sent();
|
|
156
|
+
_a.label = 4;
|
|
157
|
+
case 4:
|
|
158
|
+
api.Cache.Remove(GetCacheKey(data.ID));
|
|
159
|
+
api.Cache.Remove(GetListCacheKey());
|
|
160
|
+
return [2 /*return*/, data];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
ProjectView.Update = Update;
|
|
166
|
+
})(ProjectView = exports.ProjectView || (exports.ProjectView = {}));
|
|
167
167
|
//# sourceMappingURL=project-view.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZoomControl = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Describes an expectation on what should be rendered for a menu item-
|
|
6
|
-
* between a min-max distance of an entity to the camera.
|
|
7
|
-
*/
|
|
8
|
-
var ZoomControl;
|
|
9
|
-
(function (ZoomControl) {
|
|
10
|
-
var EDisplayType;
|
|
11
|
-
(function (EDisplayType) {
|
|
12
|
-
EDisplayType["Hidden"] = "hidden";
|
|
13
|
-
EDisplayType["Point"] = "point";
|
|
14
|
-
EDisplayType["Geometry"] = "geometry";
|
|
15
|
-
EDisplayType["Model3D"] = "3d";
|
|
16
|
-
})(EDisplayType = ZoomControl.EDisplayType || (ZoomControl.EDisplayType = {}));
|
|
17
|
-
})(ZoomControl = exports.ZoomControl || (exports.ZoomControl = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZoomControl = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Describes an expectation on what should be rendered for a menu item-
|
|
6
|
+
* between a min-max distance of an entity to the camera.
|
|
7
|
+
*/
|
|
8
|
+
var ZoomControl;
|
|
9
|
+
(function (ZoomControl) {
|
|
10
|
+
var EDisplayType;
|
|
11
|
+
(function (EDisplayType) {
|
|
12
|
+
EDisplayType["Hidden"] = "hidden";
|
|
13
|
+
EDisplayType["Point"] = "point";
|
|
14
|
+
EDisplayType["Geometry"] = "geometry";
|
|
15
|
+
EDisplayType["Model3D"] = "3d";
|
|
16
|
+
})(EDisplayType = ZoomControl.EDisplayType || (ZoomControl.EDisplayType = {}));
|
|
17
|
+
})(ZoomControl = exports.ZoomControl || (exports.ZoomControl = {}));
|
|
18
18
|
//# sourceMappingURL=zoom-control.js.map
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.PendingAction = void 0;
|
|
40
|
-
var api_1 = require("../api/api");
|
|
41
|
-
/**
|
|
42
|
-
* Describes the "Pending Action" concept within Bruce.
|
|
43
|
-
* A pending action is a record of a server-side background process.
|
|
44
|
-
* This record is used to monitor its progress and completion state.
|
|
45
|
-
*/
|
|
46
|
-
var PendingAction;
|
|
47
|
-
(function (PendingAction) {
|
|
48
|
-
var EStatus;
|
|
49
|
-
(function (EStatus) {
|
|
50
|
-
EStatus["InProgress"] = "IN_PROGRESS";
|
|
51
|
-
EStatus["Cancelled"] = "CANCELLED";
|
|
52
|
-
EStatus["Complete"] = "COMPLETE";
|
|
53
|
-
EStatus["Failed"] = "FAILED";
|
|
54
|
-
})(EStatus = PendingAction.EStatus || (PendingAction.EStatus = {}));
|
|
55
|
-
function Get(api, actionId) {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
57
|
-
return __generator(this, function (_a) {
|
|
58
|
-
if (!actionId) {
|
|
59
|
-
throw ("Action ID is required.");
|
|
60
|
-
}
|
|
61
|
-
return [2 /*return*/, api.GET("pendingAction/" + actionId, api_1.Api.PrepReqParams())];
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
PendingAction.Get = Get;
|
|
66
|
-
function GetRelevantList(api, stricter) {
|
|
67
|
-
if (stricter === void 0) { stricter = false; }
|
|
68
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
-
var data;
|
|
70
|
-
return __generator(this, function (_a) {
|
|
71
|
-
switch (_a.label) {
|
|
72
|
-
case 0: return [4 /*yield*/, api.GET("pendingActions/important?Update=" + stricter, api_1.Api.PrepReqParams())];
|
|
73
|
-
case 1:
|
|
74
|
-
data = _a.sent();
|
|
75
|
-
return [2 /*return*/, data.Items];
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
PendingAction.GetRelevantList = GetRelevantList;
|
|
81
|
-
function GetMessages(api, actionId, order, startIndex, amount) {
|
|
82
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var args, data;
|
|
84
|
-
return __generator(this, function (_a) {
|
|
85
|
-
switch (_a.label) {
|
|
86
|
-
case 0:
|
|
87
|
-
if (amount == null) {
|
|
88
|
-
amount = 500;
|
|
89
|
-
}
|
|
90
|
-
if (startIndex == null) {
|
|
91
|
-
startIndex = 0;
|
|
92
|
-
}
|
|
93
|
-
if (order == null) {
|
|
94
|
-
order = api_1.Api.ESortOrder.Asc;
|
|
95
|
-
}
|
|
96
|
-
args = "?SortOrder=" + (order == api_1.Api.ESortOrder.Desc ? "DESC" : "ASC") + "&PageSize=" + amount + "&PageIndex=" + startIndex;
|
|
97
|
-
return [4 /*yield*/, api.GET("pendingAction/" + actionId + "/progressMessages" + args, api_1.Api.PrepReqParams())];
|
|
98
|
-
case 1:
|
|
99
|
-
data = _a.sent();
|
|
100
|
-
return [2 /*return*/, data.Items];
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
PendingAction.GetMessages = GetMessages;
|
|
106
|
-
})(PendingAction = exports.PendingAction || (exports.PendingAction = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.PendingAction = void 0;
|
|
40
|
+
var api_1 = require("../api/api");
|
|
41
|
+
/**
|
|
42
|
+
* Describes the "Pending Action" concept within Bruce.
|
|
43
|
+
* A pending action is a record of a server-side background process.
|
|
44
|
+
* This record is used to monitor its progress and completion state.
|
|
45
|
+
*/
|
|
46
|
+
var PendingAction;
|
|
47
|
+
(function (PendingAction) {
|
|
48
|
+
var EStatus;
|
|
49
|
+
(function (EStatus) {
|
|
50
|
+
EStatus["InProgress"] = "IN_PROGRESS";
|
|
51
|
+
EStatus["Cancelled"] = "CANCELLED";
|
|
52
|
+
EStatus["Complete"] = "COMPLETE";
|
|
53
|
+
EStatus["Failed"] = "FAILED";
|
|
54
|
+
})(EStatus = PendingAction.EStatus || (PendingAction.EStatus = {}));
|
|
55
|
+
function Get(api, actionId) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
57
|
+
return __generator(this, function (_a) {
|
|
58
|
+
if (!actionId) {
|
|
59
|
+
throw ("Action ID is required.");
|
|
60
|
+
}
|
|
61
|
+
return [2 /*return*/, api.GET("pendingAction/" + actionId, api_1.Api.PrepReqParams())];
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
PendingAction.Get = Get;
|
|
66
|
+
function GetRelevantList(api, stricter) {
|
|
67
|
+
if (stricter === void 0) { stricter = false; }
|
|
68
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
+
var data;
|
|
70
|
+
return __generator(this, function (_a) {
|
|
71
|
+
switch (_a.label) {
|
|
72
|
+
case 0: return [4 /*yield*/, api.GET("pendingActions/important?Update=" + stricter, api_1.Api.PrepReqParams())];
|
|
73
|
+
case 1:
|
|
74
|
+
data = _a.sent();
|
|
75
|
+
return [2 /*return*/, data.Items];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
PendingAction.GetRelevantList = GetRelevantList;
|
|
81
|
+
function GetMessages(api, actionId, order, startIndex, amount) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var args, data;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (amount == null) {
|
|
88
|
+
amount = 500;
|
|
89
|
+
}
|
|
90
|
+
if (startIndex == null) {
|
|
91
|
+
startIndex = 0;
|
|
92
|
+
}
|
|
93
|
+
if (order == null) {
|
|
94
|
+
order = api_1.Api.ESortOrder.Asc;
|
|
95
|
+
}
|
|
96
|
+
args = "?SortOrder=" + (order == api_1.Api.ESortOrder.Desc ? "DESC" : "ASC") + "&PageSize=" + amount + "&PageIndex=" + startIndex;
|
|
97
|
+
return [4 /*yield*/, api.GET("pendingAction/" + actionId + "/progressMessages" + args, api_1.Api.PrepReqParams())];
|
|
98
|
+
case 1:
|
|
99
|
+
data = _a.sent();
|
|
100
|
+
return [2 /*return*/, data.Items];
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
PendingAction.GetMessages = GetMessages;
|
|
106
|
+
})(PendingAction = exports.PendingAction || (exports.PendingAction = {}));
|
|
107
107
|
//# sourceMappingURL=pending-action.js.map
|