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.

80 lines 3.83 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"; export class GroupItemPermissions { constructor() { this.propertyChanged = new EventObject(); this.allowReplaceContentConstraint = null; this._allowReplaceContent = true; this.allowUngroupContraint = null; this._allowUngroup = true; this.allowSelectNestedItemsContraint = null; this._allowSelectNestedItems = true; } get allowReplaceContent() { return this.allowReplaceContentConstraint != null ? this.allowReplaceContentConstraint : this._allowReplaceContent; } set allowReplaceContent(value) { if (this._allowReplaceContent === value) return; this._allowReplaceContent = value; this.propertyChanged.notify(); } get allowUngroup() { return this.allowUngroupContraint != null ? this.allowUngroupContraint : this._allowUngroup; } set allowUngroup(value) { if (this._allowUngroup === value) return; this._allowUngroup = value; this.propertyChanged.notify(); } get allowSelectNestedItems() { return this.allowSelectNestedItemsContraint != null ? this.allowSelectNestedItemsContraint : this._allowSelectNestedItems; } set allowSelectNestedItems(value) { if (this._allowSelectNestedItems === value) return; this._allowSelectNestedItems = value; this.propertyChanged.notify(); } getSimplifiedObject() { const { _allowReplaceContent, _allowSelectNestedItems, _allowUngroup } = this; return { allowReplaceContent: _allowReplaceContent, allowSelectNestedItems: _allowSelectNestedItems, allowUngroup: _allowUngroup }; } clone() { const clone = new GroupItemPermissions(); clone.allowReplaceContent = this._allowReplaceContent; clone.allowReplaceContentConstraint = this.allowReplaceContentConstraint; clone.allowSelectNestedItems = this._allowSelectNestedItems; clone.allowSelectNestedItemsContraint = this.allowSelectNestedItemsContraint; clone.allowUngroup = this._allowUngroup; clone.allowUngroupContraint = this.allowUngroupContraint; return clone; } equals(p) { return this.allowReplaceContent === p.allowReplaceContent && this.allowReplaceContentConstraint === p.allowReplaceContentConstraint && this.allowSelectNestedItems === p.allowSelectNestedItems && this.allowSelectNestedItemsContraint === p.allowSelectNestedItemsContraint && this.allowUngroup === p.allowUngroup && this.allowUngroupContraint === p.allowUngroupContraint; } } __decorate([ Property({ ignore: true }), __metadata("design:type", Boolean) ], GroupItemPermissions.prototype, "allowReplaceContentConstraint", void 0); //# sourceMappingURL=GroupItemPermissions.js.map