@ones-editor/editor 2.1.7-beta.1 → 2.1.7-beta.2

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/index.js CHANGED
@@ -74344,7 +74344,7 @@ ${content}
74344
74344
  }
74345
74345
  getVersionItemByVersionNum(version) {
74346
74346
  const versionItem = Array.from(this.versionsList.children).find(
74347
- (e2) => e2.versionData.version === version
74347
+ (e2) => e2.versionData.version.toString() === `${version}`
74348
74348
  );
74349
74349
  if (this.isVersionElement(versionItem)) {
74350
74350
  return versionItem;
@@ -75404,15 +75404,16 @@ ${content}
75404
75404
  assert(logger$r, this.versionList, "no versionList");
75405
75405
  if ((_a = this.versionOptions) == null ? void 0 : _a.initSelectedVersion) {
75406
75406
  const { initSelectedVersion: versionNumber } = this.versionOptions;
75407
- const version = this.versionList.selectVersionByVersionNum(versionNumber);
75408
- assert(logger$r, version, `version ${versionNumber} not found`);
75409
- this.viewVersion(version);
75410
- } else {
75411
- const version = this.versionList.activeVersion;
75412
- if (version) {
75413
- this.viewVersion(version);
75407
+ const version2 = this.versionList.selectVersionByVersionNum(versionNumber);
75408
+ if (version2) {
75409
+ this.viewVersion(version2);
75410
+ return;
75414
75411
  }
75415
75412
  }
75413
+ const version = this.versionList.activeVersion;
75414
+ if (version) {
75415
+ this.viewVersion(version);
75416
+ }
75416
75417
  }
75417
75418
  renderEditorLoading() {
75418
75419
  const { editorContainer } = this.components;
@@ -83940,7 +83941,7 @@ ${data2.flowchartText}
83940
83941
  }
83941
83942
  }
83942
83943
  });
83943
- editor.version = "2.1.7-beta.1";
83944
+ editor.version = "2.1.7-beta.2";
83944
83945
  if (Logger$2.level === LogLevel.DEBUG) {
83945
83946
  window.setReauthFail = (fail) => {
83946
83947
  window.isReauthError = fail;
@@ -84035,7 +84036,7 @@ ${data2.flowchartText}
84035
84036
  if (!clientType.isMobile) {
84036
84037
  OnesEditorToolbar.register(editor);
84037
84038
  }
84038
- editor.version = "2.1.7-beta.1";
84039
+ editor.version = "2.1.7-beta.2";
84039
84040
  return editor;
84040
84041
  }
84041
84042
  async function showDocVersions(editor, options, serverUrl) {
@@ -84092,7 +84093,7 @@ ${data2.flowchartText}
84092
84093
  const versionsProvider = new ShareDBDocVersionsProvider(editorOptions);
84093
84094
  const dialog = new OnesEditorVersionsDialog(doc2, versionsProvider);
84094
84095
  const dialogOptions = options.options || {
84095
- container: document.body
84096
+ container: parent
84096
84097
  };
84097
84098
  dialog.show(dialogOptions);
84098
84099
  return dialog;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.1.7-beta.1",
3
+ "version": "2.1.7-beta.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",