@daffodil/product-composite 0.75.0 → 0.77.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/esm2022/driver/in-memory/in-memory.module.mjs +5 -5
- package/esm2022/driver/magento/composite-product-driver.module.mjs +5 -5
- package/esm2022/driver/magento/testing/factories/bundle/bundle-item-option.factory.mjs +4 -4
- package/esm2022/driver/magento/testing/factories/bundle/bundle-item.factory.mjs +4 -4
- package/esm2022/driver/magento/testing/factories/bundle/bundle.factory.mjs +4 -4
- package/esm2022/driver/testing/testing.module.mjs +5 -5
- package/esm2022/helpers/build-selection-payload.mjs +1 -1
- package/esm2022/routing/effects/product-page.effects.mjs +4 -4
- package/esm2022/routing/module.mjs +5 -5
- package/esm2022/routing/services/query-param.service.mjs +4 -4
- package/esm2022/state/composite-product-state.module.mjs +5 -5
- package/esm2022/state/facades/composite-product/composite-product.facade.mjs +4 -4
- package/esm2022/state/reducers/composite-product-entities/composite-product-entities-reducer-adapter.mjs +1 -1
- package/esm2022/state/reducers/composite-product-entities/composite-product-entities.reducer.mjs +1 -1
- package/esm2022/state/reducers/ensure-items.meta-reducer.mjs +1 -1
- package/esm2022/state/selectors/composite-product/composite-product.selectors.mjs +1 -1
- package/esm2022/state/selectors/composite-product-entities/composite-product-entities.selectors.mjs +1 -1
- package/esm2022/state/testing/mock-composite-product-facade.mjs +4 -4
- package/esm2022/state/testing/product-testing.module.mjs +5 -5
- package/esm2022/testing/factories/composite-product-item-option.factory.mjs +4 -4
- package/esm2022/testing/factories/composite-product-item.factory.mjs +4 -4
- package/esm2022/testing/factories/composite-product.factory.mjs +4 -4
- package/fesm2022/daffodil-product-composite-driver-in-memory.mjs +4 -4
- package/fesm2022/daffodil-product-composite-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-driver-magento-testing.mjs +9 -9
- package/fesm2022/daffodil-product-composite-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-driver-magento.mjs +4 -4
- package/fesm2022/daffodil-product-composite-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-driver-testing.mjs +4 -4
- package/fesm2022/daffodil-product-composite-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-routing.mjs +10 -10
- package/fesm2022/daffodil-product-composite-routing.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-state-testing.mjs +7 -7
- package/fesm2022/daffodil-product-composite-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-state.mjs +7 -7
- package/fesm2022/daffodil-product-composite-state.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-testing.mjs +9 -9
- package/fesm2022/daffodil-product-composite-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite.mjs.map +1 -1
- package/package.json +1 -1
- package/state/reducers/injection-tokens/extra.token.d.ts +1 -1
- package/state/reducers/injection-tokens/reducers.token.d.ts +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-product-composite-testing.mjs","sources":["../../../libs/product-composite/testing/src/factories/composite-product-item-option.factory.ts","../../../libs/product-composite/testing/src/factories/composite-product-item.factory.ts","../../../libs/product-composite/testing/src/factories/composite-product.factory.ts","../../../libs/product-composite/testing/src/daffodil-product-composite-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffProductImageFactory,\n MockProduct,\n} from '@daffodil/product/testing';\nimport { DaffCompositeProductItemOption } from '@daffodil/product-composite';\n\n/**\n * Mocked DaffCompositeProductItemOption object.\n */\nexport class MockCompositeProductItemOption extends MockProduct implements DaffCompositeProductItemOption {\n quantity = faker.datatype.number({ min: 1, max: 9 });\n is_default = faker.datatype.boolean();\n}\n\n/**\n * Factory for creating DaffCompositeProductItemOptions.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCompositeProductItemOptionFactory extends DaffModelFactory<DaffCompositeProductItemOption>{\n constructor(\n imageFactory: DaffProductImageFactory,\n ) {\n super(MockCompositeProductItemOption, imageFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffCompositeProductItem,\n DaffCompositeProductItemInputEnum,\n} from '@daffodil/product-composite';\n\nimport { DaffCompositeProductItemOptionFactory } from './composite-product-item-option.factory';\n\n/**\n * Mocked DaffCompositeProductItem object.\n */\nexport class MockCompositeProductItem implements DaffCompositeProductItem {\n id = faker.datatype.uuid();\n url = `/${faker.internet.domainWord()}.html`;\n required = faker.datatype.boolean();\n title = faker.commerce.productName();\n input_type = DaffCompositeProductItemInputEnum.select;\n options = [\n this.optionFactory.create({\n is_default: true,\n }),\n this.optionFactory.create({\n is_default: false,\n }),\n ];\n\n constructor(\n protected optionFactory: DaffCompositeProductItemOptionFactory,\n ) {}\n}\n\n/**\n * Factory for creating DaffCompositeProductItems.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCompositeProductItemFactory extends DaffModelFactory<DaffCompositeProductItem>{\n constructor(\n optionFactory: DaffCompositeProductItemOptionFactory,\n ) {\n super(MockCompositeProductItem, optionFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffProductTypeEnum } from '@daffodil/product';\nimport {\n DaffProductImageFactory,\n MockProduct,\n} from '@daffodil/product/testing';\nimport { DaffCompositeProduct } from '@daffodil/product-composite';\n\nimport { DaffCompositeProductItemFactory } from './composite-product-item.factory';\n\n/**\n * Mocked DaffCompositeProduct object.\n */\nexport class MockCompositeProduct extends MockProduct implements DaffCompositeProduct {\n type = DaffProductTypeEnum.Composite;\n items = this.itemFactory.createMany(2);\n\n constructor(\n protected itemFactory: DaffCompositeProductItemFactory,\n imageFactory: DaffProductImageFactory,\n ) {\n super(imageFactory);\n }\n}\n\n/**\n * Factory for creating DaffCompositeProducts.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCompositeProductFactory extends DaffModelFactory<DaffCompositeProduct>{\n constructor(\n itemFactory: DaffCompositeProductItemFactory,\n imageFactory: DaffProductImageFactory,\n ) {\n super(MockCompositeProduct, itemFactory, imageFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffCompositeProductItemOptionFactory","i1.DaffCompositeProductItemFactory","i2"],"mappings":";;;;;;;;;AAUA;;AAEG;AACG,MAAO,8BAA+B,SAAQ,WAAW,CAAA;AAA/D,IAAA,WAAA,GAAA;;AACE,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACrD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;KACvC;AAAA,CAAA;AAED;;AAEG;AAIG,MAAO,qCAAsC,SAAQ,gBAAgD,CAAA;AACzG,IAAA,WAAA,CACE,YAAqC,EAAA;AAErC,QAAA,KAAK,CAAC,8BAA8B,EAAE,YAAY,CAAC,CAAC;KACrD;
|
1
|
+
{"version":3,"file":"daffodil-product-composite-testing.mjs","sources":["../../../libs/product-composite/testing/src/factories/composite-product-item-option.factory.ts","../../../libs/product-composite/testing/src/factories/composite-product-item.factory.ts","../../../libs/product-composite/testing/src/factories/composite-product.factory.ts","../../../libs/product-composite/testing/src/daffodil-product-composite-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffProductImageFactory,\n MockProduct,\n} from '@daffodil/product/testing';\nimport { DaffCompositeProductItemOption } from '@daffodil/product-composite';\n\n/**\n * Mocked DaffCompositeProductItemOption object.\n */\nexport class MockCompositeProductItemOption extends MockProduct implements DaffCompositeProductItemOption {\n quantity = faker.datatype.number({ min: 1, max: 9 });\n is_default = faker.datatype.boolean();\n}\n\n/**\n * Factory for creating DaffCompositeProductItemOptions.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCompositeProductItemOptionFactory extends DaffModelFactory<DaffCompositeProductItemOption>{\n constructor(\n imageFactory: DaffProductImageFactory,\n ) {\n super(MockCompositeProductItemOption, imageFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffCompositeProductItem,\n DaffCompositeProductItemInputEnum,\n} from '@daffodil/product-composite';\n\nimport { DaffCompositeProductItemOptionFactory } from './composite-product-item-option.factory';\n\n/**\n * Mocked DaffCompositeProductItem object.\n */\nexport class MockCompositeProductItem implements DaffCompositeProductItem {\n id = faker.datatype.uuid();\n url = `/${faker.internet.domainWord()}.html`;\n required = faker.datatype.boolean();\n title = faker.commerce.productName();\n input_type = DaffCompositeProductItemInputEnum.select;\n options = [\n this.optionFactory.create({\n is_default: true,\n }),\n this.optionFactory.create({\n is_default: false,\n }),\n ];\n\n constructor(\n protected optionFactory: DaffCompositeProductItemOptionFactory,\n ) {}\n}\n\n/**\n * Factory for creating DaffCompositeProductItems.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCompositeProductItemFactory extends DaffModelFactory<DaffCompositeProductItem>{\n constructor(\n optionFactory: DaffCompositeProductItemOptionFactory,\n ) {\n super(MockCompositeProductItem, optionFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffProductTypeEnum } from '@daffodil/product';\nimport {\n DaffProductImageFactory,\n MockProduct,\n} from '@daffodil/product/testing';\nimport { DaffCompositeProduct } from '@daffodil/product-composite';\n\nimport { DaffCompositeProductItemFactory } from './composite-product-item.factory';\n\n/**\n * Mocked DaffCompositeProduct object.\n */\nexport class MockCompositeProduct extends MockProduct implements DaffCompositeProduct {\n type = DaffProductTypeEnum.Composite;\n items = this.itemFactory.createMany(2);\n\n constructor(\n protected itemFactory: DaffCompositeProductItemFactory,\n imageFactory: DaffProductImageFactory,\n ) {\n super(imageFactory);\n }\n}\n\n/**\n * Factory for creating DaffCompositeProducts.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCompositeProductFactory extends DaffModelFactory<DaffCompositeProduct>{\n constructor(\n itemFactory: DaffCompositeProductItemFactory,\n imageFactory: DaffProductImageFactory,\n ) {\n super(MockCompositeProduct, itemFactory, imageFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffCompositeProductItemOptionFactory","i1.DaffCompositeProductItemFactory","i2"],"mappings":";;;;;;;;;AAUA;;AAEG;AACG,MAAO,8BAA+B,SAAQ,WAAW,CAAA;AAA/D,IAAA,WAAA,GAAA;;AACE,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACrD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;KACvC;AAAA,CAAA;AAED;;AAEG;AAIG,MAAO,qCAAsC,SAAQ,gBAAgD,CAAA;AACzG,IAAA,WAAA,CACE,YAAqC,EAAA;AAErC,QAAA,KAAK,CAAC,8BAA8B,EAAE,YAAY,CAAC,CAAC;KACrD;iIALU,qCAAqC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,uBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAArC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,q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BAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cAF1B,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAHvC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACjCD;;AAEG;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-product-composite.mjs","sources":["../../../libs/product-composite/src/helpers/build-selection-payload.ts","../../../libs/product-composite/src/models/composite-product-item.ts","../../../libs/product-composite/src/daffodil-product-composite.ts"],"sourcesContent":["import {\n DaffCompositeProductItem,\n DaffCompositeProductItemOption,\n DaffProductCompositeSelectionPayload,\n} from '../models/public_api';\n\nexport function daffProductCompositeBuildSelectionPayload(appliedOptions: Record<DaffCompositeProductItem['id'], DaffCompositeProductItemOption>): DaffProductCompositeSelectionPayload {\n return Object.keys(appliedOptions).reduce<DaffProductCompositeSelectionPayload>(\n (selection, itemId) => {\n const optionId = appliedOptions[itemId].id;\n\n if (optionId) {\n selection[itemId] = [optionId];\n }\n\n return selection;\n },\n {},\n );\n}\n","import { DaffIdentifiable } from '@daffodil/core';\nimport { DaffProduct } from '@daffodil/product';\n\n/**\n * An enum for whether a composite product item should be displayed as a radio or select input.\n */\nexport enum DaffCompositeProductItemInputEnum {\n select = 'select',\n radio = 'radio'\n}\n\n/**\n * The composite product item describes one set of product options that the user can add to the composite product.\n * A composite product item can be required or optional. If it is required, an option _must_ be chosen in order to add the product to the cart.\n * If the item is optional, the product can be added to the cart without an option having been chosen.\n * For example, if a composite product is a toolbox bundle, a composite product item might be a screw driver, and the options contained in that\n * item might be a phillips head and a flathead. The customer could choose to add either a phillips head or a flathead to the\n * composite product, or neither if the item is optional.\n */\nexport interface DaffCompositeProductItem extends DaffIdentifiable {\n /**\n * Whether the item is required or optional.\n */\n required: boolean;\n /**\n * The title label for the item.\n */\n title: string;\n /**\n * Describes how the item should be displayed.\n */\n input_type: DaffCompositeProductItemInputEnum;\n /**\n * The options that may be chosen for the item.\n */\n options: DaffCompositeProductItemOption[];\n}\n\n/**\n * The composite product item option is a DaffProduct that can be added to a composite product.\n */\nexport interface DaffCompositeProductItemOption extends DaffProduct {\n /**\n * Whether the option is the default option for its parent {@link DaffCompositeProductItem}.\n */\n is_default: boolean;\n /**\n * The quantity chosen for the option.\n */\n quantity: number;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAMM,SAAU,yCAAyC,CAAC,cAAsF,EAAA;AAC9I,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,CACvC,CAAC,SAAS,EAAE,MAAM,KAAI;QACpB,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;
|
1
|
+
{"version":3,"file":"daffodil-product-composite.mjs","sources":["../../../libs/product-composite/src/helpers/build-selection-payload.ts","../../../libs/product-composite/src/models/composite-product-item.ts","../../../libs/product-composite/src/daffodil-product-composite.ts"],"sourcesContent":["import {\n DaffCompositeProductItem,\n DaffCompositeProductItemOption,\n DaffProductCompositeSelectionPayload,\n} from '../models/public_api';\n\nexport function daffProductCompositeBuildSelectionPayload(appliedOptions: Record<DaffCompositeProductItem['id'], DaffCompositeProductItemOption>): DaffProductCompositeSelectionPayload {\n return Object.keys(appliedOptions).reduce<DaffProductCompositeSelectionPayload>(\n (selection, itemId) => {\n const optionId = appliedOptions[itemId].id;\n\n if (optionId) {\n selection[itemId] = [optionId];\n }\n\n return selection;\n },\n {},\n );\n}\n","import { DaffIdentifiable } from '@daffodil/core';\nimport { DaffProduct } from '@daffodil/product';\n\n/**\n * An enum for whether a composite product item should be displayed as a radio or select input.\n */\nexport enum DaffCompositeProductItemInputEnum {\n select = 'select',\n radio = 'radio'\n}\n\n/**\n * The composite product item describes one set of product options that the user can add to the composite product.\n * A composite product item can be required or optional. If it is required, an option _must_ be chosen in order to add the product to the cart.\n * If the item is optional, the product can be added to the cart without an option having been chosen.\n * For example, if a composite product is a toolbox bundle, a composite product item might be a screw driver, and the options contained in that\n * item might be a phillips head and a flathead. The customer could choose to add either a phillips head or a flathead to the\n * composite product, or neither if the item is optional.\n */\nexport interface DaffCompositeProductItem extends DaffIdentifiable {\n /**\n * Whether the item is required or optional.\n */\n required: boolean;\n /**\n * The title label for the item.\n */\n title: string;\n /**\n * Describes how the item should be displayed.\n */\n input_type: DaffCompositeProductItemInputEnum;\n /**\n * The options that may be chosen for the item.\n */\n options: DaffCompositeProductItemOption[];\n}\n\n/**\n * The composite product item option is a DaffProduct that can be added to a composite product.\n */\nexport interface DaffCompositeProductItemOption extends DaffProduct {\n /**\n * Whether the option is the default option for its parent {@link DaffCompositeProductItem}.\n */\n is_default: boolean;\n /**\n * The quantity chosen for the option.\n */\n quantity: number;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAMM,SAAU,yCAAyC,CAAC,cAAsF,EAAA;AAC9I,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,CACvC,CAAC,SAAS,EAAE,MAAM,KAAI;QACpB,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAE3C,IAAI,QAAQ,EAAE;AACZ,YAAA,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAChC;AAED,QAAA,OAAO,SAAS,CAAC;KAClB,EACD,EAAE,CACH,CAAC;AACJ;;AChBA;;AAEG;IACS,kCAGX;AAHD,CAAA,UAAY,iCAAiC,EAAA;AAC3C,IAAA,iCAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,iCAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACjB,CAAC,EAHW,iCAAiC,KAAjC,iCAAiC,GAG5C,EAAA,CAAA,CAAA;;ACTD;;AAEG;;;;"}
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@daffodil/product-composite","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/product-composite"]}}},"version":"0.
|
1
|
+
{"name":"@daffodil/product-composite","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/product-composite"]}}},"version":"0.77.0","description":"Interfaces built for daffodil/state","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"publishConfig":{"directory":"../../dist/product-composite"},"homepage":"https://github.com/graycoreio/daffodil","peerDependencies":{"@angular/common":"^18.2.2","@angular/core":"^18.2.2","@daffodil/core":"0.77.0","@daffodil/product":"0.77.0","@ngrx/effects":"^18.0.2","@ngrx/entity":"^18.0.2","@ngrx/store":"^18.0.2","rxjs":"7.8.1"},"optionalDependencies":{"@apollo/client":"^3.0.0","@daffodil/driver":"0.77.0","@daffodil/product":"0.77.0","angular-in-memory-web-api":"^0.18.0","apollo-angular":"^7.1.2","@faker-js/faker":"^7.6.0"},"module":"fesm2022/daffodil-product-composite.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/daffodil-product-composite.mjs","esm":"./esm2022/daffodil-product-composite.mjs","default":"./fesm2022/daffodil-product-composite.mjs"},"./routing":{"types":"./routing/index.d.ts","esm2022":"./esm2022/routing/daffodil-product-composite-routing.mjs","esm":"./esm2022/routing/daffodil-product-composite-routing.mjs","default":"./fesm2022/daffodil-product-composite-routing.mjs"},"./state":{"types":"./state/index.d.ts","esm2022":"./esm2022/state/daffodil-product-composite-state.mjs","esm":"./esm2022/state/daffodil-product-composite-state.mjs","default":"./fesm2022/daffodil-product-composite-state.mjs"},"./testing":{"types":"./testing/index.d.ts","esm2022":"./esm2022/testing/daffodil-product-composite-testing.mjs","esm":"./esm2022/testing/daffodil-product-composite-testing.mjs","default":"./fesm2022/daffodil-product-composite-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","esm2022":"./esm2022/driver/in-memory/daffodil-product-composite-driver-in-memory.mjs","esm":"./esm2022/driver/in-memory/daffodil-product-composite-driver-in-memory.mjs","default":"./fesm2022/daffodil-product-composite-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","esm2022":"./esm2022/driver/magento/daffodil-product-composite-driver-magento.mjs","esm":"./esm2022/driver/magento/daffodil-product-composite-driver-magento.mjs","default":"./fesm2022/daffodil-product-composite-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","esm2022":"./esm2022/driver/testing/daffodil-product-composite-driver-testing.mjs","esm":"./esm2022/driver/testing/daffodil-product-composite-driver-testing.mjs","default":"./fesm2022/daffodil-product-composite-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","esm2022":"./esm2022/state/testing/daffodil-product-composite-state-testing.mjs","esm":"./esm2022/state/testing/daffodil-product-composite-state-testing.mjs","default":"./fesm2022/daffodil-product-composite-state-testing.mjs"},"./driver/magento/testing":{"types":"./driver/magento/testing/index.d.ts","esm2022":"./esm2022/driver/magento/testing/daffodil-product-composite-driver-magento-testing.mjs","esm":"./esm2022/driver/magento/testing/daffodil-product-composite-driver-magento-testing.mjs","default":"./fesm2022/daffodil-product-composite-driver-magento-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
|
@@ -6,7 +6,7 @@ import { DaffCompositeProductReducersState } from '../composite-product-reducers
|
|
6
6
|
*
|
7
7
|
* Prefer using {@link daffProductCompositeProvideExtraReducers}.
|
8
8
|
*/
|
9
|
-
export declare const DAFF_PRODUCT_COMPOSITE_EXTRA_REDUCERS: InjectionToken<ActionReducer<DaffCompositeProductReducersState, import("@ngrx/store").Action
|
9
|
+
export declare const DAFF_PRODUCT_COMPOSITE_EXTRA_REDUCERS: InjectionToken<ActionReducer<DaffCompositeProductReducersState, import("@ngrx/store").Action<string>>[]>;
|
10
10
|
/**
|
11
11
|
* Provides additional reducers that run after the standard Daffodil cart reducers.
|
12
12
|
*
|
@@ -7,4 +7,4 @@ import { DaffCompositeProductReducersState } from '../composite-product-reducers
|
|
7
7
|
*
|
8
8
|
* @docs-private
|
9
9
|
*/
|
10
|
-
export declare const DAFF_PRODUCT_COMPOSITE_REDUCERS: InjectionToken<ActionReducer<DaffCompositeProductReducersState, import("@ngrx/store").Action
|
10
|
+
export declare const DAFF_PRODUCT_COMPOSITE_REDUCERS: InjectionToken<ActionReducer<DaffCompositeProductReducersState, import("@ngrx/store").Action<string>>>;
|