@daffodil/order 0.41.0 → 0.42.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-order-routing.mjs","sources":["../../../libs/order/routing/src/guards/placed-order/placed-order-guard-redirect.token.ts","../../../libs/order/routing/src/guards/placed-order/placed-order.guard.ts","../../../libs/order/routing/src/order-routing.module.ts","../../../libs/order/routing/src/daffodil-order-routing.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const DaffPlacedOrderGuardRedirectUrl = new InjectionToken<string>('DaffPlacedOrderGuardRedirectUrl');\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n CanActivate,\n Router,\n} from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport { DaffOrderFacade } from '@daffodil/order/state';\n\nimport { DaffPlacedOrderGuardRedirectUrl } from './placed-order-guard-redirect.token';\n\n/**\n * A routing guard that will redirect to a given url if the placed order is not defined.\n * The url is `/` by default, but can be overridden with the DaffPlacedOrderGuardRedirectUrl injection token.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPlacedOrderGuard implements CanActivate {\n constructor(\n\t\tprivate facade: DaffOrderFacade,\n\t\tprivate router: Router,\n\t\t@Inject(DaffPlacedOrderGuardRedirectUrl) private redirectUrl: string,\n ) {}\n\n canActivate(): Observable<boolean> {\n return this.facade.hasPlacedOrder$.pipe(\n tap(hasPlacedOrder => {\n if (!hasPlacedOrder) {\n this.router.navigateByUrl(this.redirectUrl);\n }\n }),\n );\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffPlacedOrderGuardRedirectUrl } from './guards/public_api';\n\n@NgModule({\n providers: [\n { provide: DaffPlacedOrderGuardRedirectUrl, useValue: '/' },\n ],\n})\nexport class DaffOrderRoutingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAEa,+BAA+B,GAAG,IAAI,cAAc,CAAS,iCAAiC;;ACa3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A,QAAA,EAAA,CAAA,CAAA;0JAAtB,sBAAsB,EAAA,CAAA,CAAA;AAAtB,sCAAA,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,EAJtB,SAAA,EAAA;AACT,QAAA,EAAE,OAAO,EAAE,+BAA+B,EAAE,QAAQ,EAAE,GAAG,EAAE;AAC5D,KAAA,EAAA,CAAA,CAAA;2FAEU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBALlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,+BAA+B,EAAE,QAAQ,EAAE,GAAG,EAAE;AAC5D,qBAAA;iBACF,CAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-order-routing.mjs","sources":["../../../libs/order/routing/src/guards/placed-order/placed-order-guard-redirect.token.ts","../../../libs/order/routing/src/guards/placed-order/placed-order.guard.ts","../../../libs/order/routing/src/order-routing.module.ts","../../../libs/order/routing/src/daffodil-order-routing.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const DaffPlacedOrderGuardRedirectUrl = new InjectionToken<string>('DaffPlacedOrderGuardRedirectUrl');\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n CanActivate,\n Router,\n} from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport { DaffOrderFacade } from '@daffodil/order/state';\n\nimport { DaffPlacedOrderGuardRedirectUrl } from './placed-order-guard-redirect.token';\n\n/**\n * A routing guard that will redirect to a given url if the placed order is not defined.\n * The url is `/` by default, but can be overridden with the DaffPlacedOrderGuardRedirectUrl injection token.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPlacedOrderGuard implements CanActivate {\n constructor(\n private facade: DaffOrderFacade,\n private router: Router,\n @Inject(DaffPlacedOrderGuardRedirectUrl) private redirectUrl: string,\n ) {}\n\n canActivate(): Observable<boolean> {\n return this.facade.hasPlacedOrder$.pipe(\n tap(hasPlacedOrder => {\n if (!hasPlacedOrder) {\n this.router.navigateByUrl(this.redirectUrl);\n }\n }),\n );\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffPlacedOrderGuardRedirectUrl } from './guards/public_api';\n\n@NgModule({\n providers: [\n { provide: DaffPlacedOrderGuardRedirectUrl, useValue: '/' },\n ],\n})\nexport class DaffOrderRoutingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAEa,+BAA+B,GAAG,IAAI,cAAc,CAAS,iCAAiC;;ACa3G;;;AAGG;MAIU,oBAAoB,CAAA;AAC/B,IAAA,WAAA,CACU,MAAuB,EACvB,MAAc,EAC2B,WAAmB,EAAA;AAF5D,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAiB;AACvB,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AAC2B,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAQ;KAClE;IAEJ,WAAW,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CACrC,GAAG,CAAC,cAAc,IAAG;YACnB,IAAI,CAAC,cAAc,EAAE;gBACnB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC7C,aAAA;SACF,CAAC,CACH,CAAC;KACH;;AAfU,sCAAA,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,uEAIrB,+BAA+B,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAJ9B,sCAAA,oBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cAFnB,MAAM,EAAA,CAAA,CAAA;2FAEP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;8BAKI,MAAM;+BAAC,+BAA+B,CAAA;;;;MCjB9B,sBAAsB,CAAA;;yJAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;0JAAtB,sBAAsB,EAAA,CAAA,CAAA;AAAtB,sCAAA,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,EAJtB,SAAA,EAAA;AACT,QAAA,EAAE,OAAO,EAAE,+BAA+B,EAAE,QAAQ,EAAE,GAAG,EAAE;AAC5D,KAAA,EAAA,CAAA,CAAA;2FAEU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBALlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,+BAA+B,EAAE,QAAQ,EAAE,GAAG,EAAE;AAC5D,qBAAA;iBACF,CAAA;;;ACRD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-order-state.mjs","sources":["../../../libs/order/state/src/actions/order.actions.ts","../../../libs/order/state/src/reducers/order-entities/order-entities-adapter.ts","../../../libs/order/state/src/reducers/order-entities/order-entities-initial-state.ts","../../../libs/order/state/src/reducers/order-entities/order-entities.reducer.ts","../../../libs/order/state/src/reducers/order/order-initial-state.ts","../../../libs/order/state/src/reducers/order/order.reducer.ts","../../../libs/order/state/src/reducers/order-reducers.ts","../../../libs/order/state/src/reducers/order-store-feature-key.ts","../../../libs/order/state/src/selectors/order-feature.selector.ts","../../../libs/order/state/src/selectors/order-entities.selector.ts","../../../libs/order/state/src/selectors/order.selector.ts","../../../libs/order/state/src/selectors/order-all.selector.ts","../../../libs/order/state/src/facades/order/order.facade.ts","../../../libs/order/state/src/effects/order.effects.ts","../../../libs/order/state/src/order-state.module.ts","../../../libs/order/state/src/daffodil-order-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffOrder } from '@daffodil/order';\n\nexport enum DaffOrderActionTypes {\n OrderLoadAction = '[Order] Order Load Action',\n OrderLoadSuccessAction = '[Order] Order Load Success Action',\n OrderLoadFailureAction = '[Order] Order Load Failure Action',\n OrderListAction = '[Order] Order List Action',\n OrderListSuccessAction = '[Order] Order List Success Action',\n OrderListFailureAction = '[Order] Order List Failure Action'\n}\n\n/**\n * Triggers the loading of the specified order.\n *\n * @param orderId The order ID.\n * @param cartId The optional guest cart ID.\n */\nexport class DaffOrderLoad<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadAction;\n\n constructor(public orderId: T['id'], public cartId?: V['id']) {}\n}\n\nexport class DaffOrderLoadSuccess<T extends DaffOrder = DaffOrder> implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadSuccessAction;\n\n constructor(public payload: T) {}\n}\n\nexport class DaffOrderLoadFailure implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\n/**\n * Triggers the loading of the orders for either the currently logged-in user or the specified guest cart.\n *\n * @param payload The guest cart ID.\n */\nexport class DaffOrderList<T extends DaffCart = DaffCart> implements Action {\n readonly type = DaffOrderActionTypes.OrderListAction;\n\n constructor(public payload?: T['id']) {}\n}\n\nexport class DaffOrderListSuccess<T extends DaffOrder = DaffOrder> implements Action {\n readonly type = DaffOrderActionTypes.OrderListSuccessAction;\n\n constructor(public payload: T[]) {}\n}\n\nexport class DaffOrderListFailure implements Action {\n readonly type = DaffOrderActionTypes.OrderListFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\nexport type DaffOrderActions<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> =\n | DaffOrderLoad<T, V>\n | DaffOrderLoadSuccess<T>\n | DaffOrderLoadFailure\n | DaffOrderList\n | DaffOrderListSuccess<T>\n | DaffOrderListFailure;\n","import {\n EntityAdapter,\n createEntityAdapter,\n} from '@ngrx/entity';\n\nimport { DaffOrder } from '@daffodil/order';\n\n/**\n * Order Adapter for changing/overwriting entity state.\n */\nexport const daffGetOrderAdapter = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): EntityAdapter<T> =>\n cache = cache || createEntityAdapter<T>();\n})();\n","import { daffGetOrderAdapter } from './order-entities-adapter';\nimport { DaffOrderEntityState } from './order-entities-state.interface';\n\n/**\n * Initial state for order entity state.\n */\nexport const daffOrderEntitiesInitialState: DaffOrderEntityState<any> = daffGetOrderAdapter().getInitialState();\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderActions,\n DaffOrderActionTypes,\n} from '../../actions/order.actions';\nimport { daffGetOrderAdapter } from './order-entities-adapter';\nimport { daffOrderEntitiesInitialState } from './order-entities-initial-state';\nimport { DaffOrderEntityState } from './order-entities-state.interface';\n\n/**\n * Reducer function that catches actions and changes/overwrites order entities state.\n */\nexport function daffOrderEntitiesReducer<T extends DaffOrder = DaffOrder>(\n state = daffOrderEntitiesInitialState,\n action: DaffOrderActions<T>,\n): DaffOrderEntityState<T> {\n const adapter = daffGetOrderAdapter<T>();\n\n switch (action.type) {\n case DaffOrderActionTypes.OrderLoadSuccessAction:\n return adapter.upsertOne(action.payload, state);\n\n case DaffOrderActionTypes.OrderListSuccessAction:\n return adapter.upsertMany(action.payload, state);\n\n default:\n return state;\n }\n}\n","import { DaffOrderReducerState } from './order-reducer.interface';\n\nexport const daffOrderInitialState: DaffOrderReducerState = {\n loading: false,\n errors: [],\n};\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderActions,\n DaffOrderActionTypes,\n} from '../../actions/order.actions';\nimport { daffOrderInitialState } from './order-initial-state';\nimport { DaffOrderReducerState } from './order-reducer.interface';\n\nexport function daffOrderReducer<T extends DaffOrder = DaffOrder>(\n state = daffOrderInitialState,\n action: DaffOrderActions<T>,\n): DaffOrderReducerState {\n switch (action.type) {\n case DaffOrderActionTypes.OrderListAction:\n case DaffOrderActionTypes.OrderLoadAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffOrderActionTypes.OrderListSuccessAction:\n case DaffOrderActionTypes.OrderLoadSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffOrderActionTypes.OrderListFailureAction:\n case DaffOrderActionTypes.OrderLoadFailureAction:\n return {\n ...state,\n errors: [\n ...state.errors,\n action.payload,\n ],\n loading: false,\n };\n\n default:\n return state;\n }\n}\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { daffOrderEntitiesReducer } from './order-entities/public_api';\nimport { DaffOrderReducersState } from './order-reducers.interface';\nimport { daffOrderReducer } from './order/order.reducer';\n\nexport const daffOrderReducers: ActionReducerMap<DaffOrderReducersState> = {\n order: daffOrderReducer,\n orders: daffOrderEntitiesReducer,\n};\n","export const DAFF_ORDER_STORE_FEATURE_KEY = 'daffOrder';\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n DaffOrderReducersState,\n DAFF_ORDER_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\nexport interface DaffOrderFeatureSelector<T extends DaffOrder = DaffOrder> {\n selectOrderFeatureState: MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderReducersState<T>>;\n}\n\nexport const getDaffOrderReducersStateSelector = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderFeatureSelector<T> =>\n cache = cache || {\n selectOrderFeatureState: createFeatureSelector<DaffOrderReducersState<T>>(DAFF_ORDER_STORE_FEATURE_KEY),\n };\n})();\n","import { Dictionary } from '@ngrx/entity';\nimport {\n createSelector,\n defaultMemoize,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n getDaffCartSelectors,\n DaffCartStateRootSlice,\n} from '@daffodil/cart/state';\nimport {\n DaffOrder,\n DaffOrderItem,\n DaffOrderTotal,\n DaffOrderTotalTypeEnum,\n} from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n daffGetOrderAdapter,\n DaffOrderEntityState,\n} from '../reducers/public_api';\nimport { getDaffOrderReducersStateSelector } from './order-feature.selector';\n\nexport interface DaffOrderEntitySelectors<T extends DaffOrder = DaffOrder> {\n selectOrderEntitiesState: MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderEntityState<T>>;\n /**\n * Selector for order IDs.\n */\n selectOrderIds: MemoizedSelector<DaffOrderStateRootSlice<T>, T['id'][]>;\n /**\n * Selector for order entities.\n */\n selectOrderEntities: MemoizedSelector<DaffOrderStateRootSlice<T>, Dictionary<T>>;\n /**\n * Selector for all orders.\n */\n selectAllOrders: MemoizedSelector<DaffOrderStateRootSlice<T>, T[]>;\n /**\n * Selector for total number of orders.\n */\n selectOrderTotal: MemoizedSelector<DaffOrderStateRootSlice<T>, number>;\n selectOrder: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T>;\n\n /**\n * Selector for the most recently placed order (if any).\n */\n selectPlacedOrder: MemoizedSelector<DaffOrderStateRootSlice<T>, T>;\n /**\n * Selector for the existence of the most recently placed order.\n */\n selectHasPlacedOrder: MemoizedSelector<DaffOrderStateRootSlice<T>, boolean>;\n\n /**\n * Selects the specified order's totals.\n */\n selectOrderTotals: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['totals']>;\n /**\n * Selects the specified order's applied coupon codes.\n */\n selectOrderAppliedCodes: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['applied_codes']>;\n /**\n * Selects the specified order's items.\n */\n selectOrderItems: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['items']>;\n /**\n * Selects the specified order's billing addresses.\n */\n selectOrderBillingAddresses: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['billing_addresses']>;\n /**\n * Selects the specified order's shipping addresses.\n */\n selectOrderShippingTotalAddresses: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['shipping_addresses']>;\n /**\n * Selects the specified order's shipments.\n */\n selectOrderShipments: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['shipments']>;\n /**\n * Selects the specified order's payment.\n */\n selectOrderPayment: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['payment']>;\n /**\n * Selects the specified order's invoices.\n */\n selectOrderInvoices: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['invoices']>;\n /**\n * Selects the specified order's credits.\n */\n selectOrderCredits: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['credits']>;\n\n /**\n * Selects the specified order's specified item.\n */\n selectOrderItem: (orderId: T['id'], itemId: T['items'][0]['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderItem>;\n\n /**\n * Selects the specified order's grand total.\n */\n selectOrderGrandTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's subtotal.\n */\n selectOrderSubtotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's shipping total.\n */\n selectOrderShippingTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's discount total.\n */\n\tselectOrderDiscountTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n\t/**\n\t * Selects whether the specified order has a discount.\n\t */\n\tselectOrderHasDiscount: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, boolean>;\n /**\n * Selects the specified order's tax total.\n */\n selectOrderTaxTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n}\n\nconst createOrderEntitySelectors = <T extends DaffOrder = DaffOrder>() => {\n const { selectOrderFeatureState } = getDaffOrderReducersStateSelector<T>();\n const selectOrderEntitiesState = createSelector(\n selectOrderFeatureState,\n state => state.orders,\n );\n const { selectIds, selectEntities, selectAll, selectTotal } = daffGetOrderAdapter<T>().getSelectors(selectOrderEntitiesState);\n const { selectCartOrderId } = getDaffCartSelectors();\n\n const selectOrder: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectEntities,\n (orders: Dictionary<T>) => orders[orderId] || null,\n )).memoized;\n\n const selectPlacedOrder = createSelector(\n selectEntities,\n selectCartOrderId,\n (orders, orderId) => orderId ? selectOrder(orderId).projector(orders) : null,\n );\n\n const selectHasPlacedOrder = createSelector(\n selectPlacedOrder,\n placedOrder => !!placedOrder,\n );\n\n const selectOrderTotals: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['totals']> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.totals) || [],\n )).memoized;\n\n const selectOrderAppliedCodes = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.applied_codes) || [],\n )).memoized;\n\n const selectOrderItems: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['items']> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.items) || [],\n )).memoized;\n\n const selectOrderBillingAddresses = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.billing_addresses) || [],\n )).memoized;\n\n const selectOrderShippingTotalAddresses = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.shipping_addresses) || [],\n )).memoized;\n\n const selectOrderShipments = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.shipments) || [],\n )).memoized;\n\n const selectOrderPayment = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.payment) || null,\n )).memoized;\n\n const selectOrderInvoices = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.invoices) || [],\n )).memoized;\n\n const selectOrderCredits = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.credits) || [],\n )).memoized;\n\n const selectOrderGrandTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.GrandTotal);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderSubtotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Subtotal);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderShippingTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Shipping);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderDiscountTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Discount);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderHasDiscount = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderDiscountTotal(orderId),\n discountTotal => discountTotal?.value > 0,\n )).memoized;\n\n const selectOrderTaxTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Tax);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderItem = defaultMemoize((orderId: T['id'], itemId: T['items'][0]['id']) => createSelector(\n selectOrderItems(orderId),\n items => items.find(item => item.id === itemId) || null,\n )).memoized;\n\n return {\n selectOrderEntitiesState,\n selectOrderIds: selectIds,\n selectOrderEntities: selectEntities,\n selectAllOrders: selectAll,\n selectOrderTotal: selectTotal,\n\n selectPlacedOrder,\n selectHasPlacedOrder,\n\n selectOrder,\n selectOrderTotals,\n selectOrderAppliedCodes,\n selectOrderItems,\n selectOrderBillingAddresses,\n selectOrderShippingTotalAddresses,\n selectOrderShipments,\n selectOrderPayment,\n selectOrderInvoices,\n selectOrderCredits,\n selectOrderItem,\n\n selectOrderGrandTotal,\n selectOrderSubtotal,\n selectOrderShippingTotal,\n selectOrderDiscountTotal,\n selectOrderHasDiscount,\n selectOrderTaxTotal,\n };\n};\n\nexport const getDaffOrderEntitySelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderEntitySelectors<T> =>\n cache = cache || createOrderEntitySelectors<T>();\n})();\n\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n DaffOrderReducerState,\n} from '../reducers/public_api';\nimport { getDaffOrderReducersStateSelector } from './order-feature.selector';\n\nexport interface DaffOrderSelectors {\n selectOrderState: MemoizedSelector<DaffOrderStateRootSlice, DaffOrderReducerState>;\n selectOrderLoading: MemoizedSelector<DaffOrderStateRootSlice, boolean>;\n selectOrderErrors: MemoizedSelector<DaffOrderStateRootSlice, DaffStateError[]>;\n}\n\nconst createOrderSelectors = <T extends DaffOrder = DaffOrder>() => {\n const { selectOrderFeatureState } = getDaffOrderReducersStateSelector<T>();\n const selectOrderState = createSelector(\n selectOrderFeatureState,\n state => state.order,\n );\n\n const selectOrderLoading = createSelector(\n selectOrderState,\n state => state.loading,\n );\n\n const selectOrderErrors = createSelector(\n selectOrderState,\n state => state.errors,\n );\n\n return {\n selectOrderState,\n selectOrderLoading,\n selectOrderErrors,\n };\n};\n\nexport const getOrderSelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderSelectors =>\n cache = cache || createOrderSelectors<T>();\n})();\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderEntitySelectors,\n getDaffOrderEntitySelectors,\n} from './order-entities.selector';\nimport {\n DaffOrderFeatureSelector,\n getDaffOrderReducersStateSelector,\n} from './order-feature.selector';\nimport {\n DaffOrderSelectors,\n getOrderSelectors,\n} from './order.selector';\n\nexport interface DaffOrderAllSelectors<T extends DaffOrder = DaffOrder> extends\n DaffOrderEntitySelectors<T>,\n DaffOrderSelectors,\n DaffOrderFeatureSelector<T> {}\n\nexport const getDaffOrderSelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderAllSelectors<T> =>\n cache = cache || {\n ...getOrderSelectors<T>(),\n ...getDaffOrderEntitySelectors<T>(),\n ...getDaffOrderReducersStateSelector<T>(),\n };\n})();\n","import { Injectable } from '@angular/core';\nimport { Dictionary } from '@ngrx/entity';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport {\n DaffOrder,\n DaffOrderTotal,\n} from '@daffodil/order';\n\nimport { DaffOrderStateRootSlice } from '../../reducers/public_api';\nimport { DaffOrderEntitySelectors } from '../../selectors/order-entities.selector';\nimport { getDaffOrderSelectors } from '../../selectors/public_api';\nimport { DaffOrderFacadeInterface } from './order-facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderFacade<T extends DaffOrder = DaffOrder> implements DaffOrderFacadeInterface<T> {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n orders$: Observable<T[]>;\n orderIds$: Observable<T['id'][]>;\n orderCount$: Observable<number>;\n orderEntities$: Observable<Dictionary<T>>;\n\n placedOrder$: Observable<T>;\n hasPlacedOrder$: Observable<boolean>;\n\n _order: DaffOrderEntitySelectors<T>['selectOrder'];\n _totals: DaffOrderEntitySelectors<T>['selectOrderTotals'];\n _appliedCodes: DaffOrderEntitySelectors<T>['selectOrderAppliedCodes'];\n _items: DaffOrderEntitySelectors<T>['selectOrderItems'];\n _billingAddresses: DaffOrderEntitySelectors<T>['selectOrderBillingAddresses'];\n _shippingAddresses: DaffOrderEntitySelectors<T>['selectOrderShippingTotalAddresses'];\n _shipments: DaffOrderEntitySelectors<T>['selectOrderShipments'];\n _payment: DaffOrderEntitySelectors<T>['selectOrderPayment'];\n _invoices: DaffOrderEntitySelectors<T>['selectOrderInvoices'];\n _credits: DaffOrderEntitySelectors<T>['selectOrderCredits'];\n _grandTotal: DaffOrderEntitySelectors<T>['selectOrderGrandTotal'];\n _subtotal: DaffOrderEntitySelectors<T>['selectOrderSubtotal'];\n _shipping: DaffOrderEntitySelectors<T>['selectOrderShippingTotal'];\n _discount: DaffOrderEntitySelectors<T>['selectOrderDiscountTotal'];\n _hasDiscount: DaffOrderEntitySelectors<T>['selectOrderHasDiscount'];\n _tax: DaffOrderEntitySelectors<T>['selectOrderTaxTotal'];\n\n constructor(private store: Store<DaffOrderStateRootSlice<T>>) {\n const {\n selectOrderIds,\n selectOrderEntities,\n selectAllOrders,\n selectOrderTotal,\n selectOrderLoading,\n selectOrderErrors,\n\n selectPlacedOrder,\n selectHasPlacedOrder,\n\n selectOrder,\n selectOrderTotals,\n selectOrderAppliedCodes,\n selectOrderItems,\n selectOrderBillingAddresses,\n selectOrderShippingTotalAddresses,\n selectOrderShipments,\n selectOrderPayment,\n selectOrderInvoices,\n selectOrderCredits,\n\n selectOrderGrandTotal,\n selectOrderSubtotal,\n selectOrderShippingTotal,\n selectOrderDiscountTotal,\n selectOrderHasDiscount,\n selectOrderTaxTotal,\n } = getDaffOrderSelectors<T>();\n\n this.loading$ = this.store.pipe(select(selectOrderLoading));\n this.errors$ = this.store.pipe(select(selectOrderErrors));\n\n this.orders$ = this.store.pipe(select(selectAllOrders));\n this.orderIds$ = this.store.pipe(select(selectOrderIds));\n this.orderCount$ = this.store.pipe(select(selectOrderTotal));\n this.orderEntities$ = this.store.pipe(select(selectOrderEntities));\n\n this.placedOrder$ = this.store.pipe(select(selectPlacedOrder));\n this.hasPlacedOrder$ = this.store.pipe(select(selectHasPlacedOrder));\n\n this._order = selectOrder;\n this._totals = selectOrderTotals;\n this._appliedCodes = selectOrderAppliedCodes;\n this._items = selectOrderItems;\n this._billingAddresses = selectOrderBillingAddresses;\n this._shippingAddresses = selectOrderShippingTotalAddresses;\n this._shipments = selectOrderShipments;\n this._payment = selectOrderPayment;\n this._invoices = selectOrderInvoices;\n this._credits = selectOrderCredits;\n this._grandTotal = selectOrderGrandTotal;\n this._subtotal = selectOrderSubtotal;\n this._shipping = selectOrderShippingTotal;\n this._discount = selectOrderDiscountTotal;\n this._hasDiscount = selectOrderHasDiscount;\n this._tax = selectOrderTaxTotal;\n }\n\n getOrder$(orderId: T['id']): Observable<T> {\n return this.store.pipe(select(this._order(orderId)));\n }\n\n getTotals$(orderId: T['id']): Observable<T['totals']> {\n return this.store.pipe(select(this._totals(orderId)));\n }\n\n getAppliedCodes$(orderId: T['id']): Observable<T['applied_codes']> {\n return this.store.pipe(select(this._appliedCodes(orderId)));\n }\n\n getItems$(orderId: T['id']): Observable<T['items']> {\n return this.store.pipe(select(this._items(orderId)));\n }\n\n getBillingAddresses$(orderId: T['id']): Observable<T['billing_addresses']> {\n return this.store.pipe(select(this._billingAddresses(orderId)));\n }\n\n getShippingAddresses$(orderId: T['id']): Observable<T['shipping_addresses']> {\n return this.store.pipe(select(this._shippingAddresses(orderId)));\n }\n\n getShipments$(orderId: T['id']): Observable<T['shipments']> {\n return this.store.pipe(select(this._shipments(orderId)));\n }\n\n getPayment$(orderId: T['id']): Observable<T['payment']> {\n return this.store.pipe(select(this._payment(orderId)));\n }\n\n getInvoices$(orderId: T['id']): Observable<T['invoices']> {\n return this.store.pipe(select(this._invoices(orderId)));\n }\n\n getCredits$(orderId: T['id']): Observable<T['credits']> {\n return this.store.pipe(select(this._credits(orderId)));\n }\n\n getGrandTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._grandTotal(orderId)));\n };\n getSubtotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._subtotal(orderId)));\n };\n getShippingTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._shipping(orderId)));\n };\n getDiscountTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._discount(orderId)));\n };\n hasDiscount$(orderId: T['id']): Observable<boolean> {\n return this.store.pipe(select(this._hasDiscount(orderId)));\n };\n getTaxTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._tax(orderId)));\n };\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\nimport {\n DaffOrder,\n DAFF_ORDER_ERROR_MATCHER,\n} from '@daffodil/order';\nimport {\n DaffOrderServiceInterface,\n DaffOrderDriver,\n} from '@daffodil/order/driver';\n\nimport {\n DaffOrderActionTypes,\n DaffOrderLoad,\n DaffOrderLoadSuccess,\n DaffOrderLoadFailure,\n DaffOrderList,\n DaffOrderListSuccess,\n DaffOrderListFailure,\n} from '../actions/order.actions';\n\n@Injectable()\nexport class DaffOrderEffects<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffOrderDriver) private driver: DaffOrderServiceInterface<T>,\n\t\t@Inject(DAFF_ORDER_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n ) {}\n\n /**\n * An effect for the loading of an order.\n */\n\n get$ = createEffect(() => this.actions$.pipe(\n ofType(DaffOrderActionTypes.OrderLoadAction),\n switchMap((action: DaffOrderLoad<T, V>) =>\n this.driver.get(action.orderId, action.cartId).pipe(\n map(resp => new DaffOrderLoadSuccess<T>(resp)),\n catchError((error: DaffError) => of(new DaffOrderLoadFailure(this.errorMatcher(error)))),\n ),\n ),\n ));\n\n /**\n * An effect for the listing of orders.\n */\n\n list$ = createEffect(() => this.actions$.pipe(\n ofType(DaffOrderActionTypes.OrderListAction),\n switchMap((action: DaffOrderList) =>\n this.driver.list(action.payload).pipe(\n map(resp => new DaffOrderListSuccess<T>(resp)),\n catchError((error: DaffError) => of(new DaffOrderListFailure(this.errorMatcher(error)))),\n ),\n ),\n ));\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DaffCartStateModule } from '@daffodil/cart/state';\n\nimport { DaffOrderEffects } from './effects/order.effects';\nimport {\n DAFF_ORDER_STORE_FEATURE_KEY,\n daffOrderReducers,\n} from './reducers/public_api';\n\n@NgModule({\n imports: [\n DaffCartStateModule,\n EffectsModule.forFeature([\n DaffOrderEffects,\n ]),\n StoreModule.forFeature(DAFF_ORDER_STORE_FEATURE_KEY, daffOrderReducers),\n ],\n})\nexport class DaffOrderStateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;AAMY,IAAA,qBAOX;AAPD,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,iBAAA,CAAA,GAAA,2BAA6C,CAAA;AAC7C,IAAA,oBAAA,CAAA,wBAAA,CAAA,GAAA,mCAA4D,CAAA;AAC5D,IAAA,oBAAA,CAAA,wBAAA,CAAA,GAAA,mCAA4D,CAAA;AAC5D,IAAA,oBAAA,CAAA,iBAAA,CAAA,GAAA,2BAA6C,CAAA;AAC7C,IAAA,oBAAA,CAAA,wBAAA,CAAA,GAAA,mCAA4D,CAAA;AAC5D,IAAA,oBAAA,CAAA,wBAAA,CAAA,GAAA,mCAA4D,CAAA;AAC9D,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,GAO/B,EAAA,CAAA,CAAA,CAAA;AAED;;;;;AAKG;MACU,aAAa,CAAA;IAMxB,WAAmB,CAAA,OAAgB,EAAS,MAAgB,EAAA;AAAzC,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAS;AAAS,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAU;AAFnD,QAAA,IAAA,CAAA,IAAI,GAAG,oBAAoB,CAAC,eAAe,CAAC;KAEW;AACjE,CAAA;MAEY,oBAAoB,CAAA;AAG/B,IAAA,WAAA,CAAmB,OAAU,EAAA;AAAV,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAG;AAFpB,QAAA,IAAA,CAAA,IAAI,GAAG,oBAAoB,CAAC,sBAAsB,CAAC;KAE3B;AAClC,CAAA;MAEY,oBAAoB,CAAA;AAG/B,IAAA,WAAA,CAAmB,OAAuB,EAAA;AAAvB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAgB;AAFjC,QAAA,IAAA,CAAA,IAAI,GAAG,oBAAoB,CA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UAAU,CAAC,4BAA4B,EAAE,iBAAiB,CAAC;AACxE,qBAAA;iBACF,CAAA;;;ACpBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-order-state.mjs","sources":["../../../libs/order/state/src/actions/order.actions.ts","../../../libs/order/state/src/reducers/order-entities/order-entities-adapter.ts","../../../libs/order/state/src/reducers/order-entities/order-entities-initial-state.ts","../../../libs/order/state/src/reducers/order-entities/order-entities.reducer.ts","../../../libs/order/state/src/reducers/order/order-initial-state.ts","../../../libs/order/state/src/reducers/order/order.reducer.ts","../../../libs/order/state/src/reducers/order-reducers.ts","../../../libs/order/state/src/reducers/order-store-feature-key.ts","../../../libs/order/state/src/selectors/order-feature.selector.ts","../../../libs/order/state/src/selectors/order-entities.selector.ts","../../../libs/order/state/src/selectors/order.selector.ts","../../../libs/order/state/src/selectors/order-all.selector.ts","../../../libs/order/state/src/facades/order/order.facade.ts","../../../libs/order/state/src/effects/order.effects.ts","../../../libs/order/state/src/order-state.module.ts","../../../libs/order/state/src/daffodil-order-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffOrder } from '@daffodil/order';\n\nexport enum DaffOrderActionTypes {\n OrderLoadAction = '[Order] Order Load Action',\n OrderLoadSuccessAction = '[Order] Order Load Success Action',\n OrderLoadFailureAction = '[Order] Order Load Failure Action',\n OrderListAction = '[Order] Order List Action',\n OrderListSuccessAction = '[Order] Order List Success Action',\n OrderListFailureAction = '[Order] Order List Failure Action'\n}\n\n/**\n * Triggers the loading of the specified order.\n *\n * @param orderId The order ID.\n * @param cartId The optional guest cart ID.\n */\nexport class DaffOrderLoad<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadAction;\n\n constructor(public orderId: T['id'], public cartId?: V['id']) {}\n}\n\nexport class DaffOrderLoadSuccess<T extends DaffOrder = DaffOrder> implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadSuccessAction;\n\n constructor(public payload: T) {}\n}\n\nexport class DaffOrderLoadFailure implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\n/**\n * Triggers the loading of the orders for either the currently logged-in user or the specified guest cart.\n *\n * @param payload The guest cart ID.\n */\nexport class DaffOrderList<T extends DaffCart = DaffCart> implements Action {\n readonly type = DaffOrderActionTypes.OrderListAction;\n\n constructor(public payload?: T['id']) {}\n}\n\nexport class DaffOrderListSuccess<T extends DaffOrder = DaffOrder> implements Action {\n readonly type = DaffOrderActionTypes.OrderListSuccessAction;\n\n constructor(public payload: T[]) {}\n}\n\nexport class DaffOrderListFailure implements Action {\n readonly type = DaffOrderActionTypes.OrderListFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\nexport type DaffOrderActions<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> =\n | DaffOrderLoad<T, V>\n | DaffOrderLoadSuccess<T>\n | DaffOrderLoadFailure\n | DaffOrderList\n | DaffOrderListSuccess<T>\n | DaffOrderListFailure;\n","import {\n EntityAdapter,\n createEntityAdapter,\n} from '@ngrx/entity';\n\nimport { DaffOrder } from '@daffodil/order';\n\n/**\n * Order Adapter for changing/overwriting entity state.\n */\nexport const daffGetOrderAdapter = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): EntityAdapter<T> =>\n cache = cache || createEntityAdapter<T>();\n})();\n","import { daffGetOrderAdapter } from './order-entities-adapter';\nimport { DaffOrderEntityState } from './order-entities-state.interface';\n\n/**\n * Initial state for order entity state.\n */\nexport const daffOrderEntitiesInitialState: DaffOrderEntityState<any> = daffGetOrderAdapter().getInitialState();\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderActions,\n DaffOrderActionTypes,\n} from '../../actions/order.actions';\nimport { daffGetOrderAdapter } from './order-entities-adapter';\nimport { daffOrderEntitiesInitialState } from './order-entities-initial-state';\nimport { DaffOrderEntityState } from './order-entities-state.interface';\n\n/**\n * Reducer function that catches actions and changes/overwrites order entities state.\n */\nexport function daffOrderEntitiesReducer<T extends DaffOrder = DaffOrder>(\n state = daffOrderEntitiesInitialState,\n action: DaffOrderActions<T>,\n): DaffOrderEntityState<T> {\n const adapter = daffGetOrderAdapter<T>();\n\n switch (action.type) {\n case DaffOrderActionTypes.OrderLoadSuccessAction:\n return adapter.upsertOne(action.payload, state);\n\n case DaffOrderActionTypes.OrderListSuccessAction:\n return adapter.upsertMany(action.payload, state);\n\n default:\n return state;\n }\n}\n","import { DaffOrderReducerState } from './order-reducer.interface';\n\nexport const daffOrderInitialState: DaffOrderReducerState = {\n loading: false,\n errors: [],\n};\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderActions,\n DaffOrderActionTypes,\n} from '../../actions/order.actions';\nimport { daffOrderInitialState } from './order-initial-state';\nimport { DaffOrderReducerState } from './order-reducer.interface';\n\nexport function daffOrderReducer<T extends DaffOrder = DaffOrder>(\n state = daffOrderInitialState,\n action: DaffOrderActions<T>,\n): DaffOrderReducerState {\n switch (action.type) {\n case DaffOrderActionTypes.OrderListAction:\n case DaffOrderActionTypes.OrderLoadAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffOrderActionTypes.OrderListSuccessAction:\n case DaffOrderActionTypes.OrderLoadSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffOrderActionTypes.OrderListFailureAction:\n case DaffOrderActionTypes.OrderLoadFailureAction:\n return {\n ...state,\n errors: [\n ...state.errors,\n action.payload,\n ],\n loading: false,\n };\n\n default:\n return state;\n }\n}\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { daffOrderEntitiesReducer } from './order-entities/public_api';\nimport { DaffOrderReducersState } from './order-reducers.interface';\nimport { daffOrderReducer } from './order/order.reducer';\n\nexport const daffOrderReducers: ActionReducerMap<DaffOrderReducersState> = {\n order: daffOrderReducer,\n orders: daffOrderEntitiesReducer,\n};\n","export const DAFF_ORDER_STORE_FEATURE_KEY = 'daffOrder';\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n DaffOrderReducersState,\n DAFF_ORDER_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\nexport interface DaffOrderFeatureSelector<T extends DaffOrder = DaffOrder> {\n selectOrderFeatureState: MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderReducersState<T>>;\n}\n\nexport const getDaffOrderReducersStateSelector = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderFeatureSelector<T> =>\n cache = cache || {\n selectOrderFeatureState: createFeatureSelector<DaffOrderReducersState<T>>(DAFF_ORDER_STORE_FEATURE_KEY),\n };\n})();\n","import { Dictionary } from '@ngrx/entity';\nimport {\n createSelector,\n defaultMemoize,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n getDaffCartSelectors,\n DaffCartStateRootSlice,\n} from '@daffodil/cart/state';\nimport {\n DaffOrder,\n DaffOrderItem,\n DaffOrderTotal,\n DaffOrderTotalTypeEnum,\n} from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n daffGetOrderAdapter,\n DaffOrderEntityState,\n} from '../reducers/public_api';\nimport { getDaffOrderReducersStateSelector } from './order-feature.selector';\n\nexport interface DaffOrderEntitySelectors<T extends DaffOrder = DaffOrder> {\n selectOrderEntitiesState: MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderEntityState<T>>;\n /**\n * Selector for order IDs.\n */\n selectOrderIds: MemoizedSelector<DaffOrderStateRootSlice<T>, T['id'][]>;\n /**\n * Selector for order entities.\n */\n selectOrderEntities: MemoizedSelector<DaffOrderStateRootSlice<T>, Dictionary<T>>;\n /**\n * Selector for all orders.\n */\n selectAllOrders: MemoizedSelector<DaffOrderStateRootSlice<T>, T[]>;\n /**\n * Selector for total number of orders.\n */\n selectOrderTotal: MemoizedSelector<DaffOrderStateRootSlice<T>, number>;\n selectOrder: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T>;\n\n /**\n * Selector for the most recently placed order (if any).\n */\n selectPlacedOrder: MemoizedSelector<DaffOrderStateRootSlice<T>, T>;\n /**\n * Selector for the existence of the most recently placed order.\n */\n selectHasPlacedOrder: MemoizedSelector<DaffOrderStateRootSlice<T>, boolean>;\n\n /**\n * Selects the specified order's totals.\n */\n selectOrderTotals: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['totals']>;\n /**\n * Selects the specified order's applied coupon codes.\n */\n selectOrderAppliedCodes: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['applied_codes']>;\n /**\n * Selects the specified order's items.\n */\n selectOrderItems: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['items']>;\n /**\n * Selects the specified order's billing addresses.\n */\n selectOrderBillingAddresses: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['billing_addresses']>;\n /**\n * Selects the specified order's shipping addresses.\n */\n selectOrderShippingTotalAddresses: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['shipping_addresses']>;\n /**\n * Selects the specified order's shipments.\n */\n selectOrderShipments: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['shipments']>;\n /**\n * Selects the specified order's payment.\n */\n selectOrderPayment: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['payment']>;\n /**\n * Selects the specified order's invoices.\n */\n selectOrderInvoices: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['invoices']>;\n /**\n * Selects the specified order's credits.\n */\n selectOrderCredits: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['credits']>;\n\n /**\n * Selects the specified order's specified item.\n */\n selectOrderItem: (orderId: T['id'], itemId: T['items'][0]['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderItem>;\n\n /**\n * Selects the specified order's grand total.\n */\n selectOrderGrandTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's subtotal.\n */\n selectOrderSubtotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's shipping total.\n */\n selectOrderShippingTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's discount total.\n */\n selectOrderDiscountTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects whether the specified order has a discount.\n */\n selectOrderHasDiscount: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, boolean>;\n /**\n * Selects the specified order's tax total.\n */\n selectOrderTaxTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n}\n\nconst createOrderEntitySelectors = <T extends DaffOrder = DaffOrder>() => {\n const { selectOrderFeatureState } = getDaffOrderReducersStateSelector<T>();\n const selectOrderEntitiesState = createSelector(\n selectOrderFeatureState,\n state => state.orders,\n );\n const { selectIds, selectEntities, selectAll, selectTotal } = daffGetOrderAdapter<T>().getSelectors(selectOrderEntitiesState);\n const { selectCartOrderId } = getDaffCartSelectors();\n\n const selectOrder: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectEntities,\n (orders: Dictionary<T>) => orders[orderId] || null,\n )).memoized;\n\n const selectPlacedOrder = createSelector(\n selectEntities,\n selectCartOrderId,\n (orders, orderId) => orderId ? selectOrder(orderId).projector(orders) : null,\n );\n\n const selectHasPlacedOrder = createSelector(\n selectPlacedOrder,\n placedOrder => !!placedOrder,\n );\n\n const selectOrderTotals: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['totals']> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.totals) || [],\n )).memoized;\n\n const selectOrderAppliedCodes = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.applied_codes) || [],\n )).memoized;\n\n const selectOrderItems: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['items']> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.items) || [],\n )).memoized;\n\n const selectOrderBillingAddresses = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.billing_addresses) || [],\n )).memoized;\n\n const selectOrderShippingTotalAddresses = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.shipping_addresses) || [],\n )).memoized;\n\n const selectOrderShipments = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.shipments) || [],\n )).memoized;\n\n const selectOrderPayment = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.payment) || null,\n )).memoized;\n\n const selectOrderInvoices = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.invoices) || [],\n )).memoized;\n\n const selectOrderCredits = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.credits) || [],\n )).memoized;\n\n const selectOrderGrandTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.GrandTotal);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderSubtotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Subtotal);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderShippingTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Shipping);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderDiscountTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Discount);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderHasDiscount = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderDiscountTotal(orderId),\n discountTotal => discountTotal?.value > 0,\n )).memoized;\n\n const selectOrderTaxTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Tax);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderItem = defaultMemoize((orderId: T['id'], itemId: T['items'][0]['id']) => createSelector(\n selectOrderItems(orderId),\n items => items.find(item => item.id === itemId) || null,\n )).memoized;\n\n return {\n selectOrderEntitiesState,\n selectOrderIds: selectIds,\n selectOrderEntities: selectEntities,\n selectAllOrders: selectAll,\n selectOrderTotal: selectTotal,\n\n selectPlacedOrder,\n selectHasPlacedOrder,\n\n selectOrder,\n selectOrderTotals,\n selectOrderAppliedCodes,\n selectOrderItems,\n selectOrderBillingAddresses,\n selectOrderShippingTotalAddresses,\n selectOrderShipments,\n selectOrderPayment,\n selectOrderInvoices,\n selectOrderCredits,\n selectOrderItem,\n\n selectOrderGrandTotal,\n selectOrderSubtotal,\n selectOrderShippingTotal,\n selectOrderDiscountTotal,\n selectOrderHasDiscount,\n selectOrderTaxTotal,\n };\n};\n\nexport const getDaffOrderEntitySelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderEntitySelectors<T> =>\n cache = cache || createOrderEntitySelectors<T>();\n})();\n\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n DaffOrderReducerState,\n} from '../reducers/public_api';\nimport { getDaffOrderReducersStateSelector } from './order-feature.selector';\n\nexport interface DaffOrderSelectors {\n selectOrderState: MemoizedSelector<DaffOrderStateRootSlice, DaffOrderReducerState>;\n selectOrderLoading: MemoizedSelector<DaffOrderStateRootSlice, boolean>;\n selectOrderErrors: MemoizedSelector<DaffOrderStateRootSlice, DaffStateError[]>;\n}\n\nconst createOrderSelectors = <T extends DaffOrder = DaffOrder>() => {\n const { selectOrderFeatureState } = getDaffOrderReducersStateSelector<T>();\n const selectOrderState = createSelector(\n selectOrderFeatureState,\n state => state.order,\n );\n\n const selectOrderLoading = createSelector(\n selectOrderState,\n state => state.loading,\n );\n\n const selectOrderErrors = createSelector(\n selectOrderState,\n state => state.errors,\n );\n\n return {\n selectOrderState,\n selectOrderLoading,\n selectOrderErrors,\n };\n};\n\nexport const getOrderSelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderSelectors =>\n cache = cache || createOrderSelectors<T>();\n})();\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderEntitySelectors,\n getDaffOrderEntitySelectors,\n} from './order-entities.selector';\nimport {\n DaffOrderFeatureSelector,\n getDaffOrderReducersStateSelector,\n} from './order-feature.selector';\nimport {\n DaffOrderSelectors,\n getOrderSelectors,\n} from './order.selector';\n\nexport interface DaffOrderAllSelectors<T extends DaffOrder = DaffOrder> extends\n DaffOrderEntitySelectors<T>,\n DaffOrderSelectors,\n DaffOrderFeatureSelector<T> {}\n\nexport const getDaffOrderSelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderAllSelectors<T> =>\n cache = cache || {\n ...getOrderSelectors<T>(),\n ...getDaffOrderEntitySelectors<T>(),\n ...getDaffOrderReducersStateSelector<T>(),\n };\n})();\n","import { Injectable } from '@angular/core';\nimport { Dictionary } from '@ngrx/entity';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport {\n DaffOrder,\n DaffOrderTotal,\n} from '@daffodil/order';\n\nimport { DaffOrderStateRootSlice } from '../../reducers/public_api';\nimport { DaffOrderEntitySelectors } from '../../selectors/order-entities.selector';\nimport { getDaffOrderSelectors } from '../../selectors/public_api';\nimport { DaffOrderFacadeInterface } from './order-facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderFacade<T extends DaffOrder = DaffOrder> implements DaffOrderFacadeInterface<T> {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n orders$: Observable<T[]>;\n orderIds$: Observable<T['id'][]>;\n orderCount$: Observable<number>;\n orderEntities$: Observable<Dictionary<T>>;\n\n placedOrder$: Observable<T>;\n hasPlacedOrder$: Observable<boolean>;\n\n _order: DaffOrderEntitySelectors<T>['selectOrder'];\n _totals: DaffOrderEntitySelectors<T>['selectOrderTotals'];\n _appliedCodes: DaffOrderEntitySelectors<T>['selectOrderAppliedCodes'];\n _items: DaffOrderEntitySelectors<T>['selectOrderItems'];\n _billingAddresses: DaffOrderEntitySelectors<T>['selectOrderBillingAddresses'];\n _shippingAddresses: DaffOrderEntitySelectors<T>['selectOrderShippingTotalAddresses'];\n _shipments: DaffOrderEntitySelectors<T>['selectOrderShipments'];\n _payment: DaffOrderEntitySelectors<T>['selectOrderPayment'];\n _invoices: DaffOrderEntitySelectors<T>['selectOrderInvoices'];\n _credits: DaffOrderEntitySelectors<T>['selectOrderCredits'];\n _grandTotal: DaffOrderEntitySelectors<T>['selectOrderGrandTotal'];\n _subtotal: DaffOrderEntitySelectors<T>['selectOrderSubtotal'];\n _shipping: DaffOrderEntitySelectors<T>['selectOrderShippingTotal'];\n _discount: DaffOrderEntitySelectors<T>['selectOrderDiscountTotal'];\n _hasDiscount: DaffOrderEntitySelectors<T>['selectOrderHasDiscount'];\n _tax: DaffOrderEntitySelectors<T>['selectOrderTaxTotal'];\n\n constructor(private store: Store<DaffOrderStateRootSlice<T>>) {\n const {\n selectOrderIds,\n selectOrderEntities,\n selectAllOrders,\n selectOrderTotal,\n selectOrderLoading,\n selectOrderErrors,\n\n selectPlacedOrder,\n selectHasPlacedOrder,\n\n selectOrder,\n selectOrderTotals,\n selectOrderAppliedCodes,\n selectOrderItems,\n selectOrderBillingAddresses,\n selectOrderShippingTotalAddresses,\n selectOrderShipments,\n selectOrderPayment,\n selectOrderInvoices,\n selectOrderCredits,\n\n selectOrderGrandTotal,\n selectOrderSubtotal,\n selectOrderShippingTotal,\n selectOrderDiscountTotal,\n selectOrderHasDiscount,\n selectOrderTaxTotal,\n } = getDaffOrderSelectors<T>();\n\n this.loading$ = this.store.pipe(select(selectOrderLoading));\n this.errors$ = this.store.pipe(select(selectOrderErrors));\n\n this.orders$ = this.store.pipe(select(selectAllOrders));\n this.orderIds$ = this.store.pipe(select(selectOrderIds));\n this.orderCount$ = this.store.pipe(select(selectOrderTotal));\n this.orderEntities$ = this.store.pipe(select(selectOrderEntities));\n\n this.placedOrder$ = this.store.pipe(select(selectPlacedOrder));\n this.hasPlacedOrder$ = this.store.pipe(select(selectHasPlacedOrder));\n\n this._order = selectOrder;\n this._totals = selectOrderTotals;\n this._appliedCodes = selectOrderAppliedCodes;\n this._items = selectOrderItems;\n this._billingAddresses = selectOrderBillingAddresses;\n this._shippingAddresses = selectOrderShippingTotalAddresses;\n this._shipments = selectOrderShipments;\n this._payment = selectOrderPayment;\n this._invoices = selectOrderInvoices;\n this._credits = selectOrderCredits;\n this._grandTotal = selectOrderGrandTotal;\n this._subtotal = selectOrderSubtotal;\n this._shipping = selectOrderShippingTotal;\n this._discount = selectOrderDiscountTotal;\n this._hasDiscount = selectOrderHasDiscount;\n this._tax = selectOrderTaxTotal;\n }\n\n getOrder$(orderId: T['id']): Observable<T> {\n return this.store.pipe(select(this._order(orderId)));\n }\n\n getTotals$(orderId: T['id']): Observable<T['totals']> {\n return this.store.pipe(select(this._totals(orderId)));\n }\n\n getAppliedCodes$(orderId: T['id']): Observable<T['applied_codes']> {\n return this.store.pipe(select(this._appliedCodes(orderId)));\n }\n\n getItems$(orderId: T['id']): Observable<T['items']> {\n return this.store.pipe(select(this._items(orderId)));\n }\n\n getBillingAddresses$(orderId: T['id']): Observable<T['billing_addresses']> {\n return this.store.pipe(select(this._billingAddresses(orderId)));\n }\n\n getShippingAddresses$(orderId: T['id']): Observable<T['shipping_addresses']> {\n return this.store.pipe(select(this._shippingAddresses(orderId)));\n }\n\n getShipments$(orderId: T['id']): Observable<T['shipments']> {\n return this.store.pipe(select(this._shipments(orderId)));\n }\n\n getPayment$(orderId: T['id']): Observable<T['payment']> {\n return this.store.pipe(select(this._payment(orderId)));\n }\n\n getInvoices$(orderId: T['id']): Observable<T['invoices']> {\n return this.store.pipe(select(this._invoices(orderId)));\n }\n\n getCredits$(orderId: T['id']): Observable<T['credits']> {\n return this.store.pipe(select(this._credits(orderId)));\n }\n\n getGrandTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._grandTotal(orderId)));\n };\n getSubtotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._subtotal(orderId)));\n };\n getShippingTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._shipping(orderId)));\n };\n getDiscountTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._discount(orderId)));\n };\n hasDiscount$(orderId: T['id']): Observable<boolean> {\n return this.store.pipe(select(this._hasDiscount(orderId)));\n };\n getTaxTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._tax(orderId)));\n };\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\nimport {\n DaffOrder,\n DAFF_ORDER_ERROR_MATCHER,\n} from '@daffodil/order';\nimport {\n DaffOrderServiceInterface,\n DaffOrderDriver,\n} from '@daffodil/order/driver';\n\nimport {\n DaffOrderActionTypes,\n DaffOrderLoad,\n DaffOrderLoadSuccess,\n DaffOrderLoadFailure,\n DaffOrderList,\n DaffOrderListSuccess,\n DaffOrderListFailure,\n} from '../actions/order.actions';\n\n@Injectable()\nexport class DaffOrderEffects<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffOrderDriver) private driver: DaffOrderServiceInterface<T>,\n @Inject(DAFF_ORDER_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n ) {}\n\n /**\n * An effect for the loading of an order.\n */\n\n get$ = createEffect(() => this.actions$.pipe(\n ofType(DaffOrderActionTypes.OrderLoadAction),\n switchMap((action: DaffOrderLoad<T, V>) =>\n this.driver.get(action.orderId, action.cartId).pipe(\n map(resp => new DaffOrderLoadSuccess<T>(resp)),\n catchError((error: DaffError) => of(new DaffOrderLoadFailure(this.errorMatcher(error)))),\n ),\n ),\n ));\n\n /**\n * An effect for the listing of orders.\n */\n\n list$ = createEffect(() => this.actions$.pipe(\n ofType(DaffOrderActionTypes.OrderListAction),\n switchMap((action: DaffOrderList) =>\n this.driver.list(action.payload).pipe(\n map(resp => new DaffOrderListSuccess<T>(resp)),\n catchError((error: DaffError) => of(new DaffOrderListFailure(this.errorMatcher(error)))),\n ),\n ),\n ));\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DaffCartStateModule } from '@daffodil/cart/state';\n\nimport { DaffOrderEffects } from './effects/order.effects';\nimport {\n DAFF_ORDER_STORE_FEATURE_KEY,\n daffOrderReducers,\n} from './reducers/public_api';\n\n@NgModule({\n imports: [\n DaffCartStateModule,\n EffectsModule.forFeature([\n DaffOrderEffects,\n ]),\n StoreModule.forFeature(DAFF_ORDER_STORE_FEATURE_KEY, daffOrderReducers),\n ],\n})\nexport class DaffOrderStateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;AAMY,IAAA,qBAOX;AAPD,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,iBAAA,CAAA,GAAA,2BAA6C,CAAA;AAC7C,IAAA,oBAAA,CAAA,wBAAA,CAAA,GAAA,mCAA4D,CAAA;AAC5D,IAAA,oBAAA,CAAA,wBAAA,CAAA,GAAA,mCAA4D,CAAA;AAC5D,IAAA,oBAAA,CAAA,iBAAA,CAAA,GAAA,2BAA6C,CAAA;AAC7C,IAAA,oBAAA,CAAA,wBAAA,CAAA,GAAA,mCAA4D,CAAA;AAC5D,IAAA,oBAAA,CAAA,wBAAA,CAAA,GAAA,mCAA4D,CAAA;AAC9D,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,GAO/B,EAAA,CAAA,CAAA,CAAA;AAED;;;;;AAKG;MACU,aAAa,CAAA;IAMxB,WAAmB,CAAA,OAAgB,EAAS,MAAgB,EAAA;AAAzC,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAS;AAAS,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAU;AAFnD,QAAA,IAAA,CAAA,IAAI,GAAG,oBAAoB,CAAC,eAAe,CAAC;KAEW;AACjE,CAAA;MAEY,oBAAoB,CAAA;AAG/B,IAAA,WAAA,CAAmB,OAAU,EAAA;AAAV,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAG;AAFpB,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ACxE,CAAA,EAAA,CAAA,CAAA;2FAEU,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAThC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,mBAAmB;wBACnB,aAAa,CAAC,UAAU,CAAC;4BACvB,gBAAgB;yBACjB,CAAC;AACF,wBAAA,WAAW,CAAC,UAAU,CAAC,4BAA4B,EAAE,iBAAiB,CAAC;AACxE,qBAAA;iBACF,CAAA;;;ACpBD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-order-testing.mjs","sources":["../../../libs/order/testing/src/factories/order-address.factory.ts","../../../libs/order/testing/src/factories/order-coupon.factory.ts","../../../libs/order/testing/src/factories/order-invoice.factory.ts","../../../libs/order/testing/src/factories/order-payment.factory.ts","../../../libs/order/testing/src/factories/order-item.factory.ts","../../../libs/order/testing/src/factories/composite-order-item.factory.ts","../../../libs/order/testing/src/factories/configurable-order-item.factory.ts","../../../libs/order/testing/src/factories/order-shipment-item.factory.ts","../../../libs/order/testing/src/factories/order-shipment-tracking.factory.ts","../../../libs/order/testing/src/factories/order-shipment.factory.ts","../../../libs/order/testing/src/factories/order-shipping-rate.factory.ts","../../../libs/order/testing/src/factories/order-total.factory.ts","../../../libs/order/testing/src/factories/order.factory.ts","../../../libs/order/testing/src/helpers/order-helper.ts","../../../libs/order/testing/src/daffodil-order-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MockDaffPersonalAddress } from '@daffodil/geography/testing';\nimport { DaffOrderAddress } from '@daffodil/order';\n\nexport class MockOrderAddress extends MockDaffPersonalAddress implements DaffOrderAddress {\n order_id = faker.datatype.uuid();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderAddressFactory extends DaffModelFactory<DaffOrderAddress> {\n constructor() {\n super(MockOrderAddress);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderCoupon } from '@daffodil/order';\n\nexport class MockOrderCoupon implements DaffOrderCoupon {\n code = faker.random.alphaNumeric(10);\n};\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderCouponFactory extends DaffModelFactory<DaffOrderCoupon>{\n constructor() {\n super(MockOrderCoupon);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderInvoice } from '@daffodil/order';\n\nexport class MockOrderInvoice implements DaffOrderInvoice {\n items = [];\n totals = [];\n billing_address = null;\n shipping_address = null;\n payment = null;\n shipping_method = null;\n};\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderInvoiceFactory extends DaffModelFactory<DaffOrderInvoice> {\n constructor() {\n super(MockOrderInvoice);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderPayment } from '@daffodil/order';\n\nexport class MockOrderPayment implements DaffOrderPayment {\n id = faker.datatype.uuid();\n payment_id = this.id;\n order_id = faker.datatype.uuid();\n created_at = faker.date.past().toString();\n updated_at = faker.date.past().toString();\n method = 'card';\n cc_type = 'visa';\n cc_last4 = faker.datatype.number({ min: 1000, max: 9999 }).toString();\n cc_owner = 'owner';\n cc_exp_month = 'month';\n cc_exp_year = 'year';\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderPaymentFactory extends DaffModelFactory<DaffOrderPayment>{\n constructor() {\n super(MockOrderPayment);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffOrderItem,\n DaffOrderItemType,\n} from '@daffodil/order';\n\nexport class MockOrderItem implements DaffOrderItem {\n id = faker.datatype.uuid();\n item_id = this.id;\n image = {\n url: faker.image.imageUrl(),\n id: faker.datatype.uuid(),\n label: faker.random.word(),\n };\n order_id = faker.datatype.uuid();\n qty_ordered = faker.datatype.number({ min: 1, max: 1000 });\n qty_canceled = faker.datatype.number({ min: 1, max: 1000 });\n qty_fulfilled = faker.datatype.number({ min: 1, max: 1000 });\n created_at = faker.date.past().toString();\n updated_at = faker.date.past().toString();\n product_id = faker.datatype.uuid();\n parent_item_id = faker.datatype.uuid();\n sku = faker.random.alphaNumeric(20);\n name = faker.random.word();\n weight = faker.datatype.number({ min: 1, max: 1000 });\n qty = faker.datatype.number({ min: 1, max: 10 });\n price = faker.datatype.number({ min: 1, max: 1000 });\n discount_amount = faker.datatype.number({ min: 1, max: this.price });\n discount_percent = Math.floor(this.discount_amount / this.price * 100);\n tax_percent = faker.datatype.number({ min: 1, max: 10 });\n tax_amount = faker.datatype.number({ min: 1, max: 10 });\n row_total = this.price * this.qty;\n row_total_with_discount = (this.price - this.discount_amount) * this.qty;\n row_weight = faker.datatype.number({ min: 1, max: 100 });\n tax_before_discount = faker.datatype.number({ min: 1, max: 100 });\n type = DaffOrderItemType.Simple;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderItemFactory extends DaffModelFactory<DaffOrderItem> {\n\n constructor(){\n super(MockOrderItem);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffCompositeOrderItem,\n DaffOrderItemType,\n} from '@daffodil/order';\n\nimport { MockOrderItem } from './order-item.factory';\n\nexport class MockCompositeOrderItem extends MockOrderItem implements DaffCompositeOrderItem {\n\ttype = DaffOrderItemType.Composite;\n\toptions = [\n\t {\n\t option_label: faker.random.word(),\n\t value_label: faker.random.word(),\n\t },\n\t {\n\t option_label: faker.random.word(),\n\t value_label: faker.random.word(),\n\t },\n\t];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCompositeOrderItemFactory extends DaffModelFactory<DaffCompositeOrderItem> {\n constructor() {\n super(MockCompositeOrderItem);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffConfigurableOrderItem,\n DaffOrderItemType,\n} from '@daffodil/order';\n\nimport { MockOrderItem } from './order-item.factory';\n\nexport class MockConfigurableOrderItem extends MockOrderItem implements DaffConfigurableOrderItem {\n\ttype = DaffOrderItemType.Configurable;\n\tattributes = [\n\t {\n\t attribute_label: 'Color',\n\t value_label: 'Red',\n\t },\n\t {\n\t attribute_label: 'Size',\n\t value_label: 'M',\n\t },\n\t];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffConfigurableOrderItemFactory extends DaffModelFactory<DaffConfigurableOrderItem> {\n constructor() {\n super(MockConfigurableOrderItem);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderShipmentItem } from '@daffodil/order';\n\nexport class MockOrderShipmentItem implements DaffOrderShipmentItem {\n item = null;\n qty = faker.datatype.number({ min: 1, max: 100 });\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderShipmentItemFactory extends DaffModelFactory<DaffOrderShipmentItem> {\n constructor() {\n super(MockOrderShipmentItem);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderShipmentTracking } from '@daffodil/order';\n\nexport class MockOrderShipmentTracking implements DaffOrderShipmentTracking {\n tracking_number = faker.random.alphaNumeric(16);\n tracking_url = faker.internet.url();\n carrier = faker.random.word();\n carrier_logo = faker.internet.url();\n title = faker.random.word();\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderShipmentTrackingFactory extends DaffModelFactory<DaffOrderShipmentTracking> {\n constructor() {\n super(MockOrderShipmentTracking);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderShipment } from '@daffodil/order';\n\nexport class MockOrderShipment implements DaffOrderShipment {\n tracking = [];\n items = [];\n carrier = faker.random.word();\n carrier_title = faker.random.word();\n code = faker.random.word();\n method = faker.random.word();\n method_description = faker.random.word();\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderShipmentFactory extends DaffModelFactory<DaffOrderShipment> {\n constructor() {\n super(MockOrderShipment);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderShippingMethod } from '@daffodil/order';\n\nexport class MockOrderShippingMethod implements DaffOrderShippingMethod {\n rate_id = faker.datatype.uuid();\n address_id = faker.datatype.uuid();\n order_id = faker.datatype.uuid();\n created_at = faker.date.past().toString();\n updated_at = faker.date.past().toString();\n carrier = faker.random.word();\n carrier_title = faker.random.word();\n code = faker.random.word();\n method = faker.random.word();\n method_description = faker.random.word();\n price = faker.datatype.number({ min: 1, max: 1000 });\n error_message = faker.random.word();\n method_title = faker.random.word();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderShippingMethodFactory extends DaffModelFactory<DaffOrderShippingMethod>{\n constructor(){\n super(MockOrderShippingMethod);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffOrderTotal,\n DaffOrderTotalTypeEnum,\n} from '@daffodil/order';\n\nexport class MockOrderTotal implements DaffOrderTotal {\n label = faker.random.word();\n value = faker.datatype.number({ min: 1, max: 100 });\n sort_order = faker.datatype.number({ min: 1, max: 100 });\n type = DaffOrderTotalTypeEnum.GrandTotal;\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderTotalFactory extends DaffModelFactory<DaffOrderTotal> {\n constructor() {\n super(MockOrderTotal);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrder } from '@daffodil/order';\n\nexport class MockOrder implements DaffOrder {\n id = faker.datatype.uuid();\n customer_id = faker.datatype.uuid();\n created_at = faker.date.past().toString();\n updated_at = faker.date.past().toString();\n status = faker.random.word();\n totals = [];\n applied_codes = [];\n items = [];\n billing_addresses = [];\n shipping_addresses = [];\n shipments = [];\n payment = null;\n invoices = [];\n credits = [];\n};\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderFactory extends DaffModelFactory<DaffOrder>{\n constructor() {\n super(MockOrder);\n }\n}\n","import { DaffOrder } from '@daffodil/order';\n\n/**\n * A helper function to verify that a model is a Order.\n *\n * @param order\n */\nexport function isOrder(order: DaffOrder): boolean {\n return !!order.id\n && !!order.customer_id\n && !!order.created_at\n && !!order.updated_at\n && !!order.status\n && !!order.applied_codes\n && !!order.totals;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAOM,MAAO,gBAAiB,SAAQ,uBAAuB,CAAA;AAA7D,IAAA,WAAA,GAAA;;QACE,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;KAClC;AAAA,CAAA;AAKK,MAAO,uBAAwB,SAAQ,gBAAkC,CAAA;AAC7E,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,gBAAgB,CAAC,CAAC;KACzB;;0JAHU,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,sCAAA,uBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA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;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-order-testing.mjs","sources":["../../../libs/order/testing/src/factories/order-address.factory.ts","../../../libs/order/testing/src/factories/order-coupon.factory.ts","../../../libs/order/testing/src/factories/order-invoice.factory.ts","../../../libs/order/testing/src/factories/order-payment.factory.ts","../../../libs/order/testing/src/factories/order-item.factory.ts","../../../libs/order/testing/src/factories/composite-order-item.factory.ts","../../../libs/order/testing/src/factories/configurable-order-item.factory.ts","../../../libs/order/testing/src/factories/order-shipment-item.factory.ts","../../../libs/order/testing/src/factories/order-shipment-tracking.factory.ts","../../../libs/order/testing/src/factories/order-shipment.factory.ts","../../../libs/order/testing/src/factories/order-shipping-rate.factory.ts","../../../libs/order/testing/src/factories/order-total.factory.ts","../../../libs/order/testing/src/factories/order.factory.ts","../../../libs/order/testing/src/helpers/order-helper.ts","../../../libs/order/testing/src/daffodil-order-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MockDaffPersonalAddress } from '@daffodil/geography/testing';\nimport { DaffOrderAddress } from '@daffodil/order';\n\nexport class MockOrderAddress extends MockDaffPersonalAddress implements DaffOrderAddress {\n order_id = faker.datatype.uuid();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderAddressFactory extends DaffModelFactory<DaffOrderAddress> {\n constructor() {\n super(MockOrderAddress);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderCoupon } from '@daffodil/order';\n\nexport class MockOrderCoupon implements DaffOrderCoupon {\n code = faker.random.alphaNumeric(10);\n};\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderCouponFactory extends DaffModelFactory<DaffOrderCoupon>{\n constructor() {\n super(MockOrderCoupon);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderInvoice } from '@daffodil/order';\n\nexport class MockOrderInvoice implements DaffOrderInvoice {\n items = [];\n totals = [];\n billing_address = null;\n shipping_address = null;\n payment = null;\n shipping_method = null;\n};\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderInvoiceFactory extends DaffModelFactory<DaffOrderInvoice> {\n constructor() {\n super(MockOrderInvoice);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderPayment } from '@daffodil/order';\n\nexport class MockOrderPayment implements DaffOrderPayment {\n id = faker.datatype.uuid();\n payment_id = this.id;\n order_id = faker.datatype.uuid();\n created_at = faker.date.past().toString();\n updated_at = faker.date.past().toString();\n method = 'card';\n cc_type = 'visa';\n cc_last4 = faker.datatype.number({ min: 1000, max: 9999 }).toString();\n cc_owner = 'owner';\n cc_exp_month = 'month';\n cc_exp_year = 'year';\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderPaymentFactory extends DaffModelFactory<DaffOrderPayment>{\n constructor() {\n super(MockOrderPayment);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffOrderItem,\n DaffOrderItemType,\n} from '@daffodil/order';\n\nexport class MockOrderItem implements DaffOrderItem {\n id = faker.datatype.uuid();\n item_id = this.id;\n image = {\n url: faker.image.imageUrl(),\n id: faker.datatype.uuid(),\n label: faker.random.word(),\n };\n order_id = faker.datatype.uuid();\n qty_ordered = faker.datatype.number({ min: 1, max: 1000 });\n qty_canceled = faker.datatype.number({ min: 1, max: 1000 });\n qty_fulfilled = faker.datatype.number({ min: 1, max: 1000 });\n created_at = faker.date.past().toString();\n updated_at = faker.date.past().toString();\n product_id = faker.datatype.uuid();\n parent_item_id = faker.datatype.uuid();\n sku = faker.random.alphaNumeric(20);\n name = faker.random.word();\n weight = faker.datatype.number({ min: 1, max: 1000 });\n qty = faker.datatype.number({ min: 1, max: 10 });\n price = faker.datatype.number({ min: 1, max: 1000 });\n discount_amount = faker.datatype.number({ min: 1, max: this.price });\n discount_percent = Math.floor(this.discount_amount / this.price * 100);\n tax_percent = faker.datatype.number({ min: 1, max: 10 });\n tax_amount = faker.datatype.number({ min: 1, max: 10 });\n row_total = this.price * this.qty;\n row_total_with_discount = (this.price - this.discount_amount) * this.qty;\n row_weight = faker.datatype.number({ min: 1, max: 100 });\n tax_before_discount = faker.datatype.number({ min: 1, max: 100 });\n type = DaffOrderItemType.Simple;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderItemFactory extends DaffModelFactory<DaffOrderItem> {\n\n constructor(){\n super(MockOrderItem);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffCompositeOrderItem,\n DaffOrderItemType,\n} from '@daffodil/order';\n\nimport { MockOrderItem } from './order-item.factory';\n\nexport class MockCompositeOrderItem extends MockOrderItem implements DaffCompositeOrderItem {\n type = DaffOrderItemType.Composite;\n options = [\n\t {\n\t option_label: faker.random.word(),\n\t value_label: faker.random.word(),\n\t },\n\t {\n\t option_label: faker.random.word(),\n\t value_label: faker.random.word(),\n\t },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCompositeOrderItemFactory extends DaffModelFactory<DaffCompositeOrderItem> {\n constructor() {\n super(MockCompositeOrderItem);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffConfigurableOrderItem,\n DaffOrderItemType,\n} from '@daffodil/order';\n\nimport { MockOrderItem } from './order-item.factory';\n\nexport class MockConfigurableOrderItem extends MockOrderItem implements DaffConfigurableOrderItem {\n type = DaffOrderItemType.Configurable;\n attributes = [\n\t {\n\t attribute_label: 'Color',\n\t value_label: 'Red',\n\t },\n\t {\n\t attribute_label: 'Size',\n\t value_label: 'M',\n\t },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffConfigurableOrderItemFactory extends DaffModelFactory<DaffConfigurableOrderItem> {\n constructor() {\n super(MockConfigurableOrderItem);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderShipmentItem } from '@daffodil/order';\n\nexport class MockOrderShipmentItem implements DaffOrderShipmentItem {\n item = null;\n qty = faker.datatype.number({ min: 1, max: 100 });\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderShipmentItemFactory extends DaffModelFactory<DaffOrderShipmentItem> {\n constructor() {\n super(MockOrderShipmentItem);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderShipmentTracking } from '@daffodil/order';\n\nexport class MockOrderShipmentTracking implements DaffOrderShipmentTracking {\n tracking_number = faker.random.alphaNumeric(16);\n tracking_url = faker.internet.url();\n carrier = faker.random.word();\n carrier_logo = faker.internet.url();\n title = faker.random.word();\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderShipmentTrackingFactory extends DaffModelFactory<DaffOrderShipmentTracking> {\n constructor() {\n super(MockOrderShipmentTracking);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderShipment } from '@daffodil/order';\n\nexport class MockOrderShipment implements DaffOrderShipment {\n tracking = [];\n items = [];\n carrier = faker.random.word();\n carrier_title = faker.random.word();\n code = faker.random.word();\n method = faker.random.word();\n method_description = faker.random.word();\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderShipmentFactory extends DaffModelFactory<DaffOrderShipment> {\n constructor() {\n super(MockOrderShipment);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrderShippingMethod } from '@daffodil/order';\n\nexport class MockOrderShippingMethod implements DaffOrderShippingMethod {\n rate_id = faker.datatype.uuid();\n address_id = faker.datatype.uuid();\n order_id = faker.datatype.uuid();\n created_at = faker.date.past().toString();\n updated_at = faker.date.past().toString();\n carrier = faker.random.word();\n carrier_title = faker.random.word();\n code = faker.random.word();\n method = faker.random.word();\n method_description = faker.random.word();\n price = faker.datatype.number({ min: 1, max: 1000 });\n error_message = faker.random.word();\n method_title = faker.random.word();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderShippingMethodFactory extends DaffModelFactory<DaffOrderShippingMethod>{\n constructor(){\n super(MockOrderShippingMethod);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffOrderTotal,\n DaffOrderTotalTypeEnum,\n} from '@daffodil/order';\n\nexport class MockOrderTotal implements DaffOrderTotal {\n label = faker.random.word();\n value = faker.datatype.number({ min: 1, max: 100 });\n sort_order = faker.datatype.number({ min: 1, max: 100 });\n type = DaffOrderTotalTypeEnum.GrandTotal;\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderTotalFactory extends DaffModelFactory<DaffOrderTotal> {\n constructor() {\n super(MockOrderTotal);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffOrder } from '@daffodil/order';\n\nexport class MockOrder implements DaffOrder {\n id = faker.datatype.uuid();\n customer_id = faker.datatype.uuid();\n created_at = faker.date.past().toString();\n updated_at = faker.date.past().toString();\n status = faker.random.word();\n totals = [];\n applied_codes = [];\n items = [];\n billing_addresses = [];\n shipping_addresses = [];\n shipments = [];\n payment = null;\n invoices = [];\n credits = [];\n};\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderFactory extends DaffModelFactory<DaffOrder>{\n constructor() {\n super(MockOrder);\n }\n}\n","import { DaffOrder } from '@daffodil/order';\n\n/**\n * A helper function to verify that a model is a Order.\n *\n * @param order\n */\nexport function isOrder(order: DaffOrder): boolean {\n return !!order.id\n && !!order.customer_id\n && !!order.created_at\n && !!order.updated_at\n && !!order.status\n && !!order.applied_codes\n && !!order.totals;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAOM,MAAO,gBAAiB,SAAQ,uBAAuB,CAAA;AAA7D,IAAA,WAAA,GAAA;;QACE,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;KAClC;AAAA,CAAA;AAKK,MAAO,uBAAwB,SAAQ,gBAAkC,CAAA;AAC7E,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,gBAAgB,CAAC,CAAC;KACzB;;0JAHU,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,sCAAA,uBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cAFtB,MAAM,EAAA,CAAA,CAAA;2FAEP,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;MCPY,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;QACE,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,C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AAAA,CAAC;AAMI,MAAO,gBAAiB,SAAQ,gBAA2B,CAAA;AAC/D,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,SAAS,CAAC,CAAC;KAClB;;mJAHU,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,sCAAA,gBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA,CAAA;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACxBD;;;;AAIG;AACG,SAAU,OAAO,CAAC,KAAgB,EAAA;AACtC,IAAA,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE;WACZ,CAAC,CAAC,KAAK,CAAC,WAAW;WACnB,CAAC,CAAC,KAAK,CAAC,UAAU;WAClB,CAAC,CAAC,KAAK,CAAC,UAAU;WAClB,CAAC,CAAC,KAAK,CAAC,MAAM;WACd,CAAC,CAAC,KAAK,CAAC,aAAa;AACrB,WAAA,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;AACtB;;ACfA;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-order.mjs","sources":["../../../libs/order/src/models/order-item.ts","../../../libs/order/src/models/order-total.ts","../../../libs/order/src/injection-tokens/error-matcher.token.ts","../../../libs/order/src/daffodil-order.ts"],"sourcesContent":["import {\n DaffIdentifiable,\n ID,\n} from '@daffodil/core';\nimport { DaffProductImage } from '@daffodil/product';\n\nimport { DaffOrder } from './order';\n\nexport enum DaffOrderItemType {\n Simple = 'simple',\n Composite = 'composite',\n Configurable = 'configurable'\n}\n\nexport interface DaffOrderItem extends DaffIdentifiable {\n type: DaffOrderItemType;\n\t/**\n\t * @deprecated use id instead.\n\t */\n item_id: ID;\n qty_ordered: number;\n qty_canceled: number;\n qty_fulfilled: number;\n image: DaffProductImage;\n order_id: DaffOrder['id'];\n created_at: string;\n updated_at: string;\n product_id: ID;\n parent_item_id: ID;\n sku: string;\n name: string;\n weight: number;\n qty: number;\n price: number;\n discount_percent: number;\n discount_amount: number;\n tax_percent: number;\n tax_amount: number;\n row_total: number;\n row_total_with_discount: number;\n row_weight: number;\n tax_before_discount: number;\n}\n","export enum DaffOrderTotalTypeEnum {\n GrandTotal = 'grand_total',\n Subtotal = 'subtotal',\n Discount = 'discount',\n Tax = 'tax',\n Shipping = 'shipping'\n}\n\nexport interface DaffOrderTotal {\n label: string;\n value: number;\n sort_order: number;\n type: DaffOrderTotalTypeEnum;\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { daffTransformErrorToStateError } from '@daffodil/core/state';\n\n/**\n * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.\n * Can be used to further refine Daffodil errors into more specific app errors.\n */\nexport const DAFF_ORDER_ERROR_MATCHER = new InjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_ORDER_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAQY,IAAA,kBAIX;AAJD,CAAA,UAAY,iBAAiB,EAAA;AAC3B,IAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,iBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB,CAAA;AACvB,IAAA,iBAAA,CAAA,cAAA,CAAA,GAAA,cAA6B,CAAA;AAC/B,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,GAI5B,EAAA,CAAA,CAAA;;ACZW,IAAA,uBAMX;AAND,CAAA,UAAY,sBAAsB,EAAA;AAChC,IAAA,sBAAA,CAAA,YAAA,CAAA,GAAA,aAA0B,CAAA;AAC1B,IAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,sBAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACvB,CAAC,EANW,sBAAsB,KAAtB,sBAAsB,GAMjC,EAAA,CAAA,CAAA;;ACFD;;;AAGG;AACU,MAAA,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B,EAC1B,EAAE,OAAO,EAAE,MAAM,8BAA8B,EAAE;;ACVnD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-order.mjs","sources":["../../../libs/order/src/models/order-item.ts","../../../libs/order/src/models/order-total.ts","../../../libs/order/src/injection-tokens/error-matcher.token.ts","../../../libs/order/src/daffodil-order.ts"],"sourcesContent":["import {\n DaffIdentifiable,\n ID,\n} from '@daffodil/core';\nimport { DaffProductImage } from '@daffodil/product';\n\nimport { DaffOrder } from './order';\n\nexport enum DaffOrderItemType {\n Simple = 'simple',\n Composite = 'composite',\n Configurable = 'configurable'\n}\n\nexport interface DaffOrderItem extends DaffIdentifiable {\n type: DaffOrderItemType;\n /**\n * @deprecated use id instead.\n */\n item_id: ID;\n qty_ordered: number;\n qty_canceled: number;\n qty_fulfilled: number;\n image: DaffProductImage;\n order_id: DaffOrder['id'];\n created_at: string;\n updated_at: string;\n product_id: ID;\n parent_item_id: ID;\n sku: string;\n name: string;\n weight: number;\n qty: number;\n price: number;\n discount_percent: number;\n discount_amount: number;\n tax_percent: number;\n tax_amount: number;\n row_total: number;\n row_total_with_discount: number;\n row_weight: number;\n tax_before_discount: number;\n}\n","export enum DaffOrderTotalTypeEnum {\n GrandTotal = 'grand_total',\n Subtotal = 'subtotal',\n Discount = 'discount',\n Tax = 'tax',\n Shipping = 'shipping'\n}\n\nexport interface DaffOrderTotal {\n label: string;\n value: number;\n sort_order: number;\n type: DaffOrderTotalTypeEnum;\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { daffTransformErrorToStateError } from '@daffodil/core/state';\n\n/**\n * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.\n * Can be used to further refine Daffodil errors into more specific app errors.\n */\nexport const DAFF_ORDER_ERROR_MATCHER = new InjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_ORDER_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAQY,IAAA,kBAIX;AAJD,CAAA,UAAY,iBAAiB,EAAA;AAC3B,IAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,iBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB,CAAA;AACvB,IAAA,iBAAA,CAAA,cAAA,CAAA,GAAA,cAA6B,CAAA;AAC/B,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,GAI5B,EAAA,CAAA,CAAA;;ACZW,IAAA,uBAMX;AAND,CAAA,UAAY,sBAAsB,EAAA;AAChC,IAAA,sBAAA,CAAA,YAAA,CAAA,GAAA,aAA0B,CAAA;AAC1B,IAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,sBAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACvB,CAAC,EANW,sBAAsB,KAAtB,sBAAsB,GAMjC,EAAA,CAAA,CAAA;;ACFD;;;AAGG;AACU,MAAA,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B,EAC1B,EAAE,OAAO,EAAE,MAAM,8BAA8B,EAAE;;ACVnD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-order-driver-magento-2.4.0.mjs","sources":["../../../libs/order/driver/magento/2.4.0/src/transforms/responses/order.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-address.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-payment.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-item.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment-item.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-invoice.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment-tracking.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order.ts","../../../libs/order/driver/magento/2.4.0/src/queries/get-guest-orders.ts","../../../libs/order/driver/magento/2.4.0/src/injection-tokens/fragments/order.ts","../../../libs/order/driver/magento/2.4.0/src/errors/codes.ts","../../../libs/order/driver/magento/2.4.0/src/errors/map.ts","../../../libs/order/driver/magento/2.4.0/src/errors/transform.ts","../../../libs/order/driver/magento/2.4.0/src/validators/get-orders.ts","../../../libs/order/driver/magento/2.4.0/src/order.service.ts","../../../libs/order/driver/magento/2.4.0/src/order-driver.module.ts","../../../libs/order/driver/magento/2.4.0/src/daffodil-order-driver-magento-2.4.0.ts"],"sourcesContent":["import {\n DaffOrder,\n DaffOrderTotal,\n DaffOrderItem,\n DaffOrderAddress,\n DaffOrderShipment,\n DaffOrderShipmentItem,\n DaffOrderShipmentTracking,\n DaffOrderPayment,\n DaffOrderInvoice,\n DaffOrderTotalTypeEnum,\n DaffOrderItemType,\n} from '@daffodil/order';\n\nimport {\n MagentoGraycoreOrder,\n MagentoGraycoreOrderItem,\n MagentoGraycoreOrderShipment,\n MagentoGraycoreOrderAddress,\n MagentoGraycoreOrderShipmentItem,\n MagentoGraycoreOrderShipmentTracking,\n MagentoGraycoreOrderPayment,\n MagentoGraycoreOrderInvoice,\n} from '../../models/responses/public_api';\n\nfunction transformTotals(totals: {\n grand_total: number;\n subtotal: number;\n shipping: number;\n discount: number;\n tax: number;\n}): DaffOrderTotal[] {\n return [\n {\n label: 'Grand Total',\n type: DaffOrderTotalTypeEnum.GrandTotal,\n value: totals.grand_total,\n sort_order: 1,\n },\n {\n label: 'Subtotal',\n type: DaffOrderTotalTypeEnum.Subtotal,\n value: totals.subtotal,\n sort_order: 0,\n },\n {\n label: 'Shipping',\n type: DaffOrderTotalTypeEnum.Shipping,\n value: totals.shipping,\n sort_order: 2,\n },\n {\n label: 'Tax',\n type: DaffOrderTotalTypeEnum.Tax,\n value: totals.tax,\n sort_order: 3,\n },\n {\n label: 'Discount',\n type: DaffOrderTotalTypeEnum.Discount,\n value: totals.discount,\n sort_order: 4,\n },\n ];\n}\n\nfunction transformItem(item: MagentoGraycoreOrderItem): DaffOrderItem {\n return {\n id: null,\n item_id: null,\n type: DaffOrderItemType.Simple,\n qty_ordered: item.qty_ordered,\n qty_canceled: item.qty_canceled,\n qty_fulfilled: item.qty_fulfilled,\n qty: item.qty,\n image: {\n url: item.image,\n id: null,\n label: null,\n },\n order_id: item.order_id,\n created_at: item.created_at,\n updated_at: item.updated_at,\n product_id: String(item.product_id),\n parent_item_id: null,\n sku: item.sku,\n name: item.name,\n weight: item.weight,\n price: item.price,\n discount_percent: item.discount_percent,\n discount_amount: item.discount_amount,\n tax_percent: item.tax_percent,\n tax_amount: item.tax_amount,\n row_total: item.row_total,\n row_total_with_discount: item.row_total_with_discount,\n row_weight: item.row_weight,\n tax_before_discount: item.tax_before_discount,\n };\n}\n\nfunction transformAddress(address: MagentoGraycoreOrderAddress): DaffOrderAddress {\n return {\n order_id: String(address.order_id),\n prefix: address.prefix,\n suffix: address.suffix,\n firstname: address.firstname,\n middlename: address.middlename,\n lastname: address.lastname,\n telephone: address.telephone,\n email: address.email,\n street: address.street[0],\n street2: address.street[1],\n city: address.city,\n region: address.region_id,\n country: address.country_code,\n postcode: address.postcode,\n };\n}\n\nfunction transformShipmentItem(shipmentItem: MagentoGraycoreOrderShipmentItem): DaffOrderShipmentItem {\n return {\n item: transformItem(shipmentItem.item),\n qty: shipmentItem.qty,\n };\n}\n\nfunction transformShipmentTracking(tracking: MagentoGraycoreOrderShipmentTracking): DaffOrderShipmentTracking {\n return {\n tracking_number: tracking.tracking_number,\n tracking_url: null,\n carrier: tracking.carrier,\n title: tracking.title,\n carrier_logo: null,\n };\n}\n\nfunction transformShipment(shipment: MagentoGraycoreOrderShipment): DaffOrderShipment {\n return {\n carrier: null,\n carrier_title: null,\n code: null,\n method: null,\n method_description: null,\n tracking: shipment.tracking.map(transformShipmentTracking),\n items: shipment.items.map(transformShipmentItem),\n };\n}\n\nfunction transformPayment(payment: MagentoGraycoreOrderPayment): DaffOrderPayment {\n return {\n id: String(payment.payment_id),\n payment_id: String(payment.payment_id),\n order_id: String(payment.order_id),\n created_at: null,\n updated_at: null,\n method: payment.method,\n cc_type: payment.cc_type,\n cc_last4: payment.cc_last4,\n cc_owner: payment.cc_owner,\n cc_exp_month: payment.cc_exp_month,\n cc_exp_year: payment.cc_exp_year,\n };\n}\n\nfunction transformInvoice(invoice: MagentoGraycoreOrderInvoice): DaffOrderInvoice {\n return {\n totals: transformTotals(invoice),\n billing_address: transformAddress(invoice.billing_address),\n shipping_address: transformAddress(invoice.shipping_address),\n payment: transformPayment(invoice.payment),\n items: invoice.items.map(transformShipmentItem),\n shipping_method: null,\n };\n}\n\n/**\n * Transforms the MagentoGraycoreOrder from the magento order query into a DaffOrder.\n */\nexport function daffMagentoTransformOrder(order: MagentoGraycoreOrder): DaffOrder {\n return {\n extra_attributes: order,\n\n id: String(order.order_number),\n customer_id: String(order.customer_id),\n created_at: order.created_at,\n updated_at: order.updated_at,\n status: order.status,\n\n totals: transformTotals(order),\n applied_codes: order.applied_codes.map(code => ({ code })),\n items: order.items.map(transformItem),\n billing_addresses: [\n transformAddress(order.billing_address),\n ],\n shipping_addresses: [\n transformAddress(order.shipping_address),\n ],\n shipments: order.shipments.map(transformShipment),\n payment: transformPayment(order.payment),\n invoices: order.invoices.map(transformInvoice),\n credits: order.credits.map(transformInvoice),\n };\n}\n","import { gql } from 'apollo-angular';\n\n\nexport const orderAddressFragment = gql`\n fragment orderAddress on GraycoreOrderAddress {\n order_id\n prefix\n suffix\n firstname\n middlename\n lastname\n telephone\n email\n street\n city\n region\n region_id\n country_code\n postcode\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderPaymentFragment = gql`\n fragment orderPayment on GraycoreOrderPayment {\n payment_id\n order_id\n method\n cc_type\n cc_last4\n cc_owner\n cc_exp_month\n cc_exp_year\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderItemFragment = gql`\n fragment orderItem on GraycoreOrderItem {\n qty_ordered\n image\n qty_canceled\n qty_fulfilled\n order_id\n created_at\n updated_at\n product_id\n sku\n name\n weight\n qty\n price\n discount_percent\n discount_amount\n tax_percent\n tax_amount\n row_total\n row_total_with_discount\n row_weight\n tax_before_discount\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderShipmentItemFragment = gql`\n fragment orderShipmentItem on GraycoreOrderShipmentItem {\n qty\n item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentItemFragment } from './order-shipment-item';\n\nexport const orderInvoiceFragment = gql`\n fragment orderInvoice on GraycoreOrderInvoice {\n items {\n ...orderShipmentItem\n }\n grand_total\n subtotal\n shipping\n discount\n tax\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n\t\t}\n\t\tpayment {\n\t\t\t...orderPayment\n\t\t}\n }\n ${orderShipmentItemFragment}\n ${orderAddressFragment}\n ${orderPaymentFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderShipmentTrackingFragment = gql`\n fragment orderShipmentTracking on GraycoreOrderShipmentTracking {\n tracking_number\n carrier\n title\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderShipmentItemFragment } from './order-shipment-item';\nimport { orderShipmentTrackingFragment } from './order-shipment-tracking';\n\nexport const orderShipmentFragment = gql`\n fragment orderShipment on GraycoreOrderShipment {\n tracking {\n ...orderShipmentTracking\n }\n items {\n ...orderShipmentItem\n }\n }\n ${orderShipmentItemFragment}\n ${orderShipmentTrackingFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderInvoiceFragment } from './order-invoice';\nimport { orderItemFragment } from './order-item';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentFragment } from './order-shipment';\n\nexport const orderFragment = gql`\n fragment order on GraycoreOrder {\n id\n order_number\n customer_id\n created_at\n updated_at\n grand_total\n subtotal\n shipping\n discount\n tax\n status\n applied_codes\n items {\n ...orderItem\n }\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n }\n shipments {\n ...orderShipment\n }\n payment {\n ...orderPayment\n }\n invoices {\n ...orderInvoice\n }\n credits {\n ...orderInvoice\n }\n }\n ${orderItemFragment}\n ${orderShipmentFragment}\n ${orderPaymentFragment}\n ${orderInvoiceFragment}\n ${orderAddressFragment}\n`;\n","import { gql } from 'apollo-angular';\nimport { DocumentNode } from 'graphql';\n\nimport {\n daffBuildFragmentNameSpread,\n daffBuildFragmentDefinition,\n} from '@daffodil/core/graphql';\n\nimport { orderFragment } from './fragments/public_api';\n\nexport const getGuestOrders = (extraOrderFragments: DocumentNode[] = []) => gql`\n query MagentoGetGuestOrders($cartId: String!) {\n graycoreGuestOrders(cartId: $cartId) {\n orders {\n ...order\n ${daffBuildFragmentNameSpread(...extraOrderFragments)}\n }\n }\n }\n ${orderFragment}\n ${daffBuildFragmentDefinition(...extraOrderFragments)}\n`;\n","import { InjectionToken } from '@angular/core';\nimport { DocumentNode } from 'graphql';\n\n/**\n * An multi-provider injection token for providing extra GraphQL fragments that will be spread into order queries.\n * This can be used to retrieve additional data that is not covered by the standard Daffodil interfaces.\n * The data will appear in DaffOrder#extra_attributes.\n *\n * Fragment structure is platform-specific and this feature should be used with care.\n */\nexport const DaffMagentoExtraOrderFragments = new InjectionToken<DocumentNode[]>('DaffMagentoExtraOrderFragments', { factory: () => []});\n","export enum MagentoOrderGraphQlErrorCode {\n\tCART_NOT_FOUND = 'graphql-no-such-entity',\n}\n","import { DaffCartNotFoundError } from '@daffodil/cart/driver';\nimport { DaffErrorCodeMap } from '@daffodil/core';\n\nimport { MagentoOrderGraphQlErrorCode } from './codes';\n\nexport const DaffOrderMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoOrderGraphQlErrorCode.CART_NOT_FOUND]: DaffCartNotFoundError,\n};\n","import { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffOrderMagentoErrorMap } from './map';\n\nexport function transformMagentoOrderError(error: any) {\n return daffTransformMagentoError(error, DaffOrderMagentoErrorMap);\n}\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffOrderInvalidAPIResponseError } from '@daffodil/order/driver';\n\nimport { MagentoGetGuestOrdersResponse } from '../queries/public_api';\n\nexport const validateGetOrdersResponse = (response: ApolloQueryResult<MagentoGetGuestOrdersResponse>) => {\n if (response.data?.graycoreGuestOrders?.orders) {\n if (response.data.graycoreGuestOrders.orders.reduce((acc, order) => acc && !!(\n order.billing_address\n && order.shipping_address\n && order.payment\n ), true)) {\n return response;\n } else {\n throw new DaffOrderInvalidAPIResponseError('One of the orders does not contain required fields.');\n }\n } else {\n throw new DaffOrderInvalidAPIResponseError('Get orders response does not contain a valid list of orders.');\n }\n};\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport { DocumentNode } from 'graphql';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffOrder } from '@daffodil/order';\nimport {\n DaffOrderServiceInterface,\n DaffOrderNotFoundError,\n} from '@daffodil/order/driver';\n\nimport { transformMagentoOrderError } from './errors/transform';\nimport { DaffMagentoExtraOrderFragments } from './injection-tokens/public_api';\nimport {\n getGuestOrders,\n MagentoGetGuestOrdersResponse,\n} from './queries/public_api';\nimport { daffMagentoTransformOrder } from './transforms/responses/order';\nimport { validateGetOrdersResponse } from './validators/public_api';\n\n/**\n * A service for making Magento GraphQL queries for orders.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderMagentoService implements DaffOrderServiceInterface {\n constructor(\n private apollo: Apollo,\n @Inject(DaffMagentoExtraOrderFragments) public extraOrderFragments: DocumentNode[],\n ) {}\n\n list(cartId?: DaffCart['id']): Observable<DaffOrder[]> {\n return this.apollo.query<MagentoGetGuestOrdersResponse>({\n query: getGuestOrders(this.extraOrderFragments),\n variables: {\n cartId,\n },\n }).pipe(\n map(validateGetOrdersResponse),\n map(result => result.data.graycoreGuestOrders.orders.map(daffMagentoTransformOrder)),\n catchError(err => throwError(() => transformMagentoOrderError(err))),\n );\n }\n\n get(orderId: DaffOrder['id'], cartId?: DaffCart['id']): Observable<DaffOrder> {\n return this.list(cartId).pipe(\n map(orders => {\n for (const order of orders) {\n if (order.id === orderId) {\n return order;\n }\n }\n\n // order not found\n throw new DaffOrderNotFoundError(`Could not find an order with ID ${orderId}`);\n }),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DaffOrderDriver } from '@daffodil/order/driver';\n\nimport { DaffOrderMagentoService } from './order.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffOrderMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffOrderMagentoDriverModule> {\n return {\n ngModule: DaffOrderMagentoDriverModule,\n providers: [\n {\n provide: DaffOrderDriver,\n useExisting: DaffOrderMagentoService,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n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AAA,EAAA,4BAA4B,EAJ9B,OAAA,EAAA,CAAA;YACP,YAAY;AACb,SAAA,CAAA,EAAA,CAAA,CAAA;2FAEU,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBALxC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-order-driver-magento-2.4.0.mjs","sources":["../../../libs/order/driver/magento/2.4.0/src/transforms/responses/order.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-address.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-payment.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-item.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment-item.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-invoice.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment-tracking.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order.ts","../../../libs/order/driver/magento/2.4.0/src/queries/get-guest-orders.ts","../../../libs/order/driver/magento/2.4.0/src/injection-tokens/fragments/order.ts","../../../libs/order/driver/magento/2.4.0/src/errors/codes.ts","../../../libs/order/driver/magento/2.4.0/src/errors/map.ts","../../../libs/order/driver/magento/2.4.0/src/errors/transform.ts","../../../libs/order/driver/magento/2.4.0/src/validators/get-orders.ts","../../../libs/order/driver/magento/2.4.0/src/order.service.ts","../../../libs/order/driver/magento/2.4.0/src/order-driver.module.ts","../../../libs/order/driver/magento/2.4.0/src/daffodil-order-driver-magento-2.4.0.ts"],"sourcesContent":["import {\n DaffOrder,\n DaffOrderTotal,\n DaffOrderItem,\n DaffOrderAddress,\n DaffOrderShipment,\n DaffOrderShipmentItem,\n DaffOrderShipmentTracking,\n DaffOrderPayment,\n DaffOrderInvoice,\n DaffOrderTotalTypeEnum,\n DaffOrderItemType,\n} from '@daffodil/order';\n\nimport {\n MagentoGraycoreOrder,\n MagentoGraycoreOrderItem,\n MagentoGraycoreOrderShipment,\n MagentoGraycoreOrderAddress,\n MagentoGraycoreOrderShipmentItem,\n MagentoGraycoreOrderShipmentTracking,\n MagentoGraycoreOrderPayment,\n MagentoGraycoreOrderInvoice,\n} from '../../models/responses/public_api';\n\nfunction transformTotals(totals: {\n grand_total: number;\n subtotal: number;\n shipping: number;\n discount: number;\n tax: number;\n}): DaffOrderTotal[] {\n return [\n {\n label: 'Grand Total',\n type: DaffOrderTotalTypeEnum.GrandTotal,\n value: totals.grand_total,\n sort_order: 1,\n },\n {\n label: 'Subtotal',\n type: DaffOrderTotalTypeEnum.Subtotal,\n value: totals.subtotal,\n sort_order: 0,\n },\n {\n label: 'Shipping',\n type: DaffOrderTotalTypeEnum.Shipping,\n value: totals.shipping,\n sort_order: 2,\n },\n {\n label: 'Tax',\n type: DaffOrderTotalTypeEnum.Tax,\n value: totals.tax,\n sort_order: 3,\n },\n {\n label: 'Discount',\n type: DaffOrderTotalTypeEnum.Discount,\n value: totals.discount,\n sort_order: 4,\n },\n ];\n}\n\nfunction transformItem(item: MagentoGraycoreOrderItem): DaffOrderItem {\n return {\n id: null,\n item_id: null,\n type: DaffOrderItemType.Simple,\n qty_ordered: item.qty_ordered,\n qty_canceled: item.qty_canceled,\n qty_fulfilled: item.qty_fulfilled,\n qty: item.qty,\n image: {\n url: item.image,\n id: null,\n label: null,\n },\n order_id: item.order_id,\n created_at: item.created_at,\n updated_at: item.updated_at,\n product_id: String(item.product_id),\n parent_item_id: null,\n sku: item.sku,\n name: item.name,\n weight: item.weight,\n price: item.price,\n discount_percent: item.discount_percent,\n discount_amount: item.discount_amount,\n tax_percent: item.tax_percent,\n tax_amount: item.tax_amount,\n row_total: item.row_total,\n row_total_with_discount: item.row_total_with_discount,\n row_weight: item.row_weight,\n tax_before_discount: item.tax_before_discount,\n };\n}\n\nfunction transformAddress(address: MagentoGraycoreOrderAddress): DaffOrderAddress {\n return {\n order_id: String(address.order_id),\n prefix: address.prefix,\n suffix: address.suffix,\n firstname: address.firstname,\n middlename: address.middlename,\n lastname: address.lastname,\n telephone: address.telephone,\n email: address.email,\n street: address.street[0],\n street2: address.street[1],\n city: address.city,\n region: address.region_id,\n country: address.country_code,\n postcode: address.postcode,\n };\n}\n\nfunction transformShipmentItem(shipmentItem: MagentoGraycoreOrderShipmentItem): DaffOrderShipmentItem {\n return {\n item: transformItem(shipmentItem.item),\n qty: shipmentItem.qty,\n };\n}\n\nfunction transformShipmentTracking(tracking: MagentoGraycoreOrderShipmentTracking): DaffOrderShipmentTracking {\n return {\n tracking_number: tracking.tracking_number,\n tracking_url: null,\n carrier: tracking.carrier,\n title: tracking.title,\n carrier_logo: null,\n };\n}\n\nfunction transformShipment(shipment: MagentoGraycoreOrderShipment): DaffOrderShipment {\n return {\n carrier: null,\n carrier_title: null,\n code: null,\n method: null,\n method_description: null,\n tracking: shipment.tracking.map(transformShipmentTracking),\n items: shipment.items.map(transformShipmentItem),\n };\n}\n\nfunction transformPayment(payment: MagentoGraycoreOrderPayment): DaffOrderPayment {\n return {\n id: String(payment.payment_id),\n payment_id: String(payment.payment_id),\n order_id: String(payment.order_id),\n created_at: null,\n updated_at: null,\n method: payment.method,\n cc_type: payment.cc_type,\n cc_last4: payment.cc_last4,\n cc_owner: payment.cc_owner,\n cc_exp_month: payment.cc_exp_month,\n cc_exp_year: payment.cc_exp_year,\n };\n}\n\nfunction transformInvoice(invoice: MagentoGraycoreOrderInvoice): DaffOrderInvoice {\n return {\n totals: transformTotals(invoice),\n billing_address: transformAddress(invoice.billing_address),\n shipping_address: transformAddress(invoice.shipping_address),\n payment: transformPayment(invoice.payment),\n items: invoice.items.map(transformShipmentItem),\n shipping_method: null,\n };\n}\n\n/**\n * Transforms the MagentoGraycoreOrder from the magento order query into a DaffOrder.\n */\nexport function daffMagentoTransformOrder(order: MagentoGraycoreOrder): DaffOrder {\n return {\n extra_attributes: order,\n\n id: String(order.order_number),\n customer_id: String(order.customer_id),\n created_at: order.created_at,\n updated_at: order.updated_at,\n status: order.status,\n\n totals: transformTotals(order),\n applied_codes: order.applied_codes.map(code => ({ code })),\n items: order.items.map(transformItem),\n billing_addresses: [\n transformAddress(order.billing_address),\n ],\n shipping_addresses: [\n transformAddress(order.shipping_address),\n ],\n shipments: order.shipments.map(transformShipment),\n payment: transformPayment(order.payment),\n invoices: order.invoices.map(transformInvoice),\n credits: order.credits.map(transformInvoice),\n };\n}\n","import { gql } from 'apollo-angular';\n\n\nexport const orderAddressFragment = gql`\n fragment orderAddress on GraycoreOrderAddress {\n order_id\n prefix\n suffix\n firstname\n middlename\n lastname\n telephone\n email\n street\n city\n region\n region_id\n country_code\n postcode\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderPaymentFragment = gql`\n fragment orderPayment on GraycoreOrderPayment {\n payment_id\n order_id\n method\n cc_type\n cc_last4\n cc_owner\n cc_exp_month\n cc_exp_year\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderItemFragment = gql`\n fragment orderItem on GraycoreOrderItem {\n qty_ordered\n image\n qty_canceled\n qty_fulfilled\n order_id\n created_at\n updated_at\n product_id\n sku\n name\n weight\n qty\n price\n discount_percent\n discount_amount\n tax_percent\n tax_amount\n row_total\n row_total_with_discount\n row_weight\n tax_before_discount\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderShipmentItemFragment = gql`\n fragment orderShipmentItem on GraycoreOrderShipmentItem {\n qty\n item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentItemFragment } from './order-shipment-item';\n\nexport const orderInvoiceFragment = gql`\n fragment orderInvoice on GraycoreOrderInvoice {\n items {\n ...orderShipmentItem\n }\n grand_total\n subtotal\n shipping\n discount\n tax\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n\t\t}\n\t\tpayment {\n\t\t\t...orderPayment\n\t\t}\n }\n ${orderShipmentItemFragment}\n ${orderAddressFragment}\n ${orderPaymentFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderShipmentTrackingFragment = gql`\n fragment orderShipmentTracking on GraycoreOrderShipmentTracking {\n tracking_number\n carrier\n title\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderShipmentItemFragment } from './order-shipment-item';\nimport { orderShipmentTrackingFragment } from './order-shipment-tracking';\n\nexport const orderShipmentFragment = gql`\n fragment orderShipment on GraycoreOrderShipment {\n tracking {\n ...orderShipmentTracking\n }\n items {\n ...orderShipmentItem\n }\n }\n ${orderShipmentItemFragment}\n ${orderShipmentTrackingFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderInvoiceFragment } from './order-invoice';\nimport { orderItemFragment } from './order-item';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentFragment } from './order-shipment';\n\nexport const orderFragment = gql`\n fragment order on GraycoreOrder {\n id\n order_number\n customer_id\n created_at\n updated_at\n grand_total\n subtotal\n shipping\n discount\n tax\n status\n applied_codes\n items {\n ...orderItem\n }\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n }\n shipments {\n ...orderShipment\n }\n payment {\n ...orderPayment\n }\n invoices {\n ...orderInvoice\n }\n credits {\n ...orderInvoice\n }\n }\n ${orderItemFragment}\n ${orderShipmentFragment}\n ${orderPaymentFragment}\n ${orderInvoiceFragment}\n ${orderAddressFragment}\n`;\n","import { gql } from 'apollo-angular';\nimport { DocumentNode } from 'graphql';\n\nimport {\n daffBuildFragmentNameSpread,\n daffBuildFragmentDefinition,\n} from '@daffodil/core/graphql';\n\nimport { orderFragment } from './fragments/public_api';\n\nexport const getGuestOrders = (extraOrderFragments: DocumentNode[] = []) => gql`\n query MagentoGetGuestOrders($cartId: String!) {\n graycoreGuestOrders(cartId: $cartId) {\n orders {\n ...order\n ${daffBuildFragmentNameSpread(...extraOrderFragments)}\n }\n }\n }\n ${orderFragment}\n ${daffBuildFragmentDefinition(...extraOrderFragments)}\n`;\n","import { InjectionToken } from '@angular/core';\nimport { DocumentNode } from 'graphql';\n\n/**\n * An multi-provider injection token for providing extra GraphQL fragments that will be spread into order queries.\n * This can be used to retrieve additional data that is not covered by the standard Daffodil interfaces.\n * The data will appear in DaffOrder#extra_attributes.\n *\n * Fragment structure is platform-specific and this feature should be used with care.\n */\nexport const DaffMagentoExtraOrderFragments = new InjectionToken<DocumentNode[]>('DaffMagentoExtraOrderFragments', { factory: () => []});\n","export enum MagentoOrderGraphQlErrorCode {\n CART_NOT_FOUND = 'graphql-no-such-entity',\n}\n","import { DaffCartNotFoundError } from '@daffodil/cart/driver';\nimport { DaffErrorCodeMap } from '@daffodil/core';\n\nimport { MagentoOrderGraphQlErrorCode } from './codes';\n\nexport const DaffOrderMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoOrderGraphQlErrorCode.CART_NOT_FOUND]: DaffCartNotFoundError,\n};\n","import { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffOrderMagentoErrorMap } from './map';\n\nexport function transformMagentoOrderError(error: any) {\n return daffTransformMagentoError(error, DaffOrderMagentoErrorMap);\n}\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffOrderInvalidAPIResponseError } from '@daffodil/order/driver';\n\nimport { MagentoGetGuestOrdersResponse } from '../queries/public_api';\n\nexport const validateGetOrdersResponse = (response: ApolloQueryResult<MagentoGetGuestOrdersResponse>) => {\n if (response.data?.graycoreGuestOrders?.orders) {\n if (response.data.graycoreGuestOrders.orders.reduce((acc, order) => acc && !!(\n order.billing_address\n && order.shipping_address\n && order.payment\n ), true)) {\n return response;\n } else {\n throw new DaffOrderInvalidAPIResponseError('One of the orders does not contain required fields.');\n }\n } else {\n throw new DaffOrderInvalidAPIResponseError('Get orders response does not contain a valid list of orders.');\n }\n};\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport { DocumentNode } from 'graphql';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffOrder } from '@daffodil/order';\nimport {\n DaffOrderServiceInterface,\n DaffOrderNotFoundError,\n} from '@daffodil/order/driver';\n\nimport { transformMagentoOrderError } from './errors/transform';\nimport { DaffMagentoExtraOrderFragments } from './injection-tokens/public_api';\nimport {\n getGuestOrders,\n MagentoGetGuestOrdersResponse,\n} from './queries/public_api';\nimport { daffMagentoTransformOrder } from './transforms/responses/order';\nimport { validateGetOrdersResponse } from './validators/public_api';\n\n/**\n * A service for making Magento GraphQL queries for orders.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderMagentoService implements DaffOrderServiceInterface {\n constructor(\n private apollo: Apollo,\n @Inject(DaffMagentoExtraOrderFragments) public extraOrderFragments: DocumentNode[],\n ) {}\n\n list(cartId?: DaffCart['id']): Observable<DaffOrder[]> {\n return this.apollo.query<MagentoGetGuestOrdersResponse>({\n query: getGuestOrders(this.extraOrderFragments),\n variables: {\n cartId,\n },\n }).pipe(\n map(validateGetOrdersResponse),\n map(result => result.data.graycoreGuestOrders.orders.map(daffMagentoTransformOrder)),\n catchError(err => throwError(() => transformMagentoOrderError(err))),\n );\n }\n\n get(orderId: DaffOrder['id'], cartId?: DaffCart['id']): Observable<DaffOrder> {\n return this.list(cartId).pipe(\n map(orders => {\n for (const order of orders) {\n if (order.id === orderId) {\n return order;\n }\n }\n\n // order not found\n throw new DaffOrderNotFoundError(`Could not find an order with ID ${orderId}`);\n }),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DaffOrderDriver } from '@daffodil/order/driver';\n\nimport { DaffOrderMagentoService } from './order.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffOrderMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffOrderMagentoDriverModule> {\n return {\n ngModule: DaffOrderMagentoDriverModule,\n providers: [\n {\n provide: DaffOrderDriver,\n useExisting: DaffOrderMagentoService,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyBA,SAAS,eAAe,CAAC,MAMxB,EAAA;IACC,OAAO;AACL,QAAA;AACE,YAAA,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,sBAAsB,CAAC,UAAU;YACvC,KAAK,EAAE,MAAM,CAAC,WAAW;AACzB,YAAA,UAAU,EAAE,CAAC;AACd,SAAA;AACD,QAAA;AACE,YAAA,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,sBAAsB,CAAC,QAAQ;YACrC,KAAK,EAAE,MAAM,CAAC,QAAQ;AACtB,YAAA,UAAU,EAAE,CAAC;AACd,SAAA;AACD,QAAA;AACE,YAAA,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,sBAAsB,CAAC,QAAQ;YACrC,KAAK,EAAE,MAAM,CAAC,QAAQ;AACtB,YAAA,UAAU,EAAE,CAAC;AACd,SAAA;AACD,QAAA;AACE,YAAA,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,sBAAsB,CAAC,GAAG;YAChC,KAAK,EAAE,MAAM,CAAC,GAAG;AACjB,YAAA,UAAU,EAAE,CAAC;AACd,SAAA;AACD,QAAA;AACE,YAAA,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,sBAAsB,CAAC,QAAQ;YACrC,KAAK,EAAE,MAAM,CAAC,QAAQ;AACtB,YAAA,UAAU,EAAE,CAAC;AACd,SAAA;KACF,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,IAA8B,EAAA;IACnD,OAAO;AACL,QAAA,EAAE,EA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