@jupytergis/base 0.4.4 → 0.5.0

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.
Files changed (38) hide show
  1. package/lib/annotations/components/AnnotationFloater.d.ts +1 -4
  2. package/lib/annotations/components/AnnotationFloater.js +11 -6
  3. package/lib/annotations/model.d.ts +1 -0
  4. package/lib/annotations/model.js +9 -0
  5. package/lib/commands.js +50 -221
  6. package/lib/constants.d.ts +2 -16
  7. package/lib/constants.js +9 -24
  8. package/lib/icons.d.ts +8 -0
  9. package/lib/icons.js +40 -0
  10. package/lib/index.d.ts +1 -0
  11. package/lib/index.js +1 -0
  12. package/lib/mainview/mainView.d.ts +6 -1
  13. package/lib/mainview/mainView.js +127 -11
  14. package/lib/menus.d.ts +4 -0
  15. package/lib/menus.js +45 -0
  16. package/lib/panelview/annotationPanel.js +2 -2
  17. package/lib/panelview/components/identify-panel/IdentifyPanel.js +29 -7
  18. package/lib/panelview/components/layers.js +1 -0
  19. package/lib/panelview/leftpanel.js +0 -8
  20. package/lib/panelview/rightpanel.js +1 -0
  21. package/lib/toolbar/widget.js +44 -57
  22. package/lib/tools.d.ts +1 -1
  23. package/lib/tools.js +15 -7
  24. package/lib/widget.d.ts +1 -0
  25. package/lib/widget.js +3 -0
  26. package/package.json +2 -2
  27. package/style/icons/book_open.svg +19 -0
  28. package/style/icons/clock-solid.svg +17 -0
  29. package/style/icons/geolocation.svg +15 -0
  30. package/style/icons/info-solid.svg +20 -0
  31. package/style/icons/raster.svg +3 -2
  32. package/style/icons/target_with_center.svg +9 -0
  33. package/style/icons/target_without_center.svg +17 -0
  34. package/style/icons/terminal_toolbar.svg +12 -0
  35. package/style/icons/vector_square.svg +21 -0
  36. package/style/leftPanel.css +0 -1
  37. package/lib/panelview/components/sources.d.ts +0 -10
  38. package/lib/panelview/components/sources.js +0 -147
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/base",
3
- "version": "0.4.4",
3
+ "version": "0.5.0",
4
4
  "description": "A JupyterLab extension for 3D modelling.",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -43,7 +43,7 @@
43
43
  "@fortawesome/react-fontawesome": "latest",
44
44
  "@jupyter/react-components": "^0.16.6",
45
45
  "@jupyter/ydoc": "^2.0.0 || ^3.0.0",
46
- "@jupytergis/schema": "^0.4.4",
46
+ "@jupytergis/schema": "^0.5.0",
47
47
  "@jupyterlab/application": "^4.3.0",
48
48
  "@jupyterlab/apputils": "^4.3.0",
49
49
  "@jupyterlab/completer": "^4.3.0",
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ viewBox="0 0 576 512"
4
+ version="1.1"
5
+ id="svg1"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ xmlns:svg="http://www.w3.org/2000/svg">
8
+ <defs
9
+ id="defs1" />
10
+ <!--!Font
11
+ Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License -
12
+ https://fontawesome.com/license/free -->
13
+ <path
14
+ id="path1"
15
+ d="M542.2 32.1c-54.8 3.1-163.7 14.4-231 55.6-4.6 2.8-7.3 7.9-7.3 13.2v363.9c0 11.6 12.6 18.9 23.3 13.5 69.2-34.8 169.2-44.3 218.7-46.9 16.9-.9 30-14.4 30-30.7V62.8c0-17.7-15.4-31.7-33.8-30.7zM264.7 87.6C197.5 46.5 88.6 35.2 33.8 32.1 15.4 31 0 45 0 62.8V400.6c0 16.2 13.1 29.8 30 30.7 49.5 2.6 149.6 12.1 218.8 47 10.6 5.4 23.2-1.9 23.2-13.5V100.6c0-5.3-2.6-10.1-7.3-13z"
16
+ fill="#616161"
17
+ class="jp-icon3"
18
+ />
19
+ </svg>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ viewBox="0 0 512 512"
4
+ version="1.1"
5
+ id="svg1"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ xmlns:svg="http://www.w3.org/2000/svg">
8
+ <defs
9
+ id="defs1" />
10
+ <!--!FontAwesome Free 6.7.2 by @fontawesome - https://fontawesome.com License -https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
11
+ <path
12
+ d="M 256,47.68 C 140.92,47.68 47.68,140.92 47.68,256 47.68,371.08 140.92,464.32 256,464.32 371.08,464.32 464.32,371.08 464.32,256 464.32,140.92 371.08,47.68 256,47.68 Z m 77.7,262.92 v 0 l -16.8,21 a 13.44,13.44 0 0 1 -18.9,2.1 v 0 l -56.28,-41.748 a 33.6,33.6 0 0 1 -12.6,-26.208 V 135.04 a 13.44,13.44 0 0 1 13.44,-13.44 h 26.88 a 13.44,13.44 0 0 1 13.44,13.44 V 256 l 48.72,35.7 a 13.44,13.44 0 0 1 2.1,18.9 z"
13
+ id="path1"
14
+ style="stroke-width:0.84"
15
+ fill="#616161"
16
+ class="jp-icon3" />
17
+ </svg>
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ viewBox="0 0 384 512"
4
+ version="1.1"
5
+ id="svg1"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ xmlns:svg="http://www.w3.org/2000/svg">
8
+ <defs
9
+ id="defs1" />
10
+ <!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
11
+ <path
12
+ d="M172.3 501.7C27 291 0 269.4 0 192 0 86 86 0 192 0s192 86 192 192c0 77.4-27 99-172.3 309.7-9.5 13.8-29.9 13.8-39.5 0zM192 272c44.2 0 80-35.8 80-80s-35.8-80-80-80-80 35.8-80 80 35.8 80 80 80z"
13
+ id="path1"
14
+ style="fill:#616161;fill-opacity:1" />
15
+ </svg>
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ viewBox="0 0 192 512"
4
+ version="1.1"
5
+ id="svg1"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ xmlns:svg="http://www.w3.org/2000/svg">
8
+ <defs
9
+ id="defs1" />
10
+ <!--!Font
11
+ Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License -
12
+ https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
13
+ <path
14
+ d="m 35.2,390.56 h 16 V 275.04 h -16 c -8.8,0 -16,-7.2 -16,-16 V 220.8 c 0,-8.8 7.2,-16 16,-16 h 89.6 c 8.8,0 16,7.2 16,16 v 169.76 h 16 c 8.8,0 16,7.2 16,16 v 38.24 c 0,8.8 -7.2,16 -16,16 H 35.2 c -8.8,0 -16,-7.2 -16,-16 v -38.24 c 0,-8.8 7.2,-16 16,-16 z M 96,51.2 c -31.84,0 -57.6,25.76 -57.6,57.6 0,31.84 25.76,57.6 57.6,57.6 31.84,0 57.6,-25.76 57.6,-57.6 0,-31.84 -25.76,-57.6 -57.6,-57.6 z"
15
+ id="path1"
16
+ style="stroke-width:0.8"
17
+ fill="#616161"
18
+ class="jp-icon3"
19
+ />
20
+ </svg>
@@ -1,5 +1,6 @@
1
1
  <svg height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg">
2
- <g class="jp-icon2 jp-icon-selectable" fill="#e2e2e2">
3
- <path d="M 22,8 H 2 v 1 h 20 z m 0,10.5 H 2 v 1 H 22 Z M 22,15 H 2 v 1 h 20 z m 0,-3.5 H 2 v 1 h 20 z m 0,-7 H 2 v 1 H 22 Z M 5.5,2 h -1 v 20 h 1 z M 9,2 H 8 v 20 h 1 z m 3.5,0 h -1 v 20 h 1 z M 16,2 h -1 v 20 h 1 z m 3.5,0 h -1 v 20 h 1 z"/>
2
+ <g class="jp-icon3 jp-icon-selectable" fill="#616161">
3
+ <path
4
+ d="M 22,8 H 2 v 1 h 20 z m 0,10.5 H 2 v 1 H 22 Z M 22,15 H 2 v 1 h 20 z m 0,-3.5 H 2 v 1 h 20 z m 0,-7 H 2 v 1 H 22 Z M 5.5,2 h -1 v 20 h 1 z M 9,2 H 8 v 20 h 1 z m 3.5,0 h -1 v 20 h 1 z M 16,2 h -1 v 20 h 1 z m 3.5,0 h -1 v 20 h 1 z" />
4
5
  </g>
5
6
  </svg>
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font
2
+ Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License -
3
+ https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
4
+ <path
5
+ d="M256 0c17.7 0 32 14.3 32 32l0 34.7C368.4 80.1 431.9 143.6 445.3 224l34.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-34.7 0C431.9 368.4 368.4 431.9 288 445.3l0 34.7c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.7C143.6 431.9 80.1 368.4 66.7 288L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l34.7 0C80.1 143.6 143.6 80.1 224 66.7L224 32c0-17.7 14.3-32 32-32zM128 256a128 128 0 1 0 256 0 128 128 0 1 0 -256 0zm128-80a80 80 0 1 1 0 160 80 80 0 1 1 0-160z"
6
+ fill="#616161"
7
+ class="jp-icon3"
8
+ />
9
+ </svg>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ viewBox="0 0 512 512"
4
+ version="1.1"
5
+ id="svg1"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ xmlns:svg="http://www.w3.org/2000/svg">
8
+ <defs
9
+ id="defs1" />
10
+ <!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
11
+ <path
12
+ d="m 256,0 c 17.7,0 32,14.3 32,32 V 66.7 C 368.4,80.1 431.9,143.6 445.3,224 H 480 c 17.7,0 32,14.3 32,32 0,17.7 -14.3,32 -32,32 H 445.3 C 431.9,368.4 368.4,431.9 288,445.3 V 480 c 0,17.7 -14.3,32 -32,32 -17.7,0 -32,-14.3 -32,-32 V 445.3 C 143.6,431.9 80.1,368.4 66.7,288 H 32 C 14.3,288 0,273.7 0,256 0,238.3 14.3,224 32,224 H 66.7 C 80.1,143.6 143.6,80.1 224,66.7 V 32 C 224,14.3 238.3,0 256,0 Z M 128,256 c 0,70.6925 57.30755,127.99994 128,127.99994 70.69245,0 128,-57.30744 128,-127.99994 0,-70.6925 -57.30755,-127.99994 -128,-127.99994 -70.69245,0 -128,57.30744 -128,127.99994 z"
13
+ id="path1"
14
+ fill="#616161"
15
+ class="jp-icon3"
16
+ />
17
+ </svg>
@@ -0,0 +1,12 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">
2
+ <path
3
+ d="M2 2h20v20H2z"
4
+ fill="#616161"
5
+ class="jp-icon3"
6
+ />
7
+ <path
8
+ d="M9.01 14.762q0-.246-.077-.434a.9.9 0 0 0-.234-.351 1.6 1.6 0 0 0-.422-.288 5 5 0 0 0-.627-.263q-.592-.211-1.078-.446a3.5 3.5 0 0 1-.832-.544 2.2 2.2 0 0 1-.528-.721 2.4 2.4 0 0 1-.187-.985q0-.498.17-.908a2.1 2.1 0 0 1 .48-.72q.31-.306.75-.493.44-.188.979-.24V7.11h.937v1.272q.527.07.95.287.421.217.714.568.3.345.457.82.165.47.164 1.055H8.998q0-.709-.323-1.072-.322-.37-.873-.37-.299 0-.521.083a.9.9 0 0 0-.358.223.9.9 0 0 0-.21.334q-.066.194-.065.421 0 .23.064.41a.9.9 0 0 0 .229.329q.165.152.428.293.263.134.656.275.591.223 1.072.463.48.235.82.55.346.312.528.727.187.41.187.973 0 .515-.17.932-.17.41-.486.709t-.762.48a3.7 3.7 0 0 1-.996.229v1.148h-.931V17.1a4 4 0 0 1-.967-.217 2.6 2.6 0 0 1-.832-.504 2.4 2.4 0 0 1-.574-.826q-.217-.505-.217-1.207h1.635q0 .421.123.709.123.281.316.45.2.165.451.235.252.07.516.07.627 0 .949-.292a.98.98 0 0 0 .322-.756m8.36 3.51h-5.343V17h5.344z"
9
+ fill="#bdbdbd"
10
+ class="jp-icon-accent1"
11
+ />
12
+ </svg>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ class="jp-icon3"
4
+ viewBox="0 0 512 512"
5
+ version="1.1"
6
+ id="svg1"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:svg="http://www.w3.org/2000/svg">
9
+ <defs
10
+ id="defs1" />
11
+ <!--!Font
12
+ Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License -
13
+ https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
14
+ <path
15
+ d="M 486.4,140.8 V 54.4 c 0,-15.93 -12.87,-28.8 -28.8,-28.8 h -86.4 c -15.93,0 -28.8,12.87 -28.8,28.8 H 169.6 c 0,-15.93 -12.87,-28.8 -28.8,-28.8 H 54.4 c -15.93,0 -28.8,12.87 -28.8,28.8 v 86.4 c 0,15.93 12.87,28.8 28.8,28.8 v 172.8 c -15.93,0 -28.8,12.87 -28.8,28.8 v 86.4 c 0,15.93 12.87,28.8 28.8,28.8 h 86.4 c 15.93,0 28.8,-12.87 28.8,-28.8 h 172.8 c 0,15.93 12.87,28.8 28.8,28.8 h 86.4 c 15.93,0 28.8,-12.87 28.8,-28.8 v -86.4 c 0,-15.93 -12.87,-28.8 -28.8,-28.8 V 169.6 c 15.93,0 28.8,-12.87 28.8,-28.8 z M 400,83.2 h 28.8 V 112 H 400 Z m -316.8,0 H 112 V 112 H 83.2 Z M 112,428.8 H 83.2 V 400 H 112 Z m 316.8,0 H 400 V 400 h 28.8 z M 400,342.4 h -28.8 c -15.93,0 -28.8,12.87 -28.8,28.8 V 400 H 169.6 v -28.8 c 0,-15.93 -12.87,-28.8 -28.8,-28.8 H 112 V 169.6 h 28.8 c 15.93,0 28.8,-12.87 28.8,-28.8 V 112 h 172.8 v 28.8 c 0,15.93 12.87,28.8 28.8,28.8 H 400 Z"
16
+ id="path1"
17
+ style="stroke-width:0.9"
18
+ fill="#616161"
19
+ class="jp-icon3"
20
+ />
21
+ </svg>
@@ -3,7 +3,6 @@
3
3
  | Distributed under the terms of the Modified BSD License.
4
4
  |---------------------------------------------------------------------------- */
5
5
 
6
- .jp-gis-sourcePanel,
7
6
  .jp-gis-layerPanel {
8
7
  min-height: 3em;
9
8
  }
@@ -1,10 +0,0 @@
1
- import { Panel } from '@lumino/widgets';
2
- import { ILeftPanelOptions } from '../leftpanel';
3
- /**
4
- * The sources panel widget.
5
- */
6
- export declare class SourcesPanel extends Panel {
7
- constructor(options: ILeftPanelOptions);
8
- private _model;
9
- private _onSelect;
10
- }
@@ -1,147 +0,0 @@
1
- import { DOMUtils } from '@jupyterlab/apputils';
2
- import { LabIcon, ReactWidget } from '@jupyterlab/ui-components';
3
- import { Panel } from '@lumino/widgets';
4
- import React, { useEffect, useState } from 'react';
5
- import { icons } from '../../constants';
6
- const SOURCES_PANEL_CLASS = 'jp-gis-sourcePanel';
7
- const SOURCE_CLASS = 'jp-gis-source';
8
- const SOURCE_TITLE_CLASS = 'jp-gis-sourceTitle';
9
- const SOURCE_ICON_CLASS = 'jp-gis-sourceIcon';
10
- const SOURCE_TEXT_CLASS = 'jp-gis-sourceText';
11
- const SOURCE_UNUSED = 'jp-gis-sourceUnused';
12
- const SOURCE_INFO = 'jp-gis-sourceInfo';
13
- /**
14
- * The sources panel widget.
15
- */
16
- export class SourcesPanel extends Panel {
17
- constructor(options) {
18
- super();
19
- this._model = options.model;
20
- this._onSelect = options.onSelect;
21
- this.id = 'jupytergis::sourcesPanel';
22
- this.addClass(SOURCES_PANEL_CLASS);
23
- this.addWidget(ReactWidget.create(React.createElement(SourcesBodyComponent, { model: this._model, onSelect: this._onSelect })));
24
- }
25
- }
26
- /**
27
- * The body component of the panel.
28
- */
29
- function SourcesBodyComponent(props) {
30
- var _a, _b;
31
- const [model, setModel] = useState((_a = props.model) === null || _a === void 0 ? void 0 : _a.jGISModel);
32
- const [sourceIds, setSourceIds] = useState(Private.sortedSourceIds(model));
33
- /**
34
- * Propagate the source selection.
35
- */
36
- const onItemClick = ({ type, item, nodeId, event }) => {
37
- props.onSelect({ type, item, nodeId, event });
38
- };
39
- /**
40
- * Listen to the sources and changes.
41
- */
42
- useEffect(() => {
43
- const updateSources = () => {
44
- setSourceIds([...Private.sortedSourceIds(model)]);
45
- };
46
- model === null || model === void 0 ? void 0 : model.sharedModel.sourcesChanged.connect(updateSources);
47
- model === null || model === void 0 ? void 0 : model.clientStateChanged.connect(updateSources);
48
- updateSources();
49
- return () => {
50
- model === null || model === void 0 ? void 0 : model.sharedModel.sourcesChanged.disconnect(updateSources);
51
- model === null || model === void 0 ? void 0 : model.clientStateChanged.disconnect(updateSources);
52
- };
53
- }, [model]);
54
- /**
55
- * Update the model when it changes.
56
- */
57
- (_b = props.model) === null || _b === void 0 ? void 0 : _b.documentChanged.connect((_, widget) => {
58
- setModel(widget === null || widget === void 0 ? void 0 : widget.model);
59
- });
60
- return (React.createElement("div", { id: "jp-gis-sources" }, sourceIds.map(sourceId => {
61
- return (React.createElement(SourceComponent, { key: `source-${sourceId}`, gisModel: model, sourceId: sourceId, onClick: onItemClick }));
62
- })));
63
- }
64
- function isSelected(sourceId, model) {
65
- var _a, _b, _c, _d;
66
- return ((((_b = (_a = model === null || model === void 0 ? void 0 : model.localState) === null || _a === void 0 ? void 0 : _a.selected) === null || _b === void 0 ? void 0 : _b.value) &&
67
- Object.keys((_d = (_c = model === null || model === void 0 ? void 0 : model.localState) === null || _c === void 0 ? void 0 : _c.selected) === null || _d === void 0 ? void 0 : _d.value).includes(sourceId)) ||
68
- false);
69
- }
70
- /**
71
- * The component to display a single source.
72
- */
73
- function SourceComponent(props) {
74
- const { sourceId, gisModel, onClick } = props;
75
- const source = gisModel === null || gisModel === void 0 ? void 0 : gisModel.getSource(sourceId);
76
- if (source === undefined) {
77
- return React.createElement(React.Fragment, null);
78
- }
79
- const [id, setId] = useState('');
80
- const [selected, setSelected] = useState(
81
- // TODO Support multi-selection as `model?.jGISModel?.localState?.selected.value` does
82
- isSelected(sourceId, gisModel));
83
- const [unused, setUnused] = useState(false);
84
- const name = source.name;
85
- useEffect(() => {
86
- setId(DOMUtils.createDomID());
87
- }, []);
88
- /**
89
- * Check if the source is used by a layer.
90
- */
91
- useEffect(() => {
92
- const checkUsage = () => {
93
- const sources = gisModel === null || gisModel === void 0 ? void 0 : gisModel.getLayersBySource(sourceId);
94
- setUnused(sources ? sources.length === 0 : true);
95
- };
96
- gisModel === null || gisModel === void 0 ? void 0 : gisModel.sharedLayersChanged.connect(checkUsage);
97
- checkUsage();
98
- return () => {
99
- gisModel === null || gisModel === void 0 ? void 0 : gisModel.sharedLayersChanged.disconnect(checkUsage);
100
- };
101
- }, [gisModel]);
102
- /**
103
- * Listen to the changes on the current source.
104
- */
105
- useEffect(() => {
106
- const onClientSharedStateChanged = (sender, clients) => {
107
- // TODO Support follow mode and remoteUser state
108
- setSelected(isSelected(sourceId, gisModel));
109
- };
110
- gisModel === null || gisModel === void 0 ? void 0 : gisModel.clientStateChanged.connect(onClientSharedStateChanged);
111
- return () => {
112
- gisModel === null || gisModel === void 0 ? void 0 : gisModel.clientStateChanged.disconnect(onClientSharedStateChanged);
113
- };
114
- }, [gisModel]);
115
- const setSelection = (event) => {
116
- var _a;
117
- const childId = (_a = event.currentTarget.children.namedItem(id)) === null || _a === void 0 ? void 0 : _a.id;
118
- onClick({ type: 'source', item: sourceId, nodeId: childId, event });
119
- };
120
- let mainClasses = SOURCE_CLASS;
121
- if (selected) {
122
- mainClasses = mainClasses.concat(' jp-mod-selected');
123
- }
124
- if (unused) {
125
- mainClasses = mainClasses.concat(` ${SOURCE_UNUSED}`);
126
- }
127
- return (React.createElement("div", { className: mainClasses },
128
- React.createElement("div", { className: SOURCE_TITLE_CLASS, onClick: setSelection, onContextMenu: setSelection },
129
- icons.has(source.type) && (React.createElement(LabIcon.resolveReact, Object.assign({}, icons.get(source.type), { className: SOURCE_ICON_CLASS }))),
130
- React.createElement("span", { id: id, className: SOURCE_TEXT_CLASS }, name),
131
- unused && React.createElement("span", { className: SOURCE_INFO }, "(unused)"))));
132
- }
133
- var Private;
134
- (function (Private) {
135
- function sortedSourceIds(model) {
136
- const sources = model === null || model === void 0 ? void 0 : model.getSources();
137
- if (sources === undefined) {
138
- return [];
139
- }
140
- return Object.keys(sources).sort((id1, id2) => {
141
- const name1 = sources[id1].name.toLowerCase();
142
- const name2 = sources[id2].name.toLowerCase();
143
- return name1 < name2 ? -1 : name1 > name2 ? 1 : 0;
144
- });
145
- }
146
- Private.sortedSourceIds = sortedSourceIds;
147
- })(Private || (Private = {}));