@capillarytech/blaze-ui 5.1.14 → 5.1.17

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 (37) hide show
  1. package/.npmrc +2 -0
  2. package/CapCalendarDatePicker/index.js +9 -992
  3. package/CapCalendarDatePicker/index.js.map +1 -1
  4. package/CapCondition/messages.d.ts +85 -0
  5. package/CapCondition/messages.d.ts.map +1 -0
  6. package/CapConditionPreview/MIGRATION_ANALYSIS.md +70 -0
  7. package/CapConditionPreview/README.md +40 -0
  8. package/CapConditionPreview/constants.d.ts +24 -0
  9. package/CapConditionPreview/constants.d.ts.map +1 -0
  10. package/CapConditionPreview/index.d.ts +11 -0
  11. package/CapConditionPreview/index.d.ts.map +1 -0
  12. package/CapConditionPreview/index.js +396 -662
  13. package/CapConditionPreview/index.js.map +1 -1
  14. package/CapConditionPreview/messages.d.ts +220 -0
  15. package/CapConditionPreview/messages.d.ts.map +1 -0
  16. package/CapConditionPreview/tests/USE_CASES_CapConditionPreview.md +65 -0
  17. package/CapConditionPreview/types.d.ts +67 -0
  18. package/CapConditionPreview/types.d.ts.map +1 -0
  19. package/CapMobileDatePicker/index.js +9 -992
  20. package/CapMobileDatePicker/index.js.map +1 -1
  21. package/CapMultiSelectDatePicker/README.md +11 -0
  22. package/CapMultiSelectDatePicker/index.d.ts +13 -0
  23. package/CapMultiSelectDatePicker/index.d.ts.map +1 -0
  24. package/CapMultiSelectDatePicker/index.js +85 -508
  25. package/CapMultiSelectDatePicker/index.js.map +1 -1
  26. package/CapMultiSelectDatePicker/messages.d.ts +9 -0
  27. package/CapMultiSelectDatePicker/messages.d.ts.map +1 -0
  28. package/CapMultiSelectDatePicker/types.d.ts +31 -0
  29. package/CapMultiSelectDatePicker/types.d.ts.map +1 -0
  30. package/index.d.ts +4 -0
  31. package/index.d.ts.map +1 -1
  32. package/index.js +1119 -881
  33. package/index.js.map +1 -1
  34. package/package.json +1 -1
  35. package/.DS_Store +0 -0
  36. package/CapCalendarDatePicker/assets/icons/chevron-left.svg +0 -20
  37. package/CapCalendarDatePicker/assets/icons/chevron-right.svg +0 -18
@@ -0,0 +1,11 @@
1
+ # CapMultiSelectDatePicker
2
+
3
+ A custom date picker component that allows users to select multiple days of the month (1-31) and optionally the last day of the month. This component renders a table-based calendar interface for day selection.
4
+
5
+ ## Migration from Class Component to Functional Component
6
+
7
+ This component has been migrated from a class component to a functional component with TypeScript support and CSS Modules.
8
+
9
+ ### Breaking Changes
10
+
11
+ None - The component maintains full backward compatibility with the previous API.
@@ -0,0 +1,13 @@
1
+ /**
2
+ *
3
+ * CapMultiSelectDatePicker
4
+ *
5
+ */
6
+ import React from 'react';
7
+ import type { CapMultiSelectDatePickerProps } from './types';
8
+ declare const _default: React.FC<import("react-intl").WithIntlProps<CapMultiSelectDatePickerProps>> & {
9
+ WrappedComponent: React.ComponentType<CapMultiSelectDatePickerProps>;
10
+ };
11
+ export default _default;
12
+ export type { CapMultiSelectDatePickerProps } from './types';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapMultiSelectDatePicker/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;;;;AAiF7D,wBAAoD;AACpD,YAAY,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC"}
@@ -9,14 +9,14 @@ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(31601);
9
9
  var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(76314);
10
10
  var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
11
11
  // Module
12
- ___CSS_LOADER_EXPORT___.push([module.id, `.multi-select-date-container{padding:1.714rem;width:274px;height:208px;border-radius:.285rem;border:solid 1px #dfe2e7;background-color:#fff}.multi-select-date-container .date-content{width:100%;height:100%;font-size:.857rem;font-weight:normal;line-height:normal;text-align:center;color:#091e42}.multi-select-date-container .date-content th{width:32px;height:32px;font-weight:inherit}.multi-select-date-container .date-content th.selected,.multi-select-date-container .date-content th.custom-selected{background-color:#2466ea;color:#fff;border-radius:50%}.multi-select-date-container .date-content th.custom-selected{border-radius:15%/50%}.multi-select-date-container .date-content tr th:not(:first-child):not(:last-child){padding-left:2px}.multi-select-date-container .date-content .custom-txt{color:#2466ea;font-weight:500;font-size:1rem;padding-left:.571rem;text-align:left;width:32px}`, ""]);
12
+ ___CSS_LOADER_EXPORT___.push([module.id, `.multiSelectDateContainer{padding:1.714rem;width:19.571rem;height:14.857rem;border-radius:.285rem;border:solid 1px #dfe2e7;background-color:#fff}.dateContent{width:100%;height:100%;font-size:.857rem;font-weight:normal;line-height:normal;text-align:center;color:#091e42;border-collapse:collapse;cursor:pointer}.dateContent th{width:2.285rem;height:2.285rem;font-weight:inherit}.dateContent tr th:not(:first-child):not(:last-child){padding-left:.142rem}.selected{background-color:#2466ea;color:#fff;border-radius:50%}.customSelected{background-color:#2466ea;color:#fff !important;border-radius:15%/50%}.customTxt{color:#2466ea;font-weight:500;font-size:1rem;width:2.285rem}`, ""]);
13
13
  // Exports
14
14
  ___CSS_LOADER_EXPORT___.locals = {
15
- "multi-select-date-container": `multi-select-date-container`,
16
- "date-content": `date-content`,
15
+ "multiSelectDateContainer": `multiSelectDateContainer`,
16
+ "dateContent": `dateContent`,
17
17
  "selected": `selected`,
18
- "custom-selected": `custom-selected`,
19
- "custom-txt": `custom-txt`
18
+ "customSelected": `customSelected`,
19
+ "customTxt": `customTxt`
20
20
  };
21
21
  module.exports = ___CSS_LOADER_EXPORT___;
22
22
 
@@ -48,6 +48,25 @@ module.exports = insertStyleElement;
48
48
 
49
49
  /***/ }),
50
50
 
51
+ /***/ 20606:
52
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
53
+
54
+ "use strict";
55
+
56
+
57
+ exports.__esModule = true;
58
+ exports.scope = exports["default"] = void 0;
59
+ var _reactIntl = __webpack_require__(46407);
60
+ const scope = exports.scope = 'app.commonUtils.capUiLibrary.CapMultiSelectDatePicker';
61
+ var _default = exports["default"] = (0, _reactIntl.defineMessages)({
62
+ lastDayText: {
63
+ id: scope + ".lastDayText",
64
+ defaultMessage: 'Last day of month'
65
+ }
66
+ });
67
+
68
+ /***/ }),
69
+
51
70
  /***/ 21020:
52
71
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
53
72
 
@@ -129,61 +148,6 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
129
148
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()) && (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) ? (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) : undefined);
130
149
 
131
150
 
132
- /***/ }),
133
-
134
- /***/ 39879:
135
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
136
-
137
- "use strict";
138
-
139
-
140
- exports.__esModule = true;
141
- exports["default"] = void 0;
142
- var _react = _interopRequireWildcard(__webpack_require__(9206));
143
- var _reactIntl = __webpack_require__(46407);
144
- var _en = _interopRequireDefault(__webpack_require__(49540));
145
- var _jsxRuntime = __webpack_require__(74848);
146
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
147
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
148
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
149
- const prefix = "app.commonUtils.capUiLibrary";
150
- const LocaleHoc = (WrapperComponent, customProps) => {
151
- const Wrapper = props => {
152
- const componentName = customProps.key;
153
- const translatedDefaults = _en.default[componentName];
154
- const {
155
- intl
156
- } = props;
157
- const translatedProps = (0, _react.useMemo)(() => {
158
- if (!translatedDefaults) return {};
159
- return Object.keys(translatedDefaults).reduce((acc, key) => {
160
- const id = prefix + "." + componentName + "." + key;
161
- const defaultMessage = translatedDefaults[key];
162
- try {
163
- acc[key] = intl.formatMessage({
164
- id,
165
- defaultMessage
166
- });
167
- } catch (_err) {
168
- acc[key] = defaultMessage;
169
- }
170
- return acc;
171
- }, {});
172
- }, [translatedDefaults, intl, prefix, componentName]);
173
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(WrapperComponent, _extends({}, translatedProps, props));
174
- };
175
- return (0, _reactIntl.injectIntl)(Wrapper);
176
- };
177
- var _default = exports["default"] = LocaleHoc;
178
-
179
- /***/ }),
180
-
181
- /***/ 43363:
182
- /***/ ((module) => {
183
-
184
- "use strict";
185
- module.exports = require("prop-types");
186
-
187
151
  /***/ }),
188
152
 
189
153
  /***/ 46407:
@@ -276,381 +240,6 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
276
240
  }());
277
241
 
278
242
 
279
- /***/ }),
280
-
281
- /***/ 49540:
282
- /***/ ((__unused_webpack_module, exports) => {
283
-
284
- "use strict";
285
-
286
-
287
- exports.__esModule = true;
288
- exports["default"] = void 0;
289
- var _default = exports["default"] = {
290
- CapMultiSelect: {
291
- noResultsFoundText: 'No results found',
292
- selectText: 'Select',
293
- closeText: 'Close',
294
- searchPlaceholder: 'Search',
295
- selectedText: 'selected',
296
- selectAllText: 'Select all',
297
- selectAllSearchResultsText: 'Select all searched results',
298
- moreText: 'more'
299
- },
300
- CapModal: {
301
- okText: 'Yes',
302
- closeText: 'No'
303
- },
304
- CapMultiSelectWithTree: {
305
- noResultsFoundText: 'No results found',
306
- selectText: 'Select',
307
- closeText: 'Close',
308
- searchPlaceholder: 'Search',
309
- selectedText: 'selected',
310
- selectAllText: 'Select all',
311
- selectAllSearchResultsText: 'Select all searched results',
312
- moreText: 'more',
313
- storeUploadsText: 'Store IDs are uploaded already'
314
- },
315
- CapCustomSelect: {
316
- searchPlaceholder: 'Search',
317
- selectPlaceholder: 'Select Option'
318
- },
319
- CapMultiSelectDatePicker: {
320
- lastDayText: 'Last day of month'
321
- },
322
- CapTable: {
323
- loadMoreData: 'Loading more data...'
324
- },
325
- CapIllustration: {
326
- accessForbiddenMsg: 'Action cannot be performed due to insufficient permission'
327
- },
328
- CapNavigation: {
329
- businessProcesses: 'Workbench',
330
- wecrm: 'Wecrm',
331
- loyaltyProgram: 'Loyalty+',
332
- storePerformance: 'Store Performance',
333
- memberCare: 'Member Care',
334
- storeCare: 'Store Care',
335
- insights: 'Insights+',
336
- connectPlus: 'Connect+',
337
- settingsLabel: 'Settings',
338
- campaign: 'Engage+',
339
- selectOrganization: 'Select Organization',
340
- organization: 'Organization',
341
- noResultText: 'No results found',
342
- selectProduct: 'Select Product'
343
- },
344
- InfoNote: {
345
- noteText: 'Note'
346
- },
347
- SomethingWentWrong: {
348
- title: 'Sorry, something went wrong.',
349
- description: 'Please try again. If this issue occurs again, please reach out to Capillary support team.',
350
- reloadText: 'Try refreshing again'
351
- },
352
- CapBlock: {
353
- deleteBlockMsg: 'Delete',
354
- expandBlockMsg: 'Expand',
355
- collapseBlockMsg: 'Collapse'
356
- },
357
- CapMultiplePath: {
358
- notUniqueMsg: 'Not Unique',
359
- deleteConfirmationTitleMsg: 'Confirm delete path',
360
- deleteConfirmationTextMsg: 'Are you sure you wish to delete path',
361
- deleteConfirmationWarningMsg: 'This action cannot be undone.',
362
- deleteButtonTextMsg: 'Yes, Delete',
363
- yesMsg: 'Yes',
364
- noMsg: 'No',
365
- pathMsg: 'Path',
366
- addPathMessage: 'Add Path'
367
- },
368
- CapCondition: {
369
- includeMsg: 'include',
370
- excludeMsg: 'exclude',
371
- equalMsg: 'equal to',
372
- greaterThanMsg: 'greater than',
373
- lessThanMsg: 'less than',
374
- greaterThanOrEqualMsg: 'greater than or equal to',
375
- lessThanorEqualMsg: 'less than or equal',
376
- inRangeMsg: 'in range',
377
- notEqualMsg: 'not equal to',
378
- whoseMsg: 'Whose',
379
- isMsg: 'is',
380
- andMsg: 'and',
381
- ANDMsg: 'AND',
382
- containsMsg: 'contains',
383
- startsWithMsg: 'starts with',
384
- endsWithMsg: 'ends with',
385
- exactMsg: 'exact',
386
- conditionStringInputPlaceholderMsg: 'Enter min. 3 characters',
387
- lineItemMsg: 'only for lineitems with',
388
- withMsg: 'with',
389
- additionalFieldsMsg: 'Additional condition',
390
- plusMinus: '+/-',
391
- inMsg: 'in',
392
- notInMsg: 'not in',
393
- uploadFailedError: 'Upload failed',
394
- uploadLimitExceeded: 'Please do not upload more than 1000 store codes',
395
- uploadReqLoader: 'Uploading stores',
396
- or: 'OR',
397
- search: 'Search',
398
- searchWithExact: 'Search with exact keyword',
399
- customFieldsTag: 'custom fields',
400
- storeSearchMsg: 'Enter min. 3 characters to search',
401
- uploadInProgressMsg: 'Upload in progress',
402
- unsupportedCsvHeaderMsg: "The CSV header must be 'Store code' or 'Store id'",
403
- csvFileNoEntryTxt: 'Please upload a file with atleast one entry',
404
- downloadedMsg: 'downloaded',
405
- reuploadFileMsg: 'Reupload file',
406
- storeIdsMsg: 'Store IDs',
407
- downloadStoreIdMsg: 'Download Store ID',
408
- downloadStoreIdCodeNameMsg: 'Download Store ID, code & name',
409
- downloadInProgressMsg: 'Download in progress, might take a while',
410
- onMsg: 'on',
411
- beforeMsg: 'before',
412
- afterMsg: 'after',
413
- xDaysBeforeMsg: 'x days before',
414
- xDaysAfterMsg: 'x days after',
415
- betweenMsg: 'between',
416
- specificDateLabel: 'specific date',
417
- eventDateAttributeLabel: 'Event date attribute',
418
- entryTriggerLabel: 'Entry trigger',
419
- waitTillEventLabel: 'Wait till event',
420
- andLabel: 'and',
421
- beforeLabel: 'before',
422
- afterLabel: 'after',
423
- daysSuffix: 'days',
424
- loadingTip: 'Loading...',
425
- specificDateToolTip: "Specific date cannot be selected for 'x days before/after'"
426
- },
427
- CapConditionPreview: {
428
- includeMsg: 'Include',
429
- excludeMsg: 'Exclude',
430
- equalMsg: 'equal to',
431
- greaterThanMsg: 'greater than',
432
- lessThanMsg: 'less than',
433
- greaterThanOrEqualMsg: 'greater than or equal to',
434
- lessThanorEqualMsg: 'less than or equal',
435
- inRangeMsg: 'in range',
436
- notEqualMsg: 'not equal to',
437
- whoseMsg: 'whose',
438
- isMsg: 'is',
439
- andMsg: 'and',
440
- ANDMsg: 'AND',
441
- lineItemMsg: 'only for lineitems with',
442
- withMsg: 'with',
443
- addedSKUsMsg: 'Added SKUs',
444
- skuFileName: 'SKU.csv',
445
- uploadedMsg: 'uploaded',
446
- inMsg: 'in',
447
- notInMsg: 'not in',
448
- storesMsg: 'Stores',
449
- viewMoreMsg: 'View more',
450
- uploadInProgressMsg: 'Upload in progress',
451
- uploadFailedErrorMsg: 'Upload failed',
452
- uploadInvalidErrorMsg: 'Invalid file uploaded'
453
- },
454
- CapPopoverTree: {
455
- emptyDataMessage: 'No data found',
456
- searchPlaceholder: 'Search'
457
- },
458
- CapGraphBlockNode: {
459
- configureText: 'Configure',
460
- replaceEngagementBlockMsg: 'Replace engagement block'
461
- },
462
- CapStaticTemplates: {
463
- strategyTitleMsg: 'Select the strategy',
464
- strategyDescriptionMsg: 'Use strategy driven pre-defined marketing use-cases or build your own strategy',
465
- comingSoonMsg: 'Coming soon',
466
- blankCategoryLabel: 'Custom',
467
- blankTemplateLabel: 'Build from scratch',
468
- blankTemplateDescription: 'Create your own journey from scratch',
469
- searchPlaceholderMsg: 'Search strategy'
470
- },
471
- CapProductSelection: {
472
- lineItem: 'Line items',
473
- selectAttribute: 'Select Attribute',
474
- brand: 'Brand',
475
- brandInfo: 'Brand',
476
- category: 'Category',
477
- categoryInfo: 'Category',
478
- product: 'Product',
479
- productInfo: 'Product',
480
- SKU: 'SKU',
481
- uploadSKU: 'Upload SKU',
482
- uploadSKUInfo: 'Upload SKU',
483
- changeSelection: 'Change the selection',
484
- description: 'Changing the attribute of additional condition will result in lose of previously defined additional condition',
485
- okText: 'Yes, change',
486
- cancelText: 'Cancel',
487
- comingSoon: 'Coming soon',
488
- selectValues: 'Select value(s)',
489
- atleast1Attribute: 'At least 1 attribute is required'
490
- },
491
- CapTruncateList: {
492
- more: 'more'
493
- },
494
- CapSKUUploader: {
495
- validatingSKUs: 'Validating SKUs',
496
- invalid: 'invalid',
497
- invalidSKUs: 'Invalid SKUs',
498
- valid: 'valid',
499
- addedSKUsMsg: 'Added SKUs',
500
- skuFileName: 'SKU.csv',
501
- invalidSKUFilename: 'invalidSKU.csv',
502
- uploadedMsg: 'uploaded'
503
- },
504
- CapDndGraph: {
505
- deleteBlockModalHeaderText: 'Delete block',
506
- deleteBlockModalDescriptionText: 'Are you sure you want to delete this block?',
507
- yesDeleteButtonText: 'Yes, delete',
508
- noButtonText: 'No',
509
- joinDropErrorText: 'Join block can only be added at the end of the path',
510
- jumpDropErrorText: 'Jump block can only be added at the end of the path',
511
- theText: 'The',
512
- endText: 'End',
513
- blockIsLinkedText: 'block is linked to the',
514
- blockText: 'block.',
515
- disconnectText: 'Deleting this block will disconnect the join.',
516
- areYouSureText: 'Are you sure?'
517
- },
518
- CapDragAndDrop: {
519
- dropboxtext: 'Drop here!',
520
- selectFilesText: 'Select files from your computer',
521
- invalidFileSelectionText: 'Invalid file selection!',
522
- or: 'OR',
523
- droptext: 'Drag and drop files'
524
- },
525
- CapRoadMap: {
526
- defaultRoadMapDisabledMessage: 'Not configured yet'
527
- },
528
- CapTimelineCard: {
529
- defaultConfiguringMessage: 'Configuring...',
530
- defaultNotConfiguredMessage: 'Not configured yet...',
531
- toConfigure: 'To configure ',
532
- completePrevSteps: ' complete the previous steps.'
533
- },
534
- CapTimelineNestedCard: {
535
- defaultConfiguringMessage: 'Configuring...',
536
- defaultNotConfiguredMessage: 'Not configured yet...',
537
- toConfigure: 'To configure ',
538
- completePrevSteps: ' complete the previous steps.'
539
- },
540
- NestedCardParent: {
541
- defaultNestedTitle: 'Triggers',
542
- toConfigure: 'To configure ',
543
- completePrevSteps: ' complete the previous steps.'
544
- },
545
- 'CapAskAira.DocumentationBot': {
546
- textAskYourQuestion: 'Ask your question here',
547
- textVisitDocs: 'Visit Capillary Documentation',
548
- textNeedHelp: 'Need more help?',
549
- textHowMayIHelp: 'How may AI help you?',
550
- textAira: 'aiRA Documentation Bot',
551
- textLinks: 'Links',
552
- textWasHelpful: 'Was this response helpful?',
553
- textConfidence: 'confidence',
554
- textTooltip: 'Need help? Ask aiRA',
555
- textCantConnect: "Can't connect to the server."
556
- },
557
- 'CapAskAira.RuleGenerationBot': {
558
- textTypeAMessage: 'Type a message above and ask aiRA to recommend the best content',
559
- textError: 'An error occurred while generating rule. Try again.',
560
- textAiraTitle: 'aiRA Rule Generation',
561
- textAiraTooltip: 'aiRA, our proprietary AI tool, generates rule expressions based on text query.',
562
- textCopy: 'Copy',
563
- textCopied: 'Copied',
564
- textRulePlaceholder: 'Enter query...',
565
- textRuleLoading: 'Rule is loading... Hang tight!',
566
- textThank: 'Thank you for your response!',
567
- textWarn: 'aiRA responses may be inaccurate or misleading. Help us to improve!',
568
- textAddCommentPlaceholder: 'Add comment'
569
- },
570
- 'CapAskAira.ContentGenerationBot': {
571
- textTypeAMessage: 'Type a message above and ask aiRA to recommend the best content',
572
- textRecommendationsLoading: 'Recommendations loading... Hang tight!',
573
- textError: 'An error occurred while loading recommendations. Try again.',
574
- textAiraTitle: 'aiRA Content Recommendations',
575
- textAiraTooltip: 'aiRA, our proprietary AI tool, recommends tailored language to effectively engage customers and prompt desired actions.',
576
- textLoading: 'loading...',
577
- textCharacters: 'characters',
578
- textReplaceWithThis: 'Replace with this',
579
- textReplaced: 'Replaced',
580
- textResetToDefault: 'Reset to default',
581
- textMoreLikeThis: 'More like this',
582
- textGenerateMore: 'Generate more'
583
- },
584
- 'CapAskAira.ConfigurationBot': {
585
- textAiraTitle: 'aiRA Configuration Bot',
586
- textAiraTooltip: 'aiRA, our proprietary AI tool, helps you configure promotions, campaigns, and more.',
587
- textTypeAMessage: 'Type a message above and ask aiRA to recommend the best content',
588
- textUser: 'Hello!',
589
- textPilot: "I'm your Copilot. I can create all type of promotions (milestones, streaks, etc.) on your behalf. Meanwhile, you can sit back, relax, and enjoy a cup of chai.",
590
- textCouponTile: 'Milestone on GS',
591
- textCouponDescription: 'Customer has to do 1000/- gross sales in a month, and can get 100 points.',
592
- textPromotionTitle: 'Milestone on count',
593
- textPromotionDescription: 'Eligible customers get points on every 5 transactions.',
594
- textStreakTitle: 'Reward on referral',
595
- textStreakDescription: 'Award customer 150 points if they refer 3 users in a month. Promotion starts on July 1 and runs for 5 months.',
596
- textPromptHere: 'Enter a prompt here...',
597
- textCouponPrompt: 'If customer does 1000 gross sales in a month, award them 100 points that expire in 20 days. Promotion runs from 1 July to 1 December.',
598
- textPromotionPrompt: 'After every 5 transactions I want to award customer with 200 points. Only customers with more than 2000 lifetime points are eligible. Promotion runs from 1 July to 1 December',
599
- textStreakPrompt: 'Award customer 150 points if they refer 3 users in a month. Promotion starts on July 1 and runs for 5 months. ',
600
- textCantConnect: "Can't connect to the server.",
601
- textCreate: 'Create',
602
- textCancel: 'Cancel',
603
- textGeneratingResponse: 'Generating response'
604
- },
605
- 'CapAskAira.DocumentationChatBot': {
606
- textBotPlaceholder: 'Ask aiRA about anything on our CRM platform',
607
- textChatBotLoader: 'Hang tight, analyzing your query...',
608
- textChatBotDesc: 'Ask any doubts about our CRM platform and aiRA will do its best to find answers',
609
- textChatBot: 'Documentation Chat Bot'
610
- },
611
- 'CapAskAira.CapAiMediaGeneration': {
612
- textImageBotPlaceholder: 'Ask aiRA to generate an image',
613
- textChatBotLoader: 'Hang tight, analyzing your query...',
614
- textImageBotDesc: 'Enter a prompt that describes your image.',
615
- textImageBot: 'aiRA Media Generator',
616
- textImageFooter: 'Dragging and dropping generated images is only supported in the basic email builder.',
617
- textTipsGenerate: 'Tips to generate better images:',
618
- textCopy: 'Copy image',
619
- textCopied: 'Copied',
620
- textDownload: 'Download',
621
- textImageDownload: 'Image downloaded successfully!',
622
- textComingSoon: 'Coming soon',
623
- textGenerateMore: 'Generate more'
624
- },
625
- 'CapAskAira.RuleSummarizationBot': {
626
- textRuleBotPlaceholder: 'Ask aiRA to write an expression',
627
- textSummarizeBotPlaceholder: 'Ask aiRA to explain an expression',
628
- textRuleChatBotLoader: 'Hang tight, analyzing your query...',
629
- textRuleChatBotDesc: 'Write your detailed rule in simple english and aiRA will write the expression for you',
630
- textSummarizeChatBotDesc: 'Enter the expression and aiRA will generate a summary in plain english',
631
- textRuleChatBot: 'aiRA Expression Translator'
632
- },
633
- 'CapAskAira.AudienceFilterBot': {
634
- textNeedHelp: 'Need help choosing the right filters?',
635
- textAskAiraLink: 'Ask aiRA to apply filters',
636
- textDescribeAudience: 'Describe your audience',
637
- textPlaceholder: 'e.g.: Filter customers who have made a purchase in the last 7 days',
638
- textError: 'Something went wrong, please try again',
639
- textThoughtProcess: 'Thought Process',
640
- textFiltersAdded: 'Filters added below',
641
- textAnalyzing: 'Analyzing your query...',
642
- textPartialFiltersAdded: 'Rest of the filters added below',
643
- textFeedbackTitle: 'Give feedback',
644
- textFeedbackOptional: '(Optional)',
645
- textFeedbackMessage: 'Let us know what was wrong with the results',
646
- textFeedbackPlaceholder: 'Share your feedback',
647
- textFeedbackSubmit: 'Submit',
648
- textFeedbackCancel: 'Cancel',
649
- textThankYouFeedback: 'Thank you for your feedback!',
650
- textThankYouDetailedFeedback: 'Thank you for your detailed feedback!'
651
- }
652
- };
653
-
654
243
  /***/ }),
655
244
 
656
245
  /***/ 55056:
@@ -1083,10 +672,11 @@ var exports = __webpack_exports__;
1083
672
 
1084
673
  exports.__esModule = true;
1085
674
  exports["default"] = void 0;
1086
- var _propTypes = _interopRequireDefault(__webpack_require__(43363));
675
+ var _classnames = _interopRequireDefault(__webpack_require__(46942));
1087
676
  var _react = _interopRequireDefault(__webpack_require__(9206));
1088
- var _LocaleHoc = _interopRequireDefault(__webpack_require__(39879));
1089
- __webpack_require__(35032);
677
+ var _reactIntl = __webpack_require__(46407);
678
+ var _messages = _interopRequireDefault(__webpack_require__(20606));
679
+ var _styles = _interopRequireDefault(__webpack_require__(35032));
1090
680
  var _jsxRuntime = __webpack_require__(74848);
1091
681
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1092
682
  /**
@@ -1095,80 +685,67 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
1095
685
  *
1096
686
  */
1097
687
 
1098
- const classNames = __webpack_require__(46942);
1099
- class CapMultiSelectDatePicker extends _react.default.Component {
1100
- constructor() {
1101
- super(...arguments);
1102
- this.getNumberOfDays = () => {
1103
- const noOfDays = [];
1104
- for (let i = 1; i <= 31; i++) {
1105
- noOfDays.push(i);
1106
- }
1107
- return noOfDays;
1108
- };
1109
- this.getNumberOfWeeks = () => {
1110
- const noOfWeeks = [];
1111
- for (let i = 1; i <= 5; i++) {
1112
- noOfWeeks.push(i);
1113
- }
1114
- return noOfWeeks;
1115
- };
1116
- this.renderLastDayOption = selectedDays => {
1117
- const {
1118
- lastDayText = '',
1119
- onClick
1120
- } = this.props;
1121
- const lastDayValue = -1;
1122
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("th", {
1123
- colSpan: "4",
1124
- className: classNames({
1125
- 'custom-selected': selectedDays.indexOf(lastDayValue) !== -1
1126
- }, 'custom-txt'),
1127
- onClick: () => onClick(lastDayValue),
1128
- children: lastDayText
1129
- }, lastDayValue);
1130
- };
1131
- }
1132
- render() {
1133
- const noOfDays = this.getNumberOfDays();
1134
- const noOfWeeks = this.getNumberOfWeeks();
1135
- const {
1136
- showLastDay,
1137
- onClick,
1138
- selected,
1139
- defaultValue
1140
- } = this.props;
1141
- const selectedDays = selected || defaultValue;
1142
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1143
- className: "multi-select-date-container",
1144
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("table", {
1145
- className: "date-content",
1146
- children: noOfWeeks.map((_w, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("tr", {
1147
- children: [noOfDays.splice(0, 7).map(day => /*#__PURE__*/(0, _jsxRuntime.jsx)("th", {
1148
- className: classNames({
1149
- selected: selectedDays.indexOf(day) !== -1
688
+ const renderLastDayOption = (selectedDays, lastDayText, onClick) => {
689
+ const lastDayValue = -1;
690
+ const isSelected = selectedDays.indexOf(lastDayValue) !== -1;
691
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("th", {
692
+ colSpan: 4,
693
+ className: (0, _classnames.default)(_styles.default.customTxt, {
694
+ [_styles.default.customSelected]: isSelected
695
+ }),
696
+ onClick: () => onClick == null ? void 0 : onClick(lastDayValue),
697
+ children: lastDayText
698
+ }, lastDayValue);
699
+ };
700
+ const CapMultiSelectDatePicker = _ref => {
701
+ let {
702
+ selected = [],
703
+ defaultValue,
704
+ showLastDay = false,
705
+ lastDayText,
706
+ onClick,
707
+ intl: {
708
+ formatMessage
709
+ }
710
+ } = _ref;
711
+ const getNumberOfDays = () => {
712
+ const noOfDays = [];
713
+ for (let i = 1; i <= 31; i++) {
714
+ noOfDays.push(i);
715
+ }
716
+ return noOfDays;
717
+ };
718
+ const getNumberOfWeeks = () => {
719
+ const noOfWeeks = [];
720
+ for (let i = 1; i <= 5; i++) {
721
+ noOfWeeks.push(i);
722
+ }
723
+ return noOfWeeks;
724
+ };
725
+ const noOfDays = getNumberOfDays();
726
+ const noOfWeeks = getNumberOfWeeks();
727
+ const selectedDays = selected || defaultValue || [];
728
+ const finalLastDayText = lastDayText || formatMessage(_messages.default.lastDayText);
729
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
730
+ className: _styles.default.multiSelectDateContainer,
731
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("table", {
732
+ className: _styles.default.dateContent,
733
+ children: noOfWeeks.map((_w, index) => {
734
+ const weekDays = noOfDays.slice(index * 7, (index + 1) * 7);
735
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("tr", {
736
+ children: [weekDays.map(day => /*#__PURE__*/(0, _jsxRuntime.jsx)("th", {
737
+ className: (0, _classnames.default)({
738
+ [_styles.default.selected]: selectedDays.indexOf(day) !== -1
1150
739
  }),
1151
- onClick: () => onClick(day),
740
+ onClick: () => onClick == null ? void 0 : onClick(day),
1152
741
  children: day
1153
- }, day)), index === noOfWeeks.length - 1 && showLastDay ? this.renderLastDayOption(selectedDays) : null]
1154
- }, "week-" + index))
742
+ }, day)), index === noOfWeeks.length - 1 && showLastDay ? renderLastDayOption(selectedDays, finalLastDayText, onClick) : null]
743
+ }, "week-" + index);
1155
744
  })
1156
- });
1157
- }
1158
- }
1159
- CapMultiSelectDatePicker.propTypes = {
1160
- selected: _propTypes.default.array,
1161
- defaultValue: _propTypes.default.array,
1162
- showLastDay: _propTypes.default.bool,
1163
- lastDayText: _propTypes.default.string,
1164
- onClick: _propTypes.default.func
1165
- };
1166
- CapMultiSelectDatePicker.defaultProps = {
1167
- selected: []
745
+ })
746
+ });
1168
747
  };
1169
- var _default = exports["default"] = (0, _LocaleHoc.default)(CapMultiSelectDatePicker, {
1170
- key: 'CapMultiSelectDatePicker'
1171
- });
748
+ var _default = exports["default"] = (0, _reactIntl.injectIntl)(CapMultiSelectDatePicker);
1172
749
  })();
1173
750
 
1174
751
  module.exports = __webpack_exports__;