{"version":3,"sources":["../src/index.ts","../src/bindings.tsx","../src/convert-to-number-if-possible.ts","../src/navigate-to-resource.tsx","../src/unsaved-changes-notifier.tsx","../src/use-prompt-workaround.ts","../src/catch-all-navigate.tsx","../src/document-title-handler.tsx","../src/use-document-title.ts"],"sourcesContent":["export { routerProvider as default, stringifyConfig } from \"./bindings.js\";\nexport { NavigateToResource } from \"./navigate-to-resource.js\";\nexport { UnsavedChangesNotifier } from \"./unsaved-changes-notifier.js\";\nexport { CatchAllNavigate } from \"./catch-all-navigate.js\";\nexport { DocumentTitleHandler } from \"./document-title-handler.js\";\nexport { useDocumentTitle } from \"./use-document-title.js\";\n","import React, { type ComponentProps } from \"react\";\nimport {\n  type GoConfig,\n  type ParseResponse,\n  type RouterProvider,\n  matchResourceFromRoute,\n  ResourceContext,\n  QS_PARSE_DEPTH,\n} from \"@refinedev/core\";\nimport { useCallback, useContext } from \"react\";\nimport qs from \"qs\";\nimport {\n  useNavigate,\n  useLocation,\n  Link,\n  matchPath,\n  useParams,\n} from \"react-router\";\nimport { convertToNumberIfPossible } from \"./convert-to-number-if-possible\";\n\nexport const stringifyConfig = {\n  addQueryPrefix: true,\n  skipNulls: true,\n  arrayFormat: \"indices\" as const,\n  encode: false,\n  encodeValuesOnly: true,\n};\n\nexport const routerProvider: RouterProvider = {\n  go: () => {\n    const { search: existingSearch, hash: existingHash } = useLocation();\n    const navigate = useNavigate();\n\n    const fn = useCallback(\n      ({\n        to,\n        type,\n        query,\n        hash,\n        options: { keepQuery, keepHash } = {},\n      }: GoConfig) => {\n        /** Construct query params */\n        const urlQuery = {\n          ...(keepQuery &&\n            existingSearch &&\n            qs.parse(existingSearch, {\n              ignoreQueryPrefix: true,\n              depth: QS_PARSE_DEPTH,\n            })),\n\n          ...query,\n        };\n\n        if (urlQuery.to) {\n          urlQuery.to = encodeURIComponent(`${urlQuery.to}`);\n        }\n\n        const hasUrlQuery = Object.keys(urlQuery).length > 0;\n\n        /** Get hash */\n        const urlHash = `#${(hash || (keepHash && existingHash) || \"\").replace(\n          /^#/,\n          \"\",\n        )}`;\n\n        const hasUrlHash = urlHash.length > 1;\n\n        const urlTo = to || \"\";\n\n        const fullPath = `${urlTo}${\n          hasUrlQuery ? qs.stringify(urlQuery, stringifyConfig) : \"\"\n        }${hasUrlHash ? urlHash : \"\"}`;\n\n        if (type === \"path\") {\n          return fullPath;\n        }\n\n        /** Navigate to the url */\n        navigate(fullPath, {\n          replace: type === \"replace\",\n        });\n\n        return;\n      },\n      [existingHash, existingSearch, navigate],\n    );\n\n    return fn;\n  },\n  back: () => {\n    const navigate = useNavigate();\n\n    const fn = useCallback(() => {\n      navigate(-1);\n    }, [navigate]);\n\n    return fn;\n  },\n  parse: () => {\n    let params = useParams();\n    const { pathname, search } = useLocation();\n    const { resources } = useContext(ResourceContext);\n\n    const { resource, action, matchedRoute } = React.useMemo(() => {\n      return matchResourceFromRoute(pathname, resources);\n    }, [resources, pathname]);\n\n    // params is empty when useParams is used in a component that is not a child of a Route\n    if (Object.entries(params).length === 0 && matchedRoute) {\n      params = matchPath(matchedRoute, pathname)?.params || {};\n    }\n\n    const fn = useCallback(() => {\n      const parsedSearch = qs.parse(search, {\n        ignoreQueryPrefix: true,\n        depth: QS_PARSE_DEPTH,\n      });\n\n      const combinedParams = {\n        ...params,\n        ...parsedSearch,\n      };\n\n      const response: ParseResponse = {\n        ...(resource && { resource }),\n        ...(action && { action }),\n        ...(params?.id && { id: decodeURIComponent(params.id) }),\n        // ...(params?.action && { action: params.action }), // lets see if there is a need for this\n        pathname,\n        params: {\n          ...combinedParams,\n          currentPage: convertToNumberIfPossible(\n            combinedParams.currentPage as string,\n          ) as number | undefined,\n          pageSize: convertToNumberIfPossible(\n            combinedParams.pageSize as string,\n          ) as number | undefined,\n          to: combinedParams.to\n            ? decodeURIComponent(combinedParams.to as string)\n            : undefined,\n        },\n      };\n\n      return response;\n    }, [pathname, search, params, resource, action]);\n\n    return fn;\n  },\n  Link: React.forwardRef<\n    HTMLAnchorElement,\n    ComponentProps<NonNullable<RouterProvider[\"Link\"]>>\n  >(function RefineLink(props, ref) {\n    return <Link to={props.to} {...props} ref={ref} />;\n  }),\n};\n","export const convertToNumberIfPossible = (value: string | undefined) => {\n  if (typeof value === \"undefined\") {\n    return value;\n  }\n  const num = Number(value);\n  if (`${num}` === value) {\n    return num;\n  }\n  return value;\n};\n","import { useResourceParams, useGetToPath } from \"@refinedev/core\";\nimport React, { type PropsWithChildren } from \"react\";\nimport { Navigate } from \"react-router\";\n\ntype NavigateToResourceProps = PropsWithChildren<{\n  resource?: string;\n  fallbackTo?: string;\n  meta?: Record<string, unknown>;\n}>;\n\nexport const NavigateToResource: React.FC<NavigateToResourceProps> = ({\n  resource: resourceProp,\n  fallbackTo,\n  meta,\n}) => {\n  const getToPath = useGetToPath();\n  const { resource, resources } = useResourceParams({\n    resource: resourceProp,\n  });\n\n  const toResource = resource || resources.find((r) => r.list);\n\n  if (toResource) {\n    const path = getToPath({\n      resource: toResource,\n      action: \"list\",\n      meta,\n    });\n\n    if (path) {\n      return <Navigate to={path} />;\n    }\n\n    return null;\n  }\n\n  if (fallbackTo) {\n    console.warn(`No resource is found. navigation to ${fallbackTo}.`);\n    return <Navigate to={fallbackTo} />;\n  }\n\n  console.warn(\n    'No resource and \"fallbackTo\" is found. No navigation will be made.',\n  );\n  return null;\n};\n","import React from \"react\";\nimport { useTranslate, useWarnAboutChange } from \"@refinedev/core\";\nimport { usePrompt } from \"./use-prompt-workaround\";\nimport { useLocation } from \"react-router\";\n\ntype UnsavedChangesNotifierProps = {\n  translationKey?: string;\n  message?: string;\n};\n\nexport const UnsavedChangesNotifier: React.FC<UnsavedChangesNotifierProps> = ({\n  translationKey = \"warnWhenUnsavedChanges\",\n  message = \"Are you sure you want to leave? You have unsaved changes.\",\n}) => {\n  const translate = useTranslate();\n  const { pathname } = useLocation();\n  const { warnWhen, setWarnWhen } = useWarnAboutChange();\n\n  React.useEffect(() => {\n    return () => setWarnWhen?.(false);\n  }, [pathname]);\n\n  const warnMessage = React.useMemo(() => {\n    return translate(translationKey, message);\n  }, [translationKey, message, translate]);\n\n  usePrompt(warnMessage, warnWhen, () => {\n    setWarnWhen?.(false);\n  });\n\n  return null;\n};\n","/**\n * `useBlocker` and `usePrompt` is no longer part of react-router for the routers other than `DataRouter`.\n *\n * The previous workaround (<v6.4) was to use `block` function in `UNSAFE_NavigationContext` which is now removed.\n *\n * We're using a workaround from the gist https://gist.github.com/MarksCode/64e438c82b0b2a1161e01c88ca0d0355 with some modifications\n * Thanks to @MarksCode(https://github.com/MarksCode) for the workaround.\n */\n\nimport React from \"react\";\nimport { UNSAFE_NavigationContext as NavigationContext } from \"react-router\";\n\nfunction useConfirmExit(confirmExit: () => boolean, when = true) {\n  const { navigator } = React.useContext(NavigationContext);\n\n  React.useEffect(() => {\n    if (!when) {\n      return;\n    }\n\n    const go = navigator.go;\n    const push = navigator.push;\n\n    navigator.push = (...args: Parameters<typeof push>) => {\n      const result = confirmExit();\n      if (result !== false) {\n        push(...args);\n      }\n    };\n\n    navigator.go = (...args: Parameters<typeof go>) => {\n      const result = confirmExit();\n      if (result !== false) {\n        go(...args);\n      }\n    };\n\n    return () => {\n      navigator.push = push;\n      navigator.go = go;\n    };\n  }, [navigator, confirmExit, when]);\n}\n\nexport function usePrompt(\n  message: string,\n  when = true,\n  onConfirm?: () => void,\n) {\n  const warnWhenListener = React.useCallback(\n    (e: { preventDefault: () => void; returnValue: string }) => {\n      e.preventDefault();\n\n      e.returnValue = message;\n\n      return e.returnValue;\n    },\n    [message],\n  );\n\n  React.useEffect(() => {\n    if (when) {\n      window.addEventListener(\"beforeunload\", warnWhenListener);\n    }\n\n    return () => {\n      window.removeEventListener(\"beforeunload\", warnWhenListener);\n    };\n  }, [warnWhenListener, when]);\n\n  const confirmExit = React.useCallback(() => {\n    const confirm = window.confirm(message);\n    if (confirm && onConfirm) {\n      onConfirm();\n    }\n    return confirm;\n  }, [message]);\n\n  useConfirmExit(confirmExit, when);\n}\n","import React from \"react\";\nimport { Navigate, useLocation } from \"react-router\";\n\n/**\n * A component that will navigate to the given path with `to` query parameter included with the current location.\n */\nexport const CatchAllNavigate: React.FC<{ to: string }> = ({ to }) => {\n  const { pathname, search } = useLocation();\n\n  const queryValue = `${pathname}${search}`;\n\n  const query =\n    queryValue.length > 1 ? `?to=${encodeURIComponent(queryValue)}` : \"\";\n\n  return <Navigate to={`${to}${query}`} />;\n};\n","import {\n  type Action,\n  type IResourceItem,\n  useParsed,\n  useTranslate,\n  generateDefaultDocumentTitle,\n  useUserFriendlyName,\n} from \"@refinedev/core\";\nimport React, { useLayoutEffect } from \"react\";\nimport { useLocation } from \"react-router\";\n\ntype Props = {\n  handler?: (options: {\n    resource?: IResourceItem;\n    action?: Action;\n    params?: Record<string, string | undefined>;\n    pathname?: string;\n    autoGeneratedTitle: string;\n  }) => string;\n};\n\nexport function DocumentTitleHandler({ handler }: Props) {\n  const location = useLocation();\n  const { action, id, params, pathname, resource } = useParsed();\n  const translate = useTranslate();\n  const getUserFriendlyName = useUserFriendlyName();\n\n  const identifier = resource?.identifier ?? resource?.name;\n  const preferredLabel = resource?.meta?.label;\n  const resourceName =\n    preferredLabel ??\n    getUserFriendlyName(identifier, action === \"list\" ? \"plural\" : \"singular\");\n  const populatedLabel = translate(\n    `${resource?.name}.${resource?.name}`,\n    resourceName,\n  );\n\n  useLayoutEffect(() => {\n    const autoGeneratedTitle = generateDefaultDocumentTitle(\n      translate,\n      resource!,\n      action,\n      `${id}`,\n      resourceName,\n      getUserFriendlyName,\n    );\n    if (handler) {\n      document.title = handler({\n        action,\n        resource: {\n          ...(resource! ?? {}),\n          meta: {\n            ...resource?.meta,\n            label: populatedLabel,\n          },\n        },\n        params,\n        pathname,\n        autoGeneratedTitle,\n      });\n    } else {\n      document.title = autoGeneratedTitle;\n    }\n  }, [location]);\n\n  return <></>;\n}\n","import { useTranslate } from \"@refinedev/core\";\nimport { useEffect } from \"react\";\n\ntype Title = string | { i18nKey: string };\n\nexport const useDocumentTitle = (title?: Title) => {\n  const translate = useTranslate();\n\n  useEffect(() => {\n    if (!title) return;\n\n    if (typeof title === \"string\") {\n      document.title = translate(title);\n    } else {\n      document.title = translate(title.i18nKey);\n    }\n  }, [title]);\n\n  return (title: Title) => {\n    if (typeof title === \"string\") {\n      document.title = translate(title);\n    } else {\n      document.title = translate(title.i18nKey);\n    }\n  };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA2C;AAC3C,kBAOO;AACP,IAAAA,gBAAwC;AACxC,gBAAe;AACf,0BAMO;;;ACjBA,IAAM,4BAA4B,CAAC,UAA8B;AACtE,MAAI,OAAO,UAAU,aAAa;AAChC,WAAO;AAAA,EACT;AACA,QAAM,MAAM,OAAO,KAAK;AACxB,MAAI,GAAG,UAAU,OAAO;AACtB,WAAO;AAAA,EACT;AACA,SAAO;AACT;;;ADWO,IAAM,kBAAkB;AAAA,EAC7B,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,kBAAkB;AACpB;AAEO,IAAM,iBAAiC;AAAA,EAC5C,IAAI,MAAM;AACR,UAAM,EAAE,QAAQ,gBAAgB,MAAM,aAAa,QAAI,iCAAY;AACnE,UAAM,eAAW,iCAAY;AAE7B,UAAM,SAAK;AAAA,MACT,CAAC;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,SAAS,EAAE,WAAW,SAAS,IAAI,CAAC;AAAA,MACtC,MAAgB;AAEd,cAAM,WAAW;AAAA,UACf,GAAI,aACF,kBACA,UAAAC,QAAG,MAAM,gBAAgB;AAAA,YACvB,mBAAmB;AAAA,YACnB,OAAO;AAAA,UACT,CAAC;AAAA,UAEH,GAAG;AAAA,QACL;AAEA,YAAI,SAAS,IAAI;AACf,mBAAS,KAAK,mBAAmB,GAAG,SAAS,IA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S,QAAQ,UAAUA,OAAM,OAAO;AAAA,IAC1C;AAAA,EACF;AACF;","names":["import_react","qs","React","import_core","import_react","import_react_router","React","import_react","import_core","import_react","import_react_router","React","NavigationContext","import_react_router","React","import_react","import_react_router","React","import_core","import_react","import_react_router","React","import_core","import_react","title"]}