@skyux/lookup 6.23.0 → 6.23.2
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.
- package/documentation.json +1124 -15
- package/esm2020/testing/lookup/lookup-harness.mjs +1 -2
- package/fesm2015/skyux-lookup-testing.mjs +0 -1
- package/fesm2015/skyux-lookup-testing.mjs.map +1 -1
- package/fesm2020/skyux-lookup-testing.mjs +0 -1
- package/fesm2020/skyux-lookup-testing.mjs.map +1 -1
- package/package.json +10 -10
- package/testing/lookup/lookup-harness.d.ts +0 -1
package/documentation.json
CHANGED
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"SkyAutocompleteSearchFunction": "type-alias-skyautocompletesearchfunction",
|
|
26
26
|
"SkyAutocompleteSearchFunctionFilter": "type-alias-skyautocompletesearchfunctionfilter",
|
|
27
27
|
"SkyAutocompleteSearchFunctionResponse": "type-alias-skyautocompletesearchfunctionresponse",
|
|
28
|
-
"SkyLookupSelectModeType": "type-alias-skylookupselectmodetype"
|
|
28
|
+
"SkyLookupSelectModeType": "type-alias-skylookupselectmodetype",
|
|
29
|
+
"SkyLookupHarness": "class-skylookupharness"
|
|
29
30
|
},
|
|
30
31
|
"typedoc": {
|
|
31
32
|
"id": 0,
|
|
@@ -9393,6 +9394,1069 @@
|
|
|
9393
9394
|
}
|
|
9394
9395
|
]
|
|
9395
9396
|
}
|
|
9397
|
+
},
|
|
9398
|
+
{
|
|
9399
|
+
"id": 872,
|
|
9400
|
+
"name": "SkyLookupHarness",
|
|
9401
|
+
"kind": 128,
|
|
9402
|
+
"kindString": "Class",
|
|
9403
|
+
"flags": {},
|
|
9404
|
+
"comment": {
|
|
9405
|
+
"shortText": "Harness for interacting with a lookup component in tests."
|
|
9406
|
+
},
|
|
9407
|
+
"children": [
|
|
9408
|
+
{
|
|
9409
|
+
"id": 905,
|
|
9410
|
+
"name": "blur",
|
|
9411
|
+
"kind": 2048,
|
|
9412
|
+
"kindString": "Method",
|
|
9413
|
+
"flags": {
|
|
9414
|
+
"isPublic": true
|
|
9415
|
+
},
|
|
9416
|
+
"sources": [
|
|
9417
|
+
{
|
|
9418
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
9419
|
+
"line": 36,
|
|
9420
|
+
"character": 15
|
|
9421
|
+
}
|
|
9422
|
+
],
|
|
9423
|
+
"signatures": [
|
|
9424
|
+
{
|
|
9425
|
+
"id": 906,
|
|
9426
|
+
"name": "blur",
|
|
9427
|
+
"kind": 4096,
|
|
9428
|
+
"kindString": "Call signature",
|
|
9429
|
+
"flags": {},
|
|
9430
|
+
"comment": {
|
|
9431
|
+
"shortText": "Blurs the autocomplete input."
|
|
9432
|
+
},
|
|
9433
|
+
"type": {
|
|
9434
|
+
"type": "reference",
|
|
9435
|
+
"typeArguments": [
|
|
9436
|
+
{
|
|
9437
|
+
"type": "intrinsic",
|
|
9438
|
+
"name": "void"
|
|
9439
|
+
}
|
|
9440
|
+
],
|
|
9441
|
+
"qualifiedName": "Promise",
|
|
9442
|
+
"package": "typescript",
|
|
9443
|
+
"name": "Promise"
|
|
9444
|
+
},
|
|
9445
|
+
"inheritedFrom": {
|
|
9446
|
+
"type": "reference",
|
|
9447
|
+
"name": "SkyAutocompleteHarness.blur"
|
|
9448
|
+
}
|
|
9449
|
+
}
|
|
9450
|
+
],
|
|
9451
|
+
"inheritedFrom": {
|
|
9452
|
+
"type": "reference",
|
|
9453
|
+
"name": "SkyAutocompleteHarness.blur"
|
|
9454
|
+
}
|
|
9455
|
+
},
|
|
9456
|
+
{
|
|
9457
|
+
"id": 907,
|
|
9458
|
+
"name": "clear",
|
|
9459
|
+
"kind": 2048,
|
|
9460
|
+
"kindString": "Method",
|
|
9461
|
+
"flags": {
|
|
9462
|
+
"isPublic": true
|
|
9463
|
+
},
|
|
9464
|
+
"sources": [
|
|
9465
|
+
{
|
|
9466
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
9467
|
+
"line": 43,
|
|
9468
|
+
"character": 15
|
|
9469
|
+
}
|
|
9470
|
+
],
|
|
9471
|
+
"signatures": [
|
|
9472
|
+
{
|
|
9473
|
+
"id": 908,
|
|
9474
|
+
"name": "clear",
|
|
9475
|
+
"kind": 4096,
|
|
9476
|
+
"kindString": "Call signature",
|
|
9477
|
+
"flags": {},
|
|
9478
|
+
"comment": {
|
|
9479
|
+
"shortText": "Clears the input value."
|
|
9480
|
+
},
|
|
9481
|
+
"type": {
|
|
9482
|
+
"type": "reference",
|
|
9483
|
+
"typeArguments": [
|
|
9484
|
+
{
|
|
9485
|
+
"type": "intrinsic",
|
|
9486
|
+
"name": "void"
|
|
9487
|
+
}
|
|
9488
|
+
],
|
|
9489
|
+
"qualifiedName": "Promise",
|
|
9490
|
+
"package": "typescript",
|
|
9491
|
+
"name": "Promise"
|
|
9492
|
+
},
|
|
9493
|
+
"inheritedFrom": {
|
|
9494
|
+
"type": "reference",
|
|
9495
|
+
"name": "SkyAutocompleteHarness.clear"
|
|
9496
|
+
}
|
|
9497
|
+
}
|
|
9498
|
+
],
|
|
9499
|
+
"inheritedFrom": {
|
|
9500
|
+
"type": "reference",
|
|
9501
|
+
"name": "SkyAutocompleteHarness.clear"
|
|
9502
|
+
}
|
|
9503
|
+
},
|
|
9504
|
+
{
|
|
9505
|
+
"id": 889,
|
|
9506
|
+
"name": "clickAddButton",
|
|
9507
|
+
"kind": 2048,
|
|
9508
|
+
"kindString": "Method",
|
|
9509
|
+
"flags": {
|
|
9510
|
+
"isPublic": true
|
|
9511
|
+
},
|
|
9512
|
+
"sources": [
|
|
9513
|
+
{
|
|
9514
|
+
"fileName": "projects/lookup/src/testing/lookup/lookup-harness.ts",
|
|
9515
|
+
"line": 43,
|
|
9516
|
+
"character": 15
|
|
9517
|
+
}
|
|
9518
|
+
],
|
|
9519
|
+
"signatures": [
|
|
9520
|
+
{
|
|
9521
|
+
"id": 890,
|
|
9522
|
+
"name": "clickAddButton",
|
|
9523
|
+
"kind": 4096,
|
|
9524
|
+
"kindString": "Call signature",
|
|
9525
|
+
"flags": {},
|
|
9526
|
+
"comment": {
|
|
9527
|
+
"shortText": "Clicks the \"Add\" button on the search results panel."
|
|
9528
|
+
},
|
|
9529
|
+
"type": {
|
|
9530
|
+
"type": "reference",
|
|
9531
|
+
"typeArguments": [
|
|
9532
|
+
{
|
|
9533
|
+
"type": "intrinsic",
|
|
9534
|
+
"name": "void"
|
|
9535
|
+
}
|
|
9536
|
+
],
|
|
9537
|
+
"qualifiedName": "Promise",
|
|
9538
|
+
"package": "typescript",
|
|
9539
|
+
"name": "Promise"
|
|
9540
|
+
},
|
|
9541
|
+
"overwrites": {
|
|
9542
|
+
"type": "reference",
|
|
9543
|
+
"name": "SkyAutocompleteHarness.clickAddButton"
|
|
9544
|
+
}
|
|
9545
|
+
}
|
|
9546
|
+
],
|
|
9547
|
+
"overwrites": {
|
|
9548
|
+
"type": "reference",
|
|
9549
|
+
"name": "SkyAutocompleteHarness.clickAddButton"
|
|
9550
|
+
}
|
|
9551
|
+
},
|
|
9552
|
+
{
|
|
9553
|
+
"id": 891,
|
|
9554
|
+
"name": "clickShowMoreButton",
|
|
9555
|
+
"kind": 2048,
|
|
9556
|
+
"kindString": "Method",
|
|
9557
|
+
"flags": {
|
|
9558
|
+
"isPublic": true
|
|
9559
|
+
},
|
|
9560
|
+
"sources": [
|
|
9561
|
+
{
|
|
9562
|
+
"fileName": "projects/lookup/src/testing/lookup/lookup-harness.ts",
|
|
9563
|
+
"line": 51,
|
|
9564
|
+
"character": 15
|
|
9565
|
+
}
|
|
9566
|
+
],
|
|
9567
|
+
"signatures": [
|
|
9568
|
+
{
|
|
9569
|
+
"id": 892,
|
|
9570
|
+
"name": "clickShowMoreButton",
|
|
9571
|
+
"kind": 4096,
|
|
9572
|
+
"kindString": "Call signature",
|
|
9573
|
+
"flags": {},
|
|
9574
|
+
"comment": {
|
|
9575
|
+
"shortText": "Clicks the \"Show more\" button on the search results panel."
|
|
9576
|
+
},
|
|
9577
|
+
"type": {
|
|
9578
|
+
"type": "reference",
|
|
9579
|
+
"typeArguments": [
|
|
9580
|
+
{
|
|
9581
|
+
"type": "intrinsic",
|
|
9582
|
+
"name": "void"
|
|
9583
|
+
}
|
|
9584
|
+
],
|
|
9585
|
+
"qualifiedName": "Promise",
|
|
9586
|
+
"package": "typescript",
|
|
9587
|
+
"name": "Promise"
|
|
9588
|
+
},
|
|
9589
|
+
"overwrites": {
|
|
9590
|
+
"type": "reference",
|
|
9591
|
+
"name": "SkyAutocompleteHarness.clickShowMoreButton"
|
|
9592
|
+
}
|
|
9593
|
+
}
|
|
9594
|
+
],
|
|
9595
|
+
"overwrites": {
|
|
9596
|
+
"type": "reference",
|
|
9597
|
+
"name": "SkyAutocompleteHarness.clickShowMoreButton"
|
|
9598
|
+
}
|
|
9599
|
+
},
|
|
9600
|
+
{
|
|
9601
|
+
"id": 893,
|
|
9602
|
+
"name": "dismissSelections",
|
|
9603
|
+
"kind": 2048,
|
|
9604
|
+
"kindString": "Method",
|
|
9605
|
+
"flags": {
|
|
9606
|
+
"isPublic": true
|
|
9607
|
+
},
|
|
9608
|
+
"sources": [
|
|
9609
|
+
{
|
|
9610
|
+
"fileName": "projects/lookup/src/testing/lookup/lookup-harness.ts",
|
|
9611
|
+
"line": 59,
|
|
9612
|
+
"character": 15
|
|
9613
|
+
}
|
|
9614
|
+
],
|
|
9615
|
+
"signatures": [
|
|
9616
|
+
{
|
|
9617
|
+
"id": 894,
|
|
9618
|
+
"name": "dismissSelections",
|
|
9619
|
+
"kind": 4096,
|
|
9620
|
+
"kindString": "Call signature",
|
|
9621
|
+
"flags": {},
|
|
9622
|
+
"comment": {
|
|
9623
|
+
"shortText": "Dismisses the selections made with a multiselect lookup."
|
|
9624
|
+
},
|
|
9625
|
+
"type": {
|
|
9626
|
+
"type": "reference",
|
|
9627
|
+
"typeArguments": [
|
|
9628
|
+
{
|
|
9629
|
+
"type": "intrinsic",
|
|
9630
|
+
"name": "void"
|
|
9631
|
+
}
|
|
9632
|
+
],
|
|
9633
|
+
"qualifiedName": "Promise",
|
|
9634
|
+
"package": "typescript",
|
|
9635
|
+
"name": "Promise"
|
|
9636
|
+
}
|
|
9637
|
+
}
|
|
9638
|
+
]
|
|
9639
|
+
},
|
|
9640
|
+
{
|
|
9641
|
+
"id": 909,
|
|
9642
|
+
"name": "enterText",
|
|
9643
|
+
"kind": 2048,
|
|
9644
|
+
"kindString": "Method",
|
|
9645
|
+
"flags": {
|
|
9646
|
+
"isPublic": true
|
|
9647
|
+
},
|
|
9648
|
+
"sources": [
|
|
9649
|
+
{
|
|
9650
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
9651
|
+
"line": 50,
|
|
9652
|
+
"character": 15
|
|
9653
|
+
}
|
|
9654
|
+
],
|
|
9655
|
+
"signatures": [
|
|
9656
|
+
{
|
|
9657
|
+
"id": 910,
|
|
9658
|
+
"name": "enterText",
|
|
9659
|
+
"kind": 4096,
|
|
9660
|
+
"kindString": "Call signature",
|
|
9661
|
+
"flags": {},
|
|
9662
|
+
"comment": {
|
|
9663
|
+
"shortText": "Enters text into the autocomplete input."
|
|
9664
|
+
},
|
|
9665
|
+
"parameters": [
|
|
9666
|
+
{
|
|
9667
|
+
"id": 911,
|
|
9668
|
+
"name": "value",
|
|
9669
|
+
"kind": 32768,
|
|
9670
|
+
"kindString": "Parameter",
|
|
9671
|
+
"flags": {},
|
|
9672
|
+
"type": {
|
|
9673
|
+
"type": "intrinsic",
|
|
9674
|
+
"name": "string"
|
|
9675
|
+
}
|
|
9676
|
+
}
|
|
9677
|
+
],
|
|
9678
|
+
"type": {
|
|
9679
|
+
"type": "reference",
|
|
9680
|
+
"typeArguments": [
|
|
9681
|
+
{
|
|
9682
|
+
"type": "intrinsic",
|
|
9683
|
+
"name": "void"
|
|
9684
|
+
}
|
|
9685
|
+
],
|
|
9686
|
+
"qualifiedName": "Promise",
|
|
9687
|
+
"package": "typescript",
|
|
9688
|
+
"name": "Promise"
|
|
9689
|
+
},
|
|
9690
|
+
"inheritedFrom": {
|
|
9691
|
+
"type": "reference",
|
|
9692
|
+
"name": "SkyAutocompleteHarness.enterText"
|
|
9693
|
+
}
|
|
9694
|
+
}
|
|
9695
|
+
],
|
|
9696
|
+
"inheritedFrom": {
|
|
9697
|
+
"type": "reference",
|
|
9698
|
+
"name": "SkyAutocompleteHarness.enterText"
|
|
9699
|
+
}
|
|
9700
|
+
},
|
|
9701
|
+
{
|
|
9702
|
+
"id": 912,
|
|
9703
|
+
"name": "focus",
|
|
9704
|
+
"kind": 2048,
|
|
9705
|
+
"kindString": "Method",
|
|
9706
|
+
"flags": {
|
|
9707
|
+
"isPublic": true
|
|
9708
|
+
},
|
|
9709
|
+
"sources": [
|
|
9710
|
+
{
|
|
9711
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
9712
|
+
"line": 57,
|
|
9713
|
+
"character": 15
|
|
9714
|
+
}
|
|
9715
|
+
],
|
|
9716
|
+
"signatures": [
|
|
9717
|
+
{
|
|
9718
|
+
"id": 913,
|
|
9719
|
+
"name": "focus",
|
|
9720
|
+
"kind": 4096,
|
|
9721
|
+
"kindString": "Call signature",
|
|
9722
|
+
"flags": {},
|
|
9723
|
+
"comment": {
|
|
9724
|
+
"shortText": "Focuses the autocomplete input."
|
|
9725
|
+
},
|
|
9726
|
+
"type": {
|
|
9727
|
+
"type": "reference",
|
|
9728
|
+
"typeArguments": [
|
|
9729
|
+
{
|
|
9730
|
+
"type": "intrinsic",
|
|
9731
|
+
"name": "void"
|
|
9732
|
+
}
|
|
9733
|
+
],
|
|
9734
|
+
"qualifiedName": "Promise",
|
|
9735
|
+
"package": "typescript",
|
|
9736
|
+
"name": "Promise"
|
|
9737
|
+
},
|
|
9738
|
+
"inheritedFrom": {
|
|
9739
|
+
"type": "reference",
|
|
9740
|
+
"name": "SkyAutocompleteHarness.focus"
|
|
9741
|
+
}
|
|
9742
|
+
}
|
|
9743
|
+
],
|
|
9744
|
+
"inheritedFrom": {
|
|
9745
|
+
"type": "reference",
|
|
9746
|
+
"name": "SkyAutocompleteHarness.focus"
|
|
9747
|
+
}
|
|
9748
|
+
},
|
|
9749
|
+
{
|
|
9750
|
+
"id": 914,
|
|
9751
|
+
"name": "getSearchResults",
|
|
9752
|
+
"kind": 2048,
|
|
9753
|
+
"kindString": "Method",
|
|
9754
|
+
"flags": {
|
|
9755
|
+
"isPublic": true
|
|
9756
|
+
},
|
|
9757
|
+
"sources": [
|
|
9758
|
+
{
|
|
9759
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
9760
|
+
"line": 64,
|
|
9761
|
+
"character": 15
|
|
9762
|
+
}
|
|
9763
|
+
],
|
|
9764
|
+
"signatures": [
|
|
9765
|
+
{
|
|
9766
|
+
"id": 915,
|
|
9767
|
+
"name": "getSearchResults",
|
|
9768
|
+
"kind": 4096,
|
|
9769
|
+
"kindString": "Call signature",
|
|
9770
|
+
"flags": {},
|
|
9771
|
+
"comment": {
|
|
9772
|
+
"shortText": "Returns search result harnesses."
|
|
9773
|
+
},
|
|
9774
|
+
"parameters": [
|
|
9775
|
+
{
|
|
9776
|
+
"id": 916,
|
|
9777
|
+
"name": "filters",
|
|
9778
|
+
"kind": 32768,
|
|
9779
|
+
"kindString": "Parameter",
|
|
9780
|
+
"flags": {
|
|
9781
|
+
"isOptional": true
|
|
9782
|
+
},
|
|
9783
|
+
"type": {
|
|
9784
|
+
"type": "reference",
|
|
9785
|
+
"name": "SkyAutocompleteSearchResultHarnessFilters"
|
|
9786
|
+
}
|
|
9787
|
+
}
|
|
9788
|
+
],
|
|
9789
|
+
"type": {
|
|
9790
|
+
"type": "reference",
|
|
9791
|
+
"typeArguments": [
|
|
9792
|
+
{
|
|
9793
|
+
"type": "array",
|
|
9794
|
+
"elementType": {
|
|
9795
|
+
"type": "reference",
|
|
9796
|
+
"name": "SkyAutocompleteSearchResultHarness"
|
|
9797
|
+
}
|
|
9798
|
+
}
|
|
9799
|
+
],
|
|
9800
|
+
"qualifiedName": "Promise",
|
|
9801
|
+
"package": "typescript",
|
|
9802
|
+
"name": "Promise"
|
|
9803
|
+
},
|
|
9804
|
+
"inheritedFrom": {
|
|
9805
|
+
"type": "reference",
|
|
9806
|
+
"name": "SkyAutocompleteHarness.getSearchResults"
|
|
9807
|
+
}
|
|
9808
|
+
}
|
|
9809
|
+
],
|
|
9810
|
+
"inheritedFrom": {
|
|
9811
|
+
"type": "reference",
|
|
9812
|
+
"name": "SkyAutocompleteHarness.getSearchResults"
|
|
9813
|
+
}
|
|
9814
|
+
},
|
|
9815
|
+
{
|
|
9816
|
+
"id": 917,
|
|
9817
|
+
"name": "getSearchResultsText",
|
|
9818
|
+
"kind": 2048,
|
|
9819
|
+
"kindString": "Method",
|
|
9820
|
+
"flags": {
|
|
9821
|
+
"isPublic": true
|
|
9822
|
+
},
|
|
9823
|
+
"sources": [
|
|
9824
|
+
{
|
|
9825
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
9826
|
+
"line": 98,
|
|
9827
|
+
"character": 15
|
|
9828
|
+
}
|
|
9829
|
+
],
|
|
9830
|
+
"signatures": [
|
|
9831
|
+
{
|
|
9832
|
+
"id": 918,
|
|
9833
|
+
"name": "getSearchResultsText",
|
|
9834
|
+
"kind": 4096,
|
|
9835
|
+
"kindString": "Call signature",
|
|
9836
|
+
"flags": {},
|
|
9837
|
+
"comment": {
|
|
9838
|
+
"shortText": "Returns the text content for each search result."
|
|
9839
|
+
},
|
|
9840
|
+
"parameters": [
|
|
9841
|
+
{
|
|
9842
|
+
"id": 919,
|
|
9843
|
+
"name": "filters",
|
|
9844
|
+
"kind": 32768,
|
|
9845
|
+
"kindString": "Parameter",
|
|
9846
|
+
"flags": {
|
|
9847
|
+
"isOptional": true
|
|
9848
|
+
},
|
|
9849
|
+
"type": {
|
|
9850
|
+
"type": "reference",
|
|
9851
|
+
"name": "SkyAutocompleteSearchResultHarnessFilters"
|
|
9852
|
+
}
|
|
9853
|
+
}
|
|
9854
|
+
],
|
|
9855
|
+
"type": {
|
|
9856
|
+
"type": "reference",
|
|
9857
|
+
"typeArguments": [
|
|
9858
|
+
{
|
|
9859
|
+
"type": "array",
|
|
9860
|
+
"elementType": {
|
|
9861
|
+
"type": "intrinsic",
|
|
9862
|
+
"name": "string"
|
|
9863
|
+
}
|
|
9864
|
+
}
|
|
9865
|
+
],
|
|
9866
|
+
"qualifiedName": "Promise",
|
|
9867
|
+
"package": "typescript",
|
|
9868
|
+
"name": "Promise"
|
|
9869
|
+
},
|
|
9870
|
+
"inheritedFrom": {
|
|
9871
|
+
"type": "reference",
|
|
9872
|
+
"name": "SkyAutocompleteHarness.getSearchResultsText"
|
|
9873
|
+
}
|
|
9874
|
+
}
|
|
9875
|
+
],
|
|
9876
|
+
"inheritedFrom": {
|
|
9877
|
+
"type": "reference",
|
|
9878
|
+
"name": "SkyAutocompleteHarness.getSearchResultsText"
|
|
9879
|
+
}
|
|
9880
|
+
},
|
|
9881
|
+
{
|
|
9882
|
+
"id": 897,
|
|
9883
|
+
"name": "getSelections",
|
|
9884
|
+
"kind": 2048,
|
|
9885
|
+
"kindString": "Method",
|
|
9886
|
+
"flags": {
|
|
9887
|
+
"isPublic": true
|
|
9888
|
+
},
|
|
9889
|
+
"sources": [
|
|
9890
|
+
{
|
|
9891
|
+
"fileName": "projects/lookup/src/testing/lookup/lookup-harness.ts",
|
|
9892
|
+
"line": 87,
|
|
9893
|
+
"character": 15
|
|
9894
|
+
}
|
|
9895
|
+
],
|
|
9896
|
+
"signatures": [
|
|
9897
|
+
{
|
|
9898
|
+
"id": 898,
|
|
9899
|
+
"name": "getSelections",
|
|
9900
|
+
"kind": 4096,
|
|
9901
|
+
"kindString": "Call signature",
|
|
9902
|
+
"flags": {},
|
|
9903
|
+
"comment": {
|
|
9904
|
+
"shortText": "Gets a list of selections made with a multiselect lookup."
|
|
9905
|
+
},
|
|
9906
|
+
"type": {
|
|
9907
|
+
"type": "reference",
|
|
9908
|
+
"typeArguments": [
|
|
9909
|
+
{
|
|
9910
|
+
"type": "array",
|
|
9911
|
+
"elementType": {
|
|
9912
|
+
"type": "reference",
|
|
9913
|
+
"name": "SkyLookupSelectionHarness"
|
|
9914
|
+
}
|
|
9915
|
+
}
|
|
9916
|
+
],
|
|
9917
|
+
"qualifiedName": "Promise",
|
|
9918
|
+
"package": "typescript",
|
|
9919
|
+
"name": "Promise"
|
|
9920
|
+
}
|
|
9921
|
+
}
|
|
9922
|
+
]
|
|
9923
|
+
},
|
|
9924
|
+
{
|
|
9925
|
+
"id": 899,
|
|
9926
|
+
"name": "getSelectionsText",
|
|
9927
|
+
"kind": 2048,
|
|
9928
|
+
"kindString": "Method",
|
|
9929
|
+
"flags": {
|
|
9930
|
+
"isPublic": true
|
|
9931
|
+
},
|
|
9932
|
+
"sources": [
|
|
9933
|
+
{
|
|
9934
|
+
"fileName": "projects/lookup/src/testing/lookup/lookup-harness.ts",
|
|
9935
|
+
"line": 94,
|
|
9936
|
+
"character": 15
|
|
9937
|
+
}
|
|
9938
|
+
],
|
|
9939
|
+
"signatures": [
|
|
9940
|
+
{
|
|
9941
|
+
"id": 900,
|
|
9942
|
+
"name": "getSelectionsText",
|
|
9943
|
+
"kind": 4096,
|
|
9944
|
+
"kindString": "Call signature",
|
|
9945
|
+
"flags": {},
|
|
9946
|
+
"comment": {
|
|
9947
|
+
"shortText": "Gets the text content of all selections made with a multiselect lookup."
|
|
9948
|
+
},
|
|
9949
|
+
"type": {
|
|
9950
|
+
"type": "reference",
|
|
9951
|
+
"typeArguments": [
|
|
9952
|
+
{
|
|
9953
|
+
"type": "array",
|
|
9954
|
+
"elementType": {
|
|
9955
|
+
"type": "intrinsic",
|
|
9956
|
+
"name": "string"
|
|
9957
|
+
}
|
|
9958
|
+
}
|
|
9959
|
+
],
|
|
9960
|
+
"qualifiedName": "Promise",
|
|
9961
|
+
"package": "typescript",
|
|
9962
|
+
"name": "Promise"
|
|
9963
|
+
}
|
|
9964
|
+
}
|
|
9965
|
+
]
|
|
9966
|
+
},
|
|
9967
|
+
{
|
|
9968
|
+
"id": 895,
|
|
9969
|
+
"name": "getShowMorePicker",
|
|
9970
|
+
"kind": 2048,
|
|
9971
|
+
"kindString": "Method",
|
|
9972
|
+
"flags": {
|
|
9973
|
+
"isPublic": true
|
|
9974
|
+
},
|
|
9975
|
+
"sources": [
|
|
9976
|
+
{
|
|
9977
|
+
"fileName": "projects/lookup/src/testing/lookup/lookup-harness.ts",
|
|
9978
|
+
"line": 66,
|
|
9979
|
+
"character": 15
|
|
9980
|
+
}
|
|
9981
|
+
],
|
|
9982
|
+
"signatures": [
|
|
9983
|
+
{
|
|
9984
|
+
"id": 896,
|
|
9985
|
+
"name": "getShowMorePicker",
|
|
9986
|
+
"kind": 4096,
|
|
9987
|
+
"kindString": "Call signature",
|
|
9988
|
+
"flags": {},
|
|
9989
|
+
"comment": {
|
|
9990
|
+
"shortText": "Gets the \"Show more\" picker harness."
|
|
9991
|
+
},
|
|
9992
|
+
"type": {
|
|
9993
|
+
"type": "reference",
|
|
9994
|
+
"typeArguments": [
|
|
9995
|
+
{
|
|
9996
|
+
"type": "reference",
|
|
9997
|
+
"name": "SkyLookupShowMorePickerHarness"
|
|
9998
|
+
}
|
|
9999
|
+
],
|
|
10000
|
+
"qualifiedName": "Promise",
|
|
10001
|
+
"package": "typescript",
|
|
10002
|
+
"name": "Promise"
|
|
10003
|
+
}
|
|
10004
|
+
}
|
|
10005
|
+
]
|
|
10006
|
+
},
|
|
10007
|
+
{
|
|
10008
|
+
"id": 920,
|
|
10009
|
+
"name": "getValue",
|
|
10010
|
+
"kind": 2048,
|
|
10011
|
+
"kindString": "Method",
|
|
10012
|
+
"flags": {
|
|
10013
|
+
"isPublic": true
|
|
10014
|
+
},
|
|
10015
|
+
"sources": [
|
|
10016
|
+
{
|
|
10017
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
10018
|
+
"line": 114,
|
|
10019
|
+
"character": 15
|
|
10020
|
+
}
|
|
10021
|
+
],
|
|
10022
|
+
"signatures": [
|
|
10023
|
+
{
|
|
10024
|
+
"id": 921,
|
|
10025
|
+
"name": "getValue",
|
|
10026
|
+
"kind": 4096,
|
|
10027
|
+
"kindString": "Call signature",
|
|
10028
|
+
"flags": {},
|
|
10029
|
+
"comment": {
|
|
10030
|
+
"shortText": "Gets the value of the autocomplete input."
|
|
10031
|
+
},
|
|
10032
|
+
"type": {
|
|
10033
|
+
"type": "reference",
|
|
10034
|
+
"typeArguments": [
|
|
10035
|
+
{
|
|
10036
|
+
"type": "intrinsic",
|
|
10037
|
+
"name": "string"
|
|
10038
|
+
}
|
|
10039
|
+
],
|
|
10040
|
+
"qualifiedName": "Promise",
|
|
10041
|
+
"package": "typescript",
|
|
10042
|
+
"name": "Promise"
|
|
10043
|
+
},
|
|
10044
|
+
"inheritedFrom": {
|
|
10045
|
+
"type": "reference",
|
|
10046
|
+
"name": "SkyAutocompleteHarness.getValue"
|
|
10047
|
+
}
|
|
10048
|
+
}
|
|
10049
|
+
],
|
|
10050
|
+
"inheritedFrom": {
|
|
10051
|
+
"type": "reference",
|
|
10052
|
+
"name": "SkyAutocompleteHarness.getValue"
|
|
10053
|
+
}
|
|
10054
|
+
},
|
|
10055
|
+
{
|
|
10056
|
+
"id": 936,
|
|
10057
|
+
"name": "host",
|
|
10058
|
+
"kind": 2048,
|
|
10059
|
+
"kindString": "Method",
|
|
10060
|
+
"flags": {},
|
|
10061
|
+
"sources": [
|
|
10062
|
+
{
|
|
10063
|
+
"fileName": "node_modules/@angular/cdk/testing/component-harness.d.ts",
|
|
10064
|
+
"line": 221,
|
|
10065
|
+
"character": 4
|
|
10066
|
+
}
|
|
10067
|
+
],
|
|
10068
|
+
"signatures": [
|
|
10069
|
+
{
|
|
10070
|
+
"id": 937,
|
|
10071
|
+
"name": "host",
|
|
10072
|
+
"kind": 4096,
|
|
10073
|
+
"kindString": "Call signature",
|
|
10074
|
+
"flags": {},
|
|
10075
|
+
"comment": {
|
|
10076
|
+
"shortText": "Gets a `Promise` for the `TestElement` representing the host element of the component."
|
|
10077
|
+
},
|
|
10078
|
+
"type": {
|
|
10079
|
+
"type": "reference",
|
|
10080
|
+
"typeArguments": [
|
|
10081
|
+
{
|
|
10082
|
+
"type": "reference",
|
|
10083
|
+
"qualifiedName": "TestElement",
|
|
10084
|
+
"package": "@angular/cdk",
|
|
10085
|
+
"name": "TestElement"
|
|
10086
|
+
}
|
|
10087
|
+
],
|
|
10088
|
+
"qualifiedName": "Promise",
|
|
10089
|
+
"package": "typescript",
|
|
10090
|
+
"name": "Promise"
|
|
10091
|
+
},
|
|
10092
|
+
"inheritedFrom": {
|
|
10093
|
+
"type": "reference",
|
|
10094
|
+
"name": "SkyAutocompleteHarness.host"
|
|
10095
|
+
}
|
|
10096
|
+
}
|
|
10097
|
+
],
|
|
10098
|
+
"inheritedFrom": {
|
|
10099
|
+
"type": "reference",
|
|
10100
|
+
"name": "SkyAutocompleteHarness.host"
|
|
10101
|
+
}
|
|
10102
|
+
},
|
|
10103
|
+
{
|
|
10104
|
+
"id": 922,
|
|
10105
|
+
"name": "isDisabled",
|
|
10106
|
+
"kind": 2048,
|
|
10107
|
+
"kindString": "Method",
|
|
10108
|
+
"flags": {
|
|
10109
|
+
"isPublic": true
|
|
10110
|
+
},
|
|
10111
|
+
"sources": [
|
|
10112
|
+
{
|
|
10113
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
10114
|
+
"line": 121,
|
|
10115
|
+
"character": 15
|
|
10116
|
+
}
|
|
10117
|
+
],
|
|
10118
|
+
"signatures": [
|
|
10119
|
+
{
|
|
10120
|
+
"id": 923,
|
|
10121
|
+
"name": "isDisabled",
|
|
10122
|
+
"kind": 4096,
|
|
10123
|
+
"kindString": "Call signature",
|
|
10124
|
+
"flags": {},
|
|
10125
|
+
"comment": {
|
|
10126
|
+
"shortText": "Whether the autocomplete input is disabled."
|
|
10127
|
+
},
|
|
10128
|
+
"type": {
|
|
10129
|
+
"type": "reference",
|
|
10130
|
+
"typeArguments": [
|
|
10131
|
+
{
|
|
10132
|
+
"type": "intrinsic",
|
|
10133
|
+
"name": "boolean"
|
|
10134
|
+
}
|
|
10135
|
+
],
|
|
10136
|
+
"qualifiedName": "Promise",
|
|
10137
|
+
"package": "typescript",
|
|
10138
|
+
"name": "Promise"
|
|
10139
|
+
},
|
|
10140
|
+
"inheritedFrom": {
|
|
10141
|
+
"type": "reference",
|
|
10142
|
+
"name": "SkyAutocompleteHarness.isDisabled"
|
|
10143
|
+
}
|
|
10144
|
+
}
|
|
10145
|
+
],
|
|
10146
|
+
"inheritedFrom": {
|
|
10147
|
+
"type": "reference",
|
|
10148
|
+
"name": "SkyAutocompleteHarness.isDisabled"
|
|
10149
|
+
}
|
|
10150
|
+
},
|
|
10151
|
+
{
|
|
10152
|
+
"id": 924,
|
|
10153
|
+
"name": "isFocused",
|
|
10154
|
+
"kind": 2048,
|
|
10155
|
+
"kindString": "Method",
|
|
10156
|
+
"flags": {
|
|
10157
|
+
"isPublic": true
|
|
10158
|
+
},
|
|
10159
|
+
"sources": [
|
|
10160
|
+
{
|
|
10161
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
10162
|
+
"line": 128,
|
|
10163
|
+
"character": 15
|
|
10164
|
+
}
|
|
10165
|
+
],
|
|
10166
|
+
"signatures": [
|
|
10167
|
+
{
|
|
10168
|
+
"id": 925,
|
|
10169
|
+
"name": "isFocused",
|
|
10170
|
+
"kind": 4096,
|
|
10171
|
+
"kindString": "Call signature",
|
|
10172
|
+
"flags": {},
|
|
10173
|
+
"comment": {
|
|
10174
|
+
"shortText": "Whether the autocomplete input is focused."
|
|
10175
|
+
},
|
|
10176
|
+
"type": {
|
|
10177
|
+
"type": "reference",
|
|
10178
|
+
"typeArguments": [
|
|
10179
|
+
{
|
|
10180
|
+
"type": "intrinsic",
|
|
10181
|
+
"name": "boolean"
|
|
10182
|
+
}
|
|
10183
|
+
],
|
|
10184
|
+
"qualifiedName": "Promise",
|
|
10185
|
+
"package": "typescript",
|
|
10186
|
+
"name": "Promise"
|
|
10187
|
+
},
|
|
10188
|
+
"inheritedFrom": {
|
|
10189
|
+
"type": "reference",
|
|
10190
|
+
"name": "SkyAutocompleteHarness.isFocused"
|
|
10191
|
+
}
|
|
10192
|
+
}
|
|
10193
|
+
],
|
|
10194
|
+
"inheritedFrom": {
|
|
10195
|
+
"type": "reference",
|
|
10196
|
+
"name": "SkyAutocompleteHarness.isFocused"
|
|
10197
|
+
}
|
|
10198
|
+
},
|
|
10199
|
+
{
|
|
10200
|
+
"id": 901,
|
|
10201
|
+
"name": "isMultiselect",
|
|
10202
|
+
"kind": 2048,
|
|
10203
|
+
"kindString": "Method",
|
|
10204
|
+
"flags": {
|
|
10205
|
+
"isPublic": true
|
|
10206
|
+
},
|
|
10207
|
+
"sources": [
|
|
10208
|
+
{
|
|
10209
|
+
"fileName": "projects/lookup/src/testing/lookup/lookup-harness.ts",
|
|
10210
|
+
"line": 101,
|
|
10211
|
+
"character": 15
|
|
10212
|
+
}
|
|
10213
|
+
],
|
|
10214
|
+
"signatures": [
|
|
10215
|
+
{
|
|
10216
|
+
"id": 902,
|
|
10217
|
+
"name": "isMultiselect",
|
|
10218
|
+
"kind": 4096,
|
|
10219
|
+
"kindString": "Call signature",
|
|
10220
|
+
"flags": {},
|
|
10221
|
+
"comment": {
|
|
10222
|
+
"shortText": "Whether the lookup allows for multiple selections."
|
|
10223
|
+
},
|
|
10224
|
+
"type": {
|
|
10225
|
+
"type": "reference",
|
|
10226
|
+
"typeArguments": [
|
|
10227
|
+
{
|
|
10228
|
+
"type": "intrinsic",
|
|
10229
|
+
"name": "boolean"
|
|
10230
|
+
}
|
|
10231
|
+
],
|
|
10232
|
+
"qualifiedName": "Promise",
|
|
10233
|
+
"package": "typescript",
|
|
10234
|
+
"name": "Promise"
|
|
10235
|
+
}
|
|
10236
|
+
}
|
|
10237
|
+
]
|
|
10238
|
+
},
|
|
10239
|
+
{
|
|
10240
|
+
"id": 926,
|
|
10241
|
+
"name": "isOpen",
|
|
10242
|
+
"kind": 2048,
|
|
10243
|
+
"kindString": "Method",
|
|
10244
|
+
"flags": {
|
|
10245
|
+
"isPublic": true
|
|
10246
|
+
},
|
|
10247
|
+
"sources": [
|
|
10248
|
+
{
|
|
10249
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
10250
|
+
"line": 135,
|
|
10251
|
+
"character": 15
|
|
10252
|
+
}
|
|
10253
|
+
],
|
|
10254
|
+
"signatures": [
|
|
10255
|
+
{
|
|
10256
|
+
"id": 927,
|
|
10257
|
+
"name": "isOpen",
|
|
10258
|
+
"kind": 4096,
|
|
10259
|
+
"kindString": "Call signature",
|
|
10260
|
+
"flags": {},
|
|
10261
|
+
"comment": {
|
|
10262
|
+
"shortText": "Whether the autocomplete is open."
|
|
10263
|
+
},
|
|
10264
|
+
"type": {
|
|
10265
|
+
"type": "reference",
|
|
10266
|
+
"typeArguments": [
|
|
10267
|
+
{
|
|
10268
|
+
"type": "intrinsic",
|
|
10269
|
+
"name": "boolean"
|
|
10270
|
+
}
|
|
10271
|
+
],
|
|
10272
|
+
"qualifiedName": "Promise",
|
|
10273
|
+
"package": "typescript",
|
|
10274
|
+
"name": "Promise"
|
|
10275
|
+
},
|
|
10276
|
+
"inheritedFrom": {
|
|
10277
|
+
"type": "reference",
|
|
10278
|
+
"name": "SkyAutocompleteHarness.isOpen"
|
|
10279
|
+
}
|
|
10280
|
+
}
|
|
10281
|
+
],
|
|
10282
|
+
"inheritedFrom": {
|
|
10283
|
+
"type": "reference",
|
|
10284
|
+
"name": "SkyAutocompleteHarness.isOpen"
|
|
10285
|
+
}
|
|
10286
|
+
},
|
|
10287
|
+
{
|
|
10288
|
+
"id": 928,
|
|
10289
|
+
"name": "selectSearchResult",
|
|
10290
|
+
"kind": 2048,
|
|
10291
|
+
"kindString": "Method",
|
|
10292
|
+
"flags": {
|
|
10293
|
+
"isPublic": true
|
|
10294
|
+
},
|
|
10295
|
+
"sources": [
|
|
10296
|
+
{
|
|
10297
|
+
"fileName": "projects/lookup/src/testing/autocomplete/autocomplete-harness.ts",
|
|
10298
|
+
"line": 143,
|
|
10299
|
+
"character": 15
|
|
10300
|
+
}
|
|
10301
|
+
],
|
|
10302
|
+
"signatures": [
|
|
10303
|
+
{
|
|
10304
|
+
"id": 929,
|
|
10305
|
+
"name": "selectSearchResult",
|
|
10306
|
+
"kind": 4096,
|
|
10307
|
+
"kindString": "Call signature",
|
|
10308
|
+
"flags": {},
|
|
10309
|
+
"comment": {
|
|
10310
|
+
"shortText": "Selects a search result."
|
|
10311
|
+
},
|
|
10312
|
+
"parameters": [
|
|
10313
|
+
{
|
|
10314
|
+
"id": 930,
|
|
10315
|
+
"name": "filters",
|
|
10316
|
+
"kind": 32768,
|
|
10317
|
+
"kindString": "Parameter",
|
|
10318
|
+
"flags": {},
|
|
10319
|
+
"type": {
|
|
10320
|
+
"type": "reference",
|
|
10321
|
+
"name": "SkyAutocompleteSearchResultHarnessFilters"
|
|
10322
|
+
}
|
|
10323
|
+
}
|
|
10324
|
+
],
|
|
10325
|
+
"type": {
|
|
10326
|
+
"type": "reference",
|
|
10327
|
+
"typeArguments": [
|
|
10328
|
+
{
|
|
10329
|
+
"type": "intrinsic",
|
|
10330
|
+
"name": "void"
|
|
10331
|
+
}
|
|
10332
|
+
],
|
|
10333
|
+
"qualifiedName": "Promise",
|
|
10334
|
+
"package": "typescript",
|
|
10335
|
+
"name": "Promise"
|
|
10336
|
+
},
|
|
10337
|
+
"inheritedFrom": {
|
|
10338
|
+
"type": "reference",
|
|
10339
|
+
"name": "SkyAutocompleteHarness.selectSearchResult"
|
|
10340
|
+
}
|
|
10341
|
+
}
|
|
10342
|
+
],
|
|
10343
|
+
"inheritedFrom": {
|
|
10344
|
+
"type": "reference",
|
|
10345
|
+
"name": "SkyAutocompleteHarness.selectSearchResult"
|
|
10346
|
+
}
|
|
10347
|
+
},
|
|
10348
|
+
{
|
|
10349
|
+
"id": 874,
|
|
10350
|
+
"name": "with",
|
|
10351
|
+
"kind": 2048,
|
|
10352
|
+
"kindString": "Method",
|
|
10353
|
+
"flags": {
|
|
10354
|
+
"isPublic": true,
|
|
10355
|
+
"isStatic": true
|
|
10356
|
+
},
|
|
10357
|
+
"sources": [
|
|
10358
|
+
{
|
|
10359
|
+
"fileName": "projects/lookup/src/testing/lookup/lookup-harness.ts",
|
|
10360
|
+
"line": 34,
|
|
10361
|
+
"character": 16
|
|
10362
|
+
}
|
|
10363
|
+
],
|
|
10364
|
+
"signatures": [
|
|
10365
|
+
{
|
|
10366
|
+
"id": 875,
|
|
10367
|
+
"name": "with",
|
|
10368
|
+
"kind": 4096,
|
|
10369
|
+
"kindString": "Call signature",
|
|
10370
|
+
"flags": {},
|
|
10371
|
+
"comment": {
|
|
10372
|
+
"shortText": "Gets a `HarnessPredicate` that can be used to search for a\n`SkyLookupHarness` that meets certain criteria."
|
|
10373
|
+
},
|
|
10374
|
+
"parameters": [
|
|
10375
|
+
{
|
|
10376
|
+
"id": 876,
|
|
10377
|
+
"name": "filters",
|
|
10378
|
+
"kind": 32768,
|
|
10379
|
+
"kindString": "Parameter",
|
|
10380
|
+
"flags": {},
|
|
10381
|
+
"type": {
|
|
10382
|
+
"type": "reference",
|
|
10383
|
+
"name": "SkyLookupHarnessFilters"
|
|
10384
|
+
}
|
|
10385
|
+
}
|
|
10386
|
+
],
|
|
10387
|
+
"type": {
|
|
10388
|
+
"type": "reference",
|
|
10389
|
+
"typeArguments": [
|
|
10390
|
+
{
|
|
10391
|
+
"type": "reference",
|
|
10392
|
+
"id": 872,
|
|
10393
|
+
"name": "SkyLookupHarness"
|
|
10394
|
+
}
|
|
10395
|
+
],
|
|
10396
|
+
"qualifiedName": "HarnessPredicate",
|
|
10397
|
+
"package": "@angular/cdk",
|
|
10398
|
+
"name": "HarnessPredicate"
|
|
10399
|
+
},
|
|
10400
|
+
"overwrites": {
|
|
10401
|
+
"type": "reference",
|
|
10402
|
+
"name": "SkyAutocompleteHarness.with"
|
|
10403
|
+
}
|
|
10404
|
+
}
|
|
10405
|
+
],
|
|
10406
|
+
"overwrites": {
|
|
10407
|
+
"type": "reference",
|
|
10408
|
+
"name": "SkyAutocompleteHarness.with"
|
|
10409
|
+
}
|
|
10410
|
+
}
|
|
10411
|
+
],
|
|
10412
|
+
"groups": [
|
|
10413
|
+
{
|
|
10414
|
+
"title": "Constructors",
|
|
10415
|
+
"kind": 512,
|
|
10416
|
+
"children": [
|
|
10417
|
+
882
|
|
10418
|
+
]
|
|
10419
|
+
},
|
|
10420
|
+
{
|
|
10421
|
+
"title": "Methods",
|
|
10422
|
+
"kind": 2048,
|
|
10423
|
+
"children": [
|
|
10424
|
+
905,
|
|
10425
|
+
907,
|
|
10426
|
+
889,
|
|
10427
|
+
891,
|
|
10428
|
+
893,
|
|
10429
|
+
909,
|
|
10430
|
+
912,
|
|
10431
|
+
914,
|
|
10432
|
+
917,
|
|
10433
|
+
897,
|
|
10434
|
+
899,
|
|
10435
|
+
895,
|
|
10436
|
+
920,
|
|
10437
|
+
936,
|
|
10438
|
+
922,
|
|
10439
|
+
924,
|
|
10440
|
+
901,
|
|
10441
|
+
926,
|
|
10442
|
+
928,
|
|
10443
|
+
874
|
|
10444
|
+
]
|
|
10445
|
+
}
|
|
10446
|
+
],
|
|
10447
|
+
"sources": [
|
|
10448
|
+
{
|
|
10449
|
+
"fileName": "projects/lookup/src/testing/lookup/lookup-harness.ts",
|
|
10450
|
+
"line": 13,
|
|
10451
|
+
"character": 13
|
|
10452
|
+
}
|
|
10453
|
+
],
|
|
10454
|
+
"extendedTypes": [
|
|
10455
|
+
{
|
|
10456
|
+
"type": "reference",
|
|
10457
|
+
"name": "SkyAutocompleteHarness"
|
|
10458
|
+
}
|
|
10459
|
+
]
|
|
9396
10460
|
}
|
|
9397
10461
|
],
|
|
9398
10462
|
"groups": [
|
|
@@ -9482,26 +10546,41 @@
|
|
|
9482
10546
|
"filePath": "/projects/lookup/documentation/code-examples/country-field/basic/country-field-demo.module.ts",
|
|
9483
10547
|
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyCountryFieldModule } from '@skyux/lookup';\n\nimport { CountryFieldDemoComponent } from './country-field-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyCountryFieldModule,\n SkyInputBoxModule,\n ],\n declarations: [CountryFieldDemoComponent],\n exports: [CountryFieldDemoComponent],\n})\nexport class CountryFieldDemoModule {}\n"
|
|
9484
10548
|
},
|
|
10549
|
+
{
|
|
10550
|
+
"fileName": "lookup-async-demo-search-results.ts",
|
|
10551
|
+
"filePath": "/projects/lookup/documentation/code-examples/lookup/async/lookup-async-demo-search-results.ts",
|
|
10552
|
+
"rawContents": "import { LookupDemoPerson } from './lookup-demo-person';\n\nexport interface LookupAsyncDemoSearchResults {\n hasMore: boolean;\n people: LookupDemoPerson[];\n totalCount: number;\n}\n"
|
|
10553
|
+
},
|
|
9485
10554
|
{
|
|
9486
10555
|
"fileName": "lookup-async-demo.component.html",
|
|
9487
10556
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/async/lookup-async-demo.component.html",
|
|
9488
|
-
"rawContents": "<form\n class=\"lookup-demo-form\"\n novalidate\n [formGroup]=\"
|
|
10557
|
+
"rawContents": "<form\n class=\"lookup-demo-form\"\n novalidate\n [formGroup]=\"favoritesForm\"\n (ngSubmit)=\"onSubmit()\"\n>\n <div class=\"sky-form-group\">\n <sky-input-box data-sky-id=\"favorite-names-field\">\n <label class=\"sky-control-label\" skyId #favoriteNamesLabel=\"skyId\">\n Favorite name(s)\n </label>\n <sky-lookup\n formControlName=\"favoriteNames\"\n idProperty=\"name\"\n [ariaLabelledBy]=\"favoriteNamesLabel.id\"\n [enableShowMore]=\"true\"\n (searchAsync)=\"searchAsync($event)\"\n >\n </sky-lookup>\n </sky-input-box>\n </div>\n <div class=\"lookup-demo-alert\">\n <strong>Form model:</strong>\n <pre>{{ favoritesForm.value | json }}</pre>\n </div>\n <button class=\"sky-btn sky-btn-default\" type=\"submit\">Submit</button>\n</form>\n"
|
|
9489
10558
|
},
|
|
9490
10559
|
{
|
|
9491
10560
|
"fileName": "lookup-async-demo.component.scss",
|
|
9492
10561
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/async/lookup-async-demo.component.scss",
|
|
9493
10562
|
"rawContents": ".lookup-demo-alert {\n padding: 10px;\n margin-bottom: 10px;\n border: 1px solid #cdcfd2;\n border-radius: 3px;\n}\n\n.lookup-demo-alert pre {\n margin: 0;\n}\n"
|
|
9494
10563
|
},
|
|
10564
|
+
{
|
|
10565
|
+
"fileName": "lookup-async-demo.component.spec.ts",
|
|
10566
|
+
"filePath": "/projects/lookup/documentation/code-examples/lookup/async/lookup-async-demo.component.spec.ts",
|
|
10567
|
+
"rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { TestBed } from '@angular/core/testing';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { SkyInputBoxHarness } from '@skyux/forms/testing';\nimport { SkyLookupHarness } from '@skyux/lookup/testing';\n\nimport { of } from 'rxjs';\n\nimport { LookupAsyncDemoComponent } from './lookup-async-demo.component';\nimport { LookupAsyncDemoModule } from './lookup-async-demo.module';\nimport { LookupAsyncDemoService } from './lookup-async-demo.service';\n\ndescribe('Lookup asynchronous search demo', () => {\n let mockSvc!: jasmine.SpyObj<LookupAsyncDemoService>;\n\n async function setupTest() {\n const fixture = TestBed.createComponent(LookupAsyncDemoComponent);\n const loader = TestbedHarnessEnvironment.loader(fixture);\n\n const lookupHarness = await (\n await loader.getHarness(\n SkyInputBoxHarness.with({ dataSkyId: 'favorite-names-field' })\n )\n ).queryHarness(SkyLookupHarness);\n\n return { lookupHarness, fixture };\n }\n\n beforeEach(() => {\n // Create a mock search service. In a real-world application, the search\n // service would make a web request which should be avoided in unit tests.\n mockSvc = jasmine.createSpyObj('LookupAsyncDemoService', ['search']);\n\n TestBed.configureTestingModule({\n imports: [NoopAnimationsModule, LookupAsyncDemoModule],\n providers: [\n {\n provide: LookupAsyncDemoService,\n useValue: mockSvc,\n },\n ],\n });\n });\n\n it('should set the expected initial value', async () => {\n const { lookupHarness } = await setupTest();\n\n await expectAsync(lookupHarness.getSelectionsText()).toBeResolvedTo([\n 'Shirley',\n ]);\n });\n\n it('should update the form control when a favorite name is selected', async () => {\n const { lookupHarness, fixture } = await setupTest();\n\n mockSvc.search.and.callFake((searchText) =>\n of({\n hasMore: false,\n people:\n searchText === 'b'\n ? [\n {\n name: 'Bernard',\n },\n ]\n : [],\n totalCount: 1,\n })\n );\n\n await lookupHarness.enterText('b');\n await lookupHarness.selectSearchResult({\n text: 'Bernard',\n });\n\n expect(\n fixture.componentInstance.favoritesForm.controls.favoriteNames.value\n ).toEqual([{ name: 'Shirley' }, { name: 'Bernard' }]);\n });\n});\n"
|
|
10568
|
+
},
|
|
9495
10569
|
{
|
|
9496
10570
|
"fileName": "lookup-async-demo.component.ts",
|
|
9497
10571
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/async/lookup-async-demo.component.ts",
|
|
9498
|
-
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder,
|
|
10572
|
+
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { SkyAutocompleteSearchAsyncArgs } from '@skyux/lookup';\n\nimport { map } from 'rxjs/operators';\n\nimport { LookupAsyncDemoService } from './lookup-async-demo.service';\nimport { LookupDemoPerson } from './lookup-demo-person';\n\n@Component({\n selector: 'app-async-lookup-demo',\n templateUrl: './lookup-async-demo.component.html',\n styleUrls: ['./lookup-async-demo.component.scss'],\n})\nexport class LookupAsyncDemoComponent implements OnInit {\n public favoritesForm: FormGroup;\n\n #searchSvc: LookupAsyncDemoService;\n\n constructor(formBuilder: FormBuilder, searchSvc: LookupAsyncDemoService) {\n this.#searchSvc = searchSvc;\n\n this.favoritesForm = formBuilder.group({\n favoriteNames: [\n [\n {\n name: 'Shirley',\n } as LookupDemoPerson,\n ],\n ],\n });\n }\n\n public ngOnInit(): void {\n // If you need to execute some logic after the lookup values change,\n // subscribe to Angular's built-in value changes observable.\n this.favoritesForm.valueChanges.subscribe((changes) => {\n console.log('Lookup value changes:', changes);\n });\n }\n\n public onSubmit(): void {\n alert('Form submitted with: ' + JSON.stringify(this.favoritesForm.value));\n }\n\n public searchAsync(args: SkyAutocompleteSearchAsyncArgs): void {\n // In a real-world application the search service might return an Observable\n // created by calling HttpClient.get(). Assigning that Observable to the result\n // allows the lookup component to cancel the web request if it does not complete\n // before the user searches again.\n args.result = this.#searchSvc.search(args.searchText).pipe(\n map((result) => ({\n hasMore: result.hasMore,\n items: result.people,\n totalCount: result.totalCount,\n }))\n );\n }\n}\n"
|
|
9499
10573
|
},
|
|
9500
10574
|
{
|
|
9501
10575
|
"fileName": "lookup-async-demo.module.ts",
|
|
9502
10576
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/async/lookup-async-demo.module.ts",
|
|
9503
10577
|
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyLookupModule } from '@skyux/lookup';\n\nimport { LookupAsyncDemoComponent } from './lookup-async-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIdModule,\n SkyInputBoxModule,\n SkyLookupModule,\n ],\n declarations: [LookupAsyncDemoComponent],\n exports: [LookupAsyncDemoComponent],\n})\nexport class LookupAsyncDemoModule {}\n"
|
|
9504
10578
|
},
|
|
10579
|
+
{
|
|
10580
|
+
"fileName": "lookup-async-demo.service.ts",
|
|
10581
|
+
"filePath": "/projects/lookup/documentation/code-examples/lookup/async/lookup-async-demo.service.ts",
|
|
10582
|
+
"rawContents": "import { Injectable } from '@angular/core';\n\nimport { Observable, of } from 'rxjs';\nimport { delay } from 'rxjs/operators';\n\nimport { LookupAsyncDemoSearchResults } from './lookup-async-demo-search-results';\nimport { LookupDemoPerson } from './lookup-demo-person';\n\nconst people: LookupDemoPerson[] = [\n { name: 'Abed' },\n { name: 'Alex' },\n { name: 'Ben' },\n { name: 'Britta' },\n { name: 'Buzz' },\n { name: 'Craig' },\n { name: 'Elroy' },\n { name: 'Garrett' },\n { name: 'Ian' },\n { name: 'Jeff' },\n { name: 'Leonard' },\n { name: 'Neil' },\n { name: 'Pierce' },\n { name: 'Preston' },\n { name: 'Rachel' },\n { name: 'Shirley' },\n { name: 'Todd' },\n { name: 'Troy' },\n { name: 'Vaughn' },\n { name: 'Vicki' },\n];\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LookupAsyncDemoService {\n public search(searchText: string): Observable<LookupAsyncDemoSearchResults> {\n // Simulate a network call with latency. A real-world application might\n // use Angular's HttpClient to create an Observable from a call to a\n // web service.\n searchText = searchText.toUpperCase();\n\n const matchingPeople = people.filter((person) =>\n person.name.toUpperCase().includes(searchText)\n );\n\n return of({\n hasMore: false,\n people: matchingPeople,\n totalCount: matchingPeople.length,\n }).pipe(delay(800));\n }\n}\n"
|
|
10583
|
+
},
|
|
9505
10584
|
{
|
|
9506
10585
|
"fileName": "lookup-demo-person.ts",
|
|
9507
10586
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/async/lookup-demo-person.ts",
|
|
@@ -9510,37 +10589,47 @@
|
|
|
9510
10589
|
{
|
|
9511
10590
|
"fileName": "lookup-custom-picker-demo-modal.component.html",
|
|
9512
10591
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/custom-picker/lookup-custom-picker-demo-modal.component.html",
|
|
9513
|
-
"rawContents": "<sky-modal>\n <sky-modal-header>
|
|
10592
|
+
"rawContents": "<sky-modal class=\"lookup-custom-picker-modal\">\n <sky-modal-header>Names</sky-modal-header>\n <sky-modal-content>\n <form [formGroup]=\"peopleForm\">\n <sky-selection-box-grid>\n <sky-selection-box\n *ngFor=\"let personControl of peopleControls; let i = index\"\n [control]=\"checkbox\"\n >\n <sky-icon icon=\"user\" iconType=\"skyux\"></sky-icon>\n <sky-selection-box-header>\n {{ people[i].name }}\n </sky-selection-box-header>\n <sky-selection-box-description>\n {{ people[i].formal }}\n </sky-selection-box-description>\n <sky-checkbox [formControl]=\"personControl\" #checkbox></sky-checkbox>\n </sky-selection-box>\n </sky-selection-box-grid>\n </form>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n class=\"sky-btn sky-btn-primary lookup-custom-picker-save-button\"\n type=\"button\"\n (click)=\"save()\"\n >\n Save\n </button>\n </sky-modal-footer>\n</sky-modal>\n"
|
|
9514
10593
|
},
|
|
9515
10594
|
{
|
|
9516
10595
|
"fileName": "lookup-custom-picker-demo-modal.component.ts",
|
|
9517
10596
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/custom-picker/lookup-custom-picker-demo-modal.component.ts",
|
|
9518
|
-
"rawContents": "import { Component
|
|
10597
|
+
"rawContents": "import { Component } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\nimport { SkyLookupShowMoreCustomPickerContext } from '@skyux/lookup';\nimport { SkyModalInstance } from '@skyux/modals';\n\nimport { LookupDemoPerson } from './lookup-demo-person';\n\n@Component({\n selector: 'app-lookup-demo-modal',\n templateUrl: './lookup-custom-picker-demo-modal.component.html',\n})\nexport class LookupCustomPickerDemoModalComponent {\n public peopleForm: FormGroup;\n public people: LookupDemoPerson[];\n public peopleControls: FormControl[];\n\n #modalInstance: SkyModalInstance;\n\n constructor(\n context: SkyLookupShowMoreCustomPickerContext,\n modalInstance: SkyModalInstance,\n formBuilder: FormBuilder\n ) {\n this.#modalInstance = modalInstance;\n\n // This list of people will be rendered as selection boxes.\n this.people = context.items;\n\n // Create a control for each selection box.\n this.peopleControls = context.items.map((item) =>\n formBuilder.control(context.initialValue?.includes(item))\n );\n\n this.peopleForm = formBuilder.group({\n people: formBuilder.array(this.peopleControls),\n });\n }\n\n public save(): void {\n // Return a list of selected people to the lookup component.\n const selectedPeople = this.people.filter(\n (_, index) => this.peopleControls[index].value\n );\n\n this.#modalInstance.save(selectedPeople);\n }\n}\n"
|
|
9519
10598
|
},
|
|
9520
10599
|
{
|
|
9521
10600
|
"fileName": "lookup-custom-picker-demo.component.html",
|
|
9522
10601
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/custom-picker/lookup-custom-picker-demo.component.html",
|
|
9523
|
-
"rawContents": "<form\n class=\"lookup-demo-form\"\n novalidate\n [formGroup]=\"
|
|
10602
|
+
"rawContents": "<form\n class=\"lookup-demo-form\"\n novalidate\n [formGroup]=\"favoritesForm\"\n (ngSubmit)=\"onSubmit()\"\n>\n <div class=\"sky-form-group\">\n <sky-input-box data-sky-id=\"favorite-names-field\">\n <label class=\"sky-control-label\" skyId #namesLabel=\"skyId\">\n Favorite names\n </label>\n <sky-lookup\n formControlName=\"favoriteNames\"\n (addClick)=\"onAddButtonClicked()\"\n [ariaLabelledBy]=\"namesLabel.id\"\n [data]=\"people\"\n [enableShowMore]=\"true\"\n [searchFilters]=\"searchFilters\"\n [showAddButton]=\"true\"\n [showMoreConfig]=\"showMoreConfig\"\n >\n </sky-lookup>\n </sky-input-box>\n </div>\n <div class=\"lookup-demo-alert\">\n <strong>Form model:</strong>\n <pre>{{ favoritesForm.value | json }}</pre>\n </div>\n <button class=\"sky-btn sky-btn-default\" type=\"submit\">Submit</button>\n</form>\n"
|
|
9524
10603
|
},
|
|
9525
10604
|
{
|
|
9526
10605
|
"fileName": "lookup-custom-picker-demo.component.scss",
|
|
9527
10606
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/custom-picker/lookup-custom-picker-demo.component.scss",
|
|
9528
10607
|
"rawContents": ".lookup-demo-alert {\n padding: 10px;\n margin-bottom: 10px;\n border: 1px solid #cdcfd2;\n border-radius: 3px;\n}\n\n.lookup-demo-alert pre {\n margin: 0;\n}\n"
|
|
9529
10608
|
},
|
|
10609
|
+
{
|
|
10610
|
+
"fileName": "lookup-custom-picker-demo.component.spec.ts",
|
|
10611
|
+
"filePath": "/projects/lookup/documentation/code-examples/lookup/custom-picker/lookup-custom-picker-demo.component.spec.ts",
|
|
10612
|
+
"rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { TestBed } from '@angular/core/testing';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { SkyInputBoxHarness } from '@skyux/forms/testing';\nimport { SkyLookupHarness } from '@skyux/lookup/testing';\n\nimport { LookupCustomPickerDemoComponent } from './lookup-custom-picker-demo.component';\nimport { LookupCustomPickerDemoModule } from './lookup-custom-picker-demo.module';\nimport { LookupCustomPickerHarness } from './lookup-custom-picker-harness';\n\ndescribe('Lookup custom picker demo', () => {\n async function setupTest() {\n const fixture = TestBed.createComponent(LookupCustomPickerDemoComponent);\n const loader = TestbedHarnessEnvironment.loader(fixture);\n\n const lookupHarness = await (\n await loader.getHarness(\n SkyInputBoxHarness.with({ dataSkyId: 'favorite-names-field' })\n )\n ).queryHarness(SkyLookupHarness);\n\n return { lookupHarness, fixture };\n }\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n imports: [LookupCustomPickerDemoModule, NoopAnimationsModule],\n });\n });\n\n it('should set the expected initial value', async () => {\n const { lookupHarness } = await setupTest();\n\n await expectAsync(lookupHarness.getSelectionsText()).toBeResolvedTo([\n 'Shirley',\n ]);\n });\n\n it('should update the form control when a favorite name is selected', async () => {\n const { lookupHarness, fixture } = await setupTest();\n\n await lookupHarness.enterText('vick');\n\n const firstResultHarness = (await lookupHarness.getSearchResults())[0];\n await firstResultHarness.select();\n\n expect(\n fixture.componentInstance.favoritesForm.controls.favoriteNames.value\n ).toEqual([\n { name: 'Shirley', formal: 'Ms. Bennett' },\n { name: 'Vicki', formal: 'Ms. Jenkins' },\n ]);\n });\n\n it('should use a custom picker', async () => {\n const { lookupHarness, fixture } = await setupTest();\n\n // Show the custom picker.\n await lookupHarness.clickShowMoreButton();\n\n // Use the custom picker harness to validate that selecting/deslecting items\n // updates the lookup form field.\n const loader = TestbedHarnessEnvironment.documentRootLoader(fixture);\n\n const customPickerHarness = await loader.getHarness(\n LookupCustomPickerHarness\n );\n\n await customPickerHarness.checkItemAt(3); // Britta (Ms. Perry)\n await customPickerHarness.checkItemAt(7); // Garret (Mr. Lambert)\n await customPickerHarness.uncheckItemAt(15); // Shirley (Ms. Bennett)\n\n await customPickerHarness.save();\n\n expect(\n fixture.componentInstance.favoritesForm.controls.favoriteNames.value\n ).toEqual([\n { name: 'Britta', formal: 'Ms. Perry' },\n { name: 'Garrett', formal: 'Mr. Lambert' },\n ]);\n });\n});\n"
|
|
10613
|
+
},
|
|
9530
10614
|
{
|
|
9531
10615
|
"fileName": "lookup-custom-picker-demo.component.ts",
|
|
9532
10616
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/custom-picker/lookup-custom-picker-demo.component.ts",
|
|
9533
|
-
"rawContents": "import {
|
|
10617
|
+
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport {\n SkyAutocompleteSearchFunctionFilter,\n SkyLookupShowMoreConfig,\n SkyLookupShowMoreCustomPickerContext,\n} from '@skyux/lookup';\nimport { SkyModalService } from '@skyux/modals';\n\nimport { LookupCustomPickerDemoModalComponent } from './lookup-custom-picker-demo-modal.component';\nimport { LookupDemoPerson } from './lookup-demo-person';\n\n@Component({\n selector: 'app-lookup-demo',\n templateUrl: './lookup-custom-picker-demo.component.html',\n styleUrls: ['./lookup-custom-picker-demo.component.scss'],\n})\nexport class LookupCustomPickerDemoComponent implements OnInit {\n public showMoreConfig: SkyLookupShowMoreConfig;\n public favoritesForm: FormGroup;\n public searchFilters: SkyAutocompleteSearchFunctionFilter[];\n\n public people: LookupDemoPerson[] = [\n {\n name: 'Abed',\n formal: 'Mr. Nadir',\n },\n {\n name: 'Alex',\n formal: 'Mr. Osbourne',\n },\n {\n name: 'Ben',\n formal: 'Mr. Chang',\n },\n {\n name: 'Britta',\n formal: 'Ms. Perry',\n },\n {\n name: 'Buzz',\n formal: 'Mr. Hickey',\n },\n {\n name: 'Craig',\n formal: 'Mr. Pelton',\n },\n {\n name: 'Elroy',\n formal: 'Mr. Patashnik',\n },\n {\n name: 'Garrett',\n formal: 'Mr. Lambert',\n },\n {\n name: 'Ian',\n formal: 'Mr. Duncan',\n },\n {\n name: 'Jeff',\n formal: 'Mr. Winger',\n },\n {\n name: 'Leonard',\n formal: 'Mr. Rodriguez',\n },\n {\n name: 'Neil',\n formal: 'Mr. Neil',\n },\n {\n name: 'Pierce',\n formal: 'Mr. Hawthorne',\n },\n {\n name: 'Preston',\n formal: 'Mr. Koogler',\n },\n {\n name: 'Rachel',\n formal: 'Ms. Rachel',\n },\n {\n name: 'Shirley',\n formal: 'Ms. Bennett',\n },\n {\n name: 'Todd',\n formal: 'Mr. Jacobson',\n },\n {\n name: 'Troy',\n formal: 'Mr. Barnes',\n },\n {\n name: 'Vaughn',\n formal: 'Mr. Miller',\n },\n {\n name: 'Vicki',\n formal: 'Ms. Jenkins',\n },\n ];\n\n constructor(formBuilder: FormBuilder, modalService: SkyModalService) {\n this.favoritesForm = formBuilder.group({\n favoriteNames: [[this.people[15]]],\n });\n\n this.searchFilters = [\n (_, item) => {\n const names: LookupDemoPerson[] =\n this.favoritesForm.controls.favoriteNames.value;\n\n // Only show people in the search results that have not been chosen already.\n return !names.some((option) => option.name === item.name);\n },\n ];\n\n this.showMoreConfig = {\n customPicker: {\n open: (context) => {\n const instance = modalService.open(\n LookupCustomPickerDemoModalComponent,\n {\n providers: [\n {\n provide: SkyLookupShowMoreCustomPickerContext,\n useValue: context,\n },\n ],\n size: 'large',\n }\n );\n\n instance.closed.subscribe((closeArgs) => {\n if (closeArgs.reason === 'save') {\n this.favoritesForm.controls.favoriteNames.setValue(\n closeArgs.data\n );\n }\n });\n },\n },\n };\n }\n\n public ngOnInit(): void {\n // If you need to execute some logic after the lookup values change,\n // subscribe to Angular's built-in value changes observable.\n this.favoritesForm.valueChanges.subscribe((changes) => {\n console.log('Lookup value changes:', changes);\n });\n }\n\n public onAddButtonClicked(): void {\n alert('Add button clicked!');\n }\n\n public onSubmit(): void {\n alert('Form submitted with: ' + JSON.stringify(this.favoritesForm.value));\n }\n}\n"
|
|
9534
10618
|
},
|
|
9535
10619
|
{
|
|
9536
10620
|
"fileName": "lookup-custom-picker-demo.module.ts",
|
|
9537
10621
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/custom-picker/lookup-custom-picker-demo.module.ts",
|
|
9538
|
-
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport {
|
|
10622
|
+
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport {\n SkyCheckboxModule,\n SkyInputBoxModule,\n SkySelectionBoxModule,\n} from '@skyux/forms';\nimport { SkyIconModule } from '@skyux/indicators';\nimport { SkyLookupModule } from '@skyux/lookup';\nimport { SkyModalModule } from '@skyux/modals';\n\nimport { LookupCustomPickerDemoModalComponent } from './lookup-custom-picker-demo-modal.component';\nimport { LookupCustomPickerDemoComponent } from './lookup-custom-picker-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyCheckboxModule,\n SkyIconModule,\n SkyIdModule,\n SkyInputBoxModule,\n SkyLookupModule,\n SkyModalModule,\n SkySelectionBoxModule,\n ],\n declarations: [\n LookupCustomPickerDemoComponent,\n LookupCustomPickerDemoModalComponent,\n ],\n exports: [LookupCustomPickerDemoComponent],\n})\nexport class LookupCustomPickerDemoModule {}\n"
|
|
10623
|
+
},
|
|
10624
|
+
{
|
|
10625
|
+
"fileName": "lookup-custom-picker-harness.ts",
|
|
10626
|
+
"filePath": "/projects/lookup/documentation/code-examples/lookup/custom-picker/lookup-custom-picker-harness.ts",
|
|
10627
|
+
"rawContents": "import { ComponentHarness } from '@angular/cdk/testing';\nimport { SkyCheckboxHarness } from '@skyux/forms/testing';\n\nexport class LookupCustomPickerHarness extends ComponentHarness {\n public static hostSelector = '.lookup-custom-picker-modal';\n\n #getCheckboxes = this.locatorForAll(SkyCheckboxHarness);\n #getSaveButton = this.locatorFor('.lookup-custom-picker-save-button');\n\n public async checkItemAt(index: number): Promise<void> {\n return (await this.#getCheckboxes())[index].check();\n }\n\n public async uncheckItemAt(index: number): Promise<void> {\n return (await this.#getCheckboxes())[index].uncheck();\n }\n\n public async save(): Promise<void> {\n return (await this.#getSaveButton()).click();\n }\n}\n"
|
|
9539
10628
|
},
|
|
9540
10629
|
{
|
|
9541
10630
|
"fileName": "lookup-demo-person.ts",
|
|
9542
10631
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/custom-picker/lookup-demo-person.ts",
|
|
9543
|
-
"rawContents": "export interface LookupDemoPerson {\n name: string;\n}\n"
|
|
10632
|
+
"rawContents": "export interface LookupDemoPerson {\n name: string;\n formal?: string;\n}\n"
|
|
9544
10633
|
},
|
|
9545
10634
|
{
|
|
9546
10635
|
"fileName": "lookup-demo-person.ts",
|
|
@@ -9550,17 +10639,22 @@
|
|
|
9550
10639
|
{
|
|
9551
10640
|
"fileName": "lookup-multiple-demo.component.html",
|
|
9552
10641
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/multi-select/lookup-multiple-demo.component.html",
|
|
9553
|
-
"rawContents": "<form\n class=\"lookup-demo-form\"\n novalidate\n [formGroup]=\"
|
|
10642
|
+
"rawContents": "<form\n class=\"lookup-demo-form\"\n novalidate\n [formGroup]=\"favoritesForm\"\n (ngSubmit)=\"onSubmit()\"\n>\n <div class=\"sky-form-group\">\n <sky-input-box data-sky-id=\"favorite-names-field\">\n <label class=\"sky-control-label\" skyId #favoriteNamesLabel=\"skyId\">\n Favorite names\n </label>\n <sky-lookup\n formControlName=\"favoriteNames\"\n (addClick)=\"onAddButtonClicked()\"\n [ariaLabelledBy]=\"favoriteNamesLabel.id\"\n [data]=\"people\"\n [enableShowMore]=\"true\"\n [searchFilters]=\"searchFilters\"\n [showAddButton]=\"true\"\n >\n </sky-lookup>\n </sky-input-box>\n </div>\n <div class=\"lookup-demo-alert\">\n <strong>Form model:</strong>\n <pre>{{ favoritesForm.value | json }}</pre>\n </div>\n <button class=\"sky-btn sky-btn-default\" type=\"submit\">Submit</button>\n</form>\n"
|
|
9554
10643
|
},
|
|
9555
10644
|
{
|
|
9556
10645
|
"fileName": "lookup-multiple-demo.component.scss",
|
|
9557
10646
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/multi-select/lookup-multiple-demo.component.scss",
|
|
9558
10647
|
"rawContents": ".lookup-demo-alert {\n padding: 10px;\n margin-bottom: 10px;\n border: 1px solid #cdcfd2;\n border-radius: 3px;\n}\n\n.lookup-demo-alert pre {\n margin: 0;\n}\n"
|
|
9559
10648
|
},
|
|
10649
|
+
{
|
|
10650
|
+
"fileName": "lookup-multiple-demo.component.spec.ts",
|
|
10651
|
+
"filePath": "/projects/lookup/documentation/code-examples/lookup/multi-select/lookup-multiple-demo.component.spec.ts",
|
|
10652
|
+
"rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { TestBed } from '@angular/core/testing';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { SkyInputBoxHarness } from '@skyux/forms/testing';\nimport { SkyLookupHarness } from '@skyux/lookup/testing';\n\nimport { LookupMultipleSelectDemoComponent } from './lookup-multiple-demo.component';\nimport { LookupMultipleSelectDemoModule } from './lookup-multiple-demo.module';\n\ndescribe('Lookup multi-select demo', () => {\n async function setupTest() {\n const fixture = TestBed.createComponent(LookupMultipleSelectDemoComponent);\n const loader = TestbedHarnessEnvironment.loader(fixture);\n\n const lookupHarness = await (\n await loader.getHarness(\n SkyInputBoxHarness.with({ dataSkyId: 'favorite-names-field' })\n )\n ).queryHarness(SkyLookupHarness);\n\n return { lookupHarness, fixture };\n }\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n imports: [LookupMultipleSelectDemoModule, NoopAnimationsModule],\n });\n });\n\n it('should set the expected initial value', async () => {\n const { lookupHarness } = await setupTest();\n\n await expectAsync(lookupHarness.getSelectionsText()).toBeResolvedTo([\n 'Shirley',\n ]);\n });\n\n it('should update the form control when a favorite name is selected', async () => {\n const { lookupHarness, fixture } = await setupTest();\n\n await lookupHarness.enterText('vick');\n await lookupHarness.selectSearchResult({\n text: 'Vicki',\n });\n\n expect(\n fixture.componentInstance.favoritesForm.controls.favoriteNames.value\n ).toEqual([{ name: 'Shirley' }, { name: 'Vicki' }]);\n });\n});\n"
|
|
10653
|
+
},
|
|
9560
10654
|
{
|
|
9561
10655
|
"fileName": "lookup-multiple-demo.component.ts",
|
|
9562
10656
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/multi-select/lookup-multiple-demo.component.ts",
|
|
9563
|
-
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder,
|
|
10657
|
+
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { SkyAutocompleteSearchFunctionFilter } from '@skyux/lookup';\n\nimport { LookupDemoPerson } from './lookup-demo-person';\n\n@Component({\n selector: 'app-lookup-demo',\n templateUrl: './lookup-multiple-demo.component.html',\n styleUrls: ['./lookup-multiple-demo.component.scss'],\n})\nexport class LookupMultipleSelectDemoComponent implements OnInit {\n public favoritesForm: FormGroup;\n public searchFilters: SkyAutocompleteSearchFunctionFilter[];\n\n public people: LookupDemoPerson[] = [\n { name: 'Abed' },\n { name: 'Alex' },\n { name: 'Ben' },\n { name: 'Britta' },\n { name: 'Buzz' },\n { name: 'Craig' },\n { name: 'Elroy' },\n { name: 'Garrett' },\n { name: 'Ian' },\n { name: 'Jeff' },\n { name: 'Leonard' },\n { name: 'Neil' },\n { name: 'Pierce' },\n { name: 'Preston' },\n { name: 'Rachel' },\n { name: 'Shirley' },\n { name: 'Todd' },\n { name: 'Troy' },\n { name: 'Vaughn' },\n { name: 'Vicki' },\n ];\n\n constructor(formBuilder: FormBuilder) {\n this.favoritesForm = formBuilder.group({\n favoriteNames: [[this.people[15]]],\n });\n }\n\n public ngOnInit(): void {\n // If you need to execute some logic after the lookup values change,\n // subscribe to Angular's built-in value changes observable.\n this.favoritesForm.valueChanges.subscribe((changes) => {\n console.log('Lookup value changes:', changes);\n });\n\n this.searchFilters = [\n (_, item, args) => {\n // When in the modal view, show all people in the search results, regardless if they have been chosen already.\n if (args.context === 'modal') {\n return true;\n }\n\n const names: LookupDemoPerson[] =\n this.favoritesForm.controls.favoriteNames.value;\n\n // When in the popover view (or in any other view), show people in the search results that have not been chosen already.\n return !names.some((option) => option.name === item.name);\n },\n ];\n }\n\n public onAddButtonClicked(): void {\n alert('Add button clicked!');\n }\n\n public onSubmit(): void {\n alert('Form submitted with: ' + JSON.stringify(this.favoritesForm.value));\n }\n}\n"
|
|
9564
10658
|
},
|
|
9565
10659
|
{
|
|
9566
10660
|
"fileName": "lookup-multiple-demo.module.ts",
|
|
@@ -9575,23 +10669,33 @@
|
|
|
9575
10669
|
{
|
|
9576
10670
|
"fileName": "lookup-result-templates-demo.component.html",
|
|
9577
10671
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/result-templates/lookup-result-templates-demo.component.html",
|
|
9578
|
-
"rawContents": "<form\n class=\"lookup-demo-form\"\n novalidate\n [formGroup]=\"
|
|
10672
|
+
"rawContents": "<form\n class=\"lookup-demo-form\"\n novalidate\n [formGroup]=\"favoritesForm\"\n (ngSubmit)=\"onSubmit()\"\n>\n <div class=\"sky-form-group\">\n <sky-input-box data-sky-id=\"favorite-names-field\">\n <label class=\"sky-control-label\" skyId #favoriteNamesLabel=\"skyId\">\n Favorite names\n </label>\n <sky-lookup\n formControlName=\"favoriteNames\"\n (addClick)=\"onAddButtonClicked()\"\n [ariaLabelledBy]=\"favoriteNamesLabel.id\"\n [data]=\"people\"\n [enableShowMore]=\"true\"\n [searchFilters]=\"searchFilters\"\n [searchResultTemplate]=\"dropdownItemTemplate\"\n [showAddButton]=\"true\"\n [showMoreConfig]=\"showMoreConfig\"\n >\n </sky-lookup>\n </sky-input-box>\n </div>\n <div class=\"lookup-demo-alert\">\n <strong>Form model:</strong>\n <pre>{{ favoritesForm.value | json }}</pre>\n </div>\n <button class=\"sky-btn sky-btn-default\" type=\"submit\">Submit</button>\n</form>\n\n<ng-template let-item=\"item\" #dropdownItemTemplate>\n <span class=\"lookup-demo-template-item\">\n <strong class=\"lookup-demo-template-name\">{{ item.name }}</strong\n ><br />\n <span class=\"lookup-demo-template-formal-name\">\n {{ item.formal }}\n </span>\n </span>\n</ng-template>\n<ng-template let-item=\"item\" #modalItemTemplate>\n <span class=\"lookup-demo-template-item\">\n <span class=\"lookup-demo-template-name\">{{ item.name }}</span\n ><br />\n <i class=\"lookup-demo-template-formal-name\">{{ item.formal }}</i>\n </span>\n</ng-template>\n"
|
|
9579
10673
|
},
|
|
9580
10674
|
{
|
|
9581
10675
|
"fileName": "lookup-result-templates-demo.component.scss",
|
|
9582
10676
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/result-templates/lookup-result-templates-demo.component.scss",
|
|
9583
10677
|
"rawContents": ".lookup-demo-alert {\n padding: 10px;\n margin-bottom: 10px;\n border: 1px solid #cdcfd2;\n border-radius: 3px;\n}\n\n.lookup-demo-alert pre {\n margin: 0;\n}\n"
|
|
9584
10678
|
},
|
|
10679
|
+
{
|
|
10680
|
+
"fileName": "lookup-result-templates-demo.component.spec.ts",
|
|
10681
|
+
"filePath": "/projects/lookup/documentation/code-examples/lookup/result-templates/lookup-result-templates-demo.component.spec.ts",
|
|
10682
|
+
"rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { TestBed } from '@angular/core/testing';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { SkyInputBoxHarness } from '@skyux/forms/testing';\nimport { SkyLookupHarness } from '@skyux/lookup/testing';\n\nimport { LookupResultTemplatesDemoComponent } from './lookup-result-templates-demo.component';\nimport { LookupResultTemplatesDemoModule } from './lookup-result-templates-demo.module';\nimport { LookupResultTemplatesItemHarness } from './lookup-result-templates-item-harness';\n\ndescribe('Lookup result templates demo', () => {\n async function setupTest() {\n const fixture = TestBed.createComponent(LookupResultTemplatesDemoComponent);\n const loader = TestbedHarnessEnvironment.loader(fixture);\n\n const lookupHarness = await (\n await loader.getHarness(\n SkyInputBoxHarness.with({ dataSkyId: 'favorite-names-field' })\n )\n ).queryHarness(SkyLookupHarness);\n\n return { lookupHarness, fixture };\n }\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n imports: [LookupResultTemplatesDemoModule, NoopAnimationsModule],\n });\n });\n\n it('should set the expected initial value', async () => {\n const { lookupHarness } = await setupTest();\n\n await expectAsync(lookupHarness.getSelectionsText()).toBeResolvedTo([\n 'Shirley',\n ]);\n });\n\n it('should use the expected dropdown item template', async () => {\n const { lookupHarness } = await setupTest();\n\n await lookupHarness.enterText('vick');\n\n const results = await lookupHarness.getSearchResults();\n const templateItemHarness = await results[0].queryHarness(\n LookupResultTemplatesItemHarness\n );\n\n await expectAsync(templateItemHarness.getName()).toBeResolvedTo('Vicki');\n await expectAsync(templateItemHarness.getFormalName()).toBeResolvedTo(\n 'Ms. Jenkins'\n );\n });\n\n it('should use the expected modal item template', async () => {\n const { lookupHarness } = await setupTest();\n\n await lookupHarness.clickShowMoreButton();\n\n const pickerHarness = await lookupHarness.getShowMorePicker();\n await pickerHarness.enterSearchText('vick');\n\n const results = await pickerHarness.getSearchResults();\n const templateItemHarness = await results[0].queryHarness(\n LookupResultTemplatesItemHarness\n );\n\n await expectAsync(templateItemHarness.getName()).toBeResolvedTo('Vicki');\n await expectAsync(templateItemHarness.getFormalName()).toBeResolvedTo(\n 'Ms. Jenkins'\n );\n });\n\n it('should update the form control when a favorite name is selected', async () => {\n const { lookupHarness, fixture } = await setupTest();\n\n await lookupHarness.enterText('vick');\n\n const firstResultHarness = (await lookupHarness.getSearchResults())[0];\n await firstResultHarness.select();\n\n expect(\n fixture.componentInstance.favoritesForm.controls.favoriteNames.value\n ).toEqual([\n { name: 'Shirley', formal: 'Ms. Bennett' },\n { name: 'Vicki', formal: 'Ms. Jenkins' },\n ]);\n });\n});\n"
|
|
10683
|
+
},
|
|
9585
10684
|
{
|
|
9586
10685
|
"fileName": "lookup-result-templates-demo.component.ts",
|
|
9587
10686
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/result-templates/lookup-result-templates-demo.component.ts",
|
|
9588
|
-
"rawContents": "import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';\nimport { FormBuilder,
|
|
10687
|
+
"rawContents": "import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport {\n SkyAutocompleteSearchFunctionFilter,\n SkyLookupShowMoreConfig,\n} from '@skyux/lookup';\n\nimport { LookupDemoPerson } from './lookup-demo-person';\n\n@Component({\n selector: 'app-lookup-demo',\n templateUrl: './lookup-result-templates-demo.component.html',\n styleUrls: ['./lookup-result-templates-demo.component.scss'],\n})\nexport class LookupResultTemplatesDemoComponent implements OnInit {\n public favoritesForm: FormGroup;\n public searchFilters: SkyAutocompleteSearchFunctionFilter[];\n\n public people: LookupDemoPerson[] = [\n {\n name: 'Abed',\n formal: 'Mr. Nadir',\n },\n {\n name: 'Alex',\n formal: 'Mr. Osbourne',\n },\n {\n name: 'Ben',\n formal: 'Mr. Chang',\n },\n {\n name: 'Britta',\n formal: 'Ms. Perry',\n },\n {\n name: 'Buzz',\n formal: 'Mr. Hickey',\n },\n {\n name: 'Craig',\n formal: 'Mr. Pelton',\n },\n {\n name: 'Elroy',\n formal: 'Mr. Patashnik',\n },\n {\n name: 'Garrett',\n formal: 'Mr. Lambert',\n },\n {\n name: 'Ian',\n formal: 'Mr. Duncan',\n },\n {\n name: 'Jeff',\n formal: 'Mr. Winger',\n },\n {\n name: 'Leonard',\n formal: 'Mr. Rodriguez',\n },\n {\n name: 'Neil',\n formal: 'Mr. Neil',\n },\n {\n name: 'Pierce',\n formal: 'Mr. Hawthorne',\n },\n {\n name: 'Preston',\n formal: 'Mr. Koogler',\n },\n {\n name: 'Rachel',\n formal: 'Ms. Rachel',\n },\n {\n name: 'Shirley',\n formal: 'Ms. Bennett',\n },\n {\n name: 'Todd',\n formal: 'Mr. Jacobson',\n },\n {\n name: 'Troy',\n formal: 'Mr. Barnes',\n },\n {\n name: 'Vaughn',\n formal: 'Mr. Miller',\n },\n {\n name: 'Vicki',\n formal: 'Ms. Jenkins',\n },\n ];\n\n public showMoreConfig: SkyLookupShowMoreConfig = {\n nativePickerConfig: {},\n };\n\n @ViewChild('modalItemTemplate')\n public set modalItemTemplate(template: TemplateRef<unknown>) {\n this.showMoreConfig.nativePickerConfig.itemTemplate = template;\n }\n\n constructor(formBuilder: FormBuilder) {\n this.favoritesForm = formBuilder.group({\n favoriteNames: [[this.people[15]]],\n });\n\n this.searchFilters = [\n (_, item) => {\n const names: LookupDemoPerson[] =\n this.favoritesForm.controls.favoriteNames.value;\n\n // Only show people in the search results that have not been chosen already.\n return !names.some((option) => option.name === item.name);\n },\n ];\n }\n\n public ngOnInit(): void {\n // If you need to execute some logic after the lookup values change,\n // subscribe to Angular's built-in value changes observable.\n this.favoritesForm.valueChanges.subscribe((changes) => {\n console.log('Lookup value changes:', changes);\n });\n }\n\n public onAddButtonClicked(): void {\n alert('Add button clicked!');\n }\n\n public onSubmit(): void {\n alert('Form submitted with: ' + JSON.stringify(this.favoritesForm.value));\n }\n}\n"
|
|
9589
10688
|
},
|
|
9590
10689
|
{
|
|
9591
10690
|
"fileName": "lookup-result-templates-demo.module.ts",
|
|
9592
10691
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/result-templates/lookup-result-templates-demo.module.ts",
|
|
9593
10692
|
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyLookupModule } from '@skyux/lookup';\n\nimport { LookupResultTemplatesDemoComponent } from './lookup-result-templates-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIdModule,\n SkyInputBoxModule,\n SkyLookupModule,\n ],\n declarations: [LookupResultTemplatesDemoComponent],\n exports: [LookupResultTemplatesDemoComponent],\n})\nexport class LookupResultTemplatesDemoModule {}\n"
|
|
9594
10693
|
},
|
|
10694
|
+
{
|
|
10695
|
+
"fileName": "lookup-result-templates-item-harness.ts",
|
|
10696
|
+
"filePath": "/projects/lookup/documentation/code-examples/lookup/result-templates/lookup-result-templates-item-harness.ts",
|
|
10697
|
+
"rawContents": "import { ComponentHarness } from '@angular/cdk/testing';\n\n/**\n * Harness for interacting with a lookup component in tests.\n * @internal\n */\nexport class LookupResultTemplatesItemHarness extends ComponentHarness {\n public static hostSelector = '.lookup-demo-template-item';\n\n #getName = this.locatorFor('.lookup-demo-template-name');\n #getFormalName = this.locatorFor('.lookup-demo-template-formal-name');\n\n public async getName(): Promise<string> {\n return (await this.#getName()).text();\n }\n\n public async getFormalName(): Promise<string> {\n return (await this.#getFormalName()).text();\n }\n}\n"
|
|
10698
|
+
},
|
|
9595
10699
|
{
|
|
9596
10700
|
"fileName": "lookup-demo-person.ts",
|
|
9597
10701
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/single-select/lookup-demo-person.ts",
|
|
@@ -9600,17 +10704,22 @@
|
|
|
9600
10704
|
{
|
|
9601
10705
|
"fileName": "lookup-single-demo.component.html",
|
|
9602
10706
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/single-select/lookup-single-demo.component.html",
|
|
9603
|
-
"rawContents": "<form\n class=\"lookup-demo-form\"\n novalidate\n [formGroup]=\"
|
|
10707
|
+
"rawContents": "<form\n class=\"lookup-demo-form\"\n novalidate\n [formGroup]=\"favoritesForm\"\n (ngSubmit)=\"onSubmit()\"\n>\n <div class=\"sky-form-group\">\n <sky-input-box data-sky-id=\"favorite-name-field\">\n <label class=\"sky-control-label\" skyId #favoriteNameLabel=\"skyId\">\n Favorite name\n </label>\n <sky-lookup\n formControlName=\"favoriteName\"\n selectMode=\"single\"\n (addClick)=\"onAddButtonClicked()\"\n [ariaLabelledBy]=\"favoriteNameLabel.id\"\n [data]=\"people\"\n [enableShowMore]=\"true\"\n [searchFilters]=\"searchFilters\"\n [showAddButton]=\"true\"\n >\n </sky-lookup>\n </sky-input-box>\n </div>\n <div class=\"lookup-demo-alert\">\n <strong>Form model:</strong>\n <pre>{{ favoritesForm.value | json }}</pre>\n </div>\n <button class=\"sky-btn sky-btn-default\" type=\"submit\">Submit</button>\n</form>\n"
|
|
9604
10708
|
},
|
|
9605
10709
|
{
|
|
9606
10710
|
"fileName": "lookup-single-demo.component.scss",
|
|
9607
10711
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/single-select/lookup-single-demo.component.scss",
|
|
9608
10712
|
"rawContents": ".lookup-demo-alert {\n padding: 10px;\n margin-bottom: 10px;\n border: 1px solid #cdcfd2;\n border-radius: 3px;\n}\n\n.lookup-demo-alert pre {\n margin: 0;\n}\n"
|
|
9609
10713
|
},
|
|
10714
|
+
{
|
|
10715
|
+
"fileName": "lookup-single-demo.component.spec.ts",
|
|
10716
|
+
"filePath": "/projects/lookup/documentation/code-examples/lookup/single-select/lookup-single-demo.component.spec.ts",
|
|
10717
|
+
"rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { TestBed } from '@angular/core/testing';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { SkyInputBoxHarness } from '@skyux/forms/testing';\nimport { SkyLookupHarness } from '@skyux/lookup/testing';\n\nimport { LookupSingleSelectDemoComponent } from './lookup-single-demo.component';\nimport { LookupSingleSelectDemoModule } from './lookup-single-demo.module';\n\ndescribe('Lookup single select demo', () => {\n async function setupTest() {\n const fixture = TestBed.createComponent(LookupSingleSelectDemoComponent);\n const loader = TestbedHarnessEnvironment.loader(fixture);\n\n const lookupHarness = await (\n await loader.getHarness(\n SkyInputBoxHarness.with({ dataSkyId: 'favorite-name-field' })\n )\n ).queryHarness(SkyLookupHarness);\n\n return { lookupHarness, fixture };\n }\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n imports: [LookupSingleSelectDemoModule, NoopAnimationsModule],\n });\n });\n\n it('should set the expected initial value', async () => {\n const { lookupHarness } = await setupTest();\n\n await expectAsync(lookupHarness.getValue()).toBeResolvedTo('Shirley');\n });\n\n it('should update the form control when a favorite name is selected', async () => {\n const { lookupHarness, fixture } = await setupTest();\n\n await lookupHarness.enterText('vick');\n await lookupHarness.selectSearchResult({\n text: 'Vicki',\n });\n\n expect(\n fixture.componentInstance.favoritesForm.get('favoriteName').value\n ).toEqual([{ name: 'Vicki' }]);\n });\n});\n"
|
|
10718
|
+
},
|
|
9610
10719
|
{
|
|
9611
10720
|
"fileName": "lookup-single-demo.component.ts",
|
|
9612
10721
|
"filePath": "/projects/lookup/documentation/code-examples/lookup/single-select/lookup-single-demo.component.ts",
|
|
9613
|
-
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder,
|
|
10722
|
+
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { SkyAutocompleteSearchFunctionFilter } from '@skyux/lookup';\n\nimport { LookupDemoPerson } from './lookup-demo-person';\n\n@Component({\n selector: 'app-single-select-lookup-demo',\n templateUrl: './lookup-single-demo.component.html',\n styleUrls: ['./lookup-single-demo.component.scss'],\n})\nexport class LookupSingleSelectDemoComponent implements OnInit {\n public favoritesForm: FormGroup;\n public searchFilters: SkyAutocompleteSearchFunctionFilter[];\n\n public people: LookupDemoPerson[] = [\n { name: 'Abed' },\n { name: 'Alex' },\n { name: 'Ben' },\n { name: 'Britta' },\n { name: 'Buzz' },\n { name: 'Craig' },\n { name: 'Elroy' },\n { name: 'Garrett' },\n { name: 'Ian' },\n { name: 'Jeff' },\n { name: 'Leonard' },\n { name: 'Neil' },\n { name: 'Pierce' },\n { name: 'Preston' },\n { name: 'Rachel' },\n { name: 'Shirley' },\n { name: 'Todd' },\n { name: 'Troy' },\n { name: 'Vaughn' },\n { name: 'Vicki' },\n ];\n\n public name: LookupDemoPerson[] = [this.people[15]];\n\n constructor(formBuilder: FormBuilder) {\n this.favoritesForm = formBuilder.group({\n favoriteName: [[this.people[15]]],\n });\n\n this.searchFilters = [\n (_, item) => {\n const names: LookupDemoPerson[] =\n this.favoritesForm.controls.favoriteName.value;\n\n // Only show people in the search results that have not been chosen already.\n return !names.some((option) => option.name === item.name);\n },\n ];\n }\n\n public ngOnInit(): void {\n // If you need to execute some logic after the lookup values change,\n // subscribe to Angular's built-in value changes observable.\n this.favoritesForm.valueChanges.subscribe((changes) => {\n console.log('Lookup value changes:', changes);\n });\n }\n\n public onAddButtonClicked(): void {\n alert('Add button clicked!');\n }\n\n public onSubmit(): void {\n alert('Form submitted with: ' + JSON.stringify(this.favoritesForm.value));\n }\n}\n"
|
|
9614
10723
|
},
|
|
9615
10724
|
{
|
|
9616
10725
|
"fileName": "lookup-single-demo.module.ts",
|