@bikdotai/bik-component-library 0.0.725-beta.0 → 0.0.725-beta.10

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 (155) hide show
  1. package/dist/cjs/assets/icons/searchIcon.svg.js +1 -0
  2. package/dist/cjs/assets/icons/whatsNew.svg.js +1 -0
  3. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +0 -1
  4. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  5. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
  6. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +1 -5
  7. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
  8. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.styles.d.ts +0 -6
  9. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.styles.js +2 -23
  10. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraphModel.d.ts +0 -12
  11. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.d.ts +4 -0
  12. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +1 -0
  13. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.d.ts +4 -0
  14. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +1 -0
  15. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.d.ts +4 -0
  16. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js +1 -0
  17. package/dist/cjs/components/feature-announcements/VideoModal.d.ts +3 -0
  18. package/dist/cjs/components/feature-announcements/VideoModal.js +1 -0
  19. package/dist/cjs/components/feature-announcements/constants/animations.d.ts +27 -0
  20. package/dist/cjs/components/feature-announcements/constants/animations.js +1 -0
  21. package/dist/cjs/components/feature-announcements/constants/dimensions.d.ts +56 -0
  22. package/dist/cjs/components/feature-announcements/constants/dimensions.js +1 -0
  23. package/dist/cjs/components/feature-announcements/constants/index.d.ts +19 -0
  24. package/dist/cjs/components/feature-announcements/constants/index.js +1 -0
  25. package/dist/cjs/components/feature-announcements/constants/localStorageKeys.d.ts +18 -0
  26. package/dist/cjs/components/feature-announcements/constants/localStorageKeys.js +1 -0
  27. package/dist/cjs/components/feature-announcements/constants/selectors.d.ts +21 -0
  28. package/dist/cjs/components/feature-announcements/constants/selectors.js +1 -0
  29. package/dist/cjs/components/feature-announcements/constants/zIndex.d.ts +10 -0
  30. package/dist/cjs/components/feature-announcements/constants/zIndex.js +1 -0
  31. package/dist/cjs/components/feature-announcements/hooks/index.d.ts +1 -0
  32. package/dist/cjs/components/feature-announcements/hooks/useFeatureAnnouncements.d.ts +13 -0
  33. package/dist/cjs/components/feature-announcements/hooks/useFeatureAnnouncements.js +1 -0
  34. package/dist/cjs/components/feature-announcements/index.d.ts +7 -0
  35. package/dist/cjs/components/feature-announcements/styles/index.d.ts +4 -0
  36. package/dist/cjs/components/feature-announcements/styles/joyride.styles.d.ts +125 -0
  37. package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.d.ts +23 -0
  38. package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.js +1 -0
  39. package/dist/cjs/components/feature-announcements/styles/minorPopup.styles.d.ts +16 -0
  40. package/dist/cjs/components/feature-announcements/styles/minorPopup.styles.js +1 -0
  41. package/dist/cjs/components/feature-announcements/styles/videoModal.styles.d.ts +13 -0
  42. package/dist/cjs/components/feature-announcements/styles/videoModal.styles.js +1 -0
  43. package/dist/cjs/components/feature-announcements/types/feature.types.d.ts +41 -0
  44. package/dist/cjs/components/feature-announcements/types/index.d.ts +4 -0
  45. package/dist/cjs/components/feature-announcements/types/props.types.d.ts +43 -0
  46. package/dist/cjs/components/feature-announcements/types/repository.types.d.ts +11 -0
  47. package/dist/cjs/components/feature-announcements/types/router.types.d.ts +7 -0
  48. package/dist/cjs/components/feature-announcements/useFeatureAnnouncements.d.ts +13 -0
  49. package/dist/cjs/components/feature-announcements/utils/animationHelpers.d.ts +18 -0
  50. package/dist/cjs/components/feature-announcements/utils/animationHelpers.js +1 -0
  51. package/dist/cjs/components/feature-announcements/utils/elementHelpers.d.ts +30 -0
  52. package/dist/cjs/components/feature-announcements/utils/elementHelpers.js +1 -0
  53. package/dist/cjs/components/feature-announcements/utils/htmlHelpers.d.ts +18 -0
  54. package/dist/cjs/components/feature-announcements/utils/htmlHelpers.js +1 -0
  55. package/dist/cjs/components/feature-announcements/utils/index.d.ts +3 -0
  56. package/dist/cjs/components/product-picker-v2/collectionScreen.d.ts +2 -0
  57. package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
  58. package/dist/cjs/components/product-picker-v2/modal.js +1 -1
  59. package/dist/cjs/components/product-picker-v2/searchScreen.d.ts +2 -0
  60. package/dist/cjs/components/product-picker-v2/searchScreen.js +1 -1
  61. package/dist/cjs/components/whats-new/WhatsNew.d.ts +23 -0
  62. package/dist/cjs/components/whats-new/WhatsNew.js +1 -0
  63. package/dist/cjs/components/whats-new/WhatsNew.styles.d.ts +11 -0
  64. package/dist/cjs/components/whats-new/WhatsNew.styles.js +185 -0
  65. package/dist/cjs/components/whats-new/WhatsNew.types.d.ts +58 -0
  66. package/dist/cjs/components/whats-new/WhatsNewButton.d.ts +3 -0
  67. package/dist/cjs/components/whats-new/WhatsNewButton.js +1 -0
  68. package/dist/cjs/components/whats-new/WhatsNewPanel.d.ts +3 -0
  69. package/dist/cjs/components/whats-new/WhatsNewPanel.js +1 -0
  70. package/dist/cjs/components/whats-new/WhatsNewProvider.d.ts +4 -0
  71. package/dist/cjs/components/whats-new/WhatsNewProvider.js +1 -0
  72. package/dist/cjs/components/whats-new/index.d.ts +7 -0
  73. package/dist/cjs/components/whats-new/useWhatsNew.d.ts +9 -0
  74. package/dist/cjs/components/whats-new/useWhatsNew.js +1 -0
  75. package/dist/cjs/index.d.ts +2 -0
  76. package/dist/cjs/index.js +1 -1
  77. package/dist/esm/assets/icons/searchIcon.svg.js +1 -0
  78. package/dist/esm/assets/icons/whatsNew.svg.js +1 -0
  79. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +0 -1
  80. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  81. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
  82. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +1 -5
  83. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
  84. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.styles.d.ts +0 -6
  85. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.styles.js +3 -24
  86. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraphModel.d.ts +0 -12
  87. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.d.ts +4 -0
  88. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +1 -0
  89. package/dist/esm/components/feature-announcements/MajorUpdatePopup.d.ts +4 -0
  90. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +1 -0
  91. package/dist/esm/components/feature-announcements/MinorUpdatePopup.d.ts +4 -0
  92. package/dist/esm/components/feature-announcements/MinorUpdatePopup.js +1 -0
  93. package/dist/esm/components/feature-announcements/VideoModal.d.ts +3 -0
  94. package/dist/esm/components/feature-announcements/VideoModal.js +1 -0
  95. package/dist/esm/components/feature-announcements/constants/animations.d.ts +27 -0
  96. package/dist/esm/components/feature-announcements/constants/animations.js +1 -0
  97. package/dist/esm/components/feature-announcements/constants/dimensions.d.ts +56 -0
  98. package/dist/esm/components/feature-announcements/constants/dimensions.js +1 -0
  99. package/dist/esm/components/feature-announcements/constants/index.d.ts +19 -0
  100. package/dist/esm/components/feature-announcements/constants/index.js +1 -0
  101. package/dist/esm/components/feature-announcements/constants/localStorageKeys.d.ts +18 -0
  102. package/dist/esm/components/feature-announcements/constants/localStorageKeys.js +1 -0
  103. package/dist/esm/components/feature-announcements/constants/selectors.d.ts +21 -0
  104. package/dist/esm/components/feature-announcements/constants/selectors.js +1 -0
  105. package/dist/esm/components/feature-announcements/constants/zIndex.d.ts +10 -0
  106. package/dist/esm/components/feature-announcements/constants/zIndex.js +1 -0
  107. package/dist/esm/components/feature-announcements/hooks/index.d.ts +1 -0
  108. package/dist/esm/components/feature-announcements/hooks/useFeatureAnnouncements.d.ts +13 -0
  109. package/dist/esm/components/feature-announcements/hooks/useFeatureAnnouncements.js +1 -0
  110. package/dist/esm/components/feature-announcements/index.d.ts +7 -0
  111. package/dist/esm/components/feature-announcements/styles/index.d.ts +4 -0
  112. package/dist/esm/components/feature-announcements/styles/joyride.styles.d.ts +125 -0
  113. package/dist/esm/components/feature-announcements/styles/majorPopup.styles.d.ts +23 -0
  114. package/dist/esm/components/feature-announcements/styles/majorPopup.styles.js +1 -0
  115. package/dist/esm/components/feature-announcements/styles/minorPopup.styles.d.ts +16 -0
  116. package/dist/esm/components/feature-announcements/styles/minorPopup.styles.js +1 -0
  117. package/dist/esm/components/feature-announcements/styles/videoModal.styles.d.ts +13 -0
  118. package/dist/esm/components/feature-announcements/styles/videoModal.styles.js +1 -0
  119. package/dist/esm/components/feature-announcements/types/feature.types.d.ts +41 -0
  120. package/dist/esm/components/feature-announcements/types/index.d.ts +4 -0
  121. package/dist/esm/components/feature-announcements/types/props.types.d.ts +43 -0
  122. package/dist/esm/components/feature-announcements/types/repository.types.d.ts +11 -0
  123. package/dist/esm/components/feature-announcements/types/router.types.d.ts +7 -0
  124. package/dist/esm/components/feature-announcements/useFeatureAnnouncements.d.ts +13 -0
  125. package/dist/esm/components/feature-announcements/utils/animationHelpers.d.ts +18 -0
  126. package/dist/esm/components/feature-announcements/utils/animationHelpers.js +1 -0
  127. package/dist/esm/components/feature-announcements/utils/elementHelpers.d.ts +30 -0
  128. package/dist/esm/components/feature-announcements/utils/elementHelpers.js +1 -0
  129. package/dist/esm/components/feature-announcements/utils/htmlHelpers.d.ts +18 -0
  130. package/dist/esm/components/feature-announcements/utils/htmlHelpers.js +1 -0
  131. package/dist/esm/components/feature-announcements/utils/index.d.ts +3 -0
  132. package/dist/esm/components/product-picker-v2/collectionScreen.d.ts +2 -0
  133. package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
  134. package/dist/esm/components/product-picker-v2/modal.js +1 -1
  135. package/dist/esm/components/product-picker-v2/searchScreen.d.ts +2 -0
  136. package/dist/esm/components/product-picker-v2/searchScreen.js +1 -1
  137. package/dist/esm/components/whats-new/WhatsNew.d.ts +23 -0
  138. package/dist/esm/components/whats-new/WhatsNew.js +1 -0
  139. package/dist/esm/components/whats-new/WhatsNew.styles.d.ts +11 -0
  140. package/dist/esm/components/whats-new/WhatsNew.styles.js +185 -0
  141. package/dist/esm/components/whats-new/WhatsNew.types.d.ts +58 -0
  142. package/dist/esm/components/whats-new/WhatsNewButton.d.ts +3 -0
  143. package/dist/esm/components/whats-new/WhatsNewButton.js +1 -0
  144. package/dist/esm/components/whats-new/WhatsNewPanel.d.ts +3 -0
  145. package/dist/esm/components/whats-new/WhatsNewPanel.js +1 -0
  146. package/dist/esm/components/whats-new/WhatsNewProvider.d.ts +4 -0
  147. package/dist/esm/components/whats-new/WhatsNewProvider.js +1 -0
  148. package/dist/esm/components/whats-new/index.d.ts +7 -0
  149. package/dist/esm/components/whats-new/useWhatsNew.d.ts +9 -0
  150. package/dist/esm/components/whats-new/useWhatsNew.js +1 -0
  151. package/dist/esm/index.d.ts +2 -0
  152. package/dist/esm/index.js +1 -1
  153. package/package.json +2 -1
  154. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraphModel.js +0 -1
  155. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraphModel.js +0 -1
@@ -0,0 +1,125 @@
1
+ export declare const majorStepStyles: {
2
+ tooltip: {
3
+ padding: number;
4
+ backgroundColor: string;
5
+ borderRadius: string;
6
+ border: string;
7
+ filter: string;
8
+ boxShadow: string;
9
+ };
10
+ tooltipContent: {
11
+ padding: number;
12
+ };
13
+ buttonNext: {
14
+ display: string;
15
+ };
16
+ buttonBack: {
17
+ display: string;
18
+ };
19
+ buttonClose: {
20
+ display: string;
21
+ };
22
+ buttonSkip: {
23
+ display: string;
24
+ };
25
+ };
26
+ export declare const minorStepStyles: {
27
+ tooltip: {
28
+ padding: number;
29
+ backgroundColor: string;
30
+ borderRadius: "4px";
31
+ border: string;
32
+ filter: string;
33
+ boxShadow: string;
34
+ };
35
+ tooltipContent: {
36
+ padding: number;
37
+ };
38
+ buttonNext: {
39
+ display: string;
40
+ };
41
+ buttonBack: {
42
+ display: string;
43
+ };
44
+ buttonClose: {
45
+ display: string;
46
+ };
47
+ buttonSkip: {
48
+ display: string;
49
+ };
50
+ };
51
+ export declare const getMajorJoyrideStyles: (isClosing: boolean) => {
52
+ options: {
53
+ arrowColor: string;
54
+ backgroundColor: string;
55
+ overlayColor: string;
56
+ primaryColor: string;
57
+ textColor: string;
58
+ zIndex: 10000;
59
+ };
60
+ tooltip: {
61
+ padding: number;
62
+ backgroundColor: string;
63
+ borderRadius: string;
64
+ border: string;
65
+ filter: string;
66
+ boxShadow: string;
67
+ position: "fixed";
68
+ top: string;
69
+ left: string;
70
+ transform: string;
71
+ };
72
+ tooltipContent: {
73
+ padding: number;
74
+ };
75
+ buttonNext: {
76
+ display: string;
77
+ };
78
+ buttonBack: {
79
+ display: string;
80
+ };
81
+ buttonClose: {
82
+ display: string;
83
+ };
84
+ buttonSkip: {
85
+ display: string;
86
+ };
87
+ };
88
+ export declare const getMinorJoyrideStyles: (isClosing: boolean) => {
89
+ options: {
90
+ arrowColor: string;
91
+ backgroundColor: string;
92
+ overlayColor: string;
93
+ primaryColor: string;
94
+ textColor: string;
95
+ zIndex: 10000;
96
+ };
97
+ spotlight: {
98
+ boxShadow: string;
99
+ borderRadius: "8px";
100
+ };
101
+ tooltip: {
102
+ padding: number;
103
+ backgroundColor: string;
104
+ borderRadius: "4px";
105
+ border: string;
106
+ filter: string;
107
+ boxShadow: string;
108
+ maxWidth: string;
109
+ };
110
+ tooltipContent: {
111
+ padding: number;
112
+ };
113
+ buttonNext: {
114
+ display: string;
115
+ };
116
+ buttonBack: {
117
+ display: string;
118
+ };
119
+ buttonClose: {
120
+ display: string;
121
+ };
122
+ buttonSkip: {
123
+ display: string;
124
+ };
125
+ };
@@ -0,0 +1,23 @@
1
+ import { CSSProperties } from 'react';
2
+ export declare const getMajorPopupStyles: (startAnimation: boolean, transform: string) => {
3
+ container: CSSProperties;
4
+ skipButton: {
5
+ base: CSSProperties;
6
+ hover: CSSProperties;
7
+ };
8
+ imageContainer: CSSProperties;
9
+ image: CSSProperties;
10
+ imagePlaceholder: CSSProperties;
11
+ contentContainer: CSSProperties;
12
+ title: CSSProperties;
13
+ content: CSSProperties;
14
+ exploreButton: {
15
+ base: CSSProperties;
16
+ hover: CSSProperties;
17
+ };
18
+ navigationContainer: CSSProperties;
19
+ navigationButton: (disabled: boolean) => {
20
+ base: CSSProperties;
21
+ hover: CSSProperties;
22
+ };
23
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../constants/Theme.js"),t=require("../constants/animations.js"),n=require("../constants/dimensions.js"),i=require("../constants/zIndex.js");exports.getMajorPopupStyles=(o,r)=>({container:{width:`${n.POPUP_DIMENSIONS.MAJOR.width}px`,height:`${n.POPUP_DIMENSIONS.MAJOR.height}px`,display:"flex",backgroundColor:e.BASE_COLORS.grayscale[900],borderRadius:n.BORDER_RADIUS.POPUP,overflow:"hidden",position:"relative",transform:o?r:"scale(1)",opacity:o?0:1,transition:t.POPUP_TRANSITION},skipButton:{base:{position:"absolute",top:n.SPACING.MAJOR.skipButtonTop,right:n.SPACING.MAJOR.skipButtonRight,background:"transparent",border:"none",color:e.BASE_COLORS.grayscale[400],fontSize:"14px",fontWeight:"500",cursor:"pointer",zIndex:i.Z_INDEX.SKIP_BUTTON,transition:"all 0.2s"},hover:{backgroundColor:e.BASE_COLORS.grayscale[100],color:e.BASE_COLORS.grayscale[700]}},imageContainer:{backgroundColor:e.BASE_COLORS.grayscale[900],width:`${n.POPUP_DIMENSIONS.MAJOR.imageWidth}px`,height:`${n.POPUP_DIMENSIONS.MAJOR.imageHeight}px`,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",padding:n.SPACING.MAJOR.imagePadding},image:{width:`${n.POPUP_DIMENSIONS.MAJOR.imageInnerWidth}px`,height:`${n.POPUP_DIMENSIONS.MAJOR.imageInnerHeight}px`,objectFit:"cover"},imagePlaceholder:{color:e.BASE_COLORS.grayscale[500],fontSize:"14px",textAlign:"center",width:`${n.POPUP_DIMENSIONS.MAJOR.imagePlaceholderWidth}px`,height:`${n.POPUP_DIMENSIONS.MAJOR.imagePlaceholderHeight}px`,display:"flex",alignItems:"center",justifyContent:"center"},contentContainer:{flex:1,display:"flex",margin:n.SPACING.MAJOR.contentMargin,flexDirection:"column",justifyContent:"space-between",background:"transparent"},title:{fontSize:"16px",fontWeight:"600",padding:n.SPACING.MAJOR.titlePadding,color:e.BASE_COLORS.grayscale.white,lineHeight:"1.25",textAlign:"left"},content:{fontSize:"14px",lineHeight:"1.5",color:"rgba(255, 255, 255, 0.8)",textAlign:"left"},exploreButton:{base:{backgroundColor:"transparent",border:`1px solid ${e.BASE_COLORS.warning[500]}`,color:e.BASE_COLORS.warning[500],borderRadius:n.BORDER_RADIUS.BUTTON,fontSize:"14px",fontWeight:"600",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",marginTop:n.SPACING.MAJOR.buttonMarginTop},hover:{backgroundColor:"rgba(254, 192, 45, 0.1)"}},navigationContainer:{position:"absolute",bottom:n.SPACING.MAJOR.navigationBottom,right:n.SPACING.MAJOR.navigationRight,display:"flex",gap:n.SPACING.MAJOR.navigationGap,alignItems:"center"},navigationButton:t=>({base:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:t?e.BASE_COLORS.grayscale[700]:e.BASE_COLORS.grayscale.white,fontSize:"20px",cursor:t?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},hover:{color:e.BASE_COLORS.warning[500]}})});
@@ -0,0 +1,16 @@
1
+ import { CSSProperties } from 'react';
2
+ export declare const getMinorPopupStyles: (startAnimation: boolean, transform: string) => {
3
+ container: CSSProperties;
4
+ imageContainer: CSSProperties;
5
+ imageWrapper: CSSProperties;
6
+ image: CSSProperties;
7
+ badge: CSSProperties;
8
+ badgeText: CSSProperties;
9
+ imagePlaceholder: CSSProperties;
10
+ contentContainer: CSSProperties;
11
+ title: CSSProperties;
12
+ content: CSSProperties;
13
+ actionsContainer: CSSProperties;
14
+ understoodText: CSSProperties;
15
+ exploreButton: CSSProperties;
16
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../constants/Theme.js"),t=require("../constants/animations.js"),i=require("../constants/dimensions.js"),o=require("../constants/zIndex.js");exports.getMinorPopupStyles=(n,a)=>({container:{width:`${i.POPUP_DIMENSIONS.MINOR.width}px`,height:`${i.POPUP_DIMENSIONS.MINOR.height}px`,display:"flex",backgroundColor:e.BASE_COLORS.grayscale.white,borderRadius:i.BORDER_RADIUS.POPUP,overflow:"hidden",position:"relative",boxShadow:"0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)",transform:n?a:"scale(1)",opacity:n?0:1,transition:t.POPUP_TRANSITION},imageContainer:{backgroundColor:e.BASE_COLORS.grayscale[50],borderRadius:i.BORDER_RADIUS.IMAGE,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",margin:i.SPACING.MINOR.imageMargin,width:`${i.POPUP_DIMENSIONS.MINOR.imageWidth}px`,minWidth:`${i.POPUP_DIMENSIONS.MINOR.imageWidth}px`,maxWidth:`${i.POPUP_DIMENSIONS.MINOR.imageWidth}px`,height:`${i.POPUP_DIMENSIONS.MINOR.imageHeight}px`},imageWrapper:{position:"relative",width:`${i.POPUP_DIMENSIONS.MINOR.imageWidth}px`,height:`${i.POPUP_DIMENSIONS.MINOR.imageHeight}px`},image:{width:`${i.POPUP_DIMENSIONS.MINOR.imageWidth}px`,height:`${i.POPUP_DIMENSIONS.MINOR.imageHeight}px`,objectFit:"cover",borderRadius:i.BORDER_RADIUS.IMAGE,display:"block"},badge:{position:"absolute",top:"0px",left:"0px",right:"0px",height:`${i.POPUP_DIMENSIONS.MINOR.badgeHeight}px`,backgroundColor:"rgba(0, 0, 0, 0.26)",borderRadius:`${i.BORDER_RADIUS.IMAGE} ${i.BORDER_RADIUS.IMAGE} ${i.BORDER_RADIUS.IMAGE} ${i.BORDER_RADIUS.IMAGE}`,display:"flex",alignItems:"center",justifyContent:"center",zIndex:o.Z_INDEX.IMAGE_BADGE},badgeText:{color:e.BASE_COLORS.grayscale.white,fontWeight:"600",fontSize:"14px"},imagePlaceholder:{color:e.BASE_COLORS.grayscale[500],fontSize:"14px",textAlign:"center",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.BASE_COLORS.grayscale[100],borderRadius:i.BORDER_RADIUS.IMAGE},contentContainer:{flex:1,display:"flex",margin:i.SPACING.MINOR.contentMargin,flexDirection:"column",justifyContent:"space-between",background:"transparent"},title:{fontSize:"16px",fontWeight:"600",padding:"0 0 0 0",color:e.BASE_COLORS.grayscale[900],lineHeight:"1.25",textAlign:"left"},content:{fontSize:"12px",fontWeight:"400",lineHeight:"1.2",color:e.BASE_COLORS.grayscale[700],textAlign:"left",maxHeight:"48px",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical"},actionsContainer:{position:"absolute",bottom:i.SPACING.MINOR.actionsBottom,right:i.SPACING.MINOR.actionsRight,display:"flex",gap:i.SPACING.MINOR.actionsGap,alignItems:"center"},understoodText:{color:e.BASE_COLORS.brand[800],fontSize:"14px",fontWeight:"500",cursor:"pointer",transition:"all 0.2s"},exploreButton:{backgroundColor:e.BASE_COLORS.brand[800],border:"none",color:e.BASE_COLORS.grayscale.white,borderRadius:i.BORDER_RADIUS.BUTTON,fontSize:"14px",fontWeight:"600",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}});
@@ -0,0 +1,13 @@
1
+ import { CSSProperties } from 'react';
2
+ export declare const videoModalStyles: {
3
+ backdrop: CSSProperties;
4
+ container: CSSProperties;
5
+ closeButton: {
6
+ base: CSSProperties;
7
+ hover: CSSProperties;
8
+ };
9
+ videoWrapper: CSSProperties;
10
+ iframe: CSSProperties;
11
+ video: CSSProperties;
12
+ noVideoMessage: CSSProperties;
13
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../constants/animations.js");var e=require("../constants/dimensions.js"),t=require("../constants/zIndex.js");const o={backdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.9)",zIndex:t.Z_INDEX.VIDEO_MODAL,display:"flex",justifyContent:"center",alignItems:"center",padding:"20px"},container:{position:"relative",width:"90vw",height:"90vh",maxWidth:"1200px",maxHeight:"800px",backgroundColor:"black",borderRadius:e.BORDER_RADIUS.VIDEO_MODAL,overflow:"hidden",boxShadow:"0 25px 50px rgba(0, 0, 0, 0.8)"},closeButton:{base:{position:"absolute",top:"20px",right:"20px",background:"rgba(0, 0, 0, 0.7)",border:"none",color:"white",fontSize:"24px",width:"40px",height:"40px",borderRadius:e.BORDER_RADIUS.CLOSE_BUTTON,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",zIndex:t.Z_INDEX.CLOSE_BUTTON,transition:"background-color 0.2s"},hover:{backgroundColor:"rgba(0, 0, 0, 0.9)"}},videoWrapper:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},iframe:{borderRadius:e.BORDER_RADIUS.VIDEO_MODAL},video:{width:"100%",height:"100%",objectFit:"contain",borderRadius:e.BORDER_RADIUS.VIDEO_MODAL},noVideoMessage:{color:"white",fontSize:"18px",textAlign:"center"}};exports.videoModalStyles=o;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Firestore Timestamp type
3
+ */
4
+ export interface FirestoreTimestamp {
5
+ seconds: number;
6
+ nanoseconds?: number;
7
+ }
8
+ /**
9
+ * Feature announcement data model
10
+ */
11
+ export interface FeatureAnnouncement {
12
+ id: string;
13
+ title: string;
14
+ body: string;
15
+ content: string;
16
+ buttonText: string;
17
+ displayImage: string;
18
+ featureTag: string;
19
+ featureUpdateType: 'Major' | 'Minor';
20
+ image: string;
21
+ module: string[];
22
+ pageUrls: string[];
23
+ productVideo: string;
24
+ redirectUrl: string;
25
+ updates: string;
26
+ visibility: boolean;
27
+ archived?: boolean;
28
+ createdAt: FirestoreTimestamp;
29
+ expirationDate?: FirestoreTimestamp | string | Date;
30
+ }
31
+ /**
32
+ * Store feature progress tracking
33
+ */
34
+ export interface StoreFeatureProgress {
35
+ storeId: string;
36
+ viewedFeatures: Record<string, boolean>;
37
+ }
38
+ /**
39
+ * Feature update types
40
+ */
41
+ export type FeatureUpdateType = 'Major' | 'Minor';
@@ -0,0 +1,4 @@
1
+ export * from './feature.types';
2
+ export * from './props.types';
3
+ export * from './repository.types';
4
+ export * from './router.types';
@@ -0,0 +1,43 @@
1
+ /// <reference types="react" />
2
+ import { FeatureAnnouncement } from './feature.types';
3
+ import { FeatureAnnouncementRepository } from './repository.types';
4
+ import { RouterProps } from './router.types';
5
+ /**
6
+ * Base popup component props
7
+ */
8
+ export interface PopupBaseProps {
9
+ feature: FeatureAnnouncement;
10
+ currentIndex: number;
11
+ totalFeatures: number;
12
+ onSkip: () => void;
13
+ onExplore: () => void;
14
+ onPrevious: () => void;
15
+ onNext: () => void;
16
+ setIsClosing?: (isClosing: boolean) => void;
17
+ }
18
+ /**
19
+ * Major update popup props
20
+ */
21
+ export interface MajorUpdatePopupProps extends PopupBaseProps {
22
+ }
23
+ /**
24
+ * Minor update popup props
25
+ */
26
+ export interface MinorUpdatePopupProps extends PopupBaseProps {
27
+ }
28
+ /**
29
+ * Video modal props
30
+ */
31
+ export interface VideoModalProps {
32
+ isOpen: boolean;
33
+ videoUrl: string;
34
+ onClose: () => void;
35
+ }
36
+ /**
37
+ * Feature announcement provider props
38
+ */
39
+ export interface FeatureAnnouncementProviderProps extends FeatureAnnouncementRepository {
40
+ children: React.ReactNode;
41
+ module?: string;
42
+ router?: RouterProps;
43
+ }
@@ -0,0 +1,11 @@
1
+ import { FeatureAnnouncement, StoreFeatureProgress } from './feature.types';
2
+ /**
3
+ * Repository function types for dependency injection
4
+ */
5
+ export interface FeatureAnnouncementRepository {
6
+ fetchVisibleFeatures: (module?: string) => Promise<[Error | null, FeatureAnnouncement[] | null]>;
7
+ getStoreFeatureProgress: (storeId: string) => Promise<[Error | null, StoreFeatureProgress | null]>;
8
+ fetchFeatureById: (featureId: string) => Promise<[Error | null, FeatureAnnouncement | null]>;
9
+ markFeatureAsViewedForStore: (storeId: string, featureId: string) => Promise<[Error | null]>;
10
+ isFeatureApplicableToCurrentPage: (feature: FeatureAnnouncement) => boolean;
11
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Router properties
3
+ */
4
+ export interface RouterProps {
5
+ pathname: string;
6
+ query: Record<string, string | string[] | undefined>;
7
+ }
@@ -0,0 +1,13 @@
1
+ import { FeatureAnnouncement, FeatureAnnouncementRepository, RouterProps } from './types';
2
+ export declare const useFeatureAnnouncements: ({ fetchVisibleFeatures, getStoreFeatureProgress, fetchFeatureById, markFeatureAsViewedForStore, isFeatureApplicableToCurrentPage, module, router, }: FeatureAnnouncementRepository & {
3
+ module?: string | undefined;
4
+ router?: RouterProps | undefined;
5
+ }) => {
6
+ features: FeatureAnnouncement[];
7
+ majorUpdateFeatures: FeatureAnnouncement[];
8
+ minorUpdateFeatures: FeatureAnnouncement[];
9
+ isLoading: boolean;
10
+ error: string | null;
11
+ markFeatureAsViewed: (featureId: string) => Promise<void>;
12
+ refetch: () => Promise<void>;
13
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Calculate transform for closing animation
3
+ * @param popupElement - Popup element reference
4
+ * @param targetElement - Target element to animate towards
5
+ * @returns Transform CSS string
6
+ */
7
+ export declare const calculateCloseTransform: (popupElement: HTMLElement, targetElement: Element) => string;
8
+ /**
9
+ * Hide Joyride arrow element
10
+ * @param popupRef - Reference to popup element
11
+ */
12
+ export declare const hideJoyrideArrow: (popupRef: HTMLElement | null) => void;
13
+ /**
14
+ * Execute callback after animation completes
15
+ * @param callback - Function to execute
16
+ * @param delay - Optional delay override
17
+ */
18
+ export declare const executeAfterAnimation: (callback: () => void, delay?: number) => void;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../constants/animations.js");exports.calculateCloseTransform=(e,t)=>{const i=e.getBoundingClientRect(),o=t.getBoundingClientRect();return`translate(${o.left+o.width/2-(i.left+i.width/2)}px, ${o.top+o.height/2-(i.top+i.height/2)}px) scale(0)`},exports.executeAfterAnimation=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.ANIMATION_TIMING.CLOSE_DURATION;setTimeout(t,i)},exports.hideJoyrideArrow=e=>{if(!e)return;const t=e.closest('[class*="react-joyride__tooltip"]');if(!t)return;const i=t.querySelector('[class*="react-joyride__arrow"]');i&&(i.style.display="none",i.style.visibility="hidden",i.style.opacity="0")};
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Find What's New button using multiple strategies
3
+ * @returns Element or null
4
+ */
5
+ export declare const findWhatsNewButton: () => Element | null;
6
+ /**
7
+ * Find target element for minor update
8
+ * @param featureTag - Feature tag selector
9
+ * @returns Element or null
10
+ */
11
+ export declare const findFeatureTagElement: (featureTag: string) => Element | null;
12
+ /**
13
+ * Normalize selector string
14
+ * @param selector - Selector string
15
+ * @returns Normalized selector
16
+ */
17
+ export declare const normalizeSelector: (selector: string) => string;
18
+ /**
19
+ * Check if element is fully visible in viewport
20
+ * @param element - Element to check
21
+ * @returns True if element is fully visible
22
+ */
23
+ export declare const isElementInViewport: (element: Element) => boolean;
24
+ /**
25
+ * Scroll to element smoothly with offset
26
+ * @param element - Element to scroll to
27
+ * @param offset - Offset from top (default 120px for popup space)
28
+ * @returns Promise that resolves when scroll completes
29
+ */
30
+ export declare const scrollToElementSmooth: (element: Element, offset?: number) => Promise<void>;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../constants/animations.js");var e=require("../constants/selectors.js");const t=e=>{const t=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,r=t.top>=120&&t.bottom<=o,s=t.left>=0&&t.right<=n;return r&&s};exports.findFeatureTagElement=e=>{const t=e.startsWith("#")||e.startsWith(".")||e.startsWith("[")?e:`#${e}`;return document.querySelector(t)},exports.findWhatsNewButton=()=>{let t=document.querySelector(e.SELECTORS.WHATS_NEW_BUTTON);if(t)return t;if(t=document.querySelector(e.SELECTORS.MAIN_ICON_CLASS),t)return t;const o=document.querySelector(e.SELECTORS.SVG_VIEWBOX);if(o){if(o.querySelector(e.SELECTORS.CLIPPATH_PATTERN))return o.closest(e.SELECTORS.WHATS_NEW_BUTTON)||o.parentElement}return null},exports.isElementInViewport=t,exports.normalizeSelector=e=>e.startsWith("#")||e.startsWith(".")||e.startsWith("[")?e:`#${e}`,exports.scrollToElementSmooth=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120;return new Promise((n=>{if(t(e))return void n();const r=e.getBoundingClientRect().top+window.pageYOffset-o;let s;window.scrollTo({top:r,behavior:"smooth"});const i=()=>{clearTimeout(s),s=setTimeout((()=>{window.removeEventListener("scroll",i),setTimeout((()=>n()),100)}),100)};window.addEventListener("scroll",i,{passive:!0}),setTimeout((()=>{window.removeEventListener("scroll",i),n()}),1e3)}))};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Decode HTML entities in text
3
+ * @param text - Text containing HTML entities
4
+ * @returns Decoded text
5
+ */
6
+ export declare const decodeHTMLEntities: (text: string) => string;
7
+ /**
8
+ * Format video URL for embedding
9
+ * @param videoUrl - Original video URL
10
+ * @returns Formatted video URL
11
+ */
12
+ export declare const formatVideoUrl: (videoUrl: string) => string;
13
+ /**
14
+ * Check if URL is a YouTube video
15
+ * @param videoUrl - Video URL to check
16
+ * @returns True if YouTube video
17
+ */
18
+ export declare const isYouTubeVideo: (videoUrl: string) => boolean;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.decodeHTMLEntities=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value},exports.formatVideoUrl=e=>e.replace("watch?v=","embed/").replace("youtu.be/","youtube.com/embed/"),exports.isYouTubeVideo=e=>e.includes("youtube.com")||e.includes("youtu.be");
@@ -0,0 +1,3 @@
1
+ export * from './htmlHelpers';
2
+ export * from './animationHelpers';
3
+ export * from './elementHelpers';
@@ -27,6 +27,8 @@ interface CollectionsScreenInterface {
27
27
  pickerType?: 'COLLECTION' | 'PRODUCT';
28
28
  scrollContainerRef: React.RefObject<HTMLDivElement>;
29
29
  appType: ApplicationType;
30
+ limit?: number;
31
+ exactLimit?: number;
30
32
  }
31
33
  export declare const CollectionsScreen: (props: CollectionsScreenInterface) => import("react/jsx-runtime").JSX.Element;
32
34
  export interface CollectionCardInterface {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("../../assets/icons/chevronRight.svg.js"),s=require("react"),i=require("../checkBox/CheckBox.js"),l=require("../icon-button/IconButton.js"),o=require("../tag/Tag.js"),r=require("../tooltips/Tooltip.js"),n=require("../TypographyStyle.js"),c=require("./emptyState.js"),u=require("./ProductPickerShimmer.js"),d=require("./style.js"),a=require("./utility.js");const x=s=>{const{customCollectionRestriction:c,data:u,selectedCollectionsDispatch:a,setCollectionId:x,setSelectedCollectionId:p,isPartiallyChecked:j,setScreen:h,id:C,isChecked:m,isDisabled:v,hideCollectionCheckbox:y,pickerType:g,usedInSearch:R}=s;return u?e.jsxRuntimeExports.jsxs(d.CollectionCardStyle,Object.assign({isDisabled:v,onClick:e=>{if(!v){if("COLLECTION"===g)return e.stopPropagation(),a({type:"reset",data:{}}),a({type:"selected",data:{id:C,val:u,isRestricted:c}}),x(C),void p(C);x(C),p(C),h("products")}},isActive:m,usedInSearch:null!=R&&R},{children:[e.jsxRuntimeExports.jsxs(d.CollectionCardInfoStyle,{children:[!y&&e.jsxRuntimeExports.jsx(i.CheckBox,{isDisabled:v,isChecked:m,isPartiallyChecked:j,onValueChange:function(e,t,s){null==s||s.stopPropagation(),a(e?{type:"selected",data:{id:C,val:u,isRestricted:c}}:{type:"unselected",data:{id:C}}),p(e?C:"")}}),e.jsxRuntimeExports.jsx(d.CollectionCardDetailStyle,{children:e.jsxRuntimeExports.jsx(r.Tooltip,Object.assign({body:u.name,placement:"bottom",delay:400,variant:"light"},{children:e.jsxRuntimeExports.jsxs(d.CollectionNameHolder,{children:[R?e.jsxRuntimeExports.jsx(n.BodyPrimary,Object.assign({numberOfLines:1},{children:u.name})):e.jsxRuntimeExports.jsx(n.TitleRegular,Object.assign({numberOfLines:1},{children:u.name})),u.isSmartCollection?e.jsxRuntimeExports.jsx("div",Object.assign({style:{display:"flex"}},{children:e.jsxRuntimeExports.jsx(o.Tag,{tagText:"Smart Collection",type:"warning"})})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})]})}))})]}),"COLLECTION"!==g&&e.jsxRuntimeExports.jsx(l.IconButton,{height:12,width:12,disabled:v,Icon:t.default})]})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})};exports.CollectionCard=x,exports.CollectionsScreen=t=>{var i;const{customCollectionRestriction:l,dataLoading:o,collections:r,selectedCollectionsDispatch:n,setCollectionId:d,setSelectedCollectionId:p,selectedCollections:j,setScreen:h,collectionFetcher:C,collectionsDispatch:m,pagingControls:v,storeId:y,setSaveDisabled:g,hideCollectionCheckbox:R,renderWithoutModal:E,pickerType:b,scrollContainerRef:k,appType:f}=t,S=s.useRef(v.curPage),P=!!l&&(null==j?void 0:j.isCustom),[O,I]=s.useState(!1),T=s.useRef(!1),q=s.useRef(!1),D=()=>{if(!k||!(null==k?void 0:k.current))return;const{scrollTop:e,clientHeight:t,scrollHeight:s}=k.current;e+t>=s-20&&!T.current&&!q.current&&(g(!0),I(!0),q.current=!0,g(!0),I(!0),C(S.current,y,f).then((e=>{m({type:"paged",data:(null==e?void 0:e.collections)||{}}),v.setCurPage(S.current+1),I(!1),g(!1),q.current=!1,Object.keys(null==e?void 0:e.collections).length||(T.current=!0)})).catch())};return s.useEffect((()=>{var e;return null===(e=null==k?void 0:k.current)||void 0===e||e.addEventListener("scroll",D),()=>{var e;null===(e=null==k?void 0:k.current)||void 0===e||e.removeEventListener("scroll",D)}}),[]),s.useEffect((()=>{S.current=v.curPage}),[v.curPage]),e.jsxRuntimeExports.jsxs("div",{children:[(null===(i=Object.keys(null!=r?r:{}))||void 0===i?void 0:i.length)?Object.keys(r).map((t=>{var s,i;const o=!!(null==j?void 0:j[t])&&("PRODUCT"!==b||!!Object.keys(null!==(i=null===(s=null==j?void 0:j[t])||void 0===s?void 0:s.products)&&void 0!==i?i:{}).length);return e.jsxRuntimeExports.jsx(x,{customCollectionRestriction:l,data:r[t],isDisabled:P&&!(null==j?void 0:j[t]),isChecked:o,isPartiallyChecked:a.isCollectionPartiallyChecked(t,null==r?void 0:r[t],j),selectedCollectionsDispatch:n,setCollectionId:d,setSelectedCollectionId:p,setScreen:h,id:t,hideCollectionCheckbox:R||"-1"===t,selectedCollections:j,renderWithoutModal:E,pickerType:b},t)})):o?e.jsxRuntimeExports.jsx(u.ProductPickerShimmer,{}):e.jsxRuntimeExports.jsx(c.EmptyState,{title:"No collections to show",subtitle:"We couldn’t find any collection."}),O&&e.jsxRuntimeExports.jsx(u.ProductPickerShimmer,{})]})},exports.truncate=(e,t,s)=>{if(!e)return"";if(e.length<=t)return e;const i=e.slice(0,t-1);return(s?i.slice(0,i.lastIndexOf(" ")):i)+"..."};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("../../assets/icons/chevronRight.svg.js"),s=require("react"),i=require("../checkBox/CheckBox.js"),l=require("../icon-button/IconButton.js"),o=require("../tag/Tag.js"),r=require("../tooltips/Tooltip.js"),n=require("../TypographyStyle.js"),c=require("./emptyState.js"),u=require("./ProductPickerShimmer.js"),d=require("./style.js"),a=require("./utility.js");const x=s=>{const{customCollectionRestriction:c,data:u,selectedCollectionsDispatch:a,setCollectionId:x,setSelectedCollectionId:p,isPartiallyChecked:j,setScreen:C,id:h,isChecked:m,isDisabled:y,hideCollectionCheckbox:g,pickerType:v,usedInSearch:R}=s;return u?e.jsxRuntimeExports.jsxs(d.CollectionCardStyle,Object.assign({isDisabled:y,onClick:e=>{if(!y){if("COLLECTION"===v)return e.stopPropagation(),a({type:"reset",data:{}}),a({type:"selected",data:{id:h,val:u,isRestricted:c}}),x(h),void p(h);x(h),p(h),C("products")}},isActive:m,usedInSearch:null!=R&&R},{children:[e.jsxRuntimeExports.jsxs(d.CollectionCardInfoStyle,{children:[!g&&e.jsxRuntimeExports.jsx(i.CheckBox,{isDisabled:y,isChecked:m,isPartiallyChecked:j,onValueChange:function(e,t,s){null==s||s.stopPropagation(),a(e?{type:"selected",data:{id:h,val:u,isRestricted:c}}:{type:"unselected",data:{id:h}}),p(e?h:"")}}),e.jsxRuntimeExports.jsx(d.CollectionCardDetailStyle,{children:e.jsxRuntimeExports.jsx(r.Tooltip,Object.assign({body:u.name,placement:"bottom",delay:400,variant:"light"},{children:e.jsxRuntimeExports.jsxs(d.CollectionNameHolder,{children:[R?e.jsxRuntimeExports.jsx(n.BodyPrimary,Object.assign({numberOfLines:1},{children:u.name})):e.jsxRuntimeExports.jsx(n.TitleRegular,Object.assign({numberOfLines:1},{children:u.name})),u.isSmartCollection?e.jsxRuntimeExports.jsx("div",Object.assign({style:{display:"flex"}},{children:e.jsxRuntimeExports.jsx(o.Tag,{tagText:"Smart Collection",type:"warning"})})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})]})}))})]}),"COLLECTION"!==v&&e.jsxRuntimeExports.jsx(l.IconButton,{height:12,width:12,disabled:y,Icon:t.default})]})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})};exports.CollectionCard=x,exports.CollectionsScreen=t=>{var i;const{customCollectionRestriction:l,dataLoading:o,collections:r,selectedCollectionsDispatch:n,setCollectionId:d,setSelectedCollectionId:p,selectedCollections:j,setScreen:C,collectionFetcher:h,collectionsDispatch:m,pagingControls:y,storeId:g,setSaveDisabled:v,hideCollectionCheckbox:R,renderWithoutModal:E,pickerType:b,scrollContainerRef:k,appType:f,limit:S,exactLimit:O}=t,P=s.useRef(y.curPage),I=!!l&&(null==j?void 0:j.isCustom),[T,q]=s.useState(!1),L=s.useRef(!1),D=s.useRef(!1),B=()=>{if(!k||!(null==k?void 0:k.current))return;const{scrollTop:e,clientHeight:t,scrollHeight:s}=k.current;e+t>=s-20&&!L.current&&!D.current&&(v(!0),q(!0),D.current=!0,v(!0),q(!0),h(P.current,g,f).then((e=>{m({type:"paged",data:(null==e?void 0:e.collections)||{}}),y.setCurPage(P.current+1),q(!1),v(!1),D.current=!1,Object.keys(null==e?void 0:e.collections).length||(L.current=!0)})).catch())};s.useEffect((()=>{var e;return null===(e=null==k?void 0:k.current)||void 0===e||e.addEventListener("scroll",B),()=>{var e;null===(e=null==k?void 0:k.current)||void 0===e||e.removeEventListener("scroll",B)}}),[]),s.useEffect((()=>{P.current=y.curPage}),[y.curPage]);const N=Object.keys(j||{}).filter((e=>"isCustom"!==e)).length;return e.jsxRuntimeExports.jsxs("div",{children:[(null===(i=Object.keys(null!=r?r:{}))||void 0===i?void 0:i.length)?Object.keys(r).map((t=>{var s,i;const o=!!(null==j?void 0:j[t])&&("PRODUCT"!==b||!!Object.keys(null!==(i=null===(s=null==j?void 0:j[t])||void 0===s?void 0:s.products)&&void 0!==i?i:{}).length),c="COLLECTION"===b&&!o&&(!!O&&N>=O||!!S&&N>=S);return e.jsxRuntimeExports.jsx(x,{customCollectionRestriction:l,data:r[t],isDisabled:I&&!(null==j?void 0:j[t])||c,isChecked:o,isPartiallyChecked:a.isCollectionPartiallyChecked(t,null==r?void 0:r[t],j),selectedCollectionsDispatch:n,setCollectionId:d,setSelectedCollectionId:p,setScreen:C,id:t,hideCollectionCheckbox:R||"-1"===t,selectedCollections:j,renderWithoutModal:E,pickerType:b},t)})):o?e.jsxRuntimeExports.jsx(u.ProductPickerShimmer,{}):e.jsxRuntimeExports.jsx(c.EmptyState,{title:"No collections to show",subtitle:"We couldn’t find any collection."}),T&&e.jsxRuntimeExports.jsx(u.ProductPickerShimmer,{})]})},exports.truncate=(e,t,s)=>{if(!e)return"";if(e.length<=t)return e;const i=e.slice(0,t-1);return(s?i.slice(0,i.lastIndexOf(" ")):i)+"..."};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("@bikdotai/bik-models/growth/models/bik-store"),o=require("../../assets/icons/search.svg.js"),s=require("react"),r=require("../../constants/Theme.js"),c=require("../../assets/icons/cross.svg.js"),n=require("../button/Button.js"),i=require("../input/Input.js"),l=require("../modals/styledModal.js"),a=require("../spinner/Spinner.js"),d=require("../tag/Tag.js"),u=require("./collectionScreen.js"),p=require("./productInfoOverlay.js"),x=require("./productScreen.js"),h=require("./rearrangeScreen.js"),j=require("./reducers.js"),m=require("./searchScreen.js"),S=require("./selectedScreen.js"),C=require("./style.js"),g=require("./type.js"),y=require("./utility.js");exports.ProductPickerModal=R=>{const{storeId:b,selectedItems:f,onClose:E,visible:k,zIndex:v,exactLimit:I,limit:O,hideCollectionCheckbox:F,hideProductCheckbox:P,outOfStockAction:T=g.OUT_OF_STOCK_ACTION.BLUR,hideVariantCheckbox:D,selectProductsFromCustomCollection:q,hideSelectionCount:N,title:A,width:B,left:w,renderWithoutModal:L,onClickSave:M,pickerType:V,hideProductVariants:z=!1,startupScreen:$=g.ScreenName.Collections,rearrangeEnabled:_,selectSingleItem:H=!1,showProductDetails:K,containerStyle:W,crossButtonInsideHeader:G=!1,footerForNonModal:U={},primaryButton:Y,secondaryButton:J,subtitle:Q}=R,X=R.appType||t.ApplicationType.BIK,[Z,ee]=s.useReducer(j.collectionsReducer,{}),[te,oe]=s.useState([g.ScreenName.Collections,g.ScreenName.RearrangeProducts].includes($)?$:g.ScreenName.Collections),[se,re]=s.useState("grid"),[ce,ne]=s.useState(""),[ie,le]=s.useState(""),[ae,de]=s.useState(0),[ue,pe]=s.useState(!1),[xe,he]=s.useState(0),[je,me]=s.useState(""),[Se,Ce]=s.useState(!1),[ge,ye]=s.useState(!1),[Re,be]=s.useReducer(j.searchReducer,{collections:{},products:{}}),[fe,Ee]=s.useReducer(j.selectedColectionsReducer,Object.keys(f).length>0?f:{}),ke=s.useRef(null),[ve,Ie]=s.useState(!1),[Oe,Fe]=s.useState();s.useEffect((()=>{pe(!0),ye(!0),R.collectionFetcher(ae,b,X).then((e=>{ee({type:"fetched",data:(null==e?void 0:e.collections)||{}}),pe(!1),de((e=>e+1)),ye(!1)})).catch()}),[]),s.useEffect((()=>{let e=0;z?Object.keys(fe||[]).forEach((t=>{var o;Object.keys((null===(o=fe[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var s;"-1"!==t&&fe[-1]&&(null===(s=fe[-1].products)||void 0===s?void 0:s[o])||(e+=1)}))})):Object.keys(fe||[]).forEach((t=>{var o;Object.keys((null===(o=fe[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var s,r;Object.keys((null===(r=null===(s=fe[t].products)||void 0===s?void 0:s[o])||void 0===r?void 0:r.variants)||[]).forEach((()=>{e+=1}))}))})),he(e)}),[Z,fe,z]),s.useEffect((()=>{ie&&(pe(!0),R.productFetcher(ie,b,X).then((e=>{Object.keys(e).length&&ee({type:"productsFetched",data:{collectionId:ie,products:e}}),pe(!1)})).catch())}),[ie]),s.useEffect((()=>{const e=setTimeout((()=>{"rearrange"!==te&&(je.length||"collections"!==te)&&(je.length?(Ce(!0),R.searchFetcher(b,je,X).then((e=>{"collections"in e&&"products"in e?(be({type:"set",data:e}),ee({type:"searched",data:e.collections}),ee({type:"searched",data:e.products})):(be({type:"set",data:{collections:{},products:e}}),ee({type:"searched",data:e})),oe("searchProducts"),pe(!1),Ce(!1)}))):oe("collections"))}),800);return()=>clearTimeout(e)}),[je]),s.useEffect((()=>{M&&(R.onAdd(fe,xe),Pe())}),[M]),s.useEffect((()=>{H&&Object.keys(fe||{}).length&&xe&&(R.onAdd(fe,xe),Pe())}),[H,fe,xe]);const Pe=()=>{Ee({type:"reset",data:{}})},Te=()=>I&&xe>I?e.jsxRuntimeExports.jsx(d.Tag,{tagText:`You can only select ${I} products`,type:"negative"}):O&&xe>O?e.jsxRuntimeExports.jsx(d.Tag,{tagText:`You can only select ${O} products`,type:"negative"}):xe>0?e.jsxRuntimeExports.jsx(n.Button,{onClick:()=>{oe(_?g.ScreenName.RearrangeProducts:g.ScreenName.SelectedProducts)},buttonText:I?`${xe}/${I} products selected`:`${xe} products selected`,buttonType:["rearrange","view"].includes(te)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(te)}):e.jsxRuntimeExports.jsx(n.Button,{disabled:!0,buttonText:I?`${xe}/${I} products selected`:`${xe} products selected`,buttonType:"tertiaryGray"}),De=e=>ue?"Loading...":te===g.ScreenName.RearrangeProducts?null!=e?e:"Done":null!=e?e:"Add",qe=e.jsxRuntimeExports.jsxs(C.ContainerStyle,Object.assign({style:null!=W?W:{}},{children:[R.postHeader&&e.jsxRuntimeExports.jsx("div",Object.assign({style:{padding:"0 24px"}},{children:R.postHeader})),!R.hideGlobalSearch&&e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:("collections"===te||"searchProducts"===te)&&e.jsxRuntimeExports.jsx("div",Object.assign({style:{padding:L?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"}},{children:e.jsxRuntimeExports.jsx(i.Input,{placeholder:"Search using ID, Name or SKU ID",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>Se?e.jsxRuntimeExports.jsx(a.Spinner,{size:"small",color:r.COLORS.content.primary}):e.jsxRuntimeExports.jsx(o.default,{})},id:"listInput",height:"24px",type:"text",value:je,onChangeText:e=>{e.length&&e.trim().length?me(e):me("")}})}))}),e.jsxRuntimeExports.jsxs(C.ScrollContainerStyle,Object.assign({ref:ke,screenName:te},{children:["collections"===te&&e.jsxRuntimeExports.jsx(u.CollectionsScreen,{customCollectionRestriction:R.customCollectionRestriction,dataLoading:ge,collections:Z,selectedCollectionsDispatch:Ee,setCollectionId:ne,setSelectedCollectionId:le,setScreen:oe,selectedCollections:fe,collectionFetcher:R.collectionFetcher,storeId:b,appType:X,collectionsDispatch:ee,setSaveDisabled:pe,pagingControls:{curPage:ae,setCurPage:de},hideCollectionCheckbox:F,renderWithoutModal:L,pickerType:V,scrollContainerRef:ke}),"products"===te&&ce&&e.jsxRuntimeExports.jsx(j.CollectionIdContext.Provider,Object.assign({value:ce},{children:e.jsxRuntimeExports.jsx(x.ProductsScreen,{hideInCollectionSearch:R.hideInCollectionSearch,customCollectionRestriction:R.customCollectionRestriction,productFetcher:R.productFetcher,setScreen:oe,storeId:b,appType:X,data:Z[ce],collectionsDispatch:ee,selectedCollectionsDispatch:Ee,selectedData:fe,setSaveDisabled:pe,searchInCollectionFetcher:R.searchInCollectionFetcher,hideProductCheckbox:P,outOfStockAction:T,hideVariantCheckbox:D,selectProductsFromCustomCollection:q,renderWithoutModal:L,pickerType:V,hideProductVariants:z,fbStatusFetcher:R.fbStatusFetcher,onProductDetailClick:e=>{Ie(!0),Fe(e)},showProductDetailInfoIcon:K,scrollContainerRef:ke})})),"view"===te&&e.jsxRuntimeExports.jsx(S.SelectedScreen,{selectedCollections:fe||{},selectedCollectionsDispatch:Ee,setScreen:oe,collections:Z,hideProductVariants:z,outOfStockAction:T,storeId:b,appType:X,fbStatusFetcher:R.fbStatusFetcher}),"rearrange"===te&&e.jsxRuntimeExports.jsx(h.RearrangeScreen,{selectedCollections:fe||{},selectedCollectionsDispatch:Ee,setScreen:oe,outOfStockAction:T,rearrangeViewType:"grid"===se?"list":"grid",scrollContainerRef:ke,storeId:b,appType:X,fbStatusFetcher:R.fbStatusFetcher}),"searchProducts"===te&&e.jsxRuntimeExports.jsx(m.SearchScreen,{customCollectionRestriction:R.customCollectionRestriction,selectedCollections:fe||{},searchedCollections:Re||{},searchedCollectionsDispatch:be,selectedCollectionsDispatch:Ee,setScreen:oe,collections:Z,onBackPress:()=>{me(""),be({type:"set",data:{collections:{},products:{}}})},pickerType:V,hideProductCheckbox:P,hideProductVariants:z,hideVariantCheckbox:D,storeId:b,appType:X,fbStatusFetcher:R.fbStatusFetcher,setCollectionId:ne,setSelectedCollectionId:le,renderWithoutModal:L,hideCollectionCheckbox:F,outOfStockAction:T})]}))]}));return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:L?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[qe,U.renderFooter?e.jsxRuntimeExports.jsxs(C.StyledFooterForNonModal,{children:[Te(),e.jsxRuntimeExports.jsx(n.Button,{buttonText:De(U.primaryButtonText),disabled:!U.isLoading&&(ue||xe<1||I&&xe<I||!I&&O&&xe>O)||U.primaryButtonDisabled,isLoading:U.isLoading,onClick:()=>{R.onAdd(fe,xe),Pe(),oe([g.ScreenName.Collections,g.ScreenName.RearrangeProducts].includes($)?$:g.ScreenName.Collections)}})]}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),ve&&Oe?e.jsxRuntimeExports.jsx(p.ProductInfoOverlay,{productData:Oe,outOfStockAction:T,useDynamicInfoImageSize:R.useDynamicInfoImageSize,onClose:()=>{Ie(!1)}}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})]}):e.jsxRuntimeExports.jsxs(l.StyledModal,Object.assign({zIndex:v,open:k,onClose:()=>{null==E||E(),Pe()},headingTitle:A||("collections"===te||"products"===te?"Select Products":"view"===te?"Selected Products":"searchProducts"===te?"Searched Results":"rearrange"===te?"Rearrange Products":void 0),headingSubtitle:Q,footerShadow:!0,centralContainerStyles:{width:B||"600px",left:w||"auto"},headerRightCustomElement:G?e.jsxRuntimeExports.jsx("div",Object.assign({style:{cursor:"pointer",display:"flex"},onClick:E},{children:e.jsxRuntimeExports.jsx(c.default,{width:20,height:20,color:r.COLORS.content.secondary})})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),footerContainerStyle:R.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:r.COLORS.surface.standard}:void 0,primaryButton:Y?(e=>Object.assign(Object.assign({},e),{disabled:!e.isLoading&&(ue||xe<1||I&&xe<I||!I&&O&&xe>O)||e.disabled,onClick:()=>{R.onAdd(fe,xe),Pe(),oe([g.ScreenName.Collections,g.ScreenName.RearrangeProducts].includes($)?$:g.ScreenName.Collections)}}))(Y):{buttonText:De(),disabled:ue||xe<1||I&&xe<I||!I&&O&&xe>O||!1,onClick:()=>{R.onAdd(fe,xe),Pe()}},secondaryButton:J?(e=>Object.assign(Object.assign({},e),{disabled:ue||xe<1||I&&xe<I||!I&&O&&xe>O||!1,onClick:()=>{const e=y.updateAllVariantsForSelectedProducts(fe,Z,Re);R.onAdd(e,xe,!0)}}))(J):void 0,wrapperStyle:R.stickyFooter?{height:"calc(100vh - 168px)"}:void 0,footerLeftCustomElement:N?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}):Te(),hideCrossButton:ve||G},{children:[qe,ve&&Oe?e.jsxRuntimeExports.jsx(p.ProductInfoOverlay,{productData:Oe,useDynamicInfoImageSize:R.useDynamicInfoImageSize,outOfStockAction:T,onClose:()=>{Ie(!1)}}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})]}))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("@bikdotai/bik-models/growth/models/bik-store"),o=require("../../assets/icons/search.svg.js"),s=require("react"),r=require("../../constants/Theme.js"),c=require("../../assets/icons/cross.svg.js"),n=require("../button/Button.js"),i=require("../input/Input.js"),l=require("../modals/styledModal.js"),a=require("../spinner/Spinner.js"),d=require("../tag/Tag.js"),u=require("./collectionScreen.js"),p=require("./productInfoOverlay.js"),x=require("./productScreen.js"),h=require("./rearrangeScreen.js"),j=require("./reducers.js"),m=require("./searchScreen.js"),S=require("./selectedScreen.js"),C=require("./style.js"),g=require("./type.js"),y=require("./utility.js");exports.ProductPickerModal=R=>{const{storeId:b,selectedItems:f,onClose:E,visible:v,zIndex:k,exactLimit:I,limit:O,hideCollectionCheckbox:F,hideProductCheckbox:P,outOfStockAction:T=g.OUT_OF_STOCK_ACTION.BLUR,hideVariantCheckbox:D,selectProductsFromCustomCollection:q,hideSelectionCount:N,title:L,width:A,left:B,renderWithoutModal:w,onClickSave:$,pickerType:M,hideProductVariants:V=!1,startupScreen:z=g.ScreenName.Collections,rearrangeEnabled:_,selectSingleItem:H=!1,showProductDetails:K,containerStyle:W,crossButtonInsideHeader:G=!1,footerForNonModal:U={},primaryButton:Y,secondaryButton:J,subtitle:Q}=R,X=R.appType||t.ApplicationType.BIK,[Z,ee]=s.useReducer(j.collectionsReducer,{}),[te,oe]=s.useState([g.ScreenName.Collections,g.ScreenName.RearrangeProducts].includes(z)?z:g.ScreenName.Collections),[se,re]=s.useState("grid"),[ce,ne]=s.useState(""),[ie,le]=s.useState(""),[ae,de]=s.useState(0),[ue,pe]=s.useState(!1),[xe,he]=s.useState(0),[je,me]=s.useState(""),[Se,Ce]=s.useState(!1),[ge,ye]=s.useState(!1),[Re,be]=s.useReducer(j.searchReducer,{collections:{},products:{}}),[fe,Ee]=s.useReducer(j.selectedColectionsReducer,Object.keys(f).length>0?f:{}),ve=s.useRef(null),[ke,Ie]=s.useState(!1),[Oe,Fe]=s.useState();s.useEffect((()=>{pe(!0),ye(!0),R.collectionFetcher(ae,b,X).then((e=>{ee({type:"fetched",data:(null==e?void 0:e.collections)||{}}),pe(!1),de((e=>e+1)),ye(!1)})).catch()}),[]),s.useEffect((()=>{let e=0;"COLLECTION"===M?e=Object.keys(fe||{}).filter((e=>"isCustom"!==e)).length:V?Object.keys(fe||[]).forEach((t=>{var o;Object.keys((null===(o=fe[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var s;"-1"!==t&&fe[-1]&&(null===(s=fe[-1].products)||void 0===s?void 0:s[o])||(e+=1)}))})):Object.keys(fe||[]).forEach((t=>{var o;Object.keys((null===(o=fe[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var s,r;Object.keys((null===(r=null===(s=fe[t].products)||void 0===s?void 0:s[o])||void 0===r?void 0:r.variants)||[]).forEach((()=>{e+=1}))}))})),he(e)}),[Z,fe,V,M]),s.useEffect((()=>{ie&&(pe(!0),R.productFetcher(ie,b,X).then((e=>{Object.keys(e).length&&ee({type:"productsFetched",data:{collectionId:ie,products:e}}),pe(!1)})).catch())}),[ie]),s.useEffect((()=>{const e=setTimeout((()=>{"rearrange"!==te&&(je.length||"collections"!==te)&&(je.length?(Ce(!0),R.searchFetcher(b,je,X).then((e=>{"collections"in e&&"products"in e?(be({type:"set",data:e}),ee({type:"searched",data:e.collections}),ee({type:"searched",data:e.products})):(be({type:"set",data:{collections:{},products:e}}),ee({type:"searched",data:e})),oe("searchProducts"),pe(!1),Ce(!1)}))):oe("collections"))}),800);return()=>clearTimeout(e)}),[je]),s.useEffect((()=>{$&&(R.onAdd(fe,xe),Pe())}),[$]),s.useEffect((()=>{H&&Object.keys(fe||{}).length&&xe&&(R.onAdd(fe,xe),Pe())}),[H,fe,xe]);const Pe=()=>{Ee({type:"reset",data:{}})},Te=()=>{let t,o;return"COLLECTION"===M?(t="collection",o="collections"):V?(t="product",o="products"):(t="variant",o="variants"),I&&xe>I?e.jsxRuntimeExports.jsx(d.Tag,{tagText:`You can only select ${I} ${1===I?t:o}`,type:"negative"}):O&&xe>O?e.jsxRuntimeExports.jsx(d.Tag,{tagText:`You can only select ${O} ${1===O?t:o}`,type:"negative"}):xe>0?e.jsxRuntimeExports.jsx(n.Button,{onClick:()=>{oe(_?g.ScreenName.RearrangeProducts:g.ScreenName.SelectedProducts)},buttonText:I?`${xe}/${I} ${1===xe?t:o} selected`:`${xe} ${1===xe?t:o} selected`,buttonType:["rearrange","view"].includes(te)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(te)}):e.jsxRuntimeExports.jsx(n.Button,{disabled:!0,buttonText:I?`${xe}/${I} ${1===I?t:o} selected`:`${xe} ${1===xe?t:o} selected`,buttonType:"tertiaryGray"})},De=e=>ue?"Loading...":te===g.ScreenName.RearrangeProducts?null!=e?e:"Done":null!=e?e:"Add",qe=e.jsxRuntimeExports.jsxs(C.ContainerStyle,Object.assign({style:null!=W?W:{}},{children:[R.postHeader&&e.jsxRuntimeExports.jsx("div",Object.assign({style:{padding:"0 24px"}},{children:R.postHeader})),!R.hideGlobalSearch&&e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:("collections"===te||"searchProducts"===te)&&e.jsxRuntimeExports.jsx("div",Object.assign({style:{padding:w?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"}},{children:e.jsxRuntimeExports.jsx(i.Input,{placeholder:"Search using ID, Name or SKU ID",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>Se?e.jsxRuntimeExports.jsx(a.Spinner,{size:"small",color:r.COLORS.content.primary}):e.jsxRuntimeExports.jsx(o.default,{})},id:"listInput",height:"24px",type:"text",value:je,onChangeText:e=>{e.length&&e.trim().length?me(e):me("")}})}))}),e.jsxRuntimeExports.jsxs(C.ScrollContainerStyle,Object.assign({ref:ve,screenName:te},{children:["collections"===te&&e.jsxRuntimeExports.jsx(u.CollectionsScreen,{customCollectionRestriction:R.customCollectionRestriction,dataLoading:ge,collections:Z,selectedCollectionsDispatch:Ee,setCollectionId:ne,setSelectedCollectionId:le,setScreen:oe,selectedCollections:fe,collectionFetcher:R.collectionFetcher,storeId:b,appType:X,collectionsDispatch:ee,setSaveDisabled:pe,pagingControls:{curPage:ae,setCurPage:de},hideCollectionCheckbox:F,renderWithoutModal:w,pickerType:M,scrollContainerRef:ve,limit:O,exactLimit:I}),"products"===te&&ce&&e.jsxRuntimeExports.jsx(j.CollectionIdContext.Provider,Object.assign({value:ce},{children:e.jsxRuntimeExports.jsx(x.ProductsScreen,{hideInCollectionSearch:R.hideInCollectionSearch,customCollectionRestriction:R.customCollectionRestriction,productFetcher:R.productFetcher,setScreen:oe,storeId:b,appType:X,data:Z[ce],collectionsDispatch:ee,selectedCollectionsDispatch:Ee,selectedData:fe,setSaveDisabled:pe,searchInCollectionFetcher:R.searchInCollectionFetcher,hideProductCheckbox:P,outOfStockAction:T,hideVariantCheckbox:D,selectProductsFromCustomCollection:q,renderWithoutModal:w,pickerType:M,hideProductVariants:V,fbStatusFetcher:R.fbStatusFetcher,onProductDetailClick:e=>{Ie(!0),Fe(e)},showProductDetailInfoIcon:K,scrollContainerRef:ve})})),"view"===te&&e.jsxRuntimeExports.jsx(S.SelectedScreen,{selectedCollections:fe||{},selectedCollectionsDispatch:Ee,setScreen:oe,collections:Z,hideProductVariants:V,outOfStockAction:T,storeId:b,appType:X,fbStatusFetcher:R.fbStatusFetcher}),"rearrange"===te&&e.jsxRuntimeExports.jsx(h.RearrangeScreen,{selectedCollections:fe||{},selectedCollectionsDispatch:Ee,setScreen:oe,outOfStockAction:T,rearrangeViewType:"grid"===se?"list":"grid",scrollContainerRef:ve,storeId:b,appType:X,fbStatusFetcher:R.fbStatusFetcher}),"searchProducts"===te&&e.jsxRuntimeExports.jsx(m.SearchScreen,{customCollectionRestriction:R.customCollectionRestriction,selectedCollections:fe||{},searchedCollections:Re||{},searchedCollectionsDispatch:be,selectedCollectionsDispatch:Ee,setScreen:oe,collections:Z,onBackPress:()=>{me(""),be({type:"set",data:{collections:{},products:{}}})},pickerType:M,hideProductCheckbox:P,hideProductVariants:V,hideVariantCheckbox:D,storeId:b,appType:X,fbStatusFetcher:R.fbStatusFetcher,setCollectionId:ne,setSelectedCollectionId:le,renderWithoutModal:w,hideCollectionCheckbox:F,outOfStockAction:T,limit:O,exactLimit:I})]}))]}));return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:w?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[qe,U.renderFooter?e.jsxRuntimeExports.jsxs(C.StyledFooterForNonModal,{children:[Te(),e.jsxRuntimeExports.jsx(n.Button,{buttonText:De(U.primaryButtonText),disabled:!U.isLoading&&(ue||xe<1||I&&xe<I||!I&&O&&xe>O)||U.primaryButtonDisabled,isLoading:U.isLoading,onClick:()=>{R.onAdd(fe,xe),Pe(),oe([g.ScreenName.Collections,g.ScreenName.RearrangeProducts].includes(z)?z:g.ScreenName.Collections)}})]}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),ke&&Oe?e.jsxRuntimeExports.jsx(p.ProductInfoOverlay,{productData:Oe,outOfStockAction:T,useDynamicInfoImageSize:R.useDynamicInfoImageSize,onClose:()=>{Ie(!1)}}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})]}):e.jsxRuntimeExports.jsxs(l.StyledModal,Object.assign({zIndex:k,open:v,onClose:()=>{null==E||E(),Pe()},headingTitle:L||("collections"===te||"products"===te?"Select Products":"view"===te?"Selected Products":"searchProducts"===te?"Searched Results":"rearrange"===te?"Rearrange Products":void 0),headingSubtitle:Q,footerShadow:!0,centralContainerStyles:{width:A||"600px",left:B||"auto"},headerRightCustomElement:G?e.jsxRuntimeExports.jsx("div",Object.assign({style:{cursor:"pointer",display:"flex"},onClick:E},{children:e.jsxRuntimeExports.jsx(c.default,{width:20,height:20,color:r.COLORS.content.secondary})})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),footerContainerStyle:R.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:r.COLORS.surface.standard}:void 0,primaryButton:Y?(e=>Object.assign(Object.assign({},e),{disabled:!e.isLoading&&(ue||xe<1||I&&xe<I||!I&&O&&xe>O)||e.disabled,onClick:()=>{R.onAdd(fe,xe),Pe(),oe([g.ScreenName.Collections,g.ScreenName.RearrangeProducts].includes(z)?z:g.ScreenName.Collections)}}))(Y):{buttonText:De(),disabled:ue||xe<1||I&&xe<I||!I&&O&&xe>O||!1,onClick:()=>{R.onAdd(fe,xe),Pe()}},secondaryButton:J?(e=>Object.assign(Object.assign({},e),{disabled:ue||xe<1||I&&xe<I||!I&&O&&xe>O||!1,onClick:()=>{const e=y.updateAllVariantsForSelectedProducts(fe,Z,Re);R.onAdd(e,xe,!0)}}))(J):void 0,wrapperStyle:R.stickyFooter?{height:"calc(100vh - 168px)"}:void 0,footerLeftCustomElement:N?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}):Te(),hideCrossButton:ke||G},{children:[qe,ke&&Oe?e.jsxRuntimeExports.jsx(p.ProductInfoOverlay,{productData:Oe,useDynamicInfoImageSize:R.useDynamicInfoImageSize,outOfStockAction:T,onClose:()=>{Ie(!1)}}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})]}))})};
@@ -26,6 +26,8 @@ interface SearchScreenInterface {
26
26
  hideCollectionCheckbox?: boolean;
27
27
  renderWithoutModal?: boolean;
28
28
  outOfStockAction?: OUT_OF_STOCK_ACTION;
29
+ limit?: number;
30
+ exactLimit?: number;
29
31
  }
30
32
  export declare const SearchScreen: (props: SearchScreenInterface) => import("react/jsx-runtime").JSX.Element;
31
33
  export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("../../assets/icons/arrow_left.svg.js"),o=require("react"),s=require("../icon-button/IconButton.js"),i=require("../TypographyStyle.js"),l=require("./collectionScreen.js"),c=require("./emptyState.js"),r=require("./product.js"),d=require("./style.js"),n=require("./utility.js");exports.SearchScreen=u=>{var a;const{customCollectionRestriction:p,selectedCollections:x,searchedCollections:h,searchedCollectionsDispatch:j,selectedCollectionsDispatch:v,setScreen:C,collections:m,onBackPress:y,hideVariantCheckbox:k,pickerType:b,hideProductVariants:S,hideProductCheckbox:R,storeId:E,fbStatusFetcher:P,setCollectionId:f,setSelectedCollectionId:O,hideCollectionCheckbox:g,renderWithoutModal:I,outOfStockAction:q,appType:D}=u;o.useEffect((()=>{var e;n.fetchFbStatusCollection(null!==(e=h.products)&&void 0!==e?e:{},E,D,j,P,"setProducts")}),[null==h?void 0:h.products]);const T=!!p&&(null==x?void 0:x.isCustom);return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs(d.SelectedScreenHeader,{children:[e.jsxRuntimeExports.jsx(s.IconButton,{Icon:t.default,onClick:()=>{C("collections"),y()}}),e.jsxRuntimeExports.jsx(i.BodyCaption,{children:(null===(a=Object.keys(null==h?void 0:h.collections))||void 0===a?void 0:a.length)?"Searched Collections & Products":"Searched Products"})]}),e.jsxRuntimeExports.jsx("div",{children:Object.keys(null==h?void 0:h.products).length||Object.keys(null==h?void 0:h.collections).length?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:Object.keys(null==h?void 0:h.collections).map((t=>e.jsxRuntimeExports.jsx(l.CollectionCard,{customCollectionRestriction:p,data:null==m?void 0:m[t],isDisabled:T&&!(null==x?void 0:x[t]),isChecked:!!(null==x?void 0:x[t]),isPartiallyChecked:n.isCollectionPartiallyChecked(t,null==m?void 0:m[t],x,S),selectedCollectionsDispatch:v,setCollectionId:f,setSelectedCollectionId:O,setScreen:C,id:t,hideCollectionCheckbox:g||"-1"===t,selectedCollections:x,renderWithoutModal:I,pickerType:b,usedInSearch:!0},t)))}),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:Object.keys(null==h?void 0:h.products).map((t=>{var o,s;return Object.keys((null===(s=null===(o=null==h?void 0:h.products)||void 0===o?void 0:o[t])||void 0===s?void 0:s.products)||[]).map((o=>{var s,i,l;let c=!1;return(null===(s=null==h?void 0:h.products)||void 0===s?void 0:s.isCustom)&&(c=!0),e.jsxRuntimeExports.jsx(r.ProductGroup,{collectionId:t,upliftAdditions:(e,o)=>((e,t,o)=>{var s;const i=n.liftTheStateUp(o,null===(s=null==h?void 0:h.products)||void 0===s?void 0:s[e]);v({type:t,data:Object.assign(Object.assign({},i),{isRestricted:p})})})(t,e,o),productId:o,data:(null===(i=null==h?void 0:h.products)||void 0===i?void 0:i[t].products)[o],isProductPartiallyChecked:n.isProductPartiallyChecked(t,o,x,null===(l=h.products)||void 0===l?void 0:l[t],S),selectedData:x,selectedCollectionsDispatch:v,viewOnly:c,hideProductCheckbox:R,hideVariantCheckbox:k,hideProductVariants:S,pickerType:b,outOfStockAction:q},o)}))}))})]}):e.jsxRuntimeExports.jsx(c.EmptyState,{title:"No search results found",subtitle:"We couldn’t find the product you were looking for."})})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("../../assets/icons/arrow_left.svg.js"),o=require("react"),i=require("../icon-button/IconButton.js"),s=require("../TypographyStyle.js"),l=require("./collectionScreen.js"),c=require("./emptyState.js"),r=require("./product.js"),n=require("./style.js"),d=require("./utility.js");exports.SearchScreen=u=>{var a;const{customCollectionRestriction:p,selectedCollections:x,searchedCollections:h,searchedCollectionsDispatch:j,selectedCollectionsDispatch:v,setScreen:C,collections:m,onBackPress:y,hideVariantCheckbox:k,pickerType:b,hideProductVariants:S,hideProductCheckbox:E,storeId:R,fbStatusFetcher:P,setCollectionId:f,setSelectedCollectionId:O,hideCollectionCheckbox:g,renderWithoutModal:I,outOfStockAction:q,appType:T,limit:D,exactLimit:F}=u;o.useEffect((()=>{var e;d.fetchFbStatusCollection(null!==(e=h.products)&&void 0!==e?e:{},R,T,j,P,"setProducts")}),[null==h?void 0:h.products]);const B=!!p&&(null==x?void 0:x.isCustom),V=Object.keys(x||{}).filter((e=>"isCustom"!==e)).length;return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs(n.SelectedScreenHeader,{children:[e.jsxRuntimeExports.jsx(i.IconButton,{Icon:t.default,onClick:()=>{C("collections"),y()}}),e.jsxRuntimeExports.jsx(s.BodyCaption,{children:(null===(a=Object.keys(null==h?void 0:h.collections))||void 0===a?void 0:a.length)?"Searched Collections & Products":"Searched Products"})]}),e.jsxRuntimeExports.jsx("div",{children:Object.keys(null==h?void 0:h.products).length||Object.keys(null==h?void 0:h.collections).length?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:Object.keys(null==h?void 0:h.collections).map((t=>{const o=!!(null==x?void 0:x[t]),i="COLLECTION"===b&&!o&&(!!F&&V>=F||!!D&&V>=D);return e.jsxRuntimeExports.jsx(l.CollectionCard,{customCollectionRestriction:p,data:null==m?void 0:m[t],isDisabled:B&&!(null==x?void 0:x[t])||i,isChecked:o,isPartiallyChecked:d.isCollectionPartiallyChecked(t,null==m?void 0:m[t],x,S),selectedCollectionsDispatch:v,setCollectionId:f,setSelectedCollectionId:O,setScreen:C,id:t,hideCollectionCheckbox:g||"-1"===t,selectedCollections:x,renderWithoutModal:I,pickerType:b,usedInSearch:!0},t)}))}),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:Object.keys(null==h?void 0:h.products).map((t=>{var o,i;return Object.keys((null===(i=null===(o=null==h?void 0:h.products)||void 0===o?void 0:o[t])||void 0===i?void 0:i.products)||[]).map((o=>{var i,s,l;let c=!1;return(null===(i=null==h?void 0:h.products)||void 0===i?void 0:i.isCustom)&&(c=!0),e.jsxRuntimeExports.jsx(r.ProductGroup,{collectionId:t,upliftAdditions:(e,o)=>((e,t,o)=>{var i;const s=d.liftTheStateUp(o,null===(i=null==h?void 0:h.products)||void 0===i?void 0:i[e]);v({type:t,data:Object.assign(Object.assign({},s),{isRestricted:p})})})(t,e,o),productId:o,data:(null===(s=null==h?void 0:h.products)||void 0===s?void 0:s[t].products)[o],isProductPartiallyChecked:d.isProductPartiallyChecked(t,o,x,null===(l=h.products)||void 0===l?void 0:l[t],S),selectedData:x,selectedCollectionsDispatch:v,viewOnly:c,hideProductCheckbox:E,hideVariantCheckbox:k,hideProductVariants:S,pickerType:b,outOfStockAction:q},o)}))}))})]}):e.jsxRuntimeExports.jsx(c.EmptyState,{title:"No search results found",subtitle:"We couldn’t find the product you were looking for."})})]})};
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { WhatsNewContent } from './WhatsNew.types';
3
+ interface WhatsNewProps {
4
+ title?: string;
5
+ tooltip?: string;
6
+ searchPlaceholder?: string;
7
+ emptyStateTitle?: string;
8
+ emptyStateDescription?: string;
9
+ noResultsText?: string;
10
+ width?: string;
11
+ onContentClick?: (content: WhatsNewContent) => void;
12
+ renderCustomContent?: (content: WhatsNewContent) => React.ReactNode;
13
+ buttonTestId?: string;
14
+ iconWidth?: number;
15
+ iconHeight?: number;
16
+ customIcon?: React.ComponentType<{
17
+ width?: number;
18
+ height?: number;
19
+ color?: string;
20
+ }>;
21
+ }
22
+ export declare const WhatsNew: React.FC<WhatsNewProps>;
23
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../node_modules/react/jsx-runtime.js"),e=require("react"),n=require("./WhatsNewButton.js"),o=require("./WhatsNewPanel.js"),s=require("./WhatsNewProvider.js");exports.WhatsNew=r=>{let{title:i="What's new",tooltip:a="What's new",searchPlaceholder:u="Search posts",emptyStateTitle:c="Nothing new!",emptyStateDescription:h="There are no new updates or features at the moment. Check back soon!",noResultsText:l="Sorry, no results found.",width:d="480px",onContentClick:p,renderCustomContent:w,buttonTestId:x="whats-new-button",iconWidth:m=32,iconHeight:C=32,customIcon:j}=r;const[W,N]=e.useState(!1),{whatsNewContent:g,isLoading:S,newContentCount:y}=s.useWhatsNewContext();return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(n.WhatsNewButton,{onClick:()=>N(!0),newContentCount:y,isOpen:W,isLoading:S,tooltip:a,testId:x,iconWidth:m,iconHeight:C,customIcon:j}),t.jsxRuntimeExports.jsx(o.WhatsNewPanel,{isOpen:W,onClose:()=>N(!1),content:g,isLoading:S,title:i,searchPlaceholder:u,emptyStateTitle:c,emptyStateDescription:h,noResultsText:l,width:d,onContentClick:t=>{p&&p(t)},renderCustomContent:w})]})};
@@ -0,0 +1,11 @@
1
+ export declare const WhatsNewIconContainer: import("styled-components").StyledComponent<"div", any, {
2
+ count?: number | undefined;
3
+ }, never>;
4
+ export declare const WhatsNewWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const MainContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const MainCardContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ export declare const BackgroundImageContainer: import("styled-components").StyledComponent<"div", any, {
8
+ imageUrl: string;
9
+ height?: string | undefined;
10
+ width?: string | undefined;
11
+ }, never>;