@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@ngx-translate/core'), require('uuid'), require('@angular/cdk/drag-drop'), require('@angular/animations'), require('@angular/common/http'), require('rxjs/operators'), require('@angular/common'), require('@angular/forms'), require('@angular/platform-browser'), require('@ctrl/tinycolor'), require('quill'), require('monaco-editor'), require('ngx-quill'), require('@fortawesome/fontawesome-svg-core'), require('@fortawesome/free-solid-svg-icons'), require('@fortawesome/free-regular-svg-icons'), require('@fortawesome/free-brands-svg-icons'), require('@wizishop/ng-wizi-bulma'), require('ngx-scrollbar'), require('@editorjs/editorjs'), require('@jaames/iro'), require('codemirror'), require('@codemirror/state'), require('@codemirror/lang-html'), require('ngx-monaco-editor'), require('leaflet'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@wizishop/wizi-block', ['exports', '@angular/core', 'rxjs', '@ngx-translate/core', 'uuid', '@angular/cdk/drag-drop', '@angular/animations', '@angular/common/http', 'rxjs/operators', '@angular/common', '@angular/forms', '@angular/platform-browser', '@ctrl/tinycolor', 'quill', 'monaco-editor', 'ngx-quill', '@fortawesome/fontawesome-svg-core', '@fortawesome/free-solid-svg-icons', '@fortawesome/free-regular-svg-icons', '@fortawesome/free-brands-svg-icons', '@wizishop/ng-wizi-bulma', 'ngx-scrollbar', '@editorjs/editorjs', '@jaames/iro', 'codemirror', '@codemirror/state', '@codemirror/lang-html', 'ngx-monaco-editor', 'leaflet', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wizishop = global.wizishop || {}, global.wizishop['wizi-block'] = {}), global.ng.core, global.rxjs, global.i1, global['^3']['3']['2'], global.ng.cdk.dragDrop, global.ng.animations, global.ng.common.http, global.rxjs.operators, global.ng.common, global.ng.forms, global.ng.platformBrowser, global['^2']['5']['2'], global['^1']['3']['6'], global.monaco, global['^5']['0']['0'], global['^1']['2']['27'], global['^5']['12']['1'], global['^5']['12']['1'], global['^5']['12']['1'], global['^7']['0']['11'], global['^7']['2']['1-beta']['0'], global.EditorJS, global.iro, global.codemirror, global.state, global.langHtml, global['^8']['1']['1'], global['^1']['5']['1'], global['^
|
|
5
|
-
}(this, (function (exports, i0, rxjs, i1, uuid, dragDrop, animations, i1$1, operators, common, forms, platformBrowser, tinycolor, QuillNamespace, monaco, ngxQuill, fontawesomeSvgCore, freeSolidSvgIcons, freeRegularSvgIcons, freeBrandsSvgIcons, ngWiziBulma, ngxScrollbar, EditorJS, iro, codemirror, state, langHtml, ngxMonacoEditor, leaflet,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@ngx-translate/core'), require('uuid'), require('@angular/cdk/drag-drop'), require('@angular/animations'), require('@angular/common/http'), require('rxjs/operators'), require('@angular/common'), require('@angular/forms'), require('@angular/platform-browser'), require('@ctrl/tinycolor'), require('quill'), require('monaco-editor'), require('ngx-quill'), require('@fortawesome/fontawesome-svg-core'), require('@fortawesome/free-solid-svg-icons'), require('@fortawesome/free-regular-svg-icons'), require('@fortawesome/free-brands-svg-icons'), require('@wizishop/ng-wizi-bulma'), require('ngx-scrollbar'), require('@editorjs/editorjs'), require('@jaames/iro'), require('codemirror'), require('@codemirror/state'), require('@codemirror/lang-html'), require('ngx-monaco-editor'), require('leaflet'), require('@asymmetrik/ngx-leaflet'), require('ngx-google-places-autocomplete'), require('ngx-color-picker')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@wizishop/wizi-block', ['exports', '@angular/core', 'rxjs', '@ngx-translate/core', 'uuid', '@angular/cdk/drag-drop', '@angular/animations', '@angular/common/http', 'rxjs/operators', '@angular/common', '@angular/forms', '@angular/platform-browser', '@ctrl/tinycolor', 'quill', 'monaco-editor', 'ngx-quill', '@fortawesome/fontawesome-svg-core', '@fortawesome/free-solid-svg-icons', '@fortawesome/free-regular-svg-icons', '@fortawesome/free-brands-svg-icons', '@wizishop/ng-wizi-bulma', 'ngx-scrollbar', '@editorjs/editorjs', '@jaames/iro', 'codemirror', '@codemirror/state', '@codemirror/lang-html', 'ngx-monaco-editor', 'leaflet', '@asymmetrik/ngx-leaflet', 'ngx-google-places-autocomplete', 'ngx-color-picker'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wizishop = global.wizishop || {}, global.wizishop['wizi-block'] = {}), global.ng.core, global.rxjs, global.i1, global['^3']['3']['2'], global.ng.cdk.dragDrop, global.ng.animations, global.ng.common.http, global.rxjs.operators, global.ng.common, global.ng.forms, global.ng.platformBrowser, global['^2']['5']['2'], global['^1']['3']['6'], global.monaco, global['^5']['0']['0'], global['^1']['2']['27'], global['^5']['12']['1'], global['^5']['12']['1'], global['^5']['12']['1'], global['^7']['0']['11'], global['^7']['2']['1-beta']['0'], global.EditorJS, global.iro, global.codemirror, global.state, global.langHtml, global['^8']['1']['1'], global['^1']['5']['1'], global['^5']['0']['2'], global.ngxGooglePlacesAutocomplete, global['^9']['0']['0']));
|
|
5
|
+
}(this, (function (exports, i0, rxjs, i1, uuid, dragDrop, animations, i1$1, operators, common, forms, platformBrowser, tinycolor, QuillNamespace, monaco, ngxQuill, fontawesomeSvgCore, freeSolidSvgIcons, freeRegularSvgIcons, freeBrandsSvgIcons, ngWiziBulma, ngxScrollbar, EditorJS, iro, codemirror, state, langHtml, ngxMonacoEditor, leaflet, ngxLeaflet, ngxGooglePlacesAutocomplete, ngxColorPicker) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
var QuillNamespace__namespace = /*#__PURE__*/_interopNamespace(QuillNamespace);
|
|
32
32
|
var EditorJS__default = /*#__PURE__*/_interopDefaultLegacy(EditorJS);
|
|
33
33
|
var iro__default = /*#__PURE__*/_interopDefaultLegacy(iro);
|
|
34
|
-
var places__default = /*#__PURE__*/_interopDefaultLegacy(places);
|
|
35
34
|
|
|
36
35
|
var MediaConnectorService = /** @class */ (function () {
|
|
37
36
|
function MediaConnectorService() {
|
|
@@ -3921,7 +3920,7 @@
|
|
|
3921
3920
|
'wb.blocks.FormContentDto.117',
|
|
3922
3921
|
], ['0', '0.25', '0.5', '1']);
|
|
3923
3922
|
imgSimpleFormDto.forms.push(parallaxSpeedImgSimpleContentDto);
|
|
3924
|
-
var parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.
|
|
3923
|
+
var 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');
|
|
3925
3924
|
imgSimpleFormDto.forms.push(parallaxInvertedImgSimpleContentDto);
|
|
3926
3925
|
return imgSimpleFormDto;
|
|
3927
3926
|
};
|
|
@@ -5082,7 +5081,7 @@
|
|
|
5082
5081
|
'wb.blocks.FormContentDto.117',
|
|
5083
5082
|
], ['0', '0.25', '0.5', '1']);
|
|
5084
5083
|
TextBackgroundsSimpleFormDto.forms.push(parallaxSpeedImgSimpleContentDto);
|
|
5085
|
-
var parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.
|
|
5084
|
+
var 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');
|
|
5086
5085
|
TextBackgroundsSimpleFormDto.forms.push(parallaxInvertedImgSimpleContentDto);
|
|
5087
5086
|
return TextBackgroundsSimpleFormDto;
|
|
5088
5087
|
};
|
|
@@ -5166,7 +5165,7 @@
|
|
|
5166
5165
|
'wb.blocks.FormContentDto.117',
|
|
5167
5166
|
], ['0', '0.25', '0.5', '1']);
|
|
5168
5167
|
formsDto.forms.push(parallaxSpeedImgSimpleContentDto);
|
|
5169
|
-
var parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.
|
|
5168
|
+
var 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');
|
|
5170
5169
|
formsDto.forms.push(parallaxInvertedImgSimpleContentDto);
|
|
5171
5170
|
return formsDto;
|
|
5172
5171
|
};
|
|
@@ -5250,7 +5249,7 @@
|
|
|
5250
5249
|
'wb.blocks.FormContentDto.117',
|
|
5251
5250
|
], ['0', '0.25', '0.5', '1']);
|
|
5252
5251
|
formsDto.forms.push(parallaxSpeedImgSimpleContentDto);
|
|
5253
|
-
var parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.
|
|
5252
|
+
var 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');
|
|
5254
5253
|
formsDto.forms.push(parallaxInvertedImgSimpleContentDto);
|
|
5255
5254
|
var colorContentDto = new FormsContentDto(FORM_NAME_COLOR, 'wb.blocks.FormContentDto.112', FORM_TYPE_COLOR, content[FORM_NAME_COLOR], '#122231', '');
|
|
5256
5255
|
formsDto.forms.push(colorContentDto);
|
|
@@ -6921,7 +6920,7 @@
|
|
|
6921
6920
|
'wb.blocks.FormContentDto.117',
|
|
6922
6921
|
], ['0', '0.25', '0.5', '1']);
|
|
6923
6922
|
imgBannerFormDto.forms.push(parallaxSpeedImgSimpleContentDto);
|
|
6924
|
-
var parallaxInvertedImgSimpleContentDto = new FormsContentDto(FORM_NAME_PARALLAX_INVERTED, 'wb.
|
|
6923
|
+
var 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');
|
|
6925
6924
|
imgBannerFormDto.forms.push(parallaxInvertedImgSimpleContentDto);
|
|
6926
6925
|
return imgBannerFormDto;
|
|
6927
6926
|
};
|
|
@@ -11236,6 +11235,7 @@
|
|
|
11236
11235
|
},
|
|
11237
11236
|
clipboard: {
|
|
11238
11237
|
matchers: [['BR', this.lineBreakMatcher]],
|
|
11238
|
+
matchVisual: false,
|
|
11239
11239
|
},
|
|
11240
11240
|
keyboard: {
|
|
11241
11241
|
bindings: {
|
|
@@ -20884,7 +20884,9 @@
|
|
|
20884
20884
|
_c.label = 1;
|
|
20885
20885
|
case 1:
|
|
20886
20886
|
if (!currentNode) return [3 /*break*/, 4];
|
|
20887
|
-
if (
|
|
20887
|
+
if (!currentNode.textContent ||
|
|
20888
|
+
currentNode.textContent.length === 0 ||
|
|
20889
|
+
(currentNode.nodeType === Node.ELEMENT_NODE && currentNode.innerText.length === 0)) {
|
|
20888
20890
|
previousSibling = currentNode.previousSibling;
|
|
20889
20891
|
parentContainer.removeChild(currentNode);
|
|
20890
20892
|
currentNode = previousSibling;
|
|
@@ -20965,7 +20967,8 @@
|
|
|
20965
20967
|
var currentElementAttributes = currentElement.getAttributeNames();
|
|
20966
20968
|
currentElementAttributes.forEach(function (attribute) {
|
|
20967
20969
|
if (attribute !== 'style') {
|
|
20968
|
-
if (!nextElement.getAttribute(attribute) ||
|
|
20970
|
+
if (!nextElement.getAttribute(attribute) ||
|
|
20971
|
+
nextElement.getAttribute(attribute) !== currentElement.getAttribute(attribute)) {
|
|
20969
20972
|
return false;
|
|
20970
20973
|
}
|
|
20971
20974
|
}
|
|
@@ -29374,19 +29377,15 @@
|
|
|
29374
29377
|
];
|
|
29375
29378
|
QuotesSimpleBackgroundComponent.ctorParameters = function () { return []; };
|
|
29376
29379
|
|
|
29377
|
-
var OpenMapDto = /** @class */ (function () {
|
|
29378
|
-
function OpenMapDto() {
|
|
29379
|
-
}
|
|
29380
|
-
return OpenMapDto;
|
|
29381
|
-
}());
|
|
29382
|
-
|
|
29383
29380
|
var MapFullpageComponent = /** @class */ (function (_super) {
|
|
29384
29381
|
__extends(MapFullpageComponent, _super);
|
|
29385
29382
|
function MapFullpageComponent(externalConfigService) {
|
|
29386
29383
|
var _this = _super.call(this) || this;
|
|
29387
29384
|
_this.externalConfigService = externalConfigService;
|
|
29388
29385
|
_this.address = '';
|
|
29386
|
+
_this.triggerAddress = '';
|
|
29389
29387
|
_this.editPlaceMap = null;
|
|
29388
|
+
_this.firstTimeTrigger = false;
|
|
29390
29389
|
_this.options = {};
|
|
29391
29390
|
_this.layers = [];
|
|
29392
29391
|
_this.showMap = false;
|
|
@@ -29396,41 +29395,29 @@
|
|
|
29396
29395
|
MapFullpageComponent.prototype.ngOnInit = function () {
|
|
29397
29396
|
_super.prototype.ngOnInit.call(this);
|
|
29398
29397
|
if (this.contentBlock[this.FORM_NAME_COORDINATE_Y] && this.contentBlock[this.FORM_NAME_COORDINATE_X]) {
|
|
29399
|
-
|
|
29400
|
-
|
|
29401
|
-
|
|
29402
|
-
|
|
29403
|
-
|
|
29398
|
+
this.googleMapReturnElement = {
|
|
29399
|
+
suggestion: {
|
|
29400
|
+
latlng: {
|
|
29401
|
+
lat: this.contentBlock[this.FORM_NAME_COORDINATE_Y],
|
|
29402
|
+
lng: this.contentBlock[this.FORM_NAME_COORDINATE_X],
|
|
29403
|
+
},
|
|
29404
|
+
value: '',
|
|
29404
29405
|
},
|
|
29405
|
-
value: '',
|
|
29406
29406
|
};
|
|
29407
|
-
this.setCoordinateOnPlaces(
|
|
29407
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29408
29408
|
}
|
|
29409
29409
|
};
|
|
29410
|
-
MapFullpageComponent.prototype.
|
|
29411
|
-
var _this = this;
|
|
29412
|
-
if (!this.showMap) {
|
|
29413
|
-
var placesAutocomplete = places__default['default']({
|
|
29414
|
-
appId: this.externalConfigService.getAlgoliaAppId(),
|
|
29415
|
-
apiKey: this.externalConfigService.getAlgoliaApiKey(),
|
|
29416
|
-
container: this.input.nativeElement,
|
|
29417
|
-
});
|
|
29418
|
-
placesAutocomplete.on('change', function (algoliaReturnElement) {
|
|
29419
|
-
_this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
29420
|
-
});
|
|
29421
|
-
}
|
|
29422
|
-
};
|
|
29423
|
-
MapFullpageComponent.prototype.setCoordinateOnPlaces = function (algoliaReturnElement) {
|
|
29410
|
+
MapFullpageComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29424
29411
|
this.showMap = false;
|
|
29425
29412
|
this.options = {
|
|
29426
29413
|
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29427
29414
|
zoom: 18,
|
|
29428
29415
|
zoomControl: false,
|
|
29429
|
-
center: leaflet.latLng(
|
|
29416
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29430
29417
|
};
|
|
29431
|
-
this.center = leaflet.latLng(
|
|
29418
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29432
29419
|
this.layers = [
|
|
29433
|
-
leaflet.marker([
|
|
29420
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29434
29421
|
icon: leaflet.icon({
|
|
29435
29422
|
iconSize: [25, 41],
|
|
29436
29423
|
iconAnchor: [13, 41],
|
|
@@ -29439,24 +29426,23 @@
|
|
|
29439
29426
|
}),
|
|
29440
29427
|
}),
|
|
29441
29428
|
];
|
|
29442
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29443
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29444
|
-
this.address =
|
|
29429
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29430
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29431
|
+
this.address = googleResults.suggestion.value;
|
|
29445
29432
|
this.showMap = true;
|
|
29446
29433
|
this.persist();
|
|
29447
29434
|
};
|
|
29448
|
-
MapFullpageComponent.prototype.
|
|
29449
|
-
|
|
29450
|
-
|
|
29451
|
-
|
|
29452
|
-
|
|
29453
|
-
|
|
29454
|
-
|
|
29455
|
-
|
|
29456
|
-
|
|
29457
|
-
|
|
29458
|
-
|
|
29459
|
-
}
|
|
29435
|
+
MapFullpageComponent.prototype.handleAddressChange = function (event) {
|
|
29436
|
+
this.googleMapReturnElement = {
|
|
29437
|
+
suggestion: {
|
|
29438
|
+
latlng: {
|
|
29439
|
+
lat: event.geometry.location.lat(),
|
|
29440
|
+
lng: event.geometry.location.lng(),
|
|
29441
|
+
},
|
|
29442
|
+
value: event.name,
|
|
29443
|
+
},
|
|
29444
|
+
};
|
|
29445
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29460
29446
|
};
|
|
29461
29447
|
/**
|
|
29462
29448
|
* Avoid partial map loaded at the initialization
|
|
@@ -29472,7 +29458,7 @@
|
|
|
29472
29458
|
MapFullpageComponent.decorators = [
|
|
29473
29459
|
{ type: i0.Component, args: [{
|
|
29474
29460
|
selector: MapFullpageService.selector(),
|
|
29475
|
-
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\"
|
|
29461
|
+
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"
|
|
29476
29462
|
},] }
|
|
29477
29463
|
];
|
|
29478
29464
|
MapFullpageComponent.ctorParameters = function () { return [
|
|
@@ -29488,7 +29474,9 @@
|
|
|
29488
29474
|
var _this = _super.call(this) || this;
|
|
29489
29475
|
_this.externalConfigService = externalConfigService;
|
|
29490
29476
|
_this.address = '';
|
|
29477
|
+
_this.triggerAddress = '';
|
|
29491
29478
|
_this.editPlaceMap = null;
|
|
29479
|
+
_this.firstTimeTrigger = false;
|
|
29492
29480
|
_this.options = {};
|
|
29493
29481
|
_this.layers = [];
|
|
29494
29482
|
_this.showMap = false;
|
|
@@ -29498,41 +29486,29 @@
|
|
|
29498
29486
|
MapLeftTextComponent.prototype.ngOnInit = function () {
|
|
29499
29487
|
_super.prototype.ngOnInit.call(this);
|
|
29500
29488
|
if (this.contentBlock[this.FORM_NAME_COORDINATE_Y] && this.contentBlock[this.FORM_NAME_COORDINATE_X]) {
|
|
29501
|
-
|
|
29502
|
-
|
|
29503
|
-
|
|
29504
|
-
|
|
29505
|
-
|
|
29489
|
+
this.googleMapReturnElement = {
|
|
29490
|
+
suggestion: {
|
|
29491
|
+
latlng: {
|
|
29492
|
+
lat: this.contentBlock[this.FORM_NAME_COORDINATE_Y],
|
|
29493
|
+
lng: this.contentBlock[this.FORM_NAME_COORDINATE_X],
|
|
29494
|
+
},
|
|
29495
|
+
value: '',
|
|
29506
29496
|
},
|
|
29507
|
-
value: '',
|
|
29508
29497
|
};
|
|
29509
|
-
this.setCoordinateOnPlaces(
|
|
29510
|
-
}
|
|
29511
|
-
};
|
|
29512
|
-
MapLeftTextComponent.prototype.ngAfterViewInit = function () {
|
|
29513
|
-
var _this = this;
|
|
29514
|
-
if (!this.showMap) {
|
|
29515
|
-
var placesAutocomplete = places__default['default']({
|
|
29516
|
-
appId: this.externalConfigService.getAlgoliaAppId(),
|
|
29517
|
-
apiKey: this.externalConfigService.getAlgoliaApiKey(),
|
|
29518
|
-
container: this.input.nativeElement,
|
|
29519
|
-
});
|
|
29520
|
-
placesAutocomplete.on('change', function (algoliaReturnElement) {
|
|
29521
|
-
_this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
29522
|
-
});
|
|
29498
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29523
29499
|
}
|
|
29524
29500
|
};
|
|
29525
|
-
MapLeftTextComponent.prototype.setCoordinateOnPlaces = function (
|
|
29501
|
+
MapLeftTextComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29526
29502
|
this.showMap = false;
|
|
29527
29503
|
this.options = {
|
|
29528
29504
|
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29529
29505
|
zoom: 18,
|
|
29530
29506
|
zoomControl: false,
|
|
29531
|
-
center: leaflet.latLng(
|
|
29507
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29532
29508
|
};
|
|
29533
|
-
this.center = leaflet.latLng(
|
|
29509
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29534
29510
|
this.layers = [
|
|
29535
|
-
leaflet.marker([
|
|
29511
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29536
29512
|
icon: leaflet.icon({
|
|
29537
29513
|
iconSize: [25, 41],
|
|
29538
29514
|
iconAnchor: [13, 41],
|
|
@@ -29541,24 +29517,23 @@
|
|
|
29541
29517
|
}),
|
|
29542
29518
|
}),
|
|
29543
29519
|
];
|
|
29544
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29545
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29546
|
-
this.address =
|
|
29520
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29521
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29522
|
+
this.address = googleResults.suggestion.value;
|
|
29547
29523
|
this.showMap = true;
|
|
29548
29524
|
this.persist();
|
|
29549
29525
|
};
|
|
29550
|
-
MapLeftTextComponent.prototype.
|
|
29551
|
-
|
|
29552
|
-
|
|
29553
|
-
|
|
29554
|
-
|
|
29555
|
-
|
|
29556
|
-
|
|
29557
|
-
|
|
29558
|
-
|
|
29559
|
-
|
|
29560
|
-
|
|
29561
|
-
}
|
|
29526
|
+
MapLeftTextComponent.prototype.handleAddressChange = function (event) {
|
|
29527
|
+
this.googleMapReturnElement = {
|
|
29528
|
+
suggestion: {
|
|
29529
|
+
latlng: {
|
|
29530
|
+
lat: event.geometry.location.lat(),
|
|
29531
|
+
lng: event.geometry.location.lng(),
|
|
29532
|
+
},
|
|
29533
|
+
value: event.name,
|
|
29534
|
+
},
|
|
29535
|
+
};
|
|
29536
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29562
29537
|
};
|
|
29563
29538
|
/**
|
|
29564
29539
|
* Avoid partial map loaded at the initialization
|
|
@@ -29574,7 +29549,7 @@
|
|
|
29574
29549
|
MapLeftTextComponent.decorators = [
|
|
29575
29550
|
{ type: i0.Component, args: [{
|
|
29576
29551
|
selector: MapLeftTextService.selector(),
|
|
29577
|
-
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
|
|
29552
|
+
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"
|
|
29578
29553
|
},] }
|
|
29579
29554
|
];
|
|
29580
29555
|
MapLeftTextComponent.ctorParameters = function () { return [
|
|
@@ -29590,7 +29565,9 @@
|
|
|
29590
29565
|
var _this = _super.call(this) || this;
|
|
29591
29566
|
_this.externalConfigService = externalConfigService;
|
|
29592
29567
|
_this.address = '';
|
|
29568
|
+
_this.triggerAddress = '';
|
|
29593
29569
|
_this.editPlaceMap = null;
|
|
29570
|
+
_this.firstTimeTrigger = false;
|
|
29594
29571
|
_this.options = {};
|
|
29595
29572
|
_this.layers = [];
|
|
29596
29573
|
_this.showMap = false;
|
|
@@ -29600,41 +29577,29 @@
|
|
|
29600
29577
|
MapRightTextComponent.prototype.ngOnInit = function () {
|
|
29601
29578
|
_super.prototype.ngOnInit.call(this);
|
|
29602
29579
|
if (this.contentBlock[this.FORM_NAME_COORDINATE_Y] && this.contentBlock[this.FORM_NAME_COORDINATE_X]) {
|
|
29603
|
-
|
|
29604
|
-
|
|
29605
|
-
|
|
29606
|
-
|
|
29607
|
-
|
|
29580
|
+
this.googleMapReturnElement = {
|
|
29581
|
+
suggestion: {
|
|
29582
|
+
latlng: {
|
|
29583
|
+
lat: this.contentBlock[this.FORM_NAME_COORDINATE_Y],
|
|
29584
|
+
lng: this.contentBlock[this.FORM_NAME_COORDINATE_X],
|
|
29585
|
+
},
|
|
29586
|
+
value: '',
|
|
29608
29587
|
},
|
|
29609
|
-
value: '',
|
|
29610
29588
|
};
|
|
29611
|
-
this.setCoordinateOnPlaces(
|
|
29612
|
-
}
|
|
29613
|
-
};
|
|
29614
|
-
MapRightTextComponent.prototype.ngAfterViewInit = function () {
|
|
29615
|
-
var _this = this;
|
|
29616
|
-
if (!this.showMap) {
|
|
29617
|
-
var placesAutocomplete = places__default['default']({
|
|
29618
|
-
appId: this.externalConfigService.getAlgoliaAppId(),
|
|
29619
|
-
apiKey: this.externalConfigService.getAlgoliaApiKey(),
|
|
29620
|
-
container: this.input.nativeElement,
|
|
29621
|
-
});
|
|
29622
|
-
placesAutocomplete.on('change', function (algoliaReturnElement) {
|
|
29623
|
-
_this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
29624
|
-
});
|
|
29589
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29625
29590
|
}
|
|
29626
29591
|
};
|
|
29627
|
-
MapRightTextComponent.prototype.setCoordinateOnPlaces = function (
|
|
29592
|
+
MapRightTextComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29628
29593
|
this.showMap = false;
|
|
29629
29594
|
this.options = {
|
|
29630
29595
|
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29631
29596
|
zoom: 18,
|
|
29632
29597
|
zoomControl: false,
|
|
29633
|
-
center: leaflet.latLng(
|
|
29598
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29634
29599
|
};
|
|
29635
|
-
this.center = leaflet.latLng(
|
|
29600
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29636
29601
|
this.layers = [
|
|
29637
|
-
leaflet.marker([
|
|
29602
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29638
29603
|
icon: leaflet.icon({
|
|
29639
29604
|
iconSize: [25, 41],
|
|
29640
29605
|
iconAnchor: [13, 41],
|
|
@@ -29643,24 +29608,23 @@
|
|
|
29643
29608
|
}),
|
|
29644
29609
|
}),
|
|
29645
29610
|
];
|
|
29646
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29647
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29648
|
-
this.address =
|
|
29611
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29612
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29613
|
+
this.address = googleResults.suggestion.value;
|
|
29649
29614
|
this.showMap = true;
|
|
29650
29615
|
this.persist();
|
|
29651
29616
|
};
|
|
29652
|
-
MapRightTextComponent.prototype.
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
|
|
29663
|
-
}
|
|
29617
|
+
MapRightTextComponent.prototype.handleAddressChange = function (event) {
|
|
29618
|
+
this.googleMapReturnElement = {
|
|
29619
|
+
suggestion: {
|
|
29620
|
+
latlng: {
|
|
29621
|
+
lat: event.geometry.location.lat(),
|
|
29622
|
+
lng: event.geometry.location.lng(),
|
|
29623
|
+
},
|
|
29624
|
+
value: event.name,
|
|
29625
|
+
},
|
|
29626
|
+
};
|
|
29627
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29664
29628
|
};
|
|
29665
29629
|
/**
|
|
29666
29630
|
* Avoid partial map loaded at the initialization
|
|
@@ -29676,7 +29640,7 @@
|
|
|
29676
29640
|
MapRightTextComponent.decorators = [
|
|
29677
29641
|
{ type: i0.Component, args: [{
|
|
29678
29642
|
selector: MapRightTextService.selector(),
|
|
29679
|
-
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
|
|
29643
|
+
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"
|
|
29680
29644
|
},] }
|
|
29681
29645
|
];
|
|
29682
29646
|
MapRightTextComponent.ctorParameters = function () { return [
|
|
@@ -29686,6 +29650,12 @@
|
|
|
29686
29650
|
input: [{ type: i0.ViewChild, args: ['myInput',] }]
|
|
29687
29651
|
};
|
|
29688
29652
|
|
|
29653
|
+
var OpenMapDto = /** @class */ (function () {
|
|
29654
|
+
function OpenMapDto() {
|
|
29655
|
+
}
|
|
29656
|
+
return OpenMapDto;
|
|
29657
|
+
}());
|
|
29658
|
+
|
|
29689
29659
|
var MapTextFormComponent = /** @class */ (function (_super) {
|
|
29690
29660
|
__extends(MapTextFormComponent, _super);
|
|
29691
29661
|
function MapTextFormComponent(apiService, externalConfigService) {
|
|
@@ -29693,7 +29663,9 @@
|
|
|
29693
29663
|
_this.apiService = apiService;
|
|
29694
29664
|
_this.externalConfigService = externalConfigService;
|
|
29695
29665
|
_this.address = '';
|
|
29666
|
+
_this.triggerAddress = '';
|
|
29696
29667
|
_this.editPlaceMap = null;
|
|
29668
|
+
_this.firstTimeTrigger = false;
|
|
29697
29669
|
_this.options = {};
|
|
29698
29670
|
_this.layers = [];
|
|
29699
29671
|
_this.showMap = false;
|
|
@@ -29729,30 +29701,17 @@
|
|
|
29729
29701
|
}
|
|
29730
29702
|
});
|
|
29731
29703
|
};
|
|
29732
|
-
MapTextFormComponent.prototype.
|
|
29733
|
-
var _this = this;
|
|
29734
|
-
if (!this.showMap) {
|
|
29735
|
-
var placesAutocomplete = places__default['default']({
|
|
29736
|
-
appId: this.externalConfigService.getAlgoliaAppId(),
|
|
29737
|
-
apiKey: this.externalConfigService.getAlgoliaApiKey(),
|
|
29738
|
-
container: this.input.nativeElement,
|
|
29739
|
-
});
|
|
29740
|
-
placesAutocomplete.on('change', function (algoliaReturnElement) {
|
|
29741
|
-
_this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
29742
|
-
});
|
|
29743
|
-
}
|
|
29744
|
-
};
|
|
29745
|
-
MapTextFormComponent.prototype.setCoordinateOnPlaces = function (algoliaReturnElement) {
|
|
29704
|
+
MapTextFormComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29746
29705
|
this.showMap = false;
|
|
29747
29706
|
this.options = {
|
|
29748
|
-
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom:
|
|
29707
|
+
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29749
29708
|
zoom: 18,
|
|
29750
29709
|
zoomControl: false,
|
|
29751
|
-
center: leaflet.latLng(
|
|
29710
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29752
29711
|
};
|
|
29753
|
-
this.center = leaflet.latLng(
|
|
29712
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29754
29713
|
this.layers = [
|
|
29755
|
-
leaflet.marker([
|
|
29714
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29756
29715
|
icon: leaflet.icon({
|
|
29757
29716
|
iconSize: [25, 41],
|
|
29758
29717
|
iconAnchor: [13, 41],
|
|
@@ -29761,24 +29720,32 @@
|
|
|
29761
29720
|
}),
|
|
29762
29721
|
}),
|
|
29763
29722
|
];
|
|
29764
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29765
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29766
|
-
this.address =
|
|
29723
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29724
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29725
|
+
this.address = googleResults.suggestion.value;
|
|
29767
29726
|
this.showMap = true;
|
|
29768
29727
|
this.persist();
|
|
29769
29728
|
};
|
|
29770
|
-
MapTextFormComponent.prototype.
|
|
29771
|
-
|
|
29772
|
-
|
|
29773
|
-
|
|
29774
|
-
|
|
29775
|
-
|
|
29776
|
-
|
|
29777
|
-
|
|
29778
|
-
|
|
29779
|
-
|
|
29780
|
-
|
|
29781
|
-
|
|
29729
|
+
MapTextFormComponent.prototype.handleAddressChange = function (event) {
|
|
29730
|
+
this.googleMapReturnElement = {
|
|
29731
|
+
suggestion: {
|
|
29732
|
+
latlng: {
|
|
29733
|
+
lat: event.geometry.location.lat(),
|
|
29734
|
+
lng: event.geometry.location.lng(),
|
|
29735
|
+
},
|
|
29736
|
+
value: event.name,
|
|
29737
|
+
},
|
|
29738
|
+
};
|
|
29739
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29740
|
+
};
|
|
29741
|
+
/**
|
|
29742
|
+
* Avoid partial map loaded at the initialization
|
|
29743
|
+
* @param map
|
|
29744
|
+
*/
|
|
29745
|
+
MapTextFormComponent.prototype.onMapReady = function (map) {
|
|
29746
|
+
setTimeout(function () {
|
|
29747
|
+
map.invalidateSize();
|
|
29748
|
+
}, 0);
|
|
29782
29749
|
};
|
|
29783
29750
|
MapTextFormComponent.prototype.selectThisForm = function () {
|
|
29784
29751
|
var _this = this;
|
|
@@ -29791,21 +29758,12 @@
|
|
|
29791
29758
|
this.contentBlock[FORM_NAME_ID_FORM] = this.selectedValue.id;
|
|
29792
29759
|
this.persist();
|
|
29793
29760
|
};
|
|
29794
|
-
/**
|
|
29795
|
-
* Avoid partial map loaded at the initialization
|
|
29796
|
-
* @param map
|
|
29797
|
-
*/
|
|
29798
|
-
MapTextFormComponent.prototype.onMapReady = function (map) {
|
|
29799
|
-
setTimeout(function () {
|
|
29800
|
-
map.invalidateSize();
|
|
29801
|
-
}, 0);
|
|
29802
|
-
};
|
|
29803
29761
|
return MapTextFormComponent;
|
|
29804
29762
|
}(StructuresComponent));
|
|
29805
29763
|
MapTextFormComponent.decorators = [
|
|
29806
29764
|
{ type: i0.Component, args: [{
|
|
29807
29765
|
selector: MapTextFormService.selector(),
|
|
29808
|
-
template: "<div class=\"wb-map-text-form\">\n <div class=\"wb-map-text-form__container__config\" *ngIf=\"showMap\">\n <wb-structure-config
|
|
29766
|
+
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"
|
|
29809
29767
|
},] }
|
|
29810
29768
|
];
|
|
29811
29769
|
MapTextFormComponent.ctorParameters = function () { return [
|
|
@@ -29822,7 +29780,9 @@
|
|
|
29822
29780
|
var _this = _super.call(this) || this;
|
|
29823
29781
|
_this.apiService = apiService;
|
|
29824
29782
|
_this.address = '';
|
|
29783
|
+
_this.triggerAddress = '';
|
|
29825
29784
|
_this.editPlaceMap = null;
|
|
29785
|
+
_this.firstTimeTrigger = false;
|
|
29826
29786
|
_this.options = {};
|
|
29827
29787
|
_this.layers = [];
|
|
29828
29788
|
_this.showMap = false;
|
|
@@ -29847,28 +29807,17 @@
|
|
|
29847
29807
|
}
|
|
29848
29808
|
});
|
|
29849
29809
|
};
|
|
29850
|
-
MapBackgroundFormLeftComponent.prototype.
|
|
29851
|
-
var _this = this;
|
|
29852
|
-
var placesAutocomplete = places__default['default']({
|
|
29853
|
-
appId: 'pl9OI1NPY62Y',
|
|
29854
|
-
apiKey: '290e5a0e33e751c85c36690d502991fc',
|
|
29855
|
-
container: this.input.nativeElement,
|
|
29856
|
-
});
|
|
29857
|
-
placesAutocomplete.on('change', function (algoliaReturnElement) {
|
|
29858
|
-
_this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
29859
|
-
});
|
|
29860
|
-
};
|
|
29861
|
-
MapBackgroundFormLeftComponent.prototype.setCoordinateOnPlaces = function (algoliaReturnElement) {
|
|
29810
|
+
MapBackgroundFormLeftComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29862
29811
|
this.showMap = false;
|
|
29863
29812
|
this.options = {
|
|
29864
|
-
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom:
|
|
29813
|
+
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29865
29814
|
zoom: 18,
|
|
29866
29815
|
zoomControl: false,
|
|
29867
|
-
center: leaflet.latLng(
|
|
29816
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29868
29817
|
};
|
|
29869
|
-
this.center = leaflet.latLng(
|
|
29818
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29870
29819
|
this.layers = [
|
|
29871
|
-
leaflet.marker([
|
|
29820
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29872
29821
|
icon: leaflet.icon({
|
|
29873
29822
|
iconSize: [25, 41],
|
|
29874
29823
|
iconAnchor: [13, 41],
|
|
@@ -29877,24 +29826,32 @@
|
|
|
29877
29826
|
}),
|
|
29878
29827
|
}),
|
|
29879
29828
|
];
|
|
29880
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29881
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29882
|
-
this.address =
|
|
29829
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29830
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29831
|
+
this.address = googleResults.suggestion.value;
|
|
29883
29832
|
this.showMap = true;
|
|
29884
29833
|
this.persist();
|
|
29885
29834
|
};
|
|
29886
|
-
MapBackgroundFormLeftComponent.prototype.
|
|
29887
|
-
|
|
29888
|
-
|
|
29889
|
-
|
|
29890
|
-
|
|
29891
|
-
|
|
29892
|
-
|
|
29893
|
-
|
|
29894
|
-
|
|
29895
|
-
|
|
29896
|
-
|
|
29897
|
-
|
|
29835
|
+
MapBackgroundFormLeftComponent.prototype.handleAddressChange = function (event) {
|
|
29836
|
+
this.googleMapReturnElement = {
|
|
29837
|
+
suggestion: {
|
|
29838
|
+
latlng: {
|
|
29839
|
+
lat: event.geometry.location.lat(),
|
|
29840
|
+
lng: event.geometry.location.lng(),
|
|
29841
|
+
},
|
|
29842
|
+
value: event.name,
|
|
29843
|
+
},
|
|
29844
|
+
};
|
|
29845
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29846
|
+
};
|
|
29847
|
+
/**
|
|
29848
|
+
* Avoid partial map loaded at the initialization
|
|
29849
|
+
* @param map
|
|
29850
|
+
*/
|
|
29851
|
+
MapBackgroundFormLeftComponent.prototype.onMapReady = function (map) {
|
|
29852
|
+
setTimeout(function () {
|
|
29853
|
+
map.invalidateSize();
|
|
29854
|
+
}, 0);
|
|
29898
29855
|
};
|
|
29899
29856
|
MapBackgroundFormLeftComponent.prototype.selectThisForm = function () {
|
|
29900
29857
|
var _this = this;
|
|
@@ -29907,21 +29864,12 @@
|
|
|
29907
29864
|
this.contentBlock[FORM_NAME_ID_FORM] = this.selectedValue.id;
|
|
29908
29865
|
this.persist();
|
|
29909
29866
|
};
|
|
29910
|
-
/**
|
|
29911
|
-
* Avoid partial map loaded at the initialization
|
|
29912
|
-
* @param map
|
|
29913
|
-
*/
|
|
29914
|
-
MapBackgroundFormLeftComponent.prototype.onMapReady = function (map) {
|
|
29915
|
-
setTimeout(function () {
|
|
29916
|
-
map.invalidateSize();
|
|
29917
|
-
}, 0);
|
|
29918
|
-
};
|
|
29919
29867
|
return MapBackgroundFormLeftComponent;
|
|
29920
29868
|
}(StructuresComponent));
|
|
29921
29869
|
MapBackgroundFormLeftComponent.decorators = [
|
|
29922
29870
|
{ type: i0.Component, args: [{
|
|
29923
29871
|
selector: MapBackgroundFormLeftService.selector(),
|
|
29924
|
-
template: "<div class=\"wb-map-background-form-left\">\n <div class=\"wb-map-background-form-left__container__config\" *ngIf=\"showMap\">\n <wb-structure-config
|
|
29872
|
+
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"
|
|
29925
29873
|
},] }
|
|
29926
29874
|
];
|
|
29927
29875
|
MapBackgroundFormLeftComponent.ctorParameters = function () { return [
|
|
@@ -29937,7 +29885,9 @@
|
|
|
29937
29885
|
var _this = _super.call(this) || this;
|
|
29938
29886
|
_this.apiService = apiService;
|
|
29939
29887
|
_this.address = '';
|
|
29888
|
+
_this.triggerAddress = '';
|
|
29940
29889
|
_this.editPlaceMap = null;
|
|
29890
|
+
_this.firstTimeTrigger = false;
|
|
29941
29891
|
_this.options = {};
|
|
29942
29892
|
_this.layers = [];
|
|
29943
29893
|
_this.showMap = false;
|
|
@@ -29962,28 +29912,17 @@
|
|
|
29962
29912
|
}
|
|
29963
29913
|
});
|
|
29964
29914
|
};
|
|
29965
|
-
MapBackgroundFormRightComponent.prototype.
|
|
29966
|
-
var _this = this;
|
|
29967
|
-
var placesAutocomplete = places__default['default']({
|
|
29968
|
-
appId: 'pl9OI1NPY62Y',
|
|
29969
|
-
apiKey: '290e5a0e33e751c85c36690d502991fc',
|
|
29970
|
-
container: this.input.nativeElement,
|
|
29971
|
-
});
|
|
29972
|
-
placesAutocomplete.on('change', function (algoliaReturnElement) {
|
|
29973
|
-
_this.setCoordinateOnPlaces(algoliaReturnElement);
|
|
29974
|
-
});
|
|
29975
|
-
};
|
|
29976
|
-
MapBackgroundFormRightComponent.prototype.setCoordinateOnPlaces = function (algoliaReturnElement) {
|
|
29915
|
+
MapBackgroundFormRightComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29977
29916
|
this.showMap = false;
|
|
29978
29917
|
this.options = {
|
|
29979
|
-
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom:
|
|
29918
|
+
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29980
29919
|
zoom: 18,
|
|
29981
29920
|
zoomControl: false,
|
|
29982
|
-
center: leaflet.latLng(
|
|
29921
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29983
29922
|
};
|
|
29984
|
-
this.center = leaflet.latLng(
|
|
29923
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29985
29924
|
this.layers = [
|
|
29986
|
-
leaflet.marker([
|
|
29925
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29987
29926
|
icon: leaflet.icon({
|
|
29988
29927
|
iconSize: [25, 41],
|
|
29989
29928
|
iconAnchor: [13, 41],
|
|
@@ -29992,24 +29931,32 @@
|
|
|
29992
29931
|
}),
|
|
29993
29932
|
}),
|
|
29994
29933
|
];
|
|
29995
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29996
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29997
|
-
this.address =
|
|
29934
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29935
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29936
|
+
this.address = googleResults.suggestion.value;
|
|
29998
29937
|
this.showMap = true;
|
|
29999
29938
|
this.persist();
|
|
30000
29939
|
};
|
|
30001
|
-
MapBackgroundFormRightComponent.prototype.
|
|
30002
|
-
|
|
30003
|
-
|
|
30004
|
-
|
|
30005
|
-
|
|
30006
|
-
|
|
30007
|
-
|
|
30008
|
-
|
|
30009
|
-
|
|
30010
|
-
|
|
30011
|
-
|
|
30012
|
-
|
|
29940
|
+
MapBackgroundFormRightComponent.prototype.handleAddressChange = function (event) {
|
|
29941
|
+
this.googleMapReturnElement = {
|
|
29942
|
+
suggestion: {
|
|
29943
|
+
latlng: {
|
|
29944
|
+
lat: event.geometry.location.lat(),
|
|
29945
|
+
lng: event.geometry.location.lng(),
|
|
29946
|
+
},
|
|
29947
|
+
value: event.name,
|
|
29948
|
+
},
|
|
29949
|
+
};
|
|
29950
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29951
|
+
};
|
|
29952
|
+
/**
|
|
29953
|
+
* Avoid partial map loaded at the initialization
|
|
29954
|
+
* @param map
|
|
29955
|
+
*/
|
|
29956
|
+
MapBackgroundFormRightComponent.prototype.onMapReady = function (map) {
|
|
29957
|
+
setTimeout(function () {
|
|
29958
|
+
map.invalidateSize();
|
|
29959
|
+
}, 0);
|
|
30013
29960
|
};
|
|
30014
29961
|
MapBackgroundFormRightComponent.prototype.selectThisForm = function () {
|
|
30015
29962
|
var _this = this;
|
|
@@ -30022,21 +29969,12 @@
|
|
|
30022
29969
|
this.contentBlock[FORM_NAME_ID_FORM] = this.selectedValue.id;
|
|
30023
29970
|
this.persist();
|
|
30024
29971
|
};
|
|
30025
|
-
/**
|
|
30026
|
-
* Avoid partial map loaded at the initialization
|
|
30027
|
-
* @param map
|
|
30028
|
-
*/
|
|
30029
|
-
MapBackgroundFormRightComponent.prototype.onMapReady = function (map) {
|
|
30030
|
-
setTimeout(function () {
|
|
30031
|
-
map.invalidateSize();
|
|
30032
|
-
}, 0);
|
|
30033
|
-
};
|
|
30034
29972
|
return MapBackgroundFormRightComponent;
|
|
30035
29973
|
}(StructuresComponent));
|
|
30036
29974
|
MapBackgroundFormRightComponent.decorators = [
|
|
30037
29975
|
{ type: i0.Component, args: [{
|
|
30038
29976
|
selector: MapBackgroundFormRightService.selector(),
|
|
30039
|
-
template: "<div class=\"wb-map-background-form-right\">\n <div class=\"wb-map-background-form-right__container__config\" *ngIf=\"showMap\">\n <wb-structure-config
|
|
29977
|
+
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"
|
|
30040
29978
|
},] }
|
|
30041
29979
|
];
|
|
30042
29980
|
MapBackgroundFormRightComponent.ctorParameters = function () { return [
|
|
@@ -33202,6 +33140,7 @@
|
|
|
33202
33140
|
imports: [
|
|
33203
33141
|
SharedModule,
|
|
33204
33142
|
ngxMonacoEditor.MonacoEditorModule,
|
|
33143
|
+
ngxGooglePlacesAutocomplete.GooglePlaceModule,
|
|
33205
33144
|
ngxQuill.QuillModule,
|
|
33206
33145
|
ngxLeaflet.LeafletModule,
|
|
33207
33146
|
ngWiziBulma.NwbCommonModule,
|