@voplus/morpho-document 1.4.123 → 1.4.124

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.
@@ -1,10 +1,17 @@
1
- import React from "react";
1
+ import React, { useEffect } from "react";
2
2
  import { observe } from "@voplus/morpho-ui";
3
3
  import { useLayout } from "@voplus/morpho-data";
4
+ import { useAsideContentContext } from "@voplus/morpho-ui/es/components/layout/AsideContent";
4
5
  import Modal from "@voplus/morpho-ui/es/components/Modal";
5
6
  const FlexDialog = (props) => {
6
7
  const layout = useLayout();
7
- return observe(() => (React.createElement(React.Fragment, null, layout.ui.mobile ? props.children : React.createElement(Modal, { ...props.modalProps }, props.children))));
8
+ const asideContext = useAsideContentContext();
9
+ useEffect(() => {
10
+ if (layout.ui.mobile) {
11
+ asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(props.children);
12
+ }
13
+ }, [layout.ui.mobile]);
14
+ return observe(() => (React.createElement(React.Fragment, null, layout.ui.mobile && asideContext ? null : (React.createElement(Modal, { ...props.modalProps }, props.children)))));
8
15
  };
9
16
  export default FlexDialog;
10
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FlexDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,MAAM,uCAAuC,CAAC;AAE1D,MAAM,UAAU,GAAG,CAAC,KAAwD,EAAE,EAAE;IAC/E,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,KAAK,CAAC,QAAQ,QACb,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,C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"name": "@voplus/morpho-document",
3
- "version": "1.4.123",
3
+ "version": "1.4.124",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://voplus.visualstudio.com/morpho-document/_git/morpho-document"