@nectary/assets 3.1.0 → 3.1.2
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/bundle.d.ts +1 -1
- package/bundle.js +3 -3
- package/bundle.ts +2 -1
- package/icons-branded/{chatlayert → chatlayer}/global/index.d.ts +4 -4
- package/icons-branded/{chatlayert → chatlayer}/global/index.js +1 -1
- package/icons-branded/{chatlayert → chatlayer}/index.d.ts +5 -5
- package/icons-branded/{chatlayert → chatlayer}/index.js +3 -3
- package/package.json +1 -1
- package/utils/asset-names.d.ts +2 -2
- package/utils/asset-names.js +1 -1
- package/utils/element.d.ts +1 -1
- package/utils/global-assets-manager.d.ts +1 -0
- package/utils/shared/global-elements-manager.d.ts +1 -0
- package/utils/shared/global-elements-manager.js +32 -24
- package/utils/shared/global-elements-store.d.ts +5 -1
- package/utils/shared/global-elements-store.js +9 -1
package/bundle.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export { IconBrandedChannels } from './icons-branded/channels';
|
|
|
21
21
|
export { IconBrandedChat } from './icons-branded/chat';
|
|
22
22
|
export { IconBrandedChatMessage } from './icons-branded/chat-message';
|
|
23
23
|
export { IconBrandedChatbot } from './icons-branded/chatbot';
|
|
24
|
-
export {
|
|
24
|
+
export { IconBrandedChatlayer } from './icons-branded/chatlayer';
|
|
25
25
|
export { IconBrandedCloud } from './icons-branded/cloud';
|
|
26
26
|
export { IconBrandedConnection } from './icons-branded/connection';
|
|
27
27
|
export { IconBrandedContact } from './icons-branded/contact';
|
package/bundle.js
CHANGED
|
@@ -244,8 +244,8 @@ const templateHTML$4A = '<svg viewBox="0 0 48 48" aria-hidden="true"><path fill-
|
|
|
244
244
|
const IconBrandedChatbot = createIconClass$1(templateHTML$4A);
|
|
245
245
|
defineCustomElement("sinch-icon-branded-chatbot", IconBrandedChatbot);
|
|
246
246
|
const templateHTML$4z = '<svg viewBox="0 0 48 48" aria-hidden="true"><path d="m24 37 8 5v-7h1a4 4 0 0 0 4-4V18a4 4 0 0 0-4-4h-5v2h5a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2h-3v5.392L27.774 37H24Z" class="accent"/><path fill-rule="evenodd" clip-rule="evenodd" d="m22.97 8.271-11 6.142c-.623.349-.97.966-.97 1.593v15.136c0 .959.827 1.858 2 1.858h11c1.173 0 2-.9 2-1.858V9.864c0-1.324-1.588-2.398-3.03-1.593Zm-11.974 4.396C9.76 13.357 9 14.63 9 16.006v15.136C9 33.272 10.79 35 13 35h11c2.21 0 4-1.727 4-3.858V9.864c0-2.972-3.337-4.828-6.004-3.34l-11 6.143Z"/></svg>';
|
|
247
|
-
const
|
|
248
|
-
defineCustomElement("sinch-icon-branded-
|
|
247
|
+
const IconBrandedChatlayer = createIconClass$1(templateHTML$4z);
|
|
248
|
+
defineCustomElement("sinch-icon-branded-chatlayer", IconBrandedChatlayer);
|
|
249
249
|
const templateHTML$4y = '<svg viewBox="0 0 48 48" aria-hidden="true"><path d="M41.656 24.267a7.404 7.404 0 0 0-7.17-5.58h-.87c-.45-1.36-1.17-2.63-2.1-3.72-1.1-1.3-2.48-2.33-4.04-3.01-1.55-.68-3.24-1.01-4.93-.95-2.22.02-4.32 1.14-5.41 2 1.15-.04 2.31.04 3.45.23.1.02.2.03.3.05.55-.17 1.13-.28 1.7-.28h.03c.95-.04 1.9.08 2.82.33.43.12.84.27 1.25.45a9.12 9.12 0 0 1 3.32 2.48c.45.53.84 1.11 1.16 1.73l.01.01c.32.62.57 1.27.75 1.95.11.44.51.75.97.75h1.61c1.2 0 2.37.4 3.32 1.14a5.43 5.43 0 0 1 1.92 2.93c.29 1.14.2 2.35-.26 3.44-.19.32-.34.55-.47.73v.28c0 .76-.06 1.51-.18 2.24 1.23-.33 1.79-1.25 2.4-2.28.02-.04.04-.07.06-.11.63-1.53.77-3.22.36-4.81Z" class="accent"/><path d="M18.246 37c-2.1 0-4.16-.383-5.94-1.493-1.79-1.11-3.23-2.7-4.15-4.59-.93-1.89-1.31-4-1.1-6.09.21-2.1 1.01-3.787 2.3-5.447a11.08 11.08 0 0 1 4.99-3.68c1.98-.73 4.11-.9 6.18-.47 2.06.43 3.96 1.117 5.49 2.567 1.34 1.27 2.34 2.85 2.92 4.59h.87c1.98 0 3.84.77 5.24 2.17a7.36 7.36 0 0 1 2.17 5.24c0 1.98-.77 3.84-2.17 5.24-1.4 1.4-3.26 2-5.24 2L18.5 37h-.254Zm0-20c-1.09 0-2.18.19-3.21.58-1.62.6-3.04 1.64-4.1 3.01-1.06 1.37-1.71 2.707-1.89 4.427-.17 1.72.14 3.46.9 5.01a9.234 9.234 0 0 0 3.42 3.78c1.47.91 3.15 1.193 4.88 1.193h.254l11.296.037c1.45 0 2.8-.39 3.83-1.41a5.33 5.33 0 0 0 1.58-3.82c0-1.44-.56-2.8-1.58-3.82a5.377 5.377 0 0 0-3.83-1.58h-1.61c-.46 0-.85-.31-.97-.75a9.227 9.227 0 0 0-2.58-4.39c-1.25-1.19-2.81-1.707-4.51-2.057a8.03 8.03 0 0 0-1.88-.21Z"/></svg>';
|
|
250
250
|
const IconBrandedCloud = createIconClass$1(templateHTML$4y);
|
|
251
251
|
defineCustomElement("sinch-icon-branded-cloud", IconBrandedCloud);
|
|
@@ -17742,7 +17742,7 @@ export {
|
|
|
17742
17742
|
IconBrandedChat,
|
|
17743
17743
|
IconBrandedChatMessage,
|
|
17744
17744
|
IconBrandedChatbot,
|
|
17745
|
-
|
|
17745
|
+
IconBrandedChatlayer,
|
|
17746
17746
|
IconBrandedCloud,
|
|
17747
17747
|
IconBrandedConnection,
|
|
17748
17748
|
IconBrandedContact,
|
package/bundle.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Reminder: Keep this list updated as we add new assets
|
|
2
|
+
|
|
2
3
|
// Icons Branded
|
|
3
4
|
export { IconBranded5gReadiness } from './icons-branded/5g-readiness'
|
|
4
5
|
export { IconBrandedAbcd } from './icons-branded/abcd'
|
|
@@ -23,7 +24,7 @@ export { IconBrandedChannels } from './icons-branded/channels'
|
|
|
23
24
|
export { IconBrandedChat } from './icons-branded/chat'
|
|
24
25
|
export { IconBrandedChatMessage } from './icons-branded/chat-message'
|
|
25
26
|
export { IconBrandedChatbot } from './icons-branded/chatbot'
|
|
26
|
-
export {
|
|
27
|
+
export { IconBrandedChatlayer } from './icons-branded/chatlayer'
|
|
27
28
|
export { IconBrandedCloud } from './icons-branded/cloud'
|
|
28
29
|
export { IconBrandedConnection } from './icons-branded/connection'
|
|
29
30
|
export { IconBrandedContact } from './icons-branded/contact'
|
|
@@ -2,23 +2,23 @@ import type { TSinchIconBrandedElement, TSinchIconBrandedReact, TSinchIconBrande
|
|
|
2
2
|
export * from '../../types';
|
|
3
3
|
declare global {
|
|
4
4
|
interface NectaryComponentMap {
|
|
5
|
-
'sinch-icon-branded-
|
|
5
|
+
'sinch-icon-branded-chatlayer': {
|
|
6
6
|
props: TSinchIconBrandedProps;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
interface HTMLElementTagNameMap {
|
|
10
|
-
'sinch-icon-branded-
|
|
10
|
+
'sinch-icon-branded-chatlayer': TSinchIconBrandedElement;
|
|
11
11
|
}
|
|
12
12
|
namespace JSX {
|
|
13
13
|
interface IntrinsicElements {
|
|
14
|
-
'sinch-icon-branded-
|
|
14
|
+
'sinch-icon-branded-chatlayer': TSinchIconBrandedReact;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
declare module 'react' {
|
|
19
19
|
namespace JSX {
|
|
20
20
|
interface IntrinsicElements extends globalThis.JSX.IntrinsicElements {
|
|
21
|
-
'sinch-icon-branded-
|
|
21
|
+
'sinch-icon-branded-chatlayer': TSinchIconBrandedReact;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { defineCustomElement } from "../../../utils/element.js";
|
|
2
|
-
defineCustomElement("sinch-icon-branded-
|
|
2
|
+
defineCustomElement("sinch-icon-branded-chatlayer");
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import type { TSinchIconBrandedElement, TSinchIconBrandedReact, TSinchIconBrandedProps } from '../types';
|
|
2
2
|
export * from '../types';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const IconBrandedChatlayer: CustomElementConstructor;
|
|
4
4
|
declare global {
|
|
5
5
|
interface NectaryComponentMap {
|
|
6
|
-
'sinch-icon-branded-
|
|
6
|
+
'sinch-icon-branded-chatlayer': {
|
|
7
7
|
props: TSinchIconBrandedProps;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
10
|
interface HTMLElementTagNameMap {
|
|
11
|
-
'sinch-icon-branded-
|
|
11
|
+
'sinch-icon-branded-chatlayer': TSinchIconBrandedElement;
|
|
12
12
|
}
|
|
13
13
|
namespace JSX {
|
|
14
14
|
interface IntrinsicElements {
|
|
15
|
-
'sinch-icon-branded-
|
|
15
|
+
'sinch-icon-branded-chatlayer': TSinchIconBrandedReact;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
declare module 'react' {
|
|
20
20
|
namespace JSX {
|
|
21
21
|
interface IntrinsicElements extends globalThis.JSX.IntrinsicElements {
|
|
22
|
-
'sinch-icon-branded-
|
|
22
|
+
'sinch-icon-branded-chatlayer': TSinchIconBrandedReact;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
import { createIconClass } from "../create-icon-class.js";
|
|
3
3
|
const templateHTML = '<svg viewBox="0 0 48 48" aria-hidden="true"><path d="m24 37 8 5v-7h1a4 4 0 0 0 4-4V18a4 4 0 0 0-4-4h-5v2h5a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2h-3v5.392L27.774 37H24Z" class="accent"/><path fill-rule="evenodd" clip-rule="evenodd" d="m22.97 8.271-11 6.142c-.623.349-.97.966-.97 1.593v15.136c0 .959.827 1.858 2 1.858h11c1.173 0 2-.9 2-1.858V9.864c0-1.324-1.588-2.398-3.03-1.593Zm-11.974 4.396C9.76 13.357 9 14.63 9 16.006v15.136C9 33.272 10.79 35 13 35h11c2.21 0 4-1.727 4-3.858V9.864c0-2.972-3.337-4.828-6.004-3.34l-11 6.143Z"/></svg>';
|
|
4
|
-
const
|
|
5
|
-
defineCustomElement("sinch-icon-branded-
|
|
4
|
+
const IconBrandedChatlayer = createIconClass(templateHTML);
|
|
5
|
+
defineCustomElement("sinch-icon-branded-chatlayer", IconBrandedChatlayer);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
IconBrandedChatlayer
|
|
8
8
|
};
|
package/package.json
CHANGED
package/utils/asset-names.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BASE_ASSET_NAMES_LIST: readonly ["icon-branded-5g-readiness", "icon-branded-abcd", "icon-branded-ai", "icon-branded-airplane", "icon-branded-announcement", "icon-branded-barchart-down", "icon-branded-barchart-up", "icon-branded-bell", "icon-branded-bell-notification", "icon-branded-bell-off", "icon-branded-billing", "icon-branded-boat", "icon-branded-book", "icon-branded-calendar", "icon-branded-call", "icon-branded-call-and-verified", "icon-branded-calling-api", "icon-branded-campaigns", "icon-branded-car", "icon-branded-channels", "icon-branded-chat", "icon-branded-chat-message", "icon-branded-chatbot", "icon-branded-
|
|
2
|
-
export declare const BASE_ASSET_NAMES: Set<"icon-branded-5g-readiness" | "icon-branded-abcd" | "icon-branded-ai" | "icon-branded-airplane" | "icon-branded-announcement" | "icon-branded-barchart-down" | "icon-branded-barchart-up" | "icon-branded-bell" | "icon-branded-bell-notification" | "icon-branded-bell-off" | "icon-branded-billing" | "icon-branded-boat" | "icon-branded-book" | "icon-branded-calendar" | "icon-branded-call" | "icon-branded-call-and-verified" | "icon-branded-calling-api" | "icon-branded-campaigns" | "icon-branded-car" | "icon-branded-channels" | "icon-branded-chat" | "icon-branded-chat-message" | "icon-branded-chatbot" | "icon-branded-
|
|
1
|
+
export declare const BASE_ASSET_NAMES_LIST: readonly ["icon-branded-5g-readiness", "icon-branded-abcd", "icon-branded-ai", "icon-branded-airplane", "icon-branded-announcement", "icon-branded-barchart-down", "icon-branded-barchart-up", "icon-branded-bell", "icon-branded-bell-notification", "icon-branded-bell-off", "icon-branded-billing", "icon-branded-boat", "icon-branded-book", "icon-branded-calendar", "icon-branded-call", "icon-branded-call-and-verified", "icon-branded-calling-api", "icon-branded-campaigns", "icon-branded-car", "icon-branded-channels", "icon-branded-chat", "icon-branded-chat-message", "icon-branded-chatbot", "icon-branded-chatlayer", "icon-branded-cloud", "icon-branded-connection", "icon-branded-contact", "icon-branded-contact-center", "icon-branded-contact-pro", "icon-branded-cookies", "icon-branded-credit-card", "icon-branded-custom", "icon-branded-custom-message", "icon-branded-customer-satisfaction-smiley", "icon-branded-database", "icon-branded-decision", "icon-branded-developer", "icon-branded-direction", "icon-branded-easytouse", "icon-branded-edit", "icon-branded-finance", "icon-branded-flow", "icon-branded-flow-chart", "icon-branded-global", "icon-branded-global-settings", "icon-branded-gym", "icon-branded-handshaking", "icon-branded-health-insurance", "icon-branded-healthcare", "icon-branded-help", "icon-branded-home", "icon-branded-idea", "icon-branded-integration", "icon-branded-intelligent-revenue-maximisation", "icon-branded-laptop", "icon-branded-layout", "icon-branded-line-chart-down", "icon-branded-line-chart-up", "icon-branded-lock", "icon-branded-logistic", "icon-branded-long-message", "icon-branded-loop", "icon-branded-low-cost", "icon-branded-make-it-happen", "icon-branded-make-money", "icon-branded-massage", "icon-branded-media", "icon-branded-message", "icon-branded-message-questions", "icon-branded-messaging", "icon-branded-mic", "icon-branded-mms", "icon-branded-mobile", "icon-branded-mobile-intergration", "icon-branded-mobile-numbers", "icon-branded-money", "icon-branded-multiple-channels", "icon-branded-music", "icon-branded-mute", "icon-branded-news", "icon-branded-numbers", "icon-branded-office", "icon-branded-office-activities", "icon-branded-opened-message", "icon-branded-operators", "icon-branded-package", "icon-branded-path", "icon-branded-perso-message", "icon-branded-pie-chart", "icon-branded-piggybank", "icon-branded-pin", "icon-branded-price-tag", "icon-branded-protection", "icon-branded-purpose", "icon-branded-push", "icon-branded-puzzle", "icon-branded-queue", "icon-branded-rcs", "icon-branded-retail", "icon-branded-rich-content", "icon-branded-rocket", "icon-branded-roi", "icon-branded-search", "icon-branded-send", "icon-branded-settings", "icon-branded-shopping-cart", "icon-branded-sms", "icon-branded-support", "icon-branded-system-settings", "icon-branded-telemast", "icon-branded-thumbs-down", "icon-branded-thumbs-up", "icon-branded-time", "icon-branded-tutorial", "icon-branded-user", "icon-branded-users", "icon-branded-verification-api", "icon-branded-verified-phone", "icon-branded-video-calling", "icon-branded-video-off", "icon-branded-video-on", "icon-branded-voice-calling", "icon-branded-voice-video-and-data", "icon-branded-webhook", "icon-branded-wheels", "icon-branded-wi-fi", "icon-channel-apple-business-chat", "icon-channel-apple-business-chat-square", "icon-channel-facebook", "icon-channel-facebook-messenger", "icon-channel-facebook-messenger-square", "icon-channel-facebook-square", "icon-channel-google-business", "icon-channel-google-business-square", "icon-channel-instagram", "icon-channel-instagram-square", "icon-channel-line", "icon-channel-line-square", "icon-channel-mms-round", "icon-channel-mms-square", "icon-channel-notify", "icon-channel-notify-square", "icon-channel-push-round", "icon-channel-push-square", "icon-channel-rcs-round", "icon-channel-rcs-square", "icon-channel-sms-round", "icon-channel-sms-square", "icon-channel-talk", "icon-channel-talk-square", "icon-channel-telegram", "icon-channel-telegram-square", "icon-channel-twitter", "icon-channel-twitter-square", "icon-channel-viber", "icon-channel-viber-square", "icon-channel-webchat-round", "icon-channel-webchat-square", "icon-channel-wechat", "icon-channel-wechat-square", "icon-channel-whatsapp", "icon-channel-whatsapp-square", "illustration-5g", "illustration-about-page", "illustration-bank", "illustration-boost", "illustration-buildvoicebot", "illustration-call-center", "illustration-cat", "illustration-cat-texting", "illustration-chat-bot", "illustration-check", "illustration-code", "illustration-contact-us", "illustration-contactus", "illustration-conversation-api", "illustration-cooking", "illustration-costumer-support", "illustration-credit-card", "illustration-credit-card-30-degrees", "illustration-cute-bee", "illustration-decorative-flamingo", "illustration-decorative-rainbow", "illustration-delivery-service-package", "illustration-desktop", "illustration-document", "illustration-dream-big", "illustration-flower-hand", "illustration-football", "illustration-geometric-shapes-passing", "illustration-girl-on-phone", "illustration-global-reach", "illustration-hand-ok", "illustration-hands-laptop", "illustration-handset-omnichannel-messages", "illustration-happy-text", "illustration-headphones", "illustration-heart", "illustration-hero-messages", "illustration-hero-page", "illustration-jump", "illustration-laptop-holding", "illustration-laptop-sitting-verified", "illustration-lightbulb", "illustration-lightning", "illustration-lock", "illustration-lying-and-looking-at-the-phone", "illustration-magnifying-glass", "illustration-man-on-right", "illustration-meeting-scrum", "illustration-meeting-scrum-2", "illustration-megaphone", "illustration-menu", "illustration-message-passing", "illustration-message-recieved", "illustration-messages", "illustration-messages-on-yellow-bg", "illustration-messages-shopping", "illustration-monitor", "illustration-numbers-passing", "illustration-office-worker", "illustration-old-person-on-phone", "illustration-omnichannel-messaging", "illustration-on-a-cloud", "illustration-on-the-phone", "illustration-parcel-delivery", "illustration-passing-heart", "illustration-passing-heart-cool", "illustration-person-lightbulb-backpack", "illustration-person-on-phone", "illustration-person-on-walk", "illustration-person-with-dog", "illustration-person-with-phone", "illustration-phone-and-cat", "illustration-pineapple", "illustration-pizza", "illustration-plane", "illustration-presenting-charts", "illustration-product-page", "illustration-product-page-2", "illustration-scooter", "illustration-security", "illustration-security-camera", "illustration-sherlockholmes", "illustration-shoe", "illustration-shopping", "illustration-shopping-cart", "illustration-sick-kid", "illustration-sitting-messaging", "illustration-sitting-person", "illustration-sitting-person-2", "illustration-sofa", "illustration-stats", "illustration-support-center", "illustration-supporting-device", "illustration-supporting-device-2", "illustration-supporting-device-3", "illustration-supporting-device-4", "illustration-surf", "illustration-taxi", "illustration-taxi-2", "illustration-teamwork-from-phone", "illustration-telemast", "illustration-texting-sitting", "illustration-texting-sofa", "illustration-train", "illustration-video-voice-call", "illustration-voicebot", "illustration-walking-on-phone", "illustration-what-tools", "illustration-win-together", "illustration-win-together-two-people", "illustration-wizard", "illustration-woman-hand-lifted", "illustration-woman-on-left", "illustration-woman-on-right", "logo-campaigns-icon", "logo-campaigns-icon-wordmark", "logo-chatlayer-icon", "logo-chatlayer-icon-wordmark", "logo-contact-pro-icon", "logo-contact-pro-icon-wordmark", "logo-email-on-acid-icon", "logo-email-on-acid-icon-wordmark", "logo-engage-icon", "logo-engage-icon-wordmark", "logo-mailgun-icon", "logo-mailgun-icon-wordmark", "logo-mailjet-icon", "logo-mailjet-icon-wordmark", "logo-message-media-icon", "logo-message-media-icon-wordmark", "logo-message-studio-icon", "logo-message-studio-icon-wordmark", "logo-nectary-icon", "logo-nectary-icon-wordmark", "logo-portal-build-icon", "logo-portal-build-icon-wordmark", "logo-portal-connect-icon", "logo-portal-connect-icon-wordmark", "logo-portal-engage-icon", "logo-portal-engage-icon-wordmark", "logo-portal-mailgun-icon", "logo-portal-mailgun-icon-wordmark", "logo-portal-mailjet-icon", "logo-portal-mailjet-icon-wordmark", "logo-portal-message-media-icon", "logo-portal-message-media-icon-wordmark", "logo-portal-sinch-account-icon-wordmark", "logo-portal-sinch-id-icon-wordmark", "logo-simple-texting-icon", "logo-simple-texting-icon-wordmark", "logo-sinch-icon", "logo-sinch-icon-wordmark", "animation-engage-logo", "animation-sinch-logo"];
|
|
2
|
+
export declare const BASE_ASSET_NAMES: Set<"icon-branded-5g-readiness" | "icon-branded-abcd" | "icon-branded-ai" | "icon-branded-airplane" | "icon-branded-announcement" | "icon-branded-barchart-down" | "icon-branded-barchart-up" | "icon-branded-bell" | "icon-branded-bell-notification" | "icon-branded-bell-off" | "icon-branded-billing" | "icon-branded-boat" | "icon-branded-book" | "icon-branded-calendar" | "icon-branded-call" | "icon-branded-call-and-verified" | "icon-branded-calling-api" | "icon-branded-campaigns" | "icon-branded-car" | "icon-branded-channels" | "icon-branded-chat" | "icon-branded-chat-message" | "icon-branded-chatbot" | "icon-branded-chatlayer" | "icon-branded-cloud" | "icon-branded-connection" | "icon-branded-contact" | "icon-branded-contact-center" | "icon-branded-contact-pro" | "icon-branded-cookies" | "icon-branded-credit-card" | "icon-branded-custom" | "icon-branded-custom-message" | "icon-branded-customer-satisfaction-smiley" | "icon-branded-database" | "icon-branded-decision" | "icon-branded-developer" | "icon-branded-direction" | "icon-branded-easytouse" | "icon-branded-edit" | "icon-branded-finance" | "icon-branded-flow" | "icon-branded-flow-chart" | "icon-branded-global" | "icon-branded-global-settings" | "icon-branded-gym" | "icon-branded-handshaking" | "icon-branded-health-insurance" | "icon-branded-healthcare" | "icon-branded-help" | "icon-branded-home" | "icon-branded-idea" | "icon-branded-integration" | "icon-branded-intelligent-revenue-maximisation" | "icon-branded-laptop" | "icon-branded-layout" | "icon-branded-line-chart-down" | "icon-branded-line-chart-up" | "icon-branded-lock" | "icon-branded-logistic" | "icon-branded-long-message" | "icon-branded-loop" | "icon-branded-low-cost" | "icon-branded-make-it-happen" | "icon-branded-make-money" | "icon-branded-massage" | "icon-branded-media" | "icon-branded-message" | "icon-branded-message-questions" | "icon-branded-messaging" | "icon-branded-mic" | "icon-branded-mms" | "icon-branded-mobile" | "icon-branded-mobile-intergration" | "icon-branded-mobile-numbers" | "icon-branded-money" | "icon-branded-multiple-channels" | "icon-branded-music" | "icon-branded-mute" | "icon-branded-news" | "icon-branded-numbers" | "icon-branded-office" | "icon-branded-office-activities" | "icon-branded-opened-message" | "icon-branded-operators" | "icon-branded-package" | "icon-branded-path" | "icon-branded-perso-message" | "icon-branded-pie-chart" | "icon-branded-piggybank" | "icon-branded-pin" | "icon-branded-price-tag" | "icon-branded-protection" | "icon-branded-purpose" | "icon-branded-push" | "icon-branded-puzzle" | "icon-branded-queue" | "icon-branded-rcs" | "icon-branded-retail" | "icon-branded-rich-content" | "icon-branded-rocket" | "icon-branded-roi" | "icon-branded-search" | "icon-branded-send" | "icon-branded-settings" | "icon-branded-shopping-cart" | "icon-branded-sms" | "icon-branded-support" | "icon-branded-system-settings" | "icon-branded-telemast" | "icon-branded-thumbs-down" | "icon-branded-thumbs-up" | "icon-branded-time" | "icon-branded-tutorial" | "icon-branded-user" | "icon-branded-users" | "icon-branded-verification-api" | "icon-branded-verified-phone" | "icon-branded-video-calling" | "icon-branded-video-off" | "icon-branded-video-on" | "icon-branded-voice-calling" | "icon-branded-voice-video-and-data" | "icon-branded-webhook" | "icon-branded-wheels" | "icon-branded-wi-fi" | "icon-channel-apple-business-chat" | "icon-channel-apple-business-chat-square" | "icon-channel-facebook" | "icon-channel-facebook-messenger" | "icon-channel-facebook-messenger-square" | "icon-channel-facebook-square" | "icon-channel-google-business" | "icon-channel-google-business-square" | "icon-channel-instagram" | "icon-channel-instagram-square" | "icon-channel-line" | "icon-channel-line-square" | "icon-channel-mms-round" | "icon-channel-mms-square" | "icon-channel-notify" | "icon-channel-notify-square" | "icon-channel-push-round" | "icon-channel-push-square" | "icon-channel-rcs-round" | "icon-channel-rcs-square" | "icon-channel-sms-round" | "icon-channel-sms-square" | "icon-channel-talk" | "icon-channel-talk-square" | "icon-channel-telegram" | "icon-channel-telegram-square" | "icon-channel-twitter" | "icon-channel-twitter-square" | "icon-channel-viber" | "icon-channel-viber-square" | "icon-channel-webchat-round" | "icon-channel-webchat-square" | "icon-channel-wechat" | "icon-channel-wechat-square" | "icon-channel-whatsapp" | "icon-channel-whatsapp-square" | "illustration-5g" | "illustration-about-page" | "illustration-bank" | "illustration-boost" | "illustration-buildvoicebot" | "illustration-call-center" | "illustration-cat" | "illustration-cat-texting" | "illustration-chat-bot" | "illustration-check" | "illustration-code" | "illustration-contact-us" | "illustration-contactus" | "illustration-conversation-api" | "illustration-cooking" | "illustration-costumer-support" | "illustration-credit-card" | "illustration-credit-card-30-degrees" | "illustration-cute-bee" | "illustration-decorative-flamingo" | "illustration-decorative-rainbow" | "illustration-delivery-service-package" | "illustration-desktop" | "illustration-document" | "illustration-dream-big" | "illustration-flower-hand" | "illustration-football" | "illustration-geometric-shapes-passing" | "illustration-girl-on-phone" | "illustration-global-reach" | "illustration-hand-ok" | "illustration-hands-laptop" | "illustration-handset-omnichannel-messages" | "illustration-happy-text" | "illustration-headphones" | "illustration-heart" | "illustration-hero-messages" | "illustration-hero-page" | "illustration-jump" | "illustration-laptop-holding" | "illustration-laptop-sitting-verified" | "illustration-lightbulb" | "illustration-lightning" | "illustration-lock" | "illustration-lying-and-looking-at-the-phone" | "illustration-magnifying-glass" | "illustration-man-on-right" | "illustration-meeting-scrum" | "illustration-meeting-scrum-2" | "illustration-megaphone" | "illustration-menu" | "illustration-message-passing" | "illustration-message-recieved" | "illustration-messages" | "illustration-messages-on-yellow-bg" | "illustration-messages-shopping" | "illustration-monitor" | "illustration-numbers-passing" | "illustration-office-worker" | "illustration-old-person-on-phone" | "illustration-omnichannel-messaging" | "illustration-on-a-cloud" | "illustration-on-the-phone" | "illustration-parcel-delivery" | "illustration-passing-heart" | "illustration-passing-heart-cool" | "illustration-person-lightbulb-backpack" | "illustration-person-on-phone" | "illustration-person-on-walk" | "illustration-person-with-dog" | "illustration-person-with-phone" | "illustration-phone-and-cat" | "illustration-pineapple" | "illustration-pizza" | "illustration-plane" | "illustration-presenting-charts" | "illustration-product-page" | "illustration-product-page-2" | "illustration-scooter" | "illustration-security" | "illustration-security-camera" | "illustration-sherlockholmes" | "illustration-shoe" | "illustration-shopping" | "illustration-shopping-cart" | "illustration-sick-kid" | "illustration-sitting-messaging" | "illustration-sitting-person" | "illustration-sitting-person-2" | "illustration-sofa" | "illustration-stats" | "illustration-support-center" | "illustration-supporting-device" | "illustration-supporting-device-2" | "illustration-supporting-device-3" | "illustration-supporting-device-4" | "illustration-surf" | "illustration-taxi" | "illustration-taxi-2" | "illustration-teamwork-from-phone" | "illustration-telemast" | "illustration-texting-sitting" | "illustration-texting-sofa" | "illustration-train" | "illustration-video-voice-call" | "illustration-voicebot" | "illustration-walking-on-phone" | "illustration-what-tools" | "illustration-win-together" | "illustration-win-together-two-people" | "illustration-wizard" | "illustration-woman-hand-lifted" | "illustration-woman-on-left" | "illustration-woman-on-right" | "logo-campaigns-icon" | "logo-campaigns-icon-wordmark" | "logo-chatlayer-icon" | "logo-chatlayer-icon-wordmark" | "logo-contact-pro-icon" | "logo-contact-pro-icon-wordmark" | "logo-email-on-acid-icon" | "logo-email-on-acid-icon-wordmark" | "logo-engage-icon" | "logo-engage-icon-wordmark" | "logo-mailgun-icon" | "logo-mailgun-icon-wordmark" | "logo-mailjet-icon" | "logo-mailjet-icon-wordmark" | "logo-message-media-icon" | "logo-message-media-icon-wordmark" | "logo-message-studio-icon" | "logo-message-studio-icon-wordmark" | "logo-nectary-icon" | "logo-nectary-icon-wordmark" | "logo-portal-build-icon" | "logo-portal-build-icon-wordmark" | "logo-portal-connect-icon" | "logo-portal-connect-icon-wordmark" | "logo-portal-engage-icon" | "logo-portal-engage-icon-wordmark" | "logo-portal-mailgun-icon" | "logo-portal-mailgun-icon-wordmark" | "logo-portal-mailjet-icon" | "logo-portal-mailjet-icon-wordmark" | "logo-portal-message-media-icon" | "logo-portal-message-media-icon-wordmark" | "logo-portal-sinch-account-icon-wordmark" | "logo-portal-sinch-id-icon-wordmark" | "logo-simple-texting-icon" | "logo-simple-texting-icon-wordmark" | "logo-sinch-icon" | "logo-sinch-icon-wordmark" | "animation-engage-logo" | "animation-sinch-logo">;
|
|
3
3
|
export type AssetName = `sinch-${typeof BASE_ASSET_NAMES_LIST[number]}`;
|
|
4
4
|
export declare const NAME_TO_PATH_MAP: Map<string, string>;
|
package/utils/asset-names.js
CHANGED
package/utils/element.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ declare const BASE_ASSET_NAMES_LIST: readonly [
|
|
|
31
31
|
"icon-branded-chat",
|
|
32
32
|
"icon-branded-chat-message",
|
|
33
33
|
"icon-branded-chatbot",
|
|
34
|
-
"icon-branded-
|
|
34
|
+
"icon-branded-chatlayer",
|
|
35
35
|
"icon-branded-cloud",
|
|
36
36
|
"icon-branded-connection",
|
|
37
37
|
"icon-branded-contact",
|
|
@@ -58,6 +58,7 @@ declare abstract class GlobalElementsManager {
|
|
|
58
58
|
private createLoader;
|
|
59
59
|
private preloadBundle;
|
|
60
60
|
init(options?: GlobalManagerInitOptions): Promise<void>;
|
|
61
|
+
whenLoaded(): Promise<void>;
|
|
61
62
|
private getImportPathFromName;
|
|
62
63
|
preload(name: SinchElementName | SinchElementName[] | "all"): Promise<void>;
|
|
63
64
|
}
|
|
@@ -56,6 +56,7 @@ export declare abstract class GlobalElementsManager {
|
|
|
56
56
|
private createLoader;
|
|
57
57
|
private preloadBundle;
|
|
58
58
|
init(options?: GlobalManagerInitOptions): Promise<void>;
|
|
59
|
+
whenLoaded(): Promise<void>;
|
|
59
60
|
private getImportPathFromName;
|
|
60
61
|
preload(name: SinchElementName | SinchElementName[] | 'all'): Promise<void>;
|
|
61
62
|
}
|
|
@@ -109,31 +109,39 @@ class GlobalElementsManager {
|
|
|
109
109
|
store.preload = options.preload ?? false;
|
|
110
110
|
store.patchPerviousVersions = options.patchPerviousVersions ?? true;
|
|
111
111
|
store.useFallbackExclusively = options.useFallbackExclusively ?? false;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
112
|
+
try {
|
|
113
|
+
if (store.preload) {
|
|
114
|
+
const version = options.targetlibVersion;
|
|
115
|
+
store.targetlibVersion = version ?? store.targetlibVersion;
|
|
116
|
+
const importPath = version != null ? `${this.config.cdnUrl}@${version}/es2022/bundle.mjs` : `${this.config.cdnUrl}/bundle`;
|
|
117
|
+
await this.preloadBundle(importPath, options.fallbackLoaderBundle, store.useFallbackExclusively);
|
|
118
|
+
} else {
|
|
119
|
+
if (store.patchPerviousVersions) {
|
|
120
|
+
this.patchCustomElements();
|
|
121
|
+
}
|
|
122
|
+
this.config.baseElementNames.forEach((name) => {
|
|
123
|
+
const importPath = `${this.config.cdnUrl}/${this.getImportPathFromName(name)}`;
|
|
124
|
+
store.definitions.set(`sinch-${name}`, this.createLoader(importPath, name, options.fallbackLoader, store.useFallbackExclusively));
|
|
125
|
+
});
|
|
126
|
+
if (options.targetlibVersion != null) {
|
|
127
|
+
store.targetlibVersion = options.targetlibVersion;
|
|
128
|
+
} else {
|
|
129
|
+
const registry = await fetch(`${this.config.registryUrl}/latest`);
|
|
130
|
+
const registryData = await registry.json();
|
|
131
|
+
store.targetlibVersion = registryData.version;
|
|
132
|
+
}
|
|
133
|
+
this.config.baseElementNames.forEach((name) => {
|
|
134
|
+
const importPath = `${this.config.cdnUrl}@${store.targetlibVersion}/es2022/${this.getImportPathFromName(name)}.mjs`;
|
|
135
|
+
store.definitions.set(`sinch-${name}`, this.createLoader(importPath, name, options.fallbackLoader, store.useFallbackExclusively));
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
} finally {
|
|
139
|
+
store.loadPromise.resolve();
|
|
132
140
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
141
|
+
}
|
|
142
|
+
whenLoaded() {
|
|
143
|
+
const store = getStore(this.config.storeKey);
|
|
144
|
+
return store.loadPromise.promise;
|
|
137
145
|
}
|
|
138
146
|
getImportPathFromName(name) {
|
|
139
147
|
for (const [key, value] of this.config.nameToPathMap ?? []) {
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { SinchElementName } from './nectary-element-base';
|
|
2
2
|
interface GlobalStore {
|
|
3
|
+
definitions: Map<SinchElementName, () => Promise<any>>;
|
|
3
4
|
hasInitialized: boolean;
|
|
4
5
|
targetlibVersion: string;
|
|
5
6
|
patchPerviousVersions: boolean;
|
|
6
7
|
useFallbackExclusively: boolean;
|
|
7
8
|
preload: boolean;
|
|
8
|
-
|
|
9
|
+
loadPromise: {
|
|
10
|
+
promise: Promise<void>;
|
|
11
|
+
resolve: (value: void) => void;
|
|
12
|
+
};
|
|
9
13
|
}
|
|
10
14
|
export declare const getStore: (storeKey: symbol) => GlobalStore;
|
|
11
15
|
export declare const getConstructor: (storeKey: symbol, name: SinchElementName) => Promise<CustomElementConstructor> | null;
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
+
const createDeferredPromise = () => {
|
|
2
|
+
let resolve;
|
|
3
|
+
const promise = new Promise((r) => {
|
|
4
|
+
resolve = r;
|
|
5
|
+
});
|
|
6
|
+
return { promise, resolve };
|
|
7
|
+
};
|
|
1
8
|
const getStore = (storeKey) => {
|
|
2
9
|
if (window[storeKey] != null) {
|
|
3
10
|
return window[storeKey];
|
|
4
11
|
}
|
|
5
12
|
const store = {
|
|
13
|
+
definitions: /* @__PURE__ */ new Map(),
|
|
6
14
|
hasInitialized: false,
|
|
7
15
|
targetlibVersion: "",
|
|
8
16
|
patchPerviousVersions: false,
|
|
9
17
|
useFallbackExclusively: false,
|
|
10
18
|
preload: false,
|
|
11
|
-
|
|
19
|
+
loadPromise: createDeferredPromise()
|
|
12
20
|
};
|
|
13
21
|
Object.defineProperty(window, storeKey, {
|
|
14
22
|
value: store,
|