@equinor/mad-dfw 0.5.6 → 0.5.7

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @equinor/mad-dfw
2
2
 
3
+ ## 0.5.7
4
+
5
+ ### Patch Changes
6
+
7
+ - 91f3bcc: Icons in the `WorkOrderCell.Navigation` now shows on a new line on smaller devices.
8
+
3
9
  ## 0.5.6
4
10
 
5
11
  ### Patch Changes
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-VDHOYF7Z.js";
4
4
  import {
5
5
  WorkOrderPropertyList
6
- } from "./chunk-BXAE3AAV.js";
6
+ } from "./chunk-OD6DLDFB.js";
7
7
  import {
8
8
  getStatusIconsAndLabels
9
9
  } from "./chunk-3QCSFFBK.js";
@@ -19,6 +19,7 @@ import {
19
19
  EDSStyleSheet,
20
20
  Icon,
21
21
  Typography,
22
+ useBreakpoint,
22
23
  useStyles
23
24
  } from "@equinor/mad-components";
24
25
  import React, { useMemo } from "react";
@@ -44,6 +45,7 @@ var WorkOrderCellNavigation = (_a) => {
44
45
  "onPress"
45
46
  ]);
46
47
  const styles = useStyles(themeStyles);
48
+ const isMobile = useBreakpoint() === "xs";
47
49
  const iconsAndLabels = useMemo(
48
50
  () => getStatusIconsAndLabels(
49
51
  workOrder.activeStatusIds,
@@ -54,6 +56,7 @@ var WorkOrderCellNavigation = (_a) => {
54
56
  ),
55
57
  [isBookmarked, workOrder]
56
58
  );
59
+ const renderIcons = () => /* @__PURE__ */ React.createElement(View, { style: isMobile ? styles.mobileIconList : styles.iconList }, iconsAndLabels.map((item, index) => /* @__PURE__ */ React.createElement(StatusIcon, __spreadProps(__spreadValues({ key: index }, item), { label: void 0 }))));
57
60
  return /* @__PURE__ */ React.createElement(
58
61
  Cell,
59
62
  __spreadProps(__spreadValues({}, rest), {
@@ -61,14 +64,23 @@ var WorkOrderCellNavigation = (_a) => {
61
64
  leftSwipeGroup,
62
65
  rightSwipeGroup
63
66
  }),
64
- /* @__PURE__ */ React.createElement(View, { style: styles.container }, /* @__PURE__ */ React.createElement(View, { style: styles.contentContainer }, /* @__PURE__ */ React.createElement(Typography, { numberOfLines: 1, variant: "h5", bold: true, style: styles.title }, workOrder.title), /* @__PURE__ */ React.createElement(View, { style: styles.dataContainer }, workOrder.maintenanceType && /* @__PURE__ */ React.createElement(Typography, { group: "paragraph", variant: "body_short", color: "textTertiary" }, workOrder.maintenanceType), /* @__PURE__ */ React.createElement(
67
+ /* @__PURE__ */ React.createElement(View, { style: styles.container }, /* @__PURE__ */ React.createElement(View, { style: styles.contentContainer }, /* @__PURE__ */ React.createElement(
68
+ Typography,
69
+ {
70
+ numberOfLines: 1,
71
+ variant: "h5",
72
+ bold: true,
73
+ style: isMobile ? void 0 : styles.title
74
+ },
75
+ workOrder.title
76
+ ), showSymbols && isMobile && renderIcons(), /* @__PURE__ */ React.createElement(View, { style: styles.dataContainer }, workOrder.maintenanceType && /* @__PURE__ */ React.createElement(Typography, { group: "paragraph", variant: "body_short", color: "textTertiary" }, workOrder.maintenanceType), /* @__PURE__ */ React.createElement(
65
77
  WorkOrderPropertyList,
66
78
  {
67
79
  workOrder,
68
80
  additionalPropertyRows,
69
81
  wrapValues
70
82
  }
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" }))
83
+ ))), showSymbols && !isMobile && renderIcons(), /* @__PURE__ */ React.createElement(Icon, { name: "chevron-right" }))
72
84
  );
73
85
  };
74
86
  var themeStyles = EDSStyleSheet.create((theme) => ({
@@ -87,13 +99,20 @@ var themeStyles = EDSStyleSheet.create((theme) => ({
87
99
  dataContainer: {
88
100
  gap: theme.spacing.cell.group.titleBottomPadding
89
101
  },
90
- iconListContainer: {
102
+ iconList: {
91
103
  position: "absolute",
92
104
  top: 0,
93
105
  right: 0,
94
106
  flexDirection: "row",
95
107
  alignItems: "center",
96
108
  gap: theme.spacing.spacer.small
109
+ },
110
+ mobileIconList: {
111
+ flexDirection: "row",
112
+ flexWrap: "wrap",
113
+ alignItems: "center",
114
+ gap: theme.spacing.spacer.small,
115
+ paddingVertical: theme.spacing.container.paddingVertical
97
116
  }
98
117
  }));
99
118
 
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-VDHOYF7Z.js";
4
4
  import {
5
5
  WorkOrderPropertyList
6
- } from "./chunk-BXAE3AAV.js";
6
+ } from "./chunk-OD6DLDFB.js";
7
7
  import {
8
8
  getStatusIconsAndLabels
9
9
  } from "./chunk-3QCSFFBK.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  WorkOrderCell
3
- } from "./chunk-CTARCKOR.js";
3
+ } from "./chunk-RRG3OVHG.js";
4
4
  import {
5
5
  WorkOrderCellNavigation
6
- } from "./chunk-YBJFHSLC.js";
6
+ } from "./chunk-OZIGJHVX.js";
7
7
 
8
8
  // src/dfwcomponents/WorkOrderCell/index.ts
9
9
  var WorkOrderCell2 = WorkOrderCell;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WorkOrderCell
3
- } from "../../chunk-CTARCKOR.js";
3
+ } from "../../chunk-RRG3OVHG.js";
4
4
  import "../../chunk-VDHOYF7Z.js";
5
- import "../../chunk-BXAE3AAV.js";
6
- import "../../chunk-3QCSFFBK.js";
5
+ import "../../chunk-OD6DLDFB.js";
7
6
  import "../../chunk-2JQRYR7Z.js";
8
7
  import "../../chunk-TBLBQCUH.js";
8
+ import "../../chunk-3QCSFFBK.js";
9
9
  import "../../chunk-G2ADBYYC.js";
10
10
  export {
11
11
  WorkOrderCell
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WorkOrderCellNavigation
3
- } from "../../chunk-YBJFHSLC.js";
3
+ } from "../../chunk-OZIGJHVX.js";
4
4
  import "../../chunk-VDHOYF7Z.js";
5
- import "../../chunk-BXAE3AAV.js";
6
- import "../../chunk-3QCSFFBK.js";
5
+ import "../../chunk-OD6DLDFB.js";
7
6
  import "../../chunk-2JQRYR7Z.js";
8
7
  import "../../chunk-TBLBQCUH.js";
8
+ import "../../chunk-3QCSFFBK.js";
9
9
  import "../../chunk-G2ADBYYC.js";
10
10
  export {
11
11
  WorkOrderCellNavigation
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  WorkOrderPropertyList
3
- } from "../../chunk-BXAE3AAV.js";
4
- import "../../chunk-3QCSFFBK.js";
3
+ } from "../../chunk-OD6DLDFB.js";
5
4
  import "../../chunk-2JQRYR7Z.js";
6
5
  import "../../chunk-TBLBQCUH.js";
6
+ import "../../chunk-3QCSFFBK.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-2TLF63UB.js";
4
- import "../../chunk-CTARCKOR.js";
5
- import "../../chunk-YBJFHSLC.js";
3
+ } from "../../chunk-SCQBE3RT.js";
4
+ import "../../chunk-RRG3OVHG.js";
5
+ import "../../chunk-OZIGJHVX.js";
6
6
  import "../../chunk-VDHOYF7Z.js";
7
- import "../../chunk-BXAE3AAV.js";
8
- import "../../chunk-3QCSFFBK.js";
7
+ import "../../chunk-OD6DLDFB.js";
9
8
  import "../../chunk-2JQRYR7Z.js";
10
9
  import "../../chunk-TBLBQCUH.js";
10
+ import "../../chunk-3QCSFFBK.js";
11
11
  import "../../chunk-G2ADBYYC.js";
12
12
  export {
13
13
  WorkOrderCell
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  WorkOrderCell
3
- } from "./chunk-2TLF63UB.js";
4
- import "./chunk-CTARCKOR.js";
5
- import "./chunk-YBJFHSLC.js";
3
+ } from "./chunk-SCQBE3RT.js";
4
+ import "./chunk-RRG3OVHG.js";
5
+ import "./chunk-OZIGJHVX.js";
6
6
  import "./chunk-VDHOYF7Z.js";
7
- import "./chunk-BXAE3AAV.js";
8
- import "./chunk-3QCSFFBK.js";
7
+ import "./chunk-OD6DLDFB.js";
9
8
  import "./chunk-2JQRYR7Z.js";
10
9
  import {
11
10
  PropertyRow
12
11
  } from "./chunk-TBLBQCUH.js";
12
+ import "./chunk-3QCSFFBK.js";
13
13
  import "./chunk-G2ADBYYC.js";
14
14
  export {
15
15
  PropertyRow,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/mad-dfw",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "A React Native component library for the Digital Field Worker applications.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,9 +1,9 @@
1
- import {
2
- formatDate
3
- } from "./chunk-3QCSFFBK.js";
4
1
  import {
5
2
  PropertyRow
6
3
  } from "./chunk-TBLBQCUH.js";
4
+ import {
5
+ formatDate
6
+ } from "./chunk-3QCSFFBK.js";
7
7
 
8
8
  // src/dfwcomponents/WorkOrderCell/WorkOrderPropertyList.tsx
9
9
  import React from "react";