@budibase/frontend-core 3.39.21 → 3.39.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "3.39.21",
3
+ "version": "3.39.23",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
@@ -23,5 +23,5 @@
23
23
  "devDependencies": {
24
24
  "vitest": "^4.1.0"
25
25
  },
26
- "gitHead": "8dfa68fadbb12b4b6f9ce8bc124d0ec40b6ccb71"
26
+ "gitHead": "833e219692f2ec7892cbeaef8aeaa2732d1ccb27"
27
27
  }
@@ -0,0 +1,28 @@
1
+ import type { FetchAgentRequestsResponse } from "@budibase/types"
2
+ import type { BaseAPIClient } from "./types"
3
+
4
+ export interface AgentRequestEndpoints {
5
+ fetchAgentRequests: (opts?: {
6
+ limit?: number
7
+ page?: number
8
+ }) => Promise<FetchAgentRequestsResponse>
9
+ }
10
+
11
+ export const buildAgentRequestEndpoints = (
12
+ API: BaseAPIClient
13
+ ): AgentRequestEndpoints => ({
14
+ fetchAgentRequests: async (opts = {}) => {
15
+ const params = new URLSearchParams()
16
+ if (opts.limit !== undefined) {
17
+ params.set("limit", String(opts.limit))
18
+ }
19
+ if (opts.page !== undefined) {
20
+ params.set("page", String(opts.page))
21
+ }
22
+
23
+ const query = params.toString()
24
+ return await API.get({
25
+ url: `/api/agent/requests${query ? `?${query}` : ""}`,
26
+ })
27
+ },
28
+ })
package/src/api/index.ts CHANGED
@@ -49,6 +49,7 @@ import { buildOAuth2Endpoints } from "./oauth2"
49
49
  import { buildAgentEndpoints } from "./agents"
50
50
  import { buildAgentTestEndpoints } from "./agentTests"
51
51
  import { buildAgentLogEndpoints } from "./agentLogs"
52
+ import { buildAgentRequestEndpoints } from "./agentRequests"
52
53
  import { buildChatAppEndpoints } from "./chatApps"
53
54
  import { buildFeatureFlagEndpoints } from "./features"
54
55
  import { buildNavigationEndpoints } from "./navigation"
@@ -320,6 +321,7 @@ export const createAPIClient = (config: APIClientConfig = {}): APIClient => {
320
321
  ...buildAgentEndpoints(API),
321
322
  ...buildAgentTestEndpoints(API),
322
323
  ...buildAgentLogEndpoints(API),
324
+ ...buildAgentRequestEndpoints(API),
323
325
  ...buildChatAppEndpoints(API),
324
326
  ...buildFeatureFlagEndpoints(API),
325
327
  deployment: buildDeploymentEndpoints(API),
package/src/api/types.ts CHANGED
@@ -37,6 +37,7 @@ import { ViewV2Endpoints } from "./viewsV2"
37
37
  import { AgentEndpoints } from "./agents"
38
38
  import { AgentTestEndpoints } from "./agentTests"
39
39
  import { AgentLogEndpoints } from "./agentLogs"
40
+ import { AgentRequestEndpoints } from "./agentRequests"
40
41
  import { ChatAppEndpoints } from "./chatApps"
41
42
  import { NavigationEndpoints } from "./navigation"
42
43
  import { WorkspaceAppEndpoints } from "./workspaceApps"
@@ -122,6 +123,7 @@ export type APIClient = BaseAPIClient &
122
123
  AgentEndpoints &
123
124
  AgentTestEndpoints &
124
125
  AgentLogEndpoints &
126
+ AgentRequestEndpoints &
125
127
  ChatAppEndpoints &
126
128
  AnalyticsEndpoints &
127
129
  AppEndpoints &
@@ -16,7 +16,11 @@
16
16
  import { QueryUtils, Constants } from "@budibase/frontend-core"
17
17
  import { getContext, createEventDispatcher } from "svelte"
18
18
  import FilterField from "./FilterField.svelte"
19
- import { utils } from "@budibase/shared-core"
19
+ import {
20
+ resolveTranslationGroup,
21
+ resolveWorkspaceTranslations,
22
+ utils,
23
+ } from "@budibase/shared-core"
20
24
 
21
25
  const dispatch = createEventDispatcher()
22
26
  const {
@@ -46,7 +50,13 @@
46
50
  export let toReadable
47
51
  export let toRuntime
48
52
  export let evaluationContext = {}
53
+ const sdk = getContext("sdk") || {}
54
+ const { appStore } = sdk
49
55
 
56
+ $: translationOverrides = resolveWorkspaceTranslations(
57
+ appStore ? $appStore.application?.translationOverrides : undefined
58
+ )
59
+ $: calendarLabels = resolveTranslationGroup("calendar", translationOverrides)
50
60
  $: editableFilters = migrateFilters(filters)
51
61
  $: {
52
62
  if (
@@ -423,6 +433,7 @@
423
433
  ...filter,
424
434
  }}
425
435
  {schemaFields}
436
+ {calendarLabels}
426
437
  {bindings}
427
438
  {panel}
428
439
  {toReadable}
@@ -14,6 +14,7 @@
14
14
  import { FieldType, ArrayOperator } from "@budibase/types"
15
15
  import * as Constants from "../constants"
16
16
  import { isJSBinding, findHBSBlocks } from "@budibase/string-templates"
17
+ import { resolveTranslationGroup } from "@budibase/shared-core"
17
18
  import { createEventDispatcher } from "svelte"
18
19
 
19
20
  export let filter
@@ -28,6 +29,7 @@
28
29
  export let evaluationContext = {}
29
30
  export let bindingValueType = Constants.FilterValueType.BINDING
30
31
  export let useConditionValueControls = false
32
+ export let calendarLabels = resolveTranslationGroup("calendar")
31
33
 
32
34
  const dispatch = createEventDispatcher()
33
35
  const { OperatorOptions, FilterValueType } = Constants
@@ -238,6 +240,7 @@
238
240
  disabled={filter.noValue}
239
241
  enableTime={!getSchema(filter)?.dateOnly}
240
242
  timeOnly={getSchema(filter)?.timeOnly}
243
+ {calendarLabels}
241
244
  value={readableValue}
242
245
  on:change={onChange}
243
246
  />
@@ -1,8 +1,12 @@
1
1
  <script>
2
2
  import { CoreDatePickerPopoverContents, Icon, Helpers } from "@budibase/bbui"
3
- import { onMount } from "svelte"
3
+ import { getContext, onMount } from "svelte"
4
4
  import dayjs from "dayjs"
5
5
  import GridPopover from "../overlays/GridPopover.svelte"
6
+ import {
7
+ resolveTranslationGroup,
8
+ resolveWorkspaceTranslations,
9
+ } from "@budibase/shared-core"
6
10
 
7
11
  export let value
8
12
  export let schema
@@ -14,7 +18,13 @@
14
18
 
15
19
  let isOpen
16
20
  let anchor
21
+ const sdk = getContext("sdk") || {}
22
+ const { appStore } = sdk
17
23
 
24
+ $: translationOverrides = resolveWorkspaceTranslations(
25
+ appStore ? $appStore.application?.translationOverrides : undefined
26
+ )
27
+ $: calendarLabels = resolveTranslationGroup("calendar", translationOverrides)
18
28
  $: timeOnly = schema?.timeOnly
19
29
  $: enableTime = !schema?.dateOnly
20
30
  $: ignoreTimezones = schema?.ignoreTimezones
@@ -120,6 +130,7 @@
120
130
  {timeOnly}
121
131
  {ignoreTimezones}
122
132
  {startDayOfWeek}
133
+ {calendarLabels}
123
134
  />
124
135
  </GridPopover>
125
136
  {/if}
@@ -7,6 +7,10 @@ export default class CustomFetch extends BaseDataFetch<
7
7
  CustomDatasource,
8
8
  CustomDefinition
9
9
  > {
10
+ getDefaultSortColumn() {
11
+ return null
12
+ }
13
+
10
14
  // Gets the correct Budibase type for a JS value
11
15
  getType(value: any) {
12
16
  if (value == null) {