-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: accordion has its own documentation now
- Loading branch information
Showing
25 changed files
with
188 additions
and
81 deletions.
There are no files selected for viewing
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
src/app/accordion/accordion-examples/accordion-examples.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AccordionExamplesComponent } from './accordion-examples.component'; | ||
|
||
describe('AccordionExamplesComponent', () => { | ||
let component: AccordionExamplesComponent; | ||
let fixture: ComponentFixture<AccordionExamplesComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [AccordionExamplesComponent], | ||
}).compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(AccordionExamplesComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
31 changes: 31 additions & 0 deletions
31
src/app/accordion/accordion-examples/accordion-examples.component.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{% from "../../macro.template.njk" import sanitize as sanitize %} | ||
|
||
{% set groupHtml %} | ||
{% include "../accordion-group-example/accordion-group-example.component.html" %} | ||
{% endset %} | ||
|
||
{% set groupTs %} | ||
{% include "../accordion-group-example/accordion-group-example.component.ts" %} | ||
{% endset %} | ||
|
||
{% set groupNestedHtml %} | ||
{% include "../accordion-nested-example/accordion-nested-example.component.html" %} | ||
{% endset %} | ||
|
||
{% set groupNestedTs %} | ||
{% include "../accordion-nested-example/accordion-nested-example.component.ts" %} | ||
{% endset %} | ||
|
||
<it-accordion-group-example></it-accordion-group-example> | ||
|
||
<it-source-display | ||
html="{$ sanitize(groupHtml) $}" | ||
typescript="{$ sanitize(groupTs) $}" > | ||
</it-source-display> | ||
|
||
<it-accordion-nested-example></it-accordion-nested-example> | ||
|
||
<it-source-display | ||
html="{$ sanitize(groupNestedHtml) $}" | ||
typescript="{$ sanitize(groupNestedTs) $}" > | ||
</it-source-display> |
10 changes: 10 additions & 0 deletions
10
src/app/accordion/accordion-examples/accordion-examples.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'it-accordion-examples', | ||
templateUrl: './accordion-examples.component.html', | ||
styleUrls: ['./accordion-examples.component.scss'], | ||
}) | ||
export class AccordionExamplesComponent { | ||
constructor() {} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ple/collapse-group-example.component.html → ...le/accordion-group-example.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
src/app/accordion/accordion-group-example/accordion-group-example.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AccordionGroupExampleComponent } from './accordion-group-example.component'; | ||
|
||
describe('AccordionGroupExampleComponent', () => { | ||
let component: AccordionGroupExampleComponent; | ||
let fixture: ComponentFixture<AccordionGroupExampleComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [AccordionGroupExampleComponent], | ||
}).compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(AccordionGroupExampleComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
8 changes: 8 additions & 0 deletions
8
src/app/accordion/accordion-group-example/accordion-group-example.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'it-accordion-group-example', | ||
templateUrl: './accordion-group-example.component.html', | ||
styleUrls: ['./accordion-group-example.component.scss'], | ||
}) | ||
export class AccordionGroupExampleComponent {} |
12 changes: 12 additions & 0 deletions
12
src/app/accordion/accordion-index/accordion-index.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<h1 class="bd-title">Accordion</h1> | ||
<p class="bd-lead">Direttiva per l'interazione con elementi richiudibili</p> | ||
<div [innerHTML]="accordionComponent.description"></div> | ||
<it-tab-container> | ||
<it-tab-item label="Esempi" active="true" class="pt-3"> | ||
<it-accordion-examples></it-accordion-examples> | ||
</it-tab-item> | ||
<it-tab-item label="API" class="pt-3"> | ||
<h2>Accordion</h2> | ||
<it-api-parameters [component]="accordionComponent"></it-api-parameters> | ||
</it-tab-item> | ||
</it-tab-container> |
Empty file.
24 changes: 24 additions & 0 deletions
24
src/app/accordion/accordion-index/accordion-index.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AccordionIndexComponent } from './accordion-index.component'; | ||
|
||
describe('AccordionIndexComponent', () => { | ||
let component: AccordionIndexComponent; | ||
let fixture: ComponentFixture<AccordionIndexComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [AccordionIndexComponent], | ||
}).compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(AccordionIndexComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
src/app/accordion/accordion-index/accordion-index.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component } from '@angular/core'; | ||
import Documentation from '../../../assets/documentation.json'; | ||
|
||
@Component({ | ||
selector: 'it-accordion-index', | ||
templateUrl: './accordion-index.component.html', | ||
styleUrls: ['./accordion-index.component.scss'], | ||
}) | ||
export class AccordionIndexComponent { | ||
accordionComponent: any; | ||
|
||
constructor() { | ||
this.accordionComponent = (<any>Documentation).components.find(component => component.name === 'ItAccordionComponent'); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...le/collapse-nested-example.component.html → ...e/accordion-nested-example.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
8 changes: 4 additions & 4 deletions
8
...mple/collapse-nested-example.component.ts → ...ple/accordion-nested-example.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
import { AccordionIndexComponent } from './accordion-index/accordion-index.component'; | ||
|
||
const routes: Routes = [{ path: '', component: AccordionIndexComponent }]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule], | ||
}) | ||
export class AccordionRoutingModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { AccordionRoutingModule } from './accordion-routing.module'; | ||
import { AccordionExamplesComponent } from './accordion-examples/accordion-examples.component'; | ||
import { AccordionIndexComponent } from './accordion-index/accordion-index.component'; | ||
import { SharedModule } from '../shared/shared.module'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { AccordionGroupExampleComponent } from './accordion-group-example/accordion-group-example.component'; | ||
import { AccordionNestedExampleComponent } from './accordion-nested-example/accordion-nested-example.component'; | ||
|
||
@NgModule({ | ||
imports: [CommonModule, FormsModule, SharedModule, AccordionRoutingModule], | ||
declarations: [AccordionExamplesComponent, AccordionIndexComponent, AccordionGroupExampleComponent, AccordionNestedExampleComponent], | ||
}) | ||
export class AccordionModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
src/app/collapse/collapse-group-example/collapse-group-example.component.spec.ts
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/app/collapse/collapse-group-example/collapse-group-example.component.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters