qwc2 2026.8.9 → 2026.8.14
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/actions/bookmark.js +0 -15
- package/actions/localConfig.js +0 -7
- package/components/BookmarkPanel.js +122 -124
- package/components/Icon.js +2 -0
- package/components/IdentifyViewer.js +8 -2
- package/components/ImportLayer.js +6 -392
- package/components/StandardApp.js +0 -5
- package/components/map3d/Map3D.js +10 -8
- package/components/style/BookmarkPanel.css +2 -0
- package/components/style/Icon.css +4 -0
- package/components/widgets/InputContainer.js +2 -29
- package/components/widgets/MenuButton.js +10 -10
- package/components/widgets/style/InputContainer.css +2 -1
- package/icons/public.svg +63 -0
- package/package.json +1 -1
- package/plugins/Bookmark.js +25 -19
- package/plugins/BottomBar.js +2 -2
- package/plugins/Identify.js +4 -1
- package/plugins/MapDropImport.js +135 -0
- package/plugins/MapFilter.js +48 -34
- package/plugins/VisibilityPreset.js +34 -23
- package/plugins/map3d/Viewshed3D.js +171 -52
- package/plugins/map3d/style/Viewshed3D.css +4 -0
- package/plugins/style/MapDropImport.css +19 -0
- package/reducers/localConfig.js +2 -21
- package/static/translations/bg-BG.json +16 -6
- package/static/translations/ca-ES.json +16 -6
- package/static/translations/cs-CZ.json +16 -6
- package/static/translations/de-CH.json +16 -6
- package/static/translations/de-DE.json +16 -6
- package/static/translations/en-US.json +16 -6
- package/static/translations/es-ES.json +16 -6
- package/static/translations/fi-FI.json +16 -6
- package/static/translations/fr-FR.json +16 -6
- package/static/translations/hu-HU.json +16 -6
- package/static/translations/it-IT.json +16 -6
- package/static/translations/ja-JP.json +16 -6
- package/static/translations/nl-NL.json +16 -6
- package/static/translations/no-NO.json +16 -6
- package/static/translations/pl-PL.json +16 -6
- package/static/translations/pt-BR.json +16 -6
- package/static/translations/pt-PT.json +16 -6
- package/static/translations/ro-RO.json +16 -6
- package/static/translations/ru-RU.json +16 -6
- package/static/translations/sv-SE.json +16 -6
- package/static/translations/tr-TR.json +16 -6
- package/static/translations/tsconfig.json +12 -6
- package/static/translations/uk-UA.json +16 -6
- package/utils/FileImportUtils.js +390 -0
- package/utils/LayerUtils.js +18 -5
- package/utils/PermaLinkUtils.js +254 -286
package/actions/bookmark.js
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import bookmarkReducer from '../reducers/bookmark';
|
|
10
10
|
import ReducerIndex from '../reducers/index';
|
|
11
|
-
import { getBookmarks, getVisibilityPresets } from '../utils/PermaLinkUtils';
|
|
12
11
|
ReducerIndex.register("bookmark", bookmarkReducer);
|
|
13
12
|
export var SET_BOOKMARKS = 'SET_BOOKMARKS';
|
|
14
13
|
export var SET_VISIBILITY_PRESETS = 'SET_VISIBILITY_PRESETS';
|
|
@@ -23,18 +22,4 @@ export function setVisibilityPresets(visibilityPresets) {
|
|
|
23
22
|
type: SET_VISIBILITY_PRESETS,
|
|
24
23
|
visibilityPresets: visibilityPresets
|
|
25
24
|
};
|
|
26
|
-
}
|
|
27
|
-
export function refreshBookmarks() {
|
|
28
|
-
return function (dispatch) {
|
|
29
|
-
getBookmarks(function (bookmarks) {
|
|
30
|
-
return dispatch(setBookmarks(bookmarks));
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export function refreshVisibilityPresets() {
|
|
35
|
-
return function (dispatch) {
|
|
36
|
-
getVisibilityPresets(function (presets) {
|
|
37
|
-
return dispatch(setVisibilityPresets(presets));
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
25
|
}
|
package/actions/localConfig.js
CHANGED
|
@@ -13,7 +13,6 @@ export var LOCAL_CONFIG_LOADED = 'LOCAL_CONFIG_LOADED';
|
|
|
13
13
|
export var SET_STARTUP_PARAMETERS = 'SET_STARTUP_PARAMETERS';
|
|
14
14
|
export var SET_COLOR_SCHEME = 'SET_COLOR_SCHEME';
|
|
15
15
|
export var SET_USER_INFO_FIELDS = 'SET_USER_INFO_FIELDS';
|
|
16
|
-
export var SET_PERMALINK_PARAMETERS = 'SET_PERMALINK_PARAMETERS';
|
|
17
16
|
export var REGISTER_CUSTOM_PLUGIN = 'REGISTER_CUSTOM_PLUGIN';
|
|
18
17
|
export var UNREGISTER_CUSTOM_PLUGIN = 'UNREGISTER_CUSTOM_PLUGIN';
|
|
19
18
|
export function localConfigLoaded(config) {
|
|
@@ -43,12 +42,6 @@ export function setUserInfoFields(fields) {
|
|
|
43
42
|
fields: fields
|
|
44
43
|
};
|
|
45
44
|
}
|
|
46
|
-
export function setPermalinkParameters(params) {
|
|
47
|
-
return {
|
|
48
|
-
type: SET_PERMALINK_PARAMETERS,
|
|
49
|
-
params: params
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
45
|
export function registerCustomPlugin(name, availableIn3D) {
|
|
53
46
|
return {
|
|
54
47
|
type: REGISTER_CUSTOM_PLUGIN,
|
|
@@ -31,15 +31,6 @@ import ConfigUtils from '../utils/ConfigUtils';
|
|
|
31
31
|
import LocaleUtils from '../utils/LocaleUtils';
|
|
32
32
|
import MiscUtils from '../utils/MiscUtils';
|
|
33
33
|
import './style/BookmarkPanel.css';
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Allows managing user bookmarks.
|
|
37
|
-
* or user visibility presets if `visibilityPresetsMode` is true.
|
|
38
|
-
*
|
|
39
|
-
* Bookmarks are only allowed for authenticated users.
|
|
40
|
-
*
|
|
41
|
-
* Requires `permalinkServiceUrl` to point to a `qwc-permalink-service`.
|
|
42
|
-
*/
|
|
43
34
|
var BookmarkPanel = /*#__PURE__*/function (_React$Component) {
|
|
44
35
|
function BookmarkPanel() {
|
|
45
36
|
var _this;
|
|
@@ -49,193 +40,203 @@ var BookmarkPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
49
40
|
}
|
|
50
41
|
_this = _callSuper(this, BookmarkPanel, [].concat(args));
|
|
51
42
|
_defineProperty(_this, "state", {
|
|
52
|
-
renameBookmark: null,
|
|
53
43
|
currentBookmark: null,
|
|
44
|
+
rename: false,
|
|
54
45
|
busy: false
|
|
55
46
|
});
|
|
56
47
|
_defineProperty(_this, "bookmarkClicked", function (ev, bookmark) {
|
|
57
|
-
if (_this.state.
|
|
48
|
+
if (_this.state.rename) {
|
|
58
49
|
// pass
|
|
59
50
|
} else if (_this.props.openOnClick) {
|
|
60
51
|
_this.props.onOpen(bookmark.key, ev.button === 1);
|
|
61
|
-
} else if (_this.state.currentBookmark === bookmark
|
|
52
|
+
} else if (_this.state.currentBookmark === bookmark) {
|
|
62
53
|
_this.setState({
|
|
63
54
|
currentBookmark: null,
|
|
64
55
|
description: ""
|
|
65
56
|
});
|
|
66
57
|
} else {
|
|
67
58
|
_this.setState({
|
|
68
|
-
currentBookmark: bookmark
|
|
59
|
+
currentBookmark: bookmark,
|
|
69
60
|
description: bookmark.description
|
|
70
61
|
});
|
|
71
62
|
}
|
|
72
63
|
});
|
|
73
64
|
_defineProperty(_this, "bookmarkDoubleClicked", function (ev, bookmark) {
|
|
74
|
-
if (!_this.state.
|
|
65
|
+
if (!_this.state.rename) {
|
|
75
66
|
_this.props.onOpen(bookmark.key, false);
|
|
76
67
|
}
|
|
77
68
|
});
|
|
78
|
-
_defineProperty(_this, "updateBookmarkName", function (text) {
|
|
79
|
-
_this.setState({
|
|
80
|
-
busy: true
|
|
81
|
-
});
|
|
82
|
-
_this.props.onRename(_this.state.renameBookmark, text, function (success) {
|
|
83
|
-
if (!success) {
|
|
84
|
-
var _this$props$translati;
|
|
85
|
-
/* eslint-disable-next-line */
|
|
86
|
-
alert((_this$props$translati = _this.props.translations) === null || _this$props$translati === void 0 ? void 0 : _this$props$translati.savefailed);
|
|
87
|
-
}
|
|
88
|
-
_this.props.onRefresh();
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
69
|
_defineProperty(_this, "addBookmark", function () {
|
|
92
|
-
var _this$props$translati2;
|
|
93
70
|
_this.setState({
|
|
94
71
|
busy: true
|
|
95
72
|
});
|
|
96
|
-
_this.props.
|
|
73
|
+
_this.props.bookmarkIface.create(_this.props.translations["new"], function (success, key) {
|
|
97
74
|
if (!success) {
|
|
98
|
-
var _this$props$translati3;
|
|
99
75
|
/* eslint-disable-next-line */
|
|
100
|
-
alert(
|
|
76
|
+
alert(_this.props.translations.addfailed);
|
|
77
|
+
_this.setState({
|
|
78
|
+
busy: false
|
|
79
|
+
});
|
|
80
|
+
} else {
|
|
81
|
+
_this.props.bookmarkIface.getList(function (bookmarks) {
|
|
82
|
+
_this.props.setList(bookmarks);
|
|
83
|
+
_this.setState({
|
|
84
|
+
rename: true,
|
|
85
|
+
currentBookmark: bookmarks.find(function (bk) {
|
|
86
|
+
return bk.key === key;
|
|
87
|
+
}),
|
|
88
|
+
busy: false
|
|
89
|
+
});
|
|
90
|
+
});
|
|
101
91
|
}
|
|
102
|
-
_this.props.onRefresh();
|
|
103
|
-
});
|
|
104
|
-
_this.setState({
|
|
105
|
-
description: "",
|
|
106
|
-
currentBookmark: null
|
|
107
92
|
});
|
|
108
93
|
});
|
|
109
|
-
_defineProperty(_this, "updateBookmark", function (
|
|
94
|
+
_defineProperty(_this, "updateBookmark", function (bookmark, params) {
|
|
95
|
+
var updateData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
96
|
+
// eslint-disable-next-line no-alert
|
|
97
|
+
if (updateData && !confirm(_this.props.translations.confirmOverwrite)) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
110
100
|
_this.setState({
|
|
111
101
|
busy: true
|
|
112
102
|
});
|
|
113
|
-
|
|
114
|
-
return bk.key === key;
|
|
115
|
-
}).description;
|
|
116
|
-
_this.props.onUpdate(key, description, function (success) {
|
|
103
|
+
_this.props.bookmarkIface.update(bookmark.key, params, updateData, function (success) {
|
|
117
104
|
if (!success) {
|
|
118
|
-
var _this$props$translati4;
|
|
119
105
|
/* eslint-disable-next-line */
|
|
120
|
-
alert(
|
|
106
|
+
alert(_this.props.translations.savefailed);
|
|
107
|
+
_this.setState({
|
|
108
|
+
busy: false,
|
|
109
|
+
rename: false
|
|
110
|
+
});
|
|
111
|
+
} else {
|
|
112
|
+
_this.props.bookmarkIface.getList(function (bookmarks) {
|
|
113
|
+
_this.props.setList(bookmarks);
|
|
114
|
+
_this.setState({
|
|
115
|
+
rename: false,
|
|
116
|
+
currentBookmark: bookmarks.find(function (bk) {
|
|
117
|
+
return bk.key === bookmark.key;
|
|
118
|
+
}),
|
|
119
|
+
busy: false
|
|
120
|
+
});
|
|
121
|
+
});
|
|
121
122
|
}
|
|
122
|
-
_this.props.onRefresh();
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
|
-
_defineProperty(_this, "removeBookmark", function (
|
|
125
|
+
_defineProperty(_this, "removeBookmark", function (bookmark) {
|
|
126
|
+
// eslint-disable-next-line no-alert
|
|
127
|
+
if (!confirm(_this.props.translations.confirmDelete)) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
126
130
|
_this.setState({
|
|
127
131
|
busy: true
|
|
128
132
|
});
|
|
129
|
-
_this.props.
|
|
133
|
+
_this.props.bookmarkIface["delete"](bookmark.key, function (success) {
|
|
130
134
|
if (!success) {
|
|
131
|
-
var _this$props$translati5;
|
|
132
135
|
/* eslint-disable-next-line */
|
|
133
|
-
alert(
|
|
136
|
+
alert(_this.props.translations.removefailed);
|
|
137
|
+
_this.setState({
|
|
138
|
+
busy: false
|
|
139
|
+
});
|
|
134
140
|
}
|
|
135
|
-
_this.props.
|
|
141
|
+
_this.props.bookmarkIface.getList(function (bookmarks) {
|
|
142
|
+
_this.props.setList(bookmarks);
|
|
143
|
+
_this.setState({
|
|
144
|
+
rename: false,
|
|
145
|
+
currentBookmark: null,
|
|
146
|
+
busy: false
|
|
147
|
+
});
|
|
148
|
+
});
|
|
136
149
|
});
|
|
137
150
|
});
|
|
138
151
|
return _this;
|
|
139
152
|
}
|
|
140
153
|
_inherits(BookmarkPanel, _React$Component);
|
|
141
154
|
return _createClass(BookmarkPanel, [{
|
|
142
|
-
key: "componentDidUpdate",
|
|
143
|
-
value: function componentDidUpdate(prevProps) {
|
|
144
|
-
// Check exact identity of bookmarks array to reset busy state in all cases
|
|
145
|
-
if (prevProps.bookmarks !== this.props.bookmarks) {
|
|
146
|
-
this.setState({
|
|
147
|
-
renameBookmark: null,
|
|
148
|
-
busy: false
|
|
149
|
-
});
|
|
150
|
-
// Select a recently added bookmark
|
|
151
|
-
var addedBookmark = this.props.bookmarks.find(function (bookmark) {
|
|
152
|
-
return !prevProps.bookmarks.some(function (prevBookmark) {
|
|
153
|
-
return prevBookmark.key === bookmark.key;
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
if (addedBookmark) {
|
|
157
|
-
this.setState({
|
|
158
|
-
renameBookmark: addedBookmark.key,
|
|
159
|
-
currentBookmark: null
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}, {
|
|
165
155
|
key: "render",
|
|
166
156
|
value: function render() {
|
|
167
|
-
var
|
|
168
|
-
_this$props$translati7,
|
|
169
|
-
_this$props$translati8,
|
|
170
|
-
_this2 = this,
|
|
171
|
-
_this$props$translati9,
|
|
172
|
-
_this$props$translati0,
|
|
173
|
-
_this$props$translati1,
|
|
174
|
-
_this$props$translati10,
|
|
175
|
-
_this$props$translati11;
|
|
157
|
+
var _this2 = this;
|
|
176
158
|
var username = ConfigUtils.getConfigProp("username");
|
|
159
|
+
var hasPublicBookmarksCap = ConfigUtils.getConfigProp("capabilities", null, []).includes("public_bookmarks");
|
|
177
160
|
var currentBookmark = this.state.currentBookmark;
|
|
178
161
|
var buttonsDisabled = !currentBookmark || this.state.busy;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
role: "body"
|
|
182
|
-
}, " ", (_this$props$translati6 = this.props.translations) === null || _this$props$translati6 === void 0 ? void 0 : _this$props$translati6.notloggedin) : /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
var updatable = (currentBookmark === null || currentBookmark === void 0 ? void 0 : currentBookmark.own) && !this.state.rename;
|
|
163
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
183
164
|
className: "bookmark-body",
|
|
184
165
|
role: "body"
|
|
185
166
|
}, /*#__PURE__*/React.createElement("h4", {
|
|
186
167
|
className: "bookmark-header"
|
|
187
|
-
}, /*#__PURE__*/React.createElement("span", null,
|
|
168
|
+
}, /*#__PURE__*/React.createElement("span", null, this.props.translations.title), username ? /*#__PURE__*/React.createElement("button", {
|
|
188
169
|
className: "button",
|
|
189
170
|
onClick: this.addBookmark,
|
|
190
|
-
title:
|
|
171
|
+
title: this.props.translations["new"]
|
|
191
172
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
192
173
|
icon: "plus"
|
|
193
|
-
}))), !this.props.openOnClick ? /*#__PURE__*/React.createElement("div", {
|
|
174
|
+
})) : null), !this.props.openOnClick ? /*#__PURE__*/React.createElement("div", {
|
|
194
175
|
className: "bookmark-actions controlgroup"
|
|
195
176
|
}, /*#__PURE__*/React.createElement("button", {
|
|
196
177
|
className: "button",
|
|
197
178
|
disabled: buttonsDisabled,
|
|
198
179
|
onClick: function onClick() {
|
|
199
|
-
return _this2.props.onOpen(currentBookmark, false);
|
|
180
|
+
return _this2.props.onOpen(currentBookmark.key, false);
|
|
200
181
|
},
|
|
201
|
-
title:
|
|
182
|
+
title: this.props.translations.open
|
|
202
183
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
203
184
|
icon: "folder-open"
|
|
204
|
-
})),
|
|
185
|
+
})), /*#__PURE__*/React.createElement("button", {
|
|
205
186
|
className: "button",
|
|
206
187
|
disabled: buttonsDisabled,
|
|
207
188
|
onClick: function onClick() {
|
|
208
|
-
return _this2.props.onOpen(currentBookmark, true);
|
|
189
|
+
return _this2.props.onOpen(currentBookmark.key, true);
|
|
209
190
|
},
|
|
210
|
-
title:
|
|
191
|
+
title: this.props.translations.openTab
|
|
211
192
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
212
193
|
icon: "open_link"
|
|
213
|
-
}))
|
|
194
|
+
})), this.props.onZoomToExtent ? /*#__PURE__*/React.createElement("button", {
|
|
214
195
|
className: "button",
|
|
215
196
|
disabled: buttonsDisabled,
|
|
216
197
|
onClick: function onClick() {
|
|
217
|
-
return _this2.props.onZoomToExtent(currentBookmark);
|
|
198
|
+
return _this2.props.onZoomToExtent(currentBookmark.key);
|
|
218
199
|
},
|
|
219
|
-
title:
|
|
200
|
+
title: this.props.translations.zoomToExtent
|
|
220
201
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
221
202
|
icon: "zoom"
|
|
222
203
|
})) : null, /*#__PURE__*/React.createElement("button", {
|
|
223
204
|
className: "button",
|
|
224
|
-
disabled:
|
|
205
|
+
disabled: !updatable,
|
|
225
206
|
onClick: function onClick() {
|
|
226
|
-
return _this2.updateBookmark(currentBookmark);
|
|
207
|
+
return _this2.updateBookmark(currentBookmark, {}, true);
|
|
227
208
|
},
|
|
228
|
-
title:
|
|
209
|
+
title: this.props.translations.update
|
|
229
210
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
230
211
|
icon: "save"
|
|
231
212
|
}))) : null, /*#__PURE__*/React.createElement("div", {
|
|
232
213
|
className: "bookmark-list"
|
|
233
214
|
}, this.props.bookmarks.map(function (bookmark) {
|
|
234
|
-
var _this2$props$translat;
|
|
235
215
|
var itemclasses = classnames({
|
|
236
216
|
"bookmark-list-item": true,
|
|
237
|
-
"bookmark-list-item-active": currentBookmark === bookmark.key
|
|
217
|
+
"bookmark-list-item-active": (currentBookmark === null || currentBookmark === void 0 ? void 0 : currentBookmark.key) === bookmark.key
|
|
238
218
|
});
|
|
219
|
+
var renaming = (currentBookmark === null || currentBookmark === void 0 ? void 0 : currentBookmark.key) === bookmark.key && _this2.state.rename;
|
|
220
|
+
var publicIcon = null;
|
|
221
|
+
if (bookmark.own && hasPublicBookmarksCap) {
|
|
222
|
+
publicIcon = /*#__PURE__*/React.createElement(Icon, {
|
|
223
|
+
disabled: _this2.state.busy,
|
|
224
|
+
icon: "public",
|
|
225
|
+
inactive: !bookmark["public"],
|
|
226
|
+
onClick: function onClick(ev) {
|
|
227
|
+
_this2.updateBookmark(bookmark, {
|
|
228
|
+
"public": !bookmark["public"]
|
|
229
|
+
});
|
|
230
|
+
MiscUtils.killEvent(ev);
|
|
231
|
+
},
|
|
232
|
+
title: _this2.props.translations.togglePublic
|
|
233
|
+
});
|
|
234
|
+
} else if (bookmark["public"]) {
|
|
235
|
+
publicIcon = /*#__PURE__*/React.createElement(Icon, {
|
|
236
|
+
icon: "public",
|
|
237
|
+
title: _this2.props.translations["public"]
|
|
238
|
+
});
|
|
239
|
+
}
|
|
239
240
|
return /*#__PURE__*/React.createElement("div", {
|
|
240
241
|
className: itemclasses,
|
|
241
242
|
key: bookmark.key,
|
|
@@ -248,13 +249,17 @@ var BookmarkPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
248
249
|
onDoubleClick: function onDoubleClick(ev) {
|
|
249
250
|
return _this2.bookmarkDoubleClicked(ev, bookmark);
|
|
250
251
|
},
|
|
251
|
-
title:
|
|
252
|
-
},
|
|
252
|
+
title: _this2.props.translations.lastUpdate + ": " + bookmark.date
|
|
253
|
+
}, renaming ? /*#__PURE__*/React.createElement(InputContainer, null, /*#__PURE__*/React.createElement(TextInput, {
|
|
253
254
|
focusOnRef: true,
|
|
254
|
-
onChange:
|
|
255
|
+
onChange: function onChange(text) {
|
|
256
|
+
return _this2.updateBookmark(bookmark, {
|
|
257
|
+
description: text
|
|
258
|
+
});
|
|
259
|
+
},
|
|
255
260
|
onNoChange: function onNoChange() {
|
|
256
261
|
return _this2.setState({
|
|
257
|
-
|
|
262
|
+
rename: false
|
|
258
263
|
});
|
|
259
264
|
},
|
|
260
265
|
role: "input",
|
|
@@ -264,49 +269,42 @@ var BookmarkPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
264
269
|
icon: "ok",
|
|
265
270
|
onClick: MiscUtils.killEvent,
|
|
266
271
|
role: "suffix"
|
|
267
|
-
})) : /*#__PURE__*/React.createElement("span", null, bookmark.description),
|
|
272
|
+
})) : /*#__PURE__*/React.createElement("span", null, bookmark.description), !renaming ? publicIcon : null, bookmark.own && !renaming ? [/*#__PURE__*/React.createElement(Icon, {
|
|
273
|
+
disabled: _this2.state.busy,
|
|
268
274
|
icon: "draw",
|
|
275
|
+
key: "draw",
|
|
269
276
|
onClick: function onClick(ev) {
|
|
270
277
|
_this2.setState({
|
|
271
|
-
|
|
272
|
-
|
|
278
|
+
currentBookmark: bookmark,
|
|
279
|
+
rename: true
|
|
273
280
|
});
|
|
274
281
|
MiscUtils.killEvent(ev);
|
|
275
282
|
},
|
|
276
283
|
title: LocaleUtils.tr("common.rename")
|
|
277
|
-
})
|
|
284
|
+
}), /*#__PURE__*/React.createElement(Icon, {
|
|
278
285
|
disabled: _this2.state.busy,
|
|
279
286
|
icon: "trash",
|
|
287
|
+
key: "trash",
|
|
280
288
|
onClick: function onClick(ev) {
|
|
281
|
-
_this2.removeBookmark(bookmark
|
|
289
|
+
_this2.removeBookmark(bookmark);
|
|
282
290
|
MiscUtils.killEvent(ev);
|
|
283
291
|
},
|
|
284
292
|
title: LocaleUtils.tr("common.delete")
|
|
285
|
-
}) : null);
|
|
293
|
+
})] : null);
|
|
286
294
|
}), isEmpty(this.props.bookmarks) ? /*#__PURE__*/React.createElement("div", {
|
|
287
295
|
className: "bookmark-list-item-empty"
|
|
288
|
-
},
|
|
296
|
+
}, this.props.translations.noitems) : null));
|
|
289
297
|
}
|
|
290
298
|
}]);
|
|
291
299
|
}(React.Component);
|
|
292
300
|
_defineProperty(BookmarkPanel, "availableIn3D", true);
|
|
293
301
|
_defineProperty(BookmarkPanel, "propTypes", {
|
|
302
|
+
bookmarkIface: PropTypes.object,
|
|
294
303
|
bookmarks: PropTypes.array,
|
|
295
|
-
onAdd: PropTypes.func,
|
|
296
304
|
onOpen: PropTypes.func,
|
|
297
|
-
onRefresh: PropTypes.func,
|
|
298
|
-
onRemove: PropTypes.func,
|
|
299
|
-
onRename: PropTypes.func,
|
|
300
|
-
onUpdate: PropTypes.func,
|
|
301
305
|
onZoomToExtent: PropTypes.func,
|
|
302
|
-
/** Whether to directly open the bookmark on click / middle click, instead of showing dedicated open buttons. */
|
|
303
306
|
openOnClick: PropTypes.bool,
|
|
304
|
-
|
|
305
|
-
showZoomToExtent: PropTypes.bool,
|
|
307
|
+
setList: PropTypes.func,
|
|
306
308
|
translations: PropTypes.objectOf(PropTypes.string)
|
|
307
309
|
});
|
|
308
|
-
_defineProperty(BookmarkPanel, "defaultProps", {
|
|
309
|
-
showOpenTab: true,
|
|
310
|
-
showZoomToExtent: false
|
|
311
|
-
});
|
|
312
310
|
export default BookmarkPanel;
|
package/components/Icon.js
CHANGED
|
@@ -38,6 +38,7 @@ var Icon = /*#__PURE__*/function (_React$Component) {
|
|
|
38
38
|
var classes = classnames(_defineProperty(_defineProperty(_defineProperty({
|
|
39
39
|
icon: true,
|
|
40
40
|
icon_disabled: this.props.disabled,
|
|
41
|
+
icon_inactive: this.props.inactive,
|
|
41
42
|
icon_clickable: !!this.props.onClick || !!this.props.onMouseDown || !!this.props.onPointerDown
|
|
42
43
|
}, "icon-" + this.props.icon, true), "icon_" + this.props.size, !!this.props.size), this.props.className, !!this.props.className));
|
|
43
44
|
var tabIndex = undefined;
|
|
@@ -85,6 +86,7 @@ _defineProperty(Icon, "propTypes", {
|
|
|
85
86
|
className: PropTypes.string,
|
|
86
87
|
disabled: PropTypes.bool,
|
|
87
88
|
icon: PropTypes.string,
|
|
89
|
+
inactive: PropTypes.bool,
|
|
88
90
|
onClick: PropTypes.func,
|
|
89
91
|
onMouseDown: PropTypes.func,
|
|
90
92
|
onMouseUp: PropTypes.func,
|
|
@@ -363,8 +363,10 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
363
363
|
_defineProperty(_this, "storeIdentifyResults", function () {
|
|
364
364
|
return new Promise(function (resolve) {
|
|
365
365
|
return resolve({
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
state: {
|
|
367
|
+
identifyResults: _this.serializeResults(),
|
|
368
|
+
currentResultDisplayMode: _this.props.resultDisplayMode
|
|
369
|
+
}
|
|
368
370
|
});
|
|
369
371
|
});
|
|
370
372
|
});
|
|
@@ -881,6 +883,7 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
881
883
|
fields: Object.values(fields),
|
|
882
884
|
hideIdColumn: true,
|
|
883
885
|
highlightFeatures: _this.setHighlightedFeatures,
|
|
886
|
+
renderField: _this.renderTableField,
|
|
884
887
|
selectionChanged: function selectionChanged(sel) {
|
|
885
888
|
return _this.setState(function (state) {
|
|
886
889
|
return {
|
|
@@ -891,6 +894,9 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
891
894
|
}) : null);
|
|
892
895
|
}));
|
|
893
896
|
});
|
|
897
|
+
_defineProperty(_this, "renderTableField", function (feature, field) {
|
|
898
|
+
return _this.attribValue(feature.properties[field.name], field.name, feature.layername, feature);
|
|
899
|
+
});
|
|
894
900
|
_defineProperty(_this, "tableAction", function (layerid, action) {
|
|
895
901
|
if (action === "Export") {
|
|
896
902
|
var features = isEmpty(_this.state.tableSelection[layerid]) ? _this.state.resultTree[layerid] : Object.values(_this.state.tableSelection[layerid]);
|