@plasmicpkgs/plasmic-rich-components 1.0.152 → 1.0.153
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.
|
@@ -10,7 +10,7 @@ import { useNormalizedData, deriveFieldConfigs } from '@plasmicapp/data-sources'
|
|
|
10
10
|
import { tinycolor } from '@ctrl/tinycolor';
|
|
11
11
|
import { LogoutOutlined, PlusOutlined, EllipsisOutlined } from '@ant-design/icons';
|
|
12
12
|
import { ProLayout, ProConfigProvider, ProTable } from '@ant-design/pro-components';
|
|
13
|
-
import { usePlasmicLink } from '@plasmicapp/host';
|
|
13
|
+
import { useDataEnv, usePlasmicLink } from '@plasmicapp/host';
|
|
14
14
|
import { createObjectCsvStringifier } from 'csv-writer-browser';
|
|
15
15
|
import fastStringify from 'fast-stringify';
|
|
16
16
|
import classNames from 'classnames';
|
|
@@ -1023,6 +1023,7 @@ function RichLayout(_a) {
|
|
|
1023
1023
|
"logoElement"
|
|
1024
1024
|
]);
|
|
1025
1025
|
var _a2, _b2, _c, _d, _e;
|
|
1026
|
+
const $ctx = useDataEnv();
|
|
1026
1027
|
const isClient = useIsClient();
|
|
1027
1028
|
const [pathname, setPathname] = useState(void 0);
|
|
1028
1029
|
useEffect(() => {
|
|
@@ -1030,7 +1031,7 @@ function RichLayout(_a) {
|
|
|
1030
1031
|
setPathname(location.pathname);
|
|
1031
1032
|
}
|
|
1032
1033
|
}, []);
|
|
1033
|
-
const
|
|
1034
|
+
const PlasmicLink = (_b2 = (_a2 = usePlasmicLink) == null ? void 0 : _a2()) != null ? _b2 : AnchorLink;
|
|
1034
1035
|
const { token } = theme.useToken();
|
|
1035
1036
|
const origTextColor = token.colorTextBase;
|
|
1036
1037
|
function getNavBgColor() {
|
|
@@ -1149,9 +1150,10 @@ function RichLayout(_a) {
|
|
|
1149
1150
|
return footerChildren;
|
|
1150
1151
|
},
|
|
1151
1152
|
onMenuHeaderClick: (e) => console.log(e),
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1153
|
+
selectedKeys: [$ctx == null ? void 0 : $ctx.pagePath],
|
|
1154
|
+
menuItemRender: (item, dom) => /* @__PURE__ */ React.createElement(PlasmicLink, { href: item.path }, dom),
|
|
1155
|
+
headerTitleRender: (logoEl, title, _) => {
|
|
1156
|
+
return /* @__PURE__ */ React.createElement(PlasmicLink, { href: rootUrl }, logoEl, title);
|
|
1155
1157
|
}
|
|
1156
1158
|
}),
|
|
1157
1159
|
children
|