@mixd-id/web-scaffold 0.1.240411069 → 0.1.240411071

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.240411069",
4
+ "version": "0.1.240411071",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -74,6 +74,8 @@ export default{
74
74
 
75
75
  target: String,
76
76
 
77
+ targetType: String,
78
+
77
79
  defaultSrc: {
78
80
  type: String,
79
81
  default: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMS4xNTkyIDIxLjA4MjhDMjEuNjc5OCAyMC41NDMyIDIyIDE5LjgwOSAyMiAxOVY1QzIyIDMuMzQzMTUgMjAuNjU2OSAyIDE5IDJINUMzLjM0MzE1IDIgMiAzLjM0MzE1IDIgNVYxOUMyIDIwLjY1NjkgMy4zNDMxNSAyMiA1IDIySDE5QzE5LjI5NjIgMjIgMTkuNTgyMyAyMS45NTcxIDE5Ljg1MjUgMjEuODc3MUMxOS44NjU4IDIxLjg3MzIgMTkuODc5IDIxLjg2OTIgMTkuODkyMSAyMS44NjUxQzIwLjI1ODYgMjEuNzUxMSAyMC41OTUgMjEuNTY4NyAyMC44ODYzIDIxLjMzMjlDMjAuODkzNyAyMS4zMjY5IDIwLjkwMSAyMS4zMjEgMjAuOTA4MyAyMS4zMTQ5QzIwLjk4MjQgMjEuMjUzOCAyMS4wNTM1IDIxLjE4OTIgMjEuMTIxMyAyMS4xMjEzQzIxLjEzNDEgMjEuMTA4NiAyMS4xNDY3IDIxLjA5NTcgMjEuMTU5MiAyMS4wODI4Wk0xOSAzLjVINUM0LjE3MTU3IDMuNSAzLjUgNC4xNzE1NyAzLjUgNVYxMi43TDYuMDUyOTIgOS42MzY0OUM3LjIxNTY2IDguMjQxMjEgOS4zNDE3NyA4LjE5MTAyIDEwLjU2OSA5LjUyOTg3TDIwLjE0MTggMTkuOTcyOEMyMC4zNjUyIDE5LjcxMDkgMjAuNSAxOS4zNzEyIDIwLjUgMTlWNUMyMC41IDQuMTcxNTcgMTkuODI4NCAzLjUgMTkgMy41Wk01IDIwLjVDNC4xNzE1NyAyMC41IDMuNSAxOS44Mjg0IDMuNSAxOVYxNS4wNDMxTDcuMjA1MjYgMTAuNTk2OEM3LjcxMzk1IDkuOTg2MzMgOC41OTE0NCA5Ljg5MDgxIDkuMjEzOTUgMTAuMzI0OUM5LjIxOTUxIDEwLjMyODggOS4yMjUwNSAxMC4zMzI3IDkuMjMwNTcgMTAuMzM2N0M5LjMxMzMyIDEwLjM5NjEgOS4zOTE0MSAxMC40NjUgOS40NjMzMiAxMC41NDM1TDE4LjU5MDEgMjAuNUg1WiIgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iLjA4Ii8+CjxjaXJjbGUgY3g9IjE3IiBjeT0iNyIgcj0iMS4yNSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLW9wYWNpdHk9Ii4wOCIgc3Ryb2tlLXdpZHRoPSIxLjUiLz4KPC9zdmc+Cg=="
@@ -211,7 +213,16 @@ export default{
211
213
 
212
214
  onClick(e){
213
215
  if(!this.moved && this.target){
214
- this.$router.push(this.target)
216
+
217
+ switch(this.targetType){
218
+
219
+ case 'url':
220
+ window.location = this.target
221
+ break
222
+
223
+ default:
224
+ this.$router.push(this.target)
225
+ }
215
226
  }
216
227
 
217
228
  this.$emit('click', e, this)
@@ -390,7 +390,7 @@ export default{
390
390
  }
391
391
 
392
392
  let search = this.preset.search
393
- if(this.preset.search && this.preset.params.searchPrefix){
393
+ if(this.preset.search && this.preset.params?.searchPrefix){
394
394
  search = this.preset.params.searchPrefix + this.preset.search
395
395
  }
396
396
 
@@ -423,7 +423,7 @@ export default{
423
423
  this.dataItems) {
424
424
 
425
425
  let search = this.preset.search
426
- if(this.preset.search && this.preset.params.searchPrefix){
426
+ if(this.preset.search && this.preset.params?.searchPrefix){
427
427
  search = this.preset.params.searchPrefix + this.preset.search
428
428
  }
429
429
 
@@ -554,7 +554,7 @@ export default{
554
554
  if(!this.extBar.open) return
555
555
 
556
556
  let search = this.preset.search
557
- if(this.preset.search && this.preset.params.searchPrefix){
557
+ if(this.preset.search && this.preset.params?.searchPrefix){
558
558
  search = this.preset.params.searchPrefix + this.preset.search
559
559
  }
560
560
 
@@ -580,7 +580,7 @@ export default{
580
580
  if(!this.preset.filters) return
581
581
 
582
582
  let search = this.preset.search
583
- if(this.preset.search && this.preset.params.searchPrefix){
583
+ if(this.preset.search && this.preset.params?.searchPrefix){
584
584
  search = this.preset.params.searchPrefix + this.preset.search
585
585
  }
586
586
 
@@ -677,7 +677,7 @@ export default{
677
677
  const key = items[0] && items[0].uid ? 'uid' : 'id'
678
678
 
679
679
  let search = this.preset.search
680
- if(this.preset.search && this.preset.params.searchPrefix){
680
+ if(this.preset.search && this.preset.params?.searchPrefix){
681
681
  search = this.preset.params.searchPrefix + this.preset.search
682
682
  }
683
683
 
@@ -1072,7 +1072,8 @@ export default{
1072
1072
  if(preset){
1073
1073
  if(this.$route.query?.search){
1074
1074
  preset.search = this.$route.query.search
1075
- delete preset.params.searchPrefix
1075
+ if(preset.params)
1076
+ delete preset.params.searchPrefix
1076
1077
  }
1077
1078
  }
1078
1079
 
@@ -23,9 +23,18 @@
23
23
  </div>
24
24
  </div>
25
25
 
26
- <div>
27
- <small class="flex-1 text-text-400">Target</small>
28
- <Textbox v-model="item.props.target" @keyup.enter="apply"/>
26
+ <div class="flex flex-row gap-3">
27
+ <div class="w-[80px]">
28
+ <small class="flex-1 text-text-400">Tipe</small>
29
+ <Dropdown v-model="item.props.targetType">
30
+ <option value="route">Route</option>
31
+ <option value="url">URL</option>
32
+ </Dropdown>
33
+ </div>
34
+ <div class="flex-1">
35
+ <small class="flex-1 text-text-400">Target</small>
36
+ <Textbox v-model="item.props.target" @keyup.enter="apply"/>
37
+ </div>
29
38
  </div>
30
39
 
31
40
  <div>