bruce-cesium 7.1.0 → 7.1.1
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-cesium.es5.js +1767 -131
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +1878 -245
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +3 -1
- package/dist/lib/bruce-cesium.js.map +1 -1
- package/dist/lib/widgets/tabs-left-panel/widget-left-panel-tab-bookmarks.js +427 -63
- package/dist/lib/widgets/tabs-left-panel/widget-left-panel-tab-bookmarks.js.map +1 -1
- package/dist/lib/widgets/tabs-left-panel/widget-left-panel-tab-dashboard.js +507 -0
- package/dist/lib/widgets/tabs-left-panel/widget-left-panel-tab-dashboard.js.map +1 -0
- package/dist/lib/widgets/tabs-left-panel/widget-left-panel-tab-menu-items.js +704 -0
- package/dist/lib/widgets/tabs-left-panel/widget-left-panel-tab-menu-items.js.map +1 -0
- package/dist/lib/widgets/widget-bookmarks.js +9 -7
- package/dist/lib/widgets/widget-bookmarks.js.map +1 -1
- package/dist/lib/widgets/widget-info-view.js +68 -40
- package/dist/lib/widgets/widget-info-view.js.map +1 -1
- package/dist/lib/widgets/widget-left-panel.js +65 -18
- package/dist/lib/widgets/widget-left-panel.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +3 -1
- package/dist/types/widgets/tabs-left-panel/widget-left-panel-tab-bookmarks.d.ts +14 -0
- package/dist/types/widgets/tabs-left-panel/widget-left-panel-tab-dashboard.d.ts +44 -0
- package/dist/types/widgets/tabs-left-panel/widget-left-panel-tab-menu-items.d.ts +64 -0
- package/dist/types/widgets/widget-left-panel.d.ts +10 -2
- package/package.json +1 -1
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -23942,15 +23942,31 @@
|
|
|
23942
23942
|
WidgetLeftPanelTab.ATab = ATab;
|
|
23943
23943
|
})(exports.WidgetLeftPanelTab || (exports.WidgetLeftPanelTab = {}));
|
|
23944
23944
|
|
|
23945
|
+
// Icons are inline so the library stays dependency free.
|
|
23946
|
+
const ICON_FOLDER = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 6C3 5.44772 3.44772 5 4 5H9L11 7.5H20C20.5523 7.5 21 7.94772 21 8.5V18C21 18.5523 20.5523 19 20 19H4C3.44772 19 3 18.5523 3 18V6Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>`;
|
|
23947
|
+
const ICON_FOLDER_OPEN = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 6C3 5.44772 3.44772 5 4 5H9L11 7.5H20C20.5523 7.5 21 7.94772 21 8.5V10H3V6Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M3 10H21.5L19.5 18.5C19.4 18.8 19.1 19 18.8 19H4C3.44772 19 3 18.5523 3 18V10Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>`;
|
|
23948
|
+
const OPEN_STATE_STORAGE_PREFIX = "NextspaceBookmarkGroupOpen_";
|
|
23949
|
+
const COMPACT_MODE_STORAGE_KEY = "NextspaceBookmarksCompactMode";
|
|
23950
|
+
// Group id used for the synthetic list of bookmarks that belong to no group.
|
|
23951
|
+
const UNGROUPED_ID = null;
|
|
23945
23952
|
class WidgetLeftPanelTabBookmarks extends exports.WidgetLeftPanelTab.ATab {
|
|
23946
23953
|
constructor(params) {
|
|
23954
|
+
var _a, _b;
|
|
23947
23955
|
super(params);
|
|
23948
23956
|
this.STYLESHEET_ID = "nextspace-left-panel-tab-bookmarks-stylesheet";
|
|
23957
|
+
this._compact = false;
|
|
23958
|
+
this._compact = this._getStoredCompact();
|
|
23949
23959
|
this._generateStyles();
|
|
23950
23960
|
this._generateElement();
|
|
23951
23961
|
this._widget.Loading.then(() => {
|
|
23952
23962
|
this._updateBookmarks();
|
|
23953
23963
|
});
|
|
23964
|
+
// The panel can be opened before a view has rendered, so the list has to rebuild when one arrives.
|
|
23965
|
+
this._viewIdChangeRemoval = (_b = (_a = this._widget) === null || _a === void 0 ? void 0 : _a.OnViewIdChange) === null || _b === void 0 ? void 0 : _b.Subscribe(() => {
|
|
23966
|
+
this._widget.Loading.then(() => {
|
|
23967
|
+
this._updateBookmarks();
|
|
23968
|
+
});
|
|
23969
|
+
});
|
|
23954
23970
|
// In case another widget messed with the panel width.
|
|
23955
23971
|
// Probably should just add a SetWidth method to avoid having plugins mess with the container CSS.
|
|
23956
23972
|
if (this.Container) {
|
|
@@ -23958,6 +23974,8 @@
|
|
|
23958
23974
|
}
|
|
23959
23975
|
}
|
|
23960
23976
|
Dispose() {
|
|
23977
|
+
var _a;
|
|
23978
|
+
(_a = this._viewIdChangeRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
23961
23979
|
super.Dispose();
|
|
23962
23980
|
}
|
|
23963
23981
|
_generateStyles() {
|
|
@@ -23967,11 +23985,16 @@
|
|
|
23967
23985
|
const style = document.createElement("style");
|
|
23968
23986
|
style.id = this.STYLESHEET_ID;
|
|
23969
23987
|
style.innerHTML = `
|
|
23988
|
+
.NextspaceLeftPanelTabBookmarks * {
|
|
23989
|
+
box-sizing: border-box;
|
|
23990
|
+
}
|
|
23991
|
+
|
|
23970
23992
|
.NextspaceLeftPanelTabBookmarks {
|
|
23971
23993
|
display: flex;
|
|
23972
23994
|
flex-direction: column;
|
|
23973
23995
|
flex-grow: 1;
|
|
23974
23996
|
flex-shrink: 1;
|
|
23997
|
+
font-family: Arial, sans-serif;
|
|
23975
23998
|
overflow: hidden;
|
|
23976
23999
|
width: 100%;
|
|
23977
24000
|
}
|
|
@@ -23997,6 +24020,59 @@
|
|
|
23997
24020
|
margin-bottom: 15px;
|
|
23998
24021
|
}
|
|
23999
24022
|
|
|
24023
|
+
.NextspaceLeftPanelTabBookmarksCompactBar {
|
|
24024
|
+
align-items: center;
|
|
24025
|
+
color: #fff;
|
|
24026
|
+
display: flex;
|
|
24027
|
+
flex-shrink: 0;
|
|
24028
|
+
font-size: 12px;
|
|
24029
|
+
justify-content: flex-end;
|
|
24030
|
+
margin-bottom: 10px;
|
|
24031
|
+
user-select: none;
|
|
24032
|
+
}
|
|
24033
|
+
|
|
24034
|
+
.NextspaceLeftPanelTabBookmarksCompactToggle {
|
|
24035
|
+
align-items: center;
|
|
24036
|
+
cursor: pointer;
|
|
24037
|
+
display: flex;
|
|
24038
|
+
opacity: .7;
|
|
24039
|
+
transition: opacity .3s ease;
|
|
24040
|
+
}
|
|
24041
|
+
|
|
24042
|
+
.NextspaceLeftPanelTabBookmarksCompactToggle:hover {
|
|
24043
|
+
opacity: 1;
|
|
24044
|
+
}
|
|
24045
|
+
|
|
24046
|
+
.NextspaceLeftPanelTabBookmarksCompactToggle >.NextspaceLeftPanelTabBookmarksCompactToggleTrack {
|
|
24047
|
+
background: rgba(255, 255, 255, .2);
|
|
24048
|
+
border-radius: 8px;
|
|
24049
|
+
height: 16px;
|
|
24050
|
+
margin-right: 8px;
|
|
24051
|
+
position: relative;
|
|
24052
|
+
transition: background .3s ease;
|
|
24053
|
+
width: 30px;
|
|
24054
|
+
}
|
|
24055
|
+
|
|
24056
|
+
.NextspaceLeftPanelTabBookmarksCompactToggle >.NextspaceLeftPanelTabBookmarksCompactToggleTrack:after {
|
|
24057
|
+
background: #fff;
|
|
24058
|
+
border-radius: 50%;
|
|
24059
|
+
content: "";
|
|
24060
|
+
height: 12px;
|
|
24061
|
+
left: 2px;
|
|
24062
|
+
position: absolute;
|
|
24063
|
+
top: 2px;
|
|
24064
|
+
transition: left .3s ease;
|
|
24065
|
+
width: 12px;
|
|
24066
|
+
}
|
|
24067
|
+
|
|
24068
|
+
.NextspaceLeftPanelTabBookmarksCompactToggle[is-on="true"] >.NextspaceLeftPanelTabBookmarksCompactToggleTrack {
|
|
24069
|
+
background: #33b1ff;
|
|
24070
|
+
}
|
|
24071
|
+
|
|
24072
|
+
.NextspaceLeftPanelTabBookmarksCompactToggle[is-on="true"] >.NextspaceLeftPanelTabBookmarksCompactToggleTrack:after {
|
|
24073
|
+
left: 16px;
|
|
24074
|
+
}
|
|
24075
|
+
|
|
24000
24076
|
.NextspaceLeftPanelTabBookmarksList {
|
|
24001
24077
|
display: flex;
|
|
24002
24078
|
flex-direction: column;
|
|
@@ -24005,30 +24081,110 @@
|
|
|
24005
24081
|
overflow: auto;
|
|
24006
24082
|
}
|
|
24007
24083
|
|
|
24008
|
-
.
|
|
24009
|
-
|
|
24084
|
+
.NextspaceLeftPanelTabBookmarksGroupHeader {
|
|
24085
|
+
align-items: flex-end;
|
|
24086
|
+
border-left: 2px solid rgba(255, 255, 255, .2);
|
|
24087
|
+
color: #fff;
|
|
24088
|
+
cursor: pointer;
|
|
24089
|
+
display: flex;
|
|
24090
|
+
font-size: 12px;
|
|
24091
|
+
font-weight: 300;
|
|
24092
|
+
letter-spacing: .01em;
|
|
24093
|
+
padding-left: 8px;
|
|
24094
|
+
transition: border-left-color .3s ease;
|
|
24095
|
+
user-select: none;
|
|
24096
|
+
}
|
|
24097
|
+
|
|
24098
|
+
.NextspaceLeftPanelTabBookmarksGroupHeader:hover {
|
|
24099
|
+
border-left-color: rgba(255, 255, 255, .5);
|
|
24100
|
+
}
|
|
24101
|
+
|
|
24102
|
+
.NextspaceLeftPanelTabBookmarksGroupHeader[is-opened="false"] {
|
|
24103
|
+
margin-bottom: 10px;
|
|
24104
|
+
}
|
|
24105
|
+
|
|
24106
|
+
.NextspaceLeftPanelTabBookmarksGroupHeader[is-opened="true"] {
|
|
24107
|
+
padding-bottom: 5px;
|
|
24108
|
+
}
|
|
24109
|
+
|
|
24110
|
+
.NextspaceLeftPanelTabBookmarksGroupHeader >.NextspaceLeftPanelTabBookmarksGroupHeaderIcon {
|
|
24010
24111
|
align-items: center;
|
|
24011
24112
|
display: flex;
|
|
24113
|
+
flex-shrink: 0;
|
|
24114
|
+
height: 20px;
|
|
24115
|
+
justify-content: center;
|
|
24116
|
+
margin-right: 8px;
|
|
24117
|
+
width: 20px;
|
|
24118
|
+
}
|
|
24119
|
+
|
|
24120
|
+
.NextspaceLeftPanelTabBookmarksGroupHeader >.NextspaceLeftPanelTabBookmarksGroupHeaderIcon >svg {
|
|
24121
|
+
height: 20px;
|
|
24122
|
+
width: 20px;
|
|
24123
|
+
}
|
|
24124
|
+
|
|
24125
|
+
.NextspaceLeftPanelTabBookmarksGroupHeader >.NextspaceLeftPanelTabBookmarksGroupHeaderName {
|
|
24126
|
+
margin-right: 8px;
|
|
24127
|
+
opacity: .7;
|
|
24128
|
+
overflow: hidden;
|
|
24129
|
+
padding-bottom: 8px;
|
|
24130
|
+
text-overflow: ellipsis;
|
|
24131
|
+
white-space: nowrap;
|
|
24132
|
+
}
|
|
24133
|
+
|
|
24134
|
+
.NextspaceLeftPanelTabBookmarksGroupHeader >.NextspaceLeftPanelTabBookmarksGroupHeaderCount {
|
|
24135
|
+
margin-right: 3px;
|
|
24136
|
+
opacity: .7;
|
|
24137
|
+
padding-bottom: 8px;
|
|
24138
|
+
}
|
|
24139
|
+
|
|
24140
|
+
.NextspaceLeftPanelTabBookmarksGroupBody {
|
|
24141
|
+
display: flex;
|
|
24142
|
+
flex-direction: column;
|
|
24143
|
+
}
|
|
24144
|
+
|
|
24145
|
+
.NextspaceLeftPanelTabBookmarksGroupBody[is-grouped="true"] {
|
|
24146
|
+
border-left: 2px solid rgba(255, 255, 255, .2);
|
|
24147
|
+
margin-bottom: 12px;
|
|
24148
|
+
padding-left: 8px;
|
|
24149
|
+
}
|
|
24150
|
+
|
|
24151
|
+
.NextspaceLeftPanelTabBookmarksListItem {
|
|
24152
|
+
background: rgba(255, 255, 255, .05);
|
|
24153
|
+
border: 1px solid rgba(255, 255, 255, .1);
|
|
24154
|
+
border-radius: 8px;
|
|
24155
|
+
cursor: pointer;
|
|
24156
|
+
display: flex;
|
|
24012
24157
|
flex-direction: column;
|
|
24158
|
+
margin-bottom: 6px;
|
|
24159
|
+
overflow: hidden;
|
|
24160
|
+
padding: 12px;
|
|
24161
|
+
transition: background .3s ease, border-color .3s ease, transform .3s ease;
|
|
24013
24162
|
width: 100%;
|
|
24014
24163
|
}
|
|
24015
24164
|
|
|
24016
|
-
.NextspaceLeftPanelTabBookmarksListItem
|
|
24017
|
-
|
|
24165
|
+
.NextspaceLeftPanelTabBookmarksListItem:hover {
|
|
24166
|
+
background: rgba(255, 255, 255, .08);
|
|
24167
|
+
border-color: rgba(255, 255, 255, .2);
|
|
24168
|
+
transform: translateY(-2px);
|
|
24169
|
+
}
|
|
24170
|
+
|
|
24171
|
+
.NextspaceLeftPanelTabBookmarksListItem[is-selected="true"] {
|
|
24172
|
+
background: rgba(51, 177, 255, .1);
|
|
24173
|
+
border-color: #33b1ff;
|
|
24018
24174
|
}
|
|
24019
24175
|
|
|
24020
24176
|
.NextspaceLeftPanelTabBookmarksListItemImageBox {
|
|
24021
|
-
|
|
24022
|
-
border-radius:
|
|
24177
|
+
background-color: rgba(255, 255, 255, .05);
|
|
24178
|
+
border-radius: 6px;
|
|
24023
24179
|
display: flex;
|
|
24024
|
-
|
|
24180
|
+
flex-shrink: 0;
|
|
24181
|
+
height: 120px;
|
|
24025
24182
|
margin-bottom: 8px;
|
|
24026
24183
|
overflow: hidden;
|
|
24027
24184
|
width: 100%;
|
|
24028
24185
|
}
|
|
24029
24186
|
|
|
24030
24187
|
.NextspaceLeftPanelTabBookmarksListItemImageBoxImage {
|
|
24031
|
-
cursor: pointer;
|
|
24032
24188
|
display: flex;
|
|
24033
24189
|
flex-direction: column;
|
|
24034
24190
|
flex-grow: 1;
|
|
@@ -24044,25 +24200,59 @@
|
|
|
24044
24200
|
width: 100%;
|
|
24045
24201
|
}
|
|
24046
24202
|
|
|
24047
|
-
.NextspaceLeftPanelTabBookmarksListItemTitle {
|
|
24048
|
-
color: #fff;
|
|
24049
|
-
display: flex;
|
|
24050
|
-
padding-right: 15px;
|
|
24051
|
-
text-align: center;
|
|
24052
|
-
width: 100%;
|
|
24053
|
-
}
|
|
24054
|
-
|
|
24055
24203
|
.NextspaceLeftPanelTabBookmarksListItemTitleText {
|
|
24204
|
+
color: #f2f4f8;
|
|
24056
24205
|
display: block;
|
|
24057
|
-
|
|
24058
|
-
|
|
24206
|
+
font-family: Arial;
|
|
24207
|
+
font-size: 13px;
|
|
24208
|
+
font-weight: 600;
|
|
24059
24209
|
overflow: hidden;
|
|
24060
|
-
text-align: center;
|
|
24061
24210
|
text-overflow: ellipsis;
|
|
24062
24211
|
white-space: nowrap;
|
|
24063
24212
|
width: 100%;
|
|
24064
|
-
|
|
24213
|
+
}
|
|
24214
|
+
|
|
24215
|
+
.NextspaceLeftPanelTabBookmarksListItemDescription {
|
|
24216
|
+
color: rgba(255, 255, 255, .7);
|
|
24217
|
+
font-size: 12px;
|
|
24218
|
+
margin-top: 4px;
|
|
24219
|
+
overflow: hidden;
|
|
24220
|
+
width: 100%;
|
|
24221
|
+
}
|
|
24222
|
+
|
|
24223
|
+
.NextspaceLeftPanelTabBookmarks[is-compact="true"] .NextspaceLeftPanelTabBookmarksListItem {
|
|
24224
|
+
align-items: center;
|
|
24225
|
+
flex-direction: row;
|
|
24226
|
+
margin-bottom: 4px;
|
|
24227
|
+
min-height: 54px;
|
|
24228
|
+
padding: 0;
|
|
24229
|
+
transform: none;
|
|
24230
|
+
}
|
|
24231
|
+
|
|
24232
|
+
.NextspaceLeftPanelTabBookmarks[is-compact="true"] .NextspaceLeftPanelTabBookmarksListItemImageBox {
|
|
24233
|
+
border-radius: 8px 0 0 8px;
|
|
24234
|
+
border-right: 1px solid #6a6a6a;
|
|
24235
|
+
height: 60px;
|
|
24236
|
+
margin-bottom: 0;
|
|
24237
|
+
margin-right: 10px;
|
|
24238
|
+
width: 70px;
|
|
24239
|
+
}
|
|
24240
|
+
|
|
24241
|
+
.NextspaceLeftPanelTabBookmarks[is-compact="true"] .NextspaceLeftPanelTabBookmarksListItemTitleText {
|
|
24242
|
+
font-size: 12px;
|
|
24243
|
+
font-weight: 400;
|
|
24244
|
+
padding-right: 10px;
|
|
24245
|
+
text-align: right;
|
|
24246
|
+
}
|
|
24247
|
+
|
|
24248
|
+
.NextspaceLeftPanelTabBookmarks[is-compact="true"] .NextspaceLeftPanelTabBookmarksListItemDescription {
|
|
24249
|
+
display: none;
|
|
24250
|
+
}
|
|
24251
|
+
|
|
24252
|
+
.NextspaceLeftPanelTabBookmarksEmpty {
|
|
24253
|
+
color: #fff;
|
|
24065
24254
|
font-size: 13px;
|
|
24255
|
+
opacity: .7;
|
|
24066
24256
|
}
|
|
24067
24257
|
`;
|
|
24068
24258
|
document.head.appendChild(style);
|
|
@@ -24070,6 +24260,7 @@
|
|
|
24070
24260
|
_generateElement() {
|
|
24071
24261
|
const element = document.createElement("div");
|
|
24072
24262
|
element.className = "NextspaceLeftPanelTabBookmarks";
|
|
24263
|
+
element.setAttribute("is-compact", String(this._compact));
|
|
24073
24264
|
const title = document.createElement("div");
|
|
24074
24265
|
title.className = "NextspaceLeftPanelTabBookmarksTitleBar";
|
|
24075
24266
|
title.textContent = "Bookmarks";
|
|
@@ -24077,52 +24268,224 @@
|
|
|
24077
24268
|
const breaker = document.createElement("div");
|
|
24078
24269
|
breaker.className = "NextspaceLeftPanelTabBookmarksTitleBreaker";
|
|
24079
24270
|
element.appendChild(breaker);
|
|
24271
|
+
const compactBar = document.createElement("div");
|
|
24272
|
+
compactBar.className = "NextspaceLeftPanelTabBookmarksCompactBar";
|
|
24273
|
+
const compactToggle = document.createElement("div");
|
|
24274
|
+
compactToggle.className = "NextspaceLeftPanelTabBookmarksCompactToggle";
|
|
24275
|
+
compactToggle.title = "Compact";
|
|
24276
|
+
compactToggle.setAttribute("is-on", String(this._compact));
|
|
24277
|
+
const compactTrack = document.createElement("div");
|
|
24278
|
+
compactTrack.className = "NextspaceLeftPanelTabBookmarksCompactToggleTrack";
|
|
24279
|
+
compactToggle.appendChild(compactTrack);
|
|
24280
|
+
const compactLabel = document.createElement("div");
|
|
24281
|
+
compactLabel.textContent = "Compact";
|
|
24282
|
+
compactToggle.appendChild(compactLabel);
|
|
24283
|
+
compactToggle.onclick = () => {
|
|
24284
|
+
this._setCompact(!this._compact);
|
|
24285
|
+
};
|
|
24286
|
+
compactBar.appendChild(compactToggle);
|
|
24287
|
+
element.appendChild(compactBar);
|
|
24288
|
+
const empty = document.createElement("div");
|
|
24289
|
+
empty.className = "NextspaceLeftPanelTabBookmarksEmpty";
|
|
24290
|
+
empty.textContent = "No bookmarks in this project view.";
|
|
24291
|
+
empty.style.display = "none";
|
|
24292
|
+
element.appendChild(empty);
|
|
24080
24293
|
const list = document.createElement("div");
|
|
24081
24294
|
list.className = "NextspaceLeftPanelTabBookmarksList";
|
|
24082
24295
|
element.appendChild(list);
|
|
24083
24296
|
this.Container.appendChild(element);
|
|
24084
24297
|
this._element = element;
|
|
24085
24298
|
}
|
|
24299
|
+
_getStoredCompact() {
|
|
24300
|
+
try {
|
|
24301
|
+
return window.localStorage.getItem(COMPACT_MODE_STORAGE_KEY) === "true";
|
|
24302
|
+
}
|
|
24303
|
+
catch (e) {
|
|
24304
|
+
// Storage can be unavailable (private mode, blocked cookies). The default layout still works.
|
|
24305
|
+
return false;
|
|
24306
|
+
}
|
|
24307
|
+
}
|
|
24308
|
+
_setCompact(compact) {
|
|
24309
|
+
this._compact = compact;
|
|
24310
|
+
this._element.setAttribute("is-compact", String(compact));
|
|
24311
|
+
const toggle = this._element.querySelector(".NextspaceLeftPanelTabBookmarksCompactToggle");
|
|
24312
|
+
if (toggle) {
|
|
24313
|
+
toggle.setAttribute("is-on", String(compact));
|
|
24314
|
+
}
|
|
24315
|
+
try {
|
|
24316
|
+
window.localStorage.setItem(COMPACT_MODE_STORAGE_KEY, String(compact));
|
|
24317
|
+
}
|
|
24318
|
+
catch (e) {
|
|
24319
|
+
console.warn(e);
|
|
24320
|
+
}
|
|
24321
|
+
}
|
|
24322
|
+
_getGroupOpen(groupId) {
|
|
24323
|
+
try {
|
|
24324
|
+
return window.localStorage.getItem(OPEN_STATE_STORAGE_PREFIX + groupId) === "true";
|
|
24325
|
+
}
|
|
24326
|
+
catch (e) {
|
|
24327
|
+
return false;
|
|
24328
|
+
}
|
|
24329
|
+
}
|
|
24330
|
+
_setGroupOpen(groupId, open) {
|
|
24331
|
+
try {
|
|
24332
|
+
window.localStorage.setItem(OPEN_STATE_STORAGE_PREFIX + groupId, String(open));
|
|
24333
|
+
}
|
|
24334
|
+
catch (e) {
|
|
24335
|
+
console.warn(e);
|
|
24336
|
+
}
|
|
24337
|
+
}
|
|
24338
|
+
/**
|
|
24339
|
+
* Sorts the bookmarks into their groups, ordering both by display order then name.
|
|
24340
|
+
* Bookmarks with no group, or one that no longer exists, land in a trailing ungrouped list.
|
|
24341
|
+
*/
|
|
24342
|
+
_buildGroupLists() {
|
|
24343
|
+
var _a, _b;
|
|
24344
|
+
const bookmarks = (_a = this._widget.Bookmarks) !== null && _a !== void 0 ? _a : [];
|
|
24345
|
+
const groups = ((_b = this._widget.BookmarkGroups) !== null && _b !== void 0 ? _b : []).slice().sort((a, b) => {
|
|
24346
|
+
var _a, _b, _c, _d;
|
|
24347
|
+
const orderDiff = ((_a = a.DisplayOrder) !== null && _a !== void 0 ? _a : 0) - ((_b = b.DisplayOrder) !== null && _b !== void 0 ? _b : 0);
|
|
24348
|
+
if (orderDiff !== 0) {
|
|
24349
|
+
return orderDiff;
|
|
24350
|
+
}
|
|
24351
|
+
return ((_c = a.Name) !== null && _c !== void 0 ? _c : "").toLowerCase().localeCompare(((_d = b.Name) !== null && _d !== void 0 ? _d : "").toLowerCase());
|
|
24352
|
+
});
|
|
24353
|
+
const lists = groups.map(group => ({
|
|
24354
|
+
groupId: group.ID,
|
|
24355
|
+
group,
|
|
24356
|
+
bookmarks: []
|
|
24357
|
+
}));
|
|
24358
|
+
const listsById = new Map(lists.map(list => [list.groupId, list]));
|
|
24359
|
+
const ungrouped = {
|
|
24360
|
+
groupId: UNGROUPED_ID,
|
|
24361
|
+
group: null,
|
|
24362
|
+
bookmarks: []
|
|
24363
|
+
};
|
|
24364
|
+
for (const bookmark of bookmarks) {
|
|
24365
|
+
const groupId = bookmark["UI.SlideGroup.ID"];
|
|
24366
|
+
const list = groupId ? listsById.get(groupId) : null;
|
|
24367
|
+
(list !== null && list !== void 0 ? list : ungrouped).bookmarks.push(bookmark);
|
|
24368
|
+
}
|
|
24369
|
+
for (const list of lists) {
|
|
24370
|
+
list.bookmarks.sort(this._compareBookmarks);
|
|
24371
|
+
}
|
|
24372
|
+
ungrouped.bookmarks.sort(this._compareBookmarks);
|
|
24373
|
+
// Ungrouped always trails the named groups.
|
|
24374
|
+
lists.push(ungrouped);
|
|
24375
|
+
return lists;
|
|
24376
|
+
}
|
|
24377
|
+
_compareBookmarks(a, b) {
|
|
24378
|
+
var _a, _b, _c, _d;
|
|
24379
|
+
const orderDiff = ((_a = a.DisplayOrder) !== null && _a !== void 0 ? _a : 0) - ((_b = b.DisplayOrder) !== null && _b !== void 0 ? _b : 0);
|
|
24380
|
+
if (orderDiff !== 0) {
|
|
24381
|
+
return orderDiff;
|
|
24382
|
+
}
|
|
24383
|
+
return ((_c = a.Title) !== null && _c !== void 0 ? _c : "").localeCompare((_d = b.Title) !== null && _d !== void 0 ? _d : "");
|
|
24384
|
+
}
|
|
24086
24385
|
_updateBookmarks() {
|
|
24087
|
-
var _a;
|
|
24088
|
-
const bookmarks = this._widget.Bookmarks;
|
|
24089
|
-
this._element.style.display = bookmarks.length ? "flex" : "none";
|
|
24090
|
-
const api = this._widget._getApiGetters().GetBruceApi();
|
|
24386
|
+
var _a, _b;
|
|
24387
|
+
const bookmarks = (_a = this._widget.Bookmarks) !== null && _a !== void 0 ? _a : [];
|
|
24091
24388
|
const list = this._element.querySelector(".NextspaceLeftPanelTabBookmarksList");
|
|
24389
|
+
const empty = this._element.querySelector(".NextspaceLeftPanelTabBookmarksEmpty");
|
|
24390
|
+
const compactBar = this._element.querySelector(".NextspaceLeftPanelTabBookmarksCompactBar");
|
|
24092
24391
|
list.innerHTML = "";
|
|
24093
|
-
|
|
24094
|
-
|
|
24095
|
-
|
|
24096
|
-
|
|
24097
|
-
|
|
24098
|
-
|
|
24099
|
-
|
|
24100
|
-
|
|
24101
|
-
|
|
24102
|
-
|
|
24103
|
-
|
|
24104
|
-
|
|
24105
|
-
|
|
24106
|
-
|
|
24107
|
-
|
|
24392
|
+
const hasBookmarks = bookmarks.length > 0;
|
|
24393
|
+
empty.style.display = hasBookmarks ? "none" : "block";
|
|
24394
|
+
compactBar.style.display = hasBookmarks ? "flex" : "none";
|
|
24395
|
+
if (!hasBookmarks) {
|
|
24396
|
+
return;
|
|
24397
|
+
}
|
|
24398
|
+
const api = (_b = this._widget._getApiGetters()) === null || _b === void 0 ? void 0 : _b.GetBruceApi();
|
|
24399
|
+
for (const groupList of this._buildGroupLists()) {
|
|
24400
|
+
if (!groupList.bookmarks.length) {
|
|
24401
|
+
continue;
|
|
24402
|
+
}
|
|
24403
|
+
this._renderGroup(groupList, list, api);
|
|
24404
|
+
}
|
|
24405
|
+
this._updateBookmark();
|
|
24406
|
+
}
|
|
24407
|
+
_renderGroup(groupList, parent, api) {
|
|
24408
|
+
var _a;
|
|
24409
|
+
const isGrouped = groupList.groupId != null;
|
|
24410
|
+
// Ungrouped bookmarks have no header, so they're always visible.
|
|
24411
|
+
const opened = isGrouped ? this._getGroupOpen(groupList.groupId) : true;
|
|
24412
|
+
const body = document.createElement("div");
|
|
24413
|
+
body.className = "NextspaceLeftPanelTabBookmarksGroupBody";
|
|
24414
|
+
body.setAttribute("is-grouped", String(isGrouped));
|
|
24415
|
+
if (isGrouped) {
|
|
24416
|
+
const header = document.createElement("div");
|
|
24417
|
+
header.className = "NextspaceLeftPanelTabBookmarksGroupHeader";
|
|
24418
|
+
header.setAttribute("group-id", String(groupList.groupId));
|
|
24419
|
+
header.setAttribute("is-opened", String(opened));
|
|
24420
|
+
const icon = document.createElement("div");
|
|
24421
|
+
icon.className = "NextspaceLeftPanelTabBookmarksGroupHeaderIcon";
|
|
24422
|
+
icon.innerHTML = opened ? ICON_FOLDER_OPEN : ICON_FOLDER;
|
|
24423
|
+
header.appendChild(icon);
|
|
24424
|
+
const name = document.createElement("div");
|
|
24425
|
+
name.className = "NextspaceLeftPanelTabBookmarksGroupHeaderName";
|
|
24426
|
+
name.textContent = ((_a = groupList.group) === null || _a === void 0 ? void 0 : _a.Name) || "Unnamed Group";
|
|
24427
|
+
header.appendChild(name);
|
|
24428
|
+
const count = document.createElement("div");
|
|
24429
|
+
count.className = "NextspaceLeftPanelTabBookmarksGroupHeaderCount";
|
|
24430
|
+
count.textContent = "(" + groupList.bookmarks.length + ")";
|
|
24431
|
+
header.appendChild(count);
|
|
24432
|
+
header.onclick = () => {
|
|
24433
|
+
this._setGroupOpen(groupList.groupId, !this._getGroupOpen(groupList.groupId));
|
|
24434
|
+
this._updateBookmarks();
|
|
24435
|
+
};
|
|
24436
|
+
parent.appendChild(header);
|
|
24437
|
+
body.style.display = opened ? "flex" : "none";
|
|
24438
|
+
}
|
|
24439
|
+
parent.appendChild(body);
|
|
24440
|
+
if (!opened) {
|
|
24441
|
+
return;
|
|
24442
|
+
}
|
|
24443
|
+
for (const bookmark of groupList.bookmarks) {
|
|
24444
|
+
this._renderBookmark(bookmark, body, api);
|
|
24445
|
+
}
|
|
24446
|
+
}
|
|
24447
|
+
_renderBookmark(bookmark, parent, api) {
|
|
24448
|
+
var _a;
|
|
24449
|
+
const item = document.createElement("div");
|
|
24450
|
+
item.className = "NextspaceLeftPanelTabBookmarksListItem";
|
|
24451
|
+
const imageBox = document.createElement("div");
|
|
24452
|
+
imageBox.className = "NextspaceLeftPanelTabBookmarksListItemImageBox";
|
|
24453
|
+
item.appendChild(imageBox);
|
|
24454
|
+
const image = document.createElement("div");
|
|
24455
|
+
image.className = "NextspaceLeftPanelTabBookmarksListItemImageBoxImage";
|
|
24456
|
+
imageBox.appendChild(image);
|
|
24457
|
+
const previewUrl = bookmark["Screenshot.ClientFile.ID"] ? ((_a = bookmark["Screenshot.URL"]) !== null && _a !== void 0 ? _a : BModels.ClientFile.GetUrl({
|
|
24458
|
+
fileId: bookmark["Screenshot.ClientFile.ID"],
|
|
24459
|
+
api,
|
|
24460
|
+
viaCdn: true
|
|
24461
|
+
})) : "";
|
|
24462
|
+
// A bookmark without a screenshot keeps the empty tinted box rather than a broken image.
|
|
24463
|
+
if (previewUrl) {
|
|
24108
24464
|
const img = document.createElement("img");
|
|
24109
24465
|
img.src = previewUrl;
|
|
24466
|
+
img.loading = "lazy";
|
|
24110
24467
|
image.appendChild(img);
|
|
24111
|
-
const title = document.createElement("div");
|
|
24112
|
-
title.className = "NextspaceLeftPanelTabBookmarksListItemTitle";
|
|
24113
|
-
item.appendChild(title);
|
|
24114
|
-
const titleText = document.createElement("div");
|
|
24115
|
-
titleText.className = "NextspaceLeftPanelTabBookmarksListItemTitleText";
|
|
24116
|
-
titleText.textContent = bookmark.Title ? bookmark.Title : "Untitled Bookmark";
|
|
24117
|
-
title.appendChild(titleText);
|
|
24118
|
-
item.setAttribute("bookmark-id", bookmark.ID);
|
|
24119
|
-
item.setAttribute("is-selected", String(bookmark.ID === this._widget.LastEnabledBookmarkId));
|
|
24120
|
-
item.onclick = () => {
|
|
24121
|
-
this._selectBookmark(bookmark);
|
|
24122
|
-
};
|
|
24123
|
-
list.appendChild(item);
|
|
24124
24468
|
}
|
|
24125
|
-
|
|
24469
|
+
const content = document.createElement("div");
|
|
24470
|
+
content.className = "NextspaceLeftPanelTabBookmarksListItemContent";
|
|
24471
|
+
item.appendChild(content);
|
|
24472
|
+
const titleText = document.createElement("div");
|
|
24473
|
+
titleText.className = "NextspaceLeftPanelTabBookmarksListItemTitleText";
|
|
24474
|
+
titleText.textContent = bookmark.Title ? bookmark.Title : "Untitled Bookmark";
|
|
24475
|
+
titleText.title = titleText.textContent;
|
|
24476
|
+
content.appendChild(titleText);
|
|
24477
|
+
if (bookmark.Note) {
|
|
24478
|
+
const description = document.createElement("div");
|
|
24479
|
+
description.className = "NextspaceLeftPanelTabBookmarksListItemDescription";
|
|
24480
|
+
description.textContent = bookmark.Note;
|
|
24481
|
+
content.appendChild(description);
|
|
24482
|
+
}
|
|
24483
|
+
item.setAttribute("bookmark-id", bookmark.ID);
|
|
24484
|
+
item.setAttribute("is-selected", String(bookmark.ID === this._widget.LastEnabledBookmarkId));
|
|
24485
|
+
item.onclick = () => {
|
|
24486
|
+
this._selectBookmark(bookmark);
|
|
24487
|
+
};
|
|
24488
|
+
parent.appendChild(item);
|
|
24126
24489
|
}
|
|
24127
24490
|
_selectBookmark(bookmark) {
|
|
24128
24491
|
this._widget.SelectBookmark(bookmark);
|
|
@@ -24138,19 +24501,20 @@
|
|
|
24138
24501
|
item.setAttribute("is-selected", "false");
|
|
24139
24502
|
}
|
|
24140
24503
|
}
|
|
24141
|
-
// Scroll the selected bookmark into view.
|
|
24504
|
+
// Scroll the selected bookmark into view. This list is vertical, unlike the bookmark strip widget's.
|
|
24142
24505
|
const selected = this._element.querySelector(".NextspaceLeftPanelTabBookmarksListItem[is-selected='true']");
|
|
24143
24506
|
if (selected) {
|
|
24144
24507
|
const list = this._element.querySelector(".NextspaceLeftPanelTabBookmarksList");
|
|
24145
|
-
const
|
|
24146
|
-
const
|
|
24147
|
-
|
|
24148
|
-
const
|
|
24149
|
-
|
|
24150
|
-
|
|
24508
|
+
const scrollTop = list.scrollTop;
|
|
24509
|
+
const scrollBottom = scrollTop + list.clientHeight;
|
|
24510
|
+
// Both share the panel container as their offset parent, so this is the item's offset within the list.
|
|
24511
|
+
const top = selected.offsetTop - list.offsetTop;
|
|
24512
|
+
const bottom = top + selected.clientHeight;
|
|
24513
|
+
if (top < scrollTop) {
|
|
24514
|
+
list.scrollTop = top;
|
|
24151
24515
|
}
|
|
24152
|
-
else if (
|
|
24153
|
-
list.
|
|
24516
|
+
else if (bottom > scrollBottom) {
|
|
24517
|
+
list.scrollTop = bottom - list.clientHeight;
|
|
24154
24518
|
}
|
|
24155
24519
|
}
|
|
24156
24520
|
}
|
|
@@ -24325,132 +24689,1324 @@
|
|
|
24325
24689
|
box-sizing: border-box;
|
|
24326
24690
|
width: 10px;
|
|
24327
24691
|
}
|
|
24328
|
-
|
|
24329
|
-
.NextspaceLeftPanelTabUser button {
|
|
24330
|
-
cursor: pointer;
|
|
24331
|
-
border-radius: .375rem;
|
|
24332
|
-
padding: 4px 9px;
|
|
24333
|
-
transition: opacity 0.3s ease;
|
|
24334
|
-
width: 100px;
|
|
24335
|
-
width: min-content;
|
|
24336
|
-
height: min-content;
|
|
24337
|
-
white-space: nowrap;
|
|
24338
|
-
border: 1px solid grey;
|
|
24339
|
-
color: black;
|
|
24340
|
-
background-color: white;
|
|
24341
|
-
display: flex;
|
|
24342
|
-
align-items: center;
|
|
24343
|
-
justify-content: center;
|
|
24344
|
-
position: relative;
|
|
24345
|
-
background-color: #0072c3;
|
|
24346
|
-
border: 1px solid #0072c3;
|
|
24347
|
-
color: white;
|
|
24348
|
-
|
|
24349
|
-
margin-left: auto;
|
|
24692
|
+
|
|
24693
|
+
.NextspaceLeftPanelTabUser button {
|
|
24694
|
+
cursor: pointer;
|
|
24695
|
+
border-radius: .375rem;
|
|
24696
|
+
padding: 4px 9px;
|
|
24697
|
+
transition: opacity 0.3s ease;
|
|
24698
|
+
width: 100px;
|
|
24699
|
+
width: min-content;
|
|
24700
|
+
height: min-content;
|
|
24701
|
+
white-space: nowrap;
|
|
24702
|
+
border: 1px solid grey;
|
|
24703
|
+
color: black;
|
|
24704
|
+
background-color: white;
|
|
24705
|
+
display: flex;
|
|
24706
|
+
align-items: center;
|
|
24707
|
+
justify-content: center;
|
|
24708
|
+
position: relative;
|
|
24709
|
+
background-color: #0072c3;
|
|
24710
|
+
border: 1px solid #0072c3;
|
|
24711
|
+
color: white;
|
|
24712
|
+
|
|
24713
|
+
margin-left: auto;
|
|
24714
|
+
}
|
|
24715
|
+
`;
|
|
24716
|
+
document.head.appendChild(style);
|
|
24717
|
+
}
|
|
24718
|
+
_generateElement() {
|
|
24719
|
+
var _a, _b;
|
|
24720
|
+
if ((_a = this._element) === null || _a === void 0 ? void 0 : _a.parentElement) {
|
|
24721
|
+
this._element.parentElement.removeChild(this._element);
|
|
24722
|
+
}
|
|
24723
|
+
this._element = null;
|
|
24724
|
+
const element = document.createElement("div");
|
|
24725
|
+
element.className = "NextspaceLeftPanelTabUser";
|
|
24726
|
+
const title = document.createElement("div");
|
|
24727
|
+
title.className = "NextspaceLeftPanelTabUserTitleBar";
|
|
24728
|
+
title.textContent = this.loaded ? (this.user ? ((_b = this.user.FullName) !== null && _b !== void 0 ? _b : "#" + this.user.ID) : "Guest") : "Loading..";
|
|
24729
|
+
element.appendChild(title);
|
|
24730
|
+
const breaker = document.createElement("div");
|
|
24731
|
+
breaker.className = "NextspaceLeftPanelTabUserTitleBreaker";
|
|
24732
|
+
element.appendChild(breaker);
|
|
24733
|
+
if (!this.user || this.user.ID === "anonymous") {
|
|
24734
|
+
{
|
|
24735
|
+
const inputRow = document.createElement("div");
|
|
24736
|
+
inputRow.className = "NextspaceLeftPanelTabUserInputRow";
|
|
24737
|
+
const label = document.createElement("label");
|
|
24738
|
+
label.textContent = "Username";
|
|
24739
|
+
inputRow.appendChild(label);
|
|
24740
|
+
const input = document.createElement("input");
|
|
24741
|
+
input.type = "text";
|
|
24742
|
+
input.placeholder = "...";
|
|
24743
|
+
this.inputUsername = input;
|
|
24744
|
+
inputRow.appendChild(this.inputUsername);
|
|
24745
|
+
element.appendChild(inputRow);
|
|
24746
|
+
}
|
|
24747
|
+
{
|
|
24748
|
+
const inputRow = document.createElement("div");
|
|
24749
|
+
inputRow.className = "NextspaceLeftPanelTabUserInputRow";
|
|
24750
|
+
const label = document.createElement("label");
|
|
24751
|
+
label.textContent = "Password";
|
|
24752
|
+
inputRow.appendChild(label);
|
|
24753
|
+
const input = document.createElement("input");
|
|
24754
|
+
input.type = "password";
|
|
24755
|
+
input.placeholder = "...";
|
|
24756
|
+
this.inputPassword = input;
|
|
24757
|
+
inputRow.appendChild(this.inputPassword);
|
|
24758
|
+
element.appendChild(inputRow);
|
|
24759
|
+
}
|
|
24760
|
+
{
|
|
24761
|
+
const button = document.createElement("button");
|
|
24762
|
+
button.textContent = "Login";
|
|
24763
|
+
button.onclick = async () => {
|
|
24764
|
+
var _a, _b, _c, _d, _e, _f;
|
|
24765
|
+
if (this.loggingIn) {
|
|
24766
|
+
return;
|
|
24767
|
+
}
|
|
24768
|
+
button.style.opacity = "0.7";
|
|
24769
|
+
this.loggingIn = true;
|
|
24770
|
+
try {
|
|
24771
|
+
const { session } = await BModels.Session.Login({
|
|
24772
|
+
accountId: BModels.ENVIRONMENT.PARAMS.accountId,
|
|
24773
|
+
username: (_b = (_a = this.inputUsername) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "",
|
|
24774
|
+
password: (_d = (_c = this.inputPassword) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : ""
|
|
24775
|
+
});
|
|
24776
|
+
BModels.ENVIRONMENT.SetPageLoadSessionId((_e = session === null || session === void 0 ? void 0 : session.ID) !== null && _e !== void 0 ? _e : null);
|
|
24777
|
+
BModels.ENVIRONMENT.Reset({
|
|
24778
|
+
accountId: BModels.ENVIRONMENT.PARAMS.accountId,
|
|
24779
|
+
sessionId: (_f = (session === null || session === void 0 ? void 0 : session.ID)) !== null && _f !== void 0 ? _f : null,
|
|
24780
|
+
});
|
|
24781
|
+
window.location.reload();
|
|
24782
|
+
}
|
|
24783
|
+
catch (e) {
|
|
24784
|
+
console.error(e);
|
|
24785
|
+
}
|
|
24786
|
+
finally {
|
|
24787
|
+
this.loggingIn = false;
|
|
24788
|
+
button.style.opacity = "1";
|
|
24789
|
+
}
|
|
24790
|
+
};
|
|
24791
|
+
element.appendChild(button);
|
|
24792
|
+
}
|
|
24793
|
+
}
|
|
24794
|
+
else {
|
|
24795
|
+
if (this.canLogout()) {
|
|
24796
|
+
const button = document.createElement("button");
|
|
24797
|
+
button.textContent = "Logout";
|
|
24798
|
+
button.onclick = async () => {
|
|
24799
|
+
if (this.loggingOut) {
|
|
24800
|
+
return;
|
|
24801
|
+
}
|
|
24802
|
+
button.style.opacity = "0.7";
|
|
24803
|
+
try {
|
|
24804
|
+
this.logout();
|
|
24805
|
+
}
|
|
24806
|
+
catch (e) {
|
|
24807
|
+
console.error(e);
|
|
24808
|
+
}
|
|
24809
|
+
finally {
|
|
24810
|
+
button.style.opacity = "1";
|
|
24811
|
+
}
|
|
24812
|
+
};
|
|
24813
|
+
element.appendChild(button);
|
|
24814
|
+
}
|
|
24815
|
+
}
|
|
24816
|
+
this.Container.appendChild(element);
|
|
24817
|
+
this._element = element;
|
|
24818
|
+
}
|
|
24819
|
+
}
|
|
24820
|
+
|
|
24821
|
+
(function (EMenuItemState) {
|
|
24822
|
+
EMenuItemState["Enabled"] = "enabled";
|
|
24823
|
+
EMenuItemState["Disabled"] = "disabled";
|
|
24824
|
+
EMenuItemState["ChildEnabled"] = "child-enabled";
|
|
24825
|
+
})(exports.EMenuItemState || (exports.EMenuItemState = {}));
|
|
24826
|
+
// Icons are inline so the library stays dependency free.
|
|
24827
|
+
const ICON_CHECK = `<svg viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 4L4 7L10 1" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
24828
|
+
const ICON_PARTIAL_CHECK = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 12H16" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
24829
|
+
const ICON_CHEV_DOWN = `<svg viewBox="0 0 16 9" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15 1L8 8L1 1" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
24830
|
+
const ICON_CHEV_RIGHT = `<svg viewBox="0 0 10 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.5 1.5L8.5 8.5L1.5 15.5" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
24831
|
+
const ICON_FLY_TO = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.5926 2.12617L2.49072 12.5694C1.78383 12.9756 1.87366 13.9597 2.57664 14.2566L6.72815 15.9984L17.9486 6.10975C18.1634 5.91838 18.468 6.21129 18.2844 6.4339L8.87616 17.8964V21.0403C8.87616 21.962 9.98921 22.3252 10.536 21.6574L13.016 18.6385L17.8822 20.6771C18.4367 20.9115 19.0694 20.5639 19.171 19.9663L21.9829 3.09473C22.1157 2.30583 21.2682 1.73563 20.5926 2.12617Z" fill="white"/></svg>`;
|
|
24832
|
+
// Elbow connector drawn instead of a chevron on leaf rows below the root level.
|
|
24833
|
+
const ICON_BRACKET = `<svg viewBox="0 0 11 13" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1V10C1 11.1046 1.89543 12 3 12H10" stroke="rgb(131, 141, 150)" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
24834
|
+
// Menu item types backed by a tileset, so a fly-to can fall back to the tileset's bounding sphere.
|
|
24835
|
+
const TILESET_TYPES = [
|
|
24836
|
+
BModels.MenuItem.EType.CadTileset,
|
|
24837
|
+
BModels.MenuItem.EType.PointCloud,
|
|
24838
|
+
BModels.MenuItem.EType.EntityTileset,
|
|
24839
|
+
BModels.MenuItem.EType.ArbTileset,
|
|
24840
|
+
BModels.MenuItem.EType.IonTileset,
|
|
24841
|
+
BModels.MenuItem.EType.Osm,
|
|
24842
|
+
BModels.MenuItem.EType.GooglePhotoTileset
|
|
24843
|
+
];
|
|
24844
|
+
const OPEN_STATE_STORAGE_PREFIX$1 = "NextspaceMenuItemOpen_";
|
|
24845
|
+
const PANEL_WIDTH_STORAGE_KEY = "NextspaceMenuItemsPanelWidth";
|
|
24846
|
+
// Matches the panel's resize range in the full Navigator experience.
|
|
24847
|
+
const PANEL_DEFAULT_WIDTH = 320;
|
|
24848
|
+
const PANEL_MIN_WIDTH = 280;
|
|
24849
|
+
const PANEL_MAX_WIDTH = 700;
|
|
24850
|
+
/**
|
|
24851
|
+
* Left panel tab listing the project view's menu items as a checkbox tree.
|
|
24852
|
+
* Toggling a row renders or removes that layer in the scene.
|
|
24853
|
+
*/
|
|
24854
|
+
class WidgetLeftPanelTabMenuItems extends exports.WidgetLeftPanelTab.ATab {
|
|
24855
|
+
constructor(params) {
|
|
24856
|
+
var _a, _b, _c, _d;
|
|
24857
|
+
super(params);
|
|
24858
|
+
this.STYLESHEET_ID = "nextspace-left-panel-tab-menu-items-stylesheet";
|
|
24859
|
+
this._menuItems = [];
|
|
24860
|
+
this._rows = new Map();
|
|
24861
|
+
// Identifies the newest load, so a slow response for an older view can't overwrite a newer one.
|
|
24862
|
+
this._loadToken = 0;
|
|
24863
|
+
// Rows currently mid fly-to, so a double click doesn't stack camera moves.
|
|
24864
|
+
this._flying = new Set();
|
|
24865
|
+
this._disposed = false;
|
|
24866
|
+
this._generateStyles();
|
|
24867
|
+
this._generateElement();
|
|
24868
|
+
this._stateQueue = new BModels.DelayQueue(() => {
|
|
24869
|
+
this._updateStates();
|
|
24870
|
+
});
|
|
24871
|
+
this._countQueue = new BModels.DelayQueue(() => {
|
|
24872
|
+
this._updateCounts();
|
|
24873
|
+
});
|
|
24874
|
+
this._viewIdChangeRemoval = (_b = (_a = this._widget) === null || _a === void 0 ? void 0 : _a.OnViewIdChange) === null || _b === void 0 ? void 0 : _b.Subscribe(() => {
|
|
24875
|
+
this._loadMenuItems();
|
|
24876
|
+
});
|
|
24877
|
+
const manager = (_c = this._widget) === null || _c === void 0 ? void 0 : _c._getManager();
|
|
24878
|
+
if (manager) {
|
|
24879
|
+
this._menuUpdateRemoval = manager.OnUpdate.Subscribe(() => {
|
|
24880
|
+
this._stateQueue.Call();
|
|
24881
|
+
});
|
|
24882
|
+
this._visualUpdateRemoval = (_d = manager.VisualsRegister) === null || _d === void 0 ? void 0 : _d.OnUpdate.Subscribe(() => {
|
|
24883
|
+
this._countQueue.Call();
|
|
24884
|
+
});
|
|
24885
|
+
}
|
|
24886
|
+
this._loadMenuItems();
|
|
24887
|
+
this._applyPanelWidth(this._getStoredWidth());
|
|
24888
|
+
}
|
|
24889
|
+
Dispose() {
|
|
24890
|
+
var _a, _b, _c, _d, _e;
|
|
24891
|
+
this._disposed = true;
|
|
24892
|
+
this._endResize();
|
|
24893
|
+
// The panel container is shared with the other tabs, so its overrides don't outlive this one.
|
|
24894
|
+
if (this.Container) {
|
|
24895
|
+
this.Container.style.padding = "";
|
|
24896
|
+
}
|
|
24897
|
+
(_a = this._viewIdChangeRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
24898
|
+
(_b = this._menuUpdateRemoval) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
24899
|
+
(_c = this._visualUpdateRemoval) === null || _c === void 0 ? void 0 : _c.call(this);
|
|
24900
|
+
(_d = this._stateQueue) === null || _d === void 0 ? void 0 : _d.Dispose();
|
|
24901
|
+
(_e = this._countQueue) === null || _e === void 0 ? void 0 : _e.Dispose();
|
|
24902
|
+
this._rows.clear();
|
|
24903
|
+
super.Dispose();
|
|
24904
|
+
}
|
|
24905
|
+
_generateStyles() {
|
|
24906
|
+
if (document.getElementById(this.STYLESHEET_ID)) {
|
|
24907
|
+
return;
|
|
24908
|
+
}
|
|
24909
|
+
const style = document.createElement("style");
|
|
24910
|
+
style.id = this.STYLESHEET_ID;
|
|
24911
|
+
style.innerHTML = `
|
|
24912
|
+
.NextspaceLeftPanelTabMenuItems * {
|
|
24913
|
+
box-sizing: border-box;
|
|
24914
|
+
}
|
|
24915
|
+
|
|
24916
|
+
.NextspaceLeftPanelTabMenuItems {
|
|
24917
|
+
color: #fff;
|
|
24918
|
+
display: flex;
|
|
24919
|
+
flex-direction: column;
|
|
24920
|
+
flex-grow: 1;
|
|
24921
|
+
flex-shrink: 1;
|
|
24922
|
+
font-family: Arial, sans-serif;
|
|
24923
|
+
overflow: hidden;
|
|
24924
|
+
padding: 30px 20px 12px 20px;
|
|
24925
|
+
width: 100%;
|
|
24926
|
+
}
|
|
24927
|
+
|
|
24928
|
+
.NextspaceLeftPanelTabMenuItems >.NextspaceLeftPanelTabMenuItemsTitleBar {
|
|
24929
|
+
align-items: center;
|
|
24930
|
+
color: #fff;
|
|
24931
|
+
display: flex;
|
|
24932
|
+
font-size: 17px;
|
|
24933
|
+
font-weight: 500;
|
|
24934
|
+
justify-content: center;
|
|
24935
|
+
letter-spacing: -.005em;
|
|
24936
|
+
line-height: 20px;
|
|
24937
|
+
margin-bottom: 15px;
|
|
24938
|
+
}
|
|
24939
|
+
|
|
24940
|
+
.NextspaceLeftPanelTabMenuItems >.NextspaceLeftPanelTabMenuItemsTitleBreaker {
|
|
24941
|
+
background-color: #000;
|
|
24942
|
+
flex-shrink: 0;
|
|
24943
|
+
height: 2px;
|
|
24944
|
+
margin-bottom: 15px;
|
|
24945
|
+
}
|
|
24946
|
+
|
|
24947
|
+
.NextspaceLeftPanelTabMenuItems >.NextspaceLeftPanelTabMenuItemsScrollBox {
|
|
24948
|
+
flex-grow: 1;
|
|
24949
|
+
flex-shrink: 1;
|
|
24950
|
+
overflow: auto;
|
|
24951
|
+
padding-right: 10px;
|
|
24952
|
+
}
|
|
24953
|
+
|
|
24954
|
+
.NextspaceLeftPanelTabMenuItems >.NextspaceLeftPanelTabMenuItemsTip {
|
|
24955
|
+
color: #fff;
|
|
24956
|
+
font-size: 13px;
|
|
24957
|
+
opacity: .7;
|
|
24958
|
+
}
|
|
24959
|
+
|
|
24960
|
+
.NextspaceLeftPanelTabMenuItemsResizeHandle {
|
|
24961
|
+
bottom: 0;
|
|
24962
|
+
cursor: col-resize;
|
|
24963
|
+
position: absolute;
|
|
24964
|
+
right: 0;
|
|
24965
|
+
top: 0;
|
|
24966
|
+
width: 8px;
|
|
24967
|
+
z-index: 3;
|
|
24968
|
+
}
|
|
24969
|
+
|
|
24970
|
+
.NextspaceMenuItemRow {
|
|
24971
|
+
border-bottom: 2px solid #121619;
|
|
24972
|
+
width: 100%;
|
|
24973
|
+
}
|
|
24974
|
+
|
|
24975
|
+
.NextspaceMenuItemRow[show-children="true"] {
|
|
24976
|
+
border-bottom: none;
|
|
24977
|
+
}
|
|
24978
|
+
|
|
24979
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem {
|
|
24980
|
+
align-items: center;
|
|
24981
|
+
display: flex;
|
|
24982
|
+
height: 40px;
|
|
24983
|
+
user-select: none;
|
|
24984
|
+
}
|
|
24985
|
+
|
|
24986
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowCheckbox,
|
|
24987
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowToggle,
|
|
24988
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowBracket {
|
|
24989
|
+
align-items: center;
|
|
24990
|
+
color: #fff;
|
|
24991
|
+
cursor: pointer;
|
|
24992
|
+
display: flex;
|
|
24993
|
+
flex-shrink: 0;
|
|
24994
|
+
height: 18px;
|
|
24995
|
+
justify-content: center;
|
|
24996
|
+
width: 18px;
|
|
24997
|
+
}
|
|
24998
|
+
|
|
24999
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowCheckbox >svg,
|
|
25000
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowToggle >svg,
|
|
25001
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowBracket >svg {
|
|
25002
|
+
height: 12px;
|
|
25003
|
+
width: 12px;
|
|
25004
|
+
}
|
|
25005
|
+
|
|
25006
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowCheckbox {
|
|
25007
|
+
border: 1.5px solid #fff;
|
|
25008
|
+
border-radius: 2px;
|
|
25009
|
+
margin-right: 8px;
|
|
25010
|
+
}
|
|
25011
|
+
|
|
25012
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowToggle {
|
|
25013
|
+
margin-right: 3px;
|
|
25014
|
+
}
|
|
25015
|
+
|
|
25016
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowTitle {
|
|
25017
|
+
color: #fff;
|
|
25018
|
+
font-size: 14px;
|
|
25019
|
+
margin-right: 8px;
|
|
25020
|
+
overflow: hidden;
|
|
25021
|
+
text-overflow: ellipsis;
|
|
25022
|
+
white-space: nowrap;
|
|
25023
|
+
}
|
|
25024
|
+
|
|
25025
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowCount {
|
|
25026
|
+
background: rgba(0, 175, 250, .2);
|
|
25027
|
+
border-radius: 11px;
|
|
25028
|
+
color: #18ffff;
|
|
25029
|
+
cursor: pointer;
|
|
25030
|
+
flex-shrink: 0;
|
|
25031
|
+
font-size: 12px;
|
|
25032
|
+
margin-right: 3px;
|
|
25033
|
+
padding: 5px 8px;
|
|
25034
|
+
}
|
|
25035
|
+
|
|
25036
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowQuickBar {
|
|
25037
|
+
display: flex;
|
|
25038
|
+
flex-shrink: 0;
|
|
25039
|
+
margin-left: auto;
|
|
25040
|
+
}
|
|
25041
|
+
|
|
25042
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowQuickBar >.NextspaceMenuItemRowQuickBarButton {
|
|
25043
|
+
align-items: center;
|
|
25044
|
+
cursor: pointer;
|
|
25045
|
+
display: flex;
|
|
25046
|
+
height: 20px;
|
|
25047
|
+
justify-content: center;
|
|
25048
|
+
margin-left: 4px;
|
|
25049
|
+
opacity: .7;
|
|
25050
|
+
transition: .3s ease;
|
|
25051
|
+
width: 20px;
|
|
25052
|
+
}
|
|
25053
|
+
|
|
25054
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowQuickBar >.NextspaceMenuItemRowQuickBarButton:hover {
|
|
25055
|
+
opacity: 1;
|
|
25056
|
+
}
|
|
25057
|
+
|
|
25058
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowQuickBar >.NextspaceMenuItemRowQuickBarButton[is-disabled="true"] {
|
|
25059
|
+
cursor: default;
|
|
25060
|
+
opacity: .3;
|
|
25061
|
+
}
|
|
25062
|
+
|
|
25063
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem >.NextspaceMenuItemRowQuickBar svg {
|
|
25064
|
+
height: 18px;
|
|
25065
|
+
width: 18px;
|
|
25066
|
+
}
|
|
25067
|
+
|
|
25068
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem[is-enabled="false"] >.NextspaceMenuItemRowCount,
|
|
25069
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem[is-enabled="false"] >.NextspaceMenuItemRowTitle,
|
|
25070
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem[is-enabled="false"] >.NextspaceMenuItemRowCheckbox,
|
|
25071
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem[is-enabled="false"] >.NextspaceMenuItemRowToggle {
|
|
25072
|
+
opacity: .5;
|
|
25073
|
+
}
|
|
25074
|
+
|
|
25075
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowItem[is-enabled="false"] >.NextspaceMenuItemRowQuickBar {
|
|
25076
|
+
opacity: 0;
|
|
25077
|
+
pointer-events: none;
|
|
25078
|
+
}
|
|
25079
|
+
|
|
25080
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowDescription {
|
|
25081
|
+
font-size: 12px;
|
|
25082
|
+
margin: 0 0 8px 0;
|
|
25083
|
+
opacity: .7;
|
|
25084
|
+
}
|
|
25085
|
+
|
|
25086
|
+
.NextspaceMenuItemRow >.NextspaceMenuItemRowChildren {
|
|
25087
|
+
border-top: 2px solid #121619;
|
|
25088
|
+
display: flex;
|
|
25089
|
+
flex-direction: column;
|
|
25090
|
+
}
|
|
25091
|
+
|
|
25092
|
+
.NextspaceMenuItemRow[show-children="false"] >.NextspaceMenuItemRowChildren {
|
|
25093
|
+
display: none;
|
|
25094
|
+
}
|
|
25095
|
+
`;
|
|
25096
|
+
document.head.appendChild(style);
|
|
25097
|
+
}
|
|
25098
|
+
_generateElement() {
|
|
25099
|
+
const element = document.createElement("div");
|
|
25100
|
+
element.className = "NextspaceLeftPanelTabMenuItems";
|
|
25101
|
+
const titleBar = document.createElement("div");
|
|
25102
|
+
titleBar.className = "NextspaceLeftPanelTabMenuItemsTitleBar";
|
|
25103
|
+
titleBar.textContent = "Menu";
|
|
25104
|
+
element.appendChild(titleBar);
|
|
25105
|
+
const breaker = document.createElement("div");
|
|
25106
|
+
breaker.className = "NextspaceLeftPanelTabMenuItemsTitleBreaker";
|
|
25107
|
+
element.appendChild(breaker);
|
|
25108
|
+
const tip = document.createElement("div");
|
|
25109
|
+
tip.className = "NextspaceLeftPanelTabMenuItemsTip";
|
|
25110
|
+
tip.textContent = "Loading...";
|
|
25111
|
+
element.appendChild(tip);
|
|
25112
|
+
this._tip = tip;
|
|
25113
|
+
const scrollBox = document.createElement("div");
|
|
25114
|
+
scrollBox.className = "NextspaceLeftPanelTabMenuItemsScrollBox";
|
|
25115
|
+
element.appendChild(scrollBox);
|
|
25116
|
+
this._scrollBox = scrollBox;
|
|
25117
|
+
// Positions against the panel container, which is the nearest positioned ancestor.
|
|
25118
|
+
const resizeHandle = document.createElement("div");
|
|
25119
|
+
resizeHandle.className = "NextspaceLeftPanelTabMenuItemsResizeHandle";
|
|
25120
|
+
resizeHandle.onmousedown = (e) => {
|
|
25121
|
+
this._startResize(e);
|
|
25122
|
+
};
|
|
25123
|
+
element.appendChild(resizeHandle);
|
|
25124
|
+
this.Container.appendChild(element);
|
|
25125
|
+
this._element = element;
|
|
25126
|
+
}
|
|
25127
|
+
_getStoredWidth() {
|
|
25128
|
+
try {
|
|
25129
|
+
const stored = parseInt(window.localStorage.getItem(PANEL_WIDTH_STORAGE_KEY), 10);
|
|
25130
|
+
if (!isNaN(stored)) {
|
|
25131
|
+
return stored;
|
|
25132
|
+
}
|
|
25133
|
+
}
|
|
25134
|
+
catch (e) {
|
|
25135
|
+
// Storage can be unavailable (private mode, blocked cookies). The default width still works.
|
|
25136
|
+
}
|
|
25137
|
+
return PANEL_DEFAULT_WIDTH;
|
|
25138
|
+
}
|
|
25139
|
+
/**
|
|
25140
|
+
* Sizes the shared panel container to this tab's width, clamped to the allowed range.
|
|
25141
|
+
*/
|
|
25142
|
+
_applyPanelWidth(width) {
|
|
25143
|
+
const clamped = Math.min(PANEL_MAX_WIDTH, Math.max(PANEL_MIN_WIDTH, width));
|
|
25144
|
+
if (this.Container) {
|
|
25145
|
+
this.Container.style.width = clamped + "px";
|
|
25146
|
+
// Padding lives on this tab's own element instead, so the resize handle can reach the panel edge.
|
|
25147
|
+
this.Container.style.padding = "0";
|
|
25148
|
+
}
|
|
25149
|
+
return clamped;
|
|
25150
|
+
}
|
|
25151
|
+
_startResize(e) {
|
|
25152
|
+
e.preventDefault();
|
|
25153
|
+
const startX = e.clientX;
|
|
25154
|
+
const startWidth = this.Container ? this.Container.offsetWidth : PANEL_DEFAULT_WIDTH;
|
|
25155
|
+
this._onResizeMove = (moveEvent) => {
|
|
25156
|
+
this._applyPanelWidth(startWidth + (moveEvent.clientX - startX));
|
|
25157
|
+
};
|
|
25158
|
+
this._onResizeUp = () => {
|
|
25159
|
+
const finalWidth = this._applyPanelWidth(this.Container ? this.Container.offsetWidth : PANEL_DEFAULT_WIDTH);
|
|
25160
|
+
try {
|
|
25161
|
+
window.localStorage.setItem(PANEL_WIDTH_STORAGE_KEY, String(finalWidth));
|
|
25162
|
+
}
|
|
25163
|
+
catch (err) {
|
|
25164
|
+
console.warn(err);
|
|
25165
|
+
}
|
|
25166
|
+
this._endResize();
|
|
25167
|
+
};
|
|
25168
|
+
window.addEventListener("mousemove", this._onResizeMove);
|
|
25169
|
+
window.addEventListener("mouseup", this._onResizeUp);
|
|
25170
|
+
}
|
|
25171
|
+
_endResize() {
|
|
25172
|
+
if (this._onResizeMove) {
|
|
25173
|
+
window.removeEventListener("mousemove", this._onResizeMove);
|
|
25174
|
+
this._onResizeMove = null;
|
|
25175
|
+
}
|
|
25176
|
+
if (this._onResizeUp) {
|
|
25177
|
+
window.removeEventListener("mouseup", this._onResizeUp);
|
|
25178
|
+
this._onResizeUp = null;
|
|
25179
|
+
}
|
|
25180
|
+
}
|
|
25181
|
+
async _loadMenuItems() {
|
|
25182
|
+
var _a, _b, _c, _d;
|
|
25183
|
+
const viewId = (_a = this._widget) === null || _a === void 0 ? void 0 : _a.ViewId;
|
|
25184
|
+
const token = ++this._loadToken;
|
|
25185
|
+
let menuItems = [];
|
|
25186
|
+
try {
|
|
25187
|
+
if (viewId) {
|
|
25188
|
+
const api = (_b = this._widget._getApiGetters()) === null || _b === void 0 ? void 0 : _b.GetBruceApi();
|
|
25189
|
+
const data = await BModels.ProjectView.Get({
|
|
25190
|
+
viewId,
|
|
25191
|
+
api
|
|
25192
|
+
});
|
|
25193
|
+
const settings = (_c = data === null || data === void 0 ? void 0 : data.view) === null || _c === void 0 ? void 0 : _c.Settings;
|
|
25194
|
+
menuItems = (_d = settings === null || settings === void 0 ? void 0 : settings.menuItems) !== null && _d !== void 0 ? _d : [];
|
|
25195
|
+
}
|
|
25196
|
+
}
|
|
25197
|
+
catch (e) {
|
|
25198
|
+
console.error(e);
|
|
25199
|
+
menuItems = [];
|
|
25200
|
+
}
|
|
25201
|
+
if (this._disposed || token !== this._loadToken) {
|
|
25202
|
+
return;
|
|
25203
|
+
}
|
|
25204
|
+
this._menuItems = menuItems;
|
|
25205
|
+
this._renderTree();
|
|
25206
|
+
this._updateStates();
|
|
25207
|
+
this._updateCounts();
|
|
25208
|
+
}
|
|
25209
|
+
_renderTree() {
|
|
25210
|
+
var _a;
|
|
25211
|
+
this._rows.clear();
|
|
25212
|
+
this._scrollBox.innerHTML = "";
|
|
25213
|
+
if (!this._menuItems.length) {
|
|
25214
|
+
// The panel can be opened before any view has rendered, so say so rather than claiming it's empty.
|
|
25215
|
+
this._tip.textContent = ((_a = this._widget) === null || _a === void 0 ? void 0 : _a.ViewId)
|
|
25216
|
+
? "This project view has no menu items."
|
|
25217
|
+
: "Waiting for a view to load...";
|
|
25218
|
+
this._tip.style.display = "block";
|
|
25219
|
+
return;
|
|
25220
|
+
}
|
|
25221
|
+
this._tip.style.display = "none";
|
|
25222
|
+
for (const item of this._menuItems) {
|
|
25223
|
+
this._renderRow(item, 0, this._scrollBox);
|
|
25224
|
+
}
|
|
25225
|
+
}
|
|
25226
|
+
_renderRow(item, depth, parent) {
|
|
25227
|
+
var _a;
|
|
25228
|
+
if (!(item === null || item === void 0 ? void 0 : item.id)) {
|
|
25229
|
+
return;
|
|
25230
|
+
}
|
|
25231
|
+
const isFolder = !item.Type || item.Type === BModels.MenuItem.EType.None;
|
|
25232
|
+
const children = item.hideChildren ? [] : ((_a = item.Children) !== null && _a !== void 0 ? _a : []);
|
|
25233
|
+
const hasChildren = children.length > 0;
|
|
25234
|
+
const row = document.createElement("div");
|
|
25235
|
+
row.className = "NextspaceMenuItemRow";
|
|
25236
|
+
row.setAttribute("menu-item-id", item.id);
|
|
25237
|
+
const itemElement = document.createElement("div");
|
|
25238
|
+
itemElement.className = "NextspaceMenuItemRowItem";
|
|
25239
|
+
itemElement.style.paddingLeft = (depth * 15) + "px";
|
|
25240
|
+
row.appendChild(itemElement);
|
|
25241
|
+
if (hasChildren) {
|
|
25242
|
+
const toggle = document.createElement("div");
|
|
25243
|
+
toggle.className = "NextspaceMenuItemRowToggle";
|
|
25244
|
+
toggle.onclick = () => {
|
|
25245
|
+
this._setOpen(item.id, depth, row.getAttribute("show-children") !== "true", row, toggle);
|
|
25246
|
+
};
|
|
25247
|
+
itemElement.appendChild(toggle);
|
|
25248
|
+
const opened = this._getOpen(item.id, depth);
|
|
25249
|
+
row.setAttribute("show-children", opened ? "true" : "false");
|
|
25250
|
+
toggle.innerHTML = opened ? ICON_CHEV_DOWN : ICON_CHEV_RIGHT;
|
|
25251
|
+
}
|
|
25252
|
+
else if (depth > 0) {
|
|
25253
|
+
const bracket = document.createElement("div");
|
|
25254
|
+
bracket.className = "NextspaceMenuItemRowBracket";
|
|
25255
|
+
bracket.innerHTML = ICON_BRACKET;
|
|
25256
|
+
itemElement.appendChild(bracket);
|
|
25257
|
+
row.setAttribute("show-children", "false");
|
|
25258
|
+
}
|
|
25259
|
+
else {
|
|
25260
|
+
row.setAttribute("show-children", "false");
|
|
25261
|
+
}
|
|
25262
|
+
const checkbox = document.createElement("div");
|
|
25263
|
+
checkbox.className = "NextspaceMenuItemRowCheckbox";
|
|
25264
|
+
checkbox.onclick = () => {
|
|
25265
|
+
this._toggleItem(item);
|
|
25266
|
+
};
|
|
25267
|
+
itemElement.appendChild(checkbox);
|
|
25268
|
+
const title = document.createElement("div");
|
|
25269
|
+
title.className = "NextspaceMenuItemRowTitle";
|
|
25270
|
+
title.textContent = item.Caption || "Unnamed Menu Item";
|
|
25271
|
+
title.title = item.Caption || "Unnamed Menu Item";
|
|
25272
|
+
itemElement.appendChild(title);
|
|
25273
|
+
// Folders have no visuals of their own, so a count would always read zero.
|
|
25274
|
+
let count = null;
|
|
25275
|
+
if (!isFolder) {
|
|
25276
|
+
count = document.createElement("div");
|
|
25277
|
+
count.className = "NextspaceMenuItemRowCount";
|
|
25278
|
+
count.style.display = "none";
|
|
25279
|
+
count.onclick = () => {
|
|
25280
|
+
this._selectItemEntities(item);
|
|
25281
|
+
};
|
|
25282
|
+
itemElement.appendChild(count);
|
|
25283
|
+
}
|
|
25284
|
+
const quickBar = document.createElement("div");
|
|
25285
|
+
quickBar.className = "NextspaceMenuItemRowQuickBar";
|
|
25286
|
+
itemElement.appendChild(quickBar);
|
|
25287
|
+
if (!isFolder) {
|
|
25288
|
+
const flyTo = document.createElement("div");
|
|
25289
|
+
flyTo.className = "NextspaceMenuItemRowQuickBarButton";
|
|
25290
|
+
flyTo.title = "Fly to";
|
|
25291
|
+
flyTo.innerHTML = ICON_FLY_TO;
|
|
25292
|
+
flyTo.onclick = () => {
|
|
25293
|
+
this._flyToItem(item, flyTo);
|
|
25294
|
+
};
|
|
25295
|
+
quickBar.appendChild(flyTo);
|
|
25296
|
+
}
|
|
25297
|
+
if (item.Description) {
|
|
25298
|
+
const description = document.createElement("p");
|
|
25299
|
+
description.className = "NextspaceMenuItemRowDescription";
|
|
25300
|
+
description.style.paddingLeft = (depth * 15) + "px";
|
|
25301
|
+
description.textContent = item.Description;
|
|
25302
|
+
row.appendChild(description);
|
|
25303
|
+
}
|
|
25304
|
+
const childrenElement = document.createElement("div");
|
|
25305
|
+
childrenElement.className = "NextspaceMenuItemRowChildren";
|
|
25306
|
+
row.appendChild(childrenElement);
|
|
25307
|
+
parent.appendChild(row);
|
|
25308
|
+
this._rows.set(item.id, {
|
|
25309
|
+
item,
|
|
25310
|
+
depth,
|
|
25311
|
+
element: row,
|
|
25312
|
+
itemElement,
|
|
25313
|
+
checkboxElement: checkbox,
|
|
25314
|
+
countElement: count,
|
|
25315
|
+
childrenElement
|
|
25316
|
+
});
|
|
25317
|
+
for (const child of children) {
|
|
25318
|
+
this._renderRow(child, depth + 1, childrenElement);
|
|
25319
|
+
}
|
|
25320
|
+
}
|
|
25321
|
+
_getOpen(itemId, depth) {
|
|
25322
|
+
try {
|
|
25323
|
+
return window.localStorage.getItem(OPEN_STATE_STORAGE_PREFIX$1 + itemId + depth) === "true";
|
|
25324
|
+
}
|
|
25325
|
+
catch (e) {
|
|
25326
|
+
// Storage can be unavailable (private mode, blocked cookies). Not worth failing the tree over.
|
|
25327
|
+
return false;
|
|
25328
|
+
}
|
|
25329
|
+
}
|
|
25330
|
+
_setOpen(itemId, depth, open, row, toggle) {
|
|
25331
|
+
row.setAttribute("show-children", open ? "true" : "false");
|
|
25332
|
+
toggle.innerHTML = open ? ICON_CHEV_DOWN : ICON_CHEV_RIGHT;
|
|
25333
|
+
try {
|
|
25334
|
+
window.localStorage.setItem(OPEN_STATE_STORAGE_PREFIX$1 + itemId + depth, open ? "true" : "false");
|
|
25335
|
+
}
|
|
25336
|
+
catch (e) {
|
|
25337
|
+
console.warn(e);
|
|
25338
|
+
}
|
|
25339
|
+
}
|
|
25340
|
+
/**
|
|
25341
|
+
* Resolves each row's state from what the manager currently has rendered.
|
|
25342
|
+
*/
|
|
25343
|
+
_updateStates() {
|
|
25344
|
+
var _a;
|
|
25345
|
+
const manager = (_a = this._widget) === null || _a === void 0 ? void 0 : _a._getManager();
|
|
25346
|
+
if (!manager || this._disposed) {
|
|
25347
|
+
return;
|
|
25348
|
+
}
|
|
25349
|
+
const enabledIds = new Set(manager.GetEnabledItemIds());
|
|
25350
|
+
for (const row of Array.from(this._rows.values())) {
|
|
25351
|
+
const state = this._resolveState(row.item, enabledIds);
|
|
25352
|
+
row.itemElement.setAttribute("is-enabled", state === exports.EMenuItemState.Disabled ? "false" : "true");
|
|
25353
|
+
if (state === exports.EMenuItemState.Enabled) {
|
|
25354
|
+
row.checkboxElement.innerHTML = ICON_CHECK;
|
|
25355
|
+
}
|
|
25356
|
+
else if (state === exports.EMenuItemState.ChildEnabled) {
|
|
25357
|
+
row.checkboxElement.innerHTML = ICON_PARTIAL_CHECK;
|
|
25358
|
+
}
|
|
25359
|
+
else {
|
|
25360
|
+
row.checkboxElement.innerHTML = "";
|
|
25361
|
+
}
|
|
25362
|
+
}
|
|
25363
|
+
}
|
|
25364
|
+
/**
|
|
25365
|
+
* Works out a single item's state, rolling up children so a folder can report a partial state.
|
|
25366
|
+
*/
|
|
25367
|
+
_resolveState(item, enabledIds) {
|
|
25368
|
+
var _a;
|
|
25369
|
+
const isFolder = !item.Type || item.Type === BModels.MenuItem.EType.None;
|
|
25370
|
+
if (!isFolder) {
|
|
25371
|
+
return enabledIds.has(item.id) ? exports.EMenuItemState.Enabled : exports.EMenuItemState.Disabled;
|
|
25372
|
+
}
|
|
25373
|
+
// Folders derive from the leaves below them rather than their own enabled flag.
|
|
25374
|
+
let actionCount = 0;
|
|
25375
|
+
let enabledActionCount = 0;
|
|
25376
|
+
const traverse = (current) => {
|
|
25377
|
+
var _a;
|
|
25378
|
+
const currentIsFolder = !current.Type || current.Type === BModels.MenuItem.EType.None;
|
|
25379
|
+
if (!currentIsFolder) {
|
|
25380
|
+
actionCount += 1;
|
|
25381
|
+
if (enabledIds.has(current.id)) {
|
|
25382
|
+
enabledActionCount += 1;
|
|
25383
|
+
}
|
|
25384
|
+
return;
|
|
25385
|
+
}
|
|
25386
|
+
if ((_a = current.Children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
25387
|
+
current.Children.forEach(traverse);
|
|
25388
|
+
}
|
|
25389
|
+
};
|
|
25390
|
+
(_a = item.Children) === null || _a === void 0 ? void 0 : _a.forEach(traverse);
|
|
25391
|
+
if (actionCount <= 0) {
|
|
25392
|
+
return enabledIds.has(item.id) ? exports.EMenuItemState.Enabled : exports.EMenuItemState.Disabled;
|
|
25393
|
+
}
|
|
25394
|
+
if (enabledActionCount <= 0) {
|
|
25395
|
+
return exports.EMenuItemState.Disabled;
|
|
25396
|
+
}
|
|
25397
|
+
return enabledActionCount >= actionCount ? exports.EMenuItemState.Enabled : exports.EMenuItemState.ChildEnabled;
|
|
25398
|
+
}
|
|
25399
|
+
_updateCounts() {
|
|
25400
|
+
var _a, _b;
|
|
25401
|
+
const register = (_b = (_a = this._widget) === null || _a === void 0 ? void 0 : _a._getManager()) === null || _b === void 0 ? void 0 : _b.VisualsRegister;
|
|
25402
|
+
if (!register || this._disposed) {
|
|
25403
|
+
return;
|
|
25404
|
+
}
|
|
25405
|
+
for (const row of Array.from(this._rows.values())) {
|
|
25406
|
+
if (!row.countElement) {
|
|
25407
|
+
continue;
|
|
25408
|
+
}
|
|
25409
|
+
const count = register.GetRegos({
|
|
25410
|
+
menuItemId: row.item.id
|
|
25411
|
+
}).length;
|
|
25412
|
+
row.countElement.style.display = count > 0 ? "block" : "none";
|
|
25413
|
+
row.countElement.textContent = count.toLocaleString();
|
|
25414
|
+
}
|
|
25415
|
+
}
|
|
25416
|
+
_toggleItem(item) {
|
|
25417
|
+
var _a;
|
|
25418
|
+
const manager = (_a = this._widget) === null || _a === void 0 ? void 0 : _a._getManager();
|
|
25419
|
+
if (!manager) {
|
|
25420
|
+
return;
|
|
25421
|
+
}
|
|
25422
|
+
const enabledIds = new Set(manager.GetEnabledItemIds());
|
|
25423
|
+
const state = this._resolveState(item, enabledIds);
|
|
25424
|
+
if (state === exports.EMenuItemState.Enabled) {
|
|
25425
|
+
this._disableItem(item);
|
|
25426
|
+
}
|
|
25427
|
+
else {
|
|
25428
|
+
manager.RenderItem({
|
|
25429
|
+
item
|
|
25430
|
+
});
|
|
25431
|
+
}
|
|
25432
|
+
this._stateQueue.Call(true);
|
|
25433
|
+
}
|
|
25434
|
+
_disableItem(item) {
|
|
25435
|
+
var _a, _b;
|
|
25436
|
+
const manager = (_a = this._widget) === null || _a === void 0 ? void 0 : _a._getManager();
|
|
25437
|
+
if (!manager) {
|
|
25438
|
+
return;
|
|
25439
|
+
}
|
|
25440
|
+
if ((_b = item.Children) === null || _b === void 0 ? void 0 : _b.length) {
|
|
25441
|
+
item.Children.forEach((child) => this._disableItem(child));
|
|
25442
|
+
}
|
|
25443
|
+
manager.RemoveItemById({
|
|
25444
|
+
menuItemId: item.id
|
|
25445
|
+
});
|
|
25446
|
+
}
|
|
25447
|
+
_selectItemEntities(item) {
|
|
25448
|
+
var _a, _b;
|
|
25449
|
+
const register = (_b = (_a = this._widget) === null || _a === void 0 ? void 0 : _a._getManager()) === null || _b === void 0 ? void 0 : _b.VisualsRegister;
|
|
25450
|
+
if (!register) {
|
|
25451
|
+
return;
|
|
25452
|
+
}
|
|
25453
|
+
const entityIds = register.GetRegos({
|
|
25454
|
+
menuItemId: item.id
|
|
25455
|
+
}).map(x => x.entityId);
|
|
25456
|
+
if (!entityIds.length) {
|
|
25457
|
+
return;
|
|
25458
|
+
}
|
|
25459
|
+
register.ClearSelected();
|
|
25460
|
+
register.SetSelected({
|
|
25461
|
+
selected: true,
|
|
25462
|
+
entityIds,
|
|
25463
|
+
menuItemId: item.id
|
|
25464
|
+
});
|
|
25465
|
+
}
|
|
25466
|
+
/**
|
|
25467
|
+
* Flies the camera to a menu item's contents.
|
|
25468
|
+
* Tileset-backed items fall back to the tileset's own bounds when no entity visuals are registered.
|
|
25469
|
+
*/
|
|
25470
|
+
async _flyToItem(item, button) {
|
|
25471
|
+
var _a, _b, _c, _d;
|
|
25472
|
+
if (this._flying.has(item.id)) {
|
|
25473
|
+
return;
|
|
25474
|
+
}
|
|
25475
|
+
const manager = (_a = this._widget) === null || _a === void 0 ? void 0 : _a._getManager();
|
|
25476
|
+
const viewer = (_b = this._widget) === null || _b === void 0 ? void 0 : _b._getViewer();
|
|
25477
|
+
if (!manager || !viewer) {
|
|
25478
|
+
return;
|
|
25479
|
+
}
|
|
25480
|
+
this._flying.add(item.id);
|
|
25481
|
+
button.setAttribute("is-disabled", "true");
|
|
25482
|
+
try {
|
|
25483
|
+
const regos = manager.VisualsRegister.GetRegos({
|
|
25484
|
+
menuItemId: item.id
|
|
25485
|
+
}).filter(x => !!(x === null || x === void 0 ? void 0 : x.visual) && !(x.visual instanceof Cesium.Cesium3DTileFeature));
|
|
25486
|
+
let tileset = null;
|
|
25487
|
+
if (!regos.length && TILESET_TYPES.indexOf(item.Type) >= 0) {
|
|
25488
|
+
const enabled = manager.GetEnabledItem(item.id);
|
|
25489
|
+
tileset = (_d = (_c = enabled === null || enabled === void 0 ? void 0 : enabled.renderManager) === null || _c === void 0 ? void 0 : _c.Tileset) !== null && _d !== void 0 ? _d : null;
|
|
25490
|
+
}
|
|
25491
|
+
const entityIds = regos.map(x => x.entityId);
|
|
25492
|
+
if (!entityIds.length && !tileset) {
|
|
25493
|
+
return;
|
|
25494
|
+
}
|
|
25495
|
+
await exports.EntityUtils.FlyTo({
|
|
25496
|
+
viewer,
|
|
25497
|
+
manager,
|
|
25498
|
+
entityIds: entityIds.length ? entityIds : null,
|
|
25499
|
+
tileset
|
|
25500
|
+
});
|
|
25501
|
+
}
|
|
25502
|
+
catch (e) {
|
|
25503
|
+
console.error(e);
|
|
25504
|
+
}
|
|
25505
|
+
finally {
|
|
25506
|
+
this._flying.delete(item.id);
|
|
25507
|
+
button.setAttribute("is-disabled", "false");
|
|
25508
|
+
}
|
|
25509
|
+
}
|
|
25510
|
+
}
|
|
25511
|
+
|
|
25512
|
+
// Nextspace wordmark, and the "powered by" variant shown once an account or view supplies its own branding.
|
|
25513
|
+
const ICON_NEXTSPACE_LEAF = `<svg width="1000" height="244" viewBox="0 0 1000 244" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M349.751 182.492H335.798L269.898 85.099V182.492H254.432V61.5086H271.411L334.117 155.027V61.5086H349.752V182.492H349.751ZM364.626 138.513C364.626 112.227 381.269 92.6809 405.141 92.6809C429.685 92.6809 442.629 111.385 442.629 135.817V140.872H379.083C379.924 159.408 390.515 171.204 405.813 171.204C417.581 171.204 425.987 164.8 428.676 154.351L441.957 159.07C436.578 174.741 423.296 184.346 405.813 184.346C381.437 184.346 364.626 165.642 364.626 138.512V138.513ZM379.924 129.246H427.331C426.995 116.777 420.27 105.655 404.972 105.655C392.196 105.655 382.613 114.25 379.924 129.246V129.246ZM484.909 147.781L460.701 182.492H444.225L476.335 136.492L446.915 94.3659H464.231L485.413 125.201L506.931 94.3659H523.574L494.155 136.492L526.432 182.492H509.285L484.909 147.781H484.909ZM533.49 68.5854H548.452V94.3659H568.457V107.342H548.452V159.071C548.452 168.338 552.991 170.023 560.724 170.023C564.255 170.023 566.776 169.855 570.307 169.013V181.988C566.44 182.831 562.069 183.334 557.026 183.334C542.064 183.334 533.49 178.28 533.49 161.43V68.5854H533.49ZM588.062 155.194C592.77 165.475 603.529 171.708 614.96 171.708C625.215 171.708 634.293 167.328 634.293 157.723C634.293 148.119 625.888 146.769 611.43 143.737C596.972 140.537 581.842 137.335 581.842 119.304C581.842 103.633 595.46 92.6812 614.12 92.6812C629.923 92.6812 642.867 100.431 648.078 110.88L637.319 119.472C632.78 110.712 624.543 105.151 613.447 105.151C603.36 105.151 596.636 110.205 596.636 118.126C596.636 126.381 604.37 127.898 616.642 130.595C631.772 134.133 649.087 137.165 649.087 156.376C649.087 173.225 633.789 184.347 614.96 184.347C598.99 184.347 583.019 177.437 576.295 163.79L588.062 155.194V155.194ZM678.082 169.687V210.969H662.952V94.3659H678.082V107.172C683.294 98.5782 693.045 92.6809 705.316 92.6809C729.693 92.6809 743.646 113.407 743.646 138.513C743.646 163.451 729.693 184.346 705.316 184.346C693.045 184.346 683.294 178.449 678.082 169.687ZM677.747 141.715C677.747 161.935 690.187 171.035 702.627 171.035C719.102 171.035 728.348 157.386 728.348 138.513C728.348 119.472 719.102 105.992 702.627 105.992C690.187 105.992 677.747 114.924 677.747 135.48V141.715V141.715ZM753.597 158.733C753.597 141.21 767.214 133.965 786.883 129.92L808.233 125.539V121.831C808.233 111.722 802.685 105.993 790.917 105.993C779.822 105.993 773.265 111.215 770.575 120.989L756.286 117.284C760.489 102.96 773.433 92.6816 791.421 92.6816C811.09 92.6816 823.194 102.286 823.194 121.157V164.126C823.194 169.855 826.725 171.708 832.609 170.361V182.492C819.16 184.177 811.426 180.977 809.577 172.55C804.198 179.459 794.447 184.009 782.512 184.009C766.541 184.009 753.596 174.574 753.596 158.734L753.597 158.733ZM808.233 137.334L791.085 141.04C777.636 143.737 768.558 147.444 768.558 158.06C768.558 166.653 774.779 171.707 784.361 171.707C797.306 171.707 808.233 163.79 808.233 152.499V137.334ZM879.593 171.034C891.697 171.034 898.926 163.283 901.447 152.331L914.896 158.565C910.694 173.224 897.917 184.346 879.593 184.346C855.049 184.346 838.069 165.642 838.069 138.512C838.069 111.215 855.049 92.6806 879.593 92.6806C897.917 92.6806 910.357 103.297 914.56 117.956L901.448 124.528C898.926 113.744 891.697 105.824 879.593 105.824C863.959 105.824 853.2 118.293 853.2 138.512C853.2 158.565 863.959 171.034 879.593 171.034L879.593 171.034ZM921.996 138.512C921.996 112.227 938.639 92.6806 962.511 92.6806C987.056 92.6806 1000 111.384 1000 135.817V140.872H936.454C937.294 159.408 947.886 171.204 963.184 171.204C974.951 171.204 983.357 164.8 986.047 154.351L999.328 159.07C993.948 174.741 980.667 184.346 963.184 184.346C938.808 184.346 921.996 165.642 921.996 138.512V138.512ZM937.294 129.245H984.702C984.365 116.776 977.641 105.655 962.343 105.655C949.566 105.655 939.984 114.249 937.294 129.245V129.245ZM200.35 56.2656L109.823 1.82319C105.779 -0.607899 100.756 -0.607562 96.7125 1.82319L6.18535 56.266C2.37013 58.561 0 62.7567 0 67.2163V176.783C0 181.243 2.37013 185.439 6.18535 187.734L51.5924 215.041L51.5948 215.043L96.7125 242.177C98.7343 243.392 101 244 103.268 244C105.535 244 107.801 243.392 109.823 242.177L154.941 215.043L154.943 215.041L200.35 187.733C204.165 185.439 206.535 181.243 206.535 176.783V67.2163C206.535 62.7564 204.165 58.5606 200.35 56.2656H200.35ZM201.171 176.783C201.171 179.365 199.799 181.794 197.59 183.123L156.243 207.989V157.954C156.243 153.494 153.873 149.298 150.057 147.003L109.823 122.806C105.78 120.375 100.757 120.376 96.7132 122.806L56.4782 147.004C52.663 149.298 50.2929 153.494 50.2929 157.954V207.989L8.94576 183.123C6.7369 181.794 5.36457 179.365 5.36457 176.783V67.2163C5.36457 64.6343 6.7369 62.2052 8.94576 60.8768L99.4729 6.43433C100.643 5.73028 101.955 5.37842 103.268 5.37842C104.581 5.37842 105.893 5.73028 107.063 6.43433L197.59 60.8768C199.799 62.2052 201.171 64.6346 201.171 67.2163V176.783ZM142.851 161.822L114.41 178.929C109.192 182.07 105.95 187.81 105.95 193.911V228.852C105.95 229.324 105.703 229.762 105.299 230.005L103.958 230.811C103.533 231.066 103.003 231.066 102.578 230.811L101.237 230.004C100.832 229.761 100.585 229.323 100.585 228.851V193.901C100.582 187.802 97.3398 182.065 92.1218 178.926L63.6845 161.822C63.2805 161.579 63.0334 161.141 63.0334 160.669V158.715C63.0334 158.243 63.2805 157.805 63.6845 157.562L64.6666 156.972C65.0914 156.716 65.6218 156.716 66.0466 156.972L94.3132 173.974C99.8417 177.291 106.705 177.289 112.232 173.968L140.491 156.971C140.916 156.716 141.446 156.716 141.871 156.971L142.851 157.561C143.256 157.804 143.503 158.241 143.503 158.714V160.669C143.503 161.142 143.256 161.579 142.851 161.822H142.851ZM193.144 71.0841C186.359 75.1646 164.709 88.1847 164.708 88.1857C159.487 91.3256 156.243 97.0672 156.243 103.17V139.732C156.243 140.222 155.978 140.672 155.551 140.909C155.124 141.145 154.602 141.131 154.189 140.871C154.184 140.868 154.183 140.871 154.18 140.869C154.071 140.801 153.964 140.73 153.853 140.664L151.53 139.267C151.126 139.024 150.879 138.586 150.879 138.114V103.17C150.879 97.0672 147.635 91.3252 142.414 88.1854C142.412 88.1844 106.331 66.5311 105.95 66.3815V112.285C105.95 112.656 105.797 113.011 105.527 113.265C105.257 113.519 104.894 113.65 104.525 113.627C104.522 113.627 104.522 113.628 104.52 113.628C103.686 113.576 102.851 113.576 102.017 113.628C102.015 113.628 102.013 113.627 102.01 113.627C101.641 113.65 101.278 113.52 101.008 113.266C100.738 113.011 100.585 112.657 100.585 112.286V66.3822C100.204 66.5317 64.1227 88.1854 64.1217 88.186C58.9006 91.3259 55.6571 97.0676 55.6571 103.171V138.114C55.6571 138.587 55.41 139.024 55.006 139.267L52.6824 140.665C52.5725 140.731 52.4652 140.801 52.3565 140.869C52.3532 140.87 52.3522 140.868 52.3471 140.871C51.9337 141.131 51.412 141.146 50.9849 140.909C50.5577 140.673 50.2925 140.222 50.2925 139.733V103.171C50.2925 97.0679 47.049 91.3262 41.8279 88.1864C41.8262 88.1854 20.1762 75.1649 13.3913 71.0847C12.9873 70.8418 12.7402 70.4042 12.7402 69.932V67.9782C12.7402 67.506 12.9873 67.0684 13.3913 66.8255L14.3734 66.2347C14.7982 65.9792 15.3286 65.9792 15.7531 66.2347C22.4373 70.2543 44.0042 83.2244 44.0046 83.2247C49.5341 86.5504 56.4034 86.5524 61.9346 83.2308L96.7125 62.3155C100.756 59.8847 105.779 59.8844 109.823 62.3155L144.599 83.2294C150.131 86.5521 157.001 86.5508 162.531 83.2244C162.531 83.2237 184.1 70.253 190.783 66.234C191.208 65.9786 191.738 65.9786 192.163 66.234L193.144 66.8241C193.548 67.0671 193.795 67.5046 193.795 67.9768V69.932C193.795 70.4042 193.548 70.8418 193.144 71.0847V71.0841Z" fill="white"/> </svg>`;
|
|
25514
|
+
const ICON_NEXTSPACE_POWERED = `<svg width="172" height="25" viewBox="0 0 172 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M104.849 18.698H103.419L96.6645 8.71916V18.698H95.0793V6.30211H96.8196L103.247 15.8839V6.30211H104.85V18.698H104.849ZM106.374 14.1919C106.374 11.4987 108.08 9.49599 110.527 9.49599C113.043 9.49599 114.369 11.4124 114.369 13.9157V14.4336H107.856C107.942 16.3328 109.028 17.5414 110.596 17.5414C111.802 17.5414 112.664 16.8852 112.939 15.8147L114.301 16.2982C113.749 17.9038 112.388 18.8879 110.596 18.8879C108.097 18.8879 106.374 16.9715 106.374 14.1918V14.1919ZM107.942 13.2424H112.801C112.767 11.9649 112.078 10.8253 110.51 10.8253C109.2 10.8253 108.218 11.7059 107.942 13.2424ZM118.703 15.1415L116.222 18.698H114.533L117.824 13.9848L114.809 9.66864H116.584L118.755 12.828L120.96 9.66864H122.666L119.651 13.9848L122.959 18.698H121.202L118.703 15.1415ZM123.683 7.02719H125.216V9.66864H127.267V10.9982H125.216V16.2983C125.216 17.2477 125.682 17.4204 126.474 17.4204C126.836 17.4204 127.095 17.4032 127.456 17.3169V18.6463C127.06 18.7327 126.612 18.7842 126.095 18.7842C124.562 18.7842 123.683 18.2664 123.683 16.54V7.02719ZM129.276 15.901C129.759 16.9544 130.862 17.593 132.033 17.593C133.085 17.593 134.015 17.1443 134.015 16.1601C134.015 15.1761 133.154 15.0378 131.672 14.7272C130.19 14.3993 128.639 14.0712 128.639 12.2238C128.639 10.6181 130.035 9.49602 131.947 9.49602C133.567 9.49602 134.894 10.2901 135.428 11.3607L134.325 12.241C133.86 11.3434 133.016 10.7737 131.878 10.7737C130.844 10.7737 130.155 11.2915 130.155 12.1031C130.155 12.9489 130.948 13.1043 132.206 13.3806C133.757 13.7431 135.531 14.0538 135.531 16.0221C135.531 17.7485 133.963 18.888 132.033 18.888C130.396 18.888 128.759 18.18 128.07 16.7818L129.276 15.901ZM138.503 17.386V21.6157H136.953V9.66864H138.503V10.9807C139.038 10.1002 140.037 9.49599 141.295 9.49599C143.794 9.49599 145.224 11.6196 145.224 14.1919C145.224 16.747 143.794 18.8879 141.295 18.8879C140.037 18.8879 139.038 18.2837 138.503 17.386ZM138.469 14.52C138.469 16.5917 139.744 17.5241 141.019 17.5241C142.708 17.5241 143.656 16.1256 143.656 14.1919C143.656 12.241 142.708 10.8598 141.019 10.8598C139.744 10.8598 138.469 11.775 138.469 13.8811V14.52ZM146.244 16.2636C146.244 14.4682 147.639 13.7259 149.656 13.3115L151.844 12.8626V12.4827C151.844 11.4469 151.275 10.8599 150.069 10.8599C148.932 10.8599 148.26 11.395 147.984 12.3964L146.519 12.0168C146.95 10.5492 148.277 9.49607 150.121 9.49607C152.137 9.49607 153.377 10.4801 153.377 12.4136V16.8162C153.377 17.4032 153.739 17.593 154.342 17.455V18.698C152.964 18.8706 152.171 18.5427 151.982 17.6793C151.43 18.3872 150.431 18.8534 149.207 18.8534C147.57 18.8534 146.244 17.8867 146.244 16.2637L146.244 16.2636ZM151.844 14.0711L150.086 14.4508C148.708 14.7272 147.777 15.107 147.777 16.1947C147.777 17.0751 148.415 17.5929 149.397 17.5929C150.724 17.5929 151.844 16.7818 151.844 15.6249V14.0711ZM159.158 17.524C160.399 17.524 161.14 16.7298 161.398 15.6077L162.777 16.2464C162.346 17.7484 161.036 18.8879 159.158 18.8879C156.643 18.8879 154.902 16.9715 154.902 14.1918C154.902 11.395 156.643 9.49596 159.158 9.49596C161.036 9.49596 162.312 10.5837 162.742 12.0857L161.398 12.759C161.14 11.6541 160.399 10.8426 159.158 10.8426C157.556 10.8426 156.453 12.1202 156.453 14.1918C156.453 16.2464 157.556 17.524 159.158 17.524ZM163.505 14.1918C163.505 11.4987 165.21 9.49596 167.657 9.49596C170.173 9.49596 171.5 11.4123 171.5 13.9157V14.4336H164.987C165.073 16.3328 166.158 17.5414 167.726 17.5414C168.932 17.5414 169.794 16.8852 170.07 15.8147L171.431 16.2982C170.88 17.9038 169.518 18.8879 167.726 18.8879C165.228 18.8879 163.505 16.9715 163.505 14.1918ZM165.073 13.2423H169.932C169.897 11.9648 169.208 10.8253 167.64 10.8253C166.331 10.8253 165.348 11.7058 165.073 13.2423ZM89.5359 5.76492L80.2569 0.186802C79.8423 -0.0622847 79.3275 -0.0622502 78.913 0.186802L69.634 5.76496C69.2429 6.0001 69 6.42999 69 6.88692V18.113C69 18.57 69.2429 18.9999 69.634 19.235L74.2882 22.0329L74.2885 22.0331L78.913 24.8132C79.1203 24.9377 79.3525 25 79.585 25C79.8173 25 80.0496 24.9377 80.2569 24.8132L84.8815 22.0331L84.8817 22.0329L89.5359 19.2349C89.9269 18.9999 90.1698 18.57 90.1698 18.113V6.88692C90.1698 6.42996 89.9269 6.00006 89.5359 5.76492ZM89.62 18.113C89.62 18.3776 89.4794 18.6264 89.253 18.7626L85.0149 21.3103V16.1838C85.0149 15.7268 84.772 15.2969 84.3808 15.0618L80.2569 12.5826C79.8425 12.3335 79.3276 12.3336 78.9131 12.5826L74.789 15.0619C74.398 15.2969 74.155 15.7268 74.155 16.1838V21.3103L69.9169 18.7626C69.6905 18.6264 69.5499 18.3776 69.5499 18.113V6.88692C69.5499 6.62237 69.6905 6.37348 69.9169 6.23738L79.196 0.659255C79.3159 0.587119 79.4504 0.551068 79.585 0.551068C79.7196 0.551068 79.854 0.587119 79.974 0.659255L89.253 6.23738C89.4794 6.37348 89.62 6.6224 89.62 6.88692V18.113ZM83.6422 16.5801L80.727 18.3329C80.1922 18.6547 79.8599 19.2428 79.8599 19.8679V23.448C79.8599 23.4963 79.8346 23.5412 79.7931 23.5661L79.6557 23.6487C79.6121 23.6748 79.5578 23.6748 79.5142 23.6487L79.3768 23.566C79.3353 23.5411 79.31 23.4962 79.31 23.4478V19.8669C79.3097 19.242 78.9773 18.6542 78.4425 18.3326L75.5277 16.5801C75.4863 16.5552 75.4609 16.5103 75.4609 16.462V16.2618C75.4609 16.2134 75.4863 16.1685 75.5277 16.1436L75.6283 16.0832C75.6719 16.057 75.7262 16.057 75.7698 16.0832L78.6671 17.8252C79.2338 18.1651 79.9373 18.1649 80.5038 17.8246L83.4003 16.0831C83.4439 16.057 83.4982 16.057 83.5418 16.0831L83.6422 16.1435C83.6837 16.1684 83.7091 16.2132 83.7091 16.2617V16.462C83.7091 16.5105 83.6837 16.5552 83.6422 16.5801ZM88.7973 7.28321C88.1018 7.70129 85.8827 9.03532 85.8826 9.03542C85.3474 9.35713 85.0149 9.94541 85.0149 10.5707V14.3168C85.0149 14.367 84.9877 14.4131 84.944 14.4374C84.9002 14.4616 84.8467 14.4601 84.8044 14.4335C84.8039 14.4332 84.8038 14.4335 84.8034 14.4333C84.7923 14.4263 84.7813 14.4191 84.7699 14.4123L84.5318 14.2692C84.4904 14.2443 84.4651 14.1994 84.4651 14.151V10.5707C84.4651 9.94541 84.1326 9.35709 83.5974 9.03539C83.5972 9.03529 79.8989 6.81671 79.8599 6.80138V11.5046C79.8599 11.5426 79.8442 11.579 79.8165 11.605C79.7888 11.631 79.7516 11.6445 79.7138 11.6421C79.7135 11.6421 79.7135 11.6422 79.7133 11.6422C79.6278 11.6369 79.5422 11.6369 79.4567 11.6422C79.4565 11.6422 79.4563 11.6421 79.456 11.6421C79.4182 11.6445 79.381 11.6311 79.3533 11.6051C79.3256 11.579 79.31 11.5427 79.31 11.5047V6.80146C79.2709 6.81677 75.5726 9.03539 75.5725 9.03545C75.0373 9.35716 74.7049 9.94545 74.7049 10.5708V14.151C74.7049 14.1995 74.6795 14.2443 74.6381 14.2692L74.3999 14.4124C74.3887 14.4192 74.3777 14.4263 74.3665 14.4333C74.3662 14.4334 74.3661 14.4332 74.3656 14.4335C74.3232 14.4601 74.2697 14.4617 74.226 14.4374C74.1822 14.4132 74.155 14.367 74.155 14.3169V10.5708C74.155 9.94548 73.8225 9.35719 73.2874 9.03549C73.2872 9.03539 71.0681 7.70132 70.3726 7.28327C70.3312 7.25838 70.3059 7.21354 70.3059 7.16516V6.96498C70.3059 6.9166 70.3312 6.87176 70.3726 6.84687L70.4733 6.78634C70.5168 6.76016 70.5712 6.76016 70.6147 6.78634C71.2998 7.19819 73.5104 8.52709 73.5105 8.52712C74.0772 8.86787 74.7813 8.86807 75.3483 8.52775L78.913 6.38478C79.3275 6.13573 79.8423 6.1357 80.2569 6.38478L83.8214 8.5276C84.3884 8.86804 85.0926 8.86791 85.6594 8.52709C85.6594 8.52702 87.8703 7.19805 88.5553 6.78627C88.5988 6.7601 88.6531 6.7601 88.6967 6.78627L88.7973 6.84673C88.8387 6.87163 88.864 6.91645 88.864 6.96484V7.16516C88.864 7.21354 88.8387 7.25832 88.7973 7.28321Z" fill="white"/> <path d="M3.168 9.289C4.30467 9.289 5.17733 9.49067 5.786 9.894C6.39467 10.29 6.699 10.9427 6.699 11.852C6.699 12.7687 6.391 13.4323 5.775 13.843C5.159 14.2463 4.279 14.448 3.135 14.448H2.596V17H0.88V9.487C1.254 9.41367 1.65 9.36233 2.068 9.333C2.486 9.30367 2.85267 9.289 3.168 9.289ZM3.278 10.752C3.15333 10.752 3.02867 10.7557 2.904 10.763C2.78667 10.7703 2.684 10.7777 2.596 10.785V12.985H3.135C3.729 12.985 4.17633 12.9043 4.477 12.743C4.77767 12.5817 4.928 12.281 4.928 11.841C4.928 11.6283 4.88767 11.4523 4.807 11.313C4.73367 11.1737 4.62367 11.0637 4.477 10.983C4.33767 10.895 4.16533 10.8363 3.96 10.807C3.75467 10.7703 3.52733 10.752 3.278 10.752ZM13.32 14.096C13.32 14.5507 13.254 14.9687 13.122 15.35C12.99 15.724 12.7993 16.0467 12.55 16.318C12.3006 16.582 12 16.7873 11.648 16.934C11.3033 17.0807 10.9146 17.154 10.482 17.154C10.0566 17.154 9.66797 17.0807 9.31597 16.934C8.9713 16.7873 8.6743 16.582 8.42497 16.318C8.17564 16.0467 7.9813 15.724 7.84197 15.35C7.70264 14.9687 7.63297 14.5507 7.63297 14.096C7.63297 13.6413 7.70264 13.227 7.84197 12.853C7.98864 12.479 8.18664 12.16 8.43597 11.896C8.69264 11.632 8.9933 11.4267 9.33797 11.28C9.68997 11.1333 10.0713 11.06 10.482 11.06C10.9 11.06 11.2813 11.1333 11.626 11.28C11.978 11.4267 12.2786 11.632 12.528 11.896C12.7773 12.16 12.9716 12.479 13.111 12.853C13.2503 13.227 13.32 13.6413 13.32 14.096ZM11.648 14.096C11.648 13.59 11.5453 13.194 11.34 12.908C11.142 12.6147 10.856 12.468 10.482 12.468C10.108 12.468 9.8183 12.6147 9.61297 12.908C9.40764 13.194 9.30497 13.59 9.30497 14.096C9.30497 14.602 9.40764 15.0053 9.61297 15.306C9.8183 15.5993 10.108 15.746 10.482 15.746C10.856 15.746 11.142 15.5993 11.34 15.306C11.5453 15.0053 11.648 14.602 11.648 14.096ZM18.2007 13.678C18.054 14.2353 17.8964 14.789 17.7277 15.339C17.5664 15.889 17.394 16.4427 17.2107 17H15.9347C15.8027 16.692 15.6597 16.3253 15.5057 15.9C15.3517 15.4747 15.1904 15.0127 15.0217 14.514C14.8604 14.008 14.6917 13.4763 14.5157 12.919C14.347 12.3543 14.182 11.786 14.0207 11.214H15.7477C15.8064 11.478 15.8687 11.7677 15.9347 12.083C16.008 12.391 16.0814 12.71 16.1547 13.04C16.2354 13.37 16.316 13.7037 16.3967 14.041C16.4847 14.371 16.5727 14.69 16.6607 14.998C16.756 14.6753 16.8477 14.3453 16.9357 14.008C17.031 13.6707 17.119 13.3407 17.1997 13.018C17.2877 12.688 17.3684 12.3727 17.4417 12.072C17.5224 11.764 17.592 11.478 17.6507 11.214H18.8387C18.8974 11.478 18.9634 11.764 19.0367 12.072C19.11 12.3727 19.187 12.688 19.2677 13.018C19.3484 13.3407 19.4327 13.6707 19.5207 14.008C19.6087 14.3453 19.7004 14.6753 19.7957 14.998C19.8837 14.69 19.9717 14.371 20.0597 14.041C20.1477 13.7037 20.2284 13.37 20.3017 13.04C20.3824 12.71 20.4557 12.391 20.5217 12.083C20.595 11.7677 20.661 11.478 20.7197 11.214H22.4247C22.2634 11.786 22.0947 12.3543 21.9187 12.919C21.75 13.4763 21.5814 14.008 21.4127 14.514C21.2514 15.0127 21.09 15.4747 20.9287 15.9C20.7747 16.3253 20.6317 16.692 20.4997 17H19.2237C19.0404 16.4427 18.8607 15.889 18.6847 15.339C18.5087 14.789 18.3474 14.2353 18.2007 13.678ZM23.1228 14.151C23.1228 13.6377 23.1998 13.1903 23.3538 12.809C23.5151 12.4203 23.7241 12.0977 23.9808 11.841C24.2374 11.5843 24.5308 11.39 24.8608 11.258C25.1981 11.126 25.5428 11.06 25.8948 11.06C26.7161 11.06 27.3651 11.313 27.8418 11.819C28.3184 12.3177 28.5568 13.0547 28.5568 14.03C28.5568 14.1253 28.5531 14.2317 28.5458 14.349C28.5384 14.459 28.5311 14.558 28.5238 14.646H24.8058C24.8424 14.9833 25.0001 15.251 25.2788 15.449C25.5574 15.647 25.9314 15.746 26.4008 15.746C26.7014 15.746 26.9948 15.7203 27.2808 15.669C27.5741 15.6103 27.8124 15.5407 27.9958 15.46L28.2158 16.791C28.1278 16.835 28.0104 16.879 27.8638 16.923C27.7171 16.967 27.5521 17.0037 27.3688 17.033C27.1928 17.0697 27.0021 17.099 26.7968 17.121C26.5914 17.143 26.3861 17.154 26.1808 17.154C25.6601 17.154 25.2054 17.077 24.8168 16.923C24.4354 16.769 24.1164 16.56 23.8598 16.296C23.6104 16.0247 23.4234 15.7057 23.2988 15.339C23.1814 14.9723 23.1228 14.5763 23.1228 14.151ZM26.9728 13.524C26.9654 13.3847 26.9398 13.249 26.8958 13.117C26.8591 12.985 26.7968 12.8677 26.7088 12.765C26.6281 12.6623 26.5218 12.578 26.3898 12.512C26.2651 12.446 26.1074 12.413 25.9168 12.413C25.7334 12.413 25.5758 12.446 25.4438 12.512C25.3118 12.5707 25.2018 12.6513 25.1138 12.754C25.0258 12.8567 24.9561 12.9777 24.9048 13.117C24.8608 13.249 24.8278 13.3847 24.8058 13.524H26.9728ZM33.5286 12.666C33.3819 12.6293 33.2096 12.5927 33.0116 12.556C32.8136 12.512 32.6009 12.49 32.3736 12.49C32.2709 12.49 32.1463 12.501 31.9996 12.523C31.8603 12.5377 31.7539 12.556 31.6806 12.578V17H30.0416V11.522C30.3349 11.4193 30.6796 11.324 31.0756 11.236C31.4789 11.1407 31.9263 11.093 32.4176 11.093C32.5056 11.093 32.6119 11.1003 32.7366 11.115C32.8613 11.1223 32.9859 11.137 33.1106 11.159C33.2353 11.1737 33.3599 11.1957 33.4846 11.225C33.6093 11.247 33.7156 11.2763 33.8036 11.313L33.5286 12.666ZM34.5198 14.151C34.5198 13.6377 34.5968 13.1903 34.7508 12.809C34.9121 12.4203 35.1211 12.0977 35.3778 11.841C35.6345 11.5843 35.9278 11.39 36.2578 11.258C36.5951 11.126 36.9398 11.06 37.2918 11.06C38.1131 11.06 38.7621 11.313 39.2388 11.819C39.7155 12.3177 39.9538 13.0547 39.9538 14.03C39.9538 14.1253 39.9501 14.2317 39.9428 14.349C39.9355 14.459 39.9281 14.558 39.9208 14.646H36.2028C36.2395 14.9833 36.3971 15.251 36.6758 15.449C36.9545 15.647 37.3285 15.746 37.7978 15.746C38.0985 15.746 38.3918 15.7203 38.6778 15.669C38.9711 15.6103 39.2095 15.5407 39.3928 15.46L39.6128 16.791C39.5248 16.835 39.4075 16.879 39.2608 16.923C39.1141 16.967 38.9491 17.0037 38.7658 17.033C38.5898 17.0697 38.3991 17.099 38.1938 17.121C37.9885 17.143 37.7831 17.154 37.5778 17.154C37.0571 17.154 36.6025 17.077 36.2138 16.923C35.8325 16.769 35.5135 16.56 35.2568 16.296C35.0075 16.0247 34.8205 15.7057 34.6958 15.339C34.5785 14.9723 34.5198 14.5763 34.5198 14.151ZM38.3698 13.524C38.3625 13.3847 38.3368 13.249 38.2928 13.117C38.2561 12.985 38.1938 12.8677 38.1058 12.765C38.0251 12.6623 37.9188 12.578 37.7868 12.512C37.6621 12.446 37.5045 12.413 37.3138 12.413C37.1305 12.413 36.9728 12.446 36.8408 12.512C36.7088 12.5707 36.5988 12.6513 36.5108 12.754C36.4228 12.8567 36.3531 12.9777 36.3018 13.117C36.2578 13.249 36.2248 13.3847 36.2028 13.524H38.3698ZM42.8356 14.063C42.8356 14.569 42.9493 14.976 43.1766 15.284C43.404 15.592 43.7413 15.746 44.1886 15.746C44.3353 15.746 44.471 15.7423 44.5956 15.735C44.7203 15.7203 44.823 15.7057 44.9036 15.691V12.71C44.801 12.644 44.6653 12.589 44.4966 12.545C44.3353 12.501 44.1703 12.479 44.0016 12.479C43.2243 12.479 42.8356 13.007 42.8356 14.063ZM46.5426 16.813C46.396 16.857 46.2273 16.901 46.0366 16.945C45.846 16.9817 45.6443 17.0147 45.4316 17.044C45.2263 17.0733 45.0136 17.0953 44.7936 17.11C44.581 17.132 44.3756 17.143 44.1776 17.143C43.701 17.143 43.2756 17.0733 42.9016 16.934C42.5276 16.7947 42.2123 16.5967 41.9556 16.34C41.699 16.076 41.501 15.7607 41.3616 15.394C41.2296 15.02 41.1636 14.602 41.1636 14.14C41.1636 13.6707 41.2223 13.249 41.3396 12.875C41.457 12.4937 41.6256 12.171 41.8456 11.907C42.0656 11.643 42.3333 11.4413 42.6486 11.302C42.9713 11.1627 43.338 11.093 43.7486 11.093C43.976 11.093 44.1776 11.115 44.3536 11.159C44.537 11.203 44.7203 11.2653 44.9036 11.346V8.728L46.5426 8.464V16.813ZM54.8669 14.063C54.8669 13.007 54.4782 12.479 53.7009 12.479C53.5322 12.479 53.3635 12.501 53.1949 12.545C53.0335 12.589 52.9015 12.644 52.7989 12.71V15.691C52.8795 15.7057 52.9822 15.7203 53.1069 15.735C53.2315 15.7423 53.3672 15.746 53.5139 15.746C53.9612 15.746 54.2985 15.592 54.5259 15.284C54.7532 14.976 54.8669 14.569 54.8669 14.063ZM56.5389 14.107C56.5389 14.569 56.4692 14.987 56.3299 15.361C56.1979 15.735 56.0035 16.054 55.7469 16.318C55.4902 16.582 55.1749 16.7873 54.8009 16.934C54.4269 17.0733 54.0015 17.143 53.5249 17.143C53.3269 17.143 53.1179 17.132 52.8979 17.11C52.6852 17.0953 52.4725 17.0733 52.2599 17.044C52.0545 17.0147 51.8565 16.9817 51.6659 16.945C51.4752 16.901 51.3065 16.857 51.1599 16.813V8.728L52.7989 8.464V11.346C52.9822 11.2653 53.1729 11.203 53.3709 11.159C53.5689 11.115 53.7815 11.093 54.0089 11.093C54.4195 11.093 54.7825 11.1663 55.0979 11.313C55.4132 11.4523 55.6772 11.654 55.8899 11.918C56.1025 12.182 56.2639 12.501 56.3739 12.875C56.4839 13.2417 56.5389 13.6523 56.5389 14.107ZM63.0052 11.214C62.6752 12.3287 62.3305 13.3737 61.9712 14.349C61.6118 15.3243 61.2195 16.2703 60.7942 17.187C60.6402 17.517 60.4862 17.7957 60.3322 18.023C60.1782 18.2577 60.0095 18.4483 59.8262 18.595C59.6428 18.749 59.4338 18.859 59.1992 18.925C58.9718 18.9983 58.7042 19.035 58.3962 19.035C58.1395 19.035 57.9012 19.0093 57.6812 18.958C57.4685 18.914 57.2925 18.8627 57.1532 18.804L57.4392 17.495C57.6078 17.5537 57.7582 17.594 57.8902 17.616C58.0222 17.638 58.1615 17.649 58.3082 17.649C58.6015 17.649 58.8252 17.5683 58.9792 17.407C59.1405 17.253 59.2762 17.0367 59.3862 16.758C59.0122 16.0247 58.6382 15.2033 58.2642 14.294C57.8902 13.3773 57.5382 12.3507 57.2082 11.214H58.9462C59.0195 11.5 59.1038 11.8117 59.1992 12.149C59.3018 12.479 59.4082 12.8163 59.5182 13.161C59.6282 13.4983 59.7382 13.8283 59.8482 14.151C59.9655 14.4737 60.0755 14.767 60.1782 15.031C60.2735 14.767 60.3725 14.4737 60.4752 14.151C60.5778 13.8283 60.6768 13.4983 60.7722 13.161C60.8748 12.8163 60.9702 12.479 61.0582 12.149C61.1535 11.8117 61.2378 11.5 61.3112 11.214H63.0052Z" fill="#C1C7CD"/> </svg>`;
|
|
25515
|
+
// The same mark Navigator uses on its Operator tile.
|
|
25516
|
+
const ICON_OPERATOR = `<svg width="32" height="32" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M36 0L6 18V54L36 72L66 54V18L36 0ZM36 58.8L18 48L23.001 45L36 52.8L48.999 45L54 48L36 58.8ZM36 46.8L18 36L23.001 33L36 40.8L48.999 33L54 36L36 46.8ZM36 34.8L18 24L36 13.2L54 24L36 34.8Z" fill="white"/><path opacity="0.85" d="M54 24L36 34.8L18 24L36 13.2L54 24ZM36 52.8L23.001 45L18 48L36 58.8L54 48L48.999 45L36 52.8ZM36 40.8L23.001 33L18 36L36 46.8L54 36L48.999 33L36 40.8Z" fill="black"/></svg>`;
|
|
25517
|
+
const TERMS_URL = "https://www.nextspace.com/legal/terms-of-use";
|
|
25518
|
+
const CONTACT_URL = "https://www.nextspace.com/about/contact?topic=support";
|
|
25519
|
+
const NEXTSPACE_URL = "https://nextspace.com/";
|
|
25520
|
+
class WidgetLeftPanelTabDashboard extends exports.WidgetLeftPanelTab.ATab {
|
|
25521
|
+
constructor(params) {
|
|
25522
|
+
var _a, _b;
|
|
25523
|
+
super(params);
|
|
25524
|
+
this.STYLESHEET_ID = "nextspace-left-panel-tab-dashboard-stylesheet";
|
|
25525
|
+
// Bumped per load so a slow response for an old view or account can't overwrite a newer one.
|
|
25526
|
+
this._loadToken = 0;
|
|
25527
|
+
this._disposed = false;
|
|
25528
|
+
this._viewName = null;
|
|
25529
|
+
this._viewBrandingUrl = null;
|
|
25530
|
+
this._accountBrandingUrl = null;
|
|
25531
|
+
this._accountLinks = [];
|
|
25532
|
+
this._operatorUrl = null;
|
|
25533
|
+
// Null while the account limit check is still in flight.
|
|
25534
|
+
this._operatorAllowed = null;
|
|
25535
|
+
this._operatorError = null;
|
|
25536
|
+
this._apiVersion = null;
|
|
25537
|
+
this._user = null;
|
|
25538
|
+
this._generateStyles();
|
|
25539
|
+
// Sized before the first render so percentage widths inside resolve against the final panel.
|
|
25540
|
+
if (this.Container) {
|
|
25541
|
+
this.Container.style.width = "510px";
|
|
25542
|
+
}
|
|
25543
|
+
this._generateElement();
|
|
25544
|
+
this._load();
|
|
25545
|
+
this._viewIdChangeRemoval = (_b = (_a = this._widget) === null || _a === void 0 ? void 0 : _a.OnViewIdChange) === null || _b === void 0 ? void 0 : _b.Subscribe(() => {
|
|
25546
|
+
this._load();
|
|
25547
|
+
});
|
|
25548
|
+
this._paramsChangeRemoval = BModels.ENVIRONMENT.OnParamsChange.Subscribe(() => {
|
|
25549
|
+
this._load();
|
|
25550
|
+
});
|
|
25551
|
+
}
|
|
25552
|
+
Dispose() {
|
|
25553
|
+
var _a, _b;
|
|
25554
|
+
this._disposed = true;
|
|
25555
|
+
(_a = this._viewIdChangeRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
25556
|
+
(_b = this._paramsChangeRemoval) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
25557
|
+
super.Dispose();
|
|
25558
|
+
}
|
|
25559
|
+
_generateStyles() {
|
|
25560
|
+
if (document.getElementById(this.STYLESHEET_ID)) {
|
|
25561
|
+
return;
|
|
25562
|
+
}
|
|
25563
|
+
const style = document.createElement("style");
|
|
25564
|
+
style.id = this.STYLESHEET_ID;
|
|
25565
|
+
style.innerHTML = `
|
|
25566
|
+
.NextspaceLeftPanelTabDashboard * {
|
|
25567
|
+
box-sizing: border-box;
|
|
25568
|
+
}
|
|
25569
|
+
|
|
25570
|
+
.NextspaceLeftPanelTabDashboard {
|
|
25571
|
+
color: #fff;
|
|
25572
|
+
display: flex;
|
|
25573
|
+
flex-direction: column;
|
|
25574
|
+
flex-grow: 1;
|
|
25575
|
+
flex-shrink: 1;
|
|
25576
|
+
font-family: Arial, sans-serif;
|
|
25577
|
+
font-size: 13px;
|
|
25578
|
+
overflow: auto;
|
|
25579
|
+
width: 100%;
|
|
25580
|
+
}
|
|
25581
|
+
|
|
25582
|
+
.NextspaceLeftPanelTabDashboardTitle {
|
|
25583
|
+
color: #fff;
|
|
25584
|
+
flex-shrink: 0;
|
|
25585
|
+
font-size: 16px;
|
|
25586
|
+
font-weight: 500;
|
|
25587
|
+
margin-bottom: 12px;
|
|
25588
|
+
overflow: hidden;
|
|
25589
|
+
text-overflow: ellipsis;
|
|
25590
|
+
white-space: nowrap;
|
|
25591
|
+
}
|
|
25592
|
+
|
|
25593
|
+
.NextspaceLeftPanelTabDashboardTitle >.NextspaceLeftPanelTabDashboardTitleLabel {
|
|
25594
|
+
color: #00affa;
|
|
25595
|
+
}
|
|
25596
|
+
|
|
25597
|
+
.NextspaceLeftPanelTabDashboardTiles {
|
|
25598
|
+
display: grid;
|
|
25599
|
+
flex-shrink: 0;
|
|
25600
|
+
gap: 20px;
|
|
25601
|
+
grid-template-columns: fit-content(20px) fit-content(20px) 1fr;
|
|
25602
|
+
place-content: center;
|
|
25603
|
+
}
|
|
25604
|
+
|
|
25605
|
+
.NextspaceLeftPanelTabDashboardTile {
|
|
25606
|
+
align-items: center;
|
|
25607
|
+
border: 1px solid rgba(255, 255, 255, .12);
|
|
25608
|
+
border-radius: 6px;
|
|
25609
|
+
color: #fff;
|
|
25610
|
+
cursor: pointer;
|
|
25611
|
+
display: flex;
|
|
25612
|
+
flex-direction: column;
|
|
25613
|
+
font-size: 10px;
|
|
25614
|
+
height: 120px;
|
|
25615
|
+
justify-content: center;
|
|
25616
|
+
min-width: 120px;
|
|
25617
|
+
padding: 0 12px;
|
|
25618
|
+
text-align: center;
|
|
25619
|
+
transition: transform .3s ease, opacity .3s ease;
|
|
25620
|
+
}
|
|
25621
|
+
|
|
25622
|
+
.NextspaceLeftPanelTabDashboardTile:hover {
|
|
25623
|
+
transform: translateY(-4px);
|
|
25624
|
+
}
|
|
25625
|
+
|
|
25626
|
+
.NextspaceLeftPanelTabDashboardTile[is-disabled="true"] {
|
|
25627
|
+
cursor: default;
|
|
25628
|
+
opacity: .4;
|
|
25629
|
+
transform: none;
|
|
25630
|
+
}
|
|
25631
|
+
|
|
25632
|
+
.NextspaceLeftPanelTabDashboardTile >svg {
|
|
25633
|
+
height: 30px;
|
|
25634
|
+
margin-bottom: 10px;
|
|
25635
|
+
width: 30px;
|
|
25636
|
+
}
|
|
25637
|
+
|
|
25638
|
+
/* Carries the auto margin for the whole footer, so it always sits at the bottom. */
|
|
25639
|
+
.NextspaceLeftPanelTabDashboardBrandingImages {
|
|
25640
|
+
align-items: flex-start;
|
|
25641
|
+
display: flex;
|
|
25642
|
+
flex-shrink: 0;
|
|
25643
|
+
flex-wrap: wrap;
|
|
25644
|
+
margin-top: auto;
|
|
25645
|
+
padding-top: 40px;
|
|
25646
|
+
}
|
|
25647
|
+
|
|
25648
|
+
.NextspaceLeftPanelTabDashboardBrandingImages[has-images="true"] {
|
|
25649
|
+
max-height: 198px;
|
|
25650
|
+
overflow: hidden;
|
|
25651
|
+
padding: 24px;
|
|
25652
|
+
}
|
|
25653
|
+
|
|
25654
|
+
/*
|
|
25655
|
+
* The box is clamped as well as the image so a banner can't paint at its intrinsic
|
|
25656
|
+
* size for a frame before the max-width resolves.
|
|
25657
|
+
*/
|
|
25658
|
+
.NextspaceLeftPanelTabDashboardBrandingImages >img {
|
|
25659
|
+
height: auto;
|
|
25660
|
+
margin-right: 20px;
|
|
25661
|
+
max-height: 150px;
|
|
25662
|
+
max-width: 80%;
|
|
25663
|
+
min-width: 0;
|
|
25664
|
+
object-fit: contain;
|
|
25665
|
+
overflow: hidden;
|
|
25666
|
+
width: auto;
|
|
25667
|
+
}
|
|
25668
|
+
|
|
25669
|
+
.NextspaceLeftPanelTabDashboardBrandingImages >img:last-of-type {
|
|
25670
|
+
margin-right: 0;
|
|
25671
|
+
}
|
|
25672
|
+
|
|
25673
|
+
.NextspaceLeftPanelTabDashboardCustomLinks {
|
|
25674
|
+
display: flex;
|
|
25675
|
+
flex-shrink: 0;
|
|
25676
|
+
flex-wrap: wrap;
|
|
25677
|
+
margin-left: 24px;
|
|
25678
|
+
}
|
|
25679
|
+
|
|
25680
|
+
.NextspaceLeftPanelTabDashboardBranding {
|
|
25681
|
+
border-top: 2px solid #000;
|
|
25682
|
+
flex-shrink: 0;
|
|
25683
|
+
margin-top: 20px;
|
|
25684
|
+
padding: 24px;
|
|
25685
|
+
}
|
|
25686
|
+
|
|
25687
|
+
.NextspaceLeftPanelTabDashboardBranding >svg {
|
|
25688
|
+
height: max-content;
|
|
25689
|
+
max-width: 220px;
|
|
25690
|
+
}
|
|
25691
|
+
|
|
25692
|
+
.NextspaceLeftPanelTabDashboardLinks {
|
|
25693
|
+
align-items: center;
|
|
25694
|
+
display: flex;
|
|
25695
|
+
flex-wrap: wrap;
|
|
25696
|
+
margin-top: 32px;
|
|
25697
|
+
}
|
|
25698
|
+
|
|
25699
|
+
.NextspaceLeftPanelTabDashboard a {
|
|
25700
|
+
color: #40c4ff;
|
|
25701
|
+
font-size: 11px;
|
|
25702
|
+
letter-spacing: .02em;
|
|
25703
|
+
line-height: 16px;
|
|
25704
|
+
margin-right: 20px;
|
|
25705
|
+
text-decoration: underline;
|
|
25706
|
+
}
|
|
25707
|
+
|
|
25708
|
+
.NextspaceLeftPanelTabDashboardTip {
|
|
25709
|
+
color: #c1c7cd;
|
|
25710
|
+
font-size: 11px;
|
|
25711
|
+
letter-spacing: .02em;
|
|
25712
|
+
line-height: 16px;
|
|
25713
|
+
margin-top: 24px;
|
|
25714
|
+
}
|
|
25715
|
+
`;
|
|
25716
|
+
document.head.appendChild(style);
|
|
25717
|
+
}
|
|
25718
|
+
_generateElement() {
|
|
25719
|
+
if (this._element && this._element.parentElement) {
|
|
25720
|
+
this._element.parentElement.removeChild(this._element);
|
|
25721
|
+
}
|
|
25722
|
+
const element = document.createElement("div");
|
|
25723
|
+
element.className = "NextspaceLeftPanelTabDashboard";
|
|
25724
|
+
element.appendChild(this._buildTitle());
|
|
25725
|
+
element.appendChild(this._buildTiles());
|
|
25726
|
+
element.appendChild(this._buildBrandingImages());
|
|
25727
|
+
element.appendChild(this._buildCustomLinks());
|
|
25728
|
+
element.appendChild(this._buildBranding());
|
|
25729
|
+
this.Container.appendChild(element);
|
|
25730
|
+
this._element = element;
|
|
25731
|
+
}
|
|
25732
|
+
_buildTitle() {
|
|
25733
|
+
var _a, _b;
|
|
25734
|
+
const title = document.createElement("div");
|
|
25735
|
+
title.className = "NextspaceLeftPanelTabDashboardTitle";
|
|
25736
|
+
const label = document.createElement("span");
|
|
25737
|
+
label.className = "NextspaceLeftPanelTabDashboardTitleLabel";
|
|
25738
|
+
label.textContent = (_a = this._viewName) !== null && _a !== void 0 ? _a : (((_b = this._widget) === null || _b === void 0 ? void 0 : _b.ViewId) ? "Unnamed Project View" : "Loading...");
|
|
25739
|
+
title.appendChild(label);
|
|
25740
|
+
const suffix = document.createElement("span");
|
|
25741
|
+
suffix.textContent = ", Dashboard";
|
|
25742
|
+
title.appendChild(suffix);
|
|
25743
|
+
title.title = label.textContent + suffix.textContent;
|
|
25744
|
+
return title;
|
|
25745
|
+
}
|
|
25746
|
+
_buildTiles() {
|
|
25747
|
+
var _a;
|
|
25748
|
+
const tiles = document.createElement("div");
|
|
25749
|
+
tiles.className = "NextspaceLeftPanelTabDashboardTiles";
|
|
25750
|
+
// The other Navigator tiles open panels this library doesn't ship, so Operator is the only one here.
|
|
25751
|
+
const disabled = this._operatorAllowed !== true;
|
|
25752
|
+
const tile = document.createElement("div");
|
|
25753
|
+
tile.className = "NextspaceLeftPanelTabDashboardTile";
|
|
25754
|
+
tile.setAttribute("is-disabled", String(disabled));
|
|
25755
|
+
tile.innerHTML = ICON_OPERATOR;
|
|
25756
|
+
if (disabled) {
|
|
25757
|
+
tile.title = this._operatorAllowed == null ? "Validating..." : ((_a = this._operatorError) !== null && _a !== void 0 ? _a : "You don't have permission to access this option.");
|
|
25758
|
+
}
|
|
25759
|
+
const caption = document.createElement("div");
|
|
25760
|
+
caption.textContent = "Operator";
|
|
25761
|
+
tile.appendChild(caption);
|
|
25762
|
+
tile.onclick = () => {
|
|
25763
|
+
if (this._operatorAllowed !== true || !this._operatorUrl) {
|
|
25764
|
+
return;
|
|
25765
|
+
}
|
|
25766
|
+
window.open(this._operatorUrl, "_blank");
|
|
25767
|
+
};
|
|
25768
|
+
tiles.appendChild(tile);
|
|
25769
|
+
return tiles;
|
|
25770
|
+
}
|
|
25771
|
+
_buildBrandingImages() {
|
|
25772
|
+
const images = document.createElement("div");
|
|
25773
|
+
images.className = "NextspaceLeftPanelTabDashboardBrandingImages";
|
|
25774
|
+
for (const url of [this._accountBrandingUrl, this._viewBrandingUrl]) {
|
|
25775
|
+
if (!url) {
|
|
25776
|
+
continue;
|
|
25777
|
+
}
|
|
25778
|
+
const img = document.createElement("img");
|
|
25779
|
+
img.src = url;
|
|
25780
|
+
img.loading = "lazy";
|
|
25781
|
+
images.appendChild(img);
|
|
25782
|
+
}
|
|
25783
|
+
// Always rendered even when empty, since this element carries the footer's auto margin.
|
|
25784
|
+
images.setAttribute("has-images", String(images.children.length > 0));
|
|
25785
|
+
return images;
|
|
25786
|
+
}
|
|
25787
|
+
_buildCustomLinks() {
|
|
25788
|
+
var _a, _b;
|
|
25789
|
+
const links = document.createElement("div");
|
|
25790
|
+
links.className = "NextspaceLeftPanelTabDashboardCustomLinks";
|
|
25791
|
+
for (const link of (_a = this._accountLinks) !== null && _a !== void 0 ? _a : []) {
|
|
25792
|
+
if (!(link === null || link === void 0 ? void 0 : link.url)) {
|
|
25793
|
+
continue;
|
|
25794
|
+
}
|
|
25795
|
+
const anchor = document.createElement("a");
|
|
25796
|
+
anchor.href = link.url;
|
|
25797
|
+
anchor.target = "_blank";
|
|
25798
|
+
anchor.rel = "noopener noreferrer";
|
|
25799
|
+
anchor.textContent = (_b = link.name) !== null && _b !== void 0 ? _b : link.url;
|
|
25800
|
+
links.appendChild(anchor);
|
|
25801
|
+
}
|
|
25802
|
+
links.style.display = links.children.length ? "flex" : "none";
|
|
25803
|
+
return links;
|
|
25804
|
+
}
|
|
25805
|
+
_buildBranding() {
|
|
25806
|
+
const branding = document.createElement("div");
|
|
25807
|
+
branding.className = "NextspaceLeftPanelTabDashboardBranding";
|
|
25808
|
+
// Once an account or view brands the panel, the Nextspace mark steps back to "powered by".
|
|
25809
|
+
const hasCustomBranding = !!(this._accountBrandingUrl || this._viewBrandingUrl);
|
|
25810
|
+
const logo = document.createElement("div");
|
|
25811
|
+
logo.innerHTML = hasCustomBranding ? ICON_NEXTSPACE_POWERED : ICON_NEXTSPACE_LEAF;
|
|
25812
|
+
logo.style.cursor = "pointer";
|
|
25813
|
+
logo.title = "Nextspace";
|
|
25814
|
+
logo.onclick = () => {
|
|
25815
|
+
window.open(NEXTSPACE_URL, "_blank");
|
|
25816
|
+
};
|
|
25817
|
+
branding.appendChild(logo);
|
|
25818
|
+
const links = document.createElement("div");
|
|
25819
|
+
links.className = "NextspaceLeftPanelTabDashboardLinks";
|
|
25820
|
+
links.appendChild(this._buildLink("Terms of Use", TERMS_URL));
|
|
25821
|
+
links.appendChild(this._buildLink("Help & support", this._getContactUrl()));
|
|
25822
|
+
branding.appendChild(links);
|
|
25823
|
+
const copyright = document.createElement("div");
|
|
25824
|
+
copyright.className = "NextspaceLeftPanelTabDashboardTip";
|
|
25825
|
+
copyright.textContent = `${new Date().getFullYear()} © Nextspace Limited. All rights reserved.`;
|
|
25826
|
+
branding.appendChild(copyright);
|
|
25827
|
+
const versions = document.createElement("div");
|
|
25828
|
+
versions.className = "NextspaceLeftPanelTabDashboardTip";
|
|
25829
|
+
versions.textContent = `Running API ${this._apiVersion || "UNKNOWN"}`;
|
|
25830
|
+
branding.appendChild(versions);
|
|
25831
|
+
return branding;
|
|
25832
|
+
}
|
|
25833
|
+
_buildLink(text, url) {
|
|
25834
|
+
const anchor = document.createElement("a");
|
|
25835
|
+
anchor.href = url;
|
|
25836
|
+
anchor.target = "_blank";
|
|
25837
|
+
anchor.rel = "noopener noreferrer";
|
|
25838
|
+
anchor.textContent = text;
|
|
25839
|
+
return anchor;
|
|
25840
|
+
}
|
|
25841
|
+
/**
|
|
25842
|
+
* Builds the support URL with the signed-in user's details prefilled.
|
|
25843
|
+
*/
|
|
25844
|
+
_getContactUrl() {
|
|
25845
|
+
var _a, _b;
|
|
25846
|
+
let url = CONTACT_URL;
|
|
25847
|
+
const user = this._user;
|
|
25848
|
+
if (user) {
|
|
25849
|
+
const names = ((_a = user.FullName) !== null && _a !== void 0 ? _a : "").trim().split(" ").filter(x => !!x);
|
|
25850
|
+
const params = [
|
|
25851
|
+
["email", user.Email],
|
|
25852
|
+
["firstname", names.length ? names[0] : null],
|
|
25853
|
+
["lastname", names.length > 1 ? names[names.length - 1] : null],
|
|
25854
|
+
["phone", user.Mobile]
|
|
25855
|
+
];
|
|
25856
|
+
for (const [key, value] of params) {
|
|
25857
|
+
if (value) {
|
|
25858
|
+
url = BModels.UrlUtils.AddQueryParam(url, key, value);
|
|
25859
|
+
}
|
|
25860
|
+
}
|
|
25861
|
+
}
|
|
25862
|
+
const accountId = (_b = BModels.ENVIRONMENT.PARAMS) === null || _b === void 0 ? void 0 : _b.accountId;
|
|
25863
|
+
if (accountId) {
|
|
25864
|
+
url = BModels.UrlUtils.AddQueryParam(url, "accountid", accountId);
|
|
25865
|
+
}
|
|
25866
|
+
return url;
|
|
25867
|
+
}
|
|
25868
|
+
/**
|
|
25869
|
+
* Gathers everything the panel shows.
|
|
25870
|
+
* Each source is caught on its own so one failure doesn't blank the whole panel.
|
|
25871
|
+
*/
|
|
25872
|
+
async _load() {
|
|
25873
|
+
var _a, _b, _c;
|
|
25874
|
+
const token = ++this._loadToken;
|
|
25875
|
+
const getters = (_a = this._widget) === null || _a === void 0 ? void 0 : _a._getApiGetters();
|
|
25876
|
+
const accountId = (_b = BModels.ENVIRONMENT.PARAMS) === null || _b === void 0 ? void 0 : _b.accountId;
|
|
25877
|
+
const viewId = (_c = this._widget) === null || _c === void 0 ? void 0 : _c.ViewId;
|
|
25878
|
+
await Promise.all([
|
|
25879
|
+
this._loadView(viewId, getters),
|
|
25880
|
+
this._loadAccount(accountId, getters),
|
|
25881
|
+
this._loadOperatorAccess(accountId, getters),
|
|
25882
|
+
this._loadApiVersion(getters),
|
|
25883
|
+
this._loadUser(getters)
|
|
25884
|
+
]);
|
|
25885
|
+
if (this._disposed || token !== this._loadToken) {
|
|
25886
|
+
return;
|
|
25887
|
+
}
|
|
25888
|
+
this._generateElement();
|
|
25889
|
+
}
|
|
25890
|
+
async _loadView(viewId, getters) {
|
|
25891
|
+
var _a, _b, _c, _d, _e;
|
|
25892
|
+
this._viewName = null;
|
|
25893
|
+
this._viewBrandingUrl = null;
|
|
25894
|
+
if (!viewId) {
|
|
25895
|
+
return;
|
|
25896
|
+
}
|
|
25897
|
+
try {
|
|
25898
|
+
const api = getters === null || getters === void 0 ? void 0 : getters.GetBruceApi();
|
|
25899
|
+
const data = await BModels.ProjectView.Get({
|
|
25900
|
+
viewId,
|
|
25901
|
+
api
|
|
25902
|
+
});
|
|
25903
|
+
this._viewName = (_b = (_a = data === null || data === void 0 ? void 0 : data.view) === null || _a === void 0 ? void 0 : _a.Name) !== null && _b !== void 0 ? _b : null;
|
|
25904
|
+
const fileId = (_e = (_d = (_c = data === null || data === void 0 ? void 0 : data.view) === null || _c === void 0 ? void 0 : _c.Settings) === null || _d === void 0 ? void 0 : _d.branding) === null || _e === void 0 ? void 0 : _e.bannerFileId;
|
|
25905
|
+
if (fileId) {
|
|
25906
|
+
this._viewBrandingUrl = BModels.ClientFile.GetUrl({
|
|
25907
|
+
fileId,
|
|
25908
|
+
api,
|
|
25909
|
+
viaCdn: true
|
|
25910
|
+
});
|
|
25911
|
+
}
|
|
25912
|
+
}
|
|
25913
|
+
catch (e) {
|
|
25914
|
+
console.error(e);
|
|
24350
25915
|
}
|
|
24351
|
-
`;
|
|
24352
|
-
document.head.appendChild(style);
|
|
24353
25916
|
}
|
|
24354
|
-
|
|
24355
|
-
var _a, _b;
|
|
24356
|
-
|
|
24357
|
-
|
|
25917
|
+
async _loadAccount(accountId, getters) {
|
|
25918
|
+
var _a, _b, _c;
|
|
25919
|
+
this._accountBrandingUrl = null;
|
|
25920
|
+
this._accountLinks = [];
|
|
25921
|
+
this._operatorUrl = null;
|
|
25922
|
+
if (!accountId) {
|
|
25923
|
+
return;
|
|
24358
25924
|
}
|
|
24359
|
-
|
|
24360
|
-
|
|
24361
|
-
|
|
24362
|
-
|
|
24363
|
-
|
|
24364
|
-
|
|
24365
|
-
|
|
24366
|
-
|
|
24367
|
-
|
|
24368
|
-
|
|
24369
|
-
|
|
24370
|
-
|
|
24371
|
-
|
|
24372
|
-
inputRow.className = "NextspaceLeftPanelTabUserInputRow";
|
|
24373
|
-
const label = document.createElement("label");
|
|
24374
|
-
label.textContent = "Username";
|
|
24375
|
-
inputRow.appendChild(label);
|
|
24376
|
-
const input = document.createElement("input");
|
|
24377
|
-
input.type = "text";
|
|
24378
|
-
input.placeholder = "...";
|
|
24379
|
-
this.inputUsername = input;
|
|
24380
|
-
inputRow.appendChild(this.inputUsername);
|
|
24381
|
-
element.appendChild(inputRow);
|
|
25925
|
+
try {
|
|
25926
|
+
const { account } = await BModels.Account.Get({
|
|
25927
|
+
accountId,
|
|
25928
|
+
appId: BModels.Account.EAppId.Navigator,
|
|
25929
|
+
api: getters === null || getters === void 0 ? void 0 : getters.GetGuardianApi()
|
|
25930
|
+
});
|
|
25931
|
+
const operatorBase = (_a = account === null || account === void 0 ? void 0 : account.URL) === null || _a === void 0 ? void 0 : _a.AppOperator;
|
|
25932
|
+
if (operatorBase) {
|
|
25933
|
+
const viewId = (_b = this._widget) === null || _b === void 0 ? void 0 : _b.ViewId;
|
|
25934
|
+
this._operatorUrl = BModels.UrlUtils.ConstructUrl({
|
|
25935
|
+
existing: operatorBase,
|
|
25936
|
+
url: viewId ? `projectviews/projectview:${viewId}/` : ""
|
|
25937
|
+
});
|
|
24382
25938
|
}
|
|
24383
|
-
|
|
24384
|
-
|
|
24385
|
-
|
|
24386
|
-
|
|
24387
|
-
|
|
24388
|
-
|
|
24389
|
-
|
|
24390
|
-
|
|
24391
|
-
input.placeholder = "...";
|
|
24392
|
-
this.inputPassword = input;
|
|
24393
|
-
inputRow.appendChild(this.inputPassword);
|
|
24394
|
-
element.appendChild(inputRow);
|
|
25939
|
+
const settings = account === null || account === void 0 ? void 0 : account["Application.Settings"];
|
|
25940
|
+
const branding = settings === null || settings === void 0 ? void 0 : settings.branding;
|
|
25941
|
+
if (branding === null || branding === void 0 ? void 0 : branding.dashBannerFileId) {
|
|
25942
|
+
this._accountBrandingUrl = BModels.ClientFile.GetUrl({
|
|
25943
|
+
fileId: branding.dashBannerFileId,
|
|
25944
|
+
api: getters === null || getters === void 0 ? void 0 : getters.GetBruceApi(),
|
|
25945
|
+
viaCdn: true
|
|
25946
|
+
});
|
|
24395
25947
|
}
|
|
24396
|
-
{
|
|
24397
|
-
|
|
24398
|
-
|
|
24399
|
-
|
|
24400
|
-
|
|
24401
|
-
|
|
24402
|
-
return;
|
|
24403
|
-
}
|
|
24404
|
-
button.style.opacity = "0.7";
|
|
24405
|
-
this.loggingIn = true;
|
|
24406
|
-
try {
|
|
24407
|
-
const { session } = await BModels.Session.Login({
|
|
24408
|
-
accountId: BModels.ENVIRONMENT.PARAMS.accountId,
|
|
24409
|
-
username: (_b = (_a = this.inputUsername) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "",
|
|
24410
|
-
password: (_d = (_c = this.inputPassword) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : ""
|
|
24411
|
-
});
|
|
24412
|
-
BModels.ENVIRONMENT.SetPageLoadSessionId((_e = session === null || session === void 0 ? void 0 : session.ID) !== null && _e !== void 0 ? _e : null);
|
|
24413
|
-
BModels.ENVIRONMENT.Reset({
|
|
24414
|
-
accountId: BModels.ENVIRONMENT.PARAMS.accountId,
|
|
24415
|
-
sessionId: (_f = (session === null || session === void 0 ? void 0 : session.ID)) !== null && _f !== void 0 ? _f : null,
|
|
24416
|
-
});
|
|
24417
|
-
window.location.reload();
|
|
24418
|
-
}
|
|
24419
|
-
catch (e) {
|
|
24420
|
-
console.error(e);
|
|
24421
|
-
}
|
|
24422
|
-
finally {
|
|
24423
|
-
this.loggingIn = false;
|
|
24424
|
-
button.style.opacity = "1";
|
|
24425
|
-
}
|
|
24426
|
-
};
|
|
24427
|
-
element.appendChild(button);
|
|
25948
|
+
if ((_c = branding === null || branding === void 0 ? void 0 : branding.links) === null || _c === void 0 ? void 0 : _c.length) {
|
|
25949
|
+
// Bare domains would otherwise resolve against this app's own origin.
|
|
25950
|
+
this._accountLinks = branding.links.map(link => ({
|
|
25951
|
+
name: link.name,
|
|
25952
|
+
url: link.url && !link.url.startsWith("https://") ? `https://${link.url}` : link.url
|
|
25953
|
+
}));
|
|
24428
25954
|
}
|
|
24429
25955
|
}
|
|
24430
|
-
|
|
24431
|
-
|
|
24432
|
-
|
|
24433
|
-
|
|
24434
|
-
|
|
24435
|
-
|
|
24436
|
-
|
|
24437
|
-
|
|
24438
|
-
|
|
24439
|
-
|
|
24440
|
-
|
|
24441
|
-
|
|
24442
|
-
|
|
24443
|
-
|
|
24444
|
-
|
|
24445
|
-
|
|
24446
|
-
|
|
24447
|
-
|
|
24448
|
-
|
|
24449
|
-
|
|
25956
|
+
catch (e) {
|
|
25957
|
+
console.error(e);
|
|
25958
|
+
}
|
|
25959
|
+
}
|
|
25960
|
+
async _loadOperatorAccess(accountId, getters) {
|
|
25961
|
+
var _a;
|
|
25962
|
+
this._operatorAllowed = null;
|
|
25963
|
+
this._operatorError = null;
|
|
25964
|
+
try {
|
|
25965
|
+
const data = await BModels.AccountLimits.Assert.GetCanOpenOperator({
|
|
25966
|
+
accountId,
|
|
25967
|
+
api: getters === null || getters === void 0 ? void 0 : getters.GetGuardianApi()
|
|
25968
|
+
});
|
|
25969
|
+
this._operatorAllowed = !!(data === null || data === void 0 ? void 0 : data.allowed);
|
|
25970
|
+
this._operatorError = (_a = data === null || data === void 0 ? void 0 : data.errorText) !== null && _a !== void 0 ? _a : null;
|
|
25971
|
+
}
|
|
25972
|
+
catch (e) {
|
|
25973
|
+
console.error(e);
|
|
25974
|
+
this._operatorAllowed = false;
|
|
25975
|
+
}
|
|
25976
|
+
}
|
|
25977
|
+
/**
|
|
25978
|
+
* Reads the version of the Bruce API instance this account is served by.
|
|
25979
|
+
*/
|
|
25980
|
+
async _loadApiVersion(getters) {
|
|
25981
|
+
this._apiVersion = null;
|
|
25982
|
+
try {
|
|
25983
|
+
const api = getters === null || getters === void 0 ? void 0 : getters.GetBruceApi();
|
|
25984
|
+
if (!api) {
|
|
25985
|
+
return;
|
|
24450
25986
|
}
|
|
25987
|
+
// The API resolves its own version as part of loading.
|
|
25988
|
+
await api.Loading;
|
|
25989
|
+
this._apiVersion = api.Version;
|
|
25990
|
+
}
|
|
25991
|
+
catch (e) {
|
|
25992
|
+
console.error(e);
|
|
25993
|
+
}
|
|
25994
|
+
}
|
|
25995
|
+
async _loadUser(getters) {
|
|
25996
|
+
var _a, _b, _c;
|
|
25997
|
+
try {
|
|
25998
|
+
const sessionId = (_a = BModels.ENVIRONMENT.PARAMS) === null || _a === void 0 ? void 0 : _a.sessionId;
|
|
25999
|
+
const { session } = await BModels.Session.Get({
|
|
26000
|
+
api: getters === null || getters === void 0 ? void 0 : getters.GetGuardianApi(),
|
|
26001
|
+
sessionId,
|
|
26002
|
+
accountId: (_b = BModels.ENVIRONMENT.PARAMS) === null || _b === void 0 ? void 0 : _b.accountId
|
|
26003
|
+
});
|
|
26004
|
+
this._user = (_c = session === null || session === void 0 ? void 0 : session.User) !== null && _c !== void 0 ? _c : null;
|
|
26005
|
+
}
|
|
26006
|
+
catch (e) {
|
|
26007
|
+
console.error(e);
|
|
26008
|
+
this._user = null;
|
|
24451
26009
|
}
|
|
24452
|
-
this.Container.appendChild(element);
|
|
24453
|
-
this._element = element;
|
|
24454
26010
|
}
|
|
24455
26011
|
}
|
|
24456
26012
|
|
|
@@ -24466,11 +26022,24 @@
|
|
|
24466
26022
|
this._viewId = value;
|
|
24467
26023
|
this._updatePanelStyles();
|
|
24468
26024
|
this._loading = this.loadBookmarks();
|
|
26025
|
+
// An already-open tab needs to know, as the panel can be opened before a view has rendered.
|
|
26026
|
+
if (this._onViewIdChange) {
|
|
26027
|
+
this._onViewIdChange.Trigger(value);
|
|
26028
|
+
}
|
|
24469
26029
|
}
|
|
24470
26030
|
}
|
|
26031
|
+
get OnViewIdChange() {
|
|
26032
|
+
if (this._onViewIdChange == null) {
|
|
26033
|
+
this._onViewIdChange = new BModels.BruceEvent();
|
|
26034
|
+
}
|
|
26035
|
+
return this._onViewIdChange;
|
|
26036
|
+
}
|
|
24471
26037
|
get Bookmarks() {
|
|
24472
26038
|
return this.bookmarks;
|
|
24473
26039
|
}
|
|
26040
|
+
get BookmarkGroups() {
|
|
26041
|
+
return this.bookmarkGroups;
|
|
26042
|
+
}
|
|
24474
26043
|
get LastEnabledBookmarkId() {
|
|
24475
26044
|
return this._lastEnabledBookmarkId;
|
|
24476
26045
|
}
|
|
@@ -24502,6 +26071,8 @@
|
|
|
24502
26071
|
// Keeping the bookmark list and loading here at top level.
|
|
24503
26072
|
// This allows us to share the data between tabs.
|
|
24504
26073
|
this.bookmarks = [];
|
|
26074
|
+
// Groups the bookmarks above are sorted into, by their "UI.SlideGroup.ID".
|
|
26075
|
+
this.bookmarkGroups = [];
|
|
24505
26076
|
this._lastEnabledBookmarkId = null;
|
|
24506
26077
|
// Map of custom tabs added by external devs by calling AddPanelTab.
|
|
24507
26078
|
// This is a mapping of the provided tab key + content class.
|
|
@@ -24526,16 +26097,21 @@
|
|
|
24526
26097
|
const api = this._apiGetters.GetBruceApi();
|
|
24527
26098
|
if (!viewId) {
|
|
24528
26099
|
this.bookmarks = [];
|
|
26100
|
+
this.bookmarkGroups = [];
|
|
24529
26101
|
return;
|
|
24530
26102
|
}
|
|
24531
|
-
const data = await
|
|
24532
|
-
|
|
24533
|
-
|
|
24534
|
-
|
|
26103
|
+
const [data, groups] = await Promise.all([
|
|
26104
|
+
BModels.ProjectViewBookmark.GetList({
|
|
26105
|
+
viewId,
|
|
26106
|
+
api
|
|
26107
|
+
}),
|
|
26108
|
+
this.loadBookmarkGroups(viewId, api)
|
|
26109
|
+
]);
|
|
24535
26110
|
if (this._viewId !== viewId) {
|
|
24536
26111
|
return;
|
|
24537
26112
|
}
|
|
24538
26113
|
this.bookmarks = data.bookmarks;
|
|
26114
|
+
this.bookmarkGroups = groups;
|
|
24539
26115
|
}
|
|
24540
26116
|
catch (e) {
|
|
24541
26117
|
console.error(e);
|
|
@@ -24543,6 +26119,24 @@
|
|
|
24543
26119
|
return;
|
|
24544
26120
|
}
|
|
24545
26121
|
this.bookmarks = [];
|
|
26122
|
+
this.bookmarkGroups = [];
|
|
26123
|
+
}
|
|
26124
|
+
}
|
|
26125
|
+
/**
|
|
26126
|
+
* Loads the bookmark groups for a view.
|
|
26127
|
+
* A failure here degrades to an ungrouped list rather than losing the bookmarks entirely.
|
|
26128
|
+
*/
|
|
26129
|
+
async loadBookmarkGroups(viewId, api) {
|
|
26130
|
+
try {
|
|
26131
|
+
const groups = await BModels.ProjectViewBookmarkGroup.GetGroups({
|
|
26132
|
+
viewId,
|
|
26133
|
+
api
|
|
26134
|
+
});
|
|
26135
|
+
return groups !== null && groups !== void 0 ? groups : [];
|
|
26136
|
+
}
|
|
26137
|
+
catch (e) {
|
|
26138
|
+
console.error(e);
|
|
26139
|
+
return [];
|
|
24546
26140
|
}
|
|
24547
26141
|
}
|
|
24548
26142
|
Dispose() {
|
|
@@ -24689,14 +26283,21 @@
|
|
|
24689
26283
|
element.className = "NextspaceLeftPanel";
|
|
24690
26284
|
this.Container.appendChild(element);
|
|
24691
26285
|
this._element = element;
|
|
24692
|
-
this.
|
|
26286
|
+
this._addPanelTab("dashboard", "Dashboard", `
|
|
24693
26287
|
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
24694
26288
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11 9C11 10.1046 10.1046 11 9 11C7.89543 11 7 10.1046 7 9C7 7.89543 7.89543 7 9 7C10.1046 7 11 7.89543 11 9ZM18 9C18 10.1046 17.1046 11 16 11C14.8954 11 14 10.1046 14 9C14 7.89543 14.8954 7 16 7C17.1046 7 18 7.89543 18 9ZM23 11C24.1046 11 25 10.1046 25 9C25 7.89543 24.1046 7 23 7C21.8954 7 21 7.89543 21 9C21 10.1046 21.8954 11 23 11ZM11 16C11 17.1046 10.1046 18 9 18C7.89543 18 7 17.1046 7 16C7 14.8954 7.89543 14 9 14C10.1046 14 11 14.8954 11 16ZM9 25C10.1046 25 11 24.1046 11 23C11 21.8954 10.1046 21 9 21C7.89543 21 7 21.8954 7 23C7 24.1046 7.89543 25 9 25ZM18 16C18 17.1046 17.1046 18 16 18C14.8954 18 14 17.1046 14 16C14 14.8954 14.8954 14 16 14C17.1046 14 18 14.8954 18 16ZM16 25C17.1046 25 18 24.1046 18 23C18 21.8954 17.1046 21 16 21C14.8954 21 14 21.8954 14 23C14 24.1046 14.8954 25 16 25ZM25 16C25 17.1046 24.1046 18 23 18C21.8954 18 21 17.1046 21 16C21 14.8954 21.8954 14 23 14C24.1046 14 25 14.8954 25 16ZM23 25C24.1046 25 25 24.1046 25 23C25 21.8954 24.1046 21 23 21C21.8954 21 21 21.8954 21 23C21 24.1046 21.8954 25 23 25Z" fill="white"></path>
|
|
24695
26289
|
</svg>
|
|
24696
|
-
|
|
26290
|
+
`, "svg");
|
|
24697
26291
|
const breaker = document.createElement("div");
|
|
24698
26292
|
breaker.className = "NextspaceLeftPanelBreaker";
|
|
24699
26293
|
this._element.appendChild(breaker);
|
|
26294
|
+
this._addPanelTab("menu-items", "Menu", `
|
|
26295
|
+
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
26296
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5528 5.10557C15.8343 4.96481 16.1657 4.96481 16.4472 5.10557L25.4472 9.60557C25.786 9.77496 26 10.1212 26 10.5C26 10.8788 25.786 11.225 25.4472 11.3944L16.4472 15.8944C16.1657 16.0352 15.8343 16.0352 15.5528 15.8944L6.55279 11.3944C6.214 11.225 6 10.8788 6 10.5C6 10.1212 6.214 9.77496 6.55279 9.60557L15.5528 5.10557Z" fill="white"></path>
|
|
26297
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.76393 15L6.55279 15.6056C6.214 15.775 6 16.1212 6 16.5C6 16.8788 6.214 17.225 6.55279 17.3944L15.5528 21.8944C15.8343 22.0352 16.1657 22.0352 16.4472 21.8944L25.4472 17.3944C25.786 17.225 26 16.8788 26 16.5C26 16.1212 25.786 15.775 25.4472 15.6056L24.2361 15L16.4472 18.8944C16.1657 19.0352 15.8343 19.0352 15.5528 18.8944L7.76393 15Z" fill="white"></path>
|
|
26298
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.76393 21L6.55279 21.6056C6.214 21.775 6 22.1212 6 22.5C6 22.8788 6.214 23.225 6.55279 23.3944L15.5528 27.8944C15.8343 28.0352 16.1657 28.0352 16.4472 27.8944L25.4472 23.3944C25.786 23.225 26 22.8788 26 22.5C26 22.1212 25.786 21.775 25.4472 21.6056L24.2361 21L16.4472 24.8944C16.1657 25.0352 15.8343 25.0352 15.5528 24.8944L7.76393 21Z" fill="white"></path>
|
|
26299
|
+
</svg>
|
|
26300
|
+
`, "svg");
|
|
24700
26301
|
this._addPanelTab("bookmarks", "Bookmarks", `
|
|
24701
26302
|
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
24702
26303
|
<path d="M23 25V7H9V25L16 18L23 25Z" fill="white" stroke="white" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
@@ -24795,18 +26396,6 @@
|
|
|
24795
26396
|
this._element.appendChild(tabButton);
|
|
24796
26397
|
}
|
|
24797
26398
|
}
|
|
24798
|
-
_addPlaceholderTab(title, svgStr) {
|
|
24799
|
-
const tabButton = document.createElement("div");
|
|
24800
|
-
tabButton.className = "NextspaceLeftPanelButton";
|
|
24801
|
-
tabButton.title = title;
|
|
24802
|
-
tabButton.style.opacity = "0.5";
|
|
24803
|
-
tabButton.style.pointerEvents = "none";
|
|
24804
|
-
const buttonBookmarksIcon = document.createElement("div");
|
|
24805
|
-
buttonBookmarksIcon.className = "NextspaceLeftPanelButtonIcon";
|
|
24806
|
-
buttonBookmarksIcon.innerHTML = svgStr;
|
|
24807
|
-
tabButton.appendChild(buttonBookmarksIcon);
|
|
24808
|
-
this._element.appendChild(tabButton);
|
|
24809
|
-
}
|
|
24810
26399
|
/**
|
|
24811
26400
|
* User profile handled separately.
|
|
24812
26401
|
* This is because for a while it will be just an indicator of logged in user session.
|
|
@@ -24936,12 +26525,24 @@
|
|
|
24936
26525
|
const container = this._element.querySelector(".NextspaceLeftPanelTabContent");
|
|
24937
26526
|
let tabContent;
|
|
24938
26527
|
switch (this._enabledPanelTab) {
|
|
26528
|
+
case "dashboard":
|
|
26529
|
+
tabContent = new WidgetLeftPanelTabDashboard({
|
|
26530
|
+
widget: this,
|
|
26531
|
+
container: container
|
|
26532
|
+
});
|
|
26533
|
+
break;
|
|
24939
26534
|
case "bookmarks":
|
|
24940
26535
|
tabContent = new WidgetLeftPanelTabBookmarks({
|
|
24941
26536
|
widget: this,
|
|
24942
26537
|
container: container
|
|
24943
26538
|
});
|
|
24944
26539
|
break;
|
|
26540
|
+
case "menu-items":
|
|
26541
|
+
tabContent = new WidgetLeftPanelTabMenuItems({
|
|
26542
|
+
widget: this,
|
|
26543
|
+
container: container
|
|
26544
|
+
});
|
|
26545
|
+
break;
|
|
24945
26546
|
case "user":
|
|
24946
26547
|
tabContent = new WidgetLeftPanelTabUser({
|
|
24947
26548
|
widget: this,
|
|
@@ -27809,29 +29410,31 @@
|
|
|
27809
29410
|
}
|
|
27810
29411
|
|
|
27811
29412
|
.NextspaceBookmarksRowItem {
|
|
27812
|
-
background-color:
|
|
29413
|
+
background-color: rgba(255, 255, 255, .05);
|
|
27813
29414
|
background-position: 50%;
|
|
27814
29415
|
background-repeat: no-repeat;
|
|
27815
29416
|
background-size: cover;
|
|
27816
|
-
border
|
|
29417
|
+
border: 1px solid rgba(255, 255, 255, .1);
|
|
29418
|
+
border-radius: 8px;
|
|
27817
29419
|
cursor: pointer;
|
|
27818
29420
|
margin-right: 8px;
|
|
27819
29421
|
min-width: 70px;
|
|
27820
|
-
|
|
27821
|
-
transition: .3s ease;
|
|
29422
|
+
transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
|
|
27822
29423
|
width: 110px;
|
|
27823
29424
|
}
|
|
27824
|
-
|
|
29425
|
+
|
|
27825
29426
|
.NextspaceBookmarksRowItem:last-of-type {
|
|
27826
29427
|
margin-right: 0;
|
|
27827
29428
|
}
|
|
27828
29429
|
|
|
27829
29430
|
.NextspaceBookmarksRowItem[is-selected="true"] {
|
|
27830
|
-
|
|
29431
|
+
border-color: #33b1ff;
|
|
29432
|
+
box-shadow: 0 0 0 2px rgba(51, 177, 255, .4);
|
|
27831
29433
|
}
|
|
27832
29434
|
|
|
27833
29435
|
.NextspaceBookmarksRowItem:hover {
|
|
27834
|
-
|
|
29436
|
+
border-color: rgba(255, 255, 255, .4);
|
|
29437
|
+
transform: translateY(-2px);
|
|
27835
29438
|
}
|
|
27836
29439
|
|
|
27837
29440
|
.NextspaceBookmarksToolbar {
|
|
@@ -30816,6 +32419,10 @@
|
|
|
30816
32419
|
flex-direction: column;
|
|
30817
32420
|
}
|
|
30818
32421
|
|
|
32422
|
+
.NextspaceAttributesGroup + .NextspaceAttributesGroup {
|
|
32423
|
+
margin-top: 4px;
|
|
32424
|
+
}
|
|
32425
|
+
|
|
30819
32426
|
.NextspaceAttributesGroup[is-opened="false"] .NextspaceAttribute {
|
|
30820
32427
|
display: none;
|
|
30821
32428
|
}
|
|
@@ -30827,8 +32434,7 @@
|
|
|
30827
32434
|
border-radius: 5px;
|
|
30828
32435
|
cursor: pointer;
|
|
30829
32436
|
display: flex;
|
|
30830
|
-
height:
|
|
30831
|
-
margin-bottom: 3px;
|
|
32437
|
+
min-height: 32px;
|
|
30832
32438
|
overflow: hidden;
|
|
30833
32439
|
padding-left: 12px;
|
|
30834
32440
|
text-overflow: ellipsis;
|
|
@@ -30839,6 +32445,11 @@
|
|
|
30839
32445
|
font-size: 12px;
|
|
30840
32446
|
}
|
|
30841
32447
|
|
|
32448
|
+
.NextspaceAttributesGroup[is-opened="true"] >.NextspaceAttributesGroupToggle {
|
|
32449
|
+
border-bottom-left-radius: 0;
|
|
32450
|
+
border-bottom-right-radius: 0;
|
|
32451
|
+
}
|
|
32452
|
+
|
|
30842
32453
|
.NextspaceAttributesGroupToggleIcon {
|
|
30843
32454
|
align-items: center;
|
|
30844
32455
|
display: flex;
|
|
@@ -30866,51 +32477,79 @@
|
|
|
30866
32477
|
}
|
|
30867
32478
|
|
|
30868
32479
|
.NextspaceAttribute {
|
|
30869
|
-
align-items:
|
|
32480
|
+
align-items: stretch;
|
|
30870
32481
|
display: flex;
|
|
30871
32482
|
flex-direction: row;
|
|
30872
32483
|
flex-grow: 1;
|
|
32484
|
+
min-height: 32px;
|
|
30873
32485
|
}
|
|
30874
32486
|
|
|
30875
32487
|
.NextspaceAttributeInput {
|
|
30876
|
-
align-items:
|
|
32488
|
+
align-items: stretch;
|
|
30877
32489
|
background-color: #121619;
|
|
30878
32490
|
border: 1px solid #434343;
|
|
30879
|
-
border-radius:
|
|
32491
|
+
border-radius: 0;
|
|
30880
32492
|
display: flex;
|
|
30881
|
-
|
|
30882
|
-
|
|
32493
|
+
flex-grow: 1;
|
|
32494
|
+
min-height: 32px;
|
|
32495
|
+
position: relative;
|
|
32496
|
+
transition: border-color .3s ease, box-shadow .3s ease;
|
|
30883
32497
|
width: 100%;
|
|
30884
32498
|
}
|
|
30885
32499
|
|
|
32500
|
+
/* Adjacent borders would otherwise double up into a 2px rule. */
|
|
32501
|
+
.NextspaceAttribute + .NextspaceAttribute .NextspaceAttributeInput {
|
|
32502
|
+
border-top: none;
|
|
32503
|
+
}
|
|
32504
|
+
|
|
32505
|
+
.NextspaceAttributesGroup >.NextspaceAttribute:first-child .NextspaceAttributeInput {
|
|
32506
|
+
border-top-left-radius: 5px;
|
|
32507
|
+
border-top-right-radius: 5px;
|
|
32508
|
+
}
|
|
32509
|
+
|
|
32510
|
+
.NextspaceAttributesGroupToggle + .NextspaceAttribute .NextspaceAttributeInput {
|
|
32511
|
+
border-top: none;
|
|
32512
|
+
border-top-left-radius: 0;
|
|
32513
|
+
border-top-right-radius: 0;
|
|
32514
|
+
}
|
|
32515
|
+
|
|
32516
|
+
.NextspaceAttributesGroup >.NextspaceAttribute:last-of-type .NextspaceAttributeInput {
|
|
32517
|
+
border-bottom-left-radius: 5px;
|
|
32518
|
+
border-bottom-right-radius: 5px;
|
|
32519
|
+
}
|
|
32520
|
+
|
|
32521
|
+
/* Rows share borders, so a hovered row has to paint its ring above its neighbours. */
|
|
32522
|
+
.NextspaceAttributeInput:hover {
|
|
32523
|
+
border-color: #33b1ff;
|
|
32524
|
+
box-shadow: 0 0 0 1px #33b1ff;
|
|
32525
|
+
z-index: 1;
|
|
32526
|
+
}
|
|
32527
|
+
|
|
30886
32528
|
.NextspaceAttributeInputLabel {
|
|
30887
32529
|
border-right: 1px solid #434343;
|
|
30888
|
-
flex
|
|
30889
|
-
|
|
32530
|
+
flex: 1 1 50%;
|
|
32531
|
+
line-height: 16px;
|
|
30890
32532
|
margin-right: 8px;
|
|
30891
32533
|
overflow: hidden;
|
|
30892
|
-
padding
|
|
30893
|
-
|
|
30894
|
-
white-space: nowrap;
|
|
30895
|
-
width: 90px;
|
|
32534
|
+
padding: 8px;
|
|
32535
|
+
width: 0;
|
|
30896
32536
|
font-size: 12px;
|
|
30897
32537
|
}
|
|
30898
32538
|
|
|
30899
32539
|
.NextspaceAttributeInputValue {
|
|
30900
|
-
background-color: transparent;
|
|
30901
|
-
border: 1px solid transparent;
|
|
30902
32540
|
color: #fff;
|
|
30903
|
-
|
|
30904
|
-
flex
|
|
30905
|
-
height:
|
|
30906
|
-
|
|
30907
|
-
text-align: left;
|
|
30908
|
-
width: 120px;
|
|
30909
|
-
cursor: default;
|
|
32541
|
+
display: flex;
|
|
32542
|
+
flex: 1 1 50%;
|
|
32543
|
+
line-height: 16px;
|
|
32544
|
+
min-height: 30px;
|
|
30910
32545
|
opacity: .6;
|
|
30911
|
-
|
|
30912
|
-
|
|
30913
|
-
|
|
32546
|
+
overflow: hidden;
|
|
32547
|
+
overflow-wrap: anywhere;
|
|
32548
|
+
padding: 8px 8px 8px 2px;
|
|
32549
|
+
text-align: left;
|
|
32550
|
+
white-space: pre-wrap;
|
|
32551
|
+
width: 0;
|
|
32552
|
+
word-break: break-word;
|
|
30914
32553
|
font-size: 12px;
|
|
30915
32554
|
}
|
|
30916
32555
|
|
|
@@ -31158,24 +32797,14 @@
|
|
|
31158
32797
|
groupDiv.appendChild(toggle);
|
|
31159
32798
|
}
|
|
31160
32799
|
for (const attr of group.attributes) {
|
|
31161
|
-
this._generateAttr(groupDiv, type, entity, attr
|
|
32800
|
+
this._generateAttr(groupDiv, type, entity, attr);
|
|
31162
32801
|
}
|
|
31163
32802
|
this._summary.appendChild(groupDiv);
|
|
31164
32803
|
}
|
|
31165
|
-
_generateAttr(container, type, entity, path
|
|
32804
|
+
_generateAttr(container, type, entity, path) {
|
|
31166
32805
|
var _a, _b, _c;
|
|
31167
32806
|
const attrDiv = document.createElement("div");
|
|
31168
32807
|
attrDiv.className = "NextspaceAttribute";
|
|
31169
|
-
if (nested) {
|
|
31170
|
-
const nestedIconStr = `
|
|
31171
|
-
<svg width="11" height="13" viewBox="0 0 11 13" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1V10C1 11.1046 1.89543 12 3 12H10" stroke="#4D5358" stroke-linecap="round" stroke-linejoin="round"></path></svg>
|
|
31172
|
-
`;
|
|
31173
|
-
const nestedIcon = document.createElement("div");
|
|
31174
|
-
nestedIcon.style.marginLeft = "12px";
|
|
31175
|
-
nestedIcon.style.marginRight = "5px";
|
|
31176
|
-
nestedIcon.innerHTML = nestedIconStr;
|
|
31177
|
-
attrDiv.appendChild(nestedIcon);
|
|
31178
|
-
}
|
|
31179
32808
|
const typeItem = digTypeItem(path, (_b = (_a = type.DataSchema) === null || _a === void 0 ? void 0 : _a.Structure) !== null && _b !== void 0 ? _b : []);
|
|
31180
32809
|
const attrType = (_c = typeItem === null || typeItem === void 0 ? void 0 : typeItem.Type) !== null && _c !== void 0 ? _c : BModels.EntityAttribute.EType.String;
|
|
31181
32810
|
const input = document.createElement("div");
|
|
@@ -31183,7 +32812,8 @@
|
|
|
31183
32812
|
attrDiv.appendChild(input);
|
|
31184
32813
|
const attrName = document.createElement("div");
|
|
31185
32814
|
attrName.className = "NextspaceAttributeInputLabel";
|
|
31186
|
-
attrName.
|
|
32815
|
+
attrName.textContent = typeItem ? typeItem.Name ? typeItem.Name : typeItem.Key : path[path.length - 1];
|
|
32816
|
+
attrName.title = attrName.textContent;
|
|
31187
32817
|
input.appendChild(attrName);
|
|
31188
32818
|
const value = BModels.Entity.GetValue({
|
|
31189
32819
|
entity,
|
|
@@ -31213,9 +32843,10 @@
|
|
|
31213
32843
|
valueStr = value ? String(value) : "<No value>";
|
|
31214
32844
|
}
|
|
31215
32845
|
}
|
|
31216
|
-
const attrValue = document.createElement("
|
|
32846
|
+
const attrValue = document.createElement("div");
|
|
31217
32847
|
attrValue.className = "NextspaceAttributeInputValue";
|
|
31218
|
-
attrValue.
|
|
32848
|
+
attrValue.textContent = String(valueStr);
|
|
32849
|
+
attrValue.title = String(valueStr);
|
|
31219
32850
|
input.appendChild(attrValue);
|
|
31220
32851
|
container.appendChild(attrDiv);
|
|
31221
32852
|
return attrDiv;
|
|
@@ -40446,7 +42077,7 @@
|
|
|
40446
42077
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
40447
42078
|
})(exports.StyleUtils || (exports.StyleUtils = {}));
|
|
40448
42079
|
|
|
40449
|
-
const VERSION = "7.1.
|
|
42080
|
+
const VERSION = "7.1.1";
|
|
40450
42081
|
/**
|
|
40451
42082
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
40452
42083
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|
|
@@ -40481,6 +42112,8 @@
|
|
|
40481
42112
|
exports.Draw3dPolyline = Draw3dPolyline;
|
|
40482
42113
|
exports.WidgetControlViewBarSearch = WidgetControlViewBarSearch;
|
|
40483
42114
|
exports.WidgetLeftPanelTabBookmarks = WidgetLeftPanelTabBookmarks;
|
|
42115
|
+
exports.WidgetLeftPanelTabDashboard = WidgetLeftPanelTabDashboard;
|
|
42116
|
+
exports.WidgetLeftPanelTabMenuItems = WidgetLeftPanelTabMenuItems;
|
|
40484
42117
|
exports.VIEWER_BOOKMARKS_WIDGET_KEY = VIEWER_BOOKMARKS_WIDGET_KEY;
|
|
40485
42118
|
exports.WidgetBookmarks = WidgetBookmarks;
|
|
40486
42119
|
exports.WidgetBranding = WidgetBranding;
|