@compill/admin 1.0.45 → 1.0.47
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 +76 -81
- package/index.esm.js +77 -82
- package/package.json +1 -1
- package/src/lib/buttons/InvalidateButton.d.ts +2 -2
- package/src/lib/buttons/ViewButton.d.ts +3 -3
package/index.cjs.js
CHANGED
@@ -170,20 +170,17 @@ function InvalidateButton(_a) {
|
|
170
170
|
const invalidate = api.useMutate(mutation, {
|
171
171
|
successMsg: "Page successfully invalidated"
|
172
172
|
});
|
173
|
-
return jsxRuntime.jsx(ui.
|
173
|
+
return jsxRuntime.jsx(ui.IconButton, Object.assign({
|
174
174
|
scheme: "dark",
|
175
|
-
variant: "
|
176
|
-
size: "
|
175
|
+
variant: "glass",
|
176
|
+
size: "md",
|
177
177
|
corners: "square",
|
178
178
|
aspectRatio: "square",
|
179
179
|
title: "Regenerate",
|
180
180
|
disabled: mutation.isLoading,
|
181
|
-
onClick: invalidate
|
182
|
-
|
183
|
-
|
184
|
-
path: mdiDatabaseRefreshOutline
|
185
|
-
})
|
186
|
-
}));
|
181
|
+
onClick: invalidate,
|
182
|
+
icon: mdiDatabaseRefreshOutline
|
183
|
+
}, props));
|
187
184
|
}
|
188
185
|
|
189
186
|
function NavigateButton(_a) {
|
@@ -228,8 +225,8 @@ function PublishButton(_a) {
|
|
228
225
|
return jsxRuntime.jsxs(ui.Button, Object.assign({
|
229
226
|
scheme: "secondary",
|
230
227
|
variant: "glass",
|
231
|
-
|
232
|
-
px: "
|
228
|
+
size: "sm",
|
229
|
+
px: "3",
|
233
230
|
disabled: mutation.isLoading,
|
234
231
|
onClick: publish,
|
235
232
|
dflex: true,
|
@@ -647,8 +644,8 @@ function UpdateButton(_a) {
|
|
647
644
|
}, [dirty, props, handleSubmit]);
|
648
645
|
return jsxRuntime.jsxs(form.SubmitButton, Object.assign({
|
649
646
|
type: "submit",
|
650
|
-
|
651
|
-
px: "
|
647
|
+
size: "sm",
|
648
|
+
px: "3",
|
652
649
|
dflex: true,
|
653
650
|
alignItems: "center",
|
654
651
|
gap: "3"
|
@@ -668,19 +665,14 @@ function ViewButton(_a) {
|
|
668
665
|
const openPage = React__default["default"].useCallback(() => {
|
669
666
|
window.open(path, '_blank');
|
670
667
|
}, [path]);
|
671
|
-
return jsxRuntime.jsx(ui.
|
668
|
+
return jsxRuntime.jsx(ui.IconButton, Object.assign({
|
669
|
+
icon: icon ? icon : mdiOpenInNew,
|
672
670
|
type: "submit",
|
673
671
|
scheme: "dark",
|
674
672
|
variant: "glass",
|
675
|
-
|
676
|
-
w: "10",
|
677
|
-
h: "10",
|
673
|
+
size: "md",
|
678
674
|
onClick: openPage
|
679
|
-
}, props
|
680
|
-
children: jsxRuntime.jsx(ui.Icon, {
|
681
|
-
path: icon !== null && icon !== void 0 ? icon : mdiOpenInNew
|
682
|
-
})
|
683
|
-
}));
|
675
|
+
}, props));
|
684
676
|
}
|
685
677
|
|
686
678
|
function OrderCell({
|
@@ -820,6 +812,8 @@ function PageContentEditor(_a) {
|
|
820
812
|
children: jsxRuntime.jsx(FormEditor, {
|
821
813
|
minH: "128",
|
822
814
|
minW: "144",
|
815
|
+
maxW: props.maxW,
|
816
|
+
// w={props.w}
|
823
817
|
name: name,
|
824
818
|
placeHolder: "Write here..."
|
825
819
|
})
|
@@ -883,9 +877,10 @@ function PageSidebarSection(_a) {
|
|
883
877
|
return jsxRuntime.jsxs("div", Object.assign({
|
884
878
|
w: "full",
|
885
879
|
bgColor: "white",
|
886
|
-
rounded:
|
880
|
+
rounded: "lg",
|
887
881
|
p: "5",
|
888
|
-
textSize: "sm"
|
882
|
+
textSize: "sm",
|
883
|
+
shadow: true
|
889
884
|
}, props, {
|
890
885
|
children: [title && jsxRuntime.jsx(admin.PageSectionTitle, {
|
891
886
|
children: title
|
@@ -1157,44 +1152,51 @@ function Internal({
|
|
1157
1152
|
item: item,
|
1158
1153
|
isLoading: mutation.isLoading,
|
1159
1154
|
trackingRef: containerRef === null || containerRef === void 0 ? void 0 : containerRef.current
|
1160
|
-
}), jsxRuntime.
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
children:
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1155
|
+
}), jsxRuntime.jsx("div", {
|
1156
|
+
p: "5",
|
1157
|
+
bgColor: "slate-100",
|
1158
|
+
rounded: "lg",
|
1159
|
+
children: jsxRuntime.jsxs(PageContainer, {
|
1160
|
+
w: editorMaxW ? "auto" : "full",
|
1161
|
+
size: "x2",
|
1162
|
+
id: "pagecontainer",
|
1163
|
+
children: [header, jsxRuntime.jsxs("div", {
|
1168
1164
|
dflex: true,
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1165
|
+
gap: "5",
|
1166
|
+
children: [jsxRuntime.jsxs("div", {
|
1167
|
+
dflex: true,
|
1168
|
+
flexCol: true,
|
1169
|
+
gap: "8",
|
1170
|
+
flexGrow: true,
|
1171
|
+
children: [(editor === null || editor === void 0 ? void 0 : editor.type) != "textarea" &&
|
1172
|
+
// TODO Find a way to make this editor shrink in width when resizing the window...
|
1173
|
+
jsxRuntime.jsx(PageContentEditor, {
|
1174
|
+
name: "content",
|
1175
|
+
maxW: editorMaxW,
|
1176
|
+
minW: "144",
|
1177
|
+
shadow: true,
|
1178
|
+
rounded: "lg"
|
1179
|
+
}), (editor === null || editor === void 0 ? void 0 : editor.type) == "textarea" && jsxRuntime.jsx(form.TextArea, {
|
1180
|
+
name: editor === null || editor === void 0 ? void 0 : editor.name,
|
1181
|
+
maxW: editorMaxW,
|
1182
|
+
minW: editorMaxW,
|
1183
|
+
w: editorMaxW,
|
1184
|
+
minH: "128",
|
1185
|
+
rows: 25,
|
1186
|
+
bgColor: "white",
|
1187
|
+
border: "0",
|
1188
|
+
shadow: true,
|
1189
|
+
p: "5",
|
1190
|
+
textColor: "slate-800"
|
1191
|
+
}), editoFooter]
|
1192
|
+
}), jsxRuntime.jsx(PageSidebar, {
|
1193
|
+
children: sections === null || sections === void 0 ? void 0 : sections.map((section, index) => jsxRuntime.jsx(Section, {
|
1194
|
+
section: section,
|
1195
|
+
item: item
|
1196
|
+
}, index))
|
1197
|
+
})]
|
1196
1198
|
})]
|
1197
|
-
})
|
1199
|
+
})
|
1198
1200
|
})]
|
1199
1201
|
});
|
1200
1202
|
}
|
@@ -1450,7 +1452,7 @@ function TableTopBar(_a) {
|
|
1450
1452
|
flexRow: true,
|
1451
1453
|
alignItems: "center",
|
1452
1454
|
gap: "3",
|
1453
|
-
p: "
|
1455
|
+
p: "8"
|
1454
1456
|
}, props, {
|
1455
1457
|
children: [title && jsxRuntime.jsx("h2", {
|
1456
1458
|
textSize: "x2",
|
@@ -1926,7 +1928,7 @@ function TableRowPublishPostButton$1(_a) {
|
|
1926
1928
|
return jsxRuntime.jsx(ui.Button, Object.assign({
|
1927
1929
|
variant: "borderless",
|
1928
1930
|
corners: "square",
|
1929
|
-
scheme: "
|
1931
|
+
scheme: "dark",
|
1930
1932
|
onClick: publish
|
1931
1933
|
}, props, {
|
1932
1934
|
children: jsxRuntime.jsx(ui.Icon, {
|
@@ -1950,10 +1952,6 @@ function TableRowActionsView({
|
|
1950
1952
|
alignItems: "stretch",
|
1951
1953
|
placeContent: "end",
|
1952
1954
|
h: "full",
|
1953
|
-
divideX: "1px",
|
1954
|
-
divideColor: "zinc-100",
|
1955
|
-
rounded: "lg",
|
1956
|
-
overflow: "hidden",
|
1957
1955
|
children: rowActions === null || rowActions === void 0 ? void 0 : rowActions.map((action, index) => jsxRuntime.jsxs(React__default["default"].Fragment, {
|
1958
1956
|
children: [action.type === "publish" && jsxRuntime.jsx(TableRowPublishPostButton$1, {
|
1959
1957
|
id: item.id,
|
@@ -1988,11 +1986,11 @@ function ActionButton$1(_a) {
|
|
1988
1986
|
alignContent: "center",
|
1989
1987
|
placeContent: "center",
|
1990
1988
|
py: "2.5",
|
1991
|
-
px: "
|
1989
|
+
px: "3",
|
1992
1990
|
h: "full",
|
1993
1991
|
size: "lg",
|
1994
1992
|
variant: "borderless",
|
1995
|
-
corners: "
|
1993
|
+
corners: "default",
|
1996
1994
|
onClick: handleClick
|
1997
1995
|
}, props));
|
1998
1996
|
}
|
@@ -2006,11 +2004,11 @@ const icons = {
|
|
2006
2004
|
};
|
2007
2005
|
const schemes$1 = {
|
2008
2006
|
"link": "dark",
|
2009
|
-
"view": "
|
2010
|
-
"edit": "
|
2011
|
-
"delete": "
|
2012
|
-
"publish": "
|
2013
|
-
"custom": "
|
2007
|
+
"view": "dark",
|
2008
|
+
"edit": "dark",
|
2009
|
+
"delete": "dark",
|
2010
|
+
"publish": "dark",
|
2011
|
+
"custom": "dark"
|
2014
2012
|
};
|
2015
2013
|
|
2016
2014
|
function useTableProps(api, table, rowActions) {
|
@@ -2627,8 +2625,7 @@ function TableWrapper({
|
|
2627
2625
|
};
|
2628
2626
|
}, [subtitle]);
|
2629
2627
|
return jsxRuntime.jsx(table.Table, Object.assign({}, tableProps, {
|
2630
|
-
|
2631
|
-
py: "3",
|
2628
|
+
p: "8",
|
2632
2629
|
title: _subtitle
|
2633
2630
|
}));
|
2634
2631
|
}
|
@@ -2646,8 +2643,8 @@ function useQueries(queries) {
|
|
2646
2643
|
isFetching,
|
2647
2644
|
isError
|
2648
2645
|
} = api.useApiQueries(queries.map(q => {
|
2649
|
-
if (!q.queryField
|
2650
|
-
const _api = q.api;
|
2646
|
+
if (!q.queryField) {
|
2647
|
+
const _api = react.runIfFn(q.api);
|
2651
2648
|
return {
|
2652
2649
|
queryKey: _api.queryKey,
|
2653
2650
|
queryFn: q.fn == "get" ? _api.get : _api.getAll,
|
@@ -3259,11 +3256,9 @@ function TableRowNavigateButton(_a) {
|
|
3259
3256
|
navigate(`${path}`);
|
3260
3257
|
}, [navigate, path]);
|
3261
3258
|
return jsxRuntime.jsx(ui.Button, Object.assign({
|
3262
|
-
scheme: "
|
3263
|
-
w: "10",
|
3264
|
-
h: "10",
|
3259
|
+
scheme: "dark",
|
3265
3260
|
variant: "borderless",
|
3266
|
-
corners: "
|
3261
|
+
corners: "square",
|
3267
3262
|
onClick: handleClick
|
3268
3263
|
}, props, {
|
3269
3264
|
children: jsxRuntime.jsx(ui.Icon, {
|
package/index.esm.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { jsx, jsxs, Fragment } from '@soperio/jsx-runtime';
|
2
|
-
import { Icon, Button, Container, Tile, Popover, Modal, Collapse, Checkbox, Badge } from '@valerya/ui';
|
2
|
+
import { Icon, Button, IconButton, Container, Tile, Popover, Modal, Collapse, Checkbox, Badge } from '@valerya/ui';
|
3
3
|
import Link from 'next/link';
|
4
4
|
import React, { useRef, useCallback, useContext as useContext$2, useLayoutEffect, useEffect, createContext } from 'react';
|
5
5
|
import { INVALIDATE_API } from '@compill/admin-api';
|
@@ -161,20 +161,17 @@ function InvalidateButton(_a) {
|
|
161
161
|
const invalidate = useMutate(mutation, {
|
162
162
|
successMsg: "Page successfully invalidated"
|
163
163
|
});
|
164
|
-
return jsx(
|
164
|
+
return jsx(IconButton, Object.assign({
|
165
165
|
scheme: "dark",
|
166
|
-
variant: "
|
167
|
-
size: "
|
166
|
+
variant: "glass",
|
167
|
+
size: "md",
|
168
168
|
corners: "square",
|
169
169
|
aspectRatio: "square",
|
170
170
|
title: "Regenerate",
|
171
171
|
disabled: mutation.isLoading,
|
172
|
-
onClick: invalidate
|
173
|
-
|
174
|
-
|
175
|
-
path: mdiDatabaseRefreshOutline
|
176
|
-
})
|
177
|
-
}));
|
172
|
+
onClick: invalidate,
|
173
|
+
icon: mdiDatabaseRefreshOutline
|
174
|
+
}, props));
|
178
175
|
}
|
179
176
|
|
180
177
|
function NavigateButton(_a) {
|
@@ -219,8 +216,8 @@ function PublishButton(_a) {
|
|
219
216
|
return jsxs(Button, Object.assign({
|
220
217
|
scheme: "secondary",
|
221
218
|
variant: "glass",
|
222
|
-
|
223
|
-
px: "
|
219
|
+
size: "sm",
|
220
|
+
px: "3",
|
224
221
|
disabled: mutation.isLoading,
|
225
222
|
onClick: publish,
|
226
223
|
dflex: true,
|
@@ -638,8 +635,8 @@ function UpdateButton(_a) {
|
|
638
635
|
}, [dirty, props, handleSubmit]);
|
639
636
|
return jsxs(SubmitButton, Object.assign({
|
640
637
|
type: "submit",
|
641
|
-
|
642
|
-
px: "
|
638
|
+
size: "sm",
|
639
|
+
px: "3",
|
643
640
|
dflex: true,
|
644
641
|
alignItems: "center",
|
645
642
|
gap: "3"
|
@@ -659,19 +656,14 @@ function ViewButton(_a) {
|
|
659
656
|
const openPage = React.useCallback(() => {
|
660
657
|
window.open(path, '_blank');
|
661
658
|
}, [path]);
|
662
|
-
return jsx(
|
659
|
+
return jsx(IconButton, Object.assign({
|
660
|
+
icon: icon ? icon : mdiOpenInNew,
|
663
661
|
type: "submit",
|
664
662
|
scheme: "dark",
|
665
663
|
variant: "glass",
|
666
|
-
|
667
|
-
w: "10",
|
668
|
-
h: "10",
|
664
|
+
size: "md",
|
669
665
|
onClick: openPage
|
670
|
-
}, props
|
671
|
-
children: jsx(Icon, {
|
672
|
-
path: icon !== null && icon !== void 0 ? icon : mdiOpenInNew
|
673
|
-
})
|
674
|
-
}));
|
666
|
+
}, props));
|
675
667
|
}
|
676
668
|
|
677
669
|
function OrderCell({
|
@@ -811,6 +803,8 @@ function PageContentEditor(_a) {
|
|
811
803
|
children: jsx(FormEditor, {
|
812
804
|
minH: "128",
|
813
805
|
minW: "144",
|
806
|
+
maxW: props.maxW,
|
807
|
+
// w={props.w}
|
814
808
|
name: name,
|
815
809
|
placeHolder: "Write here..."
|
816
810
|
})
|
@@ -874,9 +868,10 @@ function PageSidebarSection(_a) {
|
|
874
868
|
return jsxs("div", Object.assign({
|
875
869
|
w: "full",
|
876
870
|
bgColor: "white",
|
877
|
-
rounded:
|
871
|
+
rounded: "lg",
|
878
872
|
p: "5",
|
879
|
-
textSize: "sm"
|
873
|
+
textSize: "sm",
|
874
|
+
shadow: true
|
880
875
|
}, props, {
|
881
876
|
children: [title && jsx(PageSectionTitle$1, {
|
882
877
|
children: title
|
@@ -1148,44 +1143,51 @@ function Internal({
|
|
1148
1143
|
item: item,
|
1149
1144
|
isLoading: mutation.isLoading,
|
1150
1145
|
trackingRef: containerRef === null || containerRef === void 0 ? void 0 : containerRef.current
|
1151
|
-
}),
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
children:
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1146
|
+
}), jsx("div", {
|
1147
|
+
p: "5",
|
1148
|
+
bgColor: "slate-100",
|
1149
|
+
rounded: "lg",
|
1150
|
+
children: jsxs(PageContainer, {
|
1151
|
+
w: editorMaxW ? "auto" : "full",
|
1152
|
+
size: "x2",
|
1153
|
+
id: "pagecontainer",
|
1154
|
+
children: [header, jsxs("div", {
|
1159
1155
|
dflex: true,
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1156
|
+
gap: "5",
|
1157
|
+
children: [jsxs("div", {
|
1158
|
+
dflex: true,
|
1159
|
+
flexCol: true,
|
1160
|
+
gap: "8",
|
1161
|
+
flexGrow: true,
|
1162
|
+
children: [(editor === null || editor === void 0 ? void 0 : editor.type) != "textarea" &&
|
1163
|
+
// TODO Find a way to make this editor shrink in width when resizing the window...
|
1164
|
+
jsx(PageContentEditor, {
|
1165
|
+
name: "content",
|
1166
|
+
maxW: editorMaxW,
|
1167
|
+
minW: "144",
|
1168
|
+
shadow: true,
|
1169
|
+
rounded: "lg"
|
1170
|
+
}), (editor === null || editor === void 0 ? void 0 : editor.type) == "textarea" && jsx(TextArea, {
|
1171
|
+
name: editor === null || editor === void 0 ? void 0 : editor.name,
|
1172
|
+
maxW: editorMaxW,
|
1173
|
+
minW: editorMaxW,
|
1174
|
+
w: editorMaxW,
|
1175
|
+
minH: "128",
|
1176
|
+
rows: 25,
|
1177
|
+
bgColor: "white",
|
1178
|
+
border: "0",
|
1179
|
+
shadow: true,
|
1180
|
+
p: "5",
|
1181
|
+
textColor: "slate-800"
|
1182
|
+
}), editoFooter]
|
1183
|
+
}), jsx(PageSidebar, {
|
1184
|
+
children: sections === null || sections === void 0 ? void 0 : sections.map((section, index) => jsx(Section, {
|
1185
|
+
section: section,
|
1186
|
+
item: item
|
1187
|
+
}, index))
|
1188
|
+
})]
|
1187
1189
|
})]
|
1188
|
-
})
|
1190
|
+
})
|
1189
1191
|
})]
|
1190
1192
|
});
|
1191
1193
|
}
|
@@ -1441,7 +1443,7 @@ function TableTopBar(_a) {
|
|
1441
1443
|
flexRow: true,
|
1442
1444
|
alignItems: "center",
|
1443
1445
|
gap: "3",
|
1444
|
-
p: "
|
1446
|
+
p: "8"
|
1445
1447
|
}, props, {
|
1446
1448
|
children: [title && jsx("h2", {
|
1447
1449
|
textSize: "x2",
|
@@ -1917,7 +1919,7 @@ function TableRowPublishPostButton$1(_a) {
|
|
1917
1919
|
return jsx(Button, Object.assign({
|
1918
1920
|
variant: "borderless",
|
1919
1921
|
corners: "square",
|
1920
|
-
scheme: "
|
1922
|
+
scheme: "dark",
|
1921
1923
|
onClick: publish
|
1922
1924
|
}, props, {
|
1923
1925
|
children: jsx(Icon, {
|
@@ -1941,10 +1943,6 @@ function TableRowActionsView({
|
|
1941
1943
|
alignItems: "stretch",
|
1942
1944
|
placeContent: "end",
|
1943
1945
|
h: "full",
|
1944
|
-
divideX: "1px",
|
1945
|
-
divideColor: "zinc-100",
|
1946
|
-
rounded: "lg",
|
1947
|
-
overflow: "hidden",
|
1948
1946
|
children: rowActions === null || rowActions === void 0 ? void 0 : rowActions.map((action, index) => jsxs(React.Fragment, {
|
1949
1947
|
children: [action.type === "publish" && jsx(TableRowPublishPostButton$1, {
|
1950
1948
|
id: item.id,
|
@@ -1979,11 +1977,11 @@ function ActionButton$1(_a) {
|
|
1979
1977
|
alignContent: "center",
|
1980
1978
|
placeContent: "center",
|
1981
1979
|
py: "2.5",
|
1982
|
-
px: "
|
1980
|
+
px: "3",
|
1983
1981
|
h: "full",
|
1984
1982
|
size: "lg",
|
1985
1983
|
variant: "borderless",
|
1986
|
-
corners: "
|
1984
|
+
corners: "default",
|
1987
1985
|
onClick: handleClick
|
1988
1986
|
}, props));
|
1989
1987
|
}
|
@@ -1997,11 +1995,11 @@ const icons = {
|
|
1997
1995
|
};
|
1998
1996
|
const schemes$1 = {
|
1999
1997
|
"link": "dark",
|
2000
|
-
"view": "
|
2001
|
-
"edit": "
|
2002
|
-
"delete": "
|
2003
|
-
"publish": "
|
2004
|
-
"custom": "
|
1998
|
+
"view": "dark",
|
1999
|
+
"edit": "dark",
|
2000
|
+
"delete": "dark",
|
2001
|
+
"publish": "dark",
|
2002
|
+
"custom": "dark"
|
2005
2003
|
};
|
2006
2004
|
|
2007
2005
|
function useTableProps(api, table, rowActions) {
|
@@ -2618,8 +2616,7 @@ function TableWrapper({
|
|
2618
2616
|
};
|
2619
2617
|
}, [subtitle]);
|
2620
2618
|
return jsx(Table, Object.assign({}, tableProps, {
|
2621
|
-
|
2622
|
-
py: "3",
|
2619
|
+
p: "8",
|
2623
2620
|
title: _subtitle
|
2624
2621
|
}));
|
2625
2622
|
}
|
@@ -2637,8 +2634,8 @@ function useQueries(queries) {
|
|
2637
2634
|
isFetching,
|
2638
2635
|
isError
|
2639
2636
|
} = useApiQueries(queries.map(q => {
|
2640
|
-
if (!q.queryField
|
2641
|
-
const _api = q.api;
|
2637
|
+
if (!q.queryField) {
|
2638
|
+
const _api = runIfFn(q.api);
|
2642
2639
|
return {
|
2643
2640
|
queryKey: _api.queryKey,
|
2644
2641
|
queryFn: q.fn == "get" ? _api.get : _api.getAll,
|
@@ -3250,11 +3247,9 @@ function TableRowNavigateButton(_a) {
|
|
3250
3247
|
navigate(`${path}`);
|
3251
3248
|
}, [navigate, path]);
|
3252
3249
|
return jsx(Button, Object.assign({
|
3253
|
-
scheme: "
|
3254
|
-
w: "10",
|
3255
|
-
h: "10",
|
3250
|
+
scheme: "dark",
|
3256
3251
|
variant: "borderless",
|
3257
|
-
corners: "
|
3252
|
+
corners: "square",
|
3258
3253
|
onClick: handleClick
|
3259
3254
|
}, props, {
|
3260
3255
|
children: jsx(Icon, {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
3
|
-
interface InvalidateButtonProps extends
|
2
|
+
import { IconButtonProps } from "@valerya/ui";
|
3
|
+
interface InvalidateButtonProps extends Omit<IconButtonProps, "icon"> {
|
4
4
|
pathOrPermalink: string;
|
5
5
|
}
|
6
6
|
export declare function InvalidateButton({ pathOrPermalink, ...props }: InvalidateButtonProps): JSX.Element;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
3
|
-
export declare function ViewButton({ path, icon, ...props }: {
|
2
|
+
import { IconButtonProps } from "@valerya/ui";
|
3
|
+
export declare function ViewButton({ path, icon, ...props }: Omit<IconButtonProps, "icon"> & {
|
4
4
|
path: string;
|
5
5
|
icon?: string;
|
6
|
-
}
|
6
|
+
}): JSX.Element;
|