@ecogood/e-calculator-schemas 2.1.0 → 2.2.1
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/dist/shared.schemas.d.ts
CHANGED
|
@@ -16,4 +16,5 @@ export declare const isWeight: z.ZodEffects<z.ZodNumber, number, number>;
|
|
|
16
16
|
export declare const isWeightOptional: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
17
17
|
export declare const isNumberWithDefaultZero: z.ZodDefault<z.ZodNumber>;
|
|
18
18
|
export declare const isPositiveNumber: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
export declare const isPositiveNumberNotZero: z.ZodDefault<z.ZodNumber>;
|
|
19
20
|
export declare const isPercentage: z.ZodNumber;
|
package/dist/shared.schemas.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPercentage = exports.isPositiveNumber = exports.isNumberWithDefaultZero = exports.isWeightOptional = exports.isWeight = exports.WEIGHT_VALUES = exports.BalanceSheetVersion = exports.BalanceSheetType = exports.isIndustryCode = exports.isCountryCode = void 0;
|
|
3
|
+
exports.isPercentage = exports.isPositiveNumberNotZero = exports.isPositiveNumber = exports.isNumberWithDefaultZero = exports.isWeightOptional = exports.isWeight = exports.WEIGHT_VALUES = exports.BalanceSheetVersion = exports.BalanceSheetType = exports.isIndustryCode = exports.isCountryCode = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.isCountryCode = zod_1.z.string().min(3).max(3);
|
|
6
6
|
exports.isIndustryCode = zod_1.z.string().min(1).max(4);
|
|
@@ -31,6 +31,9 @@ exports.isNumberWithDefaultZero = isNumberCustomError.default(0);
|
|
|
31
31
|
exports.isPositiveNumber = isNumberCustomError
|
|
32
32
|
.nonnegative('Number should be positive')
|
|
33
33
|
.default(0);
|
|
34
|
+
exports.isPositiveNumberNotZero = isNumberCustomError
|
|
35
|
+
.gt(0, 'Number should be positive and greater than zero')
|
|
36
|
+
.default(0);
|
|
34
37
|
exports.isPercentage = zod_1.z
|
|
35
38
|
.number({
|
|
36
39
|
invalid_type_error: 'Percentage expected',
|
package/dist/translations/de.js
CHANGED
|
@@ -9,4 +9,5 @@ exports.DE_ERROR_TRANSLATIONS = {
|
|
|
9
9
|
'Number should be between 0 and 10': 'Zahl sollte zwischen 0 und 10 liegen',
|
|
10
10
|
'Number should be between -200 and 0': 'Zahl sollte zwischen -200 und 0 liegen',
|
|
11
11
|
'Must not be blank': 'Darf nicht leer sein',
|
|
12
|
+
'Number should be positive and greater than zero': 'Zahl sollte positiv und größer als 0 sein',
|
|
12
13
|
};
|
package/dist/translations/en.js
CHANGED
|
@@ -9,5 +9,6 @@ exports.EN_WORDS = [
|
|
|
9
9
|
'Number should be between 0 and 10',
|
|
10
10
|
'Number should be between -200 and 0',
|
|
11
11
|
'Must not be blank',
|
|
12
|
+
'Number should be positive and greater than zero',
|
|
12
13
|
];
|
|
13
14
|
exports.EN_ERROR_TRANSLATIONS = Object.assign({}, exports.EN_WORDS.reduce((prevValue, w) => (Object.assign(Object.assign({}, prevValue), { [w]: w })), {}));
|
package/package.json
CHANGED