@servicetitan/titan-chatbot-ui-anvil2 3.1.1 → 3.1.3

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 (61) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components/chatbot/__tests-cy__/chatbot-help-center.test.js +1 -1
  3. package/dist/components/chatbot/__tests-cy__/chatbot-help-center.test.js.map +1 -1
  4. package/dist/components/chatbot/__tests-cy__/chatbot-live.test.js +1 -1
  5. package/dist/components/chatbot/__tests-cy__/chatbot-live.test.js.map +1 -1
  6. package/dist/components/chatbot/__tests-cy__/chatbot-titan-chatbot.test.js +1 -1
  7. package/dist/components/chatbot/__tests-cy__/chatbot-titan-chatbot.test.js.map +1 -1
  8. package/dist/components/chatbot/__tests-cy__/chatbot.test.js +1 -1
  9. package/dist/components/chatbot/__tests-cy__/chatbot.test.js.map +1 -1
  10. package/dist/components/chatbot/dialog/__tests-cy__/chatbot-restart-dialog.test.js +1 -1
  11. package/dist/components/chatbot/dialog/__tests-cy__/chatbot-restart-dialog.test.js.map +1 -1
  12. package/dist/components/chatbot/dialog/__tests-cy__/chatbot-restart-link.test.js +1 -1
  13. package/dist/components/chatbot/dialog/__tests-cy__/chatbot-restart-link.test.js.map +1 -1
  14. package/dist/components/chatbot/feedback/__tests-cy__/chatbot-message-feedback-form-guardrail.test.js +1 -1
  15. package/dist/components/chatbot/feedback/__tests-cy__/chatbot-message-feedback-form-guardrail.test.js.map +1 -1
  16. package/dist/components/chatbot/feedback/__tests-cy__/chatbot-message-feedback-form.test.js +1 -1
  17. package/dist/components/chatbot/feedback/__tests-cy__/chatbot-message-feedback-form.test.js.map +1 -1
  18. package/dist/components/chatbot/feedback/__tests-cy__/chatbot-message-feedback-popover.test.js +1 -1
  19. package/dist/components/chatbot/feedback/__tests-cy__/chatbot-message-feedback-popover.test.js.map +1 -1
  20. package/dist/components/chatbot/feedback/__tests-cy__/chatbot-session-feedback-modal.test.js +1 -1
  21. package/dist/components/chatbot/feedback/__tests-cy__/chatbot-session-feedback-modal.test.js.map +1 -1
  22. package/dist/components/chatbot/feedback/chatbot-message-feedback-form-guardrail.d.ts.map +1 -1
  23. package/dist/components/chatbot/feedback/chatbot-message-feedback-form-guardrail.js +8 -3
  24. package/dist/components/chatbot/feedback/chatbot-message-feedback-form-guardrail.js.map +1 -1
  25. package/dist/components/chatbot/feedback/chatbot-message-feedback-form.d.ts.map +1 -1
  26. package/dist/components/chatbot/feedback/chatbot-message-feedback-form.js +3 -1
  27. package/dist/components/chatbot/feedback/chatbot-message-feedback-form.js.map +1 -1
  28. package/dist/components/chatbot/feedback/chatbot-session-feedback-modal.d.ts.map +1 -1
  29. package/dist/components/chatbot/feedback/chatbot-session-feedback-modal.js +3 -1
  30. package/dist/components/chatbot/feedback/chatbot-session-feedback-modal.js.map +1 -1
  31. package/dist/components/chatbot/filters/__tests-cy__/chatbot-filters.test.js +1 -1
  32. package/dist/components/chatbot/filters/__tests-cy__/chatbot-filters.test.js.map +1 -1
  33. package/dist/components/chatbot/messages/__tests-cy__/chatbot-links.test.js +1 -1
  34. package/dist/components/chatbot/messages/__tests-cy__/chatbot-links.test.js.map +1 -1
  35. package/dist/components/chatbot/messages/__tests-cy__/chatbot-message-answer-readonly.test.js +1 -1
  36. package/dist/components/chatbot/messages/__tests-cy__/chatbot-message-answer-readonly.test.js.map +1 -1
  37. package/dist/components/chatbot/messages/__tests-cy__/chatbot-message-answer.test.js +1 -1
  38. package/dist/components/chatbot/messages/__tests-cy__/chatbot-message-answer.test.js.map +1 -1
  39. package/dist/components/chatbot/messages/__tests-cy__/chatbot-message-typing.test.js +1 -1
  40. package/dist/components/chatbot/messages/__tests-cy__/chatbot-message-typing.test.js.map +1 -1
  41. package/package.json +8 -14
  42. package/src/components/chatbot/__tests-cy__/chatbot-help-center.test.tsx +1 -1
  43. package/src/components/chatbot/__tests-cy__/chatbot-live.test.tsx +1 -1
  44. package/src/components/chatbot/__tests-cy__/chatbot-titan-chatbot.test.tsx +1 -1
  45. package/src/components/chatbot/__tests-cy__/chatbot.test.tsx +1 -1
  46. package/src/components/chatbot/dialog/__tests-cy__/chatbot-restart-dialog.test.tsx +1 -1
  47. package/src/components/chatbot/dialog/__tests-cy__/chatbot-restart-link.test.tsx +1 -1
  48. package/src/components/chatbot/feedback/__tests-cy__/chatbot-message-feedback-form-guardrail.test.tsx +1 -1
  49. package/src/components/chatbot/feedback/__tests-cy__/chatbot-message-feedback-form.test.tsx +1 -1
  50. package/src/components/chatbot/feedback/__tests-cy__/chatbot-message-feedback-popover.test.tsx +1 -1
  51. package/src/components/chatbot/feedback/__tests-cy__/chatbot-session-feedback-modal.test.tsx +1 -1
  52. package/src/components/chatbot/feedback/chatbot-message-feedback-form-guardrail.tsx +20 -4
  53. package/src/components/chatbot/feedback/chatbot-message-feedback-form.tsx +6 -4
  54. package/src/components/chatbot/feedback/chatbot-session-feedback-modal.tsx +6 -2
  55. package/src/components/chatbot/filters/__tests-cy__/chatbot-filters.test.tsx +1 -1
  56. package/src/components/chatbot/messages/__tests-cy__/chatbot-links.test.tsx +1 -1
  57. package/src/components/chatbot/messages/__tests-cy__/chatbot-message-answer-readonly.test.tsx +1 -1
  58. package/src/components/chatbot/messages/__tests-cy__/chatbot-message-answer.test.tsx +1 -1
  59. package/src/components/chatbot/messages/__tests-cy__/chatbot-message-typing.test.tsx +1 -1
  60. package/tsconfig.json +1 -1
  61. package/tsconfig.tsbuildinfo +1 -1
@@ -1,10 +1,10 @@
1
1
  import { Checkbox, Flex, Text, Textarea } from '@servicetitan/anvil2';
2
- import { CheckboxFieldState } from '@servicetitan/form';
3
2
  import { useDependencies } from '@servicetitan/react-ioc';
4
3
  import { MessageFeedbackStore } from '@servicetitan/titan-chatbot-api';
5
4
  import classNames from 'classnames';
5
+ import { FieldState } from 'formstate';
6
6
  import { observer } from 'mobx-react';
7
- import { FC } from 'react';
7
+ import { ChangeEvent, FC } from 'react';
8
8
  import * as Styles from './chatbot-message-feedback-form.module.less';
9
9
 
10
10
  export const ChatbotMessageFeedbackForm: FC = observer(() => {
@@ -12,7 +12,7 @@ export const ChatbotMessageFeedbackForm: FC = observer(() => {
12
12
 
13
13
  const onCheckboxChange = (checkbox: keyof MessageFeedbackStore['formState']['$']) => {
14
14
  return (_: any, state: any) => {
15
- const fieldState = store.formState.$[checkbox] as CheckboxFieldState;
15
+ const fieldState = store.formState.$[checkbox] as FieldState<boolean>;
16
16
  fieldState.onChange(!state.checked);
17
17
  };
18
18
  };
@@ -61,7 +61,9 @@ export const ChatbotMessageFeedbackForm: FC = observer(() => {
61
61
  className={classNames(Styles.formItem, Styles.textArea)}
62
62
  error={store.formState.$.otherComment.error}
63
63
  value={store.formState.$.otherComment.value}
64
- onChange={store.formState.$.otherComment.onChangeHandler}
64
+ onChange={(e: ChangeEvent<HTMLTextAreaElement>) => {
65
+ store.formState.$.otherComment.onChange(e.currentTarget.value);
66
+ }}
65
67
  onBlur={store.formState.$.otherComment.enableAutoValidationAndValidate}
66
68
  data-cy="titan-chatbot-message-feedback-form-other-comment"
67
69
  />
@@ -4,7 +4,7 @@ import IconThumbUp from '@servicetitan/anvil2/assets/icons/material/round/thumb_
4
4
  import { provide, useDependencies } from '@servicetitan/react-ioc';
5
5
  import { CHATBOT_UI_STORE_TOKEN, SessionFeedbackStore } from '@servicetitan/titan-chatbot-api';
6
6
  import { observer } from 'mobx-react';
7
- import { FC, useCallback } from 'react';
7
+ import { ChangeEvent, FC, useCallback } from 'react';
8
8
 
9
9
  export const ChatbotSessionFeedbackModal: FC<{ onClose: () => void }> = provide({
10
10
  singletons: [SessionFeedbackStore],
@@ -66,7 +66,11 @@ export const ChatbotSessionFeedbackModal: FC<{ onClose: () => void }> = provide(
66
66
  label="Tell us more"
67
67
  rows={3}
68
68
  value={chatbotFeedbackStore.formState.$.comment.value}
69
- onChange={chatbotFeedbackStore.formState.$.comment.onChangeHandler}
69
+ onChange={(e: ChangeEvent<HTMLTextAreaElement>) => {
70
+ chatbotFeedbackStore.formState.$.comment.onChange(
71
+ e.currentTarget.value
72
+ );
73
+ }}
70
74
  data-cy="titan-chatbot-session-feedback-comment"
71
75
  />
72
76
  </Flex>
@@ -1,5 +1,5 @@
1
1
  import { AnvilProvider } from '@servicetitan/anvil2';
2
- import { runChatbotFiltersSharedTests } from '@servicetitan/titan-chatbot-ui-cypress';
2
+ import { runChatbotFiltersSharedTests } from '@servicetitan/cypress-shared';
3
3
  import { ChatFilters } from '../chatbot-filters';
4
4
 
5
5
  describe('[ChatFilters]', () => {
@@ -1,5 +1,5 @@
1
1
  import { AnvilProvider } from '@servicetitan/anvil2';
2
- import { runChatbotLinksSharedTests } from '@servicetitan/titan-chatbot-ui-cypress';
2
+ import { runChatbotLinksSharedTests } from '@servicetitan/cypress-shared';
3
3
  import { ChatbotLinks } from '../chatbot-links';
4
4
 
5
5
  describe('[ChatbotLinks]', () => {
@@ -1,5 +1,5 @@
1
1
  import { AnvilProvider } from '@servicetitan/anvil2';
2
- import { runChatbotMessageAnswerReadonlySharedTests } from '@servicetitan/titan-chatbot-ui-cypress';
2
+ import { runChatbotMessageAnswerReadonlySharedTests } from '@servicetitan/cypress-shared';
3
3
  import { ChatbotMessageAnswerReadonly } from '../chatbot-message-answer-readonly';
4
4
 
5
5
  describe('[ChatbotMessageAnswerReadonly]', () => {
@@ -1,5 +1,5 @@
1
1
  import { AnvilProvider } from '@servicetitan/anvil2';
2
- import { runChatbotMessageAnswerSharedTests } from '@servicetitan/titan-chatbot-ui-cypress';
2
+ import { runChatbotMessageAnswerSharedTests } from '@servicetitan/cypress-shared';
3
3
  import { ChatbotMessageAnswer } from '../chatbot-message-answer';
4
4
 
5
5
  describe('[ChatbotMessageAnswer]', () => {
@@ -1,5 +1,5 @@
1
1
  import { AnvilProvider } from '@servicetitan/anvil2';
2
- import { runChatbotMessageTypingSharedTests } from '@servicetitan/titan-chatbot-ui-cypress';
2
+ import { runChatbotMessageTypingSharedTests } from '@servicetitan/cypress-shared';
3
3
  import { ChatbotMessageTyping } from '../chatbot-message-typing';
4
4
 
5
5
  describe('[ChatbotMessageTyping]', () => {
package/tsconfig.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "path": "../titan-chat-ui-anvil2"
17
17
  },
18
18
  {
19
- "path": "../titan-chatbot-ui-cypress"
19
+ "path": "../cypress-shared"
20
20
  },
21
21
  {
22
22
  "path": "../titan-chat-ui-common"