UNPKG

@aurigma/design-atoms-model

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

126 lines 5.87 kB
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); }; import { EventObject } from "../../EventObject"; import { Property } from "../Decorators/Property"; import { PropertyChanged } from "../Decorators/PropertyChanged"; var ItemToolbarPermissions = /** @class */ (function () { function ItemToolbarPermissions(defaultValue) { if (defaultValue === void 0) { defaultValue = true; } this._showDeleteButton = true; this._showEditButton = true; this._showSelectButton = true; this._showEditButtonConstraint = null; this._showHandleButton = true; this.propertyChanged = new EventObject(); this.showSelectButtonConstraint = null; this.type = ItemToolbarPermissions.type; this.showDeleteButton = defaultValue; this.showEditButton = defaultValue; this.showSelectButton = defaultValue; this.showHandleButton = defaultValue; } Object.defineProperty(ItemToolbarPermissions.prototype, "showDeleteButton", { get: function () { return this._showDeleteButton; }, set: function (value) { if (this._showDeleteButton === value) return; this._showDeleteButton = value; this.propertyChanged.fire(); }, enumerable: true, configurable: true }); Object.defineProperty(ItemToolbarPermissions.prototype, "showEditButton", { get: function () { return this.showEditButtonConstraint != null ? this.showEditButtonConstraint : this._showEditButton; }, set: function (value) { if (this._showEditButton === value) return; this._showEditButton = value; this.propertyChanged.fire(); }, enumerable: true, configurable: true }); Object.defineProperty(ItemToolbarPermissions.prototype, "showEditButtonConstraint", { get: function () { return this._showEditButtonConstraint; }, set: function (value) { if (this.showEditButtonConstraint === value) return; this._showEditButtonConstraint = value; this.propertyChanged.fire(); }, enumerable: true, configurable: true }); Object.defineProperty(ItemToolbarPermissions.prototype, "showSelectButton", { get: function () { return this.showSelectButtonConstraint != null ? this.showSelectButtonConstraint : this._showSelectButton; }, set: function (value) { if (this._showSelectButton === value) return; this._showSelectButton = value; this.propertyChanged.fire(); }, enumerable: true, configurable: true }); ItemToolbarPermissions.prototype.getSimplifiedObject = function () { var result = {}; result["showDeleteButton"] = this.showDeleteButton; result["showEditButton"] = this.showEditButton; result["showSelectButton"] = this.showSelectButton; result["showEditButtonConstraint"] = this.showEditButtonConstraint; result["showSelectButtonConstraint"] = this.showSelectButtonConstraint; result["showHandleButton"] = this.showHandleButton; return result; }; ItemToolbarPermissions.prototype.clone = function () { var clone = new ItemToolbarPermissions(); clone.showDeleteButton = this._showDeleteButton; clone.showEditButton = this._showEditButton; clone.showEditButtonConstraint = this.showEditButtonConstraint; clone.showSelectButton = this._showSelectButton; clone.showSelectButtonConstraint = this.showSelectButtonConstraint; clone.showHandleButton = this._showHandleButton; return clone; }; ItemToolbarPermissions.prototype.equals = function (p) { return this.showDeleteButton == p.showDeleteButton && this.showEditButton === p.showEditButton && this.showEditButtonConstraint === p.showEditButtonConstraint && this.showSelectButton === p.showSelectButton && this.showSelectButtonConstraint === p.showSelectButtonConstraint && this.showHandleButton === p.showHandleButton; }; ItemToolbarPermissions.type = "ItemToolbarPermissions"; __decorate([ Property({ ignore: true, type: "boolean" }), __metadata("design:type", Boolean) ], ItemToolbarPermissions.prototype, "showSelectButtonConstraint", void 0); __decorate([ Property({ ignore: true }), __metadata("design:type", Boolean), __metadata("design:paramtypes", [Boolean]) ], ItemToolbarPermissions.prototype, "showEditButtonConstraint", null); __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], ItemToolbarPermissions.prototype, "showHandleButton", void 0); return ItemToolbarPermissions; }()); export { ItemToolbarPermissions }; //# sourceMappingURL=ItemToolbarPermissions.js.map