igniteui-angular-core
Version:
Ignite UI Angular Core logic used in multiple UI components.
89 lines (88 loc) • 2.76 kB
JavaScript
import { TransactionType_$type } from "./TransactionType";
import { ensureEnum } from "./componentUtil";
/**
* Represents the final state of items with all transactions combined.
*/
var IgxTransactionState = /** @class */ /*@__PURE__*/ (function () {
function IgxTransactionState() {
}
Object.defineProperty(IgxTransactionState.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgxTransactionState.prototype.onImplementationCreated = function () {
};
IgxTransactionState.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
};
Object.defineProperty(IgxTransactionState.prototype, "id", {
/**
* Gets or sets the ID for the state. I.e. an items primary key.
*/
get: function () {
return this.i.id;
},
set: function (v) {
this.i.id = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTransactionState.prototype, "transactionType", {
/**
* Gets or sets how this state was created.
*/
get: function () {
return this.i.transactionType;
},
set: function (v) {
this.i.transactionType = ensureEnum(TransactionType_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTransactionState.prototype, "value", {
/**
* Gets or sets the final value with all transaction deltas combined.
*/
get: function () {
return this.i.value;
},
set: function (v) {
this.i.value = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTransactionState.prototype, "version", {
/**
* Gets or sets the version data for this item. Used for concurrency.
*/
get: function () {
return this.i.version;
},
set: function (v) {
this.i.version = v;
},
enumerable: false,
configurable: true
});
IgxTransactionState.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
};
return IgxTransactionState;
}());
export { IgxTransactionState };