@geogirafe/lib-geoportal 1.1.0-dev.2454789578 → 1.1.0-dev.2456762594
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/LICENSE +11 -0
- package/assets/i18n/de.json +2 -0
- package/assets/i18n/en.json +2 -0
- package/assets/i18n/fr.json +2 -0
- package/assets/i18n/it.json +2 -0
- package/components/help/component.d.ts +3 -2
- package/components/help/component.js +15 -5
- package/components/help/images/circled_black.webp +0 -0
- package/components/help/images/circled_white.webp +0 -0
- package/package.json +1 -1
- package/templates/public/about.json +1 -1
- package/tools/main.d.ts +1 -0
- package/tools/main.js +1 -0
- package/tools/onboarding/onboardingmanager.d.ts +2 -1
- package/tools/onboarding/onboardingmanager.js +7 -3
- package/tools/utils/async.d.ts +1 -0
- package/tools/utils/async.js +1 -0
package/LICENSE
CHANGED
|
@@ -290,6 +290,17 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
290
290
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
291
291
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
292
292
|
|
|
293
|
+
-------------------------------------------------------------------------------
|
|
294
|
+
|
|
295
|
+
Thanks to the Invisible Artists
|
|
296
|
+
|
|
297
|
+
Some images in this project come from the public domain.
|
|
298
|
+
Their names may have faded with time, but their impact has not.
|
|
299
|
+
Thanks a lot to them:
|
|
300
|
+
|
|
301
|
+
- https://openclipart.org/artist/nadsud
|
|
302
|
+
|
|
303
|
+
|
|
293
304
|
-------------------------------------------------------------------------------
|
|
294
305
|
|
|
295
306
|
===============================================================================
|
package/assets/i18n/de.json
CHANGED
|
@@ -181,6 +181,8 @@
|
|
|
181
181
|
"help": "Hilfe",
|
|
182
182
|
"help-basemap": "Wählen Sie aus den verfügbaren Hintergrundkarten, um Ihre Ansicht anzupassen.",
|
|
183
183
|
"help-menu": "Greifen Sie auf erweiterte Werkzeuge zu, wie Drucken, Zeichnen, 3D-Ansicht und mehr.",
|
|
184
|
+
"help-onboarding": "Starten Sie die Onboarding Tour erneut.",
|
|
185
|
+
"help-onboarding-link": "Klicken Sie hier zum starten.",
|
|
184
186
|
"help-search": "Suchen Sie nach einem Ort, einer Adresse, einer Karte oder Geodaten.",
|
|
185
187
|
"help-themes": "Entdecken Sie die verfügbaren Themen. Nach der Auswahl werden die zugehörigen Karten automatisch geladen.",
|
|
186
188
|
"help-user-preferences": "Verwalten Sie Ihre Benutzereinstellungen, einschließlich Sprache, Anzeigemodus und Kartenoptionen.",
|
package/assets/i18n/en.json
CHANGED
|
@@ -182,6 +182,8 @@
|
|
|
182
182
|
"help": "Help",
|
|
183
183
|
"help-basemap": "Choose from available background layers to customize your view.",
|
|
184
184
|
"help-menu": "Access advanced tools such as printing, drawing, 3D view, and more.",
|
|
185
|
+
"help-onboarding": "Restart the onboarding tour.",
|
|
186
|
+
"help-onboarding-link": "Click here to start.",
|
|
185
187
|
"help-search": "Search for a place, address, map, or geographic data.",
|
|
186
188
|
"help-themes": "Explore available topics. Once selected, the associated maps load automatically.",
|
|
187
189
|
"help-user-preferences": "Manage your user preferences, like language, display mode and map options.",
|
package/assets/i18n/fr.json
CHANGED
|
@@ -181,6 +181,8 @@
|
|
|
181
181
|
"help": "Aide",
|
|
182
182
|
"help-basemap": "Choisissez les fonds de carte disponibles pour personnaliser votre affichage.",
|
|
183
183
|
"help-menu": "Accédez à des outils avancés comme l'impression, le dessin, la vue 3D, et plus encore.",
|
|
184
|
+
"help-onboarding": "Relancer le tour d'onboarding.",
|
|
185
|
+
"help-onboarding-link": "Cliquez ici pour commencer.",
|
|
184
186
|
"help-search": "Recherchez un lieu, une adresse, une carte ou une donnée géographique.",
|
|
185
187
|
"help-themes": "Explorez les thèmes disponibles. Une fois un thème sélectionné, les cartes associées s'affichent automatiquement.",
|
|
186
188
|
"help-user-preferences": "Gérez vos préférences utilisateur, notamment la langue, le mode d'affichage et les options de la carte.",
|
package/assets/i18n/it.json
CHANGED
|
@@ -181,6 +181,8 @@
|
|
|
181
181
|
"help": "Aiuto",
|
|
182
182
|
"help-basemap": "Scegli tra gli sfondi cartografici disponibili per personalizzare la visualizzazione.",
|
|
183
183
|
"help-menu": "Accedi a strumenti avanzati come stampa, disegno, vista 3D e altro ancora.",
|
|
184
|
+
"help-onboarding": "Riavvia il tour di onboarding.",
|
|
185
|
+
"help-onboarding-link": "Clicca qui per iniziare.",
|
|
184
186
|
"help-search": "Cerca un luogo, un indirizzo, una mappa o un dato geografico.",
|
|
185
187
|
"help-themes": "Scopri i temi disponibili. Selezionando un tema, le mappe correlate vengono caricate automaticamente.",
|
|
186
188
|
"help-user-preferences": "Gestisci le preferenze utente, inclusa la lingua, la modalità di visualizzazione e le opzioni mappa.",
|
|
@@ -7,18 +7,19 @@ declare class HelpComponent extends GirafeHTMLElement {
|
|
|
7
7
|
themes: HTMLElement;
|
|
8
8
|
search: HTMLElement;
|
|
9
9
|
menu: HTMLElement;
|
|
10
|
+
onboarding: HTMLElement;
|
|
10
11
|
basemap: HTMLElement;
|
|
11
12
|
userPreferences: HTMLElement;
|
|
12
13
|
darkFrontendMode: boolean;
|
|
13
|
-
arrowBlack: string;
|
|
14
|
-
arrowWhite: string;
|
|
15
14
|
currentArrow?: string;
|
|
15
|
+
currentCircle?: string;
|
|
16
16
|
constructor();
|
|
17
17
|
render(): void;
|
|
18
18
|
private hideHelpFor;
|
|
19
19
|
registerEvents(): void;
|
|
20
20
|
changeArrowColor(): void;
|
|
21
21
|
toggleHelp(visible: boolean): void;
|
|
22
|
+
startOnboardingTour(): void;
|
|
22
23
|
protected connectedCallback(): void;
|
|
23
24
|
}
|
|
24
25
|
export default HelpComponent;
|
|
@@ -3,7 +3,10 @@ import { html as uHtml } from 'uhtml';
|
|
|
3
3
|
import GirafeHTMLElement from '../../base/GirafeHTMLElement.js';
|
|
4
4
|
import ArrowBlack from './images/arrow_black.webp';
|
|
5
5
|
import ArrowWhite from './images/arrow_white.webp';
|
|
6
|
+
import CircledBlack from './images/circled_black.webp';
|
|
7
|
+
import CircledWhite from './images/circled_white.webp';
|
|
6
8
|
import { systemIsInDarkMode } from '../../tools/utils/utils.js';
|
|
9
|
+
import { noop } from '../../tools/utils/async.js';
|
|
7
10
|
class HelpComponent extends GirafeHTMLElement {
|
|
8
11
|
templateUrl = null;
|
|
9
12
|
styleUrls = null;
|
|
@@ -11,20 +14,20 @@ class HelpComponent extends GirafeHTMLElement {
|
|
|
11
14
|
return uHtml `<style>
|
|
12
15
|
*{font-family:Arial,sans-serif}.hidden{display:none!important}.gg-rotate90{transform:rotate(90deg)}.gg-rotate180{transform:rotate(180deg)}.gg-rotate270{transform:rotate(270deg)}img{filter:var(--svg-filter)}img.legend-image{filter:var(--svg-map-filter);background:var(--svg-legend-bkg)}div{scrollbar-width:thin}a,a:visited{color:var(--link-color)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin-wait{0%{transform:rotate(0)}7%{transform:rotate(360deg)}to{transform:rotate(360deg)}}.gg-spin{animation-name:spin;animation-duration:2s;animation-timing-function:linear;animation-iteration-count:infinite}.gg-spin-wait{animation-name:spin-wait;animation-duration:10s;animation-timing-function:linear;animation-iteration-count:infinite}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#999}.gg-button,.gg-select,.gg-input,.gg-textarea{background-color:var(--bkg-color);color:var(--text-color);border:var(--app-standard-border);box-sizing:border-box;cursor:pointer;border-radius:3px;outline:0;margin:0;padding:0 0 0 .5rem;display:inline-block}.gg-label{background-color:var(--bkg-color);color:var(--text-color);border:none;align-items:center;margin:0;padding:0;display:flex}.gg-button,.gg-select,.gg-input,.gg-label{min-height:calc(var(--app-standard-height) / 1.5)}.gg-textarea{max-height:initial;resize:vertical;height:6rem;padding:.5rem;line-height:1.3rem}.gg-input{cursor:text}.gg-checkbox{accent-color:var(--text-color);width:1.2rem}.gg-range{accent-color:var(--text-color)}.gg-button{padding:0 .5rem}.gg-button.active{border:solid 1px var(--text-color-grad2);background-color:var(--text-color-grad2);color:var(--bkg-color)}.gg-button:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3;border:none}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3}.gg-button>img{vertical-align:middle}.gg-icon-button{color:var(--text-color);cursor:pointer;background-color:#0000;border:none;flex-direction:column;justify-content:center;align-items:center;padding:0;display:flex}.gg-icon{justify-content:center;align-items:center;display:flex}.gg-big,.gg-big-withtext{min-width:var(--app-standard-height);min-height:var(--app-standard-height);max-height:var(--app-standard-height)}.gg-big img,.gg-big-withtext img{width:calc(var(--app-standard-height) - 1.5rem);margin:0}.gg-big-withtext span{font-variant:small-caps;padding:0 1rem;font-size:.9rem}.gg-medium,.gg-medium-withtext{min-width:calc(var(--app-standard-height) / 1.2);min-height:calc(var(--app-standard-height) / 1.2);max-height:calc(var(--app-standard-height) / 1.2);flex-direction:row}.gg-medium img{width:calc(var(--app-standard-height) / 2.4);margin:0}.gg-medium-withtext img{width:calc(var(--app-standard-height) / 2.4);margin-left:.5rem}.gg-medium-withtext span{padding:0 1rem 0 .5rem;font-size:.9rem}.gg-small,.gg-small-withtext{min-width:calc(var(--app-standard-height) / 2);min-height:calc(var(--app-standard-height) / 2);max-height:calc(var(--app-standard-height) / 2);flex-direction:row}.gg-small img{width:calc(var(--app-standard-height) / 3);margin:0}.gg-small-withtext img{width:calc(var(--app-standard-height) / 3);margin-left:.5rem}.gg-small-withtext span{padding:0 .5rem 0 .3rem;font-size:.9rem}.gg-button:hover,.gg-select:hover,.gg-input:hover,.gg-textarea:hover,.gg-icon-button:hover{background-color:var(--bkg-color-grad1)}.gg-opacity{opacity:.5}.gg-opacity:hover{opacity:1;background-color:#0000}.gg-tabs{cursor:pointer;grid-auto-flow:column;padding-bottom:1rem;font-size:1rem;display:grid}.gg-tab{border:none;border-bottom:var(--app-standard-border);cursor:pointer;color:var(--text-color);background:0 0;padding:.5rem}.gg-tab.active{border-bottom:solid 1px var(--text-color)}.girafe-button-big,.girafe-button-large,.girafe-button-small,.girafe-button-tiny{color:var(--text-color);background-color:#0000;border:none;flex-direction:column;display:flex}.girafe-button-big:hover,.girafe-button-large:hover,.girafe-button-small:hover,.girafe-button-tiny:hover{background-color:var(--bkg-color-grad1);cursor:pointer}.girafe-button-big.dark,.girafe-button-large.dark,.girafe-button-small.dark,.girafe-button-tiny.dark{background-color:var(--bkg-color);filter:invert()}.girafe-button-big{width:var(--app-standard-height);height:var(--app-standard-height);align-items:center;padding:1rem}.girafe-button-big img{overflow:hidden}.girafe-button-large{flex-direction:row}.girafe-button-large img{height:2rem;margin:.3rem}.girafe-button-large span{height:2rem;margin:.3rem;line-height:2rem}.girafe-button-small{min-width:calc(var(--app-standard-height) / 2);height:calc(var(--app-standard-height) / 2);align-items:center;padding:.5rem}.girafe-button-small img{overflow:hidden}.girafe-button-small span{text-align:left;text-overflow:ellipsis;width:100%;overflow:hidden}.girafe-button-tiny{align-items:center;width:1rem;height:1rem;padding:0}.girafe-button-tiny img{overflow:hidden}.girafe-onboarding-theme{background-color:var(--bkg-color)!important;color:var(--text-color)!important}.girafe-onboarding-theme button{background-color:var(--bkg-color)!important;color:var(--text-color)!important;text-shadow:none!important}.girafe-onboarding-theme button.driver-popover-close-btn{z-index:10000}
|
|
13
16
|
</style><style>
|
|
14
|
-
#content{z-index:10000;display:none;position:fixed;inset:0}.box{background-repeat:no-repeat;position:absolute}.description{color:var(--bkg-color);width:15rem;font-size:1.2rem;position:absolute}#themes{background-position:left -60px bottom -50px;width:150px;height:120px;top:4.5rem;left:0;transform:rotateY(0)rotateX(0)rotate(90deg)}#themes-description{top:10.5rem;left:10rem}#search{background-position:-60px -30px;width:180px;height:70px;top:8rem;left:45%;transform:rotateY(0)rotateX(0)rotate(90deg)}#search-description{text-align:center;top:16rem;left:45%}#menu{background-position:left -60px bottom -50px;width:150px;height:120px;top:4.5rem;right:3rem;transform:rotateY(0)rotateX(0)rotate(180deg)}#menu-description{text-align:right;top:14rem;right:10rem}#basemap{background-position:left -60px bottom -50px;width:150px;height:120px;bottom:11rem;left:26rem;transform:rotateY(0)rotateX(180deg)rotate(90deg)}#basemap-description{bottom:17rem;left:36rem}#user-preferences{background-position:left -60px bottom -50px;width:150px;height:120px;bottom:.5rem;right:3rem;transform:rotateY(180deg)rotateX(0)rotate(0)}#user-preferences-description{text-align:right;bottom:10rem;right:10rem}
|
|
17
|
+
#content{z-index:10000;display:none;position:fixed;inset:0}.box{background-repeat:no-repeat;position:absolute}.description{color:var(--bkg-color);width:15rem;font-size:1.2rem;position:absolute}#themes{background-position:left -60px bottom -50px;width:150px;height:120px;top:4.5rem;left:0;transform:rotateY(0)rotateX(0)rotate(90deg)}#themes-description{top:10.5rem;left:10rem}#search{background-position:-60px -30px;width:180px;height:70px;top:8rem;left:45%;transform:rotateY(0)rotateX(0)rotate(90deg)}#search-description{text-align:center;top:16rem;left:45%}#menu{background-position:left -60px bottom -50px;width:150px;height:120px;top:4.5rem;right:3rem;transform:rotateY(0)rotateX(0)rotate(180deg)}#menu-description{text-align:right;top:14rem;right:10rem}#onboarding,#onboarding-description{--onboarding-help-width:320px;--onboarding-help-height:160px}#onboarding{top:calc(50% - var(--onboarding-help-height) * .5);right:calc(50% - var(--onboarding-help-width) * .5);width:var(--onboarding-help-width);height:var(--onboarding-help-height);background-size:var(--onboarding-help-width) var(--onboarding-help-height)}#onboarding-description{top:calc(50% - var(--onboarding-help-height) * .5);right:calc(50% - var(--onboarding-help-width) * .5);width:var(--onboarding-help-width);height:var(--onboarding-help-height);text-align:center;flex-direction:column;align-items:center;display:flex;& span{flex-grow:1;align-content:center;align-items:end;margin:0 4rem;display:inline-flex}& button{cursor:pointer;font:inherit;color:currentColor;-webkit-appearance:none;background:0 0;border:0;flex-grow:1;align-items:baseline;margin:0 4rem;padding:0;text-decoration:underline;display:inline-flex}}#basemap{background-position:left -60px bottom -50px;width:150px;height:120px;bottom:11rem;left:26rem;transform:rotateY(0)rotateX(180deg)rotate(90deg)}#basemap-description{bottom:17rem;left:36rem}#user-preferences{background-position:left -60px bottom -50px;width:150px;height:120px;bottom:.5rem;right:3rem;transform:rotateY(180deg)rotateX(0)rotate(0)}#user-preferences-description{text-align:right;bottom:10rem;right:10rem}
|
|
15
18
|
</style>
|
|
16
|
-
<div id="content"><div id="themes" class="box"></div><div id="themes-description" class="description" i18n="help-themes">Explore available topics. Once selected, the associated maps load automatically.</div><div id="search" class="box"></div><div id="search-description" class="description" i18n="help-search">Search for a place, address, map, or geographic data.</div><div id="menu" class="box"></div><div id="menu-description" class="description" i18n="help-menu">Access advanced tools such as printing, drawing, 3D view, and more.</div><div id="basemap" class="box"></div><div id="basemap-description" class="description" i18n="help-basemap">Choose from available background layers to customize your view.</div><div id="user-preferences" class="box"></div><div id="user-preferences-description" class="description" i18n="help-user-preferences">Manage your user preferences, like language, display mode and map options.</div></div>`;
|
|
19
|
+
<div id="content"><div id="themes" class="box"></div><div id="themes-description" class="description" i18n="help-themes">Explore available topics. Once selected, the associated maps load automatically.</div><div id="search" class="box"></div><div id="search-description" class="description" i18n="help-search">Search for a place, address, map, or geographic data.</div><div id="menu" class="box"></div><div id="menu-description" class="description" i18n="help-menu">Access advanced tools such as printing, drawing, 3D view, and more.</div><div id="onboarding" class="box"></div><div id="onboarding-description" class="description"><span i18n="help-onboarding"></span> <button i18n="help-onboarding-link" onclick="${() => this.startOnboardingTour()}"></button></div><div id="basemap" class="box"></div><div id="basemap-description" class="description" i18n="help-basemap">Choose from available background layers to customize your view.</div><div id="user-preferences" class="box"></div><div id="user-preferences-description" class="description" i18n="help-user-preferences">Manage your user preferences, like language, display mode and map options.</div></div>`;
|
|
17
20
|
};
|
|
18
21
|
content;
|
|
19
22
|
themes;
|
|
20
23
|
search;
|
|
21
24
|
menu;
|
|
25
|
+
onboarding;
|
|
22
26
|
basemap;
|
|
23
27
|
userPreferences;
|
|
24
28
|
darkFrontendMode = false;
|
|
25
|
-
arrowBlack = ArrowBlack;
|
|
26
|
-
arrowWhite = ArrowWhite;
|
|
27
29
|
currentArrow;
|
|
30
|
+
currentCircle;
|
|
28
31
|
constructor() {
|
|
29
32
|
super('help');
|
|
30
33
|
}
|
|
@@ -35,6 +38,7 @@ class HelpComponent extends GirafeHTMLElement {
|
|
|
35
38
|
this.themes = this.shadow.querySelector('#themes');
|
|
36
39
|
this.search = this.shadow.querySelector('#search');
|
|
37
40
|
this.menu = this.shadow.querySelector('#menu');
|
|
41
|
+
this.onboarding = this.shadow.querySelector('#onboarding');
|
|
38
42
|
this.basemap = this.shadow.querySelector('#basemap');
|
|
39
43
|
this.userPreferences = this.shadow.querySelector('#user-preferences');
|
|
40
44
|
// hide help for hideable Parts of the UI
|
|
@@ -61,10 +65,12 @@ class HelpComponent extends GirafeHTMLElement {
|
|
|
61
65
|
changeArrowColor() {
|
|
62
66
|
// change the arrow color depending on the darkFrontendMode state
|
|
63
67
|
this.darkFrontendMode = this.context.stateManager.state.interface.darkFrontendMode ?? systemIsInDarkMode();
|
|
64
|
-
this.currentArrow = this.darkFrontendMode ?
|
|
68
|
+
this.currentArrow = this.darkFrontendMode ? ArrowBlack : ArrowWhite;
|
|
69
|
+
this.currentCircle = this.darkFrontendMode ? CircledBlack : CircledWhite;
|
|
65
70
|
this.themes.style.backgroundImage = `url(${this.currentArrow})`;
|
|
66
71
|
this.search.style.backgroundImage = `url(${this.currentArrow})`;
|
|
67
72
|
this.menu.style.backgroundImage = `url(${this.currentArrow})`;
|
|
73
|
+
this.onboarding.style.backgroundImage = `url(${this.currentCircle})`;
|
|
68
74
|
this.basemap.style.backgroundImage = `url(${this.currentArrow})`;
|
|
69
75
|
this.userPreferences.style.backgroundImage = `url(${this.currentArrow})`;
|
|
70
76
|
this.content.style.backgroundColor = this.darkFrontendMode ? 'rgba(255, 255, 255, 0.65)' : 'rgba(0, 0, 0, 0.65)';
|
|
@@ -78,6 +84,10 @@ class HelpComponent extends GirafeHTMLElement {
|
|
|
78
84
|
this.content.style.display = 'none';
|
|
79
85
|
}
|
|
80
86
|
}
|
|
87
|
+
startOnboardingTour() {
|
|
88
|
+
this.toggleHelp(false);
|
|
89
|
+
this.context.onBoardingManager.restart().then(noop);
|
|
90
|
+
}
|
|
81
91
|
connectedCallback() {
|
|
82
92
|
super.connectedCallback();
|
|
83
93
|
this.render();
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.1.0-dev.
|
|
1
|
+
{"version":"1.1.0-dev.2456762594", "build":"2456762594", "date":"16/04/2026"}
|
package/tools/main.d.ts
CHANGED
|
@@ -104,6 +104,7 @@ export { default as PermalinkManager } from './url/permalinkmanager.js';
|
|
|
104
104
|
export { default as UrlManager } from './url/urlmanager.js';
|
|
105
105
|
export { default as UserDataManager } from './userdata/userdatamanager.js';
|
|
106
106
|
export { default as ColumnAliasHelper } from './utils/aliases.js';
|
|
107
|
+
export { noop } from './utils/async.js';
|
|
107
108
|
export { debounce } from './utils/debounce.js';
|
|
108
109
|
export { default as GirafeColorPicker } from './utils/girafecolorpicker.js';
|
|
109
110
|
export { unByKeyAll, getOlayerByName, removeUnwantedOlParams, polygonFromCircle, getDistance, getAreaOfPolygon, getAreaOfCircle, isCoordinateInDegrees, getSelectionBoxFromMapClick, reprojectGeometry, ensurePolygonIsProperlyClosed, getHalfPoint, getLabelStyle, getRadiusDataForCircle, getLengthAsMetricText, getAreaAsMetricText, getAzimuthAsText } from './utils/olutils.js';
|
package/tools/main.js
CHANGED
|
@@ -79,6 +79,7 @@ export { default as PermalinkManager } from './url/permalinkmanager.js';
|
|
|
79
79
|
export { default as UrlManager } from './url/urlmanager.js';
|
|
80
80
|
export { default as UserDataManager } from './userdata/userdatamanager.js';
|
|
81
81
|
export { default as ColumnAliasHelper } from './utils/aliases.js';
|
|
82
|
+
export { noop } from './utils/async.js';
|
|
82
83
|
export { debounce } from './utils/debounce.js';
|
|
83
84
|
export { default as GirafeColorPicker } from './utils/girafecolorpicker.js';
|
|
84
85
|
export { unByKeyAll, getOlayerByName, removeUnwantedOlParams, polygonFromCircle, getDistance, getAreaOfPolygon, getAreaOfCircle, isCoordinateInDegrees, getSelectionBoxFromMapClick, reprojectGeometry, ensurePolygonIsProperlyClosed, getHalfPoint, getLabelStyle, getRadiusDataForCircle, getLengthAsMetricText, getAreaAsMetricText, getAzimuthAsText } from './utils/olutils.js';
|
|
@@ -2,6 +2,7 @@ import GirafeSingleton from '../../base/GirafeSingleton.js';
|
|
|
2
2
|
import 'driver.js/dist/driver.css';
|
|
3
3
|
export default class OnBoardingManager extends GirafeSingleton {
|
|
4
4
|
private get config();
|
|
5
|
-
private readonly
|
|
5
|
+
private readonly STORAGE_PATH;
|
|
6
|
+
restart(): Promise<void>;
|
|
6
7
|
start(): Promise<void>;
|
|
7
8
|
}
|
|
@@ -6,20 +6,24 @@ export default class OnBoardingManager extends GirafeSingleton {
|
|
|
6
6
|
get config() {
|
|
7
7
|
return this.context.configManager.Config;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
STORAGE_PATH = 'onboardingTourAlreadyDone';
|
|
10
|
+
async restart() {
|
|
11
|
+
this.context.userDataManager.saveUserData(this.STORAGE_PATH, 'false');
|
|
12
|
+
return this.start();
|
|
13
|
+
}
|
|
10
14
|
async start() {
|
|
11
15
|
if (!this.config.onboarding) {
|
|
12
16
|
// No tour configured
|
|
13
17
|
return;
|
|
14
18
|
}
|
|
15
19
|
await this.context.i18nManager.ensureTranslationLoaded();
|
|
16
|
-
const tourAlreadyDone =
|
|
20
|
+
const tourAlreadyDone = this.context.userDataManager.getUserData(this.STORAGE_PATH) || 'false';
|
|
17
21
|
if (tourAlreadyDone !== 'true') {
|
|
18
22
|
const onboardingDriver = driver({
|
|
19
23
|
popoverClass: 'girafe-onboarding-theme',
|
|
20
24
|
showProgress: true,
|
|
21
25
|
onDestroyed: (_element, _step, _options) => {
|
|
22
|
-
|
|
26
|
+
this.context.userDataManager.saveUserData(this.STORAGE_PATH, 'true');
|
|
23
27
|
},
|
|
24
28
|
nextBtnText: this.context.i18nManager.getTranslation('onboarding-next-button-text'),
|
|
25
29
|
prevBtnText: this.context.i18nManager.getTranslation('onboarding-previous-button-text'),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const noop: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const noop = () => { };
|