@refinedev/core 5.0.6 → 5.0.7

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.mjs CHANGED
@@ -321,6 +321,7 @@ var defaultRefineOptions = {
321
321
  singular: pluralize.singular
322
322
  },
323
323
  disableServerSideValidation: false,
324
+ disableRouteChangeHandler: false,
324
325
  title: defaultTitle
325
326
  };
326
327
  var RefineContext = React2.createContext({
@@ -370,7 +371,8 @@ var handleRefineOptions = /* @__PURE__ */ __name(({
370
371
  reactQueryDevtoolConfig,
371
372
  syncWithLocation,
372
373
  undoableTimeout,
373
- warnWhenUnsavedChanges
374
+ warnWhenUnsavedChanges,
375
+ disableRouteChangeHandler
374
376
  } = {}) => {
375
377
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
376
378
  const optionsWithDefaults = {
@@ -396,7 +398,8 @@ var handleRefineOptions = /* @__PURE__ */ __name(({
396
398
  title: {
397
399
  icon: typeof ((_g = options == null ? void 0 : options.title) == null ? void 0 : _g.icon) === "undefined" ? defaultRefineOptions.title.icon : (_h = options == null ? void 0 : options.title) == null ? void 0 : _h.icon,
398
400
  text: typeof ((_i = options == null ? void 0 : options.title) == null ? void 0 : _i.text) === "undefined" ? defaultRefineOptions.title.text : (_j = options == null ? void 0 : options.title) == null ? void 0 : _j.text
399
- }
401
+ },
402
+ disableRouteChangeHandler: (options == null ? void 0 : options.disableRouteChangeHandler) ?? disableRouteChangeHandler ?? defaultRefineOptions.disableRouteChangeHandler
400
403
  };
401
404
  const disableTelemetryWithDefault = (options == null ? void 0 : options.disableTelemetry) ?? disableTelemetry ?? false;
402
405
  const reactQueryWithDefaults = {
@@ -8087,7 +8090,7 @@ import React39 from "react";
8087
8090
 
8088
8091
  // src/hooks/useTelemetryData/index.ts
8089
8092
  import { useContext as useContext26 } from "react";
8090
- var REFINE_VERSION = "5.0.6";
8093
+ var REFINE_VERSION = "5.0.7";
8091
8094
  var useTelemetryData = /* @__PURE__ */ __name(() => {
8092
8095
  var _a;
8093
8096
  const auth = useIsExistAuthentication();
@@ -8226,6 +8229,7 @@ var Refine = /* @__PURE__ */ __name(({
8226
8229
  } = handleRefineOptions({
8227
8230
  options
8228
8231
  });
8232
+ const disableRouteChangeHandler = optionsWithDefaults.disableRouteChangeHandler;
8229
8233
  const queryClient = useDeepMemo(() => {
8230
8234
  var _a;
8231
8235
  if (reactQueryWithDefaults.clientConfig instanceof QueryClient) {
@@ -8271,7 +8275,7 @@ var Refine = /* @__PURE__ */ __name(({
8271
8275
  onLiveEvent,
8272
8276
  options: optionsWithDefaults
8273
8277
  },
8274
- /* @__PURE__ */ React41.createElement(UnsavedWarnContextProvider, null, /* @__PURE__ */ React41.createElement(React41.Fragment, null, children, !disableTelemetryWithDefault && /* @__PURE__ */ React41.createElement(Telemetry, null), /* @__PURE__ */ React41.createElement(RouteChangeHandler, null)))
8278
+ /* @__PURE__ */ React41.createElement(UnsavedWarnContextProvider, null, /* @__PURE__ */ React41.createElement(React41.Fragment, null, children, !disableTelemetryWithDefault && /* @__PURE__ */ React41.createElement(Telemetry, null), !disableRouteChangeHandler && /* @__PURE__ */ React41.createElement(RouteChangeHandler, null)))
8275
8279
  )))
8276
8280
  ))))))
8277
8281
  )));