@licklist/design 0.72.73 → 0.74.0-dev.0

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.
Files changed (224) hide show
  1. package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
  2. package/dist/auth/Authorizer.d.ts.map +1 -1
  3. package/dist/auth/Authorizer.js +2 -1
  4. package/dist/auth/Login/LoginComponent.js +2 -1
  5. package/dist/auth/Router.d.ts.map +1 -1
  6. package/dist/auth/Router.js +18 -14
  7. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +2 -1
  8. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  9. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +2 -1
  10. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
  11. package/dist/events/event-statistic-modal/EventStatisticModal.js +2 -2
  12. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -1
  13. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
  14. package/dist/events/event-statistic-modal/hooks/useTableData.js +2 -1
  15. package/dist/events/event-statistic-modal/utils/index.js +3 -3
  16. package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
  17. package/dist/events/event-venue-map/EventVenueMap.js +1 -0
  18. package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
  19. package/dist/events/event-venue-map/hooks/useCanvasSize.js +11 -4
  20. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +2 -3
  21. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +1 -1
  22. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +4 -11
  23. package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
  24. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
  25. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +13 -0
  26. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  27. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  28. package/dist/iframe/ryft/utils/ryft-form.js +4 -5
  29. package/dist/index.d.ts +0 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +0 -6
  32. package/dist/layout/DropDown.d.ts +2 -1
  33. package/dist/layout/DropDown.d.ts.map +1 -1
  34. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  35. package/dist/notification/email-template/control/EmailTemplateControl.js +3 -0
  36. package/dist/product-set/control/ProductSetControl.d.ts +2 -0
  37. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  38. package/dist/product-set/control/ProductSetControl.js +10 -0
  39. package/dist/product-set/form/ProductSetForm.d.ts +5 -3
  40. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  41. package/dist/product-set/form/ProductSetForm.js +1 -1
  42. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  43. package/dist/product-set/form/ProductZonesControl.js +0 -2
  44. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  45. package/dist/product-set/form/ProductsControl.js +3 -0
  46. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  47. package/dist/product-set/form/SubProductsControl.js +0 -3
  48. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  49. package/dist/product-set/form/VenueMapsControl.js +0 -3
  50. package/dist/product-set/form/context.d.ts +1 -2
  51. package/dist/product-set/form/context.d.ts.map +1 -1
  52. package/dist/product-set/product/ProductControl.d.ts +2 -0
  53. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  54. package/dist/product-set/product/ProductControl.js +7 -0
  55. package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
  56. package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +6 -0
  57. package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
  58. package/dist/product-set/product/deposit/ProductDepositControl.js +3 -0
  59. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  60. package/dist/product-set/product/duration/ProductDurationControl.js +6 -0
  61. package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
  62. package/dist/product-set/product/price/ProductPriceControl.js +3 -0
  63. package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
  64. package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +6 -0
  65. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  66. package/dist/product-set/product/quantity/ProductQuantityControl.js +6 -0
  67. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  68. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +4 -1
  69. package/dist/product-set/product/scanRange/ProductScanRangeControl.d.ts +12 -0
  70. package/dist/product-set/product/scanRange/ProductScanRangeControl.d.ts.map +1 -0
  71. package/dist/product-set/product/scanRange/ProductScanRangeControl.js +153 -0
  72. package/dist/product-set/product/scanRange/index.d.ts +2 -0
  73. package/dist/product-set/product/scanRange/index.d.ts.map +1 -0
  74. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  75. package/dist/product-set/product-category/ProductCategoryControl.js +12 -0
  76. package/dist/product-set/utils/index.d.ts +4 -1
  77. package/dist/product-set/utils/index.d.ts.map +1 -1
  78. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  79. package/dist/recurrence-input/RecurrenceEndInput.js +3 -0
  80. package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
  81. package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
  82. package/dist/resource/form/components/CapacityControl.js +3 -0
  83. package/dist/resource/form/components/SortControl.d.ts.map +1 -1
  84. package/dist/resource/form/components/SortControl.js +3 -0
  85. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  86. package/dist/sales/booking/results/components/ResultCard.js +0 -2
  87. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  88. package/dist/sales/coupon/control/CouponFormControl.js +21 -0
  89. package/dist/sales/coupon/form/CouponFrom.d.ts +2 -1
  90. package/dist/sales/coupon/form/CouponFrom.d.ts.map +1 -1
  91. package/dist/sales/coupon/form/CouponFrom.js +19 -6
  92. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  93. package/dist/setting/dashboard/DashboardSettingForm.js +4 -1
  94. package/dist/setting/index.d.ts +0 -2
  95. package/dist/setting/index.d.ts.map +1 -1
  96. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  97. package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
  98. package/dist/static/CurrencyNumberInput.js +3 -0
  99. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  100. package/dist/static/form-number-input/FormNumberInput.js +3 -0
  101. package/dist/static/number-input/NumberInput.d.ts.map +1 -1
  102. package/dist/static/number-input/NumberInput.js +3 -0
  103. package/dist/styles/form/CustomCheckbox.scss +31 -0
  104. package/dist/styles/iframe-events/Calendar.scss +1 -1
  105. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  106. package/dist/styles/product-set/ProductSetForm.scss +2 -3
  107. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
  108. package/dist/styles/sales/BookingResults.scss +1 -1
  109. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
  110. package/dist/zone/form/components/GameDurationControl.js +3 -0
  111. package/dist/zone/form/components/SortControl.d.ts.map +1 -1
  112. package/dist/zone/form/components/SortControl.js +3 -0
  113. package/package.json +13 -7
  114. package/src/affiliate/form/AffiliateForm.tsx +1 -0
  115. package/src/auth/Authorizer.tsx +1 -0
  116. package/src/auth/Login/LoginComponent.tsx +1 -1
  117. package/src/auth/Router.tsx +19 -19
  118. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -1
  119. package/src/events/event-statistic-modal/EventStatisticModal.tsx +3 -1
  120. package/src/events/event-statistic-modal/hooks/useTableData.tsx +2 -1
  121. package/src/events/event-statistic-modal/utils/index.ts +4 -4
  122. package/src/events/event-venue-map/EventVenueMap.tsx +1 -0
  123. package/src/events/event-venue-map/hooks/useCanvasSize.ts +5 -1
  124. package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +2 -2
  125. package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +5 -13
  126. package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +1 -0
  127. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +9 -0
  128. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
  129. package/src/iframe/ryft/utils/ryft-form.ts +6 -5
  130. package/src/index.ts +0 -1
  131. package/src/layout/DropDown.tsx +1 -1
  132. package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -0
  133. package/src/product-set/control/ProductSetControl.tsx +11 -0
  134. package/src/product-set/form/ProductSetForm.tsx +7 -6
  135. package/src/product-set/form/ProductZonesControl.tsx +1 -4
  136. package/src/product-set/form/ProductsControl.tsx +2 -0
  137. package/src/product-set/form/SubProductsControl.tsx +0 -3
  138. package/src/product-set/form/VenueMapsControl.tsx +0 -3
  139. package/src/product-set/form/context.tsx +2 -5
  140. package/src/product-set/product/ProductControl.tsx +18 -13
  141. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
  142. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +2 -0
  143. package/src/product-set/product/deposit/ProductDepositControl.tsx +1 -0
  144. package/src/product-set/product/duration/ProductDurationControl.tsx +2 -0
  145. package/src/product-set/product/price/ProductPriceControl.tsx +1 -0
  146. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +2 -0
  147. package/src/product-set/product/quantity/ProductQuantityControl.tsx +2 -0
  148. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +1 -0
  149. package/src/product-set/product/scanRange/ProductScanRangeControl.stories.ts +45 -0
  150. package/src/product-set/product/scanRange/ProductScanRangeControl.tsx +163 -0
  151. package/src/product-set/product/scanRange/index.ts +1 -0
  152. package/src/product-set/product-category/ProductCategoryControl.tsx +4 -0
  153. package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
  154. package/src/recurrence-input/RecurrenceEndInput.tsx +1 -0
  155. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +1 -0
  156. package/src/resource/form/components/CapacityControl.tsx +1 -0
  157. package/src/resource/form/components/SortControl.tsx +1 -0
  158. package/src/sales/booking/results/components/ResultCard.tsx +0 -2
  159. package/src/sales/coupon/control/CouponFormControl.tsx +7 -0
  160. package/src/sales/coupon/form/CouponFrom.tsx +20 -8
  161. package/src/setting/dashboard/DashboardSettingForm.tsx +1 -0
  162. package/src/setting/index.ts +0 -2
  163. package/src/sortable-tree/SortableTreeItem.tsx +1 -6
  164. package/src/static/CurrencyNumberInput.tsx +1 -0
  165. package/src/static/form-number-input/FormNumberInput.tsx +1 -0
  166. package/src/static/number-input/NumberInput.tsx +1 -0
  167. package/src/styles/form/CustomCheckbox.scss +31 -0
  168. package/src/styles/iframe-events/Calendar.scss +1 -1
  169. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  170. package/src/styles/product-set/ProductSetForm.scss +2 -3
  171. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
  172. package/src/styles/sales/BookingResults.scss +1 -1
  173. package/src/zone/form/components/GameDurationControl.tsx +1 -0
  174. package/src/zone/form/components/SortControl.tsx +1 -0
  175. package/yarn.lock +191 -221
  176. package/dist/assets/logo/licklist.sm.svg.js +0 -33
  177. package/dist/assets/logo/licklist.svg.js +0 -16
  178. package/dist/header/BookeditHeader.d.ts +0 -15
  179. package/dist/header/BookeditHeader.d.ts.map +0 -1
  180. package/dist/header/BookeditHeader.js +0 -21
  181. package/dist/header/Header.d.ts +0 -16
  182. package/dist/header/Header.d.ts.map +0 -1
  183. package/dist/header/Header.js +0 -55
  184. package/dist/header/LicklistHeader.d.ts +0 -15
  185. package/dist/header/LicklistHeader.d.ts.map +0 -1
  186. package/dist/header/LicklistHeader.js +0 -23
  187. package/dist/header/elements/CompanySelector.d.ts +0 -11
  188. package/dist/header/elements/CompanySelector.d.ts.map +0 -1
  189. package/dist/header/elements/CompanySelector.js +0 -36
  190. package/dist/header/elements/index.d.ts +0 -3
  191. package/dist/header/elements/index.d.ts.map +0 -1
  192. package/dist/header/index.d.ts +0 -6
  193. package/dist/header/index.d.ts.map +0 -1
  194. package/dist/setting/admin/AdminSettingForm.d.ts +0 -25
  195. package/dist/setting/admin/AdminSettingForm.d.ts.map +0 -1
  196. package/dist/setting/admin/AdminSettingForm.js +0 -220
  197. package/dist/setting/admin/PaymentFeeForm.d.ts +0 -13
  198. package/dist/setting/admin/PaymentFeeForm.d.ts.map +0 -1
  199. package/dist/setting/admin/PaymentFeeForm.js +0 -424
  200. package/dist/setting/admin/index.d.ts +0 -2
  201. package/dist/setting/admin/index.d.ts.map +0 -1
  202. package/dist/setting/system/SystemSettingForm.d.ts +0 -10
  203. package/dist/setting/system/SystemSettingForm.d.ts.map +0 -1
  204. package/dist/setting/system/SystemSettingForm.js +0 -95
  205. package/dist/setting/system/index.d.ts +0 -2
  206. package/dist/setting/system/index.d.ts.map +0 -1
  207. package/dist/types/currency.d.ts +0 -5
  208. package/dist/types/currency.d.ts.map +0 -1
  209. package/src/header/BookeditHeader.tsx +0 -38
  210. package/src/header/Header.stories.tsx +0 -123
  211. package/src/header/Header.tsx +0 -69
  212. package/src/header/LicklistHeader.tsx +0 -46
  213. package/src/header/elements/CompanySelector.tsx +0 -47
  214. package/src/header/elements/Elements.stories.tsx +0 -33
  215. package/src/header/elements/index.ts +0 -3
  216. package/src/header/index.ts +0 -7
  217. package/src/setting/admin/AdminSetting.stories.tsx +0 -52
  218. package/src/setting/admin/AdminSettingForm.tsx +0 -196
  219. package/src/setting/admin/PaymentFeeForm.tsx +0 -304
  220. package/src/setting/admin/index.ts +0 -1
  221. package/src/setting/system/SystemSetting.stories.tsx +0 -26
  222. package/src/setting/system/SystemSettingForm.tsx +0 -62
  223. package/src/setting/system/index.ts +0 -1
  224. package/src/types/currency.ts +0 -4
@@ -1,424 +0,0 @@
1
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { useId } from '@react-aria/utils';
3
- import Card from 'react-bootstrap/Card';
4
- import Col from 'react-bootstrap/Col';
5
- import Form from 'react-bootstrap/Form';
6
- import InputGroup from 'react-bootstrap/InputGroup';
7
- import Row from 'react-bootstrap/Row';
8
- import { useFormContext } from 'react-hook-form';
9
- import { useTranslation } from 'react-i18next';
10
- import { FaPercentage, FaPoundSign } from 'react-icons/fa';
11
- import '../../static/index.js';
12
- import WarningMessage from '../../static/WarningMessage.js';
13
-
14
- function _define_property(obj, key, value) {
15
- if (key in obj) {
16
- Object.defineProperty(obj, key, {
17
- value: value,
18
- enumerable: true,
19
- configurable: true,
20
- writable: true
21
- });
22
- } else {
23
- obj[key] = value;
24
- }
25
- return obj;
26
- }
27
- function _object_spread(target) {
28
- for(var i = 1; i < arguments.length; i++){
29
- var source = arguments[i] != null ? arguments[i] : {};
30
- var ownKeys = Object.keys(source);
31
- if (typeof Object.getOwnPropertySymbols === "function") {
32
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
33
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
34
- }));
35
- }
36
- ownKeys.forEach(function(key) {
37
- _define_property(target, key, source[key]);
38
- });
39
- }
40
- return target;
41
- }
42
- function ownKeys(object, enumerableOnly) {
43
- var keys = Object.keys(object);
44
- if (Object.getOwnPropertySymbols) {
45
- var symbols = Object.getOwnPropertySymbols(object);
46
- if (enumerableOnly) {
47
- symbols = symbols.filter(function(sym) {
48
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
49
- });
50
- }
51
- keys.push.apply(keys, symbols);
52
- }
53
- return keys;
54
- }
55
- function _object_spread_props(target, source) {
56
- source = source != null ? source : {};
57
- if (Object.getOwnPropertyDescriptors) {
58
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
59
- } else {
60
- ownKeys(Object(source)).forEach(function(key) {
61
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
62
- });
63
- }
64
- return target;
65
- }
66
- function PaymentFeeForm(param) {
67
- var _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading;
68
- var _errors_feeInPercent, _errors_feeInPercent1, _errors_feeInPercent2, _errors_minFeeInPounds, _errors_minFeeInPounds1, _errors_minFeeInPounds2, _errors_maxFeeInPounds, _errors_maxFeeInPounds1, _errors_maxFeeInPounds2, _errors_vatInPercent, _errors_vatInPercent1, _errors_vatInPercent2, _errors_fixedFee, _errors_fixedFee1, _errors_fixedFee2;
69
- var _useFormContext = useFormContext(), register = _useFormContext.register, errors = _useFormContext.formState.errors, watch = _useFormContext.watch;
70
- var t = useTranslation('Design').t;
71
- var feeInPercentId = useId();
72
- var minFeeInPoundsId = useId();
73
- var maxFeeInPoundsId = useId();
74
- var vatInPercentId = useId();
75
- var fixedFeeId = useId();
76
- var minFee = watch('minFeeInPounds');
77
- var maxFee = watch('maxFeeInPounds');
78
- var percentFee = watch('feeInPercent');
79
- return /*#__PURE__*/ jsxs(Fragment, {
80
- children: [
81
- /*#__PURE__*/ jsx(Row, {
82
- children: /*#__PURE__*/ jsx(Col, {
83
- xs: 12,
84
- children: /*#__PURE__*/ jsx("h5", {
85
- className: "mt-5",
86
- children: t('paymentFee')
87
- })
88
- })
89
- }),
90
- /*#__PURE__*/ jsx(Card, {
91
- className: "mb-3",
92
- children: /*#__PURE__*/ jsxs(Card.Body, {
93
- children: [
94
- /*#__PURE__*/ jsx(Row, {
95
- children: /*#__PURE__*/ jsx(Col, {
96
- xs: 12,
97
- children: /*#__PURE__*/ jsx("div", {
98
- className: "mb-4",
99
- children: t('paymentFeeDescription')
100
- })
101
- })
102
- }),
103
- /*#__PURE__*/ jsxs(Row, {
104
- children: [
105
- /*#__PURE__*/ jsxs(Col, {
106
- xs: 12,
107
- sm: 4,
108
- lg: 2,
109
- children: [
110
- /*#__PURE__*/ jsxs(Form.Group, {
111
- controlId: feeInPercentId,
112
- children: [
113
- /*#__PURE__*/ jsx(Form.Label, {
114
- children: t('feeInPercent')
115
- }),
116
- /*#__PURE__*/ jsxs(InputGroup, {
117
- hasValidation: true,
118
- children: [
119
- /*#__PURE__*/ jsx(InputGroup.Prepend, {
120
- children: /*#__PURE__*/ jsx(InputGroup.Text, {
121
- children: /*#__PURE__*/ jsx(FaPercentage, {
122
- size: 10
123
- })
124
- })
125
- }),
126
- /*#__PURE__*/ jsx(Form.Control, _object_spread_props(_object_spread({
127
- type: "number",
128
- min: 0,
129
- max: 100,
130
- step: "1",
131
- placeholder: "0"
132
- }, register('feeInPercent', {
133
- validate: {
134
- moreThan: function(v) {
135
- return v ? v >= 0 : true;
136
- },
137
- lessThan: function(v) {
138
- return v ? v <= 100 : true;
139
- }
140
- }
141
- })), {
142
- name: "feeInPercent",
143
- isInvalid: Boolean(errors.feeInPercent),
144
- disabled: isLoading
145
- })),
146
- /*#__PURE__*/ jsxs(Form.Control.Feedback, {
147
- type: "invalid",
148
- children: [
149
- (_errors_feeInPercent = errors.feeInPercent) === null || _errors_feeInPercent === void 0 ? void 0 : _errors_feeInPercent.message,
150
- ((_errors_feeInPercent1 = errors.feeInPercent) === null || _errors_feeInPercent1 === void 0 ? void 0 : _errors_feeInPercent1.type) === 'moreThan' && t('Validation:fieldMinNumber', {
151
- attribute: t('feeInPercent'),
152
- min: 0
153
- }),
154
- ((_errors_feeInPercent2 = errors.feeInPercent) === null || _errors_feeInPercent2 === void 0 ? void 0 : _errors_feeInPercent2.type) === 'lessThan' && t('Validation:fieldMaxNumber', {
155
- attribute: t('feeInPercent'),
156
- max: 100
157
- })
158
- ]
159
- })
160
- ]
161
- })
162
- ]
163
- }),
164
- percentFee && minFee && maxFee ? /*#__PURE__*/ jsx(WarningMessage, {
165
- message: t('Validation:fieldPercentFee')
166
- }) : null
167
- ]
168
- }),
169
- /*#__PURE__*/ jsx(Col, {
170
- xs: 12,
171
- sm: 4,
172
- lg: 2,
173
- children: /*#__PURE__*/ jsxs(Form.Group, {
174
- controlId: minFeeInPoundsId,
175
- children: [
176
- /*#__PURE__*/ jsx(Form.Label, {
177
- children: t('minFeeInPounds')
178
- }),
179
- /*#__PURE__*/ jsxs(InputGroup, {
180
- hasValidation: true,
181
- children: [
182
- /*#__PURE__*/ jsx(InputGroup.Prepend, {
183
- children: /*#__PURE__*/ jsx(InputGroup.Text, {
184
- children: /*#__PURE__*/ jsx(FaPoundSign, {
185
- size: 10
186
- })
187
- })
188
- }),
189
- /*#__PURE__*/ jsx(Form.Control, _object_spread_props(_object_spread({}, register('minFeeInPounds', {
190
- validate: {
191
- moreThan: function(v) {
192
- return v ? v >= 0 : true;
193
- },
194
- lessThan: function(v) {
195
- return v ? v <= 999999.99 : true;
196
- }
197
- }
198
- })), {
199
- name: "minFeeInPounds",
200
- type: "number",
201
- min: 0,
202
- max: 999999.99,
203
- step: "0.01",
204
- placeholder: "0,00",
205
- isInvalid: Boolean(errors.minFeeInPounds),
206
- disabled: isLoading
207
- })),
208
- /*#__PURE__*/ jsxs(Form.Control.Feedback, {
209
- type: "invalid",
210
- children: [
211
- (_errors_minFeeInPounds = errors.minFeeInPounds) === null || _errors_minFeeInPounds === void 0 ? void 0 : _errors_minFeeInPounds.message,
212
- ((_errors_minFeeInPounds1 = errors.minFeeInPounds) === null || _errors_minFeeInPounds1 === void 0 ? void 0 : _errors_minFeeInPounds1.type) === 'moreThan' && t('Validation:fieldMinNumber', {
213
- attribute: t('minFeeInPounds'),
214
- min: 0
215
- }),
216
- ((_errors_minFeeInPounds2 = errors.minFeeInPounds) === null || _errors_minFeeInPounds2 === void 0 ? void 0 : _errors_minFeeInPounds2.type) === 'lessThan' && t('Validation:fieldMaxNumber', {
217
- attribute: t('minFeeInPounds'),
218
- max: 999999.99
219
- })
220
- ]
221
- })
222
- ]
223
- })
224
- ]
225
- })
226
- }),
227
- /*#__PURE__*/ jsxs(Col, {
228
- xs: 12,
229
- sm: 4,
230
- lg: 3,
231
- children: [
232
- /*#__PURE__*/ jsxs(Form.Group, {
233
- controlId: maxFeeInPoundsId,
234
- children: [
235
- /*#__PURE__*/ jsx(Form.Label, {
236
- children: t('maxFeeInPounds')
237
- }),
238
- /*#__PURE__*/ jsxs(InputGroup, {
239
- hasValidation: true,
240
- children: [
241
- /*#__PURE__*/ jsx(InputGroup.Prepend, {
242
- children: /*#__PURE__*/ jsx(InputGroup.Text, {
243
- children: /*#__PURE__*/ jsx(FaPoundSign, {
244
- size: 10
245
- })
246
- })
247
- }),
248
- /*#__PURE__*/ jsx(Form.Control, _object_spread_props(_object_spread({}, register('maxFeeInPounds', {
249
- validate: {
250
- moreThan: function(v) {
251
- return v ? v >= 0 : true;
252
- },
253
- lessThan: function(v) {
254
- return v ? v <= 999999.99 : true;
255
- }
256
- }
257
- })), {
258
- name: "maxFeeInPounds",
259
- type: "number",
260
- min: 0,
261
- max: 999999.99,
262
- step: "0.01",
263
- placeholder: "0,00",
264
- isInvalid: Boolean(errors.maxFeeInPounds),
265
- disabled: isLoading
266
- })),
267
- /*#__PURE__*/ jsxs(Form.Control.Feedback, {
268
- type: "invalid",
269
- children: [
270
- (_errors_maxFeeInPounds = errors.maxFeeInPounds) === null || _errors_maxFeeInPounds === void 0 ? void 0 : _errors_maxFeeInPounds.message,
271
- ((_errors_maxFeeInPounds1 = errors.maxFeeInPounds) === null || _errors_maxFeeInPounds1 === void 0 ? void 0 : _errors_maxFeeInPounds1.type) === 'moreThan' && t('Validation:fieldMinNumber', {
272
- attribute: t('maxFeeInPounds'),
273
- min: 0
274
- }),
275
- ((_errors_maxFeeInPounds2 = errors.maxFeeInPounds) === null || _errors_maxFeeInPounds2 === void 0 ? void 0 : _errors_maxFeeInPounds2.type) === 'lessThan' && t('Validation:fieldMaxNumber', {
276
- attribute: t('maxFeeInPounds'),
277
- max: 999999.99
278
- })
279
- ]
280
- })
281
- ]
282
- })
283
- ]
284
- }),
285
- minFee > maxFee ? /*#__PURE__*/ jsx(WarningMessage, {
286
- message: t('Validation:fieldMaxNumber', {
287
- attribute: t('Min Fee'),
288
- max: 'Max Fee'
289
- })
290
- }) : null
291
- ]
292
- }),
293
- /*#__PURE__*/ jsx(Col, {
294
- xs: 12,
295
- sm: {
296
- span: 4,
297
- offset: 2
298
- },
299
- lg: {
300
- span: 2,
301
- offset: 0
302
- },
303
- children: /*#__PURE__*/ jsxs(Form.Group, {
304
- controlId: vatInPercentId,
305
- children: [
306
- /*#__PURE__*/ jsx(Form.Label, {
307
- children: t('vatInPercent')
308
- }),
309
- /*#__PURE__*/ jsxs(InputGroup, {
310
- hasValidation: true,
311
- children: [
312
- /*#__PURE__*/ jsx(InputGroup.Prepend, {
313
- children: /*#__PURE__*/ jsx(InputGroup.Text, {
314
- children: /*#__PURE__*/ jsx(FaPercentage, {
315
- size: 10
316
- })
317
- })
318
- }),
319
- /*#__PURE__*/ jsx(Form.Control, _object_spread_props(_object_spread({}, register('vatInPercent', {
320
- validate: {
321
- moreThan: function(v) {
322
- return v ? v >= 0 : true;
323
- },
324
- lessThan: function(v) {
325
- return v ? v <= 100 : true;
326
- }
327
- }
328
- })), {
329
- name: "vatInPercent",
330
- type: "number",
331
- min: 0,
332
- max: 100,
333
- step: "1",
334
- placeholder: "0",
335
- isInvalid: Boolean(errors.vatInPercent),
336
- disabled: isLoading
337
- })),
338
- /*#__PURE__*/ jsxs(Form.Control.Feedback, {
339
- type: "invalid",
340
- children: [
341
- (_errors_vatInPercent = errors.vatInPercent) === null || _errors_vatInPercent === void 0 ? void 0 : _errors_vatInPercent.message,
342
- ((_errors_vatInPercent1 = errors.vatInPercent) === null || _errors_vatInPercent1 === void 0 ? void 0 : _errors_vatInPercent1.type) === 'moreThan' && t('Validation:fieldMinNumber', {
343
- attribute: t('vatInPercent'),
344
- min: 0
345
- }),
346
- ((_errors_vatInPercent2 = errors.vatInPercent) === null || _errors_vatInPercent2 === void 0 ? void 0 : _errors_vatInPercent2.type) === 'lessThan' && t('Validation:fieldMaxNumber', {
347
- attribute: t('vatInPercent'),
348
- max: 100
349
- })
350
- ]
351
- })
352
- ]
353
- })
354
- ]
355
- })
356
- }),
357
- /*#__PURE__*/ jsx(Col, {
358
- xs: 12,
359
- sm: 4,
360
- lg: 3,
361
- children: /*#__PURE__*/ jsxs(Form.Group, {
362
- controlId: fixedFeeId,
363
- children: [
364
- /*#__PURE__*/ jsx(Form.Label, {
365
- children: t('fixedFee')
366
- }),
367
- /*#__PURE__*/ jsxs(InputGroup, {
368
- hasValidation: true,
369
- children: [
370
- /*#__PURE__*/ jsx(InputGroup.Prepend, {
371
- children: /*#__PURE__*/ jsx(InputGroup.Text, {
372
- children: /*#__PURE__*/ jsx(FaPoundSign, {
373
- size: 10
374
- })
375
- })
376
- }),
377
- /*#__PURE__*/ jsx(Form.Control, _object_spread_props(_object_spread({}, register('fixedFee', {
378
- validate: {
379
- moreThan: function(v) {
380
- return v ? v >= 0 : true;
381
- },
382
- lessThan: function(v) {
383
- return v ? v <= 999999.99 : true;
384
- }
385
- }
386
- })), {
387
- name: "fixedFee",
388
- type: "number",
389
- min: 0,
390
- max: 999999.99,
391
- step: "0.01",
392
- placeholder: "0,00",
393
- isInvalid: Boolean(errors.fixedFee),
394
- disabled: isLoading
395
- })),
396
- /*#__PURE__*/ jsxs(Form.Control.Feedback, {
397
- type: "invalid",
398
- children: [
399
- (_errors_fixedFee = errors.fixedFee) === null || _errors_fixedFee === void 0 ? void 0 : _errors_fixedFee.message,
400
- ((_errors_fixedFee1 = errors.fixedFee) === null || _errors_fixedFee1 === void 0 ? void 0 : _errors_fixedFee1.type) === 'moreThan' && t('Validation:fieldMinNumber', {
401
- attribute: t('fixedFee'),
402
- min: 0
403
- }),
404
- ((_errors_fixedFee2 = errors.fixedFee) === null || _errors_fixedFee2 === void 0 ? void 0 : _errors_fixedFee2.type) === 'lessThan' && t('Validation:fieldMaxNumber', {
405
- attribute: t('fixedFee'),
406
- max: 999999.99
407
- })
408
- ]
409
- })
410
- ]
411
- })
412
- ]
413
- })
414
- })
415
- ]
416
- })
417
- ]
418
- })
419
- })
420
- ]
421
- });
422
- }
423
-
424
- export { PaymentFeeForm };
@@ -1,2 +0,0 @@
1
- export * from './AdminSettingForm';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/setting/admin/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,10 +0,0 @@
1
- import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permission';
2
- import { PaymentFeeFormFieldValues } from '../admin/PaymentFeeForm';
3
- export type SystemSettingFormFieldValues = PaymentFeeFormFieldValues;
4
- export interface SystemSettingFormProps extends HasPermissionProp {
5
- isLoading: boolean;
6
- onSubmit?: (data: SystemSettingFormFieldValues) => void;
7
- defaultValues?: Partial<SystemSettingFormFieldValues>;
8
- }
9
- export declare function SystemSettingForm(props: SystemSettingFormProps): import("react/jsx-runtime").JSX.Element;
10
- //# sourceMappingURL=SystemSettingForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SystemSettingForm.d.ts","sourceRoot":"","sources":["../../../src/setting/system/SystemSettingForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAEL,yBAAyB,EAC1B,MAAM,yBAAyB,CAAA;AAEhC,MAAM,MAAM,4BAA4B,GAAG,yBAAyB,CAAA;AAEpE,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,4BAA4B,KAAK,IAAI,CAAA;IACvD,aAAa,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAA;CACtD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CA2C9D"}
@@ -1,95 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Button, Spinner } from 'react-bootstrap';
3
- import Form from 'react-bootstrap/Form';
4
- import { useForm, FormProvider } from 'react-hook-form';
5
- import { useTranslation } from 'react-i18next';
6
- import { PaymentFeeForm } from '../admin/PaymentFeeForm.js';
7
-
8
- function _define_property(obj, key, value) {
9
- if (key in obj) {
10
- Object.defineProperty(obj, key, {
11
- value: value,
12
- enumerable: true,
13
- configurable: true,
14
- writable: true
15
- });
16
- } else {
17
- obj[key] = value;
18
- }
19
- return obj;
20
- }
21
- function _object_spread(target) {
22
- for(var i = 1; i < arguments.length; i++){
23
- var source = arguments[i] != null ? arguments[i] : {};
24
- var ownKeys = Object.keys(source);
25
- if (typeof Object.getOwnPropertySymbols === "function") {
26
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
27
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
28
- }));
29
- }
30
- ownKeys.forEach(function(key) {
31
- _define_property(target, key, source[key]);
32
- });
33
- }
34
- return target;
35
- }
36
- function ownKeys(object, enumerableOnly) {
37
- var keys = Object.keys(object);
38
- if (Object.getOwnPropertySymbols) {
39
- var symbols = Object.getOwnPropertySymbols(object);
40
- if (enumerableOnly) {
41
- symbols = symbols.filter(function(sym) {
42
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
43
- });
44
- }
45
- keys.push.apply(keys, symbols);
46
- }
47
- return keys;
48
- }
49
- function _object_spread_props(target, source) {
50
- source = source != null ? source : {};
51
- if (Object.getOwnPropertyDescriptors) {
52
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
53
- } else {
54
- ownKeys(Object(source)).forEach(function(key) {
55
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
56
- });
57
- }
58
- return target;
59
- }
60
- function SystemSettingForm(props) {
61
- var _props_isLoading = props.isLoading, isLoading = _props_isLoading === void 0 ? false : _props_isLoading, _props_defaultValues = props.defaultValues, defaultValues = _props_defaultValues === void 0 ? {} : _props_defaultValues, onSubmit = props.onSubmit, _props_hasPermission = props.hasPermission, hasPermission = _props_hasPermission === void 0 ? true : _props_hasPermission;
62
- var form = useForm({
63
- mode: 'onChange',
64
- defaultValues: defaultValues
65
- });
66
- var handleSubmit = form.handleSubmit;
67
- var t = useTranslation('Design').t;
68
- return /*#__PURE__*/ jsxs(Form, {
69
- className: "d-flex flex-column",
70
- noValidate: true,
71
- onSubmit: handleSubmit(onSubmit),
72
- children: [
73
- /*#__PURE__*/ jsx(FormProvider, _object_spread_props(_object_spread({}, form), {
74
- children: /*#__PURE__*/ jsx(PaymentFeeForm, _object_spread({}, props))
75
- })),
76
- hasPermission && /*#__PURE__*/ jsxs(Button, {
77
- type: "submit",
78
- disabled: isLoading,
79
- className: "d-flex align-items-center align-self-end mt-5",
80
- children: [
81
- isLoading && /*#__PURE__*/ jsx(Spinner, {
82
- animation: "border",
83
- size: "sm",
84
- role: "status",
85
- "aria-hidden": "true",
86
- className: "mr-2"
87
- }),
88
- t('update')
89
- ]
90
- })
91
- ]
92
- });
93
- }
94
-
95
- export { SystemSettingForm };
@@ -1,2 +0,0 @@
1
- export * from './SystemSettingForm';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/setting/system/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
@@ -1,5 +0,0 @@
1
- export type Currency = {
2
- id: number;
3
- title: string;
4
- };
5
- //# sourceMappingURL=currency.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../src/types/currency.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
@@ -1,38 +0,0 @@
1
- import { ReactNode } from 'react'
2
- import { ReactComponent as LogoSvg } from '../assets/logo/bookedit.svg'
3
- import Logo from '../logo/Logo'
4
- import Header from './Header'
5
-
6
- interface NavigationItem {
7
- href: string
8
- label: string
9
- }
10
- interface Props {
11
- children?: ReactNode | ReactNode[]
12
- href?: string
13
- leftNavs?: ReactNode | ReactNode[]
14
- navItems?: NavigationItem[]
15
- renderMobileNavigation?: (navigationItems: NavigationItem[]) => ReactNode
16
- }
17
-
18
- function BookeditHeader({
19
- children,
20
- href,
21
- leftNavs,
22
- navItems,
23
- renderMobileNavigation,
24
- }: Props) {
25
- return (
26
- <Header
27
- logo={<Logo logo={<LogoSvg />} className='mt-auto mr-0 mr-sm-3' />}
28
- href={href}
29
- leftNavs={leftNavs}
30
- navItems={navItems}
31
- renderMobileNavigation={renderMobileNavigation}
32
- >
33
- {children}
34
- </Header>
35
- )
36
- }
37
-
38
- export default BookeditHeader