@mixd-id/web-scaffold 0.1.240411064 → 0.1.240411066

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.240411064",
4
+ "version": "0.1.240411066",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -389,12 +389,18 @@ export default{
389
389
  this.preset.columns = JSON.parse(JSON.stringify(this.cConfig.columns))
390
390
  }
391
391
 
392
+ let search = this.preset.search
393
+ if(this.preset.search && this.preset.params.searchPrefix){
394
+ search = this.preset.params.searchPrefix + this.preset.search
395
+ }
396
+
392
397
  this.readyState = 2
393
398
  return this.useSocket().send(this.computedSrc, {
394
399
  ...this.preset,
395
400
  id: undefined,
396
401
  uid: undefined,
397
402
  itemsPerPage: this.data.itemsPerPage,
403
+ search
398
404
  })
399
405
  .then(data => {
400
406
  if(data?.items){
@@ -416,6 +422,11 @@ export default{
416
422
  !(this.preset.pivot ?? {}).enabled &&
417
423
  this.dataItems) {
418
424
 
425
+ let search = this.preset.search
426
+ if(this.preset.search && this.preset.params.searchPrefix){
427
+ search = this.preset.params.searchPrefix + this.preset.search
428
+ }
429
+
419
430
  const afterItem = this.dataItems[this.dataItems.length - 1]
420
431
 
421
432
  this.readyState = 4
@@ -424,6 +435,7 @@ export default{
424
435
  id: undefined,
425
436
  uid: undefined,
426
437
  itemsPerPage: this.data.itemsPerPage,
438
+ search,
427
439
  afterItem,
428
440
  })
429
441
  .then(data => {
@@ -452,8 +464,10 @@ export default{
452
464
  Object.assign(this.cConfig, defaultConfig)
453
465
  }
454
466
 
455
- if(this.$route.query?.search)
467
+ if(this.$route.query?.search){
456
468
  this.preset.search = this.$route.query.search
469
+ delete this.preset.params.searchPrefix
470
+ }
457
471
  }
458
472
  }
459
473
  else{
@@ -539,6 +553,11 @@ export default{
539
553
  loadExt(){
540
554
  if(!this.extBar.open) return
541
555
 
556
+ let search = this.preset.search
557
+ if(this.preset.search && this.preset.params.searchPrefix){
558
+ search = this.preset.params.searchPrefix + this.preset.search
559
+ }
560
+
542
561
  this.readyState = 3
543
562
  return this.useSocket().send(this.computedSrc, {
544
563
  ...this.preset,
@@ -548,7 +567,8 @@ export default{
548
567
  ...(this.preset.filters ?? []),
549
568
  ...(this.extBar.filters ?? [])
550
569
  ],
551
- pivot: null
570
+ pivot: null,
571
+ search
552
572
  })
553
573
  .then((res) => {
554
574
  this.data.extItems = res.items
@@ -559,6 +579,11 @@ export default{
559
579
  loadExtNext(){
560
580
  if(!this.preset.filters) return
561
581
 
582
+ let search = this.preset.search
583
+ if(this.preset.search && this.preset.params.searchPrefix){
584
+ search = this.preset.params.searchPrefix + this.preset.search
585
+ }
586
+
562
587
  return this.useSocket().send(this.computedSrc, {
563
588
  ...this.preset,
564
589
  id: undefined,
@@ -569,6 +594,7 @@ export default{
569
594
  ],
570
595
  pivot: null,
571
596
  afterItem: this.data.extItems[this.data.extItems.length - 1],
597
+ search
572
598
  })
573
599
  .then(data => {
574
600
  this.data.extItems.push(...data.items)
@@ -650,12 +676,18 @@ export default{
650
676
  loadQueued(items){
651
677
  const key = items[0] && items[0].uid ? 'uid' : 'id'
652
678
 
679
+ let search = this.preset.search
680
+ if(this.preset.search && this.preset.params.searchPrefix){
681
+ search = this.preset.params.searchPrefix + this.preset.search
682
+ }
683
+
653
684
  this.useSocket().send(this.computedSrc, {
654
685
  ...this.preset,
655
686
  id: undefined,
656
687
  uid: undefined,
657
688
  [key]: items.map(item => item[key]),
658
- _signal: true
689
+ _signal: true,
690
+ search
659
691
  })
660
692
  .then(({ items:nextItems }) => {
661
693
 
@@ -1038,8 +1070,10 @@ export default{
1038
1070
  this.configSharedPresets.find(_ => _.uid === this.configParams.presetIdx)
1039
1071
 
1040
1072
  if(preset){
1041
- if(this.$route.query?.search)
1073
+ if(this.$route.query?.search){
1042
1074
  preset.search = this.$route.query.search
1075
+ delete preset.params.searchPrefix
1076
+ }
1043
1077
  }
1044
1078
 
1045
1079
  return preset
@@ -183,7 +183,6 @@ const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
183
183
  },
184
184
  '.menu-item:hover': {
185
185
  background: 'rgb(var(--primary-500))',
186
- 'border-radius': '4px',
187
186
  fill: '#fff',
188
187
  color: '#fff'
189
188
  },