@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.
94 lines • 4.66 kB
JavaScript
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";
var GroupItemPermissions = /** @class */ (function () {
function GroupItemPermissions() {
this.propertyChanged = new EventObject();
this.allowReplaceContentConstraint = null;
this._allowReplaceContent = true;
this.allowUngroupContraint = null;
this._allowUngroup = true;
this.allowSelectNestedItemsContraint = null;
this._allowSelectNestedItems = true;
}
Object.defineProperty(GroupItemPermissions.prototype, "allowReplaceContent", {
get: function () {
return this.allowReplaceContentConstraint != null ? this.allowReplaceContentConstraint : this._allowReplaceContent;
},
set: function (value) {
if (this._allowReplaceContent === value)
return;
this._allowReplaceContent = value;
this.propertyChanged.notify();
},
enumerable: true,
configurable: true
});
Object.defineProperty(GroupItemPermissions.prototype, "allowUngroup", {
get: function () {
return this.allowUngroupContraint != null ? this.allowUngroupContraint : this._allowUngroup;
},
set: function (value) {
if (this._allowUngroup === value)
return;
this._allowUngroup = value;
this.propertyChanged.notify();
},
enumerable: true,
configurable: true
});
Object.defineProperty(GroupItemPermissions.prototype, "allowSelectNestedItems", {
get: function () {
return this.allowSelectNestedItemsContraint != null ? this.allowSelectNestedItemsContraint : this._allowSelectNestedItems;
},
set: function (value) {
if (this._allowSelectNestedItems === value)
return;
this._allowSelectNestedItems = value;
this.propertyChanged.notify();
},
enumerable: true,
configurable: true
});
GroupItemPermissions.prototype.getSimplifiedObject = function () {
var _a = this, _allowReplaceContent = _a._allowReplaceContent, _allowSelectNestedItems = _a._allowSelectNestedItems, _allowUngroup = _a._allowUngroup;
return {
allowReplaceContent: _allowReplaceContent,
allowSelectNestedItems: _allowSelectNestedItems,
allowUngroup: _allowUngroup
};
};
GroupItemPermissions.prototype.clone = function () {
var 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;
};
GroupItemPermissions.prototype.equals = function (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);
return GroupItemPermissions;
}());
export { GroupItemPermissions };
//# sourceMappingURL=GroupItemPermissions.js.map