UNPKG

@viewdo/dxp-story-cli

Version:

DXP Story Management CLI

91 lines 3.57 kB
"use strict"; 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; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DataPoint = void 0; const class_transformer_1 = require("class-transformer"); const DisplayType_1 = require("./DisplayType"); const DataTree_1 = require("./DataTree"); const OptionItem_1 = require("./OptionItem"); let DataPoint = class DataPoint { constructor(dataPoint) { /** * The display-type when presenting this input on a page */ this.display = DisplayType_1.DisplayType.TextShort; /** * Mark this true to force this value be set when creating an experience. */ this.required = false; /** * If the display-type is Options, these are the list of values the user will select from. */ this.options = []; /** * An object that describes a set of cascading options. * @nullable * */ this.dataTree = null; /** * An whose name and values are assigned to the underlying HTML input. * */ this.attributes = {}; Object.assign(this, dataPoint); } }; exports.DataPoint = DataPoint; __decorate([ (0, class_transformer_1.Expose)(), __metadata("design:type", String) ], DataPoint.prototype, "key", void 0); __decorate([ (0, class_transformer_1.Expose)(), __metadata("design:type", String) ], DataPoint.prototype, "name", void 0); __decorate([ (0, class_transformer_1.Expose)(), __metadata("design:type", String) ], DataPoint.prototype, "display", void 0); __decorate([ (0, class_transformer_1.Expose)(), __metadata("design:type", String) ], DataPoint.prototype, "tip", void 0); __decorate([ (0, class_transformer_1.Expose)(), __metadata("design:type", String) ], DataPoint.prototype, "description", void 0); __decorate([ (0, class_transformer_1.Expose)(), __metadata("design:type", Boolean) ], DataPoint.prototype, "required", void 0); __decorate([ (0, class_transformer_1.Expose)(), (0, class_transformer_1.Type)(() => OptionItem_1.OptionItem), __metadata("design:type", Array) ], DataPoint.prototype, "options", void 0); __decorate([ (0, class_transformer_1.Expose)(), (0, class_transformer_1.Type)(() => DataTree_1.DataTree), __metadata("design:type", DataTree_1.DataTree) ], DataPoint.prototype, "dataTree", void 0); __decorate([ (0, class_transformer_1.Expose)(), __metadata("design:type", Object) ], DataPoint.prototype, "attributes", void 0); __decorate([ (0, class_transformer_1.Expose)(), __metadata("design:type", Object) ], DataPoint.prototype, "value", void 0); exports.DataPoint = DataPoint = __decorate([ (0, class_transformer_1.Exclude)(), __metadata("design:paramtypes", [Object]) ], DataPoint); //# sourceMappingURL=DataPoint.js.map