charon-conversation-editor 0.0.30 → 0.0.32
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.js +12 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -34810,10 +34810,10 @@ async function migrateSchema(schema, dataSource) {
|
|
|
34810
34810
|
dataSource.import(
|
|
34811
34811
|
// documents
|
|
34812
34812
|
importDocuments,
|
|
34813
|
-
// type of documents to import = Schema
|
|
34814
|
-
["Schema"],
|
|
34815
34813
|
// import mode
|
|
34816
34814
|
ImportMode.createAndUpdate,
|
|
34815
|
+
// type of documents to import = Schema
|
|
34816
|
+
["Schema"],
|
|
34817
34817
|
// languages = all
|
|
34818
34818
|
void 0,
|
|
34819
34819
|
// validation options = default for creation/updating
|
|
@@ -34884,7 +34884,16 @@ function SchemaValidationResult({ documentControl }) {
|
|
|
34884
34884
|
const migrateSchemaHandler = reactExports.useCallback(() => {
|
|
34885
34885
|
setMigrateIsPending(true);
|
|
34886
34886
|
setMigrationError("");
|
|
34887
|
-
migrateSchema(documentControl.schema, dataService).
|
|
34887
|
+
migrateSchema(documentControl.schema, dataService).then(
|
|
34888
|
+
() => {
|
|
34889
|
+
window.location.reload();
|
|
34890
|
+
console.log(`Successfully migrated ${documentControl.schema.displayName} schema.`);
|
|
34891
|
+
},
|
|
34892
|
+
(error) => {
|
|
34893
|
+
setMigrationError(String(error));
|
|
34894
|
+
console.error(error);
|
|
34895
|
+
}
|
|
34896
|
+
).finally(() => setMigrateIsPending(false));
|
|
34888
34897
|
}, [dataService, documentControl]);
|
|
34889
34898
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ext-ce-schema-validation-container", children: [
|
|
34890
34899
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ext-ce-validation-header", children: [
|
package/package.json
CHANGED