1
0
Fork 0
mirror of synced 2024-06-25 01:20:55 +12:00
This commit is contained in:
Martin McKeaveney 2020-10-14 13:21:43 +01:00
parent 2ba10662d3
commit d2a7bf55a7
38 changed files with 52 additions and 116 deletions

View file

@ -10,7 +10,7 @@
"eslint-plugin-svelte3": "^2.7.3",
"lerna": "3.14.1",
"prettier": "^1.19.1",
"prettier-plugin-svelte": "^0.7.0",
"prettier-plugin-svelte": "^1.4.0",
"rimraf": "^3.0.2",
"rollup-plugin-replace": "^2.2.0",
"svelte": "^3.28.0"

View file

@ -23,9 +23,7 @@
class="automation-block hoverable"
on:click={addBlockToAutomation}
data-cy={stepId}>
<div>
<i class={blockDefinition.icon} />
</div>
<div><i class={blockDefinition.icon} /></div>
<div class="automation-text">
<h4>{blockDefinition.name}</h4>
<p>{blockDefinition.description}</p>

View file

@ -62,10 +62,7 @@
{#if $automationStore.selectedBlock}
<AutomationBlockSetup bind:block={$automationStore.selectedBlock} />
{:else if $automationStore.selectedAutomation}
<div class="block-label">
Automation
<b>{automation.name}</b>
</div>
<div class="block-label">Automation <b>{automation.name}</b></div>
<Button secondary wide on:click={testAutomation}>Test Automation</Button>
{/if}
</div>

View file

@ -108,7 +108,8 @@
<div
class:link={row[header] && row[header].length}
on:click={() => selectRelationship(row, header)}>
{row[header] ? row[header].length : 0} related row(s)
{row[header] ? row[header].length : 0}
related row(s)
</div>
{:else if schema[header].type === 'attachment'}
<AttachmentList files={row[header] || []} />

View file

@ -49,9 +49,7 @@
<button class:selected={currentPage === 0} on:click={() => selectPage(0)}>
1
</button>
{#if currentPage > 3}
<button disabled>...</button>
{/if}
{#if currentPage > 3}<button disabled>...</button>{/if}
{#each pagesAroundCurrent as idx}
<button
class:selected={idx === currentPage}
@ -59,9 +57,7 @@
{idx + 1}
</button>
{/each}
{#if currentPage < numPages - 4}
<button disabled>...</button>
{/if}
{#if currentPage < numPages - 4}<button disabled>...</button>{/if}
<button
class:selected={currentPage === numPages - 1}
on:click={() => selectPage(numPages - 1)}>
@ -77,8 +73,13 @@
<p>
{#if numPages > 1}
Showing {ITEMS_PER_PAGE * currentPage + 1} - {ITEMS_PER_PAGE * currentPage + pageItemCount}
of {data.length} rows
Showing
{ITEMS_PER_PAGE * currentPage + 1}
-
{ITEMS_PER_PAGE * currentPage + pageItemCount}
of
{data.length}
rows
{:else if numPages === 1}Showing all {data.length} row(s){/if}
</p>
</div>

View file

@ -31,9 +31,7 @@
style="background: {themes[notification.type]};"
transition:fly={{ y: -30 }}>
<div class="content">{notification.message}</div>
{#if notification.icon}
<i class={notification.icon} />
{/if}
{#if notification.icon}<i class={notification.icon} />{/if}
</div>
{/each}
</div>

View file

@ -12,15 +12,12 @@
</script>
<div class="root">
<div class="switcher">
{#each tabs as tab}
<button class:selected={selected === tab} on:click={() => selectTab(tab)}>
{tab}
</button>
{/each}
</div>
<div class="panel">
@ -34,7 +31,6 @@
<slot name="3" />
{/if}
</div>
</div>
<style>

View file

@ -5,9 +5,7 @@
<div class="container">
<div class="content">
<div class="img">
<img src="https://picsum.photos/60/60" alt="zoom" />
</div>
<div class="img"><img src="https://picsum.photos/60/60" alt="zoom" /></div>
<div class="body">
<div class="title">Zoom</div>
<div class="description">

View file

@ -10,7 +10,9 @@
<Spacer medium />
<div class="card-footer">
<TextButton text medium blue href="/_builder/{_id}">
Open {name}
Open
{name}
</TextButton>
</div>
</div>

View file

@ -28,12 +28,11 @@
<Spacer small />
<Body medium grey>{template.category}</Body>
<Body lh small black>{template.description}</Body>
<div>
<img src={template.image} width="100%" />
</div>
<div><img src={template.image} width="100%" /></div>
<div class="card-footer">
<Button secondary on:click={() => onSelect(template)}>
Create {template.name}
Create
{template.name}
</Button>
</div>
</div>

View file

@ -13,7 +13,6 @@
{category.name}
</li>
{/each}
</div>
<style>

View file

@ -99,9 +99,7 @@
</script>
<div bind:this={anchor} on:click|stopPropagation={() => {}}>
<div class="icon" on:click={dropdown.show}>
<i class="ri-more-line" />
</div>
<div class="icon" on:click={dropdown.show}><i class="ri-more-line" /></div>
</div>
<DropdownMenu
bind:this={dropdown}

View file

@ -76,7 +76,6 @@
</script>
<div class="root">
<CategoryTab
onClick={category => (selectedCategory = category)}
{categories}
@ -99,9 +98,7 @@
onScreenPropChange={store.setPageOrScreenProp}
screenOrPageInstance={$store.currentView !== 'component' && $store.currentPreviewItem} />
{/if}
</div>
</div>
<style>

View file

@ -45,7 +45,6 @@
</script>
<div class="root">
<CategoryTab
onClick={category => (selectedCategory = category)}
{selectedCategory}

View file

@ -38,13 +38,11 @@
</script>
<div class="root">
{#each screens as screen}
<div
class="budibase__nav-item screen-header-row"
class:selected={$store.currentComponentInfo._id === screen.props._id}
on:click|stopPropagation={() => changeScreen(screen)}>
<span
class="icon"
class:rotate={$store.currentPreviewItem.name !== screen.props._instanceName}>
@ -69,7 +67,6 @@
{dragDropStore} />
{/if}
{/each}
</div>
<style>

View file

@ -129,7 +129,6 @@
<ul>
{#each components as component, index (component._id)}
<li on:click|stopPropagation={() => selectComponent(component)}>
{#if $dragDropStore && $dragDropStore.targetComponent === component && $dragDropStore.dropPosition === 'above'}
<div
on:drop={drop}

View file

@ -20,7 +20,6 @@
<div class="root">
{#if $store.currentFrontEndType === 'page' || $store.screens.length}
<div class="switcher">
<button
class:selected={selected === COMPONENT_SELECTION_TAB}
on:click={() => selectTab(COMPONENT_SELECTION_TAB)}>
@ -32,7 +31,6 @@
on:click={() => selectTab(PROPERTIES_TAB)}>
Edit
</button>
</div>
<div class="panel">
@ -43,10 +41,8 @@
{#if selected === COMPONENT_SELECTION_TAB}
<ComponentSelectionList {toggleTab} />
{/if}
</div>
{/if}
</div>
<style>

View file

@ -28,7 +28,6 @@
</script>
<div class="design-view-container">
<div class="design-view-state-categories">
<FlatButtonGroup value={selectedCategory} {buttonProps} {onChange} />
</div>

View file

@ -18,9 +18,7 @@
</script>
<div class="handler-option">
{#if parameter.name === 'automation'}
<span>{parameter.name}</span>
{/if}
{#if parameter.name === 'automation'}<span>{parameter.name}</span>{/if}
{#if parameter.name === 'automation'}
<Select on:change bind:value={parameter.value}>
<option value="" />

View file

@ -48,7 +48,6 @@
{schemaFields}
on:fieldschanged={onFieldsChanged} />
{/if}
</div>
<style>

View file

@ -109,7 +109,6 @@
{schemaFields}
on:fieldschanged={onFieldsChanged} />
{/if}
</div>
<style>

View file

@ -107,7 +107,6 @@
{schemaFields}
on:fieldschanged={onFieldsChanged} />
{/if}
</div>
<style>

View file

@ -126,9 +126,7 @@
on:click={() => switchLetter(letter)}>
{letter}
</span>
{#if idx !== alphabet.length - 1}
<span>-</span>
{/if}
{#if idx !== alphabet.length - 1}<span>-</span>{/if}
{/each}
</div>
<div class="search-input">

View file

@ -3,9 +3,7 @@
</script>
<div data-cy={item.name} class="item-item" on:click>
<div class="item-icon">
<i class={item.icon} />
</div>
<div class="item-icon"><i class={item.icon} /></div>
<div class="item-text">
<div class="item-name">{item.name}</div>
</div>

View file

@ -89,7 +89,6 @@
</script>
<ModalContent title="New Screen" confirmText="Create Screen" onConfirm={save}>
<Select
label="Choose a Template"
bind:value={templateIndex}
@ -109,5 +108,4 @@
error={routeError}
bind:value={route}
on:change={routeChanged} />
</ModalContent>

View file

@ -7,9 +7,7 @@
{#if $backendUiStore.selectedDatabase._id && selectedTable.name}
<TableDataTable />
{:else}
<i>Create your first table to start building</i>
{/if}
{:else}<i>Create your first table to start building</i>{/if}
<style>
i {

View file

@ -23,9 +23,7 @@
{#if $backendUiStore.tables.length === 0}
<i>Create your first table to start building</i>
{:else}
<i>Select a table to edit</i>
{/if}
{:else}<i>Select a table to edit</i>{/if}
<style>
i {

View file

@ -7,9 +7,7 @@
{#if $backendUiStore.selectedDatabase._id && selectedView}
<ViewDataTable view={selectedView} />
{:else}
<i>Create your first table to start building</i>
{/if}
{:else}<i>Create your first table to start building</i>{/if}
<style>
i {

View file

@ -25,7 +25,7 @@ function parse(path, parsers) {
}
}
})
result.subscribe((row, lineNumber) => {
result.subscribe(row => {
// For each CSV row parse all the columns that need parsed
for (let key in parsers) {
if (!schema[key] || schema[key].success) {

View file

@ -1,5 +1,5 @@
const fs = require("fs")
// const sharp = require("sharp")
const sharp = require("sharp")
const fsPromises = fs.promises
const FORMATS = {
@ -7,14 +7,13 @@ const FORMATS = {
}
async function processImage(file) {
// const imgMeta = await sharp(file.path)
// .resize(300)
// .toFile(file.outputPath)
// return {
// ...file,
// ...imgMeta,
// }
const imgMeta = await sharp(file.path)
.resize(300)
.toFile(file.outputPath)
return {
...file,
...imgMeta,
}
}
async function process(file) {

View file

@ -23,9 +23,7 @@
</script>
<div use:cssVars={cssVariables} class="container">
{#if showImage}
<img class="image" src={imageUrl} alt="" />
{/if}
{#if showImage}<img class="image" src={imageUrl} alt="" />{/if}
<div class="content">
<h2 class="heading">{heading}</h2>
<h4 class="text">{description}</h4>

View file

@ -26,9 +26,7 @@
</script>
<div use:cssVars={cssVariables} class="container">
{#if showImage}
<img class="image" src={imageUrl} alt="" />
{/if}
{#if showImage}<img class="image" src={imageUrl} alt="" />{/if}
<div class="content">
<main>
<h2 class="heading">{heading}</h2>

View file

@ -27,15 +27,4 @@
on:newRow={() => dispatch('newRow')} />
</DropdownMenu> -->
<!-- <style>
div {
display: grid;
grid-template-columns: auto auto;
place-items: start center;
}
h5 {
padding: var(--spacing-xl) 0 0 var(--spacing-xl);
margin: 0;
font-weight: 500;
}
</style> -->
<!--<style ✂prettier:content✂="CiAgZGl2IHsKICAgIGRpc3BsYXk6IGdyaWQ7CiAgICBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IGF1dG8gYXV0bzsKICAgIHBsYWNlLWl0ZW1zOiBzdGFydCBjZW50ZXI7CiAgfQogIGg1IHsKICAgIHBhZGRpbmc6IHZhcigtLXNwYWNpbmcteGwpIDAgMCB2YXIoLS1zcGFjaW5nLXhsKTsKICAgIG1hcmdpbjogMDsKICAgIGZvbnQtd2VpZ2h0OiA1MDA7CiAgfQo=" ✂prettier:content✂=""></style>-->

View file

@ -123,7 +123,9 @@
{#if selectedRows.length > 0}
<DeleteButton text small on:click={deleteRows}>
<Icon name="addrow" />
Delete {selectedRows.length} row(s)
Delete
{selectedRows.length}
row(s)
</DeleteButton>
{/if}
</div>

View file

@ -42,9 +42,7 @@
<div class="root">
<div class="content">
{#if logo}
<div class="logo-container">
<img src={logo} alt="logo" />
</div>
<div class="logo-container"><img src={logo} alt="logo" /></div>
{/if}
{#if title}

View file

@ -33,6 +33,4 @@
<sub class={className}>{text}</sub>
{:else if isTag('sup')}
<sup class={className}>{text}</sup>
{:else}
<span>{text}</span>
{/if}
{:else}<span>{text}</span>{/if}

View file

@ -12,9 +12,7 @@
<div class="file">
{#if FILE_TYPES.IMAGE.includes(file.extension.toLowerCase())}
<img {width} {height} src={file.url} alt="preview of {file.name}" />
{:else}
<i class="far fa-file" />
{/if}
{:else}<i class="far fa-file" />{/if}
</div>
<span>{file.name}</span>
</a>

View file

@ -3690,11 +3690,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
prettier-plugin-svelte@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/prettier-plugin-svelte/-/prettier-plugin-svelte-0.7.0.tgz#5ac0b9f194e0450c88ff1e167cbf3b32d2642df2"
dependencies:
tslib "^1.9.3"
prettier-plugin-svelte@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/prettier-plugin-svelte/-/prettier-plugin-svelte-1.4.0.tgz#bb992759fb77ec2c3545d454a7c60f7a258cb745"
integrity sha512-KXO2He7Kql0Lz4DdlzVli1j2JTDUR9jPV/DqyfnJmY1pCeSV1qZkxgdsyYma35W6OLrCAr/G6yKdmzo+75u2Ng==
prettier@^1.19.1:
version "1.19.1"
@ -4529,7 +4528,7 @@ trim-off-newlines@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
tslib@^1.9.0, tslib@^1.9.3:
tslib@^1.9.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"