@sitecore/sc-contenthub-webclient-sdk
Version:
Sitecore Content Hub WebClient SDK.
50 lines • 2.21 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);
};
var RelationSpecification_1;
import { JsonObject, JsonProperty, OnDeserialized } from "ta-json";
let RelationSpecification = RelationSpecification_1 = class RelationSpecification {
constructor(name, role) {
this.role = null;
this.name = name;
this.role = role !== null && role !== void 0 ? role : null;
}
deepClone() {
return new RelationSpecification_1(this.name, this.role);
}
deepEquals(other) {
if (!other)
return false;
return other.name === this.name && ((!other.role && !this.role) || other.role === this.role);
}
onDeserialized() {
var _a;
this.role = (_a = this.role) !== null && _a !== void 0 ? _a : null;
}
};
__decorate([
JsonProperty("name"),
__metadata("design:type", String)
], RelationSpecification.prototype, "name", void 0);
__decorate([
JsonProperty("role"),
__metadata("design:type", Object)
], RelationSpecification.prototype, "role", void 0);
__decorate([
OnDeserialized(),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], RelationSpecification.prototype, "onDeserialized", null);
RelationSpecification = RelationSpecification_1 = __decorate([
JsonObject(),
__metadata("design:paramtypes", [String, Object])
], RelationSpecification);
export { RelationSpecification };
//# sourceMappingURL=relation-specification.js.map