UNPKG

ion-oui

Version:

The client library of oui builder for ionic

150 lines (149 loc) 7.49 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OUIIonFlexibleParser = exports.OUIIonFlexible = exports.OUIIonExpandedParser = exports.OUIIonExpanded = exports.OUIIonColumnComponentParser = exports.OUIIonColumComponent = exports.OUIIonRowComponentParser = exports.OUIIonRowComponent = void 0; var core_1 = require("@angular/core"); var oui_element_1 = require("../oui-element"); var oui_parser_1 = require("../oui-parser"); var OUIIonRowComponent = /** @class */ (function (_super) { __extends(OUIIonRowComponent, _super); function OUIIonRowComponent() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(OUIIonRowComponent.prototype, "deepStyle", { get: function () { return { 'width': this.data.mainAxisSize === 'max' ? '100%' : '', }; }, enumerable: false, configurable: true }); OUIIonRowComponent = __decorate([ (0, core_1.Component)({ selector: 'app-ion-oui-row', styleUrls: ['./o-ui.scss'], template: "\n <div class=\"o-ui-row\" [style.alignItems]=\"data.crossAxisAlignment\"\n [style.justifyContent]=\"data.mainAxisAlignment\">\n <app-ion-oui [mode]=\"mode\" *ngFor=\"let child of data.children\" [ngStyle]=\"{flexGrow: child.flex}\" [data]=\"child\" [onClick]=\"click\"></app-ion-oui>\n </div>\n " }) ], OUIIonRowComponent); return OUIIonRowComponent; }(oui_element_1.OUIIonElement)); exports.OUIIonRowComponent = OUIIonRowComponent; var OUIIonRowComponentParser = /** @class */ (function (_super) { __extends(OUIIonRowComponentParser, _super); function OUIIonRowComponentParser() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'Row'; _this.componentType = OUIIonRowComponent; return _this; } return OUIIonRowComponentParser; }(oui_parser_1.OUIAbstractIonParser)); exports.OUIIonRowComponentParser = OUIIonRowComponentParser; var OUIIonColumComponent = /** @class */ (function (_super) { __extends(OUIIonColumComponent, _super); function OUIIonColumComponent() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(OUIIonColumComponent.prototype, "deepStyle", { get: function () { return { 'height': this.data.mainAxisSize === 'max' ? '100%' : '', }; }, enumerable: false, configurable: true }); OUIIonColumComponent = __decorate([ (0, core_1.Component)({ selector: 'app-ion-oui-column', styleUrls: ['./o-ui.scss'], template: "\n <div class=\"o-ui-column\" [style.justifyContent]=\"data.mainAxisAlignment\" [style.alignItems]=\"data.crossAxisAlignment\">\n <app-ion-oui [mode]=\"mode\" [style.width]=\"'100%'\" *ngFor=\"let child of data.children\" [ngStyle]=\"{flexGrow: child.flex}\" [data]=\"child\" [onClick]=\"click\"></app-ion-oui>\n </div>\n" }) ], OUIIonColumComponent); return OUIIonColumComponent; }(oui_element_1.OUIIonElement)); exports.OUIIonColumComponent = OUIIonColumComponent; var OUIIonColumnComponentParser = /** @class */ (function (_super) { __extends(OUIIonColumnComponentParser, _super); function OUIIonColumnComponentParser() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'Column'; _this.componentType = OUIIonColumComponent; return _this; } return OUIIonColumnComponentParser; }(oui_parser_1.OUIAbstractIonParser)); exports.OUIIonColumnComponentParser = OUIIonColumnComponentParser; var OUIIonExpanded = /** @class */ (function (_super) { __extends(OUIIonExpanded, _super); function OUIIonExpanded() { return _super !== null && _super.apply(this, arguments) || this; } OUIIonExpanded = __decorate([ (0, core_1.Component)({ selector: 'app-ion-oui-expanded', template: "\n <div [style.flexGrow]=\"data.flex\" class=\"o-ui-expanded\">\n <app-ion-oui [mode]=\"mode\" *ngIf=\"data.child\" [data]=\"data.child\" [onClick]=\"click\"></app-ion-oui>\n </div>\n ", styleUrls: ['./o-ui.scss'], }) ], OUIIonExpanded); return OUIIonExpanded; }(oui_element_1.OUIIonElement)); exports.OUIIonExpanded = OUIIonExpanded; var OUIIonExpandedParser = /** @class */ (function (_super) { __extends(OUIIonExpandedParser, _super); function OUIIonExpandedParser() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'Expanded'; _this.componentType = OUIIonExpanded; return _this; } return OUIIonExpandedParser; }(oui_parser_1.OUIAbstractIonParser)); exports.OUIIonExpandedParser = OUIIonExpandedParser; var OUIIonFlexible = /** @class */ (function (_super) { __extends(OUIIonFlexible, _super); function OUIIonFlexible() { return _super !== null && _super.apply(this, arguments) || this; } OUIIonFlexible = __decorate([ (0, core_1.Component)({ selector: 'app-ion-oui-flexible', template: "\n <div [style.flexGrow]=\"data.flex\" class=\"o-ui-flexible\">\n <app-ion-oui [mode]=\"mode\" *ngIf=\"data.child\" [data]=\"data.child\" [onClick]=\"click\"></app-ion-oui>\n </div>\n ", styleUrls: ['./o-ui.scss'], }) ], OUIIonFlexible); return OUIIonFlexible; }(oui_element_1.OUIIonElement)); exports.OUIIonFlexible = OUIIonFlexible; var OUIIonFlexibleParser = /** @class */ (function (_super) { __extends(OUIIonFlexibleParser, _super); function OUIIonFlexibleParser() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'Flexible'; _this.componentType = OUIIonFlexible; return _this; } return OUIIonFlexibleParser; }(oui_parser_1.OUIAbstractIonParser)); exports.OUIIonFlexibleParser = OUIIonFlexibleParser;