@tager/admin-import 0.1.3 → 1.0.1
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/dist/constants/paths.d.ts +4 -4
- package/dist/constants/routes.d.ts +3 -3
- package/dist/dev/App.vue.d.ts +6 -0
- package/dist/dev/config.d.ts +2 -0
- package/dist/dev/env.d.ts +1 -0
- package/dist/dev/main.d.ts +3 -0
- package/dist/index.mjs +405 -0
- package/dist/locales/apply.d.ts +1 -0
- package/dist/locales/en.d.ts +19 -21
- package/dist/locales/ru.d.ts +2 -3
- package/dist/main.d.ts +3 -3
- package/dist/services/requests.d.ts +8 -8
- package/dist/style.css +1 -0
- package/dist/typings/model.d.ts +33 -33
- package/dist/utils/paths.d.ts +4 -4
- package/dist/views/ImportForm/ImportForm.helpers.d.ts +9 -9
- package/dist/views/ImportForm/ImportForm.vue.d.ts +4163 -9238
- package/dist/views/ImportForm/index.d.ts +1 -1
- package/dist/views/ImportList/ImportList.vue.d.ts +17 -38
- package/dist/views/ImportList/components/CellHistory/CellHistory.helpers.d.ts +1 -1
- package/dist/views/ImportList/components/CellHistory/CellHistory.vue.d.ts +20 -230
- package/dist/views/ImportList/components/CellHistory/index.d.ts +1 -1
- package/dist/views/ImportList/index.d.ts +1 -1
- package/package.json +46 -49
- package/src/constants/routes.ts +10 -10
- package/src/dev/App.vue +40 -0
- package/src/dev/config.ts +23 -0
- package/src/dev/env.ts +17 -0
- package/src/dev/main.ts +36 -0
- package/src/locales/apply.ts +9 -0
- package/src/locales/en.ts +1 -4
- package/src/locales/ru.ts +19 -22
- package/src/main.ts +2 -6
- package/src/services/requests.ts +4 -4
- package/src/typings/model.ts +4 -4
- package/src/views/ImportForm/ImportForm.helpers.ts +3 -3
- package/src/views/ImportForm/ImportForm.vue +84 -81
- package/src/views/ImportList/ImportList.vue +45 -42
- package/src/views/ImportList/components/CellHistory/CellHistory.helpers.ts +6 -5
- package/src/views/ImportList/components/CellHistory/CellHistory.vue +5 -6
- package/README.md +0 -1
- package/dist/dev.d.ts +0 -1
- package/dist/index.esm.js +0 -3624
- package/dist/index.umd.js +0 -3636
- package/dist/views/ImportList/components/CellHistory/CellHistory.types.d.ts +0 -4
- package/src/dev.ts +0 -41
- package/src/typings/sfc.d.ts +0 -12
- package/src/typings/shims-tsx.d.ts +0 -13
- package/src/typings/shims-vue.d.ts +0 -11
- package/src/views/App.vue +0 -34
- package/src/views/ImportList/components/CellHistory/CellHistory.types.ts +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const IMPORT_ROUTE_PATHS: {
|
|
2
|
-
readonly IMPORT_LIST: "/import";
|
|
3
|
-
readonly IMPORT_FORM: "/import/:importId";
|
|
4
|
-
};
|
|
1
|
+
export declare const IMPORT_ROUTE_PATHS: {
|
|
2
|
+
readonly IMPORT_LIST: "/import";
|
|
3
|
+
readonly IMPORT_FORM: "/import/:importId";
|
|
4
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const IMPORT_LIST_ROUTE:
|
|
3
|
-
export declare const IMPORT_FORM_ROUTE:
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
2
|
+
export declare const IMPORT_LIST_ROUTE: RouteRecordRaw;
|
|
3
|
+
export declare const IMPORT_FORM_ROUTE: RouteRecordRaw;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type MenuItemType } from "@tager/admin-layout";
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
5
|
+
sidebarMenuList: MenuItemType[];
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function populateEnvironment(): void;
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import { i18n as O, request as M, useI18n as P, useToast as B, useResource as H, navigateBack as q, convertRequestErrorToMap as Q } from "@tager/admin-services";
|
|
2
|
+
import { defineComponent as R, openBlock as c, createElementBlock as F, Fragment as E, renderList as N, createElementVNode as k, toDisplayString as $, createTextVNode as j, createCommentVNode as G, onMounted as L, resolveComponent as u, createBlock as w, withCtx as v, createVNode as h, computed as S, ref as I, watch as J, withModifiers as K } from "vue";
|
|
3
|
+
import { DataTable as W, useDataTable as X, FormFieldSelect as Y, FormFooter as Z, FormFieldFileInput as x } from "@tager/admin-ui";
|
|
4
|
+
import { Page as U } from "@tager/admin-layout";
|
|
5
|
+
import { universalFieldUtils as V, DynamicField as ee } from "@tager/admin-dynamic-field";
|
|
6
|
+
import { compile as te } from "path-to-regexp";
|
|
7
|
+
import { useRouter as oe } from "vue-router";
|
|
8
|
+
const re = {
|
|
9
|
+
home: "Home",
|
|
10
|
+
import: "Import",
|
|
11
|
+
importList: "Import List",
|
|
12
|
+
importForm: "Import Form",
|
|
13
|
+
type: "Type",
|
|
14
|
+
importType: "Import type",
|
|
15
|
+
status: "status",
|
|
16
|
+
message: "Message",
|
|
17
|
+
log: "Log",
|
|
18
|
+
params: "Params",
|
|
19
|
+
file: "file",
|
|
20
|
+
newImport: "New import",
|
|
21
|
+
importCreation: "Import creation",
|
|
22
|
+
success: "Success",
|
|
23
|
+
error: "Error",
|
|
24
|
+
createdSuccessMessage: "Import has been successfully created",
|
|
25
|
+
createdErrorMessage: "Import creation has been failed"
|
|
26
|
+
}, ae = {
|
|
27
|
+
home: "Главная",
|
|
28
|
+
import: "Импорт",
|
|
29
|
+
importList: "Список импортов",
|
|
30
|
+
importForm: "Форма импорта",
|
|
31
|
+
type: "Тип",
|
|
32
|
+
importType: "Тип импорта",
|
|
33
|
+
status: "Статус",
|
|
34
|
+
message: "Сообщение",
|
|
35
|
+
log: "Лог",
|
|
36
|
+
params: "Параметры",
|
|
37
|
+
file: "Файл",
|
|
38
|
+
newImport: "Новый импорт",
|
|
39
|
+
importCreation: "Создание импорта",
|
|
40
|
+
success: "Успех",
|
|
41
|
+
error: "Ошибка",
|
|
42
|
+
createdSuccessMessage: "Импорт была успешно создан",
|
|
43
|
+
createdErrorMessage: "Создание импорта не удалось"
|
|
44
|
+
};
|
|
45
|
+
function ie() {
|
|
46
|
+
O.addTranslations("en", "import", re), O.addTranslations("ru", "import", ae);
|
|
47
|
+
}
|
|
48
|
+
function ne(e) {
|
|
49
|
+
return M.get({ path: "/admin/tager/import", params: e });
|
|
50
|
+
}
|
|
51
|
+
function se() {
|
|
52
|
+
return M.get({ path: "/admin/tager/import/info" });
|
|
53
|
+
}
|
|
54
|
+
function me(e) {
|
|
55
|
+
return M.post({ path: "/admin/tager/import", body: e });
|
|
56
|
+
}
|
|
57
|
+
const T = {
|
|
58
|
+
IMPORT_LIST: "/import",
|
|
59
|
+
IMPORT_FORM: "/import/:importId"
|
|
60
|
+
};
|
|
61
|
+
function D() {
|
|
62
|
+
return T.IMPORT_LIST;
|
|
63
|
+
}
|
|
64
|
+
function le(e) {
|
|
65
|
+
return te(T.IMPORT_FORM)(e);
|
|
66
|
+
}
|
|
67
|
+
function pe(e) {
|
|
68
|
+
const t = new Date(e);
|
|
69
|
+
return new Intl.DateTimeFormat("ru-RU", {
|
|
70
|
+
year: "numeric",
|
|
71
|
+
month: "numeric",
|
|
72
|
+
day: "numeric",
|
|
73
|
+
hour: "numeric",
|
|
74
|
+
minute: "numeric",
|
|
75
|
+
second: "numeric"
|
|
76
|
+
}).format(t);
|
|
77
|
+
}
|
|
78
|
+
const ue = R({
|
|
79
|
+
name: "CellHistory",
|
|
80
|
+
props: {
|
|
81
|
+
history: {
|
|
82
|
+
type: Array,
|
|
83
|
+
default: () => []
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
setup() {
|
|
87
|
+
return {
|
|
88
|
+
dateTimeFormat: pe
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}), _ = (e, t) => {
|
|
92
|
+
const a = e.__vccOpts || e;
|
|
93
|
+
for (const [i, r] of t)
|
|
94
|
+
a[i] = r;
|
|
95
|
+
return a;
|
|
96
|
+
}, ce = { key: 0 }, de = { class: "name" };
|
|
97
|
+
function ge(e, t, a, i, r, d) {
|
|
98
|
+
return e.history.length > 0 ? (c(), F("ul", ce, [
|
|
99
|
+
(c(!0), F(E, null, N(e.history, (n, m) => (c(), F("li", { key: m }, [
|
|
100
|
+
k("span", de, $(n.status), 1),
|
|
101
|
+
j(" " + $(e.dateTimeFormat(n.datetime)), 1)
|
|
102
|
+
]))), 128))
|
|
103
|
+
])) : G("", !0);
|
|
104
|
+
}
|
|
105
|
+
const fe = /* @__PURE__ */ _(ue, [["render", ge], ["__scopeId", "data-v-ebee5edd"]]), ye = R({
|
|
106
|
+
name: "ImportList",
|
|
107
|
+
components: { CellHistory: fe, DataTable: W, Page: U },
|
|
108
|
+
setup() {
|
|
109
|
+
const { t: e } = P(), {
|
|
110
|
+
fetchEntityList: t,
|
|
111
|
+
isLoading: a,
|
|
112
|
+
rowData: i,
|
|
113
|
+
errorMessage: r,
|
|
114
|
+
searchQuery: d,
|
|
115
|
+
handleChange: n,
|
|
116
|
+
pageSize: m,
|
|
117
|
+
pageCount: l,
|
|
118
|
+
pageNumber: s
|
|
119
|
+
} = X({
|
|
120
|
+
fetchEntityList: (o) => ne({
|
|
121
|
+
pageNumber: o.pageNumber,
|
|
122
|
+
pageSize: o.pageSize
|
|
123
|
+
}),
|
|
124
|
+
initialValue: [],
|
|
125
|
+
resourceName: "Import list",
|
|
126
|
+
pageSize: 100
|
|
127
|
+
});
|
|
128
|
+
return L(() => {
|
|
129
|
+
t();
|
|
130
|
+
}), {
|
|
131
|
+
columnDefs: [
|
|
132
|
+
{
|
|
133
|
+
id: 1,
|
|
134
|
+
name: "ID",
|
|
135
|
+
field: "id",
|
|
136
|
+
style: { width: "50px", textAlign: "center" },
|
|
137
|
+
headStyle: { width: "50px", textAlign: "center" }
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: 2,
|
|
141
|
+
name: e("import:type"),
|
|
142
|
+
field: "strategy",
|
|
143
|
+
style: { width: "150px" },
|
|
144
|
+
headStyle: { width: "150px" }
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: 3,
|
|
148
|
+
name: e("import:params"),
|
|
149
|
+
field: "params",
|
|
150
|
+
type: "key-value",
|
|
151
|
+
format: ({ row: o }) => o.params ? o.params.map((y) => ({
|
|
152
|
+
key: y.label,
|
|
153
|
+
value: y.value
|
|
154
|
+
})) : null
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: 4,
|
|
158
|
+
name: e("import:status"),
|
|
159
|
+
field: "status",
|
|
160
|
+
style: { width: "120px" },
|
|
161
|
+
headStyle: { width: "120px" }
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: 5,
|
|
165
|
+
name: e("import:message"),
|
|
166
|
+
field: "message"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: 6,
|
|
170
|
+
name: e("import:log"),
|
|
171
|
+
field: "history",
|
|
172
|
+
style: { width: "270px", whiteSpace: "nowrap" },
|
|
173
|
+
headStyle: { width: "270px" }
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
id: 7,
|
|
177
|
+
name: e("import:file"),
|
|
178
|
+
field: "file",
|
|
179
|
+
type: "file",
|
|
180
|
+
style: { width: "150px", textAlign: "center" },
|
|
181
|
+
headStyle: { width: "150px", textAlign: "center" }
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
getImportFormUrl: le,
|
|
185
|
+
rowData: i,
|
|
186
|
+
isRowDataLoading: a,
|
|
187
|
+
errorMessage: r,
|
|
188
|
+
searchQuery: d,
|
|
189
|
+
handleChange: n,
|
|
190
|
+
pageSize: m,
|
|
191
|
+
pageCount: l,
|
|
192
|
+
pageNumber: s
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
function he(e, t, a, i, r, d) {
|
|
197
|
+
const n = u("CellHistory"), m = u("DataTable"), l = u("Page");
|
|
198
|
+
return c(), w(l, {
|
|
199
|
+
title: e.$i18n.t("import:import"),
|
|
200
|
+
"header-buttons": [
|
|
201
|
+
{
|
|
202
|
+
text: e.$i18n.t("import:newImport"),
|
|
203
|
+
href: e.getImportFormUrl({ importId: "create" })
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}, {
|
|
207
|
+
default: v(() => [
|
|
208
|
+
h(m, {
|
|
209
|
+
"column-defs": e.columnDefs,
|
|
210
|
+
"row-data": e.rowData,
|
|
211
|
+
loading: e.isRowDataLoading,
|
|
212
|
+
"error-message": e.errorMessage,
|
|
213
|
+
pagination: {
|
|
214
|
+
pageSize: e.pageSize,
|
|
215
|
+
pageCount: e.pageCount,
|
|
216
|
+
pageNumber: e.pageNumber,
|
|
217
|
+
disabled: e.isRowDataLoading
|
|
218
|
+
},
|
|
219
|
+
"use-search": !1,
|
|
220
|
+
onChange: e.handleChange
|
|
221
|
+
}, {
|
|
222
|
+
"cell(history)": v(({ row: s }) => [
|
|
223
|
+
h(n, {
|
|
224
|
+
history: s.history
|
|
225
|
+
}, null, 8, ["history"])
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["column-defs", "row-data", "loading", "error-message", "pagination", "onChange"])
|
|
229
|
+
]),
|
|
230
|
+
_: 1
|
|
231
|
+
}, 8, ["title", "header-buttons"]);
|
|
232
|
+
}
|
|
233
|
+
const Ie = /* @__PURE__ */ _(ye, [["render", he]]);
|
|
234
|
+
function Fe(e, t) {
|
|
235
|
+
var a, i;
|
|
236
|
+
return {
|
|
237
|
+
strategy: ((a = e.strategy) == null ? void 0 : a.value) ?? "",
|
|
238
|
+
file: ((i = e.file) == null ? void 0 : i.file.id) ?? "",
|
|
239
|
+
params: t.map((r) => ({
|
|
240
|
+
name: r.config.name,
|
|
241
|
+
value: V.getOutgoingValue(r)
|
|
242
|
+
}))
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
function ve(e) {
|
|
246
|
+
return e.map((t) => ({
|
|
247
|
+
value: t.id,
|
|
248
|
+
label: t.name
|
|
249
|
+
}));
|
|
250
|
+
}
|
|
251
|
+
const Te = R({
|
|
252
|
+
name: "ImportForm",
|
|
253
|
+
components: { Page: U, FormFieldFileInput: x, DynamicField: ee, FormFooter: Z, FormFieldSelect: Y },
|
|
254
|
+
setup() {
|
|
255
|
+
const { t: e } = P(), t = B(), a = oe(), [
|
|
256
|
+
i,
|
|
257
|
+
{ data: r, loading: d }
|
|
258
|
+
] = H({
|
|
259
|
+
fetchResource: se,
|
|
260
|
+
initialValue: {
|
|
261
|
+
fileScenario: "",
|
|
262
|
+
strategies: []
|
|
263
|
+
},
|
|
264
|
+
resourceName: "Module info"
|
|
265
|
+
}), n = S(
|
|
266
|
+
() => r.value.fileScenario
|
|
267
|
+
), m = S(
|
|
268
|
+
() => ve(r.value.strategies)
|
|
269
|
+
);
|
|
270
|
+
L(() => {
|
|
271
|
+
i();
|
|
272
|
+
});
|
|
273
|
+
const l = I({}), s = I({ strategy: null, file: null }), g = I(!1), o = I([]);
|
|
274
|
+
function y() {
|
|
275
|
+
const p = r.value.strategies.find(
|
|
276
|
+
(f) => {
|
|
277
|
+
var C;
|
|
278
|
+
return f.id === ((C = s.value.strategy) == null ? void 0 : C.value);
|
|
279
|
+
}
|
|
280
|
+
), b = (p == null ? void 0 : p.fields) ?? [];
|
|
281
|
+
o.value = b.map(
|
|
282
|
+
(f) => V.createFormField(f, null)
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
J(
|
|
286
|
+
() => s.value.strategy,
|
|
287
|
+
() => {
|
|
288
|
+
y();
|
|
289
|
+
}
|
|
290
|
+
), L(() => {
|
|
291
|
+
y();
|
|
292
|
+
});
|
|
293
|
+
function z(p) {
|
|
294
|
+
g.value = !0;
|
|
295
|
+
const b = Fe(
|
|
296
|
+
s.value,
|
|
297
|
+
o.value
|
|
298
|
+
);
|
|
299
|
+
me(b).then(() => {
|
|
300
|
+
l.value = {}, (p.type === "create" || p.type === "save" || p.type === "create_exit" || p.type === "save_exit") && q(a, D()), t.show({
|
|
301
|
+
variant: "success",
|
|
302
|
+
title: e("import:success"),
|
|
303
|
+
body: e("import:createdSuccessMessage")
|
|
304
|
+
});
|
|
305
|
+
}).catch((f) => {
|
|
306
|
+
console.error(f), l.value = Q(f), t.show({
|
|
307
|
+
variant: "danger",
|
|
308
|
+
title: e("import:error"),
|
|
309
|
+
body: e("import:createdErrorMessage")
|
|
310
|
+
});
|
|
311
|
+
}).finally(() => {
|
|
312
|
+
g.value = !1;
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
const A = S(() => d.value);
|
|
316
|
+
return {
|
|
317
|
+
values: s,
|
|
318
|
+
errors: l,
|
|
319
|
+
isSubmitting: g,
|
|
320
|
+
submitForm: z,
|
|
321
|
+
getImportListUrl: D,
|
|
322
|
+
strategyOptionList: m,
|
|
323
|
+
strategyFileScenario: n,
|
|
324
|
+
isContentLoading: A,
|
|
325
|
+
templateValues: o
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
function be(e, t, a, i, r, d) {
|
|
330
|
+
const n = u("FormFieldSelect"), m = u("FormFieldFileInput"), l = u("DynamicField"), s = u("FormFooter"), g = u("Page");
|
|
331
|
+
return c(), w(g, {
|
|
332
|
+
title: e.$i18n.t("import:importCreation"),
|
|
333
|
+
"is-content-loading": e.isContentLoading
|
|
334
|
+
}, {
|
|
335
|
+
footer: v(() => [
|
|
336
|
+
h(s, {
|
|
337
|
+
"back-href": e.getImportListUrl(),
|
|
338
|
+
"is-submitting": e.isSubmitting,
|
|
339
|
+
"is-creation": !0,
|
|
340
|
+
onSubmit: e.submitForm
|
|
341
|
+
}, null, 8, ["back-href", "is-submitting", "onSubmit"])
|
|
342
|
+
]),
|
|
343
|
+
default: v(() => [
|
|
344
|
+
k("form", {
|
|
345
|
+
novalidate: "",
|
|
346
|
+
onSubmit: t[2] || (t[2] = K(() => {
|
|
347
|
+
}, ["prevent"]))
|
|
348
|
+
}, [
|
|
349
|
+
h(n, {
|
|
350
|
+
value: e.values.strategy,
|
|
351
|
+
"onUpdate:value": t[0] || (t[0] = (o) => e.values.strategy = o),
|
|
352
|
+
options: e.strategyOptionList,
|
|
353
|
+
error: e.errors.strategy,
|
|
354
|
+
name: "importType",
|
|
355
|
+
label: e.$i18n.t("import:importType")
|
|
356
|
+
}, null, 8, ["value", "options", "error", "label"]),
|
|
357
|
+
h(m, {
|
|
358
|
+
value: e.values.file,
|
|
359
|
+
"onUpdate:value": t[1] || (t[1] = (o) => e.values.file = o),
|
|
360
|
+
error: e.errors.file,
|
|
361
|
+
label: e.$i18n.t("import:file"),
|
|
362
|
+
name: "file",
|
|
363
|
+
scenario: e.strategyFileScenario
|
|
364
|
+
}, null, 8, ["value", "error", "label", "scenario"]),
|
|
365
|
+
(c(!0), F(E, null, N(e.templateValues, (o) => (c(), w(l, {
|
|
366
|
+
key: o.config.name,
|
|
367
|
+
field: o
|
|
368
|
+
}, null, 8, ["field"]))), 128))
|
|
369
|
+
], 32)
|
|
370
|
+
]),
|
|
371
|
+
_: 1
|
|
372
|
+
}, 8, ["title", "is-content-loading"]);
|
|
373
|
+
}
|
|
374
|
+
const Se = /* @__PURE__ */ _(Te, [["render", be]]), Le = {
|
|
375
|
+
path: T.IMPORT_LIST,
|
|
376
|
+
component: Ie,
|
|
377
|
+
name: "Import List",
|
|
378
|
+
meta: {
|
|
379
|
+
getBreadcrumbs: (e, t) => [
|
|
380
|
+
{ url: "/", text: t.t("import:home") },
|
|
381
|
+
{ url: e.path, text: t.t("import:importList") }
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
}, De = {
|
|
385
|
+
path: T.IMPORT_FORM,
|
|
386
|
+
component: Se,
|
|
387
|
+
name: "Import Form",
|
|
388
|
+
meta: {
|
|
389
|
+
getBreadcrumbs: (e, t) => [
|
|
390
|
+
{ url: "/", text: t.t("import:home") },
|
|
391
|
+
{ url: Le.path, text: t.t("import:importList") },
|
|
392
|
+
{ url: e.path, text: t.t("import:importForm") }
|
|
393
|
+
]
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
ie();
|
|
397
|
+
export {
|
|
398
|
+
De as IMPORT_FORM_ROUTE,
|
|
399
|
+
Le as IMPORT_LIST_ROUTE,
|
|
400
|
+
me as createImport,
|
|
401
|
+
le as getImportFormUrl,
|
|
402
|
+
ne as getImportList,
|
|
403
|
+
D as getImportListUrl,
|
|
404
|
+
se as getModuleInfo
|
|
405
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function applyTranslations(): void;
|
package/dist/locales/en.d.ts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
declare const EN: {
|
|
2
|
-
home: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
export default EN;
|
|
1
|
+
export declare const EN: {
|
|
2
|
+
home: string;
|
|
3
|
+
import: string;
|
|
4
|
+
importList: string;
|
|
5
|
+
importForm: string;
|
|
6
|
+
type: string;
|
|
7
|
+
importType: string;
|
|
8
|
+
status: string;
|
|
9
|
+
message: string;
|
|
10
|
+
log: string;
|
|
11
|
+
params: string;
|
|
12
|
+
file: string;
|
|
13
|
+
newImport: string;
|
|
14
|
+
importCreation: string;
|
|
15
|
+
success: string;
|
|
16
|
+
error: string;
|
|
17
|
+
createdSuccessMessage: string;
|
|
18
|
+
createdErrorMessage: string;
|
|
19
|
+
};
|
package/dist/locales/ru.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import EN from './en';
|
|
2
|
-
declare const RU: typeof EN;
|
|
3
|
-
export default RU;
|
|
1
|
+
import { EN } from './en';
|
|
2
|
+
export declare const RU: typeof EN;
|
package/dist/main.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './constants/routes';
|
|
2
|
-
export * from './utils/paths';
|
|
3
|
-
export * from './services/requests';
|
|
1
|
+
export * from './constants/routes';
|
|
2
|
+
export * from './utils/paths';
|
|
3
|
+
export * from './services/requests';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ResponseBody } from '@tager/admin-services';
|
|
2
|
-
import { ModuleInfoType, ImportCreatePayload, ImportType } from '../typings/model';
|
|
3
|
-
export declare function getImportList(params?: {
|
|
4
|
-
pageNumber?: number;
|
|
5
|
-
pageSize?: number;
|
|
6
|
-
}): Promise<ResponseBody<Array<ImportType>>>;
|
|
7
|
-
export declare function getModuleInfo(): Promise<ResponseBody<ModuleInfoType>>;
|
|
8
|
-
export declare function createImport(payload: ImportCreatePayload): Promise<ResponseBody<ImportType>>;
|
|
1
|
+
import { type ResponseBody } from '@tager/admin-services';
|
|
2
|
+
import { type ModuleInfoType, type ImportCreatePayload, type ImportType } from '../typings/model';
|
|
3
|
+
export declare function getImportList(params?: {
|
|
4
|
+
pageNumber?: number;
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
}): Promise<ResponseBody<Array<ImportType>>>;
|
|
7
|
+
export declare function getModuleInfo(): Promise<ResponseBody<ModuleInfoType>>;
|
|
8
|
+
export declare function createImport(payload: ImportCreatePayload): Promise<ResponseBody<ImportType>>;
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.name[data-v-ebee5edd]{display:inline-block;width:100px}
|
package/dist/typings/model.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { FileType } from '@tager/admin-services';
|
|
2
|
-
import { FieldConfigUnion, FieldShortType, OutgoingValueUnion } from '@tager/admin-dynamic-field';
|
|
3
|
-
export interface HistoryType {
|
|
4
|
-
readonly datetime: string;
|
|
5
|
-
readonly status: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ParamType {
|
|
8
|
-
readonly label: string;
|
|
9
|
-
readonly value: string;
|
|
10
|
-
}
|
|
11
|
-
export interface ImportType {
|
|
12
|
-
readonly id: number;
|
|
13
|
-
readonly strategy: string;
|
|
14
|
-
readonly status: string;
|
|
15
|
-
readonly message: string | null;
|
|
16
|
-
readonly history: Array<HistoryType>;
|
|
17
|
-
readonly params: Array<ParamType> | null;
|
|
18
|
-
readonly file: FileType | null;
|
|
19
|
-
}
|
|
20
|
-
export interface StrategyType {
|
|
21
|
-
readonly id: string;
|
|
22
|
-
readonly name: string;
|
|
23
|
-
readonly fields: Array<FieldConfigUnion>;
|
|
24
|
-
}
|
|
25
|
-
export interface ModuleInfoType {
|
|
26
|
-
readonly fileScenario: string;
|
|
27
|
-
readonly strategies: Array<StrategyType>;
|
|
28
|
-
}
|
|
29
|
-
export interface ImportCreatePayload {
|
|
30
|
-
strategy: string;
|
|
31
|
-
file: string;
|
|
32
|
-
params: Array<FieldShortType<OutgoingValueUnion>>;
|
|
33
|
-
}
|
|
1
|
+
import { type FileType } from '@tager/admin-services';
|
|
2
|
+
import { type FieldConfigUnion, type FieldShortType, type OutgoingValueUnion } from '@tager/admin-dynamic-field';
|
|
3
|
+
export interface HistoryType {
|
|
4
|
+
readonly datetime: string;
|
|
5
|
+
readonly status: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ParamType {
|
|
8
|
+
readonly label: string;
|
|
9
|
+
readonly value: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ImportType {
|
|
12
|
+
readonly id: number;
|
|
13
|
+
readonly strategy: string;
|
|
14
|
+
readonly status: string;
|
|
15
|
+
readonly message: string | null;
|
|
16
|
+
readonly history: Array<HistoryType>;
|
|
17
|
+
readonly params: Array<ParamType> | null;
|
|
18
|
+
readonly file: FileType | null;
|
|
19
|
+
}
|
|
20
|
+
export interface StrategyType {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly fields: Array<FieldConfigUnion>;
|
|
24
|
+
}
|
|
25
|
+
export interface ModuleInfoType {
|
|
26
|
+
readonly fileScenario: string;
|
|
27
|
+
readonly strategies: Array<StrategyType>;
|
|
28
|
+
}
|
|
29
|
+
export interface ImportCreatePayload {
|
|
30
|
+
strategy: string;
|
|
31
|
+
file: string;
|
|
32
|
+
params: Array<FieldShortType<OutgoingValueUnion>>;
|
|
33
|
+
}
|
package/dist/utils/paths.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function getImportListUrl(): string;
|
|
2
|
-
export declare function getImportFormUrl(params: {
|
|
3
|
-
importId: string | number;
|
|
4
|
-
}): string;
|
|
1
|
+
export declare function getImportListUrl(): string;
|
|
2
|
+
export declare function getImportFormUrl(params: {
|
|
3
|
+
importId: string | number;
|
|
4
|
+
}): string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OptionType, SingleFileInputValueType } from '@tager/admin-ui';
|
|
2
|
-
import { FieldUnion } from '@tager/admin-dynamic-field';
|
|
3
|
-
import { ImportCreatePayload, StrategyType } from '../../typings/model';
|
|
4
|
-
export
|
|
5
|
-
strategy: OptionType | null;
|
|
6
|
-
file: SingleFileInputValueType | null;
|
|
7
|
-
};
|
|
8
|
-
export declare function convertImportFormValuesToCreationPayload(values: FormValues, templateValues: Array<FieldUnion>): ImportCreatePayload;
|
|
9
|
-
export declare function convertStrategiesToStrategyOptionList(strategies: Array<StrategyType>): Array<OptionType>;
|
|
1
|
+
import { type OptionType, type SingleFileInputValueType } from '@tager/admin-ui';
|
|
2
|
+
import { type FieldUnion } from '@tager/admin-dynamic-field';
|
|
3
|
+
import { type ImportCreatePayload, type StrategyType } from '../../typings/model';
|
|
4
|
+
export type FormValues = {
|
|
5
|
+
strategy: OptionType | null;
|
|
6
|
+
file: SingleFileInputValueType | null;
|
|
7
|
+
};
|
|
8
|
+
export declare function convertImportFormValuesToCreationPayload(values: FormValues, templateValues: Array<FieldUnion>): ImportCreatePayload;
|
|
9
|
+
export declare function convertStrategiesToStrategyOptionList(strategies: Array<StrategyType>): Array<OptionType>;
|