@daffodil/checkout 0.39.13 → 0.42.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.
Files changed (158) hide show
  1. package/billing/billing-state.module.d.ts +5 -0
  2. package/billing/billing.module.d.ts +7 -0
  3. package/billing/containers/billing.component.d.ts +3 -0
  4. package/billing/facades/billing.facade.d.ts +3 -0
  5. package/checkout.module.d.ts +9 -0
  6. package/daffodil-checkout.d.ts +1 -7
  7. package/{esm2015/billing/actions/billing.actions.js → esm2020/billing/actions/billing.actions.mjs} +0 -0
  8. package/esm2020/billing/billing-state.module.mjs +21 -0
  9. package/esm2020/billing/billing.module.mjs +39 -0
  10. package/esm2020/billing/containers/billing.component.mjs +36 -0
  11. package/esm2020/billing/facades/billing.facade.mjs +34 -0
  12. package/{esm2015/billing/reducers/billing/billing-reducer.interface.js → esm2020/billing/reducers/billing/billing-reducer.interface.mjs} +0 -0
  13. package/esm2020/billing/reducers/billing/billing.reducer.mjs +19 -0
  14. package/{esm2015/billing/reducers/billing-reducers.interface.js → esm2020/billing/reducers/billing-reducers.interface.mjs} +0 -0
  15. package/{esm2015/billing/reducers/billing-reducers.js → esm2020/billing/reducers/billing-reducers.mjs} +0 -0
  16. package/{esm2015/billing/selectors/billing.selector.js → esm2020/billing/selectors/billing.selector.mjs} +5 -10
  17. package/esm2020/checkout.module.mjs +47 -0
  18. package/esm2020/daffodil-checkout.mjs +5 -0
  19. package/{esm2015/drivers/injection-tokens/driver-checkout.token.js → esm2020/drivers/injection-tokens/driver-checkout.token.mjs} +0 -0
  20. package/{esm2015/drivers/injection-tokens/payment-driver.token.js → esm2020/drivers/injection-tokens/payment-driver.token.mjs} +0 -0
  21. package/{esm2015/drivers/injection-tokens/payment-transformer.token.js → esm2020/drivers/injection-tokens/payment-transformer.token.mjs} +0 -0
  22. package/{esm2015/drivers/interfaces/checkout-service.interface.js → esm2020/drivers/interfaces/checkout-service.interface.mjs} +0 -0
  23. package/{esm2015/drivers/interfaces/order-service.interface.js → esm2020/drivers/interfaces/order-service.interface.mjs} +0 -0
  24. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  25. package/{esm2015/models/cart-process-request.js → esm2020/models/cart-process-request.mjs} +1 -1
  26. package/{esm2015/models/order/order-address.js → esm2020/models/order/order-address.mjs} +0 -0
  27. package/{esm2015/models/order/order-item.js → esm2020/models/order/order-item.mjs} +0 -0
  28. package/{esm2015/models/order/order-payment.js → esm2020/models/order/order-payment.mjs} +0 -0
  29. package/{esm2015/models/order/order-shipping-rate.js → esm2020/models/order/order-shipping-rate.mjs} +0 -0
  30. package/{esm2015/models/order/order.js → esm2020/models/order/order.mjs} +0 -0
  31. package/{esm2015/models/payment/payment-info.js → esm2020/models/payment/payment-info.mjs} +1 -1
  32. package/{esm2015/models/shipping/shipping-option.js → esm2020/models/shipping/shipping-option.mjs} +1 -1
  33. package/{esm2015/models/shipping/shipping-rate.js → esm2020/models/shipping/shipping-rate.mjs} +1 -1
  34. package/{esm2015/order/actions/order.actions.js → esm2020/order/actions/order.actions.mjs} +0 -0
  35. package/esm2020/order/containers/order.component.mjs +28 -0
  36. package/esm2020/order/effects/order.effects.mjs +28 -0
  37. package/esm2020/order/facades/order.facade.mjs +37 -0
  38. package/esm2020/order/order-state.module.mjs +33 -0
  39. package/esm2020/order/order.module.mjs +42 -0
  40. package/{esm2015/order/reducers/order/order-reducer.interface.js → esm2020/order/reducers/order/order-reducer.interface.mjs} +0 -0
  41. package/esm2020/order/reducers/order/order.reducer.mjs +25 -0
  42. package/{esm2015/order/reducers/order-reducers.interface.js → esm2020/order/reducers/order-reducers.interface.mjs} +0 -0
  43. package/{esm2015/order/reducers/order-reducers.js → esm2020/order/reducers/order-reducers.mjs} +0 -0
  44. package/{esm2015/order/selectors/order.selector.js → esm2020/order/selectors/order.selector.mjs} +5 -10
  45. package/{esm2015/payment/actions/payment.actions.js → esm2020/payment/actions/payment.actions.mjs} +0 -0
  46. package/esm2020/payment/facades/payment.facade.mjs +32 -0
  47. package/esm2020/payment/payment-state.module.mjs +21 -0
  48. package/esm2020/payment/payment.module.mjs +32 -0
  49. package/{esm2015/payment/reducers/payment/payment-reducer.interface.js → esm2020/payment/reducers/payment/payment-reducer.interface.mjs} +0 -0
  50. package/esm2020/payment/reducers/payment/payment.reducer.mjs +13 -0
  51. package/{esm2015/payment/reducers/payment-reducers.interface.js → esm2020/payment/reducers/payment-reducers.interface.mjs} +0 -0
  52. package/{esm2015/payment/reducers/payment-reducers.js → esm2020/payment/reducers/payment-reducers.mjs} +0 -0
  53. package/{esm2015/payment/selectors/payment.selector.js → esm2020/payment/selectors/payment.selector.mjs} +3 -6
  54. package/{esm2015/shipping/actions/shipping.actions.js → esm2020/shipping/actions/shipping.actions.mjs} +0 -0
  55. package/esm2020/shipping/containers/shipping.component.mjs +33 -0
  56. package/esm2020/shipping/facades/shipping.facade.mjs +34 -0
  57. package/{esm2015/shipping/reducers/shipping/shipping-reducer.interface.js → esm2020/shipping/reducers/shipping/shipping-reducer.interface.mjs} +0 -0
  58. package/esm2020/shipping/reducers/shipping/shipping.reducer.mjs +16 -0
  59. package/{esm2015/shipping/reducers/shipping-reducers.interface.js → esm2020/shipping/reducers/shipping-reducers.interface.mjs} +0 -0
  60. package/{esm2015/shipping/reducers/shipping-reducers.js → esm2020/shipping/reducers/shipping-reducers.mjs} +0 -0
  61. package/{esm2015/shipping/selectors/shipping.selectors.js → esm2020/shipping/selectors/shipping.selectors.mjs} +5 -10
  62. package/esm2020/shipping/shipping-state.module.mjs +21 -0
  63. package/esm2020/shipping/shipping.module.mjs +39 -0
  64. package/{esm2015/testing/daffodil-checkout-testing.js → esm2020/testing/daffodil-checkout-testing.mjs} +0 -0
  65. package/esm2020/testing/drivers/in-memory/checkout-driver.module.mjs +32 -0
  66. package/esm2020/testing/drivers/in-memory/checkout.service.mjs +22 -0
  67. package/esm2020/testing/drivers/testing/checkout-driver.module.mjs +32 -0
  68. package/esm2020/testing/drivers/testing/checkout.service.mjs +25 -0
  69. package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
  70. package/{esm2015/testing/inmemory-backend/checkout.service.js → esm2020/testing/inmemory-backend/checkout.service.mjs} +9 -13
  71. package/{esm2015/testing/order/factories/order-address.factory.js → esm2020/testing/order/factories/order-address.factory.mjs} +9 -9
  72. package/{esm2015/testing/order/factories/order-item.factory.js → esm2020/testing/order/factories/order-item.factory.mjs} +9 -9
  73. package/{esm2015/testing/order/factories/order-payment.factory.js → esm2020/testing/order/factories/order-payment.factory.mjs} +9 -9
  74. package/{esm2015/testing/order/factories/order-shipping-rate.factory.js → esm2020/testing/order/factories/order-shipping-rate.factory.mjs} +9 -9
  75. package/{esm2015/testing/order/factories/order.factory.js → esm2020/testing/order/factories/order.factory.mjs} +9 -9
  76. package/esm2020/testing/payment/factories/payment.factory.mjs +26 -0
  77. package/esm2020/testing/shipping/factories/shipping-option.factory.mjs +24 -0
  78. package/esm2020/testing/shipping/factories/shipping-rate.factory.mjs +29 -0
  79. package/fesm2015/daffodil-checkout-testing.mjs +429 -0
  80. package/fesm2015/daffodil-checkout-testing.mjs.map +1 -0
  81. package/fesm2015/daffodil-checkout.mjs +740 -0
  82. package/fesm2015/daffodil-checkout.mjs.map +1 -0
  83. package/fesm2020/daffodil-checkout-testing.mjs +429 -0
  84. package/fesm2020/daffodil-checkout-testing.mjs.map +1 -0
  85. package/fesm2020/daffodil-checkout.mjs +738 -0
  86. package/fesm2020/daffodil-checkout.mjs.map +1 -0
  87. package/order/containers/order.component.d.ts +3 -0
  88. package/order/effects/order.effects.d.ts +3 -0
  89. package/order/facades/order.facade.d.ts +3 -0
  90. package/order/order-state.module.d.ts +6 -0
  91. package/order/order.module.d.ts +7 -0
  92. package/package.json +38 -18
  93. package/payment/facades/payment.facade.d.ts +3 -0
  94. package/payment/payment-state.module.d.ts +5 -0
  95. package/payment/payment.module.d.ts +6 -0
  96. package/payment/selectors/payment.selector.d.ts +1 -1
  97. package/shipping/containers/shipping.component.d.ts +3 -0
  98. package/shipping/facades/shipping.facade.d.ts +3 -0
  99. package/shipping/shipping-state.module.d.ts +5 -0
  100. package/shipping/shipping.module.d.ts +7 -0
  101. package/testing/daffodil-checkout-testing.d.ts +1 -0
  102. package/testing/drivers/in-memory/checkout-driver.module.d.ts +5 -0
  103. package/testing/drivers/in-memory/checkout.service.d.ts +3 -0
  104. package/testing/drivers/testing/checkout-driver.module.d.ts +5 -0
  105. package/testing/drivers/testing/checkout.service.d.ts +3 -0
  106. package/testing/inmemory-backend/checkout.service.d.ts +3 -0
  107. package/testing/order/factories/order-address.factory.d.ts +3 -0
  108. package/testing/order/factories/order-item.factory.d.ts +3 -0
  109. package/testing/order/factories/order-payment.factory.d.ts +3 -0
  110. package/testing/order/factories/order-shipping-rate.factory.d.ts +3 -0
  111. package/testing/order/factories/order.factory.d.ts +3 -0
  112. package/testing/package.json +5 -6
  113. package/testing/payment/factories/payment.factory.d.ts +3 -0
  114. package/testing/shipping/factories/shipping-option.factory.d.ts +3 -0
  115. package/testing/shipping/factories/shipping-rate.factory.d.ts +3 -0
  116. package/bundles/daffodil-checkout-testing.umd.js +0 -789
  117. package/bundles/daffodil-checkout-testing.umd.js.map +0 -1
  118. package/bundles/daffodil-checkout-testing.umd.min.js +0 -16
  119. package/bundles/daffodil-checkout-testing.umd.min.js.map +0 -1
  120. package/bundles/daffodil-checkout.umd.js +0 -1078
  121. package/bundles/daffodil-checkout.umd.js.map +0 -1
  122. package/bundles/daffodil-checkout.umd.min.js +0 -16
  123. package/bundles/daffodil-checkout.umd.min.js.map +0 -1
  124. package/daffodil-checkout.metadata.json +0 -1
  125. package/esm2015/billing/billing-state.module.js +0 -13
  126. package/esm2015/billing/billing.module.js +0 -24
  127. package/esm2015/billing/containers/billing.component.js +0 -35
  128. package/esm2015/billing/facades/billing.facade.js +0 -37
  129. package/esm2015/billing/reducers/billing/billing.reducer.js +0 -19
  130. package/esm2015/checkout.module.js +0 -26
  131. package/esm2015/daffodil-checkout.js +0 -11
  132. package/esm2015/order/containers/order.component.js +0 -27
  133. package/esm2015/order/effects/order.effects.js +0 -31
  134. package/esm2015/order/facades/order.facade.js +0 -40
  135. package/esm2015/order/order-state.module.js +0 -21
  136. package/esm2015/order/order.module.js +0 -27
  137. package/esm2015/order/reducers/order/order.reducer.js +0 -25
  138. package/esm2015/payment/facades/payment.facade.js +0 -35
  139. package/esm2015/payment/payment-state.module.js +0 -13
  140. package/esm2015/payment/payment.module.js +0 -17
  141. package/esm2015/payment/reducers/payment/payment.reducer.js +0 -13
  142. package/esm2015/shipping/containers/shipping.component.js +0 -32
  143. package/esm2015/shipping/facades/shipping.facade.js +0 -37
  144. package/esm2015/shipping/reducers/shipping/shipping.reducer.js +0 -16
  145. package/esm2015/shipping/shipping-state.module.js +0 -13
  146. package/esm2015/shipping/shipping.module.js +0 -24
  147. package/esm2015/testing/drivers/in-memory/checkout-driver.module.js +0 -25
  148. package/esm2015/testing/drivers/in-memory/checkout.service.js +0 -24
  149. package/esm2015/testing/drivers/testing/checkout-driver.module.js +0 -25
  150. package/esm2015/testing/drivers/testing/checkout.service.js +0 -28
  151. package/esm2015/testing/payment/factories/payment.factory.js +0 -26
  152. package/esm2015/testing/shipping/factories/shipping-option.factory.js +0 -24
  153. package/esm2015/testing/shipping/factories/shipping-rate.factory.js +0 -29
  154. package/fesm2015/daffodil-checkout-testing.js +0 -425
  155. package/fesm2015/daffodil-checkout-testing.js.map +0 -1
  156. package/fesm2015/daffodil-checkout.js +0 -662
  157. package/fesm2015/daffodil-checkout.js.map +0 -1
  158. package/testing/daffodil-checkout-testing.metadata.json +0 -1
@@ -0,0 +1,740 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, NgModule, Injectable, InjectionToken, Inject } from '@angular/core';
3
+ import * as i1 from '@ngrx/store';
4
+ import { createFeatureSelector, createSelector, select, StoreModule } from '@ngrx/store';
5
+ import { CommonModule } from '@angular/common';
6
+ import * as i1$1 from '@ngrx/effects';
7
+ import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
8
+ import { of } from 'rxjs';
9
+ import { switchMap, map, catchError } from 'rxjs/operators';
10
+
11
+ var DaffShippingActionTypes;
12
+ (function (DaffShippingActionTypes) {
13
+ DaffShippingActionTypes["UpdateShippingAddressAction"] = "[Shipping] Update Shipping Address Action";
14
+ DaffShippingActionTypes["SelectShippingOptionAction"] = "[Shipping] Select Shipping Option Action";
15
+ })(DaffShippingActionTypes || (DaffShippingActionTypes = {}));
16
+ class DaffUpdateShippingAddress {
17
+ constructor(payload) {
18
+ this.payload = payload;
19
+ this.type = DaffShippingActionTypes.UpdateShippingAddressAction;
20
+ }
21
+ }
22
+ class DaffSelectShippingOption {
23
+ constructor(payload) {
24
+ this.payload = payload;
25
+ this.type = DaffShippingActionTypes.SelectShippingOptionAction;
26
+ }
27
+ }
28
+
29
+ /**
30
+ * Shipping Feature State
31
+ */
32
+ const selectShippingFeatureState = createFeatureSelector('shipping');
33
+ /**
34
+ * Shipping State
35
+ */
36
+ const selectShippingState = createSelector(selectShippingFeatureState, (state) => state.shipping);
37
+ const selectShippingAddress = createSelector(selectShippingState, (state) => state.shippingAddress);
38
+ const selectShippingOptionId = createSelector(selectShippingState, (state) => state.selectedShippingOptionId);
39
+ const selectIsShippingAddressValid = createSelector(selectShippingAddress, (state) => !!state);
40
+
41
+ class ShippingContainer {
42
+ constructor(store) {
43
+ this.store = store;
44
+ }
45
+ ngOnInit() {
46
+ this.shippingAddress$ = this.store.pipe(select(selectShippingAddress));
47
+ this.selectedShippingOptionId$ = this.store.pipe(select(selectShippingOptionId));
48
+ this.isShippingAddressValid$ = this.store.pipe(select(selectIsShippingAddressValid));
49
+ }
50
+ updateShippingAddress(address) {
51
+ this.store.dispatch(new DaffUpdateShippingAddress(address));
52
+ }
53
+ selectShippingOption(optionId) {
54
+ this.store.dispatch(new DaffSelectShippingOption(optionId));
55
+ }
56
+ }
57
+ /** @nocollapse */ /** @nocollapse */ ShippingContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: ShippingContainer, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component });
58
+ /** @nocollapse */ /** @nocollapse */ ShippingContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: ShippingContainer, selector: "[shipping-container]", exportAs: ["ShippingContainer"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: ShippingContainer, decorators: [{
60
+ type: Component,
61
+ args: [{
62
+ selector: '[shipping-container]',
63
+ template: '<ng-content></ng-content>',
64
+ exportAs: 'ShippingContainer',
65
+ }]
66
+ }], ctorParameters: function () { return [{ type: i1.Store }]; } });
67
+
68
+ /**
69
+ * Order Feature State
70
+ *
71
+ * @deprecated
72
+ */
73
+ const selectOrderFeatureState = createFeatureSelector('order');
74
+ /**
75
+ * Order State
76
+ *
77
+ * @deprecated
78
+ */
79
+ const selectOrderState = createSelector(selectOrderFeatureState, (state) => state.order);
80
+ /**
81
+ * @deprecated
82
+ */
83
+ const selectOrder = createSelector(selectOrderState, (state) => state.order);
84
+ /**
85
+ * @deprecated
86
+ */
87
+ const selectLoading = createSelector(selectOrderState, (state) => state.loading);
88
+ /**
89
+ * @deprecated
90
+ */
91
+ const selectErrors = createSelector(selectOrderState, (state) => state.errors);
92
+
93
+ /**
94
+ * @deprecated
95
+ */
96
+ class OrderContainer {
97
+ constructor(store) {
98
+ this.store = store;
99
+ }
100
+ ngOnInit() {
101
+ this.order$ = this.store.pipe(select(selectOrder));
102
+ this.loading$ = this.store.pipe(select(selectLoading));
103
+ }
104
+ }
105
+ /** @nocollapse */ /** @nocollapse */ OrderContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: OrderContainer, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component });
106
+ /** @nocollapse */ /** @nocollapse */ OrderContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: OrderContainer, selector: "[order-container]", exportAs: ["OrderContainer"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: OrderContainer, decorators: [{
108
+ type: Component,
109
+ args: [{
110
+ selector: '[order-container]',
111
+ template: '<ng-content></ng-content>',
112
+ exportAs: 'OrderContainer',
113
+ }]
114
+ }], ctorParameters: function () { return [{ type: i1.Store }]; } });
115
+
116
+ var DaffPaymentActionTypes;
117
+ (function (DaffPaymentActionTypes) {
118
+ DaffPaymentActionTypes["UpdatePaymentInfoAction"] = "[Payment] Update Payment Info Action";
119
+ })(DaffPaymentActionTypes || (DaffPaymentActionTypes = {}));
120
+ class DaffUpdatePaymentInfo$1 {
121
+ constructor(payload) {
122
+ this.payload = payload;
123
+ this.type = DaffPaymentActionTypes.UpdatePaymentInfoAction;
124
+ }
125
+ }
126
+
127
+ const initialState$3 = {
128
+ paymentInfo: null,
129
+ };
130
+ function daffPaymentReducer(state = initialState$3, action) {
131
+ switch (action.type) {
132
+ case DaffPaymentActionTypes.UpdatePaymentInfoAction:
133
+ return Object.assign(Object.assign({}, state), { paymentInfo: action.payload });
134
+ default:
135
+ return state;
136
+ }
137
+ }
138
+
139
+ const daffPaymentReducers = {
140
+ payment: daffPaymentReducer,
141
+ };
142
+
143
+ class DaffPaymentStateModule {
144
+ }
145
+ /** @nocollapse */ /** @nocollapse */ DaffPaymentStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
146
+ /** @nocollapse */ /** @nocollapse */ DaffPaymentStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentStateModule, imports: [i1.StoreFeatureModule] });
147
+ /** @nocollapse */ /** @nocollapse */ DaffPaymentStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentStateModule, imports: [[
148
+ StoreModule.forFeature('payment', daffPaymentReducers),
149
+ ]] });
150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentStateModule, decorators: [{
151
+ type: NgModule,
152
+ args: [{
153
+ imports: [
154
+ StoreModule.forFeature('payment', daffPaymentReducers),
155
+ ],
156
+ }]
157
+ }] });
158
+
159
+ class DaffPaymentModule {
160
+ }
161
+ /** @nocollapse */ /** @nocollapse */ DaffPaymentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
162
+ /** @nocollapse */ /** @nocollapse */ DaffPaymentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentModule, imports: [CommonModule,
163
+ /**
164
+ * Ngrx/store
165
+ */
166
+ DaffPaymentStateModule] });
167
+ /** @nocollapse */ /** @nocollapse */ DaffPaymentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentModule, imports: [[
168
+ CommonModule,
169
+ /**
170
+ * Ngrx/store
171
+ */
172
+ DaffPaymentStateModule,
173
+ ]] });
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentModule, decorators: [{
175
+ type: NgModule,
176
+ args: [{
177
+ imports: [
178
+ CommonModule,
179
+ /**
180
+ * Ngrx/store
181
+ */
182
+ DaffPaymentStateModule,
183
+ ],
184
+ }]
185
+ }] });
186
+
187
+ /**
188
+ * Payment Feature State
189
+ */
190
+ const selectPaymentFeatureState = createFeatureSelector('payment');
191
+ /**
192
+ * Payment State
193
+ */
194
+ const selectPaymentState = createSelector(selectPaymentFeatureState, (state) => state.payment);
195
+ const selectPaymentInfo$1 = createSelector(selectPaymentState, (state) => state.paymentInfo);
196
+
197
+ /**
198
+ * A facade for accessing state for customer payment information.
199
+ */
200
+ class DaffPaymentFacade {
201
+ constructor(store) {
202
+ this.store = store;
203
+ this.paymentInfo$ = this.store.pipe(select(selectPaymentInfo$1));
204
+ }
205
+ /**
206
+ * Dispatches the given action.
207
+ *
208
+ * @param action action to dispatch.
209
+ */
210
+ dispatch(action) {
211
+ this.store.dispatch(action);
212
+ }
213
+ }
214
+ /** @nocollapse */ /** @nocollapse */ DaffPaymentFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
215
+ /** @nocollapse */ /** @nocollapse */ DaffPaymentFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentFacade, providedIn: DaffPaymentModule });
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPaymentFacade, decorators: [{
217
+ type: Injectable,
218
+ args: [{
219
+ providedIn: DaffPaymentModule,
220
+ }]
221
+ }], ctorParameters: function () { return [{ type: i1.Store }]; } });
222
+
223
+ const DaffPaymentDriver = new InjectionToken('DaffPaymentDriver');
224
+
225
+ const DaffOrderDriver = new InjectionToken('DaffOrderDriver');
226
+
227
+ const DaffPaymentTransformer = new InjectionToken('DaffPaymentTransformer');
228
+
229
+ var DaffBillingActionTypes;
230
+ (function (DaffBillingActionTypes) {
231
+ DaffBillingActionTypes["UpdateBillingAddressAction"] = "[Billing] Update Billing Address Action";
232
+ DaffBillingActionTypes["UpdatePaymentInfoAction"] = "[Billing] Update Payment Info Action";
233
+ DaffBillingActionTypes["ToggleBillingAddressIsShippingAddressAction"] = "[Billing] Billing Address Is Shipping Address Action";
234
+ })(DaffBillingActionTypes || (DaffBillingActionTypes = {}));
235
+ class DaffUpdateBillingAddress {
236
+ constructor(payload) {
237
+ this.payload = payload;
238
+ this.type = DaffBillingActionTypes.UpdateBillingAddressAction;
239
+ }
240
+ }
241
+ class DaffUpdatePaymentInfo {
242
+ constructor(payload) {
243
+ this.payload = payload;
244
+ this.type = DaffBillingActionTypes.UpdatePaymentInfoAction;
245
+ }
246
+ }
247
+ class DaffToggleBillingAddressIsShippingAddress {
248
+ constructor() {
249
+ this.type = DaffBillingActionTypes.ToggleBillingAddressIsShippingAddressAction;
250
+ }
251
+ }
252
+
253
+ /**
254
+ * Billing Feature State
255
+ */
256
+ const selectBillingFeatureState = createFeatureSelector('billing');
257
+ /**
258
+ * Billing State
259
+ */
260
+ const selectBillingState = createSelector(selectBillingFeatureState, (state) => state.billing);
261
+ const selectBillingAddress = createSelector(selectBillingState, (state) => state.billingAddress);
262
+ const selectBillingAddressIsShippingAddress = createSelector(selectBillingState, (state) => state.billingAddressIsShippingAddress);
263
+ const selectPaymentInfo = createSelector(selectBillingState, (state) => state.paymentInfo);
264
+
265
+ const initialState$2 = {
266
+ billingAddress: null,
267
+ billingAddressIsShippingAddress: false,
268
+ paymentInfo: null,
269
+ };
270
+ function daffBillingReducer(state = initialState$2, action) {
271
+ switch (action.type) {
272
+ case DaffBillingActionTypes.UpdateBillingAddressAction:
273
+ return Object.assign(Object.assign({}, state), { billingAddress: action.payload });
274
+ case DaffBillingActionTypes.ToggleBillingAddressIsShippingAddressAction:
275
+ return Object.assign(Object.assign({}, state), { billingAddress: null, billingAddressIsShippingAddress: !state.billingAddressIsShippingAddress });
276
+ case DaffBillingActionTypes.UpdatePaymentInfoAction:
277
+ return Object.assign(Object.assign({}, state), { paymentInfo: action.payload });
278
+ default:
279
+ return state;
280
+ }
281
+ }
282
+
283
+ const daffBillingReducers = {
284
+ billing: daffBillingReducer,
285
+ };
286
+
287
+ class DaffBillingStateModule {
288
+ }
289
+ /** @nocollapse */ /** @nocollapse */ DaffBillingStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
290
+ /** @nocollapse */ /** @nocollapse */ DaffBillingStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingStateModule, imports: [i1.StoreFeatureModule] });
291
+ /** @nocollapse */ /** @nocollapse */ DaffBillingStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingStateModule, imports: [[
292
+ StoreModule.forFeature('billing', daffBillingReducers),
293
+ ]] });
294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingStateModule, decorators: [{
295
+ type: NgModule,
296
+ args: [{
297
+ imports: [
298
+ StoreModule.forFeature('billing', daffBillingReducers),
299
+ ],
300
+ }]
301
+ }] });
302
+
303
+ class BillingContainer {
304
+ constructor(store) {
305
+ this.store = store;
306
+ }
307
+ ngOnInit() {
308
+ this.billingAddress$ = this.store.pipe(select(selectBillingAddress));
309
+ this.billingAddressIsShippingAddress$ = this.store.pipe(select(selectBillingAddressIsShippingAddress));
310
+ this.paymentInfo$ = this.store.pipe(select(selectPaymentInfo));
311
+ }
312
+ updateBillingAddress(address) {
313
+ this.store.dispatch(new DaffUpdateBillingAddress(address));
314
+ }
315
+ toggleBillingAddressIsShippingAddress() {
316
+ this.store.dispatch(new DaffToggleBillingAddressIsShippingAddress());
317
+ }
318
+ updatePaymentInfo(info) {
319
+ this.store.dispatch(new DaffUpdatePaymentInfo(info));
320
+ }
321
+ }
322
+ /** @nocollapse */ /** @nocollapse */ BillingContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: BillingContainer, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component });
323
+ /** @nocollapse */ /** @nocollapse */ BillingContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: BillingContainer, selector: "[billing-container]", exportAs: ["BillingContainer"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: BillingContainer, decorators: [{
325
+ type: Component,
326
+ args: [{
327
+ selector: '[billing-container]',
328
+ template: '<ng-content></ng-content>',
329
+ exportAs: 'BillingContainer',
330
+ }]
331
+ }], ctorParameters: function () { return [{ type: i1.Store }]; } });
332
+
333
+ class DaffBillingModule {
334
+ }
335
+ /** @nocollapse */ /** @nocollapse */ DaffBillingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
336
+ /** @nocollapse */ /** @nocollapse */ DaffBillingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingModule, declarations: [BillingContainer], imports: [CommonModule,
337
+ /**
338
+ * Ngrx/store
339
+ */
340
+ DaffBillingStateModule], exports: [BillingContainer] });
341
+ /** @nocollapse */ /** @nocollapse */ DaffBillingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingModule, imports: [[
342
+ CommonModule,
343
+ /**
344
+ * Ngrx/store
345
+ */
346
+ DaffBillingStateModule,
347
+ ]] });
348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingModule, decorators: [{
349
+ type: NgModule,
350
+ args: [{
351
+ imports: [
352
+ CommonModule,
353
+ /**
354
+ * Ngrx/store
355
+ */
356
+ DaffBillingStateModule,
357
+ ],
358
+ declarations: [
359
+ BillingContainer,
360
+ ],
361
+ exports: [
362
+ BillingContainer,
363
+ ],
364
+ }]
365
+ }] });
366
+
367
+ /**
368
+ * A facade for accessing state for the billing information of a customer
369
+ */
370
+ class DaffBillingFacade {
371
+ constructor(store) {
372
+ this.store = store;
373
+ this.billingAddress$ = this.store.pipe(select(selectBillingAddress));
374
+ this.billingAddressIsShippingAddress$ = this.store.pipe(select(selectBillingAddressIsShippingAddress));
375
+ this.paymentInfo$ = this.store.pipe(select(selectPaymentInfo));
376
+ }
377
+ /**
378
+ * Dispatches the given action.
379
+ *
380
+ * @param action action to dispatch.
381
+ */
382
+ dispatch(action) {
383
+ this.store.dispatch(action);
384
+ }
385
+ }
386
+ /** @nocollapse */ /** @nocollapse */ DaffBillingFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
387
+ /** @nocollapse */ /** @nocollapse */ DaffBillingFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingFacade, providedIn: DaffBillingModule });
388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBillingFacade, decorators: [{
389
+ type: Injectable,
390
+ args: [{
391
+ providedIn: DaffBillingModule,
392
+ }]
393
+ }], ctorParameters: function () { return [{ type: i1.Store }]; } });
394
+
395
+ const initialState$1 = {
396
+ shippingAddress: null,
397
+ selectedShippingOptionId: null,
398
+ };
399
+ function daffShippingReducer(state = initialState$1, action) {
400
+ switch (action.type) {
401
+ case DaffShippingActionTypes.UpdateShippingAddressAction:
402
+ return Object.assign(Object.assign({}, state), { shippingAddress: action.payload });
403
+ case DaffShippingActionTypes.SelectShippingOptionAction:
404
+ return Object.assign(Object.assign({}, state), { selectedShippingOptionId: action.payload });
405
+ default:
406
+ return state;
407
+ }
408
+ }
409
+
410
+ const daffShippingReducers = {
411
+ shipping: daffShippingReducer,
412
+ };
413
+
414
+ class DaffShippingStateModule {
415
+ }
416
+ /** @nocollapse */ /** @nocollapse */ DaffShippingStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
417
+ /** @nocollapse */ /** @nocollapse */ DaffShippingStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingStateModule, imports: [i1.StoreFeatureModule] });
418
+ /** @nocollapse */ /** @nocollapse */ DaffShippingStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingStateModule, imports: [[
419
+ StoreModule.forFeature('shipping', daffShippingReducers),
420
+ ]] });
421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingStateModule, decorators: [{
422
+ type: NgModule,
423
+ args: [{
424
+ imports: [
425
+ StoreModule.forFeature('shipping', daffShippingReducers),
426
+ ],
427
+ }]
428
+ }] });
429
+
430
+ class DaffShippingModule {
431
+ }
432
+ /** @nocollapse */ /** @nocollapse */ DaffShippingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
433
+ /** @nocollapse */ /** @nocollapse */ DaffShippingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingModule, declarations: [ShippingContainer], imports: [CommonModule,
434
+ /**
435
+ * Ngrx/store
436
+ */
437
+ DaffShippingStateModule], exports: [ShippingContainer] });
438
+ /** @nocollapse */ /** @nocollapse */ DaffShippingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingModule, imports: [[
439
+ CommonModule,
440
+ /**
441
+ * Ngrx/store
442
+ */
443
+ DaffShippingStateModule,
444
+ ]] });
445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingModule, decorators: [{
446
+ type: NgModule,
447
+ args: [{
448
+ imports: [
449
+ CommonModule,
450
+ /**
451
+ * Ngrx/store
452
+ */
453
+ DaffShippingStateModule,
454
+ ],
455
+ declarations: [
456
+ ShippingContainer,
457
+ ],
458
+ exports: [
459
+ ShippingContainer,
460
+ ],
461
+ }]
462
+ }] });
463
+
464
+ /**
465
+ * A facade for accessing state for shipping information.
466
+ */
467
+ class DaffShippingFacade {
468
+ constructor(store) {
469
+ this.store = store;
470
+ this.shippingAddress$ = this.store.pipe(select(selectShippingAddress));
471
+ this.selectedShippingOptionId$ = this.store.pipe(select(selectShippingOptionId));
472
+ this.isShippingAddressValid$ = this.store.pipe(select(selectIsShippingAddressValid));
473
+ }
474
+ /**
475
+ * Dispatches the given action.
476
+ *
477
+ * @param action action to dispatch.
478
+ */
479
+ dispatch(action) {
480
+ this.store.dispatch(action);
481
+ }
482
+ }
483
+ /** @nocollapse */ /** @nocollapse */ DaffShippingFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
484
+ /** @nocollapse */ /** @nocollapse */ DaffShippingFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingFacade, providedIn: DaffShippingModule });
485
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffShippingFacade, decorators: [{
486
+ type: Injectable,
487
+ args: [{
488
+ providedIn: DaffShippingModule,
489
+ }]
490
+ }], ctorParameters: function () { return [{ type: i1.Store }]; } });
491
+
492
+ /**
493
+ * @deprecated
494
+ */
495
+ var DaffOrderActionTypes;
496
+ (function (DaffOrderActionTypes) {
497
+ DaffOrderActionTypes["PlaceOrderAction"] = "[Order] Place Order Action";
498
+ DaffOrderActionTypes["PlaceOrderSuccessAction"] = "[Order] Place Order Success Action";
499
+ DaffOrderActionTypes["PlaceOrderFailureAction"] = "[Order] Place Order Failure Action";
500
+ })(DaffOrderActionTypes || (DaffOrderActionTypes = {}));
501
+ /**
502
+ * @deprecated
503
+ */
504
+ var OrderActionTypes;
505
+ (function (OrderActionTypes) {
506
+ OrderActionTypes["PlaceOrderAction"] = "[Order] Place Order Action";
507
+ OrderActionTypes["PlaceOrderSuccessAction"] = "[Order] Place Order Success Action";
508
+ OrderActionTypes["PlaceOrderFailureAction"] = "[Order] Place Order Failure Action";
509
+ })(OrderActionTypes || (OrderActionTypes = {}));
510
+ /**
511
+ * @deprecated
512
+ */
513
+ class PlaceOrder {
514
+ constructor(payload) {
515
+ this.payload = payload;
516
+ this.type = DaffOrderActionTypes.PlaceOrderAction;
517
+ }
518
+ }
519
+ /**
520
+ * @deprecated
521
+ */
522
+ class DaffPlaceOrder {
523
+ constructor(payload) {
524
+ this.payload = payload;
525
+ this.type = DaffOrderActionTypes.PlaceOrderAction;
526
+ }
527
+ }
528
+ /**
529
+ * @deprecated
530
+ */
531
+ class DaffPlaceOrderSuccess {
532
+ constructor(payload) {
533
+ this.payload = payload;
534
+ this.type = DaffOrderActionTypes.PlaceOrderSuccessAction;
535
+ }
536
+ }
537
+ /**
538
+ * @deprecated
539
+ */
540
+ class DaffPlaceOrderFailure {
541
+ constructor(payload) {
542
+ this.payload = payload;
543
+ this.type = DaffOrderActionTypes.PlaceOrderFailureAction;
544
+ }
545
+ }
546
+
547
+ /**
548
+ * @deprecated
549
+ */
550
+ const initialState = {
551
+ order: null,
552
+ loading: false,
553
+ errors: [],
554
+ };
555
+ /**
556
+ * @deprecated
557
+ */
558
+ function daffOrderReducer(state = initialState, action) {
559
+ switch (action.type) {
560
+ case DaffOrderActionTypes.PlaceOrderAction:
561
+ return Object.assign(Object.assign({}, state), { loading: true });
562
+ case DaffOrderActionTypes.PlaceOrderSuccessAction:
563
+ return Object.assign(Object.assign({}, state), { order: action.payload, loading: false });
564
+ case DaffOrderActionTypes.PlaceOrderFailureAction:
565
+ return Object.assign(Object.assign({}, state), { errors: [action.payload], loading: false });
566
+ default:
567
+ return state;
568
+ }
569
+ }
570
+
571
+ /**
572
+ * @deprecated
573
+ */
574
+ const daffOrderReducers = {
575
+ order: daffOrderReducer,
576
+ };
577
+
578
+ const DaffCheckoutDriver = new InjectionToken('DaffCheckoutDriver');
579
+
580
+ /**
581
+ * @deprecated
582
+ */
583
+ class OrderEffects {
584
+ constructor(actions$, checkoutDriver) {
585
+ this.actions$ = actions$;
586
+ this.checkoutDriver = checkoutDriver;
587
+ this.onPlaceOrder$ = createEffect(() => this.actions$.pipe(ofType(DaffOrderActionTypes.PlaceOrderAction), switchMap((action) => this.checkoutDriver.placeOrder(action.payload.id.toString())
588
+ .pipe(map((resp) => new DaffPlaceOrderSuccess(resp)), catchError(error => of(new DaffPlaceOrderFailure('Failed to place order')))))));
589
+ }
590
+ }
591
+ /** @nocollapse */ /** @nocollapse */ OrderEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: OrderEffects, deps: [{ token: i1$1.Actions }, { token: DaffCheckoutDriver }], target: i0.ɵɵFactoryTarget.Injectable });
592
+ /** @nocollapse */ /** @nocollapse */ OrderEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: OrderEffects });
593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: OrderEffects, decorators: [{
594
+ type: Injectable
595
+ }], ctorParameters: function () {
596
+ return [{ type: i1$1.Actions }, { type: undefined, decorators: [{
597
+ type: Inject,
598
+ args: [DaffCheckoutDriver]
599
+ }] }];
600
+ } });
601
+
602
+ /**
603
+ * @deprecated
604
+ */
605
+ class DaffOrderStateModule {
606
+ }
607
+ /** @nocollapse */ /** @nocollapse */ DaffOrderStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
608
+ /** @nocollapse */ /** @nocollapse */ DaffOrderStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderStateModule, imports: [i1.StoreFeatureModule, i1$1.EffectsFeatureModule] });
609
+ /** @nocollapse */ /** @nocollapse */ DaffOrderStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderStateModule, imports: [[
610
+ StoreModule.forFeature('order', daffOrderReducers),
611
+ EffectsModule.forFeature([
612
+ OrderEffects,
613
+ ]),
614
+ ]] });
615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderStateModule, decorators: [{
616
+ type: NgModule,
617
+ args: [{
618
+ imports: [
619
+ StoreModule.forFeature('order', daffOrderReducers),
620
+ EffectsModule.forFeature([
621
+ OrderEffects,
622
+ ]),
623
+ ],
624
+ }]
625
+ }] });
626
+
627
+ /**
628
+ * @deprecated
629
+ */
630
+ class DaffOrderModule {
631
+ }
632
+ /** @nocollapse */ /** @nocollapse */ DaffOrderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
633
+ /** @nocollapse */ /** @nocollapse */ DaffOrderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderModule, declarations: [OrderContainer], imports: [CommonModule,
634
+ /**
635
+ * Ngrx/store
636
+ */
637
+ DaffOrderStateModule], exports: [OrderContainer] });
638
+ /** @nocollapse */ /** @nocollapse */ DaffOrderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderModule, imports: [[
639
+ CommonModule,
640
+ /**
641
+ * Ngrx/store
642
+ */
643
+ DaffOrderStateModule,
644
+ ]] });
645
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderModule, decorators: [{
646
+ type: NgModule,
647
+ args: [{
648
+ imports: [
649
+ CommonModule,
650
+ /**
651
+ * Ngrx/store
652
+ */
653
+ DaffOrderStateModule,
654
+ ],
655
+ declarations: [
656
+ OrderContainer,
657
+ ],
658
+ exports: [
659
+ OrderContainer,
660
+ ],
661
+ }]
662
+ }] });
663
+
664
+ /**
665
+ * A facade for accessing state for the currently selected category.
666
+ */
667
+ /**
668
+ * @deprecated
669
+ */
670
+ class DaffOrderFacade {
671
+ constructor(store) {
672
+ this.store = store;
673
+ this.order$ = this.store.pipe(select(selectOrder));
674
+ this.loading$ = this.store.pipe(select(selectLoading));
675
+ this.errors$ = this.store.pipe(select(selectErrors));
676
+ }
677
+ /**
678
+ * Dispatches the given action.
679
+ *
680
+ * @param action action to dispatch.
681
+ */
682
+ dispatch(action) {
683
+ this.store.dispatch(action);
684
+ }
685
+ }
686
+ /** @nocollapse */ /** @nocollapse */ DaffOrderFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
687
+ /** @nocollapse */ /** @nocollapse */ DaffOrderFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderFacade, providedIn: DaffOrderModule });
688
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderFacade, decorators: [{
689
+ type: Injectable,
690
+ args: [{
691
+ providedIn: DaffOrderModule,
692
+ }]
693
+ }], ctorParameters: function () { return [{ type: i1.Store }]; } });
694
+
695
+ class StateCheckoutModule {
696
+ }
697
+ /** @nocollapse */ /** @nocollapse */ StateCheckoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: StateCheckoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
698
+ /** @nocollapse */ /** @nocollapse */ StateCheckoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: StateCheckoutModule, imports: [CommonModule,
699
+ DaffShippingModule,
700
+ DaffPaymentModule,
701
+ DaffBillingModule,
702
+ DaffOrderModule], exports: [DaffShippingModule,
703
+ DaffPaymentModule,
704
+ DaffBillingModule,
705
+ DaffOrderModule] });
706
+ /** @nocollapse */ /** @nocollapse */ StateCheckoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: StateCheckoutModule, imports: [[
707
+ CommonModule,
708
+ DaffShippingModule,
709
+ DaffPaymentModule,
710
+ DaffBillingModule,
711
+ DaffOrderModule,
712
+ ], DaffShippingModule,
713
+ DaffPaymentModule,
714
+ DaffBillingModule,
715
+ DaffOrderModule] });
716
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: StateCheckoutModule, decorators: [{
717
+ type: NgModule,
718
+ args: [{
719
+ imports: [
720
+ CommonModule,
721
+ DaffShippingModule,
722
+ DaffPaymentModule,
723
+ DaffBillingModule,
724
+ DaffOrderModule,
725
+ ],
726
+ exports: [
727
+ DaffShippingModule,
728
+ DaffPaymentModule,
729
+ DaffBillingModule,
730
+ DaffOrderModule,
731
+ ],
732
+ }]
733
+ }] });
734
+
735
+ /**
736
+ * Generated bundle index. Do not edit.
737
+ */
738
+
739
+ export { BillingContainer, DaffBillingActionTypes, DaffBillingFacade, DaffBillingModule, DaffCheckoutDriver, DaffOrderActionTypes, DaffOrderDriver, DaffOrderFacade, DaffOrderModule, DaffPaymentActionTypes, DaffPaymentDriver, DaffPaymentFacade, DaffPaymentModule, DaffPaymentTransformer, DaffPlaceOrder, DaffPlaceOrderFailure, DaffPlaceOrderSuccess, DaffSelectShippingOption, DaffShippingActionTypes, DaffShippingFacade, DaffShippingModule, DaffToggleBillingAddressIsShippingAddress, DaffUpdateBillingAddress, DaffUpdatePaymentInfo$1 as DaffUpdatePaymentInfo, DaffUpdateShippingAddress, OrderActionTypes, OrderContainer, PlaceOrder, ShippingContainer, StateCheckoutModule, daffBillingReducer, daffBillingReducers, daffOrderReducer, daffOrderReducers, daffPaymentReducers, daffShippingReducer, daffShippingReducers, selectBillingAddress, selectBillingAddressIsShippingAddress, selectBillingFeatureState, selectBillingState, selectErrors, selectIsShippingAddressValid, selectLoading, selectOrder, selectOrderFeatureState, selectOrderState, selectPaymentFeatureState, selectPaymentInfo$1 as selectPaymentInfo, selectPaymentState, selectShippingAddress, selectShippingFeatureState, selectShippingOptionId, selectShippingState };
740
+ //# sourceMappingURL=daffodil-checkout.mjs.map