@stoker-platform/web-app 0.5.38 → 0.5.39

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.39
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: support full text search on array fields
8
+ - feat: load full relation document into create record form
9
+ - feat: support modifying CSV export value
10
+ - @stoker-platform/node-client@0.5.24
11
+ - @stoker-platform/utils@0.5.18
12
+ - @stoker-platform/web-client@0.5.20
13
+
3
14
  ## 0.5.38
4
15
 
5
16
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.38",
3
+ "version": "0.5.39",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
@@ -51,9 +51,9 @@
51
51
  "@radix-ui/react-tooltip": "^1.2.8",
52
52
  "@react-google-maps/api": "^2.20.8",
53
53
  "@sentry/react": "^10.38.0",
54
- "@stoker-platform/node-client": "0.5.23",
55
- "@stoker-platform/utils": "0.5.17",
56
- "@stoker-platform/web-client": "0.5.19",
54
+ "@stoker-platform/node-client": "0.5.24",
55
+ "@stoker-platform/utils": "0.5.18",
56
+ "@stoker-platform/web-client": "0.5.20",
57
57
  "@tanstack/react-table": "^8.21.3",
58
58
  "@types/react": "18.3.13",
59
59
  "@types/react-dom": "18.3.1",
package/src/Form.tsx CHANGED
@@ -1678,6 +1678,17 @@ function RelationField({
1678
1678
  } else {
1679
1679
  setDisplay(relationId)
1680
1680
  }
1681
+ if (operation === "create") {
1682
+ const queryFullRecord = tryFunction(fieldCustomization.admin?.queryFullRecord)
1683
+ if (!(field.includeFields && field.titleField) || queryFullRecord) {
1684
+ const fullRecord = await getOne([relationCollection.labels.collection], relationId, {
1685
+ noEmbeddingFields: true,
1686
+ })
1687
+ if (!isEqual(fullRecord, relationRecord)) {
1688
+ form.setValue(field.name, { ...form.getValues(field.name), [relationId]: fullRecord })
1689
+ }
1690
+ }
1691
+ }
1681
1692
  } else {
1682
1693
  setValue("no_selection")
1683
1694
  setDisplay("----")
@@ -86,8 +86,16 @@ export const prepareCSVData = (collection: CollectionSchema, data: any[]) => {
86
86
  computedValue = "No"
87
87
  } else if (doc[field.name] === "tick") {
88
88
  computedValue = "Yes"
89
+ } else if (fieldCustomization.admin?.modifyDisplayValue) {
90
+ computedValue = tryFunction(fieldCustomization.admin?.modifyDisplayValue(doc, "export"))
91
+ if (computedValue === "-") {
92
+ computedValue = ""
93
+ }
89
94
  } else {
90
95
  computedValue = doc[field.name]
96
+ if (computedValue === "-") {
97
+ computedValue = ""
98
+ }
91
99
  }
92
100
  docData[field.name] = escapeCSVField(computedValue)
93
101
  } else if (doc[field.name] !== undefined) {