From 8c8377dde03773e5697ff6c5f8d49a6f5fa6b6a1 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Tue, 28 Feb 2017 17:46:32 +0100 Subject: [PATCH] chore(split-panel): renames to split-pane --- src/components/menu/menu.ts | 10 +++--- src/components/nav/nav.ts | 4 +-- .../split-pane.ios.scss} | 4 +-- .../split-pane.md.scss} | 4 +-- .../split-pane.scss} | 26 +++++++------- .../split-pane.ts} | 34 +++++++++---------- .../split-pane.wp.scss} | 4 +-- .../test/basic/app.module.ts | 6 ++-- .../test/basic/e2e.ts | 0 .../test/basic/main.html | 4 +-- .../test/menus/app.module.ts | 6 ++-- .../test/menus/e2e.ts | 0 .../test/menus/main.html | 4 +-- .../test/nested/app.module.ts | 8 ++--- .../test/nested/e2e.ts | 0 .../test/nested/main.html | 4 +-- .../test/tabs/app.module.ts | 0 .../test/tabs/e2e.ts | 0 .../test/tabs/main.html | 4 +-- src/components/tabs/tabs.ts | 4 +-- src/index.ts | 8 ++--- src/navigation/root-node.ts | 2 +- src/themes/ionic.components.scss | 8 ++--- 23 files changed, 72 insertions(+), 72 deletions(-) rename src/components/{split-panel/split-panel.ios.scss => split-pane/split-pane.ios.scss} (73%) rename src/components/{split-panel/split-panel.md.scss => split-pane/split-pane.md.scss} (72%) rename src/components/{split-panel/split-panel.scss => split-pane/split-pane.scss} (58%) rename src/components/{split-panel/split-panel.ts => split-pane/split-pane.ts} (78%) rename src/components/{split-panel/split-panel.wp.scss => split-pane/split-pane.wp.scss} (72%) rename src/components/{split-panel => split-pane}/test/basic/app.module.ts (92%) rename src/components/{split-panel => split-pane}/test/basic/e2e.ts (100%) rename src/components/{split-panel => split-pane}/test/basic/main.html (64%) rename src/components/{split-panel => split-pane}/test/menus/app.module.ts (91%) rename src/components/{split-panel => split-pane}/test/menus/e2e.ts (100%) rename src/components/{split-panel => split-pane}/test/menus/main.html (92%) rename src/components/{split-panel => split-pane}/test/nested/app.module.ts (96%) rename src/components/{split-panel => split-pane}/test/nested/e2e.ts (100%) rename src/components/{split-panel => split-pane}/test/nested/main.html (74%) rename src/components/{split-panel => split-pane}/test/tabs/app.module.ts (100%) rename src/components/{split-panel => split-pane}/test/tabs/e2e.ts (100%) rename src/components/{split-panel => split-pane}/test/tabs/main.html (84%) diff --git a/src/components/menu/menu.ts b/src/components/menu/menu.ts index 67a2d01640f..961a0739631 100644 --- a/src/components/menu/menu.ts +++ b/src/components/menu/menu.ts @@ -204,7 +204,7 @@ export class Menu implements RootNode { private _init: boolean = false; private _events: UIEventManager; private _gestureBlocker: BlockerDelegate; - private _isPanel: boolean = false; + private _isPane: boolean = false; /** * @private @@ -565,7 +565,7 @@ export class Menu implements RootNode { } _canOpen(): boolean { - return this._isEnabled && !this._isPanel; + return this._isEnabled && !this._isPane; } _isSideContent(): boolean { @@ -603,7 +603,7 @@ export class Menu implements RootNode { console.debug('menu, gesture unlisten', this.side); gesture.unlisten(); } - if (this.isOpen || (this._isPanel && this._isEnabled)) { + if (this.isOpen || (this._isPane && this._isEnabled)) { this.resize(); } assert(!this._isAnimating, 'can not be animating'); @@ -622,8 +622,8 @@ export class Menu implements RootNode { /** * @private */ - _setIsPanel(isPanel: boolean) { - this._isPanel = isPanel; + _setIsPane(isPane: boolean) { + this._isPane = isPane; this._updateState(); } diff --git a/src/components/nav/nav.ts b/src/components/nav/nav.ts index eea393398bb..e3e9a5e4b31 100644 --- a/src/components/nav/nav.ts +++ b/src/components/nav/nav.ts @@ -169,8 +169,8 @@ export class Nav extends NavControllerBase implements AfterViewInit, RootNode { /** * @private */ - _setIsPanel(isPanel: boolean) { - if (isPanel) { + _setIsPane(isPane: boolean) { + if (isPane) { this.resize(); } } diff --git a/src/components/split-panel/split-panel.ios.scss b/src/components/split-pane/split-pane.ios.scss similarity index 73% rename from src/components/split-panel/split-panel.ios.scss rename to src/components/split-pane/split-pane.ios.scss index d5db3b04284..59daf3d9978 100644 --- a/src/components/split-panel/split-panel.ios.scss +++ b/src/components/split-pane/split-pane.ios.scss @@ -1,10 +1,10 @@ @import "../../themes/ionic.globals.ios"; -// Split Panel +// Split Pane // -------------------------------------------------- -.split-panel-ios.split-panel-visible >.split-panel-side { +.split-pane-ios.split-pane-visible >.split-pane-side { min-width: 270px; max-width: 28%; diff --git a/src/components/split-panel/split-panel.md.scss b/src/components/split-pane/split-pane.md.scss similarity index 72% rename from src/components/split-panel/split-panel.md.scss rename to src/components/split-pane/split-pane.md.scss index 91a9d04c1fb..e9a76e2d9b5 100644 --- a/src/components/split-panel/split-panel.md.scss +++ b/src/components/split-pane/split-pane.md.scss @@ -1,10 +1,10 @@ @import "../../themes/ionic.globals.md"; -// Split Panel +// Split Pane // -------------------------------------------------- -.split-panel-md.split-panel-visible >.split-panel-side { +.split-pane-md.split-pane-visible >.split-pane-side { min-width: 270px; max-width: 28%; diff --git a/src/components/split-panel/split-panel.scss b/src/components/split-pane/split-pane.scss similarity index 58% rename from src/components/split-panel/split-panel.scss rename to src/components/split-pane/split-pane.scss index 31555577662..539d998234a 100644 --- a/src/components/split-panel/split-panel.scss +++ b/src/components/split-pane/split-pane.scss @@ -1,10 +1,10 @@ @import "../../themes/ionic.globals"; -// Split Panel +// Split Pane // -------------------------------------------------- -ion-split-panel { +ion-split-pane { position: absolute; top: 0; right: 0; @@ -18,12 +18,12 @@ ion-split-panel { contain: strict; } -.split-panel-side:not(ion-menu) { +.split-pane-side:not(ion-menu) { display: none; } -.split-panel-visible >.split-panel-side, -.split-panel-visible >.split-panel-main { +.split-pane-visible >.split-pane-side, +.split-pane-visible >.split-pane-main { // scss-lint:disable ImportantRule position: relative; top: 0; @@ -37,25 +37,25 @@ ion-split-panel { box-shadow: none !important; } -.split-panel-visible >.split-panel-side { +.split-pane-visible >.split-pane-side { flex-shrink: 0; order: -1; } -.split-panel-visible >.split-panel-main, -.split-panel-visible >ion-nav.split-panel-side, -.split-panel-visible >ion-tabs.split-panel-side, -.split-panel-visible >ion-menu.menu-enabled { +.split-pane-visible >.split-pane-main, +.split-pane-visible >ion-nav.split-pane-side, +.split-pane-visible >ion-tabs.split-pane-side, +.split-pane-visible >ion-menu.menu-enabled { display: block; } -.split-panel-visible >ion-split-panel.split-panel-side, -.split-panel-visible >ion-split-panel.split-panel-main { +.split-pane-visible >ion-split-pane.split-pane-side, +.split-pane-visible >ion-split-pane.split-pane-main { display: flex; } -.split-panel-visible >ion-menu.menu-enabled { +.split-pane-visible >ion-menu.menu-enabled { >.menu-inner { // scss-lint:disable ImportantRule right: 0; diff --git a/src/components/split-panel/split-panel.ts b/src/components/split-pane/split-pane.ts similarity index 78% rename from src/components/split-panel/split-panel.ts rename to src/components/split-pane/split-pane.ts index af66a21baa2..beafddc7b0f 100644 --- a/src/components/split-panel/split-panel.ts +++ b/src/components/split-pane/split-pane.ts @@ -15,14 +15,14 @@ const QUERY: { [key: string]: string } = { }; /** - * @name SplitPanel + * @name SplitPane */ @Component({ - selector: 'ion-split-panel', + selector: 'ion-split-pane', template: '', - providers: [{provide: RootNode, useExisting: forwardRef(() => SplitPanel) }] + providers: [{provide: RootNode, useExisting: forwardRef(() => SplitPane) }] }) -export class SplitPanel extends Ion implements RootNode { +export class SplitPane extends Ion implements RootNode { _rmListener: any; _visible: boolean = false; @@ -41,28 +41,28 @@ export class SplitPanel extends Ion implements RootNode { this.children.forEach(child => { if (child !== this) { var isSide = child._isSideContent(); - this.setPanelCSSClass(child.getElementRef(), isSide); + this.setPaneCSSClass(child.getElementRef(), isSide); if (child.enabled) { if (isSide) { if (this.sideContent) { - console.error('split panel: side content was already set'); + console.error('split pane: side content was already set'); } this.sideContent = child; } else { if (this.mainContent) { - console.error('split panel: main content was already set'); + console.error('split pane: main content was already set'); } this.mainContent = child; } } - child._setIsPanel(this._visible); + child._setIsPane(this._visible); } }); if (!this.mainContent) { - console.error('split panel: one of the elements needs the "main" attribute'); + console.error('split pane: one of the elements needs the "main" attribute'); } if (this.mainContent === this.sideContent) { - console.error('split panel: main and side content are the same'); + console.error('split pane: main and side content are the same'); } } @@ -83,7 +83,7 @@ export class SplitPanel extends Ion implements RootNode { return this._mediaQuery; } - @Output() ionChange: EventEmitter = new EventEmitter(); + @Output() ionChange: EventEmitter = new EventEmitter(); constructor( private _zone: NgZone, @@ -92,7 +92,7 @@ export class SplitPanel extends Ion implements RootNode { elementRef: ElementRef, renderer: Renderer, ) { - super(config, elementRef, renderer, 'split-panel'); + super(config, elementRef, renderer, 'split-pane'); } ngAfterViewInit() { @@ -132,7 +132,7 @@ export class SplitPanel extends Ion implements RootNode { return; } this._visible = visible; - this.setElementClass('split-panel-visible', visible); + this.setElementClass('split-pane-visible', visible); this.updateChildren(); this._zone.run(() => { @@ -148,10 +148,10 @@ export class SplitPanel extends Ion implements RootNode { this._renderer.setElementClass(this._elementRef.nativeElement, className, add); } - setPanelCSSClass(elementRef: ElementRef, isSide: boolean) { + setPaneCSSClass(elementRef: ElementRef, isSide: boolean) { const ele = elementRef.nativeElement; - this._renderer.setElementClass(ele, 'split-panel-side', isSide); - this._renderer.setElementClass(ele, 'split-panel-main', !isSide); + this._renderer.setElementClass(ele, 'split-pane-side', isSide); + this._renderer.setElementClass(ele, 'split-pane-main', !isSide); } ngOnDestroy() { @@ -161,7 +161,7 @@ export class SplitPanel extends Ion implements RootNode { this._rmListener = null; } - _setIsPanel(isPanel: boolean) { + _setIsPane(isPane: boolean) { // Conforms to RootNode abstract class } diff --git a/src/components/split-panel/split-panel.wp.scss b/src/components/split-pane/split-pane.wp.scss similarity index 72% rename from src/components/split-panel/split-panel.wp.scss rename to src/components/split-pane/split-pane.wp.scss index 7898c27d235..49f91aa36b6 100644 --- a/src/components/split-panel/split-panel.wp.scss +++ b/src/components/split-pane/split-pane.wp.scss @@ -1,10 +1,10 @@ @import "../../themes/ionic.globals.wp"; -// Split Panel +// Split Pane // -------------------------------------------------- -.split-panel-wp.split-panel-visible >.split-panel-side { +.split-pane-wp.split-pane-visible >.split-pane-side { min-width: 270px; max-width: 28%; diff --git a/src/components/split-panel/test/basic/app.module.ts b/src/components/split-pane/test/basic/app.module.ts similarity index 92% rename from src/components/split-panel/test/basic/app.module.ts rename to src/components/split-pane/test/basic/app.module.ts index 355a8c329d7..ce1cd257a7b 100644 --- a/src/components/split-panel/test/basic/app.module.ts +++ b/src/components/split-pane/test/basic/app.module.ts @@ -1,5 +1,5 @@ import { Component, NgModule } from '@angular/core'; -import { IonicApp, IonicModule, NavController, MenuController, SplitPanel } from '../../../../../ionic-angular'; +import { IonicApp, IonicModule, NavController, MenuController, SplitPane } from '../../../../../ionic-angular'; @Component({ @@ -91,8 +91,8 @@ export class E2EApp { root = E2EPage; root2 = SidePage; - splitPanelChanged(splitPanel: SplitPanel) { - console.log('Split panel changed, visible: ', splitPanel.isVisible()); + splitPaneChanged(splitPane: SplitPane) { + console.log('Split pane changed, visible: ', splitPane.isVisible()); } } diff --git a/src/components/split-panel/test/basic/e2e.ts b/src/components/split-pane/test/basic/e2e.ts similarity index 100% rename from src/components/split-panel/test/basic/e2e.ts rename to src/components/split-pane/test/basic/e2e.ts diff --git a/src/components/split-panel/test/basic/main.html b/src/components/split-pane/test/basic/main.html similarity index 64% rename from src/components/split-panel/test/basic/main.html rename to src/components/split-pane/test/basic/main.html index 2a8a7837f32..0ccaf46b3d9 100644 --- a/src/components/split-panel/test/basic/main.html +++ b/src/components/split-pane/test/basic/main.html @@ -1,7 +1,7 @@ - + - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/split-panel/test/menus/app.module.ts b/src/components/split-pane/test/menus/app.module.ts similarity index 91% rename from src/components/split-panel/test/menus/app.module.ts rename to src/components/split-pane/test/menus/app.module.ts index fcb591612c1..7d817418cec 100644 --- a/src/components/split-panel/test/menus/app.module.ts +++ b/src/components/split-pane/test/menus/app.module.ts @@ -1,5 +1,5 @@ import { Component, NgModule } from '@angular/core'; -import { IonicApp, IonicModule, NavController, MenuController, SplitPanel } from '../../../../../ionic-angular'; +import { IonicApp, IonicModule, NavController, MenuController, SplitPane } from '../../../../../ionic-angular'; @Component({ template: ` @@ -75,8 +75,8 @@ export class E2EPage { export class E2EApp { root = E2EPage; - splitPanelChanged(splitPanel: SplitPanel) { - console.log('Split panel changed, visible: ', splitPanel.isVisible()); + splitPaneChanged(splitPane: SplitPane) { + console.log('Split pane changed, visible: ', splitPane.isVisible()); } } diff --git a/src/components/split-panel/test/menus/e2e.ts b/src/components/split-pane/test/menus/e2e.ts similarity index 100% rename from src/components/split-panel/test/menus/e2e.ts rename to src/components/split-pane/test/menus/e2e.ts diff --git a/src/components/split-panel/test/menus/main.html b/src/components/split-pane/test/menus/main.html similarity index 92% rename from src/components/split-panel/test/menus/main.html rename to src/components/split-pane/test/menus/main.html index f2e9eed2962..353e6131975 100644 --- a/src/components/split-panel/test/menus/main.html +++ b/src/components/split-pane/test/menus/main.html @@ -1,5 +1,5 @@ - + @@ -49,4 +49,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/split-panel/test/nested/app.module.ts b/src/components/split-pane/test/nested/app.module.ts similarity index 96% rename from src/components/split-panel/test/nested/app.module.ts rename to src/components/split-pane/test/nested/app.module.ts index d908b4f7d89..30827fcb39e 100644 --- a/src/components/split-panel/test/nested/app.module.ts +++ b/src/components/split-pane/test/nested/app.module.ts @@ -108,15 +108,15 @@ export class SidePage { @Component({ template: ` - + - + - + - + ` }) export class E2EPage { diff --git a/src/components/split-panel/test/nested/e2e.ts b/src/components/split-pane/test/nested/e2e.ts similarity index 100% rename from src/components/split-panel/test/nested/e2e.ts rename to src/components/split-pane/test/nested/e2e.ts diff --git a/src/components/split-panel/test/nested/main.html b/src/components/split-pane/test/nested/main.html similarity index 74% rename from src/components/split-panel/test/nested/main.html rename to src/components/split-pane/test/nested/main.html index e12db1d9de4..b7c24ede8d9 100644 --- a/src/components/split-panel/test/nested/main.html +++ b/src/components/split-pane/test/nested/main.html @@ -1,5 +1,5 @@ - + @@ -7,4 +7,4 @@ - + diff --git a/src/components/split-panel/test/tabs/app.module.ts b/src/components/split-pane/test/tabs/app.module.ts similarity index 100% rename from src/components/split-panel/test/tabs/app.module.ts rename to src/components/split-pane/test/tabs/app.module.ts diff --git a/src/components/split-panel/test/tabs/e2e.ts b/src/components/split-pane/test/tabs/e2e.ts similarity index 100% rename from src/components/split-panel/test/tabs/e2e.ts rename to src/components/split-pane/test/tabs/e2e.ts diff --git a/src/components/split-panel/test/tabs/main.html b/src/components/split-pane/test/tabs/main.html similarity index 84% rename from src/components/split-panel/test/tabs/main.html rename to src/components/split-pane/test/tabs/main.html index b622e415ace..342508f5a63 100644 --- a/src/components/split-panel/test/tabs/main.html +++ b/src/components/split-pane/test/tabs/main.html @@ -1,8 +1,8 @@ - + - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts index 4fcec9a06da..dd60f09147d 100644 --- a/src/components/tabs/tabs.ts +++ b/src/components/tabs/tabs.ts @@ -569,8 +569,8 @@ export class Tabs extends Ion implements AfterViewInit, RootNode { tab && tab.resize(); } - _setIsPanel(isPanel: boolean): void { - if (isPanel) { + _setIsPane(isPane: boolean): void { + if (isPane) { this.resize(); } } diff --git a/src/index.ts b/src/index.ts index e99dc18125d..cca9841cd7b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -106,7 +106,7 @@ import { ShowWhen, HideWhen } from './components/show-hide-when/show-hide-when'; import { Slide } from './components/slides/slide'; import { Slides } from './components/slides/slides'; import { Spinner } from './components/spinner/spinner'; -import { SplitPanel } from './components/split-panel/split-panel'; +import { SplitPane } from './components/split-pane/split-pane'; import { Tab } from './components/tabs/tab'; import { Tabs } from './components/tabs/tabs'; import { TabButton } from './components/tabs/tab-button'; @@ -192,7 +192,7 @@ export { ShowWhen, HideWhen, DisplayWhen } from './components/show-hide-when/sho export { Slide } from './components/slides/slide'; export { Slides } from './components/slides/slides'; export { Spinner } from './components/spinner/spinner'; -export { SplitPanel } from './components/split-panel/split-panel'; +export { SplitPane } from './components/split-pane/split-pane'; export { Tab } from './components/tabs/tab'; export { TabButton } from './components/tabs/tab-button'; export { TabHighlight } from './components/tabs/tab-highlight'; @@ -375,7 +375,7 @@ export { Transition } from './transitions/transition'; Slide, Slides, Spinner, - SplitPanel, + SplitPane, Tab, Tabs, TabButton, @@ -470,7 +470,7 @@ export { Transition } from './transitions/transition'; Slide, Slides, Spinner, - SplitPanel, + SplitPane, Tab, Tabs, TabButton, diff --git a/src/navigation/root-node.ts b/src/navigation/root-node.ts index d9632c51996..bb757281907 100644 --- a/src/navigation/root-node.ts +++ b/src/navigation/root-node.ts @@ -5,7 +5,7 @@ import { ElementRef } from '@angular/core'; */ export abstract class RootNode { abstract getElementRef(): ElementRef; - abstract _setIsPanel(isPanel: boolean): void; + abstract _setIsPane(isPane: boolean): void; abstract _isSideContent(): boolean; enabled: boolean; } diff --git a/src/themes/ionic.components.scss b/src/themes/ionic.components.scss index 8d6f044c1b3..3477a394ce0 100644 --- a/src/themes/ionic.components.scss +++ b/src/themes/ionic.components.scss @@ -191,10 +191,10 @@ "../components/slides/slides"; @import -"../components/split-panel/split-panel", -"../components/split-panel/split-panel.ios", -"../components/split-panel/split-panel.md", -"../components/split-panel/split-panel.wp"; +"../components/split-pane/split-pane", +"../components/split-pane/split-pane.ios", +"../components/split-pane/split-pane.md", +"../components/split-pane/split-pane.wp"; @import "../components/spinner/spinner",