@botpress/webchat 0.5.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +10 -0
- package/dist/Utils/colors.d.ts +18 -0
- package/dist/Utils/eventEmitter.d.ts +12 -0
- package/dist/Utils/index.d.ts +2 -0
- package/dist/client/MessagingClient.d.ts +27 -0
- package/dist/client/adapters/Audio.d.ts +19 -0
- package/dist/client/adapters/Card.d.ts +188 -0
- package/dist/client/adapters/Carousel.d.ts +147 -0
- package/dist/client/adapters/Choice.d.ts +45 -0
- package/dist/client/adapters/Dropdown.d.ts +46 -0
- package/dist/client/adapters/File.d.ts +19 -0
- package/dist/client/adapters/Image.d.ts +19 -0
- package/dist/client/adapters/Location.d.ts +27 -0
- package/dist/client/adapters/Message.d.ts +433 -0
- package/dist/client/adapters/Text.d.ts +20 -0
- package/dist/client/adapters/Utils.d.ts +5 -0
- package/dist/client/adapters/Video.d.ts +19 -0
- package/dist/client/adapters/Voice.d.ts +15 -0
- package/dist/client/adapters/index.d.ts +12 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/components/Avatar.d.ts +6 -0
- package/dist/components/Block.d.ts +4 -0
- package/dist/components/Composer.d.ts +12 -14
- package/dist/components/Container.d.ts +2 -12
- package/dist/components/Header.d.ts +36 -26
- package/dist/components/LoadingIndicator.d.ts +2 -0
- package/dist/components/Message.d.ts +7 -0
- package/dist/components/MessageList.d.ts +2 -0
- package/dist/components/Modal.d.ts +17 -0
- package/dist/components/RestartConversation.d.ts +5 -0
- package/dist/components/Webchat.d.ts +6 -0
- package/dist/components/dev-tools/DevTools.d.ts +1 -0
- package/dist/components/dev-tools/configuration.d.ts +2 -0
- package/dist/components/dev-tools/helpers.d.ts +5 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/renderers/Audio.d.ts +3 -0
- package/dist/components/renderers/Bubble.d.ts +5 -0
- package/dist/components/renderers/Button.d.ts +4 -0
- package/dist/components/renderers/Carousel.d.ts +3 -0
- package/dist/components/renderers/Column.d.ts +5 -0
- package/dist/components/renderers/Dropdown.d.ts +5 -0
- package/dist/components/renderers/File.d.ts +3 -0
- package/dist/components/renderers/Image.d.ts +3 -0
- package/dist/components/renderers/Location.d.ts +3 -0
- package/dist/components/renderers/Row.d.ts +5 -0
- package/dist/components/renderers/Text.d.ts +4 -0
- package/dist/components/renderers/Video.d.ts +3 -0
- package/dist/components/renderers/index.d.ts +2 -0
- package/dist/contexts/ComposerContext.d.ts +8 -0
- package/dist/contexts/MessageContext.d.ts +8 -0
- package/dist/contexts/ModalContext.d.ts +14 -0
- package/dist/contexts/WebchatContext.d.ts +56 -0
- package/dist/contexts/index.d.ts +4 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useImageSize.d.ts +2 -0
- package/dist/hooks/useRefresh.d.ts +10 -0
- package/dist/hooks/useWebchatStore.d.ts +30 -0
- package/dist/index.d.ts +3 -17
- package/dist/index.js +43569 -48
- package/dist/index.umd.cjs +702 -0
- package/dist/main.d.ts +11 -13
- package/dist/providers/ModalProvider.d.ts +8 -0
- package/dist/providers/WebchatProvider.d.ts +13 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/theme.d.ts +3371 -0
- package/dist/services/clipboard.d.ts +1 -0
- package/dist/services/images.d.ts +2 -0
- package/dist/services/index.d.ts +3 -0
- package/dist/services/toast.d.ts +17 -0
- package/dist/themes/dawn.d.ts +2 -0
- package/dist/themes/duskTheme.d.ts +2 -0
- package/dist/themes/eggplant.d.ts +2 -0
- package/dist/themes/galaxy.d.ts +2 -0
- package/dist/themes/index.d.ts +6 -0
- package/dist/themes/midnight.d.ts +2 -0
- package/dist/themes/prism.d.ts +2 -0
- package/dist/twind.config.d.ts +9 -0
- package/dist/types/block-type.d.ts +93 -0
- package/dist/types/image.d.ts +11 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/vite.svg +1 -0
- package/index.html +18 -0
- package/package.json +60 -48
- package/public/vite.svg +1 -0
- package/src/App.tsx +41 -0
- package/src/Utils/colors.ts +45 -0
- package/src/Utils/eventEmitter.ts +31 -0
- package/src/Utils/index.ts +2 -0
- package/src/assets/check-circle-bold.svg +5 -0
- package/src/assets/chevron-up.svg +3 -0
- package/src/assets/file-05.svg +6 -0
- package/src/assets/globe-02.svg +6 -0
- package/src/assets/help-circle.svg +3 -0
- package/src/assets/info-circle.svg +3 -0
- package/src/assets/lock-01.svg +4 -0
- package/src/assets/mail-01.svg +6 -0
- package/src/assets/minus-circle.svg +3 -0
- package/src/assets/phone.svg +6 -0
- package/src/assets/send-03.svg +4 -0
- package/src/assets/share-04.svg +5 -0
- package/src/assets/slash-circle-01.svg +3 -0
- package/src/assets/x-circle-bold.svg +5 -0
- package/src/assets/x-close.svg +3 -0
- package/src/assets/x.svg +3 -0
- package/src/client/MessagingClient.ts +87 -0
- package/src/client/adapters/Audio.ts +10 -0
- package/src/client/adapters/Card.ts +104 -0
- package/src/client/adapters/Carousel.ts +11 -0
- package/src/client/adapters/Choice.ts +48 -0
- package/src/client/adapters/Dropdown.ts +39 -0
- package/src/client/adapters/File.ts +10 -0
- package/src/client/adapters/Image.ts +10 -0
- package/src/client/adapters/Location.ts +18 -0
- package/src/client/adapters/Message.ts +26 -0
- package/src/client/adapters/Text.ts +11 -0
- package/src/client/adapters/Utils.ts +11 -0
- package/src/client/adapters/Video.ts +10 -0
- package/src/client/adapters/Voice.ts +9 -0
- package/src/client/adapters/index.ts +12 -0
- package/src/client/index.ts +2 -0
- package/src/components/Avatar.tsx +22 -0
- package/src/components/Block.tsx +17 -0
- package/src/components/Composer.tsx +115 -0
- package/src/components/Container.tsx +17 -0
- package/src/components/Header.tsx +141 -0
- package/src/components/LoadingIndicator.tsx +15 -0
- package/src/components/Message.tsx +52 -0
- package/src/components/MessageList.tsx +75 -0
- package/src/components/Modal.tsx +49 -0
- package/src/components/RestartConversation.tsx +52 -0
- package/src/components/Webchat.tsx +68 -0
- package/src/components/dev-tools/DevTools.tsx +496 -0
- package/src/components/dev-tools/configuration.tsx +27 -0
- package/src/components/dev-tools/helpers.ts +21 -0
- package/src/components/index.ts +12 -0
- package/src/components/renderers/Audio.tsx +11 -0
- package/src/components/renderers/Bubble.tsx +12 -0
- package/src/components/renderers/Button.tsx +59 -0
- package/src/components/renderers/Carousel.tsx +51 -0
- package/src/components/renderers/Column.tsx +22 -0
- package/src/components/renderers/Dropdown.tsx +170 -0
- package/src/components/renderers/File.tsx +13 -0
- package/src/components/renderers/Image.tsx +63 -0
- package/src/components/renderers/Location.tsx +16 -0
- package/src/components/renderers/Row.tsx +22 -0
- package/src/components/renderers/Text.tsx +32 -0
- package/src/components/renderers/Video.tsx +11 -0
- package/src/components/renderers/index.ts +28 -0
- package/src/contexts/ComposerContext.ts +16 -0
- package/src/contexts/MessageContext.ts +16 -0
- package/src/contexts/ModalContext.ts +19 -0
- package/src/contexts/WebchatContext.ts +61 -0
- package/src/contexts/index.ts +4 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useImageSize.ts +30 -0
- package/src/hooks/useRefresh.ts +33 -0
- package/src/hooks/useWebchatStore.ts +45 -0
- package/src/index.css +18 -0
- package/src/index.ts +3 -0
- package/src/main.tsx +33 -0
- package/src/providers/ModalProvider.tsx +35 -0
- package/src/providers/WebchatProvider.tsx +107 -0
- package/src/providers/index.ts +2 -0
- package/src/schemas/index.ts +1 -0
- package/src/schemas/theme.ts +188 -0
- package/src/services/clipboard.ts +8 -0
- package/src/services/images.ts +39 -0
- package/src/services/index.ts +3 -0
- package/src/services/toast.tsx +71 -0
- package/src/themes/dawn.ts +277 -0
- package/src/themes/duskTheme.ts +349 -0
- package/src/themes/eggplant.ts +353 -0
- package/src/themes/galaxy.ts +323 -0
- package/src/themes/index.ts +6 -0
- package/src/themes/midnight.ts +276 -0
- package/src/themes/prism.ts +349 -0
- package/src/twind.config.ts +31 -0
- package/src/types/block-type.ts +150 -0
- package/src/types/image.ts +10 -0
- package/src/types/index.ts +2 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +0 -0
- package/tsconfig.json +30 -0
- package/tsconfig.node.json +10 -0
- package/vite.config.ts +31 -0
- package/README.md +0 -31
- package/assets/fonts/roboto/roboto.woff2 +0 -0
- package/assets/fonts/roboto/roboto500.woff2 +0 -0
- package/assets/fonts/roboto.css +0 -128
- package/assets/notification.mp3 +0 -0
- package/dist/components/Composer.js +0 -118
- package/dist/components/Container.js +0 -62
- package/dist/components/ConversationList.d.ts +0 -10
- package/dist/components/ConversationList.js +0 -41
- package/dist/components/Footer.d.ts +0 -3
- package/dist/components/Footer.js +0 -21
- package/dist/components/Header.js +0 -181
- package/dist/components/VoiceRecorder.d.ts +0 -10
- package/dist/components/VoiceRecorder.js +0 -137
- package/dist/components/common/Avatar/index.d.ts +0 -9
- package/dist/components/common/Avatar/index.js +0 -13
- package/dist/components/common/BotInfo/index.d.ts +0 -10
- package/dist/components/common/BotInfo/index.js +0 -102
- package/dist/components/common/BotInfo/style.scss +0 -88
- package/dist/components/common/ConfirmDialog/index.d.ts +0 -11
- package/dist/components/common/ConfirmDialog/index.js +0 -78
- package/dist/components/common/ConfirmDialog/style.module.scss +0 -48
- package/dist/components/common/Dialog/index.d.ts +0 -17
- package/dist/components/common/Dialog/index.js +0 -57
- package/dist/components/common/Dialog/style.module.scss +0 -29
- package/dist/components/common/ToolTip/index.d.ts +0 -10
- package/dist/components/common/ToolTip/index.js +0 -163
- package/dist/components/common/ToolTip/style.module.scss +0 -108
- package/dist/components/common/ToolTip/utils.d.ts +0 -15
- package/dist/components/common/ToolTip/utils.js +0 -78
- package/dist/components/common/variables.scss +0 -38
- package/dist/components/messages/InlineFeedback.d.ts +0 -11
- package/dist/components/messages/InlineFeedback.js +0 -56
- package/dist/components/messages/Message.d.ts +0 -11
- package/dist/components/messages/Message.js +0 -106
- package/dist/components/messages/MessageGroup.d.ts +0 -23
- package/dist/components/messages/MessageGroup.js +0 -63
- package/dist/components/messages/MessageList.d.ts +0 -10
- package/dist/components/messages/MessageList.js +0 -154
- package/dist/core/api.d.ts +0 -23
- package/dist/core/api.js +0 -117
- package/dist/core/constants.d.ts +0 -14
- package/dist/core/constants.js +0 -29
- package/dist/core/socket.d.ts +0 -14
- package/dist/core/socket.js +0 -57
- package/dist/declaration.d.ts +0 -1
- package/dist/declaration.js +0 -1
- package/dist/fonts/roboto.d.ts +0 -4
- package/dist/fonts/roboto.js +0 -9
- package/dist/globals.d.ts +0 -7
- package/dist/globals.js +0 -2
- package/dist/icons/Add.d.ts +0 -6
- package/dist/icons/Add.js +0 -10
- package/dist/icons/Cancel.d.ts +0 -5
- package/dist/icons/Cancel.js +0 -10
- package/dist/icons/Chat.d.ts +0 -6
- package/dist/icons/Chat.js +0 -9
- package/dist/icons/Close.d.ts +0 -3
- package/dist/icons/Close.js +0 -10
- package/dist/icons/Delete.d.ts +0 -3
- package/dist/icons/Delete.js +0 -11
- package/dist/icons/Download.d.ts +0 -3
- package/dist/icons/Download.js +0 -10
- package/dist/icons/Email.d.ts +0 -3
- package/dist/icons/Email.js +0 -8
- package/dist/icons/Information.d.ts +0 -3
- package/dist/icons/Information.js +0 -12
- package/dist/icons/List.d.ts +0 -3
- package/dist/icons/List.js +0 -15
- package/dist/icons/Microphone.d.ts +0 -5
- package/dist/icons/Microphone.js +0 -12
- package/dist/icons/Phone.d.ts +0 -3
- package/dist/icons/Phone.js +0 -8
- package/dist/icons/Reload.d.ts +0 -3
- package/dist/icons/Reload.js +0 -10
- package/dist/icons/ThumbsDown.d.ts +0 -3
- package/dist/icons/ThumbsDown.js +0 -11
- package/dist/icons/ThumbsUp.d.ts +0 -3
- package/dist/icons/ThumbsUp.js +0 -11
- package/dist/icons/Website.d.ts +0 -3
- package/dist/icons/Website.js +0 -8
- package/dist/main.js +0 -336
- package/dist/store/composer.d.ts +0 -17
- package/dist/store/composer.js +0 -98
- package/dist/store/index.d.ts +0 -82
- package/dist/store/index.js +0 -576
- package/dist/store/view.d.ts +0 -61
- package/dist/store/view.js +0 -361
- package/dist/translations/ar.json +0 -30
- package/dist/translations/de.json +0 -32
- package/dist/translations/en.json +0 -40
- package/dist/translations/es.json +0 -19
- package/dist/translations/fr.json +0 -40
- package/dist/translations/index.d.ts +0 -9
- package/dist/translations/index.js +0 -95
- package/dist/translations/it.json +0 -38
- package/dist/translations/pt.json +0 -19
- package/dist/translations/ru.json +0 -24
- package/dist/translations/uk.json +0 -24
- package/dist/typings.d.ts +0 -378
- package/dist/typings.js +0 -2
- package/dist/utils/analytics.d.ts +0 -5
- package/dist/utils/analytics.js +0 -37
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/index.js +0 -27
- package/dist/utils/storage.d.ts +0 -16
- package/dist/utils/storage.js +0 -129
- package/dist/utils/webchatEvents.d.ts +0 -2
- package/dist/utils/webchatEvents.js +0 -14
package/dist/icons/Add.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = ({ height = 20, width = 20 }) => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", version: "1.1", x: "0px", y: "0px", width: width, height: height, viewBox: "0 0 357 357" },
|
|
9
|
-
react_1.default.createElement("g", { id: "add" },
|
|
10
|
-
react_1.default.createElement("path", { d: "M357,204H204v153h-51V204H0v-51h153V0h51v153h153V204z" })))));
|
package/dist/icons/Cancel.d.ts
DELETED
package/dist/icons/Cancel.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = ({ fill = 'black' }) => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", version: "1.1", x: "0px", y: "0px", width: "16px", height: "16px", viewBox: "0 0 492 492", fill: `${fill}` },
|
|
9
|
-
react_1.default.createElement("g", null,
|
|
10
|
-
react_1.default.createElement("path", { d: "M300.188,246L484.14,62.04c5.06-5.064,7.852-11.82,7.86-19.024c0-7.208-2.792-13.972-7.86-19.028L468.02,7.872 c-5.068-5.076-11.824-7.856-19.036-7.856c-7.2,0-13.956,2.78-19.024,7.856L246.008,191.82L62.048,7.872 c-5.06-5.076-11.82-7.856-19.028-7.856c-7.2,0-13.96,2.78-19.02,7.856L7.872,23.988c-10.496,10.496-10.496,27.568,0,38.052 L191.828,246L7.872,429.952c-5.064,5.072-7.852,11.828-7.852,19.032c0,7.204,2.788,13.96,7.852,19.028l16.124,16.116 c5.06,5.072,11.824,7.856,19.02,7.856c7.208,0,13.968-2.784,19.028-7.856l183.96-183.952l183.952,183.952 c5.068,5.072,11.824,7.856,19.024,7.856h0.008c7.204,0,13.96-2.784,19.028-7.856l16.12-16.116 c5.06-5.064,7.852-11.824,7.852-19.028c0-7.204-2.792-13.96-7.852-19.028L300.188,246z" })))));
|
package/dist/icons/Chat.d.ts
DELETED
package/dist/icons/Chat.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = ({ height = 20, width = 20 }) => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { width: width, height: height, viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
|
-
react_1.default.createElement("path", { d: "M4.583 14.894l-3.256 3.78c-.7.813-1.26.598-1.25-.46a10689.413 10689.413 0 0 1 .035-4.775V4.816a3.89 3.89 0 0 1 3.88-3.89h12.064a3.885 3.885 0 0 1 3.882 3.89v6.185a3.89 3.89 0 0 1-3.882 3.89H4.583z", fill: "#FFF", fillRule: "evenodd" }))));
|
package/dist/icons/Close.d.ts
DELETED
package/dist/icons/Close.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { height: "15", viewBox: "0 0 95 95", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
|
-
react_1.default.createElement("g", null,
|
|
10
|
-
react_1.default.createElement("path", { xmlns: "http://www.w3.org/2000/svg", d: "M62.819,47.97l32.533-32.534c0.781-0.781,0.781-2.047,0-2.828L83.333,0.586C82.958,0.211,82.448,0,81.919,0 c-0.53,0-1.039,0.211-1.414,0.586L47.97,33.121L15.435,0.586c-0.75-0.75-2.078-0.75-2.828,0L0.587,12.608 c-0.781,0.781-0.781,2.047,0,2.828L33.121,47.97L0.587,80.504c-0.781,0.781-0.781,2.047,0,2.828l12.02,12.021 c0.375,0.375,0.884,0.586,1.414,0.586c0.53,0,1.039-0.211,1.414-0.586L47.97,62.818l32.535,32.535 c0.375,0.375,0.884,0.586,1.414,0.586c0.529,0,1.039-0.211,1.414-0.586l12.02-12.021c0.781-0.781,0.781-2.048,0-2.828L62.819,47.97 z" })))));
|
package/dist/icons/Delete.d.ts
DELETED
package/dist/icons/Delete.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { height: "15", viewBox: "0 0 16 16", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
|
-
react_1.default.createElement("g", null,
|
|
10
|
-
react_1.default.createElement("path", { d: "M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z" }),
|
|
11
|
-
react_1.default.createElement("path", { fillRule: "evenodd", d: "M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z" })))));
|
package/dist/icons/Download.d.ts
DELETED
package/dist/icons/Download.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", height: "15", viewBox: "0 0 32 32" },
|
|
9
|
-
react_1.default.createElement("title", null, "Download"),
|
|
10
|
-
react_1.default.createElement("path", { d: "M27.414 19.414l-10 10c-0.781 0.781-2.047 0.781-2.828 0l-10-10c-0.781-0.781-0.781-2.047 0-2.828s2.047-0.781 2.828 0l6.586 6.586v-19.172c0-1.105 0.895-2 2-2s2 0.895 2 2v19.172l6.586-6.586c0.39-0.39 0.902-0.586 1.414-0.586s1.024 0.195 1.414 0.586c0.781 0.781 0.781 2.047 0 2.828z" }))));
|
package/dist/icons/Email.d.ts
DELETED
package/dist/icons/Email.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" },
|
|
8
|
-
react_1.default.createElement("path", { d: "M12 12.713l-11.985-9.713h23.97l-11.985 9.713zm0 2.574l-12-9.725v15.438h24v-15.438l-12 9.725z" })));
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", version: "1.1", width: "17", viewBox: "0 0 437.6 437.6" },
|
|
9
|
-
react_1.default.createElement("g", null,
|
|
10
|
-
react_1.default.createElement("path", { d: "M194,142.8c0.8,1.6,1.6,3.2,2.4,4.4c0.8,1.2,2,2.4,2.8,3.6c1.2,1.2,2.4,2.4,4,3.6c1.2,0.8,2.8,2,4.8,2.4 c1.6,0.8,3.2,1.2,5.2,1.6c2,0.4,3.6,0.4,5.2,0.4c1.6,0,3.6,0,5.2-0.4c1.6-0.4,3.2-0.8,4.4-1.6h0.4c1.6-0.8,3.2-1.6,4.8-2.8 c1.2-0.8,2.4-2,3.6-3.2l0.4-0.4c1.2-1.2,2-2.4,2.8-3.6s1.6-2.4,2-4c0-0.4,0-0.4,0.4-0.8c0.8-1.6,1.2-3.6,1.6-5.2 c0.4-1.6,0.4-3.6,0.4-5.2s0-3.6-0.4-5.2c-0.4-1.6-0.8-3.2-1.6-5.2c-1.2-2.8-2.8-5.2-4.8-7.2c-0.4-0.4-0.4-0.4-0.8-0.8 c-1.2-1.2-2.4-2-4-3.2c-1.6-0.8-2.8-1.6-4.4-2.4c-1.6-0.8-3.2-1.2-4.8-1.6c-2-0.4-3.6-0.4-5.2-0.4c-1.6,0-3.6,0-5.2,0.4 c-1.6,0.4-3.2,0.8-4.8,1.6H208c-1.6,0.8-3.2,1.6-4.4,2.4c-1.6,1.2-2.8,2-4,3.2c-1.2,1.2-2.4,2.4-3.2,3.6 c-0.8,1.2-1.6,2.8-2.4,4.4c-0.8,1.6-1.2,3.2-1.6,4.8c-0.4,2-0.4,3.6-0.4,5.2c0,1.6,0,3.6,0.4,5.2 C192.8,139.6,193.6,141.2,194,142.8z" }),
|
|
11
|
-
react_1.default.createElement("path", { d: "M249.6,289.2h-9.2v-98c0-5.6-4.4-10.4-10.4-10.4h-42c-5.6,0-10.4,4.4-10.4,10.4v21.6c0,5.6,4.4,10.4,10.4,10.4h8.4v66.4 H188c-5.6,0-10.4,4.4-10.4,10.4v21.6c0,5.6,4.4,10.4,10.4,10.4h61.6c5.6,0,10.4-4.4,10.4-10.4V300 C260,294,255.2,289.2,249.6,289.2z" }),
|
|
12
|
-
react_1.default.createElement("path", { d: "M218.8,0C98,0,0,98,0,218.8s98,218.8,218.8,218.8s218.8-98,218.8-218.8S339.6,0,218.8,0z M218.8,408.8 c-104.8,0-190-85.2-190-190s85.2-190,190-190s190,85.2,190,190S323.6,408.8,218.8,408.8z" })))));
|
package/dist/icons/List.d.ts
DELETED
package/dist/icons/List.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { height: "15", viewBox: "0 0 489 489", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
|
-
react_1.default.createElement("g", { xmlns: "http://www.w3.org/2000/svg" },
|
|
10
|
-
react_1.default.createElement("path", { d: "M52.7,134.75c29.1,0,52.7-23.7,52.7-52.7s-23.6-52.8-52.7-52.8S0,52.95,0,81.95S23.7,134.75,52.7,134.75z M52.7,53.75 c15.6,0,28.2,12.7,28.2,28.2s-12.7,28.2-28.2,28.2s-28.2-12.7-28.2-28.2S37.2,53.75,52.7,53.75z" }),
|
|
11
|
-
react_1.default.createElement("path", { d: "M52.7,297.55c29.1,0,52.7-23.7,52.7-52.7s-23.6-52.7-52.7-52.7S0,215.75,0,244.85S23.7,297.55,52.7,297.55z M52.7,216.65 c15.6,0,28.2,12.7,28.2,28.2s-12.7,28.2-28.2,28.2s-28.2-12.6-28.2-28.2S37.2,216.65,52.7,216.65z" }),
|
|
12
|
-
react_1.default.createElement("path", { d: "M52.7,460.45c29.1,0,52.7-23.7,52.7-52.7c0-29.1-23.7-52.7-52.7-52.7S0,378.75,0,407.75C0,436.75,23.7,460.45,52.7,460.45 z M52.7,379.45c15.6,0,28.2,12.7,28.2,28.2c0,15.6-12.7,28.2-28.2,28.2s-28.2-12.7-28.2-28.2C24.5,392.15,37.2,379.45,52.7,379.45 z" }),
|
|
13
|
-
react_1.default.createElement("path", { d: "M175.9,94.25h301.5c6.8,0,12.3-5.5,12.3-12.3s-5.5-12.3-12.3-12.3H175.9c-6.8,0-12.3,5.5-12.3,12.3 S169.1,94.25,175.9,94.25z" }),
|
|
14
|
-
react_1.default.createElement("path", { d: "M175.9,257.15h301.5c6.8,0,12.3-5.5,12.3-12.3s-5.5-12.3-12.3-12.3H175.9c-6.8,0-12.3,5.5-12.3,12.3 S169.1,257.15,175.9,257.15z" }),
|
|
15
|
-
react_1.default.createElement("path", { d: "M175.9,419.95h301.5c6.8,0,12.3-5.5,12.3-12.3s-5.5-12.3-12.3-12.3H175.9c-6.8,0-12.3,5.5-12.3,12.3 S169.1,419.95,175.9,419.95z" })))));
|
package/dist/icons/Microphone.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = ({ fill = 'black' }) => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", width: "16px", height: "16px", viewBox: "0 0 475.085 475.085", fill: `${fill}` },
|
|
9
|
-
react_1.default.createElement("g", null,
|
|
10
|
-
react_1.default.createElement("g", null,
|
|
11
|
-
react_1.default.createElement("path", { d: "M237.541,328.897c25.128,0,46.632-8.946,64.523-26.83c17.888-17.884,26.833-39.399,26.833-64.525V91.365\n c0-25.126-8.938-46.632-26.833-64.525C284.173,8.951,262.669,0,237.541,0c-25.125,0-46.632,8.951-64.524,26.84\n c-17.893,17.89-26.838,39.399-26.838,64.525v146.177c0,25.125,8.949,46.641,26.838,64.525\n C190.906,319.951,212.416,328.897,237.541,328.897z" }),
|
|
12
|
-
react_1.default.createElement("path", { d: "M396.563,188.15c-3.606-3.617-7.898-5.426-12.847-5.426c-4.944,0-9.226,1.809-12.847,5.426\n c-3.613,3.616-5.421,7.898-5.421,12.845v36.547c0,35.214-12.518,65.333-37.548,90.362c-25.022,25.03-55.145,37.545-90.36,37.545\n c-35.214,0-65.334-12.515-90.365-37.545c-25.028-25.022-37.541-55.147-37.541-90.362v-36.547c0-4.947-1.809-9.229-5.424-12.845\n c-3.617-3.617-7.895-5.426-12.847-5.426c-4.952,0-9.235,1.809-12.85,5.426c-3.618,3.616-5.426,7.898-5.426,12.845v36.547\n c0,42.065,14.04,78.659,42.112,109.776c28.073,31.118,62.762,48.961,104.068,53.526v37.691h-73.089\n c-4.949,0-9.231,1.811-12.847,5.428c-3.617,3.614-5.426,7.898-5.426,12.847c0,4.941,1.809,9.233,5.426,12.847\n c3.616,3.614,7.898,5.428,12.847,5.428h182.719c4.948,0,9.236-1.813,12.847-5.428c3.621-3.613,5.431-7.905,5.431-12.847\n c0-4.948-1.81-9.232-5.431-12.847c-3.61-3.617-7.898-5.428-12.847-5.428h-73.08v-37.691\n c41.299-4.565,75.985-22.408,104.061-53.526c28.076-31.117,42.12-67.711,42.12-109.776v-36.547\n C401.998,196.049,400.185,191.77,396.563,188.15z" }))))));
|
package/dist/icons/Phone.d.ts
DELETED
package/dist/icons/Phone.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" },
|
|
8
|
-
react_1.default.createElement("path", { d: "M20 22.621l-3.521-6.795c-.008.004-1.974.97-2.064 1.011-2.24 1.086-6.799-7.82-4.609-8.994l2.083-1.026-3.493-6.817-2.106 1.039c-7.202 3.755 4.233 25.982 11.6 22.615.121-.055 2.102-1.029 2.11-1.033z" })));
|
package/dist/icons/Reload.d.ts
DELETED
package/dist/icons/Reload.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { height: "15", viewBox: "0 0 512 512", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
|
-
react_1.default.createElement("g", null,
|
|
10
|
-
react_1.default.createElement("path", { xmlns: "http://www.w3.org/2000/svg", d: "M288.502,32.502c-108.328,0-198.827,77.485-219.166,179.899l-42.482-53.107L0,180.784l68.769,85.961 c3.352,4.178,8.338,6.447,13.427,6.447c2.596,0,5.226-0.585,7.685-1.805l103.153-51.577l-15.387-30.757l-75.8,37.892 c14.063-90.5,92.27-160.059,186.655-160.059c104.271,0,189.114,84.843,189.114,189.114s-84.843,189.114-189.114,189.114v34.384 C411.735,479.498,512,379.233,512,256S411.735,32.502,288.502,32.502z" })))));
|
package/dist/icons/ThumbsDown.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { version: "1.1", width: "16", height: "16", viewBox: "0 0 16 16" },
|
|
9
|
-
react_1.default.createElement("g", { id: "thumbs_down" },
|
|
10
|
-
react_1.default.createElement("g", null,
|
|
11
|
-
react_1.default.createElement("path", { d: "M2,2H0v7h2c0.55,0,1-0.45,1-1V3C3,2.45,2.55,2,2,2z M15.99,6.38\n\t\t\tc0.08-0.58-0.44-1.02-1.15-1.05c-0.25-0.01-0.52-0.03-0.81-0.05c0.02,0,0.05-0.01,0.07-0.01c0.7-0.1,1.34-0.49,1.41-1.07\n\t\t\tc0.06-0.58-0.46-0.97-1.17-1.04c-0.25-0.02-0.52-0.04-0.79-0.06c0.47-0.15,0.84-0.42,0.87-0.93c0.04-0.58-0.79-1.03-1.5-1.09\n\t\t\tc-0.27-0.02-0.51-0.04-0.73-0.05l0,0c-0.03,0-0.06,0-0.09,0C11.87,1.01,11.67,1.01,11.48,1C8.35,0.95,5.66,1.47,4,2.51v6\n\t\t\tc2.14,1.29,4.76,3.59,4.21,5.51C8.03,14.61,8.52,15.07,9.19,15c0.81-0.09,1.37-0.91,1.4-1.78c0.04-1-0.15-2.01-0.5-2.91\n\t\t\tc-0.04-0.25,0.01-0.5,0.37-0.53c0.49-0.03,1.11-0.06,1.59-0.08c0.26,0,0.51-0.01,0.75-0.02c0,0,0.01,0,0.01,0h0\n\t\t\tc0.41-0.02,0.8-0.05,1.13-0.09c0.7-0.09,1.35-0.47,1.43-1.05c0.08-0.58-0.44-0.97-1.15-1.05c-0.05-0.01-0.11-0.01-0.16-0.02\n\t\t\tc0.17-0.01,0.33-0.03,0.49-0.05C15.27,7.34,15.92,6.96,15.99,6.38z" }))))));
|
package/dist/icons/ThumbsUp.d.ts
DELETED
package/dist/icons/ThumbsUp.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("i", null,
|
|
8
|
-
react_1.default.createElement("svg", { version: "1.1", width: "16", height: "16", viewBox: "0 0 16 16" },
|
|
9
|
-
react_1.default.createElement("g", { id: "thumbs_up" },
|
|
10
|
-
react_1.default.createElement("g", null,
|
|
11
|
-
react_1.default.createElement("path", { d: "M15.99,9.62c-0.08-0.58-0.73-0.96-1.43-1.05c-0.15-0.02-0.32-0.04-0.49-0.05\n\t\t\tc0.06-0.01,0.11-0.01,0.16-0.02c0.71-0.08,1.23-0.47,1.15-1.05c-0.08-0.58-0.73-0.96-1.43-1.05c-0.34-0.04-0.72-0.07-1.13-0.09h0\n\t\t\tc0,0,0,0-0.01,0c-0.24-0.01-0.49-0.02-0.75-0.02c-0.48-0.02-1.11-0.04-1.59-0.08c-0.36-0.03-0.41-0.28-0.37-0.53\n\t\t\tc0.35-0.9,0.54-1.91,0.5-2.91C10.56,1.92,10,1.09,9.19,1C8.52,0.93,8.03,1.39,8.2,1.98C8.76,3.91,6.13,6.2,4,7.49v6\n\t\t\tc1.66,1.03,4.35,1.56,7.48,1.5c0.19,0,0.39-0.01,0.62-0.02c0.03,0,0.06,0,0.09,0l0,0c0.22-0.01,0.46-0.03,0.73-0.05\n\t\t\tc0.71-0.06,1.54-0.51,1.5-1.09c-0.03-0.51-0.4-0.79-0.87-0.93c0.27-0.02,0.54-0.04,0.79-0.06c0.71-0.06,1.24-0.45,1.17-1.04\n\t\t\tc-0.06-0.58-0.7-0.97-1.41-1.07c-0.02,0-0.05-0.01-0.07-0.01c0.29-0.02,0.57-0.03,0.81-0.05C15.55,10.64,16.07,10.2,15.99,9.62z\n\t\t\t M2,7H0v7h2c0.55,0,1-0.45,1-1V8C3,7.44,2.55,7,2,7z" }))))));
|
package/dist/icons/Website.d.ts
DELETED
package/dist/icons/Website.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
exports.default = () => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" },
|
|
8
|
-
react_1.default.createElement("path", { d: "M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm1 16.057v-3.057h2.994c-.059 1.143-.212 2.24-.456 3.279-.823-.12-1.674-.188-2.538-.222zm1.957 2.162c-.499 1.33-1.159 2.497-1.957 3.456v-3.62c.666.028 1.319.081 1.957.164zm-1.957-7.219v-3.015c.868-.034 1.721-.103 2.548-.224.238 1.027.389 2.111.446 3.239h-2.994zm0-5.014v-3.661c.806.969 1.471 2.15 1.971 3.496-.642.084-1.3.137-1.971.165zm2.703-3.267c1.237.496 2.354 1.228 3.29 2.146-.642.234-1.311.442-2.019.607-.344-.992-.775-1.91-1.271-2.753zm-7.241 13.56c-.244-1.039-.398-2.136-.456-3.279h2.994v3.057c-.865.034-1.714.102-2.538.222zm2.538 1.776v3.62c-.798-.959-1.458-2.126-1.957-3.456.638-.083 1.291-.136 1.957-.164zm-2.994-7.055c.057-1.128.207-2.212.446-3.239.827.121 1.68.19 2.548.224v3.015h-2.994zm1.024-5.179c.5-1.346 1.165-2.527 1.97-3.496v3.661c-.671-.028-1.329-.081-1.97-.165zm-2.005-.35c-.708-.165-1.377-.373-2.018-.607.937-.918 2.053-1.65 3.29-2.146-.496.844-.927 1.762-1.272 2.753zm-.549 1.918c-.264 1.151-.434 2.36-.492 3.611h-3.933c.165-1.658.739-3.197 1.617-4.518.88.361 1.816.67 2.808.907zm.009 9.262c-.988.236-1.92.542-2.797.9-.89-1.328-1.471-2.879-1.637-4.551h3.934c.058 1.265.231 2.488.5 3.651zm.553 1.917c.342.976.768 1.881 1.257 2.712-1.223-.49-2.326-1.211-3.256-2.115.636-.229 1.299-.435 1.999-.597zm9.924 0c.7.163 1.362.367 1.999.597-.931.903-2.034 1.625-3.257 2.116.489-.832.915-1.737 1.258-2.713zm.553-1.917c.27-1.163.442-2.386.501-3.651h3.934c-.167 1.672-.748 3.223-1.638 4.551-.877-.358-1.81-.664-2.797-.9zm.501-5.651c-.058-1.251-.229-2.46-.492-3.611.992-.237 1.929-.546 2.809-.907.877 1.321 1.451 2.86 1.616 4.518h-3.933z" })));
|
package/dist/main.js
DELETED
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
|
-
};
|
|
33
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.DEFAULT_TYPING_DELAY = void 0;
|
|
35
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
36
|
-
const debounce_1 = __importDefault(require("lodash/debounce"));
|
|
37
|
-
const mobx_1 = require("mobx");
|
|
38
|
-
const mobx_react_1 = require("mobx-react");
|
|
39
|
-
const query_string_1 = __importDefault(require("query-string"));
|
|
40
|
-
const react_1 = __importDefault(require("react"));
|
|
41
|
-
const react_intl_1 = require("react-intl");
|
|
42
|
-
const Container_1 = __importDefault(require("./components/Container"));
|
|
43
|
-
const constants_1 = __importDefault(require("./core/constants"));
|
|
44
|
-
const socket_1 = __importDefault(require("./core/socket"));
|
|
45
|
-
const Chat_1 = __importDefault(require("./icons/Chat"));
|
|
46
|
-
const utils_1 = require("./utils");
|
|
47
|
-
const analytics_1 = require("./utils/analytics");
|
|
48
|
-
const webchatEvents_1 = require("./utils/webchatEvents");
|
|
49
|
-
exports.DEFAULT_TYPING_DELAY = 1000;
|
|
50
|
-
class Web extends react_1.default.Component {
|
|
51
|
-
constructor(props) {
|
|
52
|
-
super(props);
|
|
53
|
-
this.hasBeenInitialized = false;
|
|
54
|
-
this.isCurrentConversation = (event) => {
|
|
55
|
-
return this.props.currentConversationId === event.conversationId;
|
|
56
|
-
};
|
|
57
|
-
this.handleKeyDown = (e) => __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
var _a;
|
|
59
|
-
if (!((_a = this.props.config) === null || _a === void 0 ? void 0 : _a.closeOnEscape)) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (e.key === 'Escape') {
|
|
63
|
-
this.props.hideChat();
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
this.handleIframeApi = ({ data }) => __awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
switch (data.action) {
|
|
68
|
-
case 'configure':
|
|
69
|
-
return this.props.updateConfig(Object.assign({}, constants_1.default.DEFAULT_CONFIG, data.payload));
|
|
70
|
-
case 'mergeConfig':
|
|
71
|
-
this.props.mergeConfig(data.payload);
|
|
72
|
-
const oldUserId = this.socket.socket.userId;
|
|
73
|
-
yield this.socket.reload(data.payload);
|
|
74
|
-
if (this.socket.socket.userId !== oldUserId) {
|
|
75
|
-
this.props.resetConversation();
|
|
76
|
-
yield this.props.initializeChat();
|
|
77
|
-
}
|
|
78
|
-
return;
|
|
79
|
-
case 'sendPayload':
|
|
80
|
-
return this.props.sendData(data.payload);
|
|
81
|
-
case 'event':
|
|
82
|
-
const { type, text, conversationId } = data.payload;
|
|
83
|
-
if (type === 'show') {
|
|
84
|
-
this.props.showChat();
|
|
85
|
-
(0, analytics_1.trackWebchatState)('show');
|
|
86
|
-
}
|
|
87
|
-
else if (type === 'hide') {
|
|
88
|
-
this.props.hideChat();
|
|
89
|
-
(0, analytics_1.trackWebchatState)('hide');
|
|
90
|
-
}
|
|
91
|
-
else if (type === 'toggle') {
|
|
92
|
-
this.props.displayWidgetView ? this.props.showChat() : this.props.hideChat();
|
|
93
|
-
(0, analytics_1.trackWebchatState)('toggle');
|
|
94
|
-
}
|
|
95
|
-
else if (type === 'message') {
|
|
96
|
-
yield this.props.sendMessage(text);
|
|
97
|
-
}
|
|
98
|
-
else if (type === 'loadConversation') {
|
|
99
|
-
yield this.props.fetchConversation(conversationId);
|
|
100
|
-
}
|
|
101
|
-
else if (type === 'createConversation') {
|
|
102
|
-
yield this.props.createConversation();
|
|
103
|
-
}
|
|
104
|
-
else if (type === 'toggleBotInfo') {
|
|
105
|
-
this.props.toggleBotInfo();
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
yield this.props.sendData({ type, payload: data.payload });
|
|
109
|
-
}
|
|
110
|
-
default:
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
this.handleNewMessage = (event) => __awaiter(this, void 0, void 0, function* () {
|
|
115
|
-
var _b, _c, _d;
|
|
116
|
-
if (!this.isCurrentConversation(event)) {
|
|
117
|
-
// don't do anything, it's a message from another conversation
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
if (event.authorId === undefined) {
|
|
121
|
-
const value = (event.payload.type === 'typing' ? event.payload.value : undefined) || exports.DEFAULT_TYPING_DELAY;
|
|
122
|
-
yield this.handleTyping(Object.assign(Object.assign({}, event), { timeInMs: value }));
|
|
123
|
-
}
|
|
124
|
-
if (((_b = event.payload) === null || _b === void 0 ? void 0 : _b.type) === 'visit') {
|
|
125
|
-
// don't do anything, it's the system message
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (((_c = this.props.currentConversation) === null || _c === void 0 ? void 0 : _c.userId) !== event.authorId) {
|
|
129
|
-
(0, analytics_1.trackMessage)('received');
|
|
130
|
-
(0, webchatEvents_1.postMessageToParent)('MESSAGE.RECEIVED', event, this.props.config.chatId);
|
|
131
|
-
// This is to handle a special case for the emulator, setting the selected css class to the last message group
|
|
132
|
-
// This needs a rethinking
|
|
133
|
-
if (event.id) {
|
|
134
|
-
(_d = this.props.store) === null || _d === void 0 ? void 0 : _d.setSelectedMessage(event.id);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
this.props.updateLastMessage(event.conversationId, event);
|
|
138
|
-
yield this.props.addEventToConversation(event);
|
|
139
|
-
// there's no focus on the actual conversation
|
|
140
|
-
if (!document.hasFocus() || this.props.activeView !== 'side') {
|
|
141
|
-
yield this.playSound();
|
|
142
|
-
this.props.incrementUnread();
|
|
143
|
-
}
|
|
144
|
-
this.handleResetUnreadCount();
|
|
145
|
-
});
|
|
146
|
-
this.handleTyping = (event) => __awaiter(this, void 0, void 0, function* () {
|
|
147
|
-
yield this.props.updateTyping(event);
|
|
148
|
-
});
|
|
149
|
-
this.playSound = (0, debounce_1.default)(() => __awaiter(this, void 0, void 0, function* () {
|
|
150
|
-
var _e;
|
|
151
|
-
const disableNotificationSound = this.config.disableNotificationSound || ((_e = this.props.config) === null || _e === void 0 ? void 0 : _e.disableNotificationSound);
|
|
152
|
-
if (disableNotificationSound || this.audio.readyState < 2) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
yield this.audio.play();
|
|
156
|
-
}), constants_1.default.MIN_TIME_BETWEEN_SOUNDS);
|
|
157
|
-
this.handleResetUnreadCount = () => {
|
|
158
|
-
if (document.hasFocus() && this.props.activeView === 'side') {
|
|
159
|
-
this.props.resetUnread();
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
(0, analytics_1.initializeAnalytics)();
|
|
163
|
-
}
|
|
164
|
-
componentDidMount() {
|
|
165
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
-
this.audio = new Audio(require('url:../assets/notification.mp3'));
|
|
167
|
-
this.props.setIntlProvider(this.props.intl);
|
|
168
|
-
window.store = this.props.store;
|
|
169
|
-
window.addEventListener('message', this.handleIframeApi);
|
|
170
|
-
window.addEventListener('keydown', this.handleKeyDown);
|
|
171
|
-
yield this.loadConfig();
|
|
172
|
-
yield this.initializeIfChatDisplayed();
|
|
173
|
-
this.props.setLoadingCompleted();
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
componentWillUnmount() {
|
|
177
|
-
window.removeEventListener('message', this.handleIframeApi);
|
|
178
|
-
window.removeEventListener('keydown', this.handleKeyDown);
|
|
179
|
-
}
|
|
180
|
-
componentDidUpdate() {
|
|
181
|
-
if (this.config) {
|
|
182
|
-
void this.initializeIfChatDisplayed();
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
initializeIfChatDisplayed() {
|
|
186
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
-
if (this.hasBeenInitialized) {
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
if (this.props.activeView === 'side' || this.props.isFullscreen) {
|
|
191
|
-
this.hasBeenInitialized = true;
|
|
192
|
-
if (this.isLazySocket() || !this.socket) {
|
|
193
|
-
yield this.initializeSocket();
|
|
194
|
-
}
|
|
195
|
-
yield this.socket.connect();
|
|
196
|
-
this.props.setSocket(this.socket);
|
|
197
|
-
yield this.props.initializeChat();
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
loadConfig() {
|
|
202
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
203
|
-
this.config = this.extractConfig();
|
|
204
|
-
this.props.updateConfig(this.config);
|
|
205
|
-
// is this necessary ?
|
|
206
|
-
if (this.config.containerWidth) {
|
|
207
|
-
(0, webchatEvents_1.postMessageToParent)('UI.RESIZE', this.config.containerWidth, this.config.chatId);
|
|
208
|
-
}
|
|
209
|
-
yield this.props.fetchBotInfo();
|
|
210
|
-
if (!this.isLazySocket()) {
|
|
211
|
-
yield this.initializeSocket();
|
|
212
|
-
}
|
|
213
|
-
this.setupObserver();
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
extractConfig() {
|
|
217
|
-
let userConfig = Object.assign({}, constants_1.default.DEFAULT_CONFIG, this.props.config);
|
|
218
|
-
const { options } = query_string_1.default.parse(location.search);
|
|
219
|
-
if (!options || typeof options !== 'string') {
|
|
220
|
-
console.warn(`Cannot decode option. Invalid format: ${typeof options}, expecting 'string'.`);
|
|
221
|
-
return userConfig;
|
|
222
|
-
}
|
|
223
|
-
try {
|
|
224
|
-
const parsedOptions = JSON.parse(decodeURIComponent(options));
|
|
225
|
-
userConfig = Object.assign(userConfig, parsedOptions.config);
|
|
226
|
-
return userConfig;
|
|
227
|
-
}
|
|
228
|
-
catch (err) {
|
|
229
|
-
// TODO: Handle those errors so they don't directly bubble up to the users
|
|
230
|
-
throw new Error(`An error occurred while extracting the configurations ${err}`);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
initializeSocket() {
|
|
234
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
-
this.socket = new socket_1.default(this.config);
|
|
236
|
-
this.socket.onMessage = this.handleNewMessage;
|
|
237
|
-
this.socket.setup();
|
|
238
|
-
yield this.socket.connect();
|
|
239
|
-
this.props.setSocket(this.socket);
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
setupObserver() {
|
|
243
|
-
(0, mobx_1.observe)(this.props.dimensions, 'container', (data) => {
|
|
244
|
-
if (data.newValue) {
|
|
245
|
-
// is this necessary ?
|
|
246
|
-
(0, webchatEvents_1.postMessageToParent)('UI.RESIZE', data.newValue, this.config.chatId);
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
isLazySocket() {
|
|
251
|
-
var _a;
|
|
252
|
-
if (this.config.lazySocket !== undefined) {
|
|
253
|
-
return this.config.lazySocket;
|
|
254
|
-
}
|
|
255
|
-
return (_a = this.props.botInfo) === null || _a === void 0 ? void 0 : _a.lazySocket;
|
|
256
|
-
}
|
|
257
|
-
renderWidget() {
|
|
258
|
-
if (!this.props.showWidgetButton) {
|
|
259
|
-
return null;
|
|
260
|
-
}
|
|
261
|
-
return (react_1.default.createElement("button", { className: (0, classnames_1.default)('bpw-widget-btn', 'bpw-floating-button', {
|
|
262
|
-
[`bpw-anim-${this.props.widgetTransition}` || 'none']: true
|
|
263
|
-
}), "aria-label": this.props.intl.formatMessage({ id: 'widget.toggle' }), onClick: this.props.showChat.bind(this) },
|
|
264
|
-
react_1.default.createElement(Chat_1.default, null),
|
|
265
|
-
this.props.hasUnreadMessages && react_1.default.createElement("span", { className: 'bpw-floating-button-unread' }, this.props.unreadCount)));
|
|
266
|
-
}
|
|
267
|
-
applyAndRenderStyle() {
|
|
268
|
-
var _a, _b, _c;
|
|
269
|
-
const parentClass = (0, classnames_1.default)(`bp-widget-web bp-widget-${this.props.activeView}`, {
|
|
270
|
-
'bp-widget-hidden': !this.props.showWidgetButton && this.props.displayWidgetView,
|
|
271
|
-
[(_a = this.props.config) === null || _a === void 0 ? void 0 : _a.className]: !!((_b = this.props.config) === null || _b === void 0 ? void 0 : _b.className)
|
|
272
|
-
});
|
|
273
|
-
if (this.parentClass !== parentClass) {
|
|
274
|
-
this.parentClass = parentClass;
|
|
275
|
-
(0, webchatEvents_1.postMessageToParent)('UI.SET-CLASS', parentClass, this.config.chatId);
|
|
276
|
-
}
|
|
277
|
-
const stylesheet = this.props.config.stylesheet;
|
|
278
|
-
const extraStylesheet = (_c = this.props.botInfo) === null || _c === void 0 ? void 0 : _c.extraStylesheet;
|
|
279
|
-
const RobotoFont = react_1.default.lazy(() => Promise.resolve().then(() => __importStar(require('./fonts/roboto'))));
|
|
280
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
281
|
-
!!(stylesheet === null || stylesheet === void 0 ? void 0 : stylesheet.length) && react_1.default.createElement("link", { rel: "stylesheet", type: "text/css", href: stylesheet }),
|
|
282
|
-
react_1.default.createElement(react_1.default.Suspense, { fallback: react_1.default.createElement(react_1.default.Fragment, null) }, !utils_1.isIE && react_1.default.createElement(RobotoFont, null)),
|
|
283
|
-
!!(extraStylesheet === null || extraStylesheet === void 0 ? void 0 : extraStylesheet.length) && react_1.default.createElement("link", { rel: "stylesheet", type: "text/css", href: extraStylesheet })));
|
|
284
|
-
}
|
|
285
|
-
render() {
|
|
286
|
-
if (!this.props.isWebchatReady) {
|
|
287
|
-
return null;
|
|
288
|
-
}
|
|
289
|
-
return (react_1.default.createElement("div", { onFocus: this.handleResetUnreadCount },
|
|
290
|
-
this.applyAndRenderStyle(),
|
|
291
|
-
react_1.default.createElement("h1", { id: "tchat-label", className: "sr-only", tabIndex: -1 }, this.props.intl.formatMessage({
|
|
292
|
-
id: 'widget.title',
|
|
293
|
-
defaultMessage: 'Chat window'
|
|
294
|
-
})),
|
|
295
|
-
this.props.displayWidgetView ? this.renderWidget() : react_1.default.createElement(Container_1.default, null)));
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
exports.default = (0, mobx_react_1.inject)(({ store }) => ({
|
|
299
|
-
store,
|
|
300
|
-
config: store.config,
|
|
301
|
-
sendData: store.sendData,
|
|
302
|
-
initializeChat: store.initializeChat,
|
|
303
|
-
botInfo: store.botInfo,
|
|
304
|
-
fetchBotInfo: store.fetchBotInfo,
|
|
305
|
-
updateConfig: store.updateConfig,
|
|
306
|
-
mergeConfig: store.mergeConfig,
|
|
307
|
-
addEventToConversation: store.addEventToConversation,
|
|
308
|
-
clearMessages: store.clearMessages,
|
|
309
|
-
updateTyping: store.updateTyping,
|
|
310
|
-
sendMessage: store.sendMessage,
|
|
311
|
-
updateBotUILanguage: store.updateBotUILanguage,
|
|
312
|
-
isWebchatReady: store.view.isWebchatReady,
|
|
313
|
-
showWidgetButton: store.view.showWidgetButton,
|
|
314
|
-
hasUnreadMessages: store.view.hasUnreadMessages,
|
|
315
|
-
unreadCount: store.view.unreadCount,
|
|
316
|
-
resetUnread: store.view.resetUnread,
|
|
317
|
-
incrementUnread: store.view.incrementUnread,
|
|
318
|
-
activeView: store.view.activeView,
|
|
319
|
-
isFullscreen: store.view.isFullscreen,
|
|
320
|
-
showChat: store.view.showChat,
|
|
321
|
-
hideChat: store.view.hideChat,
|
|
322
|
-
toggleBotInfo: store.view.toggleBotInfo,
|
|
323
|
-
dimensions: store.view.dimensions,
|
|
324
|
-
widgetTransition: store.view.widgetTransition,
|
|
325
|
-
displayWidgetView: store.view.displayWidgetView,
|
|
326
|
-
setLoadingCompleted: store.view.setLoadingCompleted,
|
|
327
|
-
sendFeedback: store.sendFeedback,
|
|
328
|
-
updateLastMessage: store.updateLastMessage,
|
|
329
|
-
fetchConversation: store.fetchConversation,
|
|
330
|
-
createConversation: store.createConversation,
|
|
331
|
-
setIntlProvider: store.setIntlProvider,
|
|
332
|
-
setSocket: store.setSocket,
|
|
333
|
-
currentConversation: store.currentConversation,
|
|
334
|
-
currentConversationId: store.currentConversationId,
|
|
335
|
-
resetConversation: store.resetConversation
|
|
336
|
-
}))((0, react_intl_1.injectIntl)((0, mobx_react_1.observer)(Web)));
|
package/dist/store/composer.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RootStore } from '.';
|
|
2
|
-
declare class ComposerStore {
|
|
3
|
-
private rootStore;
|
|
4
|
-
message: string;
|
|
5
|
-
locked: boolean;
|
|
6
|
-
hidden: boolean;
|
|
7
|
-
private _sentHistory;
|
|
8
|
-
private _sentHistoryIndex;
|
|
9
|
-
constructor(rootStore: RootStore);
|
|
10
|
-
get composerPlaceholder(): string | undefined;
|
|
11
|
-
updateMessage(msg: string): void;
|
|
12
|
-
addMessageToHistory(text: string): void;
|
|
13
|
-
recallHistory(direction: string): void;
|
|
14
|
-
setLocked(locked: boolean): void;
|
|
15
|
-
setHidden(hidden: boolean): void;
|
|
16
|
-
}
|
|
17
|
-
export default ComposerStore;
|