@hiver/connector-agent 4.27.0 → 4.28.0-pmCommentSync-beta.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.
Files changed (61) hide show
  1. package/app/connector-cards.d.ts.map +1 -1
  2. package/constants/global-constants.d.ts +1 -0
  3. package/constants/global-constants.d.ts.map +1 -1
  4. package/features/connector-cards/components/card-list/Card.d.ts.map +1 -1
  5. package/features/pm-comments/api/client.d.ts +23 -0
  6. package/features/pm-comments/api/client.d.ts.map +1 -0
  7. package/features/pm-comments/api/queries.d.ts +39 -0
  8. package/features/pm-comments/api/queries.d.ts.map +1 -0
  9. package/features/pm-comments/components/CommentComposer.d.ts +18 -0
  10. package/features/pm-comments/components/CommentComposer.d.ts.map +1 -0
  11. package/features/pm-comments/components/CommentItem.d.ts +30 -0
  12. package/features/pm-comments/components/CommentItem.d.ts.map +1 -0
  13. package/features/pm-comments/components/MentionCandidatesPicker.d.ts +13 -0
  14. package/features/pm-comments/components/MentionCandidatesPicker.d.ts.map +1 -0
  15. package/features/pm-comments/components/TaskCommentsRow.d.ts +15 -0
  16. package/features/pm-comments/components/TaskCommentsRow.d.ts.map +1 -0
  17. package/features/pm-comments/components/TaskHeader.d.ts +20 -0
  18. package/features/pm-comments/components/TaskHeader.d.ts.map +1 -0
  19. package/features/pm-comments/components/TaskThreadPanel.d.ts +9 -0
  20. package/features/pm-comments/components/TaskThreadPanel.d.ts.map +1 -0
  21. package/features/pm-comments/components/TaskThreadView.d.ts +16 -0
  22. package/features/pm-comments/components/TaskThreadView.d.ts.map +1 -0
  23. package/features/pm-comments/components/icons.d.ts +13 -0
  24. package/features/pm-comments/components/icons.d.ts.map +1 -0
  25. package/features/pm-comments/components/styles.d.ts +57 -0
  26. package/features/pm-comments/components/styles.d.ts.map +1 -0
  27. package/features/pm-comments/constants/api.d.ts +15 -0
  28. package/features/pm-comments/constants/api.d.ts.map +1 -0
  29. package/features/pm-comments/constants/tracking.d.ts +12 -0
  30. package/features/pm-comments/constants/tracking.d.ts.map +1 -0
  31. package/features/pm-comments/context-value.d.ts +25 -0
  32. package/features/pm-comments/context-value.d.ts.map +1 -0
  33. package/features/pm-comments/context.d.ts +20 -0
  34. package/features/pm-comments/context.d.ts.map +1 -0
  35. package/features/pm-comments/types/wire.d.ts +145 -0
  36. package/features/pm-comments/types/wire.d.ts.map +1 -0
  37. package/features/pm-comments/utils/body.d.ts +5 -0
  38. package/features/pm-comments/utils/body.d.ts.map +1 -0
  39. package/features/pm-comments/utils/draft.d.ts +9 -0
  40. package/features/pm-comments/utils/draft.d.ts.map +1 -0
  41. package/features/pm-comments/utils/editor.d.ts +18 -0
  42. package/features/pm-comments/utils/editor.d.ts.map +1 -0
  43. package/features/pm-comments/utils/format.d.ts +5 -0
  44. package/features/pm-comments/utils/format.d.ts.map +1 -0
  45. package/features/pm-comments/utils/pm-connectors.d.ts +7 -0
  46. package/features/pm-comments/utils/pm-connectors.d.ts.map +1 -0
  47. package/features/pm-comments/utils/rich-text.d.ts +18 -0
  48. package/features/pm-comments/utils/rich-text.d.ts.map +1 -0
  49. package/features/pm-comments/utils/thread-state.d.ts +90 -0
  50. package/features/pm-comments/utils/thread-state.d.ts.map +1 -0
  51. package/index.es.js +15918 -14140
  52. package/index.umd.js +774 -485
  53. package/main-dev.d.ts.map +1 -1
  54. package/package.json +1 -1
  55. package/testing/dev/PmCommentsHarness.d.ts +5 -0
  56. package/testing/dev/PmCommentsHarness.d.ts.map +1 -0
  57. package/testing/mocks/handlers/pm-comments.d.ts +36 -0
  58. package/testing/mocks/handlers/pm-comments.d.ts.map +1 -0
  59. package/testing/mocks/handlers.d.ts.map +1 -1
  60. package/utils/action-queue.d.ts +16 -0
  61. package/utils/action-queue.d.ts.map +1 -1
package/main-dev.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main-dev.d.ts","sourceRoot":"","sources":["../src/main-dev.tsx"],"names":[],"mappings":"AA+gCA,eAAO,MAAM,OAAO,+CAInB,CAAC"}
1
+ {"version":3,"file":"main-dev.d.ts","sourceRoot":"","sources":["../src/main-dev.tsx"],"names":[],"mappings":"AAuhCA,eAAO,MAAM,OAAO,+CAInB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "4.27.0",
3
+ "version": "4.28.0-pmCommentSync-beta.0",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",
@@ -0,0 +1,5 @@
1
+ import { ConnectorColorScheme } from '../../theme/connector-theme';
2
+ export declare const PmCommentsHarness: ({ mode }: {
3
+ mode: ConnectorColorScheme;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=PmCommentsHarness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PmCommentsHarness.d.ts","sourceRoot":"","sources":["../../../src/testing/dev/PmCommentsHarness.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AA4KpE,eAAO,MAAM,iBAAiB,aAAc;IAAE,IAAI,EAAE,oBAAoB,CAAA;CAAE,4CAoCzE,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { CommentCapabilities, CommentErrorCode, MarkReadRequest, MentionCandidate, TaskAccess, TaskComment, TaskStatus } from '../../../features/pm-comments/types/wire';
2
+ export declare const PM_MOCK_SELF: MentionCandidate;
3
+ export declare const PM_MOCK_USERS: MentionCandidate[];
4
+ export declare const PM_FULL_ACCESS: TaskAccess;
5
+ export declare const PM_MOCK_STATUSES: TaskStatus[];
6
+ export declare const PM_DEFAULT_CAPABILITIES: CommentCapabilities;
7
+ type TaskFixture = {
8
+ title: string;
9
+ url: string;
10
+ comments: TaskComment[];
11
+ access: TaskAccess;
12
+ capabilities: CommentCapabilities;
13
+ /** Next POST fails with this code (once), unless `failPostsUntilCleared`. */
14
+ failNextPost?: CommentErrorCode;
15
+ failPostsUntilCleared?: boolean;
16
+ /** Reads fail with a 5xx while set. */
17
+ failReads?: boolean;
18
+ /** null: the app shows no status for this task. */
19
+ status?: TaskStatus | null;
20
+ /** Next status change fails with this code (once). */
21
+ failNextStatus?: CommentErrorCode;
22
+ };
23
+ export declare const pmMockComment: (overrides?: Partial<TaskComment> & {
24
+ text?: string;
25
+ }) => TaskComment;
26
+ /** Seed or patch one task. Comments are oldest → newest. */
27
+ export declare const __seedPmTask: (connectorId: string, taskId: string, patch: Partial<TaskFixture>) => void;
28
+ export declare const __getPmTask: (connectorId: string, taskId: string) => TaskFixture | undefined;
29
+ /** Report these connector ids as PM tools in the workspace connector list (`/connectors/ug`). */
30
+ export declare const __setPmConnectorTypes: (types: Record<string, string>) => void;
31
+ /** Mark-read calls the UI made, oldest first. */
32
+ export declare const __getPmReadCalls: () => MarkReadRequest[];
33
+ export declare const __resetPmComments: () => void;
34
+ declare const handlers: import('msw').HttpHandler[];
35
+ export { handlers };
36
+ //# sourceMappingURL=pm-comments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pm-comments.d.ts","sourceRoot":"","sources":["../../../../src/testing/mocks/handlers/pm-comments.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAEV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAEhB,UAAU,EACV,WAAW,EACX,UAAU,EAEX,MAAM,mCAAmC,CAAC;AAa3C,eAAO,MAAM,YAAY,EAAE,gBAK1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,gBAAgB,EAK3C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,UAAqE,CAAC;AAEnG,eAAO,MAAM,gBAAgB,EAAE,UAAU,EAKxC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,mBAAuD,CAAC;AAE9F,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,EAAE,mBAAmB,CAAC;IAClC,6EAA6E;IAC7E,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,uCAAuC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mDAAmD;IACnD,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,sDAAsD;IACtD,cAAc,CAAC,EAAE,gBAAgB,CAAC;CACnC,CAAC;AAUF,eAAO,MAAM,aAAa,eAAe,OAAO,CAAC,WAAW,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KAAQ,WAgBxF,CAAC;AAwEF,4DAA4D;AAC5D,eAAO,MAAM,YAAY,gBAAiB,MAAM,UAAU,MAAM,SAAS,OAAO,CAAC,WAAW,CAAC,SAE5F,CAAC;AAEF,eAAO,MAAM,WAAW,gBAAiB,MAAM,UAAU,MAAM,4BAAwC,CAAC;AAExG,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,UAAW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,SAElE,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,yBAAuB,CAAC;AAErD,eAAO,MAAM,iBAAiB,YAM7B,CAAC;AAoCF,QAAA,MAAM,QAAQ,6BAyJb,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/testing/mocks/handlers.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,6BAiBpB,CAAC"}
1
+ {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/testing/mocks/handlers.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,QAAQ,6BAmBpB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export declare const ACTIONS: {
2
2
  readonly OPEN_CREATE_FORM: "OPEN_CREATE_FORM";
3
+ readonly OPEN_TASK_THREAD: "OPEN_TASK_THREAD";
3
4
  };
4
5
  type ActionType = (typeof ACTIONS)[keyof typeof ACTIONS];
5
6
  type ActionQueuePayload = {
@@ -14,6 +15,15 @@ type ActionQueuePayload = {
14
15
  */
15
16
  selectConnectorForm?: boolean;
16
17
  };
18
+ /**
19
+ * Open a linked PM task's comment thread, optionally at one comment (Comment Sync deep link
20
+ * from a mention / activity notification). Requires the item's `connectorId`.
21
+ */
22
+ [ACTIONS.OPEN_TASK_THREAD]: {
23
+ conversationId: number;
24
+ externalResourceId: string;
25
+ commentId?: string;
26
+ };
17
27
  };
18
28
  export type ActionQueueItem = {
19
29
  type: ActionType;
@@ -36,6 +46,11 @@ export type QueueProps = {
36
46
  /** Connector this listener's panel is rendering (undefined when it renders all of them). */
37
47
  connectorId?: string;
38
48
  openCreateForm: (payload?: OpenCreateFormPayload) => void;
49
+ /** Panels without Comment Sync leave it off and never consume the action. */
50
+ openTaskThread?: (payload: OpenTaskThreadPayload) => void;
51
+ };
52
+ export type OpenTaskThreadPayload = ActionQueuePayload[typeof ACTIONS.OPEN_TASK_THREAD] & {
53
+ connectorId: string;
39
54
  };
40
55
  /**
41
56
  * Props are read through a getter at delivery time, so a listener stays registered across
@@ -53,6 +68,7 @@ export declare class ActionQueue {
53
68
  private _processing;
54
69
  ACTIONS: {
55
70
  readonly OPEN_CREATE_FORM: "OPEN_CREATE_FORM";
71
+ readonly OPEN_TASK_THREAD: "OPEN_TASK_THREAD";
56
72
  };
57
73
  constructor({ processDelay }: ActionQueueConstructorProps);
58
74
  /** True while at least one panel is listening. */
@@ -1 +1 @@
1
- {"version":3,"file":"action-queue.d.ts","sourceRoot":"","sources":["../../src/utils/action-queue.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;CAEV,CAAC;AAEX,KAAK,UAAU,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AAE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