@linzjs/windows 4.1.1 → 4.1.2

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.
@@ -17,6 +17,7 @@ import React, {
17
17
  } from "react";
18
18
  import { createPortal } from "react-dom";
19
19
  import { useInterval } from "usehooks-ts";
20
+ import { v4 } from "uuid";
20
21
 
21
22
  export interface LuiModalAsyncInstance {
22
23
  uuid: string;
@@ -106,7 +107,7 @@ export const LuiModalAsyncContextProvider = ({ children }: PropsWithChildren<unk
106
107
  args: any,
107
108
  showModalProps?: ShowModalProps,
108
109
  ): PromiseWithResolve<any> => {
109
- const uuid = crypto.randomUUID();
110
+ const uuid = v4();
110
111
  let extResolve: PromiseWithResolve<any>["resolve"];
111
112
  const promise = new Promise((resolve) => {
112
113
  extResolve = resolve;
@@ -5,6 +5,7 @@ import React, { Fragment, PropsWithChildren, ReactElement, useCallback, useMemo,
5
5
  import { useInterval } from "usehooks-ts";
6
6
  import { PanelStateOptions } from "./types/PanelStateOptions";
7
7
  import { PanelPosition } from "./types";
8
+ import { v4 } from "uuid";
8
9
 
9
10
  export interface PanelsContextProviderProps {
10
11
  baseZIndex?: number;
@@ -58,7 +59,7 @@ export const PanelsContextProvider = ({
58
59
  );
59
60
 
60
61
  const openPanel = useCallback(
61
- ({ componentFn, poppedOut = false, uniqueId = crypto.randomUUID() }: OpenPanelOptions): void => {
62
+ ({ componentFn, poppedOut = false, uniqueId = v4() }: OpenPanelOptions): void => {
62
63
  try {
63
64
  const existingPanelInstance = panelInstances.find((pi) => pi.uniqueId === uniqueId);
64
65
  if (existingPanelInstance) {
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "popout"
14
14
  ],
15
15
  "main": "./dist/index.ts",
16
- "version": "4.1.1",
16
+ "version": "4.1.2",
17
17
  "peerDependencies": {
18
18
  "@linzjs/lui": ">=21",
19
19
  "lodash-es": ">=4",
@@ -49,9 +49,11 @@
49
49
  "@emotion/cache": "^11.13.5",
50
50
  "@emotion/react": "^11.13.5",
51
51
  "@emotion/styled": "^11.13.5",
52
+ "@types/uuid": "^10.0.0",
52
53
  "lodash-es": ">=4",
53
54
  "react-rnd": "^10.4.13",
54
- "usehooks-ts": "^3.1.0"
55
+ "usehooks-ts": "^3.1.0",
56
+ "uuid": "^11.0.4"
55
57
  },
56
58
  "devDependencies": {
57
59
  "@chromatic-com/storybook": "^3.2.2",