@streamline-pulse/formkrafter-wc 0.26.0 → 0.27.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/dist/components/fk-address-search.d.ts +11 -0
- package/dist/components/fk-address-search.js +1 -0
- package/dist/components/fk-brick-actions.js +1 -1
- package/dist/components/fk-brick-list.js +1 -1
- package/dist/components/fk-brick-mold-item.js +1 -1
- package/dist/components/fk-brick-not-found.js +1 -1
- package/dist/components/fk-brick-render.js +1 -1
- package/dist/components/fk-data-grid.js +1 -1
- package/dist/components/fk-drop-area.js +1 -1
- package/dist/components/fk-empty-form.js +1 -1
- package/dist/components/fk-file-input.js +1 -1
- package/dist/components/fk-form-builder.js +1 -1
- package/dist/components/fk-form-render.js +1 -1
- package/dist/components/fk-form-review.js +1 -1
- package/dist/components/fk-geo-map.js +1 -1
- package/dist/components/fk-property-panel.js +1 -1
- package/dist/components/fk-rules-editor.js +1 -1
- package/dist/components/fk-select-input.js +1 -1
- package/dist/components/fk-signature-input.js +1 -1
- package/dist/components/fk-stepper.js +1 -1
- package/dist/components/fk-tabs.js +1 -1
- package/dist/components/fk-variable-picker.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-BYnOpgog.js → p-4J6WHge8.js} +1 -1
- package/dist/components/{p-D4AIlVj7.js → p-6IFMAlaM.js} +1 -1
- package/dist/components/{p-BNgstTrs.js → p-AxQWXLy8.js} +1 -1
- package/dist/components/{p-Ca6m8UMG.js → p-BJPNcA2I.js} +1 -1
- package/dist/components/p-BdV2F17R.js +1 -0
- package/dist/components/{p-C1QFqyCY.js → p-CJAIx_lh.js} +1 -1
- package/dist/components/{p-DrMYb2JF.js → p-CV5yMN-W.js} +5 -5
- package/dist/components/p-CY-uaS2y.js +1 -0
- package/dist/components/{p-CWB1pV6F.js → p-Ck8lu3cO.js} +1 -1
- package/dist/components/p-D23KNvvF.js +1 -0
- package/dist/components/{p-UBqrhUH9.js → p-DLWd_wkA.js} +1 -1
- package/dist/components/p-DMLnAgzb.js +1 -0
- package/dist/components/{p-fyNpcz6u.js → p-DSArI0Qr.js} +1 -1
- package/dist/{formkrafter-wc/p-CI3OKuAu.js → components/p-Deomtk7O.js} +1 -1
- package/dist/components/{p-DXpuft_B.js → p-DoRivFlV.js} +1 -1
- package/dist/components/{p-_r5Y7ZTv.js → p-Dwz_AerL.js} +1 -1
- package/dist/components/{p-BiRWoCM5.js → p-N4ocWM74.js} +1 -1
- package/dist/components/{p-n1ZfmAbp.js → p-QhU0FQmA.js} +1 -1
- package/dist/components/{p-yL2ezQGT.js → p-xwwy55X1.js} +1 -1
- package/dist/components/p-yZ54sN-p.js +1 -0
- package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
- package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
- package/dist/formkrafter-wc/index.esm.js +1 -1
- package/dist/{components/p-Ri4dmHJc.js → formkrafter-wc/p--7ABNliQ.js} +1 -1
- package/dist/formkrafter-wc/{p-65431291.entry.js → p-1f9e4187.entry.js} +1 -1
- package/dist/formkrafter-wc/p-36f8ef99.entry.js +1 -0
- package/dist/formkrafter-wc/{p-0--P75z3.js → p-DoSYU_vL.js} +5 -5
- package/dist/formkrafter-wc/p-f7ffd2a4.entry.js +1 -0
- package/dist/types/components/fk-address-search/fk-address-search.d.ts +57 -0
- package/dist/types/components/fk-geo-map/fk-geo-map.d.ts +31 -1
- package/dist/types/components.d.ts +165 -2
- package/dist/types/registry/default-bricks.d.ts +126 -0
- package/package.json +2 -2
- package/dist/components/p-2CyX0nUR.js +0 -1
- package/dist/components/p-CRwXPnZM.js +0 -1
- package/dist/components/p-DGWNeoAv.js +0 -1
- package/dist/components/p-Dijf1OvK.js +0 -1
- package/dist/formkrafter-wc/p-71246548.entry.js +0 -1
- package/dist/formkrafter-wc/p-c6783c00.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,H as r}from"./p-BDqOS1za.js";import{a as f}from"./p-DoSYU_vL.js";const a=class{constructor(t){e(this,t)}render(){return t(r,{key:"b90ba0b48a5b965c2d1e0f16732ef0664e370796"},t("div",{key:"c9858e4f28be65f58e5f02b86a2ae7b3c1e74b4c",class:"fk-empty"},t("p",{key:"625eae4fd358f64f729bd9c066f6ae8780fa4cb2",class:"fk-empty__title"},f("empty.title")),t("p",{key:"6b60a6f830e9938df4600209b3a5700a3bb7728c",class:"fk-empty__hint"},f("empty.hint"))))}};a.style=".fk-empty.sc-fk-empty-form{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--fk-spacing) / 2);min-height:160px;border:2px dashed var(--fk-color-border);border-radius:var(--fk-radius);color:var(--fk-color-muted);text-align:center}.fk-empty__title.sc-fk-empty-form{margin:0;font-weight:600}.fk-empty__hint.sc-fk-empty-form{margin:0;font-size:0.875rem}";export{a as fk_empty_form}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export interface AddressProperties {
|
|
3
|
+
label: string;
|
|
4
|
+
street?: string;
|
|
5
|
+
city?: string;
|
|
6
|
+
postcode?: string;
|
|
7
|
+
country?: string;
|
|
8
|
+
countryCode?: string;
|
|
9
|
+
placeId?: string;
|
|
10
|
+
}
|
|
11
|
+
/** A geocoded address: GeoJSON Feature, geometry null when it was typed but not located. */
|
|
12
|
+
export interface AddressFeature {
|
|
13
|
+
type: 'Feature';
|
|
14
|
+
geometry: {
|
|
15
|
+
type: 'Point';
|
|
16
|
+
coordinates: [number, number];
|
|
17
|
+
} | null;
|
|
18
|
+
properties: AddressProperties;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* An address search box: what is typed is looked up after a pause, the
|
|
22
|
+
* matches are listed, a pick stores the normalised address with its point.
|
|
23
|
+
* Text that is never picked stays as a label without geometry, so an address
|
|
24
|
+
* the provider does not know is still accepted.
|
|
25
|
+
*/
|
|
26
|
+
export declare class FkAddressSearch {
|
|
27
|
+
el: HTMLElement;
|
|
28
|
+
value?: AddressFeature;
|
|
29
|
+
/** Search URL with `{q}` for the query; Nominatim jsonv2 by default. */
|
|
30
|
+
searchUrl: string;
|
|
31
|
+
/** Comma-separated ISO codes to restrict the search (Nominatim `countrycodes`). */
|
|
32
|
+
countryCodes?: string;
|
|
33
|
+
language?: string;
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
readOnly: boolean;
|
|
37
|
+
minChars: number;
|
|
38
|
+
addressChange: EventEmitter<AddressFeature | undefined>;
|
|
39
|
+
query: string;
|
|
40
|
+
results: AddressFeature[];
|
|
41
|
+
open: boolean;
|
|
42
|
+
loading: boolean;
|
|
43
|
+
failed: boolean;
|
|
44
|
+
index: number;
|
|
45
|
+
private timer?;
|
|
46
|
+
private request;
|
|
47
|
+
private focused;
|
|
48
|
+
componentWillLoad(): void;
|
|
49
|
+
onValueChange(next: AddressFeature | undefined): void;
|
|
50
|
+
private get locked();
|
|
51
|
+
private buildUrl;
|
|
52
|
+
private search;
|
|
53
|
+
private onInput;
|
|
54
|
+
private pick;
|
|
55
|
+
private onKeyDown;
|
|
56
|
+
render(): any;
|
|
57
|
+
}
|
|
@@ -12,7 +12,12 @@ export type GeoLine = {
|
|
|
12
12
|
coordinates: [number, number][];
|
|
13
13
|
};
|
|
14
14
|
export type GeoGeometry = GeoPoint | GeoPolygon | GeoLine;
|
|
15
|
-
export type GeoMode = 'point' | 'polygon' | 'line';
|
|
15
|
+
export type GeoMode = 'point' | 'polygon' | 'line' | 'layer';
|
|
16
|
+
/** One zone of a reference layer, as the field stores it. */
|
|
17
|
+
export interface GeoZone {
|
|
18
|
+
code: string;
|
|
19
|
+
name: string;
|
|
20
|
+
}
|
|
16
21
|
/**
|
|
17
22
|
* A Leaflet map that edits one GeoJSON geometry: a point, a polygon or a
|
|
18
23
|
* line. Leaflet is loaded on first use so forms without a map stay light.
|
|
@@ -33,9 +38,23 @@ export declare class FkGeoMap {
|
|
|
33
38
|
readOnly: boolean;
|
|
34
39
|
/** Show latitude and longitude inputs under a point map. */
|
|
35
40
|
manual: boolean;
|
|
41
|
+
/** Layer mode: GeoJSON FeatureCollection to pick zones from. */
|
|
42
|
+
layerUrl?: string;
|
|
43
|
+
layerCodeProperty: string;
|
|
44
|
+
layerNameProperty: string;
|
|
45
|
+
/** Layer mode: codes of the selected zones. */
|
|
46
|
+
selected: string[];
|
|
47
|
+
multiple: boolean;
|
|
36
48
|
geoChange: EventEmitter<GeoGeometry | undefined>;
|
|
49
|
+
/** Layer mode: the selected zones, in selection order. */
|
|
50
|
+
layerChange: EventEmitter<GeoZone[]>;
|
|
37
51
|
failed: boolean;
|
|
38
52
|
vertexCount: number;
|
|
53
|
+
zones: GeoZone[];
|
|
54
|
+
layerFailed: boolean;
|
|
55
|
+
private layer?;
|
|
56
|
+
private layerData?;
|
|
57
|
+
private selectEl?;
|
|
39
58
|
private map?;
|
|
40
59
|
private L?;
|
|
41
60
|
private container?;
|
|
@@ -48,6 +67,8 @@ export declare class FkGeoMap {
|
|
|
48
67
|
disconnectedCallback(): void;
|
|
49
68
|
onValueChange(next: GeoGeometry | undefined): void;
|
|
50
69
|
onLockChange(): void;
|
|
70
|
+
onSelectedChange(): void;
|
|
71
|
+
onLayerUrlChange(): void;
|
|
51
72
|
private initMap;
|
|
52
73
|
/** Reads the value into vertices and draws it, without emitting. */
|
|
53
74
|
private draw;
|
|
@@ -59,5 +80,14 @@ export declare class FkGeoMap {
|
|
|
59
80
|
private clear;
|
|
60
81
|
/** Manual latitude / longitude edit of a point, map or not. Emptying either empties the point. */
|
|
61
82
|
private setManual;
|
|
83
|
+
componentDidRender(): void;
|
|
84
|
+
private zoneOf;
|
|
85
|
+
private fetchLayer;
|
|
86
|
+
private layerStyle;
|
|
87
|
+
private drawLayer;
|
|
88
|
+
private restyleLayer;
|
|
89
|
+
private toggleZone;
|
|
90
|
+
private emitZones;
|
|
91
|
+
private renderLayerBar;
|
|
62
92
|
render(): any;
|
|
63
93
|
}
|
|
@@ -5,15 +5,49 @@
|
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
import { AddressFeature } from "./components/fk-address-search/fk-address-search";
|
|
8
9
|
import { BrickConfigsChangeDetail, BrickDropDetail, BrickPathDetail, BrickReviewChangeDetail, BrickRulesChangeDetail, BrickStylesChangeDetail, BrickValidationsChangeDetail, DataChangeDetail, ReviewChangeDetail, SpecChangeDetail, ValidityChangeDetail } from "./utils/events";
|
|
9
10
|
import { BrickMold, BrickSpec, FieldAnnotations, UploadedFile, Utils, ValidationResult } from "@streamline-pulse/formkrafter-core";
|
|
10
|
-
import { GeoGeometry, GeoMode } from "./components/fk-geo-map/fk-geo-map";
|
|
11
|
+
import { GeoGeometry, GeoMode, GeoZone } from "./components/fk-geo-map/fk-geo-map";
|
|
11
12
|
import { FkVariable } from "./components/fk-variable-picker/fk-variable-picker";
|
|
13
|
+
export { AddressFeature } from "./components/fk-address-search/fk-address-search";
|
|
12
14
|
export { BrickConfigsChangeDetail, BrickDropDetail, BrickPathDetail, BrickReviewChangeDetail, BrickRulesChangeDetail, BrickStylesChangeDetail, BrickValidationsChangeDetail, DataChangeDetail, ReviewChangeDetail, SpecChangeDetail, ValidityChangeDetail } from "./utils/events";
|
|
13
15
|
export { BrickMold, BrickSpec, FieldAnnotations, UploadedFile, Utils, ValidationResult } from "@streamline-pulse/formkrafter-core";
|
|
14
|
-
export { GeoGeometry, GeoMode } from "./components/fk-geo-map/fk-geo-map";
|
|
16
|
+
export { GeoGeometry, GeoMode, GeoZone } from "./components/fk-geo-map/fk-geo-map";
|
|
15
17
|
export { FkVariable } from "./components/fk-variable-picker/fk-variable-picker";
|
|
16
18
|
export namespace Components {
|
|
19
|
+
/**
|
|
20
|
+
* An address search box: what is typed is looked up after a pause, the
|
|
21
|
+
* matches are listed, a pick stores the normalised address with its point.
|
|
22
|
+
* Text that is never picked stays as a label without geometry, so an address
|
|
23
|
+
* the provider does not know is still accepted.
|
|
24
|
+
*/
|
|
25
|
+
interface FkAddressSearch {
|
|
26
|
+
/**
|
|
27
|
+
* Comma-separated ISO codes to restrict the search (Nominatim `countrycodes`).
|
|
28
|
+
*/
|
|
29
|
+
"countryCodes"?: string;
|
|
30
|
+
/**
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
"disabled": boolean;
|
|
34
|
+
"language"?: string;
|
|
35
|
+
/**
|
|
36
|
+
* @default 3
|
|
37
|
+
*/
|
|
38
|
+
"minChars": number;
|
|
39
|
+
"placeholder"?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
"readOnly": boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Search URL with `{q}` for the query; Nominatim jsonv2 by default.
|
|
46
|
+
* @default 'https://nominatim.openstreetmap.org/search?format=jsonv2&addressdetails=1&limit=5&q={q}'
|
|
47
|
+
*/
|
|
48
|
+
"searchUrl": string;
|
|
49
|
+
"value"?: AddressFeature;
|
|
50
|
+
}
|
|
17
51
|
interface FkBrickActions {
|
|
18
52
|
"path": string;
|
|
19
53
|
/**
|
|
@@ -221,6 +255,18 @@ export namespace Components {
|
|
|
221
255
|
* @default 320
|
|
222
256
|
*/
|
|
223
257
|
"height": number;
|
|
258
|
+
/**
|
|
259
|
+
* @default 'code'
|
|
260
|
+
*/
|
|
261
|
+
"layerCodeProperty": string;
|
|
262
|
+
/**
|
|
263
|
+
* @default 'name'
|
|
264
|
+
*/
|
|
265
|
+
"layerNameProperty": string;
|
|
266
|
+
/**
|
|
267
|
+
* Layer mode: GeoJSON FeatureCollection to pick zones from.
|
|
268
|
+
*/
|
|
269
|
+
"layerUrl"?: string;
|
|
224
270
|
/**
|
|
225
271
|
* Show latitude and longitude inputs under a point map.
|
|
226
272
|
* @default true
|
|
@@ -230,10 +276,19 @@ export namespace Components {
|
|
|
230
276
|
* @default 'point'
|
|
231
277
|
*/
|
|
232
278
|
"mode": GeoMode;
|
|
279
|
+
/**
|
|
280
|
+
* @default false
|
|
281
|
+
*/
|
|
282
|
+
"multiple": boolean;
|
|
233
283
|
/**
|
|
234
284
|
* @default false
|
|
235
285
|
*/
|
|
236
286
|
"readOnly": boolean;
|
|
287
|
+
/**
|
|
288
|
+
* Layer mode: codes of the selected zones.
|
|
289
|
+
* @default []
|
|
290
|
+
*/
|
|
291
|
+
"selected": string[];
|
|
237
292
|
/**
|
|
238
293
|
* @default 'https://tile.openstreetmap.org/{z}/{x}/{y}.png'
|
|
239
294
|
*/
|
|
@@ -334,6 +389,10 @@ export namespace Components {
|
|
|
334
389
|
"variables": FkVariable[];
|
|
335
390
|
}
|
|
336
391
|
}
|
|
392
|
+
export interface FkAddressSearchCustomEvent<T> extends CustomEvent<T> {
|
|
393
|
+
detail: T;
|
|
394
|
+
target: HTMLFkAddressSearchElement;
|
|
395
|
+
}
|
|
337
396
|
export interface FkBrickActionsCustomEvent<T> extends CustomEvent<T> {
|
|
338
397
|
detail: T;
|
|
339
398
|
target: HTMLFkBrickActionsElement;
|
|
@@ -403,6 +462,29 @@ export interface FkVariablePickerCustomEvent<T> extends CustomEvent<T> {
|
|
|
403
462
|
target: HTMLFkVariablePickerElement;
|
|
404
463
|
}
|
|
405
464
|
declare global {
|
|
465
|
+
interface HTMLFkAddressSearchElementEventMap {
|
|
466
|
+
"addressChange": AddressFeature | undefined;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* An address search box: what is typed is looked up after a pause, the
|
|
470
|
+
* matches are listed, a pick stores the normalised address with its point.
|
|
471
|
+
* Text that is never picked stays as a label without geometry, so an address
|
|
472
|
+
* the provider does not know is still accepted.
|
|
473
|
+
*/
|
|
474
|
+
interface HTMLFkAddressSearchElement extends Components.FkAddressSearch, HTMLStencilElement {
|
|
475
|
+
addEventListener<K extends keyof HTMLFkAddressSearchElementEventMap>(type: K, listener: (this: HTMLFkAddressSearchElement, ev: FkAddressSearchCustomEvent<HTMLFkAddressSearchElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
476
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
477
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
478
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
479
|
+
removeEventListener<K extends keyof HTMLFkAddressSearchElementEventMap>(type: K, listener: (this: HTMLFkAddressSearchElement, ev: FkAddressSearchCustomEvent<HTMLFkAddressSearchElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
480
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
481
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
482
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
483
|
+
}
|
|
484
|
+
var HTMLFkAddressSearchElement: {
|
|
485
|
+
prototype: HTMLFkAddressSearchElement;
|
|
486
|
+
new (): HTMLFkAddressSearchElement;
|
|
487
|
+
};
|
|
406
488
|
interface HTMLFkBrickActionsElementEventMap {
|
|
407
489
|
"brickRemove": BrickPathDetail;
|
|
408
490
|
"brickDuplicate": BrickPathDetail;
|
|
@@ -600,6 +682,7 @@ declare global {
|
|
|
600
682
|
};
|
|
601
683
|
interface HTMLFkGeoMapElementEventMap {
|
|
602
684
|
"geoChange": GeoGeometry | undefined;
|
|
685
|
+
"layerChange": GeoZone[];
|
|
603
686
|
}
|
|
604
687
|
/**
|
|
605
688
|
* A Leaflet map that edits one GeoJSON geometry: a point, a polygon or a
|
|
@@ -750,6 +833,7 @@ declare global {
|
|
|
750
833
|
new (): HTMLFkVariablePickerElement;
|
|
751
834
|
};
|
|
752
835
|
interface HTMLElementTagNameMap {
|
|
836
|
+
"fk-address-search": HTMLFkAddressSearchElement;
|
|
753
837
|
"fk-brick-actions": HTMLFkBrickActionsElement;
|
|
754
838
|
"fk-brick-list": HTMLFkBrickListElement;
|
|
755
839
|
"fk-brick-mold-item": HTMLFkBrickMoldItemElement;
|
|
@@ -776,6 +860,39 @@ declare global {
|
|
|
776
860
|
declare namespace LocalJSX {
|
|
777
861
|
type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}` | `prop:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K | `prop:${K}`]?: never } | { [P in `prop:${K}`]: PropT } & { [P in K | `attr:${K}`]?: never };
|
|
778
862
|
|
|
863
|
+
/**
|
|
864
|
+
* An address search box: what is typed is looked up after a pause, the
|
|
865
|
+
* matches are listed, a pick stores the normalised address with its point.
|
|
866
|
+
* Text that is never picked stays as a label without geometry, so an address
|
|
867
|
+
* the provider does not know is still accepted.
|
|
868
|
+
*/
|
|
869
|
+
interface FkAddressSearch {
|
|
870
|
+
/**
|
|
871
|
+
* Comma-separated ISO codes to restrict the search (Nominatim `countrycodes`).
|
|
872
|
+
*/
|
|
873
|
+
"countryCodes"?: string;
|
|
874
|
+
/**
|
|
875
|
+
* @default false
|
|
876
|
+
*/
|
|
877
|
+
"disabled"?: boolean;
|
|
878
|
+
"language"?: string;
|
|
879
|
+
/**
|
|
880
|
+
* @default 3
|
|
881
|
+
*/
|
|
882
|
+
"minChars"?: number;
|
|
883
|
+
"onAddressChange"?: (event: FkAddressSearchCustomEvent<AddressFeature | undefined>) => void;
|
|
884
|
+
"placeholder"?: string;
|
|
885
|
+
/**
|
|
886
|
+
* @default false
|
|
887
|
+
*/
|
|
888
|
+
"readOnly"?: boolean;
|
|
889
|
+
/**
|
|
890
|
+
* Search URL with `{q}` for the query; Nominatim jsonv2 by default.
|
|
891
|
+
* @default 'https://nominatim.openstreetmap.org/search?format=jsonv2&addressdetails=1&limit=5&q={q}'
|
|
892
|
+
*/
|
|
893
|
+
"searchUrl"?: string;
|
|
894
|
+
"value"?: AddressFeature;
|
|
895
|
+
}
|
|
779
896
|
interface FkBrickActions {
|
|
780
897
|
"onBrickDrop"?: (event: FkBrickActionsCustomEvent<BrickDropDetail>) => void;
|
|
781
898
|
"onBrickDuplicate"?: (event: FkBrickActionsCustomEvent<BrickPathDetail>) => void;
|
|
@@ -1010,6 +1127,18 @@ declare namespace LocalJSX {
|
|
|
1010
1127
|
* @default 320
|
|
1011
1128
|
*/
|
|
1012
1129
|
"height"?: number;
|
|
1130
|
+
/**
|
|
1131
|
+
* @default 'code'
|
|
1132
|
+
*/
|
|
1133
|
+
"layerCodeProperty"?: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* @default 'name'
|
|
1136
|
+
*/
|
|
1137
|
+
"layerNameProperty"?: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* Layer mode: GeoJSON FeatureCollection to pick zones from.
|
|
1140
|
+
*/
|
|
1141
|
+
"layerUrl"?: string;
|
|
1013
1142
|
/**
|
|
1014
1143
|
* Show latitude and longitude inputs under a point map.
|
|
1015
1144
|
* @default true
|
|
@@ -1019,11 +1148,24 @@ declare namespace LocalJSX {
|
|
|
1019
1148
|
* @default 'point'
|
|
1020
1149
|
*/
|
|
1021
1150
|
"mode"?: GeoMode;
|
|
1151
|
+
/**
|
|
1152
|
+
* @default false
|
|
1153
|
+
*/
|
|
1154
|
+
"multiple"?: boolean;
|
|
1022
1155
|
"onGeoChange"?: (event: FkGeoMapCustomEvent<GeoGeometry | undefined>) => void;
|
|
1156
|
+
/**
|
|
1157
|
+
* Layer mode: the selected zones, in selection order.
|
|
1158
|
+
*/
|
|
1159
|
+
"onLayerChange"?: (event: FkGeoMapCustomEvent<GeoZone[]>) => void;
|
|
1023
1160
|
/**
|
|
1024
1161
|
* @default false
|
|
1025
1162
|
*/
|
|
1026
1163
|
"readOnly"?: boolean;
|
|
1164
|
+
/**
|
|
1165
|
+
* Layer mode: codes of the selected zones.
|
|
1166
|
+
* @default []
|
|
1167
|
+
*/
|
|
1168
|
+
"selected"?: string[];
|
|
1027
1169
|
/**
|
|
1028
1170
|
* @default 'https://tile.openstreetmap.org/{z}/{x}/{y}.png'
|
|
1029
1171
|
*/
|
|
@@ -1134,6 +1276,15 @@ declare namespace LocalJSX {
|
|
|
1134
1276
|
"variables"?: FkVariable[];
|
|
1135
1277
|
}
|
|
1136
1278
|
|
|
1279
|
+
interface FkAddressSearchAttributes {
|
|
1280
|
+
"searchUrl": string;
|
|
1281
|
+
"countryCodes": string;
|
|
1282
|
+
"language": string;
|
|
1283
|
+
"placeholder": string;
|
|
1284
|
+
"disabled": boolean;
|
|
1285
|
+
"readOnly": boolean;
|
|
1286
|
+
"minChars": number;
|
|
1287
|
+
}
|
|
1137
1288
|
interface FkBrickActionsAttributes {
|
|
1138
1289
|
"path": string;
|
|
1139
1290
|
"selected": boolean;
|
|
@@ -1195,6 +1346,10 @@ declare namespace LocalJSX {
|
|
|
1195
1346
|
"disabled": boolean;
|
|
1196
1347
|
"readOnly": boolean;
|
|
1197
1348
|
"manual": boolean;
|
|
1349
|
+
"layerUrl": string;
|
|
1350
|
+
"layerCodeProperty": string;
|
|
1351
|
+
"layerNameProperty": string;
|
|
1352
|
+
"multiple": boolean;
|
|
1198
1353
|
}
|
|
1199
1354
|
interface FkPropertyPanelAttributes {
|
|
1200
1355
|
"path": string;
|
|
@@ -1226,6 +1381,7 @@ declare namespace LocalJSX {
|
|
|
1226
1381
|
}
|
|
1227
1382
|
|
|
1228
1383
|
interface IntrinsicElements {
|
|
1384
|
+
"fk-address-search": Omit<FkAddressSearch, keyof FkAddressSearchAttributes> & { [K in keyof FkAddressSearch & keyof FkAddressSearchAttributes]?: FkAddressSearch[K] } & { [K in keyof FkAddressSearch & keyof FkAddressSearchAttributes as `attr:${K}`]?: FkAddressSearchAttributes[K] } & { [K in keyof FkAddressSearch & keyof FkAddressSearchAttributes as `prop:${K}`]?: FkAddressSearch[K] };
|
|
1229
1385
|
"fk-brick-actions": Omit<FkBrickActions, keyof FkBrickActionsAttributes> & { [K in keyof FkBrickActions & keyof FkBrickActionsAttributes]?: FkBrickActions[K] } & { [K in keyof FkBrickActions & keyof FkBrickActionsAttributes as `attr:${K}`]?: FkBrickActionsAttributes[K] } & { [K in keyof FkBrickActions & keyof FkBrickActionsAttributes as `prop:${K}`]?: FkBrickActions[K] } & OneOf<"path", FkBrickActions["path"], FkBrickActionsAttributes["path"]>;
|
|
1230
1386
|
"fk-brick-list": Omit<FkBrickList, keyof FkBrickListAttributes> & { [K in keyof FkBrickList & keyof FkBrickListAttributes]?: FkBrickList[K] } & { [K in keyof FkBrickList & keyof FkBrickListAttributes as `attr:${K}`]?: FkBrickListAttributes[K] } & { [K in keyof FkBrickList & keyof FkBrickListAttributes as `prop:${K}`]?: FkBrickList[K] };
|
|
1231
1387
|
"fk-brick-mold-item": FkBrickMoldItem;
|
|
@@ -1253,6 +1409,13 @@ export { LocalJSX as JSX };
|
|
|
1253
1409
|
declare module "@stencil/core" {
|
|
1254
1410
|
export namespace JSX {
|
|
1255
1411
|
interface IntrinsicElements {
|
|
1412
|
+
/**
|
|
1413
|
+
* An address search box: what is typed is looked up after a pause, the
|
|
1414
|
+
* matches are listed, a pick stores the normalised address with its point.
|
|
1415
|
+
* Text that is never picked stays as a label without geometry, so an address
|
|
1416
|
+
* the provider does not know is still accepted.
|
|
1417
|
+
*/
|
|
1418
|
+
"fk-address-search": LocalJSX.IntrinsicElements["fk-address-search"] & JSXBase.HTMLAttributes<HTMLFkAddressSearchElement>;
|
|
1256
1419
|
"fk-brick-actions": LocalJSX.IntrinsicElements["fk-brick-actions"] & JSXBase.HTMLAttributes<HTMLFkBrickActionsElement>;
|
|
1257
1420
|
"fk-brick-list": LocalJSX.IntrinsicElements["fk-brick-list"] & JSXBase.HTMLAttributes<HTMLFkBrickListElement>;
|
|
1258
1421
|
"fk-brick-mold-item": LocalJSX.IntrinsicElements["fk-brick-mold-item"] & JSXBase.HTMLAttributes<HTMLFkBrickMoldItemElement>;
|
|
@@ -307,6 +307,132 @@ export declare const geoAreaBrick: {
|
|
|
307
307
|
readonly defaultConfigs?: Record<string, unknown>;
|
|
308
308
|
getBrickEmptySpec(): BrickSpec;
|
|
309
309
|
};
|
|
310
|
+
export declare const geoAddressBrick: {
|
|
311
|
+
render(props: WcBrickProps): VNode;
|
|
312
|
+
renderBuilder(props: WcBrickProps): VNode;
|
|
313
|
+
getComponent(props: WcBrickProps): VNode;
|
|
314
|
+
getComponentWithActions(props: WcBrickProps): VNode;
|
|
315
|
+
readonly type: import("@streamline-pulse/formkrafter-core").BrickType;
|
|
316
|
+
readonly dataType: import("@streamline-pulse/formkrafter-core").JSONSchemaType;
|
|
317
|
+
readonly id: string;
|
|
318
|
+
readonly name: string;
|
|
319
|
+
readonly configsForm?: BrickSpec;
|
|
320
|
+
readonly category?: string;
|
|
321
|
+
readonly styles?: Record<string, unknown>;
|
|
322
|
+
readonly unWrapData: boolean;
|
|
323
|
+
readonly isPrivate: boolean;
|
|
324
|
+
readonly validators: import("@streamline-pulse/formkrafter-core").Validator[];
|
|
325
|
+
readonly defaultConfigs?: Record<string, unknown>;
|
|
326
|
+
getBrickEmptySpec(): BrickSpec;
|
|
327
|
+
};
|
|
328
|
+
export declare const geoLayerBrick: {
|
|
329
|
+
render(props: WcBrickProps): VNode;
|
|
330
|
+
renderBuilder(props: WcBrickProps): VNode;
|
|
331
|
+
getComponent(props: WcBrickProps): VNode;
|
|
332
|
+
getComponentWithActions(props: WcBrickProps): VNode;
|
|
333
|
+
readonly type: import("@streamline-pulse/formkrafter-core").BrickType;
|
|
334
|
+
readonly dataType: import("@streamline-pulse/formkrafter-core").JSONSchemaType;
|
|
335
|
+
readonly id: string;
|
|
336
|
+
readonly name: string;
|
|
337
|
+
readonly configsForm?: BrickSpec;
|
|
338
|
+
readonly category?: string;
|
|
339
|
+
readonly styles?: Record<string, unknown>;
|
|
340
|
+
readonly unWrapData: boolean;
|
|
341
|
+
readonly isPrivate: boolean;
|
|
342
|
+
readonly validators: import("@streamline-pulse/formkrafter-core").Validator[];
|
|
343
|
+
readonly defaultConfigs?: Record<string, unknown>;
|
|
344
|
+
getBrickEmptySpec(): BrickSpec;
|
|
345
|
+
};
|
|
346
|
+
export declare const nationalIdBrick: {
|
|
347
|
+
render(props: WcBrickProps): VNode;
|
|
348
|
+
renderBuilder(props: WcBrickProps): VNode;
|
|
349
|
+
getComponent(props: WcBrickProps): VNode;
|
|
350
|
+
getComponentWithActions(props: WcBrickProps): VNode;
|
|
351
|
+
readonly type: import("@streamline-pulse/formkrafter-core").BrickType;
|
|
352
|
+
readonly dataType: import("@streamline-pulse/formkrafter-core").JSONSchemaType;
|
|
353
|
+
readonly id: string;
|
|
354
|
+
readonly name: string;
|
|
355
|
+
readonly configsForm?: BrickSpec;
|
|
356
|
+
readonly category?: string;
|
|
357
|
+
readonly styles?: Record<string, unknown>;
|
|
358
|
+
readonly unWrapData: boolean;
|
|
359
|
+
readonly isPrivate: boolean;
|
|
360
|
+
readonly validators: import("@streamline-pulse/formkrafter-core").Validator[];
|
|
361
|
+
readonly defaultConfigs?: Record<string, unknown>;
|
|
362
|
+
getBrickEmptySpec(): BrickSpec;
|
|
363
|
+
};
|
|
364
|
+
export declare const mrzBrick: {
|
|
365
|
+
render(props: WcBrickProps): VNode;
|
|
366
|
+
renderBuilder(props: WcBrickProps): VNode;
|
|
367
|
+
getComponent(props: WcBrickProps): VNode;
|
|
368
|
+
getComponentWithActions(props: WcBrickProps): VNode;
|
|
369
|
+
readonly type: import("@streamline-pulse/formkrafter-core").BrickType;
|
|
370
|
+
readonly dataType: import("@streamline-pulse/formkrafter-core").JSONSchemaType;
|
|
371
|
+
readonly id: string;
|
|
372
|
+
readonly name: string;
|
|
373
|
+
readonly configsForm?: BrickSpec;
|
|
374
|
+
readonly category?: string;
|
|
375
|
+
readonly styles?: Record<string, unknown>;
|
|
376
|
+
readonly unWrapData: boolean;
|
|
377
|
+
readonly isPrivate: boolean;
|
|
378
|
+
readonly validators: import("@streamline-pulse/formkrafter-core").Validator[];
|
|
379
|
+
readonly defaultConfigs?: Record<string, unknown>;
|
|
380
|
+
getBrickEmptySpec(): BrickSpec;
|
|
381
|
+
};
|
|
382
|
+
export declare const taxIdBrick: {
|
|
383
|
+
render(props: WcBrickProps): VNode;
|
|
384
|
+
renderBuilder(props: WcBrickProps): VNode;
|
|
385
|
+
getComponent(props: WcBrickProps): VNode;
|
|
386
|
+
getComponentWithActions(props: WcBrickProps): VNode;
|
|
387
|
+
readonly type: import("@streamline-pulse/formkrafter-core").BrickType;
|
|
388
|
+
readonly dataType: import("@streamline-pulse/formkrafter-core").JSONSchemaType;
|
|
389
|
+
readonly id: string;
|
|
390
|
+
readonly name: string;
|
|
391
|
+
readonly configsForm?: BrickSpec;
|
|
392
|
+
readonly category?: string;
|
|
393
|
+
readonly styles?: Record<string, unknown>;
|
|
394
|
+
readonly unWrapData: boolean;
|
|
395
|
+
readonly isPrivate: boolean;
|
|
396
|
+
readonly validators: import("@streamline-pulse/formkrafter-core").Validator[];
|
|
397
|
+
readonly defaultConfigs?: Record<string, unknown>;
|
|
398
|
+
getBrickEmptySpec(): BrickSpec;
|
|
399
|
+
};
|
|
400
|
+
export declare const ibanBrick: {
|
|
401
|
+
render(props: WcBrickProps): VNode;
|
|
402
|
+
renderBuilder(props: WcBrickProps): VNode;
|
|
403
|
+
getComponent(props: WcBrickProps): VNode;
|
|
404
|
+
getComponentWithActions(props: WcBrickProps): VNode;
|
|
405
|
+
readonly type: import("@streamline-pulse/formkrafter-core").BrickType;
|
|
406
|
+
readonly dataType: import("@streamline-pulse/formkrafter-core").JSONSchemaType;
|
|
407
|
+
readonly id: string;
|
|
408
|
+
readonly name: string;
|
|
409
|
+
readonly configsForm?: BrickSpec;
|
|
410
|
+
readonly category?: string;
|
|
411
|
+
readonly styles?: Record<string, unknown>;
|
|
412
|
+
readonly unWrapData: boolean;
|
|
413
|
+
readonly isPrivate: boolean;
|
|
414
|
+
readonly validators: import("@streamline-pulse/formkrafter-core").Validator[];
|
|
415
|
+
readonly defaultConfigs?: Record<string, unknown>;
|
|
416
|
+
getBrickEmptySpec(): BrickSpec;
|
|
417
|
+
};
|
|
418
|
+
export declare const moneyBrick: {
|
|
419
|
+
render(props: WcBrickProps): VNode;
|
|
420
|
+
renderBuilder(props: WcBrickProps): VNode;
|
|
421
|
+
getComponent(props: WcBrickProps): VNode;
|
|
422
|
+
getComponentWithActions(props: WcBrickProps): VNode;
|
|
423
|
+
readonly type: import("@streamline-pulse/formkrafter-core").BrickType;
|
|
424
|
+
readonly dataType: import("@streamline-pulse/formkrafter-core").JSONSchemaType;
|
|
425
|
+
readonly id: string;
|
|
426
|
+
readonly name: string;
|
|
427
|
+
readonly configsForm?: BrickSpec;
|
|
428
|
+
readonly category?: string;
|
|
429
|
+
readonly styles?: Record<string, unknown>;
|
|
430
|
+
readonly unWrapData: boolean;
|
|
431
|
+
readonly isPrivate: boolean;
|
|
432
|
+
readonly validators: import("@streamline-pulse/formkrafter-core").Validator[];
|
|
433
|
+
readonly defaultConfigs?: Record<string, unknown>;
|
|
434
|
+
getBrickEmptySpec(): BrickSpec;
|
|
435
|
+
};
|
|
310
436
|
export declare const tabsBrick: {
|
|
311
437
|
render(props: WcBrickProps): VNode;
|
|
312
438
|
renderBuilder(props: WcBrickProps): VNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamline-pulse/formkrafter-wc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "FormKrafter web components (Stencil)",
|
|
6
6
|
"main": "dist/components/index.js",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@codemirror/state": "^6.7.1",
|
|
63
63
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
64
64
|
"@codemirror/view": "^6.43.6",
|
|
65
|
-
"@streamline-pulse/formkrafter-core": "0.
|
|
65
|
+
"@streamline-pulse/formkrafter-core": "0.27.0",
|
|
66
66
|
"leaflet": "1.9.4"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e,p as t,H as s,c as o,h as r}from"./p-8ICOcloT.js";import{b as a,j as l,f as i}from"./p-DrMYb2JF.js";import{d as p}from"./p-BE5v8BN3.js";import{d as n}from"./p-UBqrhUH9.js";const c=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.brickConfigsChange=o(this,"brickConfigsChange"),this.brickValidationsChange=o(this,"brickValidationsChange"),this.brickStylesChange=o(this,"brickStylesChange"),this.fields=[],this.locales=[],this.activeTab="config",this.newStyleKey=""}onBrickChange(){this.availableTabs().some((e=>e.id===this.activeTab))||(this.activeTab="config")}availableTabs(){const e=[{id:"config",label:a("panel.tab.config")}];return"input"===this.brick.type&&e.push({id:"validation",label:a("panel.tab.validation")}),e.push({id:"styles",label:a("panel.tab.styles")},{id:"rules",label:a("panel.tab.rules")}),e}localized(e,t){var s;if(this.locales.length<=1)return t||void 0;const o=l(e)?Object.assign({},e):{};return"string"==typeof e&&e&&!l(e)&&(o[this.locales[0]]=e),o[null!==(s=this.editLocale)&&void 0!==s?s:this.locales[0]]=t,o}readLocalized(e){var t,s,o;return l(e)?null!==(s=e[null!==(t=this.editLocale)&&void 0!==t?t:this.locales[0]])&&void 0!==s?s:"":null!==(o=e)&&void 0!==o?o:""}writeTextConfig(e,t){var s;this.emitConfigs({[e]:this.localized(null===(s=this.brick.configs)||void 0===s?void 0:s[e],t)})}emitConfigs(e){this.path&&this.brickConfigsChange.emit({configs:e,path:this.path})}emitValidations(e){this.path&&this.brickValidationsChange.emit({validations:e,path:this.path})}emitStyles(e){this.path&&this.brickStylesChange.emit({styles:e,path:this.path})}validationOf(e){var t;return null===(t=this.brick.validations)||void 0===t?void 0:t.find((t=>t.validator===e))}setValidation(e,t,s={}){var o;const r=this.validationOf(e),a=(null!==(o=this.brick.validations)&&void 0!==o?o:[]).filter((t=>t.validator!==e));this.emitValidations(t?[...a,Object.assign(Object.assign(Object.assign({},r),{validator:e}),s)]:a)}addStyle(e){const t=this.newStyleKey.trim();t&&(this.emitStyles({[t]:e}),this.newStyleKey="")}textField(e,t,s){var o;return r("label",{class:"fk-props__field"},r("span",{class:"fk-props__label"},e),r("input",{class:"fk-props__input",type:"text",value:null!==(o=t)&&void 0!==o?o:"",onChange:e=>s(e.target.value)}))}optionsFields(){var e,t,s;const o=this.brick.configs;if(!o||!("options"in o)&&!("optionsSource"in o))return[];const l="optionsSource"in o,i=l&&null!==(e=o.optionsSource)&&void 0!==e?e:"static",p=l?[r("label",{class:"fk-props__field"},r("span",{class:"fk-props__label"},a("panel.optionsSource")),r("select",{class:"fk-props__input",onChange:e=>this.emitConfigs({optionsSource:e.target.value})},["static","dataMap","remote","js","catalog"].map((e=>r("option",{value:e,selected:e===i},e)))))]:[];return"static"===i&&p.push(r("label",{class:"fk-props__field"},r("span",{class:"fk-props__label"},a("panel.options")),r("textarea",{class:"fk-props__input fk-props__input--textarea",onChange:e=>this.writeTextConfig("options",e.target.value)},this.readLocalized(o.options)))),"dataMap"===i&&p.push(this.textField(a("panel.dataKey"),o.optionsPath,(e=>this.emitConfigs({optionsPath:e})))),"remote"===i&&p.push(this.textField(a("panel.url"),o.optionsUrl,(e=>this.emitConfigs({optionsUrl:e}))),this.textField(a("panel.responsePath"),o.optionsPath,(e=>this.emitConfigs({optionsPath:e||void 0}))),r("label",{class:"fk-props__field"},r("span",{class:"fk-props__label"},a("panel.headers")),r("textarea",{class:"fk-props__input fk-props__input--textarea",placeholder:"Authorization: Bearer {token}",onChange:e=>this.emitConfigs({optionsHeaders:e.target.value||void 0})},null!==(t=o.optionsHeaders)&&void 0!==t?t:"")),this.textField(a("panel.searchParam"),o.searchParam,(e=>this.emitConfigs({searchParam:e||void 0})))),"js"===i&&p.push(r("label",{class:"fk-props__field"},r("span",{class:"fk-props__label"},"Code"),r("fk-code-editor",{completions:this.fields,value:null!==(s=o.optionsCode)&&void 0!==s?s:"",placeholder:"return dataMap.country === 'BJ' ? ['Cotonou'] : ['Paris'];",onCodeChange:e=>this.emitConfigs({optionsCode:e.detail})}))),"catalog"===i&&p.push(this.textField(a("panel.optionsRef"),o.optionsRef,(e=>this.emitConfigs({optionsRef:e})))),"remote"!==i&&"js"!==i&&"catalog"!==i||p.push(this.textField(a("panel.labelKey"),o.labelKey,(e=>this.emitConfigs({labelKey:e}))),this.textField(a("panel.valueKey"),o.valueKey,(e=>this.emitConfigs({valueKey:e})))),p}renderConfigTab(){const e=this.brick.configs,t="input"===this.brick.type;return r("section",{class:"fk-props__section"},this.textField(a("panel.key"),null==e?void 0:e.key,(e=>this.emitConfigs({key:e}))),this.textField(a("panel.label"),this.readLocalized(null==e?void 0:e.label),(e=>this.writeTextConfig("label",e))),t?[this.textField(a("panel.placeholder"),this.readLocalized(null==e?void 0:e.placeholder),(e=>this.writeTextConfig("placeholder",e))),this.textField(a("panel.prefix"),null==e?void 0:e.prefix,(e=>this.emitConfigs({prefix:e||void 0}))),this.textField(a("panel.suffix"),null==e?void 0:e.suffix,(e=>this.emitConfigs({suffix:e||void 0})))]:null,e&&"specRef"in e?this.textField(i("panel.specRef","Referenced form (specRef)"),e.specRef,(e=>this.emitConfigs({specRef:e}))):null,e&&"mask"in e?this.textField(i("panel.mask","Input mask (9=digit, a=letter, *=any)"),e.mask,(e=>this.emitConfigs({mask:e}))):null,e&&"tileUrl"in e?[this.textField(i("panel.center","Initial center (lat, lng)"),e.center,(e=>this.emitConfigs({center:e}))),this.textField(i("panel.zoom","Initial zoom"),e.zoom,(e=>this.emitConfigs({zoom:""===e?void 0:Number(e)}))),this.textField(i("panel.height","Height (px)"),e.height,(e=>this.emitConfigs({height:""===e?void 0:Number(e)}))),this.textField(i("panel.tileUrl","Tile URL"),e.tileUrl,(e=>this.emitConfigs({tileUrl:e}))),"shape"in e?this.textField(i("panel.shape","Shape (polygon or line)"),e.shape,(e=>this.emitConfigs({shape:"line"===e?"line":"polygon"}))):null]:null,e&&"accept"in e?this.textField(i("panel.accept","Accepted file types"),e.accept,(e=>this.emitConfigs({accept:e}))):null,e&&"uploadUrl"in e?this.textField(i("panel.uploadUrl","Upload URL"),e.uploadUrl,(e=>this.emitConfigs({uploadUrl:e}))):null,this.optionsFields(),Object.entries(null!=e?e:{}).filter((([,e])=>"boolean"==typeof e)).map((([e,t])=>r("label",{class:"fk-props__field fk-props__field--inline",key:e},r("input",{type:"checkbox",checked:!0===t,onChange:t=>this.emitConfigs({[e]:t.target.checked})}),r("span",{class:"fk-props__label"},i(`panel.cfg.${e}`,e))))),e&&"content"in e?r("label",{class:"fk-props__field"},r("span",{class:"fk-props__label"},a("panel.content")),r("textarea",{class:"fk-props__input fk-props__input--textarea",onChange:e=>this.writeTextConfig("content",e.target.value)},this.readLocalized(e.content))):null)}validationRow(e,t,s){const o=this.validationOf(e);return r("div",{class:"fk-props__vrule"},r("label",{class:"fk-props__field fk-props__field--inline"},r("input",{type:"checkbox",checked:!!o,onChange:t=>this.setValidation(e,t.target.checked)}),r("span",{class:"fk-props__label"},t)),o&&s?r("input",{class:"fk-props__input",type:s,placeholder:"number"===s?"value":"regex",value:null==o.value?"":String(o.value),onChange:t=>{const o=t.target.value;this.setValidation(e,!0,{value:"number"===s?""===o?void 0:Number(o):o||void 0})}}):null,o?this.textField(a("panel.errorMessage"),this.readLocalized(o.message),(t=>this.setValidation(e,!0,{message:this.localized(o.message,t)}))):null)}renderValidationTab(){var e;const t=this.brick.dataType,s=this.validationOf("custom");return r("section",{class:"fk-props__section"},this.validationRow("required",a("panel.required")),"string"===t?[this.validationRow("minLength",a("panel.minLength"),"number"),this.validationRow("maxLength",a("panel.maxLength"),"number"),this.validationRow("pattern",a("panel.pattern"),"text"),this.validationRow("email",a("panel.emailFormat")),this.validationRow("url",a("panel.urlFormat"))]:null,"number"===t?[this.validationRow("min",a("panel.min"),"number"),this.validationRow("max",a("panel.max"),"number")]:null,"array"===t?[this.validationRow("minItems",a("panel.minItems"),"number"),this.validationRow("maxItems",a("panel.maxItems"),"number")]:null,r("div",{class:"fk-props__vrule"},r("label",{class:"fk-props__field fk-props__field--inline"},r("input",{type:"checkbox",checked:!!s,onChange:e=>{var t;return this.setValidation("custom",e.target.checked,{customValidator:null!==(t=null==s?void 0:s.customValidator)&&void 0!==t?t:"return true;"})}}),r("span",{class:"fk-props__label"},a("panel.custom"))),s?r("fk-code-editor",{completions:this.fields,value:null!==(e=s.customValidator)&&void 0!==e?e:"",placeholder:'return value?.startsWith("BJ-") ? true : "Must start with BJ-";',onCodeChange:e=>this.setValidation("custom",!0,{customValidator:e.detail})}):null,s?this.textField(a("panel.fallbackMessage"),this.readLocalized(s.message),(e=>this.setValidation("custom",!0,{message:this.localized(s.message,e)}))):null))}renderStylesTab(){var e;return r("section",{class:"fk-props__section"},Object.entries(null!==(e=this.brick.styles)&&void 0!==e?e:{}).map((([e,t])=>r("div",{class:"fk-props__style-row",key:e},r("span",{class:"fk-props__style-key"},e),r("input",{class:"fk-props__input fk-props__input--grow",type:"text",value:String(null!=t?t:""),onChange:t=>this.emitStyles({[e]:t.target.value})}),r("button",{type:"button",class:"fk-props__remove",title:"Remove style",onClick:()=>this.emitStyles({[e]:void 0})},"✕")))),r("div",{class:"fk-props__style-row"},r("input",{class:"fk-props__input",type:"text",placeholder:a("panel.styleProperty"),value:this.newStyleKey,onInput:e=>this.newStyleKey=e.target.value}),r("input",{class:"fk-props__input fk-props__input--grow",type:"text",placeholder:a("panel.styleValue"),onChange:e=>{const t=e.target;this.addStyle(t.value),t.value=""}})))}render(){return r("div",{key:"30efca5722cb5978d6002b19fb49fbda7ea22d96",class:"fk-props"},r("header",{key:"5702bff6561c3ce700ac58487f869ca773a30ad2",class:"fk-props__header"},r("span",{key:"8b4ea09dbb52af383fc64f51e1928992156cf38a",class:"fk-props__type"},this.brick.type),r("h4",{key:"2f94daa6ad56a004eb17ea0aee65ba2f253cc08a",class:"fk-props__title"},i(`brick.${this.brick.id}.name`,this.brick.name))),r("div",{key:"04f9a4392708cb8bce3f6c0d1508e2de792423b8",class:"fk-props__tabs"},this.availableTabs().map((e=>r("button",{key:e.id,type:"button",class:{"fk-props__tab":!0,"fk-props__tab--active":this.activeTab===e.id},onClick:()=>this.activeTab=e.id},e.label)))),"config"===this.activeTab?this.renderConfigTab():null,"validation"===this.activeTab?this.renderValidationTab():null,"styles"===this.activeTab?this.renderStylesTab():null,"rules"===this.activeTab?r("section",{class:"fk-props__section"},r("fk-rules-editor",{brick:this.brick,path:this.path,fields:this.fields})):null)}static get watchers(){return{brick:[{onBrickChange:0}]}}static get style(){return".sc-fk-property-panel-h{display:block}.fk-props.sc-fk-property-panel{display:flex;flex-direction:column;gap:calc(var(--fk-spacing) * 1.5)}.fk-props__header.sc-fk-property-panel{display:flex;flex-direction:column;gap:2px}.fk-props__type.sc-fk-property-panel{font-size:0.65rem;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:var(--fk-color-primary)}.fk-props__title.sc-fk-property-panel{margin:0;font-size:0.95rem;color:var(--fk-color-text)}.fk-props__section.sc-fk-property-panel{display:flex;flex-direction:column;gap:var(--fk-spacing);padding-top:var(--fk-spacing)}.fk-props__tabs.sc-fk-property-panel{display:flex;gap:2px;border-bottom:1px solid var(--fk-color-border)}.fk-props__tab.sc-fk-property-panel{font:inherit;font-size:0.72rem;font-weight:600;padding:5px 9px;border:none;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--fk-color-muted);text-transform:none;letter-spacing:normal;cursor:pointer}.fk-props__tab.sc-fk-property-panel:hover{color:var(--fk-color-text)}.fk-props__tab--active.sc-fk-property-panel{color:var(--fk-color-primary);border-bottom-color:var(--fk-color-primary)}.fk-props__section-title.sc-fk-property-panel{margin:0;font-size:0.7rem;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:var(--fk-color-muted)}.fk-props__field.sc-fk-property-panel{display:flex;flex-direction:column;gap:4px;font-style:normal;text-decoration:none}.fk-props__field--inline.sc-fk-property-panel{flex-direction:row;align-items:center;gap:8px}.fk-props__label.sc-fk-property-panel{font-size:0.75rem;font-weight:600;color:var(--fk-color-muted);font-style:normal;text-decoration:none}.fk-props__input.sc-fk-property-panel{font:inherit;font-size:0.85rem;padding:6px 8px;border:1px solid var(--fk-color-border);border-radius:calc(var(--fk-radius) / 2);background:var(--fk-color-surface);color:var(--fk-color-text)}.fk-props__input.sc-fk-property-panel:focus{outline:none;border-color:var(--fk-color-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--fk-color-primary) 20%, transparent)}.fk-props__input--textarea.sc-fk-property-panel{min-height:72px;resize:vertical}.fk-props__vrule.sc-fk-property-panel{display:flex;flex-direction:column;gap:6px;padding:calc(var(--fk-spacing) / 1.5);border:1px solid var(--fk-color-border);border-radius:calc(var(--fk-radius) / 1.5)}.fk-props__style-row.sc-fk-property-panel{display:flex;align-items:center;gap:6px}.fk-props__style-key.sc-fk-property-panel{font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:0.75rem;color:var(--fk-color-text);min-width:72px}.fk-props__input--grow.sc-fk-property-panel{flex:1;min-width:0}.fk-props__remove.sc-fk-property-panel{border:none;background:transparent;color:var(--fk-color-muted);font-size:0.75rem;cursor:pointer;padding:2px 4px;border-radius:calc(var(--fk-radius) / 2)}.fk-props__remove.sc-fk-property-panel:hover{color:var(--fk-color-danger);background:color-mix(in srgb, var(--fk-color-danger) 10%, transparent)}"}},[2,"fk-property-panel",{brick:[16],path:[1],fields:[16],locales:[16],locale:[1],editLocale:[1,"edit-locale"],activeTab:[32],newStyleKey:[32]},void 0,{brick:[{onBrickChange:0}]}]);function f(){"undefined"!=typeof customElements&&["fk-property-panel","fk-code-editor","fk-rules-editor"].forEach((t=>{switch(t){case"fk-property-panel":customElements.get(e(t))||customElements.define(e(t),c);break;case"fk-code-editor":customElements.get(e(t))||p();break;case"fk-rules-editor":customElements.get(e(t))||n()}}))}f();export{c as F,f as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e,p as o,H as r,h as a,a as n}from"./p-8ICOcloT.js";const t=o(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return a(n,{key:"56264a68a73083e3dd979629ad8a991c586a50b5"},a("p",{key:"9f61c8610719254e2873a7980a343e301a44e031",class:"fk-not-found"},"Brick ",a("slot",{key:"17e958130462aeed37b7bce9e16ae0fae482d443"})," not found"))}static get style(){return".fk-not-found.sc-fk-brick-not-found{margin:0;padding:calc(var(--fk-spacing) * 1.5);border:1px dashed var(--fk-color-danger);border-radius:var(--fk-radius);color:var(--fk-color-danger);font-size:0.875rem}"}},[262,"fk-brick-not-found"]);function s(){"undefined"!=typeof customElements&&["fk-brick-not-found"].forEach((o=>{"fk-brick-not-found"===o&&(customElements.get(e(o))||customElements.define(e(o),t))}))}s();export{t as F,s as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e,p as t,H as o,c as l,h as a}from"./p-8ICOcloT.js";import{b as i}from"./p-DrMYb2JF.js";const r=e=>Math.round(1e6*e)/1e6,n=e=>[r(e.lng),r(e.lat)],s=t(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.geoChange=l(this,"geoChange"),this.mode="point",this.zoom=6,this.tileUrl="https://tile.openstreetmap.org/{z}/{x}/{y}.png",this.attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',this.height=320,this.disabled=!1,this.readOnly=!1,this.manual=!0,this.failed=!1,this.vertexCount=0,this.shapes=[],this.vertices=[],this.lastEmitted="",this.clear=()=>{this.locked||this.setVertices([])}}get locked(){return this.disabled||this.readOnly}async componentDidLoad(){var e;try{const t=await import("./p-Ri4dmHJc.js").then((function(e){return e.l}));this.L=null!==(e=t.default)&&void 0!==e?e:t}catch(e){return void(this.failed=!0)}this.container&&this.initMap()}disconnectedCallback(){var e,t;null===(e=this.observer)||void 0===e||e.disconnect(),null===(t=this.map)||void 0===t||t.remove(),this.map=void 0}onValueChange(e){JSON.stringify(null!=e?e:null)!==this.lastEmitted&&this.draw(e)}onLockChange(){this.draw(this.value)}initMap(){var e;const t=this.L,o=this.container,l=t.map(o,{attributionControl:!0,zoomControl:!this.locked});t.tileLayer(this.tileUrl,{attribution:this.attribution,maxZoom:19}).addTo(l),l.setView(null!==(e=this.center)&&void 0!==e?e:[0,0],this.center?this.zoom:2),this.locked&&(l.dragging.disable(),l.scrollWheelZoom.disable()),l.on("click",(e=>{this.locked||this.setVertices("point"===this.mode?[e.latlng]:[...this.vertices,e.latlng])})),this.map=l,this.draw(this.value),"undefined"!=typeof ResizeObserver&&(this.observer=new ResizeObserver((()=>l.invalidateSize())),this.observer.observe(o)),setTimeout((()=>l.invalidateSize()),50)}draw(e){var t;const o=this.L,l=this.map;if(!o||!l)return void(this.vertexCount=this.countVertices(e));const a=[];if("Point"===(null==e?void 0:e.type)&&a.push(o.latLng(e.coordinates[1],e.coordinates[0])),"LineString"===(null==e?void 0:e.type))for(const[t,l]of e.coordinates)a.push(o.latLng(l,t));if("Polygon"===(null==e?void 0:e.type)){const l=null!==(t=e.coordinates[0])&&void 0!==t?t:[],i=l.length>1&&l[0][0]===l[l.length-1][0]&&l[0][1]===l[l.length-1][1]?l.slice(0,-1):l;for(const[e,t]of i)a.push(o.latLng(t,e))}this.vertices=a,this.vertexCount=a.length,this.render_shapes(),1===a.length?l.setView(a[0],Math.max(l.getZoom(),this.zoom)):a.length>1&&l.fitBounds(o.latLngBounds(a),{padding:[24,24]})}countVertices(e){var t,o;return e?"Point"===e.type?1:"LineString"===e.type?e.coordinates.length:Math.max((null!==(o=null===(t=e.coordinates[0])||void 0===t?void 0:t.length)&&void 0!==o?o:1)-1,0):0}render_shapes(){const e=this.L,t=this.map;if(!e||!t)return;for(const e of this.shapes)e.remove();this.shapes=[];const o=this.vertices;"polygon"===this.mode&&o.length>=3&&this.shapes.push(e.polygon(o,{className:"fk-geo__shape"}).addTo(t)),"line"===this.mode&&o.length>=2&&this.shapes.push(e.polyline(o,{className:"fk-geo__shape"}).addTo(t)),o.forEach(((o,l)=>{const a=e.marker(o,{draggable:!this.locked,icon:e.divIcon({className:"fk-geo__marker",iconSize:[14,14],iconAnchor:[7,7]})}).addTo(t);a.on("dragend",(()=>{const e=[...this.vertices];e[l]=a.getLatLng(),this.setVertices(e)})),"point"!==this.mode&&a.on("contextmenu",(()=>{this.locked||this.setVertices(this.vertices.filter(((e,t)=>t!==l)))})),this.shapes.push(a)}))}setVertices(e){this.vertices=e,this.vertexCount=e.length,this.render_shapes(),this.emit()}geometry(){const e=this.vertices;if("point"===this.mode)return e[0]?{type:"Point",coordinates:n(e[0])}:void 0;if("line"===this.mode)return e.length>=2?{type:"LineString",coordinates:e.map(n)}:void 0;if(e.length<3)return;const t=e.map(n);return{type:"Polygon",coordinates:[[...t,t[0]]]}}emit(){const e=this.geometry();this.lastEmitted=JSON.stringify(null!=e?e:null),this.geoChange.emit(e)}setManual(e,t){var o,l,a;if(this.locked)return;if(""===t.trim())return this.vertices=[],this.vertexCount=0,this.render_shapes(),void this.emit();const i="Point"===(null===(o=this.value)||void 0===o?void 0:o.type)?this.value.coordinates:void 0,r="lat"===e?Number(t):null!==(l=null==i?void 0:i[1])&&void 0!==l?l:NaN,n="lng"===e?Number(t):null!==(a=null==i?void 0:i[0])&&void 0!==a?a:NaN;if(Number.isNaN(r)||Number.isNaN(n))return;const s=this.L?this.L.latLng(r,n):{lat:r,lng:n};this.vertices=[s],this.vertexCount=1,this.render_shapes(),this.map&&this.map.setView(s,Math.max(this.map.getZoom(),this.zoom)),this.emit()}render(){var e;const t="Point"===(null===(e=this.value)||void 0===e?void 0:e.type)?this.value.coordinates:void 0,o=i("point"===this.mode?"geo.hintPoint":"geo.hintArea");return a("div",{key:"f013523b3eb53a5761dabf1638d8d9aba798691c",class:{"fk-geo":!0,"fk-geo--locked":this.locked}},a("div",{key:"8ae90c2fdea5c1323af7fe75cf42deb3ced1d18b",class:"fk-geo__map",style:{height:`${this.height}px`},ref:e=>{this.container=e}},this.failed?a("div",{class:"fk-geo__unavailable"},i("geo.unavailable")):null),a("div",{key:"8ff8db39e7a8925076aba17fe2cf51644bc69548",class:"fk-geo__bar"},"point"===this.mode&&this.manual?a("div",{class:"fk-geo__manual"},a("label",{class:"fk-geo__coord"},a("span",null,i("geo.latitude")),a("input",{class:"fk-field__input",type:"number",step:"any",min:"-90",max:"90",value:t?String(t[1]):"",disabled:this.disabled,readOnly:this.readOnly,onChange:e=>this.setManual("lat",e.target.value)})),a("label",{class:"fk-geo__coord"},a("span",null,i("geo.longitude")),a("input",{class:"fk-field__input",type:"number",step:"any",min:"-180",max:"180",value:t?String(t[0]):"",disabled:this.disabled,readOnly:this.readOnly,onChange:e=>this.setManual("lng",e.target.value)}))):a("span",{class:"fk-geo__summary"},this.vertexCount," ",i("geo.points")),this.locked?null:a("span",{class:"fk-geo__actions"},a("span",{class:"fk-geo__hint"},o),this.vertexCount>0?a("button",{type:"button",class:"fk-geo__clear",onClick:this.clear},i("geo.clear")):null)))}get el(){return this}static get watchers(){return{value:[{onValueChange:0}],disabled:[{onLockChange:0}],readOnly:[{onLockChange:0}]}}static get style(){return'.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px \'Lucida Console\', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline !important;vertical-align:baseline !important;width:1em;height:0.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:rgba(255, 255, 255, 0.8);text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}fk-geo-map{display:block;width:100%}.fk-geo__map{width:100%;border:1px solid var(--fk-border, #d4d4d8);border-radius:var(--fk-radius, 0.375rem);overflow:hidden;background:var(--fk-bg-muted, #f4f4f5);position:relative}.fk-geo--locked .fk-geo__map{cursor:default}.fk-geo__unavailable{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:0.875rem;color:var(--fk-text-muted, #71717a)}.fk-geo__marker{width:14px;height:14px;border-radius:50%;background:var(--fk-primary, #16a34a);border:2px solid #fff;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25)}.fk-geo__shape{stroke:var(--fk-primary, #16a34a);fill:var(--fk-primary, #16a34a);fill-opacity:0.15}.fk-geo__bar{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:0.5rem 1rem;margin-top:0.5rem}.fk-geo__manual{display:flex;gap:0.75rem}.fk-geo__coord{display:flex;flex-direction:column;gap:0.25rem;font-size:0.75rem;color:var(--fk-text-muted, #71717a)}.fk-geo__coord input{width:9rem}.fk-geo__summary,.fk-geo__hint{font-size:0.75rem;color:var(--fk-text-muted, #71717a)}.fk-geo__actions{display:flex;align-items:center;gap:0.75rem}.fk-geo__clear{border:1px solid var(--fk-border, #d4d4d8);border-radius:var(--fk-radius, 0.375rem);background:transparent;color:inherit;font:inherit;font-size:0.75rem;padding:0.25rem 0.625rem;cursor:pointer}.fk-geo__clear:hover{background:var(--fk-bg-muted, rgba(127, 127, 127, 0.12))}'}},[0,"fk-geo-map",{value:[16],mode:[1],center:[16],zoom:[2],tileUrl:[1,"tile-url"],attribution:[1],height:[2],disabled:[4],readOnly:[4,"read-only"],manual:[4],failed:[32],vertexCount:[32]},void 0,{value:[{onValueChange:0}],disabled:[{onLockChange:0}],readOnly:[{onLockChange:0}]}]);function f(){"undefined"!=typeof customElements&&["fk-geo-map"].forEach((t=>{"fk-geo-map"===t&&(customElements.get(e(t))||customElements.define(e(t),s))}))}f();export{s as F,f as d}
|