@mixd-id/web-scaffold 0.1.230406255 → 0.1.230406256

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": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406255",
4
+ "version": "0.1.230406256",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -65,7 +65,8 @@ export default {
65
65
  computedStyle: null,
66
66
  isOpen: false,
67
67
  context: null,
68
- closing: false
68
+ closing: false,
69
+ currentCaller: null
69
70
  }
70
71
  },
71
72
 
@@ -114,7 +115,8 @@ export default {
114
115
 
115
116
  open(caller, context){
116
117
 
117
- if(this.isOpen){
118
+ const originalCaller = caller
119
+ if(this.isOpen && this.currentCaller !== caller){
118
120
  return this.close(() => {
119
121
  window.setTimeout(() => {
120
122
  this.open(caller, context)
@@ -126,7 +128,7 @@ export default {
126
128
  this.isOpen = true
127
129
  }
128
130
 
129
- caller = caller ?? this.caller
131
+ caller = caller ?? this.caller
130
132
 
131
133
  if(caller){
132
134
 
@@ -248,6 +250,8 @@ export default {
248
250
  this.onOpen()
249
251
  })
250
252
  }
253
+
254
+ this.currentCaller = originalCaller
251
255
  }
252
256
  else{
253
257
  console.error('Undefined caller for context menu')
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <Modal :state="isOpen" width="480" height="560">
3
3
  <template v-slot:head>
4
- <div class="relative p-5">
5
- <div v-if="step !== 3">
4
+ <div class="relative flex flex-row">
5
+ <div v-if="step !== 3" class="flex-1 p-6 leading-relaxed">
6
6
  <h3>{{ title }}</h3>
7
7
  <slot v-if="step === 1 && 'description' in $slots" name="description"></slot>
8
8
  <p v-else-if="step === 1" class="mt-1 text-text-400" v-html="description"></p>
9
9
  <slot v-else-if="step === 2 && 'description2' in $slots" name="description2"></slot>
10
10
  <p v-else-if="step === 2" class="mt-1 text-text-400" v-html="description2"></p>
11
11
  </div>
12
- <div class="absolute top-0 right-0 p-2">
12
+ <div class="p-2 pl-0">
13
13
  <button type="button" class="p-2" @click="isOpen = false">
14
14
  <svg width="24" height="24" viewBox="0 0 24 24" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg">
15
15
  <path d="M6.53034 5.46965C6.23745 5.17676 5.76257 5.17676 5.46968 5.46965C5.17679 5.76255 5.17679 6.23742 5.46968 6.53031L10.9393 12L5.46967 17.4697C5.17678 17.7626 5.17678 18.2374 5.46967 18.5303C5.76256 18.8232 6.23744 18.8232 6.53033 18.5303L12 13.0606L17.4697 18.5303C17.7626 18.8232 18.2375 18.8232 18.5303 18.5303C18.8232 18.2374 18.8232 17.7626 18.5303 17.4697L13.0607 12L18.5303 6.53032C18.8232 6.23743 18.8232 5.76256 18.5303 5.46966C18.2374 5.17677 17.7626 5.17677 17.4697 5.46966L12 10.9393L6.53034 5.46965Z"/>
@@ -344,7 +344,7 @@ export default{
344
344
  id: items.map(item => item.id)
345
345
  })
346
346
  .then(({ items:nextItems }) => {
347
- nextItems.forEach(item => this.$util.push(this.data.items, item))
347
+ nextItems.forEach(item => this.$util.unshift(this.data.items, item))
348
348
  const destroyedItems = items.filter(_ => !nextItems.find(i => i.id === _.id))
349
349
  this.$util.remove(this.data.items, destroyedItems)
350
350
  })
@@ -133,7 +133,7 @@
133
133
  ref="table1"
134
134
  :columns="presetColumns"
135
135
  :items="items"
136
- class="flex-1 bg-base-500 dark:bg-base-400"
136
+ class="flex-1 panel-400"
137
137
  @scroll-end="loadNext">
138
138
  <template v-for="column in presetColumns" #[colOf(column.key)]="{}">
139
139
  <div :class="getHeader(column)" @click="openColumnOptions(column.key, $event.target.closest('.' + $style.header))">