saasufy-components 8.4.1 → 8.4.2

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/README.md +8 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -129,6 +129,12 @@ import {
129
129
  } from 'saasufy-components/utils.js';
130
130
  ```
131
131
 
132
+ A reference to a socket can be obtained from a `socket-provider` element like this:
133
+
134
+ ```javascript
135
+ let socket = document.querySelector('socket-provider').getSocket();
136
+ ```
137
+
132
138
  **Available functions:**
133
139
 
134
140
  - `getRecordIds({ socket, type, viewName, viewParams, startPage, maxPages, pageSize })`: Retrieves record IDs from a collection view across multiple pages. Returns an array of IDs.
@@ -139,8 +145,8 @@ import {
139
145
  **Example usage:**
140
146
  ```javascript
141
147
  // Process all products one by one without loading them all into memory at once
142
- const productGenerator = generateRecords({
143
- socket: mySocket,
148
+ let productGenerator = generateRecords({
149
+ socket,
144
150
  type: 'Product',
145
151
  viewName: 'alphabeticalView',
146
152
  viewParams: { category: 'electronics' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saasufy-components",
3
- "version": "8.4.1",
3
+ "version": "8.4.2",
4
4
  "description": "Components for Saasufy.",
5
5
  "main": "index.js",
6
6
  "scripts": {