@mixd-id/web-scaffold 0.1.230406257 → 0.1.230406259

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.230406257",
4
+ "version": "0.1.230406259",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -306,7 +306,7 @@ export default {
306
306
 
307
307
  .contextMenu{
308
308
  @apply fixed z-20 panel-500 min-w-[150px] overflow-y-auto rounded-xl;
309
- @apply border-[2px] border-text-50 shadow-2xl whitespace-nowrap;
309
+ @apply border-[2px] border-text-200 shadow-2xl whitespace-nowrap;
310
310
  transition: all 150ms cubic-bezier(0.25, 1, 0.5, 1);
311
311
  opacity: 0;
312
312
  }
@@ -19,15 +19,15 @@
19
19
  <div class="flex-1 flex flex-col gap-1 pl-2 border-l-[1px] border-text-100 divide-y divide-text-100">
20
20
  <div v-for="(range, i) in val.value" class="flex flex-row">
21
21
  <div class="flex-1 flex flex-row">
22
- <input type="time" v-model="val.value[i][0]">
22
+ <input type="time" v-model="val.value[i][0]" @blur="updateModelValue()">
23
23
  <div class="py-2">-</div>
24
- <input type="time" v-model="val.value[i][1]">
24
+ <input type="time" v-model="val.value[i][1]" @blur="updateModelValue()">
25
25
  </div>
26
26
  <div class="p-2 flex flex-row gap-2">
27
- <button v-if="val.value.length > 1" type="button" @click="val.value.splice(i, 1)">
27
+ <button v-if="val.value.length > 1" type="button" @click="val.value.splice(i, 1);updateModelValue()">
28
28
  <svg width="14" height="14" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M140 274c-6.6 0-12-5.4-12-12v-12c0-6.6 5.4-12 12-12h232c6.6 0 12 5.4 12 12v12c0 6.6-5.4 12-12 12H140zm364-18c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-32 0c0-119.9-97.3-216-216-216-119.9 0-216 97.3-216 216 0 119.9 97.3 216 216 216 119.9 0 216-97.3 216-216z"/></svg>
29
29
  </button>
30
- <button type="button" @click="val.value.push([ '00:00', '23:59' ])">
30
+ <button type="button" @click="val.value.push([ '00:00', '23:59' ]);updateModelValue()">
31
31
  <svg width="14" height="14" class="fill-text-300 hover:fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M443.5 248.5l-7.1-7.1c-4.7-4.7-12.3-4.7-17 0L241 419.9V44c0-6.6-5.4-12-12-12h-10c-6.6 0-12 5.4-12 12v375.9L28.5 241.4c-4.7-4.7-12.3-4.7-17 0l-7.1 7.1c-4.7 4.7-4.7 12.3 0 17l211 211.1c4.7 4.7 12.3 4.7 17 0l211-211.1c4.8-4.8 4.8-12.3.1-17z"/></svg>
32
32
  </button>
33
33
  </div>
@@ -78,8 +78,6 @@ export default{
78
78
  modelValue[val.key] = val.value
79
79
  })
80
80
 
81
- console.log(modelValue)
82
-
83
81
  this.$emit('update:modelValue', modelValue)
84
82
  this.$emit('change', modelValue)
85
83
  },
@@ -85,7 +85,7 @@
85
85
 
86
86
  <VirtualTable v-if="presetView === 'table'"
87
87
  :columns="columns"
88
- class="flex-1 rounded-lg"
88
+ class="flex-1 rounded-lg panel-400"
89
89
  :items="data.items"
90
90
  @scroll-end="loadNext">
91
91
 
@@ -1,11 +1,12 @@
1
1
  <template>
2
2
  <div :class="computedClass">
3
3
  <button v-for="(item, index) in filteredItems" :class="tabClass(item)"
4
+ class=" whitespace-nowrap text-ellipsis overflow-hidden"
4
5
  @click="onClick(item)" type="button" >
5
6
  <slot name="default" :="{ item, index }">
6
- <div class="px-2">
7
+ <label class="px-1">
7
8
  {{ item.text }}
8
- </div>
9
+ </label>
9
10
  </slot>
10
11
  </button>
11
12
  </div>
@@ -2,7 +2,7 @@
2
2
  <div :class="$style.comp">
3
3
 
4
4
  <div class="flex flex-row items-start">
5
- <p contenteditable="true" spellcheck="false" class="flex-1" ref="html" v-html="html" @input="onInput"></p>
5
+ <p contenteditable="true" spellcheck="false" class="flex-1 whitespace-pre-line" ref="html" v-html="html" @input="onInput"></p>
6
6
 
7
7
  <button v-if="variant === 'minimal'" type="button" class="p-3" @click="$refs.modal.open()">
8
8
  <svg width="14" height="14" class="fill-text-300 hover:fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg>
@@ -136,14 +136,20 @@ export default{
136
136
 
137
137
  const arr = []
138
138
  for(let i = 0 ; i < this.$refs.html.childNodes.length ; i++){
139
- if(this.$refs.html.childNodes[i].nodeType === 3){
139
+ if(this.$refs.html.childNodes[i].nodeType === 1 && this.$refs.html.childNodes[i].classList.contains(this.$style.tag)){
140
+ arr.push(this.$refs.html.childNodes[i].getAttribute('data-value'))
141
+ }
142
+ else if(this.$refs.html.childNodes[i].nodeType === 3){
140
143
  arr.push(this.$refs.html.childNodes[i].textContent)
141
144
  }
142
- else if(this.$refs.html.childNodes[i].nodeType === 1 && this.$refs.html.childNodes[i].classList.contains(this.$style.tag)){
143
- arr.push(this.$refs.html.childNodes[i].getAttribute('data-value'))
145
+ else{
146
+ arr.push((arr.length > 0 ? "\n\n" : '') + this.$refs.html.childNodes[i].innerText)
144
147
  }
145
148
  }
146
- this.$emit('update:modelValue', arr.join(''))
149
+
150
+ const text = arr.filter(_ => _).join('')
151
+
152
+ this.$emit('update:modelValue', text)
147
153
 
148
154
  this.isInternal = true
149
155
  }
@@ -272,8 +272,9 @@ export default{
272
272
  }
273
273
 
274
274
  .calc{
275
- @apply absolute invisible;
275
+ @apply absolute invisible max-w-full;
276
276
  top: -10000px;
277
+
277
278
  }
278
279
 
279
280
  </style>
@@ -431,7 +431,7 @@ export default{
431
431
 
432
432
  .comp{
433
433
  @apply flex flex-col overflow-hidden bg-base-500;
434
- @apply border-[1px] border-text-200 rounded-sm;
434
+ @apply border-[1px] border-text-50 rounded-sm;
435
435
  }
436
436
 
437
437
  .comp>*:last-child{
@@ -439,7 +439,7 @@ export default{
439
439
  }
440
440
 
441
441
  .header{
442
- @apply border-b-[1px] border-text-200;
442
+ @apply border-b-[1px] border-text-50;
443
443
  }
444
444
 
445
445
  .headerCol{
@@ -460,7 +460,7 @@ export default{
460
460
  }
461
461
 
462
462
  .calc{
463
- @apply absolute top-[-100vh] invisible;
463
+ @apply absolute top-[-100vh] invisible max-w-full;
464
464
  }
465
465
 
466
466
  .table{
@@ -476,7 +476,7 @@ export default{
476
476
  }
477
477
 
478
478
  .table tbody td{
479
- @apply border-b-[1px] border-text-200;
479
+ @apply border-b-[1px] border-text-50;
480
480
  }
481
481
  .table tbody td:nth-child(odd){
482
482
  }
@@ -498,11 +498,11 @@ export default{
498
498
  }
499
499
 
500
500
  .separator{
501
- @apply w-[5px] absolute top-0 bottom-0 right-0 cursor-e-resize border-text-200;
501
+ @apply w-[5px] absolute top-0 bottom-0 right-0 cursor-e-resize border-text-50;
502
502
  @apply border-r-[1px];
503
503
  }
504
504
  .table th:hover .separator{
505
- @apply border-text-100;
505
+ @apply border-text-50;
506
506
  }
507
507
 
508
508
  .spacer{
@@ -22,9 +22,9 @@ const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
22
22
  '--base-500': '255, 255, 255',
23
23
  '--base': '255, 255, 255',
24
24
 
25
- "--text-50": '220, 220, 220',
26
- "--text-100": '210, 210, 210',
27
- "--text-200": '201, 201, 201',
25
+ "--text-50": '224, 224, 224',
26
+ "--text-100": '218, 218, 218',
27
+ "--text-200": '212, 212, 212',
28
28
  "--text-300": '191, 191, 191',
29
29
  "--text-400": '116, 116, 116',
30
30
  "--text-500": '86, 86, 86',
@@ -70,7 +70,7 @@ const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
70
70
  "--base-50": '22, 26, 33',
71
71
  "--base-300": '0, 0, 0',
72
72
  "--base-400": '17, 21, 28',
73
- "--base-500": '27, 31, 38',
73
+ "--base-500": '22, 26, 33',
74
74
  "--base": '22, 26, 33',
75
75
 
76
76
  "--text-50": '33, 39, 46',
@@ -798,7 +798,7 @@ const sortsToSequelizeWhere = async (sorts, opt) => {
798
798
  order.push([ 'id', (order[0] ?? [])[1] ?? 'desc' ])
799
799
  }
800
800
 
801
- console.log(util.inspect(sorts, false, null, true /* enable colors */))
801
+ //console.log(util.inspect(sorts, false, null, true /* enable colors */))
802
802
 
803
803
  return {
804
804
  order