@equinor/mad-dfw 0.5.1 → 0.5.2

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,12 @@
1
1
  # @equinor/mad-dfw
2
2
 
3
+ ## 0.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 3388a03: Updated button validation to fix visibility issues on buttons in the `WorkOrderCell`
8
+ component
9
+
3
10
  ## 0.5.1
4
11
 
5
12
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  WorkOrderCell
3
- } from "./chunk-FTG43LBL.js";
3
+ } from "./chunk-EVCZ3YPL.js";
4
4
  import {
5
5
  WorkOrderCellNavigation
6
6
  } from "./chunk-6P3AA5FM.js";
@@ -40,11 +40,11 @@ var WorkOrderCell = (_a) => {
40
40
  "workOrder",
41
41
  "additionalPropertyRows"
42
42
  ]);
43
- var _a2, _b2;
43
+ var _a2, _b2, _c;
44
44
  const breakpoint = useBreakpoint();
45
45
  const token = useToken();
46
46
  const styles = useStyles(themeStyles);
47
- const anyButtonVisible = (_b2 = (_a2 = startJobButton == null ? void 0 : startJobButton.visible) != null ? _a2 : readyForOperationButton == null ? void 0 : readyForOperationButton.visible) != null ? _b2 : tecoButton == null ? void 0 : tecoButton.visible;
47
+ const shouldShowActions = ((_a2 = startJobButton == null ? void 0 : startJobButton.visible) != null ? _a2 : false) || ((_b2 = readyForOperationButton == null ? void 0 : readyForOperationButton.visible) != null ? _b2 : false) || ((_c = tecoButton == null ? void 0 : tecoButton.visible) != null ? _c : false);
48
48
  const iconsAndLabels = useMemo(
49
49
  () => getStatusIconsAndLabels(
50
50
  workOrder.activeStatusIds,
@@ -69,7 +69,7 @@ var WorkOrderCell = (_a) => {
69
69
  workOrder,
70
70
  additionalPropertyRows
71
71
  }
72
- )), anyButtonVisible && /* @__PURE__ */ React.createElement(
72
+ )), shouldShowActions && /* @__PURE__ */ React.createElement(
73
73
  View,
74
74
  {
75
75
  style: [
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  WorkOrderCell
3
- } from "../../chunk-FTG43LBL.js";
3
+ } from "../../chunk-EVCZ3YPL.js";
4
4
  import "../../chunk-VDHOYF7Z.js";
5
5
  import "../../chunk-4G4367DY.js";
6
6
  import "../../chunk-GNURJIGB.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  WorkOrderCell
3
- } from "../../chunk-4IALCT65.js";
4
- import "../../chunk-FTG43LBL.js";
3
+ } from "../../chunk-EGOXZ76E.js";
4
+ import "../../chunk-EVCZ3YPL.js";
5
5
  import "../../chunk-6P3AA5FM.js";
6
6
  import "../../chunk-VDHOYF7Z.js";
7
7
  import "../../chunk-4G4367DY.js";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  WorkOrderCell
3
- } from "./chunk-4IALCT65.js";
4
- import "./chunk-FTG43LBL.js";
3
+ } from "./chunk-EGOXZ76E.js";
4
+ import "./chunk-EVCZ3YPL.js";
5
5
  import "./chunk-6P3AA5FM.js";
6
6
  import "./chunk-VDHOYF7Z.js";
7
7
  import "./chunk-4G4367DY.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/mad-dfw",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "A React Native component library for the Digital Field Worker applications.",
5
5
  "type": "module",
6
6
  "scripts": {