@inploi/plugin-job-search 0.23.4 → 0.23.6

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/dist/index.cjs CHANGED
@@ -2762,7 +2762,7 @@ const AlertsButton = ({
2762
2762
  initialFilters: {},
2763
2763
  theme
2764
2764
  });
2765
- });
2765
+ }, [plugin, theme]);
2766
2766
  y$1(() => {
2767
2767
  plugin == null ? void 0 : plugin.setFilters(getFilterValues(appliedFilters));
2768
2768
  }, [appliedFilters, plugin]);
@@ -4740,32 +4740,6 @@ const Filter = ({
4740
4740
  }
4741
4741
  );
4742
4742
  };
4743
- const usePrevious = (value) => {
4744
- const ref = A$1();
4745
- y$1(() => {
4746
- ref.current = value;
4747
- }, [value]);
4748
- return ref.current;
4749
- };
4750
- const focusFirstAvailableOption = (activeKey, ref) => {
4751
- var _a;
4752
- const filterElement = (_a = ref.current) == null ? void 0 : _a.querySelector(`[data-filter-key="${activeKey}"]`);
4753
- const filterCurrentOption = (filterElement == null ? void 0 : filterElement.querySelector("[data-current-value]")) ?? (filterElement == null ? void 0 : filterElement.querySelector("[data-filter]"));
4754
- if (!filterCurrentOption)
4755
- return;
4756
- invariant(filterCurrentOption instanceof HTMLButtonElement, "option must be button");
4757
- filterCurrentOption.focus();
4758
- };
4759
- const useFilterKeyboardFocus = (activeKey, ref) => {
4760
- const previousActiveKey = usePrevious(activeKey);
4761
- y$1(() => {
4762
- if (previousActiveKey === activeKey)
4763
- return;
4764
- const keyToFocus = activeKey ?? previousActiveKey;
4765
- if (keyToFocus)
4766
- focusFirstAvailableOption(keyToFocus, ref);
4767
- }, [activeKey, previousActiveKey, ref]);
4768
- };
4769
4743
  function noop() {
4770
4744
  }
4771
4745
  const mergeFilterValues = (subject, mergeWith) => {
@@ -4829,7 +4803,6 @@ const nextStateFromValue = ({
4829
4803
  };
4830
4804
  const FilterSection = ({
4831
4805
  properties,
4832
- parentRef,
4833
4806
  appliedFilters,
4834
4807
  onFilterValueChange,
4835
4808
  apiClient,
@@ -4837,7 +4810,6 @@ const FilterSection = ({
4837
4810
  }) => {
4838
4811
  var _a;
4839
4812
  const [activeKey, setActiveKey] = h$1((_a = properties[0]) == null ? void 0 : _a.key);
4840
- useFilterKeyboardFocus(activeKey, parentRef);
4841
4813
  const defaultFilters = T$1(() => getFilterDefaults(properties, "value"), [properties]);
4842
4814
  const unfilteredQuery = getQueryState(
4843
4815
  useSWR(
@@ -5854,7 +5826,6 @@ const JobSearch = ({
5854
5826
  });
5855
5827
  },
5856
5828
  properties,
5857
- parentRef: appRef,
5858
5829
  logger,
5859
5830
  apiClient
5860
5831
  }
package/dist/index.js CHANGED
@@ -2760,7 +2760,7 @@ const AlertsButton = ({
2760
2760
  initialFilters: {},
2761
2761
  theme
2762
2762
  });
2763
- });
2763
+ }, [plugin, theme]);
2764
2764
  y$1(() => {
2765
2765
  plugin == null ? void 0 : plugin.setFilters(getFilterValues(appliedFilters));
2766
2766
  }, [appliedFilters, plugin]);
@@ -4738,32 +4738,6 @@ const Filter = ({
4738
4738
  }
4739
4739
  );
4740
4740
  };
4741
- const usePrevious = (value) => {
4742
- const ref = A$1();
4743
- y$1(() => {
4744
- ref.current = value;
4745
- }, [value]);
4746
- return ref.current;
4747
- };
4748
- const focusFirstAvailableOption = (activeKey, ref) => {
4749
- var _a;
4750
- const filterElement = (_a = ref.current) == null ? void 0 : _a.querySelector(`[data-filter-key="${activeKey}"]`);
4751
- const filterCurrentOption = (filterElement == null ? void 0 : filterElement.querySelector("[data-current-value]")) ?? (filterElement == null ? void 0 : filterElement.querySelector("[data-filter]"));
4752
- if (!filterCurrentOption)
4753
- return;
4754
- invariant(filterCurrentOption instanceof HTMLButtonElement, "option must be button");
4755
- filterCurrentOption.focus();
4756
- };
4757
- const useFilterKeyboardFocus = (activeKey, ref) => {
4758
- const previousActiveKey = usePrevious(activeKey);
4759
- y$1(() => {
4760
- if (previousActiveKey === activeKey)
4761
- return;
4762
- const keyToFocus = activeKey ?? previousActiveKey;
4763
- if (keyToFocus)
4764
- focusFirstAvailableOption(keyToFocus, ref);
4765
- }, [activeKey, previousActiveKey, ref]);
4766
- };
4767
4741
  function noop() {
4768
4742
  }
4769
4743
  const mergeFilterValues = (subject, mergeWith) => {
@@ -4827,7 +4801,6 @@ const nextStateFromValue = ({
4827
4801
  };
4828
4802
  const FilterSection = ({
4829
4803
  properties,
4830
- parentRef,
4831
4804
  appliedFilters,
4832
4805
  onFilterValueChange,
4833
4806
  apiClient,
@@ -4835,7 +4808,6 @@ const FilterSection = ({
4835
4808
  }) => {
4836
4809
  var _a;
4837
4810
  const [activeKey, setActiveKey] = h$1((_a = properties[0]) == null ? void 0 : _a.key);
4838
- useFilterKeyboardFocus(activeKey, parentRef);
4839
4811
  const defaultFilters = T$1(() => getFilterDefaults(properties, "value"), [properties]);
4840
4812
  const unfilteredQuery = getQueryState(
4841
4813
  useSWR(
@@ -5852,7 +5824,6 @@ const JobSearch = ({
5852
5824
  });
5853
5825
  },
5854
5826
  properties,
5855
- parentRef: appRef,
5856
5827
  logger,
5857
5828
  apiClient
5858
5829
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inploi/plugin-job-search",
3
- "version": "0.23.4",
3
+ "version": "0.23.6",
4
4
  "type": "module",
5
5
  "main": "dist/plugin-job-search.js",
6
6
  "types": "dist/index.d.ts",
@@ -53,10 +53,10 @@
53
53
  "vite": "^4.5.3",
54
54
  "vite-plugin-dts": "^3.9.1",
55
55
  "vite-tsconfig-paths": "^4.3.2",
56
- "@inploi/core": "1.14.4",
56
+ "@inploi/core": "1.14.5",
57
57
  "@inploi/design-tokens": "0.2.1",
58
58
  "@inploi/plugin-job-alerts": "0.3.0",
59
- "@inploi/sdk": "1.14.7",
59
+ "@inploi/sdk": "1.14.8",
60
60
  "eslint-config-custom": "0.1.0"
61
61
  },
62
62
  "msw": {