1 | {"version":3,"file":"farris-ide-devkit.js.map","sources":["ng://@farris/ide-devkit/lib/components/alert/alert.config.ts","ng://@farris/ide-devkit/lib/components/utils/decorators.ts","ng://@farris/ide-devkit/lib/components/alert/alert.component.ts","ng://@farris/ide-devkit/lib/components/alert/alert.module.ts","ng://@farris/ide-devkit/lib/components/tooltip/tooltip.config.ts","ng://@farris/ide-devkit/lib/components/utils/facade/browser.ts","ng://@farris/ide-devkit/lib/components/utils/theme-provider.ts","ng://@farris/ide-devkit/lib/components/tooltip/tooltip-container.component.ts","ng://@farris/ide-devkit/lib/components/utils/trigger.class.ts","ng://@farris/ide-devkit/lib/components/utils/triggers.ts","ng://@farris/ide-devkit/lib/components/utils/component-loader/content-ref.class.ts","ng://@farris/ide-devkit/lib/components/utils/component-loader/component-loader.class.ts","ng://@farris/ide-devkit/lib/components/utils/positioning/ng-positioning.ts","ng://@farris/ide-devkit/lib/components/utils/positioning/positioning.service.ts","ng://@farris/ide-devkit/lib/components/utils/component-loader/component-loader.factory.ts","ng://@farris/ide-devkit/lib/components/utils/warn-once.ts","ng://@farris/ide-devkit/lib/components/tooltip/tooltip.directive.ts","ng://@farris/ide-devkit/lib/components/tooltip/tooltip.module.ts","ng://@farris/ide-devkit/lib/components/modal/bs-modal-ref.service.ts","ng://@farris/ide-devkit/lib/components/modal/modal-backdrop.options.ts","ng://@farris/ide-devkit/lib/components/modal/modal-options.class.ts","ng://@farris/ide-devkit/lib/components/modal/modal-container.component.ts","ng://@farris/ide-devkit/lib/components/utils/utils.class.ts","ng://@farris/ide-devkit/lib/components/modal/modal-backdrop.component.ts","ng://@farris/ide-devkit/lib/components/modal/modal.directive.ts","ng://@farris/ide-devkit/lib/components/modal/bs-modal.service.ts","ng://@farris/ide-devkit/lib/components/modal/modal.module.ts","ng://@farris/ide-devkit/lib/components/navbar/navbar.state.ts","ng://@farris/ide-devkit/lib/components/dropdown/dropdown.config.ts","ng://@farris/ide-devkit/lib/components/dropdown/dropdown.state.ts","ng://@farris/ide-devkit/lib/components/utils/ng2-bootstrap-config.ts","ng://@farris/ide-devkit/lib/components/dropdown/dropdown-container.component.ts","ng://@farris/ide-devkit/lib/components/dropdown/dropdown.directive.ts","ng://@farris/ide-devkit/lib/components/dropdown/dropdown-menu.directive.ts","ng://@farris/ide-devkit/lib/components/dropdown/dropdown-toggle.directive.ts","ng://@farris/ide-devkit/lib/components/dropdown/dropdown-button.directive.ts","ng://@farris/ide-devkit/lib/components/dropdown/dropdown-item.directive.ts","ng://@farris/ide-devkit/lib/components/dropdown/dropdown.module.ts","ng://@farris/ide-devkit/lib/components/navbar/navbar.directive.ts","ng://@farris/ide-devkit/lib/components/navbar/navbar.module.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/constants/events.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/models/tree-node.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/models/tree-options.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/models/tree-model.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/constants/keys.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/components/tree/tree.component.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/directives/tree-node-content.directive.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/models/tree-node-content-item.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/components/tree-node-content/tree-node-content.component.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/components/tree-node/tree-node.component.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/components/tree-node-drop-slot/tree-node-drop-slot.component.ts","ng://@farris/ide-devkit/lib/components/ng2tree-common/tree.module.ts","ng://@farris/ide-devkit/lib/components/angular-editor/model/config.ts","ng://@farris/ide-devkit/lib/components/angular-editor/constant/events.ts","ng://@farris/ide-devkit/lib/components/angular-editor/service/code-editor.event.service.ts","ng://@farris/ide-devkit/lib/components/angular-editor/model/base-monaco-editor.ts","ng://@farris/ide-devkit/lib/components/angular-editor/service/angular-monaco-editor.service.ts","ng://@farris/ide-devkit/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.ts","ng://@farris/ide-devkit/lib/components/angular-editor/editor.module.ts","ng://@farris/ide-devkit/lib/components/ng2-right-click-menu/sh-context-menu-item.directive.ts","ng://@farris/ide-devkit/lib/components/ng2-right-click-menu/sh-context-menu.service.ts","ng://@farris/ide-devkit/lib/components/ng2-right-click-menu/sh-context-menu.component.ts","ng://@farris/ide-devkit/lib/components/ng2-right-click-menu/sh-attach-menu.directive.ts","ng://@farris/ide-devkit/lib/components/ng2-right-click-menu/sh-context-menu.module.ts","ng://@farris/ide-devkit/lib/components/wizard/component/wizard.component.ts","ng://@farris/ide-devkit/lib/components/wizard/wizard.module.ts","ng://@farris/ide-devkit/lib/components/popover/popover.config.ts","ng://@farris/ide-devkit/lib/components/popover/popover-container.component.ts","ng://@farris/ide-devkit/lib/components/popover/popover.directive.ts","ng://@farris/ide-devkit/lib/components/popover/popover.module.ts","ng://@farris/ide-devkit/lib/components/property-panel/entity/property-entity.ts","ng://@farris/ide-devkit/lib/components/property-panel/components/property-item/property-item.component.ts","ng://@farris/ide-devkit/lib/components/property-panel/components/property-item-list/property-item-list.component.ts","ng://@farris/ide-devkit/lib/components/property-panel/components/property-panel/property-panel.component.ts","ng://@farris/ide-devkit/lib/components/property-panel/property-panel.module.ts","ng://@farris/ide-devkit/lib/components/tabset/tabset-config.ts","ng://@farris/ide-devkit/lib/components/tabset/tabset.ts","ng://@farris/ide-devkit/lib/components/tabset/tabset.module.ts","ng://@farris/ide-devkit/lib/components/navtab/navtab-config.ts","ng://@farris/ide-devkit/lib/components/navtab/navtab.ts","ng://@farris/ide-devkit/lib/components/navtab/navtab.module.ts","ng://@farris/ide-devkit/lib/components/utils/util.ts","ng://@farris/ide-devkit/lib/components/accordion/accordion-config.ts","ng://@farris/ide-devkit/lib/components/accordion/accordion.ts","ng://@farris/ide-devkit/lib/components/accordion/accordion.module.ts","ng://@farris/ide-devkit/lib/components/panel/sash.directive.ts","ng://@farris/ide-devkit/lib/components/panel/panel.module.ts","ng://@farris/ide-devkit/lib/components/modules.ts","ng://@farris/ide-devkit/lib/components/utils/linked-list.class.ts","ng://@farris/ide-devkit/lib/ideframework/eventbus/event-bus-proxy.ts","ng://@farris/ide-devkit/lib/ideframework/eventbus/event-pipe.ts","ng://@farris/ide-devkit/lib/ideframework/eventbus/event-bus.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/model.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/pane-axis.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/event-kit/disposable.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/event-kit/composite-disposable.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/event-kit/emitter.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/pane.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/item-registry.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/pane-container.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/dock.ts","ng://@farris/ide-devkit/lib/services/cache/services/storage/cache.storage.abstract.service.ts","ng://@farris/ide-devkit/lib/services/cache/services/storage/sessionstorage/cache.sessionstorage.service.ts","ng://@farris/ide-devkit/lib/services/cache/services/storage/localstorage/cache.localstorage.service.ts","ng://@farris/ide-devkit/lib/services/cache/services/storage/memory/cache.memory.service.ts","ng://@farris/ide-devkit/lib/services/cache/services/cache.service.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/command-registry.ts","ng://@farris/ide-devkit/lib/ideframework/util/util.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/view-registry.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/panel-container.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/panel.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/workspace-center.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/workspace.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/gsp-event-bus.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/ide/modal-frm.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/ide/ide.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/gsp.ts","ng://@farris/ide-devkit/lib/ideframework/gsp/ide/messager.ts","ng://@farris/ide-devkit/lib/ideframework/package/package-view.ts","ng://@farris/ide-devkit/lib/ideframework/package/package.ts","ng://@farris/ide-devkit/lib/ideframework/package/package-module.ts","ng://@farris/ide-devkit/lib/services/cache/cache.module.ts","ng://@farris/ide-devkit/lib/services/http/http.service.ts","ng://@farris/ide-devkit/lib/services/http/http.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class AlertConfig {\r\n /** default alert type */\r\n type = 'warning';\r\n\r\n /** is alerts are dismissible by default */\r\n dismissible = false;\r\n\r\n /** default time before alert will dismiss */\r\n dismissOnTimeout?: number = undefined;\r\n}\r\n","/*tslint:disable:no-invalid-this */\r\nexport function OnChange(): any {\r\n const sufix = 'Change';\r\n return function OnChangeHandler(target: any, propertyKey: string): void {\r\n const _key = ` __${propertyKey}Value`;\r\n Object.defineProperty(target, propertyKey, {\r\n get(): any { return this[_key]; },\r\n set(value: any): void {\r\n const prevValue = this[_key];\r\n this[_key] = value;\r\n if (prevValue !== value && this[propertyKey + sufix]) {\r\n this[propertyKey + sufix].emit(value);\r\n }\r\n }\r\n });\r\n };\r\n}\r\n/* tslint:enable */\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnInit,\r\n Output\r\n} from '@angular/core';\r\nimport { AlertConfig } from './alert.config';\r\nimport { OnChange } from '../utils/decorators';\r\n\r\n@Component({\r\n selector: 'alert,bs-alert',\r\n templateUrl: './alert.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class AlertComponent implements OnInit {\r\n /** Alert type.\r\n * Provides one of four bootstrap supported contextual classes:\r\n * `success`, `info`, `warning` and `danger`\r\n */\r\n @Input() type = 'warning';\r\n /** If set, displays an inline \"Close\" button */\r\n @OnChange() @Input() dismissible = false;\r\n /** Number in milliseconds, after which alert will be closed */\r\n @Input() dismissOnTimeout: number | string;\r\n\r\n /** Is alert visible */\r\n @Input() isOpen = true;\r\n\r\n /** This event fires immediately after close instance method is called,\r\n * $event is an instance of Alert component.\r\n */\r\n @Output() onClose = new EventEmitter<AlertComponent>();\r\n /** This event fires when alert closed, $event is an instance of Alert component */\r\n @Output() onClosed = new EventEmitter<AlertComponent>();\r\n\r\n\r\n classes = '';\r\n dismissibleChange = new EventEmitter<boolean>();\r\n\r\n constructor(_config: AlertConfig, private changeDetection: ChangeDetectorRef) {\r\n Object.assign(this, _config);\r\n this.dismissibleChange.subscribe((dismissible: boolean) => {\r\n this.classes = this.dismissible ? 'alert-dismissible' : '';\r\n this.changeDetection.markForCheck();\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.dismissOnTimeout) {\r\n // if dismissOnTimeout used as attr without binding, it will be a string\r\n setTimeout(\r\n () => this.close(),\r\n parseInt(this.dismissOnTimeout as string, 10)\r\n );\r\n }\r\n }\r\n\r\n // todo: animation ` If the .fade and .in classes are present on the element,\r\n // the alert will fade out before it is removed`\r\n /**\r\n * Closes an alert by removing it from the DOM.\r\n */\r\n close(): void {\r\n if (!this.isOpen) {\r\n return;\r\n }\r\n\r\n this.onClose.emit(this);\r\n this.isOpen = false;\r\n this.changeDetection.markForCheck();\r\n this.onClosed.emit(this);\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { AlertComponent } from './alert.component';\r\nimport { AlertConfig } from './alert.config';\r\n\r\n@NgModule({\r\n imports: [CommonModule],\r\n declarations: [AlertComponent],\r\n exports: [AlertComponent],\r\n entryComponents: [AlertComponent]\r\n})\r\nexport class AlertModule {\r\n static forRoot(): ModuleWithProviders {\r\n return { ngModule: AlertModule, providers: [AlertConfig] };\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n/** Default values provider for tooltip */\r\n@Injectable()\r\nexport class TooltipConfig {\r\n /** tooltip placement, supported positions: 'top', 'bottom', 'left', 'right' */\r\n placement = 'top';\r\n /** array of event names which triggers tooltip opening */\r\n triggers = 'hover focus';\r\n /** a selector specifying the element the tooltip should be appended to. Currently only supports \"body\" */\r\n container: string;\r\n}\r\n","/*tslint:disable */\r\n/**\r\n * @license\r\n * Copyright Google Inc. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://angular.io/license\r\n */\r\n\r\n/**\r\n * JS version of browser APIs. This library can only run in the browser.\r\n */\r\nvar win = (typeof window !== 'undefined' && window) || <any>{};\r\n\r\nexport { win as window };\r\nexport var document = win.document;\r\nexport var location = win.location;\r\nexport var gc = win['gc'] ? () => win['gc']() : (): any => null;\r\nexport var performance = win['performance'] ? win['performance'] : null;\r\nexport const Event = win['Event'];\r\nexport const MouseEvent = win['MouseEvent'];\r\nexport const KeyboardEvent = win['KeyboardEvent'];\r\nexport const EventTarget = win['EventTarget'];\r\nexport const History = win['History'];\r\nexport const Location = win['Location'];\r\nexport const EventListener = win['EventListener'];\r\n","import { window } from './facade/browser';\r\n\r\nlet guessedVersion: 'bs3' | 'bs4';\r\n\r\nfunction _guessBsVersion(): 'bs3' | 'bs4' {\r\n if (typeof document === 'undefined') {\r\n return null;\r\n }\r\n const spanEl = document.createElement('span');\r\n spanEl.innerText = 'test bs version';\r\n document.body.appendChild(spanEl);\r\n spanEl.classList.add('d-none');\r\n const rect = spanEl.getBoundingClientRect();\r\n document.body.removeChild(spanEl);\r\n if (!rect) {\r\n return 'bs3';\r\n }\r\n\r\n return rect.top === 0 ? 'bs4' : 'bs3';\r\n}\r\n\r\nexport function setTheme(theme: 'bs3' | 'bs4'): void {\r\n guessedVersion = theme;\r\n}\r\n\r\n// todo: in ngx-bootstrap, bs4 will became a default one\r\nexport function isBs3(): boolean {\r\n if (typeof window === 'undefined') {\r\n return true;\r\n }\r\n\r\n if (typeof window.__theme === 'undefined') {\r\n if (guessedVersion) {\r\n return guessedVersion === 'bs3';\r\n }\r\n guessedVersion = _guessBsVersion();\r\n\r\n return guessedVersion === 'bs3';\r\n }\r\n\r\n return window.__theme !== 'bs4';\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ChangeDetectionStrategy\r\n} from '@angular/core';\r\nimport { TooltipConfig } from './tooltip.config';\r\nimport { isBs3 } from '../utils/theme-provider';\r\n\r\n@Component({\r\n selector: 'bs-tooltip-container',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n // tslint:disable-next-line\r\n host: {\r\n '[class]':\r\n '\"tooltip in tooltip-\" + placement + \" \" + \"bs-tooltip-\" + placement + \" \" + placement + \" \" + containerClass',\r\n '[class.show]': '!isBs3',\r\n role: 'tooltip'\r\n },\r\n styles: [\r\n `\r\n :host.tooltip {\r\n display: block;\r\n }\r\n :host.bs-tooltip-top .arrow, :host.bs-tooltip-bottom .arrow {\r\n left: 50%;\r\n margin-left: -6px;\r\n }\r\n :host.bs-tooltip-left .arrow, :host.bs-tooltip-right .arrow {\r\n top: 50%;\r\n margin-top: -6px;\r\n }\r\n `\r\n ],\r\n template: `\r\n <div class=\"tooltip-arrow arrow\"></div>\r\n <div class=\"tooltip-inner\"><ng-content></ng-content></div>\r\n `\r\n})\r\nexport class TooltipContainerComponent implements AfterViewInit {\r\n classMap: any;\r\n placement: string;\r\n containerClass: string;\r\n animation: boolean;\r\n\r\n get isBs3(): boolean {\r\n return isBs3();\r\n }\r\n\r\n constructor(config: TooltipConfig) {\r\n Object.assign(this, config);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.classMap = { in: false, fade: false };\r\n this.classMap[this.placement] = true;\r\n this.classMap[`tooltip-${this.placement}`] = true;\r\n\r\n this.classMap.in = true;\r\n if (this.animation) {\r\n this.classMap.fade = true;\r\n }\r\n\r\n if (this.containerClass) {\r\n this.classMap[this.containerClass] = true;\r\n }\r\n }\r\n}\r\n","/**\r\n * @copyright Valor Software\r\n * @copyright Angular ng-bootstrap team\r\n */\r\n\r\n export class Trigger {\r\n public open: string;\r\n public close?: string;\r\n\r\n public constructor(open: string, close?: string) {\r\n this.open = open;\r\n this.close = close || open;\r\n }\r\n\r\n public isManual(): boolean { return this.open === 'manual' || this.close === 'manual'; }\r\n }\r\n","/**\r\n * @copyright Valor Software\r\n * @copyright Angular ng-bootstrap team\r\n */\r\nimport { Renderer2 } from '@angular/core';\r\nimport { Trigger } from './trigger.class';\r\nimport {\r\n BsEventCallback, ListenOptions\r\n} from './component-loader/listen-options.model';\r\n\r\nconst DEFAULT_ALIASES = {\r\n hover: ['mouseover', 'mouseout'],\r\n focus: ['focusin', 'focusout']\r\n};\r\n\r\nexport function parseTriggers(triggers: string, aliases: any = DEFAULT_ALIASES): Trigger[] {\r\n const trimmedTriggers = (triggers || '').trim();\r\n\r\n if (trimmedTriggers.length === 0) {\r\n return [];\r\n }\r\n\r\n const parsedTriggers = trimmedTriggers\r\n .split(/\\s+/)\r\n .map((trigger: string) => trigger.split(':'))\r\n .map((triggerPair: string[]) => {\r\n const alias = aliases[triggerPair[0]] || triggerPair;\r\n\r\n return new Trigger(alias[0], alias[1]);\r\n });\r\n\r\n const manualTriggers = parsedTriggers.filter((triggerPair: Trigger) =>\r\n triggerPair.isManual()\r\n );\r\n\r\n if (manualTriggers.length > 1) {\r\n throw new Error('Triggers parse error: only one manual trigger is allowed');\r\n }\r\n\r\n if (manualTriggers.length === 1 && parsedTriggers.length > 1) {\r\n throw new Error('Triggers parse error: manual trigger can\\'t be mixed with other triggers');\r\n }\r\n\r\n return parsedTriggers;\r\n}\r\n\r\nexport function listenToTriggers(renderer: Renderer2,\r\n target: any,\r\n triggers: string,\r\n showFn: BsEventCallback,\r\n hideFn: BsEventCallback,\r\n toggleFn: BsEventCallback): Function {\r\n const parsedTriggers = parseTriggers(triggers);\r\n const listeners: any[] = [];\r\n\r\n if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {\r\n return Function.prototype;\r\n }\r\n\r\n parsedTriggers.forEach((trigger: Trigger) => {\r\n if (trigger.open === trigger.close) {\r\n listeners.push(renderer.listen(target, trigger.open, toggleFn));\r\n\r\n return;\r\n }\r\n\r\n listeners.push(\r\n renderer.listen(target, trigger.open, showFn),\r\n renderer.listen(target, trigger.close, hideFn)\r\n );\r\n });\r\n\r\n return () => {\r\n listeners.forEach((unsubscribeFn: Function) => unsubscribeFn());\r\n };\r\n}\r\n\r\nexport function listenToTriggersV2(renderer: Renderer2,\r\n options: ListenOptions): Function {\r\n const parsedTriggers = parseTriggers(options.triggers);\r\n const target = options.target;\r\n // do nothing\r\n if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {\r\n return Function.prototype;\r\n }\r\n\r\n // all listeners\r\n const listeners: any[] = [];\r\n\r\n // lazy listeners registration\r\n const _registerHide: Function[] = [];\r\n const registerHide = () => {\r\n // add hide listeners to unregister array\r\n _registerHide.forEach((fn: Function) => listeners.push(fn()));\r\n // register hide events only once\r\n _registerHide.length = 0;\r\n };\r\n\r\n // register open\\close\\toggle listeners\r\n parsedTriggers.forEach((trigger: Trigger) => {\r\n const useToggle = trigger.open === trigger.close;\r\n const showFn = useToggle ? options.toggle : options.show;\r\n\r\n if (!useToggle) {\r\n _registerHide.push(() =>\r\n renderer.listen(target, trigger.close, options.hide)\r\n );\r\n }\r\n\r\n listeners.push(\r\n renderer.listen(target, trigger.open, () => showFn(registerHide))\r\n );\r\n });\r\n\r\n return () => {\r\n listeners.forEach((unsubscribeFn: Function) => unsubscribeFn());\r\n };\r\n}\r\n\r\nexport function registerOutsideClick(renderer: Renderer2,\r\n options: ListenOptions) {\r\n if (!options.outsideClick) {\r\n return Function.prototype;\r\n }\r\n\r\n return renderer.listen('document', 'click', (event: any) => {\r\n if (options.target && options.target.contains(event.target)) {\r\n return;\r\n }\r\n if (\r\n options.targets &&\r\n options.targets.some(target => target.contains(event.target))\r\n ) {\r\n return;\r\n }\r\n\r\n options.hide();\r\n });\r\n}\r\n","/**\r\n * @copyright Valor Software\r\n * @copyright Angular ng-bootstrap team\r\n */\r\n\r\n import { ComponentRef, ViewRef } from '@angular/core';\r\n\r\n export class ContentRef {\r\n public nodes: any[];\r\n public viewRef?: ViewRef;\r\n public componentRef?: ComponentRef<any>;\r\n\r\n public constructor(\r\n nodes: any[],\r\n viewRef?: ViewRef,\r\n componentRef?: ComponentRef<any>\r\n ) {\r\n this.nodes = nodes;\r\n this.viewRef = viewRef;\r\n this.componentRef = componentRef;\r\n }\r\n }\r\n","// tslint:disable:max-file-line-count\r\n// todo: add delay support\r\n// todo: merge events onShow, onShown, etc...\r\n// todo: add global positioning configuration?\r\nimport {\r\n ApplicationRef,\r\n ComponentFactory,\r\n ComponentFactoryResolver,\r\n ComponentRef,\r\n ElementRef,\r\n EmbeddedViewRef,\r\n EventEmitter,\r\n Injector,\r\n NgZone,\r\n Provider,\r\n ReflectiveInjector,\r\n Renderer2,\r\n TemplateRef,\r\n Type,\r\n ViewContainerRef\r\n} from '@angular/core';\r\nimport { PositioningOptions, PositioningService } from '../positioning/index';\r\nimport { listenToTriggersV2, registerOutsideClick } from '../triggers';\r\nimport { ContentRef } from './content-ref.class';\r\nimport { ListenOptions } from './listen-options.model';\r\n\r\nexport class ComponentLoader<T> {\r\n onBeforeShow: EventEmitter<any> = new EventEmitter();\r\n onShown: EventEmitter<any> = new EventEmitter();\r\n onBeforeHide: EventEmitter<any> = new EventEmitter();\r\n onHidden: EventEmitter<any> = new EventEmitter();\r\n\r\n instance: T;\r\n _componentRef: ComponentRef<T>;\r\n _inlineViewRef: EmbeddedViewRef<T>;\r\n\r\n private _providers: Provider[] = [];\r\n private _componentFactory: ComponentFactory<T>;\r\n private _zoneSubscription: any;\r\n private _contentRef: ContentRef;\r\n private _innerComponent: ComponentRef<T>;\r\n\r\n private _unregisterListenersFn: Function;\r\n\r\n get isShown(): boolean {\r\n if (this._isHiding) {\r\n return false;\r\n }\r\n\r\n return !!this._componentRef;\r\n }\r\n\r\n private _isHiding = false;\r\n\r\n /**\r\n * Placement of a component. Accepts: \"top\", \"bottom\", \"left\", \"right\"\r\n */\r\n private attachment: string;\r\n\r\n /**\r\n * A selector specifying the element the popover should be appended to.\r\n * Currently only supports \"body\".\r\n */\r\n private container: string | ElementRef | any;\r\n\r\n /**\r\n * Specifies events that should trigger. Supports a space separated list of\r\n * event names.\r\n */\r\n private triggers: string;\r\n\r\n private _listenOpts: ListenOptions = {};\r\n private _globalListener = Function.prototype;\r\n\r\n /**\r\n * Do not use this directly, it should be instanced via\r\n * `ComponentLoadFactory.attach`\r\n * @internal\r\n */\r\n // tslint:disable-next-line\r\n public constructor(\r\n private _viewContainerRef: ViewContainerRef,\r\n private _renderer: Renderer2,\r\n private _elementRef: ElementRef,\r\n private _injector: Injector,\r\n private _componentFactoryResolver: ComponentFactoryResolver,\r\n private _ngZone: NgZone,\r\n private _applicationRef: ApplicationRef,\r\n private _posService: PositioningService\r\n ) {}\r\n\r\n attach(compType: Type<T>): ComponentLoader<T> {\r\n this._componentFactory = this._componentFactoryResolver\r\n .resolveComponentFactory<T>(compType);\r\n\r\n return this;\r\n }\r\n\r\n // todo: add behaviour: to target element, `body`, custom element\r\n to(container?: string): ComponentLoader<T> {\r\n this.container = container || this.container;\r\n\r\n return this;\r\n }\r\n\r\n position(opts?: PositioningOptions): ComponentLoader<T> {\r\n this.attachment = opts.attachment || this.attachment;\r\n this._elementRef = (opts.target as ElementRef) || this._elementRef;\r\n\r\n return this;\r\n }\r\n\r\n provide(provider: Provider): ComponentLoader<T> {\r\n this._providers.push(provider);\r\n\r\n return this;\r\n }\r\n\r\n // todo: appendChild to element or document.querySelector(this.container)\r\n\r\n show(opts: {\r\n content?: string | TemplateRef<any>;\r\n context?: any;\r\n initialState?: any; [key: string]: any;\r\n } = {}\r\n ): ComponentRef<T> {\r\n\r\n this._subscribePositioning();\r\n this._innerComponent = null;\r\n\r\n if (!this._componentRef) {\r\n this.onBeforeShow.emit();\r\n this._contentRef = this._getContentRef(opts.content, opts.context, opts.initialState);\r\n const injector = ReflectiveInjector.resolveAndCreate(this._providers, this._injector);\r\n\r\n this._componentRef = this._componentFactory.create(injector, this._contentRef.nodes);\r\n this._applicationRef.attachView(this._componentRef.hostView);\r\n // this._componentRef = this._viewContainerRef\r\n // .createComponent(this._componentFactory, 0, injector, this._contentRef.nodes);\r\n this.instance = this._componentRef.instance;\r\n\r\n Object.assign(this._componentRef.instance, opts);\r\n\r\n if (this.container instanceof ElementRef) {\r\n this.container.nativeElement.appendChild(\r\n this._componentRef.location.nativeElement\r\n );\r\n }\r\n\r\n if (this.container === 'body' && typeof document !== 'undefined') {\r\n document\r\n .querySelector(this.container as string)\r\n .appendChild(this._componentRef.location.nativeElement);\r\n }\r\n\r\n if (\r\n !this.container &&\r\n this._elementRef &&\r\n this._elementRef.nativeElement.parentElement\r\n ) {\r\n this._elementRef.nativeElement.parentElement.appendChild(\r\n this._componentRef.location.nativeElement\r\n );\r\n }\r\n\r\n // we need to manually invoke change detection since events registered\r\n // via\r\n // Renderer::listen() are not picked up by change detection with the\r\n // OnPush strategy\r\n if (this._contentRef.componentRef) {\r\n this._innerComponent = this._contentRef.componentRef.instance;\r\n this._contentRef.componentRef.changeDetectorRef.markForCheck();\r\n this._contentRef.componentRef.changeDetectorRef.detectChanges();\r\n }\r\n this._componentRef.changeDetectorRef.markForCheck();\r\n this._componentRef.changeDetectorRef.detectChanges();\r\n this.onShown.emit(this._componentRef.instance);\r\n }\r\n\r\n this._registerOutsideClick();\r\n\r\n return this._componentRef;\r\n }\r\n\r\n hide(): ComponentLoader<T> {\r\n if (!this._componentRef) {\r\n return this;\r\n }\r\n\r\n this.onBeforeHide.emit(this._componentRef.instance);\r\n\r\n const componentEl = this._componentRef.location.nativeElement;\r\n componentEl.parentNode.removeChild(componentEl);\r\n if (this._contentRef.componentRef) {\r\n this._contentRef.componentRef.destroy();\r\n }\r\n this._componentRef.destroy();\r\n if (this._viewContainerRef && this._contentRef.viewRef) {\r\n this._viewContainerRef.remove(\r\n this._viewContainerRef.indexOf(this._contentRef.viewRef)\r\n );\r\n }\r\n if (this._contentRef.viewRef) {\r\n this._contentRef.viewRef.destroy();\r\n }\r\n // this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._componentRef.hostView));\r\n //\r\n // if (this._contentRef.viewRef && this._viewContainerRef.indexOf(this._contentRef.viewRef) !== -1) {\r\n // this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef));\r\n // }\r\n\r\n this._contentRef = null;\r\n this._componentRef = null;\r\n this._removeGlobalListener();\r\n\r\n this.onHidden.emit();\r\n\r\n return this;\r\n }\r\n\r\n toggle(): void {\r\n if (this.isShown) {\r\n this.hide();\r\n\r\n return;\r\n }\r\n\r\n this.show();\r\n }\r\n\r\n dispose(): void {\r\n if (this.isShown) {\r\n this.hide();\r\n }\r\n\r\n this._unsubscribePositioning();\r\n\r\n if (this._unregisterListenersFn) {\r\n this._unregisterListenersFn();\r\n }\r\n }\r\n\r\n listen(listenOpts: ListenOptions): ComponentLoader<T> {\r\n this.triggers = listenOpts.triggers || this.triggers;\r\n this._listenOpts.outsideClick = listenOpts.outsideClick;\r\n listenOpts.target = listenOpts.target || this._elementRef.nativeElement;\r\n\r\n const hide = (this._listenOpts.hide = () =>\r\n listenOpts.hide ? listenOpts.hide() : void this.hide());\r\n const show = (this._listenOpts.show = (registerHide: Function) => {\r\n listenOpts.show ? listenOpts.show(registerHide) : this.show(registerHide);\r\n registerHide();\r\n });\r\n\r\n const toggle = (registerHide: Function) => {\r\n this.isShown ? hide() : show(registerHide);\r\n };\r\n\r\n this._unregisterListenersFn = listenToTriggersV2(this._renderer, {\r\n target: listenOpts.target,\r\n triggers: listenOpts.triggers,\r\n show,\r\n hide,\r\n toggle\r\n });\r\n\r\n return this;\r\n }\r\n\r\n _removeGlobalListener() {\r\n if (this._globalListener) {\r\n this._globalListener();\r\n this._globalListener = null;\r\n }\r\n }\r\n\r\n attachInline(\r\n vRef: ViewContainerRef,\r\n template: TemplateRef<any>\r\n ): ComponentLoader<T> {\r\n this._inlineViewRef = vRef.createEmbeddedView(template);\r\n\r\n return this;\r\n }\r\n\r\n _registerOutsideClick(): void {\r\n if (!this._componentRef || !this._componentRef.location) {\r\n return;\r\n }\r\n // why: should run after first event bubble\r\n if (this._listenOpts.outsideClick) {\r\n const target = this._componentRef.location.nativeElement;\r\n setTimeout(() => {\r\n this._globalListener = registerOutsideClick(this._renderer, {\r\n targets: [target, this._elementRef.nativeElement],\r\n outsideClick: this._listenOpts.outsideClick,\r\n hide: () => this._listenOpts.hide()\r\n });\r\n });\r\n }\r\n }\r\n\r\n getInnerComponent(): ComponentRef<T> {\r\n return this._innerComponent;\r\n }\r\n\r\n private _subscribePositioning(): void {\r\n if (this._zoneSubscription || !this.attachment) {\r\n return;\r\n }\r\n\r\n this._zoneSubscription = this._ngZone.onStable.subscribe(() => {\r\n if (!this._componentRef) {\r\n return;\r\n }\r\n this._posService.position({\r\n element: this._componentRef.location,\r\n target: this._elementRef,\r\n attachment: this.attachment,\r\n appendToBody: this.container === 'body'\r\n });\r\n });\r\n }\r\n\r\n private _unsubscribePositioning(): void {\r\n if (!this._zoneSubscription) {\r\n return;\r\n }\r\n this._zoneSubscription.unsubscribe();\r\n this._zoneSubscription = null;\r\n }\r\n\r\n private _getContentRef(\r\n content: string | TemplateRef<any> | any,\r\n context?: any,\r\n initialState?: any\r\n ): ContentRef {\r\n if (!content) {\r\n return new ContentRef([]);\r\n }\r\n\r\n if (content instanceof TemplateRef) {\r\n if (this._viewContainerRef) {\r\n const _viewRef = this._viewContainerRef\r\n .createEmbeddedView<TemplateRef<T>>(content, context);\r\n _viewRef.markForCheck();\r\n\r\n return new ContentRef([_viewRef.rootNodes], _viewRef);\r\n }\r\n const viewRef = content.createEmbeddedView({});\r\n this._applicationRef.attachView(viewRef);\r\n\r\n return new ContentRef([viewRef.rootNodes], viewRef);\r\n }\r\n\r\n if (typeof content === 'function') {\r\n const contentCmptFactory = this._componentFactoryResolver.resolveComponentFactory(\r\n content\r\n );\r\n const modalContentInjector = ReflectiveInjector.resolveAndCreate(\r\n [...this._providers],\r\n this._injector\r\n );\r\n const componentRef = contentCmptFactory.create(modalContentInjector);\r\n Object.assign(componentRef.instance, initialState);\r\n this._applicationRef.attachView(componentRef.hostView);\r\n\r\n return new ContentRef(\r\n [[componentRef.location.nativeElement]],\r\n componentRef.hostView,\r\n componentRef\r\n );\r\n }\r\n\r\n // æ¯æä¼ å
¥çcontentæ¯ä¸ä¸ªComponentRefå®ä¾ added by liyz\r\n if (content instanceof ComponentRef) {\r\n Object.assign(content.instance, initialState);\r\n this._applicationRef.attachView(content.hostView);\r\n\r\n return new ContentRef(\r\n [[content.location.nativeElement]],\r\n content.hostView,\r\n content\r\n );\r\n }\r\n\r\n return new ContentRef([[this._renderer.createText(`${content}`)]]);\r\n }\r\n}\r\n","/**\r\n * @copyright Valor Software\r\n * @copyright Angular ng-bootstrap team\r\n */\r\n\r\n// previous version:\r\n// https://github.com/angular-ui/bootstrap/blob/07c31d0731f7cb068a1932b8e01d2312b796b4ec/src/position/position.js\r\n// tslint:disable\r\nexport class Positioning {\r\n public position(element: HTMLElement, round = true): ClientRect {\r\n let elPosition: ClientRect;\r\n let parentOffset: ClientRect = {\r\n width: 0,\r\n height: 0,\r\n top: 0,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n };\r\n\r\n if (this.getStyle(element, 'position') === 'fixed') {\r\n const bcRect = element.getBoundingClientRect();\r\n elPosition = {\r\n width: bcRect.width,\r\n height: bcRect.height,\r\n top: bcRect.top,\r\n bottom: bcRect.bottom,\r\n left: bcRect.left,\r\n right: bcRect.right\r\n };\r\n } else {\r\n const offsetParentEl = this.offsetParent(element);\r\n\r\n elPosition = this.offset(element, false);\r\n\r\n if (offsetParentEl !== document.documentElement) {\r\n parentOffset = this.offset(offsetParentEl, false);\r\n }\r\n\r\n parentOffset.top += offsetParentEl.clientTop;\r\n parentOffset.left += offsetParentEl.clientLeft;\r\n }\r\n\r\n elPosition.top -= parentOffset.top;\r\n elPosition.bottom -= parentOffset.top;\r\n elPosition.left -= parentOffset.left;\r\n elPosition.right -= parentOffset.left;\r\n\r\n if (round) {\r\n elPosition.top = Math.round(elPosition.top);\r\n elPosition.bottom = Math.round(elPosition.bottom);\r\n elPosition.left = Math.round(elPosition.left);\r\n elPosition.right = Math.round(elPosition.right);\r\n }\r\n\r\n return elPosition;\r\n }\r\n\r\n public offset(element: HTMLElement, round = true): ClientRect {\r\n const elBcr = element.getBoundingClientRect();\r\n const viewportOffset = {\r\n top: window.pageYOffset - document.documentElement.clientTop,\r\n left: window.pageXOffset - document.documentElement.clientLeft\r\n };\r\n\r\n let elOffset = {\r\n height: elBcr.height || element.offsetHeight,\r\n width: elBcr.width || element.offsetWidth,\r\n top: elBcr.top + viewportOffset.top,\r\n bottom: elBcr.bottom + viewportOffset.top,\r\n left: elBcr.left + viewportOffset.left,\r\n right: elBcr.right + viewportOffset.left\r\n };\r\n\r\n if (round) {\r\n elOffset.height = Math.round(elOffset.height);\r\n elOffset.width = Math.round(elOffset.width);\r\n elOffset.top = Math.round(elOffset.top);\r\n elOffset.bottom = Math.round(elOffset.bottom);\r\n elOffset.left = Math.round(elOffset.left);\r\n elOffset.right = Math.round(elOffset.right);\r\n }\r\n\r\n return elOffset;\r\n }\r\n\r\n public positionElements(\r\n hostElement: HTMLElement,\r\n targetElement: HTMLElement,\r\n placement: string,\r\n appendToBody?: boolean\r\n ): ClientRect {\r\n const hostElPosition = appendToBody\r\n ? this.offset(hostElement, false)\r\n : this.position(hostElement, false);\r\n const targetElStyles = this.getAllStyles(targetElement);\r\n const shiftWidth: any = {\r\n left: hostElPosition.left,\r\n center:\r\n hostElPosition.left +\r\n hostElPosition.width / 2 -\r\n targetElement.offsetWidth / 2,\r\n right: hostElPosition.left + hostElPosition.width\r\n };\r\n const shiftHeight: any = {\r\n top: hostElPosition.top,\r\n center:\r\n hostElPosition.top +\r\n hostElPosition.height / 2 -\r\n targetElement.offsetHeight / 2,\r\n bottom: hostElPosition.top + hostElPosition.height\r\n };\r\n const targetElBCR = targetElement.getBoundingClientRect();\r\n let placementPrimary = placement.split(' ')[0] || 'top';\r\n const placementSecondary = placement.split(' ')[1] || 'center';\r\n\r\n let targetElPosition: ClientRect = {\r\n height: targetElBCR.height || targetElement.offsetHeight,\r\n width: targetElBCR.width || targetElement.offsetWidth,\r\n top: 0,\r\n bottom: targetElBCR.height || targetElement.offsetHeight,\r\n left: 0,\r\n right: targetElBCR.width || targetElement.offsetWidth\r\n };\r\n\r\n if (placementPrimary === 'auto') {\r\n let newPlacementPrimary = this.autoPosition(\r\n targetElPosition,\r\n hostElPosition,\r\n targetElement,\r\n placementSecondary\r\n );\r\n if (!newPlacementPrimary)\r\n newPlacementPrimary = this.autoPosition(\r\n targetElPosition,\r\n hostElPosition,\r\n targetElement\r\n );\r\n if (newPlacementPrimary) placementPrimary = newPlacementPrimary;\r\n targetElement.classList.add(placementPrimary);\r\n }\r\n\r\n switch (placementPrimary) {\r\n case 'top':\r\n targetElPosition.top =\r\n hostElPosition.top -\r\n (targetElement.offsetHeight +\r\n parseFloat(targetElStyles.marginBottom));\r\n targetElPosition.bottom +=\r\n hostElPosition.top - targetElement.offsetHeight;\r\n targetElPosition.left = shiftWidth[placementSecondary];\r\n targetElPosition.right += shiftWidth[placementSecondary];\r\n break;\r\n case 'bottom':\r\n targetElPosition.top = shiftHeight[placementPrimary];\r\n targetElPosition.bottom += shiftHeight[placementPrimary];\r\n targetElPosition.left = shiftWidth[placementSecondary];\r\n targetElPosition.right += shiftWidth[placementSecondary];\r\n break;\r\n case 'left':\r\n targetElPosition.top = shiftHeight[placementSecondary];\r\n targetElPosition.bottom += shiftHeight[placementSecondary];\r\n targetElPosition.left =\r\n hostElPosition.left -\r\n (targetElement.offsetWidth + parseFloat(targetElStyles.marginRight));\r\n targetElPosition.right +=\r\n hostElPosition.left - targetElement.offsetWidth;\r\n break;\r\n case 'right':\r\n targetElPosition.top = shiftHeight[placementSecondary];\r\n targetElPosition.bottom += shiftHeight[placementSecondary];\r\n targetElPosition.left = shiftWidth[placementPrimary];\r\n targetElPosition.right += shiftWidth[placementPrimary];\r\n break;\r\n }\r\n\r\n targetElPosition.top = Math.round(targetElPosition.top);\r\n targetElPosition.bottom = Math.round(targetElPosition.bottom);\r\n targetElPosition.left = Math.round(targetElPosition.left);\r\n targetElPosition.right = Math.round(targetElPosition.right);\r\n\r\n return targetElPosition;\r\n }\r\n\r\n private autoPosition(\r\n targetElPosition: ClientRect,\r\n hostElPosition: ClientRect,\r\n targetElement: HTMLElement,\r\n preferredPosition?: string\r\n ) {\r\n if (\r\n (!preferredPosition || preferredPosition === 'right') &&\r\n targetElPosition.left + hostElPosition.left - targetElement.offsetWidth <\r\n 0\r\n ) {\r\n return 'right';\r\n } else if (\r\n (!preferredPosition || preferredPosition === 'top') &&\r\n targetElPosition.bottom +\r\n hostElPosition.bottom +\r\n targetElement.offsetHeight >\r\n window.innerHeight\r\n ) {\r\n return 'top';\r\n } else if (\r\n (!preferredPosition || preferredPosition === 'bottom') &&\r\n targetElPosition.top + hostElPosition.top - targetElement.offsetHeight < 0\r\n ) {\r\n return 'bottom';\r\n } else if (\r\n (!preferredPosition || preferredPosition === 'left') &&\r\n targetElPosition.right +\r\n hostElPosition.right +\r\n targetElement.offsetWidth >\r\n window.innerWidth\r\n ) {\r\n return 'left';\r\n }\r\n return null;\r\n }\r\n\r\n private getAllStyles(element: HTMLElement) {\r\n return window.getComputedStyle(element);\r\n }\r\n\r\n private getStyle(element: HTMLElement, prop: string): string {\r\n return (this.getAllStyles(element) as any)[prop];\r\n }\r\n\r\n private isStaticPositioned(element: HTMLElement): boolean {\r\n return (this.getStyle(element, 'position') || 'static') === 'static';\r\n }\r\n\r\n private offsetParent(element: HTMLElement): HTMLElement {\r\n let offsetParentEl =\r\n <HTMLElement>element.offsetParent || document.documentElement;\r\n\r\n while (\r\n offsetParentEl &&\r\n offsetParentEl !== document.documentElement &&\r\n this.isStaticPositioned(offsetParentEl)\r\n ) {\r\n offsetParentEl = <HTMLElement>offsetParentEl.offsetParent;\r\n }\r\n\r\n return offsetParentEl || document.documentElement;\r\n }\r\n}\r\n\r\nconst positionService = new Positioning();\r\n\r\nexport function positionElements(\r\n hostElement: HTMLElement,\r\n targetElement: HTMLElement,\r\n placement: string,\r\n appendToBody?: boolean\r\n): void {\r\n const pos = positionService.positionElements(\r\n hostElement,\r\n targetElement,\r\n placement,\r\n appendToBody\r\n );\r\n\r\n targetElement.style.top = `${pos.top}px`;\r\n targetElement.style.left = `${pos.left}px`;\r\n}\r\n","import { Injectable, ElementRef } from '@angular/core';\r\nimport { positionElements } from './ng-positioning';\r\n\r\nexport interface PositioningOptions {\r\n /** The DOM element, ElementRef, or a selector string of an element which will be moved */\r\n element?: HTMLElement | ElementRef | string;\r\n\r\n /** The DOM element, ElementRef, or a selector string of an element which the element will be attached to */\r\n target?: HTMLElement | ElementRef | string;\r\n\r\n /**\r\n * A string of the form 'vert-attachment horiz-attachment' or 'placement'\r\n * - placement can be \"top\", \"bottom\", \"left\", \"right\"\r\n * not yet supported:\r\n * - vert-attachment can be any of 'top', 'middle', 'bottom'\r\n * - horiz-attachment can be any of 'left', 'center', 'right'\r\n */\r\n attachment?: string;\r\n\r\n /** A string similar to `attachment`. The one difference is that, if it's not provided,\r\n * `targetAttachment` will assume the mirror image of `attachment`.\r\n */\r\n targetAttachment?: string;\r\n\r\n /** A string of the form 'vert-offset horiz-offset'\r\n * - vert-offset and horiz-offset can be of the form \"20px\" or \"55%\"\r\n */\r\n offset?: string;\r\n\r\n /** A string similar to `offset`, but referring to the offset of the target */\r\n targetOffset?: string;\r\n\r\n /** If true component will be attached to body */\r\n appendToBody?: boolean;\r\n}\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class PositioningService {\r\n position(options: PositioningOptions): void {\r\n const {element, target, attachment, appendToBody} = options;\r\n positionElements(\r\n _getHtmlElement(target),\r\n _getHtmlElement(element),\r\n attachment,\r\n appendToBody\r\n );\r\n }\r\n\r\n}\r\n\r\nfunction _getHtmlElement(element: HTMLElement | ElementRef | string): HTMLElement {\r\n // it means that we got a selector\r\n if (typeof element === 'string') {\r\n return document.querySelector(element) as HTMLElement;\r\n }\r\n\r\n if (element instanceof ElementRef) {\r\n return element.nativeElement;\r\n }\r\n\r\n return element as HTMLElement;\r\n}\r\n","import {\r\n ApplicationRef, ComponentFactoryResolver, ElementRef, Injectable, Injector,\r\n NgZone, Renderer2, ViewContainerRef\r\n} from '@angular/core';\r\nimport {ComponentLoader} from './component-loader.class';\r\nimport {PositioningService} from '../positioning/index';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class ComponentLoaderFactory {\r\n constructor(private _componentFactoryResolver: ComponentFactoryResolver,\r\n private _ngZone: NgZone,\r\n private _injector: Injector,\r\n private _posService: PositioningService,\r\n private _applicationRef: ApplicationRef) {\r\n }\r\n\r\n /**\r\n *\r\n * @param _elementRef\r\n * @param _viewContainerRef\r\n * @param _renderer\r\n * @returns {ComponentLoader}\r\n */\r\n createLoader<T>(_elementRef: ElementRef,\r\n _viewContainerRef: ViewContainerRef,\r\n _renderer: Renderer2): ComponentLoader<T> {\r\n return new ComponentLoader<T>(\r\n _viewContainerRef,\r\n _renderer,\r\n _elementRef,\r\n this._injector,\r\n this._componentFactoryResolver,\r\n this._ngZone,\r\n this._applicationRef,\r\n this._posService\r\n );\r\n }\r\n}\r\n","import { isDevMode } from '@angular/core';\r\nconst _messagesHash: { [key: string]: boolean } = {};\r\nconst _hideMsg = typeof console === 'undefined' || !('warn' in console);\r\n\r\nexport function warnOnce(msg: string): void {\r\n if (!isDevMode() || _hideMsg || msg in _messagesHash) {\r\n return;\r\n }\r\n\r\n _messagesHash[msg] = true;\r\n /*tslint:disable-next-line*/\r\n console.warn(msg);\r\n}\r\n","// tslint:disable:deprecation\r\nimport {\r\n Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output,\r\n Renderer2, TemplateRef, ViewContainerRef\r\n} from '@angular/core';\r\nimport { TooltipContainerComponent } from './tooltip-container.component';\r\nimport { TooltipConfig } from './tooltip.config';\r\nimport { ComponentLoader, ComponentLoaderFactory } from '../utils/component-loader/index';\r\nimport { OnChange } from '../utils/decorators';\r\nimport { warnOnce } from '../utils/warn-once';\r\nimport { parseTriggers } from '../utils/triggers';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport { timer } from 'rxjs';\r\n\r\n@Directive({\r\n selector: '[tooltip], [tooltipHtml]',\r\n exportAs: 'bs-tooltip'\r\n})\r\nexport class TooltipDirective implements OnInit, OnDestroy {\r\n /**\r\n * Content to be displayed as tooltip.\r\n */\r\n @OnChange()\r\n @Input()\r\n tooltip: string | TemplateRef<any>;\r\n /** Fired when tooltip content changes */\r\n @Output()\r\n tooltipChange: EventEmitter<string | TemplateRef<any>> = new EventEmitter();\r\n\r\n /**\r\n * Placement of a tooltip. Accepts: \"top\", \"bottom\", \"left\", \"right\"\r\n */\r\n @Input() placement: string;\r\n /**\r\n * Specifies events that should trigger. Supports a space separated list of\r\n * event names.\r\n */\r\n @Input() triggers: string;\r\n /**\r\n * A selector specifying the element the tooltip should be appended to.\r\n * Currently only supports \"body\".\r\n */\r\n @Input() container: string;\r\n\r\n /**\r\n * Returns whether or not the tooltip is currently being shown\r\n */\r\n @Input()\r\n get isOpen(): boolean {\r\n return this._tooltip.isShown;\r\n }\r\n\r\n set isOpen(value: boolean) {\r\n if (value) {\r\n this.show();\r\n } else {\r\n this.hide();\r\n }\r\n }\r\n\r\n /**\r\n * Allows to disable tooltip\r\n */\r\n @Input() isDisabled: boolean;\r\n\r\n /**\r\n * Css class for tooltip container\r\n */\r\n @Input() containerClass = '';\r\n /**\r\n * Delay before showing the tooltip\r\n */\r\n @Input() delay: number;\r\n\r\n /**\r\n * Emits an event when the tooltip is shown\r\n */\r\n @Output() onShown: EventEmitter<any>;\r\n /**\r\n * Emits an event when the tooltip is hidden\r\n */\r\n @Output() onHidden: EventEmitter<any>;\r\n\r\n /** @deprecated - please use `tooltip` instead */\r\n @Input('tooltipHtml')\r\n set htmlContent(value: string | TemplateRef<any>) {\r\n warnOnce('tooltipHtml was deprecated, please use `tooltip` instead');\r\n this.tooltip = value;\r\n }\r\n\r\n /** @deprecated - please use `placement` instead */\r\n @Input('tooltipPlacement')\r\n set _placement(value: string) {\r\n warnOnce('tooltipPlacement was deprecated, please use `placement` instead');\r\n this.placement = value;\r\n }\r\n\r\n /** @deprecated - please use `isOpen` instead*/\r\n @Input('tooltipIsOpen')\r\n set _isOpen(value: boolean) {\r\n warnOnce('tooltipIsOpen was deprecated, please use `isOpen` instead');\r\n this.isOpen = value;\r\n }\r\n\r\n get _isOpen(): boolean {\r\n warnOnce('tooltipIsOpen was deprecated, please use `isOpen` instead');\r\n return this.isOpen;\r\n }\r\n\r\n /** @deprecated - please use `isDisabled` instead */\r\n @Input('tooltipEnable')\r\n set _enable(value: boolean) {\r\n warnOnce('tooltipEnable was deprecated, please use `isDisabled` instead');\r\n this.isDisabled = value;\r\n }\r\n\r\n get _enable(): boolean {\r\n warnOnce('tooltipEnable was deprecated, please use `isDisabled` instead');\r\n return this.isDisabled;\r\n }\r\n\r\n /** @deprecated - please use `container=\"body\"` instead */\r\n @Input('tooltipAppendToBody')\r\n set _appendToBody(value: boolean) {\r\n warnOnce(\r\n 'tooltipAppendToBody was deprecated, please use `container=\"body\"` instead'\r\n );\r\n this.container = value ? 'body' : this.container;\r\n }\r\n\r\n get _appendToBody(): boolean {\r\n warnOnce(\r\n 'tooltipAppendToBody was deprecated, please use `container=\"body\"` instead'\r\n );\r\n return this.container === 'body';\r\n }\r\n\r\n /** @deprecated - removed, will be added to configuration */\r\n @Input('tooltipAnimation') _animation = true;\r\n\r\n /** @deprecated - will replaced with customClass */\r\n @Input('tooltipClass')\r\n set _popupClass(value: string) {\r\n warnOnce('tooltipClass deprecated');\r\n }\r\n\r\n /** @deprecated - removed */\r\n @Input('tooltipContext')\r\n set _tooltipContext(value: any) {\r\n warnOnce('tooltipContext deprecated');\r\n }\r\n\r\n /** @deprecated */\r\n @Input('tooltipPopupDelay')\r\n set _tooltipPopupDelay(value: number) {\r\n warnOnce('tooltipPopupDelay is deprecated, use `delay` instead');\r\n this.delay = value;\r\n }\r\n\r\n /** @deprecated */\r\n @Input('tooltipFadeDuration') _fadeDuration = 150;\r\n\r\n /** @deprecated - please use `triggers` instead */\r\n @Input('tooltipTrigger')\r\n get _tooltipTrigger(): string | string[] {\r\n warnOnce('tooltipTrigger was deprecated, please use `triggers` instead');\r\n return this.triggers;\r\n }\r\n\r\n set _tooltipTrigger(value: string | string[]) {\r\n warnOnce('tooltipTrigger was deprecated, please use `triggers` instead');\r\n this.triggers = (value || '').toString();\r\n }\r\n\r\n /** @deprecated */\r\n @Output()\r\n tooltipStateChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n protected _delayTimeoutId: number | any;\r\n protected _tooltipCancelShowFn: Function;\r\n\r\n private _tooltip: ComponentLoader<TooltipContainerComponent>;\r\n\r\n constructor(_viewContainerRef: ViewContainerRef,\r\n private _renderer: Renderer2,\r\n private _elementRef: ElementRef,\r\n cis: ComponentLoaderFactory,\r\n config: TooltipConfig) {\r\n this._tooltip = cis\r\n .createLoader<TooltipContainerComponent>(\r\n this._elementRef,\r\n _viewContainerRef,\r\n this._renderer\r\n )\r\n .provide({provide: TooltipConfig, useValue: config});\r\n\r\n Object.assign(this, config);\r\n this.onShown = this._tooltip.onShown;\r\n this.onHidden = this._tooltip.onHidden;\r\n }\r\n\r\n ngOnInit(): void {\r\n this._tooltip.listen({\r\n triggers: this.triggers,\r\n show: () => this.show()\r\n });\r\n this.tooltipChange.subscribe((value: any) => {\r\n if (!value) {\r\n this._tooltip.hide();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Toggles an elementâs tooltip. This is considered a âmanualâ triggering of\r\n * the tooltip.\r\n */\r\n toggle(): void {\r\n if (this.isOpen) {\r\n return this.hide();\r\n }\r\n\r\n this.show();\r\n }\r\n\r\n /**\r\n * Opens an elementâs tooltip. This is considered a âmanualâ triggering of\r\n * the tooltip.\r\n */\r\n show(): void {\r\n if (\r\n this.isOpen ||\r\n this.isDisabled ||\r\n this._delayTimeoutId ||\r\n !this.tooltip\r\n ) {\r\n return;\r\n }\r\n\r\n const showTooltip = () => {\r\n if (this._delayTimeoutId) {\r\n this._delayTimeoutId = undefined;\r\n }\r\n\r\n this._tooltip\r\n .attach(TooltipContainerComponent)\r\n .to(this.container)\r\n .position({attachment: this.placement})\r\n .show({\r\n content: this.tooltip,\r\n placement: this.placement,\r\n containerClass: this.containerClass\r\n });\r\n };\r\n const cancelDelayedTooltipShowing = () => {\r\n if (this._tooltipCancelShowFn) {\r\n this._tooltipCancelShowFn();\r\n }\r\n };\r\n\r\n if (this.delay) {\r\n const tipTimer = timer(this.delay).subscribe(() => {\r\n showTooltip();\r\n cancelDelayedTooltipShowing();\r\n });\r\n\r\n if (this.triggers) {\r\n const triggers = parseTriggers(this.triggers);\r\n this._tooltipCancelShowFn = this._renderer.listen(this._elementRef.nativeElement, triggers[0].close, () => {\r\n tipTimer.unsubscribe();\r\n cancelDelayedTooltipShowing();\r\n });\r\n }\r\n } else {\r\n showTooltip();\r\n }\r\n }\r\n\r\n /**\r\n * Closes an elementâs tooltip. This is considered a âmanualâ triggering of\r\n * the tooltip.\r\n */\r\n hide(): void {\r\n if (this._delayTimeoutId) {\r\n clearTimeout(this._delayTimeoutId);\r\n this._delayTimeoutId = undefined;\r\n }\r\n\r\n if (!this._tooltip.isShown) {\r\n return;\r\n }\r\n\r\n this._tooltip.instance.classMap.in = false;\r\n setTimeout(() => {\r\n this._tooltip.hide();\r\n }, this._fadeDuration);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._tooltip.dispose();\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { TooltipContainerComponent } from './tooltip-container.component';\r\nimport { TooltipDirective } from './tooltip.directive';\r\nimport { TooltipConfig } from './tooltip.config';\r\nimport { ComponentLoaderFactory } from '../utils/component-loader/index';\r\nimport { PositioningService } from '../utils/positioning/index';\r\n\r\n@NgModule({\r\n imports: [CommonModule],\r\n declarations: [TooltipDirective, TooltipContainerComponent],\r\n exports: [TooltipDirective],\r\n entryComponents: [TooltipContainerComponent]\r\n})\r\nexport class TooltipModule {\r\n static forRoot(): ModuleWithProviders {\r\n return {\r\n ngModule: TooltipModule,\r\n providers: [TooltipConfig, ComponentLoaderFactory, PositioningService]\r\n };\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class BsModalRef {\r\n /**\r\n * Reference to a component inside the modal. Null if modal's been created with TemplateRef\r\n */\r\n content?: any | null;\r\n\r\n /**\r\n * Hides the modal\r\n */\r\n hide: () => void = Function;\r\n}\r\n","export class ModalBackdropOptions {\r\n animate = true;\r\n\r\n constructor(options: ModalBackdropOptions) {\r\n Object.assign(this, options);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class ModalOptions {\r\n /**\r\n * Includes a modal-backdrop element. Alternatively,\r\n * specify static for a backdrop which doesn't close the modal on click.\r\n */\r\n backdrop?: boolean | 'static';\r\n /**\r\n * Closes the modal when escape key is pressed.\r\n */\r\n keyboard?: boolean;\r\n\r\n focus?: boolean;\r\n /**\r\n * Shows the modal when initialized.\r\n */\r\n show?: boolean;\r\n /**\r\n * Ignore the backdrop click\r\n */\r\n ignoreBackdropClick?: boolean;\r\n /**\r\n * Css class for opened modal\r\n */\r\n class?: string;\r\n /**\r\n * Toggle animation\r\n */\r\n animated?: boolean;\r\n /**\r\n * Modal data\r\n */\r\n initialState?: Object;\r\n}\r\n\r\n\r\nexport const modalConfigDefaults: ModalOptions = {\r\n backdrop: true,\r\n keyboard: true,\r\n focus: true,\r\n show: false,\r\n ignoreBackdropClick: false,\r\n class: '',\r\n animated: true,\r\n initialState: {}\r\n};\r\n\r\nexport const CLASS_NAME: any = {\r\n SCROLLBAR_MEASURER: 'modal-scrollbar-measure',\r\n BACKDROP: 'modal-backdrop',\r\n OPEN: 'modal-open',\r\n FADE: 'fade',\r\n IN: 'in', // bs3\r\n SHOW: 'show' // bs4\r\n};\r\n\r\nexport const SELECTOR: any = {\r\n DIALOG: '.modal-dialog',\r\n DATA_TOGGLE: '[data-toggle=\"modal\"]',\r\n DATA_DISMISS: '[data-dismiss=\"modal\"]',\r\n FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'\r\n};\r\n\r\nexport const TRANSITION_DURATIONS: any = {\r\n MODAL: 300,\r\n BACKDROP: 150\r\n};\r\n\r\nexport const DISMISS_REASONS = {\r\n BACKRDOP: 'backdrop-click',\r\n ESC: 'esc'\r\n};\r\n","import {\r\n Component,\r\n ElementRef,\r\n HostListener,\r\n OnDestroy,\r\n OnInit,\r\n Renderer2\r\n} from '@angular/core';\r\nimport {\r\n CLASS_NAME,\r\n DISMISS_REASONS,\r\n ModalOptions,\r\n TRANSITION_DURATIONS\r\n} from './modal-options.class';\r\nimport { BsModalService } from './bs-modal.service';\r\nimport { isBs3 } from '../utils/theme-provider';\r\n\r\n@Component({\r\n selector: 'modal-container',\r\n template: `\r\n <div [class]=\"'modal-dialog' + (config.class ? ' ' + config.class : '')\" role=\"document\">\r\n <div class=\"modal-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n `,\r\n host: {\r\n class: 'modal',\r\n role: 'dialog',\r\n tabindex: '-1',\r\n '[attr.aria-modal]': 'true'\r\n }\r\n})\r\nexport class ModalContainerComponent implements OnInit, OnDestroy {\r\n config: ModalOptions;\r\n isShown = false;\r\n level: number;\r\n isAnimated: boolean;\r\n bsModalService: BsModalService;\r\n private isModalHiding = false;\r\n\r\n constructor(options: ModalOptions,\r\n protected _element: ElementRef,\r\n private _renderer: Renderer2) {\r\n this.config = Object.assign({}, options);\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.isAnimated) {\r\n this._renderer.addClass(\r\n this._element.nativeElement,\r\n CLASS_NAME.FADE\r\n );\r\n }\r\n this._renderer.setStyle(\r\n this._element.nativeElement,\r\n 'display',\r\n 'block'\r\n );\r\n setTimeout(() => {\r\n this.isShown = true;\r\n this._renderer.addClass(\r\n this._element.nativeElement,\r\n isBs3() ? CLASS_NAME.IN : CLASS_NAME.SHOW\r\n );\r\n }, this.isAnimated ? TRANSITION_DURATIONS.BACKDROP : 0);\r\n if (document && document.body) {\r\n if (this.bsModalService.getModalsCount() === 1) {\r\n this.bsModalService.checkScrollbar();\r\n this.bsModalService.setScrollbar();\r\n }\r\n this._renderer.addClass(document.body, CLASS_NAME.OPEN);\r\n }\r\n if (this._element.nativeElement) {\r\n this._element.nativeElement.focus();\r\n }\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n onClick(event: any): void {\r\n if (\r\n this.config.ignoreBackdropClick ||\r\n this.config.backdrop === 'static' ||\r\n event.target !== this._element.nativeElement\r\n ) {\r\n return;\r\n }\r\n this.bsModalService.setDismissReason(DISMISS_REASONS.BACKRDOP);\r\n this.hide();\r\n }\r\n\r\n @HostListener('window:keydown.esc', ['$event'])\r\n onEsc(event: any): void {\r\n if (!this.isShown) {\r\n return;\r\n }\r\n\r\n if (event.keyCode === 27) {\r\n event.preventDefault();\r\n }\r\n\r\n if (\r\n this.config.keyboard &&\r\n this.level === this.bsModalService.getModalsCount()\r\n ) {\r\n this.bsModalService.setDismissReason(DISMISS_REASONS.ESC);\r\n this.hide();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.isShown) {\r\n this.hide();\r\n }\r\n }\r\n\r\n hide(): void {\r\n if (this.isModalHiding || !this.isShown) {\r\n return;\r\n }\r\n this.isModalHiding = true;\r\n this._renderer.removeClass(\r\n this._element.nativeElement,\r\n isBs3() ? CLASS_NAME.IN : CLASS_NAME.SHOW\r\n );\r\n setTimeout(() => {\r\n this.isShown = false;\r\n if (\r\n document &&\r\n document.body &&\r\n this.bsModalService.getModalsCount() === 1\r\n ) {\r\n this._renderer.removeClass(document.body, CLASS_NAME.OPEN);\r\n }\r\n this.bsModalService.hide(this.level);\r\n this.isModalHiding = false;\r\n }, this.isAnimated ? TRANSITION_DURATIONS.MODAL : 0);\r\n }\r\n}\r\n","import { window } from './facade/browser';\r\n\r\nexport class Utils {\r\n public static reflow(element: any): void {\r\n ((bs: any): void => bs)(element.offsetHeight);\r\n }\r\n\r\n // source: https://github.com/jquery/jquery/blob/master/src/css/var/getStyles.js\r\n public static getStyles(elem: any): any {\r\n // Support: IE <=11 only, Firefox <=30 (#15098, #14150)\r\n // IE throws on elements created in popups\r\n // FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\r\n let view = elem.ownerDocument.defaultView;\r\n\r\n if (!view || !view.opener) {\r\n view = window;\r\n }\r\n\r\n return view.getComputedStyle(elem);\r\n }\r\n}\r\n","import { Component, ElementRef, OnInit, Renderer2 } from '@angular/core';\r\n\r\nimport { CLASS_NAME } from './modal-options.class';\r\nimport { isBs3 } from '../utils/theme-provider';\r\nimport { Utils } from '../utils/utils.class';\r\n\r\n\r\n/** This component will be added as background layout for modals if enabled */\r\n@Component({\r\n selector: 'bs-modal-backdrop',\r\n template: ' ',\r\n host: { class: CLASS_NAME.BACKDROP }\r\n})\r\nexport class ModalBackdropComponent implements OnInit {\r\n get isAnimated(): boolean {\r\n return this._isAnimated;\r\n }\r\n\r\n set isAnimated(value: boolean) {\r\n this._isAnimated = value;\r\n // this.renderer.setElementClass(this.element.nativeElement, `${ClassName.FADE}`, value);\r\n }\r\n\r\n get isShown(): boolean {\r\n return this._isShown;\r\n }\r\n\r\n set isShown(value: boolean) {\r\n this._isShown = value;\r\n if (value) {\r\n this.renderer.addClass(\r\n this.element.nativeElement,\r\n `${CLASS_NAME.IN}`\r\n );\r\n } else {\r\n this.renderer.removeClass(\r\n this.element.nativeElement,\r\n `${CLASS_NAME.IN}`\r\n );\r\n }\r\n if (!isBs3()) {\r\n if (value) {\r\n this.renderer.addClass(\r\n this.element.nativeElement,\r\n `${CLASS_NAME.SHOW}`\r\n );\r\n } else {\r\n this.renderer.removeClass(\r\n this.element.nativeElement,\r\n `${CLASS_NAME.SHOW}`\r\n );\r\n }\r\n }\r\n }\r\n\r\n element: ElementRef;\r\n renderer: Renderer2;\r\n\r\n protected _isAnimated: boolean;\r\n protected _isShown = false;\r\n\r\n constructor(element: ElementRef, renderer: Renderer2) {\r\n this.element = element;\r\n this.renderer = renderer;\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.isAnimated) {\r\n this.renderer.addClass(\r\n this.element.nativeElement,\r\n `${CLASS_NAME.FADE}`\r\n );\r\n Utils.reflow(this.element.nativeElement);\r\n }\r\n this.isShown = true;\r\n }\r\n}\r\n","/* tslint:disable:max-file-line-count */\r\n// todo: should we support enforce focus in?\r\n// todo: in original bs there are was a way to prevent modal from showing\r\n// todo: original modal had resize events\r\n\r\nimport {\r\n ComponentRef, Directive, ElementRef, EventEmitter, HostListener, Input,\r\n OnDestroy, OnInit, Output, Renderer2, ViewContainerRef\r\n} from '@angular/core';\r\n\r\nimport { document, window } from '../utils/facade/browser';\r\n\r\nimport { isBs3 } from '../utils/theme-provider';\r\nimport { Utils } from '../utils/utils.class';\r\nimport { ModalBackdropComponent } from './modal-backdrop.component';\r\nimport {\r\n CLASS_NAME, DISMISS_REASONS, modalConfigDefaults, ModalOptions\r\n} from './modal-options.class';\r\nimport { ComponentLoader } from '../utils/component-loader/component-loader.class';\r\nimport { ComponentLoaderFactory } from '../utils/component-loader/component-loader.factory';\r\n\r\nconst TRANSITION_DURATION = 300;\r\nconst BACKDROP_TRANSITION_DURATION = 150;\r\n\r\n/** Mark any code with directive to show it's content in modal */\r\n@Directive({\r\n selector: '[bsModal]',\r\n exportAs: 'bs-modal'\r\n})\r\nexport class ModalDirective implements OnDestroy, OnInit {\r\n /** allows to set modal configuration via element property */\r\n @Input()\r\n set config(conf: ModalOptions) {\r\n this._config = this.getConfig(conf);\r\n }\r\n\r\n get config(): ModalOptions {\r\n return this._config;\r\n }\r\n\r\n /** This event fires immediately when the `show` instance method is called. */\r\n @Output()\r\n onShow: EventEmitter<ModalDirective> = new EventEmitter<ModalDirective>();\r\n /** This event is fired when the modal has been made visible to the user\r\n * (will wait for CSS transitions to complete)\r\n */\r\n @Output()\r\n onShown: EventEmitter<ModalDirective> = new EventEmitter<ModalDirective>();\r\n /** This event is fired immediately when\r\n * the hide instance method has been called.\r\n */\r\n @Output()\r\n onHide: EventEmitter<ModalDirective> = new EventEmitter<ModalDirective>();\r\n /** This event is fired when the modal has finished being\r\n * hidden from the user (will wait for CSS transitions to complete).\r\n */\r\n @Output()\r\n onHidden: EventEmitter<ModalDirective> = new EventEmitter<ModalDirective>();\r\n\r\n /** This field contains last dismiss reason.\r\n * Possible values: `backdrop-click`, `esc` and `null`\r\n * (if modal was closed by direct call of `.hide()`).\r\n */\r\n dismissReason: string;\r\n\r\n get isShown(): boolean {\r\n return this._isShown;\r\n }\r\n\r\n protected _config: ModalOptions;\r\n protected _isShown = false;\r\n\r\n protected isBodyOverflowing = false;\r\n protected originalBodyPadding = 0;\r\n protected scrollbarWidth = 0;\r\n\r\n protected timerHideModal: any = 0;\r\n protected timerRmBackDrop: any = 0;\r\n\r\n // reference to backdrop component\r\n protected backdrop: ComponentRef<ModalBackdropComponent>;\r\n private _backdrop: ComponentLoader<ModalBackdropComponent>;\r\n\r\n private isNested = false;\r\n\r\n constructor(private _element: ElementRef,\r\n _viewContainerRef: ViewContainerRef,\r\n private _renderer: Renderer2,\r\n clf: ComponentLoaderFactory) {\r\n this._backdrop = clf.createLoader<ModalBackdropComponent>(\r\n _element,\r\n _viewContainerRef,\r\n _renderer\r\n );\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n onClick(event: any): void {\r\n if (\r\n this.config.ignoreBackdropClick ||\r\n this.config.backdrop === 'static' ||\r\n event.target !== this._element.nativeElement\r\n ) {\r\n return;\r\n }\r\n this.dismissReason = DISMISS_REASONS.BACKRDOP;\r\n this.hide(event);\r\n }\r\n\r\n // todo: consider preventing default and stopping propagation\r\n @HostListener('keydown.esc', ['$event'])\r\n onEsc(event: any): void {\r\n if (!this._isShown) {\r\n return;\r\n }\r\n\r\n if (event.keyCode === 27) {\r\n event.preventDefault();\r\n }\r\n\r\n if (this.config.keyboard) {\r\n this.dismissReason = DISMISS_REASONS.ESC;\r\n this.hide();\r\n }\r\n }\r\n\r\n ngOnDestroy(): any {\r\n this.config = void 0;\r\n if (this._isShown) {\r\n this._isShown = false;\r\n this.hideModal();\r\n this._backdrop.dispose();\r\n }\r\n }\r\n\r\n ngOnInit(): any {\r\n this._config = this._config || this.getConfig();\r\n setTimeout(() => {\r\n if (this._config.show) {\r\n this.show();\r\n }\r\n }, 0);\r\n }\r\n\r\n /* Public methods */\r\n\r\n /** Allows to manually toggle modal visibility */\r\n toggle(): void {\r\n return this._isShown ? this.hide() : this.show();\r\n }\r\n\r\n /** Allows to manually open modal */\r\n show(): void {\r\n this.dismissReason = null;\r\n this.onShow.emit(this);\r\n if (this._isShown) {\r\n return;\r\n }\r\n clearTimeout(this.timerHideModal);\r\n clearTimeout(this.timerRmBackDrop);\r\n\r\n this._isShown = true;\r\n\r\n this.checkScrollbar();\r\n this.setScrollbar();\r\n\r\n if (document && document.body) {\r\n if (document.body.classList.contains(CLASS_NAME.OPEN)) {\r\n this.isNested = true;\r\n } else {\r\n this._renderer.addClass(document.body, CLASS_NAME.OPEN);\r\n }\r\n }\r\n\r\n this.showBackdrop(() => {\r\n this.showElement();\r\n });\r\n }\r\n\r\n /** Allows to manually close modal */\r\n hide(event?: Event): void {\r\n if (event) {\r\n event.preventDefault();\r\n }\r\n\r\n this.onHide.emit(this);\r\n\r\n // todo: add an option to prevent hiding\r\n if (!this._isShown) {\r\n return;\r\n }\r\n\r\n clearTimeout(this.timerHideModal);\r\n clearTimeout(this.timerRmBackDrop);\r\n\r\n this._isShown = false;\r\n this._renderer.removeClass(this._element.nativeElement, CLASS_NAME.IN);\r\n if (!isBs3()) {\r\n this._renderer.removeClass(this._element.nativeElement, CLASS_NAME.SHOW);\r\n }\r\n // this._addClassIn = false;\r\n\r\n if (this._config.animated) {\r\n this.timerHideModal = setTimeout(\r\n () => this.hideModal(),\r\n TRANSITION_DURATION\r\n );\r\n } else {\r\n this.hideModal();\r\n }\r\n }\r\n\r\n /** Private methods @internal */\r\n protected getConfig(config?: ModalOptions): ModalOptions {\r\n return Object.assign({}, modalConfigDefaults, config);\r\n }\r\n\r\n /**\r\n * Show dialog\r\n * @internal\r\n */\r\n protected showElement(): void {\r\n // todo: replace this with component loader usage\r\n if (\r\n !this._element.nativeElement.parentNode ||\r\n this._element.nativeElement.parentNode.nodeType !== Node.ELEMENT_NODE\r\n ) {\r\n // don't move modals dom position\r\n if (document && document.body) {\r\n document.body.appendChild(this._element.nativeElement);\r\n }\r\n }\r\n\r\n this._renderer.setAttribute(\r\n this._element.nativeElement,\r\n 'aria-hidden',\r\n 'false'\r\n );\r\n this._renderer.setAttribute(\r\n this._element.nativeElement,\r\n 'aria-modal',\r\n 'true'\r\n );\r\n this._renderer.setStyle(\r\n this._element.nativeElement,\r\n 'display',\r\n 'block'\r\n );\r\n this._renderer.setProperty(\r\n this._element.nativeElement,\r\n 'scrollTop',\r\n 0\r\n );\r\n\r\n if (this._config.animated) {\r\n Utils.reflow(this._element.nativeElement);\r\n }\r\n\r\n // this._addClassIn = true;\r\n this._renderer.addClass(this._element.nativeElement, CLASS_NAME.IN);\r\n if (!isBs3()) {\r\n this._renderer.addClass(this._element.nativeElement, CLASS_NAME.SHOW);\r\n }\r\n\r\n const transitionComplete = () => {\r\n if (this._config.focus) {\r\n this._element.nativeElement.focus();\r\n }\r\n this.onShown.emit(this);\r\n };\r\n\r\n if (this._config.animated) {\r\n setTimeout(transitionComplete, TRANSITION_DURATION);\r\n } else {\r\n transitionComplete();\r\n }\r\n }\r\n\r\n /** @internal */\r\n protected hideModal(): void {\r\n this._renderer.setAttribute(\r\n this._element.nativeElement,\r\n 'aria-hidden',\r\n 'true'\r\n );\r\n this._renderer.setStyle(\r\n this._element.nativeElement,\r\n 'display',\r\n 'none'\r\n );\r\n this.showBackdrop(() => {\r\n if (!this.isNested) {\r\n if (document && document.body) {\r\n this._renderer.removeClass(document.body, CLASS_NAME.OPEN);\r\n }\r\n this.resetScrollbar();\r\n }\r\n this.resetAdjustments();\r\n this.focusOtherModal();\r\n this.onHidden.emit(this);\r\n });\r\n }\r\n\r\n // todo: original show was calling a callback when done, but we can use\r\n // promise\r\n /** @internal */\r\n protected showBackdrop(callback?: Function): void {\r\n if (\r\n this._isShown &&\r\n this.config.backdrop &&\r\n (!this.backdrop || !this.backdrop.instance.isShown)\r\n ) {\r\n this.removeBackdrop();\r\n this._backdrop\r\n .attach(ModalBackdropComponent)\r\n .to('body')\r\n .show({isAnimated: this._config.animated});\r\n this.backdrop = this._backdrop._componentRef;\r\n\r\n if (!callback) {\r\n return;\r\n }\r\n\r\n if (!this._config.animated) {\r\n callback();\r\n\r\n return;\r\n }\r\n\r\n setTimeout(callback, BACKDROP_TRANSITION_DURATION);\r\n } else if (!this._isShown && this.backdrop) {\r\n this.backdrop.instance.isShown = false;\r\n\r\n const callbackRemove = () => {\r\n this.removeBackdrop();\r\n if (callback) {\r\n callback();\r\n }\r\n };\r\n\r\n if (this.backdrop.instance.isAnimated) {\r\n this.timerRmBackDrop = setTimeout(\r\n callbackRemove,\r\n BACKDROP_TRANSITION_DURATION\r\n );\r\n } else {\r\n callbackRemove();\r\n }\r\n } else if (callback) {\r\n callback();\r\n }\r\n }\r\n\r\n /** @internal */\r\n protected removeBackdrop(): void {\r\n this._backdrop.hide();\r\n }\r\n\r\n /** Events tricks */\r\n\r\n // no need for it\r\n // protected setEscapeEvent():void {\r\n // if (this._isShown && this._config.keyboard) {\r\n // $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {\r\n // if (event.which === 27) {\r\n // this.hide()\r\n // }\r\n // })\r\n //\r\n // } else if (!this._isShown) {\r\n // $(this._element).off(Event.KEYDOWN_DISMISS)\r\n // }\r\n // }\r\n\r\n // protected setResizeEvent():void {\r\n // console.log(this.renderer.listenGlobal('', Event.RESIZE));\r\n // if (this._isShown) {\r\n // $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this))\r\n // } else {\r\n // $(window).off(Event.RESIZE)\r\n // }\r\n // }\r\n\r\n protected focusOtherModal() {\r\n if (this._element.nativeElement.parentElement == null) return;\r\n const otherOpenedModals = this._element.nativeElement.parentElement.querySelectorAll('.in[bsModal]');\r\n if (!otherOpenedModals.length) {\r\n return;\r\n }\r\n otherOpenedModals[otherOpenedModals.length - 1].focus();\r\n }\r\n\r\n /** @internal */\r\n protected resetAdjustments(): void {\r\n this._renderer.setStyle(\r\n this._element.nativeElement,\r\n 'paddingLeft',\r\n ''\r\n );\r\n this._renderer.setStyle(\r\n this._element.nativeElement,\r\n 'paddingRight',\r\n ''\r\n );\r\n }\r\n\r\n /** Scroll bar tricks */\r\n /** @internal */\r\n protected checkScrollbar(): void {\r\n this.isBodyOverflowing = document.body.clientWidth < window.innerWidth;\r\n this.scrollbarWidth = this.getScrollbarWidth();\r\n }\r\n\r\n protected setScrollbar(): void {\r\n if (!document) {\r\n return;\r\n }\r\n\r\n this.originalBodyPadding = parseInt(\r\n window\r\n .getComputedStyle(document.body)\r\n .getPropertyValue('padding-right') || 0,\r\n 10\r\n );\r\n\r\n if (this.isBodyOverflowing) {\r\n document.body.style.paddingRight = `${this.originalBodyPadding +\r\n this.scrollbarWidth}px`;\r\n }\r\n }\r\n\r\n protected resetScrollbar(): void {\r\n document.body.style.paddingRight = this.originalBodyPadding + 'px';\r\n }\r\n\r\n // thx d.walsh\r\n protected getScrollbarWidth(): number {\r\n const scrollDiv = this._renderer.createElement('div');\r\n this._renderer.addClass(scrollDiv, CLASS_NAME.SCROLLBAR_MEASURER);\r\n this._renderer.appendChild(document.body, scrollDiv);\r\n const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\r\n this._renderer.removeChild(document.body, scrollDiv);\r\n\r\n return scrollbarWidth;\r\n }\r\n}\r\n","import {\r\n ComponentRef,\r\n Injectable,\r\n TemplateRef,\r\n EventEmitter, Renderer2, RendererFactory2\r\n} from '@angular/core';\r\n\r\nimport { ComponentLoader } from '../utils/component-loader/component-loader.class';\r\nimport { ComponentLoaderFactory } from '../utils/component-loader/component-loader.factory';\r\nimport { ModalBackdropComponent } from './modal-backdrop.component';\r\nimport { ModalContainerComponent } from './modal-container.component';\r\nimport {\r\n CLASS_NAME,\r\n modalConfigDefaults,\r\n ModalOptions,\r\n TRANSITION_DURATIONS\r\n} from './modal-options.class';\r\nimport { BsModalRef } from './bs-modal-ref.service';\r\n\r\n@Injectable()\r\nexport class BsModalService {\r\n // constructor props\r\n config: ModalOptions = modalConfigDefaults;\r\n\r\n onShow: EventEmitter<any> = new EventEmitter();\r\n onShown: EventEmitter<any> = new EventEmitter();\r\n onHide: EventEmitter<any> = new EventEmitter();\r\n onHidden: EventEmitter<any> = new EventEmitter();\r\n\r\n protected isBodyOverflowing = false;\r\n protected originalBodyPadding = 0;\r\n\r\n protected scrollbarWidth = 0;\r\n\r\n protected backdropRef: ComponentRef<ModalBackdropComponent>;\r\n private _backdropLoader: ComponentLoader<ModalBackdropComponent>;\r\n private modalsCount = 0;\r\n private lastDismissReason = '';\r\n\r\n private loaders: ComponentLoader<ModalContainerComponent>[] = [];\r\n\r\n private _renderer: Renderer2;\r\n\r\n constructor(rendererFactory: RendererFactory2, private clf: ComponentLoaderFactory) {\r\n this._backdropLoader = this.clf.createLoader<ModalBackdropComponent>(\r\n null,\r\n null,\r\n null\r\n );\r\n this._renderer = rendererFactory.createRenderer(null, null);\r\n }\r\n\r\n /** Shows a modal */\r\n show(content: string | TemplateRef<any> | any, config?: ModalOptions): BsModalRef {\r\n this.modalsCount++;\r\n this._createLoaders();\r\n this.config = Object.assign({}, modalConfigDefaults, config);\r\n this._showBackdrop();\r\n this.lastDismissReason = null;\r\n\r\n return this._showModal(content);\r\n }\r\n\r\n hide(level: number) {\r\n if (this.modalsCount === 1) {\r\n this._hideBackdrop();\r\n this.resetScrollbar();\r\n }\r\n this.modalsCount = this.modalsCount >= 1 ? this.modalsCount - 1 : 0;\r\n setTimeout(() => {\r\n this._hideModal(level);\r\n this.removeLoaders(level);\r\n }, this.config.animated ? TRANSITION_DURATIONS.BACKDROP : 0);\r\n }\r\n\r\n _showBackdrop(): void {\r\n const isBackdropEnabled =\r\n this.config.backdrop || this.config.backdrop === 'static';\r\n const isBackdropInDOM =\r\n !this.backdropRef || !this.backdropRef.instance.isShown;\r\n\r\n if (this.modalsCount === 1) {\r\n this.removeBackdrop();\r\n\r\n if (isBackdropEnabled && isBackdropInDOM) {\r\n this._backdropLoader\r\n .attach(ModalBackdropComponent)\r\n .to('body')\r\n .show({ isAnimated: this.config.animated });\r\n this.backdropRef = this._backdropLoader._componentRef;\r\n }\r\n }\r\n }\r\n\r\n _hideBackdrop(): void {\r\n if (!this.backdropRef) {\r\n return;\r\n }\r\n this.backdropRef.instance.isShown = false;\r\n const duration = this.config.animated ? TRANSITION_DURATIONS.BACKDROP : 0;\r\n setTimeout(() => this.removeBackdrop(), duration);\r\n }\r\n\r\n _showModal(content: any): BsModalRef {\r\n const modalLoader = this.loaders[this.loaders.length - 1];\r\n const bsModalRef = new BsModalRef();\r\n const modalContainerRef = modalLoader\r\n .provide({ provide: ModalOptions, useValue: this.config })\r\n .provide({ provide: BsModalRef, useValue: bsModalRef })\r\n .attach(ModalContainerComponent)\r\n .to('body')\r\n .show({content, isAnimated: this.config.animated, initialState: this.config.initialState, bsModalService: this});\r\n modalContainerRef.instance.level = this.getModalsCount();\r\n bsModalRef.hide = () => {\r\n modalContainerRef.instance.hide();\r\n };\r\n bsModalRef.content = modalLoader.getInnerComponent() || null;\r\n\r\n return bsModalRef;\r\n }\r\n\r\n _hideModal(level: number): void {\r\n const modalLoader = this.loaders[level - 1];\r\n if (modalLoader) {\r\n modalLoader.hide();\r\n }\r\n }\r\n\r\n getModalsCount(): number {\r\n return this.modalsCount;\r\n }\r\n\r\n setDismissReason(reason: string) {\r\n this.lastDismissReason = reason;\r\n }\r\n\r\n removeBackdrop(): void {\r\n this._backdropLoader.hide();\r\n this.backdropRef = null;\r\n }\r\n\r\n /** AFTER PR MERGE MODAL.COMPONENT WILL BE USING THIS CODE */\r\n /** Scroll bar tricks */\r\n /** @internal */\r\n checkScrollbar(): void {\r\n this.isBodyOverflowing = document.body.clientWidth < window.innerWidth;\r\n this.scrollbarWidth = this.getScrollbarWidth();\r\n }\r\n\r\n setScrollbar(): void {\r\n if (!document) {\r\n return;\r\n }\r\n\r\n this.originalBodyPadding = parseInt(\r\n window\r\n .getComputedStyle(document.body)\r\n .getPropertyValue('padding-right') || '0',\r\n 10\r\n );\r\n\r\n if (this.isBodyOverflowing) {\r\n document.body.style.paddingRight = `${this.originalBodyPadding +\r\n this.scrollbarWidth}px`;\r\n }\r\n }\r\n\r\n private resetScrollbar(): void {\r\n document.body.style.paddingRight = `${this.originalBodyPadding}px`;\r\n }\r\n\r\n // thx d.walsh\r\n private getScrollbarWidth(): number {\r\n const scrollDiv = this._renderer.createElement('div');\r\n this._renderer.addClass(scrollDiv, CLASS_NAME.SCROLLBAR_MEASURER);\r\n this._renderer.appendChild(document.body, scrollDiv);\r\n const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\r\n this._renderer.removeChild(document.body, scrollDiv);\r\n\r\n return scrollbarWidth;\r\n }\r\n\r\n private _createLoaders(): void {\r\n const loader = this.clf.createLoader<ModalContainerComponent>(\r\n null,\r\n null,\r\n null\r\n );\r\n this.copyEvent(loader.onBeforeShow, this.onShow);\r\n this.copyEvent(loader.onShown, this.onShown);\r\n this.copyEvent(loader.onBeforeHide, this.onHide);\r\n this.copyEvent(loader.onHidden, this.onHidden);\r\n this.loaders.push(loader);\r\n }\r\n\r\n private removeLoaders(level: number): void {\r\n this.loaders.splice(level - 1, 1);\r\n this.loaders.forEach(\r\n (loader: ComponentLoader<ModalContainerComponent>, i: number) => {\r\n loader.instance.level = i + 1;\r\n }\r\n );\r\n }\r\n\r\n private copyEvent(from: EventEmitter<any>, to: EventEmitter<any>) {\r\n from.subscribe(() => {\r\n to.emit(this.lastDismissReason);\r\n });\r\n }\r\n}\r\n","import { NgModule, ModuleWithProviders } from '@angular/core';\r\n\r\nimport { ModalBackdropComponent } from './modal-backdrop.component';\r\nimport { ModalDirective } from './modal.directive';\r\nimport { PositioningService } from '../utils/positioning/index';\r\nimport { ComponentLoaderFactory } from '../utils/component-loader/index';\r\nimport { ModalContainerComponent } from './modal-container.component';\r\nimport { BsModalService } from './bs-modal.service';\r\n\r\n@NgModule({\r\n declarations: [\r\n ModalBackdropComponent,\r\n ModalDirective,\r\n ModalContainerComponent\r\n ],\r\n exports: [ModalBackdropComponent, ModalDirective],\r\n entryComponents: [ModalBackdropComponent, ModalContainerComponent]\r\n})\r\nexport class ModalModule {\r\n static forRoot(): ModuleWithProviders {\r\n return {\r\n ngModule: ModalModule,\r\n providers: [BsModalService, ComponentLoaderFactory, PositioningService]\r\n };\r\n }\r\n}\r\n","import {ElementRef, EventEmitter, Injectable, OnDestroy} from '@angular/core';\r\nimport {BsDropdownDirective} from '../dropdown/index';\r\nimport {Subscription} from 'rxjs/Subscription';\r\nimport {BsDropdownState} from '../dropdown/dropdown.state';\r\nimport {DropdownItemDirective} from '../dropdown/dropdown-item.directive';\r\n\r\n@Injectable()\r\nexport class NavbarState implements OnDestroy {\r\n private dropdownInstances: BsDropdownDirective[] = [];\r\n private menuItems: DropdownItemDirective[] = [];\r\n private subscriptions: Subscription[] = [];\r\n\r\n private level1Dropdown: BsDropdownDirective; // å½åä¸æèåç主èåï¼\r\n private level2Dropdown: BsDropdownDirective; // å½åä¸æèåçåèå\r\n\r\n onItemClick = new EventEmitter<string>();\r\n\r\n autoClose: boolean;\r\n\r\n constructor() {\r\n\r\n }\r\n\r\n addDropdown(dropdown: BsDropdownDirective): void {\r\n if (!this.dropdownInstances.find((item) => item === dropdown)) {\r\n this.dropdownInstances.push(dropdown);\r\n this.subscribeDropdown(dropdown);\r\n dropdown.onShown.subscribe(() => setTimeout(() => {\r\n dropdown.childDropdowns.forEach((item: BsDropdownDirective) => this.addDropdown(item));\r\n }));\r\n }\r\n }\r\n\r\n addMenuItem(menuItem: DropdownItemDirective): void {\r\n if (!this.menuItems.find((item) => item === menuItem)) {\r\n this.menuItems.push(menuItem);\r\n this.subscribeMenuItem(menuItem);\r\n }\r\n }\r\n\r\n private subscribeDropdown(dropdown: BsDropdownDirective): void {\r\n // å¨ä¸æèåæ¾ç¤ºãéèæ¶ï¼è®°å½ä¸æ¾ç¤ºç¶æã\r\n // this.subscriptions.push(\r\n // dropdown.onShown.subscribe((value) => {\r\n // debugger;\r\n // if(dropdown.isSubMenu) {\r\n //\r\n // }\r\n // })\r\n // );\r\n //\r\n // this.subscriptions.push(\r\n // dropdown.onHidden.subscribe((value) => {\r\n //\r\n // })\r\n // );\r\n\r\n this.subscriptions.push(\r\n dropdown.state.onClick.subscribe((event: Event) => {\r\n if (dropdown.level === 1) {\r\n if (dropdown.isOpen && this.level1Dropdown === dropdown) {\r\n this.innerHideL1Dropdown();\r\n } else {\r\n this.innerShowL1Dropdown(dropdown);\r\n }\r\n } else if (dropdown.level === 2) {\r\n if (!dropdown.isOpen || this.level2Dropdown !== dropdown) {\r\n this.innerShowL2Dropdown(dropdown);\r\n }\r\n }\r\n event.stopPropagation();\r\n })\r\n );\r\n\r\n this.subscriptions.push(\r\n dropdown.state.onHover.subscribe(() => {\r\n if (!this.level1Dropdown) {\r\n // èå没å±å¼ï¼é¼ æ æ¬å没æææ\r\n return;\r\n }\r\n this.show(dropdown);\r\n })\r\n );\r\n }\r\n\r\n private subscribeMenuItem(menuItem: DropdownItemDirective): void {\r\n this.subscriptions.push(\r\n menuItem.onHover.subscribe(() => {\r\n if (!this.level1Dropdown) {\r\n return;\r\n }\r\n if (this.level1Dropdown.containsItem(menuItem)) {\r\n this.innerHideL2Dropdown();\r\n }\r\n })\r\n );\r\n\r\n this.subscriptions.push(\r\n menuItem.onClick.subscribe((command: string) => {\r\n this.onItemClick.emit(command);\r\n })\r\n );\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subscriptions.forEach((sub) => {\r\n sub.unsubscribe();\r\n });\r\n }\r\n\r\n hideCurrentDropdown(): void {\r\n if (this.level2Dropdown) {\r\n this.innerHideL2Dropdown();\r\n } else {\r\n this.innerHideL1Dropdown();\r\n }\r\n }\r\n\r\n hideAllDropdown(): void {\r\n this.innerHideL2Dropdown();\r\n this.innerHideL1Dropdown();\r\n }\r\n\r\n show(dropdown: BsDropdownDirective): void {\r\n if (dropdown.level === 1) {\r\n if (dropdown !== this.level1Dropdown) {\r\n this.innerShowL1Dropdown(dropdown);\r\n }\r\n this.innerHideL2Dropdown();\r\n } else if (dropdown.level === 2) {\r\n if (dropdown !== this.level2Dropdown) {\r\n this.innerShowL2Dropdown(dropdown);\r\n }\r\n }\r\n\r\n\r\n\r\n ///////////////////////////////\r\n /*if (this.isMenuShown && this.isSubMenuShown && this.parentDropdown && this.parentDropdown.containsItem(dropdown)) {\r\n // è¦æ¾ç¤ºçæ¯åèåï¼ä¸æ¯å½ååèå\r\n if (this.currentDropdown && this.currentDropdown !== dropdown) {\r\n this.currentDropdown.hide();\r\n }\r\n dropdown.show();\r\n this.currentDropdown = dropdown;\r\n this.isSubMenuShown = true;\r\n } else if (this.isMenuShown && !this.isSubMenuShown && this.currentDropdown && this.currentDropdown.containsItem(dropdown)) {\r\n\r\n } else {\r\n // 主èå\r\n if (this.isSubMenuShown && this.currentDropdown && this.parentDropdown) {\r\n this.currentDropdown.hide();\r\n this.currentDropdown = null;\r\n this.isSubMenuShown = false;\r\n }\r\n if (this.isMenuShown && this.currentDropdown && this.currentDropdown !== dropdown) {\r\n this.currentDropdown.hide();\r\n }\r\n dropdown.show();\r\n this.currentDropdown = dropdown;\r\n this.isMenuShown = true;\r\n }*/\r\n }\r\n\r\n hide(dropdown: BsDropdownDirective): void {\r\n // if\r\n }\r\n\r\n private innerShowL1Dropdown(target: BsDropdownDirective): void {\r\n if (this.level1Dropdown) {\r\n this.level1Dropdown.hide();\r\n }\r\n target.show();\r\n this.level1Dropdown = target;\r\n }\r\n\r\n private innerHideL1Dropdown(): void {\r\n if (this.level1Dropdown) {\r\n this.level1Dropdown.hide();\r\n this.level1Dropdown = null;\r\n }\r\n }\r\n\r\n private innerShowL2Dropdown(target: BsDropdownDirective): void {\r\n if (this.level2Dropdown) {\r\n this.level2Dropdown.hide();\r\n }\r\n target.show();\r\n this.level2Dropdown = target;\r\n }\r\n\r\n private innerHideL2Dropdown(): void {\r\n if (this.level2Dropdown) {\r\n this.level2Dropdown.hide();\r\n this.level2Dropdown = null;\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n/** Default dropdown configuration */\r\n@Injectable()\r\nexport class BsDropdownConfig {\r\n /** default dropdown auto closing behavior */\r\n autoClose = true;\r\n}\r\n","import {ElementRef, EventEmitter, Injectable} from '@angular/core';\r\nimport { BsComponentRef } from '../utils/component-loader/bs-component-ref.class';\r\n\r\n@Injectable()\r\nexport class BsDropdownState {\r\n direction: 'down' | 'up' = 'down';\r\n autoClose: boolean;\r\n isOpenChange = new EventEmitter<boolean>();\r\n isDisabledChange = new EventEmitter<boolean>();\r\n toggleClick = new EventEmitter<boolean>();\r\n onHover = new EventEmitter<any>();\r\n onClick = new EventEmitter<Event>();\r\n\r\n /**\r\n * Content to be displayed as popover.\r\n */\r\n dropdownMenu: Promise<BsComponentRef<any>>;\r\n resolveDropdownMenu: (componentRef: BsComponentRef<any>) => void;\r\n\r\n constructor() {\r\n this.dropdownMenu = new Promise((resolve) => {\r\n this.resolveDropdownMenu = resolve;\r\n });\r\n }\r\n }\r\n","import { window } from './facade/browser';\r\n\r\nexport function isBs3(): boolean {\r\n return window.__theme === 'bs4';\r\n}\r\n","import {\r\n ChangeDetectionStrategy, Component, OnDestroy, HostBinding, ChangeDetectorRef, Renderer2,\r\n ElementRef\r\n} from '@angular/core';\r\nimport { BsDropdownState } from './dropdown.state';\r\nimport {isBs3} from '../utils/ng2-bootstrap-config';\r\n\r\n@Component({\r\n selector: 'mdb-dropdown-container',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n <div [class.dropup]=\"direction === 'up'\"\r\n [class.dropdown]=\"direction === 'down'\"\r\n [class.show]=\"isOpen\"\r\n [class.open]=\"isOpen\">\r\n <ng-content></ng-content>\r\n </div>\r\n `\r\n})\r\nexport class BsDropdownContainerComponent implements OnDestroy {\r\n isOpen = false;\r\n\r\n @HostBinding('style.display') display = 'block';\r\n @HostBinding('style.position') position = 'absolute';\r\n\r\n get direction(): 'down' | 'up' {\r\n return this._state.direction;\r\n }\r\n\r\n private _subscription: any;\r\n\r\n constructor(\r\n private _state: BsDropdownState,\r\n private cd: ChangeDetectorRef,\r\n private _renderer: Renderer2,\r\n _element: ElementRef\r\n ) {\r\n this._subscription = _state.isOpenChange.subscribe((value: boolean) => {\r\n this.isOpen = value;\r\n const dropdown = _element.nativeElement.querySelector('.dropdown-menu');\r\n if (dropdown && !isBs3()) {\r\n this._renderer.addClass(dropdown, 'show');\r\n if (dropdown.classList.contains('dropdown-menu-right')) {\r\n this._renderer.setStyle(dropdown, 'left', 'auto');\r\n this._renderer.setStyle(dropdown, 'right', '0');\r\n }\r\n if (this.direction === 'up') {\r\n this._renderer.setStyle(dropdown, 'top', 'auto');\r\n this._renderer.setStyle(\r\n dropdown,\r\n 'transform',\r\n 'translateY(-101%)'\r\n );\r\n }\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n}\r\n","// tslint:disable:max-file-line-count\r\nimport {\r\n ContentChildren,\r\n Directive, ElementRef, EmbeddedViewRef, EventEmitter, Input, OnDestroy,\r\n OnInit, Output, Renderer2, ViewContainerRef\r\n} from '@angular/core';\r\nimport { filter } from 'rxjs/operators';\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { ComponentLoader, ComponentLoaderFactory } from '../utils/component-loader/index';\r\n\r\nimport { BsDropdownConfig } from './dropdown.config';\r\nimport { BsDropdownContainerComponent } from './dropdown-container.component';\r\nimport { BsDropdownState } from './dropdown.state';\r\nimport { BsComponentRef } from '../utils/component-loader/bs-component-ref.class';\r\nimport { BsDropdownMenuDirective } from '.';\r\nimport { isBs3 } from '../utils/ng2-bootstrap-config';\r\nimport {DropdownItemDirective} from './dropdown-item.directive';\r\n\r\n@Directive({\r\n selector: '[mdbDropdown],[dropdown]',\r\n exportAs: 'bs-dropdown',\r\n providers: [BsDropdownState],\r\n host: {\r\n '[class.dropup]': 'dropup',\r\n '[class.open]': 'isOpen',\r\n '[class.show]': 'isOpen && isBs4'\r\n }\r\n})\r\nexport class BsDropdownDirective implements OnInit, OnDestroy {\r\n /**\r\n * Placement of a popover. Accepts: \"top\", \"bottom\", \"left\", \"right\"\r\n */\r\n @Input() placement: string;\r\n /**\r\n * Specifies events that should trigger. Supports a space separated list of\r\n * event names.\r\n */\r\n @Input() triggers: string;\r\n /**\r\n * A selector specifying the element the popover should be appended to.\r\n * Currently only supports \"body\".\r\n */\r\n @Input() container: string;\r\n\r\n /**\r\n * This attribute indicates that the dropdown should be opened upwards\r\n */\r\n @Input() dropup: boolean;\r\n\r\n /**\r\n * Indicates that dropdown will be closed on item or document click,\r\n * and after pressing ESC\r\n */\r\n @Input()\r\n set autoClose(value: boolean) {\r\n this._state.autoClose = value;\r\n }\r\n\r\n get autoClose(): boolean {\r\n return this._state.autoClose;\r\n }\r\n\r\n /**\r\n * Disables dropdown toggle and hides dropdown menu if opened\r\n */\r\n @Input()\r\n set isDisabled(value: boolean) {\r\n this._isDisabled = value;\r\n this._state.isDisabledChange.emit(value);\r\n if (value) {\r\n this.hide();\r\n }\r\n }\r\n\r\n get isDisabled(): boolean {\r\n return this._isDisabled;\r\n }\r\n\r\n /**\r\n * Returns whether or not the popover is currently being shown\r\n */\r\n @Input()\r\n get isOpen(): boolean {\r\n if (this._showInline) {\r\n return this._isInlineOpen;\r\n }\r\n\r\n return this._dropdown.isShown;\r\n }\r\n\r\n set isOpen(value: boolean) {\r\n if (value) {\r\n this.show();\r\n } else {\r\n this.hide();\r\n }\r\n }\r\n\r\n get state(): BsDropdownState {\r\n return this._state;\r\n }\r\n\r\n private _level: number;\r\n\r\n @Input('dropdown')\r\n set level(value: number) {\r\n this._level = value;\r\n }\r\n\r\n get level(): number {\r\n return this._level || 1;\r\n }\r\n\r\n get elementRef(): ElementRef {\r\n return this._elementRef;\r\n }\r\n\r\n /**\r\n * Emits an event when isOpen change\r\n */\r\n @Output() isOpenChange: EventEmitter<any>;\r\n\r\n /**\r\n * Emits an event when the popover is shown\r\n */\r\n @Output() onShown: EventEmitter<any>;\r\n\r\n /**\r\n * Emits an event when the popover is hidden\r\n */\r\n @Output() onHidden: EventEmitter<any>;\r\n\r\n @ContentChildren(BsDropdownDirective) childDropdowns;\r\n\r\n get isBs4(): boolean {\r\n return !isBs3();\r\n }\r\n\r\n // todo: move to component loader\r\n private _isInlineOpen = false;\r\n\r\n private get _showInline(): boolean {\r\n return !this.container;\r\n }\r\n\r\n // private _inlinedMenu: EmbeddedViewRef<BsDropdownMenuDirective>;\r\n private _inlinedMenu: EmbeddedViewRef<BsDropdownContainerComponent>;\r\n\r\n private _isDisabled: boolean;\r\n private _dropdown: ComponentLoader<BsDropdownContainerComponent>;\r\n private _subscriptions: Subscription[] = [];\r\n private _isInited = false;\r\n\r\n constructor(private _elementRef: ElementRef,\r\n private _renderer: Renderer2,\r\n private _viewContainerRef: ViewContainerRef,\r\n private _cis: ComponentLoaderFactory,\r\n private _config: BsDropdownConfig,\r\n private _state: BsDropdownState) {\r\n\r\n // set initial dropdown state from config\r\n this._state.autoClose = this._config.autoClose;\r\n\r\n // create dropdown component loader\r\n this._dropdown = this._cis\r\n .createLoader<BsDropdownContainerComponent>(\r\n this._elementRef,\r\n this._viewContainerRef,\r\n this._renderer\r\n )\r\n .provide({provide: BsDropdownState, useValue: this._state});\r\n\r\n this.onShown = this._dropdown.onShown;\r\n this.onHidden = this._dropdown.onHidden;\r\n this.isOpenChange = this._state.isOpenChange;\r\n // this.onToggleHover = this._state.onHover;\r\n // barState.addDropdown(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n // fix: seems there are an issue with `routerLinkActive`\r\n // which result in duplicated call ngOnInit without call to ngOnDestroy\r\n // read more: https://github.com/valor-software/ngx-bootstrap/issues/1885\r\n if (this._isInited) {\r\n return;\r\n }\r\n this._isInited = true;\r\n\r\n // attach DOM listeners\r\n this._dropdown.listen({\r\n // because of dropdown inline mode\r\n outsideClick: false,\r\n triggers: this.triggers,\r\n show: () => this.show(), toggle: (value: boolean) => this.toggle(value)\r\n });\r\n\r\n // toggle visibility on toggle element click\r\n this._subscriptions.push(\r\n this._state.toggleClick.subscribe((value: boolean) => this.toggle(value))\r\n );\r\n\r\n // hide dropdown if set disabled while opened\r\n this._subscriptions.push(\r\n this._state.isDisabledChange.pipe(\r\n filter((value: boolean) => value)\r\n )\r\n .subscribe((value: boolean) => this.hide())\r\n );\r\n }\r\n\r\n /**\r\n * Opens an elementâs popover. This is considered a âmanualâ triggering of\r\n * the popover.\r\n */\r\n show(): void {\r\n if (this.isOpen || this.isDisabled) {\r\n return;\r\n }\r\n\r\n if (this._showInline) {\r\n if (!this._inlinedMenu) {\r\n this._state.dropdownMenu.then(\r\n (dropdownMenu: BsComponentRef<BsDropdownMenuDirective>) => {\r\n const _placement = this.placement || 'bottom left';\r\n this._dropdown.attachInline(\r\n dropdownMenu.viewContainer,\r\n dropdownMenu.templateRef\r\n );\r\n this._inlinedMenu = this._dropdown._inlineViewRef;\r\n this.addBs4Polyfills();\r\n }\r\n )\r\n // swallow errors\r\n .catch();\r\n }\r\n this.addBs4Polyfills();\r\n this._isInlineOpen = true;\r\n this.onShown.emit(true);\r\n this._state.isOpenChange.emit(true);\r\n\r\n return;\r\n }\r\n this._state.dropdownMenu.then(dropdownMenu => {\r\n // check direction in which dropdown should be opened\r\n const _dropup =\r\n this.dropup ||\r\n (typeof this.dropup !== 'undefined' && this.dropup);\r\n this._state.direction = _dropup ? 'up' : 'down';\r\n const _placement =\r\n this.placement || (_dropup ? 'top left' : 'bottom left');\r\n\r\n // show dropdown\r\n this._dropdown\r\n .attach(BsDropdownContainerComponent)\r\n .to(this.container)\r\n .position({attachment: _placement})\r\n .show({\r\n content: dropdownMenu.templateRef,\r\n placement: _placement\r\n });\r\n\r\n this._state.isOpenChange.emit(true);\r\n })\r\n // swallow error\r\n .catch();\r\n }\r\n\r\n /**\r\n * Closes an elementâs popover. This is considered a âmanualâ triggering of\r\n * the popover.\r\n */\r\n hide(): void {\r\n if (!this.isOpen) {\r\n return;\r\n }\r\n\r\n if (this._showInline) {\r\n this.removeShowClass();\r\n this.removeDropupStyles();\r\n this._isInlineOpen = false;\r\n this.onHidden.emit(true);\r\n } else {\r\n this._dropdown.hide();\r\n }\r\n\r\n this._state.isOpenChange.emit(false);\r\n }\r\n\r\n /**\r\n * Toggles an elementâs popover. This is considered a âmanualâ triggering of\r\n * the popover. With parameter <code>true</code> allows toggling, with parameter <code>false</code>\r\n * only hides opened dropdown. Parameter usage will be removed in ngx-bootstrap v3\r\n */\r\n toggle(value?: boolean): void {\r\n if (this.isOpen || !value) {\r\n return this.hide();\r\n }\r\n\r\n return this.show();\r\n }\r\n\r\n containsItem(item: BsDropdownDirective | DropdownItemDirective): boolean {\r\n return this._elementRef.nativeElement.contains(item.elementRef.nativeElement);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n // clean up subscriptions and destroy dropdown\r\n for (const sub of this._subscriptions) {\r\n sub.unsubscribe();\r\n }\r\n this._dropdown.dispose();\r\n }\r\n\r\n private addBs4Polyfills(): void {\r\n if (!isBs3()) {\r\n this.addShowClass();\r\n this.checkRightAlignment();\r\n this.addDropupStyles();\r\n }\r\n }\r\n\r\n private addShowClass(): void {\r\n if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) {\r\n this._renderer.addClass(this._inlinedMenu.rootNodes[0], 'show');\r\n }\r\n }\r\n\r\n private removeShowClass(): void {\r\n if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) {\r\n this._renderer.removeClass(this._inlinedMenu.rootNodes[0], 'show');\r\n }\r\n }\r\n\r\n private checkRightAlignment(): void {\r\n if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) {\r\n const isRightAligned = this._inlinedMenu.rootNodes[0].classList.contains(\r\n 'dropdown-menu-right'\r\n );\r\n this._renderer.setStyle(\r\n this._inlinedMenu.rootNodes[0],\r\n 'left',\r\n isRightAligned ? 'auto' : '0'\r\n );\r\n this._renderer.setStyle(\r\n this._inlinedMenu.rootNodes[0],\r\n 'right',\r\n isRightAligned ? '0' : 'auto'\r\n );\r\n }\r\n }\r\n\r\n private addDropupStyles(): void {\r\n if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) {\r\n // a little hack to not break support of bootstrap 4 beta\r\n this._renderer.setStyle(\r\n this._inlinedMenu.rootNodes[0],\r\n 'top',\r\n this.dropup ? 'auto' : '100%'\r\n );\r\n this._renderer.setStyle(\r\n this._inlinedMenu.rootNodes[0],\r\n 'transform',\r\n this.dropup ? 'translateY(-101%)' : 'translateY(0)'\r\n );\r\n }\r\n }\r\n\r\n private removeDropupStyles(): void {\r\n if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) {\r\n this._renderer.removeStyle(this._inlinedMenu.rootNodes[0], 'top');\r\n this._renderer.removeStyle(this._inlinedMenu.rootNodes[0], 'transform');\r\n }\r\n }\r\n}\r\n","import { Directive, TemplateRef, ViewContainerRef } from '@angular/core';\r\nimport { BsDropdownState } from './dropdown.state';\r\n\r\n@Directive({\r\n selector: '[mdbDropdownMenu],[dropdownMenu]',\r\n exportAs: 'bs-dropdown-menu'\r\n})\r\nexport class BsDropdownMenuDirective {\r\n constructor(_state: BsDropdownState,\r\n _viewContainer: ViewContainerRef,\r\n _templateRef: TemplateRef<any>) {\r\n _state.resolveDropdownMenu({\r\n templateRef: _templateRef,\r\n viewContainer: _viewContainer\r\n });\r\n }\r\n}\r\n","import {Directive, ElementRef, HostBinding, HostListener, OnDestroy} from '@angular/core';\r\nimport {Subscription} from 'rxjs/Subscription';\r\n\r\nimport {BsDropdownState} from './dropdown.state';\r\n\r\n@Directive({\r\n selector: '[mdbDropdownToggle],[dropdownToggle]',\r\n exportAs: 'bs-dropdown-toggle'\r\n})\r\nexport class BsDropdownToggleDirective implements OnDestroy {\r\n @HostBinding('attr.aria-haspopup') ariaHaspopup = true;\r\n @HostBinding('attr.disabled') isDisabled: boolean = null;\r\n // @HostBinding('class.active')\r\n @HostBinding('attr.aria-expanded') isOpen: boolean;\r\n\r\n private _subscriptions: Subscription[] = [];\r\n\r\n constructor(private _state: BsDropdownState, private _element: ElementRef) {\r\n // sync is open value with state\r\n this._subscriptions.push(\r\n this._state.isOpenChange.subscribe(\r\n (value: boolean) => (this.isOpen = value)\r\n )\r\n );\r\n // populate disabled state\r\n this._subscriptions.push(\r\n this._state.isDisabledChange.subscribe(\r\n (value: boolean) => (this.isDisabled = value || null)\r\n )\r\n );\r\n }\r\n\r\n @HostListener('click', [])\r\n onClick(): void {\r\n if (this.isDisabled) {\r\n return;\r\n }\r\n this._state.toggleClick.emit(true);\r\n }\r\n\r\n @HostListener('document:click', ['$event'])\r\n onDocumentClick(event: any): void {\r\n if (\r\n this._state.autoClose &&\r\n event.button !== 2 &&\r\n !this._element.nativeElement.contains(event.target)\r\n ) {\r\n this._state.toggleClick.emit(false);\r\n }\r\n }\r\n\r\n @HostListener('keyup.esc')\r\n onEsc(): void {\r\n if (this._state.autoClose) {\r\n this._state.toggleClick.emit(false);\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n for (const sub of this._subscriptions) {\r\n sub.unsubscribe();\r\n }\r\n }\r\n}\r\n","import {Directive, ElementRef, HostBinding, HostListener, Input, OnDestroy} from '@angular/core';\r\nimport {Subscription} from 'rxjs/Subscription';\r\nimport {BsDropdownState} from './dropdown.state';\r\n\r\n@Directive({\r\n selector: '[dropdownButton]'\r\n})\r\nexport class DropdownButtonDirective implements OnDestroy {\r\n\r\n private _subscriptions: Subscription[] = [];\r\n\r\n @HostBinding('class.disabled') @Input() isDisabled: boolean = null;\r\n @HostBinding('attr.aria-expanded') isOpen: boolean;\r\n\r\n @HostListener('click', ['$event'])\r\n onClick(event: Event): void {\r\n if (this.isDisabled) {\r\n return;\r\n }\r\n this._state.onClick.emit(event);\r\n }\r\n\r\n @HostListener('mouseover')\r\n onHover(): void {\r\n if (this.isDisabled) {\r\n return;\r\n }\r\n this._state.onHover.emit();\r\n }\r\n\r\n constructor(private _state: BsDropdownState,\r\n private _element: ElementRef) {\r\n // åæ¥èåçæå¼ç¶æ\r\n this._subscriptions.push(this._state.isOpenChange\r\n .subscribe((value: boolean) => this.isOpen = value)\r\n );\r\n // åæ¥èåçç¦ç¨ç¶æ\r\n this._subscriptions.push(this._state.isDisabledChange\r\n .subscribe((value: boolean) => this.isDisabled = value || null)\r\n );\r\n }\r\n\r\n ngOnDestroy() {\r\n for (const sub of this._subscriptions) {\r\n sub.unsubscribe();\r\n }\r\n }\r\n\r\n}\r\n","import {Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input} from '@angular/core';\r\nimport {NavbarState} from '../navbar/navbar.state';\r\n\r\n@Directive({\r\n selector: '[dropdownItem]',\r\n exportAs: 'dropdownItem'\r\n})\r\nexport class DropdownItemDirective {\r\n\r\n @HostBinding('class.disabled') @Input() isDisabled: boolean = null;\r\n\r\n @Input('dropdownItem') command;\r\n\r\n get elementRef(): ElementRef {\r\n return this._elementRef;\r\n }\r\n\r\n\r\n onHover = new EventEmitter<any>();\r\n onClick = new EventEmitter<string>();\r\n\r\n constructor(private _elementRef: ElementRef,\r\n private barState: NavbarState) {\r\n this.barState.addMenuItem(this);\r\n }\r\n\r\n @HostListener('mouseover')\r\n onMouseOver(): void {\r\n this.onHover.emit();\r\n }\r\n\r\n @HostListener('click')\r\n onItemClick(): void {\r\n if (this.isDisabled) {\r\n return;\r\n }\r\n this.onClick.emit(this.command);\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {ComponentLoaderFactory} from '../utils/component-loader/index';\r\n\r\nimport {PositioningService} from '../utils/positioning/index';\r\nimport {BsDropdownContainerComponent} from './dropdown-container.component';\r\nimport {BsDropdownMenuDirective} from './dropdown-menu.directive';\r\nimport {BsDropdownToggleDirective} from './dropdown-toggle.directive';\r\nimport {BsDropdownConfig} from './dropdown.config';\r\n\r\nimport {BsDropdownDirective} from './dropdown.directive';\r\nimport {BsDropdownState} from './dropdown.state';\r\nimport {NavbarState} from '../navbar/navbar.state';\r\nimport { DropdownButtonDirective } from './dropdown-button.directive';\r\nimport { DropdownItemDirective } from './dropdown-item.directive';\r\n\r\n@NgModule({\r\n declarations: [\r\n BsDropdownMenuDirective,\r\n BsDropdownToggleDirective,\r\n BsDropdownContainerComponent,\r\n BsDropdownDirective,\r\n DropdownButtonDirective,\r\n DropdownItemDirective\r\n ],\r\n exports: [\r\n BsDropdownMenuDirective,\r\n BsDropdownToggleDirective,\r\n BsDropdownDirective,\r\n DropdownButtonDirective,\r\n DropdownItemDirective\r\n ],\r\n entryComponents: [BsDropdownContainerComponent]\r\n})\r\nexport class BsDropdownModule {\r\n public static forRoot(config?: any): ModuleWithProviders {\r\n return {\r\n ngModule: BsDropdownModule, providers: [\r\n ComponentLoaderFactory,\r\n PositioningService,\r\n BsDropdownState,\r\n {provide: BsDropdownConfig, useValue: config ? config : {autoClose: true}}\r\n ]\r\n };\r\n }\r\n}\r\n","import {\r\n AfterContentChecked,\r\n AfterViewChecked, AfterViewInit,\r\n ContentChildren,\r\n Directive,\r\n EventEmitter,\r\n HostListener, OnChanges,\r\n OnInit,\r\n QueryList, ViewChildren\r\n} from '@angular/core';\r\nimport {NavbarState} from './navbar.state';\r\nimport {ElementRef} from '@angular/core';\r\nimport {BsDropdownConfig} from '../dropdown/dropdown.config';\r\nimport {BsDropdownDirective} from '../dropdown/index';\r\n\r\n@Directive({\r\n selector: '[navbar]',\r\n exportAs: 'navbar',\r\n providers: [NavbarState]\r\n})\r\nexport class NavbarDirective implements OnInit, AfterViewInit {\r\n\r\n onItemClick: EventEmitter<string>;\r\n\r\n @ContentChildren(BsDropdownDirective) childDropdowns: QueryList<BsDropdownDirective>;\r\n @ViewChildren(BsDropdownDirective) childDropdowns2: QueryList<BsDropdownDirective>;\r\n @HostListener('document:click', ['$event'])\r\n onDocumentClick(event: any): void {\r\n this._state.hideAllDropdown();\r\n }\r\n\r\n @HostListener('keyup.esc')\r\n onEsc(): void {\r\n if (this._state.autoClose) {\r\n this._state.hideCurrentDropdown();\r\n }\r\n }\r\n\r\n constructor(private _elementRef: ElementRef,\r\n private _config: BsDropdownConfig,\r\n private _state: NavbarState) {\r\n this._state.autoClose = this._config.autoClose;\r\n this.onItemClick = this._state.onItemClick;\r\n }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.childDropdowns.forEach((item: BsDropdownDirective) => this._state.addDropdown(item));\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { NavbarDirective } from './navbar.directive';\r\nimport { NavbarState } from './navbar.state';\r\n\r\n@NgModule({\r\n declarations: [NavbarDirective],\r\n providers: [NavbarState],\r\n exports: [NavbarDirective]\r\n})\r\nexport class NavbarModule { }\r\n","export const TREE_EVENTS = {\r\n onToggle: 'onToggle',\r\n onActiveChanged: 'onActiveChanged',\r\n onActivate: 'onActivate',\r\n onDeactivate: 'onDeactivate',\r\n onFocus: 'onFocus',\r\n onBlur: 'onBlur',\r\n onDoubleClick: 'onDoubleClick',\r\n onContextMenu: 'onContextMenu',\r\n onInitialized: 'onInitialized',\r\n onUpdateData: 'onUpdateData',\r\n onMoveNode: 'onMoveNode',\r\n onAddNode: 'onAddNode',\r\n onRemoveNode: 'onRemoveNode',\r\n onRightMenuClicked: 'onRightMenuClicked'\r\n}","import { ElementRef } from '@angular/core';\r\nimport { TreeModel } from './tree-model';\r\nimport { TREE_EVENTS } from '../constants/events';\r\nimport { TreeOptions } from './tree-options';\r\n\r\nexport class TreeNode{\r\n private _isExpanded: boolean;\r\n get isExpanded(){return this._isExpanded}\r\n set isExpanded(value){this._isExpanded = value}\r\n get isCollapsed(){return !this._isExpanded}\r\n\r\n treeModel: TreeModel;\r\n parent: TreeNode;\r\n level: number;\r\n isVirtualRoot: boolean = false;\r\n elementRef:ElementRef;\r\n \r\n _isActive: boolean = false;\r\n get isActive(){\r\n return this._isActive;\r\n }\r\n set isActive(value){\r\n this._isActive = value;\r\n }\r\n\r\n constructor(public data, parent: TreeNode = null, treeModel: TreeModel){\r\n \r\n Object.assign( this, data, {parent,treeModel} );\r\n \r\n this.treeModel = treeModel;\r\n this.parent = parent;\r\n this.level = this.parent ? this.parent.level + 1 : 0;\r\n if(this.isExpandedField) {\r\n this.isExpanded = true;\r\n }\r\n \r\n // éªè¯å段添å \r\n // console.log(this.idField);\r\n // console.log(this.typeField);\r\n \r\n this.childrenField = this.childrenField.map(child => new TreeNode(child,this,treeModel) );\r\n }\r\n\r\n // Proxy of treeModel\r\n get options(): TreeOptions{ \r\n return this.treeModel.options \r\n }\r\n fireEvent(event) { \r\n this.treeModel.fireEvent(event)\r\n }\r\n\r\n // 表ç°çæ´åä¸ä¸ªå段ï¼å°å
¶å°è£
æå±æ§ï¼å¹¶æ ¹æ®å¼æ¾ç读åæéï¼è®¾ç½®get/set\r\n get idField() {\r\n return this[this.options.idField];\r\n }\r\n \r\n set idField(value) {\r\n this[this.options.idField] = value;\r\n }\r\n\r\n get childrenField() {\r\n return this[this.options.childrenField] || [];\r\n }\r\n \r\n set childrenField(value) {\r\n this[this.options.childrenField] = value;\r\n }\r\n\r\n get displayField(){\r\n return this[this.options.displayField];\r\n }\r\n\r\n get typeField(){\r\n return this[this.options.typeField];\r\n }\r\n\r\n set typeField(value){\r\n this[this.options.typeField] = value;\r\n }\r\n\r\n get isExpandedField(){\r\n return this[this.options.isExpandedField];\r\n }\r\n set isExpandedField(value){\r\n this[this.options.isExpandedField] = value;\r\n }\r\n\r\n allowDrag() {//表ç°çæ´åä¸ä¸ªå¨ä½ï¼å°å
¶å°è£
ææ¹æ³\r\n return this.options.allowDrag;\r\n }\r\n\r\n enableCustomContextMenu() {\r\n return this.options.enableCustomContextMenu;\r\n }\r\n\r\n get isRoot() { return this.parent.isVirtualRoot }//ç¶èç¹ä¸ºç©ºï¼è¡¨ç¤ºè¿ä¸ªä¸ä¸ªæ ¹èç¹\r\n get realParent() { return this.isRoot ? null : this.parent }\r\n get isLeaf() { return !this.childrenField.length }\r\n get hasChildren() { return !this.isLeaf }\r\n get isFocused(){return this.treeModel.focusedNode == this}\r\n\r\n getFirstChild() {\r\n return this.childrenField && this.childrenField[0];\r\n }\r\n\r\n getLastChild() {\r\n return this.childrenField && this.childrenField[this.childrenField.length-1];\r\n }\r\n \r\n private _getIndexInParent() {\r\n return this.parent && this.parent.childrenField.indexOf(this);\r\n }\r\n\r\n findAdjacentSibling(steps) {\r\n let index = this._getIndexInParent();\r\n return this.parent && this.parent.childrenField[index + steps];\r\n }\r\n \r\n findNextSibling() {\r\n return this.findAdjacentSibling(+1);\r\n }\r\n findPreviousSibling() {\r\n return this.findAdjacentSibling(-1);\r\n }\r\n\r\n findNextNode(goInside = true) {// æ¥æ¾Next Nodeæ¶ï¼é»è®¤è¿è¡å
é¨æ¥æ¾\r\n return goInside && this.isExpanded && this.getFirstChild() ||\r\n this.findNextSibling() ||\r\n this.parent && this.parent.findNextNode(false);\r\n }\r\n\r\n findPreviousNode() {\r\n let previousSibling = this.findPreviousSibling();\r\n if (!previousSibling) {\r\n return this.realParent;\r\n }\r\n return previousSibling.isCollapsed\r\n ? previousSibling\r\n : previousSibling.getLastChild();\r\n }\r\n\r\n isDescendantOf(node: TreeNode) {\r\n if (this === node){\r\n return true;\r\n } else {\r\n return this.parent && this.parent.isDescendantOf(node);\r\n }\r\n }\r\n\r\n // åæ¢æ¹æ³\r\n // åæ¢èç¹çæå ï¼Collapsedï¼ä¸æ©å±ï¼Expandedï¼ç¶æ\r\n toggle() {\r\n this.isExpanded = !this.isExpanded;\r\n this.fireEvent({ eventName: TREE_EVENTS.onToggle, node: this, isExpanded: this.isExpanded });\r\n }\r\n\r\n private _activate() {\r\n this._isActive = true;\r\n this.fireEvent({ eventName: TREE_EVENTS.onActivate, node: this });\r\n this.focus();\r\n }\r\n \r\n private _deactivate() {\r\n this._isActive = false;\r\n this.fireEvent({ eventName: TREE_EVENTS.onDeactivate, node: this });\r\n }\r\n\r\n toggleActivated() {\r\n if (this.isActive) {\r\n this._deactivate();\r\n this.treeModel.activeNode = null;\r\n }\r\n else {\r\n if (this.treeModel.activeNode) {\r\n this.treeModel.activeNode._deactivate();\r\n }\r\n this._activate();\r\n this.treeModel.activeNode = this;\r\n }\r\n this.fireEvent({ eventName: TREE_EVENTS.onActiveChanged, node: this, isActive: this.isActive });\r\n }\r\n\r\n focus() {\r\n let previousNode = this.treeModel.focusedNode;\r\n this.treeModel.focusedNode = this;\r\n if (previousNode) {\r\n this.fireEvent({ eventName: TREE_EVENTS.onBlur, node: previousNode });\r\n }\r\n this.fireEvent({ eventName: TREE_EVENTS.onFocus, node: this });\r\n }\r\n\r\n blur() {\r\n let previousNode = this.treeModel.focusedNode;\r\n this.treeModel.focusedNode = null;\r\n if (previousNode) {\r\n this.fireEvent({ eventName: TREE_EVENTS.onBlur, node: this });\r\n }\r\n }\r\n \r\n // åå»äºä»¶\r\n doublClick(rawEvent: MouseEvent) {\r\n this.fireEvent({ eventName: TREE_EVENTS.onDoubleClick, node: this, rawEvent: rawEvent });\r\n }\r\n\r\n // å³é®å¿«æ·èå\r\n contextMenu(rawEvent: MouseEvent) {\r\n if (this.enableCustomContextMenu()) {//å¯ç¨å³é®èååè½åï¼ç¦ç¨é»è®¤çå³é®èå\r\n rawEvent.preventDefault();\r\n }\r\n\r\n this.fireEvent({ eventName: TREE_EVENTS.onContextMenu, node: this, rawEvent: rawEvent }); \r\n }\r\n\r\n dropMouseAction($event, data: any = null){\r\n // 1.设置focus\r\n this.treeModel.setFocus(true);\r\n // 2.æ§è¡äºä»¶å¤çå¨\r\n this._dropEventHandler(this.treeModel, this, $event, data);\r\n // 3.å®ædropæä½åï¼éç½®dragç¶æ\r\n this.treeModel.cancelDrag();\r\n }\r\n\r\n private _dropEventHandler(tree: TreeModel, node: TreeNode, $event: any , \r\n to: { parentNode: TreeNode, index: number}){\r\n tree.moveNode({ from: tree.getDragNode(), to });\r\n // console.log(\"dropEventHandler:\"+tree.roots);\r\n }\r\n \r\n // ç¹å»å³é®èå项\r\n rightMenuClicked( event ) {\r\n this.fireEvent({ eventName: TREE_EVENTS.onRightMenuClicked, node: this, rawEvent: event });\r\n }\r\n}","import { ITreeOptions } from '../defs/api';\r\n\r\nexport class TreeOptions {\r\n // å段ä¸åºç´æ¥æ´é²\r\n get idField(): string { return this.options.childrenField || 'id'}\r\n get displayField(): string { return this.options.displayField || 'name'}\r\n get typeField():string {return this.options.typeField || 'type'}\r\n get childrenField(): string { return this.options.childrenField || 'children'}\r\n get isExpandedField(): string { return this.options.isExpandedField || 'isExpanded'}\r\n get treeNodeTemplate(): any { return this.options.treeNodeTemplate || '{{ node.displayField }}' }//æå¼è¡¨è¾¾å¼\r\n get allowDrag(): boolean { return this.options.allowDrag }//æ¯å¦å¯ç¨ææ½åè½\r\n get enableCustomContextMenu(): boolean{ return this.options.enableCustomContextMenu }//æ¯å¦å¯ç¨å¿«æ·èå\r\n\r\n constructor(private options: ITreeOptions = {}) {//optionæ¯ä¸ä¸ªå¯¹è±¡\r\n // nothing need to do\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { TreeNode } from './tree-node';\r\nimport { TreeOptions } from './tree-options';\r\nimport { TREE_EVENTS } from '../constants/events';\r\nimport { first, last, indexOf, findIndex, sortBy } from 'lodash-es';\r\n\r\n@Injectable()\r\nexport class TreeModel {\r\n roots: TreeNode[];\r\n options: TreeOptions = new TreeOptions();\r\n static focusedTree = null;\r\n // focused Node may be not actived \r\n // actived Node must be focused\r\n focusedNode: TreeNode = null;// be chosen node\r\n activeNode: TreeNode = null;// be chosen and actived node\r\n private events:any;\r\n eventNames = Object.keys(TREE_EVENTS);\r\n\r\n firstUpdate = true;\r\n _dragNode: { parentNode: TreeNode, index: number } = null;\r\n _dropLocation:{ component: any, parentNode: TreeNode, index: number } = null;\r\n\r\n setData({nodes, options, events}){\r\n\r\n this.options = new TreeOptions(options);\r\n this.events = events;\r\n\r\n this.update(nodes);\r\n }\r\n\r\n virtualRoot: TreeNode;\r\n update(nodes){\r\n // Update the tree:\r\n\r\n this.virtualRoot = new TreeNode({ isVirtualRoot: true }, null,this);\r\n\r\n this.roots = nodes && nodes.map(child => new TreeNode(child, this.virtualRoot, this));\r\n\r\n this.virtualRoot[this.options.childrenField] = this.roots;\r\n \r\n this._loadTreeNodeContentComponent();\r\n \r\n // Fire event:\r\n if (this.firstUpdate) {\r\n if (this.roots) {\r\n this.fireEvent({ eventName: TREE_EVENTS.onInitialized });\r\n this.firstUpdate = false;\r\n }\r\n } else {\r\n this.fireEvent({ eventName: TREE_EVENTS.onUpdateData });\r\n }\r\n }\r\n\r\n //Used for code test\r\n addStaticTreeNode(){\r\n this.createAndAddTreeNode({ \r\n id: 1,\r\n name: 'root1',\r\n subTitle: 'the root',\r\n type: 'type1'\r\n },this.focusedNode);\r\n }\r\n\r\n createAndAddTreeNode(data, parentNode: TreeNode, index?){\r\n const createdNode = this.createTreeNode(data, parentNode);\r\n this.addTreeNode(createdNode, parentNode, index);\r\n }\r\n\r\n createTreeNode(data, parent: TreeNode): TreeNode{\r\n let createdNode = new TreeNode(data, parent, this);\r\n return createdNode;\r\n }\r\n \r\n addTreeNode(addedNode: TreeNode, parentNode: TreeNode, index?){\r\n if (addedNode == null) {\r\n return;\r\n }\r\n\r\n if (parentNode == null) {// å¢å 顶级æ èç¹ï¼æ²¡æç¶èç¹çæ èç¹ï¼\r\n this.roots.push(addedNode);\r\n } else {\r\n if (index === null || index === undefined) {\r\n parentNode.childrenField.push(addedNode);\r\n } else {\r\n parentNode.childrenField.splice(index, 0, addedNode);\r\n }\r\n }\r\n\r\n this.update(this.roots);\r\n\r\n this.fireEvent({ eventName: TREE_EVENTS.onAddNode, addedNode, parentNode});\r\n }\r\n\r\n removeFocusedTreeNode(){\r\n this.removeTreeNode(this.focusedNode);\r\n }\r\n \r\n //移é¤éä¸çå·²ç¥èç¹\r\n removeTreeNode(selectedTreeNode: TreeNode){\r\n if(selectedTreeNode == null){\r\n return;\r\n }\r\n\r\n const parent = selectedTreeNode.parent;\r\n if(parent == null){//移é¤é¡¶çº§æ èç¹ï¼æ²¡æç¶èç¹çæ èç¹ï¼\r\n let index = this.roots.indexOf(selectedTreeNode);\r\n this.roots.splice(index, 1);//移é¤æ°ç»ä¸æä¸æå®èç¹\r\n }else{\r\n if(parent.childrenField.length <= 0){\r\n console.log(\"RemoveTreeNode Warning: it is impossible to remove element from an empty array\");\r\n return;\r\n }\r\n //移é¤æ°ç»ä¸æä¸æå®èç¹\r\n let index = parent.childrenField.indexOf(selectedTreeNode);\r\n parent.childrenField.splice(index, 1);\r\n }\r\n\r\n this.update(this.roots);\r\n\r\n this.fireEvent({ eventName: TREE_EVENTS.onRemoveNode, selectedTreeNode, parent});\r\n }\r\n\r\n /**\r\n * å®ä½æå®æ èç¹\r\n * @param needLocatedNode å¾
å®ä½èç¹ \r\n */\r\n locateTreeNode(needLocatedNode: TreeNode){\r\n if(needLocatedNode == null){\r\n return;\r\n }\r\n\r\n let parentNode = needLocatedNode.parent;\r\n while( parentNode != null){\r\n parentNode.isExpanded = true;\r\n parentNode = parentNode.parent;\r\n }\r\n \r\n needLocatedNode.isActive = false;\r\n needLocatedNode.toggleActivated();\r\n }\r\n\r\n /**\r\n * éè¿IDå®ä½æ èç¹\r\n * @param nodeID å¾
æ¥æ¾å¹¶å®ä½èç¹çID\r\n */\r\n locateNodeByID(nodeID: string): boolean{\r\n let node = this.searchTreeNodeByID(nodeID);\r\n if(node == null) {\r\n return false;\r\n }\r\n this.locateTreeNode(node);\r\n return true;\r\n }\r\n \r\n /**\r\n * æ¥æ¾æå®æ èç¹\r\n * @param nodeID å¾
æ¥æ¾èç¹ID\r\n */\r\n searchTreeNodeByID(nodeID: string): TreeNode{\r\n return this.searchTreeNode(this.roots, nodeID);\r\n }\r\n\r\n \r\n /**\r\n * å¨æå®éåä¸ï¼æ ¹æ®IDæ¥æ¾æ èç¹\r\n * @param nodes æ éå\r\n * @param nodeID å¾
æ¥æ¾èç¹ID\r\n */\r\n searchTreeNode(nodes: TreeNode[], nodeID: string): TreeNode{\r\n\r\n if(nodes == null || nodes.length <= 0){\r\n return null;\r\n }\r\n\r\n if(nodeID == null || nodeID.length < 0){\r\n return null;\r\n }\r\n\r\n let searchedTreeNode: TreeNode = null;\r\n \r\n nodes.forEach(node => {\r\n if(node.idField == nodeID){ //åå½\r\n searchedTreeNode = node;\r\n return;\r\n }\r\n\r\n if(node.childrenField == null || node.childrenField.length < 0){ //åå½\r\n return;\r\n }\r\n\r\n const searchedNodeInChildren = this.searchTreeNode(node.childrenField, nodeID);//éæ¨\r\n if(searchedNodeInChildren != null){\r\n searchedTreeNode = searchedNodeInChildren;\r\n }\r\n return;//åå½\r\n });\r\n\r\n return searchedTreeNode; //è¿å\r\n }\r\n \r\n private _treeNodeContentComponent:any;\r\n get treeNodeContentComponent() { return this._treeNodeContentComponent };\r\n // if treeNodeTemplate is a component - use it,\r\n // otherwise - it's a template, so wrap it with an AdHoc component\r\n _loadTreeNodeContentComponent() {\r\n this._treeNodeContentComponent = this.options.treeNodeTemplate;\r\n if (typeof this._treeNodeContentComponent === 'string') {\r\n // this._treeNodeContentComponent = this._createAdHocComponent(this._treeNodeContentComponent);\r\n }\r\n }\r\n\r\n // _createAdHocComponent(templateStr) {\r\n // @Component({\r\n // selector: 'TreeNodeTemplate',\r\n // template: templateStr\r\n // })\r\n // class AdHocTreeNodeTemplateComponent {\r\n // @Input() node: TreeNode;\r\n // }\r\n // return AdHocTreeNodeTemplateComponent;\r\n // }\r\n\r\n get isFocused()\r\n {\r\n return TreeModel.focusedTree === this;\r\n }\r\n setFocus(value){\r\n TreeModel.focusedTree = value ? this : null;\r\n }\r\n getFirstRoot(){\r\n return first(this.roots);\r\n }\r\n getLastRoot(){\r\n return last(this.roots);\r\n }\r\n focusNextNode() {\r\n let previousNode = this.focusedNode;\r\n let nextNode = previousNode ? previousNode.findNextNode() : this.getFirstRoot();\r\n nextNode && nextNode.focus() // Short-circuit evaluation\r\n }\r\n\r\n focusPreviousNode() {\r\n let previousNode = this.focusedNode;\r\n let nextNode = previousNode ? previousNode.findPreviousNode() : this.getLastRoot();\r\n nextNode && nextNode.focus();\r\n }\r\n\r\n focusDrillUp(){\r\n let previousNode = this.focusedNode;\r\n let nextNode = previousNode && previousNode.realParent;\r\n nextNode && nextNode.focus();\r\n }\r\n\r\n focusDrillDown() {\r\n let previousNode = this.focusedNode;\r\n let nextNode = previousNode && previousNode.getFirstChild();\r\n nextNode && nextNode.focus();\r\n }\r\n\r\n fireEvent(event) {\r\n // https://stackoverflow.com/questions/35840576/differencse-between-eventemitter-next-and-eventemitter-emit-in-angular-2\r\n // abandon next() function, begin to use emit() function\r\n // this.events[event.eventName].next(event);\r\n // this.events[event.eventName].emit(event,alert(event.eventName));//åå°äºä»¶ï¼å¹¶ä¼ éäºä»¶ç对象\r\n this.events[event.eventName].emit(event);\r\n\r\n }\r\n\r\n /**\r\n * å¤ææ¯å¦æ§è¡ç§»å¨èç¹æä½ï¼å¯ä»¥ç§»å¨è¿åtrueï¼å¦åè¿åfalse\r\n * @param param0 param0.from å¾
移å¨èç¹çåæç¶èç¹\r\n * param0.to å¾
移å¨èç¹çæ°ç¶èç¹\r\n */\r\n canMoveNode({ from, to }) {\r\n // same node\r\n if (from.parentNode === to.parentNode && from.index === to.index) {\r\n return false;\r\n }\r\n \r\n const fromChildren = from.parentNode.children;\r\n const fromNode = fromChildren[from.index];\r\n \r\n return !to.parentNode.isDescendantOf(fromNode);\r\n }\r\n\r\n /**\r\n * 移å¨èç¹\r\n * @param param0 param0.from å¾
移å¨èç¹çåæç¶èç¹\r\n * param0.to å¾
移å¨èç¹çæ°ç¶èç¹\r\n */\r\n moveNode({ from, to }) {\r\n if (!this.canMoveNode({ from , to })) return;\r\n \r\n const fromChildren = from.parentNode.childrenField;\r\n \r\n // If node doesn't have children - create children array\r\n if (!to.parentNode.childrenField) {\r\n to.parentNode.childrenField = [];\r\n }\r\n const toChildren = to.parentNode.childrenField;\r\n \r\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice\r\n // The splice() method changes the contents of an array by removing existing elements and/or adding new elements.\r\n const node = fromChildren.splice(from.index, 1)[0];\r\n \r\n // Compensate for index if already removed from parent:\r\n let toIndex = (from.parentNode === to.parentNode && to.index > from.index) ? to.index - 1 : to.index;\r\n \r\n toChildren.splice(toIndex, 0, node);\r\n\r\n // console.log(\"toChildren:\" + toChildren);\r\n\r\n // console.log(\"AfterMoveNode:\" + this.roots);\r\n \r\n this.update(this.roots);// å®ç°node movedåï¼éæ°å·æ°è¿æ£µæ \r\n \r\n this.fireEvent({ eventName: TREE_EVENTS.onMoveNode, node, to });\r\n }\r\n \r\n // TODO: move to a different service:\r\n setDragNode(dragNode:{ parentNode: TreeNode, index: number }) {\r\n this._dragNode = dragNode;\r\n }\r\n \r\n getDragNode():{ parentNode: TreeNode, index:number } {\r\n return this._dragNode || { parentNode: null, index: null };\r\n }\r\n \r\n isDragging() {\r\n return this.getDragNode().parentNode;\r\n }\r\n \r\n setDropLocation(dropLocation: { component: any, parentNode: TreeNode, index: number }) {\r\n this._dropLocation = dropLocation;\r\n }\r\n \r\n getDropLocation(): { component: any, parentNode: TreeNode, index: number } {\r\n return this._dropLocation || {component: null, parentNode: null, index: null};\r\n }\r\n \r\n isDraggingOver(component) {\r\n return this.getDropLocation().component === component;\r\n }\r\n \r\n cancelDrag() {\r\n this.setDropLocation(null);\r\n this.setDragNode(null);\r\n }\r\n}","// keys used in the angular tree component\r\nexport const KEYS = {\r\n LEFT: 37,\r\n UP: 38,\r\n RIGHT: 39,\r\n DOWN: 40,\r\n ENTER: 13,\r\n SPACE: 32\r\n}","import { Component, OnChanges, Input, Output, EventEmitter, HostListener } from '@angular/core';\r\nimport { TreeModel } from '../../models/tree-model';\r\nimport { TreeOptions } from '../../models/tree-options';\r\nimport { KEYS } from '../../constants/keys';\r\nimport { pick, includes } from 'lodash-es';//å°lodashå®è£
å°node-modulesä¸ï¼å®ç°æéå¼å
¥\r\nimport { TreeNode } from '../../models/tree-node';\r\n\r\n//约å®ä½¿ç¨ä¸å线表示lodashï¼å°±åç¨$表示jQueryä¸æ ·\r\n//1.requireå
³é®åä¸è¢«è¯å«ï¼\r\n// https://stackoverflow.com/questions/31173738/typescript-getting-error-ts2304-cannot-find-name-require\r\n// declare var require: any\r\n// const _ = require('lodash');\r\n//2.å®è£
lodashçesçæ¬ï¼\r\n// (1) $>npm i lodash-es\r\n// (2) $>npm install --save @types/lodash\r\n@Component({\r\n selector: 'ng2tree',\r\n templateUrl: './tree.component.html',\r\n styleUrls: ['./tree.component.css'],\r\n providers:[\r\n TreeModel\r\n ]\r\n})\r\nexport class TreeComponent implements OnChanges {\r\n // delegating to TreeModel service:\r\n _nodes:any[];\r\n @Input() set nodes(nodes:any[]) { };\r\n _options:TreeOptions;\r\n @Input() set options(options:TreeOptions) { };\r\n \r\n @Input() set focused(value:boolean) {\r\n this.treeModel.setFocus(value);\r\n // alert('focused on the tree');\r\n }\r\n\r\n @Output() onToggle;\r\n @Output() onActiveChanged;\r\n @Output() onActivate;\r\n @Output() onDeactivate;\r\n @Output() onFocus;\r\n @Output() onBlur;\r\n @Output() onDoubleClick;\r\n @Output() onContextMenu;\r\n @Output() onRightMenuClicked;\r\n \r\n constructor(public treeModel:TreeModel) { \r\n treeModel.eventNames.forEach((name) => this[name] = new EventEmitter());//customEventName -> new EventEmitter()\r\n }\r\n\r\n ngOnChanges(changes) {\r\n this.treeModel.setData({\r\n nodes: changes.nodes && changes.nodes.currentValue,\r\n options: changes.options && changes.options.currentValue,\r\n events: pick(this, this.treeModel.eventNames)\r\n });\r\n }\r\n // ä¼å
使ç¨HostListenerè£
饰å¨ç»å®äºä»¶ï¼èä¸æ¯ä½¿ç¨DirectiveæComponentçhostå
æ°æ®\r\n // When binding events to Directive or Component, Angular suggests to prefer to HostListener decorator, \r\n // rather than host metadata.\r\n @HostListener('body: keydown', ['$event']) onKeydown($event) {\r\n // alert('Pressed a key');\r\n let focusedNode = this.treeModel.focusedNode;\r\n\r\n if (!this.treeModel.isFocused) {\r\n return;\r\n }\r\n\r\n if (includes([KEYS.DOWN, KEYS.UP, KEYS.LEFT,\r\n KEYS.RIGHT, KEYS.ENTER, KEYS.SPACE], $event.keyCode)) {\r\n $event.preventDefault();//åæ¶äºä»¶çé»è®¤å¨ä½ï¼å®ç°ä»
对includesé®ååº\r\n }\r\n \r\n switch ($event.keyCode) {\r\n case KEYS.DOWN:\r\n return this.treeModel.focusNextNode();\r\n \r\n case KEYS.UP:\r\n return this.treeModel.focusPreviousNode();\r\n \r\n case KEYS.LEFT:\r\n // alert('Focus Drill Up');\r\n if (focusedNode.isExpanded) {\r\n focusedNode.toggle();\r\n }\r\n else {\r\n this.treeModel.focusDrillUp();\r\n }\r\n return;\r\n \r\n case KEYS.RIGHT:\r\n // alert('Focus Drill Down');\r\n if (focusedNode.isCollapsed) {\r\n focusedNode.toggle();\r\n }\r\n else {\r\n this.treeModel.focusDrillDown();\r\n }\r\n return;\r\n \r\n case KEYS.ENTER:\r\n case KEYS.SPACE:\r\n // alert('Enter or Space key.');\r\n return focusedNode && focusedNode.toggleActivated();\r\n }\r\n }\r\n\r\n @HostListener('body: mousedown', ['$event']) onMousedown($event) {\r\n // alert('click');\r\n let insideClick = $event.target.closest('ng2tree');//å¤æå½ådomæ ä¸ä¸æä¸æ¯å¦å
å«æ ç»ä»¶\r\n if (!insideClick) {\r\n this.treeModel.setFocus(false);\r\n }\r\n }\r\n\r\n searchAndLocationNodeById(elementId) {\r\n // console.log('succeeded to search and location Node By Id in treeComponent:', elementId);\r\n this.treeModel.locateNodeByID(elementId);\r\n }\r\n\r\n searchNodeById(elementId): TreeNode {\r\n // console.log('succeeded to search and location Node By Id in treeComponent:', elementId);\r\n return this.treeModel.searchTreeNodeByID(elementId);\r\n }\r\n}","import { Directive, ViewContainerRef } from '@angular/core';\r\n\r\n// å®ä¹è¾
å©æ令TreeNodeContentï¼ç¨æ¥å¨æ¨¡æ¿ä¸æ è®°æå
¥ç¹\r\n@Directive({\r\n selector: '[treeNodeContent-host]'\r\n})\r\n\r\nexport class TreeNodeContentDirective {\r\n\r\n // ä¾èµæ³¨å
¥ViewContainerRefï¼è·å对容å¨è§å¾ç访é®æé\r\n constructor(public viewContainerRef: ViewContainerRef) {\r\n\r\n }\r\n}","import { Type } from '@angular/core';\r\n\r\nexport class TreeNodeContentItem {\r\n constructor(public component: Type<any>, public displayData:any) {}\r\n}","import { Component, Input, Output, EventEmitter, OnInit, ComponentFactoryResolver, ViewContainerRef, ViewChild } from '@angular/core';\r\nimport { ITreeNodeContent } from './ITreeNodeContent';\r\n\r\n@Component({\r\n selector: 'ng2tree-node-content',\r\n templateUrl: './tree-node-content.component.html',\r\n styleUrls: ['./tree-node-content.component.css']\r\n})\r\nexport class TreeNodeContentComponent implements ITreeNodeContent, OnInit {\r\n\r\n @Input() displayData: any;\r\n @Input() originData: any;\r\n @Output() rightMenuClicked = new EventEmitter<any>();\r\n\r\n @ViewChild('rightMenuContainer', { read: ViewContainerRef }) rightMenuContainer: ViewContainerRef;\r\n constructor(private componentFactoryResolver: ComponentFactoryResolver) {\r\n\r\n }\r\n ngOnInit() {\r\n // å³é®èåç¸å
³\r\n this.rightMenuContainer.clear();\r\n if (this.originData.hasRightClickMenu) {\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.originData.rightClickMenuComponent);\r\n const componentRef = this.rightMenuContainer.createComponent(componentFactory);\r\n componentRef.instance['nodeData'] = this.originData;\r\n componentRef.instance['rightMenuClicked'].subscribe((event) => {\r\n this.rightMenuClicked.emit(event);\r\n });\r\n }\r\n }\r\n}\r\n","import { Component, ViewChild, OnInit, Input, ComponentFactoryResolver, ViewContainerRef } from '@angular/core';\r\nimport { TreeNode } from '../../models/tree-node';\r\nimport { TreeModel } from '../../models/tree-model';\r\nimport { TreeNodeContentDirective } from '../../directives/tree-node-content.directive';\r\nimport { TreeNodeContentItem } from '../../models/tree-node-content-item';\r\nimport { TreeNodeContentComponent } from '../tree-node-content/tree-node-content.component';\r\n\r\n@Component({\r\n selector: 'ng2tree-node',\r\n templateUrl: './tree-node.component.html',\r\n styleUrls: ['./tree-node.component.css']\r\n})\r\nexport class TreeNodeComponent implements OnInit {\r\n\r\n @Input() node: TreeNode;\r\n @Input() nodeIndex: number;\r\n\r\n // TODO: move to draggable directive\r\n onDragStart($event) {\r\n // 设置DragNode: éæ©dragNodeçç¶èç¹ä½ä¸ºDragNodeï¼éè¿indexå®ä½å°æå®çèç¹\r\n setTimeout(() => this.node.treeModel.setDragNode({ parentNode: this.node.parent, index: this.nodeIndex }), 30);\r\n }\r\n\r\n onDragEnd() {\r\n this.node.treeModel.setDragNode(null);\r\n }\r\n\r\n onDragOver($event) {\r\n $event.preventDefault();\r\n this.node.treeModel.setDropLocation({ component: this, parentNode: this.node, index: 0 });\r\n }\r\n\r\n onDrop($event) {\r\n $event.preventDefault();\r\n // this.node.mouseAction('drop', $event, { node: this.node, index: 0 });\r\n this.node.treeModel.setFocus(true);\r\n this.node.dropMouseAction($event,{ parentNode: this.node, index: 0 });\r\n console.log(\"onDrop: tree-node-component\");\r\n }\r\n\r\n onDragLeave(nodeContentWrapper, $event) {\r\n if (!this.node.treeModel.isDraggingOver(this)) {\r\n return;\r\n }\r\n \r\n const rect = nodeContentWrapper.getBoundingClientRect();\r\n\r\n // If outside the element\r\n if ($event.clientX < rect.left || $event.clientX > rect.right ||\r\n $event.clientY < rect.top || $event.clientY > rect.bottom) {\r\n\r\n this.node.treeModel.setDropLocation(null);\r\n }\r\n }\r\n\r\n // ViewChild æ¯å±æ§è£
饰å¨ï¼ç¨æ¥ä»æ¨¡æ¿è§å¾ä¸è·åå¹é
çå
ç´ \r\n @ViewChild(TreeNodeContentDirective) treeNodeContentHost: TreeNodeContentDirective;\r\n\r\n constructor(private componentFactoryResolver: ComponentFactoryResolver,\r\n viewContainerRef: ViewContainerRef) {\r\n \r\n }\r\n\r\n ngOnInit() {\r\n this._loadTreeNodeContent();\r\n }\r\n\r\n ngOnChanges() {\r\n\r\n }\r\n\r\n // 解å³ä½¿ç¨å¨æç»ä»¶åºç°ExpressionChangedAfterItHasBeenCheckedErroré®é¢ï¼\r\n // https://github.com/angular/angular/issues/17572\r\n _loadTreeNodeContent() {\r\n\r\n // 使ç¨Itemä»é»è¾ä¸å°TreeNodeContentComponentådataå
³èèµ·æ¥\r\n let treeNodeContentItem: TreeNodeContentItem = new TreeNodeContentItem(\r\n TreeNodeContentComponent,this.node.displayField);\r\n \r\n // ä½¿ç¨ ComponentFactoryResolver æ¥ä¸ºæ¯ä¸ªå
·ä½çç»ä»¶è§£æåºä¸ä¸ª ComponentFactory \r\n // ç¶å ComponentFactory ä¼ä¸ºæ¯ä¸ä¸ªç»ä»¶å建ä¸ä¸ªå®ä¾\r\n let componentFactory = this.componentFactoryResolver.resolveComponentFactory(treeNodeContentItem.component);\r\n\r\n let viewContainerRef = this.treeNodeContentHost.viewContainerRef;\r\n viewContainerRef.clear();\r\n\r\n let componentRef = viewContainerRef.createComponent(componentFactory);\r\n\r\n componentRef.instance.displayData = treeNodeContentItem.displayData; // ä¼ å
¥æ°æ®\r\n componentRef.instance.originData = this.node.data;\r\n componentRef.instance.rightMenuClicked.subscribe(event => {\r\n this.node.rightMenuClicked(event);\r\n });\r\n\r\n }\r\n\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { TreeNode } from '../../models/tree-node';\r\n\r\n@Component({\r\n selector: 'ng2tree-node-drop-slot',\r\n templateUrl: './tree-node-drop-slot.component.html',\r\n styleUrls: ['./tree-node-drop-slot.component.css']\r\n})\r\nexport class TreeNodeDropSlotComponent {\r\n\r\n @Input() node: TreeNode;\r\n @Input() dropIndex: number;\r\n\r\n onDragOver($event) {\r\n $event.preventDefault();\r\n this.node.treeModel.setDropLocation({ component: this, parentNode: this.node, index: this.dropIndex });\r\n }\r\n\r\n onDragLeave() {\r\n if (this.node.treeModel.isDraggingOver(this)) {\r\n this.node.treeModel.setDropLocation(null);\r\n }\r\n }\r\n\r\n onDrop($event) {\r\n $event.preventDefault();\r\n // this.node.mouseAction('drop', $event, { node: this.node, index: this.dropIndex });\r\n console.log('onDropEvent: tree-node-drop-slot');\r\n this.node.dropMouseAction($event, {parentNode: this.node, index: this.dropIndex });\r\n }\r\n\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\n\r\nimport { TreeComponent } from './components/tree/tree.component';\r\nimport { TreeNodeComponent } from './components/tree-node/tree-node.component';\r\nimport { TreeNodeContentComponent } from './components/tree-node-content/tree-node-content.component';\r\nimport { TreeNodeContentDirective } from './directives/tree-node-content.directive';\r\nimport { TreeNodeDropSlotComponent } from './components/tree-node-drop-slot/tree-node-drop-slot.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n TreeComponent,\r\n TreeNodeComponent,\r\n TreeNodeContentComponent,\r\n TreeNodeContentDirective,\r\n TreeNodeDropSlotComponent\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n providers: [\r\n ],\r\n entryComponents: [\r\n TreeNodeContentComponent\r\n ],\r\n exports:[\r\n TreeComponent,\r\n TreeNodeComponent,\r\n TreeNodeContentComponent,\r\n TreeNodeContentDirective,\r\n TreeNodeDropSlotComponent\r\n ]\r\n})\r\nexport class TreeModule { }","import { InjectionToken } from '@angular/core';\r\n\r\n// injectionTokenä½ç¨è¯´æ\r\n// https://segmentfault.com/a/1190000008626348\r\nexport const ANGULAR_MONACO_EDITOR_CONFIG = new InjectionToken('ANGULAR_MONACO_EDITOR_CONFIG');\r\n\r\nexport interface AngularMonacoEditorConfig {\r\n baseUrl?: string;\r\n defaultOptions?: { [key: string]: any; };\r\n onMonacoLoad?: Function;\r\n}\r\n","export const CODE_EDITOR_EVENTS = {\r\n onInit: 'onInit'\r\n};\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { assign } from 'lodash-es';\r\n\r\nimport { CODE_EDITOR_EVENTS } from '../constant/events';\r\n\r\n@Injectable()\r\nexport class CodeEditorEventService {\r\n public eventNames = Object.keys(CODE_EDITOR_EVENTS);\r\n private _events: any = {}; // 使ç¨äºä»¶\r\n\r\n /**\r\n * 设置å¯ç¨äºä»¶\r\n * @param äºä»¶\r\n */\r\n addEvent(event) {\r\n assign(this._events, event);\r\n // console.log(this.events);\r\n }\r\n\r\n fireEvent(event) {\r\n this._events[event.eventName].emit(event);\r\n // console.log(\"Emit Event:\" + event);\r\n }\r\n}\r\n","import { AfterViewInit, ElementRef, Input, OnDestroy, Output, ViewChild, EventEmitter } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\n\r\nimport { pick } from 'lodash-es';\r\n\r\nimport { AngularMonacoEditorConfig } from './config';\r\nimport { CodeEditorEventService } from '../service/code-editor.event.service';\r\n\r\nlet loadedMonaco = false;\r\nlet loadPromise: Promise<void>;\r\n\r\nexport abstract class BaseMonacoEditor implements AfterViewInit, OnDestroy {\r\n\r\n protected _editor: any;\r\n private _options: any;\r\n protected _windowResizeSubscription: Subscription;\r\n\r\n @ViewChild('codeEditor') _editorComponent: ElementRef; // å¨ææ·»å 代ç ç¼è¾å¨\r\n\r\n // tslint:disable-next-line:no-output-on-prefix\r\n @Output() onInit;\r\n\r\n @Input('options')\r\n set options(options: any) {\r\n // é»è®¤options(this.config.defaultOptions) + èªå®ä¹options(options)\r\n this._options = Object.assign({}, this.config.defaultOptions, options);\r\n if (this._editor) {\r\n this._editor.dispose();\r\n this.initMonaco(options);\r\n }\r\n }\r\n get options(): any {\r\n return this._options;\r\n }\r\n\r\n constructor(private codeEditorEventService: CodeEditorEventService, private config: AngularMonacoEditorConfig) {\r\n // åå§åèªå®ä¹äºä»¶\r\n const self = this;\r\n codeEditorEventService.eventNames.forEach((name) => {\r\n // å建èªå®ä¹äºä»¶ï¼æ¤å¤ä½ç¨çæäº: @Output() onInit = new EventEmitter<any>()\r\n self[name] = new EventEmitter<any>();\r\n const eventPair = pick(self, name);\r\n codeEditorEventService.addEvent(eventPair);\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (loadedMonaco) {\r\n // Wait until monaco editor is available\r\n loadPromise.then(() => {\r\n this.initMonaco(this.options);\r\n });\r\n } else {\r\n loadedMonaco = true;\r\n loadPromise = new Promise<void>((resolve: any) => {\r\n const baseUrl = this.config.baseUrl || '/assets';\r\n // if (typeof((<any>window).monaco) === 'object') {\r\n // resolve();\r\n // return;\r\n // }\r\n const onGotAmdLoader: any = () => {\r\n // Load monaco\r\n (<any>window).require.config({ paths: { 'vs': `${baseUrl}/monaco/vs` } });\r\n (<any>window).require(['vs/editor/editor.main'], () => {\r\n if (typeof this.config.onMonacoLoad === 'function') {\r\n this.config.onMonacoLoad();\r\n }\r\n this.initMonaco(this.options);\r\n resolve();\r\n });\r\n };\r\n\r\n // Load AMD loader if necessary\r\n if (!(<any>window).require) {\r\n const loaderScript: HTMLScriptElement = document.createElement('script');\r\n loaderScript.type = 'text/javascript';\r\n loaderScript.src = `${baseUrl}/monaco/vs/loader.js`;\r\n loaderScript.addEventListener('load', onGotAmdLoader);\r\n document.body.appendChild(loaderScript);\r\n } else {\r\n onGotAmdLoader();\r\n }\r\n });\r\n }\r\n }\r\n\r\n // Monaco Editor Initializer\r\n protected abstract initMonaco(options: any): void ;\r\n\r\n ngOnDestroy() {\r\n if (this._windowResizeSubscription) {\r\n this._windowResizeSubscription.unsubscribe();\r\n }\r\n\r\n if (this._editor) {\r\n this._editor.dispose();\r\n this._editor = undefined;\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\ndeclare const monaco: any;\r\n\r\n// Angular Monaco Editor Component Variables\r\n// æ±æ»Angular monaco editor component ç»ä»¶æ´é²çåé\r\n@Injectable()\r\nexport class AngularMonacoEditorService {\r\n\r\n private _existError = false;//é»è®¤æ²¡æé误\r\n get existError() {\r\n return this._existError;\r\n }\r\n\r\n handleModelMarkers() {\r\n var self = this;\r\n // https://github.com/Microsoft/monaco-editor/issues/30\r\n const setModelMarkers = monaco.editor.setModelMarkers;\r\n monaco.editor.setModelMarkers = function (model, owner, markers) {\r\n setModelMarkers.call(monaco.editor, model, owner, markers);\r\n if (markers.length === 0) {\r\n // there are no errors(synx error and validate error)\r\n // console.log('continue');\r\n } else {\r\n // there are errors\r\n self._existError = true;\r\n }\r\n };\r\n }\r\n}\r\n","import { Component, Input, Output } from '@angular/core';\r\nimport { forwardRef, Inject, NgZone } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { fromEvent } from 'rxjs/observable/fromEvent';\r\n\r\nimport { ANGULAR_MONACO_EDITOR_CONFIG, AngularMonacoEditorConfig } from '../model/config';\r\nimport { CodeEditorEventService } from '../service/code-editor.event.service';\r\nimport { CODE_EDITOR_EVENTS } from '../constant/events';\r\nimport { AngularEditorModel } from '../model/types';\r\nimport { BaseMonacoEditor } from '../model/base-monaco-editor';\r\nimport { AngularMonacoEditorService } from '../service/angular-monaco-editor.service';\r\n\r\ndeclare const monaco: any;\r\n\r\n// èªå®ä¹è¾å
¥æ§ä»¶:1.å°è£
ControlValueAccessor\r\n// https://code-examples.net/zh-CN/q/2154761\r\nexport const CODE_EDITOR_INPUT_VALUE_ACCESSOR: any = {\r\n // https://blog.csdn.net/wangdan_2013/article/details/81314959\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => AngularMonacoEditorComponent),\r\n multi: true\r\n};\r\n\r\n@Component({\r\n // tslint:disable-next-line:component-selector\r\n selector: 'angular-monaco-editor',\r\n templateUrl: './angular-monaco-editor.component.html',\r\n styleUrls: ['./angular-monaco-editor.component.css'],\r\n // èªå®ä¹è¾å
¥æ§ä»¶:2.å¼å
¥ä¾èµæå¡ControlValueAccessor\r\n providers: [\r\n CODE_EDITOR_INPUT_VALUE_ACCESSOR,\r\n CodeEditorEventService,\r\n AngularMonacoEditorService\r\n ]\r\n})\r\n\r\n// èªå®ä¹è¾å
¥æ§ä»¶ <-> Monaco Edtor\r\n\r\n// èªå®ä¹è¾å
¥æ§ä»¶:3.1 implements ControlValueAccessor\r\nexport class AngularMonacoEditorComponent extends BaseMonacoEditor implements ControlValueAccessor {\r\n\r\n @Input('model')\r\n set model(model: AngularEditorModel) {\r\n this.options.model = model;\r\n if (this._editor) {\r\n this._editor.dispose();\r\n this.initMonaco(this.options);\r\n }\r\n }\r\n\r\n private _value = '';\r\n\r\n // tslint:disable-next-line:max-line-length\r\n constructor(private angularMonacoEditorService: AngularMonacoEditorService,\r\n private zone: NgZone,\r\n private editorEventService: CodeEditorEventService,\r\n @Inject(ANGULAR_MONACO_EDITOR_CONFIG) private angularEditorconfig: AngularMonacoEditorConfig) {\r\n super(editorEventService, angularEditorconfig);\r\n }\r\n\r\n // todo: æåoptionså
Œ
±ç±»\r\n protected initMonaco(options: any): void {\r\n const enableModel = !!options.model;\r\n if (enableModel) {\r\n const searchedModel = monaco.editor.getModel(options.model.uri);\r\n if (null !== searchedModel) {\r\n searchedModel.dispose();\r\n }\r\n\r\n options.model = monaco.editor.createModel(options.model.value, options.model.language, options.model.uri);\r\n }\r\n\r\n this._editor = monaco.editor.create(this._editorComponent.nativeElement, options);\r\n\r\n if (!enableModel) {\r\n this._editor.setValue(this._value);\r\n }\r\n \r\n if (enableModel) {\r\n this.angularMonacoEditorService.handleModelMarkers();\r\n }\r\n\r\n // monaco editor -> outside component\r\n this._editor.onDidChangeModelContent((e: any) => this.onChangeModelContentHandler(e));\r\n\r\n this._editor.onDidBlurEditorText((e: any) => this.onBlurEditorTextHandler(e));\r\n\r\n this._editor.onDidLayoutChange((e: any) => this.onLayoutChangeHandler(e));\r\n\r\n // refresh layout on resize event.\r\n this.refreshLayoutWhenWindowResize();\r\n\r\n this.editorEventService.fireEvent({\r\n eventName: CODE_EDITOR_EVENTS.onInit,\r\n target: this,\r\n editor: this._editor\r\n });\r\n }\r\n\r\n /**\r\n * refresh layout when resized the window\r\n */\r\n refreshLayoutWhenWindowResize() {\r\n if (this._windowResizeSubscription) {\r\n this._windowResizeSubscription.unsubscribe();\r\n }\r\n // fromEventç¨äºå
¼å¬äºä»¶ï¼äºä»¶è§¦åæ¶ï¼å°äºä»¶event转æå¯æµå¨çObservableè¿è¡ä¼ è¾\r\n // https://www.jianshu.com/p/46894deb870a\r\n this._windowResizeSubscription = fromEvent(window, 'resize').subscribe(() => this._editor.layout());\r\n }\r\n\r\n onChangeModelContentHandler(e) {\r\n const _value = this._editor.getValue();\r\n\r\n // monaco editor -> outside component\r\n // https://github.com/JTangming/tm/issues/4 ngZone详解\r\n this.zone.run(() => this.value = _value); // value is not propagated to parent when executing outside zone.\r\n }\r\n\r\n onBlurEditorTextHandler(e) {\r\n\r\n this.onControlTouched();\r\n }\r\n\r\n onLayoutChangeHandler(e) {\r\n console.log('Layout changed:\\n' + e);\r\n }\r\n\r\n // get accessor\r\n get value(): any {\r\n return this._value;\r\n }\r\n\r\n // set accessor including call the onchange callback\r\n set value(v: any) {\r\n if (v !== this.value) {// 注æè¿ç§åæ³ï¼å¼å¾å¦ä¹ \r\n this._value = v;\r\n }\r\n\r\n this.onControlValueChange(this.value); // å¨å±æ§ä¿®é¥°å¨éè°ç¨onControlValueChangeæ¹æ³\r\n }\r\n\r\n // èªå®ä¹è¾å
¥æ§ä»¶:3.2 implements ControlValueAccesso\r\n\r\n // outside component -> monaco editor\r\n\r\n // From ControlValueAccessor interface\r\n writeValue(value: any) {\r\n const self = this;\r\n self.value = value || '';\r\n\r\n // Fix for value change while dispose in process.\r\n setTimeout(() => {\r\n if (self._editor /*&& !this.options.model*/) {\r\n self._editor.setValue(self._value);\r\n }\r\n });\r\n }\r\n\r\n // From ControlValueAccessor interface\r\n registerOnChange(fn: any) {\r\n this.onControlValueChange = fn;\r\n }\r\n\r\n // From ControlValueAccessor interface\r\n registerOnTouched(fn: any) {\r\n this.onControlTouched = fn;\r\n }\r\n\r\n // ControlValueAccessoræä¾çäºä»¶åè°\r\n onControlValueChange = (_: any) => {\r\n }\r\n\r\n // ControlValueAccessoræä¾çäºä»¶åè°\r\n onControlTouched = () => {\r\n }\r\n\r\n}\r\n","import { CommonModule } from '@angular/common';\r\n\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { ANGULAR_MONACO_EDITOR_CONFIG, AngularMonacoEditorConfig } from './model/config';\r\nimport { AngularMonacoEditorComponent } from './angular-monaco-editor/angular-monaco-editor.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n AngularMonacoEditorComponent\r\n ],\r\n exports: [\r\n AngularMonacoEditorComponent\r\n ],\r\n providers: [\r\n ]\r\n})\r\n\r\nexport class AngularMonacoEditorModule {\r\n public static forRoot(config: AngularMonacoEditorConfig = {}): ModuleWithProviders {\r\n return {\r\n ngModule: AngularMonacoEditorModule,\r\n providers: [\r\n { provide: ANGULAR_MONACO_EDITOR_CONFIG, useValue: config }\r\n ]\r\n };\r\n }\r\n}\r\n","import {Directive, EventEmitter, Input, Optional, Output, TemplateRef} from '@angular/core';\r\n// import {ShContextMenuComponent} from './sh-context-menu.component';\r\nimport {ShContextMenuClickEvent} from './sh-context-menu.models';\r\n\r\nexport class MenuItemContext {\r\n $implicit: any;\r\n\r\n constructor() {\r\n this.$implicit = {};\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: '[shContextMenuItem]'\r\n})\r\nexport class ShContextMenuItemDirective {\r\n @Input() subMenu;\r\n @Input() divider: boolean;\r\n @Input() visible: (event: ShContextMenuClickEvent) => boolean;\r\n @Input() disabled: (event: ShContextMenuClickEvent) => boolean;\r\n @Input() closeOnClick = true;\r\n\r\n @Output() click = new EventEmitter<ShContextMenuClickEvent>();\r\n\r\n context: MenuItemContext = new MenuItemContext();\r\n\r\n private _active: boolean;\r\n\r\n constructor(@Optional() public template: TemplateRef<MenuItemContext>) {\r\n }\r\n\r\n setNotActive() {\r\n this._active = false;\r\n if (this.subMenu) {\r\n this.subMenu.setNotActive();\r\n }\r\n }\r\n\r\n setActive() {\r\n this._active = true;\r\n }\r\n}\r\n","import {ElementRef, Injectable, OnDestroy} from '@angular/core';\r\nimport {ShContextMenuComponent} from './sh-context-menu.component';\r\nimport {CloseScrollStrategy, Overlay} from '@angular/cdk/overlay';\r\nimport {TemplatePortal} from '@angular/cdk/portal';\r\nimport {ConnectedPositionStrategy} from '@angular/cdk/overlay/typings/position/connected-position-strategy';\r\nimport {ShContextMenuEvent, ShContextSubMenuEvent} from './sh-context-menu.models';\r\nimport {OverlayRef} from '@angular/cdk/overlay';\r\nimport {fromEvent} from 'rxjs/observable/fromEvent';\r\nimport {Subscription} from 'rxjs/Subscription';\r\n\r\n@Injectable()\r\nexport class ShContextMenuService implements OnDestroy {\r\n activeOverlays: OverlayRef[] = [];\r\n backDropSub: Subscription;\r\n\r\n activeMenu: ShContextMenuComponent;\r\n\r\n constructor(private overlay: Overlay) {\r\n }\r\n\r\n openMenu(ctxEvent: ShContextMenuEvent) {\r\n this.closeCurrentOverlays();\r\n const {menu, mouseEvent, targetElement, data} = ctxEvent;\r\n\r\n this.activeMenu = menu;\r\n\r\n mouseEvent.preventDefault();\r\n mouseEvent.stopPropagation();\r\n\r\n this.overrideGetBoundingClientRect(targetElement, mouseEvent);\r\n\r\n const scrollStrategy = this.buildCloseScrollStrategy();\r\n const positionStrategy = this.buildConnectedPositionStrategy(targetElement);\r\n\r\n this.attachContextToItems(menu, data);\r\n\r\n const overlayRef = this.createAndAttachOverlay(positionStrategy, scrollStrategy, menu, true);\r\n this.attachOverlayRef(menu, overlayRef);\r\n\r\n this.registerBackdropEvents(overlayRef);\r\n }\r\n\r\n openSubMenu(ctxEvent: ShContextSubMenuEvent): any {\r\n const {menu, mouseEvent, targetElement, data, parentMenu} = ctxEvent;\r\n\r\n mouseEvent.preventDefault();\r\n mouseEvent.stopPropagation();\r\n\r\n const scrollStrategy = this.buildCloseScrollStrategy();\r\n const positionStrategy = this.buildConnectedPositionStrategyForSubMenu(targetElement);\r\n const overlayRef = this.createAndAttachOverlay(positionStrategy, scrollStrategy, menu, false);\r\n\r\n this.attachContextToItems(menu, data);\r\n this.attachThisContext(menu, parentMenu);\r\n this.attachOverlayRef(menu, overlayRef);\r\n }\r\n\r\n destroy() {\r\n this.closeCurrentOverlays();\r\n this.backDropSub.unsubscribe();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroy();\r\n }\r\n\r\n closeSubMenus(menu: ShContextMenuComponent) {\r\n const itemsWithSubMenus = menu\r\n .menuItems\r\n .filter(i => !!i.subMenu && !!i.subMenu.overlayRef);\r\n\r\n if (itemsWithSubMenus.length) {\r\n itemsWithSubMenus.forEach(sm => this.closeSubMenus(sm.subMenu));\r\n\r\n const overlayRefs = itemsWithSubMenus\r\n .map(i => i.subMenu.overlayRef);\r\n\r\n overlayRefs.forEach(r => r.dispose());\r\n }\r\n }\r\n\r\n private registerBackdropEvents(overlayRef: OverlayRef) {\r\n const elm = overlayRef.backdropElement;\r\n\r\n this.backDropSub = fromEvent(elm, 'mousedown')\r\n .subscribe(this.closeCurrentOverlays.bind(this));\r\n }\r\n\r\n private createAndAttachOverlay(positionStrategy: ConnectedPositionStrategy,\r\n scrollStrategy: CloseScrollStrategy,\r\n menu: ShContextMenuComponent,\r\n hasBackdrop: boolean = true) {\r\n\r\n const overlayRef = this.overlay.create({\r\n positionStrategy,\r\n scrollStrategy,\r\n hasBackdrop: hasBackdrop,\r\n backdropClass: 'sh-backdrop'\r\n });\r\n\r\n /*\r\n TODO: try passing the TemplatePortal context (data)\r\n and then injecting it to the *ngTemplateOutlet in the component template\r\n */\r\n const menuPortal = new TemplatePortal(menu.menuTemplate, menu.menuContainer);\r\n overlayRef.attach(menuPortal);\r\n\r\n this.activeOverlays.push(overlayRef);\r\n\r\n return overlayRef;\r\n }\r\n\r\n private buildCloseScrollStrategy() {\r\n return this.overlay.scrollStrategies.close();\r\n }\r\n\r\n private buildConnectedPositionStrategy(elm: ElementRef): ConnectedPositionStrategy {\r\n return this\r\n .overlay\r\n .position()\r\n .connectedTo(elm,\r\n {originX: 'start', originY: 'bottom'},\r\n {overlayX: 'start', overlayY: 'top'})\r\n .withFallbackPosition(\r\n {originX: 'start', originY: 'top'},\r\n {overlayX: 'start', overlayY: 'bottom'})\r\n .withFallbackPosition(\r\n {originX: 'end', originY: 'top'},\r\n {overlayX: 'start', overlayY: 'top'})\r\n .withFallbackPosition(\r\n {originX: 'start', originY: 'top'},\r\n {overlayX: 'end', overlayY: 'top'})\r\n .withFallbackPosition(\r\n {originX: 'end', originY: 'center'},\r\n {overlayX: 'start', overlayY: 'center'})\r\n .withFallbackPosition(\r\n {originX: 'start', originY: 'center'},\r\n {overlayX: 'end', overlayY: 'center'});\r\n }\r\n\r\n private buildConnectedPositionStrategyForSubMenu(elm: ElementRef): ConnectedPositionStrategy {\r\n return this\r\n .overlay\r\n .position()\r\n .connectedTo(elm,\r\n {originX: 'end', originY: 'top'},\r\n {overlayX: 'start', overlayY: 'top'})\r\n .withFallbackPosition(\r\n {originX: 'start', originY: 'top'},\r\n {overlayX: 'end', overlayY: 'top'})\r\n .withFallbackPosition(\r\n {originX: 'end', originY: 'bottom'},\r\n {overlayX: 'start', overlayY: 'bottom'})\r\n .withFallbackPosition(\r\n {originX: 'start', originY: 'bottom'},\r\n {overlayX: 'end', overlayY: 'bottom'});\r\n }\r\n\r\n /*\r\n we need to override getBoundingClientRect() to return the position of the menu.\r\n this is done because @angular/cdk use this function internally to determine where the overlay should be positioned\r\n https://github.com/angular/material2/blob/master/src/cdk/overlay/position/connected-position-strategy.ts#L288\r\n */\r\n private overrideGetBoundingClientRect(elm: ElementRef, event: MouseEvent) {\r\n const {clientX, clientY} = event;\r\n\r\n elm.nativeElement.getBoundingClientRect = (): ClientRect => {\r\n return {\r\n bottom: clientY,\r\n height: 0,\r\n left: clientX,\r\n right: clientX,\r\n top: clientY,\r\n width: 0\r\n };\r\n };\r\n }\r\n\r\n private closeCurrentOverlays() {\r\n this.activeOverlays.forEach((o) => {\r\n o.detach();\r\n o.dispose();\r\n });\r\n\r\n this.activeOverlays = [];\r\n\r\n // TODO: create close subject and emit.\r\n // subscribe in component\r\n if (this.activeMenu) {\r\n this.activeMenu.close();\r\n }\r\n }\r\n\r\n private attachContextToItems(menu: ShContextMenuComponent, data: any) {\r\n menu.menuItems.forEach(i => i.context.$implicit = data);\r\n }\r\n\r\n private attachThisContext(menu: ShContextMenuComponent, parentMenu: ShContextMenuComponent) {\r\n menu.thisContext = parentMenu.thisContext;\r\n }\r\n\r\n private attachOverlayRef(menu: ShContextMenuComponent, overlayRef: OverlayRef) {\r\n menu.overlayRef = overlayRef;\r\n }\r\n}\r\n","import {\r\n Component, ContentChildren, ElementRef, Input, OnDestroy, QueryList, TemplateRef, ViewChild, ViewChildren,\r\n ViewContainerRef,\r\n ViewEncapsulation\r\n} from '@angular/core';\r\nimport {ShContextMenuItemDirective} from './sh-context-menu-item.directive';\r\nimport {ShContextMenuService} from './sh-context-menu.service';\r\nimport {OverlayRef} from '@angular/cdk/overlay';\r\n\r\n@Component({\r\n selector: 'sh-context-menu',\r\n encapsulation: ViewEncapsulation.None,\r\n styleUrls: ['sh-context-menu.css'],\r\n template: `\r\n <ng-container #menuContainer></ng-container>\r\n <ng-template #menuTemplate>\r\n <div class=\"sh-context-menu\">\r\n <div\r\n *ngFor=\"let menuItem of menuItems\"\r\n #itemElement\r\n [ngClass]=\"{'sh-sub-anchor': menuItem.subMenu && menuItem.visible,\r\n 'sh-context-menu--item__disable': !menuItem.visible,\r\n 'sh-context-menu--item__divider': menuItem.divider,\r\n 'sh-context-menu--item__sub-active': subActive && menuItem.active}\"\r\n class=\"sh-context-menu--item\"\r\n (mouseenter)=\"onEnter($event, menuItem, itemElement)\"\r\n (click)=\"onClick($event, menuItem)\">\r\n <ng-container *ngIf=\"!menuItem.divider || !isVisible(menuItem)\">\r\n <ng-content *ngTemplateOutlet=\"menuItem.template; context: menuItem.context\"></ng-content>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n `\r\n})\r\nexport class ShContextMenuComponent implements OnDestroy {\r\n @Input('this') thisContext: any;\r\n\r\n @ContentChildren(ShContextMenuItemDirective, {read: ShContextMenuItemDirective}) contentChildrenItems;\r\n @ViewChildren(ShContextMenuItemDirective, {read: ShContextMenuItemDirective}) viewChildrenItems;\r\n\r\n @ViewChild('menuTemplate', {read: TemplateRef}) menuTemplate;\r\n @ViewChild('menuContainer', {read: ViewContainerRef}) menuContainer;\r\n\r\n public overlayRef: OverlayRef;\r\n subActive: boolean;\r\n\r\n constructor(private ctxService: ShContextMenuService) {\r\n this.contentChildrenItems = new QueryList<ShContextMenuItemDirective>();\r\n this.viewChildrenItems = new QueryList<ShContextMenuItemDirective>();\r\n }\r\n\r\n get menuItems(): QueryList<ShContextMenuItemDirective> {\r\n // when using the ShContextMenuComponent as menu, the ContentChildren is the source\r\n if (this.contentChildrenItems.length) {\r\n return this.contentChildrenItems;\r\n }\r\n\r\n // when using a custom component as menu the ViewChildren is the source\r\n return this.viewChildrenItems;\r\n }\r\n\r\n onEnter($event: MouseEvent, item: ShContextMenuItemDirective, elm: HTMLElement) {\r\n this.ctxService.closeSubMenus(this);\r\n this.setNotActive();\r\n\r\n if (!item.subMenu || !item.visible) {\r\n return;\r\n }\r\n\r\n this.setActive(item);\r\n this.ctxService.openSubMenu({\r\n data: item.context.$implicit,\r\n targetElement: new ElementRef(elm),\r\n menu: item.subMenu,\r\n mouseEvent: $event,\r\n parentMenu: this\r\n });\r\n }\r\n\r\n private setActive(item: ShContextMenuItemDirective) {\r\n item.setActive();\r\n this.subActive = true;\r\n }\r\n\r\n onClick(event: MouseEvent, item: ShContextMenuItemDirective) {\r\n // TODO: move click handling to service\r\n\r\n if (item.divider) {\r\n return;\r\n }\r\n\r\n if (!item.subMenu && item.closeOnClick) {\r\n this.ctxService.destroy();\r\n\r\n item.click.emit({\r\n data: item.context.$implicit,\r\n event\r\n });\r\n }\r\n }\r\n\r\n private callWithContext(fn, fallbackContext, data, event) {\r\n return fn.call(this.thisContext ? this.thisContext : fallbackContext, {data, event});\r\n }\r\n\r\n close(): void {\r\n this.setNotActive();\r\n this.menuContainer.detach();\r\n if(this.overlayRef) {\r\n this.overlayRef.detach();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.close();\r\n }\r\n\r\n setNotActive() {\r\n this.subActive = false;\r\n this.menuItems.forEach(i => i.setNotActive());\r\n }\r\n\r\n isVisible(item: ShContextMenuItemDirective) {\r\n if (!item.visible) {\r\n return true;\r\n }\r\n\r\n return this.callWithContext(item.visible, this, item.context.$implicit, null);\r\n }\r\n}\r\n","import {Directive, ElementRef, Input, OnDestroy, OnInit} from '@angular/core';\r\nimport {ShContextMenuService} from './sh-context-menu.service';\r\nimport {ShContextMenuComponent} from './sh-context-menu.component';\r\nimport {Subscription} from 'rxjs/Subscription';\r\nimport {fromEvent} from 'rxjs/observable/fromEvent';\r\nimport {merge} from 'rxjs/observable/merge';\r\n\r\n@Directive({\r\n selector: '[shAttachMenu]'\r\n})\r\nexport class ShAttachMenuDirective implements OnDestroy, OnInit {\r\n @Input('shAttachMenu') menu: ShContextMenuComponent;\r\n @Input('shMenuTriggers') triggers: string[];\r\n @Input('shMenuData') data: any;\r\n sub: Subscription;\r\n\r\n constructor(private ctxService: ShContextMenuService, private elm: ElementRef) {\r\n }\r\n\r\n ngOnInit(): void {\r\n this.setupEvents();\r\n }\r\n\r\n private setupEvents() {\r\n const observables = [];\r\n\r\n if (!this.triggers) {\r\n observables.push(fromEvent(this.elm.nativeElement, 'contextmenu'));\r\n } else {\r\n this.triggers.forEach((t) => {\r\n observables.push(fromEvent(this.elm.nativeElement, t));\r\n });\r\n }\r\n\r\n this.sub = merge(...observables).subscribe(this.openMenu.bind(this));\r\n }\r\n\r\n openMenu(event: MouseEvent) {\r\n this.ctxService.openMenu({\r\n menu: this.menu,\r\n mouseEvent: event,\r\n targetElement: this.elm,\r\n data: this.data\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.sub.unsubscribe();\r\n }\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\n\r\nimport {ShContextMenuComponent} from './sh-context-menu.component';\r\nimport {ShAttachMenuDirective} from './sh-attach-menu.directive';\r\nimport {ShContextMenuService} from './sh-context-menu.service';\r\nimport {ShContextMenuItemDirective} from './sh-context-menu-item.directive';\r\nimport {OverlayModule} from '@angular/cdk/overlay';\r\n\r\n@NgModule({\r\n declarations: [\r\n ShAttachMenuDirective,\r\n ShContextMenuComponent,\r\n ShContextMenuItemDirective\r\n ],\r\n exports: [\r\n ShAttachMenuDirective,\r\n ShContextMenuComponent,\r\n ShContextMenuItemDirective\r\n ],\r\n providers: [\r\n ShContextMenuService\r\n ],\r\n imports: [\r\n CommonModule,\r\n OverlayModule\r\n ],\r\n entryComponents: [\r\n ShContextMenuComponent\r\n ]\r\n})\r\nexport class ShContextMenuModule {\r\n}\r\n","import {\r\n Component, OnInit, Input, ViewChild, ComponentRef, ViewContainerRef, ComponentFactoryResolver,\r\n Output, EventEmitter\r\n} from '@angular/core';\r\nimport { find, findIndex, merge } from 'lodash-es';\r\n\r\n@Component({\r\n selector: 'app-wizard',\r\n templateUrl: './wizard.component.html',\r\n styleUrls: ['./wizard.component.css']\r\n})\r\nexport class WizardComponent implements OnInit {\r\n @Output() clickCancelBtn = new EventEmitter<any>();\r\n @Output() clickFinishBtn = new EventEmitter<any>();\r\n\r\n @Input() title = '';\r\n @Input() steps = [];\r\n curStep;\r\n curStepIndex = 0;\r\n curComponentRef: ComponentRef<any>;\r\n // finishedSteps = [];\r\n @ViewChild('stepContainer', { read: ViewContainerRef }) stepContainer: ViewContainerRef;\r\n\r\n constructor(private viewContainerRef: ViewContainerRef,\r\n private componentFactoryResolver: ComponentFactoryResolver) { }\r\n\r\n ngOnInit() {\r\n if (this.steps && this.steps.length > 0) {\r\n this.curStep = this.steps[this.curStepIndex];\r\n this.createStepComponent(this.steps[this.curStepIndex]);\r\n }\r\n }\r\n createStepComponent(step) {\r\n this.stepContainer.clear();\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(step.component);\r\n this.curComponentRef = this.stepContainer.createComponent(componentFactory);\r\n this.curComponentRef.instance.data = step.data;\r\n\r\n // æ°å¢æ¥éª¤\r\n if (this.curComponentRef.instance.addStep) {\r\n this.curComponentRef.instance.addStep.subscribe((stepList) => {\r\n\r\n const curIndex = findIndex(this.steps, this.curStep);\r\n this.steps.splice(curIndex + 1, 0, ...stepList);\r\n\r\n this.curStep.nextStep = stepList[0].stepId;\r\n this.curStep.showFinishBtn = false;\r\n this.curStep.showNextStepBtn = true;\r\n\r\n });\r\n }\r\n // å é¤æ¥éª¤\r\n if (this.curComponentRef.instance.removeStep) {\r\n this.curComponentRef.instance.removeStep.subscribe((data) => {\r\n merge(this.curStep, data.curStep);\r\n data.removeSteps.forEach(removeStep => {\r\n const index = findIndex(this.steps, removeStep);\r\n this.steps.splice(index, 1);\r\n });\r\n });\r\n }\r\n // åæ´æ¥éª¤\r\n if (this.curComponentRef.instance.changeStep) {\r\n this.curComponentRef.instance.changeStep.subscribe((stepList) => {\r\n stepList.forEach(changeStep => {\r\n const oldStep = find(this.steps, function (s) { return s.stepId === changeStep.stepId; });\r\n merge(oldStep, changeStep);\r\n });\r\n });\r\n }\r\n\r\n }\r\n jumpStep(nextStep) {\r\n // å¤æ跳转æ¹å\r\n if (nextStep === this.curStep) {\r\n return;\r\n }\r\n const nextIndex = findIndex(this.steps, function (s) { return s.stepId === nextStep.stepId; });\r\n if (nextIndex === this.curStepIndex) {\r\n return;\r\n }\r\n if (nextIndex < this.curStepIndex) { // ååè·³\r\n this.curStep = nextStep;\r\n this.curStepIndex = nextIndex;\r\n this.createStepComponent(nextStep);\r\n return;\r\n }\r\n if (nextStep.stepId === this.curStep.nextStep) { // ä¸ä¸æ¥\r\n this.nextStep();\r\n return;\r\n }\r\n // else if (this.finishedSteps.indexOf(nextStep.stepId) > -1) { // å·²å®æçåç»æ¥éª¤\r\n // this.curStep = nextStep;\r\n // this.curStepIndex = nextIndex;\r\n // this.createStepComponent(nextStep);\r\n // }\r\n\r\n }\r\n /**\r\n * ç¹å»ä¸ä¸æ¥\r\n */\r\n lastStep() {\r\n const self = this;\r\n this.curStepIndex = findIndex(this.steps, function (s) { return s.nextStep === self.curStep.stepId; });\r\n this.curStep = this.steps[this.curStepIndex];\r\n this.createStepComponent(this.curStep);\r\n }\r\n\r\n /**\r\n * ç¹å»ä¸ä¸æ¥\r\n */\r\n nextStep() {\r\n // æ ¡éª\r\n const validationFunc = this.curComponentRef.instance.validation;\r\n if (validationFunc && typeof (validationFunc) === 'function') {\r\n const result = validationFunc();\r\n if (!result) { return; }\r\n }\r\n // æ§è¡åComponentå®ä¹çnextStepClickäºä»¶\r\n const clickNextStep = this.curComponentRef.instance.clickNextStep;\r\n if (clickNextStep && typeof (clickNextStep) === 'function') {\r\n const result = clickNextStep(); // è¿åå¼æ¥æ¶booleanæobservableç±»å\r\n if (typeof (result) === 'boolean') {\r\n this.moveToNextStep(result);\r\n } else {\r\n result.subscribe(data => {\r\n this.moveToNextStep(data);\r\n });\r\n }\r\n } else {\r\n this.moveToNextStep(true);\r\n }\r\n }\r\n\r\n moveToNextStep(data) {\r\n if (!data) {\r\n return;\r\n }\r\n const curStep = this.curStep;\r\n if (curStep.nextStep === '') {\r\n return;\r\n }\r\n // this.finishedSteps.push(curStep.stepId);\r\n this.curStepIndex = findIndex(this.steps, function (s) { return s.stepId === curStep.nextStep; });\r\n if (this.curStepIndex > -1) {\r\n this.curStep = this.steps[this.curStepIndex];\r\n this.createStepComponent(this.curStep);\r\n }\r\n\r\n }\r\n /**\r\n * åæ¶\r\n */\r\n clickCancel() {\r\n this.clickCancelBtn.emit();\r\n }\r\n /**\r\n * å®æ\r\n */\r\n finishWizard() {\r\n const validationFunc = this.curComponentRef.instance.validation;\r\n if (validationFunc && typeof (validationFunc) === 'function') {\r\n const result = validationFunc();\r\n if (!result) { return; }\r\n }\r\n\r\n const beforeFinish = this.curComponentRef.instance.beforeFinish;\r\n if (beforeFinish && typeof (beforeFinish) === 'function') {\r\n const result = beforeFinish();\r\n if (!result) { return; }\r\n }\r\n this.clickFinishBtn.emit();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { PerfectScrollbarModule } from '@farris/ui-perfect-scrollbar';\r\nimport { WizardComponent } from './component/wizard.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n WizardComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n PerfectScrollbarModule\r\n ],\r\n exports: [WizardComponent]\r\n})\r\nexport class WizardModule {\r\n constructor() { }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n/**\r\n * Configuration service for the Popover directive.\r\n * You can inject this service, typically in your root component, and customize\r\n * the values of its properties in order to provide default values for all the\r\n * popovers used in the application.\r\n */\r\n@Injectable({providedIn: 'root'})\r\nexport class PopoverConfig {\r\n /**\r\n * Placement of a popover. Accepts: \"top\", \"bottom\", \"left\", \"right\", \"auto\"\r\n */\r\n placement = 'top';\r\n /**\r\n * Specifies events that should trigger. Supports a space separated list of\r\n * event names.\r\n */\r\n triggers = 'click';\r\n\r\n outsideClick = false;\r\n /**\r\n * A selector specifying the element the popover should be appended to.\r\n * Currently only supports \"body\".\r\n */\r\n container: string;\r\n}\r\n","import { ChangeDetectionStrategy, Input, Component } from '@angular/core';\r\nimport { PopoverConfig } from './popover.config';\r\nimport { isBs3 } from '../utils/theme-provider';\r\n\r\n@Component({\r\n selector: 'popover-container',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n // tslint:disable-next-line\r\n host: {\r\n '[class]':\r\n '\"popover in popover-\" + placement + \" \" + \"bs-popover-\" + placement + \" \" + placement + \" \" + containerClass',\r\n '[class.show]': '!isBs3',\r\n role: 'tooltip',\r\n style: 'display:block;'\r\n },\r\n styles: [\r\n `\r\n :host.bs-popover-top .arrow, :host.bs-popover-bottom .arrow {\r\n left: 50%;\r\n margin-left: -8px;\r\n }\r\n :host.bs-popover-left .arrow, :host.bs-popover-right .arrow {\r\n top: 50%;\r\n margin-top: -8px;\r\n }\r\n `\r\n ],\r\n templateUrl: './popover-container.component.html'\r\n})\r\nexport class PopoverContainerComponent {\r\n @Input() placement: string;\r\n @Input() title: string;\r\n containerClass: string;\r\n\r\n get isBs3(): boolean {\r\n return isBs3();\r\n }\r\n\r\n constructor(config: PopoverConfig) {\r\n Object.assign(this, config);\r\n }\r\n}\r\n","import {\r\n Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output,\r\n Renderer2, TemplateRef, ViewContainerRef\r\n} from '@angular/core';\r\nimport { PopoverConfig } from './popover.config';\r\nimport { ComponentLoader, ComponentLoaderFactory } from '../utils/component-loader/index';\r\nimport { PopoverContainerComponent } from './popover-container.component';\r\n\r\n/**\r\n * A lightweight, extensible directive for fancy popover creation.\r\n */\r\n@Directive({selector: '[popover]', exportAs: 'bs-popover'})\r\nexport class PopoverDirective implements OnInit, OnDestroy {\r\n /**\r\n * Content to be displayed as popover.\r\n */\r\n @Input() popover: string | TemplateRef<any>;\r\n /**\r\n * Context to be used if popover is a template.\r\n */\r\n @Input() popoverContext: any;\r\n /**\r\n * Title of a popover.\r\n */\r\n @Input() popoverTitle: string;\r\n /**\r\n * Placement of a popover. Accepts: \"top\", \"bottom\", \"left\", \"right\"\r\n */\r\n @Input() placement: 'top' | 'bottom' | 'left' | 'right' | 'auto';\r\n /**\r\n * Close popover on outside click\r\n */\r\n @Input() outsideClick = false;\r\n /**\r\n * Specifies events that should trigger. Supports a space separated list of\r\n * event names.\r\n */\r\n @Input() triggers: string;\r\n /**\r\n * A selector specifying the element the popover should be appended to.\r\n * Currently only supports \"body\".\r\n */\r\n @Input() container: string;\r\n\r\n /**\r\n * Css class for popover container\r\n */\r\n @Input() containerClass = '';\r\n\r\n /**\r\n * Returns whether or not the popover is currently being shown\r\n */\r\n @Input()\r\n get isOpen(): boolean {\r\n return this._popover.isShown;\r\n }\r\n\r\n set isOpen(value: boolean) {\r\n if (value) {\r\n this.show();\r\n } else {\r\n this.hide();\r\n }\r\n }\r\n\r\n /**\r\n * Emits an event when the popover is shown\r\n */\r\n @Output() onShown: EventEmitter<any>;\r\n /**\r\n * Emits an event when the popover is hidden\r\n */\r\n @Output() onHidden: EventEmitter<any>;\r\n\r\n private _popover: ComponentLoader<PopoverContainerComponent>;\r\n private _isInited = false;\r\n\r\n constructor(_elementRef: ElementRef,\r\n _renderer: Renderer2,\r\n _viewContainerRef: ViewContainerRef,\r\n _config: PopoverConfig,\r\n cis: ComponentLoaderFactory) {\r\n this._popover = cis\r\n .createLoader<PopoverContainerComponent>(\r\n _elementRef,\r\n _viewContainerRef,\r\n _renderer\r\n )\r\n .provide({provide: PopoverConfig, useValue: _config});\r\n Object.assign(this, _config);\r\n this.onShown = this._popover.onShown;\r\n this.onHidden = this._popover.onHidden;\r\n\r\n // fix: no focus on button on Mac OS #1795\r\n if (typeof window !== 'undefined') {\r\n _elementRef.nativeElement.addEventListener('click', function () {\r\n try {\r\n _elementRef.nativeElement.focus();\r\n } catch (err) {\r\n return;\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Opens an elementâs popover. This is considered a âmanualâ triggering of\r\n * the popover.\r\n */\r\n show(): void {\r\n if (this._popover.isShown || !this.popover) {\r\n return;\r\n }\r\n\r\n this._popover\r\n .attach(PopoverContainerComponent)\r\n .to(this.container)\r\n .position({attachment: this.placement})\r\n .show({\r\n content: this.popover,\r\n context: this.popoverContext,\r\n placement: this.placement,\r\n title: this.popoverTitle,\r\n containerClass: this.containerClass\r\n });\r\n this.isOpen = true;\r\n }\r\n\r\n /**\r\n * Closes an elementâs popover. This is considered a âmanualâ triggering of\r\n * the popover.\r\n */\r\n hide(): void {\r\n if (this.isOpen) {\r\n this._popover.hide();\r\n this.isOpen = false;\r\n }\r\n }\r\n\r\n /**\r\n * Toggles an elementâs popover. This is considered a âmanualâ triggering of\r\n * the popover.\r\n */\r\n toggle(): void {\r\n if (this.isOpen) {\r\n return this.hide();\r\n }\r\n\r\n this.show();\r\n }\r\n\r\n ngOnInit(): any {\r\n // fix: seems there are an issue with `routerLinkActive`\r\n // which result in duplicated call ngOnInit without call to ngOnDestroy\r\n // read more: https://github.com/valor-software/ngx-bootstrap/issues/1885\r\n if (this._isInited) {\r\n return;\r\n }\r\n this._isInited = true;\r\n\r\n this._popover.listen({\r\n triggers: this.triggers,\r\n outsideClick: this.outsideClick,\r\n show: () => this.show()\r\n });\r\n }\r\n\r\n ngOnDestroy(): any {\r\n this._popover.dispose();\r\n }\r\n}\r\n","import { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n// import { ComponentLoaderFactory } from '../utils/component-loader';\r\n// import { PositioningService } from '../utils/positioning';\r\nimport { PopoverConfig } from './popover.config';\r\nimport { PopoverDirective } from './popover.directive';\r\nimport { PopoverContainerComponent } from './popover-container.component';\r\n\r\n@NgModule({\r\n imports: [CommonModule],\r\n declarations: [PopoverDirective, PopoverContainerComponent],\r\n exports: [PopoverDirective],\r\n // providers: [PopoverConfig, ComponentLoaderFactory, PositioningService],\r\n entryComponents: [PopoverContainerComponent]\r\n})\r\nexport class PopoverModule {\r\n static forRoot(): ModuleWithProviders {\r\n return {\r\n ngModule: PopoverModule,\r\n providers: [PopoverConfig]\r\n };\r\n }\r\n}\r\n","import { Type } from '@angular/core';\r\n\r\n// æ§ä»¶å
¨é¨é
ç½®\r\nexport class ElementPropertyConfig {\r\n categoryId: string;\r\n categoryName: string;\r\n hide?= false;\r\n hideTitle?= false;\r\n properties: PropertyEntity[];\r\n propertyData?: any;\r\n setPropertyRelates?: (changeObject, propertyData, parameters?) => void;\r\n}\r\n\r\n\r\n\r\n// å±æ§å®ä½\r\nexport class PropertyEntity {\r\n propertyID: string; // å±æ§ID\r\n propertyName: string; // å±æ§æ¾ç¤ºçå称\r\n propertyType: string; // å±æ§çç±»å\r\n description?: string; // å±æ§æè¿°\r\n defaultValue?: any; // å±æ§çé»è®¤å¼\r\n readonly?= false; // æ¯å¦åªè¯»\r\n visible?= true; // æ¯å¦å¯è§\r\n iterator?: KeyMap[]; // ä¸ææ¡çæ举å¼\r\n min?: any; // æå°å¼\r\n max?: any; // æ大å¼\r\n\r\n numberFormat?: string; // æ°åç±»åå±æ§çæ ¼å¼ï¼åèkendo numeric format\r\n decimals?: number; // æ°åç±»åå±æ§çå°æ°ä½æ°\r\n\r\n\r\n\r\n /**\r\n * 级èå±æ§\r\n */\r\n cascadeProperties?: PropertyEntity[]; // 级èå±æ§é
ç½®\r\n isCollapse?= true; // 级èå±æ§æ¯å¦æ¶èµ·\r\n cascadeConverter?: TypeConverter; // 级èå±æ§çæ±æ»ä¿¡æ¯\r\n\r\n [propName: string]: any;\r\n\r\n /**\r\n * 模ææ¡å±æ§é
ç½®\r\n */\r\n editor?: Type<any>; // å±æ§èªå®ä¹ç¼è¾å¨ï¼ä»¥æ¨¡ææ¡çå½¢å¼å±ç¤ºï¼\r\n editorParams?: any; // èªå®ä¹ç¼è¾å¨åæ°\r\n converter?: TypeConverter; // å±æ§å¼è½¬æ¢å¨,\r\n showClearButton?= false; // æ¯å¦å±ç¤ºæ¸
é¤å¾æ \r\n\r\n // æå¼æ¨¡ææ¡åçæ¹æ³ï¼ä¸è¬ç¨äºæ ¡éªé»è¾ï¼è¿åå¼ä¸result=trueï¼åè¿ä¸æ¥æå¼æ¨¡ææ¡ï¼result=falseåæ示messageå
容ï¼å¹¶ä¸åæå¼æ¨¡ææ¡ã\r\n beforeOpenModal?(): BeforeOpenModalResult {\r\n return new BeforeOpenModalResult();\r\n }\r\n\r\n // ç¹å»æ¸
é¤æé®åçæ¹æ³\r\n afterClickClearButton?(value: any): void;\r\n\r\n}\r\n\r\n// 转æ¢å¨\r\nexport interface TypeConverter {\r\n convertTo(data: any, params?: any): string; // ç±æ¨¡ææ¡è½¬ä¸ºå±æ§æ¡ä¸å±ç¤ºçå¼\r\n}\r\n\r\nexport interface KeyMap {\r\n key: any;\r\n value: any;\r\n}\r\n\r\nexport class BeforeOpenModalResult {\r\n result: boolean;\r\n message?: string;\r\n}\r\n","import {\r\n Component, OnInit, Input, Output, OnChanges, SimpleChanges,\r\n EventEmitter, ComponentFactoryResolver, Injector, ElementRef\r\n} from '@angular/core';\r\nimport { PropertyEntity } from '../../entity/property-entity';\r\nimport { BsModalService } from '@farris/ui-modal';\r\nimport { NotifyService, NotifyOptions } from '@farris/ui-notify';\r\n\r\n@Component({\r\n selector: 'webide-property-item',\r\n templateUrl: './property-item.component.html',\r\n styleUrls: ['./property-item.component.css']\r\n})\r\nexport class PropertyItemComponent implements OnInit, OnChanges {\r\n @Input() elementConfig: PropertyEntity;\r\n @Input() elementValue: any;\r\n @Output() valueChanged = new EventEmitter<any>();\r\n @Output() submitModal = new EventEmitter<any>();\r\n\r\n elementShowValue: any; // 模ææ¡ç±»åçå±æ§:å±æ§æ¡çå±ç¤ºå¼\r\n selectOptions = [];\r\n itemType = 'string';\r\n show = true;\r\n\r\n numberRestriction = {\r\n format: 'n2',\r\n min: '',\r\n max: ''\r\n };\r\n showClearButton = false;\r\n constructor(\r\n private resolver: ComponentFactoryResolver, private modalService: BsModalService,\r\n private injector: Injector, private notifyServ: NotifyService, public el: ElementRef) { }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n this.refresh();\r\n }\r\n\r\n ngOnInit() {\r\n this.refresh();\r\n }\r\n\r\n refresh() {\r\n // æ¯å¦æ¾ç¤ºï¼visibleé»è®¤true\r\n if (Object.keys(this.elementConfig).indexOf('visible') < 0) {\r\n this.show = true;\r\n } else {\r\n this.show = this.elementConfig.visible;\r\n }\r\n\r\n\r\n // æ¾ç¤ºæ ¼å¼\r\n const propertyType = this.itemType = this.elementConfig.propertyType;\r\n switch (propertyType) {\r\n case 'boolean': {\r\n this.itemType = 'select';\r\n this.selectOptions = [{ key: true, value: true }, { key: false, value: false }];\r\n break;\r\n }\r\n case 'select': {\r\n this.selectOptions = this.elementConfig.iterator;\r\n break;\r\n }\r\n case 'modal': {\r\n this._convertModalShowValue(this.elementValue);\r\n break;\r\n }\r\n case 'number': {\r\n // precisionå¾
ä¼å为'n2'çæ ¼å¼ï¼ä¸kendoä¿æä¸è´\r\n const precision = this.elementConfig.precision;\r\n if (precision !== undefined && precision > -1) {\r\n this.numberRestriction.format = 'n' + precision;\r\n }\r\n\r\n // æ¯æä¼ å
¥kendo Numeric formatæ ¼å¼ ï¼'n3' / 'p'\r\n if (this.elementConfig.numberFormat) {\r\n this.numberRestriction.format = this.elementConfig.numberFormat;\r\n }\r\n\r\n // 设置æ大ãæå°å¼\r\n this.numberRestriction.min = this.elementConfig.min;\r\n this.numberRestriction.max = this.elementConfig.max;\r\n break;\r\n }\r\n case 'string': {\r\n if (this.elementConfig.readonly) {\r\n this._convertModalShowValue(this.elementValue);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * é¼ æ 移å
¥\r\n */\r\n onmouseover() {\r\n if (!this.elementConfig.showClearButton) {\r\n return;\r\n }\r\n if (!this.showClearButton) {\r\n this.showClearButton = true;\r\n }\r\n }\r\n\r\n /**\r\n * é¼ æ 离å¼\r\n */\r\n onmouseleave() {\r\n if (!this.elementConfig.showClearButton) {\r\n return;\r\n }\r\n this.showClearButton = false;\r\n }\r\n\r\n\r\n /**\r\n * æ¸
é¤æ¨¡ææ¡å
容\r\n */\r\n modalClear() {\r\n // æ°æ®è½¬æ¢\r\n this._convertModalShowValue(null);\r\n\r\n // è¥ææ¸
é¤åäºä»¶ï¼å
æ§è¡æ¹æ³\r\n if (Object.keys(this.elementConfig).indexOf('afterClickClearButton') > -1 &&\r\n typeof (this.elementConfig.afterClickClearButton) === 'function') {\r\n this.elementConfig.afterClickClearButton(this.elementValue);\r\n }\r\n\r\n const changeObject = {\r\n propertyID: this.elementConfig.propertyID,\r\n propertyValue: null\r\n };\r\n this.submitModal.emit({ changeObject, parameters: null });\r\n }\r\n\r\n /**\r\n * åæ´å±æ§å¼\r\n */\r\n changeValue() {\r\n const changeObject = {\r\n propertyID: this.elementConfig.propertyID,\r\n propertyValue: this.elementValue\r\n };\r\n this.valueChanged.emit({ changeObject });\r\n }\r\n\r\n /**\r\n * èªå®ä¹ç¼è¾å¨ä½¿ç¨æ¨¡ææ¡æå¼\r\n */\r\n openModal() {\r\n if (this.elementConfig.readonly) {\r\n return;\r\n }\r\n if (Object.keys(this.elementConfig).indexOf('beforeOpenModal') > -1 && typeof (this.elementConfig.beforeOpenModal) === 'function') {\r\n const result = this.elementConfig.beforeOpenModal();\r\n if (result && !result.result) {\r\n this.notifyServ.warning({\r\n title: 'ç³»ç»æ示', msg: result.message, timeout: 3000\r\n } as NotifyOptions);\r\n return;\r\n }\r\n }\r\n this.createEditorComponent();\r\n }\r\n\r\n /**\r\n * å建èªå®ä¹ç¼è¾å¨\r\n */\r\n private createEditorComponent() {\r\n const editor = this.elementConfig.editor;\r\n if (!editor) {\r\n return;\r\n }\r\n // å建模ææ¡ç»ä»¶\r\n const compFactory = this.resolver.resolveComponentFactory(editor);\r\n const compRef = compFactory.create(this.injector);\r\n compRef.instance.value = this.elementValue;\r\n if (this.elementConfig.editorParams && compRef.instance.editorParams) { // ç¼è¾å¨éè¦çé¢å¤åæ°\r\n compRef.instance.editorParams = this.elementConfig.editorParams;\r\n }\r\n let modalConfig = compRef.instance.modalConfig;\r\n if (!modalConfig) {\r\n modalConfig = {\r\n title: 'å±æ§é
ç½®',\r\n width: 800,\r\n height: 400,\r\n showButtons: false\r\n };\r\n } else if (modalConfig.showButtons) {\r\n modalConfig.buttons = compRef.instance.modalFooter;\r\n }\r\n\r\n const dialog = this.modalService.show(compRef, modalConfig);\r\n\r\n // çå¬å
³é模ææ¡\r\n if (compRef.instance.closeModal && compRef.instance.closeModal instanceof EventEmitter) {\r\n compRef.instance.closeModal.subscribe((data) => {\r\n // æ°æ®è½¬æ¢\r\n if (data) {\r\n this._convertModalShowValue(data);\r\n\r\n const changeObject = {\r\n propertyID: this.elementConfig.propertyID,\r\n propertyValue: data\r\n };\r\n this.valueChanged.emit({ changeObject });\r\n\r\n }\r\n\r\n dialog.close();\r\n });\r\n }\r\n\r\n\r\n\r\n // å¼¹åºæ¡å
³éäºä»¶ï¼å¸¦åæ°ï¼æ ¼å¼ä¸º{ value, parameters }\r\n if (compRef.instance.submitModal && compRef.instance.submitModal instanceof EventEmitter) {\r\n compRef.instance.submitModal.subscribe(data => {\r\n if (!data) {\r\n dialog.close();\r\n return;\r\n }\r\n const { value, parameters } = data;\r\n // æ°æ®è½¬æ¢\r\n this._convertModalShowValue(value);\r\n\r\n const changeObject = {\r\n propertyID: this.elementConfig.propertyID,\r\n propertyValue: value\r\n };\r\n this.submitModal.emit({ changeObject, parameters });\r\n\r\n dialog.close();\r\n });\r\n }\r\n\r\n }\r\n\r\n /**\r\n * 模ææ¡åºæ¯ä¸å°å±æ§å¼è½¬æ¢ä¸ºè¾å
¥æ¡ä¸æ¾ç¤ºçå¼\r\n * @param value\r\n */\r\n private _convertModalShowValue(value) {\r\n if (this.elementConfig.converter) {\r\n this.elementShowValue = this.elementConfig.converter.convertTo(value);\r\n return;\r\n }\r\n if (value && value instanceof Object) {\r\n this.elementShowValue = JSON.stringify(value);\r\n return;\r\n }\r\n this.elementShowValue = value;\r\n }\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter, ViewChildren, OnChanges, SimpleChanges, ViewEncapsulation } from '@angular/core';\r\nimport { ElementPropertyConfig } from '../../entity/property-entity';\r\nimport { PropertyItemComponent } from '../property-item/property-item.component';\r\n\r\n@Component({\r\n selector: 'webide-property-item-list',\r\n templateUrl: './property-item-list.component.html',\r\n styleUrls: ['./property-item-list.component.css'],\r\n encapsulation: ViewEncapsulation.None\r\n\r\n})\r\nexport class PropertyItemListComponent implements OnChanges {\r\n @Input() category: ElementPropertyConfig; // æä¸åç±»ä¸çå±æ§é
ç½®\r\n @Input() propertyData; // å±æ§å¼\r\n @Output() valueChanged = new EventEmitter<any>();\r\n @Output() submitModal = new EventEmitter<any>();\r\n\r\n @ViewChildren(PropertyItemComponent) items: Array<PropertyItemComponent>;\r\n\r\n data; // å®é
å±æ§å¼\r\n constructor() { }\r\n\r\n ngOnChanges(simpleChanges: SimpleChanges) {\r\n // è¥åç±»ä¸æpropertyDataï¼åååç±»ä¸çpropertyDataï¼å¦ååæ´ä½çpropertyData\r\n if (this.category.propertyData) {\r\n this.data = this.category.propertyData;\r\n } else {\r\n this.data = this.propertyData;\r\n }\r\n }\r\n refresh() {\r\n // è¥åç±»ä¸æpropertyDataï¼åååç±»ä¸çpropertyDataï¼å¦ååæ´ä½çpropertyData\r\n if (this.category.propertyData) {\r\n this.data = this.category.propertyData;\r\n } else {\r\n this.data = this.propertyData;\r\n }\r\n this.items.forEach(item => item.refresh());\r\n }\r\n\r\n /**\r\n * ä¸è¬å±æ§åæ´\r\n * @param $event\r\n */\r\n _itemChanged($event) {\r\n const { changeObject } = $event;\r\n this.data[changeObject.propertyID] = changeObject.propertyValue;\r\n\r\n if (this.category.setPropertyRelates && typeof (this.category.setPropertyRelates) === 'function') {\r\n this.category.setPropertyRelates(changeObject, this.data);\r\n this.items.forEach(item => item.refresh());\r\n }\r\n changeObject.categoryId = this.category.categoryId;\r\n this.valueChanged.emit(changeObject);\r\n }\r\n\r\n /**\r\n * 模ææ¡æ°æ®åæ´ï¼TODO:å¾
ä¼åï¼å并valueChangeäºä»¶ï¼\r\n * @param $event\r\n */\r\n _submitModal($event) {\r\n const { changeObject, parameters } = $event;\r\n this.data[changeObject.propertyID] = changeObject.propertyValue;\r\n\r\n if (this.category.setPropertyRelates && typeof (this.category.setPropertyRelates) === 'function') {\r\n this.category.setPropertyRelates(changeObject, this.data, parameters);\r\n this.items.forEach(item => item.refresh());\r\n }\r\n\r\n changeObject.categoryId = this.category.categoryId;\r\n this.submitModal.emit($event);\r\n }\r\n\r\n /**\r\n * 级èå±æ§åæ´\r\n * @param $event\r\n * @param parentPropertyID\r\n */\r\n _cascadeitemChanged($event, parentPropertyID) {\r\n if (!parentPropertyID) {\r\n return;\r\n }\r\n const { changeObject } = $event;\r\n if (!this.data[parentPropertyID]) {\r\n this.data[parentPropertyID] = {};\r\n }\r\n\r\n this.data[parentPropertyID][changeObject.propertyID] = changeObject.propertyValue;\r\n\r\n changeObject.categoryId = this.category.categoryId;\r\n changeObject.parentPropertyID = parentPropertyID;\r\n\r\n if (this.category.setPropertyRelates && typeof (this.category.setPropertyRelates) === 'function') {\r\n this.category.setPropertyRelates(changeObject, this.data);\r\n this.items.forEach(item => item.refresh());\r\n }\r\n this.valueChanged.emit(changeObject);\r\n }\r\n\r\n /**\r\n * 级è模ææ¡å±æ§åæ´\r\n * @param $event\r\n * @param parentPropertyID\r\n */\r\n __cascadeitemSubmitModal($event, parentPropertyID) {\r\n if (!parentPropertyID) {\r\n return;\r\n }\r\n const { changeObject, parameters } = $event;\r\n if (!this.data[parentPropertyID]) {\r\n this.data[parentPropertyID] = {};\r\n }\r\n\r\n this.data[parentPropertyID][changeObject.propertyID] = changeObject.propertyValue;\r\n\r\n changeObject.categoryId = this.category.categoryId;\r\n changeObject.parentPropertyID = parentPropertyID;\r\n\r\n if (this.category.setPropertyRelates && typeof (this.category.setPropertyRelates) === 'function') {\r\n this.category.setPropertyRelates(changeObject, this.data, parameters);\r\n this.items.forEach(item => item.refresh());\r\n }\r\n this.submitModal.emit($event);\r\n }\r\n /**\r\n * 级èå±æ§çæ±æ»ä¿¡æ¯\r\n * @param propItem\r\n * @param valueObject\r\n */\r\n _valueStringify(propItem, valueObject) {\r\n if (!propItem || !propItem.cascadeConfig || !valueObject) {\r\n return '';\r\n }\r\n if (!propItem.cascadeConverter || !propItem.cascadeConverter.convertTo) {\r\n return JSON.stringify(valueObject);\r\n }\r\n\r\n return propItem.cascadeConverter.convertTo(valueObject, propItem.cascadeConfig);\r\n\r\n\r\n }\r\n\r\n _checkCascadeVisible(propItem) {\r\n if (Object.keys(propItem).indexOf('visible') < 0) {\r\n return true;\r\n } else {\r\n return propItem.visible;\r\n }\r\n }\r\n}\r\n","import {\r\n Component, OnInit, Input, ViewChild, ElementRef, Output,\r\n EventEmitter, OnChanges, SimpleChanges, ViewChildren\r\n} from '@angular/core';\r\nimport { ElementPropertyConfig } from '../../entity/property-entity';\r\nimport { PropertyItemListComponent } from '../property-item-list/property-item-list.component';\r\n\r\n@Component({\r\n selector: 'app-property-panel',\r\n templateUrl: './property-panel.component.html',\r\n styleUrls: ['./property-panel.component.css']\r\n})\r\nexport class PropertyPanelComponent implements OnInit, OnChanges {\r\n @Input() width: number;\r\n @Input() height: number;\r\n\r\n @Input() isPersitOpenState = false; // æ¯å¦ææé¢æ¿çéèæ¾ç¤ºç¶æ\r\n @Input() isShowPanel = false; // isPersitOpenState=trueæ¶ï¼æ§å¶é¢æ¿æ¯å¦éèæ¾ç¤º\r\n @Output() closePropertyPanel = new EventEmitter<any>(); // isPersitOpenState=trueæ¶ï¼æåºé¢æ¿çå
³éäºä»¶\r\n\r\n @Input() propertyConfig: ElementPropertyConfig[]; // å±æ§ç±»å\r\n @Input() propertyData = {}; // å±æ§å¼\r\n\r\n @Output() propertyChanged = new EventEmitter<any>(); // å±æ§åæ´äºä»¶\r\n @Output() submitModal = new EventEmitter<any>(); // 模ææ¡å±æ§åæ´äºä»¶\r\n @Input() showCloseBtn = true;\r\n\r\n\r\n @ViewChild('east') private eastDiv: ElementRef;\r\n @ViewChildren(PropertyItemListComponent) itemLists: Array<PropertyItemListComponent>;\r\n isOpen = true;\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n\r\n if (this.width) {\r\n this.eastDiv.nativeElement.style.width = this.width + 'px';\r\n } else {\r\n this.eastDiv.nativeElement.style.width = 'inherit';\r\n }\r\n if (this.height) {\r\n this.eastDiv.nativeElement.style.height = this.height + 'px';\r\n } else {\r\n this.eastDiv.nativeElement.style.height = '100%';\r\n }\r\n\r\n\r\n if (this.isPersitOpenState) {\r\n this.isOpen = this.isShowPanel;\r\n }\r\n }\r\n\r\n /**\r\n * æ´æ¹é¢æ¿çéèæ¾ç¤ºç¶æï¼åªæå¨isPersitOpenState=trueæ¶çæ\r\n * @param simpleChanges\r\n */\r\n ngOnChanges(simpleChanges: SimpleChanges) {\r\n if (simpleChanges.isShowPanel && this.isPersitOpenState) {\r\n this.isOpen = this.isShowPanel;\r\n }\r\n }\r\n refreshPanel() {\r\n this.itemLists.forEach(item => item.refresh());\r\n }\r\n changeStatus(item: any) {\r\n if (this.propertyConfig.length < 2) {\r\n return;\r\n }\r\n if (!item.status || item.status === 'open') {\r\n item.status = 'closed';\r\n } else {\r\n item.status = 'open';\r\n }\r\n }\r\n\r\n // éèé¢æ¿\r\n collapse() {\r\n // isPersitOpenState=trueæ¶,ç±å¤é¨ç¡®å®ç¶æ\r\n if (this.isPersitOpenState) {\r\n this.closePropertyPanel.emit();\r\n } else {\r\n this.isOpen = false;\r\n }\r\n }\r\n\r\n /**\r\n * æåºå±æ§åæ´äºä»¶\r\n * @param changeObject\r\n */\r\n _valueChanged(changeObject) {\r\n this.propertyChanged.emit(changeObject);\r\n }\r\n _submitModal($event) {\r\n this.submitModal.emit($event);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { PopoverModule } from '../popover/popover.module';\r\nimport { PropertyPanelComponent } from './components/property-panel/property-panel.component';\r\nimport { PropertyItemListComponent } from './components/property-item-list/property-item-list.component';\r\nimport { PropertyItemComponent } from './components/property-item/property-item.component';\r\nimport { InputsModule } from '@progress/kendo-angular-inputs';\r\nimport { DropDownsModule } from '@progress/kendo-angular-dropdowns';\r\nimport { FarrisDialogModule } from '@farris/ui-dialog';\r\nimport { FarrisPanelModule } from '@farris/ui-panel';\r\nimport { PerfectScrollbarModule } from '@farris/ui-perfect-scrollbar';\r\nimport { DateInputsModule } from '@progress/kendo-angular-dateinputs';\r\nimport { NotifyModule } from '@farris/ui-notify';\r\n@NgModule({\r\n declarations: [\r\n PropertyPanelComponent,\r\n PropertyItemListComponent,\r\n PropertyItemComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n PopoverModule/* .forRoot() */,\r\n PerfectScrollbarModule,\r\n InputsModule,\r\n DropDownsModule,\r\n FarrisDialogModule,\r\n DateInputsModule,\r\n FarrisPanelModule,\r\n NotifyModule.forRoot(),\r\n ],\r\n exports: [PropertyPanelComponent],\r\n entryComponents: [PropertyPanelComponent, PropertyItemComponent]\r\n})\r\nexport class PropertyPanelModule {\r\n constructor() { }\r\n}\r\n","import {Injectable} from '@angular/core';\r\n\r\n/**\r\n * Configuration service for the NgbTabset component.\r\n * You can inject this service, typically in your root component, and customize the values of its properties in\r\n * order to provide default values for all the tabsets used in the application.\r\n */\r\n@Injectable()\r\nexport class NgbTabsetConfig {\r\n justify: 'start' | 'center' | 'end' | 'fill' | 'justified' = 'start';\r\n orientation: 'horizontal' | 'vertical' = 'horizontal';\r\n type: 'tabs' | 'pills' = 'tabs';\r\n}\r\n","import {\r\n Component,\r\n Input,\r\n ContentChildren,\r\n QueryList,\r\n Directive,\r\n TemplateRef,\r\n ContentChild,\r\n AfterContentChecked,\r\n Output,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport { NgbTabsetConfig } from './tabset-config';\r\n\r\nlet nextId = 0;\r\n\r\n/**\r\n * This directive should be used to wrap tab titles that need to contain HTML markup or other directives.\r\n */\r\n@Directive({ selector: 'ng-template[ngbTabTitle]' })\r\n// tslint:disable-next-line:directive-class-suffix\r\nexport class NgbTabTitle {\r\n constructor(public templateRef: TemplateRef<any>) { }\r\n}\r\n\r\n/**\r\n * This directive must be used to wrap content to be displayed in a tab.\r\n */\r\n@Directive({ selector: 'ng-template[ngbTabContent]' })\r\n// tslint:disable-next-line:directive-class-suffix\r\nexport class NgbTabContent {\r\n constructor(public templateRef: TemplateRef<any>) { }\r\n}\r\n\r\n/**\r\n * A directive representing an individual tab.\r\n */\r\n@Directive({ selector: 'ngb-tab' })\r\n// tslint:disable-next-line:directive-class-suffix\r\nexport class NgbTab {\r\n /**\r\n * Unique tab identifier. Must be unique for the entire document for proper accessibility support.\r\n */\r\n @Input() id = `ngb-tab-${nextId++}`;\r\n /**\r\n * Simple (string only) title. Use the \"NgbTabTitle\" directive for more complex use-cases.\r\n */\r\n @Input() title: string;\r\n /**\r\n * Allows toggling disabled state of a given state. Disabled tabs can't be selected.\r\n */\r\n @Input() disabled = false;\r\n\r\n @ContentChild(NgbTabContent) contentTpl: NgbTabContent;\r\n @ContentChild(NgbTabTitle) titleTpl: NgbTabTitle;\r\n}\r\n\r\n/**\r\n * The payload of the change event fired right before the tab change\r\n */\r\nexport interface NgbTabChangeEvent {\r\n /**\r\n * Id of the currently active tab\r\n */\r\n activeId: string;\r\n\r\n /**\r\n * Id of the newly selected tab\r\n */\r\n nextId: string;\r\n\r\n /**\r\n * Function that will prevent tab switch if called\r\n */\r\n preventDefault: () => void;\r\n}\r\n\r\n/**\r\n * A component that makes it easy to create tabbed interface.\r\n */\r\n@Component({\r\n selector: 'ngb-tabset',\r\n exportAs: 'ngbTabset',\r\n template: `\r\n <ul [class]=\"'web-ide-content-tab-header nav nav-' + type + (orientation == 'horizontal'? ' '\r\n + justifyClass : ' flex-column')\" role=\"tablist\">\r\n <li class=\"nav-item\" *ngFor=\"let tab of tabs\">\r\n <a [id]=\"tab.id\" class=\"nav-link\" [class.active]=\"tab.id === activeId\" [class.disabled]=\"tab.disabled\"\r\n href (click)=\"select(tab.id)\" role=\"tab\" [attr.tabindex]=\"(tab.disabled ? '-1': undefined)\"\r\n [attr.aria-controls]=\"((!destroyOnHide || tab.id === activeId) ? tab.id + '-panel' : null)\"\r\n [attr.aria-expanded]=\"tab.id === activeId\" [attr.aria-disabled]=\"tab.disabled\">\r\n {{tab.title}}<ng-template [ngTemplateOutlet]=\"tab.titleTpl?.templateRef\"></ng-template>\r\n </a>\r\n </li>\r\n </ul>\r\n <div class=\"web-ide-content tab-content d-flex\">\r\n <ng-template ngFor let-tab [ngForOf]=\"tabs\">\r\n <div\r\n class=\"tab-pane {{tab.id === activeId ? 'active' : null}}\"\r\n *ngIf=\"!destroyOnHide || tab.id === activeId\"\r\n role=\"tabpanel\"\r\n [attr.aria-labelledby]=\"tab.id\" id=\"{{tab.id}}-panel\"\r\n [attr.aria-expanded]=\"tab.id === activeId\">\r\n <ng-template [ngTemplateOutlet]=\"tab.contentTpl.templateRef\"></ng-template>\r\n </div>\r\n </ng-template>\r\n </div>\r\n `,\r\n styleUrls: ['./tabset.css']\r\n})\r\n// tslint:disable-next-line:component-class-suffix\r\nexport class NgbTabset implements AfterContentChecked {\r\n justifyClass: string;\r\n\r\n @ContentChildren(NgbTab) tabs: QueryList<NgbTab>;\r\n\r\n /**\r\n * An identifier of an initially selected (active) tab. Use the \"select\" method to switch a tab programmatically.\r\n */\r\n @Input() activeId: string;\r\n\r\n /**\r\n * Whether the closed tabs should be hidden without destroying them\r\n */\r\n @Input() destroyOnHide = true;\r\n\r\n /**\r\n * The horizontal alignment of the nav with flexbox utilities. Can be one of 'start', 'center', 'end', 'fill' or\r\n * 'justified'\r\n * The default value is 'start'.\r\n */\r\n @Input()\r\n set justify(className: 'start' | 'center' | 'end' | 'fill' | 'justified') {\r\n if (className === 'fill' || className === 'justified') {\r\n this.justifyClass = `nav-${className}`;\r\n } else {\r\n this.justifyClass = `justify-content-${className}`;\r\n }\r\n }\r\n\r\n /**\r\n * The orientation of the nav (horizontal or vertical).\r\n * The default value is 'horizontal'.\r\n */\r\n @Input() orientation: 'horizontal' | 'vertical';\r\n\r\n /**\r\n * Type of navigation to be used for tabs. Can be one of 'tabs' or 'pills'.\r\n */\r\n @Input() type: 'tabs' | 'pills';\r\n\r\n /**\r\n * A tab change event fired right before the tab selection happens. See NgbTabChangeEvent for payload details\r\n */\r\n @Output() tabChange = new EventEmitter<NgbTabChangeEvent>();\r\n\r\n constructor(config: NgbTabsetConfig) {\r\n this.type = config.type;\r\n this.justify = config.justify;\r\n this.orientation = config.orientation;\r\n }\r\n\r\n /**\r\n * Selects the tab with the given id and shows its associated pane.\r\n * Any other tab that was previously selected becomes unselected and its associated pane is hidden.\r\n */\r\n select(tabId: string) {\r\n const selectedTab = this._getTabById(tabId);\r\n if (selectedTab && !selectedTab.disabled && this.activeId !== selectedTab.id) {\r\n let defaultPrevented = false;\r\n\r\n this.tabChange.emit(\r\n { activeId: this.activeId, nextId: selectedTab.id, preventDefault: () => { defaultPrevented = true; } });\r\n\r\n if (!defaultPrevented) {\r\n this.activeId = selectedTab.id;\r\n }\r\n }\r\n }\r\n\r\n ngAfterContentChecked() {\r\n // auto-correct activeId that might have been set incorrectly as input\r\n const activeTab = this._getTabById(this.activeId);\r\n this.activeId = activeTab ? activeTab.id : (this.tabs.length ? this.tabs.first.id : null);\r\n }\r\n\r\n private _getTabById(id: string): NgbTab {\r\n const tabsWithId: NgbTab[] = this.tabs.filter(tab => tab.id === id);\r\n return tabsWithId.length ? tabsWithId[0] : null;\r\n }\r\n}\r\n","import {NgModule, ModuleWithProviders} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\n\r\nimport {NgbTabset, NgbTab, NgbTabContent, NgbTabTitle, NgbTabChangeEvent} from './tabset';\r\nimport {NgbTabsetConfig} from './tabset-config';\r\n\r\nexport {NgbTabset, NgbTab, NgbTabContent, NgbTabTitle, NgbTabChangeEvent} from './tabset';\r\nexport {NgbTabsetConfig} from './tabset-config';\r\n\r\nconst NGB_TABSET_DIRECTIVES = [NgbTabset, NgbTab, NgbTabContent, NgbTabTitle];\r\n\r\n@NgModule({declarations: NGB_TABSET_DIRECTIVES, exports: NGB_TABSET_DIRECTIVES, imports: [CommonModule]})\r\nexport class NgbTabsetModule {\r\n static forRoot(): ModuleWithProviders { return {ngModule: NgbTabsetModule, providers: [NgbTabsetConfig]}; }\r\n}\r\n","import {Injectable} from '@angular/core';\r\n\r\n/**\r\n * Configuration service for the NgbNavTabset component.\r\n * You can inject this service, typically in your root component, and customize the values of its properties in\r\n * order to provide default values for all the tabsets used in the application.\r\n */\r\n@Injectable()\r\nexport class NgbNavTabsetConfig {\r\n justify: 'start' | 'center' | 'end' | 'fill' | 'justified' = 'start';\r\n orientation: 'horizontal' | 'vertical' = 'horizontal';\r\n type: 'tabs' | 'pills' = 'tabs';\r\n}\r\n","import {\r\n Component,\r\n Input,\r\n ContentChildren,\r\n QueryList,\r\n Directive,\r\n TemplateRef,\r\n ContentChild,\r\n AfterContentChecked,\r\n Output,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport { NgbNavTabsetConfig } from './navtab-config';\r\n\r\nlet nextId = 0;\r\n\r\n/**\r\n * This directive should be used to wrap tab titles that need to contain HTML markup or other directives.\r\n */\r\n@Directive({ selector: 'ng-template[ngbNavTabTitle]' })\r\n// tslint:disable-next-line:directive-class-suffix\r\nexport class NgbNavTabTitle {\r\n constructor(public templateRef: TemplateRef<any>) { }\r\n}\r\n\r\n/**\r\n * This directive must be used to wrap content to be displayed in a tab.\r\n */\r\n@Directive({ selector: 'ng-template[ngbNavTabContent]' })\r\n// tslint:disable-next-line:directive-class-suffix\r\nexport class NgbNavTabContent {\r\n constructor(public templateRef: TemplateRef<any>) { }\r\n}\r\n\r\n/**\r\n * A directive representing an individual tab.\r\n */\r\n@Directive({ selector: 'ngb-navtab' })\r\n// tslint:disable-next-line:directive-class-suffix\r\nexport class NgbNavTab {\r\n /**\r\n * Unique tab identifier. Must be unique for the entire document for proper accessibility support.\r\n */\r\n @Input() id = `ngb-tab-${nextId++}`;\r\n /**\r\n * Simple (string only) title. Use the \"NgbNavTabTitle\" directive for more complex use-cases.\r\n */\r\n @Input() title: string;\r\n /**\r\n * Allows toggling disabled state of a given state. Disabled tabs can't be selected.\r\n */\r\n @Input() disabled = false;\r\n\r\n @ContentChild(NgbNavTabContent) contentTpl: NgbNavTabContent;\r\n @ContentChild(NgbNavTabTitle) titleTpl: NgbNavTabTitle;\r\n}\r\n\r\n/**\r\n * The payload of the change event fired right before the tab change\r\n */\r\nexport interface NgbNavTabChangeEvent {\r\n /**\r\n * Id of the currently active tab\r\n */\r\n activeId: string;\r\n\r\n /**\r\n * Id of the newly selected tab\r\n */\r\n nextId: string;\r\n\r\n /**\r\n * Function that will prevent tab switch if called\r\n */\r\n preventDefault: () => void;\r\n}\r\n\r\n/**\r\n * A component that makes it easy to create tabbed interface.\r\n */\r\n@Component({\r\n selector: 'ngb-navtabset',\r\n exportAs: 'NgbNavTabset',\r\n template: `\r\n <ul [class]=\"'web-ide-activity-bar nav nav-' + type + (orientation == 'horizontal'? ' '\r\n + justifyClass : ' flex-column')\" role=\"tablist\">\r\n <li class=\"nav-item\" *ngFor=\"let tab of tabs\">\r\n <a [id]=\"tab.id\" class=\"nav-link\" [class.active]=\"tab.id === activeId\" [class.disabled]=\"tab.disabled\"\r\n href (click)=\"select(tab.id)\" role=\"tab\" [attr.tabindex]=\"(tab.disabled ? '-1': undefined)\"\r\n [attr.aria-controls]=\"(!destroyOnHide || tab.id === activeId ? tab.id + '-panel' : null)\"\r\n [attr.aria-expanded]=\"tab.id === activeId\" [attr.aria-disabled]=\"tab.disabled\">\r\n {{tab.title}}<ng-template [ngTemplateOutlet]=\"tab.titleTpl?.templateRef\"></ng-template>\r\n </a>\r\n </li>\r\n </ul>\r\n <div class=\"web-ide-side-bar tab-content\">\r\n <ng-template ngFor let-tab [ngForOf]=\"tabs\">\r\n <div\r\n class=\"tab-pane {{tab.id === activeId ? 'active' : null}}\"\r\n *ngIf=\"!destroyOnHide || tab.id === activeId\"\r\n role=\"tabpanel\"\r\n [attr.aria-labelledby]=\"tab.id\" id=\"{{tab.id}}-panel\"\r\n [attr.aria-expanded]=\"tab.id === activeId\">\r\n <ng-template [ngTemplateOutlet]=\"tab.contentTpl.templateRef\"></ng-template>\r\n </div>\r\n </ng-template>\r\n </div>\r\n `,\r\n styleUrls: ['./navtab.css']\r\n})\r\n// tslint:disable-next-line:component-class-suffix\r\nexport class NgbNavTabset implements AfterContentChecked {\r\n justifyClass: string;\r\n\r\n @ContentChildren(NgbNavTab) tabs: QueryList<NgbNavTab>;\r\n\r\n /**\r\n * An identifier of an initially selected (active) tab. Use the \"select\" method to switch a tab programmatically.\r\n */\r\n @Input() activeId: string;\r\n\r\n /**\r\n * Whether the closed tabs should be hidden without destroying them\r\n */\r\n @Input() destroyOnHide = true;\r\n\r\n /**\r\n * The horizontal alignment of the nav with flexbox utilities. Can be one of 'start', 'center', 'end', 'fill' or\r\n * 'justified'\r\n * The default value is 'start'.\r\n */\r\n @Input()\r\n set justify(className: 'start' | 'center' | 'end' | 'fill' | 'justified') {\r\n if (className === 'fill' || className === 'justified') {\r\n this.justifyClass = `nav-${className}`;\r\n } else {\r\n this.justifyClass = `justify-content-${className}`;\r\n }\r\n }\r\n\r\n /**\r\n * The orientation of the nav (horizontal or vertical).\r\n * The default value is 'horizontal'.\r\n */\r\n @Input() orientation: 'horizontal' | 'vertical';\r\n\r\n /**\r\n * Type of navigation to be used for tabs. Can be one of 'tabs' or 'pills'.\r\n */\r\n @Input() type: 'tabs' | 'pills';\r\n\r\n /**\r\n * A tab change event fired right before the tab selection happens. See NgbNavTabChangeEvent for payload details\r\n */\r\n @Output() tabChange = new EventEmitter<NgbNavTabChangeEvent>();\r\n\r\n constructor(config: NgbNavTabsetConfig) {\r\n this.type = config.type;\r\n this.justify = config.justify;\r\n this.orientation = config.orientation;\r\n }\r\n\r\n /**\r\n * Selects the tab with the given id and shows its associated pane.\r\n * Any other tab that was previously selected becomes unselected and its associated pane is hidden.\r\n */\r\n select(tabId: string) {\r\n const selectedTab = this._getTabById(tabId);\r\n if (selectedTab && !selectedTab.disabled && this.activeId !== selectedTab.id) {\r\n let defaultPrevented = false;\r\n\r\n this.tabChange.emit(\r\n { activeId: this.activeId, nextId: selectedTab.id, preventDefault: () => { defaultPrevented = true; } });\r\n\r\n if (!defaultPrevented) {\r\n this.activeId = selectedTab.id;\r\n }\r\n }\r\n }\r\n\r\n ngAfterContentChecked() {\r\n // auto-correct activeId that might have been set incorrectly as input\r\n const activeTab = this._getTabById(this.activeId);\r\n this.activeId = activeTab ? activeTab.id : (this.tabs.length ? this.tabs.first.id : null);\r\n }\r\n\r\n private _getTabById(id: string): NgbNavTab {\r\n const tabsWithId: NgbNavTab[] = this.tabs.filter(tab => tab.id === id);\r\n return tabsWithId.length ? tabsWithId[0] : null;\r\n }\r\n}\r\n","import {NgModule, ModuleWithProviders} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\n\r\nimport {NgbNavTabset, NgbNavTab, NgbNavTabContent, NgbNavTabTitle, NgbNavTabChangeEvent} from './navtab';\r\nimport {NgbNavTabsetConfig} from './navtab-config';\r\n\r\nexport {NgbNavTabset, NgbNavTab, NgbNavTabContent, NgbNavTabTitle, NgbNavTabChangeEvent} from './navtab';\r\nexport {NgbNavTabsetConfig} from './navtab-config';\r\n\r\nconst NGB_TABSET_DIRECTIVES = [NgbNavTabset, NgbNavTab, NgbNavTabContent, NgbNavTabTitle];\r\n\r\n@NgModule({declarations: NGB_TABSET_DIRECTIVES, exports: NGB_TABSET_DIRECTIVES, imports: [CommonModule]})\r\nexport class NgbNavTabsetModule {\r\n static forRoot(): ModuleWithProviders { return {ngModule: NgbNavTabsetModule, providers: [NgbNavTabsetConfig]}; }\r\n}\r\n","export function toInteger(value: any): number {\r\n return parseInt(`${value}`, 10);\r\n}\r\n\r\nexport function toString(value: any): string {\r\n return (value !== undefined && value !== null) ? `${value}` : '';\r\n}\r\n\r\nexport function getValueInRange(value: number, max: number, min = 0): number {\r\n return Math.max(Math.min(value, max), min);\r\n}\r\n\r\nexport function isString(value: any): value is string {\r\n return typeof value === 'string';\r\n}\r\n\r\nexport function isNumber(value: any): value is number {\r\n return !isNaN(toInteger(value));\r\n}\r\n\r\nexport function isInteger(value: any): value is number {\r\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n}\r\n\r\nexport function isDefined(value: any): boolean {\r\n return value !== undefined && value !== null;\r\n}\r\n\r\nexport function padNumber(value: number) {\r\n if (isNumber(value)) {\r\n return `0${value}`.slice(-2);\r\n } else {\r\n return '';\r\n }\r\n}\r\n\r\nexport function regExpEscape(text) {\r\n return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\r\n}\r\n","import {Injectable} from '@angular/core';\r\n\r\n/**\r\n * Configuration service for the NgbAccordion component.\r\n * You can inject this service, typically in your root component, and customize the values of its properties in\r\n * order to provide default values for all the accordions used in the application.\r\n */\r\n@Injectable()\r\nexport class NgbAccordionConfig {\r\n closeOthers = false;\r\n type: string;\r\n}\r\n","import {\r\n AfterContentChecked,\r\n Component,\r\n ContentChild,\r\n ContentChildren,\r\n Directive,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n QueryList,\r\n TemplateRef,\r\n HostBinding\r\n} from '@angular/core';\r\n\r\nimport { isString } from '../utils/util';\r\n\r\nimport { NgbAccordionConfig } from './accordion-config';\r\n\r\nlet nextId = 0;\r\n\r\n/**\r\n * This directive should be used to wrap accordion panel titles that need to contain HTML markup or other directives.\r\n */\r\n@Directive({ selector: 'ng-template[ngbPanelTitle]' })\r\nexport class NgbPanelTitle {\r\n constructor(public templateRef: TemplateRef<any>) { }\r\n}\r\n\r\n/**\r\n * This directive must be used to wrap accordion panel content.\r\n */\r\n@Directive({ selector: 'ng-template[ngbPanelContent]' })\r\nexport class NgbPanelContent {\r\n constructor(public templateRef: TemplateRef<any>) { }\r\n}\r\n\r\n/**\r\n * The NgbPanel directive represents an individual panel with the title and collapsible\r\n * content\r\n */\r\n@Directive({ selector: 'ngb-panel' })\r\nexport class NgbPanel {\r\n /**\r\n * A flag determining whether the panel is disabled or not.\r\n * When disabled, the panel cannot be toggled.\r\n */\r\n @Input() disabled = false;\r\n\r\n /**\r\n * An optional id for the panel. The id should be unique.\r\n * If not provided, it will be auto-generated.\r\n */\r\n @Input() id = `ngb-panel-${nextId++}`;\r\n\r\n /**\r\n * A flag telling if the panel is currently open\r\n */\r\n isOpen = false;\r\n\r\n /**\r\n * The title for the panel.\r\n */\r\n @Input() title: string;\r\n\r\n /**\r\n * Accordion's types of panels to be applied per panel basis.\r\n * Bootstrap 4 recognizes the following types: \"success\", \"info\", \"warning\" and \"danger\".\r\n */\r\n @Input() type: string;\r\n\r\n @ContentChild(NgbPanelContent) contentTpl: NgbPanelContent;\r\n @ContentChild(NgbPanelTitle) titleTpl: NgbPanelTitle;\r\n}\r\n\r\n/**\r\n * The payload of the change event fired right before toggling an accordion panel\r\n */\r\nexport interface NgbPanelChangeEvent {\r\n /**\r\n * Id of the accordion panel that is toggled\r\n */\r\n panelId: string;\r\n\r\n /**\r\n * Whether the panel will be opened (true) or closed (false)\r\n */\r\n nextState: boolean;\r\n\r\n /**\r\n * Function that will prevent panel toggling if called\r\n */\r\n preventDefault: () => void;\r\n}\r\n\r\n/**\r\n * The NgbAccordion directive is a collection of panels.\r\n * It can assure that only one panel can be opened at a time.\r\n */\r\n@Component({\r\n selector: 'ngb-accordion',\r\n exportAs: 'ngbAccordion',\r\n // host: { 'role': 'tablist', '[attr.aria-multiselectable]': '!closeOtherPanels' },\r\n template: `\r\n <ng-template ngFor let-panel [ngForOf]=\"panels\">\r\n <div class=\"card\">\r\n <div role=\"tab\" id=\"{{panel.id}}-header\"\r\n [class]=\"'card-header ' + (panel.type ? 'card-'+panel.type: type ? 'card-'+type : '')\" [class.active]=\"panel.isOpen\">\r\n <a href (click)=\"toggle(panel.id)\" [class.text-muted]=\"panel.disabled\" [attr.tabindex]=\"(panel.disabled ? '-1' : null)\"\r\n [attr.aria-expanded]=\"panel.isOpen\" [attr.aria-controls]=\"(panel.isOpen ? panel.id : null)\"\r\n [attr.aria-disabled]=\"panel.disabled\">\r\n {{panel.title}}<ng-template [ngTemplateOutlet]=\"panel.titleTpl?.templateRef\"></ng-template>\r\n </a>\r\n </div>\r\n <div id=\"{{panel.id}}\" role=\"tabpanel\" [attr.aria-labelledby]=\"panel.id + '-header'\"\r\n class=\"card-body collapse {{panel.isOpen ? 'show' : null}}\" *ngIf=\"!destroyOnHide || panel.isOpen\">\r\n <ng-template [ngTemplateOutlet]=\"panel.contentTpl.templateRef\"></ng-template>\r\n </div>\r\n </div>\r\n </ng-template>\r\n `\r\n})\r\nexport class NgbAccordion implements AfterContentChecked {\r\n\r\n // @HostBinding('role') get tablist() { return 'tablist'; }\r\n\r\n // @HostBinding('attr.aria-multiselectable') get multiselectable() { return !this.closeOtherPanels; }\r\n\r\n @ContentChildren(NgbPanel) panels: QueryList<NgbPanel>;\r\n\r\n /**\r\n * An array or comma separated strings of panel identifiers that should be opened\r\n */\r\n @Input() activeIds: string | string[] = [];\r\n\r\n /**\r\n * Whether the other panels should be closed when a panel is opened\r\n */\r\n // tslint:disable-next-line:no-input-rename\r\n @Input('closeOthers') closeOtherPanels: boolean;\r\n\r\n /**\r\n * Whether the closed panels should be hidden without destroying them\r\n */\r\n @Input() destroyOnHide = true;\r\n\r\n /**\r\n * Accordion's types of panels to be applied globally.\r\n * Bootstrap 4 recognizes the following types: \"success\", \"info\", \"warning\" and \"danger\".\r\n */\r\n @Input() type: string;\r\n\r\n /**\r\n * A panel change event fired right before the panel toggle happens. See NgbPanelChangeEvent for payload details\r\n */\r\n @Output() panelChange = new EventEmitter<NgbPanelChangeEvent>();\r\n\r\n constructor(config: NgbAccordionConfig) {\r\n this.type = config.type;\r\n this.closeOtherPanels = config.closeOthers;\r\n }\r\n\r\n /**\r\n * Programmatically toggle a panel with a given id.\r\n */\r\n toggle(panelId: string) {\r\n const panel = this.panels.find(p => p.id === panelId);\r\n\r\n if (panel && !panel.disabled) {\r\n let defaultPrevented = false;\r\n\r\n this.panelChange.emit(\r\n { panelId: panelId, nextState: !panel.isOpen, preventDefault: () => { defaultPrevented = true; } });\r\n\r\n if (!defaultPrevented) {\r\n panel.isOpen = !panel.isOpen;\r\n\r\n if (this.closeOtherPanels) {\r\n this._closeOthers(panelId);\r\n }\r\n this._updateActiveIds();\r\n }\r\n }\r\n }\r\n\r\n ngAfterContentChecked() {\r\n // active id updates\r\n if (isString(this.activeIds)) {\r\n this.activeIds = (<string>this.activeIds).split(/\\s*,\\s*/);\r\n }\r\n\r\n // update panels open states\r\n this.panels.forEach(panel => panel.isOpen = !panel.disabled && this.activeIds.indexOf(panel.id) > -1);\r\n\r\n // closeOthers updates\r\n if (this.activeIds.length > 1 && this.closeOtherPanels) {\r\n this._closeOthers(this.activeIds[0]);\r\n this._updateActiveIds();\r\n }\r\n }\r\n\r\n private _closeOthers(panelId: string) {\r\n this.panels.forEach(panel => {\r\n if (panel.id !== panelId) {\r\n panel.isOpen = false;\r\n }\r\n });\r\n }\r\n\r\n private _updateActiveIds() {\r\n this.activeIds = this.panels.filter(panel => panel.isOpen && !panel.disabled).map(panel => panel.id);\r\n }\r\n}\r\n","import {NgModule, ModuleWithProviders} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\n\r\nimport {NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent, NgbPanelChangeEvent} from './accordion';\r\nimport {NgbAccordionConfig} from './accordion-config';\r\n\r\nexport {NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent, NgbPanelChangeEvent} from './accordion';\r\nexport {NgbAccordionConfig} from './accordion-config';\r\n\r\nconst NGB_ACCORDION_DIRECTIVES = [NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent];\r\n\r\n@NgModule({declarations: NGB_ACCORDION_DIRECTIVES, exports: NGB_ACCORDION_DIRECTIVES, imports: [CommonModule]})\r\nexport class NgbAccordionModule {\r\n static forRoot(): ModuleWithProviders { return {ngModule: NgbAccordionModule, providers: [NgbAccordionConfig]}; }\r\n}\r\n","import {\r\n Directive, ElementRef, EmbeddedViewRef, EventEmitter, HostBinding, Input, OnDestroy, OnInit, Output, Renderer,\r\n ViewContainerRef,\r\n HostListener,\r\n Renderer2\r\n} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[sash]',\r\n exportAs: 'sash'\r\n})\r\nexport class SashDirective implements OnInit, OnDestroy {\r\n\r\n documentClickListener: any;\r\n\r\n documentMoveListener: any;\r\n\r\n constructor(private _elementRef: ElementRef,\r\n private renderer: Renderer2,\r\n private _viewContainerRef: ViewContainerRef) {\r\n\r\n }\r\n\r\n @Input() panelWidth: number;\r\n\r\n @Output() widthChanged = new EventEmitter<number>();\r\n\r\n @HostListener('mousedown') onMouseDown() {\r\n console.log('mousedown');\r\n this.bindDocumentClickListener();\r\n }\r\n\r\n @HostListener('mouseup') onMouseUp() {\r\n console.log('mouseup');\r\n }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n ngOnDestroy(): void {\r\n }\r\n\r\n\r\n\r\n bindDocumentClickListener() {\r\n if (!this.documentClickListener) {\r\n this.documentClickListener = this.renderer.listen('document', 'mouseup', (event) => {\r\n console.log('mouseup');\r\n console.log(event);\r\n this.unbindDocumentMoveListener();\r\n this.unbindDocumentClickListener();\r\n });\r\n\r\n if (!this.documentMoveListener) {\r\n this.bindDocumentClickListener = this.renderer.listen('document', 'mousemove', (event) => {\r\n this.panelWidth = event.clientX;\r\n const newWidth = event.clientX as number;\r\n this.widthChanged.emit(newWidth);\r\n });\r\n }\r\n }\r\n }\r\n\r\n unbindDocumentClickListener() {\r\n if (this.documentClickListener) {\r\n this.documentClickListener();\r\n this.documentClickListener = null;\r\n }\r\n }\r\n\r\n unbindDocumentMoveListener() {\r\n if (this.bindDocumentClickListener) {\r\n this.bindDocumentClickListener();\r\n this.bindDocumentClickListener = null;\r\n }\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { SashDirective } from './sash.directive';\r\n\r\n@NgModule({\r\n declarations: [\r\n SashDirective\r\n ],\r\n exports: [\r\n SashDirective\r\n ]\r\n})\r\nexport class PanelModule {\r\n public static forRoot(config?: any): ModuleWithProviders {\r\n return {\r\n ngModule: PanelModule\r\n };\r\n }\r\n}\r\n","import { HttpClientModule } from '@angular/common/http';\r\nimport { ModuleWithProviders, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';\r\nimport { BsDropdownModule } from './dropdown';\r\nimport { NgbTabsetModule, NgbTabChangeEvent } from './tabset/tabset.module';\r\nimport { NgbNavTabsetModule, NgbNavTabChangeEvent } from './navtab/navtab.module';\r\nimport { NgbAccordionModule } from './accordion/accordion.module';\r\nimport { PanelModule } from './panel/panel.module';\r\n\r\nconst MODULES = [\r\n BsDropdownModule\r\n];\r\n\r\nconst NGB_MODULES = [\r\n NgbTabsetModule,\r\n NgbNavTabsetModule,\r\n NgbAccordionModule\r\n];\r\n\r\nconst IDE_MODULES = [\r\n PanelModule\r\n];\r\n\r\n// @NgModule({\r\n// imports: [\r\n// BsDropdownModule.forRoot()\r\n// ],\r\n// exports: [BsDropdownModule],\r\n// schemas: [NO_ERRORS_SCHEMA]\r\n// })\r\n// export class MDBRootModule {\r\n// }\r\n\r\n// @NgModule({ exports: [BsDropdownModule] })\r\n// export class MDBBootstrapModule {\r\n// public static forRoot(): ModuleWithProviders {\r\n// return { ngModule: MDBRootModule };\r\n// }\r\n// }\r\n\r\n@NgModule({\r\n imports: [\r\n NgbTabsetModule.forRoot(),\r\n NgbNavTabsetModule.forRoot(),\r\n NgbAccordionModule.forRoot()\r\n ],\r\n exports: [\r\n NGB_MODULES\r\n ]\r\n})\r\nexport class NgbRootModule {\r\n}\r\n\r\n@NgModule({})\r\nexport class NgbModule {\r\n static forRoot(): ModuleWithProviders { return { ngModule: NgbRootModule }; }\r\n}\r\n\r\n@NgModule({\r\n imports: [\r\n PanelModule.forRoot()\r\n ]\r\n})\r\nexport class IDERootModule {\r\n}\r\n\r\n// @NgModule({ imports: IDE_MODULES, exports: IDE_MODULES })\r\n// export class IDEModule {\r\n// static forRoot(): ModuleWithProviders { return { ngModule: IDERootModule }; }\r\n// }","export class LinkedList <T> {\r\n\r\n public length = 0;\r\n protected head: any;\r\n protected tail: any;\r\n protected current: any;\r\n protected asArray: T[] = [];\r\n\r\n protected getNode(position: number): any {\r\n if (this.length === 0 || position < 0 || position >= this.length) {\r\n throw new Error('Position is out of the list');\r\n }\r\n\r\n let current = this.head;\r\n\r\n for (let index = 0; index < position; index++) {\r\n current = current.next;\r\n }\r\n return current;\r\n }\r\n\r\n protected createInternalArrayRepresentation(): void {\r\n const outArray: any[] = [];\r\n let current = this.head;\r\n\r\n while (current) {\r\n outArray.push(current.value);\r\n current = current.next;\r\n }\r\n this.asArray = outArray;\r\n }\r\n\r\n public get(position: number): T {\r\n if (this.length === 0 || position < 0 || position >= this.length) {\r\n return void 0;\r\n }\r\n\r\n let current = this.head;\r\n\r\n for (let index = 0; index < position; index++) {\r\n current = current.next;\r\n }\r\n return current.value;\r\n }\r\n\r\n public add(value: T, position: number = this.length): void {\r\n if (position < 0 || position > this.length) {\r\n throw new Error('Position is out of the list');\r\n }\r\n\r\n const node = {\r\n value: value as any,\r\n next: undefined as any,\r\n previous: undefined as any\r\n };\r\n\r\n if (this.length === 0) {\r\n this.head = node;\r\n this.tail = node;\r\n this.current = node;\r\n } else {\r\n if (position === 0) {\r\n // first node\r\n node.next = this.head;\r\n this.head.previous = node;\r\n this.head = node;\r\n } else if (position === this.length) {\r\n // last node\r\n this.tail.next = node;\r\n node.previous = this.tail;\r\n this.tail = node;\r\n } else {\r\n // node in middle\r\n const currentPreviousNode = this.getNode(position - 1);\r\n const currentNextNode = currentPreviousNode.next;\r\n\r\n currentPreviousNode.next = node;\r\n currentNextNode.previous = node;\r\n\r\n node.previous = currentPreviousNode;\r\n node.next = currentNextNode;\r\n }\r\n\r\n }\r\n this.length++;\r\n this.createInternalArrayRepresentation();\r\n }\r\n\r\n public remove(position: number = 0): void {\r\n if (this.length === 0 || position < 0 || position >= this.length) {\r\n throw new Error('Position is out of the list');\r\n }\r\n\r\n if (position === 0) {\r\n // first node\r\n this.head = this.head.next;\r\n\r\n if (this.head) {\r\n // there is no second node\r\n this.head.previous = undefined;\r\n } else {\r\n // there is no second node\r\n this.tail = undefined;\r\n }\r\n } else if (position === this.length - 1) {\r\n // last node\r\n this.tail = this.tail.previous;\r\n this.tail.next = undefined;\r\n } else {\r\n // middle node\r\n const removedNode = this.getNode(position);\r\n removedNode.next.previous = removedNode.previous;\r\n removedNode.previous.next = removedNode.next;\r\n }\r\n\r\n this.length--;\r\n this.createInternalArrayRepresentation();\r\n }\r\n\r\n public set(position: number, value: T): void {\r\n if (this.length === 0 || position < 0 || position >= this.length) {\r\n throw new Error('Position is out of the list');\r\n }\r\n\r\n const node = this.getNode(position);\r\n node.value = value;\r\n this.createInternalArrayRepresentation();\r\n }\r\n\r\n public toArray(): T[] {\r\n return this.asArray;\r\n }\r\n\r\n public findAll(fn: any): any[] {\r\n let current = this.head;\r\n const result: any[] = [];\r\n for (let index = 0; index < this.length; index++) {\r\n if (fn(current.value, index)) {\r\n result.push({index, value: current.value});\r\n }\r\n current = current.next;\r\n }\r\n return result;\r\n }\r\n // Array methods overriding start\r\n public push(...args: T[]): number {\r\n args.forEach((arg: any) => {\r\n this.add(arg);\r\n });\r\n return this.length;\r\n }\r\n\r\n public pop(): T {\r\n if (this.length === 0) {\r\n return undefined;\r\n }\r\n const last = this.tail;\r\n this.remove(this.length - 1);\r\n return last.value;\r\n }\r\n\r\n public unshift(...args: T[]): number {\r\n args.reverse();\r\n args.forEach((arg: any) => {\r\n this.add(arg, 0);\r\n });\r\n return this.length;\r\n }\r\n\r\n public shift(): T {\r\n if (this.length === 0) {\r\n return undefined;\r\n }\r\n const lastItem = this.head.value;\r\n this.remove();\r\n return lastItem;\r\n }\r\n\r\n public forEach(fn: any): void {\r\n let current = this.head;\r\n for (let index = 0; index < this.length; index++) {\r\n fn(current.value, index);\r\n current = current.next;\r\n }\r\n }\r\n\r\n public indexOf(value: T): number {\r\n let current = this.head;\r\n let position = 0;\r\n\r\n for (let index = 0; index < this.length; index++) {\r\n if (current.value === value) {\r\n\r\n position = index;\r\n break;\r\n }\r\n current = current.next;\r\n }\r\n return position;\r\n }\r\n\r\n public some(fn: any): boolean {\r\n let current = this.head;\r\n let result = false;\r\n while (current && !result) {\r\n if (fn(current.value)) {\r\n result = true;\r\n break;\r\n }\r\n current = current.next;\r\n }\r\n return result;\r\n }\r\n\r\n public every(fn: any): boolean {\r\n let current = this.head;\r\n let result = true;\r\n while (current && result) {\r\n if (!fn(current.value)) {\r\n result = false;\r\n }\r\n current = current.next;\r\n }\r\n return result;\r\n }\r\n\r\n public toString(): string {\r\n return '[Linked List]';\r\n }\r\n\r\n public find(fn: any): T {\r\n let current = this.head;\r\n let result: T;\r\n for (let index = 0; index < this.length; index++) {\r\n if (fn(current.value, index)) {\r\n result = current.value;\r\n break;\r\n }\r\n current = current.next;\r\n }\r\n return result;\r\n }\r\n\r\n public findIndex(fn: any): number {\r\n let current = this.head;\r\n let result: number;\r\n for (let index = 0; index < this.length; index++) {\r\n if (fn(current.value, index)) {\r\n result = index;\r\n break;\r\n }\r\n current = current.next;\r\n }\r\n return result;\r\n }\r\n\r\n // Array methods overriding END\r\n}\r\n","import { IEmitable } from './types';\r\nimport {Type} from '@angular/core/src/type';\r\n\r\nexport class EventBusProxy {\r\n\r\n constructor(private eventBus: IEmitable, private hostType: Type<any>, private eventTokenValueProvider: () => any) {\r\n }\r\n\r\n post(eventName: string, data: any) {\r\n this.eventBus.post(this.hostType, this.eventTokenValueProvider(), eventName, data);\r\n }\r\n}\r\n\r\n","import { Subject } from 'rxjs/Subject';\r\nimport {IDisposable} from './types';\r\nimport {Subscription} from 'rxjs/Subscription';\r\n\r\nexport class EventPipe implements IDisposable {\r\n\r\n private eventSubject: Subject<any>;\r\n private subscriptionMap: Map<object, Subscription>;\r\n private onceSubscriptionMap: Map<object, Subscription>;\r\n\r\n constructor(private name: string,\r\n private tokenValue: string,\r\n private emitter: string,\r\n private parentEventPipeList: Array<EventPipe>) {\r\n this.eventSubject = new Subject<any>();\r\n this.subscriptionMap = new Map<object, Subscription>();\r\n this.onceSubscriptionMap = new Map<object, Subscription>();\r\n if (this.parentEventPipeList) {\r\n this.parentEventPipeList.push(this);\r\n }\r\n }\r\n\r\n post(data: any) {\r\n this.eventSubject.next(data);\r\n }\r\n\r\n subscribe(eventHandler: (value: any) => void, caller: object): IDisposable {\r\n const subscription = this.eventSubject.subscribe((value) => eventHandler.call(caller, value));\r\n this.subscriptionMap.set(\r\n caller,\r\n subscription\r\n );\r\n return this;\r\n }\r\n\r\n subscribeOnce(eventHandler: (value: any) => void, caller: object): IDisposable {\r\n const subscription = this.eventSubject.subscribe((value) => eventHandler.call(caller, value));\r\n this.onceSubscriptionMap.set(\r\n caller,\r\n subscription\r\n );\r\n return this;\r\n }\r\n\r\n unSubscribe(subscriber: object) {\r\n let subscription = this.subscriptionMap.get(subscriber);\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n subscription = null;\r\n this.subscriptionMap.delete(subscriber);\r\n } else {\r\n subscription = this.onceSubscriptionMap.get(subscriber);\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n subscription = null;\r\n this.onceSubscriptionMap.delete(subscriber);\r\n }\r\n }\r\n }\r\n\r\n // 注é使ç¨onceæ¹æ³æ³¨åç订é
ã\r\n unSubscribeForOnce() {\r\n for (const subscriber of Array.from(this.onceSubscriptionMap.keys())) {\r\n this.unSubscribe(subscriber);\r\n }\r\n }\r\n\r\n matchEmitterToken(emitter: string, tokenValue: string): boolean {\r\n if (this.emitter && emitter && this.emitter !== emitter) {\r\n return false;\r\n }\r\n if (this.tokenValue && tokenValue && this.tokenValue !== tokenValue) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n examByTargetToken(target: string, tokenValue: string): boolean {\r\n if (this.emitter !== target) {\r\n return false;\r\n }\r\n if (this.tokenValue !== tokenValue) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n dispose(subscriber: object): void {\r\n this.unSubscribe(subscriber);\r\n if (this.subscriptionMap.size === 0 && this.parentEventPipeList) {\r\n const location = this.parentEventPipeList.findIndex(item => item === this);\r\n if (location !== -1) {\r\n this.parentEventPipeList.splice(location, 1);\r\n }\r\n }\r\n }\r\n}\r\n","import {Injectable, Type} from '@angular/core';\r\nimport {EventBusProxy} from './event-bus-proxy';\r\nimport {IDisposable, IEmitable} from './types';\r\nimport {EventPipe} from './event-pipe';\r\n\r\n@Injectable()\r\nexport class EventBus implements IEmitable {\r\n private proxyMap: Map<string, EventBusProxy>;\r\n private eventMap: Map<string, Array<EventPipe>>;\r\n\r\n constructor() {\r\n this.proxyMap = new Map<string, EventBusProxy>();\r\n this.eventMap = new Map<string, Array<EventPipe>>();\r\n }\r\n\r\n getProxy(ownerType: Type<any>, eventTokenValueProvider: () => any): EventBusProxy {\r\n const ownerName = ownerType.constructor.name;\r\n if (!this.proxyMap.has(ownerName)) {\r\n this.proxyMap.set(ownerName, new EventBusProxy(this, ownerType, eventTokenValueProvider));\r\n }\r\n return this.proxyMap.get(ownerName);\r\n }\r\n\r\n /**\r\n * åéäºä»¶ï¼éç¥è®¢é
è
æ¥æ¶æ¶æ¯ã\r\n */\r\n post(emitterType: Type<any> | string, tokenValue: string, eventName: string, eventArgs: any): void {\r\n const eventPipeList = this.eventMap.get(eventName);\r\n if (!eventPipeList) {\r\n return;\r\n }\r\n\r\n if (!emitterType) {\r\n console.error('postæ¹æ³çåæ°emitterTypeä¸è½ä¸ºç©ºã');\r\n return;\r\n }\r\n let emitter: string;\r\n if (emitterType instanceof Type) {\r\n emitter = emitterType.name;\r\n } else {\r\n emitter = emitterType;\r\n }\r\n\r\n for (const eventPipe of eventPipeList) {\r\n if (eventPipe.matchEmitterToken(emitter, tokenValue)) {\r\n eventPipe.post(eventArgs);\r\n eventPipe.unSubscribeForOnce();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * 订é
äºä»¶\r\n */\r\n on(target: string, tokenValue: string, eventName: string, caller: object, handler: (value: any) => void): IDisposable {\r\n return this.getEventPipe(eventName, target, tokenValue).subscribe(handler, caller);\r\n }\r\n\r\n /**\r\n * 订é
ä¸æ¬¡ãæ¥æ¶å°ä¸æ¬¡æ¶æ¯ä¹åèªå¨åæ¶è®¢é
\r\n */\r\n once(target: string, tokenValue: string, eventName: string, caller: object, handler: (value: any) => void): IDisposable {\r\n return this.getEventPipe(eventName, target, tokenValue).subscribeOnce(handler, caller);\r\n }\r\n\r\n /**\r\n * åéä¸ä¸ªè¯·æ±äºä»¶ï¼è·åçå¬è
çååºå¹¶å¤ç\r\n */\r\n requestFor(target: string, tokenValue: string, requestName: string, requestValue: any, success: (any) => any, fail?: (string) => any) {\r\n const eventPipe = this.findExistEventPipe(requestName, 'RequestSubject', tokenValue);\r\n if (eventPipe) {\r\n this.once(target, tokenValue, requestName, this, (response) => {\r\n if (response.status === 'success') {\r\n success(response.data);\r\n } else {\r\n if (fail) {\r\n fail('No target responser listening');\r\n }\r\n }\r\n });\r\n eventPipe.post({target, token: tokenValue, data: requestValue});\r\n } else {\r\n if (fail) {\r\n fail('No target responser listening.');\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * çå¬ä¸ä¸ªè¯·æ±äºä»¶ï¼ç»åºååº\r\n */\r\n responseOn(responseSubject: string, requestName: string, callback: (any) => any) {\r\n this.on('RequestSubject', null, requestName, this, (requestObj) => {\r\n const response = {status: 'fail', data: null};\r\n if (responseSubject === requestObj.target) {\r\n response.data = callback(requestObj.data);\r\n response.status = 'success';\r\n }\r\n this.post(requestObj.target, requestObj.token, requestName, response);\r\n });\r\n }\r\n\r\n private getEventPipe(eventName: string, target: string, tokenValue: string) {\r\n let eventPipeList = this.eventMap.get(eventName);\r\n if (!eventPipeList) {\r\n eventPipeList = new Array<EventPipe>();\r\n this.eventMap.set(eventName, eventPipeList);\r\n }\r\n let eventPipe = eventPipeList.find(item => item.examByTargetToken(target, tokenValue));\r\n if (!eventPipe) {\r\n eventPipe = new EventPipe(eventName, tokenValue, target, eventPipeList);\r\n }\r\n return eventPipe;\r\n }\r\n\r\n private findExistEventPipe(eventName: string, target: string, tokenValue: string): EventPipe {\r\n const eventPipeList = this.eventMap.get(eventName);\r\n if (!eventPipeList) {\r\n return null;\r\n }\r\n // return eventPipeList.find(item => item.examByTargetToken(target, tokenValue));\r\n for (const eventPipe of eventPipeList) {\r\n if (eventPipe.matchEmitterToken(target, tokenValue)) {\r\n return eventPipe;\r\n }\r\n }\r\n return null;\r\n }\r\n}\r\n\r\nclass RequestSubject {}\r\nclass DataClass {}\r\n","let nextInstanceId = 1;\r\n\r\nexport class Model {\r\n alive = true;\r\n get isAlive() { return this.alive; }\r\n get isDestroyed() { return !this.alive; }\r\n\r\n constructor(params: any) {\r\n\r\n }\r\n\r\n assignId(id) {\r\n\r\n }\r\n\r\n destroy() {\r\n\r\n }\r\n\r\n resetNextInstanceId() {\r\n nextInstanceId = 1;\r\n }\r\n}\r\n","import { Model } from './model';\r\n\r\nexport class PaneAxis extends Model {\r\n flexScale: any;\r\n parent: any;\r\n container: any;\r\n orientation: any;\r\n children: any[];\r\n panes: any[];\r\n items: any[];\r\n deserialize() {\r\n\r\n }\r\n\r\n\r\n constructor(params?: any, viewRegistry?: any) {\r\n super({});\r\n }\r\n\r\n getElement() { }\r\n\r\n addChild() { }\r\n\r\n removeChidl() { }\r\n\r\n insertChildBefore() { }\r\n\r\n subscribeToChild() { }\r\n\r\n unsubscribeFromChild() { }\r\n}\r\n","// Essential: A handle to a resource that can be disposed. For example,\r\n// {Emitter::on} returns disposables representing subscriptions.\r\n\r\nexport class Disposable {\r\n\r\n private disposed = false;\r\n\r\n // Public: Ensure that `object` correctly implements the `Disposable`\r\n // contract.\r\n //\r\n // * `object` An {Object} you want to perform the check against.\r\n //\r\n // Returns a {Boolean} indicating whether `object` is a valid `Disposable`.\r\n static isDisposable(object): boolean {\r\n if (object && object.dispose && typeof(object.dispose) === 'function') {\r\n return true;\r\n }\r\n return false;\r\n }\r\n //////\r\n /// Section: Construction and Destruction\r\n //////\r\n\r\n // Public: Construct a Disposable\r\n //\r\n // * `disposalAction` A {Function} to call when {::dispose} is called for the\r\n // first time.\r\n constructor(private disposalAction: () => any) { }\r\n\r\n // Public: Perform the disposal action, indicating that the resource associated\r\n // with this disposable is no longer needed.\r\n //\r\n // You can call this method more than once, but the disposal action will only\r\n // be performed the first time.\r\n dispose() {\r\n if (!this.disposed) {\r\n this.disposed = true;\r\n if (this.disposalAction) {\r\n this.disposalAction();\r\n }\r\n this.disposalAction = null;\r\n }\r\n }\r\n}\r\n","import { Disposable } from './disposable';\r\n\r\n// Essential: An object that aggregates multiple {Disposable} instances together\r\n// into a single disposable, so they can all be disposed as a group.\r\n//\r\n// These are very useful when subscribing to multiple events.\r\n//\r\n// ## Examples\r\n//\r\n// ```coffee\r\n// {CompositeDisposable} = require 'atom'\r\n//\r\n// class Something\r\n// constructor: ->\r\n// @disposables = new CompositeDisposable\r\n// editor = atom.workspace.getActiveTextEditor()\r\n// @disposables.add editor.onDidChange ->\r\n// @disposables.add editor.onDidChangePath ->\r\n//\r\n// destroy: ->\r\n// @disposables.dispose()\r\n// ```\r\nexport class CompositeDisposable {\r\n private disposed = false;\r\n private disposables: Set<any>;\r\n\r\n //////\r\n /// Section: Construction and Destruction\r\n //////\r\n\r\n // Public: Construct an instance, optionally with one or more disposables\r\n constructor(...disposables) {\r\n this.disposables = new Set();\r\n this.add(...disposables);\r\n }\r\n // Public: Dispose all disposables added to this composite disposable.\r\n //\r\n // If this object has already been disposed, this method has no effect.\r\n dispose() {\r\n if (!this.disposed) {\r\n this.disposed = true;\r\n this.disposables.forEach((disposable) => disposable.dispose());\r\n this.disposables = null;\r\n }\r\n }\r\n //////\r\n /// Section: Managing Disposables\r\n //////\r\n\r\n // Public: Add disposables to be disposed when the composite is disposed.\r\n //\r\n // If this object has already been disposed, this method has no effect.\r\n //\r\n // * `...disposables` {Disposable} instances or any objects with `.dispose()`\r\n // methods.\r\n add(...disposables) {\r\n if (!this.disposed) {\r\n for (const disposable of disposables) {\r\n if (this.assertDisposable(disposable)) {\r\n this.disposables.add(disposable);\r\n }\r\n }\r\n }\r\n }\r\n // Public: Remove a previously added disposable.\r\n //\r\n // * `disposable` {Disposable} instance or any object with a `.dispose()`\r\n // method.\r\n remove(disposable): void {\r\n if (!this.disposed) {\r\n this.disposables.delete(disposable);\r\n }\r\n }\r\n // Public: Alias to {CompositeDisposable::remove}\r\n delete(disposable): void {\r\n this.remove(disposable);\r\n }\r\n // Public: Clear all disposables. They will not be disposed by the next call\r\n // to dispose.\r\n clear() {\r\n if (!this.disposed) {\r\n this.disposables.clear();\r\n }\r\n }\r\n\r\n assertDisposable(disposable): boolean {\r\n if (!Disposable.isDisposable(disposable)) {\r\n throw new TypeError('Arguments to CompositeDisposable.add must have a .dispose() method');\r\n }\r\n return true;\r\n }\r\n}\r\n","import { Disposable } from './disposable';\r\nimport { CompositeDisposable } from './composite-disposable';\r\n\r\n// Essential: Utility class to be used when implementing event-based APIs that\r\n// allows for handlers registered via `::on` to be invoked with calls to\r\n// `::emit`. Instances of this class are intended to be used internally by\r\n// classes that expose an event-based API.\r\n//\r\n// For example:\r\n//\r\n// ```coffee\r\n// class User\r\n// constructor: ->\r\n// @emitter = new Emitter\r\n//\r\n// onDidChangeName: (callback) ->\r\n// @emitter.on 'did-change-name', callback\r\n//\r\n// setName: (name) ->\r\n// if name isnt @name\r\n// @name = name\r\n// @emitter.emit 'did-change-name', name\r\n// @name\r\n// ```\r\nexport class Emitter {\r\n static exceptionHandlers = [];\r\n static dispatch = Emitter.simpleDispatch;\r\n\r\n private disposed = false;\r\n private subscriptions: CompositeDisposable;\r\n private handlersByEventName: any;\r\n\r\n\r\n static onEventHandlerException(exceptionHandler) {\r\n this.dispatch = this.simpleDispatch;\r\n if (this.exceptionHandlers.length === 0) {\r\n this.dispatch = this.exceptionHandlingDispatch;\r\n }\r\n\r\n this.exceptionHandlers.push(exceptionHandler);\r\n\r\n return new Disposable(() => {\r\n this.exceptionHandlers.splice(this.exceptionHandlers.indexOf(exceptionHandler), 1);\r\n if (this.exceptionHandlers.length === 0) {\r\n return this.dispatch = this.simpleDispatch;\r\n }\r\n });\r\n }\r\n\r\n static simpleDispatch(handler, value) {\r\n return handler(value);\r\n }\r\n\r\n static exceptionHandlingDispatch(handler, value) {\r\n try {\r\n return handler(value);\r\n } catch (exception) {\r\n return this.exceptionHandlers.map((exceptionHandler) => exceptionHandler(exception));\r\n }\r\n }\r\n\r\n //////\r\n /// Section: Construction and Destruction\r\n //////\r\n\r\n // Public: Construct an emitter.\r\n //\r\n // ```coffee\r\n // @emitter = new Emitter()\r\n // ```\r\n constructor() {\r\n this.clear();\r\n }\r\n\r\n // Public: Clear out any existing subscribers.\r\n clear() {\r\n if (this.subscriptions) {\r\n this.subscriptions.dispose();\r\n }\r\n this.subscriptions = new CompositeDisposable();\r\n return this.handlersByEventName = {};\r\n }\r\n\r\n // Public: Unsubscribe all handlers.\r\n dispose() {\r\n this.subscriptions.dispose();\r\n this.handlersByEventName = null;\r\n this.disposed = true;\r\n }\r\n\r\n //////\r\n /// Section: Event Subscription\r\n //////\r\n\r\n // Public: Register the given handler function to be invoked whenever events by\r\n // the given name are emitted via {::emit}.\r\n //\r\n // * `eventName` {String} naming the event that you want to invoke the handler\r\n // when emitted.\r\n // * `handler` {Function} to invoke when {::emit} is called with the given\r\n // event name.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n on(eventName, handler, unshift = false): Disposable {\r\n if (this.disposed) {\r\n throw new Error('Emitter has been disposed');\r\n }\r\n\r\n if (typeof handler !== 'function') {\r\n throw new Error('Handler must be a function');\r\n }\r\n const currentHandlers = this.handlersByEventName[eventName];\r\n if (currentHandlers) {\r\n if (unshift) {\r\n this.handlersByEventName[eventName] = [handler].concat(currentHandlers);\r\n } else {\r\n this.handlersByEventName[eventName] = currentHandlers.concat(handler);\r\n }\r\n } else {\r\n this.handlersByEventName[eventName] = [handler];\r\n }\r\n // When the emitter is disposed, we want to dispose of all subscriptions.\r\n // However, we also need to stop tracking disposables when they're disposed\r\n // from outside, otherwise this class will hold references to all the\r\n // disposables it created (instead of just the active ones).\r\n const cleanup = new Disposable(() => {\r\n this.subscriptions.remove(cleanup);\r\n return this.off(eventName, handler);\r\n });\r\n this.subscriptions.add(cleanup);\r\n return cleanup;\r\n }\r\n\r\n // Public: Register the given handler function to be invoked the next time an\r\n // events with the given name is emitted via {::emit}.\r\n //\r\n // * `eventName` {String} naming the event that you want to invoke the handler\r\n // when emitted.\r\n // * `handler` {Function} to invoke when {::emit} is called with the given\r\n // event name.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n once(eventName, handler, unshift = false): Disposable {\r\n let disposable: Disposable;\r\n const wrapped = (value) => {\r\n disposable.dispose();\r\n handler(value);\r\n };\r\n disposable = this.on(eventName, wrapped, unshift);\r\n return disposable;\r\n }\r\n\r\n // Public: Register the given handler function to be invoked *before* all\r\n // other handlers existing at the time of subscription whenever events by the\r\n // given name are emitted via {::emit}.\r\n //\r\n // Use this method when you need to be the first to handle a given event. This\r\n // could be required when a data structure in a parent object needs to be\r\n // updated before third-party event handlers registered on a child object via a\r\n // public API are invoked. Your handler could itself be preempted via\r\n // subsequent calls to this method, but this can be controlled by keeping\r\n // methods based on `::preempt` private.\r\n //\r\n // * `eventName` {String} naming the event that you want to invoke the handler\r\n // when emitted.\r\n // * `handler` {Function} to invoke when {::emit} is called with the given\r\n // event name.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n preempt(eventName, handler) {\r\n this.on(eventName, handler, true);\r\n }\r\n\r\n // Private: Used by the disposable.\r\n off(eventName, handlerToRemove) {\r\n if (this.disposed) {\r\n return;\r\n }\r\n\r\n const oldHandlers = this.handlersByEventName[eventName];\r\n\r\n if (oldHandlers) {\r\n const newHandlers = [];\r\n for (const handler of oldHandlers) {\r\n if (handler !== handlerToRemove) {\r\n newHandlers.push(handler);\r\n }\r\n }\r\n if (newHandlers.length > 0) {\r\n this.handlersByEventName[eventName] = newHandlers;\r\n } else {\r\n delete this.handlersByEventName[eventName];\r\n }\r\n }\r\n }\r\n\r\n //////\r\n /// Section: Event Emission\r\n //////\r\n\r\n // Public: Invoke handlers registered via {::on} for the given event name.\r\n //\r\n // * `eventName` The name of the event to emit. Handlers registered with {::on}\r\n // for the same name will be invoked.\r\n // * `value` Callbacks will be invoked with this value as an argument.\r\n emit(eventName, value) {\r\n if (this.handlersByEventName && this.handlersByEventName[eventName]) {\r\n const handlers = this.handlersByEventName[eventName];\r\n for (const handler of handlers) {\r\n Emitter.dispatch(handler, value);\r\n }\r\n }\r\n }\r\n\r\n emitAsync(eventName, value): Promise<any> {\r\n if (this.handlersByEventName && this.handlersByEventName[eventName]) {\r\n const results = [];\r\n for (const handler of this.handlersByEventName[eventName]) {\r\n results.push(Emitter.dispatch(handler, value));\r\n }\r\n return Promise.all(results).then(function() {});\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n getEventNames(): string[] {\r\n return Object.keys(this.handlersByEventName);\r\n }\r\n\r\n listenerCountForEventName(eventName) {\r\n return this.handlersByEventName && this.handlersByEventName[eventName] ? this.handlersByEventName[eventName].length : 0;\r\n }\r\n\r\n getTotalListenerCount() {\r\n let result = 0;\r\n for (const eventName in this.handlersByEventName) {\r\n if (this.handlersByEventName.hasOwnProperty(eventName)) {\r\n result += this.handlersByEventName[eventName].length;\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\n","import { PaneAxis } from './pane-axis';\r\nimport { Emitter, Disposable } from './event-kit';\r\n\r\n// const Grim = require('grim')\r\n// const {CompositeDisposable, Emitter} = require('event-kit')\r\n// const PaneAxis = require('./pane-axis')\r\n// const TextEditor = require('./text-editor')\r\n// const PaneElement = require('./pane-element')\r\n\r\nlet nextInstanceId = 1;\r\n\r\nclass SaveCancelledError extends Error { }\r\n\r\n// Extended: A container for presenting content in the center of the workspace.\r\n// Panes can contain multiple items, one of which is *active* at a given time.\r\n// The view corresponding to the active item is displayed in the interface. In\r\n// the default configuration, tabs are also displayed for each item.\r\n//\r\n// Each pane may also contain one *pending* item. When a pending item is added\r\n// to a pane, it will replace the currently pending item, if any, instead of\r\n// simply being added. In the default configuration, the text in the tab for\r\n// pending items is shown in italics.\r\nexport class Pane {\r\n\r\n id: any;\r\n activeItem: any;\r\n focused: any;\r\n applicationDelegate: any;\r\n notificationManager: any;\r\n config: any;\r\n deserializerManager: any;\r\n viewRegistry: any;\r\n private emitter: Emitter;\r\n alive = true;\r\n subscriptionsPerItem = new WeakMap();\r\n items = [];\r\n itemStack = [];\r\n container = null;\r\n flexScale: any;\r\n parent: any;\r\n itemStackIndex: number;\r\n pendingItem: any;\r\n\r\n static deserialize(state, { deserializers, applicationDelegate, config, notifications, views }) {\r\n const { activeItemIndex } = state;\r\n const activeItemURI = state.activeItemURI || state.activeItemUri;\r\n\r\n const items = [];\r\n for (const itemState of state.items) {\r\n const item = deserializers.deserialize(itemState);\r\n if (item) { items.push(item); }\r\n }\r\n state.items = items;\r\n\r\n state.activeItem = items[activeItemIndex];\r\n if (!state.activeItem && activeItemURI) {\r\n state.activeItem = state.items.find((item) =>\r\n typeof item.getURI === 'function' && item.getURI() === activeItemURI\r\n );\r\n }\r\n\r\n return new Pane(Object.assign(state, {\r\n deserializerManager: deserializers,\r\n notificationManager: notifications,\r\n viewRegistry: views,\r\n config,\r\n applicationDelegate\r\n }));\r\n }\r\n\r\n\r\n\r\n inspect() {\r\n return `Pane ${this.id}`;\r\n }\r\n constructor(params: any) {\r\n this.setPendingItem = this.setPendingItem.bind(this);\r\n this.getPendingItem = this.getPendingItem.bind(this);\r\n this.clearPendingItem = this.clearPendingItem.bind(this);\r\n this.onItemDidTerminatePendingState = this.onItemDidTerminatePendingState.bind(this);\r\n this.saveItem = this.saveItem.bind(this);\r\n this.saveItemAs = this.saveItemAs.bind(this);\r\n\r\n this.id = params.id;\r\n if (this.id != null) {\r\n nextInstanceId = Math.max(nextInstanceId, this.id + 1);\r\n } else {\r\n this.id = nextInstanceId++;\r\n }\r\n\r\n this.activeItem = params.activeItem;\r\n this.focused = params.focused != null ? params.focused : false;\r\n this.applicationDelegate = params.applicationDelegate;\r\n this.notificationManager = params.notificationManager;\r\n this.config = params.config;\r\n this.deserializerManager = params.deserializerManager;\r\n this.viewRegistry = params.viewRegistry;\r\n\r\n this.emitter = new Emitter();\r\n this.alive = true;\r\n this.subscriptionsPerItem = new WeakMap();\r\n this.items = [];\r\n this.itemStack = [];\r\n this.container = null;\r\n\r\n this.addItems((params.items || []).filter(item => item));\r\n if (!this.getActiveItem()) {\r\n this.setActiveItem(this.items[0]);\r\n }\r\n this.addItemsToStack(params.itemStackIndices || []);\r\n this.setFlexScale(params.flexScale || 1);\r\n }\r\n\r\n getElement() {\r\n }\r\n\r\n serialize() {\r\n const itemsToBeSerialized = this.items.filter(item => item && typeof item.serialize === 'function');\r\n\r\n const itemStackIndices = [];\r\n for (const item of this.itemStack) {\r\n if (typeof item.serialize === 'function') {\r\n itemStackIndices.push(itemsToBeSerialized.indexOf(item));\r\n }\r\n }\r\n\r\n const activeItemIndex = itemsToBeSerialized.indexOf(this.activeItem);\r\n\r\n return {\r\n deserializer: 'Pane',\r\n id: this.id,\r\n items: itemsToBeSerialized.map(item => item.serialize()),\r\n itemStackIndices,\r\n activeItemIndex,\r\n focused: this.focused,\r\n flexScale: this.flexScale\r\n };\r\n }\r\n\r\n getParent() { return this.parent; }\r\n\r\n setParent(parent) {\r\n this.parent = parent;\r\n }\r\n\r\n getContainer() { return this.container; }\r\n\r\n setContainer(container) {\r\n if (container && container !== this.container) {\r\n this.container = container;\r\n container.didAddPane({ pane: this });\r\n }\r\n }\r\n\r\n // Private: Determine whether the given item is allowed to exist in this pane.\r\n //\r\n // * `item` the Item\r\n //\r\n // Returns a {Boolean}.\r\n isItemAllowed(item) {\r\n if (typeof item.getAllowedLocations !== 'function') {\r\n return true;\r\n } else {\r\n return item.getAllowedLocations().includes(this.getContainer().getLocation());\r\n }\r\n }\r\n\r\n setFlexScale(flexScale) {\r\n this.flexScale = flexScale;\r\n return this.flexScale;\r\n }\r\n\r\n getFlexScale() { return this.flexScale; }\r\n\r\n increaseSize() { this.setFlexScale(this.getFlexScale() * 1.1); }\r\n\r\n decreaseSize() { this.setFlexScale(this.getFlexScale() / 1.1); }\r\n\r\n /*\r\n Section: Event Subscription\r\n */\r\n\r\n // Public: Invoke the given callback when the pane resizes\r\n //\r\n // The callback will be invoked when pane's flexScale property changes.\r\n // Use {::getFlexScale} to get the current value.\r\n //\r\n // * `callback` {Function} to be called when the pane is resized\r\n // * `flexScale` {Number} representing the panes `flex-grow`; ability for a\r\n // flex item to grow if necessary.\r\n //\r\n // Returns a {Disposable} on which '.dispose()' can be called to unsubscribe.\r\n onDidChangeFlexScale(callback) {\r\n }\r\n\r\n // Public: Invoke the given callback with the current and future values of\r\n // {::getFlexScale}.\r\n //\r\n // * `callback` {Function} to be called with the current and future values of\r\n // the {::getFlexScale} property.\r\n // * `flexScale` {Number} representing the panes `flex-grow`; ability for a\r\n // flex item to grow if necessary.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observeFlexScale(callback) {\r\n callback(this.flexScale);\r\n return this.onDidChangeFlexScale(callback);\r\n }\r\n\r\n // Public: Invoke the given callback when the pane is activated.\r\n //\r\n // The given callback will be invoked whenever {::activate} is called on the\r\n // pane, even if it is already active at the time.\r\n //\r\n // * `callback` {Function} to be called when the pane is activated.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidActivate(callback) {\r\n }\r\n\r\n // Public: Invoke the given callback before the pane is destroyed.\r\n //\r\n // * `callback` {Function} to be called before the pane is destroyed.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onWillDestroy(callback) {\r\n }\r\n\r\n // Public: Invoke the given callback when the pane is destroyed.\r\n //\r\n // * `callback` {Function} to be called when the pane is destroyed.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidDestroy(callback) {\r\n }\r\n\r\n // Public: Invoke the given callback when the value of the {::isActive}\r\n // property changes.\r\n //\r\n // * `callback` {Function} to be called when the value of the {::isActive}\r\n // property changes.\r\n // * `active` {Boolean} indicating whether the pane is active.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidChangeActive(callback) {\r\n return this.container.onDidChangeActivePane(activePane => {\r\n const isActive = this === activePane;\r\n callback(isActive);\r\n });\r\n }\r\n\r\n // Public: Invoke the given callback with the current and future values of the\r\n // {::isActive} property.\r\n //\r\n // * `callback` {Function} to be called with the current and future values of\r\n // the {::isActive} property.\r\n // * `active` {Boolean} indicating whether the pane is active.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observeActive(callback) {\r\n callback(this.isActive());\r\n return this.onDidChangeActive(callback);\r\n }\r\n\r\n // Public: Invoke the given callback when an item is added to the pane.\r\n //\r\n // * `callback` {Function} to be called with when items are added.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The added pane item.\r\n // * `index` {Number} indicating where the item is located.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidAddItem(callback) {\r\n return this.emitter.on('did-add-item', callback);\r\n }\r\n\r\n // Public: Invoke the given callback when an item is removed from the pane.\r\n //\r\n // * `callback` {Function} to be called with when items are removed.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The removed pane item.\r\n // * `index` {Number} indicating where the item was located.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidRemoveItem(callback): Disposable {\r\n return this.emitter.on('did-remove-item', callback);\r\n }\r\n\r\n // Public: Invoke the given callback before an item is removed from the pane.\r\n //\r\n // * `callback` {Function} to be called with when items are removed.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The pane item to be removed.\r\n // * `index` {Number} indicating where the item is located.\r\n onWillRemoveItem(callback) {\r\n }\r\n\r\n // Public: Invoke the given callback when an item is moved within the pane.\r\n //\r\n // * `callback` {Function} to be called with when items are moved.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The removed pane item.\r\n // * `oldIndex` {Number} indicating where the item was located.\r\n // * `newIndex` {Number} indicating where the item is now located.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidMoveItem(callback) {\r\n }\r\n\r\n // Public: Invoke the given callback with all current and future items.\r\n //\r\n // * `callback` {Function} to be called with current and future items.\r\n // * `item` An item that is present in {::getItems} at the time of\r\n // subscription or that is added at some later time.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observeItems(callback) {\r\n for (const item of this.getItems()) {\r\n callback(item);\r\n }\r\n return this.onDidAddItem(({ item }) => callback(item));\r\n }\r\n\r\n // å
¬ææ¹æ³ï¼ å½{::getActiveItem}å¼åæ¢åè°ç¨ã\r\n onDoingChangeActiveItem(callback): Disposable {\r\n return this.emitter.on('doing-change-active-item', callback);\r\n }\r\n\r\n // Public: Invoke the given callback when the value of {::getActiveItem}\r\n // changes.\r\n //\r\n // * `callback` {Function} to be called with when the active item changes.\r\n // * `activeItem` The current active item.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidChangeActiveItem(callback): Disposable {\r\n return this.emitter.on('did-change-active-item', callback);\r\n }\r\n\r\n // Public: Invoke the given callback when {::activateNextRecentlyUsedItem}\r\n // has been called, either initiating or continuing a forward MRU traversal of\r\n // pane items.\r\n //\r\n // * `callback` {Function} to be called with when the active item changes.\r\n // * `nextRecentlyUsedItem` The next MRU item, now being set active\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onChooseNextMRUItem(callback) {\r\n }\r\n\r\n // Public: Invoke the given callback when {::activatePreviousRecentlyUsedItem}\r\n // has been called, either initiating or continuing a reverse MRU traversal of\r\n // pane items.\r\n //\r\n // * `callback` {Function} to be called with when the active item changes.\r\n // * `previousRecentlyUsedItem` The previous MRU item, now being set active\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onChooseLastMRUItem(callback) {\r\n }\r\n\r\n // Public: Invoke the given callback when {::moveActiveItemToTopOfStack}\r\n // has been called, terminating an MRU traversal of pane items and moving the\r\n // current active item to the top of the stack. Typically bound to a modifier\r\n // (e.g. CTRL) key up event.\r\n //\r\n // * `callback` {Function} to be called with when the MRU traversal is done.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDoneChoosingMRUItem(callback) {\r\n }\r\n\r\n // Public: Invoke the given callback with the current and future values of\r\n // {::getActiveItem}.\r\n //\r\n // * `callback` {Function} to be called with the current and future active\r\n // items.\r\n // * `activeItem` The current active item.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observeActiveItem(callback): Disposable {\r\n callback(this.getActiveItem());\r\n return this.onDidChangeActiveItem(callback);\r\n }\r\n\r\n // Public: Invoke the given callback before items are destroyed.\r\n //\r\n // * `callback` {Function} to be called before items are destroyed.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The item that will be destroyed.\r\n // * `index` The location of the item.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to\r\n // unsubscribe.\r\n onWillDestroyItem(callback) {\r\n }\r\n\r\n // Called by the view layer to indicate that the pane has gained focus.\r\n focus() {\r\n this.focused = true;\r\n return this.activate();\r\n }\r\n\r\n // Called by the view layer to indicate that the pane has lost focus.\r\n blur() {\r\n this.focused = false;\r\n return true; // if this is called from an event handler, don't cancel it\r\n }\r\n\r\n isFocused() { return this.focused; }\r\n\r\n getPanes() { return [this]; }\r\n\r\n unsubscribeFromItem(item) {\r\n const subscription = this.subscriptionsPerItem.get(item);\r\n if (subscription) {\r\n subscription.dispose();\r\n this.subscriptionsPerItem.delete(item);\r\n }\r\n }\r\n\r\n /*\r\n Section: Items\r\n */\r\n\r\n // Public: Get the items in this pane.\r\n //\r\n // Returns an {Array} of items.\r\n getItems() {\r\n return this.items.slice();\r\n }\r\n\r\n // Public: Get the active pane item in this pane.\r\n //\r\n // Returns a pane item.\r\n getActiveItem() { return this.activeItem; }\r\n\r\n setActiveItem(activeItem?: any, options?: any) {\r\n const modifyStack = options && options.modifyStack;\r\n if (activeItem !== this.activeItem) {\r\n if (modifyStack !== false) { this.addItemToStack(activeItem); }\r\n this.emitter.emit('doing-change-active-item', this.activeItem);\r\n this.activeItem = activeItem;\r\n this.emitter.emit('did-change-active-item', this.activeItem);\r\n if (this.container) { this.container.didChangeActiveItemOnPane(this, this.activeItem); }\r\n }\r\n return this.activeItem;\r\n }\r\n\r\n // Build the itemStack after deserializing\r\n addItemsToStack(itemStackIndices) {\r\n if (this.items.length > 0) {\r\n if (itemStackIndices.length !== this.items.length || itemStackIndices.includes(-1)) {\r\n itemStackIndices = this.items.map((item, i) => i);\r\n }\r\n\r\n for (const itemIndex of itemStackIndices) {\r\n this.addItemToStack(this.items[itemIndex]);\r\n }\r\n }\r\n }\r\n\r\n // Add item (or move item) to the end of the itemStack\r\n addItemToStack(newItem) {\r\n if (newItem == null) { return; }\r\n const index = this.itemStack.indexOf(newItem);\r\n if (index !== -1) { this.itemStack.splice(index, 1); }\r\n return this.itemStack.push(newItem);\r\n }\r\n\r\n // Public: Return the item at the given index.\r\n //\r\n // * `index` {Number}\r\n //\r\n // Returns an item or `null` if no item exists at the given index.\r\n itemAtIndex(index) {\r\n return this.items[index];\r\n }\r\n\r\n // Makes the next item in the itemStack active.\r\n activateNextRecentlyUsedItem() {\r\n if (this.items.length > 1) {\r\n if (this.itemStackIndex == null) { this.itemStackIndex = this.itemStack.length - 1; }\r\n if (this.itemStackIndex === 0) { this.itemStackIndex = this.itemStack.length; }\r\n this.itemStackIndex--;\r\n const nextRecentlyUsedItem = this.itemStack[this.itemStackIndex];\r\n this.setActiveItem(nextRecentlyUsedItem, { modifyStack: false });\r\n }\r\n }\r\n\r\n // Makes the previous item in the itemStack active.\r\n activatePreviousRecentlyUsedItem() {\r\n if (this.items.length > 1) {\r\n if (this.itemStackIndex + 1 === this.itemStack.length || this.itemStackIndex == null) {\r\n this.itemStackIndex = -1;\r\n }\r\n this.itemStackIndex++;\r\n const previousRecentlyUsedItem = this.itemStack[this.itemStackIndex];\r\n this.setActiveItem(previousRecentlyUsedItem, { modifyStack: false });\r\n }\r\n }\r\n\r\n // Moves the active item to the end of the itemStack once the ctrl key is lifted\r\n moveActiveItemToTopOfStack() {\r\n delete this.itemStackIndex;\r\n this.addItemToStack(this.activeItem);\r\n }\r\n\r\n // Public: Makes the next item active.\r\n activateNextItem() {\r\n const index = this.getActiveItemIndex();\r\n if (index < (this.items.length - 1)) {\r\n this.activateItemAtIndex(index + 1);\r\n } else {\r\n this.activateItemAtIndex(0);\r\n }\r\n }\r\n\r\n // Public: Makes the previous item active.\r\n activatePreviousItem() {\r\n const index = this.getActiveItemIndex();\r\n if (index > 0) {\r\n this.activateItemAtIndex(index - 1);\r\n } else {\r\n this.activateItemAtIndex(this.items.length - 1);\r\n }\r\n }\r\n\r\n activateLastItem() {\r\n this.activateItemAtIndex(this.items.length - 1);\r\n }\r\n\r\n // Public: Move the active tab to the right.\r\n moveItemRight() {\r\n const index = this.getActiveItemIndex();\r\n const rightItemIndex = index + 1;\r\n if (rightItemIndex <= this.items.length - 1) { this.moveItem(this.getActiveItem(), rightItemIndex); }\r\n }\r\n\r\n // Public: Move the active tab to the left\r\n moveItemLeft() {\r\n const index = this.getActiveItemIndex();\r\n const leftItemIndex = index - 1;\r\n if (leftItemIndex >= 0) { return this.moveItem(this.getActiveItem(), leftItemIndex); }\r\n }\r\n\r\n // Public: Get the index of the active item.\r\n //\r\n // Returns a {Number}.\r\n getActiveItemIndex() {\r\n return this.items.indexOf(this.activeItem);\r\n }\r\n\r\n // Public: Activate the item at the given index.\r\n //\r\n // * `index` {Number}\r\n activateItemAtIndex(index) {\r\n const item = this.itemAtIndex(index) || this.getActiveItem();\r\n return this.setActiveItem(item);\r\n }\r\n\r\n // Public: Make the given item *active*, causing it to be displayed by\r\n // the pane's view.\r\n //\r\n // * `item` The item to activate\r\n // * `options` (optional) {Object}\r\n // * `pending` (optional) {Boolean} indicating that the item should be added\r\n // in a pending state if it does not yet exist in the pane. Existing pending\r\n // items in a pane are replaced with new pending items when they are opened.\r\n activateItem(item, options: any = {}) {\r\n if (item) {\r\n const index = (this.getPendingItem() === this.activeItem)\r\n ? this.getActiveItemIndex()\r\n : this.getActiveItemIndex() + 1;\r\n this.addItem(item, Object.assign({}, options, { index }));\r\n this.setActiveItem(item);\r\n }\r\n }\r\n\r\n // Public: Add the given item to the pane.\r\n //\r\n // * `item` The item to add. It can be a model with an associated view or a\r\n // view.\r\n // * `options` (optional) {Object}\r\n // * `index` (optional) {Number} indicating the index at which to add the item.\r\n // If omitted, the item is added after the current active item.\r\n // * `pending` (optional) {Boolean} indicating that the item should be\r\n // added in a pending state. Existing pending items in a pane are replaced with\r\n // new pending items when they are opened.\r\n //\r\n // Returns the added item.\r\n addItem(item, options: any = {}) {\r\n // Backward compat with old API:\r\n // addItem(item, index=@getActiveItemIndex() + 1)\r\n if (typeof options === 'number') {\r\n options = { index: options };\r\n }\r\n\r\n const index = options.index != null ? options.index : this.getActiveItemIndex() + 1;\r\n const moved = options.moved != null ? options.moved : false;\r\n const pending = options.pending != null ? options.pending : false;\r\n\r\n if (!item || typeof item !== 'object') {\r\n throw new Error(`Pane items must be objects. Attempted to add item ${item}.`);\r\n }\r\n\r\n if (typeof item.isDestroyed === 'function' && item.isDestroyed()) {\r\n throw new Error(`Adding a pane item with URI\r\n '${typeof item.getURI === 'function' && item.getURI()}' that has already been destroyed`);\r\n }\r\n\r\n if (this.items.find(it => it === item)) { return; }\r\n\r\n if (typeof item.onDidDestroy === 'function') {\r\n }\r\n\r\n this.items.splice(index, 0, item);\r\n const lastPendingItem = this.getPendingItem();\r\n const replacingPendingItem = lastPendingItem != null && !moved;\r\n if (replacingPendingItem) { this.pendingItem = null; }\r\n if (pending) { this.setPendingItem(item); }\r\n\r\n this.emitter.emit('did-add-item', { item, index, moved });\r\n if (!moved) {\r\n if (this.container) { this.container.didAddPaneItem(item, this, index); }\r\n }\r\n\r\n if (replacingPendingItem) { this.destroyItem(lastPendingItem); }\r\n if (!this.getActiveItem()) { this.setActiveItem(item); }\r\n return item;\r\n }\r\n\r\n setPendingItem(item) {\r\n if (this.pendingItem !== item) {\r\n const mostRecentPendingItem = this.pendingItem;\r\n this.pendingItem = item;\r\n }\r\n }\r\n\r\n getPendingItem() {\r\n return this.pendingItem || null;\r\n }\r\n\r\n clearPendingItem() {\r\n this.setPendingItem(null);\r\n }\r\n\r\n onItemDidTerminatePendingState(callback) {\r\n }\r\n\r\n // Public: Add the given items to the pane.\r\n //\r\n // * `items` An {Array} of items to add. Items can be views or models with\r\n // associated views. Any objects that are already present in the pane's\r\n // current items will not be added again.\r\n // * `index` (optional) {Number} index at which to add the items. If omitted,\r\n // the item is # added after the current active item.\r\n //\r\n // Returns an {Array} of added items.\r\n addItems(items: any[], index = this.getActiveItemIndex() + 1) {\r\n items = items.filter(item => !this.items.find(it => it === item));\r\n for (let i = 0; i < items.length; i++) {\r\n const item = items[i];\r\n this.addItem(item, { index: index + i });\r\n }\r\n return items;\r\n }\r\n\r\n removeItem(item, moved = false) {\r\n const index = this.items.indexOf(item);\r\n if (index === -1) { return; }\r\n if (this.getPendingItem() === item) { this.pendingItem = null; }\r\n this.removeItemFromStack(item);\r\n // this.emitter.emit('will-remove-item', {item, index, destroyed: !moved, moved});\r\n this.unsubscribeFromItem(item);\r\n\r\n if (item === this.activeItem) {\r\n if (this.items.length === 1) {\r\n this.setActiveItem(undefined);\r\n } else if (index === 0) {\r\n this.activateNextItem();\r\n } else {\r\n this.activatePreviousItem();\r\n }\r\n }\r\n this.items.splice(index, 1);\r\n this.emitter.emit('did-remove-item', { item, index, destroyed: !moved, moved });\r\n if (!moved && this.container) { this.container.didDestroyPaneItem({ item, index, pane: this }); }\r\n if (this.items.length === 0 && this.config && this.config.get && this.config.get('core.destroyEmptyPanes')) {\r\n this.destroy();\r\n }\r\n }\r\n\r\n // Remove the given item from the itemStack.\r\n //\r\n // * `item` The item to remove.\r\n // * `index` {Number} indicating the index to which to remove the item from the itemStack.\r\n removeItemFromStack(item) {\r\n const index = this.itemStack.indexOf(item);\r\n if (index !== -1) { this.itemStack.splice(index, 1); }\r\n }\r\n\r\n // Public: Move the given item to the given index.\r\n //\r\n // * `item` The item to move.\r\n // * `index` {Number} indicating the index to which to move the item.\r\n moveItem(item, newIndex) {\r\n const oldIndex = this.items.indexOf(item);\r\n this.items.splice(oldIndex, 1);\r\n this.items.splice(newIndex, 0, item);\r\n }\r\n\r\n // Public: Move the given item to the given index on another pane.\r\n //\r\n // * `item` The item to move.\r\n // * `pane` {Pane} to which to move the item.\r\n // * `index` {Number} indicating the index to which to move the item in the\r\n // given pane.\r\n moveItemToPane(item?, pane?, index?) {\r\n this.removeItem(item, true);\r\n return pane.addItem(item, { index, moved: true });\r\n }\r\n\r\n // Public: Destroy the active item and activate the next item.\r\n //\r\n // Returns a {Promise} that resolves when the item is destroyed.\r\n destroyActiveItem() {\r\n return this.destroyItem(this.activeItem);\r\n }\r\n\r\n // Public: Destroy the given item.\r\n //\r\n // If the item is active, the next item will be activated. If the item is the\r\n // last item, the pane will be destroyed if the `core.destroyEmptyPanes` config\r\n // setting is `true`.\r\n //\r\n // * `item` Item to destroy\r\n // * `force` (optional) {Boolean} Destroy the item without prompting to save\r\n // it, even if the item's `isPermanentDockItem` method returns true.\r\n //\r\n // Returns a {Promise} that resolves with a {Boolean} indicating whether or not\r\n // the item was destroyed.\r\n async destroyItem(item?: any, force?) {\r\n const index = this.items.indexOf(item);\r\n if (index === -1) { return false; }\r\n\r\n if (!force &&\r\n typeof item.isPermanentDockItem === 'function' && item.isPermanentDockItem() &&\r\n (!this.container || this.container.getLocation() !== 'center')) {\r\n return false;\r\n }\r\n\r\n // In the case where there are no `onWillDestroyPaneItem` listeners, preserve the old behavior\r\n // where `Pane.destroyItem` and callers such as `Pane.close` take effect synchronously.\r\n\r\n\r\n this.removeItem(item, false);\r\n if (typeof item.destroy === 'function') { item.destroy(); }\r\n return true;\r\n }\r\n\r\n // Public: Destroy all items.\r\n destroyItems() {\r\n return Promise.all(\r\n this.getItems().map(item => this.destroyItem(item))\r\n );\r\n }\r\n\r\n // Public: Destroy all items except for the active item.\r\n destroyInactiveItems() {\r\n return Promise.all(\r\n this.getItems()\r\n .filter(item => item !== this.activeItem)\r\n .map(item => this.destroyItem(item))\r\n );\r\n }\r\n\r\n promptToSaveItem(item, options = {}): Promise<boolean> {\r\n if (typeof item.shouldPromptToSave !== 'function' || !item.shouldPromptToSave(options)) {\r\n return Promise.resolve(true);\r\n }\r\n\r\n let uri;\r\n if (typeof item.getURI === 'function') {\r\n uri = item.getURI();\r\n } else if (typeof item.getUri === 'function') {\r\n uri = item.getUri();\r\n } else {\r\n return Promise.resolve(true);\r\n }\r\n\r\n const title = (typeof item.getTitle === 'function' && item.getTitle()) || uri;\r\n\r\n const saveDialog = (saveButtonText, saveFn, message): Promise<boolean> => {\r\n const chosen = this.applicationDelegate.confirm({\r\n message,\r\n detailedMessage: 'Your changes will be lost if you close this item without saving.',\r\n buttons: [saveButtonText, 'Cancel', '&Don\\'t Save']\r\n }\r\n );\r\n\r\n switch (chosen) {\r\n case 0:\r\n return new Promise(resolve => {\r\n return saveFn(item, error => {\r\n if (error instanceof SaveCancelledError) {\r\n resolve(false);\r\n } else if (error) {\r\n saveDialog(\r\n 'Save as',\r\n this.saveItemAs,\r\n `'${title}' could not be saved.\\nError: ${this.getMessageForErrorCode(error.code)}`\r\n ).then(resolve);\r\n } else {\r\n resolve(true);\r\n }\r\n });\r\n });\r\n case 1:\r\n return Promise.resolve(false);\r\n case 2:\r\n return Promise.resolve(true);\r\n }\r\n };\r\n\r\n return saveDialog(\r\n 'Save',\r\n this.saveItem,\r\n `'${title}' has changes, do you want to save them?`\r\n );\r\n }\r\n\r\n // Public: Save the active item.\r\n saveActiveItem(nextAction?: () => any) {\r\n return this.saveItem(this.getActiveItem(), nextAction);\r\n }\r\n\r\n // Public: Prompt the user for a location and save the active item with the\r\n // path they select.\r\n //\r\n // * `nextAction` (optional) {Function} which will be called after the item is\r\n // successfully saved.\r\n //\r\n // Returns a {Promise} that resolves when the save is complete\r\n saveActiveItemAs(nextAction?: () => any) {\r\n return this.saveItemAs(this.getActiveItem(), nextAction);\r\n }\r\n\r\n // Public: Save the given item.\r\n //\r\n // * `item` The item to save.\r\n // * `nextAction` (optional) {Function} which will be called with no argument\r\n // after the item is successfully saved, or with the error if it failed.\r\n // The return value will be that of `nextAction` or `undefined` if it was not\r\n // provided\r\n //\r\n // Returns a {Promise} that resolves when the save is complete\r\n saveItem(item, nextAction) {\r\n if (!item) { return Promise.resolve(); }\r\n\r\n let itemURI;\r\n if (typeof item.getURI === 'function') {\r\n itemURI = item.getURI();\r\n } else if (typeof item.getUri === 'function') {\r\n itemURI = item.getUri();\r\n }\r\n\r\n if (itemURI != null) {\r\n if (typeof item.save === 'function') {\r\n return promisify(() => item.save())\r\n .then(() => {\r\n if (nextAction) { nextAction(); }\r\n })\r\n .catch(error => {\r\n if (nextAction) {\r\n nextAction(error);\r\n } else {\r\n this.handleSaveError(error, item);\r\n }\r\n });\r\n } else if (nextAction) {\r\n nextAction();\r\n return Promise.resolve();\r\n }\r\n } else {\r\n return this.saveItemAs(item, nextAction);\r\n }\r\n }\r\n\r\n // Public: Prompt the user for a location and save the active item with the\r\n // path they select.\r\n //\r\n // * `item` The item to save.\r\n // * `nextAction` (optional) {Function} which will be called with no argument\r\n // after the item is successfully saved, or with the error if it failed.\r\n // The return value will be that of `nextAction` or `undefined` if it was not\r\n // provided\r\n saveItemAs(item, nextAction) {\r\n }\r\n\r\n // Public: Save all items.\r\n saveItems() {\r\n }\r\n\r\n // Public: Return the first item that matches the given URI or undefined if\r\n // none exists.\r\n //\r\n // * `uri` {String} containing a URI.\r\n itemForURI(uri) {\r\n return this.items.find(item => {\r\n if (typeof item.getURI === 'function') {\r\n return item.getURI() === uri;\r\n } else if (typeof item.getUri === 'function') {\r\n return item.getUri() === uri;\r\n }\r\n });\r\n }\r\n\r\n // Public: Activate the first item that matches the given URI.\r\n //\r\n // * `uri` {String} containing a URI.\r\n //\r\n // Returns a {Boolean} indicating whether an item matching the URI was found.\r\n activateItemForURI(uri) {\r\n const item = this.itemForURI(uri);\r\n if (item) {\r\n this.activateItem(item);\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n copyActiveItem() {\r\n if (this.activeItem && typeof this.activeItem.copy === 'function') {\r\n return this.activeItem.copy();\r\n }\r\n }\r\n\r\n /*\r\n Section: Lifecycle\r\n */\r\n\r\n // Public: Determine whether the pane is active.\r\n //\r\n // Returns a {Boolean}.\r\n isActive() {\r\n return this.container && this.container.getActivePane() === this;\r\n }\r\n\r\n // Public: Makes this pane the *active* pane, causing it to gain focus.\r\n activate() {\r\n }\r\n\r\n // Public: Close the pane and destroy all its items.\r\n //\r\n // If this is the last pane, all the items will be destroyed but the pane\r\n // itself will not be destroyed.\r\n destroy() {\r\n }\r\n\r\n isAlive() { return this.alive; }\r\n\r\n // Public: Determine whether this pane has been destroyed.\r\n //\r\n // Returns a {Boolean}.\r\n isDestroyed() { return !this.isAlive(); }\r\n\r\n /*\r\n Section: Splitting\r\n */\r\n\r\n // Public: Create a new pane to the left of this pane.\r\n //\r\n // * `params` (optional) {Object} with the following keys:\r\n // * `items` (optional) {Array} of items to add to the new pane.\r\n // * `copyActiveItem` (optional) {Boolean} true will copy the active item into the new split pane\r\n //\r\n // Returns the new {Pane}.\r\n splitLeft(params) {\r\n return this.split('horizontal', 'before', params);\r\n }\r\n\r\n // Public: Create a new pane to the right of this pane.\r\n //\r\n // * `params` (optional) {Object} with the following keys:\r\n // * `items` (optional) {Array} of items to add to the new pane.\r\n // * `copyActiveItem` (optional) {Boolean} true will copy the active item into the new split pane\r\n //\r\n // Returns the new {Pane}.\r\n splitRight(params) {\r\n return this.split('horizontal', 'after', params);\r\n }\r\n\r\n // Public: Creates a new pane above the receiver.\r\n //\r\n // * `params` (optional) {Object} with the following keys:\r\n // * `items` (optional) {Array} of items to add to the new pane.\r\n // * `copyActiveItem` (optional) {Boolean} true will copy the active item into the new split pane\r\n //\r\n // Returns the new {Pane}.\r\n splitUp(params) {\r\n return this.split('vertical', 'before', params);\r\n }\r\n\r\n // Public: Creates a new pane below the receiver.\r\n //\r\n // * `params` (optional) {Object} with the following keys:\r\n // * `items` (optional) {Array} of items to add to the new pane.\r\n // * `copyActiveItem` (optional) {Boolean} true will copy the active item into the new split pane\r\n //\r\n // Returns the new {Pane}.\r\n splitDown(params) {\r\n return this.split('vertical', 'after', params);\r\n }\r\n\r\n split(orientation, side, params) {\r\n if (params && params.copyActiveItem) {\r\n if (!params.items) { params.items = []; }\r\n params.items.push(this.copyActiveItem());\r\n }\r\n\r\n if (this.parent.orientation !== orientation) {\r\n this.parent.replaceChild(this, new PaneAxis({\r\n container: this.container,\r\n orientation,\r\n children: [this],\r\n flexScale: this.flexScale\r\n },\r\n this.viewRegistry\r\n ));\r\n this.setFlexScale(1);\r\n }\r\n\r\n const newPane = new Pane(Object.assign({\r\n applicationDelegate: this.applicationDelegate,\r\n notificationManager: this.notificationManager,\r\n deserializerManager: this.deserializerManager,\r\n config: this.config,\r\n viewRegistry: this.viewRegistry\r\n }, params));\r\n\r\n switch (side) {\r\n case 'before': this.parent.insertChildBefore(this, newPane); break;\r\n case 'after': this.parent.insertChildAfter(this, newPane); break;\r\n }\r\n\r\n if (params && params.moveActiveItem && this.activeItem) {\r\n this.moveItemToPane(this.activeItem, newPane);\r\n }\r\n\r\n newPane.activate();\r\n return newPane;\r\n }\r\n\r\n // If the parent is a horizontal axis, returns its first child if it is a pane;\r\n // otherwise returns this pane.\r\n findLeftmostSibling() {\r\n if (this.parent.orientation === 'horizontal') {\r\n const [leftmostSibling] = this.parent.children;\r\n if (leftmostSibling instanceof PaneAxis) {\r\n return this;\r\n } else {\r\n return leftmostSibling;\r\n }\r\n } else {\r\n return this;\r\n }\r\n }\r\n\r\n findRightmostSibling() {\r\n if (this.parent.orientation === 'horizontal') {\r\n const rightmostSibling = this.parent.children[this.parent.children.length - 1];\r\n if (rightmostSibling instanceof PaneAxis) {\r\n return this;\r\n } else {\r\n return rightmostSibling;\r\n }\r\n } else {\r\n return this;\r\n }\r\n }\r\n\r\n // If the parent is a horizontal axis, returns its last child if it is a pane;\r\n // otherwise returns a new pane created by splitting this pane rightward.\r\n findOrCreateRightmostSibling() {\r\n const rightmostSibling = this.findRightmostSibling();\r\n if (rightmostSibling === this) {\r\n return this.splitRight({});\r\n } else {\r\n return rightmostSibling;\r\n }\r\n }\r\n\r\n // If the parent is a vertical axis, returns its first child if it is a pane;\r\n // otherwise returns this pane.\r\n findTopmostSibling() {\r\n if (this.parent.orientation === 'vertical') {\r\n const [topmostSibling] = this.parent.children;\r\n if (topmostSibling instanceof PaneAxis) {\r\n return this;\r\n } else {\r\n return topmostSibling;\r\n }\r\n } else {\r\n return this;\r\n }\r\n }\r\n\r\n findBottommostSibling() {\r\n if (this.parent.orientation === 'vertical') {\r\n const bottommostSibling = this.parent.children[this.parent.children.length - 1];\r\n if (bottommostSibling instanceof PaneAxis) {\r\n return this;\r\n } else {\r\n return bottommostSibling;\r\n }\r\n } else {\r\n return this;\r\n }\r\n }\r\n\r\n // If the parent is a vertical axis, returns its last child if it is a pane;\r\n // otherwise returns a new pane created by splitting this pane bottomward.\r\n findOrCreateBottommostSibling() {\r\n const bottommostSibling = this.findBottommostSibling();\r\n if (bottommostSibling === this) {\r\n return this.splitDown({});\r\n } else {\r\n return bottommostSibling;\r\n }\r\n }\r\n\r\n // Private: Close the pane unless the user cancels the action via a dialog.\r\n //\r\n // Returns a {Promise} that resolves once the pane is either closed, or the\r\n // closing has been cancelled.\r\n close() {\r\n return Promise.all(this.getItems().map(item => this.promptToSaveItem(item)))\r\n .then(results => {\r\n if (!results.find(item => item === false)) { return this.destroy(); }\r\n });\r\n }\r\n\r\n handleSaveError(error, item) {\r\n }\r\n\r\n getMessageForErrorCode(errorCode) {\r\n switch (errorCode) {\r\n case 'EACCES': return 'Permission denied';\r\n case 'ECONNRESET': return 'Connection reset';\r\n case 'EINTR': return 'Interrupted system call';\r\n case 'EIO': return 'I/O error writing file';\r\n case 'ENOSPC': return 'No space left on device';\r\n case 'ENOTSUP': return 'Operation not supported on socket';\r\n case 'ENXIO': return 'No such device or address';\r\n case 'EROFS': return 'Read-only file system';\r\n case 'ESPIPE': return 'Invalid seek';\r\n case 'ETIMEDOUT': return 'Connection timed out';\r\n }\r\n }\r\n}\r\n\r\nfunction promisify(callback) {\r\n try {\r\n return Promise.resolve(callback());\r\n } catch (error) {\r\n return Promise.reject(error);\r\n }\r\n}\r\n","export class ItemRegistry {\r\n items: WeakSet<any>;\r\n constructor() {\r\n this.items = new WeakSet();\r\n }\r\n\r\n addItem(item: any) {\r\n if (this.hasItem(item)) {\r\n throw new Error(`The workspace can only contain one instance of item ${item}`);\r\n }\r\n this.items.add(item);\r\n }\r\n\r\n removeItem(item: any) {\r\n this.items.delete(item);\r\n }\r\n\r\n hasItem(item) {\r\n return this.items.has(item);\r\n }\r\n}\r\n","import { Pane } from './pane';\r\nimport { ItemRegistry } from './item-registry';\r\n\r\nconst SERIALIZATION_VERSION = 1;\r\n\r\nexport class PaneContainer {\r\n itemRegistry: any;\r\n alive: boolean;\r\n viewRegistry: any;\r\n location: any;\r\n activePane: any;\r\n root: any;\r\n config: any;\r\n\r\n constructor(params) {\r\n let applicationDelegate, deserializerManager, notificationManager;\r\n ({\r\n config: this.config,\r\n applicationDelegate,\r\n notificationManager,\r\n deserializerManager,\r\n viewRegistry: this.viewRegistry,\r\n location: this.location\r\n } = params);\r\n\r\n this.itemRegistry = new ItemRegistry();\r\n this.alive = true;\r\n\r\n\r\n this.setRoot(new Pane({\r\n container: this,\r\n config: this.config,\r\n applicationDelegate,\r\n notificationManager,\r\n deserializerManager,\r\n viewRegistry: this.viewRegistry\r\n }));\r\n this.didActivatePane(this.getRoot());\r\n }\r\n\r\n getLocation() { return this.location; }\r\n\r\n getElement() {\r\n }\r\n\r\n destroy() {\r\n this.alive = false;\r\n for (const pane of this.getRoot().getPanes()) { pane.destroy(); }\r\n\r\n }\r\n\r\n isAlive() { return this.alive; }\r\n\r\n isDestroyed() { return !this.isAlive(); }\r\n\r\n serialize(...params) {\r\n return {\r\n deserializer: 'PaneContainer',\r\n version: SERIALIZATION_VERSION,\r\n root: this.root ? this.root.serialize() : null,\r\n activePaneId: this.activePane.id\r\n };\r\n }\r\n\r\n deserialize(state, deserializerManager) {\r\n if (state.version !== SERIALIZATION_VERSION) { return; }\r\n this.setRoot(deserializerManager.deserialize(state.root));\r\n this.activePane = this.getRoot().getPanes().find(pane => pane.id === state.activePaneId) || this.getPanes()[0];\r\n if (this.config && this.config.get && this.config.get('core.destroyEmptyPanes')) {\r\n this.destroyEmptyPanes();\r\n }\r\n }\r\n\r\n onDidChangeRoot(fn) {\r\n }\r\n\r\n observeRoot(fn) {\r\n fn(this.getRoot());\r\n return this.onDidChangeRoot(fn);\r\n }\r\n\r\n onDidAddPane(fn) {\r\n }\r\n\r\n observePanes(fn) {\r\n for (const pane of this.getPanes()) { fn(pane); }\r\n return this.onDidAddPane(({ pane }) => fn(pane));\r\n }\r\n\r\n onDidDestroyPane(fn) {\r\n }\r\n\r\n onWillDestroyPane(fn) {\r\n }\r\n\r\n onDidChangeActivePane(fn) {\r\n }\r\n\r\n onDidActivatePane(fn) {\r\n }\r\n\r\n observeActivePane(fn) {\r\n fn(this.getActivePane());\r\n return this.onDidChangeActivePane(fn);\r\n }\r\n\r\n onDidAddPaneItem(fn) {\r\n }\r\n\r\n observePaneItems(fn) {\r\n for (const item of this.getPaneItems()) { fn(item); }\r\n return this.onDidAddPaneItem(({ item }) => fn(item));\r\n }\r\n\r\n onDidChangeActivePaneItem(fn) {\r\n }\r\n\r\n onDidStopChangingActivePaneItem(fn) {\r\n }\r\n\r\n observeActivePaneItem(fn) {\r\n fn(this.getActivePaneItem());\r\n return this.onDidChangeActivePaneItem(fn);\r\n }\r\n\r\n onWillDestroyPaneItem(fn) {\r\n }\r\n\r\n onDidDestroyPaneItem(fn) {\r\n }\r\n\r\n getRoot() { return this.root; }\r\n\r\n setRoot(root) {\r\n this.root = root;\r\n this.root.setParent(this);\r\n this.root.setContainer(this);\r\n if ((this.getActivePane() == null) && this.root instanceof Pane) {\r\n this.didActivatePane(this.root);\r\n }\r\n }\r\n\r\n replaceChild(oldChild, newChild) {\r\n if (oldChild !== this.root) { throw new Error('Replacing non-existent child'); }\r\n this.setRoot(newChild);\r\n }\r\n\r\n getPanes(): Pane[] {\r\n if (this.alive) {\r\n return this.getRoot().getPanes();\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n getPaneItems(): any[] {\r\n return this.getRoot().getItems();\r\n }\r\n\r\n getActivePane(): Pane {\r\n return this.activePane;\r\n }\r\n\r\n getActivePaneItem(): any {\r\n return this.getActivePane().getActiveItem();\r\n }\r\n\r\n paneForURI(uri): Pane {\r\n return this.getPanes().find(pane => pane.itemForURI(uri) != null);\r\n }\r\n\r\n paneForItem(item): Pane {\r\n return this.getPanes().find(pane => pane.getItems().find(it => it === item));\r\n }\r\n\r\n saveAll() {\r\n for (const pane of this.getPanes()) { pane.saveItems(); }\r\n }\r\n\r\n confirmClose(options) {\r\n const promises = [];\r\n for (const pane of this.getPanes()) {\r\n for (const item of pane.getItems()) {\r\n promises.push(pane.promptToSaveItem(item, options));\r\n }\r\n }\r\n return Promise.all(promises).then((results: boolean[]) => !results.find(item => item === false));\r\n }\r\n\r\n activateNextPane() {\r\n const panes = this.getPanes();\r\n if (panes.length > 1) {\r\n const currentIndex = panes.indexOf(this.activePane);\r\n const nextIndex = (currentIndex + 1) % panes.length;\r\n panes[nextIndex].activate();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n activatePreviousPane() {\r\n const panes = this.getPanes();\r\n if (panes.length > 1) {\r\n const currentIndex = panes.indexOf(this.activePane);\r\n let previousIndex = currentIndex - 1;\r\n if (previousIndex < 0) { previousIndex = panes.length - 1; }\r\n panes[previousIndex].activate();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n moveActiveItemToPane(destPane) {\r\n const item = this.activePane.getActiveItem();\r\n\r\n if (!destPane.isItemAllowed(item)) { return; }\r\n\r\n this.activePane.moveItemToPane(item, destPane);\r\n destPane.setActiveItem(item);\r\n }\r\n\r\n copyActiveItemToPane(destPane) {\r\n const item = this.activePane.copyActiveItem();\r\n\r\n if (item && destPane.isItemAllowed(item)) {\r\n destPane.activateItem(item);\r\n }\r\n }\r\n\r\n destroyEmptyPanes() {\r\n for (const pane of this.getPanes()) { if (pane.items.length === 0) { pane.destroy(); } }\r\n }\r\n\r\n didAddPane(event) {\r\n const items = event.pane.getItems();\r\n for (let i = 0, length = items.length; i < length; i++) {\r\n const item = items[i];\r\n this.didAddPaneItem(item, event.pane, i);\r\n }\r\n }\r\n\r\n willDestroyPane(event) {\r\n }\r\n\r\n didDestroyPane(event) {\r\n }\r\n\r\n didActivatePane(activePane) {\r\n if (activePane !== this.activePane) {\r\n if (!this.getPanes().find(item => item === activePane)) {\r\n throw new Error('Setting active pane that is not present in pane container');\r\n }\r\n\r\n this.activePane = activePane;\r\n this.didChangeActiveItemOnPane(this.activePane, this.activePane.getActiveItem());\r\n }\r\n return this.activePane;\r\n }\r\n\r\n didAddPaneItem(item, pane, index) {\r\n this.itemRegistry.addItem(item);\r\n }\r\n\r\n willDestroyPaneItem(event) {\r\n }\r\n\r\n didDestroyPaneItem(event) {\r\n this.itemRegistry.removeItem(event.item);\r\n // this.emitter.emit('did-destroy-pane-item', event);\r\n }\r\n\r\n didChangeActiveItemOnPane(pane, activeItem) {\r\n if (pane === this.getActivePane()) {\r\n\r\n this.cancelStoppedChangingActivePaneItemTimeout();\r\n // `setTimeout()` isn't available during the snapshotting phase, but that's okay.\r\n\r\n }\r\n }\r\n\r\n cancelStoppedChangingActivePaneItemTimeout() {\r\n\r\n }\r\n}\r\n","import { PaneContainer } from './pane-container';\r\nimport { Pane } from './pane';\r\nimport { ViewRegistry } from './view-registry';\r\nimport { Emitter, Disposable } from './event-kit';\r\n\r\nexport enum DockStyle {\r\n none,\r\n left,\r\n right,\r\n top,\r\n bottom\r\n}\r\n\r\nexport class Dock {\r\n private location: any;\r\n private widthOrHeight: any;\r\n private viewRegistry: ViewRegistry;\r\n private didActivate: boolean;\r\n private paneContainer: PaneContainer;\r\n private state: any;\r\n private emitter: Emitter;\r\n\r\n\r\n constructor(params) {\r\n this.handleResizeHandleDragStart = this.handleResizeHandleDragStart.bind(this);\r\n this.handleResizeToFit = this.handleResizeToFit.bind(this);\r\n this.handleMouseMove = this.handleMouseMove.bind(this);\r\n this.handleMouseUp = this.handleMouseUp.bind(this);\r\n\r\n this.location = params.location;\r\n this.widthOrHeight = getWidthOrHeight(this.location);\r\n this.viewRegistry = params.viewRegistry;\r\n this.didActivate = params.didActivate;\r\n\r\n this.emitter = new Emitter();\r\n\r\n this.paneContainer = new PaneContainer({\r\n location: this.location,\r\n viewRegistry: this.viewRegistry\r\n });\r\n\r\n this.state = {\r\n size: null,\r\n visible: false,\r\n shouldAnimate: false\r\n };\r\n\r\n }\r\n\r\n // This method is called explicitly by the object which adds the Dock to the document.\r\n elementAttached() {\r\n // Re-render when the dock is attached to make sure we remeasure sizes defined in CSS.\r\n this.render(this.state);\r\n }\r\n\r\n getElement() {\r\n\r\n }\r\n\r\n getLocation() {\r\n return this.location;\r\n }\r\n\r\n destroy() {\r\n this.paneContainer.destroy();\r\n // window.removeEventListener('mousemove', this.handleMouseMove);\r\n // window.removeEventListener('mouseup', this.handleMouseUp);\r\n // window.removeEventListener('drag', this.handleDrag);\r\n // window.removeEventListener('dragend', this.handleDragEnd);\r\n }\r\n\r\n setHovered(hovered) {\r\n if (hovered === this.state.hovered) {\r\n return;\r\n }\r\n this.setState({ hovered });\r\n }\r\n\r\n setDraggingItem(draggingItem) {\r\n if (draggingItem === this.state.draggingItem) { return; }\r\n this.setState({ draggingItem });\r\n }\r\n\r\n // Extended: Show the dock and focus its active {Pane}.\r\n activate() {\r\n this.getActivePane().activate();\r\n }\r\n\r\n // Extended: Show the dock without focusing it.\r\n show() {\r\n this.setState({ visible: true });\r\n }\r\n\r\n // Extended: Hide the dock and activate the {WorkspaceCenter} if the dock was\r\n // was previously focused.\r\n hide() {\r\n this.setState({ visible: false });\r\n }\r\n\r\n // Extended: Toggle the dock's visibility without changing the {Workspace}'s\r\n // active pane container.\r\n toggle() {\r\n // const state = { visible: !this.state.visible };\r\n // if (!state.visible) { state.hovered = false; }\r\n // this.setState(state);\r\n }\r\n\r\n // Extended: Check if the dock is visible.\r\n //\r\n // Returns a {Boolean}.\r\n isVisible() {\r\n return this.state.visible;\r\n }\r\n\r\n setState(newState) {\r\n const prevState = this.state;\r\n const nextState = Object.assign({}, prevState, newState);\r\n\r\n // Update the `shouldAnimate` state. This needs to be written to the DOM before updating the\r\n // class that changes the animated property. Normally we'd have to defer the class change a\r\n // frame to ensure the property is animated (or not) appropriately, however we luck out in this\r\n // case because the drag start always happens before the item is dragged into the toggle button.\r\n if (nextState.visible !== prevState.visible) {\r\n // Never animate toggling visibility...\r\n nextState.shouldAnimate = false;\r\n } else if (!nextState.visible && nextState.draggingItem && !prevState.draggingItem) {\r\n // ...but do animate if you start dragging while the panel is hidden.\r\n nextState.shouldAnimate = true;\r\n }\r\n\r\n this.state = nextState;\r\n this.render(this.state);\r\n\r\n const { visible } = this.state;\r\n // if (visible !== prevState.visible) {\r\n // this.emitter.emit('did-change-visible', visible);\r\n // }\r\n }\r\n\r\n render(state) {\r\n\r\n }\r\n\r\n handleDidAddPaneItem() {\r\n if (this.state.size == null) {\r\n this.setState({ size: this.getInitialSize() });\r\n }\r\n }\r\n\r\n handleDidRemovePaneItem() {\r\n // Hide the dock if you remove the last item.\r\n if (this.paneContainer.getPaneItems().length === 0) {\r\n this.setState({ visible: false, hovered: false, size: null });\r\n }\r\n }\r\n\r\n handleResizeHandleDragStart() {\r\n window.addEventListener('mousemove', this.handleMouseMove);\r\n window.addEventListener('mouseup', this.handleMouseUp);\r\n this.setState({ resizing: true });\r\n }\r\n\r\n handleResizeToFit() {\r\n const item = this.getActivePaneItem();\r\n if (item) {\r\n const size = getPreferredSize(item, this.getLocation());\r\n if (size != null) { this.setState({ size }); }\r\n }\r\n }\r\n\r\n handleMouseMove(event) {\r\n if (event.buttons === 0) { // We missed the mouseup event. For some reason it happens on Windows\r\n this.handleMouseUp(event);\r\n return;\r\n }\r\n\r\n const size = 0;\r\n // switch (this.location) {\r\n // case 'left':\r\n // size = event.pageX - this.element.getBoundingClientRect().left;\r\n // break;\r\n // case 'bottom':\r\n // size = this.element.getBoundingClientRect().bottom - event.pageY;\r\n // break;\r\n // case 'right':\r\n // size = this.element.getBoundingClientRect().right - event.pageX;\r\n // break;\r\n // }\r\n this.setState({ size });\r\n }\r\n\r\n handleMouseUp(event) {\r\n window.removeEventListener('mousemove', this.handleMouseMove);\r\n window.removeEventListener('mouseup', this.handleMouseUp);\r\n this.setState({ resizing: false });\r\n }\r\n\r\n // Determine whether the cursor is within the dock hover area. This isn't as simple as just using\r\n // mouseenter/leave because we want to be a little more forgiving. For example, if the cursor is\r\n // over the footer, we want to show the bottom dock's toggle button. Also note that our criteria\r\n // for detecting entry are different than detecting exit but, in order for us to avoid jitter, the\r\n // area considered when detecting exit MUST fully encompass the area considered when detecting\r\n // entry.\r\n pointWithinHoverArea (point, detectingExit) {\r\n }\r\n\r\n getInitialSize() {\r\n // The item may not have been activated yet. If that's the case, just use the first item.\r\n const activePaneItem = this.paneContainer.getActivePaneItem() || this.paneContainer.getPaneItems()[0];\r\n // If there are items, we should have an explicit width; if not, we shouldn't.\r\n return activePaneItem\r\n ? getPreferredSize(activePaneItem, this.location)\r\n : null;\r\n }\r\n\r\n serialize() {\r\n return {\r\n deserializer: 'Dock',\r\n size: this.state.size,\r\n paneContainer: this.paneContainer.serialize({}),\r\n visible: this.state.visible\r\n };\r\n }\r\n\r\n deserialize(serialized, deserializerManager) {\r\n this.paneContainer.deserialize(serialized.paneContainer, deserializerManager);\r\n this.setState({\r\n size: serialized.size || this.getInitialSize(),\r\n // If no items could be deserialized, we don't want to show the dock (even if it was visible last time)\r\n visible: serialized.visible && (this.paneContainer.getPaneItems().length > 0)\r\n });\r\n }\r\n\r\n /*\r\n Section: Event Subscription\r\n */\r\n\r\n // Essential: Invoke the given callback when the visibility of the dock changes.\r\n //\r\n // * `callback` {Function} to be called when the visibility changes.\r\n // * `visible` {Boolean} Is the dock now visible?\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidChangeVisible(callback) {\r\n }\r\n\r\n // Essential: Invoke the given callback with the current and all future visibilities of the dock.\r\n //\r\n // * `callback` {Function} to be called when the visibility changes.\r\n // * `visible` {Boolean} Is the dock now visible?\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observeVisible(callback) {\r\n callback(this.isVisible());\r\n return this.onDidChangeVisible(callback);\r\n }\r\n\r\n // Essential: Invoke the given callback with all current and future panes items\r\n // in the dock.\r\n //\r\n // * `callback` {Function} to be called with current and future pane items.\r\n // * `item` An item that is present in {::getPaneItems} at the time of\r\n // subscription or that is added at some later time.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observePaneItems(callback) {\r\n return this.paneContainer.observePaneItems(callback);\r\n }\r\n\r\n // Essential: Invoke the given callback when the active pane item changes.\r\n //\r\n // Because observers are invoked synchronously, it's important not to perform\r\n // any expensive operations via this method. Consider\r\n // {::onDidStopChangingActivePaneItem} to delay operations until after changes\r\n // stop occurring.\r\n //\r\n // * `callback` {Function} to be called when the active pane item changes.\r\n // * `item` The active pane item.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidChangeActivePaneItem(callback) {\r\n return this.paneContainer.onDidChangeActivePaneItem(callback);\r\n }\r\n\r\n // Essential: Invoke the given callback when the active pane item stops\r\n // changing.\r\n //\r\n // Observers are called asynchronously 100ms after the last active pane item\r\n // change. Handling changes here rather than in the synchronous\r\n // {::onDidChangeActivePaneItem} prevents unneeded work if the user is quickly\r\n // changing or closing tabs and ensures critical UI feedback, like changing the\r\n // highlighted tab, gets priority over work that can be done asynchronously.\r\n //\r\n // * `callback` {Function} to be called when the active pane item stopts\r\n // changing.\r\n // * `item` The active pane item.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidStopChangingActivePaneItem(callback) {\r\n return this.paneContainer.onDidStopChangingActivePaneItem(callback);\r\n }\r\n\r\n // Essential: Invoke the given callback with the current active pane item and\r\n // with all future active pane items in the dock.\r\n //\r\n // * `callback` {Function} to be called when the active pane item changes.\r\n // * `item` The current active pane item.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observeActivePaneItem(callback) {\r\n return this.paneContainer.observeActivePaneItem(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when a pane is added to the dock.\r\n //\r\n // * `callback` {Function} to be called panes are added.\r\n // * `event` {Object} with the following keys:\r\n // * `pane` The added pane.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidAddPane(callback) {\r\n return this.paneContainer.onDidAddPane(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback before a pane is destroyed in the\r\n // dock.\r\n //\r\n // * `callback` {Function} to be called before panes are destroyed.\r\n // * `event` {Object} with the following keys:\r\n // * `pane` The pane to be destroyed.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onWillDestroyPane(callback) {\r\n return this.paneContainer.onWillDestroyPane(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when a pane is destroyed in the dock.\r\n //\r\n // * `callback` {Function} to be called panes are destroyed.\r\n // * `event` {Object} with the following keys:\r\n // * `pane` The destroyed pane.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidDestroyPane(callback) {\r\n return this.paneContainer.onDidDestroyPane(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback with all current and future panes in the\r\n // dock.\r\n //\r\n // * `callback` {Function} to be called with current and future panes.\r\n // * `pane` A {Pane} that is present in {::getPanes} at the time of\r\n // subscription or that is added at some later time.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observePanes(callback) {\r\n return this.paneContainer.observePanes(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when the active pane changes.\r\n //\r\n // * `callback` {Function} to be called when the active pane changes.\r\n // * `pane` A {Pane} that is the current return value of {::getActivePane}.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidChangeActivePane(callback) {\r\n return this.paneContainer.onDidChangeActivePane(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback with the current active pane and when\r\n // the active pane changes.\r\n //\r\n // * `callback` {Function} to be called with the current and future active#\r\n // panes.\r\n // * `pane` A {Pane} that is the current return value of {::getActivePane}.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observeActivePane(callback) {\r\n return this.paneContainer.observeActivePane(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when a pane item is added to the dock.\r\n //\r\n // * `callback` {Function} to be called when pane items are added.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The added pane item.\r\n // * `pane` {Pane} containing the added item.\r\n // * `index` {Number} indicating the index of the added item in its pane.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidAddPaneItem(callback) {\r\n return this.paneContainer.onDidAddPaneItem(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when a pane item is about to be\r\n // destroyed, before the user is prompted to save it.\r\n //\r\n // * `callback` {Function} to be called before pane items are destroyed.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The item to be destroyed.\r\n // * `pane` {Pane} containing the item to be destroyed.\r\n // * `index` {Number} indicating the index of the item to be destroyed in\r\n // its pane.\r\n //\r\n // Returns a {Disposable} on which `.dispose` can be called to unsubscribe.\r\n onWillDestroyPaneItem(callback) {\r\n return this.paneContainer.onWillDestroyPaneItem(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when a pane item is destroyed.\r\n //\r\n // * `callback` {Function} to be called when pane items are destroyed.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The destroyed item.\r\n // * `pane` {Pane} containing the destroyed item.\r\n // * `index` {Number} indicating the index of the destroyed item in its\r\n // pane.\r\n //\r\n // Returns a {Disposable} on which `.dispose` can be called to unsubscribe.\r\n onDidDestroyPaneItem(callback) {\r\n return this.paneContainer.onDidDestroyPaneItem(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when the hovered state of the dock changes.\r\n //\r\n // * `callback` {Function} to be called when the hovered state changes.\r\n // * `hovered` {Boolean} Is the dock now hovered?\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidChangeHovered (callback): Disposable {\r\n return this.emitter.on('did-change-hovered', callback);\r\n }\r\n\r\n /*\r\n Section: Pane Items\r\n */\r\n\r\n // Essential: Get all pane items in the dock.\r\n //\r\n // Returns an {Array} of items.\r\n getPaneItems() {\r\n return this.paneContainer.getPaneItems();\r\n }\r\n\r\n // Essential: Get the active {Pane}'s active item.\r\n //\r\n // Returns an pane item {Object}.\r\n getActivePaneItem() {\r\n return this.paneContainer.getActivePaneItem();\r\n }\r\n\r\n // Save all pane items.\r\n saveAll() {\r\n this.paneContainer.saveAll();\r\n }\r\n\r\n confirmClose(options) {\r\n return this.paneContainer.confirmClose(options);\r\n }\r\n\r\n /*\r\n Section: Panes\r\n */\r\n\r\n // Extended: Get all panes in the dock.\r\n //\r\n // Returns an {Array} of {Pane}s.\r\n getPanes(): Pane[] {\r\n return this.paneContainer.getPanes();\r\n }\r\n\r\n // Extended: Get the active {Pane}.\r\n //\r\n // Returns a {Pane}.\r\n getActivePane() {\r\n return this.paneContainer.getActivePane();\r\n }\r\n\r\n // Extended: Make the next pane active.\r\n activateNextPane() {\r\n return this.paneContainer.activateNextPane();\r\n }\r\n\r\n // Extended: Make the previous pane active.\r\n activatePreviousPane() {\r\n return this.paneContainer.activatePreviousPane();\r\n }\r\n\r\n paneForURI(uri) {\r\n return this.paneContainer.paneForURI(uri);\r\n }\r\n\r\n paneForItem(item) {\r\n return this.paneContainer.paneForItem(item);\r\n }\r\n\r\n // Destroy (close) the active pane.\r\n destroyActivePane() {\r\n const activePane = this.getActivePane();\r\n if (activePane != null) {\r\n activePane.destroy();\r\n }\r\n }\r\n}\r\n\r\n\r\nfunction getWidthOrHeight(location) {\r\n return location === 'left' || location === 'right' ? 'width' : 'height';\r\n}\r\n\r\nfunction getPreferredSize(item, location) {\r\n switch (location) {\r\n case 'left':\r\n case 'right':\r\n return typeof item.getPreferredWidth === 'function'\r\n ? item.getPreferredWidth()\r\n : null;\r\n default:\r\n return typeof item.getPreferredHeight === 'function'\r\n ? item.getPreferredHeight()\r\n : null;\r\n }\r\n}\r\n\r\nfunction getIconName(location, visible) {\r\n switch (location) {\r\n case 'right': return visible ? 'icon-chevron-right' : 'icon-chevron-left';\r\n case 'bottom': return visible ? 'icon-chevron-down' : 'icon-chevron-up';\r\n case 'left': return visible ? 'icon-chevron-left' : 'icon-chevron-right';\r\n default: throw new Error(`Invalid location: ${location}`);\r\n }\r\n}\r\n\r\nfunction rectContainsPoint(rect, point) {\r\n return (\r\n point.x >= rect.left &&\r\n point.y >= rect.top &&\r\n point.x <= rect.right &&\r\n point.y <= rect.bottom\r\n );\r\n}\r\n\r\n// Is the item allowed in the given location?\r\nfunction isItemAllowed(item, location) {\r\n if (typeof item.getAllowedLocations !== 'function') {\r\n return true;\r\n }\r\n return item.getAllowedLocations().includes(location);\r\n}\r\n","import { CacheStoragesEnum } from '../../enums/cache.storages.enum';\r\nimport { StorageValueInterface } from '../../interfaces/storage.value.interface';\r\n\r\n/**\r\n * Abstract cache storage\r\n */\r\nexport abstract class CacheStorageAbstract {\r\n\r\n /**\r\n * Get item from storage\r\n * @param key\r\n */\r\n public abstract getItem(key: string): StorageValueInterface;\r\n\r\n /**\r\n * Set item to storage\r\n * @param key\r\n * @param value\r\n */\r\n public abstract setItem(key: string, value: StorageValueInterface): boolean;\r\n\r\n /**\r\n * Remove item from storage\r\n * @param key\r\n */\r\n public abstract removeItem(key: string): void;\r\n\r\n /**\r\n * Clear item in storage\r\n */\r\n public abstract clear(): void;\r\n\r\n /**\r\n * Get current storage type\r\n */\r\n public abstract type(): CacheStoragesEnum;\r\n\r\n /**\r\n * Check if storage is enabled\r\n */\r\n public abstract isEnabled(): boolean;\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { CacheStorageAbstract } from '../cache.storage.abstract.service';\r\nimport { CacheStoragesEnum } from '../../../enums/cache.storages.enum';\r\nimport { StorageValueInterface } from '../../../interfaces/storage.value.interface';\r\n\r\n/**\r\n * Service for storing data in session storage\r\n */\r\n@Injectable()\r\nexport class CacheSessionStorage extends CacheStorageAbstract {\r\n\r\n public getItem(key: string) {\r\n const value = sessionStorage.getItem(key);\r\n return value ? JSON.parse(value) : null;\r\n }\r\n\r\n public setItem(key: string, value: StorageValueInterface) {\r\n try {\r\n sessionStorage.setItem(key, JSON.stringify(value));\r\n return true;\r\n } catch (e) {\r\n return false;\r\n }\r\n }\r\n\r\n public removeItem(key: string) {\r\n sessionStorage.removeItem(key);\r\n }\r\n\r\n public clear() {\r\n sessionStorage.clear();\r\n }\r\n\r\n public type() {\r\n return CacheStoragesEnum.SESSION_STORAGE;\r\n }\r\n\r\n public isEnabled() {\r\n try {\r\n sessionStorage.setItem('test', 'test');\r\n sessionStorage.removeItem('test');\r\n return true;\r\n } catch (e) {\r\n return false;\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { CacheStorageAbstract } from '../cache.storage.abstract.service';\r\nimport { CacheStoragesEnum } from '../../../enums/cache.storages.enum';\r\nimport { StorageValueInterface } from '../../../interfaces/storage.value.interface';\r\n\r\n/**\r\n * Service for storing data in local storage\r\n */\r\n@Injectable()\r\nexport class CacheLocalStorage extends CacheStorageAbstract {\r\n\r\n public getItem(key: string) {\r\n const value = localStorage.getItem(key);\r\n return value ? JSON.parse(value) : null;\r\n }\r\n\r\n public setItem(key: string, value: StorageValueInterface) {\r\n try {\r\n localStorage.setItem(key, JSON.stringify(value));\r\n return true;\r\n } catch (e) {\r\n return false;\r\n }\r\n }\r\n\r\n public removeItem(key: string) {\r\n localStorage.removeItem(key);\r\n }\r\n\r\n public clear() {\r\n localStorage.clear();\r\n }\r\n\r\n public type() {\r\n return CacheStoragesEnum.LOCAL_STORAGE;\r\n }\r\n\r\n public isEnabled() {\r\n try {\r\n localStorage.setItem('test', 'test');\r\n localStorage.removeItem('test');\r\n return true;\r\n } catch (e) {\r\n return false;\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { CacheStorageAbstract } from '../cache.storage.abstract.service';\r\nimport { CacheStoragesEnum } from '../../../enums/cache.storages.enum';\r\nimport { StorageValueInterface } from '../../../interfaces/storage.value.interface';\r\n\r\n/**\r\n * Service for storing data in local storage\r\n */\r\n@Injectable()\r\nexport class CacheMemoryStorage extends CacheStorageAbstract {\r\n\r\n private _data: {[key: string]: any} = {};\r\n\r\n public getItem(key: string) {\r\n return this._data[key] ? this._data[key] : null;\r\n }\r\n\r\n public setItem(key: string, value: StorageValueInterface) {\r\n this._data[key] = value;\r\n return true;\r\n }\r\n\r\n public removeItem(key: string) {\r\n delete this._data[key];\r\n }\r\n\r\n public clear() {\r\n this._data = [];\r\n }\r\n\r\n public type() {\r\n return CacheStoragesEnum.MEMORY;\r\n }\r\n\r\n public isEnabled() {\r\n return true;\r\n }\r\n}\r\n","import { Injectable, Optional } from '@angular/core';\r\nimport { CacheOptionsInterface } from '../interfaces/cache.options.interface';\r\nimport { CacheStoragesEnum } from '../enums/cache.storages.enum';\r\nimport { CacheStorageAbstract } from './storage/cache.storage.abstract.service';\r\nimport { CacheSessionStorage } from './storage/sessionstorage/cache.sessionstorage.service';\r\nimport { CacheLocalStorage } from './storage/localstorage/cache.localstorage.service';\r\nimport { CacheMemoryStorage } from './storage/memory/cache.memory.service';\r\nimport { StorageValueInterface } from '../interfaces/storage.value.interface';\r\n\r\nconst CACHE_PREFIX = 'CacheService';\r\n\r\nconst DEFAULT_STORAGE = CacheStoragesEnum.MEMORY;\r\nconst DEFAULT_ENABLED_STORAGE = CacheStoragesEnum.SESSION_STORAGE;\r\n\r\n@Injectable()\r\nexport class CacheService {\r\n\r\n /**\r\n * Default cache options\r\n */\r\n private _defaultOptions: CacheOptionsInterface = {\r\n expires: Number.MAX_VALUE,\r\n maxAge : Number.MAX_VALUE\r\n };\r\n\r\n /**\r\n * Cache prefix\r\n */\r\n private _prefix: string = CACHE_PREFIX;\r\n\r\n public constructor(@Optional() private _storage: CacheStorageAbstract) {\r\n this._validateStorage();\r\n }\r\n\r\n /**\r\n * Set data to cache\r\n * @param key key\r\n * @param value value\r\n * @param options options\r\n */\r\n public set(key: string, value: any, options?: CacheOptionsInterface) {\r\n const storageKey = this._toStorageKey(key);\r\n options = options ? options : this._defaultOptions;\r\n if (this._storage.setItem(storageKey, this._toStorageValue(value, options))) {\r\n if (!this._isSystemKey(key) && options.tag) {\r\n this._saveTag(options.tag, storageKey);\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n\r\n /**\r\n * Get data from cache\r\n * @param key key\r\n * @returns result\r\n */\r\n public get(key: string): any {\r\n const storageValue = this._storage.getItem(this._toStorageKey(key));\r\n let value: any = null;\r\n if (storageValue) {\r\n if (this._validateStorageValue(storageValue)) {\r\n value = storageValue.value;\r\n } else {\r\n this.remove(key);\r\n }\r\n }\r\n return value;\r\n }\r\n\r\n /**\r\n * Check if value exists\r\n * @param key key\r\n * @returns result\r\n */\r\n public exists(key: string): boolean {\r\n return !!this.get(key);\r\n }\r\n\r\n /**\r\n * Remove item from cache\r\n * @param key key\r\n */\r\n public remove(key: string) {\r\n this._storage.removeItem(this._toStorageKey(key));\r\n this._removeFromTag(this._toStorageKey(key));\r\n }\r\n\r\n /**\r\n * Remove all from cache\r\n */\r\n public removeAll() {\r\n this._storage.clear();\r\n }\r\n\r\n /**\r\n * Get all tag data\r\n * @param tag tag\r\n * @returns result\r\n */\r\n public getTagData(tag: string) {\r\n const tags = this.get(this._tagsStorageKey()) || {};\r\n const result: {[key: string]: any} = {};\r\n if (tags[tag]) {\r\n tags[tag].forEach((key: string) => {\r\n const data = this.get(this._fromStorageKey(key));\r\n if (data) {\r\n result[this._fromStorageKey(key)] = data;\r\n }\r\n });\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Create a new instance of cache with needed storage\r\n * @param type type\r\n * @returns result\r\n */\r\n public useStorage(type: CacheStoragesEnum) {\r\n const service = new CacheService(this._initStorage(type));\r\n service.setGlobalPrefix(this._getCachePrefix());\r\n return service;\r\n }\r\n\r\n /**\r\n * Remove all by tag\r\n * @param tag tag\r\n */\r\n public removeTag(tag: string) {\r\n const tags = this.get(this._tagsStorageKey()) || {};\r\n if (tags[tag]) {\r\n tags[tag].forEach((key: string) => {\r\n this._storage.removeItem(key);\r\n });\r\n delete tags[tag];\r\n this.set(this._tagsStorageKey(), tags);\r\n }\r\n }\r\n\r\n /**\r\n * Set global cache key prefix\r\n * @param prefix prefix\r\n */\r\n public setGlobalPrefix(prefix: string) {\r\n this._prefix = prefix;\r\n }\r\n\r\n /**\r\n * Validate cache storage\r\n */\r\n private _validateStorage() {\r\n if (!this._storage) {\r\n this._storage = this._initStorage(DEFAULT_STORAGE);\r\n }\r\n if (!this._storage.isEnabled()) {\r\n this._storage = this._initStorage(DEFAULT_ENABLED_STORAGE);\r\n }\r\n }\r\n\r\n /**\r\n * Remove key from tags keys list\r\n * @param key key\r\n */\r\n private _removeFromTag(key: string) {\r\n // tslint:disable-next-line:prefer-const\r\n let tags = this.get(this._tagsStorageKey()) || {};\r\n let index: number;\r\n // tslint:disable-next-line:forin\r\n for (const tag in tags) {\r\n index = tags[tag].indexOf(key);\r\n if (index !== -1) {\r\n tags[tag].splice(index, 1);\r\n this.set(this._tagsStorageKey(), tags);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Init storage by type\r\n * @param type type\r\n */\r\n private _initStorage(type: CacheStoragesEnum) {\r\n let storage: CacheStorageAbstract;\r\n switch (type) {\r\n case CacheStoragesEnum.SESSION_STORAGE:\r\n storage = new CacheSessionStorage();\r\n break;\r\n case CacheStoragesEnum.LOCAL_STORAGE:\r\n storage = new CacheLocalStorage();\r\n break;\r\n default: storage = new CacheMemoryStorage();\r\n }\r\n return storage;\r\n }\r\n\r\n private _toStorageKey(key: string) {\r\n return this._getCachePrefix() + key;\r\n }\r\n\r\n private _fromStorageKey(key: string) {\r\n return key.replace(this._getCachePrefix(), '');\r\n }\r\n\r\n /**\r\n * Prepare value to set to storage\r\n * @param value value\r\n * @param options options\r\n * @returns result\r\n */\r\n private _toStorageValue(value: any, options: CacheOptionsInterface): StorageValueInterface {\r\n return {\r\n value,\r\n options: this._toStorageOptions(options)\r\n };\r\n }\r\n\r\n /**\r\n * Prepare options to set to storage\r\n * @param options options\r\n * @returns result\r\n */\r\n private _toStorageOptions(options: CacheOptionsInterface): CacheOptionsInterface {\r\n const storageOptions: CacheOptionsInterface = {};\r\n storageOptions.expires = options.expires ? options.expires :\r\n (options.maxAge ? Date.now() + (options.maxAge * 1000) : this._defaultOptions.expires);\r\n storageOptions.maxAge = options.maxAge ? options.maxAge : this._defaultOptions.maxAge;\r\n return storageOptions;\r\n }\r\n\r\n /**\r\n * Validate storage value\r\n * @param value value\r\n * @returns result\r\n */\r\n private _validateStorageValue(value: StorageValueInterface) {\r\n return !!value.options.expires && value.options.expires > Date.now();\r\n }\r\n\r\n /**\r\n * check if its system cache key\r\n * @param key key\r\n * @returns result\r\n */\r\n private _isSystemKey(key: string) {\r\n return [this._tagsStorageKey()].indexOf(key) !== -1;\r\n }\r\n\r\n /**\r\n * Save tag to list of tags\r\n * @param tag tag\r\n * @param key key\r\n */\r\n private _saveTag(tag: string, key: string) {\r\n const tags = this.get(this._tagsStorageKey()) || {};\r\n if (!tags[tag]) {\r\n tags[tag] = [key];\r\n } else {\r\n tags[tag].push(key);\r\n }\r\n this.set(this._tagsStorageKey(), tags);\r\n }\r\n\r\n /**\r\n * Get global cache prefix\r\n * @returns result\r\n */\r\n private _getCachePrefix() {\r\n return this._prefix;\r\n }\r\n\r\n private _tagsStorageKey() {\r\n return 'CacheService_tags';\r\n }\r\n\r\n}\r\n","// tslint:disable: forin\r\nimport { Emitter, Disposable, CompositeDisposable } from './event-kit';\r\n// import { calculateSpecificity, validateSelector } from 'clear-cut';\r\n// const _ = require('underscore-plus')\r\n\r\nlet SequenceCount = 0;\r\n\r\n// Public: Associates listener functions with commands in a\r\n// context-sensitive way using CSS selectors. You can access a global instance of\r\n// this class via `atom.commands`, and commands registered there will be\r\n// presented in the command palette.\r\n//\r\n// The global command registry facilitates a style of event handling known as\r\n// *event delegation* that was popularized by jQuery. Atom commands are expressed\r\n// as custom DOM events that can be invoked on the currently focused element via\r\n// a key binding or manually via the command palette. Rather than binding\r\n// listeners for command events directly to DOM nodes, you instead register\r\n// command event listeners globally on `atom.commands` and constrain them to\r\n// specific kinds of elements with CSS selectors.\r\n//\r\n// Command names must follow the `namespace:action` pattern, where `namespace`\r\n// will typically be the name of your package, and `action` describes the\r\n// behavior of your command. If either part consists of multiple words, these\r\n// must be separated by hyphens. E.g. `awesome-package:turn-it-up-to-eleven`.\r\n// All words should be lowercased.\r\n//\r\n// As the event bubbles upward through the DOM, all registered event listeners\r\n// with matching selectors are invoked in order of specificity. In the event of a\r\n// specificity tie, the most recently registered listener is invoked first. This\r\n// mirrors the \"cascade\" semantics of CSS. Event listeners are invoked in the\r\n// context of the current DOM node, meaning `this` always points at\r\n// `event.currentTarget`. As is normally the case with DOM events,\r\n// `stopPropagation` and `stopImmediatePropagation` can be used to terminate the\r\n// bubbling process and prevent invocation of additional listeners.\r\n//\r\n// ## Example\r\n//\r\n// Here is a command that inserts the current date in an editor:\r\n//\r\n// ```coffee\r\n// atom.commands.add 'atom-text-editor',\r\n// 'user:insert-date': (event) ->\r\n// editor = @getModel()\r\n// editor.insertText(new Date().toLocaleString())\r\n// ```\r\nexport class CommandRegistry {\r\n private rootNode: any;\r\n private registeredCommands: any;\r\n private selectorBasedListenersByCommandName: any;\r\n private inlineListenersByCommandName: any;\r\n private emitter: Emitter;\r\n\r\n constructor() {\r\n this.handleCommandEvent = this.handleCommandEvent.bind(this);\r\n this.rootNode = null;\r\n this.clear();\r\n }\r\n\r\n clear() {\r\n this.registeredCommands = {};\r\n this.selectorBasedListenersByCommandName = {};\r\n this.inlineListenersByCommandName = {};\r\n this.emitter = new Emitter();\r\n }\r\n\r\n attach(rootNode) {\r\n this.rootNode = rootNode;\r\n for (const command in this.selectorBasedListenersByCommandName) {\r\n this.commandRegistered(command);\r\n }\r\n\r\n for (const command in this.inlineListenersByCommandName) {\r\n this.commandRegistered(command);\r\n }\r\n }\r\n\r\n destroy() {\r\n for (const commandName in this.registeredCommands) {\r\n this.rootNode.removeEventListener(\r\n commandName,\r\n this.handleCommandEvent,\r\n true\r\n );\r\n }\r\n }\r\n\r\n // Public: Add one or more command listeners associated with a selector.\r\n //\r\n // ## Arguments: Registering One Command\r\n //\r\n // * `target` A {String} containing a CSS selector or a DOM element. If you\r\n // pass a selector, the command will be globally associated with all matching\r\n // elements. The `,` combinator is not currently supported. If you pass a\r\n // DOM element, the command will be associated with just that element.\r\n // * `commandName` A {String} containing the name of a command you want to\r\n // handle such as `user:insert-date`.\r\n // * `listener` A listener which handles the event. Either a {Function} to\r\n // call when the given command is invoked on an element matching the\r\n // selector, or an {Object} with a `didDispatch` property which is such a\r\n // function.\r\n //\r\n // The function (`listener` itself if it is a function, or the `didDispatch`\r\n // method if `listener` is an object) will be called with `this` referencing\r\n // the matching DOM node and the following argument:\r\n // * `event`: A standard DOM event instance. Call `stopPropagation` or\r\n // `stopImmediatePropagation` to terminate bubbling early.\r\n //\r\n // Additionally, `listener` may have additional properties which are returned\r\n // to those who query using `atom.commands.findCommands`, as well as several\r\n // meaningful metadata properties:\r\n // * `displayName`: Overrides any generated `displayName` that would\r\n // otherwise be generated from the event name.\r\n // * `description`: Used by consumers to display detailed information about\r\n // the command.\r\n // * `hiddenInCommandPalette`: If `true`, this command will not appear in\r\n // the bundled command palette by default, but can still be shown with.\r\n // the `Command Palette: Show Hidden Commands` command. This is a good\r\n // option when you need to register large numbers of commands that don't\r\n // make sense to be executed from the command palette. Please use this\r\n // option conservatively, as it could reduce the discoverability of your\r\n // package's commands.\r\n //\r\n // ## Arguments: Registering Multiple Commands\r\n //\r\n // * `target` A {String} containing a CSS selector or a DOM element. If you\r\n // pass a selector, the commands will be globally associated with all\r\n // matching elements. The `,` combinator is not currently supported.\r\n // If you pass a DOM element, the command will be associated with just that\r\n // element.\r\n // * `commands` An {Object} mapping command names like `user:insert-date` to\r\n // listener {Function}s.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to remove the\r\n // added command handler(s).\r\n add(target, commandName, listener, throwOnInvalidSelector = true) {\r\n if (typeof commandName === 'object') {\r\n const commands = commandName;\r\n throwOnInvalidSelector = listener;\r\n const disposable = new CompositeDisposable();\r\n for (commandName in commands) {\r\n listener = commands[commandName];\r\n disposable.add(this.add(target, commandName, listener, throwOnInvalidSelector));\r\n }\r\n return disposable;\r\n }\r\n\r\n if (listener == null) {\r\n throw new Error('Cannot register a command with a null listener.');\r\n }\r\n\r\n // type Listener = ((e: CustomEvent) => void) | {\r\n // displayName?: string,\r\n // description?: string,\r\n // didDispatch(e: CustomEvent): void,\r\n // }\r\n if ((typeof listener !== 'function') && (typeof listener.didDispatch !== 'function')) {\r\n throw new Error('Listener must be a callback function or an object with a didDispatch method.');\r\n }\r\n\r\n if (typeof target === 'string') {\r\n if (throwOnInvalidSelector) {\r\n validateSelector(target);\r\n }\r\n return this.addSelectorBasedListener(target, commandName, listener);\r\n } else {\r\n return this.addInlineListener(target, commandName, listener);\r\n }\r\n }\r\n\r\n addSelectorBasedListener(selector, commandName, listener) {\r\n if (this.selectorBasedListenersByCommandName[commandName] == null) {\r\n this.selectorBasedListenersByCommandName[commandName] = [];\r\n }\r\n const listenersForCommand = this.selectorBasedListenersByCommandName[commandName];\r\n const selectorListener = new SelectorBasedListener(selector, commandName, listener);\r\n listenersForCommand.push(selectorListener);\r\n\r\n this.commandRegistered(commandName);\r\n\r\n return new Disposable(() => {\r\n listenersForCommand.splice(listenersForCommand.indexOf(selectorListener), 1);\r\n if (listenersForCommand.length === 0) {\r\n delete this.selectorBasedListenersByCommandName[commandName];\r\n }\r\n });\r\n }\r\n\r\n addInlineListener(element, commandName, listener) {\r\n if (this.inlineListenersByCommandName[commandName] == null) {\r\n this.inlineListenersByCommandName[commandName] = new WeakMap();\r\n }\r\n\r\n const listenersForCommand = this.inlineListenersByCommandName[commandName];\r\n let listenersForElement = listenersForCommand.get(element);\r\n if (!listenersForElement) {\r\n listenersForElement = [];\r\n listenersForCommand.set(element, listenersForElement);\r\n }\r\n const inlineListener = new InlineListener(commandName, listener);\r\n listenersForElement.push(inlineListener);\r\n\r\n this.commandRegistered(commandName);\r\n\r\n return new Disposable(() => {\r\n listenersForElement.splice(listenersForElement.indexOf(inlineListener), 1);\r\n if (listenersForElement.length === 0) {\r\n listenersForCommand.delete(element);\r\n }\r\n });\r\n }\r\n\r\n // Public: Find all registered commands matching a query.\r\n //\r\n // * `params` An {Object} containing one or more of the following keys:\r\n // * `target` A DOM node that is the hypothetical target of a given command.\r\n //\r\n // Returns an {Array} of `CommandDescriptor` {Object}s containing the following keys:\r\n // * `name` The name of the command. For example, `user:insert-date`.\r\n // * `displayName` The display name of the command. For example,\r\n // `User: Insert Date`.\r\n // Additional metadata may also be present in the returned descriptor:\r\n // * `description` a {String} describing the function of the command in more\r\n // detail than the title\r\n // * `tags` an {Array} of {String}s that describe keywords related to the\r\n // command\r\n // Any additional nonstandard metadata provided when the command was `add`ed\r\n // may also be present in the returned descriptor.\r\n findCommands({ target }) {\r\n const commandNames = new Set();\r\n const commands = [];\r\n let currentTarget = target;\r\n while (true) {\r\n let listeners;\r\n for (const name in this.inlineListenersByCommandName) {\r\n listeners = this.inlineListenersByCommandName[name];\r\n if (listeners.has(currentTarget) && !commandNames.has(name)) {\r\n commandNames.add(name);\r\n const targetListeners = listeners.get(currentTarget);\r\n commands.push(\r\n ...targetListeners.map(listener => listener.descriptor)\r\n );\r\n }\r\n }\r\n\r\n for (const commandName in this.selectorBasedListenersByCommandName) {\r\n listeners = this.selectorBasedListenersByCommandName[commandName];\r\n for (const listener of listeners) {\r\n if (listener.matchesTarget(currentTarget)) {\r\n if (!commandNames.has(commandName)) {\r\n commandNames.add(commandName);\r\n commands.push(listener.descriptor);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (currentTarget === window) {\r\n break;\r\n }\r\n currentTarget = currentTarget.parentNode || window;\r\n }\r\n\r\n return commands;\r\n }\r\n\r\n // Public: Simulate the dispatch of a command on a DOM node.\r\n //\r\n // This can be useful for testing when you want to simulate the invocation of a\r\n // command on a detached DOM node. Otherwise, the DOM node in question needs to\r\n // be attached to the document so the event bubbles up to the root node to be\r\n // processed.\r\n //\r\n // * `target` The DOM node at which to start bubbling the command event.\r\n // * `commandName` {String} indicating the name of the command to dispatch.\r\n dispatch(target, commandName, detail) {\r\n const event = new CustomEvent(commandName, { bubbles: true, detail });\r\n Object.defineProperty(event, 'target', { value: target });\r\n return this.handleCommandEvent(event);\r\n }\r\n\r\n // Public: Invoke the given callback before dispatching a command event.\r\n //\r\n // * `callback` {Function} to be called before dispatching each command\r\n // * `event` The Event that will be dispatched\r\n onWillDispatch(callback) {\r\n return this.emitter.on('will-dispatch', callback);\r\n }\r\n\r\n // Public: Invoke the given callback after dispatching a command event.\r\n //\r\n // * `callback` {Function} to be called after dispatching each command\r\n // * `event` The Event that was dispatched\r\n onDidDispatch(callback) {\r\n return this.emitter.on('did-dispatch', callback);\r\n }\r\n\r\n getSnapshot() {\r\n const snapshot = {};\r\n for (const commandName in this.selectorBasedListenersByCommandName) {\r\n const listeners = this.selectorBasedListenersByCommandName[commandName];\r\n snapshot[commandName] = listeners.slice();\r\n }\r\n return snapshot;\r\n }\r\n\r\n restoreSnapshot(snapshot) {\r\n this.selectorBasedListenersByCommandName = {};\r\n for (const commandName in snapshot) {\r\n const listeners = snapshot[commandName];\r\n this.selectorBasedListenersByCommandName[commandName] = listeners.slice();\r\n }\r\n }\r\n\r\n handleCommandEvent(event) {\r\n let propagationStopped = false;\r\n let immediatePropagationStopped = false;\r\n const matched = [];\r\n let currentTarget = event.target;\r\n\r\n const dispatchedEvent = new CustomEvent(event.type, {\r\n bubbles: true,\r\n detail: event.detail\r\n });\r\n Object.defineProperty(dispatchedEvent, 'eventPhase', {\r\n value: Event.BUBBLING_PHASE\r\n });\r\n Object.defineProperty(dispatchedEvent, 'currentTarget', {\r\n get() {\r\n return currentTarget;\r\n }\r\n });\r\n Object.defineProperty(dispatchedEvent, 'target', { value: currentTarget });\r\n Object.defineProperty(dispatchedEvent, 'preventDefault', {\r\n value() {\r\n return event.preventDefault();\r\n }\r\n });\r\n Object.defineProperty(dispatchedEvent, 'stopPropagation', {\r\n value() {\r\n event.stopPropagation();\r\n propagationStopped = true;\r\n }\r\n });\r\n Object.defineProperty(dispatchedEvent, 'stopImmediatePropagation', {\r\n value() {\r\n event.stopImmediatePropagation();\r\n propagationStopped = true;\r\n immediatePropagationStopped = true;\r\n }\r\n });\r\n Object.defineProperty(dispatchedEvent, 'abortKeyBinding', {\r\n value() {\r\n if (typeof event.abortKeyBinding === 'function') {\r\n event.abortKeyBinding();\r\n }\r\n }\r\n });\r\n\r\n for (const key of Object.keys(event)) {\r\n if (!(key in dispatchedEvent)) {\r\n dispatchedEvent[key] = event[key];\r\n }\r\n }\r\n\r\n this.emitter.emit('will-dispatch', dispatchedEvent);\r\n\r\n while (true) {\r\n const commandInlineListeners =\r\n this.inlineListenersByCommandName[event.type]\r\n ? this.inlineListenersByCommandName[event.type].get(currentTarget)\r\n : null;\r\n let listeners = commandInlineListeners || [];\r\n if (currentTarget.webkitMatchesSelector != null) {\r\n const selectorBasedListeners =\r\n (this.selectorBasedListenersByCommandName[event.type] || [])\r\n .filter(listener => listener.matchesTarget(currentTarget))\r\n .sort((a, b) => a.compare(b));\r\n listeners = selectorBasedListeners.concat(listeners);\r\n }\r\n\r\n // Call inline listeners first in reverse registration order,\r\n // and selector-based listeners by specificity and reverse\r\n // registration order.\r\n for (let i = listeners.length - 1; i >= 0; i--) {\r\n const listener = listeners[i];\r\n if (immediatePropagationStopped) {\r\n break;\r\n }\r\n matched.push(listener.didDispatch.call(currentTarget, dispatchedEvent));\r\n }\r\n\r\n if (currentTarget === window) {\r\n break;\r\n }\r\n if (propagationStopped) {\r\n break;\r\n }\r\n currentTarget = currentTarget.parentNode || window;\r\n }\r\n\r\n this.emitter.emit('did-dispatch', dispatchedEvent);\r\n\r\n return (matched.length > 0 ? Promise.all(matched) : null);\r\n }\r\n\r\n commandRegistered(commandName) {\r\n if (this.rootNode != null && !this.registeredCommands[commandName]) {\r\n this.rootNode.addEventListener(commandName, this.handleCommandEvent, true);\r\n return (this.registeredCommands[commandName] = true);\r\n }\r\n }\r\n}\r\n\r\n// type Listener = {\r\n// descriptor: CommandDescriptor,\r\n// extractDidDispatch: (e: CustomEvent) => void,\r\n// };\r\nclass SelectorBasedListener {\r\n private selector: string;\r\n private didDispatch: any;\r\n private descriptor: any;\r\n private specificity: number;\r\n private sequenceNumber: number;\r\n\r\n constructor(selector, commandName, listener) {\r\n this.selector = selector;\r\n this.didDispatch = extractDidDispatch(listener);\r\n this.descriptor = extractDescriptor(commandName, listener);\r\n this.specificity = calculateSpecificity(this.selector);\r\n this.sequenceNumber = SequenceCount++;\r\n }\r\n\r\n compare(other) {\r\n return (\r\n this.specificity - other.specificity ||\r\n this.sequenceNumber - other.sequenceNumber\r\n );\r\n }\r\n\r\n matchesTarget(target) {\r\n return target.webkitMatchesSelector && target.webkitMatchesSelector(this.selector);\r\n }\r\n}\r\n\r\nclass InlineListener {\r\n private didDispatch: any;\r\n private descriptor: any;\r\n constructor(commandName, listener) {\r\n this.didDispatch = extractDidDispatch(listener);\r\n this.descriptor = extractDescriptor(commandName, listener);\r\n }\r\n}\r\n\r\n// type CommandDescriptor = {\r\n// name: string,\r\n// displayName: string,\r\n// };\r\nfunction extractDescriptor(name, listener) {\r\n return Object.assign(\r\n omit(listener, 'didDispatch'),\r\n {\r\n name,\r\n displayName: listener.displayName ? listener.displayName : humanizeEventName(name)\r\n }\r\n );\r\n}\r\n\r\nfunction extractDidDispatch(listener) {\r\n return typeof listener === 'function' ? listener : listener.didDispatch;\r\n}\r\n\r\nfunction validateSelector(selector: string) {\r\n if (!isSelectorValid(selector)) {\r\n const error = new SyntaxError(selector + ' is not a valid selector');\r\n // error.code = 'EBADSELECTOR';\r\n throw error;\r\n }\r\n}\r\n\r\nfunction isSelectorValid(selector: string) {\r\n let valid: boolean;\r\n\r\n try {\r\n document.querySelector(selector);\r\n valid = true;\r\n } catch (error) {\r\n valid = false;\r\n }\r\n\r\n return valid;\r\n}\r\n\r\nfunction calculateSpecificity(selector: string) {\r\n const specificity = calculate(selector);\r\n return specificity;\r\n}\r\nfunction calculate(selector: string) {\r\n const commaIndex = selector.indexOf(',');\r\n if (commaIndex !== -1) {\r\n selector = selector.substring(0, commaIndex);\r\n }\r\n\r\n const types = {\r\n a: 0,\r\n b: 0,\r\n c: 0\r\n };\r\n\r\n // The following regular expressions assume that selectors matching the preceding regular expressions have been removed\r\n const attributeRegex = /(\\[[^\\]]+\\])/g;\r\n const idRegex = /(#[^\\s\\+>~\\.\\[:]+)/g;\r\n const classRegex = /(\\.[^\\s\\+>~\\.\\[:]+)/g;\r\n const pseudoElementRegex = /(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/g;\r\n const pseudoClassRegex = /(:[^\\s\\+>~\\.\\[:]+)/g;\r\n const elementRegex = /([^\\s\\+>~\\.\\[:]+)/g;\r\n const notRegex = /:not\\(([^\\)]*)\\)/g;\r\n const ruleRegex = /\\{[^]*/gm;\r\n const separatorRegex = /[\\*\\s\\+>~]/g;\r\n const straysRegex = /[#\\.]/g;\r\n\r\n // Remove the negation psuedo-class (:not) but leave its argument because specificity is calculated on its argument\r\n selector = selector.replace(notRegex, ' $1 ');\r\n\r\n // Remove anything after a left brace in case a user has pasted in a rule, not just a selector\r\n selector = selector.replace(ruleRegex, ' ');\r\n\r\n // Add attribute selectors to parts collection (type b)\r\n selector = findMatch(attributeRegex, 'b', types, selector);\r\n\r\n // Add ID selectors to parts collection (type a)\r\n selector = findMatch(idRegex, 'a', types, selector);\r\n\r\n // Add class selectors to parts collection (type b)\r\n selector = findMatch(classRegex, 'b', types, selector);\r\n\r\n // Add pseudo-element selectors to parts collection (type c)\r\n selector = findMatch(pseudoElementRegex, 'c', types, selector);\r\n\r\n // Add pseudo-class selectors to parts collection (type b)\r\n selector = findMatch(pseudoClassRegex, 'b', types, selector);\r\n\r\n // Remove universal selector and separator characters\r\n selector = selector.replace(separatorRegex, ' ');\r\n\r\n // Remove any stray dots or hashes which aren't attached to words\r\n // These may be present if the user is live-editing this selector\r\n selector = selector.replace(straysRegex, ' ');\r\n\r\n // The only things left should be element selectors (type c)\r\n findMatch(elementRegex, 'c', types, selector);\r\n\r\n return (types.a * 100) + (types.b * 10) + (types.c * 1);\r\n}\r\n\r\nfunction findMatch(regex, type, types, selector) {\r\n const matches = selector.match(regex);\r\n if (matches) {\r\n for (const match of matches) {\r\n types[type]++;\r\n // Replace this simple selector with whitespace so it won't be counted in further simple selectors\r\n selector = selector.replace(match, ' ');\r\n }\r\n }\r\n\r\n return selector;\r\n}\r\n\r\nfunction omit(obj: any, ...props: string[]) {\r\n // const iteratee = (value, key) => !props.find(key);\r\n\r\n const result = {};\r\n if (!obj) {\r\n return result;\r\n }\r\n Object.keys(obj).forEach(key => {\r\n if (!props.find(prop => prop === key)) {\r\n return;\r\n }\r\n result[key] = obj[key];\r\n });\r\n return result;\r\n}\r\n\r\nfunction humanizeEventName(eventName, eventDoc = null) {\r\n const ref = eventName.split(':');\r\n const [namespace, event] = ref;\r\n if (event == null) {\r\n return undash(namespace);\r\n }\r\n const namespaceDoc = undash(namespace);\r\n if (eventDoc == null) {\r\n eventDoc = undash(event);\r\n }\r\n return '' + namespaceDoc + ': ' + eventDoc;\r\n}\r\n\r\nfunction undash(str) {\r\n if (str) {\r\n return str.split('-').join(' ');\r\n } else {\r\n return '';\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\n\r\n@Injectable()\r\nexport class Util {\r\n newGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n // tslint:disable: no-bitwise\r\n const r = Math.random() * 16 | 0;\r\n const v = c === 'x' ? r : (r & 0x3 | 0x8);\r\n return v.toString(16);\r\n });\r\n }\r\n\r\n /**\r\n * åurlæ·»å QueryParam\r\n * @param url åå§url\r\n * @param paramName åæ°å\r\n * @param paramValue åæ°å¼\r\n * @param override æ¯å¦è¦çã为Trueæ¶ï¼å¦æåæ°å·²åå¨ï¼å°è¦çå·²æåæ°ï¼å¦åæ¾å¼å¤çãé»è®¤ä¸ºFalseã\r\n */\r\n setUrlParam(url: string, paramName: string, paramValue: string, override?: boolean) {\r\n const [path, search] = url.split('?');\r\n const params = new URLSearchParams(search);\r\n if (params.has(paramName) && !override) {\r\n return url;\r\n }\r\n\r\n params.set(paramName, paramValue);\r\n return path + '?' + params.toString();\r\n }\r\n}\r\n","import { Disposable } from './event-kit';\r\nimport { ComponentRef } from '@angular/core';\r\n\r\n// Essential: `ViewRegistry` handles the association between model and view\r\n// types in Atom. We call this association a View Provider. As in, for a given\r\n// model, this class can provide a view via {::getView}, as long as the\r\n// model/view association was registered via {::addViewProvider}\r\n//\r\n// If you're adding your own kind of pane item, a good strategy for all but the\r\n// simplest items is to separate the model and the view. The model handles\r\n// application logic and is the primary point of API interaction. The view\r\n// just handles presentation.\r\n//\r\n// Note: Models can be any object, but must implement a `getTitle()` function\r\n// if they are to be displayed in a {Pane}\r\n//\r\n// View providers inform the workspace how your model objects should be\r\n// presented in the DOM. A view provider must always return a DOM node, which\r\n// makes [HTML 5 custom elements](http://www.html5rocks.com/en/tutorials/webcomponents/customelements/)\r\n// an ideal tool for implementing views in Atom.\r\n//\r\n// You can access the `ViewRegistry` object via `atom.views`.\r\nexport class ViewRegistry {\r\n // private animationFrameRequest: any;\r\n // private documentReadInProgress: boolean;\r\n private gspEnvironment: any;\r\n private views: WeakMap<object, ComponentRef<any>>;\r\n private providers: any[];\r\n // private documentWriters: any;\r\n // private documentReaders: any;\r\n // private nextUpdatePromise: any;\r\n // private resolveNextUpdatePromise: (value?: {} | PromiseLike<{}>) => void;\r\n constructor (gspEnvironment) {\r\n // this.animationFrameRequest = null\r\n // this.documentReadInProgress = false\r\n // this.performDocumentUpdate = this.performDocumentUpdate.bind(this);\r\n this.gspEnvironment = gspEnvironment;\r\n this.clear();\r\n }\r\n\r\n clear () {\r\n this.views = new WeakMap();\r\n this.providers = [];\r\n this.clearDocumentRequests();\r\n }\r\n\r\n // Essential: Add a provider that will be used to construct views in the\r\n // workspace's view layer based on model objects in its model layer.\r\n //\r\n // ## Examples\r\n //\r\n // Text editors are divided into a model and a view layer, so when you interact\r\n // with methods like `atom.workspace.getActiveTextEditor()` you're only going\r\n // to get the model object. We display text editors on screen by teaching the\r\n // workspace what view constructor it should use to represent them:\r\n //\r\n // ```coffee\r\n // atom.views.addViewProvider TextEditor, (textEditor) ->\r\n // textEditorElement = new TextEditorElement\r\n // textEditorElement.initialize(textEditor)\r\n // textEditorElement\r\n // ```\r\n //\r\n // * `modelConstructor` (optional) Constructor {Function} for your model. If\r\n // a constructor is given, the `createView` function will only be used\r\n // for model objects inheriting from that constructor. Otherwise, it will\r\n // will be called for any object.\r\n // * `createView` Factory {Function} that is passed an instance of your model\r\n // and must return a subclass of `HTMLElement` or `undefined`. If it returns\r\n // `undefined`, then the registry will continue to search for other view\r\n // providers.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to remove the\r\n // added provider.\r\n addViewProvider (modelConstructor, createView) {\r\n let provider;\r\n if (arguments.length === 1) {\r\n switch (typeof modelConstructor) {\r\n case 'function':\r\n provider = {createView: modelConstructor, modelConstructor: null};\r\n break;\r\n case 'object':\r\n provider = modelConstructor;\r\n break;\r\n default:\r\n throw new TypeError('Arguments to addViewProvider must be functions');\r\n }\r\n } else {\r\n provider = {modelConstructor, createView};\r\n }\r\n\r\n this.providers.push(provider);\r\n return new Disposable(() => {\r\n this.providers = this.providers.filter(p => p !== provider);\r\n });\r\n }\r\n\r\n getViewProviderCount () {\r\n return this.providers.length;\r\n }\r\n\r\n // Essential: Get the view associated with an object in the workspace.\r\n //\r\n // If you're just *using* the workspace, you shouldn't need to access the view\r\n // layer, but view layer access may be necessary if you want to perform DOM\r\n // manipulation that isn't supported via the model API.\r\n //\r\n // ## View Resolution Algorithm\r\n //\r\n // The view associated with the object is resolved using the following\r\n // sequence\r\n //\r\n // 1. Is the object an instance of `HTMLElement`? If true, return the object.\r\n // 2. Does the object have a method named `getElement` that returns an\r\n // instance of `HTMLElement`? If true, return that value.\r\n // 3. Does the object have a property named `element` with a value which is\r\n // an instance of `HTMLElement`? If true, return the property value.\r\n // 4. Is the object a jQuery object, indicated by the presence of a `jquery`\r\n // property? If true, return the root DOM element (i.e. `object[0]`).\r\n // 5. Has a view provider been registered for the object? If true, use the\r\n // provider to create a view associated with the object, and return the\r\n // view.\r\n //\r\n // If no associated view is returned by the sequence an error is thrown.\r\n //\r\n // Returns a DOM element.\r\n getView (object): ComponentRef<any> {\r\n if (object == null) { return; }\r\n\r\n let view = this.views.get(object);\r\n if (!view) {\r\n view = this.createView(object);\r\n this.views.set(object, view);\r\n }\r\n return view;\r\n }\r\n\r\n createView (object): ComponentRef<any> {\r\n if (object instanceof ComponentRef) { return object; }\r\n\r\n let element;\r\n if (object && (typeof object.getElement === 'function')) {\r\n element = object.getElement();\r\n if (element instanceof ComponentRef) {\r\n return element;\r\n }\r\n }\r\n\r\n if (object && object.element instanceof ComponentRef) {\r\n return object.element;\r\n }\r\n\r\n // if (object && object.jquery) {\r\n // return object[0];\r\n // }\r\n\r\n for (const provider of this.providers) {\r\n if (provider.modelConstructor === null) {\r\n element = provider.createView(object, this.gspEnvironment);\r\n if (element) { return element; }\r\n continue;\r\n }\r\n\r\n if (object instanceof provider.modelConstructor) {\r\n element = provider.createView && provider.createView(object, this.gspEnvironment);\r\n if (element) { return element; }\r\n\r\n const ViewConstructor = provider.viewConstructor;\r\n if (ViewConstructor) {\r\n element = new ViewConstructor();\r\n if (element.initialize) {\r\n element.initialize(object);\r\n } else if (element.setModel) {\r\n element.setModel(object);\r\n }\r\n return element;\r\n }\r\n }\r\n }\r\n\r\n if (object && object.getViewClass) {\r\n const ViewConstructor = object.getViewClass();\r\n if (ViewConstructor) {\r\n const view = new ViewConstructor(object);\r\n return view;\r\n }\r\n }\r\n\r\n throw new Error(`Can't create a view for ${object.constructor.name} instance. Please register a view provider.`);\r\n }\r\n\r\n updateDocument (fn) {\r\n // this.documentWriters.push(fn)\r\n // if (!this.documentReadInProgress) { this.requestDocumentUpdate() }\r\n // return new Disposable(() => {\r\n // this.documentWriters = this.documentWriters.filter(writer => writer !== fn)\r\n // })\r\n }\r\n\r\n readDocument (fn) {\r\n // this.documentReaders.push(fn)\r\n // this.requestDocumentUpdate()\r\n // return new Disposable(() => {\r\n // this.documentReaders = this.documentReaders.filter(reader => reader !== fn)\r\n // })\r\n }\r\n\r\n getNextUpdatePromise () {\r\n // if (this.nextUpdatePromise == null) {\r\n // this.nextUpdatePromise = new Promise(resolve => {\r\n // this.resolveNextUpdatePromise = resolve\r\n // })\r\n // }\r\n\r\n // return this.nextUpdatePromise\r\n }\r\n\r\n clearDocumentRequests () {\r\n // this.documentReaders = []\r\n // this.documentWriters = []\r\n // this.nextUpdatePromise = null\r\n // this.resolveNextUpdatePromise = null\r\n // if (this.animationFrameRequest != null) {\r\n // cancelAnimationFrame(this.animationFrameRequest)\r\n // this.animationFrameRequest = null\r\n // }\r\n }\r\n\r\n requestDocumentUpdate () {\r\n // if (this.animationFrameRequest == null) {\r\n // this.animationFrameRequest = requestAnimationFrame(this.performDocumentUpdate)\r\n // }\r\n }\r\n\r\n performDocumentUpdate () {\r\n // const { resolveNextUpdatePromise } = this\r\n // this.animationFrameRequest = null\r\n // this.nextUpdatePromise = null\r\n // this.resolveNextUpdatePromise = null\r\n\r\n // var writer = this.documentWriters.shift()\r\n // while (writer) {\r\n // writer()\r\n // writer = this.documentWriters.shift()\r\n // }\r\n\r\n // var reader = this.documentReaders.shift()\r\n // this.documentReadInProgress = true\r\n // while (reader) {\r\n // reader()\r\n // reader = this.documentReaders.shift()\r\n // }\r\n // this.documentReadInProgress = false\r\n\r\n // // process updates requested as a result of reads\r\n // writer = this.documentWriters.shift()\r\n // while (writer) {\r\n // writer()\r\n // writer = this.documentWriters.shift()\r\n // }\r\n\r\n // if (resolveNextUpdatePromise) { resolveNextUpdatePromise() }\r\n }\r\n}\r\n","import { Panel } from './panel';\r\nimport { Dock } from './dock';\r\nimport { PanelLocation } from './types';\r\nimport { ViewRegistry } from './view-registry';\r\nimport { CompositeDisposable, Emitter, Disposable } from './event-kit';\r\n\r\nexport class PanelContainer {\r\n private emitter: Emitter;\r\n private subscriptions: CompositeDisposable;\r\n\r\n panels: Panel[] = [];\r\n\r\n constructor(\r\n private viewRegistry: ViewRegistry,\r\n private location: PanelLocation,\r\n private dock: Dock = null) {\r\n this.emitter = new Emitter();\r\n this.subscriptions = new CompositeDisposable();\r\n }\r\n\r\n destroy() {\r\n for (const panel of this.getPanels()) {\r\n panel.destroy();\r\n }\r\n }\r\n\r\n getElement() {\r\n }\r\n\r\n /*\r\n Section: Event Subscription\r\n */\r\n\r\n onDidAddPanel(callback): Disposable {\r\n return this.emitter.on('did-add-panel', callback);\r\n }\r\n\r\n onDidRemovePanel(callback): Disposable {\r\n return this.emitter.on('did-remove-panel', callback);\r\n }\r\n\r\n onDidDestroy(callback): Disposable {\r\n return this.emitter.once('did-destroy', callback);\r\n }\r\n\r\n getLocation(): PanelLocation {\r\n return this.location;\r\n }\r\n\r\n isModal() { return this.location === 'modal'; }\r\n\r\n getPanels(): Panel[] { return this.panels.slice(); }\r\n\r\n addPanel(panel: Panel): Panel {\r\n this.subscriptions.add(panel.onDidDestroy(this.panelDestroyed.bind(this)));\r\n\r\n const index = this.getPanelIndex(panel);\r\n if (index === this.panels.length) {\r\n this.panels.push(panel);\r\n } else {\r\n this.panels.splice(index, 0, panel);\r\n }\r\n\r\n this.emitter.emit('did-add-panel', {panel, index});\r\n return panel;\r\n }\r\n\r\n panelForItem(item) {\r\n for (const panel of this.panels) {\r\n if (panel.getItem() === item) {\r\n return panel;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n panelDestroyed(panel) {\r\n const index = this.panels.indexOf(panel);\r\n if (index > -1) {\r\n this.panels.splice(index, 1);\r\n this.emitter.emit('did-remove-panel', {panel, index});\r\n }\r\n }\r\n\r\n getPanelIndex(panel) {\r\n const priority = panel.getPriority();\r\n if (['bottom', 'right'].find(item => item === this.location)) {\r\n for (let i = this.panels.length - 1; i >= 0; i--) {\r\n const p = this.panels[i];\r\n if (priority < p.getPriority()) { return i + 1; }\r\n }\r\n return 0;\r\n } else {\r\n for (let i = 0; i < this.panels.length; i++) {\r\n const p = this.panels[i];\r\n if (priority < p.getPriority()) { return i; }\r\n }\r\n return this.panels.length;\r\n }\r\n }\r\n}\r\n","import { ViewRegistry } from './view-registry';\r\nimport { Emitter, Disposable } from './event-kit';\r\n\r\nexport interface PanelOptions {\r\n item: any;\r\n autoFocus?: boolean;\r\n visible?: boolean;\r\n priority?: number;\r\n className?: string;\r\n}\r\n\r\nexport class Panel {\r\n /*\r\n Section: Construction and Destruction\r\n */\r\n destroyed: boolean;\r\n item: any;\r\n autoFocus: boolean;\r\n visible: boolean;\r\n priority: number;\r\n className: string;\r\n viewRegistry: any;\r\n private emitter: Emitter;\r\n\r\n constructor(options: PanelOptions, viewRegistry: ViewRegistry) {\r\n this.destroyed = false;\r\n this.item = options.item;\r\n this.autoFocus = options.autoFocus == null ? false : options.autoFocus;\r\n this.visible = options.visible == null ? true : options.visible;\r\n this.priority = options.priority == null ? 100 : options.priority;\r\n this.className = options.className;\r\n this.viewRegistry = viewRegistry;\r\n this.emitter = new Emitter();\r\n }\r\n\r\n // Public: Destroy and remove this panel from the UI.\r\n destroy() {\r\n if (this.destroyed) {\r\n return;\r\n }\r\n this.destroyed = true;\r\n this.hide();\r\n this.emitter.emit('did-destroy', this);\r\n return this.emitter.dispose();\r\n }\r\n\r\n getElement() {\r\n return this.item.getElement(); // ç´æ¥è¿åitemçè§å¾ï¼ä¸åå
è£
ä¸å±Panel\r\n }\r\n\r\n /*\r\n Section: Event Subscription\r\n */\r\n\r\n // Public: Invoke the given callback when the pane hidden or shown.\r\n //\r\n // * `callback` {Function} to be called when the pane is destroyed.\r\n // * `visible` {Boolean} true when the panel has been shown\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidChangeVisible(callback) {\r\n return this.emitter.on('did-change-visible', callback);\r\n }\r\n\r\n // Public: Invoke the given callback when the pane is destroyed.\r\n //\r\n // * `callback` {Function} to be called when the pane is destroyed.\r\n // * `panel` {Panel} this panel\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidDestroy(callback): Disposable {\r\n return this.emitter.once('did-destroy', callback);\r\n }\r\n\r\n /*\r\n Section: Panel Details\r\n */\r\n\r\n // Public: Returns the panel's item.\r\n getItem() {\r\n return this.item;\r\n }\r\n\r\n // Public: Returns a {Number} indicating this panel's priority.\r\n getPriority() {\r\n return this.priority;\r\n }\r\n\r\n getClassName() {\r\n return this.className;\r\n }\r\n\r\n // Public: Returns a {Boolean} true when the panel is visible.\r\n isVisible() {\r\n return this.visible;\r\n }\r\n\r\n // Public: Hide this panel\r\n hide() {\r\n const wasVisible = this.visible;\r\n this.visible = false;\r\n if (wasVisible) {\r\n this.emitter.emit('did-change-visible', this.visible);\r\n }\r\n }\r\n\r\n // Public: Show this panel\r\n show() {\r\n const wasVisible = this.visible;\r\n this.visible = true;\r\n if (!wasVisible) {\r\n this.emitter.emit('did-change-visible', this.visible);\r\n }\r\n }\r\n}\r\n","import { PaneContainer } from './pane-container';\r\nimport { Pane } from './pane';\r\n\r\n// Essential: Represents the workspace at the center of the entire window.\r\nexport class WorkspaceCenter {\r\n paneContainer: PaneContainer;\r\n didActivate: any;\r\n\r\n constructor(params) {\r\n params.location = 'center';\r\n this.paneContainer = new PaneContainer(params);\r\n this.didActivate = params.didActivate;\r\n this.paneContainer.onDidActivatePane(() => this.didActivate(this));\r\n this.paneContainer.onDidChangeActivePane((pane) => {\r\n params.didChangeActivePane(this, pane);\r\n });\r\n this.paneContainer.onDidChangeActivePaneItem((item) => {\r\n params.didChangeActivePaneItem(this, item);\r\n });\r\n this.paneContainer.onDidDestroyPaneItem((item) => params.didDestroyPaneItem(item));\r\n }\r\n\r\n destroy() {\r\n this.paneContainer.destroy();\r\n }\r\n\r\n serialize() {\r\n return this.paneContainer.serialize();\r\n }\r\n\r\n deserialize(state, deserializerManager) {\r\n this.paneContainer.deserialize(state, deserializerManager);\r\n }\r\n\r\n activate() {\r\n this.getActivePane().activate();\r\n }\r\n\r\n getLocation() {\r\n return 'center';\r\n }\r\n\r\n setDraggingItem() {\r\n // No-op\r\n }\r\n\r\n // Essential: Invoke the given callback with all current and future panes items\r\n // in the workspace center.\r\n //\r\n // * `callback` {Function} to be called with current and future pane items.\r\n // * `item` An item that is present in {::getPaneItems} at the time of\r\n // subscription or that is added at some later time.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observePaneItems(callback) { return this.paneContainer.observePaneItems(callback); }\r\n\r\n // Essential: Invoke the given callback when the active pane item changes.\r\n //\r\n // Because observers are invoked synchronously, it's important not to perform\r\n // any expensive operations via this method. Consider\r\n // {::onDidStopChangingActivePaneItem} to delay operations until after changes\r\n // stop occurring.\r\n //\r\n // * `callback` {Function} to be called when the active pane item changes.\r\n // * `item` The active pane item.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidChangeActivePaneItem(callback) {\r\n return this.paneContainer.onDidChangeActivePaneItem(callback);\r\n }\r\n\r\n // Essential: Invoke the given callback when the active pane item stops\r\n // changing.\r\n //\r\n // Observers are called asynchronously 100ms after the last active pane item\r\n // change. Handling changes here rather than in the synchronous\r\n // {::onDidChangeActivePaneItem} prevents unneeded work if the user is quickly\r\n // changing or closing tabs and ensures critical UI feedback, like changing the\r\n // highlighted tab, gets priority over work that can be done asynchronously.\r\n //\r\n // * `callback` {Function} to be called when the active pane item stopts\r\n // changing.\r\n // * `item` The active pane item.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidStopChangingActivePaneItem(callback) {\r\n return this.paneContainer.onDidStopChangingActivePaneItem(callback);\r\n }\r\n\r\n // Essential: Invoke the given callback with the current active pane item and\r\n // with all future active pane items in the workspace center.\r\n //\r\n // * `callback` {Function} to be called when the active pane item changes.\r\n // * `item` The current active pane item.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observeActivePaneItem(callback) {\r\n return this.paneContainer.observeActivePaneItem(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when a pane is added to the workspace\r\n // center.\r\n //\r\n // * `callback` {Function} to be called panes are added.\r\n // * `event` {Object} with the following keys:\r\n // * `pane` The added pane.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidAddPane(callback) {\r\n return this.paneContainer.onDidAddPane(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback before a pane is destroyed in the\r\n // workspace center.\r\n //\r\n // * `callback` {Function} to be called before panes are destroyed.\r\n // * `event` {Object} with the following keys:\r\n // * `pane` The pane to be destroyed.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onWillDestroyPane(callback) {\r\n return this.paneContainer.onWillDestroyPane(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when a pane is destroyed in the\r\n // workspace center.\r\n //\r\n // * `callback` {Function} to be called panes are destroyed.\r\n // * `event` {Object} with the following keys:\r\n // * `pane` The destroyed pane.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidDestroyPane(callback) {\r\n return this.paneContainer.onDidDestroyPane(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback with all current and future panes in the\r\n // workspace center.\r\n //\r\n // * `callback` {Function} to be called with current and future panes.\r\n // * `pane` A {Pane} that is present in {::getPanes} at the time of\r\n // subscription or that is added at some later time.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observePanes(callback) {\r\n return this.paneContainer.observePanes(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when the active pane changes.\r\n //\r\n // * `callback` {Function} to be called when the active pane changes.\r\n // * `pane` A {Pane} that is the current return value of {::getActivePane}.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidChangeActivePane(callback) {\r\n return this.paneContainer.onDidChangeActivePane(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback with the current active pane and when\r\n // the active pane changes.\r\n //\r\n // * `callback` {Function} to be called with the current and future active#\r\n // panes.\r\n // * `pane` A {Pane} that is the current return value of {::getActivePane}.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n observeActivePane(callback) {\r\n return this.paneContainer.observeActivePane(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when a pane item is added to the\r\n // workspace center.\r\n //\r\n // * `callback` {Function} to be called when pane items are added.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The added pane item.\r\n // * `pane` {Pane} containing the added item.\r\n // * `index` {Number} indicating the index of the added item in its pane.\r\n //\r\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\r\n onDidAddPaneItem(callback) {\r\n return this.paneContainer.onDidAddPaneItem(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when a pane item is about to be\r\n // destroyed, before the user is prompted to save it.\r\n //\r\n // * `callback` {Function} to be called before pane items are destroyed.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The item to be destroyed.\r\n // * `pane` {Pane} containing the item to be destroyed.\r\n // * `index` {Number} indicating the index of the item to be destroyed in\r\n // its pane.\r\n //\r\n // Returns a {Disposable} on which `.dispose` can be called to unsubscribe.\r\n onWillDestroyPaneItem(callback) {\r\n return this.paneContainer.onWillDestroyPaneItem(callback);\r\n }\r\n\r\n // Extended: Invoke the given callback when a pane item is destroyed.\r\n //\r\n // * `callback` {Function} to be called when pane items are destroyed.\r\n // * `event` {Object} with the following keys:\r\n // * `item` The destroyed item.\r\n // * `pane` {Pane} containing the destroyed item.\r\n // * `index` {Number} indicating the index of the destroyed item in its\r\n // pane.\r\n //\r\n // Returns a {Disposable} on which `.dispose` can be called to unsubscribe.\r\n onDidDestroyPaneItem(callback) {\r\n return this.paneContainer.onDidDestroyPaneItem(callback);\r\n }\r\n\r\n /*\r\n Section: Pane Items\r\n */\r\n\r\n // Essential: Get all pane items in the workspace center.\r\n //\r\n // Returns an {Array} of items.\r\n getPaneItems() {\r\n return this.paneContainer.getPaneItems();\r\n }\r\n\r\n // Essential: Get the active {Pane}'s active item.\r\n //\r\n // Returns an pane item {Object}.\r\n getActivePaneItem() {\r\n return this.paneContainer.getActivePaneItem();\r\n }\r\n\r\n // Save all pane items.\r\n saveAll() {\r\n this.paneContainer.saveAll();\r\n }\r\n\r\n confirmClose(options) {\r\n return this.paneContainer.confirmClose(options);\r\n }\r\n\r\n /*\r\n Section: Panes\r\n */\r\n\r\n // Extended: Get all panes in the workspace center.\r\n //\r\n // Returns an {Array} of {Pane}s.\r\n getPanes(): Pane[] {\r\n return this.paneContainer.getPanes();\r\n }\r\n\r\n // Extended: Get the active {Pane}.\r\n //\r\n // Returns a {Pane}.\r\n getActivePane(): Pane {\r\n return this.paneContainer.getActivePane();\r\n }\r\n\r\n // Extended: Make the next pane active.\r\n activateNextPane() {\r\n return this.paneContainer.activateNextPane();\r\n }\r\n\r\n // Extended: Make the previous pane active.\r\n activatePreviousPane() {\r\n return this.paneContainer.activatePreviousPane();\r\n }\r\n\r\n paneForURI(uri): Pane {\r\n return this.paneContainer.paneForURI(uri);\r\n }\r\n\r\n paneForItem(item): Pane {\r\n return this.paneContainer.paneForItem(item);\r\n }\r\n\r\n // Destroy (close) the active pane.\r\n destroyActivePane() {\r\n const activePane = this.getActivePane();\r\n if (activePane != null) {\r\n activePane.destroy();\r\n }\r\n }\r\n}\r\n","import { PanelContainer } from './panel-container';\r\nimport { Panel, PanelOptions } from './panel';\r\nimport { Dock } from './dock';\r\nimport { WorkspaceCenter } from './workspace-center';\r\nimport { ViewRegistry } from './view-registry';\r\nimport { PanelLocation } from './types';\r\nimport { PaneContainer } from './pane-container';\r\nimport { Pane } from './pane';\r\n\r\nexport interface PaneContainers {\r\n center: WorkspaceCenter;\r\n left: Dock;\r\n right: Dock;\r\n bottom: Dock;\r\n}\r\n\r\nexport interface PanelContainers {\r\n // top: PanelContainer;\r\n // left: PanelContainer;\r\n // right: PanelContainer;\r\n // bottom: PanelContainer;\r\n // header: PanelContainer;\r\n // footer: PanelContainer;\r\n // modal: PanelContainer;\r\n [location: string]: PanelContainer;\r\n}\r\nconst gsp: any = {};\r\nconst ALL_LOCATIONS = ['center', 'left', 'right', 'bottom'];\r\nexport class Workspace {\r\n private paneContainers: PaneContainers;\r\n private panelContainers: PanelContainers;\r\n private activePaneContainer: Dock | WorkspaceCenter;\r\n private viewRegistry: ViewRegistry;\r\n private packageManager: any;\r\n private openers: any[];\r\n private frmOpeners: any[];\r\n private useFrmOpener: boolean;\r\n private notificationManager: any;\r\n private config: any;\r\n private destroyedItemURIs: any[];\r\n private project: any;\r\n\r\n constructor(params) {\r\n this.initOptions(params);\r\n this.initWorkspace();\r\n this.openers = [];\r\n this.frmOpeners = [];\r\n this.useFrmOpener = false;\r\n this.viewRegistry = params.viewRegistry;\r\n // this.subscribeToEvents();\r\n }\r\n\r\n private initOptions(params) {\r\n this.config = params.config || {};\r\n }\r\n\r\n private initWorkspace() {\r\n // å建工ä½åºåé é¢æ¿å®¹å¨ã\r\n this.paneContainers = {\r\n // å建主åºåã\r\n center: this.createCenter(),\r\n // å建左侧é¢æ¿ã\r\n left: this.createDock('left'),\r\n // å建å³ä¾§é¢æ¿ã\r\n right: this.createDock('right'),\r\n // å建åºé¨é¢æ¿ã\r\n bottom: this.createDock('bottom')\r\n };\r\n this.activePaneContainer = this.paneContainers.center;\r\n // å建é¢æ¿å®¹å¨\r\n this.panelContainers = {\r\n top: new PanelContainer(this.viewRegistry, 'top'),\r\n left: new PanelContainer(this.viewRegistry, 'left', this.paneContainers.left),\r\n right: new PanelContainer(this.viewRegistry, 'right', this.paneContainers.right),\r\n bottom: new PanelContainer(this.viewRegistry, 'bottom', this.paneContainers.bottom),\r\n header: new PanelContainer(this.viewRegistry, 'header'),\r\n footer: new PanelContainer(this.viewRegistry, 'footer'),\r\n modal: new PanelContainer(this.viewRegistry, 'modal')\r\n };\r\n }\r\n\r\n get paneContainer(): PaneContainer {\r\n return this.paneContainers.center.paneContainer;\r\n }\r\n /**\r\n * è¿åå·¥ä½åºå
ç´ \r\n */\r\n getElement() {\r\n }\r\n /**\r\n * å建主é¢æ¿\r\n */\r\n createCenter() {\r\n return new WorkspaceCenter({ viewRegistry: this.viewRegistry });\r\n }\r\n /**\r\n * å建åé é¢æ¿\r\n * @param location åé é¢æ¿ä½ç½®\r\n */\r\n createDock(location) {\r\n return new Dock({\r\n location,\r\n viewRegistry: this.viewRegistry\r\n });\r\n }\r\n /**\r\n * é置工ä½åº\r\n * @param packageManager å
管çå¨\r\n */\r\n reset(packageManager) {\r\n this.packageManager = packageManager;\r\n\r\n this.destroyed();\r\n\r\n this.initWorkspace();\r\n }\r\n\r\n // Called by the Serializable mixin during serialization.\r\n /**\r\n * åºååå·¥ä½åºé
ç½®\r\n */\r\n serialize() {\r\n }\r\n /**\r\n * ååºååå·¥ä½åºé
ç½®\r\n * @param state state\r\n * @param deserializerManager dm\r\n */\r\n deserialize(state, deserializerManager) {\r\n }\r\n\r\n // Updates the application's title and proxy icon based on whichever file is\r\n // open.\r\n updateWindowTitle() {\r\n\r\n }\r\n\r\n open(itemOrURI, options: any = {}) {\r\n let uri, item;\r\n if (typeof itemOrURI === 'string') {\r\n uri = itemOrURI; // this.project.resolvePath(itemOrURI);\r\n } else if (itemOrURI) {\r\n item = itemOrURI;\r\n if (typeof item.getURI === 'function') { uri = item.getURI(); }\r\n }\r\n\r\n if (!this.config.get('core.allowPendingPaneItems')) {\r\n options.pending = false;\r\n }\r\n\r\n // Avoid adding URLs as recent documents to work-around this Spotlight crash:\r\n // https://github.com/atom/atom/issues/10071\r\n // if (uri && (!url.parse(uri).protocol || process.platform === 'win32')) {\r\n // this.applicationDelegate.addRecentDocument(uri);\r\n // }\r\n\r\n let pane, itemExistsInWorkspace;\r\n\r\n // Try to find an existing item in the workspace.\r\n if (item || uri) {\r\n if (options.pane) {\r\n pane = options.pane;\r\n } else if (options.searchAllPanes) {\r\n pane = item ? this.paneForItem(item) : this.paneForURI(uri);\r\n } else {\r\n // If an item with the given URI is already in the workspace, assume\r\n // that item's pane container is the preferred location for that URI.\r\n let container;\r\n if (uri) { container = this.paneContainerForURI(uri); }\r\n if (!container) { container = this.getActivePaneContainer(); }\r\n\r\n // The `split` option affects where we search for the item.\r\n pane = container.getActivePane();\r\n switch (options.split) {\r\n case 'left':\r\n pane = pane.findLeftmostSibling();\r\n break;\r\n case 'right':\r\n pane = pane.findRightmostSibling();\r\n break;\r\n case 'up':\r\n pane = pane.findTopmostSibling();\r\n break;\r\n case 'down':\r\n pane = pane.findBottommostSibling();\r\n break;\r\n }\r\n }\r\n\r\n if (pane) {\r\n if (item) {\r\n itemExistsInWorkspace = pane.getItems().includes(item);\r\n } else {\r\n item = pane.itemForURI(uri);\r\n itemExistsInWorkspace = item != null;\r\n }\r\n }\r\n }\r\n\r\n // If we already have an item at this stage, we won't need to do an async\r\n // lookup of the URI, so we yield the event loop to ensure this method\r\n // is consistently asynchronous.\r\n if (item) {\r\n Promise.resolve();\r\n }\r\n\r\n if (!itemExistsInWorkspace) {\r\n item = item || this.createItemForURI(uri, options);\r\n if (!item) { return; }\r\n\r\n if (options.pane) {\r\n pane = options.pane;\r\n } else {\r\n let location = options.location;\r\n // if (!location && !options.split && uri && this.enablePersistence) {\r\n // // location = await;\r\n // this.itemLocationStore.load(uri);\r\n // }\r\n if (!location && typeof item.getDefaultLocation === 'function') {\r\n location = item.getDefaultLocation();\r\n }\r\n\r\n const allowedLocations = typeof item.getAllowedLocations === 'function' ? item.getAllowedLocations() : ALL_LOCATIONS;\r\n location = allowedLocations.includes(location) ? location : allowedLocations[0];\r\n\r\n const container = this.paneContainers[location] || this.getCenter();\r\n pane = container.getActivePane();\r\n switch (options.split) {\r\n case 'left':\r\n pane = pane.findLeftmostSibling();\r\n break;\r\n case 'right':\r\n pane = pane.findOrCreateRightmostSibling();\r\n break;\r\n case 'up':\r\n pane = pane.findTopmostSibling();\r\n break;\r\n case 'down':\r\n pane = pane.findOrCreateBottommostSibling();\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (!options.pending && (pane.getPendingItem() === item)) {\r\n pane.clearPendingItem();\r\n }\r\n\r\n this.itemOpened(item);\r\n\r\n if (options.activateItem === false) {\r\n pane.addItem(item, { pending: options.pending });\r\n } else {\r\n pane.activateItem(item, { pending: options.pending });\r\n }\r\n\r\n if (options.activatePane !== false) {\r\n pane.activate();\r\n }\r\n\r\n let initialColumn = 0;\r\n let initialLine = 0;\r\n if (!Number.isNaN(options.initialLine)) {\r\n initialLine = options.initialLine;\r\n }\r\n if (!Number.isNaN(options.initialColumn)) {\r\n initialColumn = options.initialColumn;\r\n }\r\n if (initialLine >= 0 || initialColumn >= 0) {\r\n if (typeof item.setCursorBufferPosition === 'function') {\r\n item.setCursorBufferPosition([initialLine, initialColumn]);\r\n }\r\n }\r\n\r\n const index = pane.getActiveItemIndex();\r\n return item;\r\n }\r\n\r\n hide(itemOrURI) {\r\n let foundItems = false;\r\n\r\n // If any visible item has the given URI, hide it\r\n for (const container of this.getPaneContainers()) {\r\n const isCenter = container === this.getCenter();\r\n if (isCenter || (container as Dock).isVisible()) {\r\n for (const pane of container.getPanes()) {\r\n const activeItem = pane.getActiveItem();\r\n const foundItem = (\r\n activeItem != null && (\r\n activeItem === itemOrURI ||\r\n typeof activeItem.getURI === 'function' && activeItem.getURI() === itemOrURI\r\n )\r\n );\r\n if (foundItem) {\r\n foundItems = true;\r\n // We can't really hide the center so we just destroy the item.\r\n if (isCenter) {\r\n pane.destroyItem(activeItem);\r\n } else {\r\n (container as Dock).hide();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return foundItems;\r\n }\r\n\r\n toggle(itemOrURI) {\r\n if (this.hide(itemOrURI)) {\r\n return Promise.resolve();\r\n } else {\r\n return this.open(itemOrURI, { searchAllPanes: true });\r\n }\r\n }\r\n\r\n openSync(fileUri = '', options = { initialColumn: '', initialLine: '', activateItem: '', activatePane: '' }) {\r\n const { initialLine, initialColumn } = options;\r\n const activatePane = options.activatePane != null ? options.activatePane : true;\r\n const activateItem = options.activateItem != null ? options.activateItem : true;\r\n\r\n const uri = fileUri; // this.project.resolvePath(uri_);\r\n let item = this.getActivePane().itemForURI(uri);\r\n if (uri && (item == null)) {\r\n for (const opener of this.getOpeners()) {\r\n item = opener(uri, options);\r\n if (item) { break; }\r\n }\r\n }\r\n if (item == null) {\r\n item = this.project.openSync(uri, { initialLine, initialColumn });\r\n }\r\n\r\n if (activateItem) {\r\n this.getActivePane().activateItem(item);\r\n }\r\n this.itemOpened(item);\r\n if (activatePane) {\r\n this.getActivePane().activate();\r\n }\r\n return item;\r\n }\r\n\r\n openURIInPane(uri, pane) {\r\n return this.open(uri, { pane });\r\n }\r\n\r\n createItemForURI(uri, options) {\r\n if (uri != null) {\r\n for (const opener of this.getOpeners()) {\r\n const item = opener(uri, options);\r\n if (item != null) {\r\n if (!item.getURI || typeof item.getURI !== 'function' || !item.getUri || typeof item.getURI !== 'function') {\r\n item.getUri = () => uri;\r\n }\r\n return item;\r\n }\r\n }\r\n }\r\n\r\n try {\r\n // return this.openTextFile(uri, options);\r\n } catch (error) {\r\n // switch (error.code) {\r\n // case 'CANCELLED':\r\n // return Promise.resolve();\r\n // case 'EACCES':\r\n // this.notificationManager.addWarning(`Permission denied '${error.path}'`);\r\n // return Promise.resolve();\r\n // case 'EPERM':\r\n // case 'EBUSY':\r\n // case 'ENXIO':\r\n // case 'EIO':\r\n // case 'ENOTCONN':\r\n // case 'UNKNOWN':\r\n // case 'ECONNRESET':\r\n // case 'EINVAL':\r\n // case 'EMFILE':\r\n // case 'ENOTDIR':\r\n // case 'EAGAIN':\r\n // this.notificationManager.addWarning(\r\n // `Unable to open '${error.path != null ? error.path : uri}'`,\r\n // { detail: error.message }\r\n // );\r\n // return Promise.resolve();\r\n // default:\r\n // throw error;\r\n // }\r\n }\r\n }\r\n\r\n reopenItem() {\r\n const uri = this.destroyedItemURIs.pop();\r\n if (uri) {\r\n return this.open(uri);\r\n } else {\r\n return Promise.resolve();\r\n }\r\n }\r\n\r\n addOpener(opener) {\r\n this.openers.push(opener);\r\n // return new Disposable(() => { _.remove(this.openers, opener); });\r\n }\r\n\r\n addFrmOpener(opener) {\r\n if (!this.useFrmOpener) {\r\n this.useFrmOpener = true;\r\n }\r\n this.frmOpeners.push(opener);\r\n }\r\n\r\n getOpeners() {\r\n return this.useFrmOpener ? this.frmOpeners : this.openers;\r\n }\r\n\r\n getPaneItems() {\r\n return new Array().concat(this.getPaneContainers().map(container => container.getPaneItems()));\r\n }\r\n\r\n getActivePaneItem() {\r\n return this.getActivePaneContainer().getActivePaneItem();\r\n }\r\n\r\n saveAll() {\r\n this.getPaneContainers().forEach(container => {\r\n container.saveAll();\r\n });\r\n }\r\n\r\n confirmClose(options) {\r\n return Promise.all(this.getPaneContainers().map(container =>\r\n container.confirmClose(options)\r\n )).then((results) => !results.find(item => item === false));\r\n }\r\n\r\n saveActivePaneItem() {\r\n return this.getCenter().getActivePane().saveActiveItem();\r\n }\r\n\r\n saveActivePaneItemAs() {\r\n this.getCenter().getActivePane().saveActiveItemAs();\r\n }\r\n\r\n destroyActivePaneItem() {\r\n return this.getActivePane().destroyActiveItem();\r\n }\r\n\r\n getActivePaneContainer() {\r\n return this.activePaneContainer;\r\n }\r\n\r\n getPanes() {\r\n return new Array().concat(this.getPaneContainers().map(container => container.getPanes()));\r\n }\r\n\r\n getVisiblePanes() {\r\n return new Array().concat(this.getVisiblePaneContainers().map(container => container.getPanes()));\r\n }\r\n\r\n getActivePane() {\r\n return this.getActivePaneContainer().getActivePane();\r\n }\r\n\r\n activateNextPane() {\r\n return this.getActivePaneContainer().activateNextPane();\r\n }\r\n\r\n activatePreviousPane() {\r\n return this.getActivePaneContainer().activatePreviousPane();\r\n }\r\n\r\n paneContainerForURI(uri) {\r\n return this.getPaneContainers().find(container => !!container.paneForURI(uri));\r\n }\r\n\r\n paneContainerForItem(uri) {\r\n return this.getPaneContainers().find(container => !!container.paneForItem(uri));\r\n }\r\n\r\n paneForURI(uri): Pane {\r\n for (const location of this.getPaneContainers()) {\r\n const pane = location.paneForURI(uri);\r\n if (pane != null) {\r\n return pane;\r\n }\r\n }\r\n }\r\n\r\n paneForItem(item): Pane {\r\n for (const location of this.getPaneContainers()) {\r\n const pane = location.paneForItem(item);\r\n if (pane != null) {\r\n return pane;\r\n }\r\n }\r\n }\r\n\r\n destroyActivePane() {\r\n const activePane = this.getActivePane();\r\n if (activePane != null) {\r\n activePane.destroy();\r\n }\r\n }\r\n\r\n\r\n closeActivePaneItemOrEmptyPaneOrWindow() {\r\n if (this.getCenter().getActivePaneItem() != null) {\r\n this.getCenter().getActivePane().destroyActiveItem();\r\n } else if (this.getCenter().getPanes().length > 1) {\r\n this.getCenter().destroyActivePane();\r\n } else if (this.config.get('core.closeEmptyWindows')) {\r\n // å为å
³éatomåºç¨çªå£ãideä¸æä¸å
³éæ´ä¸ªçªå£ã\r\n // atom.close();\r\n }\r\n }\r\n\r\n itemOpened(item) {\r\n }\r\n\r\n\r\n destroyed() {\r\n this.paneContainers.center.destroy();\r\n this.paneContainers.left.destroy();\r\n this.paneContainers.right.destroy();\r\n this.paneContainers.bottom.destroy();\r\n\r\n for (const panelLocation in this.panelContainers) {\r\n if (this.panelContainers.hasOwnProperty(panelLocation)) {\r\n const panelContainer = this.panelContainers[panelLocation];\r\n this.paneContainer.destroy();\r\n }\r\n }\r\n }\r\n\r\n getCenter(): WorkspaceCenter {\r\n return this.paneContainers.center;\r\n }\r\n\r\n getLeftDock() {\r\n return this.paneContainers.left;\r\n }\r\n\r\n getRightDock() {\r\n return this.paneContainers.right;\r\n }\r\n\r\n getBottomDock() {\r\n return this.paneContainers.bottom;\r\n }\r\n\r\n getPaneContainers() {\r\n return [\r\n this.paneContainers.center,\r\n this.paneContainers.left,\r\n this.paneContainers.right,\r\n this.paneContainers.bottom\r\n ];\r\n }\r\n\r\n getVisiblePaneContainers() {\r\n const center = this.getCenter();\r\n return this.getPaneContainers()\r\n .filter(container => container === center || (container as Dock).isVisible());\r\n }\r\n\r\n getBottomPanels() {\r\n return this.getPanels('bottom');\r\n }\r\n\r\n addBottomPanel(options: PanelOptions): Panel {\r\n return this.addPanel('bottom', options);\r\n }\r\n\r\n getLeftPanels() {\r\n return this.getPanels('left');\r\n }\r\n\r\n addLeftPanel(options: PanelOptions): Panel {\r\n return this.addPanel('left', options);\r\n }\r\n\r\n getRightPanels() {\r\n return this.getPanels('right');\r\n }\r\n\r\n addRightPanel(options: PanelOptions): Panel {\r\n return this.addPanel('right', options);\r\n }\r\n\r\n getTopPanels() {\r\n return this.getPanels('top');\r\n }\r\n\r\n addTopPanel(options: PanelOptions): Panel {\r\n return this.addPanel('top', options);\r\n }\r\n\r\n getHeaderPanels() {\r\n return this.getPanels('header');\r\n }\r\n\r\n addHeaderPanel(options: PanelOptions): Panel {\r\n return this.addPanel('header', options);\r\n }\r\n\r\n getFooterPanels() {\r\n return this.getPanels('footer');\r\n }\r\n\r\n addFooterPanel(options: PanelOptions): Panel {\r\n return this.addPanel('footer', options);\r\n }\r\n\r\n getModalPanels() {\r\n return this.getPanels('modal');\r\n }\r\n\r\n addModalPanel(options: PanelOptions): Panel {\r\n return this.addPanel('modal', options);\r\n }\r\n\r\n panelForItem(item): Panel {\r\n for (const location in this.panelContainers) {\r\n if (this.panelContainers.hasOwnProperty(location)) {\r\n const panel = this.panelContainers[location].panelForItem(item);\r\n if (panel != null) {\r\n return panel;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n getPanelContainer(location: PanelLocation): PanelContainer {\r\n return this.panelContainers[location];\r\n }\r\n\r\n getPanels(location: PanelLocation): Panel[] {\r\n return this.panelContainers[location].getPanels();\r\n }\r\n\r\n addPanel(location: PanelLocation, options: PanelOptions): Panel {\r\n const panel = new Panel(options, this.viewRegistry);\r\n return this.panelContainers[location].addPanel(panel);\r\n }\r\n}\r\n","import { EventBus, IDisposable } from '../eventbus';\r\nimport { Observable, of } from 'rxjs';\r\nimport { Type } from '@angular/core';\r\n\r\nexport class GspEventBus extends EventBus {\r\n private commands: any[] = [];\r\n\r\n on(target: string, tokenValue: string, eventName: string, caller: object, handler: (value: any) => void) {\r\n // å¦ææ对åºæ¿æ´»å½ä»¤ï¼çå¬äºä»¶æ¶ç«å³æ§è¡åè°å½æ°\r\n const command = this.commands.find(item => item.name === eventName);\r\n if (command) {\r\n handler.call(caller, command.eventeParams);\r\n }\r\n return super.on(target, tokenValue, eventName, caller, handler);\r\n }\r\n\r\n post(emitterType: Type<any> | string, tokenValue: string, eventName: string, eventArgs: any): void {\r\n this.dispatchCommand(eventName, eventArgs);\r\n super.post(emitterType, tokenValue, eventName, eventArgs);\r\n }\r\n\r\n registryActivateCommand(commandName: string, plugin: any, activateFn: (arg0: any) => void) {\r\n this.commands.push({\r\n name: commandName,\r\n plugin,\r\n activateFn\r\n });\r\n }\r\n\r\n private dispatchCommand(commandName: string, args: any) {\r\n const command = this.commands.find(item => item.name === commandName);\r\n if (command) {\r\n command.activateFn(command.plugin);\r\n command.eventParams = args;\r\n }\r\n }\r\n}\r\n","export class ModalFrm {\r\n\r\n add(options: any) {\r\n\r\n }\r\n\r\n show(id: string) {\r\n\r\n }\r\n\r\n hide(id: string) {\r\n\r\n }\r\n\r\n close(id: string) {\r\n \r\n }\r\n}\r\n","import { Messager } from './messager';\r\nimport { ModalFrm } from './modal-frm';\r\nimport { NotifyOptions } from '@farris/ui-notify';\r\n\r\n\r\n\r\n/**\r\n * æä¾ideè¿è¡æéçæ¹æ³ï¼ä¾æ件使ç¨\r\n */\r\n\r\nexport class Ide {\r\n private frameId: string;\r\n private events: Map<string, any[]>;\r\n private modal: ModalFrm;\r\n private commandData: Map<string, any>;\r\n private msgr: Messager;\r\n private get isTop(): boolean {\r\n return window.top === window;\r\n }\r\n private get parentInstance() {\r\n let instance = this;\r\n const top = window.top;\r\n if (top && top['gsp']) {\r\n instance = top['gsp'].ide;\r\n }\r\n return instance;\r\n }\r\n\r\n get messager(): Messager {\r\n return this.msgr;\r\n }\r\n\r\n constructor(parent?: Ide) {\r\n this.events = new Map<string, any[]>();\r\n this.modal = new ModalFrm();\r\n this.frameId = this.getParam('frameID');\r\n if (this.isTop) {\r\n this.commandData = new Map<string, any>();\r\n }\r\n if (parent) {\r\n this.msgr = parent.messager;\r\n }\r\n }\r\n\r\n /* #region frame util */\r\n getParam(key: string) {\r\n const params = new URLSearchParams(window.location.search);\r\n return unescape(params.get(key));\r\n }\r\n\r\n getInitCommandData(frameId?: string): any {\r\n if (!this.isTop) {\r\n frameId = frameId || this.frameId;\r\n return this.parentInstance.getInitCommandData(frameId);\r\n } else {\r\n return this.commandData.get(frameId);\r\n }\r\n }\r\n\r\n setInitCommandData(frameId: string, data: any) {\r\n if (!this.isTop) {\r\n this.parentInstance.setInitCommandData(frameId, data);\r\n } else {\r\n this.commandData.set(frameId, data);\r\n }\r\n }\r\n\r\n setMessager(messager: Messager) {\r\n this.msgr = messager;\r\n }\r\n /* #endregion */\r\n\r\n /* #region event */\r\n onPanelAdded(cb: (options: any, location?: string) => any) {\r\n this.on('panel-added', cb);\r\n }\r\n\r\n onPanelRemoved(cb: (id: string, lacation: string) => any) {\r\n this.on('panel-removed', cb);\r\n }\r\n\r\n onPanelShown(cb: (id: string) => any) {\r\n this.on('panel-shown', cb);\r\n }\r\n\r\n onPanelHidden(cb: (id: string) => any) {\r\n this.on('panel-hidden', cb);\r\n }\r\n\r\n onModalConfirming(cb: (id: string) => boolean) {\r\n if (this.parentInstance !== this) {\r\n this.parentInstance.onModalConfirming(cb);\r\n } else {\r\n this.on('confirm-modal', cb);\r\n }\r\n }\r\n\r\n onModalCancelling(cb: (id: string) => boolean) {\r\n this.on('cancel-modal', cb);\r\n }\r\n\r\n onLeftActivated(cb: (id: string) => any) {\r\n if (this.isTop) {\r\n this.on('activate-left', cb);\r\n } else {\r\n this.parentInstance.onLeftActivated(cb);\r\n }\r\n }\r\n\r\n onNotifyShown(cb: (level: 'error' | 'warning' | 'info', content: string | NotifyOptions) => any) {\r\n this.on('show-notify', cb);\r\n }\r\n\r\n onLoadingShown(cb: () => any) {\r\n this.on('show-loading', cb);\r\n }\r\n\r\n onLoadingHidden(cb: () => any) {\r\n this.on('hide-loading', cb);\r\n }\r\n /* #endregion */\r\n\r\n\r\n /* #region panel */\r\n addPanel(options: any) {\r\n this.emit('panel-added', options);\r\n }\r\n /* #endregion */\r\n\r\n /* #region modal */\r\n addModal(options: any) {\r\n this.emit('panel-added', options, 'modal');\r\n }\r\n\r\n closeModal(id?: string) {\r\n if (this.parentInstance !== this) {\r\n this.parentInstance.closeModal(id);\r\n }\r\n this.emit('panel-removed', id, 'modal');\r\n }\r\n\r\n confirmModal(id: string): boolean {\r\n let result = true;\r\n // if (this.parentInstance !== this) {\r\n // result = this.parentInstance.confirmModal(id);\r\n // }\r\n result = result && this.emit('confirm-modal', id);\r\n return result;\r\n }\r\n\r\n cancelModal(id: string): boolean {\r\n let result = true;\r\n if (this.parentInstance !== this) {\r\n result = this.parentInstance.cancelModal(id);\r\n }\r\n result = result && this.emit('cancel-modal', id);\r\n return result;\r\n }\r\n\r\n // addLeft registryOpener....\r\n /* #endregion */\r\n\r\n /* #region left rigion */\r\n\r\n activateLeft(frameId?: string) {\r\n frameId = frameId || this.frameId;\r\n if (this.isTop) {\r\n this.emit('activate-left', frameId);\r\n } else {\r\n this.parentInstance.activateLeft(frameId);\r\n }\r\n }\r\n /* #endregion */\r\n\r\n notify(level: 'error' | 'warning' | 'info', content: string | NotifyOptions) {\r\n if (this.isTop) {\r\n this.emit('show-notify', level, content);\r\n } else {\r\n this.parentInstance.notify(level, content);\r\n }\r\n }\r\n\r\n loading(): void {\r\n if (this.isTop) {\r\n this.emit('show-loading');\r\n } else {\r\n this.parentInstance.loading();\r\n }\r\n }\r\n\r\n loaded(): void {\r\n if (this.isTop) {\r\n this.emit('hide-loading');\r\n } else {\r\n this.parentInstance.loaded();\r\n }\r\n }\r\n\r\n /* #region private method */\r\n private on(name: string, cb: any) {\r\n let callbacks = this.events.get(name);\r\n if (!callbacks) {\r\n callbacks = [cb];\r\n this.events.set(name, callbacks);\r\n } else {\r\n callbacks.push(cb);\r\n }\r\n }\r\n\r\n private emit(name: string, ...params: any[]): boolean {\r\n const callbacks = this.events.get(name);\r\n\r\n if (!callbacks || !callbacks.length) { return; }\r\n\r\n let result = true;\r\n for (const cb of callbacks) {\r\n const cbResult = cb(...params);\r\n if (typeof cbResult === 'boolean' && cbResult === false) {\r\n result = false;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n /* #endregion */\r\n}\r\n\r\n","import { CacheService } from './../../services/cache/services/cache.service';\r\nimport { CommandRegistry } from './command-registry';\r\nimport { EventBus } from '../eventbus/event-bus';\r\nimport { Util } from '../util/util';\r\nimport { ViewRegistry } from './view-registry';\r\nimport { Workspace } from './workspace';\r\nimport { GspEventBus } from './gsp-event-bus';\r\nimport { Ide } from './ide/ide';\r\n\r\nexport class GSP {\r\n private pEventBus: EventBus;\r\n private pUtil: Util;\r\n private pWorkspace: Workspace;\r\n private pConfig: any;\r\n private pViews: ViewRegistry;\r\n private pCommands: CommandRegistry;\r\n private pIde: Ide;\r\n private pCache: CacheService;\r\n\r\n get eventBus(): EventBus { return this.pEventBus; }\r\n get util(): Util { return this.pUtil; }\r\n get workspace(): Workspace { return this.pWorkspace; }\r\n get views(): ViewRegistry { return this.pViews; }\r\n get commands(): CommandRegistry { return this.pCommands; }\r\n get ide(): Ide { return this.pIde; }\r\n get cache(): CacheService { return this.pCache; }\r\n\r\n constructor(parent?: GSP) {\r\n this.pConfig = {\r\n get(key) {\r\n return this[key];\r\n }\r\n };\r\n let ide: Ide;\r\n if (parent) {\r\n this.pViews = parent.views;\r\n this.pCommands = parent.commands;\r\n this.pEventBus = parent.eventBus;\r\n this.pUtil = parent.util;\r\n this.pWorkspace = parent.workspace;\r\n this.pCache = parent.cache;\r\n ide = parent.ide;\r\n } else {\r\n this.pViews = new ViewRegistry(this);\r\n this.pCommands = new CommandRegistry();\r\n this.pEventBus = new GspEventBus();\r\n this.pUtil = new Util();\r\n this.pWorkspace = new Workspace({\r\n config: this.pConfig,\r\n viewRegistry: this.pViews\r\n });\r\n this.pCache = new CacheService(null);\r\n }\r\n this.pIde = new Ide(ide);\r\n }\r\n\r\n /**\r\n * @deprecated ç±å模åç¬èªå建gspå®ä¾ï¼ä¼ å
¥ç¶å®ä¾ä½ä¸ºåæ°ã\r\n * æ¯ä¸ªiframeææä¸ä¸ªç¬æçgspå®ä¾ï¼å
¶ä¸eventbuså
±äº«ï¼ideä¸å
±äº«\r\n */\r\n createChild() {\r\n const child = new GSP(this);\r\n // child.pEventBus = this.pEventBus;\r\n // child.pViews = this.pViews;\r\n // child.pWorkspace = this.pWorkspace;\r\n return child;\r\n }\r\n}\r\n","import { Observable } from 'rxjs';\r\n\r\nexport class Messager {\r\n info(message: string, callback?: () => void): void {\r\n\r\n }\r\n\r\n question(message: string, okCallback: () => void, cancelCallback?: () => void): void {\r\n\r\n }\r\n\r\n confirm(message: string): Observable<boolean> {\r\n return null;\r\n }\r\n\r\n error(message: string): void {\r\n\r\n }\r\n\r\n warning(message: string): void {\r\n\r\n }\r\n}\r\n","import { ComponentRef } from '@angular/core';\r\n\r\nexport class PackageView {\r\n protected element: ComponentRef<any>;\r\n\r\n constructor(serializedState: any) {\r\n\r\n }\r\n\r\n getElement() {\r\n return this.element;\r\n }\r\n\r\n /**\r\n * Returns an object that can be retrieved when package is activated.\r\n */\r\n serialize() { }\r\n\r\n destroy() {\r\n }\r\n}\r\n","import { Type } from '@angular/core';\r\nimport { GSP } from '../gsp/gsp';\r\nimport { PackageView } from './package-view';\r\n\r\nexport class Package {\r\n protected packageView: PackageView;\r\n // leftPanel: any;\r\n // modelPanel: any;\r\n protected subscriptions: any = [];\r\n protected packageId: string;\r\n public data: any;\r\n\r\n get id(): string {\r\n return this.packageId;\r\n }\r\n set id(value: string) {\r\n this.packageId = value;\r\n }\r\n\r\n get view(): PackageView {\r\n return this.packageView;\r\n }\r\n\r\n constructor(protected gsp: GSP) {\r\n this.packageId = gsp.util.newGuid();\r\n }\r\n\r\n activate(state) {\r\n this.packageView = new PackageView(state.sagipackageViewState);\r\n // /*this.leftPanel = */this.ws.addLeftPanel({\r\n // title: 'test',\r\n // item: this.packageView.getComponent(),\r\n // visible: false\r\n // });\r\n }\r\n\r\n initialize() { }\r\n\r\n deactivate() {\r\n this.packageView.destroy();\r\n }\r\n\r\n serialize(): any {\r\n return {\r\n sagipackageViewState: this.packageView.serialize()\r\n };\r\n }\r\n\r\n toggle() {\r\n // return (\r\n // this.modelPanel.isVisible() ?\r\n // this.modelPanel.hide() :\r\n // this.modelPanel.show()\r\n // );\r\n }\r\n\r\n getComponent(): Type<any> {\r\n return null;\r\n }\r\n}\r\n","import { GSP } from '../gsp/gsp';\r\nimport { Package } from './package';\r\n\r\n\r\nexport class PackageModule {\r\n\r\n protected package: Package;\r\n\r\n constructor() {\r\n\r\n }\r\n\r\n getPackage(gsp: GSP) {\r\n if (!this.package) {\r\n this.initPackage(gsp);\r\n // ng7å级åï¼æ件å
æ¯iframeçå½¢å¼ï¼åå§åæ¹å¼æ¹åã\r\n if (this.package) {\r\n this.package.initialize();\r\n }\r\n }\r\n return this.package;\r\n }\r\n\r\n protected initPackage(gsp: GSP) {\r\n this.package = new Package(gsp);\r\n }\r\n}\r\n","import { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { CacheLocalStorage } from './services/storage/localstorage/cache.localstorage.service';\r\nimport { CacheMemoryStorage } from './services/storage/memory/cache.memory.service';\r\nimport { CacheSessionStorage } from './services/storage/sessionstorage/cache.sessionstorage.service';\r\nimport { CacheService } from './services/cache.service';\r\n\r\n@NgModule({\r\n declarations: []\r\n})\r\nexport class CacheModule {\r\n static forRoot(): ModuleWithProviders {\r\n return {\r\n ngModule: CacheModule,\r\n providers: [\r\n CacheLocalStorage,\r\n CacheMemoryStorage,\r\n CacheSessionStorage,\r\n CacheService\r\n ]\r\n };\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { CacheService } from '../cache/services/cache.service';\r\nimport { map } from 'rxjs/operators';\r\nimport { Observable } from 'rxjs/Observable';\r\n\r\n@Injectable()\r\nexport class HttpService {\r\n\r\n constructor(private http: HttpClient, private cache: CacheService) {\r\n }\r\n\r\n get(url: string): Observable<any> {\r\n return this.request('Get', url, this.setHeader({}));\r\n }\r\n\r\n post(url: string, body: any): Observable<any> {\r\n return this.request('Post', url, this.setHeader({body}));\r\n }\r\n put(url: string, body: any): Observable<any> {\r\n return this.request('Put', url, this.setHeader({body}));\r\n }\r\n delete(url: string, body: any): Observable<any> {\r\n return this.request('Delete', url, this.setHeader({body}));\r\n }\r\n patch(url: string, body: any): Observable<any> {\r\n return this.request('Patch', url, this.setHeader({body}));\r\n }\r\n\r\n setHeader(options: any) {\r\n\r\n options.headers = {\r\n 'Content-Type': 'application/json',\r\n 'Access-Control-Allow-Origin': '*'\r\n };\r\n if (this.cache.exists('sessionId') && this.cache.get('sessionId')) {\r\n options.headers['SessionId'] = this.cache.get('sessionId');\r\n }\r\n return options;\r\n }\r\n request(method: string, url: string, options: any): Observable<any> {\r\n if (options.body) {\r\n if (typeof options.body !== 'string') {\r\n options.body = JSON.stringify(options.body);\r\n }\r\n }\r\n\r\n\r\n return this.http.request(method, url, options)\r\n .pipe(map((data) => {\r\n console.log(data);\r\n return data;\r\n }));\r\n }\r\n}\r\n","import { HttpClientModule } from '@angular/common/http';\r\nimport { NgModule } from '@angular/core';\r\nimport { HttpService } from './http.service';\r\n\r\n@NgModule({\r\n imports: [\r\n HttpClientModule\r\n ],\r\n providers: [ HttpService ]\r\n})\r\nexport class GSPHttpModule {\r\n\r\n}\r\n"],"names":["tslib_1.__decorate","document","Event","window","BsModalService","isBs3","merge","nextId","NGB_TABSET_DIRECTIVES","last","nextInstanceId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAGa,WAAW;IADxB;;;;QAGE,SAAI,GAAG,SAAS,CAAC;;;;QAGjB,gBAAW,GAAG,KAAK,CAAC;;;;QAGpB,qBAAgB,GAAY,SAAS,CAAC;KACvC;;;YAVA,UAAU;;;;;;;;;;;ACDX,SAAgB,QAAQ;;UAChB,KAAK,GAAG,QAAQ;IACtB,OAAO,SAAS,eAAe,CAAC,MAAW,EAAE,WAAmB;;cACxD,IAAI,GAAG,MAAM,WAAW,OAAO;QACrC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;;;;YACzC,GAAG,KAAU,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;;;;;YACjC,GAAG,CAAC,KAAU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