@deepdesk/deepdesk-sdk 10.1.10 → 10.1.11
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/index.cjs.js +4 -4
- package/dist/index.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.esm.js +4 -4
- package/dist/index.iife.js +10 -10
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -246,7 +246,6 @@ declare abstract class InputMediator<HTMLElementType extends HTMLElement> {
|
|
|
246
246
|
protected disposeHandlers: (() => void)[];
|
|
247
247
|
protected currentText: string;
|
|
248
248
|
protected currentHTML: string | null;
|
|
249
|
-
protected currentSelection: SelectionRange | null;
|
|
250
249
|
protected isFocused: boolean;
|
|
251
250
|
protected isActive: boolean;
|
|
252
251
|
protected isSettingValue: boolean;
|
|
@@ -1969,7 +1968,6 @@ declare class DeepdeskSDK {
|
|
|
1969
1968
|
* Method to call when the agent input has changed
|
|
1970
1969
|
*/
|
|
1971
1970
|
private notifyInputChanged;
|
|
1972
|
-
private syncInputHtml;
|
|
1973
1971
|
/**
|
|
1974
1972
|
* Method to call for the agent input keydown event
|
|
1975
1973
|
*/
|
|
@@ -2048,9 +2046,11 @@ declare class DeepdeskSDK {
|
|
|
2048
2046
|
|
|
2049
2047
|
declare class ContentEditableInput extends InputMediator<HTMLDivElement> {
|
|
2050
2048
|
protected observer?: MutationObserver;
|
|
2049
|
+
protected lastKnownSelection: SelectionRange | null;
|
|
2051
2050
|
getText(): string;
|
|
2052
2051
|
getHTML(): string;
|
|
2053
|
-
|
|
2052
|
+
getRange(): Range | null;
|
|
2053
|
+
getSelection(): SelectionRange;
|
|
2054
2054
|
getSelectedText(): string;
|
|
2055
2055
|
applyChanges(callback: (element: HTMLDivElement) => void | Promise<void>): void;
|
|
2056
2056
|
listen(): void;
|
|
@@ -2058,6 +2058,7 @@ declare class ContentEditableInput extends InputMediator<HTMLDivElement> {
|
|
|
2058
2058
|
}
|
|
2059
2059
|
|
|
2060
2060
|
declare class TextAreaInput extends InputMediator<HTMLTextAreaElement> {
|
|
2061
|
+
protected lastKnownSelection: SelectionRange | null;
|
|
2061
2062
|
getText(): string;
|
|
2062
2063
|
getHTML(): string | null;
|
|
2063
2064
|
getSelection(): SelectionRange;
|
|
@@ -2093,6 +2094,7 @@ type ContentEditableOptions = {
|
|
|
2093
2094
|
replace?: SelectionRange;
|
|
2094
2095
|
selectionAfter?: SelectionRange | false;
|
|
2095
2096
|
setRange?: (range: Range) => void | Promise<void>;
|
|
2097
|
+
insertBRs?: boolean;
|
|
2096
2098
|
};
|
|
2097
2099
|
declare function updateContentEditable(element: HTMLElement, insertText: string, options?: ContentEditableOptions): Promise<void>;
|
|
2098
2100
|
|
|
@@ -2143,6 +2145,7 @@ interface TargetFileOptions {
|
|
|
2143
2145
|
}
|
|
2144
2146
|
declare function attachFile(fileInput: HTMLInputElement, target: TargetFileOptions): Promise<void>;
|
|
2145
2147
|
|
|
2148
|
+
declare function createFullRange(rootElement: Node): Range;
|
|
2146
2149
|
declare function createRangeFromOffsets(rootElement: HTMLElement, startOffset: number, endOffset: number): Range;
|
|
2147
2150
|
declare function getRangeOffsets(rootElement: HTMLElement, range: Range): {
|
|
2148
2151
|
start: number;
|
|
@@ -2163,4 +2166,4 @@ declare function waitForElementVisibilityChange(element: HTMLElement, callback:
|
|
|
2163
2166
|
type CSSModule = Record<string, string>;
|
|
2164
2167
|
declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
|
|
2165
2168
|
|
|
2166
|
-
export { AgentInfo, Card, Chip, ContentEditableInput, Conversation, ConversationMessage, DeepdeskAPI, DeepdeskSDK, HTTPClient, InputMediator, InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, Logger, MountOptions, PinnedMessage, PlatformConfig, RootState, Section, SectionList, SelectionRange, Sources, Suggestion, SuggestionEventMetrics, SuggestionList, SuggestionMetrics, TextAreaInput, TextSuggestion, ToggleButton, UrlSuggestion, VisitorInfo, WidgetCustomStyles, WidgetOptions, attachFile, authenticateWithKey, createOverlayContainer, createRangeFromOffsets, escapeHTML, fetchPlatformConfig, formatTextMarkup, getRangeOffsets, getRangeText, isSupportedInputElement, updateContentEditable, updateTextArea, useStyles, waitForElementVisibilityChange };
|
|
2169
|
+
export { AgentInfo, Card, Chip, ContentEditableInput, Conversation, ConversationMessage, DeepdeskAPI, DeepdeskSDK, HTTPClient, InputMediator, InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, Logger, MountOptions, PinnedMessage, PlatformConfig, RootState, Section, SectionList, SelectionRange, Sources, Suggestion, SuggestionEventMetrics, SuggestionList, SuggestionMetrics, TextAreaInput, TextSuggestion, ToggleButton, UrlSuggestion, VisitorInfo, WidgetCustomStyles, WidgetOptions, attachFile, authenticateWithKey, createFullRange, createOverlayContainer, createRangeFromOffsets, escapeHTML, fetchPlatformConfig, formatTextMarkup, getRangeOffsets, getRangeText, isSupportedInputElement, updateContentEditable, updateTextArea, useStyles, waitForElementVisibilityChange };
|
package/dist/index.d.ts
CHANGED
|
@@ -246,7 +246,6 @@ declare abstract class InputMediator<HTMLElementType extends HTMLElement> {
|
|
|
246
246
|
protected disposeHandlers: (() => void)[];
|
|
247
247
|
protected currentText: string;
|
|
248
248
|
protected currentHTML: string | null;
|
|
249
|
-
protected currentSelection: SelectionRange | null;
|
|
250
249
|
protected isFocused: boolean;
|
|
251
250
|
protected isActive: boolean;
|
|
252
251
|
protected isSettingValue: boolean;
|
|
@@ -1969,7 +1968,6 @@ declare class DeepdeskSDK {
|
|
|
1969
1968
|
* Method to call when the agent input has changed
|
|
1970
1969
|
*/
|
|
1971
1970
|
private notifyInputChanged;
|
|
1972
|
-
private syncInputHtml;
|
|
1973
1971
|
/**
|
|
1974
1972
|
* Method to call for the agent input keydown event
|
|
1975
1973
|
*/
|
|
@@ -2048,9 +2046,11 @@ declare class DeepdeskSDK {
|
|
|
2048
2046
|
|
|
2049
2047
|
declare class ContentEditableInput extends InputMediator<HTMLDivElement> {
|
|
2050
2048
|
protected observer?: MutationObserver;
|
|
2049
|
+
protected lastKnownSelection: SelectionRange | null;
|
|
2051
2050
|
getText(): string;
|
|
2052
2051
|
getHTML(): string;
|
|
2053
|
-
|
|
2052
|
+
getRange(): Range | null;
|
|
2053
|
+
getSelection(): SelectionRange;
|
|
2054
2054
|
getSelectedText(): string;
|
|
2055
2055
|
applyChanges(callback: (element: HTMLDivElement) => void | Promise<void>): void;
|
|
2056
2056
|
listen(): void;
|
|
@@ -2058,6 +2058,7 @@ declare class ContentEditableInput extends InputMediator<HTMLDivElement> {
|
|
|
2058
2058
|
}
|
|
2059
2059
|
|
|
2060
2060
|
declare class TextAreaInput extends InputMediator<HTMLTextAreaElement> {
|
|
2061
|
+
protected lastKnownSelection: SelectionRange | null;
|
|
2061
2062
|
getText(): string;
|
|
2062
2063
|
getHTML(): string | null;
|
|
2063
2064
|
getSelection(): SelectionRange;
|
|
@@ -2093,6 +2094,7 @@ type ContentEditableOptions = {
|
|
|
2093
2094
|
replace?: SelectionRange;
|
|
2094
2095
|
selectionAfter?: SelectionRange | false;
|
|
2095
2096
|
setRange?: (range: Range) => void | Promise<void>;
|
|
2097
|
+
insertBRs?: boolean;
|
|
2096
2098
|
};
|
|
2097
2099
|
declare function updateContentEditable(element: HTMLElement, insertText: string, options?: ContentEditableOptions): Promise<void>;
|
|
2098
2100
|
|
|
@@ -2143,6 +2145,7 @@ interface TargetFileOptions {
|
|
|
2143
2145
|
}
|
|
2144
2146
|
declare function attachFile(fileInput: HTMLInputElement, target: TargetFileOptions): Promise<void>;
|
|
2145
2147
|
|
|
2148
|
+
declare function createFullRange(rootElement: Node): Range;
|
|
2146
2149
|
declare function createRangeFromOffsets(rootElement: HTMLElement, startOffset: number, endOffset: number): Range;
|
|
2147
2150
|
declare function getRangeOffsets(rootElement: HTMLElement, range: Range): {
|
|
2148
2151
|
start: number;
|
|
@@ -2163,4 +2166,4 @@ declare function waitForElementVisibilityChange(element: HTMLElement, callback:
|
|
|
2163
2166
|
type CSSModule = Record<string, string>;
|
|
2164
2167
|
declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
|
|
2165
2168
|
|
|
2166
|
-
export { AgentInfo, Card, Chip, ContentEditableInput, Conversation, ConversationMessage, DeepdeskAPI, DeepdeskSDK, HTTPClient, InputMediator, InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, Logger, MountOptions, PinnedMessage, PlatformConfig, RootState, Section, SectionList, SelectionRange, Sources, Suggestion, SuggestionEventMetrics, SuggestionList, SuggestionMetrics, TextAreaInput, TextSuggestion, ToggleButton, UrlSuggestion, VisitorInfo, WidgetCustomStyles, WidgetOptions, attachFile, authenticateWithKey, createOverlayContainer, createRangeFromOffsets, escapeHTML, fetchPlatformConfig, formatTextMarkup, getRangeOffsets, getRangeText, isSupportedInputElement, updateContentEditable, updateTextArea, useStyles, waitForElementVisibilityChange };
|
|
2169
|
+
export { AgentInfo, Card, Chip, ContentEditableInput, Conversation, ConversationMessage, DeepdeskAPI, DeepdeskSDK, HTTPClient, InputMediator, InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, Logger, MountOptions, PinnedMessage, PlatformConfig, RootState, Section, SectionList, SelectionRange, Sources, Suggestion, SuggestionEventMetrics, SuggestionList, SuggestionMetrics, TextAreaInput, TextSuggestion, ToggleButton, UrlSuggestion, VisitorInfo, WidgetCustomStyles, WidgetOptions, attachFile, authenticateWithKey, createFullRange, createOverlayContainer, createRangeFromOffsets, escapeHTML, fetchPlatformConfig, formatTextMarkup, getRangeOffsets, getRangeText, isSupportedInputElement, updateContentEditable, updateTextArea, useStyles, waitForElementVisibilityChange };
|