Skip to content

Commit

Permalink
WIP sensitive areas (GeotrekCE#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpofredc committed Nov 29, 2024
1 parent e6ce310 commit a9d26c9
Show file tree
Hide file tree
Showing 17 changed files with 1,087 additions and 12 deletions.
111 changes: 111 additions & 0 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export namespace Components {
"rounded": boolean;
"routes": string;
"selectedMainMarkerSize": number;
"sensitiveAreas": boolean;
"signages": boolean;
"structures": string;
"themes": string;
Expand Down Expand Up @@ -265,15 +266,46 @@ export namespace Components {
interface GrwSegmentedSegment {
"fontFamily": string;
"outdoor": boolean;
"sensitiveAreas": boolean;
"touristicContents": boolean;
"touristicEvents": boolean;
"treks": boolean;
}
interface GrwSelectLanguage {
}
interface GrwSensitiveAreaCard {
"colorOnSecondaryContainer": string;
"colorOnSurface": string;
"colorPrimaryApp": string;
"colorSecondaryContainer": string;
"colorSurfaceContainerLow": string;
"fontFamily": string;
"isInsideHorizontalList": boolean;
"isLargeView": boolean;
"sensitiveArea": SensitiveArea;
}
interface GrwSensitiveAreaDetail {
"sensitiveArea": SensitiveArea;
}
interface GrwSensitiveAreasList {
"colorOnSecondaryContainer": string;
"colorOnSurface": string;
"colorPrimaryApp": string;
"colorSecondaryContainer": string;
"colorSurfaceContainerLow": string;
"fontFamily": string;
"isLargeView": boolean;
}
interface GrwSensitiveAreasProvider {
"api": string;
"inBbox": string;
"languages": string;
"offline": boolean;
"period": string;
"practices": string;
"species": string;
"structures": string;
}
interface GrwSwitch {
"action": Function;
"checked": boolean;
Expand Down Expand Up @@ -488,6 +520,10 @@ export interface GrwOutdoorSiteDetailCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLGrwOutdoorSiteDetailElement;
}
export interface GrwSensitiveAreaCardCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLGrwSensitiveAreaCardElement;
}
export interface GrwTouristicContentCardCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLGrwTouristicContentCardElement;
Expand Down Expand Up @@ -768,12 +804,43 @@ declare global {
prototype: HTMLGrwSelectLanguageElement;
new (): HTMLGrwSelectLanguageElement;
};
interface HTMLGrwSensitiveAreaCardElementEventMap {
"sensitiveAreaCardPress": number;
"cardSensitiveAreaMouseOver": number;
"cardSensitiveAreaMouseLeave": any;
}
interface HTMLGrwSensitiveAreaCardElement extends Components.GrwSensitiveAreaCard, HTMLStencilElement {
addEventListener<K extends keyof HTMLGrwSensitiveAreaCardElementEventMap>(type: K, listener: (this: HTMLGrwSensitiveAreaCardElement, ev: GrwSensitiveAreaCardCustomEvent<HTMLGrwSensitiveAreaCardElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLGrwSensitiveAreaCardElementEventMap>(type: K, listener: (this: HTMLGrwSensitiveAreaCardElement, ev: GrwSensitiveAreaCardCustomEvent<HTMLGrwSensitiveAreaCardElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
}
var HTMLGrwSensitiveAreaCardElement: {
prototype: HTMLGrwSensitiveAreaCardElement;
new (): HTMLGrwSensitiveAreaCardElement;
};
interface HTMLGrwSensitiveAreaDetailElement extends Components.GrwSensitiveAreaDetail, HTMLStencilElement {
}
var HTMLGrwSensitiveAreaDetailElement: {
prototype: HTMLGrwSensitiveAreaDetailElement;
new (): HTMLGrwSensitiveAreaDetailElement;
};
interface HTMLGrwSensitiveAreasListElement extends Components.GrwSensitiveAreasList, HTMLStencilElement {
}
var HTMLGrwSensitiveAreasListElement: {
prototype: HTMLGrwSensitiveAreasListElement;
new (): HTMLGrwSensitiveAreasListElement;
};
interface HTMLGrwSensitiveAreasProviderElement extends Components.GrwSensitiveAreasProvider, HTMLStencilElement {
}
var HTMLGrwSensitiveAreasProviderElement: {
prototype: HTMLGrwSensitiveAreasProviderElement;
new (): HTMLGrwSensitiveAreasProviderElement;
};
interface HTMLGrwSwitchElement extends Components.GrwSwitch, HTMLStencilElement {
}
var HTMLGrwSwitchElement: {
Expand Down Expand Up @@ -963,7 +1030,10 @@ declare global {
"grw-search": HTMLGrwSearchElement;
"grw-segmented-segment": HTMLGrwSegmentedSegmentElement;
"grw-select-language": HTMLGrwSelectLanguageElement;
"grw-sensitive-area-card": HTMLGrwSensitiveAreaCardElement;
"grw-sensitive-area-detail": HTMLGrwSensitiveAreaDetailElement;
"grw-sensitive-areas-list": HTMLGrwSensitiveAreasListElement;
"grw-sensitive-areas-provider": HTMLGrwSensitiveAreasProviderElement;
"grw-switch": HTMLGrwSwitchElement;
"grw-toggle-slot-visibility": HTMLGrwToggleSlotVisibilityElement;
"grw-touristic-content-card": HTMLGrwTouristicContentCardElement;
Expand Down Expand Up @@ -1035,6 +1105,7 @@ declare namespace LocalJSX {
"rounded"?: boolean;
"routes"?: string;
"selectedMainMarkerSize"?: number;
"sensitiveAreas"?: boolean;
"signages"?: boolean;
"structures"?: string;
"themes"?: string;
Expand Down Expand Up @@ -1270,15 +1341,49 @@ declare namespace LocalJSX {
interface GrwSegmentedSegment {
"fontFamily"?: string;
"outdoor"?: boolean;
"sensitiveAreas"?: boolean;
"touristicContents"?: boolean;
"touristicEvents"?: boolean;
"treks"?: boolean;
}
interface GrwSelectLanguage {
}
interface GrwSensitiveAreaCard {
"colorOnSecondaryContainer"?: string;
"colorOnSurface"?: string;
"colorPrimaryApp"?: string;
"colorSecondaryContainer"?: string;
"colorSurfaceContainerLow"?: string;
"fontFamily"?: string;
"isInsideHorizontalList"?: boolean;
"isLargeView"?: boolean;
"onCardSensitiveAreaMouseLeave"?: (event: GrwSensitiveAreaCardCustomEvent<any>) => void;
"onCardSensitiveAreaMouseOver"?: (event: GrwSensitiveAreaCardCustomEvent<number>) => void;
"onSensitiveAreaCardPress"?: (event: GrwSensitiveAreaCardCustomEvent<number>) => void;
"sensitiveArea"?: SensitiveArea;
}
interface GrwSensitiveAreaDetail {
"sensitiveArea"?: SensitiveArea;
}
interface GrwSensitiveAreasList {
"colorOnSecondaryContainer"?: string;
"colorOnSurface"?: string;
"colorPrimaryApp"?: string;
"colorSecondaryContainer"?: string;
"colorSurfaceContainerLow"?: string;
"fontFamily"?: string;
"isLargeView"?: boolean;
}
interface GrwSensitiveAreasProvider {
"api"?: string;
"inBbox"?: string;
"languages"?: string;
"offline"?: boolean;
"period"?: string;
"practices"?: string;
"species"?: string;
"structures"?: string;
}
interface GrwSwitch {
"action"?: Function;
"checked"?: boolean;
Expand Down Expand Up @@ -1503,7 +1608,10 @@ declare namespace LocalJSX {
"grw-search": GrwSearch;
"grw-segmented-segment": GrwSegmentedSegment;
"grw-select-language": GrwSelectLanguage;
"grw-sensitive-area-card": GrwSensitiveAreaCard;
"grw-sensitive-area-detail": GrwSensitiveAreaDetail;
"grw-sensitive-areas-list": GrwSensitiveAreasList;
"grw-sensitive-areas-provider": GrwSensitiveAreasProvider;
"grw-switch": GrwSwitch;
"grw-toggle-slot-visibility": GrwToggleSlotVisibility;
"grw-touristic-content-card": GrwTouristicContentCard;
Expand Down Expand Up @@ -1551,7 +1659,10 @@ declare module "@stencil/core" {
"grw-search": LocalJSX.GrwSearch & JSXBase.HTMLAttributes<HTMLGrwSearchElement>;
"grw-segmented-segment": LocalJSX.GrwSegmentedSegment & JSXBase.HTMLAttributes<HTMLGrwSegmentedSegmentElement>;
"grw-select-language": LocalJSX.GrwSelectLanguage & JSXBase.HTMLAttributes<HTMLGrwSelectLanguageElement>;
"grw-sensitive-area-card": LocalJSX.GrwSensitiveAreaCard & JSXBase.HTMLAttributes<HTMLGrwSensitiveAreaCardElement>;
"grw-sensitive-area-detail": LocalJSX.GrwSensitiveAreaDetail & JSXBase.HTMLAttributes<HTMLGrwSensitiveAreaDetailElement>;
"grw-sensitive-areas-list": LocalJSX.GrwSensitiveAreasList & JSXBase.HTMLAttributes<HTMLGrwSensitiveAreasListElement>;
"grw-sensitive-areas-provider": LocalJSX.GrwSensitiveAreasProvider & JSXBase.HTMLAttributes<HTMLGrwSensitiveAreasProviderElement>;
"grw-switch": LocalJSX.GrwSwitch & JSXBase.HTMLAttributes<HTMLGrwSwitchElement>;
"grw-toggle-slot-visibility": LocalJSX.GrwToggleSlotVisibility & JSXBase.HTMLAttributes<HTMLGrwToggleSlotVisibilityElement>;
"grw-touristic-content-card": LocalJSX.GrwTouristicContentCard & JSXBase.HTMLAttributes<HTMLGrwTouristicContentCardElement>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/grw-app/grw-app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ grw-app {
.grw-app-map-container,
.grw-large-view-app-map-container {
width: 100%;
height: 100%;
height: 500px;
}

.grw-map-visibility-button-container {
Expand Down
Loading

0 comments on commit a9d26c9

Please sign in to comment.