-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(navigation)!: standardize magento driver config (#2784)
BREAKING CHANGE: `MagentoNavigationDriverConfiguration` -> `MagentoNavigationDriverConfig`
- Loading branch information
Showing
9 changed files
with
62 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { MagentoNavigationDriverConfig } from './interface'; | ||
|
||
/** | ||
* The default configuration for the {@link MagentoNavigationDriverConfig}. | ||
*/ | ||
export const MAGENTO_NAVIGATION_DRIVER_CONFIG_DEFAULT: MagentoNavigationDriverConfig = { | ||
navigationTreeQueryDepth: 3, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
/** | ||
* An interface for providing @daffodil/search/state with necessary config values. | ||
*/ | ||
export interface MagentoNavigationDriverConfig { | ||
/** | ||
* The maximum depth of category children that the navigation driver will query. | ||
* Defaults to 3. | ||
*/ | ||
navigationTreeQueryDepth: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export { MAGENTO_NAVIGATION_DRIVER_CONFIG_DEFAULT } from './default'; | ||
export { MagentoNavigationDriverConfig } from './interface'; | ||
export * from './token'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { createConfigInjectionToken } from '@daffodil/core'; | ||
|
||
import { MAGENTO_NAVIGATION_DRIVER_CONFIG_DEFAULT } from './default'; | ||
import { MagentoNavigationDriverConfig } from './interface'; | ||
|
||
export const { | ||
/** | ||
* The token used to provide @daffodil/navigation/driver/magento config data. | ||
*/ | ||
token: MAGENTO_NAVIGATION_DRIVER_CONFIG, | ||
/** | ||
* Provider function for {@link MAGENTO_NAVIGATION_DRIVER_CONFIG}. | ||
*/ | ||
provider: provideMagentoNavigationDriverConfig, | ||
} = createConfigInjectionToken<MagentoNavigationDriverConfig>( | ||
MAGENTO_NAVIGATION_DRIVER_CONFIG_DEFAULT, | ||
'MAGENTO_NAVIGATION_DRIVER_CONFIG', | ||
); |
12 changes: 0 additions & 12 deletions
12
libs/navigation/driver/magento/src/interfaces/navigation-config.interface.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
export { | ||
MAGENTO_NAVIGATION_TREE_QUERY_DEPTH, | ||
MagentoNavigationDriverConfiguration, | ||
} from './interfaces/navigation-config.interface'; | ||
export { | ||
DaffNavigationMagentoDriverModule, | ||
MAGENTO_NAVIGATION_DEFAULT_CONFIGURATION, | ||
} from './navigation-driver.module'; | ||
export { DaffNavigationMagentoDriverModule } from './navigation-driver.module'; | ||
export { DaffMagentoNavigationService } from './navigation.service'; | ||
export { DaffMagentoNavigationTransformerService } from './transformers/navigation-transformer'; | ||
export * from './queries/get-category-tree'; | ||
export * from './config/public_api'; | ||
export * from './models/public_api'; | ||
export * from './transforms/public_api'; |