@miso.ai/client-sdk-ui 1.9.0-beta.4 → 1.9.0-beta.6
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.
|
@@ -42,6 +42,9 @@ class AskCombo extends _base.default {
|
|
|
42
42
|
return this._elements;
|
|
43
43
|
}
|
|
44
44
|
async _start() {
|
|
45
|
+
await (0, _commons.waitForDomContentLoaded)();
|
|
46
|
+
await this.MisoClient.cmdDone;
|
|
47
|
+
|
|
45
48
|
// setup MisoClient
|
|
46
49
|
await this._setupMisoClient();
|
|
47
50
|
|
|
@@ -49,7 +52,7 @@ class AskCombo extends _base.default {
|
|
|
49
52
|
this._renderRootContent();
|
|
50
53
|
|
|
51
54
|
// create client instance
|
|
52
|
-
|
|
55
|
+
this._createClientInstance();
|
|
53
56
|
|
|
54
57
|
// setup workflows
|
|
55
58
|
this._setupWorkflows();
|
|
@@ -94,7 +97,6 @@ class AskCombo extends _base.default {
|
|
|
94
97
|
this._elements = new _elements.default(element);
|
|
95
98
|
}
|
|
96
99
|
async _createClientInstance() {
|
|
97
|
-
await this.MisoClient.cmdDone;
|
|
98
100
|
this._client = new MisoClient(this.resolvedOptions);
|
|
99
101
|
}
|
|
100
102
|
async _setupWorkflows() {
|
|
@@ -21,8 +21,8 @@ const root = options => `
|
|
|
21
21
|
<div id="${_constants.PREFIX}__follow-ups" class="${_constants.PREFIX}__follow-ups">
|
|
22
22
|
</div>
|
|
23
23
|
<section id="${_constants.PREFIX}__related-resources" class="${_constants.PREFIX}__section ${_constants.PREFIX}__related-resources">
|
|
24
|
-
<miso-ask visible-when="
|
|
25
|
-
<h2 class="${_constants.PREFIX}__related-resources-phrase"></h2>
|
|
24
|
+
<miso-ask visible-when="nonempty" logo="true">
|
|
25
|
+
<h2 class="${_constants.PREFIX}__phrase ${_constants.PREFIX}__related-resources-phrase"></h2>
|
|
26
26
|
<miso-related-resources></miso-related-resources>
|
|
27
27
|
</miso-ask>
|
|
28
28
|
</section>
|
|
@@ -35,7 +35,7 @@ const followUp = (options, _ref) => {
|
|
|
35
35
|
return `
|
|
36
36
|
<section class="${_constants.PREFIX}__section ${_constants.PREFIX}__follow-up">
|
|
37
37
|
<miso-ask class="${_constants.PREFIX}__query-suggestions-container" visible-when="nonempty" parent-question-id="${parentQuestionId}">
|
|
38
|
-
<h3 class="${_constants.PREFIX}__related-questions-phrase"></h3>
|
|
38
|
+
<h3 class="${_constants.PREFIX}__phrase ${_constants.PREFIX}__related-questions-phrase"></h3>
|
|
39
39
|
<miso-query-suggestions></miso-query-suggestions>
|
|
40
40
|
</miso-ask>
|
|
41
41
|
<miso-ask class="${_constants.PREFIX}__query-container" visible-when="initial loading" parent-question-id="${parentQuestionId}">
|
|
@@ -61,7 +61,7 @@ const answer = function (options) {
|
|
|
61
61
|
return `
|
|
62
62
|
${openTag}
|
|
63
63
|
${parentQuestionId ? '<hr>' : ''}
|
|
64
|
-
<div class="${_constants.PREFIX}__question-phrase"></div>
|
|
64
|
+
<div class="${_constants.PREFIX}__phrase ${_constants.PREFIX}__question-phrase"></div>
|
|
65
65
|
<miso-question></miso-question>
|
|
66
66
|
<miso-answer></miso-answer>
|
|
67
67
|
<miso-feedback></miso-feedback>
|
|
@@ -79,7 +79,7 @@ const sources = function (options) {
|
|
|
79
79
|
return `
|
|
80
80
|
${openTag}
|
|
81
81
|
<hr>
|
|
82
|
-
<h3 class="${_constants.PREFIX}__sources-phrase"></h3>
|
|
82
|
+
<h3 class="${_constants.PREFIX}__phrase ${_constants.PREFIX}__sources-phrase"></h3>
|
|
83
83
|
<miso-sources></miso-sources>
|
|
84
84
|
${closeTag}
|
|
85
85
|
`.trim();
|
package/dist/cjs/version.js
CHANGED
package/package.json
CHANGED
package/src/combo/ask/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineValues } from '@miso.ai/commons';
|
|
1
|
+
import { defineValues, waitForDomContentLoaded } from '@miso.ai/commons';
|
|
2
2
|
import { fields } from '../../actor/index.js';
|
|
3
3
|
import { ROLE } from '../../constants.js';
|
|
4
4
|
import Combo from '../base.js';
|
|
@@ -41,6 +41,9 @@ export default class AskCombo extends Combo {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
async _start() {
|
|
44
|
+
await waitForDomContentLoaded();
|
|
45
|
+
await this.MisoClient.cmdDone;
|
|
46
|
+
|
|
44
47
|
// setup MisoClient
|
|
45
48
|
await this._setupMisoClient();
|
|
46
49
|
|
|
@@ -48,7 +51,7 @@ export default class AskCombo extends Combo {
|
|
|
48
51
|
this._renderRootContent();
|
|
49
52
|
|
|
50
53
|
// create client instance
|
|
51
|
-
|
|
54
|
+
this._createClientInstance();
|
|
52
55
|
|
|
53
56
|
// setup workflows
|
|
54
57
|
this._setupWorkflows();
|
|
@@ -87,7 +90,6 @@ export default class AskCombo extends Combo {
|
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
async _createClientInstance() {
|
|
90
|
-
await this.MisoClient.cmdDone;
|
|
91
93
|
this._client = new MisoClient(this.resolvedOptions);
|
|
92
94
|
}
|
|
93
95
|
|
|
@@ -16,8 +16,8 @@ export const root = (options) => `
|
|
|
16
16
|
<div id="${PREFIX}__follow-ups" class="${PREFIX}__follow-ups">
|
|
17
17
|
</div>
|
|
18
18
|
<section id="${PREFIX}__related-resources" class="${PREFIX}__section ${PREFIX}__related-resources">
|
|
19
|
-
<miso-ask visible-when="
|
|
20
|
-
<h2 class="${PREFIX}__related-resources-phrase"></h2>
|
|
19
|
+
<miso-ask visible-when="nonempty" logo="true">
|
|
20
|
+
<h2 class="${PREFIX}__phrase ${PREFIX}__related-resources-phrase"></h2>
|
|
21
21
|
<miso-related-resources></miso-related-resources>
|
|
22
22
|
</miso-ask>
|
|
23
23
|
</section>
|
|
@@ -26,7 +26,7 @@ export const root = (options) => `
|
|
|
26
26
|
export const followUp = (options, { parentQuestionId }) => `
|
|
27
27
|
<section class="${PREFIX}__section ${PREFIX}__follow-up">
|
|
28
28
|
<miso-ask class="${PREFIX}__query-suggestions-container" visible-when="nonempty" parent-question-id="${parentQuestionId}">
|
|
29
|
-
<h3 class="${PREFIX}__related-questions-phrase"></h3>
|
|
29
|
+
<h3 class="${PREFIX}__phrase ${PREFIX}__related-questions-phrase"></h3>
|
|
30
30
|
<miso-query-suggestions></miso-query-suggestions>
|
|
31
31
|
</miso-ask>
|
|
32
32
|
<miso-ask class="${PREFIX}__query-container" visible-when="initial loading" parent-question-id="${parentQuestionId}">
|
|
@@ -44,7 +44,7 @@ export const answer = (options, { parentQuestionId } = {}) => {
|
|
|
44
44
|
return `
|
|
45
45
|
${openTag}
|
|
46
46
|
${ parentQuestionId ? '<hr>' : '' }
|
|
47
|
-
<div class="${PREFIX}__question-phrase"></div>
|
|
47
|
+
<div class="${PREFIX}__phrase ${PREFIX}__question-phrase"></div>
|
|
48
48
|
<miso-question></miso-question>
|
|
49
49
|
<miso-answer></miso-answer>
|
|
50
50
|
<miso-feedback></miso-feedback>
|
|
@@ -59,7 +59,7 @@ export const sources = (options, { parentQuestionId } = {}) => {
|
|
|
59
59
|
return `
|
|
60
60
|
${openTag}
|
|
61
61
|
<hr>
|
|
62
|
-
<h3 class="${PREFIX}__sources-phrase"></h3>
|
|
62
|
+
<h3 class="${PREFIX}__phrase ${PREFIX}__sources-phrase"></h3>
|
|
63
63
|
<miso-sources></miso-sources>
|
|
64
64
|
${closeTag}
|
|
65
65
|
`.trim();
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.9.0-beta.
|
|
1
|
+
export default '1.9.0-beta.6';
|