Skip to content

Commit

Permalink
Implemented showcase doc for input-switch component
Browse files Browse the repository at this point in the history
  • Loading branch information
gjovanovicst committed Nov 11, 2023
1 parent 15734b2 commit f94ebb0
Show file tree
Hide file tree
Showing 40 changed files with 1,416 additions and 466 deletions.
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anywhere-ui/angular",
"version": "0.4.0+21",
"version": "0.4.0+22",
"license": "MIT",
"keywords": [
"anywhere-ui",
Expand Down Expand Up @@ -66,5 +66,5 @@
"tslint": "~6.1.3",
"typescript": "4.9.5"
},
"buildnum": "21"
"buildnum": "22"
}
4 changes: 2 additions & 2 deletions packages/angular/projects/anywhere-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anywhere-ui/angular",
"version": "0.4.0+21",
"version": "0.4.0+22",
"license": "MIT",
"keywords": [
"anywhere-ui",
Expand Down Expand Up @@ -33,5 +33,5 @@
"@anywhere-ui/core": "^0.3.0",
"@anywhere-ui/flex": "^1.0.2"
},
"buildnum": "21"
"buildnum": "22"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ export const proxyInputs = (Cmp: any, inputs: string[]) => {
set(val: any) {
this.z.runOutsideAngular(() => (this.el[item] = val));
},
/**
* In the event that proxyInputs is called
* multiple times re-defining these inputs
* will cause an error to be thrown. As a result
* we set configurable: true to indicate these
* properties can be changed.
*/
configurable: true,
});
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1082,3 +1082,69 @@ export class DropdownVirtualScroll {
export declare interface DropdownVirtualScroll extends Components.DropdownVirtualScroll {}


@ProxyCmp({
inputs: ['textId', 'textTitle']
})
@Component({
selector: 'input-switch-basic',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['textId', 'textTitle'],
})
export class InputSwitchBasic {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
}
}


export declare interface InputSwitchBasic extends Components.InputSwitchBasic {}


@ProxyCmp({
inputs: ['textId', 'textTitle']
})
@Component({
selector: 'input-switch-disabled',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['textId', 'textTitle'],
})
export class InputSwitchDisabled {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
}
}


export declare interface InputSwitchDisabled extends Components.InputSwitchDisabled {}


@ProxyCmp({
inputs: ['textId', 'textTitle']
})
@Component({
selector: 'input-switch-preselection',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['textId', 'textTitle'],
})
export class InputSwitchPreselection {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
}
}


export declare interface InputSwitchPreselection extends Components.InputSwitchPreselection {}


Loading

0 comments on commit f94ebb0

Please sign in to comment.