Merge branch 'spectrum-bbui-table' of github.com:Budibase/budibase into spectrum-bbui
This commit is contained in:
commit
c729d80902
28 changed files with 921 additions and 927 deletions
|
@ -43,13 +43,20 @@
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@spectrum-css/actionbutton": "^1.0.1",
|
||||||
"@spectrum-css/button": "^3.0.1",
|
"@spectrum-css/button": "^3.0.1",
|
||||||
"@spectrum-css/buttongroup": "^3.0.1",
|
"@spectrum-css/buttongroup": "^3.0.1",
|
||||||
|
"@spectrum-css/checkbox": "^3.0.1",
|
||||||
"@spectrum-css/dialog": "^3.0.1",
|
"@spectrum-css/dialog": "^3.0.1",
|
||||||
"@spectrum-css/divider": "^1.0.1",
|
"@spectrum-css/divider": "^1.0.1",
|
||||||
|
"@spectrum-css/icon": "^3.0.1",
|
||||||
|
"@spectrum-css/label": "^2.0.9",
|
||||||
"@spectrum-css/modal": "^3.0.1",
|
"@spectrum-css/modal": "^3.0.1",
|
||||||
"@spectrum-css/popover": "^3.0.1",
|
"@spectrum-css/popover": "^3.0.1",
|
||||||
|
"@spectrum-css/table": "^3.0.1",
|
||||||
"@spectrum-css/underlay": "^2.0.9",
|
"@spectrum-css/underlay": "^2.0.9",
|
||||||
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
|
"dayjs": "^1.10.4",
|
||||||
"markdown-it": "^12.0.4",
|
"markdown-it": "^12.0.4",
|
||||||
"quill": "^1.3.7",
|
"quill": "^1.3.7",
|
||||||
"sirv-cli": "^0.4.6",
|
"sirv-cli": "^0.4.6",
|
||||||
|
|
|
@ -4,10 +4,15 @@
|
||||||
const displayLimit = 5
|
const displayLimit = 5
|
||||||
$: attachments = value?.slice(0, displayLimit) ?? []
|
$: attachments = value?.slice(0, displayLimit) ?? []
|
||||||
$: leftover = (value?.length ?? 0) - attachments.length
|
$: leftover = (value?.length ?? 0) - attachments.length
|
||||||
|
|
||||||
|
const imageExtensions = ["png", "tiff", "gif", "raw", "jpg", "jpeg"]
|
||||||
|
const isImage = extension => {
|
||||||
|
return imageExtensions.includes(extension?.toLowerCase())
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#each attachments as attachment}
|
{#each attachments as attachment}
|
||||||
{#if attachment.type.startsWith('image')}
|
{#if isImage(attachment.extension)}
|
||||||
<img src={attachment.url} alt={attachment.extension} />
|
<img src={attachment.url} alt={attachment.extension} />
|
||||||
{:else}
|
{:else}
|
||||||
<div class="file">{attachment.extension}</div>
|
<div class="file">{attachment.extension}</div>
|
33
packages/bbui/src/Table/CellRenderer.svelte
Normal file
33
packages/bbui/src/Table/CellRenderer.svelte
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<script>
|
||||||
|
import StringRenderer from "./StringRenderer.svelte"
|
||||||
|
import BooleanRenderer from "./BooleanRenderer.svelte"
|
||||||
|
import DateTimeRenderer from "./DateTimeRenderer.svelte"
|
||||||
|
import RelationshipRenderer from "./RelationshipRenderer.svelte"
|
||||||
|
import AttachmentRenderer from "./AttachmentRenderer.svelte"
|
||||||
|
|
||||||
|
export let row
|
||||||
|
export let schema
|
||||||
|
export let value
|
||||||
|
export let customRenderers = []
|
||||||
|
|
||||||
|
const plainTypes = ["string", "options", "number", "longform"]
|
||||||
|
const typeMap = {
|
||||||
|
boolean: BooleanRenderer,
|
||||||
|
datetime: DateTimeRenderer,
|
||||||
|
link: RelationshipRenderer,
|
||||||
|
attachment: AttachmentRenderer,
|
||||||
|
string: StringRenderer,
|
||||||
|
options: StringRenderer,
|
||||||
|
number: StringRenderer,
|
||||||
|
longform: StringRenderer,
|
||||||
|
}
|
||||||
|
$: type = schema?.type ?? "string"
|
||||||
|
$: customRenderer = customRenderers?.find(x => x.column === schema?.name)
|
||||||
|
$: renderer = customRenderer?.component ?? typeMap[type]
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if renderer && (customRenderer || (value != null && value !== ''))}
|
||||||
|
<svelte:component this={renderer} {row} {schema} {value} on:clickrelationship>
|
||||||
|
<slot />
|
||||||
|
</svelte:component>
|
||||||
|
{/if}
|
40
packages/bbui/src/Table/RelationshipRenderer.svelte
Normal file
40
packages/bbui/src/Table/RelationshipRenderer.svelte
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<script>
|
||||||
|
import "@spectrum-css/label/dist/index-vars.css"
|
||||||
|
import { createEventDispatcher } from "svelte"
|
||||||
|
|
||||||
|
export let row
|
||||||
|
export let value
|
||||||
|
export let schema
|
||||||
|
|
||||||
|
const dispatch = createEventDispatcher()
|
||||||
|
const displayLimit = 5
|
||||||
|
|
||||||
|
$: relationships = value?.slice(0, displayLimit) ?? []
|
||||||
|
$: leftover = (value?.length ?? 0) - relationships.length
|
||||||
|
|
||||||
|
const onClick = e => {
|
||||||
|
e.stopPropagation()
|
||||||
|
dispatch("clickrelationship", {
|
||||||
|
tableId: row.tableId,
|
||||||
|
rowId: row._id,
|
||||||
|
fieldName: schema?.name,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#each relationships as relationship}
|
||||||
|
{#if relationship?.primaryDisplay}
|
||||||
|
<span class="spectrum-Label spectrum-Label--grey" on:click={onClick}>
|
||||||
|
{relationship.primaryDisplay}
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
|
{/each}
|
||||||
|
{#if leftover}
|
||||||
|
<div>+{leftover} more</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
span:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
48
packages/bbui/src/Table/SelectEditRenderer.svelte
Normal file
48
packages/bbui/src/Table/SelectEditRenderer.svelte
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<script>
|
||||||
|
import "@spectrum-css/checkbox/dist/index-vars.css"
|
||||||
|
import "@spectrum-css/actionbutton/dist/index-vars.css"
|
||||||
|
|
||||||
|
export let selected
|
||||||
|
export let onToggleSelection
|
||||||
|
export let onEdit
|
||||||
|
export let allowSelectRows = false
|
||||||
|
export let allowEditRows = false
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if allowSelectRows}
|
||||||
|
<label
|
||||||
|
class="spectrum-Checkbox spectrum-Checkbox--sizeM spectrum-Checkbox--emphasized">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
class="spectrum-Checkbox-input"
|
||||||
|
id="checkbox-1"
|
||||||
|
bind:checked={selected} />
|
||||||
|
<span class="spectrum-Checkbox-box">
|
||||||
|
<svg
|
||||||
|
class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Checkbox-checkmark"
|
||||||
|
focusable="false"
|
||||||
|
aria-hidden="true">
|
||||||
|
<use xlink:href="#spectrum-css-icon-Checkmark100" />
|
||||||
|
</svg>
|
||||||
|
<svg
|
||||||
|
class="spectrum-Icon spectrum-UIIcon-Dash100 spectrum-Checkbox-partialCheckmark"
|
||||||
|
focusable="false"
|
||||||
|
aria-hidden="true">
|
||||||
|
<use xlink:href="#spectrum-css-icon-Dash100" />
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
{/if}
|
||||||
|
{#if allowEditRows}
|
||||||
|
<button
|
||||||
|
class="spectrum-ActionButton spectrum-ActionButton--sizeS"
|
||||||
|
on:click={onEdit}>
|
||||||
|
<span class="spectrum-ActionButton-label">Edit</span>
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
label {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
444
packages/bbui/src/Table/Table.svelte
Normal file
444
packages/bbui/src/Table/Table.svelte
Normal file
|
@ -0,0 +1,444 @@
|
||||||
|
<script>
|
||||||
|
import { createEventDispatcher } from "svelte"
|
||||||
|
import "@spectrum-css/table/dist/index-vars.css"
|
||||||
|
import CellRenderer from "./CellRenderer.svelte"
|
||||||
|
import SelectEditRenderer from "./SelectEditRenderer.svelte"
|
||||||
|
|
||||||
|
export let data = []
|
||||||
|
export let schema = {}
|
||||||
|
export let showAutoColumns = false
|
||||||
|
export let rowCount = 0
|
||||||
|
export let quiet = true
|
||||||
|
export let loading = false
|
||||||
|
export let allowSelectRows = true
|
||||||
|
export let allowEditRows = true
|
||||||
|
export let allowEditColumns = true
|
||||||
|
export let selectedRows = []
|
||||||
|
export let editColumnTitle = "Edit"
|
||||||
|
export let customRenderers = []
|
||||||
|
|
||||||
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
|
// Config
|
||||||
|
const rowHeight = 55
|
||||||
|
const headerHeight = 36
|
||||||
|
const rowPreload = 5
|
||||||
|
|
||||||
|
// Sorting state
|
||||||
|
let sortColumn
|
||||||
|
let sortOrder
|
||||||
|
|
||||||
|
// Table state
|
||||||
|
let height = 0
|
||||||
|
let loaded = false
|
||||||
|
$: if (!loading) loaded = true
|
||||||
|
$: rows = data ?? []
|
||||||
|
$: visibleRowCount = getVisibleRowCount(loaded, height, rows.length, rowCount)
|
||||||
|
$: contentStyle = getContentStyle(visibleRowCount, rowCount)
|
||||||
|
$: sortedRows = sortRows(rows, sortColumn, sortOrder)
|
||||||
|
$: fields = getFields(schema, showAutoColumns)
|
||||||
|
$: showEditColumn = allowEditRows || allowSelectRows
|
||||||
|
|
||||||
|
// Scrolling state
|
||||||
|
let timeout
|
||||||
|
let nextScrollTop = 0
|
||||||
|
let scrollTop = 0
|
||||||
|
$: firstVisibleRow = calculateFirstVisibleRow(scrollTop)
|
||||||
|
$: lastVisibleRow = calculateLastVisibleRow(
|
||||||
|
firstVisibleRow,
|
||||||
|
visibleRowCount,
|
||||||
|
rows.length
|
||||||
|
)
|
||||||
|
|
||||||
|
// Reset state when data chanegs
|
||||||
|
$: data.length, reset()
|
||||||
|
const reset = () => {
|
||||||
|
nextScrollTop = 0
|
||||||
|
scrollTop = 0
|
||||||
|
clearTimeout(timeout)
|
||||||
|
timeout = null
|
||||||
|
}
|
||||||
|
|
||||||
|
const getVisibleRowCount = (loaded, height, allRows, rowCount) => {
|
||||||
|
if (!loaded) {
|
||||||
|
return rowCount || 0
|
||||||
|
}
|
||||||
|
if (rowCount) {
|
||||||
|
return Math.min(allRows, rowCount)
|
||||||
|
}
|
||||||
|
return Math.min(allRows, Math.ceil(height / rowHeight))
|
||||||
|
}
|
||||||
|
|
||||||
|
const getContentStyle = (visibleRows, rowCount) => {
|
||||||
|
if (!rowCount) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return `height: ${headerHeight - 1 + visibleRows * (rowHeight + 1)}px;`
|
||||||
|
}
|
||||||
|
|
||||||
|
const sortRows = (rows, sortColumn, sortOrder) => {
|
||||||
|
if (!sortColumn || !sortOrder) {
|
||||||
|
return rows
|
||||||
|
}
|
||||||
|
return rows.slice().sort((a, b) => {
|
||||||
|
const colA = a[sortColumn]
|
||||||
|
const colB = b[sortColumn]
|
||||||
|
if (sortOrder === "Descending") {
|
||||||
|
return colA > colB ? -1 : 1
|
||||||
|
} else {
|
||||||
|
return colA > colB ? 1 : -1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const sortBy = fieldSchema => {
|
||||||
|
if (fieldSchema.sortable === false) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (fieldSchema.name === sortColumn) {
|
||||||
|
sortOrder = sortOrder === "Descending" ? "Ascending" : "Descending"
|
||||||
|
} else {
|
||||||
|
sortColumn = fieldSchema.name
|
||||||
|
sortOrder = "Descending"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDisplayName = schema => {
|
||||||
|
let name = schema?.displayName
|
||||||
|
if (schema && name === undefined) {
|
||||||
|
name = schema.name
|
||||||
|
}
|
||||||
|
return name || ""
|
||||||
|
}
|
||||||
|
|
||||||
|
const getFields = (schema, showAutoColumns) => {
|
||||||
|
let columns = []
|
||||||
|
let autoColumns = []
|
||||||
|
Object.entries(schema || {}).forEach(([field, fieldSchema]) => {
|
||||||
|
if (!field || !fieldSchema) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
schema[field].name = field
|
||||||
|
if (!fieldSchema?.autocolumn) {
|
||||||
|
columns.push(fieldSchema)
|
||||||
|
} else if (showAutoColumns) {
|
||||||
|
autoColumns.push(fieldSchema)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return columns
|
||||||
|
.sort((a, b) => {
|
||||||
|
const orderA = a.order || Number.MAX_SAFE_INTEGER
|
||||||
|
const orderB = b.order || Number.MAX_SAFE_INTEGER
|
||||||
|
const nameA = getDisplayName(a)
|
||||||
|
const nameB = getDisplayName(b)
|
||||||
|
if (orderA !== orderB) {
|
||||||
|
return orderA < orderB ? orderA : orderB
|
||||||
|
}
|
||||||
|
return nameA < nameB ? a : b
|
||||||
|
})
|
||||||
|
.concat(autoColumns)
|
||||||
|
.map(column => column.name)
|
||||||
|
}
|
||||||
|
|
||||||
|
const onScroll = event => {
|
||||||
|
nextScrollTop = event.target.scrollTop
|
||||||
|
if (timeout) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
timeout = setTimeout(() => {
|
||||||
|
scrollTop = nextScrollTop
|
||||||
|
timeout = null
|
||||||
|
}, 50)
|
||||||
|
}
|
||||||
|
|
||||||
|
const calculateFirstVisibleRow = scrollTop => {
|
||||||
|
return Math.max(Math.floor(scrollTop / (rowHeight + 1)) - rowPreload, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
const calculateLastVisibleRow = (firstRow, visibleRowCount, allRowCount) => {
|
||||||
|
if (visibleRowCount === 0) {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
return Math.min(firstRow + visibleRowCount + 2 * rowPreload, allRowCount)
|
||||||
|
}
|
||||||
|
|
||||||
|
const editColumn = (e, field) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
dispatch("editcolumn", field)
|
||||||
|
}
|
||||||
|
|
||||||
|
const editRow = (e, row) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
dispatch("editrow", row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const toggleSelectRow = row => {
|
||||||
|
if (!allowSelectRows) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (selectedRows.includes(row)) {
|
||||||
|
selectedRows = selectedRows.filter(selectedRow => selectedRow !== row)
|
||||||
|
} else {
|
||||||
|
selectedRows = [...selectedRows, row]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="wrapper" bind:offsetHeight={height}>
|
||||||
|
{#if !loaded}
|
||||||
|
<div class="loading" style={contentStyle} />
|
||||||
|
{:else}
|
||||||
|
<div
|
||||||
|
on:scroll={onScroll}
|
||||||
|
class:quiet
|
||||||
|
style={`--row-height: ${rowHeight}px; --header-height: ${headerHeight}px;`}
|
||||||
|
class="container">
|
||||||
|
<div style={contentStyle}>
|
||||||
|
<table class="spectrum-Table" class:spectrum-Table--quiet={quiet}>
|
||||||
|
{#if sortedRows?.length}
|
||||||
|
<thead class="spectrum-Table-head">
|
||||||
|
<tr>
|
||||||
|
{#if showEditColumn}
|
||||||
|
<th class="spectrum-Table-headCell">
|
||||||
|
<div class="spectrum-Table-headCell-content">
|
||||||
|
{editColumnTitle || ''}
|
||||||
|
</div>
|
||||||
|
</th>
|
||||||
|
{/if}
|
||||||
|
{#each fields as field}
|
||||||
|
<th
|
||||||
|
class="spectrum-Table-headCell"
|
||||||
|
class:is-sortable={schema[field].sortable !== false}
|
||||||
|
class:is-sorted-desc={sortColumn === field && sortOrder === 'Descending'}
|
||||||
|
class:is-sorted-asc={sortColumn === field && sortOrder === 'Ascending'}
|
||||||
|
on:click={() => sortBy(schema[field])}>
|
||||||
|
<div class="spectrum-Table-headCell-content">
|
||||||
|
<div class="title">{getDisplayName(schema[field])}</div>
|
||||||
|
{#if schema[field]?.autocolumn}
|
||||||
|
<svg
|
||||||
|
class="spectrum-Icon spectrum-Table-autoIcon"
|
||||||
|
focusable="false">
|
||||||
|
<use xlink:href="#spectrum-icon-18-MagicWand" />
|
||||||
|
</svg>
|
||||||
|
{/if}
|
||||||
|
{#if sortColumn === field}
|
||||||
|
<svg
|
||||||
|
class="spectrum-Icon spectrum-UIIcon-ArrowDown100 spectrum-Table-sortedIcon"
|
||||||
|
focusable="false"
|
||||||
|
aria-hidden="true">
|
||||||
|
<use xlink:href="#spectrum-css-icon-Arrow100" />
|
||||||
|
</svg>
|
||||||
|
{/if}
|
||||||
|
{#if allowEditColumns && schema[field]?.editable !== false}
|
||||||
|
<svg
|
||||||
|
class="spectrum-Icon spectrum-Table-editIcon"
|
||||||
|
focusable="false"
|
||||||
|
on:click={e => editColumn(e, field)}>
|
||||||
|
<use xlink:href="#spectrum-icon-18-Edit" />
|
||||||
|
</svg>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</th>
|
||||||
|
{/each}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
{/if}
|
||||||
|
<tbody class="spectrum-Table-body">
|
||||||
|
{#if sortedRows?.length}
|
||||||
|
{#each sortedRows as row, idx}
|
||||||
|
<tr
|
||||||
|
on:click={() => toggleSelectRow(row)}
|
||||||
|
class="spectrum-Table-row"
|
||||||
|
class:hidden={idx < firstVisibleRow || idx > lastVisibleRow}>
|
||||||
|
{#if idx >= firstVisibleRow && idx <= lastVisibleRow}
|
||||||
|
{#if showEditColumn}
|
||||||
|
<td
|
||||||
|
class="spectrum-Table-cell spectrum-Table-cell--divider">
|
||||||
|
<div class="spectrum-Table-cell-content">
|
||||||
|
<SelectEditRenderer
|
||||||
|
data={row}
|
||||||
|
selected={selectedRows.includes(row)}
|
||||||
|
onToggleSelection={() => toggleSelectRow(row)}
|
||||||
|
onEdit={e => editRow(e, row)}
|
||||||
|
{allowSelectRows}
|
||||||
|
{allowEditRows} />
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
{/if}
|
||||||
|
{#each fields as field}
|
||||||
|
<td class="spectrum-Table-cell">
|
||||||
|
<div class="spectrum-Table-cell-content">
|
||||||
|
<CellRenderer
|
||||||
|
{customRenderers}
|
||||||
|
{row}
|
||||||
|
schema={schema[field]}
|
||||||
|
value={row[field]}
|
||||||
|
on:clickrelationship>
|
||||||
|
<slot />
|
||||||
|
</CellRenderer>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
{/each}
|
||||||
|
{/if}
|
||||||
|
</tr>
|
||||||
|
{/each}
|
||||||
|
{:else}
|
||||||
|
<div class="placeholder">
|
||||||
|
<svg
|
||||||
|
class="spectrum-Icon spectrum-Icon--sizeXXL"
|
||||||
|
focusable="false">
|
||||||
|
<use xlink:href="#spectrum-icon-18-Table" />
|
||||||
|
</svg>
|
||||||
|
<div>No rows found</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.wrapper {
|
||||||
|
background-color: var(--spectrum-global-color-gray-100);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
overflow: auto;
|
||||||
|
border: 1px solid
|
||||||
|
var(--spectrum-table-border-color, var(--spectrum-alias-border-color-mid)) !important;
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: var(--spectrum-global-color-gray-400)
|
||||||
|
var(--spectrum-global-color-gray-100);
|
||||||
|
}
|
||||||
|
.container::-webkit-scrollbar {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
.container::-webkit-scrollbar-track {
|
||||||
|
background: var(--spectrum-global-color-gray-100);
|
||||||
|
}
|
||||||
|
.container::-webkit-scrollbar-thumb {
|
||||||
|
background-color: var(--spectrum-global-color-gray-400);
|
||||||
|
border-radius: 20px;
|
||||||
|
border: 4px solid var(--spectrum-global-color-gray-100);
|
||||||
|
}
|
||||||
|
.container::-webkit-scrollbar-corner {
|
||||||
|
background: var(--spectrum-global-color-gray-100);
|
||||||
|
}
|
||||||
|
.container.quiet {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spectrum-Table-headCell .spectrum-Icon {
|
||||||
|
pointer-events: all;
|
||||||
|
margin-left: var(
|
||||||
|
--spectrum-table-header-sort-icon-gap,
|
||||||
|
var(--spectrum-global-dimension-size-125)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
.spectrum-Table-editIcon,
|
||||||
|
.spectrum-Table-autoIcon {
|
||||||
|
width: var(--spectrum-global-dimension-size-150);
|
||||||
|
height: var(--spectrum-global-dimension-size-150);
|
||||||
|
}
|
||||||
|
.spectrum-Table-editIcon {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.spectrum-Table-headCell:hover .spectrum-Table-editIcon {
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container,
|
||||||
|
th {
|
||||||
|
border-bottom: 1px solid
|
||||||
|
var(--spectrum-table-border-color, var(--spectrum-alias-border-color-mid)) !important;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
vertical-align: middle;
|
||||||
|
height: var(--header-height);
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 2;
|
||||||
|
background-color: var(--spectrum-global-color-gray-100);
|
||||||
|
}
|
||||||
|
.spectrum-Table-headCell-content {
|
||||||
|
white-space: nowrap;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.spectrum-Table-headCell-content .title {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.placeholder {
|
||||||
|
padding: 20px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: var(
|
||||||
|
--spectrum-table-cell-text-color,
|
||||||
|
var(--spectrum-alias-text-color)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
.placeholder div {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: var(
|
||||||
|
--spectrum-table-cell-text-size,
|
||||||
|
var(--spectrum-alias-font-size-default)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
tbody tr {
|
||||||
|
height: var(--row-height);
|
||||||
|
}
|
||||||
|
tbody tr.hidden {
|
||||||
|
height: calc(var(--row-height) + 1px);
|
||||||
|
}
|
||||||
|
tbody tr.offset {
|
||||||
|
background-color: red;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
border-bottom: none !important;
|
||||||
|
border-left: none !important;
|
||||||
|
border-right: none !important;
|
||||||
|
border-top: 1px solid
|
||||||
|
var(--spectrum-table-border-color, var(--spectrum-alias-border-color-mid)) !important;
|
||||||
|
}
|
||||||
|
tr:first-child td {
|
||||||
|
border-top: none !important;
|
||||||
|
}
|
||||||
|
.container:not(.quiet) td.spectrum-Table-cell--divider {
|
||||||
|
width: 1px;
|
||||||
|
border-right: 1px solid
|
||||||
|
var(--spectrum-table-border-color, var(--spectrum-alias-border-color-mid)) !important;
|
||||||
|
}
|
||||||
|
.spectrum-Table-cell-content {
|
||||||
|
height: var(--row-height);
|
||||||
|
white-space: nowrap;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
1
packages/bbui/src/Table/index.js
Normal file
1
packages/bbui/src/Table/index.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
export { default as Table } from "./Table.svelte"
|
|
@ -31,6 +31,7 @@ export { default as DatePicker } from "./DatePicker/DatePicker.svelte"
|
||||||
export { default as Multiselect } from "./Form/Multiselect.svelte"
|
export { default as Multiselect } from "./Form/Multiselect.svelte"
|
||||||
export { default as Slider } from "./Form/Slider.svelte"
|
export { default as Slider } from "./Form/Slider.svelte"
|
||||||
export { default as Context } from "./context"
|
export { default as Context } from "./context"
|
||||||
|
export { default as Table } from "./Table/Table.svelte"
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
export { default as autoResizeTextArea } from "./Actions/autoresize_textarea"
|
export { default as autoResizeTextArea } from "./Actions/autoresize_textarea"
|
||||||
|
|
|
@ -44,10 +44,10 @@
|
||||||
"@nodelib/fs.scandir" "2.1.4"
|
"@nodelib/fs.scandir" "2.1.4"
|
||||||
fastq "^1.6.0"
|
fastq "^1.6.0"
|
||||||
|
|
||||||
"@npmcli/arborist@^2.0.0", "@npmcli/arborist@^2.2.9":
|
"@npmcli/arborist@^2.0.0", "@npmcli/arborist@^2.3.0":
|
||||||
version "2.2.9"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/@npmcli/arborist/-/arborist-2.2.9.tgz#4e8b1d48c348994a5d35fa67b4e5a6f3f8c7018b"
|
resolved "https://registry.yarnpkg.com/@npmcli/arborist/-/arborist-2.3.0.tgz#0d3273f85691711b10a85f82dffd235d755a3f57"
|
||||||
integrity sha512-ddC/CCAEHh28XYtgSAOudchdphNXcgErdYxwsEiykc2YbRA9Z+4XjI0BdBdXvv22DvkpO7zotUSxlVTcJmdURw==
|
integrity sha512-4z8x8jImp/Clwol4sgmR6qdntLQZDxNFabBSbyr9EB11cyWHyqhRvBKip/1sBTcQAScIwuFT64MOu/HI4a5Nkw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@npmcli/installed-package-contents" "^1.0.7"
|
"@npmcli/installed-package-contents" "^1.0.7"
|
||||||
"@npmcli/map-workspaces" "^1.0.2"
|
"@npmcli/map-workspaces" "^1.0.2"
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
cacache "^15.0.3"
|
cacache "^15.0.3"
|
||||||
common-ancestor-path "^1.0.1"
|
common-ancestor-path "^1.0.1"
|
||||||
json-parse-even-better-errors "^2.3.1"
|
json-parse-even-better-errors "^2.3.1"
|
||||||
json-stringify-nice "^1.1.1"
|
json-stringify-nice "^1.1.2"
|
||||||
mkdirp-infer-owner "^2.0.0"
|
mkdirp-infer-owner "^2.0.0"
|
||||||
npm-install-checks "^4.0.0"
|
npm-install-checks "^4.0.0"
|
||||||
npm-package-arg "^8.1.0"
|
npm-package-arg "^8.1.0"
|
||||||
|
@ -82,10 +82,10 @@
|
||||||
resolved "https://registry.yarnpkg.com/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz#6c1d2c625fb6ef1b9dea85ad0a5afcbef85ef22a"
|
resolved "https://registry.yarnpkg.com/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz#6c1d2c625fb6ef1b9dea85ad0a5afcbef85ef22a"
|
||||||
integrity sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q==
|
integrity sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q==
|
||||||
|
|
||||||
"@npmcli/config@^2.0.0":
|
"@npmcli/config@^2.1.0":
|
||||||
version "2.0.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/@npmcli/config/-/config-2.0.0.tgz#878f0317373ab0aaefaa9dcb23793ba7df87932b"
|
resolved "https://registry.yarnpkg.com/@npmcli/config/-/config-2.1.0.tgz#fabfbbbebc3a417db672be4014a7ba71e6bb37f3"
|
||||||
integrity sha512-3OKVmO63FJRIrcsVI/njCC7QGKSfdCrIUUV+sP5ql8QdaPqXuaFCImqCYFDzGkcrP8PTOS3jbrRsU0Yzm04n3g==
|
integrity sha512-vYTUs6b1ORqWgWFrLkyscdhyhtB1YhbtEM2iaH5rM5Bv1/tWqZEpspGLh+Re6YuPRUmXulzkf3iWhu9ntz8cVw==
|
||||||
dependencies:
|
dependencies:
|
||||||
ini "^2.0.0"
|
ini "^2.0.0"
|
||||||
mkdirp-infer-owner "^2.0.0"
|
mkdirp-infer-owner "^2.0.0"
|
||||||
|
@ -186,9 +186,9 @@
|
||||||
"@octokit/types" "^6.0.3"
|
"@octokit/types" "^6.0.3"
|
||||||
|
|
||||||
"@octokit/core@^3.2.3":
|
"@octokit/core@^3.2.3":
|
||||||
version "3.3.2"
|
version "3.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.3.2.tgz#128377d0e05d8b548b26fc6622570220b103bc69"
|
resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.4.0.tgz#b48aa27d755b339fe7550548b340dcc2b513b742"
|
||||||
integrity sha512-Jx83n4tuX/z7QtxnPsAKxXPzH3vANtKmlCB3W3vt18JbkEaBYm+C8dgAlA1FNtqNk3L21pxsKNbWkUQAhiV7ng==
|
integrity sha512-6/vlKPP8NF17cgYXqucdshWqmMZGXkuvtcrWCgU5NOI0Pl2GjlmZyWgBMrU8zJ3v2MJlM6++CiB45VKYmhiWWg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@octokit/auth-token" "^2.4.4"
|
"@octokit/auth-token" "^2.4.4"
|
||||||
"@octokit/graphql" "^4.5.8"
|
"@octokit/graphql" "^4.5.8"
|
||||||
|
@ -251,17 +251,15 @@
|
||||||
once "^1.4.0"
|
once "^1.4.0"
|
||||||
|
|
||||||
"@octokit/request@^5.3.0", "@octokit/request@^5.4.12":
|
"@octokit/request@^5.3.0", "@octokit/request@^5.4.12":
|
||||||
version "5.4.14"
|
version "5.4.15"
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.14.tgz#ec5f96f78333bb2af390afa5ff66f114b063bc96"
|
resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.15.tgz#829da413dc7dd3aa5e2cdbb1c7d0ebe1f146a128"
|
||||||
integrity sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==
|
integrity sha512-6UnZfZzLwNhdLRreOtTkT9n57ZwulCve8q3IT/Z477vThu6snfdkBuhxnChpOKNGxcQ71ow561Qoa6uqLdPtag==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@octokit/endpoint" "^6.0.1"
|
"@octokit/endpoint" "^6.0.1"
|
||||||
"@octokit/request-error" "^2.0.0"
|
"@octokit/request-error" "^2.0.0"
|
||||||
"@octokit/types" "^6.7.1"
|
"@octokit/types" "^6.7.1"
|
||||||
deprecation "^2.0.0"
|
|
||||||
is-plain-object "^5.0.0"
|
is-plain-object "^5.0.0"
|
||||||
node-fetch "^2.6.1"
|
node-fetch "^2.6.1"
|
||||||
once "^1.4.0"
|
|
||||||
universal-user-agent "^6.0.0"
|
universal-user-agent "^6.0.0"
|
||||||
|
|
||||||
"@octokit/rest@^18.0.0":
|
"@octokit/rest@^18.0.0":
|
||||||
|
@ -354,9 +352,9 @@
|
||||||
integrity sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg==
|
integrity sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg==
|
||||||
|
|
||||||
"@semantic-release/github@^7.0.0":
|
"@semantic-release/github@^7.0.0":
|
||||||
version "7.2.0"
|
version "7.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-7.2.0.tgz#925f3efd91adabfc4bbe0de24b79fe1a8a38b4e2"
|
resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-7.2.1.tgz#e833245746413e0830b65112331ca0a00b35cf95"
|
||||||
integrity sha512-tMRnWiiWb43whRHvbDGXq4DGEbKRi56glDpXDJZit4PIiwDPX7Kx3QzmwRtDOcG+8lcpGjpdPabYZ9NBxoI2mw==
|
integrity sha512-+gOhbaG4T3xJb6aTZu1/7KvCmYKRChkasdIyFWdaGaTWVeGpdl4o0zMviV1z3kRcgPOSXeqjHSQ6SOQAfHQiDw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@octokit/rest" "^18.0.0"
|
"@octokit/rest" "^18.0.0"
|
||||||
"@semantic-release/error" "^2.2.0"
|
"@semantic-release/error" "^2.2.0"
|
||||||
|
@ -376,9 +374,9 @@
|
||||||
url-join "^4.0.0"
|
url-join "^4.0.0"
|
||||||
|
|
||||||
"@semantic-release/npm@^7.0.0":
|
"@semantic-release/npm@^7.0.0":
|
||||||
version "7.1.0"
|
version "7.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/@semantic-release/npm/-/npm-7.1.0.tgz#27c56ad18bceb97a061f1fc7e54a85dc4c8016d6"
|
resolved "https://registry.yarnpkg.com/@semantic-release/npm/-/npm-7.1.1.tgz#90a0970f12b963fa846e5cdf896e6c7d996c1a64"
|
||||||
integrity sha512-zr9kTlF3/84QE9XH765TwvG0ljysSrxEGPNL1prxpWS9fHD7Pa+58L7pgLQwmw4i1QIkhh9cANvY9l7uldvh5w==
|
integrity sha512-zTYAno1j49XiH+uAVCY47dKOJAagA/MaJb26FFIfNujNHw3GYXk3ygsFa5CSa55xsO0qEMLcsDX3f3ByCg6nZw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@semantic-release/error" "^2.2.0"
|
"@semantic-release/error" "^2.2.0"
|
||||||
aggregate-error "^3.0.0"
|
aggregate-error "^3.0.0"
|
||||||
|
@ -386,7 +384,7 @@
|
||||||
fs-extra "^9.0.0"
|
fs-extra "^9.0.0"
|
||||||
lodash "^4.17.15"
|
lodash "^4.17.15"
|
||||||
nerf-dart "^1.0.0"
|
nerf-dart "^1.0.0"
|
||||||
normalize-url "^5.0.0"
|
normalize-url "^6.0.0"
|
||||||
npm "^7.0.0"
|
npm "^7.0.0"
|
||||||
rc "^1.2.8"
|
rc "^1.2.8"
|
||||||
read-pkg "^5.0.0"
|
read-pkg "^5.0.0"
|
||||||
|
@ -410,6 +408,11 @@
|
||||||
lodash "^4.17.4"
|
lodash "^4.17.4"
|
||||||
read-pkg-up "^7.0.0"
|
read-pkg-up "^7.0.0"
|
||||||
|
|
||||||
|
"@spectrum-css/actionbutton@^1.0.1":
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@spectrum-css/actionbutton/-/actionbutton-1.0.1.tgz#9c75da37ea6915919fb574c74bd60dacc03b6577"
|
||||||
|
integrity sha512-AUqtyNabHF451Aj9i3xz82TxS5Z6k1dttA68/1hMeU9kbPCSS4P6Viw3vaRGs9CSspuR8xnnhDgrq+F+zMy2Hw==
|
||||||
|
|
||||||
"@spectrum-css/button@^3.0.1":
|
"@spectrum-css/button@^3.0.1":
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/@spectrum-css/button/-/button-3.0.1.tgz#6db8c3e851baecd0f1c2d88fef37d49d01c6e643"
|
resolved "https://registry.yarnpkg.com/@spectrum-css/button/-/button-3.0.1.tgz#6db8c3e851baecd0f1c2d88fef37d49d01c6e643"
|
||||||
|
@ -420,6 +423,11 @@
|
||||||
resolved "https://registry.yarnpkg.com/@spectrum-css/buttongroup/-/buttongroup-3.0.1.tgz#99e59cf32ed9a73dacb0c04d260c830ecbafb181"
|
resolved "https://registry.yarnpkg.com/@spectrum-css/buttongroup/-/buttongroup-3.0.1.tgz#99e59cf32ed9a73dacb0c04d260c830ecbafb181"
|
||||||
integrity sha512-/cktRh8N63lCMvcGX/E/8yTBcearuETzZCxm6YDisk3W4Pi68621JVNjxLOB65pf855EHpoZufzLJIRVj+dyOw==
|
integrity sha512-/cktRh8N63lCMvcGX/E/8yTBcearuETzZCxm6YDisk3W4Pi68621JVNjxLOB65pf855EHpoZufzLJIRVj+dyOw==
|
||||||
|
|
||||||
|
"@spectrum-css/checkbox@^3.0.1":
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@spectrum-css/checkbox/-/checkbox-3.0.1.tgz#6f36377d8bd556989ddd1dec2506dc295c5fcda8"
|
||||||
|
integrity sha512-fI0q2Cp6yU4ORyE6JWUSMYNgEtGf6AjYViZ2Weg3UPTYBQuWdQd8J0ZTcH38pDMyARFPRdiXgQ3KnyX5Hk5huw==
|
||||||
|
|
||||||
"@spectrum-css/dialog@^3.0.1":
|
"@spectrum-css/dialog@^3.0.1":
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/@spectrum-css/dialog/-/dialog-3.0.1.tgz#33aae036282159f6aa998848b8c0828640a9620a"
|
resolved "https://registry.yarnpkg.com/@spectrum-css/dialog/-/dialog-3.0.1.tgz#33aae036282159f6aa998848b8c0828640a9620a"
|
||||||
|
@ -432,6 +440,16 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"@spectrum-css/vars" "^3.0.1"
|
"@spectrum-css/vars" "^3.0.1"
|
||||||
|
|
||||||
|
"@spectrum-css/icon@^3.0.1":
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@spectrum-css/icon/-/icon-3.0.1.tgz#e300a6fc353c85c6b5d6e7a364408a940c31b177"
|
||||||
|
integrity sha512-cGFtIrcQ/7tthdkHK1npuEFiCdYVHLqwmLxghUYQw8Tb8KgJaw3OBO1tpjgsUizexNgu26BjVRIbGxNWuBXIHQ==
|
||||||
|
|
||||||
|
"@spectrum-css/label@^2.0.9":
|
||||||
|
version "2.0.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/@spectrum-css/label/-/label-2.0.9.tgz#792f34b906ba81118f4d0edcc81a18da1ecd57cb"
|
||||||
|
integrity sha512-0vXhWIZoQDTg+I6MyMpwmeJ+yQHtxkZ7lLcEqxhJ2y7JXP2ftblz2sO4+9jB11ljepeVlV+B6LF1drU8mMu82A==
|
||||||
|
|
||||||
"@spectrum-css/modal@^3.0.1":
|
"@spectrum-css/modal@^3.0.1":
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/@spectrum-css/modal/-/modal-3.0.1.tgz#613a6b83d0330a4d38db41a98090800751c56d8d"
|
resolved "https://registry.yarnpkg.com/@spectrum-css/modal/-/modal-3.0.1.tgz#613a6b83d0330a4d38db41a98090800751c56d8d"
|
||||||
|
@ -442,6 +460,11 @@
|
||||||
resolved "https://registry.yarnpkg.com/@spectrum-css/popover/-/popover-3.0.1.tgz#5863c1efc53f98f9aba2de9186666780041303fc"
|
resolved "https://registry.yarnpkg.com/@spectrum-css/popover/-/popover-3.0.1.tgz#5863c1efc53f98f9aba2de9186666780041303fc"
|
||||||
integrity sha512-LmOSj/yCwQQ9iGmCYnHiJsJR/HfPiGqI1Jl7pkKxBOCxYBMS/5+ans9vfCN2Qnd0eK7WSbfPg72S6mjye7db2Q==
|
integrity sha512-LmOSj/yCwQQ9iGmCYnHiJsJR/HfPiGqI1Jl7pkKxBOCxYBMS/5+ans9vfCN2Qnd0eK7WSbfPg72S6mjye7db2Q==
|
||||||
|
|
||||||
|
"@spectrum-css/table@^3.0.1":
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@spectrum-css/table/-/table-3.0.1.tgz#753e0e2498082c0c36b9600828516aff3ac338cd"
|
||||||
|
integrity sha512-XQ+srMTv9hK1H0nctWUtqyzitmvyb5TNR+7mjAmKRdkBRSTQQSipDhenxZp72ekzMtMoSYZVZ77kgo0Iw3Fpug==
|
||||||
|
|
||||||
"@spectrum-css/underlay@^2.0.9":
|
"@spectrum-css/underlay@^2.0.9":
|
||||||
version "2.0.9"
|
version "2.0.9"
|
||||||
resolved "https://registry.yarnpkg.com/@spectrum-css/underlay/-/underlay-2.0.9.tgz#fc10f971d1325cc844b727e6260f7217844060e8"
|
resolved "https://registry.yarnpkg.com/@spectrum-css/underlay/-/underlay-2.0.9.tgz#fc10f971d1325cc844b727e6260f7217844060e8"
|
||||||
|
@ -453,9 +476,9 @@
|
||||||
integrity sha512-l4oRcCOqInChYXZN6OQhpe3isk6l4OE6Ys8cgdlsiKp53suNoQxyyd9p/eGRbCjZgH3xQ8nK0t4DHa7QYC0S6w==
|
integrity sha512-l4oRcCOqInChYXZN6OQhpe3isk6l4OE6Ys8cgdlsiKp53suNoQxyyd9p/eGRbCjZgH3xQ8nK0t4DHa7QYC0S6w==
|
||||||
|
|
||||||
"@sveltejs/vite-plugin-svelte@^1.0.0-next.5":
|
"@sveltejs/vite-plugin-svelte@^1.0.0-next.5":
|
||||||
version "1.0.0-next.5"
|
version "1.0.0-next.6"
|
||||||
resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.0-next.5.tgz#8cf608f7a3c33dfa5b648397aae1ba90e6a4883f"
|
resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.0-next.6.tgz#c1667af9b8245d31dcacc8a914221d817d6bc202"
|
||||||
integrity sha512-RVjafsqziWwnQm8VEy2y0qNaugNDvRd8tTaCt9rjgQkqaS/BDiyDCluXxA28PRC+ddZjvwUeq9k+0EfbLVObfg==
|
integrity sha512-P+skZslGT+zPXRH9SlEu21LXuFpkQITRcvQb/NRpZHrxj04VDRbuKwksOfq+vDHO/K4HWioXIAQoQnJ3oomItw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@rollup/pluginutils" "^4.1.0"
|
"@rollup/pluginutils" "^4.1.0"
|
||||||
chalk "^4.1.0"
|
chalk "^4.1.0"
|
||||||
|
@ -464,7 +487,7 @@
|
||||||
require-relative "^0.8.7"
|
require-relative "^0.8.7"
|
||||||
slash "^3.0.0"
|
slash "^3.0.0"
|
||||||
source-map "^0.7.3"
|
source-map "^0.7.3"
|
||||||
svelte-hmr "^0.13.3"
|
svelte-hmr "^0.14.0"
|
||||||
|
|
||||||
"@tootallnate/once@1":
|
"@tootallnate/once@1":
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
|
@ -572,9 +595,9 @@ acorn@^7.3.1:
|
||||||
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
|
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
|
||||||
|
|
||||||
acorn@^8.1.0:
|
acorn@^8.1.0:
|
||||||
version "8.1.0"
|
version "8.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.0.tgz#52311fd7037ae119cbb134309e901aa46295b3fe"
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.1.tgz#fb0026885b9ac9f48bac1e185e4af472971149ff"
|
||||||
integrity sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA==
|
integrity sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g==
|
||||||
|
|
||||||
agent-base@6:
|
agent-base@6:
|
||||||
version "6.0.2"
|
version "6.0.2"
|
||||||
|
@ -662,9 +685,9 @@ ansistyles@~0.1.3:
|
||||||
integrity sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk=
|
integrity sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk=
|
||||||
|
|
||||||
anymatch@~3.1.1:
|
anymatch@~3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142"
|
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
|
||||||
integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==
|
integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
|
||||||
dependencies:
|
dependencies:
|
||||||
normalize-path "^3.0.0"
|
normalize-path "^3.0.0"
|
||||||
picomatch "^2.0.4"
|
picomatch "^2.0.4"
|
||||||
|
@ -794,9 +817,9 @@ aws4@^1.8.0:
|
||||||
integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
|
integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
|
||||||
|
|
||||||
balanced-match@^1.0.0:
|
balanced-match@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||||
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||||
|
|
||||||
bcrypt-pbkdf@^1.0.0:
|
bcrypt-pbkdf@^1.0.0:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
|
@ -806,9 +829,9 @@ bcrypt-pbkdf@^1.0.0:
|
||||||
tweetnacl "^0.14.3"
|
tweetnacl "^0.14.3"
|
||||||
|
|
||||||
before-after-hook@^2.2.0:
|
before-after-hook@^2.2.0:
|
||||||
version "2.2.0"
|
version "2.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.0.tgz#09c40d92e936c64777aa385c4e9b904f8147eaf0"
|
resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.1.tgz#73540563558687586b52ed217dad6a802ab1549c"
|
||||||
integrity sha512-jH6rKQIfroBbhEXVmI7XmXe3ix5S/PgJqpzdDPnR8JGLHWNYLsYZ6tK5iWOF/Ra3oqEX0NobXGlzbiylIzVphQ==
|
integrity sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw==
|
||||||
|
|
||||||
big.js@^5.2.2:
|
big.js@^5.2.2:
|
||||||
version "5.2.2"
|
version "5.2.2"
|
||||||
|
@ -959,15 +982,15 @@ browserify-sign@^4.0.0:
|
||||||
safe-buffer "^5.2.0"
|
safe-buffer "^5.2.0"
|
||||||
|
|
||||||
browserslist@^4.0.0:
|
browserslist@^4.0.0:
|
||||||
version "4.16.3"
|
version "4.16.4"
|
||||||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.3.tgz#340aa46940d7db878748567c5dea24a48ddf3717"
|
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.4.tgz#7ebf913487f40caf4637b892b268069951c35d58"
|
||||||
integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==
|
integrity sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite "^1.0.30001181"
|
caniuse-lite "^1.0.30001208"
|
||||||
colorette "^1.2.1"
|
colorette "^1.2.2"
|
||||||
electron-to-chromium "^1.3.649"
|
electron-to-chromium "^1.3.712"
|
||||||
escalade "^3.1.1"
|
escalade "^3.1.1"
|
||||||
node-releases "^1.1.70"
|
node-releases "^1.1.71"
|
||||||
|
|
||||||
buffer-es6@^4.9.2:
|
buffer-es6@^4.9.2:
|
||||||
version "4.9.3"
|
version "4.9.3"
|
||||||
|
@ -1083,10 +1106,10 @@ caniuse-api@^3.0.0:
|
||||||
lodash.memoize "^4.1.2"
|
lodash.memoize "^4.1.2"
|
||||||
lodash.uniq "^4.5.0"
|
lodash.uniq "^4.5.0"
|
||||||
|
|
||||||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001181:
|
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001208:
|
||||||
version "1.0.30001205"
|
version "1.0.30001208"
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz#d79bf6a6fb13196b4bb46e5143a22ca0242e0ef8"
|
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz#a999014a35cebd4f98c405930a057a0d75352eb9"
|
||||||
integrity sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==
|
integrity sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==
|
||||||
|
|
||||||
cardinal@^2.1.1:
|
cardinal@^2.1.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
|
@ -1282,7 +1305,7 @@ color@^3.0.0:
|
||||||
color-convert "^1.9.1"
|
color-convert "^1.9.1"
|
||||||
color-string "^1.5.4"
|
color-string "^1.5.4"
|
||||||
|
|
||||||
colorette@^1.1.0, colorette@^1.2.1, colorette@^1.2.2:
|
colorette@^1.1.0, colorette@^1.2.2:
|
||||||
version "1.2.2"
|
version "1.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94"
|
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94"
|
||||||
integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==
|
integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==
|
||||||
|
@ -1576,9 +1599,9 @@ css-tree@1.0.0-alpha.37:
|
||||||
source-map "^0.6.1"
|
source-map "^0.6.1"
|
||||||
|
|
||||||
css-tree@^1.1.2:
|
css-tree@^1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.2.tgz#9ae393b5dafd7dae8a622475caec78d3d8fbd7b5"
|
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d"
|
||||||
integrity sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==
|
integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
mdn-data "2.0.14"
|
mdn-data "2.0.14"
|
||||||
source-map "^0.6.1"
|
source-map "^0.6.1"
|
||||||
|
@ -1593,10 +1616,10 @@ cssesc@^3.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
|
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
|
||||||
integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
|
integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
|
||||||
|
|
||||||
cssnano-preset-default@^4.0.7:
|
cssnano-preset-default@^4.0.8:
|
||||||
version "4.0.7"
|
version "4.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz#51ec662ccfca0f88b396dcd9679cdb931be17f76"
|
resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz#920622b1fc1e95a34e8838203f1397a504f2d3ff"
|
||||||
integrity sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==
|
integrity sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
css-declaration-sorter "^4.0.1"
|
css-declaration-sorter "^4.0.1"
|
||||||
cssnano-util-raw-cache "^4.0.1"
|
cssnano-util-raw-cache "^4.0.1"
|
||||||
|
@ -1626,7 +1649,7 @@ cssnano-preset-default@^4.0.7:
|
||||||
postcss-ordered-values "^4.1.2"
|
postcss-ordered-values "^4.1.2"
|
||||||
postcss-reduce-initial "^4.0.3"
|
postcss-reduce-initial "^4.0.3"
|
||||||
postcss-reduce-transforms "^4.0.2"
|
postcss-reduce-transforms "^4.0.2"
|
||||||
postcss-svgo "^4.0.2"
|
postcss-svgo "^4.0.3"
|
||||||
postcss-unique-selectors "^4.0.1"
|
postcss-unique-selectors "^4.0.1"
|
||||||
|
|
||||||
cssnano-util-get-arguments@^4.0.0:
|
cssnano-util-get-arguments@^4.0.0:
|
||||||
|
@ -1652,12 +1675,12 @@ cssnano-util-same-parent@^4.0.0:
|
||||||
integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==
|
integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==
|
||||||
|
|
||||||
cssnano@^4.1.10:
|
cssnano@^4.1.10:
|
||||||
version "4.1.10"
|
version "4.1.11"
|
||||||
resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2"
|
resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.11.tgz#c7b5f5b81da269cb1fd982cb960c1200910c9a99"
|
||||||
integrity sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==
|
integrity sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g==
|
||||||
dependencies:
|
dependencies:
|
||||||
cosmiconfig "^5.0.0"
|
cosmiconfig "^5.0.0"
|
||||||
cssnano-preset-default "^4.0.7"
|
cssnano-preset-default "^4.0.8"
|
||||||
is-resolvable "^1.0.0"
|
is-resolvable "^1.0.0"
|
||||||
postcss "^7.0.0"
|
postcss "^7.0.0"
|
||||||
|
|
||||||
|
@ -1680,6 +1703,11 @@ dateformat@^3.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
|
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
|
||||||
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
|
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
|
||||||
|
|
||||||
|
dayjs@^1.10.4:
|
||||||
|
version "1.10.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.4.tgz#8e544a9b8683f61783f570980a8a80eaf54ab1e2"
|
||||||
|
integrity sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw==
|
||||||
|
|
||||||
debug@2.6.9:
|
debug@2.6.9:
|
||||||
version "2.6.9"
|
version "2.6.9"
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
||||||
|
@ -1882,9 +1910,9 @@ domelementtype@1:
|
||||||
integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==
|
integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==
|
||||||
|
|
||||||
domelementtype@^2.0.1:
|
domelementtype@^2.0.1:
|
||||||
version "2.1.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.1.0.tgz#a851c080a6d1c3d94344aed151d99f669edf585e"
|
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57"
|
||||||
integrity sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==
|
integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==
|
||||||
|
|
||||||
domino@^2.1.6:
|
domino@^2.1.6:
|
||||||
version "2.1.6"
|
version "2.1.6"
|
||||||
|
@ -1926,10 +1954,10 @@ ee-first@1.1.1:
|
||||||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
||||||
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
|
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
|
||||||
|
|
||||||
electron-to-chromium@^1.3.649:
|
electron-to-chromium@^1.3.712:
|
||||||
version "1.3.703"
|
version "1.3.713"
|
||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.703.tgz#6d9b9a75c42a40775f5930329e642b22b227317f"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.713.tgz#4583efb17f2d1e9ec07a44c8004ea73c013ad146"
|
||||||
integrity sha512-SVBVhNB+4zPL+rvtWLw7PZQkw/Eqj1HQZs22xtcqW36+xoifzEOEEDEpkxSMfB6RFeSIOcG00w6z5mSqLr1Y6w==
|
integrity sha512-HWgkyX4xTHmxcWWlvv7a87RHSINEcpKYZmDMxkUlHcY+CJcfx7xEfBHuXVsO1rzyYs1WQJ7EgDp2CoErakBIow==
|
||||||
|
|
||||||
elliptic@^6.5.3:
|
elliptic@^6.5.3:
|
||||||
version "6.5.4"
|
version "6.5.4"
|
||||||
|
@ -2652,9 +2680,9 @@ hook-std@^2.0.0:
|
||||||
integrity sha512-zZ6T5WcuBMIUVh49iPQS9t977t7C0l7OtHrpeMb5uk48JdflRX0NSFvCekfYNmGQETnLq9W/isMyHl69kxGi8g==
|
integrity sha512-zZ6T5WcuBMIUVh49iPQS9t977t7C0l7OtHrpeMb5uk48JdflRX0NSFvCekfYNmGQETnLq9W/isMyHl69kxGi8g==
|
||||||
|
|
||||||
hosted-git-info@^2.1.4:
|
hosted-git-info@^2.1.4:
|
||||||
version "2.8.8"
|
version "2.8.9"
|
||||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
|
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
|
||||||
integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
|
integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==
|
||||||
|
|
||||||
hosted-git-info@^4.0.0, hosted-git-info@^4.0.1, hosted-git-info@^4.0.2:
|
hosted-git-info@^4.0.0, hosted-git-info@^4.0.1, hosted-git-info@^4.0.2:
|
||||||
version "4.0.2"
|
version "4.0.2"
|
||||||
|
@ -2673,11 +2701,6 @@ hsla-regex@^1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38"
|
resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38"
|
||||||
integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg=
|
integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg=
|
||||||
|
|
||||||
html-comment-regex@^1.1.0:
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7"
|
|
||||||
integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==
|
|
||||||
|
|
||||||
http-cache-semantics@^4.1.0:
|
http-cache-semantics@^4.1.0:
|
||||||
version "4.1.0"
|
version "4.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
|
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
|
||||||
|
@ -2992,9 +3015,9 @@ is-directory@^0.3.1:
|
||||||
integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=
|
integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=
|
||||||
|
|
||||||
is-docker@^2.0.0:
|
is-docker@^2.0.0:
|
||||||
version "2.1.1"
|
version "2.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156"
|
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa"
|
||||||
integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==
|
integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==
|
||||||
|
|
||||||
is-extglob@^2.1.1:
|
is-extglob@^2.1.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
|
@ -3134,13 +3157,6 @@ is-string@^1.0.5:
|
||||||
resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6"
|
resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6"
|
||||||
integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==
|
integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==
|
||||||
|
|
||||||
is-svg@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75"
|
|
||||||
integrity sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==
|
|
||||||
dependencies:
|
|
||||||
html-comment-regex "^1.1.0"
|
|
||||||
|
|
||||||
is-symbol@^1.0.2, is-symbol@^1.0.3:
|
is-symbol@^1.0.2, is-symbol@^1.0.3:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937"
|
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937"
|
||||||
|
@ -3251,10 +3267,10 @@ json-schema@0.2.3:
|
||||||
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
|
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
|
||||||
integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
|
integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
|
||||||
|
|
||||||
json-stringify-nice@^1.1.1:
|
json-stringify-nice@^1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/json-stringify-nice/-/json-stringify-nice-1.1.2.tgz#955040f00eac984ad81b6d2966a07b5a6e19e512"
|
resolved "https://registry.yarnpkg.com/json-stringify-nice/-/json-stringify-nice-1.1.3.tgz#43991531d674ad5c19152d519047849935293add"
|
||||||
integrity sha512-mc0EsmCq4Ru6jTdKtKvzKzGJPa7eUHXe5/WAprXwyYYR1iY2qTcvaw3QBkPKGfJYvRr5vXoaIvMtttM+/f1xOA==
|
integrity sha512-w8+cZZFgcPtFkZTmkA1UpRH0GXXfpeuc/cClNkQjLt9JoQd8cBFSyB8J1WWjJrthIYViHobwnh3jA4z5X2LdGA==
|
||||||
|
|
||||||
json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
|
json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
|
||||||
version "5.0.1"
|
version "5.0.1"
|
||||||
|
@ -3305,9 +3321,9 @@ just-diff-apply@^3.0.0:
|
||||||
integrity sha512-K2MLc+ZC2DVxX4V61bIKPeMUUfj1YYZ3h0myhchDXOW1cKoPZMnjIoNCqv9bF2n5Oob1PFxuR2gVJxkxz4e58w==
|
integrity sha512-K2MLc+ZC2DVxX4V61bIKPeMUUfj1YYZ3h0myhchDXOW1cKoPZMnjIoNCqv9bF2n5Oob1PFxuR2gVJxkxz4e58w==
|
||||||
|
|
||||||
just-diff@^3.0.1:
|
just-diff@^3.0.1:
|
||||||
version "3.0.2"
|
version "3.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-3.0.2.tgz#65f4914e4d7500b364d12b7b3f03bcbacdac743b"
|
resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-3.1.1.tgz#d50c597c6fd4776495308c63bdee1b6839082647"
|
||||||
integrity sha512-+EiNvacECnZbszZa5IMjzrJ3dy2HKMXyGaNYWBnXy+iWW+437jIvQUrWaM9M+XI/6gOH8EjqvhGUOSh7ETekyg==
|
integrity sha512-sdMWKjRq8qWZEjDcVA6llnUT8RDEBIfOiGpYFPYa9u+2c39JCsejktSP7mj5eRid5EIvTzIpQ2kDOCw1Nq9BjQ==
|
||||||
|
|
||||||
kind-of@^6.0.3:
|
kind-of@^6.0.3:
|
||||||
version "6.0.3"
|
version "6.0.3"
|
||||||
|
@ -3654,9 +3670,9 @@ map-obj@^1.0.0:
|
||||||
integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=
|
integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=
|
||||||
|
|
||||||
map-obj@^4.0.0:
|
map-obj@^4.0.0:
|
||||||
version "4.2.0"
|
version "4.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.0.tgz#0e8bc823e2aaca8a0942567d12ed14f389eec153"
|
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.1.tgz#e4ea399dbc979ae735c83c863dd31bdf364277b7"
|
||||||
integrity sha512-NAq0fCmZYGz9UFEQyndp7sisrow4GroyGeKluyKC/chuITZsPyOyC1UJZPJlVFImhXdROIP5xqouRLThT3BbpQ==
|
integrity sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==
|
||||||
|
|
||||||
markdown-it@^12.0.4:
|
markdown-it@^12.0.4:
|
||||||
version "12.0.4"
|
version "12.0.4"
|
||||||
|
@ -3682,9 +3698,9 @@ marked-terminal@^4.1.1:
|
||||||
supports-hyperlinks "^2.1.0"
|
supports-hyperlinks "^2.1.0"
|
||||||
|
|
||||||
marked@^2.0.0:
|
marked@^2.0.0:
|
||||||
version "2.0.1"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.1.tgz#5e7ed7009bfa5c95182e4eb696f85e948cefcee3"
|
resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.3.tgz#3551c4958c4da36897bda2a16812ef1399c8d6b0"
|
||||||
integrity sha512-5+/fKgMv2hARmMW7DOpykr2iLhl0NgjyELk5yn92iE7z8Se1IS9n3UsFm86hFXIkvMBmVxki8+ckcpjBeyo/hw==
|
integrity sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA==
|
||||||
|
|
||||||
md5.js@^1.3.4:
|
md5.js@^1.3.4:
|
||||||
version "1.3.5"
|
version "1.3.5"
|
||||||
|
@ -3753,12 +3769,12 @@ methods@~1.1.2:
|
||||||
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
|
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
|
||||||
|
|
||||||
micromatch@^4.0.2:
|
micromatch@^4.0.2:
|
||||||
version "4.0.2"
|
version "4.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259"
|
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9"
|
||||||
integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==
|
integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==
|
||||||
dependencies:
|
dependencies:
|
||||||
braces "^3.0.1"
|
braces "^3.0.1"
|
||||||
picomatch "^2.0.5"
|
picomatch "^2.2.3"
|
||||||
|
|
||||||
miller-rabin@^4.0.0:
|
miller-rabin@^4.0.0:
|
||||||
version "4.0.1"
|
version "4.0.1"
|
||||||
|
@ -3768,17 +3784,17 @@ miller-rabin@^4.0.0:
|
||||||
bn.js "^4.0.0"
|
bn.js "^4.0.0"
|
||||||
brorand "^1.0.1"
|
brorand "^1.0.1"
|
||||||
|
|
||||||
mime-db@1.46.0:
|
mime-db@1.47.0:
|
||||||
version "1.46.0"
|
version "1.47.0"
|
||||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee"
|
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c"
|
||||||
integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==
|
integrity sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==
|
||||||
|
|
||||||
mime-types@^2.1.12, mime-types@^2.1.24, mime-types@^2.1.26, mime-types@^2.1.29, mime-types@~2.1.19, mime-types@~2.1.24:
|
mime-types@^2.1.12, mime-types@^2.1.24, mime-types@^2.1.26, mime-types@^2.1.29, mime-types@~2.1.19, mime-types@~2.1.24:
|
||||||
version "2.1.29"
|
version "2.1.30"
|
||||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2"
|
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.30.tgz#6e7be8b4c479825f85ed6326695db73f9305d62d"
|
||||||
integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==
|
integrity sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==
|
||||||
dependencies:
|
dependencies:
|
||||||
mime-db "1.46.0"
|
mime-db "1.47.0"
|
||||||
|
|
||||||
mime@1.6.0:
|
mime@1.6.0:
|
||||||
version "1.6.0"
|
version "1.6.0"
|
||||||
|
@ -4009,15 +4025,15 @@ node-gyp@^7.1.0, node-gyp@^7.1.2:
|
||||||
tar "^6.0.2"
|
tar "^6.0.2"
|
||||||
which "^2.0.2"
|
which "^2.0.2"
|
||||||
|
|
||||||
node-releases@^1.1.70:
|
node-releases@^1.1.71:
|
||||||
version "1.1.71"
|
version "1.1.71"
|
||||||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb"
|
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb"
|
||||||
integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==
|
integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==
|
||||||
|
|
||||||
nollup@>=0.8.4:
|
nollup@>=0.8.4:
|
||||||
version "0.16.0"
|
version "0.16.1"
|
||||||
resolved "https://registry.yarnpkg.com/nollup/-/nollup-0.16.0.tgz#447b6607dbe86c984dc89398090b28b44fe09e7f"
|
resolved "https://registry.yarnpkg.com/nollup/-/nollup-0.16.1.tgz#fcbf83103e2903c19b9a8a6547816442925a14f2"
|
||||||
integrity sha512-rPtRhyPU9yWTOoMYnaZqkh9A6e7h8U6AdK/3515RnZ37s43pJJT1tADmEhamdsJ3ghAf0j5q98s4zQDgjgPW0g==
|
integrity sha512-G4XtdErjDS9QEw5jK38hLR6W57TwkpiMFvTpkpHunPg3t2wSZwsBTPqENTfNPundAip0GFNefyAvT8LGEtvkkQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@rollup/pluginutils" "^3.0.8"
|
"@rollup/pluginutils" "^3.0.8"
|
||||||
acorn "^8.1.0"
|
acorn "^8.1.0"
|
||||||
|
@ -4087,10 +4103,10 @@ normalize-url@^3.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
|
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
|
||||||
integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
|
integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
|
||||||
|
|
||||||
normalize-url@^5.0.0:
|
normalize-url@^6.0.0:
|
||||||
version "5.3.0"
|
version "6.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-5.3.0.tgz#8959b3cdaa295b61592c1f245dded34b117618dd"
|
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.0.0.tgz#688ba4251cc46350f5adf4e65e14b7113a752684"
|
||||||
integrity sha512-9/nOVLYYe/dO/eJeQUNaGUF4m4Z5E7cb9oNTKabH+bNf19mqj60txTcveQxL0GlcWLXCxkOu2/LwL8oW0idIDA==
|
integrity sha512-3nv3dKMucKPEXhx/FEtJQR26ksYdyVlLEP9/dYvYwCbLbP6H8ya94IRf+mB93ec+fndv/Ye8SylWfD7jmN6kSA==
|
||||||
|
|
||||||
npm-audit-report@^2.1.4:
|
npm-audit-report@^2.1.4:
|
||||||
version "2.1.4"
|
version "2.1.4"
|
||||||
|
@ -4181,13 +4197,13 @@ npm-user-validate@^1.0.1:
|
||||||
integrity sha512-uQwcd/tY+h1jnEaze6cdX/LrhWhoBxfSknxentoqmIuStxUExxjWd3ULMLFPiFUrZKbOVMowH6Jq2FRWfmhcEw==
|
integrity sha512-uQwcd/tY+h1jnEaze6cdX/LrhWhoBxfSknxentoqmIuStxUExxjWd3ULMLFPiFUrZKbOVMowH6Jq2FRWfmhcEw==
|
||||||
|
|
||||||
npm@^7.0.0:
|
npm@^7.0.0:
|
||||||
version "7.7.6"
|
version "7.9.0"
|
||||||
resolved "https://registry.yarnpkg.com/npm/-/npm-7.7.6.tgz#8cd025b76498809cdea4bf1bfff9b049115cc6a9"
|
resolved "https://registry.yarnpkg.com/npm/-/npm-7.9.0.tgz#68ae6c36d05448b34cc4b6929d2bacf184a913fb"
|
||||||
integrity sha512-4dOo2M/SRzRNWH1e0tmcJMFkDjHJKsJQlxpi3OgJ/N/BsIvbdQFFMioG0vmuFVAev7P2f/rShApb18jk5RpdXA==
|
integrity sha512-GW9RbueF717kJ4ZUVsTlhKBEY7AqX28OwQCsfIAkRZclfeeqQDnsoJz6WWuYTMpGBJnB2xknF8Dp364c93FDYA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@npmcli/arborist" "^2.2.9"
|
"@npmcli/arborist" "^2.3.0"
|
||||||
"@npmcli/ci-detect" "^1.2.0"
|
"@npmcli/ci-detect" "^1.2.0"
|
||||||
"@npmcli/config" "^2.0.0"
|
"@npmcli/config" "^2.1.0"
|
||||||
"@npmcli/run-script" "^1.8.4"
|
"@npmcli/run-script" "^1.8.4"
|
||||||
abbrev "~1.1.1"
|
abbrev "~1.1.1"
|
||||||
ansicolors "~0.3.2"
|
ansicolors "~0.3.2"
|
||||||
|
@ -4610,9 +4626,9 @@ path-type@^4.0.0:
|
||||||
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
|
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
|
||||||
|
|
||||||
pbkdf2@^3.0.3:
|
pbkdf2@^3.0.3:
|
||||||
version "3.1.1"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94"
|
resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075"
|
||||||
integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==
|
integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==
|
||||||
dependencies:
|
dependencies:
|
||||||
create-hash "^1.1.2"
|
create-hash "^1.1.2"
|
||||||
create-hmac "^1.1.4"
|
create-hmac "^1.1.4"
|
||||||
|
@ -4625,10 +4641,10 @@ performance-now@^2.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
||||||
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
|
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
|
||||||
|
|
||||||
picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1, picomatch@^2.2.2:
|
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3:
|
||||||
version "2.2.2"
|
version "2.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
|
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d"
|
||||||
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
|
integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==
|
||||||
|
|
||||||
pify@^2.0.0:
|
pify@^2.0.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
|
@ -4967,12 +4983,11 @@ postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4:
|
||||||
uniq "^1.0.1"
|
uniq "^1.0.1"
|
||||||
util-deprecate "^1.0.2"
|
util-deprecate "^1.0.2"
|
||||||
|
|
||||||
postcss-svgo@^4.0.2:
|
postcss-svgo@^4.0.3:
|
||||||
version "4.0.2"
|
version "4.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.2.tgz#17b997bc711b333bab143aaed3b8d3d6e3d38258"
|
resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.3.tgz#343a2cdbac9505d416243d496f724f38894c941e"
|
||||||
integrity sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==
|
integrity sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw==
|
||||||
dependencies:
|
dependencies:
|
||||||
is-svg "^3.0.0"
|
|
||||||
postcss "^7.0.0"
|
postcss "^7.0.0"
|
||||||
postcss-value-parser "^3.0.0"
|
postcss-value-parser "^3.0.0"
|
||||||
svgo "^1.0.0"
|
svgo "^1.0.0"
|
||||||
|
@ -5006,9 +5021,9 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.27:
|
||||||
supports-color "^6.1.0"
|
supports-color "^6.1.0"
|
||||||
|
|
||||||
postcss@^8.2.1, postcss@^8.2.9:
|
postcss@^8.2.1, postcss@^8.2.9:
|
||||||
version "8.2.9"
|
version "8.2.10"
|
||||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.9.tgz#fd95ff37b5cee55c409b3fdd237296ab4096fba3"
|
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.10.tgz#ca7a042aa8aff494b334d0ff3e9e77079f6f702b"
|
||||||
integrity sha512-b+TmuIL4jGtCHtoLi+G/PisuIl9avxs8IZMSmlABRwNz5RLUUACrC+ws81dcomz1nRezm5YPdXiMEzBEKgYn+Q==
|
integrity sha512-b/h7CPV7QEdrqIxtAf2j31U5ef05uBDuvoXv6L51Q4rcS1jdlXAVKJv+atCFdUXYl9dyTHGyoMzIepwowRJjFw==
|
||||||
dependencies:
|
dependencies:
|
||||||
colorette "^1.2.2"
|
colorette "^1.2.2"
|
||||||
nanoid "^3.1.22"
|
nanoid "^3.1.22"
|
||||||
|
@ -5563,9 +5578,9 @@ rollup-pluginutils@^2.8.2:
|
||||||
estree-walker "^0.6.1"
|
estree-walker "^0.6.1"
|
||||||
|
|
||||||
rollup@^2.34.0, rollup@^2.38.5:
|
rollup@^2.34.0, rollup@^2.38.5:
|
||||||
version "2.44.0"
|
version "2.45.2"
|
||||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.44.0.tgz#8da324d1c4fd12beef9ae6e12f4068265b6d95eb"
|
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.45.2.tgz#8fb85917c9f35605720e92328f3ccbfba6f78b48"
|
||||||
integrity sha512-rGSF4pLwvuaH/x4nAS+zP6UNn5YUDWf/TeEU5IoXSZKBbKRNTCI3qMnYXKZgrC0D2KzS2baiOZt1OlqhMu5rnQ==
|
integrity sha512-kRRU7wXzFHUzBIv0GfoFFIN3m9oteY4uAsKllIpQDId5cfnkWF2J130l+27dzDju0E6MScKiV0ZM5Bw8m4blYQ==
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
fsevents "~2.3.1"
|
fsevents "~2.3.1"
|
||||||
|
|
||||||
|
@ -6086,9 +6101,9 @@ supports-color@^7.0.0, supports-color@^7.1.0:
|
||||||
has-flag "^4.0.0"
|
has-flag "^4.0.0"
|
||||||
|
|
||||||
supports-hyperlinks@^2.1.0:
|
supports-hyperlinks@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47"
|
resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb"
|
||||||
integrity sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==
|
integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
has-flag "^4.0.0"
|
has-flag "^4.0.0"
|
||||||
supports-color "^7.0.0"
|
supports-color "^7.0.0"
|
||||||
|
@ -6105,10 +6120,10 @@ svelte-hmr@^0.11.3:
|
||||||
resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.11.6.tgz#67f0498e2cdce9e1039631d820c1951bd01caa3f"
|
resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.11.6.tgz#67f0498e2cdce9e1039631d820c1951bd01caa3f"
|
||||||
integrity sha512-XUYcp7W26q/fF8tABZfCYGklwL4TDH48gc1KOjuBQNlTiMW63l/+rRqmfVOE/qKG5vns0J2NPo3zFjdahkwoHA==
|
integrity sha512-XUYcp7W26q/fF8tABZfCYGklwL4TDH48gc1KOjuBQNlTiMW63l/+rRqmfVOE/qKG5vns0J2NPo3zFjdahkwoHA==
|
||||||
|
|
||||||
svelte-hmr@^0.13.3:
|
svelte-hmr@^0.14.0:
|
||||||
version "0.13.3"
|
version "0.14.0"
|
||||||
resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.13.3.tgz#fba5739b477ea44caf70e542a24a4352bee2b897"
|
resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.0.tgz#d11c6d2b53d1e7cde51b57cdb7e65c0e4415cb8d"
|
||||||
integrity sha512-gagW62pLQ2lULmvNA3pIZu9pBCYOaGu3rQikUOv6Nokz5VxUgT9/mQLfMxj9phDEKHCg/lgr3i6PkqZDbO9P2Q==
|
integrity sha512-Rc4w11U+U30m/cHqOJ/xioFSEAY5fd5muiQC7FL6XJuJAuB2OIJoEZl3KEJR2uO1/f4Bw0PdrugtbxcngSsOtQ==
|
||||||
|
|
||||||
svelte-key@^1.0.0:
|
svelte-key@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
|
@ -6355,9 +6370,9 @@ uc.micro@^1.0.1, uc.micro@^1.0.5:
|
||||||
integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
|
integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
|
||||||
|
|
||||||
uglify-js@^3.1.4:
|
uglify-js@^3.1.4:
|
||||||
version "3.13.3"
|
version "3.13.4"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.3.tgz#ce72a1ad154348ea2af61f50933c76cc8802276e"
|
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.4.tgz#592588bb9f47ae03b24916e2471218d914955574"
|
||||||
integrity sha512-otIc7O9LyxpUcQoXzj2hL4LPWKklO6LJWoJUzNa8A17Xgi4fOeDC8FBDOLHnC/Slo1CQgsZMcM6as0M76BZaig==
|
integrity sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==
|
||||||
|
|
||||||
unbox-primitive@^1.0.0:
|
unbox-primitive@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
@ -6617,9 +6632,9 @@ xtend@~4.0.1:
|
||||||
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
|
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
|
||||||
|
|
||||||
y18n@^5.0.5:
|
y18n@^5.0.5:
|
||||||
version "5.0.5"
|
version "5.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18"
|
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
||||||
integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==
|
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
|
||||||
|
|
||||||
yallist@^4.0.0:
|
yallist@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
|
|
|
@ -29,9 +29,18 @@
|
||||||
$: {
|
$: {
|
||||||
if ($views.selected?.name?.startsWith("all_")) {
|
if ($views.selected?.name?.startsWith("all_")) {
|
||||||
loading = true
|
loading = true
|
||||||
|
const loadingTableId = $tables.selected?._id
|
||||||
api.fetchDataForView($views.selected).then(rows => {
|
api.fetchDataForView($views.selected).then(rows => {
|
||||||
data = rows || []
|
|
||||||
loading = false
|
loading = false
|
||||||
|
|
||||||
|
// If we started a slow request then quickly change table, sometimes
|
||||||
|
// the old data overwrites the new data.
|
||||||
|
// This check ensures that we don't do that.
|
||||||
|
if (loadingTableId !== $tables.selected?._id) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
data = rows || []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,18 @@
|
||||||
<script>
|
<script>
|
||||||
import { fade } from "svelte/transition"
|
import { fade } from "svelte/transition"
|
||||||
import { goto, params } from "@roxi/routify"
|
import { goto, params } from "@roxi/routify"
|
||||||
import AgGrid from "@budibase/svelte-ag-grid"
|
import { Table, Modal } from "@budibase/bbui"
|
||||||
|
|
||||||
import api from "builderStore/api"
|
import api from "builderStore/api"
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications } from "@budibase/bbui"
|
||||||
import Spinner from "components/common/Spinner.svelte"
|
import Spinner from "components/common/Spinner.svelte"
|
||||||
import DeleteRowsButton from "./buttons/DeleteRowsButton.svelte"
|
import DeleteRowsButton from "./buttons/DeleteRowsButton.svelte"
|
||||||
import {
|
import CreateEditRow from "./modals/CreateEditRow.svelte"
|
||||||
getRenderer,
|
import CreateEditUser from "./modals/CreateEditUser.svelte"
|
||||||
editRowRenderer,
|
import CreateEditColumn from "./modals/CreateEditColumn.svelte"
|
||||||
userRowRenderer,
|
|
||||||
} from "./cells/cellRenderers"
|
|
||||||
import TableLoadingOverlay from "./TableLoadingOverlay"
|
|
||||||
import TableHeader from "./TableHeader"
|
|
||||||
import "@budibase/svelte-ag-grid/dist/index.css"
|
import "@budibase/svelte-ag-grid/dist/index.css"
|
||||||
import { TableNames, UNEDITABLE_USER_FIELDS } from "constants"
|
import { TableNames, UNEDITABLE_USER_FIELDS } from "constants"
|
||||||
|
import RoleCell from "./cells/RoleCell.svelte"
|
||||||
|
|
||||||
export let schema = {}
|
export let schema = {}
|
||||||
export let data = []
|
export let data = []
|
||||||
|
@ -26,113 +23,44 @@
|
||||||
export let theme = "alpine"
|
export let theme = "alpine"
|
||||||
export let hideAutocolumns
|
export let hideAutocolumns
|
||||||
|
|
||||||
let columnDefs = []
|
|
||||||
let selectedRows = []
|
let selectedRows = []
|
||||||
|
let editableColumn
|
||||||
let options = {
|
let editableRow
|
||||||
defaultColDef: {
|
let editRowModal
|
||||||
flex: 1,
|
let editColumnModal
|
||||||
filter: true,
|
let customRenderers = []
|
||||||
},
|
|
||||||
rowSelection: allowEditing ? "multiple" : false,
|
|
||||||
rowMultiSelectWithClick: true,
|
|
||||||
suppressRowClickSelection: false,
|
|
||||||
suppressFieldDotNotation: true,
|
|
||||||
paginationAutoPageSize: true,
|
|
||||||
pagination: true,
|
|
||||||
enableRangeSelection: true,
|
|
||||||
popupParent: document.body,
|
|
||||||
components: {
|
|
||||||
customLoadingOverlay: TableLoadingOverlay,
|
|
||||||
},
|
|
||||||
loadingOverlayComponent: "customLoadingOverlay",
|
|
||||||
animateRows: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
$: isUsersTable = tableId === TableNames.USERS
|
$: isUsersTable = tableId === TableNames.USERS
|
||||||
|
$: data && resetSelectedRows()
|
||||||
|
$: editRowComponent = isUsersTable ? CreateEditUser : CreateEditRow
|
||||||
$: {
|
$: {
|
||||||
if (isUsersTable) {
|
if (isUsersTable) {
|
||||||
schema.email.displayFieldName = "Email"
|
customRenderers = [
|
||||||
schema.roleId.displayFieldName = "Role"
|
|
||||||
if (schema.status) {
|
|
||||||
schema.status.displayFieldName = "Status"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$: {
|
|
||||||
// Reset selection every time data changes
|
|
||||||
selectedRows = []
|
|
||||||
|
|
||||||
let result = []
|
|
||||||
if (allowEditing) {
|
|
||||||
result = [
|
|
||||||
{
|
{
|
||||||
checkboxSelection: true,
|
column: "roleId",
|
||||||
lockPosition: true,
|
component: RoleCell,
|
||||||
headerName: "Edit",
|
|
||||||
pinned: "left",
|
|
||||||
sortable: false,
|
|
||||||
resizable: false,
|
|
||||||
suppressMovable: true,
|
|
||||||
suppressMenu: true,
|
|
||||||
minWidth: 114,
|
|
||||||
width: 114,
|
|
||||||
cellRenderer: isUsersTable ? userRowRenderer : editRowRenderer,
|
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
UNEDITABLE_USER_FIELDS.forEach(field => {
|
||||||
|
if (schema[field]) {
|
||||||
|
schema[field].editable = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
schema.email.displayName = "Email"
|
||||||
|
schema.roleId.displayName = "Role"
|
||||||
|
if (schema.status) {
|
||||||
|
schema.status.displayName = "Status"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const canEditColumn = key => {
|
const resetSelectedRows = () => {
|
||||||
if (!allowEditing) {
|
selectedRows = []
|
||||||
return false
|
|
||||||
}
|
|
||||||
return !(isUsersTable && UNEDITABLE_USER_FIELDS.includes(key))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let [key, value] of Object.entries(schema || {})) {
|
const selectRelationship = ({ tableId, rowId, fieldName }) => {
|
||||||
// skip autocolumns if hiding
|
|
||||||
if (hideAutocolumns && value.autocolumn) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
let config = {
|
|
||||||
headerCheckboxSelection: false,
|
|
||||||
headerComponent: TableHeader,
|
|
||||||
headerComponentParams: {
|
|
||||||
field: schema[key],
|
|
||||||
editable: canEditColumn(key),
|
|
||||||
},
|
|
||||||
headerName: value.displayFieldName || key,
|
|
||||||
field: key,
|
|
||||||
sortable: true,
|
|
||||||
cellRenderer: getRenderer({
|
|
||||||
schema: schema[key],
|
|
||||||
editable: true,
|
|
||||||
isUsersTable,
|
|
||||||
}),
|
|
||||||
cellRendererParams: {
|
|
||||||
selectRelationship,
|
|
||||||
},
|
|
||||||
autoHeight: true,
|
|
||||||
resizable: true,
|
|
||||||
minWidth: 200,
|
|
||||||
}
|
|
||||||
// sort auto-columns to the end if they are present
|
|
||||||
if (value.autocolumn) {
|
|
||||||
result.push(config)
|
|
||||||
} else {
|
|
||||||
result.unshift(config)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
columnDefs = result
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectRelationship(row, fieldName) {
|
|
||||||
if (!row?.[fieldName]?.length) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
$goto(
|
$goto(
|
||||||
`/${$params.application}/data/table/${row.tableId}/relationship/${row._id}/${fieldName}`
|
`/builder/${$params.application}/data/table/${tableId}/relationship/${rowId}/${fieldName}`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +73,20 @@
|
||||||
notifications.success(`Successfully deleted ${selectedRows.length} rows`)
|
notifications.success(`Successfully deleted ${selectedRows.length} rows`)
|
||||||
selectedRows = []
|
selectedRows = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const editRow = row => {
|
||||||
|
editableRow = row
|
||||||
|
if (row) {
|
||||||
|
editRowModal.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const editColumn = field => {
|
||||||
|
editableColumn = schema?.[field]
|
||||||
|
if (editableColumn) {
|
||||||
|
editColumnModal.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -163,17 +105,28 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-wrapper">
|
{#key tableId}
|
||||||
{#key columnDefs.length}
|
<Table
|
||||||
<AgGrid
|
|
||||||
{theme}
|
|
||||||
{options}
|
|
||||||
{data}
|
{data}
|
||||||
{columnDefs}
|
{schema}
|
||||||
{loading}
|
{loading}
|
||||||
on:select={({ detail }) => (selectedRows = detail)} />
|
{customRenderers}
|
||||||
|
bind:selectedRows
|
||||||
|
allowSelectRows={allowEditing}
|
||||||
|
allowEditRows={allowEditing}
|
||||||
|
allowEditColumns={allowEditing}
|
||||||
|
showAutoColumns={!hideAutocolumns}
|
||||||
|
on:editcolumn={e => editColumn(e.detail)}
|
||||||
|
on:editrow={e => editRow(e.detail)}
|
||||||
|
on:clickrelationship={e => selectRelationship(e.detail)} />
|
||||||
{/key}
|
{/key}
|
||||||
</div>
|
|
||||||
|
<Modal bind:this={editRowModal}>
|
||||||
|
<svelte:component this={editRowComponent} row={editableRow} />
|
||||||
|
</Modal>
|
||||||
|
<Modal bind:this={editColumnModal}>
|
||||||
|
<CreateEditColumn field={editableColumn} onClosed={editColumnModal.hide} />
|
||||||
|
</Modal>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.table-title {
|
.table-title {
|
||||||
|
@ -206,108 +159,4 @@
|
||||||
.popovers :global(button svg) {
|
.popovers :global(button svg) {
|
||||||
margin-right: var(--spacing-xs);
|
margin-right: var(--spacing-xs);
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-wrapper {
|
|
||||||
flex: 1 1 auto;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
.grid-wrapper :global(> *) {
|
|
||||||
flex: 1 1 auto;
|
|
||||||
}
|
|
||||||
:global(.grid-wrapper) {
|
|
||||||
--ag-modal-overlay-background-color: transparent;
|
|
||||||
--ag-border-color: var(--grey-3);
|
|
||||||
--ag-header-background-color: var(--grey-1);
|
|
||||||
--ag-odd-row-background-color: var(--grey-1);
|
|
||||||
--ag-row-border-color: var(--grey-3);
|
|
||||||
--ag-background-color: var(--background);
|
|
||||||
--ag-foreground-color: var(--ink);
|
|
||||||
}
|
|
||||||
:global(.ag-overlay-loading-center) {
|
|
||||||
box-shadow: 0 0 8px 4px rgba(0, 0, 0, 0.05) !important;
|
|
||||||
border-color: var(--grey-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-menu) {
|
|
||||||
border: var(--border-dark) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-popup-child) {
|
|
||||||
border-radius: var(--border-radius-m) !important;
|
|
||||||
box-shadow: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-header-cell-text) {
|
|
||||||
font-family: var(--font-sans);
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--ink);
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-filter) {
|
|
||||||
background: var(--background);
|
|
||||||
padding: var(--spacing-s);
|
|
||||||
outline: none;
|
|
||||||
box-sizing: border-box;
|
|
||||||
color: var(--ink);
|
|
||||||
border-radius: var(--border-radius-m);
|
|
||||||
font-family: var(--font-sans) !important;
|
|
||||||
box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-menu) {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-simple-filter-body-wrapper > *) {
|
|
||||||
margin-bottom: var(--spacing-m) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-select) {
|
|
||||||
height: inherit !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-menu input) {
|
|
||||||
color: var(--ink) !important;
|
|
||||||
font-size: var(--font-size-xs);
|
|
||||||
border-radius: var(--border-radius-s) !important;
|
|
||||||
border: none;
|
|
||||||
background-color: var(--grey-2) !important;
|
|
||||||
padding: var(--spacing-m);
|
|
||||||
margin: 0;
|
|
||||||
outline: none;
|
|
||||||
font-family: var(--font-sans);
|
|
||||||
border: var(--border-transparent) !important;
|
|
||||||
transition: 0.2s all;
|
|
||||||
}
|
|
||||||
:global(.ag-menu input:focus) {
|
|
||||||
border: var(--border-blue) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-picker-field-display) {
|
|
||||||
color: var(--ink) !important;
|
|
||||||
font-size: var(--font-size-xs) !important;
|
|
||||||
border-radius: var(--border-radius-s) !important;
|
|
||||||
background-color: var(--grey-2) !important;
|
|
||||||
font-family: var(--font-sans);
|
|
||||||
border: var(--border-transparent) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-picker-field-wrapper) {
|
|
||||||
background: var(--grey-2) !important;
|
|
||||||
border: var(--border-transparent) !important;
|
|
||||||
padding-top: var(--spacing-xs);
|
|
||||||
padding-bottom: var(--spacing-xs);
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-header) {
|
|
||||||
height: 61px !important;
|
|
||||||
min-height: 61px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.ag-header-row) {
|
|
||||||
height: 60px !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
tableId={view.tableId}
|
tableId={view.tableId}
|
||||||
{data}
|
{data}
|
||||||
{loading}
|
{loading}
|
||||||
|
allowEditing={!view?.calculation}
|
||||||
bind:hideAutocolumns>
|
bind:hideAutocolumns>
|
||||||
<FilterButton {view} />
|
<FilterButton {view} />
|
||||||
<CalculateButton {view} />
|
<CalculateButton {view} />
|
||||||
|
|
|
@ -1,69 +0,0 @@
|
||||||
<script>
|
|
||||||
import { FILE_TYPES } from "constants/backend"
|
|
||||||
|
|
||||||
export let files
|
|
||||||
export let height = "70"
|
|
||||||
export let width = "70"
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="file-list">
|
|
||||||
{#each files as file}
|
|
||||||
<div class="file">
|
|
||||||
{#if FILE_TYPES.IMAGE.includes(file.extension.toLowerCase())}
|
|
||||||
<img {width} {height} src={file.url} />
|
|
||||||
{:else}
|
|
||||||
<span class="extension">.{file.extension}</span>
|
|
||||||
<i class="ri-file-line" />
|
|
||||||
<span>{file.name}</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.file-list {
|
|
||||||
display: grid;
|
|
||||||
grid-auto-flow: column;
|
|
||||||
grid-gap: var(--spacing-m);
|
|
||||||
grid-template-columns: repeat(10, 1fr);
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
i {
|
|
||||||
font-size: 24px;
|
|
||||||
position: relative;
|
|
||||||
top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.file {
|
|
||||||
height: 75px;
|
|
||||||
width: 75px;
|
|
||||||
border: 2px dashed var(--grey-7);
|
|
||||||
padding: var(--spacing-m);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
justify-content: center;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.extension {
|
|
||||||
position: absolute;
|
|
||||||
top: -5px;
|
|
||||||
font-size: var(--font-size-xs);
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
font-size: var(--font-size-xs);
|
|
||||||
width: 75px;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,45 +0,0 @@
|
||||||
<script>
|
|
||||||
export let columnName
|
|
||||||
export let row
|
|
||||||
export let selectRelationship
|
|
||||||
|
|
||||||
$: items = row?.[columnName] || []
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="container"
|
|
||||||
class:link={!!items.length}
|
|
||||||
on:click={() => selectRelationship(row, columnName)}>
|
|
||||||
{#each items as item}
|
|
||||||
<div class="item">{item?.primaryDisplay ?? ''}</div>
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
gap: var(--spacing-xs);
|
|
||||||
}
|
|
||||||
|
|
||||||
.link:hover {
|
|
||||||
color: var(--grey-6);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.link:hover .item {
|
|
||||||
color: var(--ink);
|
|
||||||
border-color: var(--ink);
|
|
||||||
}
|
|
||||||
|
|
||||||
.item {
|
|
||||||
font-size: var(--font-size-xs);
|
|
||||||
padding: var(--spacing-xs) var(--spacing-s);
|
|
||||||
border: 1px solid var(--grey-5);
|
|
||||||
color: var(--grey-7);
|
|
||||||
line-height: normal;
|
|
||||||
border-radius: 4px;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script>
|
<script>
|
||||||
import { roles } from "stores/backend"
|
import { roles } from "stores/backend"
|
||||||
|
|
||||||
export let roleId
|
export let value
|
||||||
|
|
||||||
$: role = $roles.find(role => role._id === roleId)
|
$: role = $roles.find(role => role._id === value)
|
||||||
$: roleName = role?.name ?? "Unknown role"
|
$: roleName = role?.name ?? "Unknown role"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>{roleName}</div>
|
{roleName}
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
import AttachmentList from "./AttachmentCell.svelte"
|
|
||||||
import EditRow from "../modals/EditRow.svelte"
|
|
||||||
import CreateEditUser from "../modals/CreateEditUser.svelte"
|
|
||||||
import DeleteRow from "../modals/DeleteRow.svelte"
|
|
||||||
import RelationshipDisplay from "./RelationshipCell.svelte"
|
|
||||||
import RoleCell from "./RoleCell.svelte"
|
|
||||||
|
|
||||||
const renderers = {
|
|
||||||
attachment: attachmentRenderer,
|
|
||||||
link: linkedRowRenderer,
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getRenderer({ schema, editable, isUsersTable }) {
|
|
||||||
const rendererParams = {
|
|
||||||
options: schema.options,
|
|
||||||
constraints: schema.constraints,
|
|
||||||
editable,
|
|
||||||
}
|
|
||||||
if (renderers[schema.type]) {
|
|
||||||
return renderers[schema.type](rendererParams)
|
|
||||||
} else if (isUsersTable && schema.name === "roleId") {
|
|
||||||
return roleRenderer(rendererParams)
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function deleteRowRenderer(params) {
|
|
||||||
const container = document.createElement("div")
|
|
||||||
|
|
||||||
new DeleteRow({
|
|
||||||
target: container,
|
|
||||||
props: {
|
|
||||||
row: params.data,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return container
|
|
||||||
}
|
|
||||||
|
|
||||||
export function editRowRenderer(params) {
|
|
||||||
const container = document.createElement("div")
|
|
||||||
container.style.height = "100%"
|
|
||||||
container.style.display = "flex"
|
|
||||||
container.style.alignItems = "center"
|
|
||||||
|
|
||||||
new EditRow({
|
|
||||||
target: container,
|
|
||||||
props: {
|
|
||||||
row: params.data,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return container
|
|
||||||
}
|
|
||||||
|
|
||||||
export function userRowRenderer(params) {
|
|
||||||
const container = document.createElement("div")
|
|
||||||
container.style.height = "100%"
|
|
||||||
container.style.display = "flex"
|
|
||||||
container.style.alignItems = "center"
|
|
||||||
|
|
||||||
new EditRow({
|
|
||||||
target: container,
|
|
||||||
props: {
|
|
||||||
row: params.data,
|
|
||||||
modalContentComponent: CreateEditUser,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return container
|
|
||||||
}
|
|
||||||
|
|
||||||
function attachmentRenderer() {
|
|
||||||
return params => {
|
|
||||||
const container = document.createElement("div")
|
|
||||||
container.style.height = "100%"
|
|
||||||
container.style.display = "flex"
|
|
||||||
container.style.alignItems = "center"
|
|
||||||
|
|
||||||
new AttachmentList({
|
|
||||||
target: container,
|
|
||||||
props: {
|
|
||||||
files: params.value || [],
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return container
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function linkedRowRenderer() {
|
|
||||||
return params => {
|
|
||||||
let container = document.createElement("div")
|
|
||||||
container.style.display = "grid"
|
|
||||||
container.style.height = "100%"
|
|
||||||
container.style.alignItems = "center"
|
|
||||||
|
|
||||||
new RelationshipDisplay({
|
|
||||||
target: container,
|
|
||||||
props: {
|
|
||||||
row: params.data,
|
|
||||||
columnName: params.column.colId,
|
|
||||||
selectRelationship: params.selectRelationship,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return container
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function roleRenderer() {
|
|
||||||
return params => {
|
|
||||||
let container = document.createElement("div")
|
|
||||||
container.style.display = "grid"
|
|
||||||
container.style.height = "100%"
|
|
||||||
container.style.alignItems = "center"
|
|
||||||
|
|
||||||
new RoleCell({
|
|
||||||
target: container,
|
|
||||||
props: {
|
|
||||||
roleId: params.value,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return container
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -72,7 +72,7 @@
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
padding: var(--spacing-l) 40px;
|
padding: var(--spacing-l) 40px 40px 40px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -81,6 +81,9 @@
|
||||||
gap: var(--spacing-l);
|
gap: var(--spacing-l);
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
}
|
}
|
||||||
|
.content :global(> span) {
|
||||||
|
display: contents;
|
||||||
|
}
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
|
@ -5,6 +5,7 @@ const fetch = require("node-fetch")
|
||||||
const PouchDB = require("../../../db")
|
const PouchDB = require("../../../db")
|
||||||
const CouchDB = require("pouchdb")
|
const CouchDB = require("pouchdb")
|
||||||
const { upload } = require("../../../utilities/fileSystem")
|
const { upload } = require("../../../utilities/fileSystem")
|
||||||
|
const { attachmentsRelativeURL } = require("../../../utilities")
|
||||||
|
|
||||||
// TODO: everything in this file is to be removed
|
// TODO: everything in this file is to be removed
|
||||||
|
|
||||||
|
@ -51,11 +52,12 @@ exports.prepareUpload = async function({ s3Key, bucket, metadata, file }) {
|
||||||
type: file.type,
|
type: file.type,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// don't store a URL, work this out on the way out as the URL could change
|
||||||
return {
|
return {
|
||||||
size: file.size,
|
size: file.size,
|
||||||
name: file.name,
|
name: file.name,
|
||||||
|
url: attachmentsRelativeURL(response.Key),
|
||||||
extension: [...file.name.split(".")].pop(),
|
extension: [...file.name.split(".")].pop(),
|
||||||
url: response.Location,
|
|
||||||
key: response.Key,
|
key: response.Key,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,10 +53,11 @@ exports.uploadFile = async function(ctx) {
|
||||||
const processedFileName = `${uuid.v4()}.${fileExtension}`
|
const processedFileName = `${uuid.v4()}.${fileExtension}`
|
||||||
|
|
||||||
// need to handle image processing
|
// need to handle image processing
|
||||||
await fileProcessor.process({
|
// TODO either offer this as an option, or don't do it at all
|
||||||
...file,
|
// await fileProcessor.process({
|
||||||
extension: fileExtension,
|
// ...file,
|
||||||
})
|
// extension: fileExtension,
|
||||||
|
// })
|
||||||
|
|
||||||
return prepareUpload({
|
return prepareUpload({
|
||||||
file,
|
file,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const env = require("../environment")
|
const env = require("../environment")
|
||||||
const { DocumentTypes, SEPARATOR } = require("../db/utils")
|
const { DocumentTypes, SEPARATOR } = require("../db/utils")
|
||||||
const CouchDB = require("../db")
|
const CouchDB = require("../db")
|
||||||
const { OBJ_STORE_DIRECTORY } = require("../constants")
|
const { OBJ_STORE_DIRECTORY, ObjectStoreBuckets } = require("../constants")
|
||||||
|
|
||||||
const BB_CDN = "https://cdn.app.budi.live/assets"
|
const BB_CDN = "https://cdn.app.budi.live/assets"
|
||||||
const APP_PREFIX = DocumentTypes.APP + SEPARATOR
|
const APP_PREFIX = DocumentTypes.APP + SEPARATOR
|
||||||
|
@ -157,3 +157,9 @@ exports.clientLibraryPath = appId => {
|
||||||
return `/api/assets/client`
|
return `/api/assets/client`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.attachmentsRelativeURL = attachmentKey => {
|
||||||
|
return exports.checkSlashesInUrl(
|
||||||
|
`/${ObjectStoreBuckets.APPS}/${attachmentKey}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
const env = require("../environment")
|
const { ObjectStoreBuckets } = require("../constants")
|
||||||
const { OBJ_STORE_DIRECTORY } = require("../constants")
|
|
||||||
const linkRows = require("../db/linkedRows")
|
const linkRows = require("../db/linkedRows")
|
||||||
const { cloneDeep } = require("lodash/fp")
|
const { cloneDeep } = require("lodash/fp")
|
||||||
const { FieldTypes, AutoFieldSubTypes } = require("../constants")
|
const { FieldTypes, AutoFieldSubTypes } = require("../constants")
|
||||||
|
const { attachmentsRelativeURL } = require("./index")
|
||||||
|
|
||||||
const BASE_AUTO_ID = 1
|
const BASE_AUTO_ID = 1
|
||||||
|
|
||||||
|
@ -180,7 +180,6 @@ exports.outputProcessing = async (appId, table, rows) => {
|
||||||
rows
|
rows
|
||||||
)
|
)
|
||||||
// update the attachments URL depending on hosting
|
// update the attachments URL depending on hosting
|
||||||
if (env.isProd() && env.SELF_HOSTED) {
|
|
||||||
for (let [property, column] of Object.entries(table.schema)) {
|
for (let [property, column] of Object.entries(table.schema)) {
|
||||||
if (column.type === FieldTypes.ATTACHMENT) {
|
if (column.type === FieldTypes.ATTACHMENT) {
|
||||||
for (let row of outputRows) {
|
for (let row of outputRows) {
|
||||||
|
@ -188,12 +187,10 @@ exports.outputProcessing = async (appId, table, rows) => {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
row[property].forEach(attachment => {
|
row[property].forEach(attachment => {
|
||||||
attachment.url = `${OBJ_STORE_DIRECTORY}/${appId}/${attachment.url}`
|
attachment.url = attachmentsRelativeURL(attachment.key)
|
||||||
attachment.url = attachment.url.replace("//", "/")
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return wasArray ? outputRows : outputRows[0]
|
return wasArray ? outputRows : outputRows[0]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<script>
|
|
||||||
import StringRenderer from "./StringRenderer.svelte"
|
|
||||||
import BooleanRenderer from "./BooleanRenderer.svelte"
|
|
||||||
import DateTimeRenderer from "./DateTimeRenderer.svelte"
|
|
||||||
import RelationshipRenderer from "./RelationshipRenderer.svelte"
|
|
||||||
import AttachmentRenderer from "./AttachmentRenderer.svelte"
|
|
||||||
|
|
||||||
export let schema
|
|
||||||
export let value
|
|
||||||
|
|
||||||
const plainTypes = ["string", "options", "number", "longform"]
|
|
||||||
$: type = schema?.type ?? "string"
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if value != null && value !== ''}
|
|
||||||
{#if plainTypes.includes(type)}
|
|
||||||
<StringRenderer {value} />
|
|
||||||
{:else if type === 'boolean'}
|
|
||||||
<BooleanRenderer {value} />
|
|
||||||
{:else if type === 'datetime'}
|
|
||||||
<DateTimeRenderer {value} />
|
|
||||||
{:else if type === 'link'}
|
|
||||||
<RelationshipRenderer {value} />
|
|
||||||
{:else if type === 'attachment'}
|
|
||||||
<AttachmentRenderer {value} />
|
|
||||||
{/if}
|
|
||||||
{/if}
|
|
|
@ -1,20 +0,0 @@
|
||||||
<script>
|
|
||||||
import "@spectrum-css/label/dist/index-vars.css"
|
|
||||||
|
|
||||||
export let value
|
|
||||||
|
|
||||||
const displayLimit = 5
|
|
||||||
$: relationships = value?.slice(0, displayLimit) ?? []
|
|
||||||
$: leftover = (value?.length ?? 0) - relationships.length
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#each relationships as relationship}
|
|
||||||
{#if relationship?.primaryDisplay}
|
|
||||||
<span class="spectrum-Label spectrum-Label--grey">
|
|
||||||
{relationship.primaryDisplay}
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
{/each}
|
|
||||||
{#if leftover}
|
|
||||||
<div>+{leftover} more</div>
|
|
||||||
{/if}
|
|
11
packages/standard-components/src/table/SlotRenderer.svelte
Normal file
11
packages/standard-components/src/table/SlotRenderer.svelte
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<script>
|
||||||
|
import { getContext } from "svelte"
|
||||||
|
|
||||||
|
export let row
|
||||||
|
|
||||||
|
const { Provider } = getContext("sdk")
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Provider data={row}>
|
||||||
|
<slot />
|
||||||
|
</Provider>
|
|
@ -1,8 +1,8 @@
|
||||||
<script>
|
<script>
|
||||||
import { fade } from "svelte/transition"
|
|
||||||
import "@spectrum-css/table/dist/index-vars.css"
|
import "@spectrum-css/table/dist/index-vars.css"
|
||||||
import { getContext } from "svelte"
|
import { getContext } from "svelte"
|
||||||
import CellRenderer from "./CellRenderer.svelte"
|
import { Table } from "@budibase/bbui"
|
||||||
|
import SlotRenderer from "./SlotRenderer.svelte"
|
||||||
|
|
||||||
export let theme
|
export let theme
|
||||||
export let size
|
export let size
|
||||||
|
@ -14,70 +14,21 @@
|
||||||
|
|
||||||
const component = getContext("component")
|
const component = getContext("component")
|
||||||
const { styleable, Provider } = getContext("sdk")
|
const { styleable, Provider } = getContext("sdk")
|
||||||
|
const customColumnKey = `custom-${Math.random()}`
|
||||||
// Config
|
const customRenderers = [
|
||||||
const rowHeight = 55
|
{
|
||||||
const headerHeight = 36
|
column: customColumnKey,
|
||||||
const rowPreload = 5
|
component: SlotRenderer,
|
||||||
const maxRows = 100
|
},
|
||||||
|
]
|
||||||
// Sorting state
|
|
||||||
let sortColumn
|
|
||||||
let sortOrder
|
|
||||||
|
|
||||||
// Table state
|
// Table state
|
||||||
$: loaded = dataProvider?.loaded ?? false
|
$: hasChildren = $component.children
|
||||||
$: rows = dataProvider?.rows ?? []
|
$: loading = dataProvider?.loading ?? false
|
||||||
$: visibleRowCount = loaded
|
$: data = dataProvider?.rows || []
|
||||||
? Math.min(rows.length, rowCount || maxRows, maxRows)
|
$: fullSchema = dataProvider?.schema ?? {}
|
||||||
: Math.min(8, rowCount || maxRows)
|
$: fields = getFields(fullSchema, columns, showAutoColumns)
|
||||||
$: scroll = rows.length > visibleRowCount
|
$: schema = getFilteredSchema(fullSchema, fields, hasChildren)
|
||||||
$: contentStyle = getContentStyle(visibleRowCount, scroll || !loaded)
|
|
||||||
$: sortedRows = sortRows(rows, sortColumn, sortOrder)
|
|
||||||
$: schema = dataProvider?.schema ?? {}
|
|
||||||
$: fields = getFields(schema, columns, showAutoColumns)
|
|
||||||
|
|
||||||
// Scrolling state
|
|
||||||
let timeout
|
|
||||||
let nextScrollTop = 0
|
|
||||||
let scrollTop = 0
|
|
||||||
$: firstVisibleRow = calculateFirstVisibleRow(scrollTop)
|
|
||||||
$: lastVisibleRow = calculateLastVisibleRow(
|
|
||||||
firstVisibleRow,
|
|
||||||
visibleRowCount,
|
|
||||||
rows.length
|
|
||||||
)
|
|
||||||
|
|
||||||
const getContentStyle = (visibleRows, useFixedHeight) => {
|
|
||||||
if (!useFixedHeight) {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return `height: ${headerHeight - 1 + visibleRows * (rowHeight + 1)}px;`
|
|
||||||
}
|
|
||||||
|
|
||||||
const sortRows = (rows, sortColumn, sortOrder) => {
|
|
||||||
if (!sortColumn || !sortOrder) {
|
|
||||||
return rows
|
|
||||||
}
|
|
||||||
return rows.slice().sort((a, b) => {
|
|
||||||
const colA = a[sortColumn]
|
|
||||||
const colB = b[sortColumn]
|
|
||||||
if (sortOrder === "Descending") {
|
|
||||||
return colA > colB ? -1 : 1
|
|
||||||
} else {
|
|
||||||
return colA > colB ? 1 : -1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const sortBy = field => {
|
|
||||||
if (field === sortColumn) {
|
|
||||||
sortOrder = sortOrder === "Descending" ? "Ascending" : "Descending"
|
|
||||||
} else {
|
|
||||||
sortColumn = field
|
|
||||||
sortOrder = "Descending"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const getFields = (schema, customColumns, showAutoColumns) => {
|
const getFields = (schema, customColumns, showAutoColumns) => {
|
||||||
// Check for an invalid column selection
|
// Check for an invalid column selection
|
||||||
|
@ -106,185 +57,44 @@
|
||||||
return columns.concat(autoColumns)
|
return columns.concat(autoColumns)
|
||||||
}
|
}
|
||||||
|
|
||||||
const onScroll = event => {
|
const getFilteredSchema = (schema, fields, hasChildren) => {
|
||||||
nextScrollTop = event.target.scrollTop
|
let newSchema = {}
|
||||||
if (timeout) {
|
if (hasChildren) {
|
||||||
return
|
newSchema[customColumnKey] = {
|
||||||
|
displayName: null,
|
||||||
|
order: 0,
|
||||||
|
sortable: false,
|
||||||
}
|
}
|
||||||
timeout = setTimeout(() => {
|
|
||||||
scrollTop = nextScrollTop
|
|
||||||
timeout = null
|
|
||||||
}, 50)
|
|
||||||
}
|
}
|
||||||
|
fields.forEach(field => {
|
||||||
const calculateFirstVisibleRow = scrollTop => {
|
newSchema[field] = schema[field]
|
||||||
return Math.max(Math.floor(scrollTop / (rowHeight + 1)) - rowPreload, 0)
|
})
|
||||||
}
|
return newSchema
|
||||||
|
|
||||||
const calculateLastVisibleRow = (firstRow, visibleRowCount, allRowCount) => {
|
|
||||||
return Math.min(firstRow + visibleRowCount + 2 * rowPreload, allRowCount)
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if !loaded}
|
|
||||||
<div class="content" style={contentStyle} />
|
|
||||||
{:else}
|
|
||||||
<div use:styleable={$component.styles}>
|
|
||||||
<div
|
<div
|
||||||
on:scroll={onScroll}
|
|
||||||
lang="en"
|
lang="en"
|
||||||
dir="ltr"
|
dir="ltr"
|
||||||
class:quiet
|
use:styleable={$component.styles}
|
||||||
style={`--row-height: ${rowHeight}px; --header-height: ${headerHeight}px;`}
|
|
||||||
class={`spectrum ${size || 'spectrum--medium'} ${theme || 'spectrum--light'}`}>
|
class={`spectrum ${size || 'spectrum--medium'} ${theme || 'spectrum--light'}`}>
|
||||||
<div class="content" style={contentStyle}>
|
<Table
|
||||||
<table class="spectrum-Table" class:spectrum-Table--quiet={quiet}>
|
{data}
|
||||||
<thead class="spectrum-Table-head">
|
{schema}
|
||||||
<tr>
|
{loading}
|
||||||
{#if $component.children}
|
{rowCount}
|
||||||
<th class="spectrum-Table-headCell">
|
{quiet}
|
||||||
<div class="spectrum-Table-headCell-content" />
|
{customRenderers}
|
||||||
</th>
|
allowSelectRows={false}
|
||||||
{/if}
|
allowEditRows={false}
|
||||||
{#each fields as field}
|
allowEditColumns={false}
|
||||||
<th
|
showAutoColumns={true}>
|
||||||
class="spectrum-Table-headCell is-sortable"
|
|
||||||
class:is-sorted-desc={sortColumn === field && sortOrder === 'Descending'}
|
|
||||||
class:is-sorted-asc={sortColumn === field && sortOrder === 'Ascending'}
|
|
||||||
on:click={() => sortBy(field)}>
|
|
||||||
<div class="spectrum-Table-headCell-content">
|
|
||||||
<div class="title">{schema[field]?.name}</div>
|
|
||||||
<svg
|
|
||||||
class="spectrum-Icon spectrum-UIIcon-ArrowDown100 spectrum-Table-sortedIcon"
|
|
||||||
class:visible={sortColumn === field}
|
|
||||||
focusable="false"
|
|
||||||
aria-hidden="true">
|
|
||||||
<use xlink:href="#spectrum-css-icon-Arrow100" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</th>
|
|
||||||
{/each}
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="spectrum-Table-body">
|
|
||||||
{#each sortedRows as row, idx}
|
|
||||||
<tr
|
|
||||||
class="spectrum-Table-row"
|
|
||||||
class:hidden={idx < firstVisibleRow || idx > lastVisibleRow}>
|
|
||||||
{#if idx >= firstVisibleRow && idx <= lastVisibleRow}
|
|
||||||
{#if $component.children}
|
|
||||||
<td
|
|
||||||
class="spectrum-Table-cell spectrum-Table-cell--divider">
|
|
||||||
<div class="spectrum-Table-cell-content">
|
|
||||||
<Provider data={row}>
|
|
||||||
<slot />
|
<slot />
|
||||||
</Provider>
|
</Table>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
|
||||||
{/if}
|
|
||||||
{#each fields as field}
|
|
||||||
<td class="spectrum-Table-cell">
|
|
||||||
<div class="spectrum-Table-cell-content">
|
|
||||||
<CellRenderer
|
|
||||||
schema={schema[field]}
|
|
||||||
value={row[field]} />
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
{/each}
|
|
||||||
{/if}
|
|
||||||
</tr>
|
|
||||||
{/each}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.spectrum {
|
div {
|
||||||
position: relative;
|
display: flex !important;
|
||||||
overflow: auto;
|
|
||||||
border: 1px solid
|
|
||||||
var(--spectrum-table-border-color, var(--spectrum-alias-border-color-mid)) !important;
|
|
||||||
}
|
|
||||||
.spectrum.quiet {
|
|
||||||
border: none !important;
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spectrum-Table-sortedIcon {
|
|
||||||
opacity: 0;
|
|
||||||
display: block !important;
|
|
||||||
}
|
|
||||||
.spectrum-Table-sortedIcon.visible {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.spectrum,
|
|
||||||
th {
|
|
||||||
border-bottom: 1px solid
|
|
||||||
var(--spectrum-table-border-color, var(--spectrum-alias-border-color-mid)) !important;
|
|
||||||
}
|
|
||||||
th {
|
|
||||||
vertical-align: middle;
|
|
||||||
height: var(--header-height);
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
background-color: var(--spectrum-global-color-gray-100);
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
.spectrum-Table-headCell-content {
|
|
||||||
white-space: nowrap;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
.spectrum-Table-headCell-content .title {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody {
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
tbody tr {
|
|
||||||
height: var(--row-height);
|
|
||||||
}
|
|
||||||
tbody tr.hidden {
|
|
||||||
height: calc(var(--row-height) + 1px);
|
|
||||||
}
|
|
||||||
tbody tr.offset {
|
|
||||||
background-color: red;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
td {
|
|
||||||
padding-top: 0;
|
|
||||||
padding-bottom: 0;
|
|
||||||
border-bottom: none !important;
|
|
||||||
border-left: none !important;
|
|
||||||
border-right: none !important;
|
|
||||||
border-top: 1px solid
|
|
||||||
var(--spectrum-table-border-color, var(--spectrum-alias-border-color-mid)) !important;
|
|
||||||
}
|
|
||||||
tr:first-child td {
|
|
||||||
border-top: none !important;
|
|
||||||
}
|
|
||||||
.spectrum:not(.quiet) td.spectrum-Table-cell--divider {
|
|
||||||
width: 1px;
|
|
||||||
border-right: 1px solid
|
|
||||||
var(--spectrum-table-border-color, var(--spectrum-alias-border-color-mid)) !important;
|
|
||||||
}
|
|
||||||
.spectrum-Table-cell-content {
|
|
||||||
height: var(--row-height);
|
|
||||||
white-space: nowrap;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue