@skyux/lists 7.18.0 → 7.20.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.
@@ -5700,7 +5700,47 @@
5700
5700
  },
5701
5701
  "children": [
5702
5702
  {
5703
- "id": 503,
5703
+ "id": 486,
5704
+ "name": "click",
5705
+ "kind": 2048,
5706
+ "kindString": "Method",
5707
+ "flags": {
5708
+ "isPublic": true
5709
+ },
5710
+ "sources": [
5711
+ {
5712
+ "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
5713
+ "line": 91,
5714
+ "character": 15
5715
+ }
5716
+ ],
5717
+ "signatures": [
5718
+ {
5719
+ "id": 487,
5720
+ "name": "click",
5721
+ "kind": 4096,
5722
+ "kindString": "Call signature",
5723
+ "flags": {},
5724
+ "comment": {
5725
+ "shortText": "Clicks on the repeater item."
5726
+ },
5727
+ "type": {
5728
+ "type": "reference",
5729
+ "typeArguments": [
5730
+ {
5731
+ "type": "intrinsic",
5732
+ "name": "void"
5733
+ }
5734
+ ],
5735
+ "qualifiedName": "Promise",
5736
+ "package": "typescript",
5737
+ "name": "Promise"
5738
+ }
5739
+ }
5740
+ ]
5741
+ },
5742
+ {
5743
+ "id": 506,
5704
5744
  "name": "collapse",
5705
5745
  "kind": 2048,
5706
5746
  "kindString": "Method",
@@ -5710,13 +5750,13 @@
5710
5750
  "sources": [
5711
5751
  {
5712
5752
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
5713
- "line": 188,
5753
+ "line": 197,
5714
5754
  "character": 15
5715
5755
  }
5716
5756
  ],
5717
5757
  "signatures": [
5718
5758
  {
5719
- "id": 504,
5759
+ "id": 507,
5720
5760
  "name": "collapse",
5721
5761
  "kind": 4096,
5722
5762
  "kindString": "Call signature",
@@ -5740,7 +5780,7 @@
5740
5780
  ]
5741
5781
  },
5742
5782
  {
5743
- "id": 491,
5783
+ "id": 494,
5744
5784
  "name": "deselect",
5745
5785
  "kind": 2048,
5746
5786
  "kindString": "Method",
@@ -5750,13 +5790,13 @@
5750
5790
  "sources": [
5751
5791
  {
5752
5792
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
5753
- "line": 124,
5793
+ "line": 133,
5754
5794
  "character": 15
5755
5795
  }
5756
5796
  ],
5757
5797
  "signatures": [
5758
5798
  {
5759
- "id": 492,
5799
+ "id": 495,
5760
5800
  "name": "deselect",
5761
5801
  "kind": 4096,
5762
5802
  "kindString": "Call signature",
@@ -5780,7 +5820,7 @@
5780
5820
  ]
5781
5821
  },
5782
5822
  {
5783
- "id": 501,
5823
+ "id": 504,
5784
5824
  "name": "expand",
5785
5825
  "kind": 2048,
5786
5826
  "kindString": "Method",
@@ -5790,13 +5830,13 @@
5790
5830
  "sources": [
5791
5831
  {
5792
5832
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
5793
- "line": 172,
5833
+ "line": 181,
5794
5834
  "character": 15
5795
5835
  }
5796
5836
  ],
5797
5837
  "signatures": [
5798
5838
  {
5799
- "id": 502,
5839
+ "id": 505,
5800
5840
  "name": "expand",
5801
5841
  "kind": 4096,
5802
5842
  "kindString": "Call signature",
@@ -5820,7 +5860,7 @@
5820
5860
  ]
5821
5861
  },
5822
5862
  {
5823
- "id": 493,
5863
+ "id": 496,
5824
5864
  "name": "getContentText",
5825
5865
  "kind": 2048,
5826
5866
  "kindString": "Method",
@@ -5830,13 +5870,13 @@
5830
5870
  "sources": [
5831
5871
  {
5832
5872
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
5833
- "line": 138,
5873
+ "line": 147,
5834
5874
  "character": 15
5835
5875
  }
5836
5876
  ],
5837
5877
  "signatures": [
5838
5878
  {
5839
- "id": 494,
5879
+ "id": 497,
5840
5880
  "name": "getContentText",
5841
5881
  "kind": 4096,
5842
5882
  "kindString": "Call signature",
@@ -5860,7 +5900,7 @@
5860
5900
  ]
5861
5901
  },
5862
5902
  {
5863
- "id": 495,
5903
+ "id": 498,
5864
5904
  "name": "getTitleText",
5865
5905
  "kind": 2048,
5866
5906
  "kindString": "Method",
@@ -5870,13 +5910,13 @@
5870
5910
  "sources": [
5871
5911
  {
5872
5912
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
5873
- "line": 145,
5913
+ "line": 154,
5874
5914
  "character": 15
5875
5915
  }
5876
5916
  ],
5877
5917
  "signatures": [
5878
5918
  {
5879
- "id": 496,
5919
+ "id": 499,
5880
5920
  "name": "getTitleText",
5881
5921
  "kind": 4096,
5882
5922
  "kindString": "Call signature",
@@ -5900,7 +5940,7 @@
5900
5940
  ]
5901
5941
  },
5902
5942
  {
5903
- "id": 512,
5943
+ "id": 515,
5904
5944
  "name": "host",
5905
5945
  "kind": 2048,
5906
5946
  "kindString": "Method",
@@ -5914,7 +5954,7 @@
5914
5954
  ],
5915
5955
  "signatures": [
5916
5956
  {
5917
- "id": 513,
5957
+ "id": 516,
5918
5958
  "name": "host",
5919
5959
  "kind": 4096,
5920
5960
  "kindString": "Call signature",
@@ -5948,7 +5988,7 @@
5948
5988
  }
5949
5989
  },
5950
5990
  {
5951
- "id": 497,
5991
+ "id": 500,
5952
5992
  "name": "isCollapsible",
5953
5993
  "kind": 2048,
5954
5994
  "kindString": "Method",
@@ -5958,13 +5998,13 @@
5958
5998
  "sources": [
5959
5999
  {
5960
6000
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
5961
- "line": 152,
6001
+ "line": 161,
5962
6002
  "character": 15
5963
6003
  }
5964
6004
  ],
5965
6005
  "signatures": [
5966
6006
  {
5967
- "id": 498,
6007
+ "id": 501,
5968
6008
  "name": "isCollapsible",
5969
6009
  "kind": 4096,
5970
6010
  "kindString": "Call signature",
@@ -5988,7 +6028,7 @@
5988
6028
  ]
5989
6029
  },
5990
6030
  {
5991
- "id": 499,
6031
+ "id": 502,
5992
6032
  "name": "isExpanded",
5993
6033
  "kind": 2048,
5994
6034
  "kindString": "Method",
@@ -5998,13 +6038,13 @@
5998
6038
  "sources": [
5999
6039
  {
6000
6040
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6001
- "line": 159,
6041
+ "line": 168,
6002
6042
  "character": 15
6003
6043
  }
6004
6044
  ],
6005
6045
  "signatures": [
6006
6046
  {
6007
- "id": 500,
6047
+ "id": 503,
6008
6048
  "name": "isExpanded",
6009
6049
  "kind": 4096,
6010
6050
  "kindString": "Call signature",
@@ -6028,7 +6068,7 @@
6028
6068
  ]
6029
6069
  },
6030
6070
  {
6031
- "id": 505,
6071
+ "id": 508,
6032
6072
  "name": "isReorderable",
6033
6073
  "kind": 2048,
6034
6074
  "kindString": "Method",
@@ -6038,13 +6078,13 @@
6038
6078
  "sources": [
6039
6079
  {
6040
6080
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6041
- "line": 204,
6081
+ "line": 213,
6042
6082
  "character": 15
6043
6083
  }
6044
6084
  ],
6045
6085
  "signatures": [
6046
6086
  {
6047
- "id": 506,
6087
+ "id": 509,
6048
6088
  "name": "isReorderable",
6049
6089
  "kind": 4096,
6050
6090
  "kindString": "Call signature",
@@ -6068,7 +6108,7 @@
6068
6108
  ]
6069
6109
  },
6070
6110
  {
6071
- "id": 471,
6111
+ "id": 488,
6072
6112
  "name": "isSelectable",
6073
6113
  "kind": 2048,
6074
6114
  "kindString": "Method",
@@ -6078,13 +6118,13 @@
6078
6118
  "sources": [
6079
6119
  {
6080
6120
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6081
- "line": 57,
6121
+ "line": 98,
6082
6122
  "character": 15
6083
6123
  }
6084
6124
  ],
6085
6125
  "signatures": [
6086
6126
  {
6087
- "id": 472,
6127
+ "id": 489,
6088
6128
  "name": "isSelectable",
6089
6129
  "kind": 4096,
6090
6130
  "kindString": "Call signature",
@@ -6108,7 +6148,7 @@
6108
6148
  ]
6109
6149
  },
6110
6150
  {
6111
- "id": 473,
6151
+ "id": 490,
6112
6152
  "name": "isSelected",
6113
6153
  "kind": 2048,
6114
6154
  "kindString": "Method",
@@ -6118,13 +6158,13 @@
6118
6158
  "sources": [
6119
6159
  {
6120
6160
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6121
- "line": 64,
6161
+ "line": 105,
6122
6162
  "character": 15
6123
6163
  }
6124
6164
  ],
6125
6165
  "signatures": [
6126
6166
  {
6127
- "id": 474,
6167
+ "id": 491,
6128
6168
  "name": "isSelected",
6129
6169
  "kind": 4096,
6130
6170
  "kindString": "Call signature",
@@ -6148,7 +6188,7 @@
6148
6188
  ]
6149
6189
  },
6150
6190
  {
6151
- "id": 475,
6191
+ "id": 472,
6152
6192
  "name": "queryHarness",
6153
6193
  "kind": 2048,
6154
6194
  "kindString": "Method",
@@ -6158,13 +6198,13 @@
6158
6198
  "sources": [
6159
6199
  {
6160
6200
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6161
- "line": 78,
6201
+ "line": 59,
6162
6202
  "character": 15
6163
6203
  }
6164
6204
  ],
6165
6205
  "signatures": [
6166
6206
  {
6167
- "id": 476,
6207
+ "id": 473,
6168
6208
  "name": "queryHarness",
6169
6209
  "kind": 4096,
6170
6210
  "kindString": "Call signature",
@@ -6174,7 +6214,7 @@
6174
6214
  },
6175
6215
  "typeParameter": [
6176
6216
  {
6177
- "id": 477,
6217
+ "id": 474,
6178
6218
  "name": "T",
6179
6219
  "kind": 131072,
6180
6220
  "kindString": "Type parameter",
@@ -6184,7 +6224,7 @@
6184
6224
  "typeArguments": [
6185
6225
  {
6186
6226
  "type": "reference",
6187
- "id": 477,
6227
+ "id": 474,
6188
6228
  "name": "T"
6189
6229
  }
6190
6230
  ],
@@ -6196,7 +6236,7 @@
6196
6236
  ],
6197
6237
  "parameters": [
6198
6238
  {
6199
- "id": 478,
6239
+ "id": 475,
6200
6240
  "name": "query",
6201
6241
  "kind": 32768,
6202
6242
  "kindString": "Parameter",
@@ -6206,7 +6246,7 @@
6206
6246
  "typeArguments": [
6207
6247
  {
6208
6248
  "type": "reference",
6209
- "id": 477,
6249
+ "id": 474,
6210
6250
  "name": "T"
6211
6251
  }
6212
6252
  ],
@@ -6221,7 +6261,7 @@
6221
6261
  "typeArguments": [
6222
6262
  {
6223
6263
  "type": "reference",
6224
- "id": 477,
6264
+ "id": 474,
6225
6265
  "name": "T"
6226
6266
  }
6227
6267
  ],
@@ -6233,7 +6273,7 @@
6233
6273
  ]
6234
6274
  },
6235
6275
  {
6236
- "id": 479,
6276
+ "id": 476,
6237
6277
  "name": "queryHarnesses",
6238
6278
  "kind": 2048,
6239
6279
  "kindString": "Method",
@@ -6243,13 +6283,13 @@
6243
6283
  "sources": [
6244
6284
  {
6245
6285
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6246
- "line": 87,
6286
+ "line": 68,
6247
6287
  "character": 15
6248
6288
  }
6249
6289
  ],
6250
6290
  "signatures": [
6251
6291
  {
6252
- "id": 480,
6292
+ "id": 477,
6253
6293
  "name": "queryHarnesses",
6254
6294
  "kind": 4096,
6255
6295
  "kindString": "Call signature",
@@ -6259,7 +6299,7 @@
6259
6299
  },
6260
6300
  "typeParameter": [
6261
6301
  {
6262
- "id": 481,
6302
+ "id": 478,
6263
6303
  "name": "T",
6264
6304
  "kind": 131072,
6265
6305
  "kindString": "Type parameter",
@@ -6269,7 +6309,7 @@
6269
6309
  "typeArguments": [
6270
6310
  {
6271
6311
  "type": "reference",
6272
- "id": 481,
6312
+ "id": 478,
6273
6313
  "name": "T"
6274
6314
  }
6275
6315
  ],
@@ -6281,7 +6321,7 @@
6281
6321
  ],
6282
6322
  "parameters": [
6283
6323
  {
6284
- "id": 482,
6324
+ "id": 479,
6285
6325
  "name": "harness",
6286
6326
  "kind": 32768,
6287
6327
  "kindString": "Parameter",
@@ -6291,7 +6331,7 @@
6291
6331
  "typeArguments": [
6292
6332
  {
6293
6333
  "type": "reference",
6294
- "id": 481,
6334
+ "id": 478,
6295
6335
  "name": "T"
6296
6336
  }
6297
6337
  ],
@@ -6308,7 +6348,7 @@
6308
6348
  "type": "array",
6309
6349
  "elementType": {
6310
6350
  "type": "reference",
6311
- "id": 481,
6351
+ "id": 478,
6312
6352
  "name": "T"
6313
6353
  }
6314
6354
  }
@@ -6321,7 +6361,7 @@
6321
6361
  ]
6322
6362
  },
6323
6363
  {
6324
- "id": 483,
6364
+ "id": 480,
6325
6365
  "name": "querySelector",
6326
6366
  "kind": 2048,
6327
6367
  "kindString": "Method",
@@ -6331,13 +6371,13 @@
6331
6371
  "sources": [
6332
6372
  {
6333
6373
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6334
- "line": 96,
6374
+ "line": 77,
6335
6375
  "character": 15
6336
6376
  }
6337
6377
  ],
6338
6378
  "signatures": [
6339
6379
  {
6340
- "id": 484,
6380
+ "id": 481,
6341
6381
  "name": "querySelector",
6342
6382
  "kind": 4096,
6343
6383
  "kindString": "Call signature",
@@ -6347,7 +6387,7 @@
6347
6387
  },
6348
6388
  "parameters": [
6349
6389
  {
6350
- "id": 485,
6390
+ "id": 482,
6351
6391
  "name": "selector",
6352
6392
  "kind": 32768,
6353
6393
  "kindString": "Parameter",
@@ -6376,7 +6416,7 @@
6376
6416
  ]
6377
6417
  },
6378
6418
  {
6379
- "id": 486,
6419
+ "id": 483,
6380
6420
  "name": "querySelectorAll",
6381
6421
  "kind": 2048,
6382
6422
  "kindString": "Method",
@@ -6386,13 +6426,13 @@
6386
6426
  "sources": [
6387
6427
  {
6388
6428
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6389
- "line": 103,
6429
+ "line": 84,
6390
6430
  "character": 15
6391
6431
  }
6392
6432
  ],
6393
6433
  "signatures": [
6394
6434
  {
6395
- "id": 487,
6435
+ "id": 484,
6396
6436
  "name": "querySelectorAll",
6397
6437
  "kind": 4096,
6398
6438
  "kindString": "Call signature",
@@ -6402,7 +6442,7 @@
6402
6442
  },
6403
6443
  "parameters": [
6404
6444
  {
6405
- "id": 488,
6445
+ "id": 485,
6406
6446
  "name": "selector",
6407
6447
  "kind": 32768,
6408
6448
  "kindString": "Parameter",
@@ -6434,7 +6474,7 @@
6434
6474
  ]
6435
6475
  },
6436
6476
  {
6437
- "id": 489,
6477
+ "id": 492,
6438
6478
  "name": "select",
6439
6479
  "kind": 2048,
6440
6480
  "kindString": "Method",
@@ -6444,13 +6484,13 @@
6444
6484
  "sources": [
6445
6485
  {
6446
6486
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6447
- "line": 110,
6487
+ "line": 119,
6448
6488
  "character": 15
6449
6489
  }
6450
6490
  ],
6451
6491
  "signatures": [
6452
6492
  {
6453
- "id": 490,
6493
+ "id": 493,
6454
6494
  "name": "select",
6455
6495
  "kind": 4096,
6456
6496
  "kindString": "Call signature",
@@ -6474,7 +6514,7 @@
6474
6514
  ]
6475
6515
  },
6476
6516
  {
6477
- "id": 507,
6517
+ "id": 510,
6478
6518
  "name": "sendToTop",
6479
6519
  "kind": 2048,
6480
6520
  "kindString": "Method",
@@ -6484,13 +6524,13 @@
6484
6524
  "sources": [
6485
6525
  {
6486
6526
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6487
- "line": 211,
6527
+ "line": 220,
6488
6528
  "character": 15
6489
6529
  }
6490
6530
  ],
6491
6531
  "signatures": [
6492
6532
  {
6493
- "id": 508,
6533
+ "id": 511,
6494
6534
  "name": "sendToTop",
6495
6535
  "kind": 4096,
6496
6536
  "kindString": "Call signature",
@@ -6525,7 +6565,7 @@
6525
6565
  "sources": [
6526
6566
  {
6527
6567
  "fileName": "projects/lists/src/testing/repeater/repeater-item-harness.ts",
6528
- "line": 42,
6568
+ "line": 44,
6529
6569
  "character": 16
6530
6570
  }
6531
6571
  ],
@@ -6581,23 +6621,24 @@
6581
6621
  "title": "Methods",
6582
6622
  "kind": 2048,
6583
6623
  "children": [
6584
- 503,
6585
- 491,
6586
- 501,
6587
- 493,
6588
- 495,
6589
- 512,
6590
- 497,
6591
- 499,
6592
- 505,
6593
- 471,
6594
- 473,
6595
- 475,
6596
- 479,
6597
- 483,
6598
6624
  486,
6599
- 489,
6600
- 507,
6625
+ 506,
6626
+ 494,
6627
+ 504,
6628
+ 496,
6629
+ 498,
6630
+ 515,
6631
+ 500,
6632
+ 502,
6633
+ 508,
6634
+ 488,
6635
+ 490,
6636
+ 472,
6637
+ 476,
6638
+ 480,
6639
+ 483,
6640
+ 492,
6641
+ 510,
6601
6642
  454
6602
6643
  ]
6603
6644
  }
@@ -6747,12 +6788,12 @@
6747
6788
  {
6748
6789
  "fileName": "repeater-demo.component.spec.ts",
6749
6790
  "filePath": "/projects/lists/documentation/code-examples/repeater/add-remove/repeater-demo.component.spec.ts",
6750
- "rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport {\n SkyRepeaterHarness,\n SkyRepeaterItemHarness,\n} from '@skyux/lists/testing';\n\nimport { RepeaterDemoComponent } from './repeater-demo.component';\nimport { RepeaterDemoModule } from './repeater-demo.module';\n\ndescribe('Repeater add remove demo', () => {\n async function setupTest(): Promise<{\n repeaterHarness: SkyRepeaterHarness | null;\n repeaterItems: SkyRepeaterItemHarness[] | null;\n fixture: ComponentFixture<RepeaterDemoComponent>;\n }> {\n const fixture = TestBed.createComponent(RepeaterDemoComponent);\n const loader = TestbedHarnessEnvironment.loader(fixture);\n\n const repeaterHarness = await loader.getHarness(\n SkyRepeaterHarness.with({ dataSkyId: 'repeater-demo' })\n );\n\n const repeaterItems = await repeaterHarness.getRepeaterItems();\n\n return { repeaterHarness, repeaterItems, fixture };\n }\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n imports: [RepeaterDemoModule, NoopAnimationsModule],\n });\n });\n\n it('should allow items to be expanded and collapsed', async () => {\n const { repeaterItems } = await setupTest();\n let first = true;\n\n for (const item of repeaterItems!) {\n await expectAsync(item.isCollapsible()).toBeResolvedTo(true);\n // in single expand mode, the first item is expanded by default\n await expectAsync(item.isExpanded()).toBeResolvedTo(first ? true : false);\n first = false;\n await item.collapse();\n await expectAsync(item.isExpanded()).toBeResolvedTo(false);\n await item.expand();\n await expectAsync(item.isExpanded()).toBeResolvedTo(true);\n }\n });\n\n it('should allow items to be reordered', async () => {\n const { repeaterHarness } = await setupTest();\n\n const expectedContent = [\n {\n title: 'Call Robert Hernandez Completed',\n body: 'Robert recently gave a very generous gift. We should call him to thank him.',\n },\n {\n title: 'Send invitation to Spring Ball Past due',\n body: \"The Spring Ball is coming up soon. Let's get those invitations out!\",\n },\n ];\n\n let repeaterItems = await repeaterHarness?.getRepeaterItems();\n expect(repeaterItems).toBeDefined();\n expect(repeaterItems?.length).toBe(2);\n\n for (const item of repeaterItems!) {\n await expectAsync(item.isReorderable()).toBeResolvedTo(true);\n }\n\n await expectAsync(repeaterItems?.[1].getTitleText()).toBeResolvedTo(\n expectedContent[1].title\n );\n await repeaterItems?.[1].sendToTop();\n\n repeaterItems = await repeaterHarness?.getRepeaterItems();\n await expectAsync(repeaterItems?.[1].getTitleText()).toBeResolvedTo(\n expectedContent[0].title\n );\n });\n\n it('should allow items to be added and removed', async () => {\n const { repeaterHarness, fixture } = await setupTest();\n\n let repeaterItems = await repeaterHarness?.getRepeaterItems();\n expect(repeaterItems).toBeDefined();\n expect(repeaterItems?.length).toBe(2);\n\n for (const item of repeaterItems!) {\n await expectAsync(item.isSelectable()).toBeResolvedTo(true);\n }\n\n const addButton = fixture.nativeElement.querySelector(\n '[data-sky-id=\"add-button\"]'\n );\n const removeButton = fixture.nativeElement.querySelector(\n '[data-sky-id=\"remove-button\"]'\n );\n\n addButton.click();\n fixture.detectChanges();\n\n repeaterItems = await repeaterHarness?.getRepeaterItems();\n expect(repeaterItems).toBeDefined();\n expect(repeaterItems?.length).toBe(3);\n\n await expectAsync(repeaterItems?.[0].isSelected()).toBeResolvedTo(false);\n await repeaterItems?.[0].select();\n await expectAsync(repeaterItems?.[0].isSelected()).toBeResolvedTo(true);\n await expectAsync(repeaterItems?.[1].isSelected()).toBeResolvedTo(false);\n await repeaterItems?.[1].select();\n await expectAsync(repeaterItems?.[1].isSelected()).toBeResolvedTo(true);\n\n removeButton.click();\n fixture.detectChanges();\n\n repeaterItems = await repeaterHarness?.getRepeaterItems();\n expect(repeaterItems).toBeDefined();\n expect(repeaterItems?.length).toBe(1);\n });\n});\n"
6791
+ "rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport {\n SkyRepeaterHarness,\n SkyRepeaterItemHarness,\n} from '@skyux/lists/testing';\n\nimport { RepeaterDemoComponent } from './repeater-demo.component';\nimport { RepeaterDemoModule } from './repeater-demo.module';\n\ndescribe('Repeater add remove demo', () => {\n async function setupTest(): Promise<{\n repeaterHarness: SkyRepeaterHarness | null;\n repeaterItems: SkyRepeaterItemHarness[] | null;\n fixture: ComponentFixture<RepeaterDemoComponent>;\n }> {\n const fixture = TestBed.createComponent(RepeaterDemoComponent);\n const loader = TestbedHarnessEnvironment.loader(fixture);\n\n const repeaterHarness = await loader.getHarness(\n SkyRepeaterHarness.with({ dataSkyId: 'repeater-demo' })\n );\n\n const repeaterItems = await repeaterHarness.getRepeaterItems();\n\n return { repeaterHarness, repeaterItems, fixture };\n }\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n imports: [RepeaterDemoModule, NoopAnimationsModule],\n });\n });\n\n it('should allow items to be expanded and collapsed', async () => {\n const { repeaterItems } = await setupTest();\n let first = true;\n\n for (const item of repeaterItems!) {\n await expectAsync(item.isCollapsible()).toBeResolvedTo(true);\n // in single expand mode, the first item is expanded by default\n await expectAsync(item.isExpanded()).toBeResolvedTo(first ? true : false);\n first = false;\n await item.collapse();\n await expectAsync(item.isExpanded()).toBeResolvedTo(false);\n await item.expand();\n await expectAsync(item.isExpanded()).toBeResolvedTo(true);\n }\n });\n\n it('should allow items to be reordered', async () => {\n const { repeaterHarness } = await setupTest();\n\n const expectedContent = [\n {\n title: 'Call Robert Hernandez Completed',\n body: 'Robert recently gave a very generous gift. We should call him to thank him.',\n },\n {\n title: 'Send invitation to Spring Ball Past due',\n body: \"The Spring Ball is coming up soon. Let's get those invitations out!\",\n },\n {\n title: 'Assign prospects Due tomorrow',\n body: 'There are 14 new prospects who are not assigned to fundraisers.',\n },\n {\n title: 'Process gift receipts Due next week',\n body: 'There are 28 recent gifts that are not receipted.',\n },\n ];\n\n let repeaterItems = await repeaterHarness?.getRepeaterItems();\n expect(repeaterItems).toBeDefined();\n expect(repeaterItems?.length).toBe(expectedContent.length);\n\n if (repeaterItems) {\n for (const item of repeaterItems) {\n await expectAsync(item.isReorderable()).toBeResolvedTo(true);\n }\n\n await expectAsync(repeaterItems?.[1].getTitleText()).toBeResolvedTo(\n expectedContent[1].title\n );\n await repeaterItems?.[1].sendToTop();\n\n repeaterItems = await repeaterHarness?.getRepeaterItems();\n await expectAsync(repeaterItems?.[1].getTitleText()).toBeResolvedTo(\n expectedContent[0].title\n );\n }\n });\n\n it('should allow items to be added and removed', async () => {\n const { repeaterHarness, fixture } = await setupTest();\n\n let repeaterItems = await repeaterHarness?.getRepeaterItems();\n expect(repeaterItems).toBeDefined();\n expect(repeaterItems?.length).toBe(4);\n\n if (repeaterItems) {\n for (const item of repeaterItems) {\n await expectAsync(item.isSelectable()).toBeResolvedTo(true);\n }\n\n const addButton = fixture.nativeElement.querySelector(\n '[data-sky-id=\"add-button\"]'\n );\n const removeButton = fixture.nativeElement.querySelector(\n '[data-sky-id=\"remove-button\"]'\n );\n\n addButton.click();\n fixture.detectChanges();\n\n repeaterItems = await repeaterHarness?.getRepeaterItems();\n expect(repeaterItems).toBeDefined();\n expect(repeaterItems?.length).toBe(5);\n\n await expectAsync(repeaterItems?.[0].isSelected()).toBeResolvedTo(false);\n await repeaterItems?.[0].select();\n await expectAsync(repeaterItems?.[0].isSelected()).toBeResolvedTo(true);\n await expectAsync(repeaterItems?.[1].isSelected()).toBeResolvedTo(false);\n await repeaterItems?.[1].select();\n await expectAsync(repeaterItems?.[1].isSelected()).toBeResolvedTo(true);\n\n removeButton.click();\n fixture.detectChanges();\n\n repeaterItems = await repeaterHarness?.getRepeaterItems();\n expect(repeaterItems).toBeDefined();\n expect(repeaterItems?.length).toBe(3);\n }\n });\n});\n"
6751
6792
  },
6752
6793
  {
6753
6794
  "fileName": "repeater-demo.component.ts",
6754
6795
  "filePath": "/projects/lists/documentation/code-examples/repeater/add-remove/repeater-demo.component.ts",
6755
- "rawContents": "import { Component } from '@angular/core';\n\nimport { RepeaterDemoItem } from './repeater-demo-item';\n\nlet nextId = 0;\n\n@Component({\n selector: 'app-repeater-demo',\n templateUrl: './repeater-demo.component.html',\n styleUrls: ['./repeater-demo.component.scss'],\n})\nexport class RepeaterDemoComponent {\n public items: RepeaterDemoItem[] = [\n {\n title: 'Call Robert Hernandez',\n note: 'Robert recently gave a very generous gift. We should call him to thank him.',\n status: 'Completed',\n isSelected: false,\n },\n {\n title: 'Send invitation to Spring Ball',\n note: \"The Spring Ball is coming up soon. Let's get those invitations out!\",\n status: 'Past due',\n isSelected: false,\n },\n ];\n\n public addItem(): void {\n this.items.push({\n title: 'New reminder ' + ++nextId,\n note: 'This is a new reminder',\n status: 'Active',\n isSelected: false,\n });\n }\n\n public changeItems(tags: RepeaterDemoItem[]): void {\n console.log('Tags in order ', tags);\n }\n\n public onActionClicked(buttonText: string): void {\n alert(buttonText + ' was clicked!');\n }\n\n public removeItems(): void {\n this.items = this.items.filter((item) => !item.isSelected);\n }\n}\n"
6796
+ "rawContents": "import { Component } from '@angular/core';\n\nimport { RepeaterDemoItem } from './repeater-demo-item';\n\nlet nextId = 0;\n\n@Component({\n selector: 'app-repeater-demo',\n templateUrl: './repeater-demo.component.html',\n styleUrls: ['./repeater-demo.component.scss'],\n})\nexport class RepeaterDemoComponent {\n public items: RepeaterDemoItem[] = [\n {\n title: 'Call Robert Hernandez',\n note: 'Robert recently gave a very generous gift. We should call him to thank him.',\n status: 'Completed',\n isSelected: false,\n },\n {\n title: 'Send invitation to Spring Ball',\n note: \"The Spring Ball is coming up soon. Let's get those invitations out!\",\n status: 'Past due',\n isSelected: false,\n },\n {\n title: 'Assign prospects',\n note: 'There are 14 new prospects who are not assigned to fundraisers.',\n status: 'Due tomorrow',\n isSelected: false,\n },\n {\n title: 'Process gift receipts',\n note: 'There are 28 recent gifts that are not receipted.',\n status: 'Due next week',\n isSelected: false,\n },\n ];\n\n public addItem(): void {\n this.items.push({\n title: 'New reminder ' + ++nextId,\n note: 'This is a new reminder',\n status: 'Active',\n isSelected: false,\n });\n }\n\n public changeItems(tags: RepeaterDemoItem[]): void {\n console.log('Tags in order ', tags);\n }\n\n public onActionClicked(buttonText: string): void {\n alert(buttonText + ' was clicked!');\n }\n\n public removeItems(): void {\n this.items = this.items.filter((item) => !item.isSelected);\n }\n}\n"
6756
6797
  },
6757
6798
  {
6758
6799
  "fileName": "repeater-demo.module.ts",
@@ -6772,18 +6813,43 @@
6772
6813
  {
6773
6814
  "fileName": "repeater-demo.component.spec.ts",
6774
6815
  "filePath": "/projects/lists/documentation/code-examples/repeater/basic/repeater-demo.component.spec.ts",
6775
- "rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport {\n SkyRepeaterHarness,\n SkyRepeaterItemHarness,\n} from '@skyux/lists/testing';\n\nimport { RepeaterDemoComponent } from './repeater-demo.component';\nimport { RepeaterDemoModule } from './repeater-demo.module';\n\ndescribe('Repeater basic demo', () => {\n async function setupTest(): Promise<{\n repeaterHarness: SkyRepeaterHarness | null;\n repeaterItems: SkyRepeaterItemHarness[] | null;\n fixture: ComponentFixture<RepeaterDemoComponent>;\n }> {\n const fixture = TestBed.createComponent(RepeaterDemoComponent);\n const loader = TestbedHarnessEnvironment.loader(fixture);\n\n const repeaterHarness = await loader.getHarness(\n SkyRepeaterHarness.with({ dataSkyId: 'repeater-demo' })\n );\n\n const repeaterItems = await repeaterHarness.getRepeaterItems();\n\n return { repeaterHarness, repeaterItems, fixture };\n }\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n imports: [RepeaterDemoModule, NoopAnimationsModule],\n });\n });\n\n it('should display the repeater item contents', async () => {\n const { repeaterItems } = await setupTest();\n\n const expectedContent = [\n {\n title: 'Call Robert Hernandez Completed',\n body: 'Robert recently gave a very generous gift. We should call him to thank him.',\n },\n {\n title: 'Send invitation to Spring Ball Past due',\n body: \"The Spring Ball is coming up soon. Let's get those invitations out!\",\n },\n ];\n\n for (let i = 0; i < repeaterItems!.length; i++) {\n await expectAsync(repeaterItems![i].getTitleText()).toBeResolvedTo(\n expectedContent[i].title\n );\n await expectAsync(repeaterItems![i].getContentText()).toBeResolvedTo(\n expectedContent[i].body\n );\n }\n });\n});\n"
6816
+ "rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport {\n SkyRepeaterHarness,\n SkyRepeaterItemHarness,\n} from '@skyux/lists/testing';\n\nimport { RepeaterDemoComponent } from './repeater-demo.component';\nimport { RepeaterDemoModule } from './repeater-demo.module';\n\ndescribe('Repeater basic demo', () => {\n async function setupTest(): Promise<{\n repeaterHarness: SkyRepeaterHarness | null;\n repeaterItems: SkyRepeaterItemHarness[] | null;\n fixture: ComponentFixture<RepeaterDemoComponent>;\n }> {\n const fixture = TestBed.createComponent(RepeaterDemoComponent);\n const loader = TestbedHarnessEnvironment.loader(fixture);\n\n const repeaterHarness = await loader.getHarness(\n SkyRepeaterHarness.with({ dataSkyId: 'repeater-demo' })\n );\n\n const repeaterItems = await repeaterHarness.getRepeaterItems();\n\n return { repeaterHarness, repeaterItems, fixture };\n }\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n imports: [RepeaterDemoModule, NoopAnimationsModule],\n });\n });\n\n it('should display the repeater item contents', async () => {\n const { repeaterItems } = await setupTest();\n\n const expectedContent = [\n {\n title: 'Call Robert Hernandez Completed',\n body: 'Robert recently gave a very generous gift. We should call him to thank him.',\n },\n {\n title: 'Send invitation to Spring Ball Past due',\n body: \"The Spring Ball is coming up soon. Let's get those invitations out!\",\n },\n {\n title: 'Assign prospects Due tomorrow',\n body: 'There are 14 new prospects who are not assigned to fundraisers.',\n },\n {\n title: 'Process gift receipts Due next week',\n body: 'There are 28 recent gifts that are not receipted.',\n },\n ];\n\n expect(repeaterItems?.length).toBe(expectedContent.length);\n\n if (repeaterItems) {\n for (let i = 0; i < repeaterItems.length; i++) {\n await expectAsync(repeaterItems[i].getTitleText()).toBeResolvedTo(\n expectedContent[i].title\n );\n await expectAsync(repeaterItems[i].getContentText()).toBeResolvedTo(\n expectedContent[i].body\n );\n }\n }\n });\n});\n"
6776
6817
  },
6777
6818
  {
6778
6819
  "fileName": "repeater-demo.component.ts",
6779
6820
  "filePath": "/projects/lists/documentation/code-examples/repeater/basic/repeater-demo.component.ts",
6780
- "rawContents": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-repeater-demo',\n templateUrl: './repeater-demo.component.html',\n styleUrls: ['./repeater-demo.component.scss'],\n})\nexport class RepeaterDemoComponent {\n public items: any[] = [\n {\n title: 'Call Robert Hernandez',\n note: 'Robert recently gave a very generous gift. We should call him to thank him.',\n status: 'Completed',\n },\n {\n title: 'Send invitation to Spring Ball',\n note: \"The Spring Ball is coming up soon. Let's get those invitations out!\",\n status: 'Past due',\n },\n ];\n\n public onActionClicked(buttonText: string): void {\n alert(buttonText + ' was clicked!');\n }\n}\n"
6821
+ "rawContents": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-repeater-demo',\n templateUrl: './repeater-demo.component.html',\n styleUrls: ['./repeater-demo.component.scss'],\n})\nexport class RepeaterDemoComponent {\n public items: any[] = [\n {\n title: 'Call Robert Hernandez',\n note: 'Robert recently gave a very generous gift. We should call him to thank him.',\n status: 'Completed',\n },\n {\n title: 'Send invitation to Spring Ball',\n note: \"The Spring Ball is coming up soon. Let's get those invitations out!\",\n status: 'Past due',\n },\n {\n title: 'Assign prospects',\n note: 'There are 14 new prospects who are not assigned to fundraisers.',\n status: 'Due tomorrow',\n },\n {\n title: 'Process gift receipts',\n note: 'There are 28 recent gifts that are not receipted.',\n status: 'Due next week',\n },\n ];\n\n public onActionClicked(buttonText: string): void {\n alert(buttonText + ' was clicked!');\n }\n}\n"
6781
6822
  },
6782
6823
  {
6783
6824
  "fileName": "repeater-demo.module.ts",
6784
6825
  "filePath": "/projects/lists/documentation/code-examples/repeater/basic/repeater-demo.module.ts",
6785
6826
  "rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyRepeaterModule } from '@skyux/lists';\nimport { SkyDropdownModule } from '@skyux/popovers';\n\nimport { RepeaterDemoComponent } from './repeater-demo.component';\n\n@NgModule({\n imports: [CommonModule, SkyDropdownModule, SkyRepeaterModule],\n declarations: [RepeaterDemoComponent],\n exports: [RepeaterDemoComponent],\n})\nexport class RepeaterDemoModule {}\n"
6786
6827
  },
6828
+ {
6829
+ "fileName": "repeater-demo-item.ts",
6830
+ "filePath": "/projects/lists/documentation/code-examples/repeater/inline-form/repeater-demo-item.ts",
6831
+ "rawContents": "export interface RepeaterDemoItem {\n id: string;\n title: string | undefined;\n note: string | undefined;\n}\n"
6832
+ },
6833
+ {
6834
+ "fileName": "repeater-demo.component.html",
6835
+ "filePath": "/projects/lists/documentation/code-examples/repeater/inline-form/repeater-demo.component.html",
6836
+ "rawContents": "<sky-repeater>\n <sky-repeater-item\n *ngFor=\"let item of items\"\n [inlineFormConfig]=\"inlineFormConfig\"\n [inlineFormTemplate]=\"inlineFormTemplate\"\n [showInlineForm]=\"activeInlineFormId === item.id\"\n (inlineFormClose)=\"onInlineFormClose($event)\"\n >\n <sky-repeater-item-title class=\"demo-repeater-flex\">\n <div class=\"demo-repeater-item-title sky-font-emphasized\">\n {{ item.title }}\n </div>\n <div>\n <button\n aria-label=\"Edit\"\n class=\"sky-btn sky-btn-link sky-btn-link-inline sky-no-focus sky-demo-btn-edit\"\n type=\"button\"\n (click)=\"showInlineForm(item)\"\n >\n <sky-icon icon=\"pencil\"> </sky-icon>\n </button>\n </div>\n </sky-repeater-item-title>\n\n <sky-repeater-item-content>\n {{ item.note }}\n </sky-repeater-item-content>\n </sky-repeater-item>\n</sky-repeater>\n\n<ng-template #inlineFormTemplate>\n <form novalidate [formGroup]=\"myForm\">\n <div class=\"sky-form-group\">\n <sky-input-box>\n <label class=\"sky-control-label\" [for]=\"myTitle.id\"> Title </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"title\"\n skyId\n type=\"text\"\n #myTitle=\"skyId\"\n />\n </sky-input-box>\n </div>\n <div class=\"sky-form-group\">\n <sky-input-box>\n <label class=\"sky-control-label\" [for]=\"myNote.id\"> Note </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"note\"\n skyId\n type=\"text\"\n #myNote=\"skyId\"\n />\n </sky-input-box>\n </div>\n </form>\n</ng-template>\n"
6837
+ },
6838
+ {
6839
+ "fileName": "repeater-demo.component.scss",
6840
+ "filePath": "/projects/lists/documentation/code-examples/repeater/inline-form/repeater-demo.component.scss",
6841
+ "rawContents": ".demo-repeater-flex {\n display: flex;\n flex-wrap: wrap;\n\n .demo-repeater-item-title {\n flex-grow: 1;\n }\n}\n"
6842
+ },
6843
+ {
6844
+ "fileName": "repeater-demo.component.ts",
6845
+ "filePath": "/projects/lists/documentation/code-examples/repeater/inline-form/repeater-demo.component.ts",
6846
+ "rawContents": "import { Component } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig,\n} from '@skyux/inline-form';\n\nimport { RepeaterDemoItem } from './repeater-demo-item';\n\n@Component({\n selector: 'app-repeater-demo',\n templateUrl: './repeater-demo.component.html',\n styleUrls: ['./repeater-demo.component.scss'],\n})\nexport class RepeaterDemoComponent {\n public activeInlineFormId: string | undefined;\n\n public inlineFormConfig: SkyInlineFormConfig = {\n buttonLayout: SkyInlineFormButtonLayout.SaveCancel,\n };\n\n public items: RepeaterDemoItem[] = [\n {\n id: '1',\n title: '2019 Spring Gala',\n note: 'Gala for friends and family',\n },\n {\n id: '2',\n title: '2019 Special Winter Event',\n note: 'A special event',\n },\n {\n id: '3',\n title: '2019 Donor Appreciation Event',\n note: 'Event for all donors and families',\n },\n {\n id: '4',\n title: '2020 Spring Gala',\n note: 'Gala for friends and family',\n },\n ];\n\n public myForm: FormGroup;\n\n constructor(formBuilder: FormBuilder) {\n this.myForm = formBuilder.group({\n id: new FormControl(),\n title: new FormControl(),\n note: new FormControl(),\n });\n }\n\n public showInlineForm(item: RepeaterDemoItem): void {\n this.activeInlineFormId = item.id;\n this.myForm.patchValue({\n note: item.note,\n title: item.title,\n });\n }\n\n public onInlineFormClose(args: SkyInlineFormCloseArgs): void {\n if (args.reason === 'save') {\n const found = this.items.find(\n (item) => item.id === this.activeInlineFormId\n );\n if (found) {\n found.note = this.myForm.get('note')?.value;\n found.title = this.myForm.get('title')?.value;\n }\n }\n\n this.myForm.patchValue({\n note: undefined,\n title: undefined,\n });\n\n // Close the active form.\n this.activeInlineFormId = undefined;\n }\n}\n"
6847
+ },
6848
+ {
6849
+ "fileName": "repeater-demo.module.ts",
6850
+ "filePath": "/projects/lists/documentation/code-examples/repeater/inline-form/repeater-demo.module.ts",
6851
+ "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 { SkyIconModule } from '@skyux/indicators';\nimport { SkyInlineFormModule } from '@skyux/inline-form';\nimport { SkyRepeaterModule } from '@skyux/lists';\n\nimport { RepeaterDemoComponent } from './repeater-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIconModule,\n SkyIdModule,\n SkyInlineFormModule,\n SkyInputBoxModule,\n SkyRepeaterModule,\n ],\n exports: [RepeaterDemoComponent],\n declarations: [RepeaterDemoComponent],\n})\nexport class RepeaterDemoModule {}\n"
6852
+ },
6787
6853
  {
6788
6854
  "fileName": "repeater-demo-item.ts",
6789
6855
  "filePath": "/projects/lists/documentation/code-examples/sort/basic/repeater-demo-item.ts",