@edifice.io/react 2.2.11-develop-pedago.20250710120949 → 2.2.11-develop-pedago.20250710182455
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/dist/components/Flex/Flex.js +1 -1
- package/dist/components/Tabs/components/Tabs.d.ts +8 -4
- package/dist/components/Tabs/components/Tabs.js +4 -3
- package/dist/components/Tabs/components/TabsList.js +5 -5
- package/dist/components/Tabs/components/TabsPanel.d.ts +5 -1
- package/dist/components/Tabs/components/TabsPanel.js +4 -3
- package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/ResourceModal.js +4 -4
- package/package.json +6 -6
|
@@ -34,15 +34,19 @@ export interface TabsProps {
|
|
|
34
34
|
*/
|
|
35
35
|
stickyTop?: number;
|
|
36
36
|
/**
|
|
37
|
-
* Additional class
|
|
37
|
+
* Additional class name for the tab header
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
headerClassName?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Additional class name for the content area
|
|
42
|
+
*/
|
|
43
|
+
contentClassName?: string;
|
|
40
44
|
}
|
|
41
45
|
/**
|
|
42
46
|
* Tab Content displayed one at a time when a Tab Item is selected
|
|
43
47
|
*/
|
|
44
48
|
export declare const Tabs: {
|
|
45
|
-
({ defaultId, items, fullWidth, fullHeight, onChange, children, isSticky, stickyTop,
|
|
49
|
+
({ defaultId, items, fullWidth, fullHeight, onChange, children, isSticky, stickyTop, headerClassName, contentClassName, }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
46
50
|
Item: {
|
|
47
51
|
({ icon, badge, label, id, order, }: TabsItemProps & {
|
|
48
52
|
order: number;
|
|
@@ -50,7 +54,7 @@ export declare const Tabs: {
|
|
|
50
54
|
displayName: string;
|
|
51
55
|
};
|
|
52
56
|
Panel: {
|
|
53
|
-
({ children, currentItem, fullHeight }: import('./TabsPanel').TabsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
({ children, currentItem, fullHeight, className, }: import('./TabsPanel').TabsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
54
58
|
displayName: string;
|
|
55
59
|
};
|
|
56
60
|
List: {
|
|
@@ -14,7 +14,8 @@ const Tabs = ({
|
|
|
14
14
|
children,
|
|
15
15
|
isSticky = !1,
|
|
16
16
|
stickyTop = 0,
|
|
17
|
-
|
|
17
|
+
headerClassName,
|
|
18
|
+
contentClassName
|
|
18
19
|
}) => {
|
|
19
20
|
const {
|
|
20
21
|
activeTab,
|
|
@@ -37,8 +38,8 @@ const Tabs = ({
|
|
|
37
38
|
onKeyDown
|
|
38
39
|
}), [activeTab, items, onKeyDown, setSelectedTab, tabUnderlineLeft, tabUnderlineWidth, tabsRef]), currentItem = items.find((item) => item.id === activeTab);
|
|
39
40
|
return /* @__PURE__ */ jsx(TabsContext.Provider, { value, children: typeof children == "function" ? children(currentItem) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
40
|
-
/* @__PURE__ */ jsx(Tabs.List, { fullWidth, isSticky, stickyTop, className }),
|
|
41
|
-
/* @__PURE__ */ jsx(Tabs.Panel, { currentItem, fullHeight, children: currentItem == null ? void 0 : currentItem.content })
|
|
41
|
+
/* @__PURE__ */ jsx(Tabs.List, { fullWidth, isSticky, stickyTop, className: headerClassName }),
|
|
42
|
+
/* @__PURE__ */ jsx(Tabs.Panel, { currentItem, fullHeight, className: contentClassName, children: currentItem == null ? void 0 : currentItem.content })
|
|
42
43
|
] }) });
|
|
43
44
|
};
|
|
44
45
|
Tabs.Item = TabsItem;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { useTabsContext } from "../context/TabsContext.js";
|
|
4
4
|
import { Tabs } from "./Tabs.js";
|
|
@@ -19,15 +19,15 @@ const TabsList = (props) => {
|
|
|
19
19
|
"position-sticky z-1": isSticky,
|
|
20
20
|
"position-relative": !isSticky
|
|
21
21
|
}, className);
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsx("div", { className: tabslist, ...restProps, style: isSticky ? {
|
|
23
23
|
top: stickyTop
|
|
24
|
-
} : void 0, children: [
|
|
25
|
-
|
|
24
|
+
} : void 0, children: /* @__PURE__ */ jsxs("ul", { className: ulClasses, role: "tablist", children: [
|
|
25
|
+
items.map((item, order) => /* @__PURE__ */ jsx(Tabs.Item, { order, ...item }, item.id)),
|
|
26
26
|
/* @__PURE__ */ jsx("span", { className: "nav-slide", style: {
|
|
27
27
|
left: tabUnderlineLeft,
|
|
28
28
|
width: tabUnderlineWidth
|
|
29
29
|
} })
|
|
30
|
-
] });
|
|
30
|
+
] }) });
|
|
31
31
|
};
|
|
32
32
|
export {
|
|
33
33
|
TabsList as default
|
|
@@ -13,9 +13,13 @@ export interface TabsPanelProps {
|
|
|
13
13
|
* Whether tabs should take full available height
|
|
14
14
|
*/
|
|
15
15
|
fullHeight?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Additional class name for the content area
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
16
20
|
}
|
|
17
21
|
declare const TabsPanel: {
|
|
18
|
-
({ children, currentItem, fullHeight }: TabsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
({ children, currentItem, fullHeight, className, }: TabsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
19
23
|
displayName: string;
|
|
20
24
|
};
|
|
21
25
|
export default TabsPanel;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTabsContext } from "../context/TabsContext.js";
|
|
3
2
|
import clsx from "clsx";
|
|
3
|
+
import { useTabsContext } from "../context/TabsContext.js";
|
|
4
4
|
const TabsPanel = ({
|
|
5
5
|
children,
|
|
6
6
|
currentItem,
|
|
7
|
-
fullHeight
|
|
7
|
+
fullHeight,
|
|
8
|
+
className
|
|
8
9
|
}) => {
|
|
9
10
|
const {
|
|
10
11
|
activeTab
|
|
11
12
|
} = useTabsContext(), contentClasses = clsx("tab-content d-flex flex-fill w-100", {
|
|
12
13
|
"position-relative h-100": fullHeight
|
|
13
|
-
});
|
|
14
|
+
}, className);
|
|
14
15
|
return /* @__PURE__ */ jsx("div", { className: contentClasses, children: /* @__PURE__ */ jsx("div", { className: `tab-pane flex-fill w-100 fade ${activeTab === (currentItem == null ? void 0 : currentItem.id) ? "show active" : ""}`, id: `tabpanel-${currentItem == null ? void 0 : currentItem.id}`, role: "tabpanel", "aria-labelledby": `tab-${currentItem == null ? void 0 : currentItem.id}`, tabIndex: 0, children }) });
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
@@ -47,7 +47,7 @@ interface BaseProps {
|
|
|
47
47
|
/** Maximum length for the description textarea */
|
|
48
48
|
textareaMaxLength?: number;
|
|
49
49
|
/** Callback when operation succeeds, with operation result as parameter */
|
|
50
|
-
onSuccess: (result: CreateResult | UpdateResult) => void;
|
|
50
|
+
onSuccess: (result: CreateResult | UpdateResult, param: CreateParameters | UpdateParameters) => void;
|
|
51
51
|
/** Callback when operation is cancelled */
|
|
52
52
|
onCancel: () => void;
|
|
53
53
|
/** Override application code (uses EdificeClient context by default) */
|
|
@@ -77,7 +77,7 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
|
|
|
77
77
|
slug: formData.enablePublic && formData.formSlug || "",
|
|
78
78
|
thumbnail
|
|
79
79
|
};
|
|
80
|
-
let result;
|
|
80
|
+
let result, param;
|
|
81
81
|
if (isCreating) {
|
|
82
82
|
const createParams = {
|
|
83
83
|
...data,
|
|
@@ -85,14 +85,14 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
|
|
|
85
85
|
((_a2 = props.currentFolder) == null ? void 0 : _a2.id) === "default" ? void 0 : parseInt(((_b2 = props.currentFolder) == null ? void 0 : _b2.id) || ""),
|
|
86
86
|
application
|
|
87
87
|
};
|
|
88
|
-
props.createResource ? result = await props.createResource.mutateAsync(createParams) : result = await odeServices.resource(application).create(createParams);
|
|
88
|
+
param = createParams, props.createResource ? result = await props.createResource.mutateAsync(createParams) : result = await odeServices.resource(application).create(createParams);
|
|
89
89
|
} else {
|
|
90
90
|
const updateParams = {
|
|
91
91
|
...data,
|
|
92
92
|
entId: resource.assetId,
|
|
93
93
|
trashed: resource.trashed
|
|
94
94
|
};
|
|
95
|
-
props.updateResource ? result = await props.updateResource.mutateAsync(updateParams) : result = await odeServices.resource(application).update(updateParams);
|
|
95
|
+
param = updateParams, props.updateResource ? result = await props.updateResource.mutateAsync(updateParams) : result = await odeServices.resource(application).update(updateParams);
|
|
96
96
|
}
|
|
97
97
|
toast.success(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
98
98
|
/* @__PURE__ */ jsx("strong", { children: t(isCreating ? "explorer.resource.created" : "explorer.resource.updated") }),
|
|
@@ -110,7 +110,7 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
|
|
|
110
110
|
"Public:",
|
|
111
111
|
formData.enablePublic ? t("explorer.enable.public.yes") : t("explorer.enable.public.no")
|
|
112
112
|
] })
|
|
113
|
-
] })), onSuccess(result);
|
|
113
|
+
] })), onSuccess(result, param);
|
|
114
114
|
} catch (e) {
|
|
115
115
|
console.error(e);
|
|
116
116
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.2.11-develop-pedago.
|
|
3
|
+
"version": "2.2.11-develop-pedago.20250710182455",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -130,9 +130,9 @@
|
|
|
130
130
|
"react-slugify": "^3.0.3",
|
|
131
131
|
"swiper": "^10.1.0",
|
|
132
132
|
"ua-parser-js": "^1.0.36",
|
|
133
|
-
"@edifice.io/bootstrap": "2.2.11-develop-pedago.
|
|
134
|
-
"@edifice.io/tiptap-extensions": "2.2.11-develop-pedago.
|
|
135
|
-
"@edifice.io/utilities": "2.2.11-develop-pedago.
|
|
133
|
+
"@edifice.io/bootstrap": "2.2.11-develop-pedago.20250710182455",
|
|
134
|
+
"@edifice.io/tiptap-extensions": "2.2.11-develop-pedago.20250710182455",
|
|
135
|
+
"@edifice.io/utilities": "2.2.11-develop-pedago.20250710182455"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
138
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -163,8 +163,8 @@
|
|
|
163
163
|
"vite": "^5.4.11",
|
|
164
164
|
"vite-plugin-dts": "^4.1.0",
|
|
165
165
|
"vite-tsconfig-paths": "^5.0.1",
|
|
166
|
-
"@edifice.io/client": "2.2.11-develop-pedago.
|
|
167
|
-
"@edifice.io/config": "2.2.11-develop-pedago.
|
|
166
|
+
"@edifice.io/client": "2.2.11-develop-pedago.20250710182455",
|
|
167
|
+
"@edifice.io/config": "2.2.11-develop-pedago.20250710182455"
|
|
168
168
|
},
|
|
169
169
|
"peerDependencies": {
|
|
170
170
|
"@react-spring/web": "^9.7.5",
|