hravemzdy.procezor
Version:
payroll-procezor Salary, Health, Social, Taxing Properties for years 2010-2022
77 lines • 3.85 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArticleSpecFactory = exports.ProviderRecord = void 0;
var ArticleCode_1 = require("../service_types/ArticleCode");
var SpecFactory_1 = require("./SpecFactory");
var ArticleSpec_1 = require("../registry_providers/ArticleSpec");
var ConceptConst_1 = require("../registry_constants/ConceptConst");
var ConceptCode_1 = require("../service_types/ConceptCode");
var ArticleSpecProvider_1 = require("../registry_providers/ArticleSpecProvider");
var ArticleConst_1 = require("../registry_constants/ArticleConst");
var ArticleProviderConfig_1 = require("./ArticleProviderConfig");
var ArticleSeqs_1 = require("../service_types/ArticleSeqs");
var NotFoundArticleSpec = /** @class */ (function (_super) {
__extends(NotFoundArticleSpec, _super);
function NotFoundArticleSpec(_code) {
return _super.call(this, _code, ArticleSeqs_1.ArticleSeqs.zero(), ConceptCode_1.ConceptCode.get(NotFoundArticleSpec.CONCEPT_CODE), Array()) || this;
}
NotFoundArticleSpec.new = function () {
return new NotFoundArticleSpec(ArticleCode_1.ArticleCode.get(NotFoundArticleProvider.ARTICLE_CODE));
};
NotFoundArticleSpec.CONCEPT_CODE = ConceptConst_1.ConceptConst.CONCEPT_NOTFOUND;
return NotFoundArticleSpec;
}(ArticleSpec_1.ArticleSpec));
var NotFoundArticleProvider = /** @class */ (function (_super) {
__extends(NotFoundArticleProvider, _super);
function NotFoundArticleProvider() {
return _super.call(this, ArticleCode_1.ArticleCode.get(NotFoundArticleProvider.ARTICLE_CODE)) || this;
}
NotFoundArticleProvider.prototype.GetSpec = function (period, version) {
return new NotFoundArticleSpec(this.code);
};
NotFoundArticleProvider.ARTICLE_CODE = ArticleConst_1.ArticleConst.ARTICLE_NOTFOUND;
return NotFoundArticleProvider;
}(ArticleSpecProvider_1.ArticleSpecProvider));
var ProviderRecord = /** @class */ (function () {
function ProviderRecord(_article, _sequens, _concept, _sums) {
this.article = _article;
this.sequens = _sequens;
this.concept = _concept;
this.sums = Array.from(_sums);
}
return ProviderRecord;
}());
exports.ProviderRecord = ProviderRecord;
var ArticleSpecFactory = /** @class */ (function (_super) {
__extends(ArticleSpecFactory, _super);
function ArticleSpecFactory() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.notFoundProvider = new NotFoundArticleProvider();
_this.notFoundSpec = NotFoundArticleSpec.new();
return _this;
}
ArticleSpecFactory.BuildProvidersFromRecords = function (records) {
var providers = new Map(Array.from(records).map(function (x) {
return [x.article, new ArticleProviderConfig_1.ArticleProviderConfig(x.article, x.sequens, x.concept, x.sums)];
}));
return providers;
};
return ArticleSpecFactory;
}(SpecFactory_1.SpecFactory));
exports.ArticleSpecFactory = ArticleSpecFactory;
//# sourceMappingURL=ArticleSpecFactory.js.map