@equinor/mad-dfw 0.5.4 → 0.5.6
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/CHANGELOG.md +14 -0
- package/dist/{chunk-OS3ECITX.js → chunk-2TLF63UB.js} +2 -2
- package/dist/{chunk-ZBIEH5QL.js → chunk-3QCSFFBK.js} +11 -2
- package/dist/{chunk-UKPLD6Y2.js → chunk-BXAE3AAV.js} +6 -3
- package/dist/{chunk-TRLDTHNI.js → chunk-CTARCKOR.js} +8 -5
- package/dist/{chunk-DQQOZB3E.js → chunk-TBLBQCUH.js} +5 -3
- package/dist/{chunk-2SHXH2H4.js → chunk-YBJFHSLC.js} +12 -6
- package/dist/dfwcomponents/PropertyRow/PropertyRow.d.ts +2 -1
- package/dist/dfwcomponents/PropertyRow/PropertyRow.js +1 -1
- package/dist/dfwcomponents/PropertyRow/index.js +1 -1
- package/dist/dfwcomponents/WorkOrderCell/WorkOrderCell.d.ts +1 -1
- package/dist/dfwcomponents/WorkOrderCell/WorkOrderCell.js +4 -4
- package/dist/dfwcomponents/WorkOrderCell/WorkOrderCellNavigation.d.ts +2 -1
- package/dist/dfwcomponents/WorkOrderCell/WorkOrderCellNavigation.js +4 -4
- package/dist/dfwcomponents/WorkOrderCell/WorkOrderPropertyList.d.ts +2 -1
- package/dist/dfwcomponents/WorkOrderCell/WorkOrderPropertyList.js +3 -3
- package/dist/dfwcomponents/WorkOrderCell/index.js +6 -6
- package/dist/dfwcomponents/WorkOrderCell/types.d.ts +4 -0
- package/dist/dfwcomponents/WorkOrderCell/utils.d.ts +1 -1
- package/dist/dfwcomponents/WorkOrderCell/utils.js +1 -1
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @equinor/mad-dfw
|
|
2
2
|
|
|
3
|
+
## 0.5.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 979b5bd: New prop for the `WorkOrderCell.Navigation` called `isBookmarked`. Can be used to
|
|
8
|
+
display the `bookmark` and `bookmark-outline` icons.
|
|
9
|
+
|
|
10
|
+
## 0.5.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 32f5bc9: New prop, `wrapValues`, that wraps the text values in the `WorkOrderCell` and
|
|
15
|
+
`WorkOrderCell.Navigation`.
|
|
16
|
+
|
|
3
17
|
## 0.5.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkOrderCell
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CTARCKOR.js";
|
|
4
4
|
import {
|
|
5
5
|
WorkOrderCellNavigation
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YBJFHSLC.js";
|
|
7
7
|
|
|
8
8
|
// src/dfwcomponents/WorkOrderCell/index.ts
|
|
9
9
|
var WorkOrderCell2 = WorkOrderCell;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
// src/dfwcomponents/WorkOrderCell/utils.ts
|
|
2
|
-
var getStatusIconConfig = (status) => {
|
|
2
|
+
var getStatusIconConfig = (status, isBookmarked) => {
|
|
3
3
|
const statusMap = {
|
|
4
|
+
bookmarked: {
|
|
5
|
+
icon: isBookmarked ? "bookmark" : "bookmark-outline",
|
|
6
|
+
label: "Bookmarked",
|
|
7
|
+
textColor: "textTertiary",
|
|
8
|
+
iconColor: "primary"
|
|
9
|
+
},
|
|
4
10
|
notStarted: {
|
|
5
11
|
icon: "circle-outline",
|
|
6
12
|
label: "Not started",
|
|
@@ -40,7 +46,7 @@ var getStatusIconConfig = (status) => {
|
|
|
40
46
|
};
|
|
41
47
|
return statusMap[status];
|
|
42
48
|
};
|
|
43
|
-
var getStatusIconsAndLabels = (activeStatusIds, requiredEndDate, hseCritical, productionCritical) => {
|
|
49
|
+
var getStatusIconsAndLabels = (activeStatusIds, requiredEndDate, hseCritical, productionCritical, isBookmarked) => {
|
|
44
50
|
var _a;
|
|
45
51
|
const today = /* @__PURE__ */ new Date();
|
|
46
52
|
const iconsAndLabels = [];
|
|
@@ -61,6 +67,9 @@ var getStatusIconsAndLabels = (activeStatusIds, requiredEndDate, hseCritical, pr
|
|
|
61
67
|
} else {
|
|
62
68
|
iconsAndLabels.push(getStatusIconConfig("notStarted"));
|
|
63
69
|
}
|
|
70
|
+
if (isBookmarked !== void 0) {
|
|
71
|
+
iconsAndLabels.push(getStatusIconConfig("bookmarked", isBookmarked));
|
|
72
|
+
}
|
|
64
73
|
return iconsAndLabels;
|
|
65
74
|
};
|
|
66
75
|
var formatDate = (dateString) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatDate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3QCSFFBK.js";
|
|
4
4
|
import {
|
|
5
5
|
PropertyRow
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TBLBQCUH.js";
|
|
7
7
|
|
|
8
8
|
// src/dfwcomponents/WorkOrderCell/WorkOrderPropertyList.tsx
|
|
9
9
|
import React from "react";
|
|
@@ -65,7 +65,8 @@ var propertyRowConfig = [
|
|
|
65
65
|
];
|
|
66
66
|
var WorkOrderPropertyList = ({
|
|
67
67
|
workOrder,
|
|
68
|
-
additionalPropertyRows = []
|
|
68
|
+
additionalPropertyRows = [],
|
|
69
|
+
wrapValues
|
|
69
70
|
}) => {
|
|
70
71
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, propertyRowConfig.map((item) => {
|
|
71
72
|
const label = typeof item.label === "function" ? item.label(workOrder) : item.label;
|
|
@@ -80,6 +81,7 @@ var WorkOrderPropertyList = ({
|
|
|
80
81
|
label,
|
|
81
82
|
value,
|
|
82
83
|
textColor,
|
|
84
|
+
wrapValues,
|
|
83
85
|
selectable: true
|
|
84
86
|
}
|
|
85
87
|
);
|
|
@@ -89,6 +91,7 @@ var WorkOrderPropertyList = ({
|
|
|
89
91
|
key: `additional-${index}`,
|
|
90
92
|
label: item.label,
|
|
91
93
|
value: item.value,
|
|
94
|
+
wrapValues,
|
|
92
95
|
selectable: true
|
|
93
96
|
}
|
|
94
97
|
)));
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-VDHOYF7Z.js";
|
|
4
4
|
import {
|
|
5
5
|
WorkOrderPropertyList
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BXAE3AAV.js";
|
|
7
7
|
import {
|
|
8
8
|
getStatusIconsAndLabels
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3QCSFFBK.js";
|
|
10
10
|
import {
|
|
11
11
|
__objRest,
|
|
12
12
|
__spreadValues
|
|
@@ -31,14 +31,16 @@ var WorkOrderCell = (_a) => {
|
|
|
31
31
|
readyForOperationButton,
|
|
32
32
|
tecoButton,
|
|
33
33
|
workOrder,
|
|
34
|
-
additionalPropertyRows = []
|
|
34
|
+
additionalPropertyRows = [],
|
|
35
|
+
wrapValues = false
|
|
35
36
|
} = _b, rest = __objRest(_b, [
|
|
36
37
|
"showSymbols",
|
|
37
38
|
"startJobButton",
|
|
38
39
|
"readyForOperationButton",
|
|
39
40
|
"tecoButton",
|
|
40
41
|
"workOrder",
|
|
41
|
-
"additionalPropertyRows"
|
|
42
|
+
"additionalPropertyRows",
|
|
43
|
+
"wrapValues"
|
|
42
44
|
]);
|
|
43
45
|
var _a2, _b2, _c;
|
|
44
46
|
const breakpoint = useBreakpoint();
|
|
@@ -67,7 +69,8 @@ var WorkOrderCell = (_a) => {
|
|
|
67
69
|
WorkOrderPropertyList,
|
|
68
70
|
{
|
|
69
71
|
workOrder,
|
|
70
|
-
additionalPropertyRows
|
|
72
|
+
additionalPropertyRows,
|
|
73
|
+
wrapValues
|
|
71
74
|
}
|
|
72
75
|
)), shouldShowActions && /* @__PURE__ */ React.createElement(
|
|
73
76
|
View,
|
|
@@ -20,13 +20,15 @@ var PropertyRow = (_a) => {
|
|
|
20
20
|
value,
|
|
21
21
|
iconName,
|
|
22
22
|
textColor = "textTertiary",
|
|
23
|
-
selectable
|
|
23
|
+
selectable,
|
|
24
|
+
wrapValues
|
|
24
25
|
} = _b, rest = __objRest(_b, [
|
|
25
26
|
"label",
|
|
26
27
|
"value",
|
|
27
28
|
"iconName",
|
|
28
29
|
"textColor",
|
|
29
|
-
"selectable"
|
|
30
|
+
"selectable",
|
|
31
|
+
"wrapValues"
|
|
30
32
|
]);
|
|
31
33
|
const breakpoint = useBreakpoint();
|
|
32
34
|
const styles = useStyles(themeStyles, { breakpoint });
|
|
@@ -38,7 +40,7 @@ var PropertyRow = (_a) => {
|
|
|
38
40
|
group: "paragraph",
|
|
39
41
|
variant: "body_short",
|
|
40
42
|
color: textColor,
|
|
41
|
-
numberOfLines: 1,
|
|
43
|
+
numberOfLines: wrapValues ? void 0 : 1,
|
|
42
44
|
selectable
|
|
43
45
|
},
|
|
44
46
|
value
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-VDHOYF7Z.js";
|
|
4
4
|
import {
|
|
5
5
|
WorkOrderPropertyList
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BXAE3AAV.js";
|
|
7
7
|
import {
|
|
8
8
|
getStatusIconsAndLabels
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3QCSFFBK.js";
|
|
10
10
|
import {
|
|
11
11
|
__objRest,
|
|
12
12
|
__spreadProps,
|
|
@@ -30,6 +30,8 @@ var WorkOrderCellNavigation = (_a) => {
|
|
|
30
30
|
leftSwipeGroup,
|
|
31
31
|
rightSwipeGroup,
|
|
32
32
|
additionalPropertyRows = [],
|
|
33
|
+
wrapValues = false,
|
|
34
|
+
isBookmarked,
|
|
33
35
|
onPress
|
|
34
36
|
} = _b, rest = __objRest(_b, [
|
|
35
37
|
"showSymbols",
|
|
@@ -37,6 +39,8 @@ var WorkOrderCellNavigation = (_a) => {
|
|
|
37
39
|
"leftSwipeGroup",
|
|
38
40
|
"rightSwipeGroup",
|
|
39
41
|
"additionalPropertyRows",
|
|
42
|
+
"wrapValues",
|
|
43
|
+
"isBookmarked",
|
|
40
44
|
"onPress"
|
|
41
45
|
]);
|
|
42
46
|
const styles = useStyles(themeStyles);
|
|
@@ -45,9 +49,10 @@ var WorkOrderCellNavigation = (_a) => {
|
|
|
45
49
|
workOrder.activeStatusIds,
|
|
46
50
|
workOrder.requiredEndDate,
|
|
47
51
|
workOrder.isHseCritical,
|
|
48
|
-
workOrder.isProductionCritical
|
|
52
|
+
workOrder.isProductionCritical,
|
|
53
|
+
isBookmarked
|
|
49
54
|
),
|
|
50
|
-
[workOrder]
|
|
55
|
+
[isBookmarked, workOrder]
|
|
51
56
|
);
|
|
52
57
|
return /* @__PURE__ */ React.createElement(
|
|
53
58
|
Cell,
|
|
@@ -60,9 +65,10 @@ var WorkOrderCellNavigation = (_a) => {
|
|
|
60
65
|
WorkOrderPropertyList,
|
|
61
66
|
{
|
|
62
67
|
workOrder,
|
|
63
|
-
additionalPropertyRows
|
|
68
|
+
additionalPropertyRows,
|
|
69
|
+
wrapValues
|
|
64
70
|
}
|
|
65
|
-
)
|
|
71
|
+
))), showSymbols && /* @__PURE__ */ React.createElement(View, { style: styles.iconListContainer }, iconsAndLabels.map((item, index) => /* @__PURE__ */ React.createElement(StatusIcon, __spreadProps(__spreadValues({ key: index }, item), { label: void 0 })))), /* @__PURE__ */ React.createElement(Icon, { name: "chevron-right" }))
|
|
66
72
|
);
|
|
67
73
|
};
|
|
68
74
|
var themeStyles = EDSStyleSheet.create((theme) => ({
|
|
@@ -7,5 +7,6 @@ export type PropertyRowProps = {
|
|
|
7
7
|
iconName?: IconName;
|
|
8
8
|
textColor?: Color;
|
|
9
9
|
selectable?: boolean;
|
|
10
|
+
wrapValues?: boolean;
|
|
10
11
|
} & ViewProps;
|
|
11
|
-
export declare const PropertyRow: ({ label, value, iconName, textColor, selectable, ...rest }: PropertyRowProps) => React.JSX.Element;
|
|
12
|
+
export declare const PropertyRow: ({ label, value, iconName, textColor, selectable, wrapValues, ...rest }: PropertyRowProps) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { WorkOrderCellProps } from "./types";
|
|
3
|
-
export declare const WorkOrderCell: ({ showSymbols, startJobButton, readyForOperationButton, tecoButton, workOrder, additionalPropertyRows, ...rest }: WorkOrderCellProps) => React.JSX.Element;
|
|
3
|
+
export declare const WorkOrderCell: ({ showSymbols, startJobButton, readyForOperationButton, tecoButton, workOrder, additionalPropertyRows, wrapValues, ...rest }: WorkOrderCellProps) => React.JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkOrderCell
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-CTARCKOR.js";
|
|
4
4
|
import "../../chunk-VDHOYF7Z.js";
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-BXAE3AAV.js";
|
|
6
|
+
import "../../chunk-3QCSFFBK.js";
|
|
7
7
|
import "../../chunk-2JQRYR7Z.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-TBLBQCUH.js";
|
|
9
9
|
import "../../chunk-G2ADBYYC.js";
|
|
10
10
|
export {
|
|
11
11
|
WorkOrderCell
|
|
@@ -6,6 +6,7 @@ type WorkOrderCellNavigationProps = WorkOrderCellProps & {
|
|
|
6
6
|
onPress: () => void;
|
|
7
7
|
leftSwipeGroup?: SwipeGroup;
|
|
8
8
|
rightSwipeGroup?: SwipeGroup;
|
|
9
|
+
isBookmarked?: boolean;
|
|
9
10
|
};
|
|
10
|
-
export declare const WorkOrderCellNavigation: ({ showSymbols, workOrder, leftSwipeGroup, rightSwipeGroup, additionalPropertyRows, onPress, ...rest }: WorkOrderCellNavigationProps) => React.JSX.Element;
|
|
11
|
+
export declare const WorkOrderCellNavigation: ({ showSymbols, workOrder, leftSwipeGroup, rightSwipeGroup, additionalPropertyRows, wrapValues, isBookmarked, onPress, ...rest }: WorkOrderCellNavigationProps) => React.JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkOrderCellNavigation
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-YBJFHSLC.js";
|
|
4
4
|
import "../../chunk-VDHOYF7Z.js";
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-BXAE3AAV.js";
|
|
6
|
+
import "../../chunk-3QCSFFBK.js";
|
|
7
7
|
import "../../chunk-2JQRYR7Z.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-TBLBQCUH.js";
|
|
9
9
|
import "../../chunk-G2ADBYYC.js";
|
|
10
10
|
export {
|
|
11
11
|
WorkOrderCellNavigation
|
|
@@ -3,6 +3,7 @@ import { AdditionalPropertyRow, WorkOrder } from "./types";
|
|
|
3
3
|
type WorkOrderPropertyListProps = {
|
|
4
4
|
workOrder: WorkOrder;
|
|
5
5
|
additionalPropertyRows?: AdditionalPropertyRow[];
|
|
6
|
+
wrapValues?: boolean;
|
|
6
7
|
};
|
|
7
|
-
export declare const WorkOrderPropertyList: ({ workOrder, additionalPropertyRows, }: WorkOrderPropertyListProps) => React.JSX.Element;
|
|
8
|
+
export declare const WorkOrderPropertyList: ({ workOrder, additionalPropertyRows, wrapValues, }: WorkOrderPropertyListProps) => React.JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkOrderPropertyList
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-BXAE3AAV.js";
|
|
4
|
+
import "../../chunk-3QCSFFBK.js";
|
|
5
5
|
import "../../chunk-2JQRYR7Z.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-TBLBQCUH.js";
|
|
7
7
|
import "../../chunk-G2ADBYYC.js";
|
|
8
8
|
export {
|
|
9
9
|
WorkOrderPropertyList
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkOrderCell
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-2TLF63UB.js";
|
|
4
|
+
import "../../chunk-CTARCKOR.js";
|
|
5
|
+
import "../../chunk-YBJFHSLC.js";
|
|
6
6
|
import "../../chunk-VDHOYF7Z.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-BXAE3AAV.js";
|
|
8
|
+
import "../../chunk-3QCSFFBK.js";
|
|
9
9
|
import "../../chunk-2JQRYR7Z.js";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-TBLBQCUH.js";
|
|
11
11
|
import "../../chunk-G2ADBYYC.js";
|
|
12
12
|
export {
|
|
13
13
|
WorkOrderCell
|
|
@@ -49,6 +49,10 @@ export type WorkOrderCellProps = {
|
|
|
49
49
|
*/
|
|
50
50
|
workOrder: WorkOrder;
|
|
51
51
|
additionalPropertyRows?: AdditionalPropertyRow[];
|
|
52
|
+
/**
|
|
53
|
+
* Boolean value indicating whether or not the values of the work order properties should wrap.
|
|
54
|
+
*/
|
|
55
|
+
wrapValues?: boolean;
|
|
52
56
|
} & Omit<ViewProps, "children">;
|
|
53
57
|
export type StatusConfig = {
|
|
54
58
|
icon: IconName;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { StatusConfig } from "./types";
|
|
2
|
-
export declare const getStatusIconsAndLabels: (activeStatusIds?: string, requiredEndDate?: string, hseCritical?: boolean, productionCritical?: boolean) => StatusConfig[];
|
|
2
|
+
export declare const getStatusIconsAndLabels: (activeStatusIds?: string, requiredEndDate?: string, hseCritical?: boolean, productionCritical?: boolean, isBookmarked?: boolean) => StatusConfig[];
|
|
3
3
|
export declare const formatDate: (dateString: string) => string;
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkOrderCell
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-2TLF63UB.js";
|
|
4
|
+
import "./chunk-CTARCKOR.js";
|
|
5
|
+
import "./chunk-YBJFHSLC.js";
|
|
6
6
|
import "./chunk-VDHOYF7Z.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-BXAE3AAV.js";
|
|
8
|
+
import "./chunk-3QCSFFBK.js";
|
|
9
9
|
import "./chunk-2JQRYR7Z.js";
|
|
10
10
|
import {
|
|
11
11
|
PropertyRow
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TBLBQCUH.js";
|
|
13
13
|
import "./chunk-G2ADBYYC.js";
|
|
14
14
|
export {
|
|
15
15
|
PropertyRow,
|