@daffodil/core 0.38.9 → 0.39.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 (118) hide show
  1. package/bundles/daffodil-core-graphql.umd.js +24 -153
  2. package/bundles/daffodil-core-graphql.umd.js.map +1 -1
  3. package/bundles/daffodil-core-graphql.umd.min.js +1 -1
  4. package/bundles/daffodil-core-graphql.umd.min.js.map +1 -1
  5. package/bundles/daffodil-core-routing.umd.js +9 -90
  6. package/bundles/daffodil-core-routing.umd.js.map +1 -1
  7. package/bundles/daffodil-core-routing.umd.min.js +1 -1
  8. package/bundles/daffodil-core-routing.umd.min.js.map +1 -1
  9. package/bundles/daffodil-core-state.umd.js +23 -154
  10. package/bundles/daffodil-core-state.umd.js.map +1 -1
  11. package/bundles/daffodil-core-state.umd.min.js +1 -1
  12. package/bundles/daffodil-core-state.umd.min.js.map +1 -1
  13. package/bundles/daffodil-core-testing.umd.js +7 -68
  14. package/bundles/daffodil-core-testing.umd.js.map +1 -1
  15. package/bundles/daffodil-core-testing.umd.min.js +1 -1
  16. package/bundles/daffodil-core-testing.umd.min.js.map +1 -1
  17. package/bundles/daffodil-core.umd.js +56 -389
  18. package/bundles/daffodil-core.umd.js.map +1 -1
  19. package/bundles/daffodil-core.umd.min.js +1 -1
  20. package/bundles/daffodil-core.umd.min.js.map +1 -1
  21. package/esm2015/address/address.js +2 -28
  22. package/esm2015/canonically-locateable/canonically-locateable.interface.js +2 -18
  23. package/esm2015/constructable/constructable.js +2 -6
  24. package/esm2015/daffodil-core.js +2 -7
  25. package/esm2015/errors/error-map.js +2 -11
  26. package/esm2015/errors/error.interface.js +2 -17
  27. package/esm2015/errors/inheritable-error.js +1 -14
  28. package/esm2015/errors/public_api.js +1 -6
  29. package/esm2015/graphql/apollo/cacheable-operations/cacheable-operations-link.interface.js +2 -16
  30. package/esm2015/graphql/apollo/public_api.js +1 -6
  31. package/esm2015/graphql/apollo/queued-apollo/queued-apollo.service.js +10 -59
  32. package/esm2015/graphql/daffodil-core-graphql.js +2 -7
  33. package/esm2015/graphql/fragments/build-fragment-definition.js +3 -18
  34. package/esm2015/graphql/fragments/build-fragment-name-spread.js +6 -44
  35. package/esm2015/graphql/fragments/public_api.js +1 -6
  36. package/esm2015/graphql/index.js +2 -7
  37. package/esm2015/graphql/public_api.js +3 -8
  38. package/esm2015/identifiable/identifiable.interface.js +2 -18
  39. package/esm2015/index.js +2 -7
  40. package/esm2015/locateable/locateable.interface.js +2 -18
  41. package/esm2015/operators/backoff.pipe.js +5 -20
  42. package/esm2015/operators/public_api.js +2 -7
  43. package/esm2015/orderable/orderable.js +2 -18
  44. package/esm2015/public_api.js +6 -11
  45. package/esm2015/routing/daffodil-core-routing.js +2 -7
  46. package/esm2015/routing/index.js +2 -7
  47. package/esm2015/routing/public_api.js +2 -7
  48. package/esm2015/routing/uri/normalizer.service.js +4 -21
  49. package/esm2015/routing/uri/public_api.js +2 -7
  50. package/esm2015/routing/uri/truncation/file-extension.js +2 -13
  51. package/esm2015/routing/uri/truncation/leading-path-segments.js +2 -12
  52. package/esm2015/routing/uri/truncation/leading-slash.js +2 -13
  53. package/esm2015/routing/uri/truncation/public_api.js +1 -6
  54. package/esm2015/routing/uri/truncation/query-fragment.js +3 -13
  55. package/esm2015/state/collection/paginable.js +2 -21
  56. package/esm2015/state/collection/public_api.js +3 -8
  57. package/esm2015/state/collection/sortable.js +10 -56
  58. package/esm2015/state/daffodil-core-state.js +2 -7
  59. package/esm2015/state/errors/public_api.js +1 -6
  60. package/esm2015/state/errors/state-error.interface.js +2 -17
  61. package/esm2015/state/errors/transform-error-to-state-error.js +1 -8
  62. package/esm2015/state/index.js +2 -7
  63. package/esm2015/state/operators/public_api.js +2 -7
  64. package/esm2015/state/operators/substream.pipe.js +13 -51
  65. package/esm2015/state/public_api.js +6 -11
  66. package/esm2015/state/reducers/create-meta.js +2 -20
  67. package/esm2015/state/reducers/public_api.js +1 -6
  68. package/esm2015/state/states/loading.js +2 -6
  69. package/esm2015/state/states/mutable-loading.js +2 -6
  70. package/esm2015/state/states/public_api.js +2 -6
  71. package/esm2015/state/states/state.enum.js +2 -55
  72. package/esm2015/state/states/stateable.interface.js +2 -17
  73. package/esm2015/state/store/facade.js +2 -18
  74. package/esm2015/storage/error/error.js +1 -15
  75. package/esm2015/storage/error/error.service.js +3 -32
  76. package/esm2015/storage/error/public_api.js +1 -6
  77. package/esm2015/storage/localstorage/localstorage.service.js +3 -21
  78. package/esm2015/storage/noopstorage/noopstorage.service.js +3 -24
  79. package/esm2015/storage/persistence.interface.js +3 -38
  80. package/esm2015/storage/public_api.js +3 -8
  81. package/esm2015/storage/server-error/public_api.js +1 -6
  82. package/esm2015/storage/server-error/server-error.js +1 -15
  83. package/esm2015/storage/server-error/server-error.service.js +4 -33
  84. package/esm2015/testing/address/factories/address.factory.js +2 -25
  85. package/esm2015/testing/angular/interfaces/in-memory-data-service.interface.js +2 -33
  86. package/esm2015/testing/angular/mocks/pipes/currency.js +2 -11
  87. package/esm2015/testing/daffodil-core-testing.js +2 -7
  88. package/esm2015/testing/factories/factory.interface.js +2 -24
  89. package/esm2015/testing/factories/factory.js +3 -32
  90. package/esm2015/testing/index.js +1 -6
  91. package/esm2015/testing/testing.module.js +1 -6
  92. package/esm2015/types/dict.type.js +2 -6
  93. package/esm2015/types/id.type.js +2 -6
  94. package/esm2015/types/public_api.js +2 -6
  95. package/esm2015/utils/array-to-dict.js +3 -24
  96. package/esm2015/utils/long-arithmetic.js +19 -45
  97. package/esm2015/utils/public_api.js +2 -7
  98. package/esm2015/utils/random-slice.js +4 -19
  99. package/esm2015/utils/random-subset.js +5 -17
  100. package/esm2015/utils/range.js +5 -21
  101. package/esm2015/utils/sample.js +2 -13
  102. package/esm2015/utils/shuffle.js +5 -23
  103. package/fesm2015/daffodil-core-graphql.js +18 -146
  104. package/fesm2015/daffodil-core-graphql.js.map +1 -1
  105. package/fesm2015/daffodil-core-routing.js +10 -95
  106. package/fesm2015/daffodil-core-routing.js.map +1 -1
  107. package/fesm2015/daffodil-core-state.js +23 -196
  108. package/fesm2015/daffodil-core-state.js.map +1 -1
  109. package/fesm2015/daffodil-core-testing.js +7 -79
  110. package/fesm2015/daffodil-core-testing.js.map +1 -1
  111. package/fesm2015/daffodil-core.js +53 -416
  112. package/fesm2015/daffodil-core.js.map +1 -1
  113. package/graphql/package.json +1 -1
  114. package/package.json +1 -1
  115. package/routing/package.json +1 -1
  116. package/state/package.json +1 -1
  117. package/testing/package.json +1 -1
  118. package/utils/long-arithmetic.d.ts +3 -0
@@ -239,7 +239,7 @@
239
239
  ar[i] = from[i];
240
240
  }
241
241
  }
242
- return to.concat(ar || from);
242
+ return to.concat(ar || Array.prototype.slice.call(from));
243
243
  }
244
244
  function __await(v) {
245
245
  return this instanceof __await ? (this.v = v, this) : new __await(v);
@@ -322,21 +322,14 @@
322
322
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
323
323
  }
324
324
 
325
- /**
326
- * @fileoverview added by tsickle
327
- * Generated from: utils/long-arithmetic.ts
328
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
329
- */
330
325
  /**
331
326
  * A helper function to get the number of decimal significant figures of a number.
332
327
  * This function will fail if the given number has more than 16 significant figures or
333
328
  * the value of the number is greater than 10^11
334
329
  *
335
- * @param {?} number
336
- * @return {?}
330
+ * @param number
337
331
  */
338
332
  function daffPrecision(number) {
339
- /** @type {?} */
340
333
  var p = 10000;
341
334
  if (number === undefined || number === null) {
342
335
  return p;
@@ -351,8 +344,7 @@
351
344
  * This function only guarantees correct answers when the numbers given and the result are less than
352
345
  * 16 significant figures and less than 10^11
353
346
  *
354
- * @param {...?} numbers
355
- * @return {?}
347
+ * @param numbers
356
348
  */
357
349
  function daffAdd() {
358
350
  var numbers = [];
@@ -362,21 +354,15 @@
362
354
  if (numbers.length < 2) {
363
355
  throw new Error('Provide at least 2 numbers for daffAdd.');
364
356
  }
365
- /** @type {?} */
366
357
  var precision = Math.max.apply(Math, __spread(numbers.map(daffPrecision)));
367
- return numbers.reduce(( /**
368
- * @param {?} acc
369
- * @param {?} number
370
- * @return {?}
371
- */function (acc, number) { return acc + Math.round(number * precision); }), 0) / precision;
358
+ return numbers.reduce(function (acc, number) { return acc + Math.round(number * precision); }, 0) / precision;
372
359
  }
373
360
  /**
374
361
  * A function to subtract long numbers accurately with conversions and integer math.
375
362
  * This function only guarantees correct answers when the numbers given and the result are each less than
376
363
  * 16 significant figures and less than 10^11
377
364
  *
378
- * @param {...?} numbers
379
- * @return {?}
365
+ * @param numbers
380
366
  */
381
367
  function daffSubtract() {
382
368
  var numbers = [];
@@ -386,21 +372,15 @@
386
372
  if (numbers.length < 2) {
387
373
  throw new Error('Provide at least 2 numbers for daffSubtract.');
388
374
  }
389
- /** @type {?} */
390
375
  var precision = Math.max.apply(Math, __spread(numbers.map(daffPrecision)));
391
- return numbers.slice(1).reduce(( /**
392
- * @param {?} acc
393
- * @param {?} number
394
- * @return {?}
395
- */function (acc, number) { return acc - Math.round(number * precision); }), Math.round(numbers[0] * precision)) / precision;
376
+ return numbers.slice(1).reduce(function (acc, number) { return acc - Math.round(number * precision); }, Math.round(numbers[0] * precision)) / precision;
396
377
  }
397
378
  /**
398
379
  * A function to multiply long numbers accurately with conversions and integer math.
399
380
  * This function only guarantees correct answers when the numbers given and the result are each less than 16 significant figures
400
381
  * and less than 10^11
401
382
  *
402
- * @param {...?} numbers
403
- * @return {?}
383
+ * @param numbers
404
384
  */
405
385
  function daffMultiply() {
406
386
  var numbers = [];
@@ -410,21 +390,18 @@
410
390
  if (numbers.length < 2) {
411
391
  throw new Error('Provide at least 2 numbers for daffMultiply.');
412
392
  }
413
- /** @type {?} */
414
393
  var precision = Math.max.apply(Math, __spread(numbers.map(daffPrecision)));
415
- return numbers.reduce(( /**
416
- * @param {?} acc
417
- * @param {?} number
418
- * @return {?}
419
- */function (acc, number) { return acc * Math.round(number * precision); }), 1) / Math.pow(precision, numbers.length);
394
+ return numbers.reduce(function (acc, number) { return acc * Math.round(number * precision); }, 1) / Math.pow(precision, numbers.length);
420
395
  }
421
396
  /**
422
397
  * A function to divide long numbers accurately with conversions and integer math.
423
398
  * This function only guarantees correct answers when the numbers given and the result are each less than 16 significant figures
424
399
  * and less than 10^11
425
400
  *
426
- * @param {...?} numbers
427
- * @return {?}
401
+ * Returns NaN when attempting to use NaN as an input.
402
+ * Returns NaN when attempting to divide by 0 or null.
403
+ *
404
+ * @param numbers
428
405
  */
429
406
  function daffDivide() {
430
407
  var numbers = [];
@@ -434,20 +411,16 @@
434
411
  if (numbers.length < 2) {
435
412
  throw new Error('Provide at least 2 numbers for daffDivide.');
436
413
  }
437
- /** @type {?} */
414
+ // TODO(griest024): use better condition after IE support is dropped
415
+ var illegalOperation = numbers.filter(isNaN).length > 0
416
+ || numbers.slice(1).filter(function (n) { return n === 0 || n === null; }).length > 0;
417
+ if (illegalOperation) {
418
+ return NaN;
419
+ }
438
420
  var precision = Math.max.apply(Math, __spread(numbers.map(daffPrecision)));
439
- return numbers.slice(1).reduce(( /**
440
- * @param {?} acc
441
- * @param {?} number
442
- * @return {?}
443
- */function (acc, number) { return acc / Math.round(number * precision); }), Math.round(numbers[0] * precision)) * Math.pow(precision, numbers.length - 2);
421
+ return numbers.slice(1).reduce(function (acc, number) { return acc / Math.round(number * precision); }, Math.round(numbers[0] * precision)) * Math.pow(precision, numbers.length - 2);
444
422
  }
445
423
 
446
- /**
447
- * @fileoverview added by tsickle
448
- * Generated from: utils/range.ts
449
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
450
- */
451
424
  /**
452
425
  * Range
453
426
  *
@@ -455,96 +428,49 @@
455
428
  * and returns an array filled with numbers from
456
429
  * `start` to `end`.
457
430
  *
458
- * \@param start
459
- * \@param end
460
- * \@return number
461
- * @type {?}
431
+ * @param start
432
+ * @param end
433
+ * @returns number
462
434
  */
463
- var range = ( /**
464
- * @param {?} start
465
- * @param {?} end
466
- * @return {?}
467
- */function (start, end) { return Array.apply(null, Array(end - start + 1)).map(( /**
468
- * @param {?} val
469
- * @param {?} index
470
- * @return {?}
471
- */function (val, index) { return index + start; })); });
435
+ var range = function (start, end) { return Array.apply(null, Array(end - start + 1)).map(function (val, index) { return index + start; }); };
472
436
 
473
- /**
474
- * @fileoverview added by tsickle
475
- * Generated from: utils/shuffle.ts
476
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
477
- */
478
437
  /**
479
438
  * Immutable Fisher-Yates Shuffle
480
439
  * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
481
- * @type {?}
482
440
  */
483
- var shuffle = ( /**
484
- * @template T
485
- * @param {?} array
486
- * @return {?}
487
- */function (array) {
488
- /** @type {?} */
441
+ var shuffle = function (array) {
489
442
  var result = [];
490
- array.forEach(( /**
491
- * @param {?} el
492
- * @param {?} i
493
- * @return {?}
494
- */function (el, i) {
495
- /** @type {?} */
443
+ array.forEach(function (el, i) {
496
444
  var s = Math.floor(Math.random() * i);
497
445
  if (s !== i) {
498
446
  result[i] = result[s];
499
447
  }
500
448
  result[s] = el;
501
- }));
449
+ });
502
450
  return result;
503
- });
451
+ };
504
452
 
505
- /**
506
- * @fileoverview added by tsickle
507
- * Generated from: utils/random-subset.ts
508
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
509
- */
510
453
  /**
511
454
  * Returns a random subset of an array in a random order.
512
455
  *
513
- * \@param array
514
- * \@param length
515
- * @type {?}
456
+ * @param array
457
+ * @param length
516
458
  */
517
- var randomSubset = ( /**
518
- * @template T
519
- * @param {?} array
520
- * @param {?=} length
521
- * @return {?}
522
- */function (array, length) {
459
+ var randomSubset = function (array, length) {
523
460
  if (length > array.length) {
524
461
  throw new Error('Requested length is longer than array length.');
525
462
  }
526
463
  length = length ? length : Math.floor(Math.random() * array.length);
527
464
  return shuffle(array).slice(0, length);
528
- });
465
+ };
529
466
 
530
- /**
531
- * @fileoverview added by tsickle
532
- * Generated from: utils/random-slice.ts
533
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
534
- */
535
467
  /**
536
468
  * Returns a random slice of an array.
537
469
  * An optional length may be specified.
538
470
  *
539
- * \@param array
540
- * @type {?}
471
+ * @param array
541
472
  */
542
- var randomSlice = ( /**
543
- * @template T
544
- * @param {?} array
545
- * @param {?=} length
546
- * @return {?}
547
- */function (array, length) {
473
+ var randomSlice = function (array, length) {
548
474
  if (array.length === 0) {
549
475
  return [];
550
476
  }
@@ -552,71 +478,29 @@
552
478
  if (length > array.length) {
553
479
  throw new Error('Requested length is longer than array length.');
554
480
  }
555
- /** @type {?} */
556
481
  var arrayLength = length || Math.floor(Math.random() * array.length);
557
- /** @type {?} */
558
482
  var start = Math.floor(Math.random() * (array.length - arrayLength));
559
- /** @type {?} */
560
483
  var end = start + arrayLength;
561
484
  return array.slice(start, end);
562
- });
485
+ };
563
486
 
564
- /**
565
- * @fileoverview added by tsickle
566
- * Generated from: utils/array-to-dict.ts
567
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
568
- */
569
487
  /**
570
488
  * Converts an array into a dictionary.
571
489
  * Dictionary values are keyed by the return of the specified getKey, or `'key'` by default.
572
- * @type {?}
573
490
  */
574
- var daffArrayToDict = ( /**
575
- * @template T
576
- * @param {?} array
577
- * @param {?=} getKey
578
- * @return {?}
579
- */function (array, getKey) {
580
- if (getKey === void 0) { getKey = ( /**
581
- * @param {?} val
582
- * @return {?}
583
- */function (val) { return (( /** @type {?} */(val))).key; }); }
584
- return array.reduce(( /**
585
- * @param {?} dict
586
- * @param {?} val
587
- * @return {?}
588
- */function (dict, val) {
491
+ var daffArrayToDict = function (array, getKey) {
492
+ if (getKey === void 0) { getKey = function (val) { return val.key; }; }
493
+ return array.reduce(function (dict, val) {
589
494
  dict[getKey(val)] = val;
590
495
  return dict;
591
- }), {});
592
- });
496
+ }, {});
497
+ };
593
498
 
594
- /**
595
- * @fileoverview added by tsickle
596
- * Generated from: utils/sample.ts
597
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
598
- */
599
499
  /**
600
500
  * Returns a random element of an array.
601
- * @type {?}
602
- */
603
- var sample = ( /**
604
- * @template T
605
- * @param {?} array
606
- * @return {?}
607
- */function (array) { return randomSlice(array, 1)[0]; });
608
-
609
- /**
610
- * @fileoverview added by tsickle
611
- * Generated from: utils/public_api.ts
612
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
613
501
  */
502
+ var sample = function (array) { return randomSlice(array, 1)[0]; };
614
503
 
615
- /**
616
- * @fileoverview added by tsickle
617
- * Generated from: errors/inheritable-error.ts
618
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
619
- */
620
504
  /**
621
505
  * A class which allows you to appropriately check the inheritance of an error.
622
506
  *
@@ -636,13 +520,9 @@
636
520
  */
637
521
  var DaffInheritableError = /** @class */ (function (_super) {
638
522
  __extends(DaffInheritableError, _super);
639
- /**
640
- * @param {?=} message
641
- */
642
523
  function DaffInheritableError(message) {
643
524
  var _newTarget = this.constructor;
644
525
  var _this = this;
645
- /** @type {?} */
646
526
  var trueProto = _newTarget.prototype;
647
527
  _this = _super.call(this, message) || this;
648
528
  Object.setPrototypeOf(_this, trueProto);
@@ -650,22 +530,9 @@
650
530
  }
651
531
  return DaffInheritableError;
652
532
  }(Error));
653
- if (false) {
654
- /** @type {?} */
655
- DaffInheritableError.prototype.__proto__;
656
- }
657
-
658
- /**
659
- * @fileoverview added by tsickle
660
- * Generated from: errors/public_api.ts
661
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
662
- */
663
533
 
664
534
  var DaffStorageServiceError = /** @class */ (function (_super) {
665
535
  __extends(DaffStorageServiceError, _super);
666
- /**
667
- * @param {?} message
668
- */
669
536
  function DaffStorageServiceError(message) {
670
537
  var _this = _super.call(this, message) || this;
671
538
  _this.message = message;
@@ -674,87 +541,43 @@
674
541
  }
675
542
  return DaffStorageServiceError;
676
543
  }(DaffInheritableError));
677
- if (false) {
678
- /** @type {?} */
679
- DaffStorageServiceError.prototype.code;
680
- /** @type {?} */
681
- DaffStorageServiceError.prototype.message;
682
- }
683
544
 
684
545
  /**
685
- * @fileoverview added by tsickle
686
- * Generated from: storage/error/error.service.ts
687
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
688
- */
689
- /**
690
- * \@inheritdoc
546
+ * @inheritdoc
691
547
  */
692
548
  var DaffErrorStorageService = /** @class */ (function () {
693
549
  function DaffErrorStorageService() {
694
550
  }
695
- /**
696
- * @param {?} key
697
- * @param {?} value
698
- * @return {?}
699
- */
700
551
  DaffErrorStorageService.prototype.setItem = function (key, value) {
701
552
  this.throwError();
702
553
  };
703
- /**
704
- * @param {?} key
705
- * @return {?}
706
- */
707
554
  DaffErrorStorageService.prototype.getItem = function (key) {
708
555
  this.throwError();
709
556
  };
710
- /**
711
- * @param {?} key
712
- * @return {?}
713
- */
714
557
  DaffErrorStorageService.prototype.removeItem = function (key) {
715
558
  this.throwError();
716
559
  };
717
- /**
718
- * @return {?}
719
- */
720
560
  DaffErrorStorageService.prototype.clear = function () {
721
561
  this.throwError();
722
562
  };
723
- /**
724
- * @private
725
- * @return {?}
726
- */
727
563
  DaffErrorStorageService.prototype.throwError = function () {
728
564
  throw new DaffStorageServiceError(DaffErrorStorageService.ERROR_MESSAGE);
729
565
  };
730
566
  return DaffErrorStorageService;
731
567
  }());
732
568
  DaffErrorStorageService.ERROR_MESSAGE = 'The DaffErrorStorageService always throws an error.';
569
+ /** @nocollapse */ DaffErrorStorageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffErrorStorageService_Factory() { return new DaffErrorStorageService(); }, token: DaffErrorStorageService, providedIn: "root" });
733
570
  DaffErrorStorageService.decorators = [
734
571
  { type: i0.Injectable, args: [{
735
572
  providedIn: 'root',
736
573
  },] }
737
574
  ];
738
- /** @nocollapse */ DaffErrorStorageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffErrorStorageService_Factory() { return new DaffErrorStorageService(); }, token: DaffErrorStorageService, providedIn: "root" });
739
- if (false) {
740
- /** @type {?} */
741
- DaffErrorStorageService.ERROR_MESSAGE;
742
- }
743
-
744
- /**
745
- * @fileoverview added by tsickle
746
- * Generated from: storage/error/public_api.ts
747
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
748
- */
749
575
 
750
576
  /**
751
577
  * An error thrown when there is an attempt to access storage on the server and none is available.
752
578
  */
753
579
  var DaffServerSideStorageError = /** @class */ (function (_super) {
754
580
  __extends(DaffServerSideStorageError, _super);
755
- /**
756
- * @param {?} message
757
- */
758
581
  function DaffServerSideStorageError(message) {
759
582
  var _this = _super.call(this, message) || this;
760
583
  _this.message = message;
@@ -763,94 +586,45 @@
763
586
  }
764
587
  return DaffServerSideStorageError;
765
588
  }(DaffStorageServiceError));
766
- if (false) {
767
- /** @type {?} */
768
- DaffServerSideStorageError.prototype.code;
769
- /** @type {?} */
770
- DaffServerSideStorageError.prototype.message;
771
- }
772
589
 
773
- /**
774
- * @fileoverview added by tsickle
775
- * Generated from: storage/server-error/server-error.service.ts
776
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
777
- */
778
590
  /**
779
591
  * A storage service meant to be loaded into SSR contexts.
780
- * It will always throw the {\@link DaffServerSideStorageError}.
592
+ * It will always throw the {@link DaffServerSideStorageError}.
781
593
  *
782
- * \@inheritdoc
594
+ * @inheritdoc
783
595
  */
784
596
  var DaffServerErrorStorageService = /** @class */ (function () {
785
597
  function DaffServerErrorStorageService() {
786
598
  }
787
- /**
788
- * @param {?} key
789
- * @param {?} value
790
- * @return {?}
791
- */
792
599
  DaffServerErrorStorageService.prototype.setItem = function (key, value) {
793
600
  this.throwError();
794
601
  };
795
- /**
796
- * @param {?} key
797
- * @return {?}
798
- */
799
602
  DaffServerErrorStorageService.prototype.getItem = function (key) {
800
603
  this.throwError();
801
604
  };
802
- /**
803
- * @param {?} key
804
- * @return {?}
805
- */
806
605
  DaffServerErrorStorageService.prototype.removeItem = function (key) {
807
606
  this.throwError();
808
607
  };
809
- /**
810
- * @return {?}
811
- */
812
608
  DaffServerErrorStorageService.prototype.clear = function () {
813
609
  this.throwError();
814
610
  };
815
- /**
816
- * @private
817
- * @return {?}
818
- */
819
611
  DaffServerErrorStorageService.prototype.throwError = function () {
820
612
  throw new DaffServerSideStorageError(DaffServerErrorStorageService.ERROR_MESSAGE);
821
613
  };
822
614
  return DaffServerErrorStorageService;
823
615
  }());
824
616
  DaffServerErrorStorageService.ERROR_MESSAGE = 'The DaffServerErrorStorageService always throws an error.';
617
+ /** @nocollapse */ DaffServerErrorStorageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffServerErrorStorageService_Factory() { return new DaffServerErrorStorageService(); }, token: DaffServerErrorStorageService, providedIn: "root" });
825
618
  DaffServerErrorStorageService.decorators = [
826
619
  { type: i0.Injectable, args: [{
827
620
  providedIn: 'root',
828
621
  },] }
829
622
  ];
830
- /** @nocollapse */ DaffServerErrorStorageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffServerErrorStorageService_Factory() { return new DaffServerErrorStorageService(); }, token: DaffServerErrorStorageService, providedIn: "root" });
831
- if (false) {
832
- /** @type {?} */
833
- DaffServerErrorStorageService.ERROR_MESSAGE;
834
- }
835
623
 
836
624
  /**
837
- * @fileoverview added by tsickle
838
- * Generated from: storage/server-error/public_api.ts
839
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
840
- */
841
-
842
- /**
843
- * @fileoverview added by tsickle
844
- * Generated from: storage/localstorage/localstorage.service.ts
845
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
846
- */
847
- /**
848
- * \@inheritdoc
625
+ * @inheritdoc
849
626
  */
850
627
  var DaffLocalStorageService = /** @class */ (function () {
851
- /**
852
- * @param {?} platformId
853
- */
854
628
  function DaffLocalStorageService(platformId) {
855
629
  if (!common.isPlatformBrowser(platformId)) {
856
630
  throw new Error('The DaffLocalStorageService can only be instantiated in the browser.');
@@ -858,37 +632,28 @@
858
632
  }
859
633
  /**
860
634
  * Persist the given item into local storage.
861
- * @param {?} key
862
- * @param {?} value
863
- * @return {?}
864
635
  */
865
636
  DaffLocalStorageService.prototype.setItem = function (key, value) {
866
637
  localStorage.setItem(key, value);
867
638
  };
868
639
  /**
869
640
  * Retrieve the given item from localstorage.
870
- * @param {?} key
871
- * @return {?}
872
641
  */
873
642
  DaffLocalStorageService.prototype.getItem = function (key) {
874
643
  return localStorage.getItem(key);
875
644
  };
876
645
  /**
877
646
  * Remove a given item from localstorage
878
- * @param {?} key
879
- * @return {?}
880
647
  */
881
648
  DaffLocalStorageService.prototype.removeItem = function (key) {
882
649
  localStorage.removeItem(key);
883
650
  };
884
- /**
885
- * @return {?}
886
- */
887
651
  DaffLocalStorageService.prototype.clear = function () {
888
652
  localStorage.clear();
889
653
  };
890
654
  return DaffLocalStorageService;
891
655
  }());
656
+ /** @nocollapse */ DaffLocalStorageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffLocalStorageService_Factory() { return new DaffLocalStorageService(i0.ɵɵinject(i0.PLATFORM_ID)); }, token: DaffLocalStorageService, providedIn: "root" });
892
657
  DaffLocalStorageService.decorators = [
893
658
  { type: i0.Injectable, args: [{
894
659
  providedIn: 'root',
@@ -898,152 +663,54 @@
898
663
  DaffLocalStorageService.ctorParameters = function () { return [
899
664
  { type: String, decorators: [{ type: i0.Inject, args: [i0.PLATFORM_ID,] }] }
900
665
  ]; };
901
- /** @nocollapse */ DaffLocalStorageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffLocalStorageService_Factory() { return new DaffLocalStorageService(i0.ɵɵinject(i0.PLATFORM_ID)); }, token: DaffLocalStorageService, providedIn: "root" });
902
666
 
903
667
  /**
904
- * @fileoverview added by tsickle
905
- * Generated from: storage/noopstorage/noopstorage.service.ts
906
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
907
- */
908
- /**
909
- * \@inheritdoc
668
+ * @inheritdoc
910
669
  */
911
670
  var DaffNoopStorageService = /** @class */ (function () {
912
671
  function DaffNoopStorageService() {
913
672
  }
914
- /**
915
- * @param {?} key
916
- * @param {?} value
917
- * @return {?}
918
- */
919
673
  DaffNoopStorageService.prototype.setItem = function (key, value) { };
920
674
  ;
921
- /**
922
- * @param {?} key
923
- * @return {?}
924
- */
925
675
  DaffNoopStorageService.prototype.getItem = function (key) { };
926
676
  ;
927
- /**
928
- * @return {?}
929
- */
930
677
  DaffNoopStorageService.prototype.clear = function () { };
931
678
  ;
932
- /**
933
- * @param {?} key
934
- * @return {?}
935
- */
936
679
  DaffNoopStorageService.prototype.removeItem = function (key) { };
937
680
  ;
938
681
  return DaffNoopStorageService;
939
682
  }());
683
+ /** @nocollapse */ DaffNoopStorageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffNoopStorageService_Factory() { return new DaffNoopStorageService(); }, token: DaffNoopStorageService, providedIn: "root" });
940
684
  DaffNoopStorageService.decorators = [
941
685
  { type: i0.Injectable, args: [{
942
686
  providedIn: 'root',
943
687
  },] }
944
688
  ];
945
- /** @nocollapse */ DaffNoopStorageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffNoopStorageService_Factory() { return new DaffNoopStorageService(); }, token: DaffNoopStorageService, providedIn: "root" });
946
689
 
947
- /**
948
- * @fileoverview added by tsickle
949
- * Generated from: storage/persistence.interface.ts
950
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
951
- */
952
- /**
953
- * @record
954
- */
955
- function DaffPersistenceService() { }
956
- if (false) {
957
- /**
958
- * @param {?} key
959
- * @param {?} value
960
- * @return {?}
961
- */
962
- DaffPersistenceService.prototype.setItem = function (key, value) { };
963
- /**
964
- * @param {?} key
965
- * @return {?}
966
- */
967
- DaffPersistenceService.prototype.getItem = function (key) { };
968
- /**
969
- * @return {?}
970
- */
971
- DaffPersistenceService.prototype.clear = function () { };
972
- /**
973
- * @param {?} key
974
- * @return {?}
975
- */
976
- DaffPersistenceService.prototype.removeItem = function (key) { };
977
- }
978
- /** @type {?} */
979
690
  var DaffPersistenceServiceToken = new i0.InjectionToken('DaffPersistenceService', {
980
691
  providedIn: 'root',
981
- factory: ( /**
982
- * @return {?}
983
- */function () { return common.isPlatformBrowser(i0.inject(i0.PLATFORM_ID))
692
+ factory: function () { return common.isPlatformBrowser(i0.inject(i0.PLATFORM_ID))
984
693
  ? new DaffLocalStorageService(i0.inject(i0.PLATFORM_ID))
985
- : new DaffServerErrorStorageService(); }),
694
+ : new DaffServerErrorStorageService(); },
986
695
  });
987
696
 
988
- /**
989
- * @fileoverview added by tsickle
990
- * Generated from: storage/public_api.ts
991
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
992
- */
993
-
994
- /**
995
- * @fileoverview added by tsickle
996
- * Generated from: operators/backoff.pipe.ts
997
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
998
- */
999
697
  /**
1000
698
  * Retries failed Observables
1001
699
  *
1002
- * @param {?} maxTries The maximum number of tries the observable will be tried
1003
- * @param {?} ms The initial amount of time
1004
- * @return {?}
700
+ * @param maxTries The maximum number of tries the observable will be tried
701
+ * @param ms The initial amount of time
1005
702
  */
1006
703
  function backoff(maxTries, ms) {
1007
- return rxjs.pipe(operators.retryWhen(( /**
1008
- * @param {?} attempt
1009
- * @return {?}
1010
- */function (/**
1011
- * @param {?} attempt
1012
- * @return {?}
1013
- */ attempt) { return attempt.pipe(operators.mergeMap(( /**
1014
- * @param {?} shadowedAttempt
1015
- * @param {?} i
1016
- * @return {?}
1017
- */function (shadowedAttempt, i) {
704
+ return rxjs.pipe(operators.retryWhen(function (attempt) { return attempt.pipe(operators.mergeMap(function (shadowedAttempt, i) {
1018
705
  if (i >= maxTries) {
1019
706
  return rxjs.throwError(shadowedAttempt);
1020
707
  }
1021
708
  return rxjs.timer(ms * Math.pow(2, i));
1022
- }))); })));
709
+ })); }));
1023
710
  }
1024
711
 
1025
712
  /**
1026
- * @fileoverview added by tsickle
1027
- * Generated from: operators/public_api.ts
1028
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1029
- */
1030
-
1031
- /**
1032
- * @fileoverview added by tsickle
1033
- * Generated from: public_api.ts
1034
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1035
- */
1036
-
1037
- /**
1038
- * @fileoverview added by tsickle
1039
- * Generated from: index.ts
1040
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1041
- */
1042
-
1043
- /**
1044
- * @fileoverview added by tsickle
1045
- * Generated from: daffodil-core.ts
1046
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
713
+ * Generated bundle index. Do not edit.
1047
714
  */
1048
715
 
1049
716
  exports.DaffErrorStorageService = DaffErrorStorageService;