PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.0.3
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.0.3
1.4.18 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 All 181 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.0.3, at backend/views/components/Main/utilities/utils-for-tests.jsx

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