@hyper.software/common-helpers 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/lib/errors/CriticalError.d.ts +0 -0
- package/lib/errors/CriticalError.js +0 -0
- package/lib/errors/CriticalError.js.map +0 -0
- package/lib/errors/ValidationError.d.ts +0 -0
- package/lib/errors/ValidationError.js +0 -0
- package/lib/errors/ValidationError.js.map +0 -0
- package/lib/errors/ValidationErrorSilent.d.ts +0 -0
- package/lib/errors/ValidationErrorSilent.js +0 -0
- package/lib/errors/ValidationErrorSilent.js.map +0 -0
- package/lib/errors/ValidationErrorWithStatus.d.ts +0 -0
- package/lib/errors/ValidationErrorWithStatus.js +0 -0
- package/lib/errors/ValidationErrorWithStatus.js.map +0 -0
- package/lib/errors/ValidationErrorWithStatusSilent.d.ts +0 -0
- package/lib/errors/ValidationErrorWithStatusSilent.js +0 -0
- package/lib/errors/ValidationErrorWithStatusSilent.js.map +0 -0
- package/lib/errors/__mocks__/errors.mock.d.ts +0 -0
- package/lib/errors/__mocks__/errors.mock.js +0 -0
- package/lib/errors/__mocks__/errors.mock.js.map +0 -0
- package/lib/errors/__tests__/errorMappers.test.d.ts +0 -0
- package/lib/errors/__tests__/errorMappers.test.js +0 -0
- package/lib/errors/__tests__/errorMappers.test.js.map +0 -0
- package/lib/errors/__tests__/errors.test.d.ts +0 -0
- package/lib/errors/__tests__/errors.test.js +0 -0
- package/lib/errors/__tests__/errors.test.js.map +0 -0
- package/lib/errors/errorMappers.d.ts +0 -0
- package/lib/errors/errorMappers.js +0 -0
- package/lib/errors/errorMappers.js.map +0 -0
- package/lib/errors/errors.types.d.ts +0 -0
- package/lib/errors/errors.types.js +0 -0
- package/lib/errors/errors.types.js.map +0 -0
- package/lib/errors/index.d.ts +0 -0
- package/lib/errors/index.js +0 -0
- package/lib/errors/index.js.map +0 -0
- package/lib/express/__tests__/swaggerHelpers.test.d.ts +0 -0
- package/lib/express/__tests__/swaggerHelpers.test.js +0 -0
- package/lib/express/__tests__/swaggerHelpers.test.js.map +0 -0
- package/lib/express/middleware/aliveMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/aliveMiddleware/index.js +0 -0
- package/lib/express/middleware/aliveMiddleware/index.js.map +0 -0
- package/lib/express/middleware/companyMiddleware/company.d.ts +0 -0
- package/lib/express/middleware/companyMiddleware/company.js +0 -0
- package/lib/express/middleware/companyMiddleware/company.js.map +0 -0
- package/lib/express/middleware/companyMiddleware/companyApiRequest.d.ts +0 -0
- package/lib/express/middleware/companyMiddleware/companyApiRequest.js +0 -0
- package/lib/express/middleware/companyMiddleware/companyApiRequest.js.map +0 -0
- package/lib/express/middleware/companyMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/companyMiddleware/index.js +0 -0
- package/lib/express/middleware/companyMiddleware/index.js.map +0 -0
- package/lib/express/middleware/companyMiddleware/index.types.d.ts +0 -0
- package/lib/express/middleware/companyMiddleware/index.types.js +0 -0
- package/lib/express/middleware/companyMiddleware/index.types.js.map +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/__tests__/expressErrorHandlerMiddleware.test.d.ts +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/__tests__/expressErrorHandlerMiddleware.test.js +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/__tests__/expressErrorHandlerMiddleware.test.js.map +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/index.js +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/index.js.map +0 -0
- package/lib/express/middleware/index.d.ts +0 -0
- package/lib/express/middleware/index.js +0 -0
- package/lib/express/middleware/index.js.map +0 -0
- package/lib/express/middleware/languageMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/languageMiddleware/index.js +0 -0
- package/lib/express/middleware/languageMiddleware/index.js.map +0 -0
- package/lib/express/middleware/partnerMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/partnerMiddleware/index.js +0 -0
- package/lib/express/middleware/partnerMiddleware/index.js.map +0 -0
- package/lib/express/middleware/partnerMiddleware/index.types.d.ts +0 -0
- package/lib/express/middleware/partnerMiddleware/index.types.js +0 -0
- package/lib/express/middleware/partnerMiddleware/index.types.js.map +0 -0
- package/lib/express/middleware/partnerMiddleware/partner.d.ts +0 -0
- package/lib/express/middleware/partnerMiddleware/partner.js +0 -0
- package/lib/express/middleware/partnerMiddleware/partner.js.map +0 -0
- package/lib/express/middleware/partnerMiddleware/partnerServiceRequest.d.ts +0 -0
- package/lib/express/middleware/partnerMiddleware/partnerServiceRequest.js +0 -0
- package/lib/express/middleware/partnerMiddleware/partnerServiceRequest.js.map +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/index.js +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/index.js.map +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/types.d.ts +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/types.js +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/types.js.map +0 -0
- package/lib/express/middleware/translationsMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/translationsMiddleware/index.js +0 -0
- package/lib/express/middleware/translationsMiddleware/index.js.map +0 -0
- package/lib/express/swaggerControllersConfig.d.ts +0 -0
- package/lib/express/swaggerControllersConfig.js +1 -15
- package/lib/express/swaggerControllersConfig.js.map +1 -1
- package/lib/express/swaggerHelpers.d.ts +0 -0
- package/lib/express/swaggerHelpers.js +0 -0
- package/lib/express/swaggerHelpers.js.map +0 -0
- package/lib/express/swaggerUiController.d.ts +0 -0
- package/lib/express/swaggerUiController.js +0 -0
- package/lib/express/swaggerUiController.js.map +0 -0
- package/lib/express/swaggerUiTemplate.d.ts +0 -0
- package/lib/express/swaggerUiTemplate.js +0 -0
- package/lib/express/swaggerUiTemplate.js.map +0 -0
- package/lib/helpers/ExecuteOnce.d.ts +0 -0
- package/lib/helpers/ExecuteOnce.js +0 -0
- package/lib/helpers/ExecuteOnce.js.map +0 -0
- package/lib/helpers/UniversalConfig.d.ts +0 -0
- package/lib/helpers/UniversalConfig.js +0 -0
- package/lib/helpers/UniversalConfig.js.map +0 -0
- package/lib/helpers/__tests__/arrays.test.d.ts +0 -0
- package/lib/helpers/__tests__/arrays.test.js +0 -0
- package/lib/helpers/__tests__/arrays.test.js.map +0 -0
- package/lib/helpers/__tests__/emptyValues.test.d.ts +0 -0
- package/lib/helpers/__tests__/emptyValues.test.js +0 -0
- package/lib/helpers/__tests__/emptyValues.test.js.map +0 -0
- package/lib/helpers/__tests__/formatters.formatCurrency.test.d.ts +0 -0
- package/lib/helpers/__tests__/formatters.formatCurrency.test.js +0 -0
- package/lib/helpers/__tests__/formatters.formatCurrency.test.js.map +0 -0
- package/lib/helpers/__tests__/formatters.formatDate.test.d.ts +0 -0
- package/lib/helpers/__tests__/formatters.formatDate.test.js +0 -0
- package/lib/helpers/__tests__/formatters.formatDate.test.js.map +0 -0
- package/lib/helpers/__tests__/formatters.formatDouble.test.d.ts +0 -0
- package/lib/helpers/__tests__/formatters.formatDouble.test.js +0 -0
- package/lib/helpers/__tests__/formatters.formatDouble.test.js.map +0 -0
- package/lib/helpers/__tests__/navigation.test.d.ts +0 -0
- package/lib/helpers/__tests__/navigation.test.js +0 -0
- package/lib/helpers/__tests__/navigation.test.js.map +0 -0
- package/lib/helpers/__tests__/strings.test.d.ts +0 -0
- package/lib/helpers/__tests__/strings.test.js +0 -0
- package/lib/helpers/__tests__/strings.test.js.map +0 -0
- package/lib/helpers/__tests__/validation.test.d.ts +0 -0
- package/lib/helpers/__tests__/validation.test.js +0 -0
- package/lib/helpers/__tests__/validation.test.js.map +0 -0
- package/lib/helpers/arrays.d.ts +0 -0
- package/lib/helpers/arrays.js +0 -0
- package/lib/helpers/arrays.js.map +0 -0
- package/lib/helpers/clientLogger.d.ts +0 -0
- package/lib/helpers/clientLogger.js +0 -0
- package/lib/helpers/clientLogger.js.map +0 -0
- package/lib/helpers/constants/common.d.ts +0 -0
- package/lib/helpers/constants/common.js +0 -0
- package/lib/helpers/constants/common.js.map +0 -0
- package/lib/helpers/constants/fileUploads.d.ts +0 -0
- package/lib/helpers/constants/fileUploads.js +0 -0
- package/lib/helpers/constants/fileUploads.js.map +0 -0
- package/lib/helpers/constants/index.d.ts +0 -0
- package/lib/helpers/constants/index.js +0 -0
- package/lib/helpers/constants/index.js.map +0 -0
- package/lib/helpers/constants/integrations.d.ts +0 -0
- package/lib/helpers/constants/integrations.js +0 -0
- package/lib/helpers/constants/integrations.js.map +0 -0
- package/lib/helpers/constants/language.d.ts +0 -0
- package/lib/helpers/constants/language.js +0 -0
- package/lib/helpers/constants/language.js.map +0 -0
- package/lib/helpers/constants/swagger.d.ts +0 -0
- package/lib/helpers/constants/swagger.js +0 -0
- package/lib/helpers/constants/swagger.js.map +0 -0
- package/lib/helpers/constants/urls.d.ts +0 -0
- package/lib/helpers/constants/urls.js +0 -0
- package/lib/helpers/constants/urls.js.map +0 -0
- package/lib/helpers/constants/user.d.ts +0 -0
- package/lib/helpers/constants/user.js +0 -0
- package/lib/helpers/constants/user.js.map +0 -0
- package/lib/helpers/constants/validators.d.ts +0 -0
- package/lib/helpers/constants/validators.js +0 -0
- package/lib/helpers/constants/validators.js.map +0 -0
- package/lib/helpers/emptyValues.d.ts +0 -0
- package/lib/helpers/emptyValues.js +0 -0
- package/lib/helpers/emptyValues.js.map +0 -0
- package/lib/helpers/formatters.d.ts +0 -0
- package/lib/helpers/formatters.js +2 -2
- package/lib/helpers/formatters.js.map +1 -1
- package/lib/helpers/guards.d.ts +0 -0
- package/lib/helpers/guards.js +0 -0
- package/lib/helpers/guards.js.map +0 -0
- package/lib/helpers/index.d.ts +0 -0
- package/lib/helpers/index.js +0 -0
- package/lib/helpers/index.js.map +0 -0
- package/lib/helpers/isBrowser.d.ts +0 -0
- package/lib/helpers/isBrowser.js +0 -0
- package/lib/helpers/isBrowser.js.map +0 -0
- package/lib/helpers/math.d.ts +0 -0
- package/lib/helpers/math.js +0 -0
- package/lib/helpers/math.js.map +0 -0
- package/lib/helpers/moment.d.ts +0 -0
- package/lib/helpers/moment.js +0 -0
- package/lib/helpers/moment.js.map +0 -0
- package/lib/helpers/navigation.d.ts +0 -0
- package/lib/helpers/navigation.js +0 -0
- package/lib/helpers/navigation.js.map +0 -0
- package/lib/helpers/stringifySafe.d.ts +0 -0
- package/lib/helpers/stringifySafe.js +0 -0
- package/lib/helpers/stringifySafe.js.map +0 -0
- package/lib/helpers/strings.d.ts +0 -0
- package/lib/helpers/strings.js +0 -0
- package/lib/helpers/strings.js.map +0 -0
- package/lib/helpers/validation.d.ts +0 -0
- package/lib/helpers/validation.js +0 -0
- package/lib/helpers/validation.js.map +0 -0
- package/lib/index.d.ts +0 -0
- package/lib/index.js +0 -0
- package/lib/index.js.map +0 -0
- package/lib/interfaces.d.ts +0 -0
- package/lib/interfaces.js +0 -0
- package/lib/interfaces.js.map +0 -0
- package/lib/redux/analyticsMiddleware.d.ts +0 -0
- package/lib/redux/analyticsMiddleware.js +0 -0
- package/lib/redux/analyticsMiddleware.js.map +0 -0
- package/lib/redux/clientMiddleware.d.ts +0 -0
- package/lib/redux/clientMiddleware.js +0 -0
- package/lib/redux/clientMiddleware.js.map +0 -0
- package/lib/redux/emptyMiddleware.d.ts +0 -0
- package/lib/redux/emptyMiddleware.js +0 -0
- package/lib/redux/emptyMiddleware.js.map +0 -0
- package/lib/redux/index.d.ts +0 -0
- package/lib/redux/index.js +0 -0
- package/lib/redux/index.js.map +0 -0
- package/lib/services/bookingService/bookingsService.d.ts +0 -0
- package/lib/services/bookingService/bookingsService.js +0 -0
- package/lib/services/bookingService/bookingsService.js.map +0 -0
- package/lib/services/bookingService/bookingsService.test.d.ts +0 -0
- package/lib/services/bookingService/bookingsService.test.js +0 -0
- package/lib/services/bookingService/bookingsService.test.js.map +0 -0
- package/lib/services/cookieService/cookieService.d.ts +0 -0
- package/lib/services/cookieService/cookieService.js +0 -0
- package/lib/services/cookieService/cookieService.js.map +0 -0
- package/lib/services/dateService/dateService.d.ts +0 -0
- package/lib/services/dateService/dateService.js +0 -0
- package/lib/services/dateService/dateService.js.map +0 -0
- package/lib/services/googleAnalyticsService/googleAnalyticsService.d.ts +0 -0
- package/lib/services/googleAnalyticsService/googleAnalyticsService.js +0 -0
- package/lib/services/googleAnalyticsService/googleAnalyticsService.js.map +0 -0
- package/lib/services/imageService/imageService.d.ts +0 -0
- package/lib/services/imageService/imageService.js +0 -0
- package/lib/services/imageService/imageService.js.map +0 -0
- package/lib/services/index.d.ts +0 -0
- package/lib/services/index.js +0 -0
- package/lib/services/index.js.map +0 -0
- package/lib/services/languageService/languageService.d.ts +0 -0
- package/lib/services/languageService/languageService.js +0 -0
- package/lib/services/languageService/languageService.js.map +0 -0
- package/lib/services/localstorageService/localstorageService.d.ts +0 -0
- package/lib/services/localstorageService/localstorageService.js +0 -0
- package/lib/services/localstorageService/localstorageService.js.map +0 -0
- package/lib/services/roomBookingServices/index.d.ts +0 -0
- package/lib/services/roomBookingServices/index.js +0 -0
- package/lib/services/roomBookingServices/index.js.map +0 -0
- package/lib/services/sessionStorageService/index.d.ts +0 -0
- package/lib/services/sessionStorageService/index.js +0 -0
- package/lib/services/sessionStorageService/index.js.map +0 -0
- package/lib/translations/getAllTranslations.d.ts +0 -0
- package/lib/translations/getAllTranslations.js +0 -0
- package/lib/translations/getAllTranslations.js.map +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/errors/index.d.ts
CHANGED
|
File without changes
|
package/lib/errors/index.js
CHANGED
|
File without changes
|
package/lib/errors/index.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -58,20 +58,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
58
58
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
-
};
|
|
64
61
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
62
|
exports.getSwaggerControllersConfig = void 0;
|
|
66
63
|
var glob_1 = require("glob");
|
|
67
|
-
var performance_now_1 = __importDefault(require("performance-now"));
|
|
68
64
|
var defaultErrorHandler = function (_req, _res, next) { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
65
|
return __generator(this, function (_a) {
|
|
70
66
|
next();
|
|
71
67
|
return [2 /*return*/];
|
|
72
68
|
});
|
|
73
69
|
}); };
|
|
74
|
-
var GET_REQUEST_LOG_LIMIT = 1000;
|
|
75
70
|
/**
|
|
76
71
|
* This function creates a map of all controllers in your project, ready to be sent to swagger as config.
|
|
77
72
|
* It is usually used before the api starts
|
|
@@ -83,7 +78,6 @@ var getSwaggerControllersConfig = function (input) {
|
|
|
83
78
|
var fileExtension = input.fileExtension || "ts";
|
|
84
79
|
var filePattern = input.filePattern || "".concat(basePath, "/**/*Controller.").concat(fileExtension);
|
|
85
80
|
var errorHandler = input.errorHandler || defaultErrorHandler;
|
|
86
|
-
var logger = input.logger;
|
|
87
81
|
var controllersPath = (0, glob_1.sync)(filePattern).map(function (file) {
|
|
88
82
|
return file.replace(basePath, relativePath).replace(".".concat(fileExtension), '').replace('src/', '');
|
|
89
83
|
});
|
|
@@ -106,7 +100,7 @@ var getSwaggerControllersConfig = function (input) {
|
|
|
106
100
|
var operationName = "".concat(controllerName, "_").concat(key);
|
|
107
101
|
Object.assign(swaggerControllersConfig, (_a = {},
|
|
108
102
|
_a[operationName] = function (req, res, next) { return __awaiter(void 0, void 0, void 0, function () {
|
|
109
|
-
var result,
|
|
103
|
+
var result, err_1;
|
|
110
104
|
return __generator(this, function (_a) {
|
|
111
105
|
switch (_a.label) {
|
|
112
106
|
case 0:
|
|
@@ -114,17 +108,9 @@ var getSwaggerControllersConfig = function (input) {
|
|
|
114
108
|
_a.label = 1;
|
|
115
109
|
case 1:
|
|
116
110
|
_a.trys.push([1, 3, , 5]);
|
|
117
|
-
method = req.method;
|
|
118
|
-
url = req.url;
|
|
119
|
-
start = (0, performance_now_1.default)();
|
|
120
111
|
return [4 /*yield*/, controllerOperation(req, res, next)];
|
|
121
112
|
case 2:
|
|
122
113
|
result = _a.sent();
|
|
123
|
-
end = (0, performance_now_1.default)();
|
|
124
|
-
diff = end - start;
|
|
125
|
-
if (logger && logger.warn && method === 'GET' && diff > GET_REQUEST_LOG_LIMIT) {
|
|
126
|
-
logger.warn(['[PERFORMANCE]', "".concat(method, " ").concat(url, " took ").concat(diff.toFixed(2), " ms.")]);
|
|
127
|
-
}
|
|
128
114
|
return [3 /*break*/, 5];
|
|
129
115
|
case 3:
|
|
130
116
|
err_1 = _a.sent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swaggerControllersConfig.js","sourceRoot":"","sources":["../../src/express/swaggerControllersConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"swaggerControllersConfig.js","sourceRoot":"","sources":["../../src/express/swaggerControllersConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA2B;AAW3B,IAAM,mBAAmB,GAAG,UAAO,IAAI,EAAE,IAAI,EAAE,IAAI;;QACjD,IAAI,EAAE,CAAA;;;KACP,CAAA;AAED;;;GAGG;AACI,IAAM,2BAA2B,GAAG,UAAC,KAAkC;IAAlC,sBAAA,EAAA,UAAkC;IAC5E,IAAM,QAAQ,GAAW,KAAK,CAAC,QAAQ,IAAI,mBAAmB,CAAA;IAC9D,IAAM,YAAY,GAAW,KAAK,CAAC,YAAY,IAAI,aAAa,CAAA;IAChE,IAAM,aAAa,GAAW,KAAK,CAAC,aAAa,IAAI,IAAI,CAAA;IACzD,IAAM,WAAW,GAAW,KAAK,CAAC,WAAW,IAAI,UAAG,QAAQ,6BAAmB,aAAa,CAAE,CAAA;IAC9F,IAAM,YAAY,GAAG,KAAK,CAAC,YAAY,IAAI,mBAAmB,CAAA;IAE9D,IAAM,eAAe,GAAa,IAAA,WAAI,EAAC,WAAW,CAAC,CAAC,GAAG,CAAC,UAAC,IAAI;QAC3D,OAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,OAAO,CAAC,WAAI,aAAa,CAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;IAAzF,CAAyF,CAC1F,CAAA;IAED,IAAM,wBAAwB,GAAG,EAAE,CAAA;IAEnC,eAAe,CAAC,OAAO,CAAC,UAAO,IAAI;;;;wBACd,+CAAa,IAAI,4DAAC;;oBAA/B,UAAU,GAAG,SAAkB;oBAErC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAC,GAAG;;wBAClC,IAAM,mBAAmB,GAAG,UAAU,CAAC,GAAG,CAAC,CAAA;wBAC3C,IAAI,OAAO,mBAAmB,KAAK,UAAU,EAAE,CAAC;4BAC9C,OAAM;wBACR,CAAC;wBACD,IAAM,mBAAmB,GAAa,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;wBACrD,IAAM,cAAc,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;wBAC1E,IAAM,aAAa,GAAG,UAAG,cAAc,cAAI,GAAG,CAAE,CAAA;wBAEhD,MAAM,CAAC,MAAM,CAAC,wBAAwB;4BACpC,GAAC,aAAa,IAAG,UAAO,GAAG,EAAE,GAAG,EAAE,IAAI;;;;;4CAChC,MAAM,GAAG,IAAI,CAAA;;;;4CAEN,qBAAM,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAA;;4CAAlD,MAAM,GAAG,SAAyC,CAAA;;;;4CAEzC,qBAAM,YAAY,CAAC,KAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAA;;4CAA1C,MAAM,GAAG,SAAiC,CAAA;;gDAE5C,sBAAO,MAAM,EAAA;;;iCACd;gCACD,CAAA;oBACJ,CAAC,CAAC,CAAA;;;;SACH,CAAC,CAAA;IAEF,OAAO,wBAAwB,CAAA;AACjC,CAAC,CAAA;AAxCY,QAAA,2BAA2B,+BAwCvC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/helpers/arrays.d.ts
CHANGED
|
File without changes
|
package/lib/helpers/arrays.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -15,7 +15,7 @@ function formatCurrency(language, amount, currency, options) {
|
|
|
15
15
|
if (currency === void 0) { currency = 'EUR'; }
|
|
16
16
|
if (options === void 0) { options = {}; }
|
|
17
17
|
var actualAmount = options.noDecimals ? Math.ceil(amount) : amount;
|
|
18
|
-
return "".concat(findCurrencySymbol(currency)).concat(formatDouble(actualAmount, { exactDecimalsAfterComma: options.exactDecimalsAfterComma || 2, showDecimals: options.showDecimals }, (0, languageService_1.getLocaleFromLanguage)(language)));
|
|
18
|
+
return "".concat(findCurrencySymbol(currency)).concat(formatDouble(actualAmount, { exactDecimalsAfterComma: (options === null || options === void 0 ? void 0 : options.exactDecimalsAfterComma) || 2, showDecimals: options === null || options === void 0 ? void 0 : options.showDecimals }, (0, languageService_1.getLocaleFromLanguage)(language)));
|
|
19
19
|
}
|
|
20
20
|
function findCurrencySymbol(code) {
|
|
21
21
|
if (code === void 0) { code = 'EUR'; }
|
|
@@ -92,7 +92,7 @@ function formatDouble(value, options, locale) {
|
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
94
|
numeral_1.default.locale(locale);
|
|
95
|
-
if (Number.isInteger(value) && !options.showDecimals) {
|
|
95
|
+
if (Number.isInteger(value) && !(options === null || options === void 0 ? void 0 : options.showDecimals)) {
|
|
96
96
|
return (0, numeral_1.default)(value).format('0,0');
|
|
97
97
|
}
|
|
98
98
|
var maxDecimalsAfterComma = options && options.maxDecimalsAfterComma;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../src/helpers/formatters.ts"],"names":[],"mappings":";;;;;;AAYA,wCAQC;AAED,gDAMC;AA2ED,oCAwBC;AA/HD,0EAAkD;AAClD,oDAA6B;AAE7B,+EAAmF;AAEnF,2CAAsC;AAOtC,SAAgB,cAAc,CAAC,QAAkB,EAAE,MAAc,EAAE,QAAgB,EAAE,OAAoC;IAAtD,yBAAA,EAAA,gBAAgB;IAAE,wBAAA,EAAA,YAAoC;IACvH,IAAM,YAAY,GAAW,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;IAE5E,OAAO,UAAG,kBAAkB,CAAC,QAAQ,CAAC,SAAG,YAAY,CACnD,YAAY,EACZ,EAAE,uBAAuB,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../src/helpers/formatters.ts"],"names":[],"mappings":";;;;;;AAYA,wCAQC;AAED,gDAMC;AA2ED,oCAwBC;AA/HD,0EAAkD;AAClD,oDAA6B;AAE7B,+EAAmF;AAEnF,2CAAsC;AAOtC,SAAgB,cAAc,CAAC,QAAkB,EAAE,MAAc,EAAE,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AAC;AAED,mCAAmD;AAA1C,oGAAA,UAAU,OAAA;AAAE,sGAAA,YAAY,OAAA"}
|
package/lib/helpers/guards.d.ts
CHANGED
|
File without changes
|
package/lib/helpers/guards.js
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/helpers/index.d.ts
CHANGED
|
File without changes
|
package/lib/helpers/index.js
CHANGED
|
File without changes
|
package/lib/helpers/index.js.map
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/helpers/isBrowser.js
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/helpers/math.d.ts
CHANGED
|
File without changes
|
package/lib/helpers/math.js
CHANGED
|
File without changes
|
package/lib/helpers/math.js.map
CHANGED
|
File without changes
|
package/lib/helpers/moment.d.ts
CHANGED
|
File without changes
|
package/lib/helpers/moment.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/helpers/strings.d.ts
CHANGED
|
File without changes
|
package/lib/helpers/strings.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/index.d.ts
CHANGED
|
File without changes
|
package/lib/index.js
CHANGED
|
File without changes
|
package/lib/index.js.map
CHANGED
|
File without changes
|
package/lib/interfaces.d.ts
CHANGED
|
File without changes
|
package/lib/interfaces.js
CHANGED
|
File without changes
|
package/lib/interfaces.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/redux/index.d.ts
CHANGED
|
File without changes
|
package/lib/redux/index.js
CHANGED
|
File without changes
|
package/lib/redux/index.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/services/index.d.ts
CHANGED
|
File without changes
|
package/lib/services/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|