UNPKG

@sitecore/sc-contenthub-webclient-sdk

Version:

Sitecore Content Hub WebClient SDK.

68 lines 3.58 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); }; var EntityLoadConfiguration_1; import { JsonObject, JsonProperty, JsonType } from "ta-json"; import { CultureLoadOption } from "./culture-load-option"; import { EntityLoadConfigurationBuilder } from "./entity-load-configuration-builder"; import { PropertyLoadOption } from "./property-load-option"; import { RelationLoadOption } from "./relation-load-option"; let EntityLoadConfiguration = EntityLoadConfiguration_1 = class EntityLoadConfiguration { constructor(cultureLoadOption, propertyLoadOption, relationLoadOption) { if (cultureLoadOption) this.cultureLoadOption = cultureLoadOption; if (propertyLoadOption) this.propertyLoadOption = propertyLoadOption; if (relationLoadOption) this.relationLoadOption = relationLoadOption; } builder() { return new EntityLoadConfigurationBuilder(this); } deepClone() { return new EntityLoadConfiguration_1(this.cultureLoadOption && this.cultureLoadOption.deepClone(), this.propertyLoadOption && this.propertyLoadOption.deepClone(), this.relationLoadOption && this.relationLoadOption.deepClone()); } }; /** * Only load system properties. */ EntityLoadConfiguration.Minimal = new EntityLoadConfiguration_1(CultureLoadOption.None, PropertyLoadOption.None, RelationLoadOption.None); /** * Gets the entities in default culture with all properties and no relations. */ EntityLoadConfiguration.Default = new EntityLoadConfiguration_1(CultureLoadOption.Default, PropertyLoadOption.All, RelationLoadOption.None); /** * Get the entities in default culture with all properties and relations. */ EntityLoadConfiguration.DefaultCultureFull = new EntityLoadConfiguration_1(CultureLoadOption.Default, PropertyLoadOption.All, RelationLoadOption.All); /** * Get the entity in all installed cultures with all properties and relations. */ EntityLoadConfiguration.Full = new EntityLoadConfiguration_1(CultureLoadOption.All, PropertyLoadOption.All, RelationLoadOption.All); __decorate([ JsonProperty("culture_option"), JsonType(CultureLoadOption), __metadata("design:type", Object) ], EntityLoadConfiguration.prototype, "cultureLoadOption", void 0); __decorate([ JsonProperty("property_option"), JsonType(PropertyLoadOption), __metadata("design:type", Object) ], EntityLoadConfiguration.prototype, "propertyLoadOption", void 0); __decorate([ JsonProperty("relation_option"), JsonType(RelationLoadOption), __metadata("design:type", Object) ], EntityLoadConfiguration.prototype, "relationLoadOption", void 0); EntityLoadConfiguration = EntityLoadConfiguration_1 = __decorate([ JsonObject(), __metadata("design:paramtypes", [Object, Object, Object]) ], EntityLoadConfiguration); export { EntityLoadConfiguration }; //# sourceMappingURL=entity-load-configuration.js.map