@d4l/collect-lib 1.34.1 → 1.36.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.
- package/README.md +11 -9
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -342,11 +342,11 @@ Update the types by running `yarn run readme:update`.
|
|
|
342
342
|
|
|
343
343
|
#### SurveyMultiplex
|
|
344
344
|
|
|
345
|
-
| Properties
|
|
346
|
-
|
|
|
347
|
-
|
|
|
348
|
-
|
|
|
349
|
-
| placeholder
|
|
345
|
+
| Properties | Required | Type | Description |
|
|
346
|
+
| ----------- | -------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
347
|
+
| source | true | object | Defines the source of the multiplexing. The keys of the object are the questionnaire names and the values are the linkIds of the questions whose answers will be used for multiplexing. The answers to these questions will be used to fill the placeholder. |
|
|
348
|
+
| lookup | true | `all` or `latest` | Defines how the answers of the source questions will be looked up. `latest` means only the latest iteration of the source questionnaires will be used, `all` means all iterations of the source questionnaires will be used. |
|
|
349
|
+
| placeholder | true | string | Placeholder text to be replaced with answers from the specified linkIds |
|
|
350
350
|
|
|
351
351
|
### Routine
|
|
352
352
|
|
|
@@ -411,7 +411,9 @@ Update the types by running `yarn run readme:update`.
|
|
|
411
411
|
|
|
412
412
|
#### ContentBlock
|
|
413
413
|
|
|
414
|
-
| Properties | Required | Type | Description
|
|
415
|
-
| ---------- | -------- | ------------------ |
|
|
416
|
-
| image | false |
|
|
417
|
-
|
|
|
414
|
+
| Properties | Required | Type | Description |
|
|
415
|
+
| ---------- | -------- | ------------------ | --------------------------------------------- |
|
|
416
|
+
| image | false | object | Optional image for the content block |
|
|
417
|
+
| image.src | true | string | Image source URL |
|
|
418
|
+
| image.alt | false | {[language]: text} | Alt text for the image in available languages |
|
|
419
|
+
| text | true | {[language]: text} | Block text in available languages |
|
package/dist/index.d.mts
CHANGED
|
@@ -80,8 +80,10 @@ type SurveyContent = {
|
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
82
|
type SurveyMultiplex = {
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
source: {
|
|
84
|
+
[key: string]: string[];
|
|
85
|
+
};
|
|
86
|
+
lookup: 'all' | 'latest';
|
|
85
87
|
placeholder: string;
|
|
86
88
|
};
|
|
87
89
|
type SurveyContentPath = RecursiveKeyOf<SurveyContent>;
|
|
@@ -106,7 +108,10 @@ type DisplayContent = {
|
|
|
106
108
|
blocks?: ContentBlock[];
|
|
107
109
|
};
|
|
108
110
|
type ContentBlock = {
|
|
109
|
-
image?:
|
|
111
|
+
image?: {
|
|
112
|
+
src: string;
|
|
113
|
+
alt?: TranslatedString;
|
|
114
|
+
};
|
|
110
115
|
text: TranslatedString;
|
|
111
116
|
};
|
|
112
117
|
type DisplayContentPath = RecursiveKeyOf<DisplayContent>;
|
package/dist/index.d.ts
CHANGED
|
@@ -80,8 +80,10 @@ type SurveyContent = {
|
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
82
|
type SurveyMultiplex = {
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
source: {
|
|
84
|
+
[key: string]: string[];
|
|
85
|
+
};
|
|
86
|
+
lookup: 'all' | 'latest';
|
|
85
87
|
placeholder: string;
|
|
86
88
|
};
|
|
87
89
|
type SurveyContentPath = RecursiveKeyOf<SurveyContent>;
|
|
@@ -106,7 +108,10 @@ type DisplayContent = {
|
|
|
106
108
|
blocks?: ContentBlock[];
|
|
107
109
|
};
|
|
108
110
|
type ContentBlock = {
|
|
109
|
-
image?:
|
|
111
|
+
image?: {
|
|
112
|
+
src: string;
|
|
113
|
+
alt?: TranslatedString;
|
|
114
|
+
};
|
|
110
115
|
text: TranslatedString;
|
|
111
116
|
};
|
|
112
117
|
type DisplayContentPath = RecursiveKeyOf<DisplayContent>;
|