asv-hlps 1.2.57 → 1.2.58
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.
|
@@ -3,7 +3,7 @@ export interface IPath {
|
|
|
3
3
|
id: number | string;
|
|
4
4
|
key?: string | number;
|
|
5
5
|
title: any;
|
|
6
|
-
link
|
|
6
|
+
link?: string;
|
|
7
7
|
default?: boolean;
|
|
8
8
|
icon?: string;
|
|
9
9
|
param?: any;
|
|
@@ -12,6 +12,7 @@ export interface IPath {
|
|
|
12
12
|
ms?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
state?: string | number;
|
|
15
|
+
Content?: any;
|
|
15
16
|
}
|
|
16
17
|
export declare type HeaderTableColumnType = {
|
|
17
18
|
thLabel: any;
|
package/lib/cjs/utils.d.ts
CHANGED
|
@@ -85,3 +85,4 @@ export declare const returnDates: (fromDate: any, toDate: any) => {
|
|
|
85
85
|
export declare const absFromSequence: (arr: number[]) => number[];
|
|
86
86
|
export declare const fillStartWithZero: (num: string | number, targetLength: number) => string;
|
|
87
87
|
export declare const fillEndWithZero: (num: string | number, targetLength: number) => string;
|
|
88
|
+
export declare const sumAmount: (tobs: any[], property: string) => number;
|
package/lib/cjs/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validEmail = exports.convertToCfa = exports.packAndUnit = exports.unCheckedAll = exports.inputChecked = exports.arrayMultiChecked = exports.getColorAccordingToDate = exports.genRandomColour = exports.formatNgbDate = exports.dateToString = exports.replaceSpacesWith = exports.replaceAllIn = exports.sesStorageGet = exports.sesStorageSet = exports.genSequenceRef = exports.removeBackSlashOccurences = exports.removeString = exports.deepClone = exports.findFirstSequenceMissing = exports.fillNumWithZero = exports.findSequencesMissing = exports.sequencesToNumbers = exports.notInSequence = exports.reformatDates = exports.formatToStringCfa = exports.formatToString = exports.wakeUp = exports.sleep = exports.limitTo = exports.titleCase = exports.toObjectDate = exports.removeDuplicatesByKey = exports.removeDuplicates = exports.getRandomColor = exports.getNbOfDaysBetweenTwoDates = exports.displayDateRangeFr = exports.calPercent = exports.percentOf = exports.genDateMinutesStep = exports.convertFrDateToEnDate = exports.convertEnDateToFr = exports.formatDateMd = exports.formatDateYm = exports.formatDateYmFirstDay = exports.formatDateYmd = exports.formatFromAndToDate = exports.formatDateYmHypen = exports.formatDateFirstDayFr = exports.formatDateYmdHypenFr = exports.formatDateYmdHypen = void 0;
|
|
4
|
-
exports.fillEndWithZero = exports.fillStartWithZero = exports.absFromSequence = exports.returnDates = exports.displayFrDatePeriode = exports.getArrayOfRandomColor = exports.randomHslColor = exports.randomHexColor = exports.randomRgbColor = exports.randomInteger = exports.insertAtInArray = exports.isBirthday = exports.padEndWithZero = exports.padStartWithZero = exports.formatMonthYearToLocaleString = exports.calculPercent = void 0;
|
|
4
|
+
exports.sumAmount = exports.fillEndWithZero = exports.fillStartWithZero = exports.absFromSequence = exports.returnDates = exports.displayFrDatePeriode = exports.getArrayOfRandomColor = exports.randomHslColor = exports.randomHexColor = exports.randomRgbColor = exports.randomInteger = exports.insertAtInArray = exports.isBirthday = exports.padEndWithZero = exports.padStartWithZero = exports.formatMonthYearToLocaleString = exports.calculPercent = void 0;
|
|
5
5
|
const formatDateYmdHypen = (date) => {
|
|
6
6
|
return (0, exports.formatDateYmd)(date, "-");
|
|
7
7
|
};
|
|
@@ -490,3 +490,9 @@ const fillEndWithZero = (num, targetLength) => {
|
|
|
490
490
|
return num.toString().padEnd(targetLength, "0");
|
|
491
491
|
};
|
|
492
492
|
exports.fillEndWithZero = fillEndWithZero;
|
|
493
|
+
const sumAmount = (tobs, property) => {
|
|
494
|
+
return tobs.reduce((prev, curr) => {
|
|
495
|
+
return +prev + +curr[property];
|
|
496
|
+
}, 0);
|
|
497
|
+
};
|
|
498
|
+
exports.sumAmount = sumAmount;
|
|
@@ -3,7 +3,7 @@ export interface IPath {
|
|
|
3
3
|
id: number | string;
|
|
4
4
|
key?: string | number;
|
|
5
5
|
title: any;
|
|
6
|
-
link
|
|
6
|
+
link?: string;
|
|
7
7
|
default?: boolean;
|
|
8
8
|
icon?: string;
|
|
9
9
|
param?: any;
|
|
@@ -12,6 +12,7 @@ export interface IPath {
|
|
|
12
12
|
ms?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
state?: string | number;
|
|
15
|
+
Content?: any;
|
|
15
16
|
}
|
|
16
17
|
export declare type HeaderTableColumnType = {
|
|
17
18
|
thLabel: any;
|
package/lib/esm/utils.d.ts
CHANGED
|
@@ -85,3 +85,4 @@ export declare const returnDates: (fromDate: any, toDate: any) => {
|
|
|
85
85
|
export declare const absFromSequence: (arr: number[]) => number[];
|
|
86
86
|
export declare const fillStartWithZero: (num: string | number, targetLength: number) => string;
|
|
87
87
|
export declare const fillEndWithZero: (num: string | number, targetLength: number) => string;
|
|
88
|
+
export declare const sumAmount: (tobs: any[], property: string) => number;
|
package/lib/esm/utils.js
CHANGED
|
@@ -420,3 +420,8 @@ export const fillStartWithZero = (num, targetLength) => {
|
|
|
420
420
|
export const fillEndWithZero = (num, targetLength) => {
|
|
421
421
|
return num.toString().padEnd(targetLength, "0");
|
|
422
422
|
};
|
|
423
|
+
export const sumAmount = (tobs, property) => {
|
|
424
|
+
return tobs.reduce((prev, curr) => {
|
|
425
|
+
return +prev + +curr[property];
|
|
426
|
+
}, 0);
|
|
427
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asv-hlps",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.58",
|
|
4
4
|
"description": "helpers",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/bcryptjs": "^2.4.2",
|
|
20
|
+
"@types/pdfmake": "^0.2.1",
|
|
20
21
|
"@types/randomatic": "^3.1.3",
|
|
21
22
|
"@types/react": "^18.0.19",
|
|
22
23
|
"typescript": "^4.8.3"
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
"bcryptjs": "^2.4.3",
|
|
28
29
|
"classnames": "^2.3.1",
|
|
29
30
|
"jwt-decode": "^3.1.2",
|
|
31
|
+
"pdfmake": "^0.2.6",
|
|
30
32
|
"randomatic": "^3.1.1",
|
|
31
33
|
"yup": "^0.32.11"
|
|
32
34
|
}
|