@daffodil/core 0.90.0 → 0.92.3-rc.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.
@@ -51,10 +51,10 @@ class DaffServerBase64Service {
51
51
  decode(str) {
52
52
  return Buffer.from(str, 'base64').toString('ascii');
53
53
  }
54
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffServerBase64Service, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
55
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffServerBase64Service, providedIn: 'root' }); }
54
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffServerBase64Service, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
55
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffServerBase64Service, providedIn: 'root' }); }
56
56
  }
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffServerBase64Service, decorators: [{
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffServerBase64Service, decorators: [{
58
58
  type: Injectable,
59
59
  args: [{
60
60
  providedIn: 'root',
@@ -79,10 +79,10 @@ class DaffBrowserBase64Service {
79
79
  decode(str) {
80
80
  return atob(str);
81
81
  }
82
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffBrowserBase64Service, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
83
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffBrowserBase64Service, providedIn: 'root' }); }
82
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffBrowserBase64Service, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
83
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffBrowserBase64Service, providedIn: 'root' }); }
84
84
  }
85
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffBrowserBase64Service, decorators: [{
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffBrowserBase64Service, decorators: [{
86
86
  type: Injectable,
87
87
  args: [{
88
88
  providedIn: 'root',
@@ -103,9 +103,14 @@ const createSingleInjectionToken = (desc, options) => {
103
103
  provide: token,
104
104
  useValue: value,
105
105
  });
106
+ const factoryProvider = (factory) => ({
107
+ provide: token,
108
+ useFactory: factory,
109
+ });
106
110
  return {
107
111
  token,
108
112
  provider,
113
+ factoryProvider,
109
114
  };
110
115
  };
111
116
 
@@ -127,9 +132,15 @@ const createMultiInjectionToken = (desc, options) => {
127
132
  useValue: value,
128
133
  multi: true,
129
134
  }));
135
+ const factoryProvider = (...factories) => factories.map((factory) => ({
136
+ provide: token,
137
+ useFactory: factory,
138
+ multi: true,
139
+ }));
130
140
  return {
131
141
  token,
132
142
  provider,
143
+ factoryProvider,
133
144
  };
134
145
  };
135
146
 
@@ -1054,6 +1065,13 @@ const daffCollectionBuildRequestFromMetadata = (metadata) => ({
1054
1065
  filterRequests: daffFiltersToRequests(metadata.filters),
1055
1066
  });
1056
1067
 
1068
+ /**
1069
+ * Finds and returns the most recently created entity.
1070
+ */
1071
+ function daffCreateableMostRecent(createables) {
1072
+ return createables.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime())[0];
1073
+ }
1074
+
1057
1075
  /**
1058
1076
  * A utility decorator that delays method execution until after a specified delay period has elapsed since the last invocation.
1059
1077
  *
@@ -1267,10 +1285,10 @@ class DaffErrorStorageService {
1267
1285
  throwError() {
1268
1286
  throw new DaffStorageServiceError(DaffErrorStorageService.ERROR_MESSAGE);
1269
1287
  }
1270
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffErrorStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1271
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffErrorStorageService, providedIn: 'root' }); }
1288
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffErrorStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1289
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffErrorStorageService, providedIn: 'root' }); }
1272
1290
  }
1273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffErrorStorageService, decorators: [{
1291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffErrorStorageService, decorators: [{
1274
1292
  type: Injectable,
1275
1293
  args: [{
1276
1294
  providedIn: 'root',
@@ -1312,10 +1330,10 @@ class DaffServerErrorStorageService {
1312
1330
  throwError() {
1313
1331
  throw new DaffServerSideStorageError(DaffServerErrorStorageService.ERROR_MESSAGE);
1314
1332
  }
1315
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffServerErrorStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1316
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffServerErrorStorageService, providedIn: 'root' }); }
1333
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffServerErrorStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1334
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffServerErrorStorageService, providedIn: 'root' }); }
1317
1335
  }
1318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffServerErrorStorageService, decorators: [{
1336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffServerErrorStorageService, decorators: [{
1319
1337
  type: Injectable,
1320
1338
  args: [{
1321
1339
  providedIn: 'root',
@@ -1352,10 +1370,10 @@ class DaffLocalStorageService {
1352
1370
  clear() {
1353
1371
  localStorage.clear();
1354
1372
  }
1355
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffLocalStorageService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
1356
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffLocalStorageService, providedIn: 'root' }); }
1373
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffLocalStorageService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
1374
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffLocalStorageService, providedIn: 'root' }); }
1357
1375
  }
1358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffLocalStorageService, decorators: [{
1376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffLocalStorageService, decorators: [{
1359
1377
  type: Injectable,
1360
1378
  args: [{
1361
1379
  providedIn: 'root',
@@ -1377,10 +1395,10 @@ class DaffNoopStorageService {
1377
1395
  ;
1378
1396
  removeItem(key) { }
1379
1397
  ;
1380
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffNoopStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1381
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffNoopStorageService, providedIn: 'root' }); }
1398
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNoopStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1399
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNoopStorageService, providedIn: 'root' }); }
1382
1400
  }
1383
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffNoopStorageService, decorators: [{
1401
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNoopStorageService, decorators: [{
1384
1402
  type: Injectable,
1385
1403
  args: [{
1386
1404
  providedIn: 'root',
@@ -1450,5 +1468,5 @@ const validateFieldPresence = (model, ...fields) => fields.reduce((acc, field) =
1450
1468
  * Generated bundle index. Do not edit.
1451
1469
  */
1452
1470
 
1453
- export { DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS_ERROR_CODE, DAFF_SERVER_STORAGE_SERVICE_ERROR_CODE, DAFF_STORAGE_SERVICE_ERROR_CODE, DaffBase64ServiceToken, DaffBrowserBase64Service, DaffCollectionPageOutOfBoundsError, DaffErrorStorageService, DaffFilterFromToFilterSeparator, DaffFilterNotFound, DaffFilterRequestNameMismatch, DaffFilterRequestTypeMismatch, DaffFilterType, DaffFilterUnknownType, DaffInheritableError, DaffLocalStorageService, DaffMemoryStorageService, DaffNoopStorageService, DaffPersistenceServiceToken, DaffServerBase64Service, DaffServerErrorStorageService, DaffServerSafePersistenceServiceToken, DaffServerSideStorageError, DaffSortDirectionEnum, DaffStorageServiceError, allOf, anyOf, backoff, catchAndArrayifyErrors, collect, createConfigInjectionToken, createMultiInjectionToken, createServicesInjectionToken, createSingleInjectionToken, createSingletonInjectionToken, daffAdd, daffApplyFilter, daffApplyRequestToFilters, daffApplyRequestsToFilters, daffArrayConcatMerger, daffArrayToDict, daffClearFilter, daffClearFilters, daffCollectionBuildMetadataFromRequest, daffCollectionBuildRequestFromMetadata, daffCollectionErrorMap, daffComputeAppliedFilters, daffDictAssignMerger, daffDivide, daffFilterArrayToDict, daffFilterComputeRangePairLabel, daffFilterEqualOptionArrayToDict, daffFilterFindAppliedOptions, daffFilterRangePairArrayToDict, daffFilterToRequest, daffFilterValidateRequestNameMatch, daffFilterValidateRequestTypeMatch, daffFiltersToRequests, daffIdentifiableArrayToDict, daffIsError, daffIsFilterApplied, daffIsToggleRequestAppliedToFilter, daffMerge, daffMultiply, daffPrecision, daffRemoveFilter, daffRemoveRequestFromFilters, daffRemoveRequestsFromFilters, daffSubtract, daffToggleFilter, daffToggleRequestOnFilters, debounce, identity, observe, provideVercelImageLoader, randomSlice, randomSubset, range, sample, shallowCompare, shuffle, unique, validateFieldPresence };
1471
+ export { DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS_ERROR_CODE, DAFF_SERVER_STORAGE_SERVICE_ERROR_CODE, DAFF_STORAGE_SERVICE_ERROR_CODE, DaffBase64ServiceToken, DaffBrowserBase64Service, DaffCollectionPageOutOfBoundsError, DaffErrorStorageService, DaffFilterFromToFilterSeparator, DaffFilterNotFound, DaffFilterRequestNameMismatch, DaffFilterRequestTypeMismatch, DaffFilterType, DaffFilterUnknownType, DaffInheritableError, DaffLocalStorageService, DaffMemoryStorageService, DaffNoopStorageService, DaffPersistenceServiceToken, DaffServerBase64Service, DaffServerErrorStorageService, DaffServerSafePersistenceServiceToken, DaffServerSideStorageError, DaffSortDirectionEnum, DaffStorageServiceError, allOf, anyOf, backoff, catchAndArrayifyErrors, collect, createConfigInjectionToken, createMultiInjectionToken, createServicesInjectionToken, createSingleInjectionToken, createSingletonInjectionToken, daffAdd, daffApplyFilter, daffApplyRequestToFilters, daffApplyRequestsToFilters, daffArrayConcatMerger, daffArrayToDict, daffClearFilter, daffClearFilters, daffCollectionBuildMetadataFromRequest, daffCollectionBuildRequestFromMetadata, daffCollectionErrorMap, daffComputeAppliedFilters, daffCreateableMostRecent, daffDictAssignMerger, daffDivide, daffFilterArrayToDict, daffFilterComputeRangePairLabel, daffFilterEqualOptionArrayToDict, daffFilterFindAppliedOptions, daffFilterRangePairArrayToDict, daffFilterToRequest, daffFilterValidateRequestNameMatch, daffFilterValidateRequestTypeMatch, daffFiltersToRequests, daffIdentifiableArrayToDict, daffIsError, daffIsFilterApplied, daffIsToggleRequestAppliedToFilter, daffMerge, daffMultiply, daffPrecision, daffRemoveFilter, daffRemoveRequestFromFilters, daffRemoveRequestsFromFilters, daffSubtract, daffToggleFilter, daffToggleRequestOnFilters, debounce, identity, observe, provideVercelImageLoader, randomSlice, randomSubset, range, sample, shallowCompare, shuffle, unique, validateFieldPresence };
1454
1472
  //# sourceMappingURL=daffodil-core.mjs.map