Linting.
This commit is contained in:
parent
a14c80bf6c
commit
b7a767a571
|
@ -1,7 +1,7 @@
|
|||
import { cloneDeep } from "lodash/fp"
|
||||
import { get } from "svelte/store"
|
||||
import { findComponent, findComponentPath } from "./storeUtils"
|
||||
import {currentAssetId, store} from "builderStore"
|
||||
import { store } from "builderStore"
|
||||
import { tables as tablesStore, queries as queriesStores } from "stores/backend"
|
||||
import { makePropSafe } from "@budibase/string-templates"
|
||||
import { TableNames } from "../constants"
|
||||
|
|
|
@ -8,23 +8,23 @@
|
|||
Toggle,
|
||||
Radio,
|
||||
} from "@budibase/bbui"
|
||||
import {cloneDeep} from "lodash/fp"
|
||||
import {tables} from "stores/backend"
|
||||
import { cloneDeep } from "lodash/fp"
|
||||
import { tables } from "stores/backend"
|
||||
|
||||
import {TableNames, UNEDITABLE_USER_FIELDS} from "constants"
|
||||
import { TableNames, UNEDITABLE_USER_FIELDS } from "constants"
|
||||
import {
|
||||
FIELDS,
|
||||
AUTO_COLUMN_SUB_TYPES,
|
||||
RelationshipTypes,
|
||||
} from "constants/backend"
|
||||
import {getAutoColumnInformation, buildAutoColumn} from "builderStore/utils"
|
||||
import {notifier} from "builderStore/store/notifications"
|
||||
import { getAutoColumnInformation, buildAutoColumn } from "builderStore/utils"
|
||||
import { notifier } from "builderStore/store/notifications"
|
||||
import ValuesList from "components/common/ValuesList.svelte"
|
||||
import DatePicker from "components/common/DatePicker.svelte"
|
||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||
import {truncate} from "lodash"
|
||||
import { truncate } from "lodash"
|
||||
import ModalBindableInput from "components/common/ModalBindableInput.svelte"
|
||||
import {getBindings} from "components/backend/DataTable/formula"
|
||||
import { getBindings } from "components/backend/DataTable/formula"
|
||||
|
||||
const AUTO_TYPE = "auto"
|
||||
const FORMULA_TYPE = FIELDS.FORMULA.type
|
||||
|
@ -70,7 +70,8 @@
|
|||
field.subtype !== AUTO_COLUMN_SUB_TYPES.CREATED_BY &&
|
||||
field.subtype !== AUTO_COLUMN_SUB_TYPES.UPDATED_BY &&
|
||||
field.type !== FORMULA_TYPE
|
||||
$: canBeDisplay = field.type !== LINK_TYPE &&
|
||||
$: canBeDisplay =
|
||||
field.type !== LINK_TYPE &&
|
||||
field.type !== AUTO_TYPE &&
|
||||
field.type !== FORMULA_TYPE
|
||||
$: canBeRequired =
|
||||
|
@ -121,7 +122,7 @@
|
|||
|
||||
function onChangeRequired(e) {
|
||||
const req = e.target.checked
|
||||
field.constraints.presence = req ? {allowEmpty: false} : false
|
||||
field.constraints.presence = req ? { allowEmpty: false } : false
|
||||
required = req
|
||||
}
|
||||
|
||||
|
@ -129,7 +130,7 @@
|
|||
const isPrimary = e.target.checked
|
||||
// primary display is always required
|
||||
if (isPrimary) {
|
||||
field.constraints.presence = {allowEmpty: false}
|
||||
field.constraints.presence = { allowEmpty: false }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,8 +164,8 @@
|
|||
if (!linkTable) {
|
||||
return null
|
||||
}
|
||||
const thisName = truncate(table.name, {length: 14}),
|
||||
linkName = truncate(linkTable.name, {length: 14})
|
||||
const thisName = truncate(table.name, { length: 14 }),
|
||||
linkName = truncate(linkTable.name, { length: 14 })
|
||||
return [
|
||||
{
|
||||
name: `Many ${thisName} rows → many ${linkName} rows`,
|
||||
|
@ -298,7 +299,7 @@
|
|||
value={field.formula}
|
||||
on:change={e => (field.formula = e.detail)}
|
||||
bindings={getBindings({ table })}
|
||||
serverSide=true />
|
||||
serverSide="true" />
|
||||
{:else if field.type === AUTO_TYPE}
|
||||
<Select label="Auto Column Type" thin secondary bind:value={field.subtype}>
|
||||
<option value="">Choose a subtype</option>
|
||||
|
|
|
@ -45,10 +45,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<Modal bind:this={bindingModal} width="50%">
|
||||
<ModalContent
|
||||
{title}
|
||||
onConfirm={saveBinding}
|
||||
bind:disabled={invalid}>
|
||||
<ModalContent {title} onConfirm={saveBinding} bind:disabled={invalid}>
|
||||
<Body extraSmall grey>
|
||||
Add the objects on the left to enrich your text.
|
||||
</Body>
|
||||
|
@ -56,7 +53,7 @@
|
|||
this={panel}
|
||||
serverSide
|
||||
value={readableValue}
|
||||
bind:validity={validity}
|
||||
bind:validity
|
||||
on:update={event => (tempValue = event.detail)}
|
||||
bindableProperties={bindings} />
|
||||
</ModalContent>
|
||||
|
|
Loading…
Reference in New Issue