UNPKG

@sitecore/sc-contenthub-webclient-sdk

Version:

Sitecore Content Hub WebClient SDK.

41 lines 1.23 kB
import DirtyValueCalculator from "../../dirty-value-calculator"; import { PropertyBase } from "./property"; export class CultureInsensitiveProperty extends PropertyBase { get isDirty() { if (!this.isTracking) { return false; } return this._dirtyValueCalculator.isDirty(this._value); } constructor(name, typeInfo, value, hasDataSource = false) { super(name, typeInfo, hasDataSource); this.isMultiLanguage = false; if (value !== undefined) { this._value = value; //TODO clone? } } getValue() { return this._value; } setValue(value) { this._value = value; //TODO clone value? } getTypeName() { return this.constructor.name; } startTracking() { if (this.isTracking) { return; } this.isTracking = true; this._dirtyValueCalculator = new DirtyValueCalculator(); this._dirtyValueCalculator.setOriginalValue(this._value); } markClean() { if (!this.isTracking) { return; } this._dirtyValueCalculator.setOriginalValue(this._value); } } //# sourceMappingURL=culture-insensitive-property.js.map