@necrolab/dashboard 0.5.19 → 0.5.20

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@necrolab/dashboard",
3
- "version": "0.5.19",
3
+ "version": "0.5.20",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rm -rf dist && vite build && npx workbox-cli generateSW workbox-config.cjs",
@@ -12,7 +12,7 @@
12
12
  v-model="eventId"
13
13
  aria-label="Event ID" />
14
14
  <button
15
- class="flex h-10 w-9 flex-shrink-0 items-center justify-center bg-dark-400 text-white transition-standard hover:bg-dark-450"
15
+ class="transition-standard hover:bg-dark-450 flex h-10 w-9 flex-shrink-0 items-center justify-center bg-dark-400 text-white"
16
16
  @click="updateShownVenue"
17
17
  aria-label="Load venue">
18
18
  <ReloadIcon class="icon-md" />
@@ -20,16 +20,14 @@
20
20
  </div>
21
21
  </div>
22
22
 
23
- <div class="mb-3 flex flex-1 flex-col overflow-hidden rounded border border-dark-650 bg-dark-400 p-3 shadow-sm md:mb-4">
23
+ <div
24
+ class="mb-3 flex flex-1 flex-col overflow-hidden rounded border border-dark-650 bg-dark-400 p-3 shadow-sm md:mb-4">
24
25
  <div class="flex h-full w-full flex-col gap-3 lg:flex-row lg:gap-4">
25
- <div class="relative flex min-h-75 min-w-0 w-full flex-col overflow-hidden rounded-lg lg:min-h-125 lg:w-3/5">
26
- <div v-if="svg" class="mb-2 flex-gap-2 items-center">
27
- <button @click="handleZoom(true)" class="btn-icon-small" aria-label="Zoom in">
28
- +
29
- </button>
30
- <button @click="handleZoom(false)" class="btn-icon-small" aria-label="Zoom out">
31
- -
32
- </button>
26
+ <div
27
+ class="min-h-75 lg:min-h-125 relative flex w-full min-w-0 flex-col overflow-hidden rounded-lg lg:w-3/5">
28
+ <div v-if="svg" class="flex-gap-2 mb-2 items-center">
29
+ <button @click="handleZoom(true)" class="btn-icon-small" aria-label="Zoom in">+</button>
30
+ <button @click="handleZoom(false)" class="btn-icon-small" aria-label="Zoom out">-</button>
33
31
  <button @click="handleZoom('r')" class="btn-icon-small" aria-label="Reset zoom">
34
32
  <ReloadIcon class="icon-md text-white" />
35
33
  </button>
@@ -37,14 +35,14 @@
37
35
  <div class="selecto-wrapper flex-1 overflow-hidden">
38
36
  <div
39
37
  v-if="svg"
40
- class="hidden-scrollbars relative h-full min-h-87.5 w-full overflow-auto rounded border border-dark-550 bg-dark-500 p-2 shadow">
38
+ class="hidden-scrollbars min-h-87.5 relative h-full w-full overflow-auto rounded border border-dark-550 bg-dark-500 p-2 shadow">
41
39
  <div class="svg-wrapper" id="svg-wrapper" v-html="svg"></div>
42
40
  </div>
43
41
  <div
44
42
  v-else
45
- class="relative flex h-full min-h-87.5 w-full items-center justify-center rounded border border-dark-550 bg-dark-500 p-2 shadow">
43
+ class="min-h-87.5 relative flex h-full w-full items-center justify-center rounded border border-dark-550 bg-dark-500 p-2 shadow">
46
44
  <div class="text-center">
47
- <FilterIcon class="mx-auto empty-state-icon" />
45
+ <FilterIcon class="empty-state-icon mx-auto" />
48
46
  <p class="text-sm text-light-400">No Map</p>
49
47
  <p class="mt-1 text-xs text-light-500">
50
48
  Enter an event ID and click "Load" to display the venue map
@@ -53,7 +51,7 @@
53
51
  </div>
54
52
  </div>
55
53
  </div>
56
- <div class="flex min-h-75 min-w-0 w-full flex-col lg:min-h-125 lg:w-2/5">
54
+ <div class="min-h-75 lg:min-h-125 flex w-full min-w-0 flex-col lg:w-2/5">
57
55
  <div class="mb-2 flex flex-shrink-0 flex-wrap items-center gap-2 text-white" v-if="hasLoaded">
58
56
  <PriceSortToggle
59
57
  :current="filterBuilder.globalFilter.priceSort"
@@ -72,7 +70,8 @@
72
70
  class="input-default h-8 w-16 px-2 text-sm"
73
71
  placeholder="999" />
74
72
  </div>
75
- <div class="flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-dark-550 bg-dark-500 shadow-sm">
73
+ <div
74
+ class="flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-dark-550 bg-dark-500 shadow-sm">
76
75
  <div class="flex-shrink-0 border-b border-dark-550 bg-dark-300 px-4 py-3 text-xs text-white">
77
76
  <div class="flex w-full items-center justify-between gap-2">
78
77
  <div class="flex-gap-2 items-center">
@@ -85,10 +84,7 @@
85
84
  :options="['All', 'WL', 'BL']"
86
85
  :current="shownFilters"
87
86
  @change="(e) => (shownFilters = e)" />
88
- <button
89
- class="filter-action-btn"
90
- @click="saveFilter"
91
- title="Save filter">
87
+ <button class="filter-action-btn" @click="saveFilter" title="Save filter">
92
88
  <EditIcon class="h-3 w-3 flex-shrink-0" />
93
89
  <span>Save</span>
94
90
  </button>
@@ -103,33 +99,31 @@
103
99
  </div>
104
100
  </div>
105
101
  <div class="hidden-scrollbars flex-1 overflow-auto bg-dark-400">
106
- <draggable
107
- v-if="filterBuilder.filters.length"
108
- v-model="draggableFilters"
109
- handle=".handle"
110
- item-key="id"
111
- tag="div"
112
- class="space-y-0 p-1"
113
- ghost-class="opacity-30 border border-dark-550 bg-dark-550/10"
114
- drag-class="z-50 shadow-xl"
115
- :animation="200">
116
- <template #item="{ element: f, index: i }">
117
- <Filter
118
- v-show="doesFilterShow(f)"
119
- :filter="f"
120
- :index="i"
121
- :filterBuilder="filterBuilder"
122
- class="!p-1 !text-xs" />
123
- </template>
124
- </draggable>
125
- <div
126
- v-else
127
- class="empty-state flex flex-col items-center justify-center py-8 text-center">
128
- <FilterIcon class="empty-state-icon" />
129
- <p class="text-sm text-light-400">No filters yet</p>
130
- <p class="mt-1 text-xs text-light-500">Click on the map to create filters</p>
131
- </div>
102
+ <draggable
103
+ v-if="filterBuilder.filters.length"
104
+ v-model="draggableFilters"
105
+ handle=".handle"
106
+ item-key="id"
107
+ tag="div"
108
+ class="space-y-0 p-1"
109
+ ghost-class="opacity-30 border border-dark-550 bg-dark-550/10"
110
+ drag-class="z-50 shadow-xl"
111
+ :animation="200">
112
+ <template #item="{ element: f, index: i }">
113
+ <Filter
114
+ v-show="doesFilterShow(f)"
115
+ :filter="f"
116
+ :index="i"
117
+ :filterBuilder="filterBuilder"
118
+ class="!p-1 !text-xs" />
119
+ </template>
120
+ </draggable>
121
+ <div v-else class="empty-state flex flex-col items-center justify-center py-8 text-center">
122
+ <FilterIcon class="empty-state-icon" />
123
+ <p class="text-sm text-light-400">No filters yet</p>
124
+ <p class="mt-1 text-xs text-light-500">Click on the map to create filters</p>
132
125
  </div>
126
+ </div>
133
127
  </div>
134
128
  <div class="mt-2 flex flex-shrink-0 items-center justify-between gap-2">
135
129
  <button
@@ -139,9 +133,7 @@
139
133
  :title="hasWildcardFilter ? 'Wildcard filter already exists' : 'Add wildcard filter'">
140
134
  * Wildcard
141
135
  </button>
142
- <button
143
- @click="ui.toggleModal('preview-filter')"
144
- class="filter-action-btn">
136
+ <button @click="ui.toggleModal('preview-filter')" class="filter-action-btn">
145
137
  <CameraIcon class="h-3 w-3" />
146
138
  <span>JSON</span>
147
139
  </button>
@@ -241,6 +233,10 @@ const updateShownVenue = async () => {
241
233
  if (eventId.value.length === 16) {
242
234
  // 16-char eventIds are global, but try current country first as fallback
243
235
  country = ui.currentCountry?.id || null;
236
+ // For TM module, convert "US" to "USA"
237
+ if (ui.currentModule === "TM" && country === "US") {
238
+ country = "USA";
239
+ }
244
240
  } else if (eventId.value.length > 0) {
245
241
  // Shorter eventIds need country specification
246
242
  country = ui.currentCountry?.id;
@@ -248,6 +244,10 @@ const updateShownVenue = async () => {
248
244
  ui.showError("Invalid eventId or missing country!");
249
245
  return;
250
246
  }
247
+ // For TM module, convert "US" to "USA"
248
+ if (ui.currentModule === "TM" && country === "US") {
249
+ country = "USA";
250
+ }
251
251
  } else {
252
252
  ui.showError("Event ID is required!");
253
253
  return;