@skyux/indicators 6.17.1 → 6.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/documentation.json +519 -3
  2. package/package.json +5 -5
@@ -32,7 +32,9 @@
32
32
  "SkyIconVariantType": "type-alias-skyiconvarianttype",
33
33
  "SkyIndicatorDescriptionType": "type-alias-skyindicatordescriptiontype",
34
34
  "SkyIndicatorIconType": "type-alias-skyindicatoricontype",
35
- "SkyLabelType": "type-alias-skylabeltype"
35
+ "SkyLabelType": "type-alias-skylabeltype",
36
+ "SkyAlertHarness": "class-skyalertharness",
37
+ "SkyAlertHarnessFilters": "interface-skyalertharnessfilters"
36
38
  },
37
39
  "typedoc": {
38
40
  "id": 0,
@@ -6123,6 +6125,515 @@
6123
6125
  }
6124
6126
  ]
6125
6127
  }
6128
+ },
6129
+ {
6130
+ "id": 565,
6131
+ "name": "SkyAlertHarness",
6132
+ "kind": 128,
6133
+ "kindString": "Class",
6134
+ "flags": {},
6135
+ "comment": {
6136
+ "shortText": "Harness for interacting with an alert component in tests."
6137
+ },
6138
+ "children": [
6139
+ {
6140
+ "id": 566,
6141
+ "name": "hostSelector",
6142
+ "kind": 1024,
6143
+ "kindString": "Property",
6144
+ "flags": {
6145
+ "isPublic": true,
6146
+ "isStatic": true
6147
+ },
6148
+ "sources": [
6149
+ {
6150
+ "fileName": "projects/indicators/src/testing/alert/alert-harness.ts",
6151
+ "line": 11,
6152
+ "character": 16
6153
+ }
6154
+ ],
6155
+ "type": {
6156
+ "type": "intrinsic",
6157
+ "name": "string"
6158
+ },
6159
+ "defaultValue": "'sky-alert'"
6160
+ },
6161
+ {
6162
+ "id": 585,
6163
+ "name": "close",
6164
+ "kind": 2048,
6165
+ "kindString": "Method",
6166
+ "flags": {
6167
+ "isPublic": true
6168
+ },
6169
+ "sources": [
6170
+ {
6171
+ "fileName": "projects/indicators/src/testing/alert/alert-harness.ts",
6172
+ "line": 62,
6173
+ "character": 15
6174
+ }
6175
+ ],
6176
+ "signatures": [
6177
+ {
6178
+ "id": 586,
6179
+ "name": "close",
6180
+ "kind": 4096,
6181
+ "kindString": "Call signature",
6182
+ "flags": {},
6183
+ "comment": {
6184
+ "shortText": "Closes the alert."
6185
+ },
6186
+ "type": {
6187
+ "type": "reference",
6188
+ "typeArguments": [
6189
+ {
6190
+ "type": "intrinsic",
6191
+ "name": "void"
6192
+ }
6193
+ ],
6194
+ "qualifiedName": "Promise",
6195
+ "package": "typescript",
6196
+ "name": "Promise"
6197
+ }
6198
+ }
6199
+ ]
6200
+ },
6201
+ {
6202
+ "id": 581,
6203
+ "name": "getAlertType",
6204
+ "kind": 2048,
6205
+ "kindString": "Method",
6206
+ "flags": {
6207
+ "isPublic": true
6208
+ },
6209
+ "sources": [
6210
+ {
6211
+ "fileName": "projects/indicators/src/testing/alert/alert-harness.ts",
6212
+ "line": 30,
6213
+ "character": 15
6214
+ }
6215
+ ],
6216
+ "signatures": [
6217
+ {
6218
+ "id": 582,
6219
+ "name": "getAlertType",
6220
+ "kind": 4096,
6221
+ "kindString": "Call signature",
6222
+ "flags": {},
6223
+ "comment": {
6224
+ "shortText": "Gets the current alert type."
6225
+ },
6226
+ "type": {
6227
+ "type": "reference",
6228
+ "typeArguments": [
6229
+ {
6230
+ "type": "reference",
6231
+ "id": 360,
6232
+ "name": "SkyIndicatorIconType"
6233
+ }
6234
+ ],
6235
+ "qualifiedName": "Promise",
6236
+ "package": "typescript",
6237
+ "name": "Promise"
6238
+ }
6239
+ }
6240
+ ]
6241
+ },
6242
+ {
6243
+ "id": 583,
6244
+ "name": "getText",
6245
+ "kind": 2048,
6246
+ "kindString": "Method",
6247
+ "flags": {
6248
+ "isPublic": true
6249
+ },
6250
+ "sources": [
6251
+ {
6252
+ "fileName": "projects/indicators/src/testing/alert/alert-harness.ts",
6253
+ "line": 55,
6254
+ "character": 15
6255
+ }
6256
+ ],
6257
+ "signatures": [
6258
+ {
6259
+ "id": 584,
6260
+ "name": "getText",
6261
+ "kind": 4096,
6262
+ "kindString": "Call signature",
6263
+ "flags": {},
6264
+ "comment": {
6265
+ "shortText": "Gets the current alert text."
6266
+ },
6267
+ "type": {
6268
+ "type": "reference",
6269
+ "typeArguments": [
6270
+ {
6271
+ "type": "intrinsic",
6272
+ "name": "string"
6273
+ }
6274
+ ],
6275
+ "qualifiedName": "Promise",
6276
+ "package": "typescript",
6277
+ "name": "Promise"
6278
+ }
6279
+ }
6280
+ ]
6281
+ },
6282
+ {
6283
+ "id": 594,
6284
+ "name": "host",
6285
+ "kind": 2048,
6286
+ "kindString": "Method",
6287
+ "flags": {},
6288
+ "sources": [
6289
+ {
6290
+ "fileName": "node_modules/@angular/cdk/testing/component-harness.d.ts",
6291
+ "line": 221,
6292
+ "character": 4
6293
+ }
6294
+ ],
6295
+ "signatures": [
6296
+ {
6297
+ "id": 595,
6298
+ "name": "host",
6299
+ "kind": 4096,
6300
+ "kindString": "Call signature",
6301
+ "flags": {},
6302
+ "comment": {
6303
+ "shortText": "Gets a `Promise` for the `TestElement` representing the host element of the component."
6304
+ },
6305
+ "type": {
6306
+ "type": "reference",
6307
+ "typeArguments": [
6308
+ {
6309
+ "type": "reference",
6310
+ "qualifiedName": "TestElement",
6311
+ "package": "@angular/cdk",
6312
+ "name": "TestElement"
6313
+ }
6314
+ ],
6315
+ "qualifiedName": "Promise",
6316
+ "package": "typescript",
6317
+ "name": "Promise"
6318
+ },
6319
+ "inheritedFrom": {
6320
+ "type": "reference",
6321
+ "name": "SkyComponentHarness.host"
6322
+ }
6323
+ }
6324
+ ],
6325
+ "inheritedFrom": {
6326
+ "type": "reference",
6327
+ "name": "SkyComponentHarness.host"
6328
+ }
6329
+ },
6330
+ {
6331
+ "id": 589,
6332
+ "name": "isCloseable",
6333
+ "kind": 2048,
6334
+ "kindString": "Method",
6335
+ "flags": {
6336
+ "isPublic": true
6337
+ },
6338
+ "sources": [
6339
+ {
6340
+ "fileName": "projects/indicators/src/testing/alert/alert-harness.ts",
6341
+ "line": 82,
6342
+ "character": 15
6343
+ }
6344
+ ],
6345
+ "signatures": [
6346
+ {
6347
+ "id": 590,
6348
+ "name": "isCloseable",
6349
+ "kind": 4096,
6350
+ "kindString": "Call signature",
6351
+ "flags": {},
6352
+ "comment": {
6353
+ "shortText": "Indicates whether the user can close the alert."
6354
+ },
6355
+ "type": {
6356
+ "type": "reference",
6357
+ "typeArguments": [
6358
+ {
6359
+ "type": "intrinsic",
6360
+ "name": "boolean"
6361
+ }
6362
+ ],
6363
+ "qualifiedName": "Promise",
6364
+ "package": "typescript",
6365
+ "name": "Promise"
6366
+ }
6367
+ }
6368
+ ]
6369
+ },
6370
+ {
6371
+ "id": 587,
6372
+ "name": "isClosed",
6373
+ "kind": 2048,
6374
+ "kindString": "Method",
6375
+ "flags": {
6376
+ "isPublic": true
6377
+ },
6378
+ "sources": [
6379
+ {
6380
+ "fileName": "projects/indicators/src/testing/alert/alert-harness.ts",
6381
+ "line": 73,
6382
+ "character": 15
6383
+ }
6384
+ ],
6385
+ "signatures": [
6386
+ {
6387
+ "id": 588,
6388
+ "name": "isClosed",
6389
+ "kind": 4096,
6390
+ "kindString": "Call signature",
6391
+ "flags": {},
6392
+ "comment": {
6393
+ "shortText": "Indicates whether the user has closed the alert."
6394
+ },
6395
+ "type": {
6396
+ "type": "reference",
6397
+ "typeArguments": [
6398
+ {
6399
+ "type": "intrinsic",
6400
+ "name": "boolean"
6401
+ }
6402
+ ],
6403
+ "qualifiedName": "Promise",
6404
+ "package": "typescript",
6405
+ "name": "Promise"
6406
+ }
6407
+ }
6408
+ ]
6409
+ },
6410
+ {
6411
+ "id": 567,
6412
+ "name": "with",
6413
+ "kind": 2048,
6414
+ "kindString": "Method",
6415
+ "flags": {
6416
+ "isPublic": true,
6417
+ "isStatic": true
6418
+ },
6419
+ "sources": [
6420
+ {
6421
+ "fileName": "projects/indicators/src/testing/alert/alert-harness.ts",
6422
+ "line": 21,
6423
+ "character": 16
6424
+ }
6425
+ ],
6426
+ "signatures": [
6427
+ {
6428
+ "id": 568,
6429
+ "name": "with",
6430
+ "kind": 4096,
6431
+ "kindString": "Call signature",
6432
+ "flags": {},
6433
+ "comment": {
6434
+ "shortText": "Gets a `HarnessPredicate` that can be used to search for a\n`SkyAlertHarness` that meets certain criteria."
6435
+ },
6436
+ "parameters": [
6437
+ {
6438
+ "id": 569,
6439
+ "name": "filters",
6440
+ "kind": 32768,
6441
+ "kindString": "Parameter",
6442
+ "flags": {},
6443
+ "type": {
6444
+ "type": "reference",
6445
+ "id": 614,
6446
+ "name": "SkyAlertHarnessFilters"
6447
+ }
6448
+ }
6449
+ ],
6450
+ "type": {
6451
+ "type": "reference",
6452
+ "typeArguments": [
6453
+ {
6454
+ "type": "reference",
6455
+ "id": 565,
6456
+ "name": "SkyAlertHarness"
6457
+ }
6458
+ ],
6459
+ "qualifiedName": "HarnessPredicate",
6460
+ "package": "@angular/cdk",
6461
+ "name": "HarnessPredicate"
6462
+ }
6463
+ }
6464
+ ]
6465
+ }
6466
+ ],
6467
+ "groups": [
6468
+ {
6469
+ "title": "Constructors",
6470
+ "kind": 512,
6471
+ "children": [
6472
+ 575
6473
+ ]
6474
+ },
6475
+ {
6476
+ "title": "Properties",
6477
+ "kind": 1024,
6478
+ "children": [
6479
+ 566
6480
+ ]
6481
+ },
6482
+ {
6483
+ "title": "Methods",
6484
+ "kind": 2048,
6485
+ "children": [
6486
+ 585,
6487
+ 581,
6488
+ 583,
6489
+ 594,
6490
+ 589,
6491
+ 587,
6492
+ 567
6493
+ ]
6494
+ }
6495
+ ],
6496
+ "sources": [
6497
+ {
6498
+ "fileName": "projects/indicators/src/testing/alert/alert-harness.ts",
6499
+ "line": 10,
6500
+ "character": 13
6501
+ }
6502
+ ],
6503
+ "extendedTypes": [
6504
+ {
6505
+ "type": "reference",
6506
+ "name": "SkyComponentHarness"
6507
+ }
6508
+ ]
6509
+ },
6510
+ {
6511
+ "id": 614,
6512
+ "name": "SkyAlertHarnessFilters",
6513
+ "kind": 256,
6514
+ "kindString": "Interface",
6515
+ "flags": {},
6516
+ "comment": {
6517
+ "shortText": "A set of criteria that can be used to filter a list of SkyAlertHarness instances."
6518
+ },
6519
+ "children": [
6520
+ {
6521
+ "id": 617,
6522
+ "name": "ancestor",
6523
+ "kind": 1024,
6524
+ "kindString": "Property",
6525
+ "flags": {
6526
+ "isOptional": true
6527
+ },
6528
+ "comment": {
6529
+ "shortText": "Only find instances that are nested under an element with the given selector."
6530
+ },
6531
+ "sources": [
6532
+ {
6533
+ "fileName": "node_modules/@angular/cdk/testing/component-harness.d.ts",
6534
+ "line": 351,
6535
+ "character": 4
6536
+ }
6537
+ ],
6538
+ "type": {
6539
+ "type": "intrinsic",
6540
+ "name": "string"
6541
+ },
6542
+ "inheritedFrom": {
6543
+ "type": "reference",
6544
+ "name": "SkyHarnessFilters.ancestor"
6545
+ }
6546
+ },
6547
+ {
6548
+ "id": 615,
6549
+ "name": "dataSkyId",
6550
+ "kind": 1024,
6551
+ "kindString": "Property",
6552
+ "flags": {
6553
+ "isOptional": true
6554
+ },
6555
+ "comment": {
6556
+ "shortText": "Only find instances whose `data-sky-id` attribute matches the given value."
6557
+ },
6558
+ "sources": [
6559
+ {
6560
+ "fileName": "libs/components/core/testing/src/shared/harness-filters.ts",
6561
+ "line": 11,
6562
+ "character": 2
6563
+ }
6564
+ ],
6565
+ "type": {
6566
+ "type": "union",
6567
+ "types": [
6568
+ {
6569
+ "type": "intrinsic",
6570
+ "name": "string"
6571
+ },
6572
+ {
6573
+ "type": "reference",
6574
+ "qualifiedName": "RegExp",
6575
+ "package": "typescript",
6576
+ "name": "RegExp"
6577
+ }
6578
+ ]
6579
+ },
6580
+ "inheritedFrom": {
6581
+ "type": "reference",
6582
+ "name": "SkyHarnessFilters.dataSkyId"
6583
+ }
6584
+ },
6585
+ {
6586
+ "id": 616,
6587
+ "name": "selector",
6588
+ "kind": 1024,
6589
+ "kindString": "Property",
6590
+ "flags": {
6591
+ "isOptional": true
6592
+ },
6593
+ "comment": {
6594
+ "shortText": "Only find instances whose host element matches the given selector."
6595
+ },
6596
+ "sources": [
6597
+ {
6598
+ "fileName": "node_modules/@angular/cdk/testing/component-harness.d.ts",
6599
+ "line": 349,
6600
+ "character": 4
6601
+ }
6602
+ ],
6603
+ "type": {
6604
+ "type": "intrinsic",
6605
+ "name": "string"
6606
+ },
6607
+ "inheritedFrom": {
6608
+ "type": "reference",
6609
+ "name": "SkyHarnessFilters.selector"
6610
+ }
6611
+ }
6612
+ ],
6613
+ "groups": [
6614
+ {
6615
+ "title": "Properties",
6616
+ "kind": 1024,
6617
+ "children": [
6618
+ 617,
6619
+ 615,
6620
+ 616
6621
+ ]
6622
+ }
6623
+ ],
6624
+ "sources": [
6625
+ {
6626
+ "fileName": "projects/indicators/src/testing/alert/alert-harness-filters.ts",
6627
+ "line": 7,
6628
+ "character": 17
6629
+ }
6630
+ ],
6631
+ "extendedTypes": [
6632
+ {
6633
+ "type": "reference",
6634
+ "name": "SkyHarnessFilters"
6635
+ }
6636
+ ]
6126
6637
  }
6127
6638
  ],
6128
6639
  "groups": [
@@ -6140,12 +6651,17 @@
6140
6651
  {
6141
6652
  "fileName": "alert-demo.component.html",
6142
6653
  "filePath": "/projects/indicators/documentation/code-examples/alert/basic/alert-demo.component.html",
6143
- "rawContents": "<sky-alert\n alertType=\"info\"\n [closeable]=\"true\"\n (closedChange)=\"onClosedChange($event)\"\n descriptionType=\"important-info\"\n>\n Info alert message\n</sky-alert>\n"
6654
+ "rawContents": "<sky-alert\n data-sky-id=\"alert-demo\"\n [alertType]=\"days < 8 ? 'danger' : 'warning'\"\n [closeable]=\"days >= 8\"\n [descriptionType]=\"days < 8 ? 'danger' : 'important-warning'\"\n (closedChange)=\"onClosedChange($event)\"\n>\n Your password expires in {{ days }} day(s)!\n</sky-alert>\n"
6655
+ },
6656
+ {
6657
+ "fileName": "alert-demo.component.spec.ts",
6658
+ "filePath": "/projects/indicators/documentation/code-examples/alert/basic/alert-demo.component.spec.ts",
6659
+ "rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { TestBed } from '@angular/core/testing';\nimport { SkyAlertHarness } from '@skyux/indicators/testing';\n\nimport { AlertDemoComponent } from './alert-demo.component';\nimport { AlertDemoModule } from './alert-demo.module';\n\ndescribe('Basic alert', () => {\n async function setupTest(options?: { days?: number }) {\n const fixture = TestBed.createComponent(AlertDemoComponent);\n\n if (options?.days !== undefined) {\n fixture.componentInstance.days = options.days;\n }\n\n const loader = TestbedHarnessEnvironment.loader(fixture);\n\n const alertHarness = await loader.getHarness(\n SkyAlertHarness.with({ dataSkyId: 'alert-demo' })\n );\n\n return { alertHarness, fixture };\n }\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n imports: [AlertDemoModule],\n });\n });\n\n it('should show the expected alert when the number of days is 8 or more', async () => {\n const { alertHarness, fixture } = await setupTest({ days: 8 });\n fixture.detectChanges();\n\n await expectAsync(alertHarness.getAlertType()).toBeResolvedTo('warning');\n await expectAsync(alertHarness.getText()).toBeResolvedTo(\n 'Your password expires in 8 day(s)!'\n );\n await expectAsync(alertHarness.isCloseable()).toBeResolvedTo(true);\n });\n\n it('should show the expected alert when the number of days is 7 or fewer', async () => {\n const { alertHarness, fixture } = await setupTest({ days: 7 });\n fixture.detectChanges();\n\n await expectAsync(alertHarness.getAlertType()).toBeResolvedTo('danger');\n await expectAsync(alertHarness.getText()).toBeResolvedTo(\n 'Your password expires in 7 day(s)!'\n );\n await expectAsync(alertHarness.isCloseable()).toBeResolvedTo(false);\n });\n});\n"
6144
6660
  },
6145
6661
  {
6146
6662
  "fileName": "alert-demo.component.ts",
6147
6663
  "filePath": "/projects/indicators/documentation/code-examples/alert/basic/alert-demo.component.ts",
6148
- "rawContents": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-alert-demo',\n templateUrl: './alert-demo.component.html',\n})\nexport class AlertDemoComponent {\n public onClosedChange(event: boolean): void {\n alert(`Alert closed with: ${event}`);\n }\n}\n"
6664
+ "rawContents": "import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'app-alert-demo',\n templateUrl: './alert-demo.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AlertDemoComponent {\n @Input()\n public days = 9;\n\n public onClosedChange(event: boolean): void {\n alert(`Alert closed with: ${event}`);\n }\n}\n"
6149
6665
  },
6150
6666
  {
6151
6667
  "fileName": "alert-demo.module.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/indicators",
3
- "version": "6.17.1",
3
+ "version": "6.18.0",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -45,10 +45,10 @@
45
45
  "@angular/common": "^13.3.2",
46
46
  "@angular/core": "^13.3.2",
47
47
  "@angular/platform-browser": "^13.3.2",
48
- "@skyux-sdk/testing": "6.17.1",
49
- "@skyux/core": "6.17.1",
50
- "@skyux/i18n": "6.17.1",
51
- "@skyux/theme": "6.17.1"
48
+ "@skyux-sdk/testing": "6.18.0",
49
+ "@skyux/core": "6.18.0",
50
+ "@skyux/i18n": "6.18.0",
51
+ "@skyux/theme": "6.18.0"
52
52
  },
53
53
  "dependencies": {
54
54
  "tslib": "^2.3.1"