@antscorp/antsomi-ui 1.3.5-beta.376 → 1.3.5-beta.378

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.
@@ -1,5 +1,2 @@
1
- import { TFeatureMenu } from '@antscorp/antsomi-ui/es/models/LeftMenu';
2
1
  import { TMenuItem } from '../types';
3
- export declare const MENU_ITEMS: TMenuItem[];
4
- export declare const MENU_SAMPLE: TFeatureMenu[];
5
2
  export declare const CUSTOM_MENU_ITEMS: TMenuItem[];
@@ -1,988 +1,3 @@
1
- import { APP_KEYS } from './variables';
2
- export const MENU_ITEMS = [
3
- {
4
- key: APP_KEYS.HOME,
5
- label: 'Home',
6
- icon: 'icon-ants-caret-up',
7
- },
8
- {
9
- key: APP_KEYS.MARKETING,
10
- label: 'Engage',
11
- icon: 'icon-ants-caret-up',
12
- },
13
- {
14
- key: APP_KEYS.CONTENT,
15
- label: 'Content',
16
- icon: 'icon-ants-caret-up',
17
- },
18
- {
19
- key: APP_KEYS.TEMPLATES,
20
- label: 'Templates',
21
- icon: 'icon-ants-caret-up',
22
- },
23
- {
24
- key: APP_KEYS.PROFILES,
25
- label: 'Audiences',
26
- icon: 'icon-ants-caret-up',
27
- },
28
- {
29
- key: APP_KEYS.DATA,
30
- label: 'Data Hub',
31
- icon: 'icon-ants-caret-up',
32
- },
33
- {
34
- key: APP_KEYS.INSIGHTS,
35
- label: 'Insight',
36
- icon: 'icon-ants-caret-up',
37
- },
38
- {
39
- key: APP_KEYS.SETTINGS,
40
- label: 'Settings',
41
- icon: 'icon-ants-caret-up',
42
- },
43
- ];
44
- export const MENU_SAMPLE = [
45
- {
46
- menu_item: 1,
47
- network_id: 1,
48
- ctime: null,
49
- utime: null,
50
- menu_item_name: 'Home',
51
- level_position: 1,
52
- icon_name: 'icon-ants-home',
53
- menu_item_path: '/gen2/:networkId/dashboard',
54
- menu_item_code: 'HOME',
55
- permission_code: 'DASHBOARD',
56
- menu_item_type: 1,
57
- menu_item_parent: 0,
58
- render_option: null,
59
- menu_item_domain: null,
60
- total_row: 54,
61
- },
62
- {
63
- menu_item: 2,
64
- network_id: 1,
65
- ctime: null,
66
- utime: null,
67
- menu_item_name: 'Marketing',
68
- level_position: 2,
69
- icon_name: 'icon-ants-journey',
70
- menu_item_path: '/:user_id/marketing-hub/overviews',
71
- menu_item_code: 'MARKETING',
72
- permission_code: 'JOURNEY_OVERVIEW',
73
- menu_item_type: 1,
74
- menu_item_parent: 0,
75
- render_option: null,
76
- menu_item_domain: null,
77
- total_row: 54,
78
- children: [
79
- {
80
- menu_item: 9,
81
- network_id: 1,
82
- ctime: null,
83
- utime: null,
84
- menu_item_name: 'Overview',
85
- level_position: 1,
86
- icon_name: 'icon-ants-overview',
87
- menu_item_path: '/:user_id/marketing-hub/overviews',
88
- menu_item_code: 'JOURNEY_OVERVIEW',
89
- permission_code: 'JOURNEY_OVERVIEW',
90
- menu_item_type: 2,
91
- menu_item_parent: 2,
92
- render_option: null,
93
- menu_item_domain: null,
94
- total_row: 54,
95
- },
96
- {
97
- menu_item: 10,
98
- network_id: 1,
99
- ctime: null,
100
- utime: null,
101
- menu_item_name: 'All Channels',
102
- level_position: 2,
103
- icon_name: 'icon-ants-window',
104
- menu_item_path: null,
105
- menu_item_code: 'ALL_CHANNEL',
106
- permission_code: null,
107
- menu_item_type: 2,
108
- menu_item_parent: 2,
109
- render_option: null,
110
- menu_item_domain: null,
111
- total_row: 54,
112
- },
113
- {
114
- menu_item: '11',
115
- network_id: 1,
116
- ctime: null,
117
- utime: null,
118
- menu_item_name: 'Campaigns',
119
- level_position: '3',
120
- icon_name: 'icon-ants-campaign',
121
- menu_item_path: null,
122
- menu_item_code: 'CAMPAIGN',
123
- permission_code: null,
124
- menu_item_type: 2,
125
- menu_item_parent: 2,
126
- render_option: 'destination_channel',
127
- menu_item_domain: null,
128
- total_row: 54,
129
- },
130
- {
131
- menu_item: '12',
132
- network_id: 1,
133
- ctime: null,
134
- utime: null,
135
- menu_item_name: 'Orchestration',
136
- level_position: '4',
137
- icon_name: 'icon-ants-orchestration',
138
- menu_item_path: null,
139
- menu_item_code: 'ORCHESTRATION',
140
- permission_code: null,
141
- menu_item_type: 2,
142
- menu_item_parent: 2,
143
- render_option: null,
144
- menu_item_domain: null,
145
- total_row: 54,
146
- },
147
- ],
148
- },
149
- {
150
- menu_item: '3',
151
- network_id: 1,
152
- ctime: null,
153
- utime: null,
154
- menu_item_name: 'Content',
155
- level_position: '3',
156
- icon_name: 'icon-ants-page',
157
- menu_item_path: '/:user_id/marketing-hub/promotion-center',
158
- menu_item_code: 'PROMOTION_CENTER',
159
- permission_code: 'PROMOTION_CENTER',
160
- menu_item_type: 2,
161
- menu_item_parent: 0,
162
- render_option: null,
163
- menu_item_domain: null,
164
- total_row: 54,
165
- children: [
166
- {
167
- menu_item: '13',
168
- network_id: 1,
169
- ctime: null,
170
- utime: null,
171
- menu_item_name: 'Coupons',
172
- level_position: '5',
173
- icon_name: 'icon-ants-coupons',
174
- menu_item_path: '/:user_id/marketing-hub/promotion-center',
175
- menu_item_code: 'COUPON',
176
- permission_code: 'PROMOTION_CENTER_',
177
- menu_item_type: 2,
178
- menu_item_parent: '3',
179
- render_option: null,
180
- menu_item_domain: null,
181
- total_row: 54,
182
- },
183
- {
184
- menu_item: '14',
185
- network_id: 1,
186
- ctime: null,
187
- utime: null,
188
- menu_item_name: 'Short Links',
189
- level_position: '6',
190
- icon_name: 'icon-ants-short-link',
191
- menu_item_path: '/:user_id/marketing-hub/link-management',
192
- menu_item_code: 'SHORTLINK',
193
- permission_code: 'LINK_MANAGEMENT_',
194
- menu_item_type: 2,
195
- menu_item_parent: '3',
196
- render_option: null,
197
- menu_item_domain: null,
198
- total_row: 54,
199
- },
200
- ],
201
- },
202
- {
203
- menu_item: '4',
204
- network_id: 1,
205
- ctime: null,
206
- utime: null,
207
- menu_item_name: 'Templates',
208
- level_position: '4',
209
- icon_name: 'icon-ants-palette',
210
- menu_item_path: '#/:user_id/media-template',
211
- menu_item_code: 'TEMPLATE',
212
- permission_code: 'MEDIA_TEMPLATE',
213
- menu_item_type: 1,
214
- menu_item_parent: 0,
215
- render_option: null,
216
- menu_item_domain: null,
217
- total_row: 54,
218
- children: [
219
- {
220
- menu_item: '15',
221
- network_id: 1,
222
- ctime: null,
223
- utime: null,
224
- menu_item_name: 'Media',
225
- level_position: '7',
226
- icon_name: 'icon-ants-media-template',
227
- menu_item_path: '#/:user_id/media-template',
228
- menu_item_code: 'MEDIA',
229
- permission_code: 'MEDIA_TEMPLATE',
230
- menu_item_type: 2,
231
- menu_item_parent: '4',
232
- render_option: null,
233
- menu_item_domain: null,
234
- total_row: 54,
235
- },
236
- {
237
- menu_item: '16',
238
- network_id: 1,
239
- ctime: null,
240
- utime: null,
241
- menu_item_name: 'Email',
242
- level_position: '8',
243
- icon_name: 'icon-ants-email-solid',
244
- menu_item_path: '#/:user_id/email-template',
245
- menu_item_code: 'EMAIL',
246
- permission_code: 'EMAIL_TEMPLATE_NEW',
247
- menu_item_type: 2,
248
- menu_item_parent: '4',
249
- render_option: null,
250
- menu_item_domain: null,
251
- total_row: 54,
252
- },
253
- {
254
- menu_item: '17',
255
- network_id: 1,
256
- ctime: null,
257
- utime: null,
258
- menu_item_name: 'Tactics',
259
- level_position: 9,
260
- icon_name: 'icon-ants-tactic',
261
- menu_item_path: '/:user_id/marketing-hub/journey-tactic',
262
- menu_item_code: 'TACTIC',
263
- permission_code: 'JOURNEY_TACTIC',
264
- menu_item_type: 2,
265
- menu_item_parent: '4',
266
- render_option: null,
267
- menu_item_domain: null,
268
- total_row: 54,
269
- },
270
- ],
271
- },
272
- {
273
- menu_item: '5',
274
- network_id: 1,
275
- ctime: null,
276
- utime: null,
277
- menu_item_name: 'Profiles',
278
- level_position: '5',
279
- icon_name: 'icon-ants-profile',
280
- menu_item_path: '/profile/customers',
281
- menu_item_code: 'PROFILE',
282
- permission_code: 'CUSTOMER',
283
- menu_item_type: 1,
284
- menu_item_parent: 0,
285
- render_option: null,
286
- menu_item_domain: null,
287
- total_row: 54,
288
- children: [
289
- {
290
- menu_item: '18',
291
- network_id: 1,
292
- ctime: null,
293
- utime: null,
294
- menu_item_name: 'Customers',
295
- level_position: 10,
296
- icon_name: 'icon-ants-shopping-cart',
297
- menu_item_path: '/profile/customers',
298
- menu_item_code: 'CUSTOMER',
299
- permission_code: 'CUSTOMER',
300
- menu_item_type: 2,
301
- menu_item_parent: '5',
302
- render_option: null,
303
- menu_item_domain: null,
304
- total_row: 54,
305
- },
306
- {
307
- menu_item: '19',
308
- network_id: 1,
309
- ctime: null,
310
- utime: null,
311
- menu_item_name: 'Users',
312
- level_position: '11',
313
- icon_name: 'icon-ants-profile',
314
- menu_item_path: '/profile/visitors',
315
- menu_item_code: 'USER',
316
- permission_code: 'VISTITOR',
317
- menu_item_type: 2,
318
- menu_item_parent: '5',
319
- render_option: null,
320
- menu_item_domain: null,
321
- total_row: 54,
322
- },
323
- {
324
- menu_item: '20',
325
- network_id: 1,
326
- ctime: null,
327
- utime: null,
328
- menu_item_name: 'Segments',
329
- level_position: '12',
330
- icon_name: 'icon-ants-segment',
331
- menu_item_path: '/profile/segments',
332
- menu_item_code: 'SEGMENT',
333
- permission_code: 'SEGMENT',
334
- menu_item_type: 2,
335
- menu_item_parent: '5',
336
- render_option: null,
337
- menu_item_domain: null,
338
- total_row: 54,
339
- },
340
- {
341
- menu_item: '21',
342
- network_id: 1,
343
- ctime: null,
344
- utime: null,
345
- menu_item_name: 'Models',
346
- level_position: '13',
347
- icon_name: 'icon-ants-predictive-model',
348
- menu_item_path: '/profile/rfms',
349
- menu_item_code: 'MODEL',
350
- permission_code: 'RFM',
351
- menu_item_type: 2,
352
- menu_item_parent: '5',
353
- render_option: null,
354
- menu_item_domain: null,
355
- total_row: 54,
356
- },
357
- ],
358
- },
359
- {
360
- menu_item: '6',
361
- network_id: 1,
362
- ctime: null,
363
- utime: null,
364
- menu_item_name: 'Data',
365
- level_position: '6',
366
- icon_name: 'icon-ants-data',
367
- menu_item_path: '/api-hub/diagram',
368
- menu_item_code: 'DATA',
369
- permission_code: 'DATA_SCHEMA',
370
- menu_item_type: 1,
371
- menu_item_parent: 0,
372
- render_option: null,
373
- menu_item_domain: null,
374
- total_row: 54,
375
- children: [
376
- {
377
- menu_item: '22',
378
- network_id: 1,
379
- ctime: null,
380
- utime: null,
381
- menu_item_name: 'Data Schema',
382
- level_position: '14',
383
- icon_name: null,
384
- menu_item_path: '/api-hub/diagram',
385
- menu_item_code: 'DATA_SCHEMA',
386
- permission_code: 'DATA_SCHEMA',
387
- menu_item_type: 2,
388
- menu_item_parent: '6',
389
- render_option: null,
390
- menu_item_domain: null,
391
- total_row: 54,
392
- children: [
393
- {
394
- menu_item: '38',
395
- network_id: 1,
396
- ctime: null,
397
- utime: null,
398
- menu_item_name: 'Diagrams',
399
- level_position: 1,
400
- icon_name: 'icon-ants-diagram-outlined',
401
- menu_item_path: '/api-hub/diagram',
402
- menu_item_code: 'DIAGRAM',
403
- permission_code: 'DATA_SCHEMA',
404
- menu_item_type: 2,
405
- menu_item_parent: '22',
406
- render_option: null,
407
- menu_item_domain: null,
408
- total_row: 54,
409
- },
410
- {
411
- menu_item: '39',
412
- network_id: 1,
413
- ctime: null,
414
- utime: null,
415
- menu_item_name: 'Sources',
416
- level_position: 2,
417
- icon_name: 'icon-ants-short-link',
418
- menu_item_path: '/api-hub/event-sources/sources',
419
- menu_item_code: 'SOURCE',
420
- permission_code: 'EVENT_SOURCES',
421
- menu_item_type: 2,
422
- menu_item_parent: '22',
423
- render_option: null,
424
- menu_item_domain: null,
425
- total_row: 54,
426
- },
427
- {
428
- menu_item: '40',
429
- network_id: 1,
430
- ctime: null,
431
- utime: null,
432
- menu_item_name: 'Events',
433
- level_position: '3',
434
- icon_name: 'icon-ants-events',
435
- menu_item_path: '/api-hub/event-sources/events',
436
- menu_item_code: 'EVENT',
437
- permission_code: 'EVENT_SOURCES',
438
- menu_item_type: 2,
439
- menu_item_parent: '22',
440
- render_option: null,
441
- menu_item_domain: null,
442
- total_row: 54,
443
- },
444
- {
445
- menu_item: '41',
446
- network_id: 1,
447
- ctime: null,
448
- utime: null,
449
- menu_item_name: 'Data Objects',
450
- level_position: '4',
451
- icon_name: 'icon-ants-data-objects',
452
- menu_item_path: '/api-hub/objects/',
453
- menu_item_code: 'DATA_OBJECT',
454
- permission_code: 'DATA_OBJECT',
455
- menu_item_type: 2,
456
- menu_item_parent: '22',
457
- render_option: null,
458
- menu_item_domain: null,
459
- total_row: 54,
460
- },
461
- {
462
- menu_item: '42',
463
- network_id: 1,
464
- ctime: null,
465
- utime: null,
466
- menu_item_name: 'Conversion',
467
- level_position: '5',
468
- icon_name: 'icon-ants-conversion',
469
- menu_item_path: '/api-hub/event-sources/conversion',
470
- menu_item_code: 'CONVERSION',
471
- permission_code: 'EVENT_SOURCES',
472
- menu_item_type: 2,
473
- menu_item_parent: '22',
474
- render_option: null,
475
- menu_item_domain: null,
476
- total_row: 54,
477
- },
478
- {
479
- menu_item: '43',
480
- network_id: 1,
481
- ctime: null,
482
- utime: null,
483
- menu_item_name: 'Data Views',
484
- level_position: '6',
485
- icon_name: 'icon-ants-visibility',
486
- menu_item_path: '/api-hub/objects/data-view',
487
- menu_item_code: 'DATA_VIEW',
488
- permission_code: 'DATA_VIEW',
489
- menu_item_type: 2,
490
- menu_item_parent: '22',
491
- render_option: null,
492
- menu_item_domain: null,
493
- total_row: 54,
494
- },
495
- {
496
- menu_item: '44',
497
- network_id: 1,
498
- ctime: null,
499
- utime: null,
500
- menu_item_name: 'Event Attributes',
501
- level_position: '7',
502
- icon_name: 'icon-ants-event-attributes',
503
- menu_item_path: '/api-hub/event-sources/event-attributes',
504
- menu_item_code: 'EVENT_ATTRIBUTE',
505
- permission_code: 'EVENT_SOURCES',
506
- menu_item_type: 2,
507
- menu_item_parent: '22',
508
- render_option: null,
509
- menu_item_domain: null,
510
- total_row: 54,
511
- },
512
- {
513
- menu_item: '45',
514
- network_id: 1,
515
- ctime: null,
516
- utime: null,
517
- menu_item_name: 'Analytic Models',
518
- level_position: '8',
519
- icon_name: 'icon-ants-analytic-models',
520
- menu_item_path: '/api-hub/analytics-models',
521
- menu_item_code: 'ANALYTIC_MODEL',
522
- permission_code: 'ANALYTICS_MODELS',
523
- menu_item_type: 2,
524
- menu_item_parent: '22',
525
- render_option: null,
526
- menu_item_domain: null,
527
- total_row: 54,
528
- },
529
- ],
530
- },
531
- {
532
- menu_item: '23',
533
- network_id: 1,
534
- ctime: null,
535
- utime: null,
536
- menu_item_name: 'Dataflows',
537
- level_position: '15',
538
- icon_name: null,
539
- menu_item_path: '#/:user_id/dataflow',
540
- menu_item_code: 'DATAFLOW',
541
- permission_code: 'DATAFLOWS',
542
- menu_item_type: 2,
543
- menu_item_parent: '6',
544
- render_option: null,
545
- menu_item_domain: null,
546
- total_row: 54,
547
- children: [
548
- {
549
- menu_item: '46',
550
- network_id: 1,
551
- ctime: null,
552
- utime: null,
553
- menu_item_name: 'Batch Stream',
554
- level_position: 1,
555
- icon_name: 'icon-ants-batch-streaming',
556
- menu_item_path: '#/:user_id/dataflow',
557
- menu_item_code: 'BATCH_STREAM',
558
- permission_code: 'BATCH_STREAMING',
559
- menu_item_type: 2,
560
- menu_item_parent: '23',
561
- render_option: null,
562
- menu_item_domain: null,
563
- total_row: 54,
564
- },
565
- {
566
- menu_item: '47',
567
- network_id: 1,
568
- ctime: null,
569
- utime: null,
570
- menu_item_name: 'Realtime Stream',
571
- level_position: 2,
572
- icon_name: 'icon-ants-realtime-streaming',
573
- menu_item_path: '#/:user_id/dataflow/realtime',
574
- menu_item_code: 'REALTIME_STREAM',
575
- permission_code: 'REALTIME_STREAMING',
576
- menu_item_type: 2,
577
- menu_item_parent: '23',
578
- render_option: null,
579
- menu_item_domain: null,
580
- total_row: 54,
581
- },
582
- {
583
- menu_item: '48',
584
- network_id: 1,
585
- ctime: null,
586
- utime: null,
587
- menu_item_name: 'Sources',
588
- level_position: '3',
589
- icon_name: 'icon-ants-data',
590
- menu_item_path: '/datasource#/:user_id/report/datasources',
591
- menu_item_code: 'DF_DATA_SOURCE',
592
- permission_code: 'DATASOURCES',
593
- menu_item_type: 2,
594
- menu_item_parent: '23',
595
- render_option: null,
596
- menu_item_domain: null,
597
- total_row: 54,
598
- },
599
- {
600
- menu_item: '49',
601
- network_id: 1,
602
- ctime: null,
603
- utime: null,
604
- menu_item_name: 'Destinations',
605
- level_position: '4',
606
- icon_name: 'icon-ants-destinations',
607
- menu_item_path: '#/:user_id/dataflow/destination',
608
- menu_item_code: 'DESTINATION',
609
- permission_code: 'DESTINATION_CHANNEL',
610
- menu_item_type: 2,
611
- menu_item_parent: '23',
612
- render_option: null,
613
- menu_item_domain: null,
614
- total_row: 54,
615
- },
616
- ],
617
- },
618
- {
619
- menu_item: '24',
620
- network_id: 1,
621
- ctime: null,
622
- utime: null,
623
- menu_item_name: 'Connectors',
624
- level_position: '16',
625
- icon_name: null,
626
- menu_item_path: '/datasource#/:user_id/report/datasources',
627
- menu_item_code: 'CONNECTOR',
628
- permission_code: 'DATASOURCES',
629
- menu_item_type: '3',
630
- menu_item_parent: '6',
631
- render_option: null,
632
- menu_item_domain: null,
633
- total_row: 54,
634
- },
635
- {
636
- menu_item: '25',
637
- network_id: 1,
638
- ctime: null,
639
- utime: null,
640
- menu_item_name: 'Histories',
641
- level_position: '17',
642
- icon_name: null,
643
- menu_item_path: '/api-hub/import-history',
644
- menu_item_code: 'HISTORY',
645
- permission_code: 'BUSINESS_OBJECT',
646
- menu_item_type: 2,
647
- menu_item_parent: '6',
648
- render_option: null,
649
- menu_item_domain: null,
650
- total_row: 54,
651
- children: [
652
- {
653
- menu_item: '50',
654
- network_id: 1,
655
- ctime: null,
656
- utime: null,
657
- menu_item_name: 'Upload',
658
- level_position: '5',
659
- icon_name: 'icon-ants-file-upload',
660
- menu_item_path: '/api-hub/import-history',
661
- menu_item_code: 'UPLOAD',
662
- permission_code: 'BUSINESS_OBJECT',
663
- menu_item_type: 2,
664
- menu_item_parent: '25',
665
- render_option: null,
666
- menu_item_domain: null,
667
- total_row: 54,
668
- },
669
- {
670
- menu_item: '51',
671
- network_id: 1,
672
- ctime: null,
673
- utime: null,
674
- menu_item_name: 'Export',
675
- level_position: '6',
676
- icon_name: 'icon-ants-file-download',
677
- menu_item_path: '/api-hub/export-history',
678
- menu_item_code: 'EXPORT',
679
- permission_code: 'BUSINESS_OBJECT',
680
- menu_item_type: 2,
681
- menu_item_parent: '25',
682
- render_option: null,
683
- menu_item_domain: null,
684
- total_row: 54,
685
- },
686
- ],
687
- },
688
- ],
689
- },
690
- {
691
- menu_item: '7',
692
- network_id: 1,
693
- ctime: null,
694
- utime: null,
695
- menu_item_name: 'Insights',
696
- level_position: '7',
697
- icon_name: 'icon-ants-insert-chart',
698
- menu_item_path: '#/:user_id/analysis/sql-workspace',
699
- menu_item_code: 'INSIGHT',
700
- permission_code: 'SQL_WORKSPACE',
701
- menu_item_type: 1,
702
- menu_item_parent: 0,
703
- render_option: null,
704
- menu_item_domain: null,
705
- total_row: 54,
706
- children: [
707
- {
708
- menu_item: '26',
709
- network_id: 1,
710
- ctime: null,
711
- utime: null,
712
- menu_item_name: 'Analysis',
713
- level_position: '18',
714
- icon_name: null,
715
- menu_item_path: '#/:user_id/analysis/sql-workspace',
716
- menu_item_code: 'ANALYSIS',
717
- permission_code: 'SQL_WORKSPACE',
718
- menu_item_type: 2,
719
- menu_item_parent: '7',
720
- render_option: null,
721
- menu_item_domain: null,
722
- total_row: 54,
723
- children: [
724
- {
725
- menu_item: '52',
726
- network_id: 1,
727
- ctime: null,
728
- utime: null,
729
- menu_item_name: 'SQL Workspace',
730
- level_position: 1,
731
- icon_name: null,
732
- menu_item_path: '#/:user_id/analysis/sql-workspace',
733
- menu_item_code: 'SQL_WORKSPACE',
734
- permission_code: 'SQL_WORKSPACE',
735
- menu_item_type: 2,
736
- menu_item_parent: '26',
737
- render_option: null,
738
- menu_item_domain: null,
739
- total_row: 54,
740
- },
741
- {
742
- menu_item: '53',
743
- network_id: 1,
744
- ctime: null,
745
- utime: null,
746
- menu_item_name: 'Explore',
747
- level_position: 2,
748
- icon_name: null,
749
- menu_item_path: '#/:user_id/report/explorers',
750
- menu_item_code: 'EXPLORE',
751
- permission_code: 'EXPLORERS',
752
- menu_item_type: 2,
753
- menu_item_parent: '26',
754
- render_option: null,
755
- menu_item_domain: null,
756
- total_row: 54,
757
- },
758
- {
759
- menu_item: 54,
760
- network_id: 1,
761
- ctime: null,
762
- utime: null,
763
- menu_item_name: 'Schedule Query',
764
- level_position: '3',
765
- icon_name: null,
766
- menu_item_path: '#/:user_id/analysis/schedule/listing',
767
- menu_item_code: 'SCHEDULE_QUERY',
768
- permission_code: 'SCHEDULE_QUERY',
769
- menu_item_type: 2,
770
- menu_item_parent: '26',
771
- render_option: null,
772
- menu_item_domain: null,
773
- total_row: 54,
774
- },
775
- ],
776
- },
777
- {
778
- menu_item: '27',
779
- network_id: 1,
780
- ctime: null,
781
- utime: null,
782
- menu_item_name: 'Reports',
783
- level_position: '19',
784
- icon_name: null,
785
- menu_item_path: '#/:user_id/report/reports',
786
- menu_item_code: 'REPORT',
787
- permission_code: 'L_REPORTS',
788
- menu_item_type: 2,
789
- menu_item_parent: '7',
790
- render_option: null,
791
- menu_item_domain: null,
792
- total_row: 54,
793
- },
794
- {
795
- menu_item: '28',
796
- network_id: 1,
797
- ctime: null,
798
- utime: null,
799
- menu_item_name: 'Data Sources',
800
- level_position: '20',
801
- icon_name: null,
802
- menu_item_path: '#/:user_id/report/datasources',
803
- menu_item_code: 'DATA_SOURCE',
804
- permission_code: 'DATASOURCES',
805
- menu_item_type: 2,
806
- menu_item_parent: '7',
807
- render_option: null,
808
- menu_item_domain: null,
809
- total_row: 54,
810
- },
811
- {
812
- menu_item: '29',
813
- network_id: 1,
814
- ctime: null,
815
- utime: null,
816
- menu_item_name: 'Gallery',
817
- level_position: '21',
818
- icon_name: null,
819
- menu_item_path: '#/:user_id/report/gallery-template',
820
- menu_item_code: 'GALLERY',
821
- permission_code: 'GALLERY_TEMPLATE',
822
- menu_item_type: 2,
823
- menu_item_parent: '7',
824
- render_option: null,
825
- menu_item_domain: null,
826
- total_row: 54,
827
- },
828
- ],
829
- },
830
- {
831
- menu_item: '8',
832
- network_id: 1,
833
- ctime: null,
834
- utime: null,
835
- menu_item_name: 'Settings',
836
- level_position: '8',
837
- icon_name: 'icon-ants-settings-outlined',
838
- menu_item_path: '#/:user_id/permission/account',
839
- menu_item_code: 'SETTING',
840
- permission_code: 'PERMISSION_ACCOUNT',
841
- menu_item_type: 1,
842
- menu_item_parent: 0,
843
- render_option: null,
844
- menu_item_domain: null,
845
- total_row: 54,
846
- children: [
847
- {
848
- menu_item: '30',
849
- network_id: 1,
850
- ctime: null,
851
- utime: null,
852
- menu_item_name: 'Accounts',
853
- level_position: '22',
854
- icon_name: null,
855
- menu_item_path: '#/:user_id/permission/account',
856
- menu_item_code: 'ACCOUNT',
857
- permission_code: 'PERMISSION_ACCOUNT',
858
- menu_item_type: 2,
859
- menu_item_parent: '8',
860
- render_option: null,
861
- menu_item_domain: null,
862
- total_row: 54,
863
- },
864
- {
865
- menu_item: '31',
866
- network_id: 1,
867
- ctime: null,
868
- utime: null,
869
- menu_item_name: 'Roles',
870
- level_position: '23',
871
- icon_name: null,
872
- menu_item_path: '#/:user_id/permission/role',
873
- menu_item_code: 'ROLE',
874
- permission_code: 'PERMISSION_ROLE',
875
- menu_item_type: 2,
876
- menu_item_parent: '8',
877
- render_option: null,
878
- menu_item_domain: null,
879
- total_row: 54,
880
- },
881
- {
882
- menu_item: '32',
883
- network_id: 1,
884
- ctime: null,
885
- utime: null,
886
- menu_item_name: 'Data Protect',
887
- level_position: '24',
888
- icon_name: null,
889
- menu_item_path: '/settings/data-encrypt/permission',
890
- menu_item_code: 'DATA_PROTECT',
891
- permission_code: 'DATA_ENCRYPT',
892
- menu_item_type: 2,
893
- menu_item_parent: '8',
894
- render_option: null,
895
- menu_item_domain: null,
896
- total_row: 54,
897
- },
898
- {
899
- menu_item: '33',
900
- network_id: 1,
901
- ctime: null,
902
- utime: null,
903
- menu_item_name: 'General',
904
- level_position: '25',
905
- icon_name: null,
906
- menu_item_path: '/settings/portal-preferences',
907
- menu_item_code: 'GENERAL',
908
- permission_code: 'PORTAL_PERFERENCES',
909
- menu_item_type: 2,
910
- menu_item_parent: '8',
911
- render_option: null,
912
- menu_item_domain: null,
913
- total_row: 54,
914
- },
915
- {
916
- menu_item: '34',
917
- network_id: 1,
918
- ctime: null,
919
- utime: null,
920
- menu_item_name: 'Account Sharing',
921
- level_position: '26',
922
- icon_name: null,
923
- menu_item_path: '#/:user_id/share-access/account-sharing',
924
- menu_item_code: 'ACCOUNT_SHARING',
925
- permission_code: 'ACCOUNT_SHARING',
926
- menu_item_type: 2,
927
- menu_item_parent: '8',
928
- render_option: null,
929
- menu_item_domain: null,
930
- total_row: 54,
931
- },
932
- {
933
- menu_item: '35',
934
- network_id: 1,
935
- ctime: null,
936
- utime: null,
937
- menu_item_name: 'Menus',
938
- level_position: '27',
939
- icon_name: null,
940
- menu_item_path: '#/:user_id/permission/menu',
941
- menu_item_code: 'MENU',
942
- permission_code: 'PERMISSION_MENU',
943
- menu_item_type: 2,
944
- menu_item_parent: '8',
945
- render_option: null,
946
- menu_item_domain: null,
947
- total_row: 54,
948
- },
949
- {
950
- menu_item: '36',
951
- network_id: 1,
952
- ctime: null,
953
- utime: null,
954
- menu_item_name: 'Ticket',
955
- level_position: '28',
956
- icon_name: null,
957
- menu_item_path: '#/:user_id/tickets',
958
- menu_item_code: 'TICKET',
959
- permission_code: 'TICKET',
960
- menu_item_type: 2,
961
- menu_item_parent: '8',
962
- render_option: null,
963
- menu_item_domain: null,
964
- total_row: 54,
965
- },
966
- {
967
- menu_item: '37',
968
- network_id: 1,
969
- ctime: null,
970
- utime: null,
971
- menu_item_name: 'Channel Intergration',
972
- level_position: '29',
973
- icon_name: null,
974
- menu_item_path: '/:user_id/marketing-hub/destinations',
975
- menu_item_code: 'CHANNEL_INTEGRATION',
976
- permission_code: 'DESTINATIONS_HUB',
977
- menu_item_type: 2,
978
- menu_item_parent: '8',
979
- render_option: null,
980
- menu_item_domain: null,
981
- total_row: 54,
982
- },
983
- ],
984
- },
985
- ];
986
1
  export const CUSTOM_MENU_ITEMS = [
987
2
  {
988
3
  key: 'survey',
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { TServiceAuth } from '@antscorp/antsomi-ui/es/types';
2
+ import { ResponseListing, TServiceAuth } from '@antscorp/antsomi-ui/es/types';
3
3
  import { TCategoryItem, TCheckedCategories, TSelectTemplateAction, TTemplateItem } from '../types';
4
4
  import { TTemplateListingConfig } from '@antscorp/antsomi-ui/es/types/templateListing';
5
5
  import { TThumbnailCardId } from '../../../molecules/ThumbnailCard';
6
+ import { InfiniteData } from '@tanstack/react-query';
7
+ import { ObjectTemplate } from '@antscorp/antsomi-ui/es/models/ObjectTemplate';
6
8
  import { TemplateCategory } from '@antscorp/antsomi-ui/es/models/TemplateCategory';
7
9
  interface TemplateListingOptions {
8
10
  serviceAuth: TServiceAuth;
@@ -60,7 +62,7 @@ export declare const useTemplateListing: <T = undefined>(options: TemplateListin
60
62
  templateItems: (TTemplateItem | undefined)[];
61
63
  openCategoryKeys: string[];
62
64
  similarTemplates: (TTemplateItem | undefined)[];
63
- templateDetail: import("@antscorp/antsomi-ui/es/models/ObjectTemplate").ObjectTemplate | undefined;
65
+ templateDetail: ObjectTemplate | undefined;
64
66
  checkedCategories: TCheckedCategories;
65
67
  selectTemplateAction: string | T | undefined;
66
68
  previewTemplateCategories: TCategoryItem[];
@@ -68,8 +70,8 @@ export declare const useTemplateListing: <T = undefined>(options: TemplateListin
68
70
  isLoadingCategoryList: boolean;
69
71
  isLoadingTemplateList: boolean;
70
72
  isLoadingTemplateDetail: boolean;
71
- refetchCategoryList: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<TemplateCategory[], any>>;
72
- refetchTemplateList: <TPageData_1>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData_1>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@antscorp/antsomi-ui/es/types").ResponseListing<import("@antscorp/antsomi-ui/es/models/ObjectTemplate").ObjectTemplate>>, any>>;
73
+ refetchCategoryList: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<TemplateCategory[], any>>;
74
+ refetchTemplateList: <TPageData_1>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData_1>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<InfiniteData<ResponseListing<ObjectTemplate>>, any>>;
73
75
  onChangeCheckedCategories: (checkedCategories: TCheckedCategories) => void;
74
76
  onChangeOpenCategoryKeys: (openKeys: string[]) => void;
75
77
  onRemoveObjectTemplate: (id: TThumbnailCardId) => void;
@@ -3,12 +3,14 @@ import { useCallback, useMemo, useState } from 'react';
3
3
  import { App } from 'antd';
4
4
  import { isEmpty } from 'lodash';
5
5
  import { useGetTemplateCategoryList, useGetObjectTemplateList, useBulkUpdateTemplate, } from '@antscorp/antsomi-ui/es/queries/TemplateListing';
6
+ import { useQueryClient } from '@tanstack/react-query';
7
+ import { removeObjectTemplate } from '../utils';
6
8
  // Locales
7
9
  import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
8
10
  // Hooks
9
11
  import { useDeepCompareEffect, useDeepCompareMemo } from '@antscorp/antsomi-ui/es/hooks';
10
12
  // Constants
11
- import { CATEGORY_SPLIT_KEY, TEMPLATE_STATUS } from '@antscorp/antsomi-ui/es/constants';
13
+ import { CATEGORY_SPLIT_KEY, QUERY_KEYS, TEMPLATE_STATUS } from '@antscorp/antsomi-ui/es/constants';
12
14
  import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
13
15
  import { getShuffleArray, random } from '@antscorp/antsomi-ui/es/utils';
14
16
  /**
@@ -96,10 +98,22 @@ export const useTemplateListing = (options) => {
96
98
  auth: serviceAuth,
97
99
  params: getTemplateListParams,
98
100
  },
101
+ // options: {
102
+ // enabled: false,
103
+ // },
99
104
  });
105
+ // useDeepCompareEffect(() => {
106
+ // refetchTemplateList();
107
+ // }, [getTemplateListParams]);
108
+ const queryClient = useQueryClient();
100
109
  const { mutateAsync: bulkUpdateTemplate } = useBulkUpdateTemplate({
101
110
  options: {
102
- onSuccess: () => {
111
+ onSuccess: (data, variables) => {
112
+ const currentTemplateListCache = queryClient.getQueryData([QUERY_KEYS.GET_OBJECT_TEMPLATE_LIST, getTemplateListParams]);
113
+ if (currentTemplateListCache) {
114
+ const newTemplateList = removeObjectTemplate(currentTemplateListCache, variables.params.template_ids);
115
+ queryClient.setQueryData([QUERY_KEYS.GET_OBJECT_TEMPLATE_LIST, getTemplateListParams], newTemplateList);
116
+ }
103
117
  message.success(t(translations.templateListing.removeSuccess));
104
118
  },
105
119
  onError: () => {
@@ -0,0 +1,11 @@
1
+ import { ObjectTemplate } from '@antscorp/antsomi-ui/es/models/ObjectTemplate';
2
+ import { ResponseListing } from '@antscorp/antsomi-ui/es/types';
3
+ import { InfiniteData } from '@tanstack/react-query';
4
+ /**
5
+ * Removes template from the provided template list based on a list of IDs and updates the itemsPerPage meta value.
6
+ *
7
+ * @param {InfiniteData<ResponseListing<ObjectTemplate>>} templateList - The original template list containing pages of template.
8
+ * @param {number[]} templateIds - The list of entity IDs to be removed.
9
+ * @returns {InfiniteData<ResponseListing<ObjectTemplate>>} - The new template list with specified templates removed and meta.itemsPerPage updated.
10
+ */
11
+ export declare const removeObjectTemplate: (templateList: InfiniteData<ResponseListing<ObjectTemplate>>, templateIds: number[]) => InfiniteData<ResponseListing<ObjectTemplate>>;
@@ -0,0 +1,18 @@
1
+ import { cloneDeep } from 'lodash';
2
+ /**
3
+ * Removes template from the provided template list based on a list of IDs and updates the itemsPerPage meta value.
4
+ *
5
+ * @param {InfiniteData<ResponseListing<ObjectTemplate>>} templateList - The original template list containing pages of template.
6
+ * @param {number[]} templateIds - The list of entity IDs to be removed.
7
+ * @returns {InfiniteData<ResponseListing<ObjectTemplate>>} - The new template list with specified templates removed and meta.itemsPerPage updated.
8
+ */
9
+ export const removeObjectTemplate = (templateList, templateIds) => {
10
+ const newObject = cloneDeep(templateList);
11
+ newObject.pages = newObject.pages.map((page) => {
12
+ page.entities = page.entities.filter((entity) => !templateIds.includes(entity.id));
13
+ const finalCount = page.entities.length;
14
+ page.meta.itemsPerPage = finalCount;
15
+ return page;
16
+ });
17
+ return newObject;
18
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.376",
3
+ "version": "1.3.5-beta.378",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",