@zenify-omni/chat-ui-react-js 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +92 -0
- package/assets/asset-url.js +6 -0
- package/assets/icons/chatter_agent.js +27 -0
- package/assets/icons/chatter_chatbot.js +43 -0
- package/assets/icons/chatter_contact.js +36 -0
- package/assets/icons/email_icon.png +0 -0
- package/assets/icons/emoji/angry.svg +56 -0
- package/assets/icons/emoji/haha.svg +20 -0
- package/assets/icons/emoji/like.svg +10 -0
- package/assets/icons/emoji/like_out_line.png +0 -0
- package/assets/icons/emoji/love.svg +10 -0
- package/assets/icons/emoji/sad.svg +46 -0
- package/assets/icons/emoji/wow.svg +51 -0
- package/assets/icons/instagram.js +29 -0
- package/assets/icons/not_found.png +0 -0
- package/assets/icons/not_found_template.svg +9 -0
- package/assets/icons/phone_icon.png +0 -0
- package/assets/icons/shopee.js +17 -0
- package/assets/icons/sms_icon.png +0 -0
- package/assets/icons/tiktok.js +17 -0
- package/assets/icons/whatsapp.js +28 -0
- package/assets/icons/zalo.js +17 -0
- package/assets/icons/zalo_icon.png +0 -0
- package/assets/icons/zns_icon.png +0 -0
- package/assets/images/emoji.webp +0 -0
- package/assets/images/error.png +0 -0
- package/assets/images/menu.png +0 -0
- package/assets/images/money.png +0 -0
- package/assets/images/success.png +0 -0
- package/assets/public-urls.js +78 -0
- package/components/campaign-detail-route/select/group.js +38 -0
- package/components/campaign-detail-route/select/multi-groups.js +43 -0
- package/components/chat-route/chat-box/ads-context-card.js +143 -0
- package/components/chat-route/chat-box/chat-drop-file.js +18 -0
- package/components/chat-route/chat-box/chat-feedback/chat-insight.js +214 -0
- package/components/chat-route/chat-box/chat-feedback/index.js +127 -0
- package/components/chat-route/chat-box/chat-header-actions-inline.js +1055 -0
- package/components/chat-route/chat-box/chat-header.js +465 -0
- package/components/chat-route/chat-box/chat-input.js +1164 -0
- package/components/chat-route/chat-box/chat-message-action.js +399 -0
- package/components/chat-route/chat-box/chat-message-list.js +995 -0
- package/components/chat-route/chat-box/chat-message.js +2099 -0
- package/components/chat-route/chat-box/chat-reply-preview.js +317 -0
- package/components/chat-route/chat-box/common-groups-modal.js +430 -0
- package/components/chat-route/chat-box/constants.js +29 -0
- package/components/chat-route/chat-box/contact-card/index.js +87 -0
- package/components/chat-route/chat-box/edit-customer-alias-dialog.js +197 -0
- package/components/chat-route/chat-box/emoji-picker-combined.js +91 -0
- package/components/chat-route/chat-box/emoji-sprite.js +45 -0
- package/components/chat-route/chat-box/emojiMap.js +92 -0
- package/components/chat-route/chat-box/facebook-reconnect-notice.js +49 -0
- package/components/chat-route/chat-box/forward-message-modal.js +659 -0
- package/components/chat-route/chat-box/index.js +165 -0
- package/components/chat-route/chat-box/message-time.js +44 -0
- package/components/chat-route/chat-box/message-viewers.js +114 -0
- package/components/chat-route/chat-box/pasted-file-preview.js +138 -0
- package/components/chat-route/chat-box/pinned-messages.js +255 -0
- package/components/chat-route/chat-box/react-message/react-preview.js +83 -0
- package/components/chat-route/chat-box/react-message/reaction-button.js +200 -0
- package/components/chat-route/chat-box/right-side/chat-history.js +142 -0
- package/components/chat-route/chat-box/right-side/chat-tag-selector.js +232 -0
- package/components/chat-route/chat-box/right-side/create-personal-tag-modal.js +458 -0
- package/components/chat-route/chat-box/right-side/customer/customer-info-item.js +60 -0
- package/components/chat-route/chat-box/right-side/in-room-dialog.js +225 -0
- package/components/chat-route/chat-box/right-side/zalo-group/add-friend-dialog.js +154 -0
- package/components/chat-route/chat-box/right-side/zalo-group/send-message-dialog.js +165 -0
- package/components/chat-route/chat-box/send-contact-card-modal.js +102 -0
- package/components/chat-route/chat-box/send-contact-card.js +80 -0
- package/components/chat-route/chat-box/text-content.js +400 -0
- package/components/chat-route/chat-box/use-facebook-page-invalid.js +22 -0
- package/components/chat-route/chat-box/zalo-emoji-decoration.js +98 -0
- package/components/chat-route/chat-box/zalo-emoji-picker.js +74 -0
- package/components/chat-route/chat-box/zalo-personal-editor.js +590 -0
- package/components/chat-route/chat-box/zalo-reminder/create-zalo-reminder.js +868 -0
- package/components/chat-route/chat-box/zalo-reminder/use-send-zalo-reminder.js +98 -0
- package/components/chat-route/chat-box/zalo-reminder/zalo-reminder-content.js +294 -0
- package/components/chat-route/chat-box/zalo-rtf-utils.js +422 -0
- package/components/chat-route/chat-list/action-chat-item.js +116 -0
- package/components/chat-route/chat-list/assign-agent-dialog.js +170 -0
- package/components/chat-route/chat-list/assign-tag-dialog.js +242 -0
- package/components/chat-route/chat-list/chat-item-tags.js +105 -0
- package/components/chat-route/chat-list/chat-item.js +749 -0
- package/components/chat-route/chat-list/chat-list-item.js +370 -0
- package/components/chat-route/chat-list/chat-list-selection-bar.js +426 -0
- package/components/chat-route/chat-list/chat-search-preview.js +48 -0
- package/components/chat-route/chat-list/chat-sort-menu.js +89 -0
- package/components/chat-route/chat-list/edit-filter-modal.js +468 -0
- package/components/chat-route/chat-list/filter-chat-sources.js +222 -0
- package/components/chat-route/chat-list/filter-chat.js +501 -0
- package/components/chat-route/chat-list/filter-criteria-rows.js +845 -0
- package/components/chat-route/chat-list/filter-group-select.js +66 -0
- package/components/chat-route/chat-list/filter-pin-menu.js +165 -0
- package/components/chat-route/chat-list/friend-request/list-friend-request.js +287 -0
- package/components/chat-route/chat-list/index.js +243 -0
- package/components/chat-route/chat-list/inline-search-results.js +178 -0
- package/components/chat-route/chat-list/post-ids-field.js +104 -0
- package/components/chat-route/chat-list/quick-filter-bar.js +391 -0
- package/components/chat-route/chat-list/save-filter-popover.js +258 -0
- package/components/chat-route/chat-list/search-messages/index.js +225 -0
- package/components/chat-route/chat-list/search-result-header.js +51 -0
- package/components/chat-route/chat-list/util.js +604 -0
- package/components/chat-route/chat-toolbar.js +108 -0
- package/components/chat-route/hooks/use-reassign.js +111 -0
- package/components/chat-route/shared/close-conversation-dialog.js +111 -0
- package/components/chat-route/shared/force-transfer-dialog.js +109 -0
- package/components/chat-route/shared/in-queue-confirm-dialog.js +40 -0
- package/components/chat-route/util.js +146 -0
- package/components/chat-route/zalo/modal-action-zalo.js +76 -0
- package/components/chat-route/zalo/modal-add-friend-zalo.js +277 -0
- package/components/custom/SafeHTML.js +45 -0
- package/components/custom/audio-player.js +81 -0
- package/components/custom/avatar.js +95 -0
- package/components/custom/between-date-picker/index.js +86 -0
- package/components/custom/button-close.js +28 -0
- package/components/custom/button.js +80 -0
- package/components/custom/color-picker.js +81 -0
- package/components/custom/combobox.js +168 -0
- package/components/custom/custom-dialog.js +44 -0
- package/components/custom/custom-select.js +256 -0
- package/components/custom/cycle-value-helpers.js +11 -0
- package/components/custom/cycle-value.js +93 -0
- package/components/custom/date-time-picker/components/date-time-group.js +44 -0
- package/components/custom/date-time-picker/components/date-time-input.js +383 -0
- package/components/custom/date-time-picker/components/date-time-unit-input.js +138 -0
- package/components/custom/date-time-picker/components/month-year-picker.js +232 -0
- package/components/custom/date-time-picker/hooks/use-merge-refs.js +18 -0
- package/components/custom/date-time-picker/hooks/use-scroll-to-center.js +18 -0
- package/components/custom/date-time-picker/index.js +348 -0
- package/components/custom/field-file-upload/files-upload.js +87 -0
- package/components/custom/field-file-upload/image-upload.js +115 -0
- package/components/custom/field-file-upload/preview-images-modal.js +284 -0
- package/components/custom/field-file-upload/preview-list-file.js +134 -0
- package/components/custom/field-file-upload/preview-list-image.js +108 -0
- package/components/custom/field-file-upload/upload-custom.js +222 -0
- package/components/custom/field-generator.js +639 -0
- package/components/custom/field-layout-popover.js +304 -0
- package/components/custom/file-preview-modal.js +351 -0
- package/components/custom/html-edtior.js +100 -0
- package/components/custom/icon.js +49 -0
- package/components/custom/infinite-scroll-combobox.js +253 -0
- package/components/custom/inline-edit-popover.js +90 -0
- package/components/custom/inputs/calendar-input.js +0 -0
- package/components/custom/inputs/chip-input.js +136 -0
- package/components/custom/inputs/file-input.js +71 -0
- package/components/custom/inputs/mask-data/mask-data-input.js +80 -0
- package/components/custom/inputs/mask-data/mask-data-select.js +78 -0
- package/components/custom/inputs/mask-data/mask-data-textarea.js +75 -0
- package/components/custom/inputs/mask-data/reconcile-masked-edit.js +20 -0
- package/components/custom/jxl-decode.js +34 -0
- package/components/custom/jxl-image.js +68 -0
- package/components/custom/jxl-worker.js +12 -0
- package/components/custom/label.js +55 -0
- package/components/custom/layout.js +30 -0
- package/components/custom/multi-select-search-cc.js +179 -0
- package/components/custom/multiple-select-setting-tags.js +404 -0
- package/components/custom/multiple-selector.js +821 -0
- package/components/custom/pagination.js +95 -0
- package/components/custom/popup-confirm.js +120 -0
- package/components/custom/previews/facebook/facebook-appointment-booking-preview.js +83 -0
- package/components/custom/previews/facebook/facebook-audio-preview.js +130 -0
- package/components/custom/previews/facebook/facebook-event-preview.js +72 -0
- package/components/custom/previews/facebook/facebook-file-preview.js +95 -0
- package/components/custom/previews/facebook/facebook-group-preview.js +103 -0
- package/components/custom/previews/facebook/facebook-image-preview.js +81 -0
- package/components/custom/previews/facebook/facebook-page-preview.js +85 -0
- package/components/custom/previews/facebook/facebook-post-preview.js +77 -0
- package/components/custom/previews/facebook/facebook-reel-preview.js +83 -0
- package/components/custom/previews/facebook/facebook-sticker-preview.js +23 -0
- package/components/custom/previews/facebook/facebook-video-preview.js +114 -0
- package/components/custom/previews/facebook/index.js +24 -0
- package/components/custom/previews/file-preview.js +747 -0
- package/components/custom/previews/image-preview.js +288 -0
- package/components/custom/previews/instagram/index.js +4 -0
- package/components/custom/previews/instagram/instagram-share-post-preview.js +77 -0
- package/components/custom/previews/link-preview.js +166 -0
- package/components/custom/previews/product-preview.js +334 -0
- package/components/custom/previews/tiktok-order-preview.js +278 -0
- package/components/custom/previews/tiktok-product-preview.js +321 -0
- package/components/custom/previews/tiktok-voucher-preview.js +151 -0
- package/components/custom/previews/whatsapp/index.js +10 -0
- package/components/custom/previews/whatsapp/whatsapp-contact-card-preview.js +150 -0
- package/components/custom/previews/whatsapp/whatsapp-order-preview.js +38 -0
- package/components/custom/previews/whatsapp/whatsapp-poll-preview.js +29 -0
- package/components/custom/previews/whatsapp/whatsapp-product-preview.js +29 -0
- package/components/custom/retry-image.js +44 -0
- package/components/custom/search-input.js +26 -0
- package/components/custom/separator-with-text.js +14 -0
- package/components/custom/showToast.js +21 -0
- package/components/custom/sortable-header.js +62 -0
- package/components/custom/table-resize-line.js +92 -0
- package/components/custom/time-picker/index.js +73 -0
- package/components/custom/time-picker/time-picker-input.js +159 -0
- package/components/custom/time-picker/time-picker-utils.js +152 -0
- package/components/custom/viewers/audio-player.js +192 -0
- package/components/custom/viewers/code-viewer.js +140 -0
- package/components/custom/viewers/csv-viewer.js +174 -0
- package/components/custom/viewers/docx-viewer.js +145 -0
- package/components/custom/viewers/image-viewer.js +104 -0
- package/components/custom/viewers/markdown-viewer.js +124 -0
- package/components/custom/viewers/pdf-viewer.js +333 -0
- package/components/custom/viewers/spreadsheet-viewer.js +232 -0
- package/components/custom/viewers/unsupported-viewer.js +85 -0
- package/components/custom/viewers/video-player.js +241 -0
- package/components/customers-route/change-owner-modal.js +430 -0
- package/components/customers-route/contact-note-button.js +212 -0
- package/components/customers-route/customer-source.js +37 -0
- package/components/customers-route/table/columns.js +675 -0
- package/components/customers-route/table/edit-fields.js +125 -0
- package/components/customers-route/table/editable-cell.js +218 -0
- package/components/customers-route/table/note-cell.js +77 -0
- package/components/dialogs/invite-agent.js +677 -0
- package/components/error-boundary.js +53 -0
- package/components/leads-route/duplicate-phone-warning-toast.js +96 -0
- package/components/leads-route/table/columns.js +523 -0
- package/components/leads-route/table/contact-cell-name.js +82 -0
- package/components/leads-route/table/edit-fields.js +142 -0
- package/components/leads-route/table/editable-cell.js +228 -0
- package/components/org-tree/group-name-display.js +36 -0
- package/components/org-tree/group-tree-multi-select.js +208 -0
- package/components/org-tree/group-tree-select.js +220 -0
- package/components/posts-route/dialog-select-posts.js +284 -0
- package/components/reports-route/agents/multi-select-agents.js +55 -0
- package/components/reports-route/agents/multi-select-search-agents.js +43 -0
- package/components/settings-route/chat-layout/detail/constants.js +353 -0
- package/components/settings-route/chat-layout/detail/form.js +43 -0
- package/components/settings-route/chat-timeout/channel-multi-select.js +119 -0
- package/components/settings-route/multi-channel/facebook/hooks/use-facebook-sdk.js +3 -0
- package/components/settings-route/object-rule/util.js +79 -0
- package/components/settings-route/routing/settings-dialog.js +561 -0
- package/components/settings-route/switchboard/queue-new/constant.js +9 -0
- package/components/shared/linked-customer-fields/LinkedCustomerFields.js +91 -0
- package/components/shared/linked-customer-fields/use-linked-customer-fields.js +123 -0
- package/components/smartqc-route/qc-form/controls/multi-select-search-agents.js +50 -0
- package/components/ui/alert-dialog.js +112 -0
- package/components/ui/avatar.js +44 -0
- package/components/ui/badge.js +54 -0
- package/components/ui/button.js +48 -0
- package/components/ui/calendar.js +70 -0
- package/components/ui/card.js +58 -0
- package/components/ui/carousel.js +238 -0
- package/components/ui/checkbox.js +27 -0
- package/components/ui/command.js +111 -0
- package/components/ui/context-menu.js +154 -0
- package/components/ui/dialog.js +104 -0
- package/components/ui/dropdown-menu.js +169 -0
- package/components/ui/form.js +104 -0
- package/components/ui/input.js +115 -0
- package/components/ui/label.js +20 -0
- package/components/ui/popover.js +29 -0
- package/components/ui/radio-group.js +53 -0
- package/components/ui/scroll-area.js +38 -0
- package/components/ui/select.js +147 -0
- package/components/ui/separator.js +24 -0
- package/components/ui/sheet.js +113 -0
- package/components/ui/skeleton.js +17 -0
- package/components/ui/slider.js +26 -0
- package/components/ui/sonner.js +76 -0
- package/components/ui/switch.js +54 -0
- package/components/ui/table-v2.js +269 -0
- package/components/ui/table.js +245 -0
- package/components/ui/tabs.js +89 -0
- package/components/ui/textarea.js +33 -0
- package/components/ui/tooltip.js +40 -0
- package/components/workflow-editor/nodes/ticket/picker-field.js +233 -0
- package/components/zalo-login-qr.js +237 -0
- package/components/zalo-login-status-modal.js +45 -0
- package/config/env.js +27 -0
- package/config/hmr.js +8 -0
- package/config/navigation.js +54 -0
- package/config/runtime.js +46 -0
- package/config/theme.js +274 -0
- package/constants/brand-colors.js +32 -0
- package/constants/chat-icon.js +34 -0
- package/dist/chat.css +1 -0
- package/exceptions/throw-exception.js +15 -0
- package/hooks/use-chat-attachments.js +106 -0
- package/hooks/use-chat-configs.js +62 -0
- package/hooks/use-chat-customer.js +33 -0
- package/hooks/use-chat-display-config-sync.js +72 -0
- package/hooks/use-chat-permission.js +68 -0
- package/hooks/use-chat-room-detail.js +44 -0
- package/hooks/use-chat-selection.js +26 -0
- package/hooks/use-chat-sort.js +69 -0
- package/hooks/use-chat-surface.js +8 -0
- package/hooks/use-common-filter-options.js +70 -0
- package/hooks/use-crm-organization-filter-options.js +0 -0
- package/hooks/use-crm-organizations-data.js +23 -0
- package/hooks/use-debounce.js +14 -0
- package/hooks/use-dynamic-fields.js +7 -0
- package/hooks/use-facebook-notice.js +24 -0
- package/hooks/use-feature-flags.js +6 -0
- package/hooks/use-field-layout-override.js +46 -0
- package/hooks/use-file-upload.js +119 -0
- package/hooks/use-file-viewer.js +93 -0
- package/hooks/use-frozen-columns.js +29 -0
- package/hooks/use-horizontal-scroll.js +41 -0
- package/hooks/use-image-preview-queue.js +101 -0
- package/hooks/use-inline-editable-cell.js +97 -0
- package/hooks/use-intersection-observer.js +24 -0
- package/hooks/use-interval.js +20 -0
- package/hooks/use-latest-message-id.js +13 -0
- package/hooks/use-lead-filter-options.js +0 -0
- package/hooks/use-logout-listener.js +43 -0
- package/hooks/use-org-tree.js +43 -0
- package/hooks/use-permission.js +33 -0
- package/hooks/use-quick-filters.js +175 -0
- package/hooks/use-resizable-table.js +0 -0
- package/hooks/use-setting-common.js +389 -0
- package/hooks/use-settings.js +41 -0
- package/hooks/use-sort-bindings.js +24 -0
- package/hooks/use-table-display-config.js +0 -0
- package/hooks/use-tenant-config.js +99 -0
- package/hooks/use-update-user-config.js +150 -0
- package/hooks/use-zalo-connection.js +57 -0
- package/hooks/use-zalo-mention-list.js +31 -0
- package/index.css +624 -0
- package/index.js +100 -0
- package/lib/deal-name.js +27 -0
- package/lib/i18n/react.js +7 -0
- package/lib/i18n/use-language.js +0 -0
- package/lib/query-client.js +34 -0
- package/lib/utils.js +25 -0
- package/package.json +108 -0
- package/provider/chat-context.js +9 -0
- package/provider/chat-provider.js +177 -0
- package/provider/chat-room-context.js +9 -0
- package/provider/chat-room-hooks.js +8 -0
- package/provider/chat-room-provider.js +84 -0
- package/provider/hooks.js +22 -0
- package/provider/index.js +42 -0
- package/public/contact-card-user.svg +25 -0
- package/public/images/icons/facebook.svg +1 -0
- package/public/images/icons/instagram.svg +1 -0
- package/public/images/icons/shopee.svg +1 -0
- package/public/images/icons/whatsapp.svg +1 -0
- package/public/images/icons/zalo.png +0 -0
- package/public/images/images.jpg +0 -0
- package/public/images/ticket_sources/api.png +0 -0
- package/public/images/ticket_sources/email.png +0 -0
- package/public/images/ticket_sources/facebook.png +0 -0
- package/public/images/ticket_sources/hand.png +0 -0
- package/public/images/ticket_sources/instagram.png +0 -0
- package/public/images/ticket_sources/livechat.png +0 -0
- package/public/images/ticket_sources/shopee.svg +1 -0
- package/public/images/ticket_sources/sms.png +0 -0
- package/public/images/ticket_sources/telephone-call-in.png +0 -0
- package/public/images/ticket_sources/telephone-call-out.png +0 -0
- package/public/images/ticket_sources/tiktok.png +0 -0
- package/public/images/ticket_sources/tiktok_shop.png +0 -0
- package/public/images/ticket_sources/whatsapp.png +0 -0
- package/public/images/ticket_sources/whatsapp.svg +1 -0
- package/public/images/ticket_sources/zalo.png +0 -0
- package/public/placeholder.svg +13 -0
- package/store/app-status-store.js +17 -0
- package/store/chat-display-config-store.js +182 -0
- package/store/chat-display-config.resolvers.js +88 -0
- package/store/chat-store-helpers.js +62 -0
- package/store/chat-store.js +931 -0
- package/store/crm-organization-list-filter-store.js +126 -0
- package/store/customer-list-filter-store.js +139 -0
- package/store/devtools.js +9 -0
- package/store/duplicate-phone-warning-store.js +18 -0
- package/store/entity-extract-store.js +72 -0
- package/store/file-preview-store.js +27 -0
- package/store/filter-store.js +289 -0
- package/store/index.js +22 -0
- package/store/knowledge-crawl-store.js +53 -0
- package/store/lead-list-filter-store.js +142 -0
- package/store/list-pagination-state.js +44 -0
- package/store/lumi-learn-from-chat-store.js +69 -0
- package/store/merge-suggestion-store.js +27 -0
- package/store/notification-store.js +63 -0
- package/store/preview-image-store.js +22 -0
- package/store/settings-store/multi-channel/email-list-store.js +20 -0
- package/store/settings-store/multi-channel/facebook-list-store.js +22 -0
- package/store/settings-store/multi-channel/google-list-store.js +20 -0
- package/store/settings-store/multi-channel/instagram-list-store.js +20 -0
- package/store/settings-store/multi-channel/misa-list-store.js +20 -0
- package/store/settings-store/multi-channel/nhanhvn-list-store.js +20 -0
- package/store/settings-store/multi-channel/shopee-list-store.js +20 -0
- package/store/settings-store/multi-channel/shopee-order-list-store.js +20 -0
- package/store/settings-store/multi-channel/sms-list-store.js +20 -0
- package/store/settings-store/multi-channel/tiktok-business-list-store.js +20 -0
- package/store/settings-store/multi-channel/tiktok-list-store.js +20 -0
- package/store/settings-store/multi-channel/zalo-list-store.js +22 -0
- package/store/settings-store/multi-channel/zalo-user-list-store.js +25 -0
- package/store/smart-qc-store/smart-qc-list-filter-store.js +70 -0
- package/store/tenant-config-store.js +21 -0
- package/store/user-detail-store.js +17 -0
- package/store/user-status-store.js +33 -0
- package/store/workflow-store.js +24 -0
- package/store/workspace-store.js +32 -0
- package/tailwind-preset.js +129 -0
- package/utils/chat-actions.js +414 -0
- package/utils/chat_socket.js +1225 -0
- package/utils/extra-columns.js +108 -0
- package/utils/file.js +316 -0
- package/utils/html-to-plain-text.js +12 -0
- package/utils/notification.js +71 -0
- package/utils/replaceZaloSprite.js +64 -0
- package/utils/show-be-error.js +17 -0
- package/utils/typing_socket.js +101 -0
package/lib/deal-name.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DEFAULT_DEAL_NAME_CONFIG } from "@zenify-omni/chat-js/constants/tenant_config.js";
|
|
2
|
+
import { isDealNameSuggestEnabled } from "./utils.js";
|
|
3
|
+
function resolveDealNameRules(rules, tenantId) {
|
|
4
|
+
const isConfigured = !!rules && typeof rules === "object";
|
|
5
|
+
if (!isConfigured) {
|
|
6
|
+
return {
|
|
7
|
+
rules: {
|
|
8
|
+
...DEFAULT_DEAL_NAME_CONFIG,
|
|
9
|
+
use_list: isDealNameSuggestEnabled(tenantId)
|
|
10
|
+
},
|
|
11
|
+
isConfigured: false
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const merged = { ...DEFAULT_DEAL_NAME_CONFIG, ...rules };
|
|
15
|
+
const maxLength = Number(merged.max_length);
|
|
16
|
+
return {
|
|
17
|
+
rules: {
|
|
18
|
+
use_list: !!merged.use_list,
|
|
19
|
+
allow_custom: !!merged.allow_custom,
|
|
20
|
+
max_length: Number.isFinite(maxLength) && maxLength > 0 ? maxLength : DEFAULT_DEAL_NAME_CONFIG.max_length
|
|
21
|
+
},
|
|
22
|
+
isConfigured: true
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
resolveDealNameRules
|
|
27
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
2
|
+
function queryRetry(failureCount, error) {
|
|
3
|
+
const status = error?.status ?? error?.statusCode;
|
|
4
|
+
if (status >= 400 && status < 500) return false;
|
|
5
|
+
return failureCount < 2;
|
|
6
|
+
}
|
|
7
|
+
function createQueryClient() {
|
|
8
|
+
return new QueryClient({
|
|
9
|
+
defaultOptions: {
|
|
10
|
+
queries: {
|
|
11
|
+
// staleTime MUST stay 0 (react-query's default). A non-zero global
|
|
12
|
+
// staleTime silently broke every screen that renders from a SIDE
|
|
13
|
+
// EFFECT run inside its queryFn rather than from the query's returned
|
|
14
|
+
// data — e.g. the tenant list does `setTotalRecords(data.total)` into a
|
|
15
|
+
// local `useState(0)` and DataTable only renders rows when `total > 0`.
|
|
16
|
+
// With staleTime > 0, a remount within the fresh window skips the
|
|
17
|
+
// queryFn, so that side effect never re-runs, the local total resets to
|
|
18
|
+
// 0, and the table shows "no data" even though the cached rows exist.
|
|
19
|
+
// The codebase has many such side-effect queries; a blanket staleTime
|
|
20
|
+
// can't be made safe without auditing all of them, so keep it at 0 and
|
|
21
|
+
// let individual queries opt into a longer staleTime where proven safe.
|
|
22
|
+
staleTime: 0,
|
|
23
|
+
gcTime: 10 * 6e4,
|
|
24
|
+
refetchOnWindowFocus: false,
|
|
25
|
+
retry: queryRetry,
|
|
26
|
+
retryDelay: (attempt) => 500 * 2 ** attempt
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
createQueryClient,
|
|
33
|
+
queryRetry
|
|
34
|
+
};
|
package/lib/utils.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getUser } from "@zenify-omni/chat-js/utils/auth.js";
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { envSet } from "../config/env.js";
|
|
5
|
+
function cn(...inputs) {
|
|
6
|
+
return twMerge(clsx(inputs));
|
|
7
|
+
}
|
|
8
|
+
function isEnableFBHumanTag() {
|
|
9
|
+
const tenantIds = envSet("TENANT_ENABLE_FB_HUMAN_TAG");
|
|
10
|
+
if (tenantIds.size === 0) return true;
|
|
11
|
+
return tenantIds.has(getUser()?.tenant_id);
|
|
12
|
+
}
|
|
13
|
+
function isDealNameSuggestEnabled(tenantId) {
|
|
14
|
+
const tenantIds = envSet("TENANT_ENABLE_DEAL_NAME_SUGGEST");
|
|
15
|
+
if (tenantIds.size === 0) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
const targetTenantId = tenantId || getUser()?.tenant_id;
|
|
19
|
+
return !!targetTenantId && tenantIds.has(targetTenantId);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
cn,
|
|
23
|
+
isDealNameSuggestEnabled,
|
|
24
|
+
isEnableFBHumanTag
|
|
25
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zenify-omni/chat-ui-react-js",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Toàn bộ component React, hook và store zustand của Zenify Chat.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/ZenifyAIContactCenter/sdk-omni-chat.git",
|
|
9
|
+
"directory": "chat-ui-react-js"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/ZenifyAIContactCenter/sdk-omni-chat#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/ZenifyAIContactCenter/sdk-omni-chat/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"*.css",
|
|
18
|
+
"./config/env.js",
|
|
19
|
+
"./lib/i18n/react.js",
|
|
20
|
+
"./utils/chat_socket.js",
|
|
21
|
+
"./utils/typing_socket.js",
|
|
22
|
+
"./utils/chat-actions.js"
|
|
23
|
+
],
|
|
24
|
+
"exports": {
|
|
25
|
+
".": "./index.js",
|
|
26
|
+
"./*": "./*"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@dnd-kit/core": "^6.3.1",
|
|
33
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
34
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
35
|
+
"@hookform/resolvers": "^3.9.0",
|
|
36
|
+
"@radix-ui/react-alert-dialog": "^1.1.2",
|
|
37
|
+
"@radix-ui/react-avatar": "^1.1.1",
|
|
38
|
+
"@radix-ui/react-checkbox": "^1.1.2",
|
|
39
|
+
"@radix-ui/react-context-menu": "^2.2.2",
|
|
40
|
+
"@radix-ui/react-dialog": "^1.1.23",
|
|
41
|
+
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
42
|
+
"@radix-ui/react-icons": "^1.3.0",
|
|
43
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
44
|
+
"@radix-ui/react-popover": "^1.1.2",
|
|
45
|
+
"@radix-ui/react-popper": "^1.2.8",
|
|
46
|
+
"@radix-ui/react-radio-group": "^1.2.1",
|
|
47
|
+
"@radix-ui/react-scroll-area": "^1.2.0",
|
|
48
|
+
"@radix-ui/react-select": "^2.1.2",
|
|
49
|
+
"@radix-ui/react-separator": "^1.1.1",
|
|
50
|
+
"@radix-ui/react-slider": "^1.2.1",
|
|
51
|
+
"@radix-ui/react-slot": "^1.1.1",
|
|
52
|
+
"@radix-ui/react-switch": "^1.1.1",
|
|
53
|
+
"@radix-ui/react-tabs": "^1.1.1",
|
|
54
|
+
"@radix-ui/react-tooltip": "^1.1.6",
|
|
55
|
+
"@tanstack/react-query": "^5.59.0",
|
|
56
|
+
"@tanstack/react-table": "^8.20.5",
|
|
57
|
+
"@tanstack/react-virtual": "^3.13.13",
|
|
58
|
+
"@tinymce/tinymce-react": "^5.1.1",
|
|
59
|
+
"@tiptap/core": "^3.20.4",
|
|
60
|
+
"@tiptap/extension-mention": "^3.20.4",
|
|
61
|
+
"@tiptap/extension-underline": "^3.20.4",
|
|
62
|
+
"@tiptap/pm": "^3.20.4",
|
|
63
|
+
"@tiptap/react": "^3.20.4",
|
|
64
|
+
"@tiptap/starter-kit": "^3.20.4",
|
|
65
|
+
"@zenify-omni/chat-js": "0.1.0",
|
|
66
|
+
"class-variance-authority": "^0.7.1",
|
|
67
|
+
"clsx": "^2.1.1",
|
|
68
|
+
"cmdk": "^1.0.0",
|
|
69
|
+
"docx-preview": "^0.3.7",
|
|
70
|
+
"dompurify": "^3.2.6",
|
|
71
|
+
"embla-carousel-react": "^8.5.2",
|
|
72
|
+
"jszip": "^3.10.1",
|
|
73
|
+
"jxl-rs-polyfill": "^0.1.1",
|
|
74
|
+
"lucide-react": "^0.562.0",
|
|
75
|
+
"next-themes": "^0.3.0",
|
|
76
|
+
"papaparse": "^5.5.3",
|
|
77
|
+
"pdfjs-dist": "^4.8.69",
|
|
78
|
+
"react-arborist": "^3.4.3",
|
|
79
|
+
"react-mentions": "^4.4.10",
|
|
80
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
81
|
+
"react-zoom-pan-pinch": "^4.0.3",
|
|
82
|
+
"remark-gfm": "^4.0.1",
|
|
83
|
+
"sonner": "^1.5.0",
|
|
84
|
+
"tailwind-merge": "^2.5.3",
|
|
85
|
+
"uuid": "^10.0.0",
|
|
86
|
+
"wavesurfer.js": "^7.12.7",
|
|
87
|
+
"zod": "^3.23.8"
|
|
88
|
+
},
|
|
89
|
+
"peerDependencies": {
|
|
90
|
+
"@date-fns/tz": "^1.1.2",
|
|
91
|
+
"@emoji-mart/data": "^1.2.1",
|
|
92
|
+
"@emoji-mart/react": "^1.1.1",
|
|
93
|
+
"axios": "^1.7.7",
|
|
94
|
+
"date-fns": "^4.4.0",
|
|
95
|
+
"file-saver": "^2.0.5",
|
|
96
|
+
"i18next": "^26.2.0",
|
|
97
|
+
"lodash-es": "^4.17.21",
|
|
98
|
+
"react": "^18.3.1",
|
|
99
|
+
"react-day-picker": "^9.14.0",
|
|
100
|
+
"react-dom": "^18.3.1",
|
|
101
|
+
"react-hook-form": "^7.53.0",
|
|
102
|
+
"react-i18next": "^17.0.10",
|
|
103
|
+
"react-markdown": "^10.1.0",
|
|
104
|
+
"react-pdf": "^9.2.1",
|
|
105
|
+
"xlsx-js-style": "^1.2.0",
|
|
106
|
+
"zustand": "^5.0.0"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
const ChatClientContext = createContext(null);
|
|
3
|
+
const ChatSessionContext = createContext(null);
|
|
4
|
+
ChatClientContext.displayName = "ChatClientContext";
|
|
5
|
+
ChatSessionContext.displayName = "ChatSessionContext";
|
|
6
|
+
export {
|
|
7
|
+
ChatClientContext,
|
|
8
|
+
ChatSessionContext
|
|
9
|
+
};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
useContext,
|
|
4
|
+
useEffect,
|
|
5
|
+
useLayoutEffect,
|
|
6
|
+
useMemo,
|
|
7
|
+
useRef,
|
|
8
|
+
useState
|
|
9
|
+
} from "react";
|
|
10
|
+
import { QueryClientContext, QueryClientProvider } from "@tanstack/react-query";
|
|
11
|
+
import { I18nextProvider } from "react-i18next";
|
|
12
|
+
import {
|
|
13
|
+
createChatClient,
|
|
14
|
+
ChatClientStatus
|
|
15
|
+
} from "@zenify-omni/chat-js/client.js";
|
|
16
|
+
import { setChatRuntime } from "../config/runtime.js";
|
|
17
|
+
import { setNavigateFunc } from "../config/navigation.js";
|
|
18
|
+
import {
|
|
19
|
+
applyChatTheme,
|
|
20
|
+
applyColorScheme,
|
|
21
|
+
resolveTheme
|
|
22
|
+
} from "../config/theme.js";
|
|
23
|
+
import { createQueryClient } from "../lib/query-client.js";
|
|
24
|
+
import ErrorBoundary from "../components/error-boundary.js";
|
|
25
|
+
import defaultI18n from "../lib/i18n/react.js";
|
|
26
|
+
import useTenantConfigStore from "../store/tenant-config-store.js";
|
|
27
|
+
import useWorkspaceStore from "../store/workspace-store.js";
|
|
28
|
+
import useLogoutListener from "../hooks/use-logout-listener.js";
|
|
29
|
+
import { resetAllStores } from "../store/index.js";
|
|
30
|
+
import { resetChatSortHydration } from "../hooks/use-chat-sort.js";
|
|
31
|
+
import { ChatClientContext, ChatSessionContext } from "./chat-context.js";
|
|
32
|
+
function applyBootstrapToStores(context) {
|
|
33
|
+
useTenantConfigStore.getState().setTenantConfig(context.tenantConfig);
|
|
34
|
+
const ws = useWorkspaceStore.getState();
|
|
35
|
+
ws.setUserRolePermissions(context.permissions);
|
|
36
|
+
if (context.workspaces?.length) {
|
|
37
|
+
ws.setWorkspaces(context.workspaces);
|
|
38
|
+
if (context.activeWorkspaceId) ws.setActiveWorkspaceId(context.activeWorkspaceId);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function ChatRuntimeEffects({ logout }) {
|
|
42
|
+
return logout ? /* @__PURE__ */ jsx(LogoutListener, {}) : null;
|
|
43
|
+
}
|
|
44
|
+
const LogoutListener = () => {
|
|
45
|
+
useLogoutListener();
|
|
46
|
+
return null;
|
|
47
|
+
};
|
|
48
|
+
function ChatProvider({
|
|
49
|
+
initConfig,
|
|
50
|
+
navigateFunc,
|
|
51
|
+
theme,
|
|
52
|
+
colorScheme = "light",
|
|
53
|
+
queryClient: queryClientProp,
|
|
54
|
+
i18n: i18nProp,
|
|
55
|
+
errorBoundary = true,
|
|
56
|
+
fallback = null,
|
|
57
|
+
errorFallback = null,
|
|
58
|
+
listeners = { logout: true },
|
|
59
|
+
disposeOnUnmount = true,
|
|
60
|
+
onReady,
|
|
61
|
+
onError,
|
|
62
|
+
onSessionEnd,
|
|
63
|
+
children
|
|
64
|
+
}) {
|
|
65
|
+
const queryClientFromCtx = useContext(QueryClientContext);
|
|
66
|
+
const queryClient = useMemo(
|
|
67
|
+
() => queryClientProp ?? queryClientFromCtx ?? createQueryClient(),
|
|
68
|
+
[queryClientProp, queryClientFromCtx]
|
|
69
|
+
);
|
|
70
|
+
const i18n = i18nProp ?? defaultI18n;
|
|
71
|
+
useMemo(() => {
|
|
72
|
+
setChatRuntime({ queryClient });
|
|
73
|
+
}, [queryClient]);
|
|
74
|
+
useMemo(() => {
|
|
75
|
+
setNavigateFunc(navigateFunc);
|
|
76
|
+
}, [navigateFunc]);
|
|
77
|
+
const themeKey = useMemo(() => theme ? JSON.stringify(theme) : "", [theme]);
|
|
78
|
+
useLayoutEffect(() => applyColorScheme(colorScheme), [colorScheme]);
|
|
79
|
+
useLayoutEffect(() => {
|
|
80
|
+
if (!themeKey) return void 0;
|
|
81
|
+
const isDark = typeof document !== "undefined" && document.documentElement.classList.contains("dark");
|
|
82
|
+
const resolved = resolveTheme(JSON.parse(themeKey), isDark);
|
|
83
|
+
return resolved ? applyChatTheme(resolved) : void 0;
|
|
84
|
+
}, [themeKey, colorScheme]);
|
|
85
|
+
const [session, setSession] = useState({
|
|
86
|
+
status: ChatClientStatus.IDLE,
|
|
87
|
+
error: null,
|
|
88
|
+
user: null,
|
|
89
|
+
context: {}
|
|
90
|
+
});
|
|
91
|
+
const [client] = useState(
|
|
92
|
+
() => createChatClient({
|
|
93
|
+
...initConfig,
|
|
94
|
+
onBootstrap: applyBootstrapToStores
|
|
95
|
+
})
|
|
96
|
+
);
|
|
97
|
+
const teardownRef = useRef(null);
|
|
98
|
+
const callbacksRef = useRef({ onReady, onError, onSessionEnd });
|
|
99
|
+
callbacksRef.current = { onReady, onError, onSessionEnd };
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
const off = client.on(
|
|
102
|
+
"status",
|
|
103
|
+
({ status, detail }) => setSession((prev) => ({
|
|
104
|
+
...prev,
|
|
105
|
+
status,
|
|
106
|
+
error: status === ChatClientStatus.ERROR ? detail : null
|
|
107
|
+
}))
|
|
108
|
+
);
|
|
109
|
+
const offEnd = client.on("session-end", () => {
|
|
110
|
+
setSession((prev) => ({
|
|
111
|
+
...prev,
|
|
112
|
+
status: ChatClientStatus.IDLE,
|
|
113
|
+
user: null,
|
|
114
|
+
context: {}
|
|
115
|
+
}));
|
|
116
|
+
queueMicrotask(() => {
|
|
117
|
+
queryClient.clear();
|
|
118
|
+
resetAllStores();
|
|
119
|
+
resetChatSortHydration();
|
|
120
|
+
callbacksRef.current.onSessionEnd?.();
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
return () => {
|
|
124
|
+
off();
|
|
125
|
+
offEnd();
|
|
126
|
+
};
|
|
127
|
+
}, [client, queryClient]);
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
clearTimeout(teardownRef.current);
|
|
130
|
+
let cancelled = false;
|
|
131
|
+
const ac = new AbortController();
|
|
132
|
+
client.start({ signal: ac.signal }).then(({ user, context }) => {
|
|
133
|
+
if (cancelled) return;
|
|
134
|
+
setSession((prev) => ({ ...prev, user, context, error: null }));
|
|
135
|
+
callbacksRef.current.onReady?.({ user, context });
|
|
136
|
+
}).catch((error) => {
|
|
137
|
+
if (cancelled || error?.name === "AbortError") return;
|
|
138
|
+
setSession((prev) => ({ ...prev, error }));
|
|
139
|
+
callbacksRef.current.onError?.(error);
|
|
140
|
+
});
|
|
141
|
+
return () => {
|
|
142
|
+
cancelled = true;
|
|
143
|
+
const timer = setTimeout(() => {
|
|
144
|
+
if (teardownRef.current !== timer) return;
|
|
145
|
+
teardownRef.current = null;
|
|
146
|
+
ac.abort();
|
|
147
|
+
client.disconnect();
|
|
148
|
+
if (disposeOnUnmount) client.dispose();
|
|
149
|
+
}, 0);
|
|
150
|
+
teardownRef.current = timer;
|
|
151
|
+
};
|
|
152
|
+
}, [client, disposeOnUnmount]);
|
|
153
|
+
const sessionValue = useMemo(
|
|
154
|
+
() => ({
|
|
155
|
+
...session,
|
|
156
|
+
isReady: session.status === ChatClientStatus.READY,
|
|
157
|
+
retry: () => {
|
|
158
|
+
setSession((prev) => ({ ...prev, error: null }));
|
|
159
|
+
return client.start();
|
|
160
|
+
},
|
|
161
|
+
signOut: () => client.signOut()
|
|
162
|
+
}),
|
|
163
|
+
[session, client]
|
|
164
|
+
);
|
|
165
|
+
const showFallback = session.status !== ChatClientStatus.READY && !session.error;
|
|
166
|
+
const showError = !!session.error;
|
|
167
|
+
const inner = /* @__PURE__ */ jsx(ChatClientContext.Provider, { value: client, children: /* @__PURE__ */ jsxs(ChatSessionContext.Provider, { value: sessionValue, children: [
|
|
168
|
+
/* @__PURE__ */ jsx(ChatRuntimeEffects, { logout: listeners?.logout !== false }),
|
|
169
|
+
showError ? errorFallback?.(session.error, sessionValue.retry) ?? null : showFallback ? fallback : children
|
|
170
|
+
] }) });
|
|
171
|
+
return /* @__PURE__ */ jsx(I18nextProvider, { i18n, children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: errorBoundary ? /* @__PURE__ */ jsx(ErrorBoundary, { children: inner }) : inner }) });
|
|
172
|
+
}
|
|
173
|
+
var chat_provider_default = ChatProvider;
|
|
174
|
+
export {
|
|
175
|
+
ChatProvider,
|
|
176
|
+
chat_provider_default as default
|
|
177
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
const ChatRoomContext = createContext(null);
|
|
3
|
+
const ChatComposerContext = createContext(null);
|
|
4
|
+
ChatRoomContext.displayName = "ChatRoomContext";
|
|
5
|
+
ChatComposerContext.displayName = "ChatComposerContext";
|
|
6
|
+
export {
|
|
7
|
+
ChatComposerContext,
|
|
8
|
+
ChatRoomContext
|
|
9
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { ChatRoomContext, ChatComposerContext } from "./chat-room-context.js";
|
|
3
|
+
const useChatRoomContext = () => useContext(ChatRoomContext);
|
|
4
|
+
const useChatComposerContext = () => useContext(ChatComposerContext);
|
|
5
|
+
export {
|
|
6
|
+
useChatComposerContext,
|
|
7
|
+
useChatRoomContext
|
|
8
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import useChatRoomDetail from "../hooks/use-chat-room-detail.js";
|
|
4
|
+
import useChatCustomer from "../hooks/use-chat-customer.js";
|
|
5
|
+
import useZaloConnection from "../hooks/use-zalo-connection.js";
|
|
6
|
+
import useChatPermission from "../hooks/use-chat-permission.js";
|
|
7
|
+
import useChatAttachments from "../hooks/use-chat-attachments.js";
|
|
8
|
+
import useFacebookNotice from "../hooks/use-facebook-notice.js";
|
|
9
|
+
import { ChatRoomContext, ChatComposerContext } from "./chat-room-context.js";
|
|
10
|
+
function ChatRoomProvider({ chatRoomId, children }) {
|
|
11
|
+
const { chatRoom, isLoading, isFetching } = useChatRoomDetail(chatRoomId);
|
|
12
|
+
const chatRoomSource = chatRoom?.source;
|
|
13
|
+
const { customerId, customerDetail } = useChatCustomer(chatRoom, chatRoomId);
|
|
14
|
+
const { isZaloConnected } = useZaloConnection(chatRoomId, chatRoomSource);
|
|
15
|
+
const { isChatAllowed, topPriorityTicket, canChatSpecialTenant } = useChatPermission({ chatRoom, chatRoomId, isZaloConnected });
|
|
16
|
+
const {
|
|
17
|
+
pastedFiles,
|
|
18
|
+
setPastedFiles,
|
|
19
|
+
showPreview,
|
|
20
|
+
showDragBlur,
|
|
21
|
+
dropZoneProps,
|
|
22
|
+
addFilesToPreview
|
|
23
|
+
} = useChatAttachments(chatRoom, chatRoomId);
|
|
24
|
+
const { isFacebookPageInvalid, noticeRef, noticeHeight } = useFacebookNotice(chatRoom);
|
|
25
|
+
const chatRoomDetailReady = chatRoom?._id === chatRoomId;
|
|
26
|
+
const roomValue = useMemo(
|
|
27
|
+
() => ({
|
|
28
|
+
chatRoomId,
|
|
29
|
+
chatRoom,
|
|
30
|
+
chatRoomDetailReady,
|
|
31
|
+
isLoading,
|
|
32
|
+
isFetching,
|
|
33
|
+
customerId,
|
|
34
|
+
customerDetail,
|
|
35
|
+
isChatAllowed,
|
|
36
|
+
isZaloConnected,
|
|
37
|
+
topPriorityTicket,
|
|
38
|
+
canChatSpecialTenant,
|
|
39
|
+
isFacebookPageInvalid,
|
|
40
|
+
noticeRef,
|
|
41
|
+
noticeHeight
|
|
42
|
+
}),
|
|
43
|
+
[
|
|
44
|
+
chatRoomId,
|
|
45
|
+
chatRoom,
|
|
46
|
+
chatRoomDetailReady,
|
|
47
|
+
isLoading,
|
|
48
|
+
isFetching,
|
|
49
|
+
customerId,
|
|
50
|
+
customerDetail,
|
|
51
|
+
isChatAllowed,
|
|
52
|
+
isZaloConnected,
|
|
53
|
+
topPriorityTicket,
|
|
54
|
+
canChatSpecialTenant,
|
|
55
|
+
isFacebookPageInvalid,
|
|
56
|
+
noticeRef,
|
|
57
|
+
noticeHeight
|
|
58
|
+
]
|
|
59
|
+
);
|
|
60
|
+
const composerValue = useMemo(
|
|
61
|
+
() => ({
|
|
62
|
+
pastedFiles,
|
|
63
|
+
setPastedFiles,
|
|
64
|
+
showPreview,
|
|
65
|
+
showDragBlur,
|
|
66
|
+
dropZoneProps,
|
|
67
|
+
addFilesToPreview
|
|
68
|
+
}),
|
|
69
|
+
[
|
|
70
|
+
pastedFiles,
|
|
71
|
+
setPastedFiles,
|
|
72
|
+
showPreview,
|
|
73
|
+
showDragBlur,
|
|
74
|
+
dropZoneProps,
|
|
75
|
+
addFilesToPreview
|
|
76
|
+
]
|
|
77
|
+
);
|
|
78
|
+
return /* @__PURE__ */ jsx(ChatRoomContext.Provider, { value: roomValue, children: /* @__PURE__ */ jsx(ChatComposerContext.Provider, { value: composerValue, children }) });
|
|
79
|
+
}
|
|
80
|
+
var chat_room_provider_default = ChatRoomProvider;
|
|
81
|
+
export {
|
|
82
|
+
ChatRoomProvider,
|
|
83
|
+
chat_room_provider_default as default
|
|
84
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { ChatClientContext, ChatSessionContext } from "./chat-context.js";
|
|
3
|
+
const OUTSIDE = "ph\u1EA3i n\u1EB1m trong <ChatProvider>. B\u1ECDc c\xE2y component b\u1EB1ng <ChatProvider initConfig={{ domain, username, password, env }}> tr\u01B0\u1EDBc \u0111\xE3.";
|
|
4
|
+
const useRequired = (Context, hookName) => {
|
|
5
|
+
const value = useContext(Context);
|
|
6
|
+
if (value == null) throw new Error(`[chat-ui] ${hookName}() ${OUTSIDE}`);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
const useChatClient = () => useRequired(ChatClientContext, "useChatClient");
|
|
10
|
+
const useChatSession = () => useRequired(ChatSessionContext, "useChatSession");
|
|
11
|
+
const useChatApi = () => useChatClient().api;
|
|
12
|
+
const useChatSocket = () => useChatClient().socket;
|
|
13
|
+
const useChatBootstrap = () => useChatSession().context;
|
|
14
|
+
const useChatConfig = () => useChatClient().config;
|
|
15
|
+
export {
|
|
16
|
+
useChatApi,
|
|
17
|
+
useChatBootstrap,
|
|
18
|
+
useChatClient,
|
|
19
|
+
useChatConfig,
|
|
20
|
+
useChatSession,
|
|
21
|
+
useChatSocket
|
|
22
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import "../utils/chat_socket.js";
|
|
2
|
+
import "../utils/typing_socket.js";
|
|
3
|
+
import { ChatProvider, default as default2 } from "./chat-provider.js";
|
|
4
|
+
import { ChatClientContext, ChatSessionContext } from "./chat-context.js";
|
|
5
|
+
import {
|
|
6
|
+
applyChatTheme,
|
|
7
|
+
applyColorScheme,
|
|
8
|
+
resolveTheme,
|
|
9
|
+
buildChatTheme,
|
|
10
|
+
toHslTriplet,
|
|
11
|
+
CHAT_THEME_VARS
|
|
12
|
+
} from "../config/theme.js";
|
|
13
|
+
import {
|
|
14
|
+
useChatClient,
|
|
15
|
+
useChatSession,
|
|
16
|
+
useChatApi,
|
|
17
|
+
useChatSocket,
|
|
18
|
+
useChatBootstrap,
|
|
19
|
+
useChatConfig
|
|
20
|
+
} from "./hooks.js";
|
|
21
|
+
import { getChatClient, disposeChatClient, ChatClientStatus } from "@zenify-omni/chat-js/client.js";
|
|
22
|
+
export {
|
|
23
|
+
CHAT_THEME_VARS,
|
|
24
|
+
ChatClientContext,
|
|
25
|
+
ChatClientStatus,
|
|
26
|
+
ChatProvider,
|
|
27
|
+
ChatSessionContext,
|
|
28
|
+
applyChatTheme,
|
|
29
|
+
applyColorScheme,
|
|
30
|
+
buildChatTheme,
|
|
31
|
+
default2 as default,
|
|
32
|
+
disposeChatClient,
|
|
33
|
+
getChatClient,
|
|
34
|
+
resolveTheme,
|
|
35
|
+
toHslTriplet,
|
|
36
|
+
useChatApi,
|
|
37
|
+
useChatBootstrap,
|
|
38
|
+
useChatClient,
|
|
39
|
+
useChatConfig,
|
|
40
|
+
useChatSession,
|
|
41
|
+
useChatSocket
|
|
42
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<svg width="306" height="135" viewBox="0 0 306 135" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_645_10532)">
|
|
3
|
+
<rect width="306" height="135" fill="#0E68DD"/>
|
|
4
|
+
<g clip-path="url(#clip1_645_10532)">
|
|
5
|
+
<path opacity="0.7" fill-rule="evenodd" clip-rule="evenodd" d="M138.352 -54.0515C129.62 -68.3825 110.924 -72.9214 96.593 -64.1895L32.2377 -24.9774L32.2377 -24.9773L20.5105 -17.8318C17.3892 -15.93 18.1254 -11.2039 21.6772 -10.3416L44.5368 -4.79193L101.227 88.2482C109.959 102.579 128.655 107.118 142.986 98.3862L181.393 74.9847C195.723 66.2528 200.262 47.5566 191.53 33.2256L138.352 -54.0515Z" fill="url(#paint0_linear_645_10532)"/>
|
|
6
|
+
<path opacity="0.4" fill-rule="evenodd" clip-rule="evenodd" d="M282.955 126.674C291.687 141.005 287.148 159.701 272.817 168.433L208.461 207.645L208.461 207.645L196.734 214.791C193.613 216.692 189.75 213.871 190.612 210.319L196.162 187.46L139.472 94.4195C130.74 80.0886 135.279 61.3924 149.61 52.6605L188.017 29.259C202.348 20.5271 221.044 25.066 229.776 39.3969L282.955 126.674Z" fill="url(#paint1_linear_645_10532)"/>
|
|
7
|
+
</g>
|
|
8
|
+
</g>
|
|
9
|
+
<defs>
|
|
10
|
+
<linearGradient id="paint0_linear_645_10532" x1="152.924" y1="78.4485" x2="112.424" y2="16.9485" gradientUnits="userSpaceOnUse">
|
|
11
|
+
<stop stop-color="#1778F2"/>
|
|
12
|
+
<stop offset="1" stop-color="#1778F2" stop-opacity="0"/>
|
|
13
|
+
</linearGradient>
|
|
14
|
+
<linearGradient id="paint1_linear_645_10532" x1="178.312" y1="56.3154" x2="215.312" y2="170.815" gradientUnits="userSpaceOnUse">
|
|
15
|
+
<stop stop-color="#2580F3"/>
|
|
16
|
+
<stop offset="1" stop-color="#2580F3" stop-opacity="0"/>
|
|
17
|
+
</linearGradient>
|
|
18
|
+
<clipPath id="clip0_645_10532">
|
|
19
|
+
<rect width="306" height="135" fill="white"/>
|
|
20
|
+
</clipPath>
|
|
21
|
+
<clipPath id="clip1_645_10532">
|
|
22
|
+
<rect width="306" height="135" fill="white"/>
|
|
23
|
+
</clipPath>
|
|
24
|
+
</defs>
|
|
25
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 666.667 666.667"><defs><clipPath id="a" clipPathUnits="userSpaceOnUse"><path d="M0 700h700V0H0Z"/></clipPath></defs><g clip-path="url(#a)" transform="matrix(1.33333 0 0 -1.33333 -133.333 800)"><path d="M0 0c0 138.071-111.929 250-250 250S-500 138.071-500 0c0-117.245 80.715-215.622 189.606-242.638v166.242h-51.552V0h51.552v32.919c0 85.092 38.508 124.532 122.048 124.532 15.838 0 43.167-3.105 54.347-6.211V81.986c-5.901.621-16.149.932-28.882.932-40.993 0-56.832-15.528-56.832-55.9V0h81.659l-14.028-76.396h-67.631v-171.773C-95.927-233.218 0-127.818 0 0" style="fill:#0866ff;fill-opacity:1;fill-rule:nonzero;stroke:none" transform="translate(600 350)"/><path d="m0 0 14.029 76.396H-67.63v27.019c0 40.372 15.838 55.899 56.831 55.899 12.733 0 22.981-.31 28.882-.931v69.253c-11.18 3.106-38.509 6.212-54.347 6.212-83.539 0-122.048-39.441-122.048-124.533V76.396h-51.552V0h51.552v-166.242a250.559 250.559 0 0 1 60.394-7.362c10.254 0 20.358.632 30.288 1.831V0Z" style="fill:#fff;fill-opacity:1;fill-rule:nonzero;stroke:none" transform="translate(447.918 273.604)"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 264.583 264.583"><defs><radialGradient xlink:href="#a" id="f" cx="158.429" cy="578.088" r="52.352" fx="158.429" fy="578.088" gradientTransform="matrix(0 -4.03418 4.28018 0 -2332.227 942.236)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#b" id="g" cx="172.615" cy="600.692" r="65" fx="172.615" fy="600.692" gradientTransform="matrix(.67441 -1.16203 1.51283 .87801 -814.366 -47.835)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#c" id="h" cx="144.012" cy="51.337" r="67.081" fx="144.012" fy="51.337" gradientTransform="matrix(-2.3989 .67549 -.23008 -.81732 464.996 -26.404)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#d" id="e" cx="199.788" cy="628.438" r="52.352" fx="199.788" fy="628.438" gradientTransform="matrix(-3.10797 .87652 -.6315 -2.23914 1345.65 1374.198)" gradientUnits="userSpaceOnUse"/><linearGradient id="d"><stop offset="0" stop-color="#ff005f"/><stop offset="1" stop-color="#fc01d8"/></linearGradient><linearGradient id="c"><stop offset="0" stop-color="#780cff"/><stop offset="1" stop-color="#820bff" stop-opacity="0"/></linearGradient><linearGradient id="b"><stop offset="0" stop-color="#fc0"/><stop offset="1" stop-color="#fc0" stop-opacity="0"/></linearGradient><linearGradient id="a"><stop offset="0" stop-color="#fc0"/><stop offset=".124" stop-color="#fc0"/><stop offset=".567" stop-color="#fe4a05"/><stop offset=".694" stop-color="#ff0f3f"/><stop offset="1" stop-color="#fe0657" stop-opacity="0"/></linearGradient></defs><path fill="url(#e)" d="M204.15 18.143c-55.23 0-71.383.057-74.523.317-11.334.943-18.387 2.728-26.07 6.554-5.922 2.942-10.592 6.351-15.201 11.13-8.394 8.716-13.481 19.439-15.323 32.184-.895 6.188-1.156 7.45-1.209 39.056-.02 10.536 0 24.4 0 42.999 0 55.2.062 71.341.326 74.476.916 11.032 2.645 17.973 6.308 25.565 7 14.533 20.37 25.443 36.12 29.514 5.453 1.404 11.476 2.178 19.208 2.544 3.277.142 36.669.244 70.081.244 33.413 0 66.826-.04 70.02-.203 8.954-.422 14.153-1.12 19.901-2.606 15.852-4.09 28.977-14.838 36.12-29.575 3.591-7.409 5.412-14.614 6.236-25.07.18-2.28.255-38.626.255-74.924 0-36.304-.082-72.583-.26-74.863-.835-10.625-2.656-17.77-6.364-25.32-3.042-6.182-6.42-10.799-11.324-15.519-8.752-8.361-19.455-13.45-32.21-15.29-6.18-.894-7.41-1.158-39.033-1.213z" transform="translate(-71.816 -18.143)"/><path fill="url(#f)" d="M204.15 18.143c-55.23 0-71.383.057-74.523.317-11.334.943-18.387 2.728-26.07 6.554-5.922 2.942-10.592 6.351-15.201 11.13-8.394 8.716-13.481 19.439-15.323 32.184-.895 6.188-1.156 7.45-1.209 39.056-.02 10.536 0 24.4 0 42.999 0 55.2.062 71.341.326 74.476.916 11.032 2.645 17.973 6.308 25.565 7 14.533 20.37 25.443 36.12 29.514 5.453 1.404 11.476 2.178 19.208 2.544 3.277.142 36.669.244 70.081.244 33.413 0 66.826-.04 70.02-.203 8.954-.422 14.153-1.12 19.901-2.606 15.852-4.09 28.977-14.838 36.12-29.575 3.591-7.409 5.412-14.614 6.236-25.07.18-2.28.255-38.626.255-74.924 0-36.304-.082-72.583-.26-74.863-.835-10.625-2.656-17.77-6.364-25.32-3.042-6.182-6.42-10.799-11.324-15.519-8.752-8.361-19.455-13.45-32.21-15.29-6.18-.894-7.41-1.158-39.033-1.213z" transform="translate(-71.816 -18.143)"/><path fill="url(#g)" d="M204.15 18.143c-55.23 0-71.383.057-74.523.317-11.334.943-18.387 2.728-26.07 6.554-5.922 2.942-10.592 6.351-15.201 11.13-8.394 8.716-13.481 19.439-15.323 32.184-.895 6.188-1.156 7.45-1.209 39.056-.02 10.536 0 24.4 0 42.999 0 55.2.062 71.341.326 74.476.916 11.032 2.645 17.973 6.308 25.565 7 14.533 20.37 25.443 36.12 29.514 5.453 1.404 11.476 2.178 19.208 2.544 3.277.142 36.669.244 70.081.244 33.413 0 66.826-.04 70.02-.203 8.954-.422 14.153-1.12 19.901-2.606 15.852-4.09 28.977-14.838 36.12-29.575 3.591-7.409 5.412-14.614 6.236-25.07.18-2.28.255-38.626.255-74.924 0-36.304-.082-72.583-.26-74.863-.835-10.625-2.656-17.77-6.364-25.32-3.042-6.182-6.42-10.799-11.324-15.519-8.752-8.361-19.455-13.45-32.21-15.29-6.18-.894-7.41-1.158-39.033-1.213z" transform="translate(-71.816 -18.143)"/><path fill="url(#h)" d="M204.15 18.143c-55.23 0-71.383.057-74.523.317-11.334.943-18.387 2.728-26.07 6.554-5.922 2.942-10.592 6.351-15.201 11.13-8.394 8.716-13.481 19.439-15.323 32.184-.895 6.188-1.156 7.45-1.209 39.056-.02 10.536 0 24.4 0 42.999 0 55.2.062 71.341.326 74.476.916 11.032 2.645 17.973 6.308 25.565 7 14.533 20.37 25.443 36.12 29.514 5.453 1.404 11.476 2.178 19.208 2.544 3.277.142 36.669.244 70.081.244 33.413 0 66.826-.04 70.02-.203 8.954-.422 14.153-1.12 19.901-2.606 15.852-4.09 28.977-14.838 36.12-29.575 3.591-7.409 5.412-14.614 6.236-25.07.18-2.28.255-38.626.255-74.924 0-36.304-.082-72.583-.26-74.863-.835-10.625-2.656-17.77-6.364-25.32-3.042-6.182-6.42-10.799-11.324-15.519-8.752-8.361-19.455-13.45-32.21-15.29-6.18-.894-7.41-1.158-39.033-1.213z" transform="translate(-71.816 -18.143)"/><path fill="#fff" d="M132.345 33.973c-26.716 0-30.07.117-40.563.594-10.472.48-17.62 2.136-23.876 4.567-6.47 2.51-11.958 5.87-17.426 11.335-5.472 5.464-8.834 10.948-11.354 17.412-2.44 6.252-4.1 13.397-4.57 23.858-.47 10.486-.593 13.838-.593 40.535 0 26.697.119 30.037.594 40.522.482 10.465 2.14 17.609 4.57 23.859 2.515 6.465 5.876 11.95 11.346 17.414 5.466 5.468 10.955 8.834 17.42 11.345 6.26 2.431 13.41 4.088 23.881 4.567 10.493.477 13.844.594 40.559.594 26.719 0 30.061-.117 40.555-.594 10.472-.48 17.63-2.136 23.888-4.567 6.468-2.51 11.948-5.877 17.414-11.345 5.472-5.464 8.834-10.949 11.354-17.412 2.419-6.252 4.079-13.398 4.57-23.858.472-10.486.595-13.828.595-40.525s-.123-30.047-.594-40.533c-.492-10.465-2.152-17.608-4.57-23.858-2.521-6.466-5.883-11.95-11.355-17.414-5.472-5.468-10.944-8.827-17.42-11.335-6.271-2.431-13.424-4.088-23.897-4.567-10.493-.477-13.834-.594-40.558-.594zm-8.825 17.715c2.62-.004 5.542 0 8.825 0 26.266 0 29.38.094 39.752.565 9.591.438 14.797 2.04 18.264 3.385 4.591 1.782 7.864 3.912 11.305 7.352 3.443 3.44 5.575 6.717 7.362 11.305 1.346 3.46 2.951 8.663 3.388 18.247.47 10.363.573 13.475.573 39.71 0 26.233-.102 29.346-.573 39.709-.44 9.584-2.042 14.786-3.388 18.247-1.783 4.587-3.919 7.854-7.362 11.292-3.443 3.441-6.712 5.57-11.305 7.352-3.463 1.352-8.673 2.95-18.264 3.388-10.37.47-13.486.573-39.752.573-26.268 0-29.38-.102-39.751-.573-9.592-.443-14.797-2.044-18.267-3.39-4.59-1.781-7.87-3.911-11.313-7.352-3.443-3.44-5.574-6.709-7.362-11.298-1.346-3.461-2.95-8.663-3.387-18.247-.472-10.363-.566-13.476-.566-39.726s.094-29.347.566-39.71c.438-9.584 2.04-14.786 3.387-18.25 1.783-4.588 3.919-7.865 7.362-11.305 3.443-3.441 6.722-5.57 11.313-7.357 3.468-1.351 8.675-2.949 18.267-3.389 9.075-.41 12.592-.532 30.926-.553zm61.337 16.322c-6.518 0-11.805 5.277-11.805 11.792 0 6.512 5.287 11.796 11.805 11.796 6.517 0 11.804-5.284 11.804-11.796 0-6.513-5.287-11.796-11.805-11.796zm-52.512 13.782c-27.9 0-50.519 22.603-50.519 50.482 0 27.879 22.62 50.471 50.52 50.471s50.51-22.592 50.51-50.471c0-27.879-22.613-50.482-50.513-50.482zm0 17.715c18.11 0 32.792 14.67 32.792 32.767 0 18.096-14.683 32.767-32.792 32.767-18.11 0-32.791-14.671-32.791-32.767 0-18.098 14.68-32.767 32.791-32.767z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="#EE4D2D" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Shopee</title><path d="M15.9414 17.9633c.229-1.879-.981-3.077-4.1758-4.0969-1.548-.528-2.277-1.22-2.26-2.1719.065-1.056 1.048-1.825 2.352-1.85a5.2898 5.2898 0 0 1 2.8838.89c.116.072.197.06.263-.039.09-.145.315-.494.39-.62.051-.081.061-.187-.068-.281-.185-.1369-.704-.4149-.983-.5319a6.4697 6.4697 0 0 0-2.5118-.514c-1.909.008-3.4129 1.215-3.5389 2.826-.082 1.1629.494 2.1078 1.73 2.8278.262.152 1.6799.716 2.2438.892 1.774.552 2.695 1.5419 2.478 2.6969-.197 1.047-1.299 1.7239-2.818 1.7439-1.2039-.046-2.2878-.537-3.1278-1.19l-.141-.11c-.104-.08-.218-.075-.287.03-.05.077-.376.547-.458.67-.077.108-.035.168.045.234.35.293.817.613 1.134.775a6.7097 6.7097 0 0 0 2.8289.727 4.9048 4.9048 0 0 0 2.0759-.354c1.095-.465 1.8029-1.394 1.9449-2.554zM11.9986 1.4009c-2.068 0-3.7539 1.95-3.8329 4.3899h7.6657c-.08-2.44-1.765-4.3899-3.8328-4.3899zm7.8516 22.5981-.08.001-15.7843-.002c-1.074-.04-1.863-.91-1.971-1.991l-.01-.195L1.298 6.2858a.459.459 0 0 1 .45-.494h4.9748C6.8448 2.568 9.1607 0 11.9996 0c2.8388 0 5.1537 2.5689 5.2757 5.7898h4.9678a.459.459 0 0 1 .458.483l-.773 15.5883-.007.131c-.094 1.094-.979 1.9769-2.0709 2.0059z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 360 362"><path fill="#25D366" fill-rule="evenodd" d="M307.546 52.566C273.709 18.684 228.706.017 180.756 0 81.951 0 1.538 80.404 1.504 179.235c-.017 31.594 8.242 62.432 23.928 89.609L0 361.736l95.024-24.925c26.179 14.285 55.659 21.805 85.655 21.814h.077c98.788 0 179.21-80.413 179.244-179.244.017-47.898-18.608-92.926-52.454-126.807v-.008Zm-126.79 275.788h-.06c-26.73-.008-52.952-7.194-75.831-20.765l-5.44-3.231-56.391 14.791 15.05-54.981-3.542-5.638c-14.912-23.721-22.793-51.139-22.776-79.286.035-82.14 66.867-148.973 149.051-148.973 39.793.017 77.198 15.53 105.328 43.695 28.131 28.157 43.61 65.596 43.593 105.398-.035 82.149-66.867 148.982-148.982 148.982v.008Zm81.719-111.577c-4.478-2.243-26.497-13.073-30.606-14.568-4.108-1.496-7.09-2.243-10.073 2.243-2.982 4.487-11.568 14.577-14.181 17.559-2.613 2.991-5.226 3.361-9.704 1.117-4.477-2.243-18.908-6.97-36.02-22.226-13.313-11.878-22.304-26.54-24.916-31.027-2.613-4.486-.275-6.91 1.959-9.136 2.011-2.011 4.478-5.234 6.721-7.847 2.244-2.613 2.983-4.486 4.478-7.469 1.496-2.991.748-5.603-.369-7.847-1.118-2.243-10.073-24.289-13.812-33.253-3.636-8.732-7.331-7.546-10.073-7.692-2.613-.13-5.595-.155-8.586-.155-2.991 0-7.839 1.118-11.947 5.604-4.108 4.486-15.677 15.324-15.677 37.361s16.047 43.344 18.29 46.335c2.243 2.991 31.585 48.225 76.51 67.632 10.684 4.615 19.029 7.374 25.535 9.437 10.727 3.412 20.49 2.931 28.208 1.779 8.604-1.289 26.498-10.838 30.228-21.298 3.73-10.46 3.73-19.433 2.613-21.298-1.117-1.865-4.108-2.991-8.586-5.234l.008-.017Z" clip-rule="evenodd"/></svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="#EE4D2D" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Shopee</title><path d="M15.9414 17.9633c.229-1.879-.981-3.077-4.1758-4.0969-1.548-.528-2.277-1.22-2.26-2.1719.065-1.056 1.048-1.825 2.352-1.85a5.2898 5.2898 0 0 1 2.8838.89c.116.072.197.06.263-.039.09-.145.315-.494.39-.62.051-.081.061-.187-.068-.281-.185-.1369-.704-.4149-.983-.5319a6.4697 6.4697 0 0 0-2.5118-.514c-1.909.008-3.4129 1.215-3.5389 2.826-.082 1.1629.494 2.1078 1.73 2.8278.262.152 1.6799.716 2.2438.892 1.774.552 2.695 1.5419 2.478 2.6969-.197 1.047-1.299 1.7239-2.818 1.7439-1.2039-.046-2.2878-.537-3.1278-1.19l-.141-.11c-.104-.08-.218-.075-.287.03-.05.077-.376.547-.458.67-.077.108-.035.168.045.234.35.293.817.613 1.134.775a6.7097 6.7097 0 0 0 2.8289.727 4.9048 4.9048 0 0 0 2.0759-.354c1.095-.465 1.8029-1.394 1.9449-2.554zM11.9986 1.4009c-2.068 0-3.7539 1.95-3.8329 4.3899h7.6657c-.08-2.44-1.765-4.3899-3.8328-4.3899zm7.8516 22.5981-.08.001-15.7843-.002c-1.074-.04-1.863-.91-1.971-1.991l-.01-.195L1.298 6.2858a.459.459 0 0 1 .45-.494h4.9748C6.8448 2.568 9.1607 0 11.9996 0c2.8388 0 5.1537 2.5689 5.2757 5.7898h4.9678a.459.459 0 0 1 .458.483l-.773 15.5883-.007.131c-.094 1.094-.979 1.9769-2.0709 2.0059z"/></svg>
|
|
Binary file
|
|
Binary file
|