@ilife-tech/react-application-flow-renderer 1.3.95 → 1.3.97

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/README.md CHANGED
@@ -143,7 +143,9 @@ const questionGroups = [
143
143
  {
144
144
  groupId: 1, // string | number
145
145
  groupName: 'Group Title',
146
- questions: [/* question objects */],
146
+ questions: [
147
+ /* question objects */
148
+ ],
147
149
  },
148
150
  ];
149
151
  ```
@@ -265,11 +267,21 @@ returns a response the form applies to its state:
265
267
  const handleApiTrigger = async (payload) => {
266
268
  const data = await callYourBackend(payload);
267
269
  return {
268
- updates: {/* questionId: value */}, // set field values
269
- options: {/* questionId: [ { name, value } ] */}, // replace option lists
270
- visibility: {/* questionId: boolean */}, // show/hide fields
271
- disabled: {/* questionId: boolean */}, // enable/disable fields
272
- errors: {/* questionId: message */}, // set field errors
270
+ updates: {
271
+ /* questionId: value */
272
+ }, // set field values
273
+ options: {
274
+ /* questionId: [ { name, value } ] */
275
+ }, // replace option lists
276
+ visibility: {
277
+ /* questionId: boolean */
278
+ }, // show/hide fields
279
+ disabled: {
280
+ /* questionId: boolean */
281
+ }, // enable/disable fields
282
+ errors: {
283
+ /* questionId: message */
284
+ }, // set field errors
273
285
  };
274
286
  };
275
287
 
@@ -283,6 +295,7 @@ const apiConfig = {
283
295
  googlePlaces: {
284
296
  apiKey: process.env.GOOGLE_PLACES_API_KEY,
285
297
  options: { componentRestrictions: { country: 'US' }, types: ['address'] },
298
+ nonce: '<csp-nonce>', // optional
286
299
  },
287
300
  customApi: {
288
301
  baseUrl: 'https://api.example.com',
@@ -291,10 +304,21 @@ const apiConfig = {
291
304
  convertToPdfUrl: '/document/convert-to-pdf',
292
305
  s3BucketUrl: 'https://cdn.example.com',
293
306
  headers: { Authorization: '<token>' },
307
+ isThirdPartyUpload: false, // optional
308
+ allowedAbsoluteHosts: ['api.example.com'], // optional
294
309
  },
295
310
  };
296
311
  ```
297
312
 
313
+ | Key | Description |
314
+ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
315
+ | `customApi.isThirdPartyUpload` | Set to exactly `true` to use the multipart third-party (Workflow Engine) upload. An absolute `uploadUrl` alone no longer enables it. |
316
+ | `customApi.allowedAbsoluteHosts` | Optional `string[]` of `hostname[:port]` values. When non-empty, cross-origin upload/convert/delete/extract URLs must use one of these hosts. |
317
+ | `googlePlaces.nonce` | Optional CSP nonce set on the Google Maps JS `<script>` tag. |
318
+
319
+ Cross-origin API URLs must be `https` (only `http://localhost` / `http://127.0.0.1` are exempt); a
320
+ refused URL is reported like a failed upload.
321
+
298
322
  For the complete integration contract (trigger flow, response format, caching, error handling), see
299
323
  [docs/reference/api-integration.md](docs/reference/api-integration.md), and for internal wiring
300
324
  [docs/architecture/api-and-file-handling.md](docs/architecture/api-and-file-handling.md).
@@ -455,6 +479,6 @@ production builds. Full convention and per-field-type ID tables: [TESTING_IDS.md
455
479
 
456
480
  ## License
457
481
 
458
- `package.json` declares the **ISC** license. (Note: a `LICENSE` file is referenced by `package.json`
459
- but is not currently present in the repository; see
482
+ `package.json` declares the **ISC** license. (Note: there is currently no `LICENSE` file in the
483
+ repository, so none is published; see
460
484
  [docs/architecture/documentation-audit.md](docs/architecture/documentation-audit.md).)