@equinor/mad-dfw 0.0.4 → 0.0.5

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,16 @@
1
1
  # @equinor/mad-dfw
2
2
 
3
+ ## 0.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 46401e7: Add truhyness check to `PropertyRow` render function to avoid rendering rows with empty
8
+ values.
9
+ - Updated dependencies [e43285f]
10
+ - Updated dependencies [79fb731]
11
+ - Updated dependencies [37025ac]
12
+ - @equinor/mad-components@0.12.0
13
+
3
14
  ## 0.0.4
4
15
 
5
16
  ### Patch Changes
@@ -109,20 +109,23 @@ var WorkOrderCell = (_a) => {
109
109
  },
110
110
  item.label
111
111
  )))), /* @__PURE__ */ React.createElement(Label, { label: maintenanceType, style: { marginBottom: 8 } }), Object.entries(rest).map(([key, value], index) => {
112
- const label = WorkOrderLabelMap[key];
113
- let displayValue = value;
114
- if (key === "basicStartDate" || key === "basicEndDate") {
115
- displayValue = value ? new Date(value).toLocaleDateString() : "";
116
- }
117
- return /* @__PURE__ */ React.createElement(
118
- PropertyRow,
119
- {
120
- key: index,
121
- label,
122
- value: displayValue,
123
- style: { marginBottom: 8 }
112
+ if (value) {
113
+ const label = WorkOrderLabelMap[key];
114
+ let displayValue = value;
115
+ if (key === "basicStartDate" || key === "basicEndDate") {
116
+ displayValue = value ? new Date(value).toLocaleDateString() : "";
124
117
  }
125
- );
118
+ return /* @__PURE__ */ React.createElement(
119
+ PropertyRow,
120
+ {
121
+ key: index,
122
+ label,
123
+ value: displayValue,
124
+ style: { marginBottom: 8 }
125
+ }
126
+ );
127
+ }
128
+ return null;
126
129
  }), (!!onStartButtonPress || !!onCompleteButtonPress) && /* @__PURE__ */ React.createElement(
127
130
  View,
128
131
  {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  WorkOrderCell
3
- } from "../../chunk-ED7C2IER.js";
3
+ } from "../../chunk-BJHNY6HU.js";
4
4
  import "../../chunk-2JQRYR7Z.js";
5
5
  import "../../chunk-KROUGXV5.js";
6
6
  export {
@@ -1,7 +1,7 @@
1
1
  import "../../chunk-RW7P2LMK.js";
2
2
  import {
3
3
  WorkOrderCell
4
- } from "../../chunk-ED7C2IER.js";
4
+ } from "../../chunk-BJHNY6HU.js";
5
5
  import "../../chunk-2JQRYR7Z.js";
6
6
  import "../../chunk-KROUGXV5.js";
7
7
  export {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./chunk-RW7P2LMK.js";
2
2
  import {
3
3
  WorkOrderCell
4
- } from "./chunk-ED7C2IER.js";
4
+ } from "./chunk-BJHNY6HU.js";
5
5
  import "./chunk-2JQRYR7Z.js";
6
6
  import {
7
7
  PropertyRow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/mad-dfw",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "A React Native component library for the Digital Field Worker applications.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -27,7 +27,7 @@
27
27
  "react-native": ">=0.70"
28
28
  },
29
29
  "dependencies": {
30
- "@equinor/mad-components": "0.11.3"
30
+ "@equinor/mad-components": "0.12.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@equinor/eslint-config-mad": "0.3.1"