@compill/admin 1.0.59 → 1.0.60
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 +4 -3
- package/index.esm.js +4 -3
- package/package.json +1 -1
package/index.cjs.js
CHANGED
@@ -20,6 +20,7 @@ var admin = require('@compill/admin');
|
|
20
20
|
var reactDom = require('react-dom');
|
21
21
|
var table = require('@compill/table');
|
22
22
|
var hooks = require('@compill/hooks');
|
23
|
+
var env = require('@compill/env');
|
23
24
|
var router = require('next/router');
|
24
25
|
var reactQuery = require('@tanstack/react-query');
|
25
26
|
|
@@ -2287,7 +2288,7 @@ function TableViewProvider({
|
|
2287
2288
|
}
|
2288
2289
|
case "link":
|
2289
2290
|
{
|
2290
|
-
openLink(`${
|
2291
|
+
openLink(`${env.Env.websiteUrl()}/${react.runIfFn(action.path, item)}`);
|
2291
2292
|
break;
|
2292
2293
|
}
|
2293
2294
|
case "edit":
|
@@ -2532,7 +2533,7 @@ function useTableProps(api, table, rowActions) {
|
|
2532
2533
|
}
|
2533
2534
|
case "link":
|
2534
2535
|
{
|
2535
|
-
openLink(`${
|
2536
|
+
openLink(`${env.Env.websiteUrl()}/${react.runIfFn(config.path, item)}`);
|
2536
2537
|
break;
|
2537
2538
|
}
|
2538
2539
|
}
|
@@ -3411,7 +3412,7 @@ function TableRowViewButton(_a) {
|
|
3411
3412
|
const openPage = React__default["default"].useCallback(event => {
|
3412
3413
|
event === null || event === void 0 ? void 0 : event.preventDefault();
|
3413
3414
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
3414
|
-
window.open(`${
|
3415
|
+
window.open(`${env.Env.websiteUrl()}/${path}`, '_blank');
|
3415
3416
|
}, [path]);
|
3416
3417
|
return jsxRuntime.jsx(TableRowActionButton, Object.assign({
|
3417
3418
|
icon: mdiOpenInNew,
|
package/index.esm.js
CHANGED
@@ -16,6 +16,7 @@ import { PageSectionTitle as PageSectionTitle$1, ButtonBarDialogButton as Button
|
|
16
16
|
import { createPortal } from 'react-dom';
|
17
17
|
import { TableContextProvider, useTableContext, Table } from '@compill/table';
|
18
18
|
import { useOpenLink, useBoolean } from '@compill/hooks';
|
19
|
+
import { Env } from '@compill/env';
|
19
20
|
import { useRouter } from 'next/router';
|
20
21
|
import { useQueryClient } from '@tanstack/react-query';
|
21
22
|
|
@@ -2278,7 +2279,7 @@ function TableViewProvider({
|
|
2278
2279
|
}
|
2279
2280
|
case "link":
|
2280
2281
|
{
|
2281
|
-
openLink(`${
|
2282
|
+
openLink(`${Env.websiteUrl()}/${runIfFn(action.path, item)}`);
|
2282
2283
|
break;
|
2283
2284
|
}
|
2284
2285
|
case "edit":
|
@@ -2523,7 +2524,7 @@ function useTableProps(api, table, rowActions) {
|
|
2523
2524
|
}
|
2524
2525
|
case "link":
|
2525
2526
|
{
|
2526
|
-
openLink(`${
|
2527
|
+
openLink(`${Env.websiteUrl()}/${runIfFn(config.path, item)}`);
|
2527
2528
|
break;
|
2528
2529
|
}
|
2529
2530
|
}
|
@@ -3402,7 +3403,7 @@ function TableRowViewButton(_a) {
|
|
3402
3403
|
const openPage = React.useCallback(event => {
|
3403
3404
|
event === null || event === void 0 ? void 0 : event.preventDefault();
|
3404
3405
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
3405
|
-
window.open(`${
|
3406
|
+
window.open(`${Env.websiteUrl()}/${path}`, '_blank');
|
3406
3407
|
}, [path]);
|
3407
3408
|
return jsx(TableRowActionButton, Object.assign({
|
3408
3409
|
icon: mdiOpenInNew,
|