@duxweb/dvha-core 1.1.30 → 1.1.31

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.
Files changed (159) hide show
  1. package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -0
  2. package/dist/cjs/components/auth/can.cjs +1 -1
  3. package/dist/cjs/components/auth/index.cjs +1 -0
  4. package/dist/cjs/components/common/icon.cjs +1 -1
  5. package/dist/cjs/components/common/index.cjs +1 -0
  6. package/dist/cjs/components/common/logo.cjs +1 -1
  7. package/dist/cjs/components/index.cjs +1 -0
  8. package/dist/cjs/components/loader/iframe.cjs +1 -1
  9. package/dist/cjs/components/loader/index.cjs +1 -0
  10. package/dist/cjs/components/loader/loader.cjs +1 -1
  11. package/dist/cjs/components/loader/remote/index.cjs +1 -0
  12. package/dist/cjs/components/loader/remote/loader.cjs +1 -1
  13. package/dist/cjs/components/loader/remote/render.cjs +1 -1
  14. package/dist/cjs/components/overlay/index.cjs +1 -0
  15. package/dist/cjs/components/overlay/overlay.cjs +1 -1
  16. package/dist/cjs/components/status/error.cjs +1 -1
  17. package/dist/cjs/components/status/exception.cjs +1 -1
  18. package/dist/cjs/components/status/index.cjs +1 -0
  19. package/dist/cjs/components/status/notAuthorized.cjs +1 -1
  20. package/dist/cjs/components/status/notFound.cjs +1 -1
  21. package/dist/cjs/config/color.cjs +1 -1
  22. package/dist/cjs/directive/index.cjs +1 -0
  23. package/dist/cjs/directive/permission.cjs +1 -1
  24. package/dist/cjs/hooks/auth.cjs +1 -1
  25. package/dist/cjs/hooks/config.cjs +1 -1
  26. package/dist/cjs/hooks/data.cjs +1 -1
  27. package/dist/cjs/hooks/export.cjs +1 -1
  28. package/dist/cjs/hooks/exportCsv.cjs +2 -2
  29. package/dist/cjs/hooks/form.cjs +1 -1
  30. package/dist/cjs/hooks/formExtend.cjs +1 -1
  31. package/dist/cjs/hooks/formValidate.cjs +1 -1
  32. package/dist/cjs/hooks/i18n.cjs +1 -1
  33. package/dist/cjs/hooks/import.cjs +1 -1
  34. package/dist/cjs/hooks/importCsv.cjs +2 -2
  35. package/dist/cjs/hooks/index.cjs +1 -0
  36. package/dist/cjs/hooks/json/index.cjs +1 -1
  37. package/dist/cjs/hooks/json/utils/contextManager.cjs +1 -1
  38. package/dist/cjs/hooks/json/utils/expressionParser.cjs +1 -1
  39. package/dist/cjs/hooks/json/vFor.cjs +1 -1
  40. package/dist/cjs/hooks/json/vIf.cjs +1 -1
  41. package/dist/cjs/hooks/json/vModel.cjs +1 -1
  42. package/dist/cjs/hooks/json/vOn.cjs +1 -1
  43. package/dist/cjs/hooks/json/vShow.cjs +1 -1
  44. package/dist/cjs/hooks/json/vText.cjs +1 -1
  45. package/dist/cjs/hooks/json.cjs +1 -1
  46. package/dist/cjs/hooks/list.cjs +1 -1
  47. package/dist/cjs/hooks/manage.cjs +1 -1
  48. package/dist/cjs/hooks/menu.cjs +1 -1
  49. package/dist/cjs/hooks/overlay.cjs +1 -1
  50. package/dist/cjs/hooks/select.cjs +1 -1
  51. package/dist/cjs/hooks/theme.cjs +4 -8
  52. package/dist/cjs/hooks/tree.cjs +1 -1
  53. package/dist/cjs/hooks/upload/index.cjs +1 -0
  54. package/dist/cjs/hooks/upload/local.cjs +1 -1
  55. package/dist/cjs/hooks/upload/s3.cjs +1 -1
  56. package/dist/cjs/hooks/upload.cjs +1 -1
  57. package/dist/cjs/index.cjs +1 -1
  58. package/dist/cjs/main.cjs +1 -1
  59. package/dist/cjs/preset/authProvider.cjs +1 -1
  60. package/dist/cjs/preset/dataProvider.cjs +1 -1
  61. package/dist/cjs/preset/i18nProvider.cjs +1 -1
  62. package/dist/cjs/preset/index.cjs +1 -0
  63. package/dist/cjs/provider/app.cjs +1 -1
  64. package/dist/cjs/provider/index.cjs +1 -0
  65. package/dist/cjs/provider/tab.cjs +1 -1
  66. package/dist/cjs/router/index.cjs +1 -0
  67. package/dist/cjs/router/route.cjs +1 -1
  68. package/dist/cjs/stores/auth.cjs +1 -1
  69. package/dist/cjs/stores/i18n.cjs +1 -1
  70. package/dist/cjs/stores/index.cjs +1 -0
  71. package/dist/cjs/stores/jsonSchema.cjs +1 -1
  72. package/dist/cjs/stores/manage.cjs +1 -1
  73. package/dist/cjs/stores/route.cjs +1 -1
  74. package/dist/cjs/stores/tab.cjs +1 -1
  75. package/dist/cjs/stores/theme.cjs +1 -1
  76. package/dist/cjs/utils/bus.cjs +1 -1
  77. package/dist/cjs/utils/index.cjs +1 -0
  78. package/dist/cjs/utils/theme.cjs +8 -8
  79. package/dist/cjs/utils/tree.cjs +1 -1
  80. package/dist/esm/_virtual/_rolldown/runtime.js +9 -0
  81. package/dist/esm/components/auth/can.js +17 -36
  82. package/dist/esm/components/auth/index.js +1 -0
  83. package/dist/esm/components/common/icon.js +16 -24
  84. package/dist/esm/components/common/index.js +2 -0
  85. package/dist/esm/components/common/logo.js +50 -49
  86. package/dist/esm/components/index.js +14 -0
  87. package/dist/esm/components/loader/iframe.js +16 -18
  88. package/dist/esm/components/loader/index.js +1 -0
  89. package/dist/esm/components/loader/loader.js +11 -40
  90. package/dist/esm/components/loader/remote/index.js +2 -0
  91. package/dist/esm/components/loader/remote/loader.js +118 -156
  92. package/dist/esm/components/loader/remote/render.js +12 -17
  93. package/dist/esm/components/overlay/index.js +1 -0
  94. package/dist/esm/components/overlay/overlay.js +54 -70
  95. package/dist/esm/components/status/error.js +7 -9
  96. package/dist/esm/components/status/exception.js +21 -37
  97. package/dist/esm/components/status/index.js +4 -0
  98. package/dist/esm/components/status/notAuthorized.js +7 -9
  99. package/dist/esm/components/status/notFound.js +7 -9
  100. package/dist/esm/config/color.js +288 -290
  101. package/dist/esm/directive/index.js +1 -0
  102. package/dist/esm/directive/permission.js +7 -27
  103. package/dist/esm/hooks/auth.js +154 -120
  104. package/dist/esm/hooks/config.js +11 -9
  105. package/dist/esm/hooks/data.js +416 -415
  106. package/dist/esm/hooks/export.js +32 -36
  107. package/dist/esm/hooks/exportCsv.js +42 -46
  108. package/dist/esm/hooks/form.js +86 -95
  109. package/dist/esm/hooks/formExtend.js +36 -40
  110. package/dist/esm/hooks/formValidate.js +22 -25
  111. package/dist/esm/hooks/i18n.js +14 -18
  112. package/dist/esm/hooks/import.js +45 -54
  113. package/dist/esm/hooks/importCsv.js +90 -83
  114. package/dist/esm/hooks/index.js +31 -0
  115. package/dist/esm/hooks/json/index.js +14 -22
  116. package/dist/esm/hooks/json/utils/contextManager.js +35 -26
  117. package/dist/esm/hooks/json/utils/expressionParser.js +100 -123
  118. package/dist/esm/hooks/json/vFor.js +50 -55
  119. package/dist/esm/hooks/json/vIf.js +17 -16
  120. package/dist/esm/hooks/json/vModel.js +96 -106
  121. package/dist/esm/hooks/json/vOn.js +30 -32
  122. package/dist/esm/hooks/json/vShow.js +20 -22
  123. package/dist/esm/hooks/json/vText.js +44 -51
  124. package/dist/esm/hooks/json.js +131 -132
  125. package/dist/esm/hooks/list.js +150 -184
  126. package/dist/esm/hooks/manage.js +25 -22
  127. package/dist/esm/hooks/menu.js +57 -61
  128. package/dist/esm/hooks/overlay.js +6 -23
  129. package/dist/esm/hooks/select.js +84 -94
  130. package/dist/esm/hooks/theme.js +289 -219
  131. package/dist/esm/hooks/tree.js +43 -47
  132. package/dist/esm/hooks/upload/index.js +2 -0
  133. package/dist/esm/hooks/upload/local.js +24 -30
  134. package/dist/esm/hooks/upload/s3.js +70 -80
  135. package/dist/esm/hooks/upload.js +256 -272
  136. package/dist/esm/index.js +150 -141
  137. package/dist/esm/main.js +24 -45
  138. package/dist/esm/preset/authProvider.js +62 -68
  139. package/dist/esm/preset/dataProvider.js +154 -180
  140. package/dist/esm/preset/i18nProvider.js +28 -30
  141. package/dist/esm/preset/index.js +3 -0
  142. package/dist/esm/provider/app.js +124 -151
  143. package/dist/esm/provider/index.js +2 -0
  144. package/dist/esm/provider/tab.js +49 -66
  145. package/dist/esm/router/index.js +1 -0
  146. package/dist/esm/router/route.js +39 -46
  147. package/dist/esm/stores/auth.js +51 -46
  148. package/dist/esm/stores/i18n.js +32 -29
  149. package/dist/esm/stores/index.js +7 -0
  150. package/dist/esm/stores/jsonSchema.js +47 -34
  151. package/dist/esm/stores/manage.js +63 -48
  152. package/dist/esm/stores/route.js +60 -56
  153. package/dist/esm/stores/tab.js +55 -60
  154. package/dist/esm/stores/theme.js +48 -55
  155. package/dist/esm/utils/bus.js +3 -5
  156. package/dist/esm/utils/index.js +3 -0
  157. package/dist/esm/utils/theme.js +110 -93
  158. package/dist/esm/utils/tree.js +28 -37
  159. package/package.json +1 -1
@@ -1,185 +1,159 @@
1
- import n from "axios";
2
- import { trim as s } from "lodash-es";
3
- function b(e) {
4
- return Object.values(e).some((r) => r instanceof File ? !0 : Array.isArray(r) ? r.some((a) => a instanceof File) : r && typeof r == "object" ? b(r) : !1);
1
+ import { trim as e } from "lodash-es";
2
+ import t from "axios";
3
+ function n(e) {
4
+ return Object.values(e).some((e) => e instanceof File ? !0 : Array.isArray(e) ? e.some((e) => e instanceof File) : e && typeof e == "object" ? n(e) : !1);
5
5
  }
6
- function m(e) {
7
- const r = new FormData(), a = (d, l = "") => {
8
- Object.entries(d).forEach(([t, c]) => {
9
- const f = l ? `${l}[${t}]` : t;
10
- c instanceof File ? r.append(f, c) : Array.isArray(c) ? c.forEach((i, k) => {
11
- i instanceof File ? r.append(`${f}[${k}]`, i) : i != null && r.append(`${f}[${k}]`, String(i));
12
- }) : c && typeof c == "object" ? a(c, f) : c != null && r.append(f, String(c));
13
- });
14
- };
15
- return a(e), r;
6
+ function r(e) {
7
+ let t = new FormData(), n = (e, r = "") => {
8
+ Object.entries(e).forEach(([e, i]) => {
9
+ let a = r ? `${r}[${e}]` : e;
10
+ i instanceof File ? t.append(a, i) : Array.isArray(i) ? i.forEach((e, n) => {
11
+ e instanceof File ? t.append(`${a}[${n}]`, e) : e != null && t.append(`${a}[${n}]`, String(e));
12
+ }) : i && typeof i == "object" ? n(i, a) : i != null && t.append(a, String(i));
13
+ });
14
+ };
15
+ return n(e), t;
16
16
  }
17
- function y(e) {
18
- const r = (a, d) => {
19
- const l = `${s(e.apiUrl, "/")}${d ? `/${s(d, "/")}` : ""}`;
20
- return a ? `${l}/${s(a || "", "/")}` : l;
21
- };
22
- return {
23
- apiUrl: r,
24
- getList: (a, d, l) => {
25
- const t = {};
26
- return a.pagination && typeof a.pagination == "object" && (t.page = a.pagination.page, t.pageSize = a.pagination.pageSize), n.get(r(a.path, d?.config.apiBasePath) || "", {
27
- params: {
28
- ...t,
29
- ...a.filters,
30
- ...a.sorters
31
- },
32
- headers: {
33
- Authorization: l?.token
34
- },
35
- ...a.meta
36
- }).then((c) => e.successCallback ? e.successCallback(c) : h(c)).catch((c) => {
37
- throw e.errorCallback ? e.errorCallback(c) : u(c);
38
- });
39
- },
40
- create: (a, d, l) => {
41
- let t = a.data;
42
- return a.data && typeof a.data == "object" && !Array.isArray(a.data) && !(a.data instanceof FormData) && b(a.data) && (t = m(a.data)), n.post(r(a.path, d?.config.apiBasePath) || "", t, {
43
- headers: {
44
- Authorization: l?.token
45
- },
46
- ...a.meta
47
- }).then((c) => e.successCallback ? e.successCallback(c) : h(c)).catch((c) => {
48
- throw e.errorCallback ? e.errorCallback(c) : u(c);
49
- });
50
- },
51
- update: (a, d, l) => {
52
- let t = a.data;
53
- return a.data && typeof a.data == "object" && !Array.isArray(a.data) && !(a.data instanceof FormData) && b(a.data) && (t = m(a.data)), n.put(r(a.id ? `${a.path}/${a.id}` : a.path, d?.config.apiBasePath) || "", t, {
54
- headers: {
55
- Authorization: l?.token
56
- },
57
- ...a.meta
58
- }).then((c) => e.successCallback ? e.successCallback(c) : h(c)).catch((c) => {
59
- throw e.errorCallback ? e.errorCallback(c) : u(c);
60
- });
61
- },
62
- deleteOne: (a, d, l) => n.delete(r(a.id ? `${a.path}/${a.id}` : a.path, d?.config.apiBasePath) || "", {
63
- headers: {
64
- Authorization: l?.token
65
- },
66
- ...a.meta
67
- }).then((t) => e.successCallback ? e.successCallback(t) : h(t)).catch((t) => {
68
- throw e.errorCallback ? e.errorCallback(t) : u(t);
69
- }),
70
- getOne: (a, d, l) => n.get(r(a.id ? `${a.path}/${a.id}` : a.path, d?.config.apiBasePath) || "", {
71
- headers: {
72
- Authorization: l?.token
73
- },
74
- ...a.meta
75
- }).then((t) => e.successCallback ? e.successCallback(t) : h(t)).catch((t) => {
76
- throw e.errorCallback ? e.errorCallback(t) : u(t);
77
- }),
78
- getMany: (a, d, l) => n.get(r(a.path, d?.config.apiBasePath) || "", {
79
- params: {
80
- ids: a.ids
81
- },
82
- headers: {
83
- Authorization: l?.token
84
- },
85
- ...a.meta
86
- }).then((t) => e.successCallback ? e.successCallback(t) : h(t)).catch((t) => {
87
- throw e.errorCallback ? e.errorCallback(t) : u(t);
88
- }),
89
- createMany: (a, d, l) => n.post(r(a.path, d?.config.apiBasePath) || "", a.data, {
90
- headers: {
91
- Authorization: l?.token
92
- },
93
- ...a.meta
94
- }).then((t) => e.successCallback ? e.successCallback(t) : h(t)).catch((t) => {
95
- throw e.errorCallback ? e.errorCallback(t) : u(t);
96
- }),
97
- updateMany: (a, d, l) => n.put(r(a.path, d?.config.apiBasePath) || "", {
98
- ids: a.ids,
99
- data: a.data
100
- }, {
101
- headers: {
102
- Authorization: l?.token
103
- },
104
- ...a.meta
105
- }).then((t) => e.successCallback ? e.successCallback(t) : h(t)).catch((t) => {
106
- throw e.errorCallback ? e.errorCallback(t) : u(t);
107
- }),
108
- deleteMany: (a, d, l) => n.delete(r(a.path, d?.config.apiBasePath) || "", {
109
- params: {
110
- ids: a.ids
111
- },
112
- headers: {
113
- Authorization: l?.token
114
- },
115
- ...a.meta
116
- }).then((t) => e.successCallback ? e.successCallback(t) : h(t)).catch((t) => {
117
- throw e.errorCallback ? e.errorCallback(t) : u(t);
118
- }),
119
- custom: (a, d, l) => {
120
- let t = {
121
- ...a.query
122
- };
123
- return a.sorters && typeof a.sorters == "object" && (t = {
124
- ...t,
125
- ...a.sorters
126
- }), a.filters && typeof a.filters == "object" && (t = {
127
- ...t,
128
- ...a.filters
129
- }), n.request({
130
- url: r(a.path, d?.config.apiBasePath) || "",
131
- method: a.method || "GET",
132
- data: a.payload,
133
- params: t,
134
- signal: a.signal,
135
- headers: {
136
- Authorization: l?.token,
137
- ...a.headers
138
- },
139
- onUploadProgress: (c) => {
140
- const f = Math.round(c.loaded * 100 / (c.total || 1));
141
- a.onUploadProgress?.({
142
- loaded: c.loaded,
143
- total: c.total,
144
- percent: f
145
- });
146
- },
147
- onDownloadProgress: (c) => {
148
- const f = Math.round(c.loaded * 100 / (c.total || 1));
149
- a.onDownloadProgress?.({
150
- loaded: c.loaded,
151
- total: c.total,
152
- percent: f
153
- });
154
- },
155
- ...a.meta
156
- }).then((c) => e.successCallback ? e.successCallback(c) : h(c)).catch((c) => {
157
- throw e.errorCallback ? e.errorCallback(c) : u(c);
158
- });
159
- },
160
- getTotal: (a) => e.getTotal ? e.getTotal(a) : a.meta?.total || 0
161
- };
17
+ function i(i) {
18
+ let s = (t, n) => {
19
+ let r = `${e(i.apiUrl, "/")}${n ? `/${e(n, "/")}` : ""}`;
20
+ return t ? `${r}/${e(t || "", "/")}` : r;
21
+ };
22
+ return {
23
+ apiUrl: s,
24
+ getList: (e, n, r) => {
25
+ let c = {};
26
+ return e.pagination && typeof e.pagination == "object" && (c.page = e.pagination.page, c.pageSize = e.pagination.pageSize), t.get(s(e.path, n?.config.apiBasePath) || "", {
27
+ params: {
28
+ ...c,
29
+ ...e.filters,
30
+ ...e.sorters
31
+ },
32
+ headers: { Authorization: r?.token },
33
+ ...e.meta
34
+ }).then((e) => i.successCallback ? i.successCallback(e) : a(e)).catch((e) => {
35
+ throw i.errorCallback ? i.errorCallback(e) : o(e);
36
+ });
37
+ },
38
+ create: (e, c, l) => {
39
+ let u = e.data;
40
+ return e.data && typeof e.data == "object" && !Array.isArray(e.data) && !(e.data instanceof FormData) && n(e.data) && (u = r(e.data)), t.post(s(e.path, c?.config.apiBasePath) || "", u, {
41
+ headers: { Authorization: l?.token },
42
+ ...e.meta
43
+ }).then((e) => i.successCallback ? i.successCallback(e) : a(e)).catch((e) => {
44
+ throw i.errorCallback ? i.errorCallback(e) : o(e);
45
+ });
46
+ },
47
+ update: (e, c, l) => {
48
+ let u = e.data;
49
+ return e.data && typeof e.data == "object" && !Array.isArray(e.data) && !(e.data instanceof FormData) && n(e.data) && (u = r(e.data)), t.put(s(e.id ? `${e.path}/${e.id}` : e.path, c?.config.apiBasePath) || "", u, {
50
+ headers: { Authorization: l?.token },
51
+ ...e.meta
52
+ }).then((e) => i.successCallback ? i.successCallback(e) : a(e)).catch((e) => {
53
+ throw i.errorCallback ? i.errorCallback(e) : o(e);
54
+ });
55
+ },
56
+ deleteOne: (e, n, r) => t.delete(s(e.id ? `${e.path}/${e.id}` : e.path, n?.config.apiBasePath) || "", {
57
+ headers: { Authorization: r?.token },
58
+ ...e.meta
59
+ }).then((e) => i.successCallback ? i.successCallback(e) : a(e)).catch((e) => {
60
+ throw i.errorCallback ? i.errorCallback(e) : o(e);
61
+ }),
62
+ getOne: (e, n, r) => t.get(s(e.id ? `${e.path}/${e.id}` : e.path, n?.config.apiBasePath) || "", {
63
+ headers: { Authorization: r?.token },
64
+ ...e.meta
65
+ }).then((e) => i.successCallback ? i.successCallback(e) : a(e)).catch((e) => {
66
+ throw i.errorCallback ? i.errorCallback(e) : o(e);
67
+ }),
68
+ getMany: (e, n, r) => t.get(s(e.path, n?.config.apiBasePath) || "", {
69
+ params: { ids: e.ids },
70
+ headers: { Authorization: r?.token },
71
+ ...e.meta
72
+ }).then((e) => i.successCallback ? i.successCallback(e) : a(e)).catch((e) => {
73
+ throw i.errorCallback ? i.errorCallback(e) : o(e);
74
+ }),
75
+ createMany: (e, n, r) => t.post(s(e.path, n?.config.apiBasePath) || "", e.data, {
76
+ headers: { Authorization: r?.token },
77
+ ...e.meta
78
+ }).then((e) => i.successCallback ? i.successCallback(e) : a(e)).catch((e) => {
79
+ throw i.errorCallback ? i.errorCallback(e) : o(e);
80
+ }),
81
+ updateMany: (e, n, r) => t.put(s(e.path, n?.config.apiBasePath) || "", {
82
+ ids: e.ids,
83
+ data: e.data
84
+ }, {
85
+ headers: { Authorization: r?.token },
86
+ ...e.meta
87
+ }).then((e) => i.successCallback ? i.successCallback(e) : a(e)).catch((e) => {
88
+ throw i.errorCallback ? i.errorCallback(e) : o(e);
89
+ }),
90
+ deleteMany: (e, n, r) => t.delete(s(e.path, n?.config.apiBasePath) || "", {
91
+ params: { ids: e.ids },
92
+ headers: { Authorization: r?.token },
93
+ ...e.meta
94
+ }).then((e) => i.successCallback ? i.successCallback(e) : a(e)).catch((e) => {
95
+ throw i.errorCallback ? i.errorCallback(e) : o(e);
96
+ }),
97
+ custom: (e, n, r) => {
98
+ let c = { ...e.query };
99
+ return e.sorters && typeof e.sorters == "object" && (c = {
100
+ ...c,
101
+ ...e.sorters
102
+ }), e.filters && typeof e.filters == "object" && (c = {
103
+ ...c,
104
+ ...e.filters
105
+ }), t.request({
106
+ url: s(e.path, n?.config.apiBasePath) || "",
107
+ method: e.method || "GET",
108
+ data: e.payload,
109
+ params: c,
110
+ signal: e.signal,
111
+ headers: {
112
+ Authorization: r?.token,
113
+ ...e.headers
114
+ },
115
+ onUploadProgress: (t) => {
116
+ let n = Math.round(t.loaded * 100 / (t.total || 1));
117
+ e.onUploadProgress?.({
118
+ loaded: t.loaded,
119
+ total: t.total,
120
+ percent: n
121
+ });
122
+ },
123
+ onDownloadProgress: (t) => {
124
+ let n = Math.round(t.loaded * 100 / (t.total || 1));
125
+ e.onDownloadProgress?.({
126
+ loaded: t.loaded,
127
+ total: t.total,
128
+ percent: n
129
+ });
130
+ },
131
+ ...e.meta
132
+ }).then((e) => i.successCallback ? i.successCallback(e) : a(e)).catch((e) => {
133
+ throw i.errorCallback ? i.errorCallback(e) : o(e);
134
+ });
135
+ },
136
+ getTotal: (e) => i.getTotal ? i.getTotal(e) : e.meta?.total || 0
137
+ };
162
138
  }
163
- function h(e) {
164
- const r = typeof e.data?.data > "u" ? e.data : e.data?.data;
165
- return {
166
- message: e.data?.message,
167
- data: r,
168
- meta: e.data?.meta,
169
- raw: e.data,
170
- headers: e.headers,
171
- status: e.status
172
- };
139
+ function a(e) {
140
+ let t = e.data?.data === void 0 ? e.data : e.data?.data;
141
+ return {
142
+ message: e.data?.message,
143
+ data: t,
144
+ meta: e.data?.meta,
145
+ raw: e.data,
146
+ headers: e.headers,
147
+ status: e.status
148
+ };
173
149
  }
174
- function u(e) {
175
- return {
176
- message: e.response?.data?.message || e?.message,
177
- data: e.response?.data?.data,
178
- meta: e.response?.data?.meta,
179
- status: e.response?.data?.code || e.response?.status || 500,
180
- raw: e.response?.data
181
- };
150
+ function o(e) {
151
+ return {
152
+ message: e.response?.data?.message || e?.message,
153
+ data: e.response?.data?.data,
154
+ meta: e.response?.data?.meta,
155
+ status: e.response?.data?.code || e.response?.status || 500,
156
+ raw: e.response?.data
157
+ };
182
158
  }
183
- export {
184
- y as simpleDataProvider
185
- };
159
+ export { i as simpleDataProvider };
@@ -1,31 +1,29 @@
1
- import { createI18n as s } from "vue-i18n";
2
- function t(r) {
3
- const l = s({
4
- legacy: !1,
5
- locale: r?.locale,
6
- fallbackLocale: r?.fallbackLocale,
7
- messages: r?.messages,
8
- missingWarn: !1,
9
- fallbackWarn: !1
10
- });
11
- return {
12
- t: (e, a, o) => {
13
- const c = l.global.t(e, a);
14
- return c === e && o ? o : c;
15
- },
16
- changeLocale: (e, a) => new Promise((o) => {
17
- l.global.locale.value = e, o(e);
18
- }),
19
- loadLocale: (e, a) => new Promise((o) => {
20
- l.global.setLocaleMessage(e, a), o(e);
21
- }),
22
- mergeLocale: (e, a) => {
23
- l.global.mergeLocaleMessage(e, a);
24
- },
25
- getLocale: () => l.global.locale.value,
26
- getLocales: () => l.global.availableLocales.map((e) => e)
27
- };
1
+ import { createI18n as e } from "vue-i18n";
2
+ function t(t) {
3
+ let n = e({
4
+ legacy: !1,
5
+ locale: t?.locale,
6
+ fallbackLocale: t?.fallbackLocale,
7
+ messages: t?.messages,
8
+ missingWarn: !1,
9
+ fallbackWarn: !1
10
+ });
11
+ return {
12
+ t: (e, t, r) => {
13
+ let i = n.global.t(e, t);
14
+ return i === e && r ? r : i;
15
+ },
16
+ changeLocale: (e, t) => new Promise((t) => {
17
+ n.global.locale.value = e, t(e);
18
+ }),
19
+ loadLocale: (e, t) => new Promise((r) => {
20
+ n.global.setLocaleMessage(e, t), r(e);
21
+ }),
22
+ mergeLocale: (e, t) => {
23
+ n.global.mergeLocaleMessage(e, t);
24
+ },
25
+ getLocale: () => n.global.locale.value,
26
+ getLocales: () => n.global.availableLocales.map((e) => e)
27
+ };
28
28
  }
29
- export {
30
- t as i18nProvider
31
- };
29
+ export { t as i18nProvider };
@@ -0,0 +1,3 @@
1
+ import "./authProvider.js";
2
+ import "./dataProvider.js";
3
+ import "./i18nProvider.js";