@trackunit/react-core-contexts-test 1.17.54 → 1.17.57

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/index.cjs2.js CHANGED
@@ -137,31 +137,31 @@ const mockFilterBarContext = {
137
137
  };
138
138
 
139
139
  const mockNavigationContext = {
140
- hasAccessTo: (options) => {
140
+ hasAccessTo: (_options) => {
141
141
  return Promise.resolve(true);
142
142
  },
143
- gotoAssetHome: (assetId, options) => {
143
+ gotoAssetHome: (_assetId, _options) => {
144
144
  return Promise.resolve(true);
145
145
  },
146
- gotoSiteHome: (siteId, options) => {
146
+ gotoSiteHome: (_siteId, _options) => {
147
147
  return Promise.resolve(true);
148
148
  },
149
- gotoGroupHome: (groupId, options) => {
149
+ gotoGroupHome: (_groupId, _options) => {
150
150
  return Promise.resolve(true);
151
151
  },
152
- gotoAppLibrary: (irisAppId) => {
152
+ gotoAppLibrary: (_irisAppId) => {
153
153
  return Promise.resolve(true);
154
154
  },
155
- gotoFleetApp: (options) => {
155
+ gotoFleetApp: (_options) => {
156
156
  return Promise.resolve(true);
157
157
  },
158
- gotoCustomerHome: (customerId) => {
158
+ gotoCustomerHome: (_customerId) => {
159
159
  return Promise.resolve(true);
160
160
  },
161
- gotoAdmin: (url) => {
161
+ gotoAdmin: (_url) => {
162
162
  return Promise.resolve(true);
163
163
  },
164
- gotoAlerts: (url) => {
164
+ gotoAlerts: (_url) => {
165
165
  return Promise.resolve(true);
166
166
  },
167
167
  gotoMarketplace: () => {
@@ -170,22 +170,22 @@ const mockNavigationContext = {
170
170
  reloadManager: () => {
171
171
  return Promise.resolve(true);
172
172
  },
173
- getAssetHomeUrl: (assetId, options) => {
173
+ getAssetHomeUrl: (assetId, _options) => {
174
174
  return Promise.resolve(`/assets/${assetId}/status`);
175
175
  },
176
- getSiteHomeUrl: (siteId, options) => {
176
+ getSiteHomeUrl: (siteId, _options) => {
177
177
  return Promise.resolve(`/sites/${siteId}/overview`);
178
178
  },
179
- getGroupHomeUrl: (groupId, options) => {
179
+ getGroupHomeUrl: (groupId, _options) => {
180
180
  return Promise.resolve(`/groups/${groupId}/home`);
181
181
  },
182
- getCustomerHomeUrl: (customerId, options) => {
182
+ getCustomerHomeUrl: (customerId, _options) => {
183
183
  return Promise.resolve(customerId ? `/customers/${customerId}/info` : `/customers`);
184
184
  },
185
- getAppLibraryUrl: irisAppId => {
185
+ getAppLibraryUrl: _irisAppId => {
186
186
  return Promise.resolve(`/administration/app-library`);
187
187
  },
188
- getFleetAppUrl: options => {
188
+ getFleetAppUrl: _options => {
189
189
  return Promise.resolve(`/fleet`);
190
190
  },
191
191
  getAdminUrl: url => {
@@ -194,7 +194,7 @@ const mockNavigationContext = {
194
194
  getAlertsUrl: url => {
195
195
  return Promise.resolve(url ? `/event-setup${url}` : `/event-setup`);
196
196
  },
197
- getMarketplaceUrl: options => {
197
+ getMarketplaceUrl: _options => {
198
198
  return Promise.resolve(`/marketplace`);
199
199
  },
200
200
  };
@@ -14472,7 +14472,7 @@ const Debugger = ({ id, logPropsChanges, stop = false, children, }) => {
14472
14472
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14473
14473
  const safeStringify = (obj) => {
14474
14474
  const seen = new WeakSet();
14475
- return JSON.stringify(obj, function (key, value) {
14475
+ return JSON.stringify(obj, function (_key, value) {
14476
14476
  if (typeof value === "object" && value !== null) {
14477
14477
  if (seen.has(value)) {
14478
14478
  return undefined; // Omit circular reference
@@ -14572,7 +14572,7 @@ const queryFor = (document, variables, data, error, maxUsageCount = 1) => {
14572
14572
  /**
14573
14573
  * Creates a mocked response for a hook query.
14574
14574
  *
14575
- * @param hookFn - The hook function that executes the query.
14575
+ * @param _hookFn - The hook function that executes the query.
14576
14576
  * @param document - Document that represents the specific GQL query / mutation schema.
14577
14577
  * @param variables - Variables that should be passed to the query / mutation.
14578
14578
  * Note that an *exact* match between the mock and operation is necessary.
@@ -14583,7 +14583,7 @@ const queryFor = (document, variables, data, error, maxUsageCount = 1) => {
14583
14583
  * @returns {MockedResponse} MockedResponse that can be passed to the mocked ApolloProvider.
14584
14584
  * @see Testing React components using MockedProvider and associated APIs (https://www.apollographql.com/docs/react/development-testing/testing/)
14585
14585
  */
14586
- const queryForHook = (hookFn, document, variables, data, error) => {
14586
+ const queryForHook = (_hookFn, document, variables, data, error) => {
14587
14587
  return {
14588
14588
  request: {
14589
14589
  query: document,
package/index.esm2.js CHANGED
@@ -115,31 +115,31 @@ const mockFilterBarContext = {
115
115
  };
116
116
 
117
117
  const mockNavigationContext = {
118
- hasAccessTo: (options) => {
118
+ hasAccessTo: (_options) => {
119
119
  return Promise.resolve(true);
120
120
  },
121
- gotoAssetHome: (assetId, options) => {
121
+ gotoAssetHome: (_assetId, _options) => {
122
122
  return Promise.resolve(true);
123
123
  },
124
- gotoSiteHome: (siteId, options) => {
124
+ gotoSiteHome: (_siteId, _options) => {
125
125
  return Promise.resolve(true);
126
126
  },
127
- gotoGroupHome: (groupId, options) => {
127
+ gotoGroupHome: (_groupId, _options) => {
128
128
  return Promise.resolve(true);
129
129
  },
130
- gotoAppLibrary: (irisAppId) => {
130
+ gotoAppLibrary: (_irisAppId) => {
131
131
  return Promise.resolve(true);
132
132
  },
133
- gotoFleetApp: (options) => {
133
+ gotoFleetApp: (_options) => {
134
134
  return Promise.resolve(true);
135
135
  },
136
- gotoCustomerHome: (customerId) => {
136
+ gotoCustomerHome: (_customerId) => {
137
137
  return Promise.resolve(true);
138
138
  },
139
- gotoAdmin: (url) => {
139
+ gotoAdmin: (_url) => {
140
140
  return Promise.resolve(true);
141
141
  },
142
- gotoAlerts: (url) => {
142
+ gotoAlerts: (_url) => {
143
143
  return Promise.resolve(true);
144
144
  },
145
145
  gotoMarketplace: () => {
@@ -148,22 +148,22 @@ const mockNavigationContext = {
148
148
  reloadManager: () => {
149
149
  return Promise.resolve(true);
150
150
  },
151
- getAssetHomeUrl: (assetId, options) => {
151
+ getAssetHomeUrl: (assetId, _options) => {
152
152
  return Promise.resolve(`/assets/${assetId}/status`);
153
153
  },
154
- getSiteHomeUrl: (siteId, options) => {
154
+ getSiteHomeUrl: (siteId, _options) => {
155
155
  return Promise.resolve(`/sites/${siteId}/overview`);
156
156
  },
157
- getGroupHomeUrl: (groupId, options) => {
157
+ getGroupHomeUrl: (groupId, _options) => {
158
158
  return Promise.resolve(`/groups/${groupId}/home`);
159
159
  },
160
- getCustomerHomeUrl: (customerId, options) => {
160
+ getCustomerHomeUrl: (customerId, _options) => {
161
161
  return Promise.resolve(customerId ? `/customers/${customerId}/info` : `/customers`);
162
162
  },
163
- getAppLibraryUrl: irisAppId => {
163
+ getAppLibraryUrl: _irisAppId => {
164
164
  return Promise.resolve(`/administration/app-library`);
165
165
  },
166
- getFleetAppUrl: options => {
166
+ getFleetAppUrl: _options => {
167
167
  return Promise.resolve(`/fleet`);
168
168
  },
169
169
  getAdminUrl: url => {
@@ -172,7 +172,7 @@ const mockNavigationContext = {
172
172
  getAlertsUrl: url => {
173
173
  return Promise.resolve(url ? `/event-setup${url}` : `/event-setup`);
174
174
  },
175
- getMarketplaceUrl: options => {
175
+ getMarketplaceUrl: _options => {
176
176
  return Promise.resolve(`/marketplace`);
177
177
  },
178
178
  };
@@ -14450,7 +14450,7 @@ const Debugger = ({ id, logPropsChanges, stop = false, children, }) => {
14450
14450
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14451
14451
  const safeStringify = (obj) => {
14452
14452
  const seen = new WeakSet();
14453
- return JSON.stringify(obj, function (key, value) {
14453
+ return JSON.stringify(obj, function (_key, value) {
14454
14454
  if (typeof value === "object" && value !== null) {
14455
14455
  if (seen.has(value)) {
14456
14456
  return undefined; // Omit circular reference
@@ -14550,7 +14550,7 @@ const queryFor = (document, variables, data, error, maxUsageCount = 1) => {
14550
14550
  /**
14551
14551
  * Creates a mocked response for a hook query.
14552
14552
  *
14553
- * @param hookFn - The hook function that executes the query.
14553
+ * @param _hookFn - The hook function that executes the query.
14554
14554
  * @param document - Document that represents the specific GQL query / mutation schema.
14555
14555
  * @param variables - Variables that should be passed to the query / mutation.
14556
14556
  * Note that an *exact* match between the mock and operation is necessary.
@@ -14561,7 +14561,7 @@ const queryFor = (document, variables, data, error, maxUsageCount = 1) => {
14561
14561
  * @returns {MockedResponse} MockedResponse that can be passed to the mocked ApolloProvider.
14562
14562
  * @see Testing React components using MockedProvider and associated APIs (https://www.apollographql.com/docs/react/development-testing/testing/)
14563
14563
  */
14564
- const queryForHook = (hookFn, document, variables, data, error) => {
14564
+ const queryForHook = (_hookFn, document, variables, data, error) => {
14565
14565
  return {
14566
14566
  request: {
14567
14567
  query: document,
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-test",
3
- "version": "1.17.54",
3
+ "version": "1.17.57",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=24.x"
8
8
  },
9
9
  "dependencies": {
10
- "@trackunit/shared-utils": "1.15.49",
10
+ "@trackunit/shared-utils": "1.15.52",
11
11
  "@tanstack/router-core": "1.114.29",
12
- "@trackunit/iris-app-runtime-core-api": "1.16.54",
13
- "@trackunit/react-core-contexts-api": "1.17.54",
12
+ "@trackunit/iris-app-runtime-core-api": "1.16.57",
13
+ "@trackunit/react-core-contexts-api": "1.17.57",
14
14
  "es-toolkit": "^1.39.10"
15
15
  },
16
16
  "peerDependencies": {
@@ -46,7 +46,7 @@ type QueryLazyReturn<TData, TVariables extends OperationVariables = OperationVar
46
46
  /**
47
47
  * Creates a mocked response for a hook query.
48
48
  *
49
- * @param hookFn - The hook function that executes the query.
49
+ * @param _hookFn - The hook function that executes the query.
50
50
  * @param document - Document that represents the specific GQL query / mutation schema.
51
51
  * @param variables - Variables that should be passed to the query / mutation.
52
52
  * Note that an *exact* match between the mock and operation is necessary.
@@ -57,5 +57,5 @@ type QueryLazyReturn<TData, TVariables extends OperationVariables = OperationVar
57
57
  * @returns {MockedResponse} MockedResponse that can be passed to the mocked ApolloProvider.
58
58
  * @see Testing React components using MockedProvider and associated APIs (https://www.apollographql.com/docs/react/development-testing/testing/)
59
59
  */
60
- export declare const queryForHook: <TData, TVariables extends OperationVariables = OperationVariables>(hookFn: (baseOptions: QueryHookOptions<TData, TVariables>) => QueryReturn<TData, TVariables> | QueryLazyReturn<TData, TVariables>, document: TypedDocumentNode<TData, TVariables>, variables: TVariables, data: TData | null, error?: ApolloError | Error) => MockedResponse;
60
+ export declare const queryForHook: <TData, TVariables extends OperationVariables = OperationVariables>(_hookFn: (baseOptions: QueryHookOptions<TData, TVariables>) => QueryReturn<TData, TVariables> | QueryLazyReturn<TData, TVariables>, document: TypedDocumentNode<TData, TVariables>, variables: TVariables, data: TData | null, error?: ApolloError | Error) => MockedResponse;
61
61
  export {};