@gem-sdk/core 1.45.0-dev.100 → 1.45.0-dev.102
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.
|
@@ -7,8 +7,8 @@ var zustand = require('zustand');
|
|
|
7
7
|
const ModalContext = /*#__PURE__*/ react.createContext(null);
|
|
8
8
|
const createModalProvider = (data)=>zustand.createStore((set)=>({
|
|
9
9
|
activeId: data,
|
|
10
|
-
setModalActive: (id,
|
|
11
|
-
|
|
10
|
+
setModalActive: (id, postMessage)=>{
|
|
11
|
+
postMessage && window?.parent?.postMessage?.(JSON.stringify({
|
|
12
12
|
type: 'active-element',
|
|
13
13
|
uid: id
|
|
14
14
|
}), '*');
|
|
@@ -5,8 +5,8 @@ import { useStore, createStore } from 'zustand';
|
|
|
5
5
|
const ModalContext = /*#__PURE__*/ createContext(null);
|
|
6
6
|
const createModalProvider = (data)=>createStore((set)=>({
|
|
7
7
|
activeId: data,
|
|
8
|
-
setModalActive: (id,
|
|
9
|
-
|
|
8
|
+
setModalActive: (id, postMessage)=>{
|
|
9
|
+
postMessage && window?.parent?.postMessage?.(JSON.stringify({
|
|
10
10
|
type: 'active-element',
|
|
11
11
|
uid: id
|
|
12
12
|
}), '*');
|
package/dist/types/index.d.ts
CHANGED
|
@@ -29013,7 +29013,7 @@ declare const useCollectionStore: <U>(selector: (state: ExtractState<StoreApi<Co
|
|
|
29013
29013
|
|
|
29014
29014
|
type ModalContextProps = {
|
|
29015
29015
|
activeId?: string;
|
|
29016
|
-
setModalActive: (id?: string,
|
|
29016
|
+
setModalActive: (id?: string, postMessage?: boolean) => void;
|
|
29017
29017
|
clearModal: () => void;
|
|
29018
29018
|
};
|
|
29019
29019
|
type ModalProviderProps = Pick<ModalContextProps, 'activeId'> & {
|