@sonic-equipment/ui 0.0.36 → 0.0.37

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6363,7 +6363,9 @@ else if (environmentUrl.match(productionUrls)) {
6363
6363
  environment = 'production';
6364
6364
  }
6365
6365
  else {
6366
- throw new Error('Environment not detected for url ${environmentUrl}');
6366
+ // TODO; Do not default to sandbox
6367
+ environment = 'sandbox';
6368
+ console.error(`Environment not detected for url ${environmentUrl}. Defaulting to sandbox.`);
6367
6369
  }
6368
6370
 
6369
6371
  const algoliaIndexesPerEnvironment = {
@@ -6446,6 +6448,9 @@ function createQueryStringRouting(algoliaIndex) {
6446
6448
  });
6447
6449
  queryString.filters = state.refinementList;
6448
6450
  queryString.sortBy = state.sortBy;
6451
+ if (state.page) {
6452
+ queryString.page = state.page.toString();
6453
+ }
6449
6454
  const newQueryString = qs.stringify(queryString, {
6450
6455
  addQueryPrefix: true,
6451
6456
  allowDots: true,
@@ -6464,6 +6469,9 @@ function createQueryStringRouting(algoliaIndex) {
6464
6469
  }, {});
6465
6470
  const uiState = {
6466
6471
  [algoliaIndex.default]: {
6472
+ page: queryString.page
6473
+ ? parseInt(queryString.page.toString(), 10)
6474
+ : 0,
6467
6475
  refinementList,
6468
6476
  sortBy: queryString.sortBy?.toString(),
6469
6477
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {