<commit_before>import { Component, OnInit, OnChanges, ElementRef, ViewChild, Renderer2 } from '@angular/core';

import { MapService } from '../../map.service';
import { ViewService } from '../../themes/default/view.service';
import { BasemapsService } from '../../map-widgets/basemaps.service';
import { ShareButtonService } from '../../services/share-button.service';
import { MapOptions } from '../../options';

import watchUtils = require("esri/core/watchUtils");

@Component({
  selector: 'esri-map-view',
  templateUrl: './app/components/common/map-view.component.html'
})
export class MapViewComponent implements OnInit, OnChanges {
	@ViewChild('mainContainer') mainContainer: ElementRef;
	@ViewChild('bar') bar: ElementRef;

  queryParams = { basemap: null };
  maintenanceOn = false;
  shareContainerActive: boolean = false;

  //sharing url string
  shareUrl: string;

	view: any;

  constructor(
		private el: ElementRef,
		private renderer2: Renderer2,
    private mapService: MapService,
		private viewService: ViewService,
    private basemapsService: BasemapsService,
    private shareButtonService: ShareButtonService) { }

  select(e) {
    e.target.select();
  }

  // toggle share container<commit_msg>add change detection onPush in apView component, to avoid leaks by Esri MapView getters and setters<commit_after>import { Component, OnInit, OnChanges, ChangeDetectionStrategy, ElementRef, ViewChild, Renderer2 } from '@angular/core';

import { MapService } from '../../map.service';
import { ViewService } from '../../themes/default/view.service';
import { BasemapsService } from '../../map-widgets/basemaps.service';
import { ShareButtonService } from '../../services/share-button.service';
import { MapOptions } from '../../options';

import watchUtils = require("esri/core/watchUtils");

// using onPuch change detection to avoid view ESRI UPDATES constanly initaiting change detection
@Component({
  selector: 'esri-map-view',
  changeDetection: ChangeDetectionStrategy.OnPush,
  templateUrl: './app/components/common/map-view.component.html'
})
export class MapViewComponent implements OnInit, OnChanges {
	@ViewChild('mainContainer') mainContainer: ElementRef;
	@ViewChild('bar') bar: ElementRef;

  queryParams = { basemap: null };
  maintenanceOn = false;
  shareContainerActive: boolean = false;

  //sharing url string
  shareUrl: string;

	view: any;

  constructor(
		private el: ElementRef,
		private renderer2: Renderer2,
    private mapService: MapService,
		private viewService: ViewService,
    private basemapsService: BasemapsService,
    private shareButtonService: ShareButtonService) { }

  select(e) {
    e.target.select();
  }

  // toggle share container
{'fraction_non_alphanumeric': 0.12703703703703703, 'fraction_numerical': 0.0022222222222222222, 'mean_word_length': 4.489837398373984, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5889578', 'n_tokens_mistral': 782, 'n_tokens_neox': 767, 'n_words': 206}