@bigbinary/neeto-fields-frontend 1.4.0-beta1 → 1.4.0-beta2

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/README.md CHANGED
@@ -376,7 +376,7 @@ const queryClient = useQueryClient();
376
376
  fieldValues={user.fieldValues} // We expect the user response from host's backend to send associated field_values with it.
377
377
  resourceId={user?.id}
378
378
  resourceType="users"
379
- onMutationSuccess={() => queryClient.invalidateQueries(["users"])}
379
+ onMutationSuccess={() => queryClient.invalidateQueries({ queryKey: ["users"]})}
380
380
  customComponents={{
381
381
  hostSpecificKindName: field => <HostSpecificInputFields />,
382
382
  }}
package/dist/index.cjs.js CHANGED
@@ -1556,7 +1556,7 @@ var useFetchFields = function useFetchFields(_ref, options) {
1556
1556
  };
1557
1557
  var useCreateField = function useCreateField(options) {
1558
1558
  return reactUtils.useMutationWithInvalidation(fieldsApi.create, _objectSpread$f({
1559
- keysToInvalidate: [FIELDS]
1559
+ keysToInvalidate: [[FIELDS]]
1560
1560
  }, options));
1561
1561
  };
1562
1562
  var useShowField = function useShowField(_ref2, options) {
@@ -1587,17 +1587,17 @@ var useFetchDependencies = function useFetchDependencies(_ref3, options) {
1587
1587
  };
1588
1588
  var useUpdateField = function useUpdateField(options) {
1589
1589
  return reactUtils.useMutationWithInvalidation(fieldsApi.update, _objectSpread$f({
1590
- keysToInvalidate: [FIELDS]
1590
+ keysToInvalidate: [[FIELDS]]
1591
1591
  }, options));
1592
1592
  };
1593
1593
  var useDestroyField = function useDestroyField(options) {
1594
1594
  return reactUtils.useMutationWithInvalidation(fieldsApi.destroy, _objectSpread$f({
1595
- keysToInvalidate: [FIELDS]
1595
+ keysToInvalidate: [[FIELDS]]
1596
1596
  }, options));
1597
1597
  };
1598
1598
  var useReorderFields = function useReorderFields() {
1599
1599
  return reactUtils.useMutationWithInvalidation(fieldsApi.reorder, {
1600
- keysToInvalidate: [FIELDS]
1600
+ keysToInvalidate: [[FIELDS]]
1601
1601
  });
1602
1602
  };
1603
1603
 
@@ -1856,10 +1856,12 @@ var AdditionalInputs = function AdditionalInputs() {
1856
1856
  className: "w-full",
1857
1857
  children: /*#__PURE__*/jsxRuntime.jsx(Input__default$1["default"], {
1858
1858
  autoFocus: true,
1859
+ "data-cy": "neeto-fields-dropdown-option-".concat(index),
1859
1860
  disabled: isSystem,
1860
1861
  name: "data.".concat(index, ".label"),
1861
1862
  placeholder: t("neetoFields.placeholders.enterAnOption"),
1862
1863
  suffix: options.length > 1 && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
1864
+ "data-cy": "neeto-fields-dropdown-option-delete-".concat(index),
1863
1865
  icon: neetoIcons.Delete,
1864
1866
  style: "text",
1865
1867
  onClick: function onClick() {
@@ -2927,7 +2929,7 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
2927
2929
  };
2928
2930
  var _useFetchFields = useFetchFields(fieldParams, {
2929
2931
  enabled: !!resource,
2930
- keepPreviousData: true
2932
+ placeholderData: reactQuery.keepPreviousData
2931
2933
  }),
2932
2934
  _useFetchFields$data = _useFetchFields.data,
2933
2935
  _useFetchFields$data2 = _useFetchFields$data === void 0 ? {} : _useFetchFields$data,
@@ -7850,17 +7852,17 @@ function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
7850
7852
  function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7851
7853
  var useCreateFieldValue = function useCreateFieldValue(options) {
7852
7854
  return reactUtils.useMutationWithInvalidation(fieldValuesApi.create, _objectSpread$4({
7853
- keysToInvalidate: [QUERY_KEYS.FIELD_VALUES]
7855
+ keysToInvalidate: [[QUERY_KEYS.FIELD_VALUES]]
7854
7856
  }, options));
7855
7857
  };
7856
7858
  var useUpdateFieldValue = function useUpdateFieldValue(options) {
7857
7859
  return reactUtils.useMutationWithInvalidation(fieldValuesApi.update, _objectSpread$4({
7858
- keysToInvalidate: [QUERY_KEYS.FIELD_VALUES]
7860
+ keysToInvalidate: [[QUERY_KEYS.FIELD_VALUES]]
7859
7861
  }, options));
7860
7862
  };
7861
7863
  var useDeleteFieldValue = function useDeleteFieldValue(options) {
7862
7864
  return reactUtils.useMutationWithInvalidation(fieldValuesApi.destroy, _objectSpread$4({
7863
- keysToInvalidate: [QUERY_KEYS.FIELD_VALUES]
7865
+ keysToInvalidate: [[QUERY_KEYS.FIELD_VALUES]]
7864
7866
  }, options));
7865
7867
  };
7866
7868