@itwin/grouping-mapping-widget 0.8.3 → 0.9.0

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 (45) hide show
  1. package/lib/cjs/test/GroupPropertyUtils.test.d.ts +2 -0
  2. package/lib/cjs/test/GroupPropertyUtils.test.js +590 -0
  3. package/lib/cjs/test/GroupPropertyUtils.test.js.map +1 -0
  4. package/lib/cjs/test/MockFactory.d.ts +9 -0
  5. package/lib/cjs/test/MockFactory.js +42 -0
  6. package/lib/cjs/test/MockFactory.js.map +1 -0
  7. package/lib/cjs/test/PropertyFieldsHelpers.d.ts +86 -0
  8. package/lib/cjs/test/PropertyFieldsHelpers.js +80 -0
  9. package/lib/cjs/test/PropertyFieldsHelpers.js.map +1 -0
  10. package/lib/cjs/test/QueryBuilder.test.js +43 -148
  11. package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
  12. package/lib/cjs/test/QueryBuilder.testdata.d.ts +3 -0
  13. package/lib/cjs/test/QueryBuilder.testdata.js +843 -0
  14. package/lib/cjs/test/QueryBuilder.testdata.js.map +1 -0
  15. package/lib/cjs/test/QueryBuilderTestData.d.ts +50 -0
  16. package/lib/cjs/test/QueryBuilderTestData.js +3 -0
  17. package/lib/cjs/test/QueryBuilderTestData.js.map +1 -0
  18. package/lib/cjs/widget/components/GroupPropertyUtils.js +7 -3
  19. package/lib/cjs/widget/components/GroupPropertyUtils.js.map +1 -1
  20. package/lib/cjs/widget/components/QueryBuilder.d.ts +11 -11
  21. package/lib/cjs/widget/components/QueryBuilder.js +50 -109
  22. package/lib/cjs/widget/components/QueryBuilder.js.map +1 -1
  23. package/lib/esm/test/GroupPropertyUtils.test.d.ts +2 -0
  24. package/lib/esm/test/GroupPropertyUtils.test.js +588 -0
  25. package/lib/esm/test/GroupPropertyUtils.test.js.map +1 -0
  26. package/lib/esm/test/MockFactory.d.ts +9 -0
  27. package/lib/esm/test/MockFactory.js +19 -0
  28. package/lib/esm/test/MockFactory.js.map +1 -0
  29. package/lib/esm/test/PropertyFieldsHelpers.d.ts +86 -0
  30. package/lib/esm/test/PropertyFieldsHelpers.js +69 -0
  31. package/lib/esm/test/PropertyFieldsHelpers.js.map +1 -0
  32. package/lib/esm/test/QueryBuilder.test.js +42 -147
  33. package/lib/esm/test/QueryBuilder.test.js.map +1 -1
  34. package/lib/esm/test/QueryBuilder.testdata.d.ts +3 -0
  35. package/lib/esm/test/QueryBuilder.testdata.js +840 -0
  36. package/lib/esm/test/QueryBuilder.testdata.js.map +1 -0
  37. package/lib/esm/test/QueryBuilderTestData.d.ts +50 -0
  38. package/lib/esm/test/QueryBuilderTestData.js +2 -0
  39. package/lib/esm/test/QueryBuilderTestData.js.map +1 -0
  40. package/lib/esm/widget/components/GroupPropertyUtils.js +7 -3
  41. package/lib/esm/widget/components/GroupPropertyUtils.js.map +1 -1
  42. package/lib/esm/widget/components/QueryBuilder.d.ts +11 -11
  43. package/lib/esm/widget/components/QueryBuilder.js +50 -109
  44. package/lib/esm/widget/components/QueryBuilder.js.map +1 -1
  45. package/package.json +30 -28
@@ -0,0 +1,840 @@
1
+ export const testCases = {
2
+ testCases: [
3
+ {
4
+ name: "when non-relational property added, return query string with property value",
5
+ expectedResult: "SELECT A.B.ECInstanceId FROM A.B WHERE A.B.somePropName=1",
6
+ operations: [
7
+ {
8
+ expectedResult: true,
9
+ operationType: "addProperty",
10
+ propertyRecord: {
11
+ value: {
12
+ valueFormat: 0,
13
+ value: 1,
14
+ },
15
+ property: {
16
+ typename: "notNavigation",
17
+ name: "propertyName",
18
+ displayLabel: "propertyDisplayLabel",
19
+ },
20
+ },
21
+ propertiesField: {
22
+ properties: [
23
+ {
24
+ property: {
25
+ name: "somePropName",
26
+ classInfo: {
27
+ name: "A:B",
28
+ },
29
+ },
30
+ },
31
+ ],
32
+ type: {
33
+ typeName: "number",
34
+ },
35
+ parent: {
36
+ pathToPrimaryClass: [],
37
+ },
38
+ },
39
+ },
40
+ ],
41
+ },
42
+ {
43
+ name: "when relational property added, return query string with property value and relation chain to it",
44
+ expectedResult: "SELECT Z.X.ECInstanceId FROM Z.X JOIN Rel.CX ON Rel.CX.SourceECInstanceId=A.C.ECInstanceId JOIN A.C ON A.C.ECInstanceId=Rel.BC.SourceECInstanceId JOIN Rel.BC ON Rel.BC.TargetECInstanceId=A.B.ECInstanceId JOIN A.B ON A.B.somePropName='someString' WHERE Z.X.ECInstanceId=Rel.CX.TargetECInstanceId",
45
+ operations: [
46
+ {
47
+ expectedResult: true,
48
+ operationType: "addProperty",
49
+ propertyRecord: {
50
+ value: {
51
+ valueFormat: 0,
52
+ value: "someString",
53
+ },
54
+ property: {
55
+ typename: "notNavigation",
56
+ name: "propertyName",
57
+ displayLabel: "propertyDisplayLabel",
58
+ },
59
+ },
60
+ propertiesField: {
61
+ properties: [
62
+ {
63
+ property: {
64
+ name: "somePropName",
65
+ classInfo: {
66
+ name: "A:B",
67
+ },
68
+ },
69
+ },
70
+ ],
71
+ type: {
72
+ typeName: "string",
73
+ },
74
+ parent: {
75
+ pathToPrimaryClass: [
76
+ {
77
+ sourceClassInfo: {
78
+ id: "id1",
79
+ name: "A:B",
80
+ label: "AB label",
81
+ },
82
+ targetClassInfo: {
83
+ id: "id2",
84
+ name: "A:C",
85
+ label: "AC label",
86
+ },
87
+ isPolymorphicTargetClass: true,
88
+ relationshipInfo: {
89
+ id: "id3",
90
+ name: "Rel:BC",
91
+ label: "Relationship BC label",
92
+ },
93
+ isPolymorphicRelationship: true,
94
+ isForwardRelationship: false,
95
+ },
96
+ {
97
+ sourceClassInfo: {
98
+ id: "id2",
99
+ name: "A:C",
100
+ label: "AC label",
101
+ },
102
+ targetClassInfo: {
103
+ id: "id4",
104
+ name: "Z:X",
105
+ label: "ZX label",
106
+ },
107
+ isPolymorphicTargetClass: false,
108
+ relationshipInfo: {
109
+ id: "id5",
110
+ name: "Rel:CX",
111
+ label: "Relationship CX label",
112
+ },
113
+ isPolymorphicRelationship: true,
114
+ isForwardRelationship: true,
115
+ },
116
+ ],
117
+ contentClassInfo: {
118
+ name: "A:B",
119
+ },
120
+ },
121
+ },
122
+ },
123
+ ],
124
+ },
125
+ {
126
+ name: "when non-relational property removed, return empty string",
127
+ expectedResult: "",
128
+ operations: [
129
+ {
130
+ expectedResult: true,
131
+ operationType: "addProperty",
132
+ propertyRecord: {
133
+ value: {
134
+ valueFormat: 0,
135
+ value: "someString",
136
+ },
137
+ property: {
138
+ typename: "notNavigation",
139
+ name: "propertyName",
140
+ displayLabel: "propertyDisplayLabel",
141
+ },
142
+ },
143
+ propertiesField: {
144
+ properties: [
145
+ {
146
+ property: {
147
+ name: "somePropName",
148
+ classInfo: {
149
+ name: "A:B",
150
+ },
151
+ },
152
+ },
153
+ ],
154
+ type: {
155
+ typeName: "string",
156
+ },
157
+ parent: {
158
+ pathToPrimaryClass: [],
159
+ contentClassInfo: {
160
+ name: "sourceClassName",
161
+ },
162
+ },
163
+ },
164
+ },
165
+ {
166
+ operationType: "removeProperty",
167
+ propertyRecord: {
168
+ value: {
169
+ valueFormat: 0,
170
+ value: "someString",
171
+ },
172
+ property: {
173
+ typename: "notNavigation",
174
+ name: "propertyName",
175
+ displayLabel: "propertyDisplayLabel",
176
+ },
177
+ },
178
+ propertiesField: {
179
+ properties: [
180
+ {
181
+ property: {
182
+ name: "somePropName",
183
+ classInfo: {
184
+ name: "A:B",
185
+ },
186
+ },
187
+ },
188
+ ],
189
+ type: {
190
+ typeName: "string",
191
+ },
192
+ parent: {
193
+ pathToPrimaryClass: [],
194
+ contentClassInfo: {
195
+ name: "sourceClassName",
196
+ },
197
+ },
198
+ },
199
+ },
200
+ ],
201
+ },
202
+ {
203
+ name: "when relational property removed, return empty string",
204
+ expectedResult: "",
205
+ operations: [
206
+ {
207
+ expectedResult: true,
208
+ operationType: "addProperty",
209
+ propertyRecord: {
210
+ value: {
211
+ valueFormat: 0,
212
+ value: "someString",
213
+ },
214
+ property: {
215
+ typename: "notNavigation",
216
+ name: "propertyName",
217
+ displayLabel: "propertyDisplayLabel",
218
+ },
219
+ },
220
+ propertiesField: {
221
+ properties: [
222
+ {
223
+ property: {
224
+ name: "somePropName",
225
+ classInfo: {
226
+ name: "A:B",
227
+ },
228
+ },
229
+ },
230
+ ],
231
+ type: {
232
+ typeName: "string",
233
+ },
234
+ parent: {
235
+ pathToPrimaryClass: [
236
+ {
237
+ sourceClassInfo: {
238
+ id: "id1",
239
+ name: "A:B",
240
+ label: "AB label",
241
+ },
242
+ targetClassInfo: {
243
+ id: "id2",
244
+ name: "A:C",
245
+ label: "AC label",
246
+ },
247
+ isPolymorphicTargetClass: true,
248
+ relationshipInfo: {
249
+ id: "id3",
250
+ name: "Rel:BC",
251
+ label: "Relationship BC label",
252
+ },
253
+ isPolymorphicRelationship: true,
254
+ isForwardRelationship: false,
255
+ },
256
+ {
257
+ sourceClassInfo: {
258
+ id: "id2",
259
+ name: "A:C",
260
+ label: "AC label",
261
+ },
262
+ targetClassInfo: {
263
+ id: "id4",
264
+ name: "Z:X",
265
+ label: "ZX label",
266
+ },
267
+ isPolymorphicTargetClass: false,
268
+ relationshipInfo: {
269
+ id: "id5",
270
+ name: "Rel:CX",
271
+ label: "Relationship CX label",
272
+ },
273
+ isPolymorphicRelationship: true,
274
+ isForwardRelationship: true,
275
+ },
276
+ ],
277
+ contentClassInfo: {
278
+ name: "A:B",
279
+ },
280
+ },
281
+ },
282
+ },
283
+ {
284
+ operationType: "removeProperty",
285
+ propertyRecord: {
286
+ value: {
287
+ valueFormat: 0,
288
+ value: "someString",
289
+ },
290
+ property: {
291
+ typename: "notNavigation",
292
+ name: "propertyName",
293
+ displayLabel: "propertyDisplayLabel",
294
+ },
295
+ },
296
+ propertiesField: {
297
+ properties: [
298
+ {
299
+ property: {
300
+ name: "somePropName",
301
+ classInfo: {
302
+ name: "A:B",
303
+ },
304
+ },
305
+ },
306
+ ],
307
+ type: {
308
+ typeName: "string",
309
+ },
310
+ parent: {
311
+ pathToPrimaryClass: [
312
+ {
313
+ sourceClassInfo: {
314
+ id: "id1",
315
+ name: "A:B",
316
+ label: "AB label",
317
+ },
318
+ targetClassInfo: {
319
+ id: "id2",
320
+ name: "A:C",
321
+ label: "AC label",
322
+ },
323
+ isPolymorphicTargetClass: true,
324
+ relationshipInfo: {
325
+ id: "id3",
326
+ name: "Rel:BC",
327
+ label: "Relationship BC label",
328
+ },
329
+ isPolymorphicRelationship: true,
330
+ isForwardRelationship: false,
331
+ },
332
+ {
333
+ sourceClassInfo: {
334
+ id: "id2",
335
+ name: "A:C",
336
+ label: "AC label",
337
+ },
338
+ targetClassInfo: {
339
+ id: "id4",
340
+ name: "Z:X",
341
+ label: "ZX label",
342
+ },
343
+ isPolymorphicTargetClass: false,
344
+ relationshipInfo: {
345
+ id: "id5",
346
+ name: "Rel:CX",
347
+ label: "Relationship CX label",
348
+ },
349
+ isPolymorphicRelationship: true,
350
+ isForwardRelationship: true,
351
+ },
352
+ ],
353
+ contentClassInfo: {
354
+ name: "A:B",
355
+ },
356
+ },
357
+ },
358
+ },
359
+ ],
360
+ },
361
+ {
362
+ name: "when non-relational property re-added after removing, return query string with property value",
363
+ expectedResult: "SELECT A.B.ECInstanceId FROM A.B WHERE A.B.somePropName='someOtherString'",
364
+ operations: [
365
+ {
366
+ expectedResult: true,
367
+ operationType: "addProperty",
368
+ propertyRecord: {
369
+ value: {
370
+ valueFormat: 0,
371
+ value: "someString",
372
+ },
373
+ property: {
374
+ typename: "notNavigation",
375
+ name: "propertyName",
376
+ displayLabel: "propertyDisplayLabel",
377
+ },
378
+ },
379
+ propertiesField: {
380
+ properties: [
381
+ {
382
+ property: {
383
+ name: "somePropName",
384
+ classInfo: {
385
+ name: "A:B",
386
+ },
387
+ },
388
+ },
389
+ ],
390
+ type: {
391
+ typeName: "string",
392
+ },
393
+ parent: {
394
+ pathToPrimaryClass: [],
395
+ contentClassInfo: {
396
+ name: "sourceClassName",
397
+ },
398
+ },
399
+ },
400
+ },
401
+ {
402
+ operationType: "removeProperty",
403
+ propertyRecord: {
404
+ value: {
405
+ valueFormat: 0,
406
+ value: "someString",
407
+ },
408
+ property: {
409
+ typename: "notNavigation",
410
+ name: "propertyName",
411
+ displayLabel: "propertyDisplayLabel",
412
+ },
413
+ },
414
+ propertiesField: {
415
+ properties: [
416
+ {
417
+ property: {
418
+ name: "somePropName",
419
+ classInfo: {
420
+ name: "A:B",
421
+ },
422
+ },
423
+ },
424
+ ],
425
+ type: {
426
+ typeName: "string",
427
+ },
428
+ parent: {
429
+ pathToPrimaryClass: [],
430
+ contentClassInfo: {
431
+ name: "sourceClassName",
432
+ },
433
+ },
434
+ },
435
+ },
436
+ {
437
+ operationType: "addProperty",
438
+ expectedResult: true,
439
+ propertyRecord: {
440
+ value: {
441
+ valueFormat: 0,
442
+ value: "someOtherString",
443
+ },
444
+ property: {
445
+ typename: "notNavigation",
446
+ name: "propertyName",
447
+ displayLabel: "propertyDisplayLabel",
448
+ },
449
+ },
450
+ propertiesField: {
451
+ properties: [
452
+ {
453
+ property: {
454
+ name: "somePropName",
455
+ classInfo: {
456
+ name: "A:B",
457
+ },
458
+ },
459
+ },
460
+ ],
461
+ type: {
462
+ typeName: "string",
463
+ },
464
+ parent: {
465
+ pathToPrimaryClass: [],
466
+ contentClassInfo: {
467
+ name: "sourceClassName",
468
+ },
469
+ },
470
+ },
471
+ },
472
+ ],
473
+ },
474
+ {
475
+ name: "when relational property re-added after removing, return query string with property value and relation chain to it",
476
+ expectedResult: "SELECT Z.X.ECInstanceId FROM Z.X JOIN Rel.CX ON Rel.CX.SourceECInstanceId=A.C.ECInstanceId JOIN A.C ON A.C.ECInstanceId=Rel.BC.SourceECInstanceId JOIN Rel.BC ON Rel.BC.TargetECInstanceId=A.B.ECInstanceId JOIN A.B ON A.B.somePropName='someOtherString' WHERE Z.X.ECInstanceId=Rel.CX.TargetECInstanceId",
477
+ operations: [
478
+ {
479
+ expectedResult: true,
480
+ operationType: "addProperty",
481
+ propertyRecord: {
482
+ value: {
483
+ valueFormat: 0,
484
+ value: "someString",
485
+ },
486
+ property: {
487
+ typename: "notNavigation",
488
+ name: "propertyName",
489
+ displayLabel: "propertyDisplayLabel",
490
+ },
491
+ },
492
+ propertiesField: {
493
+ properties: [
494
+ {
495
+ property: {
496
+ name: "somePropName",
497
+ classInfo: {
498
+ name: "A:B",
499
+ },
500
+ },
501
+ },
502
+ ],
503
+ type: {
504
+ typeName: "string",
505
+ },
506
+ parent: {
507
+ pathToPrimaryClass: [
508
+ {
509
+ sourceClassInfo: {
510
+ id: "id1",
511
+ name: "A:B",
512
+ label: "AB label",
513
+ },
514
+ targetClassInfo: {
515
+ id: "id2",
516
+ name: "A:C",
517
+ label: "AC label",
518
+ },
519
+ isPolymorphicTargetClass: true,
520
+ relationshipInfo: {
521
+ id: "id3",
522
+ name: "Rel:BC",
523
+ label: "Relationship BC label",
524
+ },
525
+ isPolymorphicRelationship: true,
526
+ isForwardRelationship: false,
527
+ },
528
+ {
529
+ sourceClassInfo: {
530
+ id: "id2",
531
+ name: "A:C",
532
+ label: "AC label",
533
+ },
534
+ targetClassInfo: {
535
+ id: "id4",
536
+ name: "Z:X",
537
+ label: "ZX label",
538
+ },
539
+ isPolymorphicTargetClass: false,
540
+ relationshipInfo: {
541
+ id: "id5",
542
+ name: "Rel:CX",
543
+ label: "Relationship CX label",
544
+ },
545
+ isPolymorphicRelationship: true,
546
+ isForwardRelationship: true,
547
+ },
548
+ ],
549
+ contentClassInfo: {
550
+ name: "A:B",
551
+ },
552
+ },
553
+ },
554
+ },
555
+ {
556
+ operationType: "removeProperty",
557
+ propertyRecord: {
558
+ value: {
559
+ valueFormat: 0,
560
+ value: "someString",
561
+ },
562
+ property: {
563
+ typename: "notNavigation",
564
+ name: "propertyName",
565
+ displayLabel: "propertyDisplayLabel",
566
+ },
567
+ },
568
+ propertiesField: {
569
+ properties: [
570
+ {
571
+ property: {
572
+ name: "somePropName",
573
+ classInfo: {
574
+ name: "A:B",
575
+ },
576
+ },
577
+ },
578
+ ],
579
+ type: {
580
+ typeName: "string",
581
+ },
582
+ parent: {
583
+ pathToPrimaryClass: [
584
+ {
585
+ sourceClassInfo: {
586
+ id: "id1",
587
+ name: "A:B",
588
+ label: "AB label",
589
+ },
590
+ targetClassInfo: {
591
+ id: "id2",
592
+ name: "A:C",
593
+ label: "AC label",
594
+ },
595
+ isPolymorphicTargetClass: true,
596
+ relationshipInfo: {
597
+ id: "id3",
598
+ name: "Rel:BC",
599
+ label: "Relationship BC label",
600
+ },
601
+ isPolymorphicRelationship: true,
602
+ isForwardRelationship: false,
603
+ },
604
+ {
605
+ sourceClassInfo: {
606
+ id: "id2",
607
+ name: "A:C",
608
+ label: "AC label",
609
+ },
610
+ targetClassInfo: {
611
+ id: "id4",
612
+ name: "Z:X",
613
+ label: "ZX label",
614
+ },
615
+ isPolymorphicTargetClass: false,
616
+ relationshipInfo: {
617
+ id: "id5",
618
+ name: "Rel:CX",
619
+ label: "Relationship CX label",
620
+ },
621
+ isPolymorphicRelationship: true,
622
+ isForwardRelationship: true,
623
+ },
624
+ ],
625
+ contentClassInfo: {
626
+ name: "A:B",
627
+ },
628
+ },
629
+ },
630
+ },
631
+ {
632
+ expectedResult: true,
633
+ operationType: "addProperty",
634
+ propertyRecord: {
635
+ value: {
636
+ valueFormat: 0,
637
+ value: "someOtherString",
638
+ },
639
+ property: {
640
+ typename: "notNavigation",
641
+ name: "propertyName",
642
+ displayLabel: "propertyDisplayLabel",
643
+ },
644
+ },
645
+ propertiesField: {
646
+ properties: [
647
+ {
648
+ property: {
649
+ name: "somePropName",
650
+ classInfo: {
651
+ name: "A:B",
652
+ },
653
+ },
654
+ },
655
+ ],
656
+ type: {
657
+ typeName: "string",
658
+ },
659
+ parent: {
660
+ pathToPrimaryClass: [
661
+ {
662
+ sourceClassInfo: {
663
+ id: "id1",
664
+ name: "A:B",
665
+ label: "AB label",
666
+ },
667
+ targetClassInfo: {
668
+ id: "id2",
669
+ name: "A:C",
670
+ label: "AC label",
671
+ },
672
+ isPolymorphicTargetClass: true,
673
+ relationshipInfo: {
674
+ id: "id3",
675
+ name: "Rel:BC",
676
+ label: "Relationship BC label",
677
+ },
678
+ isPolymorphicRelationship: true,
679
+ isForwardRelationship: false,
680
+ },
681
+ {
682
+ sourceClassInfo: {
683
+ id: "id2",
684
+ name: "A:C",
685
+ label: "AC label",
686
+ },
687
+ targetClassInfo: {
688
+ id: "id4",
689
+ name: "Z:X",
690
+ label: "ZX label",
691
+ },
692
+ isPolymorphicTargetClass: false,
693
+ relationshipInfo: {
694
+ id: "id5",
695
+ name: "Rel:CX",
696
+ label: "Relationship CX label",
697
+ },
698
+ isPolymorphicRelationship: true,
699
+ isForwardRelationship: true,
700
+ },
701
+ ],
702
+ contentClassInfo: {
703
+ name: "A:B",
704
+ },
705
+ },
706
+ },
707
+ },
708
+ ],
709
+ },
710
+ {
711
+ name: "when no properties added, return empty string",
712
+ expectedResult: "",
713
+ operations: [],
714
+ },
715
+ {
716
+ name: "when property is float, return query string with ROUND",
717
+ expectedResult: "SELECT A.B.ECInstanceId FROM A.B WHERE ROUND(A.B.somePropName, 4)=3.1416",
718
+ operations: [
719
+ {
720
+ expectedResult: true,
721
+ operationType: "addProperty",
722
+ propertyRecord: {
723
+ value: {
724
+ valueFormat: 0,
725
+ value: 3.14159,
726
+ },
727
+ property: {
728
+ typename: "notNavigation",
729
+ name: "propertyName",
730
+ displayLabel: "propertyDisplayLabel",
731
+ },
732
+ },
733
+ propertiesField: {
734
+ properties: [
735
+ {
736
+ property: {
737
+ name: "somePropName",
738
+ classInfo: {
739
+ name: "A:B",
740
+ },
741
+ },
742
+ },
743
+ ],
744
+ type: {
745
+ typeName: "number",
746
+ },
747
+ parent: {
748
+ pathToPrimaryClass: [],
749
+ },
750
+ },
751
+ },
752
+ ],
753
+ },
754
+ {
755
+ name: "when property needsQuotes, return query string with property value in quotes",
756
+ expectedResult: "SELECT A.B.ECInstanceId FROM A.B WHERE A.B.somePropName='https://valueThatNeedsQuotes.com'",
757
+ operations: [
758
+ {
759
+ expectedResult: true,
760
+ operationType: "addProperty",
761
+ propertyRecord: {
762
+ value: {
763
+ valueFormat: 0,
764
+ value: "https://valueThatNeedsQuotes.com",
765
+ },
766
+ property: {
767
+ typename: "notNavigation",
768
+ name: "propertyName",
769
+ displayLabel: "propertyDisplayLabel",
770
+ },
771
+ },
772
+ propertiesField: {
773
+ properties: [
774
+ {
775
+ property: {
776
+ name: "somePropName",
777
+ classInfo: {
778
+ name: "A:B",
779
+ },
780
+ },
781
+ },
782
+ ],
783
+ type: {
784
+ typeName: "uri",
785
+ },
786
+ parent: {
787
+ pathToPrimaryClass: [],
788
+ },
789
+ },
790
+ },
791
+ ],
792
+ },
793
+ {
794
+ name: "when property is category, return a category query string",
795
+ expectedResult: "SELECT BisCore.B.ECInstanceId FROM BisCore.B JOIN bis.Category ON bis.Category.ECInstanceId = bis.GeometricElement3d.category.id AND ((bis.Category.CodeValue='displayValueString') OR (bis.Category.UserLabel='displayValueString'))",
796
+ operations: [
797
+ {
798
+ expectedResult: true,
799
+ operationType: "addProperty",
800
+ propertyRecord: {
801
+ value: {
802
+ valueFormat: 0,
803
+ value: "someString",
804
+ displayValue: "displayValueString",
805
+ },
806
+ property: {
807
+ typename: "navigation",
808
+ name: "propertyName",
809
+ displayLabel: "propertyDisplayLabel",
810
+ },
811
+ },
812
+ propertiesField: {
813
+ properties: [
814
+ {
815
+ property: {
816
+ name: "somePropName",
817
+ classInfo: {
818
+ name: "BisCore:B",
819
+ },
820
+ navigationPropertyInfo: {
821
+ classInfo: {
822
+ name: "BisCore:GeometricElement3dIsInCategory",
823
+ },
824
+ },
825
+ },
826
+ },
827
+ ],
828
+ type: {
829
+ typeName: "string",
830
+ },
831
+ parent: {
832
+ pathToPrimaryClass: [],
833
+ },
834
+ },
835
+ },
836
+ ],
837
+ },
838
+ ],
839
+ };
840
+ //# sourceMappingURL=QueryBuilder.testdata.js.map