@budibase/frontend-core 2.32.15 → 2.32.17

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,18 +1,18 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "2.32.15",
3
+ "version": "2.32.17",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
7
7
  "svelte": "src/index.js",
8
8
  "dependencies": {
9
- "@budibase/bbui": "2.32.15",
10
- "@budibase/shared-core": "2.32.15",
11
- "@budibase/types": "2.32.15",
9
+ "@budibase/bbui": "2.32.17",
10
+ "@budibase/shared-core": "2.32.17",
11
+ "@budibase/types": "2.32.17",
12
12
  "dayjs": "^1.10.8",
13
13
  "lodash": "4.17.21",
14
14
  "shortid": "2.2.15",
15
15
  "socket.io-client": "^4.7.5"
16
16
  },
17
- "gitHead": "6de055ea381e66939d0e9ddd7e3431d07a1c20e8"
17
+ "gitHead": "6fcb7de554b4b5f46c070b9a4afdaaf4360f1d9a"
18
18
  }
@@ -27,9 +27,7 @@
27
27
  let candidateIndex
28
28
  let lastSearchId
29
29
  let searching = false
30
- let container
31
30
  let anchor
32
- let relationshipFields
33
31
 
34
32
  $: fieldValue = parseValue(value)
35
33
  $: oneRowOnly = schema?.relationshipType === "one-to-many"
@@ -56,12 +54,6 @@
56
54
  return acc
57
55
  }, {})
58
56
 
59
- $: showRelationshipFields =
60
- relationshipFields &&
61
- Object.keys(relationshipFields).length &&
62
- focused &&
63
- !isOpen
64
-
65
57
  const parseValue = value => {
66
58
  if (Array.isArray(value) && value.every(x => x?._id)) {
67
59
  return value
@@ -242,14 +234,6 @@
242
234
  return value
243
235
  }
244
236
 
245
- const displayRelationshipFields = relationship => {
246
- relationshipFields = relationFields[relationship._id]
247
- }
248
-
249
- const hideRelationshipFields = () => {
250
- relationshipFields = undefined
251
- }
252
-
253
237
  onMount(() => {
254
238
  api = {
255
239
  focus: open,
@@ -269,7 +253,7 @@
269
253
  style="--color:{color};"
270
254
  bind:this={anchor}
271
255
  >
272
- <div class="container" bind:this={container}>
256
+ <div class="container">
273
257
  <div
274
258
  class="values"
275
259
  class:wrap={editable || contentLines > 1}
@@ -281,9 +265,7 @@
281
265
  <div
282
266
  class="badge"
283
267
  class:extra-info={!!relationFields[relationship._id]}
284
- on:mouseover={() => displayRelationshipFields(relationship)}
285
268
  on:focus={() => {}}
286
- on:mouseleave={() => hideRelationshipFields()}
287
269
  >
288
270
  <span>
289
271
  {readable(
@@ -358,21 +340,6 @@
358
340
  </GridPopover>
359
341
  {/if}
360
342
 
361
- {#if showRelationshipFields}
362
- <GridPopover {anchor} minWidth={300} maxWidth={400}>
363
- <div class="relationship-fields">
364
- {#each Object.entries(relationshipFields) as [fieldName, fieldValue]}
365
- <div class="relationship-field-name">
366
- {fieldName}
367
- </div>
368
- <div class="relationship-field-value">
369
- {fieldValue}
370
- </div>
371
- {/each}
372
- </div>
373
- </GridPopover>
374
- {/if}
375
-
376
343
  <style>
377
344
  .wrapper {
378
345
  flex: 1 1 auto;
@@ -539,25 +506,4 @@
539
506
  .search :global(.spectrum-Form-item) {
540
507
  flex: 1 1 auto;
541
508
  }
542
-
543
- .relationship-fields {
544
- margin: var(--spacing-m) var(--spacing-l);
545
- display: grid;
546
- grid-template-columns: minmax(auto, 50%) auto;
547
- grid-row-gap: var(--spacing-m);
548
- grid-column-gap: var(--spacing-m);
549
- }
550
-
551
- .relationship-field-name {
552
- text-transform: uppercase;
553
- color: var(--spectrum-global-color-gray-600);
554
- font-size: var(--font-size-xs);
555
- }
556
- .relationship-field-value {
557
- overflow: hidden;
558
- display: -webkit-box;
559
- -webkit-box-orient: vertical;
560
- -webkit-line-clamp: 3;
561
- line-clamp: 3;
562
- }
563
509
  </style>
@@ -125,7 +125,7 @@
125
125
  subtype: column.subtype,
126
126
  visible: column.visible,
127
127
  readonly: column.readonly,
128
- constraints: column.constraints, // This is needed to properly display "users" column
128
+ icon: column.icon,
129
129
  },
130
130
  }
131
131
  })
@@ -19,6 +19,10 @@ export const getCellID = (rowId, fieldName) => {
19
19
  }
20
20
 
21
21
  export const getColumnIcon = column => {
22
+ if (column.schema.icon) {
23
+ return column.schema.icon
24
+ }
25
+
22
26
  if (column.schema.autocolumn) {
23
27
  return "MagicWand"
24
28
  }