@stoker-platform/web-app 0.5.45 → 0.5.47
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 +15 -0
- package/package.json +4 -4
- package/src/Calendar.tsx +16 -10
- package/src/Collection.tsx +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @stoker-platform/web-app
|
|
2
2
|
|
|
3
|
+
## 0.5.47
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat: add default collection view option
|
|
8
|
+
- @stoker-platform/node-client@0.5.30
|
|
9
|
+
- @stoker-platform/utils@0.5.24
|
|
10
|
+
- @stoker-platform/web-client@0.5.26
|
|
11
|
+
|
|
12
|
+
## 0.5.46
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- fix: apply calendar record filter to unscheduled records
|
|
17
|
+
|
|
3
18
|
## 0.5.45
|
|
4
19
|
|
|
5
20
|
### 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.47",
|
|
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.30",
|
|
55
|
+
"@stoker-platform/utils": "0.5.24",
|
|
56
|
+
"@stoker-platform/web-client": "0.5.26",
|
|
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
|
@@ -679,9 +679,9 @@ export function Calendar({
|
|
|
679
679
|
if (calendarConfig?.additionalFields) {
|
|
680
680
|
calendarConfig.additionalFields.forEach((additionalField) => {
|
|
681
681
|
updatedList
|
|
682
|
-
// eslint-disable-next-line security/detect-object-injection
|
|
683
682
|
.filter(
|
|
684
683
|
(record) =>
|
|
684
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
685
685
|
record[additionalField] &&
|
|
686
686
|
(!calendarConfig.filterRecords || calendarConfig.filterRecords(record)),
|
|
687
687
|
)
|
|
@@ -1135,15 +1135,21 @@ export function Calendar({
|
|
|
1135
1135
|
<ScrollArea className="h-full pb-4">
|
|
1136
1136
|
<Table>
|
|
1137
1137
|
<TableBody>
|
|
1138
|
-
{unscheduledRecords
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1138
|
+
{unscheduledRecords
|
|
1139
|
+
.filter(
|
|
1140
|
+
(record) =>
|
|
1141
|
+
!calendarConfig.filterRecords ||
|
|
1142
|
+
calendarConfig.filterRecords(record),
|
|
1143
|
+
)
|
|
1144
|
+
.map((record) => (
|
|
1145
|
+
<Row
|
|
1146
|
+
key={record.id}
|
|
1147
|
+
collection={collection}
|
|
1148
|
+
record={record}
|
|
1149
|
+
recordTitleField={recordTitleField}
|
|
1150
|
+
isDisabled={!!isUpdateDisabled}
|
|
1151
|
+
/>
|
|
1152
|
+
))}
|
|
1147
1153
|
</TableBody>
|
|
1148
1154
|
</Table>
|
|
1149
1155
|
</ScrollArea>
|
package/src/Collection.tsx
CHANGED
|
@@ -698,11 +698,16 @@ function Collection({
|
|
|
698
698
|
const statusFilterState = state[`collection-status-filter-${labels.collection.toLowerCase()}`]
|
|
699
699
|
const cacheState = state[`collection-range-field-${labels.collection.toLowerCase()}`]
|
|
700
700
|
const rangeState = state[`collection-range-${labels.collection.toLowerCase()}`]
|
|
701
|
+
const defaultView = tryFunction(customization.admin?.defaultView)
|
|
701
702
|
if (!relationList) {
|
|
702
703
|
if (tabState) {
|
|
703
704
|
setTab(tabState)
|
|
704
705
|
tabRef.current = tabState
|
|
705
706
|
setState(`collection-tab-${labels.collection.toLowerCase()}`, "tab", tabState)
|
|
707
|
+
} else if (defaultView) {
|
|
708
|
+
setTab(defaultView)
|
|
709
|
+
tabRef.current = defaultView
|
|
710
|
+
setState(`collection-tab-${labels.collection.toLowerCase()}`, "tab", defaultView)
|
|
706
711
|
} else {
|
|
707
712
|
setTab("list")
|
|
708
713
|
tabRef.current = "list"
|