@top-message/ui-lib 2.23.42 → 2.23.44

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.
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export type IconNames = 'mail-checkmark' | 'mail-dismiss' | 'mail-dismiss-filled' | 'eye-on' | 'eye-off' | 'lock' | 'link-dismiss' | 'dismiss' | 'placeholder' | 'placeholder-filled' | 'bell' | 'bell-filled' | 'bell-alarm' | 'bell-alarm-filled' | 'bell-slash' | 'bell-slash-filled' | 'bell-warning' | 'bell-warning-filled' | 'info' | 'info-filled' | 'checkmark-circle' | 'checkmark-circle-filled' | 'dismiss-circle' | 'dismiss-circle-filled' | 'danger' | 'danger-filled' | 'add' | 'search' | 'search-filled' | 'options' | 'options-filled' | 'person' | 'person-filled' | 'person-block' | 'person-block-filled' | 'person-unsubscribe' | 'person-unsubscribe-filled' | 'chevron-down' | 'chevron-down-filled' | 'chevron-up' | 'chevron-up-filled' | 'chevron-left' | 'chevron-left-filled' | 'chevron-right' | 'chevron-right-filled' | 'checkmark' | 'tag' | 'tag-filled' | 'delete' | 'delete-filled' | 'mail' | 'mail-filled' | 'more' | 'more-filled' | 'more-vertical' | 'more-vertical-filled' | 'edit' | 'edit-filled' | 'settings' | 'settings-filled' | 'reorder' | 'reorder-filled' | 'pin' | 'pin-filled' | 'calendar' | 'calendar-filled' | 'filter' | 'filter-filled' | 'plus' | 'plus-filled' | 'import-file' | 'import-file-filled' | 'export' | 'export-filled' | 'doc-imports' | 'doc-imports-filled' | 'doc-export' | 'doc-export-filled' | 'field' | 'field-filled' | 'contacts-book' | 'contacts-book-filled' | 'compose' | 'compose-filled' | 'inbox' | 'inbox-filled' | 'send-clock' | 'send-clock-filled' | 'emoji' | 'emoji-filled' | 'attach' | 'attach-filled' | 'templates' | 'templates-filled' | 'my-templates' | 'my-templates-filled' | 'link' | 'link-filled' | 'arrow-up' | 'arrow-up-filled' | 'arrow-down' | 'arrow-down-filled' | 'ai-generate-filled' | 'ai-generate-colored' | 'spec-chevron' | 'brackets' | 'text-grammar' | 'text-grammar-filled' | 'chevron-double-up' | 'chevron-double-up-filled' | 'chevron-double-down' | 'chevron-double-down-filled' | 'check' | 'check-double' | 'google-colored' | 'whatsapp' | 'whatsapp-colored' | 'sms-colored' | 'image' | 'image-filled' | 'video' | 'video-filled' | 'document' | 'document-filled' | 'sticker' | 'sticker-filled' | 'text-italic' | 'text-italic-filled' | 'text-bold' | 'text-bold-filled' | 'text-strikethrough' | 'text-strikethrough-filled' | 'send' | 'send-filled' | 'copy' | 'copy-filled' | 'reschedule' | 'reschedule-filled' | 'clock' | 'clock-filled' | 'arrow-counterclockwise' | 'arrow-counterclockwise-filled' | 'star' | 'star-filled' | 'pause' | 'pause-filled' | 'play' | 'play-filled' | 'arrow-performance' | 'arrow-performance-filled' | 'drop' | 'drop-filled' | 'dot' | 'dot-filled' | 'top-message-filled' | 'top-message-colored' | 'folder' | 'folder-filled' | 'folder-open' | 'folder-open-filled' | 'list' | 'list-filled' | 'grid' | 'grid-filled' | 'save' | 'save-filled' | 'sender' | 'sender-filled' | 'api-filled' | 'api-colored' | 'verify-colored' | 'phone-filled' | 'open' | 'open-filled' | 'menu-burger-right-filled' | 'text' | 'text-filled' | 'flash' | 'flash-filled' | 'mobile-number' | 'mobile-number-filled' | 'whatsapp-sender' | 'custom-sender' | 'custom-sender-filled' | 'question-circle' | 'question-circle-filled' | 'reply' | 'reply-filled' | 'phone' | 'none' | 'circle' | 'circle-filled' | 'slash' | 'slash-filled' | 'chevron-double-right' | 'chevron-double-right-filled' | 'chevron-double-left' | 'chevron-double-left-filled' | 'arrow-download' | 'arrow-download-filled' | 'document-download' | 'document-download-filled' | 'hashtag' | 'hashtag-filled' | 'arrow-sync' | 'arrow-sync-filled' | 'file' | 'file-filled' | 'arrow-left' | 'arrow-left-filled' | 'arrow-right' | 'arrow-right-filled' | 'data-line' | 'data-line-filled' | 'data-pie' | 'data-pie-filled' | 'data-bar' | 'data-bar-filled' | 'data-number' | 'data-number-filled' | 'data-percent' | 'data-percent-filled' | 'chat' | 'chat-filled' | 'resend' | 'resend-filled' | 'code' | 'code-filled' | 'zapier-colored' | 'terminal' | 'terminal-filled' | 'key' | 'key-filled' | 'payment' | 'payment-filled' | 'alert' | 'alert-filled' | 'personal-details' | 'personal-details-filled' | 'company-details' | 'company-details-filled' | 'security' | 'security-filled' | 'person-card' | 'person-card-filled' | 'data-list' | 'data-list-filled' | 'top-message-black' | 'rename' | 'rename-filled' | 'tick-circle' | 'tick-circle-filled' | 'status-colored' | 'tag-add' | 'tag-add-filled' | 'number-symbol' | 'number-symbol-filled' | 'data-vizualization' | 'data-vizualization-filled' | 'message-details' | 'message-details-filled' | 'flash-colored' | 'person-resubscribe' | 'person-resubscribe-filled' | 'gift' | 'gift-filled' | 'arrow-in-45' | 'arrow-in-45-filled' | 'arrow-out-45' | 'arrow-out-45-filled' | 'field-custom' | 'field-custom-filled' | 'field-default' | 'field-default-filled' | 'mouse-click' | 'mouse-click-filled' | 'conversion' | 'conversion-filled' | 'credits' | 'credits-filled' | 'notification' | 'notification-filled' | 'notification-alarm' | 'notification-alarm-filled' | 'notification-slash' | 'notification-slash-filled' | 'notification-warning' | 'notification-warning-filled' | 'warning-circle' | 'warning-circle-filled' | 'warning-hex' | 'warning-hex-filled' | 'warning-triangle' | 'warning-triangle-filled' | 'open-sidebar' | 'close-sidebar' | 'minimize-arrow' | 'maximize-arrow' | 'case' | 'backpack' | 'rewrite-ai' | 'auto-recharge' | 'auto-recharge-filled' | 'top-agent' | 'video-file' | 'flag-global' | 'flag-gb' | 'flag-es' | 'flag-fr' | 'flag-de' | 'flag-be' | 'flag-it' | 'flag-nl' | 'flag-pl' | 'flag-se' | 'flag-at' | 'flag-ch' | 'flag-am' | 'flag-ae' | 'flag-ru' | 'flag-us' | 'flag-ca' | 'flag-ee' | 'flag-sg' | 'flag-au' | 'flag-ie' | 'flag-il' | 'flag-hk' | 'flag-sa' | 'person-folder' | 'person-folder-filled' | 'group-remove' | 'group-remove-filled' | 'rocket';
2
+ export type IconNames = 'mail-checkmark' | 'mail-dismiss' | 'mail-dismiss-filled' | 'eye-on' | 'eye-off' | 'lock' | 'link-dismiss' | 'dismiss' | 'placeholder' | 'placeholder-filled' | 'bell' | 'bell-filled' | 'bell-alarm' | 'bell-alarm-filled' | 'bell-slash' | 'bell-slash-filled' | 'bell-warning' | 'bell-warning-filled' | 'info' | 'info-filled' | 'checkmark-circle' | 'checkmark-circle-filled' | 'dismiss-circle' | 'dismiss-circle-filled' | 'danger' | 'danger-filled' | 'add' | 'search' | 'search-filled' | 'options' | 'options-filled' | 'person' | 'person-filled' | 'person-block' | 'person-block-filled' | 'person-unsubscribe' | 'person-unsubscribe-filled' | 'chevron-down' | 'chevron-down-filled' | 'chevron-up' | 'chevron-up-filled' | 'chevron-left' | 'chevron-left-filled' | 'chevron-right' | 'chevron-right-filled' | 'checkmark' | 'tag' | 'tag-filled' | 'delete' | 'delete-filled' | 'mail' | 'mail-filled' | 'more' | 'more-filled' | 'more-vertical' | 'more-vertical-filled' | 'edit' | 'edit-filled' | 'settings' | 'settings-filled' | 'reorder' | 'reorder-filled' | 'pin' | 'pin-filled' | 'calendar' | 'calendar-filled' | 'filter' | 'filter-filled' | 'plus' | 'plus-filled' | 'import-file' | 'import-file-filled' | 'export' | 'export-filled' | 'doc-imports' | 'doc-imports-filled' | 'doc-export' | 'doc-export-filled' | 'field' | 'field-filled' | 'contacts-book' | 'contacts-book-filled' | 'compose' | 'compose-filled' | 'inbox' | 'inbox-filled' | 'send-clock' | 'send-clock-filled' | 'emoji' | 'emoji-filled' | 'attach' | 'attach-filled' | 'templates' | 'templates-filled' | 'my-templates' | 'my-templates-filled' | 'link' | 'link-filled' | 'arrow-up' | 'arrow-up-filled' | 'arrow-down' | 'arrow-down-filled' | 'ai-generate-filled' | 'ai-generate-colored' | 'spec-chevron' | 'brackets' | 'text-grammar' | 'text-grammar-filled' | 'chevron-double-up' | 'chevron-double-up-filled' | 'chevron-double-down' | 'chevron-double-down-filled' | 'check' | 'check-double' | 'google-colored' | 'whatsapp' | 'whatsapp-colored' | 'sms-colored' | 'image' | 'image-filled' | 'video' | 'video-filled' | 'document' | 'document-filled' | 'sticker' | 'sticker-filled' | 'text-italic' | 'text-italic-filled' | 'text-bold' | 'text-bold-filled' | 'text-strikethrough' | 'text-strikethrough-filled' | 'send' | 'send-filled' | 'copy' | 'copy-filled' | 'reschedule' | 'reschedule-filled' | 'clock' | 'clock-filled' | 'arrow-counterclockwise' | 'arrow-counterclockwise-filled' | 'star' | 'star-filled' | 'pause' | 'pause-filled' | 'play' | 'play-filled' | 'arrow-performance' | 'arrow-performance-filled' | 'drop' | 'drop-filled' | 'dot' | 'dot-filled' | 'top-message-filled' | 'top-message-colored' | 'folder' | 'folder-filled' | 'folder-open' | 'folder-open-filled' | 'list' | 'list-filled' | 'grid' | 'grid-filled' | 'save' | 'save-filled' | 'sender' | 'sender-filled' | 'api-filled' | 'api-colored' | 'verify-colored' | 'phone-filled' | 'open' | 'open-filled' | 'menu-burger-right-filled' | 'text' | 'text-filled' | 'flash' | 'flash-filled' | 'mobile-number' | 'mobile-number-filled' | 'whatsapp-sender' | 'custom-sender' | 'custom-sender-filled' | 'question-circle' | 'question-circle-filled' | 'reply' | 'reply-filled' | 'phone' | 'none' | 'circle' | 'circle-filled' | 'slash' | 'slash-filled' | 'chevron-double-right' | 'chevron-double-right-filled' | 'chevron-double-left' | 'chevron-double-left-filled' | 'arrow-download' | 'arrow-download-filled' | 'document-download' | 'document-download-filled' | 'hashtag' | 'hashtag-filled' | 'arrow-sync' | 'arrow-sync-filled' | 'file' | 'file-filled' | 'arrow-left' | 'arrow-left-filled' | 'arrow-right' | 'arrow-right-filled' | 'data-line' | 'data-line-filled' | 'data-pie' | 'data-pie-filled' | 'data-bar' | 'data-bar-filled' | 'data-number' | 'data-number-filled' | 'data-percent' | 'data-percent-filled' | 'chat' | 'chat-filled' | 'resend' | 'resend-filled' | 'code' | 'code-filled' | 'zapier-colored' | 'terminal' | 'terminal-filled' | 'key' | 'key-filled' | 'payment' | 'payment-filled' | 'alert' | 'alert-filled' | 'personal-details' | 'personal-details-filled' | 'company-details' | 'company-details-filled' | 'security' | 'security-filled' | 'person-card' | 'person-card-filled' | 'data-list' | 'data-list-filled' | 'top-message-black' | 'rename' | 'rename-filled' | 'tick-circle' | 'tick-circle-filled' | 'status-colored' | 'tag-add' | 'tag-add-filled' | 'number-symbol' | 'number-symbol-filled' | 'data-vizualization' | 'data-vizualization-filled' | 'message-details' | 'message-details-filled' | 'flash-colored' | 'person-resubscribe' | 'person-resubscribe-filled' | 'gift' | 'gift-filled' | 'arrow-in-45' | 'arrow-in-45-filled' | 'arrow-out-45' | 'arrow-out-45-filled' | 'field-custom' | 'field-custom-filled' | 'field-default' | 'field-default-filled' | 'mouse-click' | 'mouse-click-filled' | 'conversion' | 'conversion-filled' | 'credits' | 'credits-filled' | 'notification' | 'notification-filled' | 'notification-alarm' | 'notification-alarm-filled' | 'notification-slash' | 'notification-slash-filled' | 'notification-warning' | 'notification-warning-filled' | 'warning-circle' | 'warning-circle-filled' | 'warning-hex' | 'warning-hex-filled' | 'warning-triangle' | 'warning-triangle-filled' | 'open-sidebar' | 'close-sidebar' | 'minimize-arrow' | 'maximize-arrow' | 'case' | 'backpack' | 'rewrite-ai' | 'auto-recharge' | 'auto-recharge-filled' | 'top-agent' | 'video-file' | 'flag-global' | 'flag-gb' | 'flag-es' | 'flag-fr' | 'flag-de' | 'flag-be' | 'flag-it' | 'flag-nl' | 'flag-pl' | 'flag-se' | 'flag-at' | 'flag-ch' | 'flag-am' | 'flag-ae' | 'flag-ru' | 'flag-us' | 'flag-ca' | 'flag-ee' | 'flag-sg' | 'flag-au' | 'flag-ie' | 'flag-il' | 'flag-hk' | 'flag-sa' | 'person-folder' | 'person-folder-filled' | 'group-remove' | 'group-remove-filled' | 'rocket' | 'grid-dots';
3
3
  export declare const iconNames: IconNames[];
4
4
  export declare const IconList: {
5
5
  [key in IconNames]: ReactNode;
@@ -2,6 +2,7 @@ import { MutableRefObject } from 'react';
2
2
 
3
3
  type Props = {
4
4
  contentEditableRef: MutableRefObject<HTMLDivElement | null>;
5
+ caretRangeRef: MutableRefObject<Range | null>;
5
6
  caretPosition: number;
6
7
  setValue: (value: string) => void;
7
8
  hasEmojiOrVariable: boolean;
@@ -13,5 +14,5 @@ type Props = {
13
14
  setUnsubscribePopupOpen: (isOpen: boolean) => void;
14
15
  setBracketsPopupOpen: (isOpen: boolean) => void;
15
16
  };
16
- export declare const useInsertVariable: ({ contentEditableRef, caretPosition, setValue, hasEmojiOrVariable, showCharInfo, setHasEmojiOrVariable, setCaretPosition, setHasUnsibscribeLink, codeAppliedCallBack, setUnsubscribePopupOpen, setBracketsPopupOpen, }: Props) => (text: string, isLink?: boolean, isCode?: boolean) => void;
17
+ export declare const useInsertVariable: ({ contentEditableRef, caretRangeRef, caretPosition, setValue, hasEmojiOrVariable, showCharInfo, setHasEmojiOrVariable, setCaretPosition, setHasUnsibscribeLink, codeAppliedCallBack, setUnsubscribePopupOpen, setBracketsPopupOpen, }: Props) => (text: string, isLink?: boolean, isCode?: boolean) => void;
17
18
  export {};
@@ -67,6 +67,7 @@ export type FooterProps = SharedProps & {
67
67
  hasUnsibscribeLink: boolean;
68
68
  setHasUnsibscribeLink: (hasUnsibscribeLink: boolean) => void;
69
69
  contentEditableRef: MutableRefObject<HTMLDivElement | null>;
70
+ caretRangeRef: MutableRefObject<Range | null>;
70
71
  caretPosition: number;
71
72
  setCaretPosition: (position: number) => void;
72
73
  setHasEmojiOrVariable: (hasEmojiOrVariable: boolean) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@top-message/ui-lib",
3
- "version": "2.23.42",
3
+ "version": "2.23.44",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",