@commercelayer/app-elements 3.4.0 → 3.5.1
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/{CodeEditorComponent-D5qd5nn5.js → CodeEditorComponent-Br_-ue2W.js} +1 -1
- package/dist/{InputDateComponent-CIZED8wv.js → InputDateComponent-AYfU6xbq.js} +1 -1
- package/dist/helpers/useAppLinking.d.ts +28 -0
- package/dist/{main-BBkPeXZ8.js → main-DRHqNsgQ.js} +9444 -9249
- package/dist/main.d.ts +1 -0
- package/dist/main.js +36 -35
- package/dist/style.css +1 -1
- package/package.json +3 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as se, I as Ee } from "./main-
|
|
2
|
+
import { j as se, I as Ee } from "./main-DRHqNsgQ.js";
|
|
3
3
|
import V, { memo as ce, useState as U, useRef as y, useCallback as ue, useEffect as $, forwardRef as Ce } from "react";
|
|
4
4
|
function Ie(e, t, r) {
|
|
5
5
|
return t in e ? Object.defineProperty(e, t, {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var un = Object.defineProperty;
|
|
3
3
|
var dn = (a, n, t) => n in a ? un(a, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[n] = t;
|
|
4
4
|
var y = (a, n, t) => dn(a, typeof n != "symbol" ? n + "" : n, t);
|
|
5
|
-
import { o as pn, f as fn, c as hn, a as er, g as mn, i as $e, b as vn, j as Ee, I as gn, d as Dn, e as wn, w as yn, R as bn } from "./main-
|
|
5
|
+
import { o as pn, f as fn, c as hn, a as er, g as mn, i as $e, b as vn, j as Ee, I as gn, d as Dn, e as wn, w as yn, R as bn } from "./main-DRHqNsgQ.js";
|
|
6
6
|
import * as x from "react";
|
|
7
7
|
import h, { useLayoutEffect as Or, useEffect as Vt, createElement as _n, cloneElement as Yr, Component as Z, createRef as Se, useRef as At, useCallback as kn, forwardRef as Mn } from "react";
|
|
8
8
|
import * as Cn from "react-dom";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TokenProviderAllowedApp } from '../providers/TokenProvider/types';
|
|
2
|
+
type AppsWithConfig = Exclude<TokenProviderAllowedApp, 'dashboard' | 'resources'>;
|
|
3
|
+
interface UseAppLinkingHook {
|
|
4
|
+
/**
|
|
5
|
+
* Navigate to internal app path, to different app (outside router base), or to an external URL.
|
|
6
|
+
* Current path is saved in a cookie to allow going back to it (when using `goBack`).
|
|
7
|
+
*/
|
|
8
|
+
navigateTo: (param: {
|
|
9
|
+
app: AppsWithConfig;
|
|
10
|
+
resourceId?: string;
|
|
11
|
+
}) => {
|
|
12
|
+
href: string;
|
|
13
|
+
onClick: (e: React.MouseEvent<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement, MouseEvent>) => void;
|
|
14
|
+
} | null;
|
|
15
|
+
/**
|
|
16
|
+
* Go back to the last visited location when `navigateTo` has been used.
|
|
17
|
+
* If no cookie is found, it will navigate to the default relative
|
|
18
|
+
*/
|
|
19
|
+
goBack: (param: {
|
|
20
|
+
currentResourceId?: string;
|
|
21
|
+
defaultRelativePath: string;
|
|
22
|
+
}) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Hook to navigate between apps from list and detail views.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useAppLinking(): UseAppLinkingHook;
|
|
28
|
+
export {};
|