saasufy-components 2.14.0 → 2.15.0

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.
@@ -1,6 +1,6 @@
1
1
  import { SocketConsumer } from './socket.js';
2
2
  import AGCollection from '/node_modules/ag-collection/ag-collection.js';
3
- import { renderTemplate } from './utils.js';
3
+ import { renderTemplate, convertStringToFieldParams } from './utils.js';
4
4
 
5
5
  const DEFAULT_RELOAD_DELAY = 0;
6
6
 
@@ -226,11 +226,8 @@ class CollectionBrowser extends SocketConsumer {
226
226
  let collectionReloadDelay = Number(
227
227
  this.getAttribute('collection-reload-delay') || DEFAULT_RELOAD_DELAY
228
228
  );
229
- let viewParams = Object.fromEntries(
230
- collectionViewParams.split(',')
231
- .map(pair => pair.split('='))
232
- .filter(([field]) => field)
233
- );
229
+ let { fieldValues: viewParams } = convertStringToFieldParams(collectionViewParams);
230
+
234
231
  if (this.collection) this.collection.destroy();
235
232
  this.isStale = true;
236
233
 
@@ -1,6 +1,6 @@
1
1
  import { SocketConsumer } from './socket.js';
2
2
  import AGCollection from '/node_modules/ag-collection/ag-collection.js';
3
- import { renderTemplate } from './utils.js';
3
+ import { renderTemplate, convertStringToFieldParams } from './utils.js';
4
4
 
5
5
  const DEFAULT_RELOAD_DELAY = 0;
6
6
 
@@ -183,11 +183,8 @@ class CollectionReducer extends SocketConsumer {
183
183
  let collectionReloadDelay = Number(
184
184
  this.getAttribute('collection-reload-delay') || DEFAULT_RELOAD_DELAY
185
185
  );
186
- let viewParams = Object.fromEntries(
187
- collectionViewParams.split(',')
188
- .map(pair => pair.split('='))
189
- .filter(([field]) => field)
190
- );
186
+ let { fieldValues: viewParams } = convertStringToFieldParams(collectionViewParams);
187
+
191
188
  if (this.collection) this.collection.destroy();
192
189
  this.isStale = true;
193
190
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saasufy-components",
3
- "version": "2.14.0",
3
+ "version": "2.15.0",
4
4
  "description": "Components for Saasufy.",
5
5
  "main": "index.js",
6
6
  "scripts": {