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", "eslint-plugin-svelte3": "^2.7.3",
"lerna": "3.14.1", "lerna": "3.14.1",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"prettier-plugin-svelte": "^0.7.0", "prettier-plugin-svelte": "^1.4.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup-plugin-replace": "^2.2.0", "rollup-plugin-replace": "^2.2.0",
"svelte": "^3.28.0" "svelte": "^3.28.0"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,9 +7,7 @@
{#if $backendUiStore.selectedDatabase._id && selectedView} {#if $backendUiStore.selectedDatabase._id && selectedView}
<ViewDataTable view={selectedView} /> <ViewDataTable view={selectedView} />
{:else} {:else}<i>Create your first table to start building</i>{/if}
<i>Create your first table to start building</i>
{/if}
<style> <style>
i { 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 each CSV row parse all the columns that need parsed
for (let key in parsers) { for (let key in parsers) {
if (!schema[key] || schema[key].success) { if (!schema[key] || schema[key].success) {

View File

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

View File

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

View File

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

View File

@ -27,15 +27,4 @@
on:newRow={() => dispatch('newRow')} /> on:newRow={() => dispatch('newRow')} />
</DropdownMenu> --> </DropdownMenu> -->
<!-- <style> <!--<style ✂prettier:content✂="CiAgZGl2IHsKICAgIGRpc3BsYXk6IGdyaWQ7CiAgICBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IGF1dG8gYXV0bzsKICAgIHBsYWNlLWl0ZW1zOiBzdGFydCBjZW50ZXI7CiAgfQogIGg1IHsKICAgIHBhZGRpbmc6IHZhcigtLXNwYWNpbmcteGwpIDAgMCB2YXIoLS1zcGFjaW5nLXhsKTsKICAgIG1hcmdpbjogMDsKICAgIGZvbnQtd2VpZ2h0OiA1MDA7CiAgfQo=" ✂prettier:content✂=""></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> -->

View File

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

View File

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

View File

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

View File

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

View File

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