UNPKG

ng-zorro-antd-mobile

Version:

An enterprise-class mobile UI components based on Ant Design and Angular

237 lines (232 loc) 11.2 kB
import * as i0 from '@angular/core'; import { Component, ViewEncapsulation, Input, HostBinding, NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; class FlexComponent { set direction(value) { this._direction = value; } set wrap(value) { this._wrap = value; } set justify(value) { this._justify = value; } set align(value) { this.defaultProps.align = value; } set alignContent(value) { this._alignContent = value; } get amFlexboxDirRow() { return this._direction === 'row'; } get amFlexboxDirRowReverse() { return this._direction === 'row-reverse'; } get amFlexboxDirColumn() { return this._direction === 'column'; } get amFlexboxDirColumnReverse() { return this._direction === 'column-reverse'; } get amFlexboxNowrap() { return this._wrap === 'nowrap'; } get amFlexboxWrap() { return this._wrap === 'wrap'; } get amFlexboxWrapReverse() { return this._wrap === 'wrap-reverse'; } get amFlexboxJustifyStart() { return this._justify === 'start'; } get amFlexboxJustifyCenter() { return this._justify === 'center'; } get amFlexboxJustifyEnd() { return this._justify === 'end'; } get amFlexboxJustifyBetween() { return this._justify === 'between'; } get amFlexboxAlignAround() { return this._justify === 'around'; } get amFlexboxAlignStart() { return this.defaultProps.align === 'start'; } get amFlexboxAlignCenter() { return this.defaultProps.align === 'center'; } get amFlexboxAlignEnd() { return this.defaultProps.align === 'end'; } get amFlexboxAlignBaseline() { return this.defaultProps.align === 'baseline'; } get amFlexboxAlignStretch() { return this.defaultProps.align === 'stretch'; } get amFlexboxAlignContentStart() { return this._alignContent === 'start'; } get amFlexboxAlignCotentCenter() { return this._alignContent === 'center'; } get amFlexboxAlignContentEnd() { return this._alignContent === 'end'; } get amFlexboxAlignContentBetween() { return this._alignContent === 'between'; } get amFlexboxAlignContentAround() { return this._alignContent === 'around'; } get amFlexboxAlignContentStretch() { return this._alignContent === 'stretch'; } constructor() { this.defaultProps = { prefixCls: 'am-flexbox', align: 'center' }; // _wrapCls = {}; this._direction = ''; this._justify = ''; this._alignContent = ''; this.amFlexbox = true; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FlexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: FlexComponent, selector: "Flex, nzm-flex", inputs: { direction: "direction", wrap: "wrap", justify: "justify", align: "align", alignContent: "alignContent" }, host: { properties: { "class.am-flexbox": "this.amFlexbox", "class.am-flexbox-dir-row": "this.amFlexboxDirRow", "class.am-flexbox-dir-row-reverse": "this.amFlexboxDirRowReverse", "class.am-flexbox-dir-column": "this.amFlexboxDirColumn", "class.am-flexbox-dir-column-reverse": "this.amFlexboxDirColumnReverse", "class.am-flexbox-nowrap": "this.amFlexboxNowrap", "class.am-flexbox-wrap": "this.amFlexboxWrap", "class.am-flexbox-wrap-reverse": "this.amFlexboxWrapReverse", "class.am-flexbox-justify-start": "this.amFlexboxJustifyStart", "class.am-flexbox-justify-center": "this.amFlexboxJustifyCenter", "class.am-flexbox-justify-end": "this.amFlexboxJustifyEnd", "class.am-flexbox-justify-between": "this.amFlexboxJustifyBetween", "class.am-flexbox-justify-around": "this.amFlexboxAlignAround", "class.am-flexbox-align-start": "this.amFlexboxAlignStart", "class.am-flexbox-align-center": "this.amFlexboxAlignCenter", "class.am-flexbox-align-end": "this.amFlexboxAlignEnd", "class.am-flexbox-align-baseline": "this.amFlexboxAlignBaseline", "class.am-flexbox-align-stretch": "this.amFlexboxAlignStretch", "class.am-flexbox-align-content-start": "this.amFlexboxAlignContentStart", "class.am-flexbox-align-content-center": "this.amFlexboxAlignCotentCenter", "class.am-flexbox-align-content-end": "this.amFlexboxAlignContentEnd", "class.am-flexbox-align-content-between": "this.amFlexboxAlignContentBetween", "class.am-flexbox-align-content-around": "this.amFlexboxAlignContentAround", "class.am-flexbox-align-content-stretch": "this.amFlexboxAlignContentStretch" } }, ngImport: i0, template: "<ng-content></ng-content>\n", encapsulation: i0.ViewEncapsulation.None }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FlexComponent, decorators: [{ type: Component, args: [{ selector: 'Flex, nzm-flex', encapsulation: ViewEncapsulation.None, template: "<ng-content></ng-content>\n" }] }], ctorParameters: () => [], propDecorators: { direction: [{ type: Input }], wrap: [{ type: Input }], justify: [{ type: Input }], align: [{ type: Input }], alignContent: [{ type: Input }], amFlexbox: [{ type: HostBinding, args: ['class.am-flexbox'] }], amFlexboxDirRow: [{ type: HostBinding, args: ['class.am-flexbox-dir-row'] }], amFlexboxDirRowReverse: [{ type: HostBinding, args: ['class.am-flexbox-dir-row-reverse'] }], amFlexboxDirColumn: [{ type: HostBinding, args: ['class.am-flexbox-dir-column'] }], amFlexboxDirColumnReverse: [{ type: HostBinding, args: ['class.am-flexbox-dir-column-reverse'] }], amFlexboxNowrap: [{ type: HostBinding, args: ['class.am-flexbox-nowrap'] }], amFlexboxWrap: [{ type: HostBinding, args: ['class.am-flexbox-wrap'] }], amFlexboxWrapReverse: [{ type: HostBinding, args: ['class.am-flexbox-wrap-reverse'] }], amFlexboxJustifyStart: [{ type: HostBinding, args: ['class.am-flexbox-justify-start'] }], amFlexboxJustifyCenter: [{ type: HostBinding, args: ['class.am-flexbox-justify-center'] }], amFlexboxJustifyEnd: [{ type: HostBinding, args: ['class.am-flexbox-justify-end'] }], amFlexboxJustifyBetween: [{ type: HostBinding, args: ['class.am-flexbox-justify-between'] }], amFlexboxAlignAround: [{ type: HostBinding, args: ['class.am-flexbox-justify-around'] }], amFlexboxAlignStart: [{ type: HostBinding, args: ['class.am-flexbox-align-start'] }], amFlexboxAlignCenter: [{ type: HostBinding, args: ['class.am-flexbox-align-center'] }], amFlexboxAlignEnd: [{ type: HostBinding, args: ['class.am-flexbox-align-end'] }], amFlexboxAlignBaseline: [{ type: HostBinding, args: ['class.am-flexbox-align-baseline'] }], amFlexboxAlignStretch: [{ type: HostBinding, args: ['class.am-flexbox-align-stretch'] }], amFlexboxAlignContentStart: [{ type: HostBinding, args: ['class.am-flexbox-align-content-start'] }], amFlexboxAlignCotentCenter: [{ type: HostBinding, args: ['class.am-flexbox-align-content-center'] }], amFlexboxAlignContentEnd: [{ type: HostBinding, args: ['class.am-flexbox-align-content-end'] }], amFlexboxAlignContentBetween: [{ type: HostBinding, args: ['class.am-flexbox-align-content-between'] }], amFlexboxAlignContentAround: [{ type: HostBinding, args: ['class.am-flexbox-align-content-around'] }], amFlexboxAlignContentStretch: [{ type: HostBinding, args: ['class.am-flexbox-align-content-stretch'] }] } }); class FlexItemComponent { constructor() { this.defaultProps = { prefixCls: 'am-flexbox', align: 'center' }; this.flexboxItem = true; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FlexItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: FlexItemComponent, selector: "FlexItem, nzm-flex-item", host: { properties: { "class.am-flexbox-item": "this.flexboxItem" } }, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, encapsulation: i0.ViewEncapsulation.None }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FlexItemComponent, decorators: [{ type: Component, args: [{ selector: 'FlexItem, nzm-flex-item', template: ` <ng-content></ng-content> `, encapsulation: ViewEncapsulation.None }] }], propDecorators: { flexboxItem: [{ type: HostBinding, args: ['class.am-flexbox-item'] }] } }); class FlexModule { static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FlexModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); } static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: FlexModule, declarations: [FlexComponent, FlexItemComponent], imports: [CommonModule], exports: [FlexComponent, FlexItemComponent] }); } static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FlexModule, imports: [CommonModule] }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FlexModule, decorators: [{ type: NgModule, args: [{ imports: [CommonModule], exports: [FlexComponent, FlexItemComponent], declarations: [FlexComponent, FlexItemComponent] }] }] }); /** * Generated bundle index. Do not edit. */ export { FlexComponent, FlexItemComponent, FlexModule }; //# sourceMappingURL=ng-zorro-antd-mobile-flex.mjs.map