@inboxsdk/core 0.2.26 → 0.2.28-alpha.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/inboxsdk.js +55 -56
- package/inboxsdk.js.map +1 -1
- package/package.json +5 -5
- package/pageWorld.js +12 -11
- package/pageWorld.js.map +1 -1
- package/src/build/exec.d.ts +1 -0
- package/src/build/spawn.d.ts +1 -0
- package/src/common/ajax.d.ts +22 -0
- package/src/common/cachebust-url.d.ts +1 -0
- package/src/common/censorHTMLstring.d.ts +2 -0
- package/src/common/censorHTMLtree.d.ts +1 -0
- package/src/common/censorJSONTree.d.ts +1 -0
- package/src/common/connectivity-test.d.ts +3 -0
- package/src/common/defer.d.ts +6 -0
- package/src/common/find-parent.d.ts +1 -0
- package/src/common/get-extension-id.d.ts +1 -0
- package/src/common/get-or-fail.d.ts +6 -0
- package/src/common/get-session-id.d.ts +1 -0
- package/src/common/get-stack-trace.d.ts +1 -0
- package/src/common/html-to-text.d.ts +1 -0
- package/src/common/isElementVisible.d.ts +1 -0
- package/src/common/load-script.d.ts +6 -0
- package/src/common/log-error.d.ts +10 -0
- package/src/common/quoted-split.d.ts +1 -0
- package/src/common/rate-limit-queuer.d.ts +1 -0
- package/src/common/rate-limit.d.ts +1 -0
- package/src/common/version.d.ts +1 -0
- package/src/inboxsdk-js/loading/platform-implementation-loader.d.ts +7 -0
- package/{inboxsdk.d.ts → src/inboxsdk.d.ts} +0 -0
- package/src/injected-js/gmail/constants.d.ts +13 -0
- package/src/injected-js/gmail/modify-suggestions.d.ts +23 -0
- package/src/injected-js/gmail/setup-gmonkey-handler.d.ts +4 -0
- package/src/injected-js/gmail/sync-compose-processor-20220909.d.ts +27 -0
- package/src/injected-js/gmail/sync-compose-processor.d.ts +15 -0
- package/src/injected-js/gmail/sync-compose-request-processor.d.ts +3 -0
- package/src/injected-js/injected-logger.d.ts +2 -0
- package/src/injected-js/setupCustomViewEventAssassin.d.ts +1 -0
- package/src/platform-implementation-js/constants/nav-item-types.d.ts +16 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/add-nav-item.d.ts +5 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/add-support-item.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/encodeDraftUrlId.d.ts +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-rfc-message-id-for-gmail-message-id.d.ts +2 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-rfc-message-id-for-gmail-thread-id.d.ts +2 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/isIntegratedViewGmail.d.ts +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/open-draft-by-message-id.d.ts +4 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-element-getter/get-main-content-element-changed-stream.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-element-getter/wait-for-gmail-mode-to-settle.d.ts +2 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-element-getter.d.ts +42 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-page-communicator.d.ts +32 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-response-processor.d.ts +55 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-sync-response-processor.d.ts +42 -0
- package/src/platform-implementation-js/dom-driver/gmail/is-compose-titlebar-light-color.d.ts +2 -0
- package/src/platform-implementation-js/dom-driver/gmail/makePageParserTree.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/pageParserOptions.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-status-bar.d.ts +22 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/detectClassicRecipientsArea.d.ts +2 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-address-information-extractor.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-recipients.d.ts +4 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/gmail-compose-button-view.d.ts +49 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/page-parser.d.ts +7 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/set-recipients.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/setupLinkPopovers.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view/attachment-icon.d.ts +5 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-nav-item-view.d.ts +70 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-support-item-view.d.ts +15 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/buttons/button-color-classes.d.ts +9 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/buttons/button-view.d.ts +60 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/buttons/create-accessory-button-view.d.ts +17 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/buttons/create-parent-accessory-button-view.d.ts +17 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/buttons/modal-button-view.d.ts +28 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/buttons/more-dropdown-button-view.d.ts +7 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/buttons/more-parent-accessory-button-view.d.ts +4 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-dropdown-view.d.ts +8 -0
- package/src/platform-implementation-js/driver-common/getAccountUrlPart.d.ts +1 -0
- package/src/platform-implementation-js/driver-common/getOriginalMessagePage.d.ts +11 -0
- package/src/platform-implementation-js/driver-common/getSyncThreadsForSearch.d.ts +8 -0
- package/src/platform-implementation-js/driver-common/gmailAjax.d.ts +4 -0
- package/src/platform-implementation-js/driver-common/render-custom-icon.d.ts +1 -0
- package/src/platform-implementation-js/driver-common/update-icon.d.ts +7 -0
- package/src/platform-implementation-js/lib/ErrorCollector.d.ts +17 -0
- package/src/platform-implementation-js/lib/Membrane.d.ts +12 -0
- package/src/platform-implementation-js/lib/ScrollableContainByScreen.d.ts +8 -0
- package/src/platform-implementation-js/lib/attemptWithRetries.d.ts +1 -0
- package/src/platform-implementation-js/lib/common-page-communicator.d.ts +19 -0
- package/src/platform-implementation-js/lib/delay-asap.d.ts +2 -0
- package/src/platform-implementation-js/lib/delay-idle.d.ts +2 -0
- package/src/platform-implementation-js/lib/dom/block-and-reemit-keyboard-events.d.ts +1 -0
- package/src/platform-implementation-js/lib/dom/generic-button-view.d.ts +12 -0
- package/src/platform-implementation-js/lib/dom/get-insert-before-element.d.ts +1 -0
- package/src/platform-implementation-js/lib/dom/insert-element-in-order.d.ts +1 -0
- package/src/platform-implementation-js/lib/dom/keyboard-shortcut-stream.d.ts +2 -0
- package/src/platform-implementation-js/lib/dom/make-element-child-stream.d.ts +7 -0
- package/src/platform-implementation-js/lib/dom/make-element-stream-merger.d.ts +3 -0
- package/src/platform-implementation-js/lib/dom/make-element-view-stream.d.ts +7 -0
- package/src/platform-implementation-js/lib/dom/make-mutation-observer-chunked-stream.d.ts +2 -0
- package/src/platform-implementation-js/lib/dom/make-mutation-observer-stream.d.ts +2 -0
- package/src/platform-implementation-js/lib/dom/outsideClicksAndEscape.d.ts +6 -0
- package/src/platform-implementation-js/lib/dom/parentNodes.d.ts +1 -0
- package/src/platform-implementation-js/lib/dom/querySelectorOrFail.d.ts +1 -0
- package/src/platform-implementation-js/lib/dom/reemitClickEventForReact.d.ts +1 -0
- package/src/platform-implementation-js/lib/dom/simulate-key.d.ts +1 -0
- package/src/platform-implementation-js/lib/dom/simulate-mouse-event.d.ts +3 -0
- package/src/platform-implementation-js/lib/dom/trigger-relay-event.d.ts +11 -0
- package/src/platform-implementation-js/lib/extract-contact-from-email-contact-string.d.ts +2 -0
- package/src/platform-implementation-js/lib/fake-window-resize.d.ts +1 -0
- package/src/platform-implementation-js/lib/from-event-target-capture.d.ts +7 -0
- package/src/platform-implementation-js/lib/fromEventsWithOptions.d.ts +3 -0
- package/src/platform-implementation-js/lib/handler-registry.d.ts +12 -0
- package/src/platform-implementation-js/lib/idMap.d.ts +2 -0
- package/src/platform-implementation-js/lib/imageRequest.d.ts +1 -0
- package/src/platform-implementation-js/lib/incrementName.d.ts +1 -0
- package/src/platform-implementation-js/lib/inject-script-EMBEDDED.d.ts +1 -0
- package/src/platform-implementation-js/lib/inject-script.d.ts +2 -0
- package/src/platform-implementation-js/lib/is-valid-app-id.d.ts +1 -0
- package/src/platform-implementation-js/lib/is-valid-email.d.ts +1 -0
- package/src/platform-implementation-js/lib/isNotNil.d.ts +1 -0
- package/src/platform-implementation-js/lib/isStreakAppId.d.ts +1 -0
- package/src/platform-implementation-js/lib/logger.d.ts +28 -0
- package/src/platform-implementation-js/lib/persistent-queue.d.ts +13 -0
- package/src/platform-implementation-js/lib/safe-event-emitter.d.ts +5 -0
- package/src/platform-implementation-js/lib/stopper-pool.d.ts +10 -0
- package/src/platform-implementation-js/lib/stream-wait-for.d.ts +9 -0
- package/src/platform-implementation-js/lib/wait-for.d.ts +1 -0
- package/src/platform-implementation-js/lib/waitForAsync.d.ts +1 -0
- package/src/platform-implementation-js/namespaces/butter-bar.d.ts +10 -0
- package/src/platform-implementation-js/views/SimpleElementView.d.ts +7 -0
- package/src/platform-implementation-js/views/compose-button-view.d.ts +24 -0
- package/src/platform-implementation-js/views/compose-view.d.ts +89 -0
- package/src/platform-implementation-js/views/keyboard-shortcut-handle.d.ts +7 -0
- package/src/platform-implementation-js/widgets/buttons/basic-button-view-controller.d.ts +25 -0
- package/src/platform-implementation-js/widgets/buttons/dropdown-button-view-controller.d.ts +22 -0
- package/src/platform-implementation-js/widgets/buttons/dropdown-view.d.ts +21 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
import GmailDriver from '../gmail-driver';
|
|
3
|
+
export default class GmailNavItemView {
|
|
4
|
+
private _accessory;
|
|
5
|
+
private _accessoryViewController;
|
|
6
|
+
private _driver;
|
|
7
|
+
private _element;
|
|
8
|
+
private _eventStream;
|
|
9
|
+
private _expandoElement;
|
|
10
|
+
private _iconSettings;
|
|
11
|
+
private _isActive;
|
|
12
|
+
private _isCollapsed;
|
|
13
|
+
private _itemContainerElement;
|
|
14
|
+
private _level;
|
|
15
|
+
private _name;
|
|
16
|
+
private _navItemDescriptor;
|
|
17
|
+
private _navItemNumber;
|
|
18
|
+
private _orderGroup;
|
|
19
|
+
private _orderHint;
|
|
20
|
+
private _type;
|
|
21
|
+
private _collapseKey;
|
|
22
|
+
private _isNewLeftNavParent;
|
|
23
|
+
constructor(driver: GmailDriver, orderGroup: number | string, level: number);
|
|
24
|
+
addNavItem(orderGroup: number | string, navItemDescriptor: any): GmailNavItemView;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
getElement(): HTMLElement;
|
|
27
|
+
getEventStream(): Kefir.Observable<any, any>;
|
|
28
|
+
getNavItemDescriptor(): any;
|
|
29
|
+
getOrderGroup(): number | string;
|
|
30
|
+
getOrderHint(): any;
|
|
31
|
+
getName(): string;
|
|
32
|
+
isCollapsed(): boolean;
|
|
33
|
+
remove(): void;
|
|
34
|
+
setActive(value: boolean): void;
|
|
35
|
+
setCollapsed(value: boolean): void;
|
|
36
|
+
setNavItemDescriptor(navItemDescriptorPropertyStream: Kefir.Observable<any, any>): void;
|
|
37
|
+
toggleCollapse(): void;
|
|
38
|
+
private _addNavItemElement;
|
|
39
|
+
private _collapse;
|
|
40
|
+
private _createAccessory;
|
|
41
|
+
private _createCreateAccessory;
|
|
42
|
+
private _createDropdownButtonAccessory;
|
|
43
|
+
private _createExpando;
|
|
44
|
+
private _createExpandoParent;
|
|
45
|
+
private _createIconButtonAccessory;
|
|
46
|
+
private _createItemContainerElement;
|
|
47
|
+
private _createLinkButtonAccessory;
|
|
48
|
+
private _createPlusButtonAccessory;
|
|
49
|
+
private _expand;
|
|
50
|
+
private _getItemContainerElement;
|
|
51
|
+
private _isCollapsible;
|
|
52
|
+
private _makeEventMapper;
|
|
53
|
+
private _setHeights;
|
|
54
|
+
private _setHighlight;
|
|
55
|
+
private _setupContextClickHandler;
|
|
56
|
+
private _setupChildElement;
|
|
57
|
+
private _setupParentElement;
|
|
58
|
+
private _setupGrouper;
|
|
59
|
+
private _updateAccessory;
|
|
60
|
+
private _updateClickability;
|
|
61
|
+
private _updateHighlight;
|
|
62
|
+
private _updateIcon;
|
|
63
|
+
private _updateName;
|
|
64
|
+
private _updateOrder;
|
|
65
|
+
private _updateRole;
|
|
66
|
+
private _updateSubtitle;
|
|
67
|
+
private _updateType;
|
|
68
|
+
private _updateValues;
|
|
69
|
+
}
|
|
70
|
+
export declare function getLeftIndentationPaddingValue(): number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import GmailDriver from '../gmail-driver';
|
|
2
|
+
export interface SupportItemDescriptor {
|
|
3
|
+
element: HTMLElement;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
}
|
|
6
|
+
export default class GmailSupportItemView {
|
|
7
|
+
_stopper: import("kefir-stopper").Stopper;
|
|
8
|
+
_driver: GmailDriver;
|
|
9
|
+
_insertElementContainer: HTMLElement | null;
|
|
10
|
+
constructor(driver: GmailDriver, supportItemDescriptor: SupportItemDescriptor);
|
|
11
|
+
destroy(): void;
|
|
12
|
+
_setup(supportItemDescriptor: SupportItemDescriptor): void;
|
|
13
|
+
_addSupportElement(supportElement: HTMLElement, supportItemDescriptor: SupportItemDescriptor): void;
|
|
14
|
+
_closeSupportMenu(supportElement: HTMLElement): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
import KeyboardShortcutHandle from '../../../../views/keyboard-shortcut-handle';
|
|
3
|
+
import { ButtonViewI } from '../../../../widgets/buttons/basic-button-view-controller';
|
|
4
|
+
export interface ButtonViewOptions {
|
|
5
|
+
hasButtonToLeft?: boolean | null;
|
|
6
|
+
hasButtonToRight?: boolean | null;
|
|
7
|
+
iconClass?: string | null;
|
|
8
|
+
iconUrl?: string | null;
|
|
9
|
+
text?: string | null;
|
|
10
|
+
title?: string | null;
|
|
11
|
+
tooltip?: string | null;
|
|
12
|
+
enabled?: boolean | null;
|
|
13
|
+
hasDropdown?: boolean | null;
|
|
14
|
+
buttonColor?: string | null;
|
|
15
|
+
keyboardShortcutHandle?: KeyboardShortcutHandle | null;
|
|
16
|
+
noArrow?: boolean | null;
|
|
17
|
+
}
|
|
18
|
+
export default class ButtonView implements ButtonViewI {
|
|
19
|
+
private _element;
|
|
20
|
+
private _innerElement;
|
|
21
|
+
private _textElement;
|
|
22
|
+
private _iconElement;
|
|
23
|
+
private _iconImgElement;
|
|
24
|
+
private _iconClass;
|
|
25
|
+
private _iconUrl;
|
|
26
|
+
private _title;
|
|
27
|
+
private _tooltip;
|
|
28
|
+
private _hasDropdown;
|
|
29
|
+
private _buttonColor;
|
|
30
|
+
private _isEnabled;
|
|
31
|
+
private _keyboardShortcutHandle;
|
|
32
|
+
private _eventStream;
|
|
33
|
+
constructor(options: ButtonViewOptions);
|
|
34
|
+
destroy(): void;
|
|
35
|
+
getElement(): HTMLElement;
|
|
36
|
+
getEventStream(): Kefir.Observable<any, any>;
|
|
37
|
+
activate(): void;
|
|
38
|
+
deactivate(): void;
|
|
39
|
+
addClass(className: string): void;
|
|
40
|
+
removeClass(className: string): void;
|
|
41
|
+
simulateHover(): void;
|
|
42
|
+
setEnabled(value: boolean): void;
|
|
43
|
+
isEnabled(): boolean;
|
|
44
|
+
update(options: any): void;
|
|
45
|
+
private _createElement;
|
|
46
|
+
private _setupMainElement;
|
|
47
|
+
private _setupInnerElement;
|
|
48
|
+
private _createTextElement;
|
|
49
|
+
private _createIconElement;
|
|
50
|
+
private _createIconImgElement;
|
|
51
|
+
private _updateButtonColor;
|
|
52
|
+
private _updateTitle;
|
|
53
|
+
private _updateTooltip;
|
|
54
|
+
private _updateIconUrl;
|
|
55
|
+
private _updateIconClass;
|
|
56
|
+
private _setEnabled;
|
|
57
|
+
private _setupEventStream;
|
|
58
|
+
private _setupKeyboardShortcutEvent;
|
|
59
|
+
private _setupAestheticEvents;
|
|
60
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
import { ButtonViewI } from '../../../../widgets/buttons/basic-button-view-controller';
|
|
3
|
+
export default class CreateAccessoryButtonView implements ButtonViewI {
|
|
4
|
+
private _element;
|
|
5
|
+
private _eventStream;
|
|
6
|
+
private _stopper;
|
|
7
|
+
constructor();
|
|
8
|
+
update(): void;
|
|
9
|
+
setEnabled(): void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
getElement(): HTMLElement;
|
|
12
|
+
getEventStream(): Kefir.Observable<any, any>;
|
|
13
|
+
activate(): void;
|
|
14
|
+
deactivate(): void;
|
|
15
|
+
private _setupElement;
|
|
16
|
+
private _setupEventStream;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
import { ButtonViewI } from '../../../../widgets/buttons/basic-button-view-controller';
|
|
3
|
+
export default class CreateParentAccessoryButtonView implements ButtonViewI {
|
|
4
|
+
private _element;
|
|
5
|
+
private _eventStream;
|
|
6
|
+
private _stopper;
|
|
7
|
+
constructor();
|
|
8
|
+
activate(): void;
|
|
9
|
+
deactivate(): void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
getElement(): HTMLElement;
|
|
12
|
+
getEventStream(): Kefir.Observable<any, any>;
|
|
13
|
+
setEnabled(): void;
|
|
14
|
+
update(): void;
|
|
15
|
+
private _setupElement;
|
|
16
|
+
private _setupEventStream;
|
|
17
|
+
}
|
package/src/platform-implementation-js/dom-driver/gmail/widgets/buttons/modal-button-view.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
import { ButtonViewI } from '../../../../widgets/buttons/basic-button-view-controller';
|
|
3
|
+
export interface ButtonViewOptions {
|
|
4
|
+
text?: null | string;
|
|
5
|
+
title?: null | string;
|
|
6
|
+
tooltip?: null | string;
|
|
7
|
+
enabled?: null | boolean;
|
|
8
|
+
buttonColor?: null | string;
|
|
9
|
+
isPrimary?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export default class ModalButtonView implements ButtonViewI {
|
|
12
|
+
private _element;
|
|
13
|
+
private _title;
|
|
14
|
+
private _tooltip;
|
|
15
|
+
private _buttonColor;
|
|
16
|
+
private _eventStream;
|
|
17
|
+
private _isEnabled;
|
|
18
|
+
constructor(options: ButtonViewOptions);
|
|
19
|
+
destroy(): void;
|
|
20
|
+
getElement(): HTMLElement;
|
|
21
|
+
getEventStream(): Kefir.Observable<any, any>;
|
|
22
|
+
setEnabled(value: boolean): void;
|
|
23
|
+
update(): void;
|
|
24
|
+
isEnabled(): boolean;
|
|
25
|
+
private _createElement;
|
|
26
|
+
private _setEnabled;
|
|
27
|
+
private _setupEventStream;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getAccountUrlPart(): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Driver } from '../driver-interfaces/driver';
|
|
2
|
+
type Options = {
|
|
3
|
+
oldGmailMessageID: string;
|
|
4
|
+
syncMessageID?: void;
|
|
5
|
+
} | {
|
|
6
|
+
syncMessageID: string;
|
|
7
|
+
oldGmailMessageID?: void;
|
|
8
|
+
};
|
|
9
|
+
declare function getOriginalMessagePage(driver: Driver, options: Options): Promise<string>;
|
|
10
|
+
declare const _default: typeof getOriginalMessagePage;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Driver } from '../driver-interfaces/driver';
|
|
2
|
+
import { SyncThread } from '../dom-driver/gmail/gmail-sync-response-processor';
|
|
3
|
+
declare function getSyncThreadsForSearch(driver: Driver, searchTerm: string): Promise<{
|
|
4
|
+
threads: SyncThread[];
|
|
5
|
+
_text: string;
|
|
6
|
+
}>;
|
|
7
|
+
declare const _default: typeof getSyncThreadsForSearch;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function renderCustomIcon(containerElement: HTMLElement, customIconElement: HTMLElement, append: boolean, insertBeforeEl?: HTMLElement | null | undefined): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface IconSettings {
|
|
2
|
+
iconElement?: HTMLElement | null;
|
|
3
|
+
iconHtmlElement?: HTMLElement | null;
|
|
4
|
+
iconImgElement?: HTMLElement | null;
|
|
5
|
+
}
|
|
6
|
+
export default function updateIcon(iconSettings: IconSettings, containerElement: HTMLElement, append: boolean, newIconClass: string | null | undefined, newIconUrl: string | null | undefined, insertBeforeEl?: HTMLElement | null | undefined, // Should not be used with append: true — the append flag will override
|
|
7
|
+
newIconHtml?: string): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface ErrorLog {
|
|
2
|
+
name: string;
|
|
3
|
+
message: string;
|
|
4
|
+
}
|
|
5
|
+
export default class ErrorCollector {
|
|
6
|
+
private _name;
|
|
7
|
+
private _runCount;
|
|
8
|
+
private _errorLogs;
|
|
9
|
+
private _hasReported;
|
|
10
|
+
constructor(name: string);
|
|
11
|
+
run<T>(name: string, cb: () => T): T | null;
|
|
12
|
+
report(errorDataCb: () => any): void;
|
|
13
|
+
getErrorLogs(): ReadonlyArray<ErrorLog>;
|
|
14
|
+
runCount(): number;
|
|
15
|
+
errorCount(): number;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface SomeClass {
|
|
2
|
+
new (...args: any[]): any;
|
|
3
|
+
}
|
|
4
|
+
export type MapperFn<T> = (t: T) => object;
|
|
5
|
+
export type Mapper<T extends SomeClass> = [T, MapperFn<InstanceType<T>>];
|
|
6
|
+
export default class Membrane {
|
|
7
|
+
private _mappers;
|
|
8
|
+
private _map;
|
|
9
|
+
constructor(mappers: Array<Mapper<any>>);
|
|
10
|
+
get(wet: any): any;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Options } from 'contain-by-screen';
|
|
2
|
+
export default class ScrollableContainByScreen {
|
|
3
|
+
private _manualRepositions;
|
|
4
|
+
private _stopper;
|
|
5
|
+
constructor(element: HTMLElement, anchorPoint: HTMLElement, options: Options);
|
|
6
|
+
reposition(): void;
|
|
7
|
+
destroy(): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function attemptWithRetries<T>(fn: () => Promise<T>, attemptCount: number, errorsToRetry?: (error: unknown) => boolean): Promise<T>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
import { CommonAjaxOpts } from '../../common/ajax';
|
|
3
|
+
export default class CommonPageCommunicator {
|
|
4
|
+
ajaxInterceptStream: Kefir.Observable<any, never>;
|
|
5
|
+
constructor();
|
|
6
|
+
getUserEmailAddress(): string;
|
|
7
|
+
getUserLanguage(): string;
|
|
8
|
+
getIkValue(): string;
|
|
9
|
+
isUsingSyncAPI(): boolean;
|
|
10
|
+
getXsrfToken(): Promise<string>;
|
|
11
|
+
getBtaiHeader(): Promise<string>;
|
|
12
|
+
resolveUrlRedirects(url: string): Promise<string>;
|
|
13
|
+
pageAjax(opts: CommonAjaxOpts): Promise<{
|
|
14
|
+
text: string;
|
|
15
|
+
responseURL: string;
|
|
16
|
+
}>;
|
|
17
|
+
silenceGmailErrorsForAMoment(): () => void;
|
|
18
|
+
registerAllowedHashLinkStartTerm(term: string): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function blockAndReemiteKeyboardEvents(element: HTMLElement): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
export default class GenericButtonView {
|
|
3
|
+
private readonly _eventStream;
|
|
4
|
+
protected readonly _element: HTMLElement;
|
|
5
|
+
constructor(element: HTMLElement);
|
|
6
|
+
destroy(): void;
|
|
7
|
+
getElement(): HTMLElement;
|
|
8
|
+
getEventStream(): Kefir.Observable<any, any>;
|
|
9
|
+
activate(): void;
|
|
10
|
+
deactivate(): void;
|
|
11
|
+
private _setupEventStream;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getInsertBeforeElement(checkElement: HTMLElement, childElements: ArrayLike<any>, dataAttributes: string[]): HTMLElement | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function insertElementInOrder(container: HTMLElement, el: HTMLElement, orderAttrs?: string[], insertBeforeNonSdk?: boolean): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
export interface ItemWithLifetime<T> {
|
|
3
|
+
readonly el: T;
|
|
4
|
+
readonly removalStream: Kefir.Observable<null, never>;
|
|
5
|
+
}
|
|
6
|
+
export type ElementWithLifetime = ItemWithLifetime<HTMLElement>;
|
|
7
|
+
export default function makeElementChildStream(element: HTMLElement): Kefir.Observable<ElementWithLifetime, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
interface View {
|
|
3
|
+
destroy(): void;
|
|
4
|
+
}
|
|
5
|
+
import { ElementWithLifetime } from './make-element-child-stream';
|
|
6
|
+
export default function makeElementViewStream<T extends View>(viewFn: (el: HTMLElement) => T | null | undefined): (event: ElementWithLifetime) => Kefir.Observable<T, never>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function parentNodes(node: Node): Iterable<Node>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function querySelector(el: Document | DocumentFragment | Element, selector: string): HTMLElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function reemitClickEvent(event: MouseEvent): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function simulateKey(element: HTMLElement, keyCode: number, charCode: number): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface RelayProps {
|
|
2
|
+
type: string;
|
|
3
|
+
bubbles: boolean;
|
|
4
|
+
cancelable: boolean;
|
|
5
|
+
props?: any;
|
|
6
|
+
dataTransfer?: {
|
|
7
|
+
files: Blob[];
|
|
8
|
+
} | null;
|
|
9
|
+
}
|
|
10
|
+
export default function triggerRelayEvent(element: HTMLElement, detail: RelayProps): Promise<void>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function fakeWindowResize(): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type Handler<T> = (target: T) => void;
|
|
2
|
+
export default class HandlerRegistry<T> {
|
|
3
|
+
private _targets;
|
|
4
|
+
private _pendingHandlers;
|
|
5
|
+
private _handlers;
|
|
6
|
+
registerHandler(handler: Handler<T>): () => void;
|
|
7
|
+
addTarget(target: T): void;
|
|
8
|
+
removeTarget(target: T): void;
|
|
9
|
+
dumpHandlers(): void;
|
|
10
|
+
private _informHandlerOfTargets;
|
|
11
|
+
private _informHandlersOfTarget;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function imageRequest(url: string): Promise<HTMLImageElement>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function incrementName(name: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function injectScriptEmbedded(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isValidAppId(appId: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isValidEmail(candidate: string | null | void): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isNotNil<TValue>(value: TValue | null | undefined): value is TValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isStreakAppId(appId: string): boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface AppLogger {
|
|
2
|
+
error(err: Error | unknown, details?: any): void;
|
|
3
|
+
event(name: string, details?: any): void;
|
|
4
|
+
}
|
|
5
|
+
export default class Logger {
|
|
6
|
+
private _appId;
|
|
7
|
+
private _isMaster;
|
|
8
|
+
constructor(appId: string, opts: any, loaderVersion: string, implVersion: string);
|
|
9
|
+
setUserEmailAddress(email: string): void;
|
|
10
|
+
shouldTrackEverything(): boolean;
|
|
11
|
+
setIsUsingSyncAPI(isUsing: boolean): void;
|
|
12
|
+
static run<T>(cb: () => T, details?: any): T;
|
|
13
|
+
run<T>(cb: () => T, details?: any): T;
|
|
14
|
+
static error(err: Error | unknown, details?: any): void;
|
|
15
|
+
error(err: Error | unknown, details?: any): void;
|
|
16
|
+
errorApp(err: Error | unknown, details?: any): void;
|
|
17
|
+
errorSite(err: Error | unknown, details?: any): void;
|
|
18
|
+
eventApp(name: string, details?: any): void;
|
|
19
|
+
eventSdkActive(name: string, details?: any): void;
|
|
20
|
+
eventSdkPassive(name: string, details?: any, sensitive?: boolean): void;
|
|
21
|
+
eventSite(name: string, details?: any): void;
|
|
22
|
+
deprecationWarning(name: string, suggestion?: string): void;
|
|
23
|
+
getAppLogger(): AppLogger;
|
|
24
|
+
trackFunctionPerformance(fn: Function, sampleRate: number, details: {
|
|
25
|
+
type: string;
|
|
26
|
+
}): void;
|
|
27
|
+
}
|
|
28
|
+
export declare function hashEmail(str: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default class PersistentQueue<T> {
|
|
2
|
+
private _fallbackQueue;
|
|
3
|
+
private _sid;
|
|
4
|
+
constructor(id: string);
|
|
5
|
+
private _getSavedQueue;
|
|
6
|
+
private _putSavedQueue;
|
|
7
|
+
private _clearSavedQueue;
|
|
8
|
+
add(val: T): void;
|
|
9
|
+
remove(): T | undefined;
|
|
10
|
+
removeAll(): T[];
|
|
11
|
+
peekAll(): T[];
|
|
12
|
+
clear(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
export default class StopperPool<V, E> {
|
|
3
|
+
private _streamCount;
|
|
4
|
+
private _ended;
|
|
5
|
+
private _pool;
|
|
6
|
+
stream: Kefir.Observable<V, E>;
|
|
7
|
+
constructor(streams: Kefir.Observable<V, E> | Kefir.Observable<V, E>[]);
|
|
8
|
+
add(newStreams: Kefir.Observable<V, E> | Kefir.Observable<V, E>[]): void;
|
|
9
|
+
getSize(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a Kefir stream that repeatedly calls the condition callback until it
|
|
4
|
+
* returns a truthy value, and then the stream emits that value and ends.
|
|
5
|
+
* If the timeout passes, an error event is emitted and the error is also
|
|
6
|
+
* thrown so that it gets logged. Well-behaving code should not let the timeout
|
|
7
|
+
* get tripped.
|
|
8
|
+
*/
|
|
9
|
+
export default function streamWaitFor<T>(condition: () => T | null | undefined, timeout?: number, steptime?: number): Kefir.Observable<T, Error>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function waitFor<T>(condition: () => T | null | undefined, timeout?: number, steptime?: number): Promise<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function waitForAsync<T>(condition: () => Promise<T | null | undefined>, timeout?: number, steptime?: number): Promise<T>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Driver, ButterBarMessage } from '../driver-interfaces/driver';
|
|
2
|
+
export default class ButterBar {
|
|
3
|
+
constructor(appId: string, driver: Driver);
|
|
4
|
+
showMessage(options: any): ButterBarMessage;
|
|
5
|
+
showLoading(options?: any): ButterBarMessage;
|
|
6
|
+
showError(options: any): ButterBarMessage;
|
|
7
|
+
showSaving(options?: any): any;
|
|
8
|
+
hideMessage(messageKey: any | string): void;
|
|
9
|
+
hideGmailMessage(): void;
|
|
10
|
+
}
|