chore: format files with Prettier 3

This commit is contained in:
Eric Liu 2024-11-11 21:27:04 -08:00
commit 8e996dc683
391 changed files with 3725 additions and 3785 deletions

View file

@ -73,15 +73,15 @@
</script>
<DataTable
headers="{headers}"
rows="{rows}"
{headers}
{rows}
style=""
sortKey="name"
sortDirection="descending"
class="class"
/>
<DataTable headers="{headers}" rows="{rows}">
<DataTable {headers} {rows}>
<span slot="cell-header" let:header>
{#if header.key === "port"}
{header.value}
@ -105,24 +105,24 @@
<DataTable
title="Load balancers"
description="Your organization's active load balancers."
headers="{headers}"
rows="{rows}"
{headers}
{rows}
useStaticWidth
/>
<DataTable
title="Load balancers"
description="Your organization's active load balancers."
headers="{headers}"
rows="{rows}"
{headers}
{rows}
>
<Toolbar>
<ToolbarContent>
<ToolbarSearch
bind:filteredRowIds="{filteredRowIds}"
shouldFilterRows="{(row, value) => {
bind:filteredRowIds
shouldFilterRows={(row, value) => {
return row.name.includes(value);
}}"
}}
/>
<ToolbarMenu>
<ToolbarMenuItem primaryFocus>Restart all</ToolbarMenuItem>
@ -140,8 +140,8 @@
size="short"
title="Load balancers"
description="Your organization's active load balancers."
headers="{headers}"
rows="{rows}"
{headers}
{rows}
>
<Toolbar size="sm">
<ToolbarContent>
@ -158,90 +158,85 @@
</Toolbar>
</DataTable>
<DataTable zebra headers="{headers}" rows="{rows}" />
<DataTable zebra {headers} {rows} />
<DataTable size="tall" headers="{headers}" rows="{rows}" />
<DataTable size="tall" {headers} {rows} />
<DataTable size="short" headers="{headers}" rows="{rows}" />
<DataTable size="short" {headers} {rows} />
<DataTable size="compact" headers="{headers}" rows="{rows}" />
<DataTable size="compact" {headers} {rows} />
<DataTable sortable headers="{headers}" rows="{rows}" />
<DataTable sortable {headers} {rows} />
<DataTable
sortable
title="Load balancers"
description="Your organization's active load balancers."
headers="{[
{ key: 'name', value: 'Name' },
{ key: 'protocol', value: 'Protocol' },
{ key: 'port', value: 'Port' },
{ key: 'cost', value: 'Cost', display: (cost) => cost + ' €' },
headers={[
{ key: "name", value: "Name" },
{ key: "protocol", value: "Protocol" },
{ key: "port", value: "Port" },
{ key: "cost", value: "Cost", display: (cost) => cost + " €" },
{
key: 'expireDate',
value: 'Expire date',
key: "expireDate",
value: "Expire date",
display: (date) => new Date(date).toLocaleString(),
sort,
},
]}"
rows="{[
]}
rows={[
{
id: 0,
name: 'Load Balancer 3',
protocol: 'HTTP',
name: "Load Balancer 3",
protocol: "HTTP",
port: 3000,
cost: 100,
expireDate: '2020-10-21',
expireDate: "2020-10-21",
},
{
id: 'b',
name: 'Load Balancer 1',
protocol: 'HTTP',
id: "b",
name: "Load Balancer 1",
protocol: "HTTP",
port: 443,
cost: 200,
expireDate: '2020-09-10',
expireDate: "2020-09-10",
},
{
id: 'c',
name: 'Load Balancer 2',
protocol: 'HTTP',
id: "c",
name: "Load Balancer 2",
protocol: "HTTP",
port: 80,
cost: 150,
expireDate: '2020-11-24',
expireDate: "2020-11-24",
},
{
id: 'd',
name: 'Load Balancer 6',
protocol: 'HTTP',
id: "d",
name: "Load Balancer 6",
protocol: "HTTP",
port: 3000,
cost: 250,
expireDate: '2020-12-01',
expireDate: "2020-12-01",
},
{
id: 'e',
name: 'Load Balancer 4',
protocol: 'HTTP',
id: "e",
name: "Load Balancer 4",
protocol: "HTTP",
port: 443,
cost: 550,
expireDate: '2021-03-21',
expireDate: "2021-03-21",
},
{
id: 'f',
name: 'Load Balancer 5',
protocol: 'HTTP',
id: "f",
name: "Load Balancer 5",
protocol: "HTTP",
port: 80,
cost: 400,
expireDate: '2020-11-14',
expireDate: "2020-11-14",
},
]}"
]}
/>
<DataTable
expandable
nonExpandableRowIds="{['a', 'b']}"
headers="{headers}"
rows="{rows}"
>
<DataTable expandable nonExpandableRowIds={["a", "b"]} {headers} {rows}>
<div slot="expanded-row" let:row>
<pre>
{JSON.stringify(row, null, 2)}
@ -249,7 +244,7 @@
</div>
</DataTable>
<DataTable batchExpansion headers="{headers}" rows="{rows}">
<DataTable batchExpansion {headers} {rows}>
<div slot="expanded-row" let:row>
<pre>
{JSON.stringify(row, null, 2)}
@ -259,60 +254,57 @@
<DataTableSkeleton />
<DataTableSkeleton
headers="{['Name', 'Protocol', 'Port', 'Rule']}"
rows="{10}"
/>
<DataTableSkeleton headers={["Name", "Protocol", "Port", "Rule"]} rows={10} />
<DataTableSkeleton
headers="{[
{ value: 'Name' },
{ value: 'Protocol' },
{ value: 'Port' },
{ value: 'Rule' },
headers={[
{ value: "Name" },
{ value: "Protocol" },
{ value: "Port" },
{ value: "Rule" },
{ empty: true },
]}"
rows="{10}"
]}
rows={10}
/>
<DataTableSkeleton headers="{headers}" rows="{10}" />
<DataTableSkeleton {headers} rows={10} />
<DataTableSkeleton showHeader="{false}" showToolbar="{false}" />
<DataTableSkeleton showHeader={false} showToolbar={false} />
<DataTableSkeleton showHeader="{false}" showToolbar="{false}" size="tall" />
<DataTableSkeleton showHeader={false} showToolbar={false} size="tall" />
<DataTableSkeleton showHeader="{false}" showToolbar="{false}" size="short" />
<DataTableSkeleton showHeader={false} showToolbar={false} size="short" />
<DataTableSkeleton showHeader="{false}" showToolbar="{false}" size="compact" />
<DataTableSkeleton showHeader={false} showToolbar={false} size="compact" />
<DataTable
rows="{[
rows={[
{
name: 'Load Balancer 3',
protocol: 'HTTP',
name: "Load Balancer 3",
protocol: "HTTP",
port: 3000,
rule: 'Round robin',
id: '-',
rule: "Round robin",
id: "-",
},
]}"
headers="{[
]}
headers={[
{
key: 'name',
value: 'Name',
key: "name",
value: "Name",
},
{
key: 'protocol',
value: 'Protocol',
key: "protocol",
value: "Protocol",
display: (value) => {
return value + ' Protocol';
return value + " Protocol";
},
},
{
key: 'port',
value: 'Port',
key: "port",
value: "Port",
display: (value, row) => {
console.log(row.port);
return value + ' €';
return value + " €";
},
sort: (a, b) => {
if (a > b) return 1;
@ -320,31 +312,31 @@
},
},
{
key: 'rule',
value: 'Rule',
key: "rule",
value: "Rule",
},
]}"
]}
sortKey="name"
on:click:row="{(e) => {
on:click:row={(e) => {
const detail = e.detail;
detail.name;
detail.port;
}}"
on:click:cell="{(e) => {
}}
on:click:cell={(e) => {
const detail = e.detail;
switch (detail.key) {
case 'name':
case "name":
detail.value;
break;
}
}}"
on:click="{(e) => {
}}
on:click={(e) => {
e.detail.cell;
e.detail.row?.name;
}}"
on:click:row--expand="{(e) => {
}}
on:click:row--expand={(e) => {
const detail = e.detail;
detail.row.id;
detail.row.name;
}}"
}}
/>