@compill/admin 1.0.78 → 1.0.79
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/index.cjs.js +5 -5
- package/index.esm.js +6 -6
- package/package.json +1 -1
package/index.cjs.js
CHANGED
@@ -2326,7 +2326,7 @@ function TableViewProvider({
|
|
2326
2326
|
}
|
2327
2327
|
case "link":
|
2328
2328
|
{
|
2329
|
-
openLink(`${env.
|
2329
|
+
openLink(`${env.AppEnv.websiteUrl()}/${react.runIfFn(action.path, item)}`);
|
2330
2330
|
break;
|
2331
2331
|
}
|
2332
2332
|
case "edit":
|
@@ -2571,7 +2571,7 @@ function useTableProps(api, table, rowActions) {
|
|
2571
2571
|
}
|
2572
2572
|
case "link":
|
2573
2573
|
{
|
2574
|
-
openLink(`${env.
|
2574
|
+
openLink(`${env.AppEnv.websiteUrl()}/${react.runIfFn(config.path, item)}`);
|
2575
2575
|
break;
|
2576
2576
|
}
|
2577
2577
|
}
|
@@ -3080,7 +3080,7 @@ function Sidebar(_a) {
|
|
3080
3080
|
darkMode: darkMode
|
3081
3081
|
}), jsxRuntime.jsx("h1", {
|
3082
3082
|
textSize: "md",
|
3083
|
-
children: title !== null && title !== void 0 ? title : env.
|
3083
|
+
children: title !== null && title !== void 0 ? title : env.AppEnv.appName()
|
3084
3084
|
})]
|
3085
3085
|
}), jsxRuntime.jsx(Menu, {
|
3086
3086
|
overflowY: "auto",
|
@@ -3101,7 +3101,7 @@ function Logo(_a) {
|
|
3101
3101
|
return jsxRuntime.jsx("div", Object.assign({}, props, {
|
3102
3102
|
children: jsxRuntime.jsx(Image__default["default"], {
|
3103
3103
|
src: `/logo_${darkMode ? "light" : "dark"}.png`,
|
3104
|
-
alt: env.
|
3104
|
+
alt: env.AppEnv.appName(),
|
3105
3105
|
width: width,
|
3106
3106
|
height: height,
|
3107
3107
|
priority: true,
|
@@ -3542,7 +3542,7 @@ function TableRowViewButton(_a) {
|
|
3542
3542
|
const openPage = React__default["default"].useCallback(event => {
|
3543
3543
|
event === null || event === void 0 ? void 0 : event.preventDefault();
|
3544
3544
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
3545
|
-
window.open(`${env.
|
3545
|
+
window.open(`${env.AppEnv.websiteUrl()}/${path}`, '_blank');
|
3546
3546
|
}, [path]);
|
3547
3547
|
return jsxRuntime.jsx(TableRowActionButton, Object.assign({
|
3548
3548
|
icon: mdiOpenInNew,
|
package/index.esm.js
CHANGED
@@ -17,7 +17,7 @@ import { createPortal } from 'react-dom';
|
|
17
17
|
import { useRouter } from 'next/router';
|
18
18
|
import { TableContextProvider, useTableContext, Table } from '@compill/table';
|
19
19
|
import { useOpenLink, useBoolean } from '@compill/hooks';
|
20
|
-
import {
|
20
|
+
import { AppEnv } from '@compill/env';
|
21
21
|
import { useQueryClient } from '@tanstack/react-query';
|
22
22
|
import Image from 'next/image';
|
23
23
|
|
@@ -2316,7 +2316,7 @@ function TableViewProvider({
|
|
2316
2316
|
}
|
2317
2317
|
case "link":
|
2318
2318
|
{
|
2319
|
-
openLink(`${
|
2319
|
+
openLink(`${AppEnv.websiteUrl()}/${runIfFn(action.path, item)}`);
|
2320
2320
|
break;
|
2321
2321
|
}
|
2322
2322
|
case "edit":
|
@@ -2561,7 +2561,7 @@ function useTableProps(api, table, rowActions) {
|
|
2561
2561
|
}
|
2562
2562
|
case "link":
|
2563
2563
|
{
|
2564
|
-
openLink(`${
|
2564
|
+
openLink(`${AppEnv.websiteUrl()}/${runIfFn(config.path, item)}`);
|
2565
2565
|
break;
|
2566
2566
|
}
|
2567
2567
|
}
|
@@ -3070,7 +3070,7 @@ function Sidebar(_a) {
|
|
3070
3070
|
darkMode: darkMode
|
3071
3071
|
}), jsx("h1", {
|
3072
3072
|
textSize: "md",
|
3073
|
-
children: title !== null && title !== void 0 ? title :
|
3073
|
+
children: title !== null && title !== void 0 ? title : AppEnv.appName()
|
3074
3074
|
})]
|
3075
3075
|
}), jsx(Menu, {
|
3076
3076
|
overflowY: "auto",
|
@@ -3091,7 +3091,7 @@ function Logo(_a) {
|
|
3091
3091
|
return jsx("div", Object.assign({}, props, {
|
3092
3092
|
children: jsx(Image, {
|
3093
3093
|
src: `/logo_${darkMode ? "light" : "dark"}.png`,
|
3094
|
-
alt:
|
3094
|
+
alt: AppEnv.appName(),
|
3095
3095
|
width: width,
|
3096
3096
|
height: height,
|
3097
3097
|
priority: true,
|
@@ -3532,7 +3532,7 @@ function TableRowViewButton(_a) {
|
|
3532
3532
|
const openPage = React.useCallback(event => {
|
3533
3533
|
event === null || event === void 0 ? void 0 : event.preventDefault();
|
3534
3534
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
3535
|
-
window.open(`${
|
3535
|
+
window.open(`${AppEnv.websiteUrl()}/${path}`, '_blank');
|
3536
3536
|
}, [path]);
|
3537
3537
|
return jsx(TableRowActionButton, Object.assign({
|
3538
3538
|
icon: mdiOpenInNew,
|