@aikaara/chat-sdk 1.4.15 → 1.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AikaaraLinkButton-rE4Aoe2C.mjs → AikaaraLinkButton-CrgtBJ-e.mjs} +1 -1
- package/dist/{AikaaraLinkButton-DOC-BIeg.cjs → AikaaraLinkButton-DEwoR-nX.cjs} +1 -1
- package/dist/{MountTenant-BHODAGyO.cjs → MountTenant-Co-AniOp.cjs} +90 -47
- package/dist/{MountTenant-DDlxWwpK.mjs → MountTenant-DgfQP1V5.mjs} +1033 -910
- package/dist/cdn/aikaara-chat.iife.js +92 -49
- package/dist/headless.cjs +1 -1
- package/dist/headless.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +51 -0
- package/dist/ui.mjs +5 -4
- package/package.json +1 -1
package/dist/headless.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-Co-AniOp.cjs");class s extends e.EventEmitter{registration=null;pendingEdits=[];constructor(t){super(),this.setupListeners(t)}registerForm(t){this.registration=t;const i=this.pendingEdits.filter(r=>r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId));if(i.length>0){for(const r of i)t.onFieldUpdate(r.fields),this.emit("edit:applied",{entityType:r.entity_type,entityId:r.entity_id,fields:r.fields});this.pendingEdits=this.pendingEdits.filter(r=>!(r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId)))}}unregisterForm(t,i){this.registration?.entityType===t&&String(this.registration?.entityId)===String(i)&&(this.registration=null)}get currentForm(){return this.registration}pushFieldUpdates(t,i,r){this.registration&&this.registration.entityType===t&&String(this.registration.entityId)===String(i)?(this.registration.onFieldUpdate(r),this.emit("edit:applied",{entityType:t,entityId:i,fields:r})):(this.pendingEdits.push({action:"edit_entity",entity_type:t,entity_id:i,fields:r}),this.emit("edit:pending",{entityType:t,entityId:i,fields:r}))}async requestSave(){if(!this.registration)return{success:!1,error:"No form registered"};try{return await this.registration.onSave(),this.emit("save:success",{entityType:this.registration.entityType,entityId:this.registration.entityId}),{success:!0}}catch(t){const i=t instanceof Error?t.message:"Save failed";return this.emit("save:error",{entityType:this.registration.entityType,entityId:this.registration.entityId,error:i}),{success:!1,error:i}}}async requestTest(t){if(!this.registration?.onTest)return{success:!1,error:"Current form does not support testing"};try{return await this.registration.onTest(t),{success:!0}}catch(i){return{success:!1,error:i instanceof Error?i.message:"Test failed"}}}setupListeners(t){t.on("action:edit_entity",i=>{this.pushFieldUpdates(i.entity_type,i.entity_id,i.fields)}),t.on("action:save_entity",i=>{this.requestSave()}),t.on("action:test_tool",i=>{this.emit("test:triggered",{toolId:i.tool_id,parameters:i.parameters}),this.requestTest(i.parameters)})}}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatClient=e.AikaaraChatClient;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.runMethodSelectPreflight=e.runMethodSelectPreflight;exports.FormBridge=s;
|
package/dist/headless.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as s } from "./MountTenant-
|
|
2
|
-
import { A as p, b as l, k as g, C as c, l as h, m as y, M as u, S as m, n as f, T, o as S, p as _, q as v, s as E, t as C, u as F, v as k, w as A, x as I, y as x, z as U, B as q, D as M, F as b, G as w } from "./MountTenant-
|
|
1
|
+
import { E as s } from "./MountTenant-DgfQP1V5.mjs";
|
|
2
|
+
import { A as p, b as l, k as g, C as c, l as h, m as y, M as u, S as m, n as f, T, o as S, p as _, q as v, s as E, t as C, u as F, v as k, w as A, x as I, y as x, z as U, B as q, D as M, F as b, G as w } from "./MountTenant-DgfQP1V5.mjs";
|
|
3
3
|
class a extends s {
|
|
4
4
|
registration = null;
|
|
5
5
|
pendingEdits = [];
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-Co-AniOp.cjs"),s=require("./headless.cjs");function l(a){e.registerComponents();const t=document.createElement("aikaara-chat-widget"),i={baseUrl:"base-url",userToken:"user-token",apiKey:"api-key",title:"title",subtitle:"subtitle",theme:"theme",primaryColor:"primary-color",position:"position",width:"width",height:"height",placeholder:"placeholder",welcomeMessage:"welcome-message",avatarUrl:"avatar-url"};for(const[o,n]of Object.entries(i)){const r=a[o];r!=null&&t.setAttribute(n,String(r))}return t.configure(a),document.body.appendChild(t),t}function d(){const a=document.querySelector("aikaara-chat-widget");a&&a.remove()}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatBubble=e.AikaaraChatBubble;exports.AikaaraChatClient=e.AikaaraChatClient;exports.AikaaraChatHeader=e.AikaaraChatHeader;exports.AikaaraChatInput=e.AikaaraChatInput;exports.AikaaraChatWidget=e.AikaaraChatWidget;exports.AikaaraErrorBanner=e.AikaaraErrorBanner;exports.AikaaraMessageBubble=e.AikaaraMessageBubble;exports.AikaaraMessageList=e.AikaaraMessageList;exports.AikaaraStreamingMessage=e.AikaaraStreamingMessage;exports.AikaaraTypingIndicator=e.AikaaraTypingIndicator;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.registerComponents=e.registerComponents;exports.runMethodSelectPreflight=e.runMethodSelectPreflight;exports.FormBridge=s.FormBridge;exports.mount=l;exports.unmount=d;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as o } from "./MountTenant-
|
|
2
|
-
import { A as u, a as m, b as g, c as h, d as k, e as A, f as C, g as T, h as b, i as f, j as v, k as S, C as y, l as M, m as w, E, M as x, S as B, n as F, T as U, o as D, p as I, q as P, s as j, t as q, u as H, v as R, w as W, x as z, y as G, z as K, B as L, D as O, F as J, G as N } from "./MountTenant-
|
|
1
|
+
import { r as o } from "./MountTenant-DgfQP1V5.mjs";
|
|
2
|
+
import { A as u, a as m, b as g, c as h, d as k, e as A, f as C, g as T, h as b, i as f, j as v, k as S, C as y, l as M, m as w, E, M as x, S as B, n as F, T as U, o as D, p as I, q as P, s as j, t as q, u as H, v as R, w as W, x as z, y as G, z as K, B as L, D as O, F as J, G as N } from "./MountTenant-DgfQP1V5.mjs";
|
|
3
3
|
import { FormBridge as V } from "./headless.mjs";
|
|
4
4
|
function l(e) {
|
|
5
5
|
o();
|
package/dist/ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-Co-AniOp.cjs");exports.AikaaraChat=a.AikaaraChat;exports.AikaaraChatBubble=a.AikaaraChatBubble;exports.AikaaraChatHeader=a.AikaaraChatHeader;exports.AikaaraChatInput=a.AikaaraChatInput;exports.AikaaraChatWidget=a.AikaaraChatWidget;exports.AikaaraComparePlans=a.AikaaraComparePlans;exports.AikaaraErrorBanner=a.AikaaraErrorBanner;exports.AikaaraLinkModal=a.AikaaraLinkModal;exports.AikaaraMessageBubble=a.AikaaraMessageBubble;exports.AikaaraMessageList=a.AikaaraMessageList;exports.AikaaraModalAction=a.AikaaraModalAction;exports.AikaaraOptionList=a.AikaaraOptionList;exports.AikaaraSchemaForm=a.AikaaraSchemaForm;exports.AikaaraSmartEditModal=a.AikaaraSmartEditModal;exports.AikaaraStreamingMessage=a.AikaaraStreamingMessage;exports.AikaaraSubmitAction=a.AikaaraSubmitAction;exports.AikaaraSystemPill=a.AikaaraSystemPill;exports.AikaaraTemplateRenderer=a.AikaaraTemplateRenderer;exports.AikaaraTextInput=a.AikaaraTextInput;exports.AikaaraTypingIndicator=a.AikaaraTypingIndicator;exports.registerComponents=a.registerComponents;
|
package/dist/ui.d.ts
CHANGED
|
@@ -558,6 +558,28 @@ export declare class AikaaraTemplateRenderer extends HTMLElement {
|
|
|
558
558
|
private mountModal;
|
|
559
559
|
}
|
|
560
560
|
|
|
561
|
+
export declare class AikaaraTextInput extends HTMLElement {
|
|
562
|
+
private shadow;
|
|
563
|
+
private data;
|
|
564
|
+
private _value;
|
|
565
|
+
private _error;
|
|
566
|
+
private _touched;
|
|
567
|
+
constructor();
|
|
568
|
+
connectedCallback(): void;
|
|
569
|
+
setPayload(payload: TextInputPayload): void;
|
|
570
|
+
/** Returns { name, values, type } — same shape as AikaaraOptionList.getValues() */
|
|
571
|
+
getValues(): {
|
|
572
|
+
name: string;
|
|
573
|
+
values: string[];
|
|
574
|
+
type: string;
|
|
575
|
+
};
|
|
576
|
+
/** Returns true if field is valid (required check + regex). Marks field as touched so error shows. */
|
|
577
|
+
validate(): boolean;
|
|
578
|
+
private _computeError;
|
|
579
|
+
private _updateError;
|
|
580
|
+
private render;
|
|
581
|
+
}
|
|
582
|
+
|
|
561
583
|
export declare class AikaaraTypingIndicator extends HTMLElement {
|
|
562
584
|
private shadow;
|
|
563
585
|
constructor();
|
|
@@ -1143,6 +1165,35 @@ declare interface TextField extends BaseField {
|
|
|
1143
1165
|
pattern?: string;
|
|
1144
1166
|
}
|
|
1145
1167
|
|
|
1168
|
+
/**
|
|
1169
|
+
* Text input field for contentType=300 forms.
|
|
1170
|
+
*
|
|
1171
|
+
* Payload shape (from templateId=12 gst_details_form):
|
|
1172
|
+
* { type: 'text', data: {
|
|
1173
|
+
* label: string,
|
|
1174
|
+
* placeholder?: string,
|
|
1175
|
+
* required?: boolean,
|
|
1176
|
+
* validation?: { regex: string, errorText: string }
|
|
1177
|
+
* }}
|
|
1178
|
+
*
|
|
1179
|
+
* Exposes getValues() → { name, values, type } matching AikaaraOptionList's
|
|
1180
|
+
* interface so AikaaraSubmitAction.collectFormValues() can pick it up.
|
|
1181
|
+
*
|
|
1182
|
+
* Theming:
|
|
1183
|
+
* --aikaara-input-bg, --aikaara-input-border, --aikaara-input-border-focus,
|
|
1184
|
+
* --aikaara-input-radius, --aikaara-input-color, --aikaara-input-label-color,
|
|
1185
|
+
* --aikaara-input-error-color, --aikaara-input-placeholder-color
|
|
1186
|
+
*/
|
|
1187
|
+
declare interface TextInputPayload {
|
|
1188
|
+
label: string;
|
|
1189
|
+
placeholder?: string;
|
|
1190
|
+
required?: boolean;
|
|
1191
|
+
validation?: {
|
|
1192
|
+
regex: string;
|
|
1193
|
+
errorText: string;
|
|
1194
|
+
};
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1146
1197
|
declare interface TiledeskFileTemplateConfig {
|
|
1147
1198
|
templateId: string;
|
|
1148
1199
|
headerImgSrc?: string;
|
package/dist/ui.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as i, a as s, c as e, d as t, e as A, J as k, f as n, K as o, g as m, h as d, L as l, N as g, O as
|
|
1
|
+
import { I as i, a as s, c as e, d as t, e as A, J as k, f as n, K as o, g as m, h as d, L as l, N as g, O as p, P as h, i as C, Q as M, R as b, U as c, V as u, j as S, r as I } from "./MountTenant-DgfQP1V5.mjs";
|
|
2
2
|
export {
|
|
3
3
|
i as AikaaraChat,
|
|
4
4
|
s as AikaaraChatBubble,
|
|
@@ -12,12 +12,13 @@ export {
|
|
|
12
12
|
d as AikaaraMessageList,
|
|
13
13
|
l as AikaaraModalAction,
|
|
14
14
|
g as AikaaraOptionList,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
p as AikaaraSchemaForm,
|
|
16
|
+
h as AikaaraSmartEditModal,
|
|
17
17
|
C as AikaaraStreamingMessage,
|
|
18
18
|
M as AikaaraSubmitAction,
|
|
19
19
|
b as AikaaraSystemPill,
|
|
20
20
|
c as AikaaraTemplateRenderer,
|
|
21
|
+
u as AikaaraTextInput,
|
|
21
22
|
S as AikaaraTypingIndicator,
|
|
22
|
-
|
|
23
|
+
I as registerComponents
|
|
23
24
|
};
|