@dcrackel/hematournamentui 1.0.28 → 1.0.31

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcrackel/hematournamentui",
3
3
  "private": false,
4
- "version": "1.0.28",
4
+ "version": "1.0.31",
5
5
  "type": "module",
6
6
  "main": "dist/HemaTouranmentUI-lib.umd.js",
7
7
  "module": "dist/HemaTouranmentUI-lib.es.js",
package/src/index.js CHANGED
@@ -10,6 +10,7 @@ export { default as TournamentCardDetail } from './stories/Molecules/Cards/Detai
10
10
  export { default as TournamentCardHeader } from './stories/Molecules/Cards/Header/TournamentCardHeader.vue';
11
11
  export { default as FilterAndSortBar } from './stories/Molecules/Filters/FilterAndSortBar/FilterAndSortBar.vue';
12
12
  export { default as FilterUpcomingPast } from './stories/Molecules/Filters/FilterUpcomingPast/FilterUpcomingPast.vue';
13
+ export { default as Modal } from './stories/Molecules/Modal/Modal.vue';
13
14
 
14
15
  export { default as AddressAutocomplete } from './stories/Organisms/AddressAutocomplete/AddressAutocomplete.vue';
15
16
  export { default as DatePicker } from './stories/Organisms/DatePicker/DatePicker.vue';
@@ -0,0 +1,20 @@
1
+ import Modal from './Modal.vue';
2
+
3
+ export default {
4
+ title: 'Molecules/Modal',
5
+ component: Modal,
6
+ tags: ['autodocs'],
7
+ };
8
+
9
+ const Template = (args) => ({
10
+ components: { Modal },
11
+ setup() {
12
+ return { args };
13
+ },
14
+ template: '<Modal v-bind="args" />',
15
+ });
16
+
17
+ export const Default = Template.bind({});
18
+ Default.args = {
19
+ show: true,
20
+ };
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <div v-if="show" class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full" @click="close">
3
+ <div class="relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white">
4
+ <div class="mt-3 text-center">
5
+ <p class="text-lg leading-6 font-medium text-gray-900">Your tournament has been added</p>
6
+ <div class="mt-4">
7
+ <button class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" @click="close">OK</button>
8
+ </div>
9
+ </div>
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ props: {
17
+ show: {
18
+ type: Boolean,
19
+ default: false
20
+ }
21
+ },
22
+ emits: ['update:show'],
23
+ methods: {
24
+ close() {
25
+ this.$emit('update:show', false);
26
+ }
27
+ }
28
+ };
29
+ </script>
@@ -78,8 +78,13 @@ export default {
78
78
  }
79
79
  },
80
80
  created() {
81
+ // Check if externalLinks exists and is an array. If not, initialize it as an empty array.
82
+ if (!Array.isArray(this.localTournament.externalLinks)) {
83
+ this.localTournament.externalLinks = [];
84
+ }
85
+
81
86
  if (this.localTournament.externalLinks.length === 0) {
82
- this.localTournament.externalLinks = [{url: '', valid: true}]
87
+ this.localTournament.externalLinks.push({ url: "", valid: true });
83
88
  }
84
89
  },
85
90
  methods: {