@dorgtech/daocomponents
Version:
Componentizing [DAOstack's client library](https://github.com/daostack/client), enabling easier React application integration. The hope is to be able to turn any app into a DAO enabled dApp by adding ~2 components.
149 lines • 4.91 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var types_1 = require("./types");
var LoggingConfig_1 = require("./LoggingConfig");
// The goal of this class is to:
// 1. preserve memory through lazy allocation
// 2. ensure high data integrity by guarding
// log data at the language level.
var ComponentLogs = /** @class */ (function () {
function ComponentLogs() {
}
Object.defineProperty(ComponentLogs.prototype, "react", {
get: function () {
return this._react;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ComponentLogs.prototype, "entity", {
get: function () {
return this._entity;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ComponentLogs.prototype, "data", {
get: function () {
return this._data;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ComponentLogs.prototype, "code", {
get: function () {
return this._code;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ComponentLogs.prototype, "prose", {
get: function () {
return this._prose;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ComponentLogs.prototype, "getReact", {
get: function () {
if (!this._react)
this._react = new types_1.ReactLogs();
return this._react;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ComponentLogs.prototype, "getEntity", {
get: function () {
if (!this._entity)
this._entity = new types_1.EntityLogs();
return this._entity;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ComponentLogs.prototype, "getData", {
get: function () {
if (!this._data)
this._data = new types_1.DataLogs();
return this._data;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ComponentLogs.prototype, "getCode", {
get: function () {
if (!this._code)
this._code = new types_1.CodeLogs();
return this._code;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ComponentLogs.prototype, "getProse", {
get: function () {
if (!this._prose)
this._prose = new types_1.ProseLogs();
return this._prose;
},
enumerable: true,
configurable: true
});
ComponentLogs.prototype.clone = function () {
var clone = new ComponentLogs();
clone._react = this._react;
clone._entity = this._entity;
clone._data = this._data;
clone._code = this._code;
clone._prose = this._prose;
return clone;
};
ComponentLogs.prototype.reactRendered = function () {
if (!LoggingConfig_1.LoggingConfig.Current.enabled)
return;
this.getReact.rendered();
};
ComponentLogs.prototype.entityCreated = function () {
if (!LoggingConfig_1.LoggingConfig.Current.enabled)
return;
this.getEntity.created();
};
ComponentLogs.prototype.entityCreationFailed = function (error) {
if (!LoggingConfig_1.LoggingConfig.Current.enabled)
return;
this.getEntity.creationFailed(error);
};
ComponentLogs.prototype.dataQueryStarted = function () {
if (!LoggingConfig_1.LoggingConfig.Current.enabled)
return;
this.getData.queryStarted();
};
ComponentLogs.prototype.dataQueryReceivedData = function () {
if (!LoggingConfig_1.LoggingConfig.Current.enabled)
return;
this.getData.queryReceivedData();
};
ComponentLogs.prototype.dataQueryCompleted = function () {
if (!LoggingConfig_1.LoggingConfig.Current.enabled)
return;
this.getData.queryCompleted();
};
ComponentLogs.prototype.dataQueryFailed = function (error) {
if (!LoggingConfig_1.LoggingConfig.Current.enabled)
return;
this.getData.queryFailed(error);
};
ComponentLogs.prototype.codeCreationFailed = function (error) {
if (!LoggingConfig_1.LoggingConfig.Current.enabled)
return;
this.getCode.creationFailed(error);
};
ComponentLogs.prototype.proseCreationFailed = function (error) {
if (!LoggingConfig_1.LoggingConfig.Current.enabled)
return;
this.getProse.creationFailed(error);
};
return ComponentLogs;
}());
exports.ComponentLogs = ComponentLogs;
//# sourceMappingURL=ComponentLogs.js.map