@konce-pt/angular 0.12.0 → 0.14.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.
- package/CHANGELOG.md +591 -369
- package/README.md +111 -55
- package/charts/src/lib/llms.txt +17 -17
- package/chat/src/lib/llms.txt +61 -35
- package/fesm2022/konce-pt-angular-charts.mjs +11 -11
- package/fesm2022/konce-pt-angular-charts.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-chat.mjs +236 -127
- package/fesm2022/konce-pt-angular-chat.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-grid.mjs +16 -16
- package/fesm2022/konce-pt-angular-grid.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-icons.mjs +5 -5
- package/fesm2022/konce-pt-angular-icons.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-map.mjs +308 -280
- package/fesm2022/konce-pt-angular-map.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-roadmap.mjs +23 -23
- package/fesm2022/konce-pt-angular-roadmap.mjs.map +1 -1
- package/fesm2022/konce-pt-angular.mjs +4410 -2128
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/grid/src/lib/llms.txt +18 -18
- package/map/src/lib/llms.txt +142 -141
- package/package.json +14 -12
- package/roadmap/src/lib/llms.txt +27 -27
- package/src/lib/accordion/llms.txt +18 -6
- package/src/lib/alert/llms.txt +5 -5
- package/src/lib/app-shell/llms.txt +23 -21
- package/src/lib/auth/llms.txt +22 -22
- package/src/lib/autocomplete/llms.txt +15 -4
- package/src/lib/avatar/llms.txt +3 -3
- package/src/lib/avatar-group/llms.txt +5 -5
- package/src/lib/backdrop/llms.txt +35 -35
- package/src/lib/badge/llms.txt +7 -7
- package/src/lib/bottom-sheet/llms.txt +4 -4
- package/src/lib/breadcrumb/llms.txt +2 -2
- package/src/lib/breakpoint/llms.txt +8 -8
- package/src/lib/button/llms.txt +26 -18
- package/src/lib/button-group/llms.txt +37 -31
- package/src/lib/card/llms.txt +19 -19
- package/src/lib/carousel/llms.txt +6 -6
- package/src/lib/checkbox/llms.txt +15 -3
- package/src/lib/chip/llms.txt +6 -6
- package/src/lib/chips-input/llms.txt +11 -4
- package/src/lib/color-picker/llms.txt +4 -4
- package/src/lib/confirm/llms.txt +5 -5
- package/src/lib/context-menu/llms.txt +4 -4
- package/src/lib/data-table/llms.txt +280 -239
- package/src/lib/data-view/llms.txt +25 -4
- package/src/lib/date-range/llms.txt +27 -27
- package/src/lib/datepicker/llms.txt +34 -34
- package/src/lib/dialog/llms.txt +27 -27
- package/src/lib/divider/llms.txt +2 -2
- package/src/lib/drawer/llms.txt +7 -7
- package/src/lib/empty/llms.txt +4 -4
- package/src/lib/fab/llms.txt +6 -2
- package/src/lib/fieldset/llms.txt +22 -4
- package/src/lib/file-upload/llms.txt +1 -1
- package/src/lib/form-field/llms.txt +33 -19
- package/src/lib/galleria/llms.txt +3 -3
- package/src/lib/i18n/llms.txt +9 -9
- package/src/lib/icon/llms.txt +8 -8
- package/src/lib/icon-button/llms.txt +8 -3
- package/src/lib/image/llms.txt +4 -4
- package/src/lib/input/llms.txt +21 -7
- package/src/lib/input-mask/llms.txt +2 -2
- package/src/lib/input-number/llms.txt +14 -14
- package/src/lib/input-otp/llms.txt +6 -6
- package/src/lib/knob/llms.txt +11 -6
- package/src/lib/listbox/llms.txt +6 -6
- package/src/lib/loader/llms.txt +72 -0
- package/src/lib/megamenu/llms.txt +7 -7
- package/src/lib/mention/llms.txt +15 -15
- package/src/lib/menu/llms.txt +12 -12
- package/src/lib/menubar/llms.txt +7 -7
- package/src/lib/meter-group/llms.txt +7 -7
- package/src/lib/order-list/llms.txt +18 -6
- package/src/lib/paginator/llms.txt +5 -5
- package/src/lib/panel/llms.txt +20 -8
- package/src/lib/password/llms.txt +14 -6
- package/src/lib/peek/llms.txt +10 -10
- package/src/lib/pick-list/llms.txt +26 -6
- package/src/lib/popover/llms.txt +7 -7
- package/src/lib/progress/llms.txt +16 -16
- package/src/lib/radio-group/llms.txt +10 -3
- package/src/lib/rating/llms.txt +13 -6
- package/src/lib/rich-text/llms.txt +34 -29
- package/src/lib/scroll-top/llms.txt +3 -3
- package/src/lib/select/llms.txt +20 -13
- package/src/lib/sidenav/llms.txt +8 -8
- package/src/lib/slider/llms.txt +21 -8
- package/src/lib/speech/llms.txt +108 -0
- package/src/lib/speed-dial/llms.txt +9 -3
- package/src/lib/spinner/llms.txt +2 -2
- package/src/lib/split-button/llms.txt +14 -8
- package/src/lib/splitter/llms.txt +8 -8
- package/src/lib/stepper/llms.txt +24 -8
- package/src/lib/switch/llms.txt +10 -3
- package/src/lib/switch-group/llms.txt +10 -10
- package/src/lib/tabs/llms.txt +5 -5
- package/src/lib/textarea/llms.txt +16 -5
- package/src/lib/timeline/llms.txt +1 -1
- package/src/lib/toast/llms.txt +33 -5
- package/src/lib/toolbar/llms.txt +3 -3
- package/src/lib/tooltip/llms.txt +10 -10
- package/src/lib/tree/llms.txt +19 -6
- package/src/lib/update/llms.txt +52 -0
- package/types/konce-pt-angular-charts.d.ts +2 -2
- package/types/konce-pt-angular-chat.d.ts +87 -44
- package/types/konce-pt-angular-chat.d.ts.map +1 -1
- package/types/konce-pt-angular-grid.d.ts +14 -14
- package/types/konce-pt-angular-icons.d.ts +3 -3
- package/types/konce-pt-angular-map.d.ts +137 -121
- package/types/konce-pt-angular-map.d.ts.map +1 -1
- package/types/konce-pt-angular-roadmap.d.ts +13 -13
- package/types/konce-pt-angular.d.ts +1383 -625
- package/types/konce-pt-angular.d.ts.map +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { InjectionToken, model, input, booleanAttribute, output, inject, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, signal, Injector, effect, untracked, runInInjectionContext, numberAttribute, DestroyRef, TemplateRef, Directive, viewChild, contentChildren, contentChild, afterNextRender } from '@angular/core';
|
|
4
|
-
import { KptI18n, KptCheckbox, KptDatepicker, KptIcon, KptIconButton, KptFileUpload, KptInput, KptFormField, KptTextarea, KptInputNumber, KptSelect, KptButton, KptIconRegistry, KptDialog } from '@konce-pt/angular';
|
|
4
|
+
import { KptI18n, KptCheckbox, KptDatepicker, KptIcon, KptIconButton, KptFileUpload, KptInput, KptFormField, KptTextarea, KptInputNumber, KptSelect, KptButton, KptSpeechButton, KptIconRegistry, KptDialog } from '@konce-pt/angular';
|
|
5
5
|
import { isFittableBounds, emptyWeek, weekdayName, parseTime, contrastVarOf, colorVarOf, createLeafletEngine, createGoogleEngine, countByCategory, clusterLocations, isCluster, renderClusterHtml, renderMarkerHtml, haversine, resolveCountryView, boundsOf, KPT_MAP_DEFAULT_TILE_URL, KPT_MAP_DEFAULT_ATTRIBUTION, renderUserMarkerHtml, isSplittable, foregroundVarOf, formatDistance, isAlwaysOpen, isOpenAt, groupWeek, nextChange, normalizeUrl, prettyUrl, formatLatLng } from '@konce-pt/map';
|
|
6
6
|
export { KPT_CLUSTER_DEFAULTS, KPT_EARTH_RADIUS, KPT_MAP_COUNTRIES, KPT_MAP_DEFAULT_ATTRIBUTION, KPT_MAP_DEFAULT_COUNTRY, KPT_MAP_DEFAULT_TILE_URL, KPT_MAX_LATITUDE, KPT_MIN_FIT_SPAN, KPT_TILE_SIZE, boundsCenter, boundsContain, boundsOf, centerOfBounds, clampLat, clusterLocations, clusterTier, colorVarOf, contrastVarOf, countByCategory, countryCodes, countryPreset, createGoogleEngine, createLeafletEngine, dominantCategory, emptyWeek, foregroundVarOf, formatDistance, formatLatLng, formatTime, groupWeek, haversine, isAlwaysOpen, isCluster, isFittableBounds, isOpenAt, isSplittable, isoWeekday, loadGoogleMapsApi, metersPerPixel, nextChange, normalizeLng, padBounds, parseTime, project, renderClusterHtml, renderMarkerHtml, renderUserMarkerHtml, resolveCountryView, unproject, weekdayName, worldSize, zoomForBounds } from '@konce-pt/map';
|
|
7
7
|
import { form, required, min, max, email, pattern, validate, submit, FormRoot, FormField } from '@angular/forms/signals';
|
|
8
8
|
import { of, Observable } from 'rxjs';
|
|
9
9
|
|
|
10
10
|
const KPT_MAP_GEOCODER = new InjectionToken('KPT_MAP_GEOCODER');
|
|
11
|
-
/** Publiczna instancja OSM. Ma twardą politykę użycia
|
|
11
|
+
/** Publiczna instancja OSM. Ma twardą politykę użycia - patrz JSDoc providera. */
|
|
12
12
|
const NOMINATIM_URL = 'https://nominatim.openstreetmap.org';
|
|
13
13
|
/** Polityka publicznej instancji Nominatim: maksymalnie jedno zapytanie na sekundę. */
|
|
14
14
|
const NOMINATIM_MIN_INTERVAL_MS = 1000;
|
|
@@ -19,7 +19,7 @@ const NOMINATIM_MIN_INTERVAL_MS = 1000;
|
|
|
19
19
|
class KptNominatimGeocoder {
|
|
20
20
|
constructor(options = {}) {
|
|
21
21
|
this.options = options;
|
|
22
|
-
/** Ogon kolejki
|
|
22
|
+
/** Ogon kolejki - każde kolejne zapytanie czeka na swoją kolej. */
|
|
23
23
|
this.next = Promise.resolve();
|
|
24
24
|
/** Kiedy wystrzeliło poprzednie zapytanie. `0` = jeszcze żadne. */
|
|
25
25
|
this.lastAt = 0;
|
|
@@ -29,9 +29,9 @@ class KptNominatimGeocoder {
|
|
|
29
29
|
* Rezerwuje miejsce w kolejce: czeka na poprzednie zapytanie, a potem tylko tyle,
|
|
30
30
|
* ile brakuje do pełnego odstępu od jego wystrzału.
|
|
31
31
|
*
|
|
32
|
-
* Odstęp liczony od zegara, a nie stałym `delay()` przed każdym zapytaniem
|
|
32
|
+
* Odstęp liczony od zegara, a nie stałym `delay()` przed każdym zapytaniem -
|
|
33
33
|
* inaczej pierwsza podpowiedź po minucie bezczynności też płaciłaby sekundę, a przy
|
|
34
|
-
* podpowiadaniu w trakcie pisania to jest różnica między
|
|
34
|
+
* podpowiadaniu w trakcie pisania to jest różnica między "działa" a "zacina się".
|
|
35
35
|
* Górna granica jednego zapytania na sekundę zostaje nienaruszona.
|
|
36
36
|
*
|
|
37
37
|
* Bez odstępu nie ma czego kolejkować: łańcuch obietnic zostaje nietknięty, żeby
|
|
@@ -73,7 +73,7 @@ class KptNominatimGeocoder {
|
|
|
73
73
|
.catch((error) => {
|
|
74
74
|
if (controller.signal.aborted || error?.name === 'AbortError')
|
|
75
75
|
return;
|
|
76
|
-
// Brak adresu to nie awaria formularza
|
|
76
|
+
// Brak adresu to nie awaria formularza - pole zostaje puste.
|
|
77
77
|
subscriber.next(null);
|
|
78
78
|
subscriber.complete();
|
|
79
79
|
});
|
|
@@ -81,7 +81,7 @@ class KptNominatimGeocoder {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
* Podpowiedzi adresowe. Wchodzi w **tę samą** kolejkę co `reverse()`
|
|
84
|
+
* Podpowiedzi adresowe. Wchodzi w **tę samą** kolejkę co `reverse()` - polityka Nominatim
|
|
85
85
|
* liczy jedno zapytanie na sekundę na całego klienta, a nie na metodę.
|
|
86
86
|
*/
|
|
87
87
|
search(query, options) {
|
|
@@ -166,7 +166,7 @@ function mapNominatim(a, label) {
|
|
|
166
166
|
return {
|
|
167
167
|
street,
|
|
168
168
|
houseNumber,
|
|
169
|
-
// Jedno pole
|
|
169
|
+
// Jedno pole "Adres" chce ulicy z numerem; bez ulicy nie ma czego sklejać.
|
|
170
170
|
address: street ? [street, houseNumber].filter(Boolean).join(' ') : undefined,
|
|
171
171
|
// Nominatim rozrzuca miejscowość po kilku kluczach zależnie od jej wielkości.
|
|
172
172
|
city: a.city ?? a.town ?? a.village ?? a.municipality ?? a.hamlet,
|
|
@@ -181,7 +181,7 @@ function mapNominatim(a, label) {
|
|
|
181
181
|
function mapPlace(place, index) {
|
|
182
182
|
const lat = Number(place.lat);
|
|
183
183
|
const lng = Number(place.lon);
|
|
184
|
-
// Wynik bez współrzędnych jest bezużyteczny
|
|
184
|
+
// Wynik bez współrzędnych jest bezużyteczny - nie ma dokąd polecieć.
|
|
185
185
|
if (!Number.isFinite(lat) || !Number.isFinite(lng))
|
|
186
186
|
return null;
|
|
187
187
|
return {
|
|
@@ -195,12 +195,12 @@ function mapPlace(place, index) {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
198
|
-
* `[south, north, west, east]` jako napisy
|
|
198
|
+
* `[south, north, west, east]` jako napisy -> `KptMapBounds`.
|
|
199
199
|
*
|
|
200
|
-
* `undefined` dla zasięgu zbyt ciasnego, żeby go wpasowywać w kadr
|
|
200
|
+
* `undefined` dla zasięgu zbyt ciasnego, żeby go wpasowywać w kadr - pojedynczy adres
|
|
201
201
|
* dostaje wtedy `[searchZoom]` mapy i ląduje w powtarzalnym zbliżeniu, zamiast
|
|
202
202
|
* w przypadkowym, zależnym od tego, jak dostawca obrysował budynek. Regułę trzyma
|
|
203
|
-
* `isFittableBounds()` z rdzenia
|
|
203
|
+
* `isFittableBounds()` z rdzenia - jest testowana i wspólna dla wszystkich adapterów.
|
|
204
204
|
*/
|
|
205
205
|
function mapBoundingBox(box) {
|
|
206
206
|
if (box?.length !== 4)
|
|
@@ -215,7 +215,7 @@ function delay(ms) {
|
|
|
215
215
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
|
-
* Włącza podpowiadanie adresu z Nominatim (OpenStreetMap) w formularzu
|
|
218
|
+
* Włącza podpowiadanie adresu z Nominatim (OpenStreetMap) w formularzu "dodaj lokalizację".
|
|
219
219
|
*
|
|
220
220
|
* **Polityka użycia.** Publiczna instancja `nominatim.openstreetmap.org` dopuszcza
|
|
221
221
|
* maksymalnie jedno zapytanie na sekundę, wymaga rozpoznawalnego `Referer`/`User-Agent`
|
|
@@ -224,7 +224,7 @@ function delay(ms) {
|
|
|
224
224
|
* podstaw własną instancję (`baseUrl`) albo komercyjnego dostawcę przez własny
|
|
225
225
|
* `KPT_MAP_GEOCODER`.
|
|
226
226
|
*
|
|
227
|
-
* Podanie `baseUrl` **zdejmuje sekundowy odstęp** (`minIntervalMs` domyślnie 0)
|
|
227
|
+
* Podanie `baseUrl` **zdejmuje sekundowy odstęp** (`minIntervalMs` domyślnie 0) - regulamin
|
|
228
228
|
* publicznej instancji nie obowiązuje na Twoim serwerze. Cudzą, współdzieloną instancję
|
|
229
229
|
* podstawiaj z jawnym `minIntervalMs`.
|
|
230
230
|
*
|
|
@@ -239,10 +239,10 @@ function provideKptNominatimGeocoder(options = {}) {
|
|
|
239
239
|
return { provide: KPT_MAP_GEOCODER, useValue: new KptNominatimGeocoder(options) };
|
|
240
240
|
}
|
|
241
241
|
/**
|
|
242
|
-
* Stały adres i stała lista podpowiedzi
|
|
242
|
+
* Stały adres i stała lista podpowiedzi - Storybook i testy, bez ruchu sieciowego.
|
|
243
243
|
*
|
|
244
|
-
* Podpowiedzi filtruje po `label` bez znaków diakrytycznych, żeby
|
|
245
|
-
* w
|
|
244
|
+
* Podpowiedzi filtruje po `label` bez znaków diakrytycznych, żeby "warszawa" trafiało
|
|
245
|
+
* w "Warszawa". Prawdziwy geokoder dopasowuje po swojemu - atrapa tylko udaje, że umie.
|
|
246
246
|
*/
|
|
247
247
|
class KptMapGeocoderStub {
|
|
248
248
|
constructor(address, results = [], options = {}) {
|
|
@@ -260,17 +260,17 @@ class KptMapGeocoderStub {
|
|
|
260
260
|
const hits = this.results.filter((r) => fold(r.label).includes(q)).slice(0, options?.limit ?? 5);
|
|
261
261
|
if (!this.options.deferCoordinates)
|
|
262
262
|
return of(hits);
|
|
263
|
-
// Współrzędne i zasięg zostają po stronie atrapy
|
|
263
|
+
// Współrzędne i zasięg zostają po stronie atrapy - pole ma po nie sięgnąć `resolve()`.
|
|
264
264
|
return of(hits.map(({ at: _at, bounds: _bounds, ...rest }) => rest));
|
|
265
265
|
}
|
|
266
266
|
resolve(suggestion) {
|
|
267
|
-
// Podpowiedź ze współrzędnymi wraca nietknięta
|
|
267
|
+
// Podpowiedź ze współrzędnymi wraca nietknięta - tak samo zachowa się prawdziwy adapter.
|
|
268
268
|
if (suggestion.at)
|
|
269
269
|
return of(suggestion);
|
|
270
270
|
return of(this.results.find((r) => r.id === suggestion.id) ?? null);
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
/** Bez znaków diakrytycznych i wielkości liter
|
|
273
|
+
/** Bez znaków diakrytycznych i wielkości liter - tylko na potrzeby atrapy. */
|
|
274
274
|
function fold(value) {
|
|
275
275
|
return value.trim().toLowerCase().normalize('NFD').replace(/\p{Diacritic}/gu, '');
|
|
276
276
|
}
|
|
@@ -296,7 +296,7 @@ function KptMapHoursField_For_3_Conditional_4_For_1_Template(rf, ctx) { if (rf &
|
|
|
296
296
|
i0.ɵɵlistener("valueChange", function KptMapHoursField_For_3_Conditional_4_For_1_Template_kpt_datepicker_valueChange_1_listener($event) { const $index_r3 = i0.ɵɵrestoreView(_r2).$index; const row_r4 = i0.ɵɵnextContext(2).$implicit; const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r4.setTime(row_r4, $index_r3, "from", $event)); })("touch", function KptMapHoursField_For_3_Conditional_4_For_1_Template_kpt_datepicker_touch_1_listener() { i0.ɵɵrestoreView(_r2); const ctx_r4 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r4.touch.emit()); });
|
|
297
297
|
i0.ɵɵelementEnd();
|
|
298
298
|
i0.ɵɵelementStart(2, "span", 9);
|
|
299
|
-
i0.ɵɵtext(3, "
|
|
299
|
+
i0.ɵɵtext(3, "-");
|
|
300
300
|
i0.ɵɵelementEnd();
|
|
301
301
|
i0.ɵɵelementStart(4, "kpt-datepicker", 8);
|
|
302
302
|
i0.ɵɵlistener("valueChange", function KptMapHoursField_For_3_Conditional_4_For_1_Template_kpt_datepicker_valueChange_4_listener($event) { const $index_r3 = i0.ɵɵrestoreView(_r2).$index; const row_r4 = i0.ɵɵnextContext(2).$implicit; const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r4.setTime(row_r4, $index_r3, "to", $event)); })("touch", function KptMapHoursField_For_3_Conditional_4_For_1_Template_kpt_datepicker_touch_4_listener() { i0.ɵɵrestoreView(_r2); const ctx_r4 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r4.touch.emit()); });
|
|
@@ -308,9 +308,9 @@ function KptMapHoursField_For_3_Conditional_4_For_1_Template(rf, ctx) { if (rf &
|
|
|
308
308
|
const row_r4 = i0.ɵɵnextContext(2).$implicit;
|
|
309
309
|
const ctx_r4 = i0.ɵɵnextContext();
|
|
310
310
|
i0.ɵɵadvance();
|
|
311
|
-
i0.ɵɵproperty("minuteStep", ctx_r4.minuteStep)("value", range_r7.from)("disabled", ctx_r4.locked(row_r4))("ariaLabel", ctx_r4.i18n.t("map.field.hoursFrom") + "
|
|
311
|
+
i0.ɵɵproperty("minuteStep", ctx_r4.minuteStep)("value", range_r7.from)("disabled", ctx_r4.locked(row_r4))("ariaLabel", ctx_r4.i18n.t("map.field.hoursFrom") + " - " + row_r4.name);
|
|
312
312
|
i0.ɵɵadvance(3);
|
|
313
|
-
i0.ɵɵproperty("minuteStep", ctx_r4.minuteStep)("value", range_r7.to)("disabled", ctx_r4.locked(row_r4))("ariaLabel", ctx_r4.i18n.t("map.field.hoursTo") + "
|
|
313
|
+
i0.ɵɵproperty("minuteStep", ctx_r4.minuteStep)("value", range_r7.to)("disabled", ctx_r4.locked(row_r4))("ariaLabel", ctx_r4.i18n.t("map.field.hoursTo") + " - " + row_r4.name);
|
|
314
314
|
i0.ɵɵadvance();
|
|
315
315
|
i0.ɵɵconditional(row_r4.ranges.length > 1 ? 5 : -1);
|
|
316
316
|
} }
|
|
@@ -363,15 +363,15 @@ function KptMapHoursField_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
363
363
|
/** Ile przedziałów na dobę dopuszczamy. Dwa pokrywają przerwę i dobę przez północ. */
|
|
364
364
|
const MAX_RANGES = 2;
|
|
365
365
|
/**
|
|
366
|
-
* Snap minut na tarczy zegara. Godziny otwarcia chodzą co kwadrans, a nie co minutę
|
|
366
|
+
* Snap minut na tarczy zegara. Godziny otwarcia chodzą co kwadrans, a nie co minutę -
|
|
367
367
|
* krok 5 daje trafienie w 07:30 czy 22:45 bez celowania w pojedynczą minutę.
|
|
368
368
|
*/
|
|
369
369
|
const MINUTE_STEP = 5;
|
|
370
370
|
/**
|
|
371
|
-
* Pole
|
|
371
|
+
* Pole "godziny otwarcia" formularza dodawania lokalizacji (`type: 'hours'` w schemie).
|
|
372
372
|
*
|
|
373
|
-
* Siedem wierszy od poniedziałku, każdy z parą godzin i znacznikiem
|
|
374
|
-
* Skrót
|
|
373
|
+
* Siedem wierszy od poniedziałku, każdy z parą godzin i znacznikiem "zamknięte".
|
|
374
|
+
* Skrót "tak samo przez cały tydzień" kopiuje poniedziałek na pozostałe dni - to
|
|
375
375
|
* najczęstszy przypadek, a bez niego wypełnienie formularza to czternaście pól.
|
|
376
376
|
*
|
|
377
377
|
* Nazwy dni idą z `Intl`, nie ze słownika `KptMessages`: rozkład tygodnia jest
|
|
@@ -389,7 +389,7 @@ class KptMapHoursField {
|
|
|
389
389
|
this.i18n = inject(KptI18n);
|
|
390
390
|
this.maxRanges = MAX_RANGES;
|
|
391
391
|
this.minuteStep = MINUTE_STEP;
|
|
392
|
-
/** Skrót
|
|
392
|
+
/** Skrót "tak samo przez cały tydzień" - trzymany w modelu, nie w wartości. */
|
|
393
393
|
this.sameAllWeek = model(false, /* @ts-ignore */
|
|
394
394
|
...(ngDevMode ? [{ debugName: "sameAllWeek" }] : /* istanbul ignore next */ []));
|
|
395
395
|
this.rows = computed(() => {
|
|
@@ -463,7 +463,7 @@ class KptMapHoursField {
|
|
|
463
463
|
: { day: entry.day, closed: monday.closed, ranges: monday.ranges.map((r) => ({ ...r })) });
|
|
464
464
|
});
|
|
465
465
|
}
|
|
466
|
-
/** Zapis zawsze przez pełny, uporządkowany tydzień
|
|
466
|
+
/** Zapis zawsze przez pełny, uporządkowany tydzień - model nie ma dziur. */
|
|
467
467
|
write(change) {
|
|
468
468
|
const current = this.value();
|
|
469
469
|
const base = emptyWeek().map((day) => current.find((d) => d.day === day.day) ?? day);
|
|
@@ -486,7 +486,7 @@ class KptMapHoursField {
|
|
|
486
486
|
}
|
|
487
487
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptMapHoursField, [{
|
|
488
488
|
type: Component,
|
|
489
|
-
args: [{ selector: 'kpt-map-hours-field', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptCheckbox, KptDatepicker, KptIcon, KptIconButton], host: { class: 'kpt-map-hours-field' }, template: "<kpt-checkbox\n class=\"kpt-map-hours-field__same\"\n [checked]=\"sameAllWeek()\"\n (checkedChange)=\"onSameAllWeek($event)\"\n [disabled]=\"disabled() || readonly()\"\n [label]=\"i18n.t('map.field.hoursSameAllWeek')\"\n/>\n\n<ul class=\"kpt-map-hours-field__week\">\n @for (row of rows(); track row.day) {\n <li class=\"kpt-map-hours-field__day\" [attr.data-locked]=\"locked(row) ? '' : null\">\n <span class=\"kpt-map-hours-field__name\">{{ row.name }}</span>\n\n <!-- Przy zamkni\u0119tym dniu kolumna godzin zostaje pusta: \
|
|
489
|
+
args: [{ selector: 'kpt-map-hours-field', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptCheckbox, KptDatepicker, KptIcon, KptIconButton], host: { class: 'kpt-map-hours-field' }, template: "<kpt-checkbox\n class=\"kpt-map-hours-field__same\"\n [checked]=\"sameAllWeek()\"\n (checkedChange)=\"onSameAllWeek($event)\"\n [disabled]=\"disabled() || readonly()\"\n [label]=\"i18n.t('map.field.hoursSameAllWeek')\"\n/>\n\n<ul class=\"kpt-map-hours-field__week\">\n @for (row of rows(); track row.day) {\n <li class=\"kpt-map-hours-field__day\" [attr.data-locked]=\"locked(row) ? '' : null\">\n <span class=\"kpt-map-hours-field__name\">{{ row.name }}</span>\n\n <!-- Przy zamkni\u0119tym dniu kolumna godzin zostaje pusta: \"zamkni\u0119te\" m\u00F3wi ju\u017C checkbox. -->\n <div class=\"kpt-map-hours-field__ranges\">\n @if (!row.closed) {\n @for (range of row.ranges; track $index) {\n <div class=\"kpt-map-hours-field__range\">\n <kpt-datepicker\n selectionMode=\"time\"\n [minuteStep]=\"minuteStep\"\n [value]=\"range.from\"\n (valueChange)=\"setTime(row, $index, 'from', $event)\"\n [disabled]=\"locked(row)\"\n [ariaLabel]=\"i18n.t('map.field.hoursFrom') + ' - ' + row.name\"\n (touch)=\"touch.emit()\"\n />\n <span class=\"kpt-map-hours-field__dash\" aria-hidden=\"true\">-</span>\n <kpt-datepicker\n selectionMode=\"time\"\n [minuteStep]=\"minuteStep\"\n [value]=\"range.to\"\n (valueChange)=\"setTime(row, $index, 'to', $event)\"\n [disabled]=\"locked(row)\"\n [ariaLabel]=\"i18n.t('map.field.hoursTo') + ' - ' + row.name\"\n (touch)=\"touch.emit()\"\n />\n @if (row.ranges.length > 1) {\n <kpt-icon-button\n variant=\"text\"\n size=\"sm\"\n [disabled]=\"locked(row)\"\n [ariaLabel]=\"i18n.t('map.field.hoursRemoveRange')\"\n (click)=\"removeRange(row, $index)\"\n >\n <kpt-icon name=\"minus\" />\n </kpt-icon-button>\n }\n </div>\n }\n\n @if (row.ranges.length < maxRanges) {\n <button\n class=\"kpt-map-hours-field__add\"\n type=\"button\"\n [disabled]=\"locked(row)\"\n (click)=\"addRange(row)\"\n >\n <kpt-icon name=\"plus\" />\n {{ i18n.t('map.field.hoursAddRange') }}\n </button>\n }\n }\n </div>\n\n <kpt-checkbox\n class=\"kpt-map-hours-field__closed\"\n [checked]=\"row.closed\"\n (checkedChange)=\"setClosed(row, $event)\"\n [disabled]=\"locked(row)\"\n [label]=\"i18n.t('map.field.hoursClosed')\"\n />\n </li>\n }\n</ul>\n", styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map-hours-field{display:flex;flex-direction:column;gap:var(--kpt-space-2)}.kpt-map-hours-field__week{display:flex;flex-direction:column;gap:var(--kpt-space-1);margin:0;padding:0;list-style:none}.kpt-map-hours-field__day{display:grid;grid-template-columns:3.5rem 1fr auto;gap:var(--kpt-space-2);align-items:center;padding:var(--kpt-space-1) 0}.kpt-map-hours-field__day[data-locked]{opacity:.6}.kpt-map-hours-field__name{font-size:var(--kpt-font-size-sm);color:var(--kpt-color-on-surface-muted)}.kpt-map-hours-field__ranges{display:flex;flex-direction:column;gap:var(--kpt-space-1);min-width:0}.kpt-map-hours-field__range{display:flex;gap:var(--kpt-space-1);align-items:center}.kpt-map-hours-field__range .kpt-datepicker-host{flex:1 1 0;min-width:0}.kpt-map-hours-field__dash{color:var(--kpt-color-on-surface-muted)}.kpt-map-hours-field__add{display:inline-flex;gap:var(--kpt-space-1);align-items:center;align-self:flex-start;padding:0;font:inherit;font-size:var(--kpt-font-size-sm);color:var(--kpt-color-primary);cursor:pointer;background:none;border:0}.kpt-map-hours-field__add:disabled{color:var(--kpt-color-text-subtle);cursor:default}.kpt-map-hours-field__add:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:2px}}\n"] }]
|
|
490
490
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], sameAllWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "sameAllWeek", required: false }] }, { type: i0.Output, args: ["sameAllWeekChange"] }] }); })();
|
|
491
491
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptMapHoursField, { className: "KptMapHoursField", filePath: "lib/map-hours-field.component.ts", lineNumber: 53 }); })();
|
|
492
492
|
|
|
@@ -514,16 +514,16 @@ function KptMapImageField_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
514
514
|
i0.ɵɵproperty("title", ctx_r1.i18n.t("map.field.removeImage"))("disabled", ctx_r1.disabled() || ctx_r1.readonly());
|
|
515
515
|
i0.ɵɵattribute("aria-label", ctx_r1.i18n.t("map.field.removeImage"));
|
|
516
516
|
} }
|
|
517
|
-
/** Domyślny limit pliku. Data URL puchnie o
|
|
517
|
+
/** Domyślny limit pliku. Data URL puchnie o ~1/3, a wartość leci w `locationCreate`. */
|
|
518
518
|
const DEFAULT_MAX_BYTES = 2 * 1024 * 1024;
|
|
519
519
|
/**
|
|
520
|
-
* Pole
|
|
520
|
+
* Pole "zdjęcie" formularza dodawania lokalizacji (`type: 'image'` w schemie kategorii).
|
|
521
521
|
*
|
|
522
522
|
* Wartością jest zawsze **string**: albo `data:` z wybranego pliku, albo adres wklejony
|
|
523
523
|
* przez użytkownika. Karta miejsca nie rozróżnia jednego od drugiego, więc formularz
|
|
524
524
|
* nie musi decydować za aplikację, gdzie zdjęcia mieszkają.
|
|
525
525
|
*
|
|
526
|
-
* Plik czytamy w przeglądarce i nigdzie nie wysyłamy
|
|
526
|
+
* Plik czytamy w przeglądarce i nigdzie nie wysyłamy - biblioteka nie ma i nie chce
|
|
527
527
|
* mieć wiedzy o storage'u aplikacji.
|
|
528
528
|
*/
|
|
529
529
|
class KptMapImageField {
|
|
@@ -574,7 +574,7 @@ class KptMapImageField {
|
|
|
574
574
|
reader.readAsDataURL(file);
|
|
575
575
|
}
|
|
576
576
|
onUrl(url) {
|
|
577
|
-
// Adres i plik wykluczają się
|
|
577
|
+
// Adres i plik wykluczają się - dwa źródła jednej wartości myliłyby użytkownika.
|
|
578
578
|
if (url)
|
|
579
579
|
this.files.set([]);
|
|
580
580
|
this.sizeError.set(null);
|
|
@@ -818,7 +818,7 @@ function KptMapCreateDialog_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
818
818
|
i0.ɵɵadvance();
|
|
819
819
|
i0.ɵɵtextInterpolate(ctx_r1.i18n.t("map.save"));
|
|
820
820
|
} }
|
|
821
|
-
/** Pusta wartość właściwa dla typu pola
|
|
821
|
+
/** Pusta wartość właściwa dla typu pola - formularz startuje bez `undefined`. */
|
|
822
822
|
function initialValue(def) {
|
|
823
823
|
if (def.initial !== undefined)
|
|
824
824
|
return def.initial;
|
|
@@ -846,11 +846,11 @@ function initialModel(fields) {
|
|
|
846
846
|
return out;
|
|
847
847
|
}
|
|
848
848
|
/**
|
|
849
|
-
* Treść dialogu
|
|
849
|
+
* Treść dialogu "dodaj lokalizację" budowana ze schemy kategorii (`category.fields`).
|
|
850
850
|
*
|
|
851
|
-
* Przy dynamicznej schemie typowanie pól znika
|
|
851
|
+
* Przy dynamicznej schemie typowanie pól znika - model to `Record<string, unknown>`,
|
|
852
852
|
* a ścieżki walidatorów trzeba rzutować. Reszta kontraktu Signal Forms zostaje bez zmian:
|
|
853
|
-
* walidatory deklarujemy raz, a bramka
|
|
853
|
+
* walidatory deklarujemy raz, a bramka "nie strasz czerwienią" siedzi w prezentacji.
|
|
854
854
|
*/
|
|
855
855
|
class KptMapCreateDialog {
|
|
856
856
|
constructor() {
|
|
@@ -859,7 +859,7 @@ class KptMapCreateDialog {
|
|
|
859
859
|
this.at = input.required(/* @ts-ignore */
|
|
860
860
|
...(ngDevMode ? [{ debugName: "at" }] : /* istanbul ignore next */ []));
|
|
861
861
|
/**
|
|
862
|
-
* Geokoder tego formularza. Podany wygrywa nad `KPT_MAP_GEOCODER` z DI
|
|
862
|
+
* Geokoder tego formularza. Podany wygrywa nad `KPT_MAP_GEOCODER` z DI - `kpt-map` podaje
|
|
863
863
|
* tędy port swojej mapy, bo geokoder jest per mapa, a nie per aplikacja.
|
|
864
864
|
*/
|
|
865
865
|
this.geocoder = input(null, /* @ts-ignore */
|
|
@@ -868,12 +868,12 @@ class KptMapCreateDialog {
|
|
|
868
868
|
this.cancelled = output();
|
|
869
869
|
this.i18n = inject(KptI18n);
|
|
870
870
|
this.injector = inject(Injector);
|
|
871
|
-
/** Opcjonalny
|
|
871
|
+
/** Opcjonalny - wejście `[geocoder]` i tak ma nad nim pierwszeństwo. */
|
|
872
872
|
this.injectedGeocoder = inject(KPT_MAP_GEOCODER, { optional: true });
|
|
873
873
|
/** Rozstrzygnięty port: wejście przed DI. Bez obu formularz po prostu nie podpowiada adresu. */
|
|
874
874
|
this.port = computed(() => this.geocoder() ?? this.injectedGeocoder, /* @ts-ignore */
|
|
875
875
|
...(ngDevMode ? [{ debugName: "port" }] : /* istanbul ignore next */ []));
|
|
876
|
-
/** Trwa zapytanie do geokodera
|
|
876
|
+
/** Trwa zapytanie do geokodera - szablon pokazuje wtedy notkę zamiast ciszy. */
|
|
877
877
|
this.geocoding = signal(false, /* @ts-ignore */
|
|
878
878
|
...(ngDevMode ? [{ debugName: "geocoding" }] : /* istanbul ignore next */ []));
|
|
879
879
|
/** Ostatnio ustalony adres; `label` bywa czytelniejszy niż suma pól. */
|
|
@@ -888,12 +888,12 @@ class KptMapCreateDialog {
|
|
|
888
888
|
* Model i formularz dla aktualnej kategorii. Budowane w efekcie, nie w `computed()`,
|
|
889
889
|
* bo `form()` zakłada dwie rzeczy, których ciało `computed()` nie spełnia:
|
|
890
890
|
*
|
|
891
|
-
* - wstrzykuje sobie zależności
|
|
891
|
+
* - wstrzykuje sobie zależności -> stąd `runInInjectionContext`;
|
|
892
892
|
* - zakłada własny `effect()`, a tego nie wolno tworzyć w kontekście reaktywnym
|
|
893
|
-
* (NG0602)
|
|
893
|
+
* (NG0602) -> stąd `untracked`, które zdejmuje aktywnego konsumenta.
|
|
894
894
|
*
|
|
895
895
|
* Zależność od `fields()` zostaje śledzona na zewnątrz `untracked`, więc zmiana
|
|
896
|
-
* kategorii przebudowuje formularz
|
|
896
|
+
* kategorii przebudowuje formularz - inny zestaw pól to inny formularz, a Signal Forms
|
|
897
897
|
* wiąże schemę tylko raz, przy tworzeniu.
|
|
898
898
|
*/
|
|
899
899
|
this.built = signal(null, /* @ts-ignore */
|
|
@@ -903,7 +903,7 @@ class KptMapCreateDialog {
|
|
|
903
903
|
...(ngDevMode ? [{ debugName: "formRoot" }] : /* istanbul ignore next */ []));
|
|
904
904
|
this.formInvalid = computed(() => this.formRoot()?.().invalid() ?? true, /* @ts-ignore */
|
|
905
905
|
...(ngDevMode ? [{ debugName: "formInvalid" }] : /* istanbul ignore next */ []));
|
|
906
|
-
/** Współrzędne z prawego kliknięcia
|
|
906
|
+
/** Współrzędne z prawego kliknięcia - pokazujemy je, ale nie pozwalamy edytować. */
|
|
907
907
|
this.coords = computed(() => {
|
|
908
908
|
const at = this.at();
|
|
909
909
|
return { lat: at.lat.toFixed(5), lng: at.lng.toFixed(5) };
|
|
@@ -915,7 +915,7 @@ class KptMapCreateDialog {
|
|
|
915
915
|
const model = signal(initialModel(fields), /* @ts-ignore */
|
|
916
916
|
...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
|
|
917
917
|
const f = runInInjectionContext(this.injector, () => form(model, (path) => {
|
|
918
|
-
// Ścieżki są dynamiczne, więc indeksujemy proxy po kluczu
|
|
918
|
+
// Ścieżki są dynamiczne, więc indeksujemy proxy po kluczu - stąd rzutowanie.
|
|
919
919
|
const paths = path;
|
|
920
920
|
for (const def of fields) {
|
|
921
921
|
const node = paths[def.key];
|
|
@@ -951,7 +951,7 @@ class KptMapCreateDialog {
|
|
|
951
951
|
/**
|
|
952
952
|
* Podpowiada adres z geokodowania wstecznego współrzędnych kliknięcia.
|
|
953
953
|
*
|
|
954
|
-
* Wypełnia wyłącznie pola z `autofill` i wyłącznie te, które są jeszcze puste
|
|
954
|
+
* Wypełnia wyłącznie pola z `autofill` i wyłącznie te, które są jeszcze puste -
|
|
955
955
|
* podpowiedź nigdy nie kasuje tego, co użytkownik zdążył wpisać. Brak portu
|
|
956
956
|
* `KPT_MAP_GEOCODER` albo nieudane zapytanie to nie błąd: pola zostają puste.
|
|
957
957
|
*/
|
|
@@ -994,11 +994,11 @@ class KptMapCreateDialog {
|
|
|
994
994
|
});
|
|
995
995
|
});
|
|
996
996
|
}
|
|
997
|
-
/** Kontrolka pola po kluczu
|
|
997
|
+
/** Kontrolka pola po kluczu - szablon podaje ją do `[formField]`. */
|
|
998
998
|
fieldOf(key) {
|
|
999
999
|
return this.formRoot()?.[key];
|
|
1000
1000
|
}
|
|
1001
|
-
/** Komunikat pokazujemy dopiero po dotknięciu pola
|
|
1001
|
+
/** Komunikat pokazujemy dopiero po dotknięciu pola - bramka żyje w prezentacji. */
|
|
1002
1002
|
errorOf(key) {
|
|
1003
1003
|
const node = this.fieldOf(key);
|
|
1004
1004
|
if (!node)
|
|
@@ -1010,7 +1010,7 @@ class KptMapCreateDialog {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
/**
|
|
1012
1012
|
* Dzień otwarty musi mieć obie godziny i różne od siebie. Dzień oznaczony jako
|
|
1013
|
-
* zamknięty przechodzi bez zastrzeżeń
|
|
1013
|
+
* zamknięty przechodzi bez zastrzeżeń - to prawidłowa odpowiedź, a nie brak danych.
|
|
1014
1014
|
*/
|
|
1015
1015
|
hoursError(week) {
|
|
1016
1016
|
if (!week)
|
|
@@ -1146,7 +1146,7 @@ function KptMapLegend_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
1146
1146
|
i0.ɵɵconditional(entry_r2.count !== null ? 5 : -1);
|
|
1147
1147
|
} }
|
|
1148
1148
|
/**
|
|
1149
|
-
* Legenda mapy
|
|
1149
|
+
* Legenda mapy - lista kategorii ze znacznikiem koloru i ikoną. Pozycje są przyciskami:
|
|
1150
1150
|
* kliknięcie chowa i pokazuje kategorię (`hidden` dwukierunkowe).
|
|
1151
1151
|
*
|
|
1152
1152
|
* `kpt-map` renderuje ją sam pod mapą przy `[legend]="true"`; kto chce ją gdzie indziej,
|
|
@@ -1162,12 +1162,12 @@ class KptMapLegend {
|
|
|
1162
1162
|
/** Identyfikatory ukrytych kategorii (dwukierunkowe). */
|
|
1163
1163
|
this.hidden = model([], /* @ts-ignore */
|
|
1164
1164
|
...(ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []));
|
|
1165
|
-
/** Opcjonalne liczniki `{ categoryId: liczba }`
|
|
1165
|
+
/** Opcjonalne liczniki `{ categoryId: liczba }` - pokazywane przy etykiecie. */
|
|
1166
1166
|
this.counts = input(null, /* @ts-ignore */
|
|
1167
1167
|
...(ngDevMode ? [{ debugName: "counts" }] : /* istanbul ignore next */ []));
|
|
1168
1168
|
this.orientation = input('horizontal', /* @ts-ignore */
|
|
1169
1169
|
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
1170
|
-
/** Wyłącza chowanie kategorii
|
|
1170
|
+
/** Wyłącza chowanie kategorii - legenda staje się czysto informacyjna. */
|
|
1171
1171
|
this.interactive = input(true, /* @ts-ignore */
|
|
1172
1172
|
...(ngDevMode ? [{ debugName: "interactive" }] : /* istanbul ignore next */ []));
|
|
1173
1173
|
this.i18n = inject(KptI18n);
|
|
@@ -1218,19 +1218,26 @@ class KptMapLegend {
|
|
|
1218
1218
|
|
|
1219
1219
|
const _c0$2 = a0 => ({ count: a0 });
|
|
1220
1220
|
const _forTrack0$2 = ($index, $item) => $item.id;
|
|
1221
|
-
function
|
|
1221
|
+
function KptMapSearch_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
1222
1222
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
1223
|
-
i0.ɵɵelementStart(0, "button",
|
|
1224
|
-
i0.ɵɵlistener("click", function
|
|
1225
|
-
i0.ɵɵelement(1, "kpt-icon",
|
|
1223
|
+
i0.ɵɵelementStart(0, "button", 9);
|
|
1224
|
+
i0.ɵɵlistener("click", function KptMapSearch_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.clear()); });
|
|
1225
|
+
i0.ɵɵelement(1, "kpt-icon", 10);
|
|
1226
1226
|
i0.ɵɵelementEnd();
|
|
1227
1227
|
} if (rf & 2) {
|
|
1228
1228
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
1229
1229
|
i0.ɵɵproperty("title", ctx_r1.i18n.t("map.search.clear"));
|
|
1230
1230
|
i0.ɵɵattribute("aria-label", ctx_r1.i18n.t("map.search.clear"));
|
|
1231
1231
|
} }
|
|
1232
|
-
function
|
|
1233
|
-
i0.ɵɵ
|
|
1232
|
+
function KptMapSearch_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
1233
|
+
i0.ɵɵelement(0, "kpt-speech-button", 6);
|
|
1234
|
+
} if (rf & 2) {
|
|
1235
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
1236
|
+
const fieldEl_r3 = i0.ɵɵreference(4);
|
|
1237
|
+
i0.ɵɵproperty("continuous", false)("target", fieldEl_r3)("lang", ctx_r1.speechLang())("listeningColor", ctx_r1.speechColor())("disabled", ctx_r1.disabled() || !ctx_r1.canSearch());
|
|
1238
|
+
} }
|
|
1239
|
+
function KptMapSearch_Conditional_7_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
1240
|
+
i0.ɵɵelementStart(0, "p", 11);
|
|
1234
1241
|
i0.ɵɵtext(1);
|
|
1235
1242
|
i0.ɵɵelementEnd();
|
|
1236
1243
|
} if (rf & 2) {
|
|
@@ -1238,8 +1245,8 @@ function KptMapSearch_Conditional_5_Conditional_1_Template(rf, ctx) { if (rf & 1
|
|
|
1238
1245
|
i0.ɵɵadvance();
|
|
1239
1246
|
i0.ɵɵtextInterpolate(ctx_r1.i18n.t("map.search.minLength", i0.ɵɵpureFunction1(1, _c0$2, ctx_r1.minLength())));
|
|
1240
1247
|
} }
|
|
1241
|
-
function
|
|
1242
|
-
i0.ɵɵelementStart(0, "p",
|
|
1248
|
+
function KptMapSearch_Conditional_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1249
|
+
i0.ɵɵelementStart(0, "p", 11);
|
|
1243
1250
|
i0.ɵɵtext(1);
|
|
1244
1251
|
i0.ɵɵelementEnd();
|
|
1245
1252
|
} if (rf & 2) {
|
|
@@ -1247,29 +1254,29 @@ function KptMapSearch_Conditional_5_Conditional_2_Template(rf, ctx) { if (rf & 1
|
|
|
1247
1254
|
i0.ɵɵadvance();
|
|
1248
1255
|
i0.ɵɵtextInterpolate(ctx_r1.i18n.t("map.search.searching"));
|
|
1249
1256
|
} }
|
|
1250
|
-
function
|
|
1251
|
-
const
|
|
1252
|
-
i0.ɵɵelementStart(0, "li",
|
|
1253
|
-
i0.ɵɵlistener("mousedown", function
|
|
1254
|
-
i0.ɵɵelementStart(1, "span",
|
|
1255
|
-
i0.ɵɵelement(2, "kpt-icon",
|
|
1257
|
+
function KptMapSearch_Conditional_7_Conditional_3_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
1258
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
1259
|
+
i0.ɵɵelementStart(0, "li", 14);
|
|
1260
|
+
i0.ɵɵlistener("mousedown", function KptMapSearch_Conditional_7_Conditional_3_For_2_Template_li_mousedown_0_listener($event) { const result_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); $event.preventDefault(); return i0.ɵɵresetView(ctx_r1.pick(result_r5)); })("mouseenter", function KptMapSearch_Conditional_7_Conditional_3_For_2_Template_li_mouseenter_0_listener() { const ɵ$index_31_r6 = i0.ɵɵrestoreView(_r4).$index; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.activeIndex.set(ɵ$index_31_r6)); });
|
|
1261
|
+
i0.ɵɵelementStart(1, "span", 15);
|
|
1262
|
+
i0.ɵɵelement(2, "kpt-icon", 16);
|
|
1256
1263
|
i0.ɵɵelementEnd();
|
|
1257
|
-
i0.ɵɵelementStart(3, "span",
|
|
1264
|
+
i0.ɵɵelementStart(3, "span", 17);
|
|
1258
1265
|
i0.ɵɵtext(4);
|
|
1259
1266
|
i0.ɵɵelementEnd()();
|
|
1260
1267
|
} if (rf & 2) {
|
|
1261
|
-
const
|
|
1262
|
-
const ɵ$
|
|
1268
|
+
const result_r5 = ctx.$implicit;
|
|
1269
|
+
const ɵ$index_31_r6 = ctx.$index;
|
|
1263
1270
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
1264
|
-
i0.ɵɵclassProp("is-active", ɵ$
|
|
1265
|
-
i0.ɵɵproperty("id", ctx_r1.optionId(ɵ$
|
|
1266
|
-
i0.ɵɵattribute("aria-selected", ɵ$
|
|
1271
|
+
i0.ɵɵclassProp("is-active", ɵ$index_31_r6 === ctx_r1.activeIndex());
|
|
1272
|
+
i0.ɵɵproperty("id", ctx_r1.optionId(ɵ$index_31_r6));
|
|
1273
|
+
i0.ɵɵattribute("aria-selected", ɵ$index_31_r6 === ctx_r1.activeIndex());
|
|
1267
1274
|
i0.ɵɵadvance(4);
|
|
1268
|
-
i0.ɵɵtextInterpolate(
|
|
1275
|
+
i0.ɵɵtextInterpolate(result_r5.label);
|
|
1269
1276
|
} }
|
|
1270
|
-
function
|
|
1271
|
-
i0.ɵɵelementStart(0, "ul",
|
|
1272
|
-
i0.ɵɵrepeaterCreate(1,
|
|
1277
|
+
function KptMapSearch_Conditional_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
1278
|
+
i0.ɵɵelementStart(0, "ul", 12);
|
|
1279
|
+
i0.ɵɵrepeaterCreate(1, KptMapSearch_Conditional_7_Conditional_3_For_2_Template, 5, 5, "li", 13, _forTrack0$2);
|
|
1273
1280
|
i0.ɵɵelementEnd();
|
|
1274
1281
|
} if (rf & 2) {
|
|
1275
1282
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -1278,8 +1285,8 @@ function KptMapSearch_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1
|
|
|
1278
1285
|
i0.ɵɵadvance();
|
|
1279
1286
|
i0.ɵɵrepeater(ctx_r1.results());
|
|
1280
1287
|
} }
|
|
1281
|
-
function
|
|
1282
|
-
i0.ɵɵelementStart(0, "p",
|
|
1288
|
+
function KptMapSearch_Conditional_7_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
1289
|
+
i0.ɵɵelementStart(0, "p", 11);
|
|
1283
1290
|
i0.ɵɵtext(1);
|
|
1284
1291
|
i0.ɵɵelementEnd();
|
|
1285
1292
|
} if (rf & 2) {
|
|
@@ -1287,9 +1294,9 @@ function KptMapSearch_Conditional_5_Conditional_4_Template(rf, ctx) { if (rf & 1
|
|
|
1287
1294
|
i0.ɵɵadvance();
|
|
1288
1295
|
i0.ɵɵtextInterpolate(ctx_r1.i18n.t("map.search.noResults"));
|
|
1289
1296
|
} }
|
|
1290
|
-
function
|
|
1291
|
-
i0.ɵɵelementStart(0, "div",
|
|
1292
|
-
i0.ɵɵconditionalCreate(1,
|
|
1297
|
+
function KptMapSearch_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
1298
|
+
i0.ɵɵelementStart(0, "div", 7);
|
|
1299
|
+
i0.ɵɵconditionalCreate(1, KptMapSearch_Conditional_7_Conditional_1_Template, 2, 3, "p", 11)(2, KptMapSearch_Conditional_7_Conditional_2_Template, 2, 1, "p", 11)(3, KptMapSearch_Conditional_7_Conditional_3_Template, 3, 2, "ul", 12)(4, KptMapSearch_Conditional_7_Conditional_4_Template, 2, 1, "p", 11);
|
|
1293
1300
|
i0.ɵɵelementEnd();
|
|
1294
1301
|
} if (rf & 2) {
|
|
1295
1302
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -1297,13 +1304,13 @@ function KptMapSearch_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
1297
1304
|
i0.ɵɵadvance();
|
|
1298
1305
|
i0.ɵɵconditional(ctx_r1.tooShort() ? 1 : ctx_r1.busy() ? 2 : ctx_r1.results().length ? 3 : 4);
|
|
1299
1306
|
} }
|
|
1300
|
-
/** Identyfikatory pozycji listy dla `aria-activedescendant`
|
|
1307
|
+
/** Identyfikatory pozycji listy dla `aria-activedescendant` - muszą być unikalne w dokumencie. */
|
|
1301
1308
|
let nextId = 0;
|
|
1302
1309
|
/**
|
|
1303
1310
|
* Wyszukiwarka adresów: pole z podpowiedziami z geokodera. Wynik wyboru leci w `selected`,
|
|
1304
|
-
* a co z nim zrobić
|
|
1311
|
+
* a co z nim zrobić - decyduje rodzic (`kpt-map` przenosi na niego widok).
|
|
1305
1312
|
*
|
|
1306
|
-
* Wymaga portu `KPT_MAP_GEOCODER` **z metodą `search()`**
|
|
1313
|
+
* Wymaga portu `KPT_MAP_GEOCODER` **z metodą `search()`** - biblioteka nie odpytuje cudzego
|
|
1307
1314
|
* serwera bez zgody aplikacji. Bez portu pole renderuje się wyłączone, zamiast udawać, że
|
|
1308
1315
|
* coś znajdzie; `kpt-map` idzie dalej i w ogóle go wtedy nie pokazuje.
|
|
1309
1316
|
*
|
|
@@ -1326,7 +1333,7 @@ class KptMapSearch {
|
|
|
1326
1333
|
this.debounce = input(300, { ...(ngDevMode ? { debugName: "debounce" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
1327
1334
|
/** Ile podpowiedzi najwyżej. */
|
|
1328
1335
|
this.limit = input(5, { ...(ngDevMode ? { debugName: "limit" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
1329
|
-
/** Zawężenie twarde do krajów (ISO 3166-1 alpha-2)
|
|
1336
|
+
/** Zawężenie twarde do krajów (ISO 3166-1 alpha-2) - wyniki spoza nich nie wrócą. */
|
|
1330
1337
|
this.countryCodes = input(null, /* @ts-ignore */
|
|
1331
1338
|
...(ngDevMode ? [{ debugName: "countryCodes" }] : /* istanbul ignore next */ []));
|
|
1332
1339
|
/** Preferowany prostokąt wyników. Nie odcina reszty świata, tylko przesuwa ją niżej. */
|
|
@@ -1334,7 +1341,19 @@ class KptMapSearch {
|
|
|
1334
1341
|
...(ngDevMode ? [{ debugName: "viewbox" }] : /* istanbul ignore next */ []));
|
|
1335
1342
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1336
1343
|
/**
|
|
1337
|
-
*
|
|
1344
|
+
* Mikrofon w polu (Web Speech API): kliknięcie czyści frazę, a jedna podyktowana wypowiedź
|
|
1345
|
+
* staje się zapytaniem - z tym samym `debounce` i `minLength` co pisanie. Bez wsparcia
|
|
1346
|
+
* przeglądarki się nie pokazuje.
|
|
1347
|
+
*/
|
|
1348
|
+
this.speech = input(false, { ...(ngDevMode ? { debugName: "speech" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1349
|
+
/** Język dyktowania (BCP 47); bez niego z języka interfejsu. */
|
|
1350
|
+
this.speechLang = input(null, /* @ts-ignore */
|
|
1351
|
+
...(ngDevMode ? [{ debugName: "speechLang" }] : /* istanbul ignore next */ []));
|
|
1352
|
+
/** Kolor "stop" i fali w trakcie nasłuchu; domyślnie kolor motywu. */
|
|
1353
|
+
this.speechColor = input('primary', /* @ts-ignore */
|
|
1354
|
+
...(ngDevMode ? [{ debugName: "speechColor" }] : /* istanbul ignore next */ []));
|
|
1355
|
+
/**
|
|
1356
|
+
* Geokoder tego pola. Podany wygrywa nad `KPT_MAP_GEOCODER` z DI - `kpt-map` podaje tędy
|
|
1338
1357
|
* port swojej mapy, bo geokoder jest per mapa, a nie per aplikacja. Bez niego wszystko
|
|
1339
1358
|
* działa jak dotąd: port przychodzi z DI.
|
|
1340
1359
|
*/
|
|
@@ -1345,7 +1364,7 @@ class KptMapSearch {
|
|
|
1345
1364
|
* pole najpierw uzupełnia przez `resolve()` portu, a dopiero potem emituje.
|
|
1346
1365
|
*/
|
|
1347
1366
|
this.selected = output();
|
|
1348
|
-
/** Pole wyczyszczone
|
|
1367
|
+
/** Pole wyczyszczone - rodzic sprząta po sobie (np. chowa tymczasową pinezkę). */
|
|
1349
1368
|
this.cleared = output();
|
|
1350
1369
|
this.i18n = inject(KptI18n);
|
|
1351
1370
|
this.injectedGeocoder = inject(KPT_MAP_GEOCODER, { optional: true });
|
|
@@ -1358,7 +1377,7 @@ class KptMapSearch {
|
|
|
1358
1377
|
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
1359
1378
|
/**
|
|
1360
1379
|
* Fraza do odpytania geokodera. Osobna od `query`, bo wybór podpowiedzi zmienia treść
|
|
1361
|
-
* pola
|
|
1380
|
+
* pola - a to nie może wywołać kolejnego zapytania o coś, co już znaleźliśmy.
|
|
1362
1381
|
*/
|
|
1363
1382
|
this.term = signal('', /* @ts-ignore */
|
|
1364
1383
|
...(ngDevMode ? [{ debugName: "term" }] : /* istanbul ignore next */ []));
|
|
@@ -1372,16 +1391,16 @@ class KptMapSearch {
|
|
|
1372
1391
|
*/
|
|
1373
1392
|
this.resolving = signal(false, /* @ts-ignore */
|
|
1374
1393
|
...(ngDevMode ? [{ debugName: "resolving" }] : /* istanbul ignore next */ []));
|
|
1375
|
-
/** Subskrypcja `resolve()` w locie
|
|
1394
|
+
/** Subskrypcja `resolve()` w locie - kolejny wybór i czyszczenie pola ją przerywają. */
|
|
1376
1395
|
this.pending = null;
|
|
1377
|
-
/** Czy jakieś zapytanie już wróciło
|
|
1396
|
+
/** Czy jakieś zapytanie już wróciło - bez tego "brak wyników" mignąłby przed pierwszym. */
|
|
1378
1397
|
this.searched = signal(false, /* @ts-ignore */
|
|
1379
1398
|
...(ngDevMode ? [{ debugName: "searched" }] : /* istanbul ignore next */ []));
|
|
1380
1399
|
this.open = signal(false, /* @ts-ignore */
|
|
1381
1400
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
1382
1401
|
this.activeIndex = signal(-1, /* @ts-ignore */
|
|
1383
1402
|
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
1384
|
-
/** Fraza za krótka, ale niepusta
|
|
1403
|
+
/** Fraza za krótka, ale niepusta - zamiast ciszy pokazujemy, ile znaków brakuje. */
|
|
1385
1404
|
this.tooShort = computed(() => {
|
|
1386
1405
|
const length = this.query().trim().length;
|
|
1387
1406
|
return length > 0 && length < this.minLength();
|
|
@@ -1390,18 +1409,18 @@ class KptMapSearch {
|
|
|
1390
1409
|
this.hasPanel = computed(() => this.open() &&
|
|
1391
1410
|
(this.tooShort() || this.busy() || this.results().length > 0 || this.searched()), /* @ts-ignore */
|
|
1392
1411
|
...(ngDevMode ? [{ debugName: "hasPanel" }] : /* istanbul ignore next */ []));
|
|
1393
|
-
/** Cokolwiek leci do geokodera
|
|
1412
|
+
/** Cokolwiek leci do geokodera - lista albo pojedyncze miejsce. Jeden stan dla szablonu. */
|
|
1394
1413
|
this.busy = computed(() => this.loading() || this.resolving(), /* @ts-ignore */
|
|
1395
1414
|
...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
|
|
1396
|
-
/** Panel pokazuje listę (a nie notę)
|
|
1415
|
+
/** Panel pokazuje listę (a nie notę) - tylko wtedy `aria-controls` ma na co wskazać. */
|
|
1397
1416
|
this.listShown = computed(() => this.hasPanel() && !this.tooShort() && !this.busy() && this.results().length > 0, /* @ts-ignore */
|
|
1398
1417
|
...(ngDevMode ? [{ debugName: "listShown" }] : /* istanbul ignore next */ []));
|
|
1399
1418
|
this.canSearch = computed(() => !!this.port()?.search, /* @ts-ignore */
|
|
1400
1419
|
...(ngDevMode ? [{ debugName: "canSearch" }] : /* istanbul ignore next */ []));
|
|
1401
|
-
/** Nie udało się ustalić miejsca wybranej podpowiedzi
|
|
1420
|
+
/** Nie udało się ustalić miejsca wybranej podpowiedzi - komunikat zamiast cichej ciszy. */
|
|
1402
1421
|
this.unresolved = signal(false, /* @ts-ignore */
|
|
1403
1422
|
...(ngDevMode ? [{ debugName: "unresolved" }] : /* istanbul ignore next */ []));
|
|
1404
|
-
/** Komunikat dla `aria-live`
|
|
1423
|
+
/** Komunikat dla `aria-live` - czytnik dostaje stan, którego wzrokowo nie da się przegapić. */
|
|
1405
1424
|
this.status = computed(() => {
|
|
1406
1425
|
if (this.tooShort())
|
|
1407
1426
|
return this.i18n.t('map.search.minLength', { count: this.minLength() });
|
|
@@ -1428,7 +1447,7 @@ class KptMapSearch {
|
|
|
1428
1447
|
* Debounce stoi na `setTimeout`, a nie na operatorach rxjs: porty tego pakietu używają
|
|
1429
1448
|
* wyłącznie `Observable`/`of`, a rxjs nie jest zadeklarowany jako `peerDependency`
|
|
1430
1449
|
* biblioteki (wchodzi tranzytywnie przez `@angular/core`). `onCleanup` kasuje zarówno
|
|
1431
|
-
* niewystrzelony timer, jak i zapytanie w locie
|
|
1450
|
+
* niewystrzelony timer, jak i zapytanie w locie - adapter Nominatim przerywa wtedy
|
|
1432
1451
|
* `fetch` własnym `AbortController`.
|
|
1433
1452
|
*/
|
|
1434
1453
|
watchTerm() {
|
|
@@ -1472,7 +1491,7 @@ class KptMapSearch {
|
|
|
1472
1491
|
applyResults(results) {
|
|
1473
1492
|
// Podpowiedź bez współrzędnych jest do czegokolwiek dobra tylko wtedy, gdy port umie
|
|
1474
1493
|
// ją uzupełnić. Bez `resolve()` kliknięcie w nią nie miałoby dokąd polecieć, a pozycja,
|
|
1475
|
-
// która nic nie robi, jest gorsza od jej braku
|
|
1494
|
+
// która nic nie robi, jest gorsza od jej braku - więc taka nie trafia na listę.
|
|
1476
1495
|
this.results.set(this.port()?.resolve ? results : results.filter((r) => r.at));
|
|
1477
1496
|
this.loading.set(false);
|
|
1478
1497
|
this.searched.set(true);
|
|
@@ -1496,15 +1515,15 @@ class KptMapSearch {
|
|
|
1496
1515
|
this.open.set(false);
|
|
1497
1516
|
}
|
|
1498
1517
|
/**
|
|
1499
|
-
* Wybór podpowiedzi. Dostawca, który podał współrzędne na liście, emituje natychmiast
|
|
1518
|
+
* Wybór podpowiedzi. Dostawca, który podał współrzędne na liście, emituje natychmiast -
|
|
1500
1519
|
* dla Nominatima i każdego geokodera pytanego wprost nic się nie zmienia.
|
|
1501
1520
|
*
|
|
1502
1521
|
* Podpowiedź bez `at` (Google Places Autocomplete) trzeba najpierw uzupełnić: jedno
|
|
1503
1522
|
* wywołanie `resolve()` na *wybór*, nigdy w trakcie pisania. Panel zostaje otwarty
|
|
1504
|
-
* z komunikatem
|
|
1523
|
+
* z komunikatem "Szukam...", żeby czekanie nie wyglądało na zawieszenie pola.
|
|
1505
1524
|
*/
|
|
1506
1525
|
pick(suggestion) {
|
|
1507
|
-
// Etykieta wraca do pola, ale `term` zostaje
|
|
1526
|
+
// Etykieta wraca do pola, ale `term` zostaje - inaczej wybór odpaliłby kolejne zapytanie.
|
|
1508
1527
|
this.query.set(suggestion.label);
|
|
1509
1528
|
this.activeIndex.set(-1);
|
|
1510
1529
|
this.unresolved.set(false);
|
|
@@ -1567,14 +1586,14 @@ class KptMapSearch {
|
|
|
1567
1586
|
case 'Enter': {
|
|
1568
1587
|
const result = results[this.activeIndex()];
|
|
1569
1588
|
if (result) {
|
|
1570
|
-
// Pole bywa w formularzu aplikacji
|
|
1589
|
+
// Pole bywa w formularzu aplikacji - Enter nie ma go wysyłać.
|
|
1571
1590
|
event.preventDefault();
|
|
1572
1591
|
this.pick(result);
|
|
1573
1592
|
}
|
|
1574
1593
|
break;
|
|
1575
1594
|
}
|
|
1576
1595
|
case 'Escape':
|
|
1577
|
-
// Pierwszy Esc zamyka listę, drugi czyści pole
|
|
1596
|
+
// Pierwszy Esc zamyka listę, drugi czyści pole - jak w polu wyszukiwania przeglądarki.
|
|
1578
1597
|
if (this.open())
|
|
1579
1598
|
this.open.set(false);
|
|
1580
1599
|
else if (this.query())
|
|
@@ -1585,35 +1604,38 @@ class KptMapSearch {
|
|
|
1585
1604
|
}
|
|
1586
1605
|
}
|
|
1587
1606
|
static { this.ɵfac = function KptMapSearch_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptMapSearch)(); }; }
|
|
1588
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptMapSearch, selectors: [["kpt-map-search"]], hostAttrs: [1, "kpt-map-search"], inputs: { placeholder: [1, "placeholder"], minLength: [1, "minLength"], debounce: [1, "debounce"], limit: [1, "limit"], countryCodes: [1, "countryCodes"], viewbox: [1, "viewbox"], disabled: [1, "disabled"], geocoder: [1, "geocoder"] }, outputs: { selected: "selected", cleared: "cleared" }, decls:
|
|
1589
|
-
i0.ɵɵelementStart(0, "div",
|
|
1590
|
-
i0.ɵɵelement(2, "kpt-icon",
|
|
1607
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptMapSearch, selectors: [["kpt-map-search"]], hostAttrs: [1, "kpt-map-search"], inputs: { placeholder: [1, "placeholder"], minLength: [1, "minLength"], debounce: [1, "debounce"], limit: [1, "limit"], countryCodes: [1, "countryCodes"], viewbox: [1, "viewbox"], disabled: [1, "disabled"], speech: [1, "speech"], speechLang: [1, "speechLang"], speechColor: [1, "speechColor"], geocoder: [1, "geocoder"] }, outputs: { selected: "selected", cleared: "cleared" }, decls: 10, vars: 13, consts: [["fieldEl", ""], [1, "kpt-map-search__field"], ["aria-hidden", "true", 1, "kpt-map-search__icon"], ["name", "search"], ["type", "text", "autocomplete", "off", "autocapitalize", "off", "spellcheck", "false", "role", "combobox", "aria-autocomplete", "list", 1, "kpt-map-search__input", 3, "input", "focus", "blur", "keydown", "id", "value", "placeholder", "disabled"], ["type", "button", 1, "kpt-map-search__clear", 3, "title"], ["size", "sm", "unsupported", "hide", "mode", "replace", 1, "kpt-map-search__speech", 3, "continuous", "target", "lang", "listeningColor", "disabled"], [1, "kpt-map-search__panel", 3, "id"], ["aria-live", "polite", 1, "kpt-map-search__status"], ["type", "button", 1, "kpt-map-search__clear", 3, "click", "title"], ["name", "x"], [1, "kpt-map-search__note"], ["role", "listbox", 1, "kpt-map-search__list", 3, "id"], ["role", "option", 1, "kpt-map-search__option", 3, "id", "is-active"], ["role", "option", 1, "kpt-map-search__option", 3, "mousedown", "mouseenter", "id"], ["aria-hidden", "true", 1, "kpt-map-search__pin"], ["name", "map-pin"], [1, "kpt-map-search__label"]], template: function KptMapSearch_Template(rf, ctx) { if (rf & 1) {
|
|
1608
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "span", 2);
|
|
1609
|
+
i0.ɵɵelement(2, "kpt-icon", 3);
|
|
1591
1610
|
i0.ɵɵelementEnd();
|
|
1592
|
-
i0.ɵɵelementStart(3, "input",
|
|
1611
|
+
i0.ɵɵelementStart(3, "input", 4, 0);
|
|
1593
1612
|
i0.ɵɵlistener("input", function KptMapSearch_Template_input_input_3_listener($event) { return ctx.onInput($event); })("focus", function KptMapSearch_Template_input_focus_3_listener() { return ctx.onFocus(); })("blur", function KptMapSearch_Template_input_blur_3_listener() { return ctx.onBlur(); })("keydown", function KptMapSearch_Template_input_keydown_3_listener($event) { return ctx.onKeydown($event); });
|
|
1594
1613
|
i0.ɵɵelementEnd();
|
|
1595
|
-
i0.ɵɵconditionalCreate(
|
|
1614
|
+
i0.ɵɵconditionalCreate(5, KptMapSearch_Conditional_5_Template, 2, 2, "button", 5);
|
|
1615
|
+
i0.ɵɵconditionalCreate(6, KptMapSearch_Conditional_6_Template, 1, 5, "kpt-speech-button", 6);
|
|
1596
1616
|
i0.ɵɵelementEnd();
|
|
1597
|
-
i0.ɵɵconditionalCreate(
|
|
1598
|
-
i0.ɵɵelementStart(
|
|
1599
|
-
i0.ɵɵtext(
|
|
1617
|
+
i0.ɵɵconditionalCreate(7, KptMapSearch_Conditional_7_Template, 5, 2, "div", 7);
|
|
1618
|
+
i0.ɵɵelementStart(8, "p", 8);
|
|
1619
|
+
i0.ɵɵtext(9);
|
|
1600
1620
|
i0.ɵɵelementEnd();
|
|
1601
1621
|
} if (rf & 2) {
|
|
1602
1622
|
i0.ɵɵadvance(3);
|
|
1603
1623
|
i0.ɵɵproperty("id", ctx.uid)("value", ctx.query())("placeholder", ctx.placeholderText())("disabled", ctx.disabled() || !ctx.canSearch());
|
|
1604
1624
|
i0.ɵɵattribute("aria-label", ctx.i18n.t("map.search.label"))("aria-expanded", ctx.hasPanel())("aria-busy", ctx.busy() ? "true" : null)("aria-controls", ctx.listShown() ? ctx.uid + "-list" : null)("aria-activedescendant", ctx.activeIndex() >= 0 ? ctx.optionId(ctx.activeIndex()) : null);
|
|
1625
|
+
i0.ɵɵadvance(2);
|
|
1626
|
+
i0.ɵɵconditional(ctx.query() ? 5 : -1);
|
|
1605
1627
|
i0.ɵɵadvance();
|
|
1606
|
-
i0.ɵɵconditional(ctx.
|
|
1628
|
+
i0.ɵɵconditional(ctx.speech() ? 6 : -1);
|
|
1607
1629
|
i0.ɵɵadvance();
|
|
1608
|
-
i0.ɵɵconditional(ctx.hasPanel() ?
|
|
1630
|
+
i0.ɵɵconditional(ctx.hasPanel() ? 7 : -1);
|
|
1609
1631
|
i0.ɵɵadvance(2);
|
|
1610
1632
|
i0.ɵɵtextInterpolate(ctx.status());
|
|
1611
|
-
} }, dependencies: [KptIcon], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map-search{position:relative;display:block;width:var(--%NS%kpt-map-search-width, 20rem);max-width:100%;font-size:var(--%NS%kpt-font-size-sm)}.kpt-map-search__field{display:flex;gap:var(--%NS%kpt-space-1);align-items:center;padding-inline:var(--%NS%kpt-space-2);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md);box-shadow:var(--%NS%kpt-elevation-1)}.kpt-map-search__field:focus-within{border-color:var(--%NS%kpt-color-border-strong);outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:1px}.kpt-map-search__icon{display:inline-flex;flex:none;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-search__input{min-width:0;flex:1 1 auto;padding:var(--%NS%kpt-space-2) 0;font:inherit;color:var(--%NS%kpt-color-on-surface);background:transparent;border:none}.kpt-map-search__input::placeholder{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-search__input:focus{outline:none}.kpt-map-search__input:disabled{color:var(--%NS%kpt-color-on-surface-muted);cursor:not-allowed}.kpt-map-search__clear{display:inline-flex;flex:none;align-items:center;justify-content:center;padding:var(--%NS%kpt-space-1);color:var(--%NS%kpt-color-on-surface-muted);cursor:pointer;background:transparent;border:none;border-radius:var(--%NS%kpt-radius-full)}.kpt-map-search__clear:hover{color:var(--%NS%kpt-color-on-surface);background:var(--%NS%kpt-color-surface-hover)}.kpt-map-search__clear:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:1px}.kpt-map-search__panel{position:absolute;top:calc(100% + var(--%NS%kpt-space-1));right:0;left:0;z-index:1;max-height:var(--%NS%kpt-map-search-panel-max-height, 18rem);overflow-y:auto;background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md);box-shadow:var(--%NS%kpt-elevation-3)}.kpt-map-search__list{margin:0;padding:var(--%NS%kpt-space-1);list-style:none}.kpt-map-search__option{display:flex;gap:var(--%NS%kpt-space-2);align-items:start;padding:var(--%NS%kpt-space-2);color:var(--%NS%kpt-color-on-surface);cursor:pointer;border-radius:var(--%NS%kpt-radius-sm)}.kpt-map-search__option.is-active{background:var(--%NS%kpt-color-surface-hover)}.kpt-map-search__pin{display:inline-flex;flex:none;margin-top:.125rem;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-search__label{overflow-wrap:anywhere}.kpt-map-search__note{margin:0;padding:var(--%NS%kpt-space-3);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-search__status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}\n"], encapsulation: 2 }); }
|
|
1633
|
+
} }, dependencies: [KptIcon, KptSpeechButton], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map-search{position:relative;display:block;width:var(--%NS%kpt-map-search-width, 20rem);max-width:100%;font-size:var(--%NS%kpt-font-size-sm)}.kpt-map-search__field{display:flex;gap:var(--%NS%kpt-space-1);align-items:center;padding-inline:var(--%NS%kpt-space-2);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md);box-shadow:var(--%NS%kpt-elevation-1)}.kpt-map-search__field:focus-within{border-color:var(--%NS%kpt-color-border-strong);outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:1px}.kpt-map-search__icon{display:inline-flex;flex:none;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-search__input{min-width:0;flex:1 1 auto;padding:var(--%NS%kpt-space-2) 0;font:inherit;color:var(--%NS%kpt-color-on-surface);background:transparent;border:none}.kpt-map-search__input::placeholder{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-search__input:focus{outline:none}.kpt-map-search__input:disabled{color:var(--%NS%kpt-color-on-surface-muted);cursor:not-allowed}.kpt-map-search__speech{flex:none;gap:var(--%NS%kpt-space-1)}.kpt-map-search__clear{display:inline-flex;flex:none;align-items:center;justify-content:center;padding:var(--%NS%kpt-space-1);color:var(--%NS%kpt-color-on-surface-muted);cursor:pointer;background:transparent;border:none;border-radius:var(--%NS%kpt-radius-full)}.kpt-map-search__clear:hover{color:var(--%NS%kpt-color-on-surface);background:var(--%NS%kpt-color-surface-hover)}.kpt-map-search__clear:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:1px}.kpt-map-search__panel{position:absolute;top:calc(100% + var(--%NS%kpt-space-1));right:0;left:0;z-index:1;max-height:var(--%NS%kpt-map-search-panel-max-height, 18rem);overflow-y:auto;background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md);box-shadow:var(--%NS%kpt-elevation-3)}.kpt-map-search__list{margin:0;padding:var(--%NS%kpt-space-1);list-style:none}.kpt-map-search__option{display:flex;gap:var(--%NS%kpt-space-2);align-items:start;padding:var(--%NS%kpt-space-2);color:var(--%NS%kpt-color-on-surface);cursor:pointer;border-radius:var(--%NS%kpt-radius-sm)}.kpt-map-search__option.is-active{background:var(--%NS%kpt-color-surface-hover)}.kpt-map-search__pin{display:inline-flex;flex:none;margin-top:.125rem;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-search__label{overflow-wrap:anywhere}.kpt-map-search__note{margin:0;padding:var(--%NS%kpt-space-3);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-search__status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}\n"], encapsulation: 2 }); }
|
|
1612
1634
|
}
|
|
1613
1635
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptMapSearch, [{
|
|
1614
1636
|
type: Component,
|
|
1615
|
-
args: [{ selector: 'kpt-map-search', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon], host: { class: 'kpt-map-search' }, template: "<div class=\"kpt-map-search__field\">\n <span class=\"kpt-map-search__icon\" aria-hidden=\"true\">\n <kpt-icon name=\"search\" />\n </span>\n\n <input\n class=\"kpt-map-search__input\"\n type=\"text\"\n autocomplete=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [id]=\"uid\"\n [value]=\"query()\"\n [placeholder]=\"placeholderText()\"\n [disabled]=\"disabled() || !canSearch()\"\n [attr.aria-label]=\"i18n.t('map.search.label')\"\n [attr.aria-expanded]=\"hasPanel()\"\n [attr.aria-busy]=\"busy() ? 'true' : null\"\n [attr.aria-controls]=\"listShown() ? uid + '-list' : null\"\n [attr.aria-activedescendant]=\"activeIndex() >= 0 ? optionId(activeIndex()) : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n\n @if (query()) {\n <button\n class=\"kpt-map-search__clear\"\n type=\"button\"\n [attr.aria-label]=\"i18n.t('map.search.clear')\"\n [title]=\"i18n.t('map.search.clear')\"\n (click)=\"clear()\"\n >\n <!-- `kpt-icon` sam ustawia sobie aria-hidden; nazw\u0119 niesie aria-label przycisku. -->\n <kpt-icon name=\"x\" />\n </button>\n }\n</div>\n\n@if (hasPanel()) {\n <div class=\"kpt-map-search__panel\" [id]=\"uid + '-panel'\">\n @if (tooShort()) {\n <p class=\"kpt-map-search__note\">{{ i18n.t('map.search.minLength', { count: minLength() }) }}</p>\n } @else if (busy()) {\n <!-- Ta sama nota dla listy i dla doci\u0105gania wsp\u00F3\u0142rz\u0119dnych wybranej pozycji. -->\n <p class=\"kpt-map-search__note\">{{ i18n.t('map.search.searching') }}</p>\n } @else if (results().length) {\n <!-- Panel stoi w DOM obok pola, wi\u0119c aktywn\u0105 pozycj\u0119 wskazuje `aria-activedescendant`. -->\n <ul class=\"kpt-map-search__list\" [id]=\"uid + '-list'\" role=\"listbox\" [attr.aria-label]=\"i18n.t('map.search.results')\">\n @for (result of results(); track result.id; let i = $index) {\n <li\n class=\"kpt-map-search__option\"\n role=\"option\"\n [id]=\"optionId(i)\"\n [class.is-active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"i === activeIndex()\"\n (mousedown)=\"$event.preventDefault(); pick(result)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n <span class=\"kpt-map-search__pin\" aria-hidden=\"true\">\n <kpt-icon name=\"map-pin\" />\n </span>\n <span class=\"kpt-map-search__label\">{{ result.label }}</span>\n </li>\n }\n </ul>\n } @else {\n <p class=\"kpt-map-search__note\">{{ i18n.t('map.search.noResults') }}</p>\n }\n </div>\n}\n\n<!-- Stan wyszukiwania dla czytnika
|
|
1616
|
-
}], () => [], { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: false }] }], countryCodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "countryCodes", required: false }] }], viewbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewbox", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], geocoder: [{ type: i0.Input, args: [{ isSignal: true, alias: "geocoder", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], cleared: [{ type: i0.Output, args: ["cleared"] }] }); })();
|
|
1637
|
+
args: [{ selector: 'kpt-map-search', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon, KptSpeechButton], host: { class: 'kpt-map-search' }, template: "<div class=\"kpt-map-search__field\">\n <span class=\"kpt-map-search__icon\" aria-hidden=\"true\">\n <kpt-icon name=\"search\" />\n </span>\n\n <input\n #fieldEl\n class=\"kpt-map-search__input\"\n type=\"text\"\n autocomplete=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [id]=\"uid\"\n [value]=\"query()\"\n [placeholder]=\"placeholderText()\"\n [disabled]=\"disabled() || !canSearch()\"\n [attr.aria-label]=\"i18n.t('map.search.label')\"\n [attr.aria-expanded]=\"hasPanel()\"\n [attr.aria-busy]=\"busy() ? 'true' : null\"\n [attr.aria-controls]=\"listShown() ? uid + '-list' : null\"\n [attr.aria-activedescendant]=\"activeIndex() >= 0 ? optionId(activeIndex()) : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n\n @if (query()) {\n <button\n class=\"kpt-map-search__clear\"\n type=\"button\"\n [attr.aria-label]=\"i18n.t('map.search.clear')\"\n [title]=\"i18n.t('map.search.clear')\"\n (click)=\"clear()\"\n >\n <!-- `kpt-icon` sam ustawia sobie aria-hidden; nazw\u0119 niesie aria-label przycisku. -->\n <kpt-icon name=\"x\" />\n </button>\n }\n\n @if (speech()) {\n <!-- Wyszukiwanie g\u0142osem: pole czy\u015Bci si\u0119 po klikni\u0119ciu, a fraza wchodzi przez (input). -->\n <kpt-speech-button\n class=\"kpt-map-search__speech\"\n size=\"sm\"\n unsupported=\"hide\"\n mode=\"replace\"\n [continuous]=\"false\"\n [target]=\"fieldEl\"\n [lang]=\"speechLang()\"\n [listeningColor]=\"speechColor()\"\n [disabled]=\"disabled() || !canSearch()\"\n />\n }\n</div>\n\n@if (hasPanel()) {\n <div class=\"kpt-map-search__panel\" [id]=\"uid + '-panel'\">\n @if (tooShort()) {\n <p class=\"kpt-map-search__note\">{{ i18n.t('map.search.minLength', { count: minLength() }) }}</p>\n } @else if (busy()) {\n <!-- Ta sama nota dla listy i dla doci\u0105gania wsp\u00F3\u0142rz\u0119dnych wybranej pozycji. -->\n <p class=\"kpt-map-search__note\">{{ i18n.t('map.search.searching') }}</p>\n } @else if (results().length) {\n <!-- Panel stoi w DOM obok pola, wi\u0119c aktywn\u0105 pozycj\u0119 wskazuje `aria-activedescendant`. -->\n <ul class=\"kpt-map-search__list\" [id]=\"uid + '-list'\" role=\"listbox\" [attr.aria-label]=\"i18n.t('map.search.results')\">\n @for (result of results(); track result.id; let i = $index) {\n <li\n class=\"kpt-map-search__option\"\n role=\"option\"\n [id]=\"optionId(i)\"\n [class.is-active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"i === activeIndex()\"\n (mousedown)=\"$event.preventDefault(); pick(result)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n <span class=\"kpt-map-search__pin\" aria-hidden=\"true\">\n <kpt-icon name=\"map-pin\" />\n </span>\n <span class=\"kpt-map-search__label\">{{ result.label }}</span>\n </li>\n }\n </ul>\n } @else {\n <p class=\"kpt-map-search__note\">{{ i18n.t('map.search.noResults') }}</p>\n }\n </div>\n}\n\n<!-- Stan wyszukiwania dla czytnika - wzrokowo niesie go panel. -->\n<p class=\"kpt-map-search__status\" aria-live=\"polite\">{{ status() }}</p>\n", styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map-search{position:relative;display:block;width:var(--kpt-map-search-width, 20rem);max-width:100%;font-size:var(--kpt-font-size-sm)}.kpt-map-search__field{display:flex;gap:var(--kpt-space-1);align-items:center;padding-inline:var(--kpt-space-2);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md);box-shadow:var(--kpt-elevation-1)}.kpt-map-search__field:focus-within{border-color:var(--kpt-color-border-strong);outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:1px}.kpt-map-search__icon{display:inline-flex;flex:none;color:var(--kpt-color-on-surface-muted)}.kpt-map-search__input{min-width:0;flex:1 1 auto;padding:var(--kpt-space-2) 0;font:inherit;color:var(--kpt-color-on-surface);background:transparent;border:none}.kpt-map-search__input::placeholder{color:var(--kpt-color-on-surface-muted)}.kpt-map-search__input:focus{outline:none}.kpt-map-search__input:disabled{color:var(--kpt-color-on-surface-muted);cursor:not-allowed}.kpt-map-search__speech{flex:none;gap:var(--kpt-space-1)}.kpt-map-search__clear{display:inline-flex;flex:none;align-items:center;justify-content:center;padding:var(--kpt-space-1);color:var(--kpt-color-on-surface-muted);cursor:pointer;background:transparent;border:none;border-radius:var(--kpt-radius-full)}.kpt-map-search__clear:hover{color:var(--kpt-color-on-surface);background:var(--kpt-color-surface-hover)}.kpt-map-search__clear:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:1px}.kpt-map-search__panel{position:absolute;top:calc(100% + var(--kpt-space-1));right:0;left:0;z-index:1;max-height:var(--kpt-map-search-panel-max-height, 18rem);overflow-y:auto;background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md);box-shadow:var(--kpt-elevation-3)}.kpt-map-search__list{margin:0;padding:var(--kpt-space-1);list-style:none}.kpt-map-search__option{display:flex;gap:var(--kpt-space-2);align-items:start;padding:var(--kpt-space-2);color:var(--kpt-color-on-surface);cursor:pointer;border-radius:var(--kpt-radius-sm)}.kpt-map-search__option.is-active{background:var(--kpt-color-surface-hover)}.kpt-map-search__pin{display:inline-flex;flex:none;margin-top:.125rem;color:var(--kpt-color-on-surface-muted)}.kpt-map-search__label{overflow-wrap:anywhere}.kpt-map-search__note{margin:0;padding:var(--kpt-space-3);color:var(--kpt-color-on-surface-muted)}.kpt-map-search__status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}\n"] }]
|
|
1638
|
+
}], () => [], { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: false }] }], countryCodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "countryCodes", required: false }] }], viewbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewbox", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], speech: [{ type: i0.Input, args: [{ isSignal: true, alias: "speech", required: false }] }], speechLang: [{ type: i0.Input, args: [{ isSignal: true, alias: "speechLang", required: false }] }], speechColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "speechColor", required: false }] }], geocoder: [{ type: i0.Input, args: [{ isSignal: true, alias: "geocoder", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], cleared: [{ type: i0.Output, args: ["cleared"] }] }); })();
|
|
1617
1639
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptMapSearch, { className: "KptMapSearch", filePath: "lib/map-search.component.ts", lineNumber: 49 }); })();
|
|
1618
1640
|
|
|
1619
1641
|
/**
|
|
@@ -1622,7 +1644,7 @@ class KptMapSearch {
|
|
|
1622
1644
|
*
|
|
1623
1645
|
* Typ `data` domyślnie jest luźny (jak `let-row` w tabeli CDK), bo Angular nie potrafi
|
|
1624
1646
|
* przenieść generyka z `kpt-map` na dyrektywę osadzoną w jego treści. Kto chce pełnego
|
|
1625
|
-
* wnioskowania, wiąże `[kptMapPopupTypeFor]` z tą samą tablicą, którą karmi mapę
|
|
1647
|
+
* wnioskowania, wiąże `[kptMapPopupTypeFor]` z tą samą tablicą, którą karmi mapę -
|
|
1626
1648
|
* wtedy `data` dostaje konkretny typ.
|
|
1627
1649
|
*
|
|
1628
1650
|
* @example
|
|
@@ -1646,7 +1668,7 @@ class KptMapPopupTemplate {
|
|
|
1646
1668
|
this.category = input('', /* @ts-ignore */
|
|
1647
1669
|
...(ngDevMode ? [{ debugName: "category" }] : /* istanbul ignore next */ []));
|
|
1648
1670
|
/**
|
|
1649
|
-
* Nośnik typu
|
|
1671
|
+
* Nośnik typu - w runtime nieużywany. Jedyne zadanie: pozwolić Angularowi wywnioskować
|
|
1650
1672
|
* `T` z tablicy lokalizacji, tak jak `ngFor` wnioskuje typ elementu z bindowanej kolekcji.
|
|
1651
1673
|
*/
|
|
1652
1674
|
this.typeFor = input(undefined, { ...(ngDevMode ? { debugName: "typeFor" } : /* istanbul ignore next */ {}),
|
|
@@ -1667,7 +1689,7 @@ class KptMapPopupTemplate {
|
|
|
1667
1689
|
args: [{ selector: 'ng-template[kptMapPopup]' }]
|
|
1668
1690
|
}], null, { category: [{ type: i0.Input, args: [{ isSignal: true, alias: "category", required: false }] }], typeFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptMapPopupTypeFor", required: false }] }] }); })();
|
|
1669
1691
|
/**
|
|
1670
|
-
* Własny formularz
|
|
1692
|
+
* Własny formularz "dodaj lokalizację". Jego obecność wyłącza formularz budowany
|
|
1671
1693
|
* ze schemy kategorii.
|
|
1672
1694
|
*
|
|
1673
1695
|
* @example
|
|
@@ -1691,7 +1713,7 @@ class KptMapCreateFormTemplate {
|
|
|
1691
1713
|
}], null, null); })();
|
|
1692
1714
|
|
|
1693
1715
|
const KPT_MAP_GEOLOCATION = new InjectionToken('KPT_MAP_GEOLOCATION');
|
|
1694
|
-
/** Błąd geolokalizacji rozpoznany po kodzie
|
|
1716
|
+
/** Błąd geolokalizacji rozpoznany po kodzie - rzucany strumieniem, nie wyjątkiem. */
|
|
1695
1717
|
class KptMapGeolocationFailure extends Error {
|
|
1696
1718
|
constructor(detail) {
|
|
1697
1719
|
super(detail.message);
|
|
@@ -1701,7 +1723,7 @@ class KptMapGeolocationFailure extends Error {
|
|
|
1701
1723
|
}
|
|
1702
1724
|
const DEFAULT_OPTIONS = {
|
|
1703
1725
|
enableHighAccuracy: true,
|
|
1704
|
-
// Pozycja starsza niż pół minuty jest już bezużyteczna dla
|
|
1726
|
+
// Pozycja starsza niż pół minuty jest już bezużyteczna dla "gdzie jestem".
|
|
1705
1727
|
maximumAge: 30_000,
|
|
1706
1728
|
timeout: 15_000,
|
|
1707
1729
|
};
|
|
@@ -1709,7 +1731,7 @@ const DEFAULT_OPTIONS = {
|
|
|
1709
1731
|
* Domyślna implementacja na `navigator.geolocation.watchPosition`.
|
|
1710
1732
|
*
|
|
1711
1733
|
* Uwaga: Geolocation API działa wyłącznie w bezpiecznym kontekście (HTTPS albo
|
|
1712
|
-
* `localhost`). Na `http://` z adresem IP przeglądarka odmówi
|
|
1734
|
+
* `localhost`). Na `http://` z adresem IP przeglądarka odmówi - to nie jest błąd mapy.
|
|
1713
1735
|
*/
|
|
1714
1736
|
class KptBrowserGeolocation {
|
|
1715
1737
|
watch(options) {
|
|
@@ -1739,7 +1761,7 @@ function describeError(error) {
|
|
|
1739
1761
|
return { kind: 'unsupported', message: error.message };
|
|
1740
1762
|
}
|
|
1741
1763
|
}
|
|
1742
|
-
/** Stała pozycja
|
|
1764
|
+
/** Stała pozycja - Storybook, testy, demo bez pytania o zgodę. */
|
|
1743
1765
|
class KptMapGeolocationStub {
|
|
1744
1766
|
constructor(at, accuracy = 50) {
|
|
1745
1767
|
this.at = at;
|
|
@@ -1760,7 +1782,7 @@ function provideKptMapGeolocationStub(at, accuracy = 50) {
|
|
|
1760
1782
|
}
|
|
1761
1783
|
|
|
1762
1784
|
/**
|
|
1763
|
-
* Fabryka silnika mapy. Fabryka, a nie gotowa instancja
|
|
1785
|
+
* Fabryka silnika mapy. Fabryka, a nie gotowa instancja - każda mapa na stronie
|
|
1764
1786
|
* potrzebuje własnego obiektu, a provider jest jeden.
|
|
1765
1787
|
*/
|
|
1766
1788
|
const KPT_MAP_ENGINE = new InjectionToken('KPT_MAP_ENGINE');
|
|
@@ -1775,14 +1797,14 @@ const KPT_MAP_ENGINE = new InjectionToken('KPT_MAP_ENGINE');
|
|
|
1775
1797
|
function provideKptLeafletMap(options = {}) {
|
|
1776
1798
|
return [
|
|
1777
1799
|
{ provide: KPT_MAP_ENGINE, useValue: () => createLeafletEngine(options) },
|
|
1778
|
-
// Nadpisywalne
|
|
1800
|
+
// Nadpisywalne - wystarczy podać własny provider PO tym.
|
|
1779
1801
|
{ provide: KPT_MAP_GEOLOCATION, useClass: KptBrowserGeolocation },
|
|
1780
1802
|
];
|
|
1781
1803
|
}
|
|
1782
1804
|
/**
|
|
1783
|
-
* Silnik Google Maps. Nie wymaga żadnej paczki npm
|
|
1784
|
-
* mapie
|
|
1785
|
-
* (*Map management
|
|
1805
|
+
* Silnik Google Maps. Nie wymaga żadnej paczki npm - API dogrywa się skryptem przy pierwszej
|
|
1806
|
+
* mapie - ale wymaga klucza, konta rozliczeniowego i **`mapId`** z konsoli Google
|
|
1807
|
+
* (*Map management -> Create Map ID*): bez niego znaczniki się nie pojawią.
|
|
1786
1808
|
*
|
|
1787
1809
|
* Różnice wobec Leafleta: `[tileUrl]` i `[attribution]` są bez znaczenia (kafle i atrybucję
|
|
1788
1810
|
* dostarcza Google i nie wolno ich zasłonić), wczytanie mapy liczy się do SKU Dynamic Maps
|
|
@@ -1808,32 +1830,32 @@ const _c1 = ["popupEl"];
|
|
|
1808
1830
|
const _c2 = (a0, a1, a2, a3, a4) => ({ $implicit: a0, data: a1, category: a2, distance: a3, close: a4 });
|
|
1809
1831
|
const _c3 = (a0, a1, a2) => ({ $implicit: a0, at: a1, category: a2 });
|
|
1810
1832
|
const _forTrack0$1 = ($index, $item) => $item.id;
|
|
1811
|
-
function
|
|
1833
|
+
function KptMap_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
1812
1834
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
1813
|
-
i0.ɵɵelementStart(0, "button",
|
|
1814
|
-
i0.ɵɵlistener("click", function
|
|
1815
|
-
i0.ɵɵelement(1, "span",
|
|
1835
|
+
i0.ɵɵelementStart(0, "button", 12);
|
|
1836
|
+
i0.ɵɵlistener("click", function KptMap_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.centreOnUser()); });
|
|
1837
|
+
i0.ɵɵelement(1, "span", 13);
|
|
1816
1838
|
i0.ɵɵelementEnd();
|
|
1817
1839
|
} if (rf & 2) {
|
|
1818
1840
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
1819
1841
|
i0.ɵɵproperty("title", ctx_r2.locationBlocked() ? ctx_r2.i18n.t("map.locationDenied") : ctx_r2.i18n.t("map.locateMe"))("disabled", !ctx_r2.userPosition());
|
|
1820
1842
|
i0.ɵɵattribute("aria-label", ctx_r2.locationBlocked() ? ctx_r2.i18n.t("map.locationDenied") : ctx_r2.i18n.t("map.locateMe"));
|
|
1821
1843
|
} }
|
|
1822
|
-
function
|
|
1844
|
+
function KptMap_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
1823
1845
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
1824
|
-
i0.ɵɵelementStart(0, "div",
|
|
1825
|
-
i0.ɵɵlistener("selected", function
|
|
1846
|
+
i0.ɵɵelementStart(0, "div", 9)(1, "kpt-map-search", 14);
|
|
1847
|
+
i0.ɵɵlistener("selected", function KptMap_Conditional_9_Template_kpt_map_search_selected_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSearchSelect($event)); })("cleared", function KptMap_Conditional_9_Template_kpt_map_search_cleared_1_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.clearSearchPin()); });
|
|
1826
1848
|
i0.ɵɵelementEnd()();
|
|
1827
1849
|
} if (rf & 2) {
|
|
1828
1850
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
1829
1851
|
i0.ɵɵadvance();
|
|
1830
|
-
i0.ɵɵproperty("geocoder", ctx_r2.activeGeocoder())("placeholder", ctx_r2.searchPlaceholder())("minLength", ctx_r2.searchOptions().minLength ?? 3)("debounce", ctx_r2.searchOptions().debounce ?? 300)("limit", ctx_r2.searchOptions().limit ?? 5)("viewbox", ctx_r2.searchViewbox())("countryCodes", ctx_r2.searchCountryCodes());
|
|
1852
|
+
i0.ɵɵproperty("geocoder", ctx_r2.activeGeocoder())("placeholder", ctx_r2.searchPlaceholder())("minLength", ctx_r2.searchOptions().minLength ?? 3)("debounce", ctx_r2.searchOptions().debounce ?? 300)("limit", ctx_r2.searchOptions().limit ?? 5)("viewbox", ctx_r2.searchViewbox())("countryCodes", ctx_r2.searchCountryCodes())("speech", ctx_r2.searchSpeech())("speechLang", ctx_r2.searchSpeechLang())("speechColor", ctx_r2.searchSpeechColor());
|
|
1831
1853
|
} }
|
|
1832
|
-
function
|
|
1854
|
+
function KptMap_Conditional_10_Conditional_0_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
1833
1855
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
1834
|
-
i0.ɵɵelementStart(0, "button",
|
|
1835
|
-
i0.ɵɵlistener("click", function
|
|
1836
|
-
i0.ɵɵelement(1, "span",
|
|
1856
|
+
i0.ɵɵelementStart(0, "button", 20);
|
|
1857
|
+
i0.ɵɵlistener("click", function KptMap_Conditional_10_Conditional_0_For_4_Template_button_click_0_listener() { const category_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.startCreate(category_r6)); });
|
|
1858
|
+
i0.ɵɵelement(1, "span", 21);
|
|
1837
1859
|
i0.ɵɵtext(2);
|
|
1838
1860
|
i0.ɵɵelementEnd();
|
|
1839
1861
|
} if (rf & 2) {
|
|
@@ -1841,8 +1863,8 @@ function KptMap_Conditional_12_Conditional_0_For_4_Template(rf, ctx) { if (rf &
|
|
|
1841
1863
|
i0.ɵɵadvance(2);
|
|
1842
1864
|
i0.ɵɵtextInterpolate1(" ", category_r6.label, " ");
|
|
1843
1865
|
} }
|
|
1844
|
-
function
|
|
1845
|
-
i0.ɵɵelementStart(0, "p",
|
|
1866
|
+
function KptMap_Conditional_10_Conditional_0_ForEmpty_5_Template(rf, ctx) { if (rf & 1) {
|
|
1867
|
+
i0.ɵɵelementStart(0, "p", 19);
|
|
1846
1868
|
i0.ɵɵtext(1);
|
|
1847
1869
|
i0.ɵɵelementEnd();
|
|
1848
1870
|
} if (rf & 2) {
|
|
@@ -1850,11 +1872,11 @@ function KptMap_Conditional_12_Conditional_0_ForEmpty_5_Template(rf, ctx) { if (
|
|
|
1850
1872
|
i0.ɵɵadvance();
|
|
1851
1873
|
i0.ɵɵtextInterpolate(ctx_r2.i18n.t("map.empty"));
|
|
1852
1874
|
} }
|
|
1853
|
-
function
|
|
1854
|
-
i0.ɵɵelementStart(0, "div",
|
|
1875
|
+
function KptMap_Conditional_10_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
1876
|
+
i0.ɵɵelementStart(0, "div", 16)(1, "p", 17);
|
|
1855
1877
|
i0.ɵɵtext(2);
|
|
1856
1878
|
i0.ɵɵelementEnd();
|
|
1857
|
-
i0.ɵɵrepeaterCreate(3,
|
|
1879
|
+
i0.ɵɵrepeaterCreate(3, KptMap_Conditional_10_Conditional_0_For_4_Template, 3, 1, "button", 18, _forTrack0$1, false, KptMap_Conditional_10_Conditional_0_ForEmpty_5_Template, 2, 1, "p", 19);
|
|
1858
1880
|
i0.ɵɵelementEnd();
|
|
1859
1881
|
} if (rf & 2) {
|
|
1860
1882
|
const position_r7 = ctx;
|
|
@@ -1866,28 +1888,28 @@ function KptMap_Conditional_12_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
1866
1888
|
i0.ɵɵadvance();
|
|
1867
1889
|
i0.ɵɵrepeater(ctx_r2.creatableCategories());
|
|
1868
1890
|
} }
|
|
1869
|
-
function
|
|
1870
|
-
i0.ɵɵconditionalCreate(0,
|
|
1891
|
+
function KptMap_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
1892
|
+
i0.ɵɵconditionalCreate(0, KptMap_Conditional_10_Conditional_0_Template, 6, 7, "div", 15);
|
|
1871
1893
|
} if (rf & 2) {
|
|
1872
1894
|
let tmp_2_0;
|
|
1873
1895
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
1874
1896
|
i0.ɵɵconditional((tmp_2_0 = ctx_r2.contextPosition()) ? 0 : -1, tmp_2_0);
|
|
1875
1897
|
} }
|
|
1876
|
-
function
|
|
1898
|
+
function KptMap_Conditional_11_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1877
1899
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
1878
|
-
i0.ɵɵelementStart(0, "button",
|
|
1879
|
-
i0.ɵɵlistener("click", function
|
|
1880
|
-
i0.ɵɵelementStart(1, "span",
|
|
1881
|
-
i0.ɵɵtext(2, "
|
|
1900
|
+
i0.ɵɵelementStart(0, "button", 27);
|
|
1901
|
+
i0.ɵɵlistener("click", function KptMap_Conditional_11_Conditional_0_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.closePopup()); });
|
|
1902
|
+
i0.ɵɵelementStart(1, "span", 28);
|
|
1903
|
+
i0.ɵɵtext(2, "x");
|
|
1882
1904
|
i0.ɵɵelementEnd()();
|
|
1883
1905
|
} if (rf & 2) {
|
|
1884
1906
|
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
1885
1907
|
i0.ɵɵattribute("aria-label", ctx_r2.i18n.t("common.close"));
|
|
1886
1908
|
} }
|
|
1887
|
-
function
|
|
1909
|
+
function KptMap_Conditional_11_Conditional_0_Conditional_3_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
1888
1910
|
const _r9 = i0.ɵɵgetCurrentView();
|
|
1889
|
-
i0.ɵɵelementStart(0, "button",
|
|
1890
|
-
i0.ɵɵlistener("click", function
|
|
1911
|
+
i0.ɵɵelementStart(0, "button", 32);
|
|
1912
|
+
i0.ɵɵlistener("click", function KptMap_Conditional_11_Conditional_0_Conditional_3_For_4_Template_button_click_0_listener() { const item_r10 = i0.ɵɵrestoreView(_r9).$implicit; const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.selectFromGroup(item_r10)); });
|
|
1891
1913
|
i0.ɵɵtext(1);
|
|
1892
1914
|
i0.ɵɵelementEnd();
|
|
1893
1915
|
} if (rf & 2) {
|
|
@@ -1897,12 +1919,12 @@ function KptMap_Conditional_13_Conditional_0_Conditional_3_For_4_Template(rf, ct
|
|
|
1897
1919
|
i0.ɵɵadvance();
|
|
1898
1920
|
i0.ɵɵtextInterpolate1(" ", item_r10.title, " ");
|
|
1899
1921
|
} }
|
|
1900
|
-
function
|
|
1901
|
-
i0.ɵɵelementStart(0, "p",
|
|
1922
|
+
function KptMap_Conditional_11_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
1923
|
+
i0.ɵɵelementStart(0, "p", 29);
|
|
1902
1924
|
i0.ɵɵtext(1);
|
|
1903
1925
|
i0.ɵɵelementEnd();
|
|
1904
|
-
i0.ɵɵelementStart(2, "div",
|
|
1905
|
-
i0.ɵɵrepeaterCreate(3,
|
|
1926
|
+
i0.ɵɵelementStart(2, "div", 30);
|
|
1927
|
+
i0.ɵɵrepeaterCreate(3, KptMap_Conditional_11_Conditional_0_Conditional_3_For_4_Template, 2, 2, "button", 31, _forTrack0$1);
|
|
1906
1928
|
i0.ɵɵelementEnd();
|
|
1907
1929
|
} if (rf & 2) {
|
|
1908
1930
|
const state_r11 = i0.ɵɵnextContext(2);
|
|
@@ -1912,26 +1934,26 @@ function KptMap_Conditional_13_Conditional_0_Conditional_3_Template(rf, ctx) { i
|
|
|
1912
1934
|
i0.ɵɵadvance(2);
|
|
1913
1935
|
i0.ɵɵrepeater(state_r11.group.items);
|
|
1914
1936
|
} }
|
|
1915
|
-
function
|
|
1916
|
-
i0.ɵɵelementContainer(0,
|
|
1937
|
+
function KptMap_Conditional_11_Conditional_0_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
1938
|
+
i0.ɵɵelementContainer(0, 26);
|
|
1917
1939
|
} if (rf & 2) {
|
|
1918
1940
|
const state_r11 = i0.ɵɵnextContext(2);
|
|
1919
1941
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
1920
1942
|
i0.ɵɵproperty("ngTemplateOutlet", ctx.templateRef)("ngTemplateOutletContext", i0.ɵɵpureFunction5(2, _c2, state_r11.location, state_r11.location.data, ctx_r2.popupCategory(), ctx_r2.popupDistance(), ctx_r2.closePopupFn));
|
|
1921
1943
|
} }
|
|
1922
|
-
function
|
|
1923
|
-
i0.ɵɵelementStart(0, "p",
|
|
1944
|
+
function KptMap_Conditional_11_Conditional_0_Conditional_6_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1945
|
+
i0.ɵɵelementStart(0, "p", 34);
|
|
1924
1946
|
i0.ɵɵtext(1);
|
|
1925
1947
|
i0.ɵɵelementEnd();
|
|
1926
1948
|
} if (rf & 2) {
|
|
1927
1949
|
i0.ɵɵadvance();
|
|
1928
1950
|
i0.ɵɵtextInterpolate(ctx.label);
|
|
1929
1951
|
} }
|
|
1930
|
-
function
|
|
1931
|
-
i0.ɵɵelementStart(0, "strong",
|
|
1952
|
+
function KptMap_Conditional_11_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
1953
|
+
i0.ɵɵelementStart(0, "strong", 33);
|
|
1932
1954
|
i0.ɵɵtext(1);
|
|
1933
1955
|
i0.ɵɵelementEnd();
|
|
1934
|
-
i0.ɵɵconditionalCreate(2,
|
|
1956
|
+
i0.ɵɵconditionalCreate(2, KptMap_Conditional_11_Conditional_0_Conditional_6_Conditional_2_Template, 2, 1, "p", 34);
|
|
1935
1957
|
} if (rf & 2) {
|
|
1936
1958
|
let tmp_8_0;
|
|
1937
1959
|
const state_r11 = i0.ɵɵnextContext(2);
|
|
@@ -1941,12 +1963,12 @@ function KptMap_Conditional_13_Conditional_0_Conditional_6_Template(rf, ctx) { i
|
|
|
1941
1963
|
i0.ɵɵadvance();
|
|
1942
1964
|
i0.ɵɵconditional((tmp_8_0 = ctx_r2.popupCategory()) ? 2 : -1, tmp_8_0);
|
|
1943
1965
|
} }
|
|
1944
|
-
function
|
|
1945
|
-
i0.ɵɵelementStart(0, "div",
|
|
1946
|
-
i0.ɵɵconditionalCreate(2,
|
|
1947
|
-
i0.ɵɵconditionalCreate(3,
|
|
1948
|
-
i0.ɵɵelementStart(4, "div",
|
|
1949
|
-
i0.ɵɵconditionalCreate(5,
|
|
1966
|
+
function KptMap_Conditional_11_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
1967
|
+
i0.ɵɵelementStart(0, "div", 23, 1);
|
|
1968
|
+
i0.ɵɵconditionalCreate(2, KptMap_Conditional_11_Conditional_0_Conditional_2_Template, 3, 1, "button", 24);
|
|
1969
|
+
i0.ɵɵconditionalCreate(3, KptMap_Conditional_11_Conditional_0_Conditional_3_Template, 5, 1);
|
|
1970
|
+
i0.ɵɵelementStart(4, "div", 25);
|
|
1971
|
+
i0.ɵɵconditionalCreate(5, KptMap_Conditional_11_Conditional_0_Conditional_5_Template, 1, 8, "ng-container", 26)(6, KptMap_Conditional_11_Conditional_0_Conditional_6_Template, 3, 2);
|
|
1950
1972
|
i0.ɵɵelementEnd()();
|
|
1951
1973
|
} if (rf & 2) {
|
|
1952
1974
|
let tmp_12_0;
|
|
@@ -1962,17 +1984,17 @@ function KptMap_Conditional_13_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
1962
1984
|
i0.ɵɵadvance(2);
|
|
1963
1985
|
i0.ɵɵconditional((tmp_12_0 = ctx_r2.popupTemplate()) ? 5 : 6, tmp_12_0);
|
|
1964
1986
|
} }
|
|
1965
|
-
function
|
|
1966
|
-
i0.ɵɵconditionalCreate(0,
|
|
1987
|
+
function KptMap_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
1988
|
+
i0.ɵɵconditionalCreate(0, KptMap_Conditional_11_Conditional_0_Template, 7, 9, "div", 22);
|
|
1967
1989
|
} if (rf & 2) {
|
|
1968
1990
|
let tmp_3_0;
|
|
1969
1991
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
1970
1992
|
i0.ɵɵconditional((tmp_3_0 = ctx_r2.popupPosition()) ? 0 : -1, tmp_3_0);
|
|
1971
1993
|
} }
|
|
1972
|
-
function
|
|
1994
|
+
function KptMap_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
1973
1995
|
const _r13 = i0.ɵɵgetCurrentView();
|
|
1974
|
-
i0.ɵɵelementStart(0, "kpt-map-legend",
|
|
1975
|
-
i0.ɵɵtwoWayListener("hiddenChange", function
|
|
1996
|
+
i0.ɵɵelementStart(0, "kpt-map-legend", 35);
|
|
1997
|
+
i0.ɵɵtwoWayListener("hiddenChange", function KptMap_Conditional_12_Template_kpt_map_legend_hiddenChange_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.hiddenCategories, $event) || (ctx_r2.hiddenCategories = $event); return i0.ɵɵresetView($event); });
|
|
1976
1998
|
i0.ɵɵelementEnd();
|
|
1977
1999
|
} if (rf & 2) {
|
|
1978
2000
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
@@ -1980,38 +2002,38 @@ function KptMap_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
|
1980
2002
|
i0.ɵɵtwoWayProperty("hidden", ctx_r2.hiddenCategories);
|
|
1981
2003
|
i0.ɵɵproperty("counts", ctx_r2.counts());
|
|
1982
2004
|
} }
|
|
1983
|
-
function
|
|
1984
|
-
i0.ɵɵelementContainer(0,
|
|
2005
|
+
function KptMap_Conditional_14_Conditional_0_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
2006
|
+
i0.ɵɵelementContainer(0, 26);
|
|
1985
2007
|
} if (rf & 2) {
|
|
1986
2008
|
const tpl_r14 = i0.ɵɵnextContext();
|
|
1987
2009
|
const target_r15 = i0.ɵɵnextContext();
|
|
1988
2010
|
i0.ɵɵproperty("ngTemplateOutlet", tpl_r14.templateRef)("ngTemplateOutletContext", i0.ɵɵpureFunction3(2, _c3, ctx, target_r15.at, target_r15.category));
|
|
1989
2011
|
} }
|
|
1990
|
-
function
|
|
1991
|
-
i0.ɵɵconditionalCreate(0,
|
|
2012
|
+
function KptMap_Conditional_14_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
2013
|
+
i0.ɵɵconditionalCreate(0, KptMap_Conditional_14_Conditional_0_Conditional_0_Template, 1, 6, "ng-container", 26);
|
|
1992
2014
|
} if (rf & 2) {
|
|
1993
2015
|
let tmp_5_0;
|
|
1994
2016
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
1995
2017
|
i0.ɵɵconditional((tmp_5_0 = ctx_r2.createFormApi()) ? 0 : -1, tmp_5_0);
|
|
1996
2018
|
} }
|
|
1997
|
-
function
|
|
2019
|
+
function KptMap_Conditional_14_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
1998
2020
|
const _r16 = i0.ɵɵgetCurrentView();
|
|
1999
|
-
i0.ɵɵelementStart(0, "kpt-map-create-dialog",
|
|
2000
|
-
i0.ɵɵlistener("save", function
|
|
2021
|
+
i0.ɵɵelementStart(0, "kpt-map-create-dialog", 37);
|
|
2022
|
+
i0.ɵɵlistener("save", function KptMap_Conditional_14_Conditional_1_Template_kpt_map_create_dialog_save_0_listener($event) { i0.ɵɵrestoreView(_r16); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.emitCreate($event)); })("cancelled", function KptMap_Conditional_14_Conditional_1_Template_kpt_map_create_dialog_cancelled_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.closeCreate()); });
|
|
2001
2023
|
i0.ɵɵelementEnd();
|
|
2002
2024
|
} if (rf & 2) {
|
|
2003
2025
|
const target_r15 = i0.ɵɵnextContext();
|
|
2004
2026
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
2005
2027
|
i0.ɵɵproperty("geocoder", ctx_r2.activeGeocoder())("category", target_r15.category)("at", target_r15.at);
|
|
2006
2028
|
} }
|
|
2007
|
-
function
|
|
2008
|
-
i0.ɵɵconditionalCreate(0,
|
|
2029
|
+
function KptMap_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
2030
|
+
i0.ɵɵconditionalCreate(0, KptMap_Conditional_14_Conditional_0_Template, 1, 1)(1, KptMap_Conditional_14_Conditional_1_Template, 1, 3, "kpt-map-create-dialog", 36);
|
|
2009
2031
|
} if (rf & 2) {
|
|
2010
2032
|
let tmp_3_0;
|
|
2011
2033
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
2012
2034
|
i0.ɵɵconditional((tmp_3_0 = ctx_r2.createFormTemplate()) ? 0 : 1, tmp_3_0);
|
|
2013
2035
|
} }
|
|
2014
|
-
/** Rozmiary ikon w pikselach
|
|
2036
|
+
/** Rozmiary ikon w pikselach - silnik potrzebuje ich do zakotwiczenia znacznika. */
|
|
2015
2037
|
const MARKER_SIZE = { width: 32, height: 42 };
|
|
2016
2038
|
const DOT_SIZE = { width: 24, height: 24 };
|
|
2017
2039
|
const CLUSTER_SIZE = { width: 44, height: 44 };
|
|
@@ -2019,13 +2041,13 @@ const CLUSTER_SIZE = { width: 44, height: 44 };
|
|
|
2019
2041
|
const FIT_PADDING = 48;
|
|
2020
2042
|
/**
|
|
2021
2043
|
* Identyfikator tymczasowej pinezki wyszukiwarki. Nie należy do `entries()`, więc
|
|
2022
|
-
* `onMarkerClick()` nie znajdzie dla niego wpisu i cicho wyjdzie
|
|
2044
|
+
* `onMarkerClick()` nie znajdzie dla niego wpisu i cicho wyjdzie - kliknięcie w wynik
|
|
2023
2045
|
* wyszukiwania niczego nie otwiera.
|
|
2024
2046
|
*/
|
|
2025
2047
|
const SEARCH_MARKER_ID = 'kpt-map:search';
|
|
2026
|
-
/** Brak silnika to najczęstsza pomyłka przy pierwszym użyciu
|
|
2027
|
-
const NO_ENGINE_ERROR = 'kpt-map: brak silnika mapy. Zarejestruj go w aplikacji
|
|
2028
|
-
'`provideKptLeafletMap()` albo `provideKptGoogleMap({ apiKey, mapId })`
|
|
2048
|
+
/** Brak silnika to najczęstsza pomyłka przy pierwszym użyciu - komunikat niesie instrukcję. */
|
|
2049
|
+
const NO_ENGINE_ERROR = 'kpt-map: brak silnika mapy. Zarejestruj go w aplikacji - ' +
|
|
2050
|
+
'`provideKptLeafletMap()` albo `provideKptGoogleMap({ apiKey, mapId })` - ' +
|
|
2029
2051
|
'albo podaj fabrykę wprost przez `[engine]`.';
|
|
2030
2052
|
/**
|
|
2031
2053
|
* Mapa z konfigurowalnymi znacznikami: kategorie z kolorem i ikoną, grupowanie z licznikiem,
|
|
@@ -2049,7 +2071,7 @@ class KptMap {
|
|
|
2049
2071
|
...(ngDevMode ? [{ debugName: "locations" }] : /* istanbul ignore next */ []));
|
|
2050
2072
|
this.categories = input.required(/* @ts-ignore */
|
|
2051
2073
|
...(ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []));
|
|
2052
|
-
/** Kod kraju z presetów (`PL`, `DE`, `EU
|
|
2074
|
+
/** Kod kraju z presetów (`PL`, `DE`, `EU`...). Nieznany kod cofa się do Polski. */
|
|
2053
2075
|
this.country = input('PL', /* @ts-ignore */
|
|
2054
2076
|
...(ngDevMode ? [{ debugName: "country" }] : /* istanbul ignore next */ []));
|
|
2055
2077
|
/** Jawny widok startowy; nadpisuje `country`. */
|
|
@@ -2068,7 +2090,7 @@ class KptMap {
|
|
|
2068
2090
|
...(ngDevMode ? [{ debugName: "clusterColorBy" }] : /* istanbul ignore next */ []));
|
|
2069
2091
|
/** Renderuje legendę pod mapą. Wyłącz, jeśli chcesz ją umieścić gdzie indziej. */
|
|
2070
2092
|
this.legend = input(true, { ...(ngDevMode ? { debugName: "legend" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2071
|
-
/** Identyfikatory ukrytych kategorii (dwukierunkowe)
|
|
2093
|
+
/** Identyfikatory ukrytych kategorii (dwukierunkowe) - legenda je przełącza. */
|
|
2072
2094
|
this.hiddenCategories = model([], /* @ts-ignore */
|
|
2073
2095
|
...(ngDevMode ? [{ debugName: "hiddenCategories" }] : /* istanbul ignore next */ []));
|
|
2074
2096
|
/** Pokazuje liczniki przy pozycjach legendy. */
|
|
@@ -2076,11 +2098,11 @@ class KptMap {
|
|
|
2076
2098
|
this.showUserLocation = input(false, { ...(ngDevMode ? { debugName: "showUserLocation" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2077
2099
|
/** Przy każdej nowej pozycji centruje mapę na użytkowniku. */
|
|
2078
2100
|
this.followUser = input(false, { ...(ngDevMode ? { debugName: "followUser" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2079
|
-
/** Włącza menu
|
|
2101
|
+
/** Włącza menu "Dodaj lokalizację" pod prawym przyciskiem myszy. */
|
|
2080
2102
|
this.allowCreate = input(false, { ...(ngDevMode ? { debugName: "allowCreate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2081
2103
|
/**
|
|
2082
2104
|
* Pokazuje wyszukiwarkę adresów w rogu mapy. Wymaga portu `KPT_MAP_GEOCODER`
|
|
2083
|
-
* **z metodą `search()`**
|
|
2105
|
+
* **z metodą `search()`** - bez niego pole się nie renderuje, bo biblioteka nie
|
|
2084
2106
|
* odpytuje cudzego serwera bez zgody aplikacji.
|
|
2085
2107
|
*/
|
|
2086
2108
|
this.search = input(false, { ...(ngDevMode ? { debugName: "search" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -2092,11 +2114,19 @@ class KptMap {
|
|
|
2092
2114
|
...(ngDevMode ? [{ debugName: "searchOptions" }] : /* istanbul ignore next */ []));
|
|
2093
2115
|
/**
|
|
2094
2116
|
* Zoom, na jaki mapa wchodzi po wybraniu wyniku bez własnego zasięgu (pojedynczy adres).
|
|
2095
|
-
* Wynik z zasięgiem
|
|
2117
|
+
* Wynik z zasięgiem - miasto, region - dostaje `fitBounds` zamiast tego.
|
|
2096
2118
|
*/
|
|
2097
2119
|
this.searchZoom = input(16, { ...(ngDevMode ? { debugName: "searchZoom" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
2098
2120
|
/** Zostawia tymczasową pinezkę w znalezionym punkcie. */
|
|
2099
2121
|
this.searchMarker = input(true, { ...(ngDevMode ? { debugName: "searchMarker" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2122
|
+
/** Mikrofon w wyszukiwarce - adres podyktowany zamiast wpisanego (patrz `kpt-map-search`). */
|
|
2123
|
+
this.searchSpeech = input(false, { ...(ngDevMode ? { debugName: "searchSpeech" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2124
|
+
/** Język dyktowania adresu (BCP 47); bez niego z języka interfejsu. */
|
|
2125
|
+
this.searchSpeechLang = input(null, /* @ts-ignore */
|
|
2126
|
+
...(ngDevMode ? [{ debugName: "searchSpeechLang" }] : /* istanbul ignore next */ []));
|
|
2127
|
+
/** Kolor "stop" i fali w trakcie nasłuchu; domyślnie kolor motywu. */
|
|
2128
|
+
this.searchSpeechColor = input('primary', /* @ts-ignore */
|
|
2129
|
+
...(ngDevMode ? [{ debugName: "searchSpeechColor" }] : /* istanbul ignore next */ []));
|
|
2100
2130
|
/**
|
|
2101
2131
|
* Wygląd popupu. `plain` to wąska ramka na treść tekstową (domyślna),
|
|
2102
2132
|
* `card` oddaje całą szerokość i wysokość karcie miejsca: bez paddingu,
|
|
@@ -2106,15 +2136,15 @@ class KptMap {
|
|
|
2106
2136
|
...(ngDevMode ? [{ debugName: "popupLayout" }] : /* istanbul ignore next */ []));
|
|
2107
2137
|
/**
|
|
2108
2138
|
* Punkt odniesienia dystansu podawanego szablonowi popupu jako `distance`.
|
|
2109
|
-
* `null` znaczy
|
|
2139
|
+
* `null` znaczy "pozycja użytkownika z `KPT_MAP_GEOLOCATION`", więc domyślnie
|
|
2110
2140
|
* jest to odległość od miejsca, w którym stoi patrzący. Aplikacja może podstawić
|
|
2111
|
-
* inny punkt
|
|
2141
|
+
* inny punkt - wyszukany adres, siedzibę firmy, stałą pozycję w demie.
|
|
2112
2142
|
*/
|
|
2113
2143
|
this.distanceFrom = input(null, /* @ts-ignore */
|
|
2114
2144
|
...(ngDevMode ? [{ debugName: "distanceFrom" }] : /* istanbul ignore next */ []));
|
|
2115
2145
|
this.height = input('480px', /* @ts-ignore */
|
|
2116
2146
|
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
2117
|
-
/** Bez znaczenia dla silnika Google
|
|
2147
|
+
/** Bez znaczenia dla silnika Google - kafle i atrybucję dostarcza tam Google. */
|
|
2118
2148
|
this.tileUrl = input(null, /* @ts-ignore */
|
|
2119
2149
|
...(ngDevMode ? [{ debugName: "tileUrl" }] : /* istanbul ignore next */ []));
|
|
2120
2150
|
this.attribution = input(null, /* @ts-ignore */
|
|
@@ -2122,10 +2152,10 @@ class KptMap {
|
|
|
2122
2152
|
/**
|
|
2123
2153
|
* Silnik **tej** mapy. Podany wygrywa nad `KPT_MAP_ENGINE` z DI, więc dwie mapy o różnych
|
|
2124
2154
|
* silnikach mieszczą się na jednej stronie bez komponentów-opakowań. Bez niego wszystko
|
|
2125
|
-
* działa jak dotąd
|
|
2155
|
+
* działa jak dotąd - silnik przychodzi z DI.
|
|
2126
2156
|
*
|
|
2127
2157
|
* Fabryka, a nie gotowa instancja: każda mapa potrzebuje własnego obiektu. Czytany raz,
|
|
2128
|
-
* przy inicjalizacji
|
|
2158
|
+
* przy inicjalizacji - podmiana po starcie nie przeładowuje mapy.
|
|
2129
2159
|
*
|
|
2130
2160
|
* @example
|
|
2131
2161
|
* readonly google: KptMapEngineFactory = () => createGoogleEngine({ apiKey, mapId });
|
|
@@ -2133,15 +2163,15 @@ class KptMap {
|
|
|
2133
2163
|
this.engine = input(null, /* @ts-ignore */
|
|
2134
2164
|
...(ngDevMode ? [{ debugName: "engine" }] : /* istanbul ignore next */ []));
|
|
2135
2165
|
/**
|
|
2136
|
-
* Geokoder **tej** mapy. Podany wygrywa nad `KPT_MAP_GEOCODER` z DI
|
|
2166
|
+
* Geokoder **tej** mapy. Podany wygrywa nad `KPT_MAP_GEOCODER` z DI - tak samo jak
|
|
2137
2167
|
* `[engine]` nad `KPT_MAP_ENGINE` i z tego samego powodu: Service Specific Terms wiążą
|
|
2138
2168
|
* geokoder Google z **mapą** Google, a nie z aplikacją. Na stronie z dwoma silnikami
|
|
2139
2169
|
* globalny provider nie umiałby tej reguły dotrzymać; wejście umie.
|
|
2140
2170
|
*
|
|
2141
|
-
* Trafia i do wyszukiwarki, i do formularza
|
|
2171
|
+
* Trafia i do wyszukiwarki, i do formularza "dodaj lokalizację" - jeden port na oba kierunki.
|
|
2142
2172
|
*
|
|
2143
2173
|
* @example
|
|
2144
|
-
* <kpt-map [engine]="google" [geocoder]="googleGeocoder"
|
|
2174
|
+
* <kpt-map [engine]="google" [geocoder]="googleGeocoder" ... />
|
|
2145
2175
|
*/
|
|
2146
2176
|
this.geocoder = input(null, /* @ts-ignore */
|
|
2147
2177
|
...(ngDevMode ? [{ debugName: "geocoder" }] : /* istanbul ignore next */ []));
|
|
@@ -2154,7 +2184,7 @@ class KptMap {
|
|
|
2154
2184
|
this.userPositionChange = output();
|
|
2155
2185
|
this.userLocationError = output();
|
|
2156
2186
|
/**
|
|
2157
|
-
* Silnika nie udało się uruchomić
|
|
2187
|
+
* Silnika nie udało się uruchomić - brak fabryki, brak paczki `leaflet`, odrzucony klucz Google.
|
|
2158
2188
|
* Bez słuchacza błąd ląduje w konsoli; ze słuchaczem aplikacja może pokazać własny komunikat.
|
|
2159
2189
|
*/
|
|
2160
2190
|
this.engineError = output();
|
|
@@ -2163,7 +2193,7 @@ class KptMap {
|
|
|
2163
2193
|
/** Opcjonalny, bo silnik może przyjść wejściem `[engine]` zamiast z DI. */
|
|
2164
2194
|
this.engineFactory = inject(KPT_MAP_ENGINE, { optional: true });
|
|
2165
2195
|
this.geolocation = inject(KPT_MAP_GEOLOCATION, { optional: true });
|
|
2166
|
-
/** Opcjonalny
|
|
2196
|
+
/** Opcjonalny - wejście `[geocoder]` i tak ma nad nim pierwszeństwo. */
|
|
2167
2197
|
this.injectedGeocoder = inject(KPT_MAP_GEOCODER, { optional: true });
|
|
2168
2198
|
this.destroyRef = inject(DestroyRef);
|
|
2169
2199
|
this.injector = inject(Injector);
|
|
@@ -2179,7 +2209,7 @@ class KptMap {
|
|
|
2179
2209
|
this.createFormTemplate = contentChild(KptMapCreateFormTemplate, /* @ts-ignore */
|
|
2180
2210
|
...(ngDevMode ? [{ debugName: "createFormTemplate" }] : /* istanbul ignore next */ []));
|
|
2181
2211
|
this.mapEngine = null;
|
|
2182
|
-
/** Komponent zniszczony
|
|
2212
|
+
/** Komponent zniszczony - `initEngine()` po `await` nie może już podpinać zdarzeń ani obserwatorów. */
|
|
2183
2213
|
this.destroyed = false;
|
|
2184
2214
|
/** Trwający montaż silnika; zniszczenie czeka na jego koniec (patrz konstruktor). */
|
|
2185
2215
|
this.engineInit = Promise.resolve();
|
|
@@ -2190,7 +2220,7 @@ class KptMap {
|
|
|
2190
2220
|
/** Zoom trzymamy w sygnale, bo od niego zależy wynik grupowania. */
|
|
2191
2221
|
this.zoom = signal(6, /* @ts-ignore */
|
|
2192
2222
|
...(ngDevMode ? [{ debugName: "zoom" }] : /* istanbul ignore next */ []));
|
|
2193
|
-
/** Rośnie przy każdym ruchu mapy
|
|
2223
|
+
/** Rośnie przy każdym ruchu mapy - wymusza przeliczenie pozycji popupu. */
|
|
2194
2224
|
this.viewportTick = signal(0, /* @ts-ignore */
|
|
2195
2225
|
...(ngDevMode ? [{ debugName: "viewportTick" }] : /* istanbul ignore next */ []));
|
|
2196
2226
|
this.popup = signal(null, /* @ts-ignore */
|
|
@@ -2203,7 +2233,7 @@ class KptMap {
|
|
|
2203
2233
|
...(ngDevMode ? [{ debugName: "createOpen" }] : /* istanbul ignore next */ []));
|
|
2204
2234
|
this.userPosition = signal(null, /* @ts-ignore */
|
|
2205
2235
|
...(ngDevMode ? [{ debugName: "userPosition" }] : /* istanbul ignore next */ []));
|
|
2206
|
-
/** Ostatni wybrany wynik wyszukiwania
|
|
2236
|
+
/** Ostatni wybrany wynik wyszukiwania - źródło tymczasowej pinezki. */
|
|
2207
2237
|
this.searchPin = signal(null, /* @ts-ignore */
|
|
2208
2238
|
...(ngDevMode ? [{ debugName: "searchPin" }] : /* istanbul ignore next */ []));
|
|
2209
2239
|
this.locationBlocked = signal(false, /* @ts-ignore */
|
|
@@ -2220,7 +2250,7 @@ class KptMap {
|
|
|
2220
2250
|
...(ngDevMode ? [{ debugName: "visibleLocations" }] : /* istanbul ignore next */ []));
|
|
2221
2251
|
this.counts = computed(() => this.legendCounts() ? countByCategory(this.locations()) : null, /* @ts-ignore */
|
|
2222
2252
|
...(ngDevMode ? [{ debugName: "counts" }] : /* istanbul ignore next */ []));
|
|
2223
|
-
/** Wynik grupowania dla aktualnego zoomu
|
|
2253
|
+
/** Wynik grupowania dla aktualnego zoomu - grupy i punkty pojedyncze. */
|
|
2224
2254
|
this.entries = computed(() => {
|
|
2225
2255
|
const locations = this.visibleLocations();
|
|
2226
2256
|
if (!this.cluster())
|
|
@@ -2250,7 +2280,7 @@ class KptMap {
|
|
|
2250
2280
|
}),
|
|
2251
2281
|
size: CLUSTER_SIZE,
|
|
2252
2282
|
anchor: { x: CLUSTER_SIZE.width / 2, y: CLUSTER_SIZE.height / 2 },
|
|
2253
|
-
// Grupy nad pojedynczymi punktami
|
|
2283
|
+
// Grupy nad pojedynczymi punktami - licznik ma być czytelny.
|
|
2254
2284
|
zIndex: 500,
|
|
2255
2285
|
};
|
|
2256
2286
|
}
|
|
@@ -2288,14 +2318,14 @@ class KptMap {
|
|
|
2288
2318
|
}),
|
|
2289
2319
|
size: MARKER_SIZE,
|
|
2290
2320
|
anchor: { x: MARKER_SIZE.width / 2, y: MARKER_SIZE.height },
|
|
2291
|
-
// Nad grupami (500)
|
|
2321
|
+
// Nad grupami (500) - to na nią użytkownik właśnie kazał mapie polecieć.
|
|
2292
2322
|
zIndex: 600,
|
|
2293
2323
|
});
|
|
2294
2324
|
}
|
|
2295
2325
|
return rendered;
|
|
2296
2326
|
}, /* @ts-ignore */
|
|
2297
2327
|
...(ngDevMode ? [{ debugName: "markers" }] : /* istanbul ignore next */ []));
|
|
2298
|
-
/** Szablon popupu dla kategorii; bez dopasowania
|
|
2328
|
+
/** Szablon popupu dla kategorii; bez dopasowania - szablon zapasowy (bez `category`). */
|
|
2299
2329
|
this.popupTemplateFor = computed(() => {
|
|
2300
2330
|
const exact = new Map();
|
|
2301
2331
|
let fallback = null;
|
|
@@ -2320,7 +2350,7 @@ class KptMap {
|
|
|
2320
2350
|
...(ngDevMode ? [{ debugName: "popupCategory" }] : /* istanbul ignore next */ []));
|
|
2321
2351
|
/**
|
|
2322
2352
|
* Odległość otwartego punktu od `distanceFrom` (albo od użytkownika) w metrach.
|
|
2323
|
-
* `null`, gdy nie ma od czego liczyć
|
|
2353
|
+
* `null`, gdy nie ma od czego liczyć - szablon chowa wtedy wiersz dystansu,
|
|
2324
2354
|
* zamiast pokazywać zero.
|
|
2325
2355
|
*/
|
|
2326
2356
|
this.popupDistance = computed(() => {
|
|
@@ -2333,7 +2363,7 @@ class KptMap {
|
|
|
2333
2363
|
...(ngDevMode ? [{ debugName: "popupDistance" }] : /* istanbul ignore next */ []));
|
|
2334
2364
|
/**
|
|
2335
2365
|
* Pozycja popupu w pikselach kontenera. Zależy od `viewportTick`, więc przelicza się
|
|
2336
|
-
* przy każdym ruchu mapy
|
|
2366
|
+
* przy każdym ruchu mapy - jeden sygnał zamiast nasłuchu w szablonie.
|
|
2337
2367
|
*/
|
|
2338
2368
|
this.popupPosition = computed(() => {
|
|
2339
2369
|
this.viewportTick();
|
|
@@ -2351,18 +2381,18 @@ class KptMap {
|
|
|
2351
2381
|
return this.mapEngine.project(target.at);
|
|
2352
2382
|
}, /* @ts-ignore */
|
|
2353
2383
|
...(ngDevMode ? [{ debugName: "contextPosition" }] : /* istanbul ignore next */ []));
|
|
2354
|
-
/** Kategorie oferowane w menu
|
|
2384
|
+
/** Kategorie oferowane w menu "dodaj" - ukryte w legendzie odpadają. */
|
|
2355
2385
|
this.creatableCategories = computed(() => {
|
|
2356
2386
|
const hidden = new Set(this.hiddenCategories());
|
|
2357
2387
|
return this.categories().filter((c) => !hidden.has(c.id) && (c.fields?.length || this.createFormTemplate()));
|
|
2358
2388
|
}, /* @ts-ignore */
|
|
2359
2389
|
...(ngDevMode ? [{ debugName: "creatableCategories" }] : /* istanbul ignore next */ []));
|
|
2360
|
-
/** Czy jest czym szukać
|
|
2390
|
+
/** Czy jest czym szukać - port bez `search()` nie zasługuje na pole, które nic nie robi. */
|
|
2361
2391
|
this.searchEnabled = computed(() => this.search() && !!this.activeGeocoder()?.search, /* @ts-ignore */
|
|
2362
2392
|
...(ngDevMode ? [{ debugName: "searchEnabled" }] : /* istanbul ignore next */ []));
|
|
2363
2393
|
/**
|
|
2364
|
-
* Prostokąt preferowanych wyników. Bierzemy zasięg jawny, a bez niego preset kraju
|
|
2365
|
-
*
|
|
2394
|
+
* Prostokąt preferowanych wyników. Bierzemy zasięg jawny, a bez niego preset kraju -
|
|
2395
|
+
* "Kwiatowa" ma trafiać w tę pod nosem, nie w tę z drugiego końca świata. To sam bias:
|
|
2366
2396
|
* adresu z zagranicy dalej da się poszukać.
|
|
2367
2397
|
*/
|
|
2368
2398
|
this.searchViewbox = computed(() => this.bounds() ?? resolveCountryView(this.country()).bounds, /* @ts-ignore */
|
|
@@ -2370,7 +2400,7 @@ class KptMap {
|
|
|
2370
2400
|
/**
|
|
2371
2401
|
* Twarde zawężenie do krajów. Jawne `searchOptions.countryCodes` wygrywa; bez niego
|
|
2372
2402
|
* odcinamy zagranicę dopiero przy `restrictToCountry`, bo tam mapa i tak nie pozwoli
|
|
2373
|
-
* przesunąć widoku poza kraj
|
|
2403
|
+
* przesunąć widoku poza kraj - znaleziony adres byłby nie do pokazania.
|
|
2374
2404
|
*/
|
|
2375
2405
|
this.searchCountryCodes = computed(() => {
|
|
2376
2406
|
const explicit = this.searchOptions().countryCodes;
|
|
@@ -2391,16 +2421,16 @@ class KptMap {
|
|
|
2391
2421
|
};
|
|
2392
2422
|
}, /* @ts-ignore */
|
|
2393
2423
|
...(ngDevMode ? [{ debugName: "createFormApi" }] : /* istanbul ignore next */ []));
|
|
2394
|
-
/** Gotowa referencja dla kontekstu szablonu
|
|
2424
|
+
/** Gotowa referencja dla kontekstu szablonu - szablon nie ma jak zrobić `bind`. */
|
|
2395
2425
|
this.closePopupFn = () => this.closePopup();
|
|
2396
|
-
/** Zasięg wszystkich widocznych lokalizacji
|
|
2426
|
+
/** Zasięg wszystkich widocznych lokalizacji - `null`, gdy nie ma żadnej. */
|
|
2397
2427
|
this.dataBounds = computed(() => boundsOf(this.visibleLocations().map((l) => l.at)), /* @ts-ignore */
|
|
2398
2428
|
...(ngDevMode ? [{ debugName: "dataBounds" }] : /* istanbul ignore next */ []));
|
|
2399
2429
|
afterNextRender(() => {
|
|
2400
2430
|
this.engineInit = this.initEngine().catch((error) => this.reportEngineError(error));
|
|
2401
2431
|
});
|
|
2402
2432
|
// Zniszczenie w trakcie `init()` trafiłoby w mapę, której jeszcze nie ma, a ta powstałaby potem
|
|
2403
|
-
// na odpiętym kontenerze
|
|
2433
|
+
// na odpiętym kontenerze - dlatego `destroy()` czeka na koniec montażu.
|
|
2404
2434
|
this.destroyRef.onDestroy(() => {
|
|
2405
2435
|
this.destroyed = true;
|
|
2406
2436
|
void this.engineInit.finally(() => {
|
|
@@ -2408,14 +2438,14 @@ class KptMap {
|
|
|
2408
2438
|
this.mapEngine = null;
|
|
2409
2439
|
});
|
|
2410
2440
|
});
|
|
2411
|
-
// Zmiana źródła kafli w locie
|
|
2441
|
+
// Zmiana źródła kafli w locie - bez przeładowania mapy.
|
|
2412
2442
|
effect(() => {
|
|
2413
2443
|
const url = this.tileUrl() ?? KPT_MAP_DEFAULT_TILE_URL;
|
|
2414
2444
|
const attribution = this.attribution() ?? KPT_MAP_DEFAULT_ATTRIBUTION;
|
|
2415
2445
|
if (untracked(this.ready))
|
|
2416
2446
|
this.mapEngine?.setTileSource(url, attribution);
|
|
2417
2447
|
});
|
|
2418
|
-
// Wypychanie znaczników do silnika
|
|
2448
|
+
// Wypychanie znaczników do silnika - jedyne miejsce, które je rysuje.
|
|
2419
2449
|
effect(() => {
|
|
2420
2450
|
const markers = this.markers();
|
|
2421
2451
|
if (this.ready())
|
|
@@ -2435,7 +2465,7 @@ class KptMap {
|
|
|
2435
2465
|
iconSvgInner: this.icons.get('user'),
|
|
2436
2466
|
}));
|
|
2437
2467
|
});
|
|
2438
|
-
// `<dialog>` zamyka się też Esc-em i backdropem
|
|
2468
|
+
// `<dialog>` zamyka się też Esc-em i backdropem - cel czyścimy przy każdym zamknięciu.
|
|
2439
2469
|
effect(() => {
|
|
2440
2470
|
if (!this.createOpen())
|
|
2441
2471
|
untracked(() => this.createFor.set(null));
|
|
@@ -2474,7 +2504,7 @@ class KptMap {
|
|
|
2474
2504
|
});
|
|
2475
2505
|
}
|
|
2476
2506
|
catch (error) {
|
|
2477
|
-
// Brak paczki `leaflet` to najczęstsza przyczyna
|
|
2507
|
+
// Brak paczki `leaflet` to najczęstsza przyczyna - komunikat niesie instrukcję.
|
|
2478
2508
|
this.mapEngine = null;
|
|
2479
2509
|
throw error;
|
|
2480
2510
|
}
|
|
@@ -2484,7 +2514,7 @@ class KptMap {
|
|
|
2484
2514
|
if (startBounds && !view)
|
|
2485
2515
|
engine.fitBounds(startBounds, FIT_PADDING);
|
|
2486
2516
|
// Leaflet emituje `move` co klatkę przeciągania. Bez popupu i menu nikt tej pozycji
|
|
2487
|
-
// nie czyta, a każdy zapis sygnału planowałby przebieg detekcji zmian
|
|
2517
|
+
// nie czyta, a każdy zapis sygnału planowałby przebieg detekcji zmian - stąd bramka.
|
|
2488
2518
|
engine.on('move', () => {
|
|
2489
2519
|
if (untracked(this.popup) || untracked(this.contextTarget)) {
|
|
2490
2520
|
this.viewportTick.update((t) => t + 1);
|
|
@@ -2551,7 +2581,7 @@ class KptMap {
|
|
|
2551
2581
|
return;
|
|
2552
2582
|
if (isCluster(entry)) {
|
|
2553
2583
|
this.clusterClick.emit(entry);
|
|
2554
|
-
// Grupa punktów o tej samej współrzędnej nie da się rozbić zoomem
|
|
2584
|
+
// Grupa punktów o tej samej współrzędnej nie da się rozbić zoomem - pokaż listę.
|
|
2555
2585
|
if (isSplittable(entry)) {
|
|
2556
2586
|
this.mapEngine?.fitBounds(entry.bounds, FIT_PADDING);
|
|
2557
2587
|
return;
|
|
@@ -2622,7 +2652,7 @@ class KptMap {
|
|
|
2622
2652
|
engine.panBy({ x: dx, y: dy });
|
|
2623
2653
|
}, { injector: this.injector });
|
|
2624
2654
|
}
|
|
2625
|
-
/** Pozycja z grupy nierozdzielalnej
|
|
2655
|
+
/** Pozycja z grupy nierozdzielalnej - przełącza popup bez ruszania mapy. */
|
|
2626
2656
|
selectFromGroup(location) {
|
|
2627
2657
|
const state = this.popup();
|
|
2628
2658
|
this.popup.set({ location, group: state?.group ?? null });
|
|
@@ -2644,13 +2674,13 @@ class KptMap {
|
|
|
2644
2674
|
const target = this.createFor();
|
|
2645
2675
|
if (!target)
|
|
2646
2676
|
return;
|
|
2647
|
-
// Komponent nie dopisuje nic do `locations`
|
|
2677
|
+
// Komponent nie dopisuje nic do `locations` - źródłem prawdy jest aplikacja.
|
|
2648
2678
|
this.locationCreate.emit({ at: target.at, categoryId: target.category.id, value });
|
|
2649
2679
|
this.closeCreate();
|
|
2650
2680
|
}
|
|
2651
2681
|
/**
|
|
2652
2682
|
* Przenosi widok na wybrany wynik. Zasięg (miasto, region) wpasowujemy w kadr,
|
|
2653
|
-
* a pojedynczy punkt dostaje `[searchZoom]`
|
|
2683
|
+
* a pojedynczy punkt dostaje `[searchZoom]` - inaczej każdy adres lądowałby
|
|
2654
2684
|
* w innym przybliżeniu, zależnym od tego, jak dostawca obrysował budynek.
|
|
2655
2685
|
*/
|
|
2656
2686
|
onSearchSelect(result) {
|
|
@@ -2673,7 +2703,7 @@ class KptMap {
|
|
|
2673
2703
|
return;
|
|
2674
2704
|
this.mapEngine.setView(position.at, Math.max(this.mapEngine.getZoom(), 13));
|
|
2675
2705
|
}
|
|
2676
|
-
/** Wraca do widoku startowego
|
|
2706
|
+
/** Wraca do widoku startowego - po zabłądzeniu na drugim końcu świata. */
|
|
2677
2707
|
resetView() {
|
|
2678
2708
|
if (!this.mapEngine)
|
|
2679
2709
|
return;
|
|
@@ -2703,30 +2733,28 @@ class KptMap {
|
|
|
2703
2733
|
} }, hostAttrs: [1, "kpt-map"], hostVars: 3, hostBindings: function KptMap_HostBindings(rf, ctx) { if (rf & 2) {
|
|
2704
2734
|
i0.ɵɵattribute("data-engine", ctx.engineKind());
|
|
2705
2735
|
i0.ɵɵstyleProp("--%NS%kpt-map-height", ctx.height());
|
|
2706
|
-
} }, inputs: { locations: [1, "locations"], categories: [1, "categories"], country: [1, "country"], view: [1, "view"], restrictToCountry: [1, "restrictToCountry"], bounds: [1, "bounds"], cluster: [1, "cluster"], clusterOptions: [1, "clusterOptions"], clusterColorBy: [1, "clusterColorBy"], legend: [1, "legend"], hiddenCategories: [1, "hiddenCategories"], legendCounts: [1, "legendCounts"], showUserLocation: [1, "showUserLocation"], followUser: [1, "followUser"], allowCreate: [1, "allowCreate"], search: [1, "search"], searchPlaceholder: [1, "searchPlaceholder"], searchOptions: [1, "searchOptions"], searchZoom: [1, "searchZoom"], searchMarker: [1, "searchMarker"], popupLayout: [1, "popupLayout"], distanceFrom: [1, "distanceFrom"], height: [1, "height"], tileUrl: [1, "tileUrl"], attribution: [1, "attribution"], engine: [1, "engine"], geocoder: [1, "geocoder"] }, outputs: { hiddenCategories: "hiddenCategoriesChange", locationClick: "locationClick", clusterClick: "clusterClick", locationCreate: "locationCreate", searchSelect: "searchSelect", viewChange: "viewChange", userPositionChange: "userPositionChange", userLocationError: "userLocationError", engineError: "engineError" }, decls:
|
|
2736
|
+
} }, inputs: { locations: [1, "locations"], categories: [1, "categories"], country: [1, "country"], view: [1, "view"], restrictToCountry: [1, "restrictToCountry"], bounds: [1, "bounds"], cluster: [1, "cluster"], clusterOptions: [1, "clusterOptions"], clusterColorBy: [1, "clusterColorBy"], legend: [1, "legend"], hiddenCategories: [1, "hiddenCategories"], legendCounts: [1, "legendCounts"], showUserLocation: [1, "showUserLocation"], followUser: [1, "followUser"], allowCreate: [1, "allowCreate"], search: [1, "search"], searchPlaceholder: [1, "searchPlaceholder"], searchOptions: [1, "searchOptions"], searchZoom: [1, "searchZoom"], searchMarker: [1, "searchMarker"], searchSpeech: [1, "searchSpeech"], searchSpeechLang: [1, "searchSpeechLang"], searchSpeechColor: [1, "searchSpeechColor"], popupLayout: [1, "popupLayout"], distanceFrom: [1, "distanceFrom"], height: [1, "height"], tileUrl: [1, "tileUrl"], attribution: [1, "attribution"], engine: [1, "engine"], geocoder: [1, "geocoder"] }, outputs: { hiddenCategories: "hiddenCategoriesChange", locationClick: "locationClick", clusterClick: "clusterClick", locationCreate: "locationCreate", searchSelect: "searchSelect", viewChange: "viewChange", userPositionChange: "userPositionChange", userLocationError: "userLocationError", engineError: "engineError" }, decls: 15, vars: 15, consts: [["canvas", ""], ["popupEl", ""], [1, "kpt-map__viewport"], [1, "kpt-map__canvas"], ["role", "group", 1, "kpt-map__controls"], ["type", "button", 1, "kpt-map__control", 3, "click", "title", "disabled"], ["name", "plus"], ["name", "minus"], ["type", "button", 1, "kpt-map__control", "kpt-map__control--locate", 3, "title", "disabled"], [1, "kpt-map__search"], [1, "kpt-map__legend", 3, "categories", "hidden", "counts"], [3, "openChange", "open", "header"], ["type", "button", 1, "kpt-map__control", "kpt-map__control--locate", 3, "click", "title", "disabled"], ["aria-hidden", "true", 1, "kpt-map__crosshair"], [3, "selected", "cleared", "geocoder", "placeholder", "minLength", "debounce", "limit", "viewbox", "countryCodes", "speech", "speechLang", "speechColor"], ["role", "menu", 1, "kpt-map__context", 3, "--%NS%_kpt-map-x", "--%NS%_kpt-map-y"], ["role", "menu", 1, "kpt-map__context"], [1, "kpt-map__context-title"], ["type", "button", "role", "menuitem", 1, "kpt-map__context-item"], [1, "kpt-map__context-empty"], ["type", "button", "role", "menuitem", 1, "kpt-map__context-item", 3, "click"], ["aria-hidden", "true", 1, "kpt-map__context-dot"], ["role", "dialog", 1, "kpt-map__popup", 3, "--%NS%_kpt-map-x", "--%NS%_kpt-map-y"], ["role", "dialog", 1, "kpt-map__popup"], ["type", "button", 1, "kpt-map__popup-close"], [1, "kpt-map__popup-body"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], ["type", "button", 1, "kpt-map__popup-close", 3, "click"], ["aria-hidden", "true"], [1, "kpt-map__popup-group"], ["role", "tablist", 1, "kpt-map__popup-tabs"], ["type", "button", "role", "tab", 1, "kpt-map__popup-tab"], ["type", "button", "role", "tab", 1, "kpt-map__popup-tab", 3, "click"], [1, "kpt-map__popup-title"], [1, "kpt-map__popup-category"], [1, "kpt-map__legend", 3, "hiddenChange", "categories", "hidden", "counts"], [3, "geocoder", "category", "at"], [3, "save", "cancelled", "geocoder", "category", "at"]], template: function KptMap_Template(rf, ctx) { if (rf & 1) {
|
|
2707
2737
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
2708
2738
|
i0.ɵɵelementStart(0, "div", 2);
|
|
2709
2739
|
i0.ɵɵelement(1, "div", 3, 0);
|
|
2710
2740
|
i0.ɵɵelementStart(3, "div", 4)(4, "button", 5);
|
|
2711
2741
|
i0.ɵɵlistener("click", function KptMap_Template_button_click_4_listener() { return ctx.zoomBy(1); });
|
|
2712
|
-
i0.ɵɵ
|
|
2713
|
-
i0.ɵɵtext(6, "+");
|
|
2714
|
-
i0.ɵɵelementEnd()();
|
|
2715
|
-
i0.ɵɵelementStart(7, "button", 5);
|
|
2716
|
-
i0.ɵɵlistener("click", function KptMap_Template_button_click_7_listener() { return ctx.zoomBy(-1); });
|
|
2717
|
-
i0.ɵɵelementStart(8, "span", 6);
|
|
2718
|
-
i0.ɵɵtext(9, "\u2212");
|
|
2719
|
-
i0.ɵɵelementEnd()();
|
|
2720
|
-
i0.ɵɵconditionalCreate(10, KptMap_Conditional_10_Template, 2, 3, "button", 7);
|
|
2742
|
+
i0.ɵɵelement(5, "kpt-icon", 6);
|
|
2721
2743
|
i0.ɵɵelementEnd();
|
|
2722
|
-
i0.ɵɵ
|
|
2723
|
-
i0.ɵɵ
|
|
2724
|
-
i0.ɵɵ
|
|
2744
|
+
i0.ɵɵelementStart(6, "button", 5);
|
|
2745
|
+
i0.ɵɵlistener("click", function KptMap_Template_button_click_6_listener() { return ctx.zoomBy(-1); });
|
|
2746
|
+
i0.ɵɵelement(7, "kpt-icon", 7);
|
|
2725
2747
|
i0.ɵɵelementEnd();
|
|
2726
|
-
i0.ɵɵconditionalCreate(
|
|
2727
|
-
i0.ɵɵ
|
|
2728
|
-
i0.ɵɵ
|
|
2729
|
-
i0.ɵɵconditionalCreate(
|
|
2748
|
+
i0.ɵɵconditionalCreate(8, KptMap_Conditional_8_Template, 2, 3, "button", 8);
|
|
2749
|
+
i0.ɵɵelementEnd();
|
|
2750
|
+
i0.ɵɵconditionalCreate(9, KptMap_Conditional_9_Template, 2, 10, "div", 9);
|
|
2751
|
+
i0.ɵɵconditionalCreate(10, KptMap_Conditional_10_Template, 1, 1);
|
|
2752
|
+
i0.ɵɵconditionalCreate(11, KptMap_Conditional_11_Template, 1, 1);
|
|
2753
|
+
i0.ɵɵelementEnd();
|
|
2754
|
+
i0.ɵɵconditionalCreate(12, KptMap_Conditional_12_Template, 1, 3, "kpt-map-legend", 10);
|
|
2755
|
+
i0.ɵɵelementStart(13, "kpt-dialog", 11);
|
|
2756
|
+
i0.ɵɵtwoWayListener("openChange", function KptMap_Template_kpt_dialog_openChange_13_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.createOpen, $event) || (ctx.createOpen = $event); return i0.ɵɵresetView($event); });
|
|
2757
|
+
i0.ɵɵconditionalCreate(14, KptMap_Conditional_14_Template, 2, 1);
|
|
2730
2758
|
i0.ɵɵelementEnd();
|
|
2731
2759
|
} if (rf & 2) {
|
|
2732
2760
|
let tmp_11_0;
|
|
@@ -2736,34 +2764,34 @@ class KptMap {
|
|
|
2736
2764
|
i0.ɵɵadvance();
|
|
2737
2765
|
i0.ɵɵproperty("title", ctx.i18n.t("map.zoomIn"))("disabled", !ctx.ready());
|
|
2738
2766
|
i0.ɵɵattribute("aria-label", ctx.i18n.t("map.zoomIn"));
|
|
2739
|
-
i0.ɵɵadvance(
|
|
2767
|
+
i0.ɵɵadvance(2);
|
|
2740
2768
|
i0.ɵɵproperty("title", ctx.i18n.t("map.zoomOut"))("disabled", !ctx.ready());
|
|
2741
2769
|
i0.ɵɵattribute("aria-label", ctx.i18n.t("map.zoomOut"));
|
|
2742
|
-
i0.ɵɵadvance(
|
|
2743
|
-
i0.ɵɵconditional(ctx.showUserLocation() ?
|
|
2770
|
+
i0.ɵɵadvance(2);
|
|
2771
|
+
i0.ɵɵconditional(ctx.showUserLocation() ? 8 : -1);
|
|
2744
2772
|
i0.ɵɵadvance();
|
|
2745
|
-
i0.ɵɵconditional(ctx.searchEnabled() ?
|
|
2773
|
+
i0.ɵɵconditional(ctx.searchEnabled() ? 9 : -1);
|
|
2746
2774
|
i0.ɵɵadvance();
|
|
2747
|
-
i0.ɵɵconditional(ctx.allowCreate() && ctx.contextTarget() ?
|
|
2775
|
+
i0.ɵɵconditional(ctx.allowCreate() && ctx.contextTarget() ? 10 : -1);
|
|
2748
2776
|
i0.ɵɵadvance();
|
|
2749
|
-
i0.ɵɵconditional((tmp_11_0 = ctx.popup()) ?
|
|
2777
|
+
i0.ɵɵconditional((tmp_11_0 = ctx.popup()) ? 11 : -1, tmp_11_0);
|
|
2750
2778
|
i0.ɵɵadvance();
|
|
2751
|
-
i0.ɵɵconditional(ctx.legend() ?
|
|
2779
|
+
i0.ɵɵconditional(ctx.legend() ? 12 : -1);
|
|
2752
2780
|
i0.ɵɵadvance();
|
|
2753
2781
|
i0.ɵɵtwoWayProperty("open", ctx.createOpen);
|
|
2754
2782
|
i0.ɵɵproperty("header", ctx.i18n.t("map.addLocation"));
|
|
2755
2783
|
i0.ɵɵadvance();
|
|
2756
|
-
i0.ɵɵconditional((tmp_15_0 = ctx.createFor()) ?
|
|
2757
|
-
} }, dependencies: [NgTemplateOutlet, KptDialog, KptMapLegend, KptMapSearch, KptMapCreateDialog], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map{--%NS%kpt-map-height: 480px;display:flex;flex-direction:column;gap:var(--%NS%kpt-space-3);width:100%;isolation:isolate}.kpt-map__viewport{position:relative;height:var(--%NS%kpt-map-height);overflow:hidden;background:var(--%NS%kpt-map-bg, var(--%NS%kpt-color-surface-sunken));border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-map-border, var(--%NS%kpt-color-border));border-radius:var(--%NS%kpt-map-radius, var(--%NS%kpt-radius-lg))}.kpt-map__canvas{width:100%;height:100%}.kpt-map__controls{position:absolute;top:var(--%NS%kpt-space-3);left:var(--%NS%kpt-space-3);z-index:2;display:flex;flex-direction:column;gap:var(--%NS%kpt-space-1)}.kpt-map__control{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:var(--%NS%kpt-font-size-lg);line-height:1;color:var(--%NS%kpt-color-on-surface);cursor:pointer;background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md);box-shadow:var(--%NS%kpt-elevation-1)}.kpt-map__control:hover:not(:disabled){background:var(--%NS%kpt-color-surface-hover)}.kpt-map__control:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}.kpt-map__control:disabled{color:var(--%NS%kpt-color-on-surface-muted);cursor:not-allowed;opacity:.6}.kpt-map__search{position:absolute;top:var(--%NS%kpt-space-3);right:var(--%NS%kpt-space-3);z-index:5;max-width:calc(100% - 2rem - var(--%NS%kpt-space-3) * 3)}.kpt-map__crosshair{position:relative;width:.875rem;height:.875rem;border:var(--%NS%kpt-border-width-medium) solid currentcolor;border-radius:var(--%NS%kpt-radius-full)}.kpt-map__crosshair:after{position:absolute;inset:50% auto auto 50%;width:.25rem;height:.25rem;content:\"\";background:currentcolor;border-radius:var(--%NS%kpt-radius-full);translate:-50% -50%}.kpt-map__marker{position:relative;display:block;width:100%;height:100%;color:var(--%NS%_kpt-map-marker-fg, var(--%NS%kpt-color-text-inverse))}.kpt-map__marker-shape{display:block;width:100%;height:100%;fill:var(--%NS%_kpt-map-marker-bg, var(--%NS%kpt-color-muted));stroke:var(--%NS%kpt-color-surface-raised);stroke-width:1.5;filter:drop-shadow(0 1px 2px rgba(0,0,0,.25))}.kpt-map__marker-glyph{position:absolute;display:grid;place-items:center;font-size:.875rem}.kpt-map__marker-glyph svg{width:1em;height:1em}.kpt-map__marker--pin .kpt-map__marker-glyph{inset:0 0 auto;height:76%}.kpt-map__marker--dot,.kpt-map__marker--square{display:grid;place-items:center;background:var(--%NS%_kpt-map-marker-bg, var(--%NS%kpt-color-muted));border:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-surface-raised);box-shadow:var(--%NS%kpt-elevation-1)}.kpt-map__marker--dot{border-radius:var(--%NS%kpt-radius-full)}.kpt-map__marker--square{border-radius:var(--%NS%kpt-radius-sm)}.kpt-map__marker--dot .kpt-map__marker-glyph,.kpt-map__marker--square .kpt-map__marker-glyph{position:static}.kpt-map__marker--selected{z-index:1}.kpt-map__marker--selected .kpt-map__marker-shape{stroke:var(--%NS%kpt-color-focus-ring);stroke-width:2.5}.kpt-map__cluster{display:grid;place-items:center;width:100%;height:100%;font-weight:var(--%NS%kpt-font-weight-semibold);font-variant-numeric:tabular-nums;color:var(--%NS%_kpt-map-cluster-fg, var(--%NS%kpt-color-primary-contrast));background:var(--%NS%_kpt-map-cluster-bg, var(--%NS%kpt-map-cluster-bg, var(--%NS%kpt-color-primary)));border:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-surface-raised);border-radius:var(--%NS%kpt-radius-full);box-shadow:var(--%NS%kpt-elevation-2)}.kpt-map__cluster--sm{font-size:var(--%NS%kpt-font-size-xs);scale:.78}.kpt-map__cluster--md{font-size:var(--%NS%kpt-font-size-sm);scale:.9}.kpt-map__cluster--lg{font-size:var(--%NS%kpt-font-size-sm);scale:1}.kpt-map__user-marker{display:grid;place-items:center;width:100%;height:100%;font-size:.875rem;color:var(--%NS%kpt-color-info-contrast);background:var(--%NS%kpt-color-info);border:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-surface-raised);border-radius:var(--%NS%kpt-radius-full);box-shadow:var(--%NS%kpt-elevation-2)}.kpt-map__user-marker svg{width:1em;height:1em}.kpt-map__popup{position:absolute;top:var(--%NS%_kpt-map-y, 0);left:var(--%NS%_kpt-map-x, 0);z-index:3;max-width:min(var(--%NS%kpt-map-popup-width, 20rem),100% - var(--%NS%kpt-space-6));padding:var(--%NS%kpt-space-4);color:var(--%NS%kpt-color-on-surface);background:var(--%NS%kpt-map-popup-bg, var(--%NS%kpt-color-surface-raised));border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-lg);box-shadow:var(--%NS%kpt-map-popup-shadow, var(--%NS%kpt-elevation-3));translate:-50% calc(-100% - var(--%NS%kpt-space-3))}.kpt-map__popup:after{position:absolute;top:100%;left:50%;width:.75rem;height:.75rem;content:\"\";background:inherit;border-right:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-bottom:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);rotate:45deg;translate:-50% -50%}.kpt-map__popup[data-layout=card]{max-width:min(var(--%NS%kpt-map-popup-width-card, 26rem),100% - var(--%NS%kpt-space-6));width:min(var(--%NS%kpt-map-popup-width-card, 26rem),100% - var(--%NS%kpt-space-6));max-height:min(var(--%NS%kpt-map-popup-max-height, 32rem),100% - var(--%NS%kpt-space-8));padding:0;display:flex;flex-direction:column}.kpt-map__popup[data-layout=card] .kpt-map__popup-body{display:flex;min-height:0;padding:0;overflow:hidden}.kpt-map__popup[data-layout=card] .kpt-map__popup-body>*{flex:1 1 auto;min-height:0}.kpt-map__popup[data-layout=card] .kpt-map__popup-group,.kpt-map__popup[data-layout=card] .kpt-map__popup-tabs{margin-inline:var(--%NS%kpt-space-4)}.kpt-map__popup[data-layout=card] .kpt-map__popup-group{margin-top:var(--%NS%kpt-space-3)}.kpt-map__popup-close{position:absolute;top:var(--%NS%kpt-space-2);right:var(--%NS%kpt-space-2);display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:var(--%NS%kpt-font-size-lg);line-height:1;color:var(--%NS%kpt-color-on-surface-muted);cursor:pointer;background:transparent;border:none;border-radius:var(--%NS%kpt-radius-full)}.kpt-map__popup-close:hover{background:var(--%NS%kpt-color-surface-hover)}.kpt-map__popup-close:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:1px}.kpt-map__popup-body{padding-right:var(--%NS%kpt-space-5);font-size:var(--%NS%kpt-font-size-sm)}.kpt-map__popup-body p{margin:0 0 var(--%NS%kpt-space-1)}.kpt-map__popup-title{display:block;margin-bottom:var(--%NS%kpt-space-1);font-size:var(--%NS%kpt-font-size-base)}.kpt-map__popup-category{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map__popup-group{margin:0 var(--%NS%kpt-space-5) var(--%NS%kpt-space-2) 0;font-size:var(--%NS%kpt-font-size-xs);color:var(--%NS%kpt-color-on-surface-muted);text-transform:uppercase}.kpt-map__popup-tabs{display:flex;flex-wrap:wrap;gap:var(--%NS%kpt-space-1);margin-bottom:var(--%NS%kpt-space-2)}.kpt-map__popup-tab{padding:var(--%NS%kpt-space-1) var(--%NS%kpt-space-2);font:inherit;font-size:var(--%NS%kpt-font-size-xs);color:var(--%NS%kpt-color-on-surface);cursor:pointer;background:var(--%NS%kpt-color-surface-variant);border:var(--%NS%kpt-border-width-thin) solid transparent;border-radius:var(--%NS%kpt-radius-sm)}.kpt-map__popup-tab[aria-selected=true]{background:var(--%NS%kpt-color-surface-selected);border-color:var(--%NS%kpt-color-border-strong)}.kpt-map__popup-tab:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:1px}.kpt-map__context{position:absolute;top:var(--%NS%_kpt-map-y, 0);left:var(--%NS%_kpt-map-x, 0);z-index:4;min-width:12rem;padding:var(--%NS%kpt-space-2);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md);box-shadow:var(--%NS%kpt-elevation-3)}.kpt-map__context-title{margin:0 0 var(--%NS%kpt-space-1);padding:0 var(--%NS%kpt-space-2);font-size:var(--%NS%kpt-font-size-xs);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map__context-item{display:flex;gap:var(--%NS%kpt-space-2);align-items:center;width:100%;padding:var(--%NS%kpt-space-2);font:inherit;font-size:var(--%NS%kpt-font-size-sm);color:var(--%NS%kpt-color-on-surface);text-align:start;cursor:pointer;background:transparent;border:none;border-radius:var(--%NS%kpt-radius-sm)}.kpt-map__context-item:hover{background:var(--%NS%kpt-color-surface-hover)}.kpt-map__context-item:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:-2px}.kpt-map__context-empty{margin:0;padding:var(--%NS%kpt-space-2);font-size:var(--%NS%kpt-font-size-sm);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map__context-dot{width:.5rem;height:.5rem;background:var(--%NS%kpt-color-border-strong);border-radius:var(--%NS%kpt-radius-full)}.kpt-map[data-engine=google] .kpt-map__accuracy{background:color-mix(in oklch,var(--%NS%kpt-color-info) 15%,transparent);border:var(--%NS%kpt-border-width-thin) solid color-mix(in oklch,var(--%NS%kpt-color-info) 50%,transparent)}}.kpt-map .leaflet-container{font-family:var(--%NS%kpt-font-family-sans);font-size:var(--%NS%kpt-font-size-sm);background:var(--%NS%kpt-color-surface-sunken);z-index:0}.kpt-map .leaflet-div-icon,.kpt-map .kpt-map__icon{background:transparent;border:none}.kpt-map .leaflet-control-attribution{padding:0 var(--%NS%kpt-space-1);font-size:var(--%NS%kpt-font-size-xs);color:var(--%NS%kpt-color-on-surface-muted);background:color-mix(in oklch,var(--%NS%kpt-color-surface-raised) 85%,transparent)}.kpt-map .leaflet-control-attribution a{color:var(--%NS%kpt-color-primary)}.kpt-map .kpt-map__accuracy{fill:var(--%NS%kpt-color-info);fill-opacity:.15;stroke:var(--%NS%kpt-color-info);stroke-opacity:.5}.kpt-map .leaflet-popup-content-wrapper,.kpt-map .leaflet-popup-tip{display:none}\n"], encapsulation: 2 }); }
|
|
2784
|
+
i0.ɵɵconditional((tmp_15_0 = ctx.createFor()) ? 14 : -1, tmp_15_0);
|
|
2785
|
+
} }, dependencies: [NgTemplateOutlet, KptDialog, KptIcon, KptMapLegend, KptMapSearch, KptMapCreateDialog], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map{--%NS%kpt-map-height: 480px;display:flex;flex-direction:column;gap:var(--%NS%kpt-space-3);width:100%;isolation:isolate}.kpt-map__viewport{position:relative;height:var(--%NS%kpt-map-height);overflow:hidden;background:var(--%NS%kpt-map-bg, var(--%NS%kpt-color-surface-sunken));border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-map-border, var(--%NS%kpt-color-border));border-radius:var(--%NS%kpt-map-radius, var(--%NS%kpt-radius-lg))}.kpt-map__canvas{width:100%;height:100%}.kpt-map__controls{position:absolute;top:var(--%NS%kpt-space-3);left:var(--%NS%kpt-space-3);z-index:2;display:flex;flex-direction:column;gap:var(--%NS%kpt-space-1)}.kpt-map__control{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:var(--%NS%kpt-font-size-lg);line-height:1;color:var(--%NS%kpt-color-on-surface);cursor:pointer;background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md);box-shadow:var(--%NS%kpt-elevation-1)}.kpt-map__control:hover:not(:disabled){background:var(--%NS%kpt-color-surface-hover)}.kpt-map__control:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}.kpt-map__control:disabled{color:var(--%NS%kpt-color-on-surface-muted);cursor:not-allowed;opacity:.6}.kpt-map__search{position:absolute;top:var(--%NS%kpt-space-3);right:var(--%NS%kpt-space-3);z-index:5;max-width:calc(100% - 2rem - var(--%NS%kpt-space-3) * 3)}.kpt-map__crosshair{position:relative;width:.875rem;height:.875rem;border:var(--%NS%kpt-border-width-medium) solid currentcolor;border-radius:var(--%NS%kpt-radius-full)}.kpt-map__crosshair:after{position:absolute;inset:50% auto auto 50%;width:.25rem;height:.25rem;content:\"\";background:currentcolor;border-radius:var(--%NS%kpt-radius-full);translate:-50% -50%}.kpt-map__marker{position:relative;display:block;width:100%;height:100%;color:var(--%NS%_kpt-map-marker-fg, var(--%NS%kpt-color-text-inverse))}.kpt-map__marker-shape{display:block;width:100%;height:100%;fill:var(--%NS%_kpt-map-marker-bg, var(--%NS%kpt-color-muted));stroke:var(--%NS%kpt-color-surface-raised);stroke-width:1.5;filter:drop-shadow(0 1px 2px rgba(0,0,0,.25))}.kpt-map__marker-glyph{position:absolute;display:grid;place-items:center;font-size:.875rem}.kpt-map__marker-glyph svg{width:1em;height:1em}.kpt-map__marker--pin .kpt-map__marker-glyph{inset:0 0 auto;height:76%}.kpt-map__marker--dot,.kpt-map__marker--square{display:grid;place-items:center;background:var(--%NS%_kpt-map-marker-bg, var(--%NS%kpt-color-muted));border:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-surface-raised);box-shadow:var(--%NS%kpt-elevation-1)}.kpt-map__marker--dot{border-radius:var(--%NS%kpt-radius-full)}.kpt-map__marker--square{border-radius:var(--%NS%kpt-radius-sm)}.kpt-map__marker--dot .kpt-map__marker-glyph,.kpt-map__marker--square .kpt-map__marker-glyph{position:static}.kpt-map__marker--selected{z-index:1}.kpt-map__marker--selected .kpt-map__marker-shape{stroke:var(--%NS%kpt-color-focus-ring);stroke-width:2.5}.kpt-map__cluster{display:grid;place-items:center;width:100%;height:100%;font-weight:var(--%NS%kpt-font-weight-semibold);font-variant-numeric:tabular-nums;color:var(--%NS%_kpt-map-cluster-fg, var(--%NS%kpt-color-primary-contrast));background:var(--%NS%_kpt-map-cluster-bg, var(--%NS%kpt-map-cluster-bg, var(--%NS%kpt-color-primary)));border:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-surface-raised);border-radius:var(--%NS%kpt-radius-full);box-shadow:var(--%NS%kpt-elevation-2)}.kpt-map__cluster--sm{font-size:var(--%NS%kpt-font-size-xs);scale:.78}.kpt-map__cluster--md{font-size:var(--%NS%kpt-font-size-sm);scale:.9}.kpt-map__cluster--lg{font-size:var(--%NS%kpt-font-size-sm);scale:1}.kpt-map__user-marker{display:grid;place-items:center;width:100%;height:100%;font-size:.875rem;color:var(--%NS%kpt-color-info-contrast);background:var(--%NS%kpt-color-info);border:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-surface-raised);border-radius:var(--%NS%kpt-radius-full);box-shadow:var(--%NS%kpt-elevation-2)}.kpt-map__user-marker svg{width:1em;height:1em}.kpt-map__popup{position:absolute;top:var(--%NS%_kpt-map-y, 0);left:var(--%NS%_kpt-map-x, 0);z-index:3;max-width:min(var(--%NS%kpt-map-popup-width, 20rem),100% - var(--%NS%kpt-space-6));padding:var(--%NS%kpt-space-4);color:var(--%NS%kpt-color-on-surface);background:var(--%NS%kpt-map-popup-bg, var(--%NS%kpt-color-surface-raised));border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-lg);box-shadow:var(--%NS%kpt-map-popup-shadow, var(--%NS%kpt-elevation-3));translate:-50% calc(-100% - var(--%NS%kpt-space-3))}.kpt-map__popup:after{position:absolute;top:100%;left:50%;width:.75rem;height:.75rem;content:\"\";background:inherit;border-right:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-bottom:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);rotate:45deg;translate:-50% -50%}.kpt-map__popup[data-layout=card]{max-width:min(var(--%NS%kpt-map-popup-width-card, 26rem),100% - var(--%NS%kpt-space-6));width:min(var(--%NS%kpt-map-popup-width-card, 26rem),100% - var(--%NS%kpt-space-6));max-height:min(var(--%NS%kpt-map-popup-max-height, 32rem),100% - var(--%NS%kpt-space-8));padding:0;display:flex;flex-direction:column}.kpt-map__popup[data-layout=card] .kpt-map__popup-body{display:flex;min-height:0;padding:0;overflow:hidden}.kpt-map__popup[data-layout=card] .kpt-map__popup-body>*{flex:1 1 auto;min-height:0}.kpt-map__popup[data-layout=card] .kpt-map__popup-group,.kpt-map__popup[data-layout=card] .kpt-map__popup-tabs{margin-inline:var(--%NS%kpt-space-4)}.kpt-map__popup[data-layout=card] .kpt-map__popup-group{margin-top:var(--%NS%kpt-space-3)}.kpt-map__popup-close{position:absolute;top:var(--%NS%kpt-space-2);right:var(--%NS%kpt-space-2);display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:var(--%NS%kpt-font-size-lg);line-height:1;color:var(--%NS%kpt-color-on-surface-muted);cursor:pointer;background:transparent;border:none;border-radius:var(--%NS%kpt-radius-full)}.kpt-map__popup-close:hover{background:var(--%NS%kpt-color-surface-hover)}.kpt-map__popup-close:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:1px}.kpt-map__popup-body{padding-right:var(--%NS%kpt-space-5);font-size:var(--%NS%kpt-font-size-sm)}.kpt-map__popup-body p{margin:0 0 var(--%NS%kpt-space-1)}.kpt-map__popup-title{display:block;margin-bottom:var(--%NS%kpt-space-1);font-size:var(--%NS%kpt-font-size-base)}.kpt-map__popup-category{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map__popup-group{margin:0 var(--%NS%kpt-space-5) var(--%NS%kpt-space-2) 0;font-size:var(--%NS%kpt-font-size-xs);color:var(--%NS%kpt-color-on-surface-muted);text-transform:uppercase}.kpt-map__popup-tabs{display:flex;flex-wrap:wrap;gap:var(--%NS%kpt-space-1);margin-bottom:var(--%NS%kpt-space-2)}.kpt-map__popup-tab{padding:var(--%NS%kpt-space-1) var(--%NS%kpt-space-2);font:inherit;font-size:var(--%NS%kpt-font-size-xs);color:var(--%NS%kpt-color-on-surface);cursor:pointer;background:var(--%NS%kpt-color-surface-variant);border:var(--%NS%kpt-border-width-thin) solid transparent;border-radius:var(--%NS%kpt-radius-sm)}.kpt-map__popup-tab[aria-selected=true]{background:var(--%NS%kpt-color-surface-selected);border-color:var(--%NS%kpt-color-border-strong)}.kpt-map__popup-tab:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:1px}.kpt-map__context{position:absolute;top:var(--%NS%_kpt-map-y, 0);left:var(--%NS%_kpt-map-x, 0);z-index:4;min-width:12rem;padding:var(--%NS%kpt-space-2);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md);box-shadow:var(--%NS%kpt-elevation-3)}.kpt-map__context-title{margin:0 0 var(--%NS%kpt-space-1);padding:0 var(--%NS%kpt-space-2);font-size:var(--%NS%kpt-font-size-xs);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map__context-item{display:flex;gap:var(--%NS%kpt-space-2);align-items:center;width:100%;padding:var(--%NS%kpt-space-2);font:inherit;font-size:var(--%NS%kpt-font-size-sm);color:var(--%NS%kpt-color-on-surface);text-align:start;cursor:pointer;background:transparent;border:none;border-radius:var(--%NS%kpt-radius-sm)}.kpt-map__context-item:hover{background:var(--%NS%kpt-color-surface-hover)}.kpt-map__context-item:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:-2px}.kpt-map__context-empty{margin:0;padding:var(--%NS%kpt-space-2);font-size:var(--%NS%kpt-font-size-sm);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map__context-dot{width:.5rem;height:.5rem;background:var(--%NS%kpt-color-border-strong);border-radius:var(--%NS%kpt-radius-full)}.kpt-map[data-engine=google] .kpt-map__accuracy{background:color-mix(in oklch,var(--%NS%kpt-color-info) 15%,transparent);border:var(--%NS%kpt-border-width-thin) solid color-mix(in oklch,var(--%NS%kpt-color-info) 50%,transparent)}}.kpt-map .leaflet-container{font-family:var(--%NS%kpt-font-family-sans);font-size:var(--%NS%kpt-font-size-sm);background:var(--%NS%kpt-color-surface-sunken);z-index:0}.kpt-map .leaflet-div-icon,.kpt-map .kpt-map__icon{background:transparent;border:none}.kpt-map .leaflet-control-attribution{padding:0 var(--%NS%kpt-space-1);font-size:var(--%NS%kpt-font-size-xs);color:var(--%NS%kpt-color-on-surface-muted);background:color-mix(in oklch,var(--%NS%kpt-color-surface-raised) 85%,transparent)}.kpt-map .leaflet-control-attribution a{color:var(--%NS%kpt-color-primary)}.kpt-map .kpt-map__accuracy{fill:var(--%NS%kpt-color-info);fill-opacity:.15;stroke:var(--%NS%kpt-color-info);stroke-opacity:.5}.kpt-map .leaflet-popup-content-wrapper,.kpt-map .leaflet-popup-tip{display:none}\n"], encapsulation: 2 }); }
|
|
2758
2786
|
}
|
|
2759
2787
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptMap, [{
|
|
2760
2788
|
type: Component,
|
|
2761
|
-
args: [{ selector: 'kpt-map', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet, KptDialog, KptMapLegend, KptMapSearch, KptMapCreateDialog], host: {
|
|
2789
|
+
args: [{ selector: 'kpt-map', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet, KptDialog, KptIcon, KptMapLegend, KptMapSearch, KptMapCreateDialog], host: {
|
|
2762
2790
|
class: 'kpt-map',
|
|
2763
2791
|
'[style.--kpt-map-height]': 'height()',
|
|
2764
2792
|
'[attr.data-engine]': 'engineKind()',
|
|
2765
|
-
}, template: "<div class=\"kpt-map__viewport\">\n <!-- Kontener silnika. Wszystko poni\u017Cej to warstwa Angulara rozpi\u0119ta nad map\u0105. -->\n <div #canvas class=\"kpt-map__canvas\"></div>\n\n <div class=\"kpt-map__controls\" role=\"group\" [attr.aria-label]=\"i18n.t('map.legend')\">\n <button\n class=\"kpt-map__control\"\n type=\"button\"\n [attr.aria-label]=\"i18n.t('map.zoomIn')\"\n [title]=\"i18n.t('map.zoomIn')\"\n [disabled]=\"!ready()\"\n (click)=\"zoomBy(1)\"\n >\n <span aria-hidden=\"true\">+</span>\n </button>\n <button\n class=\"kpt-map__control\"\n type=\"button\"\n [attr.aria-label]=\"i18n.t('map.zoomOut')\"\n [title]=\"i18n.t('map.zoomOut')\"\n [disabled]=\"!ready()\"\n (click)=\"zoomBy(-1)\"\n >\n <span aria-hidden=\"true\">\u2212</span>\n </button>\n @if (showUserLocation()) {\n <button\n class=\"kpt-map__control kpt-map__control--locate\"\n type=\"button\"\n [attr.aria-label]=\"locationBlocked() ? i18n.t('map.locationDenied') : i18n.t('map.locateMe')\"\n [title]=\"locationBlocked() ? i18n.t('map.locationDenied') : i18n.t('map.locateMe')\"\n [disabled]=\"!userPosition()\"\n (click)=\"centreOnUser()\"\n >\n <span class=\"kpt-map__crosshair\" aria-hidden=\"true\"></span>\n </button>\n }\n </div>\n\n <!--\n Wyszukiwarka adres\u00F3w. Renderowana tylko wtedy, gdy port ma czym szuka\u0107.\n\n Pozycjonuje j\u0105 OPAKOWANIE, a nie klasa postawiona wprost na <kpt-map-search> \u2014\n pow\u00F3d stoi przy regule .kpt-map__search w map.component.scss.\n -->\n @if (searchEnabled()) {\n <div class=\"kpt-map__search\">\n <kpt-map-search\n [geocoder]=\"activeGeocoder()\"\n [placeholder]=\"searchPlaceholder()\"\n [minLength]=\"searchOptions().minLength ?? 3\"\n [debounce]=\"searchOptions().debounce ?? 300\"\n [limit]=\"searchOptions().limit ?? 5\"\n [viewbox]=\"searchViewbox()\"\n [countryCodes]=\"searchCountryCodes()\"\n (selected)=\"onSearchSelect($event)\"\n (cleared)=\"clearSearchPin()\"\n />\n </div>\n }\n\n <!-- Menu pod prawym przyciskiem: wyb\u00F3r kategorii nowej lokalizacji. -->\n @if (allowCreate() && contextTarget()) {\n @if (contextPosition(); as position) {\n <div\n class=\"kpt-map__context\"\n role=\"menu\"\n [attr.aria-label]=\"i18n.t('map.addLocation')\"\n [style.--_kpt-map-x.px]=\"position.x\"\n [style.--_kpt-map-y.px]=\"position.y\"\n >\n <p class=\"kpt-map__context-title\">{{ i18n.t('map.chooseCategory') }}</p>\n @for (category of creatableCategories(); track category.id) {\n <button class=\"kpt-map__context-item\" type=\"button\" role=\"menuitem\" (click)=\"startCreate(category)\">\n <span class=\"kpt-map__context-dot\" aria-hidden=\"true\"></span>\n {{ category.label }}\n </button>\n } @empty {\n <p class=\"kpt-map__context-empty\">{{ i18n.t('map.empty') }}</p>\n }\n </div>\n }\n }\n\n <!-- Popup szczeg\u00F3\u0142\u00F3w. Renderowany przez Angulara, pozycjonowany z engine.project(). -->\n @if (popup(); as state) {\n @if (popupPosition(); as position) {\n <div\n #popupEl\n class=\"kpt-map__popup\"\n role=\"dialog\"\n [attr.data-layout]=\"popupLayout()\"\n [attr.aria-label]=\"state.location.title\"\n [style.--_kpt-map-x.px]=\"position.x\"\n [style.--_kpt-map-y.px]=\"position.y\"\n >\n <!-- W wariancie `card` krzy\u017Cyk daje karta, wi\u0119c wbudowany by\u0142by drugim. -->\n @if (popupLayout() === 'plain') {\n <button\n class=\"kpt-map__popup-close\"\n type=\"button\"\n [attr.aria-label]=\"i18n.t('common.close')\"\n (click)=\"closePopup()\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n }\n\n @if (state.group) {\n <!-- Grupa punkt\u00F3w o tej samej wsp\u00F3\u0142rz\u0119dnej \u2014 zoom jej nie rozdzieli. -->\n <p class=\"kpt-map__popup-group\">{{ i18n.t('map.clusterItems') }}</p>\n <div class=\"kpt-map__popup-tabs\" role=\"tablist\">\n @for (item of state.group.items; track item.id) {\n <button\n class=\"kpt-map__popup-tab\"\n type=\"button\"\n role=\"tab\"\n [attr.aria-selected]=\"item.id === state.location.id\"\n (click)=\"selectFromGroup(item)\"\n >\n {{ item.title }}\n </button>\n }\n </div>\n }\n\n <div class=\"kpt-map__popup-body\">\n @if (popupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl.templateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: state.location,\n data: state.location.data,\n category: popupCategory(),\n distance: popupDistance(),\n close: closePopupFn\n }\"\n />\n } @else {\n <strong class=\"kpt-map__popup-title\">{{ state.location.title }}</strong>\n @if (popupCategory(); as category) {\n <p class=\"kpt-map__popup-category\">{{ category.label }}</p>\n }\n }\n </div>\n </div>\n }\n }\n</div>\n\n@if (legend()) {\n <kpt-map-legend\n class=\"kpt-map__legend\"\n [categories]=\"categories()\"\n [(hidden)]=\"hiddenCategories\"\n [counts]=\"counts()\"\n />\n}\n\n<!-- Dialog dodawania: schema z kategorii, a w\u0142asny szablon ma pierwsze\u0144stwo. -->\n<kpt-dialog [(open)]=\"createOpen\" [header]=\"i18n.t('map.addLocation')\">\n @if (createFor(); as target) {\n @if (createFormTemplate(); as tpl) {\n @if (createFormApi(); as api) {\n <ng-container\n [ngTemplateOutlet]=\"tpl.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: api, at: target.at, category: target.category }\"\n />\n }\n } @else {\n <kpt-map-create-dialog\n [geocoder]=\"activeGeocoder()\"\n [category]=\"target.category\"\n [at]=\"target.at\"\n (save)=\"emitCreate($event)\"\n (cancelled)=\"closeCreate()\"\n />\n }\n }\n</kpt-dialog>\n", styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map{--kpt-map-height: 480px;display:flex;flex-direction:column;gap:var(--kpt-space-3);width:100%;isolation:isolate}.kpt-map__viewport{position:relative;height:var(--kpt-map-height);overflow:hidden;background:var(--kpt-map-bg, var(--kpt-color-surface-sunken));border:var(--kpt-border-width-thin) solid var(--kpt-map-border, var(--kpt-color-border));border-radius:var(--kpt-map-radius, var(--kpt-radius-lg))}.kpt-map__canvas{width:100%;height:100%}.kpt-map__controls{position:absolute;top:var(--kpt-space-3);left:var(--kpt-space-3);z-index:2;display:flex;flex-direction:column;gap:var(--kpt-space-1)}.kpt-map__control{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:var(--kpt-font-size-lg);line-height:1;color:var(--kpt-color-on-surface);cursor:pointer;background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md);box-shadow:var(--kpt-elevation-1)}.kpt-map__control:hover:not(:disabled){background:var(--kpt-color-surface-hover)}.kpt-map__control:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:2px}.kpt-map__control:disabled{color:var(--kpt-color-on-surface-muted);cursor:not-allowed;opacity:.6}.kpt-map__search{position:absolute;top:var(--kpt-space-3);right:var(--kpt-space-3);z-index:5;max-width:calc(100% - 2rem - var(--kpt-space-3) * 3)}.kpt-map__crosshair{position:relative;width:.875rem;height:.875rem;border:var(--kpt-border-width-medium) solid currentcolor;border-radius:var(--kpt-radius-full)}.kpt-map__crosshair:after{position:absolute;inset:50% auto auto 50%;width:.25rem;height:.25rem;content:\"\";background:currentcolor;border-radius:var(--kpt-radius-full);translate:-50% -50%}.kpt-map__marker{position:relative;display:block;width:100%;height:100%;color:var(--_kpt-map-marker-fg, var(--kpt-color-text-inverse))}.kpt-map__marker-shape{display:block;width:100%;height:100%;fill:var(--_kpt-map-marker-bg, var(--kpt-color-muted));stroke:var(--kpt-color-surface-raised);stroke-width:1.5;filter:drop-shadow(0 1px 2px rgba(0,0,0,.25))}.kpt-map__marker-glyph{position:absolute;display:grid;place-items:center;font-size:.875rem}.kpt-map__marker-glyph svg{width:1em;height:1em}.kpt-map__marker--pin .kpt-map__marker-glyph{inset:0 0 auto;height:76%}.kpt-map__marker--dot,.kpt-map__marker--square{display:grid;place-items:center;background:var(--_kpt-map-marker-bg, var(--kpt-color-muted));border:var(--kpt-border-width-medium) solid var(--kpt-color-surface-raised);box-shadow:var(--kpt-elevation-1)}.kpt-map__marker--dot{border-radius:var(--kpt-radius-full)}.kpt-map__marker--square{border-radius:var(--kpt-radius-sm)}.kpt-map__marker--dot .kpt-map__marker-glyph,.kpt-map__marker--square .kpt-map__marker-glyph{position:static}.kpt-map__marker--selected{z-index:1}.kpt-map__marker--selected .kpt-map__marker-shape{stroke:var(--kpt-color-focus-ring);stroke-width:2.5}.kpt-map__cluster{display:grid;place-items:center;width:100%;height:100%;font-weight:var(--kpt-font-weight-semibold);font-variant-numeric:tabular-nums;color:var(--_kpt-map-cluster-fg, var(--kpt-color-primary-contrast));background:var(--_kpt-map-cluster-bg, var(--kpt-map-cluster-bg, var(--kpt-color-primary)));border:var(--kpt-border-width-medium) solid var(--kpt-color-surface-raised);border-radius:var(--kpt-radius-full);box-shadow:var(--kpt-elevation-2)}.kpt-map__cluster--sm{font-size:var(--kpt-font-size-xs);scale:.78}.kpt-map__cluster--md{font-size:var(--kpt-font-size-sm);scale:.9}.kpt-map__cluster--lg{font-size:var(--kpt-font-size-sm);scale:1}.kpt-map__user-marker{display:grid;place-items:center;width:100%;height:100%;font-size:.875rem;color:var(--kpt-color-info-contrast);background:var(--kpt-color-info);border:var(--kpt-border-width-medium) solid var(--kpt-color-surface-raised);border-radius:var(--kpt-radius-full);box-shadow:var(--kpt-elevation-2)}.kpt-map__user-marker svg{width:1em;height:1em}.kpt-map__popup{position:absolute;top:var(--_kpt-map-y, 0);left:var(--_kpt-map-x, 0);z-index:3;max-width:min(var(--kpt-map-popup-width, 20rem),100% - var(--kpt-space-6));padding:var(--kpt-space-4);color:var(--kpt-color-on-surface);background:var(--kpt-map-popup-bg, var(--kpt-color-surface-raised));border:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-radius:var(--kpt-radius-lg);box-shadow:var(--kpt-map-popup-shadow, var(--kpt-elevation-3));translate:-50% calc(-100% - var(--kpt-space-3))}.kpt-map__popup:after{position:absolute;top:100%;left:50%;width:.75rem;height:.75rem;content:\"\";background:inherit;border-right:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-bottom:var(--kpt-border-width-thin) solid var(--kpt-color-border);rotate:45deg;translate:-50% -50%}.kpt-map__popup[data-layout=card]{max-width:min(var(--kpt-map-popup-width-card, 26rem),100% - var(--kpt-space-6));width:min(var(--kpt-map-popup-width-card, 26rem),100% - var(--kpt-space-6));max-height:min(var(--kpt-map-popup-max-height, 32rem),100% - var(--kpt-space-8));padding:0;display:flex;flex-direction:column}.kpt-map__popup[data-layout=card] .kpt-map__popup-body{display:flex;min-height:0;padding:0;overflow:hidden}.kpt-map__popup[data-layout=card] .kpt-map__popup-body>*{flex:1 1 auto;min-height:0}.kpt-map__popup[data-layout=card] .kpt-map__popup-group,.kpt-map__popup[data-layout=card] .kpt-map__popup-tabs{margin-inline:var(--kpt-space-4)}.kpt-map__popup[data-layout=card] .kpt-map__popup-group{margin-top:var(--kpt-space-3)}.kpt-map__popup-close{position:absolute;top:var(--kpt-space-2);right:var(--kpt-space-2);display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:var(--kpt-font-size-lg);line-height:1;color:var(--kpt-color-on-surface-muted);cursor:pointer;background:transparent;border:none;border-radius:var(--kpt-radius-full)}.kpt-map__popup-close:hover{background:var(--kpt-color-surface-hover)}.kpt-map__popup-close:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:1px}.kpt-map__popup-body{padding-right:var(--kpt-space-5);font-size:var(--kpt-font-size-sm)}.kpt-map__popup-body p{margin:0 0 var(--kpt-space-1)}.kpt-map__popup-title{display:block;margin-bottom:var(--kpt-space-1);font-size:var(--kpt-font-size-base)}.kpt-map__popup-category{color:var(--kpt-color-on-surface-muted)}.kpt-map__popup-group{margin:0 var(--kpt-space-5) var(--kpt-space-2) 0;font-size:var(--kpt-font-size-xs);color:var(--kpt-color-on-surface-muted);text-transform:uppercase}.kpt-map__popup-tabs{display:flex;flex-wrap:wrap;gap:var(--kpt-space-1);margin-bottom:var(--kpt-space-2)}.kpt-map__popup-tab{padding:var(--kpt-space-1) var(--kpt-space-2);font:inherit;font-size:var(--kpt-font-size-xs);color:var(--kpt-color-on-surface);cursor:pointer;background:var(--kpt-color-surface-variant);border:var(--kpt-border-width-thin) solid transparent;border-radius:var(--kpt-radius-sm)}.kpt-map__popup-tab[aria-selected=true]{background:var(--kpt-color-surface-selected);border-color:var(--kpt-color-border-strong)}.kpt-map__popup-tab:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:1px}.kpt-map__context{position:absolute;top:var(--_kpt-map-y, 0);left:var(--_kpt-map-x, 0);z-index:4;min-width:12rem;padding:var(--kpt-space-2);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md);box-shadow:var(--kpt-elevation-3)}.kpt-map__context-title{margin:0 0 var(--kpt-space-1);padding:0 var(--kpt-space-2);font-size:var(--kpt-font-size-xs);color:var(--kpt-color-on-surface-muted)}.kpt-map__context-item{display:flex;gap:var(--kpt-space-2);align-items:center;width:100%;padding:var(--kpt-space-2);font:inherit;font-size:var(--kpt-font-size-sm);color:var(--kpt-color-on-surface);text-align:start;cursor:pointer;background:transparent;border:none;border-radius:var(--kpt-radius-sm)}.kpt-map__context-item:hover{background:var(--kpt-color-surface-hover)}.kpt-map__context-item:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:-2px}.kpt-map__context-empty{margin:0;padding:var(--kpt-space-2);font-size:var(--kpt-font-size-sm);color:var(--kpt-color-on-surface-muted)}.kpt-map__context-dot{width:.5rem;height:.5rem;background:var(--kpt-color-border-strong);border-radius:var(--kpt-radius-full)}.kpt-map[data-engine=google] .kpt-map__accuracy{background:color-mix(in oklch,var(--kpt-color-info) 15%,transparent);border:var(--kpt-border-width-thin) solid color-mix(in oklch,var(--kpt-color-info) 50%,transparent)}}.kpt-map .leaflet-container{font-family:var(--kpt-font-family-sans);font-size:var(--kpt-font-size-sm);background:var(--kpt-color-surface-sunken);z-index:0}.kpt-map .leaflet-div-icon,.kpt-map .kpt-map__icon{background:transparent;border:none}.kpt-map .leaflet-control-attribution{padding:0 var(--kpt-space-1);font-size:var(--kpt-font-size-xs);color:var(--kpt-color-on-surface-muted);background:color-mix(in oklch,var(--kpt-color-surface-raised) 85%,transparent)}.kpt-map .leaflet-control-attribution a{color:var(--kpt-color-primary)}.kpt-map .kpt-map__accuracy{fill:var(--kpt-color-info);fill-opacity:.15;stroke:var(--kpt-color-info);stroke-opacity:.5}.kpt-map .leaflet-popup-content-wrapper,.kpt-map .leaflet-popup-tip{display:none}\n"] }]
|
|
2766
|
-
}], () => [], { locations: [{ type: i0.Input, args: [{ isSignal: true, alias: "locations", required: true }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], country: [{ type: i0.Input, args: [{ isSignal: true, alias: "country", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], restrictToCountry: [{ type: i0.Input, args: [{ isSignal: true, alias: "restrictToCountry", required: false }] }], bounds: [{ type: i0.Input, args: [{ isSignal: true, alias: "bounds", required: false }] }], cluster: [{ type: i0.Input, args: [{ isSignal: true, alias: "cluster", required: false }] }], clusterOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "clusterOptions", required: false }] }], clusterColorBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "clusterColorBy", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], hiddenCategories: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenCategories", required: false }] }, { type: i0.Output, args: ["hiddenCategoriesChange"] }], legendCounts: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendCounts", required: false }] }], showUserLocation: [{ type: i0.Input, args: [{ isSignal: true, alias: "showUserLocation", required: false }] }], followUser: [{ type: i0.Input, args: [{ isSignal: true, alias: "followUser", required: false }] }], allowCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCreate", required: false }] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], searchOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchOptions", required: false }] }], searchZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchZoom", required: false }] }], searchMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchMarker", required: false }] }], popupLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupLayout", required: false }] }], distanceFrom: [{ type: i0.Input, args: [{ isSignal: true, alias: "distanceFrom", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], tileUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "tileUrl", required: false }] }], attribution: [{ type: i0.Input, args: [{ isSignal: true, alias: "attribution", required: false }] }], engine: [{ type: i0.Input, args: [{ isSignal: true, alias: "engine", required: false }] }], geocoder: [{ type: i0.Input, args: [{ isSignal: true, alias: "geocoder", required: false }] }], locationClick: [{ type: i0.Output, args: ["locationClick"] }], clusterClick: [{ type: i0.Output, args: ["clusterClick"] }], locationCreate: [{ type: i0.Output, args: ["locationCreate"] }], searchSelect: [{ type: i0.Output, args: ["searchSelect"] }], viewChange: [{ type: i0.Output, args: ["viewChange"] }], userPositionChange: [{ type: i0.Output, args: ["userPositionChange"] }], userLocationError: [{ type: i0.Output, args: ["userLocationError"] }], engineError: [{ type: i0.Output, args: ["engineError"] }], canvas: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }], popupEl: [{ type: i0.ViewChild, args: ['popupEl', { isSignal: true }] }], popupTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KptMapPopupTemplate), { isSignal: true }] }], createFormTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KptMapCreateFormTemplate), { isSignal: true }] }] }); })();
|
|
2793
|
+
}, template: "<div class=\"kpt-map__viewport\">\n <!-- Kontener silnika. Wszystko poni\u017Cej to warstwa Angulara rozpi\u0119ta nad map\u0105. -->\n <div #canvas class=\"kpt-map__canvas\"></div>\n\n <div class=\"kpt-map__controls\" role=\"group\" [attr.aria-label]=\"i18n.t('map.legend')\">\n <button\n class=\"kpt-map__control\"\n type=\"button\"\n [attr.aria-label]=\"i18n.t('map.zoomIn')\"\n [title]=\"i18n.t('map.zoomIn')\"\n [disabled]=\"!ready()\"\n (click)=\"zoomBy(1)\"\n >\n <kpt-icon name=\"plus\" />\n </button>\n <button\n class=\"kpt-map__control\"\n type=\"button\"\n [attr.aria-label]=\"i18n.t('map.zoomOut')\"\n [title]=\"i18n.t('map.zoomOut')\"\n [disabled]=\"!ready()\"\n (click)=\"zoomBy(-1)\"\n >\n <kpt-icon name=\"minus\" />\n </button>\n @if (showUserLocation()) {\n <button\n class=\"kpt-map__control kpt-map__control--locate\"\n type=\"button\"\n [attr.aria-label]=\"locationBlocked() ? i18n.t('map.locationDenied') : i18n.t('map.locateMe')\"\n [title]=\"locationBlocked() ? i18n.t('map.locationDenied') : i18n.t('map.locateMe')\"\n [disabled]=\"!userPosition()\"\n (click)=\"centreOnUser()\"\n >\n <span class=\"kpt-map__crosshair\" aria-hidden=\"true\"></span>\n </button>\n }\n </div>\n\n <!--\n Wyszukiwarka adres\u00F3w. Renderowana tylko wtedy, gdy port ma czym szuka\u0107.\n\n Pozycjonuje j\u0105 OPAKOWANIE, a nie klasa postawiona wprost na <kpt-map-search> -\n pow\u00F3d stoi przy regule .kpt-map__search w map.component.scss.\n -->\n @if (searchEnabled()) {\n <div class=\"kpt-map__search\">\n <kpt-map-search\n [geocoder]=\"activeGeocoder()\"\n [placeholder]=\"searchPlaceholder()\"\n [minLength]=\"searchOptions().minLength ?? 3\"\n [debounce]=\"searchOptions().debounce ?? 300\"\n [limit]=\"searchOptions().limit ?? 5\"\n [viewbox]=\"searchViewbox()\"\n [countryCodes]=\"searchCountryCodes()\"\n [speech]=\"searchSpeech()\"\n [speechLang]=\"searchSpeechLang()\"\n [speechColor]=\"searchSpeechColor()\"\n (selected)=\"onSearchSelect($event)\"\n (cleared)=\"clearSearchPin()\"\n />\n </div>\n }\n\n <!-- Menu pod prawym przyciskiem: wyb\u00F3r kategorii nowej lokalizacji. -->\n @if (allowCreate() && contextTarget()) {\n @if (contextPosition(); as position) {\n <div\n class=\"kpt-map__context\"\n role=\"menu\"\n [attr.aria-label]=\"i18n.t('map.addLocation')\"\n [style.--_kpt-map-x.px]=\"position.x\"\n [style.--_kpt-map-y.px]=\"position.y\"\n >\n <p class=\"kpt-map__context-title\">{{ i18n.t('map.chooseCategory') }}</p>\n @for (category of creatableCategories(); track category.id) {\n <button class=\"kpt-map__context-item\" type=\"button\" role=\"menuitem\" (click)=\"startCreate(category)\">\n <span class=\"kpt-map__context-dot\" aria-hidden=\"true\"></span>\n {{ category.label }}\n </button>\n } @empty {\n <p class=\"kpt-map__context-empty\">{{ i18n.t('map.empty') }}</p>\n }\n </div>\n }\n }\n\n <!-- Popup szczeg\u00F3\u0142\u00F3w. Renderowany przez Angulara, pozycjonowany z engine.project(). -->\n @if (popup(); as state) {\n @if (popupPosition(); as position) {\n <div\n #popupEl\n class=\"kpt-map__popup\"\n role=\"dialog\"\n [attr.data-layout]=\"popupLayout()\"\n [attr.aria-label]=\"state.location.title\"\n [style.--_kpt-map-x.px]=\"position.x\"\n [style.--_kpt-map-y.px]=\"position.y\"\n >\n <!-- W wariancie `card` krzy\u017Cyk daje karta, wi\u0119c wbudowany by\u0142by drugim. -->\n @if (popupLayout() === 'plain') {\n <button\n class=\"kpt-map__popup-close\"\n type=\"button\"\n [attr.aria-label]=\"i18n.t('common.close')\"\n (click)=\"closePopup()\"\n >\n <span aria-hidden=\"true\">x</span>\n </button>\n }\n\n @if (state.group) {\n <!-- Grupa punkt\u00F3w o tej samej wsp\u00F3\u0142rz\u0119dnej - zoom jej nie rozdzieli. -->\n <p class=\"kpt-map__popup-group\">{{ i18n.t('map.clusterItems') }}</p>\n <div class=\"kpt-map__popup-tabs\" role=\"tablist\">\n @for (item of state.group.items; track item.id) {\n <button\n class=\"kpt-map__popup-tab\"\n type=\"button\"\n role=\"tab\"\n [attr.aria-selected]=\"item.id === state.location.id\"\n (click)=\"selectFromGroup(item)\"\n >\n {{ item.title }}\n </button>\n }\n </div>\n }\n\n <div class=\"kpt-map__popup-body\">\n @if (popupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl.templateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: state.location,\n data: state.location.data,\n category: popupCategory(),\n distance: popupDistance(),\n close: closePopupFn\n }\"\n />\n } @else {\n <strong class=\"kpt-map__popup-title\">{{ state.location.title }}</strong>\n @if (popupCategory(); as category) {\n <p class=\"kpt-map__popup-category\">{{ category.label }}</p>\n }\n }\n </div>\n </div>\n }\n }\n</div>\n\n@if (legend()) {\n <kpt-map-legend\n class=\"kpt-map__legend\"\n [categories]=\"categories()\"\n [(hidden)]=\"hiddenCategories\"\n [counts]=\"counts()\"\n />\n}\n\n<!-- Dialog dodawania: schema z kategorii, a w\u0142asny szablon ma pierwsze\u0144stwo. -->\n<kpt-dialog [(open)]=\"createOpen\" [header]=\"i18n.t('map.addLocation')\">\n @if (createFor(); as target) {\n @if (createFormTemplate(); as tpl) {\n @if (createFormApi(); as api) {\n <ng-container\n [ngTemplateOutlet]=\"tpl.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: api, at: target.at, category: target.category }\"\n />\n }\n } @else {\n <kpt-map-create-dialog\n [geocoder]=\"activeGeocoder()\"\n [category]=\"target.category\"\n [at]=\"target.at\"\n (save)=\"emitCreate($event)\"\n (cancelled)=\"closeCreate()\"\n />\n }\n }\n</kpt-dialog>\n", styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map{--kpt-map-height: 480px;display:flex;flex-direction:column;gap:var(--kpt-space-3);width:100%;isolation:isolate}.kpt-map__viewport{position:relative;height:var(--kpt-map-height);overflow:hidden;background:var(--kpt-map-bg, var(--kpt-color-surface-sunken));border:var(--kpt-border-width-thin) solid var(--kpt-map-border, var(--kpt-color-border));border-radius:var(--kpt-map-radius, var(--kpt-radius-lg))}.kpt-map__canvas{width:100%;height:100%}.kpt-map__controls{position:absolute;top:var(--kpt-space-3);left:var(--kpt-space-3);z-index:2;display:flex;flex-direction:column;gap:var(--kpt-space-1)}.kpt-map__control{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:var(--kpt-font-size-lg);line-height:1;color:var(--kpt-color-on-surface);cursor:pointer;background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md);box-shadow:var(--kpt-elevation-1)}.kpt-map__control:hover:not(:disabled){background:var(--kpt-color-surface-hover)}.kpt-map__control:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:2px}.kpt-map__control:disabled{color:var(--kpt-color-on-surface-muted);cursor:not-allowed;opacity:.6}.kpt-map__search{position:absolute;top:var(--kpt-space-3);right:var(--kpt-space-3);z-index:5;max-width:calc(100% - 2rem - var(--kpt-space-3) * 3)}.kpt-map__crosshair{position:relative;width:.875rem;height:.875rem;border:var(--kpt-border-width-medium) solid currentcolor;border-radius:var(--kpt-radius-full)}.kpt-map__crosshair:after{position:absolute;inset:50% auto auto 50%;width:.25rem;height:.25rem;content:\"\";background:currentcolor;border-radius:var(--kpt-radius-full);translate:-50% -50%}.kpt-map__marker{position:relative;display:block;width:100%;height:100%;color:var(--_kpt-map-marker-fg, var(--kpt-color-text-inverse))}.kpt-map__marker-shape{display:block;width:100%;height:100%;fill:var(--_kpt-map-marker-bg, var(--kpt-color-muted));stroke:var(--kpt-color-surface-raised);stroke-width:1.5;filter:drop-shadow(0 1px 2px rgba(0,0,0,.25))}.kpt-map__marker-glyph{position:absolute;display:grid;place-items:center;font-size:.875rem}.kpt-map__marker-glyph svg{width:1em;height:1em}.kpt-map__marker--pin .kpt-map__marker-glyph{inset:0 0 auto;height:76%}.kpt-map__marker--dot,.kpt-map__marker--square{display:grid;place-items:center;background:var(--_kpt-map-marker-bg, var(--kpt-color-muted));border:var(--kpt-border-width-medium) solid var(--kpt-color-surface-raised);box-shadow:var(--kpt-elevation-1)}.kpt-map__marker--dot{border-radius:var(--kpt-radius-full)}.kpt-map__marker--square{border-radius:var(--kpt-radius-sm)}.kpt-map__marker--dot .kpt-map__marker-glyph,.kpt-map__marker--square .kpt-map__marker-glyph{position:static}.kpt-map__marker--selected{z-index:1}.kpt-map__marker--selected .kpt-map__marker-shape{stroke:var(--kpt-color-focus-ring);stroke-width:2.5}.kpt-map__cluster{display:grid;place-items:center;width:100%;height:100%;font-weight:var(--kpt-font-weight-semibold);font-variant-numeric:tabular-nums;color:var(--_kpt-map-cluster-fg, var(--kpt-color-primary-contrast));background:var(--_kpt-map-cluster-bg, var(--kpt-map-cluster-bg, var(--kpt-color-primary)));border:var(--kpt-border-width-medium) solid var(--kpt-color-surface-raised);border-radius:var(--kpt-radius-full);box-shadow:var(--kpt-elevation-2)}.kpt-map__cluster--sm{font-size:var(--kpt-font-size-xs);scale:.78}.kpt-map__cluster--md{font-size:var(--kpt-font-size-sm);scale:.9}.kpt-map__cluster--lg{font-size:var(--kpt-font-size-sm);scale:1}.kpt-map__user-marker{display:grid;place-items:center;width:100%;height:100%;font-size:.875rem;color:var(--kpt-color-info-contrast);background:var(--kpt-color-info);border:var(--kpt-border-width-medium) solid var(--kpt-color-surface-raised);border-radius:var(--kpt-radius-full);box-shadow:var(--kpt-elevation-2)}.kpt-map__user-marker svg{width:1em;height:1em}.kpt-map__popup{position:absolute;top:var(--_kpt-map-y, 0);left:var(--_kpt-map-x, 0);z-index:3;max-width:min(var(--kpt-map-popup-width, 20rem),100% - var(--kpt-space-6));padding:var(--kpt-space-4);color:var(--kpt-color-on-surface);background:var(--kpt-map-popup-bg, var(--kpt-color-surface-raised));border:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-radius:var(--kpt-radius-lg);box-shadow:var(--kpt-map-popup-shadow, var(--kpt-elevation-3));translate:-50% calc(-100% - var(--kpt-space-3))}.kpt-map__popup:after{position:absolute;top:100%;left:50%;width:.75rem;height:.75rem;content:\"\";background:inherit;border-right:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-bottom:var(--kpt-border-width-thin) solid var(--kpt-color-border);rotate:45deg;translate:-50% -50%}.kpt-map__popup[data-layout=card]{max-width:min(var(--kpt-map-popup-width-card, 26rem),100% - var(--kpt-space-6));width:min(var(--kpt-map-popup-width-card, 26rem),100% - var(--kpt-space-6));max-height:min(var(--kpt-map-popup-max-height, 32rem),100% - var(--kpt-space-8));padding:0;display:flex;flex-direction:column}.kpt-map__popup[data-layout=card] .kpt-map__popup-body{display:flex;min-height:0;padding:0;overflow:hidden}.kpt-map__popup[data-layout=card] .kpt-map__popup-body>*{flex:1 1 auto;min-height:0}.kpt-map__popup[data-layout=card] .kpt-map__popup-group,.kpt-map__popup[data-layout=card] .kpt-map__popup-tabs{margin-inline:var(--kpt-space-4)}.kpt-map__popup[data-layout=card] .kpt-map__popup-group{margin-top:var(--kpt-space-3)}.kpt-map__popup-close{position:absolute;top:var(--kpt-space-2);right:var(--kpt-space-2);display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:var(--kpt-font-size-lg);line-height:1;color:var(--kpt-color-on-surface-muted);cursor:pointer;background:transparent;border:none;border-radius:var(--kpt-radius-full)}.kpt-map__popup-close:hover{background:var(--kpt-color-surface-hover)}.kpt-map__popup-close:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:1px}.kpt-map__popup-body{padding-right:var(--kpt-space-5);font-size:var(--kpt-font-size-sm)}.kpt-map__popup-body p{margin:0 0 var(--kpt-space-1)}.kpt-map__popup-title{display:block;margin-bottom:var(--kpt-space-1);font-size:var(--kpt-font-size-base)}.kpt-map__popup-category{color:var(--kpt-color-on-surface-muted)}.kpt-map__popup-group{margin:0 var(--kpt-space-5) var(--kpt-space-2) 0;font-size:var(--kpt-font-size-xs);color:var(--kpt-color-on-surface-muted);text-transform:uppercase}.kpt-map__popup-tabs{display:flex;flex-wrap:wrap;gap:var(--kpt-space-1);margin-bottom:var(--kpt-space-2)}.kpt-map__popup-tab{padding:var(--kpt-space-1) var(--kpt-space-2);font:inherit;font-size:var(--kpt-font-size-xs);color:var(--kpt-color-on-surface);cursor:pointer;background:var(--kpt-color-surface-variant);border:var(--kpt-border-width-thin) solid transparent;border-radius:var(--kpt-radius-sm)}.kpt-map__popup-tab[aria-selected=true]{background:var(--kpt-color-surface-selected);border-color:var(--kpt-color-border-strong)}.kpt-map__popup-tab:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:1px}.kpt-map__context{position:absolute;top:var(--_kpt-map-y, 0);left:var(--_kpt-map-x, 0);z-index:4;min-width:12rem;padding:var(--kpt-space-2);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md);box-shadow:var(--kpt-elevation-3)}.kpt-map__context-title{margin:0 0 var(--kpt-space-1);padding:0 var(--kpt-space-2);font-size:var(--kpt-font-size-xs);color:var(--kpt-color-on-surface-muted)}.kpt-map__context-item{display:flex;gap:var(--kpt-space-2);align-items:center;width:100%;padding:var(--kpt-space-2);font:inherit;font-size:var(--kpt-font-size-sm);color:var(--kpt-color-on-surface);text-align:start;cursor:pointer;background:transparent;border:none;border-radius:var(--kpt-radius-sm)}.kpt-map__context-item:hover{background:var(--kpt-color-surface-hover)}.kpt-map__context-item:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:-2px}.kpt-map__context-empty{margin:0;padding:var(--kpt-space-2);font-size:var(--kpt-font-size-sm);color:var(--kpt-color-on-surface-muted)}.kpt-map__context-dot{width:.5rem;height:.5rem;background:var(--kpt-color-border-strong);border-radius:var(--kpt-radius-full)}.kpt-map[data-engine=google] .kpt-map__accuracy{background:color-mix(in oklch,var(--kpt-color-info) 15%,transparent);border:var(--kpt-border-width-thin) solid color-mix(in oklch,var(--kpt-color-info) 50%,transparent)}}.kpt-map .leaflet-container{font-family:var(--kpt-font-family-sans);font-size:var(--kpt-font-size-sm);background:var(--kpt-color-surface-sunken);z-index:0}.kpt-map .leaflet-div-icon,.kpt-map .kpt-map__icon{background:transparent;border:none}.kpt-map .leaflet-control-attribution{padding:0 var(--kpt-space-1);font-size:var(--kpt-font-size-xs);color:var(--kpt-color-on-surface-muted);background:color-mix(in oklch,var(--kpt-color-surface-raised) 85%,transparent)}.kpt-map .leaflet-control-attribution a{color:var(--kpt-color-primary)}.kpt-map .kpt-map__accuracy{fill:var(--kpt-color-info);fill-opacity:.15;stroke:var(--kpt-color-info);stroke-opacity:.5}.kpt-map .leaflet-popup-content-wrapper,.kpt-map .leaflet-popup-tip{display:none}\n"] }]
|
|
2794
|
+
}], () => [], { locations: [{ type: i0.Input, args: [{ isSignal: true, alias: "locations", required: true }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], country: [{ type: i0.Input, args: [{ isSignal: true, alias: "country", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], restrictToCountry: [{ type: i0.Input, args: [{ isSignal: true, alias: "restrictToCountry", required: false }] }], bounds: [{ type: i0.Input, args: [{ isSignal: true, alias: "bounds", required: false }] }], cluster: [{ type: i0.Input, args: [{ isSignal: true, alias: "cluster", required: false }] }], clusterOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "clusterOptions", required: false }] }], clusterColorBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "clusterColorBy", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], hiddenCategories: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenCategories", required: false }] }, { type: i0.Output, args: ["hiddenCategoriesChange"] }], legendCounts: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendCounts", required: false }] }], showUserLocation: [{ type: i0.Input, args: [{ isSignal: true, alias: "showUserLocation", required: false }] }], followUser: [{ type: i0.Input, args: [{ isSignal: true, alias: "followUser", required: false }] }], allowCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCreate", required: false }] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], searchOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchOptions", required: false }] }], searchZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchZoom", required: false }] }], searchMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchMarker", required: false }] }], searchSpeech: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchSpeech", required: false }] }], searchSpeechLang: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchSpeechLang", required: false }] }], searchSpeechColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchSpeechColor", required: false }] }], popupLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupLayout", required: false }] }], distanceFrom: [{ type: i0.Input, args: [{ isSignal: true, alias: "distanceFrom", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], tileUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "tileUrl", required: false }] }], attribution: [{ type: i0.Input, args: [{ isSignal: true, alias: "attribution", required: false }] }], engine: [{ type: i0.Input, args: [{ isSignal: true, alias: "engine", required: false }] }], geocoder: [{ type: i0.Input, args: [{ isSignal: true, alias: "geocoder", required: false }] }], locationClick: [{ type: i0.Output, args: ["locationClick"] }], clusterClick: [{ type: i0.Output, args: ["clusterClick"] }], locationCreate: [{ type: i0.Output, args: ["locationCreate"] }], searchSelect: [{ type: i0.Output, args: ["searchSelect"] }], viewChange: [{ type: i0.Output, args: ["viewChange"] }], userPositionChange: [{ type: i0.Output, args: ["userPositionChange"] }], userLocationError: [{ type: i0.Output, args: ["userLocationError"] }], engineError: [{ type: i0.Output, args: ["engineError"] }], canvas: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }], popupEl: [{ type: i0.ViewChild, args: ['popupEl', { isSignal: true }] }], popupTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KptMapPopupTemplate), { isSignal: true }] }], createFormTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KptMapCreateFormTemplate), { isSignal: true }] }] }); })();
|
|
2767
2795
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptMap, { className: "KptMap", filePath: "lib/map.component.ts", lineNumber: 95 }); })();
|
|
2768
2796
|
|
|
2769
2797
|
const _c0 = () => [];
|
|
@@ -2867,7 +2895,7 @@ function KptMapPoiCard_Conditional_16_Conditional_5_Template(rf, ctx) { if (rf &
|
|
|
2867
2895
|
i0.ɵɵelementEnd();
|
|
2868
2896
|
} if (rf & 2) {
|
|
2869
2897
|
i0.ɵɵadvance();
|
|
2870
|
-
i0.ɵɵtextInterpolate1("
|
|
2898
|
+
i0.ɵɵtextInterpolate1(", ", ctx);
|
|
2871
2899
|
} }
|
|
2872
2900
|
function KptMapPoiCard_Conditional_16_Conditional_7_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
2873
2901
|
i0.ɵɵelementStart(0, "span", 36);
|
|
@@ -3053,17 +3081,17 @@ function KptMapPoiCard_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
|
3053
3081
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
3054
3082
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.i18n.t("map.poi.copied"), " ");
|
|
3055
3083
|
} }
|
|
3056
|
-
/** Licznik instancji
|
|
3084
|
+
/** Licznik instancji - `aria-controls` musi wskazywać unikatowy identyfikator na stronie. */
|
|
3057
3085
|
let poiCardSeq = 0;
|
|
3058
3086
|
/**
|
|
3059
|
-
* Karta miejsca do popupu mapy
|
|
3087
|
+
* Karta miejsca do popupu mapy - dystans od użytkownika, zdjęcie, akcje, kategoria,
|
|
3060
3088
|
* rozwijane godziny otwarcia i wiersze kontaktowe z kopiowaniem.
|
|
3061
3089
|
*
|
|
3062
3090
|
* Komponent jest sterowany danymi: bierze `KptMapPoi`, a nie model domenowy aplikacji.
|
|
3063
|
-
* Mapowanie `KptMapLocation.data`
|
|
3091
|
+
* Mapowanie `KptMapLocation.data` -> `KptMapPoi` robi aplikacja, dzięki czemu karta nie
|
|
3064
3092
|
* wie nic o tym, czy pokazuje ładowarkę, restaurację, czy punkt serwisowy.
|
|
3065
3093
|
*
|
|
3066
|
-
* Sam popup `kpt-map` trzeba przełączyć na `[popupLayout]="'card'"`
|
|
3094
|
+
* Sam popup `kpt-map` trzeba przełączyć na `[popupLayout]="'card'"` - inaczej karta
|
|
3067
3095
|
* dostanie 20 rem szerokości i padding przeznaczony dla treści tekstowej.
|
|
3068
3096
|
*
|
|
3069
3097
|
* @example
|
|
@@ -3106,11 +3134,11 @@ class KptMapPoiCard {
|
|
|
3106
3134
|
this.i18n = inject(KptI18n);
|
|
3107
3135
|
/** Identyfikator regionu godzin; kart na stronie bywa więcej niż jedna. */
|
|
3108
3136
|
this.hoursId = `kpt-map-poi-hours-${++poiCardSeq}`;
|
|
3109
|
-
/** Rośnie przy każdym otwarciu karty i przy zmianie danych
|
|
3137
|
+
/** Rośnie przy każdym otwarciu karty i przy zmianie danych - odświeża status godzin. */
|
|
3110
3138
|
this.now = signal(Date.now(), /* @ts-ignore */
|
|
3111
3139
|
...(ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []));
|
|
3112
3140
|
/**
|
|
3113
|
-
* Ikona kategorii stoi wprost na powierzchni karty, bez własnego tła
|
|
3141
|
+
* Ikona kategorii stoi wprost na powierzchni karty, bez własnego tła - stąd
|
|
3114
3142
|
* `foregroundVarOf()`, a nie `colorVarOf()`: rola `muted` ma kolor tła, nie treści.
|
|
3115
3143
|
*/
|
|
3116
3144
|
this.categoryColor = computed(() => {
|
|
@@ -3120,7 +3148,7 @@ class KptMapPoiCard {
|
|
|
3120
3148
|
...(ngDevMode ? [{ debugName: "categoryColor" }] : /* istanbul ignore next */ []));
|
|
3121
3149
|
this.distanceLabel = computed(() => formatDistance(this.distance(), this.i18n.locale()), /* @ts-ignore */
|
|
3122
3150
|
...(ngDevMode ? [{ debugName: "distanceLabel" }] : /* istanbul ignore next */ []));
|
|
3123
|
-
/*
|
|
3151
|
+
/* -- godziny ----------------------------------------------------------- */
|
|
3124
3152
|
this.hasHours = computed(() => (this.poi().hours?.length ?? 0) > 0, /* @ts-ignore */
|
|
3125
3153
|
...(ngDevMode ? [{ debugName: "hasHours" }] : /* istanbul ignore next */ []));
|
|
3126
3154
|
this.alwaysOpen = computed(() => isAlwaysOpen(this.poi().hours), /* @ts-ignore */
|
|
@@ -3135,7 +3163,7 @@ class KptMapPoiCard {
|
|
|
3135
3163
|
return this.i18n.t(this.open() ? 'map.poi.openNow' : 'map.poi.closedNow');
|
|
3136
3164
|
}, /* @ts-ignore */
|
|
3137
3165
|
...(ngDevMode ? [{ debugName: "statusLabel" }] : /* istanbul ignore next */ []));
|
|
3138
|
-
/** Dopisek
|
|
3166
|
+
/** Dopisek "otwarcie o 11:00" - nie ma go dla 24/7 ani gdy zmiana jest dalej niż doba. */
|
|
3139
3167
|
this.statusHint = computed(() => {
|
|
3140
3168
|
if (this.alwaysOpen() || !this.hasHours())
|
|
3141
3169
|
return null;
|
|
@@ -3152,7 +3180,7 @@ class KptMapPoiCard {
|
|
|
3152
3180
|
return this.i18n.t(change.open ? 'map.poi.opensAt' : 'map.poi.closesAt', { time });
|
|
3153
3181
|
}, /* @ts-ignore */
|
|
3154
3182
|
...(ngDevMode ? [{ debugName: "statusHint" }] : /* istanbul ignore next */ []));
|
|
3155
|
-
/*
|
|
3183
|
+
/* -- wiersze kontaktu -------------------------------------------------- */
|
|
3156
3184
|
this.rows = computed(() => {
|
|
3157
3185
|
const poi = this.poi();
|
|
3158
3186
|
const rows = [];
|
|
@@ -3209,8 +3237,8 @@ class KptMapPoiCard {
|
|
|
3209
3237
|
return rows;
|
|
3210
3238
|
}, /* @ts-ignore */
|
|
3211
3239
|
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
3212
|
-
/*
|
|
3213
|
-
/** Klucz wiersza, którego wartość właśnie skopiowano
|
|
3240
|
+
/* -- akcje ------------------------------------------------------------- */
|
|
3241
|
+
/** Klucz wiersza, którego wartość właśnie skopiowano - przełącza ikonę na "check". */
|
|
3214
3242
|
this.justCopied = signal(null, /* @ts-ignore */
|
|
3215
3243
|
...(ngDevMode ? [{ debugName: "justCopied" }] : /* istanbul ignore next */ []));
|
|
3216
3244
|
this.copyTimer = null;
|
|
@@ -3223,7 +3251,7 @@ class KptMapPoiCard {
|
|
|
3223
3251
|
await navigator.clipboard.writeText(row.copyValue);
|
|
3224
3252
|
}
|
|
3225
3253
|
catch {
|
|
3226
|
-
// Odmowa zgody albo brak bezpiecznego kontekstu
|
|
3254
|
+
// Odmowa zgody albo brak bezpiecznego kontekstu - nie ma czego zgłaszać użytkownikowi.
|
|
3227
3255
|
return;
|
|
3228
3256
|
}
|
|
3229
3257
|
this.justCopied.set(row.kind);
|
|
@@ -3241,7 +3269,7 @@ class KptMapPoiCard {
|
|
|
3241
3269
|
this.favourite.update((v) => !v);
|
|
3242
3270
|
}
|
|
3243
3271
|
toggleHours() {
|
|
3244
|
-
// Odświeżamy zegar przy rozwinięciu
|
|
3272
|
+
// Odświeżamy zegar przy rozwinięciu - karta bywa otwarta dłużej niż minutę.
|
|
3245
3273
|
this.now.set(Date.now());
|
|
3246
3274
|
this.hoursExpanded.update((v) => !v);
|
|
3247
3275
|
}
|
|
@@ -3328,18 +3356,18 @@ class KptMapPoiCard {
|
|
|
3328
3356
|
i0.ɵɵconditional(ctx.rows().length || ctx.poi().facts?.length ? 17 : -1);
|
|
3329
3357
|
i0.ɵɵadvance(2);
|
|
3330
3358
|
i0.ɵɵconditional(ctx.justCopied() ? 19 : -1);
|
|
3331
|
-
} }, dependencies: [KptButton, KptIcon, KptIconButton], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map-poi{display:flex;flex-direction:column;min-height:0;color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm);text-align:start}.kpt-map-poi__scroll{flex:0 1 auto;min-height:0;padding:0 var(--%NS%kpt-space-4) var(--%NS%kpt-space-4);overflow-y:auto;overscroll-behavior:contain}.kpt-map-poi__head{flex:none;padding:var(--%NS%kpt-space-4) var(--%NS%kpt-space-4) 0;display:flex;gap:var(--%NS%kpt-space-2);align-items:flex-start;justify-content:space-between}.kpt-map-poi__title{margin:0;font-size:var(--%NS%kpt-font-size-lg);font-weight:var(--%NS%kpt-font-weight-bold);line-height:1.25;letter-spacing:normal;text-transform:none}.kpt-map-poi__close{flex:none;margin:calc(var(--%NS%kpt-space-1) * -1) calc(var(--%NS%kpt-space-2) * -1) 0 0}.kpt-map-poi__meta{flex:none;display:flex;flex-wrap:wrap;gap:0 var(--%NS%kpt-space-2);margin:var(--%NS%kpt-space-1) 0 0;padding:0 var(--%NS%kpt-space-4) var(--%NS%kpt-space-3);border-bottom:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border)}.kpt-map-poi__distance{font-weight:var(--%NS%kpt-font-weight-bold)}.kpt-map-poi__address{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-poi__media{margin-top:var(--%NS%kpt-space-4);overflow:hidden;border-radius:var(--%NS%kpt-map-poi-media-radius, var(--%NS%kpt-radius-md))}.kpt-map-poi__photo,.kpt-map-poi__photo-empty{display:block;width:100%;aspect-ratio:16/9}.kpt-map-poi__photo{object-fit:cover}.kpt-map-poi__photo-empty{display:grid;place-items:center;color:var(--%NS%kpt-color-text-subtle);background:var(--%NS%kpt-color-surface-sunken)}.kpt-map-poi__actions{display:flex;gap:var(--%NS%kpt-space-2);align-items:center;margin-top:var(--%NS%kpt-space-3);margin-bottom:var(--%NS%kpt-space-3)}.kpt-map-poi__cta{flex:1 1 auto;min-width:0}.kpt-map-poi__fav[data-on] .kpt-icon-button{color:var(--%NS%kpt-color-warning);border-color:var(--%NS%kpt-color-warning-border)}.kpt-map-poi__category{display:flex;gap:var(--%NS%kpt-space-3);align-items:center;margin:0;padding:var(--%NS%kpt-space-3) 0;border-top:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border)}.kpt-map-poi__category-icon{color:var(--%NS%_kpt-poi-color, var(--%NS%kpt-color-primary))}.kpt-map-poi__hours{border-top:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border)}.kpt-map-poi__hours-toggle{display:flex;gap:var(--%NS%kpt-space-3);align-items:center;width:100%;padding:var(--%NS%kpt-space-3) 0;font:inherit;color:inherit;text-align:start;background:none;border:0;cursor:pointer}.kpt-map-poi__hours-toggle:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:calc(var(--%NS%kpt-space-1) * -1)}.kpt-map-poi__status{font-weight:var(--%NS%kpt-font-weight-medium);color:var(--%NS%kpt-color-danger)}.kpt-map-poi__status[data-open=true]{color:var(--%NS%kpt-color-success)}.kpt-map-poi__status-hint{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-poi__chevron{margin-inline-start:auto;color:var(--%NS%kpt-color-on-surface-muted);transition:rotate var(--%NS%kpt-motion-duration-fast, .15s) ease}.kpt-map-poi__hours-toggle[aria-expanded=true] .kpt-map-poi__chevron{rotate:180deg}.kpt-map-poi__week{display:grid;grid-template-columns:auto 1fr;gap:var(--%NS%kpt-space-1) var(--%NS%kpt-space-4);margin:0;padding:0 0 var(--%NS%kpt-space-3) calc(1em + var(--%NS%kpt-space-3))}.kpt-map-poi__week-day{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-poi__week-hours{display:flex;flex-direction:column;margin:0}.kpt-map-poi__week-closed{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-poi__rows{margin:0;padding:0;list-style:none}.kpt-map-poi__row{display:flex;gap:var(--%NS%kpt-space-3);align-items:center;padding:var(--%NS%kpt-space-2) var(--%NS%kpt-space-2) var(--%NS%kpt-space-2) 0;margin-inline-start:calc(var(--%NS%kpt-space-2) * -1);padding-inline-start:var(--%NS%kpt-space-2);border-top:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-sm)}.kpt-map-poi__row:hover,.kpt-map-poi__row:focus-within{background:var(--%NS%kpt-map-poi-row-hover, var(--%NS%kpt-color-surface-hover))}.kpt-map-poi__row-icon{flex:none;color:var(--%NS%kpt-color-primary)}.kpt-map-poi__row-value{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}.kpt-map-poi__row-link{color:inherit;text-decoration:none}.kpt-map-poi__row-link:hover{text-decoration:underline}.kpt-map-poi__fact-label{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-poi__fact-label:after{content:\"
|
|
3359
|
+
} }, dependencies: [KptButton, KptIcon, KptIconButton], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map-poi{display:flex;flex-direction:column;min-height:0;color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm);text-align:start}.kpt-map-poi__scroll{flex:0 1 auto;min-height:0;padding:0 var(--%NS%kpt-space-4) var(--%NS%kpt-space-4);overflow-y:auto;overscroll-behavior:contain}.kpt-map-poi__head{flex:none;padding:var(--%NS%kpt-space-4) var(--%NS%kpt-space-4) 0;display:flex;gap:var(--%NS%kpt-space-2);align-items:flex-start;justify-content:space-between}.kpt-map-poi__title{margin:0;font-size:var(--%NS%kpt-font-size-lg);font-weight:var(--%NS%kpt-font-weight-bold);line-height:1.25;letter-spacing:normal;text-transform:none}.kpt-map-poi__close{flex:none;margin:calc(var(--%NS%kpt-space-1) * -1) calc(var(--%NS%kpt-space-2) * -1) 0 0}.kpt-map-poi__meta{flex:none;display:flex;flex-wrap:wrap;gap:0 var(--%NS%kpt-space-2);margin:var(--%NS%kpt-space-1) 0 0;padding:0 var(--%NS%kpt-space-4) var(--%NS%kpt-space-3);border-bottom:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border)}.kpt-map-poi__distance{font-weight:var(--%NS%kpt-font-weight-bold)}.kpt-map-poi__address{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-poi__media{margin-top:var(--%NS%kpt-space-4);overflow:hidden;border-radius:var(--%NS%kpt-map-poi-media-radius, var(--%NS%kpt-radius-md))}.kpt-map-poi__photo,.kpt-map-poi__photo-empty{display:block;width:100%;aspect-ratio:16/9}.kpt-map-poi__photo{object-fit:cover}.kpt-map-poi__photo-empty{display:grid;place-items:center;color:var(--%NS%kpt-color-text-subtle);background:var(--%NS%kpt-color-surface-sunken)}.kpt-map-poi__actions{display:flex;gap:var(--%NS%kpt-space-2);align-items:center;margin-top:var(--%NS%kpt-space-3);margin-bottom:var(--%NS%kpt-space-3)}.kpt-map-poi__cta{flex:1 1 auto;min-width:0}.kpt-map-poi__fav[data-on] .kpt-icon-button{color:var(--%NS%kpt-color-warning);border-color:var(--%NS%kpt-color-warning-border)}.kpt-map-poi__category{display:flex;gap:var(--%NS%kpt-space-3);align-items:center;margin:0;padding:var(--%NS%kpt-space-3) 0;border-top:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border)}.kpt-map-poi__category-icon{color:var(--%NS%_kpt-poi-color, var(--%NS%kpt-color-primary))}.kpt-map-poi__hours{border-top:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border)}.kpt-map-poi__hours-toggle{display:flex;gap:var(--%NS%kpt-space-3);align-items:center;width:100%;padding:var(--%NS%kpt-space-3) 0;font:inherit;color:inherit;text-align:start;background:none;border:0;cursor:pointer}.kpt-map-poi__hours-toggle:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:calc(var(--%NS%kpt-space-1) * -1)}.kpt-map-poi__status{font-weight:var(--%NS%kpt-font-weight-medium);color:var(--%NS%kpt-color-danger)}.kpt-map-poi__status[data-open=true]{color:var(--%NS%kpt-color-success)}.kpt-map-poi__status-hint{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-poi__chevron{margin-inline-start:auto;color:var(--%NS%kpt-color-on-surface-muted);transition:rotate var(--%NS%kpt-motion-duration-fast, .15s) ease}.kpt-map-poi__hours-toggle[aria-expanded=true] .kpt-map-poi__chevron{rotate:180deg}.kpt-map-poi__week{display:grid;grid-template-columns:auto 1fr;gap:var(--%NS%kpt-space-1) var(--%NS%kpt-space-4);margin:0;padding:0 0 var(--%NS%kpt-space-3) calc(1em + var(--%NS%kpt-space-3))}.kpt-map-poi__week-day{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-poi__week-hours{display:flex;flex-direction:column;margin:0}.kpt-map-poi__week-closed{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-poi__rows{margin:0;padding:0;list-style:none}.kpt-map-poi__row{display:flex;gap:var(--%NS%kpt-space-3);align-items:center;padding:var(--%NS%kpt-space-2) var(--%NS%kpt-space-2) var(--%NS%kpt-space-2) 0;margin-inline-start:calc(var(--%NS%kpt-space-2) * -1);padding-inline-start:var(--%NS%kpt-space-2);border-top:var(--%NS%kpt-border-width-thin) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-sm)}.kpt-map-poi__row:hover,.kpt-map-poi__row:focus-within{background:var(--%NS%kpt-map-poi-row-hover, var(--%NS%kpt-color-surface-hover))}.kpt-map-poi__row-icon{flex:none;color:var(--%NS%kpt-color-primary)}.kpt-map-poi__row-value{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}.kpt-map-poi__row-link{color:inherit;text-decoration:none}.kpt-map-poi__row-link:hover{text-decoration:underline}.kpt-map-poi__fact-label{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-map-poi__fact-label:after{content:\", \"}.kpt-map-poi__row-actions{display:flex;flex:none;gap:var(--%NS%kpt-space-1)}.kpt-map-poi__row-action{display:inline-grid;place-items:center;width:1.75rem;height:1.75rem;color:var(--%NS%kpt-color-on-surface-muted);background:none;border:0;border-radius:var(--%NS%kpt-radius-sm);cursor:pointer}.kpt-map-poi__row-action:hover{color:var(--%NS%kpt-color-primary);background:var(--%NS%kpt-color-surface-selected)}.kpt-map-poi__row-action:focus-visible{outline:var(--%NS%kpt-border-width-medium) solid var(--%NS%kpt-color-focus-ring);outline-offset:1px}@media(hover:hover)and (pointer:fine){.kpt-map-poi__row-actions{opacity:0;transition:opacity var(--%NS%kpt-motion-duration-fast, .15s) ease}.kpt-map-poi__row:hover .kpt-map-poi__row-actions,.kpt-map-poi__row:focus-within .kpt-map-poi__row-actions{opacity:1}}.kpt-map-poi__live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}\n"], encapsulation: 2 }); }
|
|
3332
3360
|
}
|
|
3333
3361
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptMapPoiCard, [{
|
|
3334
3362
|
type: Component,
|
|
3335
|
-
args: [{ selector: 'kpt-map-poi-card', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptButton, KptIcon, KptIconButton], host: { class: 'kpt-map-poi' }, template: "<header class=\"kpt-map-poi__head\">\n <!--\n Nag\u0142\u00F3wek jako `role=\"heading\"`, nie `<h3>`: style komponent\u00F3w siedz\u0105 w `@layer\n kpt.components`, a CSS aplikacji spoza warstw wygrywa z nimi zawsze. Zwyk\u0142y `<h3>`\n \u0142apa\u0142by wi\u0119c ka\u017Cd\u0105 regu\u0142\u0119 `h3 { \u2026 }` z uk\u0142adu strony \u2014 a nag\u0142\u00F3wek sekcji strony\n i tytu\u0142 miejsca to dwie r\u00F3\u017Cne rzeczy. Dla czytnika ekranu to wci\u0105\u017C nag\u0142\u00F3wek poziomu 3.\n -->\n <p class=\"kpt-map-poi__title\" role=\"heading\" aria-level=\"3\">{{ poi().title }}</p>\n @if (closable()) {\n <kpt-icon-button\n class=\"kpt-map-poi__close\"\n variant=\"text\"\n size=\"sm\"\n [ariaLabel]=\"i18n.t('common.close')\"\n (click)=\"onClose()\"\n >\n <kpt-icon name=\"x\" />\n </kpt-icon-button>\n }\n</header>\n\n<p class=\"kpt-map-poi__meta\">\n @if (distanceLabel(); as distance) {\n <strong class=\"kpt-map-poi__distance\">{{ distance }}</strong>\n }\n @if (poi().address; as address) {\n <span class=\"kpt-map-poi__address\">{{ address }}</span>\n }\n</p>\n\n<!--\n Wszystko poni\u017Cej nag\u0142\u00F3wka przewija si\u0119 osobno. Kontenerem przewijania jest ten div,\n a nie popup mapy \u2014 inaczej tytu\u0142 z krzy\u017Cykiem odje\u017Cd\u017Ca\u0142by razem ze zdj\u0119ciem.\n-->\n<div class=\"kpt-map-poi__scroll\">\n <div class=\"kpt-map-poi__media\">\n @if (poi().photo; as photo) {\n <img\n class=\"kpt-map-poi__photo\"\n [src]=\"photo\"\n [alt]=\"poi().photoAlt ?? poi().title\"\n loading=\"lazy\"\n decoding=\"async\"\n />\n } @else {\n <div class=\"kpt-map-poi__photo-empty\" [attr.aria-label]=\"i18n.t('map.poi.noPhoto')\" role=\"img\">\n <kpt-icon name=\"photo\" size=\"1.75rem\" />\n </div>\n }\n </div>\n\n <div class=\"kpt-map-poi__actions\">\n @if (primaryLabel()) {\n <kpt-button class=\"kpt-map-poi__cta\" size=\"sm\" fullWidth (click)=\"onPrimary()\">\n {{ primaryLabel() }}\n </kpt-button>\n }\n @if (showShare()) {\n <kpt-icon-button\n variant=\"outline\"\n size=\"sm\"\n [ariaLabel]=\"i18n.t('map.poi.share')\"\n (click)=\"share()\"\n >\n <kpt-icon name=\"share\" />\n </kpt-icon-button>\n }\n @if (showFavourite()) {\n <kpt-icon-button\n class=\"kpt-map-poi__fav\"\n variant=\"outline\"\n size=\"sm\"\n [ariaPressed]=\"favourite()\"\n [attr.data-on]=\"favourite() ? '' : null\"\n [ariaLabel]=\"favouriteLabel()\"\n (click)=\"toggleFavourite()\"\n >\n <kpt-icon name=\"star\" />\n </kpt-icon-button>\n }\n </div>\n\n @if (category(); as category) {\n <p class=\"kpt-map-poi__category\" [style.--_kpt-poi-color]=\"categoryColor()\">\n @if (category.icon) {\n <kpt-icon class=\"kpt-map-poi__category-icon\" [name]=\"category.icon\" />\n }\n {{ category.label }}\n </p>\n }\n\n @if (hasHours()) {\n <div class=\"kpt-map-poi__hours\">\n <button\n class=\"kpt-map-poi__hours-toggle\"\n type=\"button\"\n [attr.aria-expanded]=\"hoursExpanded()\"\n [attr.aria-controls]=\"hoursId\"\n (click)=\"toggleHours()\"\n >\n <kpt-icon class=\"kpt-map-poi__row-icon\" name=\"clock\" />\n <span class=\"kpt-map-poi__status\" [attr.data-open]=\"open() || alwaysOpen()\">\n {{ statusLabel() }}\n </span>\n @if (statusHint(); as hint) {\n <span class=\"kpt-map-poi__status-hint\">\u00B7 {{ hint }}</span>\n }\n <kpt-icon class=\"kpt-map-poi__chevron\" name=\"chevron-down\" />\n </button>\n\n @if (hoursExpanded()) {\n <dl class=\"kpt-map-poi__week\" [id]=\"hoursId\">\n @for (group of hoursGroups(); track group.label) {\n <dt class=\"kpt-map-poi__week-day\">{{ group.label }}</dt>\n <dd class=\"kpt-map-poi__week-hours\">\n @if (group.closed) {\n <span class=\"kpt-map-poi__week-closed\">{{ i18n.t('map.poi.closedDay') }}</span>\n } @else {\n @for (range of group.ranges; track range) {\n <span class=\"kpt-map-poi__week-range\">{{ range }}</span>\n }\n }\n </dd>\n }\n </dl>\n }\n </div>\n }\n\n @if (rows().length || poi().facts?.length) {\n <ul class=\"kpt-map-poi__rows\">\n @for (row of rows(); track row.kind) {\n <li class=\"kpt-map-poi__row\">\n <kpt-icon class=\"kpt-map-poi__row-icon\" [name]=\"row.icon\" />\n\n @if (row.href) {\n <a\n class=\"kpt-map-poi__row-value kpt-map-poi__row-link\"\n [href]=\"row.href\"\n [attr.target]=\"row.external ? '_blank' : null\"\n [attr.rel]=\"row.external ? 'noopener noreferrer' : null\"\n >\n {{ row.text }}\n </a>\n } @else {\n <span class=\"kpt-map-poi__row-value\">{{ row.text }}</span>\n }\n\n <span class=\"kpt-map-poi__row-actions\">\n @if (row.href) {\n <a\n class=\"kpt-map-poi__row-action\"\n [href]=\"row.href\"\n [attr.target]=\"row.external ? '_blank' : null\"\n [attr.rel]=\"row.external ? 'noopener noreferrer' : null\"\n [attr.aria-label]=\"row.actionLabel\"\n [title]=\"row.actionLabel\"\n >\n <kpt-icon [name]=\"row.actionIcon\" />\n </a>\n }\n @if (canCopy) {\n <button\n class=\"kpt-map-poi__row-action\"\n type=\"button\"\n [attr.aria-label]=\"i18n.t('map.poi.copy')\"\n [title]=\"i18n.t('map.poi.copy')\"\n (click)=\"copy(row)\"\n >\n <kpt-icon [name]=\"justCopied() === row.kind ? 'check' : 'copy'\" />\n </button>\n }\n </span>\n </li>\n }\n\n @for (fact of poi().facts ?? []; track fact.label) {\n <li class=\"kpt-map-poi__row kpt-map-poi__row--fact\">\n @if (fact.icon) {\n <kpt-icon class=\"kpt-map-poi__row-icon\" [name]=\"fact.icon\" />\n } @else {\n <span class=\"kpt-map-poi__row-icon\" aria-hidden=\"true\"></span>\n }\n <span class=\"kpt-map-poi__row-value\">\n <span class=\"kpt-map-poi__fact-label\">{{ fact.label }}</span>\n {{ fact.value }}\n </span>\n </li>\n }\n </ul>\n }\n\n <p class=\"kpt-map-poi__live\" aria-live=\"polite\">\n @if (justCopied()) {\n {{ i18n.t('map.poi.copied') }}\n }\n </p>\n</div>\n", styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map-poi{display:flex;flex-direction:column;min-height:0;color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm);text-align:start}.kpt-map-poi__scroll{flex:0 1 auto;min-height:0;padding:0 var(--kpt-space-4) var(--kpt-space-4);overflow-y:auto;overscroll-behavior:contain}.kpt-map-poi__head{flex:none;padding:var(--kpt-space-4) var(--kpt-space-4) 0;display:flex;gap:var(--kpt-space-2);align-items:flex-start;justify-content:space-between}.kpt-map-poi__title{margin:0;font-size:var(--kpt-font-size-lg);font-weight:var(--kpt-font-weight-bold);line-height:1.25;letter-spacing:normal;text-transform:none}.kpt-map-poi__close{flex:none;margin:calc(var(--kpt-space-1) * -1) calc(var(--kpt-space-2) * -1) 0 0}.kpt-map-poi__meta{flex:none;display:flex;flex-wrap:wrap;gap:0 var(--kpt-space-2);margin:var(--kpt-space-1) 0 0;padding:0 var(--kpt-space-4) var(--kpt-space-3);border-bottom:var(--kpt-border-width-thin) solid var(--kpt-color-border)}.kpt-map-poi__distance{font-weight:var(--kpt-font-weight-bold)}.kpt-map-poi__address{color:var(--kpt-color-on-surface-muted)}.kpt-map-poi__media{margin-top:var(--kpt-space-4);overflow:hidden;border-radius:var(--kpt-map-poi-media-radius, var(--kpt-radius-md))}.kpt-map-poi__photo,.kpt-map-poi__photo-empty{display:block;width:100%;aspect-ratio:16/9}.kpt-map-poi__photo{object-fit:cover}.kpt-map-poi__photo-empty{display:grid;place-items:center;color:var(--kpt-color-text-subtle);background:var(--kpt-color-surface-sunken)}.kpt-map-poi__actions{display:flex;gap:var(--kpt-space-2);align-items:center;margin-top:var(--kpt-space-3);margin-bottom:var(--kpt-space-3)}.kpt-map-poi__cta{flex:1 1 auto;min-width:0}.kpt-map-poi__fav[data-on] .kpt-icon-button{color:var(--kpt-color-warning);border-color:var(--kpt-color-warning-border)}.kpt-map-poi__category{display:flex;gap:var(--kpt-space-3);align-items:center;margin:0;padding:var(--kpt-space-3) 0;border-top:var(--kpt-border-width-thin) solid var(--kpt-color-border)}.kpt-map-poi__category-icon{color:var(--_kpt-poi-color, var(--kpt-color-primary))}.kpt-map-poi__hours{border-top:var(--kpt-border-width-thin) solid var(--kpt-color-border)}.kpt-map-poi__hours-toggle{display:flex;gap:var(--kpt-space-3);align-items:center;width:100%;padding:var(--kpt-space-3) 0;font:inherit;color:inherit;text-align:start;background:none;border:0;cursor:pointer}.kpt-map-poi__hours-toggle:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:calc(var(--kpt-space-1) * -1)}.kpt-map-poi__status{font-weight:var(--kpt-font-weight-medium);color:var(--kpt-color-danger)}.kpt-map-poi__status[data-open=true]{color:var(--kpt-color-success)}.kpt-map-poi__status-hint{color:var(--kpt-color-on-surface-muted)}.kpt-map-poi__chevron{margin-inline-start:auto;color:var(--kpt-color-on-surface-muted);transition:rotate var(--kpt-motion-duration-fast, .15s) ease}.kpt-map-poi__hours-toggle[aria-expanded=true] .kpt-map-poi__chevron{rotate:180deg}.kpt-map-poi__week{display:grid;grid-template-columns:auto 1fr;gap:var(--kpt-space-1) var(--kpt-space-4);margin:0;padding:0 0 var(--kpt-space-3) calc(1em + var(--kpt-space-3))}.kpt-map-poi__week-day{color:var(--kpt-color-on-surface-muted)}.kpt-map-poi__week-hours{display:flex;flex-direction:column;margin:0}.kpt-map-poi__week-closed{color:var(--kpt-color-on-surface-muted)}.kpt-map-poi__rows{margin:0;padding:0;list-style:none}.kpt-map-poi__row{display:flex;gap:var(--kpt-space-3);align-items:center;padding:var(--kpt-space-2) var(--kpt-space-2) var(--kpt-space-2) 0;margin-inline-start:calc(var(--kpt-space-2) * -1);padding-inline-start:var(--kpt-space-2);border-top:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-radius:var(--kpt-radius-sm)}.kpt-map-poi__row:hover,.kpt-map-poi__row:focus-within{background:var(--kpt-map-poi-row-hover, var(--kpt-color-surface-hover))}.kpt-map-poi__row-icon{flex:none;color:var(--kpt-color-primary)}.kpt-map-poi__row-value{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}.kpt-map-poi__row-link{color:inherit;text-decoration:none}.kpt-map-poi__row-link:hover{text-decoration:underline}.kpt-map-poi__fact-label{color:var(--kpt-color-on-surface-muted)}.kpt-map-poi__fact-label:after{content:\" \\b7 \"}.kpt-map-poi__row-actions{display:flex;flex:none;gap:var(--kpt-space-1)}.kpt-map-poi__row-action{display:inline-grid;place-items:center;width:1.75rem;height:1.75rem;color:var(--kpt-color-on-surface-muted);background:none;border:0;border-radius:var(--kpt-radius-sm);cursor:pointer}.kpt-map-poi__row-action:hover{color:var(--kpt-color-primary);background:var(--kpt-color-surface-selected)}.kpt-map-poi__row-action:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:1px}@media(hover:hover)and (pointer:fine){.kpt-map-poi__row-actions{opacity:0;transition:opacity var(--kpt-motion-duration-fast, .15s) ease}.kpt-map-poi__row:hover .kpt-map-poi__row-actions,.kpt-map-poi__row:focus-within .kpt-map-poi__row-actions{opacity:1}}.kpt-map-poi__live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}\n"] }]
|
|
3363
|
+
args: [{ selector: 'kpt-map-poi-card', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptButton, KptIcon, KptIconButton], host: { class: 'kpt-map-poi' }, template: "<header class=\"kpt-map-poi__head\">\n <!--\n Nag\u0142\u00F3wek jako `role=\"heading\"`, nie `<h3>`: style komponent\u00F3w siedz\u0105 w `@layer\n kpt.components`, a CSS aplikacji spoza warstw wygrywa z nimi zawsze. Zwyk\u0142y `<h3>`\n \u0142apa\u0142by wi\u0119c ka\u017Cd\u0105 regu\u0142\u0119 `h3 { ... }` z uk\u0142adu strony - a nag\u0142\u00F3wek sekcji strony\n i tytu\u0142 miejsca to dwie r\u00F3\u017Cne rzeczy. Dla czytnika ekranu to wci\u0105\u017C nag\u0142\u00F3wek poziomu 3.\n -->\n <p class=\"kpt-map-poi__title\" role=\"heading\" aria-level=\"3\">{{ poi().title }}</p>\n @if (closable()) {\n <kpt-icon-button\n class=\"kpt-map-poi__close\"\n variant=\"text\"\n size=\"sm\"\n [ariaLabel]=\"i18n.t('common.close')\"\n (click)=\"onClose()\"\n >\n <kpt-icon name=\"x\" />\n </kpt-icon-button>\n }\n</header>\n\n<p class=\"kpt-map-poi__meta\">\n @if (distanceLabel(); as distance) {\n <strong class=\"kpt-map-poi__distance\">{{ distance }}</strong>\n }\n @if (poi().address; as address) {\n <span class=\"kpt-map-poi__address\">{{ address }}</span>\n }\n</p>\n\n<!--\n Wszystko poni\u017Cej nag\u0142\u00F3wka przewija si\u0119 osobno. Kontenerem przewijania jest ten div,\n a nie popup mapy - inaczej tytu\u0142 z krzy\u017Cykiem odje\u017Cd\u017Ca\u0142by razem ze zdj\u0119ciem.\n-->\n<div class=\"kpt-map-poi__scroll\">\n <div class=\"kpt-map-poi__media\">\n @if (poi().photo; as photo) {\n <img\n class=\"kpt-map-poi__photo\"\n [src]=\"photo\"\n [alt]=\"poi().photoAlt ?? poi().title\"\n loading=\"lazy\"\n decoding=\"async\"\n />\n } @else {\n <div class=\"kpt-map-poi__photo-empty\" [attr.aria-label]=\"i18n.t('map.poi.noPhoto')\" role=\"img\">\n <kpt-icon name=\"photo\" size=\"1.75rem\" />\n </div>\n }\n </div>\n\n <div class=\"kpt-map-poi__actions\">\n @if (primaryLabel()) {\n <kpt-button class=\"kpt-map-poi__cta\" size=\"sm\" fullWidth (click)=\"onPrimary()\">\n {{ primaryLabel() }}\n </kpt-button>\n }\n @if (showShare()) {\n <kpt-icon-button\n variant=\"outline\"\n size=\"sm\"\n [ariaLabel]=\"i18n.t('map.poi.share')\"\n (click)=\"share()\"\n >\n <kpt-icon name=\"share\" />\n </kpt-icon-button>\n }\n @if (showFavourite()) {\n <kpt-icon-button\n class=\"kpt-map-poi__fav\"\n variant=\"outline\"\n size=\"sm\"\n [ariaPressed]=\"favourite()\"\n [attr.data-on]=\"favourite() ? '' : null\"\n [ariaLabel]=\"favouriteLabel()\"\n (click)=\"toggleFavourite()\"\n >\n <kpt-icon name=\"star\" />\n </kpt-icon-button>\n }\n </div>\n\n @if (category(); as category) {\n <p class=\"kpt-map-poi__category\" [style.--_kpt-poi-color]=\"categoryColor()\">\n @if (category.icon) {\n <kpt-icon class=\"kpt-map-poi__category-icon\" [name]=\"category.icon\" />\n }\n {{ category.label }}\n </p>\n }\n\n @if (hasHours()) {\n <div class=\"kpt-map-poi__hours\">\n <button\n class=\"kpt-map-poi__hours-toggle\"\n type=\"button\"\n [attr.aria-expanded]=\"hoursExpanded()\"\n [attr.aria-controls]=\"hoursId\"\n (click)=\"toggleHours()\"\n >\n <kpt-icon class=\"kpt-map-poi__row-icon\" name=\"clock\" />\n <span class=\"kpt-map-poi__status\" [attr.data-open]=\"open() || alwaysOpen()\">\n {{ statusLabel() }}\n </span>\n @if (statusHint(); as hint) {\n <span class=\"kpt-map-poi__status-hint\">, {{ hint }}</span>\n }\n <kpt-icon class=\"kpt-map-poi__chevron\" name=\"chevron-down\" />\n </button>\n\n @if (hoursExpanded()) {\n <dl class=\"kpt-map-poi__week\" [id]=\"hoursId\">\n @for (group of hoursGroups(); track group.label) {\n <dt class=\"kpt-map-poi__week-day\">{{ group.label }}</dt>\n <dd class=\"kpt-map-poi__week-hours\">\n @if (group.closed) {\n <span class=\"kpt-map-poi__week-closed\">{{ i18n.t('map.poi.closedDay') }}</span>\n } @else {\n @for (range of group.ranges; track range) {\n <span class=\"kpt-map-poi__week-range\">{{ range }}</span>\n }\n }\n </dd>\n }\n </dl>\n }\n </div>\n }\n\n @if (rows().length || poi().facts?.length) {\n <ul class=\"kpt-map-poi__rows\">\n @for (row of rows(); track row.kind) {\n <li class=\"kpt-map-poi__row\">\n <kpt-icon class=\"kpt-map-poi__row-icon\" [name]=\"row.icon\" />\n\n @if (row.href) {\n <a\n class=\"kpt-map-poi__row-value kpt-map-poi__row-link\"\n [href]=\"row.href\"\n [attr.target]=\"row.external ? '_blank' : null\"\n [attr.rel]=\"row.external ? 'noopener noreferrer' : null\"\n >\n {{ row.text }}\n </a>\n } @else {\n <span class=\"kpt-map-poi__row-value\">{{ row.text }}</span>\n }\n\n <span class=\"kpt-map-poi__row-actions\">\n @if (row.href) {\n <a\n class=\"kpt-map-poi__row-action\"\n [href]=\"row.href\"\n [attr.target]=\"row.external ? '_blank' : null\"\n [attr.rel]=\"row.external ? 'noopener noreferrer' : null\"\n [attr.aria-label]=\"row.actionLabel\"\n [title]=\"row.actionLabel\"\n >\n <kpt-icon [name]=\"row.actionIcon\" />\n </a>\n }\n @if (canCopy) {\n <button\n class=\"kpt-map-poi__row-action\"\n type=\"button\"\n [attr.aria-label]=\"i18n.t('map.poi.copy')\"\n [title]=\"i18n.t('map.poi.copy')\"\n (click)=\"copy(row)\"\n >\n <kpt-icon [name]=\"justCopied() === row.kind ? 'check' : 'copy'\" />\n </button>\n }\n </span>\n </li>\n }\n\n @for (fact of poi().facts ?? []; track fact.label) {\n <li class=\"kpt-map-poi__row kpt-map-poi__row--fact\">\n @if (fact.icon) {\n <kpt-icon class=\"kpt-map-poi__row-icon\" [name]=\"fact.icon\" />\n } @else {\n <span class=\"kpt-map-poi__row-icon\" aria-hidden=\"true\"></span>\n }\n <span class=\"kpt-map-poi__row-value\">\n <span class=\"kpt-map-poi__fact-label\">{{ fact.label }}</span>\n {{ fact.value }}\n </span>\n </li>\n }\n </ul>\n }\n\n <p class=\"kpt-map-poi__live\" aria-live=\"polite\">\n @if (justCopied()) {\n {{ i18n.t('map.poi.copied') }}\n }\n </p>\n</div>\n", styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-map-poi{display:flex;flex-direction:column;min-height:0;color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm);text-align:start}.kpt-map-poi__scroll{flex:0 1 auto;min-height:0;padding:0 var(--kpt-space-4) var(--kpt-space-4);overflow-y:auto;overscroll-behavior:contain}.kpt-map-poi__head{flex:none;padding:var(--kpt-space-4) var(--kpt-space-4) 0;display:flex;gap:var(--kpt-space-2);align-items:flex-start;justify-content:space-between}.kpt-map-poi__title{margin:0;font-size:var(--kpt-font-size-lg);font-weight:var(--kpt-font-weight-bold);line-height:1.25;letter-spacing:normal;text-transform:none}.kpt-map-poi__close{flex:none;margin:calc(var(--kpt-space-1) * -1) calc(var(--kpt-space-2) * -1) 0 0}.kpt-map-poi__meta{flex:none;display:flex;flex-wrap:wrap;gap:0 var(--kpt-space-2);margin:var(--kpt-space-1) 0 0;padding:0 var(--kpt-space-4) var(--kpt-space-3);border-bottom:var(--kpt-border-width-thin) solid var(--kpt-color-border)}.kpt-map-poi__distance{font-weight:var(--kpt-font-weight-bold)}.kpt-map-poi__address{color:var(--kpt-color-on-surface-muted)}.kpt-map-poi__media{margin-top:var(--kpt-space-4);overflow:hidden;border-radius:var(--kpt-map-poi-media-radius, var(--kpt-radius-md))}.kpt-map-poi__photo,.kpt-map-poi__photo-empty{display:block;width:100%;aspect-ratio:16/9}.kpt-map-poi__photo{object-fit:cover}.kpt-map-poi__photo-empty{display:grid;place-items:center;color:var(--kpt-color-text-subtle);background:var(--kpt-color-surface-sunken)}.kpt-map-poi__actions{display:flex;gap:var(--kpt-space-2);align-items:center;margin-top:var(--kpt-space-3);margin-bottom:var(--kpt-space-3)}.kpt-map-poi__cta{flex:1 1 auto;min-width:0}.kpt-map-poi__fav[data-on] .kpt-icon-button{color:var(--kpt-color-warning);border-color:var(--kpt-color-warning-border)}.kpt-map-poi__category{display:flex;gap:var(--kpt-space-3);align-items:center;margin:0;padding:var(--kpt-space-3) 0;border-top:var(--kpt-border-width-thin) solid var(--kpt-color-border)}.kpt-map-poi__category-icon{color:var(--_kpt-poi-color, var(--kpt-color-primary))}.kpt-map-poi__hours{border-top:var(--kpt-border-width-thin) solid var(--kpt-color-border)}.kpt-map-poi__hours-toggle{display:flex;gap:var(--kpt-space-3);align-items:center;width:100%;padding:var(--kpt-space-3) 0;font:inherit;color:inherit;text-align:start;background:none;border:0;cursor:pointer}.kpt-map-poi__hours-toggle:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:calc(var(--kpt-space-1) * -1)}.kpt-map-poi__status{font-weight:var(--kpt-font-weight-medium);color:var(--kpt-color-danger)}.kpt-map-poi__status[data-open=true]{color:var(--kpt-color-success)}.kpt-map-poi__status-hint{color:var(--kpt-color-on-surface-muted)}.kpt-map-poi__chevron{margin-inline-start:auto;color:var(--kpt-color-on-surface-muted);transition:rotate var(--kpt-motion-duration-fast, .15s) ease}.kpt-map-poi__hours-toggle[aria-expanded=true] .kpt-map-poi__chevron{rotate:180deg}.kpt-map-poi__week{display:grid;grid-template-columns:auto 1fr;gap:var(--kpt-space-1) var(--kpt-space-4);margin:0;padding:0 0 var(--kpt-space-3) calc(1em + var(--kpt-space-3))}.kpt-map-poi__week-day{color:var(--kpt-color-on-surface-muted)}.kpt-map-poi__week-hours{display:flex;flex-direction:column;margin:0}.kpt-map-poi__week-closed{color:var(--kpt-color-on-surface-muted)}.kpt-map-poi__rows{margin:0;padding:0;list-style:none}.kpt-map-poi__row{display:flex;gap:var(--kpt-space-3);align-items:center;padding:var(--kpt-space-2) var(--kpt-space-2) var(--kpt-space-2) 0;margin-inline-start:calc(var(--kpt-space-2) * -1);padding-inline-start:var(--kpt-space-2);border-top:var(--kpt-border-width-thin) solid var(--kpt-color-border);border-radius:var(--kpt-radius-sm)}.kpt-map-poi__row:hover,.kpt-map-poi__row:focus-within{background:var(--kpt-map-poi-row-hover, var(--kpt-color-surface-hover))}.kpt-map-poi__row-icon{flex:none;color:var(--kpt-color-primary)}.kpt-map-poi__row-value{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}.kpt-map-poi__row-link{color:inherit;text-decoration:none}.kpt-map-poi__row-link:hover{text-decoration:underline}.kpt-map-poi__fact-label{color:var(--kpt-color-on-surface-muted)}.kpt-map-poi__fact-label:after{content:\", \"}.kpt-map-poi__row-actions{display:flex;flex:none;gap:var(--kpt-space-1)}.kpt-map-poi__row-action{display:inline-grid;place-items:center;width:1.75rem;height:1.75rem;color:var(--kpt-color-on-surface-muted);background:none;border:0;border-radius:var(--kpt-radius-sm);cursor:pointer}.kpt-map-poi__row-action:hover{color:var(--kpt-color-primary);background:var(--kpt-color-surface-selected)}.kpt-map-poi__row-action:focus-visible{outline:var(--kpt-border-width-medium) solid var(--kpt-color-focus-ring);outline-offset:1px}@media(hover:hover)and (pointer:fine){.kpt-map-poi__row-actions{opacity:0;transition:opacity var(--kpt-motion-duration-fast, .15s) ease}.kpt-map-poi__row:hover .kpt-map-poi__row-actions,.kpt-map-poi__row:focus-within .kpt-map-poi__row-actions{opacity:1}}.kpt-map-poi__live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}\n"] }]
|
|
3336
3364
|
}], null, { poi: [{ type: i0.Input, args: [{ isSignal: true, alias: "poi", required: true }] }], distance: [{ type: i0.Input, args: [{ isSignal: true, alias: "distance", required: false }] }], category: [{ type: i0.Input, args: [{ isSignal: true, alias: "category", required: false }] }], primaryLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryLabel", required: false }] }], showShare: [{ type: i0.Input, args: [{ isSignal: true, alias: "showShare", required: false }] }], showFavourite: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFavourite", required: false }] }], favourite: [{ type: i0.Input, args: [{ isSignal: true, alias: "favourite", required: false }] }, { type: i0.Output, args: ["favouriteChange"] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], hoursExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoursExpanded", required: false }] }, { type: i0.Output, args: ["hoursExpandedChange"] }], primaryAction: [{ type: i0.Output, args: ["primaryAction"] }], closed: [{ type: i0.Output, args: ["closed"] }], shared: [{ type: i0.Output, args: ["shared"] }] }); })();
|
|
3337
3365
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptMapPoiCard, { className: "KptMapPoiCard", filePath: "lib/map-poi-card.component.ts", lineNumber: 69 }); })();
|
|
3338
3366
|
|
|
3339
3367
|
/*
|
|
3340
|
-
* Public API
|
|
3368
|
+
* Public API - @konce-pt/angular/map
|
|
3341
3369
|
* Mapa z konfigurowalnymi znacznikami (Leaflet + OpenStreetMap). Rdzeń obliczeń i adaptery
|
|
3342
|
-
* silników mieszkają w `@konce-pt/map`
|
|
3370
|
+
* silników mieszkają w `@konce-pt/map` - paczce bez frameworka, wspólnej z portem Reacta;
|
|
3343
3371
|
* tu tylko re-eksport, żeby publiczne API subpathu się nie zmieniło.
|
|
3344
3372
|
*
|
|
3345
3373
|
* Wymaga zależności opcjonalnej `leaflet` i dołączenia `leaflet/dist/leaflet.css`
|