merchi_cart 0.0.4-c → 0.0.4-e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Cart.js +20 -25
- package/lib/CartAlert.js +14 -12
- package/lib/CartHeader.js +9 -9
- package/lib/CartProvider.js +157 -226
- package/lib/CartTotals.js +44 -44
- package/lib/MerchiSDK/constants/auto_assign_production_on_actions.js +1 -1
- package/lib/MerchiSDK/constants/call_to_actions.js +1 -1
- package/lib/MerchiSDK/constants/discount_types.js +1 -1
- package/lib/MerchiSDK/constants/domain_types.js +1 -1
- package/lib/MerchiSDK/constants/errors.js +1 -1
- package/lib/MerchiSDK/constants/event_types.js +1 -1
- package/lib/MerchiSDK/constants/field_types.js +1 -1
- package/lib/MerchiSDK/constants/input_types.js +1 -1
- package/lib/MerchiSDK/constants/inventory_statuses.js +1 -1
- package/lib/MerchiSDK/constants/invoice_types.js +1 -1
- package/lib/MerchiSDK/constants/item_types.js +1 -1
- package/lib/MerchiSDK/constants/job/drafting_status.js +1 -1
- package/lib/MerchiSDK/constants/job/payment_status.js +1 -1
- package/lib/MerchiSDK/constants/job/production_status.js +1 -1
- package/lib/MerchiSDK/constants/job/shipment_status.js +1 -1
- package/lib/MerchiSDK/constants/job/supply_chain_request_status.js +1 -1
- package/lib/MerchiSDK/constants/job_priorities.js +1 -1
- package/lib/MerchiSDK/constants/job_status.js +5 -5
- package/lib/MerchiSDK/constants/job_types.js +1 -1
- package/lib/MerchiSDK/constants/notification_sections.js +1 -1
- package/lib/MerchiSDK/constants/notification_types.js +1 -1
- package/lib/MerchiSDK/constants/notification_urgencies.js +1 -1
- package/lib/MerchiSDK/constants/payment_types.js +1 -1
- package/lib/MerchiSDK/constants/platform.js +5 -5
- package/lib/MerchiSDK/constants/product_types.js +1 -1
- package/lib/MerchiSDK/constants/rights.js +1 -1
- package/lib/MerchiSDK/constants/robots_meta_directives.js +1 -1
- package/lib/MerchiSDK/constants/roles.js +8 -14
- package/lib/MerchiSDK/constants/shipment_companies.js +1 -1
- package/lib/MerchiSDK/constants/shipment_services.js +1 -1
- package/lib/MerchiSDK/constants/system_roles.js +1 -1
- package/lib/MerchiSDK/constants/theme_foundations.js +1 -1
- package/lib/MerchiSDK/constants/theme_status.js +1 -1
- package/lib/MerchiSDK/constants/user_types.js +1 -1
- package/lib/MerchiSDK/constants/white_label_accessibilities.js +1 -1
- package/lib/MerchiSDK/cookie.js +3 -3
- package/lib/MerchiSDK/entities/address.js +22 -43
- package/lib/MerchiSDK/entities/assignment.js +28 -49
- package/lib/MerchiSDK/entities/automatic_payment_relationship.js +11 -32
- package/lib/MerchiSDK/entities/backup.js +6 -27
- package/lib/MerchiSDK/entities/bank.js +17 -38
- package/lib/MerchiSDK/entities/cart.js +31 -64
- package/lib/MerchiSDK/entities/cart_item.js +30 -51
- package/lib/MerchiSDK/entities/cart_shipment_group.js +9 -30
- package/lib/MerchiSDK/entities/cart_shipment_quote.js +13 -34
- package/lib/MerchiSDK/entities/category.js +14 -35
- package/lib/MerchiSDK/entities/company.js +88 -109
- package/lib/MerchiSDK/entities/company_invitation.js +13 -34
- package/lib/MerchiSDK/entities/component.js +33 -54
- package/lib/MerchiSDK/entities/component_tag.js +7 -28
- package/lib/MerchiSDK/entities/component_version.js +12 -33
- package/lib/MerchiSDK/entities/country_tax.js +21 -45
- package/lib/MerchiSDK/entities/discount.js +13 -34
- package/lib/MerchiSDK/entities/discount_group.js +11 -32
- package/lib/MerchiSDK/entities/domain.js +80 -101
- package/lib/MerchiSDK/entities/domain_invitation.js +14 -35
- package/lib/MerchiSDK/entities/domain_tag.js +15 -36
- package/lib/MerchiSDK/entities/draft.js +32 -65
- package/lib/MerchiSDK/entities/draft_comment.js +19 -40
- package/lib/MerchiSDK/entities/draft_template.js +15 -36
- package/lib/MerchiSDK/entities/email_address.js +10 -31
- package/lib/MerchiSDK/entities/email_counter.js +8 -29
- package/lib/MerchiSDK/entities/enrolled_domain.js +20 -44
- package/lib/MerchiSDK/entities/exchange_rate.js +9 -30
- package/lib/MerchiSDK/entities/file.js +59 -80
- package/lib/MerchiSDK/entities/internal_tag.js +17 -38
- package/lib/MerchiSDK/entities/inventory.js +19 -42
- package/lib/MerchiSDK/entities/inventory_unit_variation.js +12 -33
- package/lib/MerchiSDK/entities/invoice.js +57 -78
- package/lib/MerchiSDK/entities/item.js +18 -39
- package/lib/MerchiSDK/entities/job.js +117 -140
- package/lib/MerchiSDK/entities/job_comment.js +18 -39
- package/lib/MerchiSDK/entities/matching_inventory.js +11 -32
- package/lib/MerchiSDK/entities/menu.js +12 -33
- package/lib/MerchiSDK/entities/menu_item.js +12 -33
- package/lib/MerchiSDK/entities/notification.js +32 -53
- package/lib/MerchiSDK/entities/page.js +13 -34
- package/lib/MerchiSDK/entities/payment.js +25 -46
- package/lib/MerchiSDK/entities/payment_device.js +12 -33
- package/lib/MerchiSDK/entities/phone_number.js +14 -35
- package/lib/MerchiSDK/entities/product.js +153 -188
- package/lib/MerchiSDK/entities/production_comment.js +18 -39
- package/lib/MerchiSDK/entities/quote.js +70 -106
- package/lib/MerchiSDK/entities/quote_item.js +28 -49
- package/lib/MerchiSDK/entities/seo_domain_page.js +13 -34
- package/lib/MerchiSDK/entities/session.js +11 -32
- package/lib/MerchiSDK/entities/shipment.js +62 -83
- package/lib/MerchiSDK/entities/shipment_item.js +7 -28
- package/lib/MerchiSDK/entities/shipment_item_fulfillment.js +7 -28
- package/lib/MerchiSDK/entities/shipment_method.js +21 -42
- package/lib/MerchiSDK/entities/shipment_method_variation.js +15 -36
- package/lib/MerchiSDK/entities/short_url.js +14 -35
- package/lib/MerchiSDK/entities/subscription_plan.js +26 -47
- package/lib/MerchiSDK/entities/supply_domain.js +11 -32
- package/lib/MerchiSDK/entities/system_role.js +7 -28
- package/lib/MerchiSDK/entities/theme.js +89 -110
- package/lib/MerchiSDK/entities/theme_css_setting.js +10 -31
- package/lib/MerchiSDK/entities/user.js +151 -213
- package/lib/MerchiSDK/entities/user_company.js +11 -32
- package/lib/MerchiSDK/entities/variation.js +21 -42
- package/lib/MerchiSDK/entities/variation_field.js +61 -94
- package/lib/MerchiSDK/entities/variation_fields_option.js +40 -61
- package/lib/MerchiSDK/entities/variation_option.js +20 -41
- package/lib/MerchiSDK/entities/variations_group.js +15 -36
- package/lib/MerchiSDK/entity.js +534 -624
- package/lib/MerchiSDK/merchi.js +42 -53
- package/lib/MerchiSDK/request.js +47 -75
- package/lib/MerchiSDK/test_util.js +6 -10
- package/lib/MerchiSDK/toasts.js +12 -13
- package/lib/MerchiSDK/util/float.js +7 -19
- package/lib/MerchiSDK/util/query_string.js +4 -4
- package/lib/MerchiSDK/util/validation.js +2 -3
- package/lib/MerchiSDK/uuid.js +2 -2
- package/lib/buttons/Button.js +15 -15
- package/lib/buttons/ButtonBack.js +22 -25
- package/lib/buttons/ButtonClearCart.js +8 -9
- package/lib/buttons/ButtonInvoiceDownload.js +26 -61
- package/lib/buttons/ButtonNext.js +20 -25
- package/lib/buttons/ButtonNextDynamic.js +16 -18
- package/lib/buttons/ButtonPay.js +17 -13
- package/lib/buttons/ButtonShipmentTabNext.js +12 -13
- package/lib/buttons/index.js +13 -13
- package/lib/components/Alert.js +14 -12
- package/lib/components/CartBody.js +10 -8
- package/lib/components/CartClient.js +22 -17
- package/lib/components/CartFooter.js +9 -7
- package/lib/components/CartItemRow.js +58 -48
- package/lib/components/CartPaymentSettingsInvalid.js +3 -4
- package/lib/components/CartShipment.js +18 -13
- package/lib/components/CartTabContent.js +9 -7
- package/lib/components/CartTabPanel.js +15 -13
- package/lib/components/CartTableContainer.js +9 -7
- package/lib/components/Collapse.js +14 -22
- package/lib/components/LoadingTemplate.js +10 -7
- package/lib/components/NoCartItems.js +9 -9
- package/lib/components/ShipmentGroupCard.js +69 -52
- package/lib/components/Table.js +7 -4
- package/lib/components/Title.js +11 -9
- package/lib/components/containers.js +12 -11
- package/lib/components/index.js +30 -31
- package/lib/forms/FormNewCustomer.js +48 -76
- package/lib/forms/FormReturningCustomer.js +38 -58
- package/lib/forms/FormShipmentAddressAndNotes.js +42 -47
- package/lib/forms/FormSquarePayment.js +8 -9
- package/lib/forms/FormStripePayment.js +8 -9
- package/lib/forms/InputAcceptUserTermsAndConditions.js +12 -11
- package/lib/forms/InputError.js +11 -9
- package/lib/forms/InputSelect.js +34 -36
- package/lib/forms/InputText.js +38 -42
- package/lib/forms/InputsAddress.js +59 -69
- package/lib/index.js +6 -6
- package/lib/panels/PanelCartItems.js +14 -17
- package/lib/panels/PanelCartShipment.js +10 -13
- package/lib/panels/PanelClearCart.js +8 -7
- package/lib/panels/PanelClientCheckout.js +18 -17
- package/lib/panels/PanelEditCartItem.js +17 -22
- package/lib/panels/PanelPaymentSuccess.js +18 -16
- package/lib/panels/index.js +13 -13
- package/lib/slices/sliceCart.js +53 -56
- package/lib/slices/sliceCartAlert.js +11 -15
- package/lib/slices/sliceCartItem.js +11 -10
- package/lib/slices/sliceCartPayment.js +15 -16
- package/lib/slices/sliceCartShipment.js +23 -26
- package/lib/slices/sliceFormReturningCustomer.js +7 -7
- package/lib/slices/sliceNewCustomerForm.js +6 -6
- package/lib/square/SquareCard.js +16 -18
- package/lib/square/actions.js +24 -46
- package/lib/square/slices/reducersSquare.js +6 -6
- package/lib/square/slices/sliceSquareAlerts.js +10 -16
- package/lib/square/slices/sliceSquareForm.js +10 -9
- package/lib/store.js +359 -565
- package/lib/stripe/StripeCardFields.js +43 -44
- package/lib/stripe/StripeCardForm.js +51 -109
- package/lib/stripe/StripePaymentButtons.js +35 -46
- package/lib/stripe/actions.js +75 -196
- package/lib/stripe/slices/sliceStripeAlerts.js +10 -16
- package/lib/stripe/slices/sliceStripeCardForm.js +6 -6
- package/lib/stripe/slices/sliceStripeForm.js +18 -17
- package/lib/stripe/utils.js +1 -1
- package/lib/tabs/CartNav.js +15 -24
- package/lib/tabs/NavTab.js +20 -19
- package/lib/utilities/address.js +32 -30
- package/lib/utilities/cart.js +33 -50
- package/lib/utilities/cookie.js +46 -129
- package/lib/utilities/currency.js +29 -25
- package/lib/utilities/helpers.js +41 -60
- package/lib/utilities/invoice.js +45 -114
- package/lib/utilities/product.js +5 -3
- package/lib/utilities/user.js +24 -62
- package/lib/utilities/variations.js +16 -14
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -8,21 +7,9 @@ exports.Address = void 0;
|
|
|
8
7
|
var _entity = require("../entity");
|
|
9
8
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _class2;
|
|
10
9
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
11
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
14
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
17
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
22
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
10
|
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
24
11
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
25
|
-
|
|
12
|
+
let Address = exports.Address = (_dec = Address.property({
|
|
26
13
|
type: Date
|
|
27
14
|
}), _dec2 = Address.property(), _dec3 = Address.property({
|
|
28
15
|
type: String
|
|
@@ -54,36 +41,28 @@ var Address = exports.Address = (_dec = Address.property({
|
|
|
54
41
|
arrayType: 'Invoice'
|
|
55
42
|
}), _dec17 = Address.property({
|
|
56
43
|
arrayType: 'Company'
|
|
57
|
-
}), (_class = (_class2 =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
_initializerDefineProperty(
|
|
67
|
-
_initializerDefineProperty(
|
|
68
|
-
_initializerDefineProperty(
|
|
69
|
-
_initializerDefineProperty(
|
|
70
|
-
_initializerDefineProperty(
|
|
71
|
-
_initializerDefineProperty(
|
|
72
|
-
_initializerDefineProperty(
|
|
73
|
-
_initializerDefineProperty(
|
|
74
|
-
_initializerDefineProperty(
|
|
75
|
-
_initializerDefineProperty(
|
|
76
|
-
_initializerDefineProperty(
|
|
77
|
-
_initializerDefineProperty(_this, "users", _descriptor12, _assertThisInitialized(_this));
|
|
78
|
-
_initializerDefineProperty(_this, "inventories", _descriptor13, _assertThisInitialized(_this));
|
|
79
|
-
_initializerDefineProperty(_this, "jobs", _descriptor14, _assertThisInitialized(_this));
|
|
80
|
-
_initializerDefineProperty(_this, "productedJobs", _descriptor15, _assertThisInitialized(_this));
|
|
81
|
-
_initializerDefineProperty(_this, "shippingTo", _descriptor16, _assertThisInitialized(_this));
|
|
82
|
-
_initializerDefineProperty(_this, "companies", _descriptor17, _assertThisInitialized(_this));
|
|
83
|
-
return _this;
|
|
44
|
+
}), (_class = (_class2 = class Address extends _entity.Entity {
|
|
45
|
+
constructor() {
|
|
46
|
+
super(...arguments);
|
|
47
|
+
_initializerDefineProperty(this, "archived", _descriptor, this);
|
|
48
|
+
_initializerDefineProperty(this, "id", _descriptor2, this);
|
|
49
|
+
_initializerDefineProperty(this, "lineOne", _descriptor3, this);
|
|
50
|
+
_initializerDefineProperty(this, "lineTwo", _descriptor4, this);
|
|
51
|
+
_initializerDefineProperty(this, "city", _descriptor5, this);
|
|
52
|
+
_initializerDefineProperty(this, "state", _descriptor6, this);
|
|
53
|
+
_initializerDefineProperty(this, "country", _descriptor7, this);
|
|
54
|
+
_initializerDefineProperty(this, "postcode", _descriptor8, this);
|
|
55
|
+
_initializerDefineProperty(this, "shipmentAsSenderAddress", _descriptor9, this);
|
|
56
|
+
_initializerDefineProperty(this, "shipmentsAsReceiverAddress", _descriptor10, this);
|
|
57
|
+
_initializerDefineProperty(this, "banks", _descriptor11, this);
|
|
58
|
+
_initializerDefineProperty(this, "users", _descriptor12, this);
|
|
59
|
+
_initializerDefineProperty(this, "inventories", _descriptor13, this);
|
|
60
|
+
_initializerDefineProperty(this, "jobs", _descriptor14, this);
|
|
61
|
+
_initializerDefineProperty(this, "productedJobs", _descriptor15, this);
|
|
62
|
+
_initializerDefineProperty(this, "shippingTo", _descriptor16, this);
|
|
63
|
+
_initializerDefineProperty(this, "companies", _descriptor17, this);
|
|
84
64
|
}
|
|
85
|
-
|
|
86
|
-
}(_entity.Entity), _class2.resourceName = 'addresses', _class2.singularName = 'address', _class2.pluralName = 'addresses', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "archived", [_dec], {
|
|
65
|
+
}, _class2.resourceName = 'addresses', _class2.singularName = 'address', _class2.pluralName = 'addresses', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "archived", [_dec], {
|
|
87
66
|
configurable: true,
|
|
88
67
|
enumerable: true,
|
|
89
68
|
writable: true,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -12,21 +11,9 @@ var _supply_domain = require("./supply_domain");
|
|
|
12
11
|
var _user = require("./user");
|
|
13
12
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _class2;
|
|
14
13
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
15
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
16
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
18
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
21
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
22
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
26
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
14
|
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
28
15
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
29
|
-
|
|
16
|
+
let Assignment = exports.Assignment = (_dec = Assignment.property({
|
|
30
17
|
type: Date
|
|
31
18
|
}), _dec2 = Assignment.property(), _dec3 = Assignment.property({
|
|
32
19
|
type: Date
|
|
@@ -52,52 +39,44 @@ var Assignment = exports.Assignment = (_dec = Assignment.property({
|
|
|
52
39
|
arrayType: 'Notification'
|
|
53
40
|
}), _dec18 = Assignment.property({
|
|
54
41
|
arrayType: 'MerchiFile'
|
|
55
|
-
}), (_class = (_class2 =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
_initializerDefineProperty(
|
|
65
|
-
_initializerDefineProperty(
|
|
66
|
-
_initializerDefineProperty(
|
|
67
|
-
_initializerDefineProperty(
|
|
68
|
-
_initializerDefineProperty(
|
|
69
|
-
_initializerDefineProperty(
|
|
70
|
-
_initializerDefineProperty(
|
|
71
|
-
_initializerDefineProperty(
|
|
72
|
-
_initializerDefineProperty(
|
|
73
|
-
_initializerDefineProperty(
|
|
74
|
-
_initializerDefineProperty(
|
|
75
|
-
_initializerDefineProperty(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
_initializerDefineProperty(_this, "supplyDomain", _descriptor16, _assertThisInitialized(_this));
|
|
80
|
-
_initializerDefineProperty(_this, "notifications", _descriptor17, _assertThisInitialized(_this));
|
|
81
|
-
_initializerDefineProperty(_this, "productionFiles", _descriptor18, _assertThisInitialized(_this));
|
|
82
|
-
_this.generateInvoice = function (props) {
|
|
83
|
-
var resource = "/generate-invoice-for-assignment/".concat(_this.id, "/");
|
|
84
|
-
var fetchOptions = {
|
|
42
|
+
}), (_class = (_class2 = class Assignment extends _entity.Entity {
|
|
43
|
+
constructor() {
|
|
44
|
+
super(...arguments);
|
|
45
|
+
_initializerDefineProperty(this, "archived", _descriptor, this);
|
|
46
|
+
_initializerDefineProperty(this, "id", _descriptor2, this);
|
|
47
|
+
_initializerDefineProperty(this, "managerAccepts", _descriptor3, this);
|
|
48
|
+
_initializerDefineProperty(this, "supplierRefused", _descriptor4, this);
|
|
49
|
+
_initializerDefineProperty(this, "needsDrafting", _descriptor5, this);
|
|
50
|
+
_initializerDefineProperty(this, "needsShipping", _descriptor6, this);
|
|
51
|
+
_initializerDefineProperty(this, "productionDeadline", _descriptor7, this);
|
|
52
|
+
_initializerDefineProperty(this, "assignmentDeadline", _descriptor8, this);
|
|
53
|
+
_initializerDefineProperty(this, "notes", _descriptor9, this);
|
|
54
|
+
_initializerDefineProperty(this, "job", _descriptor10, this);
|
|
55
|
+
_initializerDefineProperty(this, "supplyJob", _descriptor11, this);
|
|
56
|
+
_initializerDefineProperty(this, "supplier", _descriptor12, this);
|
|
57
|
+
_initializerDefineProperty(this, "quote", _descriptor13, this);
|
|
58
|
+
_initializerDefineProperty(this, "comments", _descriptor14, this);
|
|
59
|
+
_initializerDefineProperty(this, "shipment", _descriptor15, this);
|
|
60
|
+
_initializerDefineProperty(this, "supplyDomain", _descriptor16, this);
|
|
61
|
+
_initializerDefineProperty(this, "notifications", _descriptor17, this);
|
|
62
|
+
_initializerDefineProperty(this, "productionFiles", _descriptor18, this);
|
|
63
|
+
this.generateInvoice = props => {
|
|
64
|
+
const resource = `/generate-invoice-for-assignment/${this.id}/`;
|
|
65
|
+
const fetchOptions = {
|
|
85
66
|
method: 'POST'
|
|
86
67
|
};
|
|
87
68
|
fetchOptions.query = [];
|
|
88
69
|
if (props && props.addToInvoice) {
|
|
89
70
|
fetchOptions.query.push(['add_to_invoice', String(props.addToInvoice)]);
|
|
90
71
|
}
|
|
91
|
-
return
|
|
92
|
-
|
|
72
|
+
return this.merchi.authenticatedFetch(resource, fetchOptions).then(data => {
|
|
73
|
+
const invoice = new this.merchi.Invoice();
|
|
93
74
|
invoice.fromJson(data);
|
|
94
75
|
return invoice;
|
|
95
76
|
});
|
|
96
77
|
};
|
|
97
|
-
return _this;
|
|
98
78
|
}
|
|
99
|
-
|
|
100
|
-
}(_entity.Entity), _class2.resourceName = 'assignments', _class2.singularName = 'assignment', _class2.pluralName = 'assignments', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "archived", [_dec], {
|
|
79
|
+
}, _class2.resourceName = 'assignments', _class2.singularName = 'assignment', _class2.pluralName = 'assignments', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "archived", [_dec], {
|
|
101
80
|
configurable: true,
|
|
102
81
|
enumerable: true,
|
|
103
82
|
writable: true,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -9,21 +8,9 @@ var _company = require("./company");
|
|
|
9
8
|
var _entity = require("../entity");
|
|
10
9
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _class2;
|
|
11
10
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
12
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
13
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
15
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
18
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
19
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
21
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
23
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
24
11
|
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
25
12
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
26
|
-
|
|
13
|
+
let AutomaticPaymentRelationship = exports.AutomaticPaymentRelationship = (_dec = AutomaticPaymentRelationship.property({
|
|
27
14
|
type: Date
|
|
28
15
|
}), _dec2 = AutomaticPaymentRelationship.property(), _dec3 = AutomaticPaymentRelationship.property(), _dec4 = AutomaticPaymentRelationship.property({
|
|
29
16
|
type: _company.Company
|
|
@@ -31,25 +18,17 @@ var AutomaticPaymentRelationship = exports.AutomaticPaymentRelationship = (_dec
|
|
|
31
18
|
type: _company.Company
|
|
32
19
|
}), _dec6 = AutomaticPaymentRelationship.property({
|
|
33
20
|
type: String
|
|
34
|
-
}), (_class = (_class2 =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
_initializerDefineProperty(_this, "archived", _descriptor, _assertThisInitialized(_this));
|
|
44
|
-
_initializerDefineProperty(_this, "id", _descriptor2, _assertThisInitialized(_this));
|
|
45
|
-
_initializerDefineProperty(_this, "creationDate", _descriptor3, _assertThisInitialized(_this));
|
|
46
|
-
_initializerDefineProperty(_this, "companyCustomer", _descriptor4, _assertThisInitialized(_this));
|
|
47
|
-
_initializerDefineProperty(_this, "companySupplier", _descriptor5, _assertThisInitialized(_this));
|
|
48
|
-
_initializerDefineProperty(_this, "stripeCustomerId", _descriptor6, _assertThisInitialized(_this));
|
|
49
|
-
return _this;
|
|
21
|
+
}), (_class = (_class2 = class AutomaticPaymentRelationship extends _entity.Entity {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
_initializerDefineProperty(this, "archived", _descriptor, this);
|
|
25
|
+
_initializerDefineProperty(this, "id", _descriptor2, this);
|
|
26
|
+
_initializerDefineProperty(this, "creationDate", _descriptor3, this);
|
|
27
|
+
_initializerDefineProperty(this, "companyCustomer", _descriptor4, this);
|
|
28
|
+
_initializerDefineProperty(this, "companySupplier", _descriptor5, this);
|
|
29
|
+
_initializerDefineProperty(this, "stripeCustomerId", _descriptor6, this);
|
|
50
30
|
}
|
|
51
|
-
|
|
52
|
-
}(_entity.Entity), _class2.resourceName = 'automatic_payment_relationships', _class2.singularName = 'automaticPaymentRelationship', _class2.pluralName = 'automaticPaymentRelationships', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "archived", [_dec], {
|
|
31
|
+
}, _class2.resourceName = 'automatic_payment_relationships', _class2.singularName = 'automaticPaymentRelationship', _class2.pluralName = 'automaticPaymentRelationships', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "archived", [_dec], {
|
|
53
32
|
configurable: true,
|
|
54
33
|
enumerable: true,
|
|
55
34
|
writable: true,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -8,35 +7,15 @@ exports.Backup = void 0;
|
|
|
8
7
|
var _entity = require("../entity");
|
|
9
8
|
var _dec, _dec2, _class, _descriptor, _descriptor2, _class2;
|
|
10
9
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
11
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
14
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
17
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
22
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
10
|
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
24
11
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
-
args[_key] = arguments[_key];
|
|
32
|
-
}
|
|
33
|
-
_this = _callSuper(this, Backup, [].concat(args));
|
|
34
|
-
_initializerDefineProperty(_this, "id", _descriptor, _assertThisInitialized(_this));
|
|
35
|
-
_initializerDefineProperty(_this, "file", _descriptor2, _assertThisInitialized(_this));
|
|
36
|
-
return _this;
|
|
12
|
+
let Backup = exports.Backup = (_dec = Backup.property(), _dec2 = Backup.property(), (_class = (_class2 = class Backup extends _entity.Entity {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
16
|
+
_initializerDefineProperty(this, "file", _descriptor2, this);
|
|
37
17
|
}
|
|
38
|
-
|
|
39
|
-
}(_entity.Entity), _class2.resourceName = 'backups', _class2.singularName = 'backup', _class2.pluralName = 'backups', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "id", [_dec], {
|
|
18
|
+
}, _class2.resourceName = 'backups', _class2.singularName = 'backup', _class2.pluralName = 'backups', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "id", [_dec], {
|
|
40
19
|
configurable: true,
|
|
41
20
|
enumerable: true,
|
|
42
21
|
writable: true,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -8,21 +7,9 @@ exports.Bank = void 0;
|
|
|
8
7
|
var _entity = require("../entity");
|
|
9
8
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _class2;
|
|
10
9
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
11
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
14
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
17
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
22
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
10
|
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
24
11
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
25
|
-
|
|
12
|
+
let Bank = exports.Bank = (_dec = Bank.property({
|
|
26
13
|
type: Date
|
|
27
14
|
}), _dec2 = Bank.property(), _dec3 = Bank.property(), _dec4 = Bank.property(), _dec5 = Bank.property(), _dec6 = Bank.property(), _dec7 = Bank.property({
|
|
28
15
|
type: String
|
|
@@ -34,31 +21,23 @@ var Bank = exports.Bank = (_dec = Bank.property({
|
|
|
34
21
|
type: String
|
|
35
22
|
}), _dec11 = Bank.property({
|
|
36
23
|
type: 'Address'
|
|
37
|
-
}), _dec12 = Bank.property(), (_class = (_class2 =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_initializerDefineProperty(
|
|
47
|
-
_initializerDefineProperty(
|
|
48
|
-
_initializerDefineProperty(
|
|
49
|
-
_initializerDefineProperty(
|
|
50
|
-
_initializerDefineProperty(
|
|
51
|
-
_initializerDefineProperty(
|
|
52
|
-
_initializerDefineProperty(_this, "bsb", _descriptor7, _assertThisInitialized(_this));
|
|
53
|
-
_initializerDefineProperty(_this, "swiftCode", _descriptor8, _assertThisInitialized(_this));
|
|
54
|
-
_initializerDefineProperty(_this, "iban", _descriptor9, _assertThisInitialized(_this));
|
|
55
|
-
_initializerDefineProperty(_this, "bankCode", _descriptor10, _assertThisInitialized(_this));
|
|
56
|
-
_initializerDefineProperty(_this, "bankAddress", _descriptor11, _assertThisInitialized(_this));
|
|
57
|
-
_initializerDefineProperty(_this, "company", _descriptor12, _assertThisInitialized(_this));
|
|
58
|
-
return _this;
|
|
24
|
+
}), _dec12 = Bank.property(), (_class = (_class2 = class Bank extends _entity.Entity {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
_initializerDefineProperty(this, "archived", _descriptor, this);
|
|
28
|
+
_initializerDefineProperty(this, "id", _descriptor2, this);
|
|
29
|
+
_initializerDefineProperty(this, "default", _descriptor3, this);
|
|
30
|
+
_initializerDefineProperty(this, "bankName", _descriptor4, this);
|
|
31
|
+
_initializerDefineProperty(this, "accountNumber", _descriptor5, this);
|
|
32
|
+
_initializerDefineProperty(this, "accountName", _descriptor6, this);
|
|
33
|
+
_initializerDefineProperty(this, "bsb", _descriptor7, this);
|
|
34
|
+
_initializerDefineProperty(this, "swiftCode", _descriptor8, this);
|
|
35
|
+
_initializerDefineProperty(this, "iban", _descriptor9, this);
|
|
36
|
+
_initializerDefineProperty(this, "bankCode", _descriptor10, this);
|
|
37
|
+
_initializerDefineProperty(this, "bankAddress", _descriptor11, this);
|
|
38
|
+
_initializerDefineProperty(this, "company", _descriptor12, this);
|
|
59
39
|
}
|
|
60
|
-
|
|
61
|
-
}(_entity.Entity), _class2.resourceName = 'banks', _class2.singularName = 'bank', _class2.pluralName = 'banks', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "archived", [_dec], {
|
|
40
|
+
}, _class2.resourceName = 'banks', _class2.singularName = 'bank', _class2.pluralName = 'banks', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "archived", [_dec], {
|
|
62
41
|
configurable: true,
|
|
63
42
|
enumerable: true,
|
|
64
43
|
writable: true,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -9,25 +8,10 @@ var _address = require("./address");
|
|
|
9
8
|
var _company = require("./company");
|
|
10
9
|
var _entity = require("../entity");
|
|
11
10
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _class2;
|
|
12
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
13
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
11
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
16
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
19
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
22
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
23
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
25
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
28
12
|
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
29
13
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
30
|
-
|
|
14
|
+
let Cart = exports.Cart = (_dec = Cart.property({
|
|
31
15
|
type: Date
|
|
32
16
|
}), _dec2 = Cart.property(), _dec3 = Cart.property(), _dec4 = Cart.property({
|
|
33
17
|
type: Date
|
|
@@ -47,60 +31,43 @@ var Cart = exports.Cart = (_dec = Cart.property({
|
|
|
47
31
|
arrayType: 'CartItem'
|
|
48
32
|
}), _dec21 = Cart.property({
|
|
49
33
|
arrayType: 'CartShipmentGroup'
|
|
50
|
-
}), (_class = (_class2 =
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
_initializerDefineProperty(
|
|
60
|
-
_initializerDefineProperty(
|
|
61
|
-
_initializerDefineProperty(
|
|
62
|
-
_initializerDefineProperty(
|
|
63
|
-
_initializerDefineProperty(
|
|
64
|
-
_initializerDefineProperty(
|
|
65
|
-
_initializerDefineProperty(
|
|
66
|
-
_initializerDefineProperty(
|
|
67
|
-
_initializerDefineProperty(
|
|
68
|
-
_initializerDefineProperty(
|
|
69
|
-
_initializerDefineProperty(
|
|
70
|
-
_initializerDefineProperty(
|
|
71
|
-
_initializerDefineProperty(
|
|
72
|
-
_initializerDefineProperty(
|
|
73
|
-
_initializerDefineProperty(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
_initializerDefineProperty(_this, "invoice", _descriptor18, _assertThisInitialized(_this));
|
|
77
|
-
_initializerDefineProperty(_this, "receiverAddress", _descriptor19, _assertThisInitialized(_this));
|
|
78
|
-
_initializerDefineProperty(_this, "cartItems", _descriptor20, _assertThisInitialized(_this));
|
|
79
|
-
_initializerDefineProperty(_this, "shipmentGroups", _descriptor21, _assertThisInitialized(_this));
|
|
80
|
-
_this.requiresShipment = function () {
|
|
81
|
-
if (_this.cartItems === undefined) {
|
|
34
|
+
}), (_class = (_class2 = class Cart extends _entity.Entity {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
_initializerDefineProperty(this, "archived", _descriptor, this);
|
|
38
|
+
_initializerDefineProperty(this, "id", _descriptor2, this);
|
|
39
|
+
_initializerDefineProperty(this, "creationDate", _descriptor3, this);
|
|
40
|
+
_initializerDefineProperty(this, "ip", _descriptor4, this);
|
|
41
|
+
_initializerDefineProperty(this, "token", _descriptor5, this);
|
|
42
|
+
_initializerDefineProperty(this, "receiverNotes", _descriptor6, this);
|
|
43
|
+
_initializerDefineProperty(this, "currency", _descriptor7, this);
|
|
44
|
+
_initializerDefineProperty(this, "cartItemsSubtotalCost", _descriptor8, this);
|
|
45
|
+
_initializerDefineProperty(this, "cartItemsTaxAmount", _descriptor9, this);
|
|
46
|
+
_initializerDefineProperty(this, "cartItemsTotalCost", _descriptor10, this);
|
|
47
|
+
_initializerDefineProperty(this, "shipmentTotalCost", _descriptor11, this);
|
|
48
|
+
_initializerDefineProperty(this, "subtotalCost", _descriptor12, this);
|
|
49
|
+
_initializerDefineProperty(this, "taxAmount", _descriptor13, this);
|
|
50
|
+
_initializerDefineProperty(this, "totalCost", _descriptor14, this);
|
|
51
|
+
_initializerDefineProperty(this, "client", _descriptor15, this);
|
|
52
|
+
_initializerDefineProperty(this, "clientCompany", _descriptor16, this);
|
|
53
|
+
_initializerDefineProperty(this, "domain", _descriptor17, this);
|
|
54
|
+
_initializerDefineProperty(this, "invoice", _descriptor18, this);
|
|
55
|
+
_initializerDefineProperty(this, "receiverAddress", _descriptor19, this);
|
|
56
|
+
_initializerDefineProperty(this, "cartItems", _descriptor20, this);
|
|
57
|
+
_initializerDefineProperty(this, "shipmentGroups", _descriptor21, this);
|
|
58
|
+
this.requiresShipment = () => {
|
|
59
|
+
if (this.cartItems === undefined) {
|
|
82
60
|
throw 'cartItems is undefined, did you forget to embed it?';
|
|
83
61
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
88
|
-
var cartItem = _step.value;
|
|
89
|
-
if (cartItem.requiresShipment()) {
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
62
|
+
for (const cartItem of this.cartItems) {
|
|
63
|
+
if (cartItem.requiresShipment()) {
|
|
64
|
+
return true;
|
|
92
65
|
}
|
|
93
|
-
} catch (err) {
|
|
94
|
-
_iterator.e(err);
|
|
95
|
-
} finally {
|
|
96
|
-
_iterator.f();
|
|
97
66
|
}
|
|
98
67
|
return false;
|
|
99
68
|
};
|
|
100
|
-
return _this;
|
|
101
69
|
}
|
|
102
|
-
|
|
103
|
-
}(_entity.Entity), _class2.resourceName = 'carts', _class2.singularName = 'cart', _class2.pluralName = 'carts', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "archived", [_dec], {
|
|
70
|
+
}, _class2.resourceName = 'carts', _class2.singularName = 'cart', _class2.pluralName = 'carts', _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "archived", [_dec], {
|
|
104
71
|
configurable: true,
|
|
105
72
|
enumerable: true,
|
|
106
73
|
writable: true,
|