@datlv-trustshop/shopify-inapp-components 0.3.3 → 0.3.5

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.
Files changed (45) hide show
  1. package/dist/components/FloatingCard.d.ts +3 -3
  2. package/dist/components/FloatingCard.d.ts.map +1 -1
  3. package/dist/components/FloatingCard.js +62 -95
  4. package/dist/components/FloatingCard.js.map +1 -1
  5. package/dist/components/MarketingCampaignCard.d.ts +44 -0
  6. package/dist/components/MarketingCampaignCard.d.ts.map +1 -0
  7. package/dist/components/MarketingCampaignCard.js +134 -0
  8. package/dist/components/MarketingCampaignCard.js.map +1 -0
  9. package/dist/components/index.d.ts +1 -0
  10. package/dist/components/index.d.ts.map +1 -1
  11. package/dist/components/index.js +1 -0
  12. package/dist/components/index.js.map +1 -1
  13. package/dist/config/internal-config.d.ts.map +1 -1
  14. package/dist/config/internal-config.js +4 -0
  15. package/dist/config/internal-config.js.map +1 -1
  16. package/dist/core/SDKManager.d.ts.map +1 -1
  17. package/dist/core/SDKManager.js +12 -13
  18. package/dist/core/SDKManager.js.map +1 -1
  19. package/dist/hooks/index.d.ts +1 -0
  20. package/dist/hooks/index.d.ts.map +1 -1
  21. package/dist/hooks/index.js +1 -0
  22. package/dist/hooks/index.js.map +1 -1
  23. package/dist/hooks/useFloatingCards.d.ts.map +1 -1
  24. package/dist/hooks/useFloatingCards.js +16 -3
  25. package/dist/hooks/useFloatingCards.js.map +1 -1
  26. package/dist/hooks/useMarketingCampaign.d.ts +27 -0
  27. package/dist/hooks/useMarketingCampaign.d.ts.map +1 -0
  28. package/dist/hooks/useMarketingCampaign.js +103 -0
  29. package/dist/hooks/useMarketingCampaign.js.map +1 -0
  30. package/dist/hooks/usePartnerIntegration.d.ts.map +1 -1
  31. package/dist/hooks/usePartnerIntegration.js +2 -3
  32. package/dist/hooks/usePartnerIntegration.js.map +1 -1
  33. package/dist/index.d.ts +4 -2
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +2 -50
  36. package/dist/index.js.map +1 -1
  37. package/dist/utils/campaignCache.d.ts +40 -0
  38. package/dist/utils/campaignCache.d.ts.map +1 -0
  39. package/dist/utils/campaignCache.js +119 -0
  40. package/dist/utils/campaignCache.js.map +1 -0
  41. package/package.json +1 -1
  42. package/dist/core/global-manager.d.ts +0 -91
  43. package/dist/core/global-manager.d.ts.map +0 -1
  44. package/dist/core/global-manager.js +0 -347
  45. package/dist/core/global-manager.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"usePartnerIntegration.js","sourceRoot":"","sources":["../../src/hooks/usePartnerIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAG5C;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IAEvB,8BAA8B;IAC9B,MAAM,aAAa,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC;IAEpD,qEAAqE;IACrE,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QAChC,IAAI,CAAC,aAAa,EAAE,YAAY,EAAE,CAAC;YACjC,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,4BAA4B;QAC5B,OAAO,aAAa,CAAC,YAAY,CAAC,MAAM,CACtC,CAAC,IAAS,EAAE,EAAE,CACZ,IAAI,CAAC,GAAG,KAAK,gBAAgB,IAAI,IAAI,CAAC,KAAK,KAAK,gBAAgB,CACnE,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,oEAAoE;IACpE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/C,OAAO,EA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AO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;QACrE,CAAC;QAED,mDAAmD;QACnD,MAAM,WAAW,GAAG,GAAG,KAAK,gBAAgB,CAAC;QAC7C,MAAM,QAAQ,GAAG,GAAG,KAAK,YAAY,CAAC;QACtC,MAAM,WAAW,GAAG,CAAC,WAAW,CAAC,mBAAmB,CAAC;QAErD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IAChD,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import { useMemo } from \"react\";\nimport { useSDK } from \"../core/SDKManager\";\nimport SDKManager from \"../core/SDKManager\";\nimport { IntegrationItem } from \"../types/integration\";\n\n/**\n * Hook to get all partner integrations from dashboard data\n */\nexport function usePartnerIntegrations() {\n const sdk = useSDK({});\n\n // Get dashboard data from SDK\n const dashboardData = SDKManager.getDashboardData();\n\n // Partner integrations are stored directly in the integrations field\n const integrations = useMemo(() => {\n if (!dashboardData?.integrations) {\n return [];\n }\n // Filter out Google Reviews\n return dashboardData.integrations.filter(\n (item: any) =>\n item.key !== \"google_reviews\" && item.title !== \"Google Reviews\",\n );\n }, [dashboardData]);\n\n // Group integrations by category using the API's category_key field\n const groups = useMemo(() => {\n if (!integrations || integrations.length === 0) {\n return [];\n }\n\n // Group by category_key from API\n const categoryGroups: Record<string, any[]> = {};\n const categoryTitles: Record<string, string> = {};\n \n integrations.forEach((item: any) => {\n const categoryKey = item.category_key || 'other';\n const categoryTitle = item.category || 'Other';\n \n if (!categoryGroups[categoryKey]) {\n categoryGroups[categoryKey] = [];\n categoryTitles[categoryKey] = categoryTitle;\n }\n categoryGroups[categoryKey].push(item);\n });\n\n // Get translations\n const translations = sdk.translations?.partnerIntegration || {};\n\n // Define category order and translation mapping\n // Temporarily hide 'developer' category\n const categoryOrder = ['review_sources', 'post_purchase_automation', 'seo_rich_snippets']; // 'developer' temporarily removed\n const translationMap: Record<string, string> = {\n 'review_sources': translations.reviewSourcesTitle || 'Review Sources',\n 'post_purchase_automation': translations.postPurchaseTitle || 'Post-purchase & Automation',\n 'seo_rich_snippets': translations.seoSnippetsTitle || 'SEO & Rich Snippets',\n // 'developer': (translations as any).developerTitle || 'Developer' // Temporarily commented out\n };\n\n // Build groups in order\n const allGroups: Array<{\n key: string;\n title: string;\n items: any[];\n }> = [];\n \n // Add categories in preferred order first\n categoryOrder.forEach(categoryKey => {\n if (categoryGroups[categoryKey]) {\n allGroups.push({\n key: categoryKey,\n title: translationMap[categoryKey] || categoryTitles[categoryKey],\n items: categoryGroups[categoryKey]\n });\n delete categoryGroups[categoryKey];\n }\n });\n \n // Add any remaining categories (excluding 'developer' temporarily)\n Object.entries(categoryGroups).forEach(([categoryKey, items]) => {\n // Temporarily skip 'developer' category\n if (categoryKey === 'developer') {\n return;\n }\n allGroups.push({\n key: categoryKey,\n title: categoryTitles[categoryKey],\n items\n });\n });\n\n return allGroups;\n }, [integrations, sdk.translations]);\n\n return {\n groups,\n loading: sdk.dashboardLoading || false,\n error: sdk.dashboardError || null,\n integrations,\n };\n}\n\n/**\n * Hook to get a specific integration by key\n */\nexport function usePartnerIntegrationByKey(\n key: string,\n): IntegrationItem | null {\n const { integrations } = usePartnerIntegrations();\n\n return useMemo(() => {\n return integrations.find((item: any) => item.key === key) || null;\n }, [integrations, key]);\n}\n\n/**\n * Hook to get integration status\n */\nexport function usePartnerIntegrationStatus(key: string): {\n isConnected: boolean;\n isActive: boolean;\n isInstalled: boolean;\n} {\n const integration = usePartnerIntegrationByKey(key);\n\n return useMemo(() => {\n if (!integration) {\n return { isConnected: false, isActive: false, isInstalled: false };\n }\n\n // Check based on integration key and button states\n const isConnected = key === \"google_reviews\";\n const isActive = key !== \"after_ship\";\n const isInstalled = !integration.button_install_text;\n\n return { isConnected, isActive, isInstalled };\n }, [integration, key]);\n}\n"]}
1
+ {"version":3,"file":"usePartnerIntegration.js","sourceRoot":"","sources":["../../src/hooks/usePartnerIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAG5C;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IAEvB,8BAA8B;IAC9B,MAAM,aAAa,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC;IAEpD,qEAAqE;IACrE,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QAChC,IAAI,CAAC,aAAa,EAAE,YAAY,EAAE,CAAC;YACjC,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,4BAA4B;QAC5B,OAAO,aAAa,CAAC,YAAY,CAAC,MAAM,CACtC,CAAC,IAAS,EAAE,EAAE,CACZ,IAAI,CAAC,GAAG,KAAK,gBAAgB,IAAI,IAAI,CAAC,KAAK,KAAK,gBAAgB,CACnE,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,oEAAoE;IACpE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/C,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,iCAAiC;QACjC,MAAM,cAAc,GAA0B,EAAE,CAAC;QACjD,MAAM,cAAc,GAA2B,EAAE,CAAC;QAElD,YAAY,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;YACjC,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,IAAI,OAAO,CAAC;YACjD,MAAM,aAAa,GAAG,IAAI,CAAC,Q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MAAM,QAAQ,GAAG,GAAG,KAAK,YAAY,CAAC;QACtC,MAAM,WAAW,GAAG,CAAC,WAAW,CAAC,mBAAmB,CAAC;QAErD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IAChD,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import { useMemo } from \"react\";\nimport { useSDK } from \"../core/SDKManager\";\nimport SDKManager from \"../core/SDKManager\";\nimport { IntegrationItem } from \"../types/integration\";\n\n/**\n * Hook to get all partner integrations from dashboard data\n */\nexport function usePartnerIntegrations() {\n const sdk = useSDK({});\n\n // Get dashboard data from SDK\n const dashboardData = SDKManager.getDashboardData();\n\n // Partner integrations are stored directly in the integrations field\n const integrations = useMemo(() => {\n if (!dashboardData?.integrations) {\n return [];\n }\n // Filter out Google Reviews\n return dashboardData.integrations.filter(\n (item: any) =>\n item.key !== \"google_reviews\" && item.title !== \"Google Reviews\",\n );\n }, [dashboardData]);\n\n // Group integrations by category using the API's category_key field\n const groups = useMemo(() => {\n if (!integrations || integrations.length === 0) {\n return [];\n }\n\n // Group by category_key from API\n const categoryGroups: Record<string, any[]> = {};\n const categoryTitles: Record<string, string> = {};\n \n integrations.forEach((item: any) => {\n const categoryKey = item.category_key || 'other';\n const categoryTitle = item.category || 'Other';\n \n if (!categoryGroups[categoryKey]) {\n categoryGroups[categoryKey] = [];\n categoryTitles[categoryKey] = categoryTitle;\n }\n categoryGroups[categoryKey].push(item);\n });\n\n // Get translations\n const translations = sdk.translations?.partnerIntegration || {};\n\n // Define category order and translation mapping\n const categoryOrder = ['review_sources', 'post_purchase_automation', 'seo_rich_snippets', 'developer'];\n const translationMap: Record<string, string> = {\n 'review_sources': translations.reviewSourcesTitle || 'Review Sources',\n 'post_purchase_automation': translations.postPurchaseTitle || 'Post-purchase & Automation',\n 'seo_rich_snippets': translations.seoSnippetsTitle || 'SEO & Rich Snippets',\n 'developer': (translations as any).developerTitle || 'Developer'\n };\n\n // Build groups in order\n const allGroups: Array<{\n key: string;\n title: string;\n items: any[];\n }> = [];\n \n // Add categories in preferred order first\n categoryOrder.forEach(categoryKey => {\n if (categoryGroups[categoryKey]) {\n allGroups.push({\n key: categoryKey,\n title: translationMap[categoryKey] || categoryTitles[categoryKey],\n items: categoryGroups[categoryKey]\n });\n delete categoryGroups[categoryKey];\n }\n });\n \n // Add any remaining categories (excluding 'developer' temporarily)\n Object.entries(categoryGroups).forEach(([categoryKey, items]) => {\n // Temporarily skip 'developer' category\n if (categoryKey === 'developer') {\n return;\n }\n allGroups.push({\n key: categoryKey,\n title: categoryTitles[categoryKey],\n items\n });\n });\n\n return allGroups;\n }, [integrations, sdk.translations]);\n\n return {\n groups,\n loading: sdk.dashboardLoading || false,\n error: sdk.dashboardError || null,\n integrations,\n };\n}\n\n/**\n * Hook to get a specific integration by key\n */\nexport function usePartnerIntegrationByKey(\n key: string,\n): IntegrationItem | null {\n const { integrations } = usePartnerIntegrations();\n\n return useMemo(() => {\n return integrations.find((item: any) => item.key === key) || null;\n }, [integrations, key]);\n}\n\n/**\n * Hook to get integration status\n */\nexport function usePartnerIntegrationStatus(key: string): {\n isConnected: boolean;\n isActive: boolean;\n isInstalled: boolean;\n} {\n const integration = usePartnerIntegrationByKey(key);\n\n return useMemo(() => {\n if (!integration) {\n return { isConnected: false, isActive: false, isInstalled: false };\n }\n\n // Check based on integration key and button states\n const isConnected = key === \"google_reviews\";\n const isActive = key !== \"after_ship\";\n const isInstalled = !integration.button_install_text;\n\n return { isConnected, isActive, isInstalled };\n }, [integration, key]);\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -12,13 +12,15 @@ export { PartnerIntegration } from "./components/PartnerIntegration";
12
12
  export { PartnerList } from "./components/PartnerList";
13
13
  export { FloatingCard } from "./components/FloatingCard";
14
14
  export { FloatingCardContainer } from "./components/FloatingCardContainer";
15
+ export { MarketingCampaignCard } from "./components/MarketingCampaignCard";
15
16
  export type { TopBannerProps } from "./components/TopBanner";
16
17
  export type { WhatsNewProps } from "./components/WhatsNew";
17
18
  export type { GrowAppsProps } from "./components/GrowApps";
18
19
  export type { PopupBannerProps } from "./components/PopupBanner";
19
- export type { PartnerIntegrationProps, IntegrationStatusInfo } from "./components/PartnerIntegration";
20
+ export type { PartnerIntegrationProps, IntegrationStatusInfo, } from "./components/PartnerIntegration";
20
21
  export type { PartnerListProps } from "./components/PartnerList";
21
22
  export type { FloatingCardContainerProps } from "./components/FloatingCardContainer";
23
+ export type { MarketingCampaignCardProps, MarketingCampaignData, } from "./components/MarketingCampaignCard";
22
24
  export { SDKManager } from "./core/SDKManager";
23
25
  export { useSDK } from "./core/SDKManager";
24
26
  export type { UseSDKOptions } from "./core/SDKManager";
@@ -36,6 +38,6 @@ export { CLSMonitor, startCLSMonitoring, stopCLSMonitoring, getCLSMetrics, } fro
36
38
  export type { CLSMetrics, CLSMonitorOptions } from "./utils/cls-monitor";
37
39
  export { trackCampaignView, trackCampaignClick, clearViewTrackingCache, } from "./utils/campaignTracking";
38
40
  export { getSessionId, clearSession, hasSession } from "./utils/sessionManager";
39
- export { useCampaignTracking, useCampaignVisibility } from "./hooks/useCampaignTracking";
41
+ export { useCampaignTracking, useCampaignVisibility, } from "./hooks/useCampaignTracking";
40
42
  export { useVisibleFloatingCards } from "./hooks/useFloatingCards";
41
43
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE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GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC"}
package/dist/index.js CHANGED
@@ -4,9 +4,6 @@
4
4
  * Provider-less component architecture for Shopify in-app dashboards
5
5
  * Components work standalone without any provider wrapper required
6
6
  */
7
- // ============================================
8
- // PRIMARY EXPORTS - Component-Driven API
9
- // ============================================
10
7
  // Main UI components (auto-initialize, no provider needed)
11
8
  export { TopBanner } from "./components/TopBanner";
12
9
  export { WhatsNew } from "./components/WhatsNew";
@@ -16,62 +13,17 @@ export { PartnerIntegration } from "./components/PartnerIntegration";
16
13
  export { PartnerList } from "./components/PartnerList";
17
14
  export { FloatingCard } from "./components/FloatingCard";
18
15
  export { FloatingCardContainer } from "./components/FloatingCardContainer";
16
+ export { MarketingCampaignCard } from "./components/MarketingCampaignCard";
19
17
  // FloatingCard props defined inline in component
20
- // ============================================
21
- // ADVANCED CUSTOMIZATION (Optional)
22
- // ============================================
23
18
  // SDK Manager for advanced control (rarely needed)
24
19
  export { SDKManager } from "./core/SDKManager";
25
20
  export { useSDK } from "./core/SDKManager";
26
21
  export { loadTranslations, getTranslations, normalizeLocale, SUPPORTED_LOCALES, LOCALE_METADATA, DEFAULT_LOCALE, } from "./translations/translation-manager";
27
- // ============================================
28
- // UTILITIES (Optional)
29
- // ============================================
30
22
  // CLS monitoring (for performance debugging)
31
23
  export { CLSMonitor, startCLSMonitoring, stopCLSMonitoring, getCLSMetrics, } from "./utils/cls-monitor";
32
24
  // Campaign tracking
33
25
  export { trackCampaignView, trackCampaignClick, clearViewTrackingCache, } from "./utils/campaignTracking";
34
26
  export { getSessionId, clearSession, hasSession } from "./utils/sessionManager";
35
- export { useCampaignTracking, useCampaignVisibility } from "./hooks/useCampaignTracking";
27
+ export { useCampaignTracking, useCampaignVisibility, } from "./hooks/useCampaignTracking";
36
28
  export { useVisibleFloatingCards } from "./hooks/useFloatingCards";
37
- // ============================================
38
- // RECOMMENDED USAGE
39
- // ============================================
40
- /*
41
-
42
- ✨ SIMPLE USAGE (Recommended)
43
-
44
- import { TopBanner, WhatsNew, GrowApps } from '@trustshop/shopify-inapp-components';
45
-
46
- export default function Dashboard() {
47
- return (
48
- <>
49
- <TopBanner />
50
- <WhatsNew />
51
- <GrowApps />
52
- </>
53
- );
54
- }
55
-
56
- 🎨 WITH CUSTOMIZATION
57
-
58
- import { TopBanner, WhatsNew } from '@trustshop/shopify-inapp-components';
59
-
60
- export default function Dashboard() {
61
- return (
62
- <>
63
- <TopBanner
64
- shopInfo={{ id: "12345", domain: "shop.myshopify.com" }}
65
- config={{ apiUrl: "/api/dashboard" }}
66
- onClose={() => console.log('Banner closed')}
67
- />
68
- <WhatsNew
69
- locale="fr"
70
- onProductUpdateClick={(update) => handleUpdate(update)}
71
- />
72
- </>
73
- );
74
- }
75
-
76
- */
77
29
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+CAA+C;AAC/C,yCAAyC;AACzC,+CAA+C;AAE/C,2DAA2D;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAU3E,iDAAiD;AAEjD,+CAA+C;AAC/C,oCAAoC;AACpC,+CAA+C;AAE/C,mDAAmD;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAW3C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,MAAM,oCAAoC,CAAC;AAe5C,+CAA+C;AAC/C,uBAAuB;AACvB,+CAA+C;AAE/C,6CAA6C;AAC7C,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAG7B,oBAAoB;AACpB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,+CAA+C;AAC/C,oBAAoB;AACpB,+CAA+C;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCE","sourcesContent":["/**\n * @trustshop/shopify-inapp-components\n *\n * Provider-less component architecture for Shopify in-app dashboards\n * Components work standalone without any provider wrapper required\n */\n\n// ============================================\n// PRIMARY EXPORTS - Component-Driven API\n// ============================================\n\n// Main UI components (auto-initialize, no provider needed)\nexport { TopBanner } from \"./components/TopBanner\";\nexport { WhatsNew } from \"./components/WhatsNew\";\nexport { GrowApps } from \"./components/GrowApps\";\nexport { PopupBanner } from \"./components/PopupBanner\";\nexport { PartnerIntegration } from \"./components/PartnerIntegration\";\nexport { PartnerList } from \"./components/PartnerList\";\nexport { FloatingCard } from \"./components/FloatingCard\";\nexport { FloatingCardContainer } from \"./components/FloatingCardContainer\";\n\n// Component prop types\nexport type { TopBannerProps } from \"./components/TopBanner\";\nexport type { WhatsNewProps } from \"./components/WhatsNew\";\nexport type { GrowAppsProps } from \"./components/GrowApps\";\nexport type { PopupBannerProps } from \"./components/PopupBanner\";\nexport type { PartnerIntegrationProps, IntegrationStatusInfo } from \"./components/PartnerIntegration\";\nexport type { PartnerListProps } from \"./components/PartnerList\";\nexport type { FloatingCardContainerProps } from \"./components/FloatingCardContainer\";\n// FloatingCard props defined inline in component\n\n// ============================================\n// ADVANCED CUSTOMIZATION (Optional)\n// ============================================\n\n// SDK Manager for advanced control (rarely needed)\nexport { SDKManager } from \"./core/SDKManager\";\nexport { useSDK } from \"./core/SDKManager\";\nexport type { UseSDKOptions } from \"./core/SDKManager\";\n\n// Configuration types\nexport type { ShopInfo, SDKInternalConfig } from \"./config/internal-config\";\n\n// Translation types and utilities\nexport type {\n SupportedLocale,\n SDKTranslations,\n} from \"./translations/translation-manager\";\nexport {\n loadTranslations,\n getTranslations,\n normalizeLocale,\n SUPPORTED_LOCALES,\n LOCALE_METADATA,\n DEFAULT_LOCALE,\n} from \"./translations/translation-manager\";\n\n// ============================================\n// DATA TYPES\n// ============================================\n\n// Core data types\nexport type { BannerItem } from \"./types/banner\";\nexport type { ArticleItem } from \"./types/article\";\nexport type { ProductUpdateItem } from \"./types/product-update\";\nexport type { GrowApp, DashboardConfig } from \"./types/dashboard\";\nexport type { IntegrationItem } from \"./types/integration\";\nexport type { PartnerItem } from \"./types/partner\";\nexport type { FloatingCardData } from \"./components/FloatingCard\";\n\n// ============================================\n// UTILITIES (Optional)\n// ============================================\n\n// CLS monitoring (for performance debugging)\nexport {\n CLSMonitor,\n startCLSMonitoring,\n stopCLSMonitoring,\n getCLSMetrics,\n} from \"./utils/cls-monitor\";\nexport type { CLSMetrics, CLSMonitorOptions } from \"./utils/cls-monitor\";\n\n// Campaign tracking\nexport {\n trackCampaignView,\n trackCampaignClick,\n clearViewTrackingCache,\n} from \"./utils/campaignTracking\";\nexport { getSessionId, clearSession, hasSession } from \"./utils/sessionManager\";\nexport { useCampaignTracking, useCampaignVisibility } from \"./hooks/useCampaignTracking\";\nexport { useVisibleFloatingCards } from \"./hooks/useFloatingCards\";\n\n\n// ============================================\n// RECOMMENDED USAGE\n// ============================================\n\n/*\n\n✨ SIMPLE USAGE (Recommended)\n\nimport { TopBanner, WhatsNew, GrowApps } from '@trustshop/shopify-inapp-components';\n\nexport default function Dashboard() {\n return (\n <>\n <TopBanner />\n <WhatsNew />\n <GrowApps />\n </>\n );\n}\n\n🎨 WITH CUSTOMIZATION\n\nimport { TopBanner, WhatsNew } from '@trustshop/shopify-inapp-components';\n\nexport default function Dashboard() {\n return (\n <>\n <TopBanner \n shopInfo={{ id: \"12345\", domain: \"shop.myshopify.com\" }}\n config={{ apiUrl: \"/api/dashboard\" }}\n onClose={() => console.log('Banner closed')}\n />\n <WhatsNew \n locale=\"fr\"\n onProductUpdateClick={(update) => handleUpdate(update)}\n />\n </>\n );\n}\n\n*/\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,2DAA2D;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAiB3E,iDAAiD;AAEjD,mDAAmD;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAW3C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,MAAM,oCAAoC,CAAC;AAW5C,6CAA6C;AAC7C,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAG7B,oBAAoB;AACpB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["/**\n * @trustshop/shopify-inapp-components\n *\n * Provider-less component architecture for Shopify in-app dashboards\n * Components work standalone without any provider wrapper required\n */\n\n// Main UI components (auto-initialize, no provider needed)\nexport { TopBanner } from \"./components/TopBanner\";\nexport { WhatsNew } from \"./components/WhatsNew\";\nexport { GrowApps } from \"./components/GrowApps\";\nexport { PopupBanner } from \"./components/PopupBanner\";\nexport { PartnerIntegration } from \"./components/PartnerIntegration\";\nexport { PartnerList } from \"./components/PartnerList\";\nexport { FloatingCard } from \"./components/FloatingCard\";\nexport { FloatingCardContainer } from \"./components/FloatingCardContainer\";\nexport { MarketingCampaignCard } from \"./components/MarketingCampaignCard\";\n\n// Component prop types\nexport type { TopBannerProps } from \"./components/TopBanner\";\nexport type { WhatsNewProps } from \"./components/WhatsNew\";\nexport type { GrowAppsProps } from \"./components/GrowApps\";\nexport type { PopupBannerProps } from \"./components/PopupBanner\";\nexport type {\n PartnerIntegrationProps,\n IntegrationStatusInfo,\n} from \"./components/PartnerIntegration\";\nexport type { PartnerListProps } from \"./components/PartnerList\";\nexport type { FloatingCardContainerProps } from \"./components/FloatingCardContainer\";\nexport type {\n MarketingCampaignCardProps,\n MarketingCampaignData,\n} from \"./components/MarketingCampaignCard\";\n// FloatingCard props defined inline in component\n\n// SDK Manager for advanced control (rarely needed)\nexport { SDKManager } from \"./core/SDKManager\";\nexport { useSDK } from \"./core/SDKManager\";\nexport type { UseSDKOptions } from \"./core/SDKManager\";\n\n// Configuration types\nexport type { ShopInfo, SDKInternalConfig } from \"./config/internal-config\";\n\n// Translation types and utilities\nexport type {\n SupportedLocale,\n SDKTranslations,\n} from \"./translations/translation-manager\";\nexport {\n loadTranslations,\n getTranslations,\n normalizeLocale,\n SUPPORTED_LOCALES,\n LOCALE_METADATA,\n DEFAULT_LOCALE,\n} from \"./translations/translation-manager\";\n\n// Core data types\nexport type { BannerItem } from \"./types/banner\";\nexport type { ArticleItem } from \"./types/article\";\nexport type { ProductUpdateItem } from \"./types/product-update\";\nexport type { GrowApp, DashboardConfig } from \"./types/dashboard\";\nexport type { IntegrationItem } from \"./types/integration\";\nexport type { PartnerItem } from \"./types/partner\";\nexport type { FloatingCardData } from \"./components/FloatingCard\";\n\n// CLS monitoring (for performance debugging)\nexport {\n CLSMonitor,\n startCLSMonitoring,\n stopCLSMonitoring,\n getCLSMetrics,\n} from \"./utils/cls-monitor\";\nexport type { CLSMetrics, CLSMonitorOptions } from \"./utils/cls-monitor\";\n\n// Campaign tracking\nexport {\n trackCampaignView,\n trackCampaignClick,\n clearViewTrackingCache,\n} from \"./utils/campaignTracking\";\nexport { getSessionId, clearSession, hasSession } from \"./utils/sessionManager\";\nexport {\n useCampaignTracking,\n useCampaignVisibility,\n} from \"./hooks/useCampaignTracking\";\nexport { useVisibleFloatingCards } from \"./hooks/useFloatingCards\";\n"]}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Campaign API Cache Manager
3
+ * Prevents multiple identical API calls and caches responses
4
+ */
5
+ declare class CampaignCacheManager {
6
+ private cache;
7
+ private readonly CACHE_DURATION;
8
+ private readonly DEDUPE_WINDOW;
9
+ /**
10
+ * Get cache key for campaigns
11
+ */
12
+ private getCacheKey;
13
+ /**
14
+ * Check if cache entry is still valid
15
+ */
16
+ private isValidCache;
17
+ /**
18
+ * Fetch campaigns with caching and deduplication
19
+ */
20
+ fetchCampaigns(shopId: string, locale: string, apiUrl: string, headers?: HeadersInit): Promise<any>;
21
+ /**
22
+ * Perform the actual fetch
23
+ */
24
+ private performFetch;
25
+ /**
26
+ * Clear cache for specific shop or all
27
+ */
28
+ clearCache(shopId?: string, locale?: string): void;
29
+ /**
30
+ * Get current cache size
31
+ */
32
+ getCacheSize(): number;
33
+ /**
34
+ * Debug: Get all cache keys
35
+ */
36
+ getCacheKeys(): string[];
37
+ }
38
+ export declare const campaignCache: CampaignCacheManager;
39
+ export default CampaignCacheManager;
40
+ //# sourceMappingURL=campaignCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaignCache.d.ts","sourceRoot":"","sources":["../../src/utils/campaignCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,cAAM,oBAAoB;IACxB,OAAO,CAAC,KAAK,CAAiC;IAC9C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAO;IAErC;;OAEG;IACH,OAAO,CAAC,WAAW;IAInB;;OAEG;IACH,OAAO,CAAC,YAAY;IAIpB;;OAEG;IACG,cAAc,CAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,GAAG,CAAC;IAkDf;;OAEG;YACW,YAAY;IAuB1B;;OAEG;IACH,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAWlD;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,YAAY,IAAI,MAAM,EAAE;CAGzB;AAGD,eAAO,MAAM,aAAa,sBAA6B,CAAC;AAGxD,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Campaign API Cache Manager
3
+ * Prevents multiple identical API calls and caches responses
4
+ */
5
+ class CampaignCacheManager {
6
+ constructor() {
7
+ this.cache = new Map();
8
+ this.CACHE_DURATION = 5 * 60 * 1000; // 5 minutes
9
+ this.DEDUPE_WINDOW = 100; // 100ms window for deduplication
10
+ }
11
+ /**
12
+ * Get cache key for campaigns
13
+ */
14
+ getCacheKey(shopId, locale) {
15
+ return `campaigns_${shopId}_${locale}`;
16
+ }
17
+ /**
18
+ * Check if cache entry is still valid
19
+ */
20
+ isValidCache(entry) {
21
+ return Date.now() - entry.timestamp < this.CACHE_DURATION;
22
+ }
23
+ /**
24
+ * Fetch campaigns with caching and deduplication
25
+ */
26
+ async fetchCampaigns(shopId, locale, apiUrl, headers = {}) {
27
+ const cacheKey = this.getCacheKey(shopId, locale);
28
+ const cached = this.cache.get(cacheKey);
29
+ // Return cached data if valid
30
+ if (cached && this.isValidCache(cached)) {
31
+ // console.log("[CampaignCache] Returning cached data for", cacheKey);
32
+ return cached.data;
33
+ }
34
+ // Check if there's an ongoing request for the same data
35
+ if (cached?.promise) {
36
+ // console.log("[CampaignCache] Reusing ongoing request for", cacheKey);
37
+ return cached.promise;
38
+ }
39
+ // Create new request promise
40
+ const promise = this.performFetch(apiUrl, headers)
41
+ .then((data) => {
42
+ this.cache.set(cacheKey, {
43
+ data,
44
+ timestamp: Date.now(),
45
+ });
46
+ // console.log("[CampaignCache] Cached new data for", cacheKey);
47
+ return data;
48
+ })
49
+ .catch((error) => {
50
+ // Remove failed request from cache
51
+ this.cache.delete(cacheKey);
52
+ throw error;
53
+ });
54
+ // Store the promise temporarily for deduplication
55
+ this.cache.set(cacheKey, {
56
+ data: cached?.data,
57
+ timestamp: cached?.timestamp || 0,
58
+ promise,
59
+ });
60
+ // Clean up promise after deduplication window
61
+ setTimeout(() => {
62
+ const entry = this.cache.get(cacheKey);
63
+ if (entry?.promise === promise) {
64
+ delete entry.promise;
65
+ }
66
+ }, this.DEDUPE_WINDOW);
67
+ return promise;
68
+ }
69
+ /**
70
+ * Perform the actual fetch
71
+ */
72
+ async performFetch(apiUrl, headers) {
73
+ // console.log("[CampaignCache] Fetching from API:", apiUrl);
74
+ const response = await fetch(apiUrl, {
75
+ method: "GET",
76
+ headers: {
77
+ Accept: "application/json",
78
+ "Content-Type": "application/json",
79
+ ...headers,
80
+ },
81
+ credentials: "include",
82
+ });
83
+ if (!response.ok) {
84
+ throw new Error(`Failed to fetch campaigns: ${response.statusText}`);
85
+ }
86
+ return response.json();
87
+ }
88
+ /**
89
+ * Clear cache for specific shop or all
90
+ */
91
+ clearCache(shopId, locale) {
92
+ if (shopId && locale) {
93
+ const cacheKey = this.getCacheKey(shopId, locale);
94
+ this.cache.delete(cacheKey);
95
+ // console.log("[CampaignCache] Cleared cache for", cacheKey);
96
+ }
97
+ else {
98
+ this.cache.clear();
99
+ // console.log("[CampaignCache] Cleared all cache");
100
+ }
101
+ }
102
+ /**
103
+ * Get current cache size
104
+ */
105
+ getCacheSize() {
106
+ return this.cache.size;
107
+ }
108
+ /**
109
+ * Debug: Get all cache keys
110
+ */
111
+ getCacheKeys() {
112
+ return Array.from(this.cache.keys());
113
+ }
114
+ }
115
+ // Export singleton instance
116
+ export const campaignCache = new CampaignCacheManager();
117
+ // Export for testing
118
+ export default CampaignCacheManager;
119
+ //# sourceMappingURL=campaignCache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaignCache.js","sourceRoot":"","sources":["../../src/utils/campaignCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,oBAAoB;IAA1B;QACU,UAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;QAC7B,mBAAc,GAAG,CAAC,GAAG,EAAE,GAAG,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AC,CAAC;YAClD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC5B,8DAA8D;QAChE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACnB,oDAAoD;QACtD,CAAC;IACH,CAAC;IAED;;OAEG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,YAAY;QACV,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC;CACF;AAED,4BAA4B;AAC5B,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAExD,qBAAqB;AACrB,eAAe,oBAAoB,CAAC","sourcesContent":["/**\n * Campaign API Cache Manager\n * Prevents multiple identical API calls and caches responses\n */\n\ninterface CacheEntry {\n data: any;\n timestamp: number;\n promise?: Promise<any>;\n}\n\nclass CampaignCacheManager {\n private cache = new Map<string, CacheEntry>();\n private readonly CACHE_DURATION = 5 * 60 * 1000; // 5 minutes\n private readonly DEDUPE_WINDOW = 100; // 100ms window for deduplication\n\n /**\n * Get cache key for campaigns\n */\n private getCacheKey(shopId: string, locale: string): string {\n return `campaigns_${shopId}_${locale}`;\n }\n\n /**\n * Check if cache entry is still valid\n */\n private isValidCache(entry: CacheEntry): boolean {\n return Date.now() - entry.timestamp < this.CACHE_DURATION;\n }\n\n /**\n * Fetch campaigns with caching and deduplication\n */\n async fetchCampaigns(\n shopId: string,\n locale: string,\n apiUrl: string,\n headers: HeadersInit = {},\n ): Promise<any> {\n const cacheKey = this.getCacheKey(shopId, locale);\n const cached = this.cache.get(cacheKey);\n\n // Return cached data if valid\n if (cached && this.isValidCache(cached)) {\n // console.log(\"[CampaignCache] Returning cached data for\", cacheKey);\n return cached.data;\n }\n\n // Check if there's an ongoing request for the same data\n if (cached?.promise) {\n // console.log(\"[CampaignCache] Reusing ongoing request for\", cacheKey);\n return cached.promise;\n }\n\n // Create new request promise\n const promise = this.performFetch(apiUrl, headers)\n .then((data) => {\n this.cache.set(cacheKey, {\n data,\n timestamp: Date.now(),\n });\n // console.log(\"[CampaignCache] Cached new data for\", cacheKey);\n return data;\n })\n .catch((error) => {\n // Remove failed request from cache\n this.cache.delete(cacheKey);\n throw error;\n });\n\n // Store the promise temporarily for deduplication\n this.cache.set(cacheKey, {\n data: cached?.data,\n timestamp: cached?.timestamp || 0,\n promise,\n });\n\n // Clean up promise after deduplication window\n setTimeout(() => {\n const entry = this.cache.get(cacheKey);\n if (entry?.promise === promise) {\n delete entry.promise;\n }\n }, this.DEDUPE_WINDOW);\n\n return promise;\n }\n\n /**\n * Perform the actual fetch\n */\n private async performFetch(\n apiUrl: string,\n headers: HeadersInit,\n ): Promise<any> {\n // console.log(\"[CampaignCache] Fetching from API:\", apiUrl);\n\n const response = await fetch(apiUrl, {\n method: \"GET\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n ...headers,\n },\n credentials: \"include\",\n });\n\n if (!response.ok) {\n throw new Error(`Failed to fetch campaigns: ${response.statusText}`);\n }\n\n return response.json();\n }\n\n /**\n * Clear cache for specific shop or all\n */\n clearCache(shopId?: string, locale?: string): void {\n if (shopId && locale) {\n const cacheKey = this.getCacheKey(shopId, locale);\n this.cache.delete(cacheKey);\n // console.log(\"[CampaignCache] Cleared cache for\", cacheKey);\n } else {\n this.cache.clear();\n // console.log(\"[CampaignCache] Cleared all cache\");\n }\n }\n\n /**\n * Get current cache size\n */\n getCacheSize(): number {\n return this.cache.size;\n }\n\n /**\n * Debug: Get all cache keys\n */\n getCacheKeys(): string[] {\n return Array.from(this.cache.keys());\n }\n}\n\n// Export singleton instance\nexport const campaignCache = new CampaignCacheManager();\n\n// Export for testing\nexport default CampaignCacheManager;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datlv-trustshop/shopify-inapp-components",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "private": false,
5
5
  "description": "React TypeScript components for Shopify in-app dashboard content",
6
6
  "main": "dist/index.js",
@@ -1,91 +0,0 @@
1
- import { DashboardEngine } from "./engine";
2
- import { DashboardConfig, DashboardState } from "../types";
3
- /**
4
- * GlobalDashboardManager - Singleton manager for shared SDK state
5
- *
6
- * This manager ensures all DashboardProvider instances share:
7
- * - The same engine instance
8
- * - The same data/cache
9
- * - The same locale state
10
- * - Deduplicated API calls
11
- *
12
- * Multiple providers can mount/unmount independently while maintaining
13
- * a stable, shared runtime.
14
- */
15
- export declare class GlobalDashboardManager {
16
- private static instance;
17
- private engine;
18
- private providers;
19
- private stateListeners;
20
- private globalState;
21
- private initPromise;
22
- private lastConfig;
23
- private pendingLocaleRefresh;
24
- private constructor();
25
- static getInstance(): GlobalDashboardManager;
26
- /**
27
- * Register a provider instance
28
- */
29
- registerProvider(id: string, config?: DashboardConfig, autoRefreshOnLocaleChange?: boolean): void;
30
- /**
31
- * Unregister a provider instance
32
- */
33
- unregisterProvider(id: string): void;
34
- /**
35
- * Get or create the shared engine instance
36
- */
37
- private getOrCreateEngine;
38
- /**
39
- * Update the global configuration
40
- */
41
- private updateGlobalConfig;
42
- /**
43
- * Check if two configs are equal
44
- */
45
- private configEquals;
46
- /**
47
- * Initialize the shared engine
48
- */
49
- init(config?: DashboardConfig): Promise<void>;
50
- /**
51
- * Refresh the dashboard data
52
- */
53
- refresh(): Promise<void>;
54
- /**
55
- * Update locale globally
56
- */
57
- setLocale(locale: string): Promise<void>;
58
- /**
59
- * Get the current locale
60
- */
61
- getCurrentLocale(): string;
62
- /**
63
- * Subscribe to global state changes
64
- */
65
- subscribe(id: string, callback: (state: DashboardState) => void): () => void;
66
- /**
67
- * Update and broadcast global state
68
- */
69
- private updateGlobalState;
70
- /**
71
- * Get the current global state
72
- */
73
- getState(): DashboardState;
74
- /**
75
- * Get the shared engine instance (if created)
76
- */
77
- getEngine(): DashboardEngine | null;
78
- /**
79
- * Check if manager is initialized
80
- */
81
- isInitialized(): boolean;
82
- /**
83
- * Get provider count
84
- */
85
- getProviderCount(): number;
86
- /**
87
- * Reset the global manager (for testing)
88
- */
89
- static reset(): void;
90
- }
91
- //# sourceMappingURL=global-manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"global-manager.d.ts","sourceRoot":"","sources":["../../src/core/global-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAc3D;;;;;;;;;;;GAWG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAuC;IAC9D,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,SAAS,CAAwC;IACzD,OAAO,CAAC,cAAc,CAAuC;IAC7D,OAAO,CAAC,WAAW,CAKjB;IACF,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,oBAAoB,CAAuB;IAEnD,OAAO;WAIO,WAAW,IAAI,sBAAsB;IAOnD;;OAEG;IACI,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,yBAAyB,GAAE,OAAe,GAAG,IAAI;IA8B/G;;OAEG;IACI,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAW3C;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAsBzB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAwC1B;;OAEG;IACH,OAAO,CAAC,YAAY;IAWpB;;OAEG;IACU,IAAI,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAoD1D;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAgCrC;;OAEG;IACU,SAAS,CAAC,MAAM,EAAE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