@verdocs/js-sdk 3.9.7 → 3.10.0
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/Utils/Primitives.d.ts +9 -0
- package/Utils/Primitives.js +13 -0
- package/package.json +10 -9
package/Utils/Primitives.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import { IProfile } from '../Users/Types';
|
|
1
2
|
/**
|
|
2
3
|
* Create an array containing a sequence of integers, e.g. [START, START+1, START+2, ...] This is frequently useful
|
|
3
4
|
* in rendering operations when there is no source array to .map() across.
|
|
4
5
|
*/
|
|
5
6
|
export declare const integerSequence: (start: number, count: number) => number[];
|
|
7
|
+
/**
|
|
8
|
+
* Format a profile's full name
|
|
9
|
+
*/
|
|
10
|
+
export declare const formatFullName: (profile?: IProfile) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Format a profile's initials
|
|
13
|
+
*/
|
|
14
|
+
export declare const formatInitials: (profile?: IProfile) => string;
|
|
6
15
|
/**
|
|
7
16
|
* Generate suggested initials for a full name, e.g. "John Doe" will yield "JD".
|
|
8
17
|
*/
|
package/Utils/Primitives.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { capitalize } from './Strings';
|
|
1
2
|
/**
|
|
2
3
|
* Create an array containing a sequence of integers, e.g. [START, START+1, START+2, ...] This is frequently useful
|
|
3
4
|
* in rendering operations when there is no source array to .map() across.
|
|
@@ -7,6 +8,18 @@ export var integerSequence = function (start, count) {
|
|
|
7
8
|
.fill(1)
|
|
8
9
|
.map(function (_, index) { return index + start; });
|
|
9
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Format a profile's full name
|
|
13
|
+
*/
|
|
14
|
+
export var formatFullName = function (profile) {
|
|
15
|
+
return profile ? "".concat(capitalize(profile.first_name), " ").concat(capitalize(profile.last_name)) : 'Invalid User';
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Format a profile's initials
|
|
19
|
+
*/
|
|
20
|
+
export var formatInitials = function (profile) {
|
|
21
|
+
return profile ? "".concat(capitalize(profile.first_name).charAt(0), " ").concat(capitalize(profile.last_name).charAt(0)) : '--';
|
|
22
|
+
};
|
|
10
23
|
/**
|
|
11
24
|
* Generate suggested initials for a full name, e.g. "John Doe" will yield "JD".
|
|
12
25
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdocs/js-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"homepage": "https://github.com/Verdocs/js-sdk",
|
|
6
6
|
"description": "Verdocs JS SDK",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
35
35
|
"lint": "tslint -p tsconfig.json",
|
|
36
36
|
"docs-md": "typedoc --tsconfig ./tsconfig-typedoc.json",
|
|
37
|
-
"docs-html": "typedoc --tsconfig ./tsconfig-typedoc.json --
|
|
37
|
+
"docs-html": "typedoc --tsconfig ./tsconfig-typedoc.json --out docs-html",
|
|
38
|
+
"Xdocs-html": "typedoc --tsconfig ./tsconfig-typedoc.json --plugin none --out docs-html",
|
|
38
39
|
"docs": "npm run docs-md && npm run docs-html",
|
|
39
40
|
"clear-docs": "aws --profile=verdocs cloudfront create-invalidation --distribution-id E29UFGU4KEH1GQ --paths \"/*\"",
|
|
40
41
|
"deploy-docs": "npm run docs && aws --profile=verdocs s3 sync --acl public-read --delete docs-html s3://verdocs-developers-js-sdk/ && yarn clear-docs",
|
|
@@ -45,23 +46,23 @@
|
|
|
45
46
|
"access": "public"
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"axios": "^1.
|
|
49
|
+
"axios": "^1.5.1",
|
|
49
50
|
"axios-retry": "^3.4.0"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
|
-
"typescript": "^
|
|
53
|
+
"typescript": "^5.2.2"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@jest/globals": "^29.5.0",
|
|
56
57
|
"@types/jest": "^29.5.0",
|
|
57
58
|
"axios-mock-adapter": "^1.21.3",
|
|
58
59
|
"jest": "^29.5.0",
|
|
59
|
-
"prettier": "^
|
|
60
|
-
"ts-jest": "^29.
|
|
60
|
+
"prettier": "^3.0.3",
|
|
61
|
+
"ts-jest": "^29.1.1",
|
|
61
62
|
"tslint": "^6.1.3",
|
|
62
63
|
"tslint-config-prettier": "^1.18.0",
|
|
63
|
-
"typedoc": "^0.
|
|
64
|
-
"typedoc-plugin-markdown": "^3.
|
|
65
|
-
"typescript": "^
|
|
64
|
+
"typedoc": "^0.25.2",
|
|
65
|
+
"typedoc-plugin-markdown": "^3.16.0",
|
|
66
|
+
"typescript": "^5.2.2"
|
|
66
67
|
}
|
|
67
68
|
}
|