@licklist/design 0.66.1-dev.2 → 0.66.1

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 (99) hide show
  1. package/dist/date-time-button/DateTimeButton.js +1 -1
  2. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
  3. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +1 -1
  4. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
  5. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
  6. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  7. package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -1
  8. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  9. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  10. package/dist/product-set/control/DateInput.js +1 -1
  11. package/dist/product-set/control/ProductSetControl.d.ts +2 -3
  12. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  13. package/dist/product-set/control/ProductSetControl.js +1 -1
  14. package/dist/product-set/form/ProductCategoriesControl.d.ts +1 -3
  15. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  16. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  17. package/dist/product-set/form/ProductSetForm.d.ts +2 -6
  18. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  19. package/dist/product-set/form/ProductSetForm.js +1 -1
  20. package/dist/product-set/form/ProductsControl.d.ts +1 -3
  21. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  22. package/dist/product-set/form/ProductsControl.js +1 -1
  23. package/dist/product-set/form/StepsControl.d.ts +1 -3
  24. package/dist/product-set/form/StepsControl.d.ts.map +1 -1
  25. package/dist/product-set/form/StepsControl.js +1 -1
  26. package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
  27. package/dist/product-set/hooks/useSortableTreeFunctions.js +1 -1
  28. package/dist/product-set/product/ProductControl.d.ts +0 -1
  29. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  30. package/dist/product-set/product/ProductControl.js +1 -1
  31. package/dist/product-set/step/StepControl.d.ts +1 -2
  32. package/dist/product-set/step/StepControl.d.ts.map +1 -1
  33. package/dist/product-set/step/StepControl.js +1 -1
  34. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  35. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
  36. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  37. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  38. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -3
  39. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  40. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  41. package/dist/recurring-date-picker-input/utils.d.ts +0 -5
  42. package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
  43. package/dist/recurring-date-picker-input/utils.js +1 -1
  44. package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts +1 -1
  45. package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts.map +1 -1
  46. package/dist/report/ReportRunnerModal/ReportRunnerModal.js +1 -1
  47. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  48. package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
  49. package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
  50. package/dist/sortable-tree/SortableTreeItem.d.ts +2 -1
  51. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  52. package/dist/sortable-tree/SortableTreeItem.js +1 -1
  53. package/dist/styles/iframe-page/Page.scss +10 -1
  54. package/dist/styles/sales/BookingResults.scss +1 -1
  55. package/dist/styles/zones/ZoneForm.scss +1 -2
  56. package/dist/zone/form/ZoneForm.d.ts +2 -2
  57. package/dist/zone/form/ZoneForm.d.ts.map +1 -1
  58. package/dist/zone/form/ZoneForm.js +1 -1
  59. package/dist/zone/form/components/ZoneControl.d.ts +2 -2
  60. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  61. package/dist/zone/form/components/ZoneControl.js +1 -1
  62. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +4 -4
  63. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  64. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  65. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  66. package/package.json +6 -5
  67. package/src/date-time-button/DateTimeButton.stories.tsx +1 -2
  68. package/src/date-time-button/DateTimeButton.tsx +5 -7
  69. package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +9 -14
  70. package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +0 -2
  71. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
  72. package/src/product-set/control/DateAndRecurrenceInput.tsx +4 -3
  73. package/src/product-set/control/DateInput.tsx +2 -2
  74. package/src/product-set/control/ProductSetControl.tsx +5 -17
  75. package/src/product-set/form/ProductCategoriesControl.tsx +4 -16
  76. package/src/product-set/form/ProductSetForm.tsx +2 -13
  77. package/src/product-set/form/ProductsControl.tsx +77 -93
  78. package/src/product-set/form/StepsControl.tsx +7 -15
  79. package/src/product-set/hooks/useSortableTreeFunctions.ts +1 -0
  80. package/src/product-set/product/ProductControl.tsx +5 -8
  81. package/src/product-set/step/StepControl.tsx +3 -4
  82. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
  83. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +21 -50
  84. package/src/recurring-date-picker-input/RecurringDatePickerInput.stories.tsx +7 -13
  85. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +1 -12
  86. package/src/recurring-date-picker-input/utils.ts +1 -90
  87. package/src/report/ReportRunnerModal/ReportRunnerModal.tsx +14 -24
  88. package/src/sales/booking/results/components/ResultCard.tsx +3 -0
  89. package/src/setting/admin/AdminSettingForm.tsx +2 -2
  90. package/src/sortable-tree/SortableTreeItem.tsx +3 -0
  91. package/src/static/switch/BooleanSwitch.tsx +1 -1
  92. package/src/styles/iframe-page/Page.scss +10 -1
  93. package/src/styles/sales/BookingResults.scss +1 -1
  94. package/src/styles/zones/ZoneForm.scss +1 -2
  95. package/src/zone/form/ZoneForm.tsx +2 -3
  96. package/src/zone/form/components/ZoneControl.tsx +3 -3
  97. package/src/zone/form/components/ZoneRecurrencesControl.tsx +5 -7
  98. package/src/zone/form/utils/dates.ts +10 -9
  99. package/src/report/ReportRunnerModal/ReportRunnerModal.stories.tsx +0 -307
@@ -43,6 +43,8 @@
43
43
  }
44
44
 
45
45
  .page-body {
46
+ min-height: unset;
47
+
46
48
  .left-block {
47
49
  min-height: fit-content;
48
50
 
@@ -76,10 +78,17 @@
76
78
  }
77
79
 
78
80
  &.iframe {
81
+ height: unset;
82
+
79
83
  .page-body {
84
+ height: unset;
85
+ max-height: unset;
86
+
80
87
  .left-block {
81
88
  .left-block-container {
82
- overflow: auto;
89
+ height: unset;
90
+ max-height: unset;
91
+ overflow: unset;
83
92
  }
84
93
  }
85
94
  }
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 14rem;
8
+ height: 14.25rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
@@ -1,5 +1,4 @@
1
1
  .zone-available-times {
2
- overscroll-behavior: contain;
3
2
  display: flex;
4
3
  flex-wrap: wrap;
5
4
  gap: 1.5rem;
@@ -8,4 +7,4 @@
8
7
  justify-content: start;
9
8
  width: 95%;
10
9
  overflow: scroll;
11
- }
10
+ }
@@ -13,7 +13,7 @@ export type ZoneFormProps = {
13
13
  onSubmit: (values: Partial<Zone>) => void;
14
14
  serverErrors?: ServerError;
15
15
  isLoading?: boolean;
16
- workHours: WorkHour[] | undefined;
16
+ workHours?: WorkHour[];
17
17
  };
18
18
 
19
19
  export type ZoneFormValues = Partial<Zone> & {
@@ -25,7 +25,6 @@ export const ZoneForm = ({
25
25
  onSubmit,
26
26
  serverErrors,
27
27
  isLoading = false,
28
- workHours,
29
28
  }: ZoneFormProps) => {
30
29
  const { t } = useTranslation("Design");
31
30
  const form = useForm<ZoneFormValues>({
@@ -55,7 +54,7 @@ export const ZoneForm = ({
55
54
  return (
56
55
  <FormProvider {...form}>
57
56
  <Form onSubmit={handleSubmit(onFormSubmit)}>
58
- <ZoneControl isLoading={isLoading} workHours={workHours} />
57
+ <ZoneControl isLoading={isLoading} />
59
58
  <Row>
60
59
  <Col md={6} sm={12} />
61
60
  <Col
@@ -11,15 +11,15 @@ import { GameDurationControl } from "./GameDurationControl";
11
11
 
12
12
  export type ZoneControlProps = {
13
13
  isLoading: boolean;
14
- workHours: WorkHour[] | undefined;
14
+ workHours?: WorkHour[];
15
15
  };
16
16
 
17
- export const ZoneControl = ({ isLoading, workHours }: ZoneControlProps) => {
17
+ export const ZoneControl = ({ isLoading }: ZoneControlProps) => {
18
18
  return (
19
19
  <Row>
20
20
  <Col md={6} sm={12} className="pr-5">
21
21
  <NameControl isLoading={isLoading} />
22
- <ZoneRecurrencesControl workHours={workHours} />
22
+ <ZoneRecurrencesControl />
23
23
  <hr />
24
24
  <Row>
25
25
  <Col md={6} sm={6}>
@@ -25,13 +25,12 @@ export interface DateAndRecurrenceInputValues {
25
25
  zoneRecurrences?: Partial<ZoneRecurrence>[];
26
26
  }
27
27
 
28
- type ZoneRecurrenceControlProps = {
29
- workHours: WorkHour[] | undefined;
28
+ export type ZoneRecurrenceControlProps = {
29
+ workHours?: WorkHour[];
30
+ isLoading?: boolean;
30
31
  };
31
32
 
32
- export const ZoneRecurrencesControl = ({
33
- workHours,
34
- }: ZoneRecurrenceControlProps) => {
33
+ export const ZoneRecurrencesControl = () => {
35
34
  const {
36
35
  control,
37
36
  register,
@@ -70,7 +69,7 @@ export const ZoneRecurrencesControl = ({
70
69
  clearEditState();
71
70
  });
72
71
 
73
- const popoverId = useId();
72
+ const popoverId = useId()!;
74
73
 
75
74
  const { t } = useTranslation(["Design", "Validation"]);
76
75
 
@@ -167,7 +166,6 @@ export const ZoneRecurrencesControl = ({
167
166
  onChange={handleRecurringDateChange}
168
167
  onDelete={handleDelete}
169
168
  setInitialStartDateAfterSelect
170
- workHours={workHours}
171
169
  />
172
170
  </Popover.Content>
173
171
  </Popover>
@@ -53,17 +53,18 @@ export const getCheckboxesByWorkHours = (workHours?: WorkHour[]) => {
53
53
  if (!workHours || !workHours.length)
54
54
  return getTimeCheckboxRanges(DEFAULT_START_DAY_TIME, DEFAULT_END_DAY_TIME);
55
55
 
56
- const providerWorkHoursByWeek = workHours.reduce<
57
- { start: string; end: string }[]
58
- >((workHoursNextArray, currentWorkHour) => {
59
- const { start, end } = currentWorkHour;
56
+ const providerWorkHoursByWeek = workHours.reduce(
57
+ (workHoursNextArray: { start: string; end: string }[], currentWorkHour) => {
58
+ const { start, end } = currentWorkHour;
60
59
 
61
- if (start && end) {
62
- return [...workHoursNextArray, { start, end }];
63
- }
60
+ if (start && end) {
61
+ return [...workHoursNextArray, { start, end }];
62
+ }
64
63
 
65
- return workHoursNextArray;
66
- }, []);
64
+ return workHoursNextArray;
65
+ },
66
+ []
67
+ );
67
68
 
68
69
  // If venue has filled only 1 work day from wee
69
70
  // For another days we use default 00:00 and 23:59
@@ -1,307 +0,0 @@
1
- import { Meta, Story } from "@storybook/react";
2
- import React from "react";
3
- import { Card } from "react-bootstrap";
4
- import { ReportRunnerModal, ReportRunnerModalProps } from "./ReportRunnerModal";
5
-
6
- export default {
7
- title: "Report/ReportRunnerModal",
8
- component: ReportRunnerModal,
9
- } as Meta;
10
-
11
- export const Default: Story<ReportRunnerModalProps> = (args) => (
12
- <Card style={{ maxWidth: "max-content" }}>
13
- <Card.Body>
14
- <ReportRunnerModal {...args} />
15
- </Card.Body>
16
- </Card>
17
- );
18
-
19
- Default.args = {
20
- reportId: 47,
21
- show: true,
22
- generate: { isLoading: false },
23
- download: { isLoading: false },
24
- useShowReportFields: (type) => ({ data: [], isLoading: false }),
25
- onHide: () => {},
26
- onEdit: () => {},
27
- reports: [
28
- {
29
- id: 47,
30
- providerId: null,
31
- type: "payments",
32
- name: "Test 1",
33
- createdAt: "2024-04-26 08:16:59",
34
- updatedAt: "2024-04-26 08:16:59",
35
- deletedAt: null,
36
- reportFieldValues: [
37
- {
38
- id: 580,
39
- reportId: 47,
40
- reportFieldId: 16,
41
- },
42
- {
43
- id: 581,
44
- reportId: 47,
45
- reportFieldId: 17,
46
- },
47
- {
48
- id: 582,
49
- reportId: 47,
50
- reportFieldId: 18,
51
- },
52
- {
53
- id: 583,
54
- reportId: 47,
55
- reportFieldId: 19,
56
- },
57
- {
58
- id: 584,
59
- reportId: 47,
60
- reportFieldId: 20,
61
- },
62
- {
63
- id: 585,
64
- reportId: 47,
65
- reportFieldId: 21,
66
- },
67
- {
68
- id: 586,
69
- reportId: 47,
70
- reportFieldId: 22,
71
- },
72
- {
73
- id: 587,
74
- reportId: 47,
75
- reportFieldId: 23,
76
- },
77
- {
78
- id: 588,
79
- reportId: 47,
80
- reportFieldId: 24,
81
- },
82
- {
83
- id: 589,
84
- reportId: 47,
85
- reportFieldId: 26,
86
- },
87
- {
88
- id: 590,
89
- reportId: 47,
90
- reportFieldId: 27,
91
- },
92
- {
93
- id: 591,
94
- reportId: 47,
95
- reportFieldId: 28,
96
- },
97
- {
98
- id: 592,
99
- reportId: 47,
100
- reportFieldId: 40,
101
- },
102
- {
103
- id: 593,
104
- reportId: 47,
105
- reportFieldId: 41,
106
- },
107
- {
108
- id: 594,
109
- reportId: 47,
110
- reportFieldId: 42,
111
- },
112
- ],
113
- },
114
- {
115
- id: 52,
116
- providerId: null,
117
- type: "bookings",
118
- name: "new report",
119
- createdAt: "2024-04-29 16:05:51",
120
- updatedAt: "2024-04-29 16:08:39",
121
- deletedAt: null,
122
- reportFieldValues: [
123
- {
124
- id: 635,
125
- reportId: 52,
126
- reportFieldId: 1,
127
- },
128
- {
129
- id: 636,
130
- reportId: 52,
131
- reportFieldId: 2,
132
- },
133
- {
134
- id: 637,
135
- reportId: 52,
136
- reportFieldId: 3,
137
- },
138
- {
139
- id: 638,
140
- reportId: 52,
141
- reportFieldId: 4,
142
- },
143
- {
144
- id: 639,
145
- reportId: 52,
146
- reportFieldId: 5,
147
- },
148
- {
149
- id: 640,
150
- reportId: 52,
151
- reportFieldId: 6,
152
- },
153
- {
154
- id: 641,
155
- reportId: 52,
156
- reportFieldId: 7,
157
- },
158
- {
159
- id: 642,
160
- reportId: 52,
161
- reportFieldId: 8,
162
- },
163
- {
164
- id: 643,
165
- reportId: 52,
166
- reportFieldId: 9,
167
- },
168
- {
169
- id: 644,
170
- reportId: 52,
171
- reportFieldId: 10,
172
- },
173
- {
174
- id: 645,
175
- reportId: 52,
176
- reportFieldId: 11,
177
- },
178
- {
179
- id: 646,
180
- reportId: 52,
181
- reportFieldId: 12,
182
- },
183
- {
184
- id: 647,
185
- reportId: 52,
186
- reportFieldId: 13,
187
- },
188
- {
189
- id: 648,
190
- reportId: 52,
191
- reportFieldId: 14,
192
- },
193
- {
194
- id: 649,
195
- reportId: 52,
196
- reportFieldId: 15,
197
- },
198
- {
199
- id: 650,
200
- reportId: 52,
201
- reportFieldId: 36,
202
- },
203
- {
204
- id: 651,
205
- reportId: 52,
206
- reportFieldId: 37,
207
- },
208
- {
209
- id: 652,
210
- reportId: 52,
211
- reportFieldId: 38,
212
- },
213
- {
214
- id: 653,
215
- reportId: 52,
216
- reportFieldId: 39,
217
- },
218
- {
219
- id: 654,
220
- reportId: 52,
221
- reportFieldId: 47,
222
- },
223
- {
224
- id: 655,
225
- reportId: 52,
226
- reportFieldId: 48,
227
- },
228
- ],
229
- },
230
- {
231
- id: 53,
232
- providerId: null,
233
- type: "tickets",
234
- name: "tickets",
235
- createdAt: "2024-04-29 16:12:36",
236
- updatedAt: "2024-04-29 16:12:36",
237
- deletedAt: null,
238
- reportFieldValues: [
239
- {
240
- id: 656,
241
- reportId: 53,
242
- reportFieldId: 29,
243
- },
244
- {
245
- id: 657,
246
- reportId: 53,
247
- reportFieldId: 30,
248
- },
249
- {
250
- id: 658,
251
- reportId: 53,
252
- reportFieldId: 31,
253
- },
254
- {
255
- id: 659,
256
- reportId: 53,
257
- reportFieldId: 32,
258
- },
259
- {
260
- id: 660,
261
- reportId: 53,
262
- reportFieldId: 33,
263
- },
264
- {
265
- id: 661,
266
- reportId: 53,
267
- reportFieldId: 34,
268
- },
269
- {
270
- id: 662,
271
- reportId: 53,
272
- reportFieldId: 35,
273
- },
274
- {
275
- id: 663,
276
- reportId: 53,
277
- reportFieldId: 43,
278
- },
279
- {
280
- id: 664,
281
- reportId: 53,
282
- reportFieldId: 44,
283
- },
284
- {
285
- id: 665,
286
- reportId: 53,
287
- reportFieldId: 45,
288
- },
289
- {
290
- id: 666,
291
- reportId: 53,
292
- reportFieldId: 46,
293
- },
294
- {
295
- id: 667,
296
- reportId: 53,
297
- reportFieldId: 51,
298
- },
299
- {
300
- id: 668,
301
- reportId: 53,
302
- reportFieldId: 52,
303
- },
304
- ],
305
- },
306
- ],
307
- };