This commit is contained in:
MuslemRahimi 2024-12-25 19:42:20 +01:00
parent c2f9cde371
commit 9654c9aa58
65 changed files with 1207 additions and 1599 deletions

View File

@ -187,7 +187,7 @@
<table class="table table-sm table-compact w-full mt-5 mb-10 text-white"> <table class="table table-sm table-compact w-full mt-5 mb-10 text-white">
<!-- head --> <!-- head -->
<thead> <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"> <th class=" text-white text-sm font-semibold">
Bullish Probability Bullish Probability
</th> </th>
@ -197,53 +197,53 @@
</thead> </thead>
<tbody> <tbody>
<!-- row 1 --> <!-- 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]">+80% </td>
<td class="text-sm sm:text-[1rem]">Strong Buy</td> <td class="text-sm sm:text-[1rem]">Strong Buy</td>
<td class="text-sm sm:text-[1rem] text-end">10</td> <td class="text-sm sm:text-[1rem] text-end">10</td>
</tr> </tr>
<!-- row 2 --> <!-- 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]">+75%</td>
<td class="text-sm sm:text-[1rem]">Buy</td> <td class="text-sm sm:text-[1rem]">Buy</td>
<td class="text-sm sm:text-[1rem] text-end">9</td> <td class="text-sm sm:text-[1rem] text-end">9</td>
</tr> </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]">+70%</td>
<td class="text-sm sm:text-[1rem]">Buy</td> <td class="text-sm sm:text-[1rem]">Buy</td>
<td class="text-sm sm:text-[1rem] text-end">8</td> <td class="text-sm sm:text-[1rem] text-end">8</td>
</tr> </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]"> +60% </td>
<td class="text-sm sm:text-[1rem]">Buy</td> <td class="text-sm sm:text-[1rem]">Buy</td>
<td class="text-sm sm:text-[1rem] text-end">7</td> <td class="text-sm sm:text-[1rem] text-end">7</td>
</tr> </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]">+50%</td>
<td class="text-sm sm:text-[1rem]">Hold</td> <td class="text-sm sm:text-[1rem]">Hold</td>
<td class="text-sm sm:text-[1rem] text-end">6</td> <td class="text-sm sm:text-[1rem] text-end">6</td>
</tr> </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]">+45%</td>
<td class="text-sm sm:text-[1rem]">Hold</td> <td class="text-sm sm:text-[1rem]">Hold</td>
<td class="text-sm sm:text-[1rem] text-end">5</td> <td class="text-sm sm:text-[1rem] text-end">5</td>
</tr> </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]">+40%</td>
<td class="text-sm sm:text-[1rem]">Hold</td> <td class="text-sm sm:text-[1rem]">Hold</td>
<td class="text-sm sm:text-[1rem] text-end">4</td> <td class="text-sm sm:text-[1rem] text-end">4</td>
</tr> </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]">+35%</td>
<td class="text-sm sm:text-[1rem]">Sell</td> <td class="text-sm sm:text-[1rem]">Sell</td>
<td class="text-sm sm:text-[1rem] text-end">3</td> <td class="text-sm sm:text-[1rem] text-end">3</td>
</tr> </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]">+30%</td>
<td class="text-sm sm:text-[1rem]">Sell</td> <td class="text-sm sm:text-[1rem]">Sell</td>
<td class="text-sm sm:text-[1rem] text-end">2</td> <td class="text-sm sm:text-[1rem] text-end">2</td>
</tr> </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]">+20%</td>
<td class="text-sm sm:text-[1rem]">Strong Sell</td> <td class="text-sm sm:text-[1rem]">Strong Sell</td>
<td class="text-sm sm:text-[1rem] text-end">1</td> <td class="text-sm sm:text-[1rem] text-end">1</td>

View File

@ -80,7 +80,7 @@
<div class="flex justify-start items-center w-full m-auto"> <div class="flex justify-start items-center w-full m-auto">
<table class="w-full" data-test="statistics-table"> <table class="w-full" data-test="statistics-table">
<tbody> <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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Date</span> <span>Date</span>
</td> </td>
@ -90,7 +90,7 @@
{formatDateRange(rawData?.slice(-1)?.at(0)?.date)} {formatDateRange(rawData?.slice(-1)?.at(0)?.date)}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Fee Range</span> <span>Fee Range</span>
</td> </td>
@ -100,7 +100,7 @@
{lowestFee + "%" + "-" + highestFee + "%"} {lowestFee + "%" + "-" + highestFee + "%"}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Total Available Shares</span> <span>Total Available Shares</span>
</td> </td>

View File

@ -53,7 +53,7 @@
</thead> </thead>
<tbody> <tbody>
{#each displayList as item,index} {#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"> <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"])} {item["Interventions"]?.length === 0 ? '-' : item["Interventions"]?.length > charNumber ? formatString(item["Interventions"]?.slice(0,charNumber)) + "..." : formatString(item["Interventions"])}
@ -250,49 +250,49 @@
> >
<tbody> <tbody>
<!-- row 1 --> <!-- 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="font-semibold w-full">NCT Number</td>
<td class="">{trialId}</td> <td class="">{trialId}</td>
</tr> </tr>
<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="font-semibold">Start Date</td>
<td class="">{trialStart}</td> <td class="">{trialStart}</td>
</tr> </tr>
<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="font-semibold">End Date</td>
<td class="">{trialEnd}</td> <td class="">{trialEnd}</td>
</tr> </tr>
<!-- row 2 --> <!-- row 2 -->
<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 Status</td> <td class="font-semibold">Study Status</td>
<td class="">{trialStage}</td> <td class="">{trialStage}</td>
</tr> </tr>
<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="font-semibold">Phase Status</td>
<td class="">{trialPhase}</td> <td class="">{trialPhase}</td>
</tr> </tr>
<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="font-semibold">Study Results</td>
<td class="">{trialResult}</td> <td class="">{trialResult}</td>
</tr> </tr>
<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="font-semibold">Sex</td>
<td class="">{formatString(trialSex)}</td> <td class="">{formatString(trialSex)}</td>
</tr> </tr>
<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="font-semibold">Age</td>
<td class="" <td class=""
@ -303,31 +303,31 @@
> >
</tr> </tr>
<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="font-semibold">Sponsor</td>
<td class="">{trialSponsor}</td> <td class="">{trialSponsor}</td>
</tr> </tr>
<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="font-semibold">Enrollment</td>
<td class="">{trialEnrollment}</td> <td class="">{trialEnrollment}</td>
</tr> </tr>
<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="font-semibold">Study Type</td>
<td class="">{trialStudyType}</td> <td class="">{trialStudyType}</td>
</tr> </tr>
<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="font-semibold">Funder Type</td>
<td class="">{trialFunderType}</td> <td class="">{trialFunderType}</td>
</tr> </tr>
<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="font-semibold">Website</td>
<td class="" <td class=""

View File

@ -87,7 +87,7 @@
<div class="flex justify-start items-center w-full m-auto"> <div class="flex justify-start items-center w-full m-auto">
<table class="w-full" data-test="statistics-table"> <table class="w-full" data-test="statistics-table">
<tbody> <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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Date</span> <span>Date</span>
</td> </td>
@ -98,7 +98,7 @@
</td> </td>
</tr> </tr>
<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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Total Volume</span> <span>Total Volume</span>
@ -110,7 +110,7 @@
</td> </td>
</tr> </tr>
<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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Avg. Short % of Volume</span> <span>Avg. Short % of Volume</span>

View File

@ -240,8 +240,7 @@
<tbody> <tbody>
{#each showFullStats ? tableList?.slice(0, 10) : tableList?.slice(0, 3) as item, index} {#each showFullStats ? tableList?.slice(0, 10) : tableList?.slice(0, 3) as item, index}
<tr <tr
class="border-y border-gray-800 odd:bg-secondary {index === class="border-y border-gray-800 odd:bg-odd {index === 2 &&
2 &&
!showFullStats && !showFullStats &&
tableList?.length > 3 tableList?.length > 3
? 'opacity-[0.5]' ? 'opacity-[0.5]'

View File

@ -263,7 +263,7 @@
<div class="flex justify-start items-center w-full m-auto"> <div class="flex justify-start items-center w-full m-auto">
<table class="w-full" data-test="statistics-table"> <table class="w-full" data-test="statistics-table">
<tbody> <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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Date</span> <span>Date</span>
</td> </td>
@ -273,7 +273,7 @@
{formatDateRange(rawData?.slice(-1)?.at(0)?.date)} {formatDateRange(rawData?.slice(-1)?.at(0)?.date)}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Price Range</span> <span>Price Range</span>
</td> </td>
@ -283,7 +283,7 @@
{lowestPrice + "-" + highestPrice} {lowestPrice + "-" + highestPrice}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Latest FTD</span> <span>Latest FTD</span>
</td> </td>

View File

@ -5,7 +5,7 @@
</script> </script>
{#each fields as { label, key }} {#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 <td
class="text-start border-r border-gray-700 text-white text-sm sm:text-[1rem]" class="text-start border-r border-gray-700 text-white text-sm sm:text-[1rem]"
> >
@ -13,9 +13,9 @@
</td> </td>
{#each data as item} {#each data as item}
<td class="text-sm sm:text-[1rem] text-end"> <td class="text-sm sm:text-[1rem] text-end">
{item[key] !== null && item[key] !== 0 {@html item[key] !== null && item[key] !== 0
? abbreviateNumber(item[key]?.toFixed(2)) ? abbreviateNumber(item[key]?.toFixed(2), false, true)
: "-"} : "n/a"}
</td> </td>
{/each} {/each}
</tr> </tr>

View File

@ -112,7 +112,7 @@
<div class="flex justify-start items-center w-full m-auto"> <div class="flex justify-start items-center w-full m-auto">
<table class="w-full" data-test="statistics-table"> <table class="w-full" data-test="statistics-table">
<tbody> <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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Date</span> <span>Date</span>
</td> </td>
@ -122,7 +122,7 @@
{formatDateRange(rawData?.slice(-1)?.at(0)?.date)} {formatDateRange(rawData?.slice(-1)?.at(0)?.date)}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>IV Range</span> <span>IV Range</span>
</td> </td>
@ -132,7 +132,7 @@
{lowestIV + "%" + "-" + highestIV + "%"} {lowestIV + "%" + "-" + highestIV + "%"}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>RV Range</span> <span>RV Range</span>
</td> </td>

View File

@ -97,7 +97,7 @@
{#each displayList as item} {#each displayList as item}
<!-- row --> <!-- row -->
<tr <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 <td
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]" class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"

View File

@ -88,7 +88,7 @@
<div class="flex justify-start items-center w-full m-auto"> <div class="flex justify-start items-center w-full m-auto">
<table class="w-full" data-test="statistics-table"> <table class="w-full" data-test="statistics-table">
<tbody> <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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Date</span> <span>Date</span>
</td> </td>
@ -98,7 +98,7 @@
{formatDateRange(historyData?.slice(-1)?.at(0)?.date)} {formatDateRange(historyData?.slice(-1)?.at(0)?.date)}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Total Notional Sum</span> <span>Total Notional Sum</span>
</td> </td>
@ -110,7 +110,7 @@
)} )}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Total Trade Count</span> <span>Total Trade Count</span>
</td> </td>
@ -122,7 +122,7 @@
)} )}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Total Share Quantity</span> <span>Total Share Quantity</span>
</td> </td>
@ -173,7 +173,7 @@
<tbody> <tbody>
{#each showFullStats ? topMarketMakers?.slice(0, 10) : topMarketMakers?.slice(0, 3) as item, index} {#each showFullStats ? topMarketMakers?.slice(0, 10) : topMarketMakers?.slice(0, 3) as item, index}
<tr <tr
class="border-y border-gray-800 odd:bg-secondary {index === class="border-y border-gray-800 odd:bg-odd {index ===
2 && 2 &&
!showFullStats && !showFullStats &&
topMarketMakers?.length > 3 topMarketMakers?.length > 3

View File

@ -79,7 +79,7 @@
> >
<!-- head --> <!-- head -->
<thead> <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"> <th class="bg-primary text-white text-sm font-semibold">
Exchange holidays Exchange holidays
</th> </th>
@ -88,44 +88,44 @@
</thead> </thead>
<tbody> <tbody>
<!-- row 1 --> <!-- 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="font-semibold"> New Years Day</td>
<td class="">01.01.2024</td> <td class="">01.01.2024</td>
</tr> </tr>
<!-- row 2 --> <!-- 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="font-semibold">Martin Luther King, Jr. Day</td>
<td class="">15.01.2024</td> <td class="">15.01.2024</td>
</tr> </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="font-semibold">Washington's Birthday</td>
<td class="">19.02.2024</td> <td class="">19.02.2024</td>
</tr> </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="font-semibold"> Good Friday </td>
<td class="bg-primary">29.03.2024</td> <td class="bg-primary">29.03.2024</td>
</tr> </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="font-semibold">Memorial Day</td>
<td class="">27.05.2024</td> <td class="">27.05.2024</td>
</tr> </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="font-semibold">Juneteenth National Independence Day</td>
<td class="">19.06.2024</td> <td class="">19.06.2024</td>
</tr> </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="font-semibold">Independence Day</td>
<td class="">04.07.2024</td> <td class="">04.07.2024</td>
</tr> </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="font-semibold">Labor Day</td>
<td class="">02.09.2024</td> <td class="">02.09.2024</td>
</tr> </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="font-semibold">Thanksgiving Day</td>
<td class="">28.11.2024</td> <td class="">28.11.2024</td>
</tr> </tr>
<tr class="odd:bg-secondary"> <tr class="odd:bg-odd">
<td class="font-semibold">Christmas</td> <td class="font-semibold">Christmas</td>
<td class="">25.12.2024</td> <td class="">25.12.2024</td>
</tr> </tr>

View File

@ -38,7 +38,7 @@
{#if Object?.keys(rawData)?.length !== 0} {#if Object?.keys(rawData)?.length !== 0}
<div class="space-y-3 overflow-hidden"> <div class="space-y-3 overflow-hidden">
<!--Start Content--> <!--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-col items-center w-full mb-3">
<div class="flex flex-row justify-start mr-auto items-center"> <div class="flex flex-row justify-start mr-auto items-center">
<!--<img class="h-10 inline-block mr-2" src={copilotIcon} />--> <!--<img class="h-10 inline-block mr-2" src={copilotIcon} />-->
@ -52,7 +52,7 @@
</div> </div>
</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( {$displayCompanyName} is scheduled to release its earnings on {new Date(
rawData?.date ?? null, rawData?.date ?? null,
)?.toLocaleString("en-US", { )?.toLocaleString("en-US", {
@ -70,7 +70,7 @@
{/if} {/if}
<br />Analysts project revenue of <br />Analysts project revenue of
<span class="font-semibold" <span class="font-semibold"
>{abbreviateNumber(rawData?.revenueEst, true)}</span >{@html abbreviateNumber(rawData?.revenueEst, true, true)}</span
>, reflecting a >, reflecting a
<span <span
class="{revenueRatio > 0 class="{revenueRatio > 0
@ -96,7 +96,7 @@
</div> </div>
{/if} {/if}
{#if Object?.keys(rawData)?.length !== 0} {#if data?.getNextEarnings?.past?.length !== 0}
<div class="space-y-3 overflow-hidden mt-5"> <div class="space-y-3 overflow-hidden mt-5">
<!--Start Content--> <!--Start Content-->
<div class="w-auto lg:w-full p-1 flex flex-col m-auto"> <div class="w-auto lg:w-full p-1 flex flex-col m-auto">
@ -113,7 +113,10 @@
</div> </div>
</div> </div>
<PastEarnings userTier={data?.user?.tier} rawData={data?.getNextEarnings?.past} /> <PastEarnings
userTier={data?.user?.tier}
rawData={data?.getNextEarnings?.past}
/>
</div> </div>
</div> </div>
{/if} {/if}

View File

@ -1,456 +1,479 @@
<script lang="ts"> <script lang="ts">
import { stockTicker } from "$lib/store"; import { stockTicker } from "$lib/store";
import { abbreviateNumber } from "$lib/utils"; import { abbreviateNumber } from "$lib/utils";
export let userTier; export let userTier;
export let rawData; export let rawData;
let isLoaded = false; let isLoaded = false;
let xData = []; let xData = [];
let tableRevenue = []; let tableRevenue = [];
let tableRevenueEst = []; let tableRevenueEst = [];
let tableRevenueSurprise = []; let tableRevenueSurprise = [];
let tableEPS = []; let tableEPS = [];
let tableEPSEst = []; let tableEPSEst = [];
let tableEPSSurprise = []; let tableEPSSurprise = [];
let tableVolatility = []; let tableVolatility = [];
let averageVolatility = 0; let averageVolatility = 0;
let positiveRevenueSurprisePercentage = 0; let positiveRevenueSurprisePercentage = 0;
let positiveEpsSurprisePercentage = 0; let positiveEpsSurprisePercentage = 0;
function prepareDataset() { function prepareDataset() {
xData = rawData?.map(({ year, quarter }) => { xData = rawData?.map(({ year, quarter }) => {
const shortYear = String(year).slice(2); // Get the last two digits of the year const shortYear = String(year).slice(2); // Get the last two digits of the year
return `${quarter} '${shortYear}`; return `${quarter} '${shortYear}`;
}); });
tableRevenue = rawData?.map(({ revenue }) =>revenue); tableRevenue = rawData?.map(({ revenue }) => revenue);
tableRevenueEst = rawData?.map(({ revenueEst }) =>revenueEst); tableRevenueEst = rawData?.map(({ revenueEst }) => revenueEst);
tableRevenueSurprise = rawData?.map(({ revenueSurprisePercent }) =>revenueSurprisePercent); tableRevenueSurprise = rawData?.map(
({ revenueSurprisePercent }) => revenueSurprisePercent,
);
tableEPS = rawData?.map(({ eps }) =>eps); tableEPS = rawData?.map(({ eps }) => eps);
tableEPSEst = rawData?.map(({ epsEst }) =>epsEst); tableEPSEst = rawData?.map(({ epsEst }) => epsEst);
tableEPSSurprise = rawData?.map(({ epsSurprisePercent }) =>epsSurprisePercent); tableEPSSurprise = rawData?.map(
({ epsSurprisePercent }) => epsSurprisePercent,
);
tableVolatility = rawData?.map(({ volatility }) =>volatility); tableVolatility = rawData?.map(({ volatility }) => volatility);
averageVolatility = rawData?.length > 0 averageVolatility =
? rawData.reduce((sum, item) => sum + (item?.volatility || 0), 0) / rawData?.length rawData?.length > 0
: 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 totalDataCount = rawData?.length;
const countPositiveEpsSurprise = rawData.filter(data => data.epsSurprisePercent > 0).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> }
</script>
<section class="overflow-hidden text-white h-full pb-8 sm:pb-2"> <section class="overflow-hidden text-white h-full pb-8 sm:pb-2">
<main class="overflow-hidden"> <main class="overflow-hidden">
<div class="w-full m-auto"> <div class="w-full m-auto">
{#if isLoaded}
{#if isLoaded} {#if rawData?.length !== 0}
{#if rawData?.length !== 0}
<span class=""> <span class="">
The average price volatility over this 3-day period is The average price volatility over this 3-day period is
{#if userTier !== 'Pro'} {#if userTier !== "Pro"}
... Unlock content with ... Unlock content with
<a <a
class="inline-block ml-0.5 text-blue-400 sm:hover:text-white" class="inline-block ml-0.5 text-blue-400 sm:hover:text-white"
href="/pricing" href="/pricing"
>Pro Subscription <svg >Pro Subscription <svg
class="w-4 h-4 mb-1 inline-block text[#A3A3A3] sm:hover:text-white" class="w-4 h-4 mb-1 inline-block text[#A3A3A3] sm:hover:text-white"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24" viewBox="0 0 24 24"
><path ><path
fill="currentColor" 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" 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 /></svg
></a ></a
> >
{:else} {:else}
<span class="font-bold">±{averageVolatility?.toFixed(2)}%</span>. <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. 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} {/if}
</span> </span>
<div <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" 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 <thead class="">
class="table table-sm table-pin-cols table-compact rounded-none sm:rounded-md w-full bg-[#09090B] border-bg-[#09090B]" <tr class="">
> <th
<thead class=""> class="bg-primary border-b border-[#000] text-white font-semibold text-sm text-start"
<tr class=""> >Date</th
<th >
class="bg-primary border-b border-[#000] text-white font-semibold text-sm text-start" {#each xData as item}
>Date</th <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} {/each}
<td </tr>
class="z-20 bg-primary border-b border-[#000] text-white font-semibold text-sm text-end bg-[#09090B]" </thead>
>{item}</td <tbody class="shadow-md">
> <tr class="bg-primary border-b-[#27272A]">
{/each} <th
</tr> class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
</thead> >
<tbody class="shadow-md"> Reported Revenue
</th>
<tr class="bg-primary border-b-[#27272A]"> {#each tableRevenue as item, index}
<th <td
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]" class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]"
> >
Reported Revenue {#if index !== 0}
</th> {#if userTier !== "Pro"}
{#each tableRevenue as item, index} <a
<td class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]"> class="inline-block ml-0.5 text-white whitespace-nowrap"
{#if index !== 0} href="/pricing"
{#if userTier !== "Pro"} >
<a class="inline-block ml-0.5 text-white whitespace-nowrap" href="/pricing"> Pro
Pro <svg
<svg class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]" xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
viewBox="0 0 24 24" >
> <path
<path fill="currentColor"
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"
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>
</svg> </a>
</a> {:else if item !== undefined && item !== null}
{: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}
<span <span
class={item > 0 >{@html abbreviateNumber(item, false, true)}</span
? "text-[#00FC50] before:content-['+']" >
: item < 0 {:else}
? "text-[#FF2F1F]" n/a
: ""} {/if}
> {:else}
{abbreviateNumber(item)}% {@html abbreviateNumber(item, false, true)}
</span> {/if}
{/if} </td>
</td> {/each}
{/each} </tr>
</tr>
<tr class="bg-primary border-b-[#27272A]">
<tr class="bg-primary border-b-[#27272A]"> <th
<th class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]" >
> Est. Revenue
Reported EPS </th>
</th> {#each tableRevenueEst as item, index}
{#each tableEPS as item, index} <td
<td class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]"> class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]"
{#if index !== 0} >
{#if userTier !== "Pro"} {#if index !== 0}
<a class="inline-block ml-0.5 text-white whitespace-nowrap" href="/pricing"> {#if userTier !== "Pro"}
Pro <a
<svg class="inline-block ml-0.5 text-white whitespace-nowrap"
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]" href="/pricing"
xmlns="http://www.w3.org/2000/svg" >
viewBox="0 0 24 24" Pro
> <svg
<path class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
fill="currentColor" xmlns="http://www.w3.org/2000/svg"
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" viewBox="0 0 24 24"
/> >
</svg> <path
</a> fill="currentColor"
{:else} 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"
{#if item !== undefined && item !== null} />
<span>{abbreviateNumber(item)}</span> </svg>
{:else} </a>
n/a {:else if item !== undefined && item !== null}
{/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. 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}
<span <span
class={item > 0 >{@html abbreviateNumber(item, false, true)}</span
? "text-[#00FC50] before:content-['+']" >
: item < 0 {:else}
? "text-[#FF2F1F]" n/a
: ""} {/if}
> {:else}
{abbreviateNumber(item)}% {@html abbreviateNumber(item, false, true)}
</span> {/if}
{/if} </td>
</td> {/each}
{/each} </tr>
</tr>
<tr class="bg-primary border-b-[#27272A]"> <tr class="bg-primary border-b-[#27272A]">
<th <th
class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]" 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 {abbreviateNumber(item)}%
</th> </span>
{#each tableVolatility as item, index} {/if}
<td class="text-white text-sm sm:text-[1rem] text-end font-semibold bg-[#09090B]"> </td>
{#if index !== 0} {/each}
{#if userTier !== "Pro"} </tr>
<a class="inline-block ml-0.5 text-white whitespace-nowrap font-normal" href="/pricing">
Pro <tr class="bg-primary border-b-[#27272A]">
<svg <th
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]" class="bg-primary whitespace-nowrap text-sm sm:text-[1rem] text-white text-start font-medium border-b border-[#27272A]"
xmlns="http://www.w3.org/2000/svg" >
viewBox="0 0 24 24" Reported EPS
> </th>
<path {#each tableEPS as item, index}
fill="currentColor" <td
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" class="text-white text-sm sm:text-[1rem] text-end font-medium bg-[#09090B]"
/> >
</svg> {#if index !== 0}
</a> {#if userTier !== "Pro"}
{:else} <a
{#if item !== undefined && item !== null} class="inline-block ml-0.5 text-white whitespace-nowrap"
±{abbreviateNumber(item)}% href="/pricing"
{:else} >
n/a Pro
{/if} <svg
{/if} class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
{:else} 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)}% ±{abbreviateNumber(item)}%
{/if} {:else}
</td> n/a
{/each} {/if}
</tr> {:else}
±{abbreviateNumber(item)}%
{/if}
</td>
</tbody> {/each}
</table> </tr>
</div> </tbody>
</table>
{/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>
</div> </div>
{/if} {/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>
</div>
{/if}
</div>
</main>
</section>
<style>
.app {
height: 300px;
max-width: 100%; /* Ensure chart width doesn't exceed the container */
}
</div> @media (max-width: 640px) {
</main>
</section>
<style>
.app { .app {
height: 300px; height: 210px;
max-width: 100%; /* Ensure chart width doesn't exceed the container */
} }
}
@media (max-width: 640px) { .chart {
.app { width: 100%;
height: 210px; }
} </style>
}
.chart {
width: 100%;
}
</style>

View File

@ -272,7 +272,7 @@
<div class="flex justify-start items-center w-full m-auto mt-6"> <div class="flex justify-start items-center w-full m-auto mt-6">
<table class="w-full" data-test="statistics-table"> <table class="w-full" data-test="statistics-table">
<tbody> <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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Date</span> <span>Date</span>
</td> </td>
@ -282,7 +282,7 @@
{formatDateRange(rawData?.lastDate)} {formatDateRange(rawData?.lastDate)}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Volume in $</span> <span>Volume in $</span>
</td> </td>
@ -292,7 +292,7 @@
{monthlyVolume} {monthlyVolume}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Retail Sentiment Range</span> <span>Retail Sentiment Range</span>
</td> </td>

View File

@ -248,11 +248,15 @@
> >
Institutions hold a total of Institutions hold a total of
<span class="font-semibold" <span class="font-semibold"
>{abbreviateNumber(rawData?.numberOf13Fshares)}</span >{@html abbreviateNumber(
rawData?.numberOf13Fshares,
false,
true,
)}</span
> >
{$displayCompanyName} shares, with a combined investment of {$displayCompanyName} shares, with a combined investment of
<span class="font-semibold" <span class="font-semibold"
>{abbreviateNumber(rawData?.totalInvested, true)}</span >{@html abbreviateNumber(rawData?.totalInvested, true, true)}</span
>. >.
</div> </div>
@ -320,7 +324,7 @@
<div class="w-full mt-5 mb-10 m-auto flex justify-center items-center"> <div class="w-full mt-5 mb-10 m-auto flex justify-center items-center">
<div <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--> <!--Start Put/Call-->
<div <div
@ -530,7 +534,7 @@
{#each displayList as item, index} {#each displayList as item, index}
{#if item?.investorName?.length > 0} {#if item?.investorName?.length > 0}
<tr <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 === 1 ===
shareholderList?.length && data?.user?.tier !== 'Pro' shareholderList?.length && data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'
@ -562,8 +566,8 @@
<td <td
class="text-white text-end font-medium text-sm sm:text-[1rem] whitespace-nowrap" class="text-white text-end font-medium text-sm sm:text-[1rem] whitespace-nowrap"
> >
{item?.sharesNumber !== null {@html item?.sharesNumber !== null
? abbreviateNumber(item?.sharesNumber) ? abbreviateNumber(item?.sharesNumber, false, true)
: "-"} : "-"}
</td> </td>

View File

@ -111,7 +111,7 @@
<div class="flex justify-start items-center w-full m-auto mt-6"> <div class="flex justify-start items-center w-full m-auto mt-6">
<table class="w-full" data-test="statistics-table"> <table class="w-full" data-test="statistics-table">
<tbody> <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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Short Interest</span> <span>Short Interest</span>
</td> </td>
@ -121,7 +121,7 @@
{abbreviateNumber(rawData?.sharesShort)} {abbreviateNumber(rawData?.sharesShort)}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Short Previous Month</span> <span>Short Previous Month</span>
</td> </td>
@ -131,7 +131,7 @@
{abbreviateNumber(rawData?.sharesShortPriorMonth)} {abbreviateNumber(rawData?.sharesShortPriorMonth)}
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Short % of Shares Out</span> <span>Short % of Shares Out</span>
</td> </td>
@ -141,7 +141,7 @@
{rawData?.shortOutStandingPercent}% {rawData?.shortOutStandingPercent}%
</td> </td>
</tr> </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"> <td class="px-[5px] py-1.5 xs:px-2.5 xs:py-2">
<span>Short % of Float</span> <span>Short % of Float</span>
</td> </td>

View File

@ -206,7 +206,7 @@
<tbody> <tbody>
{#each showFullStats ? signalList : signalList?.slice(0, 3) as item, index} {#each showFullStats ? signalList : signalList?.slice(0, 3) as item, index}
<tr <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 && 2 &&
!showFullStats && !showFullStats &&
signalList?.length > 2 signalList?.length > 2

View File

@ -148,8 +148,16 @@
}, },
{ name: "Top Analyst Rating", rule: "topAnalystRating", type: "rating" }, { name: "Top Analyst Rating", rule: "topAnalystRating", type: "rating" },
{ name: "Top Analyst Count", rule: "topAnalystCounter", type: "int" }, { 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]; allRows = [...allRows, ...specificRows];
@ -164,58 +172,57 @@
allRows = sortIndicatorCheckMarks(allRows); allRows = sortIndicatorCheckMarks(allRows);
const handleDownloadMessage = (event) => { const handleDownloadMessage = (event) => {
let updateData = event?.data?.rawData ?? []; // Use a new variable for updated data let updateData = event?.data?.rawData ?? []; // Use a new variable for updated data
// Check if both arrays exist and have data // Check if both arrays exist and have data
if (!updateData?.length || !rawData?.length) { if (!updateData?.length || !rawData?.length) {
return; 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;
} }
}
// Trigger reactivity by creating a new reference // Create a new array to ensure reactivity
rawData = [...updatedRawData]; const updatedRawData = [...rawData];
stockList = rawData?.slice(0, 100);
columns = generateColumns(rawData); for (let i = 0; i < updateData.length; i++) {
sortOrders = generateSortOrders(rawData); 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 () => { const updateStockScreenerData = async () => {
downloadWorker.postMessage({ downloadWorker.postMessage({
@ -687,7 +694,6 @@
}; };
$: charNumber = $screenWidth < 640 ? 15 : 20; $: charNumber = $screenWidth < 640 ? 15 : 20;
</script> </script>
<!-- Content area --> <!-- Content area -->
@ -857,7 +863,7 @@
<tbody> <tbody>
{#each stockList as item, index} {#each stockList as item, index}
<tr <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 === 1 ===
rawData?.length && rawData?.length &&
data?.user?.tier !== 'Pro' && data?.user?.tier !== 'Pro' &&

View File

@ -73,7 +73,7 @@
{#each watchList as item} {#each watchList as item}
<!-- row --> <!-- row -->
<tr <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 <td
class="text-sm sm:text-[1rem] text-start border-b-[#09090B]" class="text-sm sm:text-[1rem] text-start border-b-[#09090B]"

View File

@ -657,7 +657,7 @@ export function abbreviateNumber(number, addDollarSign = false, color = false) {
if (color) { if (color) {
if (suffix === "K") { 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") { } else if (suffix === "M") {
suffix = '<span class=\"font-semibold text-[#FACD38]\">M</span>'; suffix = '<span class=\"font-semibold text-[#FACD38]\">M</span>';
} else if (suffix === "B") { } else if (suffix === "B") {

View File

@ -727,7 +727,7 @@
</ul> </ul>
{:else} {:else}
<Infobox <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} {/if}
</Card.Content> </Card.Content>

View File

@ -206,7 +206,7 @@
<tbody> <tbody>
{#each analystList as item, index} {#each analystList as item, index}
<tr <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 === 1 ===
rawData?.length && data?.user?.tier !== 'Pro' rawData?.length && data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'

View File

@ -248,7 +248,7 @@
Stock Analyst at {companyName} Stock Analyst at {companyName}
</p> </p>
<div class="inline-flex items-center"> <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} {#each Array.from({ length: 5 }) as _, i}
{#if i < Math.floor(analystScore)} {#if i < Math.floor(analystScore)}
<svg <svg
@ -277,7 +277,8 @@
{/if} {/if}
{/each} {/each}
</div> </div>
<span class="ml-1 text-[1rem] text-white">({analystScore})</span <span class="ml-1 text-[1rem] text-white"
>({analystScore})</span
> >
</div> </div>
</div> </div>
@ -289,7 +290,9 @@
<div class="text-2xl font-semibold tracking-tight text-white"> <div class="text-2xl font-semibold tracking-tight text-white">
# {rank} # {rank}
</div> </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 Out of {numOfAnalysts} analysts
</div> </div>
</div> </div>
@ -299,7 +302,9 @@
<div class="text-2xl font-bold tracking-tight text-white"> <div class="text-2xl font-bold tracking-tight text-white">
{totalRatings} {totalRatings}
</div> </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 Total ratings
</div> </div>
</div> </div>
@ -313,7 +318,9 @@
: "text-[#EF4444]"}>{successRate?.toFixed(2)}%</span : "text-[#EF4444]"}>{successRate?.toFixed(2)}%</span
> >
</div> </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 Success rate
</div> </div>
</div> </div>
@ -327,7 +334,9 @@
: "text-[#EF4444]"}>{avgReturn?.toFixed(2)}%</span : "text-[#EF4444]"}>{avgReturn?.toFixed(2)}%</span
> >
</div> </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 Average return
</div> </div>
</div> </div>
@ -388,7 +397,7 @@
<tbody> <tbody>
{#each stockList as item, index} {#each stockList as item, index}
<tr <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" <td class="hidden lg:table-cell"
><button ><button

View File

@ -193,7 +193,7 @@
<tbody> <tbody>
{#each displayList as item, index} {#each displayList as item, index}
<tr <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 === 1 ===
displayList?.length && data?.user?.tier !== 'Pro' displayList?.length && data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'

View File

@ -224,9 +224,9 @@
</p> </p>
</div> </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 class="w-full m-auto mt-10">
<div <div
@ -241,7 +241,7 @@
<tbody> <tbody>
{#each stockList as item, index} {#each stockList as item, index}
<tr <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 === 1 ===
rawData?.length && data?.user?.tier !== 'Pro' rawData?.length && data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'
@ -374,7 +374,6 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} />
</div> </div>
</main> </main>
</div> </div>

View File

@ -174,7 +174,7 @@
{#each symbolList as item, index} {#each symbolList as item, index}
<tr <tr
on:click={() => goto("/crypto/" + item?.symbol)} 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 <td
class="text-blue-400 font-medium text-sm text-start border-b-[#09090B]" class="text-blue-400 font-medium text-sm text-start border-b-[#09090B]"

View File

@ -361,7 +361,7 @@
<tbody> <tbody>
{#each senateTradingList as item} {#each senateTradingList as item}
<tr <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 <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 border-b border-b-[#09090B]"

View File

@ -329,9 +329,7 @@ updateYearRange()
</thead> </thead>
<tbody class="shadow-md"> <tbody class="shadow-md">
{#each quantStats[$cryptoTicker?.toUpperCase()]["Worst 10 Drawdowns"] as item} {#each quantStats[$cryptoTicker?.toUpperCase()]["Worst 10 Drawdowns"] as item}
<tr <tr class="text-white border-y border-gray-800 odd:bg-odd">
class="text-white border-y border-gray-800 odd:bg-secondary"
>
<td <td
class="text-start text-sm sm:text-[1rem] text-white whitespace-nowrap" class="text-start text-sm sm:text-[1rem] text-white whitespace-nowrap"
> >
@ -432,9 +430,7 @@ updateYearRange()
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -476,9 +472,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -514,9 +508,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -536,9 +528,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -558,9 +548,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -598,9 +586,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -620,9 +606,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -642,9 +626,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -662,9 +644,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -682,9 +662,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -702,9 +680,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -724,9 +700,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -746,9 +720,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap" class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -786,9 +758,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -826,9 +796,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -866,9 +834,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -888,9 +854,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -910,9 +874,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -954,9 +916,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -998,9 +958,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1020,9 +978,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1040,9 +996,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap" class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1060,9 +1014,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1082,9 +1034,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1104,9 +1054,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1126,9 +1074,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1148,9 +1094,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1170,9 +1114,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1208,9 +1150,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1248,9 +1188,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1288,9 +1226,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap" class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1326,9 +1262,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1368,9 +1302,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1410,9 +1342,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1452,9 +1382,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1494,9 +1422,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1536,9 +1462,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1576,9 +1500,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1598,9 +1520,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1620,9 +1540,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1642,9 +1560,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1682,9 +1598,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1724,9 +1638,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1746,9 +1658,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1768,9 +1678,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1790,9 +1698,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >

View File

@ -478,7 +478,7 @@
{#each day as item} {#each day as item}
<!-- row --> <!-- row -->
<tr <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 <td
class="border-b-[#09090B] text-sm sm:text-[1rem]" class="border-b-[#09090B] text-sm sm:text-[1rem]"

View File

@ -478,7 +478,7 @@
{#each day as item, index} {#each day as item, index}
<!-- row --> <!-- row -->
<tr <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 <td
class="text-blue-400 border-b-[#09090B] text-start text-sm sm:text-[1rem]" class="text-blue-400 border-b-[#09090B] text-start text-sm sm:text-[1rem]"

View File

@ -683,7 +683,7 @@
{#each day as item} {#each day as item}
<!-- row --> <!-- row -->
<tr <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 <td
class="text-white text-sm sm:text-[1rem] border-b-[#09090B]" class="text-white text-sm sm:text-[1rem] border-b-[#09090B]"

View File

@ -907,7 +907,7 @@
{#each tableList as item} {#each tableList as item}
<!-- row --> <!-- row -->
<tr <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 <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 border-b-[#09090B]"

View File

@ -185,7 +185,7 @@
<tbody> <tbody>
{#each stockList as item, index} {#each stockList as item, index}
<tr <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 <td
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]" class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"

View File

@ -366,7 +366,7 @@
</thead> </thead>
<tbody class="shadow-md"> <tbody class="shadow-md">
{#each rawData?.history as item} {#each rawData?.history as item}
<tr class="text-gray-200 odd:bg-secondary"> <tr class="text-gray-200 odd:bg-odd">
<td <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 border-b border-[#09090B]"
> >

View File

@ -321,7 +321,7 @@
<tbody> <tbody>
{#each senateTradingList as item} {#each senateTradingList as item}
<tr <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 <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 border-b border-b-[#09090B]"

View File

@ -878,7 +878,7 @@
on:click={() => handleViewData(item?.date)} on:click={() => handleViewData(item?.date)}
on:mouseover={() => on:mouseover={() =>
getDailyTransactions($etfTicker + "+" + item?.date)} 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 === 1 ===
optionList?.slice(0, 3)?.length && optionList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' data?.user?.tier !== 'Pro'
@ -1067,8 +1067,7 @@
<tbody> <tbody>
{#each data?.user?.tier === "Pro" ? optionChainList : optionChainList?.slice(0, 3) as item, index} {#each data?.user?.tier === "Pro" ? optionChainList : optionChainList?.slice(0, 3) as item, index}
<tr <tr
class="odd:bg-secondary border-b-[#09090B] {index + class="odd:bg-odd border-b-[#09090B] {index + 1 ===
1 ===
optionChainList?.slice(0, 3)?.length && optionChainList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'
@ -1251,7 +1250,7 @@
<tbody> <tbody>
{#each optionHistoryList as item} {#each optionHistoryList as item}
<!-- row --> <!-- 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"> <td class="text-white text-sm text-start whitespace-nowrap">
{formatTime(item?.time)} {formatTime(item?.time)}
</td> </td>

View File

@ -329,9 +329,7 @@ updateYearRange()
</thead> </thead>
<tbody class="shadow-md"> <tbody class="shadow-md">
{#each quantStats[$etfTicker?.toUpperCase()]["Worst 10 Drawdowns"] as item} {#each quantStats[$etfTicker?.toUpperCase()]["Worst 10 Drawdowns"] as item}
<tr <tr class="text-white border-y border-gray-800 odd:bg-odd">
class="text-white border-y border-gray-800 odd:bg-secondary"
>
<td <td
class="text-start text-sm sm:text-[1rem] text-white whitespace-nowrap" class="text-start text-sm sm:text-[1rem] text-white whitespace-nowrap"
> >
@ -432,9 +430,7 @@ updateYearRange()
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -476,9 +472,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -514,9 +508,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -536,9 +528,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -558,9 +548,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -598,9 +586,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -618,9 +604,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -640,9 +624,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -660,9 +642,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -680,9 +660,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -700,9 +678,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -722,9 +698,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -744,9 +718,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap" class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -784,9 +756,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -824,9 +794,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -864,9 +832,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -886,9 +852,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -906,9 +870,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -950,9 +912,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -994,9 +954,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1016,9 +974,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-white text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1036,9 +992,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap" class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1056,9 +1010,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1078,9 +1030,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1100,9 +1050,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1122,9 +1070,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1144,9 +1090,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1166,9 +1110,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1204,9 +1146,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1244,9 +1184,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1284,9 +1222,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-starttext-sm sm:text-[1rem] whitespace-nowrap" class="text-starttext-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1322,9 +1258,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1364,9 +1298,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1406,9 +1338,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1448,9 +1378,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1490,9 +1418,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1532,9 +1458,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1572,9 +1496,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1594,9 +1516,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1616,9 +1536,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1638,9 +1556,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1678,9 +1594,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1720,9 +1634,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1742,9 +1654,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1764,9 +1674,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -1786,9 +1694,7 @@ updateYearRange()
</td> </td>
</tr> </tr>
<tr <tr class="text-white odd:bg-odd border-b border-[#27272A]">
class="text-white odd:bg-secondary border-b border-[#27272A]"
>
<td <td
class="text-start text-sm sm:text-[1rem] whitespace-nowrap" class="text-start text-sm sm:text-[1rem] whitespace-nowrap"
> >

View File

@ -120,73 +120,72 @@
<!-- Add more Twitter meta tags as needed --> <!-- Add more Twitter meta tags as needed -->
</svelte:head> </svelte:head>
<section class="w-full overflow-hidden m-auto"> <section class="w-full overflow-hidden m-auto">
<Infobox
<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."} /> 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 --> <!-- Page wrapper -->
<div class="flex justify-center w-full m-auto h-full overflow-hidden"> <div class="flex justify-center w-full m-auto h-full overflow-hidden">
<!-- Content area --> <!-- Content area -->
<div class="w-full"> <div class="w-full">
<div class="w-full overflow-x-scroll"> <div class="w-full overflow-x-scroll">
<table <table
class="table rounded-none sm:rounded-md w-full border-bg-[#09090B] m-auto mt-4" class="table rounded-none sm:rounded-md w-full border-bg-[#09090B] m-auto mt-4"
> >
<thead> <thead>
<TableHeader {columns} {sortOrders} {sortData} /> <TableHeader {columns} {sortOrders} {sortData} />
</thead> </thead>
<tbody> <tbody>
{#each etfProviderList as item,index} {#each etfProviderList as item, index}
<!-- row --> <!-- row -->
<tr <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 === 1 ===
etfProviderList?.length && etfProviderList?.length && data?.user?.tier !== 'Pro'
data?.user?.tier !== 'Pro' ? 'opacity-[0.1]'
? 'opacity-[0.1]' : ''}"
: ''}"
>
<td
class="text-sm sm:text-[1rem] whitespace-nowrap font-medium border-b-[#09090B]"
> >
<a <td
href={"/etf/etf-providers/" + item?.etfProvider} class="text-sm sm:text-[1rem] whitespace-nowrap font-medium border-b-[#09090B]"
class="sm:hover:underline sm:hover:underline-offset-4 text-white"
> >
{formatETFName(item?.etfProvider)} <a
</a> href={"/etf/etf-providers/" + item?.etfProvider}
</td> class="sm:hover:underline sm:hover:underline-offset-4 text-white"
>
{formatETFName(item?.etfProvider)}
</a>
</td>
<td <td
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B] text-end" class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B] text-end"
> >
{abbreviateNumber(item?.totalAssets)} {abbreviateNumber(item?.totalAssets)}
</td> </td>
<td <td
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]" class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]"
> >
{item?.funds} {item?.funds}
</td> </td>
<td <td
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]" class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]"
> >
{item?.avgExpenseRatio}% {item?.avgExpenseRatio}%
</td> </td>
<td <td
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]" class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap text-end border-b-[#09090B]"
> >
{item?.avgHoldings} {item?.avgHoldings}
</td> </td>
</tr> </tr>
{/each} {/each}
</tbody> </tbody>
</table> </table>
</div>
<UpgradeToPro {data} />
</div> </div>
<UpgradeToPro {data} />
</div>
</div> </div>
</section> </section>

View File

@ -119,20 +119,18 @@
etfProviderData = [...originalData].sort(compareValues)?.slice(0, 50); etfProviderData = [...originalData].sort(compareValues)?.slice(0, 50);
}; };
function generateStatementInfoHTML() { function generateStatementInfoHTML() {
return ` return `
${etfProviderName} has ${rawData?.length} ETFs listed with a total of ${abbreviateNumber( ${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( in assets under management. The funds have an average expense ratio of ${avgExpenseRatio?.toFixed(
2, 2,
)}%. )}%.
`; `;
} }
let htmlOutput = generateStatementInfoHTML();
let htmlOutput = generateStatementInfoHTML();
</script> </script>
<svelte:head> <svelte:head>
@ -166,9 +164,9 @@ let htmlOutput = generateStatementInfoHTML();
<section class="w-full overflow-hidden m-auto"> <section class="w-full overflow-hidden m-auto">
{#if rawData?.length !== 0} {#if rawData?.length !== 0}
<div class="mb-5"> <div class="mb-5">
<Infobox text={htmlOutput} /> <Infobox text={htmlOutput} />
</div> </div>
{/if} {/if}
<div <div
@ -210,90 +208,88 @@ let htmlOutput = generateStatementInfoHTML();
<!-- Page wrapper --> <!-- Page wrapper -->
<div class="flex justify-center w-full m-auto h-full overflow-hidden"> <div class="flex justify-center w-full m-auto h-full overflow-hidden">
<!-- Content area --> <!-- Content area -->
<div class="w-full"> <div class="w-full">
<div class="w-full overflow-x-auto mt-5"> <div class="w-full overflow-x-auto mt-5">
<table <table
class="table table-sm table-compact rounded-none sm:rounded-md w-full bg-[#09090B] border-bg-[#09090B]" class="table table-sm table-compact rounded-none sm:rounded-md w-full bg-[#09090B] border-bg-[#09090B]"
> >
<thead> <thead>
<TableHeader {columns} {sortOrders} {sortData} /> <TableHeader {columns} {sortOrders} {sortData} />
</thead> </thead>
<tbody> <tbody>
{#each etfProviderData as item, index} {#each etfProviderData as item, index}
<!-- row --> <!-- row -->
<tr <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 === 1 ===
etfProviderData?.length && etfProviderData?.length && data?.user?.tier !== 'Pro'
data?.user?.tier !== 'Pro' ? 'opacity-[0.1]'
? 'opacity-[0.1]' : ''}"
: ''}"
>
<td
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
> >
<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 <td
class="text-gray-200 border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap" class="text-gray-200 border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap"
> >
{item?.name?.length > charNumber {item?.name?.length > charNumber
? item?.name?.slice(0, charNumber) + "..." ? item?.name?.slice(0, charNumber) + "..."
: item?.name} : item?.name}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b border-[#09090B] text-end" class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b border-[#09090B] text-end"
> >
{item?.price} {item?.price}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b border-[#09090B] text-end" class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b border-[#09090B] text-end"
> >
{#if item?.changesPercentage >= 0} {#if item?.changesPercentage >= 0}
<span class="text-[#00FC50]" <span class="text-[#00FC50]"
>+{item?.changesPercentage >= 1000 >+{item?.changesPercentage >= 1000
? abbreviateNumber(item?.changesPercentage) ? abbreviateNumber(item?.changesPercentage)
: item?.changesPercentage?.toFixed(2)}%</span : item?.changesPercentage?.toFixed(2)}%</span
> >
{:else if item?.changesPercentage < 0} {:else if item?.changesPercentage < 0}
<span class="text-[#FF2F1F]" <span class="text-[#FF2F1F]"
>{item?.changesPercentage <= -1000 >{item?.changesPercentage <= -1000
? abbreviateNumber(item?.changesPercentage) ? abbreviateNumber(item?.changesPercentage)
: item?.changesPercentage?.toFixed(2)}% : item?.changesPercentage?.toFixed(2)}%
</span> </span>
{:else} {:else}
- -
{/if} {/if}
</td> </td>
<td <td
class="text-white font-medium border-b-[#09090B] text-end text-sm sm:text-[1rem] whitespace-nowrap" class="text-white font-medium border-b-[#09090B] text-end text-sm sm:text-[1rem] whitespace-nowrap"
> >
{abbreviateNumber(item?.totalAssets)} {abbreviateNumber(item?.totalAssets)}
</td> </td>
<td <td
class="text-white font-medium text-end border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap" class="text-white font-medium text-end border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap"
> >
{item?.numberOfHoldings} {item?.numberOfHoldings}
</td> </td>
<td <td
class="text-white font-medium text-end border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap" class="text-white font-medium text-end border-b-[#09090B] text-sm sm:text-[1rem] whitespace-nowrap"
> >
{item?.expenseRatio}% {item?.expenseRatio}%
</td> </td>
</tr> </tr>
{/each} {/each}
</tbody> </tbody>
</table> </table>
</div>
<UpgradeToPro {data} />
</div> </div>
<UpgradeToPro {data} />
</div>
</div> </div>
{:else} {:else}
<div <div

View File

@ -157,7 +157,7 @@
<tbody> <tbody>
{#each etfData as item} {#each etfData as item}
<tr <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 <td
class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]" class="text-white text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"

View File

@ -141,7 +141,7 @@
{#each displayList as item, index} {#each displayList as item, index}
<tr <tr
on:click={() => goto(`/stocks/${item?.symbol}`)} 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 === 1 ===
displayList?.length && data?.user?.tier !== 'Pro' displayList?.length && data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'

View File

@ -104,7 +104,7 @@
{#each displayList as item} {#each displayList as item}
<!-- row --> <!-- row -->
<tr <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 <td
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]" class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"

View File

@ -103,7 +103,7 @@
{#each displayList as item} {#each displayList as item}
<!-- row --> <!-- row -->
<tr <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 <td
class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]" class="font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"

View File

@ -253,7 +253,7 @@
<tbody> <tbody>
{#each stockList as item, index} {#each stockList as item, index}
<tr <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 === 1 ===
stockList?.length && data?.user?.tier !== 'Pro' stockList?.length && data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'

View File

@ -87,7 +87,7 @@
<tbody> <tbody>
{#each ipoList as item} {#each ipoList as item}
<tr <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 <td
class="text-white text-sm sm:text-[1rem] text-start border-b-[#09090B] whitespace-nowrap" class="text-white text-sm sm:text-[1rem] text-start border-b-[#09090B] whitespace-nowrap"

View File

@ -80,12 +80,12 @@
<section class="w-full overflow-hidden m-auto"> <section class="w-full overflow-hidden m-auto">
{#if isLoaded} {#if isLoaded}
<div class="mt-3 mb-3"> <div class="mt-3 mb-3">
<Infobox text={`There have been ${totalIPOs} IPOs on the US stock market in ${year}.`} /> <Infobox
</div> 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="flex flex-col justify-center items-center">
<div class="mr-auto flex flex-col jusitfy-start items-start mb-5 mt-5"> <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"> <div class="text-white text-sm sm:text-[1rem] font-medium mr-2">
Select Time period Select Time period
@ -146,7 +146,7 @@
<tbody> <tbody>
{#each ipoList as item} {#each ipoList as item}
<tr <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 <td
class="text-white text-sm sm:text-[1rem] whitespace-nowrap text-start border-b-[#09090B] whitespace-nowrap" class="text-white text-sm sm:text-[1rem] whitespace-nowrap text-start border-b-[#09090B] whitespace-nowrap"

View File

@ -174,7 +174,7 @@
{#each displayList as item} {#each displayList as item}
<!-- row --> <!-- row -->
<tr <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 <td
class="text-white font-semibold sm:font-normal text-center text-sm sm:text-[1rem] border-b-[#09090B]" class="text-white font-semibold sm:font-normal text-center text-sm sm:text-[1rem] border-b-[#09090B]"

View File

@ -348,7 +348,7 @@
<tbody class="p-0"> <tbody class="p-0">
{#each tableData as item} {#each tableData as item}
<tr <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" <td class="hidden lg:table-cell"
><button ><button

View File

@ -165,7 +165,7 @@
<tbody> <tbody>
{#each displayList as item, index} {#each displayList as item, index}
<tr <tr
class="odd:bg-secondary border-b-[#09090B] {index + class="odd:bg-odd border-b-[#09090B] {index +
1 === 1 ===
rawData?.length && data?.user?.tier !== 'Pro' rawData?.length && data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'

View File

@ -468,7 +468,7 @@
{#each priceAlertList as item} {#each priceAlertList as item}
<!-- row --> <!-- row -->
<tr <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 <td
on:click={() => handleFilter(item?.id)} on:click={() => handleFilter(item?.id)}

View File

@ -1569,7 +1569,7 @@
ruleOfList = ruleOfList =
strategyList?.find((item) => item.id === selectedStrategy)?.rules ?? []; strategyList?.find((item) => item.id === selectedStrategy)?.rules ?? [];
ruleOfList.forEach((rule) => { ruleOfList.forEach((rule) => {
ruleCondition[rule.name] = ruleCondition[rule.name] =
rule.condition || allRules[rule.name].defaultCondition; rule.condition || allRules[rule.name].defaultCondition;
valueMappings[rule.name] = rule.value || allRules[rule.name].defaultValue; valueMappings[rule.name] = rule.value || allRules[rule.name].defaultValue;
@ -1596,11 +1596,19 @@
) // Only include specific rules ) // Only include specific rules
?.map((rule) => [rule.name, new Set(rule.value)]), // Create Map from filtered rules ?.map((rule) => [rule.name, new Set(rule.value)]), // Create Map from filtered rules
); );
} }
function changeRule(state: string) { 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"); goto("/pricing");
} else { } else {
selectedPopularStrategy = ""; selectedPopularStrategy = "";
@ -1624,7 +1632,7 @@
}; };
const loadWorker = async () => { const loadWorker = async () => {
if (['performance', 'analysts']?.includes(displayTableTab) || hoverStatus) { if (["performance", "analysts"]?.includes(displayTableTab) || hoverStatus) {
syncWorker.postMessage({ syncWorker.postMessage({
stockScreenerData, stockScreenerData,
ruleOfList: [...ruleOfList, ...otherTabRules], ruleOfList: [...ruleOfList, ...otherTabRules],
@ -1638,7 +1646,7 @@
}; };
const updateStockScreenerData = async () => { const updateStockScreenerData = async () => {
if (["performance","analysts"]?.includes(displayTableTab) || hoverStatus) { if (["performance", "analysts"]?.includes(displayTableTab) || hoverStatus) {
downloadWorker.postMessage({ downloadWorker.postMessage({
ruleOfList: [...ruleOfList, ...otherTabRules], ruleOfList: [...ruleOfList, ...otherTabRules],
}); });
@ -1823,7 +1831,7 @@ const handleKeyDown = (event) => {
strategyList.find((item) => item.id === selectedStrategy).rules = strategyList.find((item) => item.id === selectedStrategy).rules =
ruleOfList; ruleOfList;
const postData = { const postData = {
strategyId: selectedStrategy, strategyId: selectedStrategy,
rules: ruleOfList, rules: ruleOfList,
}; };
@ -1848,7 +1856,7 @@ const handleKeyDown = (event) => {
} }
$: { $: {
if (ruleOfList ) { if (ruleOfList) {
const ruleToUpdate = ruleOfList?.find((rule) => rule.name === ruleName); const ruleToUpdate = ruleOfList?.find((rule) => rule.name === ruleName);
if (ruleToUpdate) { if (ruleToUpdate) {
ruleToUpdate.value = valueMappings[ruleToUpdate.name]; ruleToUpdate.value = valueMappings[ruleToUpdate.name];
@ -2146,7 +2154,9 @@ const handleKeyDown = (event) => {
? sectorList ? sectorList
: ruleName === "industry" : ruleName === "industry"
? industryList ? industryList
: ['analystRating','topAnalystRating','score']?.includes(ruleName) : ["analystRating", "topAnalystRating", "score"]?.includes(
ruleName,
)
? ["Strong Buy", "Buy", "Hold", "Sell", "Strong Sell"] ? ["Strong Buy", "Buy", "Hold", "Sell", "Strong Sell"]
: ["Compliant", "Non-Compliant"]; : ["Compliant", "Non-Compliant"];
testList = testList =
@ -2300,8 +2310,9 @@ const handleKeyDown = (event) => {
columns = [...(baseColumnsMap[displayTableTab] || [])]; columns = [...(baseColumnsMap[displayTableTab] || [])];
sortOrders = { ...(baseSortOrdersMap[displayTableTab] || {}) }; sortOrders = { ...(baseSortOrdersMap[displayTableTab] || {}) };
const rulesList = const rulesList = ["performance", "analysts"]?.includes(displayTableTab)
["performance","analysts"]?.includes(displayTableTab) ? tabRuleList : displayRules; ? tabRuleList
: displayRules;
rulesList?.forEach((rule) => { rulesList?.forEach((rule) => {
if (rule.rule !== "marketCap") { if (rule.rule !== "marketCap") {
columns.push({ columns.push({
@ -2351,7 +2362,7 @@ const handleKeyDown = (event) => {
await updateStockScreenerData(); await updateStockScreenerData();
} }
} }
/* /*
async function handleMouseOver() { async function handleMouseOver() {
if (displayTableTab !== "performance") { if (displayTableTab !== "performance") {
hoverStatus = true; hoverStatus = true;
@ -2995,7 +3006,7 @@ const handleKeyDown = (event) => {
autocomplete="off" autocomplete="off"
class="{![ class="{![
'analystRating', 'analystRating',
"topAnalystRating", 'topAnalystRating',
'halalStocks', 'halalStocks',
'score', 'score',
'sector', 'sector',
@ -3011,7 +3022,7 @@ const handleKeyDown = (event) => {
</div> </div>
{/if} {/if}
<DropdownMenu.Group class="min-h-10 mt-2"> <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} {#each row?.step as newValue, index}
{#if ruleCondition[row?.rule] === "between"} {#if ruleCondition[row?.rule] === "between"}
{#if newValue && row?.step[index + 1]} {#if newValue && row?.step[index + 1]}
@ -3080,7 +3091,7 @@ const handleKeyDown = (event) => {
</DropdownMenu.Item> </DropdownMenu.Item>
{/each} {/each}
{:else} {: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"> <DropdownMenu.Item class="sm:hover:bg-primary">
<div <div
class="flex items-center" class="flex items-center"
@ -3170,7 +3181,6 @@ const handleKeyDown = (event) => {
</li> </li>
<li> <li>
<button <button
on:click={() => changeTab("performance")} 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 === class="text-[1rem] sm:text-lg block text-white rounded-md px-2 py-1 focus:outline-none sm:hover:bg-primary {displayTableTab ===
'performance' 'performance'
@ -3217,7 +3227,7 @@ const handleKeyDown = (event) => {
<tbody> <tbody>
{#each displayResults as item} {#each displayResults as item}
<tr <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"> <td class="border-b-[#09090B] whitespace-nowrap">
<a <a
@ -3294,8 +3304,7 @@ const handleKeyDown = (event) => {
<tbody> <tbody>
{#each displayResults as item (item?.symbol)} {#each displayResults as item (item?.symbol)}
<tr <tr
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-odd"
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-secondary"
> >
<td class="border-b-[#09090B] whitespace-nowrap"> <td class="border-b-[#09090B] whitespace-nowrap">
<a <a
@ -3345,8 +3354,7 @@ const handleKeyDown = (event) => {
<tbody> <tbody>
{#each displayResults as item (item?.symbol)} {#each displayResults as item (item?.symbol)}
<tr <tr
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-odd"
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-secondary"
> >
<td class="border-b-[#09090B] whitespace-nowrap"> <td class="border-b-[#09090B] whitespace-nowrap">
<a <a
@ -3391,7 +3399,7 @@ const handleKeyDown = (event) => {
</tbody> </tbody>
</table> </table>
</div> </div>
{:else if displayTableTab === "analysts"} {:else if displayTableTab === "analysts"}
<div class="w-full rounded-md overflow-x-scroll"> <div class="w-full rounded-md overflow-x-scroll">
<table <table
class="table table-sm table-compact w-full bg-[#09090B] border-bg-[#09090B]" class="table table-sm table-compact w-full bg-[#09090B] border-bg-[#09090B]"
@ -3402,8 +3410,7 @@ const handleKeyDown = (event) => {
<tbody> <tbody>
{#each displayResults as item (item?.symbol)} {#each displayResults as item (item?.symbol)}
<tr <tr
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-odd"
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#09090B] border-b-[#09090B] odd:bg-secondary"
> >
<td class="border-b-[#09090B] whitespace-nowrap"> <td class="border-b-[#09090B] whitespace-nowrap">
<a <a
@ -3426,38 +3433,31 @@ const handleKeyDown = (event) => {
> >
{#if row?.rule === "marketCap"} {#if row?.rule === "marketCap"}
{abbreviateNumber(item[row?.rule])} {abbreviateNumber(item[row?.rule])}
{:else if ["analystCounter", "priceTarget"]?.includes(row?.rule)}
{:else if ['analystCounter','priceTarget']?.includes(row?.rule)}
<span class="text-white" <span class="text-white"
>{abbreviateNumber( >{abbreviateNumber(item[row?.rule])}</span
item[row?.rule],
)}</span
> >
{:else if row?.rule === "upside"}
{:else if row?.rule === 'upside'} {#if item[row?.rule] > 0}
{#if item[row?.rule] > 0} <span class="text-[#00FC50]"
<span class="text-[#00FC50]" >+{item[row?.rule]?.toFixed(2)}%</span
>+{item[row?.rule]?.toFixed(2)}%</span >
> {:else if item[row?.rule] < 0}
{:else if item[row?.rule] < 0} <span class="text-[#FF2F1F]"
<span class="text-[#FF2F1F]" >{item[row?.rule]?.toFixed(2)}%</span
>{item[row?.rule]?.toFixed(2)}%</span >
> {:else}
{:else} <span class="text-[#fff]">n/a</span>
<span class="text-[#fff]" {/if}
>n/a</span {:else if ["analystRating", "topAnalystRating"]?.includes(row?.rule)}
>
{/if}
{:else if ['analystRating','topAnalystRating']?.includes(row?.rule)}
{#if ["Strong Buy", "Buy"].includes(item[row?.rule])} {#if ["Strong Buy", "Buy"].includes(item[row?.rule])}
<span class="text-[#00FC50]">{item[row?.rule]}</span> <span class="text-[#00FC50]">{item[row?.rule]}</span>
{:else if ["Strong Sell", "Sell"].includes(item[row?.rule])} {:else if ["Strong Sell", "Sell"].includes(item[row?.rule])}
<span class="text-[#FF2F1F]">{item[row?.rule]}</span> <span class="text-[#FF2F1F]">{item[row?.rule]}</span>
{:else if item[row?.rule] === "Hold"} {:else if item[row?.rule] === "Hold"}
<span class="text-[#FFA838]">{item[row?.rule]}</span> <span class="text-[#FFA838]">{item[row?.rule]}</span>
{:else} {:else}
- -
{/if} {/if}
{/if} {/if}
</td> </td>
@ -3629,7 +3629,7 @@ const handleKeyDown = (event) => {
<div <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" 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)}> <label id={row?.rule} on:click={() => changeRule(row?.rule)}>
<svg <svg
class="w-4 h-4 mb-1 inline-block text-[#A3A3A3] sm:hover:text-white cursor-pointer" class="w-4 h-4 mb-1 inline-block text-[#A3A3A3] sm:hover:text-white cursor-pointer"

View File

@ -1144,7 +1144,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]" 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
> >
<tr <tr
@ -1155,9 +1159,9 @@
> >
<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]" 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 stockDeck?.revenueTTM !== 0
? abbreviateNumber(stockDeck?.revenueTTM) ? abbreviateNumber(stockDeck?.revenueTTM, false, true)
: "n/a"}</td : "n/a"}</td
></tr ></tr
> >
@ -1169,8 +1173,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]" 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 >{@html stockDeck?.netIncomeTTM !== null
? abbreviateNumber(stockDeck?.netIncomeTTM) ? abbreviateNumber(stockDeck?.netIncomeTTM, false, true)
: "n/a"}</td : "n/a"}</td
></tr ></tr
> >
@ -1216,9 +1220,11 @@
</td> </td>
<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]" 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( ? abbreviateNumber(
data?.getStockQuote?.sharesOutstanding, data?.getStockQuote?.sharesOutstanding,
false,
true,
) )
: "n/a"}</td : "n/a"}</td
></tr ></tr
@ -1335,8 +1341,8 @@
</td> </td>
<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]" 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 >{@html stockDeck?.floatShares !== null
? abbreviateNumber(stockDeck?.floatShares) ? abbreviateNumber(stockDeck?.floatShares, false, true)
: "n/a"}</td : "n/a"}</td
></tr ></tr
> >

View File

@ -42,33 +42,33 @@
{#if similarStocks?.length > 0} {#if similarStocks?.length > 0}
<div <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> <h3 class="p-2 pt-4 text-xl font-semibold">Related Stocks</h3>
<table class="table table-sm table-compact w-full text-white"> <table class="table table-sm table-compact w-full text-white">
<thead class="text-white" <thead class="text-white"
><tr ><tr
><th ><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 >Company</th
> >
<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 >Dividend Yield</th
></tr ></tr
></thead ></thead
> >
<tbody> <tbody>
{#each similarStocks?.slice(0, 8) as item} {#each similarStocks?.slice(0, 8) as item}
<tr class="border-gray-600 border-b" <tr class="border-gray-600 border-b text-[1rem]"
><td class="text-left" ><td class="text-left text-[1rem]"
><a ><a
href={`/stocks/${item?.symbol}`} href={`/stocks/${item?.symbol}`}
class="sm:hover:text-white text-blue-400" class="sm:hover:text-white text-blue-400"
>{item?.symbol}</a >{item?.symbol}</a
></td ></td
> >
<td class="text-right cursor-normal" <td class="text-right cursor-normal text-[1rem]"
>{item?.dividendYield !== null && >{item?.dividendYield !== null &&
item?.dividendYield !== undefined item?.dividendYield !== undefined
? item?.dividendYield + "%" ? item?.dividendYield + "%"

View File

@ -120,56 +120,62 @@
isLoaded = true; isLoaded = true;
}); });
function generateDividendInfoHTML() { function generateDividendInfoHTML() {
const history = rawData?.history || []; const history = rawData?.history || [];
if (history.length !== 0) { if (history.length !== 0) {
if (!dateDistance) { if (!dateDistance) {
const formattedExDividendDate = new Date(exDividendDate).toLocaleString('en-US', { const formattedExDividendDate = new Date(exDividendDate).toLocaleString(
month: 'short', "en-US",
day: 'numeric', {
year: 'numeric' month: "short",
}); day: "numeric",
year: "numeric",
},
);
const payoutFrequencyText = const payoutFrequencyText =
payoutFrequency === 4 payoutFrequency === 4
? '3 months' ? "3 months"
: payoutFrequency === 2 : payoutFrequency === 2
? '6 months' ? "6 months"
: payoutFrequency === 1 : payoutFrequency === 1
? '12 months' ? "12 months"
: 'n/a'; : "n/a";
return ` return `
<span> <span>
${$displayCompanyName} has an annual dividend of $${annualDividend} per share, with a forward yield of ${dividendYield}%. ${$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}. The dividend is paid every ${payoutFrequencyText} and the last ex-dividend date was ${formattedExDividendDate}.
</span> </span>
`; `;
} else { } else {
const latestDividendDate = new Date(history.at(0)?.date).toLocaleString('en-US', { const latestDividendDate = new Date(history.at(0)?.date).toLocaleString(
month: 'short', "en-US",
day: 'numeric', {
year: 'numeric' month: "short",
}); day: "numeric",
year: "numeric",
},
);
return ` return `
<span> <span>
${$displayCompanyName} issued its most recent dividend on ${latestDividendDate}. ${$displayCompanyName} issued its most recent dividend on ${latestDividendDate}.
Since then, the company has not distributed any further dividends for over 12 months. Since then, the company has not distributed any further dividends for over 12 months.
</span> </span>
`; `;
} }
} else { } else {
return ` return `
<span> <span>
No dividend history available for ${$displayCompanyName}. No dividend history available for ${$displayCompanyName}.
</span> </span>
`; `;
}
} }
}
const htmlOutput = generateDividendInfoHTML(); const htmlOutput = generateDividendInfoHTML();
</script> </script>
<svelte:head> <svelte:head>
@ -221,7 +227,7 @@ const htmlOutput = generateDividendInfoHTML();
Dividends Dividends
</h1> </h1>
<Infobox text={htmlOutput} /> <Infobox text={htmlOutput} />
</div> </div>
{#if rawData?.history?.length !== 0} {#if rawData?.history?.length !== 0}
@ -334,40 +340,42 @@ const htmlOutput = generateDividendInfoHTML();
</div> </div>
<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 <table
class="table table-sm table-compact flex justify-start items-center w-full m-auto" class="table table-sm table-compact flex justify-start items-center w-full m-auto"
> >
<thead> <thead>
<tr class="bg-[#09090B] border-b-slate-600 shadow-md"> <tr class="bg-[#09090B] border-b border-gray-800">
<th <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 Ex-Divid. Date
</th> </th>
<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 Cash Amount
</th> </th>
<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 Record Date
</th> </th>
<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 Pay Date
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody class="shadow-md"> <tbody class="">
{#each rawData?.history as item} {#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 <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", { {new Date(item?.date)?.toLocaleString("en-US", {
month: "short", month: "short",
@ -377,12 +385,12 @@ const htmlOutput = generateDividendInfoHTML();
})} })}
</td> </td>
<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)} {item?.adjDividend?.toFixed(3)}
</td> </td>
<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 {item?.recordDate?.length !== 0
? new Date(item?.recordDate)?.toLocaleString( ? new Date(item?.recordDate)?.toLocaleString(
@ -397,7 +405,7 @@ const htmlOutput = generateDividendInfoHTML();
: "n/a"} : "n/a"}
</td> </td>
<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 {item?.paymentDate?.length !== 0
? new Date(item?.paymentDate)?.toLocaleString( ? new Date(item?.paymentDate)?.toLocaleString(

View File

@ -391,34 +391,33 @@
} }
function generateStatementInfoHTML() { function generateStatementInfoHTML() {
if ($coolMode) { if ($coolMode) {
const statementText = statementConfig?.find( const statementText = statementConfig?.find(
(item) => item?.propertyName === displayStatement (item) => item?.propertyName === displayStatement,
)?.text; )?.text;
return `<span>${statementText || ''}</span>`; return `<span>${statementText || ""}</span>`;
} else if (income?.length > 0) { } else if (income?.length > 0) {
return ` return `
<span> <span>
Get detailed income statement breakdowns, uncovering revenue, expenses, and much more. Get detailed income statement breakdowns, uncovering revenue, expenses, and much more.
</span> </span>
`; `;
} else { } else {
return ` return `
<span> <span>
No financial data available for ${$displayCompanyName}. No financial data available for ${$displayCompanyName}.
</span> </span>
`; `;
}
} }
}
let htmlOutput = null;
$: {
if($coolMode || displayStatement) {
htmlOutput = generateStatementInfoHTML()
let htmlOutput = null;
$: {
if ($coolMode || displayStatement) {
htmlOutput = generateStatementInfoHTML();
}
} }
}
</script> </script>
<svelte:head> <svelte:head>
@ -559,9 +558,7 @@ $: {
{/if} {/if}
</label> </label>
<div <div class="flex flex-row items-center w-fit sm:ml-auto">
class="flex flex-row items-center w-fit sm:ml-auto"
>
<div class="relative inline-block text-left grow"> <div class="relative inline-block text-left grow">
<DropdownMenu.Root> <DropdownMenu.Root>
<DropdownMenu.Trigger asChild let:builder> <DropdownMenu.Trigger asChild let:builder>
@ -690,10 +687,10 @@ $: {
<div class="w-full overflow-x-scroll"> <div class="w-full overflow-x-scroll">
<table <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> <thead>
<tr class="border border-gray-600"> <tr class="border-b border-gray-800">
<th <th
class="text-white font-semibold text-start text-sm sm:text-[1rem]" class="text-white font-semibold text-start text-sm sm:text-[1rem]"
>{filterRule === "annual" >{filterRule === "annual"
@ -719,38 +716,40 @@ $: {
<tbody> <tbody>
{#each tableList as item, index} {#each tableList as item, index}
<!-- row --> <!-- row -->
<tr <tr class="odd:bg-odd border-b border-gray-800">
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] shake-ticker cursor-pointer"
>
<td <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} {item?.date}
</td> </td>
<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>
<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( ? abbreviateNumber(
( (
item?.value - tableList[index + 1]?.value item?.value - tableList[index + 1]?.value
)?.toFixed(2), )?.toFixed(2),
false,
true,
) )
: "-"} : "n/a"}
</td> </td>
<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} {#if index + 1 - tableList?.length === 0}
- n/a
{:else if item?.value === 0 && tableList[index + 1]?.value < 0} {:else if item?.value === 0 && tableList[index + 1]?.value < 0}
<span class="text-[#FF2F1F]">-100.00%</span> <span class="text-[#FF2F1F]">-100.00%</span>
{:else if item?.value === 0 && tableList[index + 1]?.value > 0} {:else if item?.value === 0 && tableList[index + 1]?.value > 0}
@ -775,7 +774,7 @@ $: {
)?.toFixed(2)}% )?.toFixed(2)}%
</span> </span>
{:else} {:else}
- n/a
{/if} {/if}
</td> </td>
</tr> </tr>

View File

@ -446,35 +446,33 @@
} }
function generateStatementInfoHTML() { function generateStatementInfoHTML() {
if ($coolMode) { if ($coolMode) {
const statementText = statementConfig?.find( const statementText = statementConfig?.find(
(item) => item?.propertyName === displayStatement (item) => item?.propertyName === displayStatement,
)?.text; )?.text;
return `<span>${statementText || ''}</span>`; return `<span>${statementText || ""}</span>`;
} else if (balanceSheet?.length > 0) { } else if (balanceSheet?.length > 0) {
return ` return `
<span> <span>
Get detailed breakdowns of the balance-sheet with total debts, total investments, and much more. Get detailed breakdowns of the balance-sheet with total debts, total investments, and much more.
</span> </span>
`; `;
} else { } else {
return ` return `
<span> <span>
No financial data available for ${$displayCompanyName}. No financial data available for ${$displayCompanyName}.
</span> </span>
`; `;
}
} }
}
let htmlOutput = null;
$: {
if($coolMode || displayStatement) {
htmlOutput = generateStatementInfoHTML()
let htmlOutput = null;
$: {
if ($coolMode || displayStatement) {
htmlOutput = generateStatementInfoHTML();
}
} }
}
</script> </script>
<svelte:head> <svelte:head>
@ -619,9 +617,7 @@ $: {
{/if} {/if}
</label> </label>
<div <div class="flex flex-row items-center w-fit sm:ml-auto">
class="flex flex-row items-center w-fit sm:ml-auto"
>
<div class="relative inline-block text-left grow"> <div class="relative inline-block text-left grow">
<DropdownMenu.Root> <DropdownMenu.Root>
<DropdownMenu.Trigger asChild let:builder> <DropdownMenu.Trigger asChild let:builder>
@ -779,24 +775,28 @@ $: {
<div class="w-full overflow-x-scroll"> <div class="w-full overflow-x-scroll">
<table <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> <thead>
<tr class="border border-gray-600"> <tr class="border-b border-gray-800">
<th class="text-white font-semibold text-start text-sm" <th
class="text-white font-semibold text-start text-sm sm:text-[1rem]"
>{filterRule === "annual" >{filterRule === "annual"
? "Fiscal Year End" ? "Fiscal Year End"
: "Quarter Ends"}</th : "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( >{statementConfig?.find(
(item) => item?.propertyName === displayStatement, (item) => item?.propertyName === displayStatement,
)?.label}</th )?.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 >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 >Growth</th
> >
</tr> </tr>
@ -804,38 +804,39 @@ $: {
<tbody> <tbody>
{#each tableList as item, index} {#each tableList as item, index}
<!-- row --> <!-- row -->
<tr <tr class="odd:bg-odd border-b border-gray-800">
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] shake-ticker cursor-pointer"
>
<td <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} {item?.date}
</td> </td>
<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>
<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( ? abbreviateNumber(
( (
item?.value - tableList[index + 1]?.value item?.value - tableList[index + 1]?.value
)?.toFixed(2), )?.toFixed(2),
false,
true,
) )
: "-"} : "n/a"}
</td> </td>
<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} {#if index + 1 - tableList?.length === 0}
- n/a
{:else if item?.value === 0 && tableList[index + 1]?.value < 0} {:else if item?.value === 0 && tableList[index + 1]?.value < 0}
<span class="text-[#FF2F1F]">-100.00%</span> <span class="text-[#FF2F1F]">-100.00%</span>
{:else if item?.value === 0 && tableList[index + 1]?.value > 0} {:else if item?.value === 0 && tableList[index + 1]?.value > 0}
@ -859,7 +860,7 @@ $: {
)?.toFixed(2)}% )?.toFixed(2)}%
</span> </span>
{:else} {:else}
- n/a
{/if} {/if}
</td> </td>
</tr> </tr>

View File

@ -391,36 +391,34 @@
} }
} }
function generateStatementInfoHTML() { function generateStatementInfoHTML() {
if ($coolMode) { if ($coolMode) {
const statementText = statementConfig?.find( const statementText = statementConfig?.find(
(item) => item?.propertyName === displayStatement (item) => item?.propertyName === displayStatement,
)?.text; )?.text;
return `<span>${statementText || ''}</span>`; return `<span>${statementText || ""}</span>`;
} else if (cashFlow?.length > 0) { } else if (cashFlow?.length > 0) {
return ` return `
<span> <span>
Get detailed ratio statement breakdowns, uncovering price to free cash flow ratio, price per earnings, and much more. Get detailed ratio statement breakdowns, uncovering price to free cash flow ratio, price per earnings, and much more.
</span> </span>
`; `;
} else { } else {
return ` return `
<span> <span>
No financial data available for ${$displayCompanyName}. No financial data available for ${$displayCompanyName}.
</span> </span>
`; `;
}
} }
}
let htmlOutput = null;
$: {
if($coolMode || displayStatement) {
htmlOutput = generateStatementInfoHTML()
let htmlOutput = null;
$: {
if ($coolMode || displayStatement) {
htmlOutput = generateStatementInfoHTML();
}
} }
}
</script> </script>
<svelte:head> <svelte:head>
@ -482,7 +480,7 @@ $: {
</div> </div>
<div class="grid grid-cols-1 gap-2 w-full"> <div class="grid grid-cols-1 gap-2 w-full">
<Infobox text={htmlOutput} /> <Infobox text={htmlOutput} />
{#if cashFlow?.length > 0} {#if cashFlow?.length > 0}
<div <div
class="inline-flex justify-center w-full rounded-md sm:w-auto sm:ml-auto mt-3 mb-6" class="inline-flex justify-center w-full rounded-md sm:w-auto sm:ml-auto mt-3 mb-6"
@ -563,9 +561,7 @@ $: {
{/if} {/if}
</label> </label>
<div <div class="flex flex-row items-center w-fit sm:ml-auto">
class="flex flex-row items-center w-fit sm:ml-auto"
>
<div class="relative inline-block text-left grow"> <div class="relative inline-block text-left grow">
<DropdownMenu.Root> <DropdownMenu.Root>
<DropdownMenu.Trigger asChild let:builder> <DropdownMenu.Trigger asChild let:builder>
@ -708,10 +704,10 @@ $: {
<div class="w-full overflow-x-scroll"> <div class="w-full overflow-x-scroll">
<table <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> <thead>
<tr class="border border-gray-600"> <tr class="border-b border-gray-800">
<th <th
class="text-white font-semibold text-start text-sm sm:text-[1rem]" class="text-white font-semibold text-start text-sm sm:text-[1rem]"
>{filterRule === "annual" >{filterRule === "annual"
@ -737,38 +733,39 @@ $: {
<tbody> <tbody>
{#each tableList as item, index} {#each tableList as item, index}
<!-- row --> <!-- row -->
<tr <tr class="odd:bg-odd border-b border-gray-800">
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] shake-ticker cursor-pointer"
>
<td <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} {item?.date}
</td> </td>
<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>
<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( ? abbreviateNumber(
( (
item?.value - tableList[index + 1]?.value item?.value - tableList[index + 1]?.value
)?.toFixed(2), )?.toFixed(2),
false,
true,
) )
: "-"} : "n/a"}
</td> </td>
<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} {#if index + 1 - tableList?.length === 0}
- n/a
{:else if item?.value === 0 && tableList[index + 1]?.value < 0} {:else if item?.value === 0 && tableList[index + 1]?.value < 0}
<span class="text-[#FF2F1F]">-100.00%</span> <span class="text-[#FF2F1F]">-100.00%</span>
{:else if item?.value === 0 && tableList[index + 1]?.value > 0} {:else if item?.value === 0 && tableList[index + 1]?.value > 0}
@ -792,7 +789,7 @@ $: {
)?.toFixed(2)}% )?.toFixed(2)}%
</span> </span>
{:else} {:else}
- n/a
{/if} {/if}
</td> </td>
</tr> </tr>

View File

@ -17,6 +17,7 @@
import { GridComponent, TooltipComponent } from "echarts/components"; import { GridComponent, TooltipComponent } from "echarts/components";
import { CanvasRenderer } from "echarts/renderers"; import { CanvasRenderer } from "echarts/renderers";
import Infobox from "$lib/components/Infobox.svelte"; import Infobox from "$lib/components/Infobox.svelte";
import FinancialTable from "$lib/components/FinancialTable.svelte";
use([LineChart, BarChart, GridComponent, TooltipComponent, CanvasRenderer]); use([LineChart, BarChart, GridComponent, TooltipComponent, CanvasRenderer]);
@ -134,6 +135,11 @@
}, },
]; ];
const fields = statementConfig.map((item) => ({
label: item.label,
key: item.propertyName,
}));
function toggleMode() { function toggleMode() {
$coolMode = !$coolMode; $coolMode = !$coolMode;
} }
@ -349,36 +355,34 @@
} }
} }
function generateStatementInfoHTML() { function generateStatementInfoHTML() {
if ($coolMode) { if ($coolMode) {
const statementText = statementConfig?.find( const statementText = statementConfig?.find(
(item) => item?.propertyName === displayStatement (item) => item?.propertyName === displayStatement,
)?.text; )?.text;
return `<span>${statementText || ''}</span>`; return `<span>${statementText || ""}</span>`;
} else if (ratios?.length > 0) { } else if (ratios?.length > 0) {
return ` return `
<span> <span>
Discover comprehensive ratio statement breakdowns that reveal insights into revenue, expenses, and beyond. Discover comprehensive ratio statement breakdowns that reveal insights into revenue, expenses, and beyond.
</span> </span>
`; `;
} else { } else {
return ` return `
<span> <span>
No financial data available for ${$displayCompanyName}. No financial data available for ${$displayCompanyName}.
</span> </span>
`; `;
}
} }
}
let htmlOutput = null;
$: {
if($coolMode || displayStatement) {
htmlOutput = generateStatementInfoHTML()
let htmlOutput = null;
$: {
if ($coolMode || displayStatement) {
htmlOutput = generateStatementInfoHTML();
}
} }
}
</script> </script>
<svelte:head> <svelte:head>
@ -441,7 +445,7 @@ $: {
</div> </div>
<div class="grid grid-cols-1 gap-2"> <div class="grid grid-cols-1 gap-2">
<Infobox text={htmlOutput} /> <Infobox text={htmlOutput} />
{#if ratios?.length > 0} {#if ratios?.length > 0}
<div <div
class="inline-flex justify-center w-full rounded-md sm:w-auto sm:ml-auto mt-3 mb-6" class="inline-flex justify-center w-full rounded-md sm:w-auto sm:ml-auto mt-3 mb-6"
@ -522,9 +526,7 @@ $: {
{/if} {/if}
</label> </label>
<div <div class="flex flex-row items-center w-fit sm:ml-auto">
class="flex flex-row items-center w-fit sm:ml-auto"
>
<div class="relative inline-block text-left grow"> <div class="relative inline-block text-left grow">
<DropdownMenu.Root> <DropdownMenu.Root>
<DropdownMenu.Trigger asChild let:builder> <DropdownMenu.Trigger asChild let:builder>
@ -653,10 +655,10 @@ $: {
<div class="w-full overflow-x-scroll"> <div class="w-full overflow-x-scroll">
<table <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> <thead>
<tr class="border border-gray-600"> <tr class="border-b border-gray-800">
<th <th
class="text-white font-semibold text-start text-sm sm:text-[1rem]" class="text-white font-semibold text-start text-sm sm:text-[1rem]"
>{filterRule === "annual" >{filterRule === "annual"
@ -682,38 +684,39 @@ $: {
<tbody> <tbody>
{#each tableList as item, index} {#each tableList as item, index}
<!-- row --> <!-- row -->
<tr <tr class="odd:bg-odd border-b border-gray-800">
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-secondary border-b-[#09090B] shake-ticker cursor-pointer"
>
<td <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} {item?.date}
</td> </td>
<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>
<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( ? abbreviateNumber(
( (
item?.value - tableList[index + 1]?.value item?.value - tableList[index + 1]?.value
)?.toFixed(2), )?.toFixed(2),
false,
true,
) )
: "-"} : "n/a"}
</td> </td>
<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} {#if index + 1 - tableList?.length === 0}
- n/a
{:else if item?.value === 0 && tableList[index + 1]?.value < 0} {:else if item?.value === 0 && tableList[index + 1]?.value < 0}
<span class="text-[#FF2F1F]">-100.00%</span> <span class="text-[#FF2F1F]">-100.00%</span>
{:else if item?.value === 0 && tableList[index + 1]?.value > 0} {:else if item?.value === 0 && tableList[index + 1]?.value > 0}
@ -737,7 +740,7 @@ $: {
)?.toFixed(2)}% )?.toFixed(2)}%
</span> </span>
{:else} {:else}
- n/a
{/if} {/if}
</td> </td>
</tr> </tr>
@ -775,246 +778,7 @@ $: {
</thead> </thead>
<tbody> <tbody>
<!-- row --> <!-- row -->
<tr class="text-white odd:bg-secondary whitespace-nowrap"> <FinancialTable data={ratios} {fields} />
<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>
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@ -96,7 +96,7 @@
}) })
?.slice(0, 30); //Consider only the last 30 ratings in the last 12 months ?.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 const priceTargets = recentData
?.map((item) => parseFloat(item.adjusted_pt_current)) ?.map((item) => parseFloat(item.adjusted_pt_current))
?.filter((pt) => !isNaN(pt)); ?.filter((pt) => !isNaN(pt));
@ -106,7 +106,7 @@
] ]
: "n/a"; : "n/a";
numOfAnalyst = filteredAnalystCount === 0 ? 'n/a' : filteredAnalystCount; numOfAnalyst = filteredAnalystCount === 0 ? "n/a" : filteredAnalystCount;
priceTarget = medianPriceTarget; priceTarget = medianPriceTarget;
changesPercentage = changesPercentage =
medianPriceTarget !== "-" && data?.getStockQuote?.price != null medianPriceTarget !== "-" && data?.getStockQuote?.price != null
@ -141,8 +141,9 @@
? "Hold" ? "Hold"
: averageRatingScore >= 1.5 : averageRatingScore >= 1.5
? "Sell" ? "Sell"
: averageRatingScore >= 1 : averageRatingScore >= 1
? "Strong Sell" : 'n/a'; ? "Strong Sell"
: "n/a";
rawData = recentData; rawData = recentData;
historyList = rawData.slice(0, 50); historyList = rawData.slice(0, 50);
@ -423,7 +424,7 @@
<tr <tr
class="{latestInfoDate(item?.date) class="{latestInfoDate(item?.date)
? 'bg-[#F9AB00] bg-opacity-[0.1]' ? '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 && historyList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'

View File

@ -118,22 +118,10 @@
}); });
const transactionStyles = { const transactionStyles = {
Bought: { Bought: "P - Purchase",
text: "Bought", Grant: "G - Grant",
class: "text-[#00FC50]", Sold: "S - Sale",
border: "border-[#00FC50]", Exercise: "E - Exercise",
},
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]",
},
"n/a": { text: "n/a", class: "text-gray-300" }, "n/a": { text: "n/a", class: "text-gray-300" },
}; };
@ -143,6 +131,7 @@
{ key: "securitiesTransacted", label: "Shares", align: "right" }, { key: "securitiesTransacted", label: "Shares", align: "right" },
{ key: "price", label: "Price", align: "right" }, { key: "price", label: "Price", align: "right" },
{ key: "value", label: "Value", align: "right" }, { key: "value", label: "Value", align: "right" },
{ key: "transactionType", label: "Trade Type", align: "right" },
]; ];
let sortOrders = { let sortOrders = {
@ -151,6 +140,7 @@
securitiesTransacted: { order: "none", type: "number" }, securitiesTransacted: { order: "none", type: "number" },
price: { order: "none", type: "number" }, price: { order: "none", type: "number" },
value: { order: "none", type: "number" }, value: { order: "none", type: "number" },
transactionType: { order: "none", type: "string" },
}; };
const sortData = (key) => { const sortData = (key) => {
@ -393,7 +383,7 @@
class="w-full mt-5 mb-10 m-auto flex justify-center items-center p-1" class="w-full mt-5 mb-10 m-auto flex justify-center items-center p-1"
> >
<div <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--> <!--Start Put/Call-->
<div <div
@ -599,14 +589,15 @@
{#each insiderTradingList as item, index} {#each insiderTradingList as item, index}
{#if item?.price > 0} {#if item?.price > 0}
<tr <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 && insiderTradingList?.slice(0, 6)?.length &&
data?.user?.tier !== 'Pro' data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
<td <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"> <div class="flex flex-col">
<span class="" <span class=""
@ -615,14 +606,14 @@
"", "",
)}</span )}</span
> >
<span class="text-sm text-white/80" <span class="text-sm text-white"
>{extractOfficeInfo(item?.typeOfOwner)}</span >{extractOfficeInfo(item?.typeOfOwner)}</span
> >
</div> </div>
</td> </td>
<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( {new Date(item?.transactionDate)?.toLocaleString(
"en-US", "en-US",
@ -636,38 +627,32 @@
</td> </td>
<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>
<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>
<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"> {@html abbreviateNumber(item?.value, false, true)}
{#if transactionStyles[item?.transactionType]} </td>
<div <td class="text-end flex justify-end whitespace-nowrap">
class={transactionStyles[item?.transactionType] <div
?.class} class="w-auto px-4 py-1 rounded-full uppercase {item?.transactionType ===
> 'Bought'
{abbreviateNumber(item?.value)} ? 'bg-[#75D377] text-black'
</div> : 'bg-[#cd4050] text-white'} font-semibold"
<div >
class="{transactionStyles[item?.transactionType] {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}
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -161,7 +161,7 @@
class="w-full mt-5 mb-10 m-auto flex justify-center items-center" class="w-full mt-5 mb-10 m-auto flex justify-center items-center"
> >
<div <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--> <!--Start Buy/Sell-->
<div <div
@ -321,10 +321,10 @@
<tbody> <tbody>
{#each senateTradingList as item} {#each senateTradingList as item}
<tr <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 <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 class="flex flex-row items-center">
<div <div
@ -357,7 +357,7 @@
</td> </td>
<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( {new Date(item?.transactionDate)?.toLocaleString(
"en-US", "en-US",
@ -371,12 +371,12 @@
</td> </td>
<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} {item?.amount}
</td> </td>
<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"} {#if item?.type === "Bought"}
<span class="text-[#00FC50]">Bought</span> <span class="text-[#00FC50]">Bought</span>

View File

@ -575,7 +575,7 @@
<div <div
class="w-full relative flex justify-center items-center overflow-hidden" 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 mb-10">
<div <div
class="w-full m-auto sm:pb-6 {data?.getOptionsNetFlow?.length === 0 class="w-full m-auto sm:pb-6 {data?.getOptionsNetFlow?.length === 0
@ -587,18 +587,17 @@
{/await} {/await}
</div> </div>
{#if optionsPlotData?.length !== 0} {#if optionsPlotData?.length !== 0}
<Infobox text={`1 Year of options activity involving ${$displayCompanyName} by major <Infobox
institutional traders and hedge funds.`} /> 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 {:else}
be actively betting on ${$displayCompanyName}.`} /> <Infobox
text={`There's no data available, indicating that major traders may not
{/if} be actively betting on ${$displayCompanyName}.`}
/>
{/if}
</div> </div>
{#if optionsPlotData?.length !== 0} {#if optionsPlotData?.length !== 0}
@ -770,13 +769,10 @@
</div> </div>
{/if} {/if}
{#if optionList?.length !== 0} {#if optionList?.length !== 0}
<h3 class="text-2xl text-gray-200 font-bold mb-4 text-start">
<h3 class="text-2xl text-gray-200 font-bold mb-4 text-start"> {activeIdx === 0 ? "Historical Option Data" : "Option Chain Data"}
{activeIdx === 0 ? "Historical Option Data" : "Option Chain Data"} </h3>
</h3>
<div <div
class="bg-secondary w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-6 mb-6" 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:click={() => handleViewData(item?.date)}
on:mouseover={() => on:mouseover={() =>
getDailyTransactions($stockTicker + "+" + item?.date)} 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 === 1 ===
optionList?.slice(0, 3)?.length && optionList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' data?.user?.tier !== 'Pro'
@ -1061,8 +1057,7 @@
<tbody> <tbody>
{#each data?.user?.tier === "Pro" ? optionChainList : optionChainList?.slice(0, 3) as item, index} {#each data?.user?.tier === "Pro" ? optionChainList : optionChainList?.slice(0, 3) as item, index}
<tr <tr
class="odd:bg-secondary border-b-[#09090B] {index + class="odd:bg-odd border-b-[#09090B] {index + 1 ===
1 ===
optionChainList?.slice(0, 3)?.length && optionChainList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' data?.user?.tier !== 'Pro'
? 'opacity-[0.1]' ? 'opacity-[0.1]'
@ -1118,7 +1113,6 @@
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} />
{/if} {/if}
{/if} {/if}
</div> </div>
@ -1229,7 +1223,7 @@
<tbody> <tbody>
{#each optionHistoryList as item} {#each optionHistoryList as item}
<!-- row --> <!-- 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"> <td class="text-white text-sm text-start whitespace-nowrap">
{formatTime(item?.time)} {formatTime(item?.time)}
</td> </td>

View File

@ -693,7 +693,11 @@
<td <td
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap border-b border-gray-800" 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>
<td <td

View File

@ -290,7 +290,7 @@
<tbody> <tbody>
{#each optionsWatchlist as item, index} {#each optionsWatchlist as item, index}
<!-- row --> <!-- row -->
<tr class="odd:bg-secondary border-b-[#09090B]"> <tr class="odd:bg-odd border-b-[#09090B]">
<td <td
class="text-white text-sm text-start whitespace-nowrap" class="text-white text-sm text-start whitespace-nowrap"
> >

View File

@ -1501,7 +1501,7 @@
<tbody class="p-0"> <tbody class="p-0">
{#each watchList as item} {#each watchList as item}
<tr <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 <td
on:click={() => handleFilter(item?.symbol)} on:click={() => handleFilter(item?.symbol)}