@simai-studio/chat 0.0.0-stage → 1.0.0
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/LICENSE.md +182 -0
- package/README.md +65 -2
- package/dist/package-receipt.json +1551 -0
- package/dist/set.json +105 -0
- package/dist/smart/chat-composer/aliases.json +56 -0
- package/dist/smart/chat-composer/aliases.json.gz +0 -0
- package/dist/smart/chat-composer/component.json +658 -0
- package/dist/smart/chat-composer/component.json.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.css +318 -0
- package/dist/smart/chat-composer/css/chat-composer.css.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css +2 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css.gz +0 -0
- package/dist/smart/chat-composer/examples.json +531 -0
- package/dist/smart/chat-composer/examples.json.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.js +1023 -0
- package/dist/smart/chat-composer/js/chat-composer.js.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js +75 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js.gz +0 -0
- package/dist/smart/chat-composer/lang/en.json +31 -0
- package/dist/smart/chat-composer/lang/en.json.gz +0 -0
- package/dist/smart/chat-composer/lang/ru.json +31 -0
- package/dist/smart/chat-composer/lang/ru.json.gz +0 -0
- package/dist/smart/chat-composer/probe.json +400 -0
- package/dist/smart/chat-composer/probe.json.gz +0 -0
- package/dist/smart/chat-composer/smart.manifest.json +625 -0
- package/dist/smart/chat-composer/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-composer/static/default/busy.html +20 -0
- package/dist/smart/chat-composer/static/default/busy.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/disabled.html +20 -0
- package/dist/smart/chat-composer/static/default/disabled.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/files.html +44 -0
- package/dist/smart/chat-composer/static/default/files.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/near-limit.html +20 -0
- package/dist/smart/chat-composer/static/default/near-limit.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/reference.html +20 -0
- package/dist/smart/chat-composer/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-composer/static/sheets.json +88 -0
- package/dist/smart/chat-composer/static/sheets.json.gz +0 -0
- package/dist/smart/chat-composer/studio.fixture.json +18 -0
- package/dist/smart/chat-composer/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-composer/studio.scenario.json +37 -0
- package/dist/smart/chat-composer/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-composer/template/default.css +273 -0
- package/dist/smart/chat-composer/template/default.css.gz +0 -0
- package/dist/smart/chat-composer/template/default.js +109 -0
- package/dist/smart/chat-composer/template/default.js.gz +0 -0
- package/dist/smart/chat-composer/template/parts.js +82 -0
- package/dist/smart/chat-composer/template/parts.js.gz +0 -0
- package/dist/smart/chat-interlocutor/aliases.json +20 -0
- package/dist/smart/chat-interlocutor/aliases.json.gz +0 -0
- package/dist/smart/chat-interlocutor/component.json +435 -0
- package/dist/smart/chat-interlocutor/component.json.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css +107 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css +2 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css.gz +0 -0
- package/dist/smart/chat-interlocutor/examples.json +379 -0
- package/dist/smart/chat-interlocutor/examples.json.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js +531 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js +22 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js.gz +0 -0
- package/dist/smart/chat-interlocutor/lang/en.json +13 -0
- package/dist/smart/chat-interlocutor/lang/en.json.gz +0 -0
- package/dist/smart/chat-interlocutor/lang/ru.json +13 -0
- package/dist/smart/chat-interlocutor/lang/ru.json.gz +0 -0
- package/dist/smart/chat-interlocutor/probe.json +204 -0
- package/dist/smart/chat-interlocutor/probe.json.gz +0 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json +406 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/former.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/former.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/single.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/single.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/sheets.json +105 -0
- package/dist/smart/chat-interlocutor/static/sheets.json.gz +0 -0
- package/dist/smart/chat-interlocutor/studio.fixture.json +25 -0
- package/dist/smart/chat-interlocutor/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-interlocutor/studio.scenario.json +41 -0
- package/dist/smart/chat-interlocutor/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.css +58 -0
- package/dist/smart/chat-interlocutor/template/default.css.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.js +43 -0
- package/dist/smart/chat-interlocutor/template/default.js.gz +0 -0
- package/dist/smart/chat-message/aliases.json +114 -0
- package/dist/smart/chat-message/aliases.json.gz +0 -0
- package/dist/smart/chat-message/component.json +822 -0
- package/dist/smart/chat-message/component.json.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.css +3291 -0
- package/dist/smart/chat-message/css/chat-message.css.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.min.css +2 -0
- package/dist/smart/chat-message/css/chat-message.min.css.gz +0 -0
- package/dist/smart/chat-message/examples.json +1604 -0
- package/dist/smart/chat-message/examples.json.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.js +5498 -0
- package/dist/smart/chat-message/js/chat-message.js.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.min.js +25 -0
- package/dist/smart/chat-message/js/chat-message.min.js.gz +0 -0
- package/dist/smart/chat-message/lang/en.json +181 -0
- package/dist/smart/chat-message/lang/en.json.gz +0 -0
- package/dist/smart/chat-message/lang/ru.json +185 -0
- package/dist/smart/chat-message/lang/ru.json.gz +0 -0
- package/dist/smart/chat-message/probe.json +1029 -0
- package/dist/smart/chat-message/probe.json.gz +0 -0
- package/dist/smart/chat-message/smart.manifest.json +814 -0
- package/dist/smart/chat-message/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-card.html +2 -0
- package/dist/smart/chat-message/static/default/brief-card.html.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-questions.html +2 -0
- package/dist/smart/chat-message/static/default/brief-questions.html.gz +0 -0
- package/dist/smart/chat-message/static/default/deliverables.html +2 -0
- package/dist/smart/chat-message/static/default/deliverables.html.gz +0 -0
- package/dist/smart/chat-message/static/default/document.html +13 -0
- package/dist/smart/chat-message/static/default/document.html.gz +0 -0
- package/dist/smart/chat-message/static/default/failed.html +2 -0
- package/dist/smart/chat-message/static/default/failed.html.gz +0 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html +2 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html.gz +0 -0
- package/dist/smart/chat-message/static/default/limit.html +2 -0
- package/dist/smart/chat-message/static/default/limit.html.gz +0 -0
- package/dist/smart/chat-message/static/default/proposal.html +42 -0
- package/dist/smart/chat-message/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-message/static/default/question.html +18 -0
- package/dist/smart/chat-message/static/default/question.html.gz +0 -0
- package/dist/smart/chat-message/static/default/reference.html +2 -0
- package/dist/smart/chat-message/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-message/static/default/steps.html +2 -0
- package/dist/smart/chat-message/static/default/steps.html.gz +0 -0
- package/dist/smart/chat-message/static/default/stopped.html +2 -0
- package/dist/smart/chat-message/static/default/stopped.html.gz +0 -0
- package/dist/smart/chat-message/static/default/waiting.html +2 -0
- package/dist/smart/chat-message/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-own.html +2 -0
- package/dist/smart/chat-message/static/person/person-own.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-reply.html +6 -0
- package/dist/smart/chat-message/static/person/person-reply.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person.html +14 -0
- package/dist/smart/chat-message/static/person/person.html.gz +0 -0
- package/dist/smart/chat-message/static/sheets.json +398 -0
- package/dist/smart/chat-message/static/sheets.json.gz +0 -0
- package/dist/smart/chat-message/studio.fixture.json +27 -0
- package/dist/smart/chat-message/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-message/studio.scenario.json +22 -0
- package/dist/smart/chat-message/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-message/template/default.css +1895 -0
- package/dist/smart/chat-message/template/default.css.gz +0 -0
- package/dist/smart/chat-message/template/default.js +27 -0
- package/dist/smart/chat-message/template/default.js.gz +0 -0
- package/dist/smart/chat-message/template/person.js +11 -0
- package/dist/smart/chat-message/template/person.js.gz +0 -0
- package/dist/smart/chat-threads/aliases.json +174 -0
- package/dist/smart/chat-threads/aliases.json.gz +0 -0
- package/dist/smart/chat-threads/component.json +1232 -0
- package/dist/smart/chat-threads/component.json.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.css +150 -0
- package/dist/smart/chat-threads/css/chat-threads.css.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css +2 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css.gz +0 -0
- package/dist/smart/chat-threads/examples.json +689 -0
- package/dist/smart/chat-threads/examples.json.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.js +859 -0
- package/dist/smart/chat-threads/js/chat-threads.js.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js +39 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js.gz +0 -0
- package/dist/smart/chat-threads/lang/en.json +18 -0
- package/dist/smart/chat-threads/lang/en.json.gz +0 -0
- package/dist/smart/chat-threads/lang/ru.json +18 -0
- package/dist/smart/chat-threads/lang/ru.json.gz +0 -0
- package/dist/smart/chat-threads/probe.json +406 -0
- package/dist/smart/chat-threads/probe.json.gz +0 -0
- package/dist/smart/chat-threads/smart.manifest.json +1152 -0
- package/dist/smart/chat-threads/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.html +139 -0
- package/dist/smart/chat-threads/static/default/activity.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html +139 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.html +55 -0
- package/dist/smart/chat-threads/static/default/archive.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html +55 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.html +104 -0
- package/dist/smart/chat-threads/static/default/avatars.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html +104 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/empty.html +48 -0
- package/dist/smart/chat-threads/static/default/empty.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/loading.html +48 -0
- package/dist/smart/chat-threads/static/default/loading.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.html +95 -0
- package/dist/smart/chat-threads/static/default/people.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html +95 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.html +114 -0
- package/dist/smart/chat-threads/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html +114 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html +94 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html +94 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/sheets.json +422 -0
- package/dist/smart/chat-threads/static/sheets.json.gz +0 -0
- package/dist/smart/chat-threads/studio.fixture.json +23 -0
- package/dist/smart/chat-threads/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-threads/template/default.css +113 -0
- package/dist/smart/chat-threads/template/default.css.gz +0 -0
- package/dist/smart/chat-threads/template/default.js +62 -0
- package/dist/smart/chat-threads/template/default.js.gz +0 -0
- package/dist/smart/chat-window/aliases.json +395 -0
- package/dist/smart/chat-window/aliases.json.gz +0 -0
- package/dist/smart/chat-window/component.json +2809 -0
- package/dist/smart/chat-window/component.json.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.css +1717 -0
- package/dist/smart/chat-window/css/chat-window.css.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.min.css +2 -0
- package/dist/smart/chat-window/css/chat-window.min.css.gz +0 -0
- package/dist/smart/chat-window/examples.json +2798 -0
- package/dist/smart/chat-window/examples.json.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.js +12382 -0
- package/dist/smart/chat-window/js/chat-window.js.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.min.js +1 -0
- package/dist/smart/chat-window/js/chat-window.min.js.gz +0 -0
- package/dist/smart/chat-window/lang/en.json +212 -0
- package/dist/smart/chat-window/lang/en.json.gz +0 -0
- package/dist/smart/chat-window/lang/ru.json +218 -0
- package/dist/smart/chat-window/lang/ru.json.gz +0 -0
- package/dist/smart/chat-window/probe.json +2023 -0
- package/dist/smart/chat-window/probe.json.gz +0 -0
- package/dist/smart/chat-window/smart.manifest.json +2835 -0
- package/dist/smart/chat-window/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-window/static/default/archived.html +97 -0
- package/dist/smart/chat-window/static/default/archived.html.gz +0 -0
- package/dist/smart/chat-window/static/default/embedded.html +119 -0
- package/dist/smart/chat-window/static/default/embedded.html.gz +0 -0
- package/dist/smart/chat-window/static/default/greeting.html +119 -0
- package/dist/smart/chat-window/static/default/greeting.html.gz +0 -0
- package/dist/smart/chat-window/static/default/people.html +110 -0
- package/dist/smart/chat-window/static/default/people.html.gz +0 -0
- package/dist/smart/chat-window/static/default/proposal.html +157 -0
- package/dist/smart/chat-window/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-window/static/default/reference.html +117 -0
- package/dist/smart/chat-window/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-window/static/default/waiting.html +117 -0
- package/dist/smart/chat-window/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-window/static/sheets.json +476 -0
- package/dist/smart/chat-window/static/sheets.json.gz +0 -0
- package/dist/smart/chat-window/studio.fixture.json +13 -0
- package/dist/smart/chat-window/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-window/studio.scenario.json +95 -0
- package/dist/smart/chat-window/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-window/template/default.css +1168 -0
- package/dist/smart/chat-window/template/default.css.gz +0 -0
- package/dist/smart/chat-window/template/default.js +12 -0
- package/dist/smart/chat-window/template/default.js.gz +0 -0
- package/dist/smart/rule.js +185 -0
- package/dist/smart/rule.js.gz +0 -0
- package/package.json +29 -4
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "sf-chat-interlocutor",
|
|
3
|
+
"probe": "sf-chat-interlocutor against component.json (standard simai.smart-component 1.3.9 §12, gate 20); the behaviour simai/ui-chat's tests/browser/staff.test.mjs holds for it: one interlocutor names it and offers no choice, two are a choice, an old thread with neither is «Помощник»",
|
|
4
|
+
"format": "stands/15-scenarios (A4 modal: a page, probes in steps); the runner is ui-source tests/browser/manifest-probes.browser.mjs, run for the package by scripts/run-manifest-probes.mjs",
|
|
5
|
+
"page": {
|
|
6
|
+
"lang": "ru",
|
|
7
|
+
"body": [
|
|
8
|
+
"<main>",
|
|
9
|
+
" <sf-chat-interlocutor id=\"two\" value=\"personal\"><script type=\"application/json\" data-sf-settings>{\"options\": [{\"id\": \"personal\", \"title\": \"Мой помощник\", \"kind\": \"personal\"}, {\"id\": \"shop\", \"title\": \"Поддержка магазина\", \"kind\": \"knowledge\"}]}</script></sf-chat-interlocutor>",
|
|
10
|
+
" <sf-chat-interlocutor id=\"one\" value=\"personal\"><script type=\"application/json\" data-sf-settings>{\"options\": [{\"id\": \"personal\", \"title\": \"Мой помощник\", \"kind\": \"personal\"}]}</script></sf-chat-interlocutor>",
|
|
11
|
+
" <sf-chat-interlocutor id=\"former\" value=\"admin\"><script type=\"application/json\" data-sf-settings>{\"options\": [{\"id\": \"personal\", \"title\": \"Мой помощник\", \"kind\": \"personal\"}]}</script></sf-chat-interlocutor>",
|
|
12
|
+
" <sf-chat-interlocutor id=\"many\" value=\"personal\"><script type=\"application/json\" data-sf-settings>{\"options\": [{\"id\": \"personal\", \"title\": \"Мой помощник\", \"kind\": \"personal\"}, {\"id\": \"base-1\", \"title\": \"База 1\", \"kind\": \"knowledge\"}, {\"id\": \"base-2\", \"title\": \"База 2\", \"kind\": \"knowledge\"}, {\"id\": \"base-3\", \"title\": \"База 3\", \"kind\": \"knowledge\"}, {\"id\": \"base-4\", \"title\": \"База 4\", \"kind\": \"knowledge\"}, {\"id\": \"base-5\", \"title\": \"База 5\", \"kind\": \"knowledge\"}, {\"id\": \"base-6\", \"title\": \"База 6\", \"kind\": \"knowledge\"}, {\"id\": \"base-7\", \"title\": \"База 7\", \"kind\": \"knowledge\"}, {\"id\": \"base-8\", \"title\": \"База 8\", \"kind\": \"knowledge\"}]}</script></sf-chat-interlocutor>",
|
|
13
|
+
" <sf-chat-interlocutor id=\"late\" value=\"personal\"></sf-chat-interlocutor>",
|
|
14
|
+
"</main>"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"probes": [
|
|
18
|
+
{
|
|
19
|
+
"id": "p1-two-is-a-choice",
|
|
20
|
+
"title": "two interlocutors: the button names the current one, is a closed menu button described by what a change does; a press opens the Framework's menu with two radio rows, the current one checked, the own and the knowledge base's under their headings and a closing heading that says a change starts a new conversation",
|
|
21
|
+
"covers": "settings.options, values.value, accessibility.name runtime.button-label, keyboard.host Enter open, actions.open",
|
|
22
|
+
"steps": [
|
|
23
|
+
{
|
|
24
|
+
"script": "(document.activeElement?.blur?.(), true)",
|
|
25
|
+
"wait": 60,
|
|
26
|
+
"check": "(() => { const b = document.querySelector('#two .sf-chat-interlocutor__button'); const note = document.getElementById(b.getAttribute('aria-describedby')); return b.getAttribute('aria-label') === 'Помощник: Мой помощник' && b.getAttribute('aria-haspopup') === 'menu' && b.getAttribute('aria-expanded') === 'false' && !b.disabled && note?.textContent === 'При смене помощника начнётся новый разговор' && note.classList.contains('sr-only') && b.querySelector('.sf-chat-interlocutor__title').textContent === 'Мой помощник'; })()"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"script": "(document.querySelector('#two .sf-chat-interlocutor__button').focus(), true)",
|
|
30
|
+
"wait": 60
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"user": "keyboard:Enter",
|
|
34
|
+
"wait": 500,
|
|
35
|
+
"check": "(() => { const rows = [...document.querySelectorAll('#two .sf-context-menu-item[role=menuitemradio]')]; return rows.length === 2 && rows[0].getAttribute('aria-checked') === 'true' && rows[1].getAttribute('aria-checked') === 'false' && rows[1].textContent.includes('Поддержка магазина') && document.querySelector('#two .sf-chat-interlocutor__button').getAttribute('aria-expanded') === 'true' && [...document.querySelectorAll('#two .sf-context-menu-heading')].map((one) => one.textContent.trim()).join('|') === 'Мои помощники|Помощники баз|При смене помощника начнётся новый разговор'; })()"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "p2-choice-is-select",
|
|
41
|
+
"title": "choosing another interlocutor sends sf-chat-interlocutor-select {id} once and the 0.3 name sf-chat-interlocutor once, noted with its dates; the element leaves value to the host",
|
|
42
|
+
"covers": "events.select, aliases sf-chat-interlocutor, values.value controlled",
|
|
43
|
+
"steps": [
|
|
44
|
+
{
|
|
45
|
+
"action": {
|
|
46
|
+
"name": "open"
|
|
47
|
+
},
|
|
48
|
+
"target": "#two",
|
|
49
|
+
"wait": 500,
|
|
50
|
+
"expect": {
|
|
51
|
+
"returns": {
|
|
52
|
+
"outcome": "applied"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"script": "([...document.querySelectorAll('#two .sf-context-menu-item[role=menuitemradio]')].find((row) => row.textContent.includes('Поддержка магазина')).click(), true)",
|
|
58
|
+
"expect": {
|
|
59
|
+
"events": [
|
|
60
|
+
{
|
|
61
|
+
"name": "sf-chat-interlocutor-select",
|
|
62
|
+
"count": 1,
|
|
63
|
+
"detail": {
|
|
64
|
+
"id": "shop"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "sf-chat-interlocutor",
|
|
69
|
+
"count": 1,
|
|
70
|
+
"detail": {
|
|
71
|
+
"id": "shop"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"journal": [
|
|
76
|
+
{
|
|
77
|
+
"from": "sf-chat-interlocutor",
|
|
78
|
+
"to": "sf-chat-interlocutor-select",
|
|
79
|
+
"since": "2026-10-28",
|
|
80
|
+
"remove_after": "2026-12-01"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"check": "document.querySelector('#two').value === 'personal'"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"script": "(document.querySelector('#two').value = 'shop', true)",
|
|
88
|
+
"wait": 200,
|
|
89
|
+
"check": "document.querySelector('#two .sf-chat-interlocutor__button').getAttribute('aria-label') === 'Помощник: Поддержка магазина'"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "p3-current-is-no-choice",
|
|
95
|
+
"title": "choosing the current interlocutor again sends nothing",
|
|
96
|
+
"covers": "events.select",
|
|
97
|
+
"steps": [
|
|
98
|
+
{
|
|
99
|
+
"action": {
|
|
100
|
+
"name": "open"
|
|
101
|
+
},
|
|
102
|
+
"target": "#two",
|
|
103
|
+
"wait": 500
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"script": "([...document.querySelectorAll('#two .sf-context-menu-item[role=menuitemradio]')].find((row) => row.textContent.includes('Мой помощник')).click(), true)",
|
|
107
|
+
"expect": {
|
|
108
|
+
"events": [
|
|
109
|
+
{
|
|
110
|
+
"name": "sf-chat-interlocutor-select",
|
|
111
|
+
"count": 0
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "sf-chat-interlocutor",
|
|
115
|
+
"count": 0
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": "p4-one-is-a-name",
|
|
124
|
+
"title": "one interlocutor: the header names it and offers no choice that does not exist -- a disabled button without aria-haspopup, aria-expanded or a description, the --single class, open refused single and no menu rows",
|
|
125
|
+
"covers": "actions.open refused single, accessibility.name",
|
|
126
|
+
"steps": [
|
|
127
|
+
{
|
|
128
|
+
"action": {
|
|
129
|
+
"name": "open"
|
|
130
|
+
},
|
|
131
|
+
"target": "#one",
|
|
132
|
+
"expect": {
|
|
133
|
+
"returns": {
|
|
134
|
+
"outcome": "refused",
|
|
135
|
+
"reason": "single"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"check": "(() => { const b = document.querySelector('#one .sf-chat-interlocutor__button'); return b.disabled && b.getAttribute('aria-label') === 'Помощник: Мой помощник' && !b.hasAttribute('aria-haspopup') && !b.hasAttribute('aria-expanded') && !b.hasAttribute('aria-describedby') && document.querySelector('#one .sf-chat-interlocutor--single') !== null && document.querySelectorAll('#one [role=menuitemradio]').length === 0; })()"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"id": "p5-former-is-assistant",
|
|
144
|
+
"title": "a conversation with an interlocutor the server no longer lists is named «Помощник», never an empty line or undefined",
|
|
145
|
+
"covers": "runtime.assistant-text",
|
|
146
|
+
"steps": [
|
|
147
|
+
{
|
|
148
|
+
"script": "true",
|
|
149
|
+
"wait": 60,
|
|
150
|
+
"check": "(() => { const b = document.querySelector('#former .sf-chat-interlocutor__button'); return b.querySelector('.sf-chat-interlocutor__title').textContent.trim() === 'Помощник' && b.getAttribute('aria-label') === 'Помощник' && !/undefined|null/.test(b.textContent); })()"
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"id": "p6-many-grouped-with-search",
|
|
156
|
+
"title": "from eight interlocutors the menu has its search «Найти помощника»; the person's own and the knowledge bases' go under their headings",
|
|
157
|
+
"covers": "settings.options kind knowledge, runtime.search-placeholder, runtime.group-own-text, runtime.group-knowledge-text",
|
|
158
|
+
"steps": [
|
|
159
|
+
{
|
|
160
|
+
"user": "click:#many .sf-chat-interlocutor__button",
|
|
161
|
+
"wait": 600,
|
|
162
|
+
"check": "(() => { const field = document.querySelector('#many .sf-context-menu-search-input'); const headings = [...document.querySelectorAll('#many .sf-context-menu-heading')].map((one) => one.textContent.trim()); return field?.getAttribute('placeholder') === 'Найти помощника' && headings.includes('Мои помощники') && headings.includes('Помощники баз') && document.querySelectorAll('#many [role=menuitemradio]').length === 9; })()"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "p7-set-options",
|
|
168
|
+
"title": "set-options, the 0.3 setOptions(list): no list is a name only; two make the button a choice",
|
|
169
|
+
"covers": "actions.set-options",
|
|
170
|
+
"steps": [
|
|
171
|
+
{
|
|
172
|
+
"script": "true",
|
|
173
|
+
"wait": 60,
|
|
174
|
+
"check": "document.querySelector('#late .sf-chat-interlocutor__button').disabled && document.querySelector('#late .sf-chat-interlocutor__title').textContent.trim() === 'Помощник'"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"action": {
|
|
178
|
+
"name": "set-options",
|
|
179
|
+
"with": [
|
|
180
|
+
{
|
|
181
|
+
"id": "personal",
|
|
182
|
+
"title": "Мой помощник",
|
|
183
|
+
"kind": "personal"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "shop",
|
|
187
|
+
"title": "Поддержка магазина",
|
|
188
|
+
"kind": "knowledge"
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"target": "#late",
|
|
193
|
+
"wait": 200,
|
|
194
|
+
"expect": {
|
|
195
|
+
"returns": {
|
|
196
|
+
"outcome": "applied"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"check": "(() => { const b = document.querySelector('#late .sf-chat-interlocutor__button'); return !b.disabled && b.getAttribute('aria-haspopup') === 'menu' && b.getAttribute('aria-expanded') === 'false' && b.getAttribute('aria-label') === 'Помощник: Мой помощник' && !document.querySelector('#late .sf-chat-interlocutor--single'); })()"
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 2,
|
|
3
|
+
"id": "smart.chat-interlocutor",
|
|
4
|
+
"version": "1.0.8",
|
|
5
|
+
"title": "Chat interlocutor",
|
|
6
|
+
"summary": "Who the conversation is with: the server's interlocutors in the Framework's context menu, the current one checked, and a choice of another reported for the host to start a new conversation with. One interlocutor is a name, not a choice.",
|
|
7
|
+
"kind": "smart",
|
|
8
|
+
"reuse_mode": "whole",
|
|
9
|
+
"lifecycle": "experimental",
|
|
10
|
+
"tags": [
|
|
11
|
+
"chat",
|
|
12
|
+
"interlocutor",
|
|
13
|
+
"picker",
|
|
14
|
+
"menu"
|
|
15
|
+
],
|
|
16
|
+
"capabilities": [
|
|
17
|
+
"interaction",
|
|
18
|
+
"keyboard",
|
|
19
|
+
"search",
|
|
20
|
+
"responsive"
|
|
21
|
+
],
|
|
22
|
+
"custom_element": "sf-chat-interlocutor",
|
|
23
|
+
"templates": [
|
|
24
|
+
"default"
|
|
25
|
+
],
|
|
26
|
+
"exported_parts": [],
|
|
27
|
+
"composition": {
|
|
28
|
+
"uses": [
|
|
29
|
+
"smart.icon",
|
|
30
|
+
"smart.menu-context"
|
|
31
|
+
],
|
|
32
|
+
"public_parts": []
|
|
33
|
+
},
|
|
34
|
+
"inputs": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"template": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"default": "default",
|
|
40
|
+
"description": "Template variant name for SfBaseElement external templates.",
|
|
41
|
+
"const": "default"
|
|
42
|
+
},
|
|
43
|
+
"root-class": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"default": "",
|
|
46
|
+
"description": "Classes added to the root element the component draws."
|
|
47
|
+
},
|
|
48
|
+
"root-style": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"default": "",
|
|
51
|
+
"description": "Inline style declarations set on the root element the component draws, custom properties included."
|
|
52
|
+
},
|
|
53
|
+
"value": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"default": "",
|
|
56
|
+
"description": "the current interlocutor; a choice asks for another with select {id} and the host writes it back when its new conversation is there"
|
|
57
|
+
},
|
|
58
|
+
"options": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"default": [],
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"id": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "The interlocutor's id."
|
|
67
|
+
},
|
|
68
|
+
"title": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "Its name, drawn as text."
|
|
71
|
+
},
|
|
72
|
+
"kind": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "knowledge: a knowledge base's assistant, under its own heading."
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"id",
|
|
79
|
+
"title"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"description": "The interlocutors (bootstrap.interlocutors), a property or the JSON island; from eight the menu gets a search."
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
},
|
|
87
|
+
"item_contract": {},
|
|
88
|
+
"contracts": {
|
|
89
|
+
"option": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"id": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "The interlocutor's id."
|
|
95
|
+
},
|
|
96
|
+
"title": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"description": "Its name, drawn as text."
|
|
99
|
+
},
|
|
100
|
+
"kind": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "knowledge: a knowledge base's assistant, under its own heading."
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"required": [
|
|
106
|
+
"id",
|
|
107
|
+
"title"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"choice": {
|
|
111
|
+
"const": "A choice of another interlocutor dispatches sf-chat-interlocutor-select {id} (cancelable). The element never changes value: the host starts the new conversation and writes value back. Fewer than two interlocutors are a name: the button is disabled and open answers refused single."
|
|
112
|
+
},
|
|
113
|
+
"css_variables": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"properties": {
|
|
116
|
+
"--sf-chat-interlocutor-color": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"--sf-chat-interlocutor-icon-color": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"--sf-chat-interlocutor-hover-background-color": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
"--sf-chat-interlocutor-radius": {
|
|
126
|
+
"type": "string"
|
|
127
|
+
},
|
|
128
|
+
"--sf-chat-interlocutor-height": {
|
|
129
|
+
"type": "string"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"methods": {
|
|
135
|
+
"setOptions": {
|
|
136
|
+
"summary": "The interlocutors, as the options property (the action set-options); kind knowledge goes under its own heading, from eight the menu gets a search.",
|
|
137
|
+
"arguments": [
|
|
138
|
+
{
|
|
139
|
+
"name": "args",
|
|
140
|
+
"type": "object",
|
|
141
|
+
"required": true,
|
|
142
|
+
"schema": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": {
|
|
145
|
+
"options": {
|
|
146
|
+
"type": "array",
|
|
147
|
+
"items": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"properties": {
|
|
150
|
+
"id": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "The interlocutor's id."
|
|
153
|
+
},
|
|
154
|
+
"title": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"description": "Its name, drawn as text."
|
|
157
|
+
},
|
|
158
|
+
"kind": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"description": "knowledge: a knowledge base's assistant, under its own heading."
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"required": [
|
|
164
|
+
"id",
|
|
165
|
+
"title"
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": [
|
|
171
|
+
"options"
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"returns": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"description": "{outcome: applied}"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"open": {
|
|
182
|
+
"summary": "Open the menu, as a press does; refused single with fewer than two interlocutors.",
|
|
183
|
+
"arguments": [],
|
|
184
|
+
"returns": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"description": "{outcome: applied} or {outcome: refused, reason}"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"events": {
|
|
191
|
+
"sf-chat-interlocutor-select": {
|
|
192
|
+
"summary": "Another interlocutor was chosen (vocabulary select). The 0.3 name sf-chat-interlocutor follows it until 2026-12-01.",
|
|
193
|
+
"payload": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"required": [
|
|
196
|
+
"id"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"id": {}
|
|
200
|
+
},
|
|
201
|
+
"additionalProperties": true
|
|
202
|
+
},
|
|
203
|
+
"canonical": true
|
|
204
|
+
},
|
|
205
|
+
"sf-chat-interlocutor": {
|
|
206
|
+
"summary": "Dated alias of sf-chat-interlocutor-select until 2026-12-01 (same-detail).",
|
|
207
|
+
"payload": {
|
|
208
|
+
"type": "object"
|
|
209
|
+
},
|
|
210
|
+
"alias_of": "sf-chat-interlocutor-select"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"state": {
|
|
214
|
+
"machines": {
|
|
215
|
+
"menu": [
|
|
216
|
+
"closed",
|
|
217
|
+
"open"
|
|
218
|
+
],
|
|
219
|
+
"options": [
|
|
220
|
+
"single",
|
|
221
|
+
"several"
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
"visual_states": [
|
|
225
|
+
"default",
|
|
226
|
+
"disabled",
|
|
227
|
+
"open",
|
|
228
|
+
"closed"
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"persistence": {
|
|
232
|
+
"mode": "none",
|
|
233
|
+
"source_of_truth": "host",
|
|
234
|
+
"network_owner": "host",
|
|
235
|
+
"revision_field": null
|
|
236
|
+
},
|
|
237
|
+
"ownership": {
|
|
238
|
+
"source": "simai/ui-pro",
|
|
239
|
+
"data": "host",
|
|
240
|
+
"effects": "host",
|
|
241
|
+
"forbidden_client_responsibilities": [
|
|
242
|
+
"fetching or polling the chat API",
|
|
243
|
+
"starting a conversation",
|
|
244
|
+
"access decisions"
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
"security": {
|
|
248
|
+
"permissions_owner": "host",
|
|
249
|
+
"untrusted_inputs": [
|
|
250
|
+
"interlocutor titles (drawn as text)"
|
|
251
|
+
],
|
|
252
|
+
"network_policy": "deny"
|
|
253
|
+
},
|
|
254
|
+
"accessibility": {
|
|
255
|
+
"role": "button",
|
|
256
|
+
"accessible_name": "internal",
|
|
257
|
+
"keyboard": [
|
|
258
|
+
"Tab",
|
|
259
|
+
"Enter",
|
|
260
|
+
"Space"
|
|
261
|
+
],
|
|
262
|
+
"focus": "A native button with aria-haspopup=menu and aria-expanded=false from the start, named «Помощник: <title>» and described (sr-only) by what a change does before the menu opens. The menu is the Framework's sf-menu-context with radio rows, the current one checked, and its own keys. Disabled, without aria-haspopup, aria-expanded or a description, with a single interlocutor."
|
|
263
|
+
},
|
|
264
|
+
"presentation": {
|
|
265
|
+
"themes": [
|
|
266
|
+
"light",
|
|
267
|
+
"dark"
|
|
268
|
+
],
|
|
269
|
+
"locales": [
|
|
270
|
+
"en",
|
|
271
|
+
"ru"
|
|
272
|
+
],
|
|
273
|
+
"responsive": [
|
|
274
|
+
"desktop",
|
|
275
|
+
"mobile"
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
"adapter": {
|
|
279
|
+
"kind": "generic",
|
|
280
|
+
"protocol": "simai.smart-studio-adapter.v1",
|
|
281
|
+
"module": null
|
|
282
|
+
},
|
|
283
|
+
"artifacts": {
|
|
284
|
+
"fixtures": [
|
|
285
|
+
"studio.fixture.json"
|
|
286
|
+
],
|
|
287
|
+
"scenarios": [
|
|
288
|
+
"studio.scenario.json"
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
"readiness": {
|
|
292
|
+
"level": "host-required",
|
|
293
|
+
"required_checks": [
|
|
294
|
+
"manifest",
|
|
295
|
+
"loader-rule",
|
|
296
|
+
"chat-interlocutor-probe"
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
"compatibility": {
|
|
300
|
+
"contract_schema": {
|
|
301
|
+
"id": "https://simai.io/contracts/smart-component-manifest.v2.schema.json",
|
|
302
|
+
"version": 2
|
|
303
|
+
},
|
|
304
|
+
"runtime_pair": {
|
|
305
|
+
"ui_revision": "0edd49be08f802b60ed92f176b68911a42a12f3f",
|
|
306
|
+
"ui_smart_revision": "0edd49be08f802b60ed92f176b68911a42a12f3f"
|
|
307
|
+
},
|
|
308
|
+
"aliases": [],
|
|
309
|
+
"deprecations": [],
|
|
310
|
+
"replacement": null,
|
|
311
|
+
"migrations": [
|
|
312
|
+
{
|
|
313
|
+
"from": "0.3.1",
|
|
314
|
+
"to": "1.0.0",
|
|
315
|
+
"changes": [
|
|
316
|
+
"moved from simai/ui-chat to ui-pro (D31): standard simai.smart-component 1.3.9, the element is made from component.json; words in lang/; dated aliases in aliases.json",
|
|
317
|
+
"sf-chat-interlocutor -> sf-chat-interlocutor-select until 2026-12-01 (event)",
|
|
318
|
+
"setOptions(list) is the action set-options and the setting options"
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"from": "1.0.0",
|
|
323
|
+
"to": "1.0.1",
|
|
324
|
+
"changes": [
|
|
325
|
+
"The first-paint snapshot's sheets.json lists the utility sheets its markup uses (retaken on ui-source 5ba9399); no behaviour changed. Nothing to change for a host."
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"from": "1.0.3",
|
|
330
|
+
"to": "1.0.4",
|
|
331
|
+
"changes": [
|
|
332
|
+
"Draws and finds the renamed Framework elements by their new tags (the choice opens in sf-menu-context); the rule relations name cl-<new>. Needs the SIMAI Framework pair with the tag renames (core.runtime 1.21.0). No visible change. Nothing to change for a host on that pair; a host that writes the former tags keeps working until 2027-01-01."
|
|
333
|
+
]
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"from": "1.0.4",
|
|
337
|
+
"to": "1.0.5",
|
|
338
|
+
"changes": [
|
|
339
|
+
"Its guidance names the conversation list by its new tag, sf-chat-threads (was sf-thread-list). No change in behaviour."
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
"provenance": {
|
|
345
|
+
"source_repository": "simai/ui-pro",
|
|
346
|
+
"source_revision": "a5ac53753d95b49e2e70078c94fd89ccd3045993",
|
|
347
|
+
"source_artifacts": [
|
|
348
|
+
{
|
|
349
|
+
"path": "src/smart/chat-interlocutor/index.js",
|
|
350
|
+
"sha256": "8d739bdc042ea25133df3b3e903d813585a3086534cc1e6641659a030e20b90e"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"path": "src/smart/chat-interlocutor/js/templates/default.js",
|
|
354
|
+
"sha256": "052f1f09c793c5ee5e1314d6ec8699824acfceade82607fcba98b568c3aa0b91"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"path": "src/smart/chat-interlocutor/js/templates/default.css",
|
|
358
|
+
"sha256": "3db429f283bb8fc55c4983892ae288684129ba14cc2fa42d3d1697b4354705de"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"path": "src/smart/chat-interlocutor/rule.js",
|
|
362
|
+
"sha256": "4e1f1f4bcb0f74adf5e5676808fd2f2a25f877e5a2b45b54e6e910eb9c4db759"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"path": "src/smart/chat-interlocutor/docs.md",
|
|
366
|
+
"sha256": "8769bd2816fa6d957e5b80021ce6ab0ba9ff637c6127f0150f6b25690eaf2789"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"path": "src/smart/chat-interlocutor/component.json",
|
|
370
|
+
"sha256": "3e807ee41f61bf19178a80b93ff9594029dd186a2e9d722e25e20c8f73f8a6d0"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"path": "src/smart/chat-interlocutor/aliases.json",
|
|
374
|
+
"sha256": "71686ea56316baeba89788fcfe3a707eb788683a7a653182d88fe44967312756"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"path": "src/smart/chat-interlocutor/lang/en.json",
|
|
378
|
+
"sha256": "45f36213e556f01447e57d5c7202be835d34780463d9211cc366df074fddad39"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"path": "src/smart/chat-interlocutor/lang/ru.json",
|
|
382
|
+
"sha256": "b237e677cf9d460e865b924e17a5debd75326237f8d2091c1382ecb8e15ab11e"
|
|
383
|
+
}
|
|
384
|
+
],
|
|
385
|
+
"generated_runtime": []
|
|
386
|
+
},
|
|
387
|
+
"ai_guidance": {
|
|
388
|
+
"use_when": "Use sf-chat-interlocutor in a chat window's header to name whom the conversation is with and, when the server lists several, to let the person choose another one, which the host turns into a new conversation.",
|
|
389
|
+
"do_not": [
|
|
390
|
+
"Do not change the interlocutor of an existing conversation; start a new one and write value back",
|
|
391
|
+
"Do not use it to pick a conversation: that is sf-chat-threads",
|
|
392
|
+
"Do not pass markup in titles; they are text"
|
|
393
|
+
],
|
|
394
|
+
"required_reads": [
|
|
395
|
+
"inputs",
|
|
396
|
+
"contracts",
|
|
397
|
+
"events",
|
|
398
|
+
"accessibility"
|
|
399
|
+
],
|
|
400
|
+
"minimal_example": "<sf-chat-interlocutor value=\"personal\"></sf-chat-interlocutor>",
|
|
401
|
+
"owner_commands": [
|
|
402
|
+
"node scripts/test.mjs",
|
|
403
|
+
"node scripts/run-manifest-probes.mjs <free output> <package output> chat-interlocutor"
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- sf-chat-interlocutor, example «former»: the static markup (standard simai.smart-component 1.3.8 §5.4). Generated by scripts/snapshot-first-paint.mjs from the built output; do not edit, run it again. -->
|
|
2
|
+
<sf-chat-interlocutor value="admin" style="display: contents;"><script type="application/json" data-sf-settings>{"options":[{"id":"personal","title":"Мой помощник","kind":"personal"}]}</script>
|
|
3
|
+
<div class="sf-chat-interlocutor sf-chat-interlocutor--single" data-sf-static>
|
|
4
|
+
<button type="button" class="sf-chat-interlocutor__button" aria-label="Помощник" disabled><span class="sf-chat-interlocutor__title">Помощник</span><sf-icon icon="expand_more" size="1/2" aria-hidden="true" style="display: contents;" data-sf-size-relative><i class="sf-icon sf-icon--size-1/2 sf-icon--weight-regular" style="--sf-icon--grade:0;--sf-icon--optical-size:24" aria-hidden="true" data-sf-static>expand_more</i></sf-icon></button>
|
|
5
|
+
<sf-menu-context class="sf-chat-interlocutor__menu" popup aria-label="Выбрать помощника" style="display: contents;">
|
|
6
|
+
<div class="sf-context-menu" role="menu" aria-label="Выбрать помощника" data-sf-static></div>
|
|
7
|
+
</sf-menu-context>
|
|
8
|
+
<span class="sf-chat-interlocutor__note sr-only" id="sf-chat-interlocutor-former-1"></span>
|
|
9
|
+
</div>
|
|
10
|
+
</sf-chat-interlocutor>
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- sf-chat-interlocutor, example «grouped»: the static markup (standard simai.smart-component 1.3.8 §5.4). Generated by scripts/snapshot-first-paint.mjs from the built output; do not edit, run it again. -->
|
|
2
|
+
<sf-chat-interlocutor value="base-3" style="display: contents;"><script type="application/json" data-sf-settings>{"options":[{"id":"personal","title":"Мой помощник","kind":"personal"},{"id":"base-1","title":"База 1","kind":"knowledge"},{"id":"base-2","title":"База 2","kind":"knowledge"},{"id":"base-3","title":"База 3","kind":"knowledge"},{"id":"base-4","title":"База 4","kind":"knowledge"},{"id":"base-5","title":"База 5","kind":"knowledge"},{"id":"base-6","title":"База 6","kind":"knowledge"},{"id":"base-7","title":"База 7","kind":"knowledge"},{"id":"base-8","title":"База 8","kind":"knowledge"}]}</script>
|
|
3
|
+
<div class="sf-chat-interlocutor" data-sf-static>
|
|
4
|
+
<button type="button" class="sf-chat-interlocutor__button" aria-label="Помощник: База 3" aria-haspopup="menu" aria-expanded="false" aria-describedby="sf-chat-interlocutor-grouped-1"><span class="sf-chat-interlocutor__title">База 3</span><sf-icon icon="expand_more" size="1/2" aria-hidden="true" style="display: contents;" data-sf-size-relative><i class="sf-icon sf-icon--size-1/2 sf-icon--weight-regular" style="--sf-icon--grade:0;--sf-icon--optical-size:24" aria-hidden="true" data-sf-static>expand_more</i></sf-icon></button>
|
|
5
|
+
<sf-menu-context class="sf-chat-interlocutor__menu" popup aria-label="Выбрать помощника" style="display: contents;">
|
|
6
|
+
<div class="sf-context-menu" role="menu" aria-label="Выбрать помощника" data-sf-static></div>
|
|
7
|
+
</sf-menu-context>
|
|
8
|
+
<span class="sf-chat-interlocutor__note sr-only" id="sf-chat-interlocutor-grouped-1">При смене помощника начнётся новый разговор</span>
|
|
9
|
+
</div>
|
|
10
|
+
</sf-chat-interlocutor>
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- sf-chat-interlocutor, example «reference»: the static markup (standard simai.smart-component 1.3.8 §5.4). Generated by scripts/snapshot-first-paint.mjs from the built output; do not edit, run it again. -->
|
|
2
|
+
<sf-chat-interlocutor value="personal" style="display: contents;"><script type="application/json" data-sf-settings>{"options":[{"id":"personal","title":"Мой помощник","kind":"personal"},{"id":"shop","title":"Поддержка магазина","kind":"knowledge"}]}</script>
|
|
3
|
+
<div class="sf-chat-interlocutor" data-sf-static>
|
|
4
|
+
<button type="button" class="sf-chat-interlocutor__button" aria-label="Помощник: Мой помощник" aria-haspopup="menu" aria-expanded="false" aria-describedby="sf-chat-interlocutor-reference-1"><span class="sf-chat-interlocutor__title">Мой помощник</span><sf-icon icon="expand_more" size="1/2" aria-hidden="true" style="display: contents;" data-sf-size-relative><i class="sf-icon sf-icon--size-1/2 sf-icon--weight-regular" style="--sf-icon--grade:0;--sf-icon--optical-size:24" aria-hidden="true" data-sf-static>expand_more</i></sf-icon></button>
|
|
5
|
+
<sf-menu-context class="sf-chat-interlocutor__menu" popup aria-label="Выбрать помощника" style="display: contents;">
|
|
6
|
+
<div class="sf-context-menu" role="menu" aria-label="Выбрать помощника" data-sf-static></div>
|
|
7
|
+
</sf-menu-context>
|
|
8
|
+
<span class="sf-chat-interlocutor__note sr-only" id="sf-chat-interlocutor-reference-1">При смене помощника начнётся новый разговор</span>
|
|
9
|
+
</div>
|
|
10
|
+
</sf-chat-interlocutor>
|
|
Binary file
|