@jaws-developers-customers/consulca-types 1.0.0 → 1.0.3
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/index.d.ts +14 -0
- package/index.js +13 -10
- package/index.mjs +3 -0
- package/package.json +4 -1
package/index.d.ts
CHANGED
|
@@ -12,6 +12,19 @@ export type ConditionStatus = 'good' | 'minor_damage' | 'major_damage' | 'not_ch
|
|
|
12
12
|
export type ClaimStatus = 'draft' | 'submitted' | 'in_review' | 'approved' | 'rejected' | 'closed';
|
|
13
13
|
export type WorkStatus = 'planned' | 'assigned' | 'in_progress' | 'completed' | 'cancelled';
|
|
14
14
|
|
|
15
|
+
export interface ColorPalette {
|
|
16
|
+
primary: string;
|
|
17
|
+
secondary: string;
|
|
18
|
+
accent: string;
|
|
19
|
+
background: string;
|
|
20
|
+
text: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Constants {
|
|
24
|
+
API_DEV: string;
|
|
25
|
+
API: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
15
28
|
export interface Addressable {
|
|
16
29
|
address_line1?: string | null;
|
|
17
30
|
address_line2?: string | null;
|
|
@@ -220,6 +233,7 @@ export declare const INSPECTION_STATUSES: readonly InspectionStatus[];
|
|
|
220
233
|
export declare const CONDITION_STATUSES: readonly ConditionStatus[];
|
|
221
234
|
export declare const CLAIM_STATUSES: readonly ClaimStatus[];
|
|
222
235
|
export declare const WORK_STATUSES: readonly WorkStatus[];
|
|
236
|
+
export declare const COLOR_PALETTE: Readonly<ColorPalette>;
|
|
223
237
|
|
|
224
238
|
export declare function toDate(value: string | number | Date | null | undefined): Date | null;
|
|
225
239
|
export declare function formatDate(
|
package/index.js
CHANGED
|
@@ -13,6 +13,17 @@ const INSPECTION_STATUSES = Object.freeze(['draft', 'in_progress', 'submitted',
|
|
|
13
13
|
const CONDITION_STATUSES = Object.freeze(['good', 'minor_damage', 'major_damage', 'not_checked']);
|
|
14
14
|
const CLAIM_STATUSES = Object.freeze(['draft', 'submitted', 'in_review', 'approved', 'rejected', 'closed']);
|
|
15
15
|
const WORK_STATUSES = Object.freeze(['planned', 'assigned', 'in_progress', 'completed', 'cancelled']);
|
|
16
|
+
const COLOR_PALETTE = Object.freeze({
|
|
17
|
+
primary: '#334E68',
|
|
18
|
+
secondary: '#829AB1',
|
|
19
|
+
accent: '#D64545',
|
|
20
|
+
background: '#F7F9FB',
|
|
21
|
+
text: '#102A43',
|
|
22
|
+
});
|
|
23
|
+
const CONSTANTS = Object.freeze({
|
|
24
|
+
API_DEV: 'api.consulca.local',
|
|
25
|
+
API: 'api.consulca.ch'
|
|
26
|
+
});
|
|
16
27
|
|
|
17
28
|
function toDate(value) {
|
|
18
29
|
if (value === null || value === undefined || value === '') {
|
|
@@ -105,21 +116,12 @@ function hasAccessChannel(accessChannels, channel) {
|
|
|
105
116
|
});
|
|
106
117
|
}
|
|
107
118
|
|
|
108
|
-
function getColorPalette(){
|
|
109
|
-
return {
|
|
110
|
-
"parcoCeresio": {
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
"general": {
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
119
|
|
|
119
120
|
module.exports = {
|
|
120
121
|
ACCESS_CHANNELS,
|
|
121
122
|
ACCESS_STATUSES,
|
|
122
123
|
CLAIM_STATUSES,
|
|
124
|
+
COLOR_PALETTE,
|
|
123
125
|
CONDITION_STATUSES,
|
|
124
126
|
INSPECTION_STATUSES,
|
|
125
127
|
INSPECTION_TYPES,
|
|
@@ -130,6 +132,7 @@ module.exports = {
|
|
|
130
132
|
USER_ROLES,
|
|
131
133
|
USER_STATUSES,
|
|
132
134
|
WORK_STATUSES,
|
|
135
|
+
CONSTANTS,
|
|
133
136
|
formatAddress,
|
|
134
137
|
formatCurrency,
|
|
135
138
|
formatDate,
|
package/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ export const {
|
|
|
4
4
|
ACCESS_CHANNELS,
|
|
5
5
|
ACCESS_STATUSES,
|
|
6
6
|
CLAIM_STATUSES,
|
|
7
|
+
COLOR_PALETTE,
|
|
7
8
|
CONDITION_STATUSES,
|
|
8
9
|
INSPECTION_STATUSES,
|
|
9
10
|
INSPECTION_TYPES,
|
|
@@ -14,10 +15,12 @@ export const {
|
|
|
14
15
|
USER_ROLES,
|
|
15
16
|
USER_STATUSES,
|
|
16
17
|
WORK_STATUSES,
|
|
18
|
+
CONSTANTS,
|
|
17
19
|
formatAddress,
|
|
18
20
|
formatCurrency,
|
|
19
21
|
formatDate,
|
|
20
22
|
formatDateTime,
|
|
23
|
+
getColorPalette,
|
|
21
24
|
getUserFullName,
|
|
22
25
|
hasAccessChannel,
|
|
23
26
|
hasUserRole,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaws-developers-customers/consulca-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Tipi e helper per il dominio Consulca.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"consulca",
|
|
@@ -44,5 +44,8 @@
|
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"jaws-helper": "^3.2.3"
|
|
47
50
|
}
|
|
48
51
|
}
|