ui fixes
This commit is contained in:
parent
c2f9cde371
commit
9654c9aa58
@ -187,7 +187,7 @@
|
||||
<table class="table table-sm table-compact w-full mt-5 mb-10 text-white">
|
||||
<!-- head -->
|
||||
<thead>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<th class=" text-white text-sm font-semibold">
|
||||
Bullish Probability
|
||||
</th>
|
||||
@ -197,53 +197,53 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- row 1 -->
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="text-sm sm:text-[1rem]">+80% </td>
|
||||
<td class="text-sm sm:text-[1rem]">Strong Buy</td>
|
||||
<td class="text-sm sm:text-[1rem] text-end">10</td>
|
||||
</tr>
|
||||
<!-- row 2 -->
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="text-sm sm:text-[1rem]">+75%</td>
|
||||
<td class="text-sm sm:text-[1rem]">Buy</td>
|
||||
<td class="text-sm sm:text-[1rem] text-end">9</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="text-sm sm:text-[1rem]">+70%</td>
|
||||
<td class="text-sm sm:text-[1rem]">Buy</td>
|
||||
<td class="text-sm sm:text-[1rem] text-end">8</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="text-sm sm:text-[1rem]"> +60% </td>
|
||||
<td class="text-sm sm:text-[1rem]">Buy</td>
|
||||
<td class="text-sm sm:text-[1rem] text-end">7</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="text-sm sm:text-[1rem]">+50%</td>
|
||||
<td class="text-sm sm:text-[1rem]">Hold</td>
|
||||
<td class="text-sm sm:text-[1rem] text-end">6</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="text-sm sm:text-[1rem]">+45%</td>
|
||||
<td class="text-sm sm:text-[1rem]">Hold</td>
|
||||
<td class="text-sm sm:text-[1rem] text-end">5</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="text-sm sm:text-[1rem]">+40%</td>
|
||||
<td class="text-sm sm:text-[1rem]">Hold</td>
|
||||
<td class="text-sm sm:text-[1rem] text-end">4</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="text-sm sm:text-[1rem]">+35%</td>
|
||||
<td class="text-sm sm:text-[1rem]">Sell</td>
|
||||
<td class="text-sm sm:text-[1rem] text-end">3</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="text-sm sm:text-[1rem]">+30%</td>
|
||||
<td class="text-sm sm:text-[1rem]">Sell</td>
|
||||
<td class="text-sm sm:text-[1rem] text-end">2</td>
|
||||
</tr>
|
||||
<tr class="odd:bg-secondary">
|
||||
<tr class="odd:bg-odd">
|
||||
<td class="text-sm sm:text-[1rem]">+20%</td>
|
||||
<td class="text-sm sm:text-[1rem]">Strong Sell</td>
|
||||
<td class="text-sm sm:text-[1rem] text-end">1</td>
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
<div class="flex justify-start items-center w-full m-auto">
|
||||
<table class="w-full" data-test="statistics-table">
|
||||
<tbody>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Date</span>
|
||||
</td>
|
||||
@ -90,7 +90,7 @@
|
||||
{formatDateRange(rawData?.slice(-1)?.at(0)?.date)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Fee Range</span>
|
||||
</td>
|
||||
@ -100,7 +100,7 @@
|
||||
{lowestFee + "%" + "-" + highestFee + "%"}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Total Available Shares</span>
|
||||
</td>
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each displayList as item,index}
|
||||
<tr on:click={() => handleViewData(item)} class="border-y border-gray-800 odd:bg-secondary sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] cursor-pointer">
|
||||
<tr on:click={() => handleViewData(item)} class="border-y border-gray-800 odd:bg-odd sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] cursor-pointer">
|
||||
|
||||
<td class="text-white font-medium whitespace-nowrap">
|
||||
{item["Interventions"]?.length === 0 ? '-' : item["Interventions"]?.length > charNumber ? formatString(item["Interventions"]?.slice(0,charNumber)) + "..." : formatString(item["Interventions"])}
|
||||
@ -250,49 +250,49 @@
|
||||
>
|
||||
<tbody>
|
||||
<!-- row 1 -->
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="font-semibold w-full">NCT Number</td>
|
||||
<td class="">{trialId}</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Start Date</td>
|
||||
<td class="">{trialStart}</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">End Date</td>
|
||||
<td class="">{trialEnd}</td>
|
||||
</tr>
|
||||
<!-- row 2 -->
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Study Status</td>
|
||||
<td class="">{trialStage}</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Phase Status</td>
|
||||
<td class="">{trialPhase}</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Study Results</td>
|
||||
<td class="">{trialResult}</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Sex</td>
|
||||
<td class="">{formatString(trialSex)}</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Age</td>
|
||||
<td class=""
|
||||
@ -303,31 +303,31 @@
|
||||
>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Sponsor</td>
|
||||
<td class="">{trialSponsor}</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Enrollment</td>
|
||||
<td class="">{trialEnrollment}</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Study Type</td>
|
||||
<td class="">{trialStudyType}</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Funder Type</td>
|
||||
<td class="">{trialFunderType}</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-b border-slate-700 odd:bg-secondary even:bg-[#09090B]"
|
||||
class="border-b border-slate-700 odd:bg-odd even:bg-[#09090B]"
|
||||
>
|
||||
<td class="font-semibold">Website</td>
|
||||
<td class=""
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
<div class="flex justify-start items-center w-full m-auto">
|
||||
<table class="w-full" data-test="statistics-table">
|
||||
<tbody>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Date</span>
|
||||
</td>
|
||||
@ -98,7 +98,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-y border-gray-800 whitespace-nowrap odd:bg-secondary"
|
||||
class="border-y border-gray-800 whitespace-nowrap odd:bg-odd"
|
||||
>
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Total Volume</span>
|
||||
@ -110,7 +110,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="border-y border-gray-800 whitespace-nowrap odd:bg-secondary"
|
||||
class="border-y border-gray-800 whitespace-nowrap odd:bg-odd"
|
||||
>
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Avg. Short % of Volume</span>
|
||||
|
||||
@ -240,8 +240,7 @@
|
||||
<tbody>
|
||||
{#each showFullStats ? tableList?.slice(0, 10) : tableList?.slice(0, 3) as item, index}
|
||||
<tr
|
||||
class="border-y border-gray-800 odd:bg-secondary {index ===
|
||||
2 &&
|
||||
class="border-y border-gray-800 odd:bg-odd {index === 2 &&
|
||||
!showFullStats &&
|
||||
tableList?.length > 3
|
||||
? 'opacity-[0.5]'
|
||||
|
||||
@ -263,7 +263,7 @@
|
||||
<div class="flex justify-start items-center w-full m-auto">
|
||||
<table class="w-full" data-test="statistics-table">
|
||||
<tbody>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Date</span>
|
||||
</td>
|
||||
@ -273,7 +273,7 @@
|
||||
{formatDateRange(rawData?.slice(-1)?.at(0)?.date)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Price Range</span>
|
||||
</td>
|
||||
@ -283,7 +283,7 @@
|
||||
{lowestPrice + "-" + highestPrice}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Latest FTD</span>
|
||||
</td>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
</script>
|
||||
|
||||
{#each fields as { label, key }}
|
||||
<tr class="text-white odd:bg-secondary whitespace-nowrap">
|
||||
<tr class="text-white odd:bg-odd whitespace-nowrap border-b border-gray-800">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-white text-sm sm:text-[1rem]"
|
||||
>
|
||||
@ -13,9 +13,9 @@
|
||||
</td>
|
||||
{#each data as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{item[key] !== null && item[key] !== 0
|
||||
? abbreviateNumber(item[key]?.toFixed(2))
|
||||
: "-"}
|
||||
{@html item[key] !== null && item[key] !== 0
|
||||
? abbreviateNumber(item[key]?.toFixed(2), false, true)
|
||||
: "n/a"}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
@ -112,7 +112,7 @@
|
||||
<div class="flex justify-start items-center w-full m-auto">
|
||||
<table class="w-full" data-test="statistics-table">
|
||||
<tbody>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Date</span>
|
||||
</td>
|
||||
@ -122,7 +122,7 @@
|
||||
{formatDateRange(rawData?.slice(-1)?.at(0)?.date)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>IV Range</span>
|
||||
</td>
|
||||
@ -132,7 +132,7 @@
|
||||
{lowestIV + "%" + "-" + highestIV + "%"}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>RV Range</span>
|
||||
</td>
|
||||
|
||||
@ -97,7 +97,7 @@
|
||||
{#each displayList as item}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
<div class="flex justify-start items-center w-full m-auto">
|
||||
<table class="w-full" data-test="statistics-table">
|
||||
<tbody>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Date</span>
|
||||
</td>
|
||||
@ -98,7 +98,7 @@
|
||||
{formatDateRange(historyData?.slice(-1)?.at(0)?.date)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Total Notional Sum</span>
|
||||
</td>
|
||||
@ -110,7 +110,7 @@
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Total Trade Count</span>
|
||||
</td>
|
||||
@ -122,7 +122,7 @@
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Total Share Quantity</span>
|
||||
</td>
|
||||
@ -173,7 +173,7 @@
|
||||
<tbody>
|
||||
{#each showFullStats ? topMarketMakers?.slice(0, 10) : topMarketMakers?.slice(0, 3) as item, index}
|
||||
<tr
|
||||
class="border-y border-gray-800 odd:bg-secondary {index ===
|
||||
class="border-y border-gray-800 odd:bg-odd {index ===
|
||||
2 &&
|
||||
!showFullStats &&
|
||||
topMarketMakers?.length > 3
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
>
|
||||
<!-- head -->
|
||||
<thead>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<th class="bg-primary text-white text-sm font-semibold">
|
||||
Exchange holidays
|
||||
</th>
|
||||
@ -88,44 +88,44 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- row 1 -->
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="font-semibold"> New Years Day</td>
|
||||
<td class="">01.01.2024</td>
|
||||
</tr>
|
||||
<!-- row 2 -->
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="font-semibold">Martin Luther King, Jr. Day</td>
|
||||
<td class="">15.01.2024</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="font-semibold">Washington's Birthday</td>
|
||||
<td class="">19.02.2024</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="font-semibold"> Good Friday </td>
|
||||
<td class="bg-primary">29.03.2024</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="font-semibold">Memorial Day</td>
|
||||
<td class="">27.05.2024</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="font-semibold">Juneteenth National Independence Day</td>
|
||||
<td class="">19.06.2024</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="font-semibold">Independence Day</td>
|
||||
<td class="">04.07.2024</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="font-semibold">Labor Day</td>
|
||||
<td class="">02.09.2024</td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-700 odd:bg-secondary">
|
||||
<tr class="border-b border-slate-700 odd:bg-odd">
|
||||
<td class="font-semibold">Thanksgiving Day</td>
|
||||
<td class="">28.11.2024</td>
|
||||
</tr>
|
||||
<tr class="odd:bg-secondary">
|
||||
<tr class="odd:bg-odd">
|
||||
<td class="font-semibold">Christmas</td>
|
||||
<td class="">25.12.2024</td>
|
||||
</tr>
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
{#if Object?.keys(rawData)?.length !== 0}
|
||||
<div class="space-y-3 overflow-hidden">
|
||||
<!--Start Content-->
|
||||
<div class="w-auto lg:w-full p-1 flex flex-col m-auto">
|
||||
<div class="w-auto lg:w-full flex flex-col m-auto">
|
||||
<div class="flex flex-col items-center w-full mb-3">
|
||||
<div class="flex flex-row justify-start mr-auto items-center">
|
||||
<!--<img class="h-10 inline-block mr-2" src={copilotIcon} />-->
|
||||
@ -52,7 +52,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-white text-[1rem] pl-1">
|
||||
<div class="text-white text-[1rem]">
|
||||
{$displayCompanyName} is scheduled to release its earnings on {new Date(
|
||||
rawData?.date ?? null,
|
||||
)?.toLocaleString("en-US", {
|
||||
@ -70,7 +70,7 @@
|
||||
{/if}
|
||||
<br />Analysts project revenue of
|
||||
<span class="font-semibold"
|
||||
>{abbreviateNumber(rawData?.revenueEst, true)}</span
|
||||
>{@html abbreviateNumber(rawData?.revenueEst, true, true)}</span
|
||||
>, reflecting a
|
||||
<span
|
||||
class="{revenueRatio > 0
|
||||
@ -96,7 +96,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if Object?.keys(rawData)?.length !== 0}
|
||||
{#if data?.getNextEarnings?.past?.length !== 0}
|
||||
<div class="space-y-3 overflow-hidden mt-5">
|
||||
<!--Start Content-->
|
||||
<div class="w-auto lg:w-full p-1 flex flex-col m-auto">
|
||||
@ -113,7 +113,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<PastEarnings userTier={data?.user?.tier} rawData={data?.getNextEarnings?.past} />
|
||||
<PastEarnings
|
||||
userTier={data?.user?.tier}
|
||||
rawData={data?.getNextEarnings?.past}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@ -1,456 +1,479 @@
|
||||
<script lang="ts">
|
||||
import { stockTicker } from "$lib/store";
|
||||
import { abbreviateNumber } from "$lib/utils";
|
||||
import { stockTicker } from "$lib/store";
|
||||
import { abbreviateNumber } from "$lib/utils";
|
||||
|
||||
export let userTier;
|
||||
export let rawData;
|
||||
|
||||
let isLoaded = false;
|
||||
|
||||
let xData = [];
|
||||
|
||||
let tableRevenue = [];
|
||||
let tableRevenueEst = [];
|
||||
let tableRevenueSurprise = [];
|
||||
let tableEPS = [];
|
||||
let tableEPSEst = [];
|
||||
let tableEPSSurprise = [];
|
||||
let tableVolatility = [];
|
||||
export let userTier;
|
||||
export let rawData;
|
||||
|
||||
let isLoaded = false;
|
||||
|
||||
let xData = [];
|
||||
|
||||
let tableRevenue = [];
|
||||
let tableRevenueEst = [];
|
||||
let tableRevenueSurprise = [];
|
||||
let tableEPS = [];
|
||||
let tableEPSEst = [];
|
||||
let tableEPSSurprise = [];
|
||||
let tableVolatility = [];
|
||||
|
||||
let averageVolatility = 0;
|
||||
let positiveRevenueSurprisePercentage = 0;
|
||||
let positiveEpsSurprisePercentage = 0;
|
||||
|
||||
function prepareDataset() {
|
||||
|
||||
xData = rawData?.map(({ year, quarter }) => {
|
||||
const shortYear = String(year).slice(2); // Get the last two digits of the year
|
||||
return `${quarter} '${shortYear}`;
|
||||
const shortYear = String(year).slice(2); // Get the last two digits of the year
|
||||
return `${quarter} '${shortYear}`;
|
||||
});
|
||||
|
||||
tableRevenue = rawData?.map(({ revenue }) =>revenue);
|
||||
tableRevenueEst = rawData?.map(({ revenueEst }) =>revenueEst);
|
||||
tableRevenueSurprise = rawData?.map(({ revenueSurprisePercent }) =>revenueSurprisePercent);
|
||||
|
||||
tableEPS = rawData?.map(({ eps }) =>eps);
|
||||
tableEPSEst = rawData?.map(({ epsEst }) =>epsEst);
|
||||
tableEPSSurprise = rawData?.map(({ epsSurprisePercent }) =>epsSurprisePercent);
|
||||
tableRevenue = rawData?.map(({ revenue }) => revenue);
|
||||
tableRevenueEst = rawData?.map(({ revenueEst }) => revenueEst);
|
||||
tableRevenueSurprise = rawData?.map(
|
||||
({ revenueSurprisePercent }) => revenueSurprisePercent,
|
||||
);
|
||||
|
||||
tableVolatility = rawData?.map(({ volatility }) =>volatility);
|
||||
tableEPS = rawData?.map(({ eps }) => eps);
|
||||
tableEPSEst = rawData?.map(({ epsEst }) => epsEst);
|
||||
tableEPSSurprise = rawData?.map(
|
||||
({ epsSurprisePercent }) => epsSurprisePercent,
|
||||
);
|
||||
|
||||
averageVolatility = rawData?.length > 0
|
||||
? rawData.reduce((sum, item) => sum + (item?.volatility || 0), 0) / rawData?.length
|
||||
: 0;
|
||||
tableVolatility = rawData?.map(({ volatility }) => volatility);
|
||||
|
||||
averageVolatility =
|
||||
rawData?.length > 0
|
||||
? rawData.reduce((sum, item) => sum + (item?.volatility || 0), 0) /
|
||||
rawData?.length
|
||||
: 0;
|
||||
|
||||
const countPositiveRevenueSurprise = rawData?.filter(data => data.revenueSurprisePercent > 0)?.length;
|
||||
const countPositiveEpsSurprise = rawData.filter(data => data.epsSurprisePercent > 0).length;
|
||||
const countPositiveRevenueSurprise = rawData?.filter(
|
||||
(data) => data.revenueSurprisePercent > 0,
|
||||
)?.length;
|
||||
const countPositiveEpsSurprise = rawData.filter(
|
||||
(data) => data.epsSurprisePercent > 0,
|
||||
).length;
|
||||
|
||||
const totalDataCount = rawData?.length;
|
||||
const totalDataCount = rawData?.length;
|
||||
|
||||
positiveRevenueSurprisePercentage = Math.ceil((countPositiveRevenueSurprise / totalDataCount) * 100);
|
||||
positiveEpsSurprisePercentage = Math.ceil((countPositiveEpsSurprise / totalDataCount) * 100);
|
||||
positiveRevenueSurprisePercentage = Math.ceil(
|
||||
(countPositiveRevenueSurprise / totalDataCount) * 100,
|
||||
);
|
||||
positiveEpsSurprisePercentage = Math.ceil(
|
||||
(countPositiveEpsSurprise / totalDataCount) * 100,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$: {
|
||||
if ($stockTicker && typeof window !== "undefined") {
|
||||
isLoaded = false;
|
||||
prepareDataset()
|
||||
isLoaded = true;
|
||||
}
|
||||
$: {
|
||||
if ($stockTicker && typeof window !== "undefined") {
|
||||
isLoaded = false;
|
||||
prepareDataset();
|
||||
isLoaded = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<section class="overflow-hidden text-white h-full pb-8 sm:pb-2">
|
||||
<main class="overflow-hidden">
|
||||
<div class="w-full m-auto">
|
||||
|
||||
{#if isLoaded}
|
||||
{#if rawData?.length !== 0}
|
||||
}
|
||||
</script>
|
||||
|
||||
<section class="overflow-hidden text-white h-full pb-8 sm:pb-2">
|
||||
<main class="overflow-hidden">
|
||||
<div class="w-full m-auto">
|
||||
{#if isLoaded}
|
||||
{#if rawData?.length !== 0}
|
||||
<span class="">
|
||||
The average price volatility over this 3-day period is
|
||||
{#if userTier !== 'Pro'}
|
||||
... Unlock content with
|
||||
<a
|
||||
class="inline-block ml-0.5 text-blue-400 sm:hover:text-white"
|
||||
href="/pricing"
|
||||
>Pro Subscription <svg
|
||||
class="w-4 h-4 mb-1 inline-block text[#A3A3A3] sm:hover:text-white"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
><path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/></svg
|
||||
></a
|
||||
>
|
||||
{#if userTier !== "Pro"}
|
||||
... Unlock content with
|
||||
<a
|
||||
class="inline-block ml-0.5 text-blue-400 sm:hover:text-white"
|
||||
href="/pricing"
|
||||
>Pro Subscription <svg
|
||||
class="w-4 h-4 mb-1 inline-block text[#A3A3A3] sm:hover:text-white"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
><path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/></svg
|
||||
></a
|
||||
>
|
||||
{:else}
|
||||
<span class="font-bold">±{averageVolatility?.toFixed(2)}%</span>.
|
||||
During this period, the reported revenue exceeded expectations <span class="font-bold">{positiveRevenueSurprisePercentage}%</span> of the time & the reported EPS surpassed analyst estimates <span class="font-bold">{positiveEpsSurprisePercentage}%</span> of the time.
|
||||
<span class="font-bold">±{averageVolatility?.toFixed(2)}%</span>.
|
||||
During this period, the reported revenue exceeded expectations
|
||||
<span class="font-bold">{positiveRevenueSurprisePercentage}%</span
|
||||
>
|
||||
of the time & the reported EPS surpassed analyst estimates
|
||||
<span class="font-bold">{positiveEpsSurprisePercentage}%</span> of
|
||||
the time.
|
||||
{/if}
|
||||
</span>
|
||||
<div
|
||||
class="no-scrollbar flex justify-start items-center w-screen sm:w-full mt-3 m-auto overflow-x-scroll pr-5 sm:pr-0"
|
||||
<div
|
||||
class="no-scrollbar flex justify-start items-center w-screen sm:w-full mt-3 m-auto overflow-x-scroll pr-5 sm:pr-0"
|
||||
>
|
||||
<table
|
||||
class="table table-sm table-pin-cols table-compact rounded-none sm:rounded-md w-full bg-[#09090B] border-bg-[#09090B]"
|
||||
>
|
||||
<table
|
||||
class="table table-sm table-pin-cols table-compact rounded-none sm:rounded-md w-full bg-[#09090B] border-bg-[#09090B]"
|
||||
>
|
||||
<thead class="">
|
||||
<tr class="">
|
||||
<th
|
||||
class="bg-primary border-b border-[#000] text-white font-semibold text-sm text-start"
|
||||
>Date</th
|
||||
<thead class="">
|
||||
<tr class="">
|
||||
<th
|
||||
class="bg-primary border-b border-[#000] text-white font-semibold text-sm text-start"
|
||||
>Date</th
|
||||
>
|
||||
{#each xData as item}
|
||||
<td
|
||||
class="z-20 bg-primary border-b border-[#000] text-white font-semibold text-sm text-end bg-[#09090B]"
|
||||
>{item}</td
|
||||
>
|
||||
{#each xData as item}
|
||||
<td
|
||||
class="z-20 bg-primary border-b border-[#000] text-white font-semibold text-sm text-end bg-[#09090B]"
|
||||
>{item}</td
|
||||
>
|
||||
{/each}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="shadow-md">
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Reported Revenue
|
||||
</th>
|
||||
{#each tableRevenue as item, index}
|
||||
<td class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]">
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a class="inline-block ml-0.5 text-white whitespace-nowrap" href="/pricing">
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else}
|
||||
{#if item !== undefined && item !== null}
|
||||
<span>{abbreviateNumber(item)}</span>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{/if}
|
||||
{:else}
|
||||
{abbreviateNumber(item)}
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
|
||||
</tr>
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Est. Revenue
|
||||
</th>
|
||||
{#each tableRevenueEst as item, index}
|
||||
<td class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]">
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a class="inline-block ml-0.5 text-white whitespace-nowrap" href="/pricing">
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else}
|
||||
{#if item !== undefined && item !== null}
|
||||
<span>{abbreviateNumber(item)}</span>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{/if}
|
||||
{:else}
|
||||
{abbreviateNumber(item)}
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Revenue Surprise
|
||||
</th>
|
||||
{#each tableRevenueSurprise as item, index}
|
||||
<td class="text-white text-sm sm:text-[1rem] text-end font-semibold bg-[#09090B]">
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a class="inline-block ml-0.5 text-white whitespace-nowrap font-normal" href="/pricing">
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else}
|
||||
{#if item !== undefined && item !== null}
|
||||
<span
|
||||
class={item > 0
|
||||
? "text-[#00FC50] before:content-['+']"
|
||||
: item < 0
|
||||
? "text-[#FF2F1F]"
|
||||
: ""}
|
||||
>
|
||||
{abbreviateNumber(item)}%
|
||||
</span>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{/if}
|
||||
{:else}
|
||||
{/each}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="shadow-md">
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Reported Revenue
|
||||
</th>
|
||||
{#each tableRevenue as item, index}
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]"
|
||||
>
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a
|
||||
class="inline-block ml-0.5 text-white whitespace-nowrap"
|
||||
href="/pricing"
|
||||
>
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else if item !== undefined && item !== null}
|
||||
<span
|
||||
class={item > 0
|
||||
? "text-[#00FC50] before:content-['+']"
|
||||
: item < 0
|
||||
? "text-[#FF2F1F]"
|
||||
: ""}
|
||||
>
|
||||
{abbreviateNumber(item)}%
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Reported EPS
|
||||
</th>
|
||||
{#each tableEPS as item, index}
|
||||
<td class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]">
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a class="inline-block ml-0.5 text-white whitespace-nowrap" href="/pricing">
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else}
|
||||
{#if item !== undefined && item !== null}
|
||||
<span>{abbreviateNumber(item)}</span>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{/if}
|
||||
{:else}
|
||||
{abbreviateNumber(item)}
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
>{@html abbreviateNumber(item, false, true)}</span
|
||||
>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{:else}
|
||||
{@html abbreviateNumber(item, false, true)}
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Est. EPS
|
||||
</th>
|
||||
{#each tableEPSEst as item, index}
|
||||
<td class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]">
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a class="inline-block ml-0.5 text-white whitespace-nowrap" href="/pricing">
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else}
|
||||
{#if item !== undefined && item !== null}
|
||||
<span>{abbreviateNumber(item)}</span>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{/if}
|
||||
{:else}
|
||||
{abbreviateNumber(item)}
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
EPS Surprise
|
||||
</th>
|
||||
{#each tableEPSSurprise as item, index}
|
||||
<td class="text-white text-sm sm:text-[1rem] text-end font-semibold bg-[#09090B]">
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a class="inline-block ml-0.5 text-white whitespace-nowrap font-normal" href="/pricing">
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else}
|
||||
{#if item !== undefined && item !== null}
|
||||
<span
|
||||
class={item > 0
|
||||
? "text-[#00FC50] before:content-['+']"
|
||||
: item < 0
|
||||
? "text-[#FF2F1F]"
|
||||
: ""}
|
||||
>
|
||||
{abbreviateNumber(item)}%
|
||||
</span>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{/if}
|
||||
{:else}
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Est. Revenue
|
||||
</th>
|
||||
{#each tableRevenueEst as item, index}
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]"
|
||||
>
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a
|
||||
class="inline-block ml-0.5 text-white whitespace-nowrap"
|
||||
href="/pricing"
|
||||
>
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else if item !== undefined && item !== null}
|
||||
<span
|
||||
class={item > 0
|
||||
? "text-[#00FC50] before:content-['+']"
|
||||
: item < 0
|
||||
? "text-[#FF2F1F]"
|
||||
: ""}
|
||||
>
|
||||
{abbreviateNumber(item)}%
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
>{@html abbreviateNumber(item, false, true)}</span
|
||||
>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{:else}
|
||||
{@html abbreviateNumber(item, false, true)}
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Revenue Surprise
|
||||
</th>
|
||||
{#each tableRevenueSurprise as item, index}
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-end font-semibold bg-[#09090B]"
|
||||
>
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a
|
||||
class="inline-block ml-0.5 text-white whitespace-nowrap font-normal"
|
||||
href="/pricing"
|
||||
>
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else if item !== undefined && item !== null}
|
||||
<span
|
||||
class={item > 0
|
||||
? "text-[#00FC50] before:content-['+']"
|
||||
: item < 0
|
||||
? "text-[#FF2F1F]"
|
||||
: ""}
|
||||
>
|
||||
{abbreviateNumber(item)}%
|
||||
</span>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{:else}
|
||||
<span
|
||||
class={item > 0
|
||||
? "text-[#00FC50] before:content-['+']"
|
||||
: item < 0
|
||||
? "text-[#FF2F1F]"
|
||||
: ""}
|
||||
>
|
||||
Volatility
|
||||
</th>
|
||||
{#each tableVolatility as item, index}
|
||||
<td class="text-white text-sm sm:text-[1rem] text-end font-semibold bg-[#09090B]">
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a class="inline-block ml-0.5 text-white whitespace-nowrap font-normal" href="/pricing">
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else}
|
||||
{#if item !== undefined && item !== null}
|
||||
±{abbreviateNumber(item)}%
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{/if}
|
||||
{:else}
|
||||
{abbreviateNumber(item)}%
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Reported EPS
|
||||
</th>
|
||||
{#each tableEPS as item, index}
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]"
|
||||
>
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a
|
||||
class="inline-block ml-0.5 text-white whitespace-nowrap"
|
||||
href="/pricing"
|
||||
>
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else if item !== undefined && item !== null}
|
||||
<span>{abbreviateNumber(item)}</span>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{:else}
|
||||
{abbreviateNumber(item)}
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Est. EPS
|
||||
</th>
|
||||
{#each tableEPSEst as item, index}
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]"
|
||||
>
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a
|
||||
class="inline-block ml-0.5 text-white whitespace-nowrap"
|
||||
href="/pricing"
|
||||
>
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else if item !== undefined && item !== null}
|
||||
<span>{abbreviateNumber(item)}</span>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{:else}
|
||||
{abbreviateNumber(item)}
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
EPS Surprise
|
||||
</th>
|
||||
{#each tableEPSSurprise as item, index}
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-end font-semibold bg-[#09090B]"
|
||||
>
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a
|
||||
class="inline-block ml-0.5 text-white whitespace-nowrap font-normal"
|
||||
href="/pricing"
|
||||
>
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else if item !== undefined && item !== null}
|
||||
<span
|
||||
class={item > 0
|
||||
? "text-[#00FC50] before:content-['+']"
|
||||
: item < 0
|
||||
? "text-[#FF2F1F]"
|
||||
: ""}
|
||||
>
|
||||
{abbreviateNumber(item)}%
|
||||
</span>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{:else}
|
||||
<span
|
||||
class={item > 0
|
||||
? "text-[#00FC50] before:content-['+']"
|
||||
: item < 0
|
||||
? "text-[#FF2F1F]"
|
||||
: ""}
|
||||
>
|
||||
{abbreviateNumber(item)}%
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
<tr class="bg-primary border-b-[#27272A]">
|
||||
<th
|
||||
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
|
||||
>
|
||||
Volatility
|
||||
</th>
|
||||
{#each tableVolatility as item, index}
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-end font-semibold bg-[#09090B]"
|
||||
>
|
||||
{#if index !== 0}
|
||||
{#if userTier !== "Pro"}
|
||||
<a
|
||||
class="inline-block ml-0.5 text-white whitespace-nowrap font-normal"
|
||||
href="/pricing"
|
||||
>
|
||||
Pro
|
||||
<svg
|
||||
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
{:else if item !== undefined && item !== null}
|
||||
±{abbreviateNumber(item)}%
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{/if}
|
||||
{:else}
|
||||
<div class="flex justify-center items-center h-80">
|
||||
<div class="relative">
|
||||
<label
|
||||
class="bg-secondary rounded-md h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
|
||||
>
|
||||
<span class="loading loading-spinner loading-md text-gray-400"
|
||||
></span>
|
||||
</label>
|
||||
</div>
|
||||
{:else}
|
||||
n/a
|
||||
{/if}
|
||||
{:else}
|
||||
±{abbreviateNumber(item)}%
|
||||
{/if}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
{:else}
|
||||
<div class="flex justify-center items-center h-80">
|
||||
<div class="relative">
|
||||
<label
|
||||
class="bg-secondary rounded-md h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
|
||||
>
|
||||
<span class="loading loading-spinner loading-md text-gray-400"
|
||||
></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
.app {
|
||||
height: 300px;
|
||||
max-width: 100%; /* Ensure chart width doesn't exceed the container */
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.app {
|
||||
height: 300px;
|
||||
max-width: 100%; /* Ensure chart width doesn't exceed the container */
|
||||
height: 210px;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.app {
|
||||
height: 210px;
|
||||
}
|
||||
}
|
||||
|
||||
.chart {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
}
|
||||
|
||||
.chart {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -272,7 +272,7 @@
|
||||
<div class="flex justify-start items-center w-full m-auto mt-6">
|
||||
<table class="w-full" data-test="statistics-table">
|
||||
<tbody>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Date</span>
|
||||
</td>
|
||||
@ -282,7 +282,7 @@
|
||||
{formatDateRange(rawData?.lastDate)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Volume in $</span>
|
||||
</td>
|
||||
@ -292,7 +292,7 @@
|
||||
{monthlyVolume}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Retail Sentiment Range</span>
|
||||
</td>
|
||||
|
||||
@ -248,11 +248,15 @@
|
||||
>
|
||||
Institutions hold a total of
|
||||
<span class="font-semibold"
|
||||
>{abbreviateNumber(rawData?.numberOf13Fshares)}</span
|
||||
>{@html abbreviateNumber(
|
||||
rawData?.numberOf13Fshares,
|
||||
false,
|
||||
true,
|
||||
)}</span
|
||||
>
|
||||
{$displayCompanyName} shares, with a combined investment of
|
||||
<span class="font-semibold"
|
||||
>{abbreviateNumber(rawData?.totalInvested, true)}</span
|
||||
>{@html abbreviateNumber(rawData?.totalInvested, true, true)}</span
|
||||
>.
|
||||
</div>
|
||||
|
||||
@ -320,7 +324,7 @@
|
||||
|
||||
<div class="w-full mt-5 mb-10 m-auto flex justify-center items-center">
|
||||
<div
|
||||
class="w-full grid grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 gap-y-3 lg:gap-y-3 gap-x-3"
|
||||
class="w-full grid grid-cols-2 lg:grid-cols-4 gap-y-3 lg:gap-y-3 gap-x-3"
|
||||
>
|
||||
<!--Start Put/Call-->
|
||||
<div
|
||||
@ -530,7 +534,7 @@
|
||||
{#each displayList as item, index}
|
||||
{#if item?.investorName?.length > 0}
|
||||
<tr
|
||||
class="border-y border-gray-800 odd:bg-secondary sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] {index +
|
||||
class="border-y border-gray-800 odd:bg-odd sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] {index +
|
||||
1 ===
|
||||
shareholderList?.length && data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
@ -562,8 +566,8 @@
|
||||
<td
|
||||
class="text-white text-end font-medium text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.sharesNumber !== null
|
||||
? abbreviateNumber(item?.sharesNumber)
|
||||
{@html item?.sharesNumber !== null
|
||||
? abbreviateNumber(item?.sharesNumber, false, true)
|
||||
: "-"}
|
||||
</td>
|
||||
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
<div class="flex justify-start items-center w-full m-auto mt-6">
|
||||
<table class="w-full" data-test="statistics-table">
|
||||
<tbody>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Short Interest</span>
|
||||
</td>
|
||||
@ -121,7 +121,7 @@
|
||||
{abbreviateNumber(rawData?.sharesShort)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Short Previous Month</span>
|
||||
</td>
|
||||
@ -131,7 +131,7 @@
|
||||
{abbreviateNumber(rawData?.sharesShortPriorMonth)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Short % of Shares Out</span>
|
||||
</td>
|
||||
@ -141,7 +141,7 @@
|
||||
{rawData?.shortOutStandingPercent}%
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-y border-gray-800 odd:bg-secondary">
|
||||
<tr class="border-y border-gray-800 odd:bg-odd">
|
||||
<td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
|
||||
<span>Short % of Float</span>
|
||||
</td>
|
||||
|
||||
@ -206,7 +206,7 @@
|
||||
<tbody>
|
||||
{#each showFullStats ? signalList : signalList?.slice(0, 3) as item, index}
|
||||
<tr
|
||||
class="border-y border-gray-800 odd:bg-secondary sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] {index ===
|
||||
class="border-y border-gray-800 odd:bg-odd sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] {index ===
|
||||
2 &&
|
||||
!showFullStats &&
|
||||
signalList?.length > 2
|
||||
|
||||
@ -148,8 +148,16 @@
|
||||
},
|
||||
{ name: "Top Analyst Rating", rule: "topAnalystRating", type: "rating" },
|
||||
{ name: "Top Analyst Count", rule: "topAnalystCounter", type: "int" },
|
||||
{ name: "Top Analyst Price Target", rule: "topAnalystPriceTarget", type: "float" },
|
||||
{ name: "Top Analyst PT Upside", rule: "topAnalystUpside", type: "percentSign" },
|
||||
{
|
||||
name: "Top Analyst Price Target",
|
||||
rule: "topAnalystPriceTarget",
|
||||
type: "float",
|
||||
},
|
||||
{
|
||||
name: "Top Analyst PT Upside",
|
||||
rule: "topAnalystUpside",
|
||||
type: "percentSign",
|
||||
},
|
||||
];
|
||||
|
||||
allRows = [...allRows, ...specificRows];
|
||||
@ -164,58 +172,57 @@
|
||||
|
||||
allRows = sortIndicatorCheckMarks(allRows);
|
||||
|
||||
|
||||
const handleDownloadMessage = (event) => {
|
||||
let updateData = event?.data?.rawData ?? []; // Use a new variable for updated data
|
||||
// Check if both arrays exist and have data
|
||||
if (!updateData?.length || !rawData?.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create a new array to ensure reactivity
|
||||
const updatedRawData = [...rawData];
|
||||
|
||||
for (let i = 0; i < updateData.length; i++) {
|
||||
if (updatedRawData[i]) {
|
||||
// Create a new object to merge the data
|
||||
let newData = {};
|
||||
|
||||
// Merge fields from updateData
|
||||
Object.assign(newData, updateData[i]);
|
||||
|
||||
// Merge fields from defaultRules that are missing in updateData
|
||||
defaultRules.forEach((rule) => {
|
||||
if (!(rule in updateData[i]) && rule in updatedRawData[i]) {
|
||||
newData[rule] = updatedRawData[i][rule];
|
||||
}
|
||||
});
|
||||
|
||||
// Preserve the original 'priceTarget' and other default rule values
|
||||
for (let rule of defaultRules) {
|
||||
if (rule in updatedRawData[i]) {
|
||||
newData[rule] = updatedRawData[i][rule];
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure 'rank' and 'years' are added if they are missing in updateData
|
||||
if (!("rank" in updateData[i]) && "rank" in updatedRawData[i]) {
|
||||
newData.rank = updatedRawData[i]["rank"];
|
||||
}
|
||||
if (!("years" in updateData[i]) && "years" in updatedRawData[i]) {
|
||||
newData.years = updatedRawData[i]["years"];
|
||||
}
|
||||
|
||||
// Update the specific item in the array
|
||||
updatedRawData[i] = newData;
|
||||
let updateData = event?.data?.rawData ?? []; // Use a new variable for updated data
|
||||
// Check if both arrays exist and have data
|
||||
if (!updateData?.length || !rawData?.length) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger reactivity by creating a new reference
|
||||
rawData = [...updatedRawData];
|
||||
stockList = rawData?.slice(0, 100);
|
||||
columns = generateColumns(rawData);
|
||||
sortOrders = generateSortOrders(rawData);
|
||||
};
|
||||
|
||||
// Create a new array to ensure reactivity
|
||||
const updatedRawData = [...rawData];
|
||||
|
||||
for (let i = 0; i < updateData.length; i++) {
|
||||
if (updatedRawData[i]) {
|
||||
// Create a new object to merge the data
|
||||
let newData = {};
|
||||
|
||||
// Merge fields from updateData
|
||||
Object.assign(newData, updateData[i]);
|
||||
|
||||
// Merge fields from defaultRules that are missing in updateData
|
||||
defaultRules.forEach((rule) => {
|
||||
if (!(rule in updateData[i]) && rule in updatedRawData[i]) {
|
||||
newData[rule] = updatedRawData[i][rule];
|
||||
}
|
||||
});
|
||||
|
||||
// Preserve the original 'priceTarget' and other default rule values
|
||||
for (let rule of defaultRules) {
|
||||
if (rule in updatedRawData[i]) {
|
||||
newData[rule] = updatedRawData[i][rule];
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure 'rank' and 'years' are added if they are missing in updateData
|
||||
if (!("rank" in updateData[i]) && "rank" in updatedRawData[i]) {
|
||||
newData.rank = updatedRawData[i]["rank"];
|
||||
}
|
||||
if (!("years" in updateData[i]) && "years" in updatedRawData[i]) {
|
||||
newData.years = updatedRawData[i]["years"];
|
||||
}
|
||||
|
||||
// Update the specific item in the array
|
||||
updatedRawData[i] = newData;
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger reactivity by creating a new reference
|
||||
rawData = [...updatedRawData];
|
||||
stockList = rawData?.slice(0, 100);
|
||||
columns = generateColumns(rawData);
|
||||
sortOrders = generateSortOrders(rawData);
|
||||
};
|
||||
|
||||
const updateStockScreenerData = async () => {
|
||||
downloadWorker.postMessage({
|
||||
@ -687,7 +694,6 @@
|
||||
};
|
||||
|
||||
$: charNumber = $screenWidth < 640 ? 15 : 20;
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Content area -->
|
||||
@ -857,7 +863,7 @@
|
||||
<tbody>
|
||||
{#each stockList as item, index}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] {index +
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B] {index +
|
||||
1 ===
|
||||
rawData?.length &&
|
||||
data?.user?.tier !== 'Pro' &&
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
{#each watchList as item}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="text-sm sm:text-[1rem] text-start border-b-[#09090B]"
|
||||
|
||||
@ -657,7 +657,7 @@ export function abbreviateNumber(number, addDollarSign = false, color = false) {
|
||||
|
||||
if (color) {
|
||||
if (suffix === "K") {
|
||||
suffix = '<span class=\"font-semibold text-[#8374DC]\">K</span>';
|
||||
suffix = '<span class=\"font-semibold text-blue-400\">K</span>';
|
||||
} else if (suffix === "M") {
|
||||
suffix = '<span class=\"font-semibold text-[#FACD38]\">M</span>';
|
||||
} else if (suffix === "B") {
|
||||
|
||||
@ -727,7 +727,7 @@
|
||||
</ul>
|
||||
{:else}
|
||||
<Infobox
|
||||
text="Currently, there are no upcoming earnings reports available that include the latest analyst estimates."
|
||||
text="Currently, there are no upcoming earnings reports available."
|
||||
/>
|
||||
{/if}
|
||||
</Card.Content>
|
||||
|
||||
@ -206,7 +206,7 @@
|
||||
<tbody>
|
||||
{#each analystList as item, index}
|
||||
<tr
|
||||
class="border-b border-[#27272A] sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary {index +
|
||||
class="border-b border-[#27272A] sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd {index +
|
||||
1 ===
|
||||
rawData?.length && data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
|
||||
@ -248,7 +248,7 @@
|
||||
Stock Analyst at {companyName}
|
||||
</p>
|
||||
<div class="inline-flex items-center">
|
||||
<div class="flex flex-row items-center ">
|
||||
<div class="flex flex-row items-center">
|
||||
{#each Array.from({ length: 5 }) as _, i}
|
||||
{#if i < Math.floor(analystScore)}
|
||||
<svg
|
||||
@ -277,7 +277,8 @@
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
<span class="ml-1 text-[1rem] text-white">({analystScore})</span
|
||||
<span class="ml-1 text-[1rem] text-white"
|
||||
>({analystScore})</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@ -289,7 +290,9 @@
|
||||
<div class="text-2xl font-semibold tracking-tight text-white">
|
||||
# {rank}
|
||||
</div>
|
||||
<div class="text-[1rem] font-semibold leading-6 text-gray-300">
|
||||
<div
|
||||
class="text-[1rem] font-semibold leading-6 text-gray-300"
|
||||
>
|
||||
Out of {numOfAnalysts} analysts
|
||||
</div>
|
||||
</div>
|
||||
@ -299,7 +302,9 @@
|
||||
<div class="text-2xl font-bold tracking-tight text-white">
|
||||
{totalRatings}
|
||||
</div>
|
||||
<div class="text-[1rem] font-semibold leading-6 text-gray-300">
|
||||
<div
|
||||
class="text-[1rem] font-semibold leading-6 text-gray-300"
|
||||
>
|
||||
Total ratings
|
||||
</div>
|
||||
</div>
|
||||
@ -313,7 +318,9 @@
|
||||
: "text-[#EF4444]"}>{successRate?.toFixed(2)}%</span
|
||||
>
|
||||
</div>
|
||||
<div class="text-[1rem] font-semibold leading-6 text-gray-300">
|
||||
<div
|
||||
class="text-[1rem] font-semibold leading-6 text-gray-300"
|
||||
>
|
||||
Success rate
|
||||
</div>
|
||||
</div>
|
||||
@ -327,7 +334,9 @@
|
||||
: "text-[#EF4444]"}>{avgReturn?.toFixed(2)}%</span
|
||||
>
|
||||
</div>
|
||||
<div class="text-[1rem] font-semibold leading-6 text-gray-300">
|
||||
<div
|
||||
class="text-[1rem] font-semibold leading-6 text-gray-300"
|
||||
>
|
||||
Average return
|
||||
</div>
|
||||
</div>
|
||||
@ -388,7 +397,7 @@
|
||||
<tbody>
|
||||
{#each stockList as item, index}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td class="hidden lg:table-cell"
|
||||
><button
|
||||
|
||||
@ -193,7 +193,7 @@
|
||||
<tbody>
|
||||
{#each displayList as item, index}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] border-b border-[#27272A] sm:hover:bg-opacity-[0.2] odd:bg-secondary {index +
|
||||
class="sm:hover:bg-[#245073] border-b border-[#27272A] sm:hover:bg-opacity-[0.2] odd:bg-odd {index +
|
||||
1 ===
|
||||
displayList?.length && data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
|
||||
@ -224,9 +224,9 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<Infobox text={"We update our data in realtime to provide you with the latest stock picks of Jim Cramer."} />
|
||||
<Infobox
|
||||
text={"We update our data in realtime to provide you with the latest stock picks of Jim Cramer."}
|
||||
/>
|
||||
|
||||
<div class="w-full m-auto mt-10">
|
||||
<div
|
||||
@ -241,7 +241,7 @@
|
||||
<tbody>
|
||||
{#each stockList as item, index}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] border-b border-[#27272A] sm:hover:bg-opacity-[0.2] odd:bg-secondary {index +
|
||||
class="sm:hover:bg-[#245073] border-b border-[#27272A] sm:hover:bg-opacity-[0.2] odd:bg-odd {index +
|
||||
1 ===
|
||||
rawData?.length && data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
@ -374,7 +374,6 @@
|
||||
</table>
|
||||
</div>
|
||||
<UpgradeToPro {data} />
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@ -174,7 +174,7 @@
|
||||
{#each symbolList as item, index}
|
||||
<tr
|
||||
on:click={() => goto("/crypto/" + item?.symbol)}
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] shake-ticker cursor-pointer"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B] shake-ticker cursor-pointer"
|
||||
>
|
||||
<td
|
||||
class="text-blue-400 font-medium text-sm text-start border-b-[#09090B]"
|
||||
|
||||
@ -361,7 +361,7 @@
|
||||
<tbody>
|
||||
{#each senateTradingList as item}
|
||||
<tr
|
||||
class="odd:bg-secondary sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B]"
|
||||
class="odd:bg-odd sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap pb-3 border-b border-b-[#09090B]"
|
||||
|
||||
@ -329,9 +329,7 @@ updateYearRange()
|
||||
</thead>
|
||||
<tbody class="shadow-md">
|
||||
{#each quantStats[$cryptoTicker?.toUpperCase()]["Worst 10 Drawdowns"] as item}
|
||||
<tr
|
||||
class="text-white border-y border-gray-800 odd:bg-secondary"
|
||||
>
|
||||
<tr class="text-white border-y border-gray-800 odd:bg-odd">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] text-white whitespace-nowrap"
|
||||
>
|
||||
@ -432,9 +430,7 @@ updateYearRange()
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -476,9 +472,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -514,9 +508,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -536,9 +528,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -558,9 +548,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -598,9 +586,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -620,9 +606,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -642,9 +626,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -662,9 +644,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -682,9 +662,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -702,9 +680,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -724,9 +700,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -746,9 +720,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -786,9 +758,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -826,9 +796,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -866,9 +834,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -888,9 +854,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -910,9 +874,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -954,9 +916,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -998,9 +958,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1020,9 +978,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1040,9 +996,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1060,9 +1014,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1082,9 +1034,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1104,9 +1054,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1126,9 +1074,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1148,9 +1094,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1170,9 +1114,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1208,9 +1150,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1248,9 +1188,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1288,9 +1226,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1326,9 +1262,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1368,9 +1302,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1410,9 +1342,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1452,9 +1382,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1494,9 +1422,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1536,9 +1462,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1576,9 +1500,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1598,9 +1520,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1620,9 +1540,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1642,9 +1560,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1682,9 +1598,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1724,9 +1638,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1746,9 +1658,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1768,9 +1678,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1790,9 +1698,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
|
||||
@ -478,7 +478,7 @@
|
||||
{#each day as item}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="border-b-[#09090B] text-sm sm:text-[1rem]"
|
||||
|
||||
@ -478,7 +478,7 @@
|
||||
{#each day as item, index}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="text-blue-400 border-b-[#09090B] text-start text-sm sm:text-[1rem]"
|
||||
|
||||
@ -683,7 +683,7 @@
|
||||
{#each day as item}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd"
|
||||
>
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] border-b-[#09090B]"
|
||||
|
||||
@ -907,7 +907,7 @@
|
||||
{#each tableList as item}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] shake-ticker cursor-pointer"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B] shake-ticker cursor-pointer"
|
||||
>
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
|
||||
@ -185,7 +185,7 @@
|
||||
<tbody>
|
||||
{#each stockList as item, index}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
|
||||
@ -366,7 +366,7 @@
|
||||
</thead>
|
||||
<tbody class="shadow-md">
|
||||
{#each rawData?.history as item}
|
||||
<tr class="text-gray-200 odd:bg-secondary">
|
||||
<tr class="text-gray-200 odd:bg-odd">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap text-white font-medium border-b border-[#09090B]"
|
||||
>
|
||||
|
||||
@ -321,7 +321,7 @@
|
||||
<tbody>
|
||||
{#each senateTradingList as item}
|
||||
<tr
|
||||
class="odd:bg-secondary sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B]"
|
||||
class="odd:bg-odd sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap pb-3 border-b border-b-[#09090B]"
|
||||
|
||||
@ -878,7 +878,7 @@
|
||||
on:click={() => handleViewData(item?.date)}
|
||||
on:mouseover={() =>
|
||||
getDailyTransactions($etfTicker + "+" + item?.date)}
|
||||
class="cursor-pointer sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] {index +
|
||||
class="cursor-pointer sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B] {index +
|
||||
1 ===
|
||||
optionList?.slice(0, 3)?.length &&
|
||||
data?.user?.tier !== 'Pro'
|
||||
@ -1067,8 +1067,7 @@
|
||||
<tbody>
|
||||
{#each data?.user?.tier === "Pro" ? optionChainList : optionChainList?.slice(0, 3) as item, index}
|
||||
<tr
|
||||
class="odd:bg-secondary border-b-[#09090B] {index +
|
||||
1 ===
|
||||
class="odd:bg-odd border-b-[#09090B] {index + 1 ===
|
||||
optionChainList?.slice(0, 3)?.length &&
|
||||
data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
@ -1251,7 +1250,7 @@
|
||||
<tbody>
|
||||
{#each optionHistoryList as item}
|
||||
<!-- row -->
|
||||
<tr class="odd:bg-secondary border-b-[#09090B]">
|
||||
<tr class="odd:bg-odd border-b-[#09090B]">
|
||||
<td class="text-white text-sm text-start whitespace-nowrap">
|
||||
{formatTime(item?.time)}
|
||||
</td>
|
||||
|
||||
@ -329,9 +329,7 @@ updateYearRange()
|
||||
</thead>
|
||||
<tbody class="shadow-md">
|
||||
{#each quantStats[$etfTicker?.toUpperCase()]["Worst 10 Drawdowns"] as item}
|
||||
<tr
|
||||
class="text-white border-y border-gray-800 odd:bg-secondary"
|
||||
>
|
||||
<tr class="text-white border-y border-gray-800 odd:bg-odd">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] text-white whitespace-nowrap"
|
||||
>
|
||||
@ -432,9 +430,7 @@ updateYearRange()
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -476,9 +472,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -514,9 +508,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -536,9 +528,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -558,9 +548,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -598,9 +586,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -618,9 +604,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -640,9 +624,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -660,9 +642,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -680,9 +660,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -700,9 +678,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -722,9 +698,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -744,9 +718,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -784,9 +756,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -824,9 +794,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -864,9 +832,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -886,9 +852,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -906,9 +870,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -950,9 +912,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -994,9 +954,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1016,9 +974,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1036,9 +992,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1056,9 +1010,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1078,9 +1030,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1100,9 +1050,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1122,9 +1070,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1144,9 +1090,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1166,9 +1110,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1204,9 +1146,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1244,9 +1184,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1284,9 +1222,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1322,9 +1258,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1364,9 +1298,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1406,9 +1338,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1448,9 +1378,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1490,9 +1418,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1532,9 +1458,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1572,9 +1496,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1594,9 +1516,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1616,9 +1536,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1638,9 +1556,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1678,9 +1594,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1720,9 +1634,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1742,9 +1654,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1764,9 +1674,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
@ -1786,9 +1694,7 @@ updateYearRange()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr
|
||||
class="text-white odd:bg-secondary border-b border-[#27272A]"
|
||||
>
|
||||
<tr class="text-white odd:bg-odd border-b border-[#27272A]">
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
|
||||
@ -120,73 +120,72 @@
|
||||
<!-- Add more Twitter meta tags as needed -->
|
||||
</svelte:head>
|
||||
|
||||
<section class="w-full overflow-hidden m-auto">
|
||||
|
||||
<Infobox text={"Every Exchange-Traded Fund (ETF) is managed by a specific company. Below is a list of companies offering actively traded ETFs on the U.S. stock market."} />
|
||||
<section class="w-full overflow-hidden m-auto">
|
||||
<Infobox
|
||||
text={"Every Exchange-Traded Fund (ETF) is managed by a specific company. Below is a list of companies offering actively traded ETFs on the U.S. stock market."}
|
||||
/>
|
||||
|
||||
<!-- Page wrapper -->
|
||||
<div class="flex justify-center w-full m-auto h-full overflow-hidden">
|
||||
<!-- Content area -->
|
||||
<div class="w-full">
|
||||
<div class="w-full overflow-x-scroll">
|
||||
<table
|
||||
class="table rounded-none sm:rounded-md w-full border-bg-[#09090B] m-auto mt-4"
|
||||
>
|
||||
<thead>
|
||||
<TableHeader {columns} {sortOrders} {sortData} />
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each etfProviderList as item,index}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] {index +
|
||||
1 ===
|
||||
etfProviderList?.length &&
|
||||
data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
: ''}"
|
||||
>
|
||||
<td
|
||||
class="text-sm sm:text-[1rem] whitespace-nowrap font-medium border-b-[#09090B]"
|
||||
<div class="w-full">
|
||||
<div class="w-full overflow-x-scroll">
|
||||
<table
|
||||
class="table rounded-none sm:rounded-md w-full border-bg-[#09090B] m-auto mt-4"
|
||||
>
|
||||
<thead>
|
||||
<TableHeader {columns} {sortOrders} {sortData} />
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each etfProviderList as item, index}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B] {index +
|
||||
1 ===
|
||||
etfProviderList?.length && data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
: ''}"
|
||||
>
|
||||
<a
|
||||
href={"/etf/etf-providers/" + item?.etfProvider}
|
||||
class="sm:hover:underline sm:hover:underline-offset-4 text-white"
|
||||
<td
|
||||
class="text-sm sm:text-[1rem] whitespace-nowrap font-medium border-b-[#09090B]"
|
||||
>
|
||||
{formatETFName(item?.etfProvider)}
|
||||
</a>
|
||||
</td>
|
||||
<a
|
||||
href={"/etf/etf-providers/" + item?.etfProvider}
|
||||
class="sm:hover:underline sm:hover:underline-offset-4 text-white"
|
||||
>
|
||||
{formatETFName(item?.etfProvider)}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B] text-end"
|
||||
>
|
||||
{abbreviateNumber(item?.totalAssets)}
|
||||
</td>
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B] text-end"
|
||||
>
|
||||
{abbreviateNumber(item?.totalAssets)}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]"
|
||||
>
|
||||
{item?.funds}
|
||||
</td>
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]"
|
||||
>
|
||||
{item?.funds}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]"
|
||||
>
|
||||
{item?.avgExpenseRatio}%
|
||||
</td>
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]"
|
||||
>
|
||||
{item?.avgExpenseRatio}%
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]"
|
||||
>
|
||||
{item?.avgHoldings}
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]"
|
||||
>
|
||||
{item?.avgHoldings}
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<UpgradeToPro {data} />
|
||||
</div>
|
||||
<UpgradeToPro {data} />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -119,20 +119,18 @@
|
||||
etfProviderData = [...originalData].sort(compareValues)?.slice(0, 50);
|
||||
};
|
||||
|
||||
|
||||
function generateStatementInfoHTML() {
|
||||
return `
|
||||
${etfProviderName} has ${rawData?.length} ETFs listed with a total of ${abbreviateNumber(
|
||||
totalAssets
|
||||
)}
|
||||
totalAssets,
|
||||
)}
|
||||
in assets under management. The funds have an average expense ratio of ${avgExpenseRatio?.toFixed(
|
||||
2,
|
||||
)}%.
|
||||
`;
|
||||
}
|
||||
|
||||
let htmlOutput = generateStatementInfoHTML();
|
||||
}
|
||||
|
||||
let htmlOutput = generateStatementInfoHTML();
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@ -166,9 +164,9 @@ let htmlOutput = generateStatementInfoHTML();
|
||||
|
||||
<section class="w-full overflow-hidden m-auto">
|
||||
{#if rawData?.length !== 0}
|
||||
<div class="mb-5">
|
||||
<Infobox text={htmlOutput} />
|
||||
</div>
|
||||
<div class="mb-5">
|
||||
<Infobox text={htmlOutput} />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div
|
||||
@ -210,90 +208,88 @@ let htmlOutput = generateStatementInfoHTML();
|
||||
<!-- Page wrapper -->
|
||||
<div class="flex justify-center w-full m-auto h-full overflow-hidden">
|
||||
<!-- Content area -->
|
||||
<div class="w-full">
|
||||
<div class="w-full overflow-x-auto mt-5">
|
||||
<table
|
||||
class="table table-sm table-compact rounded-none sm:rounded-md w-full bg-[#09090B] border-bg-[#09090B]"
|
||||
>
|
||||
<thead>
|
||||
<TableHeader {columns} {sortOrders} {sortData} />
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each etfProviderData as item, index}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] {index +
|
||||
1 ===
|
||||
etfProviderData?.length &&
|
||||
data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
: ''}"
|
||||
>
|
||||
<td
|
||||
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
<div class="w-full">
|
||||
<div class="w-full overflow-x-auto mt-5">
|
||||
<table
|
||||
class="table table-sm table-compact rounded-none sm:rounded-md w-full bg-[#09090B] border-bg-[#09090B]"
|
||||
>
|
||||
<thead>
|
||||
<TableHeader {columns} {sortOrders} {sortData} />
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each etfProviderData as item, index}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B] {index +
|
||||
1 ===
|
||||
etfProviderData?.length && data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
: ''}"
|
||||
>
|
||||
<HoverStockChart symbol={item?.symbol} assetType={"etf"} />
|
||||
</td>
|
||||
<td
|
||||
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
>
|
||||
<HoverStockChart symbol={item?.symbol} assetType={"etf"} />
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-gray-200 border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.name?.length > charNumber
|
||||
? item?.name?.slice(0, charNumber) + "..."
|
||||
: item?.name}
|
||||
</td>
|
||||
<td
|
||||
class="text-gray-200 border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.name?.length > charNumber
|
||||
? item?.name?.slice(0, charNumber) + "..."
|
||||
: item?.name}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b border-[#09090B] text-end"
|
||||
>
|
||||
{item?.price}
|
||||
</td>
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b border-[#09090B] text-end"
|
||||
>
|
||||
{item?.price}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b border-[#09090B] text-end"
|
||||
>
|
||||
{#if item?.changesPercentage >= 0}
|
||||
<span class="text-[#00FC50]"
|
||||
>+{item?.changesPercentage >= 1000
|
||||
? abbreviateNumber(item?.changesPercentage)
|
||||
: item?.changesPercentage?.toFixed(2)}%</span
|
||||
>
|
||||
{:else if item?.changesPercentage < 0}
|
||||
<span class="text-[#FF2F1F]"
|
||||
>{item?.changesPercentage <= -1000
|
||||
? abbreviateNumber(item?.changesPercentage)
|
||||
: item?.changesPercentage?.toFixed(2)}%
|
||||
</span>
|
||||
{:else}
|
||||
-
|
||||
{/if}
|
||||
</td>
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b border-[#09090B] text-end"
|
||||
>
|
||||
{#if item?.changesPercentage >= 0}
|
||||
<span class="text-[#00FC50]"
|
||||
>+{item?.changesPercentage >= 1000
|
||||
? abbreviateNumber(item?.changesPercentage)
|
||||
: item?.changesPercentage?.toFixed(2)}%</span
|
||||
>
|
||||
{:else if item?.changesPercentage < 0}
|
||||
<span class="text-[#FF2F1F]"
|
||||
>{item?.changesPercentage <= -1000
|
||||
? abbreviateNumber(item?.changesPercentage)
|
||||
: item?.changesPercentage?.toFixed(2)}%
|
||||
</span>
|
||||
{:else}
|
||||
-
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white font-medium border-b-[#09090B] text-end text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{abbreviateNumber(item?.totalAssets)}
|
||||
</td>
|
||||
<td
|
||||
class="text-white font-medium border-b-[#09090B] text-end text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{abbreviateNumber(item?.totalAssets)}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white font-medium text-end border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.numberOfHoldings}
|
||||
</td>
|
||||
<td
|
||||
class="text-white font-medium text-end border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.numberOfHoldings}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white font-medium text-end border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.expenseRatio}%
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
<td
|
||||
class="text-white font-medium text-end border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.expenseRatio}%
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<UpgradeToPro {data} />
|
||||
</div>
|
||||
<UpgradeToPro {data} />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
|
||||
@ -157,7 +157,7 @@
|
||||
<tbody>
|
||||
{#each etfData as item}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
|
||||
@ -141,7 +141,7 @@
|
||||
{#each displayList as item, index}
|
||||
<tr
|
||||
on:click={() => goto(`/stocks/${item?.symbol}`)}
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary {index +
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd {index +
|
||||
1 ===
|
||||
displayList?.length && data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
|
||||
@ -104,7 +104,7 @@
|
||||
{#each displayList as item}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
{#each displayList as item}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
|
||||
@ -253,7 +253,7 @@
|
||||
<tbody>
|
||||
{#each stockList as item, index}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] border-b border-[#27272A] sm:hover:bg-opacity-[0.2] odd:bg-secondary {index +
|
||||
class="sm:hover:bg-[#245073] border-b border-[#27272A] sm:hover:bg-opacity-[0.2] odd:bg-odd {index +
|
||||
1 ===
|
||||
stockList?.length && data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
<tbody>
|
||||
{#each ipoList as item}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-start border-b-[#09090B] whitespace-nowrap"
|
||||
|
||||
@ -80,12 +80,12 @@
|
||||
|
||||
<section class="w-full overflow-hidden m-auto">
|
||||
{#if isLoaded}
|
||||
<div class="mt-3 mb-3">
|
||||
<Infobox text={`There have been ${totalIPOs} IPOs on the US stock market in ${year}.`} />
|
||||
</div>
|
||||
<div class="mt-3 mb-3">
|
||||
<Infobox
|
||||
text={`There have been ${totalIPOs} IPOs on the US stock market in ${year}.`}
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col justify-center items-center">
|
||||
|
||||
|
||||
<div class="mr-auto flex flex-col jusitfy-start items-start mb-5 mt-5">
|
||||
<div class="text-white text-sm sm:text-[1rem] font-medium mr-2">
|
||||
Select Time period
|
||||
@ -146,7 +146,7 @@
|
||||
<tbody>
|
||||
{#each ipoList as item}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap text-start border-b-[#09090B] whitespace-nowrap"
|
||||
|
||||
@ -174,7 +174,7 @@
|
||||
{#each displayList as item}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
class="text-white font-semibold sm:font-normal text-center text-sm sm:text-[1rem] border-b-[#09090B]"
|
||||
|
||||
@ -348,7 +348,7 @@
|
||||
<tbody class="p-0">
|
||||
{#each tableData as item}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#27272A] text-white"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#27272A] text-white"
|
||||
>
|
||||
<td class="hidden lg:table-cell"
|
||||
><button
|
||||
|
||||
@ -165,7 +165,7 @@
|
||||
<tbody>
|
||||
{#each displayList as item, index}
|
||||
<tr
|
||||
class="odd:bg-secondary border-b-[#09090B] {index +
|
||||
class="odd:bg-odd border-b-[#09090B] {index +
|
||||
1 ===
|
||||
rawData?.length && data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
|
||||
@ -468,7 +468,7 @@
|
||||
{#each priceAlertList as item}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
on:click={() => handleFilter(item?.id)}
|
||||
|
||||
@ -1569,7 +1569,7 @@
|
||||
ruleOfList =
|
||||
strategyList?.find((item) => item.id === selectedStrategy)?.rules ?? [];
|
||||
|
||||
ruleOfList.forEach((rule) => {
|
||||
ruleOfList.forEach((rule) => {
|
||||
ruleCondition[rule.name] =
|
||||
rule.condition || allRules[rule.name].defaultCondition;
|
||||
valueMappings[rule.name] = rule.value || allRules[rule.name].defaultValue;
|
||||
@ -1596,11 +1596,19 @@
|
||||
) // Only include specific rules
|
||||
?.map((rule) => [rule.name, new Set(rule.value)]), // Create Map from filtered rules
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function changeRule(state: string) {
|
||||
if (data?.user?.tier !== "Pro" && ['topAnalystRating','topAnalystCounter','topAnalystPriceTarget','topAnalystUpside','score']?.includes(state)) {
|
||||
if (
|
||||
data?.user?.tier !== "Pro" &&
|
||||
[
|
||||
"topAnalystRating",
|
||||
"topAnalystCounter",
|
||||
"topAnalystPriceTarget",
|
||||
"topAnalystUpside",
|
||||
"score",
|
||||
]?.includes(state)
|
||||
) {
|
||||
goto("/pricing");
|
||||
} else {
|
||||
selectedPopularStrategy = "";
|
||||
@ -1624,7 +1632,7 @@
|
||||
};
|
||||
|
||||
const loadWorker = async () => {
|
||||
if (['performance', 'analysts']?.includes(displayTableTab) || hoverStatus) {
|
||||
if (["performance", "analysts"]?.includes(displayTableTab) || hoverStatus) {
|
||||
syncWorker.postMessage({
|
||||
stockScreenerData,
|
||||
ruleOfList: [...ruleOfList, ...otherTabRules],
|
||||
@ -1638,7 +1646,7 @@
|
||||
};
|
||||
|
||||
const updateStockScreenerData = async () => {
|
||||
if (["performance","analysts"]?.includes(displayTableTab) || hoverStatus) {
|
||||
if (["performance", "analysts"]?.includes(displayTableTab) || hoverStatus) {
|
||||
downloadWorker.postMessage({
|
||||
ruleOfList: [...ruleOfList, ...otherTabRules],
|
||||
});
|
||||
@ -1823,7 +1831,7 @@ const handleKeyDown = (event) => {
|
||||
strategyList.find((item) => item.id === selectedStrategy).rules =
|
||||
ruleOfList;
|
||||
|
||||
const postData = {
|
||||
const postData = {
|
||||
strategyId: selectedStrategy,
|
||||
rules: ruleOfList,
|
||||
};
|
||||
@ -1848,7 +1856,7 @@ const handleKeyDown = (event) => {
|
||||
}
|
||||
|
||||
$: {
|
||||
if (ruleOfList ) {
|
||||
if (ruleOfList) {
|
||||
const ruleToUpdate = ruleOfList?.find((rule) => rule.name === ruleName);
|
||||
if (ruleToUpdate) {
|
||||
ruleToUpdate.value = valueMappings[ruleToUpdate.name];
|
||||
@ -2146,7 +2154,9 @@ const handleKeyDown = (event) => {
|
||||
? sectorList
|
||||
: ruleName === "industry"
|
||||
? industryList
|
||||
: ['analystRating','topAnalystRating','score']?.includes(ruleName)
|
||||
: ["analystRating", "topAnalystRating", "score"]?.includes(
|
||||
ruleName,
|
||||
)
|
||||
? ["Strong Buy", "Buy", "Hold", "Sell", "Strong Sell"]
|
||||
: ["Compliant", "Non-Compliant"];
|
||||
testList =
|
||||
@ -2300,8 +2310,9 @@ const handleKeyDown = (event) => {
|
||||
columns = [...(baseColumnsMap[displayTableTab] || [])];
|
||||
sortOrders = { ...(baseSortOrdersMap[displayTableTab] || {}) };
|
||||
|
||||
const rulesList =
|
||||
["performance","analysts"]?.includes(displayTableTab) ? tabRuleList : displayRules;
|
||||
const rulesList = ["performance", "analysts"]?.includes(displayTableTab)
|
||||
? tabRuleList
|
||||
: displayRules;
|
||||
rulesList?.forEach((rule) => {
|
||||
if (rule.rule !== "marketCap") {
|
||||
columns.push({
|
||||
@ -2351,7 +2362,7 @@ const handleKeyDown = (event) => {
|
||||
await updateStockScreenerData();
|
||||
}
|
||||
}
|
||||
/*
|
||||
/*
|
||||
async function handleMouseOver() {
|
||||
if (displayTableTab !== "performance") {
|
||||
hoverStatus = true;
|
||||
@ -2995,7 +3006,7 @@ const handleKeyDown = (event) => {
|
||||
autocomplete="off"
|
||||
class="{![
|
||||
'analystRating',
|
||||
"topAnalystRating",
|
||||
'topAnalystRating',
|
||||
'halalStocks',
|
||||
'score',
|
||||
'sector',
|
||||
@ -3011,7 +3022,7 @@ const handleKeyDown = (event) => {
|
||||
</div>
|
||||
{/if}
|
||||
<DropdownMenu.Group class="min-h-10 mt-2">
|
||||
{#if !["sma20", "sma50", "sma100", "sma200", "ema20", "ema50", "ema100", "ema200", "grahamNumber", "analystRating", "topAnalystRating","halalStocks", "score", "sector", "industry", "country"]?.includes(row?.rule)}
|
||||
{#if !["sma20", "sma50", "sma100", "sma200", "ema20", "ema50", "ema100", "ema200", "grahamNumber", "analystRating", "topAnalystRating", "halalStocks", "score", "sector", "industry", "country"]?.includes(row?.rule)}
|
||||
{#each row?.step as newValue, index}
|
||||
{#if ruleCondition[row?.rule] === "between"}
|
||||
{#if newValue && row?.step[index + 1]}
|
||||
@ -3080,7 +3091,7 @@ const handleKeyDown = (event) => {
|
||||
</DropdownMenu.Item>
|
||||
{/each}
|
||||
{:else}
|
||||
{#each testList.length > 0 && searchQuery?.length > 0 ? testList : searchQuery?.length > 0 && testList?.length === 0 ? [] : row?.rule === "country" ? listOfRelevantCountries : row?.rule === "sector" ? sectorList : row?.rule === "industry" ? industryList : ['analystRating','topAnalystRating','score']?.includes(ruleName) ? ["Strong Buy", "Buy", "Hold", "Sell", "Strong Sell"] : ["Compliant", "Non-Compliant"] as item}
|
||||
{#each testList.length > 0 && searchQuery?.length > 0 ? testList : searchQuery?.length > 0 && testList?.length === 0 ? [] : row?.rule === "country" ? listOfRelevantCountries : row?.rule === "sector" ? sectorList : row?.rule === "industry" ? industryList : ["analystRating", "topAnalystRating", "score"]?.includes(ruleName) ? ["Strong Buy", "Buy", "Hold", "Sell", "Strong Sell"] : ["Compliant", "Non-Compliant"] as item}
|
||||
<DropdownMenu.Item class="sm:hover:bg-primary">
|
||||
<div
|
||||
class="flex items-center"
|
||||
@ -3170,7 +3181,6 @@ const handleKeyDown = (event) => {
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
|
||||
on:click={() => changeTab("performance")}
|
||||
class="text-[1rem] sm:text-lg block text-white rounded-md px-2 py-1 focus:outline-none sm:hover:bg-primary {displayTableTab ===
|
||||
'performance'
|
||||
@ -3217,7 +3227,7 @@ const handleKeyDown = (event) => {
|
||||
<tbody>
|
||||
{#each displayResults as item}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-secondary"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-odd"
|
||||
>
|
||||
<td class="border-b-[#09090B] whitespace-nowrap">
|
||||
<a
|
||||
@ -3294,8 +3304,7 @@ const handleKeyDown = (event) => {
|
||||
<tbody>
|
||||
{#each displayResults as item (item?.symbol)}
|
||||
<tr
|
||||
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-secondary"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-odd"
|
||||
>
|
||||
<td class="border-b-[#09090B] whitespace-nowrap">
|
||||
<a
|
||||
@ -3345,8 +3354,7 @@ const handleKeyDown = (event) => {
|
||||
<tbody>
|
||||
{#each displayResults as item (item?.symbol)}
|
||||
<tr
|
||||
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-secondary"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-odd"
|
||||
>
|
||||
<td class="border-b-[#09090B] whitespace-nowrap">
|
||||
<a
|
||||
@ -3391,7 +3399,7 @@ const handleKeyDown = (event) => {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{:else if displayTableTab === "analysts"}
|
||||
{:else if displayTableTab === "analysts"}
|
||||
<div class="w-full rounded-md overflow-x-scroll">
|
||||
<table
|
||||
class="table table-sm table-compact w-full bg-[#09090B] border-bg-[#09090B]"
|
||||
@ -3402,8 +3410,7 @@ const handleKeyDown = (event) => {
|
||||
<tbody>
|
||||
{#each displayResults as item (item?.symbol)}
|
||||
<tr
|
||||
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-secondary"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-odd"
|
||||
>
|
||||
<td class="border-b-[#09090B] whitespace-nowrap">
|
||||
<a
|
||||
@ -3426,38 +3433,31 @@ const handleKeyDown = (event) => {
|
||||
>
|
||||
{#if row?.rule === "marketCap"}
|
||||
{abbreviateNumber(item[row?.rule])}
|
||||
|
||||
{:else if ['analystCounter','priceTarget']?.includes(row?.rule)}
|
||||
{:else if ["analystCounter", "priceTarget"]?.includes(row?.rule)}
|
||||
<span class="text-white"
|
||||
>{abbreviateNumber(
|
||||
item[row?.rule],
|
||||
)}</span
|
||||
>{abbreviateNumber(item[row?.rule])}</span
|
||||
>
|
||||
|
||||
{:else if row?.rule === 'upside'}
|
||||
{#if item[row?.rule] > 0}
|
||||
<span class="text-[#00FC50]"
|
||||
>+{item[row?.rule]?.toFixed(2)}%</span
|
||||
>
|
||||
{:else if item[row?.rule] < 0}
|
||||
<span class="text-[#FF2F1F]"
|
||||
>{item[row?.rule]?.toFixed(2)}%</span
|
||||
>
|
||||
{:else}
|
||||
<span class="text-[#fff]"
|
||||
>n/a</span
|
||||
>
|
||||
{/if}
|
||||
|
||||
{:else if ['analystRating','topAnalystRating']?.includes(row?.rule)}
|
||||
{:else if row?.rule === "upside"}
|
||||
{#if item[row?.rule] > 0}
|
||||
<span class="text-[#00FC50]"
|
||||
>+{item[row?.rule]?.toFixed(2)}%</span
|
||||
>
|
||||
{:else if item[row?.rule] < 0}
|
||||
<span class="text-[#FF2F1F]"
|
||||
>{item[row?.rule]?.toFixed(2)}%</span
|
||||
>
|
||||
{:else}
|
||||
<span class="text-[#fff]">n/a</span>
|
||||
{/if}
|
||||
{:else if ["analystRating", "topAnalystRating"]?.includes(row?.rule)}
|
||||
{#if ["Strong Buy", "Buy"].includes(item[row?.rule])}
|
||||
<span class="text-[#00FC50]">{item[row?.rule]}</span>
|
||||
{:else if ["Strong Sell", "Sell"].includes(item[row?.rule])}
|
||||
<span class="text-[#FF2F1F]">{item[row?.rule]}</span>
|
||||
{:else if item[row?.rule] === "Hold"}
|
||||
<span class="text-[#FFA838]">{item[row?.rule]}</span>
|
||||
{:else}
|
||||
-
|
||||
<span class="text-[#00FC50]">{item[row?.rule]}</span>
|
||||
{:else if ["Strong Sell", "Sell"].includes(item[row?.rule])}
|
||||
<span class="text-[#FF2F1F]">{item[row?.rule]}</span>
|
||||
{:else if item[row?.rule] === "Hold"}
|
||||
<span class="text-[#FFA838]">{item[row?.rule]}</span>
|
||||
{:else}
|
||||
-
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
@ -3629,7 +3629,7 @@ const handleKeyDown = (event) => {
|
||||
<div
|
||||
class="flex w-full items-center space-x-1.5 py-1.5 md:w-1/2 lg:w-1/3 lg:py-1"
|
||||
>
|
||||
{#if ['topAnalystRating','topAnalystCounter','topAnalystPriceTarget','topAnalystUpside','score']?.includes(row?.rule) && data?.user?.tier !== "Pro"}
|
||||
{#if ["topAnalystRating", "topAnalystCounter", "topAnalystPriceTarget", "topAnalystUpside", "score"]?.includes(row?.rule) && data?.user?.tier !== "Pro"}
|
||||
<label id={row?.rule} on:click={() => changeRule(row?.rule)}>
|
||||
<svg
|
||||
class="w-4 h-4 mb-1 inline-block text-[#A3A3A3] sm:hover:text-white cursor-pointer"
|
||||
|
||||
@ -1144,7 +1144,11 @@
|
||||
>
|
||||
<td
|
||||
class="whitespace-nowrap px-0.5 py-[1px] text-left text-sm font-semibold xs:px-1 sm:py-2 sm:text-right sm:text-[1rem]"
|
||||
>{abbreviateNumber(data?.getStockQuote?.marketCap)}</td
|
||||
>{@html abbreviateNumber(
|
||||
data?.getStockQuote?.marketCap,
|
||||
false,
|
||||
true,
|
||||
)}</td
|
||||
></tr
|
||||
>
|
||||
<tr
|
||||
@ -1155,9 +1159,9 @@
|
||||
>
|
||||
<td
|
||||
class="whitespace-nowrap px-0.5 py-[1px] text-left text-sm font-semibold xs:px-1 sm:py-2 sm:text-right sm:text-[1rem]"
|
||||
>{stockDeck?.revenueTTM !== null &&
|
||||
>{@html stockDeck?.revenueTTM !== null &&
|
||||
stockDeck?.revenueTTM !== 0
|
||||
? abbreviateNumber(stockDeck?.revenueTTM)
|
||||
? abbreviateNumber(stockDeck?.revenueTTM, false, true)
|
||||
: "n/a"}</td
|
||||
></tr
|
||||
>
|
||||
@ -1169,8 +1173,8 @@
|
||||
>
|
||||
<td
|
||||
class="whitespace-nowrap px-0.5 py-[1px] text-left text-sm font-semibold xs:px-1 sm:py-2 sm:text-right sm:text-[1rem]"
|
||||
>{stockDeck?.netIncomeTTM !== null
|
||||
? abbreviateNumber(stockDeck?.netIncomeTTM)
|
||||
>{@html stockDeck?.netIncomeTTM !== null
|
||||
? abbreviateNumber(stockDeck?.netIncomeTTM, false, true)
|
||||
: "n/a"}</td
|
||||
></tr
|
||||
>
|
||||
@ -1216,9 +1220,11 @@
|
||||
</td>
|
||||
<td
|
||||
class="whitespace-nowrap px-0.5 py-[1px] text-left text-sm font-semibold xs:px-1 sm:py-2 sm:text-right sm:text-[1rem]"
|
||||
>{data?.getStockQuote?.sharesOutstanding !== null
|
||||
>{@html data?.getStockQuote?.sharesOutstanding !== null
|
||||
? abbreviateNumber(
|
||||
data?.getStockQuote?.sharesOutstanding,
|
||||
false,
|
||||
true,
|
||||
)
|
||||
: "n/a"}</td
|
||||
></tr
|
||||
@ -1335,8 +1341,8 @@
|
||||
</td>
|
||||
<td
|
||||
class="whitespace-nowrap px-0.5 py-[1px] text-left text-sm font-semibold xs:px-1 sm:py-2 sm:text-right sm:text-[1rem]"
|
||||
>{stockDeck?.floatShares !== null
|
||||
? abbreviateNumber(stockDeck?.floatShares)
|
||||
>{@html stockDeck?.floatShares !== null
|
||||
? abbreviateNumber(stockDeck?.floatShares, false, true)
|
||||
: "n/a"}</td
|
||||
></tr
|
||||
>
|
||||
|
||||
@ -42,33 +42,33 @@
|
||||
|
||||
{#if similarStocks?.length > 0}
|
||||
<div
|
||||
class="w-full p-2 text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
|
||||
class="w-full p-2 text-white border border-gray-600 bg-primary rounded-md h-fit pb-4 mt-4 cursor-pointer"
|
||||
>
|
||||
<h3 class="p-2 pt-4 text-xl font-semibold">Related Stocks</h3>
|
||||
<table class="table table-sm table-compact w-full text-white">
|
||||
<thead class="text-white"
|
||||
><tr
|
||||
><th
|
||||
class="whitespace-nowrap border-b font-semibold text-sm text-left"
|
||||
class="whitespace-nowrap border-b font-semibold text-[1rem] text-left"
|
||||
>Company</th
|
||||
>
|
||||
<th
|
||||
class="whitespace-nowrap border-b font-semibold text-sm text-right"
|
||||
class="whitespace-nowrap border-b font-semibold text-[1rem] text-right"
|
||||
>Dividend Yield</th
|
||||
></tr
|
||||
></thead
|
||||
>
|
||||
<tbody>
|
||||
{#each similarStocks?.slice(0, 8) as item}
|
||||
<tr class="border-gray-600 border-b"
|
||||
><td class="text-left"
|
||||
<tr class="border-gray-600 border-b text-[1rem]"
|
||||
><td class="text-left text-[1rem]"
|
||||
><a
|
||||
href={`/stocks/${item?.symbol}`}
|
||||
class="sm:hover:text-white text-blue-400"
|
||||
>{item?.symbol}</a
|
||||
></td
|
||||
>
|
||||
<td class="text-right cursor-normal"
|
||||
<td class="text-right cursor-normal text-[1rem]"
|
||||
>{item?.dividendYield !== null &&
|
||||
item?.dividendYield !== undefined
|
||||
? item?.dividendYield + "%"
|
||||
|
||||
@ -120,56 +120,62 @@
|
||||
isLoaded = true;
|
||||
});
|
||||
|
||||
function generateDividendInfoHTML() {
|
||||
const history = rawData?.history || [];
|
||||
function generateDividendInfoHTML() {
|
||||
const history = rawData?.history || [];
|
||||
|
||||
if (history.length !== 0) {
|
||||
if (!dateDistance) {
|
||||
const formattedExDividendDate = new Date(exDividendDate).toLocaleString('en-US', {
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
year: 'numeric'
|
||||
});
|
||||
if (history.length !== 0) {
|
||||
if (!dateDistance) {
|
||||
const formattedExDividendDate = new Date(exDividendDate).toLocaleString(
|
||||
"en-US",
|
||||
{
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
},
|
||||
);
|
||||
|
||||
const payoutFrequencyText =
|
||||
payoutFrequency === 4
|
||||
? '3 months'
|
||||
: payoutFrequency === 2
|
||||
? '6 months'
|
||||
: payoutFrequency === 1
|
||||
? '12 months'
|
||||
: 'n/a';
|
||||
const payoutFrequencyText =
|
||||
payoutFrequency === 4
|
||||
? "3 months"
|
||||
: payoutFrequency === 2
|
||||
? "6 months"
|
||||
: payoutFrequency === 1
|
||||
? "12 months"
|
||||
: "n/a";
|
||||
|
||||
return `
|
||||
return `
|
||||
<span>
|
||||
${$displayCompanyName} has an annual dividend of $${annualDividend} per share, with a forward yield of ${dividendYield}%.
|
||||
The dividend is paid every ${payoutFrequencyText} and the last ex-dividend date was ${formattedExDividendDate}.
|
||||
</span>
|
||||
`;
|
||||
} else {
|
||||
const latestDividendDate = new Date(history.at(0)?.date).toLocaleString('en-US', {
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
year: 'numeric'
|
||||
});
|
||||
} else {
|
||||
const latestDividendDate = new Date(history.at(0)?.date).toLocaleString(
|
||||
"en-US",
|
||||
{
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
},
|
||||
);
|
||||
|
||||
return `
|
||||
return `
|
||||
<span>
|
||||
${$displayCompanyName} issued its most recent dividend on ${latestDividendDate}.
|
||||
Since then, the company has not distributed any further dividends for over 12 months.
|
||||
</span>
|
||||
`;
|
||||
}
|
||||
} else {
|
||||
return `
|
||||
}
|
||||
} else {
|
||||
return `
|
||||
<span>
|
||||
No dividend history available for ${$displayCompanyName}.
|
||||
</span>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const htmlOutput = generateDividendInfoHTML();
|
||||
const htmlOutput = generateDividendInfoHTML();
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@ -221,7 +227,7 @@ const htmlOutput = generateDividendInfoHTML();
|
||||
Dividends
|
||||
</h1>
|
||||
|
||||
<Infobox text={htmlOutput} />
|
||||
<Infobox text={htmlOutput} />
|
||||
</div>
|
||||
|
||||
{#if rawData?.history?.length !== 0}
|
||||
@ -334,40 +340,42 @@ const htmlOutput = generateDividendInfoHTML();
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="overflow-x-scroll no-scrollbar flex justify-start items-center w-full m-auto shadow-md rounded-none sm:rounded-md mb-4"
|
||||
class="overflow-x-scroll no-scrollbar flex justify-start items-center w-full m-auto rounded-none sm:rounded-md mb-4"
|
||||
>
|
||||
<table
|
||||
class="table table-sm table-compact flex justify-start items-center w-full m-auto"
|
||||
>
|
||||
<thead>
|
||||
<tr class="bg-[#09090B] border-b-slate-600 shadow-md">
|
||||
<tr class="bg-[#09090B] border-b border-gray-800">
|
||||
<th
|
||||
class="text-start bg-[#09090B] border-b border-[#09090B] text-white text-sm font-semibold"
|
||||
class="text-start bg-[#09090B] text-white text-sm font-semibold"
|
||||
>
|
||||
Ex-Divid. Date
|
||||
</th>
|
||||
<th
|
||||
class="text-end bg-[#09090B] border-b border-[#09090B] text-white text-sm font-semibold"
|
||||
class="text-end bg-[#09090B] text-white text-sm font-semibold"
|
||||
>
|
||||
Cash Amount
|
||||
</th>
|
||||
<th
|
||||
class="text-end bg-[#09090B] border-b border-[#09090B] text-white text-sm font-semibold"
|
||||
class="text-end bg-[#09090B] text-white text-sm font-semibold"
|
||||
>
|
||||
Record Date
|
||||
</th>
|
||||
<th
|
||||
class="text-end bg-[#09090B] border-b border-[#09090B] text-white text-sm font-semibold"
|
||||
class="text-end bg-[#09090B] text-white text-sm font-semibold"
|
||||
>
|
||||
Pay Date
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="shadow-md">
|
||||
<tbody class="">
|
||||
{#each rawData?.history as item}
|
||||
<tr class="text-gray-200 odd:bg-secondary">
|
||||
<tr
|
||||
class="text-white odd:bg-odd border-b border-gray-800"
|
||||
>
|
||||
<td
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap text-white font-medium border-b border-[#09090B]"
|
||||
class="text-start text-sm sm:text-[1rem] whitespace-nowrap text-white font-medium"
|
||||
>
|
||||
{new Date(item?.date)?.toLocaleString("en-US", {
|
||||
month: "short",
|
||||
@ -377,12 +385,12 @@ const htmlOutput = generateDividendInfoHTML();
|
||||
})}
|
||||
</td>
|
||||
<td
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white border-b border-[#09090B]"
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white"
|
||||
>
|
||||
{item?.adjDividend?.toFixed(3)}
|
||||
</td>
|
||||
<td
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white border-b border-[#09090B]"
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white"
|
||||
>
|
||||
{item?.recordDate?.length !== 0
|
||||
? new Date(item?.recordDate)?.toLocaleString(
|
||||
@ -397,7 +405,7 @@ const htmlOutput = generateDividendInfoHTML();
|
||||
: "n/a"}
|
||||
</td>
|
||||
<td
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white border-b border-[#09090B]"
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white"
|
||||
>
|
||||
{item?.paymentDate?.length !== 0
|
||||
? new Date(item?.paymentDate)?.toLocaleString(
|
||||
|
||||
@ -391,34 +391,33 @@
|
||||
}
|
||||
|
||||
function generateStatementInfoHTML() {
|
||||
if ($coolMode) {
|
||||
const statementText = statementConfig?.find(
|
||||
(item) => item?.propertyName === displayStatement
|
||||
)?.text;
|
||||
if ($coolMode) {
|
||||
const statementText = statementConfig?.find(
|
||||
(item) => item?.propertyName === displayStatement,
|
||||
)?.text;
|
||||
|
||||
return `<span>${statementText || ''}</span>`;
|
||||
} else if (income?.length > 0) {
|
||||
return `
|
||||
return `<span>${statementText || ""}</span>`;
|
||||
} else if (income?.length > 0) {
|
||||
return `
|
||||
<span>
|
||||
Get detailed income statement breakdowns, uncovering revenue, expenses, and much more.
|
||||
</span>
|
||||
`;
|
||||
} else {
|
||||
return `
|
||||
} else {
|
||||
return `
|
||||
<span>
|
||||
No financial data available for ${$displayCompanyName}.
|
||||
</span>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let htmlOutput = null;
|
||||
$: {
|
||||
if($coolMode || displayStatement) {
|
||||
htmlOutput = generateStatementInfoHTML()
|
||||
|
||||
let htmlOutput = null;
|
||||
$: {
|
||||
if ($coolMode || displayStatement) {
|
||||
htmlOutput = generateStatementInfoHTML();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@ -559,9 +558,7 @@ $: {
|
||||
{/if}
|
||||
</label>
|
||||
|
||||
<div
|
||||
class="flex flex-row items-center w-fit sm:ml-auto"
|
||||
>
|
||||
<div class="flex flex-row items-center w-fit sm:ml-auto">
|
||||
<div class="relative inline-block text-left grow">
|
||||
<DropdownMenu.Root>
|
||||
<DropdownMenu.Trigger asChild let:builder>
|
||||
@ -690,10 +687,10 @@ $: {
|
||||
|
||||
<div class="w-full overflow-x-scroll">
|
||||
<table
|
||||
class="table table-sm table-compact rounded-none sm:rounded-md w-full border-bg-[#09090B] m-auto mt-4"
|
||||
class="table table-sm table-compact rounded-md w-full m-auto mt-4"
|
||||
>
|
||||
<thead>
|
||||
<tr class="border border-gray-600">
|
||||
<tr class="border-b border-gray-800">
|
||||
<th
|
||||
class="text-white font-semibold text-start text-sm sm:text-[1rem]"
|
||||
>{filterRule === "annual"
|
||||
@ -719,38 +716,40 @@ $: {
|
||||
<tbody>
|
||||
{#each tableList as item, index}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] shake-ticker cursor-pointer"
|
||||
>
|
||||
<tr class="odd:bg-odd border-b border-gray-800">
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.date}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap"
|
||||
>
|
||||
{abbreviateNumber(item?.value)}
|
||||
{@html abbreviateNumber(item?.value, false, true)}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end"
|
||||
>
|
||||
{item?.value - tableList[index + 1]?.value !== 0
|
||||
{@html item?.value -
|
||||
tableList[index + 1]?.value !==
|
||||
0
|
||||
? abbreviateNumber(
|
||||
(
|
||||
item?.value - tableList[index + 1]?.value
|
||||
)?.toFixed(2),
|
||||
false,
|
||||
true,
|
||||
)
|
||||
: "-"}
|
||||
: "n/a"}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end"
|
||||
>
|
||||
{#if index + 1 - tableList?.length === 0}
|
||||
-
|
||||
n/a
|
||||
{:else if item?.value === 0 && tableList[index + 1]?.value < 0}
|
||||
<span class="text-[#FF2F1F]">-100.00%</span>
|
||||
{:else if item?.value === 0 && tableList[index + 1]?.value > 0}
|
||||
@ -775,7 +774,7 @@ $: {
|
||||
)?.toFixed(2)}%
|
||||
</span>
|
||||
{:else}
|
||||
-
|
||||
n/a
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -446,35 +446,33 @@
|
||||
}
|
||||
|
||||
function generateStatementInfoHTML() {
|
||||
if ($coolMode) {
|
||||
const statementText = statementConfig?.find(
|
||||
(item) => item?.propertyName === displayStatement
|
||||
)?.text;
|
||||
if ($coolMode) {
|
||||
const statementText = statementConfig?.find(
|
||||
(item) => item?.propertyName === displayStatement,
|
||||
)?.text;
|
||||
|
||||
return `<span>${statementText || ''}</span>`;
|
||||
} else if (balanceSheet?.length > 0) {
|
||||
return `
|
||||
return `<span>${statementText || ""}</span>`;
|
||||
} else if (balanceSheet?.length > 0) {
|
||||
return `
|
||||
<span>
|
||||
Get detailed breakdowns of the balance-sheet with total debts, total investments, and much more.
|
||||
</span>
|
||||
`;
|
||||
} else {
|
||||
return `
|
||||
} else {
|
||||
return `
|
||||
<span>
|
||||
No financial data available for ${$displayCompanyName}.
|
||||
</span>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let htmlOutput = null;
|
||||
$: {
|
||||
if($coolMode || displayStatement) {
|
||||
htmlOutput = generateStatementInfoHTML()
|
||||
|
||||
let htmlOutput = null;
|
||||
$: {
|
||||
if ($coolMode || displayStatement) {
|
||||
htmlOutput = generateStatementInfoHTML();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@ -619,9 +617,7 @@ $: {
|
||||
{/if}
|
||||
</label>
|
||||
|
||||
<div
|
||||
class="flex flex-row items-center w-fit sm:ml-auto"
|
||||
>
|
||||
<div class="flex flex-row items-center w-fit sm:ml-auto">
|
||||
<div class="relative inline-block text-left grow">
|
||||
<DropdownMenu.Root>
|
||||
<DropdownMenu.Trigger asChild let:builder>
|
||||
@ -779,24 +775,28 @@ $: {
|
||||
|
||||
<div class="w-full overflow-x-scroll">
|
||||
<table
|
||||
class="table table-sm table-compact rounded-none sm:rounded-md w-full border-bg-[#09090B] m-auto mt-4"
|
||||
class="table table-sm table-compact rounded-md w-full m-auto mt-4"
|
||||
>
|
||||
<thead>
|
||||
<tr class="border border-gray-600">
|
||||
<th class="text-white font-semibold text-start text-sm"
|
||||
<tr class="border-b border-gray-800">
|
||||
<th
|
||||
class="text-white font-semibold text-start text-sm sm:text-[1rem]"
|
||||
>{filterRule === "annual"
|
||||
? "Fiscal Year End"
|
||||
: "Quarter Ends"}</th
|
||||
>
|
||||
<th class="text-white font-semibold text-end text-sm"
|
||||
<th
|
||||
class="text-white font-semibold text-end text-sm sm:text-[1rem]"
|
||||
>{statementConfig?.find(
|
||||
(item) => item?.propertyName === displayStatement,
|
||||
)?.label}</th
|
||||
>
|
||||
<th class="text-white font-semibold text-end text-sm"
|
||||
<th
|
||||
class="text-white font-semibold text-end text-sm sm:text-[1rem]"
|
||||
>Change</th
|
||||
>
|
||||
<th class="text-white font-semibold text-end text-sm"
|
||||
<th
|
||||
class="text-white font-semibold text-end text-sm sm:text-[1rem]"
|
||||
>Growth</th
|
||||
>
|
||||
</tr>
|
||||
@ -804,38 +804,39 @@ $: {
|
||||
<tbody>
|
||||
{#each tableList as item, index}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] shake-ticker cursor-pointer"
|
||||
>
|
||||
<tr class="odd:bg-odd border-b border-gray-800">
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.date}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap"
|
||||
>
|
||||
{abbreviateNumber(item?.value)}
|
||||
{@html abbreviateNumber(item?.value, false, true)}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end"
|
||||
>
|
||||
{item?.value - tableList[index + 1]?.value !== 0
|
||||
{@html item?.value - tableList[index + 1]?.value !==
|
||||
0
|
||||
? abbreviateNumber(
|
||||
(
|
||||
item?.value - tableList[index + 1]?.value
|
||||
)?.toFixed(2),
|
||||
false,
|
||||
true,
|
||||
)
|
||||
: "-"}
|
||||
: "n/a"}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end"
|
||||
>
|
||||
{#if index + 1 - tableList?.length === 0}
|
||||
-
|
||||
n/a
|
||||
{:else if item?.value === 0 && tableList[index + 1]?.value < 0}
|
||||
<span class="text-[#FF2F1F]">-100.00%</span>
|
||||
{:else if item?.value === 0 && tableList[index + 1]?.value > 0}
|
||||
@ -859,7 +860,7 @@ $: {
|
||||
)?.toFixed(2)}%
|
||||
</span>
|
||||
{:else}
|
||||
-
|
||||
n/a
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -391,36 +391,34 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function generateStatementInfoHTML() {
|
||||
if ($coolMode) {
|
||||
const statementText = statementConfig?.find(
|
||||
(item) => item?.propertyName === displayStatement
|
||||
)?.text;
|
||||
if ($coolMode) {
|
||||
const statementText = statementConfig?.find(
|
||||
(item) => item?.propertyName === displayStatement,
|
||||
)?.text;
|
||||
|
||||
return `<span>${statementText || ''}</span>`;
|
||||
} else if (cashFlow?.length > 0) {
|
||||
return `
|
||||
return `<span>${statementText || ""}</span>`;
|
||||
} else if (cashFlow?.length > 0) {
|
||||
return `
|
||||
<span>
|
||||
Get detailed ratio statement breakdowns, uncovering price to free cash flow ratio, price per earnings, and much more.
|
||||
</span>
|
||||
`;
|
||||
} else {
|
||||
return `
|
||||
} else {
|
||||
return `
|
||||
<span>
|
||||
No financial data available for ${$displayCompanyName}.
|
||||
</span>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let htmlOutput = null;
|
||||
$: {
|
||||
if($coolMode || displayStatement) {
|
||||
htmlOutput = generateStatementInfoHTML()
|
||||
|
||||
let htmlOutput = null;
|
||||
$: {
|
||||
if ($coolMode || displayStatement) {
|
||||
htmlOutput = generateStatementInfoHTML();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@ -482,7 +480,7 @@ $: {
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 gap-2 w-full">
|
||||
<Infobox text={htmlOutput} />
|
||||
<Infobox text={htmlOutput} />
|
||||
{#if cashFlow?.length > 0}
|
||||
<div
|
||||
class="inline-flex justify-center w-full rounded-md sm:w-auto sm:ml-auto mt-3 mb-6"
|
||||
@ -563,9 +561,7 @@ $: {
|
||||
{/if}
|
||||
</label>
|
||||
|
||||
<div
|
||||
class="flex flex-row items-center w-fit sm:ml-auto"
|
||||
>
|
||||
<div class="flex flex-row items-center w-fit sm:ml-auto">
|
||||
<div class="relative inline-block text-left grow">
|
||||
<DropdownMenu.Root>
|
||||
<DropdownMenu.Trigger asChild let:builder>
|
||||
@ -708,10 +704,10 @@ $: {
|
||||
|
||||
<div class="w-full overflow-x-scroll">
|
||||
<table
|
||||
class="table table-sm table-compact rounded-none sm:rounded-md w-full border-bg-[#09090B] m-auto mt-4"
|
||||
class="table table-sm table-compact rounded-md w-full m-auto mt-4"
|
||||
>
|
||||
<thead>
|
||||
<tr class="border border-gray-600">
|
||||
<tr class="border-b border-gray-800">
|
||||
<th
|
||||
class="text-white font-semibold text-start text-sm sm:text-[1rem]"
|
||||
>{filterRule === "annual"
|
||||
@ -737,38 +733,39 @@ $: {
|
||||
<tbody>
|
||||
{#each tableList as item, index}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] shake-ticker cursor-pointer"
|
||||
>
|
||||
<tr class="odd:bg-odd border-b border-gray-800">
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.date}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap"
|
||||
>
|
||||
{abbreviateNumber(item?.value)}
|
||||
{@html abbreviateNumber(item?.value, false, true)}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end"
|
||||
>
|
||||
{item?.value - tableList[index + 1]?.value !== 0
|
||||
{@html item?.value - tableList[index + 1]?.value !==
|
||||
0
|
||||
? abbreviateNumber(
|
||||
(
|
||||
item?.value - tableList[index + 1]?.value
|
||||
)?.toFixed(2),
|
||||
false,
|
||||
true,
|
||||
)
|
||||
: "-"}
|
||||
: "n/a"}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end"
|
||||
>
|
||||
{#if index + 1 - tableList?.length === 0}
|
||||
-
|
||||
n/a
|
||||
{:else if item?.value === 0 && tableList[index + 1]?.value < 0}
|
||||
<span class="text-[#FF2F1F]">-100.00%</span>
|
||||
{:else if item?.value === 0 && tableList[index + 1]?.value > 0}
|
||||
@ -792,7 +789,7 @@ $: {
|
||||
)?.toFixed(2)}%
|
||||
</span>
|
||||
{:else}
|
||||
-
|
||||
n/a
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
import { GridComponent, TooltipComponent } from "echarts/components";
|
||||
import { CanvasRenderer } from "echarts/renderers";
|
||||
import Infobox from "$lib/components/Infobox.svelte";
|
||||
import FinancialTable from "$lib/components/FinancialTable.svelte";
|
||||
|
||||
use([LineChart, BarChart, GridComponent, TooltipComponent, CanvasRenderer]);
|
||||
|
||||
@ -134,6 +135,11 @@
|
||||
},
|
||||
];
|
||||
|
||||
const fields = statementConfig.map((item) => ({
|
||||
label: item.label,
|
||||
key: item.propertyName,
|
||||
}));
|
||||
|
||||
function toggleMode() {
|
||||
$coolMode = !$coolMode;
|
||||
}
|
||||
@ -349,36 +355,34 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function generateStatementInfoHTML() {
|
||||
if ($coolMode) {
|
||||
const statementText = statementConfig?.find(
|
||||
(item) => item?.propertyName === displayStatement
|
||||
)?.text;
|
||||
if ($coolMode) {
|
||||
const statementText = statementConfig?.find(
|
||||
(item) => item?.propertyName === displayStatement,
|
||||
)?.text;
|
||||
|
||||
return `<span>${statementText || ''}</span>`;
|
||||
} else if (ratios?.length > 0) {
|
||||
return `
|
||||
return `<span>${statementText || ""}</span>`;
|
||||
} else if (ratios?.length > 0) {
|
||||
return `
|
||||
<span>
|
||||
Discover comprehensive ratio statement breakdowns that reveal insights into revenue, expenses, and beyond.
|
||||
</span>
|
||||
`;
|
||||
} else {
|
||||
return `
|
||||
} else {
|
||||
return `
|
||||
<span>
|
||||
No financial data available for ${$displayCompanyName}.
|
||||
</span>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let htmlOutput = null;
|
||||
$: {
|
||||
if($coolMode || displayStatement) {
|
||||
htmlOutput = generateStatementInfoHTML()
|
||||
|
||||
let htmlOutput = null;
|
||||
$: {
|
||||
if ($coolMode || displayStatement) {
|
||||
htmlOutput = generateStatementInfoHTML();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@ -441,7 +445,7 @@ $: {
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 gap-2">
|
||||
<Infobox text={htmlOutput} />
|
||||
<Infobox text={htmlOutput} />
|
||||
{#if ratios?.length > 0}
|
||||
<div
|
||||
class="inline-flex justify-center w-full rounded-md sm:w-auto sm:ml-auto mt-3 mb-6"
|
||||
@ -522,9 +526,7 @@ $: {
|
||||
{/if}
|
||||
</label>
|
||||
|
||||
<div
|
||||
class="flex flex-row items-center w-fit sm:ml-auto"
|
||||
>
|
||||
<div class="flex flex-row items-center w-fit sm:ml-auto">
|
||||
<div class="relative inline-block text-left grow">
|
||||
<DropdownMenu.Root>
|
||||
<DropdownMenu.Trigger asChild let:builder>
|
||||
@ -653,10 +655,10 @@ $: {
|
||||
|
||||
<div class="w-full overflow-x-scroll">
|
||||
<table
|
||||
class="table table-sm table-compact rounded-none sm:rounded-md w-full border-bg-[#09090B] m-auto mt-4"
|
||||
class="table table-sm table-compact rounded-md w-full m-auto mt-4"
|
||||
>
|
||||
<thead>
|
||||
<tr class="border border-gray-600">
|
||||
<tr class="border-b border-gray-800">
|
||||
<th
|
||||
class="text-white font-semibold text-start text-sm sm:text-[1rem]"
|
||||
>{filterRule === "annual"
|
||||
@ -682,38 +684,39 @@ $: {
|
||||
<tbody>
|
||||
{#each tableList as item, index}
|
||||
<!-- row -->
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] shake-ticker cursor-pointer"
|
||||
>
|
||||
<tr class="odd:bg-odd border-b border-gray-800">
|
||||
<td
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>
|
||||
{item?.date}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap"
|
||||
>
|
||||
{abbreviateNumber(item?.value)}
|
||||
{@html abbreviateNumber(item?.value, false, true)}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end"
|
||||
>
|
||||
{item?.value - tableList[index + 1]?.value !== 0
|
||||
{@html item?.value - tableList[index + 1]?.value !==
|
||||
0
|
||||
? abbreviateNumber(
|
||||
(
|
||||
item?.value - tableList[index + 1]?.value
|
||||
)?.toFixed(2),
|
||||
false,
|
||||
true,
|
||||
)
|
||||
: "-"}
|
||||
: "n/a"}
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end"
|
||||
>
|
||||
{#if index + 1 - tableList?.length === 0}
|
||||
-
|
||||
n/a
|
||||
{:else if item?.value === 0 && tableList[index + 1]?.value < 0}
|
||||
<span class="text-[#FF2F1F]">-100.00%</span>
|
||||
{:else if item?.value === 0 && tableList[index + 1]?.value > 0}
|
||||
@ -737,7 +740,7 @@ $: {
|
||||
)?.toFixed(2)}%
|
||||
</span>
|
||||
{:else}
|
||||
-
|
||||
n/a
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
@ -775,246 +778,7 @@ $: {
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- row -->
|
||||
<tr class="text-white odd:bg-secondary whitespace-nowrap">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>PE Ratio</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? (item?.priceEarningsRatio / 4)?.toFixed(2)
|
||||
: item?.priceEarningsRatio?.toFixed(2)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>PS Ratio</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? (item?.priceToSalesRatio / 4)?.toFixed(2)
|
||||
: item?.priceToSalesRatio?.toFixed(2)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<!-- row -->
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>PB Ratio</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? (item?.priceToBookRatio / 4)?.toFixed(2)
|
||||
: item?.priceToBookRatio?.toFixed(2)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary whitespace-nowrap">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>P/FCF Ratio</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? (item?.priceToFreeCashFlowsRatio / 4)?.toFixed(
|
||||
2,
|
||||
)
|
||||
: item?.priceToFreeCashFlowsRatio?.toFixed(2)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>P/OCF Ratio</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? (
|
||||
item?.priceToOperatingCashFlowsRatio / 4
|
||||
)?.toFixed(2)
|
||||
: item?.priceToOperatingCashFlowsRatio?.toFixed(
|
||||
2,
|
||||
)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>OCF/S Ratio</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? (
|
||||
item?.operatingCashFlowSalesRatio / 4
|
||||
)?.toFixed(2)
|
||||
: item?.operatingCashFlowSalesRatio?.toFixed(2)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start whitespace-nowrap border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Debt / Equity Ratio</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? (item?.debtEquityRatio / 4)?.toFixed(2)
|
||||
: item?.debtEquityRatio?.toFixed(2)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<!-- row -->
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Quick Ratio</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? (item?.quickRatio / 4)?.toFixed(2)
|
||||
: item?.quickRatio?.toFixed(2)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<!-- row -->
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Current Ratio</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? (item?.currentRatio / 4)?.toFixed(2)
|
||||
: item?.currentRatio?.toFixed(2)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem] whitespace-nowrap"
|
||||
>Asset Turnover</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{item?.assetTurnover?.toFixed(2)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Interest Coverage</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? (item?.interestCoverage / 4)?.toFixed(2)
|
||||
: item?.interestCoverage?.toFixed(2)}
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<!-- row -->
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Return on Equity (ROE)</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{(item?.returnOnEquity * 100)?.toFixed(2)}%
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start whitespace-nowrap border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Return on Assets (ROA)</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end"
|
||||
>{(item?.returnOnAssets * 100)?.toFixed(2)}%</td
|
||||
>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Return on Capital (ROIC)</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{(item?.returnOnCapitalEmployed * 100)?.toFixed(
|
||||
2,
|
||||
)}%</td
|
||||
>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Dividend Yield</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{(item?.dividendYield * 100)?.toFixed(2)}%</td
|
||||
>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Payout Ratio</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? ((item?.payoutRatio / 4) * 100)?.toFixed(2)
|
||||
: (item?.payoutRatio * 100)?.toFixed(2)}%
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Gross Profit Margin</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? ((item?.grossProfitMargin / 4) * 100)?.toFixed(
|
||||
2,
|
||||
)
|
||||
: (item?.grossProfitMargin * 100)?.toFixed(2)}%
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<tr class="text-white odd:bg-secondary">
|
||||
<td
|
||||
class="text-start border-r border-gray-700 text-sm sm:text-[1rem]"
|
||||
>Net Profit Margin</td
|
||||
>
|
||||
{#each ratios as item}
|
||||
<td class="text-sm sm:text-[1rem] text-end">
|
||||
{filterRule === "annual"
|
||||
? ((item?.netProfitMargin / 4) * 100)?.toFixed(2)
|
||||
: (item?.netProfitMargin * 100)?.toFixed(2)}%
|
||||
</td>
|
||||
{/each}
|
||||
</tr>
|
||||
<FinancialTable data={ratios} {fields} />
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
})
|
||||
?.slice(0, 30); //Consider only the last 30 ratings in the last 12 months
|
||||
|
||||
const filteredAnalystCount = recentData?.length ?? 'n/a';
|
||||
const filteredAnalystCount = recentData?.length ?? "n/a";
|
||||
const priceTargets = recentData
|
||||
?.map((item) => parseFloat(item.adjusted_pt_current))
|
||||
?.filter((pt) => !isNaN(pt));
|
||||
@ -106,7 +106,7 @@
|
||||
]
|
||||
: "n/a";
|
||||
|
||||
numOfAnalyst = filteredAnalystCount === 0 ? 'n/a' : filteredAnalystCount;
|
||||
numOfAnalyst = filteredAnalystCount === 0 ? "n/a" : filteredAnalystCount;
|
||||
priceTarget = medianPriceTarget;
|
||||
changesPercentage =
|
||||
medianPriceTarget !== "-" && data?.getStockQuote?.price != null
|
||||
@ -141,8 +141,9 @@
|
||||
? "Hold"
|
||||
: averageRatingScore >= 1.5
|
||||
? "Sell"
|
||||
: averageRatingScore >= 1
|
||||
? "Strong Sell" : 'n/a';
|
||||
: averageRatingScore >= 1
|
||||
? "Strong Sell"
|
||||
: "n/a";
|
||||
|
||||
rawData = recentData;
|
||||
historyList = rawData.slice(0, 50);
|
||||
@ -423,7 +424,7 @@
|
||||
<tr
|
||||
class="{latestInfoDate(item?.date)
|
||||
? 'bg-[#F9AB00] bg-opacity-[0.1]'
|
||||
: 'odd:bg-secondary'} border-b-[#09090B] {index + 1 ===
|
||||
: 'odd:bg-odd'} border-b-[#09090B] {index + 1 ===
|
||||
historyList?.slice(0, 3)?.length &&
|
||||
data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
|
||||
@ -118,22 +118,10 @@
|
||||
});
|
||||
|
||||
const transactionStyles = {
|
||||
Bought: {
|
||||
text: "Bought",
|
||||
class: "text-[#00FC50]",
|
||||
border: "border-[#00FC50]",
|
||||
},
|
||||
Grant: {
|
||||
text: "Grant",
|
||||
class: "text-[#F8901E]",
|
||||
border: "border-[#F8901E]",
|
||||
},
|
||||
Sold: { text: "Sold", class: "text-[#FF2F1F]", border: "border-[#FF2F1F]" },
|
||||
Exercise: {
|
||||
text: "Exercise",
|
||||
class: "text-[#F8901E]",
|
||||
border: "border-[#v]",
|
||||
},
|
||||
Bought: "P - Purchase",
|
||||
Grant: "G - Grant",
|
||||
Sold: "S - Sale",
|
||||
Exercise: "E - Exercise",
|
||||
"n/a": { text: "n/a", class: "text-gray-300" },
|
||||
};
|
||||
|
||||
@ -143,6 +131,7 @@
|
||||
{ key: "securitiesTransacted", label: "Shares", align: "right" },
|
||||
{ key: "price", label: "Price", align: "right" },
|
||||
{ key: "value", label: "Value", align: "right" },
|
||||
{ key: "transactionType", label: "Trade Type", align: "right" },
|
||||
];
|
||||
|
||||
let sortOrders = {
|
||||
@ -151,6 +140,7 @@
|
||||
securitiesTransacted: { order: "none", type: "number" },
|
||||
price: { order: "none", type: "number" },
|
||||
value: { order: "none", type: "number" },
|
||||
transactionType: { order: "none", type: "string" },
|
||||
};
|
||||
|
||||
const sortData = (key) => {
|
||||
@ -393,7 +383,7 @@
|
||||
class="w-full mt-5 mb-10 m-auto flex justify-center items-center p-1"
|
||||
>
|
||||
<div
|
||||
class="w-full grid grid-cols-2 lg:grid-cols-3 gap-y-3 lg:gap-y-3 gap-x-3"
|
||||
class="w-full grid grid-cols-2 lg:grid-cols-4 gap-y-3 lg:gap-y-3 gap-x-3"
|
||||
>
|
||||
<!--Start Put/Call-->
|
||||
<div
|
||||
@ -599,14 +589,15 @@
|
||||
{#each insiderTradingList as item, index}
|
||||
{#if item?.price > 0}
|
||||
<tr
|
||||
class="text-white odd:bg-secondary {index + 1 ===
|
||||
class="text-white odd:bg-odd border-b border-gray-800 {index +
|
||||
1 ===
|
||||
insiderTradingList?.slice(0, 6)?.length &&
|
||||
data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
: ''}"
|
||||
>
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] border-b border-[#09090B] whitespace-nowrap"
|
||||
class="text-white text-sm sm:text-[1rem] ] whitespace-nowrap"
|
||||
>
|
||||
<div class="flex flex-col">
|
||||
<span class=""
|
||||
@ -615,14 +606,14 @@
|
||||
"",
|
||||
)}</span
|
||||
>
|
||||
<span class="text-sm text-white/80"
|
||||
<span class="text-sm text-white"
|
||||
>{extractOfficeInfo(item?.typeOfOwner)}</span
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white border-b border-[#09090B]"
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white ]"
|
||||
>
|
||||
{new Date(item?.transactionDate)?.toLocaleString(
|
||||
"en-US",
|
||||
@ -636,38 +627,32 @@
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white border-b border-[#09090B]"
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white ]"
|
||||
>
|
||||
{abbreviateNumber(item?.securitiesTransacted)}
|
||||
{@html abbreviateNumber(
|
||||
item?.securitiesTransacted,
|
||||
false,
|
||||
true,
|
||||
)}
|
||||
</td>
|
||||
<td
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white border-b border-[#09090B]"
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white ]"
|
||||
>
|
||||
{item?.price?.toFixed(2)}
|
||||
${item?.price?.toFixed(2)}
|
||||
</td>
|
||||
<td
|
||||
class="font-medium text-end text-sm sm:text-[1rem] whitespace-nowrap text-white border-b border-[#09090B]"
|
||||
class="font-medium text-end text-sm sm:text-[1rem] whitespace-nowrap text-white"
|
||||
>
|
||||
<div class="flex flex-row items-center justify-end">
|
||||
{#if transactionStyles[item?.transactionType]}
|
||||
<div
|
||||
class={transactionStyles[item?.transactionType]
|
||||
?.class}
|
||||
>
|
||||
{abbreviateNumber(item?.value)}
|
||||
</div>
|
||||
<div
|
||||
class="{transactionStyles[item?.transactionType]
|
||||
?.class} {transactionStyles[
|
||||
item?.transactionType
|
||||
]
|
||||
?.border} ml-2 px-1.5 py-1.5 border text-center rounded-md text-xs font-semibold"
|
||||
>
|
||||
{transactionStyles[item?.transactionType].text}
|
||||
</div>
|
||||
{:else}
|
||||
<span class="text-gray-300">n/a</span>
|
||||
{/if}
|
||||
{@html abbreviateNumber(item?.value, false, true)}
|
||||
</td>
|
||||
<td class="text-end flex justify-end whitespace-nowrap">
|
||||
<div
|
||||
class="w-auto px-4 py-1 rounded-full uppercase {item?.transactionType ===
|
||||
'Bought'
|
||||
? 'bg-[#75D377] text-black'
|
||||
: 'bg-[#cd4050] text-white'} font-semibold"
|
||||
>
|
||||
{transactionStyles[item?.transactionType]}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -161,7 +161,7 @@
|
||||
class="w-full mt-5 mb-10 m-auto flex justify-center items-center"
|
||||
>
|
||||
<div
|
||||
class="w-full grid grid-cols-2 sm:grid-cols-3 gap-y-3 lg:gap-y-3 gap-x-3"
|
||||
class="w-full grid grid-cols-2 lg:grid-cols-4 gap-y-3 lg:gap-y-3 gap-x-3"
|
||||
>
|
||||
<!--Start Buy/Sell-->
|
||||
<div
|
||||
@ -321,10 +321,10 @@
|
||||
<tbody>
|
||||
{#each senateTradingList as item}
|
||||
<tr
|
||||
class="odd:bg-secondary sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B]"
|
||||
class="odd:bg-odd sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b border-gray-800"
|
||||
>
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap pb-3 border-b border-b-[#09090B]"
|
||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap pb-3"
|
||||
>
|
||||
<div class="flex flex-row items-center">
|
||||
<div
|
||||
@ -357,7 +357,7 @@
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white border-b border-b-[#09090B]"
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white"
|
||||
>
|
||||
{new Date(item?.transactionDate)?.toLocaleString(
|
||||
"en-US",
|
||||
@ -371,12 +371,12 @@
|
||||
</td>
|
||||
|
||||
<td
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white border-b border-b-[#09090B]"
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white"
|
||||
>
|
||||
{item?.amount}
|
||||
</td>
|
||||
<td
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white border-b border-b-[#09090B]"
|
||||
class="text-end text-sm sm:text-[1rem] whitespace-nowrap text-white"
|
||||
>
|
||||
{#if item?.type === "Bought"}
|
||||
<span class="text-[#00FC50]">Bought</span>
|
||||
|
||||
@ -575,7 +575,7 @@
|
||||
<div
|
||||
class="w-full relative flex justify-center items-center overflow-hidden"
|
||||
>
|
||||
<div class="sm:p-7 w-full m-auto mt-2 sm:mt-0 ">
|
||||
<div class="sm:p-7 w-full m-auto mt-2 sm:mt-0">
|
||||
<div class="w-full mb-10">
|
||||
<div
|
||||
class="w-full m-auto sm:pb-6 {data?.getOptionsNetFlow?.length === 0
|
||||
@ -587,18 +587,17 @@
|
||||
{/await}
|
||||
</div>
|
||||
|
||||
|
||||
{#if optionsPlotData?.length !== 0}
|
||||
<Infobox text={`1 Year of options activity involving ${$displayCompanyName} by major
|
||||
institutional traders and hedge funds.`} />
|
||||
|
||||
{:else}
|
||||
<Infobox text={`There's no data available, indicating that major traders may not
|
||||
be actively betting on ${$displayCompanyName}.`} />
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
<Infobox
|
||||
text={`1 Year of options activity involving ${$displayCompanyName} by major
|
||||
institutional traders and hedge funds.`}
|
||||
/>
|
||||
{:else}
|
||||
<Infobox
|
||||
text={`There's no data available, indicating that major traders may not
|
||||
be actively betting on ${$displayCompanyName}.`}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if optionsPlotData?.length !== 0}
|
||||
@ -770,13 +769,10 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
{#if optionList?.length !== 0}
|
||||
|
||||
<h3 class="text-2xl text-gray-200 font-bold mb-4 text-start">
|
||||
{activeIdx === 0 ? "Historical Option Data" : "Option Chain Data"}
|
||||
</h3>
|
||||
<h3 class="text-2xl text-gray-200 font-bold mb-4 text-start">
|
||||
{activeIdx === 0 ? "Historical Option Data" : "Option Chain Data"}
|
||||
</h3>
|
||||
|
||||
<div
|
||||
class="bg-secondary w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-6 mb-6"
|
||||
@ -872,7 +868,7 @@
|
||||
on:click={() => handleViewData(item?.date)}
|
||||
on:mouseover={() =>
|
||||
getDailyTransactions($stockTicker + "+" + item?.date)}
|
||||
class="cursor-pointer sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] {index +
|
||||
class="cursor-pointer sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B] {index +
|
||||
1 ===
|
||||
optionList?.slice(0, 3)?.length &&
|
||||
data?.user?.tier !== 'Pro'
|
||||
@ -1061,8 +1057,7 @@
|
||||
<tbody>
|
||||
{#each data?.user?.tier === "Pro" ? optionChainList : optionChainList?.slice(0, 3) as item, index}
|
||||
<tr
|
||||
class="odd:bg-secondary border-b-[#09090B] {index +
|
||||
1 ===
|
||||
class="odd:bg-odd border-b-[#09090B] {index + 1 ===
|
||||
optionChainList?.slice(0, 3)?.length &&
|
||||
data?.user?.tier !== 'Pro'
|
||||
? 'opacity-[0.1]'
|
||||
@ -1118,7 +1113,6 @@
|
||||
</div>
|
||||
|
||||
<UpgradeToPro {data} />
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
@ -1229,7 +1223,7 @@
|
||||
<tbody>
|
||||
{#each optionHistoryList as item}
|
||||
<!-- row -->
|
||||
<tr class="odd:bg-secondary border-b-[#09090B]">
|
||||
<tr class="odd:bg-odd border-b-[#09090B]">
|
||||
<td class="text-white text-sm text-start whitespace-nowrap">
|
||||
{formatTime(item?.time)}
|
||||
</td>
|
||||
|
||||
@ -693,7 +693,11 @@
|
||||
<td
|
||||
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap border-b border-gray-800"
|
||||
>
|
||||
{abbreviateNumber(item?.marketCap)}
|
||||
{@html abbreviateNumber(
|
||||
item?.marketCap,
|
||||
false,
|
||||
true,
|
||||
)}
|
||||
</td>
|
||||
|
||||
<td
|
||||
|
||||
@ -290,7 +290,7 @@
|
||||
<tbody>
|
||||
{#each optionsWatchlist as item, index}
|
||||
<!-- row -->
|
||||
<tr class="odd:bg-secondary border-b-[#09090B]">
|
||||
<tr class="odd:bg-odd border-b-[#09090B]">
|
||||
<td
|
||||
class="text-white text-sm text-start whitespace-nowrap"
|
||||
>
|
||||
|
||||
@ -1501,7 +1501,7 @@
|
||||
<tbody class="p-0">
|
||||
{#each watchList as item}
|
||||
<tr
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B]"
|
||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-odd border-b-[#09090B]"
|
||||
>
|
||||
<td
|
||||
on:click={() => handleFilter(item?.symbol)}
|
||||
@ -1769,7 +1769,7 @@
|
||||
<strong>{item?.name}</strong>
|
||||
(<HoverStockChart symbol={item?.symbol} />)
|
||||
will report
|
||||
|
||||
|
||||
{#if item?.time}
|
||||
{#if compareTimes(item?.time, "16:00") >= 0}
|
||||
after market closes.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user