{"version":3,"sources":["https://lively-kernel.org/lively4/BP2019RH1/components/bp2019-pane.js"],"names":["Windows","deepCopy","State","SelectAction","FilterAction","Bp2019Pane","initialize","childPanes","state","paneCloseButton","get","container","colorActionBar","filterActionBar","data","individualsSelection","parent","addEventListener","event","stopPropagation","setGeoData","detail","geoData","setData","selectAction","dataProcessor","colorStore","filterAction","setIncludeStop","setDataProcessor","updateState","applyState","fromState","propagateState","dispatchEvent","CustomEvent","sender","bubbles","applyActionFromTop","action","startingPane","getParent","applyAction","setParent","newParent","addVisualization","visualization","componentName","visualizationType","appendChild","_bindListeners","setColorStore","colorAction","inspectAction","localActions","forEach","_updateActionBar","child","setGlobalControlWidget","globalControlWidget","getData","getVisualizationType","getState","setState","getIndividualsSelection","setIndividualsSelection","addChild","push","updateStrokeStyle","strokeStyle","removeChild","index","indexOf","splice","deleteFreehandSelectionChildren","freehandSelection","i","length","color","selectionColor","onCloseButtonClicked","setTitleBarColor","style","background","setFocus","classList","remove","add","setLocalControls","removeFocus","unsetLocalControls","evt","pane","firstChild","lastChild","filters","_addFilterToActionBar","attribute","_addColoringToActionBar","filterActionDiv","filter","getAttribute","filterDiv","innerHTML","getFilterValues","join","coloringDiv","windowBarExtent","lively","getExtent","windowBarHeight","y","clearTimeout","resizeTimer","setTimeout","contentExtent","visualizationExtent","subPt","pt","setExtent","controlWidgetExtent","updateLocalActions"],"mappings":";;;;;;;;;;;AAAOA,a;;AACCC,c,gDAAAA,Q;;AACAC,W,sDAAAA,K;;AAECC,kB,kDAAAA,Y;AAAcC,kB,kDAAAA,Y;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAER,YAAMC,UAAN,SAAyBL,OAAzB,CAAiC;AAC9CM,qBAAa;AACX,gBAAMA,UAAN;AACA,eAAKC,UAAL,GAAkB,EAAlB;AACA,eAAKC,KAAL,GAAa,IAAIN,KAAJ,EAAb;AACA,eAAKO,eAAL,GAAuB,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K9F,gBAAL,CAAsB,uBAAtB,EAAgDC,KAAD,IAAW;AACxDA,kBAAMC,eAAN;AACA,iBAAKX,KAAL,CAAWiH,kBAAX,CAA8BvG,MAAMG,MAAN,CAAaiC,YAA3C;AACD,WAHD;AAID;AAtR6C;;yBAA3BjD,U","file":"bp2019-pane.js","sourcesContent":["import Windows from 'src/components/widgets/lively-window.js';\nimport {deepCopy} from \"../src/internal/individuals-as-points/common/utils.js\"\nimport {State} from \"../src/internal/individuals-as-points/common/actionState.js\"\n\nimport { SelectAction, FilterAction } from \"../src/internal/individuals-as-points/common/actions.js\"\n\nexport default class Bp2019Pane extends Windows {\n  initialize() {\n    super.initialize()\n    this.childPanes = []\n    this.state = new State()\n    this.paneCloseButton = this.get(\"#pane-close-button\")\n    this.container = this.get(\".window\")\n    this.colorActionBar = this.get(\"#color-action-bar\")\n    this.filterActionBar = this.get(\"#filter-action-bar\")\n    this.data = []\n    this.individualsSelection = {}\n    this.parent = \"parent\"\n    \n    this.addEventListener(\"data-loaded\", (event) => {\n      event.stopPropagation()\n      \n      this.setGeoData(event.detail.geoData)\n      this.setData(event.detail.data)\n      let selectAction = new SelectAction(new FilterAction(), event.detail.dataProcessor, event.detail.colorStore, true)\n      let filterAction = new FilterAction()\n      filterAction.setIncludeStop(false)\n      filterAction.setDataProcessor(event.detail.dataProcessor)\n      \n      this.state.updateState(event.detail.dataProcessor)\n      this.state.updateState(event.detail.colorStore)\n      this.state.updateState(event.detail.geoData)\n      this.state.updateState(selectAction)\n      this.state.updateState(filterAction)\n      \n      this.applyState(State.fromState(this.state))\n      this.propagateState(State.fromState(this.state))\n    })\n    \n    this.paneCloseButton.addEventListener(\"click\", () => {\n      this.dispatchEvent(new CustomEvent(\"click-pane-close-button\", {\n        detail: {\n          sender: this\n        },\n        bubbles: true \n      }))\n    })\n    \n    this.addEventListener(\"individual-inspected\", (event) => {\n      event.stopPropagation()\n      this.applyActionFromTop(event.detail.action)\n    })\n  }\n  \n  applyActionFromTop(action) {\n    let startingPane = this\n    \n    while(startingPane.getParent() !== \"parent\") {\n      startingPane = startingPane.getParent()\n    }\n    \n    startingPane.applyAction(action)\n  }\n  \n  getParent() {\n    return this.parent\n  }\n  \n  setParent(newParent) {\n    this.parent = newParent\n  }\n    \n  addVisualization(visualization, componentName) {\n    this.visualization = visualization\n    this.visualizationType = componentName\n    this.appendChild(visualization)\n    this._bindListeners()\n  }\n  \n  applyState(state) {\n    this.state = state\n    \n    if (this.visualization.setDataProcessor) {\n      this.visualization.setDataProcessor(this.state.dataProcessor)\n    }\n    if (this.visualization.setColorStore) {\n      this.visualization.setColorStore(this.state.colorStore)\n    }\n    if (this.visualization.setGeoData) {\n      this.visualization.setGeoData(this.state.geoData)\n    }\n    \n    this.visualization.applyAction(this.state.filterAction)\n    this.visualization.applyAction(this.state.selectAction)\n    this.visualization.applyAction(this.state.colorAction)\n    this.visualization.applyAction(this.state.inspectAction)\n    \n    this.state.localActions.forEach(action => this.visualization.applyAction(action))\n    \n    this._updateActionBar()\n  }\n  \n  propagateState(state) {\n    this.childPanes.forEach(child => {\n      child.applyState(State.fromState(state))\n      child.propagateState(State.fromState(state))\n    })\n  }\n  \n  setGeoData(geoData) {\n     if (this.visualization) {\n       if (typeof this.visualization.setGeoData === \"function\") {\n          this.visualization.setGeoData(deepCopy(geoData))\n       }\n    }\n    this.childPanes.forEach(child => {\n      child.setGeoData(deepCopy(geoData))\n    })\n  }\n  \n  async setData(data) {\n    this.data = deepCopy(data)\n    if (this.visualization) {\n      await this.visualization.setData(deepCopy(data))\n    }\n    this.childPanes.forEach(child => {\n      child.setData(deepCopy(data))\n    })\n  }\n  \n  setGlobalControlWidget(globalControlWidget) {\n    this.globalControlWidget = globalControlWidget\n  }\n  \n  getData() {\n    return this.data\n  }\n  \n  getVisualizationType() {\n    return this.visualizationType  \n  }\n  \n  getState() {\n    return this.state\n  }\n  \n  setState(state) {\n    this.state = deepCopy(state)\n    this._updateActionBar()\n  }\n  \n  getIndividualsSelection() {\n    return this.individualsSelection\n  }\n  \n  setIndividualsSelection(individualsSelection) {\n    this.individualsSelection = individualsSelection\n  }\n  \n  addChild(child) {\n    this.childPanes.push(child)\n  }\n  \n  updateStrokeStyle(strokeStyle) {\n    if (typeof this.visualization.updateStrokeStyle === \"function\") {\n      this.visualization.updateStrokeStyle(strokeStyle)\n    }\n  }\n  \n  removeChild(child) {\n    const index = this.childPanes.indexOf(child);\n    if (index > -1) {\n      this.childPanes.splice(index, 1);\n    }\n  }\n  \n  deleteFreehandSelectionChildren(freehandSelection) {\n    for (var i = this.childPanes.length - 1; i >= 0; i--) {\n      if (freehandSelection.color === this.childPanes[i].getIndividualsSelection().selectionColor) {\n        //color is chosen randomly, so it's actually not a completely safe way of identifying the panes\n        this.childPanes[i].onCloseButtonClicked()\n        this.removeChild(this.childPanes[i])\n      }\n    }\n  }\n\n  applyAction(action) {\n    this.state.updateState(deepCopy(action))\n    //this.applyState(this.state) //this.state\n    \n    this.visualization.applyAction(action)\n    this._updateActionBar()\n    \n    this.childPanes.forEach(child => child.applyAction(deepCopy(action)))\n  }\n  \n  setTitleBarColor(color) {\n    this.get(\".window-titlebar\").style.background = color\n  }\n  \n  setFocus() {\n    this.container.classList.remove(\"pane-unselected\")\n    this.container.classList.add(\"pane-selected\")\n    \n    if (typeof this.visualization.setLocalControls === \"function\") {\n        this.visualization.setLocalControls()\n    }\n  }\n  \n  removeFocus() {\n    this.container.classList.add(\"pane-unselected\")\n    this.container.classList.remove(\"pane-selected\")\n    \n    if (typeof this.visualization.setLocalControls === \"function\") {\n        this.visualization.unsetLocalControls()\n    }\n  }\n  \n  async onCloseButtonClicked(evt) {\n    this.childPanes.forEach(pane => pane.onCloseButtonClicked(evt))\n    super.onCloseButtonClicked(evt)\n  }\n  \n  _updateActionBar() {\n    while (this.filterActionBar.firstChild) {\n      this.filterActionBar.removeChild(this.filterActionBar.lastChild);\n    }\n    \n    while (this.colorActionBar.firstChild) {\n      this.colorActionBar.removeChild(this.colorActionBar.lastChild);\n    }\n    \n    if (this.state.filterAction.filters.length > 0) {\n      this._addFilterToActionBar(this.state.filterAction)\n    }\n    if (this.state.colorAction.attribute !== \"none\") {\n      this._addColoringToActionBar(this.state.colorAction)\n    }\n  }\n  \n  _addFilterToActionBar(filterAction) {\n    let filterActionDiv = <div></div>;\n    \n    filterAction.filters.forEach(filter => {\n      if (filter.getAttribute() === \"indexIDUnique\") return\n      \n      let filterDiv = <div></div>;\n      filterDiv.innerHTML = \"Filtered \" + filter.getAttribute() + \" by values \" + filter.getFilterValues().join(\", \")\n      \n      filterActionDiv.appendChild(filterDiv)\n    })\n    \n    this.filterActionBar.appendChild(filterActionDiv)\n  }\n  \n  _addColoringToActionBar(colorAction) {\n    let coloringDiv = <div></div>;\n    \n    coloringDiv.innerHTML = \"Colored by: \" + colorAction.attribute\n    \n    this.colorActionBar.appendChild(coloringDiv)\n  }\n  \n  _bindListeners() {\n    this.addEventListener(\"extent-changed\", () => {\n      let windowBarExtent = lively.getExtent(this.get(\".window-titlebar\"))\n      let windowBarHeight = windowBarExtent.y\n      clearTimeout(this.resizeTimer)\n      this.resizeTimer = setTimeout(() => {\n        let contentExtent = lively.getExtent(this)\n        // subtracting the window border and the height of the actionBar (10% of the content)\n        let visualizationExtent = contentExtent.subPt(lively.pt(0, contentExtent.y * 0.1)).subPt(lively.pt(10, 10)).subPt(lively.pt(0, windowBarHeight)) \n        this.visualization.setExtent(visualizationExtent) \n        if (this.globalControlWidget) {\n          let controlWidgetExtent = lively.getExtent(this)\n          this.globalControlWidget.setExtent(lively.pt(200, controlWidgetExtent.y))\n        }\n      }, 250);\n    })\n    \n    this.addEventListener(\"local-actions-changed\", (event) => {\n      event.stopPropagation()\n      this.state.updateLocalActions(event.detail.localActions)\n    })\n  }\n}"]}