-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate new Angular configuration components (#28015)
- Loading branch information
Showing
1,113 changed files
with
147,909 additions
and
416 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './item-dxi'; | ||
|
143 changes: 143 additions & 0 deletions
143
packages/devextreme-angular/src/ui/accordion/nested/item-dxi.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,143 @@ | ||
/* tslint:disable:max-line-length */ | ||
|
||
|
||
import { | ||
Component, | ||
NgModule, | ||
Host, | ||
ElementRef, | ||
Renderer2, | ||
Inject, | ||
AfterViewInit, | ||
SkipSelf, | ||
Input | ||
} from '@angular/core'; | ||
|
||
import { DOCUMENT } from '@angular/common'; | ||
|
||
|
||
|
||
import { | ||
NestedOptionHost, | ||
extractTemplate, | ||
DxTemplateDirective, | ||
IDxTemplateHost, | ||
DxTemplateHost | ||
} from 'devextreme-angular/core'; | ||
import { CollectionNestedOption } from 'devextreme-angular/core'; | ||
|
||
|
||
@Component({ | ||
selector: 'dxi-accordion-item', | ||
template: '<ng-content></ng-content>', | ||
styles: [':host { display: block; }'], | ||
providers: [NestedOptionHost, DxTemplateHost] | ||
}) | ||
export class DxiAccordionItemComponent extends CollectionNestedOption implements AfterViewInit, | ||
IDxTemplateHost { | ||
@Input() | ||
get disabled(): boolean { | ||
return this._getOption('disabled'); | ||
} | ||
set disabled(value: boolean) { | ||
this._setOption('disabled', value); | ||
} | ||
|
||
@Input() | ||
get html(): string { | ||
return this._getOption('html'); | ||
} | ||
set html(value: string) { | ||
this._setOption('html', value); | ||
} | ||
|
||
@Input() | ||
get icon(): string { | ||
return this._getOption('icon'); | ||
} | ||
set icon(value: string) { | ||
this._setOption('icon', value); | ||
} | ||
|
||
@Input() | ||
get template(): any { | ||
return this._getOption('template'); | ||
} | ||
set template(value: any) { | ||
this._setOption('template', value); | ||
} | ||
|
||
@Input() | ||
get text(): string { | ||
return this._getOption('text'); | ||
} | ||
set text(value: string) { | ||
this._setOption('text', value); | ||
} | ||
|
||
@Input() | ||
get title(): string { | ||
return this._getOption('title'); | ||
} | ||
set title(value: string) { | ||
this._setOption('title', value); | ||
} | ||
|
||
@Input() | ||
get titleTemplate(): any { | ||
return this._getOption('titleTemplate'); | ||
} | ||
set titleTemplate(value: any) { | ||
this._setOption('titleTemplate', value); | ||
} | ||
|
||
@Input() | ||
get visible(): boolean { | ||
return this._getOption('visible'); | ||
} | ||
set visible(value: boolean) { | ||
this._setOption('visible', value); | ||
} | ||
|
||
|
||
protected get _optionPath() { | ||
return 'items'; | ||
} | ||
|
||
|
||
constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost, | ||
@Host() optionHost: NestedOptionHost, | ||
private renderer: Renderer2, | ||
@Inject(DOCUMENT) private document: any, | ||
@Host() templateHost: DxTemplateHost, | ||
private element: ElementRef) { | ||
super(); | ||
parentOptionHost.setNestedOption(this); | ||
optionHost.setHost(this, this._fullOptionPath.bind(this)); | ||
templateHost.setHost(this); | ||
} | ||
|
||
setTemplate(template: DxTemplateDirective) { | ||
this.template = template; | ||
} | ||
ngAfterViewInit() { | ||
extractTemplate(this, this.element, this.renderer, this.document); | ||
} | ||
|
||
|
||
|
||
ngOnDestroy() { | ||
this._deleteRemovedOptions(this._fullOptionPath()); | ||
} | ||
|
||
} | ||
|
||
@NgModule({ | ||
declarations: [ | ||
DxiAccordionItemComponent | ||
], | ||
exports: [ | ||
DxiAccordionItemComponent | ||
], | ||
}) | ||
export class DxiAccordionItemModule { } |
5 changes: 5 additions & 0 deletions
5
packages/devextreme-angular/src/ui/accordion/nested/ng-package.json
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,5 @@ | ||
{ | ||
"lib": { | ||
"entryFile": "index.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
2 changes: 2 additions & 0 deletions
2
packages/devextreme-angular/src/ui/action-sheet/nested/index.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,2 @@ | ||
export * from './item-dxi'; | ||
|
Oops, something went wrong.