@anker-in/campaign-ui 0.2.10-beta.33 → 0.2.10-beta.34

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 (46) hide show
  1. package/dist/cjs/components/credits/creditsCash/RedeemableItem.js +1 -1
  2. package/dist/cjs/components/credits/creditsCash/RedeemableItem.js.map +2 -2
  3. package/dist/cjs/components/registration/authCodeActivate/Message.d.ts +4 -0
  4. package/dist/cjs/components/registration/authCodeActivate/Message.js +2 -0
  5. package/dist/cjs/components/registration/authCodeActivate/Message.js.map +7 -0
  6. package/dist/cjs/components/registration/authCodeActivate/index.d.ts +3 -0
  7. package/dist/cjs/components/registration/authCodeActivate/index.js +2 -0
  8. package/dist/cjs/components/registration/authCodeActivate/index.js.map +7 -0
  9. package/dist/cjs/components/registration/authCodeActivate/type.d.ts +23 -0
  10. package/dist/cjs/components/registration/authCodeActivate/type.js +2 -0
  11. package/dist/cjs/components/registration/authCodeActivate/type.js.map +7 -0
  12. package/dist/cjs/components/registration/index.d.ts +1 -0
  13. package/dist/cjs/components/registration/index.js +2 -0
  14. package/dist/cjs/components/registration/index.js.map +7 -0
  15. package/dist/cjs/components/registration/modalContainer.js +1 -1
  16. package/dist/cjs/components/registration/modalContainer.js.map +2 -2
  17. package/dist/esm/components/credits/creditsCash/RedeemableItem.js +1 -1
  18. package/dist/esm/components/credits/creditsCash/RedeemableItem.js.map +2 -2
  19. package/dist/esm/components/registration/authCodeActivate/Message.d.ts +4 -0
  20. package/dist/esm/components/registration/authCodeActivate/Message.js +2 -0
  21. package/dist/esm/components/registration/authCodeActivate/Message.js.map +7 -0
  22. package/dist/esm/components/registration/authCodeActivate/index.d.ts +3 -0
  23. package/dist/esm/components/registration/authCodeActivate/index.js +2 -0
  24. package/dist/esm/components/registration/authCodeActivate/index.js.map +7 -0
  25. package/dist/esm/components/registration/authCodeActivate/type.d.ts +23 -0
  26. package/dist/esm/components/registration/authCodeActivate/type.js +1 -0
  27. package/dist/esm/components/registration/authCodeActivate/type.js.map +7 -0
  28. package/dist/esm/components/registration/index.d.ts +1 -0
  29. package/dist/esm/components/registration/index.js +2 -0
  30. package/dist/esm/components/registration/index.js.map +7 -0
  31. package/dist/esm/components/registration/modalContainer.js +1 -1
  32. package/dist/esm/components/registration/modalContainer.js.map +2 -2
  33. package/package.json +1 -1
  34. package/src/components/credits/creditsCash/RedeemableItem.tsx +1 -1
  35. package/dist/cjs/components/credits/creditsRedeemList/CardValue.d.ts +0 -6
  36. package/dist/cjs/components/credits/creditsRedeemList/CardValue.js +0 -2
  37. package/dist/cjs/components/credits/creditsRedeemList/CardValue.js.map +0 -7
  38. package/dist/esm/components/credits/creditsRedeemList/CardValue.d.ts +0 -6
  39. package/dist/esm/components/credits/creditsRedeemList/CardValue.js +0 -2
  40. package/dist/esm/components/credits/creditsRedeemList/CardValue.js.map +0 -7
  41. package/dist/index.d.mts +0 -493
  42. package/dist/index.d.ts +0 -493
  43. package/dist/index.js +0 -31210
  44. package/dist/index.js.map +0 -1
  45. package/dist/index.mjs +0 -31196
  46. package/dist/index.mjs.map +0 -1
package/dist/index.d.ts DELETED
@@ -1,493 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React from 'react';
3
- export { useCopilotAction, useCopilotChat, useCopilotReadable } from '@copilotkit/react-core';
4
- export { ActionExecutionMessage, Role, TextMessage } from '@copilotkit/runtime-client-gql';
5
- import * as swr_dist_mutation from 'swr/dist/mutation';
6
-
7
- interface ChatProps {
8
- title: string;
9
- runtimeUrl: string;
10
- shopifyDomain: string;
11
- /** GA 的 client id
12
- */
13
- userId: string;
14
- /** 是否登陆用户 0 or 1
15
- */
16
- account?: string;
17
- /** 用户浏览器语言
18
- */
19
- locale?: string;
20
- /** 开场白
21
- */
22
- prologue?: string;
23
- /** ?a=1&b=2
24
- */
25
- query?: string;
26
- /** 'follow' or 'unfollow' | true or false
27
- * follow: ResponseButton 会跟随在 messages 的后边
28
- * unfollow: ResponseButton 在聊天框底部
29
- */
30
- showResponseButton?: string | boolean;
31
- /** messages 的回调事件
32
- * 每次生成/接受新的messages,会将 整个 messages list 传递给外部
33
- */
34
- messagesCallback?: (_messages: any) => void;
35
- /** 通用 action 的触发事件
36
- */
37
- commonRender?: string | ((_props: any) => React.ReactElement);
38
- /** shulex的 action 的触发事件
39
- */
40
- shulexRender?: string | ((_props: any) => React.ReactElement);
41
- /** 通用 积分 换 Coupon 的触发事件
42
- */
43
- pointsExchangeCouponRender?: string | ((_props: any) => React.ReactElement);
44
- /** 跳转 checkout action 卡片,接受参数: {"status":"complete","args":[{"sku":["A3936031"],"handle":"space-a40-a3936031"}],"result":""}
45
- * 后端接口文档:https://anker-in.feishu.cn/wiki/DOYJwE9oxipWmYk072ncnJNznBb
46
- */
47
- gotocheckoutRender?: string | ((_props: any) => React.ReactElement);
48
- /** 打开购物车 action 卡片,接受参数: {"status":"complete","args":[{"sku":["A3936031"],"handle":"space-a40-a3936031"}],"result":""}
49
- * 后端接口文档:https://anker-in.feishu.cn/wiki/DOYJwE9oxipWmYk072ncnJNznBb
50
- */
51
- gotocartRender?: string | ((_props: any) => React.ReactElement);
52
- /** 打开购物车 action 的触发事件
53
- */
54
- addtocartHandler?: (_args: any) => Promise<any>;
55
- /** 加购卡片,接受参数: {"status":"complete","args":[{"sku":["A3936031"],"handle":"space-a40-a3936031"}],"result":""}
56
- * 后端接口文档:https://anker-in.feishu.cn/wiki/DOYJwE9oxipWmYk072ncnJNznBb
57
- */
58
- addtocartRender?: string | ((_props: any) => React.ReactElement);
59
- /** 订阅卡片,接受参数: {"status":"complete","args":[{"sku":["A3936031"],"handle":"space-a40-a3936031"}],"result":""}
60
- * 后端接口文档:https://anker-in.feishu.cn/wiki/DOYJwE9oxipWmYk072ncnJNznBb
61
- */
62
- signupRender?: string | ((_props: any) => React.ReactElement);
63
- /** 产品卡片,接受参数: {"status":"complete","args":[{"sku":["A3936031"],"handle":"space-a40-a3936031"}],"result":""}
64
- * 后端接口文档:https://anker-in.feishu.cn/wiki/DOYJwE9oxipWmYk072ncnJNznBb
65
- */
66
- productRender?: string | ((_props: any) => React.ReactElement);
67
- /** CopilotPopup 自定义参数,参考:https://docs.copilotkit.ai/reference/components/CopilotPopup */
68
- popup?: any;
69
- /** 文案,{"productRenderTipMessage": "","popupTip": "Hi ! Welcome to soundcore Innovations live chat!", "popupTipTimeout": [3000, 6000]} */
70
- lang?: any;
71
- /** 参考此文档:https://docs.copilotkit.ai/concepts/customize-look-and-feel */
72
- style?: any;
73
- className?: string;
74
- }
75
- declare const Chat: (props: ChatProps) => react_jsx_runtime.JSX.Element;
76
-
77
- declare enum ConsumeType {
78
- Coupon = "coupon",
79
- GiftCard = "giftCard",
80
- GoGift = "goGift",
81
- Product = "product"
82
- }
83
- declare enum DTC_TASK_TYPE {
84
- FirstPurchase = "firstPurchase",
85
- UploadReceipt = "uploadReceipt",
86
- Shopping = "shopping"
87
- }
88
-
89
- interface BaseResponse {
90
- brand: string;
91
- }
92
- interface CreditInfoResponse extends BaseResponse {
93
- total_credit: number;
94
- available_credit: number;
95
- pending_credit: number;
96
- expired_credit: number;
97
- cancel_credit: number;
98
- consumed_credit: number;
99
- }
100
-
101
- declare function CreditsProvider({ children, profile, removeProfile, isLoadingProfile, openSignInPopup, openSignUpPopup, taskIdToTypeMapping, creditInfo, customer, customerLoading, fetchCreditInfo, gtm, }: {
102
- children: React.ReactNode;
103
- profile: any;
104
- removeProfile: () => void;
105
- isLoadingProfile: boolean;
106
- openSignInPopup: () => void;
107
- openSignUpPopup: () => void;
108
- taskIdToTypeMapping: Record<string, DTC_TASK_TYPE>;
109
- creditInfo?: CreditInfoResponse;
110
- customer: any;
111
- fetchCreditInfo: (user_id: string) => void;
112
- customerLoading: boolean;
113
- gtm: {
114
- pageGroup: string;
115
- };
116
- }): react_jsx_runtime.JSX.Element;
117
- declare function useCreditsContext(): {
118
- profile: any;
119
- isLoadingProfile: boolean;
120
- removeProfile: () => void;
121
- taskIdToTypeMapping: Record<string, DTC_TASK_TYPE>;
122
- openSignInPopup: () => void;
123
- openSignUpPopup: () => void;
124
- creditInfo?: CreditInfoResponse;
125
- customer?: any;
126
- customerLoading: boolean;
127
- fetchCreditInfo: (user_id: string) => void;
128
- gtm: {
129
- pageGroup: string;
130
- };
131
- };
132
-
133
- declare const useUploadReceipt: () => swr_dist_mutation.SWRMutationResponse<{
134
- ok: boolean;
135
- code: number;
136
- }, any, "/api/multipass/mktsrv/v1/credit/upload_third_party_order", {
137
- orderName: string;
138
- }>;
139
-
140
- type ReceiptCopy = {
141
- title: string;
142
- description: string;
143
- placeholder: string;
144
- note: string;
145
- submit: string;
146
- successTitle: string;
147
- successDescription: string;
148
- gotIt: string;
149
- failedTitle: string;
150
- successIcon: string;
151
- failedIcon: string;
152
- failedReasons: {
153
- code: string;
154
- id: string;
155
- description: string;
156
- }[];
157
- };
158
- declare function CreditsUploadReceiptModal({ isOpen, onClose, copy, onSuccess, }: {
159
- isOpen: boolean;
160
- onClose: () => void;
161
- copy: ReceiptCopy;
162
- onSuccess: () => void;
163
- }): react_jsx_runtime.JSX.Element;
164
-
165
- type Img = {
166
- url: string;
167
- alt: string;
168
- };
169
- type BannerProps = {
170
- copy: {
171
- pcImg: Img;
172
- laptopImg: Img;
173
- mobileImg: Img;
174
- joinNow: string;
175
- loginIn: string;
176
- login: {
177
- title: string;
178
- description: string;
179
- };
180
- unLogin: {
181
- title: string;
182
- description: string;
183
- };
184
- };
185
- };
186
- declare function CreditsBanner({ copy }: BannerProps): react_jsx_runtime.JSX.Element;
187
-
188
- interface BenefitItemCopy {
189
- icon: {
190
- alt: string;
191
- url: string;
192
- };
193
- text: string;
194
- note?: string;
195
- tag?: string;
196
- }
197
-
198
- interface CreditsBenefitsProps {
199
- copy: {
200
- title: string;
201
- benefits: BenefitItemCopy[];
202
- };
203
- }
204
- declare const CreditsBenefits: ({ copy }: CreditsBenefitsProps) => react_jsx_runtime.JSX.Element;
205
-
206
- interface MyRewardsMetafields {
207
- title: string;
208
- orderNumberLabel: string;
209
- valueLabel: string;
210
- receivedLabel: string;
211
- failedLabel: string;
212
- approveSuccessLabel: string;
213
- couponTab: string;
214
- productTab: string;
215
- pendingLabel: string;
216
- unfulfilledLabel: string;
217
- fulfilledLabel: string;
218
- confirmedTip: string;
219
- pendingTip: string;
220
- processingTip: string;
221
- ShippedTip: string;
222
- emptyListLabel: string;
223
- pointUnit: string;
224
- code: string;
225
- copied: string;
226
- copy: string;
227
- emptyListImage: {
228
- url: string;
229
- alt?: string;
230
- };
231
- }
232
-
233
- interface MyActivitiesMetafields {
234
- title: string;
235
- tips: string;
236
- allTab: string;
237
- earnedTab: string;
238
- deductedTab: string;
239
- expiredTab: string;
240
- activationTask: string;
241
- updateNameTask: string;
242
- updatePhoneTask: string;
243
- updateBirthdayTask: string;
244
- updateAppNameTask: string;
245
- subscriptionTask: string;
246
- refundTask: string;
247
- productUnApprovedTask: string;
248
- pendingTips?: string;
249
- pendingTips2?: string;
250
- firstPurchaseTask: string;
251
- uploadReceiptTask: string;
252
- shoppingTask: string;
253
- emptyListImage: {
254
- url: string;
255
- alt?: string;
256
- };
257
- emptyListLabel: string;
258
- }
259
-
260
- type ButtonConfig = {
261
- text: string;
262
- type: 'activities' | 'rewards';
263
- };
264
- interface InfoCardProps {
265
- data: {
266
- balanceLabel: string;
267
- comingSoonLabel: string;
268
- comingSoonTips: string;
269
- buttons: ButtonConfig[];
270
- pointUnit: string;
271
- infoIcon: string;
272
- myActivities: MyActivitiesMetafields;
273
- myRewards: MyRewardsMetafields;
274
- };
275
- }
276
- declare function CreditsInfoCard({ data }: InfoCardProps): react_jsx_runtime.JSX.Element;
277
-
278
- type BenefitItem = {
279
- title: string;
280
- credits: string;
281
- id: string;
282
- };
283
- type WaysToGetCreditsCopy = {
284
- title: string;
285
- subtitle: string;
286
- equalCredits: string;
287
- musicIcon: string;
288
- list: BenefitItem[];
289
- mainImage: {
290
- url: string;
291
- alt: string;
292
- };
293
- joinNow: string;
294
- activate: string;
295
- completed: string;
296
- completeProfile: string;
297
- makeFirstPurchase: string;
298
- goShopLink: string;
299
- uploadReceipt: string;
300
- shopNow: string;
301
- subscribe: string;
302
- sendEmailSuccess: string;
303
- creditsIcon: {
304
- url: string;
305
- alt: string;
306
- };
307
- receipt: ReceiptCopy;
308
- };
309
- type CreditsWaysToGetCreditsProps = {
310
- copy: WaysToGetCreditsCopy;
311
- classNames?: {
312
- equalCreditsText?: string;
313
- subtitle?: string;
314
- };
315
- activate: {
316
- openAuthCodePopup: () => void;
317
- isSuccess: boolean;
318
- isSendingActivateEmail: boolean;
319
- };
320
- subscribe: {
321
- openSubscribePopup: () => void;
322
- isSuccess: boolean;
323
- };
324
- uploadReceipt: {
325
- openUploadReceiptPopup: () => void;
326
- isSuccess: boolean;
327
- };
328
- };
329
-
330
- declare const CreditsWaysToGetCredits: ({ copy, activate, subscribe, uploadReceipt, classNames, }: CreditsWaysToGetCreditsProps) => react_jsx_runtime.JSX.Element;
331
-
332
- type FaqCopy = {
333
- title: string;
334
- subTitle: string;
335
- learnMore: {
336
- link: string;
337
- label: string;
338
- };
339
- items: {
340
- category_name: string;
341
- question: string;
342
- answer: string;
343
- }[];
344
- };
345
- declare const CreditsFaq: ({ copy }: {
346
- copy: FaqCopy;
347
- }) => react_jsx_runtime.JSX.Element;
348
-
349
- type RedeemableItemConfig = {
350
- title: string;
351
- desc: string;
352
- price: string;
353
- credit: string;
354
- rules: string;
355
- image: {
356
- url: string;
357
- };
358
- mobileImage: {
359
- url: string;
360
- };
361
- redeemId: number;
362
- };
363
- type CreditsCashCopy = {
364
- title: string;
365
- list: (RedeemableItemConfig & {
366
- products: {
367
- handle: string;
368
- sku: string;
369
- }[];
370
- })[];
371
- soldOut: string;
372
- ruleLabel: string;
373
- unlockRewards: string;
374
- btnRedeem: string;
375
- off: string;
376
- insufficientCredits: string;
377
- };
378
-
379
- declare const CreditsCash: ({ copy, className, hideTitle, cardClassName, authCodeActivate, }: {
380
- copy: CreditsCashCopy;
381
- className?: string;
382
- hideTitle?: boolean;
383
- cardClassName?: string;
384
- authCodeActivate: {
385
- openAuthCodePopup: Function;
386
- isSuccess: boolean;
387
- setOnSuccess: (arg: Function) => void;
388
- isSendingActivateEmail: boolean;
389
- };
390
- }) => react_jsx_runtime.JSX.Element;
391
-
392
- type CreditsPageCommon = {
393
- pointUnit: string;
394
- ruleLabel: string;
395
- soldOut: string;
396
- imageMapping: {
397
- [key in ConsumeType]: {
398
- url: string;
399
- };
400
- };
401
- };
402
-
403
- type CreditsRedeemListCopy = {
404
- title: string;
405
- giftCardLabel: string;
406
- unlockRewards: string;
407
- btnRedeem: string;
408
- list: {
409
- label: string;
410
- list: {
411
- id: string;
412
- type: string;
413
- value: string;
414
- rules: string[];
415
- }[];
416
- }[];
417
- validatorInfo: {
418
- addressInfo: {
419
- name: string;
420
- country: string;
421
- province: string;
422
- city: string;
423
- address: string;
424
- };
425
- };
426
- redeemModal: {
427
- confirmTitle: string;
428
- confirmButton: string;
429
- commonError: string;
430
- redeemLimitError: string;
431
- inventoryNotEnough: string;
432
- creditsNotEnough: string;
433
- crossSiteError: string;
434
- errorImageUrl: string;
435
- coupon: {
436
- successDesc: string;
437
- successTitle: string;
438
- successButton: string;
439
- successButtonUrl: string;
440
- };
441
- product: {
442
- required: string;
443
- invalidEmail: string;
444
- shippingAddress: string;
445
- shippingProduct: string;
446
- addressForm: {
447
- key: string;
448
- type: string;
449
- label: string;
450
- isSelect: boolean;
451
- required: boolean;
452
- placeholder: string;
453
- }[][];
454
- form: {
455
- key: string;
456
- type: string;
457
- isSelect: boolean;
458
- required: boolean;
459
- placeholder: string;
460
- }[][];
461
- successDesc: string[];
462
- rules: string[];
463
- steps: {
464
- imageUrl: string;
465
- title: string;
466
- }[];
467
- quantityLabel: string;
468
- totalPriceLabel: string;
469
- variantLabel: string;
470
- shippingFeeLabel: string;
471
- paymentButton: string;
472
- stepTitle: string;
473
- };
474
- };
475
- copied: string;
476
- off: string;
477
- copy: string;
478
- } & CreditsPageCommon;
479
-
480
- declare function CreditsRedeemList({ copy, className, tabClassName, hideTitle, cardClassName, activate, }: {
481
- copy: CreditsRedeemListCopy;
482
- className?: string;
483
- tabClassName?: string;
484
- hideTitle?: boolean;
485
- cardClassName?: string;
486
- activate: {
487
- openAuthCodePopup: () => void;
488
- isSuccess: boolean;
489
- setOnSuccess: (callback: Function) => void;
490
- };
491
- }): react_jsx_runtime.JSX.Element;
492
-
493
- export { Chat, CreditsBanner, CreditsBenefits, CreditsCash, CreditsFaq, CreditsInfoCard, CreditsProvider, CreditsRedeemList, CreditsUploadReceiptModal, CreditsWaysToGetCredits, useCreditsContext, useUploadReceipt as useCreditsUploadReceipt };