@compill/admin 1.0.58 → 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 +10 -8
- package/index.esm.js +10 -8
- 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
|
|
@@ -951,12 +952,13 @@ function PageSidebarSection(_a) {
|
|
951
952
|
function PageTitle(_a) {
|
952
953
|
var {
|
953
954
|
children
|
954
|
-
} = _a
|
955
|
-
__rest$1(_a, ["children"]);
|
956
|
-
return jsxRuntime.jsx("div", {
|
957
|
-
trait: "typo.h5"
|
955
|
+
} = _a,
|
956
|
+
props = __rest$1(_a, ["children"]);
|
957
|
+
return jsxRuntime.jsx("div", Object.assign({
|
958
|
+
trait: "typo.h5"
|
959
|
+
}, props, {
|
958
960
|
children: children
|
959
|
-
});
|
961
|
+
}));
|
960
962
|
}
|
961
963
|
|
962
964
|
function PageTopBar(_a) {
|
@@ -2286,7 +2288,7 @@ function TableViewProvider({
|
|
2286
2288
|
}
|
2287
2289
|
case "link":
|
2288
2290
|
{
|
2289
|
-
openLink(`${
|
2291
|
+
openLink(`${env.Env.websiteUrl()}/${react.runIfFn(action.path, item)}`);
|
2290
2292
|
break;
|
2291
2293
|
}
|
2292
2294
|
case "edit":
|
@@ -2531,7 +2533,7 @@ function useTableProps(api, table, rowActions) {
|
|
2531
2533
|
}
|
2532
2534
|
case "link":
|
2533
2535
|
{
|
2534
|
-
openLink(`${
|
2536
|
+
openLink(`${env.Env.websiteUrl()}/${react.runIfFn(config.path, item)}`);
|
2535
2537
|
break;
|
2536
2538
|
}
|
2537
2539
|
}
|
@@ -3410,7 +3412,7 @@ function TableRowViewButton(_a) {
|
|
3410
3412
|
const openPage = React__default["default"].useCallback(event => {
|
3411
3413
|
event === null || event === void 0 ? void 0 : event.preventDefault();
|
3412
3414
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
3413
|
-
window.open(`${
|
3415
|
+
window.open(`${env.Env.websiteUrl()}/${path}`, '_blank');
|
3414
3416
|
}, [path]);
|
3415
3417
|
return jsxRuntime.jsx(TableRowActionButton, Object.assign({
|
3416
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
|
|
@@ -942,12 +943,13 @@ function PageSidebarSection(_a) {
|
|
942
943
|
function PageTitle(_a) {
|
943
944
|
var {
|
944
945
|
children
|
945
|
-
} = _a
|
946
|
-
__rest$1(_a, ["children"]);
|
947
|
-
return jsx("div", {
|
948
|
-
trait: "typo.h5"
|
946
|
+
} = _a,
|
947
|
+
props = __rest$1(_a, ["children"]);
|
948
|
+
return jsx("div", Object.assign({
|
949
|
+
trait: "typo.h5"
|
950
|
+
}, props, {
|
949
951
|
children: children
|
950
|
-
});
|
952
|
+
}));
|
951
953
|
}
|
952
954
|
|
953
955
|
function PageTopBar(_a) {
|
@@ -2277,7 +2279,7 @@ function TableViewProvider({
|
|
2277
2279
|
}
|
2278
2280
|
case "link":
|
2279
2281
|
{
|
2280
|
-
openLink(`${
|
2282
|
+
openLink(`${Env.websiteUrl()}/${runIfFn(action.path, item)}`);
|
2281
2283
|
break;
|
2282
2284
|
}
|
2283
2285
|
case "edit":
|
@@ -2522,7 +2524,7 @@ function useTableProps(api, table, rowActions) {
|
|
2522
2524
|
}
|
2523
2525
|
case "link":
|
2524
2526
|
{
|
2525
|
-
openLink(`${
|
2527
|
+
openLink(`${Env.websiteUrl()}/${runIfFn(config.path, item)}`);
|
2526
2528
|
break;
|
2527
2529
|
}
|
2528
2530
|
}
|
@@ -3401,7 +3403,7 @@ function TableRowViewButton(_a) {
|
|
3401
3403
|
const openPage = React.useCallback(event => {
|
3402
3404
|
event === null || event === void 0 ? void 0 : event.preventDefault();
|
3403
3405
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
3404
|
-
window.open(`${
|
3406
|
+
window.open(`${Env.websiteUrl()}/${path}`, '_blank');
|
3405
3407
|
}, [path]);
|
3406
3408
|
return jsx(TableRowActionButton, Object.assign({
|
3407
3409
|
icon: mdiOpenInNew,
|