@edifice.io/react 2.2.11-develop-pedago.20250710171345 → 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.
|
@@ -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",
|