@daffodil/external-router 0.84.0 → 0.86.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.
- package/fesm2022/daffodil-external-router-driver-in-memory.mjs +4 -4
- package/fesm2022/daffodil-external-router-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-driver-magento-2.4.1.mjs +7 -7
- package/fesm2022/daffodil-external-router-driver-magento-2.4.1.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-driver-magento-2.4.2.mjs +7 -7
- package/fesm2022/daffodil-external-router-driver-magento-2.4.2.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-driver-magento-2.4.3.mjs +8 -8
- package/fesm2022/daffodil-external-router-driver-magento-2.4.3.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-driver-testing.mjs +9 -9
- package/fesm2022/daffodil-external-router-driver-testing.mjs.map +1 -1
- package/package.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import {
|
2
|
+
import { Inject, Injectable, makeEnvironmentProviders } from '@angular/core';
|
3
3
|
import { of } from 'rxjs';
|
4
4
|
import { daffUriTruncateQueryFragment, daffUriTruncateLeadingSlash } from '@daffodil/core/routing';
|
5
5
|
import { DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION, provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';
|
@@ -40,10 +40,10 @@ class DaffExternalRouterInMemoryDriver {
|
|
40
40
|
url: daffUriTruncateLeadingSlash(resolvedUrl.url),
|
41
41
|
} : DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);
|
42
42
|
}
|
43
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
44
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
43
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterInMemoryDriver, deps: [{ token: DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
44
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterInMemoryDriver, providedIn: 'root' }); }
|
45
45
|
}
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterInMemoryDriver, decorators: [{
|
47
47
|
type: Injectable,
|
48
48
|
args: [{
|
49
49
|
providedIn: 'root',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-external-router-driver-in-memory.mjs","sources":["../../../libs/external-router/driver/in-memory/src/config.ts","../../../libs/external-router/driver/in-memory/src/in-memory.service.ts","../../../libs/external-router/driver/in-memory/src/provider.ts","../../../libs/external-router/driver/in-memory/src/public_api.ts","../../../libs/external-router/driver/in-memory/src/daffodil-external-router-driver-in-memory.ts"],"sourcesContent":["import { createConfigInjectionToken } from '@daffodil/core';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION } from '@daffodil/external-router/driver';\n\n/**\n * A lookup for a URL.\n * Returns an {@link DaffExternallyResolvableUrl} or\n * {@link DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION} if the URL cannot be resolved\n */\nexport type DaffExternalRouterDriverInMemoryResolver = (url: string) => DaffExternallyResolvableUrl;\n\n/**\n * The configuration for the in-memory driver.\n */\nexport interface DaffExternalRouterDriverInMemoryConfig {\n resolver: DaffExternalRouterDriverInMemoryResolver;\n}\n\nconst defaultConfig: DaffExternalRouterDriverInMemoryConfig = {\n resolver: () => DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION,\n};\n\nexport const {\n /**\n * The token used by Daffodil to hold the driver's configuration.\n *\n * @docs-private\n */\n token: DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG,\n /**\n * Provider function for {@link DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG}.\n */\n provider: provideDaffExternalRouterDriverInMemoryConfig,\n} = createConfigInjectionToken<DaffExternalRouterDriverInMemoryConfig>(defaultConfig, 'DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG');\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n daffUriTruncateLeadingSlash,\n daffUriTruncateQueryFragment,\n} from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport {\n DaffExternalRouterDriverInterface,\n DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION,\n} from '@daffodil/external-router/driver';\n\nimport {\n DaffExternalRouterDriverInMemoryConfig,\n DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG,\n} from './config';\n\n/**\n * The DaffExternalRouterInMemoryDriver is responsible for resolving\n * a URL using the resolver in the provided configuration.\n *\n * @inheritdoc\n *\n * @see {@link DaffExternalRouterInMemoryDriver}\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalRouterInMemoryDriver\nimplements DaffExternalRouterDriverInterface {\n constructor(\n @Inject(DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG)\n private configuration: DaffExternalRouterDriverInMemoryConfig,\n ) {}\n\n resolve(url: string): Observable<DaffExternallyResolvableUrl> {\n const truncatedUrl = daffUriTruncateQueryFragment(url);\n const resolvedUrl = this.configuration.resolver(truncatedUrl);\n\n return of(resolvedUrl?.url ? {\n ...resolvedUrl,\n url: daffUriTruncateLeadingSlash(resolvedUrl.url),\n } : DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);\n }\n}\n","import {\n EnvironmentProviders,\n InjectionToken,\n makeEnvironmentProviders,\n} from '@angular/core';\n\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport {\n DaffExternalRouterDriverInMemoryConfig,\n provideDaffExternalRouterDriverInMemoryConfig,\n} from './config';\nimport { DaffExternalRouterInMemoryDriver } from './in-memory.service';\n\n/**\n * Provides an in-memory implementation of {@link DaffExternalRouterDriver}\n */\nexport const provideDaffExternalRouterInMemoryDriver = (config:\n DaffExternalRouterDriverInMemoryConfig | InjectionToken<DaffExternalRouterDriverInMemoryConfig> = undefined,\n): EnvironmentProviders => makeEnvironmentProviders([\n provideDaffExternalRouterDriver(DaffExternalRouterInMemoryDriver),\n config ? provideDaffExternalRouterDriverInMemoryConfig(config) : [],\n]);\n","/*\n * Public API Surface of @daffodil/external-router/driver/in-memory\n */\n\nexport { DaffExternalRouterInMemoryDriver } from './in-memory.service';\n\nexport {\n DaffExternalRouterDriverInMemoryConfig,\n DaffExternalRouterDriverInMemoryResolver,\n} from './config';\n\nexport { provideDaffExternalRouterInMemoryDriver } from './provider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAkBA,MAAM,aAAa,GAA2C;AAC5D,IAAA,QAAQ,EAAE,MAAM,yCAAyC;CAC1D;AAEM,MAAM;AACX;;;;AAIG;AACH,KAAK,EAAE,4CAA4C;AACnD;;AAEG;AACH,QAAQ,EAAE,6CAA6C,GACxD,GAAG,0BAA0B,CAAyC,aAAa,EAAE,8CAA8C,CAAC;;ACTrI;;;;;;;AAOG;MAIU,gCAAgC,CAAA;AAE3C,IAAA,WAAA,CAEU,aAAqD,EAAA;QAArD,IAAa,CAAA,aAAA,GAAb,aAAa;;AAGvB,IAAA,OAAO,CAAC,GAAW,EAAA;AACjB,QAAA,MAAM,YAAY,GAAG,4BAA4B,CAAC,GAAG,CAAC;QACtD,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC;AAE7D,QAAA,OAAO,EAAE,CAAC,WAAW,EAAE,GAAG,GAAG;AAC3B,YAAA,GAAG,WAAW;AACd,YAAA,GAAG,EAAE,2BAA2B,CAAC,WAAW,CAAC,GAAG,CAAC;AAClD,SAAA,GAAG,yCAAyC,CAAC;;AAdrC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,
|
1
|
+
{"version":3,"file":"daffodil-external-router-driver-in-memory.mjs","sources":["../../../libs/external-router/driver/in-memory/src/config.ts","../../../libs/external-router/driver/in-memory/src/in-memory.service.ts","../../../libs/external-router/driver/in-memory/src/provider.ts","../../../libs/external-router/driver/in-memory/src/public_api.ts","../../../libs/external-router/driver/in-memory/src/daffodil-external-router-driver-in-memory.ts"],"sourcesContent":["import { createConfigInjectionToken } from '@daffodil/core';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION } from '@daffodil/external-router/driver';\n\n/**\n * A lookup for a URL.\n * Returns an {@link DaffExternallyResolvableUrl} or\n * {@link DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION} if the URL cannot be resolved\n */\nexport type DaffExternalRouterDriverInMemoryResolver = (url: string) => DaffExternallyResolvableUrl;\n\n/**\n * The configuration for the in-memory driver.\n */\nexport interface DaffExternalRouterDriverInMemoryConfig {\n resolver: DaffExternalRouterDriverInMemoryResolver;\n}\n\nconst defaultConfig: DaffExternalRouterDriverInMemoryConfig = {\n resolver: () => DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION,\n};\n\nexport const {\n /**\n * The token used by Daffodil to hold the driver's configuration.\n *\n * @docs-private\n */\n token: DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG,\n /**\n * Provider function for {@link DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG}.\n */\n provider: provideDaffExternalRouterDriverInMemoryConfig,\n} = createConfigInjectionToken<DaffExternalRouterDriverInMemoryConfig>(defaultConfig, 'DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG');\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n daffUriTruncateLeadingSlash,\n daffUriTruncateQueryFragment,\n} from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport {\n DaffExternalRouterDriverInterface,\n DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION,\n} from '@daffodil/external-router/driver';\n\nimport {\n DaffExternalRouterDriverInMemoryConfig,\n DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG,\n} from './config';\n\n/**\n * The DaffExternalRouterInMemoryDriver is responsible for resolving\n * a URL using the resolver in the provided configuration.\n *\n * @inheritdoc\n *\n * @see {@link DaffExternalRouterInMemoryDriver}\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalRouterInMemoryDriver\nimplements DaffExternalRouterDriverInterface {\n constructor(\n @Inject(DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG)\n private configuration: DaffExternalRouterDriverInMemoryConfig,\n ) {}\n\n resolve(url: string): Observable<DaffExternallyResolvableUrl> {\n const truncatedUrl = daffUriTruncateQueryFragment(url);\n const resolvedUrl = this.configuration.resolver(truncatedUrl);\n\n return of(resolvedUrl?.url ? {\n ...resolvedUrl,\n url: daffUriTruncateLeadingSlash(resolvedUrl.url),\n } : DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);\n }\n}\n","import {\n EnvironmentProviders,\n InjectionToken,\n makeEnvironmentProviders,\n} from '@angular/core';\n\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport {\n DaffExternalRouterDriverInMemoryConfig,\n provideDaffExternalRouterDriverInMemoryConfig,\n} from './config';\nimport { DaffExternalRouterInMemoryDriver } from './in-memory.service';\n\n/**\n * Provides an in-memory implementation of {@link DaffExternalRouterDriver}\n */\nexport const provideDaffExternalRouterInMemoryDriver = (config:\n DaffExternalRouterDriverInMemoryConfig | InjectionToken<DaffExternalRouterDriverInMemoryConfig> = undefined,\n): EnvironmentProviders => makeEnvironmentProviders([\n provideDaffExternalRouterDriver(DaffExternalRouterInMemoryDriver),\n config ? provideDaffExternalRouterDriverInMemoryConfig(config) : [],\n]);\n","/*\n * Public API Surface of @daffodil/external-router/driver/in-memory\n */\n\nexport { DaffExternalRouterInMemoryDriver } from './in-memory.service';\n\nexport {\n DaffExternalRouterDriverInMemoryConfig,\n DaffExternalRouterDriverInMemoryResolver,\n} from './config';\n\nexport { provideDaffExternalRouterInMemoryDriver } from './provider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAkBA,MAAM,aAAa,GAA2C;AAC5D,IAAA,QAAQ,EAAE,MAAM,yCAAyC;CAC1D;AAEM,MAAM;AACX;;;;AAIG;AACH,KAAK,EAAE,4CAA4C;AACnD;;AAEG;AACH,QAAQ,EAAE,6CAA6C,GACxD,GAAG,0BAA0B,CAAyC,aAAa,EAAE,8CAA8C,CAAC;;ACTrI;;;;;;;AAOG;MAIU,gCAAgC,CAAA;AAE3C,IAAA,WAAA,CAEU,aAAqD,EAAA;QAArD,IAAa,CAAA,aAAA,GAAb,aAAa;;AAGvB,IAAA,OAAO,CAAC,GAAW,EAAA;AACjB,QAAA,MAAM,YAAY,GAAG,4BAA4B,CAAC,GAAG,CAAC;QACtD,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC;AAE7D,QAAA,OAAO,EAAE,CAAC,WAAW,EAAE,GAAG,GAAG;AAC3B,YAAA,GAAG,WAAW;AACd,YAAA,GAAG,EAAE,2BAA2B,CAAC,WAAW,CAAC,GAAG,CAAC;AAClD,SAAA,GAAG,yCAAyC,CAAC;;AAdrC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,kBAGjC,4CAA4C,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAH3C,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,cAF/B,MAAM,EAAA,CAAA,CAAA;;4FAEP,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAH5C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAII,MAAM;2BAAC,4CAA4C;;;ACxBxD;;AAEG;AACU,MAAA,uCAAuC,GAAG,CAAC,MAC+C,GAAA,SAAS,KACrF,wBAAwB,CAAC;IAClD,+BAA+B,CAAC,gCAAgC,CAAC;IACjE,MAAM,GAAG,6CAA6C,CAAC,MAAM,CAAC,GAAG,EAAE;AACpE,CAAA;;ACtBD;;AAEG;;ACFH;;AAEG;;;;"}
|
@@ -52,10 +52,10 @@ class DaffExternalRouterMagentoDriver {
|
|
52
52
|
})
|
53
53
|
.pipe(map(response => transformResolutionToResolvableUrlv241(response.data.urlResolver)));
|
54
54
|
}
|
55
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
56
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
55
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterMagentoDriver, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
56
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterMagentoDriver, providedIn: 'root' }); }
|
57
57
|
}
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterMagentoDriver, decorators: [{
|
59
59
|
type: Injectable,
|
60
60
|
args: [{
|
61
61
|
providedIn: 'root',
|
@@ -92,11 +92,11 @@ class DaffExternalRouterDriverMagentoModule {
|
|
92
92
|
],
|
93
93
|
};
|
94
94
|
}
|
95
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
96
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
97
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
95
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
96
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, imports: [CommonModule] }); }
|
97
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, imports: [CommonModule] }); }
|
98
98
|
}
|
99
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, decorators: [{
|
100
100
|
type: NgModule,
|
101
101
|
args: [{
|
102
102
|
declarations: [],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-external-router-driver-magento-2.4.1.mjs","sources":["../../../libs/external-router/driver/magento/2.4.1/src/graphql/queries/resolve-url-v2.4.1.ts","../../../libs/external-router/driver/magento/2.4.1/src/transforms/resolution-to-resolvable-url.ts","../../../libs/external-router/driver/magento/2.4.1/src/magento.service.ts","../../../libs/external-router/driver/magento/2.4.1/src/magento.module.ts","../../../libs/external-router/driver/magento/2.4.1/src/public_api.ts","../../../libs/external-router/driver/magento/2.4.1/src/daffodil-external-router-driver-magento-2.4.1.ts"],"sourcesContent":["import { gql } from 'apollo-angular';\n\nexport const DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME = 'MagentoResolveUrlv241';\n\n/**\n * This query retrieves a URL resolution from Magento and informs you about\n * what type of route the URL is.\n */\nexport const MagentoResolveUrlv241 = gql`\n\tquery ${DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME}($url: String!) {\n\t\turlResolver(url: $url) {\n\t\t\tid\n\t\t\trelative_url\n\t\t\tredirectCode\n\t\t\ttype\n\t\t}\n\t}\n`;\n","import {\n daffUriTruncateLeadingSlash,\n daffUriTruncateQueryFragment,\n} from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION } from '@daffodil/external-router/driver';\nimport {\n MagentoUrlResolver,\n magentoTransformRedirectToHttpCode,\n} from '@daffodil/external-router/driver/magento';\n\nexport const transformResolutionToResolvableUrlv241 = (\n resolution: MagentoUrlResolver,\n): DaffExternallyResolvableUrl => (resolution ? {\n id: resolution.id?.toString(),\n url: daffUriTruncateLeadingSlash(daffUriTruncateQueryFragment(resolution.relative_url)),\n type: resolution.type,\n code: magentoTransformRedirectToHttpCode(resolution.redirectCode),\n} : DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);\n\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { daffUriTruncateQueryFragment } from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DaffExternalRouterDriverInterface } from '@daffodil/external-router/driver';\nimport { MagentoUrlResolverResponse } from '@daffodil/external-router/driver/magento';\n\nimport { MagentoResolveUrlv241 } from './graphql/queries/resolve-url-v2.4.1';\nimport { transformResolutionToResolvableUrlv241 } from './transforms/resolution-to-resolvable-url';\n\n/**\n * The DaffExternalRouterMagentoDriver is responsible for translating an\n * arbitrary URI into a DaffExternallyResolvableUrl with Magento environments.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalRouterMagentoDriver\nimplements DaffExternalRouterDriverInterface {\n constructor(private apollo: Apollo) {}\n\n resolve(url: string): Observable<DaffExternallyResolvableUrl> {\n return this.apollo\n .query<MagentoUrlResolverResponse>({\n query: MagentoResolveUrlv241,\n variables: {\n url: daffUriTruncateQueryFragment(url),\n },\n })\n .pipe(map(response => transformResolutionToResolvableUrlv241(response.data.urlResolver)));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport { DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME } from './graphql/queries/resolve-url-v2.4.1';\nimport { DaffExternalRouterMagentoDriver } from './magento.service';\n/**\n * The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.\n *\n * @example\n * ```ts\n * @NgModule({\n * declarations: [],\n * imports: [\n * ...\n * DaffExternalRouterDriverMagentoModule.forRoot()\n * ],\n * })\n * export class AppModule{}\n * ```\n *\n * Note that this package depends upon ApolloClient, as the Magento driver uses GraphQl to make it's API calls.\n */\n@NgModule({\n declarations: [],\n imports: [CommonModule],\n})\nexport class DaffExternalRouterDriverMagentoModule {\n\n /**\n * Configures the package for the root injector.\n */\n static forRoot(): ModuleWithProviders<DaffExternalRouterDriverMagentoModule> {\n return {\n ngModule: DaffExternalRouterDriverMagentoModule,\n providers: [\n provideDaffExternalRouterDriver(DaffExternalRouterMagentoDriver),\n provideDaffMagentoCacheableOperation(DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME),\n ],\n };\n }\n}\n","/*\n * Public API Surface of @daffodil/external-router/driver/magento/2-4-1\n */\n\nexport { DaffExternalRouterMagentoDriver } from './magento.service';\nexport { DaffExternalRouterDriverMagentoModule } from './magento.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEO,MAAM,mCAAmC,GAAG,uBAAuB;AAE1E;;;AAGG;AACI,MAAM,qBAAqB,GAAG,GAAG,CAAA;SAC/B,mCAAmC,CAAA;;;;;;;;CAQ3C;;ACNM,MAAM,sCAAsC,GAAG,CACpD,UAA8B,MACG,UAAU,GAAG;AAC9C,IAAA,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE,QAAQ,EAAE;IAC7B,GAAG,EAAE,2BAA2B,CAAC,4BAA4B,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IACvF,IAAI,EAAE,UAAU,CAAC,IAAI;AACrB,IAAA,IAAI,EAAE,kCAAkC,CAAC,UAAU,CAAC,YAAY,CAAC;AAClE,CAAA,GAAG,yCAAyC,CAAC;;ACL9C;;;;;AAKG;MAIU,+BAA+B,CAAA;AAE1C,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAE1B,IAAA,OAAO,CAAC,GAAW,EAAA;QACjB,OAAO,IAAI,CAAC;AACT,aAAA,KAAK,CAA6B;AACjC,YAAA,KAAK,EAAE,qBAAqB;AAC5B,YAAA,SAAS,EAAE;AACT,gBAAA,GAAG,EAAE,4BAA4B,CAAC,GAAG,CAAC;AACvC,aAAA;SACF;AACA,aAAA,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,sCAAsC,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;;
|
1
|
+
{"version":3,"file":"daffodil-external-router-driver-magento-2.4.1.mjs","sources":["../../../libs/external-router/driver/magento/2.4.1/src/graphql/queries/resolve-url-v2.4.1.ts","../../../libs/external-router/driver/magento/2.4.1/src/transforms/resolution-to-resolvable-url.ts","../../../libs/external-router/driver/magento/2.4.1/src/magento.service.ts","../../../libs/external-router/driver/magento/2.4.1/src/magento.module.ts","../../../libs/external-router/driver/magento/2.4.1/src/public_api.ts","../../../libs/external-router/driver/magento/2.4.1/src/daffodil-external-router-driver-magento-2.4.1.ts"],"sourcesContent":["import { gql } from 'apollo-angular';\n\nexport const DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME = 'MagentoResolveUrlv241';\n\n/**\n * This query retrieves a URL resolution from Magento and informs you about\n * what type of route the URL is.\n */\nexport const MagentoResolveUrlv241 = gql`\n\tquery ${DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME}($url: String!) {\n\t\turlResolver(url: $url) {\n\t\t\tid\n\t\t\trelative_url\n\t\t\tredirectCode\n\t\t\ttype\n\t\t}\n\t}\n`;\n","import {\n daffUriTruncateLeadingSlash,\n daffUriTruncateQueryFragment,\n} from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION } from '@daffodil/external-router/driver';\nimport {\n MagentoUrlResolver,\n magentoTransformRedirectToHttpCode,\n} from '@daffodil/external-router/driver/magento';\n\nexport const transformResolutionToResolvableUrlv241 = (\n resolution: MagentoUrlResolver,\n): DaffExternallyResolvableUrl => (resolution ? {\n id: resolution.id?.toString(),\n url: daffUriTruncateLeadingSlash(daffUriTruncateQueryFragment(resolution.relative_url)),\n type: resolution.type,\n code: magentoTransformRedirectToHttpCode(resolution.redirectCode),\n} : DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);\n\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { daffUriTruncateQueryFragment } from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DaffExternalRouterDriverInterface } from '@daffodil/external-router/driver';\nimport { MagentoUrlResolverResponse } from '@daffodil/external-router/driver/magento';\n\nimport { MagentoResolveUrlv241 } from './graphql/queries/resolve-url-v2.4.1';\nimport { transformResolutionToResolvableUrlv241 } from './transforms/resolution-to-resolvable-url';\n\n/**\n * The DaffExternalRouterMagentoDriver is responsible for translating an\n * arbitrary URI into a DaffExternallyResolvableUrl with Magento environments.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalRouterMagentoDriver\nimplements DaffExternalRouterDriverInterface {\n constructor(private apollo: Apollo) {}\n\n resolve(url: string): Observable<DaffExternallyResolvableUrl> {\n return this.apollo\n .query<MagentoUrlResolverResponse>({\n query: MagentoResolveUrlv241,\n variables: {\n url: daffUriTruncateQueryFragment(url),\n },\n })\n .pipe(map(response => transformResolutionToResolvableUrlv241(response.data.urlResolver)));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport { DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME } from './graphql/queries/resolve-url-v2.4.1';\nimport { DaffExternalRouterMagentoDriver } from './magento.service';\n/**\n * The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.\n *\n * @example\n * ```ts\n * @NgModule({\n * declarations: [],\n * imports: [\n * ...\n * DaffExternalRouterDriverMagentoModule.forRoot()\n * ],\n * })\n * export class AppModule{}\n * ```\n *\n * Note that this package depends upon ApolloClient, as the Magento driver uses GraphQl to make it's API calls.\n */\n@NgModule({\n declarations: [],\n imports: [CommonModule],\n})\nexport class DaffExternalRouterDriverMagentoModule {\n\n /**\n * Configures the package for the root injector.\n */\n static forRoot(): ModuleWithProviders<DaffExternalRouterDriverMagentoModule> {\n return {\n ngModule: DaffExternalRouterDriverMagentoModule,\n providers: [\n provideDaffExternalRouterDriver(DaffExternalRouterMagentoDriver),\n provideDaffMagentoCacheableOperation(DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME),\n ],\n };\n }\n}\n","/*\n * Public API Surface of @daffodil/external-router/driver/magento/2-4-1\n */\n\nexport { DaffExternalRouterMagentoDriver } from './magento.service';\nexport { DaffExternalRouterDriverMagentoModule } from './magento.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEO,MAAM,mCAAmC,GAAG,uBAAuB;AAE1E;;;AAGG;AACI,MAAM,qBAAqB,GAAG,GAAG,CAAA;SAC/B,mCAAmC,CAAA;;;;;;;;CAQ3C;;ACNM,MAAM,sCAAsC,GAAG,CACpD,UAA8B,MACG,UAAU,GAAG;AAC9C,IAAA,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE,QAAQ,EAAE;IAC7B,GAAG,EAAE,2BAA2B,CAAC,4BAA4B,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IACvF,IAAI,EAAE,UAAU,CAAC,IAAI;AACrB,IAAA,IAAI,EAAE,kCAAkC,CAAC,UAAU,CAAC,YAAY,CAAC;AAClE,CAAA,GAAG,yCAAyC,CAAC;;ACL9C;;;;;AAKG;MAIU,+BAA+B,CAAA;AAE1C,IAA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AAA;AAArC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qCAAqC,YAFtC,YAAY,CAAA,EAAA,CAAA,CAAA;AAEX,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qCAAqC,YAFtC,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAEX,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBAJjD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA;;;AC/BD;;AAEG;;ACFH;;AAEG;;;;"}
|
@@ -52,10 +52,10 @@ class DaffExternalRouterMagentoDriver {
|
|
52
52
|
})
|
53
53
|
.pipe(map(response => transformResolutionToResolvableUrlv242(response.data.urlResolver)));
|
54
54
|
}
|
55
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
56
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
55
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterMagentoDriver, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
56
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterMagentoDriver, providedIn: 'root' }); }
|
57
57
|
}
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterMagentoDriver, decorators: [{
|
59
59
|
type: Injectable,
|
60
60
|
args: [{
|
61
61
|
providedIn: 'root',
|
@@ -92,11 +92,11 @@ class DaffExternalRouterDriverMagentoModule {
|
|
92
92
|
],
|
93
93
|
};
|
94
94
|
}
|
95
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
96
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
97
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
95
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
96
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, imports: [CommonModule] }); }
|
97
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, imports: [CommonModule] }); }
|
98
98
|
}
|
99
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, decorators: [{
|
100
100
|
type: NgModule,
|
101
101
|
args: [{
|
102
102
|
declarations: [],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-external-router-driver-magento-2.4.2.mjs","sources":["../../../libs/external-router/driver/magento/2.4.2/src/graphql/queries/resolve-url-v2.4.2.ts","../../../libs/external-router/driver/magento/2.4.2/src/transforms/resolution-to-resolvable-url.ts","../../../libs/external-router/driver/magento/2.4.2/src/magento.service.ts","../../../libs/external-router/driver/magento/2.4.2/src/magento.module.ts","../../../libs/external-router/driver/magento/2.4.2/src/public_api.ts","../../../libs/external-router/driver/magento/2.4.2/src/daffodil-external-router-driver-magento-2.4.2.ts"],"sourcesContent":["import { gql } from 'apollo-angular';\n\nexport const DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME = 'MagentoResolveUrlv242';\n\n/**\n * This query retrieves a URL resolution from Magento and informs you about\n * what type of route the URL is.\n */\nexport const MagentoResolveUrlv242 = gql`\n\tquery ${DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME}($url: String!) {\n\t\turlResolver(url: $url) {\n\t\t\tentity_uid\n\t\t\trelative_url\n\t\t\tredirectCode\n\t\t\ttype\n\t\t}\n\t}\n`;\n","import {\n daffUriTruncateLeadingSlash,\n daffUriTruncateQueryFragment,\n} from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION } from '@daffodil/external-router/driver';\nimport {\n MagentoUrlResolver,\n magentoTransformRedirectToHttpCode,\n} from '@daffodil/external-router/driver/magento';\n\n\nexport const transformResolutionToResolvableUrlv242 = (\n resolution: MagentoUrlResolver,\n): DaffExternallyResolvableUrl => (resolution ? {\n id: resolution.entity_uid,\n url: daffUriTruncateLeadingSlash(daffUriTruncateQueryFragment(resolution.relative_url)),\n type: resolution.type,\n code: magentoTransformRedirectToHttpCode(resolution.redirectCode),\n} : DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DaffExternalRouterDriverInterface } from '@daffodil/external-router/driver';\nimport { MagentoUrlResolverResponse } from '@daffodil/external-router/driver/magento';\n\nimport { MagentoResolveUrlv242 } from './graphql/queries/resolve-url-v2.4.2';\nimport { transformResolutionToResolvableUrlv242 } from './transforms/resolution-to-resolvable-url';\n\n\n/**\n * The DaffExternalRouterMagentoDriver is responsible for translating an\n * arbitrary URI into a DaffExternallyResolvableUrl with Magento environments.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalRouterMagentoDriver\nimplements DaffExternalRouterDriverInterface {\n constructor(\n private apollo: Apollo,\n ) {}\n\n resolve(url: string): Observable<DaffExternallyResolvableUrl> {\n return this.apollo\n .query<MagentoUrlResolverResponse>({\n query: MagentoResolveUrlv242,\n variables: {\n url,\n },\n })\n .pipe(map(response => transformResolutionToResolvableUrlv242(response.data.urlResolver)));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport { DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME } from './graphql/queries/resolve-url-v2.4.2';\nimport { DaffExternalRouterMagentoDriver } from './magento.service';\n\n/**\n * The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.\n *\n * @example\n * ```ts\n * @NgModule({\n * declarations: [],\n * imports: [\n * ...\n * DaffExternalRouterDriverMagentoModule.forRoot()\n * ],\n * })\n * export class AppModule{}\n * ```\n *\n * Note that this package depends upon ApolloClient, as the Magento driver uses GraphQl to make it's API calls.\n */\n@NgModule({\n declarations: [],\n imports: [CommonModule],\n})\nexport class DaffExternalRouterDriverMagentoModule {\n\n /**\n * Configures the package for the root injector.\n */\n static forRoot(): ModuleWithProviders<DaffExternalRouterDriverMagentoModule> {\n return {\n ngModule: DaffExternalRouterDriverMagentoModule,\n providers: [\n provideDaffExternalRouterDriver(DaffExternalRouterMagentoDriver),\n provideDaffMagentoCacheableOperation(DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME),\n ],\n };\n }\n}\n","/*\n * Public API Surface of @daffodil/external-router/driver/magento/2.4.2\n */\n\nexport { DaffExternalRouterMagentoDriver } from './magento.service';\nexport { DaffExternalRouterDriverMagentoModule } from './magento.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEO,MAAM,mCAAmC,GAAG,uBAAuB;AAE1E;;;AAGG;AACI,MAAM,qBAAqB,GAAG,GAAG,CAAA;SAC/B,mCAAmC,CAAA;;;;;;;;CAQ3C;;ACLM,MAAM,sCAAsC,GAAG,CACpD,UAA8B,MACG,UAAU,GAAG;IAC9C,EAAE,EAAE,UAAU,CAAC,UAAU;IACzB,GAAG,EAAE,2BAA2B,CAAC,4BAA4B,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IACvF,IAAI,EAAE,UAAU,CAAC,IAAI;AACrB,IAAA,IAAI,EAAE,kCAAkC,CAAC,UAAU,CAAC,YAAY,CAAC;AAClE,CAAA,GAAG,yCAAyC,CAAC;;ACL9C;;;;;AAKG;MAIU,+BAA+B,CAAA;AAE1C,IAAA,WAAA,CACU,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAGhB,IAAA,OAAO,CAAC,GAAW,EAAA;QACjB,OAAO,IAAI,CAAC;AACT,aAAA,KAAK,CAA6B;AACjC,YAAA,KAAK,EAAE,qBAAqB;AAC5B,YAAA,SAAS,EAAE;gBACT,GAAG;AACJ,aAAA;SACF;AACA,aAAA,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,sCAAsC,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;;
|
1
|
+
{"version":3,"file":"daffodil-external-router-driver-magento-2.4.2.mjs","sources":["../../../libs/external-router/driver/magento/2.4.2/src/graphql/queries/resolve-url-v2.4.2.ts","../../../libs/external-router/driver/magento/2.4.2/src/transforms/resolution-to-resolvable-url.ts","../../../libs/external-router/driver/magento/2.4.2/src/magento.service.ts","../../../libs/external-router/driver/magento/2.4.2/src/magento.module.ts","../../../libs/external-router/driver/magento/2.4.2/src/public_api.ts","../../../libs/external-router/driver/magento/2.4.2/src/daffodil-external-router-driver-magento-2.4.2.ts"],"sourcesContent":["import { gql } from 'apollo-angular';\n\nexport const DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME = 'MagentoResolveUrlv242';\n\n/**\n * This query retrieves a URL resolution from Magento and informs you about\n * what type of route the URL is.\n */\nexport const MagentoResolveUrlv242 = gql`\n\tquery ${DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME}($url: String!) {\n\t\turlResolver(url: $url) {\n\t\t\tentity_uid\n\t\t\trelative_url\n\t\t\tredirectCode\n\t\t\ttype\n\t\t}\n\t}\n`;\n","import {\n daffUriTruncateLeadingSlash,\n daffUriTruncateQueryFragment,\n} from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION } from '@daffodil/external-router/driver';\nimport {\n MagentoUrlResolver,\n magentoTransformRedirectToHttpCode,\n} from '@daffodil/external-router/driver/magento';\n\n\nexport const transformResolutionToResolvableUrlv242 = (\n resolution: MagentoUrlResolver,\n): DaffExternallyResolvableUrl => (resolution ? {\n id: resolution.entity_uid,\n url: daffUriTruncateLeadingSlash(daffUriTruncateQueryFragment(resolution.relative_url)),\n type: resolution.type,\n code: magentoTransformRedirectToHttpCode(resolution.redirectCode),\n} : DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DaffExternalRouterDriverInterface } from '@daffodil/external-router/driver';\nimport { MagentoUrlResolverResponse } from '@daffodil/external-router/driver/magento';\n\nimport { MagentoResolveUrlv242 } from './graphql/queries/resolve-url-v2.4.2';\nimport { transformResolutionToResolvableUrlv242 } from './transforms/resolution-to-resolvable-url';\n\n\n/**\n * The DaffExternalRouterMagentoDriver is responsible for translating an\n * arbitrary URI into a DaffExternallyResolvableUrl with Magento environments.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalRouterMagentoDriver\nimplements DaffExternalRouterDriverInterface {\n constructor(\n private apollo: Apollo,\n ) {}\n\n resolve(url: string): Observable<DaffExternallyResolvableUrl> {\n return this.apollo\n .query<MagentoUrlResolverResponse>({\n query: MagentoResolveUrlv242,\n variables: {\n url,\n },\n })\n .pipe(map(response => transformResolutionToResolvableUrlv242(response.data.urlResolver)));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport { DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME } from './graphql/queries/resolve-url-v2.4.2';\nimport { DaffExternalRouterMagentoDriver } from './magento.service';\n\n/**\n * The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.\n *\n * @example\n * ```ts\n * @NgModule({\n * declarations: [],\n * imports: [\n * ...\n * DaffExternalRouterDriverMagentoModule.forRoot()\n * ],\n * })\n * export class AppModule{}\n * ```\n *\n * Note that this package depends upon ApolloClient, as the Magento driver uses GraphQl to make it's API calls.\n */\n@NgModule({\n declarations: [],\n imports: [CommonModule],\n})\nexport class DaffExternalRouterDriverMagentoModule {\n\n /**\n * Configures the package for the root injector.\n */\n static forRoot(): ModuleWithProviders<DaffExternalRouterDriverMagentoModule> {\n return {\n ngModule: DaffExternalRouterDriverMagentoModule,\n providers: [\n provideDaffExternalRouterDriver(DaffExternalRouterMagentoDriver),\n provideDaffMagentoCacheableOperation(DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME),\n ],\n };\n }\n}\n","/*\n * Public API Surface of @daffodil/external-router/driver/magento/2.4.2\n */\n\nexport { DaffExternalRouterMagentoDriver } from './magento.service';\nexport { DaffExternalRouterDriverMagentoModule } from './magento.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEO,MAAM,mCAAmC,GAAG,uBAAuB;AAE1E;;;AAGG;AACI,MAAM,qBAAqB,GAAG,GAAG,CAAA;SAC/B,mCAAmC,CAAA;;;;;;;;CAQ3C;;ACLM,MAAM,sCAAsC,GAAG,CACpD,UAA8B,MACG,UAAU,GAAG;IAC9C,EAAE,EAAE,UAAU,CAAC,UAAU;IACzB,GAAG,EAAE,2BAA2B,CAAC,4BAA4B,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IACvF,IAAI,EAAE,UAAU,CAAC,IAAI;AACrB,IAAA,IAAI,EAAE,kCAAkC,CAAC,UAAU,CAAC,YAAY,CAAC;AAClE,CAAA,GAAG,yCAAyC,CAAC;;ACL9C;;;;;AAKG;MAIU,+BAA+B,CAAA;AAE1C,IAAA,WAAA,CACU,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAGhB,IAAA,OAAO,CAAC,GAAW,EAAA;QACjB,OAAO,IAAI,CAAC;AACT,aAAA,KAAK,CAA6B;AACjC,YAAA,KAAK,EAAE,qBAAqB;AAC5B,YAAA,SAAS,EAAE;gBACT,GAAG;AACJ,aAAA;SACF;AACA,aAAA,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,sCAAsC,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;;kIAdlF,+BAA+B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA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EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA;;;AChCD;;AAEG;;ACFH;;AAEG;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import {
|
3
|
+
import { Inject, Injectable, NgModule, makeEnvironmentProviders } from '@angular/core';
|
4
4
|
import * as i1 from 'apollo-angular';
|
5
5
|
import { gql } from 'apollo-angular';
|
6
6
|
import { map } from 'rxjs/operators';
|
@@ -274,10 +274,10 @@ class DaffExternalRouterMagentoDriver {
|
|
274
274
|
})
|
275
275
|
.pipe(map((response) => response.data.route), map((route) => transformClientUrls(route, this.document.location.origin)), map(route => transformResolutionToResolvableUrlv243(route)));
|
276
276
|
}
|
277
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
278
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
277
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterMagentoDriver, deps: [{ token: i1.Apollo }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
278
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterMagentoDriver, providedIn: 'root' }); }
|
279
279
|
}
|
280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterMagentoDriver, decorators: [{
|
281
281
|
type: Injectable,
|
282
282
|
args: [{
|
283
283
|
providedIn: 'root',
|
@@ -317,11 +317,11 @@ class DaffExternalRouterDriverMagentoModule {
|
|
317
317
|
],
|
318
318
|
};
|
319
319
|
}
|
320
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
321
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
322
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
320
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
321
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, imports: [CommonModule] }); }
|
322
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, imports: [CommonModule] }); }
|
323
323
|
}
|
324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverMagentoModule, decorators: [{
|
325
325
|
type: NgModule,
|
326
326
|
args: [{
|
327
327
|
declarations: [],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-external-router-driver-magento-2.4.3.mjs","sources":["../../../libs/external-router/driver/magento/2.4.3/src/graphql/queries/resolve.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/rescale-rating.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/product/base.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/product/bundle.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/product/configurable.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/product/simple.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/product/product.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/category/category.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/transform-schema.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/resolution-to-resolvable-url.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/clientify-url-path.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/transform-client-urls.ts","../../../libs/external-router/driver/magento/2.4.3/src/magento.service.ts","../../../libs/external-router/driver/magento/2.4.3/src/magento.module.ts","../../../libs/external-router/driver/magento/2.4.3/src/provider.ts","../../../libs/external-router/driver/magento/2.4.3/src/public_api.ts","../../../libs/external-router/driver/magento/2.4.3/src/daffodil-external-router-driver-magento-2.4.3.ts"],"sourcesContent":["import { gql } from 'apollo-angular';\n\nexport const DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME = 'MagentoResolveUrlv243';\n\n/**\n * This query retrieves a URL resolution from Magento and informs you about\n * what type of route the URL is.\n */\nexport const MagentoResolveUrlv243 = gql`\n\tquery ${DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME}($url: String!) {\n\t\troute(url: $url) {\n\t\t\trelative_url\n\t\t\tredirect_code\n\t\t\ttype\n\t\t\t... on CategoryInterface {\n\t\t\t\tuid\n\t\t\t\tname\n\t\t\t\tmeta_title\n\t\t\t\tmeta_description\n\t\t\t\tcanonical_url\n\t\t\t\tproducts {\n\t\t\t\t\titems {\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\tmeta_description\n\t\t\t\t\t\t\tmeta_title\n\t\t\t\t\t\t\tcanonical_url\n\t\t\t\t\t\t\tsku\n\t\t\t\t\t\t\treview_count\n\t\t\t\t\t\t\trating_summary\n\t\t\t\t\t\t\timage {\n\t\t\t\t\t\t\t\turl\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tprice_range {\n\t\t\t\t\t\t\t\tminimum_price {\n\t\t\t\t\t\t\t\t\tregular_price {\n\t\t\t\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfinal_price {\n\t\t\t\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmaximum_price {\n\t\t\t\t\t\t\t\t\tregular_price {\n\t\t\t\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfinal_price {\n\t\t\t\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t... on ProductInterface {\n\t\t\t\tuid\n\t\t\t\tname\n\t\t\t\tmeta_description\n\t\t\t\tmeta_title\n\t\t\t\tcanonical_url\n\t\t\t\tsku\n\t\t\t\treview_count\n\t\t\t\trating_summary\n\t\t\t\timage {\n\t\t\t\t\turl\n\t\t\t\t}\n\t\t\t\tstock_status\n\t\t\t\tprice_range {\n\t\t\t\t\tminimum_price {\n\t\t\t\t\t\tregular_price {\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal_price {\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmaximum_price {\n\t\t\t\t\t\tregular_price {\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal_price {\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n`;\n","/**\n * Rescales a rating value from it's max rating\n * to a scale of 5.\n */\nexport const rescaleRatingOutOf5 = (rating: number | null, max: number) => (((rating ?? 0)/max) * 5).toPrecision(2);\n","import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';\n\nimport { rescaleRatingOutOf5 } from '../rescale-rating';\n\nexport const transformMagentoBaseProduct = (product: MagentoProductRoute): Record<string, unknown> => ({\n '@context': 'https://schema.org/',\n '@type': 'Product',\n url: product.canonical_url,\n sku: product.sku,\n name: product.meta_title ?? product.name ?? '',\n ...(product.meta_description && { description: product.meta_description }),\n ...(product.review_count > 0 && { aggregateRating: {\n '@type': 'AggregateRating',\n ratingValue: rescaleRatingOutOf5(product.rating_summary, 100),\n reviewCount: product.review_count,\n }}),\n image: product.image?.url,\n});\n","import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoBaseProduct } from './base';\n\nexport const transformMagentoBundleProduct = (resolution: MagentoProductRoute): Record<string, unknown> => ({\n ...transformMagentoBaseProduct(resolution),\n offers: {\n '@type': 'AggregateOffer',\n lowPrice: resolution.price_range.minimum_price.final_price.value,\n highPrice: resolution.price_range.maximum_price.final_price.value,\n priceCurrency: resolution.price_range.maximum_price.final_price.currency,\n },\n});\n","import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoBaseProduct } from './base';\n\nexport const transformMagentoConfigurableProduct = (resolution: MagentoProductRoute): Record<string, unknown> => ({\n ...transformMagentoBaseProduct(resolution),\n offers: {\n '@type': 'AggregateOffer',\n lowPrice: resolution.price_range.minimum_price.final_price.value,\n highPrice: resolution.price_range.maximum_price.final_price.value,\n priceCurrency: resolution.price_range.maximum_price.final_price.currency,\n },\n});\n","\nimport { MagentoProductRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoBaseProduct } from './base';\n\nexport const transformMagentoSimpleProduct = (resolution: MagentoProductRoute): Record<string, unknown> => ({\n ...transformMagentoBaseProduct(resolution),\n offers: {\n '@type': 'Offer',\n url: resolution.canonical_url,\n ...(resolution.stock_status && {\n availability: resolution.stock_status === 'IN_STOCK' ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock',\n }),\n priceSpecification: [\n {\n '@type': 'UnitPriceSpecification',\n price: resolution.price_range.maximum_price.final_price.value,\n priceCurrency: resolution.price_range.maximum_price.final_price.currency,\n },\n {\n '@type': 'UnitPriceSpecification',\n priceType: 'https://schema.org/ListPrice',\n price: resolution.price_range.maximum_price.regular_price.value,\n priceCurrency: resolution.price_range.maximum_price.regular_price.currency,\n },\n ],\n },\n});\n","import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoBaseProduct } from './base';\nimport { transformMagentoBundleProduct } from './bundle';\nimport { transformMagentoConfigurableProduct } from './configurable';\nimport { transformMagentoSimpleProduct } from './simple';\n\n/**\n * Computes supplementary SEO schema for Magento product routes.\n */\nexport const transformMagentoProductSchema = (resolution: MagentoProductRoute): Record<string, unknown> => {\n switch(resolution.__typename) {\n case 'BundleProduct':\n return transformMagentoBundleProduct(resolution);\n case 'ConfigurableProduct':\n return transformMagentoConfigurableProduct(resolution);\n case 'SimpleProduct':\n return transformMagentoSimpleProduct(resolution);\n default:\n return transformMagentoBaseProduct(resolution);\n }\n};\n","import { MagentoCategoryRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoProductSchema } from '../product/product';\n\nexport const transformMagentoCategorySchema = (resolution: MagentoCategoryRoute): Record<string, unknown> => ({\n '@context': 'https://schema.org',\n '@type': 'ItemList',\n itemListElement: resolution.products.items.map((item, index) => ({\n '@type': 'ListItem',\n position: index,\n item: transformMagentoProductSchema({\n ...item,\n meta_description: undefined,\n stock_status: undefined,\n }),\n })),\n});\n","import { MagentoRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoCategorySchema } from './category/category';\nimport { transformMagentoProductSchema } from './product/product';\n\nexport const transformSchema = (resolution: MagentoRoute): Record<string, any> | null => {\n switch(resolution.type) {\n case 'PRODUCT':\n return transformMagentoProductSchema(resolution);\n case 'CATEGORY':\n return transformMagentoCategorySchema(resolution);\n default:\n return null;\n }\n};\n","import {\n daffUriTruncateLeadingSlash,\n daffUriTruncateQueryFragment,\n} from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION } from '@daffodil/external-router/driver';\nimport {\n magentoTransformRedirectToHttpCode,\n MagentoRoute,\n} from '@daffodil/external-router/driver/magento';\n\nimport { transformSchema } from './schema/transform-schema';\n\nexport const transformResolutionToResolvableUrlv243 = (\n resolution: MagentoRoute,\n): DaffExternallyResolvableUrl => (resolution && (resolution.type === 'CATEGORY' || resolution.type ==='PRODUCT') ? {\n id: resolution.uid,\n url: daffUriTruncateLeadingSlash(daffUriTruncateQueryFragment(resolution.relative_url)),\n type: resolution.type,\n code: magentoTransformRedirectToHttpCode(resolution.redirect_code),\n data: {\n canonical_url: resolution?.canonical_url,\n title: resolution.meta_title ?? resolution.name ?? '',\n meta_description: resolution.meta_description,\n schema: {\n ...transformSchema(resolution),\n },\n },\n} : DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);\n","export const clientifyUrlPath = <T extends string | null>(path: T, domain: string) => path ? new URL(path, domain).toString() : path;\n","import { MagentoRoute } from '@daffodil/external-router/driver/magento';\n\nimport { clientifyUrlPath } from './schema/clientify-url-path';\n\nexport const transformClientUrls = <T extends MagentoRoute>(route: T, origin: string) => {\n if(!route) {\n return route;\n }\n\n switch(route.type) {\n case 'CATEGORY':\n return {\n ...route,\n canonical_url: clientifyUrlPath(route.canonical_url, origin),\n products: {\n items: route.products.items.map((product) => ({\n ...product,\n canonical_url: clientifyUrlPath(product.canonical_url, origin),\n })),\n },\n };\n case 'PRODUCT':\n return {\n ...route,\n canonical_url: clientifyUrlPath(route.canonical_url, origin),\n };\n default:\n return route;\n }\n return route;\n};\n","import { DOCUMENT } from '@angular/common';\nimport {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DaffExternalRouterDriverInterface } from '@daffodil/external-router/driver';\nimport { MagentoRouteResponse } from '@daffodil/external-router/driver/magento';\n\nimport { MagentoResolveUrlv243 } from './graphql/queries/resolve';\nimport { transformResolutionToResolvableUrlv243 } from './transforms/resolution-to-resolvable-url';\nimport { transformClientUrls } from './transforms/transform-client-urls';\n\n\n/**\n * The DaffExternalRouterMagentoDriver is responsible for translating an\n * arbitrary URI into a DaffExternallyResolvableUrl with Magento environments.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalRouterMagentoDriver\nimplements DaffExternalRouterDriverInterface {\n constructor(\n private apollo: Apollo,\n @Inject(DOCUMENT) private document: Document,\n ) {}\n\n resolve(url: string): Observable<DaffExternallyResolvableUrl> {\n return this.apollo\n .query<MagentoRouteResponse>({\n query: MagentoResolveUrlv243,\n variables: {\n url,\n },\n })\n .pipe(\n map((response) => response.data.route),\n map((route) => transformClientUrls(route, this.document.location.origin)),\n map(route => transformResolutionToResolvableUrlv243(route)),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport { DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME } from './graphql/queries/resolve';\nimport { DaffExternalRouterMagentoDriver } from './magento.service';\n\n/**\n * The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.\n *\n * @example\n * ```ts\n * @NgModule({\n * declarations: [],\n * imports: [\n * ...\n * DaffExternalRouterDriverMagentoModule.forRoot()\n * ],\n * })\n * export class AppModule{}\n * ```\n *\n * Note that this package depends upon ApolloClient, as the Magento driver uses GraphQl to make it's API calls.\n */\n@NgModule({\n declarations: [],\n imports: [CommonModule],\n})\nexport class DaffExternalRouterDriverMagentoModule {\n\n /**\n * Configures the package for the root injector.\n */\n static forRoot(): ModuleWithProviders<DaffExternalRouterDriverMagentoModule> {\n return {\n ngModule: DaffExternalRouterDriverMagentoModule,\n providers: [\n provideDaffExternalRouterDriver(DaffExternalRouterMagentoDriver),\n provideDaffMagentoCacheableOperation(DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME),\n ],\n };\n }\n}\n","import {\n EnvironmentProviders,\n makeEnvironmentProviders,\n} from '@angular/core';\n\nimport { provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport { DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME } from './graphql/queries/resolve';\nimport { DaffExternalRouterMagentoDriver } from './magento.service';\n\n/**\n * Provides a Magento implementation of {@link DaffExternalRouterDriver}.\n */\nexport const provideDaffExternalRouterMagentoDriver = (\n): EnvironmentProviders => makeEnvironmentProviders([\n provideDaffExternalRouterDriver(DaffExternalRouterMagentoDriver),\n provideDaffMagentoCacheableOperation(DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME),\n]);\n","/*\n * Public API Surface of @daffodil/external-router/driver/magento/2.4.3\n */\n\nexport { DaffExternalRouterMagentoDriver } from './magento.service';\nexport { DaffExternalRouterDriverMagentoModule } from './magento.module';\nexport { provideDaffExternalRouterMagentoDriver } from './provider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEO,MAAM,mCAAmC,GAAG,uBAAuB;AAE1E;;;AAGG;AACI,MAAM,qBAAqB,GAAG,GAAG,CAAA;SAC/B,mCAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;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IAChE,oCAAoC,CAAC,mCAAmC,CAAC;AAC1E,CAAA;;AClBD;;AAEG;;ACFH;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"daffodil-external-router-driver-magento-2.4.3.mjs","sources":["../../../libs/external-router/driver/magento/2.4.3/src/graphql/queries/resolve.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/rescale-rating.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/product/base.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/product/bundle.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/product/configurable.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/product/simple.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/product/product.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/category/category.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/transform-schema.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/resolution-to-resolvable-url.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/schema/clientify-url-path.ts","../../../libs/external-router/driver/magento/2.4.3/src/transforms/transform-client-urls.ts","../../../libs/external-router/driver/magento/2.4.3/src/magento.service.ts","../../../libs/external-router/driver/magento/2.4.3/src/magento.module.ts","../../../libs/external-router/driver/magento/2.4.3/src/provider.ts","../../../libs/external-router/driver/magento/2.4.3/src/public_api.ts","../../../libs/external-router/driver/magento/2.4.3/src/daffodil-external-router-driver-magento-2.4.3.ts"],"sourcesContent":["import { gql } from 'apollo-angular';\n\nexport const DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME = 'MagentoResolveUrlv243';\n\n/**\n * This query retrieves a URL resolution from Magento and informs you about\n * what type of route the URL is.\n */\nexport const MagentoResolveUrlv243 = gql`\n\tquery ${DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME}($url: String!) {\n\t\troute(url: $url) {\n\t\t\trelative_url\n\t\t\tredirect_code\n\t\t\ttype\n\t\t\t... on CategoryInterface {\n\t\t\t\tuid\n\t\t\t\tname\n\t\t\t\tmeta_title\n\t\t\t\tmeta_description\n\t\t\t\tcanonical_url\n\t\t\t\tproducts {\n\t\t\t\t\titems {\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\tmeta_description\n\t\t\t\t\t\t\tmeta_title\n\t\t\t\t\t\t\tcanonical_url\n\t\t\t\t\t\t\tsku\n\t\t\t\t\t\t\treview_count\n\t\t\t\t\t\t\trating_summary\n\t\t\t\t\t\t\timage {\n\t\t\t\t\t\t\t\turl\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tprice_range {\n\t\t\t\t\t\t\t\tminimum_price {\n\t\t\t\t\t\t\t\t\tregular_price {\n\t\t\t\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfinal_price {\n\t\t\t\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmaximum_price {\n\t\t\t\t\t\t\t\t\tregular_price {\n\t\t\t\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfinal_price {\n\t\t\t\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t... on ProductInterface {\n\t\t\t\tuid\n\t\t\t\tname\n\t\t\t\tmeta_description\n\t\t\t\tmeta_title\n\t\t\t\tcanonical_url\n\t\t\t\tsku\n\t\t\t\treview_count\n\t\t\t\trating_summary\n\t\t\t\timage {\n\t\t\t\t\turl\n\t\t\t\t}\n\t\t\t\tstock_status\n\t\t\t\tprice_range {\n\t\t\t\t\tminimum_price {\n\t\t\t\t\t\tregular_price {\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal_price {\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmaximum_price {\n\t\t\t\t\t\tregular_price {\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal_price {\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n`;\n","/**\n * Rescales a rating value from it's max rating\n * to a scale of 5.\n */\nexport const rescaleRatingOutOf5 = (rating: number | null, max: number) => (((rating ?? 0)/max) * 5).toPrecision(2);\n","import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';\n\nimport { rescaleRatingOutOf5 } from '../rescale-rating';\n\nexport const transformMagentoBaseProduct = (product: MagentoProductRoute): Record<string, unknown> => ({\n '@context': 'https://schema.org/',\n '@type': 'Product',\n url: product.canonical_url,\n sku: product.sku,\n name: product.meta_title ?? product.name ?? '',\n ...(product.meta_description && { description: product.meta_description }),\n ...(product.review_count > 0 && { aggregateRating: {\n '@type': 'AggregateRating',\n ratingValue: rescaleRatingOutOf5(product.rating_summary, 100),\n reviewCount: product.review_count,\n }}),\n image: product.image?.url,\n});\n","import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoBaseProduct } from './base';\n\nexport const transformMagentoBundleProduct = (resolution: MagentoProductRoute): Record<string, unknown> => ({\n ...transformMagentoBaseProduct(resolution),\n offers: {\n '@type': 'AggregateOffer',\n lowPrice: resolution.price_range.minimum_price.final_price.value,\n highPrice: resolution.price_range.maximum_price.final_price.value,\n priceCurrency: resolution.price_range.maximum_price.final_price.currency,\n },\n});\n","import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoBaseProduct } from './base';\n\nexport const transformMagentoConfigurableProduct = (resolution: MagentoProductRoute): Record<string, unknown> => ({\n ...transformMagentoBaseProduct(resolution),\n offers: {\n '@type': 'AggregateOffer',\n lowPrice: resolution.price_range.minimum_price.final_price.value,\n highPrice: resolution.price_range.maximum_price.final_price.value,\n priceCurrency: resolution.price_range.maximum_price.final_price.currency,\n },\n});\n","\nimport { MagentoProductRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoBaseProduct } from './base';\n\nexport const transformMagentoSimpleProduct = (resolution: MagentoProductRoute): Record<string, unknown> => ({\n ...transformMagentoBaseProduct(resolution),\n offers: {\n '@type': 'Offer',\n url: resolution.canonical_url,\n ...(resolution.stock_status && {\n availability: resolution.stock_status === 'IN_STOCK' ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock',\n }),\n priceSpecification: [\n {\n '@type': 'UnitPriceSpecification',\n price: resolution.price_range.maximum_price.final_price.value,\n priceCurrency: resolution.price_range.maximum_price.final_price.currency,\n },\n {\n '@type': 'UnitPriceSpecification',\n priceType: 'https://schema.org/ListPrice',\n price: resolution.price_range.maximum_price.regular_price.value,\n priceCurrency: resolution.price_range.maximum_price.regular_price.currency,\n },\n ],\n },\n});\n","import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoBaseProduct } from './base';\nimport { transformMagentoBundleProduct } from './bundle';\nimport { transformMagentoConfigurableProduct } from './configurable';\nimport { transformMagentoSimpleProduct } from './simple';\n\n/**\n * Computes supplementary SEO schema for Magento product routes.\n */\nexport const transformMagentoProductSchema = (resolution: MagentoProductRoute): Record<string, unknown> => {\n switch(resolution.__typename) {\n case 'BundleProduct':\n return transformMagentoBundleProduct(resolution);\n case 'ConfigurableProduct':\n return transformMagentoConfigurableProduct(resolution);\n case 'SimpleProduct':\n return transformMagentoSimpleProduct(resolution);\n default:\n return transformMagentoBaseProduct(resolution);\n }\n};\n","import { MagentoCategoryRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoProductSchema } from '../product/product';\n\nexport const transformMagentoCategorySchema = (resolution: MagentoCategoryRoute): Record<string, unknown> => ({\n '@context': 'https://schema.org',\n '@type': 'ItemList',\n itemListElement: resolution.products.items.map((item, index) => ({\n '@type': 'ListItem',\n position: index,\n item: transformMagentoProductSchema({\n ...item,\n meta_description: undefined,\n stock_status: undefined,\n }),\n })),\n});\n","import { MagentoRoute } from '@daffodil/external-router/driver/magento';\n\nimport { transformMagentoCategorySchema } from './category/category';\nimport { transformMagentoProductSchema } from './product/product';\n\nexport const transformSchema = (resolution: MagentoRoute): Record<string, any> | null => {\n switch(resolution.type) {\n case 'PRODUCT':\n return transformMagentoProductSchema(resolution);\n case 'CATEGORY':\n return transformMagentoCategorySchema(resolution);\n default:\n return null;\n }\n};\n","import {\n daffUriTruncateLeadingSlash,\n daffUriTruncateQueryFragment,\n} from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION } from '@daffodil/external-router/driver';\nimport {\n magentoTransformRedirectToHttpCode,\n MagentoRoute,\n} from '@daffodil/external-router/driver/magento';\n\nimport { transformSchema } from './schema/transform-schema';\n\nexport const transformResolutionToResolvableUrlv243 = (\n resolution: MagentoRoute,\n): DaffExternallyResolvableUrl => (resolution && (resolution.type === 'CATEGORY' || resolution.type ==='PRODUCT') ? {\n id: resolution.uid,\n url: daffUriTruncateLeadingSlash(daffUriTruncateQueryFragment(resolution.relative_url)),\n type: resolution.type,\n code: magentoTransformRedirectToHttpCode(resolution.redirect_code),\n data: {\n canonical_url: resolution?.canonical_url,\n title: resolution.meta_title ?? resolution.name ?? '',\n meta_description: resolution.meta_description,\n schema: {\n ...transformSchema(resolution),\n },\n },\n} : DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);\n","export const clientifyUrlPath = <T extends string | null>(path: T, domain: string) => path ? new URL(path, domain).toString() : path;\n","import { MagentoRoute } from '@daffodil/external-router/driver/magento';\n\nimport { clientifyUrlPath } from './schema/clientify-url-path';\n\nexport const transformClientUrls = <T extends MagentoRoute>(route: T, origin: string) => {\n if(!route) {\n return route;\n }\n\n switch(route.type) {\n case 'CATEGORY':\n return {\n ...route,\n canonical_url: clientifyUrlPath(route.canonical_url, origin),\n products: {\n items: route.products.items.map((product) => ({\n ...product,\n canonical_url: clientifyUrlPath(product.canonical_url, origin),\n })),\n },\n };\n case 'PRODUCT':\n return {\n ...route,\n canonical_url: clientifyUrlPath(route.canonical_url, origin),\n };\n default:\n return route;\n }\n return route;\n};\n","import { DOCUMENT } from '@angular/common';\nimport {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport { DaffExternalRouterDriverInterface } from '@daffodil/external-router/driver';\nimport { MagentoRouteResponse } from '@daffodil/external-router/driver/magento';\n\nimport { MagentoResolveUrlv243 } from './graphql/queries/resolve';\nimport { transformResolutionToResolvableUrlv243 } from './transforms/resolution-to-resolvable-url';\nimport { transformClientUrls } from './transforms/transform-client-urls';\n\n\n/**\n * The DaffExternalRouterMagentoDriver is responsible for translating an\n * arbitrary URI into a DaffExternallyResolvableUrl with Magento environments.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalRouterMagentoDriver\nimplements DaffExternalRouterDriverInterface {\n constructor(\n private apollo: Apollo,\n @Inject(DOCUMENT) private document: Document,\n ) {}\n\n resolve(url: string): Observable<DaffExternallyResolvableUrl> {\n return this.apollo\n .query<MagentoRouteResponse>({\n query: MagentoResolveUrlv243,\n variables: {\n url,\n },\n })\n .pipe(\n map((response) => response.data.route),\n map((route) => transformClientUrls(route, this.document.location.origin)),\n map(route => transformResolutionToResolvableUrlv243(route)),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport { DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME } from './graphql/queries/resolve';\nimport { DaffExternalRouterMagentoDriver } from './magento.service';\n\n/**\n * The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.\n *\n * @example\n * ```ts\n * @NgModule({\n * declarations: [],\n * imports: [\n * ...\n * DaffExternalRouterDriverMagentoModule.forRoot()\n * ],\n * })\n * export class AppModule{}\n * ```\n *\n * Note that this package depends upon ApolloClient, as the Magento driver uses GraphQl to make it's API calls.\n */\n@NgModule({\n declarations: [],\n imports: [CommonModule],\n})\nexport class DaffExternalRouterDriverMagentoModule {\n\n /**\n * Configures the package for the root injector.\n */\n static forRoot(): ModuleWithProviders<DaffExternalRouterDriverMagentoModule> {\n return {\n ngModule: DaffExternalRouterDriverMagentoModule,\n providers: [\n provideDaffExternalRouterDriver(DaffExternalRouterMagentoDriver),\n provideDaffMagentoCacheableOperation(DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME),\n ],\n };\n }\n}\n","import {\n EnvironmentProviders,\n makeEnvironmentProviders,\n} from '@angular/core';\n\nimport { provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport { DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME } from './graphql/queries/resolve';\nimport { DaffExternalRouterMagentoDriver } from './magento.service';\n\n/**\n * Provides a Magento implementation of {@link DaffExternalRouterDriver}.\n */\nexport const provideDaffExternalRouterMagentoDriver = (\n): EnvironmentProviders => makeEnvironmentProviders([\n provideDaffExternalRouterDriver(DaffExternalRouterMagentoDriver),\n provideDaffMagentoCacheableOperation(DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME),\n]);\n","/*\n * Public API Surface of @daffodil/external-router/driver/magento/2.4.3\n */\n\nexport { DaffExternalRouterMagentoDriver } from './magento.service';\nexport { DaffExternalRouterDriverMagentoModule } from './magento.module';\nexport { provideDaffExternalRouterMagentoDriver } from './provider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEO,MAAM,mCAAmC,GAAG,uBAAuB;AAE1E;;;AAGG;AACI,MAAM,qBAAqB,GAAG,GAAG,CAAA;SAC/B,mCAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsF3C;;AC/FD;;;AAGG;AACI,MAAM,mBAAmB,GAAG,CAAC,MAAqB,EAAE,GAAW,KAAK,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,IAAE,GAAG,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;;ACA5G,MAAM,2BAA2B,GAAG,CAAC,OAA4B,MAA+B;AACrG,IAAA,UAAU,EAAE,qBAAqB;AACjC,IAAA,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,OAAO,CAAC,aAAa;IAC1B,GAAG,EAAE,OAAO,CAAC,GAAG;IAChB,IAAI,EAAE,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,IAAI,IAAI,EAAE;AAC9C,IAAA,IAAI,OAAO,CAAC,gBAAgB,IAAI,EAAG,WAAW,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAC3E,IAAI,OAAO,CAAC,YAAY,GAAG,CAAC,IAAI,EAAE,eAAe,EAAE;AACjD,YAAA,OAAO,EAAE,iBAAiB;YAC1B,WAAW,EAAE,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;YAC7D,WAAW,EAAE,OAAO,CAAC,YAAY;AAClC,SAAA,EAAC,CAAC;AACH,IAAA,KAAK,EAAE,OAAO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AAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qCAAqC,YAFtC,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAEX,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBAJjD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA;;;ACrBD;;AAEG;MACU,sCAAsC,GAAG,MAC3B,wBAAwB,CAAC;IAClD,+BAA+B,CAAC,+BAA+B,CAAC;IAChE,oCAAoC,CAAC,mCAAmC,CAAC;AAC1E,CAAA;;AClBD;;AAEG;;ACFH;;AAEG;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import {
|
2
|
+
import { Inject, Injectable, NgModule, makeEnvironmentProviders } from '@angular/core';
|
3
3
|
import { faker } from '@faker-js/faker/locale/en_US';
|
4
4
|
import { of } from 'rxjs';
|
5
5
|
import { daffUriTruncateLeadingSlash, daffUriTruncateQueryFragment } from '@daffodil/core/routing';
|
@@ -38,7 +38,7 @@ class DaffExternalRouterTestingDriver {
|
|
38
38
|
}
|
39
39
|
if ((typeof this.testingConfiguration[truncatedUrl]) === 'string') {
|
40
40
|
return of({
|
41
|
-
id: faker.
|
41
|
+
id: faker.string.uuid(),
|
42
42
|
url: truncatedUrl,
|
43
43
|
type: this.testingConfiguration[truncatedUrl],
|
44
44
|
code: 200,
|
@@ -46,10 +46,10 @@ class DaffExternalRouterTestingDriver {
|
|
46
46
|
}
|
47
47
|
return of(this.testingConfiguration[truncatedUrl]);
|
48
48
|
}
|
49
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
50
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
49
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterTestingDriver, deps: [{ token: DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
50
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterTestingDriver, providedIn: 'root' }); }
|
51
51
|
}
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterTestingDriver, decorators: [{
|
53
53
|
type: Injectable,
|
54
54
|
args: [{
|
55
55
|
providedIn: 'root',
|
@@ -73,11 +73,11 @@ class DaffExternalRouterDriverTestingModule {
|
|
73
73
|
],
|
74
74
|
};
|
75
75
|
}
|
76
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
77
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
78
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
76
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
77
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverTestingModule, imports: [CommonModule] }); }
|
78
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverTestingModule, imports: [CommonModule] }); }
|
79
79
|
}
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffExternalRouterDriverTestingModule, decorators: [{
|
81
81
|
type: NgModule,
|
82
82
|
args: [{
|
83
83
|
declarations: [],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-external-router-driver-testing.mjs","sources":["../../../libs/external-router/driver/testing/src/config.ts","../../../libs/external-router/driver/testing/src/testing.service.ts","../../../libs/external-router/driver/testing/src/testing.module.ts","../../../libs/external-router/driver/testing/src/provider.ts","../../../libs/external-router/driver/testing/src/public_api.ts","../../../libs/external-router/driver/testing/src/daffodil-external-router-driver-testing.ts"],"sourcesContent":["import { createConfigInjectionToken } from '@daffodil/core';\nimport {\n DaffExternallyResolvableUrl,\n DaffExternalRouteType,\n} from '@daffodil/external-router';\n\n/**\n * The configuration for the testing driver. It is a dictionary of \"url\": \"type\",\n * pairs, where the URL is a URL-safe routeable path, e.g. \"sweatshirts\" or \"t-shirts\"\n * and the type is a known type to your application, e.g. \"CATEGORY\".\n */\nexport interface DaffExternalRouterDriverTestingConfig {\n [url: string]: DaffExternalRouteType | DaffExternallyResolvableUrl;\n}\n\nexport const {\n /**\n * The token used by Daffodil to hold the driver's configuration.\n *\n * @docs-private\n */\n token: DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG,\n /**\n * Provider function for {@link DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG}.\n */\n provider: provideDaffExternalRouterDriverTestingConfig,\n} = createConfigInjectionToken<DaffExternalRouterDriverTestingConfig>(({}), 'DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG');\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n daffUriTruncateLeadingSlash,\n daffUriTruncateQueryFragment,\n} from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport {\n DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION,\n DaffExternalRouterDriverInterface,\n} from '@daffodil/external-router/driver';\n\nimport {\n DaffExternalRouterDriverTestingConfig,\n DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG,\n} from './config';\n\n/**\n * The DaffExternalRouterTestingDriver is responsible for translating an\n * arbitrary URI into a DaffExternallyResolvableUrl in testing environments.\n *\n * @inheritdoc\n *\n * @see {@link DaffExternalRouterTestingDriver}\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalRouterTestingDriver\nimplements DaffExternalRouterDriverInterface {\n constructor(\n @Inject(DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG)\n private testingConfiguration: DaffExternalRouterDriverTestingConfig = {},\n ) {}\n\n resolve(url: string): Observable<DaffExternallyResolvableUrl> {\n const truncatedUrl = daffUriTruncateLeadingSlash(daffUriTruncateQueryFragment(url));\n\n if (!this.testingConfiguration[truncatedUrl]) {\n return of(DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);\n }\n\n if((typeof this.testingConfiguration[truncatedUrl]) === 'string') {\n return of({\n id: faker.
|
1
|
+
{"version":3,"file":"daffodil-external-router-driver-testing.mjs","sources":["../../../libs/external-router/driver/testing/src/config.ts","../../../libs/external-router/driver/testing/src/testing.service.ts","../../../libs/external-router/driver/testing/src/testing.module.ts","../../../libs/external-router/driver/testing/src/provider.ts","../../../libs/external-router/driver/testing/src/public_api.ts","../../../libs/external-router/driver/testing/src/daffodil-external-router-driver-testing.ts"],"sourcesContent":["import { createConfigInjectionToken } from '@daffodil/core';\nimport {\n DaffExternallyResolvableUrl,\n DaffExternalRouteType,\n} from '@daffodil/external-router';\n\n/**\n * The configuration for the testing driver. It is a dictionary of \"url\": \"type\",\n * pairs, where the URL is a URL-safe routeable path, e.g. \"sweatshirts\" or \"t-shirts\"\n * and the type is a known type to your application, e.g. \"CATEGORY\".\n */\nexport interface DaffExternalRouterDriverTestingConfig {\n [url: string]: DaffExternalRouteType | DaffExternallyResolvableUrl;\n}\n\nexport const {\n /**\n * The token used by Daffodil to hold the driver's configuration.\n *\n * @docs-private\n */\n token: DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG,\n /**\n * Provider function for {@link DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG}.\n */\n provider: provideDaffExternalRouterDriverTestingConfig,\n} = createConfigInjectionToken<DaffExternalRouterDriverTestingConfig>(({}), 'DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG');\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n daffUriTruncateLeadingSlash,\n daffUriTruncateQueryFragment,\n} from '@daffodil/core/routing';\nimport { DaffExternallyResolvableUrl } from '@daffodil/external-router';\nimport {\n DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION,\n DaffExternalRouterDriverInterface,\n} from '@daffodil/external-router/driver';\n\nimport {\n DaffExternalRouterDriverTestingConfig,\n DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG,\n} from './config';\n\n/**\n * The DaffExternalRouterTestingDriver is responsible for translating an\n * arbitrary URI into a DaffExternallyResolvableUrl in testing environments.\n *\n * @inheritdoc\n *\n * @see {@link DaffExternalRouterTestingDriver}\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalRouterTestingDriver\nimplements DaffExternalRouterDriverInterface {\n constructor(\n @Inject(DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG)\n private testingConfiguration: DaffExternalRouterDriverTestingConfig = {},\n ) {}\n\n resolve(url: string): Observable<DaffExternallyResolvableUrl> {\n const truncatedUrl = daffUriTruncateLeadingSlash(daffUriTruncateQueryFragment(url));\n\n if (!this.testingConfiguration[truncatedUrl]) {\n return of(DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION);\n }\n\n if((typeof this.testingConfiguration[truncatedUrl]) === 'string') {\n return of({\n id: faker.string.uuid(),\n url: truncatedUrl,\n type: <string>this.testingConfiguration[truncatedUrl],\n code: 200,\n });\n }\n\n return of(<DaffExternallyResolvableUrl>this.testingConfiguration[truncatedUrl]);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport {\n DaffExternalRouterDriverTestingConfig,\n provideDaffExternalRouterDriverTestingConfig,\n} from './config';\nimport { DaffExternalRouterTestingDriver } from './testing.service';\n\n/**\n * The `DaffExternalRouterDriverTestingModule` is an importable NgModule that can\n * be used to configure the {@link DaffExternalRouterTestingDriver}.\n */\n@NgModule({\n declarations: [],\n imports: [CommonModule],\n})\nexport class DaffExternalRouterDriverTestingModule {\n static forRoot(\n config: DaffExternalRouterDriverTestingConfig,\n ): ModuleWithProviders<DaffExternalRouterDriverTestingModule> {\n return {\n ngModule: DaffExternalRouterDriverTestingModule,\n providers: [\n provideDaffExternalRouterDriver(DaffExternalRouterTestingDriver),\n provideDaffExternalRouterDriverTestingConfig(config),\n ],\n };\n }\n}\n","import {\n EnvironmentProviders,\n InjectionToken,\n makeEnvironmentProviders,\n} from '@angular/core';\n\nimport { provideDaffExternalRouterDriver } from '@daffodil/external-router/driver';\n\nimport {\n DaffExternalRouterDriverTestingConfig,\n provideDaffExternalRouterDriverTestingConfig,\n} from './config';\nimport { DaffExternalRouterTestingDriver } from './testing.service';\n\n/**\n * Provides a testing implementation of {@link DaffExternalRouterDriver}\n */\nexport const provideDaffExternalRouterTestingDriver = (config:\n DaffExternalRouterDriverTestingConfig | InjectionToken<DaffExternalRouterDriverTestingConfig>,\n): EnvironmentProviders => makeEnvironmentProviders([\n provideDaffExternalRouterDriver(DaffExternalRouterTestingDriver),\n provideDaffExternalRouterDriverTestingConfig(config),\n]);\n","/*\n * Public API Surface of @daffodil/external-router/driver/testing\n */\n\nexport { DaffExternalRouterTestingDriver } from './testing.service';\nexport { DaffExternalRouterDriverTestingModule } from './testing.module';\n\nexport { DaffExternalRouterDriverTestingConfig } from './config';\nexport { provideDaffExternalRouterTestingDriver } from './provider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAeO,MAAM;AACX;;;;AAIG;AACH,KAAK,EAAE,0CAA0C;AACjD;;AAEG;AACH,QAAQ,EAAE,4CAA4C,GACvD,GAAG,0BAA0B,EAAyC,EAAE,GAAG,4CAA4C,CAAC;;ACDzH;;;;;;;AAOG;MAIU,+BAA+B,CAAA;AAE1C,IAAA,WAAA,CAEU,uBAA8D,EAAE,EAAA;QAAhE,IAAoB,CAAA,oBAAA,GAApB,oBAAoB;;AAG9B,IAAA,OAAO,CAAC,GAAW,EAAA;QACjB,MAAM,YAAY,GAAG,2BAA2B,CAAC,4BAA4B,CAAC,GAAG,CAAC,CAAC;QAEnF,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,EAAE;AAC5C,YAAA,OAAO,EAAE,CAAC,yCAAyC,CAAC;;AAGtD,QAAA,IAAG,CAAC,OAAO,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,MAAM,QAAQ,EAAE;AAChE,YAAA,OAAO,EAAE,CAAC;AACR,gBAAA,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;AACvB,gBAAA,GAAG,EAAE,YAAY;AACjB,gBAAA,IAAI,EAAU,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC;AACrD,gBAAA,IAAI,EAAE,GAAG;AACV,aAAA,CAAC;;QAGJ,OAAO,EAAE,CAA8B,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC;;AAvBtE,uBAAA,SAAA,IAAA,CAAA,IAAA,G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EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qCAAqC,YAFtC,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAEX,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBAJjD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA;;;ACPD;;AAEG;AACU,MAAA,sCAAsC,GAAG,CAAC,MACyC,KACrE,wBAAwB,CAAC;IAClD,+BAA+B,CAAC,+BAA+B,CAAC;IAChE,4CAA4C,CAAC,MAAM,CAAC;AACrD,CAAA;;ACtBD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@daffodil/external-router","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/external-router"]}}},"version":"0.
|
1
|
+
{"name":"@daffodil/external-router","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/external-router"]}}},"version":"0.86.0","description":"A platform-agnostic package that connects the @angular/router with an external routing service (e.g. an API), allowing for runtime route resolution.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","peerDependencies":{"@angular/common":"^19.0.0","@angular/core":"^19.0.0","@angular/router":"^19.0.0","@daffodil/core":"0.86.0","rxjs":"7.8.1"},"optionalDependencies":{"apollo-angular":"^10.0.3","@daffodil/driver":"0.86.0"},"module":"fesm2022/daffodil-external-router.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-external-router.mjs"},"./driver":{"types":"./driver/index.d.ts","default":"./fesm2022/daffodil-external-router-driver.mjs"},"./routing":{"types":"./routing/index.d.ts","default":"./fesm2022/daffodil-external-router-routing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-testing.mjs"},"./driver/magento/2.4.1":{"types":"./driver/magento/2.4.1/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-magento-2.4.1.mjs"},"./driver/magento/2.4.2":{"types":"./driver/magento/2.4.2/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-magento-2.4.2.mjs"},"./driver/magento/2.4.3":{"types":"./driver/magento/2.4.3/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-magento-2.4.3.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
|