@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.
- package/esm2020/driver/magento/2.4.0/errors/codes.mjs +1 -1
- package/esm2020/driver/magento/2.4.1/errors/codes.mjs +1 -1
- package/esm2020/models/composite-order-item.mjs +1 -1
- package/esm2020/models/configurable-order-item.mjs +1 -1
- package/esm2020/models/order-item.mjs +1 -1
- package/esm2020/models/order-payment.mjs +1 -1
- package/esm2020/routing/guards/placed-order/placed-order.guard.mjs +1 -1
- package/esm2020/state/effects/order.effects.mjs +1 -1
- package/esm2020/state/facades/order/order-facade.interface.mjs +1 -1
- package/esm2020/state/selectors/order-entities.selector.mjs +1 -1
- package/esm2020/testing/factories/composite-order-item.factory.mjs +1 -1
- package/esm2020/testing/factories/configurable-order-item.factory.mjs +1 -1
- package/fesm2015/daffodil-order-driver-magento-2.4.0.mjs.map +1 -1
- package/fesm2015/daffodil-order-driver-magento-2.4.1.mjs.map +1 -1
- package/fesm2015/daffodil-order-routing.mjs.map +1 -1
- package/fesm2015/daffodil-order-state.mjs.map +1 -1
- package/fesm2015/daffodil-order-testing.mjs.map +1 -1
- package/fesm2015/daffodil-order.mjs.map +1 -1
- package/fesm2020/daffodil-order-driver-magento-2.4.0.mjs.map +1 -1
- package/fesm2020/daffodil-order-driver-magento-2.4.1.mjs.map +1 -1
- package/fesm2020/daffodil-order-routing.mjs.map +1 -1
- package/fesm2020/daffodil-order-state.mjs.map +1 -1
- package/fesm2020/daffodil-order-testing.mjs.map +1 -1
- package/fesm2020/daffodil-order.mjs.map +1 -1
- package/package.json +5 -5
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-order-driver-magento-2.4.1.mjs","sources":["../../../libs/order/driver/magento/2.4.1/src/models/responses/order-item.ts","../../../libs/order/driver/magento/2.4.1/src/transforms/responses/order.ts","../../../libs/order/driver/magento/2.4.1/src/models/responses/order-invoice-item.ts","../../../libs/order/driver/magento/2.4.1/src/models/responses/order-shipment-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-address.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-credit-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-credit-total.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-credit.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-invoice-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-invoice-total.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-invoice.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-payment.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-shipment-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-shipment-tracking.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-shipment.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-total.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order.ts","../../../libs/order/driver/magento/2.4.1/src/queries/get-guest-orders.ts","../../../libs/order/driver/magento/2.4.1/src/injection-tokens/fragments/order.ts","../../../libs/order/driver/magento/2.4.1/src/errors/codes.ts","../../../libs/order/driver/magento/2.4.1/src/errors/map.ts","../../../libs/order/driver/magento/2.4.1/src/errors/transform.ts","../../../libs/order/driver/magento/2.4.1/src/validators/get-orders.ts","../../../libs/order/driver/magento/2.4.1/src/order.service.ts","../../../libs/order/driver/magento/2.4.1/src/order-driver.module.ts","../../../libs/order/driver/magento/2.4.1/src/daffodil-order-driver-magento-2.4.1.ts"],"sourcesContent":["import { MagentoMoney } from '@daffodil/driver/magento';\n\nimport { MagentoDiscount } from './discount';\n\nexport enum MagentoOrderItemType {\n Simple = 'simple',\n Configurable = 'configurable',\n Bundle = 'bundle'\n};\n\nexport type MagentoOrderItemTypenames =\n 'OrderItem' |\n 'BundleOrderItem' |\n 'GiftCardOrderItem' |\n 'DownloadableOrderItem';\n\nexport interface MagentoOrderItemOption {\n __typename?: string;\n label: string;\n value: string;\n};\n\nexport interface MagentoOrderItem {\n __typename?: MagentoOrderItemTypenames;\n discounts: MagentoDiscount[];\n product_name: string;\n product_sale_price: MagentoMoney;\n product_sku: string;\n product_type: MagentoOrderItemType;\n product_url_key: string;\n quantity_canceled: number;\n quantity_invoiced: number;\n quantity_ordered: number;\n quantity_refunded: number;\n quantity_returned: number;\n quantity_shipped: number;\n selected_options: MagentoOrderItemOption[];\n entered_options: MagentoOrderItemOption[];\n status: string;\n}\n\nexport interface MagentoOrderBundleItemSelectedOption {\n __typename?: string;\n label: string;\n values: MagentoOrderBundleItemSelectedOptionValue[];\n};\n\nexport interface MagentoOrderBundleItemSelectedOptionValue {\n price: MagentoMoney;\n product_name: string;\n product_sku: string;\n quantity: number;\n};\n\nexport interface MagentoOrderBundleItem extends MagentoOrderItem {\n bundle_options: MagentoOrderBundleItemSelectedOption[];\n};\n","import {\n daffAdd,\n daffSubtract,\n} from '@daffodil/core';\nimport {\n DaffOrder,\n DaffOrderTotal,\n DaffOrderItem,\n DaffOrderAddress,\n DaffOrderShipment,\n DaffOrderShipmentItem,\n DaffOrderShipmentTracking,\n DaffOrderPayment,\n DaffOrderInvoice,\n DaffOrderTotalTypeEnum,\n DaffCompositeOrderItemOption,\n DaffOrderItemType,\n DaffConfigurableOrderItemAttribute,\n DaffOrderCoupon,\n} from '@daffodil/order';\n\nimport { MagentoDiscount } from '../../models/responses/discount';\nimport { MagentoOrderCredit } from '../../models/responses/order-credit';\nimport { MagentoOrderCreditItem } from '../../models/responses/order-credit-item';\nimport { MagentoOrderInvoiceItem } from '../../models/responses/order-invoice-item';\nimport {\n MagentoOrderBundleItem,\n MagentoOrderBundleItemSelectedOption,\n MagentoOrderItemOption,\n MagentoOrderItemType,\n} from '../../models/responses/order-item';\nimport { MagentoOrderTotal } from '../../models/responses/order-total';\nimport {\n MagentoOrder,\n MagentoOrderItem,\n MagentoOrderShipment,\n MagentoOrderAddress,\n MagentoOrderShipmentItem,\n MagentoOrderShipmentTracking,\n MagentoOrderPayment,\n MagentoOrderInvoice,\n} from '../../models/responses/public_api';\n\nfunction transformTotals(totals: MagentoOrderTotal): DaffOrderTotal[] {\n return [\n {\n label: 'Grand Total',\n type: DaffOrderTotalTypeEnum.GrandTotal,\n value: totals.grand_total.value,\n sort_order: 1,\n },\n {\n label: 'Subtotal',\n type: DaffOrderTotalTypeEnum.Subtotal,\n value: totals.subtotal.value,\n sort_order: 0,\n },\n {\n label: 'Shipping',\n type: DaffOrderTotalTypeEnum.Shipping,\n value: totals.total_shipping.value,\n sort_order: 2,\n },\n {\n label: 'Tax',\n type: DaffOrderTotalTypeEnum.Tax,\n value: totals.total_tax.value,\n sort_order: 3,\n },\n {\n label: 'Discount',\n type: DaffOrderTotalTypeEnum.Discount,\n value: totals.discounts.reduce((acc, discount) => daffAdd(acc, discount.amount.value), 0),\n sort_order: 4,\n },\n ];\n}\n\nfunction transformCouponDiscount(discount: MagentoDiscount): DaffOrderCoupon {\n return {\n code: discount.label,\n };\n}\n\nfunction transformConfigurableOption(option: MagentoOrderItemOption): DaffConfigurableOrderItemAttribute {\n return {\n attribute_label: option.label,\n\t value_label: option.value,\n };\n}\n\nfunction transformBundleOption(option: MagentoOrderBundleItemSelectedOption): DaffCompositeOrderItemOption {\n return {\n option_label: option.label,\n\t value_label: option.values && option.values[0] && option.values[0].product_name,\n };\n}\n\nfunction transformAdditionalItemFields(item: MagentoOrderItem) {\n switch (item.product_type) {\n case MagentoOrderItemType.Bundle:\n return {\n type: DaffOrderItemType.Composite,\n options: (<MagentoOrderBundleItem>item).bundle_options.map(transformBundleOption),\n };\n case MagentoOrderItemType.Configurable:\n return {\n type: DaffOrderItemType.Configurable,\n attributes: item.selected_options.map(transformConfigurableOption),\n };\n case MagentoOrderItemType.Simple:\n return {\n type: DaffOrderItemType.Simple,\n };\n default:\n return {};\n }\n}\n\nfunction transformItem(item: MagentoOrderItem, order: MagentoOrder, qty: number): DaffOrderItem {\n const discount = item.discounts.reduce((acc, d) => daffAdd(acc, d.amount.value), 0);\n const rowTotal = qty * item.product_sale_price.value;\n const rowTotalWithDiscount = qty * daffSubtract(item.product_sale_price.value, discount);\n\n return {\n type: DaffOrderItemType.Simple,\n id: null,\n item_id: null,\n qty_ordered: item.quantity_ordered,\n qty_canceled: item.quantity_canceled,\n qty_fulfilled: item.quantity_shipped,\n qty,\n image: {\n url: item.product_url_key,\n id: null,\n label: null,\n },\n order_id: order.id,\n created_at: null,\n updated_at: null,\n product_id: null,\n parent_item_id: null,\n sku: item.product_sku,\n name: item.product_name,\n weight: null,\n price: item.product_sale_price.value,\n discount_percent: Math.floor(discount / item.product_sale_price.value * 100),\n discount_amount: discount,\n tax_percent: null,\n tax_amount: null,\n row_total: rowTotal,\n row_total_with_discount: rowTotalWithDiscount,\n row_weight: null,\n tax_before_discount: null,\n ...transformAdditionalItemFields(item),\n };\n}\n\nfunction transformAddress(address: MagentoOrderAddress, order: MagentoOrder): DaffOrderAddress {\n return {\n order_id: 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: null,\n street: address.street[0],\n street2: address.street[1],\n city: address.city,\n region: address.region_code,\n country: address.country_code,\n postcode: address.postcode,\n };\n}\n\nfunction transformShipmentItem(shipmentItem: MagentoOrderShipmentItem, order: MagentoOrder): DaffOrderShipmentItem {\n return {\n item: transformItem(shipmentItem.order_item, order, shipmentItem.quantity_shipped),\n qty: shipmentItem.quantity_shipped,\n };\n}\n\nfunction transformShipmentTracking(tracking: MagentoOrderShipmentTracking): DaffOrderShipmentTracking {\n return {\n tracking_number: tracking.number,\n tracking_url: null,\n carrier: tracking.carrier,\n title: tracking.title,\n carrier_logo: null,\n };\n}\n\nfunction transformShipment(shipment: MagentoOrderShipment, order: MagentoOrder): DaffOrderShipment {\n return {\n carrier: order.carrier,\n carrier_title: null,\n code: null,\n method: order.shipping_method,\n method_description: null,\n tracking: shipment.tracking.map(transformShipmentTracking),\n items: shipment.items.map(item => transformShipmentItem(item, order)),\n };\n}\n\nfunction transformPayment(payment: MagentoOrderPayment, order: MagentoOrder): DaffOrderPayment {\n const findAdditionalData = key => {\n const index = payment.additional_data.findIndex(({ name }) => name === key);\n\n return index > -1 ? payment.additional_data[index].value : null;\n };\n return {\n id: null,\n payment_id: null,\n order_id: order.id,\n created_at: null,\n updated_at: null,\n method: payment.type,\n cc_type: findAdditionalData('cc_type'),\n cc_last4: findAdditionalData('cc_last4'),\n cc_owner: findAdditionalData('cc_owner'),\n cc_exp_month: findAdditionalData('cc_exp_month'),\n cc_exp_year: findAdditionalData('cc_exp_year'),\n };\n}\n\nfunction transformInvoiceItem(invoiceItem: MagentoOrderInvoiceItem, order: MagentoOrder): DaffOrderShipmentItem {\n return {\n item: transformItem(invoiceItem.order_item, order, invoiceItem.quantity_invoiced),\n qty: invoiceItem.quantity_invoiced,\n };\n}\n\nfunction transformInvoice(invoice: MagentoOrderInvoice, order: MagentoOrder, payment: MagentoOrderPayment): DaffOrderInvoice {\n return {\n totals: transformTotals(invoice.total),\n billing_address: transformAddress(order.billing_address, order),\n shipping_address: transformAddress(order.shipping_address, order),\n payment: transformPayment(payment, order),\n items: invoice.items.map(item => transformInvoiceItem(item, order)),\n shipping_method: null,\n };\n}\n\nfunction transformCreditItem(creditItem: MagentoOrderCreditItem, order: MagentoOrder): DaffOrderShipmentItem {\n return {\n item: transformItem(creditItem.order_item, order, creditItem.quantity_refunded),\n qty: creditItem.quantity_refunded,\n };\n}\n\nfunction transformCredit(credit: MagentoOrderCredit, order: MagentoOrder): DaffOrderInvoice {\n return {\n totals: transformTotals(credit.total),\n billing_address: transformAddress(order.billing_address, order),\n shipping_address: transformAddress(order.shipping_address, order),\n payment: transformPayment(order.payment_methods[0], order),\n items: credit.items.map(item => transformCreditItem(item, order)),\n shipping_method: null,\n };\n}\n\n/**\n * Transforms the MagentoOrder from the magento order query into a DaffOrder.\n */\nexport function daffMagentoTransformOrder(order: MagentoOrder): DaffOrder {\n return {\n extra_attributes: order,\n\n id: order.number,\n customer_id: null,\n updated_at: null,\n created_at: order.order_date,\n status: order.status,\n\n totals: transformTotals(order.total),\n applied_codes: order.total.discounts.map(transformCouponDiscount),\n items: order.items.map(item => transformItem(item, order, item.quantity_ordered)),\n billing_addresses: [\n transformAddress(order.billing_address, order),\n ],\n shipping_addresses: [\n transformAddress(order.shipping_address, order),\n ],\n shipments: order.shipments.map(shipment => transformShipment(shipment, order)),\n payment: transformPayment(order.payment_methods[0], order),\n // TODO: find out if the index is the correct payment for invoice\n invoices: order.invoices.map((invoice, index) => transformInvoice(invoice, order, order.payment_methods[index])),\n credits: order.credit_memos.map(credit => transformCredit(credit, order)),\n };\n}\n","import {\n MagentoOrderBundleItemSelectedOption,\n MagentoOrderItem,\n} from './order-item';\n\nexport type MagentoOrderInvoiceItemTypenames =\n 'InvoiceItem' |\n 'BundleInvoiceItem' |\n 'GiftCardInvoiceItem' |\n 'DownloadableInvoiceItem';\n\nexport interface MagentoOrderInvoiceItem {\n __typename?: MagentoOrderInvoiceItemTypenames;\n order_item: MagentoOrderItem;\n quantity_invoiced: number;\n};\n\nexport interface MagentoOrderInvoiceBundleItem extends MagentoOrderInvoiceItem {\n bundle_options: MagentoOrderBundleItemSelectedOption[];\n};\n","import {\n MagentoOrderBundleItemSelectedOption,\n MagentoOrderItem,\n} from './order-item';\n\nexport type MagentoOrderShipmentItemTypenames =\n 'ShipmentItem' |\n 'BundleShipmentItem' |\n 'GiftCardShipmentItem';\n\nexport interface MagentoOrderShipmentItem {\n __typename?: MagentoOrderShipmentItemTypenames;\n order_item: MagentoOrderItem;\n quantity_shipped: number;\n};\n\nexport interface MagentoOrderShipmentBundleItem extends MagentoOrderShipmentItem {\n bundle_options: MagentoOrderBundleItemSelectedOption[];\n};\n","import { gql } from 'apollo-angular';\n\n\nexport const orderAddressFragment = gql`\n fragment orderAddress on OrderAddress {\n city\n company\n country_code\n fax\n firstname\n middlename\n lastname\n postcode\n prefix\n region\n region_code\n street\n suffix\n telephone\n }\n`;\n","import { gql } from 'apollo-angular';\n\nexport const orderBundleItemSelectedOptionFragment = gql`\n fragment orderBundleItemSelectedOption on ItemSelectedBundleOption {\n label\n values {\n product_name\n }\n }\n`;\n\nexport const orderItemFragment = gql`\n fragment orderItem on OrderItemInterface {\n quantity_ordered\n quantity_canceled\n quantity_shipped\n quantity_invoiced\n product_url_key\n product_sku\n product_name\n product_type\n product_sale_price {\n value\n }\n discounts {\n amount {\n value\n }\n }\n selected_options {\n label\n value\n }\n ... on BundleOrderItem {\n bundle_options {\n ...orderBundleItemSelectedOption\n }\n }\n }\n ${orderBundleItemSelectedOptionFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderCreditItemFragment = gql`\n fragment orderCreditItem on CreditMemoItemInterface {\n quantity_refunded\n order_item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderCreditTotalFragment = gql`\n fragment orderCreditTotal on CreditMemoTotal {\n discounts {\n amount {\n value\n }\n label\n }\n grand_total {\n value\n }\n subtotal {\n value\n }\n total_tax {\n value\n }\n total_shipping {\n value\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderCreditItemFragment } from './order-credit-item';\nimport { orderCreditTotalFragment } from './order-credit-total';\n\nexport const orderCreditFragment = gql`\n fragment orderCredit on CreditMemo {\n items {\n ...orderCreditItem\n }\n total {\n ...orderCreditTotal\n }\n }\n ${orderCreditItemFragment}\n ${orderCreditTotalFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderInvoiceItemFragment = gql`\n fragment orderInvoiceItem on InvoiceItemInterface {\n quantity_invoiced\n order_item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderInvoiceTotalFragment = gql`\n fragment orderInvoiceTotal on InvoiceTotal {\n discounts {\n amount {\n value\n }\n label\n }\n grand_total {\n value\n }\n subtotal {\n value\n }\n total_tax {\n value\n }\n total_shipping {\n value\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderInvoiceItemFragment } from './order-invoice-item';\nimport { orderInvoiceTotalFragment } from './order-invoice-total';\n\nexport const orderInvoiceFragment = gql`\n fragment orderInvoice on Invoice {\n items {\n ...orderInvoiceItem\n }\n total {\n ...orderInvoiceTotal\n }\n }\n ${orderInvoiceItemFragment}\n ${orderInvoiceTotalFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderPaymentFragment = gql`\n fragment orderPayment on OrderPaymentMethod {\n name\n type\n additional_data {\n name\n value\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderShipmentItemFragment = gql`\n fragment orderShipmentItem on ShipmentItemInterface {\n quantity_shipped\n order_item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderShipmentTrackingFragment = gql`\n fragment orderShipmentTracking on ShipmentTracking {\n 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 OrderShipment {\n tracking {\n ...orderShipmentTracking\n }\n items {\n ...orderShipmentItem\n }\n }\n ${orderShipmentItemFragment}\n ${orderShipmentTrackingFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderTotalFragment = gql`\n fragment orderTotal on OrderTotal {\n discounts {\n amount {\n value\n }\n label\n }\n grand_total {\n value\n }\n subtotal {\n value\n }\n total_tax {\n value\n }\n total_shipping {\n value\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderCreditFragment } from './order-credit';\nimport { orderInvoiceFragment } from './order-invoice';\nimport { orderItemFragment } from './order-item';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentFragment } from './order-shipment';\nimport { orderTotalFragment } from './order-total';\n\nexport const orderFragment = gql`\n fragment order on GraycoreGuestOrder {\n id\n order_date\n status\n carrier\n number\n shipping_method\n items {\n ...orderItem\n }\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n }\n shipments {\n ...orderShipment\n }\n payment_methods {\n ...orderPayment\n }\n invoices {\n ...orderInvoice\n }\n credit_memos {\n ...orderCredit\n }\n total {\n ...orderTotal\n }\n }\n ${orderItemFragment}\n ${orderShipmentFragment}\n ${orderPaymentFragment}\n ${orderInvoiceFragment}\n ${orderCreditFragment}\n ${orderAddressFragment}\n ${orderTotalFragment}\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 items {\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?.items) {\n if (response.data.graycoreGuestOrders.items.reduce((acc, order) => acc && !!(\n order.billing_address\n && order.shipping_address\n && order.payment_methods\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.items.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":";;;;;;;;;;;;;;IAIY,qBAIX;AAJD,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,oBAAA,CAAA,cAAA,CAAA,GAAA,cAA6B,CAAA;AAC7B,IAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACnB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB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AA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA5B,sCAAA,4BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,YAHrC,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,sCAAA,4BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,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.1.mjs","sources":["../../../libs/order/driver/magento/2.4.1/src/models/responses/order-item.ts","../../../libs/order/driver/magento/2.4.1/src/transforms/responses/order.ts","../../../libs/order/driver/magento/2.4.1/src/models/responses/order-invoice-item.ts","../../../libs/order/driver/magento/2.4.1/src/models/responses/order-shipment-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-address.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-credit-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-credit-total.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-credit.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-invoice-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-invoice-total.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-invoice.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-payment.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-shipment-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-shipment-tracking.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-shipment.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-total.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order.ts","../../../libs/order/driver/magento/2.4.1/src/queries/get-guest-orders.ts","../../../libs/order/driver/magento/2.4.1/src/injection-tokens/fragments/order.ts","../../../libs/order/driver/magento/2.4.1/src/errors/codes.ts","../../../libs/order/driver/magento/2.4.1/src/errors/map.ts","../../../libs/order/driver/magento/2.4.1/src/errors/transform.ts","../../../libs/order/driver/magento/2.4.1/src/validators/get-orders.ts","../../../libs/order/driver/magento/2.4.1/src/order.service.ts","../../../libs/order/driver/magento/2.4.1/src/order-driver.module.ts","../../../libs/order/driver/magento/2.4.1/src/daffodil-order-driver-magento-2.4.1.ts"],"sourcesContent":["import { MagentoMoney } from '@daffodil/driver/magento';\n\nimport { MagentoDiscount } from './discount';\n\nexport enum MagentoOrderItemType {\n Simple = 'simple',\n Configurable = 'configurable',\n Bundle = 'bundle'\n};\n\nexport type MagentoOrderItemTypenames =\n 'OrderItem' |\n 'BundleOrderItem' |\n 'GiftCardOrderItem' |\n 'DownloadableOrderItem';\n\nexport interface MagentoOrderItemOption {\n __typename?: string;\n label: string;\n value: string;\n};\n\nexport interface MagentoOrderItem {\n __typename?: MagentoOrderItemTypenames;\n discounts: MagentoDiscount[];\n product_name: string;\n product_sale_price: MagentoMoney;\n product_sku: string;\n product_type: MagentoOrderItemType;\n product_url_key: string;\n quantity_canceled: number;\n quantity_invoiced: number;\n quantity_ordered: number;\n quantity_refunded: number;\n quantity_returned: number;\n quantity_shipped: number;\n selected_options: MagentoOrderItemOption[];\n entered_options: MagentoOrderItemOption[];\n status: string;\n}\n\nexport interface MagentoOrderBundleItemSelectedOption {\n __typename?: string;\n label: string;\n values: MagentoOrderBundleItemSelectedOptionValue[];\n};\n\nexport interface MagentoOrderBundleItemSelectedOptionValue {\n price: MagentoMoney;\n product_name: string;\n product_sku: string;\n quantity: number;\n};\n\nexport interface MagentoOrderBundleItem extends MagentoOrderItem {\n bundle_options: MagentoOrderBundleItemSelectedOption[];\n};\n","import {\n daffAdd,\n daffSubtract,\n} from '@daffodil/core';\nimport {\n DaffOrder,\n DaffOrderTotal,\n DaffOrderItem,\n DaffOrderAddress,\n DaffOrderShipment,\n DaffOrderShipmentItem,\n DaffOrderShipmentTracking,\n DaffOrderPayment,\n DaffOrderInvoice,\n DaffOrderTotalTypeEnum,\n DaffCompositeOrderItemOption,\n DaffOrderItemType,\n DaffConfigurableOrderItemAttribute,\n DaffOrderCoupon,\n} from '@daffodil/order';\n\nimport { MagentoDiscount } from '../../models/responses/discount';\nimport { MagentoOrderCredit } from '../../models/responses/order-credit';\nimport { MagentoOrderCreditItem } from '../../models/responses/order-credit-item';\nimport { MagentoOrderInvoiceItem } from '../../models/responses/order-invoice-item';\nimport {\n MagentoOrderBundleItem,\n MagentoOrderBundleItemSelectedOption,\n MagentoOrderItemOption,\n MagentoOrderItemType,\n} from '../../models/responses/order-item';\nimport { MagentoOrderTotal } from '../../models/responses/order-total';\nimport {\n MagentoOrder,\n MagentoOrderItem,\n MagentoOrderShipment,\n MagentoOrderAddress,\n MagentoOrderShipmentItem,\n MagentoOrderShipmentTracking,\n MagentoOrderPayment,\n MagentoOrderInvoice,\n} from '../../models/responses/public_api';\n\nfunction transformTotals(totals: MagentoOrderTotal): DaffOrderTotal[] {\n return [\n {\n label: 'Grand Total',\n type: DaffOrderTotalTypeEnum.GrandTotal,\n value: totals.grand_total.value,\n sort_order: 1,\n },\n {\n label: 'Subtotal',\n type: DaffOrderTotalTypeEnum.Subtotal,\n value: totals.subtotal.value,\n sort_order: 0,\n },\n {\n label: 'Shipping',\n type: DaffOrderTotalTypeEnum.Shipping,\n value: totals.total_shipping.value,\n sort_order: 2,\n },\n {\n label: 'Tax',\n type: DaffOrderTotalTypeEnum.Tax,\n value: totals.total_tax.value,\n sort_order: 3,\n },\n {\n label: 'Discount',\n type: DaffOrderTotalTypeEnum.Discount,\n value: totals.discounts.reduce((acc, discount) => daffAdd(acc, discount.amount.value), 0),\n sort_order: 4,\n },\n ];\n}\n\nfunction transformCouponDiscount(discount: MagentoDiscount): DaffOrderCoupon {\n return {\n code: discount.label,\n };\n}\n\nfunction transformConfigurableOption(option: MagentoOrderItemOption): DaffConfigurableOrderItemAttribute {\n return {\n attribute_label: option.label,\n\t value_label: option.value,\n };\n}\n\nfunction transformBundleOption(option: MagentoOrderBundleItemSelectedOption): DaffCompositeOrderItemOption {\n return {\n option_label: option.label,\n\t value_label: option.values && option.values[0] && option.values[0].product_name,\n };\n}\n\nfunction transformAdditionalItemFields(item: MagentoOrderItem) {\n switch (item.product_type) {\n case MagentoOrderItemType.Bundle:\n return {\n type: DaffOrderItemType.Composite,\n options: (<MagentoOrderBundleItem>item).bundle_options.map(transformBundleOption),\n };\n case MagentoOrderItemType.Configurable:\n return {\n type: DaffOrderItemType.Configurable,\n attributes: item.selected_options.map(transformConfigurableOption),\n };\n case MagentoOrderItemType.Simple:\n return {\n type: DaffOrderItemType.Simple,\n };\n default:\n return {};\n }\n}\n\nfunction transformItem(item: MagentoOrderItem, order: MagentoOrder, qty: number): DaffOrderItem {\n const discount = item.discounts.reduce((acc, d) => daffAdd(acc, d.amount.value), 0);\n const rowTotal = qty * item.product_sale_price.value;\n const rowTotalWithDiscount = qty * daffSubtract(item.product_sale_price.value, discount);\n\n return {\n type: DaffOrderItemType.Simple,\n id: null,\n item_id: null,\n qty_ordered: item.quantity_ordered,\n qty_canceled: item.quantity_canceled,\n qty_fulfilled: item.quantity_shipped,\n qty,\n image: {\n url: item.product_url_key,\n id: null,\n label: null,\n },\n order_id: order.id,\n created_at: null,\n updated_at: null,\n product_id: null,\n parent_item_id: null,\n sku: item.product_sku,\n name: item.product_name,\n weight: null,\n price: item.product_sale_price.value,\n discount_percent: Math.floor(discount / item.product_sale_price.value * 100),\n discount_amount: discount,\n tax_percent: null,\n tax_amount: null,\n row_total: rowTotal,\n row_total_with_discount: rowTotalWithDiscount,\n row_weight: null,\n tax_before_discount: null,\n ...transformAdditionalItemFields(item),\n };\n}\n\nfunction transformAddress(address: MagentoOrderAddress, order: MagentoOrder): DaffOrderAddress {\n return {\n order_id: 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: null,\n street: address.street[0],\n street2: address.street[1],\n city: address.city,\n region: address.region_code,\n country: address.country_code,\n postcode: address.postcode,\n };\n}\n\nfunction transformShipmentItem(shipmentItem: MagentoOrderShipmentItem, order: MagentoOrder): DaffOrderShipmentItem {\n return {\n item: transformItem(shipmentItem.order_item, order, shipmentItem.quantity_shipped),\n qty: shipmentItem.quantity_shipped,\n };\n}\n\nfunction transformShipmentTracking(tracking: MagentoOrderShipmentTracking): DaffOrderShipmentTracking {\n return {\n tracking_number: tracking.number,\n tracking_url: null,\n carrier: tracking.carrier,\n title: tracking.title,\n carrier_logo: null,\n };\n}\n\nfunction transformShipment(shipment: MagentoOrderShipment, order: MagentoOrder): DaffOrderShipment {\n return {\n carrier: order.carrier,\n carrier_title: null,\n code: null,\n method: order.shipping_method,\n method_description: null,\n tracking: shipment.tracking.map(transformShipmentTracking),\n items: shipment.items.map(item => transformShipmentItem(item, order)),\n };\n}\n\nfunction transformPayment(payment: MagentoOrderPayment, order: MagentoOrder): DaffOrderPayment {\n const findAdditionalData = key => {\n const index = payment.additional_data.findIndex(({ name }) => name === key);\n\n return index > -1 ? payment.additional_data[index].value : null;\n };\n return {\n id: null,\n payment_id: null,\n order_id: order.id,\n created_at: null,\n updated_at: null,\n method: payment.type,\n cc_type: findAdditionalData('cc_type'),\n cc_last4: findAdditionalData('cc_last4'),\n cc_owner: findAdditionalData('cc_owner'),\n cc_exp_month: findAdditionalData('cc_exp_month'),\n cc_exp_year: findAdditionalData('cc_exp_year'),\n };\n}\n\nfunction transformInvoiceItem(invoiceItem: MagentoOrderInvoiceItem, order: MagentoOrder): DaffOrderShipmentItem {\n return {\n item: transformItem(invoiceItem.order_item, order, invoiceItem.quantity_invoiced),\n qty: invoiceItem.quantity_invoiced,\n };\n}\n\nfunction transformInvoice(invoice: MagentoOrderInvoice, order: MagentoOrder, payment: MagentoOrderPayment): DaffOrderInvoice {\n return {\n totals: transformTotals(invoice.total),\n billing_address: transformAddress(order.billing_address, order),\n shipping_address: transformAddress(order.shipping_address, order),\n payment: transformPayment(payment, order),\n items: invoice.items.map(item => transformInvoiceItem(item, order)),\n shipping_method: null,\n };\n}\n\nfunction transformCreditItem(creditItem: MagentoOrderCreditItem, order: MagentoOrder): DaffOrderShipmentItem {\n return {\n item: transformItem(creditItem.order_item, order, creditItem.quantity_refunded),\n qty: creditItem.quantity_refunded,\n };\n}\n\nfunction transformCredit(credit: MagentoOrderCredit, order: MagentoOrder): DaffOrderInvoice {\n return {\n totals: transformTotals(credit.total),\n billing_address: transformAddress(order.billing_address, order),\n shipping_address: transformAddress(order.shipping_address, order),\n payment: transformPayment(order.payment_methods[0], order),\n items: credit.items.map(item => transformCreditItem(item, order)),\n shipping_method: null,\n };\n}\n\n/**\n * Transforms the MagentoOrder from the magento order query into a DaffOrder.\n */\nexport function daffMagentoTransformOrder(order: MagentoOrder): DaffOrder {\n return {\n extra_attributes: order,\n\n id: order.number,\n customer_id: null,\n updated_at: null,\n created_at: order.order_date,\n status: order.status,\n\n totals: transformTotals(order.total),\n applied_codes: order.total.discounts.map(transformCouponDiscount),\n items: order.items.map(item => transformItem(item, order, item.quantity_ordered)),\n billing_addresses: [\n transformAddress(order.billing_address, order),\n ],\n shipping_addresses: [\n transformAddress(order.shipping_address, order),\n ],\n shipments: order.shipments.map(shipment => transformShipment(shipment, order)),\n payment: transformPayment(order.payment_methods[0], order),\n // TODO: find out if the index is the correct payment for invoice\n invoices: order.invoices.map((invoice, index) => transformInvoice(invoice, order, order.payment_methods[index])),\n credits: order.credit_memos.map(credit => transformCredit(credit, order)),\n };\n}\n","import {\n MagentoOrderBundleItemSelectedOption,\n MagentoOrderItem,\n} from './order-item';\n\nexport type MagentoOrderInvoiceItemTypenames =\n 'InvoiceItem' |\n 'BundleInvoiceItem' |\n 'GiftCardInvoiceItem' |\n 'DownloadableInvoiceItem';\n\nexport interface MagentoOrderInvoiceItem {\n __typename?: MagentoOrderInvoiceItemTypenames;\n order_item: MagentoOrderItem;\n quantity_invoiced: number;\n};\n\nexport interface MagentoOrderInvoiceBundleItem extends MagentoOrderInvoiceItem {\n bundle_options: MagentoOrderBundleItemSelectedOption[];\n};\n","import {\n MagentoOrderBundleItemSelectedOption,\n MagentoOrderItem,\n} from './order-item';\n\nexport type MagentoOrderShipmentItemTypenames =\n 'ShipmentItem' |\n 'BundleShipmentItem' |\n 'GiftCardShipmentItem';\n\nexport interface MagentoOrderShipmentItem {\n __typename?: MagentoOrderShipmentItemTypenames;\n order_item: MagentoOrderItem;\n quantity_shipped: number;\n};\n\nexport interface MagentoOrderShipmentBundleItem extends MagentoOrderShipmentItem {\n bundle_options: MagentoOrderBundleItemSelectedOption[];\n};\n","import { gql } from 'apollo-angular';\n\n\nexport const orderAddressFragment = gql`\n fragment orderAddress on OrderAddress {\n city\n company\n country_code\n fax\n firstname\n middlename\n lastname\n postcode\n prefix\n region\n region_code\n street\n suffix\n telephone\n }\n`;\n","import { gql } from 'apollo-angular';\n\nexport const orderBundleItemSelectedOptionFragment = gql`\n fragment orderBundleItemSelectedOption on ItemSelectedBundleOption {\n label\n values {\n product_name\n }\n }\n`;\n\nexport const orderItemFragment = gql`\n fragment orderItem on OrderItemInterface {\n quantity_ordered\n quantity_canceled\n quantity_shipped\n quantity_invoiced\n product_url_key\n product_sku\n product_name\n product_type\n product_sale_price {\n value\n }\n discounts {\n amount {\n value\n }\n }\n selected_options {\n label\n value\n }\n ... on BundleOrderItem {\n bundle_options {\n ...orderBundleItemSelectedOption\n }\n }\n }\n ${orderBundleItemSelectedOptionFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderCreditItemFragment = gql`\n fragment orderCreditItem on CreditMemoItemInterface {\n quantity_refunded\n order_item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderCreditTotalFragment = gql`\n fragment orderCreditTotal on CreditMemoTotal {\n discounts {\n amount {\n value\n }\n label\n }\n grand_total {\n value\n }\n subtotal {\n value\n }\n total_tax {\n value\n }\n total_shipping {\n value\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderCreditItemFragment } from './order-credit-item';\nimport { orderCreditTotalFragment } from './order-credit-total';\n\nexport const orderCreditFragment = gql`\n fragment orderCredit on CreditMemo {\n items {\n ...orderCreditItem\n }\n total {\n ...orderCreditTotal\n }\n }\n ${orderCreditItemFragment}\n ${orderCreditTotalFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderInvoiceItemFragment = gql`\n fragment orderInvoiceItem on InvoiceItemInterface {\n quantity_invoiced\n order_item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderInvoiceTotalFragment = gql`\n fragment orderInvoiceTotal on InvoiceTotal {\n discounts {\n amount {\n value\n }\n label\n }\n grand_total {\n value\n }\n subtotal {\n value\n }\n total_tax {\n value\n }\n total_shipping {\n value\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderInvoiceItemFragment } from './order-invoice-item';\nimport { orderInvoiceTotalFragment } from './order-invoice-total';\n\nexport const orderInvoiceFragment = gql`\n fragment orderInvoice on Invoice {\n items {\n ...orderInvoiceItem\n }\n total {\n ...orderInvoiceTotal\n }\n }\n ${orderInvoiceItemFragment}\n ${orderInvoiceTotalFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderPaymentFragment = gql`\n fragment orderPayment on OrderPaymentMethod {\n name\n type\n additional_data {\n name\n value\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderShipmentItemFragment = gql`\n fragment orderShipmentItem on ShipmentItemInterface {\n quantity_shipped\n order_item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderShipmentTrackingFragment = gql`\n fragment orderShipmentTracking on ShipmentTracking {\n 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 OrderShipment {\n tracking {\n ...orderShipmentTracking\n }\n items {\n ...orderShipmentItem\n }\n }\n ${orderShipmentItemFragment}\n ${orderShipmentTrackingFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderTotalFragment = gql`\n fragment orderTotal on OrderTotal {\n discounts {\n amount {\n value\n }\n label\n }\n grand_total {\n value\n }\n subtotal {\n value\n }\n total_tax {\n value\n }\n total_shipping {\n value\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderCreditFragment } from './order-credit';\nimport { orderInvoiceFragment } from './order-invoice';\nimport { orderItemFragment } from './order-item';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentFragment } from './order-shipment';\nimport { orderTotalFragment } from './order-total';\n\nexport const orderFragment = gql`\n fragment order on GraycoreGuestOrder {\n id\n order_date\n status\n carrier\n number\n shipping_method\n items {\n ...orderItem\n }\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n }\n shipments {\n ...orderShipment\n }\n payment_methods {\n ...orderPayment\n }\n invoices {\n ...orderInvoice\n }\n credit_memos {\n ...orderCredit\n }\n total {\n ...orderTotal\n }\n }\n ${orderItemFragment}\n ${orderShipmentFragment}\n ${orderPaymentFragment}\n ${orderInvoiceFragment}\n ${orderCreditFragment}\n ${orderAddressFragment}\n ${orderTotalFragment}\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 items {\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?.items) {\n if (response.data.graycoreGuestOrders.items.reduce((acc, order) => acc && !!(\n order.billing_address\n && order.shipping_address\n && order.payment_methods\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.items.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":";;;;;;;;;;;;;;IAIY,qBAIX;AAJD,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,oBAAA,CAAA,cAAA,CAAA,GAAA,cAA6B,CAAA;AAC7B,IAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACnB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,GAI/B,EAAA,CAAA,CAAA,CAAA;AAAA,CAAC;AAYD,CAAC;AAyBD,CAAC;AAOD,CAAC;AAID;;ACbD,SAAS,eAAe,CAAC,MAAyB,EAAA;IAChD,OAAO;AACL,QAAA;AACE,YAAA,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,sBAAsB,CAAC,UAAU;AACvC,YAAA,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,KAAK;AAC/B,YAAA,UAAU,EAAE,CAAC;AACd,SAAA;AACD,QAAA;AACE,YAAA,KAAK,EAA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AA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,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 +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
|
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;QAF5D,IAAM,CAAA,MAAA,GAAN,MAAM,CAAiB;QACvB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QAC2B,IAAW,CAAA,WAAA,GAAX,WAAW,CAAQ;KAClE;IAEJ,WAAW,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CACrC,GAAG,CAAC,cA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EU,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;AACF,iBAAA,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":";;;;;;;;;;;;;IAMY,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;QAAzC,IAAO,CAAA,OAAA,GAAP,OAAO,CAAS;QAAS,IAAM,CAAA,MAAA,GAAN,MAAM,CAAU;AAFnD,QAAA,IAAA,CAAA,IAAI,GA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,mBAAmB;wBACnB,aAAa,CAAC,UAAU,CAAC;4BACvB,gBAAgB;yBACjB,CAAC;AACF,wBAAA,WAAW,CAAC,UAAU,CAAC,4BAA4B,EAAE,iBAAiB,CAAC;AACxE,qBAAA;AACF,iBAAA,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":";;;;;;;;;;;;;IAMY,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;QAAzC,IAAO,CAAA,OAAA,GAAP,OAAO,CAAS;QAAS,IAAM,CAAA,MAAA,GAAN,MAAM,CAAU;AAFnD,QAAA,IAAA,CAAA,IAAI,GAAG,oBAAoB,CAAC,eAAe,CAAC;KAEW;AACjE,CAAA;MAEY,oBAAoB,CAAA;AAG/B,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AAA,WAAW,CAAC,UAAU,CAAC,4BAA4B,EAAE,iBAAiB,CAAC;AACxE,qBAAA;AACF,iBAAA,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;;AACE,QAAA,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,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CAAC;QACvB,IAAkB,CAAA,kBAAA,GAAG,EAAE,CAAC;QACxB,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;QACf,IAAO,CAAA,OAAA,GAAG,IAAI,CAAC;QACf,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;QACd,IAAO,CAAA,OAAA,GAAG,EAAE,CAAC;KACd;AAAA,CAAA;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;AACnB,iBAAA,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
|
+
{"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;;AACE,QAAA,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;AACnB,iBAAA,CAAA;;;MCPY,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;QACE,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;KACtC;AAAA,CAAA;AAAA,CAAC;AAMI,MAAO,sBAAuB,SAAQ,gB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