@ezychat/web 0.1.77 → 0.1.78

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 (34) hide show
  1. package/dist-lib/chunks/{admin-BKiB8_GE.js → admin-Bw0RmdAy.js} +1 -1
  2. package/dist-lib/chunks/{admin-DM8CrZrZ.js → admin-Vk_4QCBI.js} +1 -1
  3. package/dist-lib/chunks/{common-BB_u0f7c.js → common-BE996sRJ.js} +26 -0
  4. package/dist-lib/chunks/{common-6IvDd1Hx.js → common-CBTam36M.js} +26 -0
  5. package/dist-lib/chunks/{inbox-C9xTxE6Y.js → inbox-BP7OELj9.js} +7 -0
  6. package/dist-lib/chunks/{inbox-D-koJMyr.js → inbox-g6IVD36a.js} +7 -0
  7. package/dist-lib/ezychat-web.css +1 -1
  8. package/dist-lib/index.js +8389 -6327
  9. package/dist-lib/types/admin/business-templates-data.d.ts +18 -0
  10. package/dist-lib/types/admin/business-templates.d.ts +3 -1
  11. package/dist-lib/types/admin/connectors/ConnectorDetailPage.d.ts +2 -1
  12. package/dist-lib/types/admin/connectors/ConnectorsGalleryPage.d.ts +2 -1
  13. package/dist-lib/types/admin/connectors/CreateSheetDialog.d.ts +29 -0
  14. package/dist-lib/types/admin/connectors/DriveSettingsCard.d.ts +14 -0
  15. package/dist-lib/types/admin/connectors/GoogleDriveAccountCard.d.ts +7 -0
  16. package/dist-lib/types/admin/connectors/SqlAccountCustomers.d.ts +4 -0
  17. package/dist-lib/types/admin/connectors/SqlAccountPage.d.ts +12 -0
  18. package/dist-lib/types/admin/connectors/SqlAccountSettings.d.ts +7 -0
  19. package/dist-lib/types/admin/connectors/catalog.d.ts +10 -7
  20. package/dist-lib/types/admin/connectors/connector-ui.d.ts +17 -1
  21. package/dist-lib/types/admin/connectors/google-connect.d.ts +5 -0
  22. package/dist-lib/types/admin/connectors/sheets-tabs.d.ts +4 -1
  23. package/dist-lib/types/api/ai-templates.d.ts +24 -0
  24. package/dist-lib/types/api/ai.d.ts +3 -0
  25. package/dist-lib/types/api/connectors.d.ts +132 -0
  26. package/dist-lib/types/api/queries.d.ts +3 -1
  27. package/dist-lib/types/api/sql-account.d.ts +105 -0
  28. package/dist-lib/types/i18n/resources.d.ts +396 -0
  29. package/dist-lib/types/inbox/MessageBubble.d.ts +5 -1
  30. package/dist-lib/types/inbox/MessageList.d.ts +8 -1
  31. package/dist-lib/types/inbox/useQuoteJump.d.ts +28 -0
  32. package/dist-lib/types/inbox/useSwipeReply.d.ts +1 -0
  33. package/dist-lib/types/lib/tips.d.ts +1 -1
  34. package/package.json +2 -2
@@ -193,6 +193,10 @@ export declare const enResources: {
193
193
  title: string;
194
194
  body: string;
195
195
  };
196
+ driveFiles: {
197
+ title: string;
198
+ body: string;
199
+ };
196
200
  reportNumber: {
197
201
  title: string;
198
202
  body: string;
@@ -200,6 +204,28 @@ export declare const enResources: {
200
204
  step2: string;
201
205
  step3: string;
202
206
  };
207
+ sqlApiService: {
208
+ title: string;
209
+ body: string;
210
+ step1: string;
211
+ step2: string;
212
+ step3: string;
213
+ step4: string;
214
+ action: string;
215
+ };
216
+ sqlKeys: {
217
+ title: string;
218
+ body: string;
219
+ step1: string;
220
+ step2: string;
221
+ step3: string;
222
+ step4: string;
223
+ action: string;
224
+ };
225
+ sqlCustomerCode: {
226
+ title: string;
227
+ body: string;
228
+ };
203
229
  usageStats: {
204
230
  title: string;
205
231
  body: string;
@@ -871,6 +897,7 @@ export declare const enResources: {
871
897
  aiToolUsed: string;
872
898
  internalNote: string;
873
899
  sheetRowAdded: string;
900
+ driveFileSaved: string;
874
901
  calendarChecked: string;
875
902
  calendarBooked: string;
876
903
  calendarBookedNoTime: string;
@@ -901,6 +928,12 @@ export declare const enResources: {
901
928
  you: string;
902
929
  contact: string;
903
930
  quotedMessage: string;
931
+ quoteJump: {
932
+ go: string;
933
+ unavailable: string;
934
+ tooFar: string;
935
+ failed: string;
936
+ };
904
937
  notSent: string;
905
938
  voiceNote: string;
906
939
  quote: {
@@ -3186,6 +3219,12 @@ export declare const enResources: {
3186
3219
  browse: string;
3187
3220
  sheetsReads: string;
3188
3221
  sheetsAdds: string;
3222
+ driveNoFolder: string;
3223
+ driveSaves: string;
3224
+ driveReads_one: string;
3225
+ driveReads_other: string;
3226
+ driveSavesAndReads_one: string;
3227
+ driveSavesAndReads_other: string;
3189
3228
  };
3190
3229
  settingsPointerTitle: string;
3191
3230
  settingsPointer: string;
@@ -3198,6 +3237,12 @@ export declare const enResources: {
3198
3237
  readRowsHint: string;
3199
3238
  addLead: string;
3200
3239
  addLeadHint: string;
3240
+ save: string;
3241
+ saveHint: string;
3242
+ find: string;
3243
+ findHint: string;
3244
+ read: string;
3245
+ readHint: string;
3201
3246
  };
3202
3247
  items: {
3203
3248
  "google-calendar": {
@@ -3218,6 +3263,20 @@ export declare const enResources: {
3218
3263
  long: string;
3219
3264
  privacy: string;
3220
3265
  };
3266
+ "google-drive": {
3267
+ name: string;
3268
+ short: string;
3269
+ long: string;
3270
+ privacy: string;
3271
+ privacy2: string;
3272
+ privacy3: string;
3273
+ };
3274
+ "sql-account": {
3275
+ name: string;
3276
+ short: string;
3277
+ long: string;
3278
+ privacy: string;
3279
+ };
3221
3280
  };
3222
3281
  gc: {
3223
3282
  accountTitle: string;
@@ -3567,11 +3626,44 @@ export declare const enResources: {
3567
3626
  newColumn: string;
3568
3627
  columnsOf: string;
3569
3628
  emptyFirstRow: string;
3629
+ permissions: {
3630
+ groupLabel: string;
3631
+ aiValues: string;
3632
+ aiValuesHint: string;
3633
+ formulas: string;
3634
+ formulasHint: string;
3635
+ formulasTipTitle: string;
3636
+ formulasTipBody: string;
3637
+ };
3570
3638
  goneBadge: string;
3571
3639
  goneHint: string;
3572
3640
  autoColumns: string;
3573
3641
  rule5: string;
3574
3642
  rule6: string;
3643
+ create: {
3644
+ open: string;
3645
+ title: string;
3646
+ description: string;
3647
+ start: string;
3648
+ blank: string;
3649
+ fromLayout: string;
3650
+ name: string;
3651
+ tabs: string;
3652
+ tabsHint: string;
3653
+ tabN: string;
3654
+ tabName: string;
3655
+ columns: string;
3656
+ columnsHint: string;
3657
+ access: string;
3658
+ removeTab: string;
3659
+ addTab: string;
3660
+ formulas_one: string;
3661
+ formulas_other: string;
3662
+ invalid: string;
3663
+ cancel: string;
3664
+ submit: string;
3665
+ done: string;
3666
+ };
3575
3667
  };
3576
3668
  sheetsAct: {
3577
3669
  hint: string;
@@ -3582,6 +3674,310 @@ export declare const enResources: {
3582
3674
  row_addedGroup: string;
3583
3675
  looked_upTab: string;
3584
3676
  };
3677
+ gd: {
3678
+ accountDescription: string;
3679
+ what1: string;
3680
+ what2: string;
3681
+ what3: string;
3682
+ connect: string;
3683
+ connectHint: string;
3684
+ connectedToast: string;
3685
+ expiredBody: string;
3686
+ unavailableTitle: string;
3687
+ unavailableBody: string;
3688
+ perAgent: string;
3689
+ disconnectTitle: string;
3690
+ disconnectBody: string;
3691
+ disconnected: string;
3692
+ };
3693
+ drive: {
3694
+ notConnected: string;
3695
+ notConnectedHint: string;
3696
+ paused: {
3697
+ expired: string;
3698
+ unavailable: string;
3699
+ };
3700
+ pausedBody: string;
3701
+ folder: {
3702
+ title: string;
3703
+ description: string;
3704
+ none: string;
3705
+ choose: string;
3706
+ change: string;
3707
+ changeHint: string;
3708
+ open: string;
3709
+ onlyChosen: string;
3710
+ };
3711
+ needFolder: string;
3712
+ save: {
3713
+ title: string;
3714
+ description: string;
3715
+ rule1: string;
3716
+ rule2: string;
3717
+ rule3: string;
3718
+ rule4: string;
3719
+ };
3720
+ read: {
3721
+ title: string;
3722
+ description: string;
3723
+ none: string;
3724
+ add: string;
3725
+ remove: string;
3726
+ hint: string;
3727
+ full: string;
3728
+ cantRead: string;
3729
+ };
3730
+ kind: {
3731
+ doc: string;
3732
+ sheet: string;
3733
+ pdf: string;
3734
+ word: string;
3735
+ text: string;
3736
+ };
3737
+ when: {
3738
+ note: string;
3739
+ open: string;
3740
+ };
3741
+ picking: string;
3742
+ pickingFolder: string;
3743
+ pickingFiles: string;
3744
+ pickBlocked: string;
3745
+ openPicker: string;
3746
+ pickSameComputer: string;
3747
+ pickError: {
3748
+ cancelled: string;
3749
+ failed: string;
3750
+ expired: string;
3751
+ };
3752
+ discard: string;
3753
+ saveButton: string;
3754
+ saved: string;
3755
+ };
3756
+ driveAct: {
3757
+ hint: string;
3758
+ emptyHint: string;
3759
+ saved: string;
3760
+ read: string;
3761
+ failed: string;
3762
+ skipped: {
3763
+ safety: string;
3764
+ size: string;
3765
+ unavailable: string;
3766
+ };
3767
+ inGroup: string;
3768
+ };
3769
+ sql: {
3770
+ tabs: {
3771
+ overview: string;
3772
+ connection: string;
3773
+ settings: string;
3774
+ customers: string;
3775
+ activity: string;
3776
+ };
3777
+ settings: {
3778
+ notConnected: string;
3779
+ };
3780
+ req: {
3781
+ title: string;
3782
+ body: string;
3783
+ version: string;
3784
+ service: string;
3785
+ port: string;
3786
+ user: string;
3787
+ dealer: string;
3788
+ cloud: string;
3789
+ };
3790
+ about: string;
3791
+ can: {
3792
+ stock: string;
3793
+ account: string;
3794
+ documents: string;
3795
+ quotation: string;
3796
+ };
3797
+ ownOnly: string;
3798
+ privacy1: string;
3799
+ privacy2: string;
3800
+ state: {
3801
+ no_dns: {
3802
+ title: string;
3803
+ body: string;
3804
+ };
3805
+ unreachable: {
3806
+ title: string;
3807
+ body: string;
3808
+ };
3809
+ private_ip: {
3810
+ title: string;
3811
+ body: string;
3812
+ };
3813
+ bad_keys: {
3814
+ title: string;
3815
+ body: string;
3816
+ };
3817
+ old_version: {
3818
+ title: string;
3819
+ body: string;
3820
+ };
3821
+ unexpected: {
3822
+ title: string;
3823
+ body: string;
3824
+ };
3825
+ };
3826
+ conn: {
3827
+ connect: string;
3828
+ connected: string;
3829
+ title: string;
3830
+ hint: string;
3831
+ accessKey: string;
3832
+ accessHint: string;
3833
+ keyFormat: string;
3834
+ secretKey: string;
3835
+ host: string;
3836
+ hostFromKey: string;
3837
+ testing: string;
3838
+ connectTest: string;
3839
+ okTitle: string;
3840
+ okBody: string;
3841
+ checked: string;
3842
+ test: string;
3843
+ disconnect: string;
3844
+ disconnectTitle: string;
3845
+ disconnectBody: string;
3846
+ testOk: string;
3847
+ };
3848
+ access: {
3849
+ title: string;
3850
+ hint: string;
3851
+ own: string;
3852
+ everyone: string;
3853
+ off: string;
3854
+ read: string;
3855
+ create: string;
3856
+ never: string;
3857
+ showPrice: string;
3858
+ stockShown: string;
3859
+ inStock: string;
3860
+ quantity: string;
3861
+ save: string;
3862
+ discard: string;
3863
+ saved: string;
3864
+ };
3865
+ obj: {
3866
+ stockitem: {
3867
+ name: string;
3868
+ sees: string;
3869
+ };
3870
+ customer: {
3871
+ name: string;
3872
+ sees: string;
3873
+ };
3874
+ customerinvoice: {
3875
+ name: string;
3876
+ sees: string;
3877
+ };
3878
+ salesinvoice: {
3879
+ name: string;
3880
+ sees: string;
3881
+ };
3882
+ salesquotation: {
3883
+ name: string;
3884
+ sees: string;
3885
+ };
3886
+ salesorder: {
3887
+ name: string;
3888
+ sees: string;
3889
+ };
3890
+ deliveryorder: {
3891
+ name: string;
3892
+ sees: string;
3893
+ };
3894
+ customerpayment: {
3895
+ name: string;
3896
+ sees: string;
3897
+ };
3898
+ };
3899
+ guard: {
3900
+ title: string;
3901
+ confirm: string;
3902
+ items: string;
3903
+ price: string;
3904
+ limit: string;
3905
+ never: string;
3906
+ };
3907
+ match: {
3908
+ title: string;
3909
+ hint: string;
3910
+ rule1: string;
3911
+ rule2: string;
3912
+ rule3: string;
3913
+ byPhone: string;
3914
+ never: string;
3915
+ unavailable: string;
3916
+ building: string;
3917
+ };
3918
+ cust: {
3919
+ title: string;
3920
+ hint: string;
3921
+ linked: string;
3922
+ phone: string;
3923
+ several: string;
3924
+ none: string;
3925
+ severalHint: string;
3926
+ noneHint: string;
3927
+ empty: string;
3928
+ link: string;
3929
+ change: string;
3930
+ unlink: string;
3931
+ linkTitle: string;
3932
+ linkHint: string;
3933
+ search: string;
3934
+ pick: string;
3935
+ noDebtor: string;
3936
+ linkedToast: string;
3937
+ unknownCode: string;
3938
+ notConnected: string;
3939
+ searching: string;
3940
+ unlinked: string;
3941
+ };
3942
+ act: {
3943
+ hint: string;
3944
+ stock: string;
3945
+ account: string;
3946
+ document: string;
3947
+ payments: string;
3948
+ quotation: string;
3949
+ dockey: string;
3950
+ result: {
3951
+ done: string;
3952
+ refused: string;
3953
+ failed: string;
3954
+ };
3955
+ reason: {
3956
+ no_customer: string;
3957
+ unreachable: string;
3958
+ not_own: string;
3959
+ several: string;
3960
+ object_off: string;
3961
+ item_not_looked_up: string;
3962
+ qty_not_from_customer: string;
3963
+ no_price: string;
3964
+ no_draft: string;
3965
+ draft_expired: string;
3966
+ limit_chat: string;
3967
+ limit_agent: string;
3968
+ not_confirmed: string;
3969
+ no_dns: string;
3970
+ private_ip: string;
3971
+ bad_keys: string;
3972
+ old_version: string;
3973
+ unexpected: string;
3974
+ other: string;
3975
+ };
3976
+ noChat: string;
3977
+ someone: string;
3978
+ };
3979
+ agentCard: string;
3980
+ };
3585
3981
  };
3586
3982
  reports: {
3587
3983
  title: string;
@@ -23,6 +23,10 @@ export interface MessageBubbleProps {
23
23
  directory?: Directory;
24
24
  /** Direct chats: the customer's name as the header shows it (used in quotes). */
25
25
  contactName?: string;
26
+ /** Tap the quote to scroll to the original message (loads older pages when needed). */
27
+ onOpenQuote?(quotedId: string): void;
28
+ /** Briefly marks the bubble after a jump from a quote. */
29
+ highlighted?: boolean;
26
30
  /** Edit and delete (⋮ menu; under Reply in the press-and-hold bar on touch). */
27
31
  changes?: MessageChangeProps;
28
32
  }
@@ -35,4 +39,4 @@ export declare function quotedPreview(q: Message, t: TFunction<'inbox'>): string
35
39
  export declare function StatusTicks({ status }: {
36
40
  status: Message['status'];
37
41
  }): React.JSX.Element;
38
- export declare function MessageBubble({ message: m, showSender, outboundLabel, quoted, onRetry, retrying, onMediaLoad, directory, onReply, onReact, reactDisabledReason, contactName, changes, }: MessageBubbleProps): React.JSX.Element;
42
+ export declare function MessageBubble({ message: m, showSender, outboundLabel, quoted, onRetry, retrying, onMediaLoad, directory, onReply, onReact, reactDisabledReason, contactName, changes, onOpenQuote, highlighted, }: MessageBubbleProps): React.JSX.Element;
@@ -3,6 +3,7 @@ import type { Message } from '@ezychat/shared';
3
3
  import type { MessageChangeProps } from './message-changes';
4
4
  import type { TimelineItem } from './timeline';
5
5
  import type { Directory } from './useDirectory';
6
+ import type { JumpTarget } from './useQuoteJump';
6
7
  export interface MessageListProps {
7
8
  items: TimelineItem[];
8
9
  messagesById: Map<string, Message>;
@@ -23,6 +24,12 @@ export interface MessageListProps {
23
24
  contactName?: string;
24
25
  /** Edit and delete sent messages (rights per message, handlers). */
25
26
  changes?: MessageChangeProps;
27
+ /** Tap a quote: find and scroll to its original (see `useQuoteJump`). */
28
+ onOpenQuote?(quotedId: string): void;
29
+ /** Scroll to this message and highlight it briefly once it is rendered. */
30
+ jumpTo?: JumpTarget | null;
26
31
  footer?: React.ReactNode;
27
32
  }
28
- export declare function MessageList({ items, messagesById, isGroup, directory, loading, hasOlder, loadingOlder, onLoadOlder, onRetry, retryingId, onReply, onReact, reactDisabledReason, contactName, changes, footer, }: MessageListProps): React.JSX.Element;
33
+ /** How long a message reached from a quote stays highlighted. */
34
+ export declare const HIGHLIGHT_MS = 1600;
35
+ export declare function MessageList({ items, messagesById, isGroup, directory, loading, hasOlder, loadingOlder, onLoadOlder, onRetry, retryingId, onReply, onReact, reactDisabledReason, contactName, changes, onOpenQuote, jumpTo, footer, }: MessageListProps): React.JSX.Element;
@@ -0,0 +1,28 @@
1
+ import type { Message, MessageListResponse } from '@ezychat/shared';
2
+ /** Older pages loaded at most to reach a quoted message (50 each: 2,000 messages back). */
3
+ export declare const QUOTE_JUMP_MAX_PAGES = 40;
4
+ /** A request to scroll to a message; `seq` makes a second tap on the same quote scroll again. */
5
+ export interface JumpTarget {
6
+ id: string;
7
+ seq: number;
8
+ }
9
+ interface OlderPages {
10
+ hasNextPage: boolean;
11
+ fetchNextPage(): Promise<{
12
+ data?: {
13
+ pages: MessageListResponse[];
14
+ };
15
+ hasNextPage: boolean;
16
+ isError: boolean;
17
+ }>;
18
+ }
19
+ /**
20
+ * "Tap a quote to see the original", like WhatsApp: a loaded original is scrolled to at once;
21
+ * otherwise the server says whether it is stored in this chat and how far back, and older pages
22
+ * load (bounded) until it is there. Never matched by text, only by the stored message key.
23
+ */
24
+ export declare function useQuoteJump(jid: string, messagesById: Map<string, Message>, older: OlderPages): {
25
+ target: JumpTarget | null;
26
+ open(id: string): Promise<void>;
27
+ };
28
+ export {};
@@ -10,4 +10,5 @@ export declare const SWIPE_TRIGGER_PX = 56;
10
10
  export declare function useSwipeReply(onReply: (() => void) | undefined, onLongPress?: () => void): {
11
11
  offset: number;
12
12
  handlers: React.HTMLAttributes<HTMLElement>;
13
+ wasGesture: () => boolean;
13
14
  };
@@ -3,7 +3,7 @@
3
3
  * under `tips.<topic>` (`title`, `body`, `step1`…`stepN`, `action`); this file holds each tip's shape.
4
4
  * Design: docs/features/concept-tips/design.md.
5
5
  */
6
- export declare const TIP_TOPICS: readonly ["whatsappLink", "aiConnection", "apiKey", "claudeKey", "aiModel", "businessContext", "instructions", "handoff", "tryIt", "voice", "tunnel", "lan", "mcp", "accessToken", "connectors", "safetyAi", "autoBlock", "lockedFiles", "reportNumber", "usageStats"];
6
+ export declare const TIP_TOPICS: readonly ["whatsappLink", "aiConnection", "apiKey", "claudeKey", "aiModel", "businessContext", "instructions", "handoff", "tryIt", "voice", "tunnel", "lan", "mcp", "accessToken", "connectors", "safetyAi", "autoBlock", "lockedFiles", "driveFiles", "reportNumber", "sqlApiService", "sqlKeys", "sqlCustomerCode", "usageStats"];
7
7
  export type TipTopic = (typeof TIP_TOPICS)[number];
8
8
  /** The ezychat.ai guides a tip can link to (each exists in en, ms and zh). */
9
9
  export type TipGuide = 'getting-started' | 'set-up-ai-agent' | 'connect-cloudflare' | 'connect-ai-assistant';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezychat/web",
3
- "version": "0.1.77",
3
+ "version": "0.1.78",
4
4
  "type": "module",
5
5
  "description": "EzyChat core: the team inbox web app (React) as a library, with createInboxApp and its extension API.",
6
6
  "license": "MIT",
@@ -40,7 +40,7 @@
40
40
  "build:lib": "node ../../scripts/build-web-lib.mjs"
41
41
  },
42
42
  "dependencies": {
43
- "@ezychat/shared": "0.1.77",
43
+ "@ezychat/shared": "0.1.78",
44
44
  "@fontsource-variable/inter": "^5.3.0",
45
45
  "@tanstack/react-query": "^5.105.0",
46
46
  "@types/react": "^19.3.0",