PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.3.48
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.3.48
1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 All 180 releases
disco / backend / views / components / Main / utilities / utils-for-tests.jsx

utils-for-tests.jsx in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.3.48, at backend/views/components/Main/utilities/utils-for-tests.jsx

1,358 lines 28.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { configureStore } from '@reduxjs/toolkit';
2 import { render } from '@testing-library/react';
3 import { Provider } from 'react-redux';
4 import { HashRouter } from 'react-router';
5 import { apiSlice } from '../features/api/apiSlice';
6 import discountReducer from '../features/discount/discountSlice';
7 import interactionReducer from '../features/interaction/interactionSlice';
8 import campaignReducer from './../features/campaigns/campaignSlice';
9
10 export function renderWithProviders(
11 ui,
12 {
13 preloadedState = {},
14 store = configureStore({
15 reducer: {
16 [apiSlice.reducerPath]: apiSlice.reducer,
17 discount: discountReducer,
18 interaction: interactionReducer,
19 campaignState: campaignReducer,
20 },
21 preloadedState,
22 middleware: (getDefaultMiddleware) =>
23 getDefaultMiddleware().concat(apiSlice.middleware),
24 }),
25 ...renderOptions
26 } = {}
27 ) {
28 function Wrapper({ children }) {
29 return (
30 <Provider store={store}>
31 <HashRouter basename="/">{children}</HashRouter>
32 </Provider>
33 );
34 }
35
36 return { store, ...render(ui, { wrapper: Wrapper, ...renderOptions }) };
37 }
38
39 export const testCampaigns = [
40 {
41 id: '408',
42 name: '50% Off',
43 priority: 1,
44 status: '1',
45 discount_intent: 'Product',
46 products: ['all'],
47 conditions: [],
48 discount_rules: [
49 {
50 id: '83fd0cd4-0783-466a-82ec-9aafbc8581d3',
51 min: '',
52 max: '',
53 get_quantity: '',
54 get_ids: [],
55 discount_type: 'percent',
56 discount_value: '50',
57 discount_label: '',
58 recursive: 'no',
59 },
60 ],
61 created_by: 1,
62 created_date: '2023-11-01T05:05:26+00:00',
63 modified_by: 1,
64 modified_date: '2023-11-01T05:05:26+00:00',
65 discount_valid_from: '2023-11-01T05:05:00+00:00',
66 discount_valid_to: '2023-11-10T05:05:00+00:00',
67 discount_method: 'automated',
68 discount_coupon: '',
69 discount_max_user: '0',
70 discount_based_on: 'item_quantity',
71 bogo_type: 'all',
72 ui: [0, 0],
73 _links: {
74 self: [
75 {
76 href: 'http://localhost/quasar/wp-json/disco/v1/campaigns/408',
77 },
78 ],
79 collection: [
80 {
81 href: 'http://localhost/quasar/wp-json/disco/v1/campaigns',
82 },
83 ],
84 },
85 },
86 {
87 id: '409',
88 name: 'Winter Sale',
89 priority: 2,
90 status: '1',
91 discount_intent: 'Product',
92 products: ['all'],
93 conditions: [],
94 discount_rules: [
95 {
96 id: '83fd0cd4-0783-466a-82ec-9aafbc8581d3',
97 min: '',
98 max: '',
99 get_quantity: '',
100 get_ids: [],
101 discount_type: 'fixed',
102 discount_value: '100',
103 discount_label: '',
104 recursive: 'no',
105 },
106 ],
107 created_by: 1,
108 created_date: '2023-11-01T05:05:56+00:00',
109 modified_by: 1,
110 modified_date: '2023-11-01T05:05:56+00:00',
111 discount_valid_from: '2023-11-01T05:05:00+00:00',
112 discount_valid_to: '2023-11-30T05:05:00+00:00',
113 discount_method: 'automated',
114 discount_coupon: '',
115 discount_max_user: '500',
116 discount_based_on: 'item_quantity',
117 bogo_type: 'all',
118 ui: [0, 0],
119 _links: {
120 self: [
121 {
122 href: 'http://localhost/quasar/wp-json/disco/v1/campaigns/409',
123 },
124 ],
125 collection: [
126 {
127 href: 'http://localhost/quasar/wp-json/disco/v1/campaigns',
128 },
129 ],
130 },
131 },
132 ];
133
134 export const filters = {
135 name: 'filters',
136 values: [
137 {
138 optionGroup: 'Product / Cart Item',
139 options: {
140 id: {
141 title: 'ID',
142 component: 'string',
143 condition: {
144 in_list: 'In List',
145 not_in_list: 'Not In List',
146 contain: 'Contain',
147 not_contain: 'Does Not Contain',
148 equal: 'Equal',
149 not_equal: 'Not Equal',
150 },
151 compare: 'text',
152 fields: {
153 filter: '',
154 condition: '',
155 compare: '',
156 quantity: 1,
157 },
158 },
159 parent_id: {
160 title: 'Parent Id',
161 component: 'string',
162 condition: {
163 in_list: 'In List',
164 not_in_list: 'Not In List',
165 contain: 'Contain',
166 not_contain: 'Does Not Contain',
167 equal: 'Equal',
168 not_equal: 'Not Equal',
169 },
170 compare: 'text',
171 fields: {
172 filter: '',
173 condition: '',
174 compare: '',
175 },
176 },
177 sku: {
178 title: 'SKU',
179 component: 'string',
180 condition: {
181 in_list: 'In List',
182 not_in_list: 'Not In List',
183 contain: 'Contain',
184 not_contain: 'Does Not Contain',
185 equal: 'Equal',
186 not_equal: 'Not Equal',
187 },
188 compare: 'text',
189 fields: {
190 filter: '',
191 condition: '',
192 compare: '',
193 },
194 },
195 parent_sku: {
196 title: 'Parent SKU',
197 component: 'string',
198 condition: {
199 in_list: 'In List',
200 not_in_list: 'Not In List',
201 contain: 'Contain',
202 not_contain: 'Does Not Contain',
203 equal: 'Equal',
204 not_equal: 'Not Equal',
205 },
206 compare: 'text',
207 fields: {
208 filter: '',
209 condition: '',
210 compare: '',
211 },
212 },
213 title: {
214 title: 'Title',
215 component: 'string',
216 condition: {
217 in_list: 'In List',
218 not_in_list: 'Not In List',
219 contain: 'Contain',
220 not_contain: 'Does Not Contain',
221 equal: 'Equal',
222 not_equal: 'Not Equal',
223 },
224 compare: 'text',
225 fields: {
226 filter: '',
227 condition: '',
228 compare: '',
229 },
230 },
231 parent_title: {
232 title: 'Parent Title',
233 component: 'string',
234 condition: {
235 in_list: 'In List',
236 not_in_list: 'Not In List',
237 contain: 'Contain',
238 not_contain: 'Does Not Contain',
239 equal: 'Equal',
240 not_equal: 'Not Equal',
241 },
242 compare: 'text',
243 fields: {
244 filter: '',
245 condition: '',
246 compare: '',
247 },
248 },
249 description: {
250 title: 'Description',
251 component: 'string',
252 condition: {
253 in_list: 'In List',
254 not_in_list: 'Not In List',
255 contain: 'Contain',
256 not_contain: 'Does Not Contain',
257 equal: 'Equal',
258 not_equal: 'Not Equal',
259 },
260 compare: 'text',
261 fields: {
262 filter: '',
263 condition: '',
264 compare: '',
265 },
266 },
267 short_description: {
268 title: 'Short Description',
269 component: 'string',
270 condition: {
271 in_list: 'In List',
272 not_in_list: 'Not In List',
273 contain: 'Contain',
274 not_contain: 'Does Not Contain',
275 equal: 'Equal',
276 not_equal: 'Not Equal',
277 },
278 compare: 'text',
279 fields: {
280 filter: '',
281 condition: '',
282 compare: '',
283 },
284 },
285 attribute: {
286 title: 'Attributes',
287 component: 'string',
288 condition: {
289 in_list: 'In List',
290 not_in_list: 'Not In List',
291 contain: 'Contain',
292 not_contain: 'Does Not Contain',
293 equal: 'Equal',
294 not_equal: 'Not Equal',
295 },
296 compare: 'text',
297 fields: {
298 filter: '',
299 condition: '',
300 compare: '',
301 },
302 },
303 category: {
304 title: 'Categories',
305 component: 'string',
306 condition: {
307 in_list: 'In List',
308 not_in_list: 'Not In List',
309 contain: 'Contain',
310 not_contain: 'Does Not Contain',
311 equal: 'Equal',
312 not_equal: 'Not Equal',
313 },
314 compare: 'text',
315 fields: {
316 filter: '',
317 condition: '',
318 compare: '',
319 },
320 },
321 tags: {
322 title: 'Tags',
323 component: 'string',
324 condition: {
325 in_list: 'In List',
326 not_in_list: 'Not In List',
327 contain: 'Contain',
328 not_contain: 'Does Not Contain',
329 equal: 'Equal',
330 not_equal: 'Not Equal',
331 },
332 compare: 'text',
333 fields: {
334 filter: '',
335 condition: '',
336 compare: '',
337 },
338 },
339 link: {
340 title: 'URL',
341 component: 'string',
342 condition: {
343 in_list: 'In List',
344 not_in_list: 'Not In List',
345 contain: 'Contain',
346 not_contain: 'Does Not Contain',
347 equal: 'Equal',
348 not_equal: 'Not Equal',
349 },
350 compare: 'text',
351 fields: {
352 filter: '',
353 condition: '',
354 compare: '',
355 },
356 },
357 add_to_cart_link: {
358 title: 'Add to Cart URL',
359 component: 'string',
360 condition: {
361 in_list: 'In List',
362 not_in_list: 'Not In List',
363 contain: 'Contain',
364 not_contain: 'Does Not Contain',
365 equal: 'Equal',
366 not_equal: 'Not Equal',
367 },
368 compare: 'text',
369 fields: {
370 filter: '',
371 condition: '',
372 compare: '',
373 },
374 },
375 availability: {
376 title: 'Availability',
377 component: 'string',
378 condition: {
379 in_list: 'In List',
380 not_in_list: 'Not In List',
381 contain: 'Contain',
382 not_contain: 'Does Not Contain',
383 equal: 'Equal',
384 not_equal: 'Not Equal',
385 },
386 compare: 'text',
387 fields: {
388 filter: '',
389 condition: '',
390 compare: '',
391 },
392 },
393 quantity: {
394 title: 'Quantity',
395 component: 'string',
396 condition: {
397 in_list: 'In List',
398 not_in_list: 'Not In List',
399 contain: 'Contain',
400 not_contain: 'Does Not Contain',
401 equal: 'Equal',
402 not_equal: 'Not Equal',
403 },
404 compare: 'text',
405 fields: {
406 filter: '',
407 condition: '',
408 compare: '',
409 },
410 },
411 weight: {
412 title: 'Weight',
413 component: 'string',
414 condition: {
415 in_list: 'In List',
416 not_in_list: 'Not In List',
417 contain: 'Contain',
418 not_contain: 'Does Not Contain',
419 equal: 'Equal',
420 not_equal: 'Not Equal',
421 },
422 compare: 'text',
423 fields: {
424 filter: '',
425 condition: '',
426 compare: '',
427 },
428 },
429 weight_unit: {
430 title: 'Weight Unit',
431 component: 'string',
432 condition: {
433 in_list: 'In List',
434 not_in_list: 'Not In List',
435 contain: 'Contain',
436 not_contain: 'Does Not Contain',
437 equal: 'Equal',
438 not_equal: 'Not Equal',
439 },
440 compare: 'text',
441 fields: {
442 filter: '',
443 condition: '',
444 compare: '',
445 },
446 },
447 width: {
448 title: 'Width',
449 component: 'string',
450 condition: {
451 in_list: 'In List',
452 not_in_list: 'Not In List',
453 contain: 'Contain',
454 not_contain: 'Does Not Contain',
455 equal: 'Equal',
456 not_equal: 'Not Equal',
457 },
458 compare: 'text',
459 fields: {
460 filter: '',
461 condition: '',
462 compare: '',
463 },
464 },
465 height: {
466 title: 'Height',
467 component: 'string',
468 condition: {
469 in_list: 'In List',
470 not_in_list: 'Not In List',
471 contain: 'Contain',
472 not_contain: 'Does Not Contain',
473 equal: 'Equal',
474 not_equal: 'Not Equal',
475 },
476 compare: 'text',
477 fields: {
478 filter: '',
479 condition: '',
480 compare: '',
481 },
482 },
483 length: {
484 title: 'Length',
485 component: 'string',
486 condition: {
487 in_list: 'In List',
488 not_in_list: 'Not In List',
489 contain: 'Contain',
490 not_contain: 'Does Not Contain',
491 equal: 'Equal',
492 not_equal: 'Not Equal',
493 },
494 compare: 'text',
495 fields: {
496 filter: '',
497 condition: '',
498 compare: '',
499 },
500 },
501 type: {
502 title: 'Product Type',
503 component: 'string',
504 condition: {
505 in_list: 'In List',
506 not_in_list: 'Not In List',
507 contain: 'Contain',
508 not_contain: 'Does Not Contain',
509 equal: 'Equal',
510 not_equal: 'Not Equal',
511 },
512 compare: 'text',
513 fields: {
514 filter: '',
515 condition: '',
516 compare: '',
517 },
518 },
519 visibility: {
520 title: 'Visibility',
521 component: 'string',
522 condition: {
523 in_list: 'In List',
524 not_in_list: 'Not In List',
525 contain: 'Contain',
526 not_contain: 'Does Not Contain',
527 equal: 'Equal',
528 not_equal: 'Not Equal',
529 },
530 compare: 'text',
531 fields: {
532 filter: '',
533 condition: '',
534 compare: '',
535 },
536 },
537 rating_total: {
538 title: 'Total Rating',
539 component: 'string',
540 condition: {
541 in_list: 'In List',
542 not_in_list: 'Not In List',
543 contain: 'Contain',
544 not_contain: 'Does Not Contain',
545 equal: 'Equal',
546 not_equal: 'Not Equal',
547 },
548 compare: 'text',
549 fields: {
550 filter: '',
551 condition: '',
552 compare: '',
553 },
554 },
555 rating_average: {
556 title: 'Average Rating',
557 component: 'string',
558 condition: {
559 in_list: 'In List',
560 not_in_list: 'Not In List',
561 contain: 'Contain',
562 not_contain: 'Does Not Contain',
563 equal: 'Equal',
564 not_equal: 'Not Equal',
565 },
566 compare: 'text',
567 fields: {
568 filter: '',
569 condition: '',
570 compare: '',
571 },
572 },
573 author_name: {
574 title: 'Author Name',
575 component: 'string',
576 condition: {
577 in_list: 'In List',
578 not_in_list: 'Not In List',
579 contain: 'Contain',
580 not_contain: 'Does Not Contain',
581 equal: 'Equal',
582 not_equal: 'Not Equal',
583 },
584 compare: 'text',
585 fields: {
586 filter: '',
587 condition: '',
588 compare: '',
589 },
590 },
591 author_email: {
592 title: 'Author Email',
593 component: 'string',
594 condition: {
595 in_list: 'In List',
596 not_in_list: 'Not In List',
597 contain: 'Contain',
598 not_contain: 'Does Not Contain',
599 equal: 'Equal',
600 not_equal: 'Not Equal',
601 },
602 compare: 'text',
603 fields: {
604 filter: '',
605 condition: '',
606 compare: '',
607 },
608 },
609 date_created: {
610 title: 'Date Created',
611 component: 'string',
612 condition: {
613 in_list: 'In List',
614 not_in_list: 'Not In List',
615 contain: 'Contain',
616 not_contain: 'Does Not Contain',
617 equal: 'Equal',
618 not_equal: 'Not Equal',
619 },
620 compare: 'text',
621 fields: {
622 filter: '',
623 condition: '',
624 compare: '',
625 },
626 },
627 date_updated: {
628 title: 'Date Updated',
629 component: 'string',
630 condition: {
631 in_list: 'In List',
632 not_in_list: 'Not In List',
633 contain: 'Contain',
634 not_contain: 'Does Not Contain',
635 equal: 'Equal',
636 not_equal: 'Not Equal',
637 },
638 compare: 'text',
639 fields: {
640 filter: '',
641 condition: '',
642 compare: '',
643 },
644 },
645 product_status: {
646 title: 'Status',
647 component: 'string',
648 condition: {
649 in_list: 'In List',
650 not_in_list: 'Not In List',
651 contain: 'Contain',
652 not_contain: 'Does Not Contain',
653 equal: 'Equal',
654 not_equal: 'Not Equal',
655 },
656 compare: 'text',
657 fields: {
658 filter: '',
659 condition: '',
660 compare: '',
661 },
662 },
663 featured_status: {
664 title: 'Featured Status',
665 component: 'string',
666 condition: {
667 in_list: 'In List',
668 not_in_list: 'Not In List',
669 contain: 'Contain',
670 not_contain: 'Does Not Contain',
671 equal: 'Equal',
672 not_equal: 'Not Equal',
673 },
674 compare: 'text',
675 fields: {
676 filter: '',
677 condition: '',
678 compare: '',
679 },
680 },
681 },
682 },
683 {
684 optionGroup: 'Price',
685 options: {
686 currency: {
687 title: 'Currency',
688 component: 'string',
689 condition: {
690 in_list: 'In List',
691 not_in_list: 'Not In List',
692 contain: 'Contain',
693 not_contain: 'Does Not Contain',
694 equal: 'Equal',
695 not_equal: 'Not Equal',
696 },
697 compare: 'text',
698 fields: {
699 filter: '',
700 condition: '',
701 compare: '',
702 },
703 },
704 regular_price: {
705 title: 'Regular Price',
706 component: 'string',
707 condition: {
708 in_list: 'In List',
709 not_in_list: 'Not In List',
710 contain: 'Contain',
711 not_contain: 'Does Not Contain',
712 equal: 'Equal',
713 not_equal: 'Not Equal',
714 },
715 compare: 'text',
716 fields: {
717 filter: '',
718 condition: '',
719 compare: '',
720 },
721 },
722 price: {
723 title: 'Price',
724 component: 'string',
725 condition: {
726 in_list: 'In List',
727 not_in_list: 'Not In List',
728 contain: 'Contain',
729 not_contain: 'Does Not Contain',
730 equal: 'Equal',
731 not_equal: 'Not Equal',
732 },
733 compare: 'text',
734 fields: {
735 filter: '',
736 condition: '',
737 compare: '',
738 },
739 },
740 sale_price: {
741 title: 'Sale Price',
742 component: 'string',
743 condition: {
744 in_list: 'In List',
745 not_in_list: 'Not In List',
746 contain: 'Contain',
747 not_contain: 'Does Not Contain',
748 equal: 'Equal',
749 not_equal: 'Not Equal',
750 },
751 compare: 'text',
752 fields: {
753 filter: '',
754 condition: '',
755 compare: '',
756 },
757 },
758 regular_price_with_tax: {
759 title: 'Regular Price With Tax',
760 component: 'string',
761 condition: {
762 in_list: 'In List',
763 not_in_list: 'Not In List',
764 contain: 'Contain',
765 not_contain: 'Does Not Contain',
766 equal: 'Equal',
767 not_equal: 'Not Equal',
768 },
769 compare: 'text',
770 fields: {
771 filter: '',
772 condition: '',
773 compare: '',
774 },
775 },
776 price_with_tax: {
777 title: 'Price With Tax',
778 component: 'string',
779 condition: {
780 in_list: 'In List',
781 not_in_list: 'Not In List',
782 contain: 'Contain',
783 not_contain: 'Does Not Contain',
784 equal: 'Equal',
785 not_equal: 'Not Equal',
786 },
787 compare: 'text',
788 fields: {
789 filter: '',
790 condition: '',
791 compare: '',
792 },
793 },
794 sale_price_with_tax: {
795 title: 'Sale Price With Tax',
796 component: 'string',
797 condition: {
798 in_list: 'In List',
799 not_in_list: 'Not In List',
800 contain: 'Contain',
801 not_contain: 'Does Not Contain',
802 equal: 'Equal',
803 not_equal: 'Not Equal',
804 },
805 compare: 'text',
806 fields: {
807 filter: '',
808 condition: '',
809 compare: '',
810 },
811 },
812 sale_price_sdate: {
813 title: 'Sale Start Date',
814 component: 'string',
815 condition: {
816 in_list: 'In List',
817 not_in_list: 'Not In List',
818 contain: 'Contain',
819 not_contain: 'Does Not Contain',
820 equal: 'Equal',
821 not_equal: 'Not Equal',
822 },
823 compare: 'text',
824 fields: {
825 filter: '',
826 condition: '',
827 compare: '',
828 },
829 },
830 sale_price_edate: {
831 title: 'Sale End Date',
832 component: 'string',
833 condition: {
834 in_list: 'In List',
835 not_in_list: 'Not In List',
836 contain: 'Contain',
837 not_contain: 'Does Not Contain',
838 equal: 'Equal',
839 not_equal: 'Not Equal',
840 },
841 compare: 'text',
842 fields: {
843 filter: '',
844 condition: '',
845 compare: '',
846 },
847 },
848 },
849 },
850 {
851 optionGroup: 'Cart',
852 options: {
853 line_items_count: {
854 title: 'Cart Items Count',
855 component: 'string',
856 condition: {
857 in_list: 'In List',
858 not_in_list: 'Not In List',
859 contain: 'Contain',
860 not_contain: 'Does Not Contain',
861 equal: 'Equal',
862 not_equal: 'Not Equal',
863 },
864 compare: 'text',
865 fields: {
866 filter: '',
867 condition: '',
868 compare: '',
869 },
870 },
871 cart_items_quantity: {
872 title: 'Cart Items Quantity',
873 component: 'string',
874 condition: {
875 in_list: 'In List',
876 not_in_list: 'Not In List',
877 contain: 'Contain',
878 not_contain: 'Does Not Contain',
879 equal: 'Equal',
880 not_equal: 'Not Equal',
881 },
882 compare: 'text',
883 fields: {
884 filter: '',
885 condition: '',
886 compare: '',
887 },
888 },
889 cart_total_weight: {
890 title: 'Cart Items Total Weight',
891 component: 'string',
892 condition: {
893 in_list: 'In List',
894 not_in_list: 'Not In List',
895 contain: 'Contain',
896 not_contain: 'Does Not Contain',
897 equal: 'Equal',
898 not_equal: 'Not Equal',
899 },
900 compare: 'text',
901 fields: {
902 filter: '',
903 condition: '',
904 compare: '',
905 },
906 },
907 cart_subtotal: {
908 title: 'Cart Subtotal',
909 component: 'string',
910 condition: {
911 in_list: 'In List',
912 not_in_list: 'Not In List',
913 contain: 'Contain',
914 not_contain: 'Does Not Contain',
915 equal: 'Equal',
916 not_equal: 'Not Equal',
917 },
918 compare: 'text',
919 fields: {
920 filter: '',
921 condition: '',
922 compare: '',
923 },
924 },
925 cart_payment_method: {
926 title: 'Payment Method',
927 component: 'string',
928 condition: {
929 in_list: 'In List',
930 not_in_list: 'Not In List',
931 contain: 'Contain',
932 not_contain: 'Does Not Contain',
933 equal: 'Equal',
934 not_equal: 'Not Equal',
935 },
936 compare: 'text',
937 fields: {
938 filter: '',
939 condition: '',
940 compare: '',
941 },
942 },
943 cart_coupons: {
944 title: 'Cart Coupons',
945 component: 'string',
946 condition: {
947 in_list: 'In List',
948 not_in_list: 'Not In List',
949 contain: 'Contain',
950 not_contain: 'Does Not Contain',
951 equal: 'Equal',
952 not_equal: 'Not Equal',
953 },
954 compare: 'text',
955 fields: {
956 filter: '',
957 condition: '',
958 compare: '',
959 },
960 },
961 },
962 },
963 {
964 optionGroup: 'Product Purchase History',
965 options: {
966 product_history_last_order_date: {
967 title: 'Last Order Date',
968 component: 'string',
969 condition: {
970 in_list: 'In List',
971 not_in_list: 'Not In List',
972 contain: 'Contain',
973 not_contain: 'Does Not Contain',
974 equal: 'Equal',
975 not_equal: 'Not Equal',
976 },
977 compare: 'text',
978 fields: {
979 filter: '',
980 condition: '',
981 compare: '',
982 },
983 },
984 product_history_total_order_made: {
985 title: 'Number of Order Made with Following Products',
986 component: 'string',
987 condition: {
988 in_list: 'In List',
989 not_in_list: 'Not In List',
990 contain: 'Contain',
991 not_contain: 'Does Not Contain',
992 equal: 'Equal',
993 not_equal: 'Not Equal',
994 },
995 compare: 'text',
996 fields: {
997 filter: '',
998 condition: '',
999 compare: '',
1000 },
1001 },
1002 product_history_total_amount_sold: {
1003 title: 'Number of Amount Sold with Following Products',
1004 component: 'string',
1005 condition: {
1006 in_list: 'In List',
1007 not_in_list: 'Not In List',
1008 contain: 'Contain',
1009 not_contain: 'Does Not Contain',
1010 equal: 'Equal',
1011 not_equal: 'Not Equal',
1012 },
1013 compare: 'text',
1014 fields: {
1015 filter: '',
1016 condition: '',
1017 compare: '',
1018 },
1019 },
1020 product_history_total_quantity_sold: {
1021 title: 'Number of Quantities Sold with Following Products',
1022 component: 'string',
1023 condition: {
1024 in_list: 'In List',
1025 not_in_list: 'Not In List',
1026 contain: 'Contain',
1027 not_contain: 'Does Not Contain',
1028 equal: 'Equal',
1029 not_equal: 'Not Equal',
1030 },
1031 compare: 'text',
1032 fields: {
1033 filter: '',
1034 condition: '',
1035 compare: '',
1036 },
1037 },
1038 },
1039 },
1040 {
1041 optionGroup: 'Customer',
1042 options: {
1043 customer_email: {
1044 title: 'Email',
1045 component: 'string',
1046 condition: {
1047 in_list: 'In List',
1048 not_in_list: 'Not In List',
1049 contain: 'Contain',
1050 not_contain: 'Does Not Contain',
1051 equal: 'Equal',
1052 not_equal: 'Not Equal',
1053 },
1054 compare: 'text',
1055 fields: {
1056 filter: '',
1057 condition: '',
1058 compare: '',
1059 },
1060 },
1061 customer_user: {
1062 title: 'User',
1063 component: 'string',
1064 condition: {
1065 in_list: 'In List',
1066 not_in_list: 'Not In List',
1067 contain: 'Contain',
1068 not_contain: 'Does Not Contain',
1069 equal: 'Equal',
1070 not_equal: 'Not Equal',
1071 },
1072 compare: 'text',
1073 fields: {
1074 filter: '',
1075 condition: '',
1076 compare: '',
1077 },
1078 },
1079 customer_is_logged_in: {
1080 title: 'Is Logged In',
1081 component: 'string',
1082 condition: {
1083 in_list: 'In List',
1084 not_in_list: 'Not In List',
1085 contain: 'Contain',
1086 not_contain: 'Does Not Contain',
1087 equal: 'Equal',
1088 not_equal: 'Not Equal',
1089 },
1090 compare: 'text',
1091 fields: {
1092 filter: '',
1093 condition: '',
1094 compare: '',
1095 },
1096 },
1097 customer_user_role: {
1098 title: 'User Role',
1099 component: 'string',
1100 condition: {
1101 in_list: 'In List',
1102 not_in_list: 'Not In List',
1103 contain: 'Contain',
1104 not_contain: 'Does Not Contain',
1105 equal: 'Equal',
1106 not_equal: 'Not Equal',
1107 },
1108 compare: 'text',
1109 fields: {
1110 filter: '',
1111 condition: '',
1112 compare: '',
1113 },
1114 },
1115 customer_country: {
1116 title: 'Country',
1117 component: 'string',
1118 condition: {
1119 in_list: 'In List',
1120 not_in_list: 'Not In List',
1121 contain: 'Contain',
1122 not_contain: 'Does Not Contain',
1123 equal: 'Equal',
1124 not_equal: 'Not Equal',
1125 },
1126 compare: 'text',
1127 fields: {
1128 filter: '',
1129 condition: '',
1130 compare: '',
1131 },
1132 },
1133 customer_city: {
1134 title: 'City',
1135 component: 'string',
1136 condition: {
1137 in_list: 'In List',
1138 not_in_list: 'Not In List',
1139 contain: 'Contain',
1140 not_contain: 'Does Not Contain',
1141 equal: 'Equal',
1142 not_equal: 'Not Equal',
1143 },
1144 compare: 'text',
1145 fields: {
1146 filter: '',
1147 condition: '',
1148 compare: '',
1149 },
1150 },
1151 customer_state: {
1152 title: 'State',
1153 component: 'string',
1154 condition: {
1155 in_list: 'In List',
1156 not_in_list: 'Not In List',
1157 contain: 'Contain',
1158 not_contain: 'Does Not Contain',
1159 equal: 'Equal',
1160 not_equal: 'Not Equal',
1161 },
1162 compare: 'text',
1163 fields: {
1164 filter: '',
1165 condition: '',
1166 compare: '',
1167 },
1168 },
1169 customer_zip: {
1170 title: 'Zip',
1171 component: 'string',
1172 condition: {
1173 in_list: 'In List',
1174 not_in_list: 'Not In List',
1175 contain: 'Contain',
1176 not_contain: 'Does Not Contain',
1177 equal: 'Equal',
1178 not_equal: 'Not Equal',
1179 },
1180 compare: 'text',
1181 fields: {
1182 filter: '',
1183 condition: '',
1184 compare: '',
1185 },
1186 },
1187 },
1188 },
1189 {
1190 optionGroup: 'Customer Purchase History',
1191 options: {
1192 customer_history_first_order: {
1193 title: 'Is First Order',
1194 component: 'string',
1195 condition: {
1196 in_list: 'In List',
1197 not_in_list: 'Not In List',
1198 contain: 'Contain',
1199 not_contain: 'Does Not Contain',
1200 equal: 'Equal',
1201 not_equal: 'Not Equal',
1202 },
1203 compare: 'text',
1204 fields: {
1205 filter: '',
1206 condition: '',
1207 compare: '',
1208 },
1209 },
1210 customer_history_last_order_date: {
1211 title: 'Last Order Date',
1212 component: 'string',
1213 condition: {
1214 in_list: 'In List',
1215 not_in_list: 'Not In List',
1216 contain: 'Contain',
1217 not_contain: 'Does Not Contain',
1218 equal: 'Equal',
1219 not_equal: 'Not Equal',
1220 },
1221 compare: 'text',
1222 fields: {
1223 filter: '',
1224 condition: '',
1225 compare: '',
1226 },
1227 },
1228 customer_history_last_order_amount: {
1229 title: 'Last Order Amount',
1230 component: 'string',
1231 condition: {
1232 in_list: 'In List',
1233 not_in_list: 'Not In List',
1234 contain: 'Contain',
1235 not_contain: 'Does Not Contain',
1236 equal: 'Equal',
1237 not_equal: 'Not Equal',
1238 },
1239 compare: 'text',
1240 fields: {
1241 filter: '',
1242 condition: '',
1243 compare: '',
1244 },
1245 },
1246 customer_history_total_order_made: {
1247 title: 'Number of Order Made By Customer',
1248 component: 'string',
1249 condition: {
1250 in_list: 'In List',
1251 not_in_list: 'Not In List',
1252 contain: 'Contain',
1253 not_contain: 'Does Not Contain',
1254 equal: 'Equal',
1255 not_equal: 'Not Equal',
1256 },
1257 compare: 'text',
1258 fields: {
1259 filter: '',
1260 condition: '',
1261 compare: '',
1262 },
1263 },
1264 customer_history_total_amount_sold: {
1265 title: 'Number of Amount Spent By Customer',
1266 component: 'string',
1267 condition: {
1268 in_list: 'In List',
1269 not_in_list: 'Not In List',
1270 contain: 'Contain',
1271 not_contain: 'Does Not Contain',
1272 equal: 'Equal',
1273 not_equal: 'Not Equal',
1274 },
1275 compare: 'text',
1276 fields: {
1277 filter: '',
1278 condition: '',
1279 compare: '',
1280 },
1281 },
1282 customer_history_total_quantity_sold: {
1283 title: 'Number of Quantities Bought By Customer',
1284 component: 'string',
1285 condition: {
1286 in_list: 'In List',
1287 not_in_list: 'Not In List',
1288 contain: 'Contain',
1289 not_contain: 'Does Not Contain',
1290 equal: 'Equal',
1291 not_equal: 'Not Equal',
1292 },
1293 compare: 'text',
1294 fields: {
1295 filter: '',
1296 condition: '',
1297 compare: '',
1298 },
1299 },
1300 customer_history_total_order_made_by_ids: {
1301 title: 'Number of Order Made with Following Products',
1302 component: 'string',
1303 condition: {
1304 in_list: 'In List',
1305 not_in_list: 'Not In List',
1306 contain: 'Contain',
1307 not_contain: 'Does Not Contain',
1308 equal: 'Equal',
1309 not_equal: 'Not Equal',
1310 },
1311 compare: 'text',
1312 fields: {
1313 filter: '',
1314 condition: '',
1315 compare: '',
1316 },
1317 },
1318 customer_history_total_amount_sold_by_ids: {
1319 title: 'Number of Amount Sold with Following Products',
1320 component: 'string',
1321 condition: {
1322 in_list: 'In List',
1323 not_in_list: 'Not In List',
1324 contain: 'Contain',
1325 not_contain: 'Does Not Contain',
1326 equal: 'Equal',
1327 not_equal: 'Not Equal',
1328 },
1329 compare: 'text',
1330 fields: {
1331 filter: '',
1332 condition: '',
1333 compare: '',
1334 },
1335 },
1336 customer_history_total_quantity_sold_by_ids: {
1337 title: 'Number of Quantities Sold with Following Products',
1338 component: 'string',
1339 condition: {
1340 in_list: 'In List',
1341 not_in_list: 'Not In List',
1342 contain: 'Contain',
1343 not_contain: 'Does Not Contain',
1344 equal: 'Equal',
1345 not_equal: 'Not Equal',
1346 },
1347 compare: 'text',
1348 fields: {
1349 filter: '',
1350 condition: '',
1351 compare: '',
1352 },
1353 },
1354 },
1355 },
1356 ],
1357 };
1358