@k-int/stripes-kint-components 4.4.3 → 4.5.0

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.
Files changed (172) hide show
  1. package/CHANGELOG.md +8 -5
  2. package/es/lib/CustomProperties/View/CustomPropertyCard.js +2 -2
  3. package/es/lib/QueryTypedown/QueryTypedown.js +8 -1
  4. package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +5 -2
  5. package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +5 -1
  6. package/es/lib/hooks/useHelperApp.js +11 -4
  7. package/junit.xml +139 -139
  8. package/package.json +1 -1
  9. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
  10. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +1 -1
  11. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
  12. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
  13. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
  14. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +128 -50
  15. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
  16. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +1 -1
  17. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +15 -15
  18. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
  19. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
  20. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
  21. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
  22. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
  23. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
  24. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +1 -1
  25. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
  26. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +1 -1
  27. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
  28. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
  29. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
  30. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
  31. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
  32. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +1 -1
  33. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
  34. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +1 -1
  35. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +1 -1
  36. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
  37. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +1 -1
  38. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +1 -1
  39. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
  40. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +5 -5
  41. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +4 -4
  42. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
  43. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
  44. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
  45. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
  46. package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +1 -1
  47. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
  48. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
  49. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
  50. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +1 -1
  51. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
  52. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +1 -1
  53. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
  54. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
  55. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +13 -4
  56. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +12 -3
  57. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
  58. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
  59. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +38 -23
  60. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +15 -15
  61. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
  62. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +4 -4
  63. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
  64. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +1 -1
  65. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +1 -1
  66. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
  67. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
  68. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
  69. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
  70. package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +1 -1
  71. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +1 -1
  72. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
  73. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
  74. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
  75. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
  76. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +23 -8
  77. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +7 -7
  78. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
  79. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +1 -1
  80. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
  81. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
  82. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +11 -2
  83. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +7 -7
  84. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +1 -1
  85. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +20 -5
  86. package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +1 -1
  87. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +1 -1
  88. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
  89. package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +1 -1
  90. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
  91. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  92. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
  93. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
  94. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
  95. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
  96. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
  97. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
  98. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
  99. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
  100. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
  101. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
  102. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
  103. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
  104. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
  105. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +12 -3
  106. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
  107. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +3 -3
  108. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
  109. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
  110. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
  111. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
  112. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
  113. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
  114. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
  115. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
  116. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
  117. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
  118. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +10 -10
  119. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
  120. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
  121. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
  122. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
  123. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
  124. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  125. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
  126. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
  127. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +30 -18
  128. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
  129. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +1 -1
  130. package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +1 -1
  131. package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
  132. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
  133. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
  134. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
  135. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
  136. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +1 -1
  137. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
  138. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
  139. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
  140. package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +1 -1
  141. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
  142. package/src/artifacts/coverage-jest/lcov-report/index.html +43 -43
  143. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +3 -3
  144. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +1 -1
  145. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +1 -1
  146. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +1 -1
  147. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +9 -3
  148. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
  149. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
  150. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +1 -1
  151. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +1 -1
  152. package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +1 -1
  153. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +1 -1
  154. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
  155. package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +1 -1
  156. package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +1 -1
  157. package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +1 -1
  158. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
  159. package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +1 -1
  160. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +45 -3
  161. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
  162. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
  163. package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +1 -1
  164. package/src/artifacts/coverage-jest/lcov-report/validators/index.html +1 -1
  165. package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +1 -1
  166. package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +1 -1
  167. package/src/artifacts/coverage-jest/lcov.info +388 -342
  168. package/src/lib/CustomProperties/View/CustomPropertyCard.js +3 -3
  169. package/src/lib/QueryTypedown/QueryTypedown.js +8 -3
  170. package/src/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +3 -0
  171. package/src/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +5 -0
  172. package/src/lib/hooks/useHelperApp.js +14 -10
@@ -34,7 +34,7 @@ const CustomPropertyCard = ({
34
34
  }
35
35
 
36
36
  const internalFalse = customProperty?.internal === false ||
37
- (customProperty?.internal === undefined && customPropertyDefinition.defaultInternal === false);
37
+ (customProperty?.internal === undefined && customPropertyDefinition.defaultInternal === false);
38
38
 
39
39
  const renderValue = () => {
40
40
  if (!customProperty) {
@@ -133,8 +133,8 @@ const CustomPropertyCard = ({
133
133
  }
134
134
  >
135
135
  {kintIntl.formatKintMessage({
136
- id: 'customProperties.internalFalse',
137
- overrideValue: labelOverrides.internalFalse
136
+ id: internalFalse ? 'customProperties.internalFalse' : 'customProperties.internalTrue',
137
+ overrideValue: internalFalse ? labelOverrides.internalFalse : labelOverrides.internalTrue,
138
138
  })}
139
139
  </KeyValue>
140
140
  </Col>
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React, { useState, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
4
  import Typedown from '../Typedown';
@@ -12,11 +12,16 @@ const QueryTypedown = ({
12
12
  }) => {
13
13
  const [callPath, setCallPath] = useState(pathMutator(null, path));
14
14
  const data = dataFormatter(useTypedownData(path, callPath));
15
+ const [userQuery, setUserQuery] = useState('');
15
16
 
16
17
  const onType = e => {
17
- setCallPath(pathMutator(e.target.value, path));
18
+ setUserQuery(e.target.value);
18
19
  };
19
20
 
21
+ useEffect(() => {
22
+ setCallPath(pathMutator(userQuery, path));
23
+ }, [path, pathMutator, userQuery]);
24
+
20
25
  return (
21
26
  <Typedown
22
27
  {...rest}
@@ -29,7 +34,7 @@ const QueryTypedown = ({
29
34
  QueryTypedown.propTypes = {
30
35
  dataFormatter: PropTypes.func,
31
36
  path: PropTypes.string,
32
- pathMutator: PropTypes.func
37
+ pathMutator: PropTypes.func,
33
38
  };
34
39
 
35
40
  export default QueryTypedown;
@@ -19,6 +19,7 @@ const propTypes = {
19
19
  className: PropTypes.string,
20
20
  dropdownTriggerProps: PropTypes.object,
21
21
  fullWidth: PropTypes.bool,
22
+ id: PropTypes.string,
22
23
  marginBottom0: PropTypes.bool,
23
24
  selectedIndex: PropTypes.number,
24
25
  tagName: PropTypes.string,
@@ -47,6 +48,7 @@ const ResponsiveButtonGroup = (props) => {
47
48
  className,
48
49
  dropdownTriggerProps = {},
49
50
  fullWidth = false, // Only bother with this when buttonGroupWidth < ContainerWidth
51
+ id,
50
52
  marginBottom0, // Will ONLL control the margin of the dropdown button
51
53
  selectedIndex,
52
54
  tagName: Tag = 'div',
@@ -61,6 +63,7 @@ const ResponsiveButtonGroup = (props) => {
61
63
  ready,
62
64
  } = useResponsiveButtonGroupSizing({
63
65
  buttons: childButtons,
66
+ id
64
67
  });
65
68
 
66
69
  const buttonThreshold = calculateCumulativeThreshold(cachedSizeArray, containerWidth);
@@ -5,8 +5,12 @@ import { useResizeDetector } from 'react-resize-detector';
5
5
  import { debounce } from 'lodash';
6
6
 
7
7
  const useResponsiveButtonGroupSizing = ({
8
+ id,
8
9
  buttons = [],
9
10
  }) => {
11
+ const eventString = 'responsive-button-group-loaded' + (id ? `-${id}` : '');
12
+ const loadedEvent = new Event(eventString);
13
+
10
14
  const isMounted = useRef(false);
11
15
  useEffect(() => {
12
16
  isMounted.current = true;
@@ -46,6 +50,7 @@ const useResponsiveButtonGroupSizing = ({
46
50
  if (!cachedSizeArray?.length && sizeArray?.length) {
47
51
  setCachedSizeArray(sizeArray);
48
52
  setReady(true);
53
+ document.dispatchEvent(loadedEvent);
49
54
  }
50
55
  }
51
56
  }, 150), [cachedSizeArray, sizeArray]);
@@ -1,6 +1,10 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
2
  import { useHistory, useLocation } from 'react-router-dom';
3
+
3
4
  import queryString from 'query-string';
5
+ import isEqual from 'lodash/isEqual';
6
+
7
+ let helperObject = {};
4
8
 
5
9
  const useHelperApp = (helpers) => {
6
10
  const history = useHistory();
@@ -18,6 +22,11 @@ const useHelperApp = (helpers) => {
18
22
  };
19
23
 
20
24
  useEffect(() => {
25
+ // Keep object outside of hook to avoid redraw, oncly change when keys change
26
+ if (!isEqual(Object.keys(helperObject), Object.keys(helpers))) {
27
+ helperObject = helpers;
28
+ }
29
+
21
30
  if (currentHelper !== query?.helper) {
22
31
  const newQuery = {
23
32
  ...query,
@@ -29,12 +38,7 @@ const useHelperApp = (helpers) => {
29
38
  search: `?${queryString.stringify(newQuery)}`
30
39
  });
31
40
  }
32
- }, [
33
- currentHelper,
34
- history,
35
- location,
36
- query
37
- ]);
41
+ }, [currentHelper, helpers, history, location, query]);
38
42
 
39
43
  // Set the HelperComponent
40
44
  const HelperComponent = useMemo(() => ((props) => {
@@ -42,7 +46,7 @@ const useHelperApp = (helpers) => {
42
46
 
43
47
  let Component = null;
44
48
 
45
- Component = helpers[query?.helper];
49
+ Component = helperObject[query?.helper];
46
50
 
47
51
  if (!Component) return null;
48
52
 
@@ -52,15 +56,15 @@ const useHelperApp = (helpers) => {
52
56
  {...props}
53
57
  />
54
58
  );
55
- }), [handleToggleHelper, query.helper, helpers]);
59
+ }), [handleToggleHelper, query.helper]);
56
60
 
57
61
  // Set up the helperToggleFunctions
58
62
  const helperToggleFunctions = {};
59
- Object.keys(helpers).forEach(h => {
63
+ Object.keys(helperObject).forEach(h => {
60
64
  helperToggleFunctions[h] = () => handleToggleHelper(h);
61
65
  });
62
66
 
63
- return { HelperComponent, helperToggleFunctions, isOpen };
67
+ return { currentHelper, HelperComponent, helperToggleFunctions, isOpen };
64
68
  };
65
69
 
66
70
  export default useHelperApp;