@daffodil/product-composite 0.58.10 → 0.59.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/driver/in-memory/package.json +1 -10
  2. package/driver/magento/package.json +1 -10
  3. package/driver/magento/testing/package.json +1 -10
  4. package/driver/testing/package.json +1 -10
  5. package/esm2020/helpers/build-selection-payload.mjs +10 -0
  6. package/esm2020/helpers/public_api.mjs +2 -0
  7. package/esm2020/models/public_api.mjs +5 -0
  8. package/esm2020/models/selection-payload.type.mjs +2 -0
  9. package/esm2020/public_api.mjs +3 -4
  10. package/esm2020/routing/config/default.mjs +8 -0
  11. package/esm2020/routing/config/interface.mjs +2 -0
  12. package/esm2020/routing/config/public_api.mjs +3 -0
  13. package/esm2020/routing/config/token.mjs +22 -0
  14. package/esm2020/routing/daffodil-product-composite-routing.mjs +5 -0
  15. package/esm2020/routing/effects/product-page.effects.mjs +67 -0
  16. package/esm2020/routing/effects/public_api.mjs +2 -0
  17. package/esm2020/routing/index.mjs +2 -0
  18. package/esm2020/routing/module.mjs +43 -0
  19. package/esm2020/routing/public_api.mjs +4 -0
  20. package/esm2020/routing/services/query-param.service.mjs +28 -0
  21. package/esm2020/state/actions/composite-product.actions.mjs +1 -1
  22. package/esm2020/testing/factories/composite-product-item-option.factory.mjs +32 -0
  23. package/esm2020/testing/factories/composite-product-item.factory.mjs +45 -0
  24. package/esm2020/testing/factories/composite-product.factory.mjs +11 -103
  25. package/esm2020/testing/factories/public_api.mjs +3 -1
  26. package/fesm2015/daffodil-product-composite-routing.mjs +158 -0
  27. package/fesm2015/daffodil-product-composite-routing.mjs.map +1 -0
  28. package/fesm2015/daffodil-product-composite-state.mjs.map +1 -1
  29. package/fesm2015/daffodil-product-composite-testing.mjs +76 -103
  30. package/fesm2015/daffodil-product-composite-testing.mjs.map +1 -1
  31. package/fesm2015/daffodil-product-composite.mjs +11 -1
  32. package/fesm2015/daffodil-product-composite.mjs.map +1 -1
  33. package/fesm2020/daffodil-product-composite-routing.mjs +159 -0
  34. package/fesm2020/daffodil-product-composite-routing.mjs.map +1 -0
  35. package/fesm2020/daffodil-product-composite-state.mjs.map +1 -1
  36. package/fesm2020/daffodil-product-composite-testing.mjs +76 -103
  37. package/fesm2020/daffodil-product-composite-testing.mjs.map +1 -1
  38. package/fesm2020/daffodil-product-composite.mjs +11 -1
  39. package/fesm2020/daffodil-product-composite.mjs.map +1 -1
  40. package/helpers/build-selection-payload.d.ts +2 -0
  41. package/helpers/public_api.d.ts +1 -0
  42. package/models/public_api.d.ts +4 -0
  43. package/models/selection-payload.type.d.ts +5 -0
  44. package/package.json +1 -124
  45. package/public_api.d.ts +2 -3
  46. package/routing/config/default.d.ts +6 -0
  47. package/routing/config/interface.d.ts +20 -0
  48. package/routing/config/public_api.d.ts +3 -0
  49. package/routing/config/token.d.ts +10 -0
  50. package/routing/daffodil-product-composite-routing.d.ts +5 -0
  51. package/routing/effects/product-page.effects.d.ts +22 -0
  52. package/routing/effects/public_api.d.ts +1 -0
  53. package/routing/index.d.ts +1 -0
  54. package/routing/module.d.ts +10 -0
  55. package/routing/package.json +1 -0
  56. package/routing/public_api.d.ts +3 -0
  57. package/routing/services/query-param.service.d.ts +13 -0
  58. package/state/actions/composite-product.actions.d.ts +1 -1
  59. package/state/package.json +1 -10
  60. package/state/testing/package.json +1 -10
  61. package/testing/factories/composite-product-item-option.factory.d.ts +19 -0
  62. package/testing/factories/composite-product-item.factory.d.ts +25 -0
  63. package/testing/factories/composite-product.factory.d.ts +6 -29
  64. package/testing/factories/public_api.d.ts +2 -0
  65. package/testing/package.json +1 -10
@@ -1,10 +1 @@
1
- {
2
- "name": "@daffodil/product-composite/state",
3
- "module": "../fesm2015/daffodil-product-composite-state.mjs",
4
- "es2020": "../fesm2020/daffodil-product-composite-state.mjs",
5
- "esm2020": "../esm2020/state/daffodil-product-composite-state.mjs",
6
- "fesm2020": "../fesm2020/daffodil-product-composite-state.mjs",
7
- "fesm2015": "../fesm2015/daffodil-product-composite-state.mjs",
8
- "typings": "daffodil-product-composite-state.d.ts",
9
- "sideEffects": false
10
- }
1
+ {"name":"@daffodil/product-composite/state","module":"../fesm2015/daffodil-product-composite-state.mjs","es2020":"../fesm2020/daffodil-product-composite-state.mjs","esm2020":"../esm2020/state/daffodil-product-composite-state.mjs","fesm2020":"../fesm2020/daffodil-product-composite-state.mjs","fesm2015":"../fesm2015/daffodil-product-composite-state.mjs","typings":"daffodil-product-composite-state.d.ts","sideEffects":false,"version":"0.59.1"}
@@ -1,10 +1 @@
1
- {
2
- "name": "@daffodil/product-composite/state/testing",
3
- "module": "../../fesm2015/daffodil-product-composite-state-testing.mjs",
4
- "es2020": "../../fesm2020/daffodil-product-composite-state-testing.mjs",
5
- "esm2020": "../../esm2020/state/testing/daffodil-product-composite-state-testing.mjs",
6
- "fesm2020": "../../fesm2020/daffodil-product-composite-state-testing.mjs",
7
- "fesm2015": "../../fesm2015/daffodil-product-composite-state-testing.mjs",
8
- "typings": "daffodil-product-composite-state-testing.d.ts",
9
- "sideEffects": false
10
- }
1
+ {"name":"@daffodil/product-composite/state/testing","module":"../../fesm2015/daffodil-product-composite-state-testing.mjs","es2020":"../../fesm2020/daffodil-product-composite-state-testing.mjs","esm2020":"../../esm2020/state/testing/daffodil-product-composite-state-testing.mjs","fesm2020":"../../fesm2020/daffodil-product-composite-state-testing.mjs","fesm2015":"../../fesm2015/daffodil-product-composite-state-testing.mjs","typings":"daffodil-product-composite-state-testing.d.ts","sideEffects":false,"version":"0.59.1"}
@@ -0,0 +1,19 @@
1
+ import { DaffModelFactory } from '@daffodil/core/testing';
2
+ import { DaffCompositeProductItemOption } from '@daffodil/product-composite';
3
+ import { MockProduct } from '@daffodil/product/testing';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Mocked DaffCompositeProductItemOption object.
7
+ */
8
+ export declare class MockCompositeProductItemOption extends MockProduct implements DaffCompositeProductItemOption {
9
+ quantity: number;
10
+ is_default: boolean;
11
+ }
12
+ /**
13
+ * Factory for creating DaffCompositeProductItemOptions.
14
+ */
15
+ export declare class DaffCompositeProductItemOptionFactory extends DaffModelFactory<DaffCompositeProductItemOption> {
16
+ constructor();
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCompositeProductItemOptionFactory, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffCompositeProductItemOptionFactory>;
19
+ }
@@ -0,0 +1,25 @@
1
+ import { DaffModelFactory } from '@daffodil/core/testing';
2
+ import { DaffCompositeProductItem, DaffCompositeProductItemInputEnum } from '@daffodil/product-composite';
3
+ import { DaffCompositeProductItemOptionFactory } from './composite-product-item-option.factory';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Mocked DaffCompositeProductItem object.
7
+ */
8
+ export declare class MockCompositeProductItem implements DaffCompositeProductItem {
9
+ protected optionFactory: DaffCompositeProductItemOptionFactory;
10
+ id: string;
11
+ url: string;
12
+ required: boolean;
13
+ title: string;
14
+ input_type: DaffCompositeProductItemInputEnum;
15
+ options: import("@daffodil/product-composite").DaffCompositeProductItemOption[];
16
+ constructor(optionFactory: DaffCompositeProductItemOptionFactory);
17
+ }
18
+ /**
19
+ * Factory for creating DaffCompositeProductItems.
20
+ */
21
+ export declare class DaffCompositeProductItemFactory extends DaffModelFactory<DaffCompositeProductItem> {
22
+ constructor(optionFactory: DaffCompositeProductItemOptionFactory);
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCompositeProductItemFactory, never>;
24
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffCompositeProductItemFactory>;
25
+ }
@@ -1,46 +1,23 @@
1
1
  import { DaffModelFactory } from '@daffodil/core/testing';
2
2
  import { DaffProductTypeEnum } from '@daffodil/product';
3
- import { DaffCompositeProduct, DaffCompositeProductItemInputEnum } from '@daffodil/product-composite';
3
+ import { DaffCompositeProduct } from '@daffodil/product-composite';
4
4
  import { MockProduct } from '@daffodil/product/testing';
5
+ import { DaffCompositeProductItemFactory } from './composite-product-item.factory';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
7
8
  * Mocked DaffCompositeProduct object.
8
- *
9
- * @deprecated import from @daffodil/product-composite/testing instead.
10
9
  */
11
10
  export declare class MockCompositeProduct extends MockProduct implements DaffCompositeProduct {
11
+ protected itemFactory: DaffCompositeProductItemFactory;
12
12
  type: DaffProductTypeEnum;
13
- items: {
14
- id: string;
15
- url: string;
16
- required: boolean;
17
- title: string;
18
- input_type: DaffCompositeProductItemInputEnum;
19
- options: {
20
- id: string;
21
- type: DaffProductTypeEnum;
22
- url: string;
23
- name: string;
24
- price: number;
25
- images: any[];
26
- thumbnail: any;
27
- discount: {
28
- amount: number;
29
- percent: number;
30
- };
31
- quantity: number;
32
- is_default: boolean;
33
- in_stock: boolean;
34
- related: any[];
35
- upsell: any[];
36
- }[];
37
- }[];
13
+ items: import("@daffodil/product-composite").DaffCompositeProductItem[];
14
+ constructor(itemFactory: DaffCompositeProductItemFactory);
38
15
  }
39
16
  /**
40
17
  * Factory for creating DaffCompositeProducts.
41
18
  */
42
19
  export declare class DaffCompositeProductFactory extends DaffModelFactory<DaffCompositeProduct> {
43
- constructor();
20
+ constructor(itemFactory: DaffCompositeProductItemFactory);
44
21
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffCompositeProductFactory, never>;
45
22
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffCompositeProductFactory>;
46
23
  }
@@ -1 +1,3 @@
1
1
  export * from './composite-product.factory';
2
+ export * from './composite-product-item.factory';
3
+ export * from './composite-product-item-option.factory';
@@ -1,10 +1 @@
1
- {
2
- "name": "@daffodil/product-composite/testing",
3
- "module": "../fesm2015/daffodil-product-composite-testing.mjs",
4
- "es2020": "../fesm2020/daffodil-product-composite-testing.mjs",
5
- "esm2020": "../esm2020/testing/daffodil-product-composite-testing.mjs",
6
- "fesm2020": "../fesm2020/daffodil-product-composite-testing.mjs",
7
- "fesm2015": "../fesm2015/daffodil-product-composite-testing.mjs",
8
- "typings": "daffodil-product-composite-testing.d.ts",
9
- "sideEffects": false
10
- }
1
+ {"name":"@daffodil/product-composite/testing","module":"../fesm2015/daffodil-product-composite-testing.mjs","es2020":"../fesm2020/daffodil-product-composite-testing.mjs","esm2020":"../esm2020/testing/daffodil-product-composite-testing.mjs","fesm2020":"../fesm2020/daffodil-product-composite-testing.mjs","fesm2015":"../fesm2015/daffodil-product-composite-testing.mjs","typings":"daffodil-product-composite-testing.d.ts","sideEffects":false,"version":"0.59.1"}