Skip to content

Commit

Permalink
Merge branch 'develop' into fix-57-rattrayalex-stripe-set-stripe-app-…
Browse files Browse the repository at this point in the history
…info
  • Loading branch information
aldeed authored Jan 31, 2019
2 parents 101ccef + 997c3df commit 4420554
Show file tree
Hide file tree
Showing 390 changed files with 8,104 additions and 4,473 deletions.
4 changes: 2 additions & 2 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ [email protected] # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
[email protected] # Compile .html files into Meteor Blaze views
[email protected] # ECMAScript 5 compatibility for older browsers.
[email protected].0 # Enable ECMAScript2015+ syntax in app code
[email protected].4 # Enable ECMAScript2015+ syntax in app code
[email protected] # ensure meteor method argument validation
[email protected] # security-related policies enforced by newer browsers
juliancwirko:[email protected] # CSS post-processing plugin (replaces standard-minifier-css)
session@1.1.8 # ReactiveDict whose contents are preserved across Hot Code Push
session@1.2.0 # ReactiveDict whose contents are preserved across Hot Code Push
[email protected] # Meteor transparent reactive programming library
[email protected]
[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[email protected]
[email protected].0.2
22 changes: 11 additions & 11 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ aldeed:[email protected]
[email protected]
[email protected]
[email protected]
[email protected].1
[email protected].4
[email protected]
[email protected]
[email protected]
Expand All @@ -25,7 +25,7 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected]
[email protected]
Expand All @@ -37,9 +37,9 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected].1
[email protected].4
[email protected]
[email protected]
[email protected]
Expand Down Expand Up @@ -76,12 +76,12 @@ meteorhacks:[email protected]
meteorhacks:[email protected]
meteortesting:[email protected]
meteortesting:[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].2
[email protected].3
[email protected]
[email protected]
momentjs:[email protected]
Expand All @@ -91,9 +91,9 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].4
[email protected].6
[email protected]
[email protected].1
[email protected].2
[email protected]
[email protected]
ongoworks:[email protected]
Expand All @@ -103,7 +103,7 @@ percolate:[email protected]
practicalmeteor:[email protected]_1
practicalmeteor:[email protected]
practicalmeteor:[email protected]_2
[email protected].1
[email protected].2
raix:[email protected]
[email protected]
[email protected]
Expand All @@ -113,7 +113,7 @@ [email protected]
[email protected]
[email protected]
[email protected]
session@1.1.8
session@1.2.0
[email protected]
[email protected]
[email protected]
Expand All @@ -133,5 +133,5 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##############################################################################
# meteor-dev stage - builds image for dev and used with docker-compose.yml
##############################################################################
FROM reactioncommerce/base:v1.8-meteor as meteor-dev
FROM reactioncommerce/base:v1.8.0.2-meteor as meteor-dev

LABEL maintainer="Reaction Commerce <[email protected]>"

Expand Down
1 change: 1 addition & 0 deletions client/modules/i18n/currency.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function findCurrency(defaultCurrency, useDefaultShopCurrency) {

/**
* @name formatPriceString
* @deprecated Slowly migrating everything to use `formatMoney` from "/imports/utils/formatMoney" instead
* @summary Return shop/locale specific formatted price. Also accepts a range formatted with " - ".
* @memberof i18n
* @method
Expand Down
2 changes: 0 additions & 2 deletions imports/client/ui/components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {
import { Translation } from "/imports/plugins/core/ui/client/components";

const Drawer = styledMUI(MUIDrawer, { paper: "Paper" })`
width: ${applyTheme("Sidebar.drawerWidth")};
flex-shrink: 0;
.Paper {
width: ${applyTheme("Sidebar.drawerWidth")};
}
Expand Down
16 changes: 12 additions & 4 deletions imports/client/ui/layouts/Dashboard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import styled, { css } from "styled-components";
import styled, { css, injectGlobal } from "styled-components";
import styledMUI from "styled-components-mui";
import { ContainerQuery } from "react-container-query";
import MUIAppBar from "@material-ui/core/AppBar";
Expand All @@ -20,6 +20,13 @@ const query = {
}
};

// Remove the 10px fontSize from the html element as it affects fonts that rely on rem
injectGlobal`
html {
font-size: inherit;
}
`;

const Container = styled.div`
display: flex;
`;
Expand All @@ -29,13 +36,14 @@ const Container = styled.div`
// for DOM elements and prints warnings in the console. Someday there may be a better solution.
// See https://github.com/styled-components/styled-components/issues/305
const Main = styled(({ children, isMobile, isSidebarOpen, ...divProps }) => (<div {...divProps}>{children}</div>))`
width: 100vw;
background-color: ${applyTheme("Layout.pageBackgroundColor")};
flex-grow: 1;
transition: ${(props) =>
(props.isSidebarOpen && props.isMobile !== true
? "margin 225ms cubic-bezier(0, 0, 0.2, 1) 0ms"
: "margin 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms")};
margin-left: ${(props) => (!props.isSidebarOpen && props.isMobile === false ? "-264px" : 0)};
? "padding 225ms cubic-bezier(0, 0, 0.2, 1) 0ms"
: "padding 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms")};
padding-left: ${(props) => (props.isSidebarOpen && props.isMobile === false ? "280px" : 0)};
`;

const MainContent = styled.div`
Expand Down
4 changes: 2 additions & 2 deletions imports/collections/schemas/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const SocialMetadata = new SimpleSchema({
* @property {Number} height optional, default value: `0`
* @property {Number} index required
* @property {Boolean} inventoryAvailableToSell required, The quantity of this item currently available to sell. This number does not include reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator). If this is a variant, this number is created by summing all child option inventory numbers. This is most likely the quantity to display in the storefront UI.
* @property {Boolean} inventoryInStock required, The quantity of this item currently in stock. This number is updated when an order is processed by the operator. This number includes all inventory, including reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator). If this is a variant, this number is created by summing all child option inventory numbers. This is most likely just used as a reference in the operator UI, and not displayed in the storefront UI. Called `inventoryQuantity` in the Product Schema, and `inventoryInStock` in the Catalog schema.
* @property {Boolean} inventoryInStock required, The quantity of this item currently in stock. This number is updated when an order is processed by the operator. This number includes all inventory, including reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator). If this is a variant, this number is created by summing all child option inventory numbers. This is most likely just used as a reference in the operator UI, and not displayed in the storefront UI.
* @property {Boolean} inventoryManagement required, True if inventory management is enabled for this variant
* @property {Boolean} inventoryPolicy required, True if inventory policy is enabled for this variant
* @property {Boolean} isBackorder required, Indicates when a product is currently backordered
Expand Down Expand Up @@ -336,7 +336,7 @@ export const CatalogVariantSchema = VariantBaseSchema.clone().extend({
* @property {String} description optional
* @property {Number} height optional, default value: `0`
* @property {Boolean} inventoryAvailableToSell required, The quantity of this item currently available to sell. This number does not include reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator). If this is a variant, this number is created by summing all child option inventory numbers. This is most likely the quantity to display in the storefront UI.
* @property {Boolean} inventoryInStock required, The quantity of this item currently in stock. This number is updated when an order is processed by the operator. This number includes all inventory, including reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator). If this is a variant, this number is created by summing all child option inventory numbers. This is most likely just used as a reference in the operator UI, and not displayed in the storefront UI. Called `inventoryQuantity` in the Product Schema, and `inventoryInStock` in the Catalog schema.
* @property {Boolean} inventoryInStock required, The quantity of this item currently in stock. This number is updated when an order is processed by the operator. This number includes all inventory, including reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator). If this is a variant, this number is created by summing all child option inventory numbers. This is most likely just used as a reference in the operator UI, and not displayed in the storefront UI.
* @property {Boolean} isBackorder required, Indicates when a product is currently backordered
* @property {Boolean} isLowQuantity required, Indicates that the product quantity is too low
* @property {Boolean} isSoldOut required, Indicates when the product quantity is zero
Expand Down
15 changes: 14 additions & 1 deletion imports/collections/schemas/orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ export const OrderFulfillmentGroup = new SimpleSchema({
},
"items.$": OrderItem,
"itemIds": [String],
"payment": Payment,
"shipmentMethod": SelectedFulfillmentOption,
"shippingLabelUrl": {
type: String,
Expand Down Expand Up @@ -372,6 +371,7 @@ export const OrderFulfillmentGroup = new SimpleSchema({
* @property {String} _id required
* @property {String} accountId Account ID for account orders, or null for anonymous
* @property {String} anonymousAccessToken Token for accessing anonymous carts, null for account carts
* @property {Address} [billingAddress] Optional billing address
* @property {String} cartId optional For tracking which cart created this order
* @property {Date} createdAt required
* @property {String} currencyCode required
Expand All @@ -380,6 +380,7 @@ export const OrderFulfillmentGroup = new SimpleSchema({
* @property {Object[]} exportHistory optional
* @property {History[]} history optional
* @property {Notes[]} notes optional
* @property {Payment[]} payments Array of payments
* @property {Shipment[]} shipping Array of fulfillment groups
* @property {String} shopId required The owner shop
* @property {OrderTransaction[]} transactions optional
Expand All @@ -401,6 +402,13 @@ export const Order = new SimpleSchema({
index: 1,
optional: true
},
// Although billing address is typically needed only by the payment plugin,
// some tax services require it to calculate taxes for digital items. Thus
// it should be provided here in order to be added to the CommonOrder if possible.
"billingAddress": {
type: Address,
optional: true
},
"cartId": {
type: String,
optional: true
Expand Down Expand Up @@ -438,6 +446,11 @@ export const Order = new SimpleSchema({
optional: true
},
"notes.$": Notes,
"payments": {
type: Array,
optional: true
},
"payments.$": Payment,
"referenceId": String,
"shipping": [OrderFulfillmentGroup],
"shopId": {
Expand Down
11 changes: 10 additions & 1 deletion imports/collections/schemas/payments.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { Address } from "./address";
* @property {Number} total Grand total
*/
export const Invoice = new SimpleSchema({
currencyCode: String,
discounts: {
type: Number,
min: 0
Expand Down Expand Up @@ -79,6 +80,7 @@ registerSchema("CurrencyExchangeRate", CurrencyExchangeRate);
* @property {String} [cardBrand] The brand of card, if the payment method was a credit card
* @property {CurrencyExchangeRate} [currency] The exchange rate, if the user's currency is different from shop's
* @property {Object} [data] Arbitrary data that the payment method needs
* @property {String} mode "authorize" if still needs to be captured, or "capture" if captured. "cancel" if auth was canceled.
* @property {Invoice} invoice A summary of the totals that make up the full charge amount. Created when the payment is added to an order.
* @property {String} shopId The ID of the shop that is being paid. This might be a merchant shop in a marketplace setup.
*/
Expand All @@ -92,6 +94,14 @@ export const Payment = new SimpleSchema({
optional: true
},
"amount": Number,
"captureErrorCode": {
type: String,
optional: true
},
"captureErrorMessage": {
type: String,
optional: true
},
"cardBrand": {
type: String,
optional: true
Expand All @@ -108,7 +118,6 @@ export const Payment = new SimpleSchema({
blackbox: true
},
"displayName": String,
"invoice": Invoice,
"method": String,
"mode": String,
"name": String,
Expand Down
16 changes: 7 additions & 9 deletions imports/collections/schemas/products.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ registerSchema("VariantMedia", VariantMedia);
* @property {Boolean} inventoryInStock required
* @property {Boolean} inventoryManagement, default value: `true`
* @property {Boolean} inventoryPolicy, default value: `false`, If disabled, item can be sold even if it not in stock.
* @property {Number} inventoryQuantity, default value: `0`
* @property {Number} inventoryInStock, default value: `0`
* @property {Boolean} isBackorder denormalized, `true` if product not in stock, but customers anyway could order it
* @property {Boolean} isDeleted, default value: `false`
* @property {Boolean} isLowQuantity optional, true when at least 1 variant is below `lowInventoryWarningThreshold`
* @property {Boolean} isSoldOut optional, denormalized field, indicates when all variants `inventoryQuantity` is 0
* @property {Boolean} isSoldOut optional, denormalized field, indicates when all variants `inventoryInStock` is 0
* @property {Boolean} isVisible, default value: `false`
* @property {Number} length optional, default value: `0`
* @property {Number} lowInventoryWarningThreshold, default value: `0`, Warn of low inventory at this number
Expand Down Expand Up @@ -180,14 +180,13 @@ export const ProductVariant = new SimpleSchema({
optional: true,
defaultValue: 0
},
"inventoryQuantity": {
"inventoryInStock": {
type: SimpleSchema.Integer,
label: "The quantity of this item currently in stock." +
"This number is updated when an order is processed by the operator." +
"This number includes all inventory, including reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator)." +
"If this is a variant, this number is created by summing all child option inventory numbers." +
"This is most likely just used as a reference in the operator UI, and not displayed in the storefront UI." +
"Called `inventoryQuantity` in the Product Schema, and `inventoryInStock` in the Catalog schema.",
"This is most likely just used as a reference in the operator UI, and not displayed in the storefront UI.",
optional: true,
defaultValue: 0
},
Expand Down Expand Up @@ -360,7 +359,7 @@ registerSchema("PriceRange", PriceRange);
* @property {Boolean} isBackorder denormalized, `true` if product not in stock, but customers anyway could order it
* @property {Boolean} isDeleted, default value: `false`
* @property {Boolean} isLowQuantity denormalized, true when at least 1 variant is below `lowInventoryWarningThreshold`
* @property {Boolean} isSoldOut denormalized, Indicates when all variants `inventoryQuantity` is zero
* @property {Boolean} isSoldOut denormalized, Indicates when all variants `inventoryInStock` is zero
* @property {Boolean} isVisible, default value: `false`
* @property {String} metaDescription optional
* @property {Metafield[]} metafields optional
Expand Down Expand Up @@ -442,14 +441,13 @@ export const Product = new SimpleSchema({
optional: true,
defaultValue: 0
},
"inventoryQuantity": {
"inventoryInStock": {
type: SimpleSchema.Integer,
label: "The quantity of this item currently in stock." +
"This number is updated when an order is processed by the operator." +
"This number includes all inventory, including reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator)." +
"If this is a variant, this number is created by summing all child option inventory numbers." +
"This is most likely just used as a reference in the operator UI, and not displayed in the storefront UI." +
"Called `inventoryQuantity` in the Product Schema, and `inventoryInStock` in the Catalog schema.",
"This is most likely just used as a reference in the operator UI, and not displayed in the storefront UI.",
optional: true,
defaultValue: 0
},
Expand Down
7 changes: 6 additions & 1 deletion imports/collections/schemas/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ export const Tag = new SimpleSchema({
"displayTitle": {
type: String,
optional: true
}
},
"featuredProductIds": {
type: Array,
optional: true
},
"featuredProductIds.$": String
});

registerSchema("Tag", Tag);
Loading

0 comments on commit 4420554

Please sign in to comment.