goblin-magic 1.9.2 → 1.9.5
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/package.json
CHANGED
|
@@ -341,7 +341,7 @@ class MagicInputNC extends Widget {
|
|
|
341
341
|
Component = EditableDiv;
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
if (this.props.emojiPicker) {
|
|
344
|
+
if (this.props.emojiPicker && !this.props.disabled) {
|
|
345
345
|
return (
|
|
346
346
|
<>
|
|
347
347
|
<div className={this.styles.classNames.withEmoji + ' ' + className}>
|
|
@@ -40,6 +40,7 @@ class ViewStateShape {
|
|
|
40
40
|
widgetProps = option(object);
|
|
41
41
|
highlighted = boolean;
|
|
42
42
|
parentViewId = option(id);
|
|
43
|
+
tabId = option(id); //used when we restore a tab
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
class ViewState extends Sculpt(ViewStateShape) {}
|
|
@@ -62,6 +63,7 @@ class ViewState extends Sculpt(ViewStateShape) {}
|
|
|
62
63
|
* @property {string} [View.widget]
|
|
63
64
|
* @property {object} [View.widgetProps]
|
|
64
65
|
* @property {View} [View.previousView]
|
|
66
|
+
* @property {string} [View.tabId]
|
|
65
67
|
*/
|
|
66
68
|
|
|
67
69
|
/**
|
|
@@ -73,6 +75,7 @@ class ViewState extends Sculpt(ViewStateShape) {}
|
|
|
73
75
|
* @property {string} [View.widget]
|
|
74
76
|
* @property {object} [View.widgetProps]
|
|
75
77
|
* @property {View} [View.previousView]
|
|
78
|
+
* @property {string} [View.tabId]
|
|
76
79
|
*/
|
|
77
80
|
|
|
78
81
|
/**
|
|
@@ -658,12 +661,13 @@ class MagicNavigation extends Elf {
|
|
|
658
661
|
* @param {string} [options.cancelLabel]
|
|
659
662
|
* @param {string} [options.initialValue]
|
|
660
663
|
* @param {boolean} [options.withTranscription]
|
|
664
|
+
* @param {string} [options.type] field type
|
|
661
665
|
* @returns {Promise<string>}
|
|
662
666
|
*/
|
|
663
667
|
async prompt(
|
|
664
668
|
parentId,
|
|
665
669
|
prompt,
|
|
666
|
-
{advice, okLabel, cancelLabel, initialValue, withTranscription} = {}
|
|
670
|
+
{advice, okLabel, cancelLabel, initialValue, withTranscription, type} = {}
|
|
667
671
|
) {
|
|
668
672
|
const dialogId = await this.openDialog(
|
|
669
673
|
{
|
|
@@ -675,6 +679,7 @@ class MagicNavigation extends Elf {
|
|
|
675
679
|
cancelLabel,
|
|
676
680
|
initialValue,
|
|
677
681
|
withTranscription,
|
|
682
|
+
type,
|
|
678
683
|
},
|
|
679
684
|
},
|
|
680
685
|
parentId
|
|
@@ -759,7 +764,7 @@ class MagicNavigation extends Elf {
|
|
|
759
764
|
})();
|
|
760
765
|
panelId = window.panelIds[newPanelIndex];
|
|
761
766
|
}
|
|
762
|
-
const tabId = `tab@${this.quest.uuidV4()}`;
|
|
767
|
+
const tabId = view.tabId || `tab@${this.quest.uuidV4()}`;
|
|
763
768
|
const serviceId = await this._createService(view);
|
|
764
769
|
const tab = {
|
|
765
770
|
serviceId,
|
|
@@ -1129,7 +1134,10 @@ class MagicNavigation extends Elf {
|
|
|
1129
1134
|
if (!view) {
|
|
1130
1135
|
throw new Error(`Missing view for tab '${tabId}'`);
|
|
1131
1136
|
}
|
|
1132
|
-
|
|
1137
|
+
//Ensure new view infos without tabId
|
|
1138
|
+
const viewCopy = {...view};
|
|
1139
|
+
delete viewCopy.tabId;
|
|
1140
|
+
await this.openNewTab(viewCopy, windowId, panelId);
|
|
1133
1141
|
}
|
|
1134
1142
|
|
|
1135
1143
|
/**
|