@stoker-platform/web-app 0.5.20 → 0.5.22
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 +20 -0
- package/package.json +4 -4
- package/src/Calendar.tsx +4 -2
- package/src/Cards.tsx +2 -0
- package/src/utils/getFormattedFieldValue.tsx +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @stoker-platform/web-app
|
|
2
2
|
|
|
3
|
+
## 0.5.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @stoker-platform/utils@0.5.11
|
|
9
|
+
- @stoker-platform/node-client@0.5.17
|
|
10
|
+
- @stoker-platform/web-client@0.5.11
|
|
11
|
+
|
|
12
|
+
## 0.5.21
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- feat: add custom calendar event title option
|
|
17
|
+
- fix: limit card header relation to 2 lines
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @stoker-platform/utils@0.5.10
|
|
20
|
+
- @stoker-platform/node-client@0.5.16
|
|
21
|
+
- @stoker-platform/web-client@0.5.10
|
|
22
|
+
|
|
3
23
|
## 0.5.20
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoker-platform/web-app",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.22",
|
|
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.
|
|
55
|
-
"@stoker-platform/utils": "0.5.
|
|
56
|
-
"@stoker-platform/web-client": "0.5.
|
|
54
|
+
"@stoker-platform/node-client": "0.5.17",
|
|
55
|
+
"@stoker-platform/utils": "0.5.11",
|
|
56
|
+
"@stoker-platform/web-client": "0.5.11",
|
|
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/Calendar.tsx
CHANGED
|
@@ -627,10 +627,12 @@ export function Calendar({
|
|
|
627
627
|
.map((record) => {
|
|
628
628
|
const isPendingServer = isGlobalLoading.get(record.id)?.server
|
|
629
629
|
|
|
630
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
631
|
+
const title = tryFunction(calendarConfig.eventTitle, [record]) || record[recordTitleField] || record.id
|
|
632
|
+
|
|
630
633
|
const event: EventInput = {
|
|
631
634
|
id: record.id,
|
|
632
|
-
|
|
633
|
-
title: record[recordTitleField] || record.id,
|
|
635
|
+
title,
|
|
634
636
|
start: record[calendarConfig.startField].toDate(),
|
|
635
637
|
startEditable: !isPendingServer && !isUpdateDisabled && hasStartUpdateAccess,
|
|
636
638
|
durationEditable: !isPendingServer && !isUpdateDisabled && hasEndUpdateAccess,
|
package/src/Cards.tsx
CHANGED
|
@@ -26,7 +26,7 @@ export const getFormattedFieldValue = (
|
|
|
26
26
|
maxLines?: 1 | 2 | 3 | 4 | 5 | 6,
|
|
27
27
|
goToRecord?: (collection: CollectionSchema, record: StokerRecord, field: RelationField) => void,
|
|
28
28
|
form?: boolean,
|
|
29
|
-
card?: boolean,
|
|
29
|
+
card?: boolean | "header",
|
|
30
30
|
) => {
|
|
31
31
|
let lineClamp = "line-clamp-6"
|
|
32
32
|
switch (maxLines) {
|
|
@@ -164,8 +164,10 @@ export const getFormattedFieldValue = (
|
|
|
164
164
|
}
|
|
165
165
|
}}
|
|
166
166
|
>
|
|
167
|
-
{
|
|
168
|
-
|
|
167
|
+
<span className={cn(card === "header" && "line-clamp-2")}>
|
|
168
|
+
{/* eslint-disable-next-line security/detect-object-injection */}
|
|
169
|
+
{titleField ? (Object.values(value)[0] as StokerRecord)[titleField] : Object.keys(value)[0]}
|
|
170
|
+
</span>
|
|
169
171
|
</Button>
|
|
170
172
|
)
|
|
171
173
|
)
|