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