@sprucelabs/heartwood-view-controllers 112.3.28 → 112.3.29

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.
@@ -60,17 +60,12 @@ const navigationAssert = {
60
60
  };
61
61
  export default navigationAssert;
62
62
  function getButtonFromNav(vc, id) {
63
- var _a, _b, _c, _d;
63
+ var _a;
64
64
  const model = renderUtil.render(vc);
65
- if ((_a = model.buttons) === null || _a === void 0 ? void 0 : _a[0].dropdown) {
66
- const button = (_c = (_b = model.buttons[0].dropdown) === null || _b === void 0 ? void 0 : _b.items) === null || _c === void 0 ? void 0 : _c.find((b) => b.id === id);
67
- assert.isTruthy(button);
68
- return;
69
- }
70
- const buttons = (_d = model.buttons) === null || _d === void 0 ? void 0 : _d.reduce((acc, b) => {
65
+ const buttons = (_a = model.buttons) === null || _a === void 0 ? void 0 : _a.reduce((acc, b) => {
71
66
  var _a, _b;
72
67
  if (b.dropdown) {
73
- return [...acc, ...((_b = (_a = b === null || b === void 0 ? void 0 : b.dropdown) === null || _a === void 0 ? void 0 : _a.items) !== null && _b !== void 0 ? _b : [])];
68
+ return [...acc, b, ...((_b = (_a = b === null || b === void 0 ? void 0 : b.dropdown) === null || _a === void 0 ? void 0 : _a.items) !== null && _b !== void 0 ? _b : [])];
74
69
  }
75
70
  return [...acc, b];
76
71
  }, []);
@@ -62,14 +62,9 @@ const navigationAssert = {
62
62
  exports.default = navigationAssert;
63
63
  function getButtonFromNav(vc, id) {
64
64
  const model = render_utility_1.default.render(vc);
65
- if (model.buttons?.[0].dropdown) {
66
- const button = model.buttons[0].dropdown?.items?.find((b) => b.id === id);
67
- test_utils_1.assert.isTruthy(button);
68
- return;
69
- }
70
65
  const buttons = model.buttons?.reduce((acc, b) => {
71
66
  if (b.dropdown) {
72
- return [...acc, ...(b?.dropdown?.items ?? [])];
67
+ return [...acc, b, ...(b?.dropdown?.items ?? [])];
73
68
  }
74
69
  return [...acc, b];
75
70
  }, []);
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "sideEffects": false,
14
14
  "license": "MIT",
15
15
  "description": "All the power of Heartwood in one, convenient package.",
16
- "version": "112.3.28",
16
+ "version": "112.3.29",
17
17
  "skill": {
18
18
  "namespace": "HeartwoodViewControllers",
19
19
  "commandOverrides": {