@awell-health/awell-extensions 1.0.153 → 1.0.154

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.
@@ -6,15 +6,15 @@ const actions_1 = require("./v1/actions");
6
6
  const settings_1 = require("./settings");
7
7
  exports.CollectData = {
8
8
  key: 'collectData',
9
- title: 'Collect Data',
9
+ title: 'Advanced data collection',
10
10
  icon_url: 'https://res.cloudinary.com/da7x4rzl4/image/upload/v1678870116/Awell%20Extensions/Awell_Logo.png',
11
- description: 'Collect data from users to ingest into care flows',
11
+ description: 'This extension allows you to collect data from your users using a variety of more advanced input types and data sources.',
12
12
  category: extensions_core_1.Category.FORMS,
13
13
  author: {
14
14
  authorType: extensions_core_1.AuthorType.AWELL,
15
15
  },
16
16
  actions: {
17
- remoteSingleSelect: actions_1.remoteSingleSelect
17
+ remoteSingleSelect: actions_1.remoteSingleSelect,
18
18
  },
19
19
  settings: settings_1.settings,
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/collectData/index.ts"],"names":[],"mappings":";;;AACA,mEAAoE;AACpE,0CAEqB;AACrB,yCAAqC;AAExB,QAAA,WAAW,GAAc;IACpC,GAAG,EAAE,aAAa;IAClB,KAAK,EAAE,cAAc;IACrB,QAAQ,EACN,iGAAiG;IACnG,WAAW,EACT,mDAAmD;IACrD,QAAQ,EAAE,0BAAQ,CAAC,KAAK;IACxB,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,OAAO,EAAE;QACP,kBAAkB,EAAlB,4BAAkB;KACnB;IACD,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/collectData/index.ts"],"names":[],"mappings":";;;AACA,mEAAoE;AACpE,0CAAiD;AACjD,yCAAqC;AAExB,QAAA,WAAW,GAAc;IACpC,GAAG,EAAE,aAAa;IAClB,KAAK,EAAE,0BAA0B;IACjC,QAAQ,EACN,iGAAiG;IACnG,WAAW,EACT,0HAA0H;IAC5H,QAAQ,EAAE,0BAAQ,CAAC,KAAK;IACxB,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,OAAO,EAAE;QACP,kBAAkB,EAAlB,4BAAkB;KACnB;IACD,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
@@ -8,8 +8,8 @@ const zod_validation_error_1 = require("zod-validation-error");
8
8
  const zod_1 = require("zod");
9
9
  exports.remoteSingleSelect = {
10
10
  key: 'remoteSingleSelect',
11
- title: 'Remote Single Select',
12
- description: 'Allow a stakeholder to select a single option from a set fetched from an API endpoint',
11
+ title: 'Dynamic choice selector',
12
+ description: 'The dynamic choice selector allow you to set up a select question where the available choices are dynamically populated through an API lookup',
13
13
  category: extensions_core_1.Category.FORMS,
14
14
  fields: config_1.fields,
15
15
  dataPoints: config_1.dataPoints,
@@ -1 +1 @@
1
- {"version":3,"file":"remoteSingleSelect.js","sourceRoot":"","sources":["../../../../../../extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.ts"],"names":[],"mappings":";;;AACA,qCAA6C;AAC7C,mEAAwD;AAExD,4CAAsD;AACtD,+DAAmD;AACnD,6BAA8B;AAEjB,QAAA,kBAAkB,GAA2C;IACxE,GAAG,EAAE,oBAAoB;IACzB,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EACT,uFAAuF;IACzF,QAAQ,EAAE,0BAAQ,CAAC,KAAK;IACxB,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;SACf;KACF;IACD,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,IAAI;YACF,IAAA,6BAAoB,EAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YAEpC;;eAEG;SACJ;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,YAAY,cAAQ,EAAE;gBAC3B,MAAM,KAAK,GAAG,IAAA,mCAAY,EAAC,GAAG,CAAC,CAAA;gBAC/B,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE;4BACxB,KAAK,EAAE;gCACL,QAAQ,EAAE,aAAa;gCACvB,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE;6BAC5B;yBACF;qBACF;iBACF,CAAC,CAAA;gBACF,OAAM;aACP;YAED,MAAM,KAAK,GAAG,GAAY,CAAA;YAC1B,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,qDAAqD,EAAE;wBACnE,KAAK,EAAE;4BACL,QAAQ,EAAE,cAAc;4BACxB,OAAO,EAAE,KAAK,CAAC,OAAO;yBACvB;qBACF;iBACF;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"remoteSingleSelect.js","sourceRoot":"","sources":["../../../../../../extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.ts"],"names":[],"mappings":";;;AACA,qCAA6C;AAC7C,mEAAwD;AAExD,4CAAsD;AACtD,+DAAmD;AACnD,6BAA8B;AAEjB,QAAA,kBAAkB,GAA2C;IACxE,GAAG,EAAE,oBAAoB;IACzB,KAAK,EAAE,yBAAyB;IAChC,WAAW,EACT,+IAA+I;IACjJ,QAAQ,EAAE,0BAAQ,CAAC,KAAK;IACxB,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;SACf;KACF;IACD,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,IAAI;YACF,IAAA,6BAAoB,EAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YAEpC;;eAEG;SACJ;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,YAAY,cAAQ,EAAE;gBAC3B,MAAM,KAAK,GAAG,IAAA,mCAAY,EAAC,GAAG,CAAC,CAAA;gBAC/B,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE;4BACxB,KAAK,EAAE;gCACL,QAAQ,EAAE,aAAa;gCACvB,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE;6BAC5B;yBACF;qBACF;iBACF,CAAC,CAAA;gBACF,OAAM;aACP;YAED,MAAM,KAAK,GAAG,GAAY,CAAA;YAC1B,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,qDAAqD,EAAE;wBACnE,KAAK,EAAE;4BACL,QAAQ,EAAE,cAAc;4BACxB,OAAO,EAAE,KAAK,CAAC,OAAO;yBACvB;qBACF;iBACF;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
@@ -28,7 +28,7 @@
28
28
  "changelog": "# CM.com changelog\n"
29
29
  },
30
30
  "collectData": {
31
- "readme": "---\ntitle: Collect Data\ndescription: Collect data from your users using a variety of input types and data sources\n---\n\n# Collect Data\n\nThe Collect Data extension allows you to collect data from your users using a variety of input types and data sources.\n\n## Extension settings\n\nIn order to set up this extension, no settings are required.\n\n## Custom Actions\n\n### Remote Single Select\n\nThe Remote Single Select action allows you to create a single select input that is populated with data from a remote data source. The data source must be a REST API.\n",
31
+ "readme": "---\ntitle: Advanced data collection\ndescription: Collect data from your users using a variety of input types and data sources\n---\n\nThis extension allows you to collect data from your users using a variety of more advanced input types and data sources.\n\n## Extension settings\n\nIn order to set up this extension, no settings are required.\n\n## Custom Actions\n\n### Remote Single Select\n\nStandard select questions in Awell forms have a discrete set of choices to select from that are defined at the time that the form is created. If the list of choices to present to your responders isn't known at the time the form is being built, or changes often, this action allows you to load choices dynamically from a remote data source.\n\nDynamically-loaded choices must adhere to the following format in a list form (i.e. an array):\n\n```json\n{\n \"id\": \"unique-id\",\n \"label\": \"Choice label\",\n \"value\": \"Choice value\"\n}\n```\n\nAdditionally, you can specify a free text search field (`Options - Search query param` field) to allow users to search through the choices. This is optional but highly recommended. If not specified, the choices will be fetched on question load and presented in a static list that cannot be filtered.\n\nAs an example, using the endpoint `https://example.com/choices` with a query parameter `search` (e.g. `https://example.com/choices?search=QUERY` where `QUERY` is whatever the user typed into the input), then the API is expected to return the choices based on that match the search term.\n\nWe recommend that your search logic returns an _alphabetically-sorted_ list of all options where the _lowercase_ label names _contain_ the _lowercase_ search term.\n\n```js\n// Example search logic\nconst searchTerm = req.query.search\nconst results = []\n\noptions.forEach((option) => {\n if (option.label.toLowerCase().includes(searchTerm.toLowerCase())) {\n results.push({\n label: option.label,\n value: option.value,\n id: option.id,\n })\n }\n})\n\nconst sortedResults = results.sort((a, b) => a.label.localeCompare(b.label))\nres.json(results)\n```\n",
32
32
  "changelog": "# Collect Data changelog\n"
33
33
  },
34
34
  "docuSign": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.153",
3
+ "version": "1.0.154",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {