@corva/ui 0.58.0-8 → 0.58.0-9
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/cjs-bundle/components/StatusBadge/constants.js +1 -1
- package/cjs-bundle/components/StatusBadge/utils.js +1 -1
- package/components/StatusBadge/__tests__/StatusBadge.test.d.ts.map +1 -1
- package/components/StatusBadge/__tests__/useWellnessAlerts.test.d.ts +2 -0
- package/components/StatusBadge/__tests__/useWellnessAlerts.test.d.ts.map +1 -0
- package/components/StatusBadge/__tests__/utils.test.d.ts +2 -0
- package/components/StatusBadge/__tests__/utils.test.d.ts.map +1 -0
- package/components/StatusBadge/api.d.ts +4 -0
- package/components/StatusBadge/api.d.ts.map +1 -0
- package/components/StatusBadge/constants.d.ts +12 -0
- package/components/StatusBadge/constants.d.ts.map +1 -1
- package/components/StatusBadge/constants.js +1 -1
- package/components/StatusBadge/types.d.ts +48 -0
- package/components/StatusBadge/types.d.ts.map +1 -0
- package/components/StatusBadge/useWellnessAlerts.d.ts +10 -0
- package/components/StatusBadge/useWellnessAlerts.d.ts.map +1 -0
- package/components/StatusBadge/utils.d.ts +8 -3
- package/components/StatusBadge/utils.d.ts.map +1 -1
- package/components/StatusBadge/utils.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/icons/Warning"),r=require("@material-ui/icons/Done"),s=require("@material-ui/icons/Error"),i=require("@material-ui/icons/CheckCircle"),o=require("../Icons/DangerousIcon.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a,t=n(e),u=n(r),c=n(s),l=n(i),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/icons/Warning"),r=require("@material-ui/icons/Done"),s=require("@material-ui/icons/Error"),i=require("@material-ui/icons/CheckCircle"),o=require("../Icons/DangerousIcon.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a,t=n(e),u=n(r),c=n(s),l=n(i),E={Missing:o.DangerousIcon,Issue:c.default,Resolved:l.default},I={success:"success",warning:"warning",error:"error"},d=((a={})[I.success]=u.default,a[I.warning]=t.default,a[I.error]=o.DangerousIcon,a);exports.ALERT_ICONS=E,exports.ALERT_STATES={missing:"Missing",issue:"Issue"},exports.ALERT_STATUSES={FLAGGED:"flagged",RESOLVED:"resolved",OPEN:"open",INVESTIGATION:"investigation"},exports.BADGE_ICONS=d,exports.BADGE_ICON_STATUSES=I,exports.MAX_MOBILE_WIDTH=959,exports.WARNING="Recommendations may be incorrect based on data quality errors";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./constants.js");exports.getDeductsFromScoreClass=function(e,r,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./constants.js");exports.getDeductsFromScoreClass=function(e,r,o){return o||!r?"":r>40?e.error:r>10?e.warn:r>5?e.ok:e.good},exports.getDeductsFromScoreValue=function(e,r){return!r&&e>=0?"".concat(e,"%"):"—"},exports.isResolved=function(r){return void 0===r&&(r=""),r.toLowerCase()===e.ALERT_STATUSES.RESOLVED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.test.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/__tests__/StatusBadge.test.
|
|
1
|
+
{"version":3,"file":"StatusBadge.test.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/__tests__/StatusBadge.test.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWellnessAlerts.test.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/__tests__/useWellnessAlerts.test.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/__tests__/utils.test.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/api.ts"],"names":[],"mappings":"AAKA,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,CAYtD;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAc7E;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAYtF"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export declare const MAX_MOBILE_WIDTH = 959;
|
|
2
2
|
export declare type BadgeIconStatus = 'warning' | 'error' | 'success';
|
|
3
3
|
export declare const ALERT_STATUSES: {
|
|
4
|
+
FLAGGED: string;
|
|
4
5
|
RESOLVED: string;
|
|
6
|
+
OPEN: string;
|
|
7
|
+
INVESTIGATION: string;
|
|
5
8
|
};
|
|
6
9
|
export declare const ALERT_ICONS: {
|
|
7
10
|
Missing: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
|
|
@@ -51,5 +54,14 @@ export declare const BADGE_ICONS: {
|
|
|
51
54
|
error: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
|
|
52
55
|
};
|
|
53
56
|
export declare const WARNING = "Recommendations may be incorrect based on data quality errors";
|
|
57
|
+
export declare const METADATA: {
|
|
58
|
+
recordProvider: string;
|
|
59
|
+
recordCollections: {
|
|
60
|
+
wellnessAlerts: string;
|
|
61
|
+
wcuRuleMapping: string;
|
|
62
|
+
wellnessRuleSettings: string;
|
|
63
|
+
wcuRulesCheckTime: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
54
66
|
export {};
|
|
55
67
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D,eAAO,MAAM,cAAc;;;;;CAK1B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,aAAK,KAAK,GAAG,OAAO,CAAC;AACrB,aAAK,OAAO,GAAG,SAAS,CAAC;AAEzB,oBAAY,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAG1D,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpD,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAIjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,eAAO,MAAM,OAAO,kEAAkE,CAAC;AAEvF,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@material-ui/icons/Warning";import
|
|
1
|
+
import r from"@material-ui/icons/Warning";import i from"@material-ui/icons/Done";import s from"@material-ui/icons/Error";import o from"@material-ui/icons/CheckCircle";import{DangerousIcon as e}from"../Icons/DangerousIcon.js";var n,a=959,m={FLAGGED:"flagged",RESOLVED:"resolved",OPEN:"open",INVESTIGATION:"investigation"},c={Missing:e,Issue:s,Resolved:o},t={missing:"Missing",issue:"Issue"},u={success:"success",warning:"warning",error:"error"},g=((n={})[u.success]=i,n[u.warning]=r,n[u.error]=e,n),l="Recommendations may be incorrect based on data quality errors";export{c as ALERT_ICONS,t as ALERT_STATES,m as ALERT_STATUSES,g as BADGE_ICONS,u as BADGE_ICON_STATUSES,a as MAX_MOBILE_WIDTH,l as WARNING};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare type GetDeductsFromScoreClass = (styles: Record<string, string>, score: number, isResolved: boolean) => string;
|
|
2
|
+
export declare type GetDeductsFromScoreValue = (deductsFromScore: number, isResolved: boolean) => string;
|
|
3
|
+
declare type WellnessAlert = {
|
|
4
|
+
id: string;
|
|
5
|
+
assetId: number;
|
|
6
|
+
name: string;
|
|
7
|
+
category: string;
|
|
8
|
+
lastCheckedAt: string;
|
|
9
|
+
message: string;
|
|
10
|
+
status: string;
|
|
11
|
+
statusReason: string;
|
|
12
|
+
statusUpdatedAt: string;
|
|
13
|
+
state: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
note: string;
|
|
16
|
+
isThrottled: boolean;
|
|
17
|
+
segment: string;
|
|
18
|
+
metrics: {
|
|
19
|
+
holeDepth?: number;
|
|
20
|
+
state?: string;
|
|
21
|
+
};
|
|
22
|
+
deductsFromScore: boolean;
|
|
23
|
+
} | null;
|
|
24
|
+
export declare type ParseWellnessAlertFromJson = (obj: {
|
|
25
|
+
_id: string;
|
|
26
|
+
asset_id: number;
|
|
27
|
+
data: {
|
|
28
|
+
name: string;
|
|
29
|
+
category: string;
|
|
30
|
+
last_checked_at: string;
|
|
31
|
+
message: string;
|
|
32
|
+
status: string;
|
|
33
|
+
status_reason: string;
|
|
34
|
+
status_updated_at: string;
|
|
35
|
+
state: string;
|
|
36
|
+
note: string;
|
|
37
|
+
is_throttled: boolean;
|
|
38
|
+
segment: string;
|
|
39
|
+
metrics?: {
|
|
40
|
+
hole_depth?: number;
|
|
41
|
+
state?: string;
|
|
42
|
+
};
|
|
43
|
+
deducts_from_score: boolean;
|
|
44
|
+
};
|
|
45
|
+
timestamp: string;
|
|
46
|
+
}) => WellnessAlert;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/types.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB,GAAG,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,OAAO,KAChB,MAAM,CAAC;AAEZ,oBAAY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C;SAChB,CAAC;QACF,kBAAkB,EAAE,OAAO,CAAC;KAC7B,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;CACnB,KAAK,aAAa,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const useWellnessAlerts: ({ asset, multiRigAssets, appId, dashboards }: {
|
|
2
|
+
asset: any;
|
|
3
|
+
multiRigAssets?: any[];
|
|
4
|
+
appId: any;
|
|
5
|
+
dashboards: any;
|
|
6
|
+
}) => {
|
|
7
|
+
wellnessAlerts: {};
|
|
8
|
+
statusBadgeIconType: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useWellnessAlerts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWellnessAlerts.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/useWellnessAlerts.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,iBAAiB;;;;;;;;CAgF7B,CAAC"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { ParseWellnessAlertFromJson, GetDeductsFromScoreValue, GetDeductsFromScoreClass } from '~/components/StatusBadge/types';
|
|
1
2
|
export declare const isResolved: (status: string) => boolean;
|
|
2
|
-
declare type GetDeductsFromScoreClass = (styles: Record<string, string>, score: number, isResolved: boolean) => string;
|
|
3
3
|
export declare const getDeductsFromScoreClass: GetDeductsFromScoreClass;
|
|
4
|
-
declare type GetDeductsFromScoreValue = (deductsFromScore: number, isResolved: boolean) => string;
|
|
5
4
|
export declare const getDeductsFromScoreValue: GetDeductsFromScoreValue;
|
|
6
|
-
export
|
|
5
|
+
export declare const parseWellnessAlertFromJson: ParseWellnessAlertFromJson;
|
|
6
|
+
export declare const getLinkToDQPage: ({ assetId, wellHubSlug }: {
|
|
7
|
+
assetId: number;
|
|
8
|
+
wellHubSlug: string;
|
|
9
|
+
}) => string;
|
|
10
|
+
export declare const groupAlertsByAssetName: (alerts: any, assetsList: any) => any;
|
|
11
|
+
export declare const getNewWellnessAlerts: (assetsList: any, parsedWellnessAlerts: any, wellHubSlug: any) => any;
|
|
7
12
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gCAAgC,CAAC;AAExC,eAAO,MAAM,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAA2E,CAAC;AAEzH,eAAO,MAAM,wBAAwB,EAAE,wBAatC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,wBAEtC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,0BA8BxC,CAAC;AAEF,eAAO,MAAM,eAAe;aAAyC,MAAM;iBAAe,MAAM;MAAK,MACnD,CAAC;AAEnD,eAAO,MAAM,sBAAsB,uCAc3B,CAAC;AAET,eAAO,MAAM,oBAAoB,uEAmChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ALERT_STATUSES as
|
|
1
|
+
import{ALERT_STATUSES as o}from"./constants.js";var r=function(r){return void 0===r&&(r=""),r.toLowerCase()===o.RESOLVED},n=function(o,r,n){return n||!r?"":r>40?o.error:r>10?o.warn:r>5?o.ok:o.good},t=function(o,r){return!r&&o>=0?"".concat(o,"%"):"—"};export{n as getDeductsFromScoreClass,t as getDeductsFromScoreValue,r as isResolved};
|