@bikdotai/bik-component-library 0.0.744-beta.120 → 0.0.744-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/country-code-picker/CountryCodePicker.modal.js +1 -1
- package/dist/cjs/components/country-code-picker/index.d.ts +0 -1
- package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
- package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +1 -1
- package/dist/cjs/components/feature-announcements/constants/dimensions.d.ts +99 -25
- package/dist/cjs/components/feature-announcements/constants/dimensions.js +1 -1
- package/dist/cjs/components/feature-announcements/styles/joyride.styles.d.ts +2 -2
- package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.d.ts +18 -2
- package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.js +1 -1
- package/dist/cjs/components/feature-announcements/types/feature.types.d.ts +36 -0
- package/dist/cjs/components/feature-announcements/types/props.types.d.ts +25 -3
- package/dist/cjs/components/whats-new/WhatsNew.types.d.ts +8 -0
- package/dist/cjs/components/whats-new/WhatsNewPanel.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.modal.js +1 -1
- package/dist/esm/components/country-code-picker/index.d.ts +0 -1
- package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
- package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +1 -1
- package/dist/esm/components/feature-announcements/constants/dimensions.d.ts +99 -25
- package/dist/esm/components/feature-announcements/constants/dimensions.js +1 -1
- package/dist/esm/components/feature-announcements/styles/joyride.styles.d.ts +2 -2
- package/dist/esm/components/feature-announcements/styles/majorPopup.styles.d.ts +18 -2
- package/dist/esm/components/feature-announcements/styles/majorPopup.styles.js +1 -1
- package/dist/esm/components/feature-announcements/types/feature.types.d.ts +36 -0
- package/dist/esm/components/feature-announcements/types/props.types.d.ts +25 -3
- package/dist/esm/components/whats-new/WhatsNew.types.d.ts +8 -0
- package/dist/esm/components/whats-new/WhatsNewPanel.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/country-code-picker/CountryPicker.d.ts +0 -72
- package/dist/cjs/components/country-code-picker/CountryPicker.js +0 -1
- package/dist/cjs/components/country-code-picker/CountryPicker.styled.d.ts +0 -12
- package/dist/cjs/components/country-code-picker/CountryPicker.styled.js +0 -1
- package/dist/esm/components/country-code-picker/CountryPicker.d.ts +0 -72
- package/dist/esm/components/country-code-picker/CountryPicker.js +0 -1
- package/dist/esm/components/country-code-picker/CountryPicker.styled.d.ts +0 -12
- package/dist/esm/components/country-code-picker/CountryPicker.styled.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.CountriesData=[{name:"Afghanistan",dial:"+93",code:"AF",code3:"AFG"},{name:"Albania",dial:"+355",code:"AL",code3:"ALB"},{name:"Algeria",dial:"+213",code:"DZ",code3:"DZA"},{name:"Andorra",dial:"+376",code:"AD",code3:"AND"},{name:"Angola",dial:"+244",code:"AO",code3:"AGO"},{name:"Anguilla",dial:"+1264",code:"AI",code3:"AIA"},{name:"Antarctica",dial:"+672",code:"AQ",code3:"ATA"},{name:"Antigua and Barbuda",dial:"+1268",code:"AG",code3:"ATG"},{name:"Argentina",dial:"+54",code:"AR",code3:"ARG"},{name:"Armenia",dial:"+374",code:"AM",code3:"ARM"},{name:"Aruba",dial:"+297",code:"AW",code3:"ABW"},{name:"Australia",dial:"+61",code:"AU",code3:"AUS"},{name:"Austria",dial:"+43",code:"AT",code3:"AUT"},{name:"Azerbaijan",dial:"+994",code:"AZ",code3:"AZE"},{name:"Bahamas",dial:"+1242",code:"BS",code3:"BHS"},{name:"Bahrain",dial:"+973",code:"BH",code3:"BHR"},{name:"Bangladesh",dial:"+880",code:"BD",code3:"BGD"},{name:"Barbados",dial:"+1246",code:"BB",code3:"BRB"},{name:"Belarus",dial:"+375",code:"BY",code3:"BLR"},{name:"Belgium",dial:"+32",code:"BE",code3:"BEL"},{name:"Belize",dial:"+501",code:"BZ",code3:"BLZ"},{name:"Benin",dial:"+229",code:"BJ",code3:"BEN"},{name:"Bermuda",dial:"+1441",code:"BM",code3:"BMU"},{name:"Bhutan",dial:"+975",code:"BT",code3:"BTN"},{name:"Bosnia and Herzegovina",dial:"+387",code:"BA",code3:"BIH"},{name:"Botswana",dial:"+267",code:"BW",code3:"BWA"},{name:"Brazil",dial:"+55",code:"BR",code3:"BRA"},{name:"British Indian Ocean Territory",dial:"+246",code:"IO",code3:"IOT"},{name:"Bulgaria",dial:"+359",code:"BG",code3:"BGR"},{name:"Burkina Faso",dial:"+226",code:"BF",code3:"BFA"},{name:"Burundi",dial:"+257",code:"BI",code3:"BDI"},{name:"Cambodia",dial:"+855",code:"KH",code3:"KHM"},{name:"Cameroon",dial:"+237",code:"CM",code3:"CMR"},{name:"Canada",dial:"+1",code:"CA",code3:"CAN"},{name:"Cabo Verde",dial:"+238",code:"CV",code3:"CPV"},{name:"Central African Republic",dial:"+236",code:"CF",code3:"CAF"},{name:"Chad",dial:"+235",code:"TD",code3:"TCD"},{name:"Chile",dial:"+56",code:"CL",code3:"CHL"},{name:"China",dial:"+86",code:"CN",code3:"CHN"},{name:"Christmas Island",dial:"+61",code:"CX",code3:"CXR"},{name:"Colombia",dial:"+57",code:"CO",code3:"COL"},{name:"Comoros",dial:"+269",code:"KM",code3:"COM"},{name:"Cook Islands",dial:"+682",code:"CK",code3:"COK"},{name:"Costa Rica",dial:"+506",code:"CR",code3:"CRI"},{name:"Croatia",dial:"+385",code:"HR",code3:"HRV"},{name:"Cuba",dial:"+53",code:"CU",code3:"CUB"},{name:"Cyprus",dial:"+357",code:"CY",code3:"CYP"},{name:"Czechia",dial:"+420",code:"CZ",code3:"CZE"},{name:"Denmark",dial:"+45",code:"DK",code3:"DNK"},{name:"Djibouti",dial:"+253",code:"DJ",code3:"DJI"},{name:"Dominica",dial:"+1767",code:"DM",code3:"DMA"},{name:"Ecuador",dial:"+593",code:"EC",code3:"ECU"},{name:"Egypt",dial:"+20",code:"EG",code3:"EGY"},{name:"El Salvador",dial:"+503",code:"SV",code3:"SLV"},{name:"Equatorial Guinea",dial:"+240",code:"GQ",code3:"GNQ"},{name:"Eritrea",dial:"+291",code:"ER",code3:"ERI"},{name:"Estonia",dial:"+372",code:"EE",code3:"EST"},{name:"Ethiopia",dial:"+251",code:"ET",code3:"ETH"},{name:"Faroe Islands",dial:"+298",code:"FO",code3:"FRO"},{name:"Fiji",dial:"+679",code:"FJ",code3:"FJI"},{name:"Finland",dial:"+358",code:"FI",code3:"FIN"},{name:"France",dial:"+33",code:"FR",code3:"FRA"},{name:"French Polynesia",dial:"+689",code:"PF",code3:"PYF"},{name:"Gabon",dial:"+241",code:"GA",code3:"GAB"},{name:"Gambia",dial:"+220",code:"GM",code3:"GMB"},{name:"Georgia",dial:"+995",code:"GE",code3:"GEO"},{name:"Germany",dial:"+49",code:"DE",code3:"DEU"},{name:"Ghana",dial:"+233",code:"GH",code3:"GHA"},{name:"Gibraltar",dial:"+350",code:"GI",code3:"GIB"},{name:"Greece",dial:"+30",code:"GR",code3:"GRC"},{name:"Greenland",dial:"+299",code:"GL",code3:"GRL"},{name:"Grenada",dial:"+1473",code:"GD",code3:"GRD"},{name:"Guam",dial:"+1671",code:"GU",code3:"GUM"},{name:"Guatemala",dial:"+502",code:"GT",code3:"GTM"},{name:"Guinea",dial:"+224",code:"GN",code3:"GIN"},{name:"Guinea-Bissau",dial:"+245",code:"GW",code3:"GNB"},{name:"Haiti",dial:"+509",code:"HT",code3:"HTI"},{name:"Honduras",dial:"+504",code:"HN",code3:"HND"},{name:"Hong Kong",dial:"+852",code:"HK",code3:"HKG"},{name:"Hungary",dial:"+36",code:"HU",code3:"HUN"},{name:"Iceland",dial:"+354",code:"IS",code3:"ISL"},{name:"India",dial:"+91",code:"IN",code3:"IND"},{name:"Indonesia",dial:"+62",code:"ID",code3:"IDN"},{name:"Iraq",dial:"+964",code:"IQ",code3:"IRQ"},{name:"Ireland",dial:"+353",code:"IE",code3:"IRL"},{name:"Israel",dial:"+972",code:"IL",code3:"ISR"},{name:"Italy",dial:"+39",code:"IT",code3:"ITA"},{name:"Jamaica",dial:"+1876",code:"JM",code3:"JAM"},{name:"Japan",dial:"+81",code:"JP",code3:"JPN"},{name:"Jordan",dial:"+962",code:"JO",code3:"JOR"},{name:"Kenya",dial:"+254",code:"KE",code3:"KEN"},{name:"Kiribati",dial:"+686",code:"KI",code3:"KIR"},{name:"Kuwait",dial:"+965",code:"KW",code3:"KWT"},{name:"Kyrgyzstan",dial:"+996",code:"KG",code3:"KGZ"},{name:"Laos",dial:"+856",code:"LA",code3:"LAO"},{name:"Latvia",dial:"+371",code:"LV",code3:"LVA"},{name:"Lebanon",dial:"+961",code:"LB",code3:"LBN"},{name:"Lesotho",dial:"+266",code:"LS",code3:"LSO"},{name:"Liberia",dial:"+231",code:"LR",code3:"LBR"},{name:"Liechtenstein",dial:"+423",code:"LI",code3:"LIE"},{name:"Lithuania",dial:"+370",code:"LT",code3:"LTU"},{name:"Luxembourg",dial:"+352",code:"LU",code3:"LUX"},{name:"Macao",dial:"+853",code:"MO",code3:"MAC"},{name:"Macedonia",dial:"+389",code:"MK",code3:"MKD"},{name:"Madagascar",dial:"+261",code:"MG",code3:"MDG"},{name:"Malawi",dial:"+265",code:"MW",code3:"MWI"},{name:"Malaysia",dial:"+60",code:"MY",code3:"MYS"},{name:"Maldives",dial:"+960",code:"MV",code3:"MDV"},{name:"Mali",dial:"+223",code:"ML",code3:"MLI"},{name:"Malta",dial:"+356",code:"MT",code3:"MLT"},{name:"Marshall Islands",dial:"+692",code:"MH",code3:"MHL"},{name:"Mauritania",dial:"+222",code:"MR",code3:"MRT"},{name:"Mauritius",dial:"+230",code:"MU",code3:"MUS"},{name:"Mayotte",dial:"+262",code:"YT",code3:"MYT"},{name:"Mexico",dial:"+52",code:"MX",code3:"MEX"},{name:"Moldova",dial:"+373",code:"MD",code3:"MDA"},{name:"Monaco",dial:"+377",code:"MC",code3:"MCO"},{name:"Mongolia",dial:"+976",code:"MN",code3:"MNG"},{name:"Montenegro",dial:"+382",code:"ME",code3:"MNE"},{name:"Montserrat",dial:"+1664",code:"MS",code3:"MSR"},{name:"Morocco",dial:"+212",code:"MA",code3:"MAR"},{name:"Mozambique",dial:"+258",code:"MZ",code3:"MOZ"},{name:"Myanmar",dial:"+95",code:"MM",code3:"MMR"},{name:"Namibia",dial:"+264",code:"NA",code3:"NAM"},{name:"Nauru",dial:"+674",code:"NR",code3:"NRU"},{name:"Nepal",dial:"+977",code:"NP",code3:"NPL"},{name:"Netherlands",dial:"+31",code:"NL",code3:"NLD"},{name:"Netherlands Antilles",dial:"+599",code:"AN",code3:"ANT"},{name:"New Caledonia",dial:"+687",code:"NC",code3:"NCL"},{name:"New Zealand",dial:"+64",code:"NZ",code3:"NZL"},{name:"Nicaragua",dial:"+505",code:"NI",code3:"NIC"},{name:"Niger",dial:"+227",code:"NE",code3:"NER"},{name:"Nigeria",dial:"+234",code:"NG",code3:"NGA"},{name:"Niue",dial:"+683",code:"NU",code3:"NIU"},{name:"Norfolk Island",dial:"+672",code:"NF",code3:"NFK"},{name:"Northern Mariana Islands",dial:"+1670",code:"MP",code3:"MNP"},{name:"Norway",dial:"+47",code:"NO",code3:"NOR"},{name:"Oman",dial:"+968",code:"OM",code3:"OMN"},{name:"Pakistan",dial:"+92",code:"PK",code3:"PAK"},{name:"Palau",dial:"+680",code:"PW",code3:"PLW"},{name:"Panama",dial:"+507",code:"PA",code3:"PAN"},{name:"Papua New Guinea",dial:"+675",code:"PG",code3:"PNG"},{name:"Paraguay",dial:"+595",code:"PY",code3:"PRY"},{name:"Peru",dial:"+51",code:"PE",code3:"PER"},{name:"Philippines",dial:"+63",code:"PH",code3:"PHL"},{name:"Poland",dial:"+48",code:"PL",code3:"POL"},{name:"Portugal",dial:"+351",code:"PT",code3:"PRT"},{name:"Romania",dial:"+40",code:"RO",code3:"ROU"},{name:"Russia",dial:"+7",code:"RU",code3:"RUS"},{name:"Rwanda",dial:"+250",code:"RW",code3:"RWA"},{name:"Saint Kitts and Nevis",dial:"+1869",code:"KN",code3:"KNA"},{name:"Saint Lucia",dial:"+1758",code:"LC",code3:"LCA"},{name:"Saint Pierre and Miquelon",dial:"+508",code:"PM",code3:"SPM"},{name:"Saint Vincent and the Grenadines",dial:"+1784",code:"VC",code3:"VCT"},{name:"Samoa",dial:"+685",code:"WS",code3:"WSM"},{name:"San Marino",dial:"+378",code:"SM",code3:"SMR"},{name:"Sao Tome and Principe",dial:"+239",code:"ST",code3:"STP"},{name:"Saudi Arabia",dial:"+966",code:"SA",code3:"SAU"},{name:"Senegal",dial:"+221",code:"SN",code3:"SEN"},{name:"Serbia",dial:"+381",code:"RS",code3:"SRB"},{name:"Seychelles",dial:"+248",code:"SC",code3:"SYC"},{name:"Sierra Leone",dial:"+232",code:"SL",code3:"SLE"},{name:"Singapore",dial:"+65",code:"SG",code3:"SGP"},{name:"Slovakia",dial:"+421",code:"SK",code3:"SVK"},{name:"Slovenia",dial:"+386",code:"SI",code3:"SVN"},{name:"Solomon Islands",dial:"+677",code:"SB",code3:"SLB"},{name:"Somalia",dial:"+252",code:"SO",code3:"SOM"},{name:"South Africa",dial:"+27",code:"ZA",code3:"ZAF"},{name:"South Sudan",dial:"+211",code:"SS",code3:"SSD"},{name:"South Georgia and the South Sandwich Islands",dial:"+500",code:"GS",code3:"SGS"},{name:"Spain",dial:"+34",code:"ES",code3:"ESP"},{name:"Sri Lanka",dial:"+94",code:"LK",code3:"LKA"},{name:"Sudan",dial:"+249",code:"SD",code3:"SDN"},{name:"Suriname",dial:"+597",code:"SR",code3:"SUR"},{name:"Svalbard and Jan Mayen",dial:"+47",code:"SJ",code3:"SJM"},{name:"Sweden",dial:"+46",code:"SE",code3:"SWE"},{name:"Switzerland",dial:"+41",code:"CH",code3:"CHE"},{name:"Syria",dial:"+963",code:"SY",code3:"SYR"},{name:"Taiwan",dial:"+886",code:"TW",code3:"TWN"},{name:"Tajikistan",dial:"+992",code:"TJ",code3:"TJK"},{name:"Thailand",dial:"+66",code:"TH",code3:"THA"},{name:"Timor-Leste",dial:"+670",code:"TL",code3:"TLS"},{name:"Togo",dial:"+228",code:"TG",code3:"TGO"},{name:"Tokelau",dial:"+690",code:"TK",code3:"TKL"},{name:"Tonga",dial:"+676",code:"TO",code3:"TON"},{name:"Trinidad and Tobago",dial:"+1868",code:"TT",code3:"TTO"},{name:"Tunisia",dial:"+216",code:"TN",code3:"TUN"},{name:"Türkiye",dial:"+90",code:"TR",code3:"TUR"},{name:"Turkmenistan",dial:"+993",code:"TM",code3:"TKM"},{name:"Turks and Caicos Islands",dial:"+1649",code:"TC",code3:"TCA"},{name:"Tuvalu",dial:"+688",code:"TV",code3:"TUV"},{name:"Uganda",dial:"+256",code:"UG",code3:"UGA"},{name:"Ukraine",dial:"+380",code:"UA",code3:"UKR"},{name:"United Arab Emirates",dial:"+971",code:"AE",code3:"ARE"},{name:"United Kingdom",dial:"+44",code:"GB",code3:"GBR"},{name:"United States of America",dial:"+1",code:"US",code3:"USA"},{name:"Uruguay",dial:"+598",code:"UY",code3:"URY"},{name:"Uzbekistan",dial:"+998",code:"UZ",code3:"UZB"},{name:"Vanuatu",dial:"+678",code:"VU",code3:"VUT"},{name:"Vietnam",dial:"+84",code:"VN",code3:"VNM"},{name:"Virgin Islands, British",dial:"+1284",code:"VG",code3:"VGB"},{name:"Virgin Islands, U.S.",dial:"+1340",code:"VI",code3:"VIR"},{name:"Wallis and Futuna",dial:"+681",code:"WF",code3:"WLF"},{name:"Yemen",dial:"+967",code:"YE",code3:"YEM"},{name:"Zambia",dial:"+260",code:"ZM",code3:"ZMB"},{name:"Zimbabwe",dial:"+263",code:"ZW",code3:"ZWE"},{name:"South Korea",dial:"+82",code:"KR",code3:"KOR"},{name:"North Korea",dial:"+850",code:"KP",code3:"PRK"},{name:"Venezuela",dial:"+58",code:"VE",code3:"VEN"}];
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.CountriesData=[{name:"Afghanistan",dial:"+93",code:"AF",code3:"AFG"},{name:"Albania",dial:"+355",code:"AL",code3:"ALB"},{name:"Algeria",dial:"+213",code:"DZ",code3:"DZA"},{name:"Andorra",dial:"+376",code:"AD",code3:"AND"},{name:"Angola",dial:"+244",code:"AO",code3:"AGO"},{name:"Anguilla",dial:"+1264",code:"AI",code3:"AIA"},{name:"Antarctica",dial:"+672",code:"AQ",code3:"ATA"},{name:"Antigua and Barbuda",dial:"+1268",code:"AG",code3:"ATG"},{name:"Argentina",dial:"+54",code:"AR",code3:"ARG"},{name:"Armenia",dial:"+374",code:"AM",code3:"ARM"},{name:"Aruba",dial:"+297",code:"AW",code3:"ABW"},{name:"Australia",dial:"+61",code:"AU",code3:"AUS"},{name:"Austria",dial:"+43",code:"AT",code3:"AUT"},{name:"Azerbaijan",dial:"+994",code:"AZ",code3:"AZE"},{name:"Bahamas",dial:"+1242",code:"BS",code3:"BHS"},{name:"Bahrain",dial:"+973",code:"BH",code3:"BHR"},{name:"Bangladesh",dial:"+880",code:"BD",code3:"BGD"},{name:"Barbados",dial:"+1246",code:"BB",code3:"BRB"},{name:"Belarus",dial:"+375",code:"BY",code3:"BLR"},{name:"Belgium",dial:"+32",code:"BE",code3:"BEL"},{name:"Belize",dial:"+501",code:"BZ",code3:"BLZ"},{name:"Benin",dial:"+229",code:"BJ",code3:"BEN"},{name:"Bermuda",dial:"+1441",code:"BM",code3:"BMU"},{name:"Bhutan",dial:"+975",code:"BT",code3:"BTN"},{name:"Bosnia and Herzegovina",dial:"+387",code:"BA",code3:"BIH"},{name:"Botswana",dial:"+267",code:"BW",code3:"BWA"},{name:"Brazil",dial:"+55",code:"BR",code3:"BRA"},{name:"British Indian Ocean Territory",dial:"+246",code:"IO",code3:"IOT"},{name:"Bulgaria",dial:"+359",code:"BG",code3:"BGR"},{name:"Burkina Faso",dial:"+226",code:"BF",code3:"BFA"},{name:"Burundi",dial:"+257",code:"BI",code3:"BDI"},{name:"Cambodia",dial:"+855",code:"KH",code3:"KHM"},{name:"Cameroon",dial:"+237",code:"CM",code3:"CMR"},{name:"Canada",dial:"+1",code:"CA",code3:"CAN"},{name:"Cape Verde",dial:"+238",code:"CV",code3:"CPV"},{name:"Central African Republic",dial:"+236",code:"CF",code3:"CAF"},{name:"Chad",dial:"+235",code:"TD",code3:"TCD"},{name:"Chile",dial:"+56",code:"CL",code3:"CHL"},{name:"China",dial:"+86",code:"CN",code3:"CHN"},{name:"Christmas Island",dial:"+61",code:"CX",code3:"CXR"},{name:"Colombia",dial:"+57",code:"CO",code3:"COL"},{name:"Comoros",dial:"+269",code:"KM",code3:"COM"},{name:"Cook Islands",dial:"+682",code:"CK",code3:"COK"},{name:"Costa Rica",dial:"+506",code:"CR",code3:"CRI"},{name:"Croatia",dial:"+385",code:"HR",code3:"HRV"},{name:"Cuba",dial:"+53",code:"CU",code3:"CUB"},{name:"Cyprus",dial:"+357",code:"CY",code3:"CYP"},{name:"Czech Republic",dial:"+420",code:"CZ",code3:"CZE"},{name:"Denmark",dial:"+45",code:"DK",code3:"DNK"},{name:"Djibouti",dial:"+253",code:"DJ",code3:"DJI"},{name:"Dominica",dial:"+1767",code:"DM",code3:"DMA"},{name:"Ecuador",dial:"+593",code:"EC",code3:"ECU"},{name:"Egypt",dial:"+20",code:"EG",code3:"EGY"},{name:"El Salvador",dial:"+503",code:"SV",code3:"SLV"},{name:"Equatorial Guinea",dial:"+240",code:"GQ",code3:"GNQ"},{name:"Eritrea",dial:"+291",code:"ER",code3:"ERI"},{name:"Estonia",dial:"+372",code:"EE",code3:"EST"},{name:"Ethiopia",dial:"+251",code:"ET",code3:"ETH"},{name:"Faroe Islands",dial:"+298",code:"FO",code3:"FRO"},{name:"Fiji",dial:"+679",code:"FJ",code3:"FJI"},{name:"Finland",dial:"+358",code:"FI",code3:"FIN"},{name:"France",dial:"+33",code:"FR",code3:"FRA"},{name:"French Polynesia",dial:"+689",code:"PF",code3:"PYF"},{name:"Gabon",dial:"+241",code:"GA",code3:"GAB"},{name:"Gambia",dial:"+220",code:"GM",code3:"GMB"},{name:"Georgia",dial:"+995",code:"GE",code3:"GEO"},{name:"Germany",dial:"+49",code:"DE",code3:"DEU"},{name:"Ghana",dial:"+233",code:"GH",code3:"GHA"},{name:"Gibraltar",dial:"+350",code:"GI",code3:"GIB"},{name:"Greece",dial:"+30",code:"GR",code3:"GRC"},{name:"Greenland",dial:"+299",code:"GL",code3:"GRL"},{name:"Grenada",dial:"+1473",code:"GD",code3:"GRD"},{name:"Guam",dial:"+1671",code:"GU",code3:"GUM"},{name:"Guatemala",dial:"+502",code:"GT",code3:"GTM"},{name:"Guinea",dial:"+224",code:"GN",code3:"GIN"},{name:"Guinea-Bissau",dial:"+245",code:"GW",code3:"GNB"},{name:"Haiti",dial:"+509",code:"HT",code3:"HTI"},{name:"Honduras",dial:"+504",code:"HN",code3:"HND"},{name:"Hong Kong",dial:"+852",code:"HK",code3:"HKG"},{name:"Hungary",dial:"+36",code:"HU",code3:"HUN"},{name:"Iceland",dial:"+354",code:"IS",code3:"ISL"},{name:"India",dial:"+91",code:"IN",code3:"IND"},{name:"Indonesia",dial:"+62",code:"ID",code3:"IDN"},{name:"Iraq",dial:"+964",code:"IQ",code3:"IRQ"},{name:"Ireland",dial:"+353",code:"IE",code3:"IRL"},{name:"Israel",dial:"+972",code:"IL",code3:"ISR"},{name:"Italy",dial:"+39",code:"IT",code3:"ITA"},{name:"Jamaica",dial:"+1876",code:"JM",code3:"JAM"},{name:"Japan",dial:"+81",code:"JP",code3:"JPN"},{name:"Jordan",dial:"+962",code:"JO",code3:"JOR"},{name:"Kenya",dial:"+254",code:"KE",code3:"KEN"},{name:"Kiribati",dial:"+686",code:"KI",code3:"KIR"},{name:"Kuwait",dial:"+965",code:"KW",code3:"KWT"},{name:"Kyrgyzstan",dial:"+996",code:"KG",code3:"KGZ"},{name:"Laos",dial:"+856",code:"LA",code3:"LAO"},{name:"Latvia",dial:"+371",code:"LV",code3:"LVA"},{name:"Lebanon",dial:"+961",code:"LB",code3:"LBN"},{name:"Lesotho",dial:"+266",code:"LS",code3:"LSO"},{name:"Liberia",dial:"+231",code:"LR",code3:"LBR"},{name:"Liechtenstein",dial:"+423",code:"LI",code3:"LIE"},{name:"Lithuania",dial:"+370",code:"LT",code3:"LTU"},{name:"Luxembourg",dial:"+352",code:"LU",code3:"LUX"},{name:"Macao",dial:"+853",code:"MO",code3:"MAC"},{name:"Macedonia",dial:"+389",code:"MK",code3:"MKD"},{name:"Madagascar",dial:"+261",code:"MG",code3:"MDG"},{name:"Malawi",dial:"+265",code:"MW",code3:"MWI"},{name:"Malaysia",dial:"+60",code:"MY",code3:"MYS"},{name:"Maldives",dial:"+960",code:"MV",code3:"MDV"},{name:"Mali",dial:"+223",code:"ML",code3:"MLI"},{name:"Malta",dial:"+356",code:"MT",code3:"MLT"},{name:"Marshall Islands",dial:"+692",code:"MH",code3:"MHL"},{name:"Mauritania",dial:"+222",code:"MR",code3:"MRT"},{name:"Mauritius",dial:"+230",code:"MU",code3:"MUS"},{name:"Mayotte",dial:"+262",code:"YT",code3:"MYT"},{name:"Mexico",dial:"+52",code:"MX",code3:"MEX"},{name:"Moldova",dial:"+373",code:"MD",code3:"MDA"},{name:"Monaco",dial:"+377",code:"MC",code3:"MCO"},{name:"Mongolia",dial:"+976",code:"MN",code3:"MNG"},{name:"Montenegro",dial:"+382",code:"ME",code3:"MNE"},{name:"Montserrat",dial:"+1664",code:"MS",code3:"MSR"},{name:"Morocco",dial:"+212",code:"MA",code3:"MAR"},{name:"Mozambique",dial:"+258",code:"MZ",code3:"MOZ"},{name:"Myanmar",dial:"+95",code:"MM",code3:"MMR"},{name:"Namibia",dial:"+264",code:"NA",code3:"NAM"},{name:"Nauru",dial:"+674",code:"NR",code3:"NRU"},{name:"Nepal",dial:"+977",code:"NP",code3:"NPL"},{name:"Netherlands",dial:"+31",code:"NL",code3:"NLD"},{name:"Netherlands Antilles",dial:"+599",code:"AN",code3:"ANT"},{name:"New Caledonia",dial:"+687",code:"NC",code3:"NCL"},{name:"New Zealand",dial:"+64",code:"NZ",code3:"NZL"},{name:"Nicaragua",dial:"+505",code:"NI",code3:"NIC"},{name:"Niger",dial:"+227",code:"NE",code3:"NER"},{name:"Nigeria",dial:"+234",code:"NG",code3:"NGA"},{name:"Niue",dial:"+683",code:"NU",code3:"NIU"},{name:"Norfolk Island",dial:"+672",code:"NF",code3:"NFK"},{name:"Northern Mariana Islands",dial:"+1670",code:"MP",code3:"MNP"},{name:"Norway",dial:"+47",code:"NO",code3:"NOR"},{name:"Oman",dial:"+968",code:"OM",code3:"OMN"},{name:"Pakistan",dial:"+92",code:"PK",code3:"PAK"},{name:"Palau",dial:"+680",code:"PW",code3:"PLW"},{name:"Panama",dial:"+507",code:"PA",code3:"PAN"},{name:"Papua New Guinea",dial:"+675",code:"PG",code3:"PNG"},{name:"Paraguay",dial:"+595",code:"PY",code3:"PRY"},{name:"Peru",dial:"+51",code:"PE",code3:"PER"},{name:"Philippines",dial:"+63",code:"PH",code3:"PHL"},{name:"Poland",dial:"+48",code:"PL",code3:"POL"},{name:"Portugal",dial:"+351",code:"PT",code3:"PRT"},{name:"Romania",dial:"+40",code:"RO",code3:"ROU"},{name:"Russia",dial:"+7",code:"RU",code3:"RUS"},{name:"Rwanda",dial:"+250",code:"RW",code3:"RWA"},{name:"Saint Kitts and Nevis",dial:"+1869",code:"KN",code3:"KNA"},{name:"Saint Lucia",dial:"+1758",code:"LC",code3:"LCA"},{name:"Saint Pierre and Miquelon",dial:"+508",code:"PM",code3:"SPM"},{name:"Saint Vincent and the Grenadines",dial:"+1784",code:"VC",code3:"VCT"},{name:"Samoa",dial:"+685",code:"WS",code3:"WSM"},{name:"San Marino",dial:"+378",code:"SM",code3:"SMR"},{name:"Sao Tome and Principe",dial:"+239",code:"ST",code3:"STP"},{name:"Saudi Arabia",dial:"+966",code:"SA",code3:"SAU"},{name:"Senegal",dial:"+221",code:"SN",code3:"SEN"},{name:"Serbia",dial:"+381",code:"RS",code3:"SRB"},{name:"Seychelles",dial:"+248",code:"SC",code3:"SYC"},{name:"Sierra Leone",dial:"+232",code:"SL",code3:"SLE"},{name:"Singapore",dial:"+65",code:"SG",code3:"SGP"},{name:"Slovakia",dial:"+421",code:"SK",code3:"SVK"},{name:"Slovenia",dial:"+386",code:"SI",code3:"SVN"},{name:"Solomon Islands",dial:"+677",code:"SB",code3:"SLB"},{name:"Somalia",dial:"+252",code:"SO",code3:"SOM"},{name:"South Africa",dial:"+27",code:"ZA",code3:"ZAF"},{name:"South Sudan",dial:"+211",code:"SS",code3:"SSD"},{name:"South Georgia and the South Sandwich Islands",dial:"+500",code:"GS",code3:"SGS"},{name:"Spain",dial:"+34",code:"ES",code3:"ESP"},{name:"Sri Lanka",dial:"+94",code:"LK",code3:"LKA"},{name:"Sudan",dial:"+249",code:"SD",code3:"SDN"},{name:"Suriname",dial:"+597",code:"SR",code3:"SUR"},{name:"Svalbard and Jan Mayen",dial:"+47",code:"SJ",code3:"SJM"},{name:"Sweden",dial:"+46",code:"SE",code3:"SWE"},{name:"Switzerland",dial:"+41",code:"CH",code3:"CHE"},{name:"Syrian Arab Republic",dial:"+963",code:"SY",code3:"SYR"},{name:"Taiwan",dial:"+886",code:"TW",code3:"TWN"},{name:"Tajikistan",dial:"+992",code:"TJ",code3:"TJK"},{name:"Thailand",dial:"+66",code:"TH",code3:"THA"},{name:"Timor-Leste",dial:"+670",code:"TL",code3:"TLS"},{name:"Togo",dial:"+228",code:"TG",code3:"TGO"},{name:"Tokelau",dial:"+690",code:"TK",code3:"TKL"},{name:"Tonga",dial:"+676",code:"TO",code3:"TON"},{name:"Trinidad and Tobago",dial:"+1868",code:"TT",code3:"TTO"},{name:"Tunisia",dial:"+216",code:"TN",code3:"TUN"},{name:"Turkey",dial:"+90",code:"TR",code3:"TUR"},{name:"Turkmenistan",dial:"+993",code:"TM",code3:"TKM"},{name:"Turks and Caicos Islands",dial:"+1649",code:"TC",code3:"TCA"},{name:"Tuvalu",dial:"+688",code:"TV",code3:"TUV"},{name:"Uganda",dial:"+256",code:"UG",code3:"UGA"},{name:"Ukraine",dial:"+380",code:"UA",code3:"UKR"},{name:"United Arab Emirates",dial:"+971",code:"AE",code3:"ARE"},{name:"United Kingdom",dial:"+44",code:"GB",code3:"GBR"},{name:"United States",dial:"+1",code:"US",code3:"USA"},{name:"Uruguay",dial:"+598",code:"UY",code3:"URY"},{name:"Uzbekistan",dial:"+998",code:"UZ",code3:"UZB"},{name:"Vanuatu",dial:"+678",code:"VU",code3:"VUT"},{name:"Vietnam",dial:"+84",code:"VN",code3:"VNM"},{name:"Virgin Islands, British",dial:"+1284",code:"VG",code3:"VGB"},{name:"Virgin Islands, U.S.",dial:"+1340",code:"VI",code3:"VIR"},{name:"Wallis and Futuna",dial:"+681",code:"WF",code3:"WLF"},{name:"Yemen",dial:"+967",code:"YE",code3:"YEM"},{name:"Zambia",dial:"+260",code:"ZM",code3:"ZMB"},{name:"Zimbabwe",dial:"+263",code:"ZW",code3:"ZWE"},{name:"Korea, Republic of South Korea",dial:"+82",code:"KR",code3:"KOR"},{name:"AmericanSamoa",dial:"+1684",code:"AS",code3:"ASM"},{name:"Korea, Democratic People's Republic of Korea",dial:"+850",code:"KP",code3:"PRK"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial:"+58",code:"VE",code3:"VEN"},{name:"Virgin Islands, British",dial:"+1284",code:"VG",code3:"VGB"}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),o=require("react"),n=require("react-joyride");require("./constants/animations.js");var a=require("./constants/selectors.js"),r=require("./hooks/useFeatureAnnouncements.js"),s=require("./MajorUpdatePopup.js"),i=require("./MinorUpdatePopup.js"),l=require("./VideoModal.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(n);exports.default=d=>{let{children:c,fetchVisibleFeatures:p,getStoreFeatureProgress:f,fetchFeatureById:b,markFeatureAsViewedForStore:g,isFeatureApplicableToCurrentPage:h,module:m,router:y}=d;var S;const{majorUpdateFeatures:x,minorUpdateFeatures:C,isLoading:k,markFeatureAsViewed:T}=r.useFeatureAnnouncements({fetchVisibleFeatures:p,getStoreFeatureProgress:f,fetchFeatureById:b,markFeatureAsViewedForStore:g,isFeatureApplicableToCurrentPage:h,module:m,router:y}),[v,w]=o.useState(null),[B,j]=o.useState(null),[I,E]=o.useState(!1),[F,N]=o.useState([]),[q,P]=o.useState(!1),[O,W]=o.useState([]),[_,M]=o.useState(!1),[V,A]=o.useState(!1),[L,R]=o.useState([]),[U,$]=o.useState(!1),[z,H]=o.useState(!1),[Z,D]=o.useState(!1),[G,J]=o.useState(""),[K,Q]=o.useState(!1),[X,Y]=o.useState(!1),[ee,te]=o.useState(!1),[oe,ne]=o.useState(0),[ae,re]=o.useState(0),[se,ie]=o.useState(new Set);o.useEffect((()=>{const e="minor-spotlight-cutout-style";let t=document.getElementById(e);return t||(t=document.createElement("style"),t.id=e,document.head.appendChild(t)),t.textContent="\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t",()=>{const t=document.getElementById(e);t&&t.remove()}}),[]),o.useEffect((()=>{ne((e=>e+1)),re((e=>e+1)),Y(!1),te(!1),ie(new Set)}),[null==y?void 0:y.pathname]),o.useEffect((()=>{if(!(x.length>0)||v||k||_||K)0!==x.length||k||H(!0);else{H(!1),$(!1),E(!1),N([]),j(null),R([]);let e=0;const t=10,o=()=>{e++;document.querySelector('[data-testid="whats-new-button"]')?le(x[0]):e<t?setTimeout(o,1e3):H(!0)};o()}}),[x,v,k,_,K]),o.useEffect((()=>{var e;const t=null===(e=null==y?void 0:y.query)||void 0===e?void 0:e.featureId;if(!t||k||0===C.length)return;const o=C.find((e=>e.id===t));if(!o||!o.featureTag)return;$(!0),A(!0);let n=0;const a=setInterval((()=>{n++;const e=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`;if(document.querySelector(e)){const e=[o];R(e),he(o,e),clearInterval(a)}else n>=25&&(A(!1),clearInterval(a))}),200);return()=>{clearInterval(a)}}),[C,null===(S=null==y?void 0:y.query)||void 0===S?void 0:S.featureId,k]),o.useEffect((()=>{var e;if(C.length>0&&!k&&!I&&!V&&!B&&!U&&z&&!K){let e=null,t=null,o=null,n=!1;const a=()=>{if(n||V||B||U||!z)return;const a=C.filter((e=>{if(!e.featureTag||""===e.featureTag.trim())return!1;if(se.has(e.id))return!1;const t=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`;return null!==document.querySelector(t)}));a.length>0&&(R(a),he(a[0],a),e&&(e.disconnect(),e=null),t&&(window.removeEventListener("scroll",t),t=null),o&&(clearTimeout(o),o=null))};return e=new MutationObserver((e=>{let t=!1;for(const o of e){if("childList"===o.type&&o.addedNodes.length>0)for(let e=0;e<o.addedNodes.length;e++){const n=o.addedNodes[e];if(n.nodeType===Node.ELEMENT_NODE){const e=n;if(e.id||e.querySelector("[id]")){t=!0;break}}}if(t)break}I||n||V||B||U||!z||!t||(o&&clearTimeout(o),o=setTimeout((()=>{n||V||B||U||!z||a()}),200))})),t=()=>{I||n||V||B||U||!z||(o&&clearTimeout(o),requestAnimationFrame((()=>{o=setTimeout((()=>{n||V||B||U||!z||a()}),300)})))},e&&e.observe(document.body,{childList:!0,subtree:!0}),t&&window.addEventListener("scroll",t,{passive:!0}),a(),setTimeout((()=>{n||V||B||U||!z||a()}),100),setTimeout((()=>{n||V||B||U||!z||a()}),1e3),setTimeout((()=>{n||V||B||U||!z||a()}),500),()=>{n=!0,e&&e.disconnect(),t&&window.removeEventListener("scroll",t),o&&clearTimeout(o)}}if(0===C.length||k){(null===(e=null==y?void 0:y.query)||void 0===e?void 0:e.featureId)&&B||(E(!1),N([]),j(null),R([]),$(!1))}}),[C,k,I,V,B,U,z,T,K]);const le=e=>{w(e);const o=x.findIndex((t=>t.id===e.id)),n=x.length,r=[{target:a.SELECTORS.WHATS_NEW_BUTTON,content:t.jsx(s.default,{feature:e,currentIndex:o,totalFeatures:n,onSkip:()=>de(e),onExplore:()=>ue(e),onPrevious:()=>ce(e),onNext:()=>pe(e),setIsClosing:Y}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];W(r),P(!0)},de=o.useCallback((e=>{(e||v)&&(M(!0),x.forEach((e=>{T(e.id)})),P(!1),w(null),W([]),H(!0),setTimeout((()=>{M(!1)}),500))}),[v,x,T]),ue=o.useCallback((e=>{M(!0),T(e.id),e.productVideo&&(J(e.productVideo),D(!0),Q(!0)),P(!1),w(null),W([]);x.findIndex((t=>t.id===e.id))===x.length-1&&H(!0),setTimeout((()=>{M(!1)}),500)}),[x,T]),ce=o.useCallback((e=>{const o=e||v;if(!o)return;const n=x.findIndex((e=>e.id===o.id));if(n>0){const e=x[n-1];w(e);const o=n-1,a=x.length,r=[{target:'[data-testid="whats-new-button"]',content:t.jsx(s.default,{feature:e,currentIndex:o,totalFeatures:a,onSkip:()=>de(e),onExplore:()=>ue(e),onPrevious:()=>ce(e),onNext:()=>pe(e),setIsClosing:Y}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];W(r)}}),[v,x]),pe=o.useCallback((e=>{const o=e||v;if(!o)return;const n=x.findIndex((e=>e.id===o.id));if(n<x.length-1){const e=x[n+1];w(e);const o=n+1,a=x.length,r=[{target:'[data-testid="whats-new-button"]',content:t.jsx(s.default,{feature:e,currentIndex:o,totalFeatures:a,onSkip:()=>de(e),onExplore:()=>ue(e),onPrevious:()=>ce(e),onNext:()=>pe(e),setIsClosing:Y}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];W(r)}else M(!0),T(o.id),P(!1),w(null),W([]),H(!0),setTimeout((()=>{M(!1)}),500)}),[v,x,T]),fe=()=>{if(x.length>0&&!v){document.querySelector('[data-testid="whats-new-button"]')&&le(x[0])}};o.useEffect((()=>(window.showMajorUpdatePopup=fe,()=>{delete window.showMajorUpdatePopup})),[x,v]);const be=o.useCallback((e=>{const{action:t}=e;t===n.ACTIONS.CLOSE&&(v&&(M(!0),x.forEach((e=>{T(e.id)})),H(!0),setTimeout((()=>{M(!1)}),500)),P(!1),w(null),W([]))}),[v,x,T]),ge=o.useCallback((e=>{const{action:t}=e;if(t===n.ACTIONS.CLOSE){if(B){A(!0),T(B.id);L.findIndex((e=>e.id===B.id))===L.length-1&&$(!0),setTimeout((()=>{A(!1)}),500)}E(!1),j(null),N([])}}),[B,L,T]),he=(o,n)=>e.__awaiter(void 0,void 0,void 0,(function*(){j(o);const e=n||L,a=e.findIndex((e=>e.id===o.id)),r=e.length,s=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`,l=document.querySelector(s);if(l)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(l,120)}catch(e){}const d=[{target:s,content:t.jsx(i.default,{feature:o,currentIndex:a,totalFeatures:r,onSkip:()=>me(o),onExplore:()=>ye(o),onPrevious:()=>Se(o),onNext:()=>xe(o),setIsClosing:te}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:o,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];N(d),E(!0)})),me=o.useCallback((e=>{const t=e||B;if(t){A(!0),T(t.id),ie((e=>new Set(e).add(t.id))),E(!1),j(null),N([]);const e=L.find((e=>e.id!==t.id&&!se.has(e.id)));setTimeout((()=>{A(!1),e?he(e,L):$(!0)}),500)}}),[B,L,T,se]),ye=o.useCallback((e=>{A(!0),T(e.id),ie((t=>new Set(t).add(e.id))),e.productVideo&&(J(e.productVideo),D(!0),Q(!0)),E(!1),j(null),N([]);const t=L.find((t=>t.id!==e.id&&!se.has(t.id)));setTimeout((()=>{A(!1),t&&!e.productVideo?he(t,L):t||$(!0)}),500)}),[L,T,se]),Se=o.useCallback((o=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=o||B;if(!e)return;const n=L.findIndex((t=>t.id===e.id));if(n>0){const e=L[n-1];j(e);const o=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,a=document.querySelector(o);if(a)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(a,120)}catch(e){}const r=n-1,s=L.length,l=[{target:o,content:t.jsx(i.default,{feature:e,currentIndex:r,totalFeatures:s,onSkip:()=>me(e),onExplore:()=>ye(e),onPrevious:()=>Se(e),onNext:()=>xe(e),setIsClosing:te}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];N(l)}}))),[B,L]),xe=o.useCallback((o=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=o||B;if(!e)return;const n=L.findIndex((t=>t.id===e.id));if(n<L.length-1){const e=L[n+1];j(e);const o=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,a=document.querySelector(o);if(a)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(a,120)}catch(e){}const r=n+1,s=L.length,l=[{target:o,content:t.jsx(i.default,{feature:e,currentIndex:r,totalFeatures:s,onSkip:()=>me(e),onExplore:()=>ye(e),onPrevious:()=>Se(e),onNext:()=>xe(e),setIsClosing:te}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];N(l)}else A(!0),$(!0),T(e.id),E(!1),j(null),N([]),setTimeout((()=>{A(!1)}),500)}))),[B,L,T]);return t.jsxs(t.Fragment,{children:[c,O.length>0&&t.jsx(u.default,{steps:O,run:q,continuous:!1,showProgress:!1,showSkipButton:!1,callback:be,disableOverlayClose:!0,disableCloseOnEsc:!1,disableOverlay:!1,spotlightClicks:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:X?"transparent":"#212121"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",border:"none",boxShadow:"none"},tooltip:{borderRadius:"16px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`major-joyride-${oe}`),F.length>0&&t.jsx(u.default,{steps:F,run:I,continuous:!1,showProgress:!1,showSkipButton:!1,callback:ge,disableOverlayClose:!0,disableCloseOnEsc:!1,disableOverlay:!1,scrollToFirstStep:!0,scrollOffset:120,disableScrolling:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:ee?"transparent":"#ffffff"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",borderRadius:"8px",boxShadow:ee?"none":"0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)"},tooltip:{borderRadius:"4px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonSkip:{display:"none"},buttonClose:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`minor-joyride-${ae}`),t.jsx(l.VideoModal,{isOpen:Z,videoUrl:G,onClose:()=>{D(!1),J(""),Q(!1);const e=L.find((e=>!se.has(e.id)));e?setTimeout((()=>{he(e,L)}),300):$(!0)}})]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),o=require("react"),n=require("react-joyride");require("./constants/animations.js");var a=require("./constants/selectors.js"),r=require("./hooks/useFeatureAnnouncements.js"),i=require("./MajorUpdatePopup.js"),s=require("./MinorUpdatePopup.js"),l=require("./VideoModal.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(n);exports.default=d=>{let{children:c,fetchVisibleFeatures:p,getStoreFeatureProgress:f,fetchFeatureById:b,markFeatureAsViewedForStore:g,isFeatureApplicableToCurrentPage:m,module:h,router:y,storeId:S,onAnnouncementShown:x,onAnnouncementInteracted:C}=d;var k;const{majorUpdateFeatures:T,minorUpdateFeatures:v,isLoading:w,markFeatureAsViewed:I}=r.useFeatureAnnouncements({fetchVisibleFeatures:p,getStoreFeatureProgress:f,fetchFeatureById:b,markFeatureAsViewedForStore:g,isFeatureApplicableToCurrentPage:m,module:h,router:y}),[B,j]=o.useState(null),[E,F]=o.useState(null),[N,q]=o.useState(!1),[P,_]=o.useState([]),[O,U]=o.useState(!1),[W,V]=o.useState([]),[M,A]=o.useState(!1),[L,R]=o.useState(!1),[$,z]=o.useState([]),[H,Z]=o.useState(!1),[D,G]=o.useState(!1),[J,K]=o.useState(!1),[Q,X]=o.useState(""),[Y,ee]=o.useState(!1),[te,oe]=o.useState(!1),[ne,ae]=o.useState(!1),[re,ie]=o.useState(0),[se,le]=o.useState(0),[de,ue]=o.useState(new Set);o.useEffect((()=>{const e="minor-spotlight-cutout-style";let t=document.getElementById(e);return t||(t=document.createElement("style"),t.id=e,document.head.appendChild(t)),t.textContent="\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t",()=>{const t=document.getElementById(e);t&&t.remove()}}),[]),o.useEffect((()=>{ie((e=>e+1)),le((e=>e+1)),oe(!1),ae(!1),ue(new Set)}),[null==y?void 0:y.pathname]),o.useEffect((()=>{if(!(T.length>0)||B||w||M||Y)0!==T.length||w||G(!0);else{G(!1),Z(!1),q(!1),_([]),F(null),z([]);let e=0;const t=10,o=()=>{e++;document.querySelector('[data-testid="whats-new-button"]')?ce(T[0]):e<t?setTimeout(o,1e3):G(!0)};o()}}),[T,B,w,M,Y]),o.useEffect((()=>{var e;const t=null===(e=null==y?void 0:y.query)||void 0===e?void 0:e.featureId;if(!t||w||0===v.length)return;const o=v.find((e=>e.id===t));if(!o||!o.featureTag)return;Z(!0),R(!0);let n=0;const a=setInterval((()=>{n++;const e=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`;if(document.querySelector(e)){const e=[o];z(e),Se(o,e),clearInterval(a)}else n>=25&&(R(!1),clearInterval(a))}),200);return()=>{clearInterval(a)}}),[v,null===(k=null==y?void 0:y.query)||void 0===k?void 0:k.featureId,w]),o.useEffect((()=>{var e;if(v.length>0&&!w&&!N&&!L&&!E&&!H&&D&&!Y){let e=null,t=null,o=null,n=!1;const a=()=>{if(n||L||E||H||!D)return;const a=v.filter((e=>{if(!e.featureTag||""===e.featureTag.trim())return!1;if(de.has(e.id))return!1;const t=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`;return null!==document.querySelector(t)}));a.length>0&&(z(a),Se(a[0],a),e&&(e.disconnect(),e=null),t&&(window.removeEventListener("scroll",t),t=null),o&&(clearTimeout(o),o=null))};return e=new MutationObserver((e=>{let t=!1;for(const o of e){if("childList"===o.type&&o.addedNodes.length>0)for(let e=0;e<o.addedNodes.length;e++){const n=o.addedNodes[e];if(n.nodeType===Node.ELEMENT_NODE){const e=n;if(e.id||e.querySelector("[id]")){t=!0;break}}}if(t)break}N||n||L||E||H||!D||!t||(o&&clearTimeout(o),o=setTimeout((()=>{n||L||E||H||!D||a()}),200))})),t=()=>{N||n||L||E||H||!D||(o&&clearTimeout(o),requestAnimationFrame((()=>{o=setTimeout((()=>{n||L||E||H||!D||a()}),300)})))},e&&e.observe(document.body,{childList:!0,subtree:!0}),t&&window.addEventListener("scroll",t,{passive:!0}),a(),setTimeout((()=>{n||L||E||H||!D||a()}),100),setTimeout((()=>{n||L||E||H||!D||a()}),1e3),setTimeout((()=>{n||L||E||H||!D||a()}),500),()=>{n=!0,e&&e.disconnect(),t&&window.removeEventListener("scroll",t),o&&clearTimeout(o)}}if(0===v.length||w){(null===(e=null==y?void 0:y.query)||void 0===e?void 0:e.featureId)&&E||(q(!1),_([]),F(null),z([]),Z(!1))}}),[v,w,N,L,E,H,D,I,Y]);const ce=e=>{j(e);const o=T.findIndex((t=>t.id===e.id)),n=T.length,r=[{target:a.SELECTORS.WHATS_NEW_BUTTON,content:t.jsx(i.default,{feature:e,currentIndex:o,totalFeatures:n,onSkip:()=>pe(e),onExplore:()=>fe(e),onPrevious:()=>be(e),onNext:()=>ge(e),setIsClosing:oe}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(r),U(!0),x&&S&&x({storeId:S,announcementId:e.id,announcementTitle:e.title,imageUrl:e.displayImage||e.image,videoUrl:e.productVideo})},pe=o.useCallback((e=>{const t=e||B;t&&(A(!0),T.forEach((e=>{I(e.id)})),U(!1),j(null),V([]),G(!0),C&&S&&C({storeId:S,announcementId:t.id,announcementTitle:t.title,imageUrl:t.displayImage||t.image,videoUrl:t.productVideo,buttonClicked:"Skip",buttonName:"Skip",buttonUrl:void 0}),setTimeout((()=>{A(!1)}),500))}),[B,T,I]),fe=o.useCallback((e=>{A(!0),I(e.id),e.productVideo&&(X(e.productVideo),K(!0),ee(!0)),U(!1),j(null),V([]);T.findIndex((t=>t.id===e.id))===T.length-1&&G(!0),C&&S&&C({storeId:S,announcementId:e.id,announcementTitle:e.title,imageUrl:e.displayImage||e.image,videoUrl:e.productVideo,buttonClicked:"Primary",buttonName:e.buttonText||"Explore",buttonUrl:e.redirectUrl||e.productVideo}),setTimeout((()=>{A(!1)}),500)}),[T,I]),be=o.useCallback((e=>{const o=e||B;if(!o)return;const n=T.findIndex((e=>e.id===o.id));if(n>0){const e=T[n-1];j(e);const o=n-1,a=T.length,r=[{target:'[data-testid="whats-new-button"]',content:t.jsx(i.default,{feature:e,currentIndex:o,totalFeatures:a,onSkip:()=>pe(e),onExplore:()=>fe(e),onPrevious:()=>be(e),onNext:()=>ge(e),setIsClosing:oe}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(r)}}),[B,T]),ge=o.useCallback((e=>{const o=e||B;if(!o)return;const n=T.findIndex((e=>e.id===o.id));if(n<T.length-1){const e=T[n+1];j(e);const o=n+1,a=T.length,r=[{target:'[data-testid="whats-new-button"]',content:t.jsx(i.default,{feature:e,currentIndex:o,totalFeatures:a,onSkip:()=>pe(e),onExplore:()=>fe(e),onPrevious:()=>be(e),onNext:()=>ge(e),setIsClosing:oe}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(r)}else A(!0),I(o.id),U(!1),j(null),V([]),G(!0),setTimeout((()=>{A(!1)}),500)}),[B,T,I]),me=()=>{if(T.length>0&&!B){document.querySelector('[data-testid="whats-new-button"]')&&ce(T[0])}};o.useEffect((()=>(window.showMajorUpdatePopup=me,()=>{delete window.showMajorUpdatePopup})),[T,B]);const he=o.useCallback((e=>{const{action:t}=e;t===n.ACTIONS.CLOSE&&(B&&(A(!0),T.forEach((e=>{I(e.id)})),G(!0),setTimeout((()=>{A(!1)}),500)),U(!1),j(null),V([]))}),[B,T,I]),ye=o.useCallback((e=>{const{action:t}=e;if(t===n.ACTIONS.CLOSE){if(E){R(!0),I(E.id);$.findIndex((e=>e.id===E.id))===$.length-1&&Z(!0),setTimeout((()=>{R(!1)}),500)}q(!1),F(null),_([])}}),[E,$,I]),Se=(o,n)=>e.__awaiter(void 0,void 0,void 0,(function*(){F(o);const e=n||$,a=e.findIndex((e=>e.id===o.id)),r=e.length,i=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`,l=document.querySelector(i);if(l)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(l,120)}catch(e){}const d=[{target:i,content:t.jsx(s.default,{feature:o,currentIndex:a,totalFeatures:r,onSkip:()=>xe(o),onExplore:()=>Ce(o),onPrevious:()=>ke(o),onNext:()=>Te(o),setIsClosing:ae}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:o,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];_(d),q(!0)})),xe=o.useCallback((e=>{const t=e||E;if(t){R(!0),I(t.id),ue((e=>new Set(e).add(t.id))),q(!1),F(null),_([]);const e=$.find((e=>e.id!==t.id&&!de.has(e.id)));setTimeout((()=>{R(!1),e?Se(e,$):Z(!0)}),500)}}),[E,$,I,de]),Ce=o.useCallback((e=>{R(!0),I(e.id),ue((t=>new Set(t).add(e.id))),e.productVideo&&(X(e.productVideo),K(!0),ee(!0)),q(!1),F(null),_([]);const t=$.find((t=>t.id!==e.id&&!de.has(t.id)));setTimeout((()=>{R(!1),t&&!e.productVideo?Se(t,$):t||Z(!0)}),500)}),[$,I,de]),ke=o.useCallback((o=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=o||E;if(!e)return;const n=$.findIndex((t=>t.id===e.id));if(n>0){const e=$[n-1];F(e);const o=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,a=document.querySelector(o);if(a)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(a,120)}catch(e){}const r=n-1,i=$.length,l=[{target:o,content:t.jsx(s.default,{feature:e,currentIndex:r,totalFeatures:i,onSkip:()=>xe(e),onExplore:()=>Ce(e),onPrevious:()=>ke(e),onNext:()=>Te(e),setIsClosing:ae}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];_(l)}}))),[E,$]),Te=o.useCallback((o=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=o||E;if(!e)return;const n=$.findIndex((t=>t.id===e.id));if(n<$.length-1){const e=$[n+1];F(e);const o=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,a=document.querySelector(o);if(a)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(a,120)}catch(e){}const r=n+1,i=$.length,l=[{target:o,content:t.jsx(s.default,{feature:e,currentIndex:r,totalFeatures:i,onSkip:()=>xe(e),onExplore:()=>Ce(e),onPrevious:()=>ke(e),onNext:()=>Te(e),setIsClosing:ae}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];_(l)}else R(!0),Z(!0),I(e.id),q(!1),F(null),_([]),setTimeout((()=>{R(!1)}),500)}))),[E,$,I]);return t.jsxs(t.Fragment,{children:[c,W.length>0&&t.jsx(u.default,{steps:W,run:O,continuous:!1,showProgress:!1,showSkipButton:!1,callback:he,disableOverlayClose:!0,disableCloseOnEsc:!1,disableOverlay:!1,spotlightClicks:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:te?"transparent":"#212121"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",border:"none",boxShadow:"none"},tooltip:{borderRadius:"16px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`major-joyride-${re}`),P.length>0&&t.jsx(u.default,{steps:P,run:N,continuous:!1,showProgress:!1,showSkipButton:!1,callback:ye,disableOverlayClose:!0,disableCloseOnEsc:!1,disableOverlay:!1,scrollToFirstStep:!0,scrollOffset:120,disableScrolling:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:ne?"transparent":"#ffffff"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",borderRadius:"8px",boxShadow:ne?"none":"0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)"},tooltip:{borderRadius:"4px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonSkip:{display:"none"},buttonClose:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`minor-joyride-${se}`),t.jsx(l.VideoModal,{isOpen:J,videoUrl:Q,onClose:()=>{K(!1),X(""),ee(!1);const e=$.find((e=>!de.has(e.id)));e?setTimeout((()=>{Se(e,$)}),300):Z(!0)}})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("react"),n=require("./constants/index.js"),r=require("./styles/majorPopup.styles.js");require("../../constants/Theme.js"),require("./constants/animations.js");var s=require("./utils/htmlHelpers.js"),o=require("./utils/animationHelpers.js"),a=require("./utils/elementHelpers.js");exports.default=i=>{let{feature:l,currentIndex:c,totalFeatures:u,onSkip:d,onExplore:g,onPrevious:p,onNext:y,setIsClosing:j,onSecondaryAction:b,ratio:h="16:9",padding:x}=i;const[v,f]=e.useState(!1),[B,T]=e.useState(!1),[O,k]=e.useState(""),m=e.useRef(null),[w,E]=e.useState(!1),[L,C]=e.useState(!0),M=e.useRef(null);e.useEffect((()=>{v&&T(!0)}),[v]);const P=()=>{g(),o.hideJoyrideArrow(m.current);const t=a.findWhatsNewButton();if(t&&m.current){const e=o.calculateCloseTransform(m.current,t);k(e)}else k("scale(0)");null==j||j(!0),f(!0)},U=t=>{if(t.preventDefault(),t.stopPropagation(),l.secondaryButtonUrl){l.secondaryButtonUrl.startsWith("http")?window.open(l.secondaryButtonUrl,"_blank","noopener,noreferrer"):window.location.href=l.secondaryButtonUrl}b&&b(),o.hideJoyrideArrow(m.current);const e=a.findWhatsNewButton();if(e&&m.current){const t=o.calculateCloseTransform(m.current,e);k(t)}else k("scale(0)");null==j||j(!0),f(!0)},_=r.getMajorPopupStyles(B,O,h,x||l.padding,l.primaryButtonStyle,l.secondaryButtonStyle),W=t=>{t.stopPropagation(),M.current&&(M.current.paused?(M.current.play(),E(!1),C(!1)):(M.current.pause(),E(!0),C(!0)))};return t.jsxs("div",Object.assign({ref:m,style:_.container},{children:[t.jsx("style",{children:"\n\t\t\t\t[data-popup-content] ul {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\tlist-style-type: disc;\n\t\t\t\t}\n\t\t\t\t[data-popup-content] ul li {\n\t\t\t\t\tmargin-bottom: 8px;\n\t\t\t\t\tcolor: rgba(255, 255, 255, 0.8);\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\tline-height: 16px;\n\t\t\t\t\tfont-family: Inter, sans-serif;\n\t\t\t\t}\n\t\t\t"}),t.jsxs("div",Object.assign({style:_.contentWrapper},{children:[t.jsx("div",Object.assign({style:_.imageContainer},{children:l.productVideo?t.jsxs(t.Fragment,{children:[t.jsx("video",{ref:M,src:l.productVideo,style:_.image,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,onClick:W,onPlay:()=>{C(!1)},onPause:()=>{C(!0)},"aria-label":`Product video for ${l.title}`}),(w||L)&&t.jsx("div",Object.assign({style:_.videoOverlay,onClick:W,role:"button",tabIndex:0,"aria-label":w?"Play video":"Pause video",onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),M.current&&(M.current.paused?(M.current.play(),E(!1),C(!1)):(M.current.pause(),E(!0),C(!0))))}},{children:t.jsx((()=>t.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",style:_.playIcon},{children:[t.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"rgba(0,0,0,0.5)",stroke:"none"}),t.jsx("polygon",{points:"10 8 16 12 10 16 10 8",fill:"#fff",stroke:"none"})]}))),{})}))]}):l.displayImage?t.jsx("img",{src:l.displayImage,alt:l.title,style:_.image,onError:t=>{l.image&&(t.target.src=l.image)}}):t.jsx("div",Object.assign({style:_.imagePlaceholder},{children:n.TEXT.FEATURE_PREVIEW_PLACEHOLDER}))})),t.jsxs("div",Object.assign({style:_.contentContainer},{children:[t.jsx("div",Object.assign({style:_.skipButtonContainer},{children:t.jsx("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),(t=>{o.hideJoyrideArrow(m.current);const e=a.findWhatsNewButton();if(e&&m.current){const t=o.calculateCloseTransform(m.current,e);k(t)}else k("scale(0)");null==j||j(!0),f(!0),o.executeAfterAnimation(t)})(d)},style:_.skipButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,_.skipButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,_.skipButton.base),"aria-label":"Skip feature announcement"},{children:"Skip"}))})),t.jsx("h3",Object.assign({style:_.title},{children:l.title})),t.jsx("div",{"data-popup-content":!0,style:_.content,dangerouslySetInnerHTML:{__html:s.decodeHTMLEntities(l.content||l.body||"")}}),t.jsxs("div",Object.assign({style:_.actionsWrapper},{children:[t.jsxs("div",Object.assign({style:_.buttonsGroup},{children:[l.redirectUrl?t.jsx("a",Object.assign({href:l.redirectUrl,target:l.redirectUrl.startsWith("http")?"_blank":"_self",rel:l.redirectUrl.startsWith("http")?"noopener noreferrer":void 0,onClick:P,style:_.exploreButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,_.exploreButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,_.exploreButton.base)},{children:l.buttonText||n.TEXT.DEFAULT_BUTTON_TEXT})):t.jsx("button",Object.assign({onClick:P,style:_.exploreButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,_.exploreButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,_.exploreButton.base)},{children:l.buttonText||n.TEXT.DEFAULT_BUTTON_TEXT})),l.secondaryButtonText&&(l.secondaryButtonUrl?t.jsx("a",Object.assign({href:l.secondaryButtonUrl,target:l.secondaryButtonUrl.startsWith("http")?"_blank":"_self",rel:l.secondaryButtonUrl.startsWith("http")?"noopener noreferrer":void 0,onClick:U,style:_.secondaryButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,_.secondaryButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,_.secondaryButton.base)},{children:l.secondaryButtonText})):t.jsx("button",Object.assign({onClick:U,style:_.secondaryButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,_.secondaryButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,_.secondaryButton.base)},{children:l.secondaryButtonText})))]})),u>1&&t.jsxs("div",Object.assign({style:_.navigationContainer},{children:[t.jsx("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),p()},disabled:0===c,style:_.navigationButton(0===c).base,onMouseEnter:t=>{0!==c&&Object.assign(t.currentTarget.style,_.navigationButton(!1).hover)},onMouseLeave:t=>{0!==c&&Object.assign(t.currentTarget.style,_.navigationButton(!1).base)}},{children:t.jsx("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:t.jsx("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))})),t.jsx("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),y()},disabled:c===u-1,style:_.navigationButton(c===u-1).base,onMouseEnter:t=>{c!==u-1&&Object.assign(t.currentTarget.style,_.navigationButton(!1).hover)},onMouseLeave:t=>{c!==u-1&&Object.assign(t.currentTarget.style,_.navigationButton(c===u-1).base)}},{children:t.jsx("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:t.jsx("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))}))]}))]}))]}))]}))]}))};
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Popup dimension constants
|
|
3
|
-
*/
|
|
4
1
|
export declare const POPUP_DIMENSIONS: {
|
|
5
2
|
readonly MAJOR: {
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly imageWidth:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
readonly imagePlaceholderHeight: 258;
|
|
3
|
+
readonly height: 224;
|
|
4
|
+
readonly textAreaWidth: 398;
|
|
5
|
+
readonly imageWidth: {
|
|
6
|
+
readonly '16:9': 398;
|
|
7
|
+
readonly '1:1': 224;
|
|
8
|
+
readonly '4:3': 299;
|
|
9
|
+
};
|
|
14
10
|
};
|
|
15
11
|
readonly MINOR: {
|
|
16
12
|
readonly width: 519;
|
|
@@ -20,20 +16,41 @@ export declare const POPUP_DIMENSIONS: {
|
|
|
20
16
|
readonly badgeHeight: 27;
|
|
21
17
|
};
|
|
22
18
|
};
|
|
19
|
+
export declare const TEXT_LIMITS: {
|
|
20
|
+
readonly MAJOR: {
|
|
21
|
+
readonly TITLE: {
|
|
22
|
+
readonly MAX_LINES: 2;
|
|
23
|
+
};
|
|
24
|
+
readonly CONTENT: {
|
|
25
|
+
readonly MAX_LINES: 4;
|
|
26
|
+
readonly MAX_CHARS: 360;
|
|
27
|
+
readonly CHARS_PER_LINE: 72;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
23
31
|
/**
|
|
24
32
|
* Spacing constants
|
|
25
33
|
*/
|
|
26
34
|
export declare const SPACING: {
|
|
27
35
|
readonly MAJOR: {
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
32
|
-
readonly
|
|
33
|
-
readonly
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
36
|
+
readonly containerPadding: "16px";
|
|
37
|
+
readonly contentGap: "16px";
|
|
38
|
+
readonly titleBottom: "0px";
|
|
39
|
+
readonly listGap: "8px";
|
|
40
|
+
readonly actionsTop: "16px";
|
|
41
|
+
readonly headerMarginBottom: "8px";
|
|
42
|
+
readonly contentMarginLeft: "0px";
|
|
43
|
+
readonly skipButtonContainerMargin: "8px";
|
|
44
|
+
readonly contentMargin: "0 0 0 0px";
|
|
45
|
+
readonly imagePadding: "0px";
|
|
46
|
+
readonly titlePadding: "0 0 0px 0";
|
|
47
|
+
readonly buttonMarginTop: "0px";
|
|
48
|
+
readonly skipButtonPadding: "2px 4px";
|
|
49
|
+
readonly skipButtonTop: "8px";
|
|
50
|
+
readonly skipButtonRight: "8px";
|
|
51
|
+
readonly navigationBottom: "0px";
|
|
52
|
+
readonly navigationRight: "0px";
|
|
53
|
+
readonly navigationGap: "4px";
|
|
37
54
|
};
|
|
38
55
|
readonly MINOR: {
|
|
39
56
|
readonly imageMargin: "13px 10px 13px 10px";
|
|
@@ -43,14 +60,71 @@ export declare const SPACING: {
|
|
|
43
60
|
readonly actionsGap: "16px";
|
|
44
61
|
};
|
|
45
62
|
};
|
|
46
|
-
/**
|
|
47
|
-
* Border radius constants
|
|
48
|
-
*/
|
|
49
63
|
export declare const BORDER_RADIUS: {
|
|
50
|
-
readonly POPUP: "
|
|
51
|
-
readonly IMAGE: "
|
|
64
|
+
readonly POPUP: "8px";
|
|
65
|
+
readonly IMAGE: "6px";
|
|
52
66
|
readonly BUTTON: "4px";
|
|
53
67
|
readonly VIDEO_MODAL: "12px";
|
|
54
68
|
readonly CLOSE_BUTTON: "50%";
|
|
55
69
|
readonly SPOTLIGHT: "8px";
|
|
56
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* Design tokens - Colors
|
|
73
|
+
*/
|
|
74
|
+
export declare const DESIGN_COLORS: {
|
|
75
|
+
readonly BACKGROUND: {
|
|
76
|
+
readonly SURFACE: "#212121";
|
|
77
|
+
readonly IMAGE: "#F0F0F0";
|
|
78
|
+
};
|
|
79
|
+
readonly TEXT: {
|
|
80
|
+
readonly PRIMARY: "#FFFFFF";
|
|
81
|
+
readonly SECONDARY: "rgba(255, 255, 255, 0.8)";
|
|
82
|
+
readonly TERTIARY: "#BDBDBD";
|
|
83
|
+
};
|
|
84
|
+
readonly BUTTON: {
|
|
85
|
+
readonly PRIMARY_TEXT: "#FEC02D";
|
|
86
|
+
readonly PRIMARY_BORDER: "#FEC02D";
|
|
87
|
+
};
|
|
88
|
+
readonly ICON: {
|
|
89
|
+
readonly DISABLED: "rgba(255, 255, 255, 0.3)";
|
|
90
|
+
readonly ENABLED: "#FFFFFF";
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Design tokens - Typography
|
|
95
|
+
*/
|
|
96
|
+
export declare const DESIGN_TYPOGRAPHY: {
|
|
97
|
+
readonly SKIP_BUTTON: {
|
|
98
|
+
readonly fontSize: "14px";
|
|
99
|
+
readonly fontWeight: "600";
|
|
100
|
+
readonly lineHeight: "20px";
|
|
101
|
+
readonly fontFamily: "Inter, sans-serif";
|
|
102
|
+
};
|
|
103
|
+
readonly TITLE: {
|
|
104
|
+
readonly fontSize: "14px";
|
|
105
|
+
readonly fontWeight: "600";
|
|
106
|
+
readonly lineHeight: "20px";
|
|
107
|
+
readonly fontFamily: "Inter, sans-serif";
|
|
108
|
+
};
|
|
109
|
+
readonly CONTENT: {
|
|
110
|
+
readonly fontSize: "12px";
|
|
111
|
+
readonly fontWeight: "400";
|
|
112
|
+
readonly lineHeight: "16px";
|
|
113
|
+
readonly fontFamily: "Inter, sans-serif";
|
|
114
|
+
};
|
|
115
|
+
readonly BUTTON: {
|
|
116
|
+
readonly fontSize: "14px";
|
|
117
|
+
readonly fontWeight: "600";
|
|
118
|
+
readonly lineHeight: "20px";
|
|
119
|
+
readonly fontFamily: "Inter, sans-serif";
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Design tokens - Dimensions
|
|
124
|
+
*/
|
|
125
|
+
export declare const DESIGN_DIMENSIONS: {
|
|
126
|
+
readonly IMAGE_HEIGHT: 224;
|
|
127
|
+
readonly NAVIGATION_BUTTON_SIZE: 24;
|
|
128
|
+
readonly BUTTON_HEIGHT: 32;
|
|
129
|
+
readonly BUTTON_PADDING_HORIZONTAL: "12px";
|
|
130
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.BORDER_RADIUS={POPUP:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.BORDER_RADIUS={POPUP:"8px",IMAGE:"6px",BUTTON:"4px",VIDEO_MODAL:"12px",CLOSE_BUTTON:"50%",SPOTLIGHT:"8px"},exports.DESIGN_COLORS={BACKGROUND:{SURFACE:"#212121",IMAGE:"#F0F0F0"},TEXT:{PRIMARY:"#FFFFFF",SECONDARY:"rgba(255, 255, 255, 0.8)",TERTIARY:"#BDBDBD"},BUTTON:{PRIMARY_TEXT:"#FEC02D",PRIMARY_BORDER:"#FEC02D"},ICON:{DISABLED:"rgba(255, 255, 255, 0.3)",ENABLED:"#FFFFFF"}},exports.DESIGN_DIMENSIONS={IMAGE_HEIGHT:224,NAVIGATION_BUTTON_SIZE:24,BUTTON_HEIGHT:32,BUTTON_PADDING_HORIZONTAL:"12px"},exports.DESIGN_TYPOGRAPHY={SKIP_BUTTON:{fontSize:"14px",fontWeight:"600",lineHeight:"20px",fontFamily:"Inter, sans-serif"},TITLE:{fontSize:"14px",fontWeight:"600",lineHeight:"20px",fontFamily:"Inter, sans-serif"},CONTENT:{fontSize:"12px",fontWeight:"400",lineHeight:"16px",fontFamily:"Inter, sans-serif"},BUTTON:{fontSize:"14px",fontWeight:"600",lineHeight:"20px",fontFamily:"Inter, sans-serif"}},exports.POPUP_DIMENSIONS={MAJOR:{height:224,textAreaWidth:398,imageWidth:{"16:9":398,"1:1":224,"4:3":299}},MINOR:{width:519,height:160,imageWidth:235,imageHeight:134,badgeHeight:27}},exports.SPACING={MAJOR:{containerPadding:"16px",contentGap:"16px",titleBottom:"0px",listGap:"8px",actionsTop:"16px",headerMarginBottom:"8px",contentMarginLeft:"0px",skipButtonContainerMargin:"8px",contentMargin:"0 0 0 0px",imagePadding:"0px",titlePadding:"0 0 0px 0",buttonMarginTop:"0px",skipButtonPadding:"2px 4px",skipButtonTop:"8px",skipButtonRight:"8px",navigationBottom:"0px",navigationRight:"0px",navigationGap:"4px"},MINOR:{imageMargin:"13px 10px 13px 10px",contentMargin:"13px 13px 13px 3px",actionsBottom:"13px",actionsRight:"10px",actionsGap:"16px"}};
|
|
@@ -27,7 +27,7 @@ export declare const minorStepStyles: {
|
|
|
27
27
|
tooltip: {
|
|
28
28
|
padding: number;
|
|
29
29
|
backgroundColor: string;
|
|
30
|
-
borderRadius: "
|
|
30
|
+
borderRadius: "8px";
|
|
31
31
|
border: string;
|
|
32
32
|
filter: string;
|
|
33
33
|
boxShadow: string;
|
|
@@ -101,7 +101,7 @@ export declare const getMinorJoyrideStyles: (isClosing: boolean) => {
|
|
|
101
101
|
tooltip: {
|
|
102
102
|
padding: number;
|
|
103
103
|
backgroundColor: string;
|
|
104
|
-
borderRadius: "
|
|
104
|
+
borderRadius: "8px";
|
|
105
105
|
border: string;
|
|
106
106
|
filter: string;
|
|
107
107
|
boxShadow: string;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
|
|
2
|
+
import { ButtonStyle } from '../types/feature.types';
|
|
3
|
+
export declare const getMajorPopupStyles: (startAnimation: boolean, transform: string, ratio?: '16:9' | '1:1' | '4:3', padding?: string, primaryButtonStyle?: ButtonStyle, secondaryButtonStyle?: ButtonStyle) => {
|
|
3
4
|
container: CSSProperties;
|
|
5
|
+
headerContainer: CSSProperties;
|
|
6
|
+
contentWrapper: CSSProperties;
|
|
4
7
|
skipButton: {
|
|
5
8
|
base: CSSProperties;
|
|
6
9
|
hover: CSSProperties;
|
|
@@ -8,16 +11,29 @@ export declare const getMajorPopupStyles: (startAnimation: boolean, transform: s
|
|
|
8
11
|
imageContainer: CSSProperties;
|
|
9
12
|
image: CSSProperties;
|
|
10
13
|
imagePlaceholder: CSSProperties;
|
|
14
|
+
videoOverlay: CSSProperties;
|
|
15
|
+
playIcon: CSSProperties;
|
|
11
16
|
contentContainer: CSSProperties;
|
|
17
|
+
skipButtonContainer: CSSProperties;
|
|
12
18
|
title: CSSProperties;
|
|
13
19
|
content: CSSProperties;
|
|
20
|
+
actionsWrapper: CSSProperties;
|
|
21
|
+
buttonsGroup: CSSProperties;
|
|
14
22
|
exploreButton: {
|
|
15
23
|
base: CSSProperties;
|
|
16
24
|
hover: CSSProperties;
|
|
17
25
|
};
|
|
26
|
+
secondaryButton: {
|
|
27
|
+
base: CSSProperties;
|
|
28
|
+
hover: CSSProperties;
|
|
29
|
+
};
|
|
18
30
|
navigationContainer: CSSProperties;
|
|
19
31
|
navigationButton: (disabled: boolean) => {
|
|
20
32
|
base: CSSProperties;
|
|
21
|
-
hover:
|
|
33
|
+
hover: {
|
|
34
|
+
backgroundColor: string;
|
|
35
|
+
} | {
|
|
36
|
+
backgroundColor?: undefined;
|
|
37
|
+
};
|
|
22
38
|
};
|
|
23
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../constants/Theme.js"),e=require("../constants/animations.js"),n=require("../constants/dimensions.js");const o=(t,e)=>Object.assign(Object.assign(Object.assign(Object.assign({},t),(null==e?void 0:e.textColor)&&{color:e.textColor}),(null==e?void 0:e.backgroundColor)&&{backgroundColor:e.backgroundColor}),(null==e?void 0:e.borderColor)&&{borderColor:e.borderColor});exports.getMajorPopupStyles=function(i,r){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"16:9",l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.SPACING.MAJOR.containerPadding,O=arguments.length>4?arguments[4]:void 0,I=arguments.length>5?arguments[5]:void 0;const N=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"16:9";return n.POPUP_DIMENSIONS.MAJOR.imageWidth[t]||n.POPUP_DIMENSIONS.MAJOR.imageWidth["16:9"]}(a),S=parseInt(l,10)||16,s=n.DESIGN_DIMENSIONS.IMAGE_HEIGHT+2*S;return{container:{width:`${S+N+parseInt(n.SPACING.MAJOR.contentGap,10)+n.POPUP_DIMENSIONS.MAJOR.textAreaWidth+S}px`,height:"auto",minHeight:`${s}px`,display:"flex",flexDirection:"column",backgroundColor:n.DESIGN_COLORS.BACKGROUND.SURFACE,borderRadius:n.BORDER_RADIUS.BUTTON,overflow:"hidden",position:"relative",padding:l,transform:i?r:"scale(1)",opacity:i?0:1,transition:e.POPUP_TRANSITION,boxSizing:"border-box"},headerContainer:{width:"100%",display:"flex",justifyContent:"flex-end",marginBottom:n.SPACING.MAJOR.headerMarginBottom,position:"relative"},contentWrapper:{display:"flex",flex:1,gap:n.SPACING.MAJOR.contentGap},skipButton:{base:{background:"transparent",border:"none",color:n.DESIGN_COLORS.TEXT.TERTIARY,fontSize:n.DESIGN_TYPOGRAPHY.SKIP_BUTTON.fontSize,fontWeight:n.DESIGN_TYPOGRAPHY.SKIP_BUTTON.fontWeight,cursor:"pointer",transition:"all 0.2s",padding:n.SPACING.MAJOR.skipButtonPadding,borderRadius:n.BORDER_RADIUS.BUTTON,fontFamily:n.DESIGN_TYPOGRAPHY.SKIP_BUTTON.fontFamily,lineHeight:n.DESIGN_TYPOGRAPHY.SKIP_BUTTON.lineHeight},hover:{backgroundColor:"rgba(255, 255, 255, 0.1)",color:n.DESIGN_COLORS.TEXT.PRIMARY}},imageContainer:{backgroundColor:n.DESIGN_COLORS.BACKGROUND.IMAGE,width:`${N}px`,height:`${n.DESIGN_DIMENSIONS.IMAGE_HEIGHT}px`,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:n.BORDER_RADIUS.BUTTON,overflow:"hidden",flexShrink:0},image:{width:"100%",height:"100%",objectFit:"cover"},imagePlaceholder:{color:t.BASE_COLORS.grayscale[500],fontSize:"14px",textAlign:"center",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t.BASE_COLORS.grayscale[800]},videoOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.4)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:10,transition:"opacity 0.2s"},playIcon:{width:"84px",height:"84px",color:"#060606ff"},contentContainer:{flex:1,display:"flex",marginLeft:n.SPACING.MAJOR.contentMarginLeft,flexDirection:"column",justifyContent:"flex-start",background:"transparent",maxWidth:`${n.POPUP_DIMENSIONS.MAJOR.textAreaWidth}px`,gap:n.SPACING.MAJOR.listGap},skipButtonContainer:{width:"100%",display:"flex",justifyContent:"flex-end",marginBottom:n.SPACING.MAJOR.skipButtonContainerMargin},title:{fontSize:n.DESIGN_TYPOGRAPHY.TITLE.fontSize,fontWeight:n.DESIGN_TYPOGRAPHY.TITLE.fontWeight,marginBottom:n.SPACING.MAJOR.titleBottom,padding:0,color:n.DESIGN_COLORS.TEXT.PRIMARY,lineHeight:n.DESIGN_TYPOGRAPHY.TITLE.lineHeight,textAlign:"left",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",fontFamily:n.DESIGN_TYPOGRAPHY.TITLE.fontFamily},content:{fontSize:n.DESIGN_TYPOGRAPHY.CONTENT.fontSize,lineHeight:n.DESIGN_TYPOGRAPHY.CONTENT.lineHeight,color:n.DESIGN_COLORS.TEXT.SECONDARY,textAlign:"left",marginBottom:"auto",fontFamily:n.DESIGN_TYPOGRAPHY.CONTENT.fontFamily,fontWeight:n.DESIGN_TYPOGRAPHY.CONTENT.fontWeight},actionsWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",marginRight:n.SPACING.MAJOR.actionsTop,gap:"8px",flexWrap:"nowrap"},buttonsGroup:{display:"flex",alignItems:"center",gap:n.SPACING.MAJOR.listGap},exploreButton:{base:o({backgroundColor:"transparent",border:`1px solid ${n.DESIGN_COLORS.BUTTON.PRIMARY_BORDER}`,color:n.DESIGN_COLORS.BUTTON.PRIMARY_TEXT,borderRadius:n.BORDER_RADIUS.BUTTON,fontSize:n.DESIGN_TYPOGRAPHY.BUTTON.fontSize,fontWeight:n.DESIGN_TYPOGRAPHY.BUTTON.fontWeight,cursor:"pointer",padding:`0 ${n.DESIGN_DIMENSIONS.BUTTON_PADDING_HORIZONTAL}`,height:`${n.DESIGN_DIMENSIONS.BUTTON_HEIGHT}px`,transition:"all 0.2s",textAlign:"center",minWidth:"auto",textDecoration:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:n.DESIGN_TYPOGRAPHY.BUTTON.fontFamily,lineHeight:n.DESIGN_TYPOGRAPHY.BUTTON.lineHeight},O),hover:{backgroundColor:(null==O?void 0:O.backgroundColor)?`${O.backgroundColor}cc`:"rgba(254, 192, 45, 0.1)"}},secondaryButton:{base:o({backgroundColor:"transparent",color:n.DESIGN_COLORS.BUTTON.PRIMARY_TEXT,borderRadius:n.BORDER_RADIUS.BUTTON,fontSize:n.DESIGN_TYPOGRAPHY.BUTTON.fontSize,fontWeight:n.DESIGN_TYPOGRAPHY.BUTTON.fontWeight,cursor:"pointer",padding:`0 ${n.DESIGN_DIMENSIONS.BUTTON_PADDING_HORIZONTAL}`,height:`${n.DESIGN_DIMENSIONS.BUTTON_HEIGHT}px`,transition:"all 0.2s",textAlign:"center",minWidth:"auto",textDecoration:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:n.DESIGN_TYPOGRAPHY.BUTTON.fontFamily,lineHeight:n.DESIGN_TYPOGRAPHY.BUTTON.lineHeight},I),hover:{backgroundColor:(null==I?void 0:I.backgroundColor)?`${I.backgroundColor}cc`:"rgba(254, 192, 45, 0.1)"}},navigationContainer:{display:"flex",gap:n.SPACING.MAJOR.navigationGap,alignItems:"center"},navigationButton:t=>({base:{width:`${n.DESIGN_DIMENSIONS.NAVIGATION_BUTTON_SIZE}px`,height:`${n.DESIGN_DIMENSIONS.NAVIGATION_BUTTON_SIZE}px`,backgroundColor:"transparent",border:"none",color:t?n.DESIGN_COLORS.ICON.DISABLED:n.DESIGN_COLORS.ICON.ENABLED,fontSize:"16px",cursor:t?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",borderRadius:n.BORDER_RADIUS.BUTTON,padding:0},hover:t?{}:{backgroundColor:"rgba(255, 255, 255, 0.1)"}})}};
|
|
@@ -5,6 +5,14 @@ export interface FirestoreTimestamp {
|
|
|
5
5
|
seconds: number;
|
|
6
6
|
nanoseconds?: number;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Button styling configuration
|
|
10
|
+
*/
|
|
11
|
+
export interface ButtonStyle {
|
|
12
|
+
textColor?: string;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
}
|
|
8
16
|
/**
|
|
9
17
|
* Feature announcement data model
|
|
10
18
|
*/
|
|
@@ -27,6 +35,16 @@ export interface FeatureAnnouncement {
|
|
|
27
35
|
archived?: boolean;
|
|
28
36
|
createdAt: FirestoreTimestamp;
|
|
29
37
|
expirationDate?: FirestoreTimestamp | string | Date;
|
|
38
|
+
primaryButtonText?: string;
|
|
39
|
+
primaryButtonStyle?: ButtonStyle;
|
|
40
|
+
primaryButtonAction?: 'Play Video' | 'Open link';
|
|
41
|
+
primaryButtonRedirectionUrl?: string;
|
|
42
|
+
secondaryButtonText?: string;
|
|
43
|
+
secondaryButtonUrl?: string;
|
|
44
|
+
secondaryButtonAction?: 'Open link' | 'Close popup' | '';
|
|
45
|
+
secondaryButtonRedirectionUrl?: string;
|
|
46
|
+
secondaryButtonStyle?: ButtonStyle;
|
|
47
|
+
padding?: string;
|
|
30
48
|
}
|
|
31
49
|
/**
|
|
32
50
|
* Store feature progress tracking
|
|
@@ -39,3 +57,21 @@ export interface StoreFeatureProgress {
|
|
|
39
57
|
* Feature update types
|
|
40
58
|
*/
|
|
41
59
|
export type FeatureUpdateType = 'Major' | 'Minor';
|
|
60
|
+
/**
|
|
61
|
+
* Announcement event data (for tracking when announcement is shown)
|
|
62
|
+
*/
|
|
63
|
+
export interface AnnouncementEvent {
|
|
64
|
+
storeId: string;
|
|
65
|
+
announcementId: string;
|
|
66
|
+
announcementTitle: string;
|
|
67
|
+
imageUrl?: string;
|
|
68
|
+
videoUrl?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Announcement interaction event data (for tracking button clicks)
|
|
72
|
+
*/
|
|
73
|
+
export interface AnnouncementInteractionEvent extends AnnouncementEvent {
|
|
74
|
+
buttonClicked: 'Primary' | 'Secondary' | 'Skip';
|
|
75
|
+
buttonName: string;
|
|
76
|
+
buttonUrl?: string;
|
|
77
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FeatureAnnouncement } from './feature.types';
|
|
2
|
+
import { AnnouncementEvent, AnnouncementInteractionEvent, FeatureAnnouncement } from './feature.types';
|
|
3
3
|
import { FeatureAnnouncementRepository } from './repository.types';
|
|
4
4
|
import { RouterProps } from './router.types';
|
|
5
5
|
/**
|
|
@@ -14,17 +14,27 @@ export interface PopupBaseProps {
|
|
|
14
14
|
onPrevious: () => void;
|
|
15
15
|
onNext: () => void;
|
|
16
16
|
setIsClosing?: (isClosing: boolean) => void;
|
|
17
|
+
onSecondaryAction?: () => void;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Major update popup props
|
|
20
21
|
*/
|
|
21
22
|
export interface MajorUpdatePopupProps extends PopupBaseProps {
|
|
23
|
+
/**
|
|
24
|
+
* Aspect ratio for the image/video container
|
|
25
|
+
* @default '16:9'
|
|
26
|
+
*/
|
|
27
|
+
ratio?: '16:9' | '1:1' | '4:3';
|
|
28
|
+
/**
|
|
29
|
+
* Custom padding for the popup container
|
|
30
|
+
* @default '16px'
|
|
31
|
+
*/
|
|
32
|
+
padding?: string;
|
|
22
33
|
}
|
|
23
34
|
/**
|
|
24
35
|
* Minor update popup props
|
|
25
36
|
*/
|
|
26
|
-
export
|
|
27
|
-
}
|
|
37
|
+
export type MinorUpdatePopupProps = PopupBaseProps;
|
|
28
38
|
/**
|
|
29
39
|
* Video modal props
|
|
30
40
|
*/
|
|
@@ -40,4 +50,16 @@ export interface FeatureAnnouncementProviderProps extends FeatureAnnouncementRep
|
|
|
40
50
|
children: React.ReactNode;
|
|
41
51
|
module?: string;
|
|
42
52
|
router?: RouterProps;
|
|
53
|
+
/**
|
|
54
|
+
* Store ID for event tracking
|
|
55
|
+
*/
|
|
56
|
+
storeId?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Callback fired when a major announcement popup is shown
|
|
59
|
+
*/
|
|
60
|
+
onAnnouncementShown?: (event: AnnouncementEvent) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Callback fired when user interacts with an announcement (clicks a button)
|
|
63
|
+
*/
|
|
64
|
+
onAnnouncementInteracted?: (event: AnnouncementInteractionEvent) => void;
|
|
43
65
|
}
|
|
@@ -12,6 +12,14 @@ export interface WhatsNewContent {
|
|
|
12
12
|
createdAt: any;
|
|
13
13
|
module: string[];
|
|
14
14
|
visibility: boolean;
|
|
15
|
+
primaryButtonText?: string;
|
|
16
|
+
primaryButtonAction?: 'Play Video' | 'Open link';
|
|
17
|
+
primaryButtonRedirectionUrl?: string;
|
|
18
|
+
secondaryButtonText?: string;
|
|
19
|
+
secondaryButtonAction?: 'Open link' | 'Close popup' | '';
|
|
20
|
+
secondaryButtonRedirectionUrl?: string;
|
|
21
|
+
featureUpdateType?: 'Major' | 'Minor';
|
|
22
|
+
displayImage?: string;
|
|
15
23
|
}
|
|
16
24
|
export interface WhatsNewProviderProps {
|
|
17
25
|
children: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("date-fns"),s=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("date-fns"),s=require("react"),r=require("../../assets/icons/searchIcon.svg.js"),n=require("../../assets/icons/whatsNew.svg.js"),a=require("../../constants/Theme.js"),i=require("../button/Button.js"),o=require("../feature-announcements/VideoModal.js"),c=require("../searchBar/searchBar.js"),d=require("../side-modal/SideModal.js"),l=require("../TypographyStyle.js"),h=require("./WhatsNew.styles.js");exports.WhatsNewPanel=u=>{let{isOpen:j,onClose:m,content:x,isLoading:g=!1,title:w="What's new on BIK",searchPlaceholder:p="Search posts",emptyStateTitle:b="Nothing new!",emptyStateDescription:f="There are no new updates or features at the moment. Check back soon!",noResultsText:y="Sorry, no results found.",width:C="480px",onContentClick:O,renderCustomContent:N}=u;const[S,v]=s.useState(""),[M,L]=s.useState(!1),[q,k]=s.useState(""),B=e=>{if(!e.createdAt)return!1;const s=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t.differenceInBusinessDays(new Date,s)<7},T=s.useMemo((()=>{if(!S.trim())return x;const e=S.toLowerCase();return x.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content&&t.content.toLowerCase().includes(e)))}),[x,S]),R=e=>{if(e.productVideo)k(e.productVideo),L(!0);else{const t=e.primaryButtonRedirectionUrl||e.redirectUrl;t&&(e=>{const t=e.trim();try{const e=new URL(t,window.location.origin);e.origin===window.location.origin?window.location.href=e.href:window.open(e.href,"_blank","noopener,noreferrer")}catch(e){t.startsWith("/")||t.startsWith(".")?window.location.href=t:/^https?:\/\//i.test(t)&&window.open(t,"_blank","noopener,noreferrer")}})(t)}O&&O(e)},W=0===x.length,D=0===T.length;return j?e.jsxs(d.SideModal,Object.assign({width:C,onClose:m,header:"",headerCustomComponent:e.jsx(l.TitleMedium,Object.assign({color:a.COLORS.background.inverse},{children:w})),headerStyle:{background:a.COLORS.background.brandLight},hideFooter:!0},{children:[e.jsxs(h.MainContainer,{children:[e.jsx("div",Object.assign({className:"mt-8"},{children:e.jsx(c.SearchBar,{width:"100%",isEnabled:!W,onChange:e=>{v(e)},onEnter:e=>{v(e)},placeholder:p,variant:"default",searchValue:S,onClickCross:()=>{v("")}})})),e.jsx(h.WhatsNewWrapper,{children:W||D?e.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsx("div",Object.assign({className:"icon--wrapper"},{children:W?e.jsx(n.default,{width:32,height:32}):e.jsx(r.default,{width:32,height:32})})),W?e.jsxs(e.Fragment,{children:[e.jsx(l.TitleRegular,{children:b}),e.jsx(l.BodyPrimary,Object.assign({color:a.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:f}))]}):D?e.jsx(l.BodyPrimary,Object.assign({color:a.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:y})):null]})):e.jsx("div",Object.assign({className:"scroller"},{children:T.map(((s,r)=>N?N(s):e.jsxs(h.MainCardContainer,Object.assign({className:"padding--16 mb-mt-8"},{children:[e.jsx(h.BackgroundImageContainer,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[B(s)?e.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsx(l.Caption,{children:"New"})})):e.jsx(e.Fragment,{}),e.jsx(l.Caption,Object.assign({style:{color:a.COLORS.content.placeholder}},{children:s.createdAt?t.format(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsx("div",Object.assign({className:"mt--8"},{children:e.jsx(l.TitleSmall,{children:s.title})})),e.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsx(i.Button,{buttonText:s.buttonText||"Explore the feature",onClick:()=>R(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${r}`)))}))})]}),e.jsx(o.VideoModal,{isOpen:M,videoUrl:q,onClose:()=>{L(!1)}})]})):e.jsx(e.Fragment,{})};
|