@stoker-platform/web-app 0.5.187 → 0.5.189
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 +19 -1
- package/package.json +4 -4
- package/src/Cards.tsx +1 -1
- package/src/Collection.tsx +13 -5
- package/src/utils/prepareCSVData.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
# @stoker-platform/web-app
|
|
2
2
|
|
|
3
|
+
## 0.5.189
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat: add title bar counter
|
|
8
|
+
- @stoker-platform/node-client@0.5.75
|
|
9
|
+
- @stoker-platform/utils@0.5.66
|
|
10
|
+
- @stoker-platform/web-client@0.5.77
|
|
11
|
+
|
|
12
|
+
## 0.5.188
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- feat: add isExport parameter to form condition method
|
|
17
|
+
- @stoker-platform/node-client@0.5.74
|
|
18
|
+
- @stoker-platform/utils@0.5.65
|
|
19
|
+
- @stoker-platform/web-client@0.5.76
|
|
20
|
+
|
|
3
21
|
## 0.5.187
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
6
24
|
|
|
7
|
-
- feat:
|
|
25
|
+
- feat: change Dashboard metric spinner colour
|
|
8
26
|
|
|
9
27
|
## 0.5.186
|
|
10
28
|
|
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.189",
|
|
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.56.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.75",
|
|
55
|
+
"@stoker-platform/utils": "0.5.66",
|
|
56
|
+
"@stoker-platform/web-client": "0.5.77",
|
|
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/Cards.tsx
CHANGED
|
@@ -189,7 +189,7 @@ function CardItem({ index, style, data }: CardItemProps) {
|
|
|
189
189
|
|
|
190
190
|
let titleClass = ""
|
|
191
191
|
if (isPendingServer || isDisabled) {
|
|
192
|
-
titleClass = "text-muted-foreground"
|
|
192
|
+
titleClass = "text-primary/70 dark:text-muted-foreground"
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
const headerLineClamp = cardsConfig.maxHeaderLines === 2 ? "line-clamp-2" : "line-clamp-1"
|
package/src/Collection.tsx
CHANGED
|
@@ -241,6 +241,7 @@ function Collection({
|
|
|
241
241
|
const [firstTabLoadCards, setFirstTabLoadCards] = useState<boolean | undefined>(undefined)
|
|
242
242
|
const [revertingStatusFilter, setRevertingStatusFilter] = useState(false)
|
|
243
243
|
const [rangeSelector, setRangeSelector] = useState<"range" | "week" | "month" | undefined>(undefined)
|
|
244
|
+
const [titleCount, setTitleCount] = useState(false)
|
|
244
245
|
|
|
245
246
|
const { filters, setFilters, order, setOrder, getFilterConstraints } = useFilters()
|
|
246
247
|
const { orderByField, orderByDirection } = useMemo(() => getOrderBy(collection, order), [order])
|
|
@@ -610,11 +611,8 @@ function Collection({
|
|
|
610
611
|
// eslint-disable-next-line security/detect-object-injection
|
|
611
612
|
unsubscribe.current[key].push(newUnsubscribe)
|
|
612
613
|
if (!isPreloadCacheEnabled && !isServerReadOnly) {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
} else {
|
|
616
|
-
setCount((prev) => ({ ...prev, [key]: newCount }))
|
|
617
|
-
}
|
|
614
|
+
setPages((prev) => ({ ...prev, [key]: newPages || 1 }))
|
|
615
|
+
setCount((prev) => ({ ...prev, [key]: newCount }))
|
|
618
616
|
}
|
|
619
617
|
resolve()
|
|
620
618
|
}
|
|
@@ -881,6 +879,8 @@ function Collection({
|
|
|
881
879
|
const customListActions =
|
|
882
880
|
(await getCachedConfigValue(customization, [...collectionAdminPath, "customListActions"])) || []
|
|
883
881
|
setCustomListActions(customListActions)
|
|
882
|
+
const titleCount = await getCachedConfigValue(customization, [...collectionAdminPath, "titleCount"])
|
|
883
|
+
setTitleCount(!!titleCount)
|
|
884
884
|
|
|
885
885
|
const statusField = await getCachedConfigValue(customization, [...collectionAdminPath, "statusField"])
|
|
886
886
|
setStatusField(statusField)
|
|
@@ -1744,6 +1744,14 @@ function Collection({
|
|
|
1744
1744
|
<Card className="flex items-center gap-2 h-12 sm:min-w-[300px] p-5">
|
|
1745
1745
|
{icon ? createElement(icon) : null}
|
|
1746
1746
|
<h1>{collectionTitle}</h1>
|
|
1747
|
+
{titleCount && tab !== "cards" && tab !== "calendar" && (
|
|
1748
|
+
<span
|
|
1749
|
+
className="hidden sm:block text-sm text-muted-foreground ml-auto"
|
|
1750
|
+
style={{ marginLeft: "auto", marginRight: 0 }}
|
|
1751
|
+
>
|
|
1752
|
+
{(count?.default ?? list.default?.length)?.toString()}
|
|
1753
|
+
</span>
|
|
1754
|
+
)}
|
|
1747
1755
|
</Card>
|
|
1748
1756
|
{isInitialized && (connectionStatus === "online" || isPreloadCacheEnabled) && (
|
|
1749
1757
|
<>
|
|
@@ -59,7 +59,7 @@ export const prepareCSVData = (collection: CollectionSchema, data: any[]) => {
|
|
|
59
59
|
const noExport = tryFunction(fieldCustomization.admin?.noExport) || false
|
|
60
60
|
if (noExport) continue
|
|
61
61
|
if (fieldCustomization.admin?.condition?.form) {
|
|
62
|
-
const condition = tryFunction(fieldCustomization.admin?.condition?.form, ["update", doc])
|
|
62
|
+
const condition = tryFunction(fieldCustomization.admin?.condition?.form, ["update", doc, true])
|
|
63
63
|
if (condition === false) {
|
|
64
64
|
docData[field.name] = ""
|
|
65
65
|
continue
|