@miso.ai/client-sdk-ui 1.13.2-beta.0 → 1.14.0-beta.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 (214) hide show
  1. package/dist/cjs/asset/svgs.js +15 -4
  2. package/dist/cjs/combo/ask/index.js +2 -2
  3. package/dist/cjs/constants.js +118 -98
  4. package/dist/cjs/defaults/ask/controls.js +1 -1
  5. package/dist/cjs/defaults/hybrid-search/answer-box.js +4 -4
  6. package/dist/cjs/defaults.js +169 -0
  7. package/dist/cjs/element/container/index.js +14 -0
  8. package/dist/cjs/element/container/miso-ask.js +3 -3
  9. package/dist/cjs/element/container/miso-conversation.js +21 -0
  10. package/dist/cjs/element/container/miso-explore.js +1 -1
  11. package/dist/cjs/element/container/miso-history.js +21 -0
  12. package/dist/cjs/element/container/miso-hybrid-search.js +1 -1
  13. package/dist/cjs/element/container/miso-recommendation.js +1 -1
  14. package/dist/cjs/element/container/miso-search.js +1 -1
  15. package/dist/cjs/element/context/miso-follow-ups.js +1 -1
  16. package/dist/cjs/element/role/index.js +42 -0
  17. package/dist/cjs/element/role/miso-messages.js +20 -0
  18. package/dist/cjs/element/role/miso-new-thread.js +20 -0
  19. package/dist/cjs/element/role/miso-rename.js +20 -0
  20. package/dist/cjs/element/role/miso-subscription.js +20 -0
  21. package/dist/cjs/element/role/miso-threads.js +20 -0
  22. package/dist/cjs/element/role/miso-title.js +20 -0
  23. package/dist/cjs/layout/affiliation/affiliation.js +1 -1
  24. package/dist/cjs/layout/banner/banner.js +2 -1
  25. package/dist/cjs/layout/button/button.js +130 -0
  26. package/dist/cjs/layout/button/checkbox.js +115 -0
  27. package/dist/cjs/layout/button/more-button.js +3 -3
  28. package/dist/cjs/layout/container/container.js +1 -1
  29. package/dist/cjs/layout/error/error.js +2 -1
  30. package/dist/cjs/layout/index.js +28 -0
  31. package/dist/cjs/layout/input/facets.js +4 -3
  32. package/dist/cjs/layout/input/option-list.js +3 -2
  33. package/dist/cjs/layout/input/search-box.js +42 -9
  34. package/dist/cjs/layout/input/select.js +2 -1
  35. package/dist/cjs/layout/list/cards.js +2 -1
  36. package/dist/cjs/layout/list/carousel.js +2 -1
  37. package/dist/cjs/layout/list/collection.js +5 -0
  38. package/dist/cjs/layout/list/gallery.js +2 -1
  39. package/dist/cjs/layout/list/horizontal.js +2 -1
  40. package/dist/cjs/layout/list/list.js +2 -1
  41. package/dist/cjs/layout/list/messages.js +346 -0
  42. package/dist/cjs/layout/list/threads.js +257 -0
  43. package/dist/cjs/layout/mixin/trackable.js +4 -5
  44. package/dist/cjs/layout/mixin/triggerable.js +2 -2
  45. package/dist/cjs/layout/radio/feedback.js +4 -3
  46. package/dist/cjs/layout/templates.js +70 -0
  47. package/dist/cjs/layout/text/text.js +2 -1
  48. package/dist/cjs/layout/text/typewriter/index.js +4 -2
  49. package/dist/cjs/plugin.js +43 -104
  50. package/dist/cjs/util/confirm.js +33 -0
  51. package/dist/cjs/util/modal.js +48 -0
  52. package/dist/cjs/util/prompt.js +47 -0
  53. package/dist/cjs/version.js +1 -1
  54. package/package.json +5 -4
  55. package/src/CLAUDE.md +48 -105
  56. package/src/asset/svgs.js +14 -3
  57. package/src/combo/ask/index.js +2 -2
  58. package/src/constants.js +37 -147
  59. package/src/defaults/ask/controls.js +1 -1
  60. package/src/defaults/hybrid-search/answer-box.js +2 -2
  61. package/src/defaults.js +107 -0
  62. package/src/element/container/index.js +2 -0
  63. package/src/element/container/miso-ask.js +3 -3
  64. package/src/element/container/miso-conversation.js +19 -0
  65. package/src/element/container/miso-explore.js +1 -1
  66. package/src/element/container/miso-history.js +19 -0
  67. package/src/element/container/miso-hybrid-search.js +1 -1
  68. package/src/element/container/miso-recommendation.js +1 -1
  69. package/src/element/container/miso-search.js +1 -1
  70. package/src/element/context/miso-follow-ups.js +1 -1
  71. package/src/element/role/index.js +6 -0
  72. package/src/element/role/miso-messages.js +16 -0
  73. package/src/element/role/miso-new-thread.js +16 -0
  74. package/src/element/role/miso-rename.js +16 -0
  75. package/src/element/role/miso-subscription.js +16 -0
  76. package/src/element/role/miso-threads.js +16 -0
  77. package/src/element/role/miso-title.js +16 -0
  78. package/src/layout/affiliation/affiliation.js +2 -2
  79. package/src/layout/banner/banner.js +2 -1
  80. package/src/layout/button/button.js +116 -0
  81. package/src/layout/button/checkbox.js +91 -0
  82. package/src/layout/button/more-button.js +3 -3
  83. package/src/layout/container/container.js +2 -2
  84. package/src/layout/error/error.js +2 -1
  85. package/src/layout/index.js +4 -0
  86. package/src/layout/input/facets.js +3 -2
  87. package/src/layout/input/option-list.js +3 -2
  88. package/src/layout/input/search-box.js +41 -6
  89. package/src/layout/input/select.js +2 -1
  90. package/src/layout/list/cards.js +2 -1
  91. package/src/layout/list/carousel.js +2 -1
  92. package/src/layout/list/collection.js +6 -1
  93. package/src/layout/list/gallery.js +2 -1
  94. package/src/layout/list/horizontal.js +2 -1
  95. package/src/layout/list/list.js +2 -1
  96. package/src/layout/list/messages.js +318 -0
  97. package/src/layout/list/threads.js +206 -0
  98. package/src/layout/mixin/trackable.js +2 -3
  99. package/src/layout/mixin/triggerable.js +1 -1
  100. package/src/layout/radio/feedback.js +3 -2
  101. package/src/layout/templates.js +62 -0
  102. package/src/layout/text/text.js +2 -1
  103. package/src/layout/text/typewriter/index.js +5 -3
  104. package/src/plugin.js +31 -117
  105. package/src/util/confirm.js +28 -0
  106. package/src/util/modal.js +49 -0
  107. package/src/util/prompt.js +42 -0
  108. package/src/version.js +1 -1
  109. package/dist/cjs/actor/data.js +0 -132
  110. package/dist/cjs/actor/feedback.js +0 -29
  111. package/dist/cjs/actor/fields.js +0 -57
  112. package/dist/cjs/actor/filters.js +0 -161
  113. package/dist/cjs/actor/hub.js +0 -57
  114. package/dist/cjs/actor/index.js +0 -73
  115. package/dist/cjs/actor/interactions.js +0 -36
  116. package/dist/cjs/actor/sessions.js +0 -25
  117. package/dist/cjs/actor/tracker-states.js +0 -61
  118. package/dist/cjs/actor/tracker.js +0 -109
  119. package/dist/cjs/actor/trackers.js +0 -52
  120. package/dist/cjs/actor/utils.js +0 -15
  121. package/dist/cjs/actor/view.js +0 -294
  122. package/dist/cjs/actor/views.js +0 -209
  123. package/dist/cjs/source.js +0 -27
  124. package/dist/cjs/util/proxy.js +0 -88
  125. package/dist/cjs/util/trackers.js +0 -88
  126. package/dist/cjs/workflow/affiliations.js +0 -140
  127. package/dist/cjs/workflow/answer-based.js +0 -337
  128. package/dist/cjs/workflow/ask.js +0 -319
  129. package/dist/cjs/workflow/asks.js +0 -150
  130. package/dist/cjs/workflow/autocompletable.js +0 -63
  131. package/dist/cjs/workflow/autocomplete.js +0 -120
  132. package/dist/cjs/workflow/base.js +0 -418
  133. package/dist/cjs/workflow/context.js +0 -19
  134. package/dist/cjs/workflow/explore.js +0 -210
  135. package/dist/cjs/workflow/explores.js +0 -21
  136. package/dist/cjs/workflow/hybrid-search-answer.js +0 -88
  137. package/dist/cjs/workflow/hybrid-search-views.js +0 -109
  138. package/dist/cjs/workflow/hybrid-search.js +0 -213
  139. package/dist/cjs/workflow/index.js +0 -41
  140. package/dist/cjs/workflow/options/api.js +0 -41
  141. package/dist/cjs/workflow/options/auto-query.js +0 -97
  142. package/dist/cjs/workflow/options/configurable.js +0 -45
  143. package/dist/cjs/workflow/options/data-processor.js +0 -20
  144. package/dist/cjs/workflow/options/filters.js +0 -15
  145. package/dist/cjs/workflow/options/index.js +0 -126
  146. package/dist/cjs/workflow/options/interactions.js +0 -41
  147. package/dist/cjs/workflow/options/layouts.js +0 -79
  148. package/dist/cjs/workflow/options/options.js +0 -156
  149. package/dist/cjs/workflow/options/pagination.js +0 -25
  150. package/dist/cjs/workflow/options/roles.js +0 -15
  151. package/dist/cjs/workflow/options/templates.js +0 -30
  152. package/dist/cjs/workflow/options/trackers.js +0 -83
  153. package/dist/cjs/workflow/options/utils.js +0 -33
  154. package/dist/cjs/workflow/processors.js +0 -607
  155. package/dist/cjs/workflow/recommendation.js +0 -57
  156. package/dist/cjs/workflow/recommendations.js +0 -18
  157. package/dist/cjs/workflow/search-based.js +0 -337
  158. package/dist/cjs/workflow/search.js +0 -64
  159. package/dist/cjs/workflow/unit.js +0 -57
  160. package/dist/cjs/workflow/units.js +0 -42
  161. package/dist/cjs/workflow/use-link.js +0 -49
  162. package/src/actor/data.js +0 -106
  163. package/src/actor/feedback.js +0 -28
  164. package/src/actor/fields.js +0 -51
  165. package/src/actor/filters.js +0 -149
  166. package/src/actor/hub.js +0 -47
  167. package/src/actor/index.js +0 -10
  168. package/src/actor/interactions.js +0 -32
  169. package/src/actor/sessions.js +0 -21
  170. package/src/actor/tracker-states.js +0 -57
  171. package/src/actor/tracker.js +0 -104
  172. package/src/actor/trackers.js +0 -45
  173. package/src/actor/utils.js +0 -7
  174. package/src/actor/view.js +0 -272
  175. package/src/actor/views.js +0 -224
  176. package/src/source.js +0 -17
  177. package/src/util/proxy.js +0 -81
  178. package/src/util/trackers.js +0 -84
  179. package/src/workflow/affiliations.js +0 -121
  180. package/src/workflow/answer-based.js +0 -312
  181. package/src/workflow/ask.js +0 -284
  182. package/src/workflow/asks.js +0 -143
  183. package/src/workflow/autocompletable.js +0 -67
  184. package/src/workflow/autocomplete.js +0 -114
  185. package/src/workflow/base.js +0 -396
  186. package/src/workflow/context.js +0 -16
  187. package/src/workflow/explore.js +0 -194
  188. package/src/workflow/explores.js +0 -18
  189. package/src/workflow/hybrid-search-answer.js +0 -73
  190. package/src/workflow/hybrid-search-views.js +0 -116
  191. package/src/workflow/hybrid-search.js +0 -230
  192. package/src/workflow/index.js +0 -5
  193. package/src/workflow/options/api.js +0 -31
  194. package/src/workflow/options/auto-query.js +0 -70
  195. package/src/workflow/options/configurable.js +0 -48
  196. package/src/workflow/options/data-processor.js +0 -15
  197. package/src/workflow/options/filters.js +0 -10
  198. package/src/workflow/options/index.js +0 -11
  199. package/src/workflow/options/interactions.js +0 -36
  200. package/src/workflow/options/layouts.js +0 -73
  201. package/src/workflow/options/options.js +0 -175
  202. package/src/workflow/options/pagination.js +0 -18
  203. package/src/workflow/options/roles.js +0 -12
  204. package/src/workflow/options/templates.js +0 -27
  205. package/src/workflow/options/trackers.js +0 -80
  206. package/src/workflow/options/utils.js +0 -26
  207. package/src/workflow/processors.js +0 -490
  208. package/src/workflow/recommendation.js +0 -63
  209. package/src/workflow/recommendations.js +0 -14
  210. package/src/workflow/search-based.js +0 -329
  211. package/src/workflow/search.js +0 -73
  212. package/src/workflow/unit.js +0 -51
  213. package/src/workflow/units.js +0 -43
  214. package/src/workflow/use-link.js +0 -41
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.TRIANGLE_EQ = exports.TRIANGLE = exports.SEND = exports.SEARCH = exports.ICON_NAMES = exports.CHEVRON_NEGATIVE = exports.CHEVRON = exports.BULB = void 0;
7
7
  exports.getIcon = getIcon;
8
+ var _commons = require("@miso.ai/commons");
8
9
  var _version = _interopRequireDefault(require("../version.js"));
9
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
11
  function trianglePath(r) {
@@ -22,7 +23,12 @@ const ICON_NAME = {
22
23
  TRIANGLE_EQ: 'triangle-eq',
23
24
  CHEVRON: 'chevron',
24
25
  CHEVRON_NEGATIVE: 'chevron-negative',
25
- BULB: 'bulb'
26
+ BULB: 'bulb',
27
+ DOTS_VERTICAL: 'dots-vertical',
28
+ PLUS: 'plus',
29
+ PENCIL: 'pencil',
30
+ BELL: 'bell',
31
+ BELL_FILL: 'bell-fill'
26
32
  };
27
33
 
28
34
  // CC0 SVGs
@@ -36,8 +42,13 @@ const ICON_CHEVRON = `<symbol id="${PREFIX}-${ICON_NAME.CHEVRON}" viewBox="-100
36
42
  const ICON_CHEVRON_NEGATIVE = `<symbol id="${PREFIX}-${ICON_NAME.CHEVRON_NEGATIVE}" viewBox="-100 -100 200 200"><path d="M100 100V-200H-200V200H200ZM-10.61 -43.94A15 15,0,0,1,10.61 -43.94L60.61 6.06A15 15,0,0,1,39.39 27.27L0 -12.12L-39.39 27.27A15 15,0,0,1,-60.61 6.06L-10.61 -43.94Z"/></symbol>`;
37
43
 
38
44
  // from Bootstrap Icons (MIT)
39
- const ICON_BULB = `<symbol id="${PREFIX}-${ICON_NAME.BULB}" viewBox="0 0 16 16"><path d="M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13a.5.5 0 0 1 0 1 .5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1 0-1 .5.5 0 0 1 0-1 .5.5 0 0 1-.46-.302l-.761-1.77a2 2 0 0 0-.453-.618A5.98 5.98 0 0 1 2 6m6-5a5 5 0 0 0-3.479 8.592c.263.254.514.564.676.941L5.83 12h4.342l.632-1.467c.162-.377.413-.687.676-.941A5 5 0 0 0 8 1"/></symbol>`;
40
- const ICONS = [ICON_SEND, ICON_SEARCH, ICON_TRIANGLE, ICON_TRIANGLE_EQ, ICON_CHEVRON, ICON_CHEVRON_NEGATIVE, ICON_BULB];
45
+ const ICON_BULB = `<symbol id="${PREFIX}-${ICON_NAME.BULB}" viewBox="0 0 16 16"><path fill="currentColor" d="M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13a.5.5 0 0 1 0 1 .5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1 0-1 .5.5 0 0 1 0-1 .5.5 0 0 1-.46-.302l-.761-1.77a2 2 0 0 0-.453-.618A5.98 5.98 0 0 1 2 6m6-5a5 5 0 0 0-3.479 8.592c.263.254.514.564.676.941L5.83 12h4.342l.632-1.467c.162-.377.413-.687.676-.941A5 5 0 0 0 8 1"/></symbol>`;
46
+ const ICON_DOTS_VERTICAL = `<symbol id="${PREFIX}-${ICON_NAME.DOTS_VERTICAL}" viewBox="0 0 16 16"><path fill="currentColor" d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/></symbol>`;
47
+ const ICON_PLUS = `<symbol id="${PREFIX}-${ICON_NAME.PLUS}" viewBox="0 0 16 16"><path fill="currentColor" d="M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"/></symbol>`;
48
+ const ICON_PENCIL = `<symbol id="${PREFIX}-${ICON_NAME.PENCIL}" viewBox="0 0 16 16"><path fill="currentColor" d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.325-.175"/></symbol>`;
49
+ const ICON_BELL = `<symbol id="${PREFIX}-${ICON_NAME.BELL}" viewBox="0 0 16 16"><path fill="currentColor" d="M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2M8 1.918l-.797.161A4 4 0 0 0 4 6c0 .628-.134 2.197-.459 3.742-.16.767-.376 1.566-.663 2.258h10.244c-.287-.692-.502-1.49-.663-2.258C12.134 8.197 12 6.628 12 6a4 4 0 0 0-3.203-3.92zM14.22 12c.223.447.481.801.78 1H1c.299-.199.557-.553.78-1C2.68 10.2 3 6.88 3 6c0-2.42 1.72-4.44 4.005-4.901a1 1 0 1 1 1.99 0A5 5 0 0 1 13 6c0 .88.32 4.2 1.22 6"/></symbol>`;
50
+ const ICON_BELL_FILL = `<symbol id="${PREFIX}-${ICON_NAME.BELL_FILL}" viewBox="0 0 16 16"><path fill="currentColor" d="M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2m.995-14.901a1 1 0 1 0-1.99 0A5 5 0 0 0 3 6c0 1.098-.5 6-2 7h14c-1.5-1-2-5.902-2-7 0-2.42-1.72-4.44-4.005-4.901"/></symbol>`;
51
+ const ICONS = [ICON_SEND, ICON_SEARCH, ICON_TRIANGLE, ICON_TRIANGLE_EQ, ICON_CHEVRON, ICON_CHEVRON_NEGATIVE, ICON_BULB, ICON_DOTS_VERTICAL, ICON_PLUS, ICON_PENCIL, ICON_BELL, ICON_BELL_FILL];
41
52
  const SPRITES_SVG = `<svg id="${ID}" style="display:none;">${ICONS.join('')}</svg>`;
42
53
  let loaded = false;
43
54
  function loadSvgSprites() {
@@ -47,7 +58,7 @@ function loadSvgSprites() {
47
58
  loaded = true;
48
59
  document.head.insertAdjacentHTML('beforeend', SPRITES_SVG);
49
60
  }
50
- loadSvgSprites();
61
+ _commons.isInBrowser && loadSvgSprites();
51
62
  function _icon(name) {
52
63
  return `<svg class="miso-ui-icon miso-ui-icon-${name}"><use href="#${PREFIX}-${name}"></use></svg>`;
53
64
  }
@@ -117,8 +117,8 @@ class AskCombo extends _base.default {
117
117
  features = {},
118
118
  api
119
119
  } = options;
120
- const context = client.ui.asks;
121
- const rootWorkflow = client.ui.ask;
120
+ const context = client.workflows.asks;
121
+ const rootWorkflow = client.workflows.ask;
122
122
  if (api) {
123
123
  context.useApi(api);
124
124
  }
@@ -3,109 +3,129 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WORKFLOW_CONFIGURABLE = exports.TRACKING_STATUS = exports.TRACKING_EVENT_TYPES = exports.STATUS = exports.ROLE = exports.REQUEST_TYPE = exports.QUESTION_SOURCE = exports.PERFORMANCE_EVENT_TYPES = exports.EVENT_TYPE = exports.DIRECT_TRACKING_EVENT_TYPES = exports.DEFAULT_UNIT_ID = exports.ATTR_DATA_MISO_UNIT_ID = exports.ATTR_DATA_MISO_PRODUCT_ID = void 0;
7
- exports.isDataRole = isDataRole;
8
- exports.isPerformanceEventType = isPerformanceEventType;
9
- exports.isProductRole = isProductRole;
10
- exports.validateEventType = validateEventType;
11
- exports.validateTrackingStatus = validateTrackingStatus;
6
+ exports.ATTR_DATA_MISO_UNIT_ID = exports.ATTR_DATA_MISO_PRODUCT_ID = void 0;
7
+ Object.defineProperty(exports, "DEFAULT_UNIT_ID", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _clientSdkWorkflow.DEFAULT_UNIT_ID;
11
+ }
12
+ });
13
+ Object.defineProperty(exports, "DIRECT_TRACKING_EVENT_TYPES", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _clientSdkWorkflow.DIRECT_TRACKING_EVENT_TYPES;
17
+ }
18
+ });
19
+ Object.defineProperty(exports, "EVENT_TYPE", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _clientSdkWorkflow.EVENT_TYPE;
23
+ }
24
+ });
25
+ exports.LAYOUT_TYPE = void 0;
26
+ Object.defineProperty(exports, "PERFORMANCE_EVENT_TYPES", {
27
+ enumerable: true,
28
+ get: function () {
29
+ return _clientSdkWorkflow.PERFORMANCE_EVENT_TYPES;
30
+ }
31
+ });
32
+ Object.defineProperty(exports, "QUESTION_SOURCE", {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _clientSdkWorkflow.QUESTION_SOURCE;
36
+ }
37
+ });
38
+ Object.defineProperty(exports, "REQUEST_TYPE", {
39
+ enumerable: true,
40
+ get: function () {
41
+ return _clientSdkWorkflow.REQUEST_TYPE;
42
+ }
43
+ });
44
+ Object.defineProperty(exports, "ROLE", {
45
+ enumerable: true,
46
+ get: function () {
47
+ return _clientSdkWorkflow.ROLE;
48
+ }
49
+ });
50
+ Object.defineProperty(exports, "STATUS", {
51
+ enumerable: true,
52
+ get: function () {
53
+ return _clientSdkWorkflow.STATUS;
54
+ }
55
+ });
56
+ Object.defineProperty(exports, "TRACKING_EVENT_TYPES", {
57
+ enumerable: true,
58
+ get: function () {
59
+ return _clientSdkWorkflow.TRACKING_EVENT_TYPES;
60
+ }
61
+ });
62
+ Object.defineProperty(exports, "TRACKING_STATUS", {
63
+ enumerable: true,
64
+ get: function () {
65
+ return _clientSdkWorkflow.TRACKING_STATUS;
66
+ }
67
+ });
68
+ Object.defineProperty(exports, "WORKFLOW_CONFIGURABLE", {
69
+ enumerable: true,
70
+ get: function () {
71
+ return _clientSdkWorkflow.WORKFLOW_CONFIGURABLE;
72
+ }
73
+ });
74
+ Object.defineProperty(exports, "isDataRole", {
75
+ enumerable: true,
76
+ get: function () {
77
+ return _clientSdkWorkflow.isDataRole;
78
+ }
79
+ });
80
+ Object.defineProperty(exports, "isPerformanceEventType", {
81
+ enumerable: true,
82
+ get: function () {
83
+ return _clientSdkWorkflow.isPerformanceEventType;
84
+ }
85
+ });
86
+ Object.defineProperty(exports, "isProductRole", {
87
+ enumerable: true,
88
+ get: function () {
89
+ return _clientSdkWorkflow.isProductRole;
90
+ }
91
+ });
92
+ Object.defineProperty(exports, "validateEventType", {
93
+ enumerable: true,
94
+ get: function () {
95
+ return _clientSdkWorkflow.validateEventType;
96
+ }
97
+ });
98
+ Object.defineProperty(exports, "validateTrackingStatus", {
99
+ enumerable: true,
100
+ get: function () {
101
+ return _clientSdkWorkflow.validateTrackingStatus;
102
+ }
103
+ });
104
+ var _clientSdkWorkflow = require("@miso.ai/client-sdk-workflow");
105
+ // workflow-level constants live in the workflow package; re-exported here for convenience
106
+
12
107
  const ATTR_DATA_MISO_UNIT_ID = exports.ATTR_DATA_MISO_UNIT_ID = `data-miso-unit-id`;
13
108
  const ATTR_DATA_MISO_PRODUCT_ID = exports.ATTR_DATA_MISO_PRODUCT_ID = `data-miso-product-id`;
14
- const DEFAULT_UNIT_ID = exports.DEFAULT_UNIT_ID = 'default';
15
- const ROLE = exports.ROLE = Object.freeze({
109
+ const LAYOUT_TYPE = exports.LAYOUT_TYPE = Object.freeze({
16
110
  CONTAINER: 'container',
111
+ ERROR: 'error',
17
112
  BANNER: 'banner',
18
- QUERY: 'query',
19
- FEEDBACK: 'feedback',
20
- PRODUCTS: 'products',
21
- CATEGORIES: 'categories',
22
- ATTRIBUTES: 'attributes',
23
- RESULTS: 'results',
24
- ITEMS: 'items',
25
- QUESTION: 'question',
26
- ANSWER: 'answer',
27
- REASONING: 'reasoning',
28
- IMAGES: 'images',
29
- SOURCES: 'sources',
30
- RELATED_RESOURCES: 'related_resources',
31
- FOLLOW_UP_QUESTIONS: 'follow_up_questions',
32
- QUERY_SUGGESTIONS: 'query_suggestions',
33
- RELATED_QUESTIONS: 'related_questions',
34
113
  AFFILIATION: 'affiliation',
35
- KEYWORDS: 'keywords',
114
+ LIST: 'list',
115
+ THREADS: 'threads',
116
+ MESSAGES: 'messages',
117
+ HORIZONTAL: 'horizontal',
118
+ CARDS: 'cards',
119
+ CAROUSEL: 'carousel',
120
+ GALLERY: 'gallery',
121
+ SEARCH_BOX: 'search-box',
122
+ OPTION_LIST: 'option-list',
36
123
  FACETS: 'facets',
37
- TOTAL: 'total',
38
- MORE: 'more',
39
- SORT: 'sort',
40
- ERROR: 'error'
41
- });
42
- const DATA_ROLE_SET = new Set([ROLE.PRODUCTS, ROLE.CATEGORIES, ROLE.ATTRIBUTES, ROLE.RESULTS, ROLE.ITEMS, ROLE.QUESTION, ROLE.ANSWER, ROLE.REASONING, ROLE.IMAGES, ROLE.SOURCES, ROLE.RELATED_RESOURCES, ROLE.FOLLOW_UP_QUESTIONS, ROLE.QUERY_SUGGESTIONS, ROLE.RELATED_QUESTIONS, ROLE.AFFILIATION, ROLE.FACETS, ROLE.TOTAL]);
43
- function isDataRole(role) {
44
- return DATA_ROLE_SET.has(role);
45
- }
46
- const PRODUCT_ROLE_SET = new Set([ROLE.PRODUCTS, ROLE.IMAGES, ROLE.SOURCES, ROLE.RELATED_RESOURCES]);
47
- function isProductRole(role) {
48
- return PRODUCT_ROLE_SET.has(role);
49
- }
50
- const EVENT_TYPE = exports.EVENT_TYPE = Object.freeze({
51
- IMPRESSION: 'impression',
52
- VIEWABLE: 'viewable',
53
- CLICK: 'click',
54
- SUBMIT: 'submit',
124
+ SELECT: 'select',
125
+ MORE_BUTTON: 'more-button',
126
+ BUTTON: 'button',
127
+ CHECKBOX: 'checkbox',
55
128
  FEEDBACK: 'feedback',
56
- HEARTBEAT: 'heartbeat',
57
- GENERIC_CLICK: 'generic_click'
58
- });
59
- const TRACKING_EVENT_TYPES = exports.TRACKING_EVENT_TYPES = [EVENT_TYPE.IMPRESSION, EVENT_TYPE.VIEWABLE, EVENT_TYPE.CLICK, EVENT_TYPE.SUBMIT, EVENT_TYPE.FEEDBACK, EVENT_TYPE.HEARTBEAT];
60
- const PERFORMANCE_EVENT_TYPES = exports.PERFORMANCE_EVENT_TYPES = [EVENT_TYPE.IMPRESSION, EVENT_TYPE.VIEWABLE, EVENT_TYPE.CLICK];
61
- const DIRECT_TRACKING_EVENT_TYPES = exports.DIRECT_TRACKING_EVENT_TYPES = [EVENT_TYPE.SUBMIT, EVENT_TYPE.HEARTBEAT, EVENT_TYPE.GENERIC_CLICK];
62
- const PERFORMANCE_EVENT_TYPE_SET = new Set(PERFORMANCE_EVENT_TYPES);
63
- function isPerformanceEventType(type) {
64
- return PERFORMANCE_EVENT_TYPE_SET.has(type);
65
- }
66
- const TRACKING_STATUS = exports.TRACKING_STATUS = Object.freeze({
67
- UNTRACKED: 'untracked',
68
- TRACKING: 'tracking',
69
- TRIGGERED: 'triggered'
70
- });
71
- const STATUS = exports.STATUS = Object.freeze({
72
- INITIAL: 'initial',
73
- LOADING: 'loading',
74
- ERRONEOUS: 'erroneous',
75
- READY: 'ready',
76
- ONGOING: 'ongoing',
77
- DONE: 'done',
78
- EMPTY: 'empty',
79
- NONEMPTY: 'nonempty',
80
- UNANSWERABLE: 'unanswerable'
81
- });
82
- const QUESTION_SOURCE = exports.QUESTION_SOURCE = Object.freeze({
83
- ORGANIC: '_organic',
84
- SUGGESTED_QUESTIONS: '_suggested_questions',
85
- INLINE_QUESTION_LINK: '_inline_question_link'
86
- });
87
- function validateEventType(value) {
88
- if (TRACKING_EVENT_TYPES.indexOf(value) < 0) {
89
- throw new Error(`Unrecognized event type: ${value}`);
90
- }
91
- }
92
- function validateTrackingStatus(value) {
93
- if (value !== TRACKING_STATUS.UNTRACKED && value !== TRACKING_STATUS.TRACKING && value !== TRACKING_STATUS.TRIGGERED) {
94
- throw new Error(`Unrecognized tracking status: ${value}`);
95
- }
96
- }
97
- const WORKFLOW_CONFIGURABLE = exports.WORKFLOW_CONFIGURABLE = Object.freeze({
98
- API: 'api',
99
- LAYOUTS: 'layouts',
100
- DATA_PROCESSOR: 'dataProcessor',
101
- TRACKERS: 'trackers',
102
- INTERACTIONS: 'interactions',
103
- FILTERS: 'filters',
104
- PAGINATION: 'pagination',
105
- TEMPLATES: 'templates'
106
- });
107
- const REQUEST_TYPE = exports.REQUEST_TYPE = Object.freeze({
108
- QUERY: 'query',
109
- REFINE: 'refine',
110
- MORE: 'more'
129
+ TEXT: 'text',
130
+ TYPEWRITER: 'typewriter'
111
131
  });
@@ -28,7 +28,7 @@ function setFollowUpTemplate(client, _ref = {}) {
28
28
  if (template === _templates.followUp && !hasExtraOptions) {
29
29
  return; // same as default
30
30
  }
31
- client.ui.asks.useTemplates({
31
+ client.workflows.asks.useTemplates({
32
32
  followUp: hasExtraOptions ? args => template(Object.assign({}, options, args)) : template
33
33
  });
34
34
  }
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _constants = require("./constants.js");
8
8
  var _constants2 = require("../../constants.js");
9
- var _index = require("../../actor/index.js");
9
+ var _clientSdkWorkflow = require("@miso.ai/client-sdk-workflow");
10
10
  var _phrases = require("./phrases.js");
11
11
  const CLASS_OPEN = 'answer-box-open';
12
12
  const CLASS_SHOWN = 'answer-box-shown';
@@ -18,7 +18,7 @@ class AnswerBox {
18
18
  hideWhenUnanswerable = true
19
19
  } = {}) {
20
20
  this._client = client;
21
- this._workflow = client.ui.hybridSearch;
21
+ this._workflow = client.workflows.hybridSearch;
22
22
  this._element = element;
23
23
  this._classPrefix = classPrefix;
24
24
  this._phrases = phrases;
@@ -47,7 +47,7 @@ class AnswerBox {
47
47
  this._syncButtonText();
48
48
  this._unsubscribes = [() => element.removeEventListener('click', callback),
49
49
  // cling to data rather than view, as we may miss view event when tab is inactive due to raf
50
- workflow._answer._hub.on(_index.fields.data(), () => this._syncWofkflowStatus())];
50
+ workflow._answer._hub.on(_clientSdkWorkflow.fields.data(), () => this._syncWofkflowStatus())];
51
51
  }
52
52
  _handleClick({
53
53
  target,
@@ -69,7 +69,7 @@ class AnswerBox {
69
69
  meta: {
70
70
  unanswerable = false
71
71
  } = {}
72
- } = this._workflow._answer._hub.states[_index.fields.data()];
72
+ } = this._workflow._answer._hub.states[_clientSdkWorkflow.fields.data()];
73
73
  switch (status) {
74
74
  case _constants2.STATUS.ERRONEOUS:
75
75
  case _constants2.STATUS.READY:
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.defaultLayouts = void 0;
7
+ var _constants = require("./constants.js");
8
+ var _templates = require("./layout/templates.js");
9
+ /**
10
+ * Default layout options of each workflow, keyed by workflow name. The UI
11
+ * plugin seeds the workflow plugin's defaults store with these values at
12
+ * install. The tables mirror the workflow class hierarchy.
13
+ */
14
+
15
+ const BASE_LAYOUTS = {
16
+ [_constants.ROLE.CONTAINER]: _constants.LAYOUT_TYPE.CONTAINER,
17
+ [_constants.ROLE.ERROR]: _constants.LAYOUT_TYPE.ERROR
18
+ };
19
+ const ANSWER_BASED_LAYOUTS = Object.assign({}, BASE_LAYOUTS, {
20
+ [_constants.ROLE.QUERY]: [_constants.LAYOUT_TYPE.SEARCH_BOX, {
21
+ placeholder: 'Ask a question'
22
+ }],
23
+ [_constants.ROLE.QUESTION]: [_constants.LAYOUT_TYPE.TEXT, {
24
+ tag: 'h2'
25
+ }],
26
+ [_constants.ROLE.ANSWER]: _constants.LAYOUT_TYPE.TYPEWRITER,
27
+ [_constants.ROLE.FEEDBACK]: _constants.LAYOUT_TYPE.FEEDBACK,
28
+ [_constants.ROLE.IMAGES]: [_constants.LAYOUT_TYPE.GALLERY, {
29
+ incremental: true,
30
+ itemType: 'image'
31
+ }],
32
+ [_constants.ROLE.SOURCES]: [_constants.LAYOUT_TYPE.LIST, {
33
+ incremental: true,
34
+ itemType: 'article',
35
+ templates: {
36
+ ordered: true
37
+ }
38
+ }],
39
+ [_constants.ROLE.AFFILIATION]: [_constants.LAYOUT_TYPE.AFFILIATION, {
40
+ incremental: true,
41
+ itemType: 'affiliation',
42
+ link: {
43
+ rel: 'noopener nofollow'
44
+ }
45
+ }]
46
+ });
47
+ function totalContent(layout, {
48
+ value
49
+ }) {
50
+ if (value === undefined) {
51
+ return '';
52
+ }
53
+ const {
54
+ formatNumber
55
+ } = layout.templates.helpers;
56
+ const formatted = formatNumber(value);
57
+ const label = value === 1 ? 'result' : 'results';
58
+ return `${formatted} ${label}`;
59
+ }
60
+ const SEARCH_BASED_LAYOUTS = Object.assign({}, BASE_LAYOUTS, {
61
+ [_constants.ROLE.QUERY]: [_constants.LAYOUT_TYPE.SEARCH_BOX],
62
+ [_constants.ROLE.PRODUCTS]: [_constants.LAYOUT_TYPE.LIST, {
63
+ incremental: true,
64
+ infiniteScroll: true
65
+ }],
66
+ [_constants.ROLE.KEYWORDS]: [_constants.LAYOUT_TYPE.TEXT, {
67
+ raw: true
68
+ }],
69
+ [_constants.ROLE.TOTAL]: [_constants.LAYOUT_TYPE.TEXT, {
70
+ raw: true,
71
+ templates: {
72
+ content: totalContent
73
+ }
74
+ }],
75
+ [_constants.ROLE.FACETS]: [_constants.LAYOUT_TYPE.FACETS],
76
+ [_constants.ROLE.SORT]: [_constants.LAYOUT_TYPE.SELECT],
77
+ [_constants.ROLE.MORE]: [_constants.LAYOUT_TYPE.MORE_BUTTON]
78
+ });
79
+ const defaultLayouts = exports.defaultLayouts = Object.freeze({
80
+ 'ask': Object.freeze(Object.assign({}, ANSWER_BASED_LAYOUTS, {
81
+ [_constants.ROLE.QUERY]: [_constants.LAYOUT_TYPE.SEARCH_BOX, {
82
+ templates: {
83
+ buttonIcon: 'send'
84
+ }
85
+ }],
86
+ [_constants.ROLE.REASONING]: _constants.LAYOUT_TYPE.TYPEWRITER,
87
+ [_constants.ROLE.RELATED_RESOURCES]: [_constants.LAYOUT_TYPE.LIST, {
88
+ incremental: true,
89
+ itemType: 'article'
90
+ }],
91
+ [_constants.ROLE.QUERY_SUGGESTIONS]: _constants.LAYOUT_TYPE.OPTION_LIST,
92
+ [_constants.ROLE.FOLLOW_UP_QUESTIONS]: _constants.LAYOUT_TYPE.OPTION_LIST
93
+ })),
94
+ 'search': Object.freeze(Object.assign({}, SEARCH_BASED_LAYOUTS)),
95
+ 'hybrid-search': Object.freeze(Object.assign({}, ANSWER_BASED_LAYOUTS, SEARCH_BASED_LAYOUTS, {
96
+ [_constants.ROLE.QUERY]: [_constants.LAYOUT_TYPE.SEARCH_BOX, {
97
+ placeholder: ''
98
+ }],
99
+ [_constants.ROLE.QUESTION]: [_constants.LAYOUT_TYPE.TEXT, {
100
+ raw: true
101
+ }],
102
+ [_constants.ROLE.SOURCES]: [_constants.LAYOUT_TYPE.HORIZONTAL, {
103
+ incremental: true,
104
+ itemType: 'article',
105
+ templates: {
106
+ ordered: true,
107
+ article: _templates.compactArticle,
108
+ articleInfoBlock: _templates.compactArticleInfoBlock
109
+ }
110
+ }]
111
+ })),
112
+ 'recommendation': Object.freeze(Object.assign({}, BASE_LAYOUTS, {
113
+ [_constants.ROLE.PRODUCTS]: _constants.LAYOUT_TYPE.LIST
114
+ })),
115
+ 'explore': Object.freeze(Object.assign({}, BASE_LAYOUTS, {
116
+ [_constants.ROLE.RELATED_QUESTIONS]: [_constants.LAYOUT_TYPE.LIST, {
117
+ itemType: 'question',
118
+ link: {
119
+ rel: 'noopener nofollow'
120
+ }
121
+ }],
122
+ // TODO: should define by useLink()
123
+ [_constants.ROLE.QUERY]: [_constants.LAYOUT_TYPE.SEARCH_BOX, {
124
+ placeholder: 'Ask a question'
125
+ }]
126
+ })),
127
+ 'history': Object.freeze(Object.assign({}, BASE_LAYOUTS, {
128
+ [_constants.ROLE.THREADS]: [_constants.LAYOUT_TYPE.THREADS, {
129
+ itemType: 'thread',
130
+ incremental: true
131
+ }],
132
+ [_constants.ROLE.NEW_THREAD]: [_constants.LAYOUT_TYPE.BUTTON, {
133
+ icon: 'plus',
134
+ text: 'New chat'
135
+ }]
136
+ })),
137
+ 'conversation': Object.freeze(Object.assign({}, BASE_LAYOUTS, {
138
+ [_constants.ROLE.MESSAGES]: [_constants.LAYOUT_TYPE.MESSAGES, {
139
+ itemType: 'message',
140
+ incremental: true
141
+ }],
142
+ [_constants.ROLE.QUERY]: [_constants.LAYOUT_TYPE.SEARCH_BOX, {
143
+ placeholder: 'Ask a follow-up question',
144
+ clearOnSubmit: true,
145
+ blurOnSubmit: false,
146
+ disableWhenOngoing: true,
147
+ templates: {
148
+ buttonIcon: 'send'
149
+ }
150
+ }],
151
+ [_constants.ROLE.TITLE]: [_constants.LAYOUT_TYPE.TEXT, {
152
+ tag: 'div'
153
+ }],
154
+ [_constants.ROLE.RENAME]: [_constants.LAYOUT_TYPE.BUTTON, {
155
+ icon: 'pencil',
156
+ prompt: {
157
+ title: 'Rename thread',
158
+ placeholder: 'Thread name',
159
+ confirmText: 'Rename'
160
+ }
161
+ }],
162
+ [_constants.ROLE.SUBSCRIPTION]: [_constants.LAYOUT_TYPE.CHECKBOX, {
163
+ icon: 'bell',
164
+ text: 'Subscribe',
165
+ checkedIcon: 'bell-fill',
166
+ checkedText: 'Subscribed'
167
+ }]
168
+ }))
169
+ });
@@ -9,12 +9,24 @@ Object.defineProperty(exports, "MisoAskElement", {
9
9
  return _misoAsk.default;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "MisoConversationElement", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _misoConversation.default;
16
+ }
17
+ });
12
18
  Object.defineProperty(exports, "MisoExploreElement", {
13
19
  enumerable: true,
14
20
  get: function () {
15
21
  return _misoExplore.default;
16
22
  }
17
23
  });
24
+ Object.defineProperty(exports, "MisoHistoryElement", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _misoHistory.default;
28
+ }
29
+ });
18
30
  Object.defineProperty(exports, "MisoHybridSearchElement", {
19
31
  enumerable: true,
20
32
  get: function () {
@@ -35,6 +47,8 @@ Object.defineProperty(exports, "MisoSearchElement", {
35
47
  });
36
48
  var _misoAsk = _interopRequireDefault(require("./miso-ask.js"));
37
49
  var _misoExplore = _interopRequireDefault(require("./miso-explore.js"));
50
+ var _misoHistory = _interopRequireDefault(require("./miso-history.js"));
51
+ var _misoConversation = _interopRequireDefault(require("./miso-conversation.js"));
38
52
  var _misoHybridSearch = _interopRequireDefault(require("./miso-hybrid-search.js"));
39
53
  var _misoSearch = _interopRequireDefault(require("./miso-search.js"));
40
54
  var _misoRecommendation = _interopRequireDefault(require("./miso-recommendation.js"));
@@ -19,12 +19,12 @@ class MisoAskElement extends _misoContainer.default {
19
19
  }
20
20
  _getWorkflow(client) {
21
21
  if (this.boundToActiveWorkflow) {
22
- return client.ui.asks.active;
22
+ return client.workflows.asks.active;
23
23
  }
24
24
  return this._getWorkflowByParentQuestionId(client, this.parentQuestionId);
25
25
  }
26
26
  _getWorkflowByParentQuestionId(client, id) {
27
- return client.ui.asks.getByParentQuestionId(id, {
27
+ return client.workflows.asks.getByParentQuestionId(id, {
28
28
  autoCreate: true
29
29
  });
30
30
  }
@@ -62,7 +62,7 @@ class MisoAskElement extends _misoContainer.default {
62
62
  await super.connectedCallback();
63
63
  if (document.body.contains(this)) {
64
64
  // in case already disconnected
65
- const context = this._client.ui.asks;
65
+ const context = this._client.workflows.asks;
66
66
  this._unsubscribes = [...(this._unsubscribes || []), context.on('active', event => {
67
67
  if (!this.boundToActiveWorkflow) {
68
68
  return;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _misoContainer = _interopRequireDefault(require("./miso-container.js"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const TAG_NAME = 'miso-conversation';
10
+ class MisoConversationElement extends _misoContainer.default {
11
+ static get tagName() {
12
+ return TAG_NAME;
13
+ }
14
+ static get observedAttributes() {
15
+ return _misoContainer.default.observedAttributes;
16
+ }
17
+ _getWorkflow(client) {
18
+ return client.workflows.conversation;
19
+ }
20
+ }
21
+ exports.default = MisoConversationElement;
@@ -15,7 +15,7 @@ class MisoExploreElement extends _misoUnit.default {
15
15
  return _misoUnit.default.observedAttributes;
16
16
  }
17
17
  _getWorkflowByUnitId(client, unitId) {
18
- return client.ui.explores.get(unitId);
18
+ return client.workflows.explores.get(unitId);
19
19
  }
20
20
  }
21
21
  exports.default = MisoExploreElement;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _misoContainer = _interopRequireDefault(require("./miso-container.js"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const TAG_NAME = 'miso-history';
10
+ class MisoHistoryElement extends _misoContainer.default {
11
+ static get tagName() {
12
+ return TAG_NAME;
13
+ }
14
+ static get observedAttributes() {
15
+ return _misoContainer.default.observedAttributes;
16
+ }
17
+ _getWorkflow(client) {
18
+ return client.workflows.history;
19
+ }
20
+ }
21
+ exports.default = MisoHistoryElement;
@@ -15,7 +15,7 @@ class MisoHybridSearchElement extends _misoContainer.default {
15
15
  return _misoContainer.default.observedAttributes;
16
16
  }
17
17
  _getWorkflow(client) {
18
- return client.ui.hybridSearch;
18
+ return client.workflows.hybridSearch;
19
19
  }
20
20
  }
21
21
  exports.default = MisoHybridSearchElement;
@@ -15,7 +15,7 @@ class MisoRecommendationElement extends _misoUnit.default {
15
15
  return _misoUnit.default.observedAttributes;
16
16
  }
17
17
  _getWorkflowByUnitId(client, unitId) {
18
- return client.ui.recommendations.get(unitId);
18
+ return client.workflows.recommendations.get(unitId);
19
19
  }
20
20
  }
21
21
  exports.default = MisoRecommendationElement;
@@ -15,7 +15,7 @@ class MisoSearchElement extends _misoContainer.default {
15
15
  return _misoContainer.default.observedAttributes;
16
16
  }
17
17
  _getWorkflow(client) {
18
- return client.ui.search;
18
+ return client.workflows.search;
19
19
  }
20
20
  }
21
21
  exports.default = MisoSearchElement;
@@ -20,7 +20,7 @@ class MisoFollowUpsElement extends _misoContext.default {
20
20
  this._unsubscribes = [];
21
21
  }
22
22
  _getContext(client) {
23
- return client.ui.asks;
23
+ return client.workflows.asks;
24
24
  }
25
25
  _onContext(context, oldContext) {
26
26
  if (context === oldContext) {