diff --git a/demo/src/app/components/+alerts/alerts-section.list.ts b/demo/src/app/components/+alerts/alerts-section.list.ts index 431e6b032d..38e0ca80d6 100644 --- a/demo/src/app/components/+alerts/alerts-section.list.ts +++ b/demo/src/app/components/+alerts/alerts-section.list.ts @@ -39,8 +39,7 @@ export const demoComponentContent: ContentSection[] = [ description: `

Alerts are available for any length of text, as well as an optional dismiss button. For proper styling, use one of the four required contextual classes (e.g., .alert-success). For inline - dismissal, use the dismiss - property.

`, + dismissal, use the dismissible property.

`, component: require('!!raw-loader?lang=typescript!./demos/basic/basic'), html: require('!!raw-loader?lang=markup!./demos/basic/basic.html'), outlet: DemoAlertBasicComponent diff --git a/demo/src/app/components/+collapse/collapse-section.list.ts b/demo/src/app/components/+collapse/collapse-section.list.ts index 87d73a3ccf..bbd39daa3a 100644 --- a/demo/src/app/components/+collapse/collapse-section.list.ts +++ b/demo/src/app/components/+collapse/collapse-section.list.ts @@ -1,5 +1,6 @@ import { CollapseDemoComponent } from './demos/basic/basic'; import { ToggleManualDemoComponent } from './demos/toggle-manual/toggle-manual'; +import { CollapseDemoEventsComponent } from './demos/events/events'; import { ContentSection } from '../../docs/models/content-section.model'; import { DemoTopSectionComponent } from '../../docs/demo-section-components/demo-top-section/index'; @@ -30,6 +31,15 @@ export const demoComponentContent: ContentSection[] = [ html: require('!!raw-loader?lang=markup!./demos/basic/basic.html'), outlet: CollapseDemoComponent }, + { + title: 'Events', + anchor: 'events', + component: require('!!raw-loader?lang=typescript!./demos/events/events'), + html: require('!!raw-loader?lang=markup!./demos/events/events.html'), + description: `Collapse directive exposes 2 events: collapsed, that fires when a content was hidden, + and expanded, that fires when a content was shown`, + outlet: CollapseDemoEventsComponent + }, { title: 'Manual toggle', anchor: 'manual-toggle', diff --git a/demo/src/app/components/+collapse/demos/basic/basic.html b/demo/src/app/components/+collapse/demos/basic/basic.html index fc68006f1a..924540b4c3 100644 --- a/demo/src/app/components/+collapse/demos/basic/basic.html +++ b/demo/src/app/components/+collapse/demos/basic/basic.html @@ -2,9 +2,6 @@ (click)="isCollapsed = !isCollapsed">Toggle collapse
-
+
Some content
diff --git a/demo/src/app/components/+collapse/demos/basic/basic.ts b/demo/src/app/components/+collapse/demos/basic/basic.ts index 1ba3b8b3b2..8e3c87e2b2 100644 --- a/demo/src/app/components/+collapse/demos/basic/basic.ts +++ b/demo/src/app/components/+collapse/demos/basic/basic.ts @@ -5,13 +5,5 @@ import { Component } from '@angular/core'; templateUrl: './basic.html' }) export class CollapseDemoComponent { - isCollapsed: boolean = false; - - collapsed(event: any): void { - console.log(event); - } - - expanded(event: any): void { - console.log(event); - } + isCollapsed = false; } diff --git a/demo/src/app/components/+collapse/demos/events/events.html b/demo/src/app/components/+collapse/demos/events/events.html new file mode 100644 index 0000000000..e639612bed --- /dev/null +++ b/demo/src/app/components/+collapse/demos/events/events.html @@ -0,0 +1,17 @@ +
+
+ +
+
+
Event: {{message}}
+
+
+
+
+
Some content
+
diff --git a/demo/src/app/components/+collapse/demos/events/events.ts b/demo/src/app/components/+collapse/demos/events/events.ts new file mode 100644 index 0000000000..759d80125e --- /dev/null +++ b/demo/src/app/components/+collapse/demos/events/events.ts @@ -0,0 +1,18 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'collapse-demo-events', + templateUrl: './events.html' +}) +export class CollapseDemoEventsComponent { + isCollapsed = false; + message: string; + + collapsed(): void { + this.message = 'collapsed'; + } + + expanded(): void { + this.message = 'expanded'; + } +} diff --git a/demo/src/app/components/+collapse/demos/index.ts b/demo/src/app/components/+collapse/demos/index.ts index 537e939678..f62c5b51a6 100644 --- a/demo/src/app/components/+collapse/demos/index.ts +++ b/demo/src/app/components/+collapse/demos/index.ts @@ -1,9 +1,11 @@ import { CollapseDemoComponent } from './basic/basic'; import { ToggleManualDemoComponent } from './toggle-manual/toggle-manual'; +import { CollapseDemoEventsComponent } from './events/events'; import { DemoAccessibilityComponent } from './accessibility/accessibility'; export const DEMO_COMPONENTS = [ CollapseDemoComponent, + CollapseDemoEventsComponent, ToggleManualDemoComponent, DemoAccessibilityComponent ]; diff --git a/demo/src/app/components/+datepicker/datepicker-section.list.ts b/demo/src/app/components/+datepicker/datepicker-section.list.ts index 2668a85554..baeacc196c 100644 --- a/demo/src/app/components/+datepicker/datepicker-section.list.ts +++ b/demo/src/app/components/+datepicker/datepicker-section.list.ts @@ -147,11 +147,11 @@ export const demoComponentContent: ContentSection[] = [ outlet: DemoDatepickerMinMaxComponent }, { - title: 'Disabled (scratch, WIP)', + title: 'Disabled', anchor: 'disabled-datepicker', component: require('!!raw-loader?lang=typescript!./demos/disabled/disabled.component.ts'), html: require('!!raw-loader?lang=markup!./demos/disabled/disabled.component.html'), - description: `

If you want to disable datepicker set isDisabled property to true

`, + description: `

If you want to disable datepicker's or daterangepicker's content set isDisabled property to true

`, outlet: DemoDatepickerDisabledComponent }, { @@ -160,7 +160,8 @@ export const demoComponentContent: ContentSection[] = [ component: require('!!raw-loader?lang=typescript!./demos/forms/forms.component.ts'), html: require('!!raw-loader?lang=markup!./demos/forms/forms.component.html'), description: `

Datepicker and daterangepicker can be used in forms. Keep in mind that - value of ngModel is Date object (array of 2 object for daterangepicker)

`, + value of ngModel is Date object for datepicker and array of 2 + Date objects for daterangepicker

`, outlet: DemoDatepickerFormsComponent }, { diff --git a/demo/src/app/components/+datepicker/demos/date-initial-state/date-initial-state.html b/demo/src/app/components/+datepicker/demos/date-initial-state/date-initial-state.html index e34993e8a5..eb006e2589 100644 --- a/demo/src/app/components/+datepicker/demos/date-initial-state/date-initial-state.html +++ b/demo/src/app/components/+datepicker/demos/date-initial-state/date-initial-state.html @@ -1,4 +1,4 @@ -

bsValue property sets initial state in this example

+

bsValue property sets initial state in this example

-

ngModel property sets two-way data binding in this example

+

ngModel property sets two-way data binding in this example

diff --git a/demo/src/app/components/+datepicker/demos/disabled/disabled.component.html b/demo/src/app/components/+datepicker/demos/disabled/disabled.component.html index 16c9405d94..cabd39b359 100644 --- a/demo/src/app/components/+datepicker/demos/disabled/disabled.component.html +++ b/demo/src/app/components/+datepicker/demos/disabled/disabled.component.html @@ -1,9 +1,13 @@
- +
- + +
+
+
- diff --git a/demo/src/app/components/+datepicker/demos/disabled/disabled.component.ts b/demo/src/app/components/+datepicker/demos/disabled/disabled.component.ts index 8e0a49cff5..b5e164a2c0 100644 --- a/demo/src/app/components/+datepicker/demos/disabled/disabled.component.ts +++ b/demo/src/app/components/+datepicker/demos/disabled/disabled.component.ts @@ -6,4 +6,8 @@ import { Component } from '@angular/core'; }) export class DemoDatepickerDisabledComponent { isDisabled = false; + + toggleDisabling(): void { + this.isDisabled = !this.isDisabled; + } } diff --git a/demo/src/app/components/+datepicker/demos/placement/placement.html b/demo/src/app/components/+datepicker/demos/placement/placement.html index a6d56a3226..499a072a9b 100644 --- a/demo/src/app/components/+datepicker/demos/placement/placement.html +++ b/demo/src/app/components/+datepicker/demos/placement/placement.html @@ -1,27 +1,27 @@
- +

The datepicker's placement is right

- +

The datepicker's placement is top

- +

The datepicker's placement is bottom

- +

The datepicker's placement is left

Open a modal

-
{{message}}
+
{{message}}