@skyux/pages 5.8.2 → 5.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/bundles/skyux-pages.umd.js +455 -45
  2. package/documentation.json +182 -274
  3. package/esm2015/index.js +2 -0
  4. package/esm2015/index.js.map +1 -1
  5. package/esm2015/lib/modules/action-hub/action-hub-recent-links-resolve.pipe.js +100 -0
  6. package/esm2015/lib/modules/action-hub/action-hub-recent-links-resolve.pipe.js.map +1 -0
  7. package/esm2015/lib/modules/action-hub/action-hub-related-links-sort.pipe.js +29 -0
  8. package/esm2015/lib/modules/action-hub/action-hub-related-links-sort.pipe.js.map +1 -0
  9. package/esm2015/lib/modules/action-hub/action-hub.component.js +4 -41
  10. package/esm2015/lib/modules/action-hub/action-hub.component.js.map +1 -1
  11. package/esm2015/lib/modules/action-hub/action-hub.module.js +6 -0
  12. package/esm2015/lib/modules/action-hub/action-hub.module.js.map +1 -1
  13. package/esm2015/lib/modules/action-hub/types/page-links-input.js +2 -0
  14. package/esm2015/lib/modules/action-hub/types/page-links-input.js.map +1 -0
  15. package/esm2015/lib/modules/action-hub/types/recent-links-input.js +2 -0
  16. package/esm2015/lib/modules/action-hub/types/recent-links-input.js.map +1 -0
  17. package/esm2015/lib/modules/action-hub/types/recent-links-resolved.js +2 -0
  18. package/esm2015/lib/modules/action-hub/types/recent-links-resolved.js.map +1 -0
  19. package/esm2015/lib/modules/link-list/link-list.component.js.map +1 -1
  20. package/fesm2015/skyux-pages.js +129 -41
  21. package/fesm2015/skyux-pages.js.map +1 -1
  22. package/index.d.ts +2 -0
  23. package/lib/modules/action-hub/action-hub-recent-links-resolve.pipe.d.ts +15 -0
  24. package/lib/modules/action-hub/action-hub-related-links-sort.pipe.d.ts +8 -0
  25. package/lib/modules/action-hub/action-hub.component.d.ts +4 -5
  26. package/lib/modules/action-hub/action-hub.module.d.ts +14 -12
  27. package/lib/modules/action-hub/types/page-links-input.d.ts +2 -0
  28. package/lib/modules/action-hub/types/recent-links-input.d.ts +6 -0
  29. package/lib/modules/action-hub/types/recent-links-resolved.d.ts +2 -0
  30. package/lib/modules/link-list/link-list.component.d.ts +2 -2
  31. package/package.json +6 -6
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/router'), require('@skyux/i18n'), require('@skyux/indicators'), require('@skyux/layout'), require('@skyux/router'), require('@skyux/theme')) :
3
- typeof define === 'function' && define.amd ? define('@skyux/pages', ['exports', '@angular/common', '@angular/core', '@angular/router', '@skyux/i18n', '@skyux/indicators', '@skyux/layout', '@skyux/router', '@skyux/theme'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.pages = {}), global.ng.common, global.ng.core, global.ng.router, global.i6, global.i2, global.i1, global.i4, global.i3));
5
- })(this, (function (exports, i2$1, i0, router, i6, i2, i1, i4, i3) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/router'), require('@skyux/i18n'), require('@skyux/indicators'), require('@skyux/layout'), require('@skyux/router'), require('@skyux/theme'), require('rxjs'), require('rxjs/operators')) :
3
+ typeof define === 'function' && define.amd ? define('@skyux/pages', ['exports', '@angular/common', '@angular/core', '@angular/router', '@skyux/i18n', '@skyux/indicators', '@skyux/layout', '@skyux/router', '@skyux/theme', 'rxjs', 'rxjs/operators'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.pages = {}), global.ng.common, global.ng.core, global.ng.router, global.i6, global.i2, global.i1, global.i4, global.i3, global.rxjs, global.rxjs.operators));
5
+ })(this, (function (exports, i2$1, i0, router, i6, i2, i1, i4, i3, rxjs, operators) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -223,6 +223,451 @@
223
223
  }]
224
224
  }] });
225
225
 
226
+ /*! *****************************************************************************
227
+ Copyright (c) Microsoft Corporation.
228
+
229
+ Permission to use, copy, modify, and/or distribute this software for any
230
+ purpose with or without fee is hereby granted.
231
+
232
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
233
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
234
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
235
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
236
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
237
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
238
+ PERFORMANCE OF THIS SOFTWARE.
239
+ ***************************************************************************** */
240
+ /* global Reflect, Promise */
241
+ var extendStatics = function (d, b) {
242
+ extendStatics = Object.setPrototypeOf ||
243
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
244
+ function (d, b) { for (var p in b)
245
+ if (Object.prototype.hasOwnProperty.call(b, p))
246
+ d[p] = b[p]; };
247
+ return extendStatics(d, b);
248
+ };
249
+ function __extends(d, b) {
250
+ if (typeof b !== "function" && b !== null)
251
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
252
+ extendStatics(d, b);
253
+ function __() { this.constructor = d; }
254
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
255
+ }
256
+ var __assign = function () {
257
+ __assign = Object.assign || function __assign(t) {
258
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
259
+ s = arguments[i];
260
+ for (var p in s)
261
+ if (Object.prototype.hasOwnProperty.call(s, p))
262
+ t[p] = s[p];
263
+ }
264
+ return t;
265
+ };
266
+ return __assign.apply(this, arguments);
267
+ };
268
+ function __rest(s, e) {
269
+ var t = {};
270
+ for (var p in s)
271
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
272
+ t[p] = s[p];
273
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
274
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
275
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
276
+ t[p[i]] = s[p[i]];
277
+ }
278
+ return t;
279
+ }
280
+ function __decorate(decorators, target, key, desc) {
281
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
282
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
283
+ r = Reflect.decorate(decorators, target, key, desc);
284
+ else
285
+ for (var i = decorators.length - 1; i >= 0; i--)
286
+ if (d = decorators[i])
287
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
288
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
289
+ }
290
+ function __param(paramIndex, decorator) {
291
+ return function (target, key) { decorator(target, key, paramIndex); };
292
+ }
293
+ function __metadata(metadataKey, metadataValue) {
294
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
295
+ return Reflect.metadata(metadataKey, metadataValue);
296
+ }
297
+ function __awaiter(thisArg, _arguments, P, generator) {
298
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
299
+ return new (P || (P = Promise))(function (resolve, reject) {
300
+ function fulfilled(value) { try {
301
+ step(generator.next(value));
302
+ }
303
+ catch (e) {
304
+ reject(e);
305
+ } }
306
+ function rejected(value) { try {
307
+ step(generator["throw"](value));
308
+ }
309
+ catch (e) {
310
+ reject(e);
311
+ } }
312
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
313
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
314
+ });
315
+ }
316
+ function __generator(thisArg, body) {
317
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
318
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
319
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
320
+ function verb(n) { return function (v) { return step([n, v]); }; }
321
+ function step(op) {
322
+ if (f)
323
+ throw new TypeError("Generator is already executing.");
324
+ while (_)
325
+ try {
326
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
327
+ return t;
328
+ if (y = 0, t)
329
+ op = [op[0] & 2, t.value];
330
+ switch (op[0]) {
331
+ case 0:
332
+ case 1:
333
+ t = op;
334
+ break;
335
+ case 4:
336
+ _.label++;
337
+ return { value: op[1], done: false };
338
+ case 5:
339
+ _.label++;
340
+ y = op[1];
341
+ op = [0];
342
+ continue;
343
+ case 7:
344
+ op = _.ops.pop();
345
+ _.trys.pop();
346
+ continue;
347
+ default:
348
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
349
+ _ = 0;
350
+ continue;
351
+ }
352
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
353
+ _.label = op[1];
354
+ break;
355
+ }
356
+ if (op[0] === 6 && _.label < t[1]) {
357
+ _.label = t[1];
358
+ t = op;
359
+ break;
360
+ }
361
+ if (t && _.label < t[2]) {
362
+ _.label = t[2];
363
+ _.ops.push(op);
364
+ break;
365
+ }
366
+ if (t[2])
367
+ _.ops.pop();
368
+ _.trys.pop();
369
+ continue;
370
+ }
371
+ op = body.call(thisArg, _);
372
+ }
373
+ catch (e) {
374
+ op = [6, e];
375
+ y = 0;
376
+ }
377
+ finally {
378
+ f = t = 0;
379
+ }
380
+ if (op[0] & 5)
381
+ throw op[1];
382
+ return { value: op[0] ? op[1] : void 0, done: true };
383
+ }
384
+ }
385
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
386
+ if (k2 === undefined)
387
+ k2 = k;
388
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
389
+ }) : (function (o, m, k, k2) {
390
+ if (k2 === undefined)
391
+ k2 = k;
392
+ o[k2] = m[k];
393
+ });
394
+ function __exportStar(m, o) {
395
+ for (var p in m)
396
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
397
+ __createBinding(o, m, p);
398
+ }
399
+ function __values(o) {
400
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
401
+ if (m)
402
+ return m.call(o);
403
+ if (o && typeof o.length === "number")
404
+ return {
405
+ next: function () {
406
+ if (o && i >= o.length)
407
+ o = void 0;
408
+ return { value: o && o[i++], done: !o };
409
+ }
410
+ };
411
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
412
+ }
413
+ function __read(o, n) {
414
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
415
+ if (!m)
416
+ return o;
417
+ var i = m.call(o), r, ar = [], e;
418
+ try {
419
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
420
+ ar.push(r.value);
421
+ }
422
+ catch (error) {
423
+ e = { error: error };
424
+ }
425
+ finally {
426
+ try {
427
+ if (r && !r.done && (m = i["return"]))
428
+ m.call(i);
429
+ }
430
+ finally {
431
+ if (e)
432
+ throw e.error;
433
+ }
434
+ }
435
+ return ar;
436
+ }
437
+ /** @deprecated */
438
+ function __spread() {
439
+ for (var ar = [], i = 0; i < arguments.length; i++)
440
+ ar = ar.concat(__read(arguments[i]));
441
+ return ar;
442
+ }
443
+ /** @deprecated */
444
+ function __spreadArrays() {
445
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
446
+ s += arguments[i].length;
447
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
448
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
449
+ r[k] = a[j];
450
+ return r;
451
+ }
452
+ function __spreadArray(to, from, pack) {
453
+ if (pack || arguments.length === 2)
454
+ for (var i = 0, l = from.length, ar; i < l; i++) {
455
+ if (ar || !(i in from)) {
456
+ if (!ar)
457
+ ar = Array.prototype.slice.call(from, 0, i);
458
+ ar[i] = from[i];
459
+ }
460
+ }
461
+ return to.concat(ar || Array.prototype.slice.call(from));
462
+ }
463
+ function __await(v) {
464
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
465
+ }
466
+ function __asyncGenerator(thisArg, _arguments, generator) {
467
+ if (!Symbol.asyncIterator)
468
+ throw new TypeError("Symbol.asyncIterator is not defined.");
469
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
470
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
471
+ function verb(n) { if (g[n])
472
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
473
+ function resume(n, v) { try {
474
+ step(g[n](v));
475
+ }
476
+ catch (e) {
477
+ settle(q[0][3], e);
478
+ } }
479
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
480
+ function fulfill(value) { resume("next", value); }
481
+ function reject(value) { resume("throw", value); }
482
+ function settle(f, v) { if (f(v), q.shift(), q.length)
483
+ resume(q[0][0], q[0][1]); }
484
+ }
485
+ function __asyncDelegator(o) {
486
+ var i, p;
487
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
488
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
489
+ }
490
+ function __asyncValues(o) {
491
+ if (!Symbol.asyncIterator)
492
+ throw new TypeError("Symbol.asyncIterator is not defined.");
493
+ var m = o[Symbol.asyncIterator], i;
494
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
495
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
496
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
497
+ }
498
+ function __makeTemplateObject(cooked, raw) {
499
+ if (Object.defineProperty) {
500
+ Object.defineProperty(cooked, "raw", { value: raw });
501
+ }
502
+ else {
503
+ cooked.raw = raw;
504
+ }
505
+ return cooked;
506
+ }
507
+ ;
508
+ var __setModuleDefault = Object.create ? (function (o, v) {
509
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
510
+ }) : function (o, v) {
511
+ o["default"] = v;
512
+ };
513
+ function __importStar(mod) {
514
+ if (mod && mod.__esModule)
515
+ return mod;
516
+ var result = {};
517
+ if (mod != null)
518
+ for (var k in mod)
519
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
520
+ __createBinding(result, mod, k);
521
+ __setModuleDefault(result, mod);
522
+ return result;
523
+ }
524
+ function __importDefault(mod) {
525
+ return (mod && mod.__esModule) ? mod : { default: mod };
526
+ }
527
+ function __classPrivateFieldGet(receiver, state, kind, f) {
528
+ if (kind === "a" && !f)
529
+ throw new TypeError("Private accessor was defined without a getter");
530
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
531
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
532
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
533
+ }
534
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
535
+ if (kind === "m")
536
+ throw new TypeError("Private method is not writable");
537
+ if (kind === "a" && !f)
538
+ throw new TypeError("Private accessor was defined without a setter");
539
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
540
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
541
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
542
+ }
543
+
544
+ var _SkyActionHubRecentLinksResolvePipe_instances, _SkyActionHubRecentLinksResolvePipe_currentRecentLinks, _SkyActionHubRecentLinksResolvePipe_currentRecentLinksResolved, _SkyActionHubRecentLinksResolvePipe_recentlyAccessedSub, _SkyActionHubRecentLinksResolvePipe_ngUnsubscribe, _SkyActionHubRecentLinksResolvePipe_resolveRequestedRoutes, _SkyActionHubRecentLinksResolvePipe_updateRecentLinksResolved;
545
+ var RECENTLY_ACCESSED_LIMIT = 5;
546
+ function getRecentLinksSorted(recentLinks) {
547
+ if (recentLinks === 'loading') {
548
+ return 'loading';
549
+ }
550
+ if (!recentLinks || recentLinks.length === 0) {
551
+ return [];
552
+ }
553
+ return recentLinks
554
+ .slice(0)
555
+ .sort(function (a, b) {
556
+ var aTime = a.lastAccessed instanceof Date
557
+ ? a.lastAccessed.toISOString()
558
+ : a.lastAccessed;
559
+ var bTime = b.lastAccessed instanceof Date
560
+ ? b.lastAccessed.toISOString()
561
+ : b.lastAccessed;
562
+ if (aTime === bTime) {
563
+ return 0;
564
+ }
565
+ return aTime > bTime ? -1 : 1;
566
+ })
567
+ .slice(0, RECENTLY_ACCESSED_LIMIT);
568
+ }
569
+ var SkyActionHubRecentLinksResolvePipe = /** @class */ (function () {
570
+ function SkyActionHubRecentLinksResolvePipe(changeDetector, recentlyAccessedSvc) {
571
+ this.changeDetector = changeDetector;
572
+ this.recentlyAccessedSvc = recentlyAccessedSvc;
573
+ _SkyActionHubRecentLinksResolvePipe_instances.add(this);
574
+ _SkyActionHubRecentLinksResolvePipe_currentRecentLinks.set(this, void 0);
575
+ _SkyActionHubRecentLinksResolvePipe_currentRecentLinksResolved.set(this, []);
576
+ _SkyActionHubRecentLinksResolvePipe_recentlyAccessedSub.set(this, void 0);
577
+ _SkyActionHubRecentLinksResolvePipe_ngUnsubscribe.set(this, new rxjs.Subject());
578
+ }
579
+ SkyActionHubRecentLinksResolvePipe.prototype.transform = function (recentLinks) {
580
+ if (recentLinks !== __classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_currentRecentLinks, "f")) {
581
+ if (__classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_recentlyAccessedSub, "f")) {
582
+ __classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_recentlyAccessedSub, "f").unsubscribe();
583
+ }
584
+ __classPrivateFieldSet(this, _SkyActionHubRecentLinksResolvePipe_currentRecentLinks, recentLinks, "f");
585
+ var getLinksArgs = recentLinks;
586
+ if (getLinksArgs === null || getLinksArgs === void 0 ? void 0 : getLinksArgs.requestedRoutes) {
587
+ __classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_instances, "m", _SkyActionHubRecentLinksResolvePipe_resolveRequestedRoutes).call(this, getLinksArgs);
588
+ }
589
+ else {
590
+ __classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_instances, "m", _SkyActionHubRecentLinksResolvePipe_updateRecentLinksResolved).call(this, recentLinks);
591
+ }
592
+ }
593
+ return __classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_currentRecentLinksResolved, "f");
594
+ };
595
+ SkyActionHubRecentLinksResolvePipe.prototype.ngOnDestroy = function () {
596
+ __classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_ngUnsubscribe, "f").next();
597
+ __classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_ngUnsubscribe, "f").complete();
598
+ };
599
+ return SkyActionHubRecentLinksResolvePipe;
600
+ }());
601
+ _SkyActionHubRecentLinksResolvePipe_currentRecentLinks = new WeakMap(), _SkyActionHubRecentLinksResolvePipe_currentRecentLinksResolved = new WeakMap(), _SkyActionHubRecentLinksResolvePipe_recentlyAccessedSub = new WeakMap(), _SkyActionHubRecentLinksResolvePipe_ngUnsubscribe = new WeakMap(), _SkyActionHubRecentLinksResolvePipe_instances = new WeakSet(), _SkyActionHubRecentLinksResolvePipe_resolveRequestedRoutes = function _SkyActionHubRecentLinksResolvePipe_resolveRequestedRoutes(args) {
602
+ var _this = this;
603
+ if (this.recentlyAccessedSvc) {
604
+ __classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_instances, "m", _SkyActionHubRecentLinksResolvePipe_updateRecentLinksResolved).call(this, 'loading');
605
+ __classPrivateFieldSet(this, _SkyActionHubRecentLinksResolvePipe_recentlyAccessedSub, this.recentlyAccessedSvc
606
+ .getLinks(args)
607
+ .pipe(operators.takeUntil(__classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_ngUnsubscribe, "f")))
608
+ .subscribe(function (result) {
609
+ __classPrivateFieldSet(_this, _SkyActionHubRecentLinksResolvePipe_recentlyAccessedSub, undefined, "f");
610
+ var recentLinks = result.links.map(function (item) { return ({
611
+ label: item.label,
612
+ lastAccessed: item.lastAccessed,
613
+ permalink: {
614
+ url: item.url,
615
+ },
616
+ }); });
617
+ __classPrivateFieldGet(_this, _SkyActionHubRecentLinksResolvePipe_instances, "m", _SkyActionHubRecentLinksResolvePipe_updateRecentLinksResolved).call(_this, recentLinks);
618
+ }), "f");
619
+ }
620
+ else {
621
+ __classPrivateFieldGet(this, _SkyActionHubRecentLinksResolvePipe_instances, "m", _SkyActionHubRecentLinksResolvePipe_updateRecentLinksResolved).call(this, []);
622
+ }
623
+ }, _SkyActionHubRecentLinksResolvePipe_updateRecentLinksResolved = function _SkyActionHubRecentLinksResolvePipe_updateRecentLinksResolved(recentLinksResolved) {
624
+ __classPrivateFieldSet(this, _SkyActionHubRecentLinksResolvePipe_currentRecentLinksResolved, getRecentLinksSorted(recentLinksResolved), "f");
625
+ this.changeDetector.markForCheck();
626
+ };
627
+ SkyActionHubRecentLinksResolvePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyActionHubRecentLinksResolvePipe, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i4__namespace.SkyRecentlyAccessedService, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
628
+ SkyActionHubRecentLinksResolvePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyActionHubRecentLinksResolvePipe, name: "skyActionHubRecentLinksResolve", pure: false });
629
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyActionHubRecentLinksResolvePipe, decorators: [{
630
+ type: i0.Pipe,
631
+ args: [{
632
+ name: 'skyActionHubRecentLinksResolve',
633
+ pure: false,
634
+ }]
635
+ }], ctorParameters: function () {
636
+ return [{ type: i0__namespace.ChangeDetectorRef }, { type: i4__namespace.SkyRecentlyAccessedService, decorators: [{
637
+ type: i0.Optional
638
+ }] }];
639
+ } });
640
+
641
+ var SkyActionHubRelatedLinksSortPipe = /** @class */ (function () {
642
+ function SkyActionHubRelatedLinksSortPipe() {
643
+ }
644
+ SkyActionHubRelatedLinksSortPipe.prototype.transform = function (relatedLinks) {
645
+ if (relatedLinks === 'loading') {
646
+ return 'loading';
647
+ }
648
+ if (!relatedLinks || relatedLinks.length === 0) {
649
+ return [];
650
+ }
651
+ return relatedLinks.slice(0).sort(function (a, b) {
652
+ var aLabel = a.label.trim().toUpperCase();
653
+ var bLabel = b.label.trim().toUpperCase();
654
+ if (aLabel === bLabel) {
655
+ return 0;
656
+ }
657
+ return aLabel < bLabel ? -1 : 1;
658
+ });
659
+ };
660
+ return SkyActionHubRelatedLinksSortPipe;
661
+ }());
662
+ SkyActionHubRelatedLinksSortPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyActionHubRelatedLinksSortPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
663
+ SkyActionHubRelatedLinksSortPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyActionHubRelatedLinksSortPipe, name: "skyActionHubRelatedLinksSort" });
664
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyActionHubRelatedLinksSortPipe, decorators: [{
665
+ type: i0.Pipe,
666
+ args: [{
667
+ name: 'skyActionHubRelatedLinksSort',
668
+ }]
669
+ }] });
670
+
226
671
  /**
227
672
  * Creates an action hub to direct user attention to important
228
673
  * actions and provide quick access to common tasks.
@@ -247,54 +692,15 @@
247
692
  */
248
693
  this.title = '';
249
694
  }
250
- SkyActionHubComponent.prototype.getRecentLinksSorted = function (recentLinks, limit) {
251
- if (recentLinks === 'loading') {
252
- return 'loading';
253
- }
254
- if (!recentLinks || recentLinks.length === 0) {
255
- return [];
256
- }
257
- return recentLinks
258
- .slice(0)
259
- .sort(function (a, b) {
260
- var aTime = a.lastAccessed instanceof Date
261
- ? a.lastAccessed.toISOString()
262
- : a.lastAccessed;
263
- var bTime = b.lastAccessed instanceof Date
264
- ? b.lastAccessed.toISOString()
265
- : b.lastAccessed;
266
- if (aTime === bTime) {
267
- return 0;
268
- }
269
- return aTime > bTime ? -1 : 1;
270
- })
271
- .slice(0, limit);
272
- };
273
- SkyActionHubComponent.prototype.getRelatedLinksSorted = function (relatedLinks) {
274
- if (relatedLinks === 'loading') {
275
- return 'loading';
276
- }
277
- if (!relatedLinks || relatedLinks.length === 0) {
278
- return [];
279
- }
280
- return relatedLinks.slice(0).sort(function (a, b) {
281
- var aLabel = a.label.trim().toUpperCase();
282
- var bLabel = b.label.trim().toUpperCase();
283
- if (aLabel === bLabel) {
284
- return 0;
285
- }
286
- return aLabel < bLabel ? -1 : 1;
287
- });
288
- };
289
695
  return SkyActionHubComponent;
290
696
  }());
291
697
  SkyActionHubComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyActionHubComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
292
- SkyActionHubComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyActionHubComponent, selector: "sky-action-hub", inputs: { needsAttention: "needsAttention", parentLink: "parentLink", recentLinks: "recentLinks", relatedLinks: "relatedLinks", title: "title" }, ngImport: i0__namespace, template: "<ng-template #loadingTemplateRef>\n <sky-wait [isWaiting]=\"true\"></sky-wait>\n</ng-template>\n<sky-fluid-grid>\n <sky-row>\n <sky-column>\n <sky-page-header\n [pageTitle]=\"title\"\n [parentLink]=\"parentLink\"\n ></sky-page-header>\n </sky-column>\n </sky-row>\n <sky-row>\n <sky-column screenLarge=\"9\" screenXSmall=\"12\">\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xl': 'modern'\n }\"\n >\n <ng-content select=\"sky-action-hub-buttons\"></ng-content>\n </div>\n\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xxl': 'modern'\n }\"\n >\n <ng-container\n *ngIf=\"\n needsAttention === 'loading';\n then loadingTemplateRef;\n else needsAttentionTemplateRef\n \"\n ></ng-container>\n <ng-template #needsAttentionTemplateRef>\n <sky-needs-attention [items]=\"needsAttention\"></sky-needs-attention>\n </ng-template>\n </div>\n\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xxl': 'modern'\n }\"\n >\n <ng-content select=\"sky-action-hub-content\"></ng-content>\n </div>\n </sky-column>\n <sky-column screenLarge=\"3\" screenXSmall=\"12\">\n <sky-link-list\n [links]=\"getRelatedLinksSorted(relatedLinks)\"\n [title]=\"'sky_action_hub_related_links' | skyLibResources\"\n ></sky-link-list>\n <sky-link-list\n [links]=\"getRecentLinksSorted(recentLinks, 5)\"\n [title]=\"'sky_action_hub_recent_links' | skyLibResources\"\n ></sky-link-list>\n </sky-column>\n </sky-row>\n</sky-fluid-grid>\n", components: [{ type: i2__namespace.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }, { type: i1__namespace.λ22, selector: "sky-fluid-grid", inputs: ["disableMargin", "gutterSize"] }, { type: i1__namespace.λ23, selector: "sky-row", inputs: ["reverseColumnOrder"] }, { type: i1__namespace.λ24, selector: "sky-column", inputs: ["screenXSmall", "screenSmall", "screenMedium", "screenLarge"] }, { type: SkyPageHeaderComponent, selector: "sky-page-header", inputs: ["parentLink", "pageTitle"] }, { type: SkyNeedsAttentionComponent, selector: "sky-needs-attention", inputs: ["items"] }, { type: SkyLinkListComponent, selector: "sky-link-list", inputs: ["links", "title"] }], directives: [{ type: i3__namespace.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyLibResources": i6__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
698
+ SkyActionHubComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyActionHubComponent, selector: "sky-action-hub", inputs: { needsAttention: "needsAttention", parentLink: "parentLink", recentLinks: "recentLinks", relatedLinks: "relatedLinks", title: "title" }, ngImport: i0__namespace, template: "<ng-template #loadingTemplateRef>\n <sky-wait [isWaiting]=\"true\"></sky-wait>\n</ng-template>\n<sky-fluid-grid>\n <sky-row>\n <sky-column>\n <sky-page-header\n [pageTitle]=\"title\"\n [parentLink]=\"parentLink\"\n ></sky-page-header>\n </sky-column>\n </sky-row>\n <sky-row>\n <sky-column screenLarge=\"9\" screenXSmall=\"12\">\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xl': 'modern'\n }\"\n >\n <ng-content select=\"sky-action-hub-buttons\"></ng-content>\n </div>\n\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xxl': 'modern'\n }\"\n >\n <ng-container\n *ngIf=\"\n needsAttention === 'loading';\n then loadingTemplateRef;\n else needsAttentionTemplateRef\n \"\n ></ng-container>\n <ng-template #needsAttentionTemplateRef>\n <sky-needs-attention [items]=\"needsAttention\"></sky-needs-attention>\n </ng-template>\n </div>\n\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xxl': 'modern'\n }\"\n >\n <ng-content select=\"sky-action-hub-content\"></ng-content>\n </div>\n </sky-column>\n <sky-column screenLarge=\"3\" screenXSmall=\"12\">\n <sky-link-list\n [links]=\"relatedLinks | skyActionHubRelatedLinksSort\"\n [title]=\"'sky_action_hub_related_links' | skyLibResources\"\n ></sky-link-list>\n <sky-link-list\n [links]=\"recentLinks | skyActionHubRecentLinksResolve\"\n [title]=\"'sky_action_hub_recent_links' | skyLibResources\"\n ></sky-link-list>\n </sky-column>\n </sky-row>\n</sky-fluid-grid>\n", components: [{ type: i2__namespace.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }, { type: i1__namespace.λ22, selector: "sky-fluid-grid", inputs: ["disableMargin", "gutterSize"] }, { type: i1__namespace.λ23, selector: "sky-row", inputs: ["reverseColumnOrder"] }, { type: i1__namespace.λ24, selector: "sky-column", inputs: ["screenXSmall", "screenSmall", "screenMedium", "screenLarge"] }, { type: SkyPageHeaderComponent, selector: "sky-page-header", inputs: ["parentLink", "pageTitle"] }, { type: SkyNeedsAttentionComponent, selector: "sky-needs-attention", inputs: ["items"] }, { type: SkyLinkListComponent, selector: "sky-link-list", inputs: ["links", "title"] }], directives: [{ type: i3__namespace.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyActionHubRelatedLinksSort": SkyActionHubRelatedLinksSortPipe, "skyLibResources": i6__namespace.SkyLibResourcesPipe, "skyActionHubRecentLinksResolve": SkyActionHubRecentLinksResolvePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
293
699
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyActionHubComponent, decorators: [{
294
700
  type: i0.Component,
295
701
  args: [{
296
702
  selector: 'sky-action-hub',
297
- template: "<ng-template #loadingTemplateRef>\n <sky-wait [isWaiting]=\"true\"></sky-wait>\n</ng-template>\n<sky-fluid-grid>\n <sky-row>\n <sky-column>\n <sky-page-header\n [pageTitle]=\"title\"\n [parentLink]=\"parentLink\"\n ></sky-page-header>\n </sky-column>\n </sky-row>\n <sky-row>\n <sky-column screenLarge=\"9\" screenXSmall=\"12\">\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xl': 'modern'\n }\"\n >\n <ng-content select=\"sky-action-hub-buttons\"></ng-content>\n </div>\n\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xxl': 'modern'\n }\"\n >\n <ng-container\n *ngIf=\"\n needsAttention === 'loading';\n then loadingTemplateRef;\n else needsAttentionTemplateRef\n \"\n ></ng-container>\n <ng-template #needsAttentionTemplateRef>\n <sky-needs-attention [items]=\"needsAttention\"></sky-needs-attention>\n </ng-template>\n </div>\n\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xxl': 'modern'\n }\"\n >\n <ng-content select=\"sky-action-hub-content\"></ng-content>\n </div>\n </sky-column>\n <sky-column screenLarge=\"3\" screenXSmall=\"12\">\n <sky-link-list\n [links]=\"getRelatedLinksSorted(relatedLinks)\"\n [title]=\"'sky_action_hub_related_links' | skyLibResources\"\n ></sky-link-list>\n <sky-link-list\n [links]=\"getRecentLinksSorted(recentLinks, 5)\"\n [title]=\"'sky_action_hub_recent_links' | skyLibResources\"\n ></sky-link-list>\n </sky-column>\n </sky-row>\n</sky-fluid-grid>\n",
703
+ template: "<ng-template #loadingTemplateRef>\n <sky-wait [isWaiting]=\"true\"></sky-wait>\n</ng-template>\n<sky-fluid-grid>\n <sky-row>\n <sky-column>\n <sky-page-header\n [pageTitle]=\"title\"\n [parentLink]=\"parentLink\"\n ></sky-page-header>\n </sky-column>\n </sky-row>\n <sky-row>\n <sky-column screenLarge=\"9\" screenXSmall=\"12\">\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xl': 'modern'\n }\"\n >\n <ng-content select=\"sky-action-hub-buttons\"></ng-content>\n </div>\n\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xxl': 'modern'\n }\"\n >\n <ng-container\n *ngIf=\"\n needsAttention === 'loading';\n then loadingTemplateRef;\n else needsAttentionTemplateRef\n \"\n ></ng-container>\n <ng-template #needsAttentionTemplateRef>\n <sky-needs-attention [items]=\"needsAttention\"></sky-needs-attention>\n </ng-template>\n </div>\n\n <div\n [skyThemeClass]=\"{\n 'sky-margin-stacked-separate': 'default',\n 'sky-margin-stacked-xxl': 'modern'\n }\"\n >\n <ng-content select=\"sky-action-hub-content\"></ng-content>\n </div>\n </sky-column>\n <sky-column screenLarge=\"3\" screenXSmall=\"12\">\n <sky-link-list\n [links]=\"relatedLinks | skyActionHubRelatedLinksSort\"\n [title]=\"'sky_action_hub_related_links' | skyLibResources\"\n ></sky-link-list>\n <sky-link-list\n [links]=\"recentLinks | skyActionHubRecentLinksResolve\"\n [title]=\"'sky_action_hub_recent_links' | skyLibResources\"\n ></sky-link-list>\n </sky-column>\n </sky-row>\n</sky-fluid-grid>\n",
298
704
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
299
705
  }]
300
706
  }], propDecorators: { needsAttention: [{
@@ -318,6 +724,8 @@
318
724
  SkyActionHubModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyActionHubModule, declarations: [SkyActionHubButtonsComponent,
319
725
  SkyActionHubComponent,
320
726
  SkyActionHubContentComponent,
727
+ SkyActionHubRecentLinksResolvePipe,
728
+ SkyActionHubRelatedLinksSortPipe,
321
729
  SkyNeedsAttentionComponent,
322
730
  SkyLinkListComponent], imports: [i2$1.CommonModule,
323
731
  SkyPagesResourcesModule,
@@ -371,6 +779,8 @@
371
779
  SkyActionHubButtonsComponent,
372
780
  SkyActionHubComponent,
373
781
  SkyActionHubContentComponent,
782
+ SkyActionHubRecentLinksResolvePipe,
783
+ SkyActionHubRelatedLinksSortPipe,
374
784
  SkyNeedsAttentionComponent,
375
785
  SkyLinkListComponent,
376
786
  ],