@dcrackel/hematournamentui 1.0.707 → 1.0.708

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 (46) hide show
  1. package/AGENTS.md +118 -118
  2. package/dist/HemaTournamentUI-lib.es.js +4483 -4618
  3. package/dist/HemaTournamentUI-lib.umd.js +27 -27
  4. package/dist/hematournamentui-tailwind.css +185 -406
  5. package/package.json +10 -10
  6. package/src/index.js +2 -0
  7. package/src/mocks/getDEBouts-42Fencers.js +4 -4
  8. package/src/mocks/getDEBouts-TableOf128.js +37 -0
  9. package/src/mocks/getDEBouts-TableOf64.js +35 -0
  10. package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.stories.js +23 -0
  11. package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue +35 -0
  12. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.test.js +18 -0
  13. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +3 -2
  14. package/src/stories/Molecules/Modals/EditBoutModal/EditBoutModal.vue +1 -1
  15. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.stories.js +33 -0
  16. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.test.js +45 -0
  17. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.vue +103 -0
  18. package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +298 -278
  19. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.stories.js +60 -98
  20. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.test.js +103 -4
  21. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +256 -215
  22. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +69 -92
  23. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +80 -128
  24. package/src/stories/Organisms/Cards/WaitlistFencerCard/WaitlistFencerCard.vue +14 -4
  25. package/src/stories/Organisms/Containers/Tableau/Tableau.stories.js +2 -2
  26. package/src/stories/Organisms/Containers/Tableau/Tableau.test.js +131 -3
  27. package/src/stories/Organisms/Containers/Tableau/Tableau.vue +287 -89
  28. package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.test.js +29 -0
  29. package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.vue +46 -0
  30. package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.test.js +21 -0
  31. package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.vue +39 -0
  32. package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.js +145 -0
  33. package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.test.js +64 -0
  34. package/src/stories/Organisms/Containers/Tableau/plannedAssignments.js +57 -0
  35. package/src/stories/Organisms/Containers/Tableau/plannedAssignments.test.js +65 -0
  36. package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +31 -29
  37. package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +146 -18
  38. package/src/stories/Templates/EventManagement/Bracket/Bracket.test.js +52 -2
  39. package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +53 -17
  40. package/src/stories/Templates/EventManagement/Bracket/BracketPlannedSuggestions.js +39 -0
  41. package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.js +39 -0
  42. package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.test.js +79 -0
  43. package/src/stories/Organisms/Cards/TableauBoutCard/SpacingConfig.js +0 -111
  44. package/src/stories/Organisms/Containers/TableauLines/SpacingConfig.js +0 -162
  45. package/src/stories/Organisms/Containers/TableauLines/TableauLines.stories.js +0 -21
  46. package/src/stories/Organisms/Containers/TableauLines/TableauLines.vue +0 -78
@@ -3,6 +3,7 @@ import { describe, expect, it } from 'vitest';
3
3
  import DirectorModal from '../../../Molecules/Modals/DirectorModal/DirectorModal.vue';
4
4
  import EditBoutModal from '../../../Molecules/Modals/EditBoutModal/EditBoutModal.vue';
5
5
  import Tableau from '../../../Organisms/Containers/Tableau/Tableau.vue';
6
+ import BracketDirectorAssignmentPanel from '../../../Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.vue';
6
7
  import Bracket from './Bracket.vue';
7
8
 
8
9
  const createBout = (overrides = {}) => ({
@@ -17,13 +18,14 @@ const createBout = (overrides = {}) => ({
17
18
  ...overrides
18
19
  });
19
20
 
20
- const mountBracket = (bouts = [createBout()]) =>
21
+ const mountBracket = (bouts = [createBout()], optionalProps = {}) =>
21
22
  shallowMount(Bracket, {
22
23
  props: {
23
24
  bouts,
24
25
  eventRules: [],
25
26
  hostingClubColors: {},
26
- connectedToServer: true
27
+ connectedToServer: true,
28
+ ...optionalProps
27
29
  }
28
30
  });
29
31
 
@@ -91,6 +93,7 @@ describe('Bracket bout interaction', () => {
91
93
 
92
94
  expect(wrapper.vm.boutsData[0]).toMatchObject({ Status: 'Active', Score1: 6, Score2: 5 });
93
95
  expect(wrapper.emitted('update:bout')).toBeUndefined();
96
+ expect(wrapper.emitted('close:directing-bout')).toEqual([[bout]]);
94
97
  expect(wrapper.findComponent(DirectorModal).props('show')).toBe(false);
95
98
  });
96
99
 
@@ -113,4 +116,51 @@ describe('Bracket bout interaction', () => {
113
116
 
114
117
  expect(wrapper.findComponent({ name: 'AssignDirectorModal' }).exists()).toBe(false);
115
118
  });
119
+
120
+ it('renders optional planned suggestions without changing the directing contract', async () => {
121
+ const bout = createBout();
122
+ const plannedDirectingStations = [
123
+ {
124
+ RingId: 1,
125
+ RingName: 'Ring 1',
126
+ Color: '#2563eb',
127
+ Director: { PersonId: 1001, DisplayName: 'Alex Morgan' }
128
+ }
129
+ ];
130
+ const plannedBoutAssignments = [{ DEBoutId: bout.DEBoutId, RingId: 1 }];
131
+ const wrapper = mountBracket([bout], {
132
+ plannedDirectingStations,
133
+ plannedBoutAssignments,
134
+ viewerPersonId: 1001
135
+ });
136
+
137
+ expect(wrapper.findComponent(BracketDirectorAssignmentPanel).props('stations')).toEqual(plannedDirectingStations);
138
+ expect(wrapper.findComponent(Tableau).props()).toMatchObject({
139
+ plannedDirectingStations,
140
+ plannedBoutAssignments,
141
+ viewerPersonId: 1001
142
+ });
143
+
144
+ wrapper.findComponent(Tableau).vm.$emit('action:directingBout', bout);
145
+ await wrapper.vm.$nextTick();
146
+
147
+ expect(wrapper.emitted('update:directing-bout')).toEqual([[bout]]);
148
+ expect(wrapper.emitted('assign:director')).toBeUndefined();
149
+ });
150
+
151
+ it('emits add-planned-director intent from the assignment panel', async () => {
152
+ const wrapper = mountBracket([], { showPlannedDirectorAssignments: true });
153
+
154
+ wrapper.findComponent(BracketDirectorAssignmentPanel).vm.$emit('request:add-planned-director');
155
+ await wrapper.vm.$nextTick();
156
+
157
+ expect(wrapper.emitted('request:add-planned-director')).toEqual([[]]);
158
+ });
159
+
160
+ it('does not render planned directing controls when optional behavior is disabled', () => {
161
+ const wrapper = mountBracket();
162
+
163
+ expect(wrapper.findComponent(BracketDirectorAssignmentPanel).exists()).toBe(false);
164
+ expect(wrapper.findComponent(Tableau).props('plannedDirectingStations')).toEqual([]);
165
+ });
116
166
  });
@@ -7,23 +7,34 @@
7
7
  firstButtonLabel="List View"
8
8
  secondButtonLabel="Tableau"
9
9
  :showConnected="true"
10
- :showToggle="true"
11
- :largeCards="largeCards"
12
10
  :connectedToServer="connectedToServer"
13
11
  @update:selection="handleViewChange"
14
- @update:cardSize="handleCardSizeToggle"
15
12
  />
16
13
 
17
- <Tableau
18
- :bouts="sortedBouts"
19
- :hostingClubColors="hostingClubColors"
20
- :bracketSize="bracketSize"
21
- :largeCards="largeCards"
22
- :listView="isListView"
23
- :isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
24
- @action:editBout="editBout"
25
- @action:directingBout="directBout"
26
- />
14
+ <div class="flex flex-col gap-4 xl:flex-row">
15
+ <div class="min-w-0 flex-1">
16
+ <Tableau
17
+ :bouts="sortedBouts"
18
+ :hostingClubColors="hostingClubColors"
19
+ :bracketSize="bracketSize"
20
+ :listView="isListView"
21
+ :isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
22
+ :plannedDirectingStations="plannedDirectingStations"
23
+ :plannedBoutAssignments="plannedBoutAssignments"
24
+ :viewerPersonId="viewerPersonId"
25
+ @action:editBout="editBout"
26
+ @action:directingBout="directBout"
27
+ />
28
+ </div>
29
+
30
+ <BracketDirectorAssignmentPanel
31
+ v-if="showPlannedAssignmentPanel"
32
+ class="order-first flex-none xl:order-last"
33
+ :stations="plannedDirectingStations"
34
+ :showAddCard="showAddPlannedDirectorCard"
35
+ @request:add-planned-director="$emit('request:add-planned-director')"
36
+ />
37
+ </div>
27
38
 
28
39
  <div v-if="bouts.length < 1" class="w-full flex justify-center items-center">
29
40
  <div class="text-center mb-10">
@@ -77,6 +88,7 @@ import BaseText from '../../../Atoms/Text/BaseText.vue';
77
88
  import DirectorModal from '../../../Molecules/Modals/DirectorModal/DirectorModal.vue';
78
89
  import EditBoutModal from '../../../Molecules/Modals/EditBoutModal/EditBoutModal.vue';
79
90
  import Tableau from '../../../Organisms/Containers/Tableau/Tableau.vue';
91
+ import BracketDirectorAssignmentPanel from '../../../Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.vue';
80
92
  import emptyDesertIcon from '../../../../assets/empty_desert_icon.png';
81
93
  import { tabs } from '../../../Util/tabs.js';
82
94
 
@@ -93,9 +105,11 @@ const invalidDirectingBoutPredicates = [
93
105
 
94
106
  export default {
95
107
  emits: [
108
+ 'close:directing-bout',
96
109
  'penalty:add',
97
110
  'penalty:remove',
98
111
  'penalty:update',
112
+ 'request:add-planned-director',
99
113
  'request:bout-active',
100
114
  'submit:bout',
101
115
  'tab:menu-click',
@@ -106,6 +120,7 @@ export default {
106
120
  Tableau,
107
121
  EditBoutModal,
108
122
  DirectorModal,
123
+ BracketDirectorAssignmentPanel,
109
124
  BaseText,
110
125
  ToggleHeader,
111
126
  EditEventsTopMenu
@@ -134,6 +149,26 @@ export default {
134
149
  role: {
135
150
  type: String,
136
151
  default: 'Admin'
152
+ },
153
+ plannedDirectingStations: {
154
+ type: Array,
155
+ default: () => []
156
+ },
157
+ plannedBoutAssignments: {
158
+ type: Array,
159
+ default: () => []
160
+ },
161
+ viewerPersonId: {
162
+ type: [Number, String],
163
+ default: null
164
+ },
165
+ showPlannedDirectorAssignments: {
166
+ type: Boolean,
167
+ default: false
168
+ },
169
+ showAddPlannedDirectorCard: {
170
+ type: Boolean,
171
+ default: true
137
172
  }
138
173
  },
139
174
  data() {
@@ -144,12 +179,14 @@ export default {
144
179
  selectedBout: {},
145
180
  tabs,
146
181
  viewName: 'Tableau',
147
- largeCards: true,
148
182
  boutsData: this.cloneBouts(this.bouts),
149
183
  isListView: false
150
184
  };
151
185
  },
152
186
  computed: {
187
+ showPlannedAssignmentPanel() {
188
+ return this.showPlannedDirectorAssignments || this.plannedDirectingStations.length > 0;
189
+ },
153
190
  isCountingBackwardsMaxScore() {
154
191
  // 1) see if PoolScoreDirection exists and is explicitly "false"
155
192
  const dirRule = this.eventRules.find(r => r.Rules?.RuleName === 'PoolScoreDirection');
@@ -194,9 +231,11 @@ export default {
194
231
  },
195
232
  methods: {
196
233
  handleCloseModal() {
234
+ const closedDirectingBout = this.showDirectorModal && this.selectedBout?.BoutId ? { ...this.selectedBout } : null;
197
235
  this.showDirectorModal = false;
198
236
  this.showEditBoutModal = false;
199
237
  this.selectedBout = {};
238
+ if (closedDirectingBout) this.$emit('close:directing-bout', closedDirectingBout);
200
239
  },
201
240
  handleTabMenuClick(value) {
202
241
  this.$emit('tab:menu-click', value);
@@ -239,9 +278,6 @@ export default {
239
278
  this.showEditBoutModal = true;
240
279
  this.selectedBout = updatedBout;
241
280
  },
242
- handleCardSizeToggle(value) {
243
- this.largeCards = value;
244
- },
245
281
  updateViewBasedOnScreenSize() {
246
282
  this.isListView = window.innerWidth <= 768;
247
283
  },
@@ -0,0 +1,39 @@
1
+ import portraitUrl from '../../../../assets/portrait1.png';
2
+
3
+ const createBoutAssignments = (ringId, boutIds) => boutIds.map(DEBoutId => ({ DEBoutId, RingId: ringId }));
4
+
5
+ export const plannedDirectingStations = [
6
+ {
7
+ RingId: 1,
8
+ RingName: 'Ring 1',
9
+ Color: '#2563eb',
10
+ Director: { PersonId: 1001, DisplayName: 'Alex Morgan', PortraitUrl: portraitUrl }
11
+ },
12
+ {
13
+ RingId: 2,
14
+ RingName: 'Ring 2',
15
+ Color: '#dc2626',
16
+ Director: { PersonId: 1002, DisplayName: 'Jordan Lee', PortraitUrl: portraitUrl }
17
+ },
18
+ {
19
+ RingId: 3,
20
+ RingName: 'Ring 3',
21
+ Color: '#059669',
22
+ Director: { PersonId: 1003, DisplayName: 'Sam Rivera', PortraitUrl: portraitUrl }
23
+ },
24
+ {
25
+ RingId: 4,
26
+ RingName: 'Ring 4',
27
+ Color: '#d97706',
28
+ Director: { PersonId: 1004, DisplayName: 'Taylor Quinn', PortraitUrl: portraitUrl }
29
+ }
30
+ ];
31
+
32
+ export const plannedBoutAssignments = [
33
+ ...createBoutAssignments(1, [65, 66, 67, 68, 69, 70, 71, 72, 97, 98, 99, 100, 113, 114, 121, 125]),
34
+ ...createBoutAssignments(2, [73, 74, 75, 76, 77, 78, 79, 80, 101, 102, 103, 104, 115, 116, 122]),
35
+ ...createBoutAssignments(3, [81, 82, 83, 84, 85, 86, 87, 88, 105, 106, 107, 108, 117, 118, 123, 126]),
36
+ ...createBoutAssignments(4, [89, 90, 91, 92, 93, 94, 95, 96, 109, 110, 111, 112, 119, 120, 124, 127])
37
+ ];
38
+
39
+ export const plannedSuggestionViewerId = plannedDirectingStations[0].Director.PersonId;
@@ -0,0 +1,39 @@
1
+ const STORY_DIRECTOR = {
2
+ PersonId: -1,
3
+ DisplayName: 'Story Director'
4
+ };
5
+
6
+ const isSameBout = (bout, selectedBout) => String(bout.BoutId) === String(selectedBout.BoutId);
7
+ const isActiveBout = bout => String(bout?.Status || '').toLowerCase() === 'active';
8
+ const hasSameIdentity = (firstId, secondId) => String(firstId ?? '') === String(secondId ?? '');
9
+
10
+ export const cloneStoryBouts = bouts => (bouts || []).map(bout => ({ ...bout }));
11
+
12
+ export const canStoryDirectorDirectBout = (bout, directorId) =>
13
+ !isActiveBout(bout) || hasSameIdentity(bout.RefereeId, directorId);
14
+
15
+ export const getStoryDirectorId = station => station?.Director?.PersonId ?? STORY_DIRECTOR.PersonId;
16
+
17
+ export const activateStoryBout = (bout, station = null) => {
18
+ const director = station?.Director || STORY_DIRECTOR;
19
+
20
+ return {
21
+ ...bout,
22
+ Status: 'Active',
23
+ RefereeId: director.PersonId,
24
+ RefName: director.DisplayName,
25
+ RingName: station?.RingName || bout.RingName || 'DE Bracket',
26
+ TimerStatus: bout.TimerStatus || 'stopped',
27
+ TimeLeft: Number(bout.TimeLeft) > 0 ? Number(bout.TimeLeft) : 180
28
+ };
29
+ };
30
+
31
+ export const clearStoryBoutChrome = bout => ({
32
+ ...bout,
33
+ RingName: '',
34
+ TimerStatus: 'stopped',
35
+ TimeLeft: 0
36
+ });
37
+
38
+ export const replaceStoryBout = (bouts, selectedBout) =>
39
+ bouts.map(bout => (isSameBout(bout, selectedBout) ? { ...selectedBout } : bout));
@@ -0,0 +1,79 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import {
3
+ activateStoryBout,
4
+ canStoryDirectorDirectBout,
5
+ clearStoryBoutChrome,
6
+ replaceStoryBout
7
+ } from './BracketStoryHarness';
8
+
9
+ describe('Bracket story parent simulation', () => {
10
+ it('returns an Active parent-owned bout without mutating the selected bout', () => {
11
+ const scheduledBout = { BoutId: 42, Status: 'Scheduled', TimeLeft: 0, Score1: 2, Score2: 1 };
12
+
13
+ const activeBout = activateStoryBout(scheduledBout);
14
+
15
+ expect(activeBout).toMatchObject({
16
+ Status: 'Active',
17
+ RefereeId: -1,
18
+ RefName: 'Story Director',
19
+ RingName: 'DE Bracket',
20
+ TimerStatus: 'stopped',
21
+ TimeLeft: 180,
22
+ Score1: 2,
23
+ Score2: 1
24
+ });
25
+ expect(scheduledBout).toEqual({ BoutId: 42, Status: 'Scheduled', TimeLeft: 0, Score1: 2, Score2: 1 });
26
+ });
27
+
28
+ it('replaces only the selected bout in the story-owned collection', () => {
29
+ const bouts = [
30
+ { BoutId: 41, Status: 'Scheduled' },
31
+ { BoutId: 42, Status: 'Scheduled' }
32
+ ];
33
+ const activeBout = { BoutId: 42, Status: 'Active' };
34
+
35
+ expect(replaceStoryBout(bouts, activeBout)).toEqual([bouts[0], activeBout]);
36
+ });
37
+
38
+ it('uses the viewer station when the story simulates pulling a scheduled bout', () => {
39
+ const scheduledBout = { BoutId: 42, Status: 'Scheduled' };
40
+ const station = {
41
+ RingName: 'Ring 1',
42
+ Director: { PersonId: 1001, DisplayName: 'Alex Morgan' }
43
+ };
44
+
45
+ expect(activateStoryBout(scheduledBout, station)).toMatchObject({
46
+ Status: 'Active',
47
+ RefereeId: 1001,
48
+ RefName: 'Alex Morgan',
49
+ RingName: 'Ring 1'
50
+ });
51
+ expect(scheduledBout).toEqual({ BoutId: 42, Status: 'Scheduled' });
52
+ });
53
+
54
+ it('allows scheduled bouts to move but protects an Active bout owned by another director', () => {
55
+ expect(canStoryDirectorDirectBout({ Status: 'Scheduled', RefereeId: 2002 }, 1001)).toBe(true);
56
+ expect(canStoryDirectorDirectBout({ Status: 'Active', RefereeId: 2002 }, 1001)).toBe(false);
57
+ expect(canStoryDirectorDirectBout({ Status: 'Active', RefereeId: 1001 }, '1001')).toBe(true);
58
+ });
59
+
60
+ it('clears story-only ring and timer fields without resetting status or scores', () => {
61
+ const activeBout = {
62
+ BoutId: 42,
63
+ Status: 'Active',
64
+ Score1: 5,
65
+ Score2: 4,
66
+ RingName: 'Ring 3',
67
+ TimerStatus: 'running',
68
+ TimeLeft: 72
69
+ };
70
+
71
+ expect(clearStoryBoutChrome(activeBout)).toEqual({
72
+ ...activeBout,
73
+ RingName: '',
74
+ TimerStatus: 'stopped',
75
+ TimeLeft: 0
76
+ });
77
+ expect(activeBout).toMatchObject({ Status: 'Active', Score1: 5, Score2: 4 });
78
+ });
79
+ });
@@ -1,111 +0,0 @@
1
- export const spacingConfig = {
2
- Semifinal: {
3
- large: {
4
- Semifinal: { getTopSpace: 'mt-[0rem] mb-4', getCardSpace: 'mt-1' },
5
- Final: { getTopSpace: 'mt-[10rem]', getCardSpace: 'mt-1' },
6
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[19.2rem]', getCardSpace: 'mt-1' }
7
- },
8
- small: {
9
- Semifinal: { getTopSpace: 'mt-[0.7rem] mb-[1.8rem]', getCardSpace: 'mt-[2.3rem]' },
10
- Final: { getTopSpace: 'mt-[12.2rem]', getCardSpace: 'mt-1' },
11
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[11rem]', getCardSpace: 'mt-1' }
12
- }
13
- },
14
- 'Table of 8': {
15
- large: {
16
- 'Table of 8': { getTopSpace: 'mt-[0rem] mb-[2rem]', getCardSpace: 'mt-1' },
17
- Semifinal: { getTopSpace: 'mt-[1.34rem] mb-[3.4rem]', getCardSpace: 'mt-[4.5rem]' },
18
- Final: { getTopSpace: 'mt-[11rem] ml-10', getCardSpace: 'mt-1' },
19
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[19.2rem]', getCardSpace: 'mt-1' },
20
- 'Table of 4': { getTopSpace: 'mt-[1.34rem] mb-[3.4rem]', getCardSpace: 'mt-[4.5rem]' },
21
- 'Table of 2': { getTopSpace: 'mt-[5.8rem] mb-[3.4rem]', getCardSpace: 'mt-[11.5rem]' },
22
- 'Consolation Round 1': { getTopSpace: 'mt-[3rem] mb-[2rem]', getCardSpace: 'mt-1' },
23
- 'Consolation Round 2': { getTopSpace: 'mt-[1.5rem] mb-[3.8rem]', getCardSpace: 'mt-1' },
24
- 'Consolation Round 3': { getTopSpace: 'mt-[2.7rem] mb-[3.8rem]', getCardSpace: 'mt-[8rem]' },
25
- 'Consolation Round 4': { getTopSpace: 'mt-[5rem] mb-[3.8rem]', getCardSpace: 'mt-1' },
26
- 'Grand Final': { getTopSpace: 'mt-[11rem] ml-10', getCardSpace: 'mt-1' }
27
- },
28
- small: {
29
- 'Table of 8': { getTopSpace: 'mt-[0rem] mb-4', getCardSpace: 'mt-1' },
30
- Semifinal: { getTopSpace: 'mt-[0.7rem] mb-[1.8rem]', getCardSpace: 'mt-[2.3rem]' },
31
- Final: { getTopSpace: 'mt-[6rem]', getCardSpace: 'mt-1' },
32
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[11rem]', getCardSpace: 'mt-1' }
33
- }
34
- },
35
- 'Table of 16': {
36
- large: {
37
- 'Table of 16': { getTopSpace: 'mt-[0rem] mb-[2rem]', getCardSpace: 'mt-1' },
38
- 'Table of 8': { getTopSpace: 'mt-[1.34rem] mb-[3.4rem]', getCardSpace: 'mt-[4.5rem]' },
39
- Semifinal: { getTopSpace: 'mt-[4.6rem] mb-[7rem]', getCardSpace: 'mt-[11.5rem]' },
40
- Final: { getTopSpace: 'mt-[22.5rem]', getCardSpace: 'mt-1' },
41
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[19.2rem]', getCardSpace: 'mt-1' }
42
- },
43
- small: {
44
- 'Table of 16': { getTopSpace: 'mt-[0rem] mb-4', getCardSpace: 'mt-1' },
45
- 'Table of 8': { getTopSpace: 'mt-[0.7rem] mb-[1.75rem]', getCardSpace: 'mt-[2.3rem]' },
46
- Semifinal: { getTopSpace: 'mt-[2.25rem] mb-[3.63rem]', getCardSpace: 'mt-[5.9rem]' },
47
- Final: { getTopSpace: 'mt-[12.1rem]', getCardSpace: 'mt-1' },
48
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[11rem]', getCardSpace: 'mt-1' }
49
- }
50
- },
51
- 'Table of 32': {
52
- large: {
53
- 'Table of 32': { getTopSpace: 'mt-[0rem] mb-[2rem]', getCardSpace: 'mt-1' },
54
- 'Table of 16': { getTopSpace: 'mt-[1.34rem] mb-[3.4rem]', getCardSpace: 'mt-[4.5rem]' },
55
- 'Table of 8': { getTopSpace: 'mt-[4.6rem] mb-[7.15rem]', getCardSpace: 'mt-[11.5rem]' },
56
- Semifinal: { getTopSpace: 'mt-[11.7rem] mb-[14rem]', getCardSpace: 'mt-[25.5rem]' },
57
- Final: { getTopSpace: 'mt-[51.5rem] ', getCardSpace: 'mt-1' },
58
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[19.2rem]', getCardSpace: 'mt-1' }
59
- },
60
- small: {
61
- 'Table of 32': { getTopSpace: 'mt-[0rem] mb-[2rem]', getCardSpace: 'mt-1' },
62
- 'Table of 16': { getTopSpace: 'mt-[0.7rem] mb-[2.65rem]', getCardSpace: 'mt-[3.4rem]' },
63
- 'Table of 8': { getTopSpace: 'mt-[2.9rem] mb-[5rem]', getCardSpace: 'mt-[7.85rem]' },
64
- Semifinal: { getTopSpace: 'mt-[7rem] mb-[10rem]', getCardSpace: 'mt-[16.8rem]' },
65
- Final: { getTopSpace: 'mt-[34.1rem]', getCardSpace: 'mt-1' },
66
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[11rem]', getCardSpace: 'mt-1' }
67
- }
68
- },
69
- 'Table of 64': {
70
- large: {
71
- 'Table of 64': { getTopSpace: 'mt-[0rem] mb-[2rem]', getCardSpace: 'mt-1' },
72
- 'Table of 32': { getTopSpace: 'mt-[1.34rem] mb-[3.4rem]', getCardSpace: 'mt-[4.5rem]' },
73
- 'Table of 16': { getTopSpace: 'mt-[4.6rem] mb-[7.15rem]', getCardSpace: 'mt-[11.5rem]' },
74
- 'Table of 8': { getTopSpace: 'mt-[11.7rem] mb-[13.78rem]', getCardSpace: 'mt-[25.76rem]' },
75
- Semifinal: { getTopSpace: 'mt-[24.45rem] mb-[29rem]', getCardSpace: 'mt-[53.6rem]' },
76
- Final: { getTopSpace: 'mt-[110rem] ', getCardSpace: 'mt-1' },
77
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[19.2rem]', getCardSpace: 'mt-1' }
78
- },
79
- small: {
80
- 'Table of 64': { getTopSpace: 'mt-[0rem] mb-[2rem]', getCardSpace: 'mt-1' },
81
- 'Table of 32': { getTopSpace: 'mt-[0.7rem] mb-[2.65rem]', getCardSpace: 'mt-[3.4rem]' },
82
- 'Table of 16': { getTopSpace: 'mt-[2.9rem] mb-[5rem]', getCardSpace: 'mt-[7.85rem]' },
83
- 'Table of 8': { getTopSpace: 'mt-[7rem] mb-[9.95rem]', getCardSpace: 'mt-[16.8rem]' },
84
- Semifinal: { getTopSpace: 'mt-[16.1rem] mb-[18.8rem]', getCardSpace: 'mt-[34.8rem]' },
85
- Final: { getTopSpace: 'mt-[68rem]', getCardSpace: 'mt-1' },
86
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[11rem]', getCardSpace: 'mt-1' }
87
- }
88
- },
89
- 'Table of 128': {
90
- large: {
91
- 'Table of 128': { getTopSpace: 'mt-[0rem] mb-[2rem]', getCardSpace: 'mt-1' },
92
- 'Table of 64': { getTopSpace: 'mt-[1.34rem] mb-[3.4rem]', getCardSpace: 'mt-[4.5rem]' },
93
- 'Table of 32': { getTopSpace: 'mt-[4.6rem] mb-[7.15rem]', getCardSpace: 'mt-[11.5rem]' },
94
- 'Table of 16': { getTopSpace: 'mt-[11.7rem] mb-[13.78rem]', getCardSpace: 'mt-[25.76rem]' },
95
- 'Table of 8': { getTopSpace: 'mt-[24.45rem] mb-[29rem]', getCardSpace: 'mt-[53.6rem]' },
96
- Semifinal: { getTopSpace: 'mt-[47.5rem] mb-[62rem]', getCardSpace: 'mt-[109.5rem]' },
97
- Final: { getTopSpace: 'mt-[223rem] ', getCardSpace: 'mt-1' },
98
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[19.2rem]', getCardSpace: 'mt-1' }
99
- },
100
- small: {
101
- 'Table of 128': { getTopSpace: 'mt-[0rem] mb-[2rem]', getCardSpace: 'mt-1' },
102
- 'Table of 64': { getTopSpace: 'mt-[0.7rem] mb-[2.65rem]', getCardSpace: 'mt-[3.4rem]' },
103
- 'Table of 32': { getTopSpace: 'mt-[2.9rem] mb-[5rem]', getCardSpace: 'mt-[7.85rem]' },
104
- 'Table of 16': { getTopSpace: 'mt-[7rem] mb-[9.95rem]', getCardSpace: 'mt-[16.8rem]' },
105
- 'Table of 8': { getTopSpace: 'mt-[16.1rem] mb-[18.8rem]', getCardSpace: 'mt-[34.8rem]' },
106
- Semifinal: { getTopSpace: 'mt-[34.3rem] mb-[36.5rem]', getCardSpace: 'mt-[70.8rem]' },
107
- Final: { getTopSpace: 'mt-[140rem]', getCardSpace: 'mt-1' },
108
- 'Third Place': { getTopSpace: '-mt-[2rem] -ml-[11rem]', getCardSpace: 'mt-1' }
109
- }
110
- }
111
- };
@@ -1,162 +0,0 @@
1
- // spacingConfig.js
2
- export const spacingConfig = {
3
- Semifinal: {
4
- large: {
5
- Semifinal: { getTopSpace: 'mt-0', getConnectorHeight: 'h-[3rem]', getTopSpaceForLine: 'mt-[1.5rem]' },
6
- Final: { getTopSpace: 'h-[8.5rem] mt-[5rem] -ml-[309px]', getBottomLine: 'h-[6.7rem] mt-[2.5rem] -ml-[309px]' },
7
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
8
- },
9
- small: {
10
- Semifinal: { getTopSpace: 'mt-[0rem]', getConnectorHeight: 'h-[3.5rem]', getTopSpaceForLine: 'mt-[1.6rem]' },
11
- Final: { getTopSpace: 'h-[6rem] mt-[9.1rem] -ml-[181px]', getBottomLine: 'h-[3rem] mt-[1.4rem] -ml-[181px]' },
12
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
13
- }
14
- },
15
- 'Table of 8': {
16
- large: {
17
- 'Table of 8': { getTopSpace: 'mt-[0rem]', getConnectorHeight: 'h-[2.7rem]', getTopSpaceForLine: 'mt-[1.2rem]' },
18
- Semifinal: { getTopSpace: 'mt-[2.5rem]', getConnectorHeight: 'h-[7rem]', getTopSpaceForLine: 'mt-[3.25rem]' },
19
- Final: { getTopSpace: 'h-[6rem] mt-[22rem] -ml-[309px]', getBottomLine: 'h-[6rem] mt-[2.5rem] -ml-[309px]' },
20
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' },
21
- 'Table of 4': { getTopSpace: 'mt-[2.5rem]', getConnectorHeight: 'h-[7rem]', getTopSpaceForLine: 'mt-[3.25rem]' },
22
- 'Table of 2': { getTopSpace: 'hidden h-[6rem] mt-[22rem]', getBottomLine: 'h-[6rem] mt-[2.5rem] -ml-[309px]' },
23
- 'Consolation Round 1': {
24
- getTopSpace: 'mt-[3rem]',
25
- getConnectorHeight: 'h-[2.7rem]',
26
- getTopSpaceForLine: 'mt-[1.2rem]'
27
- },
28
- 'Consolation Round 2': {
29
- getTopSpace: 'mt-[1.5rem]',
30
- getConnectorHeight: 'h-[2.7rem]',
31
- getTopSpaceForLine: 'mt-[1.2rem]'
32
- },
33
- 'Consolation Round 3': {
34
- getTopSpace: 'mt-[2.7rem]',
35
- getConnectorHeight: 'h-[10.5rem]',
36
- getTopSpaceForLine: 'mt-[5rem]'
37
- },
38
- 'Consolation Round 4': {
39
- getTopSpace: 'hidden mt-[2.7rem]',
40
- getConnectorHeight: 'h-[10.5rem]',
41
- getTopSpaceForLine: 'mt-[5rem]'
42
- },
43
- 'Grand Final': {
44
- getTopSpace: 'hidden h-[6rem] mt-[22rem] -ml-[309px]',
45
- getBottomLine: 'h-[6rem] mt-[2.5rem] -ml-[309px]'
46
- }
47
- },
48
- small: {
49
- 'Table of 8': {
50
- getTopSpace: '-mt-[0.6rem]',
51
- getConnectorHeight: 'h-[1.5rem]',
52
- getTopSpaceForLine: 'mt-[0.6rem]'
53
- },
54
- Semifinal: { getTopSpace: 'mt-[1.2rem]', getConnectorHeight: 'h-[3.6rem]', getTopSpaceForLine: 'mt-[1.6rem]' },
55
- Final: { getTopSpace: 'h-[6rem] mt-[9.1rem] -ml-[181px]', getBottomLine: 'h-[3rem] mt-[1.4rem] -ml-[181px]' },
56
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
57
- }
58
- },
59
- 'Table of 16': {
60
- large: {
61
- 'Table of 16': { getTopSpace: 'mt-[0rem]', getConnectorHeight: 'h-[2.7rem]', getTopSpaceForLine: 'mt-[1.2rem]' },
62
- 'Table of 8': { getTopSpace: 'mt-[1.3rem]', getConnectorHeight: 'h-[7rem]', getTopSpaceForLine: 'mt-[3.25rem]' },
63
- Semifinal: { getTopSpace: 'mt-[5.8rem]', getConnectorHeight: 'h-[14rem]', getTopSpaceForLine: 'mt-[7rem]' },
64
- Final: { getTopSpace: 'mt-[14rem] h-[12rem] -ml-[309px]', getBottomLine: 'h-[12rem] mt-[2.5rem] -ml-[309px]' },
65
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
66
- },
67
- small: {
68
- 'Table of 16': {
69
- getTopSpace: '-mt-[0.6rem]',
70
- getConnectorHeight: 'h-[1.5rem]',
71
- getTopSpaceForLine: 'mt-[0.6rem]'
72
- },
73
- 'Table of 8': { getTopSpace: '-mt-[0rem]', getConnectorHeight: 'h-[3.5rem]', getTopSpaceForLine: 'mt-[1.6rem]' },
74
- Semifinal: { getTopSpace: 'mt-[2.8rem]', getConnectorHeight: 'h-[7.2rem]', getTopSpaceForLine: 'mt-[3.8rem]' },
75
- Final: { getTopSpace: 'h-[8rem] mt-[7rem] -ml-[181px]', getBottomLine: 'h-[8rem] mt-[1.4rem] -ml-[181px]' },
76
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
77
- }
78
- },
79
- 'Table of 32': {
80
- large: {
81
- 'Table of 32': { getTopSpace: 'mt-[0rem]', getConnectorHeight: 'h-[2.7rem]', getTopSpaceForLine: 'mt-[1.2rem]' },
82
- 'Table of 16': { getTopSpace: 'mt-[1.3rem]', getConnectorHeight: 'h-[7rem]', getTopSpaceForLine: 'mt-[3.25rem]' },
83
- 'Table of 8': { getTopSpace: 'mt-[4.7rem]', getConnectorHeight: 'h-[14rem]', getTopSpaceForLine: 'mt-[7rem]' },
84
- Semifinal: { getTopSpace: 'mt-[12.8rem]', getConnectorHeight: 'h-[28rem]', getTopSpaceForLine: 'mt-[7rem]' },
85
- Final: {
86
- getTopSpace: 'h-[25.1rem] mt-[30.1rem] -ml-[309px]',
87
- getBottomLine: 'h-[25.1rem] mt-[2.5rem] -ml-[309px]'
88
- },
89
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
90
- },
91
- small: {
92
- 'Table of 32': {
93
- getTopSpace: '-mt-[0.6rem]',
94
- getConnectorHeight: 'h-[1.5rem]',
95
- getTopSpaceForLine: 'mt-[0.65rem]'
96
- },
97
- 'Table of 16': { getTopSpace: '-mt-[0rem]', getConnectorHeight: 'h-[4.8rem]', getTopSpaceForLine: 'mt-[2.2rem]' },
98
- 'Table of 8': { getTopSpace: 'mt-[2.3rem]', getConnectorHeight: 'h-[9.1rem]', getTopSpaceForLine: 'mt-[4rem]' },
99
- Semifinal: { getTopSpace: 'mt-[7.5rem]', getConnectorHeight: 'h-[18rem]', getTopSpaceForLine: 'mt-[3.8rem]' },
100
- Final: { getTopSpace: 'h-[12.6rem] mt-[24.4rem] -ml-[181px]', getBottomLine: 'h-[8rem] mt-[1.4rem] -ml-[181px]' },
101
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
102
- }
103
- },
104
- 'Table of 64': {
105
- large: {
106
- 'Table of 64': { getTopSpace: 'mt-[0rem]', getConnectorHeight: 'h-[2.7rem]', getTopSpaceForLine: 'mt-[1.2rem]' },
107
- 'Table of 32': { getTopSpace: 'mt-[1.3rem]', getConnectorHeight: 'h-[7rem]', getTopSpaceForLine: 'mt-[3.25rem]' },
108
- 'Table of 16': { getTopSpace: 'mt-[4.7rem]', getConnectorHeight: 'h-[14rem]', getTopSpaceForLine: 'mt-[7rem]' },
109
- 'Table of 8': {
110
- getTopSpace: 'mt-[11.7rem]',
111
- getConnectorHeight: 'h-[28rem]',
112
- getTopSpaceForLine: 'mt-[12.5rem]'
113
- },
114
- Semifinal: { getTopSpace: 'mt-[25.5rem]', getConnectorHeight: 'h-[56rem]', getTopSpaceForLine: 'mt-[23rem]' },
115
- Final: { getTopSpace: 'mt-[148.5rem] h-[81rem] -ml-[309px]', getBottomLine: 'h-[80rem] mt-[2.5rem] -ml-[309px]' },
116
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
117
- },
118
- small: {
119
- 'Table of 64': {
120
- getTopSpace: '-mt-[0.6rem]',
121
- getConnectorHeight: 'h-[1.5rem]',
122
- getTopSpaceForLine: 'mt-[0.65rem]'
123
- },
124
- 'Table of 32': { getTopSpace: '-mt-[0rem]', getConnectorHeight: 'h-[4.8rem]', getTopSpaceForLine: 'mt-[2.2rem]' },
125
- 'Table of 16': { getTopSpace: 'mt-[2.3rem]', getConnectorHeight: 'h-[9.1rem]', getTopSpaceForLine: 'mt-[4rem]' },
126
- 'Table of 8': { getTopSpace: 'mt-[6.4rem]', getConnectorHeight: 'h-[18rem]', getTopSpaceForLine: 'mt-[9rem]' },
127
- Semifinal: { getTopSpace: 'mt-[15.6rem]', getConnectorHeight: 'h-[36rem]', getTopSpaceForLine: 'mt-[18rem]' },
128
- Final: { getTopSpace: 'h-[256px] mt-[64.8rem] -ml-[181px]', getBottomLine: 'h-[8rem] mt-[1.4rem] -ml-[181px]' },
129
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
130
- }
131
- },
132
- 'Table of 128': {
133
- large: {
134
- 'Table of 128': { getTopSpace: 'mt-[0rem]', getConnectorHeight: 'h-[2.7rem]', getTopSpaceForLine: 'mt-[1.2rem]' },
135
- 'Table of 64': { getTopSpace: 'mt-[1.3rem]', getConnectorHeight: 'h-[7rem]', getTopSpaceForLine: 'mt-[3.25rem]' },
136
- 'Table of 32': { getTopSpace: 'mt-[4.7rem]', getConnectorHeight: 'h-[14rem]', getTopSpaceForLine: 'mt-[7rem]' },
137
- 'Table of 16': {
138
- getTopSpace: 'mt-[11.7rem]',
139
- getConnectorHeight: 'h-[28rem]',
140
- getTopSpaceForLine: 'mt-[12.5rem]'
141
- },
142
- 'Table of 8': { getTopSpace: 'mt-[24.5rem]', getConnectorHeight: 'h-[56rem]', getTopSpaceForLine: 'mt-[23rem]' },
143
- Semifinal: { getTopSpace: 'mt-[48.7rem]', getConnectorHeight: 'h-[112rem]', getTopSpaceForLine: '' },
144
- Final: { getTopSpace: 'mt-[146.5rem] h-[80rem] -ml-[309px]', getBottomLine: 'h-[80rem] mt-[2.5rem] -ml-[309px]' },
145
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
146
- },
147
- small: {
148
- 'Table of 128': {
149
- getTopSpace: '-mt-[0.6rem]',
150
- getConnectorHeight: 'h-[1.5rem]',
151
- getTopSpaceForLine: 'mt-[0.65rem]'
152
- },
153
- 'Table of 64': { getTopSpace: '-mt-[0rem]', getConnectorHeight: 'h-[4.8rem]', getTopSpaceForLine: 'mt-[2.2rem]' },
154
- 'Table of 32': { getTopSpace: 'mt-[2.3rem]', getConnectorHeight: 'h-[9.1rem]', getTopSpaceForLine: 'mt-[4rem]' },
155
- 'Table of 16': { getTopSpace: 'mt-[6.4rem]', getConnectorHeight: 'h-[18rem]', getTopSpaceForLine: 'mt-[9rem]' },
156
- 'Table of 8': { getTopSpace: 'mt-[15.6rem]', getConnectorHeight: 'h-[36rem]', getTopSpaceForLine: 'mt-[18rem]' },
157
- Semifinal: { getTopSpace: 'mt-[34.8rem]', getConnectorHeight: 'h-[72rem]', getTopSpaceForLine: 'mt-[3.8rem]' },
158
- Final: { getTopSpace: 'h-[700px] mt-[99rem] -ml-[181px]', getBottomLine: 'h-[700px] mt-[1.4rem] -ml-[181px]' },
159
- 'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' }
160
- }
161
- }
162
- };