@licklist/design 0.78.5-dev.19 → 0.78.5-dev.2
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/dist/auth/Layout/UserNavDropDownToggle.js +0 -3
- package/dist/auth/Login/LoginComponent.js +2 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +5 -1
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts +2 -1
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.js +3 -2
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +2 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +0 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.d.ts +1 -1
- package/dist/events/event-card/EventCard.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.js +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +2 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +2 -2
- package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.js +2 -1
- package/dist/events/event-statistic-modal/utils/index.js +3 -3
- package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
- package/dist/events/event-venue-map/EventVenueMap.js +1 -0
- package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
- package/dist/events/event-venue-map/hooks/useCanvasSize.js +11 -4
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +4 -11
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +13 -0
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.js +80 -81
- package/dist/iframe/payment/payment-page/PaymentPage.js +8 -4
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +19 -45
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +4 -5
- package/dist/modals/dialog/Dialog.d.ts.map +1 -1
- package/dist/modals/dialog/Dialog.js +41 -39
- package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts +0 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +8 -5
- package/dist/notification/email-template/form/EmailTemplateForm.d.ts +1 -2
- package/dist/notification/email-template/form/EmailTemplateForm.d.ts.map +1 -1
- package/dist/notification/email-template/form/EmailTemplateForm.js +1 -2
- package/dist/product-set/control/ProductSetControl.js +2 -1
- package/dist/product-set/form/ProductSetForm.d.ts +4 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -0
- package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +6 -0
- package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
- package/dist/product-set/product/deposit/ProductDepositControl.js +3 -0
- package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +6 -0
- package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
- package/dist/product-set/product/price/ProductPriceControl.js +3 -0
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +4 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +12 -0
- package/dist/product-set/utils/index.d.ts +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +3 -0
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +1 -1
- package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.js +3 -0
- package/dist/resource/form/components/SortControl.d.ts.map +1 -1
- package/dist/resource/form/components/SortControl.js +3 -0
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +21 -0
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +4 -1
- package/dist/setting/dashboard/payments/payments-modal/PaymentsModal.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +20 -14
- package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
- package/dist/static/CurrencyNumberInput.js +3 -0
- package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +3 -0
- package/dist/static/number-input/NumberInput.d.ts.map +1 -1
- package/dist/static/number-input/NumberInput.js +3 -0
- package/dist/styles/iframe-events/Calendar.scss +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
- package/dist/zone/form/components/GameDurationControl.js +3 -0
- package/dist/zone/form/components/SortControl.d.ts.map +1 -1
- package/dist/zone/form/components/SortControl.js +3 -0
- package/package.json +8 -8
- package/src/auth/Layout/UserNavDropDownToggle.tsx +1 -1
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/events/edit-event-modal/IntervalInput.tsx +4 -0
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +12 -4
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +0 -1
- package/src/events/event-card/EventCard.tsx +10 -8
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +3 -2
- package/src/events/event-statistic-modal/hooks/useTableData.tsx +2 -1
- package/src/events/event-statistic-modal/utils/index.ts +4 -4
- package/src/events/event-venue-map/EventVenueMap.tsx +1 -0
- package/src/events/event-venue-map/hooks/useCanvasSize.ts +5 -1
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +1 -5
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -2
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +9 -0
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +109 -103
- package/src/iframe/payment/payment-page/PaymentPage.tsx +6 -6
- package/src/iframe/ryft/RyftPaymentForm.tsx +25 -58
- package/src/iframe/ryft/utils/ryft-form.ts +6 -5
- package/src/modals/dialog/Dialog.tsx +36 -35
- package/src/notification/email-template/card/EmailTemplateCard.tsx +2 -0
- package/src/notification/email-template/control/EmailTemplateControl.tsx +9 -10
- package/src/notification/email-template/form/EmailTemplateForm.tsx +0 -3
- package/src/product-set/control/ProductSetControl.tsx +1 -1
- package/src/product-set/form/ProductSetForm.tsx +6 -2
- package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +2 -0
- package/src/product-set/product/deposit/ProductDepositControl.tsx +1 -0
- package/src/product-set/product/duration/ProductDurationControl.tsx +2 -0
- package/src/product-set/product/price/ProductPriceControl.tsx +1 -0
- package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +2 -0
- package/src/product-set/product/quantity/ProductQuantityControl.tsx +2 -0
- package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +1 -0
- package/src/product-set/product-category/ProductCategoryControl.tsx +4 -0
- package/src/recurrence-input/RecurrenceEndInput.tsx +1 -0
- package/src/recurrence-input/RecurrenceInput.tsx +3 -4
- package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +1 -0
- package/src/resource/form/components/CapacityControl.tsx +1 -0
- package/src/resource/form/components/SortControl.tsx +1 -0
- package/src/sales/coupon/control/CouponFormControl.tsx +7 -0
- package/src/setting/dashboard/DashboardSettingForm.tsx +1 -0
- package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +0 -1
- package/src/snippet/snippet-template/preview/Preview.tsx +9 -6
- package/src/static/CurrencyNumberInput.tsx +1 -0
- package/src/static/form-number-input/FormNumberInput.tsx +1 -0
- package/src/static/number-input/NumberInput.tsx +1 -0
- package/src/styles/iframe-events/Calendar.scss +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/zone/form/components/GameDurationControl.tsx +1 -0
- package/src/zone/form/components/SortControl.tsx +1 -0
- package/yarn.lock +575 -528
- package/dist/CustomDatePicker/CustomDatePicker.d.ts +0 -10
- package/dist/CustomDatePicker/CustomDatePicker.d.ts.map +0 -1
- package/src/CustomDatePicker/CustomDatePicker.tsx +0 -252
|
@@ -65,52 +65,55 @@ var useTableData = function(param) {
|
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
var renderCategoryItem = function(products) {
|
|
68
|
-
var _products__productCategory
|
|
69
|
-
var _products__productCategory_name
|
|
68
|
+
var _products__productCategory;
|
|
69
|
+
var _products__productCategory_name;
|
|
70
70
|
return {
|
|
71
71
|
key: uniqueId('category-id-'),
|
|
72
|
-
name: wrapLabelContent((_products__productCategory_name = (
|
|
72
|
+
name: wrapLabelContent((_products__productCategory_name = (_products__productCategory = products[0].productCategory) === null || _products__productCategory === void 0 ? void 0 : _products__productCategory.name) !== null && _products__productCategory_name !== void 0 ? _products__productCategory_name : ''),
|
|
73
73
|
quantity: '',
|
|
74
|
-
price: wrapLabelContent("".concat(t('total'), ": ").concat(formatPrice(getTotalSumByCategory(
|
|
74
|
+
price: wrapLabelContent("".concat(t('total'), ": ").concat(formatPrice(getTotalSumByCategory(order.orderProducts, products))))
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
77
|
var reworkProductStructure = function(order) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
})) !== null && _map !== void 0 ? _map : []
|
|
105
|
-
};
|
|
106
|
-
});
|
|
78
|
+
return order ? flatMap(order, function(item) {
|
|
79
|
+
if (!item || !Array.isArray(item)) return [];
|
|
80
|
+
return item.map(function(modGroup, idx) {
|
|
81
|
+
var _order_deletedAt, _order_orderId, _order_price, _order_productId, _modGroup_productQuantity, _order_deposit;
|
|
82
|
+
return {
|
|
83
|
+
deletedAt: (_order_deletedAt = order.deletedAt) !== null && _order_deletedAt !== void 0 ? _order_deletedAt : null,
|
|
84
|
+
id: "".concat(order.id, "-").concat(idx + 1),
|
|
85
|
+
orderId: (_order_orderId = order.orderId) !== null && _order_orderId !== void 0 ? _order_orderId : null,
|
|
86
|
+
price: (_order_price = order.price) !== null && _order_price !== void 0 ? _order_price : 0,
|
|
87
|
+
productId: (_order_productId = order.productId) !== null && _order_productId !== void 0 ? _order_productId : '',
|
|
88
|
+
quantity: (_modGroup_productQuantity = modGroup.productQuantity) !== null && _modGroup_productQuantity !== void 0 ? _modGroup_productQuantity : 1,
|
|
89
|
+
deposit: (_order_deposit = order.deposit) !== null && _order_deposit !== void 0 ? _order_deposit : 0,
|
|
90
|
+
orderProductModifiers: modGroup.modifiers.map(function(mod) {
|
|
91
|
+
var _mod_modifierId, _mod_price, _mod_productId, _mod_quantity, _mod_modifierSetId, _mod_modifier;
|
|
92
|
+
return {
|
|
93
|
+
modifierId: (_mod_modifierId = mod.modifierId) !== null && _mod_modifierId !== void 0 ? _mod_modifierId : '',
|
|
94
|
+
price: (_mod_price = mod.price) !== null && _mod_price !== void 0 ? _mod_price : 0,
|
|
95
|
+
productId: (_mod_productId = mod.productId) !== null && _mod_productId !== void 0 ? _mod_productId : '',
|
|
96
|
+
quantity: (_mod_quantity = mod.quantity) !== null && _mod_quantity !== void 0 ? _mod_quantity : 1,
|
|
97
|
+
modifierSetId: (_mod_modifierSetId = mod.modifierSetId) !== null && _mod_modifierSetId !== void 0 ? _mod_modifierSetId : '',
|
|
98
|
+
modifier: (_mod_modifier = mod.modifier) !== null && _mod_modifier !== void 0 ? _mod_modifier : null
|
|
99
|
+
};
|
|
100
|
+
})
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
}) : [];
|
|
107
104
|
};
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
var
|
|
105
|
+
var renderProductItem = function(param) {
|
|
106
|
+
var product = param.product, productsForCategory = param.productsForCategory;
|
|
107
|
+
var _productsForCategory_find, _product_orderProductModifiers;
|
|
108
|
+
if (product.quantity === 0) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
var name = ((_productsForCategory_find = productsForCategory.find(function(item) {
|
|
112
|
+
return item.id === product.productId;
|
|
113
|
+
})) === null || _productsForCategory_find === void 0 ? void 0 : _productsForCategory_find.name) || '';
|
|
111
114
|
return {
|
|
112
|
-
key:
|
|
113
|
-
name:
|
|
115
|
+
key: product.id,
|
|
116
|
+
name: name,
|
|
114
117
|
quantity: /*#__PURE__*/ jsxs("div", {
|
|
115
118
|
className: "quantity",
|
|
116
119
|
children: [
|
|
@@ -118,23 +121,21 @@ var useTableData = function(param) {
|
|
|
118
121
|
className: "multiplier",
|
|
119
122
|
children: "x"
|
|
120
123
|
}),
|
|
121
|
-
quantity
|
|
124
|
+
product.quantity
|
|
122
125
|
]
|
|
123
126
|
}),
|
|
124
|
-
price: formatPrice(price
|
|
127
|
+
price: formatPrice(product.price),
|
|
128
|
+
modifier: (product === null || product === void 0 ? void 0 : (_product_orderProductModifiers = product.orderProductModifiers) === null || _product_orderProductModifiers === void 0 ? void 0 : _product_orderProductModifiers.map(renderModifierItem)) || []
|
|
125
129
|
};
|
|
126
130
|
};
|
|
127
|
-
var
|
|
128
|
-
var
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return item.id === product.productId;
|
|
133
|
-
})) === null || _productsForCategory_find === void 0 ? void 0 : _productsForCategory_find.name) || '';
|
|
134
|
-
var _product_price, _product_orderProductModifiers_map;
|
|
131
|
+
var renderModifierItem = function(orderModifier) {
|
|
132
|
+
var quantity = orderModifier.quantity, modifier = orderModifier.modifier, modifierId = orderModifier.modifierId, price = orderModifier.price;
|
|
133
|
+
if (quantity === 0) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
135
136
|
return {
|
|
136
|
-
key:
|
|
137
|
-
name: name,
|
|
137
|
+
key: modifierId,
|
|
138
|
+
name: " - ".concat((modifier === null || modifier === void 0 ? void 0 : modifier.name) || ''),
|
|
138
139
|
quantity: /*#__PURE__*/ jsxs("div", {
|
|
139
140
|
className: "quantity",
|
|
140
141
|
children: [
|
|
@@ -142,51 +143,47 @@ var useTableData = function(param) {
|
|
|
142
143
|
className: "multiplier",
|
|
143
144
|
children: "x"
|
|
144
145
|
}),
|
|
145
|
-
|
|
146
|
+
quantity
|
|
146
147
|
]
|
|
147
148
|
}),
|
|
148
|
-
price: formatPrice(
|
|
149
|
-
modifier: ((_product_orderProductModifiers_map = product === null || product === void 0 ? void 0 : (_product_orderProductModifiers = product.orderProductModifiers) === null || _product_orderProductModifiers === void 0 ? void 0 : _product_orderProductModifiers.map(renderModifierItem)) !== null && _product_orderProductModifiers_map !== void 0 ? _product_orderProductModifiers_map : []).filter(Boolean)
|
|
149
|
+
price: formatPrice(price)
|
|
150
150
|
};
|
|
151
151
|
};
|
|
152
152
|
var renderProductsContent = function() {
|
|
153
153
|
var productCategories = _to_consumable_array(new Set(order.products.map(function(product) {
|
|
154
154
|
return product.productCategoryId;
|
|
155
155
|
})));
|
|
156
|
-
return productCategories.reduce(function(
|
|
157
|
-
var
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
var products = (_order_orderProducts_filter = order === null || order === void 0 ? void 0 : (_order_orderProducts = order.orderProducts) === null || _order_orderProducts === void 0 ? void 0 : _order_orderProducts.filter(function(el) {
|
|
164
|
-
return productsForCategory.map(function(p) {
|
|
165
|
-
return p.id;
|
|
156
|
+
return productCategories.reduce(function(previousValues, categoryId) {
|
|
157
|
+
var productsForCategory = order === null || order === void 0 ? void 0 : order.products.filter(function(product) {
|
|
158
|
+
return product.productCategoryId === categoryId;
|
|
159
|
+
});
|
|
160
|
+
var products = order.orderProducts.filter(function(el) {
|
|
161
|
+
return productsForCategory.map(function(product) {
|
|
162
|
+
return product.id;
|
|
166
163
|
}).includes(el.productId);
|
|
167
|
-
})
|
|
168
|
-
if (!products.length)
|
|
164
|
+
});
|
|
165
|
+
if (!products.length) {
|
|
166
|
+
return previousValues;
|
|
167
|
+
}
|
|
169
168
|
var productsWithReworkedModifier = products.map(function(product) {
|
|
170
|
-
|
|
171
|
-
if (!(product === null || product === void 0 ? void 0 : (_product_orderProductModifiers = product.orderProductModifiers) === null || _product_orderProductModifiers === void 0 ? void 0 : _product_orderProductModifiers.length)) return product;
|
|
169
|
+
if (!product.orderProductModifiers.length) return product;
|
|
172
170
|
return reworkProductStructure(product);
|
|
173
171
|
});
|
|
174
|
-
var filteredProducts = flatten(productsWithReworkedModifier).map(function(
|
|
172
|
+
var filteredProducts = flatten(productsWithReworkedModifier).map(function(product) {
|
|
175
173
|
return renderProductItem({
|
|
176
|
-
product:
|
|
174
|
+
product: product,
|
|
177
175
|
productsForCategory: productsForCategory
|
|
178
176
|
});
|
|
179
|
-
}).filter(function(row) {
|
|
180
|
-
return Boolean(row);
|
|
181
177
|
});
|
|
182
|
-
|
|
183
|
-
var productWithModifier = flatMap(filteredProducts, function(row) {
|
|
184
|
-
var _row_modifier;
|
|
178
|
+
var productWithModifier = flatMap(filteredProducts, function(item) {
|
|
185
179
|
return [
|
|
186
|
-
|
|
187
|
-
].concat(_to_consumable_array(
|
|
180
|
+
item
|
|
181
|
+
].concat(_to_consumable_array(item.modifier));
|
|
188
182
|
});
|
|
189
|
-
|
|
183
|
+
if (!filteredProducts.length) {
|
|
184
|
+
return previousValues;
|
|
185
|
+
}
|
|
186
|
+
return _to_consumable_array(previousValues).concat([
|
|
190
187
|
renderCategoryItem(productsForCategory)
|
|
191
188
|
], _to_consumable_array(productWithModifier));
|
|
192
189
|
}, []);
|
|
@@ -203,18 +200,20 @@ var useTableData = function(param) {
|
|
|
203
200
|
});
|
|
204
201
|
};
|
|
205
202
|
var data = useMemo(function() {
|
|
206
|
-
if (!order)
|
|
203
|
+
if (!order) {
|
|
204
|
+
return [];
|
|
205
|
+
}
|
|
207
206
|
return _to_consumable_array(renderProductsContent()).concat(_to_consumable_array(renderSummaryItems(getOrderSummaryItems({
|
|
208
207
|
order: order,
|
|
209
208
|
paymentDetail: paymentDetail,
|
|
210
209
|
isPaymentProcessed: isPaymentProcessed,
|
|
211
210
|
externalDiscount: externalDiscount
|
|
212
211
|
}))));
|
|
213
|
-
},
|
|
212
|
+
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
213
|
+
[
|
|
214
214
|
order,
|
|
215
215
|
externalDiscount,
|
|
216
|
-
isPaymentProcessed
|
|
217
|
-
paymentDetail
|
|
216
|
+
isPaymentProcessed
|
|
218
217
|
]);
|
|
219
218
|
return data;
|
|
220
219
|
};
|
|
@@ -213,8 +213,12 @@ var PaymentPage = function(_param) {
|
|
|
213
213
|
}),
|
|
214
214
|
footer: /*#__PURE__*/ jsx("div", {
|
|
215
215
|
className: "d-flex flex-column justify-content-between",
|
|
216
|
-
children:
|
|
216
|
+
children: paymentMetadata ? /*#__PURE__*/ jsxs(Fragment, {
|
|
217
217
|
children: [
|
|
218
|
+
/*#__PURE__*/ jsx(SummaryTotalBlock, {
|
|
219
|
+
label: t('total'),
|
|
220
|
+
amount: paymentMetadata.total || 0
|
|
221
|
+
}),
|
|
218
222
|
/*#__PURE__*/ jsx(SummaryTotalBlock, {
|
|
219
223
|
label: t('paidSum'),
|
|
220
224
|
amount: paymentMetadata.paid || 0
|
|
@@ -226,15 +230,15 @@ var PaymentPage = function(_param) {
|
|
|
226
230
|
]
|
|
227
231
|
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
228
232
|
children: [
|
|
229
|
-
|
|
233
|
+
isCalculatedAmountGreaterThanOrderAmount && /*#__PURE__*/ jsx(SummaryTotalBlock, {
|
|
230
234
|
label: t(hasRemaingToPay ? 'payNow' : 'total'),
|
|
231
235
|
amount: orderCartAmountByFormValues + ((bookingSummaryProps === null || bookingSummaryProps === void 0 ? void 0 : bookingSummaryProps.transactionFee) || 0)
|
|
232
236
|
}),
|
|
233
|
-
|
|
237
|
+
hasRemaingToPay && /*#__PURE__*/ jsx(SummaryTotalBlock, {
|
|
234
238
|
label: t('remaining'),
|
|
235
239
|
amount: orderTotalAmountByFormValues - orderCartAmountByFormValues
|
|
236
240
|
}),
|
|
237
|
-
|
|
241
|
+
isPaymentLinkWithRemainingToPay && /*#__PURE__*/ jsx(SummaryTotalBlock, {
|
|
238
242
|
label: t('remaningToPay'),
|
|
239
243
|
amount: Number(data === null || data === void 0 ? void 0 : data.remaining_to_pay)
|
|
240
244
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEL,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAIlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAOzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEL,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAIlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAOzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,4CAqLtB,CAAA"}
|
|
@@ -198,7 +198,7 @@ var ryftErrorMap = {
|
|
|
198
198
|
};
|
|
199
199
|
var RyftPaymentForm = function(param) {
|
|
200
200
|
var accountId = param.accountId, isCreateLoading = param.isCreateLoading, isAppUsingInIframe = param.isAppUsingInIframe, providerPaymentSettings = param.providerPaymentSettings, onApplePayButtonClick = param.onApplePayButtonClick, initRyft = param.initRyft, resetReferrer = param.resetReferrer, onSubmit = param.onSubmit, payButtonDisabled = param.payButtonDisabled;
|
|
201
|
-
var _formRef_current_childNodes, _formRef_current, _accountId_data
|
|
201
|
+
var _formRef_current_childNodes, _formRef_current, _accountId_data;
|
|
202
202
|
var t = useTranslation([
|
|
203
203
|
'Design',
|
|
204
204
|
'Validation',
|
|
@@ -302,32 +302,24 @@ var RyftPaymentForm = function(param) {
|
|
|
302
302
|
return _ref.apply(this, arguments);
|
|
303
303
|
};
|
|
304
304
|
}();
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
//
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
// if (appleButton) {
|
|
324
|
-
// appleButton.disabled = payButtonDisabled
|
|
325
|
-
// appleButton.style.opacity = payButtonDisabled ? '0.6' : '1'
|
|
326
|
-
// }
|
|
327
|
-
// if (formBox) {
|
|
328
|
-
// formBox.style.display = payButtonDisabled ? 'block' : 'none'
|
|
329
|
-
// }
|
|
330
|
-
// }, [payButtonDisabled])
|
|
305
|
+
useEffect(function() {
|
|
306
|
+
var _formRef_current_childNodes, _formRef_current, _formRef_current_childNodes1, _formRef_current1, _accountId_data;
|
|
307
|
+
if (!((_formRef_current = formRef.current) === null || _formRef_current === void 0 ? void 0 : (_formRef_current_childNodes = _formRef_current.childNodes) === null || _formRef_current_childNodes === void 0 ? void 0 : _formRef_current_childNodes.length) || ((_formRef_current1 = formRef.current) === null || _formRef_current1 === void 0 ? void 0 : (_formRef_current_childNodes1 = _formRef_current1.childNodes) === null || _formRef_current_childNodes1 === void 0 ? void 0 : _formRef_current_childNodes1.length) < 3 || !((_accountId_data = accountId.data) === null || _accountId_data === void 0 ? void 0 : _accountId_data.account_id)) {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
injectComponentsInRyftForm({
|
|
311
|
+
t: t,
|
|
312
|
+
isAppUsingInIframe: isAppUsingInIframe,
|
|
313
|
+
onApplePayButtonClick: onApplePayButtonClick,
|
|
314
|
+
isDisableButton: !payButtonDisabled,
|
|
315
|
+
additionalPaymentMethodsEnabled: providerPaymentSettings === null || providerPaymentSettings === void 0 ? void 0 : providerPaymentSettings.additionalPaymentMethodsEnabled
|
|
316
|
+
});
|
|
317
|
+
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
318
|
+
[
|
|
319
|
+
(_formRef_current = formRef.current) === null || _formRef_current === void 0 ? void 0 : (_formRef_current_childNodes = _formRef_current.childNodes) === null || _formRef_current_childNodes === void 0 ? void 0 : _formRef_current_childNodes.length,
|
|
320
|
+
showApplePayButton,
|
|
321
|
+
payButtonDisabled
|
|
322
|
+
]);
|
|
331
323
|
useEffect(function() {
|
|
332
324
|
var _accountId_data;
|
|
333
325
|
if (!((_accountId_data = accountId.data) === null || _accountId_data === void 0 ? void 0 : _accountId_data.account_id) || accountId.isError) return;
|
|
@@ -346,24 +338,6 @@ var RyftPaymentForm = function(param) {
|
|
|
346
338
|
}, [
|
|
347
339
|
(_accountId_data = accountId.data) === null || _accountId_data === void 0 ? void 0 : _accountId_data.account_id
|
|
348
340
|
]);
|
|
349
|
-
useEffect(function() {
|
|
350
|
-
var _formRef_current_childNodes, _formRef_current, _formRef_current_childNodes1, _formRef_current1, _accountId_data;
|
|
351
|
-
if (!((_formRef_current = formRef.current) === null || _formRef_current === void 0 ? void 0 : (_formRef_current_childNodes = _formRef_current.childNodes) === null || _formRef_current_childNodes === void 0 ? void 0 : _formRef_current_childNodes.length) || ((_formRef_current1 = formRef.current) === null || _formRef_current1 === void 0 ? void 0 : (_formRef_current_childNodes1 = _formRef_current1.childNodes) === null || _formRef_current_childNodes1 === void 0 ? void 0 : _formRef_current_childNodes1.length) < 3 || !((_accountId_data = accountId.data) === null || _accountId_data === void 0 ? void 0 : _accountId_data.account_id)) {
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
injectComponentsInRyftForm({
|
|
355
|
-
t: t,
|
|
356
|
-
isAppUsingInIframe: isAppUsingInIframe,
|
|
357
|
-
onApplePayButtonClick: onApplePayButtonClick,
|
|
358
|
-
isDisableButton: !payButtonDisabled,
|
|
359
|
-
additionalPaymentMethodsEnabled: providerPaymentSettings === null || providerPaymentSettings === void 0 ? void 0 : providerPaymentSettings.additionalPaymentMethodsEnabled
|
|
360
|
-
});
|
|
361
|
-
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
362
|
-
[
|
|
363
|
-
(_formRef_current1 = formRef.current) === null || _formRef_current1 === void 0 ? void 0 : (_formRef_current_childNodes1 = _formRef_current1.childNodes) === null || _formRef_current_childNodes1 === void 0 ? void 0 : _formRef_current_childNodes1.length,
|
|
364
|
-
showApplePayButton,
|
|
365
|
-
payButtonDisabled
|
|
366
|
-
]);
|
|
367
341
|
if (accountId.isLoading || accountId.isFetching || isCreateLoading) return /*#__PURE__*/ jsx("div", {
|
|
368
342
|
className: "mt-5 pt-5",
|
|
369
343
|
children: /*#__PURE__*/ jsx(BlockLoader, {})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ryft-form.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ryft/utils/ryft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,UAAU,0BACR,SAAQ,IAAI,CACV,oBAAoB,EACpB,uBAAuB,GAAG,oBAAoB,CAC/C;IACD,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,+BAA+B,CAAC,EAAE,OAAO,CAAA;CAC1C;AAED,eAAO,MAAM,0BAA0B,wGAMpC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"ryft-form.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ryft/utils/ryft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,UAAU,0BACR,SAAQ,IAAI,CACV,oBAAoB,EACpB,uBAAuB,GAAG,oBAAoB,CAC/C;IACD,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,+BAA+B,CAAC,EAAE,OAAO,CAAA;CAC1C;AAED,eAAO,MAAM,0BAA0B,wGAMpC,0BAA0B,SA8E5B,CAAA"}
|
|
@@ -39,17 +39,17 @@ var injectComponentsInRyftForm = function(param) {
|
|
|
39
39
|
divider.id = 'mobile-pay-divider';
|
|
40
40
|
container.id = 'mobile-pay-divider-container';
|
|
41
41
|
container.append(dividerText, divider);
|
|
42
|
-
var payIframe = document.getElementById(
|
|
42
|
+
var payIframe = document.getElementById('ryft-pay-iframe');
|
|
43
43
|
if (payIframe) {
|
|
44
44
|
var formBox = document.getElementById('form-disable-box');
|
|
45
45
|
if (formBox) {
|
|
46
|
-
formBox.style.display = isDisableButton ?
|
|
46
|
+
formBox.style.display = isDisableButton ? 'block' : 'none';
|
|
47
47
|
}
|
|
48
48
|
var googleButton = document.getElementById('gpay-button-online-api-id');
|
|
49
|
-
var appleButton = document.getElementById(
|
|
49
|
+
var appleButton = document.getElementById('ryft-pay-apple-pay-button');
|
|
50
50
|
if (googleButton) {
|
|
51
51
|
googleButton.disabled = isDisableButton;
|
|
52
|
-
googleButton.style.opacity = isDisableButton ? '1' : '0.6';
|
|
52
|
+
googleButton.style.opacity = !isDisableButton ? '1' : '0.6';
|
|
53
53
|
}
|
|
54
54
|
if (appleButton) {
|
|
55
55
|
appleButton.disabled = isDisableButton;
|
|
@@ -60,7 +60,6 @@ var injectComponentsInRyftForm = function(param) {
|
|
|
60
60
|
var applePayButton = document.createElement('button');
|
|
61
61
|
applePayButton.id = 'apple-pay';
|
|
62
62
|
applePayButton.type = 'button';
|
|
63
|
-
applePayButton.style.opacity = !isDisableButton ? '1' : '0.6';
|
|
64
63
|
applePayButton.className = 'bg-dark btn btn-primary apple-pay-button';
|
|
65
64
|
applePayButton.textContent = t('Events:payWithApple');
|
|
66
65
|
applePayButton.onclick = onApplePayButtonClick;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/modals/dialog/Dialog.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAChC;AAED,eAAO,MAAM,MAAM,uEAOhB,YAAY,
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/modals/dialog/Dialog.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAChC;AAED,eAAO,MAAM,MAAM,uEAOhB,YAAY,4CAqDd,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Modal, Button } from 'react-bootstrap';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
|
|
@@ -15,45 +15,47 @@ var Dialog = function(param) {
|
|
|
15
15
|
onDecline();
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
return /*#__PURE__*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
19
|
+
children: /*#__PURE__*/ jsxs(Modal, {
|
|
20
|
+
show: isActive,
|
|
21
|
+
onHide: onDecline,
|
|
22
|
+
animation: false,
|
|
23
|
+
size: "sm",
|
|
24
|
+
centered: true,
|
|
25
|
+
className: "text-center justify-content-center rounded",
|
|
26
|
+
children: [
|
|
27
|
+
/*#__PURE__*/ jsx(Modal.Header, {
|
|
28
|
+
className: "justify-content-center border-0",
|
|
29
|
+
children: title && /*#__PURE__*/ jsx(Modal.Title, {
|
|
30
|
+
as: "h6",
|
|
31
|
+
children: title
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
content && /*#__PURE__*/ jsx(Modal.Body, {
|
|
35
|
+
className: "justify-content-center",
|
|
36
|
+
children: content
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ jsx(Modal.Footer, {
|
|
39
|
+
className: "border-0 justify-content-center",
|
|
40
|
+
children: customButtons || /*#__PURE__*/ jsxs(Fragment, {
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ jsx(Button, {
|
|
43
|
+
variant: "secondary",
|
|
44
|
+
className: "modal-buttons",
|
|
45
|
+
onClick: declineHandler,
|
|
46
|
+
children: t('cancel')
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ jsx(Button, {
|
|
49
|
+
variant: "primary",
|
|
50
|
+
className: "modal-buttons",
|
|
51
|
+
onClick: approveHandler,
|
|
52
|
+
children: t('Design:confirm')
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
})
|
|
31
56
|
})
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
className: "justify-content-center",
|
|
35
|
-
children: content
|
|
36
|
-
}),
|
|
37
|
-
/*#__PURE__*/ jsx(Modal.Footer, {
|
|
38
|
-
className: "border-0 justify-content-center",
|
|
39
|
-
children: customButtons || /*#__PURE__*/ jsxs(Fragment, {
|
|
40
|
-
children: [
|
|
41
|
-
/*#__PURE__*/ jsx(Button, {
|
|
42
|
-
variant: "secondary",
|
|
43
|
-
className: "modal-buttons",
|
|
44
|
-
onClick: declineHandler,
|
|
45
|
-
children: t('cancel')
|
|
46
|
-
}),
|
|
47
|
-
/*#__PURE__*/ jsx(Button, {
|
|
48
|
-
variant: "primary",
|
|
49
|
-
className: "modal-buttons",
|
|
50
|
-
onClick: approveHandler,
|
|
51
|
-
children: t('Design:confirm')
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
})
|
|
55
|
-
})
|
|
56
|
-
]
|
|
57
|
+
]
|
|
58
|
+
})
|
|
57
59
|
});
|
|
58
60
|
};
|
|
59
61
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailTemplateCard.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/card/EmailTemplateCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAEtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,CAAA;AAKzG,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAiB,EACjB,QAAgB,EAChB,aAAoB,EACpB,IAAI,GACL,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"EmailTemplateCard.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/card/EmailTemplateCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAEtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,CAAA;AAKzG,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAiB,EACjB,QAAgB,EAChB,aAAoB,EACpB,IAAI,GACL,EAAE,sBAAsB,2CAoDxB"}
|
|
@@ -7,7 +7,6 @@ export interface EmailTemplateControlProps {
|
|
|
7
7
|
meta: string;
|
|
8
8
|
defaultAttachments?: Attachment[];
|
|
9
9
|
notificationTypes?: NotificationType[];
|
|
10
|
-
waiverType?: boolean;
|
|
11
10
|
getDefaultTemplateMetaByType?: (type?: NotificationType | null) => string;
|
|
12
11
|
}
|
|
13
12
|
export declare const EmailTemplateControl: import("react").ForwardRefExoticComponent<EmailTemplateControlProps & import("react").RefAttributes<unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailTemplateControl.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/control/EmailTemplateControl.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,cAAc,EAEf,MAAM,sEAAsE,CAAA;AAG7E,OAAO,EAAE,UAAU,EAAE,MAAM,kEAAkE,CAAA;AAM7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,CAAA;AAMzG,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB,CAAC,EAAE,UAAU,EAAE,CAAA;IACjC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC,
|
|
1
|
+
{"version":3,"file":"EmailTemplateControl.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/control/EmailTemplateControl.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,cAAc,EAEf,MAAM,sEAAsE,CAAA;AAG7E,OAAO,EAAE,UAAU,EAAE,MAAM,kEAAkE,CAAA;AAM7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,CAAA;AAMzG,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB,CAAC,EAAE,UAAU,EAAE,CAAA;IACjC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC,4BAA4B,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,KAAK,MAAM,CAAA;CAC1E;AAED,eAAO,MAAM,oBAAoB,+GAsahC,CAAA"}
|
|
@@ -234,7 +234,7 @@ function _ts_generator(thisArg, body) {
|
|
|
234
234
|
}
|
|
235
235
|
var EDITOR_DESIGN_UPDATED = 'design:updated';
|
|
236
236
|
var EmailTemplateControl = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
237
|
-
var setIsLoading = param.setIsLoading, meta = param.meta, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_defaultAttachments = param.defaultAttachments, defaultAttachments = _param_defaultAttachments === void 0 ? [] : _param_defaultAttachments, _param_notificationTypes = param.notificationTypes, notificationTypes = _param_notificationTypes === void 0 ? [] : _param_notificationTypes,
|
|
237
|
+
var setIsLoading = param.setIsLoading, meta = param.meta, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_defaultAttachments = param.defaultAttachments, defaultAttachments = _param_defaultAttachments === void 0 ? [] : _param_defaultAttachments, _param_notificationTypes = param.notificationTypes, notificationTypes = _param_notificationTypes === void 0 ? [] : _param_notificationTypes, getDefaultTemplateMetaByType = param.getDefaultTemplateMetaByType;
|
|
238
238
|
var _errors_type, _errors_name, _errors_subject, _errors_body;
|
|
239
239
|
var t = useTranslation([
|
|
240
240
|
'Design'
|
|
@@ -480,7 +480,7 @@ var EmailTemplateControl = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
480
480
|
children: /*#__PURE__*/ jsxs(Form.Group, {
|
|
481
481
|
as: Col,
|
|
482
482
|
children: [
|
|
483
|
-
|
|
483
|
+
/*#__PURE__*/ jsx(Form.Check, _object_spread_props(_object_spread({}, register('isActive')), {
|
|
484
484
|
name: "isActive",
|
|
485
485
|
label: t('Design:active'),
|
|
486
486
|
id: "formGroupIsActive",
|
|
@@ -577,8 +577,8 @@ var EmailTemplateControl = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
577
577
|
}));
|
|
578
578
|
}
|
|
579
579
|
// should show dropdown only if user want to include PDF file
|
|
580
|
-
if (option.type === OPTION_TYPE.files_selector
|
|
581
|
-
var fileSelectors =
|
|
580
|
+
if (option.type === OPTION_TYPE.files_selector) {
|
|
581
|
+
var fileSelectors = JSON.parse(option.defaultValue);
|
|
582
582
|
var fileNames = Object.values(fileSelectors);
|
|
583
583
|
var fileKeys = Object.keys(fileSelectors);
|
|
584
584
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
@@ -622,7 +622,7 @@ var EmailTemplateControl = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
622
622
|
]
|
|
623
623
|
});
|
|
624
624
|
}
|
|
625
|
-
if (option.type === OPTION_TYPE.days_reminder
|
|
625
|
+
if (option.type === OPTION_TYPE.days_reminder) {
|
|
626
626
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
627
627
|
children: [
|
|
628
628
|
/*#__PURE__*/ jsx(Form.Label, {
|
|
@@ -631,6 +631,9 @@ var EmailTemplateControl = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
631
631
|
}),
|
|
632
632
|
/*#__PURE__*/ jsx(Form.Control, _object_spread_props(_object_spread({}, register("templateOptionValues.".concat(option === null || option === void 0 ? void 0 : option.id, ".value"))), {
|
|
633
633
|
type: "number",
|
|
634
|
+
onWheel: function(event) {
|
|
635
|
+
return event.currentTarget.blur();
|
|
636
|
+
},
|
|
634
637
|
placeholder: t("Design:".concat(option.name)),
|
|
635
638
|
id: option.name + option.id,
|
|
636
639
|
defaultValue: option.selectedValue || ''
|
|
@@ -31,10 +31,9 @@ export interface EmailTemplateProps extends HasPermissionProp {
|
|
|
31
31
|
placeholders?: NotificationPlaceholder[];
|
|
32
32
|
options?: TemplateOption[];
|
|
33
33
|
serverErrors?: ServerError;
|
|
34
|
-
waiverType?: boolean;
|
|
35
34
|
notificationTypes?: NotificationType[];
|
|
36
35
|
getDefaultTemplateMetaByType?: (type?: NotificationType | null) => string;
|
|
37
36
|
onTypeChange?: (type?: NotificationType | null) => void;
|
|
38
37
|
}
|
|
39
|
-
export declare const EmailTemplateForm: ({ defaultValues, onSubmitSave, onSubmitSaveAndSend, hasPermission, placeholders, options, serverErrors,
|
|
38
|
+
export declare const EmailTemplateForm: ({ defaultValues, onSubmitSave, onSubmitSaveAndSend, hasPermission, placeholders, options, serverErrors, notificationTypes, getDefaultTemplateMetaByType, onTypeChange, }: EmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
39
|
//# sourceMappingURL=EmailTemplateForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailTemplateForm.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/form/EmailTemplateForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;AAIzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+EAA+E,CAAA;AACvH,OAAO,EAAE,cAAc,EAAE,MAAM,sEAAsE,CAAA;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2EAA2E,CAAA;AAC/G,OAAO,EAAE,kBAAkB,EAAE,MAAM,0EAA0E,CAAA;AAC7G,OAAO,EAAE,UAAU,EAAE,MAAM,kEAAkE,CAAA;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qEAAqE,CAAA;AAC1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,CAAA;AAKzG,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kBAAkB,CAAC,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAA;IACjE,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAA;IAC5C,cAAc,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACvC,IAAI,CAAC,EAAE,gBAAgB,CAAA;CACxB;AAED,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACnD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAC3D,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,YAAY,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACxC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,
|
|
1
|
+
{"version":3,"file":"EmailTemplateForm.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/form/EmailTemplateForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;AAIzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+EAA+E,CAAA;AACvH,OAAO,EAAE,cAAc,EAAE,MAAM,sEAAsE,CAAA;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2EAA2E,CAAA;AAC/G,OAAO,EAAE,kBAAkB,EAAE,MAAM,0EAA0E,CAAA;AAC7G,OAAO,EAAE,UAAU,EAAE,MAAM,kEAAkE,CAAA;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qEAAqE,CAAA;AAC1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,CAAA;AAKzG,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kBAAkB,CAAC,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAA;IACjE,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAA;IAC5C,cAAc,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACvC,IAAI,CAAC,EAAE,gBAAgB,CAAA;CACxB;AAED,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACnD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAC3D,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,YAAY,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACxC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC,4BAA4B,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,KAAK,MAAM,CAAA;IACzE,YAAY,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAA;CACxD;AAED,eAAO,MAAM,iBAAiB,6KAW3B,kBAAkB,4CAmEpB,CAAA"}
|
|
@@ -108,7 +108,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
108
108
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
109
109
|
}
|
|
110
110
|
var EmailTemplateForm = function(param) {
|
|
111
|
-
var defaultValues = param.defaultValues, onSubmitSave = param.onSubmitSave, onSubmitSaveAndSend = param.onSubmitSaveAndSend, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, _param_placeholders = param.placeholders, placeholders = _param_placeholders === void 0 ? [] : _param_placeholders, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, serverErrors = param.serverErrors,
|
|
111
|
+
var defaultValues = param.defaultValues, onSubmitSave = param.onSubmitSave, onSubmitSaveAndSend = param.onSubmitSaveAndSend, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, _param_placeholders = param.placeholders, placeholders = _param_placeholders === void 0 ? [] : _param_placeholders, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, serverErrors = param.serverErrors, _param_notificationTypes = param.notificationTypes, notificationTypes = _param_notificationTypes === void 0 ? [] : _param_notificationTypes, getDefaultTemplateMetaByType = param.getDefaultTemplateMetaByType, onTypeChange = param.onTypeChange;
|
|
112
112
|
var t = useTranslation('Design').t;
|
|
113
113
|
var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
|
|
114
114
|
var emailEditorRef = useRef(null);
|
|
@@ -143,7 +143,6 @@ var EmailTemplateForm = function(param) {
|
|
|
143
143
|
children: [
|
|
144
144
|
/*#__PURE__*/ jsx(EmailTemplateControl, {
|
|
145
145
|
ref: emailEditorRef,
|
|
146
|
-
waiverType: waiverType,
|
|
147
146
|
setIsLoading: setIsLoading,
|
|
148
147
|
meta: (defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.meta) || null,
|
|
149
148
|
defaultAttachments: (defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.attachments) || [],
|