@salesforce/webapp-template-app-react-sample-b2e-experimental 1.116.8 → 1.116.10

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.
@@ -40,6 +40,7 @@ import type {
40
40
  Application__C_Filter,
41
41
  Application__C_OrderBy,
42
42
  } from "../api/graphql-operations-types";
43
+ import { ResultOrder } from "../api/graphql-operations-types";
43
44
  import { Badge } from "../components/ui/badge";
44
45
  import { PAGINATION_CONFIG } from "../lib/constants";
45
46
  import { cn } from "../lib/utils";
@@ -78,17 +79,20 @@ export default function ApplicationSearch() {
78
79
  Application__C_Filter,
79
80
  Application__C_OrderBy
80
81
  >(FILTER_CONFIGS, SORT_CONFIGS, PAGINATION_CONFIG);
82
+ const effectiveOrderBy: Application__C_OrderBy = query.orderBy ?? {
83
+ CreatedDate: { order: ResultOrder.Desc },
84
+ };
81
85
 
82
- const searchKey = `applications:${JSON.stringify({ where: query.where, orderBy: query.orderBy, first: pagination.pageSize, after: pagination.afterCursor })}`;
86
+ const searchKey = `applications:${JSON.stringify({ where: query.where, orderBy: effectiveOrderBy, first: pagination.pageSize, after: pagination.afterCursor })}`;
83
87
  const { data, loading, error } = useCachedAsyncData(
84
88
  () =>
85
89
  searchApplications({
86
90
  where: query.where,
87
- orderBy: query.orderBy,
91
+ orderBy: effectiveOrderBy,
88
92
  first: pagination.pageSize,
89
93
  after: pagination.afterCursor,
90
94
  }),
91
- [query.where, query.orderBy, pagination.pageSize, pagination.afterCursor],
95
+ [query.where, effectiveOrderBy, pagination.pageSize, pagination.afterCursor],
92
96
  { key: searchKey },
93
97
  );
94
98
 
@@ -51,6 +51,7 @@ import type {
51
51
  Maintenance_Request__C_Filter,
52
52
  Maintenance_Request__C_OrderBy,
53
53
  } from "../api/graphql-operations-types";
54
+ import { ResultOrder } from "../api/graphql-operations-types";
54
55
  import { cn } from "../lib/utils";
55
56
 
56
57
  const issueIcons: Record<string, string> = {
@@ -104,17 +105,20 @@ export default function MaintenanceRequestSearch() {
104
105
  Maintenance_Request__C_Filter,
105
106
  Maintenance_Request__C_OrderBy
106
107
  >(FILTER_CONFIGS, SORT_CONFIGS, PAGINATION_CONFIG);
108
+ const effectiveOrderBy: Maintenance_Request__C_OrderBy = query.orderBy ?? {
109
+ CreatedDate: { order: ResultOrder.Desc },
110
+ };
107
111
 
108
- const searchKey = `maintenance-requests:${JSON.stringify({ where: query.where, orderBy: query.orderBy, first: pagination.pageSize, after: pagination.afterCursor })}`;
112
+ const searchKey = `maintenance-requests:${JSON.stringify({ where: query.where, orderBy: effectiveOrderBy, first: pagination.pageSize, after: pagination.afterCursor })}`;
109
113
  const { data, loading, error } = useCachedAsyncData(
110
114
  () =>
111
115
  searchMaintenanceRequests({
112
116
  where: query.where,
113
- orderBy: query.orderBy,
117
+ orderBy: effectiveOrderBy,
114
118
  first: pagination.pageSize,
115
119
  after: pagination.afterCursor,
116
120
  }),
117
- [query.where, query.orderBy, pagination.pageSize, pagination.afterCursor],
121
+ [query.where, effectiveOrderBy, pagination.pageSize, pagination.afterCursor],
118
122
  { key: searchKey },
119
123
  );
120
124
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "1.116.8",
3
+ "version": "1.116.10",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
9
- "version": "1.116.8",
9
+ "version": "1.116.10",
10
10
  "license": "SEE LICENSE IN LICENSE.txt",
11
11
  "devDependencies": {
12
12
  "@lwc/eslint-plugin-lwc": "^3.3.0",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "1.116.8",
3
+ "version": "1.116.10",
4
4
  "description": "Base SFDX project template",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "publishConfig": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-app-react-sample-b2e-experimental",
3
- "version": "1.116.8",
3
+ "version": "1.116.10",
4
4
  "description": "Salesforce sample property rental React app",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "",
@@ -16,7 +16,7 @@
16
16
  "clean": "rm -rf dist"
17
17
  },
18
18
  "dependencies": {
19
- "@salesforce/webapp-experimental": "^1.116.8",
19
+ "@salesforce/webapp-experimental": "^1.116.10",
20
20
  "sonner": "^1.7.0"
21
21
  },
22
22
  "devDependencies": {