@wizishop/wizi-block 4.2.33-beta → 4.2.36-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 +221 -277
- 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 +13 -8
- package/esm2015/lib/shared/components/editorjs/tools/paragraph/tool-type/text-edition.component.js +13 -13
- 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 +215 -261
- 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 +576 -571
- 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('
|
|
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', '
|
|
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
|
|
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,
|
|
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('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', '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['^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, 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;
|
|
@@ -20963,13 +20965,16 @@
|
|
|
20963
20965
|
};
|
|
20964
20966
|
InlineStyleTool.prototype.identicalAttributes = function (currentElement, nextElement) {
|
|
20965
20967
|
var currentElementAttributes = currentElement.getAttributeNames();
|
|
20966
|
-
|
|
20967
|
-
|
|
20968
|
-
if (
|
|
20969
|
-
|
|
20968
|
+
if (currentElementAttributes) {
|
|
20969
|
+
currentElementAttributes.forEach(function (attribute) {
|
|
20970
|
+
if (attribute !== 'style') {
|
|
20971
|
+
if (!nextElement.getAttribute(attribute) ||
|
|
20972
|
+
nextElement.getAttribute(attribute) !== currentElement.getAttribute(attribute)) {
|
|
20973
|
+
return false;
|
|
20974
|
+
}
|
|
20970
20975
|
}
|
|
20971
|
-
}
|
|
20972
|
-
}
|
|
20976
|
+
});
|
|
20977
|
+
}
|
|
20973
20978
|
return true;
|
|
20974
20979
|
};
|
|
20975
20980
|
InlineStyleTool.prototype.identicalInlineStyle = function (currentElement, nextElement) {
|
|
@@ -24618,6 +24623,9 @@
|
|
|
24618
24623
|
}(InlineTextTool));
|
|
24619
24624
|
textSizeTool.title = 'Text Size';
|
|
24620
24625
|
|
|
24626
|
+
// import { EditorView, basicSetup } from 'codemirror';
|
|
24627
|
+
// import { EditorState } from '@codemirror/state';
|
|
24628
|
+
// import { html } from '@codemirror/lang-html';
|
|
24621
24629
|
var TextEditionTool = /** @class */ (function (_super) {
|
|
24622
24630
|
__extends(TextEditionTool, _super);
|
|
24623
24631
|
function TextEditionTool() {
|
|
@@ -24689,15 +24697,15 @@
|
|
|
24689
24697
|
modal.appendChild(buttonContainer);
|
|
24690
24698
|
container.appendChild(modal);
|
|
24691
24699
|
document.body.appendChild(container);
|
|
24692
|
-
|
|
24693
|
-
|
|
24694
|
-
|
|
24695
|
-
});
|
|
24696
|
-
|
|
24697
|
-
|
|
24698
|
-
|
|
24699
|
-
});
|
|
24700
|
-
saveButton.addEventListener('click',
|
|
24700
|
+
// let state = EditorState.create({
|
|
24701
|
+
// doc: content,
|
|
24702
|
+
// extensions: [basicSetup, html()],
|
|
24703
|
+
// });
|
|
24704
|
+
// let view = new EditorView({
|
|
24705
|
+
// state: state,
|
|
24706
|
+
// parent: editorContainer,
|
|
24707
|
+
// });
|
|
24708
|
+
// saveButton.addEventListener('click', () => saveCodeEditModal(view.state.doc.toString()), true);
|
|
24701
24709
|
buttonContainer.appendChild(saveButton);
|
|
24702
24710
|
};
|
|
24703
24711
|
TextEditionTool.prototype.getSavedEditorContent = function (name) {
|
|
@@ -29374,19 +29382,15 @@
|
|
|
29374
29382
|
];
|
|
29375
29383
|
QuotesSimpleBackgroundComponent.ctorParameters = function () { return []; };
|
|
29376
29384
|
|
|
29377
|
-
var OpenMapDto = /** @class */ (function () {
|
|
29378
|
-
function OpenMapDto() {
|
|
29379
|
-
}
|
|
29380
|
-
return OpenMapDto;
|
|
29381
|
-
}());
|
|
29382
|
-
|
|
29383
29385
|
var MapFullpageComponent = /** @class */ (function (_super) {
|
|
29384
29386
|
__extends(MapFullpageComponent, _super);
|
|
29385
29387
|
function MapFullpageComponent(externalConfigService) {
|
|
29386
29388
|
var _this = _super.call(this) || this;
|
|
29387
29389
|
_this.externalConfigService = externalConfigService;
|
|
29388
29390
|
_this.address = '';
|
|
29391
|
+
_this.triggerAddress = '';
|
|
29389
29392
|
_this.editPlaceMap = null;
|
|
29393
|
+
_this.firstTimeTrigger = false;
|
|
29390
29394
|
_this.options = {};
|
|
29391
29395
|
_this.layers = [];
|
|
29392
29396
|
_this.showMap = false;
|
|
@@ -29396,41 +29400,29 @@
|
|
|
29396
29400
|
MapFullpageComponent.prototype.ngOnInit = function () {
|
|
29397
29401
|
_super.prototype.ngOnInit.call(this);
|
|
29398
29402
|
if (this.contentBlock[this.FORM_NAME_COORDINATE_Y] && this.contentBlock[this.FORM_NAME_COORDINATE_X]) {
|
|
29399
|
-
|
|
29400
|
-
|
|
29401
|
-
|
|
29402
|
-
|
|
29403
|
-
|
|
29403
|
+
this.googleMapReturnElement = {
|
|
29404
|
+
suggestion: {
|
|
29405
|
+
latlng: {
|
|
29406
|
+
lat: this.contentBlock[this.FORM_NAME_COORDINATE_Y],
|
|
29407
|
+
lng: this.contentBlock[this.FORM_NAME_COORDINATE_X],
|
|
29408
|
+
},
|
|
29409
|
+
value: '',
|
|
29404
29410
|
},
|
|
29405
|
-
value: '',
|
|
29406
29411
|
};
|
|
29407
|
-
this.setCoordinateOnPlaces(
|
|
29408
|
-
}
|
|
29409
|
-
};
|
|
29410
|
-
MapFullpageComponent.prototype.ngAfterViewInit = function () {
|
|
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
|
-
});
|
|
29412
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29421
29413
|
}
|
|
29422
29414
|
};
|
|
29423
|
-
MapFullpageComponent.prototype.setCoordinateOnPlaces = function (
|
|
29415
|
+
MapFullpageComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29424
29416
|
this.showMap = false;
|
|
29425
29417
|
this.options = {
|
|
29426
29418
|
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29427
29419
|
zoom: 18,
|
|
29428
29420
|
zoomControl: false,
|
|
29429
|
-
center: leaflet.latLng(
|
|
29421
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29430
29422
|
};
|
|
29431
|
-
this.center = leaflet.latLng(
|
|
29423
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29432
29424
|
this.layers = [
|
|
29433
|
-
leaflet.marker([
|
|
29425
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29434
29426
|
icon: leaflet.icon({
|
|
29435
29427
|
iconSize: [25, 41],
|
|
29436
29428
|
iconAnchor: [13, 41],
|
|
@@ -29439,24 +29431,23 @@
|
|
|
29439
29431
|
}),
|
|
29440
29432
|
}),
|
|
29441
29433
|
];
|
|
29442
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29443
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29444
|
-
this.address =
|
|
29434
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29435
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29436
|
+
this.address = googleResults.suggestion.value;
|
|
29445
29437
|
this.showMap = true;
|
|
29446
29438
|
this.persist();
|
|
29447
29439
|
};
|
|
29448
|
-
MapFullpageComponent.prototype.
|
|
29449
|
-
|
|
29450
|
-
|
|
29451
|
-
|
|
29452
|
-
|
|
29453
|
-
|
|
29454
|
-
|
|
29455
|
-
|
|
29456
|
-
|
|
29457
|
-
|
|
29458
|
-
|
|
29459
|
-
}
|
|
29440
|
+
MapFullpageComponent.prototype.handleAddressChange = function (event) {
|
|
29441
|
+
this.googleMapReturnElement = {
|
|
29442
|
+
suggestion: {
|
|
29443
|
+
latlng: {
|
|
29444
|
+
lat: event.geometry.location.lat(),
|
|
29445
|
+
lng: event.geometry.location.lng(),
|
|
29446
|
+
},
|
|
29447
|
+
value: event.name,
|
|
29448
|
+
},
|
|
29449
|
+
};
|
|
29450
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29460
29451
|
};
|
|
29461
29452
|
/**
|
|
29462
29453
|
* Avoid partial map loaded at the initialization
|
|
@@ -29472,7 +29463,7 @@
|
|
|
29472
29463
|
MapFullpageComponent.decorators = [
|
|
29473
29464
|
{ type: i0.Component, args: [{
|
|
29474
29465
|
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\"
|
|
29466
|
+
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
29467
|
},] }
|
|
29477
29468
|
];
|
|
29478
29469
|
MapFullpageComponent.ctorParameters = function () { return [
|
|
@@ -29488,7 +29479,9 @@
|
|
|
29488
29479
|
var _this = _super.call(this) || this;
|
|
29489
29480
|
_this.externalConfigService = externalConfigService;
|
|
29490
29481
|
_this.address = '';
|
|
29482
|
+
_this.triggerAddress = '';
|
|
29491
29483
|
_this.editPlaceMap = null;
|
|
29484
|
+
_this.firstTimeTrigger = false;
|
|
29492
29485
|
_this.options = {};
|
|
29493
29486
|
_this.layers = [];
|
|
29494
29487
|
_this.showMap = false;
|
|
@@ -29498,41 +29491,29 @@
|
|
|
29498
29491
|
MapLeftTextComponent.prototype.ngOnInit = function () {
|
|
29499
29492
|
_super.prototype.ngOnInit.call(this);
|
|
29500
29493
|
if (this.contentBlock[this.FORM_NAME_COORDINATE_Y] && this.contentBlock[this.FORM_NAME_COORDINATE_X]) {
|
|
29501
|
-
|
|
29502
|
-
|
|
29503
|
-
|
|
29504
|
-
|
|
29505
|
-
|
|
29494
|
+
this.googleMapReturnElement = {
|
|
29495
|
+
suggestion: {
|
|
29496
|
+
latlng: {
|
|
29497
|
+
lat: this.contentBlock[this.FORM_NAME_COORDINATE_Y],
|
|
29498
|
+
lng: this.contentBlock[this.FORM_NAME_COORDINATE_X],
|
|
29499
|
+
},
|
|
29500
|
+
value: '',
|
|
29506
29501
|
},
|
|
29507
|
-
value: '',
|
|
29508
29502
|
};
|
|
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
|
-
});
|
|
29503
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29523
29504
|
}
|
|
29524
29505
|
};
|
|
29525
|
-
MapLeftTextComponent.prototype.setCoordinateOnPlaces = function (
|
|
29506
|
+
MapLeftTextComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29526
29507
|
this.showMap = false;
|
|
29527
29508
|
this.options = {
|
|
29528
29509
|
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29529
29510
|
zoom: 18,
|
|
29530
29511
|
zoomControl: false,
|
|
29531
|
-
center: leaflet.latLng(
|
|
29512
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29532
29513
|
};
|
|
29533
|
-
this.center = leaflet.latLng(
|
|
29514
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29534
29515
|
this.layers = [
|
|
29535
|
-
leaflet.marker([
|
|
29516
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29536
29517
|
icon: leaflet.icon({
|
|
29537
29518
|
iconSize: [25, 41],
|
|
29538
29519
|
iconAnchor: [13, 41],
|
|
@@ -29541,24 +29522,23 @@
|
|
|
29541
29522
|
}),
|
|
29542
29523
|
}),
|
|
29543
29524
|
];
|
|
29544
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29545
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29546
|
-
this.address =
|
|
29525
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29526
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29527
|
+
this.address = googleResults.suggestion.value;
|
|
29547
29528
|
this.showMap = true;
|
|
29548
29529
|
this.persist();
|
|
29549
29530
|
};
|
|
29550
|
-
MapLeftTextComponent.prototype.
|
|
29551
|
-
|
|
29552
|
-
|
|
29553
|
-
|
|
29554
|
-
|
|
29555
|
-
|
|
29556
|
-
|
|
29557
|
-
|
|
29558
|
-
|
|
29559
|
-
|
|
29560
|
-
|
|
29561
|
-
}
|
|
29531
|
+
MapLeftTextComponent.prototype.handleAddressChange = function (event) {
|
|
29532
|
+
this.googleMapReturnElement = {
|
|
29533
|
+
suggestion: {
|
|
29534
|
+
latlng: {
|
|
29535
|
+
lat: event.geometry.location.lat(),
|
|
29536
|
+
lng: event.geometry.location.lng(),
|
|
29537
|
+
},
|
|
29538
|
+
value: event.name,
|
|
29539
|
+
},
|
|
29540
|
+
};
|
|
29541
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29562
29542
|
};
|
|
29563
29543
|
/**
|
|
29564
29544
|
* Avoid partial map loaded at the initialization
|
|
@@ -29574,7 +29554,7 @@
|
|
|
29574
29554
|
MapLeftTextComponent.decorators = [
|
|
29575
29555
|
{ type: i0.Component, args: [{
|
|
29576
29556
|
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
|
|
29557
|
+
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
29558
|
},] }
|
|
29579
29559
|
];
|
|
29580
29560
|
MapLeftTextComponent.ctorParameters = function () { return [
|
|
@@ -29590,7 +29570,9 @@
|
|
|
29590
29570
|
var _this = _super.call(this) || this;
|
|
29591
29571
|
_this.externalConfigService = externalConfigService;
|
|
29592
29572
|
_this.address = '';
|
|
29573
|
+
_this.triggerAddress = '';
|
|
29593
29574
|
_this.editPlaceMap = null;
|
|
29575
|
+
_this.firstTimeTrigger = false;
|
|
29594
29576
|
_this.options = {};
|
|
29595
29577
|
_this.layers = [];
|
|
29596
29578
|
_this.showMap = false;
|
|
@@ -29600,41 +29582,29 @@
|
|
|
29600
29582
|
MapRightTextComponent.prototype.ngOnInit = function () {
|
|
29601
29583
|
_super.prototype.ngOnInit.call(this);
|
|
29602
29584
|
if (this.contentBlock[this.FORM_NAME_COORDINATE_Y] && this.contentBlock[this.FORM_NAME_COORDINATE_X]) {
|
|
29603
|
-
|
|
29604
|
-
|
|
29605
|
-
|
|
29606
|
-
|
|
29607
|
-
|
|
29585
|
+
this.googleMapReturnElement = {
|
|
29586
|
+
suggestion: {
|
|
29587
|
+
latlng: {
|
|
29588
|
+
lat: this.contentBlock[this.FORM_NAME_COORDINATE_Y],
|
|
29589
|
+
lng: this.contentBlock[this.FORM_NAME_COORDINATE_X],
|
|
29590
|
+
},
|
|
29591
|
+
value: '',
|
|
29608
29592
|
},
|
|
29609
|
-
value: '',
|
|
29610
29593
|
};
|
|
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
|
-
});
|
|
29594
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29625
29595
|
}
|
|
29626
29596
|
};
|
|
29627
|
-
MapRightTextComponent.prototype.setCoordinateOnPlaces = function (
|
|
29597
|
+
MapRightTextComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29628
29598
|
this.showMap = false;
|
|
29629
29599
|
this.options = {
|
|
29630
29600
|
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29631
29601
|
zoom: 18,
|
|
29632
29602
|
zoomControl: false,
|
|
29633
|
-
center: leaflet.latLng(
|
|
29603
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29634
29604
|
};
|
|
29635
|
-
this.center = leaflet.latLng(
|
|
29605
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29636
29606
|
this.layers = [
|
|
29637
|
-
leaflet.marker([
|
|
29607
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29638
29608
|
icon: leaflet.icon({
|
|
29639
29609
|
iconSize: [25, 41],
|
|
29640
29610
|
iconAnchor: [13, 41],
|
|
@@ -29643,24 +29613,23 @@
|
|
|
29643
29613
|
}),
|
|
29644
29614
|
}),
|
|
29645
29615
|
];
|
|
29646
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29647
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29648
|
-
this.address =
|
|
29616
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29617
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29618
|
+
this.address = googleResults.suggestion.value;
|
|
29649
29619
|
this.showMap = true;
|
|
29650
29620
|
this.persist();
|
|
29651
29621
|
};
|
|
29652
|
-
MapRightTextComponent.prototype.
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
|
|
29663
|
-
}
|
|
29622
|
+
MapRightTextComponent.prototype.handleAddressChange = function (event) {
|
|
29623
|
+
this.googleMapReturnElement = {
|
|
29624
|
+
suggestion: {
|
|
29625
|
+
latlng: {
|
|
29626
|
+
lat: event.geometry.location.lat(),
|
|
29627
|
+
lng: event.geometry.location.lng(),
|
|
29628
|
+
},
|
|
29629
|
+
value: event.name,
|
|
29630
|
+
},
|
|
29631
|
+
};
|
|
29632
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29664
29633
|
};
|
|
29665
29634
|
/**
|
|
29666
29635
|
* Avoid partial map loaded at the initialization
|
|
@@ -29676,7 +29645,7 @@
|
|
|
29676
29645
|
MapRightTextComponent.decorators = [
|
|
29677
29646
|
{ type: i0.Component, args: [{
|
|
29678
29647
|
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
|
|
29648
|
+
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
29649
|
},] }
|
|
29681
29650
|
];
|
|
29682
29651
|
MapRightTextComponent.ctorParameters = function () { return [
|
|
@@ -29686,6 +29655,12 @@
|
|
|
29686
29655
|
input: [{ type: i0.ViewChild, args: ['myInput',] }]
|
|
29687
29656
|
};
|
|
29688
29657
|
|
|
29658
|
+
var OpenMapDto = /** @class */ (function () {
|
|
29659
|
+
function OpenMapDto() {
|
|
29660
|
+
}
|
|
29661
|
+
return OpenMapDto;
|
|
29662
|
+
}());
|
|
29663
|
+
|
|
29689
29664
|
var MapTextFormComponent = /** @class */ (function (_super) {
|
|
29690
29665
|
__extends(MapTextFormComponent, _super);
|
|
29691
29666
|
function MapTextFormComponent(apiService, externalConfigService) {
|
|
@@ -29693,7 +29668,9 @@
|
|
|
29693
29668
|
_this.apiService = apiService;
|
|
29694
29669
|
_this.externalConfigService = externalConfigService;
|
|
29695
29670
|
_this.address = '';
|
|
29671
|
+
_this.triggerAddress = '';
|
|
29696
29672
|
_this.editPlaceMap = null;
|
|
29673
|
+
_this.firstTimeTrigger = false;
|
|
29697
29674
|
_this.options = {};
|
|
29698
29675
|
_this.layers = [];
|
|
29699
29676
|
_this.showMap = false;
|
|
@@ -29729,30 +29706,17 @@
|
|
|
29729
29706
|
}
|
|
29730
29707
|
});
|
|
29731
29708
|
};
|
|
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) {
|
|
29709
|
+
MapTextFormComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29746
29710
|
this.showMap = false;
|
|
29747
29711
|
this.options = {
|
|
29748
|
-
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom:
|
|
29712
|
+
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29749
29713
|
zoom: 18,
|
|
29750
29714
|
zoomControl: false,
|
|
29751
|
-
center: leaflet.latLng(
|
|
29715
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29752
29716
|
};
|
|
29753
|
-
this.center = leaflet.latLng(
|
|
29717
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29754
29718
|
this.layers = [
|
|
29755
|
-
leaflet.marker([
|
|
29719
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29756
29720
|
icon: leaflet.icon({
|
|
29757
29721
|
iconSize: [25, 41],
|
|
29758
29722
|
iconAnchor: [13, 41],
|
|
@@ -29761,24 +29725,32 @@
|
|
|
29761
29725
|
}),
|
|
29762
29726
|
}),
|
|
29763
29727
|
];
|
|
29764
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29765
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29766
|
-
this.address =
|
|
29728
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29729
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29730
|
+
this.address = googleResults.suggestion.value;
|
|
29767
29731
|
this.showMap = true;
|
|
29768
29732
|
this.persist();
|
|
29769
29733
|
};
|
|
29770
|
-
MapTextFormComponent.prototype.
|
|
29771
|
-
|
|
29772
|
-
|
|
29773
|
-
|
|
29774
|
-
|
|
29775
|
-
|
|
29776
|
-
|
|
29777
|
-
|
|
29778
|
-
|
|
29779
|
-
|
|
29780
|
-
|
|
29781
|
-
|
|
29734
|
+
MapTextFormComponent.prototype.handleAddressChange = function (event) {
|
|
29735
|
+
this.googleMapReturnElement = {
|
|
29736
|
+
suggestion: {
|
|
29737
|
+
latlng: {
|
|
29738
|
+
lat: event.geometry.location.lat(),
|
|
29739
|
+
lng: event.geometry.location.lng(),
|
|
29740
|
+
},
|
|
29741
|
+
value: event.name,
|
|
29742
|
+
},
|
|
29743
|
+
};
|
|
29744
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29745
|
+
};
|
|
29746
|
+
/**
|
|
29747
|
+
* Avoid partial map loaded at the initialization
|
|
29748
|
+
* @param map
|
|
29749
|
+
*/
|
|
29750
|
+
MapTextFormComponent.prototype.onMapReady = function (map) {
|
|
29751
|
+
setTimeout(function () {
|
|
29752
|
+
map.invalidateSize();
|
|
29753
|
+
}, 0);
|
|
29782
29754
|
};
|
|
29783
29755
|
MapTextFormComponent.prototype.selectThisForm = function () {
|
|
29784
29756
|
var _this = this;
|
|
@@ -29791,21 +29763,12 @@
|
|
|
29791
29763
|
this.contentBlock[FORM_NAME_ID_FORM] = this.selectedValue.id;
|
|
29792
29764
|
this.persist();
|
|
29793
29765
|
};
|
|
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
29766
|
return MapTextFormComponent;
|
|
29804
29767
|
}(StructuresComponent));
|
|
29805
29768
|
MapTextFormComponent.decorators = [
|
|
29806
29769
|
{ type: i0.Component, args: [{
|
|
29807
29770
|
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
|
|
29771
|
+
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
29772
|
},] }
|
|
29810
29773
|
];
|
|
29811
29774
|
MapTextFormComponent.ctorParameters = function () { return [
|
|
@@ -29822,7 +29785,9 @@
|
|
|
29822
29785
|
var _this = _super.call(this) || this;
|
|
29823
29786
|
_this.apiService = apiService;
|
|
29824
29787
|
_this.address = '';
|
|
29788
|
+
_this.triggerAddress = '';
|
|
29825
29789
|
_this.editPlaceMap = null;
|
|
29790
|
+
_this.firstTimeTrigger = false;
|
|
29826
29791
|
_this.options = {};
|
|
29827
29792
|
_this.layers = [];
|
|
29828
29793
|
_this.showMap = false;
|
|
@@ -29847,28 +29812,17 @@
|
|
|
29847
29812
|
}
|
|
29848
29813
|
});
|
|
29849
29814
|
};
|
|
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) {
|
|
29815
|
+
MapBackgroundFormLeftComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29862
29816
|
this.showMap = false;
|
|
29863
29817
|
this.options = {
|
|
29864
|
-
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom:
|
|
29818
|
+
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29865
29819
|
zoom: 18,
|
|
29866
29820
|
zoomControl: false,
|
|
29867
|
-
center: leaflet.latLng(
|
|
29821
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29868
29822
|
};
|
|
29869
|
-
this.center = leaflet.latLng(
|
|
29823
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29870
29824
|
this.layers = [
|
|
29871
|
-
leaflet.marker([
|
|
29825
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29872
29826
|
icon: leaflet.icon({
|
|
29873
29827
|
iconSize: [25, 41],
|
|
29874
29828
|
iconAnchor: [13, 41],
|
|
@@ -29877,24 +29831,32 @@
|
|
|
29877
29831
|
}),
|
|
29878
29832
|
}),
|
|
29879
29833
|
];
|
|
29880
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29881
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29882
|
-
this.address =
|
|
29834
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29835
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29836
|
+
this.address = googleResults.suggestion.value;
|
|
29883
29837
|
this.showMap = true;
|
|
29884
29838
|
this.persist();
|
|
29885
29839
|
};
|
|
29886
|
-
MapBackgroundFormLeftComponent.prototype.
|
|
29887
|
-
|
|
29888
|
-
|
|
29889
|
-
|
|
29890
|
-
|
|
29891
|
-
|
|
29892
|
-
|
|
29893
|
-
|
|
29894
|
-
|
|
29895
|
-
|
|
29896
|
-
|
|
29897
|
-
|
|
29840
|
+
MapBackgroundFormLeftComponent.prototype.handleAddressChange = function (event) {
|
|
29841
|
+
this.googleMapReturnElement = {
|
|
29842
|
+
suggestion: {
|
|
29843
|
+
latlng: {
|
|
29844
|
+
lat: event.geometry.location.lat(),
|
|
29845
|
+
lng: event.geometry.location.lng(),
|
|
29846
|
+
},
|
|
29847
|
+
value: event.name,
|
|
29848
|
+
},
|
|
29849
|
+
};
|
|
29850
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29851
|
+
};
|
|
29852
|
+
/**
|
|
29853
|
+
* Avoid partial map loaded at the initialization
|
|
29854
|
+
* @param map
|
|
29855
|
+
*/
|
|
29856
|
+
MapBackgroundFormLeftComponent.prototype.onMapReady = function (map) {
|
|
29857
|
+
setTimeout(function () {
|
|
29858
|
+
map.invalidateSize();
|
|
29859
|
+
}, 0);
|
|
29898
29860
|
};
|
|
29899
29861
|
MapBackgroundFormLeftComponent.prototype.selectThisForm = function () {
|
|
29900
29862
|
var _this = this;
|
|
@@ -29907,21 +29869,12 @@
|
|
|
29907
29869
|
this.contentBlock[FORM_NAME_ID_FORM] = this.selectedValue.id;
|
|
29908
29870
|
this.persist();
|
|
29909
29871
|
};
|
|
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
29872
|
return MapBackgroundFormLeftComponent;
|
|
29920
29873
|
}(StructuresComponent));
|
|
29921
29874
|
MapBackgroundFormLeftComponent.decorators = [
|
|
29922
29875
|
{ type: i0.Component, args: [{
|
|
29923
29876
|
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
|
|
29877
|
+
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
29878
|
},] }
|
|
29926
29879
|
];
|
|
29927
29880
|
MapBackgroundFormLeftComponent.ctorParameters = function () { return [
|
|
@@ -29937,7 +29890,9 @@
|
|
|
29937
29890
|
var _this = _super.call(this) || this;
|
|
29938
29891
|
_this.apiService = apiService;
|
|
29939
29892
|
_this.address = '';
|
|
29893
|
+
_this.triggerAddress = '';
|
|
29940
29894
|
_this.editPlaceMap = null;
|
|
29895
|
+
_this.firstTimeTrigger = false;
|
|
29941
29896
|
_this.options = {};
|
|
29942
29897
|
_this.layers = [];
|
|
29943
29898
|
_this.showMap = false;
|
|
@@ -29962,28 +29917,17 @@
|
|
|
29962
29917
|
}
|
|
29963
29918
|
});
|
|
29964
29919
|
};
|
|
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) {
|
|
29920
|
+
MapBackgroundFormRightComponent.prototype.setCoordinateOnPlaces = function (googleResults) {
|
|
29977
29921
|
this.showMap = false;
|
|
29978
29922
|
this.options = {
|
|
29979
|
-
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom:
|
|
29923
|
+
layers: [leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'WiziShop' })],
|
|
29980
29924
|
zoom: 18,
|
|
29981
29925
|
zoomControl: false,
|
|
29982
|
-
center: leaflet.latLng(
|
|
29926
|
+
center: leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng),
|
|
29983
29927
|
};
|
|
29984
|
-
this.center = leaflet.latLng(
|
|
29928
|
+
this.center = leaflet.latLng(googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng);
|
|
29985
29929
|
this.layers = [
|
|
29986
|
-
leaflet.marker([
|
|
29930
|
+
leaflet.marker([googleResults.suggestion.latlng.lat, googleResults.suggestion.latlng.lng], {
|
|
29987
29931
|
icon: leaflet.icon({
|
|
29988
29932
|
iconSize: [25, 41],
|
|
29989
29933
|
iconAnchor: [13, 41],
|
|
@@ -29992,24 +29936,32 @@
|
|
|
29992
29936
|
}),
|
|
29993
29937
|
}),
|
|
29994
29938
|
];
|
|
29995
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_Y] =
|
|
29996
|
-
this.contentBlock[this.FORM_NAME_COORDINATE_X] =
|
|
29997
|
-
this.address =
|
|
29939
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_Y] = googleResults.suggestion.latlng.lat;
|
|
29940
|
+
this.contentBlock[this.FORM_NAME_COORDINATE_X] = googleResults.suggestion.latlng.lng;
|
|
29941
|
+
this.address = googleResults.suggestion.value;
|
|
29998
29942
|
this.showMap = true;
|
|
29999
29943
|
this.persist();
|
|
30000
29944
|
};
|
|
30001
|
-
MapBackgroundFormRightComponent.prototype.
|
|
30002
|
-
|
|
30003
|
-
|
|
30004
|
-
|
|
30005
|
-
|
|
30006
|
-
|
|
30007
|
-
|
|
30008
|
-
|
|
30009
|
-
|
|
30010
|
-
|
|
30011
|
-
|
|
30012
|
-
|
|
29945
|
+
MapBackgroundFormRightComponent.prototype.handleAddressChange = function (event) {
|
|
29946
|
+
this.googleMapReturnElement = {
|
|
29947
|
+
suggestion: {
|
|
29948
|
+
latlng: {
|
|
29949
|
+
lat: event.geometry.location.lat(),
|
|
29950
|
+
lng: event.geometry.location.lng(),
|
|
29951
|
+
},
|
|
29952
|
+
value: event.name,
|
|
29953
|
+
},
|
|
29954
|
+
};
|
|
29955
|
+
this.setCoordinateOnPlaces(this.googleMapReturnElement);
|
|
29956
|
+
};
|
|
29957
|
+
/**
|
|
29958
|
+
* Avoid partial map loaded at the initialization
|
|
29959
|
+
* @param map
|
|
29960
|
+
*/
|
|
29961
|
+
MapBackgroundFormRightComponent.prototype.onMapReady = function (map) {
|
|
29962
|
+
setTimeout(function () {
|
|
29963
|
+
map.invalidateSize();
|
|
29964
|
+
}, 0);
|
|
30013
29965
|
};
|
|
30014
29966
|
MapBackgroundFormRightComponent.prototype.selectThisForm = function () {
|
|
30015
29967
|
var _this = this;
|
|
@@ -30022,21 +29974,12 @@
|
|
|
30022
29974
|
this.contentBlock[FORM_NAME_ID_FORM] = this.selectedValue.id;
|
|
30023
29975
|
this.persist();
|
|
30024
29976
|
};
|
|
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
29977
|
return MapBackgroundFormRightComponent;
|
|
30035
29978
|
}(StructuresComponent));
|
|
30036
29979
|
MapBackgroundFormRightComponent.decorators = [
|
|
30037
29980
|
{ type: i0.Component, args: [{
|
|
30038
29981
|
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
|
|
29982
|
+
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
29983
|
},] }
|
|
30041
29984
|
];
|
|
30042
29985
|
MapBackgroundFormRightComponent.ctorParameters = function () { return [
|
|
@@ -33202,6 +33145,7 @@
|
|
|
33202
33145
|
imports: [
|
|
33203
33146
|
SharedModule,
|
|
33204
33147
|
ngxMonacoEditor.MonacoEditorModule,
|
|
33148
|
+
ngxGooglePlacesAutocomplete.GooglePlaceModule,
|
|
33205
33149
|
ngxQuill.QuillModule,
|
|
33206
33150
|
ngxLeaflet.LeafletModule,
|
|
33207
33151
|
ngWiziBulma.NwbCommonModule,
|