@daffodil/core 0.39.13 → 0.42.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 (184) hide show
  1. package/base64/browser/browser.service.d.ts +3 -0
  2. package/base64/server/server.service.d.ts +3 -0
  3. package/daffodil-core.d.ts +1 -0
  4. package/{esm2015/address/address.js → esm2020/address/address.mjs} +0 -0
  5. package/{esm2015/base64/base64.interface.js → esm2020/base64/base64.interface.mjs} +0 -0
  6. package/esm2020/base64/browser/browser.service.mjs +31 -0
  7. package/{esm2015/base64/public_api.js → esm2020/base64/public_api.mjs} +0 -0
  8. package/{esm2015/base64/server/public_api.js → esm2020/base64/server/public_api.mjs} +0 -0
  9. package/esm2020/base64/server/server.service.mjs +33 -0
  10. package/{esm2015/canonically-locateable/canonically-locateable.interface.js → esm2020/canonically-locateable/canonically-locateable.interface.mjs} +0 -0
  11. package/{esm2015/constructable/constructable.js → esm2020/constructable/constructable.mjs} +0 -0
  12. package/{esm2015/daffodil-core.js → esm2020/daffodil-core.mjs} +0 -0
  13. package/{esm2015/errors/error-map.js → esm2020/errors/error-map.mjs} +1 -1
  14. package/{esm2015/errors/error.interface.js → esm2020/errors/error.interface.mjs} +0 -0
  15. package/{esm2015/errors/inheritable-error.js → esm2020/errors/inheritable-error.mjs} +1 -1
  16. package/{esm2015/errors/is-error.js → esm2020/errors/is-error.mjs} +0 -0
  17. package/{esm2015/errors/public_api.js → esm2020/errors/public_api.mjs} +0 -0
  18. package/{esm2015/graphql/apollo/cacheable-operations/cacheable-operations-link.interface.js → esm2020/graphql/apollo/cacheable-operations/cacheable-operations-link.interface.mjs} +1 -1
  19. package/{esm2015/graphql/apollo/public_api.js → esm2020/graphql/apollo/public_api.mjs} +0 -0
  20. package/esm2020/graphql/apollo/queued-apollo/queued-apollo.service.mjs +64 -0
  21. package/{esm2015/graphql/daffodil-core-graphql.js → esm2020/graphql/daffodil-core-graphql.mjs} +0 -0
  22. package/{esm2015/graphql/fragments/build-fragment-definition.js → esm2020/graphql/fragments/build-fragment-definition.mjs} +0 -0
  23. package/esm2020/graphql/fragments/build-fragment-name-spread.mjs +18 -0
  24. package/{esm2015/graphql/fragments/public_api.js → esm2020/graphql/fragments/public_api.mjs} +0 -0
  25. package/{esm2015/graphql/index.js → esm2020/graphql/index.mjs} +0 -0
  26. package/{esm2015/graphql/public_api.js → esm2020/graphql/public_api.mjs} +0 -0
  27. package/{esm2015/identifiable/identifiable.interface.js → esm2020/identifiable/identifiable.interface.mjs} +0 -0
  28. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  29. package/{esm2015/kindable/kindable.interface.js → esm2020/kindable/kindable.interface.mjs} +0 -0
  30. package/{esm2015/kindable/public_api.js → esm2020/kindable/public_api.mjs} +0 -0
  31. package/{esm2015/locateable/locateable.interface.js → esm2020/locateable/locateable.interface.mjs} +0 -0
  32. package/{esm2015/operators/backoff.pipe.js → esm2020/operators/backoff.pipe.mjs} +0 -0
  33. package/{esm2015/operators/public_api.js → esm2020/operators/public_api.mjs} +0 -0
  34. package/{esm2015/orderable/orderable.js → esm2020/orderable/orderable.mjs} +1 -1
  35. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  36. package/{esm2015/routing/daffodil-core-routing.js → esm2020/routing/daffodil-core-routing.mjs} +0 -0
  37. package/{esm2015/routing/index.js → esm2020/routing/index.mjs} +0 -0
  38. package/{esm2015/routing/public_api.js → esm2020/routing/public_api.mjs} +0 -0
  39. package/esm2020/routing/uri/normalizer.service.mjs +38 -0
  40. package/{esm2015/routing/uri/public_api.js → esm2020/routing/uri/public_api.mjs} +0 -0
  41. package/esm2020/routing/uri/truncation/file-extension.mjs +10 -0
  42. package/{esm2015/routing/uri/truncation/leading-path-segments.js → esm2020/routing/uri/truncation/leading-path-segments.mjs} +0 -0
  43. package/esm2020/routing/uri/truncation/leading-slash.mjs +12 -0
  44. package/{esm2015/routing/uri/truncation/public_api.js → esm2020/routing/uri/truncation/public_api.mjs} +0 -0
  45. package/{esm2015/routing/uri/truncation/query-fragment.js → esm2020/routing/uri/truncation/query-fragment.mjs} +0 -0
  46. package/{esm2015/state/collection/paginable.js → esm2020/state/collection/paginable.mjs} +0 -0
  47. package/{esm2015/state/collection/public_api.js → esm2020/state/collection/public_api.mjs} +0 -0
  48. package/{esm2015/state/collection/sortable.js → esm2020/state/collection/sortable.mjs} +0 -0
  49. package/{esm2015/state/daffodil-core-state.js → esm2020/state/daffodil-core-state.mjs} +0 -0
  50. package/{esm2015/state/errors/public_api.js → esm2020/state/errors/public_api.mjs} +0 -0
  51. package/{esm2015/state/errors/state-error.interface.js → esm2020/state/errors/state-error.interface.mjs} +0 -0
  52. package/{esm2015/state/errors/transform-error-to-state-error.js → esm2020/state/errors/transform-error-to-state-error.mjs} +0 -0
  53. package/{esm2015/state/index.js → esm2020/state/index.mjs} +0 -0
  54. package/{esm2015/state/operators/public_api.js → esm2020/state/operators/public_api.mjs} +0 -0
  55. package/esm2020/state/operators/substream.pipe.mjs +42 -0
  56. package/{esm2015/state/public_api.js → esm2020/state/public_api.mjs} +0 -0
  57. package/{esm2015/state/reducers/create-meta.js → esm2020/state/reducers/create-meta.mjs} +0 -0
  58. package/{esm2015/state/reducers/public_api.js → esm2020/state/reducers/public_api.mjs} +0 -0
  59. package/{esm2015/state/states/loading.js → esm2020/state/states/loading.mjs} +0 -0
  60. package/{esm2015/state/states/mutable-loading.js → esm2020/state/states/mutable-loading.mjs} +0 -0
  61. package/{esm2015/state/states/public_api.js → esm2020/state/states/public_api.mjs} +0 -0
  62. package/{esm2015/state/states/state.enum.js → esm2020/state/states/state.enum.mjs} +0 -0
  63. package/{esm2015/state/states/stateable.interface.js → esm2020/state/states/stateable.interface.mjs} +0 -0
  64. package/{esm2015/state/store/facade.js → esm2020/state/store/facade.mjs} +0 -0
  65. package/{esm2015/storage/error/error.js → esm2020/storage/error/error.mjs} +0 -0
  66. package/esm2020/storage/error/error.service.mjs +33 -0
  67. package/{esm2015/storage/error/public_api.js → esm2020/storage/error/public_api.mjs} +0 -0
  68. package/esm2020/storage/localstorage/localstorage.service.mjs +46 -0
  69. package/esm2020/storage/noopstorage/noopstorage.service.mjs +24 -0
  70. package/esm2020/storage/persistence-server-safe.token.mjs +14 -0
  71. package/{esm2015/storage/persistence.interface.js → esm2020/storage/persistence.interface.mjs} +0 -0
  72. package/esm2020/storage/public_api.mjs +7 -0
  73. package/{esm2015/storage/server-error/public_api.js → esm2020/storage/server-error/public_api.mjs} +0 -0
  74. package/{esm2015/storage/server-error/server-error.js → esm2020/storage/server-error/server-error.mjs} +0 -0
  75. package/esm2020/storage/server-error/server-error.service.mjs +36 -0
  76. package/esm2020/testing/address/factories/address.factory.mjs +38 -0
  77. package/{esm2015/testing/angular/interfaces/in-memory-data-service.interface.js → esm2020/testing/angular/interfaces/in-memory-data-service.interface.mjs} +1 -1
  78. package/esm2020/testing/angular/mocks/pipes/currency.mjs +19 -0
  79. package/{esm2015/testing/daffodil-core-testing.js → esm2020/testing/daffodil-core-testing.mjs} +0 -0
  80. package/{esm2015/testing/factories/factory.interface.js → esm2020/testing/factories/factory.interface.mjs} +1 -1
  81. package/esm2020/testing/factories/factory.mjs +54 -0
  82. package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
  83. package/esm2020/testing/testing.module.mjs +17 -0
  84. package/{esm2015/types/dict.type.js → esm2020/types/dict.type.mjs} +0 -0
  85. package/{esm2015/types/id.type.js → esm2020/types/id.type.mjs} +0 -0
  86. package/{esm2015/types/public_api.js → esm2020/types/public_api.mjs} +0 -0
  87. package/{esm2015/utils/array-to-dict.js → esm2020/utils/array-to-dict.mjs} +0 -0
  88. package/{esm2015/utils/long-arithmetic.js → esm2020/utils/long-arithmetic.mjs} +0 -0
  89. package/{esm2015/utils/public_api.js → esm2020/utils/public_api.mjs} +0 -0
  90. package/{esm2015/utils/random-slice.js → esm2020/utils/random-slice.mjs} +0 -0
  91. package/{esm2015/utils/random-subset.js → esm2020/utils/random-subset.mjs} +0 -0
  92. package/{esm2015/utils/range.js → esm2020/utils/range.mjs} +0 -0
  93. package/{esm2015/utils/sample.js → esm2020/utils/sample.mjs} +0 -0
  94. package/{esm2015/utils/shuffle.js → esm2020/utils/shuffle.mjs} +0 -0
  95. package/{esm2015/utils/unique.js → esm2020/utils/unique.mjs} +0 -0
  96. package/fesm2015/{daffodil-core-graphql.js → daffodil-core-graphql.mjs} +12 -14
  97. package/fesm2015/daffodil-core-graphql.mjs.map +1 -0
  98. package/fesm2015/{daffodil-core-routing.js → daffodil-core-routing.mjs} +13 -13
  99. package/fesm2015/daffodil-core-routing.mjs.map +1 -0
  100. package/fesm2015/{daffodil-core-state.js → daffodil-core-state.mjs} +2 -3
  101. package/fesm2015/daffodil-core-state.mjs.map +1 -0
  102. package/fesm2015/daffodil-core-testing.mjs +128 -0
  103. package/fesm2015/daffodil-core-testing.mjs.map +1 -0
  104. package/fesm2015/daffodil-core.mjs +465 -0
  105. package/fesm2015/daffodil-core.mjs.map +1 -0
  106. package/fesm2020/daffodil-core-graphql.mjs +96 -0
  107. package/fesm2020/daffodil-core-graphql.mjs.map +1 -0
  108. package/fesm2020/daffodil-core-routing.mjs +84 -0
  109. package/fesm2020/daffodil-core-routing.mjs.map +1 -0
  110. package/fesm2020/daffodil-core-state.mjs +74 -0
  111. package/fesm2020/daffodil-core-state.mjs.map +1 -0
  112. package/fesm2020/daffodil-core-testing.mjs +131 -0
  113. package/fesm2020/daffodil-core-testing.mjs.map +1 -0
  114. package/{fesm2015/daffodil-core.js → fesm2020/daffodil-core.mjs} +71 -51
  115. package/fesm2020/daffodil-core.mjs.map +1 -0
  116. package/graphql/apollo/queued-apollo/queued-apollo.service.d.ts +4 -2
  117. package/graphql/daffodil-core-graphql.d.ts +1 -0
  118. package/graphql/package.json +5 -6
  119. package/package.json +59 -15
  120. package/routing/daffodil-core-routing.d.ts +1 -0
  121. package/routing/package.json +5 -6
  122. package/routing/uri/normalizer.service.d.ts +3 -0
  123. package/state/daffodil-core-state.d.ts +1 -0
  124. package/state/package.json +5 -6
  125. package/storage/error/error.service.d.ts +3 -0
  126. package/storage/localstorage/localstorage.service.d.ts +3 -0
  127. package/storage/noopstorage/noopstorage.service.d.ts +3 -0
  128. package/storage/persistence-server-safe.token.d.ts +6 -0
  129. package/storage/public_api.d.ts +1 -0
  130. package/storage/server-error/server-error.service.d.ts +3 -0
  131. package/testing/address/factories/address.factory.d.ts +3 -0
  132. package/testing/angular/mocks/pipes/currency.d.ts +3 -0
  133. package/testing/daffodil-core-testing.d.ts +1 -0
  134. package/testing/package.json +5 -6
  135. package/testing/testing.module.d.ts +5 -0
  136. package/utils/array-to-dict.d.ts +1 -1
  137. package/bundles/daffodil-core-graphql.umd.js +0 -445
  138. package/bundles/daffodil-core-graphql.umd.js.map +0 -1
  139. package/bundles/daffodil-core-graphql.umd.min.js +0 -16
  140. package/bundles/daffodil-core-graphql.umd.min.js.map +0 -1
  141. package/bundles/daffodil-core-routing.umd.js +0 -100
  142. package/bundles/daffodil-core-routing.umd.js.map +0 -1
  143. package/bundles/daffodil-core-routing.umd.min.js +0 -2
  144. package/bundles/daffodil-core-routing.umd.min.js.map +0 -1
  145. package/bundles/daffodil-core-state.umd.js +0 -405
  146. package/bundles/daffodil-core-state.umd.js.map +0 -1
  147. package/bundles/daffodil-core-state.umd.min.js +0 -16
  148. package/bundles/daffodil-core-state.umd.min.js.map +0 -1
  149. package/bundles/daffodil-core-testing.umd.js +0 -466
  150. package/bundles/daffodil-core-testing.umd.js.map +0 -1
  151. package/bundles/daffodil-core-testing.umd.min.js +0 -16
  152. package/bundles/daffodil-core-testing.umd.min.js.map +0 -1
  153. package/bundles/daffodil-core.umd.js +0 -829
  154. package/bundles/daffodil-core.umd.js.map +0 -1
  155. package/bundles/daffodil-core.umd.min.js +0 -16
  156. package/bundles/daffodil-core.umd.min.js.map +0 -1
  157. package/daffodil-core.metadata.json +0 -1
  158. package/esm2015/base64/browser/browser.service.js +0 -30
  159. package/esm2015/base64/server/server.service.js +0 -32
  160. package/esm2015/graphql/apollo/queued-apollo/queued-apollo.service.js +0 -67
  161. package/esm2015/graphql/fragments/build-fragment-name-spread.js +0 -20
  162. package/esm2015/routing/uri/normalizer.service.js +0 -40
  163. package/esm2015/routing/uri/truncation/file-extension.js +0 -10
  164. package/esm2015/routing/uri/truncation/leading-slash.js +0 -12
  165. package/esm2015/state/operators/substream.pipe.js +0 -44
  166. package/esm2015/storage/error/error.service.js +0 -31
  167. package/esm2015/storage/localstorage/localstorage.service.js +0 -45
  168. package/esm2015/storage/noopstorage/noopstorage.service.js +0 -22
  169. package/esm2015/storage/public_api.js +0 -6
  170. package/esm2015/storage/server-error/server-error.service.js +0 -34
  171. package/esm2015/testing/address/factories/address.factory.js +0 -38
  172. package/esm2015/testing/angular/mocks/pipes/currency.js +0 -15
  173. package/esm2015/testing/factories/factory.js +0 -51
  174. package/esm2015/testing/testing.module.js +0 -12
  175. package/fesm2015/daffodil-core-graphql.js.map +0 -1
  176. package/fesm2015/daffodil-core-routing.js.map +0 -1
  177. package/fesm2015/daffodil-core-state.js.map +0 -1
  178. package/fesm2015/daffodil-core-testing.js +0 -120
  179. package/fesm2015/daffodil-core-testing.js.map +0 -1
  180. package/fesm2015/daffodil-core.js.map +0 -1
  181. package/graphql/daffodil-core-graphql.metadata.json +0 -1
  182. package/routing/daffodil-core-routing.metadata.json +0 -1
  183. package/state/daffodil-core-state.metadata.json +0 -1
  184. package/testing/daffodil-core-testing.metadata.json +0 -1
@@ -0,0 +1,84 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
+ import * as i1 from '@angular/router';
4
+ import { PRIMARY_OUTLET } from '@angular/router';
5
+
6
+ /**
7
+ * Truncates the file extension from the end of the URI.
8
+ * Captures the truncated URI in the `uri` named group.
9
+ */
10
+ const DAFF_TRUNCATE_FILE_EXTENSION_REGEX = /(.*)(?=\.)/;
11
+ /**
12
+ * Truncates the file extension from the end of the URI.
13
+ */
14
+ const daffUriTruncateFileExtension = (uri) => uri.match(DAFF_TRUNCATE_FILE_EXTENSION_REGEX)?.[0] || uri;
15
+
16
+ /**
17
+ * Truncates leading path segments from a URI.
18
+ * e.g. /foo/bar/baz.html -> baz.html
19
+ */
20
+ const daffUriTruncateLeadingPathSegments = (uri) => uri.split('/').pop();
21
+
22
+ /**
23
+ * A regex to truncate the leading slash from a URI,
24
+ * capturing the truncated in the `uri` group.
25
+ * e.g. /foo/bar/baz.html -> foo/bar/baz.html
26
+ */
27
+ const DAFF_TRUNCATE_LEADING_SLASH_REGEX = /^\/?(?<uri>.+)$/;
28
+ /**
29
+ * Truncates the leading slash from a URI.
30
+ * e.g. /foo/bar/baz.html -> foo/bar/baz.html
31
+ */
32
+ const daffUriTruncateLeadingSlash = (uri) => uri.match(DAFF_TRUNCATE_LEADING_SLASH_REGEX)?.groups.uri || uri;
33
+
34
+ /**
35
+ * Truncates query parameters and fragments from a URI.
36
+ * e.g. /foo/bar/baz.html?thing=test#id -> /foo/bar/baz.html
37
+ */
38
+ const daffUriTruncateQueryFragment = (uri) => {
39
+ if (uri[0] !== '/') {
40
+ uri = `/${uri}`;
41
+ }
42
+ return uri.replace(/(\?.*)|(#.*)/, '');
43
+ };
44
+
45
+ /**
46
+ * Processes URIs to remove extraneous Angular-specific information.
47
+ */
48
+ class DaffRoutingUriNormalizer {
49
+ constructor(urlParser) {
50
+ this.urlParser = urlParser;
51
+ }
52
+ /**
53
+ * Normalizes an Angular router path into a useable URI.
54
+ * e.g. `normalize('some/url.html(secondary:outlet)?query=param#fragment')` -> `'some/url.html?query=param#fragment'`
55
+ *
56
+ * Optionally accepts an outlet to target.
57
+ * e.g. `normalize('some/url.html(secondary:outlet)?query=param#fragment', 'secondary')` -> `'outlet?query=param#fragment'`
58
+ *
59
+ * @param uri The URI to normalize.
60
+ * @param outlet An optional outlet to process into a URI.
61
+ */
62
+ normalize(uri, outlet = PRIMARY_OUTLET) {
63
+ const urlTree = this.urlParser.parse(uri);
64
+ urlTree.root.children = {
65
+ [PRIMARY_OUTLET]: urlTree.root.children[outlet],
66
+ };
67
+ return this.urlParser.serialize(urlTree);
68
+ }
69
+ }
70
+ /** @nocollapse */ /** @nocollapse */ DaffRoutingUriNormalizer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffRoutingUriNormalizer, deps: [{ token: i1.UrlSerializer }], target: i0.ɵɵFactoryTarget.Injectable });
71
+ /** @nocollapse */ /** @nocollapse */ DaffRoutingUriNormalizer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffRoutingUriNormalizer, providedIn: 'root' });
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffRoutingUriNormalizer, decorators: [{
73
+ type: Injectable,
74
+ args: [{
75
+ providedIn: 'root',
76
+ }]
77
+ }], ctorParameters: function () { return [{ type: i1.UrlSerializer }]; } });
78
+
79
+ /**
80
+ * Generated bundle index. Do not edit.
81
+ */
82
+
83
+ export { DAFF_TRUNCATE_FILE_EXTENSION_REGEX, DAFF_TRUNCATE_LEADING_SLASH_REGEX, DaffRoutingUriNormalizer, daffUriTruncateFileExtension, daffUriTruncateLeadingPathSegments, daffUriTruncateLeadingSlash, daffUriTruncateQueryFragment };
84
+ //# sourceMappingURL=daffodil-core-routing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daffodil-core-routing.mjs","sources":["../../../libs/core/routing/src/uri/truncation/file-extension.ts","../../../libs/core/routing/src/uri/truncation/leading-path-segments.ts","../../../libs/core/routing/src/uri/truncation/leading-slash.ts","../../../libs/core/routing/src/uri/truncation/query-fragment.ts","../../../libs/core/routing/src/uri/normalizer.service.ts","../../../libs/core/routing/src/daffodil-core-routing.ts"],"sourcesContent":["/**\n * Truncates the file extension from the end of the URI.\n * Captures the truncated URI in the `uri` named group.\n */\nexport const DAFF_TRUNCATE_FILE_EXTENSION_REGEX = /(.*)(?=\\.)/;\n/**\n * Truncates the file extension from the end of the URI.\n */\nexport const daffUriTruncateFileExtension = (uri: string): string => uri.match(DAFF_TRUNCATE_FILE_EXTENSION_REGEX)?.[0] || uri;\n","/**\n * Truncates leading path segments from a URI.\n * e.g. /foo/bar/baz.html -> baz.html\n */\nexport const daffUriTruncateLeadingPathSegments = (uri: string): string =>\n uri.split('/').pop();\n","/**\n * A regex to truncate the leading slash from a URI,\n * capturing the truncated in the `uri` group.\n * e.g. /foo/bar/baz.html -> foo/bar/baz.html\n */\nexport const DAFF_TRUNCATE_LEADING_SLASH_REGEX = /^\\/?(?<uri>.+)$/;\n/**\n * Truncates the leading slash from a URI.\n * e.g. /foo/bar/baz.html -> foo/bar/baz.html\n */\nexport const daffUriTruncateLeadingSlash = (uri: string): string =>\n uri.match(DAFF_TRUNCATE_LEADING_SLASH_REGEX)?.groups.uri || uri;\n","/**\n * Truncates query parameters and fragments from a URI.\n * e.g. /foo/bar/baz.html?thing=test#id -> /foo/bar/baz.html\n */\nexport const daffUriTruncateQueryFragment = (uri: string): string => {\n if(uri[0] !== '/') {\n uri = `/${uri}`;\n }\n return uri.replace(/(\\?.*)|(#.*)/, '');\n};\n","import { Injectable } from '@angular/core';\nimport {\n UrlSerializer,\n UrlTree,\n PRIMARY_OUTLET,\n} from '@angular/router';\n\n/**\n * Processes URIs to remove extraneous Angular-specific information.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffRoutingUriNormalizer {\n constructor(\n private urlParser: UrlSerializer,\n ) {}\n\n /**\n * Normalizes an Angular router path into a useable URI.\n * e.g. `normalize('some/url.html(secondary:outlet)?query=param#fragment')` -> `'some/url.html?query=param#fragment'`\n *\n * Optionally accepts an outlet to target.\n * e.g. `normalize('some/url.html(secondary:outlet)?query=param#fragment', 'secondary')` -> `'outlet?query=param#fragment'`\n *\n * @param uri The URI to normalize.\n * @param outlet An optional outlet to process into a URI.\n */\n normalize(uri: string, outlet = PRIMARY_OUTLET): string {\n const urlTree: UrlTree = this.urlParser.parse(uri);\n urlTree.root.children = {\n [PRIMARY_OUTLET]: urlTree.root.children[outlet],\n };\n\n return this.urlParser.serialize(urlTree);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AACI,MAAM,kCAAkC,GAAG,aAAa;AAC/D;;AAEG;MACU,4BAA4B,GAAG,CAAC,GAAW,KAAa,GAAG,CAAC,KAAK,CAAC,kCAAkC,CAAC,GAAG,CAAC,CAAC,IAAI;;ACR3H;;;AAGG;AACU,MAAA,kCAAkC,GAAG,CAAC,GAAW,KAC5D,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG;;ACLpB;;;;AAIG;AACI,MAAM,iCAAiC,GAAG,kBAAkB;AACnE;;;AAGG;MACU,2BAA2B,GAAG,CAAC,GAAW,KACrD,GAAG,CAAC,KAAK,CAAC,iCAAiC,CAAC,EAAE,MAAM,CAAC,GAAG,IAAI;;ACX9D;;;AAGG;AACU,MAAA,4BAA4B,GAAG,CAAC,GAAW,KAAY;AAClE,IAAA,IAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;AACjB,QAAA,GAAG,GAAG,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE,CAAC;AACjB,KAAA;IACD,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;AACzC;;ACFA;;AAEG;MAIU,wBAAwB,CAAA;AACnC,IAAA,WAAA,CACU,SAAwB,EAAA;QAAxB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAe;KAC9B;AAEJ;;;;;;;;;AASG;AACH,IAAA,SAAS,CAAC,GAAW,EAAE,MAAM,GAAG,cAAc,EAAA;QAC5C,MAAM,OAAO,GAAY,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACnD,QAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG;YACtB,CAAC,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;SAChD,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;KAC1C;;2JAtBU,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxB,sCAAA,wBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFvB,MAAM,EAAA,CAAA,CAAA;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
@@ -0,0 +1,74 @@
1
+ import { pipe } from 'rxjs';
2
+ import { scan, filter } from 'rxjs/operators';
3
+
4
+ const compareActionSequenceStep = (step, action) => Array.isArray(step)
5
+ ? step.reduce((acc, type) => acc || action.type === type, false)
6
+ : action.type === step;
7
+ /**
8
+ * Watches for a particular stream of actions in the specified order and
9
+ * emits a list of those actions once all sequence steps have been matched.
10
+ *
11
+ * This will find the first occurence of the substream and not necessarily the most concise or recent substream.
12
+ * For example, substream([A, B]) encountering an action stream of [A1, A2, B1, B2] will emit [A1, B1].
13
+ * When a substream is found and emitted, the list is reset and it will continue to listen to the action stream.
14
+ *
15
+ * You can indicate that a particular step in the sequence can be matched by mutiple actions by passing an array for that step.
16
+ * For example, if the first step of the sequence could be action A or action B: substream([[A, B], C]).
17
+ * An action stream of [A1, C1] would cause substream to emit [A1, C1].
18
+ * An action stream of [B1, C1] would cause substream to emit [B1, C1].
19
+ * An action stream of [A1, B1, C1] would cause substream to emit [A1, C1].
20
+ *
21
+ * You can optionally pass a list of terminators.
22
+ * If a terminator is encountered in the action stream, any partially matched substream is reset.
23
+ * For example, substream([A, B], C) would not emit anything for an action stream of [A1, C1, B1].
24
+ *
25
+ * @param sequence The sequence of action types that define the substream to listen for.
26
+ * @param terminators A list of terminators, any of which interrupt and reset a partially matched substream.
27
+ */
28
+ const substream = (sequence, ...terminators) => {
29
+ const isFullMatch = matchedSubstream => matchedSubstream.length === sequence.length;
30
+ const accumulateMatchedSubstream = (matchedSubstream, action) => compareActionSequenceStep(sequence[matchedSubstream.length], action)
31
+ ? [
32
+ ...matchedSubstream,
33
+ action,
34
+ ]
35
+ : matchedSubstream;
36
+ return pipe(scan((matchedSubstream, action) => terminators.indexOf(action.type) > -1
37
+ // terminator found, reset the list
38
+ ? []
39
+ : accumulateMatchedSubstream(
40
+ // reset the list if fully matched
41
+ isFullMatch(matchedSubstream) ? [] : matchedSubstream, action), []), filter(isFullMatch));
42
+ };
43
+
44
+ /**
45
+ * Transforms an error instance to a state error object.
46
+ */
47
+ function daffTransformErrorToStateError({ code, message, recoverable }) {
48
+ return { code, message, recoverable };
49
+ }
50
+
51
+ /**
52
+ * The direction in which to sort a list of elements, e.g. if the list was
53
+ * sorted alphabetically, "Ascending" would be from "A-Z",
54
+ * and "Descending" would be from "Z-A".
55
+ */
56
+ var DaffSortDirectionEnum;
57
+ (function (DaffSortDirectionEnum) {
58
+ DaffSortDirectionEnum["Ascending"] = "ASC";
59
+ DaffSortDirectionEnum["Descending"] = "DSC";
60
+ })(DaffSortDirectionEnum || (DaffSortDirectionEnum = {}));
61
+
62
+ /**
63
+ * Creates and returns a composite reducer that invokes each of the passed reducers in turn.
64
+ */
65
+ function daffComposeReducers(reducers) {
66
+ return (state, action) => reducers.reduce((nextState, reducer) => reducer(nextState, action), state);
67
+ }
68
+
69
+ /**
70
+ * Generated bundle index. Do not edit.
71
+ */
72
+
73
+ export { DaffSortDirectionEnum, daffComposeReducers, daffTransformErrorToStateError, substream };
74
+ //# sourceMappingURL=daffodil-core-state.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daffodil-core-state.mjs","sources":["../../../libs/core/state/src/operators/substream.pipe.ts","../../../libs/core/state/src/errors/transform-error-to-state-error.ts","../../../libs/core/state/src/collection/sortable.ts","../../../libs/core/state/src/reducers/create-meta.ts","../../../libs/core/state/src/daffodil-core-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\nimport { pipe } from 'rxjs';\nimport {\n scan,\n filter,\n} from 'rxjs/operators';\n\nexport type ActionType = Action['type'];\nexport type ActionSequenceStep = ActionType | ActionType[];\nexport type ActionSequence = ActionSequenceStep[];\n\nconst compareActionSequenceStep = (step: ActionSequenceStep, action: Action): boolean => Array.isArray(step)\n ? step.reduce((acc, type) => acc || action.type === type, false)\n : action.type === step;\n\n/**\n * Watches for a particular stream of actions in the specified order and\n * emits a list of those actions once all sequence steps have been matched.\n *\n * This will find the first occurence of the substream and not necessarily the most concise or recent substream.\n * For example, substream([A, B]) encountering an action stream of [A1, A2, B1, B2] will emit [A1, B1].\n * When a substream is found and emitted, the list is reset and it will continue to listen to the action stream.\n *\n * You can indicate that a particular step in the sequence can be matched by mutiple actions by passing an array for that step.\n * For example, if the first step of the sequence could be action A or action B: substream([[A, B], C]).\n * An action stream of [A1, C1] would cause substream to emit [A1, C1].\n * An action stream of [B1, C1] would cause substream to emit [B1, C1].\n * An action stream of [A1, B1, C1] would cause substream to emit [A1, C1].\n *\n * You can optionally pass a list of terminators.\n * If a terminator is encountered in the action stream, any partially matched substream is reset.\n * For example, substream([A, B], C) would not emit anything for an action stream of [A1, C1, B1].\n *\n * @param sequence The sequence of action types that define the substream to listen for.\n * @param terminators A list of terminators, any of which interrupt and reset a partially matched substream.\n */\nexport const substream = (sequence: ActionSequence, ...terminators: ActionType[]) => {\n const isFullMatch = matchedSubstream => matchedSubstream.length === sequence.length;\n const accumulateMatchedSubstream = (matchedSubstream, action) =>\n compareActionSequenceStep(sequence[matchedSubstream.length], action)\n ? [\n ...matchedSubstream,\n action,\n ]\n : matchedSubstream;\n\n return pipe(\n scan<Action, Action[]>((matchedSubstream, action) =>\n terminators.indexOf(action.type) > -1\n // terminator found, reset the list\n ? []\n : accumulateMatchedSubstream(\n // reset the list if fully matched\n isFullMatch(matchedSubstream) ? [] : matchedSubstream,\n action,\n ),\n []),\n filter(isFullMatch),\n );\n};\n","import { DaffError } from '@daffodil/core';\n\nimport { DaffStateError } from './state-error.interface';\n\nexport type ErrorTransformer = (DaffError) => DaffStateError;\n\n/**\n * Transforms an error instance to a state error object.\n */\nexport function daffTransformErrorToStateError({ code, message, recoverable }: DaffError): DaffStateError {\n return { code, message, recoverable };\n}\n","/**\n * The metadata that describes the sorting behavior of a collection of elements.\n */\nexport interface DaffSortOptions {\n default: DaffSortOption['value'];\n options: DaffSortOption[];\n}\n\n\n/**\n * One particular option used to sort a collection of elements;\n */\nexport interface DaffSortOption {\n label: string;\n value: any;\n}\n\n/**\n * The direction in which to sort a list of elements, e.g. if the list was\n * sorted alphabetically, \"Ascending\" would be from \"A-Z\",\n * and \"Descending\" would be from \"Z-A\".\n */\nexport enum DaffSortDirectionEnum {\n Ascending = 'ASC',\n Descending = 'DSC'\n}\n\n/**\n * Describes the properties of a collection that make the collection able to be\n * sorted by Daffodil.\n */\nexport interface DaffSortable {\n\n /**\n * The available options by which to sort the collection.\n */\n sort_options: DaffSortOptions;\n\n /**\n * The currently applied sorting option.\n */\n applied_sort_option: DaffSortOption['value'];\n\n /**\n * The currently applied sort direction.\n */\n applied_sort_direction: DaffSortDirectionEnum;\n}\n","import {\n Action,\n ActionReducer,\n} from '@ngrx/store';\n\n/**\n * Creates and returns a composite reducer that invokes each of the passed reducers in turn.\n */\nexport function daffComposeReducers<\n T,\n V extends Action = Action\n>(reducers: ActionReducer<T, V>[]): ActionReducer<T, V> {\n return (state: T, action: V): T =>\n reducers.reduce((nextState, reducer) => reducer(nextState, action), state);\n}\n","/**\n * Generated bundle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AAHD,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,WAAA,CAAA,GAAA,KAAiB,CAAA;AACjB,IAAA,qBAAA,CAAA,YAAA,CAAA,GAAA,KAAkB,CAAA;AACpB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA;;ACpBD;;AAEG;AACG,SAAU,mBAAmB,CAGjC,QAA+B,EAAA;IAC/B,OAAO,CAAC,KAAQ,EAAE,MAAS,KACzB,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,OAAO,KAAK,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;AAC/E;;ACdA;;AAEG;;;;"}
@@ -0,0 +1,131 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Pipe, NgModule } from '@angular/core';
3
+ import * as faker from '@faker-js/faker/locale/en_US';
4
+ import { range } from '@daffodil/core';
5
+
6
+ /**
7
+ * The base class for model factories.
8
+ *
9
+ * The mock class is passed as the first constructor arg
10
+ * and any additional args are passed to the mock class constructor.
11
+ *
12
+ * The constructor args can be omitted if the `create` method is overridden.
13
+ *
14
+ * The following example demonstrates using this feature to inject
15
+ * a different factory into a mock class.
16
+ *
17
+ * ```ts
18
+ * class MyMockModel {
19
+ * constructor(
20
+ * private otherFactory: MyOtherFactory
21
+ * ) {}
22
+ *
23
+ * private createOtherModel() {
24
+ * return this.otherFactory.create()
25
+ * }
26
+ *
27
+ * otherModel = this.createOtherModel()
28
+ * }
29
+ *
30
+ * @Injectable()
31
+ * class TestFactory extends DaffModelFactory<MyMockModel> {
32
+ * constructor(
33
+ * otherFactory: MyOtherFactory
34
+ * ) {
35
+ * super(MyMockModel, otherFactory)
36
+ * }
37
+ * }
38
+ * ```
39
+ */
40
+ class DaffModelFactory {
41
+ constructor(type, ...args) {
42
+ this.type = type;
43
+ this._instantiationArgs = args;
44
+ }
45
+ create(partial = {}) {
46
+ if (!this.type) {
47
+ throw new Error('`type` is required if `create` is not overriden.');
48
+ }
49
+ return {
50
+ ...new this.type(...this._instantiationArgs),
51
+ ...partial,
52
+ };
53
+ }
54
+ createMany(qty = 1, partial = {}) {
55
+ return range(0, qty - 1).map(() => this.create(partial));
56
+ }
57
+ }
58
+
59
+ /**
60
+ * @deprecated
61
+ * Prefer the `MockDaffAddress` of daffodil/geography/testing`
62
+ */
63
+ class MockDaffAddress {
64
+ constructor() {
65
+ this.firstname = faker.name.firstName();
66
+ this.lastname = faker.name.lastName();
67
+ this.street = faker.address.streetName();
68
+ this.city = faker.address.city();
69
+ this.state = faker.address.stateAbbr();
70
+ this.email = faker.internet.email();
71
+ this.postcode = faker.address.zipCode();
72
+ this.telephone = faker.phone.phoneNumber();
73
+ }
74
+ }
75
+ /**
76
+ * @deprecated
77
+ * Prefer the `DaffAddressFactory` of `daffodil/geography/testing`
78
+ */
79
+ class DaffAddressFactory extends DaffModelFactory {
80
+ constructor() {
81
+ super(MockDaffAddress);
82
+ }
83
+ }
84
+ /** @nocollapse */ /** @nocollapse */ DaffAddressFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
85
+ /** @nocollapse */ /** @nocollapse */ DaffAddressFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, providedIn: 'root' });
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, decorators: [{
87
+ type: Injectable,
88
+ args: [{
89
+ providedIn: 'root',
90
+ }]
91
+ }], ctorParameters: function () { return []; } });
92
+
93
+ /**
94
+ * @docs
95
+ * A mock CurrencyPipe that does nothing to a given input.
96
+ * This pipe is useful for asserting that a CurrencyPipe is in use via a spy,
97
+ * but ignoring the actual underlying implementation
98
+ */
99
+ class DaffMockCurrencyPipe {
100
+ transform(value) { }
101
+ ;
102
+ }
103
+ /** @nocollapse */ /** @nocollapse */ DaffMockCurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMockCurrencyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
104
+ /** @nocollapse */ /** @nocollapse */ DaffMockCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMockCurrencyPipe, name: "currency" });
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMockCurrencyPipe, decorators: [{
106
+ type: Pipe,
107
+ args: [{ name: 'currency' }]
108
+ }] });
109
+
110
+ class DaffCoreTestingModule {
111
+ }
112
+ /** @nocollapse */ /** @nocollapse */ DaffCoreTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
113
+ /** @nocollapse */ /** @nocollapse */ DaffCoreTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule, declarations: [DaffMockCurrencyPipe] });
114
+ /** @nocollapse */ /** @nocollapse */ DaffCoreTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule });
115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule, decorators: [{
116
+ type: NgModule,
117
+ args: [{
118
+ declarations: [
119
+ DaffMockCurrencyPipe,
120
+ ],
121
+ }]
122
+ }] });
123
+
124
+ // Address
125
+
126
+ /**
127
+ * Generated bundle index. Do not edit.
128
+ */
129
+
130
+ export { DaffAddressFactory, DaffCoreTestingModule, DaffMockCurrencyPipe, DaffModelFactory };
131
+ //# sourceMappingURL=daffodil-core-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daffodil-core-testing.mjs","sources":["../../../libs/core/testing/src/factories/factory.ts","../../../libs/core/testing/src/address/factories/address.factory.ts","../../../libs/core/testing/src/angular/mocks/pipes/currency.ts","../../../libs/core/testing/src/testing.module.ts","../../../libs/core/testing/src/index.ts","../../../libs/core/testing/src/daffodil-core-testing.ts"],"sourcesContent":["import {\n range,\n Constructable,\n} from '@daffodil/core';\n\nimport { IDaffModelFactory } from './factory.interface';\n\n/**\n * The base class for model factories.\n *\n * The mock class is passed as the first constructor arg\n * and any additional args are passed to the mock class constructor.\n *\n * The constructor args can be omitted if the `create` method is overridden.\n *\n * The following example demonstrates using this feature to inject\n * a different factory into a mock class.\n *\n * ```ts\n * class MyMockModel {\n * constructor(\n * private otherFactory: MyOtherFactory\n * ) {}\n *\n * private createOtherModel() {\n * return this.otherFactory.create()\n * }\n *\n * otherModel = this.createOtherModel()\n * }\n *\n * @Injectable()\n * class TestFactory extends DaffModelFactory<MyMockModel> {\n * constructor(\n * otherFactory: MyOtherFactory\n * ) {\n * super(MyMockModel, otherFactory)\n * }\n * }\n * ```\n */\nexport abstract class DaffModelFactory<T extends Record<string, any>> implements IDaffModelFactory<T> {\n _instantiationArgs: ConstructorParameters<Constructable<T>>;\n\n constructor(\n public type?: Constructable<T>,\n ...args: ConstructorParameters<Constructable<T>>\n ) {\n this._instantiationArgs = args;\n }\n\n create(partial = {}): T {\n if (!this.type) {\n throw new Error('`type` is required if `create` is not overriden.');\n }\n return {\n ...new this.type(...this._instantiationArgs),\n ...partial,\n };\n }\n\n createMany(qty = 1, partial = {}): T[] {\n return range(0, qty - 1).map(() => this.create(partial));\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffAddress } from '@daffodil/core';\n\nimport { DaffModelFactory } from '../../factories/factory';\n\n/**\n * @deprecated\n * Prefer the `MockDaffAddress` of daffodil/geography/testing`\n */\nexport class MockDaffAddress implements DaffAddress {\n firstname = faker.name.firstName();\n lastname = faker.name.lastName();\n street = faker.address.streetName();\n city = faker.address.city();\n state = faker.address.stateAbbr();\n email = faker.internet.email();\n postcode = faker.address.zipCode();\n telephone = faker.phone.phoneNumber();\n}\n\n/**\n * @deprecated\n * Prefer the `DaffAddressFactory` of `daffodil/geography/testing`\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAddressFactory extends DaffModelFactory<DaffAddress>{\n constructor(){\n super(MockDaffAddress);\n }\n}\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n/**\n * @docs\n * A mock CurrencyPipe that does nothing to a given input.\n * This pipe is useful for asserting that a CurrencyPipe is in use via a spy,\n * but ignoring the actual underlying implementation\n */\n@Pipe({ name: 'currency' })\nexport class DaffMockCurrencyPipe implements PipeTransform {\n transform(value: number) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffMockCurrencyPipe } from './angular/mocks/pipes/currency';\n\n@NgModule({\n declarations: [\n DaffMockCurrencyPipe,\n ],\n})\nexport class DaffCoreTestingModule {}\n","// Address\nexport { DaffAddressFactory } from './address/factories/address.factory';\n\n//@angular/core\nexport { DaffMockCurrencyPipe } from './angular/mocks/pipes/currency';\nexport { DaffInMemoryDataServiceInterface } from './angular/interfaces/in-memory-data-service.interface';\n\n//Core\nexport { DaffCoreTestingModule } from './testing.module';\nexport { DaffModelFactory } from './factories/factory';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;MACmB,gBAAgB,CAAA;IAGpC,WACS,CAAA,IAAuB,EAC9B,GAAG,IAA6C,EAAA;QADzC,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAmB;AAG9B,QAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;KAChC;IAED,MAAM,CAAC,OAAO,G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AA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;AACrB,qBAAA;AACF,iBAAA,CAAA;;;ACRD;;ACAA;;AAEG;;;;"}
@@ -1,4 +1,5 @@
1
- import { ɵɵdefineInjectable, Injectable, ɵɵinject, PLATFORM_ID, Inject, InjectionToken, inject } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, PLATFORM_ID, Inject, InjectionToken, inject } from '@angular/core';
2
3
  import { isPlatformBrowser } from '@angular/common';
3
4
  import { pipe, throwError, timer } from 'rxjs';
4
5
  import { retryWhen, mergeMap } from 'rxjs/operators';
@@ -232,12 +233,14 @@ class DaffErrorStorageService {
232
233
  }
233
234
  }
234
235
  DaffErrorStorageService.ERROR_MESSAGE = 'The DaffErrorStorageService always throws an error.';
235
- /** @nocollapse */ DaffErrorStorageService.ɵprov = ɵɵdefineInjectable({ factory: function DaffErrorStorageService_Factory() { return new DaffErrorStorageService(); }, token: DaffErrorStorageService, providedIn: "root" });
236
- DaffErrorStorageService.decorators = [
237
- { type: Injectable, args: [{
238
- providedIn: 'root',
239
- },] }
240
- ];
236
+ /** @nocollapse */ /** @nocollapse */ DaffErrorStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffErrorStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
237
+ /** @nocollapse */ /** @nocollapse */ DaffErrorStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffErrorStorageService, providedIn: 'root' });
238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffErrorStorageService, decorators: [{
239
+ type: Injectable,
240
+ args: [{
241
+ providedIn: 'root',
242
+ }]
243
+ }] });
241
244
 
242
245
  /**
243
246
  * An error thrown when there is an attempt to access storage on the server and none is available.
@@ -274,12 +277,14 @@ class DaffServerErrorStorageService {
274
277
  }
275
278
  }
276
279
  DaffServerErrorStorageService.ERROR_MESSAGE = 'The DaffServerErrorStorageService always throws an error.';
277
- /** @nocollapse */ DaffServerErrorStorageService.ɵprov = ɵɵdefineInjectable({ factory: function DaffServerErrorStorageService_Factory() { return new DaffServerErrorStorageService(); }, token: DaffServerErrorStorageService, providedIn: "root" });
278
- DaffServerErrorStorageService.decorators = [
279
- { type: Injectable, args: [{
280
- providedIn: 'root',
281
- },] }
282
- ];
280
+ /** @nocollapse */ /** @nocollapse */ DaffServerErrorStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerErrorStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
281
+ /** @nocollapse */ /** @nocollapse */ DaffServerErrorStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerErrorStorageService, providedIn: 'root' });
282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerErrorStorageService, decorators: [{
283
+ type: Injectable,
284
+ args: [{
285
+ providedIn: 'root',
286
+ }]
287
+ }] });
283
288
 
284
289
  /**
285
290
  * @inheritdoc
@@ -312,16 +317,17 @@ class DaffLocalStorageService {
312
317
  localStorage.clear();
313
318
  }
314
319
  }
315
- /** @nocollapse */ DaffLocalStorageService.ɵprov = ɵɵdefineInjectable({ factory: function DaffLocalStorageService_Factory() { return new DaffLocalStorageService(ɵɵinject(PLATFORM_ID)); }, token: DaffLocalStorageService, providedIn: "root" });
316
- DaffLocalStorageService.decorators = [
317
- { type: Injectable, args: [{
318
- providedIn: 'root',
319
- },] }
320
- ];
321
- /** @nocollapse */
322
- DaffLocalStorageService.ctorParameters = () => [
323
- { type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
324
- ];
320
+ /** @nocollapse */ /** @nocollapse */ DaffLocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffLocalStorageService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
321
+ /** @nocollapse */ /** @nocollapse */ DaffLocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffLocalStorageService, providedIn: 'root' });
322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffLocalStorageService, decorators: [{
323
+ type: Injectable,
324
+ args: [{
325
+ providedIn: 'root',
326
+ }]
327
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
328
+ type: Inject,
329
+ args: [PLATFORM_ID]
330
+ }] }]; } });
325
331
 
326
332
  /**
327
333
  * @inheritdoc
@@ -336,12 +342,14 @@ class DaffNoopStorageService {
336
342
  removeItem(key) { }
337
343
  ;
338
344
  }
339
- /** @nocollapse */ DaffNoopStorageService.ɵprov = ɵɵdefineInjectable({ factory: function DaffNoopStorageService_Factory() { return new DaffNoopStorageService(); }, token: DaffNoopStorageService, providedIn: "root" });
340
- DaffNoopStorageService.decorators = [
341
- { type: Injectable, args: [{
342
- providedIn: 'root',
343
- },] }
344
- ];
345
+ /** @nocollapse */ /** @nocollapse */ DaffNoopStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNoopStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
346
+ /** @nocollapse */ /** @nocollapse */ DaffNoopStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNoopStorageService, providedIn: 'root' });
347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNoopStorageService, decorators: [{
348
+ type: Injectable,
349
+ args: [{
350
+ providedIn: 'root',
351
+ }]
352
+ }] });
345
353
 
346
354
  const DaffPersistenceServiceToken = new InjectionToken('DaffPersistenceService', {
347
355
  providedIn: 'root',
@@ -350,6 +358,16 @@ const DaffPersistenceServiceToken = new InjectionToken('DaffPersistenceService',
350
358
  : new DaffServerErrorStorageService(),
351
359
  });
352
360
 
361
+ /**
362
+ * Provides noop for the persistence service on the server.
363
+ */
364
+ const DaffServerSafePersistenceServiceToken = new InjectionToken('DaffServerSafePersistenceService', {
365
+ providedIn: 'root',
366
+ factory: () => isPlatformBrowser(inject(PLATFORM_ID))
367
+ ? inject(DaffPersistenceServiceToken)
368
+ : inject(DaffNoopStorageService),
369
+ });
370
+
353
371
  /**
354
372
  * Retries failed Observables
355
373
  *
@@ -383,16 +401,17 @@ class DaffServerBase64Service {
383
401
  return Buffer.from(str, 'base64').toString('ascii');
384
402
  }
385
403
  }
386
- /** @nocollapse */ DaffServerBase64Service.ɵprov = ɵɵdefineInjectable({ factory: function DaffServerBase64Service_Factory() { return new DaffServerBase64Service(ɵɵinject(PLATFORM_ID)); }, token: DaffServerBase64Service, providedIn: "root" });
387
- DaffServerBase64Service.decorators = [
388
- { type: Injectable, args: [{
389
- providedIn: 'root',
390
- },] }
391
- ];
392
- /** @nocollapse */
393
- DaffServerBase64Service.ctorParameters = () => [
394
- { type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
395
- ];
404
+ /** @nocollapse */ /** @nocollapse */ DaffServerBase64Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerBase64Service, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
405
+ /** @nocollapse */ /** @nocollapse */ DaffServerBase64Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerBase64Service, providedIn: 'root' });
406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerBase64Service, decorators: [{
407
+ type: Injectable,
408
+ args: [{
409
+ providedIn: 'root',
410
+ }]
411
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
412
+ type: Inject,
413
+ args: [PLATFORM_ID]
414
+ }] }]; } });
396
415
 
397
416
  /**
398
417
  * @inheritdoc
@@ -410,16 +429,17 @@ class DaffBrowserBase64Service {
410
429
  return atob(str);
411
430
  }
412
431
  }
413
- /** @nocollapse */ DaffBrowserBase64Service.ɵprov = ɵɵdefineInjectable({ factory: function DaffBrowserBase64Service_Factory() { return new DaffBrowserBase64Service(ɵɵinject(PLATFORM_ID)); }, token: DaffBrowserBase64Service, providedIn: "root" });
414
- DaffBrowserBase64Service.decorators = [
415
- { type: Injectable, args: [{
416
- providedIn: 'root',
417
- },] }
418
- ];
419
- /** @nocollapse */
420
- DaffBrowserBase64Service.ctorParameters = () => [
421
- { type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
422
- ];
432
+ /** @nocollapse */ /** @nocollapse */ DaffBrowserBase64Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBrowserBase64Service, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
433
+ /** @nocollapse */ /** @nocollapse */ DaffBrowserBase64Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBrowserBase64Service, providedIn: 'root' });
434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBrowserBase64Service, decorators: [{
435
+ type: Injectable,
436
+ args: [{
437
+ providedIn: 'root',
438
+ }]
439
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
440
+ type: Inject,
441
+ args: [PLATFORM_ID]
442
+ }] }]; } });
423
443
 
424
444
  /**
425
445
  * A token which creates a base64 service appropriate for the current environment, i.e., browser vs. server.
@@ -435,5 +455,5 @@ const DaffBase64ServiceToken = new InjectionToken('DaffBase64Service', {
435
455
  * Generated bundle index. Do not edit.
436
456
  */
437
457
 
438
- export { DaffBase64ServiceToken, DaffBrowserBase64Service, DaffErrorStorageService, DaffInheritableError, DaffLocalStorageService, DaffNoopStorageService, DaffPersistenceServiceToken, DaffServerBase64Service, DaffServerErrorStorageService, DaffServerSideStorageError, DaffStorageServiceError, backoff, daffAdd, daffArrayToDict, daffDivide, daffIsError, daffMultiply, daffSubtract, randomSlice, randomSubset, range, sample, shuffle, unique };
439
- //# sourceMappingURL=daffodil-core.js.map
458
+ export { DaffBase64ServiceToken, DaffBrowserBase64Service, DaffErrorStorageService, DaffInheritableError, DaffLocalStorageService, DaffNoopStorageService, DaffPersistenceServiceToken, DaffServerBase64Service, DaffServerErrorStorageService, DaffServerSafePersistenceServiceToken, DaffServerSideStorageError, DaffStorageServiceError, backoff, daffAdd, daffArrayToDict, daffDivide, daffIsError, daffMultiply, daffSubtract, randomSlice, randomSubset, range, sample, shuffle, unique };
459
+ //# sourceMappingURL=daffodil-core.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daffodil-core.mjs","sources":["../../../libs/core/src/utils/long-arithmetic.ts","../../../libs/core/src/utils/range.ts","../../../libs/core/src/utils/shuffle.ts","../../../libs/core/src/utils/random-subset.ts","../../../libs/core/src/utils/random-slice.ts","../../../libs/core/src/utils/array-to-dict.ts","../../../libs/core/src/utils/sample.ts","../../../libs/core/src/utils/unique.ts","../../../libs/core/src/errors/inheritable-error.ts","../../../libs/core/src/errors/is-error.ts","../../../libs/core/src/storage/error/error.ts","../../../libs/core/src/storage/error/error.service.ts","../../../libs/core/src/storage/server-error/server-error.ts","../../../libs/core/src/storage/server-error/server-error.service.ts","../../../libs/core/src/storage/localstorage/localstorage.service.ts","../../../libs/core/src/storage/noopstorage/noopstorage.service.ts","../../../libs/core/src/storage/persistence.interface.ts","../../../libs/core/src/storage/persistence-server-safe.token.ts","../../../libs/core/src/operators/backoff.pipe.ts","../../../libs/core/src/base64/server/server.service.ts","../../../libs/core/src/base64/browser/browser.service.ts","../../../libs/core/src/base64/base64.interface.ts","../../../libs/core/src/daffodil-core.ts"],"sourcesContent":["/**\n * A helper function to get the number of decimal significant figures of a number.\n * This function will fail if the given number has more than 16 significant figures or\n * the value of the number is greater than 10^11\n *\n * @param number\n */\nfunction daffPrecision(number: number): number {\n let p = 10000;\n if(number === undefined || number === null) {\n return p;\n }\n while (Math.round(number * p) / p !== number) {\n p *= 10;\n }\n return p;\n}\n\n/**\n * A function to add long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are less than\n * 16 significant figures and less than 10^11\n *\n * @param numbers\n */\nexport function daffAdd(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffAdd.');\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.reduce((acc, number) => acc + Math.round(number*precision), 0) / precision;\n}\n\n/**\n * A function to subtract long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are each less than\n * 16 significant figures and less than 10^11\n *\n * @param numbers\n */\nexport function daffSubtract(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffSubtract.');\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.slice(1).reduce(\n (acc, number) => acc - Math.round(number*precision),\n Math.round(numbers[0]*precision),\n ) / precision;\n}\n\n/**\n * A function to multiply long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are each less than 16 significant figures\n * and less than 10^11\n *\n * @param numbers\n */\nexport function daffMultiply(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffMultiply.');\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.reduce(\n (acc, number) => acc * Math.round(number*precision),\n 1,\n ) / Math.pow(precision, numbers.length);\n}\n\n/**\n * A function to divide long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are each less than 16 significant figures\n * and less than 10^11\n *\n * Returns NaN when attempting to use NaN as an input.\n * Returns NaN when attempting to divide by 0 or null.\n *\n * @param numbers\n */\nexport function daffDivide(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffDivide.');\n }\n // TODO(griest024): use better condition after IE support is dropped\n const illegalOperation = numbers.filter(isNaN).length > 0\n || numbers.slice(1).filter(n => n === 0 || n === null).length > 0;\n if (illegalOperation) {\n return NaN;\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.slice(1).reduce(\n (acc, number) => acc / Math.round(number*precision),\n Math.round(numbers[0]*precision),\n ) * Math.pow(precision, numbers.length - 2);\n}\n","/**\n * Range\n *\n * Range accepts two inputs, a `start` and an `end`\n * and returns an array filled with numbers from\n * `start` to `end`.\n *\n * @param start\n * @param end\n * @returns number\n */\nexport const range = (start: number, end: number): Array<number> =>\n Array.apply(null, Array(end - start + 1)).map((val, index) => index + start);\n\n","/**\n * Immutable Fisher-Yates Shuffle\n * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle\n */\nexport const shuffle = <T>(array: T[]): T[] => {\n const result = [];\n array.forEach((el, i) => {\n const s = Math.floor(Math.random() * i);\n if( s !== i ){\n result[i] = result[s];\n }\n result[s] = el;\n });\n return result;\n};\n","import { shuffle } from './shuffle';\n\n/**\n * Returns a random subset of an array in a random order.\n *\n * @param array\n * @param length\n */\nexport const randomSubset = <T>(array: T[], length?: number): T[] => {\n if(length > array.length){\n throw new Error('Requested length is longer than array length.');\n }\n length = length ? length : Math.floor(Math.random() * array.length);\n return shuffle(array).slice(0, length);\n};\n","/**\n * Returns a random slice of an array.\n * An optional length may be specified.\n *\n * @param array\n */\nexport const randomSlice = <T>(array: T[], length?: number): T[] => {\n if(array.length === 0) {\n return [];\n };\n if(length > array.length) {\n throw new Error('Requested length is longer than array length.');\n }\n const arrayLength = length || Math.floor(Math.random() * array.length);\n const start = Math.floor(Math.random() * (array.length - arrayLength + 1));\n const end = start + arrayLength;\n return array.slice(start, end);\n};\n","import { Dict } from '../types/public_api';\n\n/**\n * Converts an array into a dictionary.\n * Dictionary values are keyed by the return of the specified getKey, or `'key'` by default.\n */\nexport const daffArrayToDict = <T>(array: T[], getKey = (val: T) => (<any>val).key): Dict<T> =>\n array.reduce(\n (dict, val) => {\n dict[getKey(val)] = val;\n return dict;\n },\n {},\n );\n","import { randomSlice } from './random-slice';\n\n/**\n * Returns a random element of an array.\n */\nexport const sample = <T>(array: T[]): T => randomSlice(array, 1)[0];\n","/**\n * Filters an array of elements, removing duplicates.\n * Does not guarantee order of filtered elements.\n *\n * An optional comparator function may be passed for arbitrary comparison behavior.\n * The default is a strict equality comparison: `a === b`.\n */\nexport const unique = <T>(array: T[], comparator: (a: T, b: T) => boolean = (a, b) => a === b): T[] =>\n array.filter((a, index) => array.slice(index + 1).filter(b => comparator(a, b)).length === 0);\n","/**\n * A class which allows you to appropriately check the inheritance of an error.\n *\n * In typescript, when you try to extend an error with a specialized error class,\n * if you try to call something like:\n *\n * ```ts\n * class MyError extends Error {}\n *\n * let myError = new MyError();\n *\n * myError instanceof MyError; // returns false\n * ```\n *\n * You will see unexpected things. This class fixes that issue as described here\n * https://github.com/microsoft/TypeScript/issues/13965\n */\nexport class DaffInheritableError extends Error {\n __proto__: Error;\n\n recoverable = false;\n\n constructor(message?: string) {\n\t super(message);\n\t const trueProto = new.target.prototype;\n\n\t Object.setPrototypeOf(this, trueProto);\n }\n}\n","import { DaffError } from './error.interface';\nimport { DaffInheritableError } from './inheritable-error';\n\n/**\n * Checks if the passed object is a {@link DaffError}\n */\nexport const daffIsError = (error: any): boolean =>\n error instanceof DaffInheritableError || !!(<DaffError>error).code;\n","import {\n DaffError,\n DaffInheritableError,\n} from '../../errors/public_api';\n\nexport class DaffStorageServiceError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_STORAGE_FAILURE';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\nimport { DaffStorageServiceError } from './error';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffErrorStorageService implements DaffPersistenceService {\n static readonly ERROR_MESSAGE = 'The DaffErrorStorageService always throws an error.';\n\n setItem(key: string, value: any): void {\n this.throwError();\n }\n\n getItem(key: string): any {\n this.throwError();\n }\n\n removeItem(key: string): any {\n this.throwError();\n }\n\n clear(){\n this.throwError();\n }\n\n private throwError() {\n throw new DaffStorageServiceError(DaffErrorStorageService.ERROR_MESSAGE);\n }\n}\n","import { DaffError } from '../../errors/public_api';\nimport { DaffStorageServiceError } from '../error/error';\n\n/**\n * An error thrown when there is an attempt to access storage on the server and none is available.\n */\nexport class DaffServerSideStorageError extends DaffStorageServiceError implements DaffError {\n public readonly code: string = 'DAFF_SERVER_STORAGE_FAILURE';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\nimport { DaffServerSideStorageError } from './server-error';\n\n/**\n * A storage service meant to be loaded into SSR contexts.\n * It will always throw the {@link DaffServerSideStorageError}.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffServerErrorStorageService implements DaffPersistenceService {\n static readonly ERROR_MESSAGE = 'The DaffServerErrorStorageService always throws an error.';\n\n setItem(key: string, value: any): void {\n this.throwError();\n }\n\n getItem(key: string): any {\n this.throwError();\n }\n\n removeItem(key: string): any {\n this.throwError();\n }\n\n clear(){\n this.throwError();\n }\n\n private throwError() {\n throw new DaffServerSideStorageError(DaffServerErrorStorageService.ERROR_MESSAGE);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Injectable,\n Inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffLocalStorageService implements DaffPersistenceService {\n constructor(@Inject(PLATFORM_ID) platformId: string){\n if(!isPlatformBrowser(platformId)){\n throw new Error('The DaffLocalStorageService can only be instantiated in the browser.');\n }\n }\n\n /**\n * Persist the given item into local storage.\n */\n setItem(key: string, value: any): void {\n localStorage.setItem(key, value);\n }\n\n /**\n * Retrieve the given item from localstorage.\n */\n getItem(key: string): any {\n return localStorage.getItem(key);\n }\n\n /**\n * Remove a given item from localstorage\n */\n removeItem(key: string): any {\n localStorage.removeItem(key);\n }\n\n clear(){\n localStorage.clear();\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffNoopStorageService implements DaffPersistenceService {\n setItem(key: string, value: any): void {};\n getItem(key: string): any {};\n clear(): void {};\n removeItem(key: string): void {};\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n InjectionToken,\n inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffLocalStorageService } from './localstorage/localstorage.service';\nimport { DaffServerErrorStorageService } from './server-error/public_api';\n\nexport interface DaffPersistenceService {\n setItem(key: string, value: any): void;\n getItem(key: string): any;\n clear(): void;\n removeItem(key: string): void;\n}\n\nexport const DaffPersistenceServiceToken = new InjectionToken<DaffPersistenceService>('DaffPersistenceService', {\n providedIn: 'root',\n factory: () => isPlatformBrowser(inject<string>(PLATFORM_ID))\n ? new DaffLocalStorageService(inject<string>(PLATFORM_ID))\n : new DaffServerErrorStorageService(),\n});\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n InjectionToken,\n inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffNoopStorageService } from './noopstorage/noopstorage.service';\nimport {\n DaffPersistenceService,\n DaffPersistenceServiceToken,\n} from './persistence.interface';\n\n/**\n * Provides noop for the persistence service on the server.\n */\nexport const DaffServerSafePersistenceServiceToken = new InjectionToken<\nDaffPersistenceService\n>('DaffServerSafePersistenceService', {\n providedIn: 'root',\n factory: () =>\n isPlatformBrowser(inject<string>(PLATFORM_ID))\n ? inject<DaffPersistenceService>(DaffPersistenceServiceToken)\n : inject<DaffPersistenceService>(DaffNoopStorageService),\n});\n","import {\n pipe,\n timer,\n throwError,\n} from 'rxjs';\nimport {\n retryWhen,\n mergeMap,\n} from 'rxjs/operators';\n\n/**\n * Retries failed Observables\n *\n * @param maxTries The maximum number of tries the observable will be tried\n * @param ms The initial amount of time\n */\nexport function backoff(maxTries: number, ms: number) {\n return pipe(\n retryWhen(attempt => attempt.pipe(\n mergeMap((shadowedAttempt: Error, i) => {\n if(i >= maxTries) {\n return throwError(shadowedAttempt);\n }\n return timer(ms*Math.pow(2,i));\n }),\n )),\n );\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Inject,\n Injectable,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffBase64Service } from '../base64.interface';\n\ndeclare const Buffer;\n\n/**\n * A base64 service meant to be loaded into SSR contexts.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffServerBase64Service implements DaffBase64Service {\n constructor(@Inject(PLATFORM_ID) platformId: string){\n if (isPlatformBrowser(platformId)){\n throw new Error('The DaffBrowserBase64Service can only be instantiated on the server.');\n }\n }\n\n encode(str: string): string {\n return Buffer.from(str).toString('base64');\n }\n\n decode(str: string): string {\n return Buffer.from(str, 'base64').toString('ascii');\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Injectable,\n Inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffBase64Service } from '../base64.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffBrowserBase64Service implements DaffBase64Service {\n constructor(@Inject(PLATFORM_ID) platformId: string){\n if(!isPlatformBrowser(platformId)){\n throw new Error('The DaffBrowserBase64Service can only be instantiated in the browser.');\n }\n }\n\n encode(str: string): string {\n return btoa(str);\n }\n\n decode(str: string): string {\n return atob(str);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n InjectionToken,\n inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffBrowserBase64Service } from './browser/browser.service';\nimport { DaffServerBase64Service } from './server/public_api';\n\n/**\n * A service for encoding and decoding base64 strings.\n */\nexport interface DaffBase64Service {\n /**\n * Encodes an ASCII string to base64.\n */\n encode(str: string): string;\n /**\n * Decodes a base64 string to ASCII.\n */\n decode(str: string): string;\n}\n\n/**\n * A token which creates a base64 service appropriate for the current environment, i.e., browser vs. server.\n */\nexport const DaffBase64ServiceToken = new InjectionToken<DaffBase64Service>('DaffBase64Service', {\n providedIn: 'root',\n factory: () => isPlatformBrowser(inject<string>(PLATFORM_ID))\n ? new DaffBrowserBase64Service(inject<string>(PLATFORM_ID))\n : new DaffServerBase64Service(inject<string>(PLATFORM_ID)),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;AACH,SAAS,aAAa,CAAC,MAAc,EAAA;IACnC,IAAI,CAAC,GAAG,KAAK,CAAC;AACd,IAAA,IAAG,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,EAAE;AAC1C,QAAA,OAAO,CAAC,CAAC;AACV,KAAA;AACD,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,MAAM,EAAE;QAC5C,CAAC,IAAI,EAAE,CAAC;AACT,KAAA;AACD,IAAA,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;;;AAMG;AACa,SAAA,OAAO,CAAC,GAAG,OAAiB,EAAA;AAC1C,IAAA,IAAG,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AACrB,QAAA,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;AAC5D,KAAA;AACD,IAAA,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,O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iBAAA,CAAA;;0BAEc,MAAM;2BAAC,WAAW,CAAA;;;ACQjC;;AAEG;MACU,sBAAsB,GAAG,IAAI,cAAc,CAAoB,mBAAmB,EAAE;AAC/F,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM,iBAAiB,CAAC,MAAM,CAAS,WAAW,CAAC,CAAC;UACzD,IAAI,wBAAwB,CAAC,MAAM,CAAS,WAAW,CAAC,CAAC;UACzD,IAAI,uBAAuB,CAAC,MAAM,CAAS,WAAW,CAAC,CAAC;AAC7D,CAAA;;AChCD;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { MutationOptions, FetchResult } from '@apollo/client/core';
2
2
  import { Apollo } from 'apollo-angular';
3
- import { EmptyObject } from 'apollo-angular/types';
4
3
  import { Observable } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
5
  /**
6
6
  * A service that will queue mutate calls to Apollo.
7
7
  * It will not send subsequent mutate requests until the previous one has been completed.
@@ -21,7 +21,9 @@ export declare class DaffQueuedApollo {
21
21
  *
22
22
  * @param options Mutation options.
23
23
  */
24
- mutate<T, V = EmptyObject>(options: MutationOptions<T, V>): Observable<FetchResult<T>>;
24
+ mutate<T, V = Record<string, any>>(options: MutationOptions<T, V>): Observable<FetchResult<T>>;
25
25
  private addRequestToQueue;
26
26
  private finishRequestSubscription;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffQueuedApollo, never>;
28
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffQueuedApollo>;
27
29
  }
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@daffodil/core/graphql" />
4
5
  export * from './index';