@geogirafe/lib-geoportal 1.1.0-dev.2605752849 → 1.1.0-dev.2623495582
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/api/apicontext.d.ts +2 -0
- package/api/apicontext.js +4 -0
- package/assets/i18n/de.json +8 -0
- package/assets/i18n/en.json +8 -0
- package/assets/i18n/fr.json +8 -0
- package/assets/i18n/it.json +8 -0
- package/components/getdirections/component.js +1 -0
- package/components/search/component.d.ts +6 -15
- package/components/search/component.js +71 -112
- package/components/search/style.css +21 -13
- package/components/search-mobile/component.js +2 -2
- package/components/search-mobile/style.css +25 -13
- package/components/treeview/treeviewroot/style.css +1 -1
- package/package.json +2 -1
- package/templates/public/about.json +1 -1
- package/templates/tsconfig.json +1 -1
- package/templates/vite.config.js +1 -1
- package/tools/app/geogirafeapp.js +15 -6
- package/tools/configuration/girafeconfig.d.ts +13 -2
- package/tools/configuration/girafeconfig.js +32 -12
- package/tools/context/context.d.ts +2 -0
- package/tools/context/context.js +4 -0
- package/tools/context/icontext.d.ts +2 -0
- package/tools/i18n/i18nmanager.js +1 -1
- package/tools/main.d.ts +9 -0
- package/tools/main.js +5 -0
- package/tools/offline/offlinemanager.d.ts +5 -4
- package/tools/offline/offlinemanager.js +50 -80
- package/tools/search/abstractsearchclient.d.ts +42 -0
- package/tools/search/abstractsearchclient.js +85 -0
- package/tools/search/geoadminchsearchclient.d.ts +63 -0
- package/tools/search/geoadminchsearchclient.js +147 -0
- package/tools/search/gmfsearchclient.d.ts +23 -0
- package/tools/search/gmfsearchclient.js +37 -0
- package/tools/search/searchmanager.d.ts +33 -0
- package/tools/search/searchmanager.js +130 -0
- package/tools/sw/service-worker.d.ts +1 -0
- package/tools/sw/service-worker.js +94 -0
- package/tools/sw/service-worker.tools.d.ts +83 -0
- package/tools/sw/service-worker.tools.js +321 -0
- package/tools/tests/mockconfig.d.ts +5 -2
- package/tools/tests/mockconfig.js +2 -2
- package/tools/tests/mockcontext.d.ts +2 -0
- package/tools/tests/mockcontext.js +4 -0
- package/service-worker.js +0 -331
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
#searchbox {
|
|
7
7
|
background-color: var(--bkg-color);
|
|
8
|
+
height: 3rem;
|
|
8
9
|
border-right: none;
|
|
9
10
|
border-radius: 4px;
|
|
10
11
|
border: none;
|
|
@@ -71,23 +72,35 @@
|
|
|
71
72
|
overflow-x: hidden;
|
|
72
73
|
scrollbar-width: thin;
|
|
73
74
|
bottom: 0;
|
|
74
|
-
padding-top
|
|
75
|
+
/* padding-top = top-position of search field + height of search field + gap */
|
|
76
|
+
padding-top: calc(max(2.5em, calc(env(safe-area-inset-top) + 0.5rem)) + 3rem + 1rem);
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
.
|
|
78
|
-
.title {
|
|
79
|
+
.entry {
|
|
79
80
|
display: inline-block;
|
|
80
81
|
padding: 0.3rem 1rem;
|
|
81
|
-
width:
|
|
82
|
+
width: calc(36rem - 2rem);
|
|
82
83
|
line-height: 1.3rem;
|
|
84
|
+
color: var(--text-color);
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
.
|
|
86
|
-
|
|
87
|
+
.provider,
|
|
88
|
+
.group {
|
|
87
89
|
font-weight: 600;
|
|
88
|
-
line-height:
|
|
90
|
+
line-height: 3rem;
|
|
89
91
|
font-size: 1.3rem;
|
|
90
|
-
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.provider {
|
|
95
|
+
font-size: 1.5rem;
|
|
96
|
+
margin-top: 1rem;
|
|
97
|
+
background-color: color-mix(in srgb, var(--bkg-color-grad1) 75%, transparent);
|
|
98
|
+
border: 0 solid var(--bkg-color-grad2);
|
|
99
|
+
border-width: 1px 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
#results > .provider:first-child {
|
|
103
|
+
margin-top: 0;
|
|
91
104
|
}
|
|
92
105
|
|
|
93
106
|
.result {
|
|
@@ -97,20 +110,19 @@
|
|
|
97
110
|
background: transparent;
|
|
98
111
|
text-align: left;
|
|
99
112
|
width: 100%;
|
|
100
|
-
color: var(--text-color);
|
|
101
113
|
}
|
|
102
114
|
|
|
103
|
-
.
|
|
115
|
+
.entry img {
|
|
104
116
|
margin-right: 1rem;
|
|
105
|
-
width:
|
|
117
|
+
width: 0.8em;
|
|
106
118
|
}
|
|
107
119
|
|
|
108
|
-
.
|
|
120
|
+
.entry span {
|
|
109
121
|
text-transform: uppercase;
|
|
110
122
|
}
|
|
111
123
|
|
|
112
124
|
.result.selected {
|
|
113
|
-
background-color:
|
|
125
|
+
background-color: var(--bkg-color-grad2) !important;
|
|
114
126
|
color: var(--text-color);
|
|
115
127
|
}
|
|
116
128
|
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "GeoGirafe PSC",
|
|
6
6
|
"url": "https://doc.geogirafe.org"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.1.0-dev.
|
|
8
|
+
"version": "1.1.0-dev.2623495582",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=20.19.0"
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"cross-env": "10.1.0",
|
|
84
84
|
"eslint": "10.2.0",
|
|
85
85
|
"eslint-plugin-es-x": "9.6.0",
|
|
86
|
+
"fake-indexeddb": "6.2.5",
|
|
86
87
|
"fast-glob": "3.3.3",
|
|
87
88
|
"fs-extra": "11.3.4",
|
|
88
89
|
"globals": "17.4.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.1.0-dev.
|
|
1
|
+
{"version":"1.1.0-dev.2623495582", "build":"2623495582", "date":"23/06/2026"}
|
package/templates/tsconfig.json
CHANGED
package/templates/vite.config.js
CHANGED
|
@@ -120,7 +120,7 @@ export default defineConfig(({ command, mode }) => {
|
|
|
120
120
|
{ src: `${cesiumSource}/Workers`, dest: cesiumBaseUrl },
|
|
121
121
|
{ src: `${cesiumSource}/Assets`, dest: cesiumBaseUrl },
|
|
122
122
|
{ src: `${cesiumSource}/Widgets`, dest: cesiumBaseUrl },
|
|
123
|
-
{ src: `${geogirafeSource}/
|
|
123
|
+
{ src: `${geogirafeSource}/tools/sw/*.js`, dest: '' },
|
|
124
124
|
{ src: `${geogirafeSource}/styles/*.css`, dest: 'styles/' },
|
|
125
125
|
{ src: `${geogirafeSource}/assets/*`, dest: '' },
|
|
126
126
|
{ src: `${geogirafeSource}/tools/auth/silentlogincallback.html`, dest: '' },
|
|
@@ -50,6 +50,7 @@ import SelectionToolComponent from '../../components/selectiontool/component.js'
|
|
|
50
50
|
import AdvancedFilterComponent from '../../components/advancedfilter/component.js';
|
|
51
51
|
import FixedDimensionComponent from '../../components/drawing/fixed-dimension/component.js';
|
|
52
52
|
import GetDirectionsArtifact from '../../components/getdirections/component.js';
|
|
53
|
+
import ServiceWorkerHelper from '../utils/swhelper.js';
|
|
53
54
|
import FeedbackButtonComponent from '../../components/feedbackbutton/component.js';
|
|
54
55
|
import AddBookmarkComponent from '../../components/addbookmark/component.js';
|
|
55
56
|
import DrawingToolbarComponent from '../../components/drawing-toolbar/component.js';
|
|
@@ -168,21 +169,29 @@ export default class GeoGirafeApp {
|
|
|
168
169
|
catch (err) {
|
|
169
170
|
throw new Error(`Service worker registration failed. ${err}`, { cause: err });
|
|
170
171
|
}
|
|
171
|
-
// Communicate logging configuration to service-worker
|
|
172
172
|
const config = this.context.configManager.Config;
|
|
173
|
-
|
|
174
|
-
// Communicate
|
|
173
|
+
const serviceWorkerHelper = new ServiceWorkerHelper(sw);
|
|
174
|
+
// Communicate configuration to service-worker
|
|
175
|
+
// NOTE REG : Important : we have to wait that the config has been correctly sent to the SW
|
|
176
|
+
// Otherwise the first requests can be sent without the correct auhentication.
|
|
175
177
|
const issuerConfig = config.oauth?.issuer ?? config.gmfauth;
|
|
176
178
|
const gmfConfig = config.oauth?.geomapfish ?? config.gmfauth;
|
|
177
179
|
if (issuerConfig && gmfConfig) {
|
|
178
180
|
const issuerHostname = new URL(issuerConfig.url).hostname;
|
|
179
181
|
const audience = [...issuerConfig.audience, issuerHostname];
|
|
180
|
-
|
|
182
|
+
const swConfig = {
|
|
183
|
+
logLevel: config.general.logLevel,
|
|
181
184
|
audience: audience,
|
|
182
185
|
audienceExcludedPaths: issuerConfig.audienceExcludedPaths,
|
|
183
186
|
authMode: gmfConfig.authMode,
|
|
187
|
+
alwaysSendCookies: issuerConfig.alwaysSendCookies,
|
|
184
188
|
refererPolicy: gmfConfig.refererPolicy
|
|
185
|
-
}
|
|
189
|
+
};
|
|
190
|
+
await serviceWorkerHelper.sendMessageToServiceWorker(swConfig);
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
// If no auth, we just update the log level, but we do not have to wait
|
|
194
|
+
sw.postMessage({ logLevel: config.general.logLevel });
|
|
186
195
|
}
|
|
187
196
|
await this.context.offlineManager.setServiceWorker(sw, storeVersion, dbCacheName);
|
|
188
197
|
await this.context.authManager.initialize(sw);
|
|
@@ -194,7 +203,7 @@ export default class GeoGirafeApp {
|
|
|
194
203
|
}
|
|
195
204
|
}
|
|
196
205
|
async waitForServiceWorkerActivation() {
|
|
197
|
-
const registration = await navigator.serviceWorker.register('service-worker.js');
|
|
206
|
+
const registration = await navigator.serviceWorker.register('service-worker.js', { type: 'module' });
|
|
198
207
|
if (registration.active) {
|
|
199
208
|
return registration.active;
|
|
200
209
|
}
|
|
@@ -43,8 +43,17 @@ declare class GirafeConfig {
|
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
search: {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
providers: ({
|
|
47
|
+
type: 'geomapfish';
|
|
48
|
+
url: string;
|
|
49
|
+
resultSrid: string;
|
|
50
|
+
providerName?: string;
|
|
51
|
+
} | {
|
|
52
|
+
type: 'geoadminch';
|
|
53
|
+
bbox?: string;
|
|
54
|
+
locationOrigins?: string;
|
|
55
|
+
providerName?: string;
|
|
56
|
+
})[];
|
|
48
57
|
objectPreview?: boolean;
|
|
49
58
|
layerPreview?: boolean;
|
|
50
59
|
minResolution?: number;
|
|
@@ -191,6 +200,7 @@ declare class GirafeConfig {
|
|
|
191
200
|
checkSessionOnLoad: boolean;
|
|
192
201
|
audience: string[];
|
|
193
202
|
authMode: 'cookie';
|
|
203
|
+
alwaysSendCookies: boolean;
|
|
194
204
|
refererPolicy: ReferrerPolicy;
|
|
195
205
|
audienceExcludedPaths: string[];
|
|
196
206
|
};
|
|
@@ -205,6 +215,7 @@ declare class GirafeConfig {
|
|
|
205
215
|
checkSessionOnLoad: boolean;
|
|
206
216
|
audience: string[];
|
|
207
217
|
audienceExcludedPaths: string[];
|
|
218
|
+
alwaysSendCookies: boolean;
|
|
208
219
|
};
|
|
209
220
|
geomapfish: {
|
|
210
221
|
userInfoUrl: string;
|
|
@@ -87,10 +87,7 @@ class GirafeConfig {
|
|
|
87
87
|
// The application can be started even if the search is not correctly configured
|
|
88
88
|
// We just display a warning in the console
|
|
89
89
|
console.warn(e);
|
|
90
|
-
this.search = {
|
|
91
|
-
url: '',
|
|
92
|
-
resultsSrid: config.map.srid
|
|
93
|
-
};
|
|
90
|
+
this.search = { providers: [{ type: 'geomapfish', url: '', resultSrid: this.map.srid }] };
|
|
94
91
|
}
|
|
95
92
|
try {
|
|
96
93
|
this.share = this.initConfigShare(config);
|
|
@@ -211,15 +208,36 @@ class GirafeConfig {
|
|
|
211
208
|
return config.print;
|
|
212
209
|
}
|
|
213
210
|
initConfigSearch(config) {
|
|
214
|
-
if (!config.search
|
|
215
|
-
throw new Error(
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
211
|
+
if (!config.search) {
|
|
212
|
+
throw new Error('Configuration for search is required. See https://doc.geogirafe.org/docs/configuration');
|
|
213
|
+
}
|
|
214
|
+
const providers = [];
|
|
215
|
+
for (const provider of config.search.providers ?? []) {
|
|
216
|
+
if (provider.type === 'geomapfish') {
|
|
217
|
+
if (!provider.url.includes('###SEARCHTERM###')) {
|
|
218
|
+
throw new Error(`Search provider url of type "geomapfish" is missing the expected pattern. See https://doc.geogirafe.org/docs/configuration`);
|
|
219
|
+
}
|
|
220
|
+
providers.push({
|
|
221
|
+
type: provider.type,
|
|
222
|
+
providerName: provider.providerName ?? provider.type,
|
|
223
|
+
url: provider.url,
|
|
224
|
+
resultSrid: provider.resultSrid ?? config.map.srid
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
else if (provider.type === 'geoadminch') {
|
|
228
|
+
providers.push({
|
|
229
|
+
type: provider.type,
|
|
230
|
+
providerName: provider.providerName ?? provider.type,
|
|
231
|
+
bbox: provider.bbox,
|
|
232
|
+
locationOrigins: provider.locationOrigins
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
console.warn(`Provider type is missing or not valid: ${provider['type']}`);
|
|
237
|
+
}
|
|
219
238
|
}
|
|
220
239
|
return {
|
|
221
|
-
|
|
222
|
-
resultsSrid: config.search.resultsSrid ?? config.map.srid,
|
|
240
|
+
providers: providers,
|
|
223
241
|
objectPreview: config.search.objectPreview ?? false,
|
|
224
242
|
layerPreview: config.search.layerPreview ?? false,
|
|
225
243
|
minResolution: config.search.minResolution ?? 0.5,
|
|
@@ -358,6 +376,7 @@ class GirafeConfig {
|
|
|
358
376
|
loginRequired: config.gmfauth.loginRequired ?? false,
|
|
359
377
|
checkSessionOnLoad: config.gmfauth.checkSessionOnLoad ?? true,
|
|
360
378
|
authMode: 'cookie',
|
|
379
|
+
alwaysSendCookies: config.gmfauth.alwaysSendCookies ?? false,
|
|
361
380
|
refererPolicy: config.gmfauth.refererPolicy ?? 'strict-origin-when-cross-origin',
|
|
362
381
|
audienceExcludedPaths: config.gmfauth.audienceExcludedPaths ?? []
|
|
363
382
|
};
|
|
@@ -388,7 +407,8 @@ class GirafeConfig {
|
|
|
388
407
|
loginRequired: config.oauth.issuer.loginRequired ?? false,
|
|
389
408
|
checkSessionOnLoad: config.oauth.issuer.checkSessionOnLoad ?? false,
|
|
390
409
|
audience: config.oauth.issuer.audience,
|
|
391
|
-
audienceExcludedPaths: config.oauth.issuer.audienceExcludedPaths ?? []
|
|
410
|
+
audienceExcludedPaths: config.oauth.issuer.audienceExcludedPaths ?? [],
|
|
411
|
+
alwaysSendCookies: config.oauth.issuer.alwaysSendCookies ?? false
|
|
392
412
|
};
|
|
393
413
|
const geomapfishConfig = {
|
|
394
414
|
userInfoUrl: config.oauth.geomapfish.userInfoUrl,
|
|
@@ -31,6 +31,7 @@ import WfsManager from '../wfs/wfsmanager.js';
|
|
|
31
31
|
import WmsManager from '../wms/wmsmanager.js';
|
|
32
32
|
import IGirafeContext from './icontext.js';
|
|
33
33
|
import ThemeFavoritesManager from '../themes/themefavoritesmanager.js';
|
|
34
|
+
import SearchManager from '../search/searchmanager.js';
|
|
34
35
|
import FeedbackManager from '../feedback/feedbackmanager.js';
|
|
35
36
|
export default class GirafeContext implements IGirafeContext {
|
|
36
37
|
readonly userDataManager: UserDataManager;
|
|
@@ -65,6 +66,7 @@ export default class GirafeContext implements IGirafeContext {
|
|
|
65
66
|
readonly localFileManager: LocalFileManager;
|
|
66
67
|
readonly onBoardingManager: OnBoardingManager;
|
|
67
68
|
readonly themeFavoritesManager: ThemeFavoritesManager;
|
|
69
|
+
readonly searchManager: SearchManager;
|
|
68
70
|
readonly feedbackManager: FeedbackManager;
|
|
69
71
|
constructor();
|
|
70
72
|
initialize(): Promise<void>;
|
package/tools/context/context.js
CHANGED
|
@@ -31,6 +31,7 @@ import UserDataManager from '../userdata/userdatamanager.js';
|
|
|
31
31
|
import WfsManager from '../wfs/wfsmanager.js';
|
|
32
32
|
import WmsManager from '../wms/wmsmanager.js';
|
|
33
33
|
import ThemeFavoritesManager from '../themes/themefavoritesmanager.js';
|
|
34
|
+
import SearchManager from '../search/searchmanager.js';
|
|
34
35
|
import FeedbackManager from '../feedback/feedbackmanager.js';
|
|
35
36
|
export default class GirafeContext {
|
|
36
37
|
userDataManager;
|
|
@@ -65,6 +66,7 @@ export default class GirafeContext {
|
|
|
65
66
|
localFileManager;
|
|
66
67
|
onBoardingManager;
|
|
67
68
|
themeFavoritesManager;
|
|
69
|
+
searchManager;
|
|
68
70
|
feedbackManager;
|
|
69
71
|
constructor() {
|
|
70
72
|
this.componentManager = new ComponentManager(this);
|
|
@@ -99,6 +101,7 @@ export default class GirafeContext {
|
|
|
99
101
|
this.ogcApiFeaturesManager = new OgcApiFeaturesManager(this);
|
|
100
102
|
this.onBoardingManager = new OnBoardingManager(this);
|
|
101
103
|
this.themeFavoritesManager = new ThemeFavoritesManager(this);
|
|
104
|
+
this.searchManager = new SearchManager(this);
|
|
102
105
|
this.feedbackManager = new FeedbackManager(this);
|
|
103
106
|
}
|
|
104
107
|
async initialize() {
|
|
@@ -137,6 +140,7 @@ export default class GirafeContext {
|
|
|
137
140
|
this.ogcApiFeaturesManager.initializeSingleton();
|
|
138
141
|
this.onBoardingManager.initializeSingleton();
|
|
139
142
|
this.themeFavoritesManager.initializeSingleton();
|
|
143
|
+
this.searchManager.initializeSingleton();
|
|
140
144
|
this.feedbackManager.initializeSingleton();
|
|
141
145
|
}
|
|
142
146
|
}
|
|
@@ -30,6 +30,7 @@ import UserDataManager from '../userdata/userdatamanager.js';
|
|
|
30
30
|
import WfsManager from '../wfs/wfsmanager.js';
|
|
31
31
|
import WmsManager from '../wms/wmsmanager.js';
|
|
32
32
|
import ThemeFavoritesManager from '../themes/themefavoritesmanager.js';
|
|
33
|
+
import SearchManager from '../search/searchmanager.js';
|
|
33
34
|
import FeedbackManager from '../feedback/feedbackmanager.js';
|
|
34
35
|
export default interface IGirafeContext {
|
|
35
36
|
readonly userDataManager: UserDataManager;
|
|
@@ -64,6 +65,7 @@ export default interface IGirafeContext {
|
|
|
64
65
|
readonly localFileManager: LocalFileManager;
|
|
65
66
|
readonly onBoardingManager: OnBoardingManager;
|
|
66
67
|
readonly themeFavoritesManager: ThemeFavoritesManager;
|
|
68
|
+
readonly searchManager: SearchManager;
|
|
67
69
|
readonly feedbackManager: FeedbackManager;
|
|
68
70
|
initialize(): Promise<void>;
|
|
69
71
|
}
|
|
@@ -42,7 +42,7 @@ class I18nManager extends GirafeSingleton {
|
|
|
42
42
|
this.loadingLanguagePromise = this.context.configManager.loadConfig().then(async () => {
|
|
43
43
|
if (this.context.configManager.Config?.languages.translations &&
|
|
44
44
|
language in this.context.configManager.Config.languages.translations) {
|
|
45
|
-
let mergedTranslations = {};
|
|
45
|
+
let mergedTranslations = this.translations[language] ?? {};
|
|
46
46
|
// Translations are loaded in the order defined in the list of files
|
|
47
47
|
// If an element is present in both results, the last value overwrite all the others
|
|
48
48
|
for (const url of this.context.configManager.Config.languages.translations[language]) {
|
package/tools/main.d.ts
CHANGED
|
@@ -58,6 +58,13 @@ export { default as OrderingManager, LayerTreeStartOrder } from './ordering/orde
|
|
|
58
58
|
export type { GeoTransform } from './raster/rasterutils.js';
|
|
59
59
|
export { extractGeoTransform, mapToPixel, pixelToMap, getImage, getPixelValue } from './raster/rasterutils.js';
|
|
60
60
|
export { default as ResizeWindow } from './resizewindow.js';
|
|
61
|
+
export { default as AbstractSearchClient, SEARCH_PROVIDER_DEFAULT, SEARCH_GROUP_DEFAULT, SEARCH_GROUP_RECENTER_MAP } from './search/abstractsearchclient.js';
|
|
62
|
+
export type { GeoAdminChSearchConfig } from './search/geoadminchsearchclient.js';
|
|
63
|
+
export { default as GeoAdminChSearchClient } from './search/geoadminchsearchclient.js';
|
|
64
|
+
export type { GmfSearchConfig } from './search/gmfsearchclient.js';
|
|
65
|
+
export { default as GmfSearchClient } from './search/gmfsearchclient.js';
|
|
66
|
+
export type { SearchProviderConfig } from './search/searchmanager.js';
|
|
67
|
+
export { default as SearchManager } from './search/searchmanager.js';
|
|
61
68
|
export type { default as ISessionManager } from './share/isessionmanager.js';
|
|
62
69
|
export type { UrlShortenerResponse, IUrlShortener } from './share/iurlshortener.js';
|
|
63
70
|
export { default as ActiveBasemapsSerializer } from './share/serializers/activebasemapsserializer.js';
|
|
@@ -104,6 +111,8 @@ export type { GgUserInteractionListener } from './state/userInteractionManager.j
|
|
|
104
111
|
export { default as UserInteractionManager } from './state/userInteractionManager.js';
|
|
105
112
|
export type { GgUserInteractionEvent } from './state/userinteractionevent.js';
|
|
106
113
|
export { gGEventDependencies, isPrimaryPointerAction, isAlternateMouseClick, isMouseWheelClick } from './state/userinteractionevent.js';
|
|
114
|
+
export type { SwState } from './sw/service-worker.tools';
|
|
115
|
+
export { swLog, SwHelper, IndexedDbHelper, CacheHelper } from './sw/service-worker.tools';
|
|
107
116
|
export { default as CustomThemesManager } from './themes/customthemesmanager.js';
|
|
108
117
|
export { default as ThemeFavoritesManager } from './themes/themefavoritesmanager.js';
|
|
109
118
|
export { DEFAULT_OPACITY, OPACITY_FOR_DEFAULT_BASEMAP } from './themes/themes-config.js';
|
package/tools/main.js
CHANGED
|
@@ -48,6 +48,10 @@ export { default as OnBoardingManager } from './onboarding/onboardingmanager.js'
|
|
|
48
48
|
export { default as OrderingManager, LayerTreeStartOrder } from './ordering/orderingmanager.js';
|
|
49
49
|
export { extractGeoTransform, mapToPixel, pixelToMap, getImage, getPixelValue } from './raster/rasterutils.js';
|
|
50
50
|
export { default as ResizeWindow } from './resizewindow.js';
|
|
51
|
+
export { default as AbstractSearchClient, SEARCH_PROVIDER_DEFAULT, SEARCH_GROUP_DEFAULT, SEARCH_GROUP_RECENTER_MAP } from './search/abstractsearchclient.js';
|
|
52
|
+
export { default as GeoAdminChSearchClient } from './search/geoadminchsearchclient.js';
|
|
53
|
+
export { default as GmfSearchClient } from './search/gmfsearchclient.js';
|
|
54
|
+
export { default as SearchManager } from './search/searchmanager.js';
|
|
51
55
|
export { default as ActiveBasemapsSerializer } from './share/serializers/activebasemapsserializer.js';
|
|
52
56
|
export { default as CustomLayersSerializer } from './share/serializers/customlayersserializer.js';
|
|
53
57
|
export { default as GlobeSerializer } from './share/serializers/globeserializer.js';
|
|
@@ -77,6 +81,7 @@ export { default as StateToggleManager } from './state/stateToggleManager.js';
|
|
|
77
81
|
export { default as StateManager } from './state/statemanager.js';
|
|
78
82
|
export { default as UserInteractionManager } from './state/userInteractionManager.js';
|
|
79
83
|
export { gGEventDependencies, isPrimaryPointerAction, isAlternateMouseClick, isMouseWheelClick } from './state/userinteractionevent.js';
|
|
84
|
+
export { swLog, SwHelper, IndexedDbHelper, CacheHelper } from './sw/service-worker.tools';
|
|
80
85
|
export { default as CustomThemesManager } from './themes/customthemesmanager.js';
|
|
81
86
|
export { default as ThemeFavoritesManager } from './themes/themefavoritesmanager.js';
|
|
82
87
|
export { DEFAULT_OPACITY, OPACITY_FOR_DEFAULT_BASEMAP } from './themes/themes-config.js';
|
|
@@ -3,14 +3,15 @@ import LayerWmts from '../../models/layers/layerwmts.js';
|
|
|
3
3
|
import { Extent } from 'ol/extent.js';
|
|
4
4
|
declare class OfflineManager extends GirafeSingleton {
|
|
5
5
|
private serviceWorker;
|
|
6
|
-
private
|
|
6
|
+
private readonly indexedDbHelper;
|
|
7
7
|
private get map();
|
|
8
8
|
private get state();
|
|
9
|
+
private database;
|
|
9
10
|
private totalLength;
|
|
10
11
|
private counter;
|
|
11
12
|
private progressCallback?;
|
|
12
|
-
private storeVersion
|
|
13
|
-
private dbCacheName
|
|
13
|
+
private storeVersion;
|
|
14
|
+
private dbCacheName;
|
|
14
15
|
private readonly tilesStoreName;
|
|
15
16
|
private readonly bboxStoreName;
|
|
16
17
|
private readonly vectorLayer;
|
|
@@ -19,7 +20,7 @@ declare class OfflineManager extends GirafeSingleton {
|
|
|
19
20
|
private registerEvents;
|
|
20
21
|
/** Exports all the WMTS tiles for the layers in parameter and store them to local cache */
|
|
21
22
|
exportWMTSTiles(bbox: Extent, wmtsLayers: LayerWmts[], progressCallback?: CallableFunction): Promise<void>;
|
|
22
|
-
|
|
23
|
+
upgradeIndexedDb(database: IDBDatabase): void;
|
|
23
24
|
/** The offline manager works with a ServiceWorker in charge of intercepting
|
|
24
25
|
* the fetch requests and read the data from the local cache if the application
|
|
25
26
|
* is offline. This method defines the servicework object to use.
|