@simai-studio/chat 0.0.0-stage → 1.1.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 +67 -2
- package/dist/package-receipt.json +1553 -0
- package/dist/set.json +107 -0
- package/dist/smart/chat-composer/aliases.json +67 -0
- package/dist/smart/chat-composer/aliases.json.gz +0 -0
- package/dist/smart/chat-composer/component.json +698 -0
- package/dist/smart/chat-composer/component.json.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.css +223 -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 +550 -0
- package/dist/smart/chat-composer/examples.json.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.js +1028 -0
- package/dist/smart/chat-composer/js/chat-composer.js.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js +73 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js.gz +0 -0
- package/dist/smart/chat-composer/lang/en.json +28 -0
- package/dist/smart/chat-composer/lang/en.json.gz +0 -0
- package/dist/smart/chat-composer/lang/ru.json +28 -0
- package/dist/smart/chat-composer/lang/ru.json.gz +0 -0
- package/dist/smart/chat-composer/probe.json +416 -0
- package/dist/smart/chat-composer/probe.json.gz +0 -0
- package/dist/smart/chat-composer/smart.manifest.json +651 -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 +99 -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 +110 -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 +198 -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 +89 -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 +436 -0
- package/dist/smart/chat-interlocutor/component.json.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css +72 -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 +110 -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 +125 -0
- package/dist/smart/chat-message/aliases.json.gz +0 -0
- package/dist/smart/chat-message/component.json +850 -0
- package/dist/smart/chat-message/component.json.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.css +2260 -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 +1626 -0
- package/dist/smart/chat-message/examples.json.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.js +5859 -0
- package/dist/smart/chat-message/js/chat-message.js.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.min.js +15 -0
- package/dist/smart/chat-message/js/chat-message.min.js.gz +0 -0
- package/dist/smart/chat-message/lang/en.json +176 -0
- package/dist/smart/chat-message/lang/en.json.gz +0 -0
- package/dist/smart/chat-message/lang/ru.json +180 -0
- package/dist/smart/chat-message/lang/ru.json.gz +0 -0
- package/dist/smart/chat-message/probe.json +1051 -0
- package/dist/smart/chat-message/probe.json.gz +0 -0
- package/dist/smart/chat-message/smart.manifest.json +824 -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 +40 -0
- package/dist/smart/chat-message/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-message/static/default/question.html +22 -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 +2 -0
- package/dist/smart/chat-message/static/person/person-reply.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person.html +12 -0
- package/dist/smart/chat-message/static/person/person.html.gz +0 -0
- package/dist/smart/chat-message/static/sheets.json +452 -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 +1805 -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 +1240 -0
- package/dist/smart/chat-threads/component.json.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.css +134 -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 +1159 -0
- package/dist/smart/chat-threads/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.html +145 -0
- package/dist/smart/chat-threads/static/default/activity.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html +145 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.html +58 -0
- package/dist/smart/chat-threads/static/default/archive.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html +58 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.html +116 -0
- package/dist/smart/chat-threads/static/default/avatars.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html +116 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/empty.html +50 -0
- package/dist/smart/chat-threads/static/default/empty.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/loading.html +50 -0
- package/dist/smart/chat-threads/static/default/loading.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.html +104 -0
- package/dist/smart/chat-threads/static/default/people.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html +104 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.html +123 -0
- package/dist/smart/chat-threads/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html +123 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html +99 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html +99 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/sheets.json +503 -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 +2819 -0
- package/dist/smart/chat-window/component.json.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.css +1509 -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 +12780 -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 +2844 -0
- package/dist/smart/chat-window/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-window/static/default/archived.html +100 -0
- package/dist/smart/chat-window/static/default/archived.html.gz +0 -0
- package/dist/smart/chat-window/static/default/embedded.html +125 -0
- package/dist/smart/chat-window/static/default/embedded.html.gz +0 -0
- package/dist/smart/chat-window/static/default/greeting.html +125 -0
- package/dist/smart/chat-window/static/default/greeting.html.gz +0 -0
- package/dist/smart/chat-window/static/default/people.html +104 -0
- package/dist/smart/chat-window/static/default/people.html.gz +0 -0
- package/dist/smart/chat-window/static/default/proposal.html +161 -0
- package/dist/smart/chat-window/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-window/static/default/reference.html +123 -0
- package/dist/smart/chat-window/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-window/static/default/waiting.html +123 -0
- package/dist/smart/chat-window/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-window/static/sheets.json +526 -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 +193 -0
- package/dist/smart/rule.js.gz +0 -0
- package/package.json +29 -4
|
Binary file
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
(()=>{"use strict";var e={"26a07784f30a"(e,t,a){a.a(e,async(e,t)=>{try{var i=a("deb1a4d61565"),s=a("5b7d7695b41b"),r=a("d3818183b14c"),n=a("087808edd63a"),o=a("99f949a3941b"),d=a("0ccefade0afb"),h=a("86e6dcdc95d2"),c=a("0a15015f52cc"),l=e([i,s,r,n]);[i,s,r,n]=l.then?(await l)():l;var p=a.n(i);const m=120,u={running:"neutral",waiting:"warning",done:"success",stopped:"neutral",failed:"error"},f="host:",g=()=>({outcome:"applied"}),v=e=>({outcome:"refused",reason:e}),y=(e,t,a)=>(0,r.noteDeprecated)({component:"sf-chat-threads",tag:"sf-chat-threads",kind:e,from:t,to:a,since:d.since,remove_after:d.remove_after}),b=e=>{const{updated_at:t,...a}=e,i={...a,id:String(e.id)};if(void 0===i["updated-at"]&&void 0!==t&&(y("entry-field","updated_at","updated-at"),i["updated-at"]=t),e.avatar&&"object"==typeof e.avatar){const{image_url:t,...a}=e.avatar;void 0===a["image-url"]&&void 0!==t&&(y("entry-field","avatar.image_url","avatar.image-url"),a["image-url"]=t),i.avatar=a}return i},_=(e,t)=>e&&!Array.isArray(e)&&"object"==typeof e&&Array.isArray(e.threads)?{threads:e.threads,hasMore:Boolean(e["has-more"]??e.hasMore)}:{threads:Array.isArray(e)?e:[],hasMore:Boolean(t?.hasMore??t?.["has-more"])},w=(0,s.elementFromManifest)(o,{base:p(),lang:{en:h,ru:c},source:"ru",aliases:d}),x=(e,t)=>{const a=Date.parse(e["updated-at"]??""),i=Date.parse(t["updated-at"]??"");return(Number.isFinite(i)?i:-1/0)-(Number.isFinite(a)?a:-1/0)};class S extends w{static get props(){return{...super.props,templateName:{attribute:"template",default:"default"}}}constructor(){super(),this._threads=[],this._actions=[],this._createCommands=[],this._version=0,this._given=-1;for(const e of["threads","actions","createCommands"]){if(!Object.prototype.hasOwnProperty.call(this,e))continue;const t=this[e];delete this[e],this[e]=t}}text(e,t={}){return this.sfWord(e,{vars:t})}sfAwaitingData(){return"skeleton"===this.getAttribute("data-sf-first-paint")&&!this._sfDataGiven}get threads(){return this._threads.map(e=>({...e}))}set threads(e){this._sfDataGiven=!0;const t=this.archived;this._threads=(Array.isArray(e)?e:[]).filter(e=>e&&null!=e.id&&Boolean(e.archived)===t).map(b),this._version+=1,this.requestComponentUpdate("threads")}get actions(){return this._actions.map(e=>({...e}))}set actions(e){this._actions=Array.isArray(e)?e.filter(e=>e&&e.id&&e.text).map(e=>({...e,id:String(e.id)})):[];const t=this.list;t&&(t.actions=this.rowActions()),this.requestComponentUpdate("actions")}get createCommands(){return this._createCommands.map(e=>({...e}))}set createCommands(e){this._createCommands=Array.isArray(e)?e.filter(e=>e&&e.id&&e.text).map(e=>({...e,id:String(e.id)})):[],this.requestComponentUpdate("create-commands")}get list(){return this.querySelector(":scope > .sf-thread-list > .sf-thread-list__scroller > .sf-thread-list__rows")}setThreads(e=[],t={}){const{threads:a,hasMore:i}=_(e,t);return this.threads=a,this.loading&&(this.loading=!1),this.hasMore=i,g()}appendThreads(e=[],t={}){const{threads:a,hasMore:i}=_(e,t),s=new Set(this._threads.map(e=>e.id));return this.setThreads([...this._threads,...a.filter(e=>e&&!s.has(String(e.id)))],{hasMore:i})}upsert(e){const t=e?.thread&&"object"==typeof e.thread&&void 0===e.id?e.thread:e;if(!t||null==t.id)return v("no-id");const a=String(t.id),i=this._threads.filter(e=>e.id!==a);return this.setThreads([b(t),...i].sort(x),{hasMore:this.hasMore})}removeThread(e){const t=String(e?.id??e);return this._threads.some(e=>e.id===t)?this.setThreads(this._threads.filter(e=>e.id!==t),{hasMore:this.hasMore}):v("unknown")}setLoading(e){return y("action","setLoading","loading"),this.loading=Boolean(e),this.loading&&(this.status=""),g()}setStatus(e){return y("action","setStatus","status"),this.status=String(e??""),g()}moreFailed(){return this.list?.moreFailed?.(),g()}rename(e){const t=String(e?.id??e??"");return this.getProp("noManage")?v("no-manage"):this._threads.some(e=>e.id===t)?this.list?.rename?.(t)??v("unknown"):v("unknown")}openMenu(e,t=null){const a=String(e?.id??e??"");return this.getProp("noManage")?v("no-manage"):this._threads.some(e=>e.id===a)?this.list?.openMenu?.(a,t)??v("unknown"):v("unknown")}rowActions(){return this.getProp("noManage")?[]:[...this.getProp("noArchive")?[]:[this.archived?{id:"restore",text:this.sfWord("unarchive-text"),icon:"unarchive"}:{id:"archive",text:this.sfWord("archive-text"),icon:"archive"}],...this._actions.map(e=>({id:`${f}${e.id}`,text:e.text,...e.icon?{icon:e.icon}:{}}))]}itemOf(e){const t=Number(e.unread)>0?Math.floor(Number(e.unread)):0,a=u[e.activity],i=e.avatar&&"object"==typeof e.avatar?e.avatar:null;return{id:e.id,text:String(e.title??""),...e.caption?{supporting:String(e.caption)}:{},...e["updated-at"]?{date:e["updated-at"]}:{},...!0===e.pinned?{pinned:!0}:{},...i?{avatar:i}:{},...t?{count:t}:{},...a?{badge:{text:this.sfWord(`activity-${e.activity}`),tone:a}}:{}}}templateContext(){const e=this.archived;return{component:this,label:this.getAttribute("label")||this.sfWord(e?"archive-view":"label"),archived:e,canCreate:!e&&!this.getProp("noCreate"),createCommands:this._createCommands,canArchive:!this.getProp("noArchive"),manage:!this.getProp("noManage"),loading:this.loading,hasMore:this.hasMore,grouped:"none"!==this.getProp("groupBy"),selected:this.selected??"",rowActions:this.rowActions(),status:this.status,empty:0===this._threads.length,emptyText:this.sfWord(e?"archive-empty-text":"empty-text"),createText:this.sfWord("create-text"),backText:this.sfWord("back-text"),archiveView:this.sfWord("archive-view"),hasFooter:this.hasSlotContent("footer"),footer:this.hasSlotContent("footer")?this.getSlotContent("footer"):null}}template(){return(0,n.V)(this.templateContext())}afterRender(e){super.afterRender?.(e);const t=this.list;if(!t||this._given===this._version)return;this._given=this._version;const a=this._threads.map(e=>this.itemOf(e));"function"==typeof t.setItems?t.setItems(a,{hasMore:this.hasMore}):t.items=a}create(e){this.sfEmit("create",e?{kind:e}:{})}open(e){this.sfEmit("open",{id:String(e)})}showArchive(e){this.sfEmit("toggle",{archived:Boolean(e)})}onListOpen(e){e.stopPropagation(),this.open(e.detail?.id)}onListRename(e){e.stopPropagation();const t=String(e.detail?.id??""),a=this._threads.find(e=>e.id===t),i=String(e.detail?.text??"").trim().slice(0,m);a&&i&&(i!==e.detail.text&&this.list?.upsert?.({...this.itemOf(a),text:i}),a.title=i,this.sfEmit("rename",{id:t,title:i}))}onListApply(e){e.stopPropagation();const t=String(e.detail?.ids?.[0]??""),a=String(e.detail?.action??"");t&&a&&("archive"===a?this.sfEmit("archive",{ids:[t],id:t}):"restore"===a?this.sfEmit("restore",{ids:[t],id:t}):a.startsWith(f)&&this.sfEmit("apply",{action:a.slice(f.length),scope:"entry",ids:[t],id:t}))}onListMore(e){e.stopPropagation(),this.sfEmit("load-more",{direction:"after"})}}S.define("sf-chat-threads"),t()}catch(e){t(e)}})},"087808edd63a"(e,t,a){a.a(e,async(e,i)=>{try{a.d(t,{V:()=>d});var s=a("2a080a730149"),r=e([s]),n=r.then?(await r)():r;s=n[0];const o=(e,t,a,i,r=!1)=>s.html`
|
|
2
|
+
<button type="button" class="sf-thread-list__command" data-action=${a} ?hidden=${r} @click=${i}>
|
|
3
|
+
<sf-icon icon=${e} size="2" aria-hidden="true"></sf-icon>
|
|
4
|
+
<span>${t}</span>
|
|
5
|
+
</button>
|
|
6
|
+
`;function d(e){const{component:t}=e;return s.html`
|
|
7
|
+
<nav class="sf-thread-list ${e.archived?"sf-thread-list--archive":""}" aria-label=${e.label}>
|
|
8
|
+
<div class="sf-thread-list__head" ?hidden=${!e.canCreate&&!e.archived}>
|
|
9
|
+
${e.createCommands.length?e.createCommands.map(a=>o(a.icon||"edit_square",a.text,`create:${a.id}`,()=>t.create(a.id),!e.canCreate)):o("edit_square",e.createText,"create",()=>t.create(),!e.canCreate)}
|
|
10
|
+
${o("arrow_back",e.backText,"back",()=>t.showArchive(!1),!e.archived)}
|
|
11
|
+
${e.archived?s.html`<h2 class="sf-thread-list__heading-view">${e.archiveView}</h2>`:s.nothing}
|
|
12
|
+
</div>
|
|
13
|
+
<div class="sf-thread-list__scroller">
|
|
14
|
+
<sf-list
|
|
15
|
+
class="sf-thread-list__rows"
|
|
16
|
+
?hidden=${Boolean(e.status)&&e.empty}
|
|
17
|
+
label=${e.label}
|
|
18
|
+
group-by=${e.grouped?"day":"none"}
|
|
19
|
+
heading-level="2"
|
|
20
|
+
no-wrap
|
|
21
|
+
empty-text=${e.emptyText}
|
|
22
|
+
selected=${e.selected}
|
|
23
|
+
?renamable=${e.manage}
|
|
24
|
+
?has-more=${e.hasMore}
|
|
25
|
+
?loading=${e.loading}
|
|
26
|
+
.actions=${e.rowActions}
|
|
27
|
+
@sf-list-open=${e=>t.onListOpen(e)}
|
|
28
|
+
@sf-list-rename=${e=>t.onListRename(e)}
|
|
29
|
+
@sf-list-apply=${e=>t.onListApply(e)}
|
|
30
|
+
@sf-list-load-more=${e=>t.onListMore(e)}
|
|
31
|
+
></sf-list>
|
|
32
|
+
<p class="sf-thread-list__status" role="status" ?hidden=${!e.status||e.loading}>${e.status}</p>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="sf-thread-list__footer" ?hidden=${!(e.canArchive&&!e.archived||e.hasFooter)}>
|
|
35
|
+
${e.canArchive&&!e.archived?o("inventory_2",e.archiveView,"archive-view",()=>t.showArchive(!0)):s.nothing}
|
|
36
|
+
${e.hasFooter?s.html`<div class="sf-thread-list__extra">${e.footer}</div>`:s.nothing}
|
|
37
|
+
</div>
|
|
38
|
+
</nav>
|
|
39
|
+
`}i()}catch(h){i(h)}})},d3818183b14c(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("deprecations",1):new Promise((e,t)=>globalThis.addEventListener("sf-runtime-ready",()=>globalThis.SF.runtimeModule("deprecations",1).then(e,t),{once:!0}))},"5b7d7695b41b"(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("element-manifest",1):new Promise((e,t)=>globalThis.addEventListener("sf-runtime-ready",()=>globalThis.SF.runtimeModule("element-manifest",1).then(e,t),{once:!0}))},"2a080a730149"(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("lit",1):new Promise((e,t)=>globalThis.addEventListener("sf-runtime-ready",()=>globalThis.SF.runtimeModule("lit",1).then(e,t),{once:!0}))},deb1a4d61565(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("smart-base",1):new Promise((e,t)=>globalThis.addEventListener("sf-runtime-ready",()=>globalThis.SF.runtimeModule("smart-base",1).then(e,t),{once:!0}))},"0ccefade0afb"(e){e.exports=JSON.parse('{"$comment":"Dated aliases of sf-chat-threads for the shim (core/js/aliases.js, standard §16 item 20). create, rename, archive and load-more keep their DOM names (archive and load-more gain the vocabulary\'s ids and direction beside the old fields). setLoading and setStatus became the settings loading and status: the component reads them and notes each call (no shim row can map a method to a setting).","component":"sf-chat-threads","since":"2026-10-27","remove_after":"2026-12-01","aliases":[{"from":"sf-thread-list-select","to":"sf-thread-list-open","kind":"event","component":"sf-chat-threads","since":"2026-10-27","remove_after":"2026-12-01","mode":"same-detail","cancelable":false,"section":"§8, vocabulary §5 open"},{"from":"sf-thread-list-unarchive","to":"sf-thread-list-restore","kind":"event","component":"sf-chat-threads","since":"2026-10-27","remove_after":"2026-12-01","mode":"detail-adds","cancelable":false,"section":"§8, vocabulary §5 restore","note":"{id} becomes {ids, id}"},{"from":"sf-thread-list-action","to":"sf-thread-list-apply","kind":"event","component":"sf-chat-threads","since":"2026-10-27","remove_after":"2026-12-01","mode":"detail-adds","cancelable":false,"section":"§8, §18.3, vocabulary §5 apply","note":"{id, action} becomes {action, scope: entry, ids, id}"},{"from":"sf-thread-list-view","to":"sf-thread-list-toggle","kind":"event","component":"sf-chat-threads","since":"2026-10-27","remove_after":"2026-12-01","mode":"same-detail","cancelable":false,"section":"§8, §3.1 (view is reserved)"},{"from":"setLoading","to":null,"kind":"action","component":"sf-chat-threads","since":"2026-10-27","remove_after":"2026-12-01","mode":"retired","section":"§4.4","note":"the setting loading; the method stays until the date and notes each call"},{"from":"setStatus","to":null,"kind":"action","component":"sf-chat-threads","since":"2026-10-27","remove_after":"2026-12-01","mode":"retired","section":"§4.4","note":"the setting status; the method stays until the date and notes each call"},{"from":"sf-thread-list","to":"sf-chat-threads","kind":"tag","component":"sf-chat-threads","since":"2026-11-03","remove_after":"2027-01-01","section":"rename plan R2 (ui-control RENAME-PLAN-2026-11-03), naming decision 2026-11-02","note":"the element is sf-chat-threads; sf-thread-list is a subclass defined beside it until the date"},{"from":"sf-thread-list-create","to":"sf-chat-threads-create","kind":"event","component":"sf-chat-threads","since":"2026-11-03","remove_after":"2027-01-01","mode":"same-detail","section":"§8","note":"the event name carries the tag"},{"from":"sf-thread-list-open","to":"sf-chat-threads-open","kind":"event","component":"sf-chat-threads","since":"2026-11-03","remove_after":"2027-01-01","mode":"same-detail","section":"§8","note":"the event name carries the tag"},{"from":"sf-thread-list-rename","to":"sf-chat-threads-rename","kind":"event","component":"sf-chat-threads","since":"2026-11-03","remove_after":"2027-01-01","mode":"same-detail","section":"§8","note":"the event name carries the tag"},{"from":"sf-thread-list-archive","to":"sf-chat-threads-archive","kind":"event","component":"sf-chat-threads","since":"2026-11-03","remove_after":"2027-01-01","mode":"same-detail","section":"§8","note":"the event name carries the tag"},{"from":"sf-thread-list-restore","to":"sf-chat-threads-restore","kind":"event","component":"sf-chat-threads","since":"2026-11-03","remove_after":"2027-01-01","mode":"same-detail","section":"§8","note":"the event name carries the tag"},{"from":"sf-thread-list-apply","to":"sf-chat-threads-apply","kind":"event","component":"sf-chat-threads","since":"2026-11-03","remove_after":"2027-01-01","mode":"same-detail","section":"§8","note":"the event name carries the tag"},{"from":"sf-thread-list-load-more","to":"sf-chat-threads-load-more","kind":"event","component":"sf-chat-threads","since":"2026-11-03","remove_after":"2027-01-01","mode":"same-detail","section":"§8","note":"the event name carries the tag"},{"from":"sf-thread-list-toggle","to":"sf-chat-threads-toggle","kind":"event","component":"sf-chat-threads","since":"2026-11-03","remove_after":"2027-01-01","mode":"same-detail","section":"§8","note":"the event name carries the tag"}]}')},"99f949a3941b"(e){e.exports=JSON.parse('{"id":"smart.chat-threads","tag":"sf-chat-threads","version":"2.0.5","kind":"leaf","settings":{"threads":{"type":"list","default":[],"of":{"id":"id","title":{"type":"string","optional":true},"updated-at":{"type":"date","optional":true},"caption":{"type":"string","optional":true},"activity":{"type":"enum","values":["running","waiting","done","stopped","failed"],"optional":true},"unread":{"type":"number","integer":true,"min":0,"optional":true},"avatar":{"type":"object","optional":true},"archived":{"type":"boolean","optional":true},"pinned":{"type":"boolean","optional":true}},"entries":{"key":"id","changes":"content"}},"has-more":{"type":"boolean","default":false},"archived":{"type":"boolean","default":false},"no-create":{"type":"boolean","default":false},"create-commands":{"type":"list","default":[],"of":{"id":"id","text":"string","icon":{"type":"string","optional":true}}},"no-manage":{"type":"boolean","default":false},"no-archive":{"type":"boolean","default":false},"group-by":{"type":"enum","values":["day","none"],"default":"day"},"label":{"type":"string","default-from":"runtime.label"},"loading":{"type":"boolean","default":false},"status":{"type":"string","default":""},"actions":{"type":"list","default":[],"of":{"id":"id","text":"string","icon":{"type":"icon","optional":true}}}},"values":{"selected":{"type":"id","default":"","controlled":true}},"events":{"create":{"carries":{"kind":{"type":"string","optional":true}}},"open":{"carries":{"id":"id"}},"rename":{"carries":{"id":"id","title":{"type":"string","schema":{"minLength":1,"maxLength":120}}}},"archive":{"carries":{"ids":{"type":"list","schema":{"items":{"type":"string"}},"optional":true},"id":"id"}},"restore":{"carries":{"ids":{"type":"list","schema":{"items":{"type":"string"}},"optional":true},"id":"id"}},"apply":{"carries":{"action":"string","scope":{"type":"enum","values":["entry"],"optional":true},"ids":{"type":"list","schema":{"items":{"type":"string"}},"optional":true},"id":"id"}},"load-more":{"carries":{"direction":{"type":"enum","values":["after"]}}},"toggle":{"carries":{"archived":"boolean"}}},"actions":{"set-threads":{"with":{"threads":{"type":"list","schema":{"items":{"type":"object","properties":{"id":{"type":["string","number"]},"title":{"type":"string"},"updated_at":{"type":"string"},"archived":{"type":"boolean"},"pinned":{"type":"boolean"},"caption":{"type":"string"},"activity":{"type":"string","enum":["running","waiting","done","stopped","failed"]},"unread":{"type":"integer","minimum":0},"avatar":{"type":"object","properties":{"image_url":{"type":"string"},"text":{"type":"string"}}}},"required":["id","title"]}}},"has-more":{"type":"boolean","optional":true}}},"append-threads":{"with":{"threads":{"type":"list","schema":{"items":{"type":"object","properties":{"id":{"type":["string","number"]},"title":{"type":"string"},"updated_at":{"type":"string"},"archived":{"type":"boolean"},"pinned":{"type":"boolean"},"caption":{"type":"string"},"activity":{"type":"string","enum":["running","waiting","done","stopped","failed"]},"unread":{"type":"integer","minimum":0},"avatar":{"type":"object","properties":{"image_url":{"type":"string"},"text":{"type":"string"}}}},"required":["id","title"]}}},"has-more":{"type":"boolean","optional":true}}},"upsert":{"with":{"thread":{"type":"object","schema":{"properties":{"id":{"type":["string","number"]},"title":{"type":"string"},"updated_at":{"type":"string"},"archived":{"type":"boolean"},"pinned":{"type":"boolean"},"caption":{"type":"string"},"activity":{"type":"string","enum":["running","waiting","done","stopped","failed"]},"unread":{"type":"integer","minimum":0},"avatar":{"type":"object","properties":{"image_url":{"type":"string"},"text":{"type":"string"}}}},"required":["id","title"]}}}},"remove-thread":{"with":{"id":"id"}},"more-failed":{},"rename":{"with":{"id":"id"}},"open-menu":{"with":{"id":"id"}}},"presentation":{"skeleton":{"late":["threads"]}},"host-states":{},"css-variables":{"--sf-thread-list-inset":{"type":"length","state":"default"},"--sf-thread-list-row-height":{"type":"length","state":"default"},"--sf-thread-list-radius":{"type":"length","state":"default"},"--sf-thread-list-hover-background-color":{"type":"color","state":"hover"},"--sf-thread-list-current-background-color":{"type":"color","state":"current"}}}')},"86e6dcdc95d2"(e){e.exports=JSON.parse('{"title":"Thread list","runtime":{"activity-done":"Ready","activity-failed":"Failed","activity-running":"Running","activity-stopped":"Stopped","activity-waiting":"Needs your input","archive-empty-text":"The archive is empty","archive-text":"Archive","archive-view":"Archive","back-text":"Back to conversations","create-text":"New conversation","empty-text":"No conversations yet","label":"Conversations","unarchive-text":"Restore from archive"}}')},"0a15015f52cc"(e){e.exports=JSON.parse('{"title":"Список разговоров","runtime":{"activity-done":"Готово","activity-failed":"Не удалось","activity-running":"Выполняется","activity-stopped":"Остановлено","activity-waiting":"Нужен ваш ответ","archive-empty-text":"В архиве пусто","archive-text":"В архив","archive-view":"Архив","back-text":"К разговорам","create-text":"Новый разговор","empty-text":"Разговоров пока нет","label":"Разговоры","unarchive-text":"Вернуть из архива"}}')}};const t={};function a(i){const s=t[i];if(void 0!==s)return s.exports;const r=t[i]={exports:{}};return e[i](r,r.exports,a),r.exports}(()=>{const e="function"==typeof Symbol,t=e?Symbol("webpack queues"):"__webpack_queues__",i=e?Symbol("webpack exports"):"__webpack_exports__",s=e?Symbol("webpack error"):"__webpack_error__",r=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};a.a=(e,a,n)=>{let o;n&&((o=[]).d=-1);const d=new Set,h=e.exports;let c,l,p;const m=new Promise((e,t)=>{p=t,l=e});m[i]=h,m[t]=e=>(o&&e(o),d.forEach(e),m.catch(e=>{})),e.exports=m;a(e=>{let a;c=(e=>e.map(e=>{if(null!==e&&"object"==typeof e){if(e[t])return e;if(e.then){const a=[];a.d=0,e.then(e=>{n[i]=e,r(a)},e=>{n[s]=e,r(a)});const n={};return n[t]=e=>e(a),n}}const a={};return a[t]=e=>{},a[i]=e,a}))(e);const n=()=>c.map(e=>{if(e[s])throw e[s];return e[i]}),h=new Promise(e=>{a=()=>e(n),a.r=0;const i=e=>e!==o&&!d.has(e)&&(d.add(e),e&&!e.d&&(a.r++,e.push(a)));c.map(e=>e[t](i))});return a.r?h:n()},e=>(e?p(m[s]=e):l(h),r(o))),o?.d<0&&(o.d=0)}})(),a.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var s=t[i++],r=t[i++];a.o(e,s)?0===r&&i++:0===r?Object.defineProperty(e,s,{enumerable:!0,value:t[i++]}):Object.defineProperty(e,s,{enumerable:!0,get:r})}else for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);a("26a07784f30a")})();
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Thread list",
|
|
3
|
+
"runtime": {
|
|
4
|
+
"activity-done": "Ready",
|
|
5
|
+
"activity-failed": "Failed",
|
|
6
|
+
"activity-running": "Running",
|
|
7
|
+
"activity-stopped": "Stopped",
|
|
8
|
+
"activity-waiting": "Needs your input",
|
|
9
|
+
"archive-empty-text": "The archive is empty",
|
|
10
|
+
"archive-text": "Archive",
|
|
11
|
+
"archive-view": "Archive",
|
|
12
|
+
"back-text": "Back to conversations",
|
|
13
|
+
"create-text": "New conversation",
|
|
14
|
+
"empty-text": "No conversations yet",
|
|
15
|
+
"label": "Conversations",
|
|
16
|
+
"unarchive-text": "Restore from archive"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Список разговоров",
|
|
3
|
+
"runtime": {
|
|
4
|
+
"activity-done": "Готово",
|
|
5
|
+
"activity-failed": "Не удалось",
|
|
6
|
+
"activity-running": "Выполняется",
|
|
7
|
+
"activity-stopped": "Остановлено",
|
|
8
|
+
"activity-waiting": "Нужен ваш ответ",
|
|
9
|
+
"archive-empty-text": "В архиве пусто",
|
|
10
|
+
"archive-text": "В архив",
|
|
11
|
+
"archive-view": "Архив",
|
|
12
|
+
"back-text": "К разговорам",
|
|
13
|
+
"create-text": "Новый разговор",
|
|
14
|
+
"empty-text": "Разговоров пока нет",
|
|
15
|
+
"label": "Разговоры",
|
|
16
|
+
"unarchive-text": "Вернуть из архива"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "sf-chat-threads",
|
|
3
|
+
"probe": "sf-thread-list against component.json (standard simai.smart-component 1.3.8 §12, gate 20)",
|
|
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 style=\"display: flex; gap: 16px\">",
|
|
9
|
+
" <div style=\"inline-size: 320px; block-size: 420px\"><sf-chat-threads id=\"list\" group-by=\"none\" selected=\"t1\"></sf-chat-threads></div>",
|
|
10
|
+
" <div style=\"inline-size: 320px; block-size: 420px\"><sf-chat-threads id=\"archive\" archived group-by=\"none\"></sf-chat-threads></div>",
|
|
11
|
+
"</main>",
|
|
12
|
+
"<script>customElements.whenDefined('sf-chat-threads').then(() => {const list = document.querySelector('#list'); list.threads = [{\"id\": \"t1\", \"title\": \"Отпуск в ноябре\", \"caption\": \"Анна: подпишу завтра\", \"updated-at\": \"2026-10-27T09:00:00Z\", \"unread\": 2}, {\"id\": \"t2\", \"title\": \"Отчёт за квартал\", \"caption\": \"Вы: отправил\", \"updated-at\": \"2026-10-26T15:00:00Z\"}, {\"id\": \"t3\", \"title\": \"Новый сотрудник\", \"updated-at\": \"2026-10-20T10:00:00Z\", \"avatar\": {\"text\": \"НС\"}}]; list.actions = [{id: 'pin', text: 'Закрепить'}];const archive = document.querySelector('#archive'); archive.threads = [{\"id\": \"t9\", \"title\": \"Старый проект\", \"updated-at\": \"2026-09-01T10:00:00Z\", \"archived\": true}];});</script>"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"probes": [
|
|
16
|
+
{
|
|
17
|
+
"id": "p1-arrows-enter-open",
|
|
18
|
+
"title": "one Tab stop for the list; ArrowDown and End move between rows; Enter asks open {id}: sf-thread-list-open once and sf-thread-list-select once, noted with its dates",
|
|
19
|
+
"covers": "keyboard.row ArrowDown focus:next, End focus:last, Enter open, events.open, aliases sf-thread-list-select, accessibility.name runtime.label",
|
|
20
|
+
"steps": [
|
|
21
|
+
{
|
|
22
|
+
"script": "(document.querySelector('#list .sf-list__row[data-id=\"t1\"] .sf-list-item[data-sf-list-roving]').focus(), true)",
|
|
23
|
+
"wait": 60,
|
|
24
|
+
"check": "document.querySelectorAll('#list .sf-list-item[data-sf-list-roving][tabindex=\"0\"]').length === 1 && document.querySelector('#list nav').getAttribute('aria-label') === 'Разговоры'"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"user": "keyboard:ArrowDown",
|
|
28
|
+
"wait": 60,
|
|
29
|
+
"check": "document.activeElement === document.querySelector('#list .sf-list__row[data-id=\"t2\"] .sf-list-item[data-sf-list-roving]')"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"user": "keyboard:End",
|
|
33
|
+
"wait": 60,
|
|
34
|
+
"check": "document.activeElement === document.querySelector('#list .sf-list__row[data-id=\"t3\"] .sf-list-item[data-sf-list-roving]')"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"user": "keyboard:Enter",
|
|
38
|
+
"expect": {
|
|
39
|
+
"events": [
|
|
40
|
+
{
|
|
41
|
+
"name": "sf-chat-threads-open",
|
|
42
|
+
"count": 1,
|
|
43
|
+
"detail": {
|
|
44
|
+
"id": "t3"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "sf-thread-list-select",
|
|
49
|
+
"count": 1,
|
|
50
|
+
"detail": {
|
|
51
|
+
"id": "t3"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"journal": [
|
|
56
|
+
{
|
|
57
|
+
"from": "sf-thread-list-select",
|
|
58
|
+
"to": "sf-thread-list-open",
|
|
59
|
+
"since": "2026-10-27",
|
|
60
|
+
"remove_after": "2026-12-01"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"check": "document.querySelector('#list').selected === 't1'"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "p2-f2-rename",
|
|
70
|
+
"title": "F2 opens the rename field; Escape reverts without an event; F2 again and Enter keep the new title: sf-thread-list-rename {id, title} once",
|
|
71
|
+
"covers": "keyboard.row F2 rename, accessibility.keys Escape revert, Enter commit, events.rename",
|
|
72
|
+
"steps": [
|
|
73
|
+
{
|
|
74
|
+
"script": "(document.querySelector('#list .sf-list__row[data-id=\"t2\"] .sf-list-item[data-sf-list-roving]').focus(), true)",
|
|
75
|
+
"wait": 60
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"user": "keyboard:F2",
|
|
79
|
+
"wait": 120,
|
|
80
|
+
"check": "document.activeElement === document.querySelector('#list .sf-list__rename')"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"user": "keyboard:Escape",
|
|
84
|
+
"expect": {
|
|
85
|
+
"events": [
|
|
86
|
+
{
|
|
87
|
+
"name": "sf-chat-threads-rename",
|
|
88
|
+
"count": 0
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"check": "!document.querySelector('#list .sf-list__rename') && document.activeElement === document.querySelector('#list .sf-list__row[data-id=\"t2\"] .sf-list-item[data-sf-list-roving]')"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"user": "keyboard:F2",
|
|
96
|
+
"wait": 120
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"script": "(document.querySelector('#list .sf-list__rename').value = 'Отчёт за третий квартал', true)",
|
|
100
|
+
"wait": 30
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"user": "keyboard:Enter",
|
|
104
|
+
"expect": {
|
|
105
|
+
"events": [
|
|
106
|
+
{
|
|
107
|
+
"name": "sf-chat-threads-rename",
|
|
108
|
+
"count": 1,
|
|
109
|
+
"detail": {
|
|
110
|
+
"id": "t2",
|
|
111
|
+
"title": "Отчёт за третий квартал"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"check": "document.querySelector('#list .sf-list__row[data-id=\"t2\"] sf-list-item').getAttribute('text') === 'Отчёт за третий квартал'"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "p3-menu-archive-apply",
|
|
122
|
+
"title": "Shift+F10 opens the row's actions; Archive sends archive {ids, id}; the host's own action sends apply {action, scope: entry, ids} and the old -action once, noted",
|
|
123
|
+
"covers": "keyboard.row Shift+F10 open-menu, events.archive, events.apply, aliases sf-thread-list-action",
|
|
124
|
+
"steps": [
|
|
125
|
+
{
|
|
126
|
+
"script": "(document.querySelector('#list .sf-list__row[data-id=\"t1\"] .sf-list-item[data-sf-list-roving]').focus(), true)",
|
|
127
|
+
"wait": 60
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"user": "keyboard:Shift+F10",
|
|
131
|
+
"wait": 300,
|
|
132
|
+
"check": "document.querySelector('#list sf-list').menu.entries.map((one) => one.id).join() === 'rename,action:archive,action:host:pin'"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"script": "(document.querySelector('#list sf-list').onMenu({id: 'action:archive'}), true)",
|
|
136
|
+
"expect": {
|
|
137
|
+
"events": [
|
|
138
|
+
{
|
|
139
|
+
"name": "sf-chat-threads-archive",
|
|
140
|
+
"count": 1,
|
|
141
|
+
"detail": {
|
|
142
|
+
"ids": [
|
|
143
|
+
"t1"
|
|
144
|
+
],
|
|
145
|
+
"id": "t1"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"script": "(document.querySelector('#list sf-list').onMenu({id: 'action:host:pin'}), true)",
|
|
153
|
+
"expect": {
|
|
154
|
+
"events": [
|
|
155
|
+
{
|
|
156
|
+
"name": "sf-chat-threads-apply",
|
|
157
|
+
"count": 1,
|
|
158
|
+
"detail": {
|
|
159
|
+
"action": "pin",
|
|
160
|
+
"scope": "entry",
|
|
161
|
+
"ids": [
|
|
162
|
+
"t1"
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "sf-thread-list-action",
|
|
168
|
+
"count": 1,
|
|
169
|
+
"detail": {
|
|
170
|
+
"id": "t1",
|
|
171
|
+
"action": "pin"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"journal": [
|
|
176
|
+
{
|
|
177
|
+
"from": "sf-thread-list-action",
|
|
178
|
+
"to": "sf-thread-list-apply"
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "p4-restore",
|
|
187
|
+
"title": "in the archive the row's action is Restore: restore {ids, id} and the old -unarchive once, noted",
|
|
188
|
+
"covers": "events.restore, aliases sf-thread-list-unarchive",
|
|
189
|
+
"steps": [
|
|
190
|
+
{
|
|
191
|
+
"action": {
|
|
192
|
+
"name": "open-menu",
|
|
193
|
+
"with": {
|
|
194
|
+
"id": "t9"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"target": "#archive",
|
|
198
|
+
"wait": 300,
|
|
199
|
+
"expect": {
|
|
200
|
+
"returns": {
|
|
201
|
+
"outcome": "applied"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"check": "document.querySelector('#archive sf-list').menu.entries.map((one) => one.id).join() === 'rename,action:restore'"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"script": "(document.querySelector('#archive sf-list').onMenu({id: 'action:restore'}), true)",
|
|
208
|
+
"expect": {
|
|
209
|
+
"events": [
|
|
210
|
+
{
|
|
211
|
+
"name": "sf-chat-threads-restore",
|
|
212
|
+
"count": 1,
|
|
213
|
+
"detail": {
|
|
214
|
+
"ids": [
|
|
215
|
+
"t9"
|
|
216
|
+
],
|
|
217
|
+
"id": "t9"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "sf-thread-list-unarchive",
|
|
222
|
+
"count": 1,
|
|
223
|
+
"detail": {
|
|
224
|
+
"id": "t9"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"journal": [
|
|
229
|
+
{
|
|
230
|
+
"from": "sf-thread-list-unarchive",
|
|
231
|
+
"to": "sf-thread-list-restore"
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"id": "p5-archive-view",
|
|
240
|
+
"title": "the way to the archive sends toggle {archived: true} and the old -view once, noted; the way back toggle {archived: false}",
|
|
241
|
+
"covers": "events.toggle, aliases sf-thread-list-view",
|
|
242
|
+
"steps": [
|
|
243
|
+
{
|
|
244
|
+
"user": "click:#list [data-action=\"archive-view\"]",
|
|
245
|
+
"expect": {
|
|
246
|
+
"events": [
|
|
247
|
+
{
|
|
248
|
+
"name": "sf-chat-threads-toggle",
|
|
249
|
+
"count": 1,
|
|
250
|
+
"detail": {
|
|
251
|
+
"archived": true
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"name": "sf-thread-list-view",
|
|
256
|
+
"count": 1,
|
|
257
|
+
"detail": {
|
|
258
|
+
"archived": true
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"journal": [
|
|
263
|
+
{
|
|
264
|
+
"from": "sf-thread-list-view",
|
|
265
|
+
"to": "sf-thread-list-toggle"
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"user": "click:#archive [data-action=\"back\"]",
|
|
272
|
+
"expect": {
|
|
273
|
+
"events": [
|
|
274
|
+
{
|
|
275
|
+
"name": "sf-chat-threads-toggle",
|
|
276
|
+
"count": 1,
|
|
277
|
+
"detail": {
|
|
278
|
+
"archived": false
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"id": "p6-settings-and-outcomes",
|
|
288
|
+
"title": "loading and status are settings; setLoading, the 1.0 setter, still works and is noted; actions answer outcomes; has-more asks load-more {direction: after} once",
|
|
289
|
+
"covers": "settings.loading, settings.status, actions rename/remove-thread outcomes, events.load-more",
|
|
290
|
+
"steps": [
|
|
291
|
+
{
|
|
292
|
+
"script": "document.querySelector('#list').setLoading(true)",
|
|
293
|
+
"expect": {
|
|
294
|
+
"returns": {
|
|
295
|
+
"outcome": "applied"
|
|
296
|
+
},
|
|
297
|
+
"journal": [
|
|
298
|
+
{
|
|
299
|
+
"from": "setLoading",
|
|
300
|
+
"kind": "action",
|
|
301
|
+
"since": "2026-10-27",
|
|
302
|
+
"remove_after": "2026-12-01"
|
|
303
|
+
}
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"check": "document.querySelector('#list').hasAttribute('loading') && document.querySelector('#list sf-list').hasAttribute('loading')"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"script": "(document.querySelector('#list').loading = false, document.querySelector('#list').status = 'Не удалось загрузить', true)",
|
|
310
|
+
"wait": 200,
|
|
311
|
+
"check": "document.querySelector('#list .sf-thread-list__status').textContent === 'Не удалось загрузить'"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"action": {
|
|
315
|
+
"name": "rename",
|
|
316
|
+
"with": {
|
|
317
|
+
"id": "nope"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"target": "#list",
|
|
321
|
+
"expect": {
|
|
322
|
+
"returns": {
|
|
323
|
+
"outcome": "refused",
|
|
324
|
+
"reason": "unknown"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"action": {
|
|
330
|
+
"name": "remove-thread",
|
|
331
|
+
"with": {
|
|
332
|
+
"id": "t3"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"target": "#list",
|
|
336
|
+
"expect": {
|
|
337
|
+
"returns": {
|
|
338
|
+
"outcome": "applied"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"check": "!document.querySelector('#list .sf-list__row[data-id=\"t3\"]')"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"script": "(document.querySelector('#list').hasMore = true, await new Promise((done) => setTimeout(done, 300)), [...document.querySelectorAll('#list sf-list button')].find((button) => /Показать ещё/u.test(button.textContent)).click(), true)",
|
|
345
|
+
"wait": 500,
|
|
346
|
+
"expect": {
|
|
347
|
+
"events": [
|
|
348
|
+
{
|
|
349
|
+
"name": "sf-chat-threads-load-more",
|
|
350
|
+
"count": 1,
|
|
351
|
+
"detail": {
|
|
352
|
+
"direction": "after"
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"id": "p-create-commands",
|
|
362
|
+
"title": "create-commands stand in for New conversation; a press says create {kind: id}, the one button says create {}; no-create and the archive take them away",
|
|
363
|
+
"covers": "settings.create-commands, events.create",
|
|
364
|
+
"steps": [
|
|
365
|
+
{
|
|
366
|
+
"check": "document.querySelectorAll('#list .sf-thread-list__head .sf-thread-list__command:not([hidden])').length === 1 && document.querySelector('#list .sf-thread-list__command[data-action=\"create\"]')"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"user": "click:#list .sf-thread-list__command[data-action=\"create\"]",
|
|
370
|
+
"wait": 100,
|
|
371
|
+
"event": "sf-chat-threads-create"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"script": "(document.querySelector('#list').createCommands = [{id: 'private', text: 'Новый диалог', icon: 'person_add'}, {id: 'group', text: 'Новая группа', icon: 'group_add'}], document.querySelector('#archive').createCommands = [{id: 'group', text: 'Новая группа'}], true)",
|
|
375
|
+
"wait": 200,
|
|
376
|
+
"check": "[...document.querySelectorAll('#list .sf-thread-list__head .sf-thread-list__command:not([hidden])')].map((one) => one.querySelector(':scope > span').textContent.trim()).join() === 'Новый диалог,Новая группа' && !document.querySelector('#archive .sf-thread-list__command[data-action=\"create:group\"]:not([hidden])')"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"user": "click:#list .sf-thread-list__command[data-action=\"create:group\"]",
|
|
380
|
+
"wait": 100,
|
|
381
|
+
"event": "sf-chat-threads-create",
|
|
382
|
+
"detail": {
|
|
383
|
+
"kind": "group"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"script": "(document.querySelector('#list').toggleAttribute('no-create', true), true)",
|
|
388
|
+
"wait": 200,
|
|
389
|
+
"check": "document.querySelector('#list .sf-thread-list__head').hidden"
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"id": "p-avatar-shape-icon",
|
|
395
|
+
"title": "1.6.0, 2.0.0: avatar.shape and avatar.icon reach sf-list's row; a row without an avatar draws none (sf-list aligns the titles of a list that has some)",
|
|
396
|
+
"covers": "settings.threads, compatibility.1.6.0",
|
|
397
|
+
"steps": [
|
|
398
|
+
{
|
|
399
|
+
"script": "(document.querySelector('#list').threads = [{id: 'a', title: 'Анна', 'updated-at': '2026-10-27T09:00:00Z', avatar: {text: 'АН'}}, {id: 'g', title: 'Группа', 'updated-at': '2026-10-26T09:00:00Z', avatar: {text: 'ГР', shape: 'square'}}, {id: 'c', title: 'Канал', 'updated-at': '2026-10-25T09:00:00Z', avatar: {icon: 'campaign', shape: 'square'}}, {id: 'b', title: 'Бот', 'updated-at': '2026-10-24T09:00:00Z', avatar: {icon: 'bolt'}}, {id: 'n', title: 'ИИ-разговор', 'updated-at': '2026-10-23T09:00:00Z'}], true)",
|
|
400
|
+
"wait": 300,
|
|
401
|
+
"check": "(() => { const row = (id) => document.querySelector('#list .sf-list__row[data-id=\"' + id + '\"]'); const sign = (id) => row(id).querySelector('.sf-list__sign sf-icon'); const left = (id) => row(id).querySelector('.sf-list-item__text, [class*=\"__headline\"], sf-list-item').getBoundingClientRect().left; const picture = (id) => row(id).querySelector('.sf-avatar:not(.sf-list__sign)'); return picture('g').classList.contains('sf-avatar--square') && Boolean(picture('a')) && !picture('a').classList.contains('sf-avatar--square') && sign('c')?.getAttribute('icon') === 'campaign' && row('c').querySelector('.sf-list__sign').classList.contains('sf-avatar--square') && sign('b')?.getAttribute('icon') === 'bolt' && !row('b').querySelector('.sf-list__sign').classList.contains('sf-avatar--square') && !row('n').querySelector('.sf-avatar'); })()"
|
|
402
|
+
}
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
]
|
|
406
|
+
}
|
|
Binary file
|