@wizishop/wizi-block 4.2.33-beta → 4.2.34-beta
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/bundles/wizishop-wizi-block.umd.js +202 -263
- package/bundles/wizishop-wizi-block.umd.js.map +1 -1
- package/bundles/wizishop-wizi-block.umd.min.js +1 -1
- package/bundles/wizishop-wizi-block.umd.min.js.map +1 -1
- package/esm2015/lib/services/blocks/images/images-banner.service.js +2 -2
- package/esm2015/lib/services/blocks/images/images-simple.service.js +2 -2
- package/esm2015/lib/services/blocks/text-backgrounds/text-backgrounds-simple.service.js +2 -2
- package/esm2015/lib/services/blocks/text-backgrounds/text-backgrounds-with-banner.service.js +2 -2
- package/esm2015/lib/services/blocks/text-backgrounds/text-backgrounds-with-txt.service.js +2 -2
- package/esm2015/lib/shared/components/editorjs/tools/inline/tool-type/inline-style-tool.component.js +7 -4
- package/esm2015/lib/shared/components/quill/quill.component.js +2 -1
- package/esm2015/lib/structures/map/background-form-left/map-background-form-left.component.js +32 -41
- package/esm2015/lib/structures/map/background-form-right/map-background-form-right.component.js +32 -41
- package/esm2015/lib/structures/map/fullpage/map-fullpage.component.js +32 -43
- package/esm2015/lib/structures/map/left-text/map-left-text.component.js +30 -41
- package/esm2015/lib/structures/map/right-text/map-right-text.component.js +30 -41
- package/esm2015/lib/structures/map/text-form/map-text-form.component.js +32 -43
- package/esm2015/lib/structures/structures.module.js +3 -1
- package/fesm2015/wizishop-wizi-block.js +197 -245
- package/fesm2015/wizishop-wizi-block.js.map +1 -1
- package/lib/structures/map/background-form-left/map-background-form-left.component.d.ts +8 -6
- package/lib/structures/map/background-form-right/map-background-form-right.component.d.ts +8 -6
- package/lib/structures/map/fullpage/map-fullpage.component.d.ts +7 -5
- package/lib/structures/map/left-text/map-left-text.component.d.ts +7 -5
- package/lib/structures/map/right-text/map-right-text.component.d.ts +7 -5
- package/lib/structures/map/text-form/map-text-form.component.d.ts +8 -6
- package/package.json +1 -5
- package/wizi-block.scss +35 -30
- package/wizishop-wizi-block.metadata.json +1 -1
|
@@ -28,8 +28,8 @@ import { EditorState } from '@codemirror/state';
|
|
|
28
28
|
import { html } from '@codemirror/lang-html';
|
|
29
29
|
import { MonacoEditorModule } from 'ngx-monaco-editor';
|
|
30
30
|
import { tileLayer, latLng, marker, icon } from 'leaflet';
|
|
31
|
-
import places from 'places.js';
|
|
32
31
|
import { LeafletModule } from '@asymmetrik/ngx-leaflet';
|
|
32
|
+
import { GooglePlaceModule } from 'ngx-google-places-autocomplete';
|
|
33
33
|
import { ColorPickerModule } from 'ngx-color-picker';
|
|
34
34
|
|
|
35
35
|
class MediaConnectorService {
|
|
@@ -3126,7 +3126,7 @@ class ImagesSimpleService {
|
|
|
3126
3126
|
'wb.blocks.FormContentDto.117',
|
|
3127
3127
|
], ['0', '0.25', '0.5', '1']);
|
|
3128
3128
|
imgSimpleFormDto.forms.push(parallaxSpeedImgSimpleContentDto);
|
|
3129
|
-
const parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.
|
|
3129
|
+
const parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.blocks.FormContentDto.114', FORM_TYPE_CHECKBOX, content[FORM_NAME_PARALLAX_INVERTED], '', '', [], [], [true, false], false, 'wb.forms.FormsContentDto.28');
|
|
3130
3130
|
imgSimpleFormDto.forms.push(parallaxInvertedImgSimpleContentDto);
|
|
3131
3131
|
return imgSimpleFormDto;
|
|
3132
3132
|
}
|
|
@@ -4116,7 +4116,7 @@ class TextBackgroundsSimpleService {
|
|
|
4116
4116
|
'wb.blocks.FormContentDto.117',
|
|
4117
4117
|
], ['0', '0.25', '0.5', '1']);
|
|
4118
4118
|
TextBackgroundsSimpleFormDto.forms.push(parallaxSpeedImgSimpleContentDto);
|
|
4119
|
-
const parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.
|
|
4119
|
+
const parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.blocks.FormContentDto.114', FORM_TYPE_CHECKBOX, content[FORM_NAME_PARALLAX_INVERTED], '', '', [], [], [true, false], false, 'wb.forms.FormsContentDto.28');
|
|
4120
4120
|
TextBackgroundsSimpleFormDto.forms.push(parallaxInvertedImgSimpleContentDto);
|
|
4121
4121
|
return TextBackgroundsSimpleFormDto;
|
|
4122
4122
|
}
|
|
@@ -4191,7 +4191,7 @@ class TextBackgroundsWithTxtService {
|
|
|
4191
4191
|
'wb.blocks.FormContentDto.117',
|
|
4192
4192
|
], ['0', '0.25', '0.5', '1']);
|
|
4193
4193
|
formsDto.forms.push(parallaxSpeedImgSimpleContentDto);
|
|
4194
|
-
const parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.
|
|
4194
|
+
const parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.blocks.FormContentDto.114', FORM_TYPE_CHECKBOX, content[FORM_NAME_PARALLAX_INVERTED], '', '', [], [], [true, false], false, 'wb.forms.FormsContentDto.28');
|
|
4195
4195
|
formsDto.forms.push(parallaxInvertedImgSimpleContentDto);
|
|
4196
4196
|
return formsDto;
|
|
4197
4197
|
}
|
|
@@ -4266,7 +4266,7 @@ class TextBackgroundsWithBannerService {
|
|
|
4266
4266
|
'wb.blocks.FormContentDto.117',
|
|
4267
4267
|
], ['0', '0.25', '0.5', '1']);
|
|
4268
4268
|
formsDto.forms.push(parallaxSpeedImgSimpleContentDto);
|
|
4269
|
-
const parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.
|
|
4269
|
+
const parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.blocks.FormContentDto.114', FORM_TYPE_CHECKBOX, content[FORM_NAME_PARALLAX_INVERTED], '', '', [], [], [true, false], false, 'wb.forms.FormsContentDto.28');
|
|
4270
4270
|
formsDto.forms.push(parallaxInvertedImgSimpleContentDto);
|
|
4271
4271
|
const colorContentDto = new FormsContentDto(FORM_NAME_COLOR, 'wb.blocks.FormContentDto.112', FORM_TYPE_COLOR, content[FORM_NAME_COLOR], '#122231', '');
|
|
4272
4272
|
formsDto.forms.push(colorContentDto);
|
|
@@ -5686,7 +5686,7 @@ class ImagesBannerService {
|
|
|
5686
5686
|
'wb.blocks.FormContentDto.117',
|
|
5687
5687
|
], ['0', '0.25', '0.5', '1']);
|
|
5688
5688
|
imgBannerFormDto.forms.push(parallaxSpeedImgSimpleContentDto);
|
|
5689
|
-
const parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.
|
|
5689
|
+
const parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.blocks.FormContentDto.114', FORM_TYPE_CHECKBOX, content[FORM_NAME_PARALLAX_INVERTED], '', '', [], [], [true, false], false, 'wb.forms.FormsContentDto.28');
|
|
5690
5690
|
imgBannerFormDto.forms.push(parallaxInvertedImgSimpleContentDto);
|
|
5691
5691
|
return imgBannerFormDto;
|
|
5692
5692
|
}
|
|
@@ -9614,6 +9614,7 @@ class QuillComponent {
|
|
|
9614
9614
|
},
|
|
9615
9615
|
clipboard: {
|
|
9616
9616
|
matchers: [['BR', this.lineBreakMatcher]],
|
|
9617
|
+
matchVisual: false,
|
|
9617
9618
|
},
|
|
9618
9619
|
keyboard: {
|
|
9619
9620
|
bindings: {
|
|
@@ -19085,7 +19086,9 @@ class InlineStyleTool extends EditorJSTool {
|
|
|
19085
19086
|
const children = Array.from(parentContainer.childNodes);
|
|
19086
19087
|
if ((children === null || children === void 0 ? void 0 : children.length) > 0) {
|
|
19087
19088
|
for (var currentNode = children[0]; currentNode; currentNode = currentNode.nextSibling) {
|
|
19088
|
-
if (
|
|
19089
|
+
if (!currentNode.textContent ||
|
|
19090
|
+
currentNode.textContent.length === 0 ||
|
|
19091
|
+
(currentNode.nodeType === Node.ELEMENT_NODE && currentNode.innerText.length === 0)) {
|
|
19089
19092
|
let previousSibling = currentNode.previousSibling;
|
|
19090
19093
|
parentContainer.removeChild(currentNode);
|
|
19091
19094
|
currentNode = previousSibling;
|
|
@@ -19157,9 +19160,10 @@ class InlineStyleTool extends EditorJSTool {
|
|
|
19157
19160
|
}
|
|
19158
19161
|
identicalAttributes(currentElement, nextElement) {
|
|
19159
19162
|
let currentElementAttributes = currentElement.getAttributeNames();
|
|
19160
|
-
currentElementAttributes.forEach(attribute => {
|
|
19163
|
+
currentElementAttributes.forEach((attribute) => {
|
|
19161
19164
|
if (attribute !== 'style') {
|
|
19162
|
-
if (!nextElement.getAttribute(attribute) ||
|
|
19165
|
+
if (!nextElement.getAttribute(attribute) ||
|
|
19166
|
+
nextElement.getAttribute(attribute) !== currentElement.getAttribute(attribute)) {
|
|
19163
19167
|
return false;
|
|
19164
19168
|
}
|
|
19165
19169
|
}
|
|
@@ -26457,15 +26461,14 @@ QuotesSimpleBackgroundComponent.decorators = [
|
|
|
26457
26461
|
];
|
|
26458
26462
|
QuotesSimpleBackgroundComponent.ctorParameters = () => [];
|
|
26459
26463
|
|
|
26460
|
-
class OpenMapDto {
|
|
26461
|
-
}
|
|
26462
|
-
|
|
26463
26464
|
class MapFullpageComponent extends StructuresComponent {
|
|
26464
26465
|
constructor(externalConfigService) {
|
|
26465
26466
|
super();
|
|
26466
26467
|
this.externalConfigService = externalConfigService;
|
|
26467
26468
|
this.address = '';
|
|
26469
|
+
this.triggerAddress = '';
|
|
26468
26470
|
this.editPlaceMap = null;
|
|
26471
|
+
this.firstTimeTrigger = false;
|
|
26469
26472
|
this.options = {};
|
|
26470
26473
|
this.layers = [];
|
|
26471
26474
|
this.showMap = false;
|
|
@@ -26474,40 +26477,29 @@ class MapFullpageComponent extends StructuresComponent {
|
|
|
26474
26477
|
ngOnInit() {
|
|
26475
26478
|
super.ngOnInit();
|
|
26476
26479
|
if (this.contentBlock[this.FORM_NAME_COORDINATE_Y] && this.contentBlock[this.FORM_NAME_COORDINATE_X]) {
|
|
26477
|
-
|
|
26478
|
-
|
|
26479
|
-
|
|
26480
|
-
|
|
26481
|
-
|
|
26480
|
+
this.googleMapReturnElement = {
|
|
26481
|
+
suggestion: {
|
|
26482
|
+
latlng: {
|
|
26483
|
+
lat: this.contentBlock[this.FORM_NAME_COORDINATE_Y],
|
|
26484
|
+
lng: this.contentBlock[this.FORM_NAME_COORDINATE_X],
|
|
26485
|
+
},
|
|
26486
|
+
value: '',
|
|
26482
26487
|
},
|
|
26483
|
-
value: '',
|
|
26484
26488
|
};
|
|
26485
|
-
this.setCoordinateOnPlaces(
|
|
26486
|
-
}
|
|
26487
|
-
}
|
|
26488
|
-
ngAfterViewInit() {
|
|
26489
|
-
if (!this.showMap) {
|
|
26490
|
-
const placesAutocomplete = places({
|
|
26491
|
-
appId: this.externalConfigService.getAlgoliaAppId(),
|
|
26492
|
-
apiKey: this.externalConfigService.getAlgoliaApiKey(),
|
|
26493
|
-
container: this.input.nativeElement,
|
|
26494
|
-
});
|
|
26495
|
-
placesAutocomplete.on('change', (algoliaReturnElement) => {
|
|
26496
|
-
this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
26497
|
-
});
|
|
26489
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
26498
26490
|
}
|
|
26499
26491
|
}
|
|
26500
|
-
setCoordinateOnPlaces(
|
|
26492
|
+
setCoordinateOnPlaces(googleResults) {
|
|
26501
26493
|
this.showMap = false;
|
|
26502
26494
|
this.options = {
|
|
26503
26495
|
layers: [tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
26504
26496
|
zoom: 18,
|
|
26505
26497
|
zoomControl: false,
|
|
26506
|
-
center: latLng(
|
|
26498
|
+
center: latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
26507
26499
|
};
|
|
26508
|
-
this.center = latLng(
|
|
26500
|
+
this.center = latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
26509
26501
|
this.layers = [
|
|
26510
|
-
marker([
|
|
26502
|
+
marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
26511
26503
|
icon: icon({
|
|
26512
26504
|
iconSize: [25, 41],
|
|
26513
26505
|
iconAnchor: [13, 41],
|
|
@@ -26516,23 +26508,23 @@ class MapFullpageComponent extends StructuresComponent {
|
|
|
26516
26508
|
}),
|
|
26517
26509
|
}),
|
|
26518
26510
|
];
|
|
26519
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
26520
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
26521
|
-
this.address =
|
|
26511
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
26512
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
26513
|
+
this.address = googleResults.suggestion.value;
|
|
26522
26514
|
this.showMap = true;
|
|
26523
26515
|
this.persist();
|
|
26524
26516
|
}
|
|
26525
|
-
|
|
26526
|
-
|
|
26527
|
-
|
|
26528
|
-
|
|
26529
|
-
|
|
26530
|
-
|
|
26531
|
-
|
|
26532
|
-
|
|
26533
|
-
|
|
26534
|
-
|
|
26535
|
-
|
|
26517
|
+
handleAddressChange(event) {
|
|
26518
|
+
this.googleMapReturnElement = {
|
|
26519
|
+
suggestion: {
|
|
26520
|
+
latlng: {
|
|
26521
|
+
lat: event.geometry.location.lat(),
|
|
26522
|
+
lng: event.geometry.location.lng(),
|
|
26523
|
+
},
|
|
26524
|
+
value: event.name,
|
|
26525
|
+
},
|
|
26526
|
+
};
|
|
26527
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
26536
26528
|
}
|
|
26537
26529
|
/**
|
|
26538
26530
|
* Avoid partial map loaded at the initialization
|
|
@@ -26547,7 +26539,7 @@ class MapFullpageComponent extends StructuresComponent {
|
|
|
26547
26539
|
MapFullpageComponent.decorators = [
|
|
26548
26540
|
{ type: Component, args: [{
|
|
26549
26541
|
selector: MapFullpageService.selector(),
|
|
26550
|
-
template: "<div class=\"wb-map-fullpage\">\n <div class=\"wb-map-fullpage__container\">\n <div *ngIf=\"showMap\">\n <div class=\"wb-map-fullpage__container__config\">\n <wb-structure-config [blockUUID]=\"uuid\" [position]=\"TYPE_CONFIG_POSITION_LEFT_TOP\"
|
|
26542
|
+
template: "<div class=\"wb-map-fullpage\">\n <div class=\"wb-map-fullpage__container\">\n <div *ngIf=\"showMap\">\n <div class=\"wb-map-fullpage__container__config\">\n <wb-structure-config [blockUUID]=\"uuid\" [position]=\"TYPE_CONFIG_POSITION_LEFT_TOP\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input-edit{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInputEdit\n (click)=\"myInputEdit.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </wb-structure-config>\n </div>\n <div class=\"wb-map-fullpage__cover\"></div>\n <div\n class=\"wb-map-fullpage__container__map\"\n leaflet\n [leafletOptions]=\"options\"\n [leafletLayers]=\"layers\"\n [(leafletCenter)]=\"center\"\n (leafletMapReady)=\"onMapReady($event)\"\n ></div>\n </div>\n </div>\n <div class=\"wb-map-fullpage__selector\" *ngIf=\"!showMap\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInput\n (click)=\"myInput.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </div>\n</div>\n"
|
|
26551
26543
|
},] }
|
|
26552
26544
|
];
|
|
26553
26545
|
MapFullpageComponent.ctorParameters = () => [
|
|
@@ -26562,7 +26554,9 @@ class MapLeftTextComponent extends StructuresComponent {
|
|
|
26562
26554
|
super();
|
|
26563
26555
|
this.externalConfigService = externalConfigService;
|
|
26564
26556
|
this.address = '';
|
|
26557
|
+
this.triggerAddress = '';
|
|
26565
26558
|
this.editPlaceMap = null;
|
|
26559
|
+
this.firstTimeTrigger = false;
|
|
26566
26560
|
this.options = {};
|
|
26567
26561
|
this.layers = [];
|
|
26568
26562
|
this.showMap = false;
|
|
@@ -26571,40 +26565,29 @@ class MapLeftTextComponent extends StructuresComponent {
|
|
|
26571
26565
|
ngOnInit() {
|
|
26572
26566
|
super.ngOnInit();
|
|
26573
26567
|
if (this.contentBlock[this.FORM_NAME_COORDINATE_Y] && this.contentBlock[this.FORM_NAME_COORDINATE_X]) {
|
|
26574
|
-
|
|
26575
|
-
|
|
26576
|
-
|
|
26577
|
-
|
|
26578
|
-
|
|
26568
|
+
this.googleMapReturnElement = {
|
|
26569
|
+
suggestion: {
|
|
26570
|
+
latlng: {
|
|
26571
|
+
lat: this.contentBlock[this.FORM_NAME_COORDINATE_Y],
|
|
26572
|
+
lng: this.contentBlock[this.FORM_NAME_COORDINATE_X],
|
|
26573
|
+
},
|
|
26574
|
+
value: '',
|
|
26579
26575
|
},
|
|
26580
|
-
value: '',
|
|
26581
26576
|
};
|
|
26582
|
-
this.setCoordinateOnPlaces(
|
|
26583
|
-
}
|
|
26584
|
-
}
|
|
26585
|
-
ngAfterViewInit() {
|
|
26586
|
-
if (!this.showMap) {
|
|
26587
|
-
const placesAutocomplete = places({
|
|
26588
|
-
appId: this.externalConfigService.getAlgoliaAppId(),
|
|
26589
|
-
apiKey: this.externalConfigService.getAlgoliaApiKey(),
|
|
26590
|
-
container: this.input.nativeElement,
|
|
26591
|
-
});
|
|
26592
|
-
placesAutocomplete.on('change', (algoliaReturnElement) => {
|
|
26593
|
-
this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
26594
|
-
});
|
|
26577
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
26595
26578
|
}
|
|
26596
26579
|
}
|
|
26597
|
-
setCoordinateOnPlaces(
|
|
26580
|
+
setCoordinateOnPlaces(googleResults) {
|
|
26598
26581
|
this.showMap = false;
|
|
26599
26582
|
this.options = {
|
|
26600
26583
|
layers: [tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
26601
26584
|
zoom: 18,
|
|
26602
26585
|
zoomControl: false,
|
|
26603
|
-
center: latLng(
|
|
26586
|
+
center: latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
26604
26587
|
};
|
|
26605
|
-
this.center = latLng(
|
|
26588
|
+
this.center = latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
26606
26589
|
this.layers = [
|
|
26607
|
-
marker([
|
|
26590
|
+
marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
26608
26591
|
icon: icon({
|
|
26609
26592
|
iconSize: [25, 41],
|
|
26610
26593
|
iconAnchor: [13, 41],
|
|
@@ -26613,23 +26596,23 @@ class MapLeftTextComponent extends StructuresComponent {
|
|
|
26613
26596
|
}),
|
|
26614
26597
|
}),
|
|
26615
26598
|
];
|
|
26616
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
26617
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
26618
|
-
this.address =
|
|
26599
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
26600
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
26601
|
+
this.address = googleResults.suggestion.value;
|
|
26619
26602
|
this.showMap = true;
|
|
26620
26603
|
this.persist();
|
|
26621
26604
|
}
|
|
26622
|
-
|
|
26623
|
-
|
|
26624
|
-
|
|
26625
|
-
|
|
26626
|
-
|
|
26627
|
-
|
|
26628
|
-
|
|
26629
|
-
|
|
26630
|
-
|
|
26631
|
-
|
|
26632
|
-
|
|
26605
|
+
handleAddressChange(event) {
|
|
26606
|
+
this.googleMapReturnElement = {
|
|
26607
|
+
suggestion: {
|
|
26608
|
+
latlng: {
|
|
26609
|
+
lat: event.geometry.location.lat(),
|
|
26610
|
+
lng: event.geometry.location.lng(),
|
|
26611
|
+
},
|
|
26612
|
+
value: event.name,
|
|
26613
|
+
},
|
|
26614
|
+
};
|
|
26615
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
26633
26616
|
}
|
|
26634
26617
|
/**
|
|
26635
26618
|
* Avoid partial map loaded at the initialization
|
|
@@ -26644,7 +26627,7 @@ class MapLeftTextComponent extends StructuresComponent {
|
|
|
26644
26627
|
MapLeftTextComponent.decorators = [
|
|
26645
26628
|
{ type: Component, args: [{
|
|
26646
26629
|
selector: MapLeftTextService.selector(),
|
|
26647
|
-
template: "<div class=\"wb-map-left-text\">\n <div class=\"columns is-gapless\">\n <div class=\"column\">\n <div class=\"wb-map-left-text__addresses\">\n <div class=\"wb-map-left-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_TITLE]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_ADDRESS]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_ADDRESS] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-left-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ADDRESS]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_PHONE]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_PHONE] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-left-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_PHONE]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_EMAIL]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_EMAIL] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-left-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_EMAIL]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"wb-map-left-text__social\"\n *ngIf=\"\n contents[BASE_BLOCK_CONTENT][FORM_NAME_FACEBOOK] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_TWITTER] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_PINTEREST] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_INSTAGRAM]\n \"\n >\n <div class=\"wb-map-left-text__social__facebook\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_FACEBOOK]\">\n <i class=\"fab fa-facebook-f\"></i>\n </div>\n <div class=\"wb-map-left-text__social__twitter\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_TWITTER]\">\n <i class=\"fab fa-twitter\"></i>\n </div>\n <div class=\"wb-map-left-text__social__pinterest\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_PINTEREST]\">\n <i class=\"fab fa-pinterest-p\"></i>\n </div>\n <div class=\"wb-map-left-text__social__instagram\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_INSTAGRAM]\">\n <i class=\"fab fa-instagram\"></i>\n </div>\n </div>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-left-text__container\">\n <div *ngIf=\"showMap\">\n <div class=\"wb-map-left-text__container__config\">\n <wb-structure-config
|
|
26630
|
+
template: "<div class=\"wb-map-left-text\">\n <div class=\"columns is-gapless\">\n <div class=\"column\">\n <div class=\"wb-map-left-text__addresses\">\n <div class=\"wb-map-left-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_TITLE]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_ADDRESS]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_ADDRESS] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-left-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ADDRESS]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_PHONE]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_PHONE] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-left-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_PHONE]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_EMAIL]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_EMAIL] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-left-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_EMAIL]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"wb-map-left-text__social\"\n *ngIf=\"\n contents[BASE_BLOCK_CONTENT][FORM_NAME_FACEBOOK] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_TWITTER] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_PINTEREST] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_INSTAGRAM]\n \"\n >\n <div class=\"wb-map-left-text__social__facebook\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_FACEBOOK]\">\n <i class=\"fab fa-facebook-f\"></i>\n </div>\n <div class=\"wb-map-left-text__social__twitter\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_TWITTER]\">\n <i class=\"fab fa-twitter\"></i>\n </div>\n <div class=\"wb-map-left-text__social__pinterest\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_PINTEREST]\">\n <i class=\"fab fa-pinterest-p\"></i>\n </div>\n <div class=\"wb-map-left-text__social__instagram\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_INSTAGRAM]\">\n <i class=\"fab fa-instagram\"></i>\n </div>\n </div>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-left-text__container\">\n <div *ngIf=\"showMap\">\n <div class=\"wb-map-left-text__container__config\">\n <wb-structure-config [blockUUID]=\"uuid\" [position]=\"TYPE_CONFIG_POSITION_RIGHT_TOP\" [isFullwidth]=\"true\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input-edit{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInputEdit\n (click)=\"myInputEdit.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </wb-structure-config>\n </div>\n <div class=\"wb-map-left-text__cover\"></div>\n <div\n class=\"wb-map-left-text__container__map\"\n leaflet\n [leafletOptions]=\"options\"\n [leafletLayers]=\"layers\"\n [(leafletCenter)]=\"center\"\n (leafletMapReady)=\"onMapReady($event)\"\n ></div>\n </div>\n </div>\n <div class=\"wb-map-left-text__selector\" *ngIf=\"!showMap\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInput\n (click)=\"myInput.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </div>\n </div>\n </div>\n</div>\n"
|
|
26648
26631
|
},] }
|
|
26649
26632
|
];
|
|
26650
26633
|
MapLeftTextComponent.ctorParameters = () => [
|
|
@@ -26659,7 +26642,9 @@ class MapRightTextComponent extends StructuresComponent {
|
|
|
26659
26642
|
super();
|
|
26660
26643
|
this.externalConfigService = externalConfigService;
|
|
26661
26644
|
this.address = '';
|
|
26645
|
+
this.triggerAddress = '';
|
|
26662
26646
|
this.editPlaceMap = null;
|
|
26647
|
+
this.firstTimeTrigger = false;
|
|
26663
26648
|
this.options = {};
|
|
26664
26649
|
this.layers = [];
|
|
26665
26650
|
this.showMap = false;
|
|
@@ -26668,40 +26653,29 @@ class MapRightTextComponent extends StructuresComponent {
|
|
|
26668
26653
|
ngOnInit() {
|
|
26669
26654
|
super.ngOnInit();
|
|
26670
26655
|
if (this.contentBlock[this.FORM_NAME_COORDINATE_Y] && this.contentBlock[this.FORM_NAME_COORDINATE_X]) {
|
|
26671
|
-
|
|
26672
|
-
|
|
26673
|
-
|
|
26674
|
-
|
|
26675
|
-
|
|
26656
|
+
this.googleMapReturnElement = {
|
|
26657
|
+
suggestion: {
|
|
26658
|
+
latlng: {
|
|
26659
|
+
lat: this.contentBlock[this.FORM_NAME_COORDINATE_Y],
|
|
26660
|
+
lng: this.contentBlock[this.FORM_NAME_COORDINATE_X],
|
|
26661
|
+
},
|
|
26662
|
+
value: '',
|
|
26676
26663
|
},
|
|
26677
|
-
value: '',
|
|
26678
26664
|
};
|
|
26679
|
-
this.setCoordinateOnPlaces(
|
|
26680
|
-
}
|
|
26681
|
-
}
|
|
26682
|
-
ngAfterViewInit() {
|
|
26683
|
-
if (!this.showMap) {
|
|
26684
|
-
const placesAutocomplete = places({
|
|
26685
|
-
appId: this.externalConfigService.getAlgoliaAppId(),
|
|
26686
|
-
apiKey: this.externalConfigService.getAlgoliaApiKey(),
|
|
26687
|
-
container: this.input.nativeElement,
|
|
26688
|
-
});
|
|
26689
|
-
placesAutocomplete.on('change', (algoliaReturnElement) => {
|
|
26690
|
-
this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
26691
|
-
});
|
|
26665
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
26692
26666
|
}
|
|
26693
26667
|
}
|
|
26694
|
-
setCoordinateOnPlaces(
|
|
26668
|
+
setCoordinateOnPlaces(googleResults) {
|
|
26695
26669
|
this.showMap = false;
|
|
26696
26670
|
this.options = {
|
|
26697
26671
|
layers: [tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
26698
26672
|
zoom: 18,
|
|
26699
26673
|
zoomControl: false,
|
|
26700
|
-
center: latLng(
|
|
26674
|
+
center: latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
26701
26675
|
};
|
|
26702
|
-
this.center = latLng(
|
|
26676
|
+
this.center = latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
26703
26677
|
this.layers = [
|
|
26704
|
-
marker([
|
|
26678
|
+
marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
26705
26679
|
icon: icon({
|
|
26706
26680
|
iconSize: [25, 41],
|
|
26707
26681
|
iconAnchor: [13, 41],
|
|
@@ -26710,23 +26684,23 @@ class MapRightTextComponent extends StructuresComponent {
|
|
|
26710
26684
|
}),
|
|
26711
26685
|
}),
|
|
26712
26686
|
];
|
|
26713
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
26714
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
26715
|
-
this.address =
|
|
26687
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
26688
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
26689
|
+
this.address = googleResults.suggestion.value;
|
|
26716
26690
|
this.showMap = true;
|
|
26717
26691
|
this.persist();
|
|
26718
26692
|
}
|
|
26719
|
-
|
|
26720
|
-
|
|
26721
|
-
|
|
26722
|
-
|
|
26723
|
-
|
|
26724
|
-
|
|
26725
|
-
|
|
26726
|
-
|
|
26727
|
-
|
|
26728
|
-
|
|
26729
|
-
|
|
26693
|
+
handleAddressChange(event) {
|
|
26694
|
+
this.googleMapReturnElement = {
|
|
26695
|
+
suggestion: {
|
|
26696
|
+
latlng: {
|
|
26697
|
+
lat: event.geometry.location.lat(),
|
|
26698
|
+
lng: event.geometry.location.lng(),
|
|
26699
|
+
},
|
|
26700
|
+
value: event.name,
|
|
26701
|
+
},
|
|
26702
|
+
};
|
|
26703
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
26730
26704
|
}
|
|
26731
26705
|
/**
|
|
26732
26706
|
* Avoid partial map loaded at the initialization
|
|
@@ -26741,7 +26715,7 @@ class MapRightTextComponent extends StructuresComponent {
|
|
|
26741
26715
|
MapRightTextComponent.decorators = [
|
|
26742
26716
|
{ type: Component, args: [{
|
|
26743
26717
|
selector: MapRightTextService.selector(),
|
|
26744
|
-
template: "<div class=\"wb-map-right-text\">\n <div class=\"columns is-gapless\">\n <div class=\"column\">\n <div class=\"wb-map-right-text__container\">\n <div *ngIf=\"showMap\">\n <div class=\"wb-map-right-text__container__config\">\n <wb-structure-config
|
|
26718
|
+
template: "<div class=\"wb-map-right-text\">\n <div class=\"columns is-gapless\">\n <div class=\"column\">\n <div class=\"wb-map-right-text__container\">\n <div *ngIf=\"showMap\">\n <div class=\"wb-map-right-text__container__config\">\n <wb-structure-config [blockUUID]=\"uuid\" [position]=\"TYPE_CONFIG_POSITION_RIGHT_TOP\" [isFullwidth]=\"true\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input-edit{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInputEdit\n (click)=\"myInputEdit.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </wb-structure-config>\n </div>\n <div class=\"wb-map-right-text__cover\"></div>\n <div\n class=\"wb-map-right-text__container__map\"\n leaflet\n [leafletOptions]=\"options\"\n [leafletLayers]=\"layers\"\n [(leafletCenter)]=\"center\"\n (leafletMapReady)=\"onMapReady($event)\"\n ></div>\n </div>\n </div>\n <div class=\"wb-map-right-text__selector\" *ngIf=\"!showMap\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInput\n (click)=\"myInput.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </div>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-right-text__addresses\">\n <div class=\"wb-map-right-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_TITLE]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_ADDRESS]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_ADDRESS] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-right-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ADDRESS]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_PHONE]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_PHONE] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-right-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_PHONE]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_EMAIL]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_EMAIL] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-right-text__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_EMAIL]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"wb-map-right-text__social\"\n *ngIf=\"\n contents[BASE_BLOCK_CONTENT][FORM_NAME_FACEBOOK] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_TWITTER] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_PINTEREST] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_INSTAGRAM]\n \"\n >\n <div class=\"wb-map-right-text__social__facebook\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_FACEBOOK]\">\n <i class=\"fab fa-facebook-f\"></i>\n </div>\n <div class=\"wb-map-right-text__social__twitter\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_TWITTER]\">\n <i class=\"fab fa-twitter\"></i>\n </div>\n <div class=\"wb-map-right-text__social__pinterest\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_PINTEREST]\">\n <i class=\"fab fa-pinterest-p\"></i>\n </div>\n <div class=\"wb-map-right-text__social__instagram\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_INSTAGRAM]\">\n <i class=\"fab fa-instagram\"></i>\n </div>\n </div>\n </div>\n </div>\n</div>\n"
|
|
26745
26719
|
},] }
|
|
26746
26720
|
];
|
|
26747
26721
|
MapRightTextComponent.ctorParameters = () => [
|
|
@@ -26751,13 +26725,18 @@ MapRightTextComponent.propDecorators = {
|
|
|
26751
26725
|
input: [{ type: ViewChild, args: ['myInput',] }]
|
|
26752
26726
|
};
|
|
26753
26727
|
|
|
26728
|
+
class OpenMapDto {
|
|
26729
|
+
}
|
|
26730
|
+
|
|
26754
26731
|
class MapTextFormComponent extends StructuresComponent {
|
|
26755
26732
|
constructor(apiService, externalConfigService) {
|
|
26756
26733
|
super();
|
|
26757
26734
|
this.apiService = apiService;
|
|
26758
26735
|
this.externalConfigService = externalConfigService;
|
|
26759
26736
|
this.address = '';
|
|
26737
|
+
this.triggerAddress = '';
|
|
26760
26738
|
this.editPlaceMap = null;
|
|
26739
|
+
this.firstTimeTrigger = false;
|
|
26761
26740
|
this.options = {};
|
|
26762
26741
|
this.layers = [];
|
|
26763
26742
|
this.showMap = false;
|
|
@@ -26791,29 +26770,17 @@ class MapTextFormComponent extends StructuresComponent {
|
|
|
26791
26770
|
}
|
|
26792
26771
|
});
|
|
26793
26772
|
}
|
|
26794
|
-
|
|
26795
|
-
if (!this.showMap) {
|
|
26796
|
-
const placesAutocomplete = places({
|
|
26797
|
-
appId: this.externalConfigService.getAlgoliaAppId(),
|
|
26798
|
-
apiKey: this.externalConfigService.getAlgoliaApiKey(),
|
|
26799
|
-
container: this.input.nativeElement,
|
|
26800
|
-
});
|
|
26801
|
-
placesAutocomplete.on('change', (algoliaReturnElement) => {
|
|
26802
|
-
this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
26803
|
-
});
|
|
26804
|
-
}
|
|
26805
|
-
}
|
|
26806
|
-
setCoordinateOnPlaces(algoliaReturnElement) {
|
|
26773
|
+
setCoordinateOnPlaces(googleResults) {
|
|
26807
26774
|
this.showMap = false;
|
|
26808
26775
|
this.options = {
|
|
26809
|
-
layers: [tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom:
|
|
26776
|
+
layers: [tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
26810
26777
|
zoom: 18,
|
|
26811
26778
|
zoomControl: false,
|
|
26812
|
-
center: latLng(
|
|
26779
|
+
center: latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
26813
26780
|
};
|
|
26814
|
-
this.center = latLng(
|
|
26781
|
+
this.center = latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
26815
26782
|
this.layers = [
|
|
26816
|
-
marker([
|
|
26783
|
+
marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
26817
26784
|
icon: icon({
|
|
26818
26785
|
iconSize: [25, 41],
|
|
26819
26786
|
iconAnchor: [13, 41],
|
|
@@ -26822,23 +26789,32 @@ class MapTextFormComponent extends StructuresComponent {
|
|
|
26822
26789
|
}),
|
|
26823
26790
|
}),
|
|
26824
26791
|
];
|
|
26825
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
26826
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
26827
|
-
this.address =
|
|
26792
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
26793
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
26794
|
+
this.address = googleResults.suggestion.value;
|
|
26828
26795
|
this.showMap = true;
|
|
26829
26796
|
this.persist();
|
|
26830
26797
|
}
|
|
26831
|
-
|
|
26832
|
-
|
|
26833
|
-
|
|
26834
|
-
|
|
26835
|
-
|
|
26836
|
-
|
|
26837
|
-
|
|
26838
|
-
|
|
26839
|
-
|
|
26840
|
-
|
|
26841
|
-
|
|
26798
|
+
handleAddressChange(event) {
|
|
26799
|
+
this.googleMapReturnElement = {
|
|
26800
|
+
suggestion: {
|
|
26801
|
+
latlng: {
|
|
26802
|
+
lat: event.geometry.location.lat(),
|
|
26803
|
+
lng: event.geometry.location.lng(),
|
|
26804
|
+
},
|
|
26805
|
+
value: event.name,
|
|
26806
|
+
},
|
|
26807
|
+
};
|
|
26808
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
26809
|
+
}
|
|
26810
|
+
/**
|
|
26811
|
+
* Avoid partial map loaded at the initialization
|
|
26812
|
+
* @param map
|
|
26813
|
+
*/
|
|
26814
|
+
onMapReady(map) {
|
|
26815
|
+
setTimeout(() => {
|
|
26816
|
+
map.invalidateSize();
|
|
26817
|
+
}, 0);
|
|
26842
26818
|
}
|
|
26843
26819
|
selectThisForm() {
|
|
26844
26820
|
if (this.selectedValue === null) {
|
|
@@ -26850,20 +26826,11 @@ class MapTextFormComponent extends StructuresComponent {
|
|
|
26850
26826
|
this.contentBlock[FORM_NAME_ID_FORM] = this.selectedValue.id;
|
|
26851
26827
|
this.persist();
|
|
26852
26828
|
}
|
|
26853
|
-
/**
|
|
26854
|
-
* Avoid partial map loaded at the initialization
|
|
26855
|
-
* @param map
|
|
26856
|
-
*/
|
|
26857
|
-
onMapReady(map) {
|
|
26858
|
-
setTimeout(() => {
|
|
26859
|
-
map.invalidateSize();
|
|
26860
|
-
}, 0);
|
|
26861
|
-
}
|
|
26862
26829
|
}
|
|
26863
26830
|
MapTextFormComponent.decorators = [
|
|
26864
26831
|
{ type: Component, args: [{
|
|
26865
26832
|
selector: MapTextFormService.selector(),
|
|
26866
|
-
template: "<div class=\"wb-map-text-form\">\n <div class=\"wb-map-text-form__container__config\" *ngIf=\"showMap\">\n <wb-structure-config
|
|
26833
|
+
template: "<div class=\"wb-map-text-form\">\n <div class=\"wb-map-text-form__container__config\" *ngIf=\"showMap\">\n <wb-structure-config [blockUUID]=\"uuid\" [position]=\"TYPE_CONFIG_POSITION_LEFT_TOP\" [isFullwidth]=\"true\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input-edit{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInputEdit\n (click)=\"myInputEdit.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </wb-structure-config>\n </div>\n <div class=\"wb-map-text-form__selector\" *ngIf=\"!showMap\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInput\n (click)=\"myInput.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </div>\n <div class=\"columns is-gapless\" *ngIf=\"showMap\">\n <div class=\"column\">\n <div class=\"wb-map-text-form__addresses\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_ADDRESS]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_ADDRESS] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-text-form__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ADDRESS]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_PHONE]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_PHONE] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-text-form__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_PHONE]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n <div class=\"columns is-gapless\">\n <div class=\"column is-1\">\n <wb-structure-config-font\n [(value)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_EMAIL]\"\n [white]=\"false\"\n [isSmall]=\"true\"\n [withImage]=\"false\"\n (valueChange)=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_ICON_EMAIL] = $event; persist()\"\n ></wb-structure-config-font>\n </div>\n <div class=\"column\">\n <div class=\"wb-map-text-form__address\">\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_EMAIL]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"wb-map-text-form__social\"\n *ngIf=\"\n contents[BASE_BLOCK_CONTENT][FORM_NAME_FACEBOOK] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_TWITTER] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_PINTEREST] ||\n contents[BASE_BLOCK_CONTENT][FORM_NAME_INSTAGRAM]\n \"\n >\n <div class=\"wb-map-text-form__social__facebook\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_FACEBOOK]\">\n <i class=\"fab fa-facebook-f\"></i>\n </div>\n <div class=\"wb-map-text-form__social__twitter\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_TWITTER]\">\n <i class=\"fab fa-twitter\"></i>\n </div>\n <div class=\"wb-map-text-form__social__pinterest\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_PINTEREST]\">\n <i class=\"fab fa-pinterest-p\"></i>\n </div>\n <div class=\"wb-map-text-form__social__instagram\" *ngIf=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_INSTAGRAM]\">\n <i class=\"fab fa-instagram\"></i>\n </div>\n </div>\n <div class=\"wb-map-text-form__container\">\n <div *ngIf=\"showMap\">\n <div class=\"wb-map-text-form__cover\"></div>\n <div\n class=\"wb-map-text-form__container__map\"\n leaflet\n [leafletOptions]=\"options\"\n [leafletLayers]=\"layers\"\n [(leafletCenter)]=\"center\"\n (leafletMapReady)=\"onMapReady($event)\"\n ></div>\n </div>\n </div>\n </div>\n <div class=\"column\">\n <div *ngIf=\"selectedDetailForm.length === 0\">\n <div *ngIf=\"forms.length === 0\" class=\"wb-map-text-form__loader\">\n <wb-loader></wb-loader>\n </div>\n <div class=\"wb-map-text-form__selector\" *ngIf=\"forms.length > 0\">\n <wb-structure-select\n [selectedValue]=\"selectedValue\"\n [forms]=\"forms\"\n (changed)=\"selectedValue = $event; selectThisForm()\"\n ></wb-structure-select>\n </div>\n </div>\n <div *ngIf=\"selectedDetailForm.length > 0\" class=\"wb-map-text-form__container-form\">\n <div class=\"wb-map-text-form__container-form__editor\">\n <div>\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_TITLE]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n <div>\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_CONTENT]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n <div class=\"wb-map-text-form__container-form__content\">\n <div *ngFor=\"let select of selectedDetailForm\">\n <p [innerHTML]=\"select.title\"></p>\n <p>{{ select.type | answerPipe | translate }}</p>\n </div>\n <div>\n <wb-structure-select\n [selectedValue]=\"selectedValue\"\n [forms]=\"forms\"\n (changed)=\"selectedValue = $event; selectThisForm()\"\n ></wb-structure-select>\n \n <button>{{ selectedValue.submit_label }}</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n"
|
|
26867
26834
|
},] }
|
|
26868
26835
|
];
|
|
26869
26836
|
MapTextFormComponent.ctorParameters = () => [
|
|
@@ -26879,7 +26846,9 @@ class MapBackgroundFormLeftComponent extends StructuresComponent {
|
|
|
26879
26846
|
super();
|
|
26880
26847
|
this.apiService = apiService;
|
|
26881
26848
|
this.address = '';
|
|
26849
|
+
this.triggerAddress = '';
|
|
26882
26850
|
this.editPlaceMap = null;
|
|
26851
|
+
this.firstTimeTrigger = false;
|
|
26883
26852
|
this.options = {};
|
|
26884
26853
|
this.layers = [];
|
|
26885
26854
|
this.showMap = false;
|
|
@@ -26902,27 +26871,17 @@ class MapBackgroundFormLeftComponent extends StructuresComponent {
|
|
|
26902
26871
|
}
|
|
26903
26872
|
});
|
|
26904
26873
|
}
|
|
26905
|
-
|
|
26906
|
-
const placesAutocomplete = places({
|
|
26907
|
-
appId: 'pl9OI1NPY62Y',
|
|
26908
|
-
apiKey: '290e5a0e33e751c85c36690d502991fc',
|
|
26909
|
-
container: this.input.nativeElement,
|
|
26910
|
-
});
|
|
26911
|
-
placesAutocomplete.on('change', (algoliaReturnElement) => {
|
|
26912
|
-
this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
26913
|
-
});
|
|
26914
|
-
}
|
|
26915
|
-
setCoordinateOnPlaces(algoliaReturnElement) {
|
|
26874
|
+
setCoordinateOnPlaces(googleResults) {
|
|
26916
26875
|
this.showMap = false;
|
|
26917
26876
|
this.options = {
|
|
26918
|
-
layers: [tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom:
|
|
26877
|
+
layers: [tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
26919
26878
|
zoom: 18,
|
|
26920
26879
|
zoomControl: false,
|
|
26921
|
-
center: latLng(
|
|
26880
|
+
center: latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
26922
26881
|
};
|
|
26923
|
-
this.center = latLng(
|
|
26882
|
+
this.center = latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
26924
26883
|
this.layers = [
|
|
26925
|
-
marker([
|
|
26884
|
+
marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
26926
26885
|
icon: icon({
|
|
26927
26886
|
iconSize: [25, 41],
|
|
26928
26887
|
iconAnchor: [13, 41],
|
|
@@ -26931,23 +26890,32 @@ class MapBackgroundFormLeftComponent extends StructuresComponent {
|
|
|
26931
26890
|
}),
|
|
26932
26891
|
}),
|
|
26933
26892
|
];
|
|
26934
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
26935
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
26936
|
-
this.address =
|
|
26893
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
26894
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
26895
|
+
this.address = googleResults.suggestion.value;
|
|
26937
26896
|
this.showMap = true;
|
|
26938
26897
|
this.persist();
|
|
26939
26898
|
}
|
|
26940
|
-
|
|
26941
|
-
|
|
26942
|
-
|
|
26943
|
-
|
|
26944
|
-
|
|
26945
|
-
|
|
26946
|
-
|
|
26947
|
-
|
|
26948
|
-
|
|
26949
|
-
|
|
26950
|
-
|
|
26899
|
+
handleAddressChange(event) {
|
|
26900
|
+
this.googleMapReturnElement = {
|
|
26901
|
+
suggestion: {
|
|
26902
|
+
latlng: {
|
|
26903
|
+
lat: event.geometry.location.lat(),
|
|
26904
|
+
lng: event.geometry.location.lng(),
|
|
26905
|
+
},
|
|
26906
|
+
value: event.name,
|
|
26907
|
+
},
|
|
26908
|
+
};
|
|
26909
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
26910
|
+
}
|
|
26911
|
+
/**
|
|
26912
|
+
* Avoid partial map loaded at the initialization
|
|
26913
|
+
* @param map
|
|
26914
|
+
*/
|
|
26915
|
+
onMapReady(map) {
|
|
26916
|
+
setTimeout(() => {
|
|
26917
|
+
map.invalidateSize();
|
|
26918
|
+
}, 0);
|
|
26951
26919
|
}
|
|
26952
26920
|
selectThisForm() {
|
|
26953
26921
|
if (this.selectedValue === null) {
|
|
@@ -26959,20 +26927,11 @@ class MapBackgroundFormLeftComponent extends StructuresComponent {
|
|
|
26959
26927
|
this.contentBlock[FORM_NAME_ID_FORM] = this.selectedValue.id;
|
|
26960
26928
|
this.persist();
|
|
26961
26929
|
}
|
|
26962
|
-
/**
|
|
26963
|
-
* Avoid partial map loaded at the initialization
|
|
26964
|
-
* @param map
|
|
26965
|
-
*/
|
|
26966
|
-
onMapReady(map) {
|
|
26967
|
-
setTimeout(() => {
|
|
26968
|
-
map.invalidateSize();
|
|
26969
|
-
}, 0);
|
|
26970
|
-
}
|
|
26971
26930
|
}
|
|
26972
26931
|
MapBackgroundFormLeftComponent.decorators = [
|
|
26973
26932
|
{ type: Component, args: [{
|
|
26974
26933
|
selector: MapBackgroundFormLeftService.selector(),
|
|
26975
|
-
template: "<div class=\"wb-map-background-form-left\">\n <div class=\"wb-map-background-form-left__container__config\" *ngIf=\"showMap\">\n <wb-structure-config
|
|
26934
|
+
template: "<div class=\"wb-map-background-form-left\">\n <div class=\"wb-map-background-form-left__container__config\" *ngIf=\"showMap\">\n <wb-structure-config [blockUUID]=\"uuid\" [position]=\"TYPE_CONFIG_POSITION_RIGHT_TOP\" [isFullwidth]=\"true\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input-edit{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInputEdit\n (click)=\"myInputEdit.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </wb-structure-config>\n </div>\n <div class=\"wb-map-background-form-left__selector\" *ngIf=\"!showMap\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInput\n (click)=\"myInput.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </div>\n <div class=\"columns is-gapless\" *ngIf=\"showMap\">\n <div class=\"column\">\n <div *ngIf=\"selectedDetailForm.length === 0\">\n <div *ngIf=\"forms.length === 0\" class=\"wb-map-background-form-left__loader\">\n <wb-loader></wb-loader>\n </div>\n <div class=\"wb-map-background-form-left__selector-form\" *ngIf=\"forms.length > 0\">\n <wb-structure-select\n [selectedValue]=\"selectedValue\"\n [forms]=\"forms\"\n (changed)=\"selectedValue = $event; selectThisForm()\"\n ></wb-structure-select>\n </div>\n </div>\n <div *ngIf=\"selectedDetailForm.length > 0\" class=\"wb-map-background-form-left__container-form\">\n <div class=\"wb-map-background-form-left__container-form__editor\">\n <div>\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_TITLE]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n <div>\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_CONTENT]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n <div class=\"wb-map-background-form-left__container-form__content\">\n <div *ngFor=\"let select of selectedDetailForm\">\n <p [innerHTML]=\"select.title\"></p>\n <p>{{ select.type | answerPipe | translate }}</p>\n </div>\n <div>\n <wb-structure-select\n [selectedValue]=\"selectedValue\"\n [forms]=\"forms\"\n (changed)=\"selectedValue = $event; selectThisForm()\"\n ></wb-structure-select>\n \n <button>{{ selectedValue.submit_label }}</button>\n </div>\n </div>\n </div>\n <div class=\"wb-map-background-form-left__container\">\n <div>\n <div class=\"wb-map-background-form-left__cover\"></div>\n <div\n class=\"wb-map-background-form-left__container__map\"\n leaflet\n [leafletOptions]=\"options\"\n [leafletLayers]=\"layers\"\n [(leafletCenter)]=\"center\"\n (leafletMapReady)=\"onMapReady($event)\"\n ></div>\n </div>\n </div>\n </div>\n </div>\n</div>\n"
|
|
26976
26935
|
},] }
|
|
26977
26936
|
];
|
|
26978
26937
|
MapBackgroundFormLeftComponent.ctorParameters = () => [
|
|
@@ -26987,7 +26946,9 @@ class MapBackgroundFormRightComponent extends StructuresComponent {
|
|
|
26987
26946
|
super();
|
|
26988
26947
|
this.apiService = apiService;
|
|
26989
26948
|
this.address = '';
|
|
26949
|
+
this.triggerAddress = '';
|
|
26990
26950
|
this.editPlaceMap = null;
|
|
26951
|
+
this.firstTimeTrigger = false;
|
|
26991
26952
|
this.options = {};
|
|
26992
26953
|
this.layers = [];
|
|
26993
26954
|
this.showMap = false;
|
|
@@ -27010,27 +26971,17 @@ class MapBackgroundFormRightComponent extends StructuresComponent {
|
|
|
27010
26971
|
}
|
|
27011
26972
|
});
|
|
27012
26973
|
}
|
|
27013
|
-
|
|
27014
|
-
const placesAutocomplete = places({
|
|
27015
|
-
appId: 'pl9OI1NPY62Y',
|
|
27016
|
-
apiKey: '290e5a0e33e751c85c36690d502991fc',
|
|
27017
|
-
container: this.input.nativeElement,
|
|
27018
|
-
});
|
|
27019
|
-
placesAutocomplete.on('change', (algoliaReturnElement) => {
|
|
27020
|
-
this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
27021
|
-
});
|
|
27022
|
-
}
|
|
27023
|
-
setCoordinateOnPlaces(algoliaReturnElement) {
|
|
26974
|
+
setCoordinateOnPlaces(googleResults) {
|
|
27024
26975
|
this.showMap = false;
|
|
27025
26976
|
this.options = {
|
|
27026
|
-
layers: [tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom:
|
|
26977
|
+
layers: [tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
27027
26978
|
zoom: 18,
|
|
27028
26979
|
zoomControl: false,
|
|
27029
|
-
center: latLng(
|
|
26980
|
+
center: latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
27030
26981
|
};
|
|
27031
|
-
this.center = latLng(
|
|
26982
|
+
this.center = latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
27032
26983
|
this.layers = [
|
|
27033
|
-
marker([
|
|
26984
|
+
marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
27034
26985
|
icon: icon({
|
|
27035
26986
|
iconSize: [25, 41],
|
|
27036
26987
|
iconAnchor: [13, 41],
|
|
@@ -27039,23 +26990,32 @@ class MapBackgroundFormRightComponent extends StructuresComponent {
|
|
|
27039
26990
|
}),
|
|
27040
26991
|
}),
|
|
27041
26992
|
];
|
|
27042
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
27043
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
27044
|
-
this.address =
|
|
26993
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
26994
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
26995
|
+
this.address = googleResults.suggestion.value;
|
|
27045
26996
|
this.showMap = true;
|
|
27046
26997
|
this.persist();
|
|
27047
26998
|
}
|
|
27048
|
-
|
|
27049
|
-
|
|
27050
|
-
|
|
27051
|
-
|
|
27052
|
-
|
|
27053
|
-
|
|
27054
|
-
|
|
27055
|
-
|
|
27056
|
-
|
|
27057
|
-
|
|
27058
|
-
|
|
26999
|
+
handleAddressChange(event) {
|
|
27000
|
+
this.googleMapReturnElement = {
|
|
27001
|
+
suggestion: {
|
|
27002
|
+
latlng: {
|
|
27003
|
+
lat: event.geometry.location.lat(),
|
|
27004
|
+
lng: event.geometry.location.lng(),
|
|
27005
|
+
},
|
|
27006
|
+
value: event.name,
|
|
27007
|
+
},
|
|
27008
|
+
};
|
|
27009
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
27010
|
+
}
|
|
27011
|
+
/**
|
|
27012
|
+
* Avoid partial map loaded at the initialization
|
|
27013
|
+
* @param map
|
|
27014
|
+
*/
|
|
27015
|
+
onMapReady(map) {
|
|
27016
|
+
setTimeout(() => {
|
|
27017
|
+
map.invalidateSize();
|
|
27018
|
+
}, 0);
|
|
27059
27019
|
}
|
|
27060
27020
|
selectThisForm() {
|
|
27061
27021
|
if (this.selectedValue === null) {
|
|
@@ -27067,20 +27027,11 @@ class MapBackgroundFormRightComponent extends StructuresComponent {
|
|
|
27067
27027
|
this.contentBlock[FORM_NAME_ID_FORM] = this.selectedValue.id;
|
|
27068
27028
|
this.persist();
|
|
27069
27029
|
}
|
|
27070
|
-
/**
|
|
27071
|
-
* Avoid partial map loaded at the initialization
|
|
27072
|
-
* @param map
|
|
27073
|
-
*/
|
|
27074
|
-
onMapReady(map) {
|
|
27075
|
-
setTimeout(() => {
|
|
27076
|
-
map.invalidateSize();
|
|
27077
|
-
}, 0);
|
|
27078
|
-
}
|
|
27079
27030
|
}
|
|
27080
27031
|
MapBackgroundFormRightComponent.decorators = [
|
|
27081
27032
|
{ type: Component, args: [{
|
|
27082
27033
|
selector: MapBackgroundFormRightService.selector(),
|
|
27083
|
-
template: "<div class=\"wb-map-background-form-right\">\n <div class=\"wb-map-background-form-right__container__config\" *ngIf=\"showMap\">\n <wb-structure-config
|
|
27034
|
+
template: "<div class=\"wb-map-background-form-right\">\n <div class=\"wb-map-background-form-right__container__config\" *ngIf=\"showMap\">\n <wb-structure-config [blockUUID]=\"uuid\" [position]=\"TYPE_CONFIG_POSITION_LEFT_TOP\" [isFullwidth]=\"true\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input-edit{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInputEdit\n (click)=\"myInputEdit.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </wb-structure-config>\n </div>\n <div class=\"wb-map-background-form-right__selector\" *ngIf=\"!showMap\">\n <p>{{ 'wb.structures.template.19' | translate }}</p>\n <input\n id=\"address-input{{ uuid }}\"\n type=\"text\"\n [(ngModel)]=\"address\"\n #myInput\n (click)=\"myInput.select()\"\n ngx-google-places-autocomplete\n (onAddressChange)=\"handleAddressChange($event)\"\n />\n </div>\n <div class=\"columns is-gapless\" *ngIf=\"showMap\">\n <div class=\"column\">\n <div class=\"wb-map-background-form-right__container\">\n <div *ngIf=\"showMap\">\n <div class=\"wb-map-background-form-right__cover\"></div>\n <div\n class=\"wb-map-background-form-right__container__map\"\n leaflet\n [leafletOptions]=\"options\"\n [leafletLayers]=\"layers\"\n [(leafletCenter)]=\"center\"\n (leafletMapReady)=\"onMapReady($event)\"\n ></div>\n </div>\n </div>\n </div>\n <div class=\"column\">\n <div *ngIf=\"selectedDetailForm.length === 0\">\n <div *ngIf=\"forms.length === 0\" class=\"wb-map-background-form-right__loader\">\n <wb-loader></wb-loader>\n </div>\n <div class=\"wb-map-background-form-right__selector\" *ngIf=\"forms.length > 0\">\n <wb-structure-select\n [selectedValue]=\"selectedValue\"\n [forms]=\"forms\"\n (changed)=\"selectedValue = $event; selectThisForm()\"\n ></wb-structure-select>\n </div>\n </div>\n <div *ngIf=\"selectedDetailForm.length > 0\" class=\"wb-map-background-form-right__container-form\">\n <div class=\"wb-map-background-form-right__container-form__editor\">\n <div>\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_TITLE]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n <div>\n <wb-editorjs\n [(content)]=\"contents[BASE_BLOCK_CONTENT][FORM_NAME_CONTENT]\"\n (contentChange)=\"persist()\"\n [placeholder]=\"'wb.shared.components.quill.1' | translate\"\n >\n </wb-editorjs>\n </div>\n </div>\n <div class=\"wb-map-background-form-right__container-form__content\">\n <div *ngFor=\"let select of selectedDetailForm\">\n <p [innerHTML]=\"select.title\"></p>\n <p>{{ select.type | answerPipe | translate }}</p>\n </div>\n <div>\n <wb-structure-select\n [selectedValue]=\"selectedValue\"\n [forms]=\"forms\"\n (changed)=\"selectedValue = $event; selectThisForm()\"\n ></wb-structure-select>\n \n <button>{{ selectedValue.submit_label }}</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n"
|
|
27084
27035
|
},] }
|
|
27085
27036
|
];
|
|
27086
27037
|
MapBackgroundFormRightComponent.ctorParameters = () => [
|
|
@@ -29982,6 +29933,7 @@ StructuresModule.decorators = [
|
|
|
29982
29933
|
imports: [
|
|
29983
29934
|
SharedModule,
|
|
29984
29935
|
MonacoEditorModule,
|
|
29936
|
+
GooglePlaceModule,
|
|
29985
29937
|
QuillModule,
|
|
29986
29938
|
LeafletModule,
|
|
29987
29939
|
NwbCommonModule,
|