PR comments
This commit is contained in:
parent
5798b42454
commit
cf8f7db36d
|
@ -18,7 +18,7 @@
|
||||||
export let schema
|
export let schema
|
||||||
export let aiField = {}
|
export let aiField = {}
|
||||||
|
|
||||||
$: OperationField = OperationFields[aiField.operation] || null
|
$: OperationField = OperationFields[aiField.operation]
|
||||||
$: schemaWithoutRelations = Object.keys(schema).filter(
|
$: schemaWithoutRelations = Object.keys(schema).filter(
|
||||||
key => schema[key].type !== "link"
|
key => schema[key].type !== "link"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { viewsV2, rowActions } from "stores/builder"
|
import { viewsV2, rowActions } from "stores/builder"
|
||||||
import { admin, themeStore } from "stores/portal"
|
import { admin, themeStore, licensing } from "stores/portal"
|
||||||
import { Grid } from "@budibase/frontend-core"
|
import { Grid } from "@budibase/frontend-core"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications } from "@budibase/bbui"
|
||||||
|
@ -49,6 +49,7 @@
|
||||||
{buttons}
|
{buttons}
|
||||||
allowAddRows
|
allowAddRows
|
||||||
allowDeleteRows
|
allowDeleteRows
|
||||||
|
licensing={$licensing}
|
||||||
showAvatars={false}
|
showAvatars={false}
|
||||||
on:updatedatasource={handleGridViewUpdate}
|
on:updatedatasource={handleGridViewUpdate}
|
||||||
isCloud={$admin.cloud}
|
isCloud={$admin.cloud}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
appStore,
|
appStore,
|
||||||
rowActions,
|
rowActions,
|
||||||
} from "stores/builder"
|
} from "stores/builder"
|
||||||
import { themeStore, admin } from "stores/portal"
|
import { themeStore, admin, licensing } from "stores/portal"
|
||||||
import { TableNames } from "constants"
|
import { TableNames } from "constants"
|
||||||
import { Grid } from "@budibase/frontend-core"
|
import { Grid } from "@budibase/frontend-core"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
|
@ -125,6 +125,7 @@
|
||||||
schemaOverrides={isUsersTable ? userSchemaOverrides : null}
|
schemaOverrides={isUsersTable ? userSchemaOverrides : null}
|
||||||
showAvatars={false}
|
showAvatars={false}
|
||||||
isCloud={$admin.cloud}
|
isCloud={$admin.cloud}
|
||||||
|
licensing={$licensing}
|
||||||
{buttons}
|
{buttons}
|
||||||
buttonsCollapsed
|
buttonsCollapsed
|
||||||
on:updatedatasource={handleGridTableUpdate}
|
on:updatedatasource={handleGridTableUpdate}
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
export let darkMode = false
|
export let darkMode = false
|
||||||
export let isCloud = null
|
export let isCloud = null
|
||||||
export let rowConditions = null
|
export let rowConditions = null
|
||||||
|
export let licensing = null
|
||||||
|
|
||||||
// Unique identifier for DOM nodes inside this instance
|
// Unique identifier for DOM nodes inside this instance
|
||||||
const gridID = `grid-${Math.random().toString().slice(2)}`
|
const gridID = `grid-${Math.random().toString().slice(2)}`
|
||||||
|
@ -104,6 +105,7 @@
|
||||||
buttonsCollapsedText,
|
buttonsCollapsedText,
|
||||||
darkMode,
|
darkMode,
|
||||||
isCloud,
|
isCloud,
|
||||||
|
licensing,
|
||||||
rowConditions,
|
rowConditions,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
$: style = makeStyle($menu)
|
$: style = makeStyle($menu)
|
||||||
$: isNewRow = $focusedRowId === NewRowID
|
$: isNewRow = $focusedRowId === NewRowID
|
||||||
|
$: budibaseAIEnabled = $config.licensing?.budibaseAIEnabled || $config.licensing?.customAIConfigsEnabled
|
||||||
|
|
||||||
const makeStyle = menu => {
|
const makeStyle = menu => {
|
||||||
return `left:${menu.left}px; top:${menu.top}px;`
|
return `left:${menu.left}px; top:${menu.top}px;`
|
||||||
|
@ -168,6 +169,7 @@
|
||||||
>
|
>
|
||||||
Delete row
|
Delete row
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
{#if budibaseAIEnabled}
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon="MagicWand"
|
icon="MagicWand"
|
||||||
disabled={isNewRow ||
|
disabled={isNewRow ||
|
||||||
|
@ -178,6 +180,7 @@
|
||||||
Generate AI Columns
|
Generate AI Columns
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{/if}
|
{/if}
|
||||||
|
{/if}
|
||||||
</Menu>
|
</Menu>
|
||||||
</GridPopover>
|
</GridPopover>
|
||||||
{/key}
|
{/key}
|
||||||
|
|
|
@ -119,7 +119,6 @@ export interface FormulaFieldMetadata extends BaseFieldSchema {
|
||||||
|
|
||||||
export interface AIFieldMetadata extends BaseFieldSchema {
|
export interface AIFieldMetadata extends BaseFieldSchema {
|
||||||
type: FieldType.AI
|
type: FieldType.AI
|
||||||
// formula: string
|
|
||||||
operation: AIOperationEnum
|
operation: AIOperationEnum
|
||||||
columns?: string[]
|
columns?: string[]
|
||||||
column?: string
|
column?: string
|
||||||
|
|
Loading…
Reference in New Issue