sprintify-ui 0.0.78 → 0.0.80

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.
@@ -132,7 +132,9 @@ declare const _default: {
132
132
  onCheck?: ((...args: any[]) => any) | undefined;
133
133
  "onUpdate:query"?: ((...args: any[]) => any) | undefined;
134
134
  }, {
135
- fetch: (force?: boolean) => void;
135
+ fetch: (force?: boolean, showLoading?: boolean) => void;
136
+ fetchWithLoading: (force?: boolean) => void;
137
+ fetchWithoutLoading: (force?: boolean) => void;
136
138
  scrollIntoView: () => void;
137
139
  query: Ref<DataTableQuery>;
138
140
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "delete" | "checkAll" | "update:checked-rows" | "check" | "update:query")[], string, {
@@ -215,7 +217,9 @@ declare const _default: {
215
217
  onCheck?: ((...args: any[]) => any) | undefined;
216
218
  "onUpdate:query"?: ((...args: any[]) => any) | undefined;
217
219
  } & import("vue").ShallowUnwrapRef<{
218
- fetch: (force?: boolean) => void;
220
+ fetch: (force?: boolean, showLoading?: boolean) => void;
221
+ fetchWithLoading: (force?: boolean) => void;
222
+ fetchWithoutLoading: (force?: boolean) => void;
219
223
  scrollIntoView: () => void;
220
224
  query: Ref<DataTableQuery>;
221
225
  }> & {} & import("vue").ComponentCustomProperties & {};
@@ -276,7 +280,9 @@ declare const _default: {
276
280
  onCheck?: ((...args: any[]) => any) | undefined;
277
281
  "onUpdate:query"?: ((...args: any[]) => any) | undefined;
278
282
  }, {
279
- fetch: (force?: boolean) => void;
283
+ fetch: (force?: boolean, showLoading?: boolean) => void;
284
+ fetchWithLoading: (force?: boolean) => void;
285
+ fetchWithoutLoading: (force?: boolean) => void;
280
286
  scrollIntoView: () => void;
281
287
  query: Ref<DataTableQuery>;
282
288
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "delete" | "checkAll" | "update:checked-rows" | "check" | "update:query")[], "click" | "delete" | "checkAll" | "update:checked-rows" | "check" | "update:query", {
@@ -300,6 +300,7 @@ declare const _default: {
300
300
  "onCell-click"?: ((...args: any[]) => any) | undefined;
301
301
  }, {
302
302
  fetch: () => void;
303
+ fetchWithoutLoading: () => void;
303
304
  query: import("vue").ComputedRef<DataTableQuery | null>;
304
305
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "checkAll" | "update:checked-rows" | "check" | "cell-click")[], string, {
305
306
  actions: MenuItemInterface[];
@@ -472,6 +473,7 @@ declare const _default: {
472
473
  "onCell-click"?: ((...args: any[]) => any) | undefined;
473
474
  } & import("vue").ShallowUnwrapRef<{
474
475
  fetch: () => void;
476
+ fetchWithoutLoading: () => void;
475
477
  query: import("vue").ComputedRef<DataTableQuery | null>;
476
478
  }> & {} & import("vue").ComponentCustomProperties & {};
477
479
  __isFragment?: undefined;
@@ -610,6 +612,7 @@ declare const _default: {
610
612
  "onCell-click"?: ((...args: any[]) => any) | undefined;
611
613
  }, {
612
614
  fetch: () => void;
615
+ fetchWithoutLoading: () => void;
613
616
  query: import("vue").ComputedRef<DataTableQuery | null>;
614
617
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "checkAll" | "update:checked-rows" | "check" | "cell-click")[], "delete" | "checkAll" | "update:checked-rows" | "check" | "cell-click", {
615
618
  actions: MenuItemInterface[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -519,7 +519,15 @@ function onRouteChange() {
519
519
  |--------------------------------------------------------------------------
520
520
  */
521
521
 
522
- function fetch(force = false) {
522
+ function fetchWithLoading(force = false) {
523
+ fetch(force, true);
524
+ }
525
+
526
+ function fetchWithoutLoading(force = false) {
527
+ fetch(force, false);
528
+ }
529
+
530
+ function fetch(force = false, showLoading = true) {
523
531
  const urlSplit = url.value.split(/[?#]/);
524
532
 
525
533
  const baseUrl = urlSplit[0];
@@ -540,7 +548,10 @@ function fetch(force = false) {
540
548
  return;
541
549
  }
542
550
 
543
- loading.value = true;
551
+ if (showLoading) {
552
+ loading.value = true;
553
+ }
554
+
544
555
  lastUrl = fullUrl;
545
556
 
546
557
  http
@@ -685,6 +696,8 @@ onMounted(() => {
685
696
 
686
697
  defineExpose({
687
698
  fetch,
699
+ fetchWithLoading,
700
+ fetchWithoutLoading,
688
701
  scrollIntoView,
689
702
  query,
690
703
  });
@@ -485,12 +485,21 @@ function fetch() {
485
485
  dataIterator.value.fetch(true);
486
486
  }
487
487
 
488
+ function fetchWithoutLoading() {
489
+ if (!dataIterator.value) {
490
+ return;
491
+ }
492
+ // Refetch even if URL is the same
493
+ dataIterator.value.fetchWithLoading(true);
494
+ }
495
+
488
496
  const dataIteratorQuery = computed((): DataTableQuery | null => {
489
497
  return dataIterator.value?.query ?? null;
490
498
  });
491
499
 
492
500
  defineExpose({
493
501
  fetch,
502
+ fetchWithoutLoading,
494
503
  query: dataIteratorQuery,
495
504
  });
496
505
  </script>
@@ -3,7 +3,7 @@
3
3
  <button ref="button" type="button" @click="toggle()">
4
4
  <slot name="button"></slot>
5
5
  </button>
6
- <div ref="dropdown">
6
+ <div ref="dropdown" class="z-menu">
7
7
  <Transition
8
8
  :enter-active-class="
9
9
  animated ? 'duration-100 transition ease-out' : ''