sprintify-ui 0.0.128 → 0.0.129

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.
@@ -11344,8 +11344,8 @@ function yo(e, o, r, n) {
11344
11344
  var mv = {
11345
11345
  serialize: yo
11346
11346
  }, Rr = /* @__PURE__ */ ((e) => (e.post = "post", e.patch = "patch", e))(Rr || {}), go = /* @__PURE__ */ ((e) => (e.json = "json", e.formData = "formData", e))(go || {});
11347
- const yv = { class: "absolute inset-0 flex items-center justify-center w-full h-full" }, gv = /* @__PURE__ */ R("svg", {
11348
- class: "relative w-6 h-6 text-blue-600 animate-spin",
11347
+ const yv = { class: "absolute inset-0 flex h-full w-full items-center justify-center" }, gv = /* @__PURE__ */ R("svg", {
11348
+ class: "relative h-6 w-6 animate-spin text-blue-600",
11349
11349
  viewBox: "0 0 24 24"
11350
11350
  }, [
11351
11351
  /* @__PURE__ */ R("path", {
@@ -11399,6 +11399,10 @@ const yv = { class: "absolute inset-0 flex items-center justify-center w-full h-
11399
11399
  showNotificationOnError: {
11400
11400
  default: !0,
11401
11401
  type: Boolean
11402
+ },
11403
+ showNotificationOnSuccess: {
11404
+ default: !0,
11405
+ type: Boolean
11402
11406
  }
11403
11407
  },
11404
11408
  emits: ["error", "success"],
@@ -11452,7 +11456,7 @@ const yv = { class: "absolute inset-0 flex items-center justify-center w-full h-
11452
11456
  const _ = S.data.message ?? "";
11453
11457
  if (!_)
11454
11458
  return;
11455
- i.push({
11459
+ n.showNotificationOnSuccess && i.push({
11456
11460
  color: "success",
11457
11461
  title: l.t("sui.success"),
11458
11462
  text: _
@@ -11509,7 +11513,7 @@ const yv = { class: "absolute inset-0 flex items-center justify-center w-full h-
11509
11513
  $(u) ? ke(S.$slots, "loading", { key: 0 }, () => [
11510
11514
  R("div", yv, [
11511
11515
  R("div", {
11512
- class: ce(["absolute inset-0 w-full h-full opacity-80", e.loadingMaskClass])
11516
+ class: ce(["absolute inset-0 h-full w-full opacity-80", e.loadingMaskClass])
11513
11517
  }, null, 2),
11514
11518
  gv
11515
11519
  ])
@@ -44,6 +44,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
44
44
  default: boolean;
45
45
  type: BooleanConstructor;
46
46
  };
47
+ showNotificationOnSuccess: {
48
+ default: boolean;
49
+ type: BooleanConstructor;
50
+ };
47
51
  }, {
48
52
  submit: () => void;
49
53
  errors: Ref<Record<string, string[]>>;
@@ -94,6 +98,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
94
98
  default: boolean;
95
99
  type: BooleanConstructor;
96
100
  };
101
+ showNotificationOnSuccess: {
102
+ default: boolean;
103
+ type: BooleanConstructor;
104
+ };
97
105
  }>> & {
98
106
  onError?: ((...args: any[]) => any) | undefined;
99
107
  onSuccess?: ((...args: any[]) => any) | undefined;
@@ -105,6 +113,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
105
113
  errorHandler: (error: AxiosError) => void;
106
114
  loadingMaskClass: string;
107
115
  showNotificationOnError: boolean;
116
+ showNotificationOnSuccess: boolean;
108
117
  }>, {
109
118
  default: (_: {
110
119
  errors: Record<string, string[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.0.128",
3
+ "version": "0.0.129",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -17,14 +17,14 @@
17
17
  >
18
18
  <slot v-if="loading" name="loading">
19
19
  <div
20
- class="absolute inset-0 flex items-center justify-center w-full h-full"
20
+ class="absolute inset-0 flex h-full w-full items-center justify-center"
21
21
  >
22
22
  <div
23
- class="absolute inset-0 w-full h-full opacity-80"
23
+ class="absolute inset-0 h-full w-full opacity-80"
24
24
  :class="loadingMaskClass"
25
25
  />
26
26
  <svg
27
- class="relative w-6 h-6 text-blue-600 animate-spin"
27
+ class="relative h-6 w-6 animate-spin text-blue-600"
28
28
  viewBox="0 0 24 24"
29
29
  >
30
30
  <path
@@ -101,6 +101,10 @@ const props = defineProps({
101
101
  default: true,
102
102
  type: Boolean,
103
103
  },
104
+ showNotificationOnSuccess: {
105
+ default: true,
106
+ type: Boolean,
107
+ },
104
108
  });
105
109
 
106
110
  const i18n = useI18n();
@@ -242,11 +246,13 @@ function successHandler(response: AxiosResponse<any, any>) {
242
246
  return;
243
247
  }
244
248
 
245
- notifications.push({
246
- color: 'success',
247
- title: i18n.t('sui.success'),
248
- text: message,
249
- });
249
+ if (props.showNotificationOnSuccess) {
250
+ notifications.push({
251
+ color: 'success',
252
+ title: i18n.t('sui.success'),
253
+ text: message,
254
+ });
255
+ }
250
256
  }
251
257
  }
252
258